@pie-players/pie-section-player-tools-event-debugger 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EventPanel.svelte +741 -0
- package/dist/EventPanel.svelte.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/pie-section-player-tools-event-debugger.css +1 -0
- package/dist/section-player-tools-event-debugger.js +3169 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/index.ts +10 -0
- package/package.json +71 -0
|
@@ -0,0 +1,3169 @@
|
|
|
1
|
+
var Hs = Object.defineProperty;
|
|
2
|
+
var Gr = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var Ys = (e, t, n) => t in e ? Hs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var L = (e, t, n) => Ys(e, typeof t != "symbol" ? t + "" : t, n), lr = (e, t, n) => t.has(e) || Gr("Cannot " + n);
|
|
7
|
+
var u = (e, t, n) => (lr(e, t, "read from private field"), n ? n.call(e) : t.get(e)), y = (e, t, n) => t.has(e) ? Gr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), w = (e, t, n, r) => (lr(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), J = (e, t, n) => (lr(e, t, "access private method"), n);
|
|
8
|
+
var ui;
|
|
9
|
+
typeof window < "u" && ((ui = window.__svelte ?? (window.__svelte = {})).v ?? (ui.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const js = 1, Vs = 2, qs = 16, Bs = 1, Xs = 2, Sr = "[", Pn = "[!", Tr = "]", Dt = {}, q = /* @__PURE__ */ Symbol(), fi = "http://www.w3.org/1999/xhtml", cr = !1;
|
|
11
|
+
var kr = Array.isArray, Us = Array.prototype.indexOf, Ft = Array.prototype.includes, zn = Array.from, Nn = Object.keys, On = Object.defineProperty, Tt = Object.getOwnPropertyDescriptor, Ws = Object.getOwnPropertyDescriptors, Gs = Object.prototype, Js = Array.prototype, ci = Object.getPrototypeOf, Jr = Object.isExtensible;
|
|
12
|
+
const Ks = () => {
|
|
13
|
+
};
|
|
14
|
+
function Zs(e) {
|
|
15
|
+
for (var t = 0; t < e.length; t++)
|
|
16
|
+
e[t]();
|
|
17
|
+
}
|
|
18
|
+
function di() {
|
|
19
|
+
var e, t, n = new Promise((r, i) => {
|
|
20
|
+
e = r, t = i;
|
|
21
|
+
});
|
|
22
|
+
return { promise: n, resolve: e, reject: t };
|
|
23
|
+
}
|
|
24
|
+
const B = 2, sn = 4, Hn = 8, vi = 1 << 24, Ge = 16, Se = 32, it = 64, dr = 128, pe = 512, Y = 1024, X = 2048, xe = 4096, oe = 8192, Ue = 16384, qt = 32768, Pt = 65536, Kr = 1 << 17, pi = 1 << 18, yt = 1 << 19, Qs = 1 << 20, et = 1 << 25, bt = 65536, vr = 1 << 21, Cr = 1 << 22, tt = 1 << 23, ar = /* @__PURE__ */ Symbol("$state"), eo = /* @__PURE__ */ Symbol("legacy props"), to = /* @__PURE__ */ Symbol(""), at = new class extends Error {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
L(this, "name", "StaleReactionError");
|
|
28
|
+
L(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
|
+
}
|
|
30
|
+
}(), no = (
|
|
31
|
+
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
32
|
+
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
33
|
+
), Yn = 3, dn = 8;
|
|
34
|
+
function Mr(e) {
|
|
35
|
+
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
|
+
}
|
|
37
|
+
function ro() {
|
|
38
|
+
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
39
|
+
}
|
|
40
|
+
function io(e, t, n) {
|
|
41
|
+
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
42
|
+
}
|
|
43
|
+
function so(e) {
|
|
44
|
+
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
45
|
+
}
|
|
46
|
+
function oo() {
|
|
47
|
+
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
48
|
+
}
|
|
49
|
+
function lo(e) {
|
|
50
|
+
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
51
|
+
}
|
|
52
|
+
function ao() {
|
|
53
|
+
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
54
|
+
}
|
|
55
|
+
function uo() {
|
|
56
|
+
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
57
|
+
}
|
|
58
|
+
function fo() {
|
|
59
|
+
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
60
|
+
}
|
|
61
|
+
function co() {
|
|
62
|
+
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
63
|
+
}
|
|
64
|
+
function vo() {
|
|
65
|
+
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
66
|
+
}
|
|
67
|
+
function po() {
|
|
68
|
+
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
69
|
+
}
|
|
70
|
+
function jn(e) {
|
|
71
|
+
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
72
|
+
}
|
|
73
|
+
function ho() {
|
|
74
|
+
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
75
|
+
}
|
|
76
|
+
let A = !1;
|
|
77
|
+
function Xe(e) {
|
|
78
|
+
A = e;
|
|
79
|
+
}
|
|
80
|
+
let M;
|
|
81
|
+
function le(e) {
|
|
82
|
+
if (e === null)
|
|
83
|
+
throw jn(), Dt;
|
|
84
|
+
return M = e;
|
|
85
|
+
}
|
|
86
|
+
function Vn() {
|
|
87
|
+
return le(/* @__PURE__ */ Oe(M));
|
|
88
|
+
}
|
|
89
|
+
function T(e) {
|
|
90
|
+
if (A) {
|
|
91
|
+
if (/* @__PURE__ */ Oe(M) !== null)
|
|
92
|
+
throw jn(), Dt;
|
|
93
|
+
M = e;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function _o(e = 1) {
|
|
97
|
+
if (A) {
|
|
98
|
+
for (var t = e, n = M; t--; )
|
|
99
|
+
n = /** @type {TemplateNode} */
|
|
100
|
+
/* @__PURE__ */ Oe(n);
|
|
101
|
+
M = n;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function Ln(e = !0) {
|
|
105
|
+
for (var t = 0, n = M; ; ) {
|
|
106
|
+
if (n.nodeType === dn) {
|
|
107
|
+
var r = (
|
|
108
|
+
/** @type {Comment} */
|
|
109
|
+
n.data
|
|
110
|
+
);
|
|
111
|
+
if (r === Tr) {
|
|
112
|
+
if (t === 0) return n;
|
|
113
|
+
t -= 1;
|
|
114
|
+
} else (r === Sr || r === Pn || // "[1", "[2", etc. for if blocks
|
|
115
|
+
r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
|
|
116
|
+
}
|
|
117
|
+
var i = (
|
|
118
|
+
/** @type {TemplateNode} */
|
|
119
|
+
/* @__PURE__ */ Oe(n)
|
|
120
|
+
);
|
|
121
|
+
e && n.remove(), n = i;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function hi(e) {
|
|
125
|
+
if (!e || e.nodeType !== dn)
|
|
126
|
+
throw jn(), Dt;
|
|
127
|
+
return (
|
|
128
|
+
/** @type {Comment} */
|
|
129
|
+
e.data
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function _i(e) {
|
|
133
|
+
return e === this.v;
|
|
134
|
+
}
|
|
135
|
+
function go(e, t) {
|
|
136
|
+
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
137
|
+
}
|
|
138
|
+
function gi(e) {
|
|
139
|
+
return !go(e, this.v);
|
|
140
|
+
}
|
|
141
|
+
let mo = !1, Q = null;
|
|
142
|
+
function zt(e) {
|
|
143
|
+
Q = e;
|
|
144
|
+
}
|
|
145
|
+
function mi(e, t = !1, n) {
|
|
146
|
+
Q = {
|
|
147
|
+
p: Q,
|
|
148
|
+
i: !1,
|
|
149
|
+
c: null,
|
|
150
|
+
e: null,
|
|
151
|
+
s: e,
|
|
152
|
+
x: null,
|
|
153
|
+
l: null
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function bi(e) {
|
|
157
|
+
var t = (
|
|
158
|
+
/** @type {ComponentContext} */
|
|
159
|
+
Q
|
|
160
|
+
), n = t.e;
|
|
161
|
+
if (n !== null) {
|
|
162
|
+
t.e = null;
|
|
163
|
+
for (var r of n)
|
|
164
|
+
qi(r);
|
|
165
|
+
}
|
|
166
|
+
return e !== void 0 && (t.x = e), t.i = !0, Q = t.p, e ?? /** @type {T} */
|
|
167
|
+
{};
|
|
168
|
+
}
|
|
169
|
+
function wi() {
|
|
170
|
+
return !0;
|
|
171
|
+
}
|
|
172
|
+
let ut = [];
|
|
173
|
+
function yi() {
|
|
174
|
+
var e = ut;
|
|
175
|
+
ut = [], Zs(e);
|
|
176
|
+
}
|
|
177
|
+
function kt(e) {
|
|
178
|
+
if (ut.length === 0 && !nn) {
|
|
179
|
+
var t = ut;
|
|
180
|
+
queueMicrotask(() => {
|
|
181
|
+
t === ut && yi();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
ut.push(e);
|
|
185
|
+
}
|
|
186
|
+
function bo() {
|
|
187
|
+
for (; ut.length > 0; )
|
|
188
|
+
yi();
|
|
189
|
+
}
|
|
190
|
+
function $i(e) {
|
|
191
|
+
var t = C;
|
|
192
|
+
if (t === null)
|
|
193
|
+
return $.f |= tt, e;
|
|
194
|
+
if ((t.f & qt) === 0 && (t.f & sn) === 0)
|
|
195
|
+
throw e;
|
|
196
|
+
Ht(e, t);
|
|
197
|
+
}
|
|
198
|
+
function Ht(e, t) {
|
|
199
|
+
for (; t !== null; ) {
|
|
200
|
+
if ((t.f & dr) !== 0) {
|
|
201
|
+
if ((t.f & qt) === 0)
|
|
202
|
+
throw e;
|
|
203
|
+
try {
|
|
204
|
+
t.b.error(e);
|
|
205
|
+
return;
|
|
206
|
+
} catch (n) {
|
|
207
|
+
e = n;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
t = t.parent;
|
|
211
|
+
}
|
|
212
|
+
throw e;
|
|
213
|
+
}
|
|
214
|
+
const wo = -7169;
|
|
215
|
+
function D(e, t) {
|
|
216
|
+
e.f = e.f & wo | t;
|
|
217
|
+
}
|
|
218
|
+
function Ar(e) {
|
|
219
|
+
(e.f & pe) !== 0 || e.deps === null ? D(e, Y) : D(e, xe);
|
|
220
|
+
}
|
|
221
|
+
function xi(e) {
|
|
222
|
+
if (e !== null)
|
|
223
|
+
for (const t of e)
|
|
224
|
+
(t.f & B) === 0 || (t.f & bt) === 0 || (t.f ^= bt, xi(
|
|
225
|
+
/** @type {Derived} */
|
|
226
|
+
t.deps
|
|
227
|
+
));
|
|
228
|
+
}
|
|
229
|
+
function Ei(e, t, n) {
|
|
230
|
+
(e.f & X) !== 0 ? t.add(e) : (e.f & xe) !== 0 && n.add(e), xi(e.deps), D(e, Y);
|
|
231
|
+
}
|
|
232
|
+
const Tn = /* @__PURE__ */ new Set();
|
|
233
|
+
let N = null, we = null, te = [], qn = null, pr = !1, nn = !1;
|
|
234
|
+
var Mt, At, dt, It, ln, an, vt, Ye, Rt, Ne, hr, _r, Si;
|
|
235
|
+
const zr = class zr {
|
|
236
|
+
constructor() {
|
|
237
|
+
y(this, Ne);
|
|
238
|
+
L(this, "committed", !1);
|
|
239
|
+
/**
|
|
240
|
+
* The current values of any sources that are updated in this batch
|
|
241
|
+
* They keys of this map are identical to `this.#previous`
|
|
242
|
+
* @type {Map<Source, any>}
|
|
243
|
+
*/
|
|
244
|
+
L(this, "current", /* @__PURE__ */ new Map());
|
|
245
|
+
/**
|
|
246
|
+
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
247
|
+
* They keys of this map are identical to `this.#current`
|
|
248
|
+
* @type {Map<Source, any>}
|
|
249
|
+
*/
|
|
250
|
+
L(this, "previous", /* @__PURE__ */ new Map());
|
|
251
|
+
/**
|
|
252
|
+
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
253
|
+
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
254
|
+
* @type {Set<() => void>}
|
|
255
|
+
*/
|
|
256
|
+
y(this, Mt, /* @__PURE__ */ new Set());
|
|
257
|
+
/**
|
|
258
|
+
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
259
|
+
* @type {Set<(batch: Batch) => void>}
|
|
260
|
+
*/
|
|
261
|
+
y(this, At, /* @__PURE__ */ new Set());
|
|
262
|
+
/**
|
|
263
|
+
* The number of async effects that are currently in flight
|
|
264
|
+
*/
|
|
265
|
+
y(this, dt, 0);
|
|
266
|
+
/**
|
|
267
|
+
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
268
|
+
*/
|
|
269
|
+
y(this, It, 0);
|
|
270
|
+
/**
|
|
271
|
+
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
272
|
+
* TODO replace with Promise.withResolvers once supported widely enough
|
|
273
|
+
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
274
|
+
*/
|
|
275
|
+
y(this, ln, null);
|
|
276
|
+
/**
|
|
277
|
+
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
278
|
+
* @type {Set<Effect>}
|
|
279
|
+
*/
|
|
280
|
+
y(this, an, /* @__PURE__ */ new Set());
|
|
281
|
+
/**
|
|
282
|
+
* Deferred effects that are MAYBE_DIRTY
|
|
283
|
+
* @type {Set<Effect>}
|
|
284
|
+
*/
|
|
285
|
+
y(this, vt, /* @__PURE__ */ new Set());
|
|
286
|
+
/**
|
|
287
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
288
|
+
* is committed — we skip over these during `process`.
|
|
289
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
290
|
+
* so they can be rescheduled if the branch survives.
|
|
291
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
292
|
+
*/
|
|
293
|
+
y(this, Ye, /* @__PURE__ */ new Map());
|
|
294
|
+
L(this, "is_fork", !1);
|
|
295
|
+
y(this, Rt, !1);
|
|
296
|
+
}
|
|
297
|
+
is_deferred() {
|
|
298
|
+
return this.is_fork || u(this, It) > 0;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
302
|
+
* @param {Effect} effect
|
|
303
|
+
*/
|
|
304
|
+
skip_effect(t) {
|
|
305
|
+
u(this, Ye).has(t) || u(this, Ye).set(t, { d: [], m: [] });
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
309
|
+
* any tracked dirty/maybe_dirty child effects
|
|
310
|
+
* @param {Effect} effect
|
|
311
|
+
*/
|
|
312
|
+
unskip_effect(t) {
|
|
313
|
+
var n = u(this, Ye).get(t);
|
|
314
|
+
if (n) {
|
|
315
|
+
u(this, Ye).delete(t);
|
|
316
|
+
for (var r of n.d)
|
|
317
|
+
D(r, X), ye(r);
|
|
318
|
+
for (r of n.m)
|
|
319
|
+
D(r, xe), ye(r);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @param {Effect[]} root_effects
|
|
325
|
+
*/
|
|
326
|
+
process(t) {
|
|
327
|
+
te = [], this.apply();
|
|
328
|
+
var n = [], r = [];
|
|
329
|
+
for (const i of t)
|
|
330
|
+
J(this, Ne, hr).call(this, i, n, r);
|
|
331
|
+
if (this.is_deferred()) {
|
|
332
|
+
J(this, Ne, _r).call(this, r), J(this, Ne, _r).call(this, n);
|
|
333
|
+
for (const [i, s] of u(this, Ye))
|
|
334
|
+
Mi(i, s);
|
|
335
|
+
} else {
|
|
336
|
+
for (const i of u(this, Mt)) i();
|
|
337
|
+
u(this, Mt).clear(), u(this, dt) === 0 && J(this, Ne, Si).call(this), N = null, Zr(r), Zr(n), u(this, ln)?.resolve();
|
|
338
|
+
}
|
|
339
|
+
we = null;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Associate a change to a given source with the current
|
|
343
|
+
* batch, noting its previous and current values
|
|
344
|
+
* @param {Source} source
|
|
345
|
+
* @param {any} value
|
|
346
|
+
*/
|
|
347
|
+
capture(t, n) {
|
|
348
|
+
n !== q && !this.previous.has(t) && this.previous.set(t, n), (t.f & tt) === 0 && (this.current.set(t, t.v), we?.set(t, t.v));
|
|
349
|
+
}
|
|
350
|
+
activate() {
|
|
351
|
+
N = this, this.apply();
|
|
352
|
+
}
|
|
353
|
+
deactivate() {
|
|
354
|
+
N === this && (N = null, we = null);
|
|
355
|
+
}
|
|
356
|
+
flush() {
|
|
357
|
+
if (this.activate(), te.length > 0) {
|
|
358
|
+
if (Ti(), N !== null && N !== this)
|
|
359
|
+
return;
|
|
360
|
+
} else u(this, dt) === 0 && this.process([]);
|
|
361
|
+
this.deactivate();
|
|
362
|
+
}
|
|
363
|
+
discard() {
|
|
364
|
+
for (const t of u(this, At)) t(this);
|
|
365
|
+
u(this, At).clear();
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
*
|
|
369
|
+
* @param {boolean} blocking
|
|
370
|
+
*/
|
|
371
|
+
increment(t) {
|
|
372
|
+
w(this, dt, u(this, dt) + 1), t && w(this, It, u(this, It) + 1);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
*
|
|
376
|
+
* @param {boolean} blocking
|
|
377
|
+
*/
|
|
378
|
+
decrement(t) {
|
|
379
|
+
w(this, dt, u(this, dt) - 1), t && w(this, It, u(this, It) - 1), !u(this, Rt) && (w(this, Rt, !0), kt(() => {
|
|
380
|
+
w(this, Rt, !1), this.is_deferred() ? te.length > 0 && this.flush() : this.revive();
|
|
381
|
+
}));
|
|
382
|
+
}
|
|
383
|
+
revive() {
|
|
384
|
+
for (const t of u(this, an))
|
|
385
|
+
u(this, vt).delete(t), D(t, X), ye(t);
|
|
386
|
+
for (const t of u(this, vt))
|
|
387
|
+
D(t, xe), ye(t);
|
|
388
|
+
this.flush();
|
|
389
|
+
}
|
|
390
|
+
/** @param {() => void} fn */
|
|
391
|
+
oncommit(t) {
|
|
392
|
+
u(this, Mt).add(t);
|
|
393
|
+
}
|
|
394
|
+
/** @param {(batch: Batch) => void} fn */
|
|
395
|
+
ondiscard(t) {
|
|
396
|
+
u(this, At).add(t);
|
|
397
|
+
}
|
|
398
|
+
settled() {
|
|
399
|
+
return (u(this, ln) ?? w(this, ln, di())).promise;
|
|
400
|
+
}
|
|
401
|
+
static ensure() {
|
|
402
|
+
if (N === null) {
|
|
403
|
+
const t = N = new zr();
|
|
404
|
+
Tn.add(N), nn || kt(() => {
|
|
405
|
+
N === t && t.flush();
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
return N;
|
|
409
|
+
}
|
|
410
|
+
apply() {
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
Mt = new WeakMap(), At = new WeakMap(), dt = new WeakMap(), It = new WeakMap(), ln = new WeakMap(), an = new WeakMap(), vt = new WeakMap(), Ye = new WeakMap(), Rt = new WeakMap(), Ne = new WeakSet(), /**
|
|
414
|
+
* Traverse the effect tree, executing effects or stashing
|
|
415
|
+
* them for later execution as appropriate
|
|
416
|
+
* @param {Effect} root
|
|
417
|
+
* @param {Effect[]} effects
|
|
418
|
+
* @param {Effect[]} render_effects
|
|
419
|
+
*/
|
|
420
|
+
hr = function(t, n, r) {
|
|
421
|
+
t.f ^= Y;
|
|
422
|
+
for (var i = t.first, s = null; i !== null; ) {
|
|
423
|
+
var o = i.f, l = (o & (Se | it)) !== 0, a = l && (o & Y) !== 0, f = a || (o & oe) !== 0 || u(this, Ye).has(i);
|
|
424
|
+
if (!f && i.fn !== null) {
|
|
425
|
+
l ? i.f ^= Y : s !== null && (o & (sn | Hn | vi)) !== 0 ? s.b.defer_effect(i) : (o & sn) !== 0 ? n.push(i) : vn(i) && ((o & Ge) !== 0 && u(this, vt).add(i), Vt(i));
|
|
426
|
+
var c = i.first;
|
|
427
|
+
if (c !== null) {
|
|
428
|
+
i = c;
|
|
429
|
+
continue;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
for (; i !== null; ) {
|
|
433
|
+
i === s && (s = null);
|
|
434
|
+
var _ = i.next;
|
|
435
|
+
if (_ !== null) {
|
|
436
|
+
i = _;
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
i = i.parent;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}, /**
|
|
443
|
+
* @param {Effect[]} effects
|
|
444
|
+
*/
|
|
445
|
+
_r = function(t) {
|
|
446
|
+
for (var n = 0; n < t.length; n += 1)
|
|
447
|
+
Ei(t[n], u(this, an), u(this, vt));
|
|
448
|
+
}, Si = function() {
|
|
449
|
+
var i;
|
|
450
|
+
if (Tn.size > 1) {
|
|
451
|
+
this.previous.clear();
|
|
452
|
+
var t = we, n = !0;
|
|
453
|
+
for (const s of Tn) {
|
|
454
|
+
if (s === this) {
|
|
455
|
+
n = !1;
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
const o = [];
|
|
459
|
+
for (const [a, f] of this.current) {
|
|
460
|
+
if (s.current.has(a))
|
|
461
|
+
if (n && f !== s.current.get(a))
|
|
462
|
+
s.current.set(a, f);
|
|
463
|
+
else
|
|
464
|
+
continue;
|
|
465
|
+
o.push(a);
|
|
466
|
+
}
|
|
467
|
+
if (o.length === 0)
|
|
468
|
+
continue;
|
|
469
|
+
const l = [...s.current.keys()].filter((a) => !this.current.has(a));
|
|
470
|
+
if (l.length > 0) {
|
|
471
|
+
var r = te;
|
|
472
|
+
te = [];
|
|
473
|
+
const a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
474
|
+
for (const c of o)
|
|
475
|
+
ki(c, l, a, f);
|
|
476
|
+
if (te.length > 0) {
|
|
477
|
+
N = s, s.apply();
|
|
478
|
+
for (const c of te)
|
|
479
|
+
J(i = s, Ne, hr).call(i, c, [], []);
|
|
480
|
+
s.deactivate();
|
|
481
|
+
}
|
|
482
|
+
te = r;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
N = null, we = t;
|
|
486
|
+
}
|
|
487
|
+
this.committed = !0, Tn.delete(this);
|
|
488
|
+
};
|
|
489
|
+
let We = zr;
|
|
490
|
+
function en(e) {
|
|
491
|
+
var t = nn;
|
|
492
|
+
nn = !0;
|
|
493
|
+
try {
|
|
494
|
+
for (var n; ; ) {
|
|
495
|
+
if (bo(), te.length === 0 && (N?.flush(), te.length === 0))
|
|
496
|
+
return qn = null, /** @type {T} */
|
|
497
|
+
n;
|
|
498
|
+
Ti();
|
|
499
|
+
}
|
|
500
|
+
} finally {
|
|
501
|
+
nn = t;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
function Ti() {
|
|
505
|
+
pr = !0;
|
|
506
|
+
var e = null;
|
|
507
|
+
try {
|
|
508
|
+
for (var t = 0; te.length > 0; ) {
|
|
509
|
+
var n = We.ensure();
|
|
510
|
+
if (t++ > 1e3) {
|
|
511
|
+
var r, i;
|
|
512
|
+
yo();
|
|
513
|
+
}
|
|
514
|
+
n.process(te), nt.clear();
|
|
515
|
+
}
|
|
516
|
+
} finally {
|
|
517
|
+
te = [], pr = !1, qn = null;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
function yo() {
|
|
521
|
+
try {
|
|
522
|
+
ao();
|
|
523
|
+
} catch (e) {
|
|
524
|
+
Ht(e, qn);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
let He = null;
|
|
528
|
+
function Zr(e) {
|
|
529
|
+
var t = e.length;
|
|
530
|
+
if (t !== 0) {
|
|
531
|
+
for (var n = 0; n < t; ) {
|
|
532
|
+
var r = e[n++];
|
|
533
|
+
if ((r.f & (Ue | oe)) === 0 && vn(r) && (He = /* @__PURE__ */ new Set(), Vt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Ui(r), He?.size > 0)) {
|
|
534
|
+
nt.clear();
|
|
535
|
+
for (const i of He) {
|
|
536
|
+
if ((i.f & (Ue | oe)) !== 0) continue;
|
|
537
|
+
const s = [i];
|
|
538
|
+
let o = i.parent;
|
|
539
|
+
for (; o !== null; )
|
|
540
|
+
He.has(o) && (He.delete(o), s.push(o)), o = o.parent;
|
|
541
|
+
for (let l = s.length - 1; l >= 0; l--) {
|
|
542
|
+
const a = s[l];
|
|
543
|
+
(a.f & (Ue | oe)) === 0 && Vt(a);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
He.clear();
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
He = null;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
function ki(e, t, n, r) {
|
|
553
|
+
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
554
|
+
for (const i of e.reactions) {
|
|
555
|
+
const s = i.f;
|
|
556
|
+
(s & B) !== 0 ? ki(
|
|
557
|
+
/** @type {Derived} */
|
|
558
|
+
i,
|
|
559
|
+
t,
|
|
560
|
+
n,
|
|
561
|
+
r
|
|
562
|
+
) : (s & (Cr | Ge)) !== 0 && (s & X) === 0 && Ci(i, t, r) && (D(i, X), ye(
|
|
563
|
+
/** @type {Effect} */
|
|
564
|
+
i
|
|
565
|
+
));
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function Ci(e, t, n) {
|
|
569
|
+
const r = n.get(e);
|
|
570
|
+
if (r !== void 0) return r;
|
|
571
|
+
if (e.deps !== null)
|
|
572
|
+
for (const i of e.deps) {
|
|
573
|
+
if (Ft.call(t, i))
|
|
574
|
+
return !0;
|
|
575
|
+
if ((i.f & B) !== 0 && Ci(
|
|
576
|
+
/** @type {Derived} */
|
|
577
|
+
i,
|
|
578
|
+
t,
|
|
579
|
+
n
|
|
580
|
+
))
|
|
581
|
+
return n.set(
|
|
582
|
+
/** @type {Derived} */
|
|
583
|
+
i,
|
|
584
|
+
!0
|
|
585
|
+
), !0;
|
|
586
|
+
}
|
|
587
|
+
return n.set(e, !1), !1;
|
|
588
|
+
}
|
|
589
|
+
function ye(e) {
|
|
590
|
+
for (var t = qn = e; t.parent !== null; ) {
|
|
591
|
+
t = t.parent;
|
|
592
|
+
var n = t.f;
|
|
593
|
+
if (pr && t === C && (n & Ge) !== 0 && (n & pi) === 0)
|
|
594
|
+
return;
|
|
595
|
+
if ((n & (it | Se)) !== 0) {
|
|
596
|
+
if ((n & Y) === 0) return;
|
|
597
|
+
t.f ^= Y;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
te.push(t);
|
|
601
|
+
}
|
|
602
|
+
function Mi(e, t) {
|
|
603
|
+
if (!((e.f & Se) !== 0 && (e.f & Y) !== 0)) {
|
|
604
|
+
(e.f & X) !== 0 ? t.d.push(e) : (e.f & xe) !== 0 && t.m.push(e), D(e, Y);
|
|
605
|
+
for (var n = e.first; n !== null; )
|
|
606
|
+
Mi(n, t), n = n.next;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
function $o(e) {
|
|
610
|
+
let t = 0, n = wt(0), r;
|
|
611
|
+
return () => {
|
|
612
|
+
Or() && (v(n), Bi(() => (t === 0 && (r = Pr(() => e(() => rn(n)))), t += 1, () => {
|
|
613
|
+
kt(() => {
|
|
614
|
+
t -= 1, t === 0 && (r?.(), r = void 0, rn(n));
|
|
615
|
+
});
|
|
616
|
+
})));
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
var xo = Pt | yt;
|
|
620
|
+
function Eo(e, t, n) {
|
|
621
|
+
new So(e, t, n);
|
|
622
|
+
}
|
|
623
|
+
var de, un, je, pt, Ce, Me, ie, Ae, Ve, ht, Qe, Nt, Ot, Lt, qe, Dn, G, Ai, Ii, gr, An, mr;
|
|
624
|
+
class So {
|
|
625
|
+
/**
|
|
626
|
+
* @param {TemplateNode} node
|
|
627
|
+
* @param {BoundaryProps} props
|
|
628
|
+
* @param {((anchor: Node) => void)} children
|
|
629
|
+
*/
|
|
630
|
+
constructor(t, n, r) {
|
|
631
|
+
y(this, G);
|
|
632
|
+
/** @type {Boundary | null} */
|
|
633
|
+
L(this, "parent");
|
|
634
|
+
L(this, "is_pending", !1);
|
|
635
|
+
/** @type {TemplateNode} */
|
|
636
|
+
y(this, de);
|
|
637
|
+
/** @type {TemplateNode | null} */
|
|
638
|
+
y(this, un, A ? M : null);
|
|
639
|
+
/** @type {BoundaryProps} */
|
|
640
|
+
y(this, je);
|
|
641
|
+
/** @type {((anchor: Node) => void)} */
|
|
642
|
+
y(this, pt);
|
|
643
|
+
/** @type {Effect} */
|
|
644
|
+
y(this, Ce);
|
|
645
|
+
/** @type {Effect | null} */
|
|
646
|
+
y(this, Me, null);
|
|
647
|
+
/** @type {Effect | null} */
|
|
648
|
+
y(this, ie, null);
|
|
649
|
+
/** @type {Effect | null} */
|
|
650
|
+
y(this, Ae, null);
|
|
651
|
+
/** @type {DocumentFragment | null} */
|
|
652
|
+
y(this, Ve, null);
|
|
653
|
+
y(this, ht, 0);
|
|
654
|
+
y(this, Qe, 0);
|
|
655
|
+
y(this, Nt, !1);
|
|
656
|
+
/** @type {Set<Effect>} */
|
|
657
|
+
y(this, Ot, /* @__PURE__ */ new Set());
|
|
658
|
+
/** @type {Set<Effect>} */
|
|
659
|
+
y(this, Lt, /* @__PURE__ */ new Set());
|
|
660
|
+
/**
|
|
661
|
+
* A source containing the number of pending async deriveds/expressions.
|
|
662
|
+
* Only created if `$effect.pending()` is used inside the boundary,
|
|
663
|
+
* otherwise updating the source results in needless `Batch.ensure()`
|
|
664
|
+
* calls followed by no-op flushes
|
|
665
|
+
* @type {Source<number> | null}
|
|
666
|
+
*/
|
|
667
|
+
y(this, qe, null);
|
|
668
|
+
y(this, Dn, $o(() => (w(this, qe, wt(u(this, ht))), () => {
|
|
669
|
+
w(this, qe, null);
|
|
670
|
+
})));
|
|
671
|
+
w(this, de, t), w(this, je, n), w(this, pt, (i) => {
|
|
672
|
+
var s = (
|
|
673
|
+
/** @type {Effect} */
|
|
674
|
+
C
|
|
675
|
+
);
|
|
676
|
+
s.b = this, s.f |= dr, r(i);
|
|
677
|
+
}), this.parent = /** @type {Effect} */
|
|
678
|
+
C.b, w(this, Ce, Lr(() => {
|
|
679
|
+
if (A) {
|
|
680
|
+
const i = (
|
|
681
|
+
/** @type {Comment} */
|
|
682
|
+
u(this, un)
|
|
683
|
+
);
|
|
684
|
+
Vn(), i.data === Pn ? J(this, G, Ii).call(this) : J(this, G, Ai).call(this);
|
|
685
|
+
} else
|
|
686
|
+
J(this, G, gr).call(this);
|
|
687
|
+
}, xo)), A && w(this, de, M);
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Defer an effect inside a pending boundary until the boundary resolves
|
|
691
|
+
* @param {Effect} effect
|
|
692
|
+
*/
|
|
693
|
+
defer_effect(t) {
|
|
694
|
+
Ei(t, u(this, Ot), u(this, Lt));
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
698
|
+
* @returns {boolean}
|
|
699
|
+
*/
|
|
700
|
+
is_rendered() {
|
|
701
|
+
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
702
|
+
}
|
|
703
|
+
has_pending_snippet() {
|
|
704
|
+
return !!u(this, je).pending;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
708
|
+
* and controls when the current `pending` snippet (if any) is removed.
|
|
709
|
+
* Do not call from inside the class
|
|
710
|
+
* @param {1 | -1} d
|
|
711
|
+
*/
|
|
712
|
+
update_pending_count(t) {
|
|
713
|
+
J(this, G, mr).call(this, t), w(this, ht, u(this, ht) + t), !(!u(this, qe) || u(this, Nt)) && (w(this, Nt, !0), kt(() => {
|
|
714
|
+
w(this, Nt, !1), u(this, qe) && Yt(u(this, qe), u(this, ht));
|
|
715
|
+
}));
|
|
716
|
+
}
|
|
717
|
+
get_effect_pending() {
|
|
718
|
+
return u(this, Dn).call(this), v(
|
|
719
|
+
/** @type {Source<number>} */
|
|
720
|
+
u(this, qe)
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
/** @param {unknown} error */
|
|
724
|
+
error(t) {
|
|
725
|
+
var n = u(this, je).onerror;
|
|
726
|
+
let r = u(this, je).failed;
|
|
727
|
+
if (!n && !r)
|
|
728
|
+
throw t;
|
|
729
|
+
u(this, Me) && (Z(u(this, Me)), w(this, Me, null)), u(this, ie) && (Z(u(this, ie)), w(this, ie, null)), u(this, Ae) && (Z(u(this, Ae)), w(this, Ae, null)), A && (le(
|
|
730
|
+
/** @type {TemplateNode} */
|
|
731
|
+
u(this, un)
|
|
732
|
+
), _o(), le(Ln()));
|
|
733
|
+
var i = !1, s = !1;
|
|
734
|
+
const o = () => {
|
|
735
|
+
if (i) {
|
|
736
|
+
ho();
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
i = !0, s && po(), u(this, Ae) !== null && gt(u(this, Ae), () => {
|
|
740
|
+
w(this, Ae, null);
|
|
741
|
+
}), J(this, G, An).call(this, () => {
|
|
742
|
+
We.ensure(), J(this, G, gr).call(this);
|
|
743
|
+
});
|
|
744
|
+
};
|
|
745
|
+
kt(() => {
|
|
746
|
+
try {
|
|
747
|
+
s = !0, n?.(t, o), s = !1;
|
|
748
|
+
} catch (l) {
|
|
749
|
+
Ht(l, u(this, Ce) && u(this, Ce).parent);
|
|
750
|
+
}
|
|
751
|
+
r && w(this, Ae, J(this, G, An).call(this, () => {
|
|
752
|
+
We.ensure();
|
|
753
|
+
try {
|
|
754
|
+
return be(() => {
|
|
755
|
+
var l = (
|
|
756
|
+
/** @type {Effect} */
|
|
757
|
+
C
|
|
758
|
+
);
|
|
759
|
+
l.b = this, l.f |= dr, r(
|
|
760
|
+
u(this, de),
|
|
761
|
+
() => t,
|
|
762
|
+
() => o
|
|
763
|
+
);
|
|
764
|
+
});
|
|
765
|
+
} catch (l) {
|
|
766
|
+
return Ht(
|
|
767
|
+
l,
|
|
768
|
+
/** @type {Effect} */
|
|
769
|
+
u(this, Ce).parent
|
|
770
|
+
), null;
|
|
771
|
+
}
|
|
772
|
+
}));
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
de = new WeakMap(), un = new WeakMap(), je = new WeakMap(), pt = new WeakMap(), Ce = new WeakMap(), Me = new WeakMap(), ie = new WeakMap(), Ae = new WeakMap(), Ve = new WeakMap(), ht = new WeakMap(), Qe = new WeakMap(), Nt = new WeakMap(), Ot = new WeakMap(), Lt = new WeakMap(), qe = new WeakMap(), Dn = new WeakMap(), G = new WeakSet(), Ai = function() {
|
|
777
|
+
try {
|
|
778
|
+
w(this, Me, be(() => u(this, pt).call(this, u(this, de))));
|
|
779
|
+
} catch (t) {
|
|
780
|
+
this.error(t);
|
|
781
|
+
}
|
|
782
|
+
}, Ii = function() {
|
|
783
|
+
const t = u(this, je).pending;
|
|
784
|
+
t && (this.is_pending = !0, w(this, ie, be(() => t(u(this, de)))), kt(() => {
|
|
785
|
+
var n = w(this, Ve, document.createDocumentFragment()), r = Ee();
|
|
786
|
+
n.append(r), w(this, Me, J(this, G, An).call(this, () => (We.ensure(), be(() => u(this, pt).call(this, r))))), u(this, Qe) === 0 && (u(this, de).before(n), w(this, Ve, null), gt(
|
|
787
|
+
/** @type {Effect} */
|
|
788
|
+
u(this, ie),
|
|
789
|
+
() => {
|
|
790
|
+
w(this, ie, null);
|
|
791
|
+
}
|
|
792
|
+
), this.is_pending = !1);
|
|
793
|
+
}));
|
|
794
|
+
}, gr = function() {
|
|
795
|
+
try {
|
|
796
|
+
if (this.is_pending = this.has_pending_snippet(), w(this, Qe, 0), w(this, ht, 0), w(this, Me, be(() => {
|
|
797
|
+
u(this, pt).call(this, u(this, de));
|
|
798
|
+
})), u(this, Qe) > 0) {
|
|
799
|
+
var t = w(this, Ve, document.createDocumentFragment());
|
|
800
|
+
Ji(u(this, Me), t);
|
|
801
|
+
const n = (
|
|
802
|
+
/** @type {(anchor: Node) => void} */
|
|
803
|
+
u(this, je).pending
|
|
804
|
+
);
|
|
805
|
+
w(this, ie, be(() => n(u(this, de))));
|
|
806
|
+
} else
|
|
807
|
+
this.is_pending = !1;
|
|
808
|
+
} catch (n) {
|
|
809
|
+
this.error(n);
|
|
810
|
+
}
|
|
811
|
+
}, /**
|
|
812
|
+
* @template T
|
|
813
|
+
* @param {() => T} fn
|
|
814
|
+
*/
|
|
815
|
+
An = function(t) {
|
|
816
|
+
var n = C, r = $, i = Q;
|
|
817
|
+
Re(u(this, Ce)), _e(u(this, Ce)), zt(u(this, Ce).ctx);
|
|
818
|
+
try {
|
|
819
|
+
return t();
|
|
820
|
+
} catch (s) {
|
|
821
|
+
return $i(s), null;
|
|
822
|
+
} finally {
|
|
823
|
+
Re(n), _e(r), zt(i);
|
|
824
|
+
}
|
|
825
|
+
}, /**
|
|
826
|
+
* Updates the pending count associated with the currently visible pending snippet,
|
|
827
|
+
* if any, such that we can replace the snippet with content once work is done
|
|
828
|
+
* @param {1 | -1} d
|
|
829
|
+
*/
|
|
830
|
+
mr = function(t) {
|
|
831
|
+
var n;
|
|
832
|
+
if (!this.has_pending_snippet()) {
|
|
833
|
+
this.parent && J(n = this.parent, G, mr).call(n, t);
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
if (w(this, Qe, u(this, Qe) + t), u(this, Qe) === 0) {
|
|
837
|
+
this.is_pending = !1;
|
|
838
|
+
for (const r of u(this, Ot))
|
|
839
|
+
D(r, X), ye(r);
|
|
840
|
+
for (const r of u(this, Lt))
|
|
841
|
+
D(r, xe), ye(r);
|
|
842
|
+
u(this, Ot).clear(), u(this, Lt).clear(), u(this, ie) && gt(u(this, ie), () => {
|
|
843
|
+
w(this, ie, null);
|
|
844
|
+
}), u(this, Ve) && (u(this, de).before(u(this, Ve)), w(this, Ve, null));
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
function To(e, t, n, r) {
|
|
848
|
+
const i = Bn;
|
|
849
|
+
var s = e.filter((h) => !h.settled);
|
|
850
|
+
if (n.length === 0 && s.length === 0) {
|
|
851
|
+
r(t.map(i));
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
var o = N, l = (
|
|
855
|
+
/** @type {Effect} */
|
|
856
|
+
C
|
|
857
|
+
), a = ko(), f = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((h) => h.promise)) : null;
|
|
858
|
+
function c(h) {
|
|
859
|
+
a();
|
|
860
|
+
try {
|
|
861
|
+
r(h);
|
|
862
|
+
} catch (g) {
|
|
863
|
+
(l.f & Ue) === 0 && Ht(g, l);
|
|
864
|
+
}
|
|
865
|
+
o?.deactivate(), br();
|
|
866
|
+
}
|
|
867
|
+
if (n.length === 0) {
|
|
868
|
+
f.then(() => c(t.map(i)));
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
function _() {
|
|
872
|
+
a(), Promise.all(n.map((h) => /* @__PURE__ */ Co(h))).then((h) => c([...t.map(i), ...h])).catch((h) => Ht(h, l));
|
|
873
|
+
}
|
|
874
|
+
f ? f.then(_) : _();
|
|
875
|
+
}
|
|
876
|
+
function ko() {
|
|
877
|
+
var e = C, t = $, n = Q, r = N;
|
|
878
|
+
return function(s = !0) {
|
|
879
|
+
Re(e), _e(t), zt(n), s && r?.activate();
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
function br() {
|
|
883
|
+
Re(null), _e(null), zt(null);
|
|
884
|
+
}
|
|
885
|
+
// @__NO_SIDE_EFFECTS__
|
|
886
|
+
function Bn(e) {
|
|
887
|
+
var t = B | X, n = $ !== null && ($.f & B) !== 0 ? (
|
|
888
|
+
/** @type {Derived} */
|
|
889
|
+
$
|
|
890
|
+
) : null;
|
|
891
|
+
return C !== null && (C.f |= yt), {
|
|
892
|
+
ctx: Q,
|
|
893
|
+
deps: null,
|
|
894
|
+
effects: null,
|
|
895
|
+
equals: _i,
|
|
896
|
+
f: t,
|
|
897
|
+
fn: e,
|
|
898
|
+
reactions: null,
|
|
899
|
+
rv: 0,
|
|
900
|
+
v: (
|
|
901
|
+
/** @type {V} */
|
|
902
|
+
q
|
|
903
|
+
),
|
|
904
|
+
wv: 0,
|
|
905
|
+
parent: n ?? C,
|
|
906
|
+
ac: null
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
// @__NO_SIDE_EFFECTS__
|
|
910
|
+
function Co(e, t, n) {
|
|
911
|
+
let r = (
|
|
912
|
+
/** @type {Effect | null} */
|
|
913
|
+
C
|
|
914
|
+
);
|
|
915
|
+
r === null && ro();
|
|
916
|
+
var i = (
|
|
917
|
+
/** @type {Boundary} */
|
|
918
|
+
r.b
|
|
919
|
+
), s = (
|
|
920
|
+
/** @type {Promise<V>} */
|
|
921
|
+
/** @type {unknown} */
|
|
922
|
+
void 0
|
|
923
|
+
), o = wt(
|
|
924
|
+
/** @type {V} */
|
|
925
|
+
q
|
|
926
|
+
), l = !$, a = /* @__PURE__ */ new Map();
|
|
927
|
+
return Ho(() => {
|
|
928
|
+
var f = di();
|
|
929
|
+
s = f.promise;
|
|
930
|
+
try {
|
|
931
|
+
Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
|
|
932
|
+
c === N && c.committed && c.deactivate(), br();
|
|
933
|
+
});
|
|
934
|
+
} catch (g) {
|
|
935
|
+
f.reject(g), br();
|
|
936
|
+
}
|
|
937
|
+
var c = (
|
|
938
|
+
/** @type {Batch} */
|
|
939
|
+
N
|
|
940
|
+
);
|
|
941
|
+
if (l) {
|
|
942
|
+
var _ = i.is_rendered();
|
|
943
|
+
i.update_pending_count(1), c.increment(_), a.get(c)?.reject(at), a.delete(c), a.set(c, f);
|
|
944
|
+
}
|
|
945
|
+
const h = (g, d = void 0) => {
|
|
946
|
+
if (c.activate(), d)
|
|
947
|
+
d !== at && (o.f |= tt, Yt(o, d));
|
|
948
|
+
else {
|
|
949
|
+
(o.f & tt) !== 0 && (o.f ^= tt), Yt(o, g);
|
|
950
|
+
for (const [b, x] of a) {
|
|
951
|
+
if (a.delete(b), b === c) break;
|
|
952
|
+
x.reject(at);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
l && (i.update_pending_count(-1), c.decrement(_));
|
|
956
|
+
};
|
|
957
|
+
f.promise.then(h, (g) => h(null, g || "unknown"));
|
|
958
|
+
}), Do(() => {
|
|
959
|
+
for (const f of a.values())
|
|
960
|
+
f.reject(at);
|
|
961
|
+
}), new Promise((f) => {
|
|
962
|
+
function c(_) {
|
|
963
|
+
function h() {
|
|
964
|
+
_ === s ? f(o) : c(s);
|
|
965
|
+
}
|
|
966
|
+
_.then(h, h);
|
|
967
|
+
}
|
|
968
|
+
c(s);
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
// @__NO_SIDE_EFFECTS__
|
|
972
|
+
function kn(e) {
|
|
973
|
+
const t = /* @__PURE__ */ Bn(e);
|
|
974
|
+
return Ki(t), t;
|
|
975
|
+
}
|
|
976
|
+
// @__NO_SIDE_EFFECTS__
|
|
977
|
+
function Mo(e) {
|
|
978
|
+
const t = /* @__PURE__ */ Bn(e);
|
|
979
|
+
return t.equals = gi, t;
|
|
980
|
+
}
|
|
981
|
+
function Ao(e) {
|
|
982
|
+
var t = e.effects;
|
|
983
|
+
if (t !== null) {
|
|
984
|
+
e.effects = null;
|
|
985
|
+
for (var n = 0; n < t.length; n += 1)
|
|
986
|
+
Z(
|
|
987
|
+
/** @type {Effect} */
|
|
988
|
+
t[n]
|
|
989
|
+
);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
function Io(e) {
|
|
993
|
+
for (var t = e.parent; t !== null; ) {
|
|
994
|
+
if ((t.f & B) === 0)
|
|
995
|
+
return (t.f & Ue) === 0 ? (
|
|
996
|
+
/** @type {Effect} */
|
|
997
|
+
t
|
|
998
|
+
) : null;
|
|
999
|
+
t = t.parent;
|
|
1000
|
+
}
|
|
1001
|
+
return null;
|
|
1002
|
+
}
|
|
1003
|
+
function Ir(e) {
|
|
1004
|
+
var t, n = C;
|
|
1005
|
+
Re(Io(e));
|
|
1006
|
+
try {
|
|
1007
|
+
e.f &= ~bt, Ao(e), t = ts(e);
|
|
1008
|
+
} finally {
|
|
1009
|
+
Re(n);
|
|
1010
|
+
}
|
|
1011
|
+
return t;
|
|
1012
|
+
}
|
|
1013
|
+
function Ri(e) {
|
|
1014
|
+
var t = Ir(e);
|
|
1015
|
+
if (!e.equals(t) && (e.wv = Qi(), (!N?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
1016
|
+
D(e, Y);
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
rt || (we !== null ? (Or() || N?.is_fork) && we.set(e, t) : Ar(e));
|
|
1020
|
+
}
|
|
1021
|
+
function Ro(e) {
|
|
1022
|
+
if (e.effects !== null)
|
|
1023
|
+
for (const t of e.effects)
|
|
1024
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(at), t.teardown = Ks, t.ac = null, on(t, 0), Dr(t));
|
|
1025
|
+
}
|
|
1026
|
+
function Ni(e) {
|
|
1027
|
+
if (e.effects !== null)
|
|
1028
|
+
for (const t of e.effects)
|
|
1029
|
+
t.teardown && Vt(t);
|
|
1030
|
+
}
|
|
1031
|
+
let wr = /* @__PURE__ */ new Set();
|
|
1032
|
+
const nt = /* @__PURE__ */ new Map();
|
|
1033
|
+
let Oi = !1;
|
|
1034
|
+
function wt(e, t) {
|
|
1035
|
+
var n = {
|
|
1036
|
+
f: 0,
|
|
1037
|
+
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1038
|
+
v: e,
|
|
1039
|
+
reactions: null,
|
|
1040
|
+
equals: _i,
|
|
1041
|
+
rv: 0,
|
|
1042
|
+
wv: 0
|
|
1043
|
+
};
|
|
1044
|
+
return n;
|
|
1045
|
+
}
|
|
1046
|
+
// @__NO_SIDE_EFFECTS__
|
|
1047
|
+
function H(e, t) {
|
|
1048
|
+
const n = wt(e);
|
|
1049
|
+
return Ki(n), n;
|
|
1050
|
+
}
|
|
1051
|
+
// @__NO_SIDE_EFFECTS__
|
|
1052
|
+
function Li(e, t = !1, n = !0) {
|
|
1053
|
+
const r = wt(e);
|
|
1054
|
+
return t || (r.equals = gi), r;
|
|
1055
|
+
}
|
|
1056
|
+
function I(e, t, n = !1) {
|
|
1057
|
+
$ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1058
|
+
// to ensure we error if state is set inside an inspect effect
|
|
1059
|
+
(!$e || ($.f & Kr) !== 0) && wi() && ($.f & (B | Ge | Cr | Kr)) !== 0 && (he === null || !Ft.call(he, e)) && vo();
|
|
1060
|
+
let r = n ? St(t) : t;
|
|
1061
|
+
return Yt(e, r);
|
|
1062
|
+
}
|
|
1063
|
+
function Yt(e, t) {
|
|
1064
|
+
if (!e.equals(t)) {
|
|
1065
|
+
var n = e.v;
|
|
1066
|
+
rt ? nt.set(e, t) : nt.set(e, n), e.v = t;
|
|
1067
|
+
var r = We.ensure();
|
|
1068
|
+
if (r.capture(e, n), (e.f & B) !== 0) {
|
|
1069
|
+
const i = (
|
|
1070
|
+
/** @type {Derived} */
|
|
1071
|
+
e
|
|
1072
|
+
);
|
|
1073
|
+
(e.f & X) !== 0 && Ir(i), Ar(i);
|
|
1074
|
+
}
|
|
1075
|
+
e.wv = Qi(), Di(e, X), C !== null && (C.f & Y) !== 0 && (C.f & (Se | it)) === 0 && (ce === null ? Vo([e]) : ce.push(e)), !r.is_fork && wr.size > 0 && !Oi && No();
|
|
1076
|
+
}
|
|
1077
|
+
return t;
|
|
1078
|
+
}
|
|
1079
|
+
function No() {
|
|
1080
|
+
Oi = !1;
|
|
1081
|
+
for (const e of wr)
|
|
1082
|
+
(e.f & Y) !== 0 && D(e, xe), vn(e) && Vt(e);
|
|
1083
|
+
wr.clear();
|
|
1084
|
+
}
|
|
1085
|
+
function rn(e) {
|
|
1086
|
+
I(e, e.v + 1);
|
|
1087
|
+
}
|
|
1088
|
+
function Di(e, t) {
|
|
1089
|
+
var n = e.reactions;
|
|
1090
|
+
if (n !== null)
|
|
1091
|
+
for (var r = n.length, i = 0; i < r; i++) {
|
|
1092
|
+
var s = n[i], o = s.f, l = (o & X) === 0;
|
|
1093
|
+
if (l && D(s, t), (o & B) !== 0) {
|
|
1094
|
+
var a = (
|
|
1095
|
+
/** @type {Derived} */
|
|
1096
|
+
s
|
|
1097
|
+
);
|
|
1098
|
+
we?.delete(a), (o & bt) === 0 && (o & pe && (s.f |= bt), Di(a, xe));
|
|
1099
|
+
} else l && ((o & Ge) !== 0 && He !== null && He.add(
|
|
1100
|
+
/** @type {Effect} */
|
|
1101
|
+
s
|
|
1102
|
+
), ye(
|
|
1103
|
+
/** @type {Effect} */
|
|
1104
|
+
s
|
|
1105
|
+
));
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
function St(e) {
|
|
1109
|
+
if (typeof e != "object" || e === null || ar in e)
|
|
1110
|
+
return e;
|
|
1111
|
+
const t = ci(e);
|
|
1112
|
+
if (t !== Gs && t !== Js)
|
|
1113
|
+
return e;
|
|
1114
|
+
var n = /* @__PURE__ */ new Map(), r = kr(e), i = /* @__PURE__ */ H(0), s = mt, o = (l) => {
|
|
1115
|
+
if (mt === s)
|
|
1116
|
+
return l();
|
|
1117
|
+
var a = $, f = mt;
|
|
1118
|
+
_e(null), ni(s);
|
|
1119
|
+
var c = l();
|
|
1120
|
+
return _e(a), ni(f), c;
|
|
1121
|
+
};
|
|
1122
|
+
return r && n.set("length", /* @__PURE__ */ H(
|
|
1123
|
+
/** @type {any[]} */
|
|
1124
|
+
e.length
|
|
1125
|
+
)), new Proxy(
|
|
1126
|
+
/** @type {any} */
|
|
1127
|
+
e,
|
|
1128
|
+
{
|
|
1129
|
+
defineProperty(l, a, f) {
|
|
1130
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && fo();
|
|
1131
|
+
var c = n.get(a);
|
|
1132
|
+
return c === void 0 ? o(() => {
|
|
1133
|
+
var _ = /* @__PURE__ */ H(f.value);
|
|
1134
|
+
return n.set(a, _), _;
|
|
1135
|
+
}) : I(c, f.value, !0), !0;
|
|
1136
|
+
},
|
|
1137
|
+
deleteProperty(l, a) {
|
|
1138
|
+
var f = n.get(a);
|
|
1139
|
+
if (f === void 0) {
|
|
1140
|
+
if (a in l) {
|
|
1141
|
+
const c = o(() => /* @__PURE__ */ H(q));
|
|
1142
|
+
n.set(a, c), rn(i);
|
|
1143
|
+
}
|
|
1144
|
+
} else
|
|
1145
|
+
I(f, q), rn(i);
|
|
1146
|
+
return !0;
|
|
1147
|
+
},
|
|
1148
|
+
get(l, a, f) {
|
|
1149
|
+
if (a === ar)
|
|
1150
|
+
return e;
|
|
1151
|
+
var c = n.get(a), _ = a in l;
|
|
1152
|
+
if (c === void 0 && (!_ || Tt(l, a)?.writable) && (c = o(() => {
|
|
1153
|
+
var g = St(_ ? l[a] : q), d = /* @__PURE__ */ H(g);
|
|
1154
|
+
return d;
|
|
1155
|
+
}), n.set(a, c)), c !== void 0) {
|
|
1156
|
+
var h = v(c);
|
|
1157
|
+
return h === q ? void 0 : h;
|
|
1158
|
+
}
|
|
1159
|
+
return Reflect.get(l, a, f);
|
|
1160
|
+
},
|
|
1161
|
+
getOwnPropertyDescriptor(l, a) {
|
|
1162
|
+
var f = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1163
|
+
if (f && "value" in f) {
|
|
1164
|
+
var c = n.get(a);
|
|
1165
|
+
c && (f.value = v(c));
|
|
1166
|
+
} else if (f === void 0) {
|
|
1167
|
+
var _ = n.get(a), h = _?.v;
|
|
1168
|
+
if (_ !== void 0 && h !== q)
|
|
1169
|
+
return {
|
|
1170
|
+
enumerable: !0,
|
|
1171
|
+
configurable: !0,
|
|
1172
|
+
value: h,
|
|
1173
|
+
writable: !0
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
return f;
|
|
1177
|
+
},
|
|
1178
|
+
has(l, a) {
|
|
1179
|
+
if (a === ar)
|
|
1180
|
+
return !0;
|
|
1181
|
+
var f = n.get(a), c = f !== void 0 && f.v !== q || Reflect.has(l, a);
|
|
1182
|
+
if (f !== void 0 || C !== null && (!c || Tt(l, a)?.writable)) {
|
|
1183
|
+
f === void 0 && (f = o(() => {
|
|
1184
|
+
var h = c ? St(l[a]) : q, g = /* @__PURE__ */ H(h);
|
|
1185
|
+
return g;
|
|
1186
|
+
}), n.set(a, f));
|
|
1187
|
+
var _ = v(f);
|
|
1188
|
+
if (_ === q)
|
|
1189
|
+
return !1;
|
|
1190
|
+
}
|
|
1191
|
+
return c;
|
|
1192
|
+
},
|
|
1193
|
+
set(l, a, f, c) {
|
|
1194
|
+
var _ = n.get(a), h = a in l;
|
|
1195
|
+
if (r && a === "length")
|
|
1196
|
+
for (var g = f; g < /** @type {Source<number>} */
|
|
1197
|
+
_.v; g += 1) {
|
|
1198
|
+
var d = n.get(g + "");
|
|
1199
|
+
d !== void 0 ? I(d, q) : g in l && (d = o(() => /* @__PURE__ */ H(q)), n.set(g + "", d));
|
|
1200
|
+
}
|
|
1201
|
+
if (_ === void 0)
|
|
1202
|
+
(!h || Tt(l, a)?.writable) && (_ = o(() => /* @__PURE__ */ H(void 0)), I(_, St(f)), n.set(a, _));
|
|
1203
|
+
else {
|
|
1204
|
+
h = _.v !== q;
|
|
1205
|
+
var b = o(() => St(f));
|
|
1206
|
+
I(_, b);
|
|
1207
|
+
}
|
|
1208
|
+
var x = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1209
|
+
if (x?.set && x.set.call(c, f), !h) {
|
|
1210
|
+
if (r && typeof a == "string") {
|
|
1211
|
+
var U = (
|
|
1212
|
+
/** @type {Source<number>} */
|
|
1213
|
+
n.get("length")
|
|
1214
|
+
), R = Number(a);
|
|
1215
|
+
Number.isInteger(R) && R >= U.v && I(U, R + 1);
|
|
1216
|
+
}
|
|
1217
|
+
rn(i);
|
|
1218
|
+
}
|
|
1219
|
+
return !0;
|
|
1220
|
+
},
|
|
1221
|
+
ownKeys(l) {
|
|
1222
|
+
v(i);
|
|
1223
|
+
var a = Reflect.ownKeys(l).filter((_) => {
|
|
1224
|
+
var h = n.get(_);
|
|
1225
|
+
return h === void 0 || h.v !== q;
|
|
1226
|
+
});
|
|
1227
|
+
for (var [f, c] of n)
|
|
1228
|
+
c.v !== q && !(f in l) && a.push(f);
|
|
1229
|
+
return a;
|
|
1230
|
+
},
|
|
1231
|
+
setPrototypeOf() {
|
|
1232
|
+
co();
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
var Qr, Fi, Pi, zi;
|
|
1238
|
+
function yr() {
|
|
1239
|
+
if (Qr === void 0) {
|
|
1240
|
+
Qr = window, Fi = /Firefox/.test(navigator.userAgent);
|
|
1241
|
+
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1242
|
+
Pi = Tt(t, "firstChild").get, zi = Tt(t, "nextSibling").get, Jr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Jr(n) && (n.__t = void 0);
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
function Ee(e = "") {
|
|
1246
|
+
return document.createTextNode(e);
|
|
1247
|
+
}
|
|
1248
|
+
// @__NO_SIDE_EFFECTS__
|
|
1249
|
+
function jt(e) {
|
|
1250
|
+
return (
|
|
1251
|
+
/** @type {TemplateNode | null} */
|
|
1252
|
+
Pi.call(e)
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
// @__NO_SIDE_EFFECTS__
|
|
1256
|
+
function Oe(e) {
|
|
1257
|
+
return (
|
|
1258
|
+
/** @type {TemplateNode | null} */
|
|
1259
|
+
zi.call(e)
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
function k(e, t) {
|
|
1263
|
+
if (!A)
|
|
1264
|
+
return /* @__PURE__ */ jt(e);
|
|
1265
|
+
var n = /* @__PURE__ */ jt(M);
|
|
1266
|
+
if (n === null)
|
|
1267
|
+
n = M.appendChild(Ee());
|
|
1268
|
+
else if (t && n.nodeType !== Yn) {
|
|
1269
|
+
var r = Ee();
|
|
1270
|
+
return n?.before(r), le(r), r;
|
|
1271
|
+
}
|
|
1272
|
+
return t && Nr(
|
|
1273
|
+
/** @type {Text} */
|
|
1274
|
+
n
|
|
1275
|
+
), le(n), n;
|
|
1276
|
+
}
|
|
1277
|
+
function ei(e, t = !1) {
|
|
1278
|
+
if (!A) {
|
|
1279
|
+
var n = /* @__PURE__ */ jt(e);
|
|
1280
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Oe(n) : n;
|
|
1281
|
+
}
|
|
1282
|
+
if (t) {
|
|
1283
|
+
if (M?.nodeType !== Yn) {
|
|
1284
|
+
var r = Ee();
|
|
1285
|
+
return M?.before(r), le(r), r;
|
|
1286
|
+
}
|
|
1287
|
+
Nr(
|
|
1288
|
+
/** @type {Text} */
|
|
1289
|
+
M
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
return M;
|
|
1293
|
+
}
|
|
1294
|
+
function E(e, t = 1, n = !1) {
|
|
1295
|
+
let r = A ? M : e;
|
|
1296
|
+
for (var i; t--; )
|
|
1297
|
+
i = r, r = /** @type {TemplateNode} */
|
|
1298
|
+
/* @__PURE__ */ Oe(r);
|
|
1299
|
+
if (!A)
|
|
1300
|
+
return r;
|
|
1301
|
+
if (n) {
|
|
1302
|
+
if (r?.nodeType !== Yn) {
|
|
1303
|
+
var s = Ee();
|
|
1304
|
+
return r === null ? i?.after(s) : r.before(s), le(s), s;
|
|
1305
|
+
}
|
|
1306
|
+
Nr(
|
|
1307
|
+
/** @type {Text} */
|
|
1308
|
+
r
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
return le(r), r;
|
|
1312
|
+
}
|
|
1313
|
+
function Hi(e) {
|
|
1314
|
+
e.textContent = "";
|
|
1315
|
+
}
|
|
1316
|
+
function Yi() {
|
|
1317
|
+
return !1;
|
|
1318
|
+
}
|
|
1319
|
+
function Rr(e, t, n) {
|
|
1320
|
+
return (
|
|
1321
|
+
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1322
|
+
document.createElementNS(fi, e, void 0)
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
function Nr(e) {
|
|
1326
|
+
if (
|
|
1327
|
+
/** @type {string} */
|
|
1328
|
+
e.nodeValue.length < 65536
|
|
1329
|
+
)
|
|
1330
|
+
return;
|
|
1331
|
+
let t = e.nextSibling;
|
|
1332
|
+
for (; t !== null && t.nodeType === Yn; )
|
|
1333
|
+
t.remove(), e.nodeValue += /** @type {string} */
|
|
1334
|
+
t.nodeValue, t = e.nextSibling;
|
|
1335
|
+
}
|
|
1336
|
+
function ji(e) {
|
|
1337
|
+
var t = $, n = C;
|
|
1338
|
+
_e(null), Re(null);
|
|
1339
|
+
try {
|
|
1340
|
+
return e();
|
|
1341
|
+
} finally {
|
|
1342
|
+
_e(t), Re(n);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
function Oo(e) {
|
|
1346
|
+
C === null && ($ === null && lo(), oo()), rt && so();
|
|
1347
|
+
}
|
|
1348
|
+
function Lo(e, t) {
|
|
1349
|
+
var n = t.last;
|
|
1350
|
+
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1351
|
+
}
|
|
1352
|
+
function Le(e, t, n) {
|
|
1353
|
+
var r = C;
|
|
1354
|
+
r !== null && (r.f & oe) !== 0 && (e |= oe);
|
|
1355
|
+
var i = {
|
|
1356
|
+
ctx: Q,
|
|
1357
|
+
deps: null,
|
|
1358
|
+
nodes: null,
|
|
1359
|
+
f: e | X | pe,
|
|
1360
|
+
first: null,
|
|
1361
|
+
fn: t,
|
|
1362
|
+
last: null,
|
|
1363
|
+
next: null,
|
|
1364
|
+
parent: r,
|
|
1365
|
+
b: r && r.b,
|
|
1366
|
+
prev: null,
|
|
1367
|
+
teardown: null,
|
|
1368
|
+
wv: 0,
|
|
1369
|
+
ac: null
|
|
1370
|
+
};
|
|
1371
|
+
if (n)
|
|
1372
|
+
try {
|
|
1373
|
+
Vt(i);
|
|
1374
|
+
} catch (l) {
|
|
1375
|
+
throw Z(i), l;
|
|
1376
|
+
}
|
|
1377
|
+
else t !== null && ye(i);
|
|
1378
|
+
var s = i;
|
|
1379
|
+
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1380
|
+
(s.f & yt) === 0 && (s = s.first, (e & Ge) !== 0 && (e & Pt) !== 0 && s !== null && (s.f |= Pt)), s !== null && (s.parent = r, r !== null && Lo(s, r), $ !== null && ($.f & B) !== 0 && (e & it) === 0)) {
|
|
1381
|
+
var o = (
|
|
1382
|
+
/** @type {Derived} */
|
|
1383
|
+
$
|
|
1384
|
+
);
|
|
1385
|
+
(o.effects ?? (o.effects = [])).push(s);
|
|
1386
|
+
}
|
|
1387
|
+
return i;
|
|
1388
|
+
}
|
|
1389
|
+
function Or() {
|
|
1390
|
+
return $ !== null && !$e;
|
|
1391
|
+
}
|
|
1392
|
+
function Do(e) {
|
|
1393
|
+
const t = Le(Hn, null, !1);
|
|
1394
|
+
return D(t, Y), t.teardown = e, t;
|
|
1395
|
+
}
|
|
1396
|
+
function Vi(e) {
|
|
1397
|
+
Oo();
|
|
1398
|
+
var t = (
|
|
1399
|
+
/** @type {Effect} */
|
|
1400
|
+
C.f
|
|
1401
|
+
), n = !$ && (t & Se) !== 0 && (t & qt) === 0;
|
|
1402
|
+
if (n) {
|
|
1403
|
+
var r = (
|
|
1404
|
+
/** @type {ComponentContext} */
|
|
1405
|
+
Q
|
|
1406
|
+
);
|
|
1407
|
+
(r.e ?? (r.e = [])).push(e);
|
|
1408
|
+
} else
|
|
1409
|
+
return qi(e);
|
|
1410
|
+
}
|
|
1411
|
+
function qi(e) {
|
|
1412
|
+
return Le(sn | Qs, e, !1);
|
|
1413
|
+
}
|
|
1414
|
+
function Fo(e) {
|
|
1415
|
+
We.ensure();
|
|
1416
|
+
const t = Le(it | yt, e, !0);
|
|
1417
|
+
return () => {
|
|
1418
|
+
Z(t);
|
|
1419
|
+
};
|
|
1420
|
+
}
|
|
1421
|
+
function Po(e) {
|
|
1422
|
+
We.ensure();
|
|
1423
|
+
const t = Le(it | yt, e, !0);
|
|
1424
|
+
return (n = {}) => new Promise((r) => {
|
|
1425
|
+
n.outro ? gt(t, () => {
|
|
1426
|
+
Z(t), r(void 0);
|
|
1427
|
+
}) : (Z(t), r(void 0));
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
function zo(e) {
|
|
1431
|
+
return Le(sn, e, !1);
|
|
1432
|
+
}
|
|
1433
|
+
function Ho(e) {
|
|
1434
|
+
return Le(Cr | yt, e, !0);
|
|
1435
|
+
}
|
|
1436
|
+
function Bi(e, t = 0) {
|
|
1437
|
+
return Le(Hn | t, e, !0);
|
|
1438
|
+
}
|
|
1439
|
+
function Ke(e, t = [], n = [], r = []) {
|
|
1440
|
+
To(r, t, n, (i) => {
|
|
1441
|
+
Le(Hn, () => e(...i.map(v)), !0);
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
function Lr(e, t = 0) {
|
|
1445
|
+
var n = Le(Ge | t, e, !0);
|
|
1446
|
+
return n;
|
|
1447
|
+
}
|
|
1448
|
+
function be(e) {
|
|
1449
|
+
return Le(Se | yt, e, !0);
|
|
1450
|
+
}
|
|
1451
|
+
function Xi(e) {
|
|
1452
|
+
var t = e.teardown;
|
|
1453
|
+
if (t !== null) {
|
|
1454
|
+
const n = rt, r = $;
|
|
1455
|
+
ti(!0), _e(null);
|
|
1456
|
+
try {
|
|
1457
|
+
t.call(null);
|
|
1458
|
+
} finally {
|
|
1459
|
+
ti(n), _e(r);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
function Dr(e, t = !1) {
|
|
1464
|
+
var n = e.first;
|
|
1465
|
+
for (e.first = e.last = null; n !== null; ) {
|
|
1466
|
+
const i = n.ac;
|
|
1467
|
+
i !== null && ji(() => {
|
|
1468
|
+
i.abort(at);
|
|
1469
|
+
});
|
|
1470
|
+
var r = n.next;
|
|
1471
|
+
(n.f & it) !== 0 ? n.parent = null : Z(n, t), n = r;
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
function Yo(e) {
|
|
1475
|
+
for (var t = e.first; t !== null; ) {
|
|
1476
|
+
var n = t.next;
|
|
1477
|
+
(t.f & Se) === 0 && Z(t), t = n;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
function Z(e, t = !0) {
|
|
1481
|
+
var n = !1;
|
|
1482
|
+
(t || (e.f & pi) !== 0) && e.nodes !== null && e.nodes.end !== null && (jo(
|
|
1483
|
+
e.nodes.start,
|
|
1484
|
+
/** @type {TemplateNode} */
|
|
1485
|
+
e.nodes.end
|
|
1486
|
+
), n = !0), Dr(e, t && !n), on(e, 0), D(e, Ue);
|
|
1487
|
+
var r = e.nodes && e.nodes.t;
|
|
1488
|
+
if (r !== null)
|
|
1489
|
+
for (const s of r)
|
|
1490
|
+
s.stop();
|
|
1491
|
+
Xi(e);
|
|
1492
|
+
var i = e.parent;
|
|
1493
|
+
i !== null && i.first !== null && Ui(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1494
|
+
}
|
|
1495
|
+
function jo(e, t) {
|
|
1496
|
+
for (; e !== null; ) {
|
|
1497
|
+
var n = e === t ? null : /* @__PURE__ */ Oe(e);
|
|
1498
|
+
e.remove(), e = n;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
function Ui(e) {
|
|
1502
|
+
var t = e.parent, n = e.prev, r = e.next;
|
|
1503
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1504
|
+
}
|
|
1505
|
+
function gt(e, t, n = !0) {
|
|
1506
|
+
var r = [];
|
|
1507
|
+
Wi(e, r, !0);
|
|
1508
|
+
var i = () => {
|
|
1509
|
+
n && Z(e), t && t();
|
|
1510
|
+
}, s = r.length;
|
|
1511
|
+
if (s > 0) {
|
|
1512
|
+
var o = () => --s || i();
|
|
1513
|
+
for (var l of r)
|
|
1514
|
+
l.out(o);
|
|
1515
|
+
} else
|
|
1516
|
+
i();
|
|
1517
|
+
}
|
|
1518
|
+
function Wi(e, t, n) {
|
|
1519
|
+
if ((e.f & oe) === 0) {
|
|
1520
|
+
e.f ^= oe;
|
|
1521
|
+
var r = e.nodes && e.nodes.t;
|
|
1522
|
+
if (r !== null)
|
|
1523
|
+
for (const l of r)
|
|
1524
|
+
(l.is_global || n) && t.push(l);
|
|
1525
|
+
for (var i = e.first; i !== null; ) {
|
|
1526
|
+
var s = i.next, o = (i.f & Pt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1527
|
+
// it means the parent block effect was pruned. In that case,
|
|
1528
|
+
// transparency information was transferred to the branch effect.
|
|
1529
|
+
(i.f & Se) !== 0 && (e.f & Ge) !== 0;
|
|
1530
|
+
Wi(i, t, o ? n : !1), i = s;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
function Fr(e) {
|
|
1535
|
+
Gi(e, !0);
|
|
1536
|
+
}
|
|
1537
|
+
function Gi(e, t) {
|
|
1538
|
+
if ((e.f & oe) !== 0) {
|
|
1539
|
+
e.f ^= oe, (e.f & Y) === 0 && (D(e, X), ye(e));
|
|
1540
|
+
for (var n = e.first; n !== null; ) {
|
|
1541
|
+
var r = n.next, i = (n.f & Pt) !== 0 || (n.f & Se) !== 0;
|
|
1542
|
+
Gi(n, i ? t : !1), n = r;
|
|
1543
|
+
}
|
|
1544
|
+
var s = e.nodes && e.nodes.t;
|
|
1545
|
+
if (s !== null)
|
|
1546
|
+
for (const o of s)
|
|
1547
|
+
(o.is_global || t) && o.in();
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
function Ji(e, t) {
|
|
1551
|
+
if (e.nodes)
|
|
1552
|
+
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1553
|
+
var i = n === r ? null : /* @__PURE__ */ Oe(n);
|
|
1554
|
+
t.append(n), n = i;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
let In = !1, rt = !1;
|
|
1558
|
+
function ti(e) {
|
|
1559
|
+
rt = e;
|
|
1560
|
+
}
|
|
1561
|
+
let $ = null, $e = !1;
|
|
1562
|
+
function _e(e) {
|
|
1563
|
+
$ = e;
|
|
1564
|
+
}
|
|
1565
|
+
let C = null;
|
|
1566
|
+
function Re(e) {
|
|
1567
|
+
C = e;
|
|
1568
|
+
}
|
|
1569
|
+
let he = null;
|
|
1570
|
+
function Ki(e) {
|
|
1571
|
+
$ !== null && (he === null ? he = [e] : he.push(e));
|
|
1572
|
+
}
|
|
1573
|
+
let ne = null, re = 0, ce = null;
|
|
1574
|
+
function Vo(e) {
|
|
1575
|
+
ce = e;
|
|
1576
|
+
}
|
|
1577
|
+
let Zi = 1, ft = 0, mt = ft;
|
|
1578
|
+
function ni(e) {
|
|
1579
|
+
mt = e;
|
|
1580
|
+
}
|
|
1581
|
+
function Qi() {
|
|
1582
|
+
return ++Zi;
|
|
1583
|
+
}
|
|
1584
|
+
function vn(e) {
|
|
1585
|
+
var t = e.f;
|
|
1586
|
+
if ((t & X) !== 0)
|
|
1587
|
+
return !0;
|
|
1588
|
+
if (t & B && (e.f &= ~bt), (t & xe) !== 0) {
|
|
1589
|
+
for (var n = (
|
|
1590
|
+
/** @type {Value[]} */
|
|
1591
|
+
e.deps
|
|
1592
|
+
), r = n.length, i = 0; i < r; i++) {
|
|
1593
|
+
var s = n[i];
|
|
1594
|
+
if (vn(
|
|
1595
|
+
/** @type {Derived} */
|
|
1596
|
+
s
|
|
1597
|
+
) && Ri(
|
|
1598
|
+
/** @type {Derived} */
|
|
1599
|
+
s
|
|
1600
|
+
), s.wv > e.wv)
|
|
1601
|
+
return !0;
|
|
1602
|
+
}
|
|
1603
|
+
(t & pe) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1604
|
+
// traversal of the graph in the other batches still happens
|
|
1605
|
+
we === null && D(e, Y);
|
|
1606
|
+
}
|
|
1607
|
+
return !1;
|
|
1608
|
+
}
|
|
1609
|
+
function es(e, t, n = !0) {
|
|
1610
|
+
var r = e.reactions;
|
|
1611
|
+
if (r !== null && !(he !== null && Ft.call(he, e)))
|
|
1612
|
+
for (var i = 0; i < r.length; i++) {
|
|
1613
|
+
var s = r[i];
|
|
1614
|
+
(s.f & B) !== 0 ? es(
|
|
1615
|
+
/** @type {Derived} */
|
|
1616
|
+
s,
|
|
1617
|
+
t,
|
|
1618
|
+
!1
|
|
1619
|
+
) : t === s && (n ? D(s, X) : (s.f & Y) !== 0 && D(s, xe), ye(
|
|
1620
|
+
/** @type {Effect} */
|
|
1621
|
+
s
|
|
1622
|
+
));
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
function ts(e) {
|
|
1626
|
+
var b;
|
|
1627
|
+
var t = ne, n = re, r = ce, i = $, s = he, o = Q, l = $e, a = mt, f = e.f;
|
|
1628
|
+
ne = /** @type {null | Value[]} */
|
|
1629
|
+
null, re = 0, ce = null, $ = (f & (Se | it)) === 0 ? e : null, he = null, zt(e.ctx), $e = !1, mt = ++ft, e.ac !== null && (ji(() => {
|
|
1630
|
+
e.ac.abort(at);
|
|
1631
|
+
}), e.ac = null);
|
|
1632
|
+
try {
|
|
1633
|
+
e.f |= vr;
|
|
1634
|
+
var c = (
|
|
1635
|
+
/** @type {Function} */
|
|
1636
|
+
e.fn
|
|
1637
|
+
), _ = c();
|
|
1638
|
+
e.f |= qt;
|
|
1639
|
+
var h = e.deps, g = N?.is_fork;
|
|
1640
|
+
if (ne !== null) {
|
|
1641
|
+
var d;
|
|
1642
|
+
if (g || on(e, re), h !== null && re > 0)
|
|
1643
|
+
for (h.length = re + ne.length, d = 0; d < ne.length; d++)
|
|
1644
|
+
h[re + d] = ne[d];
|
|
1645
|
+
else
|
|
1646
|
+
e.deps = h = ne;
|
|
1647
|
+
if (Or() && (e.f & pe) !== 0)
|
|
1648
|
+
for (d = re; d < h.length; d++)
|
|
1649
|
+
((b = h[d]).reactions ?? (b.reactions = [])).push(e);
|
|
1650
|
+
} else !g && h !== null && re < h.length && (on(e, re), h.length = re);
|
|
1651
|
+
if (wi() && ce !== null && !$e && h !== null && (e.f & (B | xe | X)) === 0)
|
|
1652
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
1653
|
+
ce.length; d++)
|
|
1654
|
+
es(
|
|
1655
|
+
ce[d],
|
|
1656
|
+
/** @type {Effect} */
|
|
1657
|
+
e
|
|
1658
|
+
);
|
|
1659
|
+
if (i !== null && i !== e) {
|
|
1660
|
+
if (ft++, i.deps !== null)
|
|
1661
|
+
for (let x = 0; x < n; x += 1)
|
|
1662
|
+
i.deps[x].rv = ft;
|
|
1663
|
+
if (t !== null)
|
|
1664
|
+
for (const x of t)
|
|
1665
|
+
x.rv = ft;
|
|
1666
|
+
ce !== null && (r === null ? r = ce : r.push(.../** @type {Source[]} */
|
|
1667
|
+
ce));
|
|
1668
|
+
}
|
|
1669
|
+
return (e.f & tt) !== 0 && (e.f ^= tt), _;
|
|
1670
|
+
} catch (x) {
|
|
1671
|
+
return $i(x);
|
|
1672
|
+
} finally {
|
|
1673
|
+
e.f ^= vr, ne = t, re = n, ce = r, $ = i, he = s, zt(o), $e = l, mt = a;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
function qo(e, t) {
|
|
1677
|
+
let n = t.reactions;
|
|
1678
|
+
if (n !== null) {
|
|
1679
|
+
var r = Us.call(n, e);
|
|
1680
|
+
if (r !== -1) {
|
|
1681
|
+
var i = n.length - 1;
|
|
1682
|
+
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
if (n === null && (t.f & B) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1686
|
+
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1687
|
+
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1688
|
+
(ne === null || !Ft.call(ne, t))) {
|
|
1689
|
+
var s = (
|
|
1690
|
+
/** @type {Derived} */
|
|
1691
|
+
t
|
|
1692
|
+
);
|
|
1693
|
+
(s.f & pe) !== 0 && (s.f ^= pe, s.f &= ~bt), Ar(s), Ro(s), on(s, 0);
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
function on(e, t) {
|
|
1697
|
+
var n = e.deps;
|
|
1698
|
+
if (n !== null)
|
|
1699
|
+
for (var r = t; r < n.length; r++)
|
|
1700
|
+
qo(e, n[r]);
|
|
1701
|
+
}
|
|
1702
|
+
function Vt(e) {
|
|
1703
|
+
var t = e.f;
|
|
1704
|
+
if ((t & Ue) === 0) {
|
|
1705
|
+
D(e, Y);
|
|
1706
|
+
var n = C, r = In;
|
|
1707
|
+
C = e, In = !0;
|
|
1708
|
+
try {
|
|
1709
|
+
(t & (Ge | vi)) !== 0 ? Yo(e) : Dr(e), Xi(e);
|
|
1710
|
+
var i = ts(e);
|
|
1711
|
+
e.teardown = typeof i == "function" ? i : null, e.wv = Zi;
|
|
1712
|
+
var s;
|
|
1713
|
+
cr && mo && (e.f & X) !== 0 && e.deps;
|
|
1714
|
+
} finally {
|
|
1715
|
+
In = r, C = n;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
function v(e) {
|
|
1720
|
+
var t = e.f, n = (t & B) !== 0;
|
|
1721
|
+
if ($ !== null && !$e) {
|
|
1722
|
+
var r = C !== null && (C.f & Ue) !== 0;
|
|
1723
|
+
if (!r && (he === null || !Ft.call(he, e))) {
|
|
1724
|
+
var i = $.deps;
|
|
1725
|
+
if (($.f & vr) !== 0)
|
|
1726
|
+
e.rv < ft && (e.rv = ft, ne === null && i !== null && i[re] === e ? re++ : ne === null ? ne = [e] : ne.push(e));
|
|
1727
|
+
else {
|
|
1728
|
+
($.deps ?? ($.deps = [])).push(e);
|
|
1729
|
+
var s = e.reactions;
|
|
1730
|
+
s === null ? e.reactions = [$] : Ft.call(s, $) || s.push($);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
if (rt && nt.has(e))
|
|
1735
|
+
return nt.get(e);
|
|
1736
|
+
if (n) {
|
|
1737
|
+
var o = (
|
|
1738
|
+
/** @type {Derived} */
|
|
1739
|
+
e
|
|
1740
|
+
);
|
|
1741
|
+
if (rt) {
|
|
1742
|
+
var l = o.v;
|
|
1743
|
+
return ((o.f & Y) === 0 && o.reactions !== null || rs(o)) && (l = Ir(o)), nt.set(o, l), l;
|
|
1744
|
+
}
|
|
1745
|
+
var a = (o.f & pe) === 0 && !$e && $ !== null && (In || ($.f & pe) !== 0), f = (o.f & qt) === 0;
|
|
1746
|
+
vn(o) && (a && (o.f |= pe), Ri(o)), a && !f && (Ni(o), ns(o));
|
|
1747
|
+
}
|
|
1748
|
+
if (we?.has(e))
|
|
1749
|
+
return we.get(e);
|
|
1750
|
+
if ((e.f & tt) !== 0)
|
|
1751
|
+
throw e.v;
|
|
1752
|
+
return e.v;
|
|
1753
|
+
}
|
|
1754
|
+
function ns(e) {
|
|
1755
|
+
if (e.f |= pe, e.deps !== null)
|
|
1756
|
+
for (const t of e.deps)
|
|
1757
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & B) !== 0 && (t.f & pe) === 0 && (Ni(
|
|
1758
|
+
/** @type {Derived} */
|
|
1759
|
+
t
|
|
1760
|
+
), ns(
|
|
1761
|
+
/** @type {Derived} */
|
|
1762
|
+
t
|
|
1763
|
+
));
|
|
1764
|
+
}
|
|
1765
|
+
function rs(e) {
|
|
1766
|
+
if (e.v === q) return !0;
|
|
1767
|
+
if (e.deps === null) return !1;
|
|
1768
|
+
for (const t of e.deps)
|
|
1769
|
+
if (nt.has(t) || (t.f & B) !== 0 && rs(
|
|
1770
|
+
/** @type {Derived} */
|
|
1771
|
+
t
|
|
1772
|
+
))
|
|
1773
|
+
return !0;
|
|
1774
|
+
return !1;
|
|
1775
|
+
}
|
|
1776
|
+
function Pr(e) {
|
|
1777
|
+
var t = $e;
|
|
1778
|
+
try {
|
|
1779
|
+
return $e = !0, e();
|
|
1780
|
+
} finally {
|
|
1781
|
+
$e = t;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
const ct = /* @__PURE__ */ Symbol("events"), is = /* @__PURE__ */ new Set(), $r = /* @__PURE__ */ new Set();
|
|
1785
|
+
function ze(e, t, n) {
|
|
1786
|
+
(t[ct] ?? (t[ct] = {}))[e] = n;
|
|
1787
|
+
}
|
|
1788
|
+
function Bo(e) {
|
|
1789
|
+
for (var t = 0; t < e.length; t++)
|
|
1790
|
+
is.add(e[t]);
|
|
1791
|
+
for (var n of $r)
|
|
1792
|
+
n(e);
|
|
1793
|
+
}
|
|
1794
|
+
let ri = null;
|
|
1795
|
+
function ii(e) {
|
|
1796
|
+
var t = this, n = (
|
|
1797
|
+
/** @type {Node} */
|
|
1798
|
+
t.ownerDocument
|
|
1799
|
+
), r = e.type, i = e.composedPath?.() || [], s = (
|
|
1800
|
+
/** @type {null | Element} */
|
|
1801
|
+
i[0] || e.target
|
|
1802
|
+
);
|
|
1803
|
+
ri = e;
|
|
1804
|
+
var o = 0, l = ri === e && e[ct];
|
|
1805
|
+
if (l) {
|
|
1806
|
+
var a = i.indexOf(l);
|
|
1807
|
+
if (a !== -1 && (t === document || t === /** @type {any} */
|
|
1808
|
+
window)) {
|
|
1809
|
+
e[ct] = t;
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1812
|
+
var f = i.indexOf(t);
|
|
1813
|
+
if (f === -1)
|
|
1814
|
+
return;
|
|
1815
|
+
a <= f && (o = a);
|
|
1816
|
+
}
|
|
1817
|
+
if (s = /** @type {Element} */
|
|
1818
|
+
i[o] || e.target, s !== t) {
|
|
1819
|
+
On(e, "currentTarget", {
|
|
1820
|
+
configurable: !0,
|
|
1821
|
+
get() {
|
|
1822
|
+
return s || n;
|
|
1823
|
+
}
|
|
1824
|
+
});
|
|
1825
|
+
var c = $, _ = C;
|
|
1826
|
+
_e(null), Re(null);
|
|
1827
|
+
try {
|
|
1828
|
+
for (var h, g = []; s !== null; ) {
|
|
1829
|
+
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1830
|
+
s.host || null;
|
|
1831
|
+
try {
|
|
1832
|
+
var b = s[ct]?.[r];
|
|
1833
|
+
b != null && (!/** @type {any} */
|
|
1834
|
+
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1835
|
+
// -> the target could not have been disabled because it emits the event in the first place
|
|
1836
|
+
e.target === s) && b.call(s, e);
|
|
1837
|
+
} catch (x) {
|
|
1838
|
+
h ? g.push(x) : h = x;
|
|
1839
|
+
}
|
|
1840
|
+
if (e.cancelBubble || d === t || d === null)
|
|
1841
|
+
break;
|
|
1842
|
+
s = d;
|
|
1843
|
+
}
|
|
1844
|
+
if (h) {
|
|
1845
|
+
for (let x of g)
|
|
1846
|
+
queueMicrotask(() => {
|
|
1847
|
+
throw x;
|
|
1848
|
+
});
|
|
1849
|
+
throw h;
|
|
1850
|
+
}
|
|
1851
|
+
} finally {
|
|
1852
|
+
e[ct] = t, delete e.currentTarget, _e(c), Re(_);
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
const Xo = (
|
|
1857
|
+
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1858
|
+
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1859
|
+
/** @param {string} html */
|
|
1860
|
+
createHTML: (e) => e
|
|
1861
|
+
})
|
|
1862
|
+
);
|
|
1863
|
+
function Uo(e) {
|
|
1864
|
+
return (
|
|
1865
|
+
/** @type {string} */
|
|
1866
|
+
Xo?.createHTML(e) ?? e
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1869
|
+
function Wo(e, t = !1) {
|
|
1870
|
+
var n = Rr("template");
|
|
1871
|
+
return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? Uo(e) : e, n.content;
|
|
1872
|
+
}
|
|
1873
|
+
function Ct(e, t) {
|
|
1874
|
+
var n = (
|
|
1875
|
+
/** @type {Effect} */
|
|
1876
|
+
C
|
|
1877
|
+
);
|
|
1878
|
+
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1879
|
+
}
|
|
1880
|
+
// @__NO_SIDE_EFFECTS__
|
|
1881
|
+
function ae(e, t) {
|
|
1882
|
+
var n = (t & Bs) !== 0, r = (t & Xs) !== 0, i, s = !e.startsWith("<!>");
|
|
1883
|
+
return () => {
|
|
1884
|
+
if (A)
|
|
1885
|
+
return Ct(M, null), M;
|
|
1886
|
+
i === void 0 && (i = Wo(s ? e : "<!>" + e, !0), n || (i = /** @type {TemplateNode} */
|
|
1887
|
+
/* @__PURE__ */ jt(i)));
|
|
1888
|
+
var o = (
|
|
1889
|
+
/** @type {TemplateNode} */
|
|
1890
|
+
r || Fi ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1891
|
+
);
|
|
1892
|
+
if (n) {
|
|
1893
|
+
var l = (
|
|
1894
|
+
/** @type {TemplateNode} */
|
|
1895
|
+
/* @__PURE__ */ jt(o)
|
|
1896
|
+
), a = (
|
|
1897
|
+
/** @type {TemplateNode} */
|
|
1898
|
+
o.lastChild
|
|
1899
|
+
);
|
|
1900
|
+
Ct(l, a);
|
|
1901
|
+
} else
|
|
1902
|
+
Ct(o, o);
|
|
1903
|
+
return o;
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1906
|
+
function Go() {
|
|
1907
|
+
if (A)
|
|
1908
|
+
return Ct(M, null), M;
|
|
1909
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = Ee();
|
|
1910
|
+
return e.append(t, n), Ct(t, n), e;
|
|
1911
|
+
}
|
|
1912
|
+
function K(e, t) {
|
|
1913
|
+
if (A) {
|
|
1914
|
+
var n = (
|
|
1915
|
+
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1916
|
+
C
|
|
1917
|
+
);
|
|
1918
|
+
((n.f & qt) === 0 || n.nodes.end === null) && (n.nodes.end = M), Vn();
|
|
1919
|
+
return;
|
|
1920
|
+
}
|
|
1921
|
+
e !== null && e.before(
|
|
1922
|
+
/** @type {Node} */
|
|
1923
|
+
t
|
|
1924
|
+
);
|
|
1925
|
+
}
|
|
1926
|
+
const Jo = ["touchstart", "touchmove"];
|
|
1927
|
+
function Ko(e) {
|
|
1928
|
+
return Jo.includes(e);
|
|
1929
|
+
}
|
|
1930
|
+
function z(e, t) {
|
|
1931
|
+
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1932
|
+
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1933
|
+
}
|
|
1934
|
+
function ss(e, t) {
|
|
1935
|
+
return os(e, t);
|
|
1936
|
+
}
|
|
1937
|
+
function Zo(e, t) {
|
|
1938
|
+
yr(), t.intro = t.intro ?? !1;
|
|
1939
|
+
const n = t.target, r = A, i = M;
|
|
1940
|
+
try {
|
|
1941
|
+
for (var s = /* @__PURE__ */ jt(n); s && (s.nodeType !== dn || /** @type {Comment} */
|
|
1942
|
+
s.data !== Sr); )
|
|
1943
|
+
s = /* @__PURE__ */ Oe(s);
|
|
1944
|
+
if (!s)
|
|
1945
|
+
throw Dt;
|
|
1946
|
+
Xe(!0), le(
|
|
1947
|
+
/** @type {Comment} */
|
|
1948
|
+
s
|
|
1949
|
+
);
|
|
1950
|
+
const o = os(e, { ...t, anchor: s });
|
|
1951
|
+
return Xe(!1), /** @type {Exports} */
|
|
1952
|
+
o;
|
|
1953
|
+
} catch (o) {
|
|
1954
|
+
if (o instanceof Error && o.message.split(`
|
|
1955
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1956
|
+
throw o;
|
|
1957
|
+
return o !== Dt && console.warn("Failed to hydrate: ", o), t.recover === !1 && uo(), yr(), Hi(n), Xe(!1), ss(e, t);
|
|
1958
|
+
} finally {
|
|
1959
|
+
Xe(r), le(i);
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
const Cn = /* @__PURE__ */ new Map();
|
|
1963
|
+
function os(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: o = !0 }) {
|
|
1964
|
+
yr();
|
|
1965
|
+
var l = void 0, a = Po(() => {
|
|
1966
|
+
var f = n ?? t.appendChild(Ee());
|
|
1967
|
+
Eo(
|
|
1968
|
+
/** @type {TemplateNode} */
|
|
1969
|
+
f,
|
|
1970
|
+
{
|
|
1971
|
+
pending: () => {
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
(h) => {
|
|
1975
|
+
mi({});
|
|
1976
|
+
var g = (
|
|
1977
|
+
/** @type {ComponentContext} */
|
|
1978
|
+
Q
|
|
1979
|
+
);
|
|
1980
|
+
if (s && (g.c = s), i && (r.$$events = i), A && Ct(
|
|
1981
|
+
/** @type {TemplateNode} */
|
|
1982
|
+
h,
|
|
1983
|
+
null
|
|
1984
|
+
), l = e(h, r) || {}, A && (C.nodes.end = M, M === null || M.nodeType !== dn || /** @type {Comment} */
|
|
1985
|
+
M.data !== Tr))
|
|
1986
|
+
throw jn(), Dt;
|
|
1987
|
+
bi();
|
|
1988
|
+
}
|
|
1989
|
+
);
|
|
1990
|
+
var c = /* @__PURE__ */ new Set(), _ = (h) => {
|
|
1991
|
+
for (var g = 0; g < h.length; g++) {
|
|
1992
|
+
var d = h[g];
|
|
1993
|
+
if (!c.has(d)) {
|
|
1994
|
+
c.add(d);
|
|
1995
|
+
var b = Ko(d);
|
|
1996
|
+
for (const R of [t, document]) {
|
|
1997
|
+
var x = Cn.get(R);
|
|
1998
|
+
x === void 0 && (x = /* @__PURE__ */ new Map(), Cn.set(R, x));
|
|
1999
|
+
var U = x.get(d);
|
|
2000
|
+
U === void 0 ? (R.addEventListener(d, ii, { passive: b }), x.set(d, 1)) : x.set(d, U + 1);
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
};
|
|
2005
|
+
return _(zn(is)), $r.add(_), () => {
|
|
2006
|
+
for (var h of c)
|
|
2007
|
+
for (const b of [t, document]) {
|
|
2008
|
+
var g = (
|
|
2009
|
+
/** @type {Map<string, number>} */
|
|
2010
|
+
Cn.get(b)
|
|
2011
|
+
), d = (
|
|
2012
|
+
/** @type {number} */
|
|
2013
|
+
g.get(h)
|
|
2014
|
+
);
|
|
2015
|
+
--d == 0 ? (b.removeEventListener(h, ii), g.delete(h), g.size === 0 && Cn.delete(b)) : g.set(h, d);
|
|
2016
|
+
}
|
|
2017
|
+
$r.delete(_), f !== n && f.parentNode?.removeChild(f);
|
|
2018
|
+
};
|
|
2019
|
+
});
|
|
2020
|
+
return xr.set(l, a), l;
|
|
2021
|
+
}
|
|
2022
|
+
let xr = /* @__PURE__ */ new WeakMap();
|
|
2023
|
+
function Qo(e, t) {
|
|
2024
|
+
const n = xr.get(e);
|
|
2025
|
+
return n ? (xr.delete(e), n(t)) : Promise.resolve();
|
|
2026
|
+
}
|
|
2027
|
+
var me, Ie, se, _t, fn, cn, Fn;
|
|
2028
|
+
class el {
|
|
2029
|
+
/**
|
|
2030
|
+
* @param {TemplateNode} anchor
|
|
2031
|
+
* @param {boolean} transition
|
|
2032
|
+
*/
|
|
2033
|
+
constructor(t, n = !0) {
|
|
2034
|
+
/** @type {TemplateNode} */
|
|
2035
|
+
L(this, "anchor");
|
|
2036
|
+
/** @type {Map<Batch, Key>} */
|
|
2037
|
+
y(this, me, /* @__PURE__ */ new Map());
|
|
2038
|
+
/**
|
|
2039
|
+
* Map of keys to effects that are currently rendered in the DOM.
|
|
2040
|
+
* These effects are visible and actively part of the document tree.
|
|
2041
|
+
* Example:
|
|
2042
|
+
* ```
|
|
2043
|
+
* {#if condition}
|
|
2044
|
+
* foo
|
|
2045
|
+
* {:else}
|
|
2046
|
+
* bar
|
|
2047
|
+
* {/if}
|
|
2048
|
+
* ```
|
|
2049
|
+
* Can result in the entries `true->Effect` and `false->Effect`
|
|
2050
|
+
* @type {Map<Key, Effect>}
|
|
2051
|
+
*/
|
|
2052
|
+
y(this, Ie, /* @__PURE__ */ new Map());
|
|
2053
|
+
/**
|
|
2054
|
+
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
2055
|
+
* in the DOM, because their insertion is deferred.
|
|
2056
|
+
* @type {Map<Key, Branch>}
|
|
2057
|
+
*/
|
|
2058
|
+
y(this, se, /* @__PURE__ */ new Map());
|
|
2059
|
+
/**
|
|
2060
|
+
* Keys of effects that are currently outroing
|
|
2061
|
+
* @type {Set<Key>}
|
|
2062
|
+
*/
|
|
2063
|
+
y(this, _t, /* @__PURE__ */ new Set());
|
|
2064
|
+
/**
|
|
2065
|
+
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2066
|
+
* This is necessary for `<svelte:element>`
|
|
2067
|
+
*/
|
|
2068
|
+
y(this, fn, !0);
|
|
2069
|
+
y(this, cn, () => {
|
|
2070
|
+
var t = (
|
|
2071
|
+
/** @type {Batch} */
|
|
2072
|
+
N
|
|
2073
|
+
);
|
|
2074
|
+
if (u(this, me).has(t)) {
|
|
2075
|
+
var n = (
|
|
2076
|
+
/** @type {Key} */
|
|
2077
|
+
u(this, me).get(t)
|
|
2078
|
+
), r = u(this, Ie).get(n);
|
|
2079
|
+
if (r)
|
|
2080
|
+
Fr(r), u(this, _t).delete(n);
|
|
2081
|
+
else {
|
|
2082
|
+
var i = u(this, se).get(n);
|
|
2083
|
+
i && (u(this, Ie).set(n, i.effect), u(this, se).delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
|
|
2084
|
+
}
|
|
2085
|
+
for (const [s, o] of u(this, me)) {
|
|
2086
|
+
if (u(this, me).delete(s), s === t)
|
|
2087
|
+
break;
|
|
2088
|
+
const l = u(this, se).get(o);
|
|
2089
|
+
l && (Z(l.effect), u(this, se).delete(o));
|
|
2090
|
+
}
|
|
2091
|
+
for (const [s, o] of u(this, Ie)) {
|
|
2092
|
+
if (s === n || u(this, _t).has(s)) continue;
|
|
2093
|
+
const l = () => {
|
|
2094
|
+
if (Array.from(u(this, me).values()).includes(s)) {
|
|
2095
|
+
var f = document.createDocumentFragment();
|
|
2096
|
+
Ji(o, f), f.append(Ee()), u(this, se).set(s, { effect: o, fragment: f });
|
|
2097
|
+
} else
|
|
2098
|
+
Z(o);
|
|
2099
|
+
u(this, _t).delete(s), u(this, Ie).delete(s);
|
|
2100
|
+
};
|
|
2101
|
+
u(this, fn) || !r ? (u(this, _t).add(s), gt(o, l, !1)) : l();
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
});
|
|
2105
|
+
/**
|
|
2106
|
+
* @param {Batch} batch
|
|
2107
|
+
*/
|
|
2108
|
+
y(this, Fn, (t) => {
|
|
2109
|
+
u(this, me).delete(t);
|
|
2110
|
+
const n = Array.from(u(this, me).values());
|
|
2111
|
+
for (const [r, i] of u(this, se))
|
|
2112
|
+
n.includes(r) || (Z(i.effect), u(this, se).delete(r));
|
|
2113
|
+
});
|
|
2114
|
+
this.anchor = t, w(this, fn, n);
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
*
|
|
2118
|
+
* @param {any} key
|
|
2119
|
+
* @param {null | ((target: TemplateNode) => void)} fn
|
|
2120
|
+
*/
|
|
2121
|
+
ensure(t, n) {
|
|
2122
|
+
var r = (
|
|
2123
|
+
/** @type {Batch} */
|
|
2124
|
+
N
|
|
2125
|
+
), i = Yi();
|
|
2126
|
+
if (n && !u(this, Ie).has(t) && !u(this, se).has(t))
|
|
2127
|
+
if (i) {
|
|
2128
|
+
var s = document.createDocumentFragment(), o = Ee();
|
|
2129
|
+
s.append(o), u(this, se).set(t, {
|
|
2130
|
+
effect: be(() => n(o)),
|
|
2131
|
+
fragment: s
|
|
2132
|
+
});
|
|
2133
|
+
} else
|
|
2134
|
+
u(this, Ie).set(
|
|
2135
|
+
t,
|
|
2136
|
+
be(() => n(this.anchor))
|
|
2137
|
+
);
|
|
2138
|
+
if (u(this, me).set(r, t), i) {
|
|
2139
|
+
for (const [l, a] of u(this, Ie))
|
|
2140
|
+
l === t ? r.unskip_effect(a) : r.skip_effect(a);
|
|
2141
|
+
for (const [l, a] of u(this, se))
|
|
2142
|
+
l === t ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
|
|
2143
|
+
r.oncommit(u(this, cn)), r.ondiscard(u(this, Fn));
|
|
2144
|
+
} else
|
|
2145
|
+
A && (this.anchor = M), u(this, cn).call(this);
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
me = new WeakMap(), Ie = new WeakMap(), se = new WeakMap(), _t = new WeakMap(), fn = new WeakMap(), cn = new WeakMap(), Fn = new WeakMap();
|
|
2149
|
+
function ls(e) {
|
|
2150
|
+
Q === null && Mr(), Vi(() => {
|
|
2151
|
+
const t = Pr(e);
|
|
2152
|
+
if (typeof t == "function") return (
|
|
2153
|
+
/** @type {() => void} */
|
|
2154
|
+
t
|
|
2155
|
+
);
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
function tl(e) {
|
|
2159
|
+
Q === null && Mr(), ls(() => () => Pr(e));
|
|
2160
|
+
}
|
|
2161
|
+
function nl(e, t, { bubbles: n = !1, cancelable: r = !1 } = {}) {
|
|
2162
|
+
return new CustomEvent(e, { detail: t, bubbles: n, cancelable: r });
|
|
2163
|
+
}
|
|
2164
|
+
function rl() {
|
|
2165
|
+
const e = Q;
|
|
2166
|
+
return e === null && Mr(), (t, n, r) => {
|
|
2167
|
+
const i = (
|
|
2168
|
+
/** @type {Record<string, Function | Function[]>} */
|
|
2169
|
+
e.s.$$events?.[
|
|
2170
|
+
/** @type {string} */
|
|
2171
|
+
t
|
|
2172
|
+
]
|
|
2173
|
+
);
|
|
2174
|
+
if (i) {
|
|
2175
|
+
const s = kr(i) ? i.slice() : [i], o = nl(
|
|
2176
|
+
/** @type {string} */
|
|
2177
|
+
t,
|
|
2178
|
+
n,
|
|
2179
|
+
r
|
|
2180
|
+
);
|
|
2181
|
+
for (const l of s)
|
|
2182
|
+
l.call(e.x, o);
|
|
2183
|
+
return !o.defaultPrevented;
|
|
2184
|
+
}
|
|
2185
|
+
return !0;
|
|
2186
|
+
};
|
|
2187
|
+
}
|
|
2188
|
+
function ke(e, t, n = !1) {
|
|
2189
|
+
A && Vn();
|
|
2190
|
+
var r = new el(e), i = n ? Pt : 0;
|
|
2191
|
+
function s(o, l) {
|
|
2192
|
+
if (A) {
|
|
2193
|
+
const c = hi(e);
|
|
2194
|
+
var a;
|
|
2195
|
+
if (c === Sr ? a = 0 : c === Pn ? a = !1 : a = parseInt(c.substring(1)), o !== a) {
|
|
2196
|
+
var f = Ln();
|
|
2197
|
+
le(f), r.anchor = f, Xe(!1), r.ensure(o, l), Xe(!0);
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
r.ensure(o, l);
|
|
2202
|
+
}
|
|
2203
|
+
Lr(() => {
|
|
2204
|
+
var o = !1;
|
|
2205
|
+
t((l, a = 0) => {
|
|
2206
|
+
o = !0, s(a, l);
|
|
2207
|
+
}), o || s(!1, null);
|
|
2208
|
+
}, i);
|
|
2209
|
+
}
|
|
2210
|
+
function il(e, t, n) {
|
|
2211
|
+
for (var r = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
|
|
2212
|
+
let _ = t[l];
|
|
2213
|
+
gt(
|
|
2214
|
+
_,
|
|
2215
|
+
() => {
|
|
2216
|
+
if (s) {
|
|
2217
|
+
if (s.pending.delete(_), s.done.add(_), s.pending.size === 0) {
|
|
2218
|
+
var h = (
|
|
2219
|
+
/** @type {Set<EachOutroGroup>} */
|
|
2220
|
+
e.outrogroups
|
|
2221
|
+
);
|
|
2222
|
+
Er(zn(s.done)), h.delete(s), h.size === 0 && (e.outrogroups = null);
|
|
2223
|
+
}
|
|
2224
|
+
} else
|
|
2225
|
+
o -= 1;
|
|
2226
|
+
},
|
|
2227
|
+
!1
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
if (o === 0) {
|
|
2231
|
+
var a = r.length === 0 && n !== null;
|
|
2232
|
+
if (a) {
|
|
2233
|
+
var f = (
|
|
2234
|
+
/** @type {Element} */
|
|
2235
|
+
n
|
|
2236
|
+
), c = (
|
|
2237
|
+
/** @type {Element} */
|
|
2238
|
+
f.parentNode
|
|
2239
|
+
);
|
|
2240
|
+
Hi(c), c.append(f), e.items.clear();
|
|
2241
|
+
}
|
|
2242
|
+
Er(t, !a);
|
|
2243
|
+
} else
|
|
2244
|
+
s = {
|
|
2245
|
+
pending: new Set(t),
|
|
2246
|
+
done: /* @__PURE__ */ new Set()
|
|
2247
|
+
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(s);
|
|
2248
|
+
}
|
|
2249
|
+
function Er(e, t = !0) {
|
|
2250
|
+
for (var n = 0; n < e.length; n++)
|
|
2251
|
+
Z(e[n], t);
|
|
2252
|
+
}
|
|
2253
|
+
var si;
|
|
2254
|
+
function sl(e, t, n, r, i, s = null) {
|
|
2255
|
+
var o = e, l = /* @__PURE__ */ new Map();
|
|
2256
|
+
A && Vn();
|
|
2257
|
+
var a = null, f = /* @__PURE__ */ Mo(() => {
|
|
2258
|
+
var b = n();
|
|
2259
|
+
return kr(b) ? b : b == null ? [] : zn(b);
|
|
2260
|
+
}), c, _ = !0;
|
|
2261
|
+
function h() {
|
|
2262
|
+
d.fallback = a, ol(d, c, o, t, r), a !== null && (c.length === 0 ? (a.f & et) === 0 ? Fr(a) : (a.f ^= et, tn(a, null, o)) : gt(a, () => {
|
|
2263
|
+
a = null;
|
|
2264
|
+
}));
|
|
2265
|
+
}
|
|
2266
|
+
var g = Lr(() => {
|
|
2267
|
+
c = /** @type {V[]} */
|
|
2268
|
+
v(f);
|
|
2269
|
+
var b = c.length;
|
|
2270
|
+
let x = !1;
|
|
2271
|
+
if (A) {
|
|
2272
|
+
var U = hi(o) === Pn;
|
|
2273
|
+
U !== (b === 0) && (o = Ln(), le(o), Xe(!1), x = !0);
|
|
2274
|
+
}
|
|
2275
|
+
for (var R = /* @__PURE__ */ new Set(), Te = (
|
|
2276
|
+
/** @type {Batch} */
|
|
2277
|
+
N
|
|
2278
|
+
), De = Yi(), ee = 0; ee < b; ee += 1) {
|
|
2279
|
+
A && M.nodeType === dn && /** @type {Comment} */
|
|
2280
|
+
M.data === Tr && (o = /** @type {Comment} */
|
|
2281
|
+
M, x = !0, Xe(!1));
|
|
2282
|
+
var Je = c[ee], Fe = r(Je, ee), F = _ ? null : l.get(Fe);
|
|
2283
|
+
F ? (F.v && Yt(F.v, Je), F.i && Yt(F.i, ee), De && Te.unskip_effect(F.e)) : (F = ll(
|
|
2284
|
+
l,
|
|
2285
|
+
_ ? o : si ?? (si = Ee()),
|
|
2286
|
+
Je,
|
|
2287
|
+
Fe,
|
|
2288
|
+
ee,
|
|
2289
|
+
i,
|
|
2290
|
+
t,
|
|
2291
|
+
n
|
|
2292
|
+
), _ || (F.e.f |= et), l.set(Fe, F)), R.add(Fe);
|
|
2293
|
+
}
|
|
2294
|
+
if (b === 0 && s && !a && (_ ? a = be(() => s(o)) : (a = be(() => s(si ?? (si = Ee()))), a.f |= et)), b > R.size && io(), A && b > 0 && le(Ln()), !_)
|
|
2295
|
+
if (De) {
|
|
2296
|
+
for (const [pn, hn] of l)
|
|
2297
|
+
R.has(pn) || Te.skip_effect(hn.e);
|
|
2298
|
+
Te.oncommit(h), Te.ondiscard(() => {
|
|
2299
|
+
});
|
|
2300
|
+
} else
|
|
2301
|
+
h();
|
|
2302
|
+
x && Xe(!0), v(f);
|
|
2303
|
+
}), d = { effect: g, items: l, outrogroups: null, fallback: a };
|
|
2304
|
+
_ = !1, A && (o = M);
|
|
2305
|
+
}
|
|
2306
|
+
function Qt(e) {
|
|
2307
|
+
for (; e !== null && (e.f & Se) === 0; )
|
|
2308
|
+
e = e.next;
|
|
2309
|
+
return e;
|
|
2310
|
+
}
|
|
2311
|
+
function ol(e, t, n, r, i) {
|
|
2312
|
+
var s = t.length, o = e.items, l = Qt(e.effect.first), a, f = null, c = [], _ = [], h, g, d, b;
|
|
2313
|
+
for (b = 0; b < s; b += 1) {
|
|
2314
|
+
if (h = t[b], g = i(h, b), d = /** @type {EachItem} */
|
|
2315
|
+
o.get(g).e, e.outrogroups !== null)
|
|
2316
|
+
for (const F of e.outrogroups)
|
|
2317
|
+
F.pending.delete(d), F.done.delete(d);
|
|
2318
|
+
if ((d.f & et) !== 0)
|
|
2319
|
+
if (d.f ^= et, d === l)
|
|
2320
|
+
tn(d, null, n);
|
|
2321
|
+
else {
|
|
2322
|
+
var x = f ? f.next : l;
|
|
2323
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), Ze(e, f, d), Ze(e, d, x), tn(d, x, n), f = d, c = [], _ = [], l = Qt(f.next);
|
|
2324
|
+
continue;
|
|
2325
|
+
}
|
|
2326
|
+
if ((d.f & oe) !== 0 && Fr(d), d !== l) {
|
|
2327
|
+
if (a !== void 0 && a.has(d)) {
|
|
2328
|
+
if (c.length < _.length) {
|
|
2329
|
+
var U = _[0], R;
|
|
2330
|
+
f = U.prev;
|
|
2331
|
+
var Te = c[0], De = c[c.length - 1];
|
|
2332
|
+
for (R = 0; R < c.length; R += 1)
|
|
2333
|
+
tn(c[R], U, n);
|
|
2334
|
+
for (R = 0; R < _.length; R += 1)
|
|
2335
|
+
a.delete(_[R]);
|
|
2336
|
+
Ze(e, Te.prev, De.next), Ze(e, f, Te), Ze(e, De, U), l = U, f = De, b -= 1, c = [], _ = [];
|
|
2337
|
+
} else
|
|
2338
|
+
a.delete(d), tn(d, l, n), Ze(e, d.prev, d.next), Ze(e, d, f === null ? e.effect.first : f.next), Ze(e, f, d), f = d;
|
|
2339
|
+
continue;
|
|
2340
|
+
}
|
|
2341
|
+
for (c = [], _ = []; l !== null && l !== d; )
|
|
2342
|
+
(a ?? (a = /* @__PURE__ */ new Set())).add(l), _.push(l), l = Qt(l.next);
|
|
2343
|
+
if (l === null)
|
|
2344
|
+
continue;
|
|
2345
|
+
}
|
|
2346
|
+
(d.f & et) === 0 && c.push(d), f = d, l = Qt(d.next);
|
|
2347
|
+
}
|
|
2348
|
+
if (e.outrogroups !== null) {
|
|
2349
|
+
for (const F of e.outrogroups)
|
|
2350
|
+
F.pending.size === 0 && (Er(zn(F.done)), e.outrogroups?.delete(F));
|
|
2351
|
+
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2352
|
+
}
|
|
2353
|
+
if (l !== null || a !== void 0) {
|
|
2354
|
+
var ee = [];
|
|
2355
|
+
if (a !== void 0)
|
|
2356
|
+
for (d of a)
|
|
2357
|
+
(d.f & oe) === 0 && ee.push(d);
|
|
2358
|
+
for (; l !== null; )
|
|
2359
|
+
(l.f & oe) === 0 && l !== e.fallback && ee.push(l), l = Qt(l.next);
|
|
2360
|
+
var Je = ee.length;
|
|
2361
|
+
if (Je > 0) {
|
|
2362
|
+
var Fe = null;
|
|
2363
|
+
il(e, ee, Fe);
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
function ll(e, t, n, r, i, s, o, l) {
|
|
2368
|
+
var a = (o & js) !== 0 ? (o & qs) === 0 ? /* @__PURE__ */ Li(n, !1, !1) : wt(n) : null, f = (o & Vs) !== 0 ? wt(i) : null;
|
|
2369
|
+
return {
|
|
2370
|
+
v: a,
|
|
2371
|
+
i: f,
|
|
2372
|
+
e: be(() => (s(t, a ?? n, f ?? i, l), () => {
|
|
2373
|
+
e.delete(r);
|
|
2374
|
+
}))
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
function tn(e, t, n) {
|
|
2378
|
+
if (e.nodes)
|
|
2379
|
+
for (var r = e.nodes.start, i = e.nodes.end, s = t && (t.f & et) === 0 ? (
|
|
2380
|
+
/** @type {EffectNodes} */
|
|
2381
|
+
t.nodes.start
|
|
2382
|
+
) : n; r !== null; ) {
|
|
2383
|
+
var o = (
|
|
2384
|
+
/** @type {TemplateNode} */
|
|
2385
|
+
/* @__PURE__ */ Oe(r)
|
|
2386
|
+
);
|
|
2387
|
+
if (s.before(r), r === i)
|
|
2388
|
+
return;
|
|
2389
|
+
r = o;
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
function Ze(e, t, n) {
|
|
2393
|
+
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
2394
|
+
}
|
|
2395
|
+
function al(e, t) {
|
|
2396
|
+
zo(() => {
|
|
2397
|
+
var n = e.getRootNode(), r = (
|
|
2398
|
+
/** @type {ShadowRoot} */
|
|
2399
|
+
n.host ? (
|
|
2400
|
+
/** @type {ShadowRoot} */
|
|
2401
|
+
n
|
|
2402
|
+
) : (
|
|
2403
|
+
/** @type {Document} */
|
|
2404
|
+
n.head ?? /** @type {Document} */
|
|
2405
|
+
n.ownerDocument.head
|
|
2406
|
+
)
|
|
2407
|
+
);
|
|
2408
|
+
if (!r.querySelector("#" + t.hash)) {
|
|
2409
|
+
const i = Rr("style");
|
|
2410
|
+
i.id = t.hash, i.textContent = t.code, r.appendChild(i);
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
}
|
|
2414
|
+
const oi = [...`
|
|
2415
|
+
\r\f \v\uFEFF`];
|
|
2416
|
+
function ul(e, t, n) {
|
|
2417
|
+
var r = e == null ? "" : "" + e;
|
|
2418
|
+
if (n) {
|
|
2419
|
+
for (var i in n)
|
|
2420
|
+
if (n[i])
|
|
2421
|
+
r = r ? r + " " + i : i;
|
|
2422
|
+
else if (r.length)
|
|
2423
|
+
for (var s = i.length, o = 0; (o = r.indexOf(i, o)) >= 0; ) {
|
|
2424
|
+
var l = o + s;
|
|
2425
|
+
(o === 0 || oi.includes(r[o - 1])) && (l === r.length || oi.includes(r[l])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(l + 1) : o = l;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
return r === "" ? null : r;
|
|
2429
|
+
}
|
|
2430
|
+
function fl(e, t) {
|
|
2431
|
+
return e == null ? null : String(e);
|
|
2432
|
+
}
|
|
2433
|
+
function ur(e, t, n, r, i, s) {
|
|
2434
|
+
var o = e.__className;
|
|
2435
|
+
if (A || o !== n || o === void 0) {
|
|
2436
|
+
var l = ul(n, r, s);
|
|
2437
|
+
(!A || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
|
|
2438
|
+
} else if (s && i !== s)
|
|
2439
|
+
for (var a in s) {
|
|
2440
|
+
var f = !!s[a];
|
|
2441
|
+
(i == null || f !== !!i[a]) && e.classList.toggle(a, f);
|
|
2442
|
+
}
|
|
2443
|
+
return s;
|
|
2444
|
+
}
|
|
2445
|
+
function li(e, t, n, r) {
|
|
2446
|
+
var i = e.__style;
|
|
2447
|
+
if (A || i !== t) {
|
|
2448
|
+
var s = fl(t);
|
|
2449
|
+
(!A || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e.__style = t;
|
|
2450
|
+
}
|
|
2451
|
+
return r;
|
|
2452
|
+
}
|
|
2453
|
+
const cl = /* @__PURE__ */ Symbol("is custom element"), dl = /* @__PURE__ */ Symbol("is html"), vl = no ? "link" : "LINK";
|
|
2454
|
+
function fr(e, t, n, r) {
|
|
2455
|
+
var i = pl(e);
|
|
2456
|
+
A && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === vl) || i[t] !== (i[t] = n) && (t === "loading" && (e[to] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && hl(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2457
|
+
}
|
|
2458
|
+
function pl(e) {
|
|
2459
|
+
return (
|
|
2460
|
+
/** @type {Record<string | symbol, unknown>} **/
|
|
2461
|
+
// @ts-expect-error
|
|
2462
|
+
e.__attributes ?? (e.__attributes = {
|
|
2463
|
+
[cl]: e.nodeName.includes("-"),
|
|
2464
|
+
[dl]: e.namespaceURI === fi
|
|
2465
|
+
})
|
|
2466
|
+
);
|
|
2467
|
+
}
|
|
2468
|
+
var ai = /* @__PURE__ */ new Map();
|
|
2469
|
+
function hl(e) {
|
|
2470
|
+
var t = e.getAttribute("is") || e.nodeName, n = ai.get(t);
|
|
2471
|
+
if (n) return n;
|
|
2472
|
+
ai.set(t, n = []);
|
|
2473
|
+
for (var r, i = e, s = Element.prototype; s !== i; ) {
|
|
2474
|
+
r = Ws(i);
|
|
2475
|
+
for (var o in r)
|
|
2476
|
+
r[o].set && n.push(o);
|
|
2477
|
+
i = ci(i);
|
|
2478
|
+
}
|
|
2479
|
+
return n;
|
|
2480
|
+
}
|
|
2481
|
+
function Mn(e, t, n, r) {
|
|
2482
|
+
var i = (
|
|
2483
|
+
/** @type {V} */
|
|
2484
|
+
r
|
|
2485
|
+
), s = !0, o = () => (s && (s = !1, i = /** @type {V} */
|
|
2486
|
+
r), i), l;
|
|
2487
|
+
l = /** @type {V} */
|
|
2488
|
+
e[t], l === void 0 && r !== void 0 && (l = o());
|
|
2489
|
+
var a;
|
|
2490
|
+
a = () => {
|
|
2491
|
+
var h = (
|
|
2492
|
+
/** @type {V} */
|
|
2493
|
+
e[t]
|
|
2494
|
+
);
|
|
2495
|
+
return h === void 0 ? o() : (s = !0, h);
|
|
2496
|
+
};
|
|
2497
|
+
var f = !1, c = /* @__PURE__ */ Bn(() => (f = !1, a())), _ = (
|
|
2498
|
+
/** @type {Effect} */
|
|
2499
|
+
C
|
|
2500
|
+
);
|
|
2501
|
+
return (
|
|
2502
|
+
/** @type {() => V} */
|
|
2503
|
+
(function(h, g) {
|
|
2504
|
+
if (arguments.length > 0) {
|
|
2505
|
+
const d = g ? v(c) : h;
|
|
2506
|
+
return I(c, d), f = !0, i !== void 0 && (i = d), h;
|
|
2507
|
+
}
|
|
2508
|
+
return rt && f || (_.f & Ue) !== 0 ? c.v : v(c);
|
|
2509
|
+
})
|
|
2510
|
+
);
|
|
2511
|
+
}
|
|
2512
|
+
function _l(e) {
|
|
2513
|
+
return new gl(e);
|
|
2514
|
+
}
|
|
2515
|
+
var Be, ve;
|
|
2516
|
+
class gl {
|
|
2517
|
+
/**
|
|
2518
|
+
* @param {ComponentConstructorOptions & {
|
|
2519
|
+
* component: any;
|
|
2520
|
+
* }} options
|
|
2521
|
+
*/
|
|
2522
|
+
constructor(t) {
|
|
2523
|
+
/** @type {any} */
|
|
2524
|
+
y(this, Be);
|
|
2525
|
+
/** @type {Record<string, any>} */
|
|
2526
|
+
y(this, ve);
|
|
2527
|
+
var n = /* @__PURE__ */ new Map(), r = (s, o) => {
|
|
2528
|
+
var l = /* @__PURE__ */ Li(o, !1, !1);
|
|
2529
|
+
return n.set(s, l), l;
|
|
2530
|
+
};
|
|
2531
|
+
const i = new Proxy(
|
|
2532
|
+
{ ...t.props || {}, $$events: {} },
|
|
2533
|
+
{
|
|
2534
|
+
get(s, o) {
|
|
2535
|
+
return v(n.get(o) ?? r(o, Reflect.get(s, o)));
|
|
2536
|
+
},
|
|
2537
|
+
has(s, o) {
|
|
2538
|
+
return o === eo ? !0 : (v(n.get(o) ?? r(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
2539
|
+
},
|
|
2540
|
+
set(s, o, l) {
|
|
2541
|
+
return I(n.get(o) ?? r(o, l), l), Reflect.set(s, o, l);
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
);
|
|
2545
|
+
w(this, ve, (t.hydrate ? Zo : ss)(t.component, {
|
|
2546
|
+
target: t.target,
|
|
2547
|
+
anchor: t.anchor,
|
|
2548
|
+
props: i,
|
|
2549
|
+
context: t.context,
|
|
2550
|
+
intro: t.intro ?? !1,
|
|
2551
|
+
recover: t.recover
|
|
2552
|
+
})), (!t?.props?.$$host || t.sync === !1) && en(), w(this, Be, i.$$events);
|
|
2553
|
+
for (const s of Object.keys(u(this, ve)))
|
|
2554
|
+
s === "$set" || s === "$destroy" || s === "$on" || On(this, s, {
|
|
2555
|
+
get() {
|
|
2556
|
+
return u(this, ve)[s];
|
|
2557
|
+
},
|
|
2558
|
+
/** @param {any} value */
|
|
2559
|
+
set(o) {
|
|
2560
|
+
u(this, ve)[s] = o;
|
|
2561
|
+
},
|
|
2562
|
+
enumerable: !0
|
|
2563
|
+
});
|
|
2564
|
+
u(this, ve).$set = /** @param {Record<string, any>} next */
|
|
2565
|
+
(s) => {
|
|
2566
|
+
Object.assign(i, s);
|
|
2567
|
+
}, u(this, ve).$destroy = () => {
|
|
2568
|
+
Qo(u(this, ve));
|
|
2569
|
+
};
|
|
2570
|
+
}
|
|
2571
|
+
/** @param {Record<string, any>} props */
|
|
2572
|
+
$set(t) {
|
|
2573
|
+
u(this, ve).$set(t);
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* @param {string} event
|
|
2577
|
+
* @param {(...args: any[]) => any} callback
|
|
2578
|
+
* @returns {any}
|
|
2579
|
+
*/
|
|
2580
|
+
$on(t, n) {
|
|
2581
|
+
u(this, Be)[t] = u(this, Be)[t] || [];
|
|
2582
|
+
const r = (...i) => n.call(this, ...i);
|
|
2583
|
+
return u(this, Be)[t].push(r), () => {
|
|
2584
|
+
u(this, Be)[t] = u(this, Be)[t].filter(
|
|
2585
|
+
/** @param {any} fn */
|
|
2586
|
+
(i) => i !== r
|
|
2587
|
+
);
|
|
2588
|
+
};
|
|
2589
|
+
}
|
|
2590
|
+
$destroy() {
|
|
2591
|
+
u(this, ve).$destroy();
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
Be = new WeakMap(), ve = new WeakMap();
|
|
2595
|
+
let as;
|
|
2596
|
+
typeof HTMLElement == "function" && (as = class extends HTMLElement {
|
|
2597
|
+
/**
|
|
2598
|
+
* @param {*} $$componentCtor
|
|
2599
|
+
* @param {*} $$slots
|
|
2600
|
+
* @param {ShadowRootInit | undefined} shadow_root_init
|
|
2601
|
+
*/
|
|
2602
|
+
constructor(t, n, r) {
|
|
2603
|
+
super();
|
|
2604
|
+
/** The Svelte component constructor */
|
|
2605
|
+
L(this, "$$ctor");
|
|
2606
|
+
/** Slots */
|
|
2607
|
+
L(this, "$$s");
|
|
2608
|
+
/** @type {any} The Svelte component instance */
|
|
2609
|
+
L(this, "$$c");
|
|
2610
|
+
/** Whether or not the custom element is connected */
|
|
2611
|
+
L(this, "$$cn", !1);
|
|
2612
|
+
/** @type {Record<string, any>} Component props data */
|
|
2613
|
+
L(this, "$$d", {});
|
|
2614
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
2615
|
+
L(this, "$$r", !1);
|
|
2616
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
2617
|
+
L(this, "$$p_d", {});
|
|
2618
|
+
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
2619
|
+
L(this, "$$l", {});
|
|
2620
|
+
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
2621
|
+
L(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
2622
|
+
/** @type {any} The managed render effect for reflecting attributes */
|
|
2623
|
+
L(this, "$$me");
|
|
2624
|
+
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
2625
|
+
L(this, "$$shadowRoot", null);
|
|
2626
|
+
this.$$ctor = t, this.$$s = n, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
2627
|
+
}
|
|
2628
|
+
/**
|
|
2629
|
+
* @param {string} type
|
|
2630
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
2631
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
2632
|
+
*/
|
|
2633
|
+
addEventListener(t, n, r) {
|
|
2634
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
|
|
2635
|
+
const i = this.$$c.$on(t, n);
|
|
2636
|
+
this.$$l_u.set(n, i);
|
|
2637
|
+
}
|
|
2638
|
+
super.addEventListener(t, n, r);
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
* @param {string} type
|
|
2642
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
2643
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
2644
|
+
*/
|
|
2645
|
+
removeEventListener(t, n, r) {
|
|
2646
|
+
if (super.removeEventListener(t, n, r), this.$$c) {
|
|
2647
|
+
const i = this.$$l_u.get(n);
|
|
2648
|
+
i && (i(), this.$$l_u.delete(n));
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
async connectedCallback() {
|
|
2652
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
2653
|
+
let t = function(i) {
|
|
2654
|
+
return (s) => {
|
|
2655
|
+
const o = Rr("slot");
|
|
2656
|
+
i !== "default" && (o.name = i), K(s, o);
|
|
2657
|
+
};
|
|
2658
|
+
};
|
|
2659
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2660
|
+
return;
|
|
2661
|
+
const n = {}, r = ml(this);
|
|
2662
|
+
for (const i of this.$$s)
|
|
2663
|
+
i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = t(i), n.default = !0) : n[i] = t(i));
|
|
2664
|
+
for (const i of this.attributes) {
|
|
2665
|
+
const s = this.$$g_p(i.name);
|
|
2666
|
+
s in this.$$d || (this.$$d[s] = Rn(s, i.value, this.$$p_d, "toProp"));
|
|
2667
|
+
}
|
|
2668
|
+
for (const i in this.$$p_d)
|
|
2669
|
+
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
2670
|
+
this.$$c = _l({
|
|
2671
|
+
component: this.$$ctor,
|
|
2672
|
+
target: this.$$shadowRoot || this,
|
|
2673
|
+
props: {
|
|
2674
|
+
...this.$$d,
|
|
2675
|
+
$$slots: n,
|
|
2676
|
+
$$host: this
|
|
2677
|
+
}
|
|
2678
|
+
}), this.$$me = Fo(() => {
|
|
2679
|
+
Bi(() => {
|
|
2680
|
+
this.$$r = !0;
|
|
2681
|
+
for (const i of Nn(this.$$c)) {
|
|
2682
|
+
if (!this.$$p_d[i]?.reflect) continue;
|
|
2683
|
+
this.$$d[i] = this.$$c[i];
|
|
2684
|
+
const s = Rn(
|
|
2685
|
+
i,
|
|
2686
|
+
this.$$d[i],
|
|
2687
|
+
this.$$p_d,
|
|
2688
|
+
"toAttribute"
|
|
2689
|
+
);
|
|
2690
|
+
s == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, s);
|
|
2691
|
+
}
|
|
2692
|
+
this.$$r = !1;
|
|
2693
|
+
});
|
|
2694
|
+
});
|
|
2695
|
+
for (const i in this.$$l)
|
|
2696
|
+
for (const s of this.$$l[i]) {
|
|
2697
|
+
const o = this.$$c.$on(i, s);
|
|
2698
|
+
this.$$l_u.set(s, o);
|
|
2699
|
+
}
|
|
2700
|
+
this.$$l = {};
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
2704
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
2705
|
+
/**
|
|
2706
|
+
* @param {string} attr
|
|
2707
|
+
* @param {string} _oldValue
|
|
2708
|
+
* @param {string} newValue
|
|
2709
|
+
*/
|
|
2710
|
+
attributeChangedCallback(t, n, r) {
|
|
2711
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = Rn(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2712
|
+
}
|
|
2713
|
+
disconnectedCallback() {
|
|
2714
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
2715
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* @param {string} attribute_name
|
|
2720
|
+
*/
|
|
2721
|
+
$$g_p(t) {
|
|
2722
|
+
return Nn(this.$$p_d).find(
|
|
2723
|
+
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
2724
|
+
) || t;
|
|
2725
|
+
}
|
|
2726
|
+
});
|
|
2727
|
+
function Rn(e, t, n, r) {
|
|
2728
|
+
const i = n[e]?.type;
|
|
2729
|
+
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
2730
|
+
return t;
|
|
2731
|
+
if (r === "toAttribute")
|
|
2732
|
+
switch (i) {
|
|
2733
|
+
case "Object":
|
|
2734
|
+
case "Array":
|
|
2735
|
+
return t == null ? null : JSON.stringify(t);
|
|
2736
|
+
case "Boolean":
|
|
2737
|
+
return t ? "" : null;
|
|
2738
|
+
case "Number":
|
|
2739
|
+
return t ?? null;
|
|
2740
|
+
default:
|
|
2741
|
+
return t;
|
|
2742
|
+
}
|
|
2743
|
+
else
|
|
2744
|
+
switch (i) {
|
|
2745
|
+
case "Object":
|
|
2746
|
+
case "Array":
|
|
2747
|
+
return t && JSON.parse(t);
|
|
2748
|
+
case "Boolean":
|
|
2749
|
+
return t;
|
|
2750
|
+
// conversion already handled above
|
|
2751
|
+
case "Number":
|
|
2752
|
+
return t != null ? +t : t;
|
|
2753
|
+
default:
|
|
2754
|
+
return t;
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
function ml(e) {
|
|
2758
|
+
const t = {};
|
|
2759
|
+
return e.childNodes.forEach((n) => {
|
|
2760
|
+
t[
|
|
2761
|
+
/** @type {Element} node */
|
|
2762
|
+
n.slot || "default"
|
|
2763
|
+
] = !0;
|
|
2764
|
+
}), t;
|
|
2765
|
+
}
|
|
2766
|
+
function bl(e, t, n, r, i, s) {
|
|
2767
|
+
let o = class extends as {
|
|
2768
|
+
constructor() {
|
|
2769
|
+
super(e, n, i), this.$$p_d = t;
|
|
2770
|
+
}
|
|
2771
|
+
static get observedAttributes() {
|
|
2772
|
+
return Nn(t).map(
|
|
2773
|
+
(l) => (t[l].attribute || l).toLowerCase()
|
|
2774
|
+
);
|
|
2775
|
+
}
|
|
2776
|
+
};
|
|
2777
|
+
return Nn(t).forEach((l) => {
|
|
2778
|
+
On(o.prototype, l, {
|
|
2779
|
+
get() {
|
|
2780
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2781
|
+
},
|
|
2782
|
+
set(a) {
|
|
2783
|
+
a = Rn(l, a, t), this.$$d[l] = a;
|
|
2784
|
+
var f = this.$$c;
|
|
2785
|
+
if (f) {
|
|
2786
|
+
var c = Tt(f, l)?.get;
|
|
2787
|
+
c ? f[l] = a : f.$set({ [l]: a });
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
});
|
|
2791
|
+
}), r.forEach((l) => {
|
|
2792
|
+
On(o.prototype, l, {
|
|
2793
|
+
get() {
|
|
2794
|
+
return this.$$c?.[l];
|
|
2795
|
+
}
|
|
2796
|
+
});
|
|
2797
|
+
}), e.element = /** @type {any} */
|
|
2798
|
+
o, o;
|
|
2799
|
+
}
|
|
2800
|
+
var wl = /* @__PURE__ */ ae('<span class="pie-section-player-tools-event-debugger__status svelte-low4va">controller unavailable</span>'), yl = /* @__PURE__ */ ae('<div class="pie-section-player-tools-event-debugger__empty svelte-low4va">No matching events yet. Interact with an item to capture broadcasts.</div>'), $l = /* @__PURE__ */ ae("<span> </span>"), xl = /* @__PURE__ */ ae("<span>replayed</span>"), El = /* @__PURE__ */ ae("<span> </span>"), Sl = /* @__PURE__ */ ae("<span> </span>"), Tl = /* @__PURE__ */ ae("<span> </span>"), kl = /* @__PURE__ */ ae('<button><div class="pie-section-player-tools-event-debugger__row-top svelte-low4va"><span class="pie-section-player-tools-event-debugger__event-type svelte-low4va"> </span> <span class="pie-section-player-tools-event-debugger__event-time svelte-low4va"> </span></div> <div class="pie-section-player-tools-event-debugger__row-meta svelte-low4va"><!> <!> <!> <!> <!></div></button>'), Cl = /* @__PURE__ */ ae('<div class="pie-section-player-tools-event-debugger__detail-meta svelte-low4va"><div><strong>Type:</strong> </div> <div><strong>Target:</strong> </div> <div><strong>Item:</strong> </div> <div><strong>Canonical:</strong> </div> <div><strong>Replayed:</strong> </div> <div><strong>Intent:</strong> </div> <div><strong>Duplicates:</strong> </div> <div><strong>Semantic Repeats:</strong> </div></div> <pre class="pie-section-player-tools-event-debugger__pre svelte-low4va"> </pre>', 1), Ml = /* @__PURE__ */ ae('<div class="pie-section-player-tools-event-debugger__empty svelte-low4va">Select an event to inspect payload details.</div>'), Al = /* @__PURE__ */ ae('<div class="pie-section-player-tools-event-debugger__content-shell svelte-low4va"><div class="pie-section-player-tools-event-debugger__toolbar svelte-low4va"><div class="pie-section-player-tools-event-debugger__toggle-group svelte-low4va" role="group" aria-label="Event level filter"><button>item</button> <button>section</button></div> <button class="pie-section-player-tools-event-debugger__button svelte-low4va"> </button> <button class="pie-section-player-tools-event-debugger__button svelte-low4va">clear</button> <!></div> <div class="pie-section-player-tools-event-debugger__grid svelte-low4va"><div class="pie-section-player-tools-event-debugger__list svelte-low4va"><!></div> <div class="pie-section-player-tools-event-debugger__detail svelte-low4va"><!></div></div></div>'), Il = /* @__PURE__ */ ae('<div class="pie-section-player-tools-event-debugger__resize-handle svelte-low4va" role="button" tabindex="0" title="Resize window">◢</div>'), Rl = /* @__PURE__ */ ae('<div class="pie-section-player-tools-event-debugger svelte-low4va"><div class="pie-section-player-tools-event-debugger__header svelte-low4va" role="button" tabindex="0" aria-label="Drag event debugger panel"><div class="pie-section-player-tools-event-debugger__header-title svelte-low4va"><h3 class="pie-section-player-tools-event-debugger__title svelte-low4va">Session Broadcasts</h3> <span class="pie-section-player-tools-event-debugger__counter svelte-low4va"> </span></div> <div class="pie-section-player-tools-event-debugger__header-actions svelte-low4va"><button class="pie-section-player-tools-event-debugger__icon-button svelte-low4va"> </button> <button class="pie-section-player-tools-event-debugger__icon-button svelte-low4va" title="Close">✕</button></div></div> <!> <!></div>');
|
|
2801
|
+
const Nl = {
|
|
2802
|
+
hash: "svelte-low4va",
|
|
2803
|
+
code: ".pie-section-player-tools-event-debugger.svelte-low4va {position:fixed;z-index:9999;background:var(--color-base-100, #fff);color:var(--color-base-content, #1f2937);border:1px solid var(--color-base-300, #d1d5db);border-radius:8px;box-shadow:0 10px 30px rgba(0, 0, 0, 0.2);overflow:hidden;font-family:var(--pie-font-family, Inter, system-ui, sans-serif);}.pie-section-player-tools-event-debugger__header.svelte-low4va {height:56px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;background:var(--color-base-200, #f3f4f6);cursor:move;user-select:none;}.pie-section-player-tools-event-debugger__header-title.svelte-low4va {display:flex;align-items:center;gap:8px;}.pie-section-player-tools-event-debugger__title.svelte-low4va {margin:0;font-size:0.95rem;font-weight:700;}.pie-section-player-tools-event-debugger__counter.svelte-low4va {font-size:0.75rem;padding:2px 7px;border-radius:999px;background:var(--color-primary, #2563eb);color:white;}.pie-section-player-tools-event-debugger__header-actions.svelte-low4va {display:flex;gap:6px;}.pie-section-player-tools-event-debugger__icon-button.svelte-low4va {border:1px solid var(--color-base-300, #d1d5db);background:var(--color-base-100, #fff);border-radius:6px;font-size:0.8rem;padding:4px 7px;cursor:pointer;}.pie-section-player-tools-event-debugger__content-shell.svelte-low4va {display:flex;flex-direction:column;min-height:0;}.pie-section-player-tools-event-debugger__toolbar.svelte-low4va {display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--color-base-300, #d1d5db);flex-wrap:wrap;}.pie-section-player-tools-event-debugger__button.svelte-low4va {border:1px solid var(--color-base-300, #d1d5db);background:var(--color-base-100, #fff);color:inherit;border-radius:6px;font-size:0.78rem;padding:6px 8px;}.pie-section-player-tools-event-debugger__toggle-group.svelte-low4va {display:inline-flex;border:1px solid var(--color-base-300, #d1d5db);border-radius:6px;overflow:hidden;}.pie-section-player-tools-event-debugger__toggle-button.svelte-low4va {border:none;background:var(--color-base-100, #fff);color:inherit;font-size:0.78rem;padding:6px 10px;cursor:pointer;}.pie-section-player-tools-event-debugger__toggle-button.svelte-low4va + .pie-section-player-tools-event-debugger__toggle-button:where(.svelte-low4va) {border-left:1px solid var(--color-base-300, #d1d5db);}.pie-section-player-tools-event-debugger__toggle-button--active.svelte-low4va {background:color-mix(in srgb, var(--color-primary, #2563eb) 18%, transparent);font-weight:600;}.pie-section-player-tools-event-debugger__status.svelte-low4va {font-size:0.72rem;opacity:0.75;}.pie-section-player-tools-event-debugger__grid.svelte-low4va {display:grid;grid-template-columns:minmax(180px, 1fr) minmax(260px, 1.3fr);flex:1;min-height:0;}.pie-section-player-tools-event-debugger__list.svelte-low4va {border-right:1px solid var(--color-base-300, #d1d5db);overflow:auto;}.pie-section-player-tools-event-debugger__detail.svelte-low4va {overflow:auto;}.pie-section-player-tools-event-debugger__row.svelte-low4va {display:block;width:100%;border:0;text-align:left;background:transparent;padding:8px 10px;border-bottom:1px solid var(--color-base-300, #e5e7eb);cursor:pointer;}.pie-section-player-tools-event-debugger__row--active.svelte-low4va {background:color-mix(in srgb, var(--color-primary, #2563eb) 14%, transparent);}.pie-section-player-tools-event-debugger__row-top.svelte-low4va {display:flex;justify-content:space-between;gap:8px;font-size:0.74rem;}.pie-section-player-tools-event-debugger__event-type.svelte-low4va {font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-weight:600;}.pie-section-player-tools-event-debugger__event-time.svelte-low4va {opacity:0.75;}.pie-section-player-tools-event-debugger__row-meta.svelte-low4va {margin-top:4px;display:flex;flex-wrap:wrap;gap:8px;font-size:0.7rem;opacity:0.88;}.pie-section-player-tools-event-debugger__detail-meta.svelte-low4va {display:grid;gap:3px;padding:10px 12px;font-size:0.78rem;border-bottom:1px solid var(--color-base-300, #d1d5db);}.pie-section-player-tools-event-debugger__pre.svelte-low4va {margin:0;padding:12px;font-size:0.74rem;line-height:1.35;white-space:pre-wrap;word-break:break-word;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;}.pie-section-player-tools-event-debugger__empty.svelte-low4va {padding:12px;font-size:0.8rem;opacity:0.8;}.pie-section-player-tools-event-debugger__resize-handle.svelte-low4va {position:absolute;right:6px;bottom:4px;cursor:nwse-resize;user-select:none;font-size:0.9rem;opacity:0.7;}"
|
|
2804
|
+
};
|
|
2805
|
+
function Ol(e, t) {
|
|
2806
|
+
mi(t, !0), al(e, Nl);
|
|
2807
|
+
const n = rl();
|
|
2808
|
+
let r = Mn(t, "maxEvents", 7, 200), i = Mn(t, "toolkitCoordinator", 7, null), s = Mn(t, "sectionId", 7, ""), o = Mn(t, "attemptId", 7, void 0), l = /* @__PURE__ */ H(380), a = /* @__PURE__ */ H(100), f = /* @__PURE__ */ H(500), c = /* @__PURE__ */ H(620), _ = /* @__PURE__ */ H(!1), h = /* @__PURE__ */ H(!1), g = /* @__PURE__ */ H("item"), d = /* @__PURE__ */ H(null), b = /* @__PURE__ */ H(St([])), x = /* @__PURE__ */ H(!1), U = !1, R = !1, Te = 0, De = 0, ee = 0, Je = 0, Fe = 0, F = 0, pn = 0, hn = 0, us = 1, Xn = null, Un = null, _n = null;
|
|
2809
|
+
function fs(p) {
|
|
2810
|
+
try {
|
|
2811
|
+
return structuredClone(p);
|
|
2812
|
+
} catch {
|
|
2813
|
+
try {
|
|
2814
|
+
return JSON.parse(JSON.stringify(p));
|
|
2815
|
+
} catch {
|
|
2816
|
+
return p;
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
function cs(p, m) {
|
|
2821
|
+
let S = "";
|
|
2822
|
+
try {
|
|
2823
|
+
S = JSON.stringify(m);
|
|
2824
|
+
} catch {
|
|
2825
|
+
S = String(m);
|
|
2826
|
+
}
|
|
2827
|
+
return `${p}:${S}`;
|
|
2828
|
+
}
|
|
2829
|
+
function ds(p, m) {
|
|
2830
|
+
const S = m && typeof m == "object" ? { ...m } : m;
|
|
2831
|
+
S && typeof S == "object" && (delete S.timestamp, delete S.sourceRuntimeId);
|
|
2832
|
+
let P = "";
|
|
2833
|
+
try {
|
|
2834
|
+
P = JSON.stringify(S);
|
|
2835
|
+
} catch {
|
|
2836
|
+
P = String(S);
|
|
2837
|
+
}
|
|
2838
|
+
return `${p}:${P}`;
|
|
2839
|
+
}
|
|
2840
|
+
function vs(p) {
|
|
2841
|
+
const m = String(p || "");
|
|
2842
|
+
return m === "item-session-data-changed" || m === "item-session-meta-changed" || m === "item-selected" || m === "content-loaded" || m === "item-player-error" || m === "item-complete-changed" || m === "section-loading-complete" || m === "section-items-complete-changed" || m === "section-error" ? m : null;
|
|
2843
|
+
}
|
|
2844
|
+
function ps(p) {
|
|
2845
|
+
return p === "section-loading-complete" || p === "section-items-complete-changed" || p === "section-error" ? "section" : "item";
|
|
2846
|
+
}
|
|
2847
|
+
function Wn(p) {
|
|
2848
|
+
return typeof p == "string" && p.trim() ? p : null;
|
|
2849
|
+
}
|
|
2850
|
+
function hs(p, m) {
|
|
2851
|
+
const S = fs(p || {}), P = cs(m, S), fe = ds(m, S);
|
|
2852
|
+
return {
|
|
2853
|
+
id: us++,
|
|
2854
|
+
type: m,
|
|
2855
|
+
timestamp: typeof p.timestamp == "number" ? p.timestamp : Date.now(),
|
|
2856
|
+
targetTag: "section-controller",
|
|
2857
|
+
itemId: Wn(p?.itemId),
|
|
2858
|
+
canonicalItemId: Wn(p?.canonicalItemId),
|
|
2859
|
+
intent: Wn(p?.intent),
|
|
2860
|
+
replayed: p?.replayed === !0,
|
|
2861
|
+
duplicateCount: 1,
|
|
2862
|
+
payload: S,
|
|
2863
|
+
fingerprint: P,
|
|
2864
|
+
semanticFingerprint: fe
|
|
2865
|
+
};
|
|
2866
|
+
}
|
|
2867
|
+
function _s(p) {
|
|
2868
|
+
if (v(h)) return;
|
|
2869
|
+
const m = vs(p?.type);
|
|
2870
|
+
if (!m) return;
|
|
2871
|
+
const S = hs(p, m), P = v(b)[0];
|
|
2872
|
+
if (P && P.fingerprint === S.fingerprint) {
|
|
2873
|
+
I(
|
|
2874
|
+
b,
|
|
2875
|
+
[
|
|
2876
|
+
{
|
|
2877
|
+
...P,
|
|
2878
|
+
timestamp: S.timestamp,
|
|
2879
|
+
duplicateCount: P.duplicateCount + 1
|
|
2880
|
+
},
|
|
2881
|
+
...v(b).slice(1)
|
|
2882
|
+
],
|
|
2883
|
+
!0
|
|
2884
|
+
);
|
|
2885
|
+
return;
|
|
2886
|
+
}
|
|
2887
|
+
const fe = Math.max(10, Math.min(2e3, r() || 200));
|
|
2888
|
+
I(b, [S, ...v(b)].slice(0, fe), !0), v(d) == null && I(d, S.id, !0);
|
|
2889
|
+
}
|
|
2890
|
+
function gs() {
|
|
2891
|
+
return !i() || !s() ? null : i().getSectionController?.({ sectionId: s(), attemptId: o() }) || null;
|
|
2892
|
+
}
|
|
2893
|
+
function gn() {
|
|
2894
|
+
Un?.(), Un = null, Xn = null;
|
|
2895
|
+
}
|
|
2896
|
+
function mn() {
|
|
2897
|
+
_n?.(), _n = null;
|
|
2898
|
+
}
|
|
2899
|
+
function bn() {
|
|
2900
|
+
const p = gs();
|
|
2901
|
+
if (I(x, !!p, !0), !p) {
|
|
2902
|
+
gn();
|
|
2903
|
+
return;
|
|
2904
|
+
}
|
|
2905
|
+
p !== Xn && (gn(), Xn = p, Un = p.subscribe?.((m) => {
|
|
2906
|
+
_s(m || {});
|
|
2907
|
+
}) || null);
|
|
2908
|
+
}
|
|
2909
|
+
function ms(p) {
|
|
2910
|
+
U = !0, Te = p.clientX, De = p.clientY, ee = v(l), Je = v(a), document.addEventListener("mousemove", Hr), document.addEventListener("mouseup", Gn);
|
|
2911
|
+
}
|
|
2912
|
+
function Hr(p) {
|
|
2913
|
+
if (!U) return;
|
|
2914
|
+
const m = p.clientX - Te, S = p.clientY - De;
|
|
2915
|
+
I(l, Math.max(0, Math.min(ee + m, window.innerWidth - v(f))), !0), I(a, Math.max(0, Math.min(Je + S, window.innerHeight - 100)), !0);
|
|
2916
|
+
}
|
|
2917
|
+
function Gn() {
|
|
2918
|
+
U = !1, document.removeEventListener("mousemove", Hr), document.removeEventListener("mouseup", Gn);
|
|
2919
|
+
}
|
|
2920
|
+
function bs(p) {
|
|
2921
|
+
R = !0, Fe = p.clientX, F = p.clientY, pn = v(f), hn = v(c), document.addEventListener("mousemove", Yr), document.addEventListener("mouseup", Jn), p.preventDefault(), p.stopPropagation();
|
|
2922
|
+
}
|
|
2923
|
+
function Yr(p) {
|
|
2924
|
+
if (!R) return;
|
|
2925
|
+
const m = p.clientX - Fe, S = p.clientY - F;
|
|
2926
|
+
I(f, Math.max(340, Math.min(pn + m, window.innerWidth - v(l))), !0), I(c, Math.max(260, Math.min(hn + S, window.innerHeight - v(a))), !0);
|
|
2927
|
+
}
|
|
2928
|
+
function Jn() {
|
|
2929
|
+
R = !1, document.removeEventListener("mousemove", Yr), document.removeEventListener("mouseup", Jn);
|
|
2930
|
+
}
|
|
2931
|
+
function ws() {
|
|
2932
|
+
I(b, [], !0), I(d, null);
|
|
2933
|
+
}
|
|
2934
|
+
function ys(p) {
|
|
2935
|
+
return new Date(p).toLocaleTimeString();
|
|
2936
|
+
}
|
|
2937
|
+
const Bt = /* @__PURE__ */ kn(() => v(b).filter((p) => ps(p.type) === v(g))), Kn = /* @__PURE__ */ kn(() => {
|
|
2938
|
+
const p = /* @__PURE__ */ new Map();
|
|
2939
|
+
for (const m of v(Bt))
|
|
2940
|
+
p.set(m.semanticFingerprint, (p.get(m.semanticFingerprint) || 0) + m.duplicateCount);
|
|
2941
|
+
return p;
|
|
2942
|
+
}), ue = /* @__PURE__ */ kn(() => v(Bt).find((p) => p.id === v(d)) || v(Bt)[0] || null);
|
|
2943
|
+
ls(() => {
|
|
2944
|
+
const p = (P, fe, $t) => Math.max(fe, Math.min(P, $t)), m = window.innerWidth, S = window.innerHeight;
|
|
2945
|
+
return I(f, p(Math.round(m * 0.34), 380, 720), !0), I(c, p(Math.round(S * 0.74), 360, 860), !0), I(l, Math.max(16, Math.round(m * 0.58)), !0), I(a, Math.max(16, Math.round((S - v(c)) / 2)), !0), bn(), _n = i()?.onSectionControllerLifecycle?.((P) => {
|
|
2946
|
+
const fe = P?.key?.sectionId || "", $t = P?.key?.attemptId || void 0;
|
|
2947
|
+
fe === s() && ($t || void 0) === (o() || void 0) && bn();
|
|
2948
|
+
}), () => {
|
|
2949
|
+
gn(), mn();
|
|
2950
|
+
};
|
|
2951
|
+
}), Vi(() => (i(), s(), o(), bn(), mn(), _n = i()?.onSectionControllerLifecycle?.((p) => {
|
|
2952
|
+
const m = p?.key?.sectionId || "", S = p?.key?.attemptId || void 0;
|
|
2953
|
+
m === s() && (S || void 0) === (o() || void 0) && bn();
|
|
2954
|
+
}), () => {
|
|
2955
|
+
mn();
|
|
2956
|
+
})), tl(() => {
|
|
2957
|
+
Gn(), Jn(), gn(), mn();
|
|
2958
|
+
});
|
|
2959
|
+
var $s = {
|
|
2960
|
+
get maxEvents() {
|
|
2961
|
+
return r();
|
|
2962
|
+
},
|
|
2963
|
+
set maxEvents(p = 200) {
|
|
2964
|
+
r(p), en();
|
|
2965
|
+
},
|
|
2966
|
+
get toolkitCoordinator() {
|
|
2967
|
+
return i();
|
|
2968
|
+
},
|
|
2969
|
+
set toolkitCoordinator(p = null) {
|
|
2970
|
+
i(p), en();
|
|
2971
|
+
},
|
|
2972
|
+
get sectionId() {
|
|
2973
|
+
return s();
|
|
2974
|
+
},
|
|
2975
|
+
set sectionId(p = "") {
|
|
2976
|
+
s(p), en();
|
|
2977
|
+
},
|
|
2978
|
+
get attemptId() {
|
|
2979
|
+
return o();
|
|
2980
|
+
},
|
|
2981
|
+
set attemptId(p = void 0) {
|
|
2982
|
+
o(p), en();
|
|
2983
|
+
}
|
|
2984
|
+
}, wn = Rl(), yn = k(wn), Zn = k(yn), jr = E(k(Zn), 2), xs = k(jr, !0);
|
|
2985
|
+
T(jr), T(Zn);
|
|
2986
|
+
var Vr = E(Zn, 2), Xt = k(Vr), Es = k(Xt, !0);
|
|
2987
|
+
T(Xt);
|
|
2988
|
+
var Ss = E(Xt, 2);
|
|
2989
|
+
T(Vr), T(yn);
|
|
2990
|
+
var qr = E(yn, 2);
|
|
2991
|
+
{
|
|
2992
|
+
var Ts = (p) => {
|
|
2993
|
+
var m = Al(), S = k(m), P = k(S), fe = k(P);
|
|
2994
|
+
let $t;
|
|
2995
|
+
var Qn = E(fe, 2);
|
|
2996
|
+
let Br;
|
|
2997
|
+
T(P);
|
|
2998
|
+
var $n = E(P, 2), Ms = k($n, !0);
|
|
2999
|
+
T($n);
|
|
3000
|
+
var Xr = E($n, 2), As = E(Xr, 2);
|
|
3001
|
+
{
|
|
3002
|
+
var Is = (j) => {
|
|
3003
|
+
var ge = wl();
|
|
3004
|
+
K(j, ge);
|
|
3005
|
+
};
|
|
3006
|
+
ke(As, (j) => {
|
|
3007
|
+
v(x) || j(Is);
|
|
3008
|
+
});
|
|
3009
|
+
}
|
|
3010
|
+
T(S);
|
|
3011
|
+
var Ur = E(S, 2), er = k(Ur), Rs = k(er);
|
|
3012
|
+
{
|
|
3013
|
+
var Ns = (j) => {
|
|
3014
|
+
var ge = yl();
|
|
3015
|
+
K(j, ge);
|
|
3016
|
+
}, Os = (j) => {
|
|
3017
|
+
var ge = Go(), Ut = ei(ge);
|
|
3018
|
+
sl(Ut, 17, () => v(Bt), (st) => st.id, (st, W) => {
|
|
3019
|
+
var Pe = kl();
|
|
3020
|
+
let xn;
|
|
3021
|
+
var ot = k(Pe), Wt = k(ot), Gt = k(Wt, !0);
|
|
3022
|
+
T(Wt);
|
|
3023
|
+
var En = E(Wt, 2), Jt = k(En, !0);
|
|
3024
|
+
T(En), T(ot);
|
|
3025
|
+
var Sn = E(ot, 2), xt = k(Sn);
|
|
3026
|
+
{
|
|
3027
|
+
var tr = (O) => {
|
|
3028
|
+
var V = $l(), lt = k(V);
|
|
3029
|
+
T(V), Ke(() => z(lt, `item: ${v(W).itemId ?? ""}`)), K(O, V);
|
|
3030
|
+
};
|
|
3031
|
+
ke(xt, (O) => {
|
|
3032
|
+
v(W).itemId && O(tr);
|
|
3033
|
+
});
|
|
3034
|
+
}
|
|
3035
|
+
var Et = E(xt, 2);
|
|
3036
|
+
{
|
|
3037
|
+
var nr = (O) => {
|
|
3038
|
+
var V = xl();
|
|
3039
|
+
K(O, V);
|
|
3040
|
+
};
|
|
3041
|
+
ke(Et, (O) => {
|
|
3042
|
+
v(W).replayed && O(nr);
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
var Kt = E(Et, 2);
|
|
3046
|
+
{
|
|
3047
|
+
var rr = (O) => {
|
|
3048
|
+
var V = El(), lt = k(V);
|
|
3049
|
+
T(V), Ke(() => z(lt, `intent: ${v(W).intent ?? ""}`)), K(O, V);
|
|
3050
|
+
};
|
|
3051
|
+
ke(Kt, (O) => {
|
|
3052
|
+
v(W).intent && O(rr);
|
|
3053
|
+
});
|
|
3054
|
+
}
|
|
3055
|
+
var Zt = E(Kt, 2);
|
|
3056
|
+
{
|
|
3057
|
+
var ir = (O) => {
|
|
3058
|
+
var V = Sl(), lt = k(V);
|
|
3059
|
+
T(V), Ke((zs) => z(lt, `semantic repeats: ${zs ?? ""}`), [
|
|
3060
|
+
() => v(Kn).get(v(W).semanticFingerprint)
|
|
3061
|
+
]), K(O, V);
|
|
3062
|
+
}, sr = /* @__PURE__ */ kn(() => (v(Kn).get(v(W).semanticFingerprint) || 0) > v(W).duplicateCount);
|
|
3063
|
+
ke(Zt, (O) => {
|
|
3064
|
+
v(sr) && O(ir);
|
|
3065
|
+
});
|
|
3066
|
+
}
|
|
3067
|
+
var or = E(Zt, 2);
|
|
3068
|
+
{
|
|
3069
|
+
var Ps = (O) => {
|
|
3070
|
+
var V = Tl(), lt = k(V);
|
|
3071
|
+
T(V), Ke(() => z(lt, `dupes: ${v(W).duplicateCount ?? ""}`)), K(O, V);
|
|
3072
|
+
};
|
|
3073
|
+
ke(or, (O) => {
|
|
3074
|
+
v(W).duplicateCount > 1 && O(Ps);
|
|
3075
|
+
});
|
|
3076
|
+
}
|
|
3077
|
+
T(Sn), T(Pe), Ke(
|
|
3078
|
+
(O) => {
|
|
3079
|
+
xn = ur(Pe, 1, "pie-section-player-tools-event-debugger__row svelte-low4va", null, xn, {
|
|
3080
|
+
"pie-section-player-tools-event-debugger__row--active": v(ue)?.id === v(W).id
|
|
3081
|
+
}), z(Gt, v(W).type), z(Jt, O);
|
|
3082
|
+
},
|
|
3083
|
+
[() => ys(v(W).timestamp)]
|
|
3084
|
+
), ze("click", Pe, () => I(d, v(W).id, !0)), K(st, Pe);
|
|
3085
|
+
}), K(j, ge);
|
|
3086
|
+
};
|
|
3087
|
+
ke(Rs, (j) => {
|
|
3088
|
+
v(Bt).length === 0 ? j(Ns) : j(Os, !1);
|
|
3089
|
+
});
|
|
3090
|
+
}
|
|
3091
|
+
T(er);
|
|
3092
|
+
var Wr = E(er, 2), Ls = k(Wr);
|
|
3093
|
+
{
|
|
3094
|
+
var Ds = (j) => {
|
|
3095
|
+
var ge = Cl(), Ut = ei(ge), st = k(Ut), W = E(k(st));
|
|
3096
|
+
T(st);
|
|
3097
|
+
var Pe = E(st, 2), xn = E(k(Pe));
|
|
3098
|
+
T(Pe);
|
|
3099
|
+
var ot = E(Pe, 2), Wt = E(k(ot));
|
|
3100
|
+
T(ot);
|
|
3101
|
+
var Gt = E(ot, 2), En = E(k(Gt));
|
|
3102
|
+
T(Gt);
|
|
3103
|
+
var Jt = E(Gt, 2), Sn = E(k(Jt));
|
|
3104
|
+
T(Jt);
|
|
3105
|
+
var xt = E(Jt, 2), tr = E(k(xt));
|
|
3106
|
+
T(xt);
|
|
3107
|
+
var Et = E(xt, 2), nr = E(k(Et));
|
|
3108
|
+
T(Et);
|
|
3109
|
+
var Kt = E(Et, 2), rr = E(k(Kt));
|
|
3110
|
+
T(Kt), T(Ut);
|
|
3111
|
+
var Zt = E(Ut, 2), ir = k(Zt, !0);
|
|
3112
|
+
T(Zt), Ke(
|
|
3113
|
+
(sr, or) => {
|
|
3114
|
+
z(W, ` ${v(ue).type ?? ""}`), z(xn, ` ${(v(ue).targetTag || "unknown") ?? ""}`), z(Wt, ` ${(v(ue).itemId || "n/a") ?? ""}`), z(En, ` ${(v(ue).canonicalItemId || "n/a") ?? ""}`), z(Sn, ` ${v(ue).replayed ? "yes" : "no"}`), z(tr, ` ${(v(ue).intent || "n/a") ?? ""}`), z(nr, ` ${v(ue).duplicateCount ?? ""}`), z(rr, ` ${sr ?? ""}`), z(ir, or);
|
|
3115
|
+
},
|
|
3116
|
+
[
|
|
3117
|
+
() => v(Kn).get(v(ue).semanticFingerprint) || v(ue).duplicateCount,
|
|
3118
|
+
() => JSON.stringify(v(ue).payload, null, 2)
|
|
3119
|
+
]
|
|
3120
|
+
), K(j, ge);
|
|
3121
|
+
}, Fs = (j) => {
|
|
3122
|
+
var ge = Ml();
|
|
3123
|
+
K(j, ge);
|
|
3124
|
+
};
|
|
3125
|
+
ke(Ls, (j) => {
|
|
3126
|
+
v(ue) ? j(Ds) : j(Fs, !1);
|
|
3127
|
+
});
|
|
3128
|
+
}
|
|
3129
|
+
T(Wr), T(Ur), T(m), Ke(() => {
|
|
3130
|
+
li(m, `height: ${v(c) - 56}px;`), $t = ur(fe, 1, "pie-section-player-tools-event-debugger__toggle-button svelte-low4va", null, $t, {
|
|
3131
|
+
"pie-section-player-tools-event-debugger__toggle-button--active": v(g) === "item"
|
|
3132
|
+
}), fr(fe, "aria-pressed", v(g) === "item"), Br = ur(Qn, 1, "pie-section-player-tools-event-debugger__toggle-button svelte-low4va", null, Br, {
|
|
3133
|
+
"pie-section-player-tools-event-debugger__toggle-button--active": v(g) === "section"
|
|
3134
|
+
}), fr(Qn, "aria-pressed", v(g) === "section"), z(Ms, v(h) ? "resume" : "pause");
|
|
3135
|
+
}), ze("click", fe, () => I(g, "item")), ze("click", Qn, () => I(g, "section")), ze("click", $n, () => I(h, !v(h))), ze("click", Xr, ws), K(p, m);
|
|
3136
|
+
};
|
|
3137
|
+
ke(qr, (p) => {
|
|
3138
|
+
v(_) || p(Ts);
|
|
3139
|
+
});
|
|
3140
|
+
}
|
|
3141
|
+
var ks = E(qr, 2);
|
|
3142
|
+
{
|
|
3143
|
+
var Cs = (p) => {
|
|
3144
|
+
var m = Il();
|
|
3145
|
+
ze("mousedown", m, bs), K(p, m);
|
|
3146
|
+
};
|
|
3147
|
+
ke(ks, (p) => {
|
|
3148
|
+
v(_) || p(Cs);
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
return T(wn), Ke(() => {
|
|
3152
|
+
li(wn, `left: ${v(l) ?? ""}px; top: ${v(a) ?? ""}px; width: ${v(f) ?? ""}px; ${v(_) ? "height: auto;" : `height: ${v(c)}px;`}`), z(xs, v(b).length), fr(Xt, "title", v(_) ? "Maximize" : "Minimize"), z(Es, v(_) ? "▴" : "▾");
|
|
3153
|
+
}), ze("mousedown", yn, ms), ze("click", Xt, () => I(_, !v(_))), ze("click", Ss, () => n("close")), K(e, wn), bi($s);
|
|
3154
|
+
}
|
|
3155
|
+
Bo(["mousedown", "click"]);
|
|
3156
|
+
customElements.define("pie-section-player-tools-event-debugger", bl(
|
|
3157
|
+
Ol,
|
|
3158
|
+
{
|
|
3159
|
+
maxEvents: { attribute: "max-events", type: "Number" },
|
|
3160
|
+
toolkitCoordinator: { attribute: "toolkit-coordinator", type: "Object" },
|
|
3161
|
+
sectionId: { attribute: "section-id", type: "String" },
|
|
3162
|
+
attemptId: { attribute: "attempt-id", type: "String" }
|
|
3163
|
+
},
|
|
3164
|
+
[],
|
|
3165
|
+
[]
|
|
3166
|
+
));
|
|
3167
|
+
export {
|
|
3168
|
+
Ol as default
|
|
3169
|
+
};
|