@tempots/dom 34.0.0 → 34.1.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/dom/dom-utils.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +372 -355
- package/package.json +1 -1
- package/renderable/shadow-root.d.ts +9 -0
package/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const Ke = (t) => Symbol(t);
|
|
2
|
+
function ze(t, e) {
|
|
3
3
|
return {
|
|
4
4
|
type: t,
|
|
5
5
|
render: e
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function ve(t) {
|
|
9
9
|
return t != null && t !== !1 && t !== 0 && t !== "";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return !
|
|
11
|
+
function Ye(t) {
|
|
12
|
+
return !ve(t);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Xe(t) {
|
|
15
15
|
return t == null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Qe(t) {
|
|
18
18
|
return t != null;
|
|
19
19
|
}
|
|
20
20
|
const w = {
|
|
@@ -101,25 +101,25 @@ const w = {
|
|
|
101
101
|
* @param value - The value or signal to check.
|
|
102
102
|
* @returns A signal that emits `true` if the value is truthy, `false` otherwise.
|
|
103
103
|
*/
|
|
104
|
-
truthy: (t) => w.map(t,
|
|
104
|
+
truthy: (t) => w.map(t, ve),
|
|
105
105
|
/**
|
|
106
106
|
* Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
|
|
107
107
|
* @param value - The value or signal to check.
|
|
108
108
|
* @returns A signal that emits `true` if the value is falsy, `false` otherwise.
|
|
109
109
|
*/
|
|
110
|
-
falsy: (t) => w.map(t,
|
|
110
|
+
falsy: (t) => w.map(t, Ye),
|
|
111
111
|
/**
|
|
112
112
|
* Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
113
113
|
* @param value - The value or signal to check.
|
|
114
114
|
* @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
115
115
|
*/
|
|
116
|
-
nil: (t) => w.map(t,
|
|
116
|
+
nil: (t) => w.map(t, Xe),
|
|
117
117
|
/**
|
|
118
118
|
* Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
119
119
|
* @param value - The value or signal to check.
|
|
120
120
|
* @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
121
121
|
*/
|
|
122
|
-
defined: (t) => w.map(t,
|
|
122
|
+
defined: (t) => w.map(t, Qe)
|
|
123
123
|
}, Z = (...t) => (e, s) => {
|
|
124
124
|
if (t.length === 1)
|
|
125
125
|
return w.toSignal(t[0]).map(e);
|
|
@@ -129,14 +129,14 @@ const w = {
|
|
|
129
129
|
n,
|
|
130
130
|
s
|
|
131
131
|
);
|
|
132
|
-
},
|
|
132
|
+
}, ts = (t) => {
|
|
133
133
|
const e = Object.keys(t);
|
|
134
134
|
return Z(...Object.values(t))(
|
|
135
135
|
(...s) => Object.fromEntries(e.map((n, r) => [n, s[r]]))
|
|
136
136
|
);
|
|
137
|
-
},
|
|
137
|
+
}, Ze = (...t) => (e, s = {}) => {
|
|
138
138
|
const n = t.filter((r) => m.is(r));
|
|
139
|
-
return
|
|
139
|
+
return be(
|
|
140
140
|
() => e(...t.map(w.get)),
|
|
141
141
|
n,
|
|
142
142
|
s
|
|
@@ -215,7 +215,7 @@ class q {
|
|
|
215
215
|
* @public
|
|
216
216
|
*/
|
|
217
217
|
prop(e, s) {
|
|
218
|
-
const n =
|
|
218
|
+
const n = ce(() => T(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(() => te(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 O(this, () =>
|
|
246
|
+
return O(this, () => be(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(() => Z(...e)(s, n));
|
|
259
259
|
return this.track(r), r;
|
|
260
260
|
};
|
|
261
261
|
}
|
|
@@ -268,30 +268,30 @@ class q {
|
|
|
268
268
|
* @public
|
|
269
269
|
*/
|
|
270
270
|
effectOf(...e) {
|
|
271
|
-
return (s, n) => O(this, () =>
|
|
271
|
+
return (s, n) => O(this, () => Ze(...e)(s, n));
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const _ = [],
|
|
274
|
+
const _ = [], et = (t) => {
|
|
275
275
|
_.push(t);
|
|
276
|
-
},
|
|
276
|
+
}, tt = () => {
|
|
277
277
|
if (_.length === 0)
|
|
278
278
|
throw new Error("Cannot pop from empty scope stack");
|
|
279
279
|
_.pop();
|
|
280
|
-
},
|
|
281
|
-
|
|
280
|
+
}, de = () => _[_.length - 1] ?? null, ss = () => _, ns = () => _[_.length - 2] ?? null, O = (t, e) => {
|
|
281
|
+
et(t);
|
|
282
282
|
try {
|
|
283
283
|
return e();
|
|
284
284
|
} finally {
|
|
285
|
-
|
|
285
|
+
tt();
|
|
286
286
|
}
|
|
287
|
-
},
|
|
287
|
+
}, rs = (t) => {
|
|
288
288
|
const e = new q();
|
|
289
289
|
try {
|
|
290
290
|
return O(e, () => t(e));
|
|
291
291
|
} finally {
|
|
292
292
|
e.dispose();
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, ce = (t) => {
|
|
295
295
|
const e = _.slice();
|
|
296
296
|
_.length = 0;
|
|
297
297
|
try {
|
|
@@ -446,7 +446,7 @@ class m {
|
|
|
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 && de()?.onDispose(r), r;
|
|
450
450
|
};
|
|
451
451
|
/**
|
|
452
452
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
@@ -558,7 +558,7 @@ class m {
|
|
|
558
558
|
* @returns A new computed signal with the transformed value (auto-registered with current scope)
|
|
559
559
|
*/
|
|
560
560
|
map = (e, s = (n, r) => n === r) => {
|
|
561
|
-
const n = new
|
|
561
|
+
const n = new $(() => {
|
|
562
562
|
try {
|
|
563
563
|
return e(this.get());
|
|
564
564
|
} catch (r) {
|
|
@@ -578,7 +578,7 @@ class m {
|
|
|
578
578
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
579
579
|
*/
|
|
580
580
|
flatMap = (e, s = (n, r) => n === r) => {
|
|
581
|
-
const n = new
|
|
581
|
+
const n = new $(() => {
|
|
582
582
|
try {
|
|
583
583
|
return e(this.get()).get();
|
|
584
584
|
} catch (r) {
|
|
@@ -616,7 +616,7 @@ class m {
|
|
|
616
616
|
}
|
|
617
617
|
filter = (e, s) => {
|
|
618
618
|
let n = s ?? this.get();
|
|
619
|
-
const r = new
|
|
619
|
+
const r = new $(() => {
|
|
620
620
|
try {
|
|
621
621
|
const o = this.get();
|
|
622
622
|
return n = e(o) ? o : n;
|
|
@@ -638,7 +638,7 @@ class m {
|
|
|
638
638
|
*/
|
|
639
639
|
filterMap = (e, s, n = (r, o) => r === o) => {
|
|
640
640
|
let r = s;
|
|
641
|
-
const o = new
|
|
641
|
+
const o = new $(() => {
|
|
642
642
|
try {
|
|
643
643
|
const i = this.get();
|
|
644
644
|
return r = e(i) ?? r;
|
|
@@ -741,8 +741,8 @@ class m {
|
|
|
741
741
|
}), e.onDispose(this.on(e.setDirty, { noAutoDispose: !0 })), this.onDispose(e.dispose);
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
|
-
const
|
|
745
|
-
class
|
|
744
|
+
const st = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
745
|
+
class $ extends m {
|
|
746
746
|
/**
|
|
747
747
|
* Creates a new Computed signal.
|
|
748
748
|
*
|
|
@@ -768,7 +768,7 @@ class N extends m {
|
|
|
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(), de()?.track(this);
|
|
772
772
|
}
|
|
773
773
|
/**
|
|
774
774
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -806,7 +806,7 @@ class N extends m {
|
|
|
806
806
|
*/
|
|
807
807
|
_scheduleNotify = () => {
|
|
808
808
|
const e = ++this._scheduleCount;
|
|
809
|
-
|
|
809
|
+
st(() => {
|
|
810
810
|
this._scheduleCount !== e || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
|
|
811
811
|
});
|
|
812
812
|
};
|
|
@@ -910,9 +910,9 @@ class ee extends m {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
const te = (t, e, s = (n, r) => n === r) => {
|
|
913
|
-
const n = new
|
|
913
|
+
const n = new $(t, s);
|
|
914
914
|
return e.forEach((r) => r.setDerivative(n)), n;
|
|
915
|
-
},
|
|
915
|
+
}, be = (t, e, s = {}) => {
|
|
916
916
|
let n = s.once ? () => {
|
|
917
917
|
o(), t();
|
|
918
918
|
} : t;
|
|
@@ -929,11 +929,11 @@ const te = (t, e, s = (n, r) => n === r) => {
|
|
|
929
929
|
return s.abortSignal != null && s.abortSignal.addEventListener("abort", o), o;
|
|
930
930
|
}, T = (t, e = (s, n) => s === n) => {
|
|
931
931
|
const s = new ee(t, e);
|
|
932
|
-
return
|
|
933
|
-
}, se = (t, e = (s, n) => s === n) => new m(t, e),
|
|
932
|
+
return de()?.track(s), s;
|
|
933
|
+
}, se = (t, e = (s, n) => s === n) => new m(t, e), pe = () => (
|
|
934
934
|
/* c8 ignore next */
|
|
935
935
|
typeof window < "u" ? window : void 0
|
|
936
|
-
),
|
|
936
|
+
), nt = (t, e, s) => t + (e - t) * s, me = 97, rt = (t, e, s) => {
|
|
937
937
|
const n = Math.max(t.length, e.length);
|
|
938
938
|
let r = "";
|
|
939
939
|
for (let o = 0; o < n; o++) {
|
|
@@ -943,7 +943,7 @@ const te = (t, e, s = (n, r) => n === r) => {
|
|
|
943
943
|
isNaN(l) && (l = me), r += String.fromCharCode(i + (l - i) * s);
|
|
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
947
|
class Se {
|
|
948
948
|
_store = /* @__PURE__ */ new Map();
|
|
949
949
|
/**
|
|
@@ -961,8 +961,8 @@ class Se {
|
|
|
961
961
|
this._store.set(e, s);
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
let
|
|
965
|
-
const
|
|
964
|
+
let ae = null, ue = null;
|
|
965
|
+
const ct = () => (ae || (ae = new Se()), ae), at = () => (ue || (ue = new Se()), ue), _e = ({
|
|
966
966
|
key: t,
|
|
967
967
|
defaultValue: e,
|
|
968
968
|
store: s,
|
|
@@ -977,36 +977,36 @@ const ot = () => (ce || (ce = new Se()), ce), it = () => (ae || (ae = new Se()),
|
|
|
977
977
|
const u = s.getItem(a), h = new ee(
|
|
978
978
|
u != null ? i(r(u)) : typeof e == "function" ? e() : e,
|
|
979
979
|
o
|
|
980
|
-
), f =
|
|
981
|
-
let y = !1,
|
|
982
|
-
const
|
|
980
|
+
), f = pe(), p = l && typeof f?.BroadcastChannel == "function";
|
|
981
|
+
let y = !1, v = null, P = null;
|
|
982
|
+
const b = (S) => {
|
|
983
983
|
if (!p) return null;
|
|
984
|
-
const M = `tempo:storedProp:${S}`,
|
|
984
|
+
const M = `tempo:storedProp:${S}`, C = new f.BroadcastChannel(M), I = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, L = (W) => {
|
|
985
985
|
const A = W.data;
|
|
986
986
|
if (!(A == null || typeof A != "object" || A.key !== S || typeof A.value != "string" || A.sourceId != null && A.sourceId === I))
|
|
987
987
|
try {
|
|
988
988
|
y = !0;
|
|
989
|
-
const
|
|
990
|
-
h.set(
|
|
991
|
-
} catch (
|
|
989
|
+
const le = i(r(A.value));
|
|
990
|
+
h.set(le);
|
|
991
|
+
} catch (le) {
|
|
992
992
|
console.warn(
|
|
993
993
|
`Failed to sync storedProp for key "${S}" via BroadcastChannel`,
|
|
994
|
-
|
|
994
|
+
le
|
|
995
995
|
);
|
|
996
996
|
} finally {
|
|
997
997
|
y = !1;
|
|
998
998
|
}
|
|
999
999
|
};
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1002
|
-
}), { channel:
|
|
1003
|
-
}, x =
|
|
1004
|
-
x && (
|
|
1000
|
+
return C.addEventListener("message", L), h.onDispose(() => {
|
|
1001
|
+
C?.removeEventListener("message", L), C?.close();
|
|
1002
|
+
}), { channel: C, instanceId: I, handleMessage: L };
|
|
1003
|
+
}, x = b(a);
|
|
1004
|
+
x && (v = x.channel, P = x.instanceId);
|
|
1005
1005
|
const F = (S) => {
|
|
1006
1006
|
const M = a;
|
|
1007
1007
|
if (M === S) return;
|
|
1008
|
-
const
|
|
1009
|
-
if (s.setItem(M, I),
|
|
1008
|
+
const C = h.get(), I = n(C);
|
|
1009
|
+
if (s.setItem(M, I), v != null && (v.close(), v = null, P = null), a = S, c === "load") {
|
|
1010
1010
|
const W = s.getItem(S);
|
|
1011
1011
|
if (W != null)
|
|
1012
1012
|
try {
|
|
@@ -1021,25 +1021,25 @@ const ot = () => (ce || (ce = new Se()), ce), it = () => (ae || (ae = new Se()),
|
|
|
1021
1021
|
else
|
|
1022
1022
|
s.setItem(S, I);
|
|
1023
1023
|
} else c === "migrate" && s.setItem(S, I);
|
|
1024
|
-
const L =
|
|
1025
|
-
L && (
|
|
1024
|
+
const L = b(S);
|
|
1025
|
+
L && (v = L.channel, P = L.instanceId);
|
|
1026
1026
|
};
|
|
1027
1027
|
return m.is(t) && h.onDispose(t.on(F)), h.on((S, M) => {
|
|
1028
|
-
const
|
|
1029
|
-
s.setItem(a,
|
|
1028
|
+
const C = n(S);
|
|
1029
|
+
s.setItem(a, C), v != null && !y && M !== void 0 && P != null && v.postMessage({
|
|
1030
1030
|
key: a,
|
|
1031
|
-
value:
|
|
1031
|
+
value: C,
|
|
1032
1032
|
sourceId: P
|
|
1033
1033
|
});
|
|
1034
1034
|
}), h;
|
|
1035
|
-
},
|
|
1036
|
-
const e =
|
|
1035
|
+
}, os = (t) => {
|
|
1036
|
+
const e = pe()?.localStorage, s = e && typeof e.getItem == "function" ? e : ct();
|
|
1037
1037
|
return _e({
|
|
1038
1038
|
...t,
|
|
1039
1039
|
store: s
|
|
1040
1040
|
});
|
|
1041
|
-
},
|
|
1042
|
-
const e =
|
|
1041
|
+
}, is = (t) => {
|
|
1042
|
+
const e = pe()?.sessionStorage, s = e && typeof e.getItem == "function" ? e : at();
|
|
1043
1043
|
return _e({
|
|
1044
1044
|
...t,
|
|
1045
1045
|
store: s
|
|
@@ -1048,34 +1048,34 @@ const ot = () => (ce || (ce = new Se()), ce), it = () => (ae || (ae = new Se()),
|
|
|
1048
1048
|
function ye(t) {
|
|
1049
1049
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
1050
1050
|
}
|
|
1051
|
-
const
|
|
1052
|
-
const r = n?.duration ?? 300, o = n?.easing ?? ((
|
|
1051
|
+
const ut = (t, e, s, n) => {
|
|
1052
|
+
const r = n?.duration ?? 300, o = n?.easing ?? ((b) => b), i = n?.equals ?? ((b, x) => b === x);
|
|
1053
1053
|
let l = n?.interpolate, c = t, a = e(), u = performance.now(), h = null, f = !0;
|
|
1054
|
-
const p = new
|
|
1054
|
+
const p = new $(e, i), y = T(t, i);
|
|
1055
1055
|
y.onDispose(() => {
|
|
1056
1056
|
h !== null && cancelAnimationFrame(h);
|
|
1057
|
-
}), y.onDispose(p.dispose), s.forEach((
|
|
1058
|
-
|
|
1057
|
+
}), y.onDispose(p.dispose), s.forEach((b) => {
|
|
1058
|
+
b.setDerivative(p), b.onDispose(y.dispose);
|
|
1059
1059
|
});
|
|
1060
|
-
const
|
|
1061
|
-
a =
|
|
1060
|
+
const v = (b) => {
|
|
1061
|
+
a = b, u = performance.now(), c = y.value, f && (f = !1, h = ye(P));
|
|
1062
1062
|
}, P = () => {
|
|
1063
|
-
const
|
|
1064
|
-
l == null && (l =
|
|
1063
|
+
const b = (performance.now() - u) / w.get(r), x = o(b);
|
|
1064
|
+
l == null && (l = lt(c));
|
|
1065
1065
|
let F = l(c, a, x);
|
|
1066
|
-
|
|
1066
|
+
b >= 1 ? (f = !0, F = a) : h = ye(P), y.set(F);
|
|
1067
1067
|
};
|
|
1068
|
-
return p.on(
|
|
1069
|
-
},
|
|
1068
|
+
return p.on(v), y;
|
|
1069
|
+
}, ls = (t, e) => {
|
|
1070
1070
|
const { initialValue: s, ...n } = e ?? {};
|
|
1071
|
-
return
|
|
1071
|
+
return ut(
|
|
1072
1072
|
/* c8 ignore next 2 */
|
|
1073
1073
|
s ?? t.get(),
|
|
1074
1074
|
t.get,
|
|
1075
1075
|
[t],
|
|
1076
1076
|
n
|
|
1077
1077
|
);
|
|
1078
|
-
},
|
|
1078
|
+
}, ht = (t, e) => {
|
|
1079
1079
|
const s = Object.values(t).filter(m.is), n = Object.keys(t);
|
|
1080
1080
|
return te(() => {
|
|
1081
1081
|
const r = {};
|
|
@@ -1083,7 +1083,7 @@ const lt = (t, e, s, n) => {
|
|
|
1083
1083
|
r[o] = w.get(t[o]);
|
|
1084
1084
|
return e(r);
|
|
1085
1085
|
}, s);
|
|
1086
|
-
},
|
|
1086
|
+
}, cs = (t) => ht(t, (e) => e), as = (t, e) => {
|
|
1087
1087
|
const s = T(t.get());
|
|
1088
1088
|
let n = null;
|
|
1089
1089
|
const r = t.on(
|
|
@@ -1100,28 +1100,28 @@ const lt = (t, e, s, n) => {
|
|
|
1100
1100
|
return s.onDispose(() => {
|
|
1101
1101
|
r(), n != null && clearTimeout(n);
|
|
1102
1102
|
}), s;
|
|
1103
|
-
},
|
|
1103
|
+
}, us = (t) => {
|
|
1104
1104
|
let e;
|
|
1105
1105
|
return t.map((s) => {
|
|
1106
1106
|
const n = e;
|
|
1107
1107
|
return e = s, n;
|
|
1108
1108
|
});
|
|
1109
|
-
},
|
|
1109
|
+
}, hs = ({
|
|
1110
1110
|
size: t = void 0,
|
|
1111
1111
|
signal: e
|
|
1112
1112
|
}) => {
|
|
1113
1113
|
const s = [];
|
|
1114
1114
|
return e.map((n) => (s.push(n), t != null && s.length > t && s.shift(), s.slice()));
|
|
1115
|
-
},
|
|
1115
|
+
}, ds = (t) => (...e) => Z(
|
|
1116
1116
|
t,
|
|
1117
1117
|
...e
|
|
1118
1118
|
)((s, ...n) => s(...n));
|
|
1119
|
-
function
|
|
1119
|
+
function ps(...t) {
|
|
1120
1120
|
return Z(...t)((...e) => {
|
|
1121
1121
|
for (const s of e) if (s != null) return s;
|
|
1122
1122
|
});
|
|
1123
1123
|
}
|
|
1124
|
-
class
|
|
1124
|
+
class he {
|
|
1125
1125
|
/**
|
|
1126
1126
|
* Creates a new instance of `ElementPosition`.
|
|
1127
1127
|
* @param index - The index of the element.
|
|
@@ -1182,7 +1182,7 @@ const Ae = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), Te = /* @
|
|
|
1182
1182
|
"outerHTML",
|
|
1183
1183
|
"className",
|
|
1184
1184
|
"classList"
|
|
1185
|
-
]),
|
|
1185
|
+
]), dt = (t, e) => Te.has(t) ? (s) => {
|
|
1186
1186
|
s == null || s !== !0 ? e.removeAttribute(t) : e.setAttribute(t, "");
|
|
1187
1187
|
} : Ae.has(t) ? (s) => {
|
|
1188
1188
|
s == null ? e[t] = null : e[t] = !!s;
|
|
@@ -1194,11 +1194,11 @@ const Ae = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), Te = /* @
|
|
|
1194
1194
|
s == null ? e[t] = null : e[t] = String(s);
|
|
1195
1195
|
} : (s) => {
|
|
1196
1196
|
s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
|
|
1197
|
-
},
|
|
1197
|
+
}, pt = (t, e) => Te.has(t) ? () => e.hasAttribute(t) : Ae.has(t) ? () => !!e[t] : Ee.has(t) ? () => Number(e[t]) : Ce.has(t) ? () => e[t] : De.has(t) ? () => String(e[t]) : () => e.getAttribute(t), J = (t) => {
|
|
1198
1198
|
const e = t;
|
|
1199
|
-
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.
|
|
1200
|
-
},
|
|
1201
|
-
class
|
|
1199
|
+
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentNode && t.parentNode.removeChild(t);
|
|
1200
|
+
}, ft = (t) => Pe(t) || xe(t) ? t : t.parentElement, Pe = (t) => t.nodeType === 1, xe = (t) => t.nodeType === 11;
|
|
1201
|
+
class Le extends Error {
|
|
1202
1202
|
constructor(e) {
|
|
1203
1203
|
super(`Provider not found: ${e.description}`);
|
|
1204
1204
|
}
|
|
@@ -1388,7 +1388,7 @@ class R {
|
|
|
1388
1388
|
*/
|
|
1389
1389
|
getProvider = (e) => {
|
|
1390
1390
|
if (this.providers[e] === void 0)
|
|
1391
|
-
throw new
|
|
1391
|
+
throw new Le(e);
|
|
1392
1392
|
const [s, n] = this.providers[e];
|
|
1393
1393
|
return { value: s, onUse: n };
|
|
1394
1394
|
};
|
|
@@ -1463,26 +1463,26 @@ class R {
|
|
|
1463
1463
|
*/
|
|
1464
1464
|
getStyle = (e) => this.element.style[e];
|
|
1465
1465
|
makeAccessors = (e) => ({
|
|
1466
|
-
get:
|
|
1467
|
-
set:
|
|
1466
|
+
get: pt(e, this.element),
|
|
1467
|
+
set: dt(e, this.element)
|
|
1468
1468
|
});
|
|
1469
1469
|
getWindow = () => this.document.defaultView;
|
|
1470
1470
|
}
|
|
1471
|
-
const
|
|
1471
|
+
const ne = (t, e) => {
|
|
1472
1472
|
const s = new q(), n = O(s, () => t.render(e));
|
|
1473
1473
|
return (r = !0) => {
|
|
1474
1474
|
s.dispose(), n(r);
|
|
1475
1475
|
};
|
|
1476
|
-
},
|
|
1476
|
+
}, fs = (t, e, { doc: s, clear: n, disposeWithParent: r = !0, providers: o = {} } = {}) => {
|
|
1477
1477
|
const i = typeof e == "string" ? (s ?? document).querySelector(e) : e;
|
|
1478
1478
|
if (i === null)
|
|
1479
|
-
throw new
|
|
1479
|
+
throw new gt(
|
|
1480
1480
|
`Cannot find element by selector for render: ${e}`
|
|
1481
1481
|
);
|
|
1482
|
-
n !== !1 && (s ?? i.ownerDocument) != null && i.nodeType === 1 && (i.innerHTML = "");
|
|
1483
|
-
const l =
|
|
1482
|
+
n !== !1 && (s ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
|
|
1483
|
+
const l = ft(i), c = Pe(i) || xe(i) ? void 0 : i, a = R.of(l, c, o), u = ne(t, a);
|
|
1484
1484
|
let h;
|
|
1485
|
-
return r && (h = new MutationObserver((f) => {
|
|
1485
|
+
return r && i.parentElement != null && (h = new MutationObserver((f) => {
|
|
1486
1486
|
f[0]?.removedNodes.forEach((p) => {
|
|
1487
1487
|
p === i && (h?.disconnect(), u(i.nodeType !== 1));
|
|
1488
1488
|
});
|
|
@@ -1493,27 +1493,27 @@ const pe = (t, e) => {
|
|
|
1493
1493
|
})), () => {
|
|
1494
1494
|
h?.disconnect(), u(!0);
|
|
1495
1495
|
};
|
|
1496
|
-
},
|
|
1496
|
+
}, gs = (t, {
|
|
1497
1497
|
startUrl: e = "https://example.com",
|
|
1498
1498
|
selector: s,
|
|
1499
1499
|
providers: n = {}
|
|
1500
1500
|
} = {
|
|
1501
1501
|
selector: "body"
|
|
1502
1502
|
}) => {
|
|
1503
|
-
const r = w.toSignal(e).deriveProp(), o = new
|
|
1503
|
+
const r = w.toSignal(e).deriveProp(), o = new He(s, void 0), i = new j(o, void 0, { currentURL: r }, n);
|
|
1504
1504
|
return {
|
|
1505
|
-
clear:
|
|
1505
|
+
clear: ne(t(), i),
|
|
1506
1506
|
root: o,
|
|
1507
1507
|
currentURL: r
|
|
1508
1508
|
};
|
|
1509
1509
|
};
|
|
1510
|
-
class
|
|
1510
|
+
class gt extends Error {
|
|
1511
1511
|
constructor(e) {
|
|
1512
1512
|
super(e);
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
const
|
|
1516
|
-
class
|
|
1515
|
+
const Oe = "data-tts-node", K = "data-tts-class", z = "data-tts-style", Y = "data-tts-html", X = "data-tts-text", Q = "data-tts-attrs";
|
|
1516
|
+
class ms {
|
|
1517
1517
|
/**
|
|
1518
1518
|
* Selects elements from the headless environment.
|
|
1519
1519
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -1672,56 +1672,56 @@ class gs {
|
|
|
1672
1672
|
});
|
|
1673
1673
|
};
|
|
1674
1674
|
}
|
|
1675
|
-
const
|
|
1676
|
-
document.querySelectorAll(`[${
|
|
1677
|
-
},
|
|
1675
|
+
const mt = () => {
|
|
1676
|
+
document.querySelectorAll(`[${Oe}]`).forEach(J);
|
|
1677
|
+
}, yt = (t) => {
|
|
1678
1678
|
const e = t.getAttribute(K);
|
|
1679
1679
|
t.removeAttribute(K), e != null && t.setAttribute("class", e);
|
|
1680
|
-
},
|
|
1681
|
-
document.querySelectorAll(`[${K}]`).forEach((e) =>
|
|
1682
|
-
},
|
|
1680
|
+
}, wt = () => {
|
|
1681
|
+
document.querySelectorAll(`[${K}]`).forEach((e) => yt(e));
|
|
1682
|
+
}, vt = (t) => {
|
|
1683
1683
|
const e = t.getAttribute(Y);
|
|
1684
1684
|
t.removeAttribute(Y), e != null && (t.innerHTML = e);
|
|
1685
|
-
},
|
|
1686
|
-
document.querySelectorAll(`[${Y}]`).forEach((e) =>
|
|
1687
|
-
},
|
|
1685
|
+
}, bt = () => {
|
|
1686
|
+
document.querySelectorAll(`[${Y}]`).forEach((e) => vt(e));
|
|
1687
|
+
}, St = (t) => {
|
|
1688
1688
|
const e = t.getAttribute(X);
|
|
1689
1689
|
t.removeAttribute(X), e != null && (t.innerText = e);
|
|
1690
|
-
},
|
|
1691
|
-
document.querySelectorAll(`[${X}]`).forEach((e) =>
|
|
1692
|
-
},
|
|
1690
|
+
}, _t = () => {
|
|
1691
|
+
document.querySelectorAll(`[${X}]`).forEach((e) => St(e));
|
|
1692
|
+
}, ke = (t) => JSON.parse(t.replace(/"/g, '"')), At = (t) => {
|
|
1693
1693
|
const e = t.getAttribute(z);
|
|
1694
1694
|
if (t.removeAttribute(z), e != null) {
|
|
1695
|
-
const s =
|
|
1695
|
+
const s = ke(e);
|
|
1696
1696
|
Object.entries(s).forEach(([n, r]) => {
|
|
1697
1697
|
t.style.setProperty(n, r);
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
|
-
},
|
|
1701
|
-
document.querySelectorAll(`[${z}]`).forEach((e) =>
|
|
1702
|
-
},
|
|
1700
|
+
}, Tt = () => {
|
|
1701
|
+
document.querySelectorAll(`[${z}]`).forEach((e) => At(e));
|
|
1702
|
+
}, Et = (t) => {
|
|
1703
1703
|
const e = t.getAttribute(Q);
|
|
1704
1704
|
if (t.removeAttribute(Q), e != null) {
|
|
1705
|
-
const s =
|
|
1705
|
+
const s = ke(e);
|
|
1706
1706
|
Object.entries(s).forEach(([n, r]) => {
|
|
1707
1707
|
r == null ? t.removeAttribute(n) : t.setAttribute(n, r);
|
|
1708
1708
|
});
|
|
1709
1709
|
}
|
|
1710
|
-
},
|
|
1711
|
-
document.querySelectorAll(`[${Q}]`).forEach((e) =>
|
|
1712
|
-
},
|
|
1713
|
-
|
|
1714
|
-
}, H = Symbol("class"),
|
|
1715
|
-
class
|
|
1710
|
+
}, Ct = () => {
|
|
1711
|
+
document.querySelectorAll(`[${Q}]`).forEach((e) => Et(e));
|
|
1712
|
+
}, ys = () => {
|
|
1713
|
+
mt(), wt(), _t(), bt(), Tt(), Ct();
|
|
1714
|
+
}, H = Symbol("class"), N = Symbol("style"), U = Symbol("handler"), Me = () => Math.random().toString(36).substring(2, 15), Dt = (t) => t.replace(/<[^>]*>?/g, "");
|
|
1715
|
+
class Ie {
|
|
1716
1716
|
constructor(e) {
|
|
1717
1717
|
this.parent = e;
|
|
1718
1718
|
}
|
|
1719
|
-
id =
|
|
1719
|
+
id = Me();
|
|
1720
1720
|
properties = {};
|
|
1721
1721
|
children = [];
|
|
1722
1722
|
isElement = () => !0;
|
|
1723
1723
|
isText = () => !1;
|
|
1724
|
-
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
1724
|
+
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? Dt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
|
|
1725
1725
|
removeChild = (e) => {
|
|
1726
1726
|
const s = this.children.indexOf(e);
|
|
1727
1727
|
s !== -1 && this.children.splice(s, 1);
|
|
@@ -1743,7 +1743,7 @@ class Me {
|
|
|
1743
1743
|
hasInnerText = () => this.properties.innerText != null;
|
|
1744
1744
|
hasChildren = () => this.children.length > 0;
|
|
1745
1745
|
hasClasses = () => this.properties[H] != null;
|
|
1746
|
-
hasStyles = () => this.properties[
|
|
1746
|
+
hasStyles = () => this.properties[N] != null;
|
|
1747
1747
|
hasAttributes = () => Object.keys(this.properties).length > 0;
|
|
1748
1748
|
hasHandlers = () => this.properties[U] != null;
|
|
1749
1749
|
hasRenderableProperties = () => this.hasClasses() || this.hasAttributes() || this.hasStyles();
|
|
@@ -1795,14 +1795,14 @@ class Me {
|
|
|
1795
1795
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
1796
1796
|
);
|
|
1797
1797
|
getVisibleAttributes = () => Reflect.ownKeys(this.properties).flatMap(
|
|
1798
|
-
(e) => e === H ? [["class", this.getClasses()]] : e ===
|
|
1798
|
+
(e) => e === H ? [["class", this.getClasses()]] : e === N ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1799
1799
|
);
|
|
1800
1800
|
setStyle = (e, s) => {
|
|
1801
|
-
const n = this.properties[
|
|
1802
|
-
n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[
|
|
1801
|
+
const n = this.properties[N] ??= {};
|
|
1802
|
+
n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[N]);
|
|
1803
1803
|
};
|
|
1804
|
-
getStyle = (e) => this.properties[
|
|
1805
|
-
getStyles = () => this.properties[
|
|
1804
|
+
getStyle = (e) => this.properties[N]?.[e] ?? "";
|
|
1805
|
+
getStyles = () => this.properties[N] ?? {};
|
|
1806
1806
|
makeAccessors = (e) => {
|
|
1807
1807
|
const s = this.properties;
|
|
1808
1808
|
return {
|
|
@@ -1811,8 +1811,8 @@ class Me {
|
|
|
1811
1811
|
};
|
|
1812
1812
|
};
|
|
1813
1813
|
}
|
|
1814
|
-
const
|
|
1815
|
-
class
|
|
1814
|
+
const Pt = (t) => t.replace(/"/g, """), xt = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1815
|
+
class Lt extends Ie {
|
|
1816
1816
|
constructor(e, s, n) {
|
|
1817
1817
|
super(n), this.tagName = e, this.namespace = s;
|
|
1818
1818
|
}
|
|
@@ -1820,11 +1820,11 @@ class Dt extends Me {
|
|
|
1820
1820
|
toHTML = (e = !1) => {
|
|
1821
1821
|
const s = this.children.map((l) => l.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1822
1822
|
let r = null;
|
|
1823
|
-
const o = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` :
|
|
1824
|
-
return
|
|
1823
|
+
const o = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` : kt.has(l) ? ` ${l}` : l === "innerHTML" ? (r = c, "") : l === "innerText" ? (r = xt(c), "") : ` ${l}="${Pt(c)}"`).join(""), i = e ? ` ${Oe}` : "";
|
|
1824
|
+
return Mt.has(this.tagName) && s === "" ? `<${this.tagName}${n}${o}${i} />` : `<${this.tagName}${n}${o}${i}>${r ?? s}</${this.tagName}>`;
|
|
1825
1825
|
};
|
|
1826
1826
|
}
|
|
1827
|
-
class
|
|
1827
|
+
class He extends Ie {
|
|
1828
1828
|
constructor(e, s) {
|
|
1829
1829
|
super(s), this.selector = e;
|
|
1830
1830
|
}
|
|
@@ -1832,11 +1832,11 @@ class Ie extends Me {
|
|
|
1832
1832
|
toHTML = () => "";
|
|
1833
1833
|
contentToHTML = (e = !1) => this.children.map((s) => s.toHTML(e)).join("");
|
|
1834
1834
|
}
|
|
1835
|
-
class
|
|
1835
|
+
class Ot {
|
|
1836
1836
|
constructor(e) {
|
|
1837
1837
|
this.text = e;
|
|
1838
1838
|
}
|
|
1839
|
-
id =
|
|
1839
|
+
id = Me();
|
|
1840
1840
|
isElement = () => !1;
|
|
1841
1841
|
isText = () => !0;
|
|
1842
1842
|
getText = () => this.text;
|
|
@@ -1854,7 +1854,7 @@ class j {
|
|
|
1854
1854
|
this.element.children.push(e);
|
|
1855
1855
|
};
|
|
1856
1856
|
makeChildElement = (e, s) => {
|
|
1857
|
-
const n = new
|
|
1857
|
+
const n = new Lt(e, s, this.element);
|
|
1858
1858
|
return this.appendOrInsert(n), new j(
|
|
1859
1859
|
n,
|
|
1860
1860
|
void 0,
|
|
@@ -1863,7 +1863,7 @@ class j {
|
|
|
1863
1863
|
);
|
|
1864
1864
|
};
|
|
1865
1865
|
makeChildText = (e) => {
|
|
1866
|
-
const s = new
|
|
1866
|
+
const s = new Ot(e);
|
|
1867
1867
|
return this.appendOrInsert(s), new j(
|
|
1868
1868
|
this.element,
|
|
1869
1869
|
s,
|
|
@@ -1877,7 +1877,7 @@ class j {
|
|
|
1877
1877
|
getText = () => this.reference?.getText() ?? this.element.getText();
|
|
1878
1878
|
makeRef = () => this.makeChildText("");
|
|
1879
1879
|
makePortal = (e) => {
|
|
1880
|
-
const s = new
|
|
1880
|
+
const s = new He(e, this.element);
|
|
1881
1881
|
return this.appendOrInsert(s), new j(
|
|
1882
1882
|
s,
|
|
1883
1883
|
void 0,
|
|
@@ -1898,7 +1898,7 @@ class j {
|
|
|
1898
1898
|
});
|
|
1899
1899
|
getProvider = (e) => {
|
|
1900
1900
|
if (this.providers[e] === void 0)
|
|
1901
|
-
throw new
|
|
1901
|
+
throw new Le(e);
|
|
1902
1902
|
const [s, n] = this.providers[e];
|
|
1903
1903
|
return { value: s, onUse: n };
|
|
1904
1904
|
};
|
|
@@ -1917,30 +1917,30 @@ class j {
|
|
|
1917
1917
|
getStyle = (e) => this.element.getStyle(e);
|
|
1918
1918
|
makeAccessors = (e) => this.element.makeAccessors(e);
|
|
1919
1919
|
}
|
|
1920
|
-
const
|
|
1920
|
+
const kt = /* @__PURE__ */ new Set([
|
|
1921
1921
|
"checked",
|
|
1922
1922
|
"disabled",
|
|
1923
1923
|
"multiple",
|
|
1924
1924
|
"readonly",
|
|
1925
1925
|
"required",
|
|
1926
1926
|
"selected"
|
|
1927
|
-
]),
|
|
1927
|
+
]), Mt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), ws = () => (
|
|
1928
1928
|
/* c8 ignore next */
|
|
1929
1929
|
typeof window < "u" ? window : void 0
|
|
1930
|
-
),
|
|
1930
|
+
), It = Symbol("DOM_RENDERABLE"), g = (t) => ze(It, t), Ne = (t) => g((e) => e.makeChildText(t).clear), $e = (t) => g((e) => {
|
|
1931
1931
|
const s = e.makeChildText(t.value), n = t.on(s.setText);
|
|
1932
1932
|
return (r) => {
|
|
1933
1933
|
n(), s.clear(r);
|
|
1934
1934
|
};
|
|
1935
|
-
}),
|
|
1935
|
+
}), vs = (t) => m.is(t) ? $e(t) : Ne(t), E = (...t) => g((e) => {
|
|
1936
1936
|
const s = t.map((n) => d(n).render(e));
|
|
1937
1937
|
return (n) => {
|
|
1938
1938
|
s.forEach((r) => r(n));
|
|
1939
1939
|
};
|
|
1940
1940
|
}), D = g(() => () => {
|
|
1941
|
-
}),
|
|
1941
|
+
}), Ht = (t) => g((e) => (e.addClasses(t), (s) => {
|
|
1942
1942
|
s && e.removeClasses(t);
|
|
1943
|
-
})),
|
|
1943
|
+
})), Nt = (t) => g((e) => {
|
|
1944
1944
|
let s = [];
|
|
1945
1945
|
const n = t.on(
|
|
1946
1946
|
(r) => {
|
|
@@ -1951,17 +1951,17 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
1951
1951
|
return (r) => {
|
|
1952
1952
|
n(), r && e.removeClasses(s), s.length = 0;
|
|
1953
1953
|
};
|
|
1954
|
-
}),
|
|
1954
|
+
}), $t = (t, e) => g((s) => {
|
|
1955
1955
|
const { get: n, set: r } = s.makeAccessors(t), o = n();
|
|
1956
1956
|
return r(e), (i) => {
|
|
1957
1957
|
i && r(o);
|
|
1958
1958
|
};
|
|
1959
|
-
}),
|
|
1959
|
+
}), Rt = (t, e) => g((s) => {
|
|
1960
1960
|
const { get: n, set: r } = s.makeAccessors(t), o = n(), i = e.on(r, { noAutoDispose: !0 });
|
|
1961
1961
|
return (l) => {
|
|
1962
1962
|
i(), l && r(o);
|
|
1963
1963
|
};
|
|
1964
|
-
}), B = (t, e) => m.is(e) ?
|
|
1964
|
+
}), B = (t, e) => m.is(e) ? Rt(t, e) : $t(t, e), jt = (t, e) => t === "class" ? m.is(e) ? Nt(e) : Ht(
|
|
1965
1965
|
/* c8 ignore next */
|
|
1966
1966
|
(e ?? "").split(" ").filter((s) => s.length > 0)
|
|
1967
1967
|
) : B(t, e), V = new Proxy(
|
|
@@ -1978,9 +1978,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
1978
1978
|
* @returns The renderable component for the specified attribute.
|
|
1979
1979
|
*
|
|
1980
1980
|
*/
|
|
1981
|
-
get: (t, e) => (s) =>
|
|
1981
|
+
get: (t, e) => (s) => jt(e, s)
|
|
1982
1982
|
}
|
|
1983
|
-
),
|
|
1983
|
+
), Vt = (t, e) => B(`data-${t}`, e), bs = new Proxy(
|
|
1984
1984
|
{},
|
|
1985
1985
|
{
|
|
1986
1986
|
/**
|
|
@@ -1991,9 +1991,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
1991
1991
|
* @returns The renderable component for the specified attribute.
|
|
1992
1992
|
*
|
|
1993
1993
|
*/
|
|
1994
|
-
get: (t, e) => (s) =>
|
|
1994
|
+
get: (t, e) => (s) => Vt(e, s)
|
|
1995
1995
|
}
|
|
1996
|
-
),
|
|
1996
|
+
), qt = (t, e) => B(`aria-${t}`, e), Ss = new Proxy(
|
|
1997
1997
|
{},
|
|
1998
1998
|
{
|
|
1999
1999
|
/**
|
|
@@ -2004,9 +2004,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2004
2004
|
* @returns The renderable component for the specified attribute.
|
|
2005
2005
|
*
|
|
2006
2006
|
*/
|
|
2007
|
-
get: (t, e) => (s) =>
|
|
2007
|
+
get: (t, e) => (s) => qt(e, s)
|
|
2008
2008
|
}
|
|
2009
|
-
),
|
|
2009
|
+
), Bt = (t, e) => B(t, e), _s = new Proxy(
|
|
2010
2010
|
{},
|
|
2011
2011
|
{
|
|
2012
2012
|
/**
|
|
@@ -2017,9 +2017,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2017
2017
|
* @returns The renderable component for the specified attribute.
|
|
2018
2018
|
*
|
|
2019
2019
|
*/
|
|
2020
|
-
get: (t, e) => (s) =>
|
|
2020
|
+
get: (t, e) => (s) => Bt(e, s)
|
|
2021
2021
|
}
|
|
2022
|
-
),
|
|
2022
|
+
), Ft = (t, e) => B(t, e), As = new Proxy(
|
|
2023
2023
|
{},
|
|
2024
2024
|
{
|
|
2025
2025
|
/**
|
|
@@ -2029,31 +2029,31 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2029
2029
|
* @returns The renderable component for the specified attribute.
|
|
2030
2030
|
*
|
|
2031
2031
|
*/
|
|
2032
|
-
get: (t, e) => (s) =>
|
|
2032
|
+
get: (t, e) => (s) => Ft(e, s)
|
|
2033
2033
|
}
|
|
2034
2034
|
), d = (t) => {
|
|
2035
2035
|
if (t == null)
|
|
2036
2036
|
return D;
|
|
2037
2037
|
if (Array.isArray(t))
|
|
2038
|
-
return
|
|
2038
|
+
return E(...t.map(d));
|
|
2039
2039
|
if (typeof t == "string")
|
|
2040
|
-
return
|
|
2040
|
+
return Ne(t);
|
|
2041
2041
|
if (m.is(t))
|
|
2042
2042
|
return $e(t);
|
|
2043
2043
|
if (typeof t == "object" && "render" in t && "type" in t)
|
|
2044
2044
|
return t;
|
|
2045
2045
|
throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
|
|
2046
|
-
},
|
|
2046
|
+
}, Re = (t, ...e) => g((s) => {
|
|
2047
2047
|
const n = s.makeChildElement(t, void 0), r = e.map((o) => d(o).render(n));
|
|
2048
2048
|
return (o) => {
|
|
2049
2049
|
r.forEach((i) => i(!1)), n.clear(o);
|
|
2050
2050
|
};
|
|
2051
|
-
}),
|
|
2051
|
+
}), re = (t, e, ...s) => g((n) => {
|
|
2052
2052
|
const r = n.makeChildElement(t, e), o = s.map((i) => d(i).render(r));
|
|
2053
2053
|
return (i) => {
|
|
2054
2054
|
o.forEach((l) => l(!1)), r.clear(i);
|
|
2055
2055
|
};
|
|
2056
|
-
}),
|
|
2056
|
+
}), Ts = new Proxy(
|
|
2057
2057
|
{},
|
|
2058
2058
|
{
|
|
2059
2059
|
/**
|
|
@@ -2061,9 +2061,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2061
2061
|
* @param tagName - The HTML tag name.
|
|
2062
2062
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
2063
2063
|
*/
|
|
2064
|
-
get: (t, e) => (...s) =>
|
|
2064
|
+
get: (t, e) => (...s) => Re(e, s.flatMap(d))
|
|
2065
2065
|
}
|
|
2066
|
-
),
|
|
2066
|
+
), Es = new Proxy(
|
|
2067
2067
|
{},
|
|
2068
2068
|
{
|
|
2069
2069
|
/**
|
|
@@ -2071,9 +2071,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2071
2071
|
* @param type - The input type name.
|
|
2072
2072
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
2073
2073
|
*/
|
|
2074
|
-
get: (t, e) => (...s) =>
|
|
2074
|
+
get: (t, e) => (...s) => Re("input", V.type(e), ...s)
|
|
2075
2075
|
}
|
|
2076
|
-
),
|
|
2076
|
+
), je = "http://www.w3.org/2000/svg", Cs = (t, ...e) => re(t, je, ...e), Ds = new Proxy(
|
|
2077
2077
|
{},
|
|
2078
2078
|
{
|
|
2079
2079
|
/**
|
|
@@ -2081,9 +2081,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2081
2081
|
* @param tagName - The SVG tag name.
|
|
2082
2082
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
2083
2083
|
*/
|
|
2084
|
-
get: (t, e) => (...s) =>
|
|
2084
|
+
get: (t, e) => (...s) => re(e, je, s.flatMap(d))
|
|
2085
2085
|
}
|
|
2086
|
-
),
|
|
2086
|
+
), Ve = "http://www.w3.org/1998/Math/MathML", Ps = (t, ...e) => re(t, Ve, ...e), xs = new Proxy(
|
|
2087
2087
|
{},
|
|
2088
2088
|
{
|
|
2089
2089
|
/**
|
|
@@ -2091,11 +2091,11 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2091
2091
|
* @param tagName - The Math tag name.
|
|
2092
2092
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
2093
2093
|
*/
|
|
2094
|
-
get: (t, e) => (...s) =>
|
|
2094
|
+
get: (t, e) => (...s) => re(e, Ve, s.flatMap(d))
|
|
2095
2095
|
}
|
|
2096
|
-
),
|
|
2096
|
+
), qe = (t, e) => {
|
|
2097
2097
|
if (typeof e == "function")
|
|
2098
|
-
return
|
|
2098
|
+
return qe(t, { then: e });
|
|
2099
2099
|
const s = e.pending != null ? d(e.pending()) : D, n = e.then, r = e.error != null ? (o) => d(e.error(o)) : () => D;
|
|
2100
2100
|
return g((o) => {
|
|
2101
2101
|
let i = !0;
|
|
@@ -2112,14 +2112,14 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2112
2112
|
i = !1, a(u), c.clear(u);
|
|
2113
2113
|
};
|
|
2114
2114
|
});
|
|
2115
|
-
},
|
|
2115
|
+
}, Ls = (t, e) => qe(() => t, e), Be = (t, e, s) => g((n) => n.on(t, e, s)), Wt = (t) => Be("click", (e, s) => {
|
|
2116
2116
|
e.preventDefault();
|
|
2117
2117
|
const n = e.target;
|
|
2118
2118
|
setTimeout(() => {
|
|
2119
2119
|
const r = n.ownerDocument != null ? n?.checked : void 0;
|
|
2120
2120
|
r != null && t(!r, s);
|
|
2121
2121
|
}, 0);
|
|
2122
|
-
}),
|
|
2122
|
+
}), oe = new Proxy(
|
|
2123
2123
|
{},
|
|
2124
2124
|
{
|
|
2125
2125
|
/**
|
|
@@ -2127,20 +2127,20 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2127
2127
|
* @param fn - The function to call when the event is triggered.
|
|
2128
2128
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
2129
2129
|
*/
|
|
2130
|
-
get: (t, e) => (s) =>
|
|
2130
|
+
get: (t, e) => (s) => Be(e, s)
|
|
2131
2131
|
}
|
|
2132
|
-
),
|
|
2132
|
+
), Ut = (t, e) => (s) => {
|
|
2133
2133
|
e?.preventDefault === !0 && s.preventDefault(), e?.stopPropagation === !0 && s.stopPropagation(), e?.stopImmediatePropagation === !0 && s.stopImmediatePropagation(), t(s);
|
|
2134
|
-
}, k = (t, e) =>
|
|
2134
|
+
}, k = (t, e) => Ut((s) => {
|
|
2135
2135
|
const n = s.target;
|
|
2136
2136
|
t(n, s);
|
|
2137
|
-
}, e),
|
|
2137
|
+
}, e), Gt = (t, e) => k(
|
|
2138
2138
|
(s, n) => t(s.value, n),
|
|
2139
2139
|
e
|
|
2140
|
-
),
|
|
2140
|
+
), Jt = (t, e) => k(
|
|
2141
2141
|
(s, n) => t(s.valueAsNumber, n),
|
|
2142
2142
|
e
|
|
2143
|
-
),
|
|
2143
|
+
), Kt = (t, e) => k((s, n) => {
|
|
2144
2144
|
if (s.value === "")
|
|
2145
2145
|
return;
|
|
2146
2146
|
const r = s.value.split("-"), o = new Date(
|
|
@@ -2149,7 +2149,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2149
2149
|
Number(r[2].substring(0, 2))
|
|
2150
2150
|
);
|
|
2151
2151
|
t(o, n);
|
|
2152
|
-
}, e),
|
|
2152
|
+
}, e), Os = (t, e) => k((s, n) => {
|
|
2153
2153
|
if (s.value === "") {
|
|
2154
2154
|
t(null, n);
|
|
2155
2155
|
return;
|
|
@@ -2160,7 +2160,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2160
2160
|
Number(r[2].substring(0, 2))
|
|
2161
2161
|
);
|
|
2162
2162
|
t(o, n);
|
|
2163
|
-
}, e),
|
|
2163
|
+
}, e), zt = (t, e) => k((s, n) => {
|
|
2164
2164
|
if (s.value === "")
|
|
2165
2165
|
return;
|
|
2166
2166
|
const r = s.value.split("T"), o = r[0].split("-"), i = new Date(
|
|
@@ -2169,7 +2169,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2169
2169
|
Number(o[2])
|
|
2170
2170
|
), l = r[1].split(":");
|
|
2171
2171
|
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), t(i, n);
|
|
2172
|
-
}, e),
|
|
2172
|
+
}, e), ks = (t, e) => k((s, n) => {
|
|
2173
2173
|
if (s.value === "") {
|
|
2174
2174
|
t(null, n);
|
|
2175
2175
|
return;
|
|
@@ -2185,9 +2185,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2185
2185
|
Number(o[2])
|
|
2186
2186
|
), l = r[1].split(":");
|
|
2187
2187
|
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), t(i, n);
|
|
2188
|
-
}, e),
|
|
2188
|
+
}, e), Ms = (t, e) => k((s, n) => {
|
|
2189
2189
|
t(s.checked, n);
|
|
2190
|
-
}, e),
|
|
2190
|
+
}, e), Is = (t, e = "input") => E(V.valueAsDate(t), oe[e](Kt(t.set))), Hs = (t, e = "input") => E(V.valueAsDate(t), oe[e](zt(t.set))), Ns = (t, e = "input") => E(V.valueAsNumber(t), oe[e](Jt(t.set))), $s = (t, e = "input") => E(V.value(t), oe[e](Gt(t.set))), Rs = (t) => E(V.checked(t), Wt(t.set)), fe = (t, e, s) => m.is(t) ? e(t) : s(t), Yt = (t, e, s) => {
|
|
2191
2191
|
const n = t.makeRef();
|
|
2192
2192
|
let r = () => {
|
|
2193
2193
|
}, o = null;
|
|
@@ -2203,7 +2203,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2203
2203
|
return (l) => {
|
|
2204
2204
|
o?.dispose(), r(l), i(), n.clear(l);
|
|
2205
2205
|
};
|
|
2206
|
-
},
|
|
2206
|
+
}, ie = (t, e) => {
|
|
2207
2207
|
function s(r) {
|
|
2208
2208
|
return g((o) => {
|
|
2209
2209
|
const i = o.makeRef();
|
|
@@ -2227,21 +2227,21 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2227
2227
|
return d(e[o](se(r[o])));
|
|
2228
2228
|
}
|
|
2229
2229
|
return fe(t, s, n);
|
|
2230
|
-
},
|
|
2230
|
+
}, Fe = (t, e, s) => ie(
|
|
2231
2231
|
w.map(t, (n) => ({ [n[e]]: n })),
|
|
2232
2232
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2233
2233
|
s
|
|
2234
|
-
),
|
|
2234
|
+
), js = (t, e) => Fe(t, "kind", e), Vs = (t, e) => {
|
|
2235
2235
|
const s = w.map(t, ([n, r]) => ({
|
|
2236
2236
|
[n]: r
|
|
2237
2237
|
}));
|
|
2238
|
-
return
|
|
2239
|
-
},
|
|
2238
|
+
return ie(s, e);
|
|
2239
|
+
}, qs = (t, e) => Fe(t, "type", e), Xt = (t, e) => ie(
|
|
2240
2240
|
w.map(t, (s) => ({ [s]: !0 })),
|
|
2241
2241
|
e
|
|
2242
|
-
),
|
|
2242
|
+
), Bs = (t, e = {}) => (s) => {
|
|
2243
2243
|
const n = e?.firstSeparator ?? t, r = e?.lastSeparator ?? t;
|
|
2244
|
-
return
|
|
2244
|
+
return Xt(
|
|
2245
2245
|
s.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
2246
2246
|
{
|
|
2247
2247
|
first: n,
|
|
@@ -2249,9 +2249,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2249
2249
|
other: t
|
|
2250
2250
|
}
|
|
2251
2251
|
);
|
|
2252
|
-
},
|
|
2252
|
+
}, Fs = (t) => g((e) => (e.appendOrInsert(t), (s) => {
|
|
2253
2253
|
s && J(t);
|
|
2254
|
-
})),
|
|
2254
|
+
})), Ws = (t, e, s) => {
|
|
2255
2255
|
function n(o) {
|
|
2256
2256
|
return g((i) => {
|
|
2257
2257
|
const l = i.makeRef();
|
|
@@ -2279,7 +2279,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2279
2279
|
n,
|
|
2280
2280
|
r
|
|
2281
2281
|
);
|
|
2282
|
-
},
|
|
2282
|
+
}, Us = (...t) => (e, s) => g((n) => {
|
|
2283
2283
|
const r = n.makeRef();
|
|
2284
2284
|
if (t.some(
|
|
2285
2285
|
(p) => !m.is(p) && p == null
|
|
@@ -2292,8 +2292,8 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2292
2292
|
const a = T(l.every((p) => p)), u = (p, y) => {
|
|
2293
2293
|
if (p.value != null) {
|
|
2294
2294
|
if (i[y] == null) {
|
|
2295
|
-
const
|
|
2296
|
-
i[y] =
|
|
2295
|
+
const v = T(p.value);
|
|
2296
|
+
i[y] = v;
|
|
2297
2297
|
} else
|
|
2298
2298
|
i[y].value = p.value;
|
|
2299
2299
|
l[y] = !0;
|
|
@@ -2303,12 +2303,12 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2303
2303
|
let h = t.length - 1;
|
|
2304
2304
|
const f = t.map((p, y) => {
|
|
2305
2305
|
if (!m.is(p)) {
|
|
2306
|
-
const
|
|
2307
|
-
return i[y] =
|
|
2306
|
+
const v = T(p);
|
|
2307
|
+
return i[y] = v, () => {
|
|
2308
2308
|
};
|
|
2309
2309
|
}
|
|
2310
2310
|
return p.on(() => {
|
|
2311
|
-
u(p, y), h === 0 ? a.value = l.every((
|
|
2311
|
+
u(p, y), h === 0 ? a.value = l.every((v) => v) : h--;
|
|
2312
2312
|
});
|
|
2313
2313
|
});
|
|
2314
2314
|
return a.on((p) => {
|
|
@@ -2316,10 +2316,10 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2316
2316
|
}), (p) => {
|
|
2317
2317
|
i.forEach((y) => y?.dispose()), a.dispose(), f.forEach((y) => y()), c?.(p), r.clear(p);
|
|
2318
2318
|
};
|
|
2319
|
-
}),
|
|
2319
|
+
}), We = (t, e, s) => fe(
|
|
2320
2320
|
t,
|
|
2321
2321
|
(n) => g(
|
|
2322
|
-
(r) =>
|
|
2322
|
+
(r) => Yt(
|
|
2323
2323
|
r,
|
|
2324
2324
|
n,
|
|
2325
2325
|
(o) => o ? e() : s?.()
|
|
@@ -2332,20 +2332,20 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2332
2332
|
}
|
|
2333
2333
|
return d(s?.());
|
|
2334
2334
|
}
|
|
2335
|
-
),
|
|
2335
|
+
), Gs = (t, e, s) => We(
|
|
2336
2336
|
w.map(t, (n) => !n),
|
|
2337
2337
|
e,
|
|
2338
2338
|
s
|
|
2339
|
-
),
|
|
2339
|
+
), Ue = (t, e, s) => {
|
|
2340
2340
|
if (s != null)
|
|
2341
|
-
return
|
|
2342
|
-
const r = new
|
|
2341
|
+
return Ue(t, (n) => {
|
|
2342
|
+
const r = new he(
|
|
2343
2343
|
n.index,
|
|
2344
2344
|
n.total.map((o) => o - 1)
|
|
2345
2345
|
);
|
|
2346
|
-
return
|
|
2346
|
+
return E(
|
|
2347
2347
|
d(e(n)),
|
|
2348
|
-
|
|
2348
|
+
We(
|
|
2349
2349
|
n.isLast,
|
|
2350
2350
|
() => D,
|
|
2351
2351
|
() => s(r)
|
|
@@ -2362,7 +2362,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2362
2362
|
for (const h of a)
|
|
2363
2363
|
h(!0);
|
|
2364
2364
|
for (let h = i.length; h < c; h++) {
|
|
2365
|
-
const f = new
|
|
2365
|
+
const f = new he(h, r), p = new q();
|
|
2366
2366
|
l.push(p), i.push(
|
|
2367
2367
|
O(
|
|
2368
2368
|
p,
|
|
@@ -2381,16 +2381,16 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2381
2381
|
});
|
|
2382
2382
|
{
|
|
2383
2383
|
const n = se(t);
|
|
2384
|
-
return
|
|
2384
|
+
return E(
|
|
2385
2385
|
...Array.from({ length: t }, (r, o) => o).map((r) => {
|
|
2386
|
-
const o = new
|
|
2386
|
+
const o = new he(r, n);
|
|
2387
2387
|
return d(e(o));
|
|
2388
2388
|
})
|
|
2389
2389
|
);
|
|
2390
2390
|
}
|
|
2391
|
-
},
|
|
2391
|
+
}, Js = (t, e, s) => {
|
|
2392
2392
|
const n = w.map(t, (o) => o.length), r = w.toSignal(t);
|
|
2393
|
-
return
|
|
2393
|
+
return Ue(
|
|
2394
2394
|
n,
|
|
2395
2395
|
(o) => {
|
|
2396
2396
|
const i = r.map((l) => l[o.index]);
|
|
@@ -2398,11 +2398,11 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2398
2398
|
},
|
|
2399
2399
|
s
|
|
2400
2400
|
);
|
|
2401
|
-
},
|
|
2401
|
+
}, Ge = (...t) => g(
|
|
2402
2402
|
(e) => (s) => t.forEach((n) => {
|
|
2403
2403
|
typeof n == "function" ? n(s, e) : n.dispose(s, e);
|
|
2404
2404
|
})
|
|
2405
|
-
),
|
|
2405
|
+
), Ks = (t, e) => {
|
|
2406
2406
|
if (m.is(t)) {
|
|
2407
2407
|
const s = t;
|
|
2408
2408
|
return g((n) => {
|
|
@@ -2419,7 +2419,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
2421
2421
|
return d(e(t));
|
|
2422
|
-
},
|
|
2422
|
+
}, zs = (t, e, s = () => D) => ie(
|
|
2423
2423
|
w.map(
|
|
2424
2424
|
t,
|
|
2425
2425
|
(n) => n.length > 0 ? { notEmpty: n } : { whenEmpty: null }
|
|
@@ -2428,11 +2428,11 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2428
2428
|
notEmpty: (n) => e(n),
|
|
2429
2429
|
whenEmpty: () => s()
|
|
2430
2430
|
}
|
|
2431
|
-
),
|
|
2432
|
-
const n = s.makePortal(t), r =
|
|
2431
|
+
), Ys = (t, e) => g((s) => {
|
|
2432
|
+
const n = s.makePortal(t), r = ne(d(e), n);
|
|
2433
2433
|
return () => r(!0);
|
|
2434
|
-
}), G = /* @__PURE__ */ new Map(),
|
|
2435
|
-
mark:
|
|
2434
|
+
}), G = /* @__PURE__ */ new Map(), Qt = (t) => ({
|
|
2435
|
+
mark: Ke(`Probe(${t.description})`),
|
|
2436
2436
|
create: ({ callback: e = () => {
|
|
2437
2437
|
}, timeout: s = 10 } = {}) => {
|
|
2438
2438
|
const n = (l) => {
|
|
@@ -2451,17 +2451,40 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2451
2451
|
onUse: () => o.counter++
|
|
2452
2452
|
};
|
|
2453
2453
|
}
|
|
2454
|
-
}),
|
|
2454
|
+
}), Xs = Qt(Symbol("GlobalProbe")), Je = (t) => g((e) => {
|
|
2455
|
+
if (e.isBrowser()) {
|
|
2456
|
+
const s = t(e);
|
|
2457
|
+
if (s != null)
|
|
2458
|
+
return d(s).render(e);
|
|
2459
|
+
}
|
|
2460
|
+
return () => {
|
|
2461
|
+
};
|
|
2462
|
+
});
|
|
2463
|
+
function Qs({
|
|
2464
|
+
mode: t,
|
|
2465
|
+
delegatesFocus: e,
|
|
2466
|
+
slotAssignment: s,
|
|
2467
|
+
clonable: n,
|
|
2468
|
+
serializable: r
|
|
2469
|
+
}, ...o) {
|
|
2470
|
+
return Je((i) => {
|
|
2471
|
+
const l = { mode: t };
|
|
2472
|
+
e !== void 0 && (l.delegatesFocus = e), s !== void 0 && (l.slotAssignment = s), n !== void 0 && (l.clonable = n), r !== void 0 && (l.serializable = r);
|
|
2473
|
+
const c = i.element.attachShadow(l), a = i.withElement(c), u = ne(E(...o), a);
|
|
2474
|
+
return Ge(() => u(!0));
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
const Zt = (t, e) => g((s) => {
|
|
2455
2478
|
const n = s.getStyle(t);
|
|
2456
2479
|
return s.setStyle(t, e), (r) => {
|
|
2457
2480
|
r && s.setStyle(t, n);
|
|
2458
2481
|
};
|
|
2459
|
-
}),
|
|
2482
|
+
}), es = (t, e) => g((s) => {
|
|
2460
2483
|
const n = s.getStyle(t), r = e.on((o) => s.setStyle(t, o));
|
|
2461
2484
|
return (o) => {
|
|
2462
2485
|
r(), o && s.setStyle(t, n);
|
|
2463
2486
|
};
|
|
2464
|
-
}), we = (t, e) => m.is(e) ?
|
|
2487
|
+
}), we = (t, e) => m.is(e) ? es(t, e) : Zt(t, e), Zs = new Proxy({}, {
|
|
2465
2488
|
/**
|
|
2466
2489
|
* Creates a renderable component for the specified `style` property.
|
|
2467
2490
|
*
|
|
@@ -2471,19 +2494,11 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2471
2494
|
*
|
|
2472
2495
|
*/
|
|
2473
2496
|
get: (t, e) => e === "variable" ? (s, n) => we(s, n) : (s) => we(e, s)
|
|
2474
|
-
}),
|
|
2475
|
-
if (e.isBrowser()) {
|
|
2476
|
-
const s = t(e);
|
|
2477
|
-
if (s != null)
|
|
2478
|
-
return d(s).render(e);
|
|
2479
|
-
}
|
|
2480
|
-
return () => {
|
|
2481
|
-
};
|
|
2482
|
-
}), Qs = (t) => g((e) => {
|
|
2497
|
+
}), en = (t) => g((e) => {
|
|
2483
2498
|
const s = t(e);
|
|
2484
2499
|
return s == null ? () => {
|
|
2485
2500
|
} : d(s).render(e);
|
|
2486
|
-
}),
|
|
2501
|
+
}), tn = (t) => Je((e) => t(e.element)), sn = (t) => g((e) => {
|
|
2487
2502
|
if (e.isHeadlessDOM()) {
|
|
2488
2503
|
const s = t(e);
|
|
2489
2504
|
if (s)
|
|
@@ -2491,7 +2506,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2491
2506
|
}
|
|
2492
2507
|
return () => {
|
|
2493
2508
|
};
|
|
2494
|
-
}),
|
|
2509
|
+
}), nn = (t) => g((e) => {
|
|
2495
2510
|
const s = new q(), n = O(
|
|
2496
2511
|
s,
|
|
2497
2512
|
() => d(t(s)).render(e)
|
|
@@ -2518,146 +2533,148 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2518
2533
|
}
|
|
2519
2534
|
});
|
|
2520
2535
|
return i == null ? () => {
|
|
2521
|
-
} :
|
|
2536
|
+
} : E(
|
|
2522
2537
|
d(i),
|
|
2523
|
-
|
|
2538
|
+
Ge(() => o.forEach((l) => l()))
|
|
2524
2539
|
).render(n());
|
|
2525
|
-
}),
|
|
2540
|
+
}), rn = (t, e, s) => ge(({ set: n }) => (n(t, e), s())), on = (t, e) => ge(({ use: s }) => e(s(t))), ln = (...t) => (e) => ge(({ use: s }) => {
|
|
2526
2541
|
const n = t.map(s);
|
|
2527
2542
|
return e(...n);
|
|
2528
2543
|
});
|
|
2529
2544
|
export {
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2545
|
+
qt as Aria,
|
|
2546
|
+
Ls as Async,
|
|
2547
|
+
jt as Attr,
|
|
2548
|
+
Rs as BindChecked,
|
|
2549
|
+
Is as BindDate,
|
|
2550
|
+
Hs as BindDateTime,
|
|
2551
|
+
Ns as BindNumber,
|
|
2537
2552
|
$s as BindText,
|
|
2538
2553
|
R as BrowserContext,
|
|
2539
2554
|
K as CLASS_PLACEHOLDER_ATTR,
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2555
|
+
$ as Computed,
|
|
2556
|
+
Bs as Conjunction,
|
|
2557
|
+
Fs as DOMNode,
|
|
2558
|
+
Vt as DataAttr,
|
|
2544
2559
|
q as DisposalScope,
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2560
|
+
Re as El,
|
|
2561
|
+
re as ElNS,
|
|
2562
|
+
he as ElementPosition,
|
|
2548
2563
|
D as Empty,
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2564
|
+
Ws as Ensure,
|
|
2565
|
+
Us as EnsureAll,
|
|
2566
|
+
Js as ForEach,
|
|
2567
|
+
E as Fragment,
|
|
2568
|
+
Xs as GlobalProbe,
|
|
2569
|
+
ms as HeadlessAdapter,
|
|
2555
2570
|
j as HeadlessContext,
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2571
|
+
Lt as HeadlessElement,
|
|
2572
|
+
He as HeadlessPortal,
|
|
2573
|
+
Ot as HeadlessText,
|
|
2574
|
+
Ks as MapSignal,
|
|
2575
|
+
Ft as MathAttr,
|
|
2576
|
+
Ps as MathEl,
|
|
2562
2577
|
Se as MemoryStore,
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2578
|
+
zs as NotEmpty,
|
|
2579
|
+
Wt as OnChecked,
|
|
2580
|
+
Ge as OnDispose,
|
|
2581
|
+
ie as OneOf,
|
|
2582
|
+
Fe as OneOfField,
|
|
2583
|
+
js as OneOfKind,
|
|
2584
|
+
Vs as OneOfTuple,
|
|
2585
|
+
qs as OneOfType,
|
|
2586
|
+
Xt as OneOfValue,
|
|
2587
|
+
Ys as Portal,
|
|
2573
2588
|
ee as Prop,
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2589
|
+
rn as Provide,
|
|
2590
|
+
Le as ProviderNotFoundError,
|
|
2591
|
+
gt as RenderingError,
|
|
2592
|
+
Ue as Repeat,
|
|
2593
|
+
Bt as SVGAttr,
|
|
2594
|
+
Cs as SVGEl,
|
|
2595
|
+
Qs as ShadowRoot,
|
|
2580
2596
|
m as Signal,
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2597
|
+
qe as Task,
|
|
2598
|
+
vs as TextNode,
|
|
2599
|
+
Gs as Unless,
|
|
2600
|
+
on as Use,
|
|
2601
|
+
ln as UseMany,
|
|
2586
2602
|
w as Value,
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2603
|
+
We as When,
|
|
2604
|
+
Je as WithBrowserCtx,
|
|
2605
|
+
en as WithCtx,
|
|
2606
|
+
tn as WithElement,
|
|
2607
|
+
sn as WithHeadlessCtx,
|
|
2592
2608
|
ge as WithProvider,
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2609
|
+
nn as WithScope,
|
|
2610
|
+
Oe as _NODE_PLACEHOLDER_ATTR,
|
|
2611
|
+
ft as _getSelfOrParentElement,
|
|
2596
2612
|
Pe as _isElement,
|
|
2597
|
-
|
|
2598
|
-
|
|
2613
|
+
xe as _isFragment,
|
|
2614
|
+
pt as _makeGetter,
|
|
2615
|
+
dt as _makeSetter,
|
|
2599
2616
|
J as _removeDOMNode,
|
|
2600
2617
|
$e as _signalText,
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2618
|
+
Ne as _staticText,
|
|
2619
|
+
ls as animateSignal,
|
|
2620
|
+
ut as animateSignals,
|
|
2621
|
+
Ss as aria,
|
|
2605
2622
|
V as attr,
|
|
2606
|
-
|
|
2607
|
-
|
|
2623
|
+
ds as bind,
|
|
2624
|
+
ps as coalesce,
|
|
2608
2625
|
te as computed,
|
|
2609
2626
|
Z as computedOf,
|
|
2610
|
-
|
|
2611
|
-
|
|
2627
|
+
ht as computedRecord,
|
|
2628
|
+
ze as createRenderable,
|
|
2612
2629
|
bs as dataAttr,
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2630
|
+
as as delaySignal,
|
|
2631
|
+
be as effect,
|
|
2632
|
+
Ze as effectOf,
|
|
2633
|
+
Ut as emit,
|
|
2634
|
+
Ms as emitChecked,
|
|
2618
2635
|
k as emitTarget,
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2636
|
+
Gt as emitValue,
|
|
2637
|
+
Kt as emitValueAsDate,
|
|
2638
|
+
zt as emitValueAsDateTime,
|
|
2639
|
+
Os as emitValueAsNullableDate,
|
|
2640
|
+
ks as emitValueAsNullableDateTime,
|
|
2641
|
+
Jt as emitValueAsNumber,
|
|
2642
|
+
it as endInterpolate,
|
|
2643
|
+
de as getCurrentScope,
|
|
2644
|
+
ns as getParentScope,
|
|
2645
|
+
ss as getScopeStack,
|
|
2646
|
+
ws as getWindow,
|
|
2647
|
+
lt as guessInterpolate,
|
|
2648
|
+
Ts as html,
|
|
2649
|
+
Es as input,
|
|
2650
|
+
ot as interpolateDate,
|
|
2651
|
+
nt as interpolateNumber,
|
|
2652
|
+
rt as interpolateString,
|
|
2653
|
+
ts as joinSignals,
|
|
2654
|
+
os as localStorageProp,
|
|
2655
|
+
Qt as makeProbe,
|
|
2656
|
+
Ke as makeProviderMark,
|
|
2657
|
+
xs as math,
|
|
2658
|
+
As as mathAttr,
|
|
2659
|
+
cs as merge,
|
|
2660
|
+
oe as on,
|
|
2661
|
+
tt as popScope,
|
|
2662
|
+
us as previousSignal,
|
|
2646
2663
|
T as prop,
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2664
|
+
et as pushScope,
|
|
2665
|
+
fs as render,
|
|
2666
|
+
ne as renderWithContext,
|
|
2650
2667
|
d as renderableOfTNode,
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2668
|
+
ys as restoreTempoPlaceholders,
|
|
2669
|
+
gs as runHeadless,
|
|
2670
|
+
rs as scoped,
|
|
2671
|
+
is as sessionStorageProp,
|
|
2655
2672
|
se as signal,
|
|
2656
|
-
|
|
2673
|
+
hs as slidingWindowSignal,
|
|
2657
2674
|
_e as storedProp,
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2675
|
+
Zs as style,
|
|
2676
|
+
Ds as svg,
|
|
2677
|
+
_s as svgAttr,
|
|
2678
|
+
ce as untracked,
|
|
2662
2679
|
O as withScope
|
|
2663
2680
|
};
|