@tempots/dom 35.1.0 → 36.0.1
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/errors.d.ts +1 -9
- package/index.cjs +1 -1
- package/index.d.ts +3 -0
- package/index.js +1326 -1240
- package/package.json +3 -2
- package/renderable/async.d.ts +2 -36
- package/renderable/conjunction.d.ts +2 -25
- package/renderable/element.d.ts +2 -8
- package/renderable/empty.d.ts +1 -7
- package/renderable/ensure.d.ts +2 -90
- package/renderable/foreach.d.ts +1 -63
- package/renderable/fragment.d.ts +1 -14
- package/renderable/map-signal.d.ts +1 -18
- package/renderable/not-empty.d.ts +1 -15
- package/renderable/on-dispose.d.ts +9 -9
- package/renderable/oneof.d.ts +2 -153
- package/renderable/provider.d.ts +7 -228
- package/renderable/repeat.d.ts +1 -70
- package/renderable/shared.d.ts +8 -0
- package/renderable/task.d.ts +2 -22
- package/renderable/utils.d.ts +1 -30
- package/renderable/when.d.ts +1 -20
- package/renderable/with-scope.d.ts +1 -39
- package/types/domain.d.ts +3 -12
package/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const st = (s) => Symbol(s);
|
|
2
|
+
function nt(s, e) {
|
|
3
3
|
return {
|
|
4
|
-
type:
|
|
4
|
+
type: s,
|
|
5
5
|
render: e
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function Ie(s) {
|
|
9
|
+
return s != null && s !== !1 && s !== 0 && s !== "";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return !
|
|
11
|
+
function rt(s) {
|
|
12
|
+
return !Ie(s);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function it(s) {
|
|
15
|
+
return s == null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function ot(s) {
|
|
18
|
+
return s != null;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const C = {
|
|
21
21
|
/**
|
|
22
22
|
* Maps a value or a Signal to a new value.
|
|
23
23
|
* If the value is a Signal, it returns a new Signal with the mapped value.
|
|
@@ -29,7 +29,7 @@ const w = {
|
|
|
29
29
|
* @param fn - The function to map the value.
|
|
30
30
|
* @returns The mapped value.
|
|
31
31
|
*/
|
|
32
|
-
map: (
|
|
32
|
+
map: (s, e) => _.is(s) ? s.map(e) : e(s),
|
|
33
33
|
/**
|
|
34
34
|
* Wraps a value or a Signal instance into a Signal.
|
|
35
35
|
* If the value is already a Signal, it returns the value itself.
|
|
@@ -40,30 +40,30 @@ const w = {
|
|
|
40
40
|
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
41
41
|
* @returns A Signal instance.
|
|
42
42
|
*/
|
|
43
|
-
toSignal: (
|
|
43
|
+
toSignal: (s, e) => _.is(s) ? s.derive() : ye(s, e),
|
|
44
44
|
/**
|
|
45
45
|
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
46
46
|
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
47
47
|
* @param value - The value to wrap or check.
|
|
48
48
|
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
49
49
|
*/
|
|
50
|
-
maybeToSignal: (
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
50
|
+
maybeToSignal: (s, e) => {
|
|
51
|
+
if (s != null)
|
|
52
|
+
return C.toSignal(s, e);
|
|
53
53
|
},
|
|
54
54
|
/**
|
|
55
55
|
* Gets the value from a `Signal` or the value itself if it is not a `Signal`.
|
|
56
56
|
* @param value - The value or Signal instance to get the value from.
|
|
57
57
|
* @returns The value.
|
|
58
58
|
*/
|
|
59
|
-
get: (
|
|
59
|
+
get: (s) => _.is(s) ? s.get() : s,
|
|
60
60
|
/**
|
|
61
61
|
* Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
|
|
62
62
|
* @param value - The value or Signal instance to add the listener to.
|
|
63
63
|
* @param listener - The listener to call when the value changes.
|
|
64
64
|
* @returns A function to remove the listener.
|
|
65
65
|
*/
|
|
66
|
-
on: (
|
|
66
|
+
on: (s, e) => _.is(s) ? s.on(e) : (e(s), () => {
|
|
67
67
|
}),
|
|
68
68
|
/**
|
|
69
69
|
* Disposes of a value or a Signal.
|
|
@@ -71,8 +71,8 @@ const w = {
|
|
|
71
71
|
* If the value is not a Signal, it does nothing.
|
|
72
72
|
* @param value - The value or Signal instance to dispose of.
|
|
73
73
|
*/
|
|
74
|
-
dispose: (
|
|
75
|
-
|
|
74
|
+
dispose: (s) => {
|
|
75
|
+
_.is(s) && s.dispose();
|
|
76
76
|
},
|
|
77
77
|
/**
|
|
78
78
|
* Returns a function that disposes of a value or a Signal.
|
|
@@ -81,7 +81,7 @@ const w = {
|
|
|
81
81
|
* @param value - The value or Signal instance to dispose of.
|
|
82
82
|
* @returns A function to dispose of the value or Signal.
|
|
83
83
|
*/
|
|
84
|
-
disposeFn: (
|
|
84
|
+
disposeFn: (s) => () => C.dispose(s),
|
|
85
85
|
/**
|
|
86
86
|
* Derives a Prop from a Signal.
|
|
87
87
|
* If the value is a Signal, it returns a new Prop with the derived value.
|
|
@@ -92,73 +92,73 @@ const w = {
|
|
|
92
92
|
* @param options.equals - A function that determines if two values are equal.
|
|
93
93
|
* @returns A Prop instance.
|
|
94
94
|
*/
|
|
95
|
-
deriveProp: (
|
|
95
|
+
deriveProp: (s, {
|
|
96
96
|
autoDisposeProp: e = !0,
|
|
97
|
-
equals:
|
|
98
|
-
} = {}) =>
|
|
97
|
+
equals: t
|
|
98
|
+
} = {}) => _.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : B(s, t),
|
|
99
99
|
/**
|
|
100
100
|
* Creates a new signal that emits `true` if the value is truthy, `false` otherwise.
|
|
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: (
|
|
104
|
+
truthy: (s) => C.map(s, Ie),
|
|
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: (
|
|
110
|
+
falsy: (s) => C.map(s, rt),
|
|
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: (
|
|
116
|
+
nil: (s) => C.map(s, it),
|
|
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: (
|
|
123
|
-
},
|
|
124
|
-
if (
|
|
125
|
-
return
|
|
126
|
-
const n =
|
|
127
|
-
return
|
|
128
|
-
() => e(...
|
|
122
|
+
defined: (s) => C.map(s, ot)
|
|
123
|
+
}, ne = (...s) => (e, t) => {
|
|
124
|
+
if (s.length === 1)
|
|
125
|
+
return C.toSignal(s[0]).map(e);
|
|
126
|
+
const n = s.filter((r) => _.is(r));
|
|
127
|
+
return be(
|
|
128
|
+
() => e(...s.map((r) => C.get(r))),
|
|
129
129
|
n,
|
|
130
|
-
|
|
130
|
+
t
|
|
131
131
|
);
|
|
132
|
-
},
|
|
133
|
-
([...
|
|
134
|
-
...
|
|
135
|
-
|
|
132
|
+
}, ls = (...s) => (e, t, n, r = (i, o) => i === o) => ne(...s)((...i) => i).mapAsync(
|
|
133
|
+
([...i], o) => e(
|
|
134
|
+
...i,
|
|
135
|
+
o
|
|
136
136
|
),
|
|
137
|
-
|
|
137
|
+
t,
|
|
138
138
|
n,
|
|
139
139
|
r
|
|
140
|
-
),
|
|
141
|
-
([...
|
|
142
|
-
...
|
|
143
|
-
|
|
140
|
+
), as = (...s) => (e, t, n, r = (i, o) => i === o) => ne(...s)((...i) => i).mapAsyncGenerator(
|
|
141
|
+
([...i], o) => e(
|
|
142
|
+
...i,
|
|
143
|
+
o
|
|
144
144
|
),
|
|
145
|
-
|
|
145
|
+
t,
|
|
146
146
|
n,
|
|
147
147
|
r
|
|
148
|
-
),
|
|
149
|
-
const e = Object.keys(
|
|
150
|
-
return
|
|
151
|
-
(...
|
|
148
|
+
), cs = (s) => {
|
|
149
|
+
const e = Object.keys(s);
|
|
150
|
+
return ne(...Object.values(s))(
|
|
151
|
+
(...t) => Object.fromEntries(e.map((n, r) => [n, t[r]]))
|
|
152
152
|
);
|
|
153
|
-
},
|
|
154
|
-
const n =
|
|
155
|
-
return
|
|
156
|
-
() => e(...
|
|
153
|
+
}, lt = (...s) => (e, t = {}) => {
|
|
154
|
+
const n = s.filter((r) => _.is(r));
|
|
155
|
+
return $e(
|
|
156
|
+
() => e(...s.map(C.get)),
|
|
157
157
|
n,
|
|
158
|
-
|
|
158
|
+
t
|
|
159
159
|
);
|
|
160
160
|
};
|
|
161
|
-
class
|
|
161
|
+
class ie {
|
|
162
162
|
_signals = /* @__PURE__ */ new Set();
|
|
163
163
|
_callbacks = [];
|
|
164
164
|
_disposed = !1;
|
|
@@ -203,8 +203,8 @@ class J {
|
|
|
203
203
|
for (const e of this._callbacks)
|
|
204
204
|
try {
|
|
205
205
|
e();
|
|
206
|
-
} catch (
|
|
207
|
-
const n =
|
|
206
|
+
} catch (t) {
|
|
207
|
+
const n = t instanceof Error ? t.message : String(t);
|
|
208
208
|
console.error("Error in disposal callback:", n);
|
|
209
209
|
}
|
|
210
210
|
this._callbacks.length = 0;
|
|
@@ -231,8 +231,8 @@ class J {
|
|
|
231
231
|
* @returns A tracked Prop signal
|
|
232
232
|
* @public
|
|
233
233
|
*/
|
|
234
|
-
prop(e,
|
|
235
|
-
const n =
|
|
234
|
+
prop(e, t) {
|
|
235
|
+
const n = Ae(() => B(e, t));
|
|
236
236
|
return this.track(n), n;
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
@@ -245,8 +245,8 @@ class J {
|
|
|
245
245
|
* @returns A tracked Computed signal
|
|
246
246
|
* @public
|
|
247
247
|
*/
|
|
248
|
-
computed(e,
|
|
249
|
-
const r =
|
|
248
|
+
computed(e, t, n) {
|
|
249
|
+
const r = Ae(() => be(e, t, n));
|
|
250
250
|
return this.track(r), r;
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
@@ -259,8 +259,8 @@ class J {
|
|
|
259
259
|
* @returns A clear function (the effect itself is tracked in the scope)
|
|
260
260
|
* @public
|
|
261
261
|
*/
|
|
262
|
-
effect(e,
|
|
263
|
-
return
|
|
262
|
+
effect(e, t, n) {
|
|
263
|
+
return z(this, () => $e(e, t, n));
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
* Creates a computed signal with curried signature and tracks it in this scope.
|
|
@@ -271,8 +271,8 @@ class J {
|
|
|
271
271
|
* @public
|
|
272
272
|
*/
|
|
273
273
|
computedOf(...e) {
|
|
274
|
-
return (
|
|
275
|
-
const r =
|
|
274
|
+
return (t, n) => {
|
|
275
|
+
const r = Ae(() => ne(...e)(t, n));
|
|
276
276
|
return this.track(r), r;
|
|
277
277
|
};
|
|
278
278
|
}
|
|
@@ -285,39 +285,39 @@ class J {
|
|
|
285
285
|
* @public
|
|
286
286
|
*/
|
|
287
287
|
effectOf(...e) {
|
|
288
|
-
return (
|
|
288
|
+
return (t, n) => z(this, () => lt(...e)(t, n));
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
if (
|
|
291
|
+
const j = [], at = (s) => {
|
|
292
|
+
j.push(s);
|
|
293
|
+
}, ct = () => {
|
|
294
|
+
if (j.length === 0)
|
|
295
295
|
throw new Error("Cannot pop from empty scope stack");
|
|
296
|
-
|
|
297
|
-
},
|
|
298
|
-
|
|
296
|
+
j.pop();
|
|
297
|
+
}, Oe = () => j[j.length - 1] ?? null, us = () => j, hs = () => j[j.length - 2] ?? null, z = (s, e) => {
|
|
298
|
+
at(s);
|
|
299
299
|
try {
|
|
300
300
|
return e();
|
|
301
301
|
} finally {
|
|
302
|
-
|
|
302
|
+
ct();
|
|
303
303
|
}
|
|
304
|
-
},
|
|
305
|
-
const e = new
|
|
304
|
+
}, ds = (s) => {
|
|
305
|
+
const e = new ie();
|
|
306
306
|
try {
|
|
307
|
-
return
|
|
307
|
+
return z(e, () => s(e));
|
|
308
308
|
} finally {
|
|
309
309
|
e.dispose();
|
|
310
310
|
}
|
|
311
|
-
},
|
|
312
|
-
const e =
|
|
313
|
-
|
|
311
|
+
}, Ae = (s) => {
|
|
312
|
+
const e = j.slice();
|
|
313
|
+
j.length = 0;
|
|
314
314
|
try {
|
|
315
|
-
return
|
|
315
|
+
return s();
|
|
316
316
|
} finally {
|
|
317
|
-
|
|
317
|
+
j.length = 0, j.push(...e);
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
class
|
|
320
|
+
class _ {
|
|
321
321
|
/**
|
|
322
322
|
* Represents a signal with a value of type T.
|
|
323
323
|
*
|
|
@@ -325,8 +325,8 @@ class y {
|
|
|
325
325
|
* @param equals - A function that determines whether two values of type T are equal.
|
|
326
326
|
* @public
|
|
327
327
|
*/
|
|
328
|
-
constructor(e,
|
|
329
|
-
this.equals =
|
|
328
|
+
constructor(e, t) {
|
|
329
|
+
this.equals = t, this._value = e;
|
|
330
330
|
}
|
|
331
331
|
/**
|
|
332
332
|
* Creates a Signal that holds the result of a Promise, with proper error handling.
|
|
@@ -369,14 +369,14 @@ class y {
|
|
|
369
369
|
* @param equals - Function to compare two values for equality (defaults to strict equality)
|
|
370
370
|
* @returns A Signal that represents the result of the Promise
|
|
371
371
|
*/
|
|
372
|
-
static ofPromise = (e,
|
|
373
|
-
const
|
|
374
|
-
return e.then((
|
|
375
|
-
n != null ?
|
|
372
|
+
static ofPromise = (e, t, n, r = (i, o) => i === o) => {
|
|
373
|
+
const i = new _(t, r);
|
|
374
|
+
return e.then((o) => i._setAndNotify(o)).catch((o) => {
|
|
375
|
+
n != null ? i._setAndNotify(n(o)) : console.error(
|
|
376
376
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
377
|
-
|
|
377
|
+
o
|
|
378
378
|
);
|
|
379
|
-
}),
|
|
379
|
+
}), i;
|
|
380
380
|
};
|
|
381
381
|
/**
|
|
382
382
|
* Checks if a value is a Signal.
|
|
@@ -453,17 +453,17 @@ class y {
|
|
|
453
453
|
* }
|
|
454
454
|
* ```
|
|
455
455
|
*/
|
|
456
|
-
on = (e,
|
|
457
|
-
|
|
458
|
-
const n =
|
|
459
|
-
r(), e(
|
|
456
|
+
on = (e, t = {}) => {
|
|
457
|
+
t.skipInitial || e(this.get(), void 0);
|
|
458
|
+
const n = t.once ? (i, o) => {
|
|
459
|
+
r(), e(i, o);
|
|
460
460
|
} : e;
|
|
461
461
|
this._onValueListeners.push(n);
|
|
462
462
|
const r = () => {
|
|
463
|
-
const
|
|
464
|
-
|
|
463
|
+
const i = this._onValueListeners.indexOf(n);
|
|
464
|
+
i !== -1 && this._onValueListeners.splice(i, 1), t.abortSignal != null && t.abortSignal.removeEventListener("abort", r);
|
|
465
465
|
};
|
|
466
|
-
return
|
|
466
|
+
return t.abortSignal != null && t.abortSignal.addEventListener("abort", r), !t.noAutoDispose && Oe()?.onDispose(r), r;
|
|
467
467
|
};
|
|
468
468
|
/**
|
|
469
469
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
@@ -473,20 +473,20 @@ class y {
|
|
|
473
473
|
* @param listener - The listener function to be called when the value of the signal changes.
|
|
474
474
|
* @param options - Options for the listener.
|
|
475
475
|
*/
|
|
476
|
-
onChange = (e,
|
|
476
|
+
onChange = (e, t = {}) => {
|
|
477
477
|
let n = 0;
|
|
478
|
-
const r = (
|
|
479
|
-
n++ > 0 && e(
|
|
478
|
+
const r = (i, o) => {
|
|
479
|
+
n++ > 0 && e(i, o);
|
|
480
480
|
};
|
|
481
|
-
return this.on(r,
|
|
481
|
+
return this.on(r, t);
|
|
482
482
|
};
|
|
483
483
|
/**
|
|
484
484
|
* @internal
|
|
485
485
|
*/
|
|
486
486
|
_setAndNotify = (e) => {
|
|
487
487
|
if (this._disposed) return;
|
|
488
|
-
const
|
|
489
|
-
this.equals(
|
|
488
|
+
const t = this._value;
|
|
489
|
+
this.equals(t, e) || (this._value = e, this._onValueListeners.forEach((n) => n(e, t)));
|
|
490
490
|
};
|
|
491
491
|
/**
|
|
492
492
|
* @internal
|
|
@@ -574,14 +574,14 @@ class y {
|
|
|
574
574
|
* @param equals - Optional function to determine if two transformed values are equal (defaults to strict equality)
|
|
575
575
|
* @returns A new computed signal with the transformed value (auto-registered with current scope)
|
|
576
576
|
*/
|
|
577
|
-
map = (e,
|
|
578
|
-
const n = new
|
|
577
|
+
map = (e, t = (n, r) => n === r) => {
|
|
578
|
+
const n = new ee(() => {
|
|
579
579
|
try {
|
|
580
580
|
return e(this.get());
|
|
581
581
|
} catch (r) {
|
|
582
582
|
throw console.error("Error in Signal.map:", r), r;
|
|
583
583
|
}
|
|
584
|
-
},
|
|
584
|
+
}, t);
|
|
585
585
|
return this.setDerivative(n), n;
|
|
586
586
|
};
|
|
587
587
|
/**
|
|
@@ -594,14 +594,14 @@ class y {
|
|
|
594
594
|
* Defaults to a strict equality check (===).
|
|
595
595
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
596
596
|
*/
|
|
597
|
-
flatMap = (e,
|
|
598
|
-
const n = new
|
|
597
|
+
flatMap = (e, t = (n, r) => n === r) => {
|
|
598
|
+
const n = new ee(() => {
|
|
599
599
|
try {
|
|
600
600
|
return e(this.get()).get();
|
|
601
601
|
} catch (r) {
|
|
602
602
|
throw console.error("Error in Signal.flatMap:", r), r;
|
|
603
603
|
}
|
|
604
|
-
},
|
|
604
|
+
}, t);
|
|
605
605
|
return this.setDerivative(n), n;
|
|
606
606
|
};
|
|
607
607
|
/**
|
|
@@ -610,14 +610,14 @@ class y {
|
|
|
610
610
|
* @param fn - The callback function to be invoked with the current value of the signal.
|
|
611
611
|
* @returns A new signal that emits the same value as the original signal and invokes the callback function.
|
|
612
612
|
*/
|
|
613
|
-
tap = (e) => this.map((
|
|
613
|
+
tap = (e) => this.map((t) => (e(t), t));
|
|
614
614
|
/**
|
|
615
615
|
* Returns a new Signal that emits the value at the specified key of the current value.
|
|
616
616
|
*
|
|
617
617
|
* @param key - The key of the value to retrieve.
|
|
618
618
|
* @returns A new Signal that emits the value at the specified key.
|
|
619
619
|
*/
|
|
620
|
-
at = (e) => this.map((
|
|
620
|
+
at = (e) => this.map((t) => t[e]);
|
|
621
621
|
/**
|
|
622
622
|
* @internal
|
|
623
623
|
*/
|
|
@@ -628,17 +628,17 @@ class y {
|
|
|
628
628
|
*/
|
|
629
629
|
get $() {
|
|
630
630
|
return this._$ !== void 0 ? this._$ : this._$ = new Proxy(this, {
|
|
631
|
-
get: (e,
|
|
631
|
+
get: (e, t) => this.at(t)
|
|
632
632
|
});
|
|
633
633
|
}
|
|
634
|
-
filter = (e,
|
|
635
|
-
let n =
|
|
636
|
-
const r = new
|
|
634
|
+
filter = (e, t) => {
|
|
635
|
+
let n = t ?? this.get();
|
|
636
|
+
const r = new ee(() => {
|
|
637
637
|
try {
|
|
638
|
-
const
|
|
639
|
-
return n = e(
|
|
640
|
-
} catch (
|
|
641
|
-
throw console.error("Error in Signal.filter:",
|
|
638
|
+
const i = this.get();
|
|
639
|
+
return n = e(i) ? i : n;
|
|
640
|
+
} catch (i) {
|
|
641
|
+
throw console.error("Error in Signal.filter:", i), i;
|
|
642
642
|
}
|
|
643
643
|
}, this.equals);
|
|
644
644
|
return this.setDerivative(r), r;
|
|
@@ -653,17 +653,17 @@ class y {
|
|
|
653
653
|
* @param equals - Optional equality function to determine if two values are equal.
|
|
654
654
|
* @returns - A new Computed object with the mapped and filtered values.
|
|
655
655
|
*/
|
|
656
|
-
filterMap = (e,
|
|
657
|
-
let r =
|
|
658
|
-
const
|
|
656
|
+
filterMap = (e, t, n = (r, i) => r === i) => {
|
|
657
|
+
let r = t;
|
|
658
|
+
const i = new ee(() => {
|
|
659
659
|
try {
|
|
660
|
-
const
|
|
661
|
-
return r = e(
|
|
662
|
-
} catch (
|
|
663
|
-
throw console.error("Error in Signal.filterMap:",
|
|
660
|
+
const o = this.get();
|
|
661
|
+
return r = e(o) ?? r;
|
|
662
|
+
} catch (o) {
|
|
663
|
+
throw console.error("Error in Signal.filterMap:", o), o;
|
|
664
664
|
}
|
|
665
665
|
}, n);
|
|
666
|
-
return this.setDerivative(
|
|
666
|
+
return this.setDerivative(i), i;
|
|
667
667
|
};
|
|
668
668
|
/**
|
|
669
669
|
* Maps the values emitted by the signal to a new value asynchronously using the provided function.
|
|
@@ -678,25 +678,25 @@ class y {
|
|
|
678
678
|
* @param equals - The equality function to compare the mapped values for equality.
|
|
679
679
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
680
680
|
*/
|
|
681
|
-
mapAsync = (e,
|
|
682
|
-
const
|
|
683
|
-
let
|
|
684
|
-
return
|
|
685
|
-
this.on(async (
|
|
686
|
-
const
|
|
681
|
+
mapAsync = (e, t, n, r = (i, o) => i === o) => {
|
|
682
|
+
const i = B(t, r);
|
|
683
|
+
let o = 0, l = new AbortController();
|
|
684
|
+
return i.onDispose(
|
|
685
|
+
this.on(async (f) => {
|
|
686
|
+
const d = ++o;
|
|
687
687
|
l.abort(), l = new AbortController();
|
|
688
688
|
try {
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
} catch (
|
|
692
|
-
if (
|
|
689
|
+
const v = await e(f, { abortSignal: l.signal });
|
|
690
|
+
d === o && i.set(v);
|
|
691
|
+
} catch (v) {
|
|
692
|
+
if (d === o)
|
|
693
693
|
if (n != null)
|
|
694
|
-
|
|
694
|
+
i.set(n(v));
|
|
695
695
|
else
|
|
696
|
-
throw
|
|
696
|
+
throw v;
|
|
697
697
|
}
|
|
698
698
|
})
|
|
699
|
-
),
|
|
699
|
+
), i;
|
|
700
700
|
};
|
|
701
701
|
/**
|
|
702
702
|
* Maps the values emitted by the signal to multiple values over time using an async generator.
|
|
@@ -739,28 +739,28 @@ class y {
|
|
|
739
739
|
* @param equals - Optional equality function to compare yielded values.
|
|
740
740
|
* @returns A property that updates each time the generator yields a value.
|
|
741
741
|
*/
|
|
742
|
-
mapAsyncGenerator = (e,
|
|
743
|
-
const
|
|
744
|
-
let
|
|
745
|
-
return
|
|
746
|
-
this.on(async (
|
|
747
|
-
const
|
|
742
|
+
mapAsyncGenerator = (e, t, n, r = (i, o) => i === o) => {
|
|
743
|
+
const i = B(t, r);
|
|
744
|
+
let o = 0, l = new AbortController();
|
|
745
|
+
return i.onDispose(
|
|
746
|
+
this.on(async (f) => {
|
|
747
|
+
const d = ++o;
|
|
748
748
|
l.abort(), l = new AbortController();
|
|
749
749
|
try {
|
|
750
|
-
const
|
|
751
|
-
for await (const
|
|
752
|
-
if (
|
|
753
|
-
|
|
750
|
+
const v = e(f, { abortSignal: l.signal });
|
|
751
|
+
for await (const S of v) {
|
|
752
|
+
if (d !== o) return;
|
|
753
|
+
i.set(S);
|
|
754
754
|
}
|
|
755
|
-
} catch (
|
|
756
|
-
if (
|
|
755
|
+
} catch (v) {
|
|
756
|
+
if (d === o)
|
|
757
757
|
if (n != null)
|
|
758
|
-
|
|
758
|
+
i.set(n(v));
|
|
759
759
|
else
|
|
760
|
-
throw
|
|
760
|
+
throw v;
|
|
761
761
|
}
|
|
762
762
|
})
|
|
763
|
-
),
|
|
763
|
+
), i;
|
|
764
764
|
};
|
|
765
765
|
/**
|
|
766
766
|
* Maps the values of the signal using the provided function `fn`, and returns a new signal
|
|
@@ -772,16 +772,16 @@ class y {
|
|
|
772
772
|
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
773
773
|
* @returns A new signal containing the mapped values.
|
|
774
774
|
*/
|
|
775
|
-
mapMaybe = (e,
|
|
775
|
+
mapMaybe = (e, t) => this.map((n) => e(n) ?? t);
|
|
776
776
|
/**
|
|
777
777
|
* Feeds a property into the signal and sets up disposal behavior.
|
|
778
778
|
* @param prop - The property to feed into the signal.
|
|
779
779
|
* @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
|
|
780
780
|
* @returns The input property.
|
|
781
781
|
*/
|
|
782
|
-
feedProp = (e,
|
|
783
|
-
const n = this.on(e.set, { noAutoDispose: !
|
|
784
|
-
return e.onDispose(n),
|
|
782
|
+
feedProp = (e, t = !1) => {
|
|
783
|
+
const n = this.on(e.set, { noAutoDispose: !t });
|
|
784
|
+
return e.onDispose(n), t ? this.onDispose(e.dispose) : this.onDispose(n), e;
|
|
785
785
|
};
|
|
786
786
|
/**
|
|
787
787
|
* Derives a new property from the current signal.
|
|
@@ -792,8 +792,8 @@ class y {
|
|
|
792
792
|
*/
|
|
793
793
|
deriveProp = ({
|
|
794
794
|
autoDisposeProp: e = !0,
|
|
795
|
-
equals:
|
|
796
|
-
} = {}) => this.feedProp(
|
|
795
|
+
equals: t
|
|
796
|
+
} = {}) => this.feedProp(B(this.get(), t), e);
|
|
797
797
|
/**
|
|
798
798
|
* Derives a new signal from the current signal. Useful to create a new signal that emits the same values as the current signal but can be disposed independently.
|
|
799
799
|
* @returns A new signal that emits the same values as the current signal.
|
|
@@ -822,8 +822,8 @@ class y {
|
|
|
822
822
|
}), e.onDispose(this.on(e.setDirty, { noAutoDispose: !0 })), this.onDispose(e.dispose);
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
|
-
const
|
|
826
|
-
class
|
|
825
|
+
const ut = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
|
|
826
|
+
class ee extends _ {
|
|
827
827
|
/**
|
|
828
828
|
* Creates a new Computed signal.
|
|
829
829
|
*
|
|
@@ -848,8 +848,8 @@ class R extends y {
|
|
|
848
848
|
* @see {@link getCurrentScope} - Get the current disposal scope
|
|
849
849
|
* @see {@link untracked} - Create signals outside of scope tracking
|
|
850
850
|
*/
|
|
851
|
-
constructor(e,
|
|
852
|
-
super(void 0,
|
|
851
|
+
constructor(e, t) {
|
|
852
|
+
super(void 0, t), this._fn = e, this.setDirty(), Oe()?.track(this);
|
|
853
853
|
}
|
|
854
854
|
/**
|
|
855
855
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -887,7 +887,7 @@ class R extends y {
|
|
|
887
887
|
*/
|
|
888
888
|
_scheduleNotify = () => {
|
|
889
889
|
const e = ++this._scheduleCount;
|
|
890
|
-
|
|
890
|
+
ut(() => {
|
|
891
891
|
this._scheduleCount !== e || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
|
|
892
892
|
});
|
|
893
893
|
};
|
|
@@ -906,7 +906,7 @@ class R extends y {
|
|
|
906
906
|
this._disposed || (this._scheduleCount++, this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
|
-
class
|
|
909
|
+
class we extends _ {
|
|
910
910
|
/**
|
|
911
911
|
* Checks if a value is a Prop.
|
|
912
912
|
* @param value - The value to check.
|
|
@@ -941,15 +941,15 @@ class se extends y {
|
|
|
941
941
|
* @param effects - An array of effects to be executed after the state is updated.
|
|
942
942
|
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
943
943
|
*/
|
|
944
|
-
reducer = (e, ...
|
|
944
|
+
reducer = (e, ...t) => {
|
|
945
945
|
const n = this;
|
|
946
|
-
return function r(
|
|
947
|
-
const
|
|
948
|
-
n.update((l) => e(l,
|
|
946
|
+
return function r(i) {
|
|
947
|
+
const o = n.value;
|
|
948
|
+
n.update((l) => e(l, i)), !n.equals(o, n.value) && t.forEach(
|
|
949
949
|
(l) => l({
|
|
950
|
-
previousState:
|
|
950
|
+
previousState: o,
|
|
951
951
|
state: n.value,
|
|
952
|
-
action:
|
|
952
|
+
action: i,
|
|
953
953
|
dispatch: r
|
|
954
954
|
})
|
|
955
955
|
);
|
|
@@ -966,9 +966,9 @@ class se extends y {
|
|
|
966
966
|
* Defaults to a strict equality check (===).
|
|
967
967
|
* @returns A Prop object representing the isomorphism.
|
|
968
968
|
*/
|
|
969
|
-
iso = (e,
|
|
970
|
-
const r = new
|
|
971
|
-
return r.onDispose(this.on((
|
|
969
|
+
iso = (e, t, n = (r, i) => r === i) => {
|
|
970
|
+
const r = new we(e(this.get()), n);
|
|
971
|
+
return r.onDispose(this.on((i) => r.set(e(i)))), r.on((i) => this._setAndNotify(t(i))), r;
|
|
972
972
|
};
|
|
973
973
|
/**
|
|
974
974
|
* Returns a `Prop` that represents the value at the specified key of the current value.
|
|
@@ -977,8 +977,8 @@ class se extends y {
|
|
|
977
977
|
* @returns A `Prop` that represents the value at the specified key.
|
|
978
978
|
*/
|
|
979
979
|
atProp = (e) => this.iso(
|
|
980
|
-
(
|
|
981
|
-
(
|
|
980
|
+
(t) => t[e],
|
|
981
|
+
(t) => ({ ...this.value, [e]: t })
|
|
982
982
|
);
|
|
983
983
|
/**
|
|
984
984
|
* Access for the current value of the property.
|
|
@@ -990,42 +990,42 @@ class se extends y {
|
|
|
990
990
|
this._setAndNotify(e);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
|
-
const
|
|
994
|
-
const n = new
|
|
993
|
+
const be = (s, e, t = (n, r) => n === r) => {
|
|
994
|
+
const n = new ee(s, t);
|
|
995
995
|
return e.forEach((r) => r.setDerivative(n)), n;
|
|
996
|
-
},
|
|
997
|
-
let n =
|
|
998
|
-
|
|
999
|
-
} :
|
|
1000
|
-
if (
|
|
1001
|
-
let
|
|
996
|
+
}, $e = (s, e, t = {}) => {
|
|
997
|
+
let n = t.once ? () => {
|
|
998
|
+
i(), s();
|
|
999
|
+
} : s;
|
|
1000
|
+
if (t.skipInitial) {
|
|
1001
|
+
let o = !1;
|
|
1002
1002
|
const l = n;
|
|
1003
1003
|
n = () => {
|
|
1004
|
-
|
|
1004
|
+
o ? l() : o = !0;
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
|
-
const r =
|
|
1008
|
-
r.dispose(),
|
|
1009
|
-
};
|
|
1010
|
-
return
|
|
1011
|
-
},
|
|
1012
|
-
const
|
|
1013
|
-
return
|
|
1014
|
-
},
|
|
1007
|
+
const r = be(n, e), i = () => {
|
|
1008
|
+
r.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
|
|
1009
|
+
};
|
|
1010
|
+
return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
|
|
1011
|
+
}, B = (s, e = (t, n) => t === n) => {
|
|
1012
|
+
const t = new we(s, e);
|
|
1013
|
+
return Oe()?.track(t), t;
|
|
1014
|
+
}, ye = (s, e = (t, n) => t === n) => new _(s, e), Se = () => (
|
|
1015
1015
|
/* c8 ignore next */
|
|
1016
1016
|
typeof window < "u" ? window : void 0
|
|
1017
|
-
),
|
|
1018
|
-
const n = Math.max(
|
|
1017
|
+
), ht = (s, e, t) => s + (e - s) * t, Pe = 97, dt = (s, e, t) => {
|
|
1018
|
+
const n = Math.max(s.length, e.length);
|
|
1019
1019
|
let r = "";
|
|
1020
|
-
for (let
|
|
1021
|
-
let
|
|
1022
|
-
isNaN(
|
|
1023
|
-
let l = e.charCodeAt(
|
|
1024
|
-
isNaN(l) && (l =
|
|
1020
|
+
for (let i = 0; i < n; i++) {
|
|
1021
|
+
let o = s.charCodeAt(i);
|
|
1022
|
+
isNaN(o) && (o = Pe);
|
|
1023
|
+
let l = e.charCodeAt(i);
|
|
1024
|
+
isNaN(l) && (l = Pe), r += String.fromCharCode(o + (l - o) * t);
|
|
1025
1025
|
}
|
|
1026
1026
|
return r;
|
|
1027
|
-
},
|
|
1028
|
-
class
|
|
1027
|
+
}, ft = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), pt = (s, e) => e, mt = (s) => typeof s == "number" ? ht : typeof s == "string" ? dt : s instanceof Date ? ft : pt;
|
|
1028
|
+
class He {
|
|
1029
1029
|
_store = /* @__PURE__ */ new Map();
|
|
1030
1030
|
/**
|
|
1031
1031
|
* Retrieves the value associated with the specified key from the memory store.
|
|
@@ -1038,228 +1038,228 @@ class Ee {
|
|
|
1038
1038
|
* @param key - The key to set the value for.
|
|
1039
1039
|
* @param value - The value to set.
|
|
1040
1040
|
*/
|
|
1041
|
-
setItem = (e,
|
|
1042
|
-
this._store.set(e,
|
|
1041
|
+
setItem = (e, t) => {
|
|
1042
|
+
this._store.set(e, t);
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
let
|
|
1046
|
-
const
|
|
1047
|
-
key:
|
|
1045
|
+
let _e = null, Ee = null;
|
|
1046
|
+
const gt = () => (_e || (_e = new He()), _e), yt = () => (Ee || (Ee = new He()), Ee), Ne = ({
|
|
1047
|
+
key: s,
|
|
1048
1048
|
defaultValue: e,
|
|
1049
|
-
store:
|
|
1049
|
+
store: t,
|
|
1050
1050
|
serialize: n = JSON.stringify,
|
|
1051
1051
|
deserialize: r = JSON.parse,
|
|
1052
|
-
equals:
|
|
1053
|
-
onLoad:
|
|
1052
|
+
equals: i = (d, v) => d === v,
|
|
1053
|
+
onLoad: o = (d) => d,
|
|
1054
1054
|
syncTabs: l = !0,
|
|
1055
|
-
onKeyChange:
|
|
1055
|
+
onKeyChange: f = "load"
|
|
1056
1056
|
}) => {
|
|
1057
|
-
let
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
),
|
|
1062
|
-
let
|
|
1063
|
-
const
|
|
1064
|
-
if (!
|
|
1065
|
-
const
|
|
1066
|
-
const
|
|
1067
|
-
if (!(
|
|
1057
|
+
let d = C.get(s);
|
|
1058
|
+
const v = t.getItem(d), S = new we(
|
|
1059
|
+
v != null ? o(r(v)) : typeof e == "function" ? e() : e,
|
|
1060
|
+
i
|
|
1061
|
+
), O = Se(), T = l && typeof O?.BroadcastChannel == "function";
|
|
1062
|
+
let A = !1, $ = null, M = null;
|
|
1063
|
+
const x = (k) => {
|
|
1064
|
+
if (!T) return null;
|
|
1065
|
+
const U = `tempo:storedProp:${k}`, V = new O.BroadcastChannel(U), q = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, F = (K) => {
|
|
1066
|
+
const H = K.data;
|
|
1067
|
+
if (!(H == null || typeof H != "object" || H.key !== k || typeof H.value != "string" || H.sourceId != null && H.sourceId === q))
|
|
1068
1068
|
try {
|
|
1069
|
-
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1072
|
-
} catch (
|
|
1069
|
+
A = !0;
|
|
1070
|
+
const re = o(r(H.value));
|
|
1071
|
+
S.set(re);
|
|
1072
|
+
} catch (re) {
|
|
1073
1073
|
console.warn(
|
|
1074
|
-
`Failed to sync storedProp for key "${
|
|
1075
|
-
|
|
1074
|
+
`Failed to sync storedProp for key "${k}" via BroadcastChannel`,
|
|
1075
|
+
re
|
|
1076
1076
|
);
|
|
1077
1077
|
} finally {
|
|
1078
|
-
|
|
1078
|
+
A = !1;
|
|
1079
1079
|
}
|
|
1080
1080
|
};
|
|
1081
|
-
return
|
|
1082
|
-
|
|
1083
|
-
}), { channel:
|
|
1084
|
-
},
|
|
1085
|
-
|
|
1086
|
-
const X = (
|
|
1087
|
-
const
|
|
1088
|
-
if (
|
|
1089
|
-
const
|
|
1090
|
-
if (
|
|
1091
|
-
const
|
|
1092
|
-
if (
|
|
1081
|
+
return V.addEventListener("message", F), S.onDispose(() => {
|
|
1082
|
+
V?.removeEventListener("message", F), V?.close();
|
|
1083
|
+
}), { channel: V, instanceId: q, handleMessage: F };
|
|
1084
|
+
}, R = x(d);
|
|
1085
|
+
R && ($ = R.channel, M = R.instanceId);
|
|
1086
|
+
const X = (k) => {
|
|
1087
|
+
const U = d;
|
|
1088
|
+
if (U === k) return;
|
|
1089
|
+
const V = S.get(), q = n(V);
|
|
1090
|
+
if (t.setItem(U, q), $ != null && ($.close(), $ = null, M = null), d = k, f === "load") {
|
|
1091
|
+
const K = t.getItem(k);
|
|
1092
|
+
if (K != null)
|
|
1093
1093
|
try {
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
} catch (
|
|
1094
|
+
const H = o(r(K));
|
|
1095
|
+
S.set(H);
|
|
1096
|
+
} catch (H) {
|
|
1097
1097
|
console.warn(
|
|
1098
|
-
`Failed to load storedProp from new key "${
|
|
1099
|
-
|
|
1098
|
+
`Failed to load storedProp from new key "${k}"`,
|
|
1099
|
+
H
|
|
1100
1100
|
);
|
|
1101
1101
|
}
|
|
1102
1102
|
else
|
|
1103
|
-
|
|
1104
|
-
} else
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1107
|
-
};
|
|
1108
|
-
return
|
|
1109
|
-
const
|
|
1110
|
-
|
|
1111
|
-
key:
|
|
1112
|
-
value:
|
|
1113
|
-
sourceId:
|
|
1103
|
+
t.setItem(k, q);
|
|
1104
|
+
} else f === "migrate" && t.setItem(k, q);
|
|
1105
|
+
const F = x(k);
|
|
1106
|
+
F && ($ = F.channel, M = F.instanceId);
|
|
1107
|
+
};
|
|
1108
|
+
return _.is(s) && S.onDispose(s.on(X)), S.on((k, U) => {
|
|
1109
|
+
const V = n(k);
|
|
1110
|
+
t.setItem(d, V), $ != null && !A && U !== void 0 && M != null && $.postMessage({
|
|
1111
|
+
key: d,
|
|
1112
|
+
value: V,
|
|
1113
|
+
sourceId: M
|
|
1114
1114
|
});
|
|
1115
|
-
}),
|
|
1116
|
-
},
|
|
1117
|
-
const e =
|
|
1118
|
-
return
|
|
1119
|
-
...
|
|
1120
|
-
store:
|
|
1115
|
+
}), S;
|
|
1116
|
+
}, fs = (s) => {
|
|
1117
|
+
const e = Se()?.localStorage, t = e && typeof e.getItem == "function" ? e : gt();
|
|
1118
|
+
return Ne({
|
|
1119
|
+
...s,
|
|
1120
|
+
store: t
|
|
1121
1121
|
});
|
|
1122
|
-
},
|
|
1123
|
-
const e =
|
|
1124
|
-
return
|
|
1125
|
-
...
|
|
1126
|
-
store:
|
|
1122
|
+
}, ps = (s) => {
|
|
1123
|
+
const e = Se()?.sessionStorage, t = e && typeof e.getItem == "function" ? e : yt();
|
|
1124
|
+
return Ne({
|
|
1125
|
+
...s,
|
|
1126
|
+
store: t
|
|
1127
1127
|
});
|
|
1128
1128
|
};
|
|
1129
|
-
function
|
|
1130
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(
|
|
1129
|
+
function Le(s) {
|
|
1130
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
|
|
1131
1131
|
}
|
|
1132
|
-
const
|
|
1133
|
-
const r = n?.duration ?? 300,
|
|
1134
|
-
let l = n?.interpolate,
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
}),
|
|
1139
|
-
|
|
1132
|
+
const vt = (s, e, t, n) => {
|
|
1133
|
+
const r = n?.duration ?? 300, i = n?.easing ?? ((x) => x), o = n?.equals ?? ((x, R) => x === R);
|
|
1134
|
+
let l = n?.interpolate, f = s, d = e(), v = performance.now(), S = null, O = !0;
|
|
1135
|
+
const T = new ee(e, o), A = B(s, o);
|
|
1136
|
+
A.onDispose(() => {
|
|
1137
|
+
S !== null && cancelAnimationFrame(S);
|
|
1138
|
+
}), A.onDispose(T.dispose), t.forEach((x) => {
|
|
1139
|
+
x.setDerivative(T), x.onDispose(A.dispose);
|
|
1140
1140
|
});
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
},
|
|
1144
|
-
const
|
|
1145
|
-
l == null && (l =
|
|
1146
|
-
let X = l(
|
|
1147
|
-
|
|
1148
|
-
};
|
|
1149
|
-
return
|
|
1150
|
-
},
|
|
1151
|
-
const { initialValue:
|
|
1152
|
-
return
|
|
1141
|
+
const $ = (x) => {
|
|
1142
|
+
d = x, v = performance.now(), f = A.value, O && (O = !1, S = Le(M));
|
|
1143
|
+
}, M = () => {
|
|
1144
|
+
const x = (performance.now() - v) / C.get(r), R = i(x);
|
|
1145
|
+
l == null && (l = mt(f));
|
|
1146
|
+
let X = l(f, d, R);
|
|
1147
|
+
x >= 1 ? (O = !0, X = d) : S = Le(M), A.set(X);
|
|
1148
|
+
};
|
|
1149
|
+
return T.on($), A;
|
|
1150
|
+
}, ms = (s, e) => {
|
|
1151
|
+
const { initialValue: t, ...n } = e ?? {};
|
|
1152
|
+
return vt(
|
|
1153
1153
|
/* c8 ignore next 2 */
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
[
|
|
1154
|
+
t ?? s.get(),
|
|
1155
|
+
s.get,
|
|
1156
|
+
[s],
|
|
1157
1157
|
n
|
|
1158
1158
|
);
|
|
1159
|
-
},
|
|
1160
|
-
const
|
|
1161
|
-
return
|
|
1159
|
+
}, wt = (s, e) => {
|
|
1160
|
+
const t = Object.values(s).filter(_.is), n = Object.keys(s);
|
|
1161
|
+
return be(() => {
|
|
1162
1162
|
const r = {};
|
|
1163
|
-
for (const
|
|
1164
|
-
r[
|
|
1163
|
+
for (const i of n)
|
|
1164
|
+
r[i] = C.get(s[i]);
|
|
1165
1165
|
return e(r);
|
|
1166
|
-
},
|
|
1167
|
-
},
|
|
1168
|
-
const
|
|
1166
|
+
}, t);
|
|
1167
|
+
}, gs = (s) => wt(s, (e) => e), ys = (s, e) => {
|
|
1168
|
+
const t = B(s.get());
|
|
1169
1169
|
let n = null;
|
|
1170
|
-
const r =
|
|
1171
|
-
(
|
|
1170
|
+
const r = s.on(
|
|
1171
|
+
(i) => {
|
|
1172
1172
|
n != null && clearTimeout(n), n = setTimeout(
|
|
1173
1173
|
() => {
|
|
1174
|
-
n = null,
|
|
1174
|
+
n = null, t.set(i);
|
|
1175
1175
|
},
|
|
1176
|
-
typeof e == "function" ? e(
|
|
1176
|
+
typeof e == "function" ? e(i) : e
|
|
1177
1177
|
);
|
|
1178
1178
|
},
|
|
1179
1179
|
{ noAutoDispose: !0 }
|
|
1180
1180
|
);
|
|
1181
|
-
return
|
|
1181
|
+
return t.onDispose(() => {
|
|
1182
1182
|
r(), n != null && clearTimeout(n);
|
|
1183
|
-
}),
|
|
1184
|
-
},
|
|
1183
|
+
}), t;
|
|
1184
|
+
}, vs = (s) => {
|
|
1185
1185
|
let e;
|
|
1186
|
-
return
|
|
1186
|
+
return s.map((t) => {
|
|
1187
1187
|
const n = e;
|
|
1188
|
-
return e =
|
|
1188
|
+
return e = t, n;
|
|
1189
1189
|
});
|
|
1190
|
-
},
|
|
1191
|
-
size:
|
|
1190
|
+
}, ws = ({
|
|
1191
|
+
size: s = void 0,
|
|
1192
1192
|
signal: e
|
|
1193
1193
|
}) => {
|
|
1194
|
-
const
|
|
1195
|
-
return e.map((n) => (
|
|
1196
|
-
},
|
|
1197
|
-
|
|
1194
|
+
const t = [];
|
|
1195
|
+
return e.map((n) => (t.push(n), s != null && t.length > s && t.shift(), t.slice()));
|
|
1196
|
+
}, bs = (s) => (...e) => ne(
|
|
1197
|
+
s,
|
|
1198
1198
|
...e
|
|
1199
|
-
)((
|
|
1200
|
-
function
|
|
1201
|
-
return
|
|
1202
|
-
for (const
|
|
1199
|
+
)((t, ...n) => t(...n));
|
|
1200
|
+
function Ss(...s) {
|
|
1201
|
+
return ne(...s)((...e) => {
|
|
1202
|
+
for (const t of e) if (t != null) return t;
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
1205
|
-
const
|
|
1205
|
+
const Ts = (s, {
|
|
1206
1206
|
channel: e,
|
|
1207
|
-
serialize:
|
|
1207
|
+
serialize: t = JSON.stringify,
|
|
1208
1208
|
deserialize: n = JSON.parse,
|
|
1209
|
-
equals: r = (
|
|
1209
|
+
equals: r = (i, o) => i === o
|
|
1210
1210
|
}) => {
|
|
1211
|
-
const
|
|
1212
|
-
if (typeof
|
|
1211
|
+
const i = Se();
|
|
1212
|
+
if (typeof i?.BroadcastChannel != "function")
|
|
1213
1213
|
return () => {
|
|
1214
1214
|
};
|
|
1215
|
-
const
|
|
1215
|
+
const o = new i.BroadcastChannel(
|
|
1216
1216
|
`tempo:syncProp:${e}`
|
|
1217
1217
|
), l = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
1218
|
-
let
|
|
1219
|
-
const
|
|
1220
|
-
const
|
|
1221
|
-
if (!(
|
|
1218
|
+
let f = !1;
|
|
1219
|
+
const d = (O) => {
|
|
1220
|
+
const T = O.data;
|
|
1221
|
+
if (!(T == null || typeof T != "object" || typeof T.value != "string" || T.sourceId != null && T.sourceId === l))
|
|
1222
1222
|
try {
|
|
1223
|
-
|
|
1224
|
-
const
|
|
1225
|
-
r(
|
|
1226
|
-
} catch (
|
|
1223
|
+
f = !0;
|
|
1224
|
+
const A = n(T.value);
|
|
1225
|
+
r(s.get(), A) || s.set(A);
|
|
1226
|
+
} catch (A) {
|
|
1227
1227
|
console.warn(
|
|
1228
1228
|
`Failed to sync prop for channel "${e}" via BroadcastChannel`,
|
|
1229
|
-
|
|
1229
|
+
A
|
|
1230
1230
|
);
|
|
1231
1231
|
} finally {
|
|
1232
|
-
|
|
1232
|
+
f = !1;
|
|
1233
1233
|
}
|
|
1234
1234
|
};
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1237
|
-
if (!
|
|
1235
|
+
o.addEventListener("message", d);
|
|
1236
|
+
const v = s.on((O, T) => {
|
|
1237
|
+
if (!f && T !== void 0 && !r(O, T))
|
|
1238
1238
|
try {
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
value:
|
|
1239
|
+
const A = t(O);
|
|
1240
|
+
o.postMessage({
|
|
1241
|
+
value: A,
|
|
1242
1242
|
sourceId: l
|
|
1243
1243
|
});
|
|
1244
|
-
} catch (
|
|
1244
|
+
} catch (A) {
|
|
1245
1245
|
console.warn(
|
|
1246
1246
|
`Failed to serialize prop for channel "${e}" via BroadcastChannel`,
|
|
1247
|
-
|
|
1247
|
+
A
|
|
1248
1248
|
);
|
|
1249
1249
|
}
|
|
1250
|
-
}),
|
|
1251
|
-
|
|
1250
|
+
}), S = () => {
|
|
1251
|
+
v(), o.removeEventListener("message", d), o.close();
|
|
1252
1252
|
};
|
|
1253
|
-
return
|
|
1253
|
+
return s.onDispose(S), S;
|
|
1254
1254
|
};
|
|
1255
|
-
class
|
|
1255
|
+
class De {
|
|
1256
1256
|
/**
|
|
1257
1257
|
* Creates a new instance of `ElementPosition`.
|
|
1258
1258
|
* @param index - The index of the element.
|
|
1259
1259
|
* @param total - The total number of elements in the collection.
|
|
1260
1260
|
*/
|
|
1261
|
-
constructor(e,
|
|
1262
|
-
this.index = e, this.total =
|
|
1261
|
+
constructor(e, t) {
|
|
1262
|
+
this.index = e, this.total = t, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
1263
1263
|
}
|
|
1264
1264
|
/**
|
|
1265
1265
|
* The counter of the element starting from 1.
|
|
@@ -1300,14 +1300,22 @@ class de {
|
|
|
1300
1300
|
this.#e?.dispose(), this.#e = void 0;
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
|
-
const
|
|
1303
|
+
const Re = /* @__PURE__ */ new Set([
|
|
1304
|
+
"checked",
|
|
1305
|
+
"disabled",
|
|
1306
|
+
"hidden",
|
|
1307
|
+
"multiple",
|
|
1308
|
+
"readonly",
|
|
1309
|
+
"required",
|
|
1310
|
+
"autofocus"
|
|
1311
|
+
]), je = /* @__PURE__ */ new Set(["selected"]), Ve = /* @__PURE__ */ new Set([
|
|
1304
1312
|
"rowSpan",
|
|
1305
1313
|
"colSpan",
|
|
1306
1314
|
"tabIndex",
|
|
1307
1315
|
"valueAsNumber"
|
|
1308
|
-
]),
|
|
1316
|
+
]), Be = /* @__PURE__ */ new Set(["valueAsDate"]), qe = {
|
|
1309
1317
|
readonly: "readOnly"
|
|
1310
|
-
},
|
|
1318
|
+
}, Fe = /* @__PURE__ */ new Set([
|
|
1311
1319
|
"value",
|
|
1312
1320
|
"textContent",
|
|
1313
1321
|
"innerText",
|
|
@@ -1316,35 +1324,391 @@ const De = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "multiple",
|
|
|
1316
1324
|
"outerHTML",
|
|
1317
1325
|
"className",
|
|
1318
1326
|
"classList"
|
|
1319
|
-
]),
|
|
1320
|
-
if (
|
|
1321
|
-
return (
|
|
1322
|
-
|
|
1327
|
+
]), bt = (s, e) => {
|
|
1328
|
+
if (je.has(s))
|
|
1329
|
+
return (t) => {
|
|
1330
|
+
t == null || t !== !0 ? e.removeAttribute(s) : e.setAttribute(s, "");
|
|
1323
1331
|
};
|
|
1324
|
-
if (
|
|
1325
|
-
const
|
|
1332
|
+
if (Re.has(s)) {
|
|
1333
|
+
const t = qe[s] || s;
|
|
1326
1334
|
return (n) => {
|
|
1327
|
-
n == null ? e[
|
|
1335
|
+
n == null ? e[t] = null : e[t] = !!n;
|
|
1328
1336
|
};
|
|
1329
|
-
} else return
|
|
1330
|
-
|
|
1331
|
-
} :
|
|
1332
|
-
|
|
1333
|
-
} :
|
|
1334
|
-
|
|
1335
|
-
} : (
|
|
1336
|
-
|
|
1337
|
-
};
|
|
1338
|
-
},
|
|
1339
|
-
|
|
1340
|
-
e
|
|
1341
|
-
|
|
1342
|
-
|
|
1337
|
+
} else return Ve.has(s) ? (t) => {
|
|
1338
|
+
t == null ? e[s] = null : e[s] = Number(t);
|
|
1339
|
+
} : Be.has(s) ? (t) => {
|
|
1340
|
+
t == null ? e[s] = null : e[s] = t;
|
|
1341
|
+
} : Fe.has(s) ? (t) => {
|
|
1342
|
+
t == null ? e[s] = null : e[s] = String(t);
|
|
1343
|
+
} : (t) => {
|
|
1344
|
+
t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
|
|
1345
|
+
};
|
|
1346
|
+
}, St = (s, e) => je.has(s) ? () => e.hasAttribute(s) : Re.has(s) ? () => (
|
|
1347
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1348
|
+
!!e[qe[s] || s]
|
|
1349
|
+
) : Ve.has(s) ? () => Number(e[s]) : Be.has(s) ? () => e[s] : Fe.has(s) ? () => String(e[s]) : () => e.getAttribute(s), ve = (s) => {
|
|
1350
|
+
const e = s;
|
|
1351
|
+
e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentNode && s.parentNode.removeChild(s);
|
|
1352
|
+
}, Tt = (s) => We(s) || Ue(s) ? s : s.parentElement, We = (s) => s.nodeType === 1, Ue = (s) => s.nodeType === 11;
|
|
1353
|
+
class Je extends Error {
|
|
1343
1354
|
constructor(e) {
|
|
1344
1355
|
super(`Provider not found: ${e.description}`);
|
|
1345
1356
|
}
|
|
1346
1357
|
}
|
|
1347
|
-
|
|
1358
|
+
function At(s) {
|
|
1359
|
+
const { create: e } = s, t = (a) => e((c) => c.makeChildText(a).clear), n = (a) => e((c) => {
|
|
1360
|
+
const h = c.makeChildText(a.value), u = a.on(h.setText);
|
|
1361
|
+
return (m) => {
|
|
1362
|
+
u(), h.clear(m);
|
|
1363
|
+
};
|
|
1364
|
+
}), r = (a, c, h) => _.is(a) ? c(a) : h(a), i = (a) => {
|
|
1365
|
+
if (a == null)
|
|
1366
|
+
return l;
|
|
1367
|
+
if (Array.isArray(a))
|
|
1368
|
+
return f(...a.map(i));
|
|
1369
|
+
if (typeof a == "string")
|
|
1370
|
+
return t(a);
|
|
1371
|
+
if (_.is(a))
|
|
1372
|
+
return n(a);
|
|
1373
|
+
if (typeof a == "object" && "render" in a && "type" in a)
|
|
1374
|
+
return a;
|
|
1375
|
+
throw new Error(`Unknown type: '${typeof a}' for child: ${a}`);
|
|
1376
|
+
}, o = (a, c, h) => {
|
|
1377
|
+
const u = a.makeRef();
|
|
1378
|
+
let m = () => {
|
|
1379
|
+
}, p = null;
|
|
1380
|
+
const b = c.on(
|
|
1381
|
+
(y) => {
|
|
1382
|
+
p?.dispose(), m(!0), p = new ie(), m = z(
|
|
1383
|
+
p,
|
|
1384
|
+
() => i(h(y)).render(u)
|
|
1385
|
+
);
|
|
1386
|
+
},
|
|
1387
|
+
{ noAutoDispose: !0 }
|
|
1388
|
+
);
|
|
1389
|
+
return (y) => {
|
|
1390
|
+
p?.dispose(), m(y), b(), u.clear(y);
|
|
1391
|
+
};
|
|
1392
|
+
}, l = e(() => () => {
|
|
1393
|
+
}), f = (...a) => e((c) => {
|
|
1394
|
+
const h = a.map(
|
|
1395
|
+
(u) => i(u).render(c)
|
|
1396
|
+
);
|
|
1397
|
+
return (u) => {
|
|
1398
|
+
h.forEach((m) => m(u));
|
|
1399
|
+
};
|
|
1400
|
+
}), d = (a, c, h) => r(
|
|
1401
|
+
a,
|
|
1402
|
+
(u) => e(
|
|
1403
|
+
(m) => o(
|
|
1404
|
+
m,
|
|
1405
|
+
u,
|
|
1406
|
+
(p) => p ? c() : h?.()
|
|
1407
|
+
)
|
|
1408
|
+
),
|
|
1409
|
+
(u) => {
|
|
1410
|
+
if (u) {
|
|
1411
|
+
const m = c();
|
|
1412
|
+
return m != null ? i(m) : l;
|
|
1413
|
+
}
|
|
1414
|
+
return i(h?.());
|
|
1415
|
+
}
|
|
1416
|
+
), v = (a, c, h) => d(
|
|
1417
|
+
C.map(a, (u) => !u),
|
|
1418
|
+
c,
|
|
1419
|
+
h
|
|
1420
|
+
), S = (a, c, h) => {
|
|
1421
|
+
if (h != null)
|
|
1422
|
+
return S(a, (u) => {
|
|
1423
|
+
const m = new De(
|
|
1424
|
+
u.index,
|
|
1425
|
+
u.total.map((p) => p - 1)
|
|
1426
|
+
);
|
|
1427
|
+
return f(
|
|
1428
|
+
i(c(u)),
|
|
1429
|
+
d(
|
|
1430
|
+
u.isLast,
|
|
1431
|
+
() => l,
|
|
1432
|
+
() => h(m)
|
|
1433
|
+
)
|
|
1434
|
+
);
|
|
1435
|
+
});
|
|
1436
|
+
if (_.is(a))
|
|
1437
|
+
return e((u) => {
|
|
1438
|
+
const m = a.derive(), p = u.makeRef(), b = [], y = [];
|
|
1439
|
+
return m.on((w) => {
|
|
1440
|
+
const E = b.splice(w), D = y.splice(w);
|
|
1441
|
+
for (const I of D)
|
|
1442
|
+
I.dispose();
|
|
1443
|
+
for (const I of E)
|
|
1444
|
+
I(!0);
|
|
1445
|
+
for (let I = b.length; I < w; I++) {
|
|
1446
|
+
const g = new De(I, m), P = new ie();
|
|
1447
|
+
y.push(P), b.push(
|
|
1448
|
+
z(
|
|
1449
|
+
P,
|
|
1450
|
+
() => i(c(g)).render(p)
|
|
1451
|
+
)
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
}), (w) => {
|
|
1455
|
+
for (const E of y)
|
|
1456
|
+
E.dispose();
|
|
1457
|
+
y.length = 0, m.dispose();
|
|
1458
|
+
for (const E of b)
|
|
1459
|
+
E(w);
|
|
1460
|
+
b.length = 0, p.clear(w);
|
|
1461
|
+
};
|
|
1462
|
+
});
|
|
1463
|
+
{
|
|
1464
|
+
const u = ye(a);
|
|
1465
|
+
return f(
|
|
1466
|
+
...Array.from({ length: a }, (m, p) => p).map((m) => {
|
|
1467
|
+
const p = new De(m, u);
|
|
1468
|
+
return i(c(p));
|
|
1469
|
+
})
|
|
1470
|
+
);
|
|
1471
|
+
}
|
|
1472
|
+
}, O = (a, c, h) => {
|
|
1473
|
+
const u = C.map(a, (p) => p.length), m = C.toSignal(a);
|
|
1474
|
+
return S(
|
|
1475
|
+
u,
|
|
1476
|
+
(p) => {
|
|
1477
|
+
const b = m.map((y) => y[p.index]);
|
|
1478
|
+
return i(c(b, p));
|
|
1479
|
+
},
|
|
1480
|
+
h
|
|
1481
|
+
);
|
|
1482
|
+
}, T = (a, c) => {
|
|
1483
|
+
function h(m) {
|
|
1484
|
+
return e((p) => {
|
|
1485
|
+
const b = p.makeRef();
|
|
1486
|
+
let y, w;
|
|
1487
|
+
const E = m.map((g) => Object.keys(g)[0]);
|
|
1488
|
+
let D;
|
|
1489
|
+
const I = E.on((g) => {
|
|
1490
|
+
if (g !== D) {
|
|
1491
|
+
D = g, w?.dispose(), y?.(!0), w = m.map((G) => G[g]);
|
|
1492
|
+
const P = c[g](w);
|
|
1493
|
+
y = i(P).render(b);
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
return (g) => {
|
|
1497
|
+
w?.dispose(), I(), b.clear(g), y?.(g);
|
|
1498
|
+
};
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
function u(m) {
|
|
1502
|
+
const p = Object.keys(m)[0];
|
|
1503
|
+
return i(c[p](ye(m[p])));
|
|
1504
|
+
}
|
|
1505
|
+
return r(a, h, u);
|
|
1506
|
+
}, A = (a, c, h) => T(
|
|
1507
|
+
C.map(a, (u) => ({ [u[c]]: u })),
|
|
1508
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1509
|
+
h
|
|
1510
|
+
), $ = (a, c) => A(a, "kind", c), M = (a, c) => A(a, "type", c), x = (a, c) => {
|
|
1511
|
+
const h = C.map(a, ([u, m]) => ({
|
|
1512
|
+
[u]: m
|
|
1513
|
+
}));
|
|
1514
|
+
return T(h, c);
|
|
1515
|
+
}, R = (a, c) => T(
|
|
1516
|
+
C.map(a, (h) => ({ [h]: !0 })),
|
|
1517
|
+
c
|
|
1518
|
+
), X = (a, c) => {
|
|
1519
|
+
if (_.is(a)) {
|
|
1520
|
+
const h = a;
|
|
1521
|
+
return e((u) => {
|
|
1522
|
+
const m = u.makeRef(), p = h.map((w) => i(c(w)));
|
|
1523
|
+
let b = () => {
|
|
1524
|
+
};
|
|
1525
|
+
const y = p.on((w) => {
|
|
1526
|
+
b(!0), b = w.render(m);
|
|
1527
|
+
});
|
|
1528
|
+
return (w) => {
|
|
1529
|
+
y(), b(w);
|
|
1530
|
+
};
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
return i(c(a));
|
|
1534
|
+
}, k = (a, c, h) => {
|
|
1535
|
+
function u(p) {
|
|
1536
|
+
return e((b) => {
|
|
1537
|
+
const y = b.makeRef();
|
|
1538
|
+
let w = () => {
|
|
1539
|
+
}, E = !1, D = null;
|
|
1540
|
+
const I = p.on((g) => {
|
|
1541
|
+
g == null ? (w(!0), w = i(h?.()).render(y), E = !1, D?.dispose(), D = null) : E ? D.set(g) : (D = B(g), w(!0), w = i(
|
|
1542
|
+
c(D)
|
|
1543
|
+
).render(y), E = !0);
|
|
1544
|
+
});
|
|
1545
|
+
return (g) => {
|
|
1546
|
+
D?.dispose(), I(), w?.(g), y.clear(g);
|
|
1547
|
+
};
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
function m(p) {
|
|
1551
|
+
if (p == null) {
|
|
1552
|
+
const b = h?.();
|
|
1553
|
+
return b != null ? i(b) : l;
|
|
1554
|
+
}
|
|
1555
|
+
return i(c(ye(p)));
|
|
1556
|
+
}
|
|
1557
|
+
return r(
|
|
1558
|
+
a,
|
|
1559
|
+
u,
|
|
1560
|
+
m
|
|
1561
|
+
);
|
|
1562
|
+
}, U = (...a) => (c, h) => e((u) => {
|
|
1563
|
+
const m = u.makeRef();
|
|
1564
|
+
if (a.some(
|
|
1565
|
+
(g) => !_.is(g) && g == null
|
|
1566
|
+
))
|
|
1567
|
+
return (h != null ? i(h?.()) : l).render(m);
|
|
1568
|
+
const p = a.map(
|
|
1569
|
+
() => null
|
|
1570
|
+
), b = a.map(
|
|
1571
|
+
(g) => _.is(g) ? g.value != null : g != null
|
|
1572
|
+
);
|
|
1573
|
+
let y = null;
|
|
1574
|
+
const w = B(b.every((g) => g)), E = (g, P) => {
|
|
1575
|
+
if (g.value != null) {
|
|
1576
|
+
if (p[P] == null) {
|
|
1577
|
+
const G = B(g.value);
|
|
1578
|
+
p[P] = G;
|
|
1579
|
+
} else
|
|
1580
|
+
p[P].value = g.value;
|
|
1581
|
+
b[P] = !0;
|
|
1582
|
+
} else
|
|
1583
|
+
b[P] = !1;
|
|
1584
|
+
};
|
|
1585
|
+
let D = a.length - 1;
|
|
1586
|
+
const I = a.map((g, P) => {
|
|
1587
|
+
if (!_.is(g)) {
|
|
1588
|
+
const G = B(g);
|
|
1589
|
+
return p[P] = G, () => {
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
return g.on(() => {
|
|
1593
|
+
E(g, P), D === 0 ? w.value = b.every((G) => G) : D--;
|
|
1594
|
+
});
|
|
1595
|
+
});
|
|
1596
|
+
return w.on((g) => {
|
|
1597
|
+
y?.(!0), y = null, g ? y = i(c(...p)).render(
|
|
1598
|
+
m
|
|
1599
|
+
) : y = i(h?.() ?? l).render(m);
|
|
1600
|
+
}), (g) => {
|
|
1601
|
+
p.forEach((P) => P?.dispose()), w.dispose(), I.forEach((P) => P()), y?.(g), m.clear(g);
|
|
1602
|
+
};
|
|
1603
|
+
}), V = (a, c, h = () => l) => T(
|
|
1604
|
+
C.map(
|
|
1605
|
+
a,
|
|
1606
|
+
(u) => u.length > 0 ? { notEmpty: u } : { whenEmpty: null }
|
|
1607
|
+
),
|
|
1608
|
+
{
|
|
1609
|
+
notEmpty: (u) => c(u),
|
|
1610
|
+
whenEmpty: () => h()
|
|
1611
|
+
}
|
|
1612
|
+
), q = (a, c) => {
|
|
1613
|
+
if (typeof c == "function")
|
|
1614
|
+
return q(a, { then: c });
|
|
1615
|
+
const h = c.pending != null ? i(c.pending()) : l, u = c.then, m = c.error != null ? (p) => i(c.error(p)) : () => l;
|
|
1616
|
+
return e((p) => {
|
|
1617
|
+
let b = !0;
|
|
1618
|
+
const y = a(), w = p.makeRef();
|
|
1619
|
+
let E = i(h).render(w);
|
|
1620
|
+
return y.then(
|
|
1621
|
+
(D) => {
|
|
1622
|
+
b && (E(!0), E = i(u(D)).render(w));
|
|
1623
|
+
},
|
|
1624
|
+
(D) => {
|
|
1625
|
+
b && (E(!0), E = i(m(D)).render(w));
|
|
1626
|
+
}
|
|
1627
|
+
), (D) => {
|
|
1628
|
+
b = !1, E(D), w.clear(D);
|
|
1629
|
+
};
|
|
1630
|
+
});
|
|
1631
|
+
}, F = (a, c) => q(() => a, c), K = (...a) => e(
|
|
1632
|
+
(c) => (h) => a.forEach((u) => {
|
|
1633
|
+
typeof u == "function" ? u(h, c) : u.dispose(h, c);
|
|
1634
|
+
})
|
|
1635
|
+
), H = (a, c = {}) => (h) => {
|
|
1636
|
+
const u = c?.firstSeparator ?? a, m = c?.lastSeparator ?? a;
|
|
1637
|
+
return R(
|
|
1638
|
+
h.map((p) => p.isFirst ? "first" : p.isLast ? "last" : "other"),
|
|
1639
|
+
{
|
|
1640
|
+
first: u,
|
|
1641
|
+
last: m,
|
|
1642
|
+
other: a
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1645
|
+
}, re = (a) => e((c) => {
|
|
1646
|
+
const h = new ie(), u = z(
|
|
1647
|
+
h,
|
|
1648
|
+
() => i(a(h)).render(c)
|
|
1649
|
+
);
|
|
1650
|
+
return (m) => {
|
|
1651
|
+
h.dispose(), u(m);
|
|
1652
|
+
};
|
|
1653
|
+
}), pe = (a) => e((c) => {
|
|
1654
|
+
let h = c;
|
|
1655
|
+
function u() {
|
|
1656
|
+
return h;
|
|
1657
|
+
}
|
|
1658
|
+
function m(y) {
|
|
1659
|
+
h = y;
|
|
1660
|
+
}
|
|
1661
|
+
const p = [], b = a({
|
|
1662
|
+
use: ({ mark: y }) => {
|
|
1663
|
+
const { value: w, onUse: E } = u().getProvider(y);
|
|
1664
|
+
return E?.(), w;
|
|
1665
|
+
},
|
|
1666
|
+
set: ({ mark: y, create: w }, E) => {
|
|
1667
|
+
const { value: D, dispose: I, onUse: g } = w(E, u());
|
|
1668
|
+
p.push(I), m(u().setProvider(y, D, g));
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
return b == null ? () => {
|
|
1672
|
+
} : f(
|
|
1673
|
+
i(b),
|
|
1674
|
+
K(() => p.forEach((y) => y()))
|
|
1675
|
+
).render(u());
|
|
1676
|
+
});
|
|
1677
|
+
return {
|
|
1678
|
+
Empty: l,
|
|
1679
|
+
Fragment: f,
|
|
1680
|
+
When: d,
|
|
1681
|
+
Unless: v,
|
|
1682
|
+
ForEach: O,
|
|
1683
|
+
Repeat: S,
|
|
1684
|
+
OneOf: T,
|
|
1685
|
+
OneOfField: A,
|
|
1686
|
+
OneOfKind: $,
|
|
1687
|
+
OneOfType: M,
|
|
1688
|
+
OneOfValue: R,
|
|
1689
|
+
OneOfTuple: x,
|
|
1690
|
+
MapSignal: X,
|
|
1691
|
+
Ensure: k,
|
|
1692
|
+
EnsureAll: U,
|
|
1693
|
+
NotEmpty: V,
|
|
1694
|
+
Task: q,
|
|
1695
|
+
Async: F,
|
|
1696
|
+
OnDispose: K,
|
|
1697
|
+
Conjunction: H,
|
|
1698
|
+
WithScope: re,
|
|
1699
|
+
WithProvider: pe,
|
|
1700
|
+
Provide: (a, c, h) => pe(({ set: u }) => (u(a, c), h())),
|
|
1701
|
+
Use: (a, c) => pe(({ use: h }) => c(h(a))),
|
|
1702
|
+
UseMany: (...a) => (c) => pe(({ use: h }) => {
|
|
1703
|
+
const u = a.map(h);
|
|
1704
|
+
return c(...u);
|
|
1705
|
+
}),
|
|
1706
|
+
handleValueOrSignal: r,
|
|
1707
|
+
createReactiveRenderable: o,
|
|
1708
|
+
renderableOfTNode: i
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
class te {
|
|
1348
1712
|
/**
|
|
1349
1713
|
* Constructs a new `DOMContext` instance.
|
|
1350
1714
|
*
|
|
@@ -1354,8 +1718,8 @@ class j {
|
|
|
1354
1718
|
* @param providers - The `Providers` instance associated with this context.
|
|
1355
1719
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
1356
1720
|
*/
|
|
1357
|
-
constructor(e,
|
|
1358
|
-
this.document = e, this.element =
|
|
1721
|
+
constructor(e, t, n, r) {
|
|
1722
|
+
this.document = e, this.element = t, this.reference = n, this.providers = r;
|
|
1359
1723
|
}
|
|
1360
1724
|
/**
|
|
1361
1725
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
@@ -1365,8 +1729,8 @@ class j {
|
|
|
1365
1729
|
* @param providers - The providers to associate with the `DOMContext`.
|
|
1366
1730
|
* @returns A new `DOMContext` instance.
|
|
1367
1731
|
*/
|
|
1368
|
-
static of(e,
|
|
1369
|
-
return new
|
|
1732
|
+
static of(e, t, n) {
|
|
1733
|
+
return new te(e.ownerDocument, e, t, n);
|
|
1370
1734
|
}
|
|
1371
1735
|
/**
|
|
1372
1736
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
@@ -1375,7 +1739,7 @@ class j {
|
|
|
1375
1739
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
1376
1740
|
* @returns The newly created element.
|
|
1377
1741
|
*/
|
|
1378
|
-
createElement = (e,
|
|
1742
|
+
createElement = (e, t) => t !== void 0 ? this.document.createElementNS(t, e) : this.document.createElement(e);
|
|
1379
1743
|
/**
|
|
1380
1744
|
* Creates a new child element and appends it to the current element, returning a new context.
|
|
1381
1745
|
*
|
|
@@ -1398,8 +1762,8 @@ class j {
|
|
|
1398
1762
|
* @param namespace - The namespace URI for the element, or undefined for HTML elements
|
|
1399
1763
|
* @returns A new DOMContext focused on the newly created child element
|
|
1400
1764
|
*/
|
|
1401
|
-
makeChildElement = (e,
|
|
1402
|
-
const n = this.createElement(e,
|
|
1765
|
+
makeChildElement = (e, t) => {
|
|
1766
|
+
const n = this.createElement(e, t);
|
|
1403
1767
|
return this.appendOrInsert(n), this.withElement(n);
|
|
1404
1768
|
};
|
|
1405
1769
|
/**
|
|
@@ -1414,8 +1778,8 @@ class j {
|
|
|
1414
1778
|
* @returns A new `DOMContext` with a reference to the new text node.
|
|
1415
1779
|
*/
|
|
1416
1780
|
makeChildText = (e) => {
|
|
1417
|
-
const
|
|
1418
|
-
return this.appendOrInsert(
|
|
1781
|
+
const t = this.createText(e);
|
|
1782
|
+
return this.appendOrInsert(t), this.withReference(t);
|
|
1419
1783
|
};
|
|
1420
1784
|
/**
|
|
1421
1785
|
* Sets the text content of the current element.
|
|
@@ -1451,7 +1815,7 @@ class j {
|
|
|
1451
1815
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
1452
1816
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
1453
1817
|
*/
|
|
1454
|
-
withElement = (e) => new
|
|
1818
|
+
withElement = (e) => new te(
|
|
1455
1819
|
e.ownerDocument ?? this.document,
|
|
1456
1820
|
e,
|
|
1457
1821
|
void 0,
|
|
@@ -1502,10 +1866,10 @@ class j {
|
|
|
1502
1866
|
* @throws {Error} When the selector doesn't match any element in the document
|
|
1503
1867
|
*/
|
|
1504
1868
|
makePortal = (e) => {
|
|
1505
|
-
const
|
|
1506
|
-
if (
|
|
1869
|
+
const t = typeof e == "string" ? this.document.querySelector(e) : e;
|
|
1870
|
+
if (t == null)
|
|
1507
1871
|
throw new Error(`Cannot find element by selector for portal: ${e}`);
|
|
1508
|
-
return this.withElement(
|
|
1872
|
+
return this.withElement(t);
|
|
1509
1873
|
};
|
|
1510
1874
|
/**
|
|
1511
1875
|
* Creates a new `DOMContext` instance with the specified reference.
|
|
@@ -1513,7 +1877,7 @@ class j {
|
|
|
1513
1877
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
1514
1878
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
1515
1879
|
*/
|
|
1516
|
-
withReference = (e) => new
|
|
1880
|
+
withReference = (e) => new te(this.document, this.element, e, this.providers);
|
|
1517
1881
|
/**
|
|
1518
1882
|
* Sets a provider for the given provider mark.
|
|
1519
1883
|
*
|
|
@@ -1521,9 +1885,9 @@ class j {
|
|
|
1521
1885
|
* @param value - The provider to set for the given mark.
|
|
1522
1886
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
1523
1887
|
*/
|
|
1524
|
-
setProvider = (e,
|
|
1888
|
+
setProvider = (e, t, n) => new te(this.document, this.element, this.reference, {
|
|
1525
1889
|
...this.providers,
|
|
1526
|
-
[e]: [
|
|
1890
|
+
[e]: [t, n]
|
|
1527
1891
|
});
|
|
1528
1892
|
/**
|
|
1529
1893
|
* Retrieves a provider for the given provider mark.
|
|
@@ -1534,12 +1898,12 @@ class j {
|
|
|
1534
1898
|
*/
|
|
1535
1899
|
getProvider = (e) => {
|
|
1536
1900
|
if (this.providers[e] === void 0)
|
|
1537
|
-
throw new
|
|
1538
|
-
const [
|
|
1539
|
-
return { value:
|
|
1901
|
+
throw new Je(e);
|
|
1902
|
+
const [t, n] = this.providers[e];
|
|
1903
|
+
return { value: t, onUse: n };
|
|
1540
1904
|
};
|
|
1541
1905
|
clear = (e) => {
|
|
1542
|
-
e && (this.reference !== void 0 ?
|
|
1906
|
+
e && (this.reference !== void 0 ? ve(this.reference) : ve(this.element));
|
|
1543
1907
|
};
|
|
1544
1908
|
/**
|
|
1545
1909
|
* Adds classes to the element.
|
|
@@ -1567,10 +1931,10 @@ class j {
|
|
|
1567
1931
|
* @param options - The options for the event listener.
|
|
1568
1932
|
* @returns A function to remove the event listener.
|
|
1569
1933
|
*/
|
|
1570
|
-
on = (e,
|
|
1571
|
-
const r = (
|
|
1572
|
-
return this.element.addEventListener(e, r, n), (
|
|
1573
|
-
|
|
1934
|
+
on = (e, t, n) => {
|
|
1935
|
+
const r = (i) => t(i, this);
|
|
1936
|
+
return this.element.addEventListener(e, r, n), (i) => {
|
|
1937
|
+
i && this.element.removeEventListener(e, r, n);
|
|
1574
1938
|
};
|
|
1575
1939
|
};
|
|
1576
1940
|
/**
|
|
@@ -1599,8 +1963,8 @@ class j {
|
|
|
1599
1963
|
* @param name - The name of the style to set.
|
|
1600
1964
|
* @param value - The value of the style to set.
|
|
1601
1965
|
*/
|
|
1602
|
-
setStyle = (e,
|
|
1603
|
-
this.element.style[e] =
|
|
1966
|
+
setStyle = (e, t) => {
|
|
1967
|
+
this.element.style[e] = t;
|
|
1604
1968
|
};
|
|
1605
1969
|
/**
|
|
1606
1970
|
* Gets the style of the element.
|
|
@@ -1609,57 +1973,57 @@ class j {
|
|
|
1609
1973
|
*/
|
|
1610
1974
|
getStyle = (e) => this.element.style[e];
|
|
1611
1975
|
makeAccessors = (e) => ({
|
|
1612
|
-
get:
|
|
1613
|
-
set:
|
|
1976
|
+
get: St(e, this.element),
|
|
1977
|
+
set: bt(e, this.element)
|
|
1614
1978
|
});
|
|
1615
1979
|
getWindow = () => this.document.defaultView;
|
|
1616
1980
|
}
|
|
1617
|
-
const
|
|
1618
|
-
const
|
|
1981
|
+
const he = (s, e) => {
|
|
1982
|
+
const t = new ie(), n = z(t, () => s.render(e));
|
|
1619
1983
|
return (r = !0) => {
|
|
1620
|
-
|
|
1984
|
+
t.dispose(), n(r);
|
|
1621
1985
|
};
|
|
1622
|
-
},
|
|
1623
|
-
const
|
|
1624
|
-
if (
|
|
1625
|
-
throw new
|
|
1986
|
+
}, As = (s, e, { doc: t, clear: n, disposeWithParent: r = !0, providers: i = {} } = {}) => {
|
|
1987
|
+
const o = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
1988
|
+
if (o === null)
|
|
1989
|
+
throw new _t(
|
|
1626
1990
|
`Cannot find element by selector for render: ${e}`
|
|
1627
1991
|
);
|
|
1628
|
-
n !== !1 && (
|
|
1629
|
-
const l =
|
|
1630
|
-
let
|
|
1631
|
-
return r &&
|
|
1632
|
-
|
|
1633
|
-
|
|
1992
|
+
n !== !1 && (t ?? o.ownerDocument) != null && (o.nodeType === 1 || o.nodeType === 11) && (o.innerHTML = "");
|
|
1993
|
+
const l = Tt(o), f = We(o) || Ue(o) ? void 0 : o, d = te.of(l, f, i), v = he(s, d);
|
|
1994
|
+
let S;
|
|
1995
|
+
return r && o.parentElement != null && (S = new MutationObserver((O) => {
|
|
1996
|
+
O[0]?.removedNodes.forEach((T) => {
|
|
1997
|
+
T === o && (S?.disconnect(), v(o.nodeType !== 1));
|
|
1634
1998
|
});
|
|
1635
|
-
}),
|
|
1999
|
+
}), S.observe(o.parentElement, {
|
|
1636
2000
|
childList: !0,
|
|
1637
2001
|
subtree: !1,
|
|
1638
2002
|
attributes: !1
|
|
1639
2003
|
})), () => {
|
|
1640
|
-
|
|
2004
|
+
S?.disconnect(), v(!0);
|
|
1641
2005
|
};
|
|
1642
|
-
},
|
|
2006
|
+
}, _s = (s, {
|
|
1643
2007
|
startUrl: e = "https://example.com",
|
|
1644
|
-
selector:
|
|
2008
|
+
selector: t,
|
|
1645
2009
|
providers: n = {}
|
|
1646
2010
|
} = {
|
|
1647
2011
|
selector: "body"
|
|
1648
2012
|
}) => {
|
|
1649
|
-
const r =
|
|
2013
|
+
const r = C.toSignal(e).deriveProp(), i = new Ye(t, void 0), o = new se(i, void 0, { currentURL: r }, n);
|
|
1650
2014
|
return {
|
|
1651
|
-
clear:
|
|
1652
|
-
root:
|
|
2015
|
+
clear: he(s(), o),
|
|
2016
|
+
root: i,
|
|
1653
2017
|
currentURL: r
|
|
1654
2018
|
};
|
|
1655
2019
|
};
|
|
1656
|
-
class
|
|
2020
|
+
class _t extends Error {
|
|
1657
2021
|
constructor(e) {
|
|
1658
2022
|
super(e);
|
|
1659
2023
|
}
|
|
1660
2024
|
}
|
|
1661
|
-
const
|
|
1662
|
-
class
|
|
2025
|
+
const Ce = "data-tts-node", oe = "data-tts-class", le = "data-tts-style", ae = "data-tts-html", ce = "data-tts-text", ue = "data-tts-attrs";
|
|
2026
|
+
class Es {
|
|
1663
2027
|
/**
|
|
1664
2028
|
* Selects elements from the headless environment.
|
|
1665
2029
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -1735,19 +2099,19 @@ class ms {
|
|
|
1735
2099
|
setInnerText;
|
|
1736
2100
|
constructor({
|
|
1737
2101
|
select: e,
|
|
1738
|
-
getAttribute:
|
|
2102
|
+
getAttribute: t,
|
|
1739
2103
|
setAttribute: n,
|
|
1740
2104
|
getClass: r,
|
|
1741
|
-
setClass:
|
|
1742
|
-
getStyles:
|
|
2105
|
+
setClass: i,
|
|
2106
|
+
getStyles: o,
|
|
1743
2107
|
setStyles: l,
|
|
1744
|
-
appendHTML:
|
|
1745
|
-
getInnerHTML:
|
|
1746
|
-
setInnerHTML:
|
|
1747
|
-
getInnerText:
|
|
1748
|
-
setInnerText:
|
|
2108
|
+
appendHTML: f,
|
|
2109
|
+
getInnerHTML: d,
|
|
2110
|
+
setInnerHTML: v,
|
|
2111
|
+
getInnerText: S,
|
|
2112
|
+
setInnerText: O
|
|
1749
2113
|
}) {
|
|
1750
|
-
this.select = e, this.getAttribute =
|
|
2114
|
+
this.select = e, this.getAttribute = t, this.setAttribute = n, this.getClass = r, this.setClass = i, this.getStyles = o, this.setStyles = l, this.appendHTML = f, this.getInnerHTML = d, this.setInnerHTML = v, this.getInnerText = S, this.setInnerText = O;
|
|
1751
2115
|
}
|
|
1752
2116
|
/**
|
|
1753
2117
|
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
@@ -1757,121 +2121,121 @@ class ms {
|
|
|
1757
2121
|
* @param setPlaceholders - Whether to set placeholders for the content. This allows you to restore the original content
|
|
1758
2122
|
* when you render on the server and then hydrate on the client.
|
|
1759
2123
|
*/
|
|
1760
|
-
setFromRoot = (e,
|
|
2124
|
+
setFromRoot = (e, t) => {
|
|
1761
2125
|
e.getPortals().forEach((r) => {
|
|
1762
|
-
const
|
|
1763
|
-
for (const
|
|
1764
|
-
if (
|
|
2126
|
+
const i = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
|
|
2127
|
+
for (const o of i) {
|
|
2128
|
+
if (o == null)
|
|
1765
2129
|
throw new Error(
|
|
1766
2130
|
`Cannot find element by selector for render: ${r.selector}`
|
|
1767
2131
|
);
|
|
1768
|
-
if (r.hasChildren() && this.appendHTML(
|
|
1769
|
-
if (
|
|
1770
|
-
const l = this.getInnerHTML(
|
|
1771
|
-
l != null && this.setAttribute(
|
|
2132
|
+
if (r.hasChildren() && this.appendHTML(o, r.contentToHTML(t)), r.hasInnerHTML()) {
|
|
2133
|
+
if (t) {
|
|
2134
|
+
const l = this.getInnerHTML(o);
|
|
2135
|
+
l != null && this.setAttribute(o, ae, l);
|
|
1772
2136
|
}
|
|
1773
|
-
this.setInnerHTML(
|
|
2137
|
+
this.setInnerHTML(o, r.getInnerHTML());
|
|
1774
2138
|
}
|
|
1775
2139
|
if (r.hasInnerText()) {
|
|
1776
|
-
if (
|
|
1777
|
-
const l = this.getInnerText(
|
|
1778
|
-
l != null && this.setAttribute(
|
|
2140
|
+
if (t) {
|
|
2141
|
+
const l = this.getInnerText(o);
|
|
2142
|
+
l != null && this.setAttribute(o, ce, l);
|
|
1779
2143
|
}
|
|
1780
|
-
this.setInnerText(
|
|
2144
|
+
this.setInnerText(o, r.getInnerText());
|
|
1781
2145
|
}
|
|
1782
2146
|
if (r.hasClasses()) {
|
|
1783
|
-
if (
|
|
1784
|
-
const l = this.getClass(
|
|
1785
|
-
l != null && this.setAttribute(
|
|
2147
|
+
if (t) {
|
|
2148
|
+
const l = this.getClass(o);
|
|
2149
|
+
l != null && this.setAttribute(o, oe, l);
|
|
1786
2150
|
}
|
|
1787
|
-
this.setClass(
|
|
2151
|
+
this.setClass(o, r.getClasses().join(" "));
|
|
1788
2152
|
}
|
|
1789
2153
|
if (r.hasStyles()) {
|
|
1790
|
-
if (
|
|
1791
|
-
const l = this.getStyles(
|
|
2154
|
+
if (t) {
|
|
2155
|
+
const l = this.getStyles(o);
|
|
1792
2156
|
Object.keys(l).length > 0 && this.setAttribute(
|
|
1793
|
-
|
|
1794
|
-
|
|
2157
|
+
o,
|
|
2158
|
+
le,
|
|
1795
2159
|
JSON.stringify(l)
|
|
1796
2160
|
);
|
|
1797
2161
|
}
|
|
1798
|
-
this.setStyles(
|
|
2162
|
+
this.setStyles(o, r.getStyles());
|
|
1799
2163
|
}
|
|
1800
2164
|
if (r.hasAttributes()) {
|
|
1801
2165
|
const l = r.getAttributes();
|
|
1802
|
-
if (
|
|
1803
|
-
const
|
|
1804
|
-
l.forEach(([
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1807
|
-
}),
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
JSON.stringify(Object.fromEntries(
|
|
2166
|
+
if (t) {
|
|
2167
|
+
const f = [];
|
|
2168
|
+
l.forEach(([d]) => {
|
|
2169
|
+
const v = this.getAttribute(o, d);
|
|
2170
|
+
v != null && f.push([d, v]);
|
|
2171
|
+
}), f.length > 0 && this.setAttribute(
|
|
2172
|
+
o,
|
|
2173
|
+
ue,
|
|
2174
|
+
JSON.stringify(Object.fromEntries(f))
|
|
1811
2175
|
);
|
|
1812
2176
|
}
|
|
1813
|
-
l.forEach(([
|
|
1814
|
-
this.setAttribute(
|
|
2177
|
+
l.forEach(([f, d]) => {
|
|
2178
|
+
this.setAttribute(o, f, d);
|
|
1815
2179
|
});
|
|
1816
2180
|
}
|
|
1817
2181
|
}
|
|
1818
2182
|
});
|
|
1819
2183
|
};
|
|
1820
2184
|
}
|
|
1821
|
-
const
|
|
1822
|
-
const e =
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1825
|
-
const e =
|
|
1826
|
-
|
|
1827
|
-
},
|
|
1828
|
-
const e =
|
|
1829
|
-
|
|
1830
|
-
},
|
|
1831
|
-
const e =
|
|
1832
|
-
if (
|
|
1833
|
-
const
|
|
1834
|
-
n.length > 0 && (
|
|
1835
|
-
}
|
|
1836
|
-
},
|
|
1837
|
-
const e =
|
|
1838
|
-
if (
|
|
1839
|
-
const
|
|
1840
|
-
Object.entries(
|
|
1841
|
-
r == null ?
|
|
2185
|
+
const Ke = (s) => JSON.parse(s.replace(/"/g, '"')), Et = (s) => {
|
|
2186
|
+
const e = s.getAttribute(oe);
|
|
2187
|
+
s.removeAttribute(oe), e != null && s.setAttribute("class", e);
|
|
2188
|
+
}, Dt = (s) => {
|
|
2189
|
+
const e = s.getAttribute(ae);
|
|
2190
|
+
s.removeAttribute(ae), e != null && (s.innerHTML = e);
|
|
2191
|
+
}, Ct = (s) => {
|
|
2192
|
+
const e = s.getAttribute(ce);
|
|
2193
|
+
s.removeAttribute(ce), e != null && (s.innerText = e);
|
|
2194
|
+
}, Ot = (s) => {
|
|
2195
|
+
const e = s.getAttribute(le);
|
|
2196
|
+
if (s.removeAttribute(le), e != null) {
|
|
2197
|
+
const t = Ke(e), n = Object.entries(t);
|
|
2198
|
+
n.length > 0 && (s.style.cssText = n.map(([r, i]) => `${r}: ${i}`).join("; "));
|
|
2199
|
+
}
|
|
2200
|
+
}, xt = (s) => {
|
|
2201
|
+
const e = s.getAttribute(ue);
|
|
2202
|
+
if (s.removeAttribute(ue), e != null) {
|
|
2203
|
+
const t = Ke(e);
|
|
2204
|
+
Object.entries(t).forEach(([n, r]) => {
|
|
2205
|
+
r == null ? s.removeAttribute(n) : s.setAttribute(n, r);
|
|
1842
2206
|
});
|
|
1843
2207
|
}
|
|
1844
|
-
},
|
|
2208
|
+
}, Ds = () => {
|
|
1845
2209
|
const e = [
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
2210
|
+
Ce,
|
|
2211
|
+
oe,
|
|
2212
|
+
ae,
|
|
2213
|
+
ce,
|
|
2214
|
+
le,
|
|
2215
|
+
ue
|
|
1852
2216
|
].map((n) => `[${n}]`).join(",");
|
|
1853
2217
|
document.querySelectorAll(e).forEach((n) => {
|
|
1854
2218
|
const r = n;
|
|
1855
|
-
if (r.hasAttribute(
|
|
1856
|
-
|
|
2219
|
+
if (r.hasAttribute(Ce)) {
|
|
2220
|
+
ve(r);
|
|
1857
2221
|
return;
|
|
1858
2222
|
}
|
|
1859
|
-
r.hasAttribute(
|
|
2223
|
+
r.hasAttribute(oe) && Et(r), r.hasAttribute(ce) && Ct(r), r.hasAttribute(ae) && Dt(r), r.hasAttribute(le) && Ot(r), r.hasAttribute(ue) && xt(r);
|
|
1860
2224
|
});
|
|
1861
|
-
},
|
|
1862
|
-
class
|
|
2225
|
+
}, Pt = "data-tempo-id", Q = /* @__PURE__ */ Symbol("class"), Z = /* @__PURE__ */ Symbol("style"), me = /* @__PURE__ */ Symbol("handler"), Ge = () => Math.random().toString(36).substring(2, 15), Lt = (s) => s.replace(/<[^>]*>?/g, "");
|
|
2226
|
+
class ze {
|
|
1863
2227
|
constructor(e) {
|
|
1864
2228
|
this.parent = e;
|
|
1865
2229
|
}
|
|
1866
|
-
id =
|
|
2230
|
+
id = Ge();
|
|
1867
2231
|
properties = {};
|
|
1868
2232
|
children = [];
|
|
1869
2233
|
isElement = () => !0;
|
|
1870
2234
|
isText = () => !1;
|
|
1871
|
-
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
2235
|
+
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? Lt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
|
|
1872
2236
|
removeChild = (e) => {
|
|
1873
|
-
const
|
|
1874
|
-
|
|
2237
|
+
const t = this.children.indexOf(e);
|
|
2238
|
+
t !== -1 && this.children.splice(t, 1);
|
|
1875
2239
|
};
|
|
1876
2240
|
remove = () => {
|
|
1877
2241
|
if (this.parent != null)
|
|
@@ -1880,7 +2244,7 @@ class Re {
|
|
|
1880
2244
|
throw new Error("Parent is undefined");
|
|
1881
2245
|
};
|
|
1882
2246
|
getPortals = () => {
|
|
1883
|
-
const e = this.elements().flatMap((
|
|
2247
|
+
const e = this.elements().flatMap((t) => t.isPortal() ? [t, ...t.getPortals()] : t.getPortals());
|
|
1884
2248
|
return this.isPortal() && e.unshift(this), e;
|
|
1885
2249
|
};
|
|
1886
2250
|
elements = () => this.children.filter((e) => e.isElement());
|
|
@@ -1889,78 +2253,78 @@ class Re {
|
|
|
1889
2253
|
getInnerText = () => this.properties.innerText ?? "";
|
|
1890
2254
|
hasInnerText = () => this.properties.innerText != null;
|
|
1891
2255
|
hasChildren = () => this.children.length > 0;
|
|
1892
|
-
hasClasses = () => this.properties[
|
|
1893
|
-
hasStyles = () => this.properties[
|
|
2256
|
+
hasClasses = () => this.properties[Q] != null;
|
|
2257
|
+
hasStyles = () => this.properties[Z] != null;
|
|
1894
2258
|
hasAttributes = () => Object.keys(this.properties).length > 0;
|
|
1895
|
-
hasHandlers = () => this.properties[
|
|
2259
|
+
hasHandlers = () => this.properties[me] != null;
|
|
1896
2260
|
hasRenderableProperties = () => this.hasClasses() || this.hasAttributes() || this.hasStyles();
|
|
1897
2261
|
getById = (e) => {
|
|
1898
2262
|
if (this.properties.id === e)
|
|
1899
2263
|
return this;
|
|
1900
|
-
for (const
|
|
1901
|
-
const n =
|
|
2264
|
+
for (const t of this.elements()) {
|
|
2265
|
+
const n = t.getById(e);
|
|
1902
2266
|
if (n != null)
|
|
1903
2267
|
return n;
|
|
1904
2268
|
}
|
|
1905
2269
|
};
|
|
1906
|
-
trigger = (e,
|
|
1907
|
-
((this.properties[
|
|
2270
|
+
trigger = (e, t) => {
|
|
2271
|
+
((this.properties[me] ?? {})[e] ?? []).forEach((r) => r(t));
|
|
1908
2272
|
};
|
|
1909
2273
|
click = () => {
|
|
1910
2274
|
this.trigger("click", {});
|
|
1911
2275
|
};
|
|
1912
|
-
on = (e,
|
|
1913
|
-
const
|
|
1914
|
-
l(),
|
|
1915
|
-
} : (
|
|
1916
|
-
|
|
2276
|
+
on = (e, t, n, r) => {
|
|
2277
|
+
const i = this.properties[me] ??= {}, o = r?.once ? (f) => {
|
|
2278
|
+
l(), t(f, n);
|
|
2279
|
+
} : (f) => t(f, n);
|
|
2280
|
+
i[e] = [...i[e] ?? [], o];
|
|
1917
2281
|
const l = () => {
|
|
1918
|
-
const
|
|
1919
|
-
|
|
2282
|
+
const f = i[e] ?? [], d = f.indexOf(o);
|
|
2283
|
+
d !== -1 && (f.splice(d, 1), f.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[me]) : i[e] = f, r?.signal != null && r.signal.removeEventListener("abort", l));
|
|
1920
2284
|
};
|
|
1921
2285
|
return r?.signal != null && r.signal.addEventListener("abort", l), l;
|
|
1922
2286
|
};
|
|
1923
2287
|
addClasses = (e) => {
|
|
1924
2288
|
if (e.length === 0)
|
|
1925
2289
|
return;
|
|
1926
|
-
const
|
|
2290
|
+
const t = this.properties[Q] ??= [], n = new Set(t);
|
|
1927
2291
|
for (const r of e)
|
|
1928
|
-
n.has(r) || (
|
|
2292
|
+
n.has(r) || (t.push(r), n.add(r));
|
|
1929
2293
|
};
|
|
1930
2294
|
removeClasses = (e) => {
|
|
1931
2295
|
if (e.length === 0)
|
|
1932
2296
|
return;
|
|
1933
|
-
const
|
|
2297
|
+
const t = this.properties[Q] ??= [], n = new Set(e);
|
|
1934
2298
|
let r = 0;
|
|
1935
|
-
for (let
|
|
1936
|
-
n.has(
|
|
1937
|
-
|
|
2299
|
+
for (let i = 0; i < t.length; i++)
|
|
2300
|
+
n.has(t[i]) || (t[r] = t[i], r++);
|
|
2301
|
+
t.length = r, t.length === 0 && delete this.properties[Q];
|
|
1938
2302
|
};
|
|
1939
|
-
getClasses = () => this.properties[
|
|
2303
|
+
getClasses = () => this.properties[Q] ?? [];
|
|
1940
2304
|
getAttributes = () => Object.entries(this.properties).filter(
|
|
1941
2305
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
1942
2306
|
);
|
|
1943
2307
|
getVisibleAttributes = () => Reflect.ownKeys(this.properties).flatMap(
|
|
1944
|
-
(e) => e ===
|
|
2308
|
+
(e) => e === Q ? [["class", this.getClasses()]] : e === Z ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1945
2309
|
);
|
|
1946
|
-
setStyle = (e,
|
|
1947
|
-
const n = this.properties[
|
|
1948
|
-
n[e] =
|
|
2310
|
+
setStyle = (e, t) => {
|
|
2311
|
+
const n = this.properties[Z] ??= {};
|
|
2312
|
+
n[e] = t, t === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[Z]);
|
|
1949
2313
|
};
|
|
1950
|
-
getStyle = (e) => this.properties[
|
|
1951
|
-
getStyles = () => this.properties[
|
|
2314
|
+
getStyle = (e) => this.properties[Z]?.[e] ?? "";
|
|
2315
|
+
getStyles = () => this.properties[Z] ?? {};
|
|
1952
2316
|
makeAccessors = (e) => {
|
|
1953
|
-
const
|
|
2317
|
+
const t = this.properties;
|
|
1954
2318
|
return {
|
|
1955
|
-
get: () =>
|
|
1956
|
-
set: (n) =>
|
|
2319
|
+
get: () => t[e],
|
|
2320
|
+
set: (n) => t[e] = n
|
|
1957
2321
|
};
|
|
1958
2322
|
};
|
|
1959
2323
|
}
|
|
1960
|
-
const
|
|
1961
|
-
class
|
|
1962
|
-
constructor(e,
|
|
1963
|
-
super(n), this.tagName = e, this.namespace =
|
|
2324
|
+
const Mt = (s) => s.replace(/"/g, """), kt = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2325
|
+
class It extends ze {
|
|
2326
|
+
constructor(e, t, n) {
|
|
2327
|
+
super(n), this.tagName = e, this.namespace = t;
|
|
1964
2328
|
}
|
|
1965
2329
|
isPortal = () => !1;
|
|
1966
2330
|
/**
|
|
@@ -1968,13 +2332,13 @@ class Dt extends Re {
|
|
|
1968
2332
|
* Returns an object containing the attributes string and any innerHTML value.
|
|
1969
2333
|
*/
|
|
1970
2334
|
buildAttributesString = (e) => {
|
|
1971
|
-
let
|
|
1972
|
-
const n = this.namespace ? ` xmlns="${this.namespace}"` : "", r = this.getVisibleAttributes().map(([
|
|
1973
|
-
return { attrs: `${n}${r}${
|
|
2335
|
+
let t = null;
|
|
2336
|
+
const n = this.namespace ? ` xmlns="${this.namespace}"` : "", r = this.getVisibleAttributes().map(([o, l]) => o === "class" ? ` class="${l.join(" ")}"` : o === "style" ? typeof l == "string" ? ` style="${l}"` : ` style="${Object.entries(l).map(([f, d]) => `${f}: ${d};`).join(" ")}"` : Ht.has(o) ? ` ${o}` : o === "innerHTML" ? (t = l, "") : o === "innerText" ? (t = kt(l), "") : ` ${o}="${Mt(l)}"`).join(""), i = e ? ` ${Ce} ${Pt}="${this.id}"` : "";
|
|
2337
|
+
return { attrs: `${n}${r}${i}`, innerHTML: t };
|
|
1974
2338
|
};
|
|
1975
2339
|
toHTML = (e = !1) => {
|
|
1976
|
-
const
|
|
1977
|
-
return
|
|
2340
|
+
const t = this.children.map((i) => i.toHTML()).join(""), { attrs: n, innerHTML: r } = this.buildAttributesString(e);
|
|
2341
|
+
return Me.has(this.tagName) && t === "" ? `<${this.tagName}${n} />` : `<${this.tagName}${n}>${r ?? t}</${this.tagName}>`;
|
|
1978
2342
|
};
|
|
1979
2343
|
/**
|
|
1980
2344
|
* Generates HTML output as an async stream of string chunks.
|
|
@@ -1984,22 +2348,22 @@ class Dt extends Re {
|
|
|
1984
2348
|
* @yields String chunks of HTML content.
|
|
1985
2349
|
*/
|
|
1986
2350
|
async *toHTMLStream(e) {
|
|
1987
|
-
const
|
|
1988
|
-
if (
|
|
2351
|
+
const t = e?.generatePlaceholders ?? !1, { attrs: n, innerHTML: r } = this.buildAttributesString(t);
|
|
2352
|
+
if (Me.has(this.tagName) && this.children.length === 0) {
|
|
1989
2353
|
yield `<${this.tagName}${n} />`;
|
|
1990
2354
|
return;
|
|
1991
2355
|
}
|
|
1992
2356
|
if (yield `<${this.tagName}${n}>`, r !== null)
|
|
1993
2357
|
yield r;
|
|
1994
2358
|
else
|
|
1995
|
-
for (const
|
|
1996
|
-
yield*
|
|
2359
|
+
for (const i of this.children)
|
|
2360
|
+
yield* i.toHTMLStream(e);
|
|
1997
2361
|
yield `</${this.tagName}>`;
|
|
1998
2362
|
}
|
|
1999
2363
|
}
|
|
2000
|
-
class
|
|
2001
|
-
constructor(e,
|
|
2002
|
-
super(
|
|
2364
|
+
class Ye extends ze {
|
|
2365
|
+
constructor(e, t) {
|
|
2366
|
+
super(t), this.selector = e;
|
|
2003
2367
|
}
|
|
2004
2368
|
isPortal = () => !0;
|
|
2005
2369
|
toHTML = () => "";
|
|
@@ -2010,7 +2374,7 @@ class je extends Re {
|
|
|
2010
2374
|
// eslint-disable-next-line require-yield
|
|
2011
2375
|
async *toHTMLStream(e) {
|
|
2012
2376
|
}
|
|
2013
|
-
contentToHTML = (e = !1) => this.children.map((
|
|
2377
|
+
contentToHTML = (e = !1) => this.children.map((t) => t.toHTML(e)).join("");
|
|
2014
2378
|
/**
|
|
2015
2379
|
* Streams the portal's content HTML.
|
|
2016
2380
|
* Unlike toHTMLStream, this yields the actual content for rendering at the target location.
|
|
@@ -2019,15 +2383,15 @@ class je extends Re {
|
|
|
2019
2383
|
* @yields String chunks of the portal's content.
|
|
2020
2384
|
*/
|
|
2021
2385
|
async *contentToHTMLStream(e) {
|
|
2022
|
-
for (const
|
|
2023
|
-
yield*
|
|
2386
|
+
for (const t of this.children)
|
|
2387
|
+
yield* t.toHTMLStream(e);
|
|
2024
2388
|
}
|
|
2025
2389
|
}
|
|
2026
|
-
class
|
|
2390
|
+
class $t {
|
|
2027
2391
|
constructor(e) {
|
|
2028
2392
|
this.text = e;
|
|
2029
2393
|
}
|
|
2030
|
-
id =
|
|
2394
|
+
id = Ge();
|
|
2031
2395
|
isElement = () => !1;
|
|
2032
2396
|
isText = () => !0;
|
|
2033
2397
|
getText = () => this.text;
|
|
@@ -2042,20 +2406,20 @@ class Lt {
|
|
|
2042
2406
|
yield this.text;
|
|
2043
2407
|
}
|
|
2044
2408
|
}
|
|
2045
|
-
class
|
|
2046
|
-
constructor(e,
|
|
2047
|
-
this.element = e, this.reference =
|
|
2409
|
+
class se {
|
|
2410
|
+
constructor(e, t, n, r) {
|
|
2411
|
+
this.element = e, this.reference = t, this.container = n, this.providers = r;
|
|
2048
2412
|
}
|
|
2049
2413
|
appendOrInsert = (e) => {
|
|
2050
2414
|
if (this.reference != null) {
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2415
|
+
const t = this.element.children.indexOf(this.reference);
|
|
2416
|
+
t >= 0 && this.element.children.splice(t, 0, e);
|
|
2053
2417
|
} else
|
|
2054
2418
|
this.element.children.push(e);
|
|
2055
2419
|
};
|
|
2056
|
-
makeChildElement = (e,
|
|
2057
|
-
const n = new
|
|
2058
|
-
return this.appendOrInsert(n), new
|
|
2420
|
+
makeChildElement = (e, t) => {
|
|
2421
|
+
const n = new It(e, t, this.element);
|
|
2422
|
+
return this.appendOrInsert(n), new se(
|
|
2059
2423
|
n,
|
|
2060
2424
|
void 0,
|
|
2061
2425
|
this.container,
|
|
@@ -2063,10 +2427,10 @@ class V {
|
|
|
2063
2427
|
);
|
|
2064
2428
|
};
|
|
2065
2429
|
makeChildText = (e) => {
|
|
2066
|
-
const
|
|
2067
|
-
return this.appendOrInsert(
|
|
2430
|
+
const t = new $t(e);
|
|
2431
|
+
return this.appendOrInsert(t), new se(
|
|
2068
2432
|
this.element,
|
|
2069
|
-
|
|
2433
|
+
t,
|
|
2070
2434
|
this.container,
|
|
2071
2435
|
this.providers
|
|
2072
2436
|
);
|
|
@@ -2077,9 +2441,9 @@ class V {
|
|
|
2077
2441
|
getText = () => this.reference?.getText() ?? this.element.getText();
|
|
2078
2442
|
makeRef = () => this.makeChildText("");
|
|
2079
2443
|
makePortal = (e) => {
|
|
2080
|
-
const
|
|
2081
|
-
return this.appendOrInsert(
|
|
2082
|
-
|
|
2444
|
+
const t = new Ye(e, this.element);
|
|
2445
|
+
return this.appendOrInsert(t), new se(
|
|
2446
|
+
t,
|
|
2083
2447
|
void 0,
|
|
2084
2448
|
this.container,
|
|
2085
2449
|
this.providers
|
|
@@ -2092,20 +2456,20 @@ class V {
|
|
|
2092
2456
|
* @param value - The provider to set for the given mark.
|
|
2093
2457
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
2094
2458
|
*/
|
|
2095
|
-
setProvider = (e,
|
|
2459
|
+
setProvider = (e, t, n) => new se(this.element, this.reference, this.container, {
|
|
2096
2460
|
...this.providers,
|
|
2097
|
-
[e]: [
|
|
2461
|
+
[e]: [t, n]
|
|
2098
2462
|
});
|
|
2099
2463
|
getProvider = (e) => {
|
|
2100
2464
|
if (this.providers[e] === void 0)
|
|
2101
|
-
throw new
|
|
2102
|
-
const [
|
|
2103
|
-
return { value:
|
|
2465
|
+
throw new Je(e);
|
|
2466
|
+
const [t, n] = this.providers[e];
|
|
2467
|
+
return { value: t, onUse: n };
|
|
2104
2468
|
};
|
|
2105
2469
|
clear = (e) => {
|
|
2106
2470
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
2107
2471
|
};
|
|
2108
|
-
on = (e,
|
|
2472
|
+
on = (e, t) => this.element.on(e, t, this);
|
|
2109
2473
|
addClasses = (e) => this.element.addClasses(e);
|
|
2110
2474
|
removeClasses = (e) => this.element.removeClasses(e);
|
|
2111
2475
|
getClasses = () => this.element.getClasses();
|
|
@@ -2113,64 +2477,84 @@ class V {
|
|
|
2113
2477
|
isBrowser = () => !1;
|
|
2114
2478
|
isHeadlessDOM = () => !0;
|
|
2115
2479
|
isHeadless = () => !0;
|
|
2116
|
-
setStyle = (e,
|
|
2480
|
+
setStyle = (e, t) => this.element.setStyle(e, t);
|
|
2117
2481
|
getStyle = (e) => this.element.getStyle(e);
|
|
2118
2482
|
makeAccessors = (e) => this.element.makeAccessors(e);
|
|
2119
2483
|
}
|
|
2120
|
-
const
|
|
2484
|
+
const Ht = /* @__PURE__ */ new Set([
|
|
2121
2485
|
"checked",
|
|
2122
2486
|
"disabled",
|
|
2123
2487
|
"multiple",
|
|
2124
2488
|
"readonly",
|
|
2125
2489
|
"required",
|
|
2126
2490
|
"selected"
|
|
2127
|
-
]),
|
|
2491
|
+
]), Me = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Cs = () => (
|
|
2128
2492
|
/* c8 ignore next */
|
|
2129
2493
|
typeof window < "u" ? window : void 0
|
|
2130
|
-
),
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
s
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2494
|
+
), Nt = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), L = (s) => nt(Nt, s), Rt = At({
|
|
2495
|
+
create: L
|
|
2496
|
+
}), {
|
|
2497
|
+
Empty: jt,
|
|
2498
|
+
Fragment: J,
|
|
2499
|
+
When: Os,
|
|
2500
|
+
Unless: xs,
|
|
2501
|
+
ForEach: Ps,
|
|
2502
|
+
Repeat: Ls,
|
|
2503
|
+
OneOf: Ms,
|
|
2504
|
+
OneOfField: ks,
|
|
2505
|
+
OneOfKind: Is,
|
|
2506
|
+
OneOfType: $s,
|
|
2507
|
+
OneOfValue: Hs,
|
|
2508
|
+
OneOfTuple: Ns,
|
|
2509
|
+
MapSignal: Rs,
|
|
2510
|
+
Ensure: js,
|
|
2511
|
+
EnsureAll: Vs,
|
|
2512
|
+
NotEmpty: Bs,
|
|
2513
|
+
Task: qs,
|
|
2514
|
+
Async: Fs,
|
|
2515
|
+
OnDispose: Xe,
|
|
2516
|
+
Conjunction: Ws,
|
|
2517
|
+
WithScope: Us,
|
|
2518
|
+
WithProvider: Js,
|
|
2519
|
+
Provide: Ks,
|
|
2520
|
+
Use: Gs,
|
|
2521
|
+
UseMany: zs,
|
|
2522
|
+
handleValueOrSignal: Ys,
|
|
2523
|
+
createReactiveRenderable: Xs,
|
|
2524
|
+
renderableOfTNode: W
|
|
2525
|
+
} = Rt, Vt = (s) => L((e) => (e.addClasses(s), (t) => {
|
|
2526
|
+
t && e.removeClasses(s);
|
|
2527
|
+
})), Bt = (s) => L((e) => {
|
|
2528
|
+
let t = /* @__PURE__ */ new Set();
|
|
2529
|
+
const n = s.on(
|
|
2146
2530
|
(r) => {
|
|
2147
|
-
const
|
|
2148
|
-
for (const
|
|
2149
|
-
|
|
2150
|
-
const
|
|
2151
|
-
for (const
|
|
2152
|
-
|
|
2153
|
-
l.length > 0 && e.removeClasses(l),
|
|
2531
|
+
const i = (r ?? "").split(" ").filter((d) => d.length > 0), o = new Set(i), l = [];
|
|
2532
|
+
for (const d of t)
|
|
2533
|
+
o.has(d) || l.push(d);
|
|
2534
|
+
const f = [];
|
|
2535
|
+
for (const d of o)
|
|
2536
|
+
t.has(d) || f.push(d);
|
|
2537
|
+
l.length > 0 && e.removeClasses(l), f.length > 0 && e.addClasses(f), t = o;
|
|
2154
2538
|
},
|
|
2155
2539
|
{ noAutoDispose: !0 }
|
|
2156
2540
|
);
|
|
2157
2541
|
return (r) => {
|
|
2158
|
-
n(), r && e.removeClasses(Array.from(
|
|
2542
|
+
n(), r && e.removeClasses(Array.from(t)), t.clear();
|
|
2159
2543
|
};
|
|
2160
|
-
}),
|
|
2161
|
-
const { get: n, set: r } =
|
|
2162
|
-
return r(e), (
|
|
2163
|
-
|
|
2544
|
+
}), qt = (s, e) => L((t) => {
|
|
2545
|
+
const { get: n, set: r } = t.makeAccessors(s), i = n();
|
|
2546
|
+
return r(e), (o) => {
|
|
2547
|
+
o && r(i);
|
|
2164
2548
|
};
|
|
2165
|
-
}),
|
|
2166
|
-
const { get: n, set: r } =
|
|
2549
|
+
}), Ft = (s, e) => L((t) => {
|
|
2550
|
+
const { get: n, set: r } = t.makeAccessors(s), i = n(), o = e.on(r, { noAutoDispose: !0 });
|
|
2167
2551
|
return (l) => {
|
|
2168
|
-
|
|
2552
|
+
o(), l && r(i);
|
|
2169
2553
|
};
|
|
2170
|
-
}),
|
|
2554
|
+
}), de = (s, e) => _.is(e) ? Ft(s, e) : qt(s, e), Wt = (s, e) => s === "class" ? _.is(e) ? Bt(e) : Vt(
|
|
2171
2555
|
/* c8 ignore next */
|
|
2172
|
-
(e ?? "").split(" ").filter((
|
|
2173
|
-
) :
|
|
2556
|
+
(e ?? "").split(" ").filter((t) => t.length > 0)
|
|
2557
|
+
) : de(s, e), N = new Proxy(
|
|
2174
2558
|
{},
|
|
2175
2559
|
{
|
|
2176
2560
|
/**
|
|
@@ -2184,9 +2568,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2184
2568
|
* @returns The renderable component for the specified attribute.
|
|
2185
2569
|
*
|
|
2186
2570
|
*/
|
|
2187
|
-
get: (
|
|
2571
|
+
get: (s, e) => (t) => Wt(e, t)
|
|
2188
2572
|
}
|
|
2189
|
-
),
|
|
2573
|
+
), Ut = (s, e) => de(`data-${s}`, e), Qs = new Proxy(
|
|
2190
2574
|
{},
|
|
2191
2575
|
{
|
|
2192
2576
|
/**
|
|
@@ -2197,9 +2581,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2197
2581
|
* @returns The renderable component for the specified attribute.
|
|
2198
2582
|
*
|
|
2199
2583
|
*/
|
|
2200
|
-
get: (
|
|
2584
|
+
get: (s, e) => (t) => Ut(e, t)
|
|
2201
2585
|
}
|
|
2202
|
-
),
|
|
2586
|
+
), Jt = (s, e) => de(`aria-${s}`, e), Zs = new Proxy(
|
|
2203
2587
|
{},
|
|
2204
2588
|
{
|
|
2205
2589
|
/**
|
|
@@ -2210,9 +2594,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2210
2594
|
* @returns The renderable component for the specified attribute.
|
|
2211
2595
|
*
|
|
2212
2596
|
*/
|
|
2213
|
-
get: (
|
|
2597
|
+
get: (s, e) => (t) => Jt(e, t)
|
|
2214
2598
|
}
|
|
2215
|
-
),
|
|
2599
|
+
), Kt = (s, e) => de(s, e), en = new Proxy(
|
|
2216
2600
|
{},
|
|
2217
2601
|
{
|
|
2218
2602
|
/**
|
|
@@ -2223,9 +2607,9 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2223
2607
|
* @returns The renderable component for the specified attribute.
|
|
2224
2608
|
*
|
|
2225
2609
|
*/
|
|
2226
|
-
get: (
|
|
2610
|
+
get: (s, e) => (t) => Kt(e, t)
|
|
2227
2611
|
}
|
|
2228
|
-
),
|
|
2612
|
+
), Gt = (s, e) => de(s, e), tn = new Proxy(
|
|
2229
2613
|
{},
|
|
2230
2614
|
{
|
|
2231
2615
|
/**
|
|
@@ -2235,97 +2619,16 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2235
2619
|
* @returns The renderable component for the specified attribute.
|
|
2236
2620
|
*
|
|
2237
2621
|
*/
|
|
2238
|
-
get: (
|
|
2622
|
+
get: (s, e) => (t) => Gt(e, t)
|
|
2239
2623
|
}
|
|
2240
|
-
),
|
|
2241
|
-
if (t == null)
|
|
2242
|
-
return L;
|
|
2243
|
-
if (Array.isArray(t))
|
|
2244
|
-
return E(...t.map(g));
|
|
2245
|
-
if (typeof t == "string")
|
|
2246
|
-
return Ve(t);
|
|
2247
|
-
if (y.is(t))
|
|
2248
|
-
return Be(t);
|
|
2249
|
-
if (typeof t == "object" && "render" in t && "type" in t)
|
|
2250
|
-
return t;
|
|
2251
|
-
throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
|
|
2252
|
-
}, qe = (t, ...e) => m((s) => {
|
|
2253
|
-
const n = s.makeChildElement(t, void 0), r = e.map((o) => g(o).render(n));
|
|
2254
|
-
return (o) => {
|
|
2255
|
-
r.forEach((i) => i(!1)), n.clear(o);
|
|
2256
|
-
};
|
|
2257
|
-
}), ie = (t, e, ...s) => m((n) => {
|
|
2258
|
-
const r = n.makeChildElement(t, e), o = s.map((i) => g(i).render(r));
|
|
2259
|
-
return (i) => {
|
|
2260
|
-
o.forEach((l) => l(!1)), r.clear(i);
|
|
2261
|
-
};
|
|
2262
|
-
}), Vt = new Proxy(
|
|
2263
|
-
{},
|
|
2264
|
-
{
|
|
2265
|
-
/**
|
|
2266
|
-
* Creates a renderable that represents an HTML element.
|
|
2267
|
-
* @param tagName - The HTML tag name.
|
|
2268
|
-
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
2269
|
-
*/
|
|
2270
|
-
get: (t, e) => (...s) => qe(e, s.flatMap(g))
|
|
2271
|
-
}
|
|
2272
|
-
), _s = new Proxy(
|
|
2273
|
-
{},
|
|
2274
|
-
{
|
|
2275
|
-
/**
|
|
2276
|
-
* Creates a renderable that represents an HTMLInput element.
|
|
2277
|
-
* @param type - The input type name.
|
|
2278
|
-
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
2279
|
-
*/
|
|
2280
|
-
get: (t, e) => (...s) => qe("input", T.type(e), ...s)
|
|
2281
|
-
}
|
|
2282
|
-
), Fe = "http://www.w3.org/2000/svg", Es = (t, ...e) => ie(t, Fe, ...e), Cs = new Proxy(
|
|
2283
|
-
{},
|
|
2284
|
-
{
|
|
2285
|
-
/**
|
|
2286
|
-
* Creates a renderable that represents an SVG element.
|
|
2287
|
-
* @param tagName - The SVG tag name.
|
|
2288
|
-
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
2289
|
-
*/
|
|
2290
|
-
get: (t, e) => (...s) => ie(e, Fe, s.flatMap(g))
|
|
2291
|
-
}
|
|
2292
|
-
), We = "http://www.w3.org/1998/Math/MathML", Ds = (t, ...e) => ie(t, We, ...e), Ls = new Proxy(
|
|
2293
|
-
{},
|
|
2294
|
-
{
|
|
2295
|
-
/**
|
|
2296
|
-
* Creates a renderable that represents an Math element.
|
|
2297
|
-
* @param tagName - The Math tag name.
|
|
2298
|
-
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
2299
|
-
*/
|
|
2300
|
-
get: (t, e) => (...s) => ie(e, We, s.flatMap(g))
|
|
2301
|
-
}
|
|
2302
|
-
), Ue = (t, e) => {
|
|
2303
|
-
if (typeof e == "function")
|
|
2304
|
-
return Ue(t, { then: e });
|
|
2305
|
-
const s = e.pending != null ? g(e.pending()) : L, n = e.then, r = e.error != null ? (o) => g(e.error(o)) : () => L;
|
|
2306
|
-
return m((o) => {
|
|
2307
|
-
let i = !0;
|
|
2308
|
-
const l = t(), c = o.makeRef();
|
|
2309
|
-
let a = g(s).render(c);
|
|
2310
|
-
return l.then(
|
|
2311
|
-
(u) => {
|
|
2312
|
-
i && (a(!0), a = g(n(u)).render(c));
|
|
2313
|
-
},
|
|
2314
|
-
(u) => {
|
|
2315
|
-
i && (a(!0), a = g(r(u)).render(c));
|
|
2316
|
-
}
|
|
2317
|
-
), (u) => {
|
|
2318
|
-
i = !1, a(u), c.clear(u);
|
|
2319
|
-
};
|
|
2320
|
-
});
|
|
2321
|
-
}, xs = (t, e) => Ue(() => t, e), Ge = (t, e, s) => m((n) => n.on(t, e, s)), Bt = (t) => Ge("click", (e, s) => {
|
|
2624
|
+
), Qe = (s, e, t) => L((n) => n.on(s, e, t)), zt = (s) => Qe("click", (e, t) => {
|
|
2322
2625
|
e.preventDefault();
|
|
2323
2626
|
const n = e.target;
|
|
2324
2627
|
setTimeout(() => {
|
|
2325
2628
|
const r = n.ownerDocument != null ? n?.checked : void 0;
|
|
2326
|
-
r != null &&
|
|
2629
|
+
r != null && s(!r, t);
|
|
2327
2630
|
}, 0);
|
|
2328
|
-
}),
|
|
2631
|
+
}), fe = new Proxy(
|
|
2329
2632
|
{},
|
|
2330
2633
|
{
|
|
2331
2634
|
/**
|
|
@@ -2333,416 +2636,227 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
2333
2636
|
* @param fn - The function to call when the event is triggered.
|
|
2334
2637
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
2335
2638
|
*/
|
|
2336
|
-
get: (
|
|
2337
|
-
}
|
|
2338
|
-
),
|
|
2339
|
-
e?.preventDefault === !0 &&
|
|
2340
|
-
},
|
|
2341
|
-
const n =
|
|
2342
|
-
|
|
2343
|
-
}, e),
|
|
2344
|
-
(
|
|
2639
|
+
get: (s, e) => (t) => Qe(e, t)
|
|
2640
|
+
}
|
|
2641
|
+
), Yt = (s, e) => (t) => {
|
|
2642
|
+
e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(), s(t);
|
|
2643
|
+
}, Y = (s, e) => Yt((t) => {
|
|
2644
|
+
const n = t.target;
|
|
2645
|
+
s(n, t);
|
|
2646
|
+
}, e), Xt = (s, e) => Y(
|
|
2647
|
+
(t, n) => s(t.value, n),
|
|
2345
2648
|
e
|
|
2346
|
-
),
|
|
2347
|
-
(
|
|
2649
|
+
), Qt = (s, e) => Y(
|
|
2650
|
+
(t, n) => s(t.valueAsNumber, n),
|
|
2348
2651
|
e
|
|
2349
|
-
),
|
|
2350
|
-
if (
|
|
2652
|
+
), Zt = (s, e) => Y((t, n) => {
|
|
2653
|
+
if (t.value === "")
|
|
2351
2654
|
return;
|
|
2352
|
-
const r =
|
|
2655
|
+
const r = t.value.split("-"), i = new Date(
|
|
2353
2656
|
Number(r[0]),
|
|
2354
2657
|
Number(r[1]) - 1,
|
|
2355
2658
|
Number(r[2].substring(0, 2))
|
|
2356
2659
|
);
|
|
2357
|
-
|
|
2358
|
-
}, e),
|
|
2359
|
-
if (
|
|
2360
|
-
|
|
2660
|
+
s(i, n);
|
|
2661
|
+
}, e), sn = (s, e) => Y((t, n) => {
|
|
2662
|
+
if (t.value === "") {
|
|
2663
|
+
s(null, n);
|
|
2361
2664
|
return;
|
|
2362
2665
|
}
|
|
2363
|
-
const r =
|
|
2666
|
+
const r = t.value.split("-"), i = new Date(
|
|
2364
2667
|
Number(r[0]),
|
|
2365
2668
|
Number(r[1]) - 1,
|
|
2366
2669
|
Number(r[2].substring(0, 2))
|
|
2367
2670
|
);
|
|
2368
|
-
|
|
2369
|
-
}, e),
|
|
2370
|
-
if (
|
|
2671
|
+
s(i, n);
|
|
2672
|
+
}, e), es = (s, e) => Y((t, n) => {
|
|
2673
|
+
if (t.value === "")
|
|
2371
2674
|
return;
|
|
2372
|
-
const r =
|
|
2373
|
-
Number(
|
|
2374
|
-
Number(
|
|
2375
|
-
Number(
|
|
2675
|
+
const r = t.value.split("T"), i = r[0].split("-"), o = new Date(
|
|
2676
|
+
Number(i[0]),
|
|
2677
|
+
Number(i[1]) - 1,
|
|
2678
|
+
Number(i[2])
|
|
2376
2679
|
), l = r[1].split(":");
|
|
2377
|
-
|
|
2378
|
-
}, e),
|
|
2379
|
-
if (
|
|
2380
|
-
|
|
2680
|
+
o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), s(o, n);
|
|
2681
|
+
}, e), nn = (s, e) => Y((t, n) => {
|
|
2682
|
+
if (t.value === "") {
|
|
2683
|
+
s(null, n);
|
|
2381
2684
|
return;
|
|
2382
2685
|
}
|
|
2383
|
-
const r =
|
|
2686
|
+
const r = t.value.split("T");
|
|
2384
2687
|
if (r.length !== 2) {
|
|
2385
|
-
|
|
2688
|
+
s(null, n);
|
|
2386
2689
|
return;
|
|
2387
2690
|
}
|
|
2388
|
-
const
|
|
2389
|
-
Number(
|
|
2390
|
-
Number(
|
|
2391
|
-
Number(
|
|
2691
|
+
const i = r[0].split("-"), o = new Date(
|
|
2692
|
+
Number(i[0]),
|
|
2693
|
+
Number(i[1]) - 1,
|
|
2694
|
+
Number(i[2])
|
|
2392
2695
|
), l = r[1].split(":");
|
|
2393
|
-
|
|
2394
|
-
}, e),
|
|
2395
|
-
t
|
|
2396
|
-
}, e),
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
(
|
|
2402
|
-
o?.dispose(), r(!0), o = new J(), r = O(
|
|
2403
|
-
o,
|
|
2404
|
-
() => g(s(l)).render(n)
|
|
2405
|
-
);
|
|
2406
|
-
},
|
|
2407
|
-
{ noAutoDispose: !0 }
|
|
2408
|
-
);
|
|
2409
|
-
return (l) => {
|
|
2410
|
-
o?.dispose(), r(l), i(), n.clear(l);
|
|
2411
|
-
};
|
|
2412
|
-
}, le = (t, e) => {
|
|
2413
|
-
function s(r) {
|
|
2414
|
-
return m((o) => {
|
|
2415
|
-
const i = o.makeRef();
|
|
2416
|
-
let l, c;
|
|
2417
|
-
const a = r.map((f) => Object.keys(f)[0]);
|
|
2418
|
-
let u;
|
|
2419
|
-
const d = a.on((f) => {
|
|
2420
|
-
if (f !== u) {
|
|
2421
|
-
u = f, c?.dispose(), l?.(!0), c = r.map((p) => p[f]);
|
|
2422
|
-
const h = e[f](c);
|
|
2423
|
-
l = g(h).render(i);
|
|
2424
|
-
}
|
|
2425
|
-
});
|
|
2426
|
-
return (f) => {
|
|
2427
|
-
c?.dispose(), d(), i.clear(f), l?.(f);
|
|
2428
|
-
};
|
|
2429
|
-
});
|
|
2430
|
-
}
|
|
2431
|
-
function n(r) {
|
|
2432
|
-
const o = Object.keys(r)[0];
|
|
2433
|
-
return g(e[o](re(r[o])));
|
|
2434
|
-
}
|
|
2435
|
-
return ge(t, s, n);
|
|
2436
|
-
}, Je = (t, e, s) => le(
|
|
2437
|
-
w.map(t, (n) => ({ [n[e]]: n })),
|
|
2438
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2439
|
-
s
|
|
2440
|
-
), Rs = (t, e) => Je(t, "kind", e), js = (t, e) => {
|
|
2441
|
-
const s = w.map(t, ([n, r]) => ({
|
|
2442
|
-
[n]: r
|
|
2443
|
-
}));
|
|
2444
|
-
return le(s, e);
|
|
2445
|
-
}, Vs = (t, e) => Je(t, "type", e), zt = (t, e) => le(
|
|
2446
|
-
w.map(t, (s) => ({ [s]: !0 })),
|
|
2447
|
-
e
|
|
2448
|
-
), Bs = (t, e = {}) => (s) => {
|
|
2449
|
-
const n = e?.firstSeparator ?? t, r = e?.lastSeparator ?? t;
|
|
2450
|
-
return zt(
|
|
2451
|
-
s.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
2452
|
-
{
|
|
2453
|
-
first: n,
|
|
2454
|
-
last: r,
|
|
2455
|
-
other: t
|
|
2456
|
-
}
|
|
2457
|
-
);
|
|
2458
|
-
}, qs = (t) => m((e) => (e.appendOrInsert(t), (s) => {
|
|
2459
|
-
s && te(t);
|
|
2460
|
-
})), Fs = (t, e, s) => {
|
|
2461
|
-
function n(o) {
|
|
2462
|
-
return m((i) => {
|
|
2463
|
-
const l = i.makeRef();
|
|
2464
|
-
let c = () => {
|
|
2465
|
-
}, a = !1, u = null;
|
|
2466
|
-
const d = o.on((f) => {
|
|
2467
|
-
f == null ? (c(!0), c = g(s?.()).render(l), a = !1, u?.dispose(), u = null) : a ? u.set(f) : (u = D(f), c(!0), c = g(
|
|
2468
|
-
e(u)
|
|
2469
|
-
).render(l), a = !0);
|
|
2470
|
-
});
|
|
2471
|
-
return (f) => {
|
|
2472
|
-
u?.dispose(), d(), c?.(f), l.clear(f);
|
|
2473
|
-
};
|
|
2474
|
-
});
|
|
2475
|
-
}
|
|
2476
|
-
function r(o) {
|
|
2477
|
-
if (o == null) {
|
|
2478
|
-
const i = s?.();
|
|
2479
|
-
return i != null ? g(i) : L;
|
|
2480
|
-
}
|
|
2481
|
-
return g(e(re(o)));
|
|
2482
|
-
}
|
|
2483
|
-
return ge(
|
|
2484
|
-
t,
|
|
2485
|
-
n,
|
|
2486
|
-
r
|
|
2487
|
-
);
|
|
2488
|
-
}, Ws = (...t) => (e, s) => m((n) => {
|
|
2489
|
-
const r = n.makeRef();
|
|
2490
|
-
if (t.some(
|
|
2491
|
-
(h) => !y.is(h) && h == null
|
|
2492
|
-
))
|
|
2493
|
-
return (s != null ? g(s?.()) : L).render(r);
|
|
2494
|
-
const i = t.map(() => null), l = t.map(
|
|
2495
|
-
(h) => y.is(h) ? h.value != null : h != null
|
|
2496
|
-
);
|
|
2497
|
-
let c = null;
|
|
2498
|
-
const a = D(l.every((h) => h)), u = (h, p) => {
|
|
2499
|
-
if (h.value != null) {
|
|
2500
|
-
if (i[p] == null) {
|
|
2501
|
-
const b = D(h.value);
|
|
2502
|
-
i[p] = b;
|
|
2503
|
-
} else
|
|
2504
|
-
i[p].value = h.value;
|
|
2505
|
-
l[p] = !0;
|
|
2506
|
-
} else
|
|
2507
|
-
l[p] = !1;
|
|
2696
|
+
o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), s(o, n);
|
|
2697
|
+
}, e), rn = (s, e) => Y((t, n) => {
|
|
2698
|
+
s(t.checked, n);
|
|
2699
|
+
}, e), on = (s, e = "input") => J(N.valueAsDate(s), fe[e](Zt(s.set))), ln = (s, e = "input") => J(N.valueAsDate(s), fe[e](es(s.set))), an = (s, e = "input") => J(N.valueAsNumber(s), fe[e](Qt(s.set))), cn = (s, e = "input") => J(N.value(s), fe[e](Xt(s.set))), un = (s) => J(N.checked(s), zt(s.set)), hn = (s) => L((e) => (e.appendOrInsert(s), (t) => {
|
|
2700
|
+
t && ve(s);
|
|
2701
|
+
})), Ze = (s, ...e) => L((t) => {
|
|
2702
|
+
const n = t.makeChildElement(s, void 0), r = e.map((i) => W(i).render(n));
|
|
2703
|
+
return (i) => {
|
|
2704
|
+
r.forEach((o) => o(!1)), n.clear(i);
|
|
2508
2705
|
};
|
|
2509
|
-
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
return i[p] = b, () => {
|
|
2514
|
-
};
|
|
2515
|
-
}
|
|
2516
|
-
return h.on(() => {
|
|
2517
|
-
u(h, p), d === 0 ? a.value = l.every((b) => b) : d--;
|
|
2518
|
-
});
|
|
2519
|
-
});
|
|
2520
|
-
return a.on((h) => {
|
|
2521
|
-
c?.(!0), c = null, h ? c = g(e(...i)).render(r) : c = g(s?.() ?? L).render(r);
|
|
2522
|
-
}), (h) => {
|
|
2523
|
-
i.forEach((p) => p?.dispose()), a.dispose(), f.forEach((p) => p()), c?.(h), r.clear(h);
|
|
2706
|
+
}), Te = (s, e, ...t) => L((n) => {
|
|
2707
|
+
const r = n.makeChildElement(s, e), i = t.map((o) => W(o).render(r));
|
|
2708
|
+
return (o) => {
|
|
2709
|
+
i.forEach((l) => l(!1)), r.clear(o);
|
|
2524
2710
|
};
|
|
2525
|
-
}),
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
(n) => {
|
|
2535
|
-
if (n) {
|
|
2536
|
-
const r = e();
|
|
2537
|
-
return r != null ? g(r) : L;
|
|
2538
|
-
}
|
|
2539
|
-
return g(s?.());
|
|
2711
|
+
}), ts = new Proxy(
|
|
2712
|
+
{},
|
|
2713
|
+
{
|
|
2714
|
+
/**
|
|
2715
|
+
* Creates a renderable that represents an HTML element.
|
|
2716
|
+
* @param tagName - The HTML tag name.
|
|
2717
|
+
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
2718
|
+
*/
|
|
2719
|
+
get: (s, e) => (...t) => Ze(e, t.flatMap(W))
|
|
2540
2720
|
}
|
|
2541
|
-
),
|
|
2542
|
-
|
|
2543
|
-
e,
|
|
2544
|
-
s
|
|
2545
|
-
), Ke = (t, e, s) => {
|
|
2546
|
-
if (s != null)
|
|
2547
|
-
return Ke(t, (n) => {
|
|
2548
|
-
const r = new de(
|
|
2549
|
-
n.index,
|
|
2550
|
-
n.total.map((o) => o - 1)
|
|
2551
|
-
);
|
|
2552
|
-
return E(
|
|
2553
|
-
g(e(n)),
|
|
2554
|
-
ze(
|
|
2555
|
-
n.isLast,
|
|
2556
|
-
() => L,
|
|
2557
|
-
() => s(r)
|
|
2558
|
-
)
|
|
2559
|
-
);
|
|
2560
|
-
});
|
|
2561
|
-
if (y.is(t))
|
|
2562
|
-
return m((n) => {
|
|
2563
|
-
const r = t.derive(), o = n.makeRef(), i = [], l = [];
|
|
2564
|
-
return r.on((c) => {
|
|
2565
|
-
const a = i.splice(c), u = l.splice(c);
|
|
2566
|
-
for (const d of u)
|
|
2567
|
-
d.dispose();
|
|
2568
|
-
for (const d of a)
|
|
2569
|
-
d(!0);
|
|
2570
|
-
for (let d = i.length; d < c; d++) {
|
|
2571
|
-
const f = new de(d, r), h = new J();
|
|
2572
|
-
l.push(h), i.push(
|
|
2573
|
-
O(
|
|
2574
|
-
h,
|
|
2575
|
-
() => g(e(f)).render(o)
|
|
2576
|
-
)
|
|
2577
|
-
);
|
|
2578
|
-
}
|
|
2579
|
-
}), (c) => {
|
|
2580
|
-
for (const a of l)
|
|
2581
|
-
a.dispose();
|
|
2582
|
-
l.length = 0, r.dispose();
|
|
2583
|
-
for (const a of i)
|
|
2584
|
-
a(c);
|
|
2585
|
-
i.length = 0, o.clear(c);
|
|
2586
|
-
};
|
|
2587
|
-
});
|
|
2721
|
+
), dn = new Proxy(
|
|
2722
|
+
{},
|
|
2588
2723
|
{
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
);
|
|
2724
|
+
/**
|
|
2725
|
+
* Creates a renderable that represents an HTMLInput element.
|
|
2726
|
+
* @param type - The input type name.
|
|
2727
|
+
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
2728
|
+
*/
|
|
2729
|
+
get: (s, e) => (...t) => Ze("input", N.type(e), ...t)
|
|
2596
2730
|
}
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
s
|
|
2606
|
-
);
|
|
2607
|
-
}, me = (...t) => m(
|
|
2608
|
-
(e) => (s) => t.forEach((n) => {
|
|
2609
|
-
typeof n == "function" ? n(s, e) : n.dispose(s, e);
|
|
2610
|
-
})
|
|
2611
|
-
), Js = (t, e) => {
|
|
2612
|
-
if (y.is(t)) {
|
|
2613
|
-
const s = t;
|
|
2614
|
-
return m((n) => {
|
|
2615
|
-
n = n.makeRef();
|
|
2616
|
-
const r = s.map((l) => g(e(l)));
|
|
2617
|
-
let o = () => {
|
|
2618
|
-
};
|
|
2619
|
-
const i = r.on((l) => {
|
|
2620
|
-
o(!0), o = l.render(n);
|
|
2621
|
-
});
|
|
2622
|
-
return (l) => {
|
|
2623
|
-
i(), o(l);
|
|
2624
|
-
};
|
|
2625
|
-
});
|
|
2731
|
+
), et = "http://www.w3.org/2000/svg", fn = (s, ...e) => Te(s, et, ...e), pn = new Proxy(
|
|
2732
|
+
{},
|
|
2733
|
+
{
|
|
2734
|
+
/**
|
|
2735
|
+
* Creates a renderable that represents an SVG element.
|
|
2736
|
+
* @param tagName - The SVG tag name.
|
|
2737
|
+
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
2738
|
+
*/
|
|
2739
|
+
get: (s, e) => (...t) => Te(e, et, t.flatMap(W))
|
|
2626
2740
|
}
|
|
2627
|
-
|
|
2628
|
-
},
|
|
2741
|
+
), tt = "http://www.w3.org/1998/Math/MathML", mn = (s, ...e) => Te(s, tt, ...e), gn = new Proxy(
|
|
2742
|
+
{},
|
|
2743
|
+
{
|
|
2744
|
+
/**
|
|
2745
|
+
* Creates a renderable that represents an Math element.
|
|
2746
|
+
* @param tagName - The Math tag name.
|
|
2747
|
+
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
2748
|
+
*/
|
|
2749
|
+
get: (s, e) => (...t) => Te(e, tt, t.flatMap(W))
|
|
2750
|
+
}
|
|
2751
|
+
), xe = (s) => L((e) => {
|
|
2629
2752
|
if (e.isBrowser()) {
|
|
2630
|
-
const
|
|
2631
|
-
if (
|
|
2632
|
-
return
|
|
2753
|
+
const t = s(e);
|
|
2754
|
+
if (t != null)
|
|
2755
|
+
return W(t).render(e);
|
|
2633
2756
|
}
|
|
2634
2757
|
return () => {
|
|
2635
2758
|
};
|
|
2636
2759
|
});
|
|
2637
|
-
function
|
|
2638
|
-
src:
|
|
2760
|
+
function yn({
|
|
2761
|
+
src: s,
|
|
2639
2762
|
name: e,
|
|
2640
|
-
width:
|
|
2763
|
+
width: t,
|
|
2641
2764
|
height: n,
|
|
2642
2765
|
sandbox: r,
|
|
2643
|
-
allow:
|
|
2644
|
-
referrerpolicy:
|
|
2766
|
+
allow: i,
|
|
2767
|
+
referrerpolicy: o,
|
|
2645
2768
|
loading: l,
|
|
2646
|
-
iframeChild:
|
|
2647
|
-
onLoad:
|
|
2648
|
-
} = {}, ...
|
|
2649
|
-
return
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2769
|
+
iframeChild: f,
|
|
2770
|
+
onLoad: d
|
|
2771
|
+
} = {}, ...v) {
|
|
2772
|
+
return ts.iframe(
|
|
2773
|
+
N.src(s),
|
|
2774
|
+
N.name(e),
|
|
2775
|
+
N.width(
|
|
2776
|
+
t != null ? C.map(t, String) : void 0
|
|
2654
2777
|
),
|
|
2655
|
-
|
|
2656
|
-
n != null ?
|
|
2778
|
+
N.height(
|
|
2779
|
+
n != null ? C.map(n, String) : void 0
|
|
2657
2780
|
),
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
const
|
|
2664
|
-
let
|
|
2665
|
-
const
|
|
2666
|
-
if (
|
|
2667
|
-
|
|
2668
|
-
const
|
|
2669
|
-
if (
|
|
2670
|
-
const
|
|
2671
|
-
if (
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2781
|
+
N.sandbox(r),
|
|
2782
|
+
N.allow(i),
|
|
2783
|
+
N.referrerpolicy(o),
|
|
2784
|
+
f,
|
|
2785
|
+
xe((S) => {
|
|
2786
|
+
const O = S.element;
|
|
2787
|
+
let T, A = !1;
|
|
2788
|
+
const $ = () => {
|
|
2789
|
+
if (A) return;
|
|
2790
|
+
A = !0;
|
|
2791
|
+
const M = O.contentDocument;
|
|
2792
|
+
if (M && (d && d(O), v.length > 0)) {
|
|
2793
|
+
const x = M.body;
|
|
2794
|
+
if (x) {
|
|
2795
|
+
const R = S.withElement(x);
|
|
2796
|
+
T = he(J(...v), R);
|
|
2674
2797
|
}
|
|
2675
2798
|
}
|
|
2676
2799
|
};
|
|
2677
|
-
return l != null &&
|
|
2678
|
-
|
|
2679
|
-
}), (
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2800
|
+
return l != null && C.on(l, (M) => {
|
|
2801
|
+
O.loading = M;
|
|
2802
|
+
}), (v.length > 0 || d) && (s || setTimeout($, 0)), J(
|
|
2803
|
+
v.length > 0 || d ? fe.load($) : jt,
|
|
2804
|
+
Xe(() => {
|
|
2805
|
+
T && T(!1);
|
|
2683
2806
|
})
|
|
2684
2807
|
);
|
|
2685
2808
|
})
|
|
2686
2809
|
);
|
|
2687
2810
|
}
|
|
2688
|
-
const
|
|
2689
|
-
|
|
2690
|
-
t,
|
|
2691
|
-
(n) => n.length > 0 ? { notEmpty: n } : { whenEmpty: null }
|
|
2692
|
-
),
|
|
2693
|
-
{
|
|
2694
|
-
notEmpty: (n) => e(n),
|
|
2695
|
-
whenEmpty: () => s()
|
|
2696
|
-
}
|
|
2697
|
-
), Ys = (t, e) => m((s) => {
|
|
2698
|
-
const n = s.makePortal(t), r = z(g(e), n);
|
|
2811
|
+
const vn = (s, e) => L((t) => {
|
|
2812
|
+
const n = t.makePortal(s), r = he(W(e), n);
|
|
2699
2813
|
return () => r(!0);
|
|
2700
|
-
}),
|
|
2701
|
-
mark:
|
|
2814
|
+
}), ge = /* @__PURE__ */ new Map(), ss = (s) => ({
|
|
2815
|
+
mark: st(`Probe(${s.description})`),
|
|
2702
2816
|
create: ({ callback: e = () => {
|
|
2703
|
-
}, timeout:
|
|
2817
|
+
}, timeout: t = 10 } = {}) => {
|
|
2704
2818
|
const n = (l) => {
|
|
2705
|
-
clearTimeout(r),
|
|
2819
|
+
clearTimeout(r), ge.delete(s), e(l);
|
|
2706
2820
|
};
|
|
2707
|
-
if (
|
|
2708
|
-
throw new Error(`Probe already exists: ${
|
|
2709
|
-
const r = setTimeout(() => n("timeout"),
|
|
2710
|
-
return
|
|
2821
|
+
if (ge.has(s))
|
|
2822
|
+
throw new Error(`Probe already exists: ${s.description}`);
|
|
2823
|
+
const r = setTimeout(() => n("timeout"), t), i = { counter: 0, timeoutId: r };
|
|
2824
|
+
return ge.set(s, i), {
|
|
2711
2825
|
value: () => {
|
|
2712
2826
|
clearTimeout(r);
|
|
2713
|
-
const l =
|
|
2827
|
+
const l = ge.get(s);
|
|
2714
2828
|
l != null && --l.counter === 0 && n("resolved");
|
|
2715
2829
|
},
|
|
2716
2830
|
dispose: () => n("disposed"),
|
|
2717
|
-
onUse: () =>
|
|
2831
|
+
onUse: () => i.counter++
|
|
2718
2832
|
};
|
|
2719
2833
|
}
|
|
2720
|
-
}),
|
|
2721
|
-
function
|
|
2722
|
-
mode:
|
|
2834
|
+
}), wn = ss(/* @__PURE__ */ Symbol("GlobalProbe"));
|
|
2835
|
+
function bn({
|
|
2836
|
+
mode: s,
|
|
2723
2837
|
delegatesFocus: e,
|
|
2724
|
-
slotAssignment:
|
|
2838
|
+
slotAssignment: t,
|
|
2725
2839
|
clonable: n,
|
|
2726
2840
|
serializable: r
|
|
2727
|
-
}, ...
|
|
2728
|
-
return
|
|
2729
|
-
const l = { mode:
|
|
2730
|
-
e !== void 0 && (l.delegatesFocus = e),
|
|
2731
|
-
const
|
|
2732
|
-
return
|
|
2841
|
+
}, ...i) {
|
|
2842
|
+
return xe((o) => {
|
|
2843
|
+
const l = { mode: s };
|
|
2844
|
+
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), n !== void 0 && (l.clonable = n), r !== void 0 && (l.serializable = r);
|
|
2845
|
+
const f = o.element.attachShadow(l), d = o.withElement(f), v = he(J(...i), d);
|
|
2846
|
+
return Xe(() => v(!0));
|
|
2733
2847
|
});
|
|
2734
2848
|
}
|
|
2735
|
-
const
|
|
2736
|
-
const n =
|
|
2737
|
-
return
|
|
2738
|
-
r &&
|
|
2849
|
+
const ns = (s, e) => L((t) => {
|
|
2850
|
+
const n = t.getStyle(s);
|
|
2851
|
+
return t.setStyle(s, e), (r) => {
|
|
2852
|
+
r && t.setStyle(s, n);
|
|
2739
2853
|
};
|
|
2740
|
-
}),
|
|
2741
|
-
const n =
|
|
2742
|
-
return (
|
|
2743
|
-
r(),
|
|
2854
|
+
}), rs = (s, e) => L((t) => {
|
|
2855
|
+
const n = t.getStyle(s), r = e.on((i) => t.setStyle(s, i));
|
|
2856
|
+
return (i) => {
|
|
2857
|
+
r(), i && t.setStyle(s, n);
|
|
2744
2858
|
};
|
|
2745
|
-
}),
|
|
2859
|
+
}), ke = (s, e) => _.is(e) ? rs(s, e) : ns(s, e), Sn = new Proxy({}, {
|
|
2746
2860
|
/**
|
|
2747
2861
|
* Creates a renderable component for the specified `style` property.
|
|
2748
2862
|
*
|
|
@@ -2751,193 +2865,165 @@ const Yt = (t, e) => m((s) => {
|
|
|
2751
2865
|
* @returns The renderable component for the specified attribute.
|
|
2752
2866
|
*
|
|
2753
2867
|
*/
|
|
2754
|
-
get: (
|
|
2755
|
-
}),
|
|
2756
|
-
const s = t
|
|
2757
|
-
return
|
|
2758
|
-
|
|
2759
|
-
}
|
|
2868
|
+
get: (s, e) => e === "variable" ? (t, n) => ke(t, n) : (t) => ke(e, t)
|
|
2869
|
+
}), is = (s) => L((e) => e.makeChildText(s).clear), os = (s) => L((e) => {
|
|
2870
|
+
const t = e.makeChildText(s.value), n = s.on(t.setText);
|
|
2871
|
+
return (r) => {
|
|
2872
|
+
n(), t.clear(r);
|
|
2873
|
+
};
|
|
2874
|
+
}), Tn = (s) => _.is(s) ? os(s) : is(s), An = (s) => L((e) => {
|
|
2875
|
+
const t = s(e);
|
|
2876
|
+
return t == null ? () => {
|
|
2877
|
+
} : W(t).render(e);
|
|
2878
|
+
}), _n = (s) => xe((e) => s(e.element)), En = (s) => L((e) => {
|
|
2760
2879
|
if (e.isHeadlessDOM()) {
|
|
2761
|
-
const
|
|
2762
|
-
if (
|
|
2763
|
-
return
|
|
2880
|
+
const t = s(e);
|
|
2881
|
+
if (t)
|
|
2882
|
+
return W(t).render(e);
|
|
2764
2883
|
}
|
|
2765
2884
|
return () => {
|
|
2766
2885
|
};
|
|
2767
|
-
}), nn = (t) => m((e) => {
|
|
2768
|
-
const s = new J(), n = O(
|
|
2769
|
-
s,
|
|
2770
|
-
() => g(t(s)).render(e)
|
|
2771
|
-
);
|
|
2772
|
-
return (r) => {
|
|
2773
|
-
s.dispose(), n(r);
|
|
2774
|
-
};
|
|
2775
|
-
}), we = (t) => m((e) => {
|
|
2776
|
-
let s = e;
|
|
2777
|
-
function n() {
|
|
2778
|
-
return s;
|
|
2779
|
-
}
|
|
2780
|
-
function r(l) {
|
|
2781
|
-
s = l;
|
|
2782
|
-
}
|
|
2783
|
-
const o = [], i = t({
|
|
2784
|
-
use: ({ mark: l }) => {
|
|
2785
|
-
const { value: c, onUse: a } = n().getProvider(l);
|
|
2786
|
-
return a?.(), c;
|
|
2787
|
-
},
|
|
2788
|
-
set: ({ mark: l, create: c }, a) => {
|
|
2789
|
-
const { value: u, dispose: d, onUse: f } = c(a, n());
|
|
2790
|
-
o.push(d), r(n().setProvider(l, u, f));
|
|
2791
|
-
}
|
|
2792
|
-
});
|
|
2793
|
-
return i == null ? () => {
|
|
2794
|
-
} : E(
|
|
2795
|
-
g(i),
|
|
2796
|
-
me(() => o.forEach((l) => l()))
|
|
2797
|
-
).render(n());
|
|
2798
|
-
}), rn = (t, e, s) => we(({ set: n }) => (n(t, e), s())), on = (t, e) => we(({ use: s }) => e(s(t))), ln = (...t) => (e) => we(({ use: s }) => {
|
|
2799
|
-
const n = t.map(s);
|
|
2800
|
-
return e(...n);
|
|
2801
2886
|
});
|
|
2802
2887
|
export {
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2888
|
+
Jt as Aria,
|
|
2889
|
+
Fs as Async,
|
|
2890
|
+
Wt as Attr,
|
|
2891
|
+
un as BindChecked,
|
|
2892
|
+
on as BindDate,
|
|
2893
|
+
ln as BindDateTime,
|
|
2894
|
+
an as BindNumber,
|
|
2895
|
+
cn as BindText,
|
|
2896
|
+
te as BrowserContext,
|
|
2897
|
+
oe as CLASS_PLACEHOLDER_ATTR,
|
|
2898
|
+
ee as Computed,
|
|
2899
|
+
Ws as Conjunction,
|
|
2900
|
+
hn as DOMNode,
|
|
2901
|
+
Ut as DataAttr,
|
|
2902
|
+
ie as DisposalScope,
|
|
2903
|
+
Ze as El,
|
|
2904
|
+
Te as ElNS,
|
|
2905
|
+
De as ElementPosition,
|
|
2906
|
+
jt as Empty,
|
|
2907
|
+
js as Ensure,
|
|
2908
|
+
Vs as EnsureAll,
|
|
2909
|
+
Ps as ForEach,
|
|
2910
|
+
J as Fragment,
|
|
2911
|
+
wn as GlobalProbe,
|
|
2912
|
+
Pt as HYDRATION_ID_ATTR,
|
|
2913
|
+
Es as HeadlessAdapter,
|
|
2914
|
+
se as HeadlessContext,
|
|
2915
|
+
It as HeadlessElement,
|
|
2916
|
+
Ye as HeadlessPortal,
|
|
2917
|
+
$t as HeadlessText,
|
|
2918
|
+
yn as IFrame,
|
|
2919
|
+
Rs as MapSignal,
|
|
2920
|
+
Gt as MathAttr,
|
|
2921
|
+
mn as MathEl,
|
|
2922
|
+
He as MemoryStore,
|
|
2923
|
+
Bs as NotEmpty,
|
|
2924
|
+
zt as OnChecked,
|
|
2925
|
+
Xe as OnDispose,
|
|
2926
|
+
Ms as OneOf,
|
|
2927
|
+
ks as OneOfField,
|
|
2928
|
+
Is as OneOfKind,
|
|
2929
|
+
Ns as OneOfTuple,
|
|
2930
|
+
$s as OneOfType,
|
|
2931
|
+
Hs as OneOfValue,
|
|
2932
|
+
vn as Portal,
|
|
2933
|
+
we as Prop,
|
|
2934
|
+
Ks as Provide,
|
|
2935
|
+
Je as ProviderNotFoundError,
|
|
2936
|
+
_t as RenderingError,
|
|
2937
|
+
Ls as Repeat,
|
|
2938
|
+
Kt as SVGAttr,
|
|
2939
|
+
fn as SVGEl,
|
|
2940
|
+
bn as ShadowRoot,
|
|
2941
|
+
_ as Signal,
|
|
2942
|
+
qs as Task,
|
|
2943
|
+
Tn as TextNode,
|
|
2944
|
+
xs as Unless,
|
|
2945
|
+
Gs as Use,
|
|
2946
|
+
zs as UseMany,
|
|
2947
|
+
C as Value,
|
|
2948
|
+
Os as When,
|
|
2949
|
+
xe as WithBrowserCtx,
|
|
2950
|
+
An as WithCtx,
|
|
2951
|
+
_n as WithElement,
|
|
2952
|
+
En as WithHeadlessCtx,
|
|
2953
|
+
Js as WithProvider,
|
|
2954
|
+
Us as WithScope,
|
|
2955
|
+
Ce as _NODE_PLACEHOLDER_ATTR,
|
|
2956
|
+
Tt as _getSelfOrParentElement,
|
|
2957
|
+
We as _isElement,
|
|
2958
|
+
Ue as _isFragment,
|
|
2959
|
+
St as _makeGetter,
|
|
2960
|
+
bt as _makeSetter,
|
|
2961
|
+
ve as _removeDOMNode,
|
|
2962
|
+
os as _signalText,
|
|
2963
|
+
is as _staticText,
|
|
2964
|
+
ms as animateSignal,
|
|
2965
|
+
vt as animateSignals,
|
|
2966
|
+
Zs as aria,
|
|
2967
|
+
N as attr,
|
|
2968
|
+
bs as bind,
|
|
2969
|
+
Ss as coalesce,
|
|
2970
|
+
be as computed,
|
|
2971
|
+
ne as computedOf,
|
|
2972
|
+
ls as computedOfAsync,
|
|
2973
|
+
as as computedOfAsyncGenerator,
|
|
2974
|
+
wt as computedRecord,
|
|
2975
|
+
At as createRenderKit,
|
|
2976
|
+
nt as createRenderable,
|
|
2977
|
+
Qs as dataAttr,
|
|
2978
|
+
ys as delaySignal,
|
|
2979
|
+
$e as effect,
|
|
2980
|
+
lt as effectOf,
|
|
2981
|
+
Yt as emit,
|
|
2982
|
+
rn as emitChecked,
|
|
2983
|
+
Y as emitTarget,
|
|
2984
|
+
Xt as emitValue,
|
|
2985
|
+
Zt as emitValueAsDate,
|
|
2986
|
+
es as emitValueAsDateTime,
|
|
2987
|
+
sn as emitValueAsNullableDate,
|
|
2988
|
+
nn as emitValueAsNullableDateTime,
|
|
2989
|
+
Qt as emitValueAsNumber,
|
|
2990
|
+
pt as endInterpolate,
|
|
2991
|
+
Oe as getCurrentScope,
|
|
2992
|
+
hs as getParentScope,
|
|
2993
|
+
us as getScopeStack,
|
|
2994
|
+
Cs as getWindow,
|
|
2995
|
+
mt as guessInterpolate,
|
|
2996
|
+
ts as html,
|
|
2997
|
+
dn as input,
|
|
2998
|
+
ft as interpolateDate,
|
|
2999
|
+
ht as interpolateNumber,
|
|
3000
|
+
dt as interpolateString,
|
|
3001
|
+
cs as joinSignals,
|
|
3002
|
+
fs as localStorageProp,
|
|
3003
|
+
ss as makeProbe,
|
|
3004
|
+
st as makeProviderMark,
|
|
3005
|
+
gn as math,
|
|
3006
|
+
tn as mathAttr,
|
|
3007
|
+
gs as merge,
|
|
3008
|
+
fe as on,
|
|
3009
|
+
ct as popScope,
|
|
3010
|
+
vs as previousSignal,
|
|
3011
|
+
B as prop,
|
|
3012
|
+
at as pushScope,
|
|
3013
|
+
As as render,
|
|
3014
|
+
he as renderWithContext,
|
|
3015
|
+
W as renderableOfTNode,
|
|
3016
|
+
Ds as restoreTempoPlaceholders,
|
|
3017
|
+
_s as runHeadless,
|
|
3018
|
+
ds as scoped,
|
|
3019
|
+
ps as sessionStorageProp,
|
|
3020
|
+
ye as signal,
|
|
3021
|
+
ws as slidingWindowSignal,
|
|
3022
|
+
Ne as storedProp,
|
|
3023
|
+
Sn as style,
|
|
3024
|
+
pn as svg,
|
|
3025
|
+
en as svgAttr,
|
|
3026
|
+
Ts as syncProp,
|
|
3027
|
+
Ae as untracked,
|
|
3028
|
+
z as withScope
|
|
2943
3029
|
};
|