@pie-players/pie-tool-calculator-inline-desmos 1.0.0-beta.7 → 1.0.0-beta.8

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.
@@ -2,7 +2,7 @@ import { connectToolRuntimeContext as en, connectToolShellContext as tn, createS
2
2
  import { resolveInterfaceI18n as sn } from "@pie-players/pie-players-shared/i18n/provider";
3
3
  typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
4
4
  var oe = {}, C = /* @__PURE__ */ Symbol("uninitialized");
5
- var an = "http://www.w3.org/1999/xhtml", ln = Array.isArray, on = Array.prototype.indexOf, Le = Array.prototype.includes, fn = Array.from, Xe = Object.keys, qe = Object.defineProperty, he = Object.getOwnPropertyDescriptor, un = Object.getOwnPropertyDescriptors, cn = Object.prototype, dn = Array.prototype, er = Object.getPrototypeOf, Vt = Object.isExtensible, hn = () => {
5
+ var an = "http://www.w3.org/1999/xhtml", ln = Array.isArray, on = Array.prototype.indexOf, Le = Array.prototype.includes, fn = Array.from, Xe = Object.keys, qe = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, un = Object.getOwnPropertyDescriptors, cn = Object.prototype, dn = Array.prototype, er = Object.getPrototypeOf, Vt = Object.isExtensible, hn = () => {
6
6
  };
7
7
  function vn(e) {
8
8
  for (var t = 0; t < e.length; t++) e[t]();
@@ -17,7 +17,7 @@ function tr() {
17
17
  reject: t
18
18
  };
19
19
  }
20
- var as = 1 << 24, V = 1024, P = 2048, _e = 4096, wt = 8192, rr = 16384, $t = 32768, ct = 1 << 25, Tt = 65536, ls = 1 << 17, os = 1 << 18, Ee = 1 << 19, _n = 1 << 20, Dt = 1 << 21, pn = 1 << 22, Ze = 1 << 23, Ce = /* @__PURE__ */ Symbol("$state"), nr = /* @__PURE__ */ Symbol("component"), ir = /* @__PURE__ */ Symbol("legacy props"), gn = /* @__PURE__ */ Symbol(""), mn = /* @__PURE__ */ Symbol("proxy path"), sr = /* @__PURE__ */ Symbol("attributes"), dt = /* @__PURE__ */ Symbol("class"), yn = /* @__PURE__ */ Symbol("style"), ht = /* @__PURE__ */ Symbol("text");
20
+ var as = 1 << 24, V = 1024, q = 2048, fe = 4096, wt = 8192, rr = 16384, $t = 32768, ct = 1 << 25, Tt = 65536, ls = 1 << 17, os = 1 << 18, Ee = 1 << 19, _n = 1 << 20, Dt = 1 << 21, pn = 1 << 22, Ze = 1 << 23, Ce = /* @__PURE__ */ Symbol("$state"), nr = /* @__PURE__ */ Symbol("component"), ir = /* @__PURE__ */ Symbol("legacy props"), gn = /* @__PURE__ */ Symbol(""), yn = /* @__PURE__ */ Symbol("proxy path"), sr = /* @__PURE__ */ Symbol("attributes"), dt = /* @__PURE__ */ Symbol("class"), mn = /* @__PURE__ */ Symbol("style"), ht = /* @__PURE__ */ Symbol("text");
21
21
  var Ve = new class extends Error {
22
22
  name = "StaleReactionError";
23
23
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
@@ -31,9 +31,9 @@ function tt(e) {
31
31
  function $n() {
32
32
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
33
33
  }
34
- var k = !1;
35
- function ye(e) {
36
- k = e;
34
+ var T = !1;
35
+ function me(e) {
36
+ T = e;
37
37
  }
38
38
  var w;
39
39
  function F(e) {
@@ -45,14 +45,14 @@ function kt() {
45
45
  return F(/* @__PURE__ */ ie(w));
46
46
  }
47
47
  function ar(e) {
48
- if (k) {
48
+ if (T) {
49
49
  if (/* @__PURE__ */ ie(w) !== null)
50
50
  throw tt(), oe;
51
51
  w = e;
52
52
  }
53
53
  }
54
54
  function Tn(e = 1) {
55
- if (k) {
55
+ if (T) {
56
56
  for (var t = e, r = w; t--; ) r = /* @__PURE__ */ ie(r);
57
57
  w = r;
58
58
  }
@@ -122,7 +122,7 @@ function Bt(e, t) {
122
122
  return e.label = t, qn(e.v, t), e;
123
123
  }
124
124
  function qn(e, t) {
125
- return e?.[mn]?.(t), e;
125
+ return e?.[yn]?.(t), e;
126
126
  }
127
127
  var S = null;
128
128
  function Te(e) {
@@ -158,35 +158,35 @@ function St(e = {}) {
158
158
  function De() {
159
159
  return !rt || S !== null && S.l === null;
160
160
  }
161
- var ue = [];
161
+ var ce = [];
162
162
  function cr() {
163
- var e = ue;
164
- ue = [], vn(e);
163
+ var e = ce;
164
+ ce = [], vn(e);
165
165
  }
166
- function ce(e) {
167
- if (ue.length === 0 && !Me) {
168
- var t = ue;
166
+ function de(e) {
167
+ if (ce.length === 0 && !Me) {
168
+ var t = ce;
169
169
  queueMicrotask(() => {
170
- t === ue && cr();
170
+ t === ce && cr();
171
171
  });
172
172
  }
173
- ue.push(e);
173
+ ce.push(e);
174
174
  }
175
175
  function Hn() {
176
- for (; ue.length > 0; ) cr();
176
+ for (; ce.length > 0; ) cr();
177
177
  }
178
- var Pn = ~(P | _e | V);
178
+ var Pn = ~(q | fe | V);
179
179
  function x(e, t) {
180
180
  e.f = e.f & Pn | t;
181
181
  }
182
182
  function At(e) {
183
- (e.f & 512) !== 0 || e.deps === null ? x(e, V) : x(e, _e);
183
+ (e.f & 512) !== 0 || e.deps === null ? x(e, V) : x(e, fe);
184
184
  }
185
- function dr(e, t, r) {
186
- (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), x(e, V);
185
+ function dr(e, t) {
186
+ (e.f & 2048) !== 0 ? t.set(e, q) : (e.f & 4096) !== 0 && t.get(e) !== 2048 && t.set(e, fe), x(e, V);
187
187
  }
188
188
  function nt(e) {
189
- var t = m, r = g;
189
+ var t = y, r = g;
190
190
  D(null), Q(null);
191
191
  try {
192
192
  return e();
@@ -230,7 +230,7 @@ function jn(e, t, r, n) {
230
230
  }) : f();
231
231
  }
232
232
  function Vn() {
233
- var e = g, t = m, r = S, n = y;
233
+ var e = g, t = y, r = S, n = m;
234
234
  if (0) var i;
235
235
  return function(l = !0) {
236
236
  Q(e), D(t), Te(r), l && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
@@ -238,17 +238,17 @@ function Vn() {
238
238
  }
239
239
  var Dn = !1;
240
240
  function Je(e = !0) {
241
- Dn = !1, Q(null), D(null), Te(null), e && y?.deactivate();
241
+ Dn = !1, Q(null), D(null), Te(null), e && m?.deactivate();
242
242
  }
243
243
  function hr() {
244
- var e = g, t = e.b, r = y, n = !!t?.is_rendered();
244
+ var e = g, t = e.b, r = m, n = !!t?.is_rendered();
245
245
  return t?.update_pending_count(1, r), r.increment(n, e), () => {
246
246
  t?.update_pending_count(-1, r), r.decrement(n, e);
247
247
  };
248
248
  }
249
249
  // @__NO_SIDE_EFFECTS__
250
250
  function He(e) {
251
- var t = 2 | P;
251
+ var t = 2 | q;
252
252
  return g !== null && (g.f |= Ee), {
253
253
  ctx: S,
254
254
  deps: null,
@@ -269,7 +269,7 @@ var Ae = /* @__PURE__ */ Symbol("obsolete");
269
269
  function Bn(e, t, r) {
270
270
  let n = g;
271
271
  n === null && En();
272
- var i = void 0, s = Be(C), l = !m, a = /* @__PURE__ */ new Set();
272
+ var i = void 0, s = Be(C), l = !y, a = /* @__PURE__ */ new Set();
273
273
  return fi(() => {
274
274
  var c = g, v = tr();
275
275
  i = v.promise;
@@ -280,7 +280,7 @@ function Bn(e, t, r) {
280
280
  } catch (o) {
281
281
  v.reject(o), Je();
282
282
  }
283
- var p = y;
283
+ var p = m;
284
284
  if (l) {
285
285
  if ((c.f & 32768) !== 0) var u = hr();
286
286
  if (n.b?.is_rendered()) p.async_deriveds.get(c)?.reject(Ae);
@@ -317,7 +317,7 @@ function zn(e) {
317
317
  var t = e.effects;
318
318
  if (t !== null) {
319
319
  e.effects = null;
320
- for (var r = 0; r < t.length; r += 1) q(t[r]);
320
+ for (var r = 0; r < t.length; r += 1) H(t[r]);
321
321
  }
322
322
  }
323
323
  function It(e) {
@@ -334,11 +334,11 @@ function It(e) {
334
334
  }
335
335
  function _r(e) {
336
336
  var t = It(e);
337
- if (!e.equals(t) && (e.wv = qr(), (!y?.is_fork || e.deps === null) && (y !== null ? (y.capture(e, t, !0), we?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
337
+ if (!e.equals(t) && (e.wv = qr(), (!m?.is_fork || e.deps === null) && (m !== null ? (m.capture(e, t, !0), we?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
338
338
  x(e, V);
339
339
  return;
340
340
  }
341
- ne || (R !== null ? (Nt() || y?.is_fork) && R.set(e, t) : At(e));
341
+ ne || (R !== null ? (Nt() || m?.is_fork) && R.set(e, t) : At(e));
342
342
  }
343
343
  function Un(e) {
344
344
  if (e.effects !== null)
@@ -350,66 +350,60 @@ function pr(e) {
350
350
  if (e.effects !== null)
351
351
  for (const t of e.effects) t.teardown && t.fn !== null && ke(t);
352
352
  }
353
- var Ue = null, ge = null, y = null, we = null, R = null, vt = null, Me = !1, lt = !1, Oe = null, Ke = null, zt = 0;
353
+ var Ue = null, ge = null, m = null, we = null, R = null, vt = null, Me = !1, lt = !1, Oe = null, Ke = null, zt = 0;
354
354
  var Fn = 1, xe = class _t {
355
355
  id = Fn++;
356
- #e = !1;
356
+ started = !1;
357
357
  linked = !0;
358
- #t = null;
359
- #r = null;
358
+ prev = null;
359
+ next = null;
360
360
  async_deriveds = /* @__PURE__ */ new Map();
361
361
  current = /* @__PURE__ */ new Map();
362
362
  previous = /* @__PURE__ */ new Map();
363
- #o = /* @__PURE__ */ new Set();
364
- #i = /* @__PURE__ */ new Set();
365
- #a = 0;
366
- #n = /* @__PURE__ */ new Map();
367
- #l = null;
368
- #s = [];
369
- #p = [];
370
- #f = /* @__PURE__ */ new Set();
371
- #u = /* @__PURE__ */ new Set();
372
- #d = /* @__PURE__ */ new Map();
373
- #g = /* @__PURE__ */ new Set();
363
+ #e = /* @__PURE__ */ new Set();
364
+ #t = /* @__PURE__ */ new Set();
365
+ #r = 0;
366
+ #l = /* @__PURE__ */ new Map();
367
+ #n = null;
368
+ #i = [];
369
+ #a = [];
370
+ #s = /* @__PURE__ */ new Map();
371
+ #o = /* @__PURE__ */ new Map();
372
+ #h = /* @__PURE__ */ new Set();
374
373
  is_fork = !1;
375
- #c = !1;
374
+ #f = !1;
376
375
  constructor() {
377
- ge === null ? Ue = ge = this : (ge.#r = this, this.#t = ge), ge = this;
376
+ ge === null ? Ue = ge = this : (ge.next = this, this.prev = ge), ge = this;
378
377
  }
379
- #w() {
378
+ #_() {
380
379
  if (this.is_fork) return !0;
381
- for (const n of this.#n.keys()) {
382
- for (var t = n, r = !1; t.parent !== null; ) {
383
- if (this.#d.has(t)) {
384
- r = !0;
385
- break;
386
- }
387
- t = t.parent;
388
- }
389
- if (!r) return !0;
390
- }
380
+ for (const t of this.#l.keys()) if (!this.#y(t)) return !0;
381
+ return !1;
382
+ }
383
+ #y(t) {
384
+ for (var r = t; r !== null; r = r.parent) if (this.#o.has(r)) return !0;
391
385
  return !1;
392
386
  }
393
387
  skip_effect(t) {
394
- this.#d.has(t) || this.#d.set(t, {
388
+ this.#o.has(t) || this.#o.set(t, {
395
389
  d: [],
396
390
  m: []
397
- }), this.#g.delete(t);
391
+ }), this.#h.delete(t);
398
392
  }
399
393
  unskip_effect(t, r = (n) => this.schedule(n)) {
400
- var n = this.#d.get(t);
394
+ var n = this.#o.get(t);
401
395
  if (n) {
402
- this.#d.delete(t);
396
+ this.#o.delete(t);
403
397
  for (var i of n.d)
404
- x(i, P), r(i);
398
+ x(i, q), r(i);
405
399
  for (i of n.m)
406
- x(i, _e), r(i);
400
+ x(i, fe), r(i);
407
401
  }
408
- this.#g.add(t);
402
+ this.#h.add(t);
409
403
  }
410
- #$() {
404
+ #u() {
411
405
  var t = [];
412
- for (const s of this.#s)
406
+ for (const s of this.#i)
413
407
  if (!((s.f & 16384) !== 0 || (s.f & 6144) === 0)) {
414
408
  for (var r = s, n = !1; r.parent !== null; ) {
415
409
  r = r.parent;
@@ -424,55 +418,48 @@ var Fn = 1, xe = class _t {
424
418
  }
425
419
  n || t.push(r);
426
420
  }
427
- return this.#s = [], t;
421
+ return this.#i = [], t;
428
422
  }
429
- #m() {
430
- this.#e = !0;
431
- for (const a of this.#f)
432
- this.#u.delete(a), x(a, P), this.schedule(a);
433
- for (const a of this.#u)
434
- x(a, _e), this.schedule(a);
423
+ #p() {
424
+ this.started = !0;
425
+ for (const [a, c] of this.#s)
426
+ x(a, c), this.schedule(a);
435
427
  this.apply();
436
- for (var t = Oe = [], r = [], n = Ke = []; this.#s.length > 0; ) {
437
- zt++ > 1e3 && (this.#_(), Yn());
438
- for (const a of this.#$()) try {
439
- this.#b(a, t, r);
428
+ for (var t = Oe = [], r = [], n = Ke = []; this.#i.length > 0; ) {
429
+ zt++ > 1e3 && (this.#d(), Yn());
430
+ for (const a of this.#u()) try {
431
+ this.#m(a, t, r);
440
432
  } catch (c) {
441
- throw yr(a), this.#w() || this.discard(), c;
433
+ throw mr(a), this.#_() || this.discard(), c;
442
434
  }
443
435
  }
444
- if (y = null, n.length > 0) {
436
+ if (m = null, n.length > 0) {
445
437
  var i = _t.ensure();
446
438
  for (const a of n) i.schedule(a);
447
439
  }
448
- if (Oe = null, Ke = null, this.#w()) {
440
+ if (Oe = null, Ke = null, this.#_()) {
449
441
  this.#v(r), this.#v(t);
450
- for (const [a, c] of this.#d) mr(a, c);
451
- n.length > 0 && y.#m();
442
+ for (const [a, c] of this.#o) yr(a, c);
443
+ n.length > 0 && m.#p();
452
444
  return;
453
445
  }
454
- const s = this.#h();
446
+ const s = this.#w();
455
447
  if (s) {
456
- this.#v(r), this.#v(t), s.#T(this);
448
+ this.#v(r), this.#v(t), s.#c(this);
457
449
  return;
458
450
  }
459
- this.#f.clear(), this.#u.clear();
460
- for (const a of this.#o) a(this);
461
- this.#o.clear(), we = this, Ut(r), Ut(t), we = null, this.#l?.resolve();
462
- var l = y;
463
- if (this.#a === 0 && (this.#s.length === 0 || l !== null) && (this.#_(), le && (this.#y(), y = l)), this.#s.length > 0)
464
- if (l !== null) {
465
- for (const a of this.#s) l.#s.push(a);
466
- this.#s = [];
467
- } else l = this;
468
- l !== null && (Z.clear(), l.#m());
469
- }
470
- #b(t, r, n) {
451
+ this.#s.clear();
452
+ for (const a of this.#e) a(this);
453
+ this.#e.clear(), we = this, Ut(r), Ut(t), we = null, this.#n?.resolve();
454
+ var l = m;
455
+ this.#r === 0 && (this.#i.length === 0 || l !== null) && (this.#d(), le && (this.#b(), m = l)), l !== null && (Z.clear(), l.#p());
456
+ }
457
+ #m(t, r, n) {
471
458
  t.f ^= V;
472
459
  for (var i = t.first; i !== null; ) {
473
460
  var s = i.f, l = (s & 96) !== 0;
474
- if (!(l && (s & 1024) !== 0 || (s & 8192) !== 0 || this.#d.has(i)) && i.fn !== null) {
475
- l ? i.f ^= V : (s & 4) !== 0 ? r.push(i) : le && (s & 16777224) !== 0 ? n.push(i) : ze(i) && ((s & 16) !== 0 && this.#u.add(i), ke(i));
461
+ if (!(l && (s & 1024) !== 0 || (s & 8192) !== 0 || this.#o.has(i)) && i.fn !== null) {
462
+ l ? i.f ^= V : (s & 4) !== 0 ? r.push(i) : le && (s & 16777224) !== 0 ? n.push(i) : ze(i) && ((s & 16) !== 0 && this.add_dirty_reaction(i, fe), ke(i));
476
463
  var a = i.first;
477
464
  if (a !== null) {
478
465
  i = a;
@@ -489,23 +476,24 @@ var Fn = 1, xe = class _t {
489
476
  }
490
477
  }
491
478
  }
492
- #h() {
493
- for (var t = this.#t; t !== null; ) {
494
- if (!t.is_fork) {
495
- for (const [r, [, n]] of this.current) if (t.current.has(r) && !n) return t;
496
- }
497
- t = t.#t;
498
- }
479
+ #w() {
480
+ for (var t = this.prev; t !== null; t = t.prev) if (!t.is_fork && this.#g(t)) return t;
499
481
  return null;
500
482
  }
501
- #T(t) {
483
+ #g(t) {
484
+ for (const [r, [, n]] of this.current)
485
+ if (!n && t.current.has(r))
486
+ return !0;
487
+ return !1;
488
+ }
489
+ #c(t) {
502
490
  for (const [n, i] of t.current)
503
491
  !this.previous.has(n) && t.previous.has(n) && this.previous.set(n, t.previous.get(n)), this.current.set(n, i);
504
492
  for (const [n, i] of t.async_deriveds) {
505
493
  const s = this.async_deriveds.get(n);
506
494
  s && i.promise.then(s.resolve).catch(s.reject);
507
495
  }
508
- t.async_deriveds.clear(), this.transfer_effects(t.#f, t.#u);
496
+ t.async_deriveds.clear(), this.transfer_reactions(t.#s);
509
497
  const r = (n) => {
510
498
  var i = n.reactions;
511
499
  if (i !== null && !((n.f & 2) !== 0 && (n.f & 6144) === 0))
@@ -514,43 +502,43 @@ var Fn = 1, xe = class _t {
514
502
  if ((s & 2) !== 0) r(a);
515
503
  else {
516
504
  var l = a;
517
- s & 4194320 && !this.async_deriveds.has(l) && (this.#u.delete(l), x(l, P), this.schedule(l));
505
+ s & 4194320 && !this.async_deriveds.has(l) && (this.#s.delete(l), x(l, q), this.schedule(l));
518
506
  }
519
507
  }
520
508
  };
521
509
  for (const n of this.current.keys()) r(n);
522
- this.oncommit(() => t.discard()), t.#_(), y = this, this.#m();
510
+ this.oncommit(() => t.discard()), t.#d(), m = this, this.#p();
523
511
  }
524
512
  #v(t) {
525
- for (var r = 0; r < t.length; r += 1) dr(t[r], this.#f, this.#u);
513
+ for (var r = 0; r < t.length; r += 1) dr(t[r], this.#s);
526
514
  }
527
515
  capture(t, r, n = !1) {
528
516
  t.v !== C && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), R?.set(t, r)), this.is_fork || (t.v = r);
529
517
  }
530
518
  activate() {
531
- y = this;
519
+ m = this;
532
520
  }
533
521
  deactivate() {
534
- y = null, R = null;
522
+ m = null, R = null;
535
523
  }
536
524
  flush() {
537
525
  try {
538
- lt = !0, y = this, this.#m();
526
+ lt = !0, m = this, this.#p();
539
527
  } finally {
540
- zt = 0, vt = null, Oe = null, Ke = null, lt = !1, y = null, R = null, Z.clear();
528
+ zt = 0, vt = null, Oe = null, Ke = null, lt = !1, m = null, R = null, Z.clear();
541
529
  }
542
530
  }
543
531
  discard() {
544
- for (const t of this.#i) t(this);
545
- this.#i.clear();
532
+ for (const t of this.#t) t(this);
533
+ this.#t.clear();
546
534
  for (const t of this.async_deriveds.values()) t.reject(Ae);
547
- this.#_(), this.#l?.resolve();
535
+ this.#d(), this.#n?.resolve();
548
536
  }
549
537
  register_created_effect(t) {
550
- this.#p.push(t);
538
+ this.#a.push(t);
551
539
  }
552
- #y() {
553
- for (let u = Ue; u !== null; u = u.#r) {
540
+ #b() {
541
+ for (let u = Ue; u !== null; u = u.next) {
554
542
  var t = u.id < this.id, r = [];
555
543
  for (const [f, [o, d]] of this.current) {
556
544
  if (u.current.has(f)) {
@@ -565,12 +553,12 @@ var Fn = 1, xe = class _t {
565
553
  d && o.promise.then(d.resolve).catch(d.reject);
566
554
  }
567
555
  var i = [...u.current.keys()].filter((f) => !u.current.get(f)[1]);
568
- if (!(!u.#e || i.length === 0)) {
556
+ if (!(!u.started || i.length === 0)) {
569
557
  var s = i.filter((f) => !this.current.has(f));
570
558
  if (s.length === 0)
571
559
  t && u.discard();
572
560
  else if (r.length > 0) {
573
- if (t) for (const f of this.#g) u.unskip_effect(f, (o) => {
561
+ if (t) for (const f of this.#h) u.unskip_effect(f, (o) => {
574
562
  (o.f & 4194320) !== 0 ? u.schedule(o) : u.#v([o]);
575
563
  });
576
564
  u.activate();
@@ -582,10 +570,10 @@ var Fn = 1, xe = class _t {
582
570
  return d ? d[0] !== o[0] || d[1] !== o[1] : !0;
583
571
  }).map(([f]) => f);
584
572
  if (v.length > 0)
585
- for (const f of this.#p) (f.f & 155648) === 0 && Ct(f, v, a) && ((f.f & 4194320) !== 0 ? (x(f, P), u.schedule(f)) : u.#f.add(f));
586
- if (u.#s.length > 0 && !u.#c) {
573
+ for (const f of this.#a) (f.f & 155648) === 0 && Ct(f, v, a) && ((f.f & 4194320) !== 0 ? (x(f, q), u.schedule(f)) : u.add_dirty_reaction(f, q));
574
+ if (u.#i.length > 0 && !u.#f) {
587
575
  u.apply();
588
- for (var p of u.#$()) u.#b(p, [], []);
576
+ for (var p of u.#u()) u.#m(p, [], []);
589
577
  }
590
578
  u.deactivate();
591
579
  }
@@ -593,75 +581,67 @@ var Fn = 1, xe = class _t {
593
581
  }
594
582
  }
595
583
  increment(t, r) {
596
- if (this.#a += 1, t) {
597
- let n = this.#n.get(r) ?? 0;
598
- this.#n.set(r, n + 1);
584
+ if (this.#r += 1, t) {
585
+ let n = this.#l.get(r) ?? 0;
586
+ this.#l.set(r, n + 1);
599
587
  }
600
588
  }
601
589
  decrement(t, r) {
602
- if (this.#a -= 1, t) {
603
- let n = this.#n.get(r) ?? 0;
604
- n === 1 ? this.#n.delete(r) : this.#n.set(r, n - 1);
590
+ if (this.#r -= 1, t) {
591
+ let n = this.#l.get(r) ?? 0;
592
+ n === 1 ? this.#l.delete(r) : this.#l.set(r, n - 1);
605
593
  }
606
- this.#c || (this.#c = !0, ce(() => {
607
- this.#c = !1, this.linked && this.flush();
594
+ this.#f || (this.#f = !0, de(() => {
595
+ this.#f = !1, this.linked && this.flush();
608
596
  }));
609
597
  }
610
- transfer_effects(t, r) {
611
- for (const n of t) this.#f.add(n);
612
- for (const n of r) this.#u.add(n);
613
- t.clear(), r.clear();
598
+ transfer_reactions(t) {
599
+ for (const [r, n] of t) this.add_dirty_reaction(r, n);
600
+ t.clear();
601
+ }
602
+ add_dirty_reaction(t, r) {
603
+ (r === 2048 || this.#s.get(t) !== 2048) && this.#s.set(t, r);
614
604
  }
615
605
  oncommit(t) {
616
- this.#o.add(t);
606
+ this.#e.add(t);
617
607
  }
618
608
  ondiscard(t) {
619
- this.#i.add(t);
609
+ this.#t.add(t);
620
610
  }
621
611
  settled() {
622
- return (this.#l ??= tr()).promise;
612
+ return (this.#n ??= tr()).promise;
623
613
  }
624
614
  static ensure() {
625
- if (y === null) {
626
- const t = y = new _t();
627
- !lt && !Me && ce(() => {
628
- t.#e || t.flush();
615
+ if (m === null) {
616
+ const t = m = new _t();
617
+ !lt && !Me && de(() => {
618
+ t.started || t.flush();
629
619
  });
630
620
  }
631
- return y;
621
+ return m;
632
622
  }
633
623
  apply() {
634
- if (!le || !this.is_fork && this.#t === null && this.#r === null) {
624
+ if (!le || !this.is_fork && this.prev === null && this.next === null) {
635
625
  R = null;
636
626
  return;
637
627
  }
638
628
  R = /* @__PURE__ */ new Map();
639
- for (const [r, [n]] of this.current) R.set(r, n);
640
- for (let r = Ue; r !== null; r = r.#r)
641
- if (!(r === this || r.is_fork)) {
642
- var t = !1;
643
- if (r.id < this.id) {
644
- for (const [n, [, i]] of r.current)
645
- if (!i && this.current.has(n)) {
646
- t = !0;
647
- break;
648
- }
649
- }
650
- if (!t)
651
- for (const [n, i] of r.previous) R.has(n) || R.set(n, i);
652
- }
629
+ for (const [t, [r]] of this.current) R.set(t, r);
630
+ for (let t = Ue; t !== null; t = t.next)
631
+ if (!(t === this || t.is_fork) && (t.id >= this.id || !t.#g(this)))
632
+ for (const [r, n] of t.previous) R.has(r) || R.set(r, n);
653
633
  }
654
634
  schedule(t) {
655
635
  if (vt = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
656
636
  t.b.defer_effect(t);
657
637
  return;
658
638
  }
659
- this.#s.push(t);
639
+ this.#i.push(t);
660
640
  }
661
- #_() {
641
+ #d() {
662
642
  if (this.linked) {
663
- var t = this.#t, r = this.#r;
664
- t === null ? Ue = r : t.#r = r, r === null ? ge = t : r.#t = t, this.linked = !1;
643
+ var t = this.prev, r = this.next;
644
+ t === null ? Ue = r : t.next = r, r === null ? ge = t : r.prev = t, this.linked = !1;
665
645
  }
666
646
  }
667
647
  };
@@ -671,8 +651,8 @@ function X(e) {
671
651
  try {
672
652
  var n;
673
653
  for (e && (X(), n = e()); ; ) {
674
- if (Hn(), y === null) return n;
675
- y.flush();
654
+ if (Hn(), m === null) return n;
655
+ m.flush();
676
656
  }
677
657
  } finally {
678
658
  Me = t, we = r;
@@ -681,7 +661,7 @@ function X(e) {
681
661
  function Yn() {
682
662
  if (0) {
683
663
  var e;
684
- for (const r of y.current.keys()) for (const [n, i] of r.updated ?? [])
664
+ for (const r of m.current.keys()) for (const [n, i] of r.updated ?? [])
685
665
  var t;
686
666
  }
687
667
  try {
@@ -719,7 +699,7 @@ function gr(e, t, r, n) {
719
699
  if (!r.has(e) && (r.add(e), e.reactions !== null))
720
700
  for (const i of e.reactions) {
721
701
  const s = i.f;
722
- (s & 2) !== 0 ? gr(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && Ct(i, t, n) && (x(i, P), Mt(i));
702
+ (s & 2) !== 0 ? gr(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && Ct(i, t, n) && (x(i, q), Mt(i));
723
703
  }
724
704
  }
725
705
  function Ct(e, t, r) {
@@ -733,19 +713,19 @@ function Ct(e, t, r) {
733
713
  return r.set(e, !1), !1;
734
714
  }
735
715
  function Mt(e) {
736
- y.schedule(e);
716
+ m.schedule(e);
737
717
  }
738
- function mr(e, t) {
718
+ function yr(e, t) {
739
719
  if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
740
720
  (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), x(e, V);
741
721
  for (var r = e.first; r !== null; )
742
- mr(r, t), r = r.next;
722
+ yr(r, t), r = r.next;
743
723
  }
744
724
  }
745
- function yr(e) {
725
+ function mr(e) {
746
726
  x(e, V);
747
727
  for (var t = e.first; t !== null; )
748
- yr(t), t = t.next;
728
+ mr(t), t = t.next;
749
729
  }
750
730
  var Qe = /* @__PURE__ */ new Set(), Z = /* @__PURE__ */ new Map();
751
731
  var br = !1;
@@ -771,11 +751,11 @@ function Gn(e, t = !1, r = !0) {
771
751
  return t || (n.equals = ur), rt && r && S !== null && S.l !== null && (S.l.s ??= []).push(n), n;
772
752
  }
773
753
  function O(e, t, r = !1) {
774
- m !== null && (!U || (m.f & 131072) !== 0) && De() && (m.f & 4325394) !== 0 && (J === null || !J.has(e)) && Nn();
754
+ y !== null && (!U || (y.f & 131072) !== 0) && De() && (y.f & 4325394) !== 0 && (J === null || !J.has(e)) && Nn();
775
755
  let n = r ? be(t) : t;
776
756
  return et(e, n, Ke);
777
757
  }
778
- var fe = null, pt = 0;
758
+ var ue = null, pt = 0;
779
759
  function et(e, t, r = null) {
780
760
  if (!e.equals(t)) {
781
761
  ne ? Z.set(e, t) : Z.has(e) || Z.set(e, e.v);
@@ -784,14 +764,14 @@ function et(e, t, r = null) {
784
764
  const i = e;
785
765
  (e.f & 2048) !== 0 && It(i), R === null && At(i);
786
766
  }
787
- e.wv = qr(), fe = null, pt = 0, wr(e, P, r), fe = null, De() && g !== null && (g.f & 1024) !== 0 && (g.f & 96) === 0 && (j === null ? vi([e]) : j.push(e)), !n.is_fork && Qe.size > 0 && !br && Kn();
767
+ e.wv = qr(), ue = null, pt = 0, wr(e, q, r), ue = null, De() && g !== null && (g.f & 1024) !== 0 && (g.f & 96) === 0 && (j === null ? vi([e]) : j.push(e)), !n.is_fork && Qe.size > 0 && !br && Kn();
788
768
  }
789
769
  return t;
790
770
  }
791
771
  function Kn() {
792
772
  br = !1;
793
773
  for (const e of Qe) {
794
- (e.f & 1024) !== 0 && x(e, _e);
774
+ (e.f & 1024) !== 0 && x(e, fe);
795
775
  let t;
796
776
  try {
797
777
  t = ze(e);
@@ -809,18 +789,18 @@ function wr(e, t, r) {
809
789
  var n = e.reactions;
810
790
  if (n !== null) {
811
791
  var i = De(), s = n.length;
812
- if (pt += s, pt > 1e5 && fe === null && (fe = /* @__PURE__ */ new Set()), fe !== null) {
813
- if (fe.has(e)) return;
814
- fe.add(e);
792
+ if (pt += s, pt > 1e5 && ue === null && (ue = /* @__PURE__ */ new Set()), ue !== null) {
793
+ if (ue.has(e)) return;
794
+ ue.add(e);
815
795
  }
816
796
  for (var l = 0; l < s; l++) {
817
797
  var a = n[l], c = a.f;
818
798
  if (!(!i && a === g)) {
819
- var v = (c & P) === 0;
799
+ var v = (c & q) === 0;
820
800
  if (v && x(a, t), (c & 131072) !== 0) Qe.add(a);
821
801
  else if ((c & 2) !== 0) {
822
802
  var p = a;
823
- R?.delete(p), wr(p, _e, r);
803
+ R?.delete(p), wr(p, fe, r);
824
804
  } else if (v) {
825
805
  var u = a;
826
806
  (c & 16) !== 0 && K !== null && K.add(u), r !== null ? r.push(u) : Mt(u);
@@ -834,9 +814,9 @@ function be(e) {
834
814
  if (typeof e != "object" || e === null || Ce in e || nr in e) return e;
835
815
  const t = er(e);
836
816
  if (t !== cn && t !== dn) return e;
837
- var r = /* @__PURE__ */ new Map(), n = ln(e), i = /* @__PURE__ */ N(0), s = null, l = ve, a = (u) => {
838
- if (ve === l) return u();
839
- var f = m, o = ve;
817
+ var r = /* @__PURE__ */ new Map(), n = ln(e), i = /* @__PURE__ */ N(0), s = null, l = _e, a = (u) => {
818
+ if (_e === l) return u();
819
+ var f = y, o = _e;
840
820
  D(null), Kt(l);
841
821
  var d = u();
842
822
  return D(f), Kt(o), d;
@@ -874,8 +854,8 @@ function be(e) {
874
854
  get(u, f, o) {
875
855
  if (f === Ce) return e;
876
856
  var d = r.get(f), _ = f in u;
877
- if (d === void 0 && (!_ || he(u, f)?.writable) && (d = a(() => {
878
- var T = be(_ ? u[f] : C), A = /* @__PURE__ */ N(T, s);
857
+ if (d === void 0 && (!_ || ve(u, f)?.writable) && (d = a(() => {
858
+ var k = be(_ ? u[f] : C), A = /* @__PURE__ */ N(k, s);
879
859
  return A;
880
860
  }), r.set(f, d)), d !== void 0) {
881
861
  var $ = h(d);
@@ -902,19 +882,19 @@ function be(e) {
902
882
  has(u, f) {
903
883
  if (f === Ce) return !0;
904
884
  var o = r.get(f), d = o !== void 0 && o.v !== C || Reflect.has(u, f);
905
- return (o !== void 0 || g !== null && (!d || he(u, f)?.writable)) && (o === void 0 && (o = a(() => {
885
+ return (o !== void 0 || (g !== null || y !== null) && (!d || ve(u, f)?.writable)) && (o === void 0 && (o = a(() => {
906
886
  var _ = d ? be(u[f]) : C, $ = /* @__PURE__ */ N(_, s);
907
887
  return $;
908
888
  }), r.set(f, o)), h(o) === C) ? !1 : d;
909
889
  },
910
890
  set(u, f, o, d) {
911
891
  var _ = r.get(f), $ = f in u;
912
- if (n && f === "length") for (var T = o; T < _.v; T += 1) {
913
- var A = r.get(T + "");
914
- A !== void 0 ? O(A, C) : T in u && (A = a(() => /* @__PURE__ */ N(C, s)), r.set(T + "", A));
892
+ if (n && f === "length") for (var k = o; k < _.v; k += 1) {
893
+ var A = r.get(k + "");
894
+ A !== void 0 ? O(A, C) : k in u && (A = a(() => /* @__PURE__ */ N(C, s)), r.set(k + "", A));
915
895
  }
916
896
  if (_ === void 0)
917
- (!$ || he(u, f)?.writable) && (_ = a(() => /* @__PURE__ */ N(void 0, s)), O(_, be(o)), r.set(f, _));
897
+ (!$ || ve(u, f)?.writable) && (_ = a(() => /* @__PURE__ */ N(void 0, s)), O(_, be(o)), r.set(f, _));
918
898
  else {
919
899
  $ = _.v !== C;
920
900
  var Y = a(() => be(o));
@@ -952,7 +932,7 @@ function gt() {
952
932
  if (Ft === void 0) {
953
933
  Ft = window, Zn = document, $r = /Firefox/.test(navigator.userAgent);
954
934
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
955
- Tr = he(t, "firstChild").get, kr = he(t, "nextSibling").get, Vt(e) && (e[dt] = void 0, e[sr] = null, e[yn] = void 0, e.__e = void 0), Vt(r) && (r[ht] = void 0);
935
+ Tr = ve(t, "firstChild").get, kr = ve(t, "nextSibling").get, Vt(e) && (e[dt] = void 0, e[sr] = null, e[mn] = void 0, e.__e = void 0), Vt(r) && (r[ht] = void 0);
956
936
  }
957
937
  }
958
938
  function re(e = "") {
@@ -967,7 +947,7 @@ function ie(e) {
967
947
  return kr.call(e);
968
948
  }
969
949
  function Er(e, t) {
970
- if (!k) return /* @__PURE__ */ pe(e);
950
+ if (!T) return /* @__PURE__ */ pe(e);
971
951
  var r = /* @__PURE__ */ pe(w);
972
952
  if (r === null) r = w.appendChild(re());
973
953
  else if (t && r.nodeType !== 3) {
@@ -977,7 +957,7 @@ function Er(e, t) {
977
957
  return t && Rt(r), F(r), r;
978
958
  }
979
959
  function Jn(e, t = !1) {
980
- if (!k) {
960
+ if (!T) {
981
961
  var r = /* @__PURE__ */ pe(e);
982
962
  return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ie(r) : r;
983
963
  }
@@ -991,15 +971,15 @@ function Jn(e, t = !1) {
991
971
  return w;
992
972
  }
993
973
  function Qn(e, t = !1) {
994
- if (!k) return /* @__PURE__ */ pe(e);
974
+ if (!T) return /* @__PURE__ */ pe(e);
995
975
  var r = Er(e, t);
996
976
  return ar(e), r;
997
977
  }
998
978
  function ei(e, t = 1, r = !1) {
999
- let n = k ? w : e;
979
+ let n = T ? w : e;
1000
980
  for (var i; t--; )
1001
981
  i = n, n = /* @__PURE__ */ ie(n);
1002
- if (!k) return n;
982
+ if (!T) return n;
1003
983
  if (r) {
1004
984
  if (n?.nodeType !== 3) {
1005
985
  var s = re();
@@ -1027,7 +1007,7 @@ function Rt(e) {
1027
1007
  function ni(e) {
1028
1008
  var t = g;
1029
1009
  if (t === null)
1030
- return m.f |= Ze, e;
1010
+ return y.f |= Ze, e;
1031
1011
  if ((t.f & 32768) === 0 && (t.f & 4) === 0)
1032
1012
  throw e;
1033
1013
  W(e, t);
@@ -1051,7 +1031,7 @@ function W(e, t) {
1051
1031
  }
1052
1032
  }
1053
1033
  function ii(e) {
1054
- g === null && (m === null && An(e), Sn()), ne && xn(e);
1034
+ g === null && (y === null && An(e), Sn()), ne && xn(e);
1055
1035
  }
1056
1036
  function si(e, t) {
1057
1037
  var r = t.last;
@@ -1064,7 +1044,7 @@ function ee(e, t) {
1064
1044
  ctx: S,
1065
1045
  deps: null,
1066
1046
  nodes: null,
1067
- f: e | P | 512,
1047
+ f: e | q | 512,
1068
1048
  first: null,
1069
1049
  fn: t,
1070
1050
  last: null,
@@ -1076,7 +1056,7 @@ function ee(e, t) {
1076
1056
  wv: 0,
1077
1057
  ac: null
1078
1058
  };
1079
- y?.register_created_effect(n);
1059
+ m?.register_created_effect(n);
1080
1060
  var i = n;
1081
1061
  if ((e & 4) !== 0)
1082
1062
  Oe !== null ? Oe.push(n) : xe.ensure().schedule(n);
@@ -1084,18 +1064,18 @@ function ee(e, t) {
1084
1064
  try {
1085
1065
  ke(n);
1086
1066
  } catch (l) {
1087
- throw q(n), l;
1067
+ throw H(n), l;
1088
1068
  }
1089
1069
  i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= Tt));
1090
1070
  }
1091
- if (i !== null && (i.parent = r, r !== null && si(i, r), m !== null && (m.f & 2) !== 0 && (e & 64) === 0)) {
1092
- var s = m;
1071
+ if (i !== null && (i.parent = r, r !== null && si(i, r), y !== null && (y.f & 2) !== 0 && (e & 64) === 0)) {
1072
+ var s = y;
1093
1073
  (s.effects ??= []).push(i);
1094
1074
  }
1095
1075
  return n;
1096
1076
  }
1097
1077
  function Nt() {
1098
- return m !== null && !U;
1078
+ return y !== null && !U;
1099
1079
  }
1100
1080
  function ai(e) {
1101
1081
  const t = ee(8, null);
@@ -1104,7 +1084,7 @@ function ai(e) {
1104
1084
  function Fe(e) {
1105
1085
  ii("$effect");
1106
1086
  var t = g.f;
1107
- if (!m && (t & 32) !== 0 && S !== null && !S.i) {
1087
+ if (!y && (t & 32) !== 0 && S !== null && !S.i) {
1108
1088
  var r = S;
1109
1089
  (r.e ??= []).push(e);
1110
1090
  } else return xr(e);
@@ -1116,7 +1096,7 @@ function li(e) {
1116
1096
  xe.ensure();
1117
1097
  const t = ee(64 | Ee, e);
1118
1098
  return () => {
1119
- q(t);
1099
+ H(t);
1120
1100
  };
1121
1101
  }
1122
1102
  function oi(e) {
@@ -1124,8 +1104,8 @@ function oi(e) {
1124
1104
  const t = ee(64 | Ee, e);
1125
1105
  return (r = {}) => new Promise((n) => {
1126
1106
  r.outro ? Ne(t, () => {
1127
- q(t), n(void 0);
1128
- }) : (q(t), n(void 0));
1107
+ H(t), n(void 0);
1108
+ }) : (H(t), n(void 0));
1129
1109
  });
1130
1110
  }
1131
1111
  function Sr(e) {
@@ -1154,7 +1134,7 @@ function te(e) {
1154
1134
  function Ir(e) {
1155
1135
  var t = e.teardown;
1156
1136
  if (t !== null) {
1157
- const r = ne, n = m;
1137
+ const r = ne, n = y;
1158
1138
  Gt(!0), D(null);
1159
1139
  try {
1160
1140
  t.call(null);
@@ -1173,16 +1153,16 @@ function qt(e, t = !1) {
1173
1153
  i.abort(Ve);
1174
1154
  });
1175
1155
  var n = r.next;
1176
- (r.f & 64) !== 0 ? r.parent = null : q(r, t), r = n;
1156
+ (r.f & 64) !== 0 ? r.parent = null : H(r, t), r = n;
1177
1157
  }
1178
1158
  }
1179
1159
  function ci(e) {
1180
1160
  for (var t = e.first; t !== null; ) {
1181
1161
  var r = t.next;
1182
- (t.f & 32) === 0 && q(t), t = r;
1162
+ (t.f & 32) === 0 && H(t), t = r;
1183
1163
  }
1184
1164
  }
1185
- function q(e, t = !0) {
1165
+ function H(e, t = !0) {
1186
1166
  var r = !1;
1187
1167
  (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (di(e.nodes.start, e.nodes.end), r = !0), e.f |= ct, qt(e, t && !r), Pe(e, 0);
1188
1168
  var n = e.nodes && e.nodes.t;
@@ -1205,7 +1185,7 @@ function Ne(e, t, r = !0) {
1205
1185
  var n = [];
1206
1186
  e.f |= 256, Mr(e, n, !0);
1207
1187
  var i = () => {
1208
- r && q(e), t && t();
1188
+ r && H(e), t && t();
1209
1189
  }, s = n.length;
1210
1190
  if (s > 0) {
1211
1191
  var l = () => --s || i();
@@ -1233,7 +1213,7 @@ function Yt(e) {
1233
1213
  }
1234
1214
  function Or(e, t) {
1235
1215
  if ((e.f & 256) === 0 && (e.f & 8192) !== 0) {
1236
- e.f ^= wt, (e.f & 1024) === 0 && (x(e, P), xe.ensure().schedule(e));
1216
+ e.f ^= wt, (e.f & 1024) === 0 && (x(e, q), xe.ensure().schedule(e));
1237
1217
  for (var r = e.first; r !== null; ) {
1238
1218
  var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1239
1219
  Or(r, i ? t : !1), r = n;
@@ -1254,9 +1234,9 @@ var hi = null, ne = !1;
1254
1234
  function Gt(e) {
1255
1235
  ne = e;
1256
1236
  }
1257
- var m = null, U = !1;
1237
+ var y = null, U = !1;
1258
1238
  function D(e) {
1259
- m = e;
1239
+ y = e;
1260
1240
  }
1261
1241
  var g = null;
1262
1242
  function Q(e) {
@@ -1264,15 +1244,15 @@ function Q(e) {
1264
1244
  }
1265
1245
  var J = null;
1266
1246
  function Nr(e) {
1267
- m !== null && (!le && (m.f & 2097152) !== 0 || (m.f & 2) !== 0) && (J ??= /* @__PURE__ */ new Set()).add(e);
1247
+ y !== null && (!le && (y.f & 2097152) !== 0 || (y.f & 2) !== 0) && (J ??= /* @__PURE__ */ new Set()).add(e);
1268
1248
  }
1269
- var L = null, H = 0, j = null;
1249
+ var L = null, P = 0, j = null;
1270
1250
  function vi(e) {
1271
1251
  j = e;
1272
1252
  }
1273
- var Lr = 1, de = 0, ve = de;
1253
+ var Lr = 1, he = 0, _e = he;
1274
1254
  function Kt(e) {
1275
- ve = e;
1255
+ _e = e;
1276
1256
  }
1277
1257
  function qr() {
1278
1258
  return ++Lr;
@@ -1294,12 +1274,12 @@ function Hr(e, t, r = !0) {
1294
1274
  if (n !== null && !(!le && J !== null && J.has(e)))
1295
1275
  for (var i = 0; i < n.length; i++) {
1296
1276
  var s = n[i];
1297
- (s.f & 2) !== 0 ? Hr(s, t, !1) : t === s && (r ? x(s, P) : (s.f & 1024) !== 0 && x(s, _e), Mt(s));
1277
+ (s.f & 2) !== 0 ? Hr(s, t, !1) : t === s && (r ? x(s, q) : (s.f & 1024) !== 0 && x(s, fe), Mt(s));
1298
1278
  }
1299
1279
  }
1300
1280
  function Pr(e) {
1301
- var t = L, r = H, n = j, i = m, s = J, l = S, a = U, c = ve, v = e.f;
1302
- L = null, H = 0, j = null, m = (v & 96) === 0 ? e : null, J = null, Te(e.ctx), U = !1, ve = ++de, e.ac !== null && (nt(() => {
1281
+ var t = L, r = P, n = j, i = y, s = J, l = S, a = U, c = _e, v = e.f;
1282
+ L = null, P = 0, j = null, y = (v & 96) === 0 ? e : null, J = null, Te(e.ctx), U = !1, _e = ++he, e.ac !== null && (nt(() => {
1303
1283
  e.ac.abort(Ve);
1304
1284
  }), e.ac = null);
1305
1285
  try {
@@ -1309,26 +1289,26 @@ function Pr(e) {
1309
1289
  var f = Wt(e);
1310
1290
  if (De() && j !== null && !U && f !== null && (e.f & 6146) === 0) for (var o = 0; o < j.length; o++) Hr(j[o], e);
1311
1291
  if (i !== null && i !== e) {
1312
- if (de++, i.deps !== null) for (let d = 0; d < r; d += 1) i.deps[d].rv = de;
1313
- if (t !== null) for (const d of t) d.rv = de;
1292
+ if (he++, i.deps !== null) for (let d = 0; d < r; d += 1) i.deps[d].rv = he;
1293
+ if (t !== null) for (const d of t) d.rv = he;
1314
1294
  j !== null && (n === null ? n = j : n.push(...j));
1315
1295
  }
1316
1296
  return (e.f & 8388608) !== 0 && (e.f ^= Ze), u;
1317
1297
  } catch (d) {
1318
1298
  return Wt(e), ni(d);
1319
1299
  } finally {
1320
- e.f ^= Dt, L = t, H = r, j = n, m = i, J = s, Te(l), U = a, ve = c;
1300
+ e.f ^= Dt, L = t, P = r, j = n, y = i, J = s, Te(l), U = a, _e = c;
1321
1301
  }
1322
1302
  }
1323
1303
  function Wt(e) {
1324
- var t = e.deps, r = y?.is_fork;
1304
+ var t = e.deps, r = m?.is_fork;
1325
1305
  if (L !== null) {
1326
1306
  var n;
1327
- if (r || Pe(e, H), t !== null && H > 0)
1328
- for (t.length = H + L.length, n = 0; n < L.length; n++) t[H + n] = L[n];
1307
+ if (r || Pe(e, P), t !== null && P > 0)
1308
+ for (t.length = P + L.length, n = 0; n < L.length; n++) t[P + n] = L[n];
1329
1309
  else e.deps = t = L;
1330
- if (Nt() && (e.f & 512) !== 0) for (n = H; n < t.length; n++) (t[n].reactions ??= []).push(e);
1331
- } else !r && t !== null && H < t.length && (Pe(e, H), t.length = H);
1310
+ if (Nt() && (e.f & 512) !== 0) for (n = P; n < t.length; n++) (t[n].reactions ??= []).push(e);
1311
+ } else !r && t !== null && P < t.length && (Pe(e, P), t.length = P);
1332
1312
  return t;
1333
1313
  }
1334
1314
  function _i(e, t) {
@@ -1343,7 +1323,7 @@ function _i(e, t) {
1343
1323
  if (r === null && (t.f & 2) !== 0 && (L === null || !Le.call(L, t))) {
1344
1324
  var s = t;
1345
1325
  (s.f & 512) !== 0 && (s.f ^= 512), s.v !== C && At(s), s.ac !== null && nt(() => {
1346
- s.ac.abort(Ve), s.ac = null, x(s, P);
1326
+ s.ac.abort(Ve), s.ac = null, x(s, q);
1347
1327
  }), Un(s), Pe(s, 0);
1348
1328
  }
1349
1329
  }
@@ -1371,20 +1351,20 @@ function ke(e) {
1371
1351
  }
1372
1352
  function h(e) {
1373
1353
  var t = (e.f & 2) !== 0;
1374
- if (hi?.add(e), m !== null && !U && !(g !== null && (g.f & 16384) !== 0) && (J === null || !J.has(e))) {
1375
- var r = m.deps;
1376
- if ((m.f & 2097152) !== 0)
1377
- e.rv < de && (e.rv = de, L === null && r !== null && r[H] === e ? H++ : L === null ? L = [e] : L.push(e));
1354
+ if (hi?.add(e), y !== null && !U && !(g !== null && (g.f & 16384) !== 0) && (J === null || !J.has(e))) {
1355
+ var r = y.deps;
1356
+ if ((y.f & 2097152) !== 0)
1357
+ e.rv < he && (e.rv = he, L === null && r !== null && r[P] === e ? P++ : L === null ? L = [e] : L.push(e));
1378
1358
  else {
1379
- m.deps ??= [], Le.call(m.deps, e) || m.deps.push(e);
1359
+ y.deps ??= [], Le.call(y.deps, e) || y.deps.push(e);
1380
1360
  var n = e.reactions;
1381
- n === null ? e.reactions = [m] : Le.call(n, m) || n.push(m);
1361
+ n === null ? e.reactions = [y] : Le.call(n, y) || n.push(y);
1382
1362
  }
1383
1363
  }
1384
1364
  if (0) {
1385
- if (!U && reactivity_loss_tracker && y === null && we === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1365
+ if (!U && reactivity_loss_tracker && m === null && we === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1386
1366
  var i;
1387
- if (tracing_mode_flag && !U && tracing_expressions !== null && m !== null && tracing_expressions.reaction === m && !e.trace) {
1367
+ if (tracing_mode_flag && !U && tracing_expressions !== null && y !== null && tracing_expressions.reaction === y && !e.trace) {
1388
1368
  if (i)
1389
1369
  var s, l;
1390
1370
  }
@@ -1396,7 +1376,7 @@ function h(e) {
1396
1376
  var c = a.v;
1397
1377
  return ((a.f & 1024) === 0 && a.reactions !== null || Vr(a)) && (c = It(a)), Z.set(a, c), c;
1398
1378
  }
1399
- var v = (a.f & 512) === 0 && !U && m !== null && (m.f & 512) !== 0, p = (a.f & $t) === 0;
1379
+ var v = (a.f & 512) === 0 && !U && y !== null && (y.f & 512) !== 0, p = (a.f & $t) === 0;
1400
1380
  ze(a) && (v && (a.f |= 512), _r(a)), v && !p && (pr(a), jr(a));
1401
1381
  }
1402
1382
  if (R?.has(e)) return R.get(e);
@@ -1425,13 +1405,13 @@ function je(e) {
1425
1405
  U = t;
1426
1406
  }
1427
1407
  }
1428
- var Ie = /* @__PURE__ */ Symbol("events"), Dr = /* @__PURE__ */ new Set(), mt = /* @__PURE__ */ new Set();
1408
+ var Ie = /* @__PURE__ */ Symbol("events"), Dr = /* @__PURE__ */ new Set(), yt = /* @__PURE__ */ new Set();
1429
1409
  function pi(e, t, r) {
1430
1410
  (t[Ie] ??= {})[e] = r;
1431
1411
  }
1432
1412
  function gi(e) {
1433
1413
  for (var t = 0; t < e.length; t++) Dr.add(e[t]);
1434
- for (var r of mt) r(e);
1414
+ for (var r of yt) r(e);
1435
1415
  }
1436
1416
  var ot = null, ft = !1;
1437
1417
  function Xt(e) {
@@ -1457,7 +1437,7 @@ function Xt(e) {
1457
1437
  return s || r;
1458
1438
  }
1459
1439
  });
1460
- var p = m, u = g;
1440
+ var p = y, u = g;
1461
1441
  D(null), Q(null);
1462
1442
  try {
1463
1443
  for (var f, o = []; s !== null && s !== t; ) {
@@ -1481,13 +1461,13 @@ function Xt(e) {
1481
1461
  }
1482
1462
  }
1483
1463
  }
1484
- var mi = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1485
- function yi(e) {
1486
- return mi?.createHTML(e) ?? e;
1464
+ var yi = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1465
+ function mi(e) {
1466
+ return yi?.createHTML(e) ?? e;
1487
1467
  }
1488
1468
  function bi(e) {
1489
1469
  var t = Ot("template");
1490
- return t.innerHTML = yi(e.replaceAll("<!>", "<!---->")), t.content;
1470
+ return t.innerHTML = mi(e.replaceAll("<!>", "<!---->")), t.content;
1491
1471
  }
1492
1472
  function $e(e, t) {
1493
1473
  var r = g;
@@ -1502,7 +1482,7 @@ function $e(e, t) {
1502
1482
  function wi(e, t) {
1503
1483
  var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
1504
1484
  return () => {
1505
- if (k)
1485
+ if (T)
1506
1486
  return $e(w, null), w;
1507
1487
  i === void 0 && (i = bi(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ pe(i)));
1508
1488
  var l = n || $r ? document.importNode(i, !0) : i.cloneNode(!0);
@@ -1514,13 +1494,13 @@ function wi(e, t) {
1514
1494
  };
1515
1495
  }
1516
1496
  function $i() {
1517
- if (k)
1497
+ if (T)
1518
1498
  return $e(w, null), w;
1519
1499
  var e = document.createDocumentFragment(), t = document.createComment(""), r = re();
1520
1500
  return e.append(t, r), $e(t, r), e;
1521
1501
  }
1522
- function yt(e, t) {
1523
- if (k) {
1502
+ function mt(e, t) {
1503
+ if (T) {
1524
1504
  var r = g;
1525
1505
  ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = w), kt();
1526
1506
  return;
@@ -1602,7 +1582,7 @@ function Si(e) {
1602
1582
  let t = 0, r = Be(0), n;
1603
1583
  return () => {
1604
1584
  Nt() && (h(r), Lt(() => (t === 0 && (n = je(() => e(() => Re(r)))), t += 1, () => {
1605
- ce(() => {
1585
+ de(() => {
1606
1586
  t -= 1, t === 0 && (n?.(), n = void 0, Re(r));
1607
1587
  });
1608
1588
  })));
@@ -1617,127 +1597,126 @@ var Ci = class {
1617
1597
  is_pending = !1;
1618
1598
  transform_error;
1619
1599
  #e;
1620
- #t = k ? w : null;
1600
+ #t = T ? w : null;
1621
1601
  #r;
1622
- #o;
1623
- #i;
1602
+ #l;
1603
+ #n;
1604
+ #i = null;
1624
1605
  #a = null;
1625
- #n = null;
1626
- #l = null;
1627
1606
  #s = null;
1628
- #p = 0;
1607
+ #o = null;
1608
+ #h = 0;
1629
1609
  #f = 0;
1630
- #u = !1;
1631
- #d = /* @__PURE__ */ new Set();
1632
- #g = /* @__PURE__ */ new Set();
1633
- #c = null;
1634
- #w = Si(() => (this.#c = Be(this.#p), () => {
1635
- this.#c = null;
1610
+ #_ = !1;
1611
+ #y = /* @__PURE__ */ new Map();
1612
+ #u = null;
1613
+ #p = Si(() => (this.#u = Be(this.#h), () => {
1614
+ this.#u = null;
1636
1615
  }));
1637
1616
  constructor(e, t, r, n) {
1638
- this.#e = e, this.#r = t, this.#o = (i) => {
1617
+ this.#e = e, this.#r = t, this.#l = (i) => {
1639
1618
  var s = g;
1640
1619
  s.b = this, s.f |= 128, r(i);
1641
- }, this.parent = g.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), this.#i = Ar(() => {
1642
- if (k) {
1620
+ }, this.parent = g.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), this.#n = Ar(() => {
1621
+ if (T) {
1643
1622
  const i = or(this.#t);
1644
1623
  kt();
1645
1624
  const s = i === "[!";
1646
1625
  if (i.startsWith("[?")) {
1647
1626
  const l = JSON.parse(i.slice(2));
1648
- this.#m(l);
1649
- } else s ? this.#T() : this.#$();
1650
- } else this.#v();
1651
- }, Ai), k && (this.#e = w);
1627
+ this.#w(l);
1628
+ } else s ? this.#v() : this.#m();
1629
+ } else this.#b();
1630
+ }, Ai), T && (this.#e = w);
1652
1631
  }
1653
- #$() {
1632
+ #m() {
1654
1633
  try {
1655
- this.#a = te(() => this.#o(this.#e));
1634
+ this.#i = te(() => this.#l(this.#e));
1656
1635
  } catch (e) {
1657
1636
  this.error(e);
1658
1637
  }
1659
1638
  }
1660
- #m(e) {
1661
- const t = this.#r.failed, { reset: r, invoke_onerror: n } = this.#b(e);
1662
- ce(n), t && (this.#l = te(() => {
1639
+ #w(e) {
1640
+ const t = this.#r.failed, { reset: r, invoke_onerror: n } = this.#g(e);
1641
+ de(n), t && (this.#s = te(() => {
1663
1642
  t(this.#e, () => e, () => r);
1664
1643
  }));
1665
1644
  }
1666
- #b(e) {
1645
+ #g(e) {
1667
1646
  var t = !1, r = !1;
1668
1647
  const n = () => {
1669
- if (!this.#h()) {
1648
+ if (!this.#c()) {
1670
1649
  if (t) {
1671
1650
  $n();
1672
1651
  return;
1673
1652
  }
1674
- t = !0, r && Ln(), this.#l !== null && Ne(this.#l, () => {
1675
- this.#l = null;
1676
- }), this.#_(() => {
1677
- this.#v();
1653
+ t = !0, r && Ln(), this.#s !== null && Ne(this.#s, () => {
1654
+ this.#s = null;
1655
+ }), this.#$(() => {
1656
+ this.#b();
1678
1657
  });
1679
1658
  }
1680
1659
  };
1681
1660
  return {
1682
1661
  reset: n,
1683
1662
  invoke_onerror: () => {
1684
- if (!this.#h())
1663
+ if (!this.#c())
1685
1664
  try {
1686
1665
  r = !0, this.#r.onerror?.(e, n), r = !1;
1687
1666
  } catch (s) {
1688
- W(s, this.#i && this.#i.parent);
1667
+ W(s, this.#n && this.#n.parent);
1689
1668
  }
1690
1669
  }
1691
1670
  };
1692
1671
  }
1693
- #h() {
1694
- return (this.#i.f & (rr | ct)) !== 0;
1672
+ #c() {
1673
+ return (this.#n.f & (rr | ct)) !== 0;
1695
1674
  }
1696
- #T() {
1675
+ #v() {
1697
1676
  const e = this.#r.pending;
1698
- e && (this.is_pending = !0, this.#n = te(() => e(this.#e)), ce(() => {
1699
- if (!this.#h()) {
1700
- var t = this.#s = document.createDocumentFragment(), r = re(), n = !1;
1701
- if (t.append(r), this.#a = this.#_(() => {
1677
+ e && (this.is_pending = !0, this.#a = te(() => e(this.#e)), de(() => {
1678
+ if (!this.#c()) {
1679
+ var t = this.#o = document.createDocumentFragment(), r = re(), n = !1;
1680
+ if (t.append(r), this.#i = this.#$(() => {
1702
1681
  try {
1703
- return te(() => this.#o(r));
1682
+ return te(() => this.#l(r));
1704
1683
  } catch (i) {
1705
1684
  try {
1706
1685
  this.error(i), n = !0;
1707
1686
  } catch (s) {
1708
- W(s, this.#i.parent);
1687
+ W(s, this.#n.parent);
1709
1688
  }
1710
1689
  return null;
1711
1690
  }
1712
- }), this.#a === null) {
1713
- this.#s = null, n && this.#y(y);
1691
+ }), this.#i === null) {
1692
+ this.#o = null, n && this.#d(m);
1714
1693
  return;
1715
1694
  }
1716
- this.#f === 0 && (this.#e.before(t), this.#s = null, Ne(this.#n, () => {
1717
- this.#n = null;
1718
- }), this.#y(y));
1695
+ this.#f === 0 && (this.#e.before(t), this.#o = null, Ne(this.#a, () => {
1696
+ this.#a = null;
1697
+ }), this.#d(m));
1719
1698
  }
1720
1699
  }));
1721
1700
  }
1722
- #v() {
1701
+ #b() {
1723
1702
  try {
1724
- if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#p = 0, this.#a = te(() => {
1725
- this.#o(this.#e);
1703
+ if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#h = 0, this.#i = te(() => {
1704
+ this.#l(this.#e);
1726
1705
  }), this.#f > 0) {
1727
- var e = this.#s = document.createDocumentFragment();
1728
- Rr(this.#a, e);
1706
+ var e = this.#o = document.createDocumentFragment();
1707
+ Rr(this.#i, e);
1729
1708
  const t = this.#r.pending;
1730
- this.#n = te(() => t(this.#e));
1731
- } else this.#y(y);
1709
+ this.#a = te(() => t(this.#e));
1710
+ } else this.#d(m);
1732
1711
  } catch (t) {
1733
1712
  this.error(t);
1734
1713
  }
1735
1714
  }
1736
- #y(e) {
1737
- this.is_pending = !1, e.transfer_effects(this.#d, this.#g);
1715
+ #d(e) {
1716
+ this.is_pending = !1, e.transfer_reactions(this.#y);
1738
1717
  }
1739
1718
  defer_effect(e) {
1740
- dr(e, this.#d, this.#g);
1719
+ dr(e, this.#y);
1741
1720
  }
1742
1721
  is_rendered() {
1743
1722
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -1745,65 +1724,65 @@ var Ci = class {
1745
1724
  has_pending_snippet() {
1746
1725
  return !!this.#r.pending;
1747
1726
  }
1748
- #_(e) {
1749
- var t = g, r = m, n = S;
1750
- Q(this.#i), D(this.#i), Te(this.#i.ctx);
1727
+ #$(e) {
1728
+ var t = g, r = y, n = S;
1729
+ Q(this.#n), D(this.#n), Te(this.#n.ctx);
1751
1730
  try {
1752
1731
  return xe.ensure(), e();
1753
1732
  } finally {
1754
1733
  Q(t), D(r), Te(n);
1755
1734
  }
1756
1735
  }
1757
- #k(e, t) {
1736
+ #T(e, t) {
1758
1737
  if (!this.has_pending_snippet()) {
1759
- this.parent && this.parent.#k(e, t);
1738
+ this.parent && this.parent.#T(e, t);
1760
1739
  return;
1761
1740
  }
1762
- this.#f += e, this.#f === 0 && (this.#y(t), this.#n && Ne(this.#n, () => {
1763
- this.#n = null;
1764
- }), this.#s && (this.#e.before(this.#s), this.#s = null));
1741
+ this.#f += e, this.#f === 0 && (this.#d(t), this.#a && Ne(this.#a, () => {
1742
+ this.#a = null;
1743
+ }), this.#o && (this.#e.before(this.#o), this.#o = null));
1765
1744
  }
1766
1745
  update_pending_count(e, t) {
1767
- this.#k(e, t), this.#p += e, !(!this.#c || this.#u) && (this.#u = !0, ce(() => {
1768
- this.#u = !1, this.#c && et(this.#c, this.#p);
1746
+ this.#T(e, t), this.#h += e, !(!this.#u || this.#_) && (this.#_ = !0, de(() => {
1747
+ this.#_ = !1, this.#u && et(this.#u, this.#h);
1769
1748
  }));
1770
1749
  }
1771
1750
  get_effect_pending() {
1772
- return this.#w(), h(this.#c);
1751
+ return this.#p(), h(this.#u);
1773
1752
  }
1774
1753
  error(e) {
1775
1754
  if (e === oe || !this.#r.onerror && !this.#r.failed) throw e;
1776
- y?.is_fork ? (this.#a && y.skip_effect(this.#a), this.#n && y.skip_effect(this.#n), this.#l && y.skip_effect(this.#l), y.oncommit(() => {
1777
- this.#h() || this.#E(e);
1778
- })) : this.#E(e);
1755
+ m?.is_fork ? (this.#i && m.skip_effect(this.#i), this.#a && m.skip_effect(this.#a), this.#s && m.skip_effect(this.#s), m.oncommit(() => {
1756
+ this.#c() || this.#k(e);
1757
+ })) : this.#k(e);
1779
1758
  }
1780
- #E(e) {
1781
- this.#a && (q(this.#a), this.#a = null), this.#n && (q(this.#n), this.#n = null), this.#l && (q(this.#l), this.#l = null), k && (F(this.#t), Tn(), F(lr()));
1759
+ #k(e) {
1760
+ this.#i && (H(this.#i), this.#i = null), this.#a && (H(this.#a), this.#a = null), this.#s && (H(this.#s), this.#s = null), T && (F(this.#t), Tn(), F(lr()));
1782
1761
  let t = this.#r.failed;
1783
1762
  const r = (n) => {
1784
- if (this.#h()) return;
1785
- const { reset: i, invoke_onerror: s } = this.#b(n);
1786
- s(), t && !this.#h() && (this.#l = this.#_(() => {
1763
+ if (this.#c()) return;
1764
+ const { reset: i, invoke_onerror: s } = this.#g(n);
1765
+ s(), t && !this.#c() && (this.#s = this.#$(() => {
1787
1766
  try {
1788
1767
  return te(() => {
1789
1768
  var l = g;
1790
1769
  l.b = this, l.f |= 128, t(this.#e, () => n, () => i);
1791
1770
  });
1792
1771
  } catch (l) {
1793
- return W(l, this.#i.parent), null;
1772
+ return W(l, this.#n.parent), null;
1794
1773
  }
1795
1774
  }));
1796
1775
  };
1797
- ce(() => {
1798
- if (!this.#h()) {
1776
+ de(() => {
1777
+ if (!this.#c()) {
1799
1778
  var n;
1800
1779
  try {
1801
1780
  n = this.transform_error(e);
1802
1781
  } catch (i) {
1803
- W(i, this.#i && this.#i.parent);
1782
+ W(i, this.#n && this.#n.parent);
1804
1783
  return;
1805
1784
  }
1806
- n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => W(i, this.#i && this.#i.parent)) : r(n);
1785
+ n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => W(i, this.#n && this.#n.parent)) : r(n);
1807
1786
  }
1808
1787
  });
1809
1788
  }
@@ -1817,22 +1796,22 @@ function Br(e, t) {
1817
1796
  }
1818
1797
  function Oi(e, t) {
1819
1798
  gt(), t.intro = t.intro ?? !1;
1820
- const r = t.target, n = k, i = w;
1799
+ const r = t.target, n = T, i = w;
1821
1800
  try {
1822
1801
  for (var s = /* @__PURE__ */ pe(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ ie(s);
1823
1802
  if (!s) throw oe;
1824
- ye(!0), F(s);
1803
+ me(!0), F(s);
1825
1804
  const l = zr(e, {
1826
1805
  ...t,
1827
1806
  anchor: s
1828
1807
  });
1829
- return ye(!1), l;
1808
+ return me(!1), l;
1830
1809
  } catch (l) {
1831
1810
  if (l instanceof Error && l.message.split(`
1832
1811
  `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw l;
1833
- return l !== oe && console.warn("Failed to hydrate: ", l), t.recover === !1 && Cn(), gt(), ti(r), ye(!1), Br(e, t);
1812
+ return l !== oe && console.warn("Failed to hydrate: ", l), t.recover === !1 && Cn(), gt(), ti(r), me(!1), Br(e, t);
1834
1813
  } finally {
1835
- ye(n), F(i);
1814
+ me(n), F(i);
1836
1815
  }
1837
1816
  }
1838
1817
  var Ye = /* @__PURE__ */ new Map();
@@ -1844,7 +1823,7 @@ function zr(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
1844
1823
  } }, (o) => {
1845
1824
  Et({});
1846
1825
  var d = S;
1847
- if (s && (d.c = s), i && (n.$$events = i), k && $e(o, null), Zt = l, c = e(o, n) || St(), Zt = !0, k && (g.nodes.end = w, w === null || w.nodeType !== 8 || w.data !== "]"))
1826
+ if (s && (d.c = s), i && (n.$$events = i), T && $e(o, null), Zt = l, c = e(o, n) || St(), Zt = !0, T && (g.nodes.end = w, w === null || w.nodeType !== 8 || w.data !== "]"))
1848
1827
  throw tt(), oe;
1849
1828
  xt();
1850
1829
  }, a);
@@ -1855,20 +1834,20 @@ function zr(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
1855
1834
  u.add(_);
1856
1835
  var $ = Ei(_);
1857
1836
  for (const Y of [t, document]) {
1858
- var T = Ye.get(Y);
1859
- T === void 0 && (T = /* @__PURE__ */ new Map(), Ye.set(Y, T));
1860
- var A = T.get(_);
1861
- A === void 0 ? (Y.addEventListener(_, Xt, { passive: $ }), T.set(_, 1)) : T.set(_, A + 1);
1837
+ var k = Ye.get(Y);
1838
+ k === void 0 && (k = /* @__PURE__ */ new Map(), Ye.set(Y, k));
1839
+ var A = k.get(_);
1840
+ A === void 0 ? (Y.addEventListener(_, Xt, { passive: $ }), k.set(_, 1)) : k.set(_, A + 1);
1862
1841
  }
1863
1842
  }
1864
1843
  }
1865
1844
  };
1866
- return f(fn(Dr)), mt.add(f), () => {
1845
+ return f(fn(Dr)), yt.add(f), () => {
1867
1846
  for (var o of u) for (const $ of [t, document]) {
1868
1847
  var d = Ye.get($), _ = d.get(o);
1869
1848
  --_ == 0 ? ($.removeEventListener(o, Xt), d.delete(o), d.size === 0 && Ye.delete($)) : d.set(o, _);
1870
1849
  }
1871
- mt.delete(f), p !== r && p.parentNode?.removeChild(p);
1850
+ yt.delete(f), p !== r && p.parentNode?.removeChild(p);
1872
1851
  };
1873
1852
  });
1874
1853
  return bt.set(c, v), c;
@@ -1883,16 +1862,16 @@ var Ni = class {
1883
1862
  #e = /* @__PURE__ */ new Map();
1884
1863
  #t = /* @__PURE__ */ new Map();
1885
1864
  #r = /* @__PURE__ */ new Map();
1886
- #o = /* @__PURE__ */ new Set();
1887
- #i = !0;
1865
+ #l = /* @__PURE__ */ new Set();
1866
+ #n = !0;
1888
1867
  constructor(e, t = !0) {
1889
- this.anchor = e, this.#i = t;
1868
+ this.anchor = e, this.#n = t;
1890
1869
  }
1891
- #a = (e) => {
1870
+ #i = (e) => {
1892
1871
  if (this.#e.has(e)) {
1893
1872
  var t = this.#e.get(e), r = this.#t.get(t);
1894
1873
  if (r)
1895
- Yt(r), this.#o.delete(t);
1874
+ Yt(r), this.#l.delete(t);
1896
1875
  else {
1897
1876
  var n = this.#r.get(t);
1898
1877
  n && (Yt(n.effect), this.#t.set(t, n.effect), this.#r.delete(t), n.fragment.lastChild.remove(), this.anchor.before(n.fragment), r = n.effect);
@@ -1900,10 +1879,10 @@ var Ni = class {
1900
1879
  for (const [i, s] of this.#e) {
1901
1880
  if (this.#e.delete(i), i === e) break;
1902
1881
  const l = this.#r.get(s);
1903
- l && (q(l.effect), this.#r.delete(s));
1882
+ l && (H(l.effect), this.#r.delete(s));
1904
1883
  }
1905
1884
  for (const [i, s] of this.#t) {
1906
- if (i === t || this.#o.has(i)) continue;
1885
+ if (i === t || this.#l.has(i)) continue;
1907
1886
  const l = () => {
1908
1887
  if (Array.from(this.#e.values()).includes(i)) {
1909
1888
  var a = document.createDocumentFragment();
@@ -1911,20 +1890,20 @@ var Ni = class {
1911
1890
  effect: s,
1912
1891
  fragment: a
1913
1892
  });
1914
- } else q(s);
1915
- this.#o.delete(i), this.#t.delete(i);
1893
+ } else H(s);
1894
+ this.#l.delete(i), this.#t.delete(i);
1916
1895
  };
1917
- this.#i || !r ? (this.#o.add(i), Ne(s, l, !1)) : l();
1896
+ this.#n || !r ? (this.#l.add(i), Ne(s, l, !1)) : l();
1918
1897
  }
1919
1898
  }
1920
1899
  };
1921
- #n = (e) => {
1900
+ #a = (e) => {
1922
1901
  this.#e.delete(e);
1923
1902
  const t = Array.from(this.#e.values());
1924
- for (const [r, n] of this.#r) t.includes(r) || (q(n.effect), this.#r.delete(r));
1903
+ for (const [r, n] of this.#r) t.includes(r) || (H(n.effect), this.#r.delete(r));
1925
1904
  };
1926
1905
  ensure(e, t) {
1927
- var r = y, n = ri();
1906
+ var r = m, n = ri();
1928
1907
  if (t && !this.#t.has(e) && !this.#r.has(e))
1929
1908
  if (n) {
1930
1909
  var i = document.createDocumentFragment(), s = re();
@@ -1936,21 +1915,21 @@ var Ni = class {
1936
1915
  if (this.#e.set(r, e), n) {
1937
1916
  for (const [l, a] of this.#t) l === e ? r.unskip_effect(a) : r.skip_effect(a);
1938
1917
  for (const [l, a] of this.#r) l === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1939
- r.oncommit(this.#a), r.ondiscard(this.#n);
1918
+ r.oncommit(this.#i), r.ondiscard(this.#a);
1940
1919
  } else
1941
- k && (this.anchor = w), this.#a(r);
1920
+ T && (this.anchor = w), this.#i(r);
1942
1921
  }
1943
1922
  };
1944
1923
  function Li(e, t, r = !1) {
1945
1924
  var n;
1946
- k && (n = w, kt());
1925
+ T && (n = w, kt());
1947
1926
  var i = new Ni(e), s = r ? Tt : 0;
1948
1927
  function l(a, c) {
1949
- if (k) {
1928
+ if (T) {
1950
1929
  var v = or(n);
1951
1930
  if (a !== parseInt(v.substring(1))) {
1952
1931
  var p = lr();
1953
- F(p), i.anchor = p, ye(!1), i.ensure(a, c), ye(!0);
1932
+ F(p), i.anchor = p, me(!1), i.ensure(a, c), me(!0);
1954
1933
  return;
1955
1934
  }
1956
1935
  }
@@ -1989,9 +1968,9 @@ function Hi(e, t, r) {
1989
1968
  }
1990
1969
  function Pi(e, t, r, n, i, s) {
1991
1970
  var l = e[dt];
1992
- if (k || l !== r || l === void 0) {
1971
+ if (T || l !== r || l === void 0) {
1993
1972
  var a = Hi(r, n, s);
1994
- (!k || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[dt] = r;
1973
+ (!T || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[dt] = r;
1995
1974
  } else if (s && i !== s) for (var c in s) {
1996
1975
  var v = !!s[c];
1997
1976
  (i == null || v !== !!i[c]) && e.classList.toggle(c, v);
@@ -1999,13 +1978,14 @@ function Pi(e, t, r, n, i, s) {
1999
1978
  return s;
2000
1979
  }
2001
1980
  var ji = /* @__PURE__ */ Symbol("is custom element"), Vi = /* @__PURE__ */ Symbol("is html"), Di = bn ? "link" : "LINK";
2002
- function me(e, t, r, n) {
1981
+ function ye(e, t, r, n) {
2003
1982
  var i = Bi(e);
2004
- if (k && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Di)) {
1983
+ if (T && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Di)) {
2005
1984
  n || void 0;
2006
1985
  return;
2007
1986
  }
2008
- i[t] !== (i[t] = r) && (t === "loading" && (e[gn] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && zi(e).has(t) ? e[t] = r : e.setAttribute(t, r));
1987
+ var s = i[t];
1988
+ s !== (i[t] = r) && (t === "loading" && (e[gn] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && zi(e).has(t) ? e[t] = r : T && (typeof r == "number" || typeof r == "boolean") && s === String(r) || e.setAttribute(t, r));
2009
1989
  }
2010
1990
  function Bi(e) {
2011
1991
  return e[sr] ??= {
@@ -2062,7 +2042,7 @@ function ae(e, t, r, n) {
2062
2042
  let u;
2063
2043
  if (s) {
2064
2044
  var f = Ce in e || ir in e;
2065
- u = he(e, t)?.set ?? (f && t in e ? (E) => e[t] = E : void 0);
2045
+ u = ve(e, t)?.set ?? (f && t in e ? (E) => e[t] = E : void 0);
2066
2046
  }
2067
2047
  var o, d = !1;
2068
2048
  s ? [o, d] = Fi(() => e[t]) : o = e[t], o === void 0 && n !== void 0 && (o = p(), u && (i && Mn(t), u(o)));
@@ -2080,15 +2060,15 @@ function ae(e, t, r, n) {
2080
2060
  return arguments.length > 0 ? ((!i || !B || $ || d) && u(B ? _() : E), E) : _();
2081
2061
  });
2082
2062
  }
2083
- var T = !1, A = ((r & 1) !== 0 ? He : vr)(() => (T = !1, _()));
2063
+ var k = !1, A = ((r & 1) !== 0 ? He : vr)(() => (k = !1, _()));
2084
2064
  s && h(A);
2085
2065
  var Y = g;
2086
2066
  return (function(E, B) {
2087
2067
  if (arguments.length > 0) {
2088
2068
  const G = B ? h(A) : i && s ? be(E) : E;
2089
- return O(A, G), T = !0, a !== void 0 && (a = G), E;
2069
+ return O(A, G), k = !0, a !== void 0 && (a = G), E;
2090
2070
  }
2091
- return ne && T || (Y.f & 16384) !== 0 ? A.v : h(A);
2071
+ return ne && k || (Y.f & 16384) !== 0 ? A.v : h(A);
2092
2072
  });
2093
2073
  }
2094
2074
  function Yi(e) {
@@ -2188,7 +2168,7 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
2188
2168
  let e = function(n) {
2189
2169
  return (i) => {
2190
2170
  const s = Ot("slot");
2191
- n !== "default" && (s.name = n), yt(i, s);
2171
+ n !== "default" && (s.name = n), mt(i, s);
2192
2172
  };
2193
2173
  };
2194
2174
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
@@ -2287,7 +2267,7 @@ function Fr(e, t, r, n, i, s) {
2287
2267
  set(c) {
2288
2268
  c = We(a, c, t), this.$$d[a] = c;
2289
2269
  var v = this.$$c;
2290
- v && (he(v, a)?.get ? v[a] = c : v.$set({ [a]: c }));
2270
+ v && (ve(v, a)?.get ? v[a] = c : v.$set({ [a]: c }));
2291
2271
  }
2292
2272
  });
2293
2273
  }), n.forEach((a) => {
@@ -2385,7 +2365,7 @@ function Gr(e, t) {
2385
2365
  }
2386
2366
  };
2387
2367
  let p = /* @__PURE__ */ N(null), u = /* @__PURE__ */ N(null), f = /* @__PURE__ */ N(null), o = /* @__PURE__ */ N(!1), d = /* @__PURE__ */ N(!1), _ = /* @__PURE__ */ N("");
2388
- const $ = /* @__PURE__ */ z(() => sn(h(u))), T = /* @__PURE__ */ z(() => h(u)?.toolCoordinator), A = /* @__PURE__ */ z(() => h(u)?.toolkitCoordinator ?? null), Y = /* @__PURE__ */ z(() => new Set(i().split(",").map((b) => b.trim()).filter(Boolean))), E = /* @__PURE__ */ z(() => h(Y).has(n()) ? n() : "basic"), B = /* @__PURE__ */ z(() => c.includes(h(E)) ? h(E) : "basic"), G = /* @__PURE__ */ z(() => v[h(B)]), Ht = /* @__PURE__ */ z(() => h($).t(h(G).name)), Se = /* @__PURE__ */ z(() => Zi(r(), h(f))), Pt = /* @__PURE__ */ z(() => h(Se) ? Yr(h(Se)) : null), Kr = /* @__PURE__ */ z(() => s() === "sm" ? "pie-tool-calculator-inline__button--sm" : s() === "lg" ? "pie-tool-calculator-inline__button--lg" : "pie-tool-calculator-inline__button--md");
2368
+ const $ = /* @__PURE__ */ z(() => sn(h(u))), k = /* @__PURE__ */ z(() => h(u)?.toolCoordinator), A = /* @__PURE__ */ z(() => h(u)?.toolkitCoordinator ?? null), Y = /* @__PURE__ */ z(() => new Set(i().split(",").map((b) => b.trim()).filter(Boolean))), E = /* @__PURE__ */ z(() => h(Y).has(n()) ? n() : "basic"), B = /* @__PURE__ */ z(() => c.includes(h(E)) ? h(E) : "basic"), G = /* @__PURE__ */ z(() => v[h(B)]), Ht = /* @__PURE__ */ z(() => h($).t(h(G).name)), Se = /* @__PURE__ */ z(() => Zi(r(), h(f))), Pt = /* @__PURE__ */ z(() => h(Se) ? Yr(h(Se)) : null), Kr = /* @__PURE__ */ z(() => s() === "sm" ? "pie-tool-calculator-inline__button--sm" : s() === "lg" ? "pie-tool-calculator-inline__button--lg" : "pie-tool-calculator-inline__button--md");
2389
2369
  Fe(() => {
2390
2370
  if (!h(p)) return;
2391
2371
  const b = en(h(p), (M) => {
@@ -2397,7 +2377,7 @@ function Gr(e, t) {
2397
2377
  I(), b();
2398
2378
  };
2399
2379
  }), Fe(() => {
2400
- if (!l || !h(T) || h(Pt)) return;
2380
+ if (!l || !h(k) || h(Pt)) return;
2401
2381
  const b = setTimeout(() => {
2402
2382
  console.warn(r() ? `[pie-tool-calculator-inline] target-tool-id "${r()}" is not a scoped tool id of the form <toolId>:<section|item|passage>:<scopeId>.` : "[pie-tool-calculator-inline] No calculator to toggle: place the button inside <pie-item-scope>, or set target-tool-id to the calculator tool id.");
2403
2383
  }, a);
@@ -2416,7 +2396,7 @@ function Gr(e, t) {
2416
2396
  M = !0, it?.(), st?.();
2417
2397
  };
2418
2398
  }), Fe(() => {
2419
- const b = h(T), I = h(Pt);
2399
+ const b = h(k), I = h(Pt);
2420
2400
  if (!l || !b || !I) return;
2421
2401
  const M = () => {
2422
2402
  O(o, b.isToolVisible(I), !0);
@@ -2424,8 +2404,8 @@ function Gr(e, t) {
2424
2404
  return je(M), se;
2425
2405
  });
2426
2406
  function Wr() {
2427
- if (!h(T) || !h(A) || !h(Se)) return;
2428
- const b = Qi(h(T), h(A), h(Se), {
2407
+ if (!h(k) || !h(A) || !h(Se)) return;
2408
+ const b = Qi(h(k), h(A), h(Se), {
2429
2409
  calculatorType: h(B),
2430
2410
  availableTypes: c.filter((I) => I === h(B) || h(Y).has(I))
2431
2411
  });
@@ -2465,12 +2445,12 @@ function Gr(e, t) {
2465
2445
  let se;
2466
2446
  var it = ei(M, 2), st = Qn(it, !0);
2467
2447
  ar(I), Ui(I, (at) => O(p, at), () => h(p)), ui((at, Qr) => {
2468
- me(I, "lang", at), me(I, "dir", Qr), se = Pi(M, 1, `pie-tool-calculator-inline__button ${h(Kr) ?? ""}`, "svelte-h8q6l7", se, { "pie-tool-calculator-inline__button--active": h(o) }), me(M, "aria-label", h(Ht)), me(M, "aria-pressed", h(o)), me(M, "title", h(Ht)), me(M, "data-calculator-type", h(E)), M.disabled = !h(T) || !h(d), Mi(st, h(_)), I.dir = I.dir;
2469
- }, [() => h($).getLocale(), () => h($).getDirection?.() ?? "ltr"]), pi("click", M, Wr), yt(b, I);
2448
+ ye(I, "lang", at), ye(I, "dir", Qr), se = Pi(M, 1, `pie-tool-calculator-inline__button ${h(Kr) ?? ""}`, "svelte-h8q6l7", se, { "pie-tool-calculator-inline__button--active": h(o) }), ye(M, "aria-label", h(Ht)), ye(M, "aria-pressed", h(o)), ye(M, "title", h(Ht)), ye(M, "data-calculator-type", h(E)), M.disabled = !h(k) || !h(d), Mi(st, h(_)), I.dir = I.dir;
2449
+ }, [() => h($).getLocale(), () => h($).getDirection?.() ?? "ltr"]), pi("click", M, Wr), mt(b, I);
2470
2450
  };
2471
2451
  return Li(Zr, (b) => {
2472
2452
  l && b(Jr);
2473
- }), yt(e, jt), xt(Xr);
2453
+ }), mt(e, jt), xt(Xr);
2474
2454
  }
2475
2455
  gi(["click"]);
2476
2456
  Fr(Gr, {