@pie-players/pie-section-tools-toolbar 0.2.7 → 0.2.9
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.
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ui = Object.defineProperty;
|
|
2
|
+
var an = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var Yi = (e, t, r) => t in e ?
|
|
6
|
-
var k = (e, t, r) => Yi(e, typeof t != "symbol" ? t + "" : t, r), wr = (e, t, r) => t.has(e) ||
|
|
7
|
-
var
|
|
8
|
-
import "@pie-players/pie-tool-calculator";
|
|
9
|
-
import "@pie-players/pie-tool-graph";
|
|
10
|
-
import "@pie-players/pie-tool-periodic-table";
|
|
11
|
-
import "@pie-players/pie-tool-protractor";
|
|
12
|
-
import "@pie-players/pie-tool-line-reader";
|
|
13
|
-
import "@pie-players/pie-tool-magnifier";
|
|
14
|
-
import "@pie-players/pie-tool-ruler";
|
|
15
|
-
const zi = "5";
|
|
5
|
+
var Yi = (e, t, r) => t in e ? Ui(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var k = (e, t, r) => Yi(e, typeof t != "symbol" ? t + "" : t, r), wr = (e, t, r) => t.has(e) || an("Cannot " + r);
|
|
7
|
+
var f = (e, t, r) => (wr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), w = (e, t, r) => t.has(e) ? an("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), b = (e, t, r, n) => (wr(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), H = (e, t, r) => (wr(e, t, "access private method"), r);
|
|
16
8
|
var $n;
|
|
17
|
-
typeof window < "u" && (($n = window.__svelte ?? (window.__svelte = {})).v ?? ($n.v = /* @__PURE__ */ new Set())).add(
|
|
18
|
-
const
|
|
19
|
-
var En = Array.isArray, Ji = Array.prototype.indexOf,
|
|
9
|
+
typeof window < "u" && (($n = window.__svelte ?? (window.__svelte = {})).v ?? ($n.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const zi = 1, Gi = 2, Ki = 16, Wi = 1, Xi = 2, Ir = "[", cr = "[!", Vr = "]", ht = {}, P = /* @__PURE__ */ Symbol(), xn = "http://www.w3.org/1999/xhtml", xr = !1;
|
|
11
|
+
var En = Array.isArray, Ji = Array.prototype.indexOf, At = Array.prototype.includes, dr = Array.from, or = Object.keys, lr = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, Qi = Object.getOwnPropertyDescriptors, es = Object.prototype, ts = Array.prototype, Tn = Object.getPrototypeOf, fn = Object.isExtensible;
|
|
20
12
|
const rs = () => {
|
|
21
13
|
};
|
|
22
14
|
function ns(e) {
|
|
@@ -29,7 +21,7 @@ function An() {
|
|
|
29
21
|
});
|
|
30
22
|
return { promise: r, resolve: e, reject: t };
|
|
31
23
|
}
|
|
32
|
-
const
|
|
24
|
+
const D = 2, Zt = 4, hr = 8, Sn = 1 << 24, Ze = 16, ye = 32, Je = 64, Er = 128, le = 512, O = 1024, F = 2048, we = 4096, te = 8192, Be = 16384, Mt = 32768, St = 65536, un = 1 << 17, Rn = 1 << 18, _t = 1 << 19, is = 1 << 20, ze = 1 << 25, vt = 65536, Tr = 1 << 21, Br = 1 << 22, Ge = 1 << 23, rr = /* @__PURE__ */ Symbol("$state"), ss = /* @__PURE__ */ Symbol("legacy props"), os = /* @__PURE__ */ Symbol(""), tt = new class extends Error {
|
|
33
25
|
constructor() {
|
|
34
26
|
super(...arguments);
|
|
35
27
|
k(this, "name", "StaleReactionError");
|
|
@@ -38,14 +30,14 @@ const F = 2, Zt = 4, hr = 8, Sn = 1 << 24, He = 16, ye = 32, Xe = 64, Er = 128,
|
|
|
38
30
|
}(), ls = (
|
|
39
31
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
40
32
|
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
41
|
-
), vr = 3,
|
|
42
|
-
function
|
|
33
|
+
), vr = 3, Ot = 8;
|
|
34
|
+
function Cn(e) {
|
|
43
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
44
36
|
}
|
|
45
|
-
function
|
|
37
|
+
function as() {
|
|
46
38
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
47
39
|
}
|
|
48
|
-
function
|
|
40
|
+
function fs(e, t, r) {
|
|
49
41
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
50
42
|
}
|
|
51
43
|
function us(e) {
|
|
@@ -88,16 +80,16 @@ function _e(e) {
|
|
|
88
80
|
let E;
|
|
89
81
|
function Z(e) {
|
|
90
82
|
if (e === null)
|
|
91
|
-
throw Kt(),
|
|
83
|
+
throw Kt(), ht;
|
|
92
84
|
return E = e;
|
|
93
85
|
}
|
|
94
|
-
function
|
|
86
|
+
function Rt() {
|
|
95
87
|
return Z(/* @__PURE__ */ $e(E));
|
|
96
88
|
}
|
|
97
89
|
function Jt(e) {
|
|
98
90
|
if (x) {
|
|
99
91
|
if (/* @__PURE__ */ $e(E) !== null)
|
|
100
|
-
throw Kt(),
|
|
92
|
+
throw Kt(), ht;
|
|
101
93
|
E = e;
|
|
102
94
|
}
|
|
103
95
|
}
|
|
@@ -109,9 +101,9 @@ function ws(e = 1) {
|
|
|
109
101
|
E = r;
|
|
110
102
|
}
|
|
111
103
|
}
|
|
112
|
-
function
|
|
104
|
+
function ar(e = !0) {
|
|
113
105
|
for (var t = 0, r = E; ; ) {
|
|
114
|
-
if (r.nodeType ===
|
|
106
|
+
if (r.nodeType === Ot) {
|
|
115
107
|
var n = (
|
|
116
108
|
/** @type {Comment} */
|
|
117
109
|
r.data
|
|
@@ -130,8 +122,8 @@ function fr(e = !0) {
|
|
|
130
122
|
}
|
|
131
123
|
}
|
|
132
124
|
function kn(e) {
|
|
133
|
-
if (!e || e.nodeType !==
|
|
134
|
-
throw Kt(),
|
|
125
|
+
if (!e || e.nodeType !== Ot)
|
|
126
|
+
throw Kt(), ht;
|
|
135
127
|
return (
|
|
136
128
|
/** @type {Comment} */
|
|
137
129
|
e.data
|
|
@@ -146,13 +138,13 @@ function ys(e, t) {
|
|
|
146
138
|
function Ln(e) {
|
|
147
139
|
return !ys(e, this.v);
|
|
148
140
|
}
|
|
149
|
-
let $s = !1,
|
|
141
|
+
let $s = !1, G = null;
|
|
150
142
|
function Ct(e) {
|
|
151
|
-
|
|
143
|
+
G = e;
|
|
152
144
|
}
|
|
153
145
|
function Mn(e, t = !1, r) {
|
|
154
|
-
|
|
155
|
-
p:
|
|
146
|
+
G = {
|
|
147
|
+
p: G,
|
|
156
148
|
i: !1,
|
|
157
149
|
c: null,
|
|
158
150
|
e: null,
|
|
@@ -164,49 +156,49 @@ function Mn(e, t = !1, r) {
|
|
|
164
156
|
function On(e) {
|
|
165
157
|
var t = (
|
|
166
158
|
/** @type {ComponentContext} */
|
|
167
|
-
|
|
159
|
+
G
|
|
168
160
|
), r = t.e;
|
|
169
161
|
if (r !== null) {
|
|
170
162
|
t.e = null;
|
|
171
163
|
for (var n of r)
|
|
172
164
|
si(n);
|
|
173
165
|
}
|
|
174
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
166
|
+
return e !== void 0 && (t.x = e), t.i = !0, G = t.p, e ?? /** @type {T} */
|
|
175
167
|
{};
|
|
176
168
|
}
|
|
177
169
|
function Pn() {
|
|
178
170
|
return !0;
|
|
179
171
|
}
|
|
180
|
-
let
|
|
172
|
+
let rt = [];
|
|
181
173
|
function Dn() {
|
|
182
|
-
var e =
|
|
183
|
-
|
|
174
|
+
var e = rt;
|
|
175
|
+
rt = [], ns(e);
|
|
184
176
|
}
|
|
185
|
-
function
|
|
186
|
-
if (
|
|
187
|
-
var t =
|
|
177
|
+
function ut(e) {
|
|
178
|
+
if (rt.length === 0 && !Bt) {
|
|
179
|
+
var t = rt;
|
|
188
180
|
queueMicrotask(() => {
|
|
189
|
-
t ===
|
|
181
|
+
t === rt && Dn();
|
|
190
182
|
});
|
|
191
183
|
}
|
|
192
|
-
|
|
184
|
+
rt.push(e);
|
|
193
185
|
}
|
|
194
186
|
function xs() {
|
|
195
|
-
for (;
|
|
187
|
+
for (; rt.length > 0; )
|
|
196
188
|
Dn();
|
|
197
189
|
}
|
|
198
190
|
function Fn(e) {
|
|
199
191
|
var t = $;
|
|
200
192
|
if (t === null)
|
|
201
|
-
return y.f |=
|
|
202
|
-
if ((t.f &
|
|
193
|
+
return y.f |= Ge, e;
|
|
194
|
+
if ((t.f & Mt) === 0 && (t.f & Zt) === 0)
|
|
203
195
|
throw e;
|
|
204
|
-
|
|
196
|
+
kt(e, t);
|
|
205
197
|
}
|
|
206
|
-
function
|
|
198
|
+
function kt(e, t) {
|
|
207
199
|
for (; t !== null; ) {
|
|
208
200
|
if ((t.f & Er) !== 0) {
|
|
209
|
-
if ((t.f &
|
|
201
|
+
if ((t.f & Mt) === 0)
|
|
210
202
|
throw e;
|
|
211
203
|
try {
|
|
212
204
|
t.b.error(e);
|
|
@@ -223,26 +215,26 @@ const Es = -7169;
|
|
|
223
215
|
function L(e, t) {
|
|
224
216
|
e.f = e.f & Es | t;
|
|
225
217
|
}
|
|
226
|
-
function
|
|
227
|
-
(e.f &
|
|
218
|
+
function Hr(e) {
|
|
219
|
+
(e.f & le) !== 0 || e.deps === null ? L(e, O) : L(e, we);
|
|
228
220
|
}
|
|
229
221
|
function In(e) {
|
|
230
222
|
if (e !== null)
|
|
231
223
|
for (const t of e)
|
|
232
|
-
(t.f &
|
|
224
|
+
(t.f & D) === 0 || (t.f & vt) === 0 || (t.f ^= vt, In(
|
|
233
225
|
/** @type {Derived} */
|
|
234
226
|
t.deps
|
|
235
227
|
));
|
|
236
228
|
}
|
|
237
229
|
function Vn(e, t, r) {
|
|
238
|
-
(e.f &
|
|
230
|
+
(e.f & F) !== 0 ? t.add(e) : (e.f & we) !== 0 && r.add(e), In(e.deps), L(e, O);
|
|
239
231
|
}
|
|
240
232
|
const Qt = /* @__PURE__ */ new Set();
|
|
241
|
-
let S = null, pe = null, Y = [], pr = null, Ar = !1,
|
|
242
|
-
var
|
|
233
|
+
let S = null, pe = null, Y = [], pr = null, Ar = !1, Bt = !1;
|
|
234
|
+
var mt, wt, st, yt, qt, Ut, ot, Pe, $t, Re, Sr, Rr, Bn;
|
|
243
235
|
const Wr = class Wr {
|
|
244
236
|
constructor() {
|
|
245
|
-
w(this,
|
|
237
|
+
w(this, Re);
|
|
246
238
|
k(this, "committed", !1);
|
|
247
239
|
/**
|
|
248
240
|
* The current values of any sources that are updated in this batch
|
|
@@ -261,20 +253,20 @@ const Wr = class Wr {
|
|
|
261
253
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
262
254
|
* @type {Set<() => void>}
|
|
263
255
|
*/
|
|
264
|
-
w(this,
|
|
256
|
+
w(this, mt, /* @__PURE__ */ new Set());
|
|
265
257
|
/**
|
|
266
258
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
267
259
|
* @type {Set<(batch: Batch) => void>}
|
|
268
260
|
*/
|
|
269
|
-
w(this,
|
|
261
|
+
w(this, wt, /* @__PURE__ */ new Set());
|
|
270
262
|
/**
|
|
271
263
|
* The number of async effects that are currently in flight
|
|
272
264
|
*/
|
|
273
|
-
w(this,
|
|
265
|
+
w(this, st, 0);
|
|
274
266
|
/**
|
|
275
267
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
276
268
|
*/
|
|
277
|
-
w(this,
|
|
269
|
+
w(this, yt, 0);
|
|
278
270
|
/**
|
|
279
271
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
280
272
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
@@ -285,12 +277,12 @@ const Wr = class Wr {
|
|
|
285
277
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
286
278
|
* @type {Set<Effect>}
|
|
287
279
|
*/
|
|
288
|
-
w(this,
|
|
280
|
+
w(this, Ut, /* @__PURE__ */ new Set());
|
|
289
281
|
/**
|
|
290
282
|
* Deferred effects that are MAYBE_DIRTY
|
|
291
283
|
* @type {Set<Effect>}
|
|
292
284
|
*/
|
|
293
|
-
w(this,
|
|
285
|
+
w(this, ot, /* @__PURE__ */ new Set());
|
|
294
286
|
/**
|
|
295
287
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
296
288
|
* is committed — we skip over these during `process`.
|
|
@@ -298,19 +290,19 @@ const Wr = class Wr {
|
|
|
298
290
|
* so they can be rescheduled if the branch survives.
|
|
299
291
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
300
292
|
*/
|
|
301
|
-
w(this,
|
|
293
|
+
w(this, Pe, /* @__PURE__ */ new Map());
|
|
302
294
|
k(this, "is_fork", !1);
|
|
303
|
-
w(this,
|
|
295
|
+
w(this, $t, !1);
|
|
304
296
|
}
|
|
305
297
|
is_deferred() {
|
|
306
|
-
return this.is_fork ||
|
|
298
|
+
return this.is_fork || f(this, yt) > 0;
|
|
307
299
|
}
|
|
308
300
|
/**
|
|
309
301
|
* Add an effect to the #skipped_branches map and reset its children
|
|
310
302
|
* @param {Effect} effect
|
|
311
303
|
*/
|
|
312
304
|
skip_effect(t) {
|
|
313
|
-
|
|
305
|
+
f(this, Pe).has(t) || f(this, Pe).set(t, { d: [], m: [] });
|
|
314
306
|
}
|
|
315
307
|
/**
|
|
316
308
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -318,11 +310,11 @@ const Wr = class Wr {
|
|
|
318
310
|
* @param {Effect} effect
|
|
319
311
|
*/
|
|
320
312
|
unskip_effect(t) {
|
|
321
|
-
var r =
|
|
313
|
+
var r = f(this, Pe).get(t);
|
|
322
314
|
if (r) {
|
|
323
|
-
|
|
315
|
+
f(this, Pe).delete(t);
|
|
324
316
|
for (var n of r.d)
|
|
325
|
-
L(n,
|
|
317
|
+
L(n, F), ge(n);
|
|
326
318
|
for (n of r.m)
|
|
327
319
|
L(n, we), ge(n);
|
|
328
320
|
}
|
|
@@ -335,14 +327,14 @@ const Wr = class Wr {
|
|
|
335
327
|
Y = [], this.apply();
|
|
336
328
|
var r = [], n = [];
|
|
337
329
|
for (const i of t)
|
|
338
|
-
|
|
330
|
+
H(this, Re, Sr).call(this, i, r, n);
|
|
339
331
|
if (this.is_deferred()) {
|
|
340
|
-
|
|
341
|
-
for (const [i, s] of
|
|
332
|
+
H(this, Re, Rr).call(this, n), H(this, Re, Rr).call(this, r);
|
|
333
|
+
for (const [i, s] of f(this, Pe))
|
|
342
334
|
qn(i, s);
|
|
343
335
|
} else {
|
|
344
|
-
for (const i of
|
|
345
|
-
|
|
336
|
+
for (const i of f(this, mt)) i();
|
|
337
|
+
f(this, mt).clear(), f(this, st) === 0 && H(this, Re, Bn).call(this), S = null, cn(n), cn(r), f(this, qt)?.resolve();
|
|
346
338
|
}
|
|
347
339
|
pe = null;
|
|
348
340
|
}
|
|
@@ -353,7 +345,7 @@ const Wr = class Wr {
|
|
|
353
345
|
* @param {any} value
|
|
354
346
|
*/
|
|
355
347
|
capture(t, r) {
|
|
356
|
-
r !==
|
|
348
|
+
r !== P && !this.previous.has(t) && this.previous.set(t, r), (t.f & Ge) === 0 && (this.current.set(t, t.v), pe?.set(t, t.v));
|
|
357
349
|
}
|
|
358
350
|
activate() {
|
|
359
351
|
S = this, this.apply();
|
|
@@ -363,53 +355,53 @@ const Wr = class Wr {
|
|
|
363
355
|
}
|
|
364
356
|
flush() {
|
|
365
357
|
if (this.activate(), Y.length > 0) {
|
|
366
|
-
if (
|
|
358
|
+
if (Hn(), S !== null && S !== this)
|
|
367
359
|
return;
|
|
368
|
-
} else
|
|
360
|
+
} else f(this, st) === 0 && this.process([]);
|
|
369
361
|
this.deactivate();
|
|
370
362
|
}
|
|
371
363
|
discard() {
|
|
372
|
-
for (const t of
|
|
373
|
-
|
|
364
|
+
for (const t of f(this, wt)) t(this);
|
|
365
|
+
f(this, wt).clear();
|
|
374
366
|
}
|
|
375
367
|
/**
|
|
376
368
|
*
|
|
377
369
|
* @param {boolean} blocking
|
|
378
370
|
*/
|
|
379
371
|
increment(t) {
|
|
380
|
-
b(this,
|
|
372
|
+
b(this, st, f(this, st) + 1), t && b(this, yt, f(this, yt) + 1);
|
|
381
373
|
}
|
|
382
374
|
/**
|
|
383
375
|
*
|
|
384
376
|
* @param {boolean} blocking
|
|
385
377
|
*/
|
|
386
378
|
decrement(t) {
|
|
387
|
-
b(this,
|
|
388
|
-
b(this,
|
|
379
|
+
b(this, st, f(this, st) - 1), t && b(this, yt, f(this, yt) - 1), !f(this, $t) && (b(this, $t, !0), ut(() => {
|
|
380
|
+
b(this, $t, !1), this.is_deferred() ? Y.length > 0 && this.flush() : this.revive();
|
|
389
381
|
}));
|
|
390
382
|
}
|
|
391
383
|
revive() {
|
|
392
|
-
for (const t of
|
|
393
|
-
|
|
394
|
-
for (const t of
|
|
384
|
+
for (const t of f(this, Ut))
|
|
385
|
+
f(this, ot).delete(t), L(t, F), ge(t);
|
|
386
|
+
for (const t of f(this, ot))
|
|
395
387
|
L(t, we), ge(t);
|
|
396
388
|
this.flush();
|
|
397
389
|
}
|
|
398
390
|
/** @param {() => void} fn */
|
|
399
391
|
oncommit(t) {
|
|
400
|
-
|
|
392
|
+
f(this, mt).add(t);
|
|
401
393
|
}
|
|
402
394
|
/** @param {(batch: Batch) => void} fn */
|
|
403
395
|
ondiscard(t) {
|
|
404
|
-
|
|
396
|
+
f(this, wt).add(t);
|
|
405
397
|
}
|
|
406
398
|
settled() {
|
|
407
|
-
return (
|
|
399
|
+
return (f(this, qt) ?? b(this, qt, An())).promise;
|
|
408
400
|
}
|
|
409
401
|
static ensure() {
|
|
410
402
|
if (S === null) {
|
|
411
403
|
const t = S = new Wr();
|
|
412
|
-
Qt.add(S),
|
|
404
|
+
Qt.add(S), Bt || ut(() => {
|
|
413
405
|
S === t && t.flush();
|
|
414
406
|
});
|
|
415
407
|
}
|
|
@@ -418,7 +410,7 @@ const Wr = class Wr {
|
|
|
418
410
|
apply() {
|
|
419
411
|
}
|
|
420
412
|
};
|
|
421
|
-
|
|
413
|
+
mt = new WeakMap(), wt = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), qt = new WeakMap(), Ut = new WeakMap(), ot = new WeakMap(), Pe = new WeakMap(), $t = new WeakMap(), Re = new WeakSet(), /**
|
|
422
414
|
* Traverse the effect tree, executing effects or stashing
|
|
423
415
|
* them for later execution as appropriate
|
|
424
416
|
* @param {Effect} root
|
|
@@ -426,11 +418,11 @@ bt = new WeakMap(), mt = new WeakMap(), it = new WeakMap(), wt = new WeakMap(),
|
|
|
426
418
|
* @param {Effect[]} render_effects
|
|
427
419
|
*/
|
|
428
420
|
Sr = function(t, r, n) {
|
|
429
|
-
t.f ^=
|
|
421
|
+
t.f ^= O;
|
|
430
422
|
for (var i = t.first, s = null; i !== null; ) {
|
|
431
|
-
var o = i.f, l = (o & (ye |
|
|
423
|
+
var o = i.f, l = (o & (ye | Je)) !== 0, a = l && (o & O) !== 0, u = a || (o & te) !== 0 || f(this, Pe).has(i);
|
|
432
424
|
if (!u && i.fn !== null) {
|
|
433
|
-
l ? i.f ^=
|
|
425
|
+
l ? i.f ^= O : s !== null && (o & (Zt | hr | Sn)) !== 0 ? s.b.defer_effect(i) : (o & Zt) !== 0 ? r.push(i) : Wt(i) && ((o & Ze) !== 0 && f(this, ot).add(i), Lt(i));
|
|
434
426
|
var c = i.first;
|
|
435
427
|
if (c !== null) {
|
|
436
428
|
i = c;
|
|
@@ -439,9 +431,9 @@ Sr = function(t, r, n) {
|
|
|
439
431
|
}
|
|
440
432
|
for (; i !== null; ) {
|
|
441
433
|
i === s && (s = null);
|
|
442
|
-
var
|
|
443
|
-
if (
|
|
444
|
-
i =
|
|
434
|
+
var p = i.next;
|
|
435
|
+
if (p !== null) {
|
|
436
|
+
i = p;
|
|
445
437
|
break;
|
|
446
438
|
}
|
|
447
439
|
i = i.parent;
|
|
@@ -450,10 +442,10 @@ Sr = function(t, r, n) {
|
|
|
450
442
|
}, /**
|
|
451
443
|
* @param {Effect[]} effects
|
|
452
444
|
*/
|
|
453
|
-
|
|
445
|
+
Rr = function(t) {
|
|
454
446
|
for (var r = 0; r < t.length; r += 1)
|
|
455
|
-
Vn(t[r],
|
|
456
|
-
},
|
|
447
|
+
Vn(t[r], f(this, Ut), f(this, ot));
|
|
448
|
+
}, Bn = function() {
|
|
457
449
|
var i;
|
|
458
450
|
if (Qt.size > 1) {
|
|
459
451
|
this.previous.clear();
|
|
@@ -464,27 +456,27 @@ Cr = function(t) {
|
|
|
464
456
|
continue;
|
|
465
457
|
}
|
|
466
458
|
const o = [];
|
|
467
|
-
for (const [
|
|
468
|
-
if (s.current.has(
|
|
469
|
-
if (r && u !== s.current.get(
|
|
470
|
-
s.current.set(
|
|
459
|
+
for (const [a, u] of this.current) {
|
|
460
|
+
if (s.current.has(a))
|
|
461
|
+
if (r && u !== s.current.get(a))
|
|
462
|
+
s.current.set(a, u);
|
|
471
463
|
else
|
|
472
464
|
continue;
|
|
473
|
-
o.push(
|
|
465
|
+
o.push(a);
|
|
474
466
|
}
|
|
475
467
|
if (o.length === 0)
|
|
476
468
|
continue;
|
|
477
|
-
const l = [...s.current.keys()].filter((
|
|
469
|
+
const l = [...s.current.keys()].filter((a) => !this.current.has(a));
|
|
478
470
|
if (l.length > 0) {
|
|
479
471
|
var n = Y;
|
|
480
472
|
Y = [];
|
|
481
|
-
const
|
|
473
|
+
const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
482
474
|
for (const c of o)
|
|
483
|
-
Zn(c, l,
|
|
475
|
+
Zn(c, l, a, u);
|
|
484
476
|
if (Y.length > 0) {
|
|
485
477
|
S = s, s.apply();
|
|
486
478
|
for (const c of Y)
|
|
487
|
-
|
|
479
|
+
H(i = s, Re, Sr).call(i, c, [], []);
|
|
488
480
|
s.deactivate();
|
|
489
481
|
}
|
|
490
482
|
Y = n;
|
|
@@ -494,32 +486,32 @@ Cr = function(t) {
|
|
|
494
486
|
}
|
|
495
487
|
this.committed = !0, Qt.delete(this);
|
|
496
488
|
};
|
|
497
|
-
let
|
|
489
|
+
let He = Wr;
|
|
498
490
|
function Dt(e) {
|
|
499
|
-
var t =
|
|
500
|
-
|
|
491
|
+
var t = Bt;
|
|
492
|
+
Bt = !0;
|
|
501
493
|
try {
|
|
502
494
|
for (var r; ; ) {
|
|
503
495
|
if (xs(), Y.length === 0 && (S?.flush(), Y.length === 0))
|
|
504
496
|
return pr = null, /** @type {T} */
|
|
505
497
|
r;
|
|
506
|
-
|
|
498
|
+
Hn();
|
|
507
499
|
}
|
|
508
500
|
} finally {
|
|
509
|
-
|
|
501
|
+
Bt = t;
|
|
510
502
|
}
|
|
511
503
|
}
|
|
512
|
-
function
|
|
504
|
+
function Hn() {
|
|
513
505
|
Ar = !0;
|
|
514
506
|
var e = null;
|
|
515
507
|
try {
|
|
516
508
|
for (var t = 0; Y.length > 0; ) {
|
|
517
|
-
var r =
|
|
509
|
+
var r = He.ensure();
|
|
518
510
|
if (t++ > 1e3) {
|
|
519
511
|
var n, i;
|
|
520
512
|
Ts();
|
|
521
513
|
}
|
|
522
|
-
r.process(Y),
|
|
514
|
+
r.process(Y), Ke.clear();
|
|
523
515
|
}
|
|
524
516
|
} finally {
|
|
525
517
|
Y = [], Ar = !1, pr = null;
|
|
@@ -529,45 +521,45 @@ function Ts() {
|
|
|
529
521
|
try {
|
|
530
522
|
hs();
|
|
531
523
|
} catch (e) {
|
|
532
|
-
|
|
524
|
+
kt(e, pr);
|
|
533
525
|
}
|
|
534
526
|
}
|
|
535
|
-
let
|
|
527
|
+
let Oe = null;
|
|
536
528
|
function cn(e) {
|
|
537
529
|
var t = e.length;
|
|
538
530
|
if (t !== 0) {
|
|
539
531
|
for (var r = 0; r < t; ) {
|
|
540
532
|
var n = e[r++];
|
|
541
|
-
if ((n.f & (
|
|
542
|
-
|
|
543
|
-
for (const i of
|
|
544
|
-
if ((i.f & (
|
|
533
|
+
if ((n.f & (Be | te)) === 0 && Wt(n) && (Oe = /* @__PURE__ */ new Set(), Lt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && fi(n), Oe?.size > 0)) {
|
|
534
|
+
Ke.clear();
|
|
535
|
+
for (const i of Oe) {
|
|
536
|
+
if ((i.f & (Be | te)) !== 0) continue;
|
|
545
537
|
const s = [i];
|
|
546
538
|
let o = i.parent;
|
|
547
539
|
for (; o !== null; )
|
|
548
|
-
|
|
540
|
+
Oe.has(o) && (Oe.delete(o), s.push(o)), o = o.parent;
|
|
549
541
|
for (let l = s.length - 1; l >= 0; l--) {
|
|
550
|
-
const
|
|
551
|
-
(
|
|
542
|
+
const a = s[l];
|
|
543
|
+
(a.f & (Be | te)) === 0 && Lt(a);
|
|
552
544
|
}
|
|
553
545
|
}
|
|
554
|
-
|
|
546
|
+
Oe.clear();
|
|
555
547
|
}
|
|
556
548
|
}
|
|
557
|
-
|
|
549
|
+
Oe = null;
|
|
558
550
|
}
|
|
559
551
|
}
|
|
560
552
|
function Zn(e, t, r, n) {
|
|
561
553
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
562
554
|
for (const i of e.reactions) {
|
|
563
555
|
const s = i.f;
|
|
564
|
-
(s &
|
|
556
|
+
(s & D) !== 0 ? Zn(
|
|
565
557
|
/** @type {Derived} */
|
|
566
558
|
i,
|
|
567
559
|
t,
|
|
568
560
|
r,
|
|
569
561
|
n
|
|
570
|
-
) : (s & (
|
|
562
|
+
) : (s & (Br | Ze)) !== 0 && (s & F) === 0 && jn(i, t, n) && (L(i, F), ge(
|
|
571
563
|
/** @type {Effect} */
|
|
572
564
|
i
|
|
573
565
|
));
|
|
@@ -578,9 +570,9 @@ function jn(e, t, r) {
|
|
|
578
570
|
if (n !== void 0) return n;
|
|
579
571
|
if (e.deps !== null)
|
|
580
572
|
for (const i of e.deps) {
|
|
581
|
-
if (
|
|
573
|
+
if (At.call(t, i))
|
|
582
574
|
return !0;
|
|
583
|
-
if ((i.f &
|
|
575
|
+
if ((i.f & D) !== 0 && jn(
|
|
584
576
|
/** @type {Derived} */
|
|
585
577
|
i,
|
|
586
578
|
t,
|
|
@@ -598,73 +590,73 @@ function ge(e) {
|
|
|
598
590
|
for (var t = pr = e; t.parent !== null; ) {
|
|
599
591
|
t = t.parent;
|
|
600
592
|
var r = t.f;
|
|
601
|
-
if (Ar && t === $ && (r &
|
|
593
|
+
if (Ar && t === $ && (r & Ze) !== 0 && (r & Rn) === 0)
|
|
602
594
|
return;
|
|
603
|
-
if ((r & (
|
|
604
|
-
if ((r &
|
|
605
|
-
t.f ^=
|
|
595
|
+
if ((r & (Je | ye)) !== 0) {
|
|
596
|
+
if ((r & O) === 0) return;
|
|
597
|
+
t.f ^= O;
|
|
606
598
|
}
|
|
607
599
|
}
|
|
608
600
|
Y.push(t);
|
|
609
601
|
}
|
|
610
602
|
function qn(e, t) {
|
|
611
|
-
if (!((e.f & ye) !== 0 && (e.f &
|
|
612
|
-
(e.f &
|
|
603
|
+
if (!((e.f & ye) !== 0 && (e.f & O) !== 0)) {
|
|
604
|
+
(e.f & F) !== 0 ? t.d.push(e) : (e.f & we) !== 0 && t.m.push(e), L(e, O);
|
|
613
605
|
for (var r = e.first; r !== null; )
|
|
614
606
|
qn(r, t), r = r.next;
|
|
615
607
|
}
|
|
616
608
|
}
|
|
617
609
|
function As(e) {
|
|
618
|
-
let t = 0, r =
|
|
610
|
+
let t = 0, r = pt(0), n;
|
|
619
611
|
return () => {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
t -= 1, t === 0 && (n?.(), n = void 0,
|
|
612
|
+
Ur() && (v(r), Yr(() => (t === 0 && (n = gr(() => e(() => Ht(r)))), t += 1, () => {
|
|
613
|
+
ut(() => {
|
|
614
|
+
t -= 1, t === 0 && (n?.(), n = void 0, Ht(r));
|
|
623
615
|
});
|
|
624
616
|
})));
|
|
625
617
|
};
|
|
626
618
|
}
|
|
627
|
-
var Ss =
|
|
628
|
-
function
|
|
629
|
-
new
|
|
619
|
+
var Ss = St | _t;
|
|
620
|
+
function Rs(e, t, r) {
|
|
621
|
+
new Cs(e, t, r);
|
|
630
622
|
}
|
|
631
|
-
var
|
|
632
|
-
class
|
|
623
|
+
var se, Yt, De, lt, Ee, Te, Q, Ae, Fe, at, Ye, xt, Et, Tt, Ie, fr, B, Un, Yn, Cr, nr, kr;
|
|
624
|
+
class Cs {
|
|
633
625
|
/**
|
|
634
626
|
* @param {TemplateNode} node
|
|
635
627
|
* @param {BoundaryProps} props
|
|
636
628
|
* @param {((anchor: Node) => void)} children
|
|
637
629
|
*/
|
|
638
630
|
constructor(t, r, n) {
|
|
639
|
-
w(this,
|
|
631
|
+
w(this, B);
|
|
640
632
|
/** @type {Boundary | null} */
|
|
641
633
|
k(this, "parent");
|
|
642
634
|
k(this, "is_pending", !1);
|
|
643
635
|
/** @type {TemplateNode} */
|
|
644
|
-
w(this,
|
|
636
|
+
w(this, se);
|
|
645
637
|
/** @type {TemplateNode | null} */
|
|
646
|
-
w(this,
|
|
638
|
+
w(this, Yt, x ? E : null);
|
|
647
639
|
/** @type {BoundaryProps} */
|
|
648
|
-
w(this,
|
|
640
|
+
w(this, De);
|
|
649
641
|
/** @type {((anchor: Node) => void)} */
|
|
650
|
-
w(this,
|
|
642
|
+
w(this, lt);
|
|
651
643
|
/** @type {Effect} */
|
|
652
644
|
w(this, Ee);
|
|
653
645
|
/** @type {Effect | null} */
|
|
654
646
|
w(this, Te, null);
|
|
655
647
|
/** @type {Effect | null} */
|
|
656
|
-
w(this,
|
|
648
|
+
w(this, Q, null);
|
|
657
649
|
/** @type {Effect | null} */
|
|
658
650
|
w(this, Ae, null);
|
|
659
651
|
/** @type {DocumentFragment | null} */
|
|
660
|
-
w(this,
|
|
661
|
-
w(this,
|
|
652
|
+
w(this, Fe, null);
|
|
653
|
+
w(this, at, 0);
|
|
662
654
|
w(this, Ye, 0);
|
|
663
|
-
w(this,
|
|
664
|
-
/** @type {Set<Effect>} */
|
|
665
|
-
w(this, xt, /* @__PURE__ */ new Set());
|
|
655
|
+
w(this, xt, !1);
|
|
666
656
|
/** @type {Set<Effect>} */
|
|
667
657
|
w(this, Et, /* @__PURE__ */ new Set());
|
|
658
|
+
/** @type {Set<Effect>} */
|
|
659
|
+
w(this, Tt, /* @__PURE__ */ new Set());
|
|
668
660
|
/**
|
|
669
661
|
* A source containing the number of pending async deriveds/expressions.
|
|
670
662
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -672,34 +664,34 @@ class Rs {
|
|
|
672
664
|
* calls followed by no-op flushes
|
|
673
665
|
* @type {Source<number> | null}
|
|
674
666
|
*/
|
|
675
|
-
w(this,
|
|
676
|
-
w(this,
|
|
677
|
-
b(this,
|
|
667
|
+
w(this, Ie, null);
|
|
668
|
+
w(this, fr, As(() => (b(this, Ie, pt(f(this, at))), () => {
|
|
669
|
+
b(this, Ie, null);
|
|
678
670
|
})));
|
|
679
|
-
b(this,
|
|
671
|
+
b(this, se, t), b(this, De, r), b(this, lt, (i) => {
|
|
680
672
|
var s = (
|
|
681
673
|
/** @type {Effect} */
|
|
682
674
|
$
|
|
683
675
|
);
|
|
684
676
|
s.b = this, s.f |= Er, n(i);
|
|
685
677
|
}), this.parent = /** @type {Effect} */
|
|
686
|
-
$.b, b(this, Ee,
|
|
678
|
+
$.b, b(this, Ee, zr(() => {
|
|
687
679
|
if (x) {
|
|
688
680
|
const i = (
|
|
689
681
|
/** @type {Comment} */
|
|
690
|
-
|
|
682
|
+
f(this, Yt)
|
|
691
683
|
);
|
|
692
|
-
|
|
684
|
+
Rt(), i.data === cr ? H(this, B, Yn).call(this) : H(this, B, Un).call(this);
|
|
693
685
|
} else
|
|
694
|
-
|
|
695
|
-
}, Ss)), x && b(this,
|
|
686
|
+
H(this, B, Cr).call(this);
|
|
687
|
+
}, Ss)), x && b(this, se, E);
|
|
696
688
|
}
|
|
697
689
|
/**
|
|
698
690
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
699
691
|
* @param {Effect} effect
|
|
700
692
|
*/
|
|
701
693
|
defer_effect(t) {
|
|
702
|
-
Vn(t,
|
|
694
|
+
Vn(t, f(this, Et), f(this, Tt));
|
|
703
695
|
}
|
|
704
696
|
/**
|
|
705
697
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -709,7 +701,7 @@ class Rs {
|
|
|
709
701
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
710
702
|
}
|
|
711
703
|
has_pending_snippet() {
|
|
712
|
-
return !!
|
|
704
|
+
return !!f(this, De).pending;
|
|
713
705
|
}
|
|
714
706
|
/**
|
|
715
707
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -718,46 +710,46 @@ class Rs {
|
|
|
718
710
|
* @param {1 | -1} d
|
|
719
711
|
*/
|
|
720
712
|
update_pending_count(t) {
|
|
721
|
-
|
|
722
|
-
b(this,
|
|
713
|
+
H(this, B, kr).call(this, t), b(this, at, f(this, at) + t), !(!f(this, Ie) || f(this, xt)) && (b(this, xt, !0), ut(() => {
|
|
714
|
+
b(this, xt, !1), f(this, Ie) && Nt(f(this, Ie), f(this, at));
|
|
723
715
|
}));
|
|
724
716
|
}
|
|
725
717
|
get_effect_pending() {
|
|
726
|
-
return
|
|
718
|
+
return f(this, fr).call(this), v(
|
|
727
719
|
/** @type {Source<number>} */
|
|
728
|
-
|
|
720
|
+
f(this, Ie)
|
|
729
721
|
);
|
|
730
722
|
}
|
|
731
723
|
/** @param {unknown} error */
|
|
732
724
|
error(t) {
|
|
733
|
-
var r =
|
|
734
|
-
let n =
|
|
725
|
+
var r = f(this, De).onerror;
|
|
726
|
+
let n = f(this, De).failed;
|
|
735
727
|
if (!r && !n)
|
|
736
728
|
throw t;
|
|
737
|
-
|
|
729
|
+
f(this, Te) && (j(f(this, Te)), b(this, Te, null)), f(this, Q) && (j(f(this, Q)), b(this, Q, null)), f(this, Ae) && (j(f(this, Ae)), b(this, Ae, null)), x && (Z(
|
|
738
730
|
/** @type {TemplateNode} */
|
|
739
|
-
|
|
740
|
-
), ws(), Z(
|
|
731
|
+
f(this, Yt)
|
|
732
|
+
), ws(), Z(ar()));
|
|
741
733
|
var i = !1, s = !1;
|
|
742
734
|
const o = () => {
|
|
743
735
|
if (i) {
|
|
744
736
|
ms();
|
|
745
737
|
return;
|
|
746
738
|
}
|
|
747
|
-
i = !0, s && bs(),
|
|
739
|
+
i = !0, s && bs(), f(this, Ae) !== null && ct(f(this, Ae), () => {
|
|
748
740
|
b(this, Ae, null);
|
|
749
|
-
}),
|
|
750
|
-
|
|
741
|
+
}), H(this, B, nr).call(this, () => {
|
|
742
|
+
He.ensure(), H(this, B, Cr).call(this);
|
|
751
743
|
});
|
|
752
744
|
};
|
|
753
|
-
|
|
745
|
+
ut(() => {
|
|
754
746
|
try {
|
|
755
747
|
s = !0, r?.(t, o), s = !1;
|
|
756
748
|
} catch (l) {
|
|
757
|
-
|
|
749
|
+
kt(l, f(this, Ee) && f(this, Ee).parent);
|
|
758
750
|
}
|
|
759
|
-
n && b(this, Ae,
|
|
760
|
-
|
|
751
|
+
n && b(this, Ae, H(this, B, nr).call(this, () => {
|
|
752
|
+
He.ensure();
|
|
761
753
|
try {
|
|
762
754
|
return ve(() => {
|
|
763
755
|
var l = (
|
|
@@ -765,52 +757,52 @@ class Rs {
|
|
|
765
757
|
$
|
|
766
758
|
);
|
|
767
759
|
l.b = this, l.f |= Er, n(
|
|
768
|
-
|
|
760
|
+
f(this, se),
|
|
769
761
|
() => t,
|
|
770
762
|
() => o
|
|
771
763
|
);
|
|
772
764
|
});
|
|
773
765
|
} catch (l) {
|
|
774
|
-
return
|
|
766
|
+
return kt(
|
|
775
767
|
l,
|
|
776
768
|
/** @type {Effect} */
|
|
777
|
-
|
|
769
|
+
f(this, Ee).parent
|
|
778
770
|
), null;
|
|
779
771
|
}
|
|
780
772
|
}));
|
|
781
773
|
});
|
|
782
774
|
}
|
|
783
775
|
}
|
|
784
|
-
|
|
776
|
+
se = new WeakMap(), Yt = new WeakMap(), De = new WeakMap(), lt = new WeakMap(), Ee = new WeakMap(), Te = new WeakMap(), Q = new WeakMap(), Ae = new WeakMap(), Fe = new WeakMap(), at = new WeakMap(), Ye = new WeakMap(), xt = new WeakMap(), Et = new WeakMap(), Tt = new WeakMap(), Ie = new WeakMap(), fr = new WeakMap(), B = new WeakSet(), Un = function() {
|
|
785
777
|
try {
|
|
786
|
-
b(this, Te, ve(() =>
|
|
778
|
+
b(this, Te, ve(() => f(this, lt).call(this, f(this, se))));
|
|
787
779
|
} catch (t) {
|
|
788
780
|
this.error(t);
|
|
789
781
|
}
|
|
790
|
-
},
|
|
791
|
-
const t =
|
|
792
|
-
t && (this.is_pending = !0, b(this,
|
|
793
|
-
var r = b(this,
|
|
794
|
-
r.append(n), b(this, Te,
|
|
782
|
+
}, Yn = function() {
|
|
783
|
+
const t = f(this, De).pending;
|
|
784
|
+
t && (this.is_pending = !0, b(this, Q, ve(() => t(f(this, se)))), ut(() => {
|
|
785
|
+
var r = b(this, Fe, document.createDocumentFragment()), n = ae();
|
|
786
|
+
r.append(n), b(this, Te, H(this, B, nr).call(this, () => (He.ensure(), ve(() => f(this, lt).call(this, n))))), f(this, Ye) === 0 && (f(this, se).before(r), b(this, Fe, null), ct(
|
|
795
787
|
/** @type {Effect} */
|
|
796
|
-
|
|
788
|
+
f(this, Q),
|
|
797
789
|
() => {
|
|
798
|
-
b(this,
|
|
790
|
+
b(this, Q, null);
|
|
799
791
|
}
|
|
800
792
|
), this.is_pending = !1);
|
|
801
793
|
}));
|
|
802
|
-
},
|
|
794
|
+
}, Cr = function() {
|
|
803
795
|
try {
|
|
804
|
-
if (this.is_pending = this.has_pending_snippet(), b(this, Ye, 0), b(this,
|
|
805
|
-
|
|
806
|
-
})),
|
|
807
|
-
var t = b(this,
|
|
808
|
-
di(
|
|
796
|
+
if (this.is_pending = this.has_pending_snippet(), b(this, Ye, 0), b(this, at, 0), b(this, Te, ve(() => {
|
|
797
|
+
f(this, lt).call(this, f(this, se));
|
|
798
|
+
})), f(this, Ye) > 0) {
|
|
799
|
+
var t = b(this, Fe, document.createDocumentFragment());
|
|
800
|
+
di(f(this, Te), t);
|
|
809
801
|
const r = (
|
|
810
802
|
/** @type {(anchor: Node) => void} */
|
|
811
|
-
|
|
803
|
+
f(this, De).pending
|
|
812
804
|
);
|
|
813
|
-
b(this,
|
|
805
|
+
b(this, Q, ve(() => r(f(this, se))));
|
|
814
806
|
} else
|
|
815
807
|
this.is_pending = !1;
|
|
816
808
|
} catch (r) {
|
|
@@ -821,14 +813,14 @@ ie = new WeakMap(), zt = new WeakMap(), Oe = new WeakMap(), ot = new WeakMap(),
|
|
|
821
813
|
* @param {() => T} fn
|
|
822
814
|
*/
|
|
823
815
|
nr = function(t) {
|
|
824
|
-
var r = $, n = y, i =
|
|
825
|
-
|
|
816
|
+
var r = $, n = y, i = G;
|
|
817
|
+
ue(f(this, Ee)), K(f(this, Ee)), Ct(f(this, Ee).ctx);
|
|
826
818
|
try {
|
|
827
819
|
return t();
|
|
828
820
|
} catch (s) {
|
|
829
821
|
return Fn(s), null;
|
|
830
822
|
} finally {
|
|
831
|
-
|
|
823
|
+
ue(r), K(n), Ct(i);
|
|
832
824
|
}
|
|
833
825
|
}, /**
|
|
834
826
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -838,18 +830,18 @@ nr = function(t) {
|
|
|
838
830
|
kr = function(t) {
|
|
839
831
|
var r;
|
|
840
832
|
if (!this.has_pending_snippet()) {
|
|
841
|
-
this.parent &&
|
|
833
|
+
this.parent && H(r = this.parent, B, kr).call(r, t);
|
|
842
834
|
return;
|
|
843
835
|
}
|
|
844
|
-
if (b(this, Ye,
|
|
836
|
+
if (b(this, Ye, f(this, Ye) + t), f(this, Ye) === 0) {
|
|
845
837
|
this.is_pending = !1;
|
|
846
|
-
for (const n of
|
|
847
|
-
L(n,
|
|
848
|
-
for (const n of
|
|
838
|
+
for (const n of f(this, Et))
|
|
839
|
+
L(n, F), ge(n);
|
|
840
|
+
for (const n of f(this, Tt))
|
|
849
841
|
L(n, we), ge(n);
|
|
850
|
-
|
|
851
|
-
b(this,
|
|
852
|
-
}),
|
|
842
|
+
f(this, Et).clear(), f(this, Tt).clear(), f(this, Q) && ct(f(this, Q), () => {
|
|
843
|
+
b(this, Q, null);
|
|
844
|
+
}), f(this, Fe) && (f(this, se).before(f(this, Fe)), b(this, Fe, null));
|
|
853
845
|
}
|
|
854
846
|
};
|
|
855
847
|
function ks(e, t, r, n) {
|
|
@@ -862,13 +854,13 @@ function ks(e, t, r, n) {
|
|
|
862
854
|
var o = S, l = (
|
|
863
855
|
/** @type {Effect} */
|
|
864
856
|
$
|
|
865
|
-
),
|
|
857
|
+
), a = Ns(), u = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((h) => h.promise)) : null;
|
|
866
858
|
function c(h) {
|
|
867
|
-
|
|
859
|
+
a();
|
|
868
860
|
try {
|
|
869
861
|
n(h);
|
|
870
862
|
} catch (_) {
|
|
871
|
-
(l.f &
|
|
863
|
+
(l.f & Be) === 0 && kt(_, l);
|
|
872
864
|
}
|
|
873
865
|
o?.deactivate(), Nr();
|
|
874
866
|
}
|
|
@@ -876,28 +868,28 @@ function ks(e, t, r, n) {
|
|
|
876
868
|
u.then(() => c(t.map(i)));
|
|
877
869
|
return;
|
|
878
870
|
}
|
|
879
|
-
function
|
|
880
|
-
|
|
871
|
+
function p() {
|
|
872
|
+
a(), Promise.all(r.map((h) => /* @__PURE__ */ Ls(h))).then((h) => c([...t.map(i), ...h])).catch((h) => kt(h, l));
|
|
881
873
|
}
|
|
882
|
-
u ? u.then(
|
|
874
|
+
u ? u.then(p) : p();
|
|
883
875
|
}
|
|
884
876
|
function Ns() {
|
|
885
|
-
var e = $, t = y, r =
|
|
877
|
+
var e = $, t = y, r = G, n = S;
|
|
886
878
|
return function(s = !0) {
|
|
887
|
-
|
|
879
|
+
ue(e), K(t), Ct(r), s && n?.activate();
|
|
888
880
|
};
|
|
889
881
|
}
|
|
890
882
|
function Nr() {
|
|
891
|
-
|
|
883
|
+
ue(null), K(null), Ct(null);
|
|
892
884
|
}
|
|
893
885
|
// @__NO_SIDE_EFFECTS__
|
|
894
886
|
function _r(e) {
|
|
895
|
-
var t =
|
|
887
|
+
var t = D | F, r = y !== null && (y.f & D) !== 0 ? (
|
|
896
888
|
/** @type {Derived} */
|
|
897
889
|
y
|
|
898
890
|
) : null;
|
|
899
|
-
return $ !== null && ($.f |=
|
|
900
|
-
ctx:
|
|
891
|
+
return $ !== null && ($.f |= _t), {
|
|
892
|
+
ctx: G,
|
|
901
893
|
deps: null,
|
|
902
894
|
effects: null,
|
|
903
895
|
equals: Nn,
|
|
@@ -907,7 +899,7 @@ function _r(e) {
|
|
|
907
899
|
rv: 0,
|
|
908
900
|
v: (
|
|
909
901
|
/** @type {V} */
|
|
910
|
-
|
|
902
|
+
P
|
|
911
903
|
),
|
|
912
904
|
wv: 0,
|
|
913
905
|
parent: r ?? $,
|
|
@@ -920,7 +912,7 @@ function Ls(e, t, r) {
|
|
|
920
912
|
/** @type {Effect | null} */
|
|
921
913
|
$
|
|
922
914
|
);
|
|
923
|
-
n === null &&
|
|
915
|
+
n === null && as();
|
|
924
916
|
var i = (
|
|
925
917
|
/** @type {Boundary} */
|
|
926
918
|
n.b
|
|
@@ -928,10 +920,10 @@ function Ls(e, t, r) {
|
|
|
928
920
|
/** @type {Promise<V>} */
|
|
929
921
|
/** @type {unknown} */
|
|
930
922
|
void 0
|
|
931
|
-
), o =
|
|
923
|
+
), o = pt(
|
|
932
924
|
/** @type {V} */
|
|
933
|
-
|
|
934
|
-
), l = !y,
|
|
925
|
+
P
|
|
926
|
+
), l = !y, a = /* @__PURE__ */ new Map();
|
|
935
927
|
return js(() => {
|
|
936
928
|
var u = An();
|
|
937
929
|
s = u.promise;
|
|
@@ -947,37 +939,37 @@ function Ls(e, t, r) {
|
|
|
947
939
|
S
|
|
948
940
|
);
|
|
949
941
|
if (l) {
|
|
950
|
-
var
|
|
951
|
-
i.update_pending_count(1), c.increment(
|
|
942
|
+
var p = i.is_rendered();
|
|
943
|
+
i.update_pending_count(1), c.increment(p), a.get(c)?.reject(tt), a.delete(c), a.set(c, u);
|
|
952
944
|
}
|
|
953
945
|
const h = (_, d = void 0) => {
|
|
954
946
|
if (c.activate(), d)
|
|
955
|
-
d !==
|
|
947
|
+
d !== tt && (o.f |= Ge, Nt(o, d));
|
|
956
948
|
else {
|
|
957
|
-
(o.f &
|
|
958
|
-
for (const [T, g] of
|
|
959
|
-
if (
|
|
960
|
-
g.reject(
|
|
949
|
+
(o.f & Ge) !== 0 && (o.f ^= Ge), Nt(o, _);
|
|
950
|
+
for (const [T, g] of a) {
|
|
951
|
+
if (a.delete(T), T === c) break;
|
|
952
|
+
g.reject(tt);
|
|
961
953
|
}
|
|
962
954
|
}
|
|
963
|
-
l && (i.update_pending_count(-1), c.decrement(
|
|
955
|
+
l && (i.update_pending_count(-1), c.decrement(p));
|
|
964
956
|
};
|
|
965
957
|
u.promise.then(h, (_) => h(null, _ || "unknown"));
|
|
966
|
-
}),
|
|
967
|
-
for (const u of
|
|
968
|
-
u.reject(
|
|
958
|
+
}), Bs(() => {
|
|
959
|
+
for (const u of a.values())
|
|
960
|
+
u.reject(tt);
|
|
969
961
|
}), new Promise((u) => {
|
|
970
|
-
function c(
|
|
962
|
+
function c(p) {
|
|
971
963
|
function h() {
|
|
972
|
-
|
|
964
|
+
p === s ? u(o) : c(s);
|
|
973
965
|
}
|
|
974
|
-
|
|
966
|
+
p.then(h, h);
|
|
975
967
|
}
|
|
976
968
|
c(s);
|
|
977
969
|
});
|
|
978
970
|
}
|
|
979
971
|
// @__NO_SIDE_EFFECTS__
|
|
980
|
-
function
|
|
972
|
+
function Le(e) {
|
|
981
973
|
const t = /* @__PURE__ */ _r(e);
|
|
982
974
|
return hi(t), t;
|
|
983
975
|
}
|
|
@@ -999,8 +991,8 @@ function Os(e) {
|
|
|
999
991
|
}
|
|
1000
992
|
function Ps(e) {
|
|
1001
993
|
for (var t = e.parent; t !== null; ) {
|
|
1002
|
-
if ((t.f &
|
|
1003
|
-
return (t.f &
|
|
994
|
+
if ((t.f & D) === 0)
|
|
995
|
+
return (t.f & Be) === 0 ? (
|
|
1004
996
|
/** @type {Effect} */
|
|
1005
997
|
t
|
|
1006
998
|
) : null;
|
|
@@ -1010,36 +1002,36 @@ function Ps(e) {
|
|
|
1010
1002
|
}
|
|
1011
1003
|
function Zr(e) {
|
|
1012
1004
|
var t, r = $;
|
|
1013
|
-
|
|
1005
|
+
ue(Ps(e));
|
|
1014
1006
|
try {
|
|
1015
|
-
e.f &= ~
|
|
1007
|
+
e.f &= ~vt, Os(e), t = gi(e);
|
|
1016
1008
|
} finally {
|
|
1017
|
-
|
|
1009
|
+
ue(r);
|
|
1018
1010
|
}
|
|
1019
1011
|
return t;
|
|
1020
1012
|
}
|
|
1021
|
-
function
|
|
1013
|
+
function zn(e) {
|
|
1022
1014
|
var t = Zr(e);
|
|
1023
1015
|
if (!e.equals(t) && (e.wv = pi(), (!S?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
1024
|
-
L(e,
|
|
1016
|
+
L(e, O);
|
|
1025
1017
|
return;
|
|
1026
1018
|
}
|
|
1027
|
-
|
|
1019
|
+
Xe || (pe !== null ? (Ur() || S?.is_fork) && pe.set(e, t) : Hr(e));
|
|
1028
1020
|
}
|
|
1029
1021
|
function Ds(e) {
|
|
1030
1022
|
if (e.effects !== null)
|
|
1031
1023
|
for (const t of e.effects)
|
|
1032
|
-
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
1024
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(tt), t.teardown = rs, t.ac = null, jt(t, 0), Gr(t));
|
|
1033
1025
|
}
|
|
1034
1026
|
function Gn(e) {
|
|
1035
1027
|
if (e.effects !== null)
|
|
1036
1028
|
for (const t of e.effects)
|
|
1037
|
-
t.teardown &&
|
|
1029
|
+
t.teardown && Lt(t);
|
|
1038
1030
|
}
|
|
1039
1031
|
let Lr = /* @__PURE__ */ new Set();
|
|
1040
|
-
const
|
|
1032
|
+
const Ke = /* @__PURE__ */ new Map();
|
|
1041
1033
|
let Kn = !1;
|
|
1042
|
-
function
|
|
1034
|
+
function pt(e, t) {
|
|
1043
1035
|
var r = {
|
|
1044
1036
|
f: 0,
|
|
1045
1037
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
@@ -1053,58 +1045,58 @@ function vt(e, t) {
|
|
|
1053
1045
|
}
|
|
1054
1046
|
// @__NO_SIDE_EFFECTS__
|
|
1055
1047
|
function N(e, t) {
|
|
1056
|
-
const r =
|
|
1048
|
+
const r = pt(e);
|
|
1057
1049
|
return hi(r), r;
|
|
1058
1050
|
}
|
|
1059
1051
|
// @__NO_SIDE_EFFECTS__
|
|
1060
1052
|
function Wn(e, t = !1, r = !0) {
|
|
1061
|
-
const n =
|
|
1053
|
+
const n = pt(e);
|
|
1062
1054
|
return t || (n.equals = Ln), n;
|
|
1063
1055
|
}
|
|
1064
|
-
function
|
|
1056
|
+
function R(e, t, r = !1) {
|
|
1065
1057
|
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1066
1058
|
// to ensure we error if state is set inside an inspect effect
|
|
1067
|
-
(!me || (y.f & un) !== 0) && Pn() && (y.f & (
|
|
1059
|
+
(!me || (y.f & un) !== 0) && Pn() && (y.f & (D | Ze | Br | un)) !== 0 && (fe === null || !At.call(fe, e)) && gs();
|
|
1068
1060
|
let n = r ? Ft(t) : t;
|
|
1069
|
-
return
|
|
1061
|
+
return Nt(e, n);
|
|
1070
1062
|
}
|
|
1071
|
-
function
|
|
1063
|
+
function Nt(e, t) {
|
|
1072
1064
|
if (!e.equals(t)) {
|
|
1073
1065
|
var r = e.v;
|
|
1074
|
-
|
|
1075
|
-
var n =
|
|
1076
|
-
if (n.capture(e, r), (e.f &
|
|
1066
|
+
Xe ? Ke.set(e, t) : Ke.set(e, r), e.v = t;
|
|
1067
|
+
var n = He.ensure();
|
|
1068
|
+
if (n.capture(e, r), (e.f & D) !== 0) {
|
|
1077
1069
|
const i = (
|
|
1078
1070
|
/** @type {Derived} */
|
|
1079
1071
|
e
|
|
1080
1072
|
);
|
|
1081
|
-
(e.f &
|
|
1073
|
+
(e.f & F) !== 0 && Zr(i), Hr(i);
|
|
1082
1074
|
}
|
|
1083
|
-
e.wv = pi(), Xn(e,
|
|
1075
|
+
e.wv = pi(), Xn(e, F), $ !== null && ($.f & O) !== 0 && ($.f & (ye | Je)) === 0 && (ie === null ? Us([e]) : ie.push(e)), !n.is_fork && Lr.size > 0 && !Kn && Fs();
|
|
1084
1076
|
}
|
|
1085
1077
|
return t;
|
|
1086
1078
|
}
|
|
1087
1079
|
function Fs() {
|
|
1088
1080
|
Kn = !1;
|
|
1089
1081
|
for (const e of Lr)
|
|
1090
|
-
(e.f &
|
|
1082
|
+
(e.f & O) !== 0 && L(e, we), Wt(e) && Lt(e);
|
|
1091
1083
|
Lr.clear();
|
|
1092
1084
|
}
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1085
|
+
function Ht(e) {
|
|
1086
|
+
R(e, e.v + 1);
|
|
1095
1087
|
}
|
|
1096
1088
|
function Xn(e, t) {
|
|
1097
1089
|
var r = e.reactions;
|
|
1098
1090
|
if (r !== null)
|
|
1099
1091
|
for (var n = r.length, i = 0; i < n; i++) {
|
|
1100
|
-
var s = r[i], o = s.f, l = (o &
|
|
1101
|
-
if (l && L(s, t), (o &
|
|
1102
|
-
var
|
|
1092
|
+
var s = r[i], o = s.f, l = (o & F) === 0;
|
|
1093
|
+
if (l && L(s, t), (o & D) !== 0) {
|
|
1094
|
+
var a = (
|
|
1103
1095
|
/** @type {Derived} */
|
|
1104
1096
|
s
|
|
1105
1097
|
);
|
|
1106
|
-
pe?.delete(
|
|
1107
|
-
} else l && ((o &
|
|
1098
|
+
pe?.delete(a), (o & vt) === 0 && (o & le && (s.f |= vt), Xn(a, we));
|
|
1099
|
+
} else l && ((o & Ze) !== 0 && Oe !== null && Oe.add(
|
|
1108
1100
|
/** @type {Effect} */
|
|
1109
1101
|
s
|
|
1110
1102
|
), ge(
|
|
@@ -1119,13 +1111,13 @@ function Ft(e) {
|
|
|
1119
1111
|
const t = Tn(e);
|
|
1120
1112
|
if (t !== es && t !== ts)
|
|
1121
1113
|
return e;
|
|
1122
|
-
var r = /* @__PURE__ */ new Map(), n = En(e), i = /* @__PURE__ */ N(0), s =
|
|
1123
|
-
if (
|
|
1114
|
+
var r = /* @__PURE__ */ new Map(), n = En(e), i = /* @__PURE__ */ N(0), s = dt, o = (l) => {
|
|
1115
|
+
if (dt === s)
|
|
1124
1116
|
return l();
|
|
1125
|
-
var
|
|
1126
|
-
|
|
1117
|
+
var a = y, u = dt;
|
|
1118
|
+
K(null), vn(s);
|
|
1127
1119
|
var c = l();
|
|
1128
|
-
return
|
|
1120
|
+
return K(a), vn(u), c;
|
|
1129
1121
|
};
|
|
1130
1122
|
return n && r.set("length", /* @__PURE__ */ N(
|
|
1131
1123
|
/** @type {any[]} */
|
|
@@ -1134,46 +1126,46 @@ function Ft(e) {
|
|
|
1134
1126
|
/** @type {any} */
|
|
1135
1127
|
e,
|
|
1136
1128
|
{
|
|
1137
|
-
defineProperty(l,
|
|
1129
|
+
defineProperty(l, a, u) {
|
|
1138
1130
|
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && ps();
|
|
1139
|
-
var c = r.get(
|
|
1131
|
+
var c = r.get(a);
|
|
1140
1132
|
return c === void 0 ? o(() => {
|
|
1141
|
-
var
|
|
1142
|
-
return r.set(
|
|
1143
|
-
}) :
|
|
1133
|
+
var p = /* @__PURE__ */ N(u.value);
|
|
1134
|
+
return r.set(a, p), p;
|
|
1135
|
+
}) : R(c, u.value, !0), !0;
|
|
1144
1136
|
},
|
|
1145
|
-
deleteProperty(l,
|
|
1146
|
-
var u = r.get(
|
|
1137
|
+
deleteProperty(l, a) {
|
|
1138
|
+
var u = r.get(a);
|
|
1147
1139
|
if (u === void 0) {
|
|
1148
|
-
if (
|
|
1149
|
-
const c = o(() => /* @__PURE__ */ N(
|
|
1150
|
-
r.set(
|
|
1140
|
+
if (a in l) {
|
|
1141
|
+
const c = o(() => /* @__PURE__ */ N(P));
|
|
1142
|
+
r.set(a, c), Ht(i);
|
|
1151
1143
|
}
|
|
1152
1144
|
} else
|
|
1153
|
-
|
|
1145
|
+
R(u, P), Ht(i);
|
|
1154
1146
|
return !0;
|
|
1155
1147
|
},
|
|
1156
|
-
get(l,
|
|
1157
|
-
if (
|
|
1148
|
+
get(l, a, u) {
|
|
1149
|
+
if (a === rr)
|
|
1158
1150
|
return e;
|
|
1159
|
-
var c = r.get(
|
|
1160
|
-
if (c === void 0 && (!
|
|
1161
|
-
var _ = Ft(
|
|
1151
|
+
var c = r.get(a), p = a in l;
|
|
1152
|
+
if (c === void 0 && (!p || bt(l, a)?.writable) && (c = o(() => {
|
|
1153
|
+
var _ = Ft(p ? l[a] : P), d = /* @__PURE__ */ N(_);
|
|
1162
1154
|
return d;
|
|
1163
|
-
}), r.set(
|
|
1164
|
-
var h =
|
|
1165
|
-
return h ===
|
|
1155
|
+
}), r.set(a, c)), c !== void 0) {
|
|
1156
|
+
var h = v(c);
|
|
1157
|
+
return h === P ? void 0 : h;
|
|
1166
1158
|
}
|
|
1167
|
-
return Reflect.get(l,
|
|
1159
|
+
return Reflect.get(l, a, u);
|
|
1168
1160
|
},
|
|
1169
|
-
getOwnPropertyDescriptor(l,
|
|
1170
|
-
var u = Reflect.getOwnPropertyDescriptor(l,
|
|
1161
|
+
getOwnPropertyDescriptor(l, a) {
|
|
1162
|
+
var u = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1171
1163
|
if (u && "value" in u) {
|
|
1172
|
-
var c = r.get(
|
|
1173
|
-
c && (u.value =
|
|
1164
|
+
var c = r.get(a);
|
|
1165
|
+
c && (u.value = v(c));
|
|
1174
1166
|
} else if (u === void 0) {
|
|
1175
|
-
var
|
|
1176
|
-
if (
|
|
1167
|
+
var p = r.get(a), h = p?.v;
|
|
1168
|
+
if (p !== void 0 && h !== P)
|
|
1177
1169
|
return {
|
|
1178
1170
|
enumerable: !0,
|
|
1179
1171
|
configurable: !0,
|
|
@@ -1183,58 +1175,58 @@ function Ft(e) {
|
|
|
1183
1175
|
}
|
|
1184
1176
|
return u;
|
|
1185
1177
|
},
|
|
1186
|
-
has(l,
|
|
1187
|
-
if (
|
|
1178
|
+
has(l, a) {
|
|
1179
|
+
if (a === rr)
|
|
1188
1180
|
return !0;
|
|
1189
|
-
var u = r.get(
|
|
1190
|
-
if (u !== void 0 || $ !== null && (!c ||
|
|
1181
|
+
var u = r.get(a), c = u !== void 0 && u.v !== P || Reflect.has(l, a);
|
|
1182
|
+
if (u !== void 0 || $ !== null && (!c || bt(l, a)?.writable)) {
|
|
1191
1183
|
u === void 0 && (u = o(() => {
|
|
1192
|
-
var h = c ? Ft(l[
|
|
1184
|
+
var h = c ? Ft(l[a]) : P, _ = /* @__PURE__ */ N(h);
|
|
1193
1185
|
return _;
|
|
1194
|
-
}), r.set(
|
|
1195
|
-
var
|
|
1196
|
-
if (
|
|
1186
|
+
}), r.set(a, u));
|
|
1187
|
+
var p = v(u);
|
|
1188
|
+
if (p === P)
|
|
1197
1189
|
return !1;
|
|
1198
1190
|
}
|
|
1199
1191
|
return c;
|
|
1200
1192
|
},
|
|
1201
|
-
set(l,
|
|
1202
|
-
var
|
|
1203
|
-
if (n &&
|
|
1193
|
+
set(l, a, u, c) {
|
|
1194
|
+
var p = r.get(a), h = a in l;
|
|
1195
|
+
if (n && a === "length")
|
|
1204
1196
|
for (var _ = u; _ < /** @type {Source<number>} */
|
|
1205
|
-
|
|
1197
|
+
p.v; _ += 1) {
|
|
1206
1198
|
var d = r.get(_ + "");
|
|
1207
|
-
d !== void 0 ?
|
|
1199
|
+
d !== void 0 ? R(d, P) : _ in l && (d = o(() => /* @__PURE__ */ N(P)), r.set(_ + "", d));
|
|
1208
1200
|
}
|
|
1209
|
-
if (
|
|
1210
|
-
(!h ||
|
|
1201
|
+
if (p === void 0)
|
|
1202
|
+
(!h || bt(l, a)?.writable) && (p = o(() => /* @__PURE__ */ N(void 0)), R(p, Ft(u)), r.set(a, p));
|
|
1211
1203
|
else {
|
|
1212
|
-
h =
|
|
1204
|
+
h = p.v !== P;
|
|
1213
1205
|
var T = o(() => Ft(u));
|
|
1214
|
-
|
|
1206
|
+
R(p, T);
|
|
1215
1207
|
}
|
|
1216
|
-
var g = Reflect.getOwnPropertyDescriptor(l,
|
|
1208
|
+
var g = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1217
1209
|
if (g?.set && g.set.call(c, u), !h) {
|
|
1218
|
-
if (n && typeof
|
|
1219
|
-
var
|
|
1210
|
+
if (n && typeof a == "string") {
|
|
1211
|
+
var I = (
|
|
1220
1212
|
/** @type {Source<number>} */
|
|
1221
1213
|
r.get("length")
|
|
1222
|
-
),
|
|
1223
|
-
Number.isInteger(
|
|
1214
|
+
), C = Number(a);
|
|
1215
|
+
Number.isInteger(C) && C >= I.v && R(I, C + 1);
|
|
1224
1216
|
}
|
|
1225
|
-
|
|
1217
|
+
Ht(i);
|
|
1226
1218
|
}
|
|
1227
1219
|
return !0;
|
|
1228
1220
|
},
|
|
1229
1221
|
ownKeys(l) {
|
|
1230
|
-
|
|
1231
|
-
var
|
|
1232
|
-
var h = r.get(
|
|
1233
|
-
return h === void 0 || h.v !==
|
|
1222
|
+
v(i);
|
|
1223
|
+
var a = Reflect.ownKeys(l).filter((p) => {
|
|
1224
|
+
var h = r.get(p);
|
|
1225
|
+
return h === void 0 || h.v !== P;
|
|
1234
1226
|
});
|
|
1235
1227
|
for (var [u, c] of r)
|
|
1236
|
-
c.v !==
|
|
1237
|
-
return
|
|
1228
|
+
c.v !== P && !(u in l) && a.push(u);
|
|
1229
|
+
return a;
|
|
1238
1230
|
},
|
|
1239
1231
|
setPrototypeOf() {
|
|
1240
1232
|
_s();
|
|
@@ -1247,10 +1239,10 @@ function Mr() {
|
|
|
1247
1239
|
if (dn === void 0) {
|
|
1248
1240
|
dn = window, Jn = /Firefox/.test(navigator.userAgent);
|
|
1249
1241
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1250
|
-
Qn =
|
|
1242
|
+
Qn = bt(t, "firstChild").get, ei = bt(t, "nextSibling").get, fn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), fn(r) && (r.__t = void 0);
|
|
1251
1243
|
}
|
|
1252
1244
|
}
|
|
1253
|
-
function
|
|
1245
|
+
function ae(e = "") {
|
|
1254
1246
|
return document.createTextNode(e);
|
|
1255
1247
|
}
|
|
1256
1248
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1272,9 +1264,9 @@ function yr(e, t) {
|
|
|
1272
1264
|
return /* @__PURE__ */ be(e);
|
|
1273
1265
|
var r = /* @__PURE__ */ be(E);
|
|
1274
1266
|
if (r === null)
|
|
1275
|
-
r = E.appendChild(
|
|
1267
|
+
r = E.appendChild(ae());
|
|
1276
1268
|
else if (t && r.nodeType !== vr) {
|
|
1277
|
-
var n =
|
|
1269
|
+
var n = ae();
|
|
1278
1270
|
return r?.before(n), Z(n), n;
|
|
1279
1271
|
}
|
|
1280
1272
|
return t && qr(
|
|
@@ -1289,7 +1281,7 @@ function $r(e, t = !1) {
|
|
|
1289
1281
|
}
|
|
1290
1282
|
if (t) {
|
|
1291
1283
|
if (E?.nodeType !== vr) {
|
|
1292
|
-
var n =
|
|
1284
|
+
var n = ae();
|
|
1293
1285
|
return E?.before(n), Z(n), n;
|
|
1294
1286
|
}
|
|
1295
1287
|
qr(
|
|
@@ -1299,7 +1291,7 @@ function $r(e, t = !1) {
|
|
|
1299
1291
|
}
|
|
1300
1292
|
return E;
|
|
1301
1293
|
}
|
|
1302
|
-
function
|
|
1294
|
+
function et(e, t = 1, r = !1) {
|
|
1303
1295
|
let n = x ? E : e;
|
|
1304
1296
|
for (var i; t--; )
|
|
1305
1297
|
i = n, n = /** @type {TemplateNode} */
|
|
@@ -1308,7 +1300,7 @@ function Qe(e, t = 1, r = !1) {
|
|
|
1308
1300
|
return n;
|
|
1309
1301
|
if (r) {
|
|
1310
1302
|
if (n?.nodeType !== vr) {
|
|
1311
|
-
var s =
|
|
1303
|
+
var s = ae();
|
|
1312
1304
|
return n === null ? i?.after(s) : n.before(s), Z(s), s;
|
|
1313
1305
|
}
|
|
1314
1306
|
qr(
|
|
@@ -1343,28 +1335,28 @@ function qr(e) {
|
|
|
1343
1335
|
}
|
|
1344
1336
|
function ni(e) {
|
|
1345
1337
|
var t = y, r = $;
|
|
1346
|
-
|
|
1338
|
+
K(null), ue(null);
|
|
1347
1339
|
try {
|
|
1348
1340
|
return e();
|
|
1349
1341
|
} finally {
|
|
1350
|
-
|
|
1342
|
+
K(t), ue(r);
|
|
1351
1343
|
}
|
|
1352
1344
|
}
|
|
1353
1345
|
function Is(e) {
|
|
1354
|
-
$ === null && (y === null && ds(), cs()),
|
|
1346
|
+
$ === null && (y === null && ds(), cs()), Xe && us();
|
|
1355
1347
|
}
|
|
1356
1348
|
function Vs(e, t) {
|
|
1357
1349
|
var r = t.last;
|
|
1358
1350
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1359
1351
|
}
|
|
1360
|
-
function
|
|
1352
|
+
function Ce(e, t, r) {
|
|
1361
1353
|
var n = $;
|
|
1362
|
-
n !== null && (n.f &
|
|
1354
|
+
n !== null && (n.f & te) !== 0 && (e |= te);
|
|
1363
1355
|
var i = {
|
|
1364
|
-
ctx:
|
|
1356
|
+
ctx: G,
|
|
1365
1357
|
deps: null,
|
|
1366
1358
|
nodes: null,
|
|
1367
|
-
f: e |
|
|
1359
|
+
f: e | F | le,
|
|
1368
1360
|
first: null,
|
|
1369
1361
|
fn: t,
|
|
1370
1362
|
last: null,
|
|
@@ -1378,14 +1370,14 @@ function Re(e, t, r) {
|
|
|
1378
1370
|
};
|
|
1379
1371
|
if (r)
|
|
1380
1372
|
try {
|
|
1381
|
-
|
|
1373
|
+
Lt(i);
|
|
1382
1374
|
} catch (l) {
|
|
1383
1375
|
throw j(i), l;
|
|
1384
1376
|
}
|
|
1385
1377
|
else t !== null && ge(i);
|
|
1386
1378
|
var s = i;
|
|
1387
1379
|
if (r && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1388
|
-
(s.f &
|
|
1380
|
+
(s.f & _t) === 0 && (s = s.first, (e & Ze) !== 0 && (e & St) !== 0 && s !== null && (s.f |= St)), s !== null && (s.parent = n, n !== null && Vs(s, n), y !== null && (y.f & D) !== 0 && (e & Je) === 0)) {
|
|
1389
1381
|
var o = (
|
|
1390
1382
|
/** @type {Derived} */
|
|
1391
1383
|
y
|
|
@@ -1394,77 +1386,77 @@ function Re(e, t, r) {
|
|
|
1394
1386
|
}
|
|
1395
1387
|
return i;
|
|
1396
1388
|
}
|
|
1397
|
-
function
|
|
1389
|
+
function Ur() {
|
|
1398
1390
|
return y !== null && !me;
|
|
1399
1391
|
}
|
|
1400
|
-
function
|
|
1401
|
-
const t =
|
|
1402
|
-
return L(t,
|
|
1392
|
+
function Bs(e) {
|
|
1393
|
+
const t = Ce(hr, null, !1);
|
|
1394
|
+
return L(t, O), t.teardown = e, t;
|
|
1403
1395
|
}
|
|
1404
1396
|
function ii(e) {
|
|
1405
1397
|
Is();
|
|
1406
1398
|
var t = (
|
|
1407
1399
|
/** @type {Effect} */
|
|
1408
1400
|
$.f
|
|
1409
|
-
), r = !y && (t & ye) !== 0 && (t &
|
|
1401
|
+
), r = !y && (t & ye) !== 0 && (t & Mt) === 0;
|
|
1410
1402
|
if (r) {
|
|
1411
1403
|
var n = (
|
|
1412
1404
|
/** @type {ComponentContext} */
|
|
1413
|
-
|
|
1405
|
+
G
|
|
1414
1406
|
);
|
|
1415
1407
|
(n.e ?? (n.e = [])).push(e);
|
|
1416
1408
|
} else
|
|
1417
1409
|
return si(e);
|
|
1418
1410
|
}
|
|
1419
1411
|
function si(e) {
|
|
1420
|
-
return
|
|
1412
|
+
return Ce(Zt | is, e, !1);
|
|
1421
1413
|
}
|
|
1422
|
-
function
|
|
1423
|
-
|
|
1424
|
-
const t =
|
|
1414
|
+
function Hs(e) {
|
|
1415
|
+
He.ensure();
|
|
1416
|
+
const t = Ce(Je | _t, e, !0);
|
|
1425
1417
|
return () => {
|
|
1426
1418
|
j(t);
|
|
1427
1419
|
};
|
|
1428
1420
|
}
|
|
1429
1421
|
function Zs(e) {
|
|
1430
|
-
|
|
1431
|
-
const t =
|
|
1422
|
+
He.ensure();
|
|
1423
|
+
const t = Ce(Je | _t, e, !0);
|
|
1432
1424
|
return (r = {}) => new Promise((n) => {
|
|
1433
|
-
r.outro ?
|
|
1425
|
+
r.outro ? ct(t, () => {
|
|
1434
1426
|
j(t), n(void 0);
|
|
1435
1427
|
}) : (j(t), n(void 0));
|
|
1436
1428
|
});
|
|
1437
1429
|
}
|
|
1438
1430
|
function oi(e) {
|
|
1439
|
-
return
|
|
1431
|
+
return Ce(Zt, e, !1);
|
|
1440
1432
|
}
|
|
1441
1433
|
function js(e) {
|
|
1442
|
-
return
|
|
1434
|
+
return Ce(Br | _t, e, !0);
|
|
1443
1435
|
}
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1436
|
+
function Yr(e, t = 0) {
|
|
1437
|
+
return Ce(hr | t, e, !0);
|
|
1446
1438
|
}
|
|
1447
|
-
function
|
|
1439
|
+
function Me(e, t = [], r = [], n = []) {
|
|
1448
1440
|
ks(n, t, r, (i) => {
|
|
1449
|
-
|
|
1441
|
+
Ce(hr, () => e(...i.map(v)), !0);
|
|
1450
1442
|
});
|
|
1451
1443
|
}
|
|
1452
|
-
function
|
|
1453
|
-
var r =
|
|
1444
|
+
function zr(e, t = 0) {
|
|
1445
|
+
var r = Ce(Ze | t, e, !0);
|
|
1454
1446
|
return r;
|
|
1455
1447
|
}
|
|
1456
1448
|
function ve(e) {
|
|
1457
|
-
return
|
|
1449
|
+
return Ce(ye | _t, e, !0);
|
|
1458
1450
|
}
|
|
1459
1451
|
function li(e) {
|
|
1460
1452
|
var t = e.teardown;
|
|
1461
1453
|
if (t !== null) {
|
|
1462
|
-
const r =
|
|
1463
|
-
hn(!0),
|
|
1454
|
+
const r = Xe, n = y;
|
|
1455
|
+
hn(!0), K(null);
|
|
1464
1456
|
try {
|
|
1465
1457
|
t.call(null);
|
|
1466
1458
|
} finally {
|
|
1467
|
-
hn(r),
|
|
1459
|
+
hn(r), K(n);
|
|
1468
1460
|
}
|
|
1469
1461
|
}
|
|
1470
1462
|
}
|
|
@@ -1473,10 +1465,10 @@ function Gr(e, t = !1) {
|
|
|
1473
1465
|
for (e.first = e.last = null; r !== null; ) {
|
|
1474
1466
|
const i = r.ac;
|
|
1475
1467
|
i !== null && ni(() => {
|
|
1476
|
-
i.abort(
|
|
1468
|
+
i.abort(tt);
|
|
1477
1469
|
});
|
|
1478
1470
|
var n = r.next;
|
|
1479
|
-
(r.f &
|
|
1471
|
+
(r.f & Je) !== 0 ? r.parent = null : j(r, t), r = n;
|
|
1480
1472
|
}
|
|
1481
1473
|
}
|
|
1482
1474
|
function qs(e) {
|
|
@@ -1487,30 +1479,30 @@ function qs(e) {
|
|
|
1487
1479
|
}
|
|
1488
1480
|
function j(e, t = !0) {
|
|
1489
1481
|
var r = !1;
|
|
1490
|
-
(t || (e.f &
|
|
1482
|
+
(t || (e.f & Rn) !== 0) && e.nodes !== null && e.nodes.end !== null && (ai(
|
|
1491
1483
|
e.nodes.start,
|
|
1492
1484
|
/** @type {TemplateNode} */
|
|
1493
1485
|
e.nodes.end
|
|
1494
|
-
), r = !0), Gr(e, t && !r), jt(e, 0), L(e,
|
|
1486
|
+
), r = !0), Gr(e, t && !r), jt(e, 0), L(e, Be);
|
|
1495
1487
|
var n = e.nodes && e.nodes.t;
|
|
1496
1488
|
if (n !== null)
|
|
1497
1489
|
for (const s of n)
|
|
1498
1490
|
s.stop();
|
|
1499
1491
|
li(e);
|
|
1500
1492
|
var i = e.parent;
|
|
1501
|
-
i !== null && i.first !== null &&
|
|
1493
|
+
i !== null && i.first !== null && fi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1502
1494
|
}
|
|
1503
|
-
function
|
|
1495
|
+
function ai(e, t) {
|
|
1504
1496
|
for (; e !== null; ) {
|
|
1505
1497
|
var r = e === t ? null : /* @__PURE__ */ $e(e);
|
|
1506
1498
|
e.remove(), e = r;
|
|
1507
1499
|
}
|
|
1508
1500
|
}
|
|
1509
|
-
function
|
|
1501
|
+
function fi(e) {
|
|
1510
1502
|
var t = e.parent, r = e.prev, n = e.next;
|
|
1511
1503
|
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1512
1504
|
}
|
|
1513
|
-
function
|
|
1505
|
+
function ct(e, t, r = !0) {
|
|
1514
1506
|
var n = [];
|
|
1515
1507
|
ui(e, n, !0);
|
|
1516
1508
|
var i = () => {
|
|
@@ -1524,17 +1516,17 @@ function ut(e, t, r = !0) {
|
|
|
1524
1516
|
i();
|
|
1525
1517
|
}
|
|
1526
1518
|
function ui(e, t, r) {
|
|
1527
|
-
if ((e.f &
|
|
1528
|
-
e.f ^=
|
|
1519
|
+
if ((e.f & te) === 0) {
|
|
1520
|
+
e.f ^= te;
|
|
1529
1521
|
var n = e.nodes && e.nodes.t;
|
|
1530
1522
|
if (n !== null)
|
|
1531
1523
|
for (const l of n)
|
|
1532
1524
|
(l.is_global || r) && t.push(l);
|
|
1533
1525
|
for (var i = e.first; i !== null; ) {
|
|
1534
|
-
var s = i.next, o = (i.f &
|
|
1526
|
+
var s = i.next, o = (i.f & St) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1535
1527
|
// it means the parent block effect was pruned. In that case,
|
|
1536
1528
|
// transparency information was transferred to the branch effect.
|
|
1537
|
-
(i.f & ye) !== 0 && (e.f &
|
|
1529
|
+
(i.f & ye) !== 0 && (e.f & Ze) !== 0;
|
|
1538
1530
|
ui(i, t, o ? r : !1), i = s;
|
|
1539
1531
|
}
|
|
1540
1532
|
}
|
|
@@ -1543,10 +1535,10 @@ function Kr(e) {
|
|
|
1543
1535
|
ci(e, !0);
|
|
1544
1536
|
}
|
|
1545
1537
|
function ci(e, t) {
|
|
1546
|
-
if ((e.f &
|
|
1547
|
-
e.f ^=
|
|
1538
|
+
if ((e.f & te) !== 0) {
|
|
1539
|
+
e.f ^= te, (e.f & O) === 0 && (L(e, F), ge(e));
|
|
1548
1540
|
for (var r = e.first; r !== null; ) {
|
|
1549
|
-
var n = r.next, i = (r.f &
|
|
1541
|
+
var n = r.next, i = (r.f & St) !== 0 || (r.f & ye) !== 0;
|
|
1550
1542
|
ci(r, i ? t : !1), r = n;
|
|
1551
1543
|
}
|
|
1552
1544
|
var s = e.nodes && e.nodes.t;
|
|
@@ -1562,38 +1554,38 @@ function di(e, t) {
|
|
|
1562
1554
|
t.append(r), r = i;
|
|
1563
1555
|
}
|
|
1564
1556
|
}
|
|
1565
|
-
let ir = !1,
|
|
1557
|
+
let ir = !1, Xe = !1;
|
|
1566
1558
|
function hn(e) {
|
|
1567
|
-
|
|
1559
|
+
Xe = e;
|
|
1568
1560
|
}
|
|
1569
1561
|
let y = null, me = !1;
|
|
1570
|
-
function
|
|
1562
|
+
function K(e) {
|
|
1571
1563
|
y = e;
|
|
1572
1564
|
}
|
|
1573
1565
|
let $ = null;
|
|
1574
|
-
function
|
|
1566
|
+
function ue(e) {
|
|
1575
1567
|
$ = e;
|
|
1576
1568
|
}
|
|
1577
1569
|
let fe = null;
|
|
1578
1570
|
function hi(e) {
|
|
1579
1571
|
y !== null && (fe === null ? fe = [e] : fe.push(e));
|
|
1580
1572
|
}
|
|
1581
|
-
let z = null,
|
|
1582
|
-
function
|
|
1583
|
-
|
|
1573
|
+
let z = null, J = 0, ie = null;
|
|
1574
|
+
function Us(e) {
|
|
1575
|
+
ie = e;
|
|
1584
1576
|
}
|
|
1585
|
-
let vi = 1,
|
|
1577
|
+
let vi = 1, nt = 0, dt = nt;
|
|
1586
1578
|
function vn(e) {
|
|
1587
|
-
|
|
1579
|
+
dt = e;
|
|
1588
1580
|
}
|
|
1589
1581
|
function pi() {
|
|
1590
1582
|
return ++vi;
|
|
1591
1583
|
}
|
|
1592
1584
|
function Wt(e) {
|
|
1593
1585
|
var t = e.f;
|
|
1594
|
-
if ((t &
|
|
1586
|
+
if ((t & F) !== 0)
|
|
1595
1587
|
return !0;
|
|
1596
|
-
if (t &
|
|
1588
|
+
if (t & D && (e.f &= ~vt), (t & we) !== 0) {
|
|
1597
1589
|
for (var r = (
|
|
1598
1590
|
/** @type {Value[]} */
|
|
1599
1591
|
e.deps
|
|
@@ -1602,29 +1594,29 @@ function Wt(e) {
|
|
|
1602
1594
|
if (Wt(
|
|
1603
1595
|
/** @type {Derived} */
|
|
1604
1596
|
s
|
|
1605
|
-
) &&
|
|
1597
|
+
) && zn(
|
|
1606
1598
|
/** @type {Derived} */
|
|
1607
1599
|
s
|
|
1608
1600
|
), s.wv > e.wv)
|
|
1609
1601
|
return !0;
|
|
1610
1602
|
}
|
|
1611
|
-
(t &
|
|
1603
|
+
(t & le) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1612
1604
|
// traversal of the graph in the other batches still happens
|
|
1613
|
-
pe === null && L(e,
|
|
1605
|
+
pe === null && L(e, O);
|
|
1614
1606
|
}
|
|
1615
1607
|
return !1;
|
|
1616
1608
|
}
|
|
1617
1609
|
function _i(e, t, r = !0) {
|
|
1618
1610
|
var n = e.reactions;
|
|
1619
|
-
if (n !== null && !(fe !== null &&
|
|
1611
|
+
if (n !== null && !(fe !== null && At.call(fe, e)))
|
|
1620
1612
|
for (var i = 0; i < n.length; i++) {
|
|
1621
1613
|
var s = n[i];
|
|
1622
|
-
(s.f &
|
|
1614
|
+
(s.f & D) !== 0 ? _i(
|
|
1623
1615
|
/** @type {Derived} */
|
|
1624
1616
|
s,
|
|
1625
1617
|
t,
|
|
1626
1618
|
!1
|
|
1627
|
-
) : t === s && (r ? L(s,
|
|
1619
|
+
) : t === s && (r ? L(s, F) : (s.f & O) !== 0 && L(s, we), ge(
|
|
1628
1620
|
/** @type {Effect} */
|
|
1629
1621
|
s
|
|
1630
1622
|
));
|
|
@@ -1632,56 +1624,56 @@ function _i(e, t, r = !0) {
|
|
|
1632
1624
|
}
|
|
1633
1625
|
function gi(e) {
|
|
1634
1626
|
var T;
|
|
1635
|
-
var t = z, r =
|
|
1627
|
+
var t = z, r = J, n = ie, i = y, s = fe, o = G, l = me, a = dt, u = e.f;
|
|
1636
1628
|
z = /** @type {null | Value[]} */
|
|
1637
|
-
null,
|
|
1638
|
-
e.ac.abort(
|
|
1629
|
+
null, J = 0, ie = null, y = (u & (ye | Je)) === 0 ? e : null, fe = null, Ct(e.ctx), me = !1, dt = ++nt, e.ac !== null && (ni(() => {
|
|
1630
|
+
e.ac.abort(tt);
|
|
1639
1631
|
}), e.ac = null);
|
|
1640
1632
|
try {
|
|
1641
1633
|
e.f |= Tr;
|
|
1642
1634
|
var c = (
|
|
1643
1635
|
/** @type {Function} */
|
|
1644
1636
|
e.fn
|
|
1645
|
-
),
|
|
1646
|
-
e.f |=
|
|
1637
|
+
), p = c();
|
|
1638
|
+
e.f |= Mt;
|
|
1647
1639
|
var h = e.deps, _ = S?.is_fork;
|
|
1648
1640
|
if (z !== null) {
|
|
1649
1641
|
var d;
|
|
1650
|
-
if (_ || jt(e,
|
|
1651
|
-
for (h.length =
|
|
1652
|
-
h[
|
|
1642
|
+
if (_ || jt(e, J), h !== null && J > 0)
|
|
1643
|
+
for (h.length = J + z.length, d = 0; d < z.length; d++)
|
|
1644
|
+
h[J + d] = z[d];
|
|
1653
1645
|
else
|
|
1654
1646
|
e.deps = h = z;
|
|
1655
|
-
if (
|
|
1656
|
-
for (d =
|
|
1647
|
+
if (Ur() && (e.f & le) !== 0)
|
|
1648
|
+
for (d = J; d < h.length; d++)
|
|
1657
1649
|
((T = h[d]).reactions ?? (T.reactions = [])).push(e);
|
|
1658
|
-
} else !_ && h !== null &&
|
|
1659
|
-
if (Pn() &&
|
|
1650
|
+
} else !_ && h !== null && J < h.length && (jt(e, J), h.length = J);
|
|
1651
|
+
if (Pn() && ie !== null && !me && h !== null && (e.f & (D | we | F)) === 0)
|
|
1660
1652
|
for (d = 0; d < /** @type {Source[]} */
|
|
1661
|
-
|
|
1653
|
+
ie.length; d++)
|
|
1662
1654
|
_i(
|
|
1663
|
-
|
|
1655
|
+
ie[d],
|
|
1664
1656
|
/** @type {Effect} */
|
|
1665
1657
|
e
|
|
1666
1658
|
);
|
|
1667
1659
|
if (i !== null && i !== e) {
|
|
1668
|
-
if (
|
|
1660
|
+
if (nt++, i.deps !== null)
|
|
1669
1661
|
for (let g = 0; g < r; g += 1)
|
|
1670
|
-
i.deps[g].rv =
|
|
1662
|
+
i.deps[g].rv = nt;
|
|
1671
1663
|
if (t !== null)
|
|
1672
1664
|
for (const g of t)
|
|
1673
|
-
g.rv =
|
|
1674
|
-
|
|
1675
|
-
|
|
1665
|
+
g.rv = nt;
|
|
1666
|
+
ie !== null && (n === null ? n = ie : n.push(.../** @type {Source[]} */
|
|
1667
|
+
ie));
|
|
1676
1668
|
}
|
|
1677
|
-
return (e.f &
|
|
1669
|
+
return (e.f & Ge) !== 0 && (e.f ^= Ge), p;
|
|
1678
1670
|
} catch (g) {
|
|
1679
1671
|
return Fn(g);
|
|
1680
1672
|
} finally {
|
|
1681
|
-
e.f ^= Tr, z = t,
|
|
1673
|
+
e.f ^= Tr, z = t, J = r, ie = n, y = i, fe = s, Ct(o), me = l, dt = a;
|
|
1682
1674
|
}
|
|
1683
1675
|
}
|
|
1684
|
-
function
|
|
1676
|
+
function Ys(e, t) {
|
|
1685
1677
|
let r = t.reactions;
|
|
1686
1678
|
if (r !== null) {
|
|
1687
1679
|
var n = Ji.call(r, e);
|
|
@@ -1690,79 +1682,79 @@ function zs(e, t) {
|
|
|
1690
1682
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1691
1683
|
}
|
|
1692
1684
|
}
|
|
1693
|
-
if (r === null && (t.f &
|
|
1685
|
+
if (r === null && (t.f & D) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1694
1686
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1695
1687
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1696
|
-
(z === null || !
|
|
1688
|
+
(z === null || !At.call(z, t))) {
|
|
1697
1689
|
var s = (
|
|
1698
1690
|
/** @type {Derived} */
|
|
1699
1691
|
t
|
|
1700
1692
|
);
|
|
1701
|
-
(s.f &
|
|
1693
|
+
(s.f & le) !== 0 && (s.f ^= le, s.f &= ~vt), Hr(s), Ds(s), jt(s, 0);
|
|
1702
1694
|
}
|
|
1703
1695
|
}
|
|
1704
1696
|
function jt(e, t) {
|
|
1705
1697
|
var r = e.deps;
|
|
1706
1698
|
if (r !== null)
|
|
1707
1699
|
for (var n = t; n < r.length; n++)
|
|
1708
|
-
|
|
1700
|
+
Ys(e, r[n]);
|
|
1709
1701
|
}
|
|
1710
|
-
function
|
|
1702
|
+
function Lt(e) {
|
|
1711
1703
|
var t = e.f;
|
|
1712
|
-
if ((t &
|
|
1713
|
-
L(e,
|
|
1704
|
+
if ((t & Be) === 0) {
|
|
1705
|
+
L(e, O);
|
|
1714
1706
|
var r = $, n = ir;
|
|
1715
1707
|
$ = e, ir = !0;
|
|
1716
1708
|
try {
|
|
1717
|
-
(t & (
|
|
1709
|
+
(t & (Ze | Sn)) !== 0 ? qs(e) : Gr(e), li(e);
|
|
1718
1710
|
var i = gi(e);
|
|
1719
1711
|
e.teardown = typeof i == "function" ? i : null, e.wv = vi;
|
|
1720
1712
|
var s;
|
|
1721
|
-
xr && $s && (e.f &
|
|
1713
|
+
xr && $s && (e.f & F) !== 0 && e.deps;
|
|
1722
1714
|
} finally {
|
|
1723
1715
|
ir = n, $ = r;
|
|
1724
1716
|
}
|
|
1725
1717
|
}
|
|
1726
1718
|
}
|
|
1727
|
-
function
|
|
1728
|
-
var t = e.f, r = (t &
|
|
1719
|
+
function v(e) {
|
|
1720
|
+
var t = e.f, r = (t & D) !== 0;
|
|
1729
1721
|
if (y !== null && !me) {
|
|
1730
|
-
var n = $ !== null && ($.f &
|
|
1731
|
-
if (!n && (fe === null || !
|
|
1722
|
+
var n = $ !== null && ($.f & Be) !== 0;
|
|
1723
|
+
if (!n && (fe === null || !At.call(fe, e))) {
|
|
1732
1724
|
var i = y.deps;
|
|
1733
1725
|
if ((y.f & Tr) !== 0)
|
|
1734
|
-
e.rv <
|
|
1726
|
+
e.rv < nt && (e.rv = nt, z === null && i !== null && i[J] === e ? J++ : z === null ? z = [e] : z.push(e));
|
|
1735
1727
|
else {
|
|
1736
1728
|
(y.deps ?? (y.deps = [])).push(e);
|
|
1737
1729
|
var s = e.reactions;
|
|
1738
|
-
s === null ? e.reactions = [y] :
|
|
1730
|
+
s === null ? e.reactions = [y] : At.call(s, y) || s.push(y);
|
|
1739
1731
|
}
|
|
1740
1732
|
}
|
|
1741
1733
|
}
|
|
1742
|
-
if (
|
|
1743
|
-
return
|
|
1734
|
+
if (Xe && Ke.has(e))
|
|
1735
|
+
return Ke.get(e);
|
|
1744
1736
|
if (r) {
|
|
1745
1737
|
var o = (
|
|
1746
1738
|
/** @type {Derived} */
|
|
1747
1739
|
e
|
|
1748
1740
|
);
|
|
1749
|
-
if (
|
|
1741
|
+
if (Xe) {
|
|
1750
1742
|
var l = o.v;
|
|
1751
|
-
return ((o.f &
|
|
1743
|
+
return ((o.f & O) === 0 && o.reactions !== null || mi(o)) && (l = Zr(o)), Ke.set(o, l), l;
|
|
1752
1744
|
}
|
|
1753
|
-
var
|
|
1754
|
-
Wt(o) && (
|
|
1745
|
+
var a = (o.f & le) === 0 && !me && y !== null && (ir || (y.f & le) !== 0), u = (o.f & Mt) === 0;
|
|
1746
|
+
Wt(o) && (a && (o.f |= le), zn(o)), a && !u && (Gn(o), bi(o));
|
|
1755
1747
|
}
|
|
1756
1748
|
if (pe?.has(e))
|
|
1757
1749
|
return pe.get(e);
|
|
1758
|
-
if ((e.f &
|
|
1750
|
+
if ((e.f & Ge) !== 0)
|
|
1759
1751
|
throw e.v;
|
|
1760
1752
|
return e.v;
|
|
1761
1753
|
}
|
|
1762
1754
|
function bi(e) {
|
|
1763
|
-
if (e.f |=
|
|
1755
|
+
if (e.f |= le, e.deps !== null)
|
|
1764
1756
|
for (const t of e.deps)
|
|
1765
|
-
(t.reactions ?? (t.reactions = [])).push(e), (t.f &
|
|
1757
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & D) !== 0 && (t.f & le) === 0 && (Gn(
|
|
1766
1758
|
/** @type {Derived} */
|
|
1767
1759
|
t
|
|
1768
1760
|
), bi(
|
|
@@ -1771,10 +1763,10 @@ function bi(e) {
|
|
|
1771
1763
|
));
|
|
1772
1764
|
}
|
|
1773
1765
|
function mi(e) {
|
|
1774
|
-
if (e.v ===
|
|
1766
|
+
if (e.v === P) return !0;
|
|
1775
1767
|
if (e.deps === null) return !1;
|
|
1776
1768
|
for (const t of e.deps)
|
|
1777
|
-
if (
|
|
1769
|
+
if (Ke.has(t) || (t.f & D) !== 0 && mi(
|
|
1778
1770
|
/** @type {Derived} */
|
|
1779
1771
|
t
|
|
1780
1772
|
))
|
|
@@ -1789,9 +1781,9 @@ function gr(e) {
|
|
|
1789
1781
|
me = t;
|
|
1790
1782
|
}
|
|
1791
1783
|
}
|
|
1792
|
-
const
|
|
1793
|
-
function
|
|
1794
|
-
(t[
|
|
1784
|
+
const it = /* @__PURE__ */ Symbol("events"), wi = /* @__PURE__ */ new Set(), Or = /* @__PURE__ */ new Set();
|
|
1785
|
+
function zs(e, t, r) {
|
|
1786
|
+
(t[it] ?? (t[it] = {}))[e] = r;
|
|
1795
1787
|
}
|
|
1796
1788
|
function Gs(e) {
|
|
1797
1789
|
for (var t = 0; t < e.length; t++)
|
|
@@ -1809,18 +1801,18 @@ function _n(e) {
|
|
|
1809
1801
|
i[0] || e.target
|
|
1810
1802
|
);
|
|
1811
1803
|
pn = e;
|
|
1812
|
-
var o = 0, l = pn === e && e[
|
|
1804
|
+
var o = 0, l = pn === e && e[it];
|
|
1813
1805
|
if (l) {
|
|
1814
|
-
var
|
|
1815
|
-
if (
|
|
1806
|
+
var a = i.indexOf(l);
|
|
1807
|
+
if (a !== -1 && (t === document || t === /** @type {any} */
|
|
1816
1808
|
window)) {
|
|
1817
|
-
e[
|
|
1809
|
+
e[it] = t;
|
|
1818
1810
|
return;
|
|
1819
1811
|
}
|
|
1820
1812
|
var u = i.indexOf(t);
|
|
1821
1813
|
if (u === -1)
|
|
1822
1814
|
return;
|
|
1823
|
-
|
|
1815
|
+
a <= u && (o = a);
|
|
1824
1816
|
}
|
|
1825
1817
|
if (s = /** @type {Element} */
|
|
1826
1818
|
i[o] || e.target, s !== t) {
|
|
@@ -1830,14 +1822,14 @@ function _n(e) {
|
|
|
1830
1822
|
return s || r;
|
|
1831
1823
|
}
|
|
1832
1824
|
});
|
|
1833
|
-
var c = y,
|
|
1834
|
-
|
|
1825
|
+
var c = y, p = $;
|
|
1826
|
+
K(null), ue(null);
|
|
1835
1827
|
try {
|
|
1836
1828
|
for (var h, _ = []; s !== null; ) {
|
|
1837
1829
|
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1838
1830
|
s.host || null;
|
|
1839
1831
|
try {
|
|
1840
|
-
var T = s[
|
|
1832
|
+
var T = s[it]?.[n];
|
|
1841
1833
|
T != null && (!/** @type {any} */
|
|
1842
1834
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1843
1835
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
@@ -1857,7 +1849,7 @@ function _n(e) {
|
|
|
1857
1849
|
throw h;
|
|
1858
1850
|
}
|
|
1859
1851
|
} finally {
|
|
1860
|
-
e[
|
|
1852
|
+
e[it] = t, delete e.currentTarget, K(c), ue(p);
|
|
1861
1853
|
}
|
|
1862
1854
|
}
|
|
1863
1855
|
}
|
|
@@ -1878,7 +1870,7 @@ function yi(e, t = !1) {
|
|
|
1878
1870
|
var r = jr("template");
|
|
1879
1871
|
return e = e.replaceAll("<!>", "<!---->"), r.innerHTML = t ? Ws(e) : e, r.content;
|
|
1880
1872
|
}
|
|
1881
|
-
function
|
|
1873
|
+
function We(e, t) {
|
|
1882
1874
|
var r = (
|
|
1883
1875
|
/** @type {Effect} */
|
|
1884
1876
|
$
|
|
@@ -1886,11 +1878,11 @@ function Ke(e, t) {
|
|
|
1886
1878
|
r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
|
|
1887
1879
|
}
|
|
1888
1880
|
// @__NO_SIDE_EFFECTS__
|
|
1889
|
-
function
|
|
1881
|
+
function Qe(e, t) {
|
|
1890
1882
|
var r = (t & Wi) !== 0, n = (t & Xi) !== 0, i, s = !e.startsWith("<!>");
|
|
1891
1883
|
return () => {
|
|
1892
1884
|
if (x)
|
|
1893
|
-
return
|
|
1885
|
+
return We(E, null), E;
|
|
1894
1886
|
i === void 0 && (i = yi(s ? e : "<!>" + e, !0), r || (i = /** @type {TemplateNode} */
|
|
1895
1887
|
/* @__PURE__ */ be(i)));
|
|
1896
1888
|
var o = (
|
|
@@ -1901,21 +1893,21 @@ function Je(e, t) {
|
|
|
1901
1893
|
var l = (
|
|
1902
1894
|
/** @type {TemplateNode} */
|
|
1903
1895
|
/* @__PURE__ */ be(o)
|
|
1904
|
-
),
|
|
1896
|
+
), a = (
|
|
1905
1897
|
/** @type {TemplateNode} */
|
|
1906
1898
|
o.lastChild
|
|
1907
1899
|
);
|
|
1908
|
-
|
|
1900
|
+
We(l, a);
|
|
1909
1901
|
} else
|
|
1910
|
-
|
|
1902
|
+
We(o, o);
|
|
1911
1903
|
return o;
|
|
1912
1904
|
};
|
|
1913
1905
|
}
|
|
1914
1906
|
function gn() {
|
|
1915
1907
|
if (x)
|
|
1916
|
-
return
|
|
1917
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r =
|
|
1918
|
-
return e.append(t, r),
|
|
1908
|
+
return We(E, null), E;
|
|
1909
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = ae();
|
|
1910
|
+
return e.append(t, r), We(t, r), e;
|
|
1919
1911
|
}
|
|
1920
1912
|
function de(e, t) {
|
|
1921
1913
|
if (x) {
|
|
@@ -1923,7 +1915,7 @@ function de(e, t) {
|
|
|
1923
1915
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1924
1916
|
$
|
|
1925
1917
|
);
|
|
1926
|
-
((r.f &
|
|
1918
|
+
((r.f & Mt) === 0 || r.nodes.end === null) && (r.nodes.end = E), Rt();
|
|
1927
1919
|
return;
|
|
1928
1920
|
}
|
|
1929
1921
|
e !== null && e.before(
|
|
@@ -1946,11 +1938,11 @@ function eo(e, t) {
|
|
|
1946
1938
|
Mr(), t.intro = t.intro ?? !1;
|
|
1947
1939
|
const r = t.target, n = x, i = E;
|
|
1948
1940
|
try {
|
|
1949
|
-
for (var s = /* @__PURE__ */ be(r); s && (s.nodeType !==
|
|
1941
|
+
for (var s = /* @__PURE__ */ be(r); s && (s.nodeType !== Ot || /** @type {Comment} */
|
|
1950
1942
|
s.data !== Ir); )
|
|
1951
1943
|
s = /* @__PURE__ */ $e(s);
|
|
1952
1944
|
if (!s)
|
|
1953
|
-
throw
|
|
1945
|
+
throw ht;
|
|
1954
1946
|
_e(!0), Z(
|
|
1955
1947
|
/** @type {Comment} */
|
|
1956
1948
|
s
|
|
@@ -1962,7 +1954,7 @@ function eo(e, t) {
|
|
|
1962
1954
|
if (o instanceof Error && o.message.split(`
|
|
1963
1955
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1964
1956
|
throw o;
|
|
1965
|
-
return o !==
|
|
1957
|
+
return o !== ht && console.warn("Failed to hydrate: ", o), t.recover === !1 && vs(), Mr(), ti(r), _e(!1), $i(e, t);
|
|
1966
1958
|
} finally {
|
|
1967
1959
|
_e(n), Z(i);
|
|
1968
1960
|
}
|
|
@@ -1970,9 +1962,9 @@ function eo(e, t) {
|
|
|
1970
1962
|
const er = /* @__PURE__ */ new Map();
|
|
1971
1963
|
function xi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: o = !0 }) {
|
|
1972
1964
|
Mr();
|
|
1973
|
-
var l = void 0,
|
|
1974
|
-
var u = r ?? t.appendChild(
|
|
1975
|
-
|
|
1965
|
+
var l = void 0, a = Zs(() => {
|
|
1966
|
+
var u = r ?? t.appendChild(ae());
|
|
1967
|
+
Rs(
|
|
1976
1968
|
/** @type {TemplateNode} */
|
|
1977
1969
|
u,
|
|
1978
1970
|
{
|
|
@@ -1983,34 +1975,34 @@ function xi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
1983
1975
|
Mn({});
|
|
1984
1976
|
var _ = (
|
|
1985
1977
|
/** @type {ComponentContext} */
|
|
1986
|
-
|
|
1978
|
+
G
|
|
1987
1979
|
);
|
|
1988
|
-
if (s && (_.c = s), i && (n.$$events = i), x &&
|
|
1980
|
+
if (s && (_.c = s), i && (n.$$events = i), x && We(
|
|
1989
1981
|
/** @type {TemplateNode} */
|
|
1990
1982
|
h,
|
|
1991
1983
|
null
|
|
1992
|
-
), l = e(h, n) || {}, x && ($.nodes.end = E, E === null || E.nodeType !==
|
|
1984
|
+
), l = e(h, n) || {}, x && ($.nodes.end = E, E === null || E.nodeType !== Ot || /** @type {Comment} */
|
|
1993
1985
|
E.data !== Vr))
|
|
1994
|
-
throw Kt(),
|
|
1986
|
+
throw Kt(), ht;
|
|
1995
1987
|
On();
|
|
1996
1988
|
}
|
|
1997
1989
|
);
|
|
1998
|
-
var c = /* @__PURE__ */ new Set(),
|
|
1990
|
+
var c = /* @__PURE__ */ new Set(), p = (h) => {
|
|
1999
1991
|
for (var _ = 0; _ < h.length; _++) {
|
|
2000
1992
|
var d = h[_];
|
|
2001
1993
|
if (!c.has(d)) {
|
|
2002
1994
|
c.add(d);
|
|
2003
1995
|
var T = Js(d);
|
|
2004
|
-
for (const
|
|
2005
|
-
var g = er.get(
|
|
2006
|
-
g === void 0 && (g = /* @__PURE__ */ new Map(), er.set(
|
|
2007
|
-
var
|
|
2008
|
-
|
|
1996
|
+
for (const C of [t, document]) {
|
|
1997
|
+
var g = er.get(C);
|
|
1998
|
+
g === void 0 && (g = /* @__PURE__ */ new Map(), er.set(C, g));
|
|
1999
|
+
var I = g.get(d);
|
|
2000
|
+
I === void 0 ? (C.addEventListener(d, _n, { passive: T }), g.set(d, 1)) : g.set(d, I + 1);
|
|
2009
2001
|
}
|
|
2010
2002
|
}
|
|
2011
2003
|
}
|
|
2012
2004
|
};
|
|
2013
|
-
return
|
|
2005
|
+
return p(dr(wi)), Or.add(p), () => {
|
|
2014
2006
|
for (var h of c)
|
|
2015
2007
|
for (const T of [t, document]) {
|
|
2016
2008
|
var _ = (
|
|
@@ -2022,17 +2014,17 @@ function xi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
2022
2014
|
);
|
|
2023
2015
|
--d == 0 ? (T.removeEventListener(h, _n), _.delete(h), _.size === 0 && er.delete(T)) : _.set(h, d);
|
|
2024
2016
|
}
|
|
2025
|
-
Or.delete(
|
|
2017
|
+
Or.delete(p), u !== r && u.parentNode?.removeChild(u);
|
|
2026
2018
|
};
|
|
2027
2019
|
});
|
|
2028
|
-
return Pr.set(l,
|
|
2020
|
+
return Pr.set(l, a), l;
|
|
2029
2021
|
}
|
|
2030
2022
|
let Pr = /* @__PURE__ */ new WeakMap();
|
|
2031
2023
|
function to(e, t) {
|
|
2032
2024
|
const r = Pr.get(e);
|
|
2033
2025
|
return r ? (Pr.delete(e), r(t)) : Promise.resolve();
|
|
2034
2026
|
}
|
|
2035
|
-
var he, Se,
|
|
2027
|
+
var he, Se, ee, ft, zt, Gt, ur;
|
|
2036
2028
|
class ro {
|
|
2037
2029
|
/**
|
|
2038
2030
|
* @param {TemplateNode} anchor
|
|
@@ -2063,7 +2055,7 @@ class ro {
|
|
|
2063
2055
|
* in the DOM, because their insertion is deferred.
|
|
2064
2056
|
* @type {Map<Key, Branch>}
|
|
2065
2057
|
*/
|
|
2066
|
-
w(this,
|
|
2058
|
+
w(this, ee, /* @__PURE__ */ new Map());
|
|
2067
2059
|
/**
|
|
2068
2060
|
* Keys of effects that are currently outroing
|
|
2069
2061
|
* @type {Set<Key>}
|
|
@@ -2073,40 +2065,40 @@ class ro {
|
|
|
2073
2065
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2074
2066
|
* This is necessary for `<svelte:element>`
|
|
2075
2067
|
*/
|
|
2076
|
-
w(this,
|
|
2068
|
+
w(this, zt, !0);
|
|
2077
2069
|
w(this, Gt, () => {
|
|
2078
2070
|
var t = (
|
|
2079
2071
|
/** @type {Batch} */
|
|
2080
2072
|
S
|
|
2081
2073
|
);
|
|
2082
|
-
if (
|
|
2074
|
+
if (f(this, he).has(t)) {
|
|
2083
2075
|
var r = (
|
|
2084
2076
|
/** @type {Key} */
|
|
2085
|
-
|
|
2086
|
-
), n =
|
|
2077
|
+
f(this, he).get(t)
|
|
2078
|
+
), n = f(this, Se).get(r);
|
|
2087
2079
|
if (n)
|
|
2088
|
-
Kr(n),
|
|
2080
|
+
Kr(n), f(this, ft).delete(r);
|
|
2089
2081
|
else {
|
|
2090
|
-
var i =
|
|
2091
|
-
i && (
|
|
2082
|
+
var i = f(this, ee).get(r);
|
|
2083
|
+
i && (f(this, Se).set(r, i.effect), f(this, ee).delete(r), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), n = i.effect);
|
|
2092
2084
|
}
|
|
2093
|
-
for (const [s, o] of
|
|
2094
|
-
if (
|
|
2085
|
+
for (const [s, o] of f(this, he)) {
|
|
2086
|
+
if (f(this, he).delete(s), s === t)
|
|
2095
2087
|
break;
|
|
2096
|
-
const l =
|
|
2097
|
-
l && (j(l.effect),
|
|
2088
|
+
const l = f(this, ee).get(o);
|
|
2089
|
+
l && (j(l.effect), f(this, ee).delete(o));
|
|
2098
2090
|
}
|
|
2099
|
-
for (const [s, o] of
|
|
2100
|
-
if (s === r ||
|
|
2091
|
+
for (const [s, o] of f(this, Se)) {
|
|
2092
|
+
if (s === r || f(this, ft).has(s)) continue;
|
|
2101
2093
|
const l = () => {
|
|
2102
|
-
if (Array.from(
|
|
2094
|
+
if (Array.from(f(this, he).values()).includes(s)) {
|
|
2103
2095
|
var u = document.createDocumentFragment();
|
|
2104
|
-
di(o, u), u.append(
|
|
2096
|
+
di(o, u), u.append(ae()), f(this, ee).set(s, { effect: o, fragment: u });
|
|
2105
2097
|
} else
|
|
2106
2098
|
j(o);
|
|
2107
|
-
|
|
2099
|
+
f(this, ft).delete(s), f(this, Se).delete(s);
|
|
2108
2100
|
};
|
|
2109
|
-
|
|
2101
|
+
f(this, zt) || !n ? (f(this, ft).add(s), ct(o, l, !1)) : l();
|
|
2110
2102
|
}
|
|
2111
2103
|
}
|
|
2112
2104
|
});
|
|
@@ -2114,12 +2106,12 @@ class ro {
|
|
|
2114
2106
|
* @param {Batch} batch
|
|
2115
2107
|
*/
|
|
2116
2108
|
w(this, ur, (t) => {
|
|
2117
|
-
|
|
2118
|
-
const r = Array.from(
|
|
2119
|
-
for (const [n, i] of
|
|
2120
|
-
r.includes(n) || (j(i.effect),
|
|
2109
|
+
f(this, he).delete(t);
|
|
2110
|
+
const r = Array.from(f(this, he).values());
|
|
2111
|
+
for (const [n, i] of f(this, ee))
|
|
2112
|
+
r.includes(n) || (j(i.effect), f(this, ee).delete(n));
|
|
2121
2113
|
});
|
|
2122
|
-
this.anchor = t, b(this,
|
|
2114
|
+
this.anchor = t, b(this, zt, r);
|
|
2123
2115
|
}
|
|
2124
2116
|
/**
|
|
2125
2117
|
*
|
|
@@ -2131,31 +2123,31 @@ class ro {
|
|
|
2131
2123
|
/** @type {Batch} */
|
|
2132
2124
|
S
|
|
2133
2125
|
), i = ri();
|
|
2134
|
-
if (r && !
|
|
2126
|
+
if (r && !f(this, Se).has(t) && !f(this, ee).has(t))
|
|
2135
2127
|
if (i) {
|
|
2136
|
-
var s = document.createDocumentFragment(), o =
|
|
2137
|
-
s.append(o),
|
|
2128
|
+
var s = document.createDocumentFragment(), o = ae();
|
|
2129
|
+
s.append(o), f(this, ee).set(t, {
|
|
2138
2130
|
effect: ve(() => r(o)),
|
|
2139
2131
|
fragment: s
|
|
2140
2132
|
});
|
|
2141
2133
|
} else
|
|
2142
|
-
|
|
2134
|
+
f(this, Se).set(
|
|
2143
2135
|
t,
|
|
2144
2136
|
ve(() => r(this.anchor))
|
|
2145
2137
|
);
|
|
2146
|
-
if (
|
|
2147
|
-
for (const [l,
|
|
2148
|
-
l === t ? n.unskip_effect(
|
|
2149
|
-
for (const [l,
|
|
2150
|
-
l === t ? n.unskip_effect(
|
|
2151
|
-
n.oncommit(
|
|
2138
|
+
if (f(this, he).set(n, t), i) {
|
|
2139
|
+
for (const [l, a] of f(this, Se))
|
|
2140
|
+
l === t ? n.unskip_effect(a) : n.skip_effect(a);
|
|
2141
|
+
for (const [l, a] of f(this, ee))
|
|
2142
|
+
l === t ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
|
|
2143
|
+
n.oncommit(f(this, Gt)), n.ondiscard(f(this, ur));
|
|
2152
2144
|
} else
|
|
2153
|
-
x && (this.anchor = E),
|
|
2145
|
+
x && (this.anchor = E), f(this, Gt).call(this);
|
|
2154
2146
|
}
|
|
2155
2147
|
}
|
|
2156
|
-
he = new WeakMap(), Se = new WeakMap(),
|
|
2148
|
+
he = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), zt = new WeakMap(), Gt = new WeakMap(), ur = new WeakMap();
|
|
2157
2149
|
function Ei(e) {
|
|
2158
|
-
|
|
2150
|
+
G === null && Cn(), ii(() => {
|
|
2159
2151
|
const t = gr(e);
|
|
2160
2152
|
if (typeof t == "function") return (
|
|
2161
2153
|
/** @type {() => void} */
|
|
@@ -2164,38 +2156,38 @@ function Ei(e) {
|
|
|
2164
2156
|
});
|
|
2165
2157
|
}
|
|
2166
2158
|
function no(e) {
|
|
2167
|
-
|
|
2159
|
+
G === null && Cn(), Ei(() => () => gr(e));
|
|
2168
2160
|
}
|
|
2169
|
-
function
|
|
2170
|
-
x &&
|
|
2171
|
-
var n = new ro(e), i = r ?
|
|
2161
|
+
function qe(e, t, r = !1) {
|
|
2162
|
+
x && Rt();
|
|
2163
|
+
var n = new ro(e), i = r ? St : 0;
|
|
2172
2164
|
function s(o, l) {
|
|
2173
2165
|
if (x) {
|
|
2174
2166
|
const c = kn(e);
|
|
2175
|
-
var
|
|
2176
|
-
if (c === Ir ?
|
|
2177
|
-
var u =
|
|
2167
|
+
var a;
|
|
2168
|
+
if (c === Ir ? a = 0 : c === cr ? a = !1 : a = parseInt(c.substring(1)), o !== a) {
|
|
2169
|
+
var u = ar();
|
|
2178
2170
|
Z(u), n.anchor = u, _e(!1), n.ensure(o, l), _e(!0);
|
|
2179
2171
|
return;
|
|
2180
2172
|
}
|
|
2181
2173
|
}
|
|
2182
2174
|
n.ensure(o, l);
|
|
2183
2175
|
}
|
|
2184
|
-
|
|
2176
|
+
zr(() => {
|
|
2185
2177
|
var o = !1;
|
|
2186
|
-
t((l,
|
|
2187
|
-
o = !0, s(
|
|
2178
|
+
t((l, a = 0) => {
|
|
2179
|
+
o = !0, s(a, l);
|
|
2188
2180
|
}), o || s(!1, null);
|
|
2189
2181
|
}, i);
|
|
2190
2182
|
}
|
|
2191
2183
|
function io(e, t, r) {
|
|
2192
2184
|
for (var n = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
|
|
2193
|
-
let
|
|
2194
|
-
|
|
2195
|
-
|
|
2185
|
+
let p = t[l];
|
|
2186
|
+
ct(
|
|
2187
|
+
p,
|
|
2196
2188
|
() => {
|
|
2197
2189
|
if (s) {
|
|
2198
|
-
if (s.pending.delete(
|
|
2190
|
+
if (s.pending.delete(p), s.done.add(p), s.pending.size === 0) {
|
|
2199
2191
|
var h = (
|
|
2200
2192
|
/** @type {Set<EachOutroGroup>} */
|
|
2201
2193
|
e.outrogroups
|
|
@@ -2209,8 +2201,8 @@ function io(e, t, r) {
|
|
|
2209
2201
|
);
|
|
2210
2202
|
}
|
|
2211
2203
|
if (o === 0) {
|
|
2212
|
-
var
|
|
2213
|
-
if (
|
|
2204
|
+
var a = n.length === 0 && r !== null;
|
|
2205
|
+
if (a) {
|
|
2214
2206
|
var u = (
|
|
2215
2207
|
/** @type {Element} */
|
|
2216
2208
|
r
|
|
@@ -2220,7 +2212,7 @@ function io(e, t, r) {
|
|
|
2220
2212
|
);
|
|
2221
2213
|
ti(c), c.append(u), e.items.clear();
|
|
2222
2214
|
}
|
|
2223
|
-
Dr(t, !
|
|
2215
|
+
Dr(t, !a);
|
|
2224
2216
|
} else
|
|
2225
2217
|
s = {
|
|
2226
2218
|
pending: new Set(t),
|
|
@@ -2235,59 +2227,59 @@ var bn;
|
|
|
2235
2227
|
function so(e, t, r, n, i, s = null) {
|
|
2236
2228
|
var o = e, l = /* @__PURE__ */ new Map();
|
|
2237
2229
|
{
|
|
2238
|
-
var
|
|
2230
|
+
var a = (
|
|
2239
2231
|
/** @type {Element} */
|
|
2240
2232
|
e
|
|
2241
2233
|
);
|
|
2242
|
-
o = x ? Z(/* @__PURE__ */ be(
|
|
2234
|
+
o = x ? Z(/* @__PURE__ */ be(a)) : a.appendChild(ae());
|
|
2243
2235
|
}
|
|
2244
|
-
x &&
|
|
2236
|
+
x && Rt();
|
|
2245
2237
|
var u = null, c = /* @__PURE__ */ Ms(() => {
|
|
2246
2238
|
var g = r();
|
|
2247
2239
|
return En(g) ? g : g == null ? [] : dr(g);
|
|
2248
|
-
}),
|
|
2240
|
+
}), p, h = !0;
|
|
2249
2241
|
function _() {
|
|
2250
|
-
T.fallback = u, oo(T,
|
|
2242
|
+
T.fallback = u, oo(T, p, o, t, n), u !== null && (p.length === 0 ? (u.f & ze) === 0 ? Kr(u) : (u.f ^= ze, It(u, null, o)) : ct(u, () => {
|
|
2251
2243
|
u = null;
|
|
2252
2244
|
}));
|
|
2253
2245
|
}
|
|
2254
|
-
var d =
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
var g =
|
|
2258
|
-
let
|
|
2246
|
+
var d = zr(() => {
|
|
2247
|
+
p = /** @type {V[]} */
|
|
2248
|
+
v(c);
|
|
2249
|
+
var g = p.length;
|
|
2250
|
+
let I = !1;
|
|
2259
2251
|
if (x) {
|
|
2260
|
-
var
|
|
2261
|
-
|
|
2252
|
+
var C = kn(o) === cr;
|
|
2253
|
+
C !== (g === 0) && (o = ar(), Z(o), _e(!1), I = !0);
|
|
2262
2254
|
}
|
|
2263
|
-
for (var
|
|
2255
|
+
for (var ke = /* @__PURE__ */ new Set(), W = (
|
|
2264
2256
|
/** @type {Batch} */
|
|
2265
2257
|
S
|
|
2266
|
-
),
|
|
2267
|
-
x && E.nodeType ===
|
|
2258
|
+
), re = ri(), X = 0; X < g; X += 1) {
|
|
2259
|
+
x && E.nodeType === Ot && /** @type {Comment} */
|
|
2268
2260
|
E.data === Vr && (o = /** @type {Comment} */
|
|
2269
|
-
E,
|
|
2270
|
-
var xe =
|
|
2271
|
-
|
|
2261
|
+
E, I = !0, _e(!1));
|
|
2262
|
+
var xe = p[X], V = n(xe, X), q = h ? null : l.get(V);
|
|
2263
|
+
q ? (q.v && Nt(q.v, xe), q.i && Nt(q.i, X), re && W.unskip_effect(q.e)) : (q = lo(
|
|
2272
2264
|
l,
|
|
2273
|
-
h ? o : bn ?? (bn =
|
|
2265
|
+
h ? o : bn ?? (bn = ae()),
|
|
2274
2266
|
xe,
|
|
2275
2267
|
V,
|
|
2276
|
-
|
|
2268
|
+
X,
|
|
2277
2269
|
i,
|
|
2278
2270
|
t,
|
|
2279
2271
|
r
|
|
2280
|
-
), h || (
|
|
2272
|
+
), h || (q.e.f |= ze), l.set(V, q)), ke.add(V);
|
|
2281
2273
|
}
|
|
2282
|
-
if (g === 0 && s && !u && (h ? u = ve(() => s(o)) : (u = ve(() => s(bn ?? (bn =
|
|
2283
|
-
if (
|
|
2284
|
-
for (const [
|
|
2285
|
-
|
|
2286
|
-
|
|
2274
|
+
if (g === 0 && s && !u && (h ? u = ve(() => s(o)) : (u = ve(() => s(bn ?? (bn = ae()))), u.f |= ze)), g > ke.size && fs(), x && g > 0 && Z(ar()), !h)
|
|
2275
|
+
if (re) {
|
|
2276
|
+
for (const [br, Xt] of l)
|
|
2277
|
+
ke.has(br) || W.skip_effect(Xt.e);
|
|
2278
|
+
W.oncommit(_), W.ondiscard(() => {
|
|
2287
2279
|
});
|
|
2288
2280
|
} else
|
|
2289
2281
|
_();
|
|
2290
|
-
|
|
2282
|
+
I && _e(!0), v(c);
|
|
2291
2283
|
}), T = { effect: d, items: l, outrogroups: null, fallback: u };
|
|
2292
2284
|
h = !1, x && (o = E);
|
|
2293
2285
|
}
|
|
@@ -2297,7 +2289,7 @@ function Pt(e) {
|
|
|
2297
2289
|
return e;
|
|
2298
2290
|
}
|
|
2299
2291
|
function oo(e, t, r, n, i) {
|
|
2300
|
-
var s = t.length, o = e.items, l = Pt(e.effect.first),
|
|
2292
|
+
var s = t.length, o = e.items, l = Pt(e.effect.first), a, u = null, c = [], p = [], h, _, d, T;
|
|
2301
2293
|
for (T = 0; T < s; T += 1) {
|
|
2302
2294
|
if (h = t[T], _ = i(h, T), d = /** @type {EachItem} */
|
|
2303
2295
|
o.get(_).e, e.outrogroups !== null)
|
|
@@ -2308,26 +2300,26 @@ function oo(e, t, r, n, i) {
|
|
|
2308
2300
|
It(d, null, r);
|
|
2309
2301
|
else {
|
|
2310
2302
|
var g = u ? u.next : l;
|
|
2311
|
-
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev),
|
|
2303
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), Ue(e, u, d), Ue(e, d, g), It(d, g, r), u = d, c = [], p = [], l = Pt(u.next);
|
|
2312
2304
|
continue;
|
|
2313
2305
|
}
|
|
2314
|
-
if ((d.f &
|
|
2315
|
-
if (
|
|
2316
|
-
if (c.length <
|
|
2317
|
-
var
|
|
2318
|
-
u =
|
|
2319
|
-
var
|
|
2320
|
-
for (
|
|
2321
|
-
It(c[
|
|
2322
|
-
for (
|
|
2323
|
-
|
|
2324
|
-
|
|
2306
|
+
if ((d.f & te) !== 0 && Kr(d), d !== l) {
|
|
2307
|
+
if (a !== void 0 && a.has(d)) {
|
|
2308
|
+
if (c.length < p.length) {
|
|
2309
|
+
var I = p[0], C;
|
|
2310
|
+
u = I.prev;
|
|
2311
|
+
var ke = c[0], W = c[c.length - 1];
|
|
2312
|
+
for (C = 0; C < c.length; C += 1)
|
|
2313
|
+
It(c[C], I, r);
|
|
2314
|
+
for (C = 0; C < p.length; C += 1)
|
|
2315
|
+
a.delete(p[C]);
|
|
2316
|
+
Ue(e, ke.prev, W.next), Ue(e, u, ke), Ue(e, W, I), l = I, u = W, T -= 1, c = [], p = [];
|
|
2325
2317
|
} else
|
|
2326
|
-
|
|
2318
|
+
a.delete(d), It(d, l, r), Ue(e, d.prev, d.next), Ue(e, d, u === null ? e.effect.first : u.next), Ue(e, u, d), u = d;
|
|
2327
2319
|
continue;
|
|
2328
2320
|
}
|
|
2329
|
-
for (c = [],
|
|
2330
|
-
(
|
|
2321
|
+
for (c = [], p = []; l !== null && l !== d; )
|
|
2322
|
+
(a ?? (a = /* @__PURE__ */ new Set())).add(l), p.push(l), l = Pt(l.next);
|
|
2331
2323
|
if (l === null)
|
|
2332
2324
|
continue;
|
|
2333
2325
|
}
|
|
@@ -2338,26 +2330,26 @@ function oo(e, t, r, n, i) {
|
|
|
2338
2330
|
V.pending.size === 0 && (Dr(dr(V.done)), e.outrogroups?.delete(V));
|
|
2339
2331
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2340
2332
|
}
|
|
2341
|
-
if (l !== null ||
|
|
2342
|
-
var
|
|
2343
|
-
if (
|
|
2344
|
-
for (d of
|
|
2345
|
-
(d.f &
|
|
2333
|
+
if (l !== null || a !== void 0) {
|
|
2334
|
+
var re = [];
|
|
2335
|
+
if (a !== void 0)
|
|
2336
|
+
for (d of a)
|
|
2337
|
+
(d.f & te) === 0 && re.push(d);
|
|
2346
2338
|
for (; l !== null; )
|
|
2347
|
-
(l.f &
|
|
2348
|
-
var
|
|
2349
|
-
if (
|
|
2339
|
+
(l.f & te) === 0 && l !== e.fallback && re.push(l), l = Pt(l.next);
|
|
2340
|
+
var X = re.length;
|
|
2341
|
+
if (X > 0) {
|
|
2350
2342
|
var xe = s === 0 ? r : null;
|
|
2351
|
-
io(e,
|
|
2343
|
+
io(e, re, xe);
|
|
2352
2344
|
}
|
|
2353
2345
|
}
|
|
2354
2346
|
}
|
|
2355
2347
|
function lo(e, t, r, n, i, s, o, l) {
|
|
2356
|
-
var
|
|
2348
|
+
var a = (o & zi) !== 0 ? (o & Ki) === 0 ? /* @__PURE__ */ Wn(r, !1, !1) : pt(r) : null, u = (o & Gi) !== 0 ? pt(i) : null;
|
|
2357
2349
|
return {
|
|
2358
|
-
v:
|
|
2350
|
+
v: a,
|
|
2359
2351
|
i: u,
|
|
2360
|
-
e: ve(() => (s(t,
|
|
2352
|
+
e: ve(() => (s(t, a ?? r, u ?? i, l), () => {
|
|
2361
2353
|
e.delete(n);
|
|
2362
2354
|
}))
|
|
2363
2355
|
};
|
|
@@ -2377,56 +2369,56 @@ function It(e, t, r) {
|
|
|
2377
2369
|
n = o;
|
|
2378
2370
|
}
|
|
2379
2371
|
}
|
|
2380
|
-
function
|
|
2372
|
+
function Ue(e, t, r) {
|
|
2381
2373
|
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2382
2374
|
}
|
|
2383
|
-
function
|
|
2375
|
+
function ao(e, t, r = !1, n = !1, i = !1) {
|
|
2384
2376
|
var s = e, o = "";
|
|
2385
|
-
|
|
2377
|
+
Me(() => {
|
|
2386
2378
|
var l = (
|
|
2387
2379
|
/** @type {Effect} */
|
|
2388
2380
|
$
|
|
2389
2381
|
);
|
|
2390
2382
|
if (o === (o = t() ?? "")) {
|
|
2391
|
-
x &&
|
|
2383
|
+
x && Rt();
|
|
2392
2384
|
return;
|
|
2393
2385
|
}
|
|
2394
|
-
if (l.nodes !== null && (
|
|
2386
|
+
if (l.nodes !== null && (ai(
|
|
2395
2387
|
l.nodes.start,
|
|
2396
2388
|
/** @type {TemplateNode} */
|
|
2397
2389
|
l.nodes.end
|
|
2398
2390
|
), l.nodes = null), o !== "") {
|
|
2399
2391
|
if (x) {
|
|
2400
2392
|
E.data;
|
|
2401
|
-
for (var
|
|
2402
|
-
|
|
2403
|
-
u =
|
|
2404
|
-
if (
|
|
2405
|
-
throw Kt(),
|
|
2406
|
-
|
|
2393
|
+
for (var a = Rt(), u = a; a !== null && (a.nodeType !== Ot || /** @type {Comment} */
|
|
2394
|
+
a.data !== ""); )
|
|
2395
|
+
u = a, a = /* @__PURE__ */ $e(a);
|
|
2396
|
+
if (a === null)
|
|
2397
|
+
throw Kt(), ht;
|
|
2398
|
+
We(E, u), s = Z(a);
|
|
2407
2399
|
return;
|
|
2408
2400
|
}
|
|
2409
2401
|
var c = o + "";
|
|
2410
2402
|
r ? c = `<svg>${c}</svg>` : n && (c = `<math>${c}</math>`);
|
|
2411
|
-
var
|
|
2412
|
-
if ((r || n) && (
|
|
2413
|
-
/* @__PURE__ */ be(
|
|
2403
|
+
var p = yi(c);
|
|
2404
|
+
if ((r || n) && (p = /** @type {Element} */
|
|
2405
|
+
/* @__PURE__ */ be(p)), We(
|
|
2414
2406
|
/** @type {TemplateNode} */
|
|
2415
|
-
/* @__PURE__ */ be(
|
|
2407
|
+
/* @__PURE__ */ be(p),
|
|
2416
2408
|
/** @type {TemplateNode} */
|
|
2417
|
-
|
|
2409
|
+
p.lastChild
|
|
2418
2410
|
), r || n)
|
|
2419
|
-
for (; /* @__PURE__ */ be(
|
|
2411
|
+
for (; /* @__PURE__ */ be(p); )
|
|
2420
2412
|
s.before(
|
|
2421
2413
|
/** @type {TemplateNode} */
|
|
2422
|
-
/* @__PURE__ */ be(
|
|
2414
|
+
/* @__PURE__ */ be(p)
|
|
2423
2415
|
);
|
|
2424
2416
|
else
|
|
2425
|
-
s.before(
|
|
2417
|
+
s.before(p);
|
|
2426
2418
|
}
|
|
2427
2419
|
});
|
|
2428
2420
|
}
|
|
2429
|
-
function
|
|
2421
|
+
function fo(e, t) {
|
|
2430
2422
|
oi(() => {
|
|
2431
2423
|
var r = e.getRootNode(), n = (
|
|
2432
2424
|
/** @type {ShadowRoot} */
|
|
@@ -2467,9 +2459,9 @@ function wn(e, t, r, n, i, s) {
|
|
|
2467
2459
|
var l = uo(r, n, s);
|
|
2468
2460
|
(!x || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = r;
|
|
2469
2461
|
} else if (s && i !== s)
|
|
2470
|
-
for (var
|
|
2471
|
-
var u = !!s[
|
|
2472
|
-
(i == null || u !== !!i[
|
|
2462
|
+
for (var a in s) {
|
|
2463
|
+
var u = !!s[a];
|
|
2464
|
+
(i == null || u !== !!i[a]) && e.classList.toggle(a, u);
|
|
2473
2465
|
}
|
|
2474
2466
|
return s;
|
|
2475
2467
|
}
|
|
@@ -2478,10 +2470,10 @@ function Vt(e, t, r, n) {
|
|
|
2478
2470
|
var i = po(e);
|
|
2479
2471
|
x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === vo) || i[t] !== (i[t] = r) && (t === "loading" && (e[os] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ti(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2480
2472
|
}
|
|
2481
|
-
function
|
|
2473
|
+
function ne(e, t, r) {
|
|
2482
2474
|
var n = y, i = $;
|
|
2483
2475
|
let s = x;
|
|
2484
|
-
x && _e(!1),
|
|
2476
|
+
x && _e(!1), K(null), ue(null);
|
|
2485
2477
|
try {
|
|
2486
2478
|
// `style` should use `set_attribute` rather than the setter
|
|
2487
2479
|
t !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
|
|
@@ -2490,7 +2482,7 @@ function re(e, t, r) {
|
|
|
2490
2482
|
(Fr.has(e.getAttribute("is") || e.nodeName) || // customElements may not be available in browser extension contexts
|
|
2491
2483
|
!customElements || customElements.get(e.getAttribute("is") || e.nodeName.toLowerCase()) ? Ti(e).includes(t) : r && typeof r == "object") ? e[t] = r : Vt(e, t, r == null ? r : String(r));
|
|
2492
2484
|
} finally {
|
|
2493
|
-
|
|
2485
|
+
K(n), ue(i), s && _e(!0);
|
|
2494
2486
|
}
|
|
2495
2487
|
}
|
|
2496
2488
|
function po(e) {
|
|
@@ -2519,15 +2511,15 @@ function Ti(e) {
|
|
|
2519
2511
|
function yn(e, t) {
|
|
2520
2512
|
return e === t || e?.[rr] === t;
|
|
2521
2513
|
}
|
|
2522
|
-
function
|
|
2514
|
+
function gt(e = {}, t, r, n) {
|
|
2523
2515
|
return oi(() => {
|
|
2524
2516
|
var i, s;
|
|
2525
|
-
return
|
|
2517
|
+
return Yr(() => {
|
|
2526
2518
|
i = s, s = [], gr(() => {
|
|
2527
2519
|
e !== r(...s) && (t(e, ...s), i && yn(r(...i), e) && t(null, ...i));
|
|
2528
2520
|
});
|
|
2529
2521
|
}), () => {
|
|
2530
|
-
|
|
2522
|
+
ut(() => {
|
|
2531
2523
|
s && yn(r(...s), e) && t(null, ...s);
|
|
2532
2524
|
});
|
|
2533
2525
|
};
|
|
@@ -2541,15 +2533,15 @@ function tr(e, t, r, n) {
|
|
|
2541
2533
|
n), i), l;
|
|
2542
2534
|
l = /** @type {V} */
|
|
2543
2535
|
e[t], l === void 0 && n !== void 0 && (l = o());
|
|
2544
|
-
var
|
|
2545
|
-
|
|
2536
|
+
var a;
|
|
2537
|
+
a = () => {
|
|
2546
2538
|
var h = (
|
|
2547
2539
|
/** @type {V} */
|
|
2548
2540
|
e[t]
|
|
2549
2541
|
);
|
|
2550
2542
|
return h === void 0 ? o() : (s = !0, h);
|
|
2551
2543
|
};
|
|
2552
|
-
var u = !1, c = /* @__PURE__ */ _r(() => (u = !1,
|
|
2544
|
+
var u = !1, c = /* @__PURE__ */ _r(() => (u = !1, a())), p = (
|
|
2553
2545
|
/** @type {Effect} */
|
|
2554
2546
|
$
|
|
2555
2547
|
);
|
|
@@ -2557,17 +2549,17 @@ function tr(e, t, r, n) {
|
|
|
2557
2549
|
/** @type {() => V} */
|
|
2558
2550
|
(function(h, _) {
|
|
2559
2551
|
if (arguments.length > 0) {
|
|
2560
|
-
const d = _ ?
|
|
2561
|
-
return
|
|
2552
|
+
const d = _ ? v(c) : h;
|
|
2553
|
+
return R(c, d), u = !0, i !== void 0 && (i = d), h;
|
|
2562
2554
|
}
|
|
2563
|
-
return
|
|
2555
|
+
return Xe && u || (p.f & Be) !== 0 ? c.v : v(c);
|
|
2564
2556
|
})
|
|
2565
2557
|
);
|
|
2566
2558
|
}
|
|
2567
2559
|
function _o(e) {
|
|
2568
2560
|
return new go(e);
|
|
2569
2561
|
}
|
|
2570
|
-
var
|
|
2562
|
+
var Ve, oe;
|
|
2571
2563
|
class go {
|
|
2572
2564
|
/**
|
|
2573
2565
|
* @param {ComponentConstructorOptions & {
|
|
@@ -2576,9 +2568,9 @@ class go {
|
|
|
2576
2568
|
*/
|
|
2577
2569
|
constructor(t) {
|
|
2578
2570
|
/** @type {any} */
|
|
2579
|
-
w(this,
|
|
2571
|
+
w(this, Ve);
|
|
2580
2572
|
/** @type {Record<string, any>} */
|
|
2581
|
-
w(this,
|
|
2573
|
+
w(this, oe);
|
|
2582
2574
|
var r = /* @__PURE__ */ new Map(), n = (s, o) => {
|
|
2583
2575
|
var l = /* @__PURE__ */ Wn(o, !1, !1);
|
|
2584
2576
|
return r.set(s, l), l;
|
|
@@ -2587,45 +2579,45 @@ class go {
|
|
|
2587
2579
|
{ ...t.props || {}, $$events: {} },
|
|
2588
2580
|
{
|
|
2589
2581
|
get(s, o) {
|
|
2590
|
-
return
|
|
2582
|
+
return v(r.get(o) ?? n(o, Reflect.get(s, o)));
|
|
2591
2583
|
},
|
|
2592
2584
|
has(s, o) {
|
|
2593
|
-
return o === ss ? !0 : (
|
|
2585
|
+
return o === ss ? !0 : (v(r.get(o) ?? n(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
2594
2586
|
},
|
|
2595
2587
|
set(s, o, l) {
|
|
2596
|
-
return
|
|
2588
|
+
return R(r.get(o) ?? n(o, l), l), Reflect.set(s, o, l);
|
|
2597
2589
|
}
|
|
2598
2590
|
}
|
|
2599
2591
|
);
|
|
2600
|
-
b(this,
|
|
2592
|
+
b(this, oe, (t.hydrate ? eo : $i)(t.component, {
|
|
2601
2593
|
target: t.target,
|
|
2602
2594
|
anchor: t.anchor,
|
|
2603
2595
|
props: i,
|
|
2604
2596
|
context: t.context,
|
|
2605
2597
|
intro: t.intro ?? !1,
|
|
2606
2598
|
recover: t.recover
|
|
2607
|
-
})), (!t?.props?.$$host || t.sync === !1) && Dt(), b(this,
|
|
2608
|
-
for (const s of Object.keys(
|
|
2599
|
+
})), (!t?.props?.$$host || t.sync === !1) && Dt(), b(this, Ve, i.$$events);
|
|
2600
|
+
for (const s of Object.keys(f(this, oe)))
|
|
2609
2601
|
s === "$set" || s === "$destroy" || s === "$on" || lr(this, s, {
|
|
2610
2602
|
get() {
|
|
2611
|
-
return
|
|
2603
|
+
return f(this, oe)[s];
|
|
2612
2604
|
},
|
|
2613
2605
|
/** @param {any} value */
|
|
2614
2606
|
set(o) {
|
|
2615
|
-
|
|
2607
|
+
f(this, oe)[s] = o;
|
|
2616
2608
|
},
|
|
2617
2609
|
enumerable: !0
|
|
2618
2610
|
});
|
|
2619
|
-
|
|
2611
|
+
f(this, oe).$set = /** @param {Record<string, any>} next */
|
|
2620
2612
|
(s) => {
|
|
2621
2613
|
Object.assign(i, s);
|
|
2622
|
-
},
|
|
2623
|
-
to(
|
|
2614
|
+
}, f(this, oe).$destroy = () => {
|
|
2615
|
+
to(f(this, oe));
|
|
2624
2616
|
};
|
|
2625
2617
|
}
|
|
2626
2618
|
/** @param {Record<string, any>} props */
|
|
2627
2619
|
$set(t) {
|
|
2628
|
-
|
|
2620
|
+
f(this, oe).$set(t);
|
|
2629
2621
|
}
|
|
2630
2622
|
/**
|
|
2631
2623
|
* @param {string} event
|
|
@@ -2633,20 +2625,20 @@ class go {
|
|
|
2633
2625
|
* @returns {any}
|
|
2634
2626
|
*/
|
|
2635
2627
|
$on(t, r) {
|
|
2636
|
-
|
|
2628
|
+
f(this, Ve)[t] = f(this, Ve)[t] || [];
|
|
2637
2629
|
const n = (...i) => r.call(this, ...i);
|
|
2638
|
-
return
|
|
2639
|
-
|
|
2630
|
+
return f(this, Ve)[t].push(n), () => {
|
|
2631
|
+
f(this, Ve)[t] = f(this, Ve)[t].filter(
|
|
2640
2632
|
/** @param {any} fn */
|
|
2641
2633
|
(i) => i !== n
|
|
2642
2634
|
);
|
|
2643
2635
|
};
|
|
2644
2636
|
}
|
|
2645
2637
|
$destroy() {
|
|
2646
|
-
|
|
2638
|
+
f(this, oe).$destroy();
|
|
2647
2639
|
}
|
|
2648
2640
|
}
|
|
2649
|
-
|
|
2641
|
+
Ve = new WeakMap(), oe = new WeakMap();
|
|
2650
2642
|
let Ai;
|
|
2651
2643
|
typeof HTMLElement == "function" && (Ai = class extends HTMLElement {
|
|
2652
2644
|
/**
|
|
@@ -2730,8 +2722,8 @@ typeof HTMLElement == "function" && (Ai = class extends HTMLElement {
|
|
|
2730
2722
|
$$slots: r,
|
|
2731
2723
|
$$host: this
|
|
2732
2724
|
}
|
|
2733
|
-
}), this.$$me =
|
|
2734
|
-
|
|
2725
|
+
}), this.$$me = Hs(() => {
|
|
2726
|
+
Yr(() => {
|
|
2735
2727
|
this.$$r = !0;
|
|
2736
2728
|
for (const i of or(this.$$c)) {
|
|
2737
2729
|
if (!this.$$p_d[i]?.reflect) continue;
|
|
@@ -2834,12 +2826,12 @@ function mo(e, t, r, n, i, s) {
|
|
|
2834
2826
|
get() {
|
|
2835
2827
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2836
2828
|
},
|
|
2837
|
-
set(
|
|
2838
|
-
|
|
2829
|
+
set(a) {
|
|
2830
|
+
a = sr(l, a, t), this.$$d[l] = a;
|
|
2839
2831
|
var u = this.$$c;
|
|
2840
2832
|
if (u) {
|
|
2841
|
-
var c =
|
|
2842
|
-
c ? u[l] =
|
|
2833
|
+
var c = bt(u, l)?.get;
|
|
2834
|
+
c ? u[l] = a : u.$set({ [l]: a });
|
|
2843
2835
|
}
|
|
2844
2836
|
}
|
|
2845
2837
|
});
|
|
@@ -2852,8 +2844,8 @@ function mo(e, t, r, n, i, s) {
|
|
|
2852
2844
|
}), e.element = /** @type {any} */
|
|
2853
2845
|
o, o;
|
|
2854
2846
|
}
|
|
2855
|
-
var wo = /* @__PURE__ */
|
|
2856
|
-
const
|
|
2847
|
+
var wo = /* @__PURE__ */ Qe('<button type="button"><!></button>'), yo = /* @__PURE__ */ Qe("<pie-tool-graph></pie-tool-graph>", 2), $o = /* @__PURE__ */ Qe("<pie-tool-periodic-table></pie-tool-periodic-table>", 2), xo = /* @__PURE__ */ Qe("<pie-tool-protractor></pie-tool-protractor>", 2), Eo = /* @__PURE__ */ Qe("<pie-tool-line-reader></pie-tool-line-reader>", 2), To = /* @__PURE__ */ Qe("<pie-tool-magnifier></pie-tool-magnifier>", 2), Ao = /* @__PURE__ */ Qe("<pie-tool-ruler></pie-tool-ruler>", 2), So = /* @__PURE__ */ Qe('<div role="toolbar" aria-label="Assessment tools"><div class="tools-buttons svelte-x5tssx"></div></div> <!> <!> <!> <!> <!> <!> <div role="status" aria-live="polite" aria-atomic="true" class="sr-only svelte-x5tssx"> </div>', 1);
|
|
2848
|
+
const Ro = {
|
|
2857
2849
|
hash: "svelte-x5tssx",
|
|
2858
2850
|
code: `
|
|
2859
2851
|
/* Base toolbar styles */.section-tools-toolbar.svelte-x5tssx {display:flex;align-items:center;padding:0.75rem 1rem;background-color:var(--pie-background, #ffffff);gap:1rem;flex-shrink:0;}
|
|
@@ -2880,205 +2872,219 @@ const Co = {
|
|
|
2880
2872
|
|
|
2881
2873
|
/* Screen reader only content */.sr-only.svelte-x5tssx {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}`
|
|
2882
2874
|
};
|
|
2883
|
-
function
|
|
2884
|
-
Mn(t, !0),
|
|
2875
|
+
function Co(e, t) {
|
|
2876
|
+
Mn(t, !0), fo(e, Ro);
|
|
2885
2877
|
const r = typeof window < "u";
|
|
2886
|
-
let n = tr(t, "enabledTools", 7, "graph,periodicTable,protractor,lineReader,magnifier,ruler"), i = tr(t, "position", 7, "bottom"), s = tr(t, "toolCoordinator"), o = tr(t, "toolProviderRegistry"), l = /* @__PURE__ */
|
|
2887
|
-
function
|
|
2888
|
-
s() && (
|
|
2878
|
+
let n = tr(t, "enabledTools", 7, "graph,periodicTable,protractor,lineReader,magnifier,ruler"), i = tr(t, "position", 7, "bottom"), s = tr(t, "toolCoordinator"), o = tr(t, "toolProviderRegistry"), l = /* @__PURE__ */ Le(() => n().split(",").map((M) => M.trim()).filter(Boolean)), a = /* @__PURE__ */ Le(() => v(l).length > 0), u = /* @__PURE__ */ N(!1), c = /* @__PURE__ */ N(!1), p = /* @__PURE__ */ N(!1), h = /* @__PURE__ */ N(!1), _ = /* @__PURE__ */ N(!1), d = /* @__PURE__ */ N(!1), T = /* @__PURE__ */ N("");
|
|
2879
|
+
function g() {
|
|
2880
|
+
s() && (R(u, s().isToolVisible("graph"), !0), R(c, s().isToolVisible("periodicTable"), !0), R(p, s().isToolVisible("protractor"), !0), R(h, s().isToolVisible("lineReader"), !0), R(_, s().isToolVisible("magnifier"), !0), R(d, s().isToolVisible("ruler"), !0));
|
|
2889
2881
|
}
|
|
2890
|
-
function
|
|
2882
|
+
function I(M) {
|
|
2891
2883
|
if (!s()) return;
|
|
2892
|
-
s().toggleTool(
|
|
2893
|
-
const
|
|
2894
|
-
if (
|
|
2895
|
-
const
|
|
2896
|
-
|
|
2884
|
+
s().toggleTool(M), g();
|
|
2885
|
+
const ce = v(ke).find((Ne) => Ne.id === M);
|
|
2886
|
+
if (ce) {
|
|
2887
|
+
const Ne = s().isToolVisible(M);
|
|
2888
|
+
R(T, `${ce.label} ${Ne ? "opened" : "closed"}`);
|
|
2897
2889
|
}
|
|
2898
2890
|
}
|
|
2899
|
-
let
|
|
2891
|
+
let C = null;
|
|
2900
2892
|
Ei(() => {
|
|
2901
|
-
|
|
2902
|
-
|
|
2893
|
+
if (r && v(a)) {
|
|
2894
|
+
const M = {
|
|
2895
|
+
calculator: "@pie-players/pie-tool-calculator",
|
|
2896
|
+
graph: "@pie-players/pie-tool-graph",
|
|
2897
|
+
periodicTable: "@pie-players/pie-tool-periodic-table",
|
|
2898
|
+
protractor: "@pie-players/pie-tool-protractor",
|
|
2899
|
+
lineReader: "@pie-players/pie-tool-line-reader",
|
|
2900
|
+
magnifier: "@pie-players/pie-tool-magnifier",
|
|
2901
|
+
ruler: "@pie-players/pie-tool-ruler"
|
|
2902
|
+
};
|
|
2903
|
+
Promise.all(v(l).map((ce) => M[ce]).filter(Boolean).map((ce) => import(ce))).catch((ce) => {
|
|
2904
|
+
console.error("[SectionToolsToolbar] Failed to load tool web components:", ce);
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
s() && (g(), C = s().subscribe(() => {
|
|
2908
|
+
g();
|
|
2903
2909
|
}));
|
|
2904
2910
|
}), no(() => {
|
|
2905
|
-
|
|
2911
|
+
C?.();
|
|
2906
2912
|
});
|
|
2907
|
-
const
|
|
2913
|
+
const ke = /* @__PURE__ */ Le(() => [
|
|
2908
2914
|
{
|
|
2909
2915
|
id: "graph",
|
|
2910
2916
|
ariaLabel: "Graphing tool",
|
|
2911
|
-
visible:
|
|
2912
|
-
enabled:
|
|
2917
|
+
visible: v(u),
|
|
2918
|
+
enabled: v(l).includes("graph"),
|
|
2913
2919
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z" fill="currentColor"/></svg>'
|
|
2914
2920
|
},
|
|
2915
2921
|
{
|
|
2916
2922
|
id: "periodicTable",
|
|
2917
2923
|
ariaLabel: "Periodic table of elements",
|
|
2918
|
-
visible:
|
|
2919
|
-
enabled:
|
|
2924
|
+
visible: v(c),
|
|
2925
|
+
enabled: v(l).includes("periodicTable"),
|
|
2920
2926
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z" fill="currentColor"/></svg>'
|
|
2921
2927
|
},
|
|
2922
2928
|
{
|
|
2923
2929
|
id: "protractor",
|
|
2924
2930
|
ariaLabel: "Angle measurement tool",
|
|
2925
|
-
visible: p
|
|
2926
|
-
enabled:
|
|
2931
|
+
visible: v(p),
|
|
2932
|
+
enabled: v(l).includes("protractor"),
|
|
2927
2933
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z" fill="currentColor"/></svg>'
|
|
2928
2934
|
},
|
|
2929
2935
|
{
|
|
2930
2936
|
id: "lineReader",
|
|
2931
2937
|
ariaLabel: "Line reading guide",
|
|
2932
|
-
visible:
|
|
2933
|
-
enabled:
|
|
2938
|
+
visible: v(h),
|
|
2939
|
+
enabled: v(l).includes("lineReader"),
|
|
2934
2940
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z" fill="currentColor"/></svg>'
|
|
2935
2941
|
},
|
|
2936
2942
|
{
|
|
2937
2943
|
id: "magnifier",
|
|
2938
2944
|
ariaLabel: "Text magnification tool",
|
|
2939
|
-
visible:
|
|
2940
|
-
enabled:
|
|
2945
|
+
visible: v(_),
|
|
2946
|
+
enabled: v(l).includes("magnifier"),
|
|
2941
2947
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.5 5.5c-1.813 0-3.438.969-4.344 2.5a4.937 4.937 0 0 0 0 5 4.974 4.974 0 0 0 4.344 2.5 4.96 4.96 0 0 0 4.313-2.5 4.937 4.937 0 0 0 0-5c-.908-1.531-2.533-2.5-4.313-2.5Zm0 11.5A6.495 6.495 0 0 1 4 10.5C4 6.937 6.906 4 10.5 4c3.563 0 6.5 2.938 6.5 6.5a6.597 6.597 0 0 1-1.406 4.063l4.156 4.187a.685.685 0 0 1 0 1.031.685.685 0 0 1-1.031 0l-4.188-4.156A6.548 6.548 0 0 1 10.5 17Zm-.75-3.75v-2h-2A.723.723 0 0 1 7 10.5a.74.74 0 0 1 .75-.75h2v-2A.74.74 0 0 1 10.5 7a.76.76 0 0 1 .75.75v2h2a.76.76 0 0 1 .696 1.039.741.741 0 0 1-.696.461h-2v2a.74.74 0 0 1-.75.75.723.723 0 0 1-.75-.75Z" fill="currentColor"/></svg>'
|
|
2942
2948
|
},
|
|
2943
2949
|
{
|
|
2944
2950
|
id: "ruler",
|
|
2945
2951
|
ariaLabel: "Measurement ruler",
|
|
2946
|
-
visible:
|
|
2947
|
-
enabled:
|
|
2952
|
+
visible: v(d),
|
|
2953
|
+
enabled: v(l).includes("ruler"),
|
|
2948
2954
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z" fill="currentColor"/></svg>'
|
|
2949
2955
|
}
|
|
2950
2956
|
]);
|
|
2951
|
-
let
|
|
2957
|
+
let W = /* @__PURE__ */ N(null), re = /* @__PURE__ */ N(null), X = /* @__PURE__ */ N(null), xe = /* @__PURE__ */ N(null), V = /* @__PURE__ */ N(null), q = /* @__PURE__ */ N(null);
|
|
2952
2958
|
ii(() => {
|
|
2953
|
-
s() && (
|
|
2959
|
+
s() && (v(W) && (v(W).coordinator = s()), v(re) && (v(re).coordinator = s()), v(X) && (v(X).coordinator = s()), v(xe) && (v(xe).coordinator = s()), v(V) && (v(V).coordinator = s()), v(q) && (v(q).coordinator = s()));
|
|
2954
2960
|
});
|
|
2955
|
-
var
|
|
2961
|
+
var br = {
|
|
2956
2962
|
get enabledTools() {
|
|
2957
2963
|
return n();
|
|
2958
2964
|
},
|
|
2959
|
-
set enabledTools(
|
|
2960
|
-
n(
|
|
2965
|
+
set enabledTools(M = "graph,periodicTable,protractor,lineReader,magnifier,ruler") {
|
|
2966
|
+
n(M), Dt();
|
|
2961
2967
|
},
|
|
2962
2968
|
get position() {
|
|
2963
2969
|
return i();
|
|
2964
2970
|
},
|
|
2965
|
-
set position(
|
|
2966
|
-
i(
|
|
2971
|
+
set position(M = "bottom") {
|
|
2972
|
+
i(M), Dt();
|
|
2967
2973
|
},
|
|
2968
2974
|
get toolCoordinator() {
|
|
2969
2975
|
return s();
|
|
2970
2976
|
},
|
|
2971
|
-
set toolCoordinator(
|
|
2972
|
-
s(
|
|
2977
|
+
set toolCoordinator(M) {
|
|
2978
|
+
s(M), Dt();
|
|
2973
2979
|
},
|
|
2974
2980
|
get toolProviderRegistry() {
|
|
2975
2981
|
return o();
|
|
2976
2982
|
},
|
|
2977
|
-
set toolProviderRegistry(
|
|
2978
|
-
o(
|
|
2983
|
+
set toolProviderRegistry(M) {
|
|
2984
|
+
o(M), Dt();
|
|
2979
2985
|
}
|
|
2980
|
-
}, Xt = gn(),
|
|
2986
|
+
}, Xt = gn(), Si = $r(Xt);
|
|
2981
2987
|
{
|
|
2982
|
-
var
|
|
2983
|
-
var
|
|
2988
|
+
var Ri = (M) => {
|
|
2989
|
+
var ce = So(), Ne = $r(ce);
|
|
2984
2990
|
let Xr;
|
|
2985
|
-
var Jr = yr(
|
|
2986
|
-
so(Jr, 21, () =>
|
|
2987
|
-
var
|
|
2991
|
+
var Jr = yr(Ne);
|
|
2992
|
+
so(Jr, 21, () => v(ke), (A) => A.id, (A, m) => {
|
|
2993
|
+
var U = gn(), Zi = $r(U);
|
|
2988
2994
|
{
|
|
2989
|
-
var
|
|
2990
|
-
var
|
|
2995
|
+
var ji = (mr) => {
|
|
2996
|
+
var je = wo();
|
|
2991
2997
|
let ln;
|
|
2992
|
-
var
|
|
2993
|
-
|
|
2994
|
-
ln = wn(
|
|
2995
|
-
}),
|
|
2998
|
+
var qi = yr(je);
|
|
2999
|
+
ao(qi, () => v(m).svg), Jt(je), Me(() => {
|
|
3000
|
+
ln = wn(je, 1, "tool-button svelte-x5tssx", null, ln, { active: v(m).visible }), Vt(je, "title", v(m).ariaLabel), Vt(je, "aria-label", v(m).ariaLabel), Vt(je, "aria-pressed", v(m).visible);
|
|
3001
|
+
}), zs("click", je, () => I(v(m).id)), de(mr, je);
|
|
2996
3002
|
};
|
|
2997
|
-
|
|
2998
|
-
|
|
3003
|
+
qe(Zi, (mr) => {
|
|
3004
|
+
v(m).enabled && mr(ji);
|
|
2999
3005
|
});
|
|
3000
3006
|
}
|
|
3001
|
-
de(A,
|
|
3002
|
-
}), Jt(Jr), Jt(
|
|
3003
|
-
var Qr =
|
|
3007
|
+
de(A, U);
|
|
3008
|
+
}), Jt(Jr), Jt(Ne);
|
|
3009
|
+
var Qr = et(Ne, 2);
|
|
3004
3010
|
{
|
|
3005
3011
|
var Ci = (A) => {
|
|
3006
3012
|
var m = yo();
|
|
3007
|
-
|
|
3008
|
-
},
|
|
3009
|
-
|
|
3010
|
-
|
|
3013
|
+
Me(() => ne(m, "visible", v(u))), ne(m, "tool-id", "graph"), gt(m, (U) => R(W, U), () => v(W)), de(A, m);
|
|
3014
|
+
}, ki = /* @__PURE__ */ Le(() => v(l).includes("graph"));
|
|
3015
|
+
qe(Qr, (A) => {
|
|
3016
|
+
v(ki) && A(Ci);
|
|
3011
3017
|
});
|
|
3012
3018
|
}
|
|
3013
|
-
var en =
|
|
3019
|
+
var en = et(Qr, 2);
|
|
3014
3020
|
{
|
|
3015
|
-
var
|
|
3021
|
+
var Ni = (A) => {
|
|
3016
3022
|
var m = $o();
|
|
3017
|
-
|
|
3018
|
-
},
|
|
3019
|
-
|
|
3020
|
-
|
|
3023
|
+
Me(() => ne(m, "visible", v(c))), ne(m, "tool-id", "periodicTable"), gt(m, (U) => R(re, U), () => v(re)), de(A, m);
|
|
3024
|
+
}, Li = /* @__PURE__ */ Le(() => v(l).includes("periodicTable"));
|
|
3025
|
+
qe(en, (A) => {
|
|
3026
|
+
v(Li) && A(Ni);
|
|
3021
3027
|
});
|
|
3022
3028
|
}
|
|
3023
|
-
var tn =
|
|
3029
|
+
var tn = et(en, 2);
|
|
3024
3030
|
{
|
|
3025
|
-
var
|
|
3031
|
+
var Mi = (A) => {
|
|
3026
3032
|
var m = xo();
|
|
3027
|
-
|
|
3028
|
-
},
|
|
3029
|
-
|
|
3030
|
-
|
|
3033
|
+
Me(() => ne(m, "visible", v(p))), ne(m, "tool-id", "protractor"), gt(m, (U) => R(X, U), () => v(X)), de(A, m);
|
|
3034
|
+
}, Oi = /* @__PURE__ */ Le(() => v(l).includes("protractor"));
|
|
3035
|
+
qe(tn, (A) => {
|
|
3036
|
+
v(Oi) && A(Mi);
|
|
3031
3037
|
});
|
|
3032
3038
|
}
|
|
3033
|
-
var rn =
|
|
3039
|
+
var rn = et(tn, 2);
|
|
3034
3040
|
{
|
|
3035
|
-
var
|
|
3041
|
+
var Pi = (A) => {
|
|
3036
3042
|
var m = Eo();
|
|
3037
|
-
|
|
3038
|
-
},
|
|
3039
|
-
|
|
3040
|
-
|
|
3043
|
+
Me(() => ne(m, "visible", v(h))), ne(m, "tool-id", "lineReader"), gt(m, (U) => R(xe, U), () => v(xe)), de(A, m);
|
|
3044
|
+
}, Di = /* @__PURE__ */ Le(() => v(l).includes("lineReader"));
|
|
3045
|
+
qe(rn, (A) => {
|
|
3046
|
+
v(Di) && A(Pi);
|
|
3041
3047
|
});
|
|
3042
3048
|
}
|
|
3043
|
-
var nn =
|
|
3049
|
+
var nn = et(rn, 2);
|
|
3044
3050
|
{
|
|
3045
|
-
var
|
|
3051
|
+
var Fi = (A) => {
|
|
3046
3052
|
var m = To();
|
|
3047
|
-
|
|
3048
|
-
},
|
|
3049
|
-
|
|
3050
|
-
|
|
3053
|
+
Me(() => ne(m, "visible", v(_))), ne(m, "tool-id", "magnifier"), gt(m, (U) => R(V, U), () => v(V)), de(A, m);
|
|
3054
|
+
}, Ii = /* @__PURE__ */ Le(() => v(l).includes("magnifier"));
|
|
3055
|
+
qe(nn, (A) => {
|
|
3056
|
+
v(Ii) && A(Fi);
|
|
3051
3057
|
});
|
|
3052
3058
|
}
|
|
3053
|
-
var sn =
|
|
3059
|
+
var sn = et(nn, 2);
|
|
3054
3060
|
{
|
|
3055
|
-
var
|
|
3061
|
+
var Vi = (A) => {
|
|
3056
3062
|
var m = Ao();
|
|
3057
|
-
|
|
3058
|
-
},
|
|
3059
|
-
|
|
3060
|
-
|
|
3063
|
+
Me(() => ne(m, "visible", v(d))), ne(m, "tool-id", "ruler"), gt(m, (U) => R(q, U), () => v(q)), de(A, m);
|
|
3064
|
+
}, Bi = /* @__PURE__ */ Le(() => v(l).includes("ruler"));
|
|
3065
|
+
qe(sn, (A) => {
|
|
3066
|
+
v(Bi) && A(Vi);
|
|
3061
3067
|
});
|
|
3062
3068
|
}
|
|
3063
|
-
var on =
|
|
3064
|
-
Jt(on),
|
|
3065
|
-
Xr = wn(
|
|
3069
|
+
var on = et(sn, 2), Hi = yr(on, !0);
|
|
3070
|
+
Jt(on), Me(() => {
|
|
3071
|
+
Xr = wn(Ne, 1, `section-tools-toolbar section-tools-toolbar--${i() ?? ""}`, "svelte-x5tssx", Xr, {
|
|
3066
3072
|
"section-tools-toolbar--top": i() === "top",
|
|
3067
3073
|
"section-tools-toolbar--right": i() === "right",
|
|
3068
3074
|
"section-tools-toolbar--bottom": i() === "bottom",
|
|
3069
3075
|
"section-tools-toolbar--left": i() === "left"
|
|
3070
|
-
}), Vt(
|
|
3071
|
-
}), de(
|
|
3076
|
+
}), Vt(Ne, "data-position", i()), Qs(Hi, v(T));
|
|
3077
|
+
}), de(M, ce);
|
|
3072
3078
|
};
|
|
3073
|
-
|
|
3074
|
-
r &&
|
|
3079
|
+
qe(Si, (M) => {
|
|
3080
|
+
r && i() !== "none" && v(a) && M(Ri);
|
|
3075
3081
|
});
|
|
3076
3082
|
}
|
|
3077
|
-
return de(e, Xt), On(
|
|
3083
|
+
return de(e, Xt), On(br);
|
|
3078
3084
|
}
|
|
3079
3085
|
Gs(["click"]);
|
|
3080
3086
|
customElements.define("pie-section-tools-toolbar", mo(
|
|
3081
|
-
|
|
3087
|
+
Co,
|
|
3082
3088
|
{
|
|
3083
3089
|
enabledTools: { attribute: "enabled-tools", type: "String" },
|
|
3084
3090
|
position: { attribute: "position", type: "String" },
|
|
@@ -3089,6 +3095,6 @@ customElements.define("pie-section-tools-toolbar", mo(
|
|
|
3089
3095
|
[]
|
|
3090
3096
|
));
|
|
3091
3097
|
export {
|
|
3092
|
-
|
|
3098
|
+
Co as default
|
|
3093
3099
|
};
|
|
3094
3100
|
//# sourceMappingURL=section-tools-toolbar.js.map
|