@tempots/dom 18.0.0 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dom/animatable.d.ts +12 -12
- package/dom/attr.d.ts +14 -7
- package/dom/dom-context.d.ts +47 -2
- package/dom/dom-utils.d.ts +6 -3
- package/dom/handle-anchor-click.d.ts +13 -2
- package/dom/ssr.d.ts +48 -16
- package/index.cjs +1 -1
- package/index.js +1000 -755
- package/package.json +1 -1
- package/renderable/async.d.ts +33 -3
- package/renderable/attribute.d.ts +24 -7
- package/renderable/bind.d.ts +43 -13
- package/renderable/conjunction.d.ts +23 -4
- package/renderable/consumers.d.ts +54 -1
- package/renderable/domnode.d.ts +10 -2
- package/renderable/element.d.ts +50 -3
- package/renderable/empty.d.ts +5 -0
- package/renderable/ensure.d.ts +10 -0
- package/renderable/foreach.d.ts +12 -2
- package/renderable/fragment.d.ts +11 -0
- package/renderable/handler.d.ts +64 -10
- package/renderable/map-signal.d.ts +15 -0
- package/renderable/not-empty.d.ts +13 -1
- package/renderable/onctx.d.ts +9 -2
- package/renderable/oneof.d.ts +138 -16
- package/renderable/onmount.d.ts +8 -0
- package/renderable/onunmount.d.ts +6 -0
- package/renderable/portal.d.ts +12 -3
- package/renderable/providers.d.ts +39 -6
- package/renderable/render.d.ts +39 -3
- package/renderable/repeat.d.ts +11 -2
- package/renderable/style.d.ts +4 -0
- package/renderable/task.d.ts +18 -2
- package/renderable/text.d.ts +16 -3
- package/renderable/when.d.ts +21 -3
- package/std/interpolate.d.ts +56 -5
- package/std/position.d.ts +46 -2
- package/std/signal-utils.d.ts +195 -19
- package/std/signal.d.ts +401 -30
- package/types/aria-attributes.d.ts +5 -0
- package/types/css-styles.d.ts +11 -0
- package/types/domain.d.ts +62 -2
- package/types/html-attributes.d.ts +10 -0
- package/types/html-events.d.ts +5 -0
- package/types/html-tags.d.ts +5 -0
- package/types/mathml-attributes.d.ts +5 -0
- package/types/mathml-tags.d.ts +4 -0
- package/types/svg-attributes.d.ts +5 -0
- package/types/svg-tags.d.ts +5 -0
package/index.js
CHANGED
|
@@ -1,154 +1,315 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (t, e, r) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isNaN(o) && (o = z);
|
|
14
|
-
let a = e.charCodeAt(i);
|
|
15
|
-
isNaN(a) && (a = z), s += String.fromCharCode(o + (a - o) * r);
|
|
1
|
+
var De = Object.defineProperty;
|
|
2
|
+
var be = (t, e, r) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var l = (t, e, r) => be(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
const Te = (t, e, r) => t + (e - t) * r;
|
|
5
|
+
const Ce = (t, e, r) => {
|
|
6
|
+
const s = Math.max(t.length, e.length);
|
|
7
|
+
let n = "";
|
|
8
|
+
for (let o = 0; o < s; o++) {
|
|
9
|
+
let i = t.charCodeAt(o);
|
|
10
|
+
isNaN(i) && (i = 97);
|
|
11
|
+
let a = e.charCodeAt(o);
|
|
12
|
+
isNaN(a) && (a = 97), n += String.fromCharCode(i + (a - i) * r);
|
|
16
13
|
}
|
|
17
|
-
return
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function Ve(t) {
|
|
26
|
-
return typeof t == "number" ? Ie : typeof t == "string" ? $e : t instanceof Date ? Fe : qe;
|
|
27
|
-
}
|
|
28
|
-
class Ue {
|
|
14
|
+
return n;
|
|
15
|
+
}, Le = (t, e, r) => new Date(t.getTime() + (e.getTime() - t.getTime()) * r), Ne = (t, e) => e, Oe = (t) => typeof t == "number" ? Te : typeof t == "string" ? Ce : t instanceof Date ? Le : Ne;
|
|
16
|
+
class ke {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new instance of `ElementPosition`.
|
|
19
|
+
* @param index - The index of the element.
|
|
20
|
+
* @param total - The total number of elements in the collection.
|
|
21
|
+
*/
|
|
29
22
|
constructor(e, r) {
|
|
30
23
|
this.index = e, this.total = r;
|
|
31
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the counter of the element.
|
|
27
|
+
*/
|
|
28
|
+
get counter() {
|
|
29
|
+
return this.index + 1;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Checks if the element is the first element in the collection.
|
|
33
|
+
* @returns `true` if the element is the first element, `false` otherwise.
|
|
34
|
+
*/
|
|
32
35
|
get isFirst() {
|
|
33
36
|
return this.index === 0;
|
|
34
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Checks if the element is the last element in the collection.
|
|
40
|
+
* @returns `true` if the element is the last element, `false` otherwise.
|
|
41
|
+
*/
|
|
35
42
|
get isLast() {
|
|
36
43
|
return this.index === this.total - 1;
|
|
37
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Checks if the index of the element is even.
|
|
47
|
+
* @returns `true` if the index is even, `false` otherwise.
|
|
48
|
+
*/
|
|
38
49
|
get isEven() {
|
|
39
50
|
return this.index % 2 === 0;
|
|
40
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Checks if the index of the element is odd.
|
|
54
|
+
* @returns `true` if the index is odd, `false` otherwise.
|
|
55
|
+
*/
|
|
41
56
|
get isOdd() {
|
|
42
57
|
return this.index % 2 === 1;
|
|
43
58
|
}
|
|
44
59
|
}
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
const p = class p {
|
|
61
|
+
/**
|
|
62
|
+
* Represents a signal with a value of type T.
|
|
63
|
+
*
|
|
64
|
+
* @param value - The initial value of the signal.
|
|
65
|
+
* @param equals - A function that determines whether two values of type T are equal.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
49
68
|
constructor(e, r) {
|
|
50
|
-
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
l(this, "$__signal__", !0);
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
51
76
|
l(this, "_value");
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
52
80
|
l(this, "_derivatives", []);
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
53
84
|
l(this, "_onValueListeners", []);
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
54
88
|
l(this, "_onDisposeListeners", []);
|
|
89
|
+
/**
|
|
90
|
+
* Gets the current value of the signal.
|
|
91
|
+
* @returns The current value of the signal.
|
|
92
|
+
*/
|
|
55
93
|
l(this, "get", () => this._value);
|
|
94
|
+
/**
|
|
95
|
+
* Checks if the signal has any registered listeners.
|
|
96
|
+
* @returns `true` if the signal has listeners, `false` otherwise.
|
|
97
|
+
*/
|
|
56
98
|
l(this, "hasListeners", () => this._onValueListeners.length > 0);
|
|
99
|
+
/**
|
|
100
|
+
* Registers a listener function to be called whenever the value of the signal changes.
|
|
101
|
+
* The listener function will be immediately called with the current value of the signal.
|
|
102
|
+
* Returns a function that can be called to unregister the listener.
|
|
103
|
+
*
|
|
104
|
+
* @param listener - The listener function to be called when the value of the signal changes.
|
|
105
|
+
*/
|
|
57
106
|
l(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
|
|
58
107
|
this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
|
|
59
108
|
}));
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
60
112
|
l(this, "_setAndNotify", (e, r) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
113
|
+
const s = this.equals(this._value, e);
|
|
114
|
+
s || (this._value = e), (r || !s) && this._onValueListeners.forEach((n) => n(e));
|
|
63
115
|
});
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
64
119
|
l(this, "_disposed", !1);
|
|
120
|
+
/**
|
|
121
|
+
* Checks whether the signal is disposed.
|
|
122
|
+
* @returns True if the signal is disposed, false otherwise.
|
|
123
|
+
*/
|
|
65
124
|
l(this, "isDisposed", () => this._disposed);
|
|
125
|
+
/**
|
|
126
|
+
* Adds a listener function to be called when the object is disposed.
|
|
127
|
+
* @param listener - The listener function to be called when the object is disposed.
|
|
128
|
+
* @returns A function that can be called to remove the listener.
|
|
129
|
+
*/
|
|
66
130
|
l(this, "onDispose", (e) => {
|
|
67
131
|
this._onDisposeListeners.push(e);
|
|
68
132
|
});
|
|
133
|
+
/**
|
|
134
|
+
* Disposes the signal, releasing any resources associated with it.
|
|
135
|
+
*/
|
|
69
136
|
l(this, "dispose", () => {
|
|
70
137
|
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
71
138
|
});
|
|
72
|
-
|
|
73
|
-
|
|
139
|
+
/**
|
|
140
|
+
* Returns a new Computed instance that applies the given mapping function to the value of this Signal.
|
|
141
|
+
* The mapping function is called whenever the value of this Signal changes.
|
|
142
|
+
*
|
|
143
|
+
* @typeParam O - The type of the mapped value.
|
|
144
|
+
* @param fn - The mapping function to apply to the value of this Signal.
|
|
145
|
+
* @param equals - Optional equality function to determine if two mapped values are equal.
|
|
146
|
+
* @returns - A new Computed instance with the mapped value.
|
|
147
|
+
*/
|
|
148
|
+
l(this, "map", (e, r = (s, n) => s === n) => {
|
|
149
|
+
const s = new E(() => {
|
|
74
150
|
try {
|
|
75
151
|
return e(this.get());
|
|
76
|
-
} catch (
|
|
77
|
-
throw console.error("Error in Signal.map:",
|
|
152
|
+
} catch (n) {
|
|
153
|
+
throw console.error("Error in Signal.map:", n), n;
|
|
78
154
|
}
|
|
79
155
|
}, r);
|
|
80
|
-
return this.setDerivative(
|
|
156
|
+
return this.setDerivative(s), s;
|
|
81
157
|
});
|
|
82
|
-
|
|
83
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Returns a new Signal that applies the given function to the value of the current Signal,
|
|
160
|
+
* and then flattens the resulting Signal.
|
|
161
|
+
*
|
|
162
|
+
* @typeParam O - The type of the value emitted by the resulting Signal.
|
|
163
|
+
* @param fn - The function to apply to the value of the current Signal.
|
|
164
|
+
* @param equals - A function that determines whether two values of type O are equal.
|
|
165
|
+
* Defaults to a strict equality check (===).
|
|
166
|
+
* @returns A new Signal that emits the values of the resulting Signal.
|
|
167
|
+
*/
|
|
168
|
+
l(this, "flatMap", (e, r = (s, n) => s === n) => {
|
|
169
|
+
const s = new E(() => {
|
|
84
170
|
try {
|
|
85
171
|
return e(this.get()).get();
|
|
86
|
-
} catch (
|
|
87
|
-
throw console.error("Error in Signal.flatMap:",
|
|
172
|
+
} catch (n) {
|
|
173
|
+
throw console.error("Error in Signal.flatMap:", n), n;
|
|
88
174
|
}
|
|
89
175
|
}, r);
|
|
90
|
-
return this.setDerivative(
|
|
176
|
+
return this.setDerivative(s), s;
|
|
91
177
|
});
|
|
178
|
+
/**
|
|
179
|
+
* Invokes a callback function with the current value of the signal, without modifying the signal.
|
|
180
|
+
*
|
|
181
|
+
* @param fn - The callback function to be invoked with the current value of the signal.
|
|
182
|
+
* @returns A new signal that emits the same value as the original signal and invokes the callback function.
|
|
183
|
+
*/
|
|
92
184
|
l(this, "tap", (e) => this.map((r) => (e(r), r)));
|
|
185
|
+
/**
|
|
186
|
+
* Returns a new Signal that emits the value at the specified key of the current value.
|
|
187
|
+
*
|
|
188
|
+
* @param key - The key of the value to retrieve.
|
|
189
|
+
* @returns A new Signal that emits the value at the specified key.
|
|
190
|
+
*/
|
|
93
191
|
l(this, "at", (e) => this.map((r) => r[e]));
|
|
192
|
+
/**
|
|
193
|
+
* Represents a collection of signals for each key in the value of the signal.
|
|
194
|
+
* @typeParam T - The type of the signals.
|
|
195
|
+
*/
|
|
94
196
|
l(this, "$", new Proxy(this, {
|
|
197
|
+
/**
|
|
198
|
+
* Retrieves the signal with the specified key.
|
|
199
|
+
* @param _ - The target object.
|
|
200
|
+
* @param key - The key of the signal.
|
|
201
|
+
* @returns The signal associated with the key.
|
|
202
|
+
*/
|
|
95
203
|
get: (e, r) => this.at(r)
|
|
96
204
|
}));
|
|
97
205
|
l(this, "filter", (e, r) => {
|
|
98
|
-
let
|
|
99
|
-
const
|
|
206
|
+
let s = r ?? this.get();
|
|
207
|
+
const n = new E(() => {
|
|
100
208
|
try {
|
|
101
|
-
const
|
|
102
|
-
return
|
|
103
|
-
} catch (
|
|
104
|
-
throw console.error("Error in Signal.filter:",
|
|
209
|
+
const o = this.get();
|
|
210
|
+
return s = e(o) ? o : s;
|
|
211
|
+
} catch (o) {
|
|
212
|
+
throw console.error("Error in Signal.filter:", o), o;
|
|
105
213
|
}
|
|
106
214
|
}, this.equals);
|
|
107
|
-
return this.setDerivative(
|
|
215
|
+
return this.setDerivative(n), n;
|
|
108
216
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Returns a new Computed object that applies the provided mapping function to the value of this Signal,
|
|
219
|
+
* and filters out values that are `undefined` or `null`.
|
|
220
|
+
*
|
|
221
|
+
* @typeParam O - The type of the mapped value.
|
|
222
|
+
* @param fn - The mapping function to apply to the value of this Signal.
|
|
223
|
+
* @param startValue - The initial value for the Computed object.
|
|
224
|
+
* @param equals - Optional equality function to determine if two values are equal.
|
|
225
|
+
* @returns - A new Computed object with the mapped and filtered values.
|
|
226
|
+
*/
|
|
227
|
+
l(this, "filterMap", (e, r, s = (n, o) => n === o) => {
|
|
228
|
+
let n = r;
|
|
229
|
+
const o = new E(() => {
|
|
112
230
|
try {
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
} catch (
|
|
116
|
-
throw console.error("Error in Signal.filterMap:",
|
|
231
|
+
const i = this.get(), a = e(i);
|
|
232
|
+
return n = a ?? n;
|
|
233
|
+
} catch (i) {
|
|
234
|
+
throw console.error("Error in Signal.filterMap:", i), i;
|
|
117
235
|
}
|
|
118
|
-
},
|
|
119
|
-
return this.setDerivative(
|
|
236
|
+
}, s);
|
|
237
|
+
return this.setDerivative(o), o;
|
|
120
238
|
});
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Maps the values emitted by the signal to a new value asynchronously using the provided function.
|
|
241
|
+
* If the function throws an error, it will be caught and logged.
|
|
242
|
+
* If a recovery function is provided, it will be called with the error and its return value will be used as the mapped value.
|
|
243
|
+
* If no recovery function is provided, the error will be logged as an unhandled promise rejection.
|
|
244
|
+
*
|
|
245
|
+
* @typeParam O - The type of the mapped value.
|
|
246
|
+
* @param fn - The function to map the values emitted by the signal. The second argument to this function allows to cancel the previously running mapping function if it has not completed by the time a new value is emitted.
|
|
247
|
+
* @param alt - The alternate value to use if the signal is disposed or the mapping function throws an error.
|
|
248
|
+
* @param recover - The recovery function to handle errors thrown by the mapping function.
|
|
249
|
+
* @param equals - The equality function to compare the mapped values for equality.
|
|
250
|
+
* @returns A property that holds the mapped value and can be observed for changes.
|
|
251
|
+
*/
|
|
252
|
+
l(this, "mapAsync", (e, r, s, n = (o, i) => o === i) => {
|
|
253
|
+
const o = C(r, n);
|
|
254
|
+
let i = 0, a = new AbortController();
|
|
255
|
+
return o.onDispose(
|
|
256
|
+
this.on(async (u) => {
|
|
257
|
+
const f = ++i;
|
|
258
|
+
a.abort(), a = new AbortController();
|
|
127
259
|
try {
|
|
128
|
-
e(a
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
} catch (f) {
|
|
137
|
-
throw console.error("Error in Signal.mapAsync:", f), f;
|
|
260
|
+
const d = await e(u, { abortSignal: a.signal });
|
|
261
|
+
f === i && o.set(d);
|
|
262
|
+
} catch (d) {
|
|
263
|
+
if (f === i)
|
|
264
|
+
if (s != null)
|
|
265
|
+
o.set(s(d));
|
|
266
|
+
else
|
|
267
|
+
throw d;
|
|
138
268
|
}
|
|
139
269
|
})
|
|
140
|
-
),
|
|
270
|
+
), o;
|
|
141
271
|
});
|
|
142
|
-
|
|
272
|
+
/**
|
|
273
|
+
* Maps the values of the signal using the provided function `fn`, and returns a new signal
|
|
274
|
+
* containing the mapped values. If the mapped value is `undefined` or `null`, it is replaced
|
|
275
|
+
* with the provided `alt` value.
|
|
276
|
+
*
|
|
277
|
+
* @typeParam O - The type of the mapped value.
|
|
278
|
+
* @param fn - The function used to map the values of the signal.
|
|
279
|
+
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
280
|
+
* @returns A new signal containing the mapped values.
|
|
281
|
+
*/
|
|
282
|
+
l(this, "mapMaybe", (e, r) => this.map((s) => e(s) ?? r));
|
|
283
|
+
/**
|
|
284
|
+
* Feeds a property into the signal and sets up disposal behavior.
|
|
285
|
+
* @param prop - The property to feed into the signal.
|
|
286
|
+
* @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
|
|
287
|
+
* @returns The input property.
|
|
288
|
+
*/
|
|
143
289
|
l(this, "feedProp", (e, r = !1) => {
|
|
144
|
-
const
|
|
145
|
-
return e.onDispose(
|
|
290
|
+
const s = this.on(e.set);
|
|
291
|
+
return e.onDispose(s), r ? this.onDispose(e.dispose) : this.onDispose(s), e;
|
|
146
292
|
});
|
|
147
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Derives a new property from the current signal.
|
|
295
|
+
* @param autoDisposeProp - Determines whether the derived property should be automatically disposed.
|
|
296
|
+
* @returns The derived property.
|
|
297
|
+
*/
|
|
298
|
+
l(this, "deriveProp", (e = !0) => this.feedProp(C(this.get()), e));
|
|
299
|
+
/**
|
|
300
|
+
* Returns a signal that emits the count of values received so far.
|
|
301
|
+
* @returns A signal that emits the count of values received so far.
|
|
302
|
+
*/
|
|
148
303
|
l(this, "count", () => {
|
|
149
304
|
let e = 0;
|
|
150
305
|
return this.map(() => ++e);
|
|
151
306
|
});
|
|
307
|
+
/**
|
|
308
|
+
* Adds a computed value as a derivative of the signal.
|
|
309
|
+
* When the computed value is disposed, it is automatically removed from the derivatives list.
|
|
310
|
+
* Additionally, when the computed value is disposed, it sets the signal as dirty.
|
|
311
|
+
* @param computed - The computed value to add as a derivative.
|
|
312
|
+
*/
|
|
152
313
|
l(this, "setDerivative", (e) => {
|
|
153
314
|
this._derivatives.push(e), e.onDispose(() => {
|
|
154
315
|
this._derivatives.splice(
|
|
@@ -159,49 +320,115 @@ const w = class w {
|
|
|
159
320
|
});
|
|
160
321
|
this.equals = r, this._value = e;
|
|
161
322
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"Unhandled promise rejection in Signal.ofPromise:",
|
|
167
|
-
o
|
|
168
|
-
);
|
|
169
|
-
}), i;
|
|
170
|
-
}
|
|
171
|
-
static is(e) {
|
|
172
|
-
return e != null && e[K] === !0;
|
|
173
|
-
}
|
|
174
|
-
static wrap(e, r = (n, s) => n === s) {
|
|
175
|
-
return w.is(e) ? e : new w(e, r);
|
|
176
|
-
}
|
|
177
|
-
static maybeWrap(e) {
|
|
178
|
-
return e == null ? e : w.wrap(e);
|
|
179
|
-
}
|
|
180
|
-
static unwrap(e) {
|
|
181
|
-
return w.is(e) ? e.get() : e;
|
|
182
|
-
}
|
|
183
|
-
static map(e, r) {
|
|
184
|
-
return w.is(e) ? e.map(r) : r(e);
|
|
185
|
-
}
|
|
323
|
+
/**
|
|
324
|
+
* Gets the value of the signal.
|
|
325
|
+
* @returns The current value of the signal.
|
|
326
|
+
*/
|
|
186
327
|
get value() {
|
|
187
328
|
return this._value;
|
|
188
329
|
}
|
|
189
330
|
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Creates a Signal that holds the result of a Promise.
|
|
333
|
+
*
|
|
334
|
+
* @typeParam O - The type of the value returned by the Promise.
|
|
335
|
+
* @param promise - The Promise to use to feed the Signal.
|
|
336
|
+
* @param init - The initial value of the Signal before the Promise resolves.
|
|
337
|
+
* @param recover - A function to recover from Promise rejection and provide an alternative value for the Signal.
|
|
338
|
+
* @param equals - A function to compare two values of type O for equality. Defaults to strict equality (===).
|
|
339
|
+
* @returns - A Signal that represents the result of the Promise.
|
|
340
|
+
*/
|
|
341
|
+
l(p, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
|
|
342
|
+
const o = new p(r, n);
|
|
343
|
+
return e.then((i) => o._setAndNotify(i, !1)).catch((i) => {
|
|
344
|
+
s != null ? o._setAndNotify(s(i), !1) : console.error(
|
|
345
|
+
"Unhandled promise rejection in Signal.ofPromise:",
|
|
346
|
+
i
|
|
347
|
+
);
|
|
348
|
+
}), o;
|
|
349
|
+
}), /**
|
|
350
|
+
* Checks if a value is a Signal.
|
|
351
|
+
*
|
|
352
|
+
* @param value - The value to check.
|
|
353
|
+
* @returns `true` if the value is a Signal, `false` otherwise.
|
|
354
|
+
*/
|
|
355
|
+
l(p, "is", (e) => (
|
|
356
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
357
|
+
e != null && e.$__signal__ === !0
|
|
358
|
+
)), /**
|
|
359
|
+
* Wraps a value or a Signal instance into a Signal.
|
|
360
|
+
* If the value is already a Signal, it returns the value itself.
|
|
361
|
+
* If the value is not a Signal, it creates a new Signal instance with the given value.
|
|
362
|
+
*
|
|
363
|
+
* @typeParam O - The type of the value.
|
|
364
|
+
* @param value - The value or Signal instance to wrap.
|
|
365
|
+
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
366
|
+
* @returns A Signal instance.
|
|
367
|
+
*/
|
|
368
|
+
l(p, "wrap", (e, r = (s, n) => s === n) => p.is(e) ? e : new p(e, r)), /**
|
|
369
|
+
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
370
|
+
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
371
|
+
* @param value - The value to wrap or check.
|
|
372
|
+
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
373
|
+
*/
|
|
374
|
+
l(p, "maybeWrap", (e) => e == null ? e : p.wrap(e)), /**
|
|
375
|
+
* Unwraps a value from a `Signal` if it is a `Signal`, otherwise returns the value as is.
|
|
376
|
+
*
|
|
377
|
+
* @param value - The value to unwrap.
|
|
378
|
+
* @returns The unwrapped value.
|
|
379
|
+
*/
|
|
380
|
+
l(p, "unwrap", (e) => p.is(e) ? e.get() : e), /**
|
|
381
|
+
* Maps the value of a `Signal` or a regular value using the provided mapping function.
|
|
382
|
+
* If the input value is a `Signal`, the mapping function is applied to its value.
|
|
383
|
+
* If the input value is not a `Signal`, the mapping function is directly applied to the value.
|
|
384
|
+
*
|
|
385
|
+
* @param value - The input value to be mapped.
|
|
386
|
+
* @param fn - The mapping function to be applied to the value.
|
|
387
|
+
* @returns A new `Signal` with the mapped value if the input value is a `Signal`,
|
|
388
|
+
* otherwise, the result of applying the mapping function to the value.
|
|
389
|
+
*
|
|
390
|
+
* @typeParam N - The type of the input value.
|
|
391
|
+
* @typeParam O - The type of the mapped value.
|
|
392
|
+
*/
|
|
393
|
+
l(p, "map", (e, r) => p.is(e) ? e.map(r) : r(e));
|
|
394
|
+
let h = p;
|
|
395
|
+
const Re = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
396
|
+
class E extends h {
|
|
397
|
+
/**
|
|
398
|
+
* Represents a Signal object.
|
|
399
|
+
* @param _fn - The function that returns the value of the signal.
|
|
400
|
+
* @param equals - The function used to compare two values of type T for equality.
|
|
401
|
+
*/
|
|
402
|
+
constructor(r, s) {
|
|
403
|
+
super(void 0, s);
|
|
404
|
+
/**
|
|
405
|
+
* @internal
|
|
406
|
+
*/
|
|
407
|
+
l(this, "$__computed__", !0);
|
|
408
|
+
/**
|
|
409
|
+
* @internal
|
|
410
|
+
*/
|
|
197
411
|
l(this, "_isDirty", !1);
|
|
412
|
+
/**
|
|
413
|
+
* Marks the signal as dirty, indicating that its value has changed and needs to be recalculated.
|
|
414
|
+
* If the signal is already dirty or disposed, this method does nothing.
|
|
415
|
+
* It also marks all dependent signals as dirty and schedules a notification to update their values.
|
|
416
|
+
*/
|
|
198
417
|
l(this, "setDirty", () => {
|
|
199
|
-
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((r) => r.setDirty()), this.
|
|
418
|
+
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((r) => r.setDirty()), this._scheduleNotify());
|
|
200
419
|
});
|
|
420
|
+
/**
|
|
421
|
+
* @internal
|
|
422
|
+
*/
|
|
201
423
|
l(this, "_scheduleCount", 0);
|
|
202
|
-
|
|
424
|
+
/**
|
|
425
|
+
* Schedules a notification to be executed asynchronously.
|
|
426
|
+
* If the signal is dirty, it will be updated and notified.
|
|
427
|
+
* @internal
|
|
428
|
+
*/
|
|
429
|
+
l(this, "_scheduleNotify", () => {
|
|
203
430
|
const r = ++this._scheduleCount;
|
|
204
|
-
|
|
431
|
+
Re(() => {
|
|
205
432
|
this._scheduleCount !== r || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
206
433
|
});
|
|
207
434
|
});
|
|
@@ -209,154 +436,195 @@ class E extends (te = h, ee = Y, te) {
|
|
|
209
436
|
l(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
|
|
210
437
|
this._fn = r, this.setDirty();
|
|
211
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Checks if a value is an instance of `Computed`.
|
|
441
|
+
*
|
|
442
|
+
* @param value - The value to check.
|
|
443
|
+
* @returns `true` if the value is an instance of `Computed`, `false` otherwise.
|
|
444
|
+
*/
|
|
212
445
|
static is(r) {
|
|
213
|
-
return r != null && r
|
|
446
|
+
return r != null && r.$__computed__ === !0;
|
|
214
447
|
}
|
|
215
448
|
/** {@inheritDoc Signal.value} */
|
|
216
449
|
get value() {
|
|
217
450
|
return this.get();
|
|
218
451
|
}
|
|
219
452
|
}
|
|
220
|
-
|
|
221
|
-
class F extends (ne = h, re = Q, ne) {
|
|
453
|
+
const V = class V extends h {
|
|
222
454
|
constructor() {
|
|
223
455
|
super(...arguments);
|
|
224
|
-
|
|
456
|
+
/**
|
|
457
|
+
* @internal
|
|
458
|
+
*/
|
|
459
|
+
l(this, "$__prop__", !0);
|
|
460
|
+
/**
|
|
461
|
+
* Changes the value of the property and notifies its listeners.
|
|
462
|
+
*
|
|
463
|
+
* @param value - The new value of the property.
|
|
464
|
+
*/
|
|
225
465
|
l(this, "set", (r) => {
|
|
226
466
|
this._setAndNotify(r, !1);
|
|
227
467
|
});
|
|
468
|
+
/**
|
|
469
|
+
* Updates the value of the signal by applying the provided function to the current value.
|
|
470
|
+
* @param fn - The function to apply to the current value.
|
|
471
|
+
*/
|
|
228
472
|
l(this, "update", (r) => {
|
|
229
473
|
this._setAndNotify(r(this.get()), !1);
|
|
230
474
|
});
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
475
|
+
/**
|
|
476
|
+
* Creates a reducer function that combines the provided reducer function and effects.
|
|
477
|
+
* @param fn - The reducer function that takes the current state and an action, and returns the new state.
|
|
478
|
+
* @param effects - An array of effects to be executed after the state is updated.
|
|
479
|
+
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
480
|
+
*/
|
|
481
|
+
l(this, "reducer", (r, ...s) => {
|
|
482
|
+
const n = this;
|
|
483
|
+
return function o(i) {
|
|
484
|
+
const a = n.value;
|
|
485
|
+
n.update((u) => r(u, i)), !n.equals(a, n.value) && s.forEach(
|
|
236
486
|
(u) => u({
|
|
237
487
|
previousState: a,
|
|
238
|
-
state:
|
|
239
|
-
action:
|
|
240
|
-
dispatch:
|
|
488
|
+
state: n.value,
|
|
489
|
+
action: i,
|
|
490
|
+
dispatch: o
|
|
241
491
|
})
|
|
242
492
|
);
|
|
243
493
|
};
|
|
244
494
|
});
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Creates an isomorphism for the Signal.
|
|
497
|
+
* An isomorphism is a pair of functions that convert values between two types,
|
|
498
|
+
* along with an equality function to compare values of the second type.
|
|
499
|
+
*
|
|
500
|
+
* @param to - A function that converts values from type T to type O.
|
|
501
|
+
* @param from - A function that converts values from type O to type T.
|
|
502
|
+
* @param equals - An optional function that compares values of type O for equality.
|
|
503
|
+
* Defaults to a strict equality check (===).
|
|
504
|
+
* @returns A Prop object representing the isomorphism.
|
|
505
|
+
*/
|
|
506
|
+
l(this, "iso", (r, s, n = (o, i) => o === i) => {
|
|
507
|
+
const o = new V(r(this.get()), n);
|
|
508
|
+
return o.onDispose(this.on((i) => o.set(r(i)))), o.on((i) => this._setAndNotify(s(i), !1)), o;
|
|
248
509
|
});
|
|
510
|
+
/**
|
|
511
|
+
* Returns a `Prop` that represents the value at the specified key of the current value.
|
|
512
|
+
*
|
|
513
|
+
* @param key - The key of the value to access.
|
|
514
|
+
* @returns A `Prop` that represents the value at the specified key.
|
|
515
|
+
*/
|
|
249
516
|
l(this, "atProp", (r) => this.iso(
|
|
250
|
-
(
|
|
251
|
-
(
|
|
517
|
+
(s) => s[r],
|
|
518
|
+
(s) => ({ ...this.value, [r]: s })
|
|
252
519
|
));
|
|
253
520
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
/** {@inheritDoc Signal.get} */
|
|
521
|
+
/**
|
|
522
|
+
* Access for the current value of the property.
|
|
523
|
+
*/
|
|
258
524
|
get value() {
|
|
259
525
|
return this.get();
|
|
260
526
|
}
|
|
261
527
|
set value(r) {
|
|
262
528
|
this._setAndNotify(r, !1);
|
|
263
529
|
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* Checks if a value is a Prop.
|
|
533
|
+
* @param value - The value to check.
|
|
534
|
+
* @returns `true` if the value is a Prop, `false` otherwise.
|
|
535
|
+
*/
|
|
536
|
+
l(V, "is", (r) => (
|
|
537
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
538
|
+
r != null && r.$__prop__ === !0
|
|
539
|
+
));
|
|
540
|
+
let F = V;
|
|
541
|
+
const j = (t, e, r = (s, n) => s === n) => {
|
|
542
|
+
const s = new E(t, r);
|
|
543
|
+
return e.forEach((n) => n.setDerivative(s)), s;
|
|
544
|
+
}, pt = (t, e) => j(t, e).dispose, C = (t, e = (r, s) => r === s) => new F(t, e), mt = (t, e = (r, s) => r === s) => new h(t, e);
|
|
545
|
+
class z {
|
|
279
546
|
constructor() {
|
|
280
547
|
l(this, "_store", /* @__PURE__ */ new Map());
|
|
548
|
+
/**
|
|
549
|
+
* Retrieves the value associated with the specified key from the memory store.
|
|
550
|
+
* @param key - The key to retrieve the value for.
|
|
551
|
+
* @returns The value associated with the key, or `null` if the key is not found.
|
|
552
|
+
*/
|
|
281
553
|
l(this, "getItem", (e) => this._store.get(e) ?? null);
|
|
554
|
+
/**
|
|
555
|
+
* Sets the value associated with the specified key in the memory store.
|
|
556
|
+
* @param key - The key to set the value for.
|
|
557
|
+
* @param value - The value to set.
|
|
558
|
+
*/
|
|
282
559
|
l(this, "setItem", (e, r) => {
|
|
283
560
|
this._store.set(e, r);
|
|
284
561
|
});
|
|
285
562
|
}
|
|
286
563
|
}
|
|
287
|
-
|
|
564
|
+
const Q = ({
|
|
288
565
|
key: t,
|
|
289
566
|
defaultValue: e,
|
|
290
567
|
store: r,
|
|
291
|
-
serialize:
|
|
292
|
-
deserialize:
|
|
293
|
-
equals:
|
|
294
|
-
onLoad:
|
|
295
|
-
}) {
|
|
568
|
+
serialize: s = JSON.stringify,
|
|
569
|
+
deserialize: n = JSON.parse,
|
|
570
|
+
equals: o = (a, u) => a === u,
|
|
571
|
+
onLoad: i = (a) => a
|
|
572
|
+
}) => {
|
|
296
573
|
const a = r.getItem(t), u = new F(
|
|
297
|
-
a != null ?
|
|
298
|
-
|
|
574
|
+
a != null ? i(n(a)) : typeof e == "function" ? e() : e,
|
|
575
|
+
o
|
|
299
576
|
);
|
|
300
577
|
return u.on((f) => {
|
|
301
|
-
r.setItem(t,
|
|
578
|
+
r.setItem(t, s(f));
|
|
302
579
|
}), u;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
function
|
|
311
|
-
return ie({
|
|
312
|
-
...t,
|
|
313
|
-
store: (window == null ? void 0 : window.sessionStorage) ?? new se()
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
function Z(t) {
|
|
580
|
+
}, gt = (t) => Q({
|
|
581
|
+
...t,
|
|
582
|
+
store: (window == null ? void 0 : window.localStorage) ?? new z()
|
|
583
|
+
}), _t = (t) => Q({
|
|
584
|
+
...t,
|
|
585
|
+
store: (window == null ? void 0 : window.sessionStorage) ?? new z()
|
|
586
|
+
});
|
|
587
|
+
function X(t) {
|
|
317
588
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
318
589
|
}
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
let a =
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}),
|
|
326
|
-
|
|
590
|
+
const Me = (t, e, r, s) => {
|
|
591
|
+
const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((_) => _), i = (s == null ? void 0 : s.equals) ?? ((_, k) => _ === k);
|
|
592
|
+
let a = s == null ? void 0 : s.interpolate, u = t, f = e(), d = performance.now(), A = null, m = !0;
|
|
593
|
+
const D = new E(e, i), S = C(t, i);
|
|
594
|
+
S.onDispose(() => {
|
|
595
|
+
A !== null && cancelAnimationFrame(A);
|
|
596
|
+
}), S.onDispose(D.dispose), r.forEach((_) => {
|
|
597
|
+
_.setDerivative(D), _.onDispose(S.dispose);
|
|
327
598
|
});
|
|
328
|
-
const
|
|
329
|
-
f =
|
|
330
|
-
},
|
|
331
|
-
const
|
|
332
|
-
a == null && (a =
|
|
333
|
-
let
|
|
334
|
-
|
|
599
|
+
const Ee = (_) => {
|
|
600
|
+
f = _, d = performance.now(), u = S.value, m && (m = !1, A = X(J));
|
|
601
|
+
}, J = () => {
|
|
602
|
+
const k = (performance.now() - d) / h.unwrap(n), Pe = o(k);
|
|
603
|
+
a == null && (a = Oe(u));
|
|
604
|
+
let K = a(u, f, Pe);
|
|
605
|
+
k >= 1 ? (m = !0, K = f) : A = X(J), S.set(K);
|
|
335
606
|
};
|
|
336
|
-
return
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
return Ge(
|
|
607
|
+
return D.on(Ee), S;
|
|
608
|
+
}, vt = (t, e) => {
|
|
609
|
+
const { initialValue: r, ...s } = e ?? {};
|
|
610
|
+
return Me(
|
|
341
611
|
r ?? t.get(),
|
|
342
612
|
t.get,
|
|
343
613
|
[t],
|
|
344
|
-
|
|
614
|
+
s
|
|
345
615
|
);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
({ signals: i, literals: o }, [a, u]) => (h.is(u) ? i.push([a, u]) : o[a] = u, { signals: i, literals: o }),
|
|
616
|
+
}, yt = (t, e) => {
|
|
617
|
+
const { signals: r, literals: s } = Object.entries(t).reduce(
|
|
618
|
+
({ signals: o, literals: i }, [a, u]) => (h.is(u) ? o.push([a, u]) : i[a] = u, { signals: o, literals: i }),
|
|
350
619
|
{ signals: [], literals: {} }
|
|
351
|
-
),
|
|
352
|
-
return
|
|
353
|
-
}
|
|
354
|
-
const oe = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), ue = /* @__PURE__ */ new Set([
|
|
620
|
+
), n = r.map(([, o]) => o);
|
|
621
|
+
return j(() => (r.forEach(([o, i]) => s[o] = i.value), e(s)), n);
|
|
622
|
+
}, Y = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Z = /* @__PURE__ */ new Set([
|
|
355
623
|
"rowSpan",
|
|
356
624
|
"colSpan",
|
|
357
625
|
"tabIndex",
|
|
358
626
|
"valueAsNumber"
|
|
359
|
-
]),
|
|
627
|
+
]), x = /* @__PURE__ */ new Set(["valueAsDate"]), ee = /* @__PURE__ */ new Set([
|
|
360
628
|
"value",
|
|
361
629
|
"textContent",
|
|
362
630
|
"innerText",
|
|
@@ -364,46 +632,24 @@ const oe = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]
|
|
|
364
632
|
"outerHTML",
|
|
365
633
|
"className",
|
|
366
634
|
"classList"
|
|
367
|
-
]),
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
return U.get(t);
|
|
635
|
+
]), q = /* @__PURE__ */ new Map(), b = (t, e) => {
|
|
636
|
+
if (q.has(t))
|
|
637
|
+
return q.get(t);
|
|
371
638
|
{
|
|
372
639
|
const r = e(t);
|
|
373
|
-
return
|
|
640
|
+
return q.set(t, r), r;
|
|
374
641
|
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
function We(t) {
|
|
387
|
-
return (e, r) => {
|
|
388
|
-
r == null ? e[t] = null : e[t] = r;
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
function Be(t) {
|
|
392
|
-
return (e, r) => {
|
|
393
|
-
r == null ? e[t] = null : e[t] = String(r);
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
function Xe(t) {
|
|
397
|
-
return (e, r) => {
|
|
398
|
-
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
function ce(t) {
|
|
402
|
-
return oe.has(t) ? D(t, He) : ue.has(t) ? D(t, Je) : le.has(t) ? D(t, We) : ae.has(t) ? D(t, Be) : D(t, Xe);
|
|
403
|
-
}
|
|
404
|
-
function fe(t) {
|
|
405
|
-
return (e) => oe.has(t) ? !!e[t] : ue.has(t) ? Number(e[t]) : le.has(t) ? e[t] : ae.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
406
|
-
}
|
|
642
|
+
}, Fe = (t) => (e, r) => {
|
|
643
|
+
r == null ? e[t] = null : e[t] = !!r;
|
|
644
|
+
}, Ve = (t) => (e, r) => {
|
|
645
|
+
r == null ? e[t] = null : e[t] = Number(r);
|
|
646
|
+
}, $e = (t) => (e, r) => {
|
|
647
|
+
r == null ? e[t] = null : e[t] = r;
|
|
648
|
+
}, qe = (t) => (e, r) => {
|
|
649
|
+
r == null ? e[t] = null : e[t] = String(r);
|
|
650
|
+
}, Ie = (t) => (e, r) => {
|
|
651
|
+
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
652
|
+
}, te = (t) => Y.has(t) ? b(t, Fe) : Z.has(t) ? b(t, Ve) : x.has(t) ? b(t, $e) : ee.has(t) ? b(t, qe) : b(t, Ie), re = (t) => (e) => Y.has(t) ? !!e[t] : Z.has(t) ? Number(e[t]) : x.has(t) ? e[t] : ee.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
407
653
|
class v {
|
|
408
654
|
/**
|
|
409
655
|
* Constructs a new `DOMContext` instance.
|
|
@@ -414,7 +660,7 @@ class v {
|
|
|
414
660
|
* @param providers - The `Providers` instance associated with this context.
|
|
415
661
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
416
662
|
*/
|
|
417
|
-
constructor(e, r,
|
|
663
|
+
constructor(e, r, s, n, o) {
|
|
418
664
|
/**
|
|
419
665
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
420
666
|
*
|
|
@@ -521,14 +767,14 @@ class v {
|
|
|
521
767
|
*
|
|
522
768
|
* @param mark - The provider mark to retrieve the provider for.
|
|
523
769
|
* @returns The provider for the given mark.
|
|
524
|
-
* @throws
|
|
770
|
+
* @throws Throws `ProviderNotFoundError` if the provider for the given mark is not found.
|
|
525
771
|
*/
|
|
526
772
|
l(this, "getProvider", (e) => {
|
|
527
773
|
if (this.providers[e] === void 0)
|
|
528
|
-
throw new
|
|
774
|
+
throw new Be(e);
|
|
529
775
|
return this.providers[e];
|
|
530
776
|
});
|
|
531
|
-
this.document = e, this.element = r, this.reference =
|
|
777
|
+
this.document = e, this.element = r, this.reference = s, this.providers = n, this.isFirstLevel = o;
|
|
532
778
|
}
|
|
533
779
|
/**
|
|
534
780
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
@@ -541,316 +787,335 @@ class v {
|
|
|
541
787
|
return new v(e.ownerDocument, e, r, {}, !0);
|
|
542
788
|
}
|
|
543
789
|
}
|
|
544
|
-
|
|
790
|
+
class Be extends Error {
|
|
791
|
+
constructor(e) {
|
|
792
|
+
super(`Provider not found: ${e.description}`);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
const g = (t) => {
|
|
545
796
|
const e = t;
|
|
546
797
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
547
|
-
}
|
|
548
|
-
function
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
let n = t.target;
|
|
556
|
-
for (; n != null && !(n instanceof HTMLAnchorElement); )
|
|
557
|
-
n = n.parentElement;
|
|
558
|
-
if (n == null) return !0;
|
|
559
|
-
const s = n;
|
|
560
|
-
if (t.button !== 0 || t.ctrlKey || t.metaKey || s.target !== "_self" && s.target !== "" || s.getAttribute("download") != null)
|
|
798
|
+
}, je = (t) => se(t) ? t : t.parentElement, se = (t) => t.nodeType === 1;
|
|
799
|
+
function Ue(t, e, r) {
|
|
800
|
+
let s = t.target;
|
|
801
|
+
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
802
|
+
s = s.parentElement;
|
|
803
|
+
if (s == null) return !0;
|
|
804
|
+
const n = s;
|
|
805
|
+
if (t.button !== 0 || t.ctrlKey || t.metaKey || n.target !== "_self" && n.target !== "" || n.getAttribute("download") != null)
|
|
561
806
|
return !0;
|
|
562
807
|
if (r) {
|
|
563
|
-
const { pathname:
|
|
564
|
-
if (
|
|
808
|
+
const { pathname: o, search: i, hash: a } = n, u = o + i + a;
|
|
809
|
+
if (n.getAttribute("href") !== u || e === !0 && !/\/[^/.]*$/.test(o) || Array.isArray(e) && !e.some((f) => o.endsWith(f)))
|
|
565
810
|
return !0;
|
|
566
811
|
}
|
|
567
812
|
return !1;
|
|
568
813
|
}
|
|
569
|
-
const
|
|
570
|
-
checkExtension:
|
|
571
|
-
checkExternalUrl: !0
|
|
572
|
-
}) => (
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
n === !0,
|
|
577
|
-
s === !0
|
|
578
|
-
) || t() && r.preventDefault();
|
|
579
|
-
}, de = (t) => (e) => {
|
|
580
|
-
_e(e);
|
|
814
|
+
const wt = (t, {
|
|
815
|
+
checkExtension: e = [".html"],
|
|
816
|
+
checkExternalUrl: r = !0
|
|
817
|
+
} = {}) => (s) => {
|
|
818
|
+
Ue(s, e, r) || t() && s.preventDefault();
|
|
819
|
+
}, ne = (t) => (e) => {
|
|
820
|
+
he(e);
|
|
581
821
|
const r = e.createText(t);
|
|
582
|
-
return e.appendOrInsert(r), (
|
|
583
|
-
|
|
822
|
+
return e.appendOrInsert(r), (s) => {
|
|
823
|
+
s && g(r);
|
|
584
824
|
};
|
|
585
|
-
},
|
|
586
|
-
|
|
825
|
+
}, oe = (t) => (e) => {
|
|
826
|
+
he(e);
|
|
587
827
|
const r = e.createText(t.value);
|
|
588
828
|
e.appendOrInsert(r);
|
|
589
|
-
const
|
|
590
|
-
return (s) => {
|
|
591
|
-
n(), s && p(r);
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
|
-
function kt(t) {
|
|
595
|
-
return h.is(t) ? pe(t) : de(t);
|
|
596
|
-
}
|
|
597
|
-
const y = (...t) => (e) => {
|
|
598
|
-
const r = t.map((n) => c(n)(e));
|
|
829
|
+
const s = t.on((n) => r.data = n);
|
|
599
830
|
return (n) => {
|
|
600
|
-
|
|
831
|
+
s(), n && g(r);
|
|
832
|
+
};
|
|
833
|
+
}, At = (t) => h.is(t) ? oe(t) : ne(t), y = (...t) => (e) => {
|
|
834
|
+
const r = t.map((s) => c(s)(e));
|
|
835
|
+
return (s) => {
|
|
836
|
+
r.forEach((n) => n(s));
|
|
601
837
|
};
|
|
602
|
-
},
|
|
603
|
-
},
|
|
838
|
+
}, w = () => () => {
|
|
839
|
+
}, We = (t) => (e) => (ce(e), e.element.classList.add(...t), (r) => {
|
|
604
840
|
r && e.element.classList.remove(...t);
|
|
605
|
-
}),
|
|
606
|
-
|
|
841
|
+
}), Ge = (t) => (e) => {
|
|
842
|
+
ce(e);
|
|
607
843
|
const r = e.element;
|
|
608
|
-
let
|
|
609
|
-
const
|
|
610
|
-
|
|
844
|
+
let s = [];
|
|
845
|
+
const n = t.on((o) => {
|
|
846
|
+
s.forEach((i) => r.classList.remove(i)), s = (o ?? "").split(" ").filter((i) => i.length > 0), r.classList.add(...s);
|
|
611
847
|
});
|
|
612
|
-
return (
|
|
613
|
-
|
|
848
|
+
return (o) => {
|
|
849
|
+
n(), o && s.forEach((i) => r.classList.remove(i)), s.length = 0;
|
|
614
850
|
};
|
|
615
|
-
},
|
|
616
|
-
const r =
|
|
617
|
-
return (
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
return r(
|
|
621
|
-
|
|
851
|
+
}, L = (t, e) => {
|
|
852
|
+
const r = te(t), s = re(t);
|
|
853
|
+
return (n) => {
|
|
854
|
+
ae(n, t);
|
|
855
|
+
const o = s(n.element);
|
|
856
|
+
return r(n.element, e), (i) => {
|
|
857
|
+
i && r(n.element, o);
|
|
622
858
|
};
|
|
623
859
|
};
|
|
624
|
-
},
|
|
625
|
-
const r =
|
|
626
|
-
return (
|
|
627
|
-
|
|
628
|
-
const i = n
|
|
629
|
-
return
|
|
630
|
-
|
|
860
|
+
}, N = (t, e) => {
|
|
861
|
+
const r = te(t), s = re(t);
|
|
862
|
+
return (n) => {
|
|
863
|
+
ae(n, t);
|
|
864
|
+
const o = s(n.element), i = e.on((a) => r(n.element, a));
|
|
865
|
+
return (a) => {
|
|
866
|
+
i(), a && r(n.element, o);
|
|
631
867
|
};
|
|
632
868
|
};
|
|
633
|
-
},
|
|
869
|
+
}, P = new Proxy(
|
|
634
870
|
{},
|
|
635
871
|
{
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
872
|
+
/**
|
|
873
|
+
* Creates a renderable component for the specified attribute.
|
|
874
|
+
*
|
|
875
|
+
* Generally using multiple attributes with the same name is not recommended.
|
|
876
|
+
* `class` is the exception and can be used multiple times.
|
|
877
|
+
*
|
|
878
|
+
* @param _ - The target object.
|
|
879
|
+
* @param name - The name of the attribute.
|
|
880
|
+
* @returns The renderable component for the specified attribute.
|
|
881
|
+
*
|
|
882
|
+
*/
|
|
883
|
+
get: (t, e) => e === "class" ? (r) => h.is(r) ? Ge(r) : We(
|
|
884
|
+
(r ?? "").split(" ").filter((s) => s.length > 0)
|
|
885
|
+
) : (r) => h.is(r) ? N(
|
|
639
886
|
e,
|
|
640
887
|
r
|
|
641
|
-
) :
|
|
888
|
+
) : L(
|
|
642
889
|
e,
|
|
643
890
|
r
|
|
644
891
|
)
|
|
645
892
|
}
|
|
646
|
-
),
|
|
893
|
+
), St = new Proxy(
|
|
647
894
|
{},
|
|
648
895
|
{
|
|
649
|
-
|
|
896
|
+
/**
|
|
897
|
+
* Creates a renderable component for the specified `data-?` attribute.
|
|
898
|
+
*
|
|
899
|
+
* @param _ - The target object.
|
|
900
|
+
* @param name - The name of the data attribute.
|
|
901
|
+
* @returns The renderable component for the specified attribute.
|
|
902
|
+
*
|
|
903
|
+
*/
|
|
904
|
+
get: (t, e) => (r) => h.is(r) ? N(
|
|
650
905
|
`data-${e}`,
|
|
651
906
|
r
|
|
652
|
-
) :
|
|
907
|
+
) : L(`data-${e}`, r)
|
|
653
908
|
}
|
|
654
|
-
),
|
|
909
|
+
), Et = new Proxy(
|
|
655
910
|
{},
|
|
656
911
|
{
|
|
657
|
-
|
|
912
|
+
/**
|
|
913
|
+
* Creates a renderable component for the specified `aria-?` attribute.
|
|
914
|
+
*
|
|
915
|
+
* @param _ - The target object.
|
|
916
|
+
* @param name - The name of the aria attribute.
|
|
917
|
+
* @returns The renderable component for the specified attribute.
|
|
918
|
+
*
|
|
919
|
+
*/
|
|
920
|
+
get: (t, e) => (r) => h.is(r) ? N(
|
|
658
921
|
`aria-${e}`,
|
|
659
922
|
r
|
|
660
|
-
) :
|
|
923
|
+
) : L(
|
|
661
924
|
`aria-${e}`,
|
|
662
925
|
r
|
|
663
926
|
)
|
|
664
927
|
}
|
|
665
|
-
),
|
|
928
|
+
), Pt = new Proxy(
|
|
666
929
|
{},
|
|
667
930
|
{
|
|
668
|
-
|
|
931
|
+
/**
|
|
932
|
+
* Creates a renderable component for the specified `svg` attribute.
|
|
933
|
+
*
|
|
934
|
+
* @param _ - The target object.
|
|
935
|
+
* @param name - The name of the SVG attribute.
|
|
936
|
+
* @returns The renderable component for the specified attribute.
|
|
937
|
+
*
|
|
938
|
+
*/
|
|
939
|
+
get: (t, e) => (r) => h.is(r) ? N(
|
|
669
940
|
e,
|
|
670
941
|
r
|
|
671
|
-
) :
|
|
942
|
+
) : L(
|
|
672
943
|
e,
|
|
673
944
|
r
|
|
674
945
|
)
|
|
675
946
|
}
|
|
676
|
-
),
|
|
947
|
+
), Dt = new Proxy(
|
|
677
948
|
{},
|
|
678
949
|
{
|
|
679
|
-
|
|
950
|
+
/**
|
|
951
|
+
* Creates a renderable component for the specified `math` attribute.
|
|
952
|
+
*
|
|
953
|
+
* @param name - The name of the Math attribute.
|
|
954
|
+
* @returns The renderable component for the specified attribute.
|
|
955
|
+
*
|
|
956
|
+
*/
|
|
957
|
+
get: (t, e) => (r) => h.is(r) ? N(
|
|
680
958
|
e,
|
|
681
959
|
r
|
|
682
|
-
) :
|
|
960
|
+
) : L(
|
|
683
961
|
e,
|
|
684
962
|
r
|
|
685
963
|
)
|
|
686
964
|
}
|
|
687
|
-
)
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
const n = r.createElement(t, void 0);
|
|
694
|
-
r.isFirstLevel && R.isSSR() && we(n), r.appendOrInsert(n), r = r.withElement(n);
|
|
695
|
-
const s = e.map((i) => c(i)(r));
|
|
696
|
-
return (i) => {
|
|
697
|
-
s.forEach((o) => o(!1)), i && p(n);
|
|
698
|
-
};
|
|
965
|
+
), c = (t) => t == null ? w : Array.isArray(t) ? y(...t.map(c)) : typeof t == "string" ? ne(t) : h.is(t) ? oe(t) : t, ie = (t, ...e) => (r) => {
|
|
966
|
+
const s = r.createElement(t, void 0);
|
|
967
|
+
r.isFirstLevel && O() && fe(s), r.appendOrInsert(s), r = r.withElement(s);
|
|
968
|
+
const n = e.map((o) => c(o)(r));
|
|
969
|
+
return (o) => {
|
|
970
|
+
n.forEach((i) => i(!1)), o && g(s);
|
|
699
971
|
};
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
return (o) => {
|
|
707
|
-
i.forEach((a) => a(!1)), o && p(s);
|
|
708
|
-
};
|
|
972
|
+
}, le = (t, e, ...r) => (s) => {
|
|
973
|
+
const n = s.createElement(t, e);
|
|
974
|
+
s.isFirstLevel && O() && fe(n), s.appendOrInsert(n), s = s.withElement(n);
|
|
975
|
+
const o = r.map((i) => c(i)(s));
|
|
976
|
+
return (i) => {
|
|
977
|
+
o.forEach((a) => a(!1)), i && g(n);
|
|
709
978
|
};
|
|
710
|
-
}
|
|
711
|
-
const Ot = new Proxy(
|
|
979
|
+
}, bt = new Proxy(
|
|
712
980
|
{},
|
|
713
981
|
{
|
|
714
|
-
|
|
982
|
+
/**
|
|
983
|
+
* Creates a renderable that represents an HTML element.
|
|
984
|
+
* @param tagName - The HTML tag name.
|
|
985
|
+
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
986
|
+
*/
|
|
987
|
+
get: (t, e) => (...r) => ie(e, r.flatMap(c))
|
|
715
988
|
}
|
|
716
|
-
),
|
|
989
|
+
), Tt = new Proxy(
|
|
717
990
|
{},
|
|
718
991
|
{
|
|
719
|
-
|
|
992
|
+
/**
|
|
993
|
+
* Creates a renderable that represents an HTMLInput element.
|
|
994
|
+
* @param type - The input type name.
|
|
995
|
+
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
996
|
+
*/
|
|
997
|
+
get: (t, e) => (...r) => ie("input", P.type(e), ...r)
|
|
720
998
|
}
|
|
721
|
-
),
|
|
999
|
+
), He = "http://www.w3.org/2000/svg", Ct = new Proxy(
|
|
722
1000
|
{},
|
|
723
1001
|
{
|
|
724
|
-
|
|
1002
|
+
/**
|
|
1003
|
+
* Creates a renderable that represents an SVG element.
|
|
1004
|
+
* @param tagName - The SVG tag name.
|
|
1005
|
+
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1006
|
+
*/
|
|
1007
|
+
get: (t, e) => (...r) => le(e, He, r.flatMap(c))
|
|
725
1008
|
}
|
|
726
|
-
),
|
|
1009
|
+
), Je = "http://www.w3.org/1998/Math/MathML", Lt = new Proxy(
|
|
727
1010
|
{},
|
|
728
1011
|
{
|
|
729
|
-
|
|
1012
|
+
/**
|
|
1013
|
+
* Creates a renderable that represents an Math element.
|
|
1014
|
+
* @param tagName - The Math tag name.
|
|
1015
|
+
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1016
|
+
*/
|
|
1017
|
+
get: (t, e) => (...r) => le(e, Je, r.flatMap(c))
|
|
730
1018
|
}
|
|
731
|
-
), T = "data-tempo-attr",
|
|
732
|
-
function et(t, e) {
|
|
1019
|
+
), T = "data-tempo-attr", R = "data-tempo-class", ue = "data-tempo-node", M = "data-tempo-text", Ke = (t, e) => {
|
|
733
1020
|
const r = t.getAttribute(e);
|
|
734
1021
|
if (r != null) {
|
|
735
|
-
const
|
|
736
|
-
t.setAttribute(
|
|
1022
|
+
const s = t.getAttribute(T) ?? "{}", n = { ...JSON.parse(s), name: r };
|
|
1023
|
+
t.setAttribute(
|
|
1024
|
+
T,
|
|
1025
|
+
JSON.stringify(n).replace(/"/g, """)
|
|
1026
|
+
);
|
|
737
1027
|
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
}
|
|
742
|
-
function tt(t) {
|
|
1028
|
+
}, ae = (t, e) => {
|
|
1029
|
+
O() && t.isFirstLevel && Ke(t.element, e);
|
|
1030
|
+
}, Xe = (t) => {
|
|
743
1031
|
t.querySelectorAll(`[${T}]`).forEach((e) => {
|
|
744
|
-
const r = JSON.parse(
|
|
745
|
-
|
|
746
|
-
|
|
1032
|
+
const r = JSON.parse(
|
|
1033
|
+
(e.getAttribute(T) ?? "{}").replace(/"/g, '"')
|
|
1034
|
+
);
|
|
1035
|
+
for (const [s, n] of Object.entries(r))
|
|
1036
|
+
e.setAttribute(s, n);
|
|
747
1037
|
e.removeAttribute(T);
|
|
748
1038
|
});
|
|
749
|
-
}
|
|
750
|
-
function
|
|
751
|
-
t.setAttribute(
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
r !== null && (e.className = r, e.removeAttribute(I));
|
|
1039
|
+
};
|
|
1040
|
+
function ze(t) {
|
|
1041
|
+
t.setAttribute(R, t.className);
|
|
1042
|
+
}
|
|
1043
|
+
const ce = (t) => {
|
|
1044
|
+
O() && t.isFirstLevel && ze(t.element);
|
|
1045
|
+
}, Qe = (t) => {
|
|
1046
|
+
t.querySelectorAll(`[${R}]`).forEach((e) => {
|
|
1047
|
+
const r = e.getAttribute(R);
|
|
1048
|
+
r !== null && (e.className = r, e.removeAttribute(R));
|
|
760
1049
|
});
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
t.querySelectorAll(`[${ve}]`).forEach((e) => {
|
|
767
|
-
p(e);
|
|
1050
|
+
}, fe = (t) => {
|
|
1051
|
+
t.setAttribute(ue, "");
|
|
1052
|
+
}, Ye = (t) => {
|
|
1053
|
+
t.querySelectorAll(`[${ue}]`).forEach((e) => {
|
|
1054
|
+
g(e);
|
|
768
1055
|
});
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
function ot(t) {
|
|
777
|
-
t.querySelectorAll(`[${$}]`).forEach((e) => {
|
|
778
|
-
e.textContent = e.getAttribute($), e.removeAttribute($);
|
|
1056
|
+
}, Ze = (t) => {
|
|
1057
|
+
t.setAttribute(M, t.textContent ?? "");
|
|
1058
|
+
}, he = (t) => {
|
|
1059
|
+
O() && t.isFirstLevel && Ze(t.element);
|
|
1060
|
+
}, xe = (t) => {
|
|
1061
|
+
t.querySelectorAll(`[${M}]`).forEach((e) => {
|
|
1062
|
+
e.textContent = e.getAttribute(M), e.removeAttribute(M);
|
|
779
1063
|
});
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
}
|
|
784
|
-
function Ae() {
|
|
1064
|
+
}, et = (t) => {
|
|
1065
|
+
Ye(t), Qe(t), Xe(t), xe(t);
|
|
1066
|
+
}, de = () => {
|
|
785
1067
|
const t = globalThis;
|
|
786
1068
|
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
787
1069
|
isSSR: !1,
|
|
788
1070
|
counter: 0
|
|
789
1071
|
}), t.__tempoSSR__;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
const r = Ae();
|
|
1072
|
+
}, U = (t, e) => {
|
|
1073
|
+
const r = de();
|
|
793
1074
|
r[t] = e;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
function W() {
|
|
805
|
-
return Ee("counter");
|
|
806
|
-
}
|
|
807
|
-
function at() {
|
|
808
|
-
J("counter", (W() ?? 0) + 1);
|
|
809
|
-
}
|
|
810
|
-
function ct() {
|
|
811
|
-
J("counter", (W() ?? 0) - 1);
|
|
812
|
-
}
|
|
813
|
-
const qt = (t = 30) => (j(!0), new Promise((e, r) => {
|
|
814
|
-
let n;
|
|
815
|
-
const s = setInterval(() => {
|
|
816
|
-
W() <= 0 && (clearInterval(s), clearTimeout(n), j(!1), e());
|
|
1075
|
+
}, pe = (t) => de()[t], I = (t) => {
|
|
1076
|
+
U("isSSR", t);
|
|
1077
|
+
}, W = () => pe("counter"), tt = () => {
|
|
1078
|
+
U("counter", (W() ?? 0) + 1);
|
|
1079
|
+
}, rt = () => {
|
|
1080
|
+
U("counter", (W() ?? 0) - 1);
|
|
1081
|
+
}, Nt = (t = 30) => (I(!0), new Promise((e, r) => {
|
|
1082
|
+
let s;
|
|
1083
|
+
const n = setInterval(() => {
|
|
1084
|
+
W() <= 0 && (clearInterval(n), clearTimeout(s), I(!1), e());
|
|
817
1085
|
}, 30);
|
|
818
|
-
|
|
819
|
-
clearInterval(
|
|
1086
|
+
s = setTimeout(() => {
|
|
1087
|
+
clearInterval(n), I(!1), r(new Error("SSR Timeout"));
|
|
820
1088
|
}, t * 1e3);
|
|
821
|
-
})),
|
|
822
|
-
useDone: (t) => (at(), c(t(ct))),
|
|
823
|
-
isSSR: lt
|
|
824
|
-
}, be = (t, e) => {
|
|
1089
|
+
})), Ot = (t) => (tt(), c(t(rt))), O = () => pe("isSSR"), me = (t, e) => {
|
|
825
1090
|
if (typeof e == "function")
|
|
826
|
-
return
|
|
827
|
-
const r = e.pending != null ? c(e.pending) :
|
|
828
|
-
return (
|
|
829
|
-
let
|
|
1091
|
+
return me(t, { then: e });
|
|
1092
|
+
const r = e.pending != null ? c(e.pending) : w, s = e.then, n = e.error != null ? (o) => c(e.error(o)) : () => w;
|
|
1093
|
+
return (o) => {
|
|
1094
|
+
let i = !0;
|
|
830
1095
|
const a = t();
|
|
831
|
-
|
|
832
|
-
let u = c(r)(
|
|
1096
|
+
o = o.makeRef();
|
|
1097
|
+
let u = c(r)(o);
|
|
833
1098
|
return a.then(
|
|
834
1099
|
(f) => {
|
|
835
|
-
|
|
1100
|
+
i && (u(!0), u = c(s(f))(o));
|
|
836
1101
|
},
|
|
837
1102
|
(f) => {
|
|
838
|
-
|
|
1103
|
+
i && (u(!0), u = c(n(f))(o));
|
|
839
1104
|
}
|
|
840
1105
|
), (f) => {
|
|
841
|
-
|
|
1106
|
+
i = !1, u(f), f && o.reference && g(o.reference);
|
|
842
1107
|
};
|
|
843
1108
|
};
|
|
844
|
-
},
|
|
845
|
-
|
|
846
|
-
}),
|
|
1109
|
+
}, kt = (t, e) => me(() => t, e), ge = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
|
|
1110
|
+
s && r.element.removeEventListener(t, e);
|
|
1111
|
+
}), st = (t) => ge("click", (e) => {
|
|
847
1112
|
e.preventDefault();
|
|
848
1113
|
const r = e.target;
|
|
849
1114
|
setTimeout(() => {
|
|
850
|
-
const
|
|
851
|
-
|
|
1115
|
+
const s = r.ownerDocument != null ? r == null ? void 0 : r.checked : void 0;
|
|
1116
|
+
s != null && t(!s);
|
|
852
1117
|
}, 0);
|
|
853
|
-
}),
|
|
1118
|
+
}), $ = new Proxy(
|
|
854
1119
|
{},
|
|
855
1120
|
{
|
|
856
1121
|
/**
|
|
@@ -858,369 +1123,349 @@ const qt = (t = 30) => (j(!0), new Promise((e, r) => {
|
|
|
858
1123
|
* @param fn - The function to call when the event is triggered.
|
|
859
1124
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
860
1125
|
*/
|
|
861
|
-
get: (t, e) => (r) =>
|
|
862
|
-
}
|
|
863
|
-
), V = {
|
|
864
|
-
value: (t) => (e) => {
|
|
865
|
-
const r = e.target;
|
|
866
|
-
t(r.value);
|
|
867
|
-
},
|
|
868
|
-
valueAsNumber: (t) => (e) => {
|
|
869
|
-
const r = e.target;
|
|
870
|
-
t(r.valueAsNumber);
|
|
871
|
-
},
|
|
872
|
-
valueAsDate: (t) => (e) => {
|
|
873
|
-
const r = e.target;
|
|
874
|
-
if (r.value === "")
|
|
875
|
-
return;
|
|
876
|
-
const n = r.value.split("-"), s = new Date(
|
|
877
|
-
Number(n[0]),
|
|
878
|
-
Number(n[1]) - 1,
|
|
879
|
-
Number(n[2].substring(0, 2))
|
|
880
|
-
);
|
|
881
|
-
t(s);
|
|
882
|
-
},
|
|
883
|
-
valueAsDateTime: (t) => (e) => {
|
|
884
|
-
const r = e.target;
|
|
885
|
-
if (r.value === "")
|
|
886
|
-
return;
|
|
887
|
-
const n = r.value.split("T"), s = n[0].split("-"), i = new Date(
|
|
888
|
-
Number(s[0]),
|
|
889
|
-
Number(s[1]) - 1,
|
|
890
|
-
Number(s[2])
|
|
891
|
-
), o = n[1].split(":");
|
|
892
|
-
i.setHours(Number(o[0])), i.setMinutes(Number(o[1])), i.setSeconds(Number(o[2])), t(i);
|
|
893
|
-
},
|
|
894
|
-
checked: (t) => (e) => {
|
|
895
|
-
const r = e.target;
|
|
896
|
-
t(r.checked);
|
|
897
|
-
},
|
|
898
|
-
preventDefault: (t) => (e) => {
|
|
899
|
-
e.preventDefault(), t();
|
|
900
|
-
},
|
|
901
|
-
stopPropagation: (t) => (e) => {
|
|
902
|
-
e.stopPropagation(), t();
|
|
903
|
-
},
|
|
904
|
-
stopImmediatePropagation: (t) => (e) => {
|
|
905
|
-
e.stopImmediatePropagation(), t();
|
|
1126
|
+
get: (t, e) => (r) => ge(e, r)
|
|
906
1127
|
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
);
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
return y(
|
|
922
|
-
b.valueAsNumber(t),
|
|
923
|
-
q[e](V.valueAsNumber(t.set))
|
|
1128
|
+
), nt = (t) => (e) => {
|
|
1129
|
+
const r = e.target;
|
|
1130
|
+
t(r.value);
|
|
1131
|
+
}, ot = (t) => (e) => {
|
|
1132
|
+
const r = e.target;
|
|
1133
|
+
t(r.valueAsNumber);
|
|
1134
|
+
}, it = (t) => (e) => {
|
|
1135
|
+
const r = e.target;
|
|
1136
|
+
if (r.value === "")
|
|
1137
|
+
return;
|
|
1138
|
+
const s = r.value.split("-"), n = new Date(
|
|
1139
|
+
Number(s[0]),
|
|
1140
|
+
Number(s[1]) - 1,
|
|
1141
|
+
Number(s[2].substring(0, 2))
|
|
924
1142
|
);
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1143
|
+
t(n);
|
|
1144
|
+
}, lt = (t) => (e) => {
|
|
1145
|
+
const r = e.target;
|
|
1146
|
+
if (r.value === "")
|
|
1147
|
+
return;
|
|
1148
|
+
const s = r.value.split("T"), n = s[0].split("-"), o = new Date(
|
|
1149
|
+
Number(n[0]),
|
|
1150
|
+
Number(n[1]) - 1,
|
|
1151
|
+
Number(n[2])
|
|
1152
|
+
), i = s[1].split(":");
|
|
1153
|
+
o.setHours(Number(i[0])), o.setMinutes(Number(i[1])), o.setSeconds(Number(i[2])), t(o);
|
|
1154
|
+
}, Rt = (t) => (e) => {
|
|
1155
|
+
const r = e.target;
|
|
1156
|
+
t(r.checked);
|
|
1157
|
+
}, Mt = (t) => (e) => {
|
|
1158
|
+
e.preventDefault(), t();
|
|
1159
|
+
}, Ft = (t) => (e) => {
|
|
1160
|
+
e.stopPropagation(), t();
|
|
1161
|
+
}, Vt = (t) => (e) => {
|
|
1162
|
+
e.stopImmediatePropagation(), t();
|
|
1163
|
+
}, $t = (t, e = "input") => y(
|
|
1164
|
+
P.valueAsDate(t),
|
|
1165
|
+
$[e](it(t.set))
|
|
1166
|
+
), qt = (t, e = "input") => y(
|
|
1167
|
+
P.valueAsDate(t),
|
|
1168
|
+
$[e](lt(t.set))
|
|
1169
|
+
), It = (t, e = "input") => y(
|
|
1170
|
+
P.valueAsNumber(t),
|
|
1171
|
+
$[e](ot(t.set))
|
|
1172
|
+
), Bt = (t, e = "input") => y(P.value(t), $[e](nt(t.set))), jt = (t) => y(P.checked(t), st(t.set)), G = (t, e) => (r) => {
|
|
939
1173
|
r = r.makeRef();
|
|
940
|
-
let
|
|
941
|
-
const
|
|
942
|
-
let
|
|
943
|
-
const a =
|
|
944
|
-
if (u !==
|
|
945
|
-
|
|
946
|
-
const f = e[u](
|
|
947
|
-
|
|
1174
|
+
let s, n;
|
|
1175
|
+
const o = t.map((u) => Object.keys(u)[0]);
|
|
1176
|
+
let i;
|
|
1177
|
+
const a = o.on((u) => {
|
|
1178
|
+
if (u !== i) {
|
|
1179
|
+
n == null || n.dispose(), s == null || s(!0), n = t.map((d) => d[u]);
|
|
1180
|
+
const f = e[u](n);
|
|
1181
|
+
s = c(f)(r), i = u;
|
|
948
1182
|
}
|
|
949
1183
|
});
|
|
950
1184
|
return (u) => {
|
|
951
|
-
a(), u && r.reference != null &&
|
|
1185
|
+
a(), u && r.reference != null && g(r.reference), s == null || s(!0);
|
|
952
1186
|
};
|
|
953
|
-
},
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
},
|
|
968
|
-
type: (t, e) => k.field(t, "type", e),
|
|
969
|
-
value: (t, e) => O(
|
|
970
|
-
t.map((r) => ({ [r]: !0 })),
|
|
971
|
-
e
|
|
972
|
-
)
|
|
973
|
-
}, jt = (t, e) => (r) => {
|
|
974
|
-
const n = (e == null ? void 0 : e.firstSeparator) ?? S, s = (e == null ? void 0 : e.lastSeparator) ?? S;
|
|
975
|
-
return k.value(
|
|
976
|
-
r.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1187
|
+
}, _e = (t, e, r) => G(
|
|
1188
|
+
t.map((s) => ({ [s[e]]: s })),
|
|
1189
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1190
|
+
r
|
|
1191
|
+
), Ut = (t, e) => _e(t, "kind", e), Wt = (t, e) => {
|
|
1192
|
+
const r = t.map(([s, n]) => ({ [s]: n }));
|
|
1193
|
+
return G(r, e);
|
|
1194
|
+
}, Gt = (t, e) => _e(t, "type", e), H = (t, e) => G(
|
|
1195
|
+
t.map((r) => ({ [r]: !0 })),
|
|
1196
|
+
e
|
|
1197
|
+
), Ht = (t, e = {}) => (r) => {
|
|
1198
|
+
const s = (e == null ? void 0 : e.firstSeparator) ?? w, n = (e == null ? void 0 : e.lastSeparator) ?? w;
|
|
1199
|
+
return H(
|
|
1200
|
+
r.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
977
1201
|
{
|
|
978
|
-
first: () =>
|
|
979
|
-
last: () =>
|
|
1202
|
+
first: () => s,
|
|
1203
|
+
last: () => n,
|
|
980
1204
|
other: () => t
|
|
981
1205
|
}
|
|
982
1206
|
);
|
|
983
|
-
},
|
|
984
|
-
const
|
|
985
|
-
const
|
|
986
|
-
if (
|
|
987
|
-
throw new Error(`No provider found for mark: ${
|
|
988
|
-
return
|
|
1207
|
+
}, ve = (t, e) => (r) => {
|
|
1208
|
+
const s = Object.values(t).reduce((n, o) => {
|
|
1209
|
+
const i = r.getProvider(o);
|
|
1210
|
+
if (i == null)
|
|
1211
|
+
throw new Error(`No provider found for mark: ${o.description}`);
|
|
1212
|
+
return n[o] = i, n;
|
|
989
1213
|
}, {});
|
|
990
|
-
return c(e(
|
|
991
|
-
},
|
|
992
|
-
const
|
|
993
|
-
(
|
|
994
|
-
a((u) => (Reflect.set(
|
|
995
|
-
),
|
|
1214
|
+
return c(e(s))(r);
|
|
1215
|
+
}, Jt = (t, e) => (r) => {
|
|
1216
|
+
const s = [], n = Object.entries(t).reduce(
|
|
1217
|
+
(o, [i, a]) => (s.push(
|
|
1218
|
+
a((u) => (Reflect.set(o, i, u), null))(r)
|
|
1219
|
+
), o),
|
|
996
1220
|
{}
|
|
997
1221
|
);
|
|
998
|
-
return
|
|
999
|
-
|
|
1222
|
+
return s.push(e(n)(r)), (o) => {
|
|
1223
|
+
s.forEach((i) => i(o));
|
|
1000
1224
|
};
|
|
1001
|
-
},
|
|
1002
|
-
r &&
|
|
1003
|
-
}),
|
|
1004
|
-
|
|
1005
|
-
let
|
|
1006
|
-
const
|
|
1007
|
-
u == null ? (
|
|
1225
|
+
}, Kt = (t, e) => ve([t], (r) => c(e(r[t]))), Xt = (t, e) => ve(t, (r) => c(e(r))), zt = (t) => (e) => t(e), Qt = (t) => (e) => (e.appendOrInsert(t), (r) => {
|
|
1226
|
+
r && g(t);
|
|
1227
|
+
}), ut = (t, e, r) => (s) => {
|
|
1228
|
+
s = s.makeRef();
|
|
1229
|
+
let n = null, o = !1;
|
|
1230
|
+
const i = C(null), a = t.on((u) => {
|
|
1231
|
+
u == null ? (n == null || n(!0), n = c((r == null ? void 0 : r()) ?? w)(s), o = !1) : (i.value = u, o || (n == null || n(!0), n = c(e(i))(s), o = !0));
|
|
1008
1232
|
});
|
|
1009
1233
|
return (u) => {
|
|
1010
|
-
a(),
|
|
1234
|
+
a(), n == null || n(u), u && s.reference && g(s.reference);
|
|
1011
1235
|
};
|
|
1012
|
-
},
|
|
1013
|
-
const
|
|
1236
|
+
}, B = (t) => (e) => (r) => t(r, e), ye = (t, e, r) => r != null ? ye(t, (s) => {
|
|
1237
|
+
const n = s.map((o) => o.isLast ? "last" : "other");
|
|
1014
1238
|
return y(
|
|
1015
|
-
|
|
1016
|
-
c(e(
|
|
1017
|
-
|
|
1018
|
-
last: () =>
|
|
1019
|
-
other: () => r(
|
|
1239
|
+
B(() => n.dispose()),
|
|
1240
|
+
c(e(s)),
|
|
1241
|
+
H(n, {
|
|
1242
|
+
last: () => w,
|
|
1243
|
+
other: () => r(s)
|
|
1020
1244
|
})
|
|
1021
1245
|
);
|
|
1022
|
-
}) : (
|
|
1023
|
-
|
|
1024
|
-
const
|
|
1025
|
-
(u) => Array.from({ length: u }, (f,
|
|
1026
|
-
(f) => new
|
|
1246
|
+
}) : (s) => {
|
|
1247
|
+
s = s.makeRef();
|
|
1248
|
+
const n = t.map(
|
|
1249
|
+
(u) => Array.from({ length: u }, (f, d) => d).map(
|
|
1250
|
+
(f) => new ke(f, u)
|
|
1027
1251
|
)
|
|
1028
|
-
),
|
|
1029
|
-
var
|
|
1252
|
+
), o = [], i = [], a = n.on((u) => {
|
|
1253
|
+
var d, A;
|
|
1030
1254
|
const f = u.length;
|
|
1031
|
-
for (; f <
|
|
1032
|
-
(
|
|
1033
|
-
for (let
|
|
1034
|
-
if (
|
|
1035
|
-
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1255
|
+
for (; f < o.length; )
|
|
1256
|
+
(d = o.pop()) == null || d(!0), (A = i.pop()) == null || A.dispose();
|
|
1257
|
+
for (let m = 0; m < f; m++)
|
|
1258
|
+
if (i[m] == null) {
|
|
1259
|
+
i[m] = C(u[m]);
|
|
1260
|
+
const D = c(e(i[m]));
|
|
1261
|
+
o[m] = D(s);
|
|
1038
1262
|
} else
|
|
1039
|
-
|
|
1263
|
+
i[m].value = u[m];
|
|
1040
1264
|
});
|
|
1041
1265
|
return (u) => {
|
|
1042
|
-
a(), u &&
|
|
1266
|
+
a(), u && s.reference && g(s.reference);
|
|
1043
1267
|
};
|
|
1044
|
-
},
|
|
1045
|
-
const
|
|
1268
|
+
}, at = (t, e, r) => r != null ? at(t, (s, n) => {
|
|
1269
|
+
const o = n.map((i) => i.isLast ? "last" : "other");
|
|
1046
1270
|
return y([
|
|
1047
|
-
|
|
1048
|
-
c(e(
|
|
1049
|
-
|
|
1050
|
-
last: () =>
|
|
1051
|
-
other: () => r(
|
|
1271
|
+
B(() => o.dispose()),
|
|
1272
|
+
c(e(s, n)),
|
|
1273
|
+
H(o, {
|
|
1274
|
+
last: () => w,
|
|
1275
|
+
other: () => r(n)
|
|
1052
1276
|
})
|
|
1053
1277
|
]);
|
|
1054
|
-
}) : (
|
|
1055
|
-
const
|
|
1056
|
-
return
|
|
1057
|
-
const
|
|
1058
|
-
() => t.value[
|
|
1059
|
-
[
|
|
1278
|
+
}) : (s) => {
|
|
1279
|
+
const n = t.map((o) => o.length);
|
|
1280
|
+
return ye(n, (o) => {
|
|
1281
|
+
const i = j(
|
|
1282
|
+
() => t.value[o.value.index],
|
|
1283
|
+
[o, t]
|
|
1060
1284
|
);
|
|
1061
1285
|
return y(
|
|
1062
|
-
|
|
1063
|
-
c(e(
|
|
1286
|
+
B(() => i.dispose()),
|
|
1287
|
+
c(e(i, o))
|
|
1064
1288
|
);
|
|
1065
|
-
})(
|
|
1066
|
-
},
|
|
1289
|
+
})(s);
|
|
1290
|
+
}, Yt = (t, e) => (r) => {
|
|
1067
1291
|
r = r.makeRef();
|
|
1068
|
-
const
|
|
1069
|
-
let
|
|
1292
|
+
const s = t.map((i) => c(e(i)));
|
|
1293
|
+
let n = () => {
|
|
1070
1294
|
};
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1295
|
+
const o = s.on((i) => {
|
|
1296
|
+
n(!0), n = i(r);
|
|
1073
1297
|
});
|
|
1074
|
-
return (
|
|
1075
|
-
|
|
1298
|
+
return (i) => {
|
|
1299
|
+
o(), n(i);
|
|
1076
1300
|
};
|
|
1077
|
-
},
|
|
1078
|
-
t.map((
|
|
1301
|
+
}, we = (t, e, r) => ut(
|
|
1302
|
+
t.map((s) => s ? !0 : null),
|
|
1079
1303
|
() => e,
|
|
1080
1304
|
r != null ? () => r : void 0
|
|
1081
|
-
),
|
|
1082
|
-
t.map((
|
|
1305
|
+
), Zt = (t, e, r) => we(
|
|
1306
|
+
t.map((s) => !s),
|
|
1083
1307
|
e,
|
|
1084
1308
|
r
|
|
1085
|
-
)
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
);
|
|
1092
|
-
}
|
|
1093
|
-
const Qt = (t) => (e) => t(e.element) ?? (() => {
|
|
1094
|
-
});
|
|
1095
|
-
function ke(t, e) {
|
|
1309
|
+
), xt = (t, e, r = w) => we(
|
|
1310
|
+
t.map((s) => s.length > 0),
|
|
1311
|
+
e,
|
|
1312
|
+
r
|
|
1313
|
+
), er = (t) => (e) => t(e.element) ?? (() => {
|
|
1314
|
+
}), Ae = (t, e) => {
|
|
1096
1315
|
const r = t(e);
|
|
1097
1316
|
return () => r(!0);
|
|
1317
|
+
}, tr = (t, e, { doc: r, clear: s } = {}) => {
|
|
1318
|
+
const n = typeof e == "string" ? (r ?? document).querySelector(e) : e;
|
|
1319
|
+
if (n === null)
|
|
1320
|
+
throw new ct(
|
|
1321
|
+
`Cannot find element by selector for render: ${e}`
|
|
1322
|
+
);
|
|
1323
|
+
s !== !1 && (r ?? n.ownerDocument) != null && et(r ?? n.ownerDocument);
|
|
1324
|
+
const o = je(n), i = se(n) ? void 0 : n, a = v.of(o, i);
|
|
1325
|
+
return Ae(t, a);
|
|
1326
|
+
};
|
|
1327
|
+
class ct extends Error {
|
|
1328
|
+
constructor(e) {
|
|
1329
|
+
super(e);
|
|
1330
|
+
}
|
|
1098
1331
|
}
|
|
1099
|
-
|
|
1100
|
-
const s =
|
|
1332
|
+
const rr = (t, e) => (r) => {
|
|
1333
|
+
const s = r.document.querySelector(t);
|
|
1101
1334
|
if (s === null)
|
|
1102
|
-
throw new Error(`Cannot find element by selector for render: ${e}`);
|
|
1103
|
-
n && (r ?? s.ownerDocument) != null && ut(r ?? s.ownerDocument);
|
|
1104
|
-
const i = ze(s), o = he(s) ? void 0 : s, a = v.of(i, o);
|
|
1105
|
-
return ke(t, a);
|
|
1106
|
-
}
|
|
1107
|
-
const Zt = (t, e) => (r) => {
|
|
1108
|
-
const n = r.document.querySelector(t);
|
|
1109
|
-
if (n === null)
|
|
1110
1335
|
throw new Error(`Cannot find element by selector for portal: ${t}`);
|
|
1111
|
-
return
|
|
1336
|
+
return Ae(
|
|
1112
1337
|
c(e),
|
|
1113
|
-
r.withElement(
|
|
1338
|
+
r.withElement(s).withFirstLevel()
|
|
1114
1339
|
);
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
return
|
|
1118
|
-
|
|
1119
|
-
const Ne = (t, e) => (r) => c(e)(r.withProviders(t)), er = (...t) => t.length > 0 ? t.reduceRight((e, r) => (n) => e(r(n))) : c, tr = (t, e, r) => Ne({ [t]: e }, c(r)), rr = (t, e) => Ne(t, c(e)), St = (t, e) => (r) => {
|
|
1120
|
-
const n = r.element, s = n.style.getPropertyValue(t);
|
|
1121
|
-
return n.style.setProperty(t, e), (i) => {
|
|
1122
|
-
i && n.style.setProperty(t, s);
|
|
1340
|
+
}, sr = (t) => Symbol(t), Se = (t, e) => (r) => c(e)(r.withProviders(t)), nr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, or = (t, e, r) => Se({ [t]: e }, c(r)), ir = (t, e) => Se(t, c(e)), ft = (t, e) => (r) => {
|
|
1341
|
+
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1342
|
+
return s.style.setProperty(t, e), (o) => {
|
|
1343
|
+
o && s.style.setProperty(t, n);
|
|
1123
1344
|
};
|
|
1124
|
-
},
|
|
1125
|
-
const
|
|
1126
|
-
return e.on((
|
|
1127
|
-
|
|
1345
|
+
}, ht = (t, e) => (r) => {
|
|
1346
|
+
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1347
|
+
return e.on((o) => s.style.setProperty(t, o)), (o) => {
|
|
1348
|
+
o && s.style.setProperty(t, n);
|
|
1128
1349
|
};
|
|
1129
|
-
},
|
|
1350
|
+
}, lr = new Proxy(
|
|
1130
1351
|
{},
|
|
1131
1352
|
{
|
|
1132
|
-
|
|
1353
|
+
/**
|
|
1354
|
+
* Creates a renderable component for the specified `style` property.
|
|
1355
|
+
*
|
|
1356
|
+
* @param _ - The target object.
|
|
1357
|
+
* @param name - The name of the CSS style property.
|
|
1358
|
+
* @returns The renderable component for the specified attribute.
|
|
1359
|
+
*
|
|
1360
|
+
*/
|
|
1361
|
+
get: (t, e) => (r) => h.is(r) ? ht(e, r) : ft(e, r)
|
|
1133
1362
|
}
|
|
1134
1363
|
);
|
|
1135
1364
|
export {
|
|
1136
|
-
|
|
1365
|
+
kt as Async,
|
|
1366
|
+
jt as BindChecked,
|
|
1367
|
+
$t as BindDate,
|
|
1368
|
+
qt as BindDateTime,
|
|
1369
|
+
It as BindNumber,
|
|
1370
|
+
Bt as BindText,
|
|
1137
1371
|
E as Computed,
|
|
1138
|
-
|
|
1372
|
+
Ht as Conjunction,
|
|
1139
1373
|
v as DOMContext,
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1374
|
+
Qt as DOMNode,
|
|
1375
|
+
ie as El,
|
|
1376
|
+
le as ElNS,
|
|
1377
|
+
ke as ElementPosition,
|
|
1378
|
+
w as Empty,
|
|
1379
|
+
ut as Ensure,
|
|
1380
|
+
at as ForEach,
|
|
1146
1381
|
y as Fragment,
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1382
|
+
Yt as MapSignal,
|
|
1383
|
+
z as MemoryStore,
|
|
1384
|
+
xt as NotEmpty,
|
|
1385
|
+
st as OnChecked,
|
|
1386
|
+
zt as OnCtx,
|
|
1387
|
+
er as OnMount,
|
|
1388
|
+
B as OnUnmount,
|
|
1389
|
+
G as OneOf,
|
|
1390
|
+
_e as OneOfField,
|
|
1391
|
+
Ut as OneOfKind,
|
|
1392
|
+
Wt as OneOfTuple,
|
|
1393
|
+
Gt as OneOfType,
|
|
1394
|
+
H as OneOfValue,
|
|
1395
|
+
rr as Portal,
|
|
1156
1396
|
F as Prop,
|
|
1157
|
-
|
|
1158
|
-
|
|
1397
|
+
nr as Provide,
|
|
1398
|
+
Be as ProviderNotFoundError,
|
|
1399
|
+
ct as RenderingError,
|
|
1400
|
+
ye as Repeat,
|
|
1159
1401
|
h as Signal,
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
Ve as
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
Mt as
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1402
|
+
me as Task,
|
|
1403
|
+
At as TextNode,
|
|
1404
|
+
Zt as Unless,
|
|
1405
|
+
Jt as Use,
|
|
1406
|
+
Kt as UseProvider,
|
|
1407
|
+
Xt as UseProviders,
|
|
1408
|
+
we as When,
|
|
1409
|
+
or as WithProvider,
|
|
1410
|
+
ir as WithProviders,
|
|
1411
|
+
fe as _addNodeTracker,
|
|
1412
|
+
et as _clearSSR,
|
|
1413
|
+
je as _getSelfOrParentElement,
|
|
1414
|
+
se as _isElement,
|
|
1415
|
+
re as _makeGetter,
|
|
1416
|
+
te as _makeSetter,
|
|
1417
|
+
ae as _maybeAddAttributeTracker,
|
|
1418
|
+
ce as _maybeAddClassTracker,
|
|
1419
|
+
he as _maybeAddTextTracker,
|
|
1420
|
+
g as _removeDOMNode,
|
|
1421
|
+
Ie as _setAttribute,
|
|
1422
|
+
Fe as _setBooleanProperty,
|
|
1423
|
+
$e as _setDateProperty,
|
|
1424
|
+
Ve as _setNumberProperty,
|
|
1425
|
+
qe as _setStringProperty,
|
|
1426
|
+
oe as _signalText,
|
|
1427
|
+
ne as _staticText,
|
|
1428
|
+
vt as animateSignal,
|
|
1429
|
+
Me as animateSignals,
|
|
1430
|
+
Et as aria,
|
|
1431
|
+
P as attr,
|
|
1432
|
+
St as dataAttr,
|
|
1433
|
+
Rt as emitChecked,
|
|
1434
|
+
Mt as emitPreventDefault,
|
|
1435
|
+
Vt as emitStopImmediatePropagation,
|
|
1436
|
+
Ft as emitStopPropagation,
|
|
1437
|
+
nt as emitValue,
|
|
1438
|
+
it as emitValueAsDate,
|
|
1439
|
+
lt as emitValueAsDateTime,
|
|
1440
|
+
ot as emitValueAsNumber,
|
|
1441
|
+
Ne as endInterpolate,
|
|
1442
|
+
Oe as guessInterpolate,
|
|
1443
|
+
wt as handleAnchorClick,
|
|
1444
|
+
bt as html,
|
|
1445
|
+
Tt as input,
|
|
1446
|
+
Le as interpolateDate,
|
|
1447
|
+
Te as interpolateNumber,
|
|
1448
|
+
Ce as interpolateString,
|
|
1449
|
+
O as isSSR,
|
|
1450
|
+
gt as localStorageProp,
|
|
1451
|
+
j as makeComputed,
|
|
1452
|
+
yt as makeComputedRecord,
|
|
1453
|
+
pt as makeEffect,
|
|
1454
|
+
C as makeProp,
|
|
1455
|
+
sr as makeProviderMark,
|
|
1456
|
+
mt as makeSignal,
|
|
1457
|
+
Lt as math,
|
|
1458
|
+
Dt as mathAttr,
|
|
1459
|
+
$ as on,
|
|
1460
|
+
Nt as prepareSSR,
|
|
1461
|
+
xe as removeTextTrackers,
|
|
1462
|
+
tr as render,
|
|
1463
|
+
Ae as renderWithContext,
|
|
1206
1464
|
c as renderableOfTNode,
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
pe as signalText,
|
|
1214
|
-
R as ssr,
|
|
1215
|
-
qt as startSSR,
|
|
1216
|
-
de as staticText,
|
|
1217
|
-
ie as storedProp,
|
|
1218
|
-
$e as stringInterpolate,
|
|
1219
|
-
nr as style,
|
|
1220
|
-
$t as svg,
|
|
1221
|
-
Rt as svgAttr,
|
|
1222
|
-
H as useComputed,
|
|
1223
|
-
At as useEffect,
|
|
1224
|
-
L as useProp,
|
|
1225
|
-
Et as useSignal
|
|
1465
|
+
_t as sessionStorageProp,
|
|
1466
|
+
Q as storedProp,
|
|
1467
|
+
lr as style,
|
|
1468
|
+
Ct as svg,
|
|
1469
|
+
Pt as svgAttr,
|
|
1470
|
+
Ot as useSSRDone
|
|
1226
1471
|
};
|