@pie-players/pie-tool-calculator-inline-desmos 0.3.67 → 0.3.69

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,12 +1,12 @@
1
- import { ZIndexLayer as jr, connectToolRuntimeContext as Lr, toOverlayToolId as Pr } from "@pie-players/pie-assessment-toolkit";
1
+ import { ZIndexLayer as rn, connectToolRuntimeContext as nn, toOverlayToolId as an } from "@pie-players/pie-assessment-toolkit";
2
2
  typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
3
- var _e = {}, A = /* @__PURE__ */ Symbol("uninitialized");
4
- var Vr = "http://www.w3.org/1999/xhtml", Dr = Array.isArray, Br = Array.prototype.indexOf, ze = Array.prototype.includes, Fr = Array.from, Ue = Object.keys, Ge = Object.defineProperty, se = Object.getOwnPropertyDescriptor, Yr = Object.getOwnPropertyDescriptors, zr = Object.prototype, Ur = Array.prototype, zt = Object.getPrototypeOf, At = Object.isExtensible, Gr = () => {
3
+ var me = {}, E = /* @__PURE__ */ Symbol("uninitialized");
4
+ var sn = "http://www.w3.org/1999/xhtml", on = Array.isArray, ln = Array.prototype.indexOf, Ke = Array.prototype.includes, cn = Array.from, Je = Object.keys, Qe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, un = Object.getOwnPropertyDescriptors, fn = Object.prototype, dn = Array.prototype, ir = Object.getPrototypeOf, Ft = Object.isExtensible, hn = () => {
5
5
  };
6
- function Wr(e) {
6
+ function vn(e) {
7
7
  for (var t = 0; t < e.length; t++) e[t]();
8
8
  }
9
- function Ut() {
9
+ function ar() {
10
10
  var e, t;
11
11
  return {
12
12
  promise: new Promise((r, n) => {
@@ -16,81 +16,81 @@ function Ut() {
16
16
  reject: t
17
17
  };
18
18
  }
19
- var Ni = 1 << 24, L = 1024, H = 2048, oe = 4096, dt = 8192, Kr = 16384, vt = 32768, qt = 1 << 25, ht = 65536, Hi = 1 << 17, ji = 1 << 18, me = 1 << 19, Zr = 1 << 20, Oe = 65536, Mt = 1 << 21, Xr = 1 << 22, We = 1 << 23, xe = /* @__PURE__ */ Symbol("$state"), Gt = /* @__PURE__ */ Symbol("legacy props"), Jr = /* @__PURE__ */ Symbol(""), Qr = /* @__PURE__ */ Symbol("proxy path"), Wt = /* @__PURE__ */ Symbol("attributes"), nt = /* @__PURE__ */ Symbol("class"), en = /* @__PURE__ */ Symbol("style"), it = /* @__PURE__ */ Symbol("text");
20
- var Re = new class extends Error {
19
+ var la = 1 << 24, U = 1024, N = 2048, de = 4096, St = 8192, pn = 16384, At = 32768, Ut = 1 << 25, kt = 65536, ca = 1 << 17, ua = 1 << 18, Se = 1 << 19, _n = 1 << 20, Ie = 65536, zt = 1 << 21, gn = 1 << 22, Ze = 1 << 23, Te = /* @__PURE__ */ Symbol("$state"), sr = /* @__PURE__ */ Symbol("legacy props"), mn = /* @__PURE__ */ Symbol(""), yn = /* @__PURE__ */ Symbol("proxy path"), or = /* @__PURE__ */ Symbol("attributes"), ht = /* @__PURE__ */ Symbol("class"), wn = /* @__PURE__ */ Symbol("style"), vt = /* @__PURE__ */ Symbol("text");
20
+ var De = new class extends Error {
21
21
  name = "StaleReactionError";
22
22
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
23
- }(), tn = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
24
- function rn() {
23
+ }(), bn = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
24
+ function Sn() {
25
25
  throw new Error("https://svelte.dev/e/async_derived_orphan");
26
26
  }
27
- function nn(e) {
27
+ function An(e) {
28
28
  throw new Error("https://svelte.dev/e/effect_in_teardown");
29
29
  }
30
- function sn() {
30
+ function kn() {
31
31
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
32
32
  }
33
- function an(e) {
33
+ function $n(e) {
34
34
  throw new Error("https://svelte.dev/e/effect_orphan");
35
35
  }
36
- function ln() {
36
+ function Tn() {
37
37
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
38
38
  }
39
- function on() {
39
+ function xn() {
40
40
  throw new Error("https://svelte.dev/e/hydration_failed");
41
41
  }
42
- function fn(e) {
42
+ function En(e) {
43
43
  throw new Error("https://svelte.dev/e/props_invalid_value");
44
44
  }
45
- function un() {
45
+ function Pn() {
46
46
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
47
47
  }
48
- function cn() {
48
+ function Rn() {
49
49
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
50
50
  }
51
- function dn() {
51
+ function Mn() {
52
52
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
53
53
  }
54
- function vn() {
54
+ function Ln() {
55
55
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
56
56
  }
57
- function hn() {
57
+ function Cn() {
58
58
  console.warn("https://svelte.dev/e/derived_inert");
59
59
  }
60
- function Je(e) {
60
+ function rt(e) {
61
61
  console.warn("https://svelte.dev/e/hydration_mismatch");
62
62
  }
63
- function _n() {
63
+ function In() {
64
64
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
65
65
  }
66
- var $ = !1;
67
- function ce(e) {
68
- $ = e;
66
+ var k = !1;
67
+ function ve(e) {
68
+ k = e;
69
69
  }
70
- var w;
71
- function D(e) {
70
+ var b;
71
+ function G(e) {
72
72
  if (e === null)
73
- throw Je(), _e;
74
- return w = e;
73
+ throw rt(), me;
74
+ return b = e;
75
75
  }
76
- function _t() {
77
- return D(/* @__PURE__ */ J(w));
76
+ function $t() {
77
+ return G(/* @__PURE__ */ ae(b));
78
78
  }
79
- function Ot(e) {
80
- if ($) {
81
- if (/* @__PURE__ */ J(w) !== null)
82
- throw Je(), _e;
83
- w = e;
79
+ function jt(e) {
80
+ if (k) {
81
+ if (/* @__PURE__ */ ae(b) !== null)
82
+ throw rt(), me;
83
+ b = e;
84
84
  }
85
85
  }
86
- function pn(e = 1) {
87
- if ($) {
88
- for (var t = e, r = w; t--; ) r = /* @__PURE__ */ J(r);
89
- w = r;
86
+ function Dn(e = 1) {
87
+ if (k) {
88
+ for (var t = e, r = b; t--; ) r = /* @__PURE__ */ ae(r);
89
+ b = r;
90
90
  }
91
91
  }
92
- function Kt(e = !0) {
93
- for (var t = 0, r = w; ; ) {
92
+ function lr(e = !0) {
93
+ for (var t = 0, r = b; ; ) {
94
94
  if (r.nodeType === 8) {
95
95
  var n = r.data;
96
96
  if (n === "]") {
@@ -98,88 +98,88 @@ function Kt(e = !0) {
98
98
  t -= 1;
99
99
  } else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (t += 1);
100
100
  }
101
- var i = /* @__PURE__ */ J(r);
101
+ var i = /* @__PURE__ */ ae(r);
102
102
  e && r.remove(), r = i;
103
103
  }
104
104
  }
105
- function gn(e) {
105
+ function Nn(e) {
106
106
  if (!e || e.nodeType !== 8)
107
- throw Je(), _e;
107
+ throw rt(), me;
108
108
  return e.data;
109
109
  }
110
- function Zt(e) {
110
+ function cr(e) {
111
111
  return e === this.v;
112
112
  }
113
- function yn(e, t) {
113
+ function On(e, t) {
114
114
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
115
115
  }
116
- function Xt(e) {
117
- return !yn(e, this.v);
116
+ function ur(e) {
117
+ return !On(e, this.v);
118
118
  }
119
- var K = !1, Qe = !1;
120
- function Rt(e, t) {
121
- return e.label = t, mn(e.v, t), e;
119
+ var re = !1, nt = !1;
120
+ function Bt(e, t) {
121
+ return e.label = t, Hn(e.v, t), e;
122
122
  }
123
- function mn(e, t) {
124
- return e?.[Qr]?.(t), e;
123
+ function Hn(e, t) {
124
+ return e?.[yn]?.(t), e;
125
125
  }
126
- var T = null;
127
- function pe(e) {
128
- T = e;
126
+ var x = null;
127
+ function ye(e) {
128
+ x = e;
129
129
  }
130
- function Jt(e, t = !1, r) {
131
- T = {
132
- p: T,
130
+ function Tt(e, t = !1, r) {
131
+ x = {
132
+ p: x,
133
133
  i: !1,
134
134
  c: null,
135
135
  e: null,
136
136
  s: e,
137
137
  x: null,
138
138
  r: g,
139
- l: Qe && !t ? {
139
+ l: nt && !t ? {
140
140
  s: null,
141
141
  u: null,
142
142
  $: []
143
143
  } : null
144
144
  };
145
145
  }
146
- function Qt(e) {
147
- var t = T, r = t.e;
146
+ function xt(e) {
147
+ var t = x, r = t.e;
148
148
  if (r !== null) {
149
149
  t.e = null;
150
- for (var n of r) pr(n);
150
+ for (var n of r) xr(n);
151
151
  }
152
- return e !== void 0 && (t.x = e), t.i = !0, T = t.p, e ?? {};
152
+ return e !== void 0 && (t.x = e), t.i = !0, x = t.p, e ?? {};
153
153
  }
154
- function Ce() {
155
- return !Qe || T !== null && T.l === null;
154
+ function Ne() {
155
+ return !nt || x !== null && x.l === null;
156
156
  }
157
- var re = [];
158
- function er() {
159
- var e = re;
160
- re = [], Wr(e);
157
+ var oe = [];
158
+ function fr() {
159
+ var e = oe;
160
+ oe = [], vn(e);
161
161
  }
162
- function ne(e) {
163
- if (re.length === 0 && !Te) {
164
- var t = re;
162
+ function le(e) {
163
+ if (oe.length === 0 && !xe) {
164
+ var t = oe;
165
165
  queueMicrotask(() => {
166
- t === re && er();
166
+ t === oe && fr();
167
167
  });
168
168
  }
169
- re.push(e);
169
+ oe.push(e);
170
170
  }
171
- function wn() {
172
- for (; re.length > 0; ) er();
171
+ function Fn() {
172
+ for (; oe.length > 0; ) fr();
173
173
  }
174
- function tr(e) {
174
+ function dr(e) {
175
175
  var t = g;
176
176
  if (t === null)
177
- return m.f |= We, e;
177
+ return y.f |= Ze, e;
178
178
  if ((t.f & 32768) === 0 && (t.f & 4) === 0)
179
179
  throw e;
180
- te(e, t);
180
+ se(e, t);
181
181
  }
182
- function te(e, t) {
182
+ function se(e, t) {
183
183
  if (!(t !== null && (t.f & 16384) !== 0)) {
184
184
  for (; t !== null; ) {
185
185
  if ((t.f & 128) !== 0) {
@@ -196,101 +196,101 @@ function te(e, t) {
196
196
  throw e;
197
197
  }
198
198
  }
199
- var bn = ~(H | oe | L);
200
- function k(e, t) {
201
- e.f = e.f & bn | t;
199
+ var Un = ~(N | de | U);
200
+ function $(e, t) {
201
+ e.f = e.f & Un | t;
202
202
  }
203
- function pt(e) {
204
- (e.f & 512) !== 0 || e.deps === null ? k(e, L) : k(e, oe);
203
+ function Et(e) {
204
+ (e.f & 512) !== 0 || e.deps === null ? $(e, U) : $(e, de);
205
205
  }
206
- function rr(e) {
206
+ function hr(e) {
207
207
  if (e !== null)
208
208
  for (const t of e)
209
- (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= Oe, rr(t.deps));
209
+ (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= Ie, hr(t.deps));
210
210
  }
211
- function nr(e, t, r) {
212
- (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), rr(e.deps), k(e, L);
211
+ function vr(e, t, r) {
212
+ (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), hr(e.deps), $(e, U);
213
213
  }
214
- var $n = !1, je = !1;
215
- function kn(e) {
216
- var t = je;
214
+ var zn = !1, Ue = !1;
215
+ function jn(e) {
216
+ var t = Ue;
217
217
  try {
218
- return je = !1, [e(), je];
218
+ return Ue = !1, [e(), Ue];
219
219
  } finally {
220
- je = t;
220
+ Ue = t;
221
221
  }
222
222
  }
223
- function et(e) {
224
- var t = m, r = g;
225
- P(null), Y(null);
223
+ function it(e) {
224
+ var t = y, r = g;
225
+ z(null), Q(null);
226
226
  try {
227
227
  return e();
228
228
  } finally {
229
- P(t), Y(r);
229
+ z(t), Q(r);
230
230
  }
231
231
  }
232
- function En(e) {
233
- let t = 0, r = Ie(0), n;
232
+ function Bn(e) {
233
+ let t = 0, r = Oe(0), n;
234
234
  return () => {
235
- $t() && (_(r), kt(() => (t === 0 && (n = xt(() => e(() => Se(r)))), t += 1, () => {
236
- ne(() => {
237
- t -= 1, t === 0 && (n?.(), n = void 0, Se(r));
235
+ It() && (p(r), Dt(() => (t === 0 && (n = Le(() => e(() => Ee(r)))), t += 1, () => {
236
+ le(() => {
237
+ t -= 1, t === 0 && (n?.(), n = void 0, Ee(r));
238
238
  });
239
239
  })));
240
240
  };
241
241
  }
242
- var xn = ht | me;
243
- function Tn(e, t, r, n) {
244
- new Sn(e, t, r, n);
242
+ var Vn = kt | Se;
243
+ function qn(e, t, r, n) {
244
+ new Gn(e, t, r, n);
245
245
  }
246
- var Sn = class {
246
+ var Gn = class {
247
247
  parent;
248
248
  is_pending = !1;
249
249
  transform_error;
250
250
  #e;
251
- #t = $ ? w : null;
251
+ #t = k ? b : null;
252
252
  #r;
253
- #o;
253
+ #l;
254
254
  #i;
255
- #a = null;
256
- #n = null;
257
- #l = null;
258
255
  #s = null;
259
- #_ = 0;
260
- #f = 0;
256
+ #n = null;
257
+ #o = null;
258
+ #a = null;
259
+ #p = 0;
260
+ #c = 0;
261
261
  #u = !1;
262
262
  #d = /* @__PURE__ */ new Set();
263
- #p = /* @__PURE__ */ new Set();
264
- #c = null;
265
- #m = En(() => (this.#c = Ie(this.#_), () => {
266
- this.#c = null;
263
+ #_ = /* @__PURE__ */ new Set();
264
+ #f = null;
265
+ #y = Bn(() => (this.#f = Oe(this.#p), () => {
266
+ this.#f = null;
267
267
  }));
268
268
  constructor(e, t, r, n) {
269
- this.#e = e, this.#r = t, this.#o = (i) => {
270
- var s = g;
271
- s.b = this, s.f |= 128, r(i);
272
- }, this.parent = g.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), this.#i = yr(() => {
273
- if ($) {
269
+ this.#e = e, this.#r = t, this.#l = (i) => {
270
+ var a = g;
271
+ a.b = this, a.f |= 128, r(i);
272
+ }, this.parent = g.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), this.#i = Pr(() => {
273
+ if (k) {
274
274
  const i = this.#t;
275
- _t();
276
- const s = i.data === "[!";
275
+ $t();
276
+ const a = i.data === "[!";
277
277
  if (i.data.startsWith("[?")) {
278
- const l = JSON.parse(i.data.slice(2));
279
- this.#w(l);
280
- } else s ? this.#$() : this.#g();
281
- } else this.#v();
282
- }, xn), $ && (this.#e = w);
278
+ const o = JSON.parse(i.data.slice(2));
279
+ this.#w(o);
280
+ } else a ? this.#S() : this.#g();
281
+ } else this.#h();
282
+ }, Vn), k && (this.#e = b);
283
283
  }
284
284
  #g() {
285
285
  try {
286
- this.#a = W(() => this.#o(this.#e));
286
+ this.#s = te(() => this.#l(this.#e));
287
287
  } catch (e) {
288
288
  this.error(e);
289
289
  }
290
290
  }
291
291
  #w(e) {
292
292
  const t = this.#r.failed, { reset: r, invoke_onerror: n } = this.#b(e);
293
- ne(n), t && (this.#l = W(() => {
293
+ le(n), t && (this.#o = te(() => {
294
294
  t(this.#e, () => e, () => r);
295
295
  }));
296
296
  }
@@ -298,13 +298,13 @@ var Sn = class {
298
298
  var t = !1, r = !1;
299
299
  const n = () => {
300
300
  if (t) {
301
- _n();
301
+ In();
302
302
  return;
303
303
  }
304
- t = !0, r && vn(), this.#l !== null && Ae(this.#l, () => {
305
- this.#l = null;
306
- }), this.#h(() => {
307
- this.#v();
304
+ t = !0, r && Ln(), this.#o !== null && Pe(this.#o, () => {
305
+ this.#o = null;
306
+ }), this.#v(() => {
307
+ this.#h();
308
308
  });
309
309
  };
310
310
  return {
@@ -312,40 +312,40 @@ var Sn = class {
312
312
  invoke_onerror: () => {
313
313
  try {
314
314
  r = !0, this.#r.onerror?.(e, n), r = !1;
315
- } catch (s) {
316
- te(s, this.#i && this.#i.parent);
315
+ } catch (a) {
316
+ se(a, this.#i && this.#i.parent);
317
317
  }
318
318
  }
319
319
  };
320
320
  }
321
- #$() {
321
+ #S() {
322
322
  const e = this.#r.pending;
323
- e && (this.is_pending = !0, this.#n = W(() => e(this.#e)), ne(() => {
324
- var t = this.#s = document.createDocumentFragment(), r = Z();
325
- t.append(r), this.#a = this.#h(() => W(() => this.#o(r))), this.#f === 0 && (this.#e.before(t), this.#s = null, Ae(this.#n, () => {
323
+ e && (this.is_pending = !0, this.#n = te(() => e(this.#e)), le(() => {
324
+ var t = this.#a = document.createDocumentFragment(), r = ne();
325
+ t.append(r), this.#s = this.#v(() => te(() => this.#l(r))), this.#c === 0 && (this.#e.before(t), this.#a = null, Pe(this.#n, () => {
326
326
  this.#n = null;
327
- }), this.#y(y));
327
+ }), this.#m(m));
328
328
  }));
329
329
  }
330
- #v() {
330
+ #h() {
331
331
  try {
332
- if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#_ = 0, this.#a = W(() => {
333
- this.#o(this.#e);
334
- }), this.#f > 0) {
335
- var e = this.#s = document.createDocumentFragment();
336
- kr(this.#a, e);
332
+ if (this.is_pending = this.has_pending_snippet(), this.#c = 0, this.#p = 0, this.#s = te(() => {
333
+ this.#l(this.#e);
334
+ }), this.#c > 0) {
335
+ var e = this.#a = document.createDocumentFragment();
336
+ Ir(this.#s, e);
337
337
  const t = this.#r.pending;
338
- this.#n = W(() => t(this.#e));
339
- } else this.#y(y);
338
+ this.#n = te(() => t(this.#e));
339
+ } else this.#m(m);
340
340
  } catch (t) {
341
341
  this.error(t);
342
342
  }
343
343
  }
344
- #y(e) {
345
- this.is_pending = !1, e.transfer_effects(this.#d, this.#p);
344
+ #m(e) {
345
+ this.is_pending = !1, e.transfer_effects(this.#d, this.#_);
346
346
  }
347
347
  defer_effect(e) {
348
- nr(e, this.#d, this.#p);
348
+ vr(e, this.#d, this.#_);
349
349
  }
350
350
  is_rendered() {
351
351
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -353,128 +353,128 @@ var Sn = class {
353
353
  has_pending_snippet() {
354
354
  return !!this.#r.pending;
355
355
  }
356
- #h(e) {
357
- var t = g, r = m, n = T;
358
- Y(this.#i), P(this.#i), pe(this.#i.ctx);
356
+ #v(e) {
357
+ var t = g, r = y, n = x;
358
+ Q(this.#i), z(this.#i), ye(this.#i.ctx);
359
359
  try {
360
- return we.ensure(), e();
360
+ return Ae.ensure(), e();
361
361
  } catch (i) {
362
- return tr(i), null;
362
+ return dr(i), null;
363
363
  } finally {
364
- Y(t), P(r), pe(n);
364
+ Q(t), z(r), ye(n);
365
365
  }
366
366
  }
367
- #k(e, t) {
367
+ #A(e, t) {
368
368
  if (!this.has_pending_snippet()) {
369
- this.parent && this.parent.#k(e, t);
369
+ this.parent && this.parent.#A(e, t);
370
370
  return;
371
371
  }
372
- this.#f += e, this.#f === 0 && (this.#y(t), this.#n && Ae(this.#n, () => {
372
+ this.#c += e, this.#c === 0 && (this.#m(t), this.#n && Pe(this.#n, () => {
373
373
  this.#n = null;
374
- }), this.#s && (this.#e.before(this.#s), this.#s = null));
374
+ }), this.#a && (this.#e.before(this.#a), this.#a = null));
375
375
  }
376
376
  update_pending_count(e, t) {
377
- this.#k(e, t), this.#_ += e, !(!this.#c || this.#u) && (this.#u = !0, ne(() => {
378
- this.#u = !1, this.#c && Xe(this.#c, this.#_);
377
+ this.#A(e, t), this.#p += e, !(!this.#f || this.#u) && (this.#u = !0, le(() => {
378
+ this.#u = !1, this.#f && tt(this.#f, this.#p);
379
379
  }));
380
380
  }
381
381
  get_effect_pending() {
382
- return this.#m(), _(this.#c);
382
+ return this.#y(), p(this.#f);
383
383
  }
384
384
  error(e) {
385
385
  if (!this.#r.onerror && !this.#r.failed) throw e;
386
- 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(() => {
387
- this.#E(e);
388
- })) : this.#E(e);
386
+ m?.is_fork ? (this.#s && m.skip_effect(this.#s), this.#n && m.skip_effect(this.#n), this.#o && m.skip_effect(this.#o), m.oncommit(() => {
387
+ this.#k(e);
388
+ })) : this.#k(e);
389
389
  }
390
- #E(e) {
391
- this.#a && (C(this.#a), this.#a = null), this.#n && (C(this.#n), this.#n = null), this.#l && (C(this.#l), this.#l = null), $ && (D(this.#t), pn(), D(Kt()));
390
+ #k(e) {
391
+ this.#s && (C(this.#s), this.#s = null), this.#n && (C(this.#n), this.#n = null), this.#o && (C(this.#o), this.#o = null), k && (G(this.#t), Dn(), G(lr()));
392
392
  let t = this.#r.failed;
393
393
  const r = (n) => {
394
- const { reset: i, invoke_onerror: s } = this.#b(n);
395
- s(), t && (this.#l = this.#h(() => {
394
+ const { reset: i, invoke_onerror: a } = this.#b(n);
395
+ a(), t && (this.#o = this.#v(() => {
396
396
  try {
397
- return W(() => {
398
- var l = g;
399
- l.b = this, l.f |= 128, t(this.#e, () => n, () => i);
397
+ return te(() => {
398
+ var o = g;
399
+ o.b = this, o.f |= 128, t(this.#e, () => n, () => i);
400
400
  });
401
- } catch (l) {
402
- return te(l, this.#i.parent), null;
401
+ } catch (o) {
402
+ return se(o, this.#i.parent), null;
403
403
  }
404
404
  }));
405
405
  };
406
- ne(() => {
406
+ le(() => {
407
407
  var n;
408
408
  try {
409
409
  n = this.transform_error(e);
410
410
  } catch (i) {
411
- te(i, this.#i && this.#i.parent);
411
+ se(i, this.#i && this.#i.parent);
412
412
  return;
413
413
  }
414
- n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => te(i, this.#i && this.#i.parent)) : r(n);
414
+ n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => se(i, this.#i && this.#i.parent)) : r(n);
415
415
  });
416
416
  }
417
417
  };
418
- function An(e, t, r, n) {
419
- const i = Ce() ? qe : sr;
420
- var s = e.filter((u) => !u.settled), l = t.map(i);
421
- if (r.length === 0 && s.length === 0) {
422
- n(l);
418
+ function Yn(e, t, r, n) {
419
+ const i = Ne() ? Re : _r;
420
+ var a = e.filter((c) => !c.settled), o = t.map(i);
421
+ if (r.length === 0 && a.length === 0) {
422
+ n(o);
423
423
  return;
424
424
  }
425
- var a = g, f = qn(), v = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((u) => u.promise)) : null;
426
- function p(u) {
427
- if ((a.f & 16384) === 0) {
428
- f();
425
+ var s = g, l = Wn(), v = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((c) => c.promise)) : null;
426
+ function _(c) {
427
+ if ((s.f & 16384) === 0) {
428
+ l();
429
429
  try {
430
- n([...l, ...u]);
430
+ n([...o, ...c]);
431
431
  } catch (d) {
432
- te(d, a);
432
+ se(d, s);
433
433
  }
434
- Ke();
434
+ Xe();
435
435
  }
436
436
  }
437
- var c = ir();
437
+ var f = pr();
438
438
  if (r.length === 0) {
439
- v.then(() => p([])).finally(c);
439
+ v.then(() => _([])).finally(f);
440
440
  return;
441
441
  }
442
- function o() {
443
- Promise.all(r.map((u) => /* @__PURE__ */ Mn(u))).then(p).catch((u) => te(u, a)).finally(c);
442
+ function u() {
443
+ Promise.all(r.map((c) => /* @__PURE__ */ Kn(c))).then(_).catch((c) => se(c, s)).finally(f);
444
444
  }
445
445
  v ? v.then(() => {
446
- f(), o(), Ke();
447
- }) : o();
446
+ l(), u(), Xe();
447
+ }) : u();
448
448
  }
449
- function qn() {
450
- var e = g, t = m, r = T, n = y;
449
+ function Wn() {
450
+ var e = g, t = y, r = x, n = m;
451
451
  if (0) var i;
452
- return function(l = !0) {
453
- Y(e), P(t), pe(r), l && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
452
+ return function(o = !0) {
453
+ Q(e), z(t), ye(r), o && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
454
454
  };
455
455
  }
456
- function Ke(e = !0) {
457
- Y(null), P(null), pe(null), e && y?.deactivate();
456
+ function Xe(e = !0) {
457
+ Q(null), z(null), ye(null), e && m?.deactivate();
458
458
  }
459
- function ir() {
460
- var e = g, t = e.b, r = y, n = !!t?.is_rendered();
459
+ function pr() {
460
+ var e = g, t = e.b, r = m, n = !!t?.is_rendered();
461
461
  return t?.update_pending_count(1, r), r.increment(n, e), () => {
462
462
  t?.update_pending_count(-1, r), r.decrement(n, e);
463
463
  };
464
464
  }
465
465
  // @__NO_SIDE_EFFECTS__
466
- function qe(e) {
467
- var t = 2 | H;
468
- return g !== null && (g.f |= me), {
469
- ctx: T,
466
+ function Re(e) {
467
+ var t = 2 | N;
468
+ return g !== null && (g.f |= Se), {
469
+ ctx: x,
470
470
  deps: null,
471
471
  effects: null,
472
- equals: Zt,
472
+ equals: cr,
473
473
  f: t,
474
474
  fn: e,
475
475
  reactions: null,
476
476
  rv: 0,
477
- v: A,
477
+ v: E,
478
478
  wv: 0,
479
479
  parent: g,
480
480
  ac: null
@@ -482,93 +482,93 @@ function qe(e) {
482
482
  }
483
483
  var ke = /* @__PURE__ */ Symbol("obsolete");
484
484
  // @__NO_SIDE_EFFECTS__
485
- function Mn(e, t, r) {
485
+ function Kn(e, t, r) {
486
486
  let n = g;
487
- n === null && rn();
488
- var i = void 0, s = Ie(A), l = !m, a = /* @__PURE__ */ new Set();
489
- return Kn(() => {
490
- var f = g, v = Ut();
487
+ n === null && Sn();
488
+ var i = void 0, a = Oe(E), o = !y, s = /* @__PURE__ */ new Set();
489
+ return vi(() => {
490
+ var l = g, v = ar();
491
491
  i = v.promise;
492
492
  try {
493
- Promise.resolve(e()).then(v.resolve, (u) => {
494
- u !== Re && v.reject(u);
495
- }).finally(Ke);
496
- } catch (u) {
497
- v.reject(u), Ke();
498
- }
499
- var p = y;
500
- if (l) {
501
- if ((f.f & 32768) !== 0) var c = ir();
502
- if (n.b?.is_rendered()) p.async_deriveds.get(f)?.reject(ke);
503
- else for (const u of a.values()) u.reject(ke);
504
- a.add(v), p.async_deriveds.set(f, v);
505
- }
506
- const o = (u, d = void 0) => {
507
- c?.(), a.delete(v), d !== ke && (p.activate(), d ? (s.f |= We, Xe(s, d)) : ((s.f & 8388608) !== 0 && (s.f ^= We), Xe(s, u)), p.deactivate());
493
+ Promise.resolve(e()).then(v.resolve, (c) => {
494
+ c !== De && v.reject(c);
495
+ }).finally(Xe);
496
+ } catch (c) {
497
+ v.reject(c), Xe();
498
+ }
499
+ var _ = m;
500
+ if (o) {
501
+ if ((l.f & 32768) !== 0) var f = pr();
502
+ if (n.b?.is_rendered()) _.async_deriveds.get(l)?.reject(ke);
503
+ else for (const c of s.values()) c.reject(ke);
504
+ s.add(v), _.async_deriveds.set(l, v);
505
+ }
506
+ const u = (c, d = void 0) => {
507
+ f?.(), s.delete(v), d !== ke && (_.activate(), d ? (a.f |= Ze, tt(a, d)) : ((a.f & 8388608) !== 0 && (a.f ^= Ze), tt(a, c)), _.deactivate());
508
508
  };
509
- v.promise.then(o, (u) => o(null, u || "unknown"));
510
- }), Un(() => {
511
- for (const f of a) f.reject(ke);
512
- }), new Promise((f) => {
513
- function v(p) {
514
- function c() {
515
- p === i ? f(s) : v(i);
509
+ v.promise.then(u, (c) => u(null, c || "unknown"));
510
+ }), fi(() => {
511
+ for (const l of s) l.reject(ke);
512
+ }), new Promise((l) => {
513
+ function v(_) {
514
+ function f() {
515
+ _ === i ? l(a) : v(i);
516
516
  }
517
- p.then(c, c);
517
+ _.then(f, f);
518
518
  }
519
519
  v(i);
520
520
  });
521
521
  }
522
522
  // @__NO_SIDE_EFFECTS__
523
- function be(e) {
524
- const t = /* @__PURE__ */ qe(e);
525
- return K || Er(t), t;
523
+ function ee(e) {
524
+ const t = /* @__PURE__ */ Re(e);
525
+ return re || Dr(t), t;
526
526
  }
527
527
  // @__NO_SIDE_EFFECTS__
528
- function sr(e) {
529
- const t = /* @__PURE__ */ qe(e);
530
- return t.equals = Xt, t;
528
+ function _r(e) {
529
+ const t = /* @__PURE__ */ Re(e);
530
+ return t.equals = ur, t;
531
531
  }
532
- function On(e) {
532
+ function Jn(e) {
533
533
  var t = e.effects;
534
534
  if (t !== null) {
535
535
  e.effects = null;
536
536
  for (var r = 0; r < t.length; r += 1) C(t[r]);
537
537
  }
538
538
  }
539
- function gt(e) {
539
+ function Pt(e) {
540
540
  var t, r = g, n = e.parent;
541
- if (!X && n !== null && e.v !== A && (n.f & 24576) !== 0)
542
- return hn(), e.v;
543
- Y(n);
541
+ if (!ie && n !== null && e.v !== E && (n.f & 24576) !== 0)
542
+ return Cn(), e.v;
543
+ Q(n);
544
544
  try {
545
- e.f &= ~Oe, On(e), t = Ar(e);
545
+ e.f &= ~Ie, Jn(e), t = Fr(e);
546
546
  } finally {
547
- Y(r);
547
+ Q(r);
548
548
  }
549
549
  return t;
550
550
  }
551
- function ar(e) {
552
- var t = gt(e);
553
- if (!e.equals(t) && (e.wv = Tr(), (!y?.is_fork || e.deps === null) && (y !== null ? (y.capture(e, t, !0), st?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
554
- k(e, L);
551
+ function gr(e) {
552
+ var t = Pt(e);
553
+ if (!e.equals(t) && (e.wv = Or(), (!m?.is_fork || e.deps === null) && (m !== null ? (m.capture(e, t, !0), pt?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
554
+ $(e, U);
555
555
  return;
556
556
  }
557
- X || (M !== null ? ($t() || y?.is_fork) && M.set(e, t) : pt(e));
557
+ ie || (R !== null ? (It() || m?.is_fork) && R.set(e, t) : Et(e));
558
558
  }
559
- function Rn(e) {
559
+ function Qn(e) {
560
560
  if (e.effects !== null)
561
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && et(() => {
562
- t.ac.abort(Re), t.ac = null;
563
- }), t.fn !== null && (t.teardown = Gr), Me(t, 0), Et(t));
561
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && it(() => {
562
+ t.ac.abort(De), t.ac = null;
563
+ }), t.fn !== null && (t.teardown = hn), Me(t, 0), Nt(t));
564
564
  }
565
- function lr(e) {
565
+ function mr(e) {
566
566
  if (e.effects !== null)
567
- for (const t of e.effects) t.teardown && t.fn !== null && ye(t);
567
+ for (const t of e.effects) t.teardown && t.fn !== null && be(t);
568
568
  }
569
- var Le = null, fe = null, y = null, st = null, M = null, at = null, Te = !1, tt = !1, de = null, Be = null, Ct = 0;
570
- var Cn = 1, we = class lt {
571
- id = Cn++;
569
+ var ze = null, he = null, m = null, pt = null, R = null, _t = null, xe = !1, st = !1, pe = null, qe = null, Vt = 0;
570
+ var Zn = 1, Ae = class gt {
571
+ id = Zn++;
572
572
  #e = !1;
573
573
  linked = !0;
574
574
  #t = null;
@@ -576,23 +576,23 @@ var Cn = 1, we = class lt {
576
576
  async_deriveds = /* @__PURE__ */ new Map();
577
577
  current = /* @__PURE__ */ new Map();
578
578
  previous = /* @__PURE__ */ new Map();
579
- #o = /* @__PURE__ */ new Set();
579
+ #l = /* @__PURE__ */ new Set();
580
580
  #i = /* @__PURE__ */ new Set();
581
- #a = 0;
581
+ #s = 0;
582
582
  #n = /* @__PURE__ */ new Map();
583
- #l = null;
584
- #s = [];
585
- #_ = [];
586
- #f = /* @__PURE__ */ new Set();
583
+ #o = null;
584
+ #a = [];
585
+ #p = [];
586
+ #c = /* @__PURE__ */ new Set();
587
587
  #u = /* @__PURE__ */ new Set();
588
588
  #d = /* @__PURE__ */ new Map();
589
- #p = /* @__PURE__ */ new Set();
589
+ #_ = /* @__PURE__ */ new Set();
590
590
  is_fork = !1;
591
- #c = !1;
591
+ #f = !1;
592
592
  constructor() {
593
- fe === null ? Le = fe = this : (fe.#r = this, this.#t = fe), fe = this;
593
+ he === null ? ze = he = this : (he.#r = this, this.#t = he), he = this;
594
594
  }
595
- #m() {
595
+ #y() {
596
596
  if (this.is_fork) return !0;
597
597
  for (const n of this.#n.keys()) {
598
598
  for (var t = n, r = !1; t.parent !== null; ) {
@@ -610,74 +610,75 @@ var Cn = 1, we = class lt {
610
610
  this.#d.has(t) || this.#d.set(t, {
611
611
  d: [],
612
612
  m: []
613
- }), this.#p.delete(t);
613
+ }), this.#_.delete(t);
614
614
  }
615
615
  unskip_effect(t, r = (n) => this.schedule(n)) {
616
616
  var n = this.#d.get(t);
617
617
  if (n) {
618
618
  this.#d.delete(t);
619
619
  for (var i of n.d)
620
- k(i, H), r(i);
620
+ $(i, N), r(i);
621
621
  for (i of n.m)
622
- k(i, oe), r(i);
622
+ $(i, de), r(i);
623
623
  }
624
- this.#p.add(t);
624
+ this.#_.add(t);
625
625
  }
626
626
  #g() {
627
- this.#e = !0, Ct++ > 1e3 && (this.#h(), In());
628
- for (const f of this.#f)
629
- this.#u.delete(f), k(f, H), this.schedule(f);
630
- for (const f of this.#u)
631
- k(f, oe), this.schedule(f);
632
- const t = this.#s;
633
- this.#s = [], this.apply();
634
- var r = de = [], n = [], i = Be = [];
635
- for (const f of t) try {
636
- this.#w(f, r, n);
627
+ this.#e = !0, Vt++ > 1e3 && (this.#v(), Xn());
628
+ for (const l of this.#c)
629
+ this.#u.delete(l), $(l, N), this.schedule(l);
630
+ for (const l of this.#u)
631
+ $(l, de), this.schedule(l);
632
+ const t = this.#a;
633
+ this.#a = [], this.apply();
634
+ var r = pe = [], n = [], i = qe = [];
635
+ for (const l of t) try {
636
+ this.#w(l, r, n);
637
637
  } catch (v) {
638
- throw ur(f), this.#m() || this.discard(), v;
638
+ throw br(l), this.#y() || this.discard(), v;
639
639
  }
640
- if (y = null, i.length > 0) {
641
- var s = lt.ensure();
642
- for (const f of i) s.schedule(f);
640
+ if (m = null, i.length > 0) {
641
+ var a = gt.ensure();
642
+ for (const l of i) a.schedule(l);
643
643
  }
644
- if (de = null, Be = null, this.#m()) {
645
- this.#v(n), this.#v(r);
646
- for (const [f, v] of this.#d) fr(f, v);
647
- i.length > 0 && y.#g();
644
+ if (pe = null, qe = null, this.#y()) {
645
+ this.#h(n), this.#h(r);
646
+ for (const [l, v] of this.#d) wr(l, v);
647
+ i.length > 0 && m.#g();
648
648
  return;
649
649
  }
650
- const l = this.#b();
651
- if (l) {
652
- this.#v(n), this.#v(r), l.#$(this);
650
+ const o = this.#b();
651
+ if (o) {
652
+ this.#h(n), this.#h(r), o.#S(this);
653
653
  return;
654
654
  }
655
- this.#f.clear(), this.#u.clear();
656
- for (const f of this.#o) f(this);
657
- this.#o.clear(), st = this, It(n), It(r), st = null, this.#l?.resolve();
658
- var a = y;
659
- if (this.#a === 0 && (this.#s.length === 0 || a !== null) && (this.#h(), K && (this.#y(), y = a)), this.#s.length > 0) if (a !== null) {
660
- const f = a;
661
- f.#s.push(...this.#s.filter((v) => !f.#s.includes(v)));
662
- } else a = this;
663
- a !== null && a.#g();
655
+ this.#c.clear(), this.#u.clear();
656
+ for (const l of this.#l) l(this);
657
+ this.#l.clear(), pt = this, qt(n), qt(r), pt = null, this.#o?.resolve();
658
+ var s = m;
659
+ if (this.#s === 0 && (this.#a.length === 0 || s !== null) && (this.#v(), re && (this.#m(), m = s)), this.#a.length > 0)
660
+ if (s !== null) {
661
+ const l = s;
662
+ l.#a.push(...this.#a.filter((v) => !l.#a.includes(v)));
663
+ } else s = this;
664
+ s !== null && (K.clear(), s.#g());
664
665
  }
665
666
  #w(t, r, n) {
666
- t.f ^= L;
667
+ t.f ^= U;
667
668
  for (var i = t.first; i !== null; ) {
668
- var s = i.f, l = (s & 96) !== 0;
669
- if (!(l && (s & 1024) !== 0 || (s & 8192) !== 0 || this.#d.has(i)) && i.fn !== null) {
670
- l ? i.f ^= L : (s & 4) !== 0 ? r.push(i) : K && (s & 16777224) !== 0 ? n.push(i) : Ne(i) && ((s & 16) !== 0 && this.#u.add(i), ye(i));
671
- var a = i.first;
672
- if (a !== null) {
673
- i = a;
669
+ var a = i.f, o = (a & 96) !== 0;
670
+ if (!(o && (a & 1024) !== 0 || (a & 8192) !== 0 || this.#d.has(i)) && i.fn !== null) {
671
+ o ? i.f ^= U : (a & 4) !== 0 ? r.push(i) : re && (a & 16777224) !== 0 ? n.push(i) : He(i) && ((a & 16) !== 0 && this.#u.add(i), be(i));
672
+ var s = i.first;
673
+ if (s !== null) {
674
+ i = s;
674
675
  continue;
675
676
  }
676
677
  }
677
678
  for (; i !== null; ) {
678
- var f = i.next;
679
- if (f !== null) {
680
- i = f;
679
+ var l = i.next;
680
+ if (l !== null) {
681
+ i = l;
681
682
  break;
682
683
  }
683
684
  i = i.parent;
@@ -693,147 +694,147 @@ var Cn = 1, we = class lt {
693
694
  }
694
695
  return null;
695
696
  }
696
- #$(t) {
697
+ #S(t) {
697
698
  for (const [n, i] of t.current)
698
699
  !this.previous.has(n) && t.previous.has(n) && this.previous.set(n, t.previous.get(n)), this.current.set(n, i);
699
700
  for (const [n, i] of t.async_deriveds) {
700
- const s = this.async_deriveds.get(n);
701
- s && i.promise.then(s.resolve).catch(s.reject);
701
+ const a = this.async_deriveds.get(n);
702
+ a && i.promise.then(a.resolve).catch(a.reject);
702
703
  }
703
- t.async_deriveds.clear(), this.transfer_effects(t.#f, t.#u);
704
+ t.async_deriveds.clear(), this.transfer_effects(t.#c, t.#u);
704
705
  const r = (n) => {
705
706
  var i = n.reactions;
706
707
  if (i !== null && !((n.f & 2) !== 0 && (n.f & 6144) === 0))
707
- for (const a of i) {
708
- var s = a.f;
709
- if ((s & 2) !== 0) r(a);
708
+ for (const s of i) {
709
+ var a = s.f;
710
+ if ((a & 2) !== 0) r(s);
710
711
  else {
711
- var l = a;
712
- s & 4194320 && !this.async_deriveds.has(l) && (this.#u.delete(l), k(l, H), this.schedule(l));
712
+ var o = s;
713
+ a & 4194320 && !this.async_deriveds.has(o) && (this.#u.delete(o), $(o, N), this.schedule(o));
713
714
  }
714
715
  }
715
716
  };
716
717
  for (const n of this.current.keys()) r(n);
717
- this.oncommit(() => t.discard()), t.#h(), y = this, this.#g();
718
+ this.oncommit(() => t.discard()), t.#v(), m = this, this.#g();
718
719
  }
719
- #v(t) {
720
- for (var r = 0; r < t.length; r += 1) nr(t[r], this.#f, this.#u);
720
+ #h(t) {
721
+ for (var r = 0; r < t.length; r += 1) vr(t[r], this.#c, this.#u);
721
722
  }
722
723
  capture(t, r, n = !1) {
723
- t.v !== A && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), M?.set(t, r)), this.is_fork || (t.v = r);
724
+ t.v !== E && !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);
724
725
  }
725
726
  activate() {
726
- y = this;
727
+ m = this;
727
728
  }
728
729
  deactivate() {
729
- y = null, M = null;
730
+ m = null, R = null;
730
731
  }
731
732
  flush() {
732
733
  try {
733
- tt = !0, y = this, this.#g();
734
+ st = !0, m = this, this.#g();
734
735
  } finally {
735
- Ct = 0, at = null, de = null, Be = null, tt = !1, y = null, M = null, ae.clear();
736
+ Vt = 0, _t = null, pe = null, qe = null, st = !1, m = null, R = null, K.clear();
736
737
  }
737
738
  }
738
739
  discard() {
739
740
  for (const t of this.#i) t(this);
740
741
  this.#i.clear();
741
742
  for (const t of this.async_deriveds.values()) t.reject(ke);
742
- this.#h(), this.#l?.resolve();
743
+ this.#v(), this.#o?.resolve();
743
744
  }
744
745
  register_created_effect(t) {
745
- this.#_.push(t);
746
+ this.#p.push(t);
746
747
  }
747
- #y() {
748
- for (let c = Le; c !== null; c = c.#r) {
749
- var t = c.id < this.id, r = [];
750
- for (const [o, [u, d]] of this.current) {
751
- if (c.current.has(o)) {
752
- var n = c.current.get(o)[0];
753
- if (t && u !== n) c.current.set(o, [u, d]);
748
+ #m() {
749
+ for (let f = ze; f !== null; f = f.#r) {
750
+ var t = f.id < this.id, r = [];
751
+ for (const [u, [c, d]] of this.current) {
752
+ if (f.current.has(u)) {
753
+ var n = f.current.get(u)[0];
754
+ if (t && c !== n) f.current.set(u, [c, d]);
754
755
  else continue;
755
756
  }
756
- r.push(o);
757
+ r.push(u);
757
758
  }
758
- if (t) for (const [o, u] of this.async_deriveds) {
759
- const d = c.async_deriveds.get(o);
760
- d && u.promise.then(d.resolve).catch(d.reject);
759
+ if (t) for (const [u, c] of this.async_deriveds) {
760
+ const d = f.async_deriveds.get(u);
761
+ d && c.promise.then(d.resolve).catch(d.reject);
761
762
  }
762
- var i = [...c.current.keys()].filter((o) => !c.current.get(o)[1]);
763
- if (!(!c.#e || i.length === 0)) {
764
- var s = i.filter((o) => !this.current.has(o));
765
- if (s.length === 0)
766
- t && c.discard();
763
+ var i = [...f.current.keys()].filter((u) => !f.current.get(u)[1]);
764
+ if (!(!f.#e || i.length === 0)) {
765
+ var a = i.filter((u) => !this.current.has(u));
766
+ if (a.length === 0)
767
+ t && f.discard();
767
768
  else if (r.length > 0) {
768
- if (t) for (const o of this.#p) c.unskip_effect(o, (u) => {
769
- (u.f & 4194320) !== 0 ? c.schedule(u) : c.#v([u]);
769
+ if (t) for (const u of this.#_) f.unskip_effect(u, (c) => {
770
+ (c.f & 4194320) !== 0 ? f.schedule(c) : f.#h([c]);
770
771
  });
771
- c.activate();
772
- var l = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
773
- for (var f of r) or(f, s, l, a);
774
- a = /* @__PURE__ */ new Map();
775
- var v = [...c.current].filter(([o, u]) => {
776
- const d = this.current.get(o);
777
- return d ? d[0] !== u[0] || d[1] !== u[1] : !0;
778
- }).map(([o]) => o);
772
+ f.activate();
773
+ var o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
774
+ for (var l of r) yr(l, a, o, s);
775
+ s = /* @__PURE__ */ new Map();
776
+ var v = [...f.current].filter(([u, c]) => {
777
+ const d = this.current.get(u);
778
+ return d ? d[0] !== c[0] || d[1] !== c[1] : !0;
779
+ }).map(([u]) => u);
779
780
  if (v.length > 0)
780
- for (const o of this.#_) (o.f & 155648) === 0 && yt(o, v, a) && ((o.f & 4194320) !== 0 ? (k(o, H), c.schedule(o)) : c.#f.add(o));
781
- if (c.#s.length > 0 && !c.#c) {
782
- c.apply();
783
- for (var p of c.#s) c.#w(p, [], []);
784
- c.#s = [];
781
+ for (const u of this.#p) (u.f & 155648) === 0 && Rt(u, v, s) && ((u.f & 4194320) !== 0 ? ($(u, N), f.schedule(u)) : f.#c.add(u));
782
+ if (f.#a.length > 0 && !f.#f) {
783
+ f.apply();
784
+ for (var _ of f.#a) f.#w(_, [], []);
785
+ f.#a = [];
785
786
  }
786
- c.deactivate();
787
+ f.deactivate();
787
788
  }
788
789
  }
789
790
  }
790
791
  }
791
792
  increment(t, r) {
792
- if (this.#a += 1, t) {
793
+ if (this.#s += 1, t) {
793
794
  let n = this.#n.get(r) ?? 0;
794
795
  this.#n.set(r, n + 1);
795
796
  }
796
797
  }
797
798
  decrement(t, r) {
798
- if (this.#a -= 1, t) {
799
+ if (this.#s -= 1, t) {
799
800
  let n = this.#n.get(r) ?? 0;
800
801
  n === 1 ? this.#n.delete(r) : this.#n.set(r, n - 1);
801
802
  }
802
- this.#c || (this.#c = !0, ne(() => {
803
- this.#c = !1, this.linked && this.flush();
803
+ this.#f || (this.#f = !0, le(() => {
804
+ this.#f = !1, this.linked && this.flush();
804
805
  }));
805
806
  }
806
807
  transfer_effects(t, r) {
807
- for (const n of t) this.#f.add(n);
808
+ for (const n of t) this.#c.add(n);
808
809
  for (const n of r) this.#u.add(n);
809
810
  t.clear(), r.clear();
810
811
  }
811
812
  oncommit(t) {
812
- this.#o.add(t);
813
+ this.#l.add(t);
813
814
  }
814
815
  ondiscard(t) {
815
816
  this.#i.add(t);
816
817
  }
817
818
  settled() {
818
- return (this.#l ??= Ut()).promise;
819
+ return (this.#o ??= ar()).promise;
819
820
  }
820
821
  static ensure() {
821
- if (y === null) {
822
- const t = y = new lt();
823
- !tt && !Te && ne(() => {
822
+ if (m === null) {
823
+ const t = m = new gt();
824
+ !st && !xe && le(() => {
824
825
  t.#e || t.flush();
825
826
  });
826
827
  }
827
- return y;
828
+ return m;
828
829
  }
829
830
  apply() {
830
- if (!K || !this.is_fork && this.#t === null && this.#r === null) {
831
- M = null;
831
+ if (!re || !this.is_fork && this.#t === null && this.#r === null) {
832
+ R = null;
832
833
  return;
833
834
  }
834
- M = /* @__PURE__ */ new Map();
835
- for (const [r, [n]] of this.current) M.set(r, n);
836
- for (let r = Le; r !== null; r = r.#r)
835
+ R = /* @__PURE__ */ new Map();
836
+ for (const [r, [n]] of this.current) R.set(r, n);
837
+ for (let r = ze; r !== null; r = r.#r)
837
838
  if (!(r === this || r.is_fork)) {
838
839
  var t = !1;
839
840
  if (r.id < this.id) {
@@ -844,395 +845,395 @@ var Cn = 1, we = class lt {
844
845
  }
845
846
  }
846
847
  if (!t)
847
- for (const [n, i] of r.previous) M.has(n) || M.set(n, i);
848
+ for (const [n, i] of r.previous) R.has(n) || R.set(n, i);
848
849
  }
849
850
  }
850
851
  schedule(t) {
851
- if (at = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
852
+ if (_t = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
852
853
  t.b.defer_effect(t);
853
854
  return;
854
855
  }
855
856
  for (var r = t; r.parent !== null; ) {
856
857
  r = r.parent;
857
858
  var n = r.f;
858
- if (de !== null && r === g && (K || (m === null || (m.f & 2) === 0) && !$n))
859
+ if (pe !== null && r === g && (re || (y === null || (y.f & 2) === 0) && !zn))
859
860
  return;
860
861
  if ((n & 96) !== 0) {
861
862
  if ((n & 1024) === 0) return;
862
- r.f ^= L;
863
+ r.f ^= U;
863
864
  }
864
865
  }
865
- this.#s.push(r);
866
+ this.#a.push(r);
866
867
  }
867
- #h() {
868
+ #v() {
868
869
  if (this.linked) {
869
870
  var t = this.#t, r = this.#r;
870
- t === null ? Le = r : t.#r = r, r === null ? fe = t : r.#t = t, this.linked = !1;
871
+ t === null ? ze = r : t.#r = r, r === null ? he = t : r.#t = t, this.linked = !1;
871
872
  }
872
873
  }
873
874
  };
874
- function ue(e) {
875
- var t = Te;
876
- Te = !0;
875
+ function V(e) {
876
+ var t = xe;
877
+ xe = !0;
877
878
  try {
878
879
  var r;
879
- for (e && (y !== null && !y.is_fork && y.flush(), r = e()); ; ) {
880
- if (wn(), y === null) return r;
881
- y.flush();
880
+ for (e && (m !== null && !m.is_fork && m.flush(), r = e()); ; ) {
881
+ if (Fn(), m === null) return r;
882
+ m.flush();
882
883
  }
883
884
  } finally {
884
- Te = t;
885
+ xe = t;
885
886
  }
886
887
  }
887
- function In() {
888
+ function Xn() {
888
889
  if (0) {
889
890
  var e;
890
- for (const r of y.current.keys()) for (const [n, i] of r.updated ?? [])
891
+ for (const r of m.current.keys()) for (const [n, i] of r.updated ?? [])
891
892
  var t;
892
893
  }
893
894
  try {
894
- ln();
895
+ Tn();
895
896
  } catch (r) {
896
- te(r, at);
897
+ se(r, _t);
897
898
  }
898
899
  }
899
- var B = null;
900
- function It(e) {
900
+ var Y = null;
901
+ function qt(e) {
901
902
  var t = e.length;
902
903
  if (t !== 0) {
903
904
  for (var r = 0; r < t; ) {
904
905
  var n = e[r++];
905
- if ((n.f & 24576) === 0 && Ne(n) && (B = /* @__PURE__ */ new Set(), ye(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && wr(n), B?.size > 0)) {
906
- ae.clear();
907
- for (const i of B) {
906
+ if ((n.f & 24576) === 0 && He(n) && (Y = /* @__PURE__ */ new Set(), be(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Mr(n), Y?.size > 0)) {
907
+ K.clear();
908
+ for (const i of Y) {
908
909
  if ((i.f & 24576) !== 0) continue;
909
- const s = [i];
910
- let l = i.parent;
911
- for (; l !== null; )
912
- B.has(l) && (B.delete(l), s.push(l)), l = l.parent;
913
- for (let a = s.length - 1; a >= 0; a--) {
914
- const f = s[a];
915
- (f.f & 24576) === 0 && ye(f);
910
+ const a = [i];
911
+ let o = i.parent;
912
+ for (; o !== null; )
913
+ Y.has(o) && (Y.delete(o), a.push(o)), o = o.parent;
914
+ for (let s = a.length - 1; s >= 0; s--) {
915
+ const l = a[s];
916
+ (l.f & 24576) === 0 && be(l);
916
917
  }
917
918
  }
918
- B.clear();
919
+ Y.clear();
919
920
  }
920
921
  }
921
- B = null;
922
+ Y = null;
922
923
  }
923
924
  }
924
- function or(e, t, r, n) {
925
+ function yr(e, t, r, n) {
925
926
  if (!r.has(e) && (r.add(e), e.reactions !== null))
926
927
  for (const i of e.reactions) {
927
- const s = i.f;
928
- (s & 2) !== 0 ? or(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && yt(i, t, n) && (k(i, H), mt(i));
928
+ const a = i.f;
929
+ (a & 2) !== 0 ? yr(i, t, r, n) : (a & 4194320) !== 0 && (a & 2048) === 0 && Rt(i, t, n) && ($(i, N), Mt(i));
929
930
  }
930
931
  }
931
- function yt(e, t, r) {
932
+ function Rt(e, t, r) {
932
933
  const n = r.get(e);
933
934
  if (n !== void 0) return n;
934
935
  if (e.deps !== null) for (const i of e.deps) {
935
- if (ze.call(t, i)) return !0;
936
- if ((i.f & 2) !== 0 && yt(i, t, r))
936
+ if (Ke.call(t, i)) return !0;
937
+ if ((i.f & 2) !== 0 && Rt(i, t, r))
937
938
  return r.set(i, !0), !0;
938
939
  }
939
940
  return r.set(e, !1), !1;
940
941
  }
941
- function mt(e) {
942
- y.schedule(e);
942
+ function Mt(e) {
943
+ m.schedule(e);
943
944
  }
944
- function fr(e, t) {
945
+ function wr(e, t) {
945
946
  if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
946
- (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), k(e, L);
947
+ (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), $(e, U);
947
948
  for (var r = e.first; r !== null; )
948
- fr(r, t), r = r.next;
949
+ wr(r, t), r = r.next;
949
950
  }
950
951
  }
951
- function ur(e) {
952
- k(e, L);
952
+ function br(e) {
953
+ $(e, U);
953
954
  for (var t = e.first; t !== null; )
954
- ur(t), t = t.next;
955
+ br(t), t = t.next;
955
956
  }
956
- var Ze = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map();
957
- var cr = !1;
958
- function Ie(e, t) {
957
+ var et = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Map();
958
+ var Sr = !1;
959
+ function Oe(e, t) {
959
960
  var r = {
960
961
  f: 0,
961
962
  v: e,
962
963
  reactions: null,
963
- equals: Zt,
964
+ equals: cr,
964
965
  rv: 0,
965
966
  wv: 0
966
967
  };
967
968
  return r;
968
969
  }
969
970
  // @__NO_SIDE_EFFECTS__
970
- function N(e, t) {
971
- const r = Ie(e, t);
972
- return Er(r), r;
971
+ function F(e, t) {
972
+ const r = Oe(e, t);
973
+ return Dr(r), r;
973
974
  }
974
975
  // @__NO_SIDE_EFFECTS__
975
- function Nn(e, t = !1, r = !0) {
976
- const n = Ie(e);
977
- return t || (n.equals = Xt), Qe && r && T !== null && T.l !== null && (T.l.s ??= []).push(n), n;
976
+ function ei(e, t = !1, r = !0) {
977
+ const n = Oe(e);
978
+ return t || (n.equals = ur), nt && r && x !== null && x.l !== null && (x.l.s ??= []).push(n), n;
978
979
  }
979
- function O(e, t, r = !1) {
980
- m !== null && (!V || (m.f & 131072) !== 0) && Ce() && (m.f & 4325394) !== 0 && (F === null || !F.has(e)) && dn();
981
- let n = r ? ve(t) : t;
982
- return Xe(e, n, Be);
980
+ function D(e, t, r = !1) {
981
+ y !== null && (!q || (y.f & 131072) !== 0) && Ne() && (y.f & 4325394) !== 0 && (J === null || !J.has(e)) && Mn();
982
+ let n = r ? _e(t) : t;
983
+ return tt(e, n, qe);
983
984
  }
984
- function Xe(e, t, r = null) {
985
+ function tt(e, t, r = null) {
985
986
  if (!e.equals(t)) {
986
- ae.set(e, X ? t : e.v);
987
- var n = we.ensure();
987
+ ie ? K.set(e, t) : K.has(e) || K.set(e, e.v);
988
+ var n = Ae.ensure();
988
989
  if (n.capture(e, t), (e.f & 2) !== 0) {
989
990
  const i = e;
990
- (e.f & 2048) !== 0 && gt(i), M === null && pt(i);
991
+ (e.f & 2048) !== 0 && Pt(i), R === null && Et(i);
991
992
  }
992
- e.wv = Tr(), dr(e, H, r), Ce() && g !== null && (g.f & 1024) !== 0 && (g.f & 96) === 0 && (j === null ? ei([e]) : j.push(e)), !n.is_fork && Ze.size > 0 && !cr && Hn();
993
+ e.wv = Or(), Ar(e, N, r), Ne() && g !== null && (g.f & 1024) !== 0 && (g.f & 96) === 0 && (H === null ? yi([e]) : H.push(e)), !n.is_fork && et.size > 0 && !Sr && ti();
993
994
  }
994
995
  return t;
995
996
  }
996
- function Hn() {
997
- cr = !1;
998
- for (const e of Ze) {
999
- (e.f & 1024) !== 0 && k(e, oe);
997
+ function ti() {
998
+ Sr = !1;
999
+ for (const e of et) {
1000
+ (e.f & 1024) !== 0 && $(e, de);
1000
1001
  let t;
1001
1002
  try {
1002
- t = Ne(e);
1003
+ t = He(e);
1003
1004
  } catch {
1004
1005
  t = !0;
1005
1006
  }
1006
- t && ye(e);
1007
+ t && be(e);
1007
1008
  }
1008
- Ze.clear();
1009
+ et.clear();
1009
1010
  }
1010
- function Se(e) {
1011
- O(e, e.v + 1);
1011
+ function Ee(e) {
1012
+ D(e, e.v + 1);
1012
1013
  }
1013
- function dr(e, t, r) {
1014
+ function Ar(e, t, r) {
1014
1015
  var n = e.reactions;
1015
1016
  if (n !== null)
1016
- for (var i = Ce(), s = n.length, l = 0; l < s; l++) {
1017
- var a = n[l], f = a.f;
1018
- if (!(!i && a === g)) {
1019
- var v = (f & H) === 0;
1020
- if (v && k(a, t), (f & 131072) !== 0) Ze.add(a);
1021
- else if ((f & 2) !== 0) {
1022
- var p = a;
1023
- M?.delete(p), (f & 65536) === 0 && (f & 512 && (g === null || (g.f & 2097152) === 0) && (a.f |= Oe), dr(p, oe, r));
1017
+ for (var i = Ne(), a = n.length, o = 0; o < a; o++) {
1018
+ var s = n[o], l = s.f;
1019
+ if (!(!i && s === g)) {
1020
+ var v = (l & N) === 0;
1021
+ if (v && $(s, t), (l & 131072) !== 0) et.add(s);
1022
+ else if ((l & 2) !== 0) {
1023
+ var _ = s;
1024
+ R?.delete(_), (l & 65536) === 0 && (l & 512 && (g === null || (g.f & 2097152) === 0) && (s.f |= Ie), Ar(_, de, r));
1024
1025
  } else if (v) {
1025
- var c = a;
1026
- (f & 16) !== 0 && B !== null && B.add(c), r !== null ? r.push(c) : mt(c);
1026
+ var f = s;
1027
+ (l & 16) !== 0 && Y !== null && Y.add(f), r !== null ? r.push(f) : Mt(f);
1027
1028
  }
1028
1029
  }
1029
1030
  }
1030
1031
  }
1031
- var jn = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
1032
- function ve(e) {
1033
- if (typeof e != "object" || e === null || xe in e) return e;
1034
- const t = zt(e);
1035
- if (t !== zr && t !== Ur) return e;
1036
- var r = /* @__PURE__ */ new Map(), n = Dr(e), i = /* @__PURE__ */ N(0), s = null, l = le, a = (c) => {
1037
- if (le === l) return c();
1038
- var o = m, u = le;
1039
- P(null), Pt(l);
1040
- var d = c();
1041
- return P(o), Pt(u), d;
1032
+ var ri = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
1033
+ function _e(e) {
1034
+ if (typeof e != "object" || e === null || Te in e) return e;
1035
+ const t = ir(e);
1036
+ if (t !== fn && t !== dn) return e;
1037
+ var r = /* @__PURE__ */ new Map(), n = on(e), i = /* @__PURE__ */ F(0), a = null, o = fe, s = (f) => {
1038
+ if (fe === o) return f();
1039
+ var u = y, c = fe;
1040
+ z(null), Jt(o);
1041
+ var d = f();
1042
+ return z(u), Jt(c), d;
1042
1043
  };
1043
- n && r.set("length", /* @__PURE__ */ N(e.length, s));
1044
- var f = "";
1044
+ n && r.set("length", /* @__PURE__ */ F(e.length, a));
1045
+ var l = "";
1045
1046
  let v = !1;
1046
- function p(c) {
1047
+ function _(f) {
1047
1048
  if (!v) {
1048
- v = !0, f = c, Rt(i, `${f} version`);
1049
- for (const [o, u] of r) Rt(u, Ln(f, o));
1049
+ v = !0, l = f, Bt(i, `${l} version`);
1050
+ for (const [u, c] of r) Bt(c, ni(l, u));
1050
1051
  v = !1;
1051
1052
  }
1052
1053
  }
1053
1054
  return new Proxy(e, {
1054
- defineProperty(c, o, u) {
1055
- (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && un();
1056
- var d = r.get(o);
1057
- return d === void 0 ? a(() => {
1058
- var h = /* @__PURE__ */ N(u.value, s);
1059
- return r.set(o, h), h;
1060
- }) : O(d, u.value, !0), !0;
1055
+ defineProperty(f, u, c) {
1056
+ (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Pn();
1057
+ var d = r.get(u);
1058
+ return d === void 0 ? s(() => {
1059
+ var h = /* @__PURE__ */ F(c.value, a);
1060
+ return r.set(u, h), h;
1061
+ }) : D(d, c.value, !0), !0;
1061
1062
  },
1062
- deleteProperty(c, o) {
1063
- var u = r.get(o);
1064
- if (u === void 0) {
1065
- if (o in c) {
1066
- const d = a(() => /* @__PURE__ */ N(A, s));
1067
- r.set(o, d), Se(i);
1063
+ deleteProperty(f, u) {
1064
+ var c = r.get(u);
1065
+ if (c === void 0) {
1066
+ if (u in f) {
1067
+ const d = s(() => /* @__PURE__ */ F(E, a));
1068
+ r.set(u, d), Ee(i);
1068
1069
  }
1069
1070
  } else
1070
- O(u, A), Se(i);
1071
+ D(c, E), Ee(i);
1071
1072
  return !0;
1072
1073
  },
1073
- get(c, o, u) {
1074
- if (o === xe) return e;
1075
- var d = r.get(o), h = o in c;
1076
- if (d === void 0 && (!h || se(c, o)?.writable) && (d = a(() => {
1077
- var x = /* @__PURE__ */ N(ve(h ? c[o] : A), s);
1078
- return x;
1079
- }), r.set(o, d)), d !== void 0) {
1080
- var b = _(d);
1081
- return b === A ? void 0 : b;
1074
+ get(f, u, c) {
1075
+ if (u === Te) return e;
1076
+ var d = r.get(u), h = u in f;
1077
+ if (d === void 0 && (!h || ue(f, u)?.writable) && (d = s(() => {
1078
+ var A = _e(h ? f[u] : E), P = /* @__PURE__ */ F(A, a);
1079
+ return P;
1080
+ }), r.set(u, d)), d !== void 0) {
1081
+ var S = p(d);
1082
+ return S === E ? void 0 : S;
1082
1083
  }
1083
- return Reflect.get(c, o, u);
1084
+ return Reflect.get(f, u, c);
1084
1085
  },
1085
- getOwnPropertyDescriptor(c, o) {
1086
- var u = Reflect.getOwnPropertyDescriptor(c, o);
1087
- if (u && "value" in u) {
1088
- var d = r.get(o);
1089
- d && (u.value = _(d));
1090
- } else if (u === void 0) {
1091
- var h = r.get(o), b = h?.v;
1092
- if (h !== void 0 && b !== A) return {
1086
+ getOwnPropertyDescriptor(f, u) {
1087
+ var c = Reflect.getOwnPropertyDescriptor(f, u);
1088
+ if (c && "value" in c) {
1089
+ var d = r.get(u);
1090
+ d && (c.value = p(d));
1091
+ } else if (c === void 0) {
1092
+ var h = r.get(u), S = h?.v;
1093
+ if (h !== void 0 && S !== E) return {
1093
1094
  enumerable: !0,
1094
1095
  configurable: !0,
1095
- value: b,
1096
+ value: S,
1096
1097
  writable: !0
1097
1098
  };
1098
1099
  }
1099
- return u;
1100
+ return c;
1100
1101
  },
1101
- has(c, o) {
1102
- if (o === xe) return !0;
1103
- var u = r.get(o), d = u !== void 0 && u.v !== A || Reflect.has(c, o);
1104
- return (u !== void 0 || g !== null && (!d || se(c, o)?.writable)) && (u === void 0 && (u = a(() => {
1105
- var h = /* @__PURE__ */ N(d ? ve(c[o]) : A, s);
1106
- return h;
1107
- }), r.set(o, u)), _(u) === A) ? !1 : d;
1102
+ has(f, u) {
1103
+ if (u === Te) return !0;
1104
+ var c = r.get(u), d = c !== void 0 && c.v !== E || Reflect.has(f, u);
1105
+ return (c !== void 0 || g !== null && (!d || ue(f, u)?.writable)) && (c === void 0 && (c = s(() => {
1106
+ var h = d ? _e(f[u]) : E, S = /* @__PURE__ */ F(h, a);
1107
+ return S;
1108
+ }), r.set(u, c)), p(c) === E) ? !1 : d;
1108
1109
  },
1109
- set(c, o, u, d) {
1110
- var h = r.get(o), b = o in c;
1111
- if (n && o === "length") for (var x = u; x < h.v; x += 1) {
1112
- var q = r.get(x + "");
1113
- q !== void 0 ? O(q, A) : x in c && (q = a(() => /* @__PURE__ */ N(A, s)), r.set(x + "", q));
1110
+ set(f, u, c, d) {
1111
+ var h = r.get(u), S = u in f;
1112
+ if (n && u === "length") for (var A = c; A < h.v; A += 1) {
1113
+ var P = r.get(A + "");
1114
+ P !== void 0 ? D(P, E) : A in f && (P = s(() => /* @__PURE__ */ F(E, a)), r.set(A + "", P));
1114
1115
  }
1115
1116
  if (h === void 0)
1116
- (!b || se(c, o)?.writable) && (h = a(() => /* @__PURE__ */ N(void 0, s)), O(h, ve(u)), r.set(o, h));
1117
+ (!S || ue(f, u)?.writable) && (h = s(() => /* @__PURE__ */ F(void 0, a)), D(h, _e(c)), r.set(u, h));
1117
1118
  else {
1118
- b = h.v !== A;
1119
- var U = a(() => ve(u));
1120
- O(h, U);
1119
+ S = h.v !== E;
1120
+ var j = s(() => _e(c));
1121
+ D(h, j);
1121
1122
  }
1122
- var E = Reflect.getOwnPropertyDescriptor(c, o);
1123
- if (E?.set && E.set.call(d, u), !b) {
1124
- if (n && typeof o == "string") {
1125
- var G = r.get("length"), Q = Number(o);
1126
- Number.isInteger(Q) && Q >= G.v && O(G, Q + 1);
1123
+ var T = Reflect.getOwnPropertyDescriptor(f, u);
1124
+ if (T?.set && T.set.call(d, c), !S) {
1125
+ if (n && typeof u == "string") {
1126
+ var B = r.get("length"), X = Number(u);
1127
+ Number.isInteger(X) && X >= B.v && D(B, X + 1);
1127
1128
  }
1128
- Se(i);
1129
+ Ee(i);
1129
1130
  }
1130
1131
  return !0;
1131
1132
  },
1132
- ownKeys(c) {
1133
- _(i);
1134
- var o = Reflect.ownKeys(c).filter((h) => {
1135
- var b = r.get(h);
1136
- return b === void 0 || b.v !== A;
1133
+ ownKeys(f) {
1134
+ p(i);
1135
+ var u = Reflect.ownKeys(f).filter((h) => {
1136
+ var S = r.get(h);
1137
+ return S === void 0 || S.v !== E;
1137
1138
  });
1138
- for (var [u, d] of r) d.v !== A && !(u in c) && o.push(u);
1139
- return o;
1139
+ for (var [c, d] of r) d.v !== E && !(c in f) && u.push(c);
1140
+ return u;
1140
1141
  },
1141
1142
  setPrototypeOf() {
1142
- cn();
1143
+ Rn();
1143
1144
  }
1144
1145
  });
1145
1146
  }
1146
- function Ln(e, t) {
1147
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : jn.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1147
+ function ni(e, t) {
1148
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : ri.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1148
1149
  }
1149
- var Nt, Pn, vr, hr, _r;
1150
- function ot() {
1151
- if (Nt === void 0) {
1152
- Nt = window, Pn = document, vr = /Firefox/.test(navigator.userAgent);
1150
+ var Gt, ii, kr, $r, Tr;
1151
+ function mt() {
1152
+ if (Gt === void 0) {
1153
+ Gt = window, ii = document, kr = /Firefox/.test(navigator.userAgent);
1153
1154
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
1154
- hr = se(t, "firstChild").get, _r = se(t, "nextSibling").get, At(e) && (e[nt] = void 0, e[Wt] = null, e[en] = void 0, e.__e = void 0), At(r) && (r[it] = void 0);
1155
+ $r = ue(t, "firstChild").get, Tr = ue(t, "nextSibling").get, Ft(e) && (e[ht] = void 0, e[or] = null, e[wn] = void 0, e.__e = void 0), Ft(r) && (r[vt] = void 0);
1155
1156
  }
1156
1157
  }
1157
- function Z(e = "") {
1158
+ function ne(e = "") {
1158
1159
  return document.createTextNode(e);
1159
1160
  }
1160
1161
  // @__NO_SIDE_EFFECTS__
1161
- function ge(e) {
1162
- return hr.call(e);
1162
+ function we(e) {
1163
+ return $r.call(e);
1163
1164
  }
1164
1165
  // @__NO_SIDE_EFFECTS__
1165
- function J(e) {
1166
- return _r.call(e);
1166
+ function ae(e) {
1167
+ return Tr.call(e);
1167
1168
  }
1168
- function Ht(e, t) {
1169
- if (!$) return /* @__PURE__ */ ge(e);
1170
- var r = /* @__PURE__ */ ge(w);
1171
- if (r === null) r = w.appendChild(Z());
1169
+ function Yt(e, t) {
1170
+ if (!k) return /* @__PURE__ */ we(e);
1171
+ var r = /* @__PURE__ */ we(b);
1172
+ if (r === null) r = b.appendChild(ne());
1172
1173
  else if (t && r.nodeType !== 3) {
1173
- var n = Z();
1174
- return r?.before(n), D(n), n;
1174
+ var n = ne();
1175
+ return r?.before(n), G(n), n;
1175
1176
  }
1176
- return t && bt(r), D(r), r;
1177
+ return t && Ct(r), G(r), r;
1177
1178
  }
1178
- function Vn(e, t = !1) {
1179
- if (!$) {
1180
- var r = /* @__PURE__ */ ge(e);
1181
- return r instanceof Comment && r.data === "" ? /* @__PURE__ */ J(r) : r;
1179
+ function ai(e, t = !1) {
1180
+ if (!k) {
1181
+ var r = /* @__PURE__ */ we(e);
1182
+ return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ae(r) : r;
1182
1183
  }
1183
1184
  if (t) {
1184
- if (w?.nodeType !== 3) {
1185
- var n = Z();
1186
- return w?.before(n), D(n), n;
1185
+ if (b?.nodeType !== 3) {
1186
+ var n = ne();
1187
+ return b?.before(n), G(n), n;
1187
1188
  }
1188
- bt(w);
1189
+ Ct(b);
1189
1190
  }
1190
- return w;
1191
+ return b;
1191
1192
  }
1192
- function Dn(e, t = 1, r = !1) {
1193
- let n = $ ? w : e;
1193
+ function si(e, t = 1, r = !1) {
1194
+ let n = k ? b : e;
1194
1195
  for (var i; t--; )
1195
- i = n, n = /* @__PURE__ */ J(n);
1196
- if (!$) return n;
1196
+ i = n, n = /* @__PURE__ */ ae(n);
1197
+ if (!k) return n;
1197
1198
  if (r) {
1198
1199
  if (n?.nodeType !== 3) {
1199
- var s = Z();
1200
- return n === null ? i?.after(s) : n.before(s), D(s), s;
1200
+ var a = ne();
1201
+ return n === null ? i?.after(a) : n.before(a), G(a), a;
1201
1202
  }
1202
- bt(n);
1203
+ Ct(n);
1203
1204
  }
1204
- return D(n), n;
1205
+ return G(n), n;
1205
1206
  }
1206
- function Bn(e) {
1207
+ function oi(e) {
1207
1208
  e.textContent = "";
1208
1209
  }
1209
- function Fn() {
1210
- return !K || B !== null ? !1 : (g.f & vt) !== 0;
1210
+ function li() {
1211
+ return !re || Y !== null ? !1 : (g.f & At) !== 0;
1211
1212
  }
1212
- function wt(e, t, r) {
1213
+ function Lt(e, t, r) {
1213
1214
  return t == null || t === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(e, { is: r }) : document.createElement(e) : r ? document.createElementNS(t, e, { is: r }) : document.createElementNS(t, e);
1214
1215
  }
1215
- function bt(e) {
1216
+ function Ct(e) {
1216
1217
  if (e.nodeValue.length < 65536) return;
1217
1218
  let t = e.nextSibling;
1218
1219
  for (; t !== null && t.nodeType === 3; )
1219
1220
  t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1220
1221
  }
1221
- function Yn(e) {
1222
- g === null && (m === null && an(e), sn()), X && nn(e);
1222
+ function ci(e) {
1223
+ g === null && (y === null && $n(e), kn()), ie && An(e);
1223
1224
  }
1224
- function zn(e, t) {
1225
+ function ui(e, t) {
1225
1226
  var r = t.last;
1226
1227
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1227
1228
  }
1228
- function z(e, t) {
1229
+ function Z(e, t) {
1229
1230
  var r = g;
1230
- r !== null && (r.f & 8192) !== 0 && (e |= dt);
1231
+ r !== null && (r.f & 8192) !== 0 && (e |= St);
1231
1232
  var n = {
1232
- ctx: T,
1233
+ ctx: x,
1233
1234
  deps: null,
1234
1235
  nodes: null,
1235
- f: e | H | 512,
1236
+ f: e | N | 512,
1236
1237
  first: null,
1237
1238
  fn: t,
1238
1239
  last: null,
@@ -1244,104 +1245,105 @@ function z(e, t) {
1244
1245
  wv: 0,
1245
1246
  ac: null
1246
1247
  };
1247
- y?.register_created_effect(n);
1248
+ m?.register_created_effect(n);
1248
1249
  var i = n;
1249
- if ((e & 4) !== 0) de !== null ? de.push(n) : we.ensure().schedule(n);
1250
+ if ((e & 4) !== 0)
1251
+ pe !== null ? pe.push(n) : Ae.ensure().schedule(n);
1250
1252
  else if (t !== null) {
1251
1253
  try {
1252
- ye(n);
1253
- } catch (l) {
1254
- throw C(n), l;
1254
+ be(n);
1255
+ } catch (o) {
1256
+ throw C(n), o;
1255
1257
  }
1256
- 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 |= ht));
1258
+ 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 |= kt));
1257
1259
  }
1258
- if (i !== null && (i.parent = r, r !== null && zn(i, r), m !== null && (m.f & 2) !== 0 && (e & 64) === 0)) {
1259
- var s = m;
1260
- (s.effects ??= []).push(i);
1260
+ if (i !== null && (i.parent = r, r !== null && ui(i, r), y !== null && (y.f & 2) !== 0 && (e & 64) === 0)) {
1261
+ var a = y;
1262
+ (a.effects ??= []).push(i);
1261
1263
  }
1262
1264
  return n;
1263
1265
  }
1264
- function $t() {
1265
- return m !== null && !V;
1266
+ function It() {
1267
+ return y !== null && !q;
1266
1268
  }
1267
- function Un(e) {
1268
- const t = z(8, null);
1269
- return k(t, L), t.teardown = e, t;
1269
+ function fi(e) {
1270
+ const t = Z(8, null);
1271
+ return $(t, U), t.teardown = e, t;
1270
1272
  }
1271
- function Pe(e) {
1272
- Yn("$effect");
1273
+ function ot(e) {
1274
+ ci("$effect");
1273
1275
  var t = g.f;
1274
- if (!m && (t & 32) !== 0 && T !== null && !T.i) {
1275
- var r = T;
1276
+ if (!y && (t & 32) !== 0 && x !== null && !x.i) {
1277
+ var r = x;
1276
1278
  (r.e ??= []).push(e);
1277
- } else return pr(e);
1279
+ } else return xr(e);
1278
1280
  }
1279
- function pr(e) {
1280
- return z(4 | Zr, e);
1281
+ function xr(e) {
1282
+ return Z(4 | _n, e);
1281
1283
  }
1282
- function Gn(e) {
1283
- we.ensure();
1284
- const t = z(64 | me, e);
1284
+ function di(e) {
1285
+ Ae.ensure();
1286
+ const t = Z(64 | Se, e);
1285
1287
  return () => {
1286
1288
  C(t);
1287
1289
  };
1288
1290
  }
1289
- function Wn(e) {
1290
- we.ensure();
1291
- const t = z(64 | me, e);
1291
+ function hi(e) {
1292
+ Ae.ensure();
1293
+ const t = Z(64 | Se, e);
1292
1294
  return (r = {}) => new Promise((n) => {
1293
- r.outro ? Ae(t, () => {
1295
+ r.outro ? Pe(t, () => {
1294
1296
  C(t), n(void 0);
1295
1297
  }) : (C(t), n(void 0));
1296
1298
  });
1297
1299
  }
1298
- function gr(e) {
1299
- return z(4, e);
1300
+ function Er(e) {
1301
+ return Z(4, e);
1300
1302
  }
1301
- function Kn(e) {
1302
- return z(Xr | me, e);
1303
+ function vi(e) {
1304
+ return Z(gn | Se, e);
1303
1305
  }
1304
- function kt(e, t = 0) {
1305
- return z(8 | t, e);
1306
+ function Dt(e, t = 0) {
1307
+ return Z(8 | t, e);
1306
1308
  }
1307
- function Zn(e, t = [], r = [], n = []) {
1308
- An(n, t, r, (i) => {
1309
- z(8, () => {
1310
- e(...i.map(_));
1309
+ function pi(e, t = [], r = [], n = []) {
1310
+ Yn(n, t, r, (i) => {
1311
+ Z(8, () => {
1312
+ e(...i.map(p));
1311
1313
  });
1312
1314
  });
1313
1315
  }
1314
- function yr(e, t = 0) {
1315
- var r = z(16 | t, e);
1316
+ function Pr(e, t = 0) {
1317
+ var r = Z(16 | t, e);
1316
1318
  return r;
1317
1319
  }
1318
- function W(e) {
1319
- return z(32 | me, e);
1320
+ function te(e) {
1321
+ return Z(32 | Se, e);
1320
1322
  }
1321
- function mr(e) {
1323
+ function Rr(e) {
1322
1324
  var t = e.teardown;
1323
1325
  if (t !== null) {
1324
- const r = X, n = m;
1325
- Lt(!0), P(null);
1326
+ const r = ie, n = y;
1327
+ Kt(!0), z(null);
1326
1328
  try {
1327
1329
  t.call(null);
1328
1330
  } finally {
1329
- Lt(r), P(n);
1331
+ Kt(r), z(n);
1330
1332
  }
1331
1333
  }
1332
1334
  }
1333
- function Et(e, t = !1) {
1335
+ function Nt(e, t = !1) {
1334
1336
  var r = e.first;
1335
1337
  for (e.first = e.last = null; r !== null; ) {
1336
1338
  const i = r.ac;
1337
- i !== null && et(() => {
1338
- i.abort(Re);
1339
+ i !== null && it(() => {
1340
+ i.abort(De);
1339
1341
  });
1340
1342
  var n = r.next;
1341
1343
  (r.f & 64) !== 0 ? r.parent = null : C(r, t), r = n;
1342
1344
  }
1343
1345
  }
1344
- function Xn(e) {
1346
+ function _i(e) {
1345
1347
  for (var t = e.first; t !== null; ) {
1346
1348
  var r = t.next;
1347
1349
  (t.f & 32) === 0 && C(t), t = r;
@@ -1349,304 +1351,306 @@ function Xn(e) {
1349
1351
  }
1350
1352
  function C(e, t = !0) {
1351
1353
  var r = !1;
1352
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Jn(e.nodes.start, e.nodes.end), r = !0), e.f |= qt, Et(e, t && !r), Me(e, 0);
1354
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (gi(e.nodes.start, e.nodes.end), r = !0), e.f |= Ut, Nt(e, t && !r), Me(e, 0);
1353
1355
  var n = e.nodes && e.nodes.t;
1354
- if (n !== null) for (const s of n) s.stop();
1355
- mr(e), e.f ^= qt, e.f |= Kr;
1356
+ if (n !== null) for (const a of n) a.stop();
1357
+ Rr(e), e.f ^= Ut, e.f |= pn;
1356
1358
  var i = e.parent;
1357
- i !== null && i.first !== null && wr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1359
+ i !== null && i.first !== null && Mr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1358
1360
  }
1359
- function Jn(e, t) {
1361
+ function gi(e, t) {
1360
1362
  for (; e !== null; ) {
1361
- var r = e === t ? null : /* @__PURE__ */ J(e);
1363
+ var r = e === t ? null : /* @__PURE__ */ ae(e);
1362
1364
  e.remove(), e = r;
1363
1365
  }
1364
1366
  }
1365
- function wr(e) {
1367
+ function Mr(e) {
1366
1368
  var t = e.parent, r = e.prev, n = e.next;
1367
1369
  r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
1368
1370
  }
1369
- function Ae(e, t, r = !0) {
1371
+ function Pe(e, t, r = !0) {
1370
1372
  var n = [];
1371
- br(e, n, !0);
1373
+ Lr(e, n, !0);
1372
1374
  var i = () => {
1373
1375
  r && C(e), t && t();
1374
- }, s = n.length;
1375
- if (s > 0) {
1376
- var l = () => --s || i();
1377
- for (var a of n) a.out(l);
1376
+ }, a = n.length;
1377
+ if (a > 0) {
1378
+ var o = () => --a || i();
1379
+ for (var s of n) s.out(o);
1378
1380
  } else i();
1379
1381
  }
1380
- function br(e, t, r) {
1382
+ function Lr(e, t, r) {
1381
1383
  if ((e.f & 8192) === 0) {
1382
- e.f ^= dt;
1384
+ e.f ^= St;
1383
1385
  var n = e.nodes && e.nodes.t;
1384
1386
  if (n !== null)
1385
- for (const a of n) (a.is_global || r) && t.push(a);
1387
+ for (const s of n) (s.is_global || r) && t.push(s);
1386
1388
  for (var i = e.first; i !== null; ) {
1387
- var s = i.next;
1389
+ var a = i.next;
1388
1390
  if ((i.f & 64) === 0) {
1389
- var l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
1390
- br(i, t, l ? r : !1);
1391
+ var o = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
1392
+ Lr(i, t, o ? r : !1);
1391
1393
  }
1392
- i = s;
1394
+ i = a;
1393
1395
  }
1394
1396
  }
1395
1397
  }
1396
- function jt(e) {
1397
- $r(e, !0);
1398
+ function Wt(e) {
1399
+ Cr(e, !0);
1398
1400
  }
1399
- function $r(e, t) {
1401
+ function Cr(e, t) {
1400
1402
  if ((e.f & 8192) !== 0) {
1401
- e.f ^= dt, (e.f & 1024) === 0 && (k(e, H), we.ensure().schedule(e));
1403
+ e.f ^= St, (e.f & 1024) === 0 && ($(e, N), Ae.ensure().schedule(e));
1402
1404
  for (var r = e.first; r !== null; ) {
1403
1405
  var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1404
- $r(r, i ? t : !1), r = n;
1406
+ Cr(r, i ? t : !1), r = n;
1405
1407
  }
1406
- var s = e.nodes && e.nodes.t;
1407
- if (s !== null)
1408
- for (const l of s) (l.is_global || t) && l.in();
1408
+ var a = e.nodes && e.nodes.t;
1409
+ if (a !== null)
1410
+ for (const o of a) (o.is_global || t) && o.in();
1409
1411
  }
1410
1412
  }
1411
- function kr(e, t) {
1413
+ function Ir(e, t) {
1412
1414
  if (e.nodes)
1413
1415
  for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
1414
- var i = r === n ? null : /* @__PURE__ */ J(r);
1416
+ var i = r === n ? null : /* @__PURE__ */ ae(r);
1415
1417
  t.append(r), r = i;
1416
1418
  }
1417
1419
  }
1418
- var Qn = null, Fe = !1, X = !1;
1419
- function Lt(e) {
1420
- X = e;
1420
+ var mi = null, Ge = !1, ie = !1;
1421
+ function Kt(e) {
1422
+ ie = e;
1421
1423
  }
1422
- var m = null, V = !1;
1423
- function P(e) {
1424
- m = e;
1424
+ var y = null, q = !1;
1425
+ function z(e) {
1426
+ y = e;
1425
1427
  }
1426
1428
  var g = null;
1427
- function Y(e) {
1429
+ function Q(e) {
1428
1430
  g = e;
1429
1431
  }
1430
- var F = null;
1431
- function Er(e) {
1432
- m !== null && (!K || (m.f & 2) !== 0) && (F ??= /* @__PURE__ */ new Set()).add(e);
1432
+ var J = null;
1433
+ function Dr(e) {
1434
+ y !== null && (!re || (y.f & 2) !== 0) && (J ??= /* @__PURE__ */ new Set()).add(e);
1433
1435
  }
1434
- var R = null, I = 0, j = null;
1435
- function ei(e) {
1436
- j = e;
1436
+ var L = null, I = 0, H = null;
1437
+ function yi(e) {
1438
+ H = e;
1437
1439
  }
1438
- var xr = 1, ie = 0, le = ie;
1439
- function Pt(e) {
1440
- le = e;
1440
+ var Nr = 1, ce = 0, fe = ce;
1441
+ function Jt(e) {
1442
+ fe = e;
1441
1443
  }
1442
- function Tr() {
1443
- return ++xr;
1444
+ function Or() {
1445
+ return ++Nr;
1444
1446
  }
1445
- function Ne(e) {
1447
+ function He(e) {
1446
1448
  var t = e.f;
1447
1449
  if ((t & 2048) !== 0) return !0;
1448
- if (t & 2 && (e.f &= ~Oe), (t & 4096) !== 0) {
1450
+ if (t & 2 && (e.f &= ~Ie), (t & 4096) !== 0) {
1449
1451
  for (var r = e.deps, n = r.length, i = 0; i < n; i++) {
1450
- var s = r[i];
1451
- if (Ne(s) && ar(s), s.wv > e.wv) return !0;
1452
+ var a = r[i];
1453
+ if (He(a) && gr(a), a.wv > e.wv) return !0;
1452
1454
  }
1453
- (t & 512) !== 0 && M === null && k(e, L);
1455
+ (t & 512) !== 0 && R === null && $(e, U);
1454
1456
  }
1455
1457
  return !1;
1456
1458
  }
1457
- function Sr(e, t, r = !0) {
1459
+ function Hr(e, t, r = !0) {
1458
1460
  var n = e.reactions;
1459
- if (n !== null && !(!K && F !== null && F.has(e)))
1461
+ if (n !== null && !(!re && J !== null && J.has(e)))
1460
1462
  for (var i = 0; i < n.length; i++) {
1461
- var s = n[i];
1462
- (s.f & 2) !== 0 ? Sr(s, t, !1) : t === s && (r ? k(s, H) : (s.f & 1024) !== 0 && k(s, oe), mt(s));
1463
+ var a = n[i];
1464
+ (a.f & 2) !== 0 ? Hr(a, t, !1) : t === a && (r ? $(a, N) : (a.f & 1024) !== 0 && $(a, de), Mt(a));
1463
1465
  }
1464
1466
  }
1465
- function Ar(e) {
1466
- var t = R, r = I, n = j, i = m, s = F, l = T, a = V, f = le, v = e.f;
1467
- R = null, I = 0, j = null, m = (v & 96) === 0 ? e : null, F = null, pe(e.ctx), V = !1, le = ++ie, e.ac !== null && (et(() => {
1468
- e.ac.abort(Re);
1467
+ function Fr(e) {
1468
+ var t = L, r = I, n = H, i = y, a = J, o = x, s = q, l = fe, v = e.f;
1469
+ L = null, I = 0, H = null, y = (v & 96) === 0 ? e : null, J = null, ye(e.ctx), q = !1, fe = ++ce, e.ac !== null && (it(() => {
1470
+ e.ac.abort(De);
1469
1471
  }), e.ac = null);
1470
1472
  try {
1471
- e.f |= Mt;
1472
- var p = e.fn, c = p();
1473
- e.f |= vt;
1474
- var o = e.deps, u = y?.is_fork;
1475
- if (R !== null) {
1473
+ e.f |= zt;
1474
+ var _ = e.fn, f = _();
1475
+ e.f |= At;
1476
+ var u = e.deps, c = m?.is_fork;
1477
+ if (L !== null) {
1476
1478
  var d;
1477
- if (u || Me(e, I), o !== null && I > 0)
1478
- for (o.length = I + R.length, d = 0; d < R.length; d++) o[I + d] = R[d];
1479
- else e.deps = o = R;
1480
- if ($t() && (e.f & 512) !== 0) for (d = I; d < o.length; d++) (o[d].reactions ??= []).push(e);
1481
- } else !u && o !== null && I < o.length && (Me(e, I), o.length = I);
1482
- if (Ce() && j !== null && !V && o !== null && (e.f & 6146) === 0) for (d = 0; d < j.length; d++) Sr(j[d], e);
1479
+ if (c || Me(e, I), u !== null && I > 0)
1480
+ for (u.length = I + L.length, d = 0; d < L.length; d++) u[I + d] = L[d];
1481
+ else e.deps = u = L;
1482
+ if (It() && (e.f & 512) !== 0) for (d = I; d < u.length; d++) (u[d].reactions ??= []).push(e);
1483
+ } else !c && u !== null && I < u.length && (Me(e, I), u.length = I);
1484
+ if (Ne() && H !== null && !q && u !== null && (e.f & 6146) === 0) for (d = 0; d < H.length; d++) Hr(H[d], e);
1483
1485
  if (i !== null && i !== e) {
1484
- if (ie++, i.deps !== null) for (let h = 0; h < r; h += 1) i.deps[h].rv = ie;
1485
- if (t !== null) for (const h of t) h.rv = ie;
1486
- j !== null && (n === null ? n = j : n.push(...j));
1486
+ if (ce++, i.deps !== null) for (let h = 0; h < r; h += 1) i.deps[h].rv = ce;
1487
+ if (t !== null) for (const h of t) h.rv = ce;
1488
+ H !== null && (n === null ? n = H : n.push(...H));
1487
1489
  }
1488
- return (e.f & 8388608) !== 0 && (e.f ^= We), c;
1490
+ return (e.f & 8388608) !== 0 && (e.f ^= Ze), f;
1489
1491
  } catch (h) {
1490
- return tr(h);
1492
+ return dr(h);
1491
1493
  } finally {
1492
- e.f ^= Mt, R = t, I = r, j = n, m = i, F = s, pe(l), V = a, le = f;
1494
+ e.f ^= zt, L = t, I = r, H = n, y = i, J = a, ye(o), q = s, fe = l;
1493
1495
  }
1494
1496
  }
1495
- function ti(e, t) {
1497
+ function wi(e, t) {
1496
1498
  let r = t.reactions;
1497
1499
  if (r !== null) {
1498
- var n = Br.call(r, e);
1500
+ var n = ln.call(r, e);
1499
1501
  if (n !== -1) {
1500
1502
  var i = r.length - 1;
1501
1503
  i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
1502
1504
  }
1503
1505
  }
1504
- if (r === null && (t.f & 2) !== 0 && (R === null || !ze.call(R, t))) {
1505
- var s = t;
1506
- (s.f & 512) !== 0 && (s.f ^= 512, s.f &= ~Oe), s.v !== A && pt(s), s.ac !== null && et(() => {
1507
- s.ac.abort(Re), s.ac = null, k(s, H);
1508
- }), Rn(s), Me(s, 0);
1506
+ if (r === null && (t.f & 2) !== 0 && (L === null || !Ke.call(L, t))) {
1507
+ var a = t;
1508
+ (a.f & 512) !== 0 && (a.f ^= 512, a.f &= ~Ie), a.v !== E && Et(a), a.ac !== null && it(() => {
1509
+ a.ac.abort(De), a.ac = null, $(a, N);
1510
+ }), Qn(a), Me(a, 0);
1509
1511
  }
1510
1512
  }
1511
1513
  function Me(e, t) {
1512
1514
  var r = e.deps;
1513
1515
  if (r !== null)
1514
- for (var n = t; n < r.length; n++) ti(e, r[n]);
1516
+ for (var n = t; n < r.length; n++) wi(e, r[n]);
1515
1517
  }
1516
- function ye(e) {
1518
+ function be(e) {
1517
1519
  var t = e.f;
1518
1520
  if ((t & 16384) === 0) {
1519
- k(e, L);
1520
- var r = g, n = Fe;
1521
- if (g = e, Fe = (t & 96) === 0, 0)
1522
- var i, s;
1521
+ $(e, U);
1522
+ var r = g, n = Ge;
1523
+ if (g = e, Ge = (t & 96) === 0, 0)
1524
+ var i, a;
1523
1525
  try {
1524
- (t & 16777232) !== 0 ? Xn(e) : Et(e), mr(e);
1525
- var l = Ar(e);
1526
- if (e.teardown = typeof l == "function" ? l : null, e.wv = xr, 0)
1527
- for (var a of e.deps) ;
1526
+ (t & 16777232) !== 0 ? _i(e) : Nt(e), Rr(e);
1527
+ var o = Fr(e);
1528
+ if (e.teardown = typeof o == "function" ? o : null, e.wv = Nr, 0)
1529
+ for (var s of e.deps) ;
1528
1530
  } finally {
1529
- Fe = n, g = r;
1531
+ Ge = n, g = r;
1530
1532
  }
1531
1533
  }
1532
1534
  }
1533
- function _(e) {
1535
+ function p(e) {
1534
1536
  var t = (e.f & 2) !== 0;
1535
- if (Qn?.add(e), m !== null && !V && !(g !== null && (g.f & 16384) !== 0) && (F === null || !F.has(e))) {
1536
- var r = m.deps;
1537
- if ((m.f & 2097152) !== 0)
1538
- e.rv < ie && (e.rv = ie, R === null && r !== null && r[I] === e ? I++ : R === null ? R = [e] : R.push(e));
1537
+ if (mi?.add(e), y !== null && !q && !(g !== null && (g.f & 16384) !== 0) && (J === null || !J.has(e))) {
1538
+ var r = y.deps;
1539
+ if ((y.f & 2097152) !== 0)
1540
+ e.rv < ce && (e.rv = ce, L === null && r !== null && r[I] === e ? I++ : L === null ? L = [e] : L.push(e));
1539
1541
  else {
1540
- m.deps ??= [], ze.call(m.deps, e) || m.deps.push(e);
1542
+ y.deps ??= [], Ke.call(y.deps, e) || y.deps.push(e);
1541
1543
  var n = e.reactions;
1542
- n === null ? e.reactions = [m] : ze.call(n, m) || n.push(m);
1544
+ n === null ? e.reactions = [y] : Ke.call(n, y) || n.push(y);
1543
1545
  }
1544
1546
  }
1545
1547
  if (0) {
1546
- if (!V && reactivity_loss_tracker && y === null && st === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1548
+ if (!q && reactivity_loss_tracker && m === null && pt === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1547
1549
  var i;
1548
- if (tracing_mode_flag && !V && tracing_expressions !== null && m !== null && tracing_expressions.reaction === m && !e.trace) {
1550
+ if (tracing_mode_flag && !q && tracing_expressions !== null && y !== null && tracing_expressions.reaction === y && !e.trace) {
1549
1551
  if (i)
1550
- var s, l;
1552
+ var a, o;
1551
1553
  }
1552
1554
  }
1553
- if (X && ae.has(e)) return ae.get(e);
1555
+ if (ie && K.has(e)) return K.get(e);
1554
1556
  if (t) {
1555
- var a = e;
1556
- if (X) {
1557
- var f = a.v;
1558
- return ((a.f & 1024) === 0 && a.reactions !== null || Mr(a)) && (f = gt(a)), ae.set(a, f), f;
1557
+ var s = e;
1558
+ if (ie) {
1559
+ var l = s.v;
1560
+ return ((s.f & 1024) === 0 && s.reactions !== null || zr(s)) && (l = Pt(s)), K.set(s, l), l;
1559
1561
  }
1560
- var v = (a.f & 512) === 0 && !V && m !== null && (Fe || (m.f & 512) !== 0), p = (a.f & vt) === 0;
1561
- Ne(a) && (v && (a.f |= 512), ar(a)), v && !p && (lr(a), qr(a));
1562
+ var v = (s.f & 512) === 0 && !q && y !== null && (Ge || (y.f & 512) !== 0), _ = (s.f & At) === 0;
1563
+ He(s) && (v && (s.f |= 512), gr(s)), v && !_ && (mr(s), Ur(s));
1562
1564
  }
1563
- if (M?.has(e)) return M.get(e);
1565
+ if (R?.has(e)) return R.get(e);
1564
1566
  if ((e.f & 8388608) !== 0) throw e.v;
1565
1567
  return e.v;
1566
1568
  }
1567
- function qr(e) {
1569
+ function Ur(e) {
1568
1570
  if (e.f |= 512, e.deps !== null)
1569
1571
  for (const t of e.deps)
1570
- (t.reactions ??= []).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (lr(t), qr(t));
1572
+ (t.reactions ??= []).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (mr(t), Ur(t));
1571
1573
  }
1572
- function Mr(e) {
1573
- if (e.v === A) return !0;
1574
+ function zr(e) {
1575
+ if (e.v === E) return !0;
1574
1576
  if (e.deps === null) return !1;
1575
1577
  for (const t of e.deps)
1576
- if (ae.has(t) || (t.f & 2) !== 0 && Mr(t)) return !0;
1578
+ if (K.has(t) || (t.f & 2) !== 0 && zr(t)) return !0;
1577
1579
  return !1;
1578
1580
  }
1579
- function xt(e) {
1580
- var t = V;
1581
+ function Le(e) {
1582
+ var t = q;
1581
1583
  try {
1582
- return V = !0, e();
1584
+ return q = !0, e();
1583
1585
  } finally {
1584
- V = t;
1586
+ q = t;
1585
1587
  }
1586
1588
  }
1587
- var Ee = /* @__PURE__ */ Symbol("events"), Or = /* @__PURE__ */ new Set(), ft = /* @__PURE__ */ new Set();
1588
- function ri(e, t, r) {
1589
- (t[Ee] ??= {})[e] = r;
1589
+ var $e = /* @__PURE__ */ Symbol("events"), jr = /* @__PURE__ */ new Set(), yt = /* @__PURE__ */ new Set();
1590
+ function bi(e, t, r) {
1591
+ (t[$e] ??= {})[e] = r;
1590
1592
  }
1591
- function ni(e) {
1592
- for (var t = 0; t < e.length; t++) Or.add(e[t]);
1593
- for (var r of ft) r(e);
1593
+ function Si(e) {
1594
+ for (var t = 0; t < e.length; t++) jr.add(e[t]);
1595
+ for (var r of yt) r(e);
1594
1596
  }
1595
- var Vt = null;
1596
- function Dt(e) {
1597
- var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], s = i[0] || e.target;
1598
- Vt = e;
1599
- var l = 0, a = Vt === e && e[Ee];
1600
- if (a) {
1601
- var f = i.indexOf(a);
1602
- if (f !== -1 && (t === document || t === window)) {
1603
- e[Ee] = t;
1597
+ var lt = null, ct = !1;
1598
+ function Qt(e) {
1599
+ var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
1600
+ lt = e, ct || (ct = !0, setTimeout(() => {
1601
+ ct = !1, lt = null;
1602
+ }));
1603
+ var o = 0, s = lt === e && e[$e];
1604
+ if (s) {
1605
+ var l = i.indexOf(s);
1606
+ if (l !== -1 && (t === document || t === window)) {
1607
+ e[$e] = t;
1604
1608
  return;
1605
1609
  }
1606
1610
  var v = i.indexOf(t);
1607
1611
  if (v === -1) return;
1608
- f <= v && (l = f);
1612
+ l <= v && (o = l);
1609
1613
  }
1610
- if (s = i[l] || e.target, s !== t) {
1611
- Ge(e, "currentTarget", {
1614
+ if (a = i[o] || e.target, a !== t) {
1615
+ Qe(e, "currentTarget", {
1612
1616
  configurable: !0,
1613
1617
  get() {
1614
- return s || r;
1618
+ return a || r;
1615
1619
  }
1616
1620
  });
1617
- var p = m, c = g;
1618
- P(null), Y(null);
1621
+ var _ = y, f = g;
1622
+ z(null), Q(null);
1619
1623
  try {
1620
- for (var o, u = []; s !== null && s !== t; ) {
1624
+ for (var u, c = []; a !== null && a !== t; ) {
1621
1625
  try {
1622
- var d = s[Ee]?.[n];
1623
- d != null && (!s.disabled || e.target === s) && d.call(s, e);
1626
+ var d = a[$e]?.[n];
1627
+ d != null && (!a.disabled || e.target === a) && d.call(a, e);
1624
1628
  } catch (h) {
1625
- o ? u.push(h) : o = h;
1629
+ u ? c.push(h) : u = h;
1626
1630
  }
1627
1631
  if (e.cancelBubble) break;
1628
- l++, s = l < i.length ? i[l] : null;
1632
+ o++, a = o < i.length ? i[o] : null;
1629
1633
  }
1630
- if (o) {
1631
- for (let h of u) queueMicrotask(() => {
1634
+ if (u) {
1635
+ for (let h of c) queueMicrotask(() => {
1632
1636
  throw h;
1633
1637
  });
1634
- throw o;
1638
+ throw u;
1635
1639
  }
1636
1640
  } finally {
1637
- e[Ee] = t, delete e.currentTarget, P(p), Y(c);
1641
+ e[$e] = t, delete e.currentTarget, z(_), Q(f);
1638
1642
  }
1639
1643
  }
1640
1644
  }
1641
- var ii = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1642
- function si(e) {
1643
- return ii?.createHTML(e) ?? e;
1645
+ var Ai = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1646
+ function ki(e) {
1647
+ return Ai?.createHTML(e) ?? e;
1644
1648
  }
1645
- function ai(e) {
1646
- var t = wt("template");
1647
- return t.innerHTML = si(e.replaceAll("<!>", "<!---->")), t.content;
1649
+ function $i(e) {
1650
+ var t = Lt("template");
1651
+ return t.innerHTML = ki(e.replaceAll("<!>", "<!---->")), t.content;
1648
1652
  }
1649
- function he(e, t) {
1653
+ function ge(e, t) {
1650
1654
  var r = g;
1651
1655
  r.nodes === null && (r.nodes = {
1652
1656
  start: e,
@@ -1656,35 +1660,35 @@ function he(e, t) {
1656
1660
  });
1657
1661
  }
1658
1662
  // @__NO_SIDE_EFFECTS__
1659
- function li(e, t) {
1660
- var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
1663
+ function Ti(e, t) {
1664
+ var r = (t & 1) !== 0, n = (t & 2) !== 0, i, a = !e.startsWith("<!>");
1661
1665
  return () => {
1662
- if ($)
1663
- return he(w, null), w;
1664
- i === void 0 && (i = ai(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ ge(i)));
1665
- var l = n || vr ? document.importNode(i, !0) : i.cloneNode(!0);
1666
+ if (k)
1667
+ return ge(b, null), b;
1668
+ i === void 0 && (i = $i(a ? e : "<!>" + e), r || (i = /* @__PURE__ */ we(i)));
1669
+ var o = n || kr ? document.importNode(i, !0) : i.cloneNode(!0);
1666
1670
  if (r) {
1667
- var a = /* @__PURE__ */ ge(l), f = l.lastChild;
1668
- he(a, f);
1669
- } else he(l, l);
1670
- return l;
1671
+ var s = /* @__PURE__ */ we(o), l = o.lastChild;
1672
+ ge(s, l);
1673
+ } else ge(o, o);
1674
+ return o;
1671
1675
  };
1672
1676
  }
1673
- function oi() {
1674
- if ($)
1675
- return he(w, null), w;
1676
- var e = document.createDocumentFragment(), t = document.createComment(""), r = Z();
1677
- return e.append(t, r), he(t, r), e;
1677
+ function xi() {
1678
+ if (k)
1679
+ return ge(b, null), b;
1680
+ var e = document.createDocumentFragment(), t = document.createComment(""), r = ne();
1681
+ return e.append(t, r), ge(t, r), e;
1678
1682
  }
1679
- function ut(e, t) {
1680
- if ($) {
1683
+ function wt(e, t) {
1684
+ if (k) {
1681
1685
  var r = g;
1682
- ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = w), _t();
1686
+ ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = b), $t();
1683
1687
  return;
1684
1688
  }
1685
1689
  e !== null && e.before(t);
1686
1690
  }
1687
- var fi = [
1691
+ var Ei = [
1688
1692
  "allowfullscreen",
1689
1693
  "async",
1690
1694
  "autofocus",
@@ -1713,8 +1717,8 @@ var fi = [
1713
1717
  "defer",
1714
1718
  "disablepictureinpicture",
1715
1719
  "disableremoteplayback"
1716
- ], Pi = [
1717
- ...fi,
1720
+ ], da = [
1721
+ ...Ei,
1718
1722
  "formNoValidate",
1719
1723
  "isMap",
1720
1724
  "noModule",
@@ -1729,17 +1733,17 @@ var fi = [
1729
1733
  "allowFullscreen",
1730
1734
  "disablePictureInPicture",
1731
1735
  "disableRemotePlayback"
1732
- ], ui = ["touchstart", "touchmove"];
1733
- function ci(e) {
1734
- return ui.includes(e);
1736
+ ], Pi = ["touchstart", "touchmove"];
1737
+ function Ri(e) {
1738
+ return Pi.includes(e);
1735
1739
  }
1736
- var di = [
1740
+ var Mi = [
1737
1741
  "$state",
1738
1742
  "$state.raw",
1739
1743
  "$derived",
1740
1744
  "$derived.by"
1741
- ], Vi = [
1742
- ...di,
1745
+ ], ha = [
1746
+ ...Mi,
1743
1747
  "$state.eager",
1744
1748
  "$state.snapshot",
1745
1749
  "$props",
@@ -1754,114 +1758,114 @@ var di = [
1754
1758
  "$inspect().with",
1755
1759
  "$inspect.trace",
1756
1760
  "$host"
1757
- ], Bt = !0;
1758
- function vi(e, t) {
1761
+ ], Zt = !0;
1762
+ function Li(e, t) {
1759
1763
  var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1760
- r !== (e[it] ??= e.nodeValue) && (e[it] = r, e.nodeValue = `${r}`);
1764
+ r !== (e[vt] ??= e.nodeValue) && (e[vt] = r, e.nodeValue = `${r}`);
1761
1765
  }
1762
- function Rr(e, t) {
1763
- return Cr(e, t);
1766
+ function Br(e, t) {
1767
+ return Vr(e, t);
1764
1768
  }
1765
- function hi(e, t) {
1766
- ot(), t.intro = t.intro ?? !1;
1767
- const r = t.target, n = $, i = w;
1769
+ function Ci(e, t) {
1770
+ mt(), t.intro = t.intro ?? !1;
1771
+ const r = t.target, n = k, i = b;
1768
1772
  try {
1769
- for (var s = /* @__PURE__ */ ge(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ J(s);
1770
- if (!s) throw _e;
1771
- ce(!0), D(s);
1772
- const l = Cr(e, {
1773
+ for (var a = /* @__PURE__ */ we(r); a && (a.nodeType !== 8 || a.data !== "["); ) a = /* @__PURE__ */ ae(a);
1774
+ if (!a) throw me;
1775
+ ve(!0), G(a);
1776
+ const o = Vr(e, {
1773
1777
  ...t,
1774
- anchor: s
1778
+ anchor: a
1775
1779
  });
1776
- return ce(!1), l;
1777
- } catch (l) {
1778
- if (l instanceof Error && l.message.split(`
1779
- `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw l;
1780
- return l !== _e && console.warn("Failed to hydrate: ", l), t.recover === !1 && on(), ot(), Bn(r), ce(!1), Rr(e, t);
1780
+ return ve(!1), o;
1781
+ } catch (o) {
1782
+ if (o instanceof Error && o.message.split(`
1783
+ `).some((s) => s.startsWith("https://svelte.dev/e/"))) throw o;
1784
+ return o !== me && console.warn("Failed to hydrate: ", o), t.recover === !1 && xn(), mt(), oi(r), ve(!1), Br(e, t);
1781
1785
  } finally {
1782
- ce(n), D(i);
1783
- }
1784
- }
1785
- var Ve = /* @__PURE__ */ new Map();
1786
- function Cr(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: a }) {
1787
- ot();
1788
- var f = void 0, v = Wn(() => {
1789
- var p = r ?? t.appendChild(Z());
1790
- Tn(p, { pending: () => {
1791
- } }, (u) => {
1792
- Jt({});
1793
- var d = T;
1794
- if (s && (d.c = s), i && (n.$$events = i), $ && he(u, null), Bt = l, f = e(u, n) || {}, Bt = !0, $ && (g.nodes.end = w, w === null || w.nodeType !== 8 || w.data !== "]"))
1795
- throw Je(), _e;
1796
- Qt();
1797
- }, a);
1798
- var c = /* @__PURE__ */ new Set(), o = (u) => {
1799
- for (var d = 0; d < u.length; d++) {
1800
- var h = u[d];
1801
- if (!c.has(h)) {
1802
- c.add(h);
1803
- var b = ci(h);
1804
- for (const U of [t, document]) {
1805
- var x = Ve.get(U);
1806
- x === void 0 && (x = /* @__PURE__ */ new Map(), Ve.set(U, x));
1807
- var q = x.get(h);
1808
- q === void 0 ? (U.addEventListener(h, Dt, { passive: b }), x.set(h, 1)) : x.set(h, q + 1);
1786
+ ve(n), G(i);
1787
+ }
1788
+ }
1789
+ var je = /* @__PURE__ */ new Map();
1790
+ function Vr(e, { target: t, anchor: r, props: n = {}, events: i, context: a, intro: o = !0, transformError: s }) {
1791
+ mt();
1792
+ var l = void 0, v = hi(() => {
1793
+ var _ = r ?? t.appendChild(ne());
1794
+ qn(_, { pending: () => {
1795
+ } }, (c) => {
1796
+ Tt({});
1797
+ var d = x;
1798
+ if (a && (d.c = a), i && (n.$$events = i), k && ge(c, null), Zt = o, l = e(c, n) || {}, Zt = !0, k && (g.nodes.end = b, b === null || b.nodeType !== 8 || b.data !== "]"))
1799
+ throw rt(), me;
1800
+ xt();
1801
+ }, s);
1802
+ var f = /* @__PURE__ */ new Set(), u = (c) => {
1803
+ for (var d = 0; d < c.length; d++) {
1804
+ var h = c[d];
1805
+ if (!f.has(h)) {
1806
+ f.add(h);
1807
+ var S = Ri(h);
1808
+ for (const j of [t, document]) {
1809
+ var A = je.get(j);
1810
+ A === void 0 && (A = /* @__PURE__ */ new Map(), je.set(j, A));
1811
+ var P = A.get(h);
1812
+ P === void 0 ? (j.addEventListener(h, Qt, { passive: S }), A.set(h, 1)) : A.set(h, P + 1);
1809
1813
  }
1810
1814
  }
1811
1815
  }
1812
1816
  };
1813
- return o(Fr(Or)), ft.add(o), () => {
1814
- for (var u of c) for (const b of [t, document]) {
1815
- var d = Ve.get(b), h = d.get(u);
1816
- --h == 0 ? (b.removeEventListener(u, Dt), d.delete(u), d.size === 0 && Ve.delete(b)) : d.set(u, h);
1817
+ return u(cn(jr)), yt.add(u), () => {
1818
+ for (var c of f) for (const S of [t, document]) {
1819
+ var d = je.get(S), h = d.get(c);
1820
+ --h == 0 ? (S.removeEventListener(c, Qt), d.delete(c), d.size === 0 && je.delete(S)) : d.set(c, h);
1817
1821
  }
1818
- ft.delete(o), p !== r && p.parentNode?.removeChild(p);
1822
+ yt.delete(u), _ !== r && _.parentNode?.removeChild(_);
1819
1823
  };
1820
1824
  });
1821
- return ct.set(f, v), f;
1825
+ return bt.set(l, v), l;
1822
1826
  }
1823
- var ct = /* @__PURE__ */ new WeakMap();
1824
- function _i(e, t) {
1825
- const r = ct.get(e);
1826
- return r ? (ct.delete(e), r(t)) : Promise.resolve();
1827
+ var bt = /* @__PURE__ */ new WeakMap();
1828
+ function Ii(e, t) {
1829
+ const r = bt.get(e);
1830
+ return r ? (bt.delete(e), r(t)) : Promise.resolve();
1827
1831
  }
1828
- var pi = class {
1832
+ var Di = class {
1829
1833
  anchor;
1830
1834
  #e = /* @__PURE__ */ new Map();
1831
1835
  #t = /* @__PURE__ */ new Map();
1832
1836
  #r = /* @__PURE__ */ new Map();
1833
- #o = /* @__PURE__ */ new Set();
1837
+ #l = /* @__PURE__ */ new Set();
1834
1838
  #i = !0;
1835
1839
  constructor(e, t = !0) {
1836
1840
  this.anchor = e, this.#i = t;
1837
1841
  }
1838
- #a = (e) => {
1842
+ #s = (e) => {
1839
1843
  if (this.#e.has(e)) {
1840
1844
  var t = this.#e.get(e), r = this.#t.get(t);
1841
1845
  if (r)
1842
- jt(r), this.#o.delete(t);
1846
+ Wt(r), this.#l.delete(t);
1843
1847
  else {
1844
1848
  var n = this.#r.get(t);
1845
- n && (jt(n.effect), this.#t.set(t, n.effect), this.#r.delete(t), n.fragment.lastChild.remove(), this.anchor.before(n.fragment), r = n.effect);
1849
+ n && (Wt(n.effect), this.#t.set(t, n.effect), this.#r.delete(t), n.fragment.lastChild.remove(), this.anchor.before(n.fragment), r = n.effect);
1846
1850
  }
1847
- for (const [i, s] of this.#e) {
1851
+ for (const [i, a] of this.#e) {
1848
1852
  if (this.#e.delete(i), i === e) break;
1849
- const l = this.#r.get(s);
1850
- l && (C(l.effect), this.#r.delete(s));
1853
+ const o = this.#r.get(a);
1854
+ o && (C(o.effect), this.#r.delete(a));
1851
1855
  }
1852
- for (const [i, s] of this.#t) {
1853
- if (i === t || this.#o.has(i)) continue;
1854
- const l = () => {
1856
+ for (const [i, a] of this.#t) {
1857
+ if (i === t || this.#l.has(i)) continue;
1858
+ const o = () => {
1855
1859
  if (Array.from(this.#e.values()).includes(i)) {
1856
- var a = document.createDocumentFragment();
1857
- kr(s, a), a.append(Z()), this.#r.set(i, {
1858
- effect: s,
1859
- fragment: a
1860
+ var s = document.createDocumentFragment();
1861
+ Ir(a, s), s.append(ne()), this.#r.set(i, {
1862
+ effect: a,
1863
+ fragment: s
1860
1864
  });
1861
- } else C(s);
1862
- this.#o.delete(i), this.#t.delete(i);
1865
+ } else C(a);
1866
+ this.#l.delete(i), this.#t.delete(i);
1863
1867
  };
1864
- this.#i || !r ? (this.#o.add(i), Ae(s, l, !1)) : l();
1868
+ this.#i || !r ? (this.#l.add(i), Pe(a, o, !1)) : o();
1865
1869
  }
1866
1870
  }
1867
1871
  };
@@ -1871,188 +1875,190 @@ var pi = class {
1871
1875
  for (const [r, n] of this.#r) t.includes(r) || (C(n.effect), this.#r.delete(r));
1872
1876
  };
1873
1877
  ensure(e, t) {
1874
- var r = y, n = Fn();
1875
- if (t && !this.#t.has(e) && !this.#r.has(e)) if (n) {
1876
- var i = document.createDocumentFragment(), s = Z();
1877
- i.append(s), this.#r.set(e, {
1878
- effect: W(() => t(s)),
1879
- fragment: i
1880
- });
1881
- } else this.#t.set(e, W(() => t(this.anchor)));
1878
+ var r = m, n = li();
1879
+ if (t && !this.#t.has(e) && !this.#r.has(e))
1880
+ if (n) {
1881
+ var i = document.createDocumentFragment(), a = ne();
1882
+ i.append(a), this.#r.set(e, {
1883
+ effect: te(() => t(a)),
1884
+ fragment: i
1885
+ });
1886
+ } else this.#t.set(e, te(() => t(this.anchor)));
1882
1887
  if (this.#e.set(r, e), n) {
1883
- for (const [l, a] of this.#t) l === e ? r.unskip_effect(a) : r.skip_effect(a);
1884
- for (const [l, a] of this.#r) l === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1885
- r.oncommit(this.#a), r.ondiscard(this.#n);
1888
+ for (const [o, s] of this.#t) o === e ? r.unskip_effect(s) : r.skip_effect(s);
1889
+ for (const [o, s] of this.#r) o === e ? r.unskip_effect(s.effect) : r.skip_effect(s.effect);
1890
+ r.oncommit(this.#s), r.ondiscard(this.#n);
1886
1891
  } else
1887
- $ && (this.anchor = w), this.#a(r);
1892
+ k && (this.anchor = b), this.#s(r);
1888
1893
  }
1889
1894
  };
1890
- function gi(e, t, r = !1) {
1895
+ function Ni(e, t, r = !1) {
1891
1896
  var n;
1892
- $ && (n = w, _t());
1893
- var i = new pi(e), s = r ? ht : 0;
1894
- function l(a, f) {
1895
- if ($) {
1896
- var v = gn(n);
1897
- if (a !== parseInt(v.substring(1))) {
1898
- var p = Kt();
1899
- D(p), i.anchor = p, ce(!1), i.ensure(a, f), ce(!0);
1897
+ k && (n = b, $t());
1898
+ var i = new Di(e), a = r ? kt : 0;
1899
+ function o(s, l) {
1900
+ if (k) {
1901
+ var v = Nn(n);
1902
+ if (s !== parseInt(v.substring(1))) {
1903
+ var _ = lr();
1904
+ G(_), i.anchor = _, ve(!1), i.ensure(s, l), ve(!0);
1900
1905
  return;
1901
1906
  }
1902
1907
  }
1903
- i.ensure(a, f);
1904
- }
1905
- yr(() => {
1906
- var a = !1;
1907
- t((f, v = 0) => {
1908
- a = !0, l(v, f);
1909
- }), a || l(-1, null);
1910
- }, s);
1911
- }
1912
- function yi(e, t) {
1913
- gr(() => {
1908
+ i.ensure(s, l);
1909
+ }
1910
+ Pr(() => {
1911
+ var s = !1;
1912
+ t((l, v = 0) => {
1913
+ s = !0, o(v, l);
1914
+ }), s || o(-1, null);
1915
+ }, a);
1916
+ }
1917
+ function Oi(e, t) {
1918
+ Er(() => {
1919
+ e = g?.parent?.nodes?.start ?? e;
1914
1920
  var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
1915
1921
  if (!n.querySelector("#" + t.hash)) {
1916
- const i = wt("style");
1922
+ const i = Lt("style");
1917
1923
  i.id = t.hash, i.textContent = t.code, n.appendChild(i);
1918
1924
  }
1919
1925
  });
1920
1926
  }
1921
- var Ft = [...`
1927
+ var Xt = [...`
1922
1928
  \r\f \v\uFEFF`];
1923
- function mi(e, t, r) {
1929
+ function Hi(e, t, r) {
1924
1930
  var n = e == null ? "" : "" + e;
1925
1931
  if (t && (n = n ? n + " " + t : t), r) {
1926
1932
  for (var i of Object.keys(r)) if (r[i]) n = n ? n + " " + i : i;
1927
1933
  else if (n.length)
1928
- for (var s = i.length, l = 0; (l = n.indexOf(i, l)) >= 0; ) {
1929
- var a = l + s;
1930
- (l === 0 || Ft.includes(n[l - 1])) && (a === n.length || Ft.includes(n[a])) ? n = (l === 0 ? "" : n.substring(0, l)) + n.substring(a + 1) : l = a;
1934
+ for (var a = i.length, o = 0; (o = n.indexOf(i, o)) >= 0; ) {
1935
+ var s = o + a;
1936
+ (o === 0 || Xt.includes(n[o - 1])) && (s === n.length || Xt.includes(n[s])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(s + 1) : o = s;
1931
1937
  }
1932
1938
  }
1933
1939
  return n === "" ? null : n;
1934
1940
  }
1935
- function wi(e, t, r, n, i, s) {
1936
- var l = e[nt];
1937
- if ($ || l !== r || l === void 0) {
1938
- var a = mi(r, n, s);
1939
- (!$ || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[nt] = r;
1940
- } else if (s && i !== s) for (var f in s) {
1941
- var v = !!s[f];
1942
- (i == null || v !== !!i[f]) && e.classList.toggle(f, v);
1943
- }
1944
- return s;
1945
- }
1946
- var bi = /* @__PURE__ */ Symbol("is custom element"), $i = /* @__PURE__ */ Symbol("is html"), ki = tn ? "link" : "LINK";
1947
- function De(e, t, r, n) {
1948
- var i = Ei(e);
1949
- if ($ && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === ki)) {
1941
+ function Fi(e, t, r, n, i, a) {
1942
+ var o = e[ht];
1943
+ if (k || o !== r || o === void 0) {
1944
+ var s = Hi(r, n, a);
1945
+ (!k || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e[ht] = r;
1946
+ } else if (a && i !== a) for (var l in a) {
1947
+ var v = !!a[l];
1948
+ (i == null || v !== !!i[l]) && e.classList.toggle(l, v);
1949
+ }
1950
+ return a;
1951
+ }
1952
+ var Ui = /* @__PURE__ */ Symbol("is custom element"), zi = /* @__PURE__ */ Symbol("is html"), ji = bn ? "link" : "LINK";
1953
+ function Be(e, t, r, n) {
1954
+ var i = Bi(e);
1955
+ if (k && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === ji)) {
1950
1956
  n || void 0;
1951
1957
  return;
1952
1958
  }
1953
- i[t] !== (i[t] = r) && (t === "loading" && (e[Jr] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && xi(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1959
+ i[t] !== (i[t] = r) && (t === "loading" && (e[mn] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Vi(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1954
1960
  }
1955
- function Ei(e) {
1956
- return e[Wt] ??= {
1957
- [bi]: e.nodeName.includes("-"),
1958
- [$i]: e.namespaceURI === Vr
1961
+ function Bi(e) {
1962
+ return e[or] ??= {
1963
+ [Ui]: e.nodeName.includes("-"),
1964
+ [zi]: e.namespaceURI === sn
1959
1965
  };
1960
1966
  }
1961
- var Yt = /* @__PURE__ */ new Map();
1962
- function xi(e) {
1963
- var t = e.getAttribute("is") || e.nodeName, r = Yt.get(t);
1967
+ var er = /* @__PURE__ */ new Map();
1968
+ function Vi(e) {
1969
+ var t = e.getAttribute("is") || e.nodeName, r = er.get(t);
1964
1970
  if (r) return r;
1965
- Yt.set(t, r = []);
1966
- for (var n, i = e, s = Element.prototype; s !== i; ) {
1967
- n = Yr(i);
1968
- for (var l in n) n[l].set && l !== "innerHTML" && l !== "textContent" && l !== "innerText" && r.push(l);
1969
- i = zt(i);
1971
+ er.set(t, r = []);
1972
+ for (var n, i = e, a = Element.prototype; a !== i; ) {
1973
+ n = un(i);
1974
+ for (var o in n) n[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && r.push(o);
1975
+ i = ir(i);
1970
1976
  }
1971
1977
  return r;
1972
1978
  }
1973
- function rt(e, t) {
1974
- return e === t || e?.[xe] === t;
1975
- }
1976
- function Ti(e = {}, t, r, n) {
1977
- var i = T.r, s = g;
1978
- return gr(() => {
1979
- var l, a;
1980
- return kt(() => {
1981
- l = a, a = n?.() || [], xt(() => {
1982
- rt(r(...a), e) || (t(e, ...a), l && rt(r(...l), e) && t(null, ...l));
1979
+ function ut(e, t) {
1980
+ return e === t || e?.[Te] === t;
1981
+ }
1982
+ function qi(e = {}, t, r, n) {
1983
+ var i = x.r, a = g;
1984
+ return Er(() => {
1985
+ var o, s;
1986
+ return Dt(() => {
1987
+ o = s, s = n?.() || [], Le(() => {
1988
+ ut(r(...s), e) || (t(e, ...s), o && ut(r(...o), e) && t(null, ...o));
1983
1989
  });
1984
1990
  }), () => {
1985
- let f = s;
1986
- for (; f !== i && f.parent !== null && f.parent.f & 33554432; ) f = f.parent;
1991
+ let l = a;
1992
+ for (; l !== i && l.parent !== null && l.parent.f & 33554432; ) l = l.parent;
1987
1993
  const v = () => {
1988
- a && rt(r(...a), e) && t(null, ...a);
1989
- }, p = f.teardown;
1990
- f.teardown = () => {
1991
- v(), p?.();
1994
+ s && ut(r(...s), e) && t(null, ...s);
1995
+ }, _ = l.teardown;
1996
+ l.teardown = () => {
1997
+ v(), _?.();
1992
1998
  };
1993
1999
  };
1994
2000
  }), e;
1995
2001
  }
1996
- function $e(e, t, r, n) {
1997
- var i = !Qe || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, a = n, f = !0, v = void 0, p = () => l && i ? (v ??= /* @__PURE__ */ qe(n), _(v)) : (f && (f = !1, a = l ? xt(n) : n), a);
1998
- let c;
1999
- if (s) {
2000
- var o = xe in e || Gt in e;
2001
- c = se(e, t)?.set ?? (o && t in e ? (E) => e[t] = E : void 0);
2002
+ function W(e, t, r, n) {
2003
+ var i = !nt || (r & 2) !== 0, a = (r & 8) !== 0, o = (r & 16) !== 0, s = n, l = !0, v = void 0, _ = () => o && i ? (v ??= /* @__PURE__ */ Re(n), p(v)) : (l && (l = !1, s = o ? Le(n) : n), s);
2004
+ let f;
2005
+ if (a) {
2006
+ var u = Te in e || sr in e;
2007
+ f = ue(e, t)?.set ?? (u && t in e ? (T) => e[t] = T : void 0);
2002
2008
  }
2003
- var u, d = !1;
2004
- s ? [u, d] = kn(() => e[t]) : u = e[t], u === void 0 && n !== void 0 && (u = p(), c && (i && fn(t), c(u)));
2009
+ var c, d = !1;
2010
+ a ? [c, d] = jn(() => e[t]) : c = e[t], c === void 0 && n !== void 0 && (c = _(), f && (i && En(t), f(c)));
2005
2011
  var h;
2006
2012
  if (i ? h = () => {
2007
- var E = e[t];
2008
- return E === void 0 ? p() : (f = !0, E);
2013
+ var T = e[t];
2014
+ return T === void 0 ? _() : (l = !0, T);
2009
2015
  } : h = () => {
2010
- var E = e[t];
2011
- return E !== void 0 && (a = void 0), E === void 0 ? a : E;
2016
+ var T = e[t];
2017
+ return T !== void 0 && (s = void 0), T === void 0 ? s : T;
2012
2018
  }, i && (r & 4) === 0) return h;
2013
- if (c) {
2014
- var b = e.$$legacy;
2015
- return (function(E, G) {
2016
- return arguments.length > 0 ? ((!i || !G || b || d) && c(G ? h() : E), E) : h();
2019
+ if (f) {
2020
+ var S = e.$$legacy;
2021
+ return (function(T, B) {
2022
+ return arguments.length > 0 ? ((!i || !B || S || d) && f(B ? h() : T), T) : h();
2017
2023
  });
2018
2024
  }
2019
- var x = !1, q = ((r & 1) !== 0 ? qe : sr)(() => (x = !1, h()));
2020
- s && _(q);
2021
- var U = g;
2022
- return (function(E, G) {
2025
+ var A = !1, P = ((r & 1) !== 0 ? Re : _r)(() => (A = !1, h()));
2026
+ a && p(P);
2027
+ var j = g;
2028
+ return (function(T, B) {
2023
2029
  if (arguments.length > 0) {
2024
- const Q = G ? _(q) : i && s ? ve(E) : E;
2025
- return O(q, Q), x = !0, a !== void 0 && (a = Q), E;
2030
+ const X = B ? p(P) : i && a ? _e(T) : T;
2031
+ return D(P, X), A = !0, s !== void 0 && (s = X), T;
2026
2032
  }
2027
- return X && x || (U.f & 16384) !== 0 ? q.v : _(q);
2033
+ return ie && A || (j.f & 16384) !== 0 ? P.v : p(P);
2028
2034
  });
2029
2035
  }
2030
- function Si(e) {
2031
- return new Ai(e);
2036
+ function Gi(e) {
2037
+ return new Yi(e);
2032
2038
  }
2033
- var Ai = class {
2039
+ var Yi = class {
2034
2040
  #e;
2035
2041
  #t;
2036
2042
  constructor(e) {
2037
- var t = /* @__PURE__ */ new Map(), r = (i, s) => {
2038
- var l = /* @__PURE__ */ Nn(s, !1, !1);
2039
- return t.set(i, l), l;
2043
+ var t = /* @__PURE__ */ new Map(), r = (i, a) => {
2044
+ var o = /* @__PURE__ */ ei(a, !1, !1);
2045
+ return t.set(i, o), o;
2040
2046
  };
2041
2047
  const n = new Proxy({
2042
2048
  ...e.props || {},
2043
2049
  $$events: {}
2044
2050
  }, {
2045
- get(i, s) {
2046
- return _(t.get(s) ?? r(s, Reflect.get(i, s)));
2051
+ get(i, a) {
2052
+ return p(t.get(a) ?? r(a, Reflect.get(i, a)));
2047
2053
  },
2048
- has(i, s) {
2049
- return s === Gt ? !0 : (_(t.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
2054
+ has(i, a) {
2055
+ return a === sr ? !0 : (p(t.get(a) ?? r(a, Reflect.get(i, a))), Reflect.has(i, a));
2050
2056
  },
2051
- set(i, s, l) {
2052
- return O(t.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
2057
+ set(i, a, o) {
2058
+ return D(t.get(a) ?? r(a, o), o), Reflect.set(i, a, o);
2053
2059
  }
2054
2060
  });
2055
- this.#t = (e.hydrate ? hi : Rr)(e.component, {
2061
+ this.#t = (e.hydrate ? Ci : Br)(e.component, {
2056
2062
  target: e.target,
2057
2063
  anchor: e.anchor,
2058
2064
  props: n,
@@ -2060,21 +2066,21 @@ var Ai = class {
2060
2066
  intro: e.intro ?? !1,
2061
2067
  recover: e.recover,
2062
2068
  transformError: e.transformError
2063
- }), !K && (!e?.props?.$$host || e.sync === !1) && ue(), this.#e = n.$$events;
2069
+ }), !re && (!e?.props?.$$host || e.sync === !1) && V(), this.#e = n.$$events;
2064
2070
  for (const i of Object.keys(this.#t))
2065
- i === "$set" || i === "$destroy" || i === "$on" || Ge(this, i, {
2071
+ i === "$set" || i === "$destroy" || i === "$on" || Qe(this, i, {
2066
2072
  get() {
2067
2073
  return this.#t[i];
2068
2074
  },
2069
- set(s) {
2070
- this.#t[i] = s;
2075
+ set(a) {
2076
+ this.#t[i] = a;
2071
2077
  },
2072
2078
  enumerable: !0
2073
2079
  });
2074
2080
  this.#t.$set = (i) => {
2075
2081
  Object.assign(n, i);
2076
2082
  }, this.#t.$destroy = () => {
2077
- _i(this.#t);
2083
+ Ii(this.#t);
2078
2084
  };
2079
2085
  }
2080
2086
  $set(e) {
@@ -2090,8 +2096,8 @@ var Ai = class {
2090
2096
  $destroy() {
2091
2097
  this.#t.$destroy();
2092
2098
  }
2093
- }, Ir;
2094
- typeof HTMLElement == "function" && (Ir = class extends HTMLElement {
2099
+ }, qr;
2100
+ typeof HTMLElement == "function" && (qr = class extends HTMLElement {
2095
2101
  $$ctor;
2096
2102
  $$s;
2097
2103
  $$c;
@@ -2123,19 +2129,19 @@ typeof HTMLElement == "function" && (Ir = class extends HTMLElement {
2123
2129
  if (this.$$cn = !0, !this.$$c) {
2124
2130
  let e = function(n) {
2125
2131
  return (i) => {
2126
- const s = wt("slot");
2127
- n !== "default" && (s.name = n), ut(i, s);
2132
+ const a = Lt("slot");
2133
+ n !== "default" && (a.name = n), wt(i, a);
2128
2134
  };
2129
2135
  };
2130
2136
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2131
- const t = {}, r = qi(this);
2137
+ const t = {}, r = Wi(this);
2132
2138
  for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2133
2139
  for (const n of this.attributes) {
2134
2140
  const i = this.$$g_p(n.name);
2135
2141
  i in this.$$d || (this.$$d[i] = Ye(i, n.value, this.$$p_d, "toProp"));
2136
2142
  }
2137
2143
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2138
- this.$$c = Si({
2144
+ this.$$c = Gi({
2139
2145
  component: this.$$ctor,
2140
2146
  target: this.$$shadowRoot || this,
2141
2147
  props: {
@@ -2143,10 +2149,10 @@ typeof HTMLElement == "function" && (Ir = class extends HTMLElement {
2143
2149
  $$slots: t,
2144
2150
  $$host: this
2145
2151
  }
2146
- }), this.$$me = Gn(() => {
2147
- kt(() => {
2152
+ }), this.$$me = di(() => {
2153
+ Dt(() => {
2148
2154
  this.$$r = !0;
2149
- for (const n of Ue(this.$$c)) {
2155
+ for (const n of Je(this.$$c)) {
2150
2156
  if (!this.$$p_d[n]?.reflect) continue;
2151
2157
  this.$$d[n] = this.$$c[n];
2152
2158
  const i = Ye(n, this.$$d[n], this.$$p_d, "toAttribute");
@@ -2156,8 +2162,8 @@ typeof HTMLElement == "function" && (Ir = class extends HTMLElement {
2156
2162
  });
2157
2163
  });
2158
2164
  for (const n in this.$$l) for (const i of this.$$l[n]) {
2159
- const s = this.$$c.$on(n, i);
2160
- this.$$l_u.set(i, s);
2165
+ const a = this.$$c.$on(n, i);
2166
+ this.$$l_u.set(i, a);
2161
2167
  }
2162
2168
  this.$$l = {};
2163
2169
  }
@@ -2171,7 +2177,7 @@ typeof HTMLElement == "function" && (Ir = class extends HTMLElement {
2171
2177
  });
2172
2178
  }
2173
2179
  $$g_p(e) {
2174
- return Ue(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2180
+ return Je(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2175
2181
  }
2176
2182
  });
2177
2183
  function Ye(e, t, r, n) {
@@ -2200,132 +2206,974 @@ function Ye(e, t, r, n) {
2200
2206
  return t;
2201
2207
  }
2202
2208
  }
2203
- function qi(e) {
2209
+ function Wi(e) {
2204
2210
  const t = {};
2205
2211
  return e.childNodes.forEach((r) => {
2206
2212
  t[r.slot || "default"] = !0;
2207
2213
  }), t;
2208
2214
  }
2209
- function Mi(e, t, r, n, i, s) {
2210
- let l = class extends Ir {
2215
+ function Gr(e, t, r, n, i, a) {
2216
+ let o = class extends qr {
2211
2217
  constructor() {
2212
2218
  super(e, r, i), this.$$p_d = t;
2213
2219
  }
2214
2220
  static get observedAttributes() {
2215
- return Ue(t).map((a) => (t[a].attribute || a).toLowerCase());
2221
+ return Je(t).map((s) => (t[s].attribute || s).toLowerCase());
2216
2222
  }
2217
2223
  };
2218
- return Ue(t).forEach((a) => {
2219
- Ge(l.prototype, a, {
2224
+ return Je(t).forEach((s) => {
2225
+ Qe(o.prototype, s, {
2220
2226
  get() {
2221
- return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2227
+ return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
2222
2228
  },
2223
- set(f) {
2224
- f = Ye(a, f, t), this.$$d[a] = f;
2229
+ set(l) {
2230
+ l = Ye(s, l, t), this.$$d[s] = l;
2225
2231
  var v = this.$$c;
2226
- v && (se(v, a)?.get ? v[a] = f : v.$set({ [a]: f }));
2232
+ v && (ue(v, s)?.get ? v[s] = l : v.$set({ [s]: l }));
2227
2233
  }
2228
2234
  });
2229
- }), n.forEach((a) => {
2230
- Ge(l.prototype, a, { get() {
2231
- return this.$$c?.[a];
2235
+ }), n.forEach((s) => {
2236
+ Qe(o.prototype, s, { get() {
2237
+ return this.$$c?.[s];
2232
2238
  } });
2233
- }), s && (l = s(l)), e.element = l, l;
2239
+ }), a && (o = a(o)), e.element = o, o;
2234
2240
  }
2235
- var Oi = /* @__PURE__ */ li('<div class="pie-tool-calculator-inline svelte-qq14od"><button type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-calculator-inline__icon svelte-qq14od" aria-hidden="true"><path d="M7,2H17A2,2 0 0,1 19,4V20A2,2 0 0,1 17,22H7A2,2 0 0,1 5,20V4A2,2 0 0,1 7,2M7,4V8H17V4H7M7,10V12H9V10H7M11,10V12H13V10H11M15,10V12H17V10H15M7,14V16H9V14H7M11,14V16H13V14H11M15,14V16H17V14H15M7,18V20H9V18H7M11,18V20H13V18H11M15,18V20H17V18H15Z"></path></svg></button> <div class="pie-sr-only svelte-qq14od" role="status" aria-live="polite" aria-atomic="true"> </div></div>'), Ri = {
2236
- hash: "svelte-qq14od",
2237
- code: `.pie-tool-calculator-inline.svelte-qq14od {display:inline-flex;align-items:center;gap:0.25rem;}.pie-tool-calculator-inline__button.svelte-qq14od {display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--pie-border, #ccc);background-color:var(--pie-background, white);color:var(--pie-text, #333);border-radius:4px;cursor:pointer;transition:background-color 0.15s ease,
2238
- transform 0.1s ease,
2239
- box-shadow 0.15s ease;padding:0.25rem;position:relative;}.pie-tool-calculator-inline__button.svelte-qq14od:hover:not(:disabled) {background-color:var(--pie-secondary-background, #f5f5f5);transform:translateY(-1px);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);}.pie-tool-calculator-inline__button.svelte-qq14od:active:not(:disabled) {transform:translateY(0);box-shadow:none;}
2240
-
2241
- /* Focus indicator - WCAG 2.4.7, 2.4.13 */.pie-tool-calculator-inline__button.svelte-qq14od:focus-visible {outline:2px solid var(--pie-button-focus-outline, #0066cc);outline-offset:2px;box-shadow:0 0 0 4px
2242
- color-mix(in srgb, var(--pie-button-focus-outline, #0066cc) 20%, transparent);z-index:1;}.pie-tool-calculator-inline__button--active.svelte-qq14od {background-color:var(--pie-tool-trigger-active-background, var(--pie-primary, #1976d2));color:var(--pie-tool-trigger-active-color, white);border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));}.pie-tool-calculator-inline__button--active.svelte-qq14od:hover:not(:disabled) {background-color:var(--pie-tool-trigger-active-background, var(--pie-primary-dark, #1565c0));color:var(--pie-tool-trigger-active-color, white);border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));}.pie-tool-calculator-inline__button.svelte-qq14od:disabled {cursor:not-allowed;opacity:0.6;}
2243
-
2244
- /* Size variants */.pie-tool-calculator-inline__button--sm.svelte-qq14od {width:1.5rem;height:1.5rem;
2245
- /* Increase padding to meet 44px touch target - WCAG 2.5.2 */padding:0.625rem;}.pie-tool-calculator-inline__button--sm.svelte-qq14od .pie-tool-calculator-inline__icon:where(.svelte-qq14od) {width:1rem;height:1rem;}.pie-tool-calculator-inline__button--md.svelte-qq14od {width:2rem;height:2rem;}.pie-tool-calculator-inline__button--md.svelte-qq14od .pie-tool-calculator-inline__icon:where(.svelte-qq14od) {width:1.25rem;height:1.25rem;}.pie-tool-calculator-inline__button--lg.svelte-qq14od {width:2.5rem;height:2.5rem;}.pie-tool-calculator-inline__button--lg.svelte-qq14od .pie-tool-calculator-inline__icon:where(.svelte-qq14od) {width:1.5rem;height:1.5rem;}.pie-tool-calculator-inline__icon.svelte-qq14od {fill:currentColor;color:var(--pie-button-color, #555);}.pie-tool-calculator-inline__button.svelte-qq14od:not(.pie-tool-calculator-inline__button--active):hover:not(:disabled) .pie-tool-calculator-inline__icon:where(.svelte-qq14od) {color:var(--pie-button-hover-color, #667eea);}.pie-tool-calculator-inline__button--active.svelte-qq14od .pie-tool-calculator-inline__icon:where(.svelte-qq14od) {color:var(--pie-tool-trigger-active-color, inherit);}
2246
-
2247
- /* Screen reader only content */.pie-sr-only.svelte-qq14od {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
2241
+ function Ce(e) {
2242
+ return e ? e.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
2243
+ }
2244
+ function Ki(e) {
2245
+ const t = Ce(e);
2246
+ if (!t) return [];
2247
+ const r = t.split("-"), n = [];
2248
+ for (let i = r.length; i > 0; i--) {
2249
+ const a = r.slice(0, i);
2250
+ a.length > 1 && a[a.length - 1].length === 1 || n.push(a.join("-"));
2251
+ }
2252
+ return n;
2253
+ }
2254
+ function Ji(e, t) {
2255
+ for (const r of Ki(e)) {
2256
+ const n = t.find((i) => Ce(i) === r);
2257
+ if (n != null) return n;
2258
+ }
2259
+ }
2260
+ var Qi = {
2261
+ common: {
2262
+ close: "Close",
2263
+ cancel: "Cancel",
2264
+ save: "Save",
2265
+ reset: "Reset",
2266
+ retry: "Retry",
2267
+ back: "Back",
2268
+ next: "Next",
2269
+ previous: "Previous",
2270
+ submit: "Submit",
2271
+ continue: "Continue",
2272
+ finish: "Finish",
2273
+ yes: "Yes",
2274
+ no: "No",
2275
+ ok: "OK",
2276
+ any: "Any",
2277
+ off: "Off",
2278
+ auto: "Auto",
2279
+ all: "All",
2280
+ none: "None",
2281
+ loading: "Loading…",
2282
+ error: "Error",
2283
+ settings: "Settings",
2284
+ language: "Language",
2285
+ theme: "Theme",
2286
+ preview: "Preview",
2287
+ author: "Author",
2288
+ unknown: "Unknown",
2289
+ untitled: "Untitled",
2290
+ apply: "Apply",
2291
+ enabled: "Enabled",
2292
+ disabled: "Disabled",
2293
+ closeA11y: "Close",
2294
+ settingsA11y: "Open settings menu"
2295
+ },
2296
+ player: {
2297
+ passage: "Passage",
2298
+ passages: "Passages",
2299
+ question: "Question",
2300
+ questionNumbered: "Question {position}",
2301
+ questions: "Questions",
2302
+ items: "Items",
2303
+ section: "Section",
2304
+ loadingSection: "Loading section content…",
2305
+ loadingPassage: "Loading passage content…",
2306
+ configurationError: "Configuration Error",
2307
+ playerError: "Player Error",
2308
+ authoringBackendError: "Authoring Backend Configuration Error",
2309
+ itemLoadError: "Question could not be loaded.",
2310
+ sectionTabsA11y: "Section content tabs",
2311
+ passagesRegionA11y: "Passages",
2312
+ itemsRegionA11y: "Items",
2313
+ sectionToolsA11y: "Section tools",
2314
+ scrollDownA11y: "Scroll down",
2315
+ resizePanels: "Resize panels",
2316
+ resizePassagesAndItemsA11y: "Resize passages and items panels",
2317
+ resizeMediaRegion: "Resize media region",
2318
+ resizeQuestionAndMediaA11y: "Resize question and media panels",
2319
+ resizePassageAndMediaA11y: "Resize passage and media panels",
2320
+ assessment: {
2321
+ sectionPosition: "Section {position} of {total}",
2322
+ noSections: "No sections"
2323
+ },
2324
+ formative: {
2325
+ checkAnswer: "Check answer",
2326
+ tryAgain: "Try again",
2327
+ answerRecorded: "Answer recorded.",
2328
+ correct: "Correct.",
2329
+ partlyCorrect: "Partly correct.",
2330
+ notCorrect: "Not correct.",
2331
+ notAutoScored: "Answer recorded. This question is not scored automatically.",
2332
+ checkFailed: "This question could not be checked. Try again.",
2333
+ triesLeft: {
2334
+ one: "{count} try left.",
2335
+ other: "{count} tries left."
2336
+ }
2337
+ },
2338
+ timedMedia: {
2339
+ waitingForMedia: "Questions will appear as the media plays.",
2340
+ questionAvailable: "Question {position} is now available.",
2341
+ playbackPaused: "Playback paused. Answer question {position} to continue.",
2342
+ playbackAdvisory: "Answer question {position} before continuing with the media.",
2343
+ playbackReleased: "Answer accepted. Continue playing the media."
2344
+ }
2345
+ },
2346
+ toolkit: {
2347
+ toolsA11y: "Assessment tools",
2348
+ toolbarInitError: "Unable to initialize assessment toolkit.",
2349
+ settingsTitle: "Settings",
2350
+ closeSettingsA11y: "Close settings",
2351
+ dragPanelA11y: "Drag panel",
2352
+ closePanelA11y: "Close panel",
2353
+ resizeWindow: "Resize window",
2354
+ minimize: "Minimize",
2355
+ maximize: "Maximize",
2356
+ minimizePanelA11y: "Minimize panel",
2357
+ maximizePanelA11y: "Maximize panel",
2358
+ window: {
2359
+ moveLeftA11y: "Move tool left",
2360
+ moveRightA11y: "Move tool right",
2361
+ moveUpA11y: "Move tool up",
2362
+ moveDownA11y: "Move tool down",
2363
+ shrinkA11y: "Shrink tool window",
2364
+ growA11y: "Grow tool window",
2365
+ centerA11y: "Center tool window",
2366
+ closeA11y: "Close tool"
2367
+ },
2368
+ announce: {
2369
+ movedUp: "Moved up to {position}",
2370
+ movedDown: "Moved down to {position}",
2371
+ movedLeft: "Moved left to {position}",
2372
+ movedRight: "Moved right to {position}",
2373
+ rotatedTo: "Rotated to {degrees} degrees"
2374
+ }
2375
+ },
2376
+ tools: {
2377
+ calculator: {
2378
+ name: "Calculator",
2379
+ nameBasic: "Basic Calculator",
2380
+ nameScientific: "Scientific Calculator",
2381
+ nameGraphing: "Graphing Calculator",
2382
+ description: "Multi-type calculator (basic, scientific, graphing)",
2383
+ openedBasic: "Basic calculator opened",
2384
+ openedScientific: "Scientific calculator opened",
2385
+ openedGraphing: "Graphing calculator opened",
2386
+ closedBasic: "Basic calculator closed",
2387
+ closedScientific: "Scientific calculator closed",
2388
+ closedGraphing: "Graphing calculator closed",
2389
+ toolA11y: "Calculator tool",
2390
+ loading: "Loading calculator…",
2391
+ providerUnavailable: "The calculator is unavailable."
2392
+ },
2393
+ graph: {
2394
+ name: "Graph",
2395
+ description: "Graphing calculator and coordinate plane",
2396
+ buttonA11y: "Graph, graphing calculator",
2397
+ tooltip: "Graph",
2398
+ toolA11y: "Graph tool — draw points and lines on a coordinate grid",
2399
+ canvasA11y: "Graph canvas — use tools to add points and draw lines",
2400
+ grid: "Grid:",
2401
+ gridOpacityA11y: "Grid opacity",
2402
+ pointA11y: "Graph point {id}",
2403
+ modeSelector: "Selector",
2404
+ modeSelectorHint: "Selector: click and drag points to move them or associated lines.",
2405
+ modePoint: "Point",
2406
+ modePointHint: "Point: click on the grid to add points.",
2407
+ modeLine: "Line",
2408
+ modeLineHint: "Line: click a starting point, then an ending point to draw a line.",
2409
+ modeDelete: "Delete",
2410
+ modeDeleteHint: "Delete: click on a point to delete it and any connected lines."
2411
+ },
2412
+ periodicTable: {
2413
+ name: "Periodic Table",
2414
+ description: "Chemistry periodic table reference",
2415
+ buttonA11y: "Periodic Table, chemistry reference",
2416
+ tooltip: "Periodic Table",
2417
+ toolA11y: "Periodic table — select an element to view its details",
2418
+ elementsA11y: "Periodic table elements",
2419
+ showAllA11y: "Show all elements",
2420
+ allElements: "All Elements",
2421
+ atomicMass: "Atomic Mass",
2422
+ atomicNumber: "Atomic No",
2423
+ electronConfig: "Electron Config",
2424
+ phase: "Phase",
2425
+ filterByA11y: "Filter by {category}",
2426
+ elementA11y: "{name}, Symbol: {symbol}, Atomic number: {number}, Atomic mass: {mass}, Category: {category}",
2427
+ outsideFilterA11y: ", outside the current filter",
2428
+ category: {
2429
+ unknown: "Unknown",
2430
+ alkaliMetal: "Alkali Metal",
2431
+ alkalineEarthMetal: "Alkaline Earth Metal",
2432
+ transitionMetal: "Transition Metal",
2433
+ postTransitionMetal: "Post-transition Metal",
2434
+ metalloid: "Metalloid",
2435
+ diatomicNonmetal: "Diatomic Nonmetal",
2436
+ polyatomicNonmetal: "Polyatomic Nonmetal",
2437
+ nobleGas: "Noble Gas",
2438
+ lanthanide: "Lanthanide",
2439
+ actinide: "Actinide"
2440
+ }
2441
+ },
2442
+ ruler: {
2443
+ name: "Ruler",
2444
+ description: "On-screen ruler for measurements",
2445
+ buttonA11y: "Ruler",
2446
+ tooltip: "Ruler",
2447
+ toolA11y: "Draggable and rotatable ruler measurement tool",
2448
+ unitSelectionA11y: "Ruler unit selection",
2449
+ inches: "Inches",
2450
+ centimeters: "Centimeters",
2451
+ inchesInSentence: "inches",
2452
+ centimetersInSentence: "centimeters",
2453
+ switchToInchesA11y: "Switch to inches",
2454
+ switchToCentimetersA11y: "Switch to centimeters",
2455
+ switchedTo: "Switched to {unit}",
2456
+ applicationA11y: "Ruler tool. Use arrow keys to move, Shift+arrows to rotate, PageUp or PageDown for fine rotation, U to toggle units. Current unit: {unit}",
2457
+ imageAlt: "Ruler showing {unit}"
2458
+ },
2459
+ protractor: {
2460
+ name: "Protractor",
2461
+ description: "On-screen protractor for angle measurements",
2462
+ buttonA11y: "Protractor",
2463
+ tooltip: "Protractor",
2464
+ toolA11y: "Protractor tool. Use arrow keys to move, Shift+arrows to rotate, and PageUp or PageDown for fine rotation.",
2465
+ roleA11y: "Draggable and rotatable protractor measurement tool",
2466
+ imageAlt: "Protractor with 180-degree semicircular scale marked from 0 to 180 degrees in both directions, with degree markings every 10 degrees"
2467
+ },
2468
+ dictionary: {
2469
+ name: "Dictionary",
2470
+ description: "Look up word definitions",
2471
+ buttonA11y: "Dictionary, look up word definitions",
2472
+ tooltip: "Dictionary",
2473
+ toolA11y: "Dictionary"
2474
+ },
2475
+ pictureDictionary: {
2476
+ name: "Picture Dictionary",
2477
+ description: "Look up pictures for words",
2478
+ buttonA11y: "Picture Dictionary, look up pictures for words",
2479
+ tooltip: "Picture Dictionary",
2480
+ toolA11y: "Picture Dictionary"
2481
+ },
2482
+ dictionarySpanish: {
2483
+ name: "Spanish Dictionary",
2484
+ description: "Look up word definitions in Spanish",
2485
+ buttonA11y: "Spanish Dictionary, look up word definitions in Spanish",
2486
+ tooltip: "Spanish Dictionary",
2487
+ toolA11y: "Spanish Dictionary"
2488
+ },
2489
+ pictureDictionarySpanish: {
2490
+ name: "Spanish Picture Dictionary",
2491
+ description: "Look up pictures for words in Spanish",
2492
+ buttonA11y: "Spanish Picture Dictionary, look up pictures for words in Spanish",
2493
+ tooltip: "Spanish Picture Dictionary",
2494
+ toolA11y: "Spanish Picture Dictionary"
2495
+ },
2496
+ lineReader: {
2497
+ name: "Line Reader",
2498
+ description: "Reading guide overlay",
2499
+ buttonA11y: "Line Reader, reading guide",
2500
+ tooltip: "Line Reader",
2501
+ roleA11y: "Draggable and resizable reading guide overlay",
2502
+ close: "Close line reader",
2503
+ resizeWindowA11y: "Drag to resize the reading window",
2504
+ resizeFrameA11y: "Drag to resize the frame and window width",
2505
+ windowHeightAnnounce: "Reading window height {pixels} pixels",
2506
+ frameHeightAnnounce: "Frame height {pixels} pixels",
2507
+ widthAnnounce: "Width {pixels} pixels",
2508
+ applicationA11y: "Line Reader tool. A clear reading window inside an obscuring frame. Use arrow keys to move, +/- to resize the reading window, Escape to close. Reading window height: {paneHeight} pixels, Frame height: {frameHeight} pixels",
2509
+ resizeWindowFullA11y: "Resize the reading window. Drag, or use the up and down arrow keys to change its height. Current height {paneHeight} pixels",
2510
+ resizeFrameFullA11y: "Resize the frame. Drag, or use the up and down arrow keys to change the frame height and the left and right arrow keys to change the width. Current frame height {frameHeight} pixels, width {width} pixels"
2511
+ },
2512
+ answerEliminator: {
2513
+ name: "Answer Eliminator",
2514
+ description: "Strike through answer choices",
2515
+ buttonA11y: "Strike Through, eliminate answer choices",
2516
+ tooltip: "Strike Through"
2517
+ },
2518
+ highlighter: {
2519
+ name: "Highlighter",
2520
+ description: "Highlight and annotate text",
2521
+ buttonA11y: "Highlight text",
2522
+ tooltip: "Highlight"
2523
+ },
2524
+ annotationToolbar: {
2525
+ name: "Annotation",
2526
+ description: "Highlight and annotate text",
2527
+ buttonA11y: "Annotate, highlight and mark up text",
2528
+ tooltip: "Annotate",
2529
+ toolbarA11y: "Text annotation toolbar",
2530
+ underline: "Underline",
2531
+ underlineA11y: "Underline selected text",
2532
+ readAloud: "Read Aloud",
2533
+ readAloudA11y: "Read selected text aloud",
2534
+ remove: "Remove",
2535
+ removeA11y: "Remove this annotation",
2536
+ clearAll: "Clear All",
2537
+ clearAllA11y: "Clear all annotations from document",
2538
+ highlightYellowA11y: "Yellow highlight",
2539
+ highlightPinkA11y: "Pink highlight",
2540
+ highlightBlueA11y: "Blue highlight",
2541
+ highlightGreenA11y: "Green highlight"
2542
+ },
2543
+ theme: {
2544
+ name: "Theme",
2545
+ description: "Accessible themes and contrast",
2546
+ buttonA11y: "Theme, change colors and contrast",
2547
+ tooltip: "Theme",
2548
+ selectorA11y: "Theme selector",
2549
+ hint: "Select a theme to improve readability and reduce eye strain.",
2550
+ selectA11y: "Select theme",
2551
+ selectCurrentA11y: "Select theme. Current theme: {name}",
2552
+ optionUnavailableA11y: "{name}, unavailable",
2553
+ unavailableName: "Unavailable theme: {id}",
2554
+ unavailableDescription: "PIE's managed base theme remains active until this theme becomes available again.",
2555
+ unavailableStatus: "The selected theme is unavailable. PIE's managed base theme is active until it becomes available again."
2556
+ },
2557
+ textToSpeech: {
2558
+ name: "Text to Speech",
2559
+ description: "Read content aloud",
2560
+ toolA11y: "Text-to-speech tool",
2561
+ title: "Text-to-Speech",
2562
+ initializing: "Initializing…",
2563
+ initFailed: "Failed to initialize text-to-speech.",
2564
+ selectText: "Select text on the page to read it aloud.",
2565
+ speed: "Speed:",
2566
+ play: "Play",
2567
+ pause: "Pause",
2568
+ resume: "Resume",
2569
+ stop: "Stop",
2570
+ speaking: "Speaking…",
2571
+ paused: "Paused",
2572
+ charactersSelected: {
2573
+ one: "{count} character selected",
2574
+ other: "{count} characters selected"
2575
+ },
2576
+ rate: {
2577
+ slow: "Slow",
2578
+ slower: "Slower",
2579
+ normal: "Normal",
2580
+ faster: "Faster",
2581
+ fast: "Fast",
2582
+ veryFast: "Very Fast"
2583
+ },
2584
+ inline: {
2585
+ controlsA11y: "Reading controls",
2586
+ playbackSpeedA11y: "Playback speed",
2587
+ rewindA11y: "Rewind",
2588
+ fastForwardA11y: "Fast-forward",
2589
+ stopA11y: "Stop reading",
2590
+ initializing: "Initializing text-to-speech",
2591
+ initFailed: "Unable to initialize text-to-speech. Try again.",
2592
+ starting: "Starting reading",
2593
+ started: "Reading started",
2594
+ resumed: "Reading resumed",
2595
+ pausedAnnouncement: "Reading paused",
2596
+ stopped: "Reading stopped",
2597
+ switchedSection: "Reading switched to another section",
2598
+ startFailed: "Unable to start reading",
2599
+ skippedForward: "Skipped forward",
2600
+ skipForwardFailed: "Unable to skip forward",
2601
+ skippedBackward: "Skipped backward",
2602
+ skipBackwardFailed: "Unable to skip backward",
2603
+ speedChangeFailed: "Unable to change playback speed",
2604
+ speedAnnounce: "Playback speed {label}",
2605
+ playA11y: "Play reading",
2606
+ pauseA11y: "Pause reading",
2607
+ resumeA11y: "Resume reading"
2608
+ }
2609
+ },
2610
+ signLanguage: {
2611
+ name: "Sign Language",
2612
+ description: "Signed alternate for authored content",
2613
+ generic: "Sign language",
2614
+ unknown: "Sign language ({code})",
2615
+ ase: "American Sign Language",
2616
+ bfi: "British Sign Language",
2617
+ fsl: "French Sign Language",
2618
+ gss: "Greek Sign Language",
2619
+ mfs: "Mexican Sign Language",
2620
+ signedEnglish: "Signed English",
2621
+ regionA11y: "{language} translation"
2622
+ },
2623
+ audioTranscript: {
2624
+ name: "Audio Transcript",
2625
+ description: "Text transcript of audio content",
2626
+ regionA11y: "Transcript"
2627
+ }
2628
+ },
2629
+ debug: {
2630
+ session: "Session",
2631
+ sessionData: "Session Data",
2632
+ sessionDataPersistent: "PIE Session Data (Persistent)",
2633
+ noItemSessionYet: "No item session data yet. Interact with the item to see updates here.",
2634
+ itemSessionsSnapshot: "Item Sessions Snapshot",
2635
+ sectionControllerUnavailable: "Section controller not available for this section yet.",
2636
+ filteredModel: "Filtered Model",
2637
+ environment: "Environment",
2638
+ events: "Events",
2639
+ controllerEvents: "Controller Events",
2640
+ instrumentation: "Instrumentation",
2641
+ databaseState: "Database state",
2642
+ sessionDb: "Session DB (Server)",
2643
+ noRows: "No rows",
2644
+ noRecords: "No instrumentation records yet.",
2645
+ selectRecord: "Select a record to inspect details.",
2646
+ selectEvent: "Select an event to inspect payload details.",
2647
+ showRawTables: "Show raw tables",
2648
+ showReconstructedSnapshots: "Show reconstructed snapshots",
2649
+ showSectionRequest: "Show section request",
2650
+ showAssessmentRequest: "Show assessment request",
2651
+ liveUpdatesUnsupported: "Live updates are not supported in this browser",
2652
+ liveUpdatesDisconnected: "Live updates disconnected; retrying…",
2653
+ fieldType: "Type:",
2654
+ fieldTarget: "Target:",
2655
+ fieldItem: "Item:",
2656
+ fieldCanonical: "Canonical:",
2657
+ fieldIntent: "Intent:",
2658
+ fieldDuplicates: "Duplicates:",
2659
+ fieldSemanticRepeats: "Semantic Repeats:",
2660
+ dragItemSessionPanelA11y: "Drag item session panel",
2661
+ debuggerTabsA11y: "Debugger tabs",
2662
+ sessionDataJsonA11y: "Session data JSON",
2663
+ environmentJsonA11y: "Environment JSON",
2664
+ filteredModelJsonA11y: "Filtered model JSON",
2665
+ sectionSessionJsonA11y: "Section session snapshot JSON",
2666
+ eventLevelFilterA11y: "Event level filter",
2667
+ controllerEventDetailsA11y: "Controller event details",
2668
+ instrumentationFilterA11y: "Filter instrumentation record type",
2669
+ instrumentationDetailsA11y: "Instrumentation record details",
2670
+ toggleSessionPanelA11y: "Toggle session panel",
2671
+ toggleEventPanelA11y: "Toggle event broadcast panel",
2672
+ toggleDatabasePanelA11y: "Toggle database state panel",
2673
+ toggleInstrumentationPanelA11y: "Toggle instrumentation panel",
2674
+ pnp: {
2675
+ title: "PNP Profile",
2676
+ noAssessmentBound: "No assessment bound",
2677
+ determinationReadOnly: "Determination (read-only)",
2678
+ toolsEditor: "Tools Editor",
2679
+ enforcement: "PNP enforcement",
2680
+ allAvailableTools: "All available tools",
2681
+ clearPlacement: "Clear placement",
2682
+ tool: "Tool",
2683
+ placement: "Placement",
2684
+ provider: "Provider",
2685
+ simulation: "PNP simulation",
2686
+ resolvedTools: "Resolved Tools (toolkit)",
2687
+ provenanceSummary: "Tool Policy Provenance Summary",
2688
+ perToolDecisions: "Per-Tool Decisions",
2689
+ profileReadOnly: "PNP Profile (read-only)"
2690
+ },
2691
+ tts: {
2692
+ title: "TTS settings",
2693
+ closeA11y: "Close TTS settings",
2694
+ toolbarLayoutMode: "Toolbar layout mode",
2695
+ reservedRow: "Reserved row",
2696
+ expandingRow: "Expanding row",
2697
+ floatingOverlay: "Floating overlay",
2698
+ leftAlignedControls: "Left-aligned controls",
2699
+ inlineSpeedButtons: "Inline speed buttons",
2700
+ resetToDefaults: "Reset to defaults",
2701
+ mathHighlighting: "Math highlighting",
2702
+ checkingAvailability: "Checking availability…",
2703
+ recheck: "Recheck",
2704
+ voice: "Voice",
2705
+ bestAvailableVoice: "Best available voice (auto)",
2706
+ unnamedVoice: "Unnamed voice",
2707
+ apiEndpoint: "API endpoint",
2708
+ gender: "Gender",
2709
+ any: "Any",
2710
+ male: "Male",
2711
+ female: "Female",
2712
+ neutral: "Neutral",
2713
+ engine: "Engine",
2714
+ neural: "Neural",
2715
+ standard: "Standard",
2716
+ providerDefault: "Provider default",
2717
+ format: "Format",
2718
+ sampleRate: "Sample rate",
2719
+ speechMarks: "Speech marks",
2720
+ word: "Word",
2721
+ wordAndSentence: "Word + sentence",
2722
+ voiceType: "Voice type",
2723
+ wavenetVoiceType: "WaveNet",
2724
+ studioVoiceType: "Studio",
2725
+ plainText: "Plain text",
2726
+ sampleText: "Sample text",
2727
+ resetSample: "Reset sample",
2728
+ providerAvailable: "Provider available.",
2729
+ providerUnavailable: "Provider unavailable.",
2730
+ providerCheckFailed: "Provider availability check failed.",
2731
+ providerNotChecked: "Provider availability has not been checked yet.",
2732
+ webSpeechUnavailable: "Web Speech API is not available in this browser.",
2733
+ browserNoVoices: "Browser text-to-speech is available, but no voices were returned yet.",
2734
+ browserUnavailable: "Browser text-to-speech is not available.",
2735
+ googleUnavailable: "Google Cloud TTS is not available from the configured API.",
2736
+ pollyUnavailable: "AWS Polly is not available from the configured API.",
2737
+ recommendedVoices: "Recommended voices",
2738
+ allVoices: "All available voices",
2739
+ previewVoice: "Preview voice",
2740
+ stopPreview: "Stop preview",
2741
+ applying: "Applying…",
2742
+ ssmlPreviewUnsupported: "SSML preview is not supported in the Browser backend.",
2743
+ pollySsmlHint: "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails.",
2744
+ mathHighlightParts: "Highlighting each part of a formula as it is read, falling back to the whole formula when alignment is uncertain.",
2745
+ mathHighlightBlock: "Highlighting each formula as a single block instead of breaking it into parts.",
2746
+ previewFailed: "Failed to play preview audio.",
2747
+ previewNoAudio: "Preview response did not include audio content.",
2748
+ previewEnterText: "Enter preview text before starting playback.",
2749
+ previewUnavailable: "Cannot preview while this service is unavailable.",
2750
+ browserSynthesisUnavailable: "Browser speech synthesis is unavailable.",
2751
+ browserSynthesisEndedEarly: "Browser speech synthesis ended before audio started. Restart the browser and try again.",
2752
+ browserSynthesisQueueFailed: "Browser speech synthesis failed to queue preview audio.",
2753
+ browserPreviewFailed: "Failed to play browser voice preview.",
2754
+ ssmlWordTrackingDisabled: "Google SSML preview preserves authored SSML, so word tracking is disabled.",
2755
+ applyUnavailable: "Cannot apply settings while this service is unavailable.",
2756
+ coordinatorUnavailable: "Toolkit coordinator is not available for text-to-speech updates."
2757
+ }
2758
+ }
2759
+ }, ft = "en-US", Zi = /* @__PURE__ */ new Set([
2760
+ "ar",
2761
+ "ckb",
2762
+ "dv",
2763
+ "fa",
2764
+ "he",
2765
+ "iw",
2766
+ "ks",
2767
+ "ku",
2768
+ "nqo",
2769
+ "ps",
2770
+ "sd",
2771
+ "syr",
2772
+ "ug",
2773
+ "ur",
2774
+ "yi"
2775
+ ]), Xi = /* @__PURE__ */ new Set([
2776
+ "zero",
2777
+ "one",
2778
+ "two",
2779
+ "few",
2780
+ "many",
2781
+ "other"
2782
+ ]);
2783
+ function tr(e) {
2784
+ if (typeof e != "object" || e === null) return !1;
2785
+ const t = Object.keys(e);
2786
+ return t.length > 0 && t.every((r) => Xi.has(r));
2787
+ }
2788
+ function rr(e) {
2789
+ try {
2790
+ const r = new Intl.Locale(e).textInfo;
2791
+ if (r?.direction === "rtl" || r?.direction === "ltr") return r.direction;
2792
+ } catch {
2793
+ }
2794
+ const t = Ce(e).split("-")[0] ?? "";
2795
+ return Zi.has(t) ? "rtl" : "ltr";
2796
+ }
2797
+ var ea = class We {
2798
+ static pluralRules = /* @__PURE__ */ new Map();
2799
+ locale;
2800
+ fallbackLocale;
2801
+ catalogs;
2802
+ customMessages;
2803
+ loading;
2804
+ listeners = /* @__PURE__ */ new Set();
2805
+ config;
2806
+ constructor(t = {}) {
2807
+ this.config = { ...t }, this.fallbackLocale = Ve(t.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[ft, Qi]]), this.customMessages = { ...t.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(t.locale) ?? "en-US";
2808
+ }
2809
+ async initialize(t) {
2810
+ if (this.config = {
2811
+ ...this.config,
2812
+ ...t
2813
+ }, t.customMessages) for (const [r, n] of Object.entries(t.customMessages)) this.addCustomMessages(r, n);
2814
+ await this.setLocale(t.locale ?? this.locale);
2815
+ }
2816
+ getLocale() {
2817
+ return this.locale;
2818
+ }
2819
+ async setLocale(t) {
2820
+ const r = this.resolveLocaleTag(t);
2821
+ if (!r) {
2822
+ this.locale = Ve(t) || "en-US", this.notify();
2823
+ return;
2824
+ }
2825
+ if (!this.catalogs.has(r)) {
2826
+ const n = this.loading.get(r);
2827
+ if (n) await n;
2828
+ else {
2829
+ const i = this.loadCatalog(r);
2830
+ this.loading.set(r, i);
2831
+ try {
2832
+ await i;
2833
+ } finally {
2834
+ this.loading.delete(r);
2835
+ }
2836
+ }
2837
+ }
2838
+ this.locale = r, this.notify();
2839
+ }
2840
+ t(t, r) {
2841
+ const n = this.lookup(t);
2842
+ return n === void 0 ? (this.config.onMissingKey?.(t, this.locale), t) : nr(n, r);
2843
+ }
2844
+ plural(t, r) {
2845
+ const n = this.lookupNode(t);
2846
+ return n === void 0 || !tr(n) ? this.t(t, r) : nr(n[this.selectPluralCategory(r.count)] ?? n.other, r);
2847
+ }
2848
+ getDirection() {
2849
+ return rr(this.locale);
2850
+ }
2851
+ getAvailableLocales() {
2852
+ return [.../* @__PURE__ */ new Set([
2853
+ ...this.catalogs.keys(),
2854
+ ...this.config.availableLocales ?? [],
2855
+ ...Object.keys(this.customMessages)
2856
+ ])];
2857
+ }
2858
+ isLocaleLoaded(t) {
2859
+ const r = this.resolveLocaleTag(t);
2860
+ return r !== void 0 && this.catalogs.has(r);
2861
+ }
2862
+ subscribe(t) {
2863
+ return this.listeners.add(t), () => {
2864
+ this.listeners.delete(t);
2865
+ };
2866
+ }
2867
+ hasKey(t) {
2868
+ return this.lookup(t) !== void 0;
2869
+ }
2870
+ addCustomMessages(t, r) {
2871
+ const n = Ve(t);
2872
+ this.customMessages[n] = Yr(this.customMessages[n] ?? {}, r), this.notify();
2873
+ }
2874
+ withLocale(t) {
2875
+ const r = this.resolveLocaleTag(t) ?? Ve(t);
2876
+ if (r === this.locale) return this;
2877
+ const n = new We({
2878
+ ...this.config,
2879
+ locale: r
2880
+ });
2881
+ return n.locale = r || "en-US", n.catalogs = this.catalogs, n.customMessages = this.customMessages, n.loading = this.loading, n;
2882
+ }
2883
+ formatNumber(t, r) {
2884
+ try {
2885
+ return new Intl.NumberFormat(this.locale, r).format(t);
2886
+ } catch {
2887
+ return new Intl.NumberFormat(ft, r).format(t);
2888
+ }
2889
+ }
2890
+ formatDate(t, r) {
2891
+ try {
2892
+ return new Intl.DateTimeFormat(this.locale, r).format(t);
2893
+ } catch {
2894
+ return new Intl.DateTimeFormat(ft, r).format(t);
2895
+ }
2896
+ }
2897
+ getBundle(t = this.locale) {
2898
+ const r = this.resolveLocaleTag(t);
2899
+ if (!r) return;
2900
+ const n = this.catalogs.get(r);
2901
+ if (n)
2902
+ return {
2903
+ locale: r,
2904
+ translations: n,
2905
+ direction: rr(r)
2906
+ };
2907
+ }
2908
+ resolveLocaleTag(t) {
2909
+ if (!t) return;
2910
+ const r = this.getAvailableLocales(), n = Ji(t, r);
2911
+ if (n) return n;
2912
+ const i = Ce(t).split("-")[0];
2913
+ if (i)
2914
+ return r.find((a) => Ce(a).split("-")[0] === i);
2915
+ }
2916
+ async loadCatalog(t) {
2917
+ const r = this.config.loadCatalog;
2918
+ if (r)
2919
+ try {
2920
+ this.catalogs.set(t, await r(t));
2921
+ } catch (n) {
2922
+ throw new Error(`Failed to load i18n catalog for locale: ${t}`, { cause: n });
2923
+ }
2924
+ }
2925
+ lookupNode(t) {
2926
+ const r = [
2927
+ this.customMessages[this.locale],
2928
+ this.catalogs.get(this.locale),
2929
+ this.customMessages[this.fallbackLocale],
2930
+ this.catalogs.get(this.fallbackLocale)
2931
+ ];
2932
+ for (const n of r) {
2933
+ const i = ta(n, t);
2934
+ if (i !== void 0) return i;
2935
+ }
2936
+ }
2937
+ lookup(t) {
2938
+ const r = this.lookupNode(t);
2939
+ if (typeof r == "string") return r;
2940
+ if (r !== void 0 && tr(r)) return r.other;
2941
+ }
2942
+ selectPluralCategory(t) {
2943
+ let r = We.pluralRules.get(this.locale);
2944
+ if (!r) {
2945
+ try {
2946
+ r = new Intl.PluralRules(this.locale);
2947
+ } catch {
2948
+ return t === 1 ? "one" : "other";
2949
+ }
2950
+ We.pluralRules.set(this.locale, r);
2951
+ }
2952
+ return r.select(t);
2953
+ }
2954
+ notify() {
2955
+ for (const t of this.listeners) t();
2956
+ }
2957
+ };
2958
+ function Ve(e) {
2959
+ return e ? e.trim().replace(/_/g, "-") : "";
2960
+ }
2961
+ function ta(e, t) {
2962
+ if (!e) return;
2963
+ let r = e;
2964
+ for (const n of t.split("."))
2965
+ if (typeof r != "object" || r === null || (r = r[n], r === void 0)) return;
2966
+ return r;
2967
+ }
2968
+ function nr(e, t) {
2969
+ return t ? e.replace(/\{(\w+)\}/g, (r, n) => {
2970
+ const i = t[n];
2971
+ return i == null ? r : String(i);
2972
+ }) : e;
2973
+ }
2974
+ function Yr(e, t) {
2975
+ const r = { ...e };
2976
+ for (const [n, i] of Object.entries(t)) {
2977
+ const a = r[n];
2978
+ i && typeof i == "object" && a && typeof a == "object" ? r[n] = Yr(a, i) : r[n] = i;
2979
+ }
2980
+ return r;
2981
+ }
2982
+ var dt;
2983
+ function ra() {
2984
+ return dt || (dt = new ea()), dt;
2985
+ }
2986
+ function na(e) {
2987
+ const t = e?.i18n ?? ra();
2988
+ return {
2989
+ getLocale: () => t.getLocale(),
2990
+ setLocale: (r) => t.setLocale(r),
2991
+ t: (r, n) => t.t(r, n),
2992
+ plural: (r, n) => t.plural?.(r, n) ?? t.t(r, n),
2993
+ getDirection: () => t.getDirection?.() ?? "ltr",
2994
+ hasKey: (r) => t.hasKey?.(r) ?? !1,
2995
+ subscribe: (r) => t.subscribe?.(r) ?? (() => {
2996
+ })
2997
+ };
2998
+ }
2999
+ var ia = /* @__PURE__ */ Ti('<div class="pie-tool-calculator-inline svelte-ar9a63"><button type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-calculator-inline__icon svelte-ar9a63" aria-hidden="true"><path d="M7,2H17A2,2 0 0,1 19,4V20A2,2 0 0,1 17,22H7A2,2 0 0,1 5,20V4A2,2 0 0,1 7,2M7,4V8H17V4H7M7,10V12H9V10H7M11,10V12H13V10H11M15,10V12H17V10H15M7,14V16H9V14H7M11,14V16H13V14H11M15,14V16H17V14H15M7,18V20H9V18H7M11,18V20H13V18H11M15,18V20H17V18H15Z"></path></svg></button> <div class="pie-sr-only svelte-ar9a63" role="status" aria-live="polite" aria-atomic="true"> </div></div>'), aa = {
3000
+ hash: "svelte-ar9a63",
3001
+ code: `.pie-tool-calculator-inline.svelte-ar9a63 {display:inline-flex;align-items:center;gap:0.25rem;}.pie-tool-calculator-inline__button.svelte-ar9a63 {position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0.25rem;border:1px solid var(--pie-border, #ccc);border-radius:4px;
3002
+ /* Button fills resolve through the button tokens, which every base theme
3003
+ and colour scheme sets opaque. The base light theme ships
3004
+ --pie-background transparent so PIE content reveals the host page. */background-color:var(--pie-button-background-color, var(--pie-button-bg, var(--pie-white, #fff)));color:var(--pie-text, #333);cursor:pointer;transition:background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;}.pie-tool-calculator-inline__button.svelte-ar9a63:hover:not(:disabled) {background-color:var(--pie-button-hover-background-color, var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5)));transform:translateY(-1px);box-shadow:0 2px 4px rgb(0 0 0 / 10%);}.pie-tool-calculator-inline__button.svelte-ar9a63:focus-visible {z-index:1;outline:2px solid var(--pie-button-focus-outline, #0066cc);outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-button-focus-outline, #0066cc) 20%, transparent);}.pie-tool-calculator-inline__button--active.svelte-ar9a63 {border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));background-color:var(--pie-tool-trigger-active-background, var(--pie-primary, #1976d2));color:var(
3005
+ --pie-tool-trigger-active-color,
3006
+ color-mix(in srgb, var(--pie-background, #fff) var(--pie-fixed-hue-collapse, 0%), white)
3007
+ );}.pie-tool-calculator-inline__button--active.svelte-ar9a63:hover:not(:disabled) {border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));background-color:var(
3008
+ --pie-tool-trigger-active-background,
3009
+ color-mix(
3010
+ in srgb,
3011
+ var(--pie-primary, #1565c0) var(--pie-fixed-hue-collapse, 0%),
3012
+ var(--pie-primary-dark, #1565c0)
3013
+ )
3014
+ );color:var(
3015
+ --pie-tool-trigger-active-color,
3016
+ color-mix(in srgb, var(--pie-background, #fff) var(--pie-fixed-hue-collapse, 0%), white)
3017
+ );}.pie-tool-calculator-inline__button.svelte-ar9a63:disabled {cursor:not-allowed;opacity:0.6;}.pie-tool-calculator-inline__button--sm.svelte-ar9a63 {width:1.5rem;height:1.5rem;padding:0.625rem;}.pie-tool-calculator-inline__button--md.svelte-ar9a63 {width:2rem;height:2rem;}.pie-tool-calculator-inline__button--lg.svelte-ar9a63 {width:2.5rem;height:2.5rem;}.pie-tool-calculator-inline__icon.svelte-ar9a63 {width:1.25rem;height:1.25rem;fill:currentColor;}.pie-tool-calculator-inline__button.svelte-ar9a63:not(.pie-tool-calculator-inline__button--active):hover:not(:disabled) .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {color:var(--pie-button-hover-color, #667eea);}.pie-tool-calculator-inline__button--active.svelte-ar9a63 .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {color:var(--pie-tool-trigger-active-color, inherit);}.pie-tool-calculator-inline__button--sm.svelte-ar9a63 .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {width:1rem;height:1rem;}.pie-tool-calculator-inline__button--lg.svelte-ar9a63 .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {width:1.5rem;height:1.5rem;}.pie-sr-only.svelte-ar9a63 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
2248
3018
 
2249
- /* Accessibility */
2250
- @media (prefers-reduced-motion: reduce) {.pie-tool-calculator-inline__button.svelte-qq14od {
2251
- animation: none !important;transition:none !important;}
3019
+ @media (prefers-reduced-motion: reduce) {.pie-tool-calculator-inline__button.svelte-ar9a63 {transition:none;}
2252
3020
  }`
2253
3021
  };
2254
- function Ci(e, t) {
2255
- Jt(t, !0), yi(e, Ri);
2256
- let r = $e(t, "toolId", 7, "calculator-inline"), n = $e(t, "targetToolId", 7, ""), i = $e(t, "calculatorType", 7, "basic"), s = $e(t, "availableTypes", 7, "basic,scientific,graphing"), l = $e(t, "size", 7, "md");
2257
- const a = typeof window < "u";
2258
- let f = /* @__PURE__ */ N(void 0), v = /* @__PURE__ */ N(null);
2259
- const p = /* @__PURE__ */ be(() => _(v)?.toolCoordinator);
2260
- let c = /* @__PURE__ */ N(!1), o = /* @__PURE__ */ N(!1), u = /* @__PURE__ */ N("");
2261
- const d = /* @__PURE__ */ be(() => new Set(s().split(",").map((S) => S.trim()).filter(Boolean))), h = /* @__PURE__ */ be(() => _(d).has(i()) ? i() : "basic");
2262
- Pe(() => {
2263
- if (_(f))
2264
- return Lr(_(f), (S) => {
2265
- O(v, S, !0);
2266
- });
2267
- }), Pe(() => {
2268
- _(p) && r() && _(f) && !_(c) && (_(p).registerTool(r(), "Calculator Inline", _(f), jr.TOOL), O(c, !0));
2269
- });
2270
- const b = /* @__PURE__ */ be(() => n() ? n() : Pr(r()));
2271
- Pe(() => {
2272
- if (!a || !_(p)) return;
2273
- const S = _(p).subscribe(() => {
2274
- O(o, _(p).isToolVisible(_(b)), !0);
3022
+ function Wr(e, t) {
3023
+ Tt(t, !0), Oi(e, aa);
3024
+ let r = W(t, "toolId", 7, "calculator-inline"), n = W(t, "targetToolId", 7, ""), i = W(t, "calculatorType", 7, "basic"), a = W(t, "availableTypes", 7, "basic,scientific,graphing"), o = W(t, "size", 7, "md");
3025
+ const s = typeof window < "u", l = [
3026
+ "basic",
3027
+ "scientific",
3028
+ "graphing"
3029
+ ], v = {
3030
+ basic: {
3031
+ name: "tools.calculator.nameBasic",
3032
+ opened: "tools.calculator.openedBasic",
3033
+ closed: "tools.calculator.closedBasic"
3034
+ },
3035
+ scientific: {
3036
+ name: "tools.calculator.nameScientific",
3037
+ opened: "tools.calculator.openedScientific",
3038
+ closed: "tools.calculator.closedScientific"
3039
+ },
3040
+ graphing: {
3041
+ name: "tools.calculator.nameGraphing",
3042
+ opened: "tools.calculator.openedGraphing",
3043
+ closed: "tools.calculator.closedGraphing"
3044
+ }
3045
+ };
3046
+ let _ = /* @__PURE__ */ F(null), f = /* @__PURE__ */ F(null), u = /* @__PURE__ */ F(!1), c = /* @__PURE__ */ F(""), d = null, h = null;
3047
+ const S = /* @__PURE__ */ ee(() => na(p(f))), A = /* @__PURE__ */ ee(() => p(f)?.toolCoordinator), P = /* @__PURE__ */ ee(() => new Set(a().split(",").map((w) => w.trim()).filter(Boolean))), j = /* @__PURE__ */ ee(() => p(P).has(i()) ? i() : "basic"), T = /* @__PURE__ */ ee(() => l.includes(p(j)) ? p(j) : "basic"), B = /* @__PURE__ */ ee(() => v[p(T)]), X = /* @__PURE__ */ ee(() => p(S).t(p(B).name)), at = /* @__PURE__ */ ee(() => n() || an(r())), Kr = /* @__PURE__ */ ee(() => o() === "sm" ? "pie-tool-calculator-inline__button--sm" : o() === "lg" ? "pie-tool-calculator-inline__button--lg" : "pie-tool-calculator-inline__button--md");
3048
+ ot(() => {
3049
+ if (p(_)) return nn(p(_), (w) => {
3050
+ D(f, w, !0);
2275
3051
  });
2276
- return O(o, _(p).isToolVisible(_(b)), !0), S;
2277
- }), Pe(() => () => {
2278
- _(p) && r() && _(p).unregisterTool(r());
3052
+ }), ot(() => {
3053
+ const w = p(A), O = r(), M = p(_);
3054
+ if (!(!w || !O || !M)) return Le(() => {
3055
+ d && h && (d !== w || h !== O) && (d.unregisterTool(h), d = null, h = null), d || (w.registerTool(O, "Calculator Inline", M, rn.TOOL), d = w, h = O);
3056
+ }), () => {
3057
+ d === w && h === O && (d.unregisterTool(h), d = null, h = null);
3058
+ };
3059
+ }), ot(() => {
3060
+ const w = p(A), O = p(at);
3061
+ if (!s || !w) return;
3062
+ const M = () => {
3063
+ D(u, w.isToolVisible(O), !0);
3064
+ }, Fe = w.subscribe(M);
3065
+ return Le(M), Fe;
2279
3066
  });
2280
- function x() {
2281
- _(p) && (_(p).toggleTool(_(b)), O(u, _(o) ? `${_(h)} calculator closed` : `${_(h)} calculator opened`, !0));
3067
+ function Jr() {
3068
+ if (!p(A)) return;
3069
+ const w = p(A).isToolVisible(p(at));
3070
+ p(A).toggleTool(p(at)), D(c, p(S).t(w ? p(B).closed : p(B).opened), !0);
2282
3071
  }
2283
- const q = /* @__PURE__ */ be(() => l() === "sm" ? "pie-tool-calculator-inline__button--sm" : l() === "lg" ? "pie-tool-calculator-inline__button--lg" : "pie-tool-calculator-inline__button--md");
2284
- var U = {
3072
+ var Qr = {
3073
+ get toolId() {
3074
+ return r();
3075
+ },
3076
+ set toolId(w = "calculator-inline") {
3077
+ r(w), V();
3078
+ },
3079
+ get targetToolId() {
3080
+ return n();
3081
+ },
3082
+ set targetToolId(w = "") {
3083
+ n(w), V();
3084
+ },
3085
+ get calculatorType() {
3086
+ return i();
3087
+ },
3088
+ set calculatorType(w = "basic") {
3089
+ i(w), V();
3090
+ },
3091
+ get availableTypes() {
3092
+ return a();
3093
+ },
3094
+ set availableTypes(w = "basic,scientific,graphing") {
3095
+ a(w), V();
3096
+ },
3097
+ get size() {
3098
+ return o();
3099
+ },
3100
+ set size(w = "md") {
3101
+ o(w), V();
3102
+ }
3103
+ }, Ot = xi(), Zr = ai(Ot), Xr = (w) => {
3104
+ var O = ia(), M = Yt(O);
3105
+ let Fe;
3106
+ var Ht = si(M, 2), en = Yt(Ht, !0);
3107
+ jt(Ht), jt(O), qi(O, (tn) => D(_, tn), () => p(_)), pi(() => {
3108
+ Fe = Fi(M, 1, `pie-tool-calculator-inline__button ${p(Kr) ?? ""}`, "svelte-ar9a63", Fe, { "pie-tool-calculator-inline__button--active": p(u) }), Be(M, "aria-label", p(X)), Be(M, "aria-pressed", p(u)), Be(M, "title", p(X)), Be(M, "data-calculator-type", p(j)), M.disabled = !p(A), Li(en, p(c));
3109
+ }), bi("click", M, Jr), wt(w, O);
3110
+ };
3111
+ return Ni(Zr, (w) => {
3112
+ s && w(Xr);
3113
+ }), wt(e, Ot), xt(Qr);
3114
+ }
3115
+ Si(["click"]);
3116
+ Gr(Wr, {
3117
+ toolId: {},
3118
+ targetToolId: {},
3119
+ calculatorType: {},
3120
+ availableTypes: {},
3121
+ size: {}
3122
+ }, [], [], { mode: "open" });
3123
+ function sa(e, t) {
3124
+ Tt(t, !0);
3125
+ let r = W(t, "toolId", 7, "calculator-inline"), n = W(t, "targetToolId", 7, ""), i = W(t, "calculatorType", 7, "basic"), a = W(t, "availableTypes", 7, "basic,scientific,graphing"), o = W(t, "size", 7, "md");
3126
+ var s = {
2285
3127
  get toolId() {
2286
3128
  return r();
2287
3129
  },
2288
- set toolId(S = "calculator-inline") {
2289
- r(S), ue();
3130
+ set toolId(l = "calculator-inline") {
3131
+ r(l), V();
2290
3132
  },
2291
3133
  get targetToolId() {
2292
3134
  return n();
2293
3135
  },
2294
- set targetToolId(S = "") {
2295
- n(S), ue();
3136
+ set targetToolId(l = "") {
3137
+ n(l), V();
2296
3138
  },
2297
3139
  get calculatorType() {
2298
3140
  return i();
2299
3141
  },
2300
- set calculatorType(S = "basic") {
2301
- i(S), ue();
3142
+ set calculatorType(l = "basic") {
3143
+ i(l), V();
2302
3144
  },
2303
3145
  get availableTypes() {
2304
- return s();
3146
+ return a();
2305
3147
  },
2306
- set availableTypes(S = "basic,scientific,graphing") {
2307
- s(S), ue();
3148
+ set availableTypes(l = "basic,scientific,graphing") {
3149
+ a(l), V();
2308
3150
  },
2309
3151
  get size() {
2310
- return l();
3152
+ return o();
2311
3153
  },
2312
- set size(S = "md") {
2313
- l(S), ue();
2314
- }
2315
- }, E = oi(), G = Vn(E), Q = (S) => {
2316
- var He = Oi(), ee = Ht(He);
2317
- let Tt;
2318
- var St = Dn(ee, 2), Nr = Ht(St, !0);
2319
- Ot(St), Ot(He), Ti(He, (Hr) => O(f, Hr), () => _(f)), Zn(() => {
2320
- Tt = wi(ee, 1, `pie-tool-calculator-inline__button ${_(q) ?? ""}`, "svelte-qq14od", Tt, { "pie-tool-calculator-inline__button--active": _(o) }), De(ee, "aria-label", _(o) ? `Close ${_(h)} calculator` : `Open ${_(h)} calculator`), De(ee, "aria-pressed", _(o)), De(ee, "title", _(o) ? `Close ${_(h)} calculator` : `Open ${_(h)} calculator`), De(ee, "data-calculator-type", _(h)), ee.disabled = !_(p), vi(Nr, _(u));
2321
- }), ri("click", ee, x), ut(S, He);
3154
+ set size(l = "md") {
3155
+ o(l), V();
3156
+ }
2322
3157
  };
2323
- return gi(G, (S) => {
2324
- a && S(Q);
2325
- }), ut(e, E), Qt(U);
3158
+ return Wr(e, {
3159
+ get toolId() {
3160
+ return r();
3161
+ },
3162
+ get targetToolId() {
3163
+ return n();
3164
+ },
3165
+ get calculatorType() {
3166
+ return i();
3167
+ },
3168
+ get availableTypes() {
3169
+ return a();
3170
+ },
3171
+ get size() {
3172
+ return o();
3173
+ }
3174
+ }), xt(s);
2326
3175
  }
2327
- ni(["click"]);
2328
- customElements.define("pie-tool-calculator-inline", Mi(Ci, {
3176
+ customElements.define("pie-tool-calculator-inline", Gr(sa, {
2329
3177
  toolId: {
2330
3178
  attribute: "tool-id",
2331
3179
  type: "String"
@@ -2348,5 +3196,5 @@ customElements.define("pie-tool-calculator-inline", Mi(Ci, {
2348
3196
  }
2349
3197
  }, [], [], { mode: "open" }));
2350
3198
  export {
2351
- Ci as default
3199
+ sa as default
2352
3200
  };