@tempots/dom 16.0.0 → 18.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 +7 -7
- package/dom/dom-context.d.ts +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +485 -606
- package/package.json +1 -1
- package/renderable/attribute.d.ts +7 -5
- package/renderable/domnode.d.ts +3 -0
- package/renderable/handler.d.ts +3 -0
- package/renderable/style.d.ts +1 -2
- package/renderable/text.d.ts +2 -2
- package/std/signal-utils.d.ts +50 -0
- package/std/signal.d.ts +9 -66
- package/types/domain.d.ts +7 -1
- package/renderable/domel.d.ts +0 -3
package/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var Oe = (t, e, r) => e in t ? Me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var l = (t, e, r) => Oe(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
function Ie(t, e, r) {
|
|
5
5
|
return t + (e - t) * r;
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const z = 97;
|
|
8
|
+
function $e(t, e, r) {
|
|
9
9
|
const n = Math.max(t.length, e.length);
|
|
10
10
|
let s = "";
|
|
11
11
|
for (let i = 0; i < n; i++) {
|
|
12
12
|
let o = t.charCodeAt(i);
|
|
13
|
-
isNaN(o) && (o =
|
|
14
|
-
let
|
|
15
|
-
isNaN(
|
|
13
|
+
isNaN(o) && (o = z);
|
|
14
|
+
let a = e.charCodeAt(i);
|
|
15
|
+
isNaN(a) && (a = z), s += String.fromCharCode(o + (a - o) * r);
|
|
16
16
|
}
|
|
17
17
|
return s;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Fe(t, e, r) {
|
|
20
20
|
return new Date(t.getTime() + (e.getTime() - t.getTime()) * r);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function qe(t, e, r) {
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return typeof t == "number" ?
|
|
25
|
+
function Ve(t) {
|
|
26
|
+
return typeof t == "number" ? Ie : typeof t == "string" ? $e : t instanceof Date ? Fe : qe;
|
|
27
27
|
}
|
|
28
28
|
class Ue {
|
|
29
29
|
constructor(e, r) {
|
|
@@ -42,34 +42,34 @@ class Ue {
|
|
|
42
42
|
return this.index % 2 === 1;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
const
|
|
45
|
+
const K = "$__signal__", Q = "$__prop__", Y = "$__computed__";
|
|
46
|
+
var x;
|
|
47
|
+
x = K;
|
|
48
|
+
const w = class w {
|
|
49
49
|
constructor(e, r) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
l(this, x, !0);
|
|
51
|
+
l(this, "_value");
|
|
52
|
+
l(this, "_derivatives", []);
|
|
53
|
+
l(this, "_onValueListeners", []);
|
|
54
|
+
l(this, "_onDisposeListeners", []);
|
|
55
|
+
l(this, "get", () => this._value);
|
|
56
|
+
l(this, "hasListeners", () => this._onValueListeners.length > 0);
|
|
57
|
+
l(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
|
|
58
58
|
this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
|
|
59
59
|
}));
|
|
60
|
-
|
|
60
|
+
l(this, "_setAndNotify", (e, r) => {
|
|
61
61
|
const n = this.equals(this._value, e);
|
|
62
62
|
n || (this._value = e), (r || !n) && this._onValueListeners.forEach((s) => s(e));
|
|
63
63
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
l(this, "_disposed", !1);
|
|
65
|
+
l(this, "isDisposed", () => this._disposed);
|
|
66
|
+
l(this, "onDispose", (e) => {
|
|
67
67
|
this._onDisposeListeners.push(e);
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
l(this, "dispose", () => {
|
|
70
70
|
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
71
71
|
});
|
|
72
|
-
|
|
72
|
+
l(this, "map", (e, r = (n, s) => n === s) => {
|
|
73
73
|
const n = new E(() => {
|
|
74
74
|
try {
|
|
75
75
|
return e(this.get());
|
|
@@ -79,7 +79,7 @@ const _ = class _ {
|
|
|
79
79
|
}, r);
|
|
80
80
|
return this.setDerivative(n), n;
|
|
81
81
|
});
|
|
82
|
-
|
|
82
|
+
l(this, "flatMap", (e, r = (n, s) => n === s) => {
|
|
83
83
|
const n = new E(() => {
|
|
84
84
|
try {
|
|
85
85
|
return e(this.get()).get();
|
|
@@ -89,12 +89,12 @@ const _ = class _ {
|
|
|
89
89
|
}, r);
|
|
90
90
|
return this.setDerivative(n), n;
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
l(this, "tap", (e) => this.map((r) => (e(r), r)));
|
|
93
|
+
l(this, "at", (e) => this.map((r) => r[e]));
|
|
94
|
+
l(this, "$", new Proxy(this, {
|
|
95
95
|
get: (e, r) => this.at(r)
|
|
96
96
|
}));
|
|
97
|
-
|
|
97
|
+
l(this, "filter", (e, r) => {
|
|
98
98
|
let n = r ?? this.get();
|
|
99
99
|
const s = new E(() => {
|
|
100
100
|
try {
|
|
@@ -106,50 +106,50 @@ const _ = class _ {
|
|
|
106
106
|
}, this.equals);
|
|
107
107
|
return this.setDerivative(s), s;
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
l(this, "filterMap", (e, r, n = (s, i) => s === i) => {
|
|
110
110
|
let s = r;
|
|
111
111
|
const i = new E(() => {
|
|
112
112
|
try {
|
|
113
|
-
const o = this.get(),
|
|
114
|
-
return s =
|
|
113
|
+
const o = this.get(), a = e(o);
|
|
114
|
+
return s = a ?? s;
|
|
115
115
|
} catch (o) {
|
|
116
116
|
throw console.error("Error in Signal.filterMap:", o), o;
|
|
117
117
|
}
|
|
118
118
|
}, n);
|
|
119
119
|
return this.setDerivative(i), i;
|
|
120
120
|
});
|
|
121
|
-
|
|
122
|
-
const i =
|
|
121
|
+
l(this, "mapAsync", (e, r, n, s = (i, o) => i === o) => {
|
|
122
|
+
const i = L(r, s);
|
|
123
123
|
let o = 0;
|
|
124
124
|
return i.onDispose(
|
|
125
|
-
this.on((
|
|
125
|
+
this.on((a) => {
|
|
126
126
|
const u = ++o;
|
|
127
127
|
try {
|
|
128
|
-
e(
|
|
129
|
-
u === o && i.set(
|
|
130
|
-
}).catch((
|
|
131
|
-
u === o && (n != null ? i.set(n(
|
|
128
|
+
e(a).then((f) => {
|
|
129
|
+
u === o && i.set(f);
|
|
130
|
+
}).catch((f) => {
|
|
131
|
+
u === o && (n != null ? i.set(n(f)) : console.error(
|
|
132
132
|
"Unhandled promise rejection in Signal.mapAsync:",
|
|
133
|
-
|
|
133
|
+
f
|
|
134
134
|
));
|
|
135
135
|
});
|
|
136
|
-
} catch (
|
|
137
|
-
throw console.error("Error in Signal.mapAsync:",
|
|
136
|
+
} catch (f) {
|
|
137
|
+
throw console.error("Error in Signal.mapAsync:", f), f;
|
|
138
138
|
}
|
|
139
139
|
})
|
|
140
140
|
), i;
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
l(this, "mapMaybe", (e, r) => this.map((n) => e(n) ?? r));
|
|
143
|
+
l(this, "feedProp", (e, r = !1) => {
|
|
144
144
|
const n = this.on(e.set);
|
|
145
145
|
return e.onDispose(n), r ? this.onDispose(e.dispose) : this.onDispose(n), e;
|
|
146
146
|
});
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
l(this, "deriveProp", (e = !0) => this.feedProp(L(this.get()), e));
|
|
148
|
+
l(this, "count", () => {
|
|
149
149
|
let e = 0;
|
|
150
150
|
return this.map(() => ++e);
|
|
151
151
|
});
|
|
152
|
-
|
|
152
|
+
l(this, "setDerivative", (e) => {
|
|
153
153
|
this._derivatives.push(e), e.onDispose(() => {
|
|
154
154
|
this._derivatives.splice(
|
|
155
155
|
this._derivatives.indexOf(e),
|
|
@@ -160,7 +160,7 @@ const _ = class _ {
|
|
|
160
160
|
this.equals = r, this._value = e;
|
|
161
161
|
}
|
|
162
162
|
static ofPromise(e, r, n, s = (i, o) => i === o) {
|
|
163
|
-
const i = new
|
|
163
|
+
const i = new w(r, s);
|
|
164
164
|
return e.then((o) => i._setAndNotify(o, !1)).catch((o) => {
|
|
165
165
|
n != null ? i._setAndNotify(n(o), !1) : console.error(
|
|
166
166
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
@@ -169,70 +169,72 @@ const _ = class _ {
|
|
|
169
169
|
}), i;
|
|
170
170
|
}
|
|
171
171
|
static is(e) {
|
|
172
|
-
return e != null && e[
|
|
172
|
+
return e != null && e[K] === !0;
|
|
173
173
|
}
|
|
174
174
|
static wrap(e, r = (n, s) => n === s) {
|
|
175
|
-
return
|
|
175
|
+
return w.is(e) ? e : new w(e, r);
|
|
176
176
|
}
|
|
177
177
|
static maybeWrap(e) {
|
|
178
|
-
return e == null ? e :
|
|
178
|
+
return e == null ? e : w.wrap(e);
|
|
179
179
|
}
|
|
180
180
|
static unwrap(e) {
|
|
181
|
-
return
|
|
181
|
+
return w.is(e) ? e.get() : e;
|
|
182
182
|
}
|
|
183
183
|
static map(e, r) {
|
|
184
|
-
return
|
|
184
|
+
return w.is(e) ? e.map(r) : r(e);
|
|
185
185
|
}
|
|
186
186
|
get value() {
|
|
187
187
|
return this._value;
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
|
-
let h =
|
|
191
|
-
const
|
|
192
|
-
var
|
|
193
|
-
class E extends (
|
|
190
|
+
let h = w;
|
|
191
|
+
const je = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
192
|
+
var ee, te;
|
|
193
|
+
class E extends (te = h, ee = Y, te) {
|
|
194
194
|
constructor(r, n) {
|
|
195
195
|
super(void 0, n);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
l(this, ee, !0);
|
|
197
|
+
l(this, "_isDirty", !1);
|
|
198
|
+
l(this, "setDirty", () => {
|
|
199
199
|
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((r) => r.setDirty()), this.scheduleNotify());
|
|
200
200
|
});
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
l(this, "_scheduleCount", 0);
|
|
202
|
+
l(this, "scheduleNotify", () => {
|
|
203
203
|
const r = ++this._scheduleCount;
|
|
204
|
-
|
|
204
|
+
je(() => {
|
|
205
205
|
this._scheduleCount !== r || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
206
206
|
});
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
/** {@inheritDoc Signal.get} */
|
|
209
|
+
l(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
|
|
209
210
|
this._fn = r, this.setDirty();
|
|
210
211
|
}
|
|
211
212
|
static is(r) {
|
|
212
|
-
return r != null && r[
|
|
213
|
+
return r != null && r[Y] === !0;
|
|
213
214
|
}
|
|
215
|
+
/** {@inheritDoc Signal.value} */
|
|
214
216
|
get value() {
|
|
215
217
|
return this.get();
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
|
-
var
|
|
219
|
-
class
|
|
220
|
+
var re, ne;
|
|
221
|
+
class F extends (ne = h, re = Q, ne) {
|
|
220
222
|
constructor() {
|
|
221
223
|
super(...arguments);
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
l(this, re, !0);
|
|
225
|
+
l(this, "set", (r) => {
|
|
224
226
|
this._setAndNotify(r, !1);
|
|
225
227
|
});
|
|
226
|
-
|
|
228
|
+
l(this, "update", (r) => {
|
|
227
229
|
this._setAndNotify(r(this.get()), !1);
|
|
228
230
|
});
|
|
229
|
-
|
|
231
|
+
l(this, "reducer", (r, ...n) => {
|
|
230
232
|
const s = this;
|
|
231
233
|
return function i(o) {
|
|
232
|
-
const
|
|
233
|
-
s.update((u) => r(u, o)), !s.equals(
|
|
234
|
+
const a = s.value;
|
|
235
|
+
s.update((u) => r(u, o)), !s.equals(a, s.value) && n.forEach(
|
|
234
236
|
(u) => u({
|
|
235
|
-
previousState:
|
|
237
|
+
previousState: a,
|
|
236
238
|
state: s.value,
|
|
237
239
|
action: o,
|
|
238
240
|
dispatch: i
|
|
@@ -240,11 +242,11 @@ class q extends (ae = h, ue = Q, ae) {
|
|
|
240
242
|
);
|
|
241
243
|
};
|
|
242
244
|
});
|
|
243
|
-
|
|
244
|
-
const i = new
|
|
245
|
+
l(this, "iso", (r, n, s = (i, o) => i === o) => {
|
|
246
|
+
const i = new F(r(this.get()), s);
|
|
245
247
|
return i.onDispose(this.on((o) => i.set(r(o)))), i.on((o) => this._setAndNotify(n(o), !1)), i;
|
|
246
248
|
});
|
|
247
|
-
|
|
249
|
+
l(this, "atProp", (r) => this.iso(
|
|
248
250
|
(n) => n[r],
|
|
249
251
|
(n) => ({ ...this.value, [r]: n })
|
|
250
252
|
));
|
|
@@ -252,6 +254,7 @@ class q extends (ae = h, ue = Q, ae) {
|
|
|
252
254
|
static is(r) {
|
|
253
255
|
return r != null && r[Q] === !0;
|
|
254
256
|
}
|
|
257
|
+
/** {@inheritDoc Signal.get} */
|
|
255
258
|
get value() {
|
|
256
259
|
return this.get();
|
|
257
260
|
}
|
|
@@ -259,220 +262,101 @@ class q extends (ae = h, ue = Q, ae) {
|
|
|
259
262
|
this._setAndNotify(r, !1);
|
|
260
263
|
}
|
|
261
264
|
}
|
|
262
|
-
function
|
|
265
|
+
function H(t, e, r = (n, s) => n === s) {
|
|
263
266
|
const n = new E(t, r);
|
|
264
267
|
return e.forEach((s) => s.setDerivative(n)), n;
|
|
265
268
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
269
|
+
function At(t, e) {
|
|
270
|
+
return H(t, e).dispose;
|
|
268
271
|
}
|
|
269
|
-
function
|
|
270
|
-
return new
|
|
272
|
+
function L(t, e = (r, n) => r === n) {
|
|
273
|
+
return new F(t, e);
|
|
271
274
|
}
|
|
272
|
-
function
|
|
275
|
+
function Et(t, e = (r, n) => r === n) {
|
|
273
276
|
return new h(t, e);
|
|
274
277
|
}
|
|
275
|
-
class
|
|
278
|
+
class se {
|
|
276
279
|
constructor() {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
+
l(this, "_store", /* @__PURE__ */ new Map());
|
|
281
|
+
l(this, "getItem", (e) => this._store.get(e) ?? null);
|
|
282
|
+
l(this, "setItem", (e, r) => {
|
|
280
283
|
this._store.set(e, r);
|
|
281
284
|
});
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
|
-
function
|
|
287
|
+
function ie({
|
|
285
288
|
key: t,
|
|
286
289
|
defaultValue: e,
|
|
287
290
|
store: r,
|
|
288
291
|
serialize: n = JSON.stringify,
|
|
289
292
|
deserialize: s = JSON.parse,
|
|
290
|
-
equals: i = (
|
|
291
|
-
onLoad: o = (
|
|
293
|
+
equals: i = (a, u) => a === u,
|
|
294
|
+
onLoad: o = (a) => a
|
|
292
295
|
}) {
|
|
293
|
-
const
|
|
294
|
-
|
|
296
|
+
const a = r.getItem(t), u = new F(
|
|
297
|
+
a != null ? o(s(a)) : typeof e == "function" ? e() : e,
|
|
295
298
|
i
|
|
296
299
|
);
|
|
297
|
-
return u.on((
|
|
298
|
-
r.setItem(t, n(
|
|
300
|
+
return u.on((f) => {
|
|
301
|
+
r.setItem(t, n(f));
|
|
299
302
|
}), u;
|
|
300
303
|
}
|
|
301
|
-
function
|
|
302
|
-
return
|
|
304
|
+
function bt(t) {
|
|
305
|
+
return ie({
|
|
303
306
|
...t,
|
|
304
|
-
store: (window == null ? void 0 : window.localStorage) ?? new
|
|
307
|
+
store: (window == null ? void 0 : window.localStorage) ?? new se()
|
|
305
308
|
});
|
|
306
309
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
310
|
+
function Pt(t) {
|
|
311
|
+
return ie({
|
|
309
312
|
...t,
|
|
310
|
-
store: (window == null ? void 0 : window.sessionStorage) ?? new
|
|
313
|
+
store: (window == null ? void 0 : window.sessionStorage) ?? new se()
|
|
311
314
|
});
|
|
312
315
|
}
|
|
313
|
-
function
|
|
316
|
+
function Z(t) {
|
|
314
317
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
315
318
|
}
|
|
316
319
|
function Ge(t, e, r, n) {
|
|
317
|
-
const s = (n == null ? void 0 : n.duration) ?? 300, i = (n == null ? void 0 : n.easing) ?? ((
|
|
318
|
-
let
|
|
319
|
-
const
|
|
320
|
+
const s = (n == null ? void 0 : n.duration) ?? 300, i = (n == null ? void 0 : n.easing) ?? ((g) => g), o = (n == null ? void 0 : n.equals) ?? ((g, M) => g === M);
|
|
321
|
+
let a = n == null ? void 0 : n.interpolate, u = t, f = e(), m = performance.now(), _ = null, d = !0;
|
|
322
|
+
const P = new E(e, o), A = L(t, o);
|
|
320
323
|
A.onDispose(() => {
|
|
321
|
-
|
|
322
|
-
}), A.onDispose(
|
|
323
|
-
|
|
324
|
+
_ !== null && cancelAnimationFrame(_);
|
|
325
|
+
}), A.onDispose(P.dispose), r.forEach((g) => {
|
|
326
|
+
g.setDerivative(P), g.onDispose(A.dispose);
|
|
324
327
|
});
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
let
|
|
331
|
-
|
|
328
|
+
const Ce = (g) => {
|
|
329
|
+
f = g, m = performance.now(), u = A.value, d && (d = !1, _ = Z(B));
|
|
330
|
+
}, B = () => {
|
|
331
|
+
const M = (performance.now() - m) / h.unwrap(s), Re = i(M);
|
|
332
|
+
a == null && (a = Ve(u));
|
|
333
|
+
let X = a(u, f, Re);
|
|
334
|
+
M >= 1 ? (d = !0, X = f) : _ = Z(B), A.set(X);
|
|
332
335
|
};
|
|
333
|
-
return
|
|
336
|
+
return P.on(Ce), A;
|
|
334
337
|
}
|
|
335
|
-
function
|
|
338
|
+
function Dt(t, e) {
|
|
336
339
|
const { initialValue: r, ...n } = e ?? {};
|
|
337
|
-
return Ge(
|
|
340
|
+
return Ge(
|
|
341
|
+
r ?? t.get(),
|
|
342
|
+
t.get,
|
|
343
|
+
[t],
|
|
344
|
+
n
|
|
345
|
+
);
|
|
338
346
|
}
|
|
339
|
-
function
|
|
347
|
+
function Tt(t, e) {
|
|
340
348
|
const { signals: r, literals: n } = Object.entries(t).reduce(
|
|
341
|
-
({ signals: i, literals: o }, [
|
|
349
|
+
({ signals: i, literals: o }, [a, u]) => (h.is(u) ? i.push([a, u]) : o[a] = u, { signals: i, literals: o }),
|
|
342
350
|
{ signals: [], literals: {} }
|
|
343
351
|
), s = r.map(([, i]) => i);
|
|
344
|
-
return
|
|
345
|
-
}
|
|
346
|
-
function re(t) {
|
|
347
|
-
let e = t.match(/rgba?\((\d+), (\d+), (\d+)(, (\d+))?\)/);
|
|
348
|
-
return e != null ? [
|
|
349
|
-
Number(e[1]),
|
|
350
|
-
Number(e[2]),
|
|
351
|
-
Number(e[3]),
|
|
352
|
-
e[4] != null ? Number(e[5]) : 1,
|
|
353
|
-
"rgba"
|
|
354
|
-
] : (e = t.match(/#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/), e != null ? [
|
|
355
|
-
parseInt(e[1], 16),
|
|
356
|
-
parseInt(e[2], 16),
|
|
357
|
-
parseInt(e[3], 16),
|
|
358
|
-
1,
|
|
359
|
-
"hex"
|
|
360
|
-
] : (e = t.match(/hsla?\((\d+), (\d+)%?, (\d+)%?(, (\d+))?\)/), e != null ? [
|
|
361
|
-
Number(e[1]),
|
|
362
|
-
Number(e[2]),
|
|
363
|
-
Number(e[3]),
|
|
364
|
-
e[4] != null ? Number(e[5]) : 1,
|
|
365
|
-
"hsla"
|
|
366
|
-
] : [0, 0, 0, 1, "rgba"]));
|
|
367
|
-
}
|
|
368
|
-
function ne(t) {
|
|
369
|
-
const e = /^(inset\s)?(-?\d+)([a-zA-Z]*)(\s+)(-?\d+)([a-zA-Z]*)(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+)([a-zA-Z0-9(),.]+)$/i, r = t.match(e);
|
|
370
|
-
if (r == null)
|
|
371
|
-
return {
|
|
372
|
-
inset: !1,
|
|
373
|
-
x: 0,
|
|
374
|
-
y: 0,
|
|
375
|
-
blur: 0,
|
|
376
|
-
spread: 0,
|
|
377
|
-
color: "rgba(0, 0, 0, 0)"
|
|
378
|
-
};
|
|
379
|
-
const [, n, s, , , i, , o, , l, , u] = r, c = o != null ? parseInt(o, 10) : 0, p = l != null ? parseInt(l, 10) : 0;
|
|
380
|
-
return {
|
|
381
|
-
inset: !!n,
|
|
382
|
-
x: parseInt(s, 10),
|
|
383
|
-
y: parseInt(i, 10),
|
|
384
|
-
blur: c,
|
|
385
|
-
spread: p,
|
|
386
|
-
color: u
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
function ze(t) {
|
|
390
|
-
const { inset: e, x: r, y: n, blur: s, spread: i, color: o } = t;
|
|
391
|
-
return `${e ? "inset " : ""}${r}px ${n}px ${s}px ${i}px ${o}`;
|
|
352
|
+
return H(() => (r.forEach(([i, o]) => n[i] = o.value), e(n)), s);
|
|
392
353
|
}
|
|
393
|
-
|
|
394
|
-
return t[4] === "rgba" ? `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]})` : t[4] === "hex" ? `#${t[0].toString(16).padStart(2, "0")}${t[1].toString(16).padStart(2, "0")}${t[2].toString(16).padStart(2, "0")}` : t[4] === "hsla" ? `hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${t[3]})` : "";
|
|
395
|
-
}
|
|
396
|
-
function Je(t, e) {
|
|
397
|
-
const [r, n, s, i, o] = re(t), [l, u, c, p] = re(e);
|
|
398
|
-
return (m) => {
|
|
399
|
-
const d = r + (l - r) * m, y = n + (u - n) * m, A = s + (c - s) * m, Z = i + (p - i) * m;
|
|
400
|
-
return He([d, y, A, Z, o]);
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
function Wt(t, e) {
|
|
404
|
-
const r = ne(t), n = ne(e);
|
|
405
|
-
return (s) => {
|
|
406
|
-
const i = r.x + (n.x - r.x) * s, o = r.y + (n.y - r.y) * s, l = r.blur + (n.blur - r.blur) * s, u = r.spread + (n.spread - r.spread) * s, c = he(r.color, n.color)(s);
|
|
407
|
-
return ze({ inset: r.inset, x: i, y: o, blur: l, spread: u, color: c });
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function ke(t, e) {
|
|
411
|
-
var r, n, s, i, o, l, u, c;
|
|
412
|
-
return e === "translateX" ? new WebKitCSSMatrix(t.transform).m41 : e === "translateY" ? new WebKitCSSMatrix(t.transform).m42 : e === "translateZ" ? new WebKitCSSMatrix(t.transform).m43 : e === "rotateX" ? new WebKitCSSMatrix(t.transform).m12 : e === "rotateY" ? new WebKitCSSMatrix(t.transform).m21 : e === "rotateZ" ? new WebKitCSSMatrix(t.transform).m31 : e === "scaleX" ? new WebKitCSSMatrix(t.transform).m11 : e === "scaleY" ? new WebKitCSSMatrix(t.transform).m22 : e === "scaleZ" ? new WebKitCSSMatrix(t.transform).m33 : e === "skewX" ? new WebKitCSSMatrix(t.transform).m13 : e === "skewY" ? new WebKitCSSMatrix(t.transform).m23 : Number(e === "grayScale" ? (r = t.filter.match(/grayscale\((\d+)%\)/)) == null ? void 0 : r[1] : e === "sepia" ? (n = t.filter.match(/sepia\((\d+)%\)/)) == null ? void 0 : n[1] : e === "saturate" ? (s = t.filter.match(/saturate\((\d+)%\)/)) == null ? void 0 : s[1] : e === "hueRotate" ? (i = t.filter.match(/hue-rotate\((\d+)deg\)/)) == null ? void 0 : i[1] : e === "invert" ? (o = t.filter.match(/invert\((\d+)%\)/)) == null ? void 0 : o[1] : e === "brightness" ? (l = t.filter.match(/brightness\((\d+)%\)/)) == null ? void 0 : l[1] : e === "contrast" ? (u = t.filter.match(/contrast\((\d+)%\)/)) == null ? void 0 : u[1] : e === "blur" ? (c = t.filter.match(/blur\((\d+)px\)/)) == null ? void 0 : c[1] : t.getPropertyValue(e));
|
|
413
|
-
}
|
|
414
|
-
function Zt(t, e) {
|
|
415
|
-
const r = {}, n = getComputedStyle(t);
|
|
416
|
-
for (const [s, i] of Object.entries(e)) {
|
|
417
|
-
const o = s;
|
|
418
|
-
i != null && (r[o] = ke(n, o));
|
|
419
|
-
}
|
|
420
|
-
return r;
|
|
421
|
-
}
|
|
422
|
-
function O(t, e, r) {
|
|
423
|
-
r != null && (e === "translateX" ? t.style.transform += ` translateX(${r}px)` : e === "translateY" ? t.style.transform += ` translateY(${r}px)` : e === "translateZ" ? t.style.transform += ` translateZ(${r}px)` : e === "rotateX" ? t.style.transform += ` rotateX(${r}deg)` : e === "rotateY" ? t.style.transform += ` rotateY(${r}deg)` : e === "rotateZ" ? t.style.transform += ` rotateZ(${r}deg)` : e === "scaleX" ? t.style.transform += ` scaleX(${r})` : e === "scaleY" ? t.style.transform += ` scaleY(${r})` : e === "scaleZ" ? t.style.transform += ` scaleZ(${r})` : e === "skewX" ? t.style.transform += ` skewX(${r}deg)` : e === "skewY" ? t.style.transform += ` skewY(${r}deg)` : e === "grayScale" ? t.style.filter += ` grayscale(${r}%)` : e === "sepia" ? t.style.filter += ` sepia(${r}%)` : e === "saturate" ? t.style.filter += ` saturate(${r}%)` : e === "hueRotate" ? t.style.filter += ` hue-rotate(${r}deg)` : e === "invert" ? t.style.filter += ` invert(${r}%)` : e === "brightness" ? t.style.filter += ` brightness(${r}%)` : e === "contrast" ? t.style.filter += ` contrast(${r}%)` : e === "blur" && (t.style.filter += ` blur(${r}px)`), t.style.setProperty(e, String(r)));
|
|
424
|
-
}
|
|
425
|
-
const X = /* @__PURE__ */ new Map();
|
|
426
|
-
function fe(t, e, r) {
|
|
427
|
-
if (X.has(r + ":" + t + e))
|
|
428
|
-
return X.get(t + e);
|
|
429
|
-
const n = Je(t, e);
|
|
430
|
-
return X.set(r + ":" + t + e, n), n;
|
|
431
|
-
}
|
|
432
|
-
function he(t, e) {
|
|
433
|
-
return fe(t, e, "c");
|
|
434
|
-
}
|
|
435
|
-
function Qe(t, e) {
|
|
436
|
-
return fe(t, e, "s");
|
|
437
|
-
}
|
|
438
|
-
function et(t, e, r, n, s) {
|
|
439
|
-
if (r != null && n != null) {
|
|
440
|
-
if (typeof r == "number" && typeof n == "number") {
|
|
441
|
-
const i = r + (n - r) * s;
|
|
442
|
-
O(t, e, i);
|
|
443
|
-
} else if (e === "boxShadow" || e === "textShadow") {
|
|
444
|
-
const i = Qe(
|
|
445
|
-
r,
|
|
446
|
-
n
|
|
447
|
-
)(s);
|
|
448
|
-
O(t, e, i);
|
|
449
|
-
} else if (e === "color" || e === "backgroundColor" || e === "borderColor" || e === "outlineColor") {
|
|
450
|
-
const i = he(
|
|
451
|
-
r,
|
|
452
|
-
n
|
|
453
|
-
)(s);
|
|
454
|
-
O(t, e, i);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
function Xt(t, e, r, n) {
|
|
459
|
-
t.style.transform = "", t.style.filter = "";
|
|
460
|
-
for (const [s, i] of Object.entries(r)) {
|
|
461
|
-
const o = s;
|
|
462
|
-
et(t, o, e[o], i, n);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
function Yt(t, e) {
|
|
466
|
-
t.style.transform = "", t.style.filter = "";
|
|
467
|
-
for (const [r, n] of Object.entries(e))
|
|
468
|
-
n != null && O(t, r, n);
|
|
469
|
-
}
|
|
470
|
-
const de = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), pe = /* @__PURE__ */ new Set([
|
|
354
|
+
const oe = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), ue = /* @__PURE__ */ new Set([
|
|
471
355
|
"rowSpan",
|
|
472
356
|
"colSpan",
|
|
473
357
|
"tabIndex",
|
|
474
358
|
"valueAsNumber"
|
|
475
|
-
]),
|
|
359
|
+
]), le = /* @__PURE__ */ new Set(["valueAsDate"]), ae = /* @__PURE__ */ new Set([
|
|
476
360
|
"value",
|
|
477
361
|
"textContent",
|
|
478
362
|
"innerText",
|
|
@@ -480,47 +364,47 @@ const de = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]
|
|
|
480
364
|
"outerHTML",
|
|
481
365
|
"className",
|
|
482
366
|
"classList"
|
|
483
|
-
]),
|
|
367
|
+
]), U = /* @__PURE__ */ new Map();
|
|
484
368
|
function D(t, e) {
|
|
485
|
-
if (
|
|
486
|
-
return
|
|
369
|
+
if (U.has(t))
|
|
370
|
+
return U.get(t);
|
|
487
371
|
{
|
|
488
372
|
const r = e(t);
|
|
489
|
-
return
|
|
373
|
+
return U.set(t, r), r;
|
|
490
374
|
}
|
|
491
375
|
}
|
|
492
|
-
function
|
|
376
|
+
function He(t) {
|
|
493
377
|
return (e, r) => {
|
|
494
378
|
r == null ? e[t] = null : e[t] = !!r;
|
|
495
379
|
};
|
|
496
380
|
}
|
|
497
|
-
function
|
|
381
|
+
function Je(t) {
|
|
498
382
|
return (e, r) => {
|
|
499
383
|
r == null ? e[t] = null : e[t] = Number(r);
|
|
500
384
|
};
|
|
501
385
|
}
|
|
502
|
-
function
|
|
386
|
+
function We(t) {
|
|
503
387
|
return (e, r) => {
|
|
504
388
|
r == null ? e[t] = null : e[t] = r;
|
|
505
389
|
};
|
|
506
390
|
}
|
|
507
|
-
function
|
|
391
|
+
function Be(t) {
|
|
508
392
|
return (e, r) => {
|
|
509
393
|
r == null ? e[t] = null : e[t] = String(r);
|
|
510
394
|
};
|
|
511
395
|
}
|
|
512
|
-
function
|
|
396
|
+
function Xe(t) {
|
|
513
397
|
return (e, r) => {
|
|
514
398
|
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
515
399
|
};
|
|
516
400
|
}
|
|
517
|
-
function
|
|
518
|
-
return
|
|
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);
|
|
519
403
|
}
|
|
520
|
-
function
|
|
521
|
-
return (e) =>
|
|
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);
|
|
522
406
|
}
|
|
523
|
-
class
|
|
407
|
+
class v {
|
|
524
408
|
/**
|
|
525
409
|
* Constructs a new `DOMContext` instance.
|
|
526
410
|
*
|
|
@@ -538,19 +422,19 @@ class b {
|
|
|
538
422
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
539
423
|
* @returns The newly created element.
|
|
540
424
|
*/
|
|
541
|
-
|
|
425
|
+
l(this, "createElement", (e, r) => r !== void 0 ? this.document.createElementNS(r, e) : this.document.createElement(e));
|
|
542
426
|
/**
|
|
543
427
|
* Creates a new text node with the specified text content.
|
|
544
428
|
* @param text - The text content for the new text node.
|
|
545
429
|
* @returns A new `Text` node with the specified text content.
|
|
546
430
|
*/
|
|
547
|
-
|
|
431
|
+
l(this, "createText", (e) => this.document.createTextNode(e));
|
|
548
432
|
/**
|
|
549
433
|
* Creates a new `DOMContext` with a reference to a newly created text node.
|
|
550
434
|
* The text node is appended or inserted to the current `DOMContext`.
|
|
551
435
|
* The new `DOMContext` with the reference is returned.
|
|
552
436
|
*/
|
|
553
|
-
|
|
437
|
+
l(this, "makeRef", () => {
|
|
554
438
|
const e = this.createText("");
|
|
555
439
|
return this.appendOrInsert(e), this.withReference(e);
|
|
556
440
|
});
|
|
@@ -559,7 +443,7 @@ class b {
|
|
|
559
443
|
*
|
|
560
444
|
* @param child - The child node to append or insert.
|
|
561
445
|
*/
|
|
562
|
-
|
|
446
|
+
l(this, "appendOrInsert", (e) => {
|
|
563
447
|
this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
|
|
564
448
|
});
|
|
565
449
|
/**
|
|
@@ -568,18 +452,18 @@ class b {
|
|
|
568
452
|
* @param document - The `Document` to use for the `DOMContext`.
|
|
569
453
|
* @returns A new `DOMContext` instance.
|
|
570
454
|
*/
|
|
571
|
-
|
|
455
|
+
l(this, "withDocument", (e) => new v(e, this.element, this.reference, this.providers, !0));
|
|
572
456
|
/**
|
|
573
457
|
* Creates a new `DOMContext` instance with the provided `element`.
|
|
574
458
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
575
459
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
576
460
|
*/
|
|
577
|
-
|
|
461
|
+
l(this, "withElement", (e) => new v(this.document, e, void 0, this.providers, !1));
|
|
578
462
|
/**
|
|
579
463
|
* Creates a new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
580
464
|
* @returns A new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
581
465
|
*/
|
|
582
|
-
|
|
466
|
+
l(this, "withFirstLevel", () => new v(
|
|
583
467
|
this.document,
|
|
584
468
|
this.element,
|
|
585
469
|
this.reference,
|
|
@@ -592,7 +476,7 @@ class b {
|
|
|
592
476
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
593
477
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
594
478
|
*/
|
|
595
|
-
|
|
479
|
+
l(this, "withReference", (e) => new v(
|
|
596
480
|
this.document,
|
|
597
481
|
this.element,
|
|
598
482
|
e,
|
|
@@ -605,7 +489,7 @@ class b {
|
|
|
605
489
|
* @param value - The value to set for the provider.
|
|
606
490
|
* @returns A new DOMContext with the updated providers.
|
|
607
491
|
*/
|
|
608
|
-
|
|
492
|
+
l(this, "withProvider", (e, r) => new v(
|
|
609
493
|
this.document,
|
|
610
494
|
this.element,
|
|
611
495
|
this.reference,
|
|
@@ -622,7 +506,7 @@ class b {
|
|
|
622
506
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
623
507
|
* @returns A new DOMContext instance with the merged providers.
|
|
624
508
|
*/
|
|
625
|
-
|
|
509
|
+
l(this, "withProviders", (e) => new v(
|
|
626
510
|
this.document,
|
|
627
511
|
this.element,
|
|
628
512
|
this.reference,
|
|
@@ -637,9 +521,9 @@ class b {
|
|
|
637
521
|
*
|
|
638
522
|
* @param mark - The provider mark to retrieve the provider for.
|
|
639
523
|
* @returns The provider for the given mark.
|
|
640
|
-
* @throws
|
|
524
|
+
* @throws Error If the provider for the given mark is not found.
|
|
641
525
|
*/
|
|
642
|
-
|
|
526
|
+
l(this, "getProvider", (e) => {
|
|
643
527
|
if (this.providers[e] === void 0)
|
|
644
528
|
throw new Error(`Provider not found: ${e.description}`);
|
|
645
529
|
return this.providers[e];
|
|
@@ -654,20 +538,20 @@ class b {
|
|
|
654
538
|
* @returns A new `DOMContext` instance.
|
|
655
539
|
*/
|
|
656
540
|
static of(e, r) {
|
|
657
|
-
return new
|
|
541
|
+
return new v(e.ownerDocument, e, r, {}, !0);
|
|
658
542
|
}
|
|
659
543
|
}
|
|
660
|
-
function
|
|
544
|
+
function p(t) {
|
|
661
545
|
const e = t;
|
|
662
546
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
663
547
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
548
|
+
function ze(t) {
|
|
549
|
+
return he(t) ? t : t.parentElement;
|
|
666
550
|
}
|
|
667
|
-
function
|
|
551
|
+
function he(t) {
|
|
668
552
|
return t.nodeType === 1;
|
|
669
553
|
}
|
|
670
|
-
function
|
|
554
|
+
function Ke(t, e, r) {
|
|
671
555
|
let n = t.target;
|
|
672
556
|
for (; n != null && !(n instanceof HTMLAnchorElement); )
|
|
673
557
|
n = n.parentElement;
|
|
@@ -676,50 +560,50 @@ function ut(t, e, r) {
|
|
|
676
560
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || s.target !== "_self" && s.target !== "" || s.getAttribute("download") != null)
|
|
677
561
|
return !0;
|
|
678
562
|
if (r) {
|
|
679
|
-
const { pathname: i, search: o, hash:
|
|
563
|
+
const { pathname: i, search: o, hash: a } = s, u = i + o + a;
|
|
680
564
|
if (s.getAttribute("href") !== u || e && !/\/[^/.]*$/.test(i))
|
|
681
565
|
return !0;
|
|
682
566
|
}
|
|
683
567
|
return !1;
|
|
684
568
|
}
|
|
685
|
-
const
|
|
569
|
+
const Lt = (t, e = {
|
|
686
570
|
checkExtension: !0,
|
|
687
571
|
checkExternalUrl: !0
|
|
688
572
|
}) => (r) => {
|
|
689
573
|
const { checkExtension: n, checkExternalUrl: s } = e;
|
|
690
|
-
|
|
574
|
+
Ke(
|
|
691
575
|
r,
|
|
692
576
|
n === !0,
|
|
693
577
|
s === !0
|
|
694
578
|
) || t() && r.preventDefault();
|
|
695
|
-
},
|
|
696
|
-
|
|
579
|
+
}, de = (t) => (e) => {
|
|
580
|
+
_e(e);
|
|
697
581
|
const r = e.createText(t);
|
|
698
582
|
return e.appendOrInsert(r), (n) => {
|
|
699
|
-
n &&
|
|
583
|
+
n && p(r);
|
|
700
584
|
};
|
|
701
|
-
},
|
|
702
|
-
|
|
585
|
+
}, pe = (t) => (e) => {
|
|
586
|
+
_e(e);
|
|
703
587
|
const r = e.createText(t.value);
|
|
704
588
|
e.appendOrInsert(r);
|
|
705
589
|
const n = t.on((s) => r.data = s);
|
|
706
590
|
return (s) => {
|
|
707
|
-
n(), s &&
|
|
591
|
+
n(), s && p(r);
|
|
708
592
|
};
|
|
709
593
|
};
|
|
710
|
-
function
|
|
711
|
-
return h.is(t) ?
|
|
594
|
+
function kt(t) {
|
|
595
|
+
return h.is(t) ? pe(t) : de(t);
|
|
712
596
|
}
|
|
713
|
-
const
|
|
714
|
-
const r = t.map((n) =>
|
|
597
|
+
const y = (...t) => (e) => {
|
|
598
|
+
const r = t.map((n) => c(n)(e));
|
|
715
599
|
return (n) => {
|
|
716
600
|
r.forEach((s) => s(n));
|
|
717
601
|
};
|
|
718
|
-
},
|
|
719
|
-
},
|
|
602
|
+
}, S = () => () => {
|
|
603
|
+
}, Qe = (t) => (e) => (Se(e), e.element.classList.add(...t), (r) => {
|
|
720
604
|
r && e.element.classList.remove(...t);
|
|
721
|
-
}),
|
|
722
|
-
|
|
605
|
+
}), Ye = (t) => (e) => {
|
|
606
|
+
Se(e);
|
|
723
607
|
const r = e.element;
|
|
724
608
|
let n = [];
|
|
725
609
|
const s = t.on((i) => {
|
|
@@ -728,250 +612,255 @@ const w = (...t) => (e) => {
|
|
|
728
612
|
return (i) => {
|
|
729
613
|
s(), i && n.forEach((o) => r.classList.remove(o)), n.length = 0;
|
|
730
614
|
};
|
|
731
|
-
},
|
|
732
|
-
const r =
|
|
615
|
+
}, N = (t, e) => {
|
|
616
|
+
const r = ce(t), n = fe(t);
|
|
733
617
|
return (s) => {
|
|
734
|
-
|
|
618
|
+
ye(s, t);
|
|
735
619
|
const i = n(s.element);
|
|
736
620
|
return r(s.element, e), (o) => {
|
|
737
621
|
o && r(s.element, i);
|
|
738
622
|
};
|
|
739
623
|
};
|
|
740
|
-
},
|
|
741
|
-
const r =
|
|
624
|
+
}, C = (t, e) => {
|
|
625
|
+
const r = ce(t), n = fe(t);
|
|
742
626
|
return (s) => {
|
|
743
|
-
|
|
627
|
+
ye(s, t);
|
|
744
628
|
const i = n(s.element);
|
|
745
629
|
return e.on((o) => r(s.element, o)), (o) => {
|
|
746
630
|
o && r(s.element, i);
|
|
747
631
|
};
|
|
748
632
|
};
|
|
749
|
-
},
|
|
633
|
+
}, b = new Proxy(
|
|
750
634
|
{},
|
|
751
635
|
{
|
|
752
|
-
get: (t, e) => e === "class" ? (r) => h.is(r) ?
|
|
636
|
+
get: (t, e) => e === "class" ? (r) => h.is(r) ? Ye(r) : Qe(
|
|
753
637
|
(r ?? "").split(" ").filter((n) => n.length > 0)
|
|
754
|
-
) : (r) => h.is(r) ?
|
|
638
|
+
) : (r) => h.is(r) ? C(
|
|
755
639
|
e,
|
|
756
640
|
r
|
|
757
|
-
) :
|
|
641
|
+
) : N(
|
|
758
642
|
e,
|
|
759
643
|
r
|
|
760
644
|
)
|
|
761
645
|
}
|
|
762
|
-
),
|
|
646
|
+
), Nt = new Proxy(
|
|
763
647
|
{},
|
|
764
648
|
{
|
|
765
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
649
|
+
get: (t, e) => (r) => h.is(r) ? C(
|
|
766
650
|
`data-${e}`,
|
|
767
651
|
r
|
|
768
|
-
) :
|
|
652
|
+
) : N(`data-${e}`, r)
|
|
769
653
|
}
|
|
770
|
-
),
|
|
654
|
+
), Ct = new Proxy(
|
|
771
655
|
{},
|
|
772
656
|
{
|
|
773
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
657
|
+
get: (t, e) => (r) => h.is(r) ? C(
|
|
774
658
|
`aria-${e}`,
|
|
775
659
|
r
|
|
776
|
-
) :
|
|
660
|
+
) : N(
|
|
777
661
|
`aria-${e}`,
|
|
778
662
|
r
|
|
779
663
|
)
|
|
780
664
|
}
|
|
781
|
-
),
|
|
665
|
+
), Rt = new Proxy(
|
|
782
666
|
{},
|
|
783
667
|
{
|
|
784
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
668
|
+
get: (t, e) => (r) => h.is(r) ? C(
|
|
785
669
|
e,
|
|
786
670
|
r
|
|
787
|
-
) :
|
|
671
|
+
) : N(
|
|
788
672
|
e,
|
|
789
673
|
r
|
|
790
674
|
)
|
|
791
675
|
}
|
|
792
|
-
),
|
|
676
|
+
), Mt = new Proxy(
|
|
793
677
|
{},
|
|
794
678
|
{
|
|
795
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
679
|
+
get: (t, e) => (r) => h.is(r) ? C(
|
|
796
680
|
e,
|
|
797
681
|
r
|
|
798
|
-
) :
|
|
682
|
+
) : N(
|
|
799
683
|
e,
|
|
800
684
|
r
|
|
801
685
|
)
|
|
802
686
|
}
|
|
803
687
|
);
|
|
804
|
-
function
|
|
805
|
-
return t == null ?
|
|
688
|
+
function c(t) {
|
|
689
|
+
return t == null ? S : Array.isArray(t) ? y(...t.map(c)) : typeof t == "string" ? de(t) : h.is(t) ? pe(t) : t;
|
|
806
690
|
}
|
|
807
|
-
function
|
|
691
|
+
function me(t, ...e) {
|
|
808
692
|
return (r) => {
|
|
809
693
|
const n = r.createElement(t, void 0);
|
|
810
|
-
r.isFirstLevel &&
|
|
811
|
-
const s = e.map((i) =>
|
|
694
|
+
r.isFirstLevel && R.isSSR() && we(n), r.appendOrInsert(n), r = r.withElement(n);
|
|
695
|
+
const s = e.map((i) => c(i)(r));
|
|
812
696
|
return (i) => {
|
|
813
|
-
s.forEach((o) => o(!1)), i &&
|
|
697
|
+
s.forEach((o) => o(!1)), i && p(n);
|
|
814
698
|
};
|
|
815
699
|
};
|
|
816
700
|
}
|
|
817
|
-
function
|
|
701
|
+
function ge(t, e, ...r) {
|
|
818
702
|
return (n) => {
|
|
819
703
|
const s = n.createElement(t, e);
|
|
820
|
-
n.isFirstLevel &&
|
|
821
|
-
const i = r.map((o) =>
|
|
704
|
+
n.isFirstLevel && R.isSSR() && we(s), n.appendOrInsert(s), n = n.withElement(s);
|
|
705
|
+
const i = r.map((o) => c(o)(n));
|
|
822
706
|
return (o) => {
|
|
823
|
-
i.forEach((
|
|
707
|
+
i.forEach((a) => a(!1)), o && p(s);
|
|
824
708
|
};
|
|
825
709
|
};
|
|
826
710
|
}
|
|
827
|
-
const
|
|
711
|
+
const Ot = new Proxy(
|
|
828
712
|
{},
|
|
829
713
|
{
|
|
830
|
-
get: (t, e) => (...r) =>
|
|
714
|
+
get: (t, e) => (...r) => me(e, r.flatMap(c))
|
|
831
715
|
}
|
|
832
|
-
),
|
|
716
|
+
), It = new Proxy(
|
|
833
717
|
{},
|
|
834
718
|
{
|
|
835
|
-
get: (t, e) => (...r) =>
|
|
719
|
+
get: (t, e) => (...r) => me("input", b.type(e), ...r)
|
|
836
720
|
}
|
|
837
|
-
),
|
|
721
|
+
), Ze = "http://www.w3.org/2000/svg", $t = new Proxy(
|
|
838
722
|
{},
|
|
839
723
|
{
|
|
840
|
-
get: (t, e) => (...r) =>
|
|
724
|
+
get: (t, e) => (...r) => ge(e, Ze, r.flatMap(c))
|
|
841
725
|
}
|
|
842
|
-
),
|
|
726
|
+
), xe = "http://www.w3.org/1998/Math/MathML", Ft = new Proxy(
|
|
843
727
|
{},
|
|
844
728
|
{
|
|
845
|
-
get: (t, e) => (...r) =>
|
|
729
|
+
get: (t, e) => (...r) => ge(e, xe, r.flatMap(c))
|
|
846
730
|
}
|
|
847
|
-
),
|
|
848
|
-
function
|
|
731
|
+
), T = "data-tempo-attr", I = "data-tempo-class", ve = "data-tempo-node", $ = "data-tempo-text";
|
|
732
|
+
function et(t, e) {
|
|
849
733
|
const r = t.getAttribute(e);
|
|
850
734
|
if (r != null) {
|
|
851
|
-
const n = t.getAttribute(
|
|
852
|
-
t.setAttribute(
|
|
735
|
+
const n = t.getAttribute(T) ?? "{}", s = { ...JSON.parse(n), name: r };
|
|
736
|
+
t.setAttribute(T, JSON.stringify(s));
|
|
853
737
|
}
|
|
854
738
|
}
|
|
855
|
-
function
|
|
856
|
-
|
|
739
|
+
function ye(t, e) {
|
|
740
|
+
R.isSSR() && t.isFirstLevel && et(t.element, e);
|
|
857
741
|
}
|
|
858
|
-
function
|
|
859
|
-
t.querySelectorAll(`[${
|
|
860
|
-
const r = JSON.parse(e.getAttribute(
|
|
742
|
+
function tt(t) {
|
|
743
|
+
t.querySelectorAll(`[${T}]`).forEach((e) => {
|
|
744
|
+
const r = JSON.parse(e.getAttribute(T) ?? "{}");
|
|
861
745
|
for (const [n, s] of Object.entries(r))
|
|
862
746
|
e.setAttribute(n, s);
|
|
863
|
-
e.removeAttribute(
|
|
747
|
+
e.removeAttribute(T);
|
|
864
748
|
});
|
|
865
749
|
}
|
|
866
|
-
function
|
|
867
|
-
t.setAttribute(
|
|
750
|
+
function rt(t) {
|
|
751
|
+
t.setAttribute(I, t.className);
|
|
868
752
|
}
|
|
869
|
-
function
|
|
870
|
-
|
|
753
|
+
function Se(t) {
|
|
754
|
+
R.isSSR() && t.isFirstLevel && rt(t.element);
|
|
871
755
|
}
|
|
872
|
-
function
|
|
873
|
-
t.querySelectorAll(`[${
|
|
874
|
-
const r = e.getAttribute(
|
|
875
|
-
r !== null && (e.className = r, e.removeAttribute(
|
|
756
|
+
function nt(t) {
|
|
757
|
+
t.querySelectorAll(`[${I}]`).forEach((e) => {
|
|
758
|
+
const r = e.getAttribute(I);
|
|
759
|
+
r !== null && (e.className = r, e.removeAttribute(I));
|
|
876
760
|
});
|
|
877
761
|
}
|
|
878
|
-
function
|
|
879
|
-
t.setAttribute(
|
|
762
|
+
function we(t) {
|
|
763
|
+
t.setAttribute(ve, "");
|
|
880
764
|
}
|
|
881
|
-
function
|
|
882
|
-
t.querySelectorAll(`[${
|
|
883
|
-
|
|
765
|
+
function st(t) {
|
|
766
|
+
t.querySelectorAll(`[${ve}]`).forEach((e) => {
|
|
767
|
+
p(e);
|
|
884
768
|
});
|
|
885
769
|
}
|
|
886
|
-
function
|
|
887
|
-
t.setAttribute(
|
|
770
|
+
function it(t) {
|
|
771
|
+
t.setAttribute($, t.textContent ?? "");
|
|
888
772
|
}
|
|
889
|
-
function
|
|
890
|
-
|
|
773
|
+
function _e(t) {
|
|
774
|
+
R.isSSR() && t.isFirstLevel && it(t.element);
|
|
891
775
|
}
|
|
892
|
-
function
|
|
893
|
-
t.querySelectorAll(`[${
|
|
894
|
-
e.textContent = e.getAttribute(
|
|
776
|
+
function ot(t) {
|
|
777
|
+
t.querySelectorAll(`[${$}]`).forEach((e) => {
|
|
778
|
+
e.textContent = e.getAttribute($), e.removeAttribute($);
|
|
895
779
|
});
|
|
896
780
|
}
|
|
897
|
-
function
|
|
898
|
-
|
|
781
|
+
function ut(t) {
|
|
782
|
+
st(t), nt(t), tt(t), ot(t);
|
|
899
783
|
}
|
|
900
|
-
function
|
|
784
|
+
function Ae() {
|
|
901
785
|
const t = globalThis;
|
|
902
786
|
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
903
787
|
isSSR: !1,
|
|
904
788
|
counter: 0
|
|
905
789
|
}), t.__tempoSSR__;
|
|
906
790
|
}
|
|
907
|
-
function
|
|
908
|
-
const r =
|
|
791
|
+
function J(t, e) {
|
|
792
|
+
const r = Ae();
|
|
909
793
|
r[t] = e;
|
|
910
794
|
}
|
|
911
|
-
function
|
|
912
|
-
return
|
|
795
|
+
function Ee(t) {
|
|
796
|
+
return Ae()[t];
|
|
913
797
|
}
|
|
914
|
-
function
|
|
915
|
-
return
|
|
798
|
+
function lt() {
|
|
799
|
+
return Ee("isSSR");
|
|
916
800
|
}
|
|
917
801
|
function j(t) {
|
|
918
|
-
|
|
802
|
+
J("isSSR", t);
|
|
919
803
|
}
|
|
920
|
-
function
|
|
921
|
-
return
|
|
804
|
+
function W() {
|
|
805
|
+
return Ee("counter");
|
|
922
806
|
}
|
|
923
|
-
function
|
|
924
|
-
|
|
807
|
+
function at() {
|
|
808
|
+
J("counter", (W() ?? 0) + 1);
|
|
925
809
|
}
|
|
926
|
-
function
|
|
927
|
-
|
|
810
|
+
function ct() {
|
|
811
|
+
J("counter", (W() ?? 0) - 1);
|
|
928
812
|
}
|
|
929
|
-
const
|
|
813
|
+
const qt = (t = 30) => (j(!0), new Promise((e, r) => {
|
|
930
814
|
let n;
|
|
931
815
|
const s = setInterval(() => {
|
|
932
|
-
|
|
816
|
+
W() <= 0 && (clearInterval(s), clearTimeout(n), j(!1), e());
|
|
933
817
|
}, 30);
|
|
934
818
|
n = setTimeout(() => {
|
|
935
819
|
clearInterval(s), j(!1), r(new Error("SSR Timeout"));
|
|
936
820
|
}, t * 1e3);
|
|
937
|
-
})),
|
|
938
|
-
useDone: (t) => (
|
|
939
|
-
isSSR:
|
|
940
|
-
},
|
|
821
|
+
})), R = {
|
|
822
|
+
useDone: (t) => (at(), c(t(ct))),
|
|
823
|
+
isSSR: lt
|
|
824
|
+
}, be = (t, e) => {
|
|
941
825
|
if (typeof e == "function")
|
|
942
|
-
return
|
|
943
|
-
const r = e.pending != null ?
|
|
826
|
+
return be(t, { then: e });
|
|
827
|
+
const r = e.pending != null ? c(e.pending) : S, n = e.then, s = e.error != null ? (i) => c(e.error(i)) : () => S;
|
|
944
828
|
return (i) => {
|
|
945
829
|
let o = !0;
|
|
946
|
-
const
|
|
830
|
+
const a = t();
|
|
947
831
|
i = i.makeRef();
|
|
948
|
-
let u =
|
|
949
|
-
return
|
|
950
|
-
(
|
|
951
|
-
o && (u(!0), u =
|
|
832
|
+
let u = c(r)(i);
|
|
833
|
+
return a.then(
|
|
834
|
+
(f) => {
|
|
835
|
+
o && (u(!0), u = c(n(f))(i));
|
|
952
836
|
},
|
|
953
|
-
(
|
|
954
|
-
o && (u(!0), u =
|
|
837
|
+
(f) => {
|
|
838
|
+
o && (u(!0), u = c(s(f))(i));
|
|
955
839
|
}
|
|
956
|
-
), (
|
|
957
|
-
o = !1, u(
|
|
840
|
+
), (f) => {
|
|
841
|
+
o = !1, u(f), f && i.reference && p(i.reference);
|
|
958
842
|
};
|
|
959
843
|
};
|
|
960
|
-
},
|
|
844
|
+
}, Vt = (t, e) => be(() => t, e), Pe = (t, e) => (r) => (r.element.addEventListener(t, e), (n) => {
|
|
961
845
|
n && r.element.removeEventListener(t, e);
|
|
962
|
-
}),
|
|
846
|
+
}), ft = (t) => Pe("click", (e) => {
|
|
963
847
|
e.preventDefault();
|
|
964
848
|
const r = e.target;
|
|
965
849
|
setTimeout(() => {
|
|
966
850
|
const n = r.ownerDocument != null ? r == null ? void 0 : r.checked : void 0;
|
|
967
851
|
n != null && t(!n);
|
|
968
852
|
}, 0);
|
|
969
|
-
}),
|
|
853
|
+
}), q = new Proxy(
|
|
970
854
|
{},
|
|
971
855
|
{
|
|
972
|
-
|
|
856
|
+
/**
|
|
857
|
+
* @param name - The name of the event handler.
|
|
858
|
+
* @param fn - The function to call when the event is triggered.
|
|
859
|
+
* @returns A `Renderable` function that adds the event listener to the element.
|
|
860
|
+
*/
|
|
861
|
+
get: (t, e) => (r) => Pe(e, r)
|
|
973
862
|
}
|
|
974
|
-
),
|
|
863
|
+
), V = {
|
|
975
864
|
value: (t) => (e) => {
|
|
976
865
|
const r = e.target;
|
|
977
866
|
t(r.value);
|
|
@@ -1016,74 +905,74 @@ const er = (t = 30) => (j(!0), new Promise((e, r) => {
|
|
|
1016
905
|
e.stopImmediatePropagation(), t();
|
|
1017
906
|
}
|
|
1018
907
|
};
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
1021
|
-
|
|
1022
|
-
|
|
908
|
+
function ht(t, e = "input") {
|
|
909
|
+
return y(
|
|
910
|
+
b.valueAsDate(t),
|
|
911
|
+
q[e](V.valueAsDate(t.set))
|
|
1023
912
|
);
|
|
1024
913
|
}
|
|
1025
|
-
function
|
|
1026
|
-
return
|
|
1027
|
-
|
|
1028
|
-
|
|
914
|
+
function dt(t, e = "input") {
|
|
915
|
+
return y(
|
|
916
|
+
b.valueAsDate(t),
|
|
917
|
+
q[e](V.valueAsDateTime(t.set))
|
|
1029
918
|
);
|
|
1030
919
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1034
|
-
|
|
920
|
+
function pt(t, e = "input") {
|
|
921
|
+
return y(
|
|
922
|
+
b.valueAsNumber(t),
|
|
923
|
+
q[e](V.valueAsNumber(t.set))
|
|
1035
924
|
);
|
|
1036
925
|
}
|
|
1037
|
-
function
|
|
1038
|
-
return
|
|
1039
|
-
}
|
|
1040
|
-
function Ct(t) {
|
|
1041
|
-
return w(P.checked(t), yt(t.set));
|
|
926
|
+
function mt(t, e = "input") {
|
|
927
|
+
return y(b.value(t), q[e](V.value(t.set)));
|
|
1042
928
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
929
|
+
function gt(t) {
|
|
930
|
+
return y(b.checked(t), ft(t.set));
|
|
931
|
+
}
|
|
932
|
+
const Ut = {
|
|
933
|
+
date: ht,
|
|
934
|
+
dateTime: dt,
|
|
935
|
+
number: pt,
|
|
936
|
+
text: mt,
|
|
937
|
+
checked: gt
|
|
938
|
+
}, O = (t, e) => (r) => {
|
|
1050
939
|
r = r.makeRef();
|
|
1051
940
|
let n, s;
|
|
1052
941
|
const i = t.map((u) => Object.keys(u)[0]);
|
|
1053
942
|
let o;
|
|
1054
|
-
const
|
|
943
|
+
const a = i.on((u) => {
|
|
1055
944
|
if (u !== o) {
|
|
1056
|
-
s == null || s.dispose(), n == null || n(!0), s = t.map((
|
|
1057
|
-
const
|
|
1058
|
-
n = f
|
|
945
|
+
s == null || s.dispose(), n == null || n(!0), s = t.map((m) => m[u]);
|
|
946
|
+
const f = e[u](s);
|
|
947
|
+
n = c(f)(r), o = u;
|
|
1059
948
|
}
|
|
1060
949
|
});
|
|
1061
950
|
return (u) => {
|
|
1062
|
-
|
|
951
|
+
a(), u && r.reference != null && p(r.reference), n == null || n(!0);
|
|
1063
952
|
};
|
|
1064
|
-
},
|
|
1065
|
-
bool: (t, e) =>
|
|
953
|
+
}, k = {
|
|
954
|
+
bool: (t, e) => O(
|
|
1066
955
|
t.map((r) => r ? { true: !0 } : { false: !0 }),
|
|
1067
956
|
e
|
|
1068
957
|
),
|
|
1069
|
-
field: (t, e, r) =>
|
|
958
|
+
field: (t, e, r) => O(
|
|
1070
959
|
t.map((n) => ({ [n[e]]: n })),
|
|
1071
960
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1072
961
|
r
|
|
1073
962
|
),
|
|
1074
|
-
kind: (t, e) =>
|
|
963
|
+
kind: (t, e) => k.field(t, "kind", e),
|
|
1075
964
|
tuple: (t, e) => {
|
|
1076
965
|
const r = t.map(([n, s]) => ({ [n]: s }));
|
|
1077
|
-
return
|
|
966
|
+
return O(r, e);
|
|
1078
967
|
},
|
|
1079
|
-
type: (t, e) =>
|
|
1080
|
-
value: (t, e) =>
|
|
968
|
+
type: (t, e) => k.field(t, "type", e),
|
|
969
|
+
value: (t, e) => O(
|
|
1081
970
|
t.map((r) => ({ [r]: !0 })),
|
|
1082
971
|
e
|
|
1083
972
|
)
|
|
1084
|
-
},
|
|
1085
|
-
const n = (e == null ? void 0 : e.firstSeparator) ??
|
|
1086
|
-
return
|
|
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(
|
|
1087
976
|
r.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1088
977
|
{
|
|
1089
978
|
first: () => n,
|
|
@@ -1091,92 +980,92 @@ const rr = {
|
|
|
1091
980
|
other: () => t
|
|
1092
981
|
}
|
|
1093
982
|
);
|
|
1094
|
-
},
|
|
983
|
+
}, De = (t, e) => (r) => {
|
|
1095
984
|
const n = Object.values(t).reduce((s, i) => {
|
|
1096
985
|
const o = r.getProvider(i);
|
|
1097
986
|
if (o == null)
|
|
1098
987
|
throw new Error(`No provider found for mark: ${i.description}`);
|
|
1099
988
|
return s[i] = o, s;
|
|
1100
989
|
}, {});
|
|
1101
|
-
return
|
|
1102
|
-
},
|
|
990
|
+
return c(e(n))(r);
|
|
991
|
+
}, Gt = (t, e) => (r) => {
|
|
1103
992
|
const n = [], s = Object.entries(t).reduce(
|
|
1104
|
-
(i, [o,
|
|
1105
|
-
|
|
993
|
+
(i, [o, a]) => (n.push(
|
|
994
|
+
a((u) => (Reflect.set(i, o, u), null))(r)
|
|
1106
995
|
), i),
|
|
1107
996
|
{}
|
|
1108
997
|
);
|
|
1109
998
|
return n.push(e(s)(r)), (i) => {
|
|
1110
999
|
n.forEach((o) => o(i));
|
|
1111
1000
|
};
|
|
1112
|
-
},
|
|
1113
|
-
r &&
|
|
1114
|
-
}),
|
|
1001
|
+
}, Ht = (t, e) => De([t], (r) => c(e(r[t]))), Jt = (t, e) => De(t, (r) => c(e(r))), Wt = (t) => (e) => t(e), Bt = (t) => (e) => (e.appendOrInsert(t), (r) => {
|
|
1002
|
+
r && p(t);
|
|
1003
|
+
}), vt = (t, e, r) => (n) => {
|
|
1115
1004
|
n = n.makeRef();
|
|
1116
1005
|
let s = null, i = !1;
|
|
1117
|
-
const o =
|
|
1118
|
-
u == null ? (s == null || s(!0), s =
|
|
1006
|
+
const o = L(null), a = t.on((u) => {
|
|
1007
|
+
u == null ? (s == null || s(!0), s = c((r == null ? void 0 : r()) ?? S)(n), i = !1) : (o.value = u, i || (s == null || s(!0), s = c(e(o))(n), i = !0));
|
|
1119
1008
|
});
|
|
1120
1009
|
return (u) => {
|
|
1121
|
-
|
|
1010
|
+
a(), s == null || s(u), u && n.reference && p(n.reference);
|
|
1122
1011
|
};
|
|
1123
|
-
},
|
|
1012
|
+
}, G = (t) => (e) => (r) => t(r, e), Te = (t, e, r) => r != null ? Te(t, (n) => {
|
|
1124
1013
|
const s = n.map((i) => i.isLast ? "last" : "other");
|
|
1125
|
-
return
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
last: () =>
|
|
1014
|
+
return y(
|
|
1015
|
+
G(() => s.dispose()),
|
|
1016
|
+
c(e(n)),
|
|
1017
|
+
k.value(s, {
|
|
1018
|
+
last: () => S,
|
|
1130
1019
|
other: () => r(n)
|
|
1131
1020
|
})
|
|
1132
1021
|
);
|
|
1133
1022
|
}) : (n) => {
|
|
1134
1023
|
n = n.makeRef();
|
|
1135
1024
|
const s = t.map(
|
|
1136
|
-
(u) => Array.from({ length: u }, (
|
|
1137
|
-
(
|
|
1025
|
+
(u) => Array.from({ length: u }, (f, m) => m).map(
|
|
1026
|
+
(f) => new Ue(f, u)
|
|
1138
1027
|
)
|
|
1139
|
-
), i = [], o = [],
|
|
1140
|
-
var
|
|
1141
|
-
const
|
|
1142
|
-
for (;
|
|
1143
|
-
(
|
|
1144
|
-
for (let d = 0; d <
|
|
1028
|
+
), i = [], o = [], a = s.on((u) => {
|
|
1029
|
+
var m, _;
|
|
1030
|
+
const f = u.length;
|
|
1031
|
+
for (; f < i.length; )
|
|
1032
|
+
(m = i.pop()) == null || m(!0), (_ = o.pop()) == null || _.dispose();
|
|
1033
|
+
for (let d = 0; d < f; d++)
|
|
1145
1034
|
if (o[d] == null) {
|
|
1146
|
-
o[d] =
|
|
1147
|
-
const
|
|
1148
|
-
i[d] =
|
|
1035
|
+
o[d] = L(u[d]);
|
|
1036
|
+
const P = c(e(o[d]));
|
|
1037
|
+
i[d] = P(n);
|
|
1149
1038
|
} else
|
|
1150
1039
|
o[d].value = u[d];
|
|
1151
1040
|
});
|
|
1152
1041
|
return (u) => {
|
|
1153
|
-
|
|
1042
|
+
a(), u && n.reference && p(n.reference);
|
|
1154
1043
|
};
|
|
1155
|
-
},
|
|
1044
|
+
}, yt = (t, e, r) => r != null ? yt(t, (n, s) => {
|
|
1156
1045
|
const i = s.map((o) => o.isLast ? "last" : "other");
|
|
1157
|
-
return
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
last: () =>
|
|
1046
|
+
return y([
|
|
1047
|
+
G(() => i.dispose()),
|
|
1048
|
+
c(e(n, s)),
|
|
1049
|
+
k.value(i, {
|
|
1050
|
+
last: () => S,
|
|
1162
1051
|
other: () => r(s)
|
|
1163
1052
|
})
|
|
1164
1053
|
]);
|
|
1165
1054
|
}) : (n) => {
|
|
1166
1055
|
const s = t.map((i) => i.length);
|
|
1167
|
-
return
|
|
1168
|
-
const o =
|
|
1056
|
+
return Te(s, (i) => {
|
|
1057
|
+
const o = H(
|
|
1169
1058
|
() => t.value[i.value.index],
|
|
1170
1059
|
[i, t]
|
|
1171
1060
|
);
|
|
1172
|
-
return
|
|
1173
|
-
|
|
1174
|
-
|
|
1061
|
+
return y(
|
|
1062
|
+
G(() => o.dispose()),
|
|
1063
|
+
c(e(o, i))
|
|
1175
1064
|
);
|
|
1176
1065
|
})(n);
|
|
1177
|
-
},
|
|
1066
|
+
}, Xt = (t, e) => (r) => {
|
|
1178
1067
|
r = r.makeRef();
|
|
1179
|
-
const n = t.map((o) =>
|
|
1068
|
+
const n = t.map((o) => c(e(o)));
|
|
1180
1069
|
let s = () => {
|
|
1181
1070
|
};
|
|
1182
1071
|
const i = n.on((o) => {
|
|
@@ -1185,163 +1074,153 @@ const rr = {
|
|
|
1185
1074
|
return (o) => {
|
|
1186
1075
|
i(), s(o);
|
|
1187
1076
|
};
|
|
1188
|
-
},
|
|
1077
|
+
}, Le = (t, e, r) => vt(
|
|
1189
1078
|
t.map((n) => n ? !0 : null),
|
|
1190
1079
|
() => e,
|
|
1191
1080
|
r != null ? () => r : void 0
|
|
1192
|
-
),
|
|
1081
|
+
), zt = (t, e, r) => Le(
|
|
1193
1082
|
t.map((n) => !n),
|
|
1194
1083
|
e,
|
|
1195
1084
|
r
|
|
1196
1085
|
);
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
1086
|
+
function Kt(t, e, r = S) {
|
|
1087
|
+
return Le(
|
|
1199
1088
|
t.map((n) => n.length > 0),
|
|
1200
1089
|
e,
|
|
1201
1090
|
r
|
|
1202
1091
|
);
|
|
1203
1092
|
}
|
|
1204
|
-
const
|
|
1093
|
+
const Qt = (t) => (e) => t(e.element) ?? (() => {
|
|
1205
1094
|
});
|
|
1206
|
-
function
|
|
1095
|
+
function ke(t, e) {
|
|
1207
1096
|
const r = t(e);
|
|
1208
1097
|
return () => r(!0);
|
|
1209
1098
|
}
|
|
1210
|
-
function
|
|
1099
|
+
function Yt(t, e, { doc: r, clear: n } = {}) {
|
|
1211
1100
|
const s = typeof e == "string" ? (r ?? document).querySelector(e) : e;
|
|
1212
1101
|
if (s === null)
|
|
1213
1102
|
throw new Error(`Cannot find element by selector for render: ${e}`);
|
|
1214
|
-
n && (r ?? s.ownerDocument) != null &&
|
|
1215
|
-
const i =
|
|
1216
|
-
return
|
|
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);
|
|
1217
1106
|
}
|
|
1218
|
-
const
|
|
1107
|
+
const Zt = (t, e) => (r) => {
|
|
1219
1108
|
const n = r.document.querySelector(t);
|
|
1220
1109
|
if (n === null)
|
|
1221
1110
|
throw new Error(`Cannot find element by selector for portal: ${t}`);
|
|
1222
|
-
return
|
|
1223
|
-
|
|
1111
|
+
return ke(
|
|
1112
|
+
c(e),
|
|
1224
1113
|
r.withElement(n).withFirstLevel()
|
|
1225
1114
|
);
|
|
1226
1115
|
};
|
|
1227
|
-
function
|
|
1116
|
+
function xt(t) {
|
|
1228
1117
|
return Symbol(t);
|
|
1229
1118
|
}
|
|
1230
|
-
const
|
|
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) => {
|
|
1231
1120
|
const n = r.element, s = n.style.getPropertyValue(t);
|
|
1232
1121
|
return n.style.setProperty(t, e), (i) => {
|
|
1233
1122
|
i && n.style.setProperty(t, s);
|
|
1234
1123
|
};
|
|
1235
|
-
},
|
|
1124
|
+
}, wt = (t, e) => (r) => {
|
|
1236
1125
|
const n = r.element, s = n.style.getPropertyValue(t);
|
|
1237
1126
|
return e.on((i) => n.style.setProperty(t, i)), (i) => {
|
|
1238
1127
|
i && n.style.setProperty(t, s);
|
|
1239
1128
|
};
|
|
1240
|
-
},
|
|
1129
|
+
}, nr = new Proxy(
|
|
1241
1130
|
{},
|
|
1242
1131
|
{
|
|
1243
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
1132
|
+
get: (t, e) => (r) => h.is(r) ? wt(e, r) : St(e, r)
|
|
1244
1133
|
}
|
|
1245
1134
|
);
|
|
1246
1135
|
export {
|
|
1247
|
-
|
|
1136
|
+
Vt as Async,
|
|
1248
1137
|
E as Computed,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1138
|
+
jt as Conjunction,
|
|
1139
|
+
v as DOMContext,
|
|
1140
|
+
Bt as DOMNode,
|
|
1141
|
+
me as El,
|
|
1142
|
+
ge as ElNS,
|
|
1143
|
+
S as Empty,
|
|
1144
|
+
vt as Ensure,
|
|
1145
|
+
yt as ForEach,
|
|
1146
|
+
y as Fragment,
|
|
1147
|
+
Xt as MapSignal,
|
|
1148
|
+
se as MemoryStore,
|
|
1149
|
+
Kt as NotEmpty,
|
|
1150
|
+
ft as OnChecked,
|
|
1151
|
+
Wt as OnCtx,
|
|
1152
|
+
Qt as OnMount,
|
|
1153
|
+
G as OnUnmount,
|
|
1154
|
+
Zt as Portal,
|
|
1266
1155
|
Ue as Position,
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1156
|
+
F as Prop,
|
|
1157
|
+
er as Provide,
|
|
1158
|
+
Te as Repeat,
|
|
1270
1159
|
h as Signal,
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
It as
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
st as setStringProperty,
|
|
1338
|
-
Ot as signal,
|
|
1339
|
-
Ae as signalText,
|
|
1340
|
-
M as ssr,
|
|
1341
|
-
er as startSSR,
|
|
1342
|
-
ve as staticText,
|
|
1343
|
-
Xe as stringInterpolate,
|
|
1344
|
-
wr as style,
|
|
1345
|
-
kt as svg,
|
|
1346
|
-
Gt as svgAttr
|
|
1160
|
+
be as Task,
|
|
1161
|
+
kt as Text,
|
|
1162
|
+
zt as Unless,
|
|
1163
|
+
Gt as Use,
|
|
1164
|
+
Ht as UseProvider,
|
|
1165
|
+
Jt as UseProviders,
|
|
1166
|
+
Le as When,
|
|
1167
|
+
tr as WithProvider,
|
|
1168
|
+
rr as WithProviders,
|
|
1169
|
+
we as addNodeTracker,
|
|
1170
|
+
Dt as animateSignal,
|
|
1171
|
+
Ge as animateSignals,
|
|
1172
|
+
Ct as aria,
|
|
1173
|
+
b as attr,
|
|
1174
|
+
Ut as bind,
|
|
1175
|
+
ut as clearSSR,
|
|
1176
|
+
Tt as computedRecord,
|
|
1177
|
+
Nt as dataAttr,
|
|
1178
|
+
Fe as dateInterpolate,
|
|
1179
|
+
V as emit,
|
|
1180
|
+
qe as endInterpolate,
|
|
1181
|
+
ze as getSelfOrParentElement,
|
|
1182
|
+
Ve as guessInterpolate,
|
|
1183
|
+
Lt as handleAnchorClick,
|
|
1184
|
+
Ot as html,
|
|
1185
|
+
It as input,
|
|
1186
|
+
he as isElement,
|
|
1187
|
+
bt as localStorageProp,
|
|
1188
|
+
fe as makeGetter,
|
|
1189
|
+
xt as makeProviderMark,
|
|
1190
|
+
ce as makeSetter,
|
|
1191
|
+
Ft as math,
|
|
1192
|
+
Mt as mathAttr,
|
|
1193
|
+
ye as maybeAddAttributeTracker,
|
|
1194
|
+
Se as maybeAddClassTracker,
|
|
1195
|
+
_e as maybeAddTextTracker,
|
|
1196
|
+
Ie as numberInterpolate,
|
|
1197
|
+
q as on,
|
|
1198
|
+
k as oneof,
|
|
1199
|
+
tt as removeAttributeTrackers,
|
|
1200
|
+
nt as removeClassTrackers,
|
|
1201
|
+
p as removeDOMNode,
|
|
1202
|
+
st as removeNodeTrackers,
|
|
1203
|
+
ot as removeTextTrackers,
|
|
1204
|
+
Yt as render,
|
|
1205
|
+
ke as renderWithContext,
|
|
1206
|
+
c as renderableOfTNode,
|
|
1207
|
+
Pt as sessionStorageProp,
|
|
1208
|
+
Xe as setAttribute,
|
|
1209
|
+
He as setBooleanProperty,
|
|
1210
|
+
We as setDateProperty,
|
|
1211
|
+
Je as setNumberProperty,
|
|
1212
|
+
Be as setStringProperty,
|
|
1213
|
+
pe as signalText,
|
|
1214
|
+
R as ssr,
|
|
1215
|
+
qt as startSSR,
|
|
1216
|
+
de as staticText,
|
|
1217
|
+
ie as storedProp,
|
|
1218
|
+
$e as stringInterpolate,
|
|
1219
|
+
nr as style,
|
|
1220
|
+
$t as svg,
|
|
1221
|
+
Rt as svgAttr,
|
|
1222
|
+
H as useComputed,
|
|
1223
|
+
At as useEffect,
|
|
1224
|
+
L as useProp,
|
|
1225
|
+
Et as useSignal
|
|
1347
1226
|
};
|