@tempots/dom 32.0.0 → 33.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.js +842 -799
- package/package.json +1 -1
- package/renderable/attribute.d.ts +97 -8
- package/renderable/element.d.ts +18 -0
- package/std/signal.d.ts +27 -0
package/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const _ = [],
|
|
1
|
+
const _ = [], We = (t) => {
|
|
2
2
|
_.push(t);
|
|
3
|
-
},
|
|
3
|
+
}, Ue = () => {
|
|
4
4
|
if (_.length === 0)
|
|
5
5
|
throw new Error("Cannot pop from empty scope stack");
|
|
6
6
|
_.pop();
|
|
7
|
-
},
|
|
8
|
-
|
|
7
|
+
}, ue = () => _[_.length - 1] ?? null, Zt = () => _, zt = () => _[_.length - 2] ?? null, x = (t, e) => {
|
|
8
|
+
We(t);
|
|
9
9
|
try {
|
|
10
10
|
return e();
|
|
11
11
|
} finally {
|
|
12
|
-
|
|
12
|
+
Ue();
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
const e = new
|
|
14
|
+
}, Kt = (t) => {
|
|
15
|
+
const e = new j();
|
|
16
16
|
try {
|
|
17
|
-
return
|
|
17
|
+
return x(e, () => t(e));
|
|
18
18
|
} finally {
|
|
19
19
|
e.dispose();
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, ie = (t) => {
|
|
22
22
|
const e = _.slice();
|
|
23
23
|
_.length = 0;
|
|
24
24
|
try {
|
|
@@ -79,14 +79,14 @@ class g {
|
|
|
79
79
|
* @param equals - Function to compare two values for equality (defaults to strict equality)
|
|
80
80
|
* @returns A Signal that represents the result of the Promise
|
|
81
81
|
*/
|
|
82
|
-
static ofPromise = (e, s,
|
|
83
|
-
const
|
|
84
|
-
return e.then((
|
|
85
|
-
|
|
82
|
+
static ofPromise = (e, s, n, r = (o, i) => o === i) => {
|
|
83
|
+
const o = new g(s, r);
|
|
84
|
+
return e.then((i) => o._setAndNotify(i)).catch((i) => {
|
|
85
|
+
n != null ? o._setAndNotify(n(i)) : console.error(
|
|
86
86
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
87
|
-
|
|
87
|
+
i
|
|
88
88
|
);
|
|
89
|
-
}),
|
|
89
|
+
}), o;
|
|
90
90
|
};
|
|
91
91
|
/**
|
|
92
92
|
* Checks if a value is a Signal.
|
|
@@ -140,22 +140,46 @@ class g {
|
|
|
140
140
|
* The listener function will be immediately called with the current value of the signal.
|
|
141
141
|
* Returns a function that can be called to unregister the listener.
|
|
142
142
|
*
|
|
143
|
+
* When called within a DisposalScope (e.g., inside a renderable), the listener is
|
|
144
|
+
* automatically cleaned up when the scope is disposed. This prevents memory leaks
|
|
145
|
+
* when listening to outer-scope signals from inner scopes.
|
|
146
|
+
*
|
|
143
147
|
* @param listener - The listener function to be called when the value of the signal changes.
|
|
144
148
|
* @param options - Options for the listener.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* // Automatic cleanup when scope disposes
|
|
153
|
+
* const MyComponent = () => {
|
|
154
|
+
* const outerSignal = prop(0)
|
|
155
|
+
*
|
|
156
|
+
* return html.div(
|
|
157
|
+
* When(someCondition, () => {
|
|
158
|
+
* // This listener is automatically cleaned up when the When() disposes
|
|
159
|
+
* outerSignal.on(value => console.log(value))
|
|
160
|
+
* return html.span('Inner content')
|
|
161
|
+
* })
|
|
162
|
+
* )
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
145
165
|
*/
|
|
146
166
|
on = (e, s = {}) => {
|
|
147
167
|
s.skipInitial || e(this.get(), void 0);
|
|
148
|
-
const
|
|
149
|
-
|
|
168
|
+
const n = s.once ? (o, i) => {
|
|
169
|
+
r(), e(o, i);
|
|
150
170
|
} : e;
|
|
151
|
-
this._onValueListeners.push(
|
|
152
|
-
const
|
|
171
|
+
this._onValueListeners.push(n);
|
|
172
|
+
const r = () => {
|
|
153
173
|
this._onValueListeners.splice(
|
|
154
|
-
this._onValueListeners.indexOf(
|
|
174
|
+
this._onValueListeners.indexOf(n),
|
|
155
175
|
1
|
|
156
|
-
), s.abortSignal != null && s.abortSignal.removeEventListener("abort",
|
|
176
|
+
), s.abortSignal != null && s.abortSignal.removeEventListener("abort", r);
|
|
157
177
|
};
|
|
158
|
-
|
|
178
|
+
if (s.abortSignal != null && s.abortSignal.addEventListener("abort", r), !s.noAutoDispose) {
|
|
179
|
+
const o = ue();
|
|
180
|
+
o?.onDispose(r);
|
|
181
|
+
}
|
|
182
|
+
return r;
|
|
159
183
|
};
|
|
160
184
|
/**
|
|
161
185
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
@@ -166,11 +190,11 @@ class g {
|
|
|
166
190
|
* @param options - Options for the listener.
|
|
167
191
|
*/
|
|
168
192
|
onChange = (e, s = {}) => {
|
|
169
|
-
let
|
|
170
|
-
const
|
|
171
|
-
|
|
193
|
+
let n = 0;
|
|
194
|
+
const r = (o, i) => {
|
|
195
|
+
n++ > 0 && e(o, i);
|
|
172
196
|
};
|
|
173
|
-
return this.on(
|
|
197
|
+
return this.on(r, s);
|
|
174
198
|
};
|
|
175
199
|
/**
|
|
176
200
|
* @internal
|
|
@@ -178,7 +202,7 @@ class g {
|
|
|
178
202
|
_setAndNotify = (e) => {
|
|
179
203
|
if (this._disposed) return;
|
|
180
204
|
const s = this._value;
|
|
181
|
-
this.equals(s, e) || (this._value = e, this._onValueListeners.forEach((
|
|
205
|
+
this.equals(s, e) || (this._value = e, this._onValueListeners.forEach((r) => r(e, s)));
|
|
182
206
|
};
|
|
183
207
|
/**
|
|
184
208
|
* @internal
|
|
@@ -199,9 +223,10 @@ class g {
|
|
|
199
223
|
};
|
|
200
224
|
/**
|
|
201
225
|
* Disposes the signal, releasing any resources associated with it.
|
|
226
|
+
* This clears all listeners, derivatives, and disposal callbacks.
|
|
202
227
|
*/
|
|
203
228
|
dispose = () => {
|
|
204
|
-
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
229
|
+
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0, this._onValueListeners.length = 0);
|
|
205
230
|
};
|
|
206
231
|
/**
|
|
207
232
|
* Creates a new computed signal by applying a transformation function to this signal's value.
|
|
@@ -265,15 +290,15 @@ class g {
|
|
|
265
290
|
* @param equals - Optional function to determine if two transformed values are equal (defaults to strict equality)
|
|
266
291
|
* @returns A new computed signal with the transformed value (auto-registered with current scope)
|
|
267
292
|
*/
|
|
268
|
-
map = (e, s = (
|
|
269
|
-
const
|
|
293
|
+
map = (e, s = (n, r) => n === r) => {
|
|
294
|
+
const n = new N(() => {
|
|
270
295
|
try {
|
|
271
296
|
return e(this.get());
|
|
272
|
-
} catch (
|
|
273
|
-
throw console.error("Error in Signal.map:",
|
|
297
|
+
} catch (r) {
|
|
298
|
+
throw console.error("Error in Signal.map:", r), r;
|
|
274
299
|
}
|
|
275
300
|
}, s);
|
|
276
|
-
return this.setDerivative(
|
|
301
|
+
return this.setDerivative(n), n;
|
|
277
302
|
};
|
|
278
303
|
/**
|
|
279
304
|
* Returns a new Signal that applies the given function to the value of the current Signal,
|
|
@@ -285,15 +310,15 @@ class g {
|
|
|
285
310
|
* Defaults to a strict equality check (===).
|
|
286
311
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
287
312
|
*/
|
|
288
|
-
flatMap = (e, s = (
|
|
289
|
-
const
|
|
313
|
+
flatMap = (e, s = (n, r) => n === r) => {
|
|
314
|
+
const n = new N(() => {
|
|
290
315
|
try {
|
|
291
316
|
return e(this.get()).get();
|
|
292
|
-
} catch (
|
|
293
|
-
throw console.error("Error in Signal.flatMap:",
|
|
317
|
+
} catch (r) {
|
|
318
|
+
throw console.error("Error in Signal.flatMap:", r), r;
|
|
294
319
|
}
|
|
295
320
|
}, s);
|
|
296
|
-
return this.setDerivative(
|
|
321
|
+
return this.setDerivative(n), n;
|
|
297
322
|
};
|
|
298
323
|
/**
|
|
299
324
|
* Invokes a callback function with the current value of the signal, without modifying the signal.
|
|
@@ -323,16 +348,16 @@ class g {
|
|
|
323
348
|
});
|
|
324
349
|
}
|
|
325
350
|
filter = (e, s) => {
|
|
326
|
-
let
|
|
327
|
-
const
|
|
351
|
+
let n = s ?? this.get();
|
|
352
|
+
const r = new N(() => {
|
|
328
353
|
try {
|
|
329
|
-
const
|
|
330
|
-
return
|
|
331
|
-
} catch (
|
|
332
|
-
throw console.error("Error in Signal.filter:",
|
|
354
|
+
const o = this.get();
|
|
355
|
+
return n = e(o) ? o : n;
|
|
356
|
+
} catch (o) {
|
|
357
|
+
throw console.error("Error in Signal.filter:", o), o;
|
|
333
358
|
}
|
|
334
359
|
}, this.equals);
|
|
335
|
-
return this.setDerivative(
|
|
360
|
+
return this.setDerivative(r), r;
|
|
336
361
|
};
|
|
337
362
|
/**
|
|
338
363
|
* Returns a new Computed object that applies the provided mapping function to the value of this Signal,
|
|
@@ -344,17 +369,17 @@ class g {
|
|
|
344
369
|
* @param equals - Optional equality function to determine if two values are equal.
|
|
345
370
|
* @returns - A new Computed object with the mapped and filtered values.
|
|
346
371
|
*/
|
|
347
|
-
filterMap = (e, s,
|
|
348
|
-
let
|
|
349
|
-
const
|
|
372
|
+
filterMap = (e, s, n = (r, o) => r === o) => {
|
|
373
|
+
let r = s;
|
|
374
|
+
const o = new N(() => {
|
|
350
375
|
try {
|
|
351
|
-
const
|
|
352
|
-
return
|
|
353
|
-
} catch (
|
|
354
|
-
throw console.error("Error in Signal.filterMap:",
|
|
376
|
+
const i = this.get(), l = e(i);
|
|
377
|
+
return r = l ?? r;
|
|
378
|
+
} catch (i) {
|
|
379
|
+
throw console.error("Error in Signal.filterMap:", i), i;
|
|
355
380
|
}
|
|
356
|
-
},
|
|
357
|
-
return this.setDerivative(
|
|
381
|
+
}, n);
|
|
382
|
+
return this.setDerivative(o), o;
|
|
358
383
|
};
|
|
359
384
|
/**
|
|
360
385
|
* Maps the values emitted by the signal to a new value asynchronously using the provided function.
|
|
@@ -369,25 +394,25 @@ class g {
|
|
|
369
394
|
* @param equals - The equality function to compare the mapped values for equality.
|
|
370
395
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
371
396
|
*/
|
|
372
|
-
mapAsync = (e, s,
|
|
373
|
-
const
|
|
374
|
-
let
|
|
375
|
-
return
|
|
397
|
+
mapAsync = (e, s, n, r = (o, i) => o === i) => {
|
|
398
|
+
const o = T(s, r);
|
|
399
|
+
let i = 0, l = new AbortController();
|
|
400
|
+
return o.onDispose(
|
|
376
401
|
this.on(async (c) => {
|
|
377
|
-
const a = ++
|
|
402
|
+
const a = ++i;
|
|
378
403
|
l.abort(), l = new AbortController();
|
|
379
404
|
try {
|
|
380
405
|
const u = await e(c, { abortSignal: l.signal });
|
|
381
|
-
a ===
|
|
406
|
+
a === i && o.set(u);
|
|
382
407
|
} catch (u) {
|
|
383
|
-
if (a ===
|
|
384
|
-
if (
|
|
385
|
-
|
|
408
|
+
if (a === i)
|
|
409
|
+
if (n != null)
|
|
410
|
+
o.set(n(u));
|
|
386
411
|
else
|
|
387
412
|
throw u;
|
|
388
413
|
}
|
|
389
414
|
})
|
|
390
|
-
),
|
|
415
|
+
), o;
|
|
391
416
|
};
|
|
392
417
|
/**
|
|
393
418
|
* Maps the values of the signal using the provided function `fn`, and returns a new signal
|
|
@@ -399,7 +424,7 @@ class g {
|
|
|
399
424
|
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
400
425
|
* @returns A new signal containing the mapped values.
|
|
401
426
|
*/
|
|
402
|
-
mapMaybe = (e, s) => this.map((
|
|
427
|
+
mapMaybe = (e, s) => this.map((n) => e(n) ?? s);
|
|
403
428
|
/**
|
|
404
429
|
* Feeds a property into the signal and sets up disposal behavior.
|
|
405
430
|
* @param prop - The property to feed into the signal.
|
|
@@ -407,8 +432,8 @@ class g {
|
|
|
407
432
|
* @returns The input property.
|
|
408
433
|
*/
|
|
409
434
|
feedProp = (e, s = !1) => {
|
|
410
|
-
const
|
|
411
|
-
return e.onDispose(
|
|
435
|
+
const n = this.on(e.set);
|
|
436
|
+
return e.onDispose(n), s ? this.onDispose(e.dispose) : this.onDispose(n), e;
|
|
412
437
|
};
|
|
413
438
|
/**
|
|
414
439
|
* Derives a new property from the current signal.
|
|
@@ -446,11 +471,11 @@ class g {
|
|
|
446
471
|
this._derivatives.indexOf(e),
|
|
447
472
|
1
|
|
448
473
|
);
|
|
449
|
-
}), e.onDispose(this.on(e.setDirty)), this.onDispose(e.dispose);
|
|
474
|
+
}), e.onDispose(this.on(e.setDirty, { noAutoDispose: !0 })), this.onDispose(e.dispose);
|
|
450
475
|
};
|
|
451
476
|
}
|
|
452
|
-
const
|
|
453
|
-
class
|
|
477
|
+
const Ge = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
478
|
+
class N extends g {
|
|
454
479
|
/**
|
|
455
480
|
* Creates a new Computed signal.
|
|
456
481
|
*
|
|
@@ -477,8 +502,8 @@ class $ extends g {
|
|
|
477
502
|
*/
|
|
478
503
|
constructor(e, s) {
|
|
479
504
|
super(void 0, s), this._fn = e, this.setDirty();
|
|
480
|
-
const
|
|
481
|
-
|
|
505
|
+
const n = ue();
|
|
506
|
+
n?.track(this);
|
|
482
507
|
}
|
|
483
508
|
/**
|
|
484
509
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -516,7 +541,7 @@ class $ extends g {
|
|
|
516
541
|
*/
|
|
517
542
|
_scheduleNotify = () => {
|
|
518
543
|
const e = ++this._scheduleCount;
|
|
519
|
-
|
|
544
|
+
Ge(() => {
|
|
520
545
|
this._scheduleCount !== e || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
|
|
521
546
|
});
|
|
522
547
|
};
|
|
@@ -571,15 +596,15 @@ class Z extends g {
|
|
|
571
596
|
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
572
597
|
*/
|
|
573
598
|
reducer = (e, ...s) => {
|
|
574
|
-
const
|
|
575
|
-
return function
|
|
576
|
-
const
|
|
577
|
-
|
|
599
|
+
const n = this;
|
|
600
|
+
return function r(o) {
|
|
601
|
+
const i = n.value;
|
|
602
|
+
n.update((l) => e(l, o)), !n.equals(i, n.value) && s.forEach(
|
|
578
603
|
(l) => l({
|
|
579
|
-
previousState:
|
|
580
|
-
state:
|
|
581
|
-
action:
|
|
582
|
-
dispatch:
|
|
604
|
+
previousState: i,
|
|
605
|
+
state: n.value,
|
|
606
|
+
action: o,
|
|
607
|
+
dispatch: r
|
|
583
608
|
})
|
|
584
609
|
);
|
|
585
610
|
};
|
|
@@ -595,9 +620,9 @@ class Z extends g {
|
|
|
595
620
|
* Defaults to a strict equality check (===).
|
|
596
621
|
* @returns A Prop object representing the isomorphism.
|
|
597
622
|
*/
|
|
598
|
-
iso = (e, s,
|
|
599
|
-
const
|
|
600
|
-
return
|
|
623
|
+
iso = (e, s, n = (r, o) => r === o) => {
|
|
624
|
+
const r = new Z(e(this.get()), n);
|
|
625
|
+
return r.onDispose(this.on((o) => r.set(e(o)))), r.on((o) => this._setAndNotify(s(o))), r;
|
|
601
626
|
};
|
|
602
627
|
/**
|
|
603
628
|
* Returns a `Prop` that represents the value at the specified key of the current value.
|
|
@@ -619,38 +644,38 @@ class Z extends g {
|
|
|
619
644
|
this._setAndNotify(e);
|
|
620
645
|
}
|
|
621
646
|
}
|
|
622
|
-
const z = (t, e, s = (
|
|
623
|
-
const
|
|
624
|
-
return e.forEach((
|
|
625
|
-
},
|
|
626
|
-
let
|
|
627
|
-
|
|
647
|
+
const z = (t, e, s = (n, r) => n === r) => {
|
|
648
|
+
const n = new N(t, s);
|
|
649
|
+
return e.forEach((r) => r.setDerivative(n)), n;
|
|
650
|
+
}, Se = (t, e, s = {}) => {
|
|
651
|
+
let n = s.once ? () => {
|
|
652
|
+
o(), t();
|
|
628
653
|
} : t;
|
|
629
654
|
if (s.skipInitial) {
|
|
630
|
-
let
|
|
631
|
-
const l =
|
|
632
|
-
|
|
633
|
-
|
|
655
|
+
let i = !1;
|
|
656
|
+
const l = n;
|
|
657
|
+
n = () => {
|
|
658
|
+
i ? l() : i = !0;
|
|
634
659
|
};
|
|
635
660
|
}
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
};
|
|
639
|
-
return s.abortSignal != null && s.abortSignal.addEventListener("abort",
|
|
640
|
-
}, T = (t, e = (s,
|
|
641
|
-
const s = new Z(t, e),
|
|
642
|
-
return
|
|
643
|
-
}, K = (t, e = (s,
|
|
644
|
-
function
|
|
661
|
+
const r = z(n, e), o = () => {
|
|
662
|
+
r.dispose(), s.abortSignal != null && s.abortSignal.removeEventListener("abort", o);
|
|
663
|
+
};
|
|
664
|
+
return s.abortSignal != null && s.abortSignal.addEventListener("abort", o), o;
|
|
665
|
+
}, T = (t, e = (s, n) => s === n) => {
|
|
666
|
+
const s = new Z(t, e), n = ue();
|
|
667
|
+
return n?.track(s), s;
|
|
668
|
+
}, K = (t, e = (s, n) => s === n) => new g(t, e);
|
|
669
|
+
function we(t) {
|
|
645
670
|
return t != null && t !== !1 && t !== 0 && t !== "";
|
|
646
671
|
}
|
|
647
|
-
function
|
|
648
|
-
return !
|
|
672
|
+
function Je(t) {
|
|
673
|
+
return !we(t);
|
|
649
674
|
}
|
|
650
|
-
function
|
|
675
|
+
function Xe(t) {
|
|
651
676
|
return t == null;
|
|
652
677
|
}
|
|
653
|
-
function
|
|
678
|
+
function Ye(t) {
|
|
654
679
|
return t != null;
|
|
655
680
|
}
|
|
656
681
|
const y = {
|
|
@@ -737,48 +762,48 @@ const y = {
|
|
|
737
762
|
* @param value - The value or signal to check.
|
|
738
763
|
* @returns A signal that emits `true` if the value is truthy, `false` otherwise.
|
|
739
764
|
*/
|
|
740
|
-
truthy: (t) => y.map(t,
|
|
765
|
+
truthy: (t) => y.map(t, we),
|
|
741
766
|
/**
|
|
742
767
|
* Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
|
|
743
768
|
* @param value - The value or signal to check.
|
|
744
769
|
* @returns A signal that emits `true` if the value is falsy, `false` otherwise.
|
|
745
770
|
*/
|
|
746
|
-
falsy: (t) => y.map(t,
|
|
771
|
+
falsy: (t) => y.map(t, Je),
|
|
747
772
|
/**
|
|
748
773
|
* Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
749
774
|
* @param value - The value or signal to check.
|
|
750
775
|
* @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
751
776
|
*/
|
|
752
|
-
nil: (t) => y.map(t,
|
|
777
|
+
nil: (t) => y.map(t, Xe),
|
|
753
778
|
/**
|
|
754
779
|
* Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
755
780
|
* @param value - The value or signal to check.
|
|
756
781
|
* @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
757
782
|
*/
|
|
758
|
-
defined: (t) => y.map(t,
|
|
783
|
+
defined: (t) => y.map(t, Ye)
|
|
759
784
|
}, ee = (...t) => (e, s) => {
|
|
760
785
|
if (t.length === 1)
|
|
761
786
|
return y.toSignal(t[0]).map(e);
|
|
762
|
-
const
|
|
787
|
+
const n = t.filter((r) => g.is(r));
|
|
763
788
|
return z(
|
|
764
|
-
() => e(...t.map((
|
|
765
|
-
|
|
789
|
+
() => e(...t.map((r) => y.get(r))),
|
|
790
|
+
n,
|
|
766
791
|
s
|
|
767
792
|
);
|
|
768
|
-
},
|
|
793
|
+
}, es = (t) => {
|
|
769
794
|
const e = Object.keys(t);
|
|
770
795
|
return ee(...Object.values(t))(
|
|
771
|
-
(...s) => Object.fromEntries(e.map((
|
|
796
|
+
(...s) => Object.fromEntries(e.map((n, r) => [n, s[r]]))
|
|
772
797
|
);
|
|
773
|
-
},
|
|
774
|
-
const
|
|
775
|
-
return
|
|
798
|
+
}, Qe = (...t) => (e, s = {}) => {
|
|
799
|
+
const n = t.filter((r) => g.is(r));
|
|
800
|
+
return Se(
|
|
776
801
|
() => e(...t.map(y.get)),
|
|
777
|
-
|
|
802
|
+
n,
|
|
778
803
|
s
|
|
779
804
|
);
|
|
780
805
|
};
|
|
781
|
-
class
|
|
806
|
+
class j {
|
|
782
807
|
_signals = /* @__PURE__ */ new Set();
|
|
783
808
|
_callbacks = [];
|
|
784
809
|
_disposed = !1;
|
|
@@ -851,8 +876,8 @@ class q {
|
|
|
851
876
|
* @public
|
|
852
877
|
*/
|
|
853
878
|
prop(e, s) {
|
|
854
|
-
const
|
|
855
|
-
return this.track(
|
|
879
|
+
const n = ie(() => T(e, s));
|
|
880
|
+
return this.track(n), n;
|
|
856
881
|
}
|
|
857
882
|
/**
|
|
858
883
|
* Creates a computed signal and tracks it in this scope.
|
|
@@ -864,9 +889,9 @@ class q {
|
|
|
864
889
|
* @returns A tracked Computed signal
|
|
865
890
|
* @public
|
|
866
891
|
*/
|
|
867
|
-
computed(e, s,
|
|
868
|
-
const
|
|
869
|
-
return this.track(
|
|
892
|
+
computed(e, s, n) {
|
|
893
|
+
const r = ie(() => z(e, s, n));
|
|
894
|
+
return this.track(r), r;
|
|
870
895
|
}
|
|
871
896
|
/**
|
|
872
897
|
* Creates an effect and tracks it in this scope.
|
|
@@ -878,8 +903,8 @@ class q {
|
|
|
878
903
|
* @returns A clear function (the effect itself is tracked in the scope)
|
|
879
904
|
* @public
|
|
880
905
|
*/
|
|
881
|
-
effect(e, s,
|
|
882
|
-
return
|
|
906
|
+
effect(e, s, n) {
|
|
907
|
+
return x(this, () => Se(e, s, n));
|
|
883
908
|
}
|
|
884
909
|
/**
|
|
885
910
|
* Creates a computed signal with curried signature and tracks it in this scope.
|
|
@@ -890,9 +915,9 @@ class q {
|
|
|
890
915
|
* @public
|
|
891
916
|
*/
|
|
892
917
|
computedOf(...e) {
|
|
893
|
-
return (s,
|
|
894
|
-
const
|
|
895
|
-
return this.track(
|
|
918
|
+
return (s, n) => {
|
|
919
|
+
const r = ie(() => ee(...e)(s, n));
|
|
920
|
+
return this.track(r), r;
|
|
896
921
|
};
|
|
897
922
|
}
|
|
898
923
|
/**
|
|
@@ -904,20 +929,20 @@ class q {
|
|
|
904
929
|
* @public
|
|
905
930
|
*/
|
|
906
931
|
effectOf(...e) {
|
|
907
|
-
return (s,
|
|
932
|
+
return (s, n) => x(this, () => Qe(...e)(s, n));
|
|
908
933
|
}
|
|
909
934
|
}
|
|
910
|
-
const
|
|
911
|
-
const
|
|
912
|
-
let
|
|
913
|
-
for (let
|
|
914
|
-
let
|
|
915
|
-
isNaN(
|
|
916
|
-
let l = e.charCodeAt(
|
|
917
|
-
isNaN(l) && (l =
|
|
935
|
+
const Ze = (t, e, s) => t + (e - t) * s, ge = 97, ze = (t, e, s) => {
|
|
936
|
+
const n = Math.max(t.length, e.length);
|
|
937
|
+
let r = "";
|
|
938
|
+
for (let o = 0; o < n; o++) {
|
|
939
|
+
let i = t.charCodeAt(o);
|
|
940
|
+
isNaN(i) && (i = ge);
|
|
941
|
+
let l = e.charCodeAt(o);
|
|
942
|
+
isNaN(l) && (l = ge), r += String.fromCharCode(i + (l - i) * s);
|
|
918
943
|
}
|
|
919
|
-
return
|
|
920
|
-
},
|
|
944
|
+
return r;
|
|
945
|
+
}, Ke = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), et = (t, e) => e, tt = (t) => typeof t == "number" ? Ze : typeof t == "string" ? ze : t instanceof Date ? Ke : et;
|
|
921
946
|
class le {
|
|
922
947
|
/**
|
|
923
948
|
* Creates a new instance of `ElementPosition`.
|
|
@@ -966,7 +991,7 @@ class le {
|
|
|
966
991
|
this.#e?.dispose(), this.#e = void 0;
|
|
967
992
|
};
|
|
968
993
|
}
|
|
969
|
-
const
|
|
994
|
+
const he = () => (
|
|
970
995
|
/* c8 ignore next */
|
|
971
996
|
typeof window < "u" ? window : void 0
|
|
972
997
|
);
|
|
@@ -987,164 +1012,172 @@ class be {
|
|
|
987
1012
|
this._store.set(e, s);
|
|
988
1013
|
};
|
|
989
1014
|
}
|
|
990
|
-
|
|
1015
|
+
let ce = null, ae = null;
|
|
1016
|
+
const st = () => (ce || (ce = new be()), ce), nt = () => (ae || (ae = new be()), ae), _e = ({
|
|
991
1017
|
key: t,
|
|
992
1018
|
defaultValue: e,
|
|
993
1019
|
store: s,
|
|
994
|
-
serialize:
|
|
995
|
-
deserialize:
|
|
996
|
-
equals:
|
|
997
|
-
onLoad:
|
|
1020
|
+
serialize: n = JSON.stringify,
|
|
1021
|
+
deserialize: r = JSON.parse,
|
|
1022
|
+
equals: o = (a, u) => a === u,
|
|
1023
|
+
onLoad: i = (a) => a,
|
|
998
1024
|
syncTabs: l = !0,
|
|
999
1025
|
onKeyChange: c = "load"
|
|
1000
1026
|
}) => {
|
|
1001
1027
|
let a = y.get(t);
|
|
1002
1028
|
const u = s.getItem(a), h = new Z(
|
|
1003
|
-
u != null ?
|
|
1004
|
-
|
|
1005
|
-
), p =
|
|
1006
|
-
let m = !1,
|
|
1007
|
-
const
|
|
1008
|
-
if (!
|
|
1009
|
-
const
|
|
1029
|
+
u != null ? i(r(u)) : typeof e == "function" ? e() : e,
|
|
1030
|
+
o
|
|
1031
|
+
), p = he(), d = l && typeof p?.BroadcastChannel == "function";
|
|
1032
|
+
let m = !1, w = null, D = null;
|
|
1033
|
+
const b = (S) => {
|
|
1034
|
+
if (!d) return null;
|
|
1035
|
+
const M = `tempo:storedProp:${S}`, A = new p.BroadcastChannel(M), k = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, P = (F) => {
|
|
1010
1036
|
const v = F.data;
|
|
1011
|
-
if (!(v == null || typeof v != "object" || v.key !==
|
|
1037
|
+
if (!(v == null || typeof v != "object" || v.key !== S || typeof v.value != "string" || v.sourceId != null && v.sourceId === k))
|
|
1012
1038
|
try {
|
|
1013
1039
|
m = !0;
|
|
1014
|
-
const
|
|
1015
|
-
h.set(
|
|
1016
|
-
} catch (
|
|
1040
|
+
const oe = i(r(v.value));
|
|
1041
|
+
h.set(oe);
|
|
1042
|
+
} catch (oe) {
|
|
1017
1043
|
console.warn(
|
|
1018
|
-
`Failed to sync storedProp for key "${
|
|
1019
|
-
|
|
1044
|
+
`Failed to sync storedProp for key "${S}" via BroadcastChannel`,
|
|
1045
|
+
oe
|
|
1020
1046
|
);
|
|
1021
1047
|
} finally {
|
|
1022
1048
|
m = !1;
|
|
1023
1049
|
}
|
|
1024
1050
|
};
|
|
1025
|
-
return A.addEventListener("message",
|
|
1026
|
-
A?.removeEventListener("message",
|
|
1027
|
-
}), { channel: A, instanceId:
|
|
1028
|
-
},
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1033
|
-
const A = h.get(),
|
|
1034
|
-
if (s.setItem(
|
|
1035
|
-
const F = s.getItem(
|
|
1051
|
+
return A.addEventListener("message", P), h.onDispose(() => {
|
|
1052
|
+
A?.removeEventListener("message", P), A?.close();
|
|
1053
|
+
}), { channel: A, instanceId: k, handleMessage: P };
|
|
1054
|
+
}, L = b(a);
|
|
1055
|
+
L && (w = L.channel, D = L.instanceId);
|
|
1056
|
+
const re = (S) => {
|
|
1057
|
+
const M = a;
|
|
1058
|
+
if (M === S) return;
|
|
1059
|
+
const A = h.get(), k = n(A);
|
|
1060
|
+
if (s.setItem(M, k), w != null && (w.close(), w = null, D = null), a = S, c === "load") {
|
|
1061
|
+
const F = s.getItem(S);
|
|
1036
1062
|
if (F != null)
|
|
1037
1063
|
try {
|
|
1038
|
-
const v =
|
|
1064
|
+
const v = i(r(F));
|
|
1039
1065
|
h.set(v);
|
|
1040
1066
|
} catch (v) {
|
|
1041
1067
|
console.warn(
|
|
1042
|
-
`Failed to load storedProp from new key "${
|
|
1068
|
+
`Failed to load storedProp from new key "${S}"`,
|
|
1043
1069
|
v
|
|
1044
1070
|
);
|
|
1045
1071
|
}
|
|
1046
1072
|
else
|
|
1047
|
-
s.setItem(
|
|
1048
|
-
} else c === "migrate" && s.setItem(
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1051
|
-
};
|
|
1052
|
-
return g.is(t) && h.onDispose(t.on(
|
|
1053
|
-
const A =
|
|
1054
|
-
s.setItem(a, A),
|
|
1073
|
+
s.setItem(S, k);
|
|
1074
|
+
} else c === "migrate" && s.setItem(S, k);
|
|
1075
|
+
const P = b(S);
|
|
1076
|
+
P && (w = P.channel, D = P.instanceId);
|
|
1077
|
+
};
|
|
1078
|
+
return g.is(t) && h.onDispose(t.on(re)), h.on((S, M) => {
|
|
1079
|
+
const A = n(S);
|
|
1080
|
+
s.setItem(a, A), w != null && !m && M !== void 0 && D != null && w.postMessage({
|
|
1055
1081
|
key: a,
|
|
1056
1082
|
value: A,
|
|
1057
1083
|
sourceId: D
|
|
1058
1084
|
});
|
|
1059
1085
|
}), h;
|
|
1060
|
-
},
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1086
|
+
}, ts = (t) => {
|
|
1087
|
+
const s = he()?.localStorage, n = s && typeof s.getItem == "function" ? s : st();
|
|
1088
|
+
return _e({
|
|
1089
|
+
...t,
|
|
1090
|
+
store: n
|
|
1091
|
+
});
|
|
1092
|
+
}, ss = (t) => {
|
|
1093
|
+
const s = he()?.sessionStorage, n = s && typeof s.getItem == "function" ? s : nt();
|
|
1094
|
+
return _e({
|
|
1095
|
+
...t,
|
|
1096
|
+
store: n
|
|
1097
|
+
});
|
|
1098
|
+
};
|
|
1099
|
+
function me(t) {
|
|
1070
1100
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
1071
1101
|
}
|
|
1072
|
-
const
|
|
1073
|
-
const
|
|
1074
|
-
let l =
|
|
1075
|
-
const
|
|
1102
|
+
const rt = (t, e, s, n) => {
|
|
1103
|
+
const r = n?.duration ?? 300, o = n?.easing ?? ((b) => b), i = n?.equals ?? ((b, L) => b === L);
|
|
1104
|
+
let l = n?.interpolate, c = t, a = e(), u = performance.now(), h = null, p = !0;
|
|
1105
|
+
const d = new N(e, i), m = T(t, i);
|
|
1076
1106
|
m.onDispose(() => {
|
|
1077
1107
|
h !== null && cancelAnimationFrame(h);
|
|
1078
|
-
}), m.onDispose(
|
|
1079
|
-
|
|
1108
|
+
}), m.onDispose(d.dispose), s.forEach((b) => {
|
|
1109
|
+
b.setDerivative(d), b.onDispose(m.dispose);
|
|
1080
1110
|
});
|
|
1081
|
-
const
|
|
1082
|
-
a =
|
|
1111
|
+
const w = (b) => {
|
|
1112
|
+
a = b, u = performance.now(), c = m.value, p && (p = !1, h = me(D));
|
|
1083
1113
|
}, D = () => {
|
|
1084
|
-
const
|
|
1085
|
-
l == null && (l =
|
|
1086
|
-
let
|
|
1087
|
-
|
|
1088
|
-
};
|
|
1089
|
-
return
|
|
1090
|
-
},
|
|
1091
|
-
const { initialValue: s, ...
|
|
1092
|
-
return
|
|
1114
|
+
const L = (performance.now() - u) / y.get(r), re = o(L);
|
|
1115
|
+
l == null && (l = tt(c));
|
|
1116
|
+
let S = l(c, a, re);
|
|
1117
|
+
L >= 1 ? (p = !0, S = a) : h = me(D), m.set(S);
|
|
1118
|
+
};
|
|
1119
|
+
return d.on(w), m;
|
|
1120
|
+
}, ns = (t, e) => {
|
|
1121
|
+
const { initialValue: s, ...n } = e ?? {};
|
|
1122
|
+
return rt(
|
|
1093
1123
|
/* c8 ignore next 2 */
|
|
1094
1124
|
s ?? t.get(),
|
|
1095
1125
|
t.get,
|
|
1096
1126
|
[t],
|
|
1097
|
-
|
|
1127
|
+
n
|
|
1098
1128
|
);
|
|
1099
|
-
},
|
|
1100
|
-
const s = Object.values(t).filter(g.is),
|
|
1129
|
+
}, ot = (t, e) => {
|
|
1130
|
+
const s = Object.values(t).filter(g.is), n = Object.keys(t);
|
|
1101
1131
|
return z(() => {
|
|
1102
|
-
const
|
|
1103
|
-
for (const
|
|
1104
|
-
|
|
1105
|
-
return e(
|
|
1132
|
+
const r = {};
|
|
1133
|
+
for (const o of n)
|
|
1134
|
+
r[o] = y.get(t[o]);
|
|
1135
|
+
return e(r);
|
|
1106
1136
|
}, s);
|
|
1107
|
-
},
|
|
1137
|
+
}, rs = (t) => ot(t, (e) => e), os = (t, e) => {
|
|
1108
1138
|
const s = T(t.get());
|
|
1109
|
-
let
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
()
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1139
|
+
let n = null;
|
|
1140
|
+
const r = t.on(
|
|
1141
|
+
(o) => {
|
|
1142
|
+
n != null && clearTimeout(n), n = setTimeout(
|
|
1143
|
+
() => {
|
|
1144
|
+
n = null, s.set(o);
|
|
1145
|
+
},
|
|
1146
|
+
typeof e == "function" ? e(o) : e
|
|
1147
|
+
);
|
|
1148
|
+
},
|
|
1149
|
+
{ noAutoDispose: !0 }
|
|
1150
|
+
);
|
|
1118
1151
|
return s.onDispose(() => {
|
|
1119
|
-
|
|
1152
|
+
r(), n != null && clearTimeout(n);
|
|
1120
1153
|
}), s;
|
|
1121
|
-
},
|
|
1154
|
+
}, is = (t) => {
|
|
1122
1155
|
let e;
|
|
1123
1156
|
return t.map((s) => {
|
|
1124
|
-
const
|
|
1125
|
-
return e = s,
|
|
1157
|
+
const n = e;
|
|
1158
|
+
return e = s, n;
|
|
1126
1159
|
});
|
|
1127
|
-
},
|
|
1160
|
+
}, ls = ({
|
|
1128
1161
|
size: t = void 0,
|
|
1129
1162
|
signal: e
|
|
1130
1163
|
}) => {
|
|
1131
1164
|
const s = [];
|
|
1132
|
-
return e.map((
|
|
1133
|
-
},
|
|
1165
|
+
return e.map((n) => (s.push(n), t != null && s.length > t && s.shift(), s.slice()));
|
|
1166
|
+
}, cs = (t) => (...e) => ee(
|
|
1134
1167
|
t,
|
|
1135
1168
|
...e
|
|
1136
|
-
)((s, ...
|
|
1137
|
-
function
|
|
1169
|
+
)((s, ...n) => s(...n));
|
|
1170
|
+
function as(...t) {
|
|
1138
1171
|
return ee(...t)((...e) => {
|
|
1139
1172
|
for (const s of e) if (s != null) return s;
|
|
1140
1173
|
});
|
|
1141
1174
|
}
|
|
1142
|
-
const
|
|
1175
|
+
const ve = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), Te = /* @__PURE__ */ new Set(["selected"]), Ae = /* @__PURE__ */ new Set([
|
|
1143
1176
|
"rowSpan",
|
|
1144
1177
|
"colSpan",
|
|
1145
1178
|
"tabIndex",
|
|
1146
1179
|
"valueAsNumber"
|
|
1147
|
-
]),
|
|
1180
|
+
]), Ee = /* @__PURE__ */ new Set(["valueAsDate"]), Ce = /* @__PURE__ */ new Set([
|
|
1148
1181
|
"value",
|
|
1149
1182
|
"textContent",
|
|
1150
1183
|
"innerText",
|
|
@@ -1152,28 +1185,28 @@ const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), _e = /* @
|
|
|
1152
1185
|
"outerHTML",
|
|
1153
1186
|
"className",
|
|
1154
1187
|
"classList"
|
|
1155
|
-
]),
|
|
1188
|
+
]), it = (t, e) => Te.has(t) ? (s) => {
|
|
1156
1189
|
s == null || s !== !0 ? e.removeAttribute(t) : e.setAttribute(t, "");
|
|
1157
|
-
} : we.has(t) ? (s) => {
|
|
1158
|
-
s == null ? e[t] = null : e[t] = !!s;
|
|
1159
1190
|
} : ve.has(t) ? (s) => {
|
|
1191
|
+
s == null ? e[t] = null : e[t] = !!s;
|
|
1192
|
+
} : Ae.has(t) ? (s) => {
|
|
1160
1193
|
s == null ? e[t] = null : e[t] = Number(s);
|
|
1161
|
-
} :
|
|
1194
|
+
} : Ee.has(t) ? (s) => {
|
|
1162
1195
|
s == null ? e[t] = null : e[t] = s;
|
|
1163
|
-
} :
|
|
1196
|
+
} : Ce.has(t) ? (s) => {
|
|
1164
1197
|
s == null ? e[t] = null : e[t] = String(s);
|
|
1165
1198
|
} : (s) => {
|
|
1166
1199
|
s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
|
|
1167
|
-
},
|
|
1200
|
+
}, lt = (t, e) => Te.has(t) ? () => e.hasAttribute(t) : ve.has(t) ? () => !!e[t] : Ae.has(t) ? () => Number(e[t]) : Ee.has(t) ? () => e[t] : Ce.has(t) ? () => String(e[t]) : () => e.getAttribute(t), U = (t) => {
|
|
1168
1201
|
const e = t;
|
|
1169
1202
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
1170
|
-
},
|
|
1171
|
-
class
|
|
1203
|
+
}, ct = (t) => De(t) ? t : t.parentElement, De = (t) => t.nodeType === 1;
|
|
1204
|
+
class Le extends Error {
|
|
1172
1205
|
constructor(e) {
|
|
1173
1206
|
super(`Provider not found: ${e.description}`);
|
|
1174
1207
|
}
|
|
1175
1208
|
}
|
|
1176
|
-
class
|
|
1209
|
+
class $ {
|
|
1177
1210
|
/**
|
|
1178
1211
|
* Constructs a new `DOMContext` instance.
|
|
1179
1212
|
*
|
|
@@ -1183,8 +1216,8 @@ class N {
|
|
|
1183
1216
|
* @param providers - The `Providers` instance associated with this context.
|
|
1184
1217
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
1185
1218
|
*/
|
|
1186
|
-
constructor(e, s,
|
|
1187
|
-
this.document = e, this.element = s, this.reference =
|
|
1219
|
+
constructor(e, s, n, r) {
|
|
1220
|
+
this.document = e, this.element = s, this.reference = n, this.providers = r;
|
|
1188
1221
|
}
|
|
1189
1222
|
/**
|
|
1190
1223
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
@@ -1194,8 +1227,8 @@ class N {
|
|
|
1194
1227
|
* @param providers - The providers to associate with the `DOMContext`.
|
|
1195
1228
|
* @returns A new `DOMContext` instance.
|
|
1196
1229
|
*/
|
|
1197
|
-
static of(e, s,
|
|
1198
|
-
return new
|
|
1230
|
+
static of(e, s, n) {
|
|
1231
|
+
return new $(e.ownerDocument, e, s, n);
|
|
1199
1232
|
}
|
|
1200
1233
|
/**
|
|
1201
1234
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
@@ -1228,8 +1261,8 @@ class N {
|
|
|
1228
1261
|
* @returns A new DOMContext focused on the newly created child element
|
|
1229
1262
|
*/
|
|
1230
1263
|
makeChildElement = (e, s) => {
|
|
1231
|
-
const
|
|
1232
|
-
return this.appendOrInsert(
|
|
1264
|
+
const n = this.createElement(e, s);
|
|
1265
|
+
return this.appendOrInsert(n), this.withElement(n);
|
|
1233
1266
|
};
|
|
1234
1267
|
/**
|
|
1235
1268
|
* Creates a new text node with the specified text content.
|
|
@@ -1280,7 +1313,7 @@ class N {
|
|
|
1280
1313
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
1281
1314
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
1282
1315
|
*/
|
|
1283
|
-
withElement = (e) => new
|
|
1316
|
+
withElement = (e) => new $(this.document, e, void 0, this.providers);
|
|
1284
1317
|
/**
|
|
1285
1318
|
* Creates a portal to render content in a different part of the DOM tree.
|
|
1286
1319
|
*
|
|
@@ -1337,7 +1370,7 @@ class N {
|
|
|
1337
1370
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
1338
1371
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
1339
1372
|
*/
|
|
1340
|
-
withReference = (e) => new
|
|
1373
|
+
withReference = (e) => new $(this.document, this.element, e, this.providers);
|
|
1341
1374
|
/**
|
|
1342
1375
|
* Sets a provider for the given provider mark.
|
|
1343
1376
|
*
|
|
@@ -1345,9 +1378,9 @@ class N {
|
|
|
1345
1378
|
* @param value - The provider to set for the given mark.
|
|
1346
1379
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
1347
1380
|
*/
|
|
1348
|
-
setProvider = (e, s,
|
|
1381
|
+
setProvider = (e, s, n) => new $(this.document, this.element, this.reference, {
|
|
1349
1382
|
...this.providers,
|
|
1350
|
-
[e]: [s,
|
|
1383
|
+
[e]: [s, n]
|
|
1351
1384
|
});
|
|
1352
1385
|
/**
|
|
1353
1386
|
* Retrieves a provider for the given provider mark.
|
|
@@ -1358,9 +1391,9 @@ class N {
|
|
|
1358
1391
|
*/
|
|
1359
1392
|
getProvider = (e) => {
|
|
1360
1393
|
if (this.providers[e] === void 0)
|
|
1361
|
-
throw new
|
|
1362
|
-
const [s,
|
|
1363
|
-
return { value: s, onUse:
|
|
1394
|
+
throw new Le(e);
|
|
1395
|
+
const [s, n] = this.providers[e];
|
|
1396
|
+
return { value: s, onUse: n };
|
|
1364
1397
|
};
|
|
1365
1398
|
clear = (e) => {
|
|
1366
1399
|
e && (this.reference !== void 0 ? U(this.reference) : U(this.element));
|
|
@@ -1391,10 +1424,10 @@ class N {
|
|
|
1391
1424
|
* @param options - The options for the event listener.
|
|
1392
1425
|
* @returns A function to remove the event listener.
|
|
1393
1426
|
*/
|
|
1394
|
-
on = (e, s,
|
|
1395
|
-
const
|
|
1396
|
-
return this.element.addEventListener(e,
|
|
1397
|
-
|
|
1427
|
+
on = (e, s, n) => {
|
|
1428
|
+
const r = (o) => s(o, this);
|
|
1429
|
+
return this.element.addEventListener(e, r, n), (o) => {
|
|
1430
|
+
o && this.element.removeEventListener(e, r, n);
|
|
1398
1431
|
};
|
|
1399
1432
|
};
|
|
1400
1433
|
/**
|
|
@@ -1433,57 +1466,57 @@ class N {
|
|
|
1433
1466
|
*/
|
|
1434
1467
|
getStyle = (e) => this.element.style[e];
|
|
1435
1468
|
makeAccessors = (e) => ({
|
|
1436
|
-
get:
|
|
1437
|
-
set:
|
|
1469
|
+
get: lt(e, this.element),
|
|
1470
|
+
set: it(e, this.element)
|
|
1438
1471
|
});
|
|
1439
1472
|
getWindow = () => this.document.defaultView;
|
|
1440
1473
|
}
|
|
1441
|
-
const
|
|
1442
|
-
const s = new
|
|
1443
|
-
return (
|
|
1444
|
-
s.dispose(), r
|
|
1445
|
-
};
|
|
1446
|
-
},
|
|
1447
|
-
const
|
|
1448
|
-
if (
|
|
1449
|
-
throw new
|
|
1474
|
+
const at = (t) => Symbol(t), fe = (t, e) => {
|
|
1475
|
+
const s = new j(), n = x(s, () => t(e));
|
|
1476
|
+
return (r = !0) => {
|
|
1477
|
+
s.dispose(), n(r);
|
|
1478
|
+
};
|
|
1479
|
+
}, us = (t, e, { doc: s, clear: n, disposeWithParent: r = !0, providers: o = {} } = {}) => {
|
|
1480
|
+
const i = typeof e == "string" ? (s ?? document).querySelector(e) : e;
|
|
1481
|
+
if (i === null)
|
|
1482
|
+
throw new ut(
|
|
1450
1483
|
`Cannot find element by selector for render: ${e}`
|
|
1451
1484
|
);
|
|
1452
|
-
|
|
1453
|
-
const l =
|
|
1485
|
+
n !== !1 && (s ?? i.ownerDocument) != null && i.nodeType === 1 && (i.innerHTML = "");
|
|
1486
|
+
const l = ct(i), c = De(i) ? void 0 : i, a = $.of(l, c, o), u = fe(t, a);
|
|
1454
1487
|
let h;
|
|
1455
|
-
return
|
|
1456
|
-
p[0]?.removedNodes.forEach((
|
|
1457
|
-
|
|
1488
|
+
return r && (h = new MutationObserver((p) => {
|
|
1489
|
+
p[0]?.removedNodes.forEach((d) => {
|
|
1490
|
+
d === i && (h?.disconnect(), u(i.nodeType !== 1));
|
|
1458
1491
|
});
|
|
1459
|
-
}), h.observe(
|
|
1492
|
+
}), h.observe(i.parentElement, {
|
|
1460
1493
|
childList: !0,
|
|
1461
1494
|
subtree: !1,
|
|
1462
1495
|
attributes: !1
|
|
1463
1496
|
})), () => {
|
|
1464
1497
|
h?.disconnect(), u(!0);
|
|
1465
1498
|
};
|
|
1466
|
-
},
|
|
1499
|
+
}, hs = (t, {
|
|
1467
1500
|
startUrl: e = "https://example.com",
|
|
1468
1501
|
selector: s,
|
|
1469
|
-
providers:
|
|
1502
|
+
providers: n = {}
|
|
1470
1503
|
} = {
|
|
1471
1504
|
selector: "body"
|
|
1472
1505
|
}) => {
|
|
1473
|
-
const
|
|
1506
|
+
const r = y.toSignal(e).deriveProp(), o = new ke(s, void 0), i = new R(o, void 0, { currentURL: r }, n);
|
|
1474
1507
|
return {
|
|
1475
|
-
clear:
|
|
1476
|
-
root:
|
|
1477
|
-
currentURL:
|
|
1508
|
+
clear: fe(t(), i),
|
|
1509
|
+
root: o,
|
|
1510
|
+
currentURL: r
|
|
1478
1511
|
};
|
|
1479
1512
|
};
|
|
1480
|
-
class
|
|
1513
|
+
class ut extends Error {
|
|
1481
1514
|
constructor(e) {
|
|
1482
1515
|
super(e);
|
|
1483
1516
|
}
|
|
1484
1517
|
}
|
|
1485
|
-
const
|
|
1486
|
-
class
|
|
1518
|
+
const Pe = "data-tts-node", G = "data-tts-class", J = "data-tts-style", X = "data-tts-html", Y = "data-tts-text", Q = "data-tts-attrs";
|
|
1519
|
+
class fs {
|
|
1487
1520
|
/**
|
|
1488
1521
|
* Selects elements from the headless environment.
|
|
1489
1522
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -1560,10 +1593,10 @@ class ns {
|
|
|
1560
1593
|
constructor({
|
|
1561
1594
|
select: e,
|
|
1562
1595
|
getAttribute: s,
|
|
1563
|
-
setAttribute:
|
|
1564
|
-
getClass:
|
|
1565
|
-
setClass:
|
|
1566
|
-
getStyles:
|
|
1596
|
+
setAttribute: n,
|
|
1597
|
+
getClass: r,
|
|
1598
|
+
setClass: o,
|
|
1599
|
+
getStyles: i,
|
|
1567
1600
|
setStyles: l,
|
|
1568
1601
|
appendHTML: c,
|
|
1569
1602
|
getInnerHTML: a,
|
|
@@ -1571,7 +1604,7 @@ class ns {
|
|
|
1571
1604
|
getInnerText: h,
|
|
1572
1605
|
setInnerText: p
|
|
1573
1606
|
}) {
|
|
1574
|
-
this.select = e, this.getAttribute = s, this.setAttribute =
|
|
1607
|
+
this.select = e, this.getAttribute = s, this.setAttribute = n, this.getClass = r, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = u, this.getInnerText = h, this.setInnerText = p;
|
|
1575
1608
|
}
|
|
1576
1609
|
/**
|
|
1577
1610
|
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
@@ -1582,116 +1615,116 @@ class ns {
|
|
|
1582
1615
|
* when you render on the server and then hydrate on the client.
|
|
1583
1616
|
*/
|
|
1584
1617
|
setFromRoot = (e, s) => {
|
|
1585
|
-
e.getPortals().forEach((
|
|
1586
|
-
const
|
|
1587
|
-
for (const
|
|
1588
|
-
if (
|
|
1618
|
+
e.getPortals().forEach((r) => {
|
|
1619
|
+
const o = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
|
|
1620
|
+
for (const i of o) {
|
|
1621
|
+
if (i == null)
|
|
1589
1622
|
throw new Error(
|
|
1590
|
-
`Cannot find element by selector for render: ${
|
|
1623
|
+
`Cannot find element by selector for render: ${r.selector}`
|
|
1591
1624
|
);
|
|
1592
|
-
if (
|
|
1625
|
+
if (r.hasChildren() && this.appendHTML(i, r.contentToHTML(s)), r.hasInnerHTML()) {
|
|
1593
1626
|
if (s) {
|
|
1594
|
-
const l = this.getInnerHTML(
|
|
1595
|
-
l != null && this.setAttribute(
|
|
1627
|
+
const l = this.getInnerHTML(i);
|
|
1628
|
+
l != null && this.setAttribute(i, X, l);
|
|
1596
1629
|
}
|
|
1597
|
-
this.setInnerHTML(
|
|
1630
|
+
this.setInnerHTML(i, r.getInnerHTML());
|
|
1598
1631
|
}
|
|
1599
|
-
if (
|
|
1632
|
+
if (r.hasInnerText()) {
|
|
1600
1633
|
if (s) {
|
|
1601
|
-
const l = this.getInnerText(
|
|
1602
|
-
l != null && this.setAttribute(
|
|
1634
|
+
const l = this.getInnerText(i);
|
|
1635
|
+
l != null && this.setAttribute(i, Y, l);
|
|
1603
1636
|
}
|
|
1604
|
-
this.setInnerText(
|
|
1637
|
+
this.setInnerText(i, r.getInnerText());
|
|
1605
1638
|
}
|
|
1606
|
-
if (
|
|
1639
|
+
if (r.hasClasses()) {
|
|
1607
1640
|
if (s) {
|
|
1608
|
-
const l = this.getClass(
|
|
1609
|
-
l != null && this.setAttribute(
|
|
1641
|
+
const l = this.getClass(i);
|
|
1642
|
+
l != null && this.setAttribute(i, G, l);
|
|
1610
1643
|
}
|
|
1611
|
-
this.setClass(
|
|
1644
|
+
this.setClass(i, r.getClasses().join(" "));
|
|
1612
1645
|
}
|
|
1613
|
-
if (
|
|
1646
|
+
if (r.hasStyles()) {
|
|
1614
1647
|
if (s) {
|
|
1615
|
-
const l = this.getStyles(
|
|
1648
|
+
const l = this.getStyles(i);
|
|
1616
1649
|
Object.keys(l).length > 0 && this.setAttribute(
|
|
1617
|
-
|
|
1618
|
-
|
|
1650
|
+
i,
|
|
1651
|
+
J,
|
|
1619
1652
|
JSON.stringify(l)
|
|
1620
1653
|
);
|
|
1621
1654
|
}
|
|
1622
|
-
this.setStyles(
|
|
1655
|
+
this.setStyles(i, r.getStyles());
|
|
1623
1656
|
}
|
|
1624
|
-
if (
|
|
1625
|
-
const l =
|
|
1657
|
+
if (r.hasAttributes()) {
|
|
1658
|
+
const l = r.getAttributes();
|
|
1626
1659
|
if (s) {
|
|
1627
1660
|
const c = [];
|
|
1628
1661
|
l.forEach(([a]) => {
|
|
1629
|
-
const u = this.getAttribute(
|
|
1662
|
+
const u = this.getAttribute(i, a);
|
|
1630
1663
|
u != null && c.push([a, u]);
|
|
1631
1664
|
}), c.length > 0 && this.setAttribute(
|
|
1632
|
-
|
|
1665
|
+
i,
|
|
1633
1666
|
Q,
|
|
1634
1667
|
JSON.stringify(Object.fromEntries(c))
|
|
1635
1668
|
);
|
|
1636
1669
|
}
|
|
1637
1670
|
l.forEach(([c, a]) => {
|
|
1638
|
-
this.setAttribute(
|
|
1671
|
+
this.setAttribute(i, c, a);
|
|
1639
1672
|
});
|
|
1640
1673
|
}
|
|
1641
1674
|
}
|
|
1642
1675
|
});
|
|
1643
1676
|
};
|
|
1644
1677
|
}
|
|
1645
|
-
const
|
|
1646
|
-
document.querySelectorAll(`[${
|
|
1647
|
-
},
|
|
1648
|
-
const e = t.getAttribute(
|
|
1649
|
-
t.removeAttribute(
|
|
1650
|
-
},
|
|
1651
|
-
document.querySelectorAll(`[${
|
|
1652
|
-
},
|
|
1678
|
+
const ht = () => {
|
|
1679
|
+
document.querySelectorAll(`[${Pe}]`).forEach(U);
|
|
1680
|
+
}, ft = (t) => {
|
|
1681
|
+
const e = t.getAttribute(G);
|
|
1682
|
+
t.removeAttribute(G), e != null && t.setAttribute("class", e);
|
|
1683
|
+
}, dt = () => {
|
|
1684
|
+
document.querySelectorAll(`[${G}]`).forEach((e) => ft(e));
|
|
1685
|
+
}, pt = (t) => {
|
|
1653
1686
|
const e = t.getAttribute(X);
|
|
1654
1687
|
t.removeAttribute(X), e != null && (t.innerHTML = e);
|
|
1655
|
-
},
|
|
1656
|
-
document.querySelectorAll(`[${X}]`).forEach((e) =>
|
|
1657
|
-
},
|
|
1688
|
+
}, gt = () => {
|
|
1689
|
+
document.querySelectorAll(`[${X}]`).forEach((e) => pt(e));
|
|
1690
|
+
}, mt = (t) => {
|
|
1658
1691
|
const e = t.getAttribute(Y);
|
|
1659
1692
|
t.removeAttribute(Y), e != null && (t.innerText = e);
|
|
1660
|
-
},
|
|
1661
|
-
document.querySelectorAll(`[${Y}]`).forEach((e) =>
|
|
1662
|
-
},
|
|
1663
|
-
const e = t.getAttribute(
|
|
1664
|
-
if (t.removeAttribute(
|
|
1665
|
-
const s =
|
|
1666
|
-
Object.entries(s).forEach(([
|
|
1667
|
-
t.style.setProperty(
|
|
1693
|
+
}, yt = () => {
|
|
1694
|
+
document.querySelectorAll(`[${Y}]`).forEach((e) => mt(e));
|
|
1695
|
+
}, xe = (t) => JSON.parse(t.replace(/"/g, '"')), St = (t) => {
|
|
1696
|
+
const e = t.getAttribute(J);
|
|
1697
|
+
if (t.removeAttribute(J), e != null) {
|
|
1698
|
+
const s = xe(e);
|
|
1699
|
+
Object.entries(s).forEach(([n, r]) => {
|
|
1700
|
+
t.style.setProperty(n, r);
|
|
1668
1701
|
});
|
|
1669
1702
|
}
|
|
1670
|
-
},
|
|
1671
|
-
document.querySelectorAll(`[${
|
|
1672
|
-
},
|
|
1703
|
+
}, wt = () => {
|
|
1704
|
+
document.querySelectorAll(`[${J}]`).forEach((e) => St(e));
|
|
1705
|
+
}, bt = (t) => {
|
|
1673
1706
|
const e = t.getAttribute(Q);
|
|
1674
1707
|
if (t.removeAttribute(Q), e != null) {
|
|
1675
|
-
const s =
|
|
1676
|
-
Object.entries(s).forEach(([
|
|
1677
|
-
|
|
1708
|
+
const s = xe(e);
|
|
1709
|
+
Object.entries(s).forEach(([n, r]) => {
|
|
1710
|
+
r == null ? t.removeAttribute(n) : t.setAttribute(n, r);
|
|
1678
1711
|
});
|
|
1679
1712
|
}
|
|
1680
|
-
},
|
|
1681
|
-
document.querySelectorAll(`[${Q}]`).forEach((e) =>
|
|
1682
|
-
},
|
|
1683
|
-
|
|
1684
|
-
}, I = Symbol("class"), H = Symbol("style"), B = Symbol("handler"),
|
|
1685
|
-
class
|
|
1713
|
+
}, _t = () => {
|
|
1714
|
+
document.querySelectorAll(`[${Q}]`).forEach((e) => bt(e));
|
|
1715
|
+
}, ds = () => {
|
|
1716
|
+
ht(), dt(), yt(), gt(), wt(), _t();
|
|
1717
|
+
}, I = Symbol("class"), H = Symbol("style"), B = Symbol("handler"), Oe = () => Math.random().toString(36).substring(2, 15), vt = (t) => t.replace(/<[^>]*>?/g, "");
|
|
1718
|
+
class Me {
|
|
1686
1719
|
constructor(e) {
|
|
1687
1720
|
this.parent = e;
|
|
1688
1721
|
}
|
|
1689
|
-
id =
|
|
1722
|
+
id = Oe();
|
|
1690
1723
|
properties = {};
|
|
1691
1724
|
children = [];
|
|
1692
1725
|
isElement = () => !0;
|
|
1693
1726
|
isText = () => !1;
|
|
1694
|
-
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
1727
|
+
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? vt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
|
|
1695
1728
|
removeChild = (e) => {
|
|
1696
1729
|
const s = this.children.indexOf(e);
|
|
1697
1730
|
s !== -1 && this.children.splice(s, 1);
|
|
@@ -1721,43 +1754,43 @@ class Le {
|
|
|
1721
1754
|
if (this.properties.id === e)
|
|
1722
1755
|
return this;
|
|
1723
1756
|
for (const s of this.elements()) {
|
|
1724
|
-
const
|
|
1725
|
-
if (
|
|
1726
|
-
return
|
|
1757
|
+
const n = s.getById(e);
|
|
1758
|
+
if (n != null)
|
|
1759
|
+
return n;
|
|
1727
1760
|
}
|
|
1728
1761
|
};
|
|
1729
1762
|
trigger = (e, s) => {
|
|
1730
|
-
((this.properties[B] ?? {})[e] ?? []).forEach((
|
|
1763
|
+
((this.properties[B] ?? {})[e] ?? []).forEach((r) => r(s));
|
|
1731
1764
|
};
|
|
1732
1765
|
click = () => {
|
|
1733
1766
|
this.trigger("click", {});
|
|
1734
1767
|
};
|
|
1735
|
-
on = (e, s,
|
|
1736
|
-
const
|
|
1737
|
-
l(), s(c,
|
|
1738
|
-
} : (c) => s(c,
|
|
1739
|
-
|
|
1768
|
+
on = (e, s, n, r) => {
|
|
1769
|
+
const o = this.properties[B] ??= {}, i = r?.once ? (c) => {
|
|
1770
|
+
l(), s(c, n);
|
|
1771
|
+
} : (c) => s(c, n);
|
|
1772
|
+
o[e] = [...o[e] ?? [], i];
|
|
1740
1773
|
const l = () => {
|
|
1741
|
-
const c =
|
|
1742
|
-
a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete
|
|
1774
|
+
const c = o[e] ?? [], a = c.indexOf(i);
|
|
1775
|
+
a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[B]) : o[e] = c, r?.signal != null && r.signal.removeEventListener("abort", l));
|
|
1743
1776
|
};
|
|
1744
|
-
return
|
|
1777
|
+
return r?.signal != null && r.signal.addEventListener("abort", l), l;
|
|
1745
1778
|
};
|
|
1746
1779
|
addClasses = (e) => {
|
|
1747
1780
|
if (e.length === 0)
|
|
1748
1781
|
return;
|
|
1749
1782
|
const s = this.properties[I] ??= [];
|
|
1750
|
-
e.forEach((
|
|
1751
|
-
s.includes(
|
|
1783
|
+
e.forEach((n) => {
|
|
1784
|
+
s.includes(n) || s.push(n);
|
|
1752
1785
|
});
|
|
1753
1786
|
};
|
|
1754
1787
|
removeClasses = (e) => {
|
|
1755
1788
|
if (e.length === 0)
|
|
1756
1789
|
return;
|
|
1757
1790
|
const s = this.properties[I] ??= [];
|
|
1758
|
-
e.forEach((
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1791
|
+
e.forEach((n) => {
|
|
1792
|
+
const r = s.indexOf(n);
|
|
1793
|
+
r !== -1 && s.splice(r, 1);
|
|
1761
1794
|
}), s.length === 0 && delete this.properties[I];
|
|
1762
1795
|
};
|
|
1763
1796
|
getClasses = () => this.properties[I] ?? [];
|
|
@@ -1768,8 +1801,8 @@ class Le {
|
|
|
1768
1801
|
(e) => e === I ? [["class", this.getClasses()]] : e === H ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1769
1802
|
);
|
|
1770
1803
|
setStyle = (e, s) => {
|
|
1771
|
-
const
|
|
1772
|
-
|
|
1804
|
+
const n = this.properties[H] ??= {};
|
|
1805
|
+
n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[H]);
|
|
1773
1806
|
};
|
|
1774
1807
|
getStyle = (e) => this.properties[H]?.[e] ?? "";
|
|
1775
1808
|
getStyles = () => this.properties[H] ?? {};
|
|
@@ -1777,24 +1810,24 @@ class Le {
|
|
|
1777
1810
|
const s = this.properties;
|
|
1778
1811
|
return {
|
|
1779
1812
|
get: () => s[e],
|
|
1780
|
-
set: (
|
|
1813
|
+
set: (n) => s[e] = n
|
|
1781
1814
|
};
|
|
1782
1815
|
};
|
|
1783
1816
|
}
|
|
1784
|
-
const
|
|
1785
|
-
class
|
|
1786
|
-
constructor(e, s,
|
|
1787
|
-
super(
|
|
1817
|
+
const Tt = (t) => t.replace(/"/g, """), At = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1818
|
+
class Et extends Me {
|
|
1819
|
+
constructor(e, s, n) {
|
|
1820
|
+
super(n), this.tagName = e, this.namespace = s;
|
|
1788
1821
|
}
|
|
1789
1822
|
isPortal = () => !1;
|
|
1790
1823
|
toHTML = (e = !1) => {
|
|
1791
|
-
const s = this.children.map((l) => l.toHTML()).join(""),
|
|
1792
|
-
let
|
|
1793
|
-
const
|
|
1794
|
-
return
|
|
1824
|
+
const s = this.children.map((l) => l.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1825
|
+
let r = null;
|
|
1826
|
+
const o = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` : Dt.has(l) ? ` ${l}` : l === "innerHTML" ? (r = c, "") : l === "innerText" ? (r = At(c), "") : ` ${l}="${Tt(c)}"`).join(""), i = e ? ` ${Pe}` : "";
|
|
1827
|
+
return Lt.has(this.tagName) && s === "" ? `<${this.tagName}${n}${o}${i} />` : `<${this.tagName}${n}${o}${i}>${r ?? s}</${this.tagName}>`;
|
|
1795
1828
|
};
|
|
1796
1829
|
}
|
|
1797
|
-
class
|
|
1830
|
+
class ke extends Me {
|
|
1798
1831
|
constructor(e, s) {
|
|
1799
1832
|
super(s), this.selector = e;
|
|
1800
1833
|
}
|
|
@@ -1802,19 +1835,19 @@ class Oe extends Le {
|
|
|
1802
1835
|
toHTML = () => "";
|
|
1803
1836
|
contentToHTML = (e = !1) => this.children.map((s) => s.toHTML(e)).join("");
|
|
1804
1837
|
}
|
|
1805
|
-
class
|
|
1838
|
+
class Ct {
|
|
1806
1839
|
constructor(e) {
|
|
1807
1840
|
this.text = e;
|
|
1808
1841
|
}
|
|
1809
|
-
id =
|
|
1842
|
+
id = Oe();
|
|
1810
1843
|
isElement = () => !1;
|
|
1811
1844
|
isText = () => !0;
|
|
1812
1845
|
getText = () => this.text;
|
|
1813
1846
|
toHTML = () => this.text;
|
|
1814
1847
|
}
|
|
1815
1848
|
class R {
|
|
1816
|
-
constructor(e, s,
|
|
1817
|
-
this.element = e, this.reference = s, this.container =
|
|
1849
|
+
constructor(e, s, n, r) {
|
|
1850
|
+
this.element = e, this.reference = s, this.container = n, this.providers = r;
|
|
1818
1851
|
}
|
|
1819
1852
|
appendOrInsert = (e) => {
|
|
1820
1853
|
if (this.reference != null) {
|
|
@@ -1824,16 +1857,16 @@ class R {
|
|
|
1824
1857
|
this.element.children.push(e);
|
|
1825
1858
|
};
|
|
1826
1859
|
makeChildElement = (e, s) => {
|
|
1827
|
-
const
|
|
1828
|
-
return this.appendOrInsert(
|
|
1829
|
-
|
|
1860
|
+
const n = new Et(e, s, this.element);
|
|
1861
|
+
return this.appendOrInsert(n), new R(
|
|
1862
|
+
n,
|
|
1830
1863
|
void 0,
|
|
1831
1864
|
this.container,
|
|
1832
1865
|
this.providers
|
|
1833
1866
|
);
|
|
1834
1867
|
};
|
|
1835
1868
|
makeChildText = (e) => {
|
|
1836
|
-
const s = new
|
|
1869
|
+
const s = new Ct(e);
|
|
1837
1870
|
return this.appendOrInsert(s), new R(
|
|
1838
1871
|
this.element,
|
|
1839
1872
|
s,
|
|
@@ -1847,7 +1880,7 @@ class R {
|
|
|
1847
1880
|
getText = () => this.reference?.getText() ?? this.element.getText();
|
|
1848
1881
|
makeRef = () => this.makeChildText("");
|
|
1849
1882
|
makePortal = (e) => {
|
|
1850
|
-
const s = new
|
|
1883
|
+
const s = new ke(e, this.element);
|
|
1851
1884
|
return this.appendOrInsert(s), new R(
|
|
1852
1885
|
s,
|
|
1853
1886
|
void 0,
|
|
@@ -1862,15 +1895,15 @@ class R {
|
|
|
1862
1895
|
* @param value - The provider to set for the given mark.
|
|
1863
1896
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
1864
1897
|
*/
|
|
1865
|
-
setProvider = (e, s,
|
|
1898
|
+
setProvider = (e, s, n) => new R(this.element, this.reference, this.container, {
|
|
1866
1899
|
...this.providers,
|
|
1867
|
-
[e]: [s,
|
|
1900
|
+
[e]: [s, n]
|
|
1868
1901
|
});
|
|
1869
1902
|
getProvider = (e) => {
|
|
1870
1903
|
if (this.providers[e] === void 0)
|
|
1871
|
-
throw new
|
|
1872
|
-
const [s,
|
|
1873
|
-
return { value: s, onUse:
|
|
1904
|
+
throw new Le(e);
|
|
1905
|
+
const [s, n] = this.providers[e];
|
|
1906
|
+
return { value: s, onUse: n };
|
|
1874
1907
|
};
|
|
1875
1908
|
clear = (e) => {
|
|
1876
1909
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
@@ -1887,48 +1920,51 @@ class R {
|
|
|
1887
1920
|
getStyle = (e) => this.element.getStyle(e);
|
|
1888
1921
|
makeAccessors = (e) => this.element.makeAccessors(e);
|
|
1889
1922
|
}
|
|
1890
|
-
const
|
|
1923
|
+
const Dt = /* @__PURE__ */ new Set([
|
|
1891
1924
|
"checked",
|
|
1892
1925
|
"disabled",
|
|
1893
1926
|
"multiple",
|
|
1894
1927
|
"readonly",
|
|
1895
1928
|
"required",
|
|
1896
1929
|
"selected"
|
|
1897
|
-
]),
|
|
1898
|
-
const s = e.makeChildText(t.value),
|
|
1899
|
-
return (n) => {
|
|
1900
|
-
r(), s.clear(n);
|
|
1901
|
-
};
|
|
1902
|
-
}, os = (t) => g.is(t) ? Me(t) : ke(t), E = (...t) => (e) => {
|
|
1903
|
-
const s = t.map((r) => d(r)(e));
|
|
1930
|
+
]), Lt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Ie = (t) => (e) => e.makeChildText(t).clear, He = (t) => (e) => {
|
|
1931
|
+
const s = e.makeChildText(t.value), n = t.on(s.setText);
|
|
1904
1932
|
return (r) => {
|
|
1905
|
-
|
|
1933
|
+
n(), s.clear(r);
|
|
1934
|
+
};
|
|
1935
|
+
}, ps = (t) => g.is(t) ? He(t) : Ie(t), E = (...t) => (e) => {
|
|
1936
|
+
const s = t.map((n) => f(n)(e));
|
|
1937
|
+
return (n) => {
|
|
1938
|
+
s.forEach((r) => r(n));
|
|
1906
1939
|
};
|
|
1907
1940
|
}, C = () => () => {
|
|
1908
|
-
},
|
|
1941
|
+
}, Pt = (t) => (e) => (e.addClasses(t), (s) => {
|
|
1909
1942
|
s && e.removeClasses(t);
|
|
1910
|
-
}),
|
|
1943
|
+
}), xt = (t) => (e) => {
|
|
1911
1944
|
let s = [];
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1945
|
+
const n = t.on(
|
|
1946
|
+
(r) => {
|
|
1947
|
+
e.removeClasses(s), s = (r ?? "").split(" ").filter((o) => o.length > 0), e.addClasses(s);
|
|
1948
|
+
},
|
|
1949
|
+
{ noAutoDispose: !0 }
|
|
1950
|
+
);
|
|
1951
|
+
return (r) => {
|
|
1952
|
+
n(), r && e.removeClasses(s), s.length = 0;
|
|
1917
1953
|
};
|
|
1918
|
-
},
|
|
1919
|
-
const { get:
|
|
1920
|
-
return
|
|
1921
|
-
|
|
1954
|
+
}, Ot = (t, e) => (s) => {
|
|
1955
|
+
const { get: n, set: r } = s.makeAccessors(t), o = n();
|
|
1956
|
+
return r(e), (i) => {
|
|
1957
|
+
i && r(o);
|
|
1922
1958
|
};
|
|
1923
|
-
},
|
|
1924
|
-
const { get:
|
|
1959
|
+
}, Mt = (t, e) => (s) => {
|
|
1960
|
+
const { get: n, set: r } = s.makeAccessors(t), o = n(), i = e.on(r, { noAutoDispose: !0 });
|
|
1925
1961
|
return (l) => {
|
|
1926
|
-
|
|
1962
|
+
i(), l && r(o);
|
|
1927
1963
|
};
|
|
1928
|
-
},
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1964
|
+
}, q = (t, e) => g.is(e) ? Mt(t, e) : Ot(t, e), kt = (t, e) => t === "class" ? g.is(e) ? xt(e) : Pt(
|
|
1965
|
+
/* c8 ignore next */
|
|
1966
|
+
(e ?? "").split(" ").filter((s) => s.length > 0)
|
|
1967
|
+
) : q(t, e), V = new Proxy(
|
|
1932
1968
|
{},
|
|
1933
1969
|
{
|
|
1934
1970
|
/**
|
|
@@ -1942,12 +1978,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
1942
1978
|
* @returns The renderable component for the specified attribute.
|
|
1943
1979
|
*
|
|
1944
1980
|
*/
|
|
1945
|
-
get: (t, e) =>
|
|
1946
|
-
/* c8 ignore next */
|
|
1947
|
-
(s ?? "").split(" ").filter((r) => r.length > 0)
|
|
1948
|
-
) : e === "set" ? te() : (s) => V(e, s)
|
|
1981
|
+
get: (t, e) => (s) => kt(e, s)
|
|
1949
1982
|
}
|
|
1950
|
-
),
|
|
1983
|
+
), It = (t, e) => q(`data-${t}`, e), gs = new Proxy(
|
|
1951
1984
|
{},
|
|
1952
1985
|
{
|
|
1953
1986
|
/**
|
|
@@ -1958,9 +1991,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
1958
1991
|
* @returns The renderable component for the specified attribute.
|
|
1959
1992
|
*
|
|
1960
1993
|
*/
|
|
1961
|
-
get: (t, e) =>
|
|
1994
|
+
get: (t, e) => (s) => It(e, s)
|
|
1962
1995
|
}
|
|
1963
|
-
),
|
|
1996
|
+
), Ht = (t, e) => q(`aria-${t}`, e), ms = new Proxy(
|
|
1964
1997
|
{},
|
|
1965
1998
|
{
|
|
1966
1999
|
/**
|
|
@@ -1971,9 +2004,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
1971
2004
|
* @returns The renderable component for the specified attribute.
|
|
1972
2005
|
*
|
|
1973
2006
|
*/
|
|
1974
|
-
get: (t, e) =>
|
|
2007
|
+
get: (t, e) => (s) => Ht(e, s)
|
|
1975
2008
|
}
|
|
1976
|
-
),
|
|
2009
|
+
), Nt = (t, e) => q(t, e), ys = new Proxy(
|
|
1977
2010
|
{},
|
|
1978
2011
|
{
|
|
1979
2012
|
/**
|
|
@@ -1984,9 +2017,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
1984
2017
|
* @returns The renderable component for the specified attribute.
|
|
1985
2018
|
*
|
|
1986
2019
|
*/
|
|
1987
|
-
get: (t, e) =>
|
|
2020
|
+
get: (t, e) => (s) => Nt(e, s)
|
|
1988
2021
|
}
|
|
1989
|
-
),
|
|
2022
|
+
), $t = (t, e) => q(t, e), Ss = new Proxy(
|
|
1990
2023
|
{},
|
|
1991
2024
|
{
|
|
1992
2025
|
/**
|
|
@@ -1996,31 +2029,31 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
1996
2029
|
* @returns The renderable component for the specified attribute.
|
|
1997
2030
|
*
|
|
1998
2031
|
*/
|
|
1999
|
-
get: (t, e) => (s) =>
|
|
2032
|
+
get: (t, e) => (s) => $t(e, s)
|
|
2000
2033
|
}
|
|
2001
|
-
),
|
|
2034
|
+
), f = (t) => {
|
|
2002
2035
|
if (t == null)
|
|
2003
2036
|
return C;
|
|
2004
2037
|
if (Array.isArray(t))
|
|
2005
|
-
return E(...t.map(
|
|
2038
|
+
return E(...t.map(f));
|
|
2006
2039
|
if (typeof t == "string")
|
|
2007
|
-
return
|
|
2040
|
+
return Ie(t);
|
|
2008
2041
|
if (g.is(t))
|
|
2009
|
-
return
|
|
2042
|
+
return He(t);
|
|
2010
2043
|
if (typeof t == "function")
|
|
2011
2044
|
return t;
|
|
2012
2045
|
throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
|
|
2013
|
-
},
|
|
2014
|
-
const
|
|
2015
|
-
return (i) => {
|
|
2016
|
-
n.forEach((o) => o(!1)), r.clear(i);
|
|
2017
|
-
};
|
|
2018
|
-
}, He = (t, e, ...s) => (r) => {
|
|
2019
|
-
const n = r.makeChildElement(t, e), i = s.map((o) => d(o)(n));
|
|
2046
|
+
}, Ne = (t, ...e) => (s) => {
|
|
2047
|
+
const n = s.makeChildElement(t, void 0), r = e.map((o) => f(o)(n));
|
|
2020
2048
|
return (o) => {
|
|
2021
|
-
|
|
2049
|
+
r.forEach((i) => i(!1)), n.clear(o);
|
|
2022
2050
|
};
|
|
2023
|
-
},
|
|
2051
|
+
}, te = (t, e, ...s) => (n) => {
|
|
2052
|
+
const r = n.makeChildElement(t, e), o = s.map((i) => f(i)(r));
|
|
2053
|
+
return (i) => {
|
|
2054
|
+
o.forEach((l) => l(!1)), r.clear(i);
|
|
2055
|
+
};
|
|
2056
|
+
}, ws = new Proxy(
|
|
2024
2057
|
{},
|
|
2025
2058
|
{
|
|
2026
2059
|
/**
|
|
@@ -2028,9 +2061,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2028
2061
|
* @param tagName - The HTML tag name.
|
|
2029
2062
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
2030
2063
|
*/
|
|
2031
|
-
get: (t, e) => (...s) =>
|
|
2064
|
+
get: (t, e) => (...s) => Ne(e, s.flatMap(f))
|
|
2032
2065
|
}
|
|
2033
|
-
),
|
|
2066
|
+
), bs = new Proxy(
|
|
2034
2067
|
{},
|
|
2035
2068
|
{
|
|
2036
2069
|
/**
|
|
@@ -2038,9 +2071,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2038
2071
|
* @param type - The input type name.
|
|
2039
2072
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
2040
2073
|
*/
|
|
2041
|
-
get: (t, e) => (...s) =>
|
|
2074
|
+
get: (t, e) => (...s) => Ne("input", V.type(e), ...s)
|
|
2042
2075
|
}
|
|
2043
|
-
),
|
|
2076
|
+
), $e = "http://www.w3.org/2000/svg", _s = (t, ...e) => te(t, $e, ...e), vs = new Proxy(
|
|
2044
2077
|
{},
|
|
2045
2078
|
{
|
|
2046
2079
|
/**
|
|
@@ -2048,9 +2081,9 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2048
2081
|
* @param tagName - The SVG tag name.
|
|
2049
2082
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
2050
2083
|
*/
|
|
2051
|
-
get: (t, e) => (...s) =>
|
|
2084
|
+
get: (t, e) => (...s) => te(e, $e, s.flatMap(f))
|
|
2052
2085
|
}
|
|
2053
|
-
),
|
|
2086
|
+
), Re = "http://www.w3.org/1998/Math/MathML", Ts = (t, ...e) => te(t, Re, ...e), As = new Proxy(
|
|
2054
2087
|
{},
|
|
2055
2088
|
{
|
|
2056
2089
|
/**
|
|
@@ -2058,33 +2091,33 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2058
2091
|
* @param tagName - The Math tag name.
|
|
2059
2092
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
2060
2093
|
*/
|
|
2061
|
-
get: (t, e) => (...s) =>
|
|
2094
|
+
get: (t, e) => (...s) => te(e, Re, s.flatMap(f))
|
|
2062
2095
|
}
|
|
2063
|
-
),
|
|
2096
|
+
), Ve = (t, e) => {
|
|
2064
2097
|
if (typeof e == "function")
|
|
2065
|
-
return
|
|
2066
|
-
const s = e.pending != null ?
|
|
2067
|
-
return (
|
|
2068
|
-
let
|
|
2069
|
-
const l = t(), c =
|
|
2070
|
-
let a =
|
|
2098
|
+
return Ve(t, { then: e });
|
|
2099
|
+
const s = e.pending != null ? f(e.pending()) : C, n = e.then, r = e.error != null ? (o) => f(e.error(o)) : () => C;
|
|
2100
|
+
return (o) => {
|
|
2101
|
+
let i = !0;
|
|
2102
|
+
const l = t(), c = o.makeRef();
|
|
2103
|
+
let a = f(s)(c);
|
|
2071
2104
|
return l.then(
|
|
2072
2105
|
(u) => {
|
|
2073
|
-
|
|
2106
|
+
i && (a(!0), a = f(n(u))(c));
|
|
2074
2107
|
},
|
|
2075
2108
|
(u) => {
|
|
2076
|
-
|
|
2109
|
+
i && (a(!0), a = f(r(u))(c));
|
|
2077
2110
|
}
|
|
2078
2111
|
), (u) => {
|
|
2079
|
-
|
|
2112
|
+
i = !1, a(u), c.clear(u);
|
|
2080
2113
|
};
|
|
2081
2114
|
};
|
|
2082
|
-
},
|
|
2115
|
+
}, Es = (t, e) => Ve(() => t, e), je = (t, e, s) => (n) => n.on(t, e, s), Rt = (t) => je("click", (e, s) => {
|
|
2083
2116
|
e.preventDefault();
|
|
2084
|
-
const
|
|
2117
|
+
const n = e.target;
|
|
2085
2118
|
setTimeout(() => {
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2119
|
+
const r = n.ownerDocument != null ? n?.checked : void 0;
|
|
2120
|
+
r != null && t(!r, s);
|
|
2088
2121
|
}, 0);
|
|
2089
2122
|
}), se = new Proxy(
|
|
2090
2123
|
{},
|
|
@@ -2094,133 +2127,136 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2094
2127
|
* @param fn - The function to call when the event is triggered.
|
|
2095
2128
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
2096
2129
|
*/
|
|
2097
|
-
get: (t, e) => (s) =>
|
|
2130
|
+
get: (t, e) => (s) => je(e, s)
|
|
2098
2131
|
}
|
|
2099
|
-
),
|
|
2132
|
+
), Vt = (t, e) => (s) => {
|
|
2100
2133
|
e?.preventDefault === !0 && s.preventDefault(), e?.stopPropagation === !0 && s.stopPropagation(), e?.stopImmediatePropagation === !0 && s.stopImmediatePropagation(), t(s);
|
|
2101
|
-
}, O = (t, e) =>
|
|
2102
|
-
const
|
|
2103
|
-
t(
|
|
2104
|
-
}, e),
|
|
2105
|
-
(s,
|
|
2134
|
+
}, O = (t, e) => Vt((s) => {
|
|
2135
|
+
const n = s.target;
|
|
2136
|
+
t(n, s);
|
|
2137
|
+
}, e), jt = (t, e) => O(
|
|
2138
|
+
(s, n) => t(s.value, n),
|
|
2106
2139
|
e
|
|
2107
|
-
),
|
|
2108
|
-
(s,
|
|
2140
|
+
), qt = (t, e) => O(
|
|
2141
|
+
(s, n) => t(s.valueAsNumber, n),
|
|
2109
2142
|
e
|
|
2110
|
-
),
|
|
2143
|
+
), Ft = (t, e) => O((s, n) => {
|
|
2111
2144
|
if (s.value === "")
|
|
2112
2145
|
return;
|
|
2113
|
-
const
|
|
2114
|
-
Number(
|
|
2115
|
-
Number(
|
|
2116
|
-
Number(
|
|
2146
|
+
const r = s.value.split("-"), o = new Date(
|
|
2147
|
+
Number(r[0]),
|
|
2148
|
+
Number(r[1]) - 1,
|
|
2149
|
+
Number(r[2].substring(0, 2))
|
|
2117
2150
|
);
|
|
2118
|
-
t(
|
|
2119
|
-
}, e),
|
|
2151
|
+
t(o, n);
|
|
2152
|
+
}, e), Cs = (t, e) => O((s, n) => {
|
|
2120
2153
|
if (s.value === "") {
|
|
2121
|
-
t(null,
|
|
2154
|
+
t(null, n);
|
|
2122
2155
|
return;
|
|
2123
2156
|
}
|
|
2124
|
-
const
|
|
2125
|
-
Number(
|
|
2126
|
-
Number(
|
|
2127
|
-
Number(
|
|
2157
|
+
const r = s.value.split("-"), o = new Date(
|
|
2158
|
+
Number(r[0]),
|
|
2159
|
+
Number(r[1]) - 1,
|
|
2160
|
+
Number(r[2].substring(0, 2))
|
|
2128
2161
|
);
|
|
2129
|
-
t(
|
|
2130
|
-
}, e),
|
|
2162
|
+
t(o, n);
|
|
2163
|
+
}, e), Bt = (t, e) => O((s, n) => {
|
|
2131
2164
|
if (s.value === "")
|
|
2132
2165
|
return;
|
|
2133
|
-
const
|
|
2134
|
-
Number(
|
|
2135
|
-
Number(
|
|
2136
|
-
Number(
|
|
2137
|
-
), l =
|
|
2138
|
-
|
|
2139
|
-
}, e),
|
|
2166
|
+
const r = s.value.split("T"), o = r[0].split("-"), i = new Date(
|
|
2167
|
+
Number(o[0]),
|
|
2168
|
+
Number(o[1]) - 1,
|
|
2169
|
+
Number(o[2])
|
|
2170
|
+
), l = r[1].split(":");
|
|
2171
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), t(i, n);
|
|
2172
|
+
}, e), Ds = (t, e) => O((s, n) => {
|
|
2140
2173
|
if (s.value === "") {
|
|
2141
|
-
t(null,
|
|
2174
|
+
t(null, n);
|
|
2142
2175
|
return;
|
|
2143
2176
|
}
|
|
2144
|
-
const
|
|
2145
|
-
if (
|
|
2146
|
-
t(null,
|
|
2177
|
+
const r = s.value.split("T");
|
|
2178
|
+
if (r.length !== 2) {
|
|
2179
|
+
t(null, n);
|
|
2147
2180
|
return;
|
|
2148
2181
|
}
|
|
2149
|
-
const
|
|
2150
|
-
Number(
|
|
2151
|
-
Number(
|
|
2152
|
-
Number(
|
|
2153
|
-
), l =
|
|
2154
|
-
|
|
2155
|
-
}, e),
|
|
2156
|
-
t(s.checked,
|
|
2157
|
-
}, e),
|
|
2158
|
-
const
|
|
2159
|
-
let
|
|
2160
|
-
},
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2182
|
+
const o = r[0].split("-"), i = new Date(
|
|
2183
|
+
Number(o[0]),
|
|
2184
|
+
Number(o[1]) - 1,
|
|
2185
|
+
Number(o[2])
|
|
2186
|
+
), l = r[1].split(":");
|
|
2187
|
+
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), t(i, n);
|
|
2188
|
+
}, e), Ls = (t, e) => O((s, n) => {
|
|
2189
|
+
t(s.checked, n);
|
|
2190
|
+
}, e), Ps = (t, e = "input") => E(V.valueAsDate(t), se[e](Ft(t.set))), xs = (t, e = "input") => E(V.valueAsDate(t), se[e](Bt(t.set))), Os = (t, e = "input") => E(V.valueAsNumber(t), se[e](qt(t.set))), Ms = (t, e = "input") => E(V.value(t), se[e](jt(t.set))), ks = (t) => E(V.checked(t), Rt(t.set)), de = (t, e, s) => g.is(t) ? e(t) : s(t), Wt = (t, e, s) => {
|
|
2191
|
+
const n = t.makeRef();
|
|
2192
|
+
let r = () => {
|
|
2193
|
+
}, o = null;
|
|
2194
|
+
const i = e.on(
|
|
2195
|
+
(l) => {
|
|
2196
|
+
o?.dispose(), r(!0), o = new j(), r = x(
|
|
2197
|
+
o,
|
|
2198
|
+
() => f(s(l))(n)
|
|
2199
|
+
);
|
|
2200
|
+
},
|
|
2201
|
+
{ noAutoDispose: !0 }
|
|
2202
|
+
);
|
|
2167
2203
|
return (l) => {
|
|
2168
|
-
|
|
2204
|
+
o?.dispose(), r(l), i(), n.clear(l);
|
|
2169
2205
|
};
|
|
2170
|
-
},
|
|
2171
|
-
function s(
|
|
2172
|
-
return (
|
|
2173
|
-
const
|
|
2206
|
+
}, ne = (t, e) => {
|
|
2207
|
+
function s(r) {
|
|
2208
|
+
return (o) => {
|
|
2209
|
+
const i = o.makeRef();
|
|
2174
2210
|
let l, c;
|
|
2175
|
-
const a =
|
|
2211
|
+
const a = r.map((p) => Object.keys(p)[0]);
|
|
2176
2212
|
let u;
|
|
2177
2213
|
const h = a.on((p) => {
|
|
2178
2214
|
if (p !== u) {
|
|
2179
|
-
u = p, c?.dispose(), l?.(!0), c =
|
|
2180
|
-
const
|
|
2181
|
-
l = d
|
|
2215
|
+
u = p, c?.dispose(), l?.(!0), c = r.map((m) => m[p]);
|
|
2216
|
+
const d = e[p](c);
|
|
2217
|
+
l = f(d)(i);
|
|
2182
2218
|
}
|
|
2183
2219
|
});
|
|
2184
2220
|
return (p) => {
|
|
2185
|
-
c?.dispose(), h(),
|
|
2221
|
+
c?.dispose(), h(), i.clear(p), l?.(p);
|
|
2186
2222
|
};
|
|
2187
2223
|
};
|
|
2188
2224
|
}
|
|
2189
|
-
function r
|
|
2190
|
-
const
|
|
2191
|
-
return
|
|
2225
|
+
function n(r) {
|
|
2226
|
+
const o = Object.keys(r)[0];
|
|
2227
|
+
return f(e[o](K(r[o])));
|
|
2192
2228
|
}
|
|
2193
|
-
return
|
|
2194
|
-
},
|
|
2195
|
-
y.map(t, (
|
|
2229
|
+
return de(t, s, n);
|
|
2230
|
+
}, qe = (t, e, s) => ne(
|
|
2231
|
+
y.map(t, (n) => ({ [n[e]]: n })),
|
|
2196
2232
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2197
2233
|
s
|
|
2198
|
-
),
|
|
2199
|
-
const s = y.map(t, ([
|
|
2200
|
-
return
|
|
2201
|
-
},
|
|
2234
|
+
), Is = (t, e) => qe(t, "kind", e), Hs = (t, e) => {
|
|
2235
|
+
const s = y.map(t, ([n, r]) => ({ [n]: r }));
|
|
2236
|
+
return ne(s, e);
|
|
2237
|
+
}, Ns = (t, e) => qe(t, "type", e), Ut = (t, e) => ne(
|
|
2202
2238
|
y.map(t, (s) => ({ [s]: !0 })),
|
|
2203
2239
|
e
|
|
2204
|
-
),
|
|
2205
|
-
const
|
|
2206
|
-
return
|
|
2207
|
-
s.map((
|
|
2240
|
+
), $s = (t, e = {}) => (s) => {
|
|
2241
|
+
const n = e?.firstSeparator ?? t, r = e?.lastSeparator ?? t;
|
|
2242
|
+
return Ut(
|
|
2243
|
+
s.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
2208
2244
|
{
|
|
2209
|
-
first:
|
|
2210
|
-
last:
|
|
2245
|
+
first: n,
|
|
2246
|
+
last: r,
|
|
2211
2247
|
other: t
|
|
2212
2248
|
}
|
|
2213
2249
|
);
|
|
2214
|
-
},
|
|
2250
|
+
}, Rs = (t) => (e) => (e.appendOrInsert(t), (s) => {
|
|
2215
2251
|
s && U(t);
|
|
2216
|
-
}),
|
|
2217
|
-
function
|
|
2218
|
-
return (
|
|
2219
|
-
const l =
|
|
2252
|
+
}), Vs = (t, e, s) => {
|
|
2253
|
+
function n(o) {
|
|
2254
|
+
return (i) => {
|
|
2255
|
+
const l = i.makeRef();
|
|
2220
2256
|
let c = () => {
|
|
2221
2257
|
}, a = !1, u = null;
|
|
2222
|
-
const h =
|
|
2223
|
-
p == null ? (c(!0), c =
|
|
2258
|
+
const h = o.on((p) => {
|
|
2259
|
+
p == null ? (c(!0), c = f(s?.())(l), a = !1, u?.dispose(), u = null) : a ? u.set(p) : (u = T(p), c(!0), c = f(e(u))(
|
|
2224
2260
|
l
|
|
2225
2261
|
), a = !0);
|
|
2226
2262
|
});
|
|
@@ -2229,196 +2265,196 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2229
2265
|
};
|
|
2230
2266
|
};
|
|
2231
2267
|
}
|
|
2232
|
-
function
|
|
2233
|
-
if (
|
|
2234
|
-
const
|
|
2235
|
-
return
|
|
2268
|
+
function r(o) {
|
|
2269
|
+
if (o == null) {
|
|
2270
|
+
const i = s?.();
|
|
2271
|
+
return i != null ? f(i) : C;
|
|
2236
2272
|
}
|
|
2237
|
-
return
|
|
2273
|
+
return f(e(K(o)));
|
|
2238
2274
|
}
|
|
2239
|
-
return
|
|
2275
|
+
return de(
|
|
2240
2276
|
t,
|
|
2241
|
-
|
|
2242
|
-
|
|
2277
|
+
n,
|
|
2278
|
+
r
|
|
2243
2279
|
);
|
|
2244
|
-
},
|
|
2245
|
-
const
|
|
2280
|
+
}, js = (...t) => (e, s) => (n) => {
|
|
2281
|
+
const r = n.makeRef();
|
|
2246
2282
|
if (t.some(
|
|
2247
|
-
(
|
|
2283
|
+
(d) => !g.is(d) && d == null
|
|
2248
2284
|
))
|
|
2249
|
-
return (s != null ?
|
|
2250
|
-
|
|
2285
|
+
return (s != null ? f(s?.()) : C)(
|
|
2286
|
+
r
|
|
2251
2287
|
);
|
|
2252
|
-
const
|
|
2253
|
-
(
|
|
2288
|
+
const i = t.map(() => null), l = t.map(
|
|
2289
|
+
(d) => g.is(d) ? d.value != null : d != null
|
|
2254
2290
|
);
|
|
2255
2291
|
let c = null;
|
|
2256
|
-
const a = T(l.every((
|
|
2257
|
-
if (
|
|
2258
|
-
if (
|
|
2259
|
-
const
|
|
2260
|
-
|
|
2292
|
+
const a = T(l.every((d) => d)), u = (d, m) => {
|
|
2293
|
+
if (d.value != null) {
|
|
2294
|
+
if (i[m] == null) {
|
|
2295
|
+
const w = T(d.value);
|
|
2296
|
+
i[m] = w;
|
|
2261
2297
|
} else
|
|
2262
|
-
|
|
2298
|
+
i[m].value = d.value;
|
|
2263
2299
|
l[m] = !0;
|
|
2264
2300
|
} else
|
|
2265
2301
|
l[m] = !1;
|
|
2266
2302
|
};
|
|
2267
2303
|
let h = t.length - 1;
|
|
2268
|
-
const p = t.map((
|
|
2269
|
-
if (!g.is(
|
|
2270
|
-
const
|
|
2271
|
-
return
|
|
2304
|
+
const p = t.map((d, m) => {
|
|
2305
|
+
if (!g.is(d)) {
|
|
2306
|
+
const w = T(d);
|
|
2307
|
+
return i[m] = w, () => {
|
|
2272
2308
|
};
|
|
2273
2309
|
}
|
|
2274
|
-
return
|
|
2275
|
-
u(
|
|
2310
|
+
return d.on(() => {
|
|
2311
|
+
u(d, m), h === 0 ? a.value = l.every((w) => w) : h--;
|
|
2276
2312
|
});
|
|
2277
2313
|
});
|
|
2278
|
-
return a.on((
|
|
2279
|
-
c?.(!0), c = null,
|
|
2280
|
-
}), (
|
|
2281
|
-
|
|
2314
|
+
return a.on((d) => {
|
|
2315
|
+
c?.(!0), c = null, d ? c = f(e(...i))(r) : c = f(s?.() ?? C)(r);
|
|
2316
|
+
}), (d) => {
|
|
2317
|
+
i.forEach((m) => m?.dispose()), a.dispose(), p.forEach((m) => m()), c?.(d), r.clear(d);
|
|
2282
2318
|
};
|
|
2283
|
-
},
|
|
2319
|
+
}, Fe = (t, e, s) => de(
|
|
2284
2320
|
t,
|
|
2285
|
-
(
|
|
2286
|
-
n,
|
|
2321
|
+
(n) => (r) => Wt(
|
|
2287
2322
|
r,
|
|
2288
|
-
|
|
2323
|
+
n,
|
|
2324
|
+
(o) => o ? e() : s?.()
|
|
2289
2325
|
),
|
|
2290
|
-
(
|
|
2291
|
-
if (
|
|
2292
|
-
const
|
|
2293
|
-
return
|
|
2326
|
+
(n) => {
|
|
2327
|
+
if (n) {
|
|
2328
|
+
const r = e();
|
|
2329
|
+
return r != null ? f(r) : C;
|
|
2294
2330
|
}
|
|
2295
|
-
return
|
|
2331
|
+
return f(s?.());
|
|
2296
2332
|
}
|
|
2297
|
-
),
|
|
2298
|
-
y.map(t, (
|
|
2333
|
+
), qs = (t, e, s) => Fe(
|
|
2334
|
+
y.map(t, (n) => !n),
|
|
2299
2335
|
e,
|
|
2300
2336
|
s
|
|
2301
|
-
),
|
|
2337
|
+
), Be = (t, e, s) => {
|
|
2302
2338
|
if (s != null)
|
|
2303
|
-
return
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
|
|
2339
|
+
return Be(t, (n) => {
|
|
2340
|
+
const r = new le(
|
|
2341
|
+
n.index,
|
|
2342
|
+
n.total.map((o) => o - 1)
|
|
2307
2343
|
);
|
|
2308
2344
|
return E(
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2345
|
+
f(e(n)),
|
|
2346
|
+
Fe(
|
|
2347
|
+
n.isLast,
|
|
2312
2348
|
() => C,
|
|
2313
|
-
() => s(
|
|
2349
|
+
() => s(r)
|
|
2314
2350
|
)
|
|
2315
2351
|
);
|
|
2316
2352
|
});
|
|
2317
2353
|
if (g.is(t))
|
|
2318
|
-
return (
|
|
2319
|
-
const
|
|
2320
|
-
return
|
|
2321
|
-
const a =
|
|
2354
|
+
return (n) => {
|
|
2355
|
+
const r = t.derive(), o = n.makeRef(), i = [], l = [];
|
|
2356
|
+
return r.on((c) => {
|
|
2357
|
+
const a = i.splice(c), u = l.splice(c);
|
|
2322
2358
|
for (const h of u)
|
|
2323
2359
|
h.dispose();
|
|
2324
2360
|
for (const h of a)
|
|
2325
2361
|
h(!0);
|
|
2326
|
-
for (let h =
|
|
2327
|
-
const p = new le(h,
|
|
2328
|
-
l.push(
|
|
2329
|
-
|
|
2362
|
+
for (let h = i.length; h < c; h++) {
|
|
2363
|
+
const p = new le(h, r), d = new j();
|
|
2364
|
+
l.push(d), i.push(
|
|
2365
|
+
x(d, () => f(e(p))(o))
|
|
2330
2366
|
);
|
|
2331
2367
|
}
|
|
2332
2368
|
}), (c) => {
|
|
2333
2369
|
for (const a of l)
|
|
2334
2370
|
a.dispose();
|
|
2335
|
-
l.length = 0,
|
|
2336
|
-
for (const a of
|
|
2371
|
+
l.length = 0, r.dispose();
|
|
2372
|
+
for (const a of i)
|
|
2337
2373
|
a(c);
|
|
2338
|
-
|
|
2374
|
+
i.length = 0, o.clear(c);
|
|
2339
2375
|
};
|
|
2340
2376
|
};
|
|
2341
2377
|
{
|
|
2342
|
-
const
|
|
2378
|
+
const n = K(t);
|
|
2343
2379
|
return E(
|
|
2344
|
-
...Array.from({ length: t }, (
|
|
2345
|
-
const
|
|
2346
|
-
return
|
|
2380
|
+
...Array.from({ length: t }, (r, o) => o).map((r) => {
|
|
2381
|
+
const o = new le(r, n);
|
|
2382
|
+
return f(e(o));
|
|
2347
2383
|
})
|
|
2348
2384
|
);
|
|
2349
2385
|
}
|
|
2350
|
-
},
|
|
2351
|
-
const
|
|
2352
|
-
return
|
|
2353
|
-
|
|
2354
|
-
(
|
|
2355
|
-
const
|
|
2356
|
-
return
|
|
2386
|
+
}, Fs = (t, e, s) => {
|
|
2387
|
+
const n = y.map(t, (o) => o.length), r = y.toSignal(t);
|
|
2388
|
+
return Be(
|
|
2389
|
+
n,
|
|
2390
|
+
(o) => {
|
|
2391
|
+
const i = r.map((l) => l[o.index]);
|
|
2392
|
+
return f(e(i, o));
|
|
2357
2393
|
},
|
|
2358
2394
|
s
|
|
2359
2395
|
);
|
|
2360
|
-
},
|
|
2361
|
-
typeof
|
|
2362
|
-
}),
|
|
2396
|
+
}, Gt = (...t) => (e) => (s) => t.forEach((n) => {
|
|
2397
|
+
typeof n == "function" ? n(s, e) : n.dispose(s, e);
|
|
2398
|
+
}), Bs = (t, e) => {
|
|
2363
2399
|
if (g.is(t)) {
|
|
2364
2400
|
const s = t;
|
|
2365
|
-
return (
|
|
2366
|
-
|
|
2367
|
-
const
|
|
2368
|
-
let
|
|
2401
|
+
return (n) => {
|
|
2402
|
+
n = n.makeRef();
|
|
2403
|
+
const r = s.map((l) => f(e(l)));
|
|
2404
|
+
let o = () => {
|
|
2369
2405
|
};
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2406
|
+
const i = r.on((l) => {
|
|
2407
|
+
o(!0), o = l(n);
|
|
2372
2408
|
});
|
|
2373
2409
|
return (l) => {
|
|
2374
|
-
|
|
2410
|
+
i(), o(l);
|
|
2375
2411
|
};
|
|
2376
2412
|
};
|
|
2377
2413
|
}
|
|
2378
|
-
return
|
|
2379
|
-
},
|
|
2414
|
+
return f(e(t));
|
|
2415
|
+
}, Ws = (t, e, s = () => C) => ne(
|
|
2380
2416
|
y.map(
|
|
2381
2417
|
t,
|
|
2382
|
-
(
|
|
2418
|
+
(n) => n.length > 0 ? { notEmpty: n } : { whenEmpty: null }
|
|
2383
2419
|
),
|
|
2384
2420
|
{
|
|
2385
|
-
notEmpty: (
|
|
2421
|
+
notEmpty: (n) => e(n),
|
|
2386
2422
|
whenEmpty: () => s()
|
|
2387
2423
|
}
|
|
2388
|
-
),
|
|
2389
|
-
const
|
|
2390
|
-
return () =>
|
|
2391
|
-
}, W = /* @__PURE__ */ new Map(),
|
|
2392
|
-
mark:
|
|
2424
|
+
), Us = (t, e) => (s) => {
|
|
2425
|
+
const n = s.makePortal(t), r = fe(f(e), n);
|
|
2426
|
+
return () => r(!0);
|
|
2427
|
+
}, W = /* @__PURE__ */ new Map(), Jt = (t) => ({
|
|
2428
|
+
mark: at(`Probe(${t.description})`),
|
|
2393
2429
|
create: ({ callback: e = () => {
|
|
2394
2430
|
}, timeout: s = 10 } = {}) => {
|
|
2395
|
-
const
|
|
2396
|
-
clearTimeout(
|
|
2431
|
+
const n = (l) => {
|
|
2432
|
+
clearTimeout(r), W.delete(t), e(l);
|
|
2397
2433
|
};
|
|
2398
2434
|
if (W.has(t))
|
|
2399
2435
|
throw new Error(`Probe already exists: ${t.description}`);
|
|
2400
|
-
const
|
|
2401
|
-
return W.set(t,
|
|
2436
|
+
const r = setTimeout(() => n("timeout"), s), o = { counter: 0, timeoutId: r };
|
|
2437
|
+
return W.set(t, o), {
|
|
2402
2438
|
value: () => {
|
|
2403
|
-
clearTimeout(
|
|
2439
|
+
clearTimeout(r);
|
|
2404
2440
|
const l = W.get(t);
|
|
2405
|
-
l != null && --l.counter === 0 &&
|
|
2441
|
+
l != null && --l.counter === 0 && n("resolved");
|
|
2406
2442
|
},
|
|
2407
|
-
dispose: () =>
|
|
2408
|
-
onUse: () =>
|
|
2443
|
+
dispose: () => n("disposed"),
|
|
2444
|
+
onUse: () => o.counter++
|
|
2409
2445
|
};
|
|
2410
2446
|
}
|
|
2411
|
-
}),
|
|
2412
|
-
const
|
|
2413
|
-
return s.setStyle(t, e), (
|
|
2414
|
-
|
|
2447
|
+
}), Gs = Jt(Symbol("GlobalProbe")), Xt = (t, e) => (s) => {
|
|
2448
|
+
const n = s.getStyle(t);
|
|
2449
|
+
return s.setStyle(t, e), (r) => {
|
|
2450
|
+
r && s.setStyle(t, n);
|
|
2415
2451
|
};
|
|
2416
|
-
},
|
|
2417
|
-
const
|
|
2418
|
-
return (
|
|
2419
|
-
|
|
2452
|
+
}, Yt = (t, e) => (s) => {
|
|
2453
|
+
const n = s.getStyle(t), r = e.on((o) => s.setStyle(t, o));
|
|
2454
|
+
return (o) => {
|
|
2455
|
+
r(), o && s.setStyle(t, n);
|
|
2420
2456
|
};
|
|
2421
|
-
},
|
|
2457
|
+
}, ye = (t, e) => g.is(e) ? Yt(t, e) : Xt(t, e), Js = new Proxy({}, {
|
|
2422
2458
|
/**
|
|
2423
2459
|
* Creates a renderable component for the specified `style` property.
|
|
2424
2460
|
*
|
|
@@ -2427,184 +2463,191 @@ const vt = /* @__PURE__ */ new Set([
|
|
|
2427
2463
|
* @returns The renderable component for the specified attribute.
|
|
2428
2464
|
*
|
|
2429
2465
|
*/
|
|
2430
|
-
get: (t, e) => e === "variable" ? (s,
|
|
2431
|
-
}),
|
|
2466
|
+
get: (t, e) => e === "variable" ? (s, n) => ye(s, n) : (s) => ye(e, s)
|
|
2467
|
+
}), Qt = (t) => (e) => {
|
|
2432
2468
|
if (e.isBrowser()) {
|
|
2433
2469
|
const s = t(e);
|
|
2434
2470
|
if (s != null)
|
|
2435
|
-
return
|
|
2471
|
+
return f(s)(e);
|
|
2436
2472
|
}
|
|
2437
2473
|
return () => {
|
|
2438
2474
|
};
|
|
2439
|
-
},
|
|
2475
|
+
}, Xs = (t) => (e) => {
|
|
2440
2476
|
const s = t(e);
|
|
2441
2477
|
return s == null ? () => {
|
|
2442
|
-
} :
|
|
2443
|
-
},
|
|
2478
|
+
} : f(s)(e);
|
|
2479
|
+
}, Ys = (t) => Qt((e) => t(e.element)), Qs = (t) => (e) => {
|
|
2444
2480
|
if (e.isHeadlessDOM()) {
|
|
2445
2481
|
const s = t(e);
|
|
2446
2482
|
if (s)
|
|
2447
|
-
return
|
|
2483
|
+
return f(s)(e);
|
|
2448
2484
|
}
|
|
2449
2485
|
return () => {
|
|
2450
2486
|
};
|
|
2451
|
-
},
|
|
2452
|
-
const s = new
|
|
2453
|
-
return (
|
|
2454
|
-
s.dispose(), r
|
|
2487
|
+
}, Zs = (t) => (e) => {
|
|
2488
|
+
const s = new j(), n = x(s, () => f(t(s))(e));
|
|
2489
|
+
return (r) => {
|
|
2490
|
+
s.dispose(), n(r);
|
|
2455
2491
|
};
|
|
2456
|
-
},
|
|
2492
|
+
}, pe = (t) => (e) => {
|
|
2457
2493
|
let s = e;
|
|
2458
|
-
function
|
|
2494
|
+
function n() {
|
|
2459
2495
|
return s;
|
|
2460
2496
|
}
|
|
2461
|
-
function
|
|
2497
|
+
function r(l) {
|
|
2462
2498
|
s = l;
|
|
2463
2499
|
}
|
|
2464
|
-
const
|
|
2500
|
+
const o = [], i = t({
|
|
2465
2501
|
use: ({ mark: l }) => {
|
|
2466
|
-
const { value: c, onUse: a } =
|
|
2502
|
+
const { value: c, onUse: a } = n().getProvider(l);
|
|
2467
2503
|
return a?.(), c;
|
|
2468
2504
|
},
|
|
2469
2505
|
set: ({ mark: l, create: c }, a) => {
|
|
2470
|
-
const { value: u, dispose: h, onUse: p } = c(a,
|
|
2471
|
-
|
|
2506
|
+
const { value: u, dispose: h, onUse: p } = c(a, n());
|
|
2507
|
+
o.push(h), r(n().setProvider(l, u, p));
|
|
2472
2508
|
}
|
|
2473
2509
|
});
|
|
2474
|
-
return
|
|
2510
|
+
return i == null ? () => {
|
|
2475
2511
|
} : E(
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
)(
|
|
2479
|
-
},
|
|
2480
|
-
const
|
|
2481
|
-
return e(...
|
|
2512
|
+
f(i),
|
|
2513
|
+
Gt(() => o.forEach((l) => l()))
|
|
2514
|
+
)(n());
|
|
2515
|
+
}, zs = (t, e, s) => pe(({ set: n }) => (n(t, e), s())), Ks = (t, e) => pe(({ use: s }) => e(s(t))), en = (...t) => (e) => pe(({ use: s }) => {
|
|
2516
|
+
const n = t.map(s);
|
|
2517
|
+
return e(...n);
|
|
2482
2518
|
});
|
|
2483
2519
|
export {
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
$ as
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2520
|
+
Ht as Aria,
|
|
2521
|
+
Es as Async,
|
|
2522
|
+
kt as Attr,
|
|
2523
|
+
ks as BindChecked,
|
|
2524
|
+
Ps as BindDate,
|
|
2525
|
+
xs as BindDateTime,
|
|
2526
|
+
Os as BindNumber,
|
|
2527
|
+
Ms as BindText,
|
|
2528
|
+
$ as BrowserContext,
|
|
2529
|
+
G as CLASS_PLACEHOLDER_ATTR,
|
|
2530
|
+
N as Computed,
|
|
2531
|
+
$s as Conjunction,
|
|
2532
|
+
Rs as DOMNode,
|
|
2533
|
+
It as DataAttr,
|
|
2534
|
+
j as DisposalScope,
|
|
2535
|
+
Ne as El,
|
|
2536
|
+
te as ElNS,
|
|
2498
2537
|
le as ElementPosition,
|
|
2499
2538
|
C as Empty,
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2539
|
+
Vs as Ensure,
|
|
2540
|
+
js as EnsureAll,
|
|
2541
|
+
Fs as ForEach,
|
|
2503
2542
|
E as Fragment,
|
|
2504
|
-
|
|
2505
|
-
|
|
2543
|
+
Gs as GlobalProbe,
|
|
2544
|
+
fs as HeadlessAdapter,
|
|
2506
2545
|
R as HeadlessContext,
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2546
|
+
Et as HeadlessElement,
|
|
2547
|
+
ke as HeadlessPortal,
|
|
2548
|
+
Ct as HeadlessText,
|
|
2549
|
+
Bs as MapSignal,
|
|
2550
|
+
$t as MathAttr,
|
|
2551
|
+
Ts as MathEl,
|
|
2511
2552
|
be as MemoryStore,
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2553
|
+
Ws as NotEmpty,
|
|
2554
|
+
Rt as OnChecked,
|
|
2555
|
+
Gt as OnDispose,
|
|
2556
|
+
ne as OneOf,
|
|
2557
|
+
qe as OneOfField,
|
|
2558
|
+
Is as OneOfKind,
|
|
2559
|
+
Hs as OneOfTuple,
|
|
2560
|
+
Ns as OneOfType,
|
|
2561
|
+
Ut as OneOfValue,
|
|
2562
|
+
Us as Portal,
|
|
2522
2563
|
Z as Prop,
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2564
|
+
zs as Provide,
|
|
2565
|
+
Le as ProviderNotFoundError,
|
|
2566
|
+
ut as RenderingError,
|
|
2567
|
+
Be as Repeat,
|
|
2568
|
+
Nt as SVGAttr,
|
|
2569
|
+
_s as SVGEl,
|
|
2527
2570
|
g as Signal,
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2571
|
+
Ve as Task,
|
|
2572
|
+
ps as TextNode,
|
|
2573
|
+
qs as Unless,
|
|
2574
|
+
Ks as Use,
|
|
2575
|
+
en as UseMany,
|
|
2533
2576
|
y as Value,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2577
|
+
Fe as When,
|
|
2578
|
+
Qt as WithBrowserCtx,
|
|
2579
|
+
Xs as WithCtx,
|
|
2580
|
+
Ys as WithElement,
|
|
2581
|
+
Qs as WithHeadlessCtx,
|
|
2582
|
+
pe as WithProvider,
|
|
2583
|
+
Zs as WithScope,
|
|
2584
|
+
Pe as _NODE_PLACEHOLDER_ATTR,
|
|
2585
|
+
ct as _getSelfOrParentElement,
|
|
2586
|
+
De as _isElement,
|
|
2587
|
+
lt as _makeGetter,
|
|
2588
|
+
it as _makeSetter,
|
|
2546
2589
|
U as _removeDOMNode,
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2590
|
+
He as _signalText,
|
|
2591
|
+
Ie as _staticText,
|
|
2592
|
+
ns as animateSignal,
|
|
2593
|
+
rt as animateSignals,
|
|
2594
|
+
ms as aria,
|
|
2595
|
+
V as attr,
|
|
2596
|
+
cs as bind,
|
|
2597
|
+
as as coalesce,
|
|
2555
2598
|
z as computed,
|
|
2556
2599
|
ee as computedOf,
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2600
|
+
ot as computedRecord,
|
|
2601
|
+
gs as dataAttr,
|
|
2602
|
+
os as delaySignal,
|
|
2603
|
+
Se as effect,
|
|
2604
|
+
Qe as effectOf,
|
|
2605
|
+
Vt as emit,
|
|
2606
|
+
Ls as emitChecked,
|
|
2564
2607
|
O as emitTarget,
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2608
|
+
jt as emitValue,
|
|
2609
|
+
Ft as emitValueAsDate,
|
|
2610
|
+
Bt as emitValueAsDateTime,
|
|
2611
|
+
Cs as emitValueAsNullableDate,
|
|
2612
|
+
Ds as emitValueAsNullableDateTime,
|
|
2613
|
+
qt as emitValueAsNumber,
|
|
2614
|
+
et as endInterpolate,
|
|
2615
|
+
ue as getCurrentScope,
|
|
2616
|
+
zt as getParentScope,
|
|
2617
|
+
Zt as getScopeStack,
|
|
2618
|
+
he as getWindow,
|
|
2619
|
+
tt as guessInterpolate,
|
|
2620
|
+
ws as html,
|
|
2621
|
+
bs as input,
|
|
2622
|
+
Ke as interpolateDate,
|
|
2623
|
+
Ze as interpolateNumber,
|
|
2624
|
+
ze as interpolateString,
|
|
2625
|
+
es as joinSignals,
|
|
2626
|
+
ts as localStorageProp,
|
|
2627
|
+
Jt as makeProbe,
|
|
2628
|
+
at as makeProviderMark,
|
|
2629
|
+
As as math,
|
|
2630
|
+
Ss as mathAttr,
|
|
2631
|
+
rs as merge,
|
|
2589
2632
|
se as on,
|
|
2590
|
-
|
|
2591
|
-
|
|
2633
|
+
Ue as popScope,
|
|
2634
|
+
is as previousSignal,
|
|
2592
2635
|
T as prop,
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2636
|
+
We as pushScope,
|
|
2637
|
+
us as render,
|
|
2638
|
+
fe as renderWithContext,
|
|
2639
|
+
f as renderableOfTNode,
|
|
2640
|
+
ds as restoreTempoPlaceholders,
|
|
2641
|
+
hs as runHeadless,
|
|
2599
2642
|
_ as scopeStack,
|
|
2600
|
-
|
|
2601
|
-
|
|
2643
|
+
Kt as scoped,
|
|
2644
|
+
ss as sessionStorageProp,
|
|
2602
2645
|
K as signal,
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2646
|
+
ls as slidingWindowSignal,
|
|
2647
|
+
_e as storedProp,
|
|
2648
|
+
Js as style,
|
|
2649
|
+
vs as svg,
|
|
2650
|
+
ys as svgAttr,
|
|
2651
|
+
ie as untracked,
|
|
2652
|
+
x as withScope
|
|
2610
2653
|
};
|