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