@pie-players/pie-section-tools-toolbar 0.2.4 → 0.2.5

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