@tempots/dom 23.0.2 → 24.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dom/attr.d.ts +2 -57
- package/dom/browser-context.d.ts +198 -0
- package/dom/dom-context.d.ts +76 -106
- package/dom/dom-utils.d.ts +2 -2
- package/dom/errors.d.ts +9 -0
- package/dom/headless-context.d.ts +103 -0
- package/dom/window.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.d.ts +11 -5
- package/index.js +976 -785
- package/package.json +1 -1
- package/renderable/domnode.d.ts +2 -1
- package/renderable/element.d.ts +4 -4
- package/renderable/on-browser-ctx.d.ts +10 -0
- package/renderable/{onunmount.d.ts → on-dispose.d.ts} +1 -1
- package/renderable/{onmount.d.ts → on-element.d.ts} +1 -1
- package/renderable/on-headless-ctx.d.ts +10 -0
- package/renderable/probe.d.ts +46 -0
- package/renderable/render.d.ts +10 -0
- package/types/domain.d.ts +1 -1
- package/dom/ssr.d.ts +0 -50
- /package/renderable/{onctx.d.ts → on-ctx.d.ts} +0 -0
package/index.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Q = (s) => {
|
|
3
|
+
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
5
|
+
var Ee = (s, e, t) => e in s ? Pe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var i = (s, e, t) => Ee(s, typeof e != "symbol" ? e + "" : e, t), X = (s, e, t) => e.has(s) || Q("Cannot " + t);
|
|
7
|
+
var A = (s, e, t) => (X(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Y = (s, e, t) => e.has(s) ? Q("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), B = (s, e, t, r) => (X(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
|
|
8
|
+
const De = (s, e, t) => s + (e - s) * t;
|
|
9
|
+
const Oe = (s, e, t) => {
|
|
10
|
+
const r = Math.max(s.length, e.length);
|
|
11
11
|
let n = "";
|
|
12
|
-
for (let o = 0; o <
|
|
13
|
-
let
|
|
14
|
-
isNaN(
|
|
15
|
-
let
|
|
16
|
-
isNaN(
|
|
12
|
+
for (let o = 0; o < r; o++) {
|
|
13
|
+
let l = s.charCodeAt(o);
|
|
14
|
+
isNaN(l) && (l = 97);
|
|
15
|
+
let c = e.charCodeAt(o);
|
|
16
|
+
isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * t);
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
|
-
},
|
|
20
|
-
var
|
|
21
|
-
class
|
|
19
|
+
}, Ae = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), Me = (s, e) => e, be = (s) => typeof s == "number" ? De : typeof s == "string" ? Oe : s instanceof Date ? Ae : Me;
|
|
20
|
+
var w;
|
|
21
|
+
class M {
|
|
22
22
|
/**
|
|
23
23
|
* Creates a new instance of `ElementPosition`.
|
|
24
24
|
* @param index - The index of the element.
|
|
25
25
|
* @param total - The total number of elements in the collection.
|
|
26
26
|
*/
|
|
27
|
-
constructor(e,
|
|
27
|
+
constructor(e, t) {
|
|
28
28
|
/**
|
|
29
29
|
* The counter of the element starting from 1.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
i(this, "counter");
|
|
32
32
|
/**
|
|
33
33
|
* Checks if the element is the first element in the collection.
|
|
34
34
|
* @returns `true` if the element is the first element, `false` otherwise.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
i(this, "isFirst");
|
|
37
37
|
/**
|
|
38
38
|
* Checks if the counter of the element is even.
|
|
39
39
|
* @returns `true` if the counter is even, `false` otherwise.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
i(this, "isEven");
|
|
42
42
|
/**
|
|
43
43
|
* Checks if the counter of the element is odd.
|
|
44
44
|
* @returns `true` if the counter is odd, `false` otherwise.
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
i(this, "isOdd");
|
|
47
|
+
Y(this, w);
|
|
48
|
+
i(this, "dispose", () => {
|
|
49
|
+
A(this, w) != null && (A(this, w).dispose(), B(this, w, void 0));
|
|
50
50
|
});
|
|
51
|
-
this.index = e, this.total =
|
|
51
|
+
this.index = e, this.total = t, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Checks if the element is the last element in the collection.
|
|
55
55
|
* @returns `true` if the element is the last element, `false` otherwise.
|
|
56
56
|
*/
|
|
57
57
|
get isLast() {
|
|
58
|
-
return
|
|
58
|
+
return A(this, w) == null && B(this, w, this.total.map((e) => this.counter === e)), A(this, w);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
const
|
|
61
|
+
w = new WeakMap();
|
|
62
|
+
const b = class b {
|
|
63
63
|
/**
|
|
64
64
|
* Represents a signal with a value of type T.
|
|
65
65
|
*
|
|
@@ -67,37 +67,37 @@ const C = class C {
|
|
|
67
67
|
* @param equals - A function that determines whether two values of type T are equal.
|
|
68
68
|
* @public
|
|
69
69
|
*/
|
|
70
|
-
constructor(e,
|
|
70
|
+
constructor(e, t) {
|
|
71
71
|
/**
|
|
72
72
|
* @internal
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
i(this, "$__signal__", !0);
|
|
75
75
|
/**
|
|
76
76
|
* @internal
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
i(this, "_value");
|
|
79
79
|
/**
|
|
80
80
|
* @internal
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
i(this, "_derivatives", []);
|
|
83
83
|
/**
|
|
84
84
|
* @internal
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
i(this, "_onValueListeners", []);
|
|
87
87
|
/**
|
|
88
88
|
* @internal
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
i(this, "_onDisposeListeners", []);
|
|
91
91
|
/**
|
|
92
92
|
* Gets the current value of the signal.
|
|
93
93
|
* @returns The current value of the signal.
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
i(this, "get", () => this._value);
|
|
96
96
|
/**
|
|
97
97
|
* Checks if the signal has any registered listeners.
|
|
98
98
|
* @returns `true` if the signal has listeners, `false` otherwise.
|
|
99
99
|
*/
|
|
100
|
-
|
|
100
|
+
i(this, "hasListeners", () => this._onValueListeners.length > 0);
|
|
101
101
|
/**
|
|
102
102
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
103
103
|
* The listener function will be immediately called with the current value of the signal.
|
|
@@ -105,37 +105,37 @@ const C = class C {
|
|
|
105
105
|
*
|
|
106
106
|
* @param listener - The listener function to be called when the value of the signal changes.
|
|
107
107
|
*/
|
|
108
|
-
|
|
108
|
+
i(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
|
|
109
109
|
this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
|
|
110
110
|
}));
|
|
111
111
|
/**
|
|
112
112
|
* @internal
|
|
113
113
|
*/
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
114
|
+
i(this, "_setAndNotify", (e, t) => {
|
|
115
|
+
const r = this.equals(this._value, e);
|
|
116
|
+
r || (this._value = e), (t || !r) && this._onValueListeners.forEach((n) => n(e));
|
|
117
117
|
});
|
|
118
118
|
/**
|
|
119
119
|
* @internal
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
i(this, "_disposed", !1);
|
|
122
122
|
/**
|
|
123
123
|
* Checks whether the signal is disposed.
|
|
124
124
|
* @returns True if the signal is disposed, false otherwise.
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
i(this, "isDisposed", () => this._disposed);
|
|
127
127
|
/**
|
|
128
128
|
* Adds a listener function to be called when the object is disposed.
|
|
129
129
|
* @param listener - The listener function to be called when the object is disposed.
|
|
130
130
|
* @returns A function that can be called to remove the listener.
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
i(this, "onDispose", (e) => {
|
|
133
133
|
this._onDisposeListeners.push(e);
|
|
134
134
|
});
|
|
135
135
|
/**
|
|
136
136
|
* Disposes the signal, releasing any resources associated with it.
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
i(this, "dispose", () => {
|
|
139
139
|
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
140
140
|
});
|
|
141
141
|
/**
|
|
@@ -147,15 +147,15 @@ const C = class C {
|
|
|
147
147
|
* @param equals - Optional equality function to determine if two mapped values are equal.
|
|
148
148
|
* @returns - A new Computed instance with the mapped value.
|
|
149
149
|
*/
|
|
150
|
-
|
|
151
|
-
const
|
|
150
|
+
i(this, "map", (e, t = (r, n) => r === n) => {
|
|
151
|
+
const r = new T(() => {
|
|
152
152
|
try {
|
|
153
153
|
return e(this.get());
|
|
154
154
|
} catch (n) {
|
|
155
155
|
throw console.error("Error in Signal.map:", n), n;
|
|
156
156
|
}
|
|
157
|
-
},
|
|
158
|
-
return this.setDerivative(
|
|
157
|
+
}, t);
|
|
158
|
+
return this.setDerivative(r), r;
|
|
159
159
|
});
|
|
160
160
|
/**
|
|
161
161
|
* Returns a new Signal that applies the given function to the value of the current Signal,
|
|
@@ -167,15 +167,15 @@ const C = class C {
|
|
|
167
167
|
* Defaults to a strict equality check (===).
|
|
168
168
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
169
169
|
*/
|
|
170
|
-
|
|
171
|
-
const
|
|
170
|
+
i(this, "flatMap", (e, t = (r, n) => r === n) => {
|
|
171
|
+
const r = new T(() => {
|
|
172
172
|
try {
|
|
173
173
|
return e(this.get()).get();
|
|
174
174
|
} catch (n) {
|
|
175
175
|
throw console.error("Error in Signal.flatMap:", n), n;
|
|
176
176
|
}
|
|
177
|
-
},
|
|
178
|
-
return this.setDerivative(
|
|
177
|
+
}, t);
|
|
178
|
+
return this.setDerivative(r), r;
|
|
179
179
|
});
|
|
180
180
|
/**
|
|
181
181
|
* Invokes a callback function with the current value of the signal, without modifying the signal.
|
|
@@ -183,24 +183,24 @@ const C = class C {
|
|
|
183
183
|
* @param fn - The callback function to be invoked with the current value of the signal.
|
|
184
184
|
* @returns A new signal that emits the same value as the original signal and invokes the callback function.
|
|
185
185
|
*/
|
|
186
|
-
|
|
186
|
+
i(this, "tap", (e) => this.map((t) => (e(t), t)));
|
|
187
187
|
/**
|
|
188
188
|
* Returns a new Signal that emits the value at the specified key of the current value.
|
|
189
189
|
*
|
|
190
190
|
* @param key - The key of the value to retrieve.
|
|
191
191
|
* @returns A new Signal that emits the value at the specified key.
|
|
192
192
|
*/
|
|
193
|
-
|
|
193
|
+
i(this, "at", (e) => this.map((t) => t[e]));
|
|
194
194
|
/**
|
|
195
195
|
* @internal
|
|
196
196
|
*/
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
let
|
|
200
|
-
const n = new
|
|
197
|
+
i(this, "_$");
|
|
198
|
+
i(this, "filter", (e, t) => {
|
|
199
|
+
let r = t ?? this.get();
|
|
200
|
+
const n = new T(() => {
|
|
201
201
|
try {
|
|
202
202
|
const o = this.get();
|
|
203
|
-
return
|
|
203
|
+
return r = e(o) ? o : r;
|
|
204
204
|
} catch (o) {
|
|
205
205
|
throw console.error("Error in Signal.filter:", o), o;
|
|
206
206
|
}
|
|
@@ -217,16 +217,16 @@ const C = class C {
|
|
|
217
217
|
* @param equals - Optional equality function to determine if two values are equal.
|
|
218
218
|
* @returns - A new Computed object with the mapped and filtered values.
|
|
219
219
|
*/
|
|
220
|
-
|
|
221
|
-
let n =
|
|
222
|
-
const o = new
|
|
220
|
+
i(this, "filterMap", (e, t, r = (n, o) => n === o) => {
|
|
221
|
+
let n = t;
|
|
222
|
+
const o = new T(() => {
|
|
223
223
|
try {
|
|
224
|
-
const
|
|
225
|
-
return n =
|
|
226
|
-
} catch (
|
|
227
|
-
throw console.error("Error in Signal.filterMap:",
|
|
224
|
+
const l = this.get(), c = e(l);
|
|
225
|
+
return n = c ?? n;
|
|
226
|
+
} catch (l) {
|
|
227
|
+
throw console.error("Error in Signal.filterMap:", l), l;
|
|
228
228
|
}
|
|
229
|
-
},
|
|
229
|
+
}, r);
|
|
230
230
|
return this.setDerivative(o), o;
|
|
231
231
|
});
|
|
232
232
|
/**
|
|
@@ -242,22 +242,22 @@ const C = class C {
|
|
|
242
242
|
* @param equals - The equality function to compare the mapped values for equality.
|
|
243
243
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
244
244
|
*/
|
|
245
|
-
|
|
246
|
-
const o =
|
|
247
|
-
let
|
|
245
|
+
i(this, "mapAsync", (e, t, r, n = (o, l) => o === l) => {
|
|
246
|
+
const o = H(t, n);
|
|
247
|
+
let l = 0, c = new AbortController();
|
|
248
248
|
return o.onDispose(
|
|
249
249
|
this.on(async (a) => {
|
|
250
|
-
const f = ++
|
|
251
|
-
|
|
250
|
+
const f = ++l;
|
|
251
|
+
c.abort(), c = new AbortController();
|
|
252
252
|
try {
|
|
253
|
-
const
|
|
254
|
-
f ===
|
|
255
|
-
} catch (
|
|
256
|
-
if (f ===
|
|
257
|
-
if (
|
|
258
|
-
o.set(
|
|
253
|
+
const h = await e(a, { abortSignal: c.signal });
|
|
254
|
+
f === l && o.set(h);
|
|
255
|
+
} catch (h) {
|
|
256
|
+
if (f === l)
|
|
257
|
+
if (r != null)
|
|
258
|
+
o.set(r(h));
|
|
259
259
|
else
|
|
260
|
-
throw
|
|
260
|
+
throw h;
|
|
261
261
|
}
|
|
262
262
|
})
|
|
263
263
|
), o;
|
|
@@ -272,28 +272,28 @@ const C = class C {
|
|
|
272
272
|
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
273
273
|
* @returns A new signal containing the mapped values.
|
|
274
274
|
*/
|
|
275
|
-
|
|
275
|
+
i(this, "mapMaybe", (e, t) => this.map((r) => e(r) ?? t));
|
|
276
276
|
/**
|
|
277
277
|
* Feeds a property into the signal and sets up disposal behavior.
|
|
278
278
|
* @param prop - The property to feed into the signal.
|
|
279
279
|
* @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
|
|
280
280
|
* @returns The input property.
|
|
281
281
|
*/
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
return e.onDispose(
|
|
282
|
+
i(this, "feedProp", (e, t = !1) => {
|
|
283
|
+
const r = this.on(e.set);
|
|
284
|
+
return e.onDispose(r), t ? this.onDispose(e.dispose) : this.onDispose(r), e;
|
|
285
285
|
});
|
|
286
286
|
/**
|
|
287
287
|
* Derives a new property from the current signal.
|
|
288
288
|
* @param autoDisposeProp - Determines whether the derived property should be automatically disposed.
|
|
289
289
|
* @returns The derived property.
|
|
290
290
|
*/
|
|
291
|
-
|
|
291
|
+
i(this, "deriveProp", (e = !0) => this.feedProp(H(this.get()), e));
|
|
292
292
|
/**
|
|
293
293
|
* Returns a signal that emits the count of values received so far.
|
|
294
294
|
* @returns A signal that emits the count of values received so far.
|
|
295
295
|
*/
|
|
296
|
-
|
|
296
|
+
i(this, "count", () => {
|
|
297
297
|
let e = 0;
|
|
298
298
|
return this.map(() => ++e);
|
|
299
299
|
});
|
|
@@ -303,7 +303,7 @@ const C = class C {
|
|
|
303
303
|
* Additionally, when the computed value is disposed, it sets the signal as dirty.
|
|
304
304
|
* @param computed - The computed value to add as a derivative.
|
|
305
305
|
*/
|
|
306
|
-
|
|
306
|
+
i(this, "setDerivative", (e) => {
|
|
307
307
|
this._derivatives.push(e), e.onDispose(() => {
|
|
308
308
|
this._derivatives.splice(
|
|
309
309
|
this._derivatives.indexOf(e),
|
|
@@ -311,7 +311,7 @@ const C = class C {
|
|
|
311
311
|
);
|
|
312
312
|
}), e.onDispose(this.on(e.setDirty)), this.onDispose(e.dispose);
|
|
313
313
|
});
|
|
314
|
-
this.equals =
|
|
314
|
+
this.equals = t, this._value = e;
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* Gets the value of the signal.
|
|
@@ -326,7 +326,7 @@ const C = class C {
|
|
|
326
326
|
*/
|
|
327
327
|
get $() {
|
|
328
328
|
return this._$ !== void 0 ? this._$ : this._$ = new Proxy(this, {
|
|
329
|
-
get: (e,
|
|
329
|
+
get: (e, t) => this.at(t)
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
};
|
|
@@ -340,12 +340,12 @@ const C = class C {
|
|
|
340
340
|
* @param equals - A function to compare two values of type O for equality. Defaults to strict equality (===).
|
|
341
341
|
* @returns - A Signal that represents the result of the Promise.
|
|
342
342
|
*/
|
|
343
|
-
|
|
344
|
-
const o = new
|
|
345
|
-
return e.then((
|
|
346
|
-
|
|
343
|
+
i(b, "ofPromise", (e, t, r, n = (o, l) => o === l) => {
|
|
344
|
+
const o = new b(t, n);
|
|
345
|
+
return e.then((l) => o._setAndNotify(l, !1)).catch((l) => {
|
|
346
|
+
r != null ? o._setAndNotify(r(l), !1) : console.error(
|
|
347
347
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
348
|
-
|
|
348
|
+
l
|
|
349
349
|
);
|
|
350
350
|
}), o;
|
|
351
351
|
}), /**
|
|
@@ -354,54 +354,54 @@ u(C, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
|
|
|
354
354
|
* @param value - The value to check.
|
|
355
355
|
* @returns `true` if the value is a Signal, `false` otherwise.
|
|
356
356
|
*/
|
|
357
|
-
|
|
357
|
+
i(b, "is", (e) => (
|
|
358
358
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
359
359
|
e != null && e.$__signal__ === !0
|
|
360
360
|
));
|
|
361
|
-
let
|
|
362
|
-
const
|
|
363
|
-
class
|
|
361
|
+
let d = b;
|
|
362
|
+
const ke = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
|
|
363
|
+
class T extends d {
|
|
364
364
|
/**
|
|
365
365
|
* Represents a Signal object.
|
|
366
366
|
* @param _fn - The function that returns the value of the signal.
|
|
367
367
|
* @param equals - The function used to compare two values of type T for equality.
|
|
368
368
|
*/
|
|
369
|
-
constructor(
|
|
370
|
-
super(void 0,
|
|
369
|
+
constructor(t, r) {
|
|
370
|
+
super(void 0, r);
|
|
371
371
|
/**
|
|
372
372
|
* @internal
|
|
373
373
|
*/
|
|
374
|
-
|
|
374
|
+
i(this, "$__computed__", !0);
|
|
375
375
|
/**
|
|
376
376
|
* @internal
|
|
377
377
|
*/
|
|
378
|
-
|
|
378
|
+
i(this, "_isDirty", !1);
|
|
379
379
|
/**
|
|
380
380
|
* Marks the signal as dirty, indicating that its value has changed and needs to be recalculated.
|
|
381
381
|
* If the signal is already dirty or disposed, this method does nothing.
|
|
382
382
|
* It also marks all dependent signals as dirty and schedules a notification to update their values.
|
|
383
383
|
*/
|
|
384
|
-
|
|
385
|
-
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((
|
|
384
|
+
i(this, "setDirty", () => {
|
|
385
|
+
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((t) => t.setDirty()), this._scheduleNotify());
|
|
386
386
|
});
|
|
387
387
|
/**
|
|
388
388
|
* @internal
|
|
389
389
|
*/
|
|
390
|
-
|
|
390
|
+
i(this, "_scheduleCount", 0);
|
|
391
391
|
/**
|
|
392
392
|
* Schedules a notification to be executed asynchronously.
|
|
393
393
|
* If the signal is dirty, it will be updated and notified.
|
|
394
394
|
* @internal
|
|
395
395
|
*/
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
this._scheduleCount !==
|
|
396
|
+
i(this, "_scheduleNotify", () => {
|
|
397
|
+
const t = ++this._scheduleCount;
|
|
398
|
+
ke(() => {
|
|
399
|
+
this._scheduleCount !== t || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
400
400
|
});
|
|
401
401
|
});
|
|
402
402
|
/** {@inheritDoc Signal.get} */
|
|
403
|
-
|
|
404
|
-
this._fn =
|
|
403
|
+
i(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
|
|
404
|
+
this._fn = t, this.setDirty();
|
|
405
405
|
}
|
|
406
406
|
/**
|
|
407
407
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -409,35 +409,35 @@ class E extends h {
|
|
|
409
409
|
* @param value - The value to check.
|
|
410
410
|
* @returns `true` if the value is an instance of `Computed`, `false` otherwise.
|
|
411
411
|
*/
|
|
412
|
-
static is(
|
|
413
|
-
return
|
|
412
|
+
static is(t) {
|
|
413
|
+
return t != null && t.$__computed__ === !0;
|
|
414
414
|
}
|
|
415
415
|
/** {@inheritDoc Signal.value} */
|
|
416
416
|
get value() {
|
|
417
417
|
return this.get();
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const I = class I extends d {
|
|
421
421
|
constructor() {
|
|
422
422
|
super(...arguments);
|
|
423
423
|
/**
|
|
424
424
|
* @internal
|
|
425
425
|
*/
|
|
426
|
-
|
|
426
|
+
i(this, "$__prop__", !0);
|
|
427
427
|
/**
|
|
428
428
|
* Changes the value of the property and notifies its listeners.
|
|
429
429
|
*
|
|
430
430
|
* @param value - The new value of the property.
|
|
431
431
|
*/
|
|
432
|
-
|
|
433
|
-
this._setAndNotify(
|
|
432
|
+
i(this, "set", (t) => {
|
|
433
|
+
this._setAndNotify(t, !1);
|
|
434
434
|
});
|
|
435
435
|
/**
|
|
436
436
|
* Updates the value of the signal by applying the provided function to the current value.
|
|
437
437
|
* @param fn - The function to apply to the current value.
|
|
438
438
|
*/
|
|
439
|
-
|
|
440
|
-
this._setAndNotify(
|
|
439
|
+
i(this, "update", (t) => {
|
|
440
|
+
this._setAndNotify(t(this.get()), !1);
|
|
441
441
|
});
|
|
442
442
|
/**
|
|
443
443
|
* Creates a reducer function that combines the provided reducer function and effects.
|
|
@@ -445,15 +445,15 @@ const q = class q extends h {
|
|
|
445
445
|
* @param effects - An array of effects to be executed after the state is updated.
|
|
446
446
|
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
447
447
|
*/
|
|
448
|
-
|
|
448
|
+
i(this, "reducer", (t, ...r) => {
|
|
449
449
|
const n = this;
|
|
450
|
-
return function o(
|
|
451
|
-
const
|
|
452
|
-
n.update((a) =>
|
|
450
|
+
return function o(l) {
|
|
451
|
+
const c = n.value;
|
|
452
|
+
n.update((a) => t(a, l)), !n.equals(c, n.value) && r.forEach(
|
|
453
453
|
(a) => a({
|
|
454
|
-
previousState:
|
|
454
|
+
previousState: c,
|
|
455
455
|
state: n.value,
|
|
456
|
-
action:
|
|
456
|
+
action: l,
|
|
457
457
|
dispatch: o
|
|
458
458
|
})
|
|
459
459
|
);
|
|
@@ -470,9 +470,9 @@ const q = class q extends h {
|
|
|
470
470
|
* Defaults to a strict equality check (===).
|
|
471
471
|
* @returns A Prop object representing the isomorphism.
|
|
472
472
|
*/
|
|
473
|
-
|
|
474
|
-
const o = new
|
|
475
|
-
return o.onDispose(this.on((
|
|
473
|
+
i(this, "iso", (t, r, n = (o, l) => o === l) => {
|
|
474
|
+
const o = new I(t(this.get()), n);
|
|
475
|
+
return o.onDispose(this.on((l) => o.set(t(l)))), o.on((l) => this._setAndNotify(r(l), !1)), o;
|
|
476
476
|
});
|
|
477
477
|
/**
|
|
478
478
|
* Returns a `Prop` that represents the value at the specified key of the current value.
|
|
@@ -480,9 +480,9 @@ const q = class q extends h {
|
|
|
480
480
|
* @param key - The key of the value to access.
|
|
481
481
|
* @returns A `Prop` that represents the value at the specified key.
|
|
482
482
|
*/
|
|
483
|
-
|
|
484
|
-
(
|
|
485
|
-
(
|
|
483
|
+
i(this, "atProp", (t) => this.iso(
|
|
484
|
+
(r) => r[t],
|
|
485
|
+
(r) => ({ ...this.value, [t]: r })
|
|
486
486
|
));
|
|
487
487
|
}
|
|
488
488
|
/**
|
|
@@ -491,8 +491,8 @@ const q = class q extends h {
|
|
|
491
491
|
get value() {
|
|
492
492
|
return this.get();
|
|
493
493
|
}
|
|
494
|
-
set value(
|
|
495
|
-
this._setAndNotify(
|
|
494
|
+
set value(t) {
|
|
495
|
+
this._setAndNotify(t, !1);
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
/**
|
|
@@ -500,15 +500,15 @@ const q = class q extends h {
|
|
|
500
500
|
* @param value - The value to check.
|
|
501
501
|
* @returns `true` if the value is a Prop, `false` otherwise.
|
|
502
502
|
*/
|
|
503
|
-
|
|
503
|
+
i(I, "is", (t) => (
|
|
504
504
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
505
|
-
|
|
505
|
+
t != null && t.$__prop__ === !0
|
|
506
506
|
));
|
|
507
|
-
let
|
|
508
|
-
const
|
|
509
|
-
const
|
|
510
|
-
return e.forEach((n) => n.setDerivative(
|
|
511
|
-
},
|
|
507
|
+
let N = I;
|
|
508
|
+
const W = (s, e, t = (r, n) => r === n) => {
|
|
509
|
+
const r = new T(s, t);
|
|
510
|
+
return e.forEach((n) => n.setDerivative(r)), r;
|
|
511
|
+
}, Le = (s, e) => W(s, e).dispose, H = (s, e = (t, r) => t === r) => new N(s, e), V = (s, e = (t, r) => t === r) => new d(s, e), K = () => typeof window < "u" ? window : void 0, p = {
|
|
512
512
|
/**
|
|
513
513
|
* Maps a value or a Signal to a new value.
|
|
514
514
|
* If the value is a Signal, it returns a new Signal with the mapped value.
|
|
@@ -520,7 +520,7 @@ const X = (t, e, r = (s, n) => s === n) => {
|
|
|
520
520
|
* @param fn - The function to map the value.
|
|
521
521
|
* @returns The mapped value.
|
|
522
522
|
*/
|
|
523
|
-
map: (
|
|
523
|
+
map: (s, e) => d.is(s) ? s.map(e) : e(s),
|
|
524
524
|
/**
|
|
525
525
|
* Wraps a value or a Signal instance into a Signal.
|
|
526
526
|
* If the value is already a Signal, it returns the value itself.
|
|
@@ -531,30 +531,30 @@ const X = (t, e, r = (s, n) => s === n) => {
|
|
|
531
531
|
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
532
532
|
* @returns A Signal instance.
|
|
533
533
|
*/
|
|
534
|
-
toSignal: (
|
|
534
|
+
toSignal: (s, e) => d.is(s) ? s : V(s, e),
|
|
535
535
|
/**
|
|
536
536
|
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
537
537
|
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
538
538
|
* @param value - The value to wrap or check.
|
|
539
539
|
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
540
540
|
*/
|
|
541
|
-
maybeToSignal: (
|
|
542
|
-
if (
|
|
543
|
-
return
|
|
541
|
+
maybeToSignal: (s, e) => {
|
|
542
|
+
if (s != null)
|
|
543
|
+
return p.toSignal(s, e);
|
|
544
544
|
},
|
|
545
545
|
/**
|
|
546
546
|
* Gets the value from a `Signal` or the value itself if it is not a `Signal`.
|
|
547
547
|
* @param value - The value or Signal instance to get the value from.
|
|
548
548
|
* @returns The value.
|
|
549
549
|
*/
|
|
550
|
-
get: (
|
|
550
|
+
get: (s) => d.is(s) ? s.get() : s,
|
|
551
551
|
/**
|
|
552
552
|
* Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
|
|
553
553
|
* @param value - The value or Signal instance to add the listener to.
|
|
554
554
|
* @param listener - The listener to call when the value changes.
|
|
555
555
|
* @returns A function to remove the listener.
|
|
556
556
|
*/
|
|
557
|
-
on: (
|
|
557
|
+
on: (s, e) => d.is(s) ? s.on(e) : (e(s), () => {
|
|
558
558
|
}),
|
|
559
559
|
/**
|
|
560
560
|
* Disposes of a value or a Signal.
|
|
@@ -562,103 +562,109 @@ const X = (t, e, r = (s, n) => s === n) => {
|
|
|
562
562
|
* If the value is not a Signal, it does nothing.
|
|
563
563
|
* @param value - The value or Signal instance to dispose of.
|
|
564
564
|
*/
|
|
565
|
-
dispose: (
|
|
566
|
-
|
|
565
|
+
dispose: (s) => {
|
|
566
|
+
d.is(s) && s.dispose();
|
|
567
567
|
}
|
|
568
|
-
},
|
|
569
|
-
const
|
|
570
|
-
return
|
|
571
|
-
() => e(...
|
|
572
|
-
|
|
573
|
-
|
|
568
|
+
}, at = (...s) => (e, t) => {
|
|
569
|
+
const r = s.filter((n) => d.is(n));
|
|
570
|
+
return W(
|
|
571
|
+
() => e(...s.map((n) => p.get(n))),
|
|
572
|
+
r,
|
|
573
|
+
t
|
|
574
574
|
);
|
|
575
|
-
},
|
|
576
|
-
const
|
|
577
|
-
|
|
575
|
+
}, ut = (...s) => (e) => {
|
|
576
|
+
const t = s.filter((r) => d.is(r));
|
|
577
|
+
Le(() => e(...s.map(p.get)), t);
|
|
578
578
|
};
|
|
579
|
-
class
|
|
579
|
+
class ee {
|
|
580
580
|
constructor() {
|
|
581
|
-
|
|
581
|
+
i(this, "_store", /* @__PURE__ */ new Map());
|
|
582
582
|
/**
|
|
583
583
|
* Retrieves the value associated with the specified key from the memory store.
|
|
584
584
|
* @param key - The key to retrieve the value for.
|
|
585
585
|
* @returns The value associated with the key, or `null` if the key is not found.
|
|
586
586
|
*/
|
|
587
|
-
|
|
587
|
+
i(this, "getItem", (e) => this._store.get(e) ?? null);
|
|
588
588
|
/**
|
|
589
589
|
* Sets the value associated with the specified key in the memory store.
|
|
590
590
|
* @param key - The key to set the value for.
|
|
591
591
|
* @param value - The value to set.
|
|
592
592
|
*/
|
|
593
|
-
|
|
594
|
-
this._store.set(e,
|
|
593
|
+
i(this, "setItem", (e, t) => {
|
|
594
|
+
this._store.set(e, t);
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
const
|
|
599
|
-
key:
|
|
598
|
+
const te = ({
|
|
599
|
+
key: s,
|
|
600
600
|
defaultValue: e,
|
|
601
|
-
store:
|
|
602
|
-
serialize:
|
|
601
|
+
store: t,
|
|
602
|
+
serialize: r = JSON.stringify,
|
|
603
603
|
deserialize: n = JSON.parse,
|
|
604
|
-
equals: o = (
|
|
605
|
-
onLoad:
|
|
604
|
+
equals: o = (c, a) => c === a,
|
|
605
|
+
onLoad: l = (c) => c
|
|
606
606
|
}) => {
|
|
607
|
-
const
|
|
608
|
-
|
|
607
|
+
const c = t.getItem(s), a = new N(
|
|
608
|
+
c != null ? l(n(c)) : typeof e == "function" ? e() : e,
|
|
609
609
|
o
|
|
610
610
|
);
|
|
611
611
|
return a.on((f) => {
|
|
612
|
-
|
|
612
|
+
t.setItem(s, r(f));
|
|
613
613
|
}), a;
|
|
614
|
-
},
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
})
|
|
621
|
-
|
|
622
|
-
return
|
|
614
|
+
}, ht = (s) => {
|
|
615
|
+
var e;
|
|
616
|
+
return te({
|
|
617
|
+
...s,
|
|
618
|
+
store: ((e = K()) == null ? void 0 : e.localStorage) ?? new ee()
|
|
619
|
+
});
|
|
620
|
+
}, ft = (s) => {
|
|
621
|
+
var e;
|
|
622
|
+
return te({
|
|
623
|
+
...s,
|
|
624
|
+
store: ((e = K()) == null ? void 0 : e.sessionStorage) ?? new ee()
|
|
625
|
+
});
|
|
626
|
+
};
|
|
627
|
+
function Z(s) {
|
|
628
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
|
|
623
629
|
}
|
|
624
|
-
const
|
|
625
|
-
const n = (
|
|
626
|
-
let
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}),
|
|
631
|
-
|
|
630
|
+
const $e = (s, e, t, r) => {
|
|
631
|
+
const n = (r == null ? void 0 : r.duration) ?? 300, o = (r == null ? void 0 : r.easing) ?? ((y) => y), l = (r == null ? void 0 : r.equals) ?? ((y, $) => y === $);
|
|
632
|
+
let c = r == null ? void 0 : r.interpolate, a = s, f = e(), h = performance.now(), S = null, O = !0;
|
|
633
|
+
const q = new T(e, l), C = H(s, l);
|
|
634
|
+
C.onDispose(() => {
|
|
635
|
+
S !== null && cancelAnimationFrame(S);
|
|
636
|
+
}), C.onDispose(q.dispose), t.forEach((y) => {
|
|
637
|
+
y.setDerivative(q), y.onDispose(C.dispose);
|
|
632
638
|
});
|
|
633
|
-
const
|
|
634
|
-
f =
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
let
|
|
639
|
-
|
|
639
|
+
const xe = (y) => {
|
|
640
|
+
f = y, h = performance.now(), a = C.value, O && (O = !1, S = Z(G));
|
|
641
|
+
}, G = () => {
|
|
642
|
+
const $ = (performance.now() - h) / p.get(n), Te = o($);
|
|
643
|
+
c == null && (c = be(a));
|
|
644
|
+
let J = c(a, f, Te);
|
|
645
|
+
$ >= 1 ? (O = !0, J = f) : S = Z(G), C.set(J);
|
|
640
646
|
};
|
|
641
|
-
return
|
|
642
|
-
},
|
|
643
|
-
const { initialValue:
|
|
644
|
-
return
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
[
|
|
648
|
-
|
|
647
|
+
return q.on(xe), C;
|
|
648
|
+
}, dt = (s, e) => {
|
|
649
|
+
const { initialValue: t, ...r } = e ?? {};
|
|
650
|
+
return $e(
|
|
651
|
+
t ?? s.get(),
|
|
652
|
+
s.get,
|
|
653
|
+
[s],
|
|
654
|
+
r
|
|
649
655
|
);
|
|
650
|
-
},
|
|
651
|
-
const { signals:
|
|
652
|
-
({ signals: o, literals:
|
|
656
|
+
}, pt = (s, e) => {
|
|
657
|
+
const { signals: t, literals: r } = Object.entries(s).reduce(
|
|
658
|
+
({ signals: o, literals: l }, [c, a]) => (d.is(a) ? o.push([c, a]) : l[c] = a, { signals: o, literals: l }),
|
|
653
659
|
{ signals: [], literals: {} }
|
|
654
|
-
), n =
|
|
655
|
-
return
|
|
656
|
-
},
|
|
660
|
+
), n = t.map(([, o]) => o);
|
|
661
|
+
return W(() => (t.forEach(([o, l]) => r[o] = l.value), e(r)), n);
|
|
662
|
+
}, se = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), re = /* @__PURE__ */ new Set([
|
|
657
663
|
"rowSpan",
|
|
658
664
|
"colSpan",
|
|
659
665
|
"tabIndex",
|
|
660
666
|
"valueAsNumber"
|
|
661
|
-
]),
|
|
667
|
+
]), ne = /* @__PURE__ */ new Set(["valueAsDate"]), ie = /* @__PURE__ */ new Set([
|
|
662
668
|
"value",
|
|
663
669
|
"textContent",
|
|
664
670
|
"innerText",
|
|
@@ -666,25 +672,26 @@ const Ge = (t, e, r, s) => {
|
|
|
666
672
|
"outerHTML",
|
|
667
673
|
"className",
|
|
668
674
|
"classList"
|
|
669
|
-
]),
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
]), Ne = (s, e) => se.has(s) ? (t) => {
|
|
676
|
+
t == null ? e[s] = null : e[s] = !!t;
|
|
677
|
+
} : re.has(s) ? (t) => {
|
|
678
|
+
t == null ? e[s] = null : e[s] = Number(t);
|
|
679
|
+
} : ne.has(s) ? (t) => {
|
|
680
|
+
t == null ? e[s] = null : e[s] = t;
|
|
681
|
+
} : ie.has(s) ? (t) => {
|
|
682
|
+
t == null ? e[s] = null : e[s] = String(t);
|
|
683
|
+
} : (t) => {
|
|
684
|
+
t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
|
|
685
|
+
}, He = (s, e) => se.has(s) ? () => !!e[s] : re.has(s) ? () => Number(e[s]) : ne.has(s) ? () => e[s] : ie.has(s) ? () => String(e[s]) : () => e.getAttribute(s), F = (s) => {
|
|
686
|
+
const e = s;
|
|
687
|
+
e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentElement && s.parentElement.removeChild(s);
|
|
688
|
+
}, Ie = (s) => oe(s) ? s : s.parentElement, oe = (s) => s.nodeType === 1;
|
|
689
|
+
class le extends Error {
|
|
690
|
+
constructor(e) {
|
|
691
|
+
super(`Provider not found: ${e.description}`);
|
|
675
692
|
}
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
}, We = (t) => (e, r) => {
|
|
679
|
-
r == null ? e[t] = null : e[t] = Number(r);
|
|
680
|
-
}, He = (t) => (e, r) => {
|
|
681
|
-
r == null ? e[t] = null : e[t] = r;
|
|
682
|
-
}, ze = (t) => (e, r) => {
|
|
683
|
-
r == null ? e[t] = null : e[t] = String(r);
|
|
684
|
-
}, Xe = (t) => (e, r) => {
|
|
685
|
-
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
686
|
-
}, ae = (t) => oe.has(t) ? b(t, Je) : ie.has(t) ? b(t, We) : le.has(t) ? b(t, He) : ue.has(t) ? b(t, ze) : b(t, Xe), ce = (t) => (e) => oe.has(t) ? !!e[t] : ie.has(t) ? Number(e[t]) : le.has(t) ? e[t] : ue.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
687
|
-
class y {
|
|
693
|
+
}
|
|
694
|
+
class P {
|
|
688
695
|
/**
|
|
689
696
|
* Constructs a new `DOMContext` instance.
|
|
690
697
|
*
|
|
@@ -694,7 +701,7 @@ class y {
|
|
|
694
701
|
* @param providers - The `Providers` instance associated with this context.
|
|
695
702
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
696
703
|
*/
|
|
697
|
-
constructor(e,
|
|
704
|
+
constructor(e, t, r, n) {
|
|
698
705
|
/**
|
|
699
706
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
700
707
|
*
|
|
@@ -702,19 +709,54 @@ class y {
|
|
|
702
709
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
703
710
|
* @returns The newly created element.
|
|
704
711
|
*/
|
|
705
|
-
|
|
712
|
+
i(this, "createElement", (e, t) => t !== void 0 ? this.document.createElementNS(t, e) : this.document.createElement(e));
|
|
713
|
+
/**
|
|
714
|
+
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace and appends it to the current element.
|
|
715
|
+
*
|
|
716
|
+
* @param tagName - The tag name of the element to create.
|
|
717
|
+
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
718
|
+
* @returns The newly created element.
|
|
719
|
+
*/
|
|
720
|
+
i(this, "makeChildElement", (e, t) => {
|
|
721
|
+
const r = this.createElement(e, t);
|
|
722
|
+
return this.appendOrInsert(r), this.withElement(r);
|
|
723
|
+
});
|
|
706
724
|
/**
|
|
707
725
|
* Creates a new text node with the specified text content.
|
|
708
726
|
* @param text - The text content for the new text node.
|
|
709
727
|
* @returns A new `Text` node with the specified text content.
|
|
710
728
|
*/
|
|
711
|
-
|
|
729
|
+
i(this, "createText", (e) => this.document.createTextNode(e));
|
|
730
|
+
/**
|
|
731
|
+
* Creates a new text node with the specified text content and appends it to the current element.
|
|
732
|
+
* @param text - The text content for the new text node.
|
|
733
|
+
* @returns A new `DOMContext` with a reference to the new text node.
|
|
734
|
+
*/
|
|
735
|
+
i(this, "makeChildText", (e) => {
|
|
736
|
+
const t = this.createText(e);
|
|
737
|
+
return this.appendOrInsert(t), this.withReference(t);
|
|
738
|
+
});
|
|
739
|
+
/**
|
|
740
|
+
* Sets the text content of the current element.
|
|
741
|
+
* @param text - The text content to set.
|
|
742
|
+
*/
|
|
743
|
+
i(this, "setText", (e) => {
|
|
744
|
+
this.reference.nodeValue = e;
|
|
745
|
+
});
|
|
746
|
+
/**
|
|
747
|
+
* Gets the text content of the current element or text node.
|
|
748
|
+
* @returns The text content of the current element or text node.
|
|
749
|
+
*/
|
|
750
|
+
i(this, "getText", () => {
|
|
751
|
+
var e;
|
|
752
|
+
return ((e = this.reference) == null ? void 0 : e.nodeValue) ?? this.element.textContent ?? "";
|
|
753
|
+
});
|
|
712
754
|
/**
|
|
713
755
|
* Creates a new `DOMContext` with a reference to a newly created text node.
|
|
714
756
|
* The text node is appended or inserted to the current `DOMContext`.
|
|
715
757
|
* The new `DOMContext` with the reference is returned.
|
|
716
758
|
*/
|
|
717
|
-
|
|
759
|
+
i(this, "makeRef", () => {
|
|
718
760
|
const e = this.createText("");
|
|
719
761
|
return this.appendOrInsert(e), this.withReference(e);
|
|
720
762
|
});
|
|
@@ -723,79 +765,44 @@ class y {
|
|
|
723
765
|
*
|
|
724
766
|
* @param child - The child node to append or insert.
|
|
725
767
|
*/
|
|
726
|
-
|
|
768
|
+
i(this, "appendOrInsert", (e) => {
|
|
727
769
|
this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
|
|
728
770
|
});
|
|
729
|
-
/**
|
|
730
|
-
* Creates a new `DOMContext` instance with the provided `document`.
|
|
731
|
-
*
|
|
732
|
-
* @param document - The `Document` to use for the `DOMContext`.
|
|
733
|
-
* @returns A new `DOMContext` instance.
|
|
734
|
-
*/
|
|
735
|
-
u(this, "withDocument", (e) => new y(e, this.element, this.reference, this.providers, !0));
|
|
736
771
|
/**
|
|
737
772
|
* Creates a new `DOMContext` instance with the provided `element`.
|
|
738
773
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
739
774
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
740
775
|
*/
|
|
741
|
-
|
|
776
|
+
i(this, "withElement", (e) => new P(this.document, e, void 0, this.providers));
|
|
742
777
|
/**
|
|
743
|
-
* Creates a new `DOMContext` instance with
|
|
744
|
-
* @
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
this.
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
)
|
|
778
|
+
* Creates a new `DOMContext` instance with a reference to a DOM element selected by the provided `selector`.
|
|
779
|
+
* @param selector - The CSS selector for the target DOM element.
|
|
780
|
+
* @returns A new `DOMContext` instance with a reference to the selected DOM element.
|
|
781
|
+
*/
|
|
782
|
+
i(this, "makePortal", (e) => {
|
|
783
|
+
const t = this.document.querySelector(e);
|
|
784
|
+
if (t == null)
|
|
785
|
+
throw new Error(`Cannot find element by selector for portal: ${e}`);
|
|
786
|
+
return this.withElement(t);
|
|
787
|
+
});
|
|
753
788
|
/**
|
|
754
789
|
* Creates a new `DOMContext` instance with the specified reference.
|
|
755
790
|
*
|
|
756
791
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
757
792
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
758
793
|
*/
|
|
759
|
-
|
|
760
|
-
this.document,
|
|
761
|
-
this.element,
|
|
762
|
-
e,
|
|
763
|
-
this.providers,
|
|
764
|
-
this.isFirstLevel
|
|
765
|
-
));
|
|
766
|
-
/** Creates a new DOMContext with the provided provider value.
|
|
767
|
-
*
|
|
768
|
-
* @param mark - The provider mark to associate the value with.
|
|
769
|
-
* @param value - The value to set for the provider.
|
|
770
|
-
* @returns A new DOMContext with the updated providers.
|
|
771
|
-
*/
|
|
772
|
-
u(this, "withProvider", (e, r) => new y(
|
|
773
|
-
this.document,
|
|
774
|
-
this.element,
|
|
775
|
-
this.reference,
|
|
776
|
-
{
|
|
777
|
-
...this.providers,
|
|
778
|
-
[e]: r
|
|
779
|
-
},
|
|
780
|
-
this.isFirstLevel
|
|
781
|
-
));
|
|
794
|
+
i(this, "withReference", (e) => new P(this.document, this.element, e, this.providers));
|
|
782
795
|
/**
|
|
783
|
-
* Returns a new
|
|
796
|
+
* Returns a new HTMLDOMContext instance with the specified providers merged into
|
|
784
797
|
* the existing providers.
|
|
785
798
|
*
|
|
786
799
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
787
|
-
* @returns A new
|
|
788
|
-
*/
|
|
789
|
-
|
|
790
|
-
this.
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
{
|
|
794
|
-
...this.providers,
|
|
795
|
-
...e
|
|
796
|
-
},
|
|
797
|
-
this.isFirstLevel
|
|
798
|
-
));
|
|
800
|
+
* @returns A new HTMLDOMContext instance with the merged providers.
|
|
801
|
+
*/
|
|
802
|
+
i(this, "withProviders", (e) => new P(this.document, this.element, this.reference, {
|
|
803
|
+
...this.providers,
|
|
804
|
+
...e
|
|
805
|
+
}));
|
|
799
806
|
/**
|
|
800
807
|
* Retrieves a provider for the given provider mark.
|
|
801
808
|
*
|
|
@@ -803,83 +810,329 @@ class y {
|
|
|
803
810
|
* @returns The provider for the given mark.
|
|
804
811
|
* @throws Throws `ProviderNotFoundError` if the provider for the given mark is not found.
|
|
805
812
|
*/
|
|
806
|
-
|
|
813
|
+
i(this, "getProvider", (e) => {
|
|
807
814
|
if (this.providers[e] === void 0)
|
|
808
|
-
throw new
|
|
815
|
+
throw new le(e);
|
|
809
816
|
return this.providers[e];
|
|
810
817
|
});
|
|
811
|
-
this
|
|
818
|
+
i(this, "clear", (e) => {
|
|
819
|
+
e && (this.reference !== void 0 ? F(this.reference) : F(this.element));
|
|
820
|
+
});
|
|
821
|
+
/**
|
|
822
|
+
* Adds classes to the element.
|
|
823
|
+
* @param tokens - The class names to add.
|
|
824
|
+
*/
|
|
825
|
+
i(this, "addClasses", (e) => {
|
|
826
|
+
this.element.classList.add(...e);
|
|
827
|
+
});
|
|
828
|
+
/**
|
|
829
|
+
* Removes classes from the element.
|
|
830
|
+
* @param tokens - The class names to remove.
|
|
831
|
+
*/
|
|
832
|
+
i(this, "removeClasses", (e) => {
|
|
833
|
+
this.element.classList.remove(...e);
|
|
834
|
+
});
|
|
835
|
+
/**
|
|
836
|
+
* Gets the classes of the element.
|
|
837
|
+
* @returns The classes of the element.
|
|
838
|
+
*/
|
|
839
|
+
i(this, "getClasses", () => Array.from(this.element.classList));
|
|
840
|
+
/**
|
|
841
|
+
* Adds an event listener to the element.
|
|
842
|
+
* @param event - The event to listen for.
|
|
843
|
+
* @param listener - The listener to call when the event occurs.
|
|
844
|
+
* @returns A function to remove the event listener.
|
|
845
|
+
*/
|
|
846
|
+
i(this, "on", (e, t) => (this.element.addEventListener(e, t), (r) => {
|
|
847
|
+
r && this.element.removeEventListener(e, t);
|
|
848
|
+
}));
|
|
849
|
+
/**
|
|
850
|
+
* Returns `true` if the context is a browser DOM context.
|
|
851
|
+
* @returns `true` if the context is a browser DOM context.
|
|
852
|
+
*/
|
|
853
|
+
i(this, "isBrowserDOM", () => !0);
|
|
854
|
+
/**
|
|
855
|
+
* Returns `true` if the context is a headless DOM context.
|
|
856
|
+
* @returns `true` if the context is a headless DOM context.
|
|
857
|
+
*/
|
|
858
|
+
i(this, "isHeadlessDOM", () => !1);
|
|
859
|
+
/**
|
|
860
|
+
* Sets the style of the element.
|
|
861
|
+
* @param name - The name of the style to set.
|
|
862
|
+
* @param value - The value of the style to set.
|
|
863
|
+
*/
|
|
864
|
+
i(this, "setStyle", (e, t) => {
|
|
865
|
+
this.element.style.setProperty(e, t);
|
|
866
|
+
});
|
|
867
|
+
/**
|
|
868
|
+
* Gets the style of the element.
|
|
869
|
+
* @param name - The name of the style to get.
|
|
870
|
+
* @returns The value of the style.
|
|
871
|
+
*/
|
|
872
|
+
i(this, "getStyle", (e) => this.element.style.getPropertyValue(e));
|
|
873
|
+
i(this, "makeAccessors", (e) => ({
|
|
874
|
+
get: He(e, this.element),
|
|
875
|
+
set: Ne(e, this.element)
|
|
876
|
+
}));
|
|
877
|
+
this.document = e, this.element = t, this.reference = r, this.providers = n;
|
|
812
878
|
}
|
|
813
879
|
/**
|
|
814
880
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
815
881
|
*
|
|
816
|
-
* @param element - The `
|
|
882
|
+
* @param element - The `HTMLElement` to create the `DOMContext` for.
|
|
817
883
|
* @param ref - An optional reference `Node` to associate with the `DOMContext`.
|
|
818
884
|
* @returns A new `DOMContext` instance.
|
|
819
885
|
*/
|
|
820
|
-
static of(e,
|
|
821
|
-
return new
|
|
886
|
+
static of(e, t) {
|
|
887
|
+
return new P(e.ownerDocument, e, t, {});
|
|
822
888
|
}
|
|
823
889
|
}
|
|
824
|
-
class
|
|
890
|
+
const g = Symbol("class"), _ = Symbol("style"), x = Symbol("handler"), ce = () => Math.random().toString(36).substring(2, 15), Ve = (s) => s.replace(/<[^>]*>?/g, "");
|
|
891
|
+
class ae {
|
|
825
892
|
constructor(e) {
|
|
826
|
-
|
|
893
|
+
i(this, "id", ce());
|
|
894
|
+
i(this, "properties", {});
|
|
895
|
+
i(this, "children", []);
|
|
896
|
+
i(this, "isElement", () => !0);
|
|
897
|
+
i(this, "isText", () => !1);
|
|
898
|
+
i(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? Ve(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
|
|
899
|
+
i(this, "removeChild", (e) => {
|
|
900
|
+
const t = this.children.indexOf(e);
|
|
901
|
+
t !== -1 && this.children.splice(t, 1);
|
|
902
|
+
});
|
|
903
|
+
i(this, "remove", () => {
|
|
904
|
+
if (this.parent != null)
|
|
905
|
+
this.parent.removeChild(this);
|
|
906
|
+
else
|
|
907
|
+
throw new Error("Parent is undefined");
|
|
908
|
+
});
|
|
909
|
+
i(this, "getPortals", () => {
|
|
910
|
+
const e = this.elements().flatMap((t) => t.isPortal() ? [t, ...t.getPortals()] : t.getPortals());
|
|
911
|
+
return this.isPortal() && e.unshift(this), e;
|
|
912
|
+
});
|
|
913
|
+
i(this, "elements", () => this.children.filter((e) => e.isElement()));
|
|
914
|
+
i(this, "hasInnerHTML", () => this.properties.innerHTML != null);
|
|
915
|
+
i(this, "getInnerHTML", () => this.properties.innerHTML ?? "");
|
|
916
|
+
i(this, "getInnerText", () => this.properties.innerText ?? "");
|
|
917
|
+
i(this, "hasInnerText", () => this.properties.innerText != null);
|
|
918
|
+
i(this, "hasChildren", () => this.children.length > 0);
|
|
919
|
+
i(this, "hasClasses", () => this.properties[g] != null);
|
|
920
|
+
i(this, "hasStyles", () => this.properties[_] != null);
|
|
921
|
+
i(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
|
|
922
|
+
i(this, "hasHandlers", () => this.properties[x] != null);
|
|
923
|
+
i(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
|
|
924
|
+
i(this, "getById", (e) => {
|
|
925
|
+
if (this.properties.id === e)
|
|
926
|
+
return this;
|
|
927
|
+
for (const t of this.elements()) {
|
|
928
|
+
const r = t.getById(e);
|
|
929
|
+
if (r != null)
|
|
930
|
+
return r;
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
i(this, "trigger", (e, t) => {
|
|
934
|
+
((this.properties[x] ?? {})[e] ?? []).forEach((n) => n(t));
|
|
935
|
+
});
|
|
936
|
+
i(this, "click", () => {
|
|
937
|
+
this.trigger("click", {});
|
|
938
|
+
});
|
|
939
|
+
i(this, "on", (e, t) => {
|
|
940
|
+
var o;
|
|
941
|
+
const r = (o = this.properties)[x] ?? (o[x] = {}), n = t;
|
|
942
|
+
return r[e] = [...r[e] ?? [], n], () => {
|
|
943
|
+
const l = r[e] ?? [], c = l.indexOf(n);
|
|
944
|
+
c !== -1 && (l.splice(c, 1), l.length === 0 ? (delete r[e], Object.keys(r).length === 0 && delete this.properties[x]) : r[e] = l);
|
|
945
|
+
};
|
|
946
|
+
});
|
|
947
|
+
i(this, "addClasses", (e) => {
|
|
948
|
+
var r;
|
|
949
|
+
if (e.length === 0)
|
|
950
|
+
return;
|
|
951
|
+
const t = (r = this.properties)[g] ?? (r[g] = []);
|
|
952
|
+
e.forEach((n) => {
|
|
953
|
+
t.includes(n) || t.push(n);
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
i(this, "removeClasses", (e) => {
|
|
957
|
+
var r;
|
|
958
|
+
if (e.length === 0)
|
|
959
|
+
return;
|
|
960
|
+
const t = (r = this.properties)[g] ?? (r[g] = []);
|
|
961
|
+
e.forEach((n) => {
|
|
962
|
+
const o = t.indexOf(n);
|
|
963
|
+
o !== -1 && t.splice(o, 1);
|
|
964
|
+
}), t.length === 0 && delete this.properties[g];
|
|
965
|
+
});
|
|
966
|
+
i(this, "getClasses", () => this.properties[g] ?? []);
|
|
967
|
+
i(this, "getAttributes", () => Object.entries(this.properties).filter(
|
|
968
|
+
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
969
|
+
));
|
|
970
|
+
i(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
|
|
971
|
+
(e) => e === g ? [["class", this.getClasses()]] : e === _ ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
972
|
+
));
|
|
973
|
+
i(this, "setStyle", (e, t) => {
|
|
974
|
+
var n;
|
|
975
|
+
const r = (n = this.properties)[_] ?? (n[_] = {});
|
|
976
|
+
r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[_]);
|
|
977
|
+
});
|
|
978
|
+
i(this, "getStyle", (e) => {
|
|
979
|
+
var t;
|
|
980
|
+
return ((t = this.properties[_]) == null ? void 0 : t[e]) ?? "";
|
|
981
|
+
});
|
|
982
|
+
i(this, "getStyles", () => this.properties[_] ?? {});
|
|
983
|
+
i(this, "makeAccessors", (e) => {
|
|
984
|
+
const t = this.properties;
|
|
985
|
+
return {
|
|
986
|
+
get: () => t[e],
|
|
987
|
+
set: (r) => t[e] = r
|
|
988
|
+
};
|
|
989
|
+
});
|
|
990
|
+
this.parent = e;
|
|
827
991
|
}
|
|
828
992
|
}
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
993
|
+
const Re = (s) => s.replace(/"/g, """), je = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
994
|
+
class qe extends ae {
|
|
995
|
+
constructor(t, r, n) {
|
|
996
|
+
super(n);
|
|
997
|
+
i(this, "isPortal", () => !1);
|
|
998
|
+
i(this, "toHTML", () => {
|
|
999
|
+
const t = this.children.map((l) => l.toHTML()).join(""), r = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1000
|
+
let n = null;
|
|
1001
|
+
const o = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, f]) => `${a}: ${f};`).join(" ")}"` : Fe.has(l) ? ` ${l}` : l === "innerHTML" ? (n = c, "") : l === "innerText" ? (n = je(c), "") : ` ${l}="${Re(c)}"`).join("");
|
|
1002
|
+
return Ue.has(this.tagName) && t === "" ? `<${this.tagName}${r}${o} />` : `<${this.tagName}${r}${o}>${n ?? t}</${this.tagName}>`;
|
|
1003
|
+
});
|
|
1004
|
+
this.tagName = t, this.namespace = r;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
class ue extends ae {
|
|
1008
|
+
constructor(t, r) {
|
|
1009
|
+
super(r);
|
|
1010
|
+
i(this, "isPortal", () => !0);
|
|
1011
|
+
i(this, "toHTML", () => "");
|
|
1012
|
+
i(this, "contentToHTML", () => this.children.map((t) => t.toHTML()).join(""));
|
|
1013
|
+
this.selector = t;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
class Be {
|
|
1017
|
+
constructor(e) {
|
|
1018
|
+
i(this, "id", ce());
|
|
1019
|
+
i(this, "isElement", () => !1);
|
|
1020
|
+
i(this, "isText", () => !0);
|
|
1021
|
+
i(this, "getText", () => this.text);
|
|
1022
|
+
i(this, "toHTML", () => this.text);
|
|
1023
|
+
this.text = e;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
class E {
|
|
1027
|
+
constructor(e, t, r, n) {
|
|
1028
|
+
i(this, "appendOrInsert", (e) => {
|
|
1029
|
+
if (this.reference != null) {
|
|
1030
|
+
const t = this.element.children.indexOf(this.reference);
|
|
1031
|
+
this.element.children.splice(t, 0, e);
|
|
1032
|
+
} else
|
|
1033
|
+
this.element.children.push(e);
|
|
1034
|
+
});
|
|
1035
|
+
i(this, "makeChildElement", (e, t) => {
|
|
1036
|
+
const r = new qe(e, t, this.element);
|
|
1037
|
+
return this.appendOrInsert(r), new E(
|
|
1038
|
+
r,
|
|
1039
|
+
void 0,
|
|
1040
|
+
this.container,
|
|
1041
|
+
this.providers
|
|
1042
|
+
);
|
|
1043
|
+
});
|
|
1044
|
+
i(this, "makeChildText", (e) => {
|
|
1045
|
+
const t = new Be(e);
|
|
1046
|
+
return this.appendOrInsert(t), new E(
|
|
1047
|
+
this.element,
|
|
1048
|
+
t,
|
|
1049
|
+
this.container,
|
|
1050
|
+
this.providers
|
|
1051
|
+
);
|
|
1052
|
+
});
|
|
1053
|
+
i(this, "setText", (e) => {
|
|
1054
|
+
this.reference && this.reference.isText() && (this.reference.text = e);
|
|
1055
|
+
});
|
|
1056
|
+
i(this, "getText", () => {
|
|
1057
|
+
var e;
|
|
1058
|
+
return ((e = this.reference) == null ? void 0 : e.getText()) ?? this.element.getText();
|
|
1059
|
+
});
|
|
1060
|
+
i(this, "makeRef", () => this.makeChildText(""));
|
|
1061
|
+
i(this, "makePortal", (e) => {
|
|
1062
|
+
const t = new ue(e, this.element);
|
|
1063
|
+
return this.appendOrInsert(t), new E(
|
|
1064
|
+
t,
|
|
1065
|
+
void 0,
|
|
1066
|
+
this.container,
|
|
1067
|
+
this.providers
|
|
1068
|
+
);
|
|
1069
|
+
});
|
|
1070
|
+
i(this, "withProviders", (e) => new E(this.element, this.reference, this.container, {
|
|
1071
|
+
...this.providers,
|
|
1072
|
+
...e
|
|
1073
|
+
}));
|
|
1074
|
+
i(this, "getProvider", (e) => {
|
|
1075
|
+
if (this.providers[e] === void 0)
|
|
1076
|
+
throw new le(e);
|
|
1077
|
+
return this.providers[e];
|
|
1078
|
+
});
|
|
1079
|
+
i(this, "clear", (e) => {
|
|
1080
|
+
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
1081
|
+
});
|
|
1082
|
+
i(this, "on", (e, t) => this.element.on(e, t));
|
|
1083
|
+
i(this, "addClasses", (e) => this.element.addClasses(e));
|
|
1084
|
+
i(this, "removeClasses", (e) => this.element.removeClasses(e));
|
|
1085
|
+
i(this, "getClasses", () => this.element.getClasses());
|
|
1086
|
+
i(this, "isBrowserDOM", () => !1);
|
|
1087
|
+
i(this, "isHeadlessDOM", () => !0);
|
|
1088
|
+
i(this, "setStyle", (e, t) => this.element.setStyle(e, t));
|
|
1089
|
+
i(this, "getStyle", (e) => this.element.getStyle(e));
|
|
1090
|
+
i(this, "makeAccessors", (e) => this.element.makeAccessors(e));
|
|
1091
|
+
this.element = e, this.reference = t, this.container = r, this.providers = n;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
const Fe = /* @__PURE__ */ new Set([
|
|
1095
|
+
"checked",
|
|
1096
|
+
"disabled",
|
|
1097
|
+
"multiple",
|
|
1098
|
+
"readonly",
|
|
1099
|
+
"required",
|
|
1100
|
+
"selected"
|
|
1101
|
+
]), Ue = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), he = (s) => (e) => {
|
|
1102
|
+
const t = e.makeChildText(s);
|
|
1103
|
+
return (r) => t.clear(r);
|
|
1104
|
+
}, fe = (s) => (e) => {
|
|
1105
|
+
const t = e.makeChildText(s.value), r = s.on((n) => t.setText(n));
|
|
843
1106
|
return (n) => {
|
|
844
|
-
|
|
1107
|
+
r(), t.clear(n);
|
|
845
1108
|
};
|
|
846
|
-
},
|
|
847
|
-
const
|
|
848
|
-
return (
|
|
849
|
-
|
|
1109
|
+
}, gt = (s) => d.is(s) ? fe(s) : he(s), m = (...s) => (e) => {
|
|
1110
|
+
const t = s.map((r) => u(r)(e));
|
|
1111
|
+
return (r) => {
|
|
1112
|
+
t.forEach((n) => n(r));
|
|
850
1113
|
};
|
|
851
|
-
},
|
|
852
|
-
},
|
|
853
|
-
|
|
854
|
-
}),
|
|
855
|
-
|
|
856
|
-
const r =
|
|
857
|
-
|
|
858
|
-
const n = t.on((o) => {
|
|
859
|
-
s.forEach((i) => r.classList.remove(i)), s = (o ?? "").split(" ").filter((i) => i.length > 0), r.classList.add(...s);
|
|
1114
|
+
}, v = () => () => {
|
|
1115
|
+
}, We = (s) => (e) => (e.addClasses(s), (t) => {
|
|
1116
|
+
t && e.removeClasses(s);
|
|
1117
|
+
}), ze = (s) => (e) => {
|
|
1118
|
+
let t = [];
|
|
1119
|
+
const r = s.on((n) => {
|
|
1120
|
+
e.removeClasses(t), t = (n ?? "").split(" ").filter((o) => o.length > 0), e.addClasses(t);
|
|
860
1121
|
});
|
|
861
|
-
return (o) => {
|
|
862
|
-
n(), o && s.forEach((i) => r.classList.remove(i)), s.length = 0;
|
|
863
|
-
};
|
|
864
|
-
}, L = (t, e) => {
|
|
865
|
-
const r = ae(t), s = ce(t);
|
|
866
1122
|
return (n) => {
|
|
867
|
-
|
|
868
|
-
const o = s(n.element);
|
|
869
|
-
return r(n.element, e), (i) => {
|
|
870
|
-
i && r(n.element, o);
|
|
871
|
-
};
|
|
1123
|
+
r(), n && e.removeClasses(t), t.length = 0;
|
|
872
1124
|
};
|
|
873
|
-
}, k = (
|
|
874
|
-
const r =
|
|
875
|
-
return (
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
1125
|
+
}, k = (s, e) => (t) => {
|
|
1126
|
+
const { get: r, set: n } = t.makeAccessors(s), o = r();
|
|
1127
|
+
return n(e), (l) => {
|
|
1128
|
+
l && n(o);
|
|
1129
|
+
};
|
|
1130
|
+
}, L = (s, e) => (t) => {
|
|
1131
|
+
const { get: r, set: n } = t.makeAccessors(s), o = r(), l = e.on(n);
|
|
1132
|
+
return (c) => {
|
|
1133
|
+
l(), c && n(o);
|
|
881
1134
|
};
|
|
882
|
-
},
|
|
1135
|
+
}, D = new Proxy(
|
|
883
1136
|
{},
|
|
884
1137
|
{
|
|
885
1138
|
/**
|
|
@@ -893,17 +1146,17 @@ const m = (t) => {
|
|
|
893
1146
|
* @returns The renderable component for the specified attribute.
|
|
894
1147
|
*
|
|
895
1148
|
*/
|
|
896
|
-
get: (
|
|
897
|
-
(
|
|
898
|
-
) : (
|
|
1149
|
+
get: (s, e) => e === "class" ? (t) => d.is(t) ? ze(t) : We(
|
|
1150
|
+
(t ?? "").split(" ").filter((r) => r.length > 0)
|
|
1151
|
+
) : (t) => d.is(t) ? L(
|
|
899
1152
|
e,
|
|
900
|
-
|
|
901
|
-
) :
|
|
1153
|
+
t
|
|
1154
|
+
) : k(
|
|
902
1155
|
e,
|
|
903
|
-
|
|
1156
|
+
t
|
|
904
1157
|
)
|
|
905
1158
|
}
|
|
906
|
-
),
|
|
1159
|
+
), mt = new Proxy(
|
|
907
1160
|
{},
|
|
908
1161
|
{
|
|
909
1162
|
/**
|
|
@@ -914,12 +1167,12 @@ const m = (t) => {
|
|
|
914
1167
|
* @returns The renderable component for the specified attribute.
|
|
915
1168
|
*
|
|
916
1169
|
*/
|
|
917
|
-
get: (
|
|
1170
|
+
get: (s, e) => (t) => d.is(t) ? L(
|
|
918
1171
|
`data-${e}`,
|
|
919
|
-
|
|
920
|
-
) :
|
|
1172
|
+
t
|
|
1173
|
+
) : k(`data-${e}`, t)
|
|
921
1174
|
}
|
|
922
|
-
),
|
|
1175
|
+
), yt = new Proxy(
|
|
923
1176
|
{},
|
|
924
1177
|
{
|
|
925
1178
|
/**
|
|
@@ -930,15 +1183,15 @@ const m = (t) => {
|
|
|
930
1183
|
* @returns The renderable component for the specified attribute.
|
|
931
1184
|
*
|
|
932
1185
|
*/
|
|
933
|
-
get: (
|
|
1186
|
+
get: (s, e) => (t) => d.is(t) ? L(
|
|
934
1187
|
`aria-${e}`,
|
|
935
|
-
|
|
936
|
-
) :
|
|
1188
|
+
t
|
|
1189
|
+
) : k(
|
|
937
1190
|
`aria-${e}`,
|
|
938
|
-
|
|
1191
|
+
t
|
|
939
1192
|
)
|
|
940
1193
|
}
|
|
941
|
-
),
|
|
1194
|
+
), wt = new Proxy(
|
|
942
1195
|
{},
|
|
943
1196
|
{
|
|
944
1197
|
/**
|
|
@@ -949,15 +1202,15 @@ const m = (t) => {
|
|
|
949
1202
|
* @returns The renderable component for the specified attribute.
|
|
950
1203
|
*
|
|
951
1204
|
*/
|
|
952
|
-
get: (
|
|
1205
|
+
get: (s, e) => (t) => d.is(t) ? L(
|
|
953
1206
|
e,
|
|
954
|
-
|
|
955
|
-
) :
|
|
1207
|
+
t
|
|
1208
|
+
) : k(
|
|
956
1209
|
e,
|
|
957
|
-
|
|
1210
|
+
t
|
|
958
1211
|
)
|
|
959
1212
|
}
|
|
960
|
-
),
|
|
1213
|
+
), _t = new Proxy(
|
|
961
1214
|
{},
|
|
962
1215
|
{
|
|
963
1216
|
/**
|
|
@@ -967,29 +1220,37 @@ const m = (t) => {
|
|
|
967
1220
|
* @returns The renderable component for the specified attribute.
|
|
968
1221
|
*
|
|
969
1222
|
*/
|
|
970
|
-
get: (
|
|
1223
|
+
get: (s, e) => (t) => d.is(t) ? L(
|
|
971
1224
|
e,
|
|
972
|
-
|
|
973
|
-
) :
|
|
1225
|
+
t
|
|
1226
|
+
) : k(
|
|
974
1227
|
e,
|
|
975
|
-
|
|
1228
|
+
t
|
|
976
1229
|
)
|
|
977
1230
|
}
|
|
978
|
-
),
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1231
|
+
), u = (s) => {
|
|
1232
|
+
if (s == null)
|
|
1233
|
+
return v;
|
|
1234
|
+
if (Array.isArray(s))
|
|
1235
|
+
return m(...s.map(u));
|
|
1236
|
+
if (typeof s == "string")
|
|
1237
|
+
return he(s);
|
|
1238
|
+
if (d.is(s))
|
|
1239
|
+
return fe(s);
|
|
1240
|
+
if (typeof s == "function")
|
|
1241
|
+
return s;
|
|
1242
|
+
throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
|
|
1243
|
+
}, de = (s, ...e) => (t) => {
|
|
1244
|
+
const r = t.makeChildElement(s, void 0), n = e.map((o) => u(o)(r));
|
|
982
1245
|
return (o) => {
|
|
983
|
-
n.forEach((
|
|
1246
|
+
n.forEach((l) => l(!1)), r.clear(o);
|
|
984
1247
|
};
|
|
985
|
-
},
|
|
986
|
-
const n =
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
return (i) => {
|
|
990
|
-
o.forEach((l) => l(!1)), i && m(n);
|
|
1248
|
+
}, pe = (s, e, ...t) => (r) => {
|
|
1249
|
+
const n = r.makeChildElement(s, e), o = t.map((l) => u(l)(n));
|
|
1250
|
+
return (l) => {
|
|
1251
|
+
o.forEach((c) => c(!1)), n.clear(l);
|
|
991
1252
|
};
|
|
992
|
-
},
|
|
1253
|
+
}, vt = new Proxy(
|
|
993
1254
|
{},
|
|
994
1255
|
{
|
|
995
1256
|
/**
|
|
@@ -997,9 +1258,9 @@ const m = (t) => {
|
|
|
997
1258
|
* @param tagName - The HTML tag name.
|
|
998
1259
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
999
1260
|
*/
|
|
1000
|
-
get: (
|
|
1261
|
+
get: (s, e) => (...t) => de(e, t.flatMap(u))
|
|
1001
1262
|
}
|
|
1002
|
-
),
|
|
1263
|
+
), St = new Proxy(
|
|
1003
1264
|
{},
|
|
1004
1265
|
{
|
|
1005
1266
|
/**
|
|
@@ -1007,9 +1268,9 @@ const m = (t) => {
|
|
|
1007
1268
|
* @param type - The input type name.
|
|
1008
1269
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1009
1270
|
*/
|
|
1010
|
-
get: (
|
|
1271
|
+
get: (s, e) => (...t) => de("input", D.type(e), ...t)
|
|
1011
1272
|
}
|
|
1012
|
-
),
|
|
1273
|
+
), Ge = "http://www.w3.org/2000/svg", Ct = new Proxy(
|
|
1013
1274
|
{},
|
|
1014
1275
|
{
|
|
1015
1276
|
/**
|
|
@@ -1017,9 +1278,9 @@ const m = (t) => {
|
|
|
1017
1278
|
* @param tagName - The SVG tag name.
|
|
1018
1279
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1019
1280
|
*/
|
|
1020
|
-
get: (
|
|
1281
|
+
get: (s, e) => (...t) => pe(e, Ge, t.flatMap(u))
|
|
1021
1282
|
}
|
|
1022
|
-
),
|
|
1283
|
+
), Je = "http://www.w3.org/1998/Math/MathML", xt = new Proxy(
|
|
1023
1284
|
{},
|
|
1024
1285
|
{
|
|
1025
1286
|
/**
|
|
@@ -1027,108 +1288,35 @@ const m = (t) => {
|
|
|
1027
1288
|
* @param tagName - The Math tag name.
|
|
1028
1289
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1029
1290
|
*/
|
|
1030
|
-
get: (
|
|
1031
|
-
}
|
|
1032
|
-
), O = "data-tempo-attr", M = "data-tempo-class", ge = "data-tempo-node", $ = "data-tempo-text", tt = (t, e) => {
|
|
1033
|
-
const r = t.getAttribute(e);
|
|
1034
|
-
if (r != null) {
|
|
1035
|
-
const s = t.getAttribute(O) ?? "{}", n = { ...JSON.parse(s), name: r };
|
|
1036
|
-
t.setAttribute(
|
|
1037
|
-
O,
|
|
1038
|
-
JSON.stringify(n).replace(/"/g, """)
|
|
1039
|
-
);
|
|
1291
|
+
get: (s, e) => (...t) => pe(e, Je, t.flatMap(u))
|
|
1040
1292
|
}
|
|
1041
|
-
|
|
1042
|
-
N() && t.isFirstLevel && tt(t.element, e);
|
|
1043
|
-
}, rt = (t) => {
|
|
1044
|
-
t.querySelectorAll(`[${O}]`).forEach((e) => {
|
|
1045
|
-
const r = JSON.parse(
|
|
1046
|
-
(e.getAttribute(O) ?? "{}").replace(/"/g, '"')
|
|
1047
|
-
);
|
|
1048
|
-
for (const [s, n] of Object.entries(r))
|
|
1049
|
-
e.setAttribute(s, n);
|
|
1050
|
-
e.removeAttribute(O);
|
|
1051
|
-
});
|
|
1052
|
-
};
|
|
1053
|
-
function st(t) {
|
|
1054
|
-
t.setAttribute(M, t.className);
|
|
1055
|
-
}
|
|
1056
|
-
const ye = (t) => {
|
|
1057
|
-
N() && t.isFirstLevel && st(t.element);
|
|
1058
|
-
}, nt = (t) => {
|
|
1059
|
-
t.querySelectorAll(`[${M}]`).forEach((e) => {
|
|
1060
|
-
const r = e.getAttribute(M);
|
|
1061
|
-
r !== null && (e.className = r, e.removeAttribute(M));
|
|
1062
|
-
});
|
|
1063
|
-
}, ve = (t) => {
|
|
1064
|
-
t.setAttribute(ge, "");
|
|
1065
|
-
}, ot = (t) => {
|
|
1066
|
-
t.querySelectorAll(`[${ge}]`).forEach((e) => {
|
|
1067
|
-
m(e);
|
|
1068
|
-
});
|
|
1069
|
-
}, it = (t) => {
|
|
1070
|
-
t.setAttribute($, t.textContent ?? "");
|
|
1071
|
-
}, Se = (t) => {
|
|
1072
|
-
N() && t.isFirstLevel && it(t.element);
|
|
1073
|
-
}, lt = (t) => {
|
|
1074
|
-
t.querySelectorAll(`[${$}]`).forEach((e) => {
|
|
1075
|
-
e.textContent = e.getAttribute($), e.removeAttribute($);
|
|
1076
|
-
});
|
|
1077
|
-
}, ut = (t) => {
|
|
1078
|
-
ot(t), nt(t), rt(t), lt(t);
|
|
1079
|
-
}, we = () => {
|
|
1080
|
-
const t = globalThis;
|
|
1081
|
-
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
1082
|
-
isSSR: !1,
|
|
1083
|
-
counter: 0
|
|
1084
|
-
}), t.__tempoSSR__;
|
|
1085
|
-
}, Q = (t, e) => {
|
|
1086
|
-
const r = we();
|
|
1087
|
-
r[t] = e;
|
|
1088
|
-
}, Ae = (t) => we()[t], H = (t) => {
|
|
1089
|
-
Q("isSSR", t);
|
|
1090
|
-
}, Y = () => Ae("counter"), at = () => {
|
|
1091
|
-
Q("counter", (Y() ?? 0) + 1);
|
|
1092
|
-
}, ct = () => {
|
|
1093
|
-
Q("counter", (Y() ?? 0) - 1);
|
|
1094
|
-
}, It = (t = 30) => (H(!0), new Promise((e, r) => {
|
|
1095
|
-
let s;
|
|
1096
|
-
const n = setInterval(() => {
|
|
1097
|
-
Y() <= 0 && (clearInterval(n), clearTimeout(s), H(!1), e());
|
|
1098
|
-
}, 30);
|
|
1099
|
-
s = setTimeout(() => {
|
|
1100
|
-
clearInterval(n), H(!1), r(new Error("SSR Timeout"));
|
|
1101
|
-
}, t * 1e3);
|
|
1102
|
-
})), Bt = (t) => (at(), c(t(ct))), N = () => Ae("isSSR"), Ee = (t, e) => {
|
|
1293
|
+
), ge = (s, e) => {
|
|
1103
1294
|
if (typeof e == "function")
|
|
1104
|
-
return
|
|
1105
|
-
const
|
|
1295
|
+
return ge(s, { then: e });
|
|
1296
|
+
const t = e.pending != null ? u(e.pending) : v, r = e.then, n = e.error != null ? (o) => u(e.error(o)) : () => v;
|
|
1106
1297
|
return (o) => {
|
|
1107
|
-
let
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
i && (a(!0), a = c(s(f))(o));
|
|
1298
|
+
let l = !0;
|
|
1299
|
+
const c = s(), a = o.makeRef();
|
|
1300
|
+
let f = u(t)(a);
|
|
1301
|
+
return c.then(
|
|
1302
|
+
(h) => {
|
|
1303
|
+
l && (f(!0), f = u(r(h))(a));
|
|
1114
1304
|
},
|
|
1115
|
-
(
|
|
1116
|
-
|
|
1305
|
+
(h) => {
|
|
1306
|
+
l && (f(!0), f = u(n(h))(a));
|
|
1117
1307
|
}
|
|
1118
|
-
), (
|
|
1119
|
-
|
|
1308
|
+
), (h) => {
|
|
1309
|
+
l = !1, f(h), a.clear(h);
|
|
1120
1310
|
};
|
|
1121
1311
|
};
|
|
1122
|
-
},
|
|
1123
|
-
s && r.element.removeEventListener(t, e);
|
|
1124
|
-
}), ft = (t) => Pe("click", (e) => {
|
|
1312
|
+
}, Tt = (s, e) => ge(() => s, e), me = (s, e) => (t) => t.on(s, e), Qe = (s) => me("click", (e) => {
|
|
1125
1313
|
e.preventDefault();
|
|
1126
|
-
const
|
|
1314
|
+
const t = e.target;
|
|
1127
1315
|
setTimeout(() => {
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1316
|
+
const r = t.ownerDocument != null ? t == null ? void 0 : t.checked : void 0;
|
|
1317
|
+
r != null && s(!r);
|
|
1130
1318
|
}, 0);
|
|
1131
|
-
}),
|
|
1319
|
+
}), R = new Proxy(
|
|
1132
1320
|
{},
|
|
1133
1321
|
{
|
|
1134
1322
|
/**
|
|
@@ -1136,270 +1324,279 @@ const ye = (t) => {
|
|
|
1136
1324
|
* @param fn - The function to call when the event is triggered.
|
|
1137
1325
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1138
1326
|
*/
|
|
1139
|
-
get: (
|
|
1327
|
+
get: (s, e) => (t) => me(e, t)
|
|
1140
1328
|
}
|
|
1141
|
-
),
|
|
1142
|
-
const
|
|
1143
|
-
t
|
|
1144
|
-
},
|
|
1145
|
-
const
|
|
1146
|
-
t
|
|
1147
|
-
},
|
|
1148
|
-
const
|
|
1149
|
-
if (
|
|
1329
|
+
), Xe = (s) => (e) => {
|
|
1330
|
+
const t = e.target;
|
|
1331
|
+
s(t.value);
|
|
1332
|
+
}, Ye = (s) => (e) => {
|
|
1333
|
+
const t = e.target;
|
|
1334
|
+
s(t.valueAsNumber);
|
|
1335
|
+
}, Ze = (s) => (e) => {
|
|
1336
|
+
const t = e.target;
|
|
1337
|
+
if (t.value === "")
|
|
1150
1338
|
return;
|
|
1151
|
-
const
|
|
1152
|
-
Number(
|
|
1153
|
-
Number(
|
|
1154
|
-
Number(
|
|
1339
|
+
const r = t.value.split("-"), n = new Date(
|
|
1340
|
+
Number(r[0]),
|
|
1341
|
+
Number(r[1]) - 1,
|
|
1342
|
+
Number(r[2].substring(0, 2))
|
|
1155
1343
|
);
|
|
1156
|
-
|
|
1157
|
-
},
|
|
1158
|
-
const
|
|
1159
|
-
if (
|
|
1344
|
+
s(n);
|
|
1345
|
+
}, Ke = (s) => (e) => {
|
|
1346
|
+
const t = e.target;
|
|
1347
|
+
if (t.value === "")
|
|
1160
1348
|
return;
|
|
1161
|
-
const
|
|
1349
|
+
const r = t.value.split("T"), n = r[0].split("-"), o = new Date(
|
|
1162
1350
|
Number(n[0]),
|
|
1163
1351
|
Number(n[1]) - 1,
|
|
1164
1352
|
Number(n[2])
|
|
1165
|
-
),
|
|
1166
|
-
o.setHours(Number(
|
|
1167
|
-
},
|
|
1168
|
-
const
|
|
1169
|
-
t
|
|
1170
|
-
},
|
|
1171
|
-
e.preventDefault(),
|
|
1172
|
-
},
|
|
1173
|
-
e.stopPropagation(),
|
|
1174
|
-
},
|
|
1175
|
-
e.stopImmediatePropagation(),
|
|
1176
|
-
},
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
),
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
),
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
),
|
|
1186
|
-
if (
|
|
1187
|
-
return (
|
|
1188
|
-
|
|
1189
|
-
let
|
|
1190
|
-
const
|
|
1191
|
-
let
|
|
1192
|
-
const
|
|
1193
|
-
if (
|
|
1194
|
-
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1353
|
+
), l = r[1].split(":");
|
|
1354
|
+
o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), s(o);
|
|
1355
|
+
}, Pt = (s) => (e) => {
|
|
1356
|
+
const t = e.target;
|
|
1357
|
+
s(t.checked);
|
|
1358
|
+
}, Et = (s) => (e) => {
|
|
1359
|
+
e.preventDefault(), s();
|
|
1360
|
+
}, Dt = (s) => (e) => {
|
|
1361
|
+
e.stopPropagation(), s();
|
|
1362
|
+
}, Ot = (s) => (e) => {
|
|
1363
|
+
e.stopImmediatePropagation(), s();
|
|
1364
|
+
}, At = (s, e = "input") => m(
|
|
1365
|
+
D.valueAsDate(s),
|
|
1366
|
+
R[e](Ze(s.set))
|
|
1367
|
+
), Mt = (s, e = "input") => m(
|
|
1368
|
+
D.valueAsDate(s),
|
|
1369
|
+
R[e](Ke(s.set))
|
|
1370
|
+
), bt = (s, e = "input") => m(
|
|
1371
|
+
D.valueAsNumber(s),
|
|
1372
|
+
R[e](Ye(s.set))
|
|
1373
|
+
), kt = (s, e = "input") => m(D.value(s), R[e](Xe(s.set))), Lt = (s) => m(D.checked(s), Qe(s.set)), j = (s, e) => {
|
|
1374
|
+
if (d.is(s))
|
|
1375
|
+
return (r) => {
|
|
1376
|
+
const n = r.makeRef();
|
|
1377
|
+
let o, l;
|
|
1378
|
+
const c = s.map((h) => Object.keys(h)[0]);
|
|
1379
|
+
let a;
|
|
1380
|
+
const f = c.on((h) => {
|
|
1381
|
+
if (h !== a) {
|
|
1382
|
+
l == null || l.dispose(), o == null || o(!0), l = s.map((O) => O[h]);
|
|
1383
|
+
const S = e[h](l);
|
|
1384
|
+
o = u(S)(n), a = h;
|
|
1197
1385
|
}
|
|
1198
1386
|
});
|
|
1199
|
-
return (
|
|
1200
|
-
|
|
1387
|
+
return (h) => {
|
|
1388
|
+
f(), n.clear(h), o == null || o(h);
|
|
1201
1389
|
};
|
|
1202
1390
|
};
|
|
1203
|
-
const
|
|
1204
|
-
return
|
|
1205
|
-
},
|
|
1206
|
-
|
|
1391
|
+
const t = Object.keys(s)[0];
|
|
1392
|
+
return u(e[t](V(s[t])));
|
|
1393
|
+
}, ye = (s, e, t) => j(
|
|
1394
|
+
p.map(s, (r) => ({ [r[e]]: r })),
|
|
1207
1395
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1208
|
-
|
|
1209
|
-
),
|
|
1210
|
-
const
|
|
1211
|
-
return j(
|
|
1212
|
-
},
|
|
1213
|
-
|
|
1396
|
+
t
|
|
1397
|
+
), $t = (s, e) => ye(s, "kind", e), Nt = (s, e) => {
|
|
1398
|
+
const t = p.map(s, ([r, n]) => ({ [r]: n }));
|
|
1399
|
+
return j(t, e);
|
|
1400
|
+
}, Ht = (s, e) => ye(s, "type", e), et = (s, e) => j(
|
|
1401
|
+
p.map(s, (t) => ({ [t]: !0 })),
|
|
1214
1402
|
e
|
|
1215
|
-
),
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1218
|
-
|
|
1403
|
+
), It = (s, e = {}) => (t) => {
|
|
1404
|
+
const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
|
|
1405
|
+
return et(
|
|
1406
|
+
t.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
1219
1407
|
{
|
|
1220
|
-
first: () =>
|
|
1408
|
+
first: () => r,
|
|
1221
1409
|
last: () => n,
|
|
1222
|
-
other: () =>
|
|
1410
|
+
other: () => s
|
|
1223
1411
|
}
|
|
1224
1412
|
);
|
|
1225
|
-
},
|
|
1226
|
-
const
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
throw new Error(`No provider found for mark: ${o.description}`);
|
|
1230
|
-
return n[o] = i, n;
|
|
1413
|
+
}, we = (s, e) => (t) => {
|
|
1414
|
+
const r = Object.values(s).reduce((n, o) => {
|
|
1415
|
+
const l = t.getProvider(o);
|
|
1416
|
+
return n[o] = l, n;
|
|
1231
1417
|
}, {});
|
|
1232
|
-
return
|
|
1233
|
-
},
|
|
1234
|
-
const
|
|
1235
|
-
(o, [
|
|
1236
|
-
|
|
1418
|
+
return u(e(r))(t);
|
|
1419
|
+
}, Vt = (s, e) => (t) => {
|
|
1420
|
+
const r = [], n = Object.entries(s).reduce(
|
|
1421
|
+
(o, [l, c]) => (r.push(
|
|
1422
|
+
c((a) => (Reflect.set(o, l, a), null))(t)
|
|
1237
1423
|
), o),
|
|
1238
1424
|
{}
|
|
1239
1425
|
);
|
|
1240
|
-
return
|
|
1241
|
-
|
|
1426
|
+
return r.push(e(n)(t)), (o) => {
|
|
1427
|
+
r.forEach((l) => l(o));
|
|
1242
1428
|
};
|
|
1243
|
-
},
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1429
|
+
}, Rt = (s, e) => we([s], (t) => u(e(t[s]))), jt = (s, e) => we(s, (t) => u(e(t))), qt = (s) => (e) => s(e) ?? (() => {
|
|
1430
|
+
}), Bt = (s) => (e) => (e.appendOrInsert(s), (t) => {
|
|
1431
|
+
t && F(s);
|
|
1432
|
+
}), tt = (s, e, t) => {
|
|
1433
|
+
if (d.is(s)) {
|
|
1434
|
+
const r = s;
|
|
1248
1435
|
return (n) => {
|
|
1249
|
-
|
|
1250
|
-
let
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1436
|
+
const o = n.makeRef();
|
|
1437
|
+
let l = null, c = !1;
|
|
1438
|
+
const a = H(null), f = r.on((h) => {
|
|
1439
|
+
h == null ? (l == null || l(!0), l = u((t == null ? void 0 : t()) ?? v)(o), c = !1) : (a.value = h, c || (l == null || l(!0), l = u(e(a))(
|
|
1440
|
+
o
|
|
1441
|
+
), c = !0));
|
|
1253
1442
|
});
|
|
1254
|
-
return (
|
|
1255
|
-
|
|
1443
|
+
return (h) => {
|
|
1444
|
+
f(), l == null || l(h), o.clear(h);
|
|
1256
1445
|
};
|
|
1257
1446
|
};
|
|
1258
1447
|
} else {
|
|
1259
|
-
const
|
|
1260
|
-
if (
|
|
1261
|
-
const n =
|
|
1262
|
-
return n != null ?
|
|
1448
|
+
const r = s;
|
|
1449
|
+
if (r == null) {
|
|
1450
|
+
const n = t == null ? void 0 : t();
|
|
1451
|
+
return n != null ? u(n) : v;
|
|
1263
1452
|
}
|
|
1264
|
-
return
|
|
1453
|
+
return u(e(V(r)));
|
|
1265
1454
|
}
|
|
1266
|
-
},
|
|
1267
|
-
|
|
1455
|
+
}, U = (s) => (e) => (t) => s(t, e), _e = (s, e, t) => ve(
|
|
1456
|
+
s,
|
|
1268
1457
|
() => e,
|
|
1269
|
-
() =>
|
|
1270
|
-
),
|
|
1271
|
-
|
|
1458
|
+
() => t
|
|
1459
|
+
), ve = (s, e, t) => tt(
|
|
1460
|
+
p.map(s, (r) => r ? !0 : null),
|
|
1272
1461
|
e,
|
|
1273
|
-
|
|
1274
|
-
),
|
|
1275
|
-
|
|
1462
|
+
t ?? void 0
|
|
1463
|
+
), Ft = (s, e, t) => st(
|
|
1464
|
+
s,
|
|
1276
1465
|
() => e,
|
|
1277
|
-
() =>
|
|
1278
|
-
),
|
|
1279
|
-
|
|
1466
|
+
() => t
|
|
1467
|
+
), st = (s, e, t) => ve(
|
|
1468
|
+
p.map(s, (r) => !r),
|
|
1280
1469
|
e,
|
|
1281
|
-
|
|
1282
|
-
),
|
|
1283
|
-
const n = new
|
|
1284
|
-
|
|
1285
|
-
|
|
1470
|
+
t
|
|
1471
|
+
), Se = (s, e, t) => t != null ? Se(s, (r) => {
|
|
1472
|
+
const n = new M(
|
|
1473
|
+
r.index,
|
|
1474
|
+
r.total.map((o) => o - 1)
|
|
1286
1475
|
);
|
|
1287
|
-
return
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1476
|
+
return m(
|
|
1477
|
+
U(n.dispose),
|
|
1478
|
+
u(e(r)),
|
|
1479
|
+
_e(r.isLast, v, t(n))
|
|
1291
1480
|
);
|
|
1292
|
-
}) :
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
o[a] = f(s);
|
|
1481
|
+
}) : d.is(s) ? (r) => {
|
|
1482
|
+
const n = r.makeRef(), o = Array.from(
|
|
1483
|
+
{ length: s.value },
|
|
1484
|
+
(a, f) => f
|
|
1485
|
+
).map((a) => new M(a, s)), l = o.map(
|
|
1486
|
+
(a) => u(e(a))(n)
|
|
1487
|
+
), c = s.on((a) => {
|
|
1488
|
+
for (; a < l.length; )
|
|
1489
|
+
o.pop().dispose(), l.pop()(!0);
|
|
1490
|
+
for (let f = 0; f < a; f++)
|
|
1491
|
+
if (o[f] == null) {
|
|
1492
|
+
o[f] = new M(f, s);
|
|
1493
|
+
const h = u(e(o[f]));
|
|
1494
|
+
l[f] = h(n);
|
|
1307
1495
|
}
|
|
1308
1496
|
});
|
|
1309
|
-
return (
|
|
1310
|
-
|
|
1497
|
+
return (a) => {
|
|
1498
|
+
c(), n.clear(a);
|
|
1311
1499
|
};
|
|
1312
|
-
} :
|
|
1313
|
-
...Array.from({ length:
|
|
1314
|
-
(
|
|
1500
|
+
} : m(
|
|
1501
|
+
...Array.from({ length: s }, (r, n) => n).map(
|
|
1502
|
+
(r) => u(e(new M(r, V(s))))
|
|
1315
1503
|
)
|
|
1316
|
-
),
|
|
1317
|
-
if (
|
|
1318
|
-
return
|
|
1319
|
-
const o = new
|
|
1504
|
+
), rt = (s, e, t) => {
|
|
1505
|
+
if (t != null)
|
|
1506
|
+
return rt(s, (r, n) => {
|
|
1507
|
+
const o = new M(
|
|
1320
1508
|
n.index,
|
|
1321
|
-
n.total.map((
|
|
1509
|
+
n.total.map((l) => l - 1)
|
|
1322
1510
|
);
|
|
1323
|
-
return
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1511
|
+
return m([
|
|
1512
|
+
U(o.dispose),
|
|
1513
|
+
u(e(r, n)),
|
|
1514
|
+
_e(n.isLast, v, t(o))
|
|
1327
1515
|
]);
|
|
1328
1516
|
});
|
|
1329
1517
|
{
|
|
1330
|
-
const
|
|
1331
|
-
return
|
|
1332
|
-
const
|
|
1333
|
-
return
|
|
1334
|
-
|
|
1335
|
-
|
|
1518
|
+
const r = p.map(s, (o) => o.length), n = p.toSignal(s);
|
|
1519
|
+
return Se(r, (o) => {
|
|
1520
|
+
const l = n.map((c) => c[o.index]);
|
|
1521
|
+
return m(
|
|
1522
|
+
U(l.dispose),
|
|
1523
|
+
u(e(l, o))
|
|
1336
1524
|
);
|
|
1337
1525
|
});
|
|
1338
1526
|
}
|
|
1339
|
-
},
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1527
|
+
}, nt = (s) => (e) => e.isBrowserDOM() ? s(e) ?? (() => {
|
|
1528
|
+
}) : () => {
|
|
1529
|
+
}, Ut = (s) => (e) => e.isHeadlessDOM() ? s(e) ?? (() => {
|
|
1530
|
+
}) : () => {
|
|
1531
|
+
}, Wt = (s) => nt((e) => s(e.element) ?? (() => {
|
|
1532
|
+
})), zt = (s, e) => {
|
|
1533
|
+
if (d.is(s)) {
|
|
1534
|
+
const t = s;
|
|
1535
|
+
return (r) => {
|
|
1536
|
+
r = r.makeRef();
|
|
1537
|
+
const n = t.map((c) => u(e(c)));
|
|
1345
1538
|
let o = () => {
|
|
1346
1539
|
};
|
|
1347
|
-
const
|
|
1348
|
-
o(!0), o =
|
|
1540
|
+
const l = n.on((c) => {
|
|
1541
|
+
o(!0), o = c(r);
|
|
1349
1542
|
});
|
|
1350
|
-
return (
|
|
1351
|
-
|
|
1543
|
+
return (c) => {
|
|
1544
|
+
l(), o(c);
|
|
1352
1545
|
};
|
|
1353
1546
|
};
|
|
1354
1547
|
}
|
|
1355
|
-
return
|
|
1356
|
-
},
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
(
|
|
1548
|
+
return u(e(s));
|
|
1549
|
+
}, Gt = (s, e, t = () => v) => j(
|
|
1550
|
+
p.map(
|
|
1551
|
+
s,
|
|
1552
|
+
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
1360
1553
|
),
|
|
1361
1554
|
{
|
|
1362
|
-
notEmpty: (
|
|
1363
|
-
whenEmpty: () =>
|
|
1555
|
+
notEmpty: (r) => e(r),
|
|
1556
|
+
whenEmpty: () => t()
|
|
1364
1557
|
}
|
|
1365
|
-
),
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
const n = typeof e == "string" ? (r ?? document).querySelector(e) : e;
|
|
1558
|
+
), z = (s, e) => {
|
|
1559
|
+
const t = s(e);
|
|
1560
|
+
return () => t(!0);
|
|
1561
|
+
}, Jt = (s, e, { doc: t, clear: r } = {}) => {
|
|
1562
|
+
const n = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
1371
1563
|
if (n === null)
|
|
1372
|
-
throw new
|
|
1564
|
+
throw new it(
|
|
1373
1565
|
`Cannot find element by selector for render: ${e}`
|
|
1374
1566
|
);
|
|
1375
|
-
|
|
1376
|
-
const o =
|
|
1377
|
-
return
|
|
1567
|
+
r !== !1 && (t ?? n.ownerDocument) != null && n.nodeType === 1 && (n.innerHTML = "");
|
|
1568
|
+
const o = Ie(n), l = oe(n) ? void 0 : n, c = P.of(o, l);
|
|
1569
|
+
return z(s, c);
|
|
1570
|
+
}, Qt = (s, {
|
|
1571
|
+
startUrl: e = "https://example.com",
|
|
1572
|
+
selector: t = ":root"
|
|
1573
|
+
} = {}) => {
|
|
1574
|
+
const r = p.toSignal(e).deriveProp(), n = new ue(t, void 0), o = new E(n, void 0, { currentURL: r }, {});
|
|
1575
|
+
return {
|
|
1576
|
+
clear: z(s(), o),
|
|
1577
|
+
root: n,
|
|
1578
|
+
currentURL: r
|
|
1579
|
+
};
|
|
1378
1580
|
};
|
|
1379
|
-
class
|
|
1581
|
+
class it extends Error {
|
|
1380
1582
|
constructor(e) {
|
|
1381
1583
|
super(e);
|
|
1382
1584
|
}
|
|
1383
1585
|
}
|
|
1384
|
-
const
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
);
|
|
1392
|
-
}, hr = (t) => Symbol(t), ke = (t, e) => (r) => c(e)(r.withProviders(t)), dr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, pr = (t, e, r) => ke({ [t]: e }, c(r)), mr = (t, e) => ke(t, c(e)), wt = (t, e) => (r) => {
|
|
1393
|
-
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1394
|
-
return s.style.setProperty(t, e), (o) => {
|
|
1395
|
-
o && s.style.setProperty(t, n);
|
|
1586
|
+
const Xt = (s, e) => (t) => {
|
|
1587
|
+
const r = t.makePortal(s);
|
|
1588
|
+
return z(u(e), r);
|
|
1589
|
+
}, Yt = (s) => Symbol(s), Ce = (s, e) => (t) => u(e)(t.withProviders(s)), Zt = (...s) => s.length > 0 ? s.reduceRight((e, t) => (r) => e(t(r))) : u, Kt = (s, e, t) => Ce({ [s]: e }, u(t)), es = (s, e) => Ce(s, u(e)), ot = (s, e) => (t) => {
|
|
1590
|
+
const r = t.getStyle(s);
|
|
1591
|
+
return t.setStyle(s, e), (n) => {
|
|
1592
|
+
n && t.setStyle(s, r);
|
|
1396
1593
|
};
|
|
1397
|
-
},
|
|
1398
|
-
const
|
|
1399
|
-
return e.on((
|
|
1400
|
-
|
|
1594
|
+
}, lt = (s, e) => (t) => {
|
|
1595
|
+
const r = t.getStyle(s);
|
|
1596
|
+
return e.on((n) => t.setStyle(s, n)), (n) => {
|
|
1597
|
+
n && t.setStyle(s, r);
|
|
1401
1598
|
};
|
|
1402
|
-
},
|
|
1599
|
+
}, ts = new Proxy(
|
|
1403
1600
|
{},
|
|
1404
1601
|
{
|
|
1405
1602
|
/**
|
|
@@ -1410,118 +1607,112 @@ const fr = (t, e) => (r) => {
|
|
|
1410
1607
|
* @returns The renderable component for the specified attribute.
|
|
1411
1608
|
*
|
|
1412
1609
|
*/
|
|
1413
|
-
get: (
|
|
1610
|
+
get: (s, e) => (t) => d.is(t) ? lt(e, t) : ot(e, t)
|
|
1414
1611
|
}
|
|
1415
1612
|
);
|
|
1416
1613
|
export {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1614
|
+
Tt as Async,
|
|
1615
|
+
Lt as BindChecked,
|
|
1616
|
+
At as BindDate,
|
|
1617
|
+
Mt as BindDateTime,
|
|
1618
|
+
bt as BindNumber,
|
|
1619
|
+
kt as BindText,
|
|
1620
|
+
P as BrowserContext,
|
|
1621
|
+
T as Computed,
|
|
1622
|
+
It as Conjunction,
|
|
1623
|
+
Bt as DOMNode,
|
|
1624
|
+
de as El,
|
|
1625
|
+
pe as ElNS,
|
|
1626
|
+
M as ElementPosition,
|
|
1627
|
+
v as Empty,
|
|
1628
|
+
tt as Ensure,
|
|
1629
|
+
rt as ForEach,
|
|
1630
|
+
m as Fragment,
|
|
1631
|
+
E as HeadlessContext,
|
|
1632
|
+
qe as HeadlessElement,
|
|
1633
|
+
ue as HeadlessPortal,
|
|
1634
|
+
Be as HeadlessText,
|
|
1635
|
+
st as LazyUnless,
|
|
1636
|
+
ve as LazyWhen,
|
|
1637
|
+
zt as MapSignal,
|
|
1638
|
+
ee as MemoryStore,
|
|
1639
|
+
Gt as NotEmpty,
|
|
1640
|
+
nt as OnBrowserCtx,
|
|
1641
|
+
Qe as OnChecked,
|
|
1642
|
+
qt as OnCtx,
|
|
1643
|
+
U as OnDispose,
|
|
1644
|
+
Wt as OnElement,
|
|
1645
|
+
Ut as OnHeadlessCtx,
|
|
1443
1646
|
j as OneOf,
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
ae as _makeSetter,
|
|
1473
|
-
_e as _maybeAddAttributeTracker,
|
|
1474
|
-
ye as _maybeAddClassTracker,
|
|
1475
|
-
Se as _maybeAddTextTracker,
|
|
1476
|
-
m as _removeDOMNode,
|
|
1477
|
-
Xe as _setAttribute,
|
|
1478
|
-
Je as _setBooleanProperty,
|
|
1479
|
-
He as _setDateProperty,
|
|
1480
|
-
We as _setNumberProperty,
|
|
1481
|
-
ze as _setStringProperty,
|
|
1482
|
-
de as _signalText,
|
|
1647
|
+
ye as OneOfField,
|
|
1648
|
+
$t as OneOfKind,
|
|
1649
|
+
Nt as OneOfTuple,
|
|
1650
|
+
Ht as OneOfType,
|
|
1651
|
+
et as OneOfValue,
|
|
1652
|
+
Xt as Portal,
|
|
1653
|
+
N as Prop,
|
|
1654
|
+
Zt as Provide,
|
|
1655
|
+
le as ProviderNotFoundError,
|
|
1656
|
+
it as RenderingError,
|
|
1657
|
+
Se as Repeat,
|
|
1658
|
+
d as Signal,
|
|
1659
|
+
ge as Task,
|
|
1660
|
+
gt as TextNode,
|
|
1661
|
+
Ft as Unless,
|
|
1662
|
+
Vt as Use,
|
|
1663
|
+
Rt as UseProvider,
|
|
1664
|
+
jt as UseProviders,
|
|
1665
|
+
p as Value,
|
|
1666
|
+
_e as When,
|
|
1667
|
+
Kt as WithProvider,
|
|
1668
|
+
es as WithProviders,
|
|
1669
|
+
Ie as _getSelfOrParentElement,
|
|
1670
|
+
oe as _isElement,
|
|
1671
|
+
He as _makeGetter,
|
|
1672
|
+
Ne as _makeSetter,
|
|
1673
|
+
F as _removeDOMNode,
|
|
1674
|
+
fe as _signalText,
|
|
1483
1675
|
he as _staticText,
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
Rt as svgAttr
|
|
1676
|
+
dt as animateSignal,
|
|
1677
|
+
$e as animateSignals,
|
|
1678
|
+
yt as aria,
|
|
1679
|
+
D as attr,
|
|
1680
|
+
mt as dataAttr,
|
|
1681
|
+
Pt as emitChecked,
|
|
1682
|
+
Et as emitPreventDefault,
|
|
1683
|
+
Ot as emitStopImmediatePropagation,
|
|
1684
|
+
Dt as emitStopPropagation,
|
|
1685
|
+
Xe as emitValue,
|
|
1686
|
+
Ze as emitValueAsDate,
|
|
1687
|
+
Ke as emitValueAsDateTime,
|
|
1688
|
+
Ye as emitValueAsNumber,
|
|
1689
|
+
Me as endInterpolate,
|
|
1690
|
+
K as getWindow,
|
|
1691
|
+
be as guessInterpolate,
|
|
1692
|
+
vt as html,
|
|
1693
|
+
St as input,
|
|
1694
|
+
Ae as interpolateDate,
|
|
1695
|
+
De as interpolateNumber,
|
|
1696
|
+
Oe as interpolateString,
|
|
1697
|
+
ht as localStorageProp,
|
|
1698
|
+
W as makeComputed,
|
|
1699
|
+
at as makeComputedOf,
|
|
1700
|
+
pt as makeComputedRecord,
|
|
1701
|
+
Le as makeEffect,
|
|
1702
|
+
ut as makeEffectOf,
|
|
1703
|
+
H as makeProp,
|
|
1704
|
+
Yt as makeProviderMark,
|
|
1705
|
+
V as makeSignal,
|
|
1706
|
+
xt as math,
|
|
1707
|
+
_t as mathAttr,
|
|
1708
|
+
R as on,
|
|
1709
|
+
Jt as render,
|
|
1710
|
+
z as renderWithContext,
|
|
1711
|
+
u as renderableOfTNode,
|
|
1712
|
+
Qt as runHeadless,
|
|
1713
|
+
ft as sessionStorageProp,
|
|
1714
|
+
te as storedProp,
|
|
1715
|
+
ts as style,
|
|
1716
|
+
Ct as svg,
|
|
1717
|
+
wt as svgAttr
|
|
1527
1718
|
};
|