mertani-web-toolkit 0.1.3 → 0.1.4
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/dist/index.es.js +1125 -553
- package/dist/index.umd.js +2 -1
- package/dist/mertani-web-toolkit.css +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,173 +1,216 @@
|
|
|
1
1
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
-
const
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
var
|
|
6
|
-
t
|
|
2
|
+
const E = Symbol(), Be = "http://www.w3.org/1999/xhtml", Ye = "@attach", Xt = !1;
|
|
3
|
+
var Pt = Array.isArray, Ke = Array.prototype.indexOf, St = Object.defineProperty, yt = Object.getOwnPropertyDescriptor, $e = Object.getOwnPropertyDescriptors, He = Object.prototype, We = Array.prototype, te = Object.getPrototypeOf;
|
|
4
|
+
function ze(t) {
|
|
5
|
+
for (var e = 0; e < t.length; e++)
|
|
6
|
+
t[e]();
|
|
7
|
+
}
|
|
8
|
+
function Ge() {
|
|
9
|
+
var t, e, r = new Promise((n, i) => {
|
|
10
|
+
t = n, e = i;
|
|
7
11
|
});
|
|
8
|
-
return { promise:
|
|
12
|
+
return { promise: r, resolve: t, reject: e };
|
|
9
13
|
}
|
|
10
|
-
const
|
|
14
|
+
const N = 2, Rt = 4, ee = 8, X = 16, tt = 32, et = 64, re = 128, R = 256, vt = 512, S = 1024, I = 2048, B = 4096, _t = 8192, rt = 16384, ne = 32768, xt = 1 << 17, Ze = 1 << 18, gt = 1 << 19, Je = 1 << 20, Tt = 1 << 21, It = 1 << 22, H = 1 << 23, lt = Symbol("$state"), Qe = Symbol(""), Dt = new class extends Error {
|
|
11
15
|
name = "StaleReactionError";
|
|
12
16
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
13
17
|
}();
|
|
14
|
-
function
|
|
18
|
+
function Xe() {
|
|
15
19
|
throw new Error("https://svelte.dev/e/await_outside_boundary");
|
|
16
20
|
}
|
|
17
|
-
function
|
|
21
|
+
function tr() {
|
|
18
22
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
19
23
|
}
|
|
20
|
-
function
|
|
24
|
+
function er() {
|
|
21
25
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
22
26
|
}
|
|
23
|
-
function
|
|
27
|
+
function rr() {
|
|
24
28
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
25
29
|
}
|
|
26
|
-
function
|
|
30
|
+
function nr() {
|
|
27
31
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
28
32
|
}
|
|
29
|
-
function
|
|
33
|
+
function ir() {
|
|
30
34
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
31
35
|
}
|
|
32
|
-
function
|
|
36
|
+
function ur() {
|
|
37
|
+
console.warn("https://svelte.dev/e/select_multiple_invalid_value");
|
|
38
|
+
}
|
|
39
|
+
function ie(t) {
|
|
33
40
|
return t === this.v;
|
|
34
41
|
}
|
|
35
|
-
let
|
|
36
|
-
function
|
|
37
|
-
|
|
42
|
+
let lr = !1, F = null;
|
|
43
|
+
function dt(t) {
|
|
44
|
+
F = t;
|
|
45
|
+
}
|
|
46
|
+
function fr(t, e = !1, r) {
|
|
47
|
+
F = {
|
|
48
|
+
p: F,
|
|
49
|
+
c: null,
|
|
50
|
+
e: null,
|
|
51
|
+
s: t,
|
|
52
|
+
x: null,
|
|
53
|
+
l: null
|
|
54
|
+
};
|
|
38
55
|
}
|
|
39
|
-
function
|
|
56
|
+
function sr(t) {
|
|
57
|
+
var e = (
|
|
58
|
+
/** @type {ComponentContext} */
|
|
59
|
+
F
|
|
60
|
+
), r = e.e;
|
|
61
|
+
if (r !== null) {
|
|
62
|
+
e.e = null;
|
|
63
|
+
for (var n of r)
|
|
64
|
+
Sr(n);
|
|
65
|
+
}
|
|
66
|
+
return F = e.p, /** @type {T} */
|
|
67
|
+
{};
|
|
68
|
+
}
|
|
69
|
+
function ue() {
|
|
40
70
|
return !0;
|
|
41
71
|
}
|
|
42
|
-
const
|
|
43
|
-
function
|
|
44
|
-
var e =
|
|
72
|
+
const ar = /* @__PURE__ */ new WeakMap();
|
|
73
|
+
function or(t) {
|
|
74
|
+
var e = b;
|
|
45
75
|
if (e === null)
|
|
46
|
-
return
|
|
47
|
-
if ((e.f &
|
|
48
|
-
if ((e.f &
|
|
49
|
-
throw !e.parent && t instanceof Error &&
|
|
76
|
+
return p.f |= H, t;
|
|
77
|
+
if ((e.f & ne) === 0) {
|
|
78
|
+
if ((e.f & re) === 0)
|
|
79
|
+
throw !e.parent && t instanceof Error && le(t), t;
|
|
50
80
|
e.b.error(t);
|
|
51
81
|
} else
|
|
52
|
-
|
|
82
|
+
Lt(t, e);
|
|
53
83
|
}
|
|
54
|
-
function
|
|
84
|
+
function Lt(t, e) {
|
|
55
85
|
for (; e !== null; ) {
|
|
56
|
-
if ((e.f &
|
|
86
|
+
if ((e.f & re) !== 0)
|
|
57
87
|
try {
|
|
58
88
|
e.b.error(t);
|
|
59
89
|
return;
|
|
60
|
-
} catch (
|
|
61
|
-
t =
|
|
90
|
+
} catch (r) {
|
|
91
|
+
t = r;
|
|
62
92
|
}
|
|
63
93
|
e = e.parent;
|
|
64
94
|
}
|
|
65
|
-
throw t instanceof Error &&
|
|
95
|
+
throw t instanceof Error && le(t), t;
|
|
66
96
|
}
|
|
67
|
-
function
|
|
68
|
-
const e =
|
|
69
|
-
e && (
|
|
97
|
+
function le(t) {
|
|
98
|
+
const e = ar.get(t);
|
|
99
|
+
e && (St(t, "message", {
|
|
70
100
|
value: e.message
|
|
71
|
-
}),
|
|
101
|
+
}), St(t, "stack", {
|
|
72
102
|
value: e.stack
|
|
73
103
|
}));
|
|
74
104
|
}
|
|
75
|
-
|
|
105
|
+
let ht = [];
|
|
106
|
+
function cr() {
|
|
107
|
+
var t = ht;
|
|
108
|
+
ht = [], ze(t);
|
|
109
|
+
}
|
|
110
|
+
function fe(t) {
|
|
111
|
+
ht.length === 0 && queueMicrotask(cr), ht.push(t);
|
|
112
|
+
}
|
|
113
|
+
function vr() {
|
|
76
114
|
for (var t = (
|
|
77
115
|
/** @type {Effect} */
|
|
78
|
-
|
|
116
|
+
b.b
|
|
79
117
|
); t !== null && !t.has_pending_snippet(); )
|
|
80
118
|
t = t.parent;
|
|
81
|
-
return t === null &&
|
|
119
|
+
return t === null && Xe(), t;
|
|
82
120
|
}
|
|
83
121
|
// @__NO_SIDE_EFFECTS__
|
|
84
|
-
function
|
|
85
|
-
var e =
|
|
122
|
+
function se(t) {
|
|
123
|
+
var e = N | I, r = p !== null && (p.f & N) !== 0 ? (
|
|
86
124
|
/** @type {Derived} */
|
|
87
|
-
|
|
125
|
+
p
|
|
88
126
|
) : null;
|
|
89
|
-
return
|
|
90
|
-
ctx:
|
|
127
|
+
return b === null || r !== null && (r.f & R) !== 0 ? e |= R : b.f |= gt, {
|
|
128
|
+
ctx: F,
|
|
91
129
|
deps: null,
|
|
92
130
|
effects: null,
|
|
93
|
-
equals:
|
|
131
|
+
equals: ie,
|
|
94
132
|
f: e,
|
|
95
133
|
fn: t,
|
|
96
134
|
reactions: null,
|
|
97
135
|
rv: 0,
|
|
98
136
|
v: (
|
|
99
137
|
/** @type {V} */
|
|
100
|
-
|
|
138
|
+
E
|
|
101
139
|
),
|
|
102
140
|
wv: 0,
|
|
103
|
-
parent:
|
|
141
|
+
parent: r ?? b,
|
|
104
142
|
ac: null
|
|
105
143
|
};
|
|
106
144
|
}
|
|
107
145
|
// @__NO_SIDE_EFFECTS__
|
|
108
|
-
function
|
|
109
|
-
let
|
|
146
|
+
function _r(t, e) {
|
|
147
|
+
let r = (
|
|
110
148
|
/** @type {Effect | null} */
|
|
111
|
-
|
|
149
|
+
b
|
|
112
150
|
);
|
|
113
|
-
|
|
114
|
-
var
|
|
151
|
+
r === null && tr();
|
|
152
|
+
var n = (
|
|
115
153
|
/** @type {Boundary} */
|
|
116
|
-
|
|
117
|
-
),
|
|
154
|
+
r.b
|
|
155
|
+
), i = (
|
|
118
156
|
/** @type {Promise<V>} */
|
|
119
157
|
/** @type {unknown} */
|
|
120
158
|
void 0
|
|
121
|
-
), u =
|
|
159
|
+
), u = de(
|
|
122
160
|
/** @type {V} */
|
|
123
|
-
|
|
124
|
-
), f = null,
|
|
125
|
-
return
|
|
161
|
+
E
|
|
162
|
+
), f = null, s = !p;
|
|
163
|
+
return Tr(() => {
|
|
126
164
|
try {
|
|
127
|
-
var
|
|
128
|
-
f && Promise.resolve(
|
|
165
|
+
var l = t();
|
|
166
|
+
f && Promise.resolve(l).catch(() => {
|
|
129
167
|
});
|
|
130
|
-
} catch (
|
|
131
|
-
|
|
168
|
+
} catch (_) {
|
|
169
|
+
l = Promise.reject(_);
|
|
132
170
|
}
|
|
133
|
-
var
|
|
134
|
-
|
|
171
|
+
var a = () => l;
|
|
172
|
+
i = f?.then(a, a) ?? Promise.resolve(l), f = i;
|
|
135
173
|
var o = (
|
|
136
174
|
/** @type {Batch} */
|
|
137
|
-
|
|
138
|
-
), c =
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
f = null, c || o.activate(), d ? d !==
|
|
175
|
+
A
|
|
176
|
+
), c = n.pending;
|
|
177
|
+
s && (n.update_pending_count(1), c || o.increment());
|
|
178
|
+
const v = (_, d = void 0) => {
|
|
179
|
+
f = null, c || o.activate(), d ? d !== Dt && (u.f |= H, Ct(u, d)) : ((u.f & H) !== 0 && (u.f ^= H), Ct(u, _)), s && (n.update_pending_count(-1), c || o.decrement()), ve();
|
|
142
180
|
};
|
|
143
|
-
if (
|
|
181
|
+
if (i.then(v, (_) => v(null, _ || "unknown")), o)
|
|
144
182
|
return () => {
|
|
145
183
|
queueMicrotask(() => o.neuter());
|
|
146
184
|
};
|
|
147
|
-
}), new Promise((
|
|
148
|
-
function
|
|
185
|
+
}), new Promise((l) => {
|
|
186
|
+
function a(o) {
|
|
149
187
|
function c() {
|
|
150
|
-
o ===
|
|
188
|
+
o === i ? l(u) : a(i);
|
|
151
189
|
}
|
|
152
190
|
o.then(c, c);
|
|
153
191
|
}
|
|
154
|
-
i
|
|
192
|
+
a(i);
|
|
155
193
|
});
|
|
156
194
|
}
|
|
157
|
-
|
|
195
|
+
// @__NO_SIDE_EFFECTS__
|
|
196
|
+
function Vt(t) {
|
|
197
|
+
const e = /* @__PURE__ */ se(t);
|
|
198
|
+
return Se(e), e;
|
|
199
|
+
}
|
|
200
|
+
function ae(t) {
|
|
158
201
|
var e = t.effects;
|
|
159
202
|
if (e !== null) {
|
|
160
203
|
t.effects = null;
|
|
161
|
-
for (var
|
|
162
|
-
|
|
204
|
+
for (var r = 0; r < e.length; r += 1)
|
|
205
|
+
z(
|
|
163
206
|
/** @type {Effect} */
|
|
164
|
-
e[
|
|
207
|
+
e[r]
|
|
165
208
|
);
|
|
166
209
|
}
|
|
167
210
|
}
|
|
168
|
-
function
|
|
211
|
+
function dr(t) {
|
|
169
212
|
for (var e = t.parent; e !== null; ) {
|
|
170
|
-
if ((e.f &
|
|
213
|
+
if ((e.f & N) === 0)
|
|
171
214
|
return (
|
|
172
215
|
/** @type {Effect} */
|
|
173
216
|
e
|
|
@@ -176,65 +219,65 @@ function be(t) {
|
|
|
176
219
|
}
|
|
177
220
|
return null;
|
|
178
221
|
}
|
|
179
|
-
function
|
|
180
|
-
var e,
|
|
181
|
-
|
|
222
|
+
function Mt(t) {
|
|
223
|
+
var e, r = b;
|
|
224
|
+
U(dr(t));
|
|
182
225
|
try {
|
|
183
|
-
|
|
226
|
+
ae(t), e = Ne(t);
|
|
184
227
|
} finally {
|
|
185
|
-
|
|
228
|
+
U(r);
|
|
186
229
|
}
|
|
187
230
|
return e;
|
|
188
231
|
}
|
|
189
|
-
function
|
|
190
|
-
var e =
|
|
191
|
-
if (t.equals(e) || (t.v = e, t.wv =
|
|
192
|
-
var
|
|
193
|
-
|
|
232
|
+
function oe(t) {
|
|
233
|
+
var e = Mt(t);
|
|
234
|
+
if (t.equals(e) || (t.v = e, t.wv = Oe()), !ct) {
|
|
235
|
+
var r = (V || (t.f & R) !== 0) && t.deps !== null ? B : S;
|
|
236
|
+
C(t, r);
|
|
194
237
|
}
|
|
195
238
|
}
|
|
196
|
-
function
|
|
197
|
-
const
|
|
239
|
+
function ce(t, e, r) {
|
|
240
|
+
const n = se;
|
|
198
241
|
if (e.length === 0) {
|
|
199
|
-
|
|
242
|
+
r(t.map(n));
|
|
200
243
|
return;
|
|
201
244
|
}
|
|
202
|
-
var
|
|
245
|
+
var i = A, u = (
|
|
203
246
|
/** @type {Effect} */
|
|
204
|
-
|
|
205
|
-
), f =
|
|
206
|
-
Promise.all(e.map((
|
|
207
|
-
|
|
247
|
+
b
|
|
248
|
+
), f = hr(), s = vr();
|
|
249
|
+
Promise.all(e.map((l) => /* @__PURE__ */ _r(l))).then((l) => {
|
|
250
|
+
i?.activate(), f();
|
|
208
251
|
try {
|
|
209
|
-
|
|
210
|
-
} catch (
|
|
211
|
-
(u.f &
|
|
252
|
+
r([...t.map(n), ...l]);
|
|
253
|
+
} catch (a) {
|
|
254
|
+
(u.f & rt) === 0 && Lt(a, u);
|
|
212
255
|
}
|
|
213
|
-
|
|
214
|
-
}).catch((
|
|
215
|
-
|
|
256
|
+
i?.deactivate(), ve();
|
|
257
|
+
}).catch((l) => {
|
|
258
|
+
s.error(l);
|
|
216
259
|
});
|
|
217
260
|
}
|
|
218
|
-
function
|
|
219
|
-
var t =
|
|
261
|
+
function hr() {
|
|
262
|
+
var t = b, e = p, r = F, n = A;
|
|
220
263
|
return function() {
|
|
221
|
-
|
|
264
|
+
U(t), L(e), dt(r), n?.activate();
|
|
222
265
|
};
|
|
223
266
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
267
|
+
function ve() {
|
|
268
|
+
U(null), L(null), dt(null);
|
|
226
269
|
}
|
|
227
|
-
const
|
|
228
|
-
let
|
|
229
|
-
function
|
|
270
|
+
const Et = /* @__PURE__ */ new Set();
|
|
271
|
+
let A = null, qt = /* @__PURE__ */ new Set(), pt = [];
|
|
272
|
+
function _e() {
|
|
230
273
|
const t = (
|
|
231
274
|
/** @type {() => void} */
|
|
232
|
-
|
|
275
|
+
pt.shift()
|
|
233
276
|
);
|
|
234
|
-
|
|
277
|
+
pt.length > 0 && queueMicrotask(_e), t();
|
|
235
278
|
}
|
|
236
|
-
let
|
|
237
|
-
class
|
|
279
|
+
let ft = [], jt = null, Ot = !1;
|
|
280
|
+
class st {
|
|
238
281
|
/**
|
|
239
282
|
* The current values of any sources that are updated in this batch
|
|
240
283
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -246,13 +289,13 @@ class W {
|
|
|
246
289
|
* They keys of this map are identical to `this.#current`
|
|
247
290
|
* @type {Map<Source, any>}
|
|
248
291
|
*/
|
|
249
|
-
#
|
|
292
|
+
#s = /* @__PURE__ */ new Map();
|
|
250
293
|
/**
|
|
251
294
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
252
295
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
253
296
|
* @type {Set<() => void>}
|
|
254
297
|
*/
|
|
255
|
-
#
|
|
298
|
+
#i = /* @__PURE__ */ new Set();
|
|
256
299
|
/**
|
|
257
300
|
* The number of async effects that are currently in flight
|
|
258
301
|
*/
|
|
@@ -274,19 +317,19 @@ class W {
|
|
|
274
317
|
* always have the latest values
|
|
275
318
|
* @type {Effect[]}
|
|
276
319
|
*/
|
|
277
|
-
#
|
|
320
|
+
#r = [];
|
|
278
321
|
/**
|
|
279
322
|
* The same as `#async_effects`, but for effects inside a newly-created
|
|
280
323
|
* `<svelte:boundary>` — these do not prevent the batch from committing
|
|
281
324
|
* @type {Effect[]}
|
|
282
325
|
*/
|
|
283
|
-
#
|
|
326
|
+
#u = [];
|
|
284
327
|
/**
|
|
285
328
|
* Template effects and `$effect.pre` effects, which run when
|
|
286
329
|
* a batch is committed
|
|
287
330
|
* @type {Effect[]}
|
|
288
331
|
*/
|
|
289
|
-
#
|
|
332
|
+
#n = [];
|
|
290
333
|
/**
|
|
291
334
|
* The same as `#render_effects`, but for `$effect` (which runs after)
|
|
292
335
|
* @type {Effect[]}
|
|
@@ -297,7 +340,7 @@ class W {
|
|
|
297
340
|
* in order to update internal sources (e.g. each block items)
|
|
298
341
|
* @type {Effect[]}
|
|
299
342
|
*/
|
|
300
|
-
#
|
|
343
|
+
#l = [];
|
|
301
344
|
/**
|
|
302
345
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
303
346
|
* @type {Effect[]}
|
|
@@ -319,57 +362,57 @@ class W {
|
|
|
319
362
|
* @param {Effect[]} root_effects
|
|
320
363
|
*/
|
|
321
364
|
process(e) {
|
|
322
|
-
|
|
323
|
-
for (const
|
|
324
|
-
this.#
|
|
325
|
-
if (this.#
|
|
365
|
+
ft = [];
|
|
366
|
+
for (const i of e)
|
|
367
|
+
this.#d(i);
|
|
368
|
+
if (this.#r.length === 0 && this.#t === 0) {
|
|
326
369
|
this.#_();
|
|
327
|
-
var
|
|
328
|
-
this.#
|
|
370
|
+
var r = this.#n, n = this.#e;
|
|
371
|
+
this.#n = [], this.#e = [], this.#l = [], A = null, Ut(r), Ut(n), A === null ? A = this : Et.delete(this), this.#a?.resolve();
|
|
329
372
|
} else
|
|
330
|
-
this.#f(this.#
|
|
331
|
-
for (const
|
|
332
|
-
|
|
333
|
-
for (const
|
|
334
|
-
|
|
335
|
-
this.#
|
|
373
|
+
this.#f(this.#n), this.#f(this.#e), this.#f(this.#l);
|
|
374
|
+
for (const i of this.#r)
|
|
375
|
+
Q(i);
|
|
376
|
+
for (const i of this.#u)
|
|
377
|
+
Q(i);
|
|
378
|
+
this.#r = [], this.#u = [];
|
|
336
379
|
}
|
|
337
380
|
/**
|
|
338
381
|
* Traverse the effect tree, executing effects or stashing
|
|
339
382
|
* them for later execution as appropriate
|
|
340
383
|
* @param {Effect} root
|
|
341
384
|
*/
|
|
342
|
-
#
|
|
343
|
-
e.f ^=
|
|
344
|
-
for (var
|
|
345
|
-
var
|
|
346
|
-
if (!f &&
|
|
347
|
-
if (
|
|
348
|
-
|
|
349
|
-
else if ((
|
|
350
|
-
this.#e.push(
|
|
351
|
-
else if ((
|
|
352
|
-
if ((
|
|
353
|
-
var
|
|
354
|
-
|
|
355
|
-
} else
|
|
356
|
-
var
|
|
357
|
-
if (
|
|
358
|
-
|
|
385
|
+
#d(e) {
|
|
386
|
+
e.f ^= S;
|
|
387
|
+
for (var r = e.first; r !== null; ) {
|
|
388
|
+
var n = r.f, i = (n & (tt | et)) !== 0, u = i && (n & S) !== 0, f = u || (n & _t) !== 0 || this.skipped_effects.has(r);
|
|
389
|
+
if (!f && r.fn !== null) {
|
|
390
|
+
if (i)
|
|
391
|
+
r.f ^= S;
|
|
392
|
+
else if ((n & Rt) !== 0)
|
|
393
|
+
this.#e.push(r);
|
|
394
|
+
else if ((n & S) === 0)
|
|
395
|
+
if ((n & It) !== 0) {
|
|
396
|
+
var s = r.b?.pending ? this.#u : this.#r;
|
|
397
|
+
s.push(r);
|
|
398
|
+
} else wt(r) && ((r.f & X) !== 0 && this.#l.push(r), Q(r));
|
|
399
|
+
var l = r.first;
|
|
400
|
+
if (l !== null) {
|
|
401
|
+
r = l;
|
|
359
402
|
continue;
|
|
360
403
|
}
|
|
361
404
|
}
|
|
362
|
-
var
|
|
363
|
-
for (
|
|
364
|
-
|
|
405
|
+
var a = r.parent;
|
|
406
|
+
for (r = r.next; r === null && a !== null; )
|
|
407
|
+
r = a.next, a = a.parent;
|
|
365
408
|
}
|
|
366
409
|
}
|
|
367
410
|
/**
|
|
368
411
|
* @param {Effect[]} effects
|
|
369
412
|
*/
|
|
370
413
|
#f(e) {
|
|
371
|
-
for (const
|
|
372
|
-
((
|
|
414
|
+
for (const r of e)
|
|
415
|
+
((r.f & I) !== 0 ? this.#c : this.#v).push(r), C(r, S);
|
|
373
416
|
e.length = 0;
|
|
374
417
|
}
|
|
375
418
|
/**
|
|
@@ -378,32 +421,32 @@ class W {
|
|
|
378
421
|
* @param {Source} source
|
|
379
422
|
* @param {any} value
|
|
380
423
|
*/
|
|
381
|
-
capture(e,
|
|
382
|
-
this.#
|
|
424
|
+
capture(e, r) {
|
|
425
|
+
this.#s.has(e) || this.#s.set(e, r), this.current.set(e, e.v);
|
|
383
426
|
}
|
|
384
427
|
activate() {
|
|
385
|
-
|
|
428
|
+
A = this;
|
|
386
429
|
}
|
|
387
430
|
deactivate() {
|
|
388
|
-
|
|
389
|
-
for (const e of
|
|
390
|
-
if (
|
|
431
|
+
A = null;
|
|
432
|
+
for (const e of qt)
|
|
433
|
+
if (qt.delete(e), e(), A !== null)
|
|
391
434
|
break;
|
|
392
435
|
}
|
|
393
436
|
neuter() {
|
|
394
437
|
this.#o = !0;
|
|
395
438
|
}
|
|
396
439
|
flush() {
|
|
397
|
-
|
|
440
|
+
ft.length > 0 ? pr() : this.#_(), A === this && (this.#t === 0 && Et.delete(this), this.deactivate());
|
|
398
441
|
}
|
|
399
442
|
/**
|
|
400
443
|
* Append and remove branches to/from the DOM
|
|
401
444
|
*/
|
|
402
445
|
#_() {
|
|
403
446
|
if (!this.#o)
|
|
404
|
-
for (const e of this.#
|
|
447
|
+
for (const e of this.#i)
|
|
405
448
|
e();
|
|
406
|
-
this.#
|
|
449
|
+
this.#i.clear();
|
|
407
450
|
}
|
|
408
451
|
increment() {
|
|
409
452
|
this.#t += 1;
|
|
@@ -411,682 +454,1211 @@ class W {
|
|
|
411
454
|
decrement() {
|
|
412
455
|
if (this.#t -= 1, this.#t === 0) {
|
|
413
456
|
for (const e of this.#c)
|
|
414
|
-
|
|
457
|
+
C(e, I), at(e);
|
|
415
458
|
for (const e of this.#v)
|
|
416
|
-
|
|
417
|
-
this.#
|
|
459
|
+
C(e, B), at(e);
|
|
460
|
+
this.#n = [], this.#e = [], this.flush();
|
|
418
461
|
} else
|
|
419
462
|
this.deactivate();
|
|
420
463
|
}
|
|
421
464
|
/** @param {() => void} fn */
|
|
422
465
|
add_callback(e) {
|
|
423
|
-
this.#
|
|
466
|
+
this.#i.add(e);
|
|
424
467
|
}
|
|
425
468
|
settled() {
|
|
426
|
-
return (this.#a ??=
|
|
469
|
+
return (this.#a ??= Ge()).promise;
|
|
427
470
|
}
|
|
428
471
|
static ensure() {
|
|
429
|
-
if (
|
|
430
|
-
const e =
|
|
431
|
-
|
|
432
|
-
|
|
472
|
+
if (A === null) {
|
|
473
|
+
const e = A = new st();
|
|
474
|
+
Et.add(A), st.enqueue(() => {
|
|
475
|
+
A === e && e.flush();
|
|
433
476
|
});
|
|
434
477
|
}
|
|
435
|
-
return
|
|
478
|
+
return A;
|
|
436
479
|
}
|
|
437
480
|
/** @param {() => void} task */
|
|
438
481
|
static enqueue(e) {
|
|
439
|
-
|
|
482
|
+
pt.length === 0 && queueMicrotask(_e), pt.unshift(e);
|
|
440
483
|
}
|
|
441
484
|
}
|
|
442
|
-
function
|
|
443
|
-
var t =
|
|
444
|
-
|
|
485
|
+
function pr() {
|
|
486
|
+
var t = J;
|
|
487
|
+
Ot = !0;
|
|
445
488
|
try {
|
|
446
489
|
var e = 0;
|
|
447
|
-
for (
|
|
448
|
-
var
|
|
490
|
+
for (Yt(!0); ft.length > 0; ) {
|
|
491
|
+
var r = st.ensure();
|
|
449
492
|
if (e++ > 1e3) {
|
|
450
|
-
var
|
|
451
|
-
|
|
493
|
+
var n, i;
|
|
494
|
+
br();
|
|
452
495
|
}
|
|
453
|
-
|
|
496
|
+
r.process(ft), q.clear();
|
|
454
497
|
}
|
|
455
498
|
} finally {
|
|
456
|
-
|
|
499
|
+
Ot = !1, Yt(t), jt = null;
|
|
457
500
|
}
|
|
458
501
|
}
|
|
459
|
-
function
|
|
502
|
+
function br() {
|
|
460
503
|
try {
|
|
461
|
-
|
|
504
|
+
er();
|
|
462
505
|
} catch (t) {
|
|
463
|
-
|
|
506
|
+
Lt(t, jt);
|
|
464
507
|
}
|
|
465
508
|
}
|
|
466
|
-
let
|
|
467
|
-
function
|
|
509
|
+
let K = null;
|
|
510
|
+
function Ut(t) {
|
|
468
511
|
var e = t.length;
|
|
469
512
|
if (e !== 0) {
|
|
470
|
-
for (var
|
|
471
|
-
var
|
|
472
|
-
if ((
|
|
473
|
-
|
|
474
|
-
for (const
|
|
475
|
-
|
|
476
|
-
|
|
513
|
+
for (var r = 0; r < e; ) {
|
|
514
|
+
var n = t[r++];
|
|
515
|
+
if ((n.f & (rt | _t)) === 0 && wt(n) && (K = [], Q(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? me(n) : n.fn = null), K?.length > 0)) {
|
|
516
|
+
q.clear();
|
|
517
|
+
for (const i of K)
|
|
518
|
+
Q(i);
|
|
519
|
+
K = [];
|
|
477
520
|
}
|
|
478
521
|
}
|
|
479
|
-
|
|
522
|
+
K = null;
|
|
480
523
|
}
|
|
481
524
|
}
|
|
482
|
-
function
|
|
483
|
-
for (var e =
|
|
525
|
+
function at(t) {
|
|
526
|
+
for (var e = jt = t; e.parent !== null; ) {
|
|
484
527
|
e = e.parent;
|
|
485
|
-
var
|
|
486
|
-
if (
|
|
528
|
+
var r = e.f;
|
|
529
|
+
if (Ot && e === b && (r & X) !== 0)
|
|
487
530
|
return;
|
|
488
|
-
if ((
|
|
489
|
-
if ((
|
|
490
|
-
e.f ^=
|
|
531
|
+
if ((r & (et | tt)) !== 0) {
|
|
532
|
+
if ((r & S) === 0) return;
|
|
533
|
+
e.f ^= S;
|
|
491
534
|
}
|
|
492
535
|
}
|
|
493
|
-
|
|
536
|
+
ft.push(e);
|
|
494
537
|
}
|
|
495
|
-
const
|
|
496
|
-
function
|
|
497
|
-
var
|
|
538
|
+
const q = /* @__PURE__ */ new Map();
|
|
539
|
+
function de(t, e) {
|
|
540
|
+
var r = {
|
|
498
541
|
f: 0,
|
|
499
542
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
500
543
|
v: t,
|
|
501
544
|
reactions: null,
|
|
502
|
-
equals:
|
|
545
|
+
equals: ie,
|
|
503
546
|
rv: 0,
|
|
504
547
|
wv: 0
|
|
505
548
|
};
|
|
506
|
-
return
|
|
549
|
+
return r;
|
|
507
550
|
}
|
|
508
551
|
// @__NO_SIDE_EFFECTS__
|
|
509
|
-
function
|
|
510
|
-
const
|
|
511
|
-
return
|
|
552
|
+
function M(t, e) {
|
|
553
|
+
const r = de(t);
|
|
554
|
+
return Se(r), r;
|
|
512
555
|
}
|
|
513
|
-
function
|
|
514
|
-
|
|
556
|
+
function x(t, e, r = !1) {
|
|
557
|
+
p !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
515
558
|
// to ensure we error if state is set inside an inspect effect
|
|
516
|
-
(
|
|
517
|
-
let
|
|
518
|
-
return
|
|
559
|
+
(!$ || (p.f & xt) !== 0) && ue() && (p.f & (N | X | It | xt)) !== 0 && !j?.includes(t) && ir();
|
|
560
|
+
let n = r ? ut(e) : e;
|
|
561
|
+
return Ct(t, n);
|
|
519
562
|
}
|
|
520
|
-
function
|
|
563
|
+
function Ct(t, e) {
|
|
521
564
|
if (!t.equals(e)) {
|
|
522
|
-
var
|
|
523
|
-
|
|
524
|
-
var
|
|
525
|
-
|
|
565
|
+
var r = t.v;
|
|
566
|
+
ct ? q.set(t, e) : q.set(t, r), t.v = e;
|
|
567
|
+
var n = st.ensure();
|
|
568
|
+
n.capture(t, r), (t.f & N) !== 0 && ((t.f & I) !== 0 && Mt(
|
|
526
569
|
/** @type {Derived} */
|
|
527
570
|
t
|
|
528
|
-
),
|
|
571
|
+
), C(t, (t.f & R) === 0 ? S : B)), t.wv = Oe(), he(t, I), b !== null && (b.f & S) !== 0 && (b.f & (tt | et)) === 0 && (P === null ? Nr([t]) : P.push(t));
|
|
529
572
|
}
|
|
530
573
|
return e;
|
|
531
574
|
}
|
|
532
|
-
function
|
|
533
|
-
|
|
575
|
+
function kt(t) {
|
|
576
|
+
x(t, t.v + 1);
|
|
534
577
|
}
|
|
535
|
-
function
|
|
536
|
-
var
|
|
537
|
-
if (
|
|
538
|
-
for (var
|
|
539
|
-
var u =
|
|
540
|
-
|
|
578
|
+
function he(t, e) {
|
|
579
|
+
var r = t.reactions;
|
|
580
|
+
if (r !== null)
|
|
581
|
+
for (var n = r.length, i = 0; i < n; i++) {
|
|
582
|
+
var u = r[i], f = u.f, s = (f & I) === 0;
|
|
583
|
+
s && C(u, e), (f & N) !== 0 ? he(
|
|
541
584
|
/** @type {Derived} */
|
|
542
585
|
u,
|
|
543
|
-
|
|
544
|
-
) :
|
|
586
|
+
B
|
|
587
|
+
) : s && ((f & X) !== 0 && K !== null && K.push(
|
|
545
588
|
/** @type {Effect} */
|
|
546
589
|
u
|
|
547
|
-
),
|
|
590
|
+
), at(
|
|
548
591
|
/** @type {Effect} */
|
|
549
592
|
u
|
|
550
593
|
));
|
|
551
594
|
}
|
|
552
595
|
}
|
|
553
|
-
function
|
|
554
|
-
if (typeof t != "object" || t === null ||
|
|
596
|
+
function ut(t) {
|
|
597
|
+
if (typeof t != "object" || t === null || lt in t)
|
|
555
598
|
return t;
|
|
556
|
-
const e =
|
|
557
|
-
if (e !==
|
|
599
|
+
const e = te(t);
|
|
600
|
+
if (e !== He && e !== We)
|
|
558
601
|
return t;
|
|
559
|
-
var
|
|
560
|
-
if (
|
|
561
|
-
return
|
|
562
|
-
var
|
|
563
|
-
|
|
564
|
-
var o =
|
|
565
|
-
return
|
|
602
|
+
var r = /* @__PURE__ */ new Map(), n = Pt(t), i = /* @__PURE__ */ M(0), u = W, f = (s) => {
|
|
603
|
+
if (W === u)
|
|
604
|
+
return s();
|
|
605
|
+
var l = p, a = W;
|
|
606
|
+
L(null), $t(u);
|
|
607
|
+
var o = s();
|
|
608
|
+
return L(l), $t(a), o;
|
|
566
609
|
};
|
|
567
|
-
return
|
|
610
|
+
return n && r.set("length", /* @__PURE__ */ M(
|
|
568
611
|
/** @type {any[]} */
|
|
569
612
|
t.length
|
|
570
613
|
)), new Proxy(
|
|
571
614
|
/** @type {any} */
|
|
572
615
|
t,
|
|
573
616
|
{
|
|
574
|
-
defineProperty(
|
|
575
|
-
(!("value" in
|
|
576
|
-
var o =
|
|
617
|
+
defineProperty(s, l, a) {
|
|
618
|
+
(!("value" in a) || a.configurable === !1 || a.enumerable === !1 || a.writable === !1) && rr();
|
|
619
|
+
var o = r.get(l);
|
|
577
620
|
return o === void 0 ? o = f(() => {
|
|
578
|
-
var c = /* @__PURE__ */
|
|
579
|
-
return
|
|
580
|
-
}) :
|
|
621
|
+
var c = /* @__PURE__ */ M(a.value);
|
|
622
|
+
return r.set(l, c), c;
|
|
623
|
+
}) : x(o, a.value, !0), !0;
|
|
581
624
|
},
|
|
582
|
-
deleteProperty(
|
|
583
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
if (
|
|
586
|
-
const o = f(() => /* @__PURE__ */
|
|
587
|
-
|
|
625
|
+
deleteProperty(s, l) {
|
|
626
|
+
var a = r.get(l);
|
|
627
|
+
if (a === void 0) {
|
|
628
|
+
if (l in s) {
|
|
629
|
+
const o = f(() => /* @__PURE__ */ M(E));
|
|
630
|
+
r.set(l, o), kt(i);
|
|
588
631
|
}
|
|
589
632
|
} else
|
|
590
|
-
|
|
633
|
+
x(a, E), kt(i);
|
|
591
634
|
return !0;
|
|
592
635
|
},
|
|
593
|
-
get(
|
|
594
|
-
if (
|
|
636
|
+
get(s, l, a) {
|
|
637
|
+
if (l === lt)
|
|
595
638
|
return t;
|
|
596
|
-
var o =
|
|
597
|
-
if (o === void 0 && (!c ||
|
|
598
|
-
var
|
|
639
|
+
var o = r.get(l), c = l in s;
|
|
640
|
+
if (o === void 0 && (!c || yt(s, l)?.writable) && (o = f(() => {
|
|
641
|
+
var _ = ut(c ? s[l] : E), d = /* @__PURE__ */ M(_);
|
|
599
642
|
return d;
|
|
600
|
-
}),
|
|
601
|
-
var
|
|
602
|
-
return
|
|
643
|
+
}), r.set(l, o)), o !== void 0) {
|
|
644
|
+
var v = D(o);
|
|
645
|
+
return v === E ? void 0 : v;
|
|
603
646
|
}
|
|
604
|
-
return Reflect.get(
|
|
647
|
+
return Reflect.get(s, l, a);
|
|
605
648
|
},
|
|
606
|
-
getOwnPropertyDescriptor(
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
609
|
-
var o =
|
|
610
|
-
o && (
|
|
611
|
-
} else if (
|
|
612
|
-
var c =
|
|
613
|
-
if (c !== void 0 &&
|
|
649
|
+
getOwnPropertyDescriptor(s, l) {
|
|
650
|
+
var a = Reflect.getOwnPropertyDescriptor(s, l);
|
|
651
|
+
if (a && "value" in a) {
|
|
652
|
+
var o = r.get(l);
|
|
653
|
+
o && (a.value = D(o));
|
|
654
|
+
} else if (a === void 0) {
|
|
655
|
+
var c = r.get(l), v = c?.v;
|
|
656
|
+
if (c !== void 0 && v !== E)
|
|
614
657
|
return {
|
|
615
658
|
enumerable: !0,
|
|
616
659
|
configurable: !0,
|
|
617
|
-
value:
|
|
660
|
+
value: v,
|
|
618
661
|
writable: !0
|
|
619
662
|
};
|
|
620
663
|
}
|
|
621
|
-
return
|
|
664
|
+
return a;
|
|
622
665
|
},
|
|
623
|
-
has(
|
|
624
|
-
if (
|
|
666
|
+
has(s, l) {
|
|
667
|
+
if (l === lt)
|
|
625
668
|
return !0;
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
628
|
-
|
|
629
|
-
var
|
|
630
|
-
return
|
|
631
|
-
}),
|
|
632
|
-
var c =
|
|
633
|
-
if (c ===
|
|
669
|
+
var a = r.get(l), o = a !== void 0 && a.v !== E || Reflect.has(s, l);
|
|
670
|
+
if (a !== void 0 || b !== null && (!o || yt(s, l)?.writable)) {
|
|
671
|
+
a === void 0 && (a = f(() => {
|
|
672
|
+
var v = o ? ut(s[l]) : E, _ = /* @__PURE__ */ M(v);
|
|
673
|
+
return _;
|
|
674
|
+
}), r.set(l, a));
|
|
675
|
+
var c = D(a);
|
|
676
|
+
if (c === E)
|
|
634
677
|
return !1;
|
|
635
678
|
}
|
|
636
679
|
return o;
|
|
637
680
|
},
|
|
638
|
-
set(
|
|
639
|
-
var c =
|
|
640
|
-
if (
|
|
641
|
-
for (var
|
|
642
|
-
c.v;
|
|
643
|
-
var d =
|
|
644
|
-
d !== void 0 ?
|
|
681
|
+
set(s, l, a, o) {
|
|
682
|
+
var c = r.get(l), v = l in s;
|
|
683
|
+
if (n && l === "length")
|
|
684
|
+
for (var _ = a; _ < /** @type {Source<number>} */
|
|
685
|
+
c.v; _ += 1) {
|
|
686
|
+
var d = r.get(_ + "");
|
|
687
|
+
d !== void 0 ? x(d, E) : _ in s && (d = f(() => /* @__PURE__ */ M(E)), r.set(_ + "", d));
|
|
645
688
|
}
|
|
646
689
|
if (c === void 0)
|
|
647
|
-
(!
|
|
690
|
+
(!v || yt(s, l)?.writable) && (c = f(() => /* @__PURE__ */ M(void 0)), x(c, ut(a)), r.set(l, c));
|
|
648
691
|
else {
|
|
649
|
-
|
|
650
|
-
var
|
|
651
|
-
|
|
692
|
+
v = c.v !== E;
|
|
693
|
+
var g = f(() => ut(a));
|
|
694
|
+
x(c, g);
|
|
652
695
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
if (
|
|
656
|
-
var
|
|
696
|
+
var y = Reflect.getOwnPropertyDescriptor(s, l);
|
|
697
|
+
if (y?.set && y.set.call(o, a), !v) {
|
|
698
|
+
if (n && typeof l == "string") {
|
|
699
|
+
var Y = (
|
|
657
700
|
/** @type {Source<number>} */
|
|
658
|
-
|
|
659
|
-
),
|
|
660
|
-
Number.isInteger(
|
|
701
|
+
r.get("length")
|
|
702
|
+
), h = Number(l);
|
|
703
|
+
Number.isInteger(h) && h >= Y.v && x(Y, h + 1);
|
|
661
704
|
}
|
|
662
|
-
|
|
705
|
+
kt(i);
|
|
663
706
|
}
|
|
664
707
|
return !0;
|
|
665
708
|
},
|
|
666
|
-
ownKeys(
|
|
667
|
-
|
|
668
|
-
var
|
|
669
|
-
var
|
|
670
|
-
return
|
|
709
|
+
ownKeys(s) {
|
|
710
|
+
D(i);
|
|
711
|
+
var l = Reflect.ownKeys(s).filter((c) => {
|
|
712
|
+
var v = r.get(c);
|
|
713
|
+
return v === void 0 || v.v !== E;
|
|
671
714
|
});
|
|
672
|
-
for (var [
|
|
673
|
-
o.v !==
|
|
674
|
-
return
|
|
715
|
+
for (var [a, o] of r)
|
|
716
|
+
o.v !== E && !(a in s) && l.push(a);
|
|
717
|
+
return l;
|
|
675
718
|
},
|
|
676
719
|
setPrototypeOf() {
|
|
677
|
-
|
|
720
|
+
nr();
|
|
678
721
|
}
|
|
679
722
|
}
|
|
680
723
|
);
|
|
681
724
|
}
|
|
682
|
-
|
|
725
|
+
function Bt(t) {
|
|
726
|
+
try {
|
|
727
|
+
if (t !== null && typeof t == "object" && lt in t)
|
|
728
|
+
return t[lt];
|
|
729
|
+
} catch {
|
|
730
|
+
}
|
|
731
|
+
return t;
|
|
732
|
+
}
|
|
733
|
+
function gr(t, e) {
|
|
734
|
+
return Object.is(Bt(t), Bt(e));
|
|
735
|
+
}
|
|
736
|
+
var wr, yr;
|
|
683
737
|
// @__NO_SIDE_EFFECTS__
|
|
684
|
-
function
|
|
685
|
-
return
|
|
738
|
+
function pe(t) {
|
|
739
|
+
return wr.call(t);
|
|
686
740
|
}
|
|
687
741
|
// @__NO_SIDE_EFFECTS__
|
|
688
|
-
function
|
|
689
|
-
return
|
|
742
|
+
function Er(t) {
|
|
743
|
+
return yr.call(t);
|
|
690
744
|
}
|
|
691
|
-
function
|
|
692
|
-
return /* @__PURE__ */
|
|
745
|
+
function be(t, e) {
|
|
746
|
+
return /* @__PURE__ */ pe(t);
|
|
693
747
|
}
|
|
694
|
-
function
|
|
695
|
-
|
|
696
|
-
|
|
748
|
+
function kr(t, e) {
|
|
749
|
+
if (e) {
|
|
750
|
+
const r = document.body;
|
|
751
|
+
t.autofocus = !0, fe(() => {
|
|
752
|
+
document.activeElement === r && t.focus();
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
function Ft(t) {
|
|
757
|
+
var e = p, r = b;
|
|
758
|
+
L(null), U(null);
|
|
697
759
|
try {
|
|
698
760
|
return t();
|
|
699
761
|
} finally {
|
|
700
|
-
|
|
762
|
+
L(e), U(r);
|
|
701
763
|
}
|
|
702
764
|
}
|
|
703
|
-
function
|
|
704
|
-
var
|
|
705
|
-
|
|
765
|
+
function Ar(t, e) {
|
|
766
|
+
var r = e.last;
|
|
767
|
+
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
706
768
|
}
|
|
707
|
-
function
|
|
708
|
-
var
|
|
709
|
-
|
|
769
|
+
function G(t, e, r, n = !0) {
|
|
770
|
+
var i = b;
|
|
771
|
+
i !== null && (i.f & _t) !== 0 && (t |= _t);
|
|
710
772
|
var u = {
|
|
711
|
-
ctx:
|
|
773
|
+
ctx: F,
|
|
712
774
|
deps: null,
|
|
713
775
|
nodes_start: null,
|
|
714
776
|
nodes_end: null,
|
|
715
|
-
f: t |
|
|
777
|
+
f: t | I,
|
|
716
778
|
first: null,
|
|
717
779
|
fn: e,
|
|
718
780
|
last: null,
|
|
719
781
|
next: null,
|
|
720
|
-
parent:
|
|
721
|
-
b:
|
|
782
|
+
parent: i,
|
|
783
|
+
b: i && i.b,
|
|
722
784
|
prev: null,
|
|
723
785
|
teardown: null,
|
|
724
786
|
transitions: null,
|
|
725
787
|
wv: 0,
|
|
726
788
|
ac: null
|
|
727
789
|
};
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
790
|
+
if (r)
|
|
791
|
+
try {
|
|
792
|
+
Q(u), u.f |= ne;
|
|
793
|
+
} catch (l) {
|
|
794
|
+
throw z(u), l;
|
|
795
|
+
}
|
|
796
|
+
else e !== null && at(u);
|
|
797
|
+
if (n) {
|
|
734
798
|
var f = u;
|
|
735
|
-
if (f.deps === null && f.teardown === null && f.nodes_start === null && f.first === f.last && // either `null`, or a singular child
|
|
736
|
-
(f.f &
|
|
737
|
-
var
|
|
799
|
+
if (r && f.deps === null && f.teardown === null && f.nodes_start === null && f.first === f.last && // either `null`, or a singular child
|
|
800
|
+
(f.f & gt) === 0 && (f = f.first), f !== null && (f.parent = i, i !== null && Ar(f, i), p !== null && (p.f & N) !== 0 && (t & et) === 0)) {
|
|
801
|
+
var s = (
|
|
738
802
|
/** @type {Derived} */
|
|
739
|
-
|
|
803
|
+
p
|
|
740
804
|
);
|
|
741
|
-
(
|
|
805
|
+
(s.effects ??= []).push(f);
|
|
742
806
|
}
|
|
743
807
|
}
|
|
744
808
|
return u;
|
|
745
809
|
}
|
|
746
|
-
function
|
|
747
|
-
|
|
810
|
+
function mr(t) {
|
|
811
|
+
const e = G(ee, null, !1);
|
|
812
|
+
return C(e, S), e.teardown = t, e;
|
|
813
|
+
}
|
|
814
|
+
function Sr(t) {
|
|
815
|
+
return G(Rt | Je, t, !1);
|
|
816
|
+
}
|
|
817
|
+
function ge(t) {
|
|
818
|
+
return G(Rt, t, !1);
|
|
748
819
|
}
|
|
749
|
-
function
|
|
750
|
-
|
|
751
|
-
|
|
820
|
+
function Tr(t) {
|
|
821
|
+
return G(It | gt, t, !0);
|
|
822
|
+
}
|
|
823
|
+
function we(t, e = [], r = []) {
|
|
824
|
+
ce(e, r, (n) => {
|
|
825
|
+
G(ee, () => t(...n.map(D)), !0);
|
|
752
826
|
});
|
|
753
827
|
}
|
|
754
|
-
function
|
|
828
|
+
function ye(t, e = 0) {
|
|
829
|
+
var r = G(X | e, t, !0);
|
|
830
|
+
return r;
|
|
831
|
+
}
|
|
832
|
+
function Ee(t, e = !0) {
|
|
833
|
+
return G(tt | gt, t, !0, e);
|
|
834
|
+
}
|
|
835
|
+
function ke(t) {
|
|
755
836
|
var e = t.teardown;
|
|
756
837
|
if (e !== null) {
|
|
757
|
-
const
|
|
758
|
-
|
|
838
|
+
const r = ct, n = p;
|
|
839
|
+
Kt(!0), L(null);
|
|
759
840
|
try {
|
|
760
841
|
e.call(null);
|
|
761
842
|
} finally {
|
|
762
|
-
|
|
843
|
+
Kt(r), L(n);
|
|
763
844
|
}
|
|
764
845
|
}
|
|
765
846
|
}
|
|
766
|
-
function
|
|
767
|
-
var
|
|
768
|
-
for (t.first = t.last = null;
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
|
|
847
|
+
function Ae(t, e = !1) {
|
|
848
|
+
var r = t.first;
|
|
849
|
+
for (t.first = t.last = null; r !== null; ) {
|
|
850
|
+
const i = r.ac;
|
|
851
|
+
i !== null && Ft(() => {
|
|
852
|
+
i.abort(Dt);
|
|
772
853
|
});
|
|
773
|
-
var
|
|
774
|
-
(
|
|
854
|
+
var n = r.next;
|
|
855
|
+
(r.f & et) !== 0 ? r.parent = null : z(r, e), r = n;
|
|
775
856
|
}
|
|
776
857
|
}
|
|
777
|
-
function
|
|
858
|
+
function Or(t) {
|
|
778
859
|
for (var e = t.first; e !== null; ) {
|
|
779
|
-
var
|
|
780
|
-
(e.f &
|
|
860
|
+
var r = e.next;
|
|
861
|
+
(e.f & tt) === 0 && z(e), e = r;
|
|
781
862
|
}
|
|
782
863
|
}
|
|
783
|
-
function
|
|
784
|
-
var
|
|
785
|
-
(e || (t.f &
|
|
864
|
+
function z(t, e = !0) {
|
|
865
|
+
var r = !1;
|
|
866
|
+
(e || (t.f & Ze) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (Cr(
|
|
786
867
|
t.nodes_start,
|
|
787
868
|
/** @type {TemplateNode} */
|
|
788
869
|
t.nodes_end
|
|
789
|
-
),
|
|
790
|
-
var
|
|
791
|
-
if (
|
|
792
|
-
for (const u of
|
|
870
|
+
), r = !0), Ae(t, e && !r), bt(t, 0), C(t, rt);
|
|
871
|
+
var n = t.transitions;
|
|
872
|
+
if (n !== null)
|
|
873
|
+
for (const u of n)
|
|
793
874
|
u.stop();
|
|
794
|
-
|
|
795
|
-
var
|
|
796
|
-
|
|
875
|
+
ke(t);
|
|
876
|
+
var i = t.parent;
|
|
877
|
+
i !== null && i.first !== null && me(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
|
|
797
878
|
}
|
|
798
|
-
function
|
|
879
|
+
function Cr(t, e) {
|
|
799
880
|
for (; t !== null; ) {
|
|
800
|
-
var
|
|
881
|
+
var r = t === e ? null : (
|
|
801
882
|
/** @type {TemplateNode} */
|
|
802
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ Er(t)
|
|
803
884
|
);
|
|
804
|
-
t.remove(), t =
|
|
885
|
+
t.remove(), t = r;
|
|
805
886
|
}
|
|
806
887
|
}
|
|
807
|
-
function
|
|
808
|
-
var e = t.parent,
|
|
809
|
-
|
|
810
|
-
}
|
|
811
|
-
let L = !1;
|
|
812
|
-
function St(t) {
|
|
813
|
-
L = t;
|
|
888
|
+
function me(t) {
|
|
889
|
+
var e = t.parent, r = t.prev, n = t.next;
|
|
890
|
+
r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
|
|
814
891
|
}
|
|
815
892
|
let J = !1;
|
|
816
|
-
function
|
|
893
|
+
function Yt(t) {
|
|
817
894
|
J = t;
|
|
818
895
|
}
|
|
819
|
-
let
|
|
820
|
-
function
|
|
821
|
-
|
|
896
|
+
let ct = !1;
|
|
897
|
+
function Kt(t) {
|
|
898
|
+
ct = t;
|
|
822
899
|
}
|
|
823
|
-
let
|
|
824
|
-
function
|
|
825
|
-
|
|
900
|
+
let p = null, $ = !1;
|
|
901
|
+
function L(t) {
|
|
902
|
+
p = t;
|
|
826
903
|
}
|
|
827
|
-
let
|
|
828
|
-
function
|
|
829
|
-
|
|
904
|
+
let b = null;
|
|
905
|
+
function U(t) {
|
|
906
|
+
b = t;
|
|
830
907
|
}
|
|
831
|
-
let
|
|
832
|
-
function
|
|
833
|
-
|
|
908
|
+
let j = null;
|
|
909
|
+
function Se(t) {
|
|
910
|
+
p !== null && (j === null ? j = [t] : j.push(t));
|
|
834
911
|
}
|
|
835
|
-
let
|
|
836
|
-
function
|
|
837
|
-
|
|
912
|
+
let m = null, O = 0, P = null;
|
|
913
|
+
function Nr(t) {
|
|
914
|
+
P = t;
|
|
838
915
|
}
|
|
839
|
-
let
|
|
840
|
-
function
|
|
841
|
-
|
|
916
|
+
let Te = 1, ot = 0, W = ot;
|
|
917
|
+
function $t(t) {
|
|
918
|
+
W = t;
|
|
842
919
|
}
|
|
843
|
-
|
|
920
|
+
let V = !1;
|
|
921
|
+
function Oe() {
|
|
922
|
+
return ++Te;
|
|
923
|
+
}
|
|
924
|
+
function wt(t) {
|
|
844
925
|
var e = t.f;
|
|
845
|
-
if ((e &
|
|
926
|
+
if ((e & I) !== 0)
|
|
846
927
|
return !0;
|
|
847
|
-
if ((e &
|
|
848
|
-
var
|
|
849
|
-
if (
|
|
850
|
-
var
|
|
851
|
-
if ((f ||
|
|
852
|
-
var
|
|
928
|
+
if ((e & B) !== 0) {
|
|
929
|
+
var r = t.deps, n = (e & R) !== 0;
|
|
930
|
+
if (r !== null) {
|
|
931
|
+
var i, u, f = (e & vt) !== 0, s = n && b !== null && !V, l = r.length;
|
|
932
|
+
if ((f || s) && (b === null || (b.f & rt) === 0)) {
|
|
933
|
+
var a = (
|
|
853
934
|
/** @type {Derived} */
|
|
854
935
|
t
|
|
855
|
-
), o =
|
|
856
|
-
for (
|
|
857
|
-
u =
|
|
858
|
-
f && (
|
|
936
|
+
), o = a.parent;
|
|
937
|
+
for (i = 0; i < l; i++)
|
|
938
|
+
u = r[i], (f || !u?.reactions?.includes(a)) && (u.reactions ??= []).push(a);
|
|
939
|
+
f && (a.f ^= vt), s && o !== null && (o.f & R) === 0 && (a.f ^= R);
|
|
859
940
|
}
|
|
860
|
-
for (
|
|
861
|
-
if (u =
|
|
941
|
+
for (i = 0; i < l; i++)
|
|
942
|
+
if (u = r[i], wt(
|
|
862
943
|
/** @type {Derived} */
|
|
863
944
|
u
|
|
864
|
-
) &&
|
|
945
|
+
) && oe(
|
|
865
946
|
/** @type {Derived} */
|
|
866
947
|
u
|
|
867
948
|
), u.wv > t.wv)
|
|
868
949
|
return !0;
|
|
869
950
|
}
|
|
870
|
-
(!
|
|
951
|
+
(!n || b !== null && !V) && C(t, S);
|
|
871
952
|
}
|
|
872
953
|
return !1;
|
|
873
954
|
}
|
|
874
|
-
function
|
|
875
|
-
var
|
|
876
|
-
if (
|
|
877
|
-
for (var
|
|
878
|
-
var u =
|
|
879
|
-
(u.f &
|
|
955
|
+
function Ce(t, e, r = !0) {
|
|
956
|
+
var n = t.reactions;
|
|
957
|
+
if (n !== null && !j?.includes(t))
|
|
958
|
+
for (var i = 0; i < n.length; i++) {
|
|
959
|
+
var u = n[i];
|
|
960
|
+
(u.f & N) !== 0 ? Ce(
|
|
880
961
|
/** @type {Derived} */
|
|
881
962
|
u,
|
|
882
963
|
e,
|
|
883
964
|
!1
|
|
884
|
-
) : e === u && (
|
|
965
|
+
) : e === u && (r ? C(u, I) : (u.f & S) !== 0 && C(u, B), at(
|
|
885
966
|
/** @type {Effect} */
|
|
886
967
|
u
|
|
887
968
|
));
|
|
888
969
|
}
|
|
889
970
|
}
|
|
890
|
-
function
|
|
891
|
-
var e =
|
|
892
|
-
|
|
893
|
-
null,
|
|
894
|
-
t.ac.abort(
|
|
971
|
+
function Ne(t) {
|
|
972
|
+
var e = m, r = O, n = P, i = p, u = V, f = j, s = F, l = $, a = W, o = t.f;
|
|
973
|
+
m = /** @type {null | Value[]} */
|
|
974
|
+
null, O = 0, P = null, V = (o & R) !== 0 && ($ || !J || p === null), p = (o & (tt | et)) === 0 ? t : null, j = null, dt(t.ctx), $ = !1, W = ++ot, t.ac !== null && (Ft(() => {
|
|
975
|
+
t.ac.abort(Dt);
|
|
895
976
|
}), t.ac = null);
|
|
896
977
|
try {
|
|
897
|
-
t.f |=
|
|
978
|
+
t.f |= Tt;
|
|
898
979
|
var c = (
|
|
899
980
|
/** @type {Function} */
|
|
900
981
|
t.fn
|
|
901
|
-
),
|
|
902
|
-
if (
|
|
982
|
+
), v = c(), _ = t.deps;
|
|
983
|
+
if (m !== null) {
|
|
903
984
|
var d;
|
|
904
|
-
if (
|
|
905
|
-
for (
|
|
906
|
-
|
|
985
|
+
if (bt(t, O), _ !== null && O > 0)
|
|
986
|
+
for (_.length = O + m.length, d = 0; d < m.length; d++)
|
|
987
|
+
_[O + d] = m[d];
|
|
907
988
|
else
|
|
908
|
-
t.deps =
|
|
909
|
-
if (!
|
|
910
|
-
(o &
|
|
989
|
+
t.deps = _ = m;
|
|
990
|
+
if (!V || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
991
|
+
(o & N) !== 0 && /** @type {import('#client').Derived} */
|
|
911
992
|
t.reactions !== null)
|
|
912
|
-
for (d =
|
|
913
|
-
(
|
|
914
|
-
} else
|
|
915
|
-
if (
|
|
993
|
+
for (d = O; d < _.length; d++)
|
|
994
|
+
(_[d].reactions ??= []).push(t);
|
|
995
|
+
} else _ !== null && O < _.length && (bt(t, O), _.length = O);
|
|
996
|
+
if (ue() && P !== null && !$ && _ !== null && (t.f & (N | B | I)) === 0)
|
|
916
997
|
for (d = 0; d < /** @type {Source[]} */
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
998
|
+
P.length; d++)
|
|
999
|
+
Ce(
|
|
1000
|
+
P[d],
|
|
920
1001
|
/** @type {Effect} */
|
|
921
1002
|
t
|
|
922
1003
|
);
|
|
923
|
-
return
|
|
924
|
-
|
|
925
|
-
} catch (
|
|
926
|
-
return
|
|
1004
|
+
return i !== null && i !== t && (ot++, P !== null && (n === null ? n = P : n.push(.../** @type {Source[]} */
|
|
1005
|
+
P))), (t.f & H) !== 0 && (t.f ^= H), v;
|
|
1006
|
+
} catch (g) {
|
|
1007
|
+
return or(g);
|
|
927
1008
|
} finally {
|
|
928
|
-
t.f ^=
|
|
1009
|
+
t.f ^= Tt, m = e, O = r, P = n, p = i, V = u, j = f, dt(s), $ = l, W = a;
|
|
929
1010
|
}
|
|
930
1011
|
}
|
|
931
|
-
function
|
|
932
|
-
let
|
|
933
|
-
if (
|
|
934
|
-
var
|
|
935
|
-
if (
|
|
936
|
-
var
|
|
937
|
-
|
|
1012
|
+
function Pr(t, e) {
|
|
1013
|
+
let r = e.reactions;
|
|
1014
|
+
if (r !== null) {
|
|
1015
|
+
var n = Ke.call(r, t);
|
|
1016
|
+
if (n !== -1) {
|
|
1017
|
+
var i = r.length - 1;
|
|
1018
|
+
i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
|
|
938
1019
|
}
|
|
939
1020
|
}
|
|
940
|
-
|
|
1021
|
+
r === null && (e.f & N) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
941
1022
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
942
1023
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
943
|
-
(
|
|
1024
|
+
(m === null || !m.includes(e)) && (C(e, B), (e.f & (R | vt)) === 0 && (e.f ^= vt), ae(
|
|
944
1025
|
/** @type {Derived} **/
|
|
945
1026
|
e
|
|
946
|
-
),
|
|
1027
|
+
), bt(
|
|
947
1028
|
/** @type {Derived} **/
|
|
948
1029
|
e,
|
|
949
1030
|
0
|
|
950
1031
|
));
|
|
951
1032
|
}
|
|
952
|
-
function
|
|
953
|
-
var
|
|
954
|
-
if (
|
|
955
|
-
for (var
|
|
956
|
-
|
|
1033
|
+
function bt(t, e) {
|
|
1034
|
+
var r = t.deps;
|
|
1035
|
+
if (r !== null)
|
|
1036
|
+
for (var n = e; n < r.length; n++)
|
|
1037
|
+
Pr(t, r[n]);
|
|
957
1038
|
}
|
|
958
|
-
function
|
|
1039
|
+
function Q(t) {
|
|
959
1040
|
var e = t.f;
|
|
960
|
-
if ((e &
|
|
961
|
-
|
|
962
|
-
var
|
|
963
|
-
|
|
1041
|
+
if ((e & rt) === 0) {
|
|
1042
|
+
C(t, S);
|
|
1043
|
+
var r = b, n = J;
|
|
1044
|
+
b = t, J = !0;
|
|
964
1045
|
try {
|
|
965
|
-
(e &
|
|
966
|
-
var
|
|
967
|
-
t.teardown = typeof
|
|
1046
|
+
(e & X) !== 0 ? Or(t) : Ae(t), ke(t);
|
|
1047
|
+
var i = Ne(t);
|
|
1048
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Te;
|
|
968
1049
|
var u;
|
|
969
|
-
|
|
1050
|
+
Xt && lr && (t.f & I) !== 0 && t.deps;
|
|
970
1051
|
} finally {
|
|
971
|
-
|
|
1052
|
+
J = n, b = r;
|
|
972
1053
|
}
|
|
973
1054
|
}
|
|
974
1055
|
}
|
|
975
|
-
function
|
|
976
|
-
var e = t.f,
|
|
977
|
-
if (
|
|
978
|
-
var
|
|
979
|
-
if (!
|
|
980
|
-
var
|
|
981
|
-
if ((
|
|
982
|
-
t.rv <
|
|
1056
|
+
function D(t) {
|
|
1057
|
+
var e = t.f, r = (e & N) !== 0;
|
|
1058
|
+
if (p !== null && !$) {
|
|
1059
|
+
var n = b !== null && (b.f & rt) !== 0;
|
|
1060
|
+
if (!n && !j?.includes(t)) {
|
|
1061
|
+
var i = p.deps;
|
|
1062
|
+
if ((p.f & Tt) !== 0)
|
|
1063
|
+
t.rv < ot && (t.rv = ot, m === null && i !== null && i[O] === t ? O++ : m === null ? m = [t] : (!V || !m.includes(t)) && m.push(t));
|
|
983
1064
|
else {
|
|
984
|
-
(
|
|
1065
|
+
(p.deps ??= []).push(t);
|
|
985
1066
|
var u = t.reactions;
|
|
986
|
-
u === null ? t.reactions = [
|
|
1067
|
+
u === null ? t.reactions = [p] : u.includes(p) || u.push(p);
|
|
987
1068
|
}
|
|
988
1069
|
}
|
|
989
|
-
} else if (
|
|
1070
|
+
} else if (r && /** @type {Derived} */
|
|
990
1071
|
t.deps === null && /** @type {Derived} */
|
|
991
1072
|
t.effects === null) {
|
|
992
1073
|
var f = (
|
|
993
1074
|
/** @type {Derived} */
|
|
994
1075
|
t
|
|
995
|
-
),
|
|
996
|
-
|
|
1076
|
+
), s = f.parent;
|
|
1077
|
+
s !== null && (s.f & R) === 0 && (f.f ^= R);
|
|
997
1078
|
}
|
|
998
|
-
if (
|
|
999
|
-
if (
|
|
1000
|
-
return
|
|
1001
|
-
if (
|
|
1079
|
+
if (ct) {
|
|
1080
|
+
if (q.has(t))
|
|
1081
|
+
return q.get(t);
|
|
1082
|
+
if (r) {
|
|
1002
1083
|
f = /** @type {Derived} */
|
|
1003
1084
|
t;
|
|
1004
|
-
var
|
|
1005
|
-
return ((f.f &
|
|
1085
|
+
var l = f.v;
|
|
1086
|
+
return ((f.f & S) === 0 && f.reactions !== null || Pe(f)) && (l = Mt(f)), q.set(f, l), l;
|
|
1006
1087
|
}
|
|
1007
|
-
} else
|
|
1008
|
-
t,
|
|
1009
|
-
if ((t.f &
|
|
1088
|
+
} else r && (f = /** @type {Derived} */
|
|
1089
|
+
t, wt(f) && oe(f));
|
|
1090
|
+
if ((t.f & H) !== 0)
|
|
1010
1091
|
throw t.v;
|
|
1011
1092
|
return t.v;
|
|
1012
1093
|
}
|
|
1013
|
-
function
|
|
1014
|
-
if (t.v ===
|
|
1094
|
+
function Pe(t) {
|
|
1095
|
+
if (t.v === E) return !0;
|
|
1015
1096
|
if (t.deps === null) return !1;
|
|
1016
1097
|
for (const e of t.deps)
|
|
1017
|
-
if (
|
|
1098
|
+
if (q.has(e) || (e.f & N) !== 0 && Pe(
|
|
1018
1099
|
/** @type {Derived} */
|
|
1019
1100
|
e
|
|
1020
1101
|
))
|
|
1021
1102
|
return !0;
|
|
1022
1103
|
return !1;
|
|
1023
1104
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1026
|
-
t.f = t.f &
|
|
1105
|
+
const Rr = -7169;
|
|
1106
|
+
function C(t, e) {
|
|
1107
|
+
t.f = t.f & Rr | e;
|
|
1027
1108
|
}
|
|
1028
|
-
const
|
|
1029
|
-
function
|
|
1109
|
+
const Ir = /* @__PURE__ */ new Set(), Dr = /* @__PURE__ */ new Set();
|
|
1110
|
+
function Lr(t, e, r, n = {}) {
|
|
1111
|
+
function i(u) {
|
|
1112
|
+
if (n.capture || Mr.call(e, u), !u.cancelBubble)
|
|
1113
|
+
return Ft(() => r?.call(this, u));
|
|
1114
|
+
}
|
|
1115
|
+
return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? fe(() => {
|
|
1116
|
+
e.addEventListener(t, i, n);
|
|
1117
|
+
}) : e.addEventListener(t, i, n), i;
|
|
1118
|
+
}
|
|
1119
|
+
function Re(t) {
|
|
1030
1120
|
for (var e = 0; e < t.length; e++)
|
|
1031
|
-
|
|
1032
|
-
for (var
|
|
1033
|
-
|
|
1121
|
+
Ir.add(t[e]);
|
|
1122
|
+
for (var r of Dr)
|
|
1123
|
+
r(t);
|
|
1034
1124
|
}
|
|
1035
|
-
|
|
1125
|
+
let Ht = null;
|
|
1126
|
+
function Mr(t) {
|
|
1127
|
+
var e = this, r = (
|
|
1128
|
+
/** @type {Node} */
|
|
1129
|
+
e.ownerDocument
|
|
1130
|
+
), n = t.type, i = t.composedPath?.() || [], u = (
|
|
1131
|
+
/** @type {null | Element} */
|
|
1132
|
+
i[0] || t.target
|
|
1133
|
+
);
|
|
1134
|
+
Ht = t;
|
|
1135
|
+
var f = 0, s = Ht === t && t.__root;
|
|
1136
|
+
if (s) {
|
|
1137
|
+
var l = i.indexOf(s);
|
|
1138
|
+
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
1139
|
+
window)) {
|
|
1140
|
+
t.__root = e;
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
var a = i.indexOf(e);
|
|
1144
|
+
if (a === -1)
|
|
1145
|
+
return;
|
|
1146
|
+
l <= a && (f = l);
|
|
1147
|
+
}
|
|
1148
|
+
if (u = /** @type {Element} */
|
|
1149
|
+
i[f] || t.target, u !== e) {
|
|
1150
|
+
St(t, "currentTarget", {
|
|
1151
|
+
configurable: !0,
|
|
1152
|
+
get() {
|
|
1153
|
+
return u || r;
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
var o = p, c = b;
|
|
1157
|
+
L(null), U(null);
|
|
1158
|
+
try {
|
|
1159
|
+
for (var v, _ = []; u !== null; ) {
|
|
1160
|
+
var d = u.assignedSlot || u.parentNode || /** @type {any} */
|
|
1161
|
+
u.host || null;
|
|
1162
|
+
try {
|
|
1163
|
+
var g = u["__" + n];
|
|
1164
|
+
if (g != null && (!/** @type {any} */
|
|
1165
|
+
u.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1166
|
+
// -> the target could not have been disabled because it emits the event in the first place
|
|
1167
|
+
t.target === u))
|
|
1168
|
+
if (Pt(g)) {
|
|
1169
|
+
var [y, ...Y] = g;
|
|
1170
|
+
y.apply(u, [t, ...Y]);
|
|
1171
|
+
} else
|
|
1172
|
+
g.call(u, t);
|
|
1173
|
+
} catch (h) {
|
|
1174
|
+
v ? _.push(h) : v = h;
|
|
1175
|
+
}
|
|
1176
|
+
if (t.cancelBubble || d === e || d === null)
|
|
1177
|
+
break;
|
|
1178
|
+
u = d;
|
|
1179
|
+
}
|
|
1180
|
+
if (v) {
|
|
1181
|
+
for (let h of _)
|
|
1182
|
+
queueMicrotask(() => {
|
|
1183
|
+
throw h;
|
|
1184
|
+
});
|
|
1185
|
+
throw v;
|
|
1186
|
+
}
|
|
1187
|
+
} finally {
|
|
1188
|
+
t.__root = e, delete t.currentTarget, L(o), U(c);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
function jr(t) {
|
|
1036
1193
|
var e = document.createElement("template");
|
|
1037
1194
|
return e.innerHTML = t.replaceAll("<!>", "<!---->"), e.content;
|
|
1038
1195
|
}
|
|
1039
|
-
function
|
|
1040
|
-
var
|
|
1196
|
+
function Fr(t, e) {
|
|
1197
|
+
var r = (
|
|
1041
1198
|
/** @type {Effect} */
|
|
1042
|
-
|
|
1199
|
+
b
|
|
1043
1200
|
);
|
|
1044
|
-
|
|
1201
|
+
r.nodes_start === null && (r.nodes_start = t, r.nodes_end = e);
|
|
1045
1202
|
}
|
|
1046
1203
|
// @__NO_SIDE_EFFECTS__
|
|
1047
|
-
function
|
|
1048
|
-
var
|
|
1204
|
+
function Ie(t, e) {
|
|
1205
|
+
var r, n = !t.startsWith("<!>");
|
|
1049
1206
|
return () => {
|
|
1050
|
-
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
var
|
|
1207
|
+
r === void 0 && (r = jr(n ? t : "<!>" + t), r = /** @type {Node} */
|
|
1208
|
+
/* @__PURE__ */ pe(r));
|
|
1209
|
+
var i = (
|
|
1053
1210
|
/** @type {TemplateNode} */
|
|
1054
|
-
|
|
1211
|
+
r.cloneNode(!0)
|
|
1055
1212
|
);
|
|
1056
|
-
return
|
|
1213
|
+
return Fr(i, i), i;
|
|
1057
1214
|
};
|
|
1058
1215
|
}
|
|
1059
|
-
function
|
|
1216
|
+
function De(t, e) {
|
|
1060
1217
|
t !== null && t.before(
|
|
1061
1218
|
/** @type {Node} */
|
|
1062
1219
|
e
|
|
1063
1220
|
);
|
|
1064
1221
|
}
|
|
1065
|
-
function
|
|
1066
|
-
|
|
1067
|
-
|
|
1222
|
+
function xr(t) {
|
|
1223
|
+
return t.endsWith("capture") && t !== "gotpointercapture" && t !== "lostpointercapture";
|
|
1224
|
+
}
|
|
1225
|
+
const Vr = [
|
|
1226
|
+
"beforeinput",
|
|
1227
|
+
"click",
|
|
1228
|
+
"change",
|
|
1229
|
+
"dblclick",
|
|
1230
|
+
"contextmenu",
|
|
1231
|
+
"focusin",
|
|
1232
|
+
"focusout",
|
|
1233
|
+
"input",
|
|
1234
|
+
"keydown",
|
|
1235
|
+
"keyup",
|
|
1236
|
+
"mousedown",
|
|
1237
|
+
"mousemove",
|
|
1238
|
+
"mouseout",
|
|
1239
|
+
"mouseover",
|
|
1240
|
+
"mouseup",
|
|
1241
|
+
"pointerdown",
|
|
1242
|
+
"pointermove",
|
|
1243
|
+
"pointerout",
|
|
1244
|
+
"pointerover",
|
|
1245
|
+
"pointerup",
|
|
1246
|
+
"touchend",
|
|
1247
|
+
"touchmove",
|
|
1248
|
+
"touchstart"
|
|
1249
|
+
];
|
|
1250
|
+
function qr(t) {
|
|
1251
|
+
return Vr.includes(t);
|
|
1252
|
+
}
|
|
1253
|
+
const Ur = {
|
|
1254
|
+
// no `class: 'className'` because we handle that separately
|
|
1255
|
+
formnovalidate: "formNoValidate",
|
|
1256
|
+
ismap: "isMap",
|
|
1257
|
+
nomodule: "noModule",
|
|
1258
|
+
playsinline: "playsInline",
|
|
1259
|
+
readonly: "readOnly",
|
|
1260
|
+
defaultvalue: "defaultValue",
|
|
1261
|
+
defaultchecked: "defaultChecked",
|
|
1262
|
+
srcobject: "srcObject",
|
|
1263
|
+
novalidate: "noValidate",
|
|
1264
|
+
allowfullscreen: "allowFullscreen",
|
|
1265
|
+
disablepictureinpicture: "disablePictureInPicture",
|
|
1266
|
+
disableremoteplayback: "disableRemotePlayback"
|
|
1267
|
+
};
|
|
1268
|
+
function Br(t) {
|
|
1269
|
+
return t = t.toLowerCase(), Ur[t] ?? t;
|
|
1270
|
+
}
|
|
1271
|
+
function Le(t, e) {
|
|
1272
|
+
var r = e == null ? "" : typeof e == "object" ? e + "" : e;
|
|
1273
|
+
r !== (t.__t ??= t.nodeValue) && (t.__t = r, t.nodeValue = r + "");
|
|
1274
|
+
}
|
|
1275
|
+
function Yr(t, e) {
|
|
1276
|
+
var r = void 0, n;
|
|
1277
|
+
ye(() => {
|
|
1278
|
+
r !== (r = e()) && (n && (z(n), n = null), r && (n = Ee(() => {
|
|
1279
|
+
ge(() => (
|
|
1280
|
+
/** @type {(node: Element) => void} */
|
|
1281
|
+
r(t)
|
|
1282
|
+
));
|
|
1283
|
+
})));
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
function Me(t) {
|
|
1287
|
+
var e, r, n = "";
|
|
1288
|
+
if (typeof t == "string" || typeof t == "number") n += t;
|
|
1289
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1290
|
+
var i = t.length;
|
|
1291
|
+
for (e = 0; e < i; e++) t[e] && (r = Me(t[e])) && (n && (n += " "), n += r);
|
|
1292
|
+
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
|
1293
|
+
return n;
|
|
1294
|
+
}
|
|
1295
|
+
function Kr() {
|
|
1296
|
+
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = Me(t)) && (n && (n += " "), n += e);
|
|
1297
|
+
return n;
|
|
1068
1298
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1299
|
+
function $r(t) {
|
|
1300
|
+
return typeof t == "object" ? Kr(t) : t ?? "";
|
|
1301
|
+
}
|
|
1302
|
+
const Wt = [...`
|
|
1303
|
+
\r\f \v\uFEFF`];
|
|
1304
|
+
function Hr(t, e, r) {
|
|
1305
|
+
var n = t == null ? "" : "" + t;
|
|
1306
|
+
if (r) {
|
|
1307
|
+
for (var i in r)
|
|
1308
|
+
if (r[i])
|
|
1309
|
+
n = n ? n + " " + i : i;
|
|
1310
|
+
else if (n.length)
|
|
1311
|
+
for (var u = i.length, f = 0; (f = n.indexOf(i, f)) >= 0; ) {
|
|
1312
|
+
var s = f + u;
|
|
1313
|
+
(f === 0 || Wt.includes(n[f - 1])) && (s === n.length || Wt.includes(n[s])) ? n = (f === 0 ? "" : n.substring(0, f)) + n.substring(s + 1) : f = s;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
return n === "" ? null : n;
|
|
1317
|
+
}
|
|
1318
|
+
function zt(t, e = !1) {
|
|
1319
|
+
var r = e ? " !important;" : ";", n = "";
|
|
1320
|
+
for (var i in t) {
|
|
1321
|
+
var u = t[i];
|
|
1322
|
+
u != null && u !== "" && (n += " " + i + ": " + u + r);
|
|
1323
|
+
}
|
|
1324
|
+
return n;
|
|
1325
|
+
}
|
|
1326
|
+
function At(t) {
|
|
1327
|
+
return t[0] !== "-" || t[1] !== "-" ? t.toLowerCase() : t;
|
|
1328
|
+
}
|
|
1329
|
+
function Wr(t, e) {
|
|
1330
|
+
if (e) {
|
|
1331
|
+
var r = "", n, i;
|
|
1332
|
+
if (Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, t) {
|
|
1333
|
+
t = String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
1334
|
+
var u = !1, f = 0, s = !1, l = [];
|
|
1335
|
+
n && l.push(...Object.keys(n).map(At)), i && l.push(...Object.keys(i).map(At));
|
|
1336
|
+
var a = 0, o = -1;
|
|
1337
|
+
const g = t.length;
|
|
1338
|
+
for (var c = 0; c < g; c++) {
|
|
1339
|
+
var v = t[c];
|
|
1340
|
+
if (s ? v === "/" && t[c - 1] === "*" && (s = !1) : u ? u === v && (u = !1) : v === "/" && t[c + 1] === "*" ? s = !0 : v === '"' || v === "'" ? u = v : v === "(" ? f++ : v === ")" && f--, !s && u === !1 && f === 0) {
|
|
1341
|
+
if (v === ":" && o === -1)
|
|
1342
|
+
o = c;
|
|
1343
|
+
else if (v === ";" || c === g - 1) {
|
|
1344
|
+
if (o !== -1) {
|
|
1345
|
+
var _ = At(t.substring(a, o).trim());
|
|
1346
|
+
if (!l.includes(_)) {
|
|
1347
|
+
v !== ";" && c++;
|
|
1348
|
+
var d = t.substring(a, c).trim();
|
|
1349
|
+
r += " " + d + ";";
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
a = c + 1, o = -1;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
return n && (r += zt(n)), i && (r += zt(i, !0)), r = r.trim(), r === "" ? null : r;
|
|
1358
|
+
}
|
|
1359
|
+
return t == null ? null : String(t);
|
|
1360
|
+
}
|
|
1361
|
+
function zr(t, e, r, n, i, u) {
|
|
1362
|
+
var f = t.__className;
|
|
1363
|
+
if (f !== r || f === void 0) {
|
|
1364
|
+
var s = Hr(r, n, u);
|
|
1365
|
+
s == null ? t.removeAttribute("class") : e ? t.className = s : t.setAttribute("class", s), t.__className = r;
|
|
1366
|
+
} else if (u && i !== u)
|
|
1367
|
+
for (var l in u) {
|
|
1368
|
+
var a = !!u[l];
|
|
1369
|
+
(i == null || a !== !!i[l]) && t.classList.toggle(l, a);
|
|
1370
|
+
}
|
|
1371
|
+
return u;
|
|
1372
|
+
}
|
|
1373
|
+
function mt(t, e = {}, r, n) {
|
|
1374
|
+
for (var i in r) {
|
|
1375
|
+
var u = r[i];
|
|
1376
|
+
e[i] !== u && (r[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, u, n));
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
function Gr(t, e, r, n) {
|
|
1380
|
+
var i = t.__style;
|
|
1381
|
+
if (i !== e) {
|
|
1382
|
+
var u = Wr(e, n);
|
|
1383
|
+
u == null ? t.removeAttribute("style") : t.style.cssText = u, t.__style = e;
|
|
1384
|
+
} else n && (Array.isArray(n) ? (mt(t, r?.[0], n[0]), mt(t, r?.[1], n[1], "important")) : mt(t, r, n));
|
|
1385
|
+
return n;
|
|
1386
|
+
}
|
|
1387
|
+
function Nt(t, e, r = !1) {
|
|
1388
|
+
if (t.multiple) {
|
|
1389
|
+
if (e == null)
|
|
1390
|
+
return;
|
|
1391
|
+
if (!Pt(e))
|
|
1392
|
+
return ur();
|
|
1393
|
+
for (var n of t.options)
|
|
1394
|
+
n.selected = e.includes(Gt(n));
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
for (n of t.options) {
|
|
1398
|
+
var i = Gt(n);
|
|
1399
|
+
if (gr(i, e)) {
|
|
1400
|
+
n.selected = !0;
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
(!r || e !== void 0) && (t.selectedIndex = -1);
|
|
1405
|
+
}
|
|
1406
|
+
function Zr(t) {
|
|
1407
|
+
var e = new MutationObserver(() => {
|
|
1408
|
+
Nt(t, t.__value);
|
|
1409
|
+
});
|
|
1410
|
+
e.observe(t, {
|
|
1411
|
+
// Listen to option element changes
|
|
1412
|
+
childList: !0,
|
|
1413
|
+
subtree: !0,
|
|
1414
|
+
// because of <optgroup>
|
|
1415
|
+
// Listen to option element value attribute changes
|
|
1416
|
+
// (doesn't get notified of select value changes,
|
|
1417
|
+
// because that property is not reflected as an attribute)
|
|
1418
|
+
attributes: !0,
|
|
1419
|
+
attributeFilter: ["value"]
|
|
1420
|
+
}), mr(() => {
|
|
1421
|
+
e.disconnect();
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
function Gt(t) {
|
|
1425
|
+
return "__value" in t ? t.__value : t.value;
|
|
1426
|
+
}
|
|
1427
|
+
const nt = Symbol("class"), it = Symbol("style"), je = Symbol("is custom element"), Fe = Symbol("is html");
|
|
1428
|
+
function Jr(t, e) {
|
|
1429
|
+
e ? t.hasAttribute("selected") || t.setAttribute("selected", "") : t.removeAttribute("selected");
|
|
1430
|
+
}
|
|
1431
|
+
function Zt(t, e, r, n) {
|
|
1432
|
+
var i = xe(t);
|
|
1433
|
+
i[e] !== (i[e] = r) && (e === "loading" && (t[Qe] = r), r == null ? t.removeAttribute(e) : typeof r != "string" && Ve(t).includes(e) ? t[e] = r : t.setAttribute(e, r));
|
|
1434
|
+
}
|
|
1435
|
+
function Qr(t, e, r, n, i = !1) {
|
|
1436
|
+
var u = xe(t), f = u[je], s = !u[Fe], l = e || {}, a = t.tagName === "OPTION";
|
|
1437
|
+
for (var o in e)
|
|
1438
|
+
o in r || (r[o] = null);
|
|
1439
|
+
r.class ? r.class = $r(r.class) : r[nt] && (r.class = null), r[it] && (r.style ??= null);
|
|
1440
|
+
var c = Ve(t);
|
|
1441
|
+
for (const h in r) {
|
|
1442
|
+
let w = r[h];
|
|
1443
|
+
if (a && h === "value" && w == null) {
|
|
1444
|
+
t.value = t.__value = "", l[h] = w;
|
|
1445
|
+
continue;
|
|
1446
|
+
}
|
|
1447
|
+
if (h === "class") {
|
|
1448
|
+
var v = t.namespaceURI === "http://www.w3.org/1999/xhtml";
|
|
1449
|
+
zr(t, v, w, n, e?.[nt], r[nt]), l[h] = w, l[nt] = r[nt];
|
|
1450
|
+
continue;
|
|
1451
|
+
}
|
|
1452
|
+
if (h === "style") {
|
|
1453
|
+
Gr(t, w, e?.[it], r[it]), l[h] = w, l[it] = r[it];
|
|
1454
|
+
continue;
|
|
1455
|
+
}
|
|
1456
|
+
var _ = l[h];
|
|
1457
|
+
if (!(w === _ && !(w === void 0 && t.hasAttribute(h)))) {
|
|
1458
|
+
l[h] = w;
|
|
1459
|
+
var d = h[0] + h[1];
|
|
1460
|
+
if (d !== "$$")
|
|
1461
|
+
if (d === "on") {
|
|
1462
|
+
const T = {}, Z = "$$" + h;
|
|
1463
|
+
let k = h.slice(2);
|
|
1464
|
+
var g = qr(k);
|
|
1465
|
+
if (xr(k) && (k = k.slice(0, -7), T.capture = !0), !g && _) {
|
|
1466
|
+
if (w != null) continue;
|
|
1467
|
+
t.removeEventListener(k, l[Z], T), l[Z] = null;
|
|
1468
|
+
}
|
|
1469
|
+
if (w != null)
|
|
1470
|
+
if (g)
|
|
1471
|
+
t[`__${k}`] = w, Re([k]);
|
|
1472
|
+
else {
|
|
1473
|
+
let qe = function(Ue) {
|
|
1474
|
+
l[h].call(this, Ue);
|
|
1475
|
+
};
|
|
1476
|
+
l[Z] = Lr(k, t, qe, T);
|
|
1477
|
+
}
|
|
1478
|
+
else g && (t[`__${k}`] = void 0);
|
|
1479
|
+
} else if (h === "style")
|
|
1480
|
+
Zt(t, h, w);
|
|
1481
|
+
else if (h === "autofocus")
|
|
1482
|
+
kr(
|
|
1483
|
+
/** @type {HTMLElement} */
|
|
1484
|
+
t,
|
|
1485
|
+
!!w
|
|
1486
|
+
);
|
|
1487
|
+
else if (!f && (h === "__value" || h === "value" && w != null))
|
|
1488
|
+
t.value = t.__value = w;
|
|
1489
|
+
else if (h === "selected" && a)
|
|
1490
|
+
Jr(
|
|
1491
|
+
/** @type {HTMLOptionElement} */
|
|
1492
|
+
t,
|
|
1493
|
+
w
|
|
1494
|
+
);
|
|
1495
|
+
else {
|
|
1496
|
+
var y = h;
|
|
1497
|
+
s || (y = Br(y));
|
|
1498
|
+
var Y = y === "defaultValue" || y === "defaultChecked";
|
|
1499
|
+
if (w == null && !f && !Y)
|
|
1500
|
+
if (u[h] = null, y === "value" || y === "checked") {
|
|
1501
|
+
let T = (
|
|
1502
|
+
/** @type {HTMLInputElement} */
|
|
1503
|
+
t
|
|
1504
|
+
);
|
|
1505
|
+
const Z = e === void 0;
|
|
1506
|
+
if (y === "value") {
|
|
1507
|
+
let k = T.defaultValue;
|
|
1508
|
+
T.removeAttribute(y), T.defaultValue = k, T.value = T.__value = Z ? k : null;
|
|
1509
|
+
} else {
|
|
1510
|
+
let k = T.defaultChecked;
|
|
1511
|
+
T.removeAttribute(y), T.defaultChecked = k, T.checked = Z ? k : !1;
|
|
1512
|
+
}
|
|
1513
|
+
} else
|
|
1514
|
+
t.removeAttribute(h);
|
|
1515
|
+
else Y || c.includes(y) && (f || typeof w != "string") ? (t[y] = w, y in u && (u[y] = E)) : typeof w != "function" && Zt(t, y, w);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
return l;
|
|
1520
|
+
}
|
|
1521
|
+
function Xr(t, e, r = [], n = [], i, u = !1) {
|
|
1522
|
+
ce(r, n, (f) => {
|
|
1523
|
+
var s = void 0, l = {}, a = t.nodeName === "SELECT", o = !1;
|
|
1524
|
+
if (ye(() => {
|
|
1525
|
+
var v = e(...f.map(D)), _ = Qr(t, s, v, i, u);
|
|
1526
|
+
o && a && "value" in v && Nt(
|
|
1527
|
+
/** @type {HTMLSelectElement} */
|
|
1528
|
+
t,
|
|
1529
|
+
v.value
|
|
1530
|
+
);
|
|
1531
|
+
for (let g of Object.getOwnPropertySymbols(l))
|
|
1532
|
+
v[g] || z(l[g]);
|
|
1533
|
+
for (let g of Object.getOwnPropertySymbols(v)) {
|
|
1534
|
+
var d = v[g];
|
|
1535
|
+
g.description === Ye && (!s || d !== s[g]) && (l[g] && z(l[g]), l[g] = Ee(() => Yr(t, () => d))), _[g] = d;
|
|
1536
|
+
}
|
|
1537
|
+
s = _;
|
|
1538
|
+
}), a) {
|
|
1539
|
+
var c = (
|
|
1540
|
+
/** @type {HTMLSelectElement} */
|
|
1541
|
+
t
|
|
1542
|
+
);
|
|
1543
|
+
ge(() => {
|
|
1544
|
+
Nt(
|
|
1545
|
+
c,
|
|
1546
|
+
/** @type {Record<string | symbol, any>} */
|
|
1547
|
+
s.value,
|
|
1548
|
+
!0
|
|
1549
|
+
), Zr(c);
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
o = !0;
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
function xe(t) {
|
|
1556
|
+
return (
|
|
1557
|
+
/** @type {Record<string | symbol, unknown>} **/
|
|
1558
|
+
// @ts-expect-error
|
|
1559
|
+
t.__attributes ??= {
|
|
1560
|
+
[je]: t.nodeName.includes("-"),
|
|
1561
|
+
[Fe]: t.namespaceURI === Be
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
var Jt = /* @__PURE__ */ new Map();
|
|
1566
|
+
function Ve(t) {
|
|
1567
|
+
var e = t.getAttribute("is") || t.nodeName, r = Jt.get(e);
|
|
1568
|
+
if (r) return r;
|
|
1569
|
+
Jt.set(e, r = []);
|
|
1570
|
+
for (var n, i = t, u = Element.prototype; u !== i; ) {
|
|
1571
|
+
n = $e(i);
|
|
1572
|
+
for (var f in n)
|
|
1573
|
+
n[f].set && r.push(f);
|
|
1574
|
+
i = te(i);
|
|
1575
|
+
}
|
|
1576
|
+
return r;
|
|
1577
|
+
}
|
|
1578
|
+
const tn = {
|
|
1579
|
+
get(t, e) {
|
|
1580
|
+
if (!t.exclude.includes(e))
|
|
1581
|
+
return t.props[e];
|
|
1582
|
+
},
|
|
1583
|
+
set(t, e) {
|
|
1584
|
+
return !1;
|
|
1585
|
+
},
|
|
1586
|
+
getOwnPropertyDescriptor(t, e) {
|
|
1587
|
+
if (!t.exclude.includes(e) && e in t.props)
|
|
1588
|
+
return {
|
|
1589
|
+
enumerable: !0,
|
|
1590
|
+
configurable: !0,
|
|
1591
|
+
value: t.props[e]
|
|
1592
|
+
};
|
|
1593
|
+
},
|
|
1594
|
+
has(t, e) {
|
|
1595
|
+
return t.exclude.includes(e) ? !1 : e in t.props;
|
|
1596
|
+
},
|
|
1597
|
+
ownKeys(t) {
|
|
1598
|
+
return Reflect.ownKeys(t.props).filter((e) => !t.exclude.includes(e));
|
|
1599
|
+
}
|
|
1071
1600
|
};
|
|
1072
|
-
|
|
1073
|
-
function
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
)
|
|
1601
|
+
// @__NO_SIDE_EFFECTS__
|
|
1602
|
+
function en(t, e, r) {
|
|
1603
|
+
return new Proxy(
|
|
1604
|
+
{ props: t, exclude: e },
|
|
1605
|
+
tn
|
|
1606
|
+
);
|
|
1607
|
+
}
|
|
1608
|
+
function Qt(t, e, r, n) {
|
|
1609
|
+
var i = (
|
|
1610
|
+
/** @type {V} */
|
|
1611
|
+
n
|
|
1612
|
+
), u = !0, f = () => (u && (u = !1, i = /** @type {V} */
|
|
1613
|
+
n), i), s;
|
|
1614
|
+
s = /** @type {V} */
|
|
1615
|
+
t[e], s === void 0 && n !== void 0 && (s = f());
|
|
1616
|
+
var l;
|
|
1617
|
+
return l = () => {
|
|
1618
|
+
var a = (
|
|
1619
|
+
/** @type {V} */
|
|
1620
|
+
t[e]
|
|
1621
|
+
);
|
|
1622
|
+
return a === void 0 ? f() : (u = !0, a);
|
|
1623
|
+
}, l;
|
|
1624
|
+
}
|
|
1625
|
+
const rn = (t, e) => {
|
|
1626
|
+
x(e, D(e) + 1);
|
|
1627
|
+
};
|
|
1628
|
+
var nn = /* @__PURE__ */ Ie("<button> </button>");
|
|
1629
|
+
function fn(t) {
|
|
1630
|
+
let e = /* @__PURE__ */ M(0);
|
|
1631
|
+
var r = nn();
|
|
1632
|
+
r.__click = [rn, e];
|
|
1633
|
+
var n = be(r);
|
|
1634
|
+
we(() => Le(n, `count is ${D(e) ?? ""}`)), De(t, r);
|
|
1635
|
+
}
|
|
1636
|
+
Re(["click"]);
|
|
1637
|
+
var un = /* @__PURE__ */ Ie("<button> </button>");
|
|
1638
|
+
function sn(t, e) {
|
|
1639
|
+
fr(e, !0);
|
|
1640
|
+
const r = Qt(e, "primary", 3, !1), n = Qt(e, "size", 3, "medium"), i = /* @__PURE__ */ en(e, [
|
|
1641
|
+
"$$slots",
|
|
1642
|
+
"$$events",
|
|
1643
|
+
"$$legacy",
|
|
1644
|
+
"primary",
|
|
1645
|
+
"backgroundColor",
|
|
1646
|
+
"size",
|
|
1647
|
+
"label"
|
|
1648
|
+
]);
|
|
1649
|
+
let u = /* @__PURE__ */ Vt(() => r() ? "storybook-button--primary" : "storybook-button--secondary"), f = /* @__PURE__ */ Vt(() => e.backgroundColor ? `background-color: ${e.backgroundColor}` : "");
|
|
1650
|
+
var s = un();
|
|
1651
|
+
Xr(s, (a) => ({ type: "button", class: a, style: D(f), ...i }), [
|
|
1652
|
+
() => [
|
|
1653
|
+
"storybook-button",
|
|
1654
|
+
`storybook-button--${n()}`,
|
|
1655
|
+
D(u)
|
|
1656
|
+
].join(" ")
|
|
1657
|
+
]);
|
|
1658
|
+
var l = be(s);
|
|
1659
|
+
we(() => Le(l, e.label)), De(t, s), sr();
|
|
1660
|
+
}
|
|
1089
1661
|
export {
|
|
1090
|
-
|
|
1091
|
-
|
|
1662
|
+
sn as Button,
|
|
1663
|
+
fn as Counter
|
|
1092
1664
|
};
|