@pie-players/pie-tool-line-reader 0.3.26 → 0.3.28

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.
Files changed (2) hide show
  1. package/dist/tool-line-reader.js +1119 -1061
  2. package/package.json +4 -4
@@ -1,15 +1,15 @@
1
1
  import { t as g } from "./defineProperty-CyepwRr5.js";
2
2
  if (typeof window < "u") {
3
- var zr, Vr;
4
- ((zr = (Vr = window).__svelte ?? (Vr.__svelte = {})).v ?? (zr.v = /* @__PURE__ */ new Set())).add("5");
3
+ var Wr, Fr;
4
+ ((Wr = (Fr = window).__svelte ?? (Fr.__svelte = {})).v ?? (Wr.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
- var Xe = {}, N = Symbol(), Va = Symbol("filename");
7
- var qn = Array.isArray, Yn = Array.prototype.indexOf, Je = Array.prototype.includes, Kn = Array.from, Pt = Object.keys, xt = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, Xn = Object.getOwnPropertyDescriptors, Jn = Object.prototype, Qn = Array.prototype, Ti = Object.getPrototypeOf, Fr = Object.isExtensible, Zn = () => {
6
+ var Xe = {}, N = Symbol(), Ua = Symbol("filename");
7
+ var Jn = Array.isArray, Qn = Array.prototype.indexOf, Je = Array.prototype.includes, Zn = Array.from, Pt = Object.keys, xt = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, eo = Object.getOwnPropertyDescriptors, to = Object.prototype, ro = Array.prototype, $i = Object.getPrototypeOf, Hr = Object.isExtensible, io = () => {
8
8
  };
9
- function eo(e) {
9
+ function no(e) {
10
10
  for (var t = 0; t < e.length; t++) e[t]();
11
11
  }
12
- function ki() {
12
+ function Ii() {
13
13
  var e, t;
14
14
  return {
15
15
  promise: new Promise((r, i) => {
@@ -19,51 +19,51 @@ function ki() {
19
19
  reject: t
20
20
  };
21
21
  }
22
- var Fa = 1 << 24, K = 1024, le = 2048, Ve = 4096, vr = 8192, to = 16384, _r = 32768, Wr = 1 << 25, gr = 65536, Wa = 1 << 17, Ba = 1 << 18, it = 1 << 19, ro = 1 << 20, Ha = 1 << 25, pt = 65536, Br = 1 << 21, io = 1 << 22, Rt = 1 << 23, lt = Symbol("$state"), Si = Symbol("legacy props"), no = Symbol(""), oo = Symbol("proxy path"), pe = new class extends Error {
22
+ var Ga = 1 << 24, K = 1024, le = 2048, Ve = 4096, gr = 8192, oo = 16384, mr = 32768, Br = 1 << 25, yr = 65536, qa = 1 << 17, Ya = 1 << 18, it = 1 << 19, so = 1 << 20, Ka = 1 << 25, pt = 65536, Ur = 1 << 21, ao = 1 << 22, Lt = 1 << 23, lt = Symbol("$state"), Ai = Symbol("legacy props"), lo = Symbol(""), co = Symbol("proxy path"), pe = new class extends Error {
23
23
  constructor(...t) {
24
24
  super(...t), g(this, "name", "StaleReactionError"), g(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
25
25
  }
26
- }(), so = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
27
- function ao(e) {
26
+ }(), uo = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
27
+ function fo(e) {
28
28
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
29
29
  }
30
- function lo() {
30
+ function ho() {
31
31
  throw new Error("https://svelte.dev/e/async_derived_orphan");
32
32
  }
33
- function co(e) {
33
+ function po(e) {
34
34
  throw new Error("https://svelte.dev/e/effect_in_teardown");
35
35
  }
36
- function uo() {
36
+ function vo() {
37
37
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
38
38
  }
39
- function fo(e) {
39
+ function _o(e) {
40
40
  throw new Error("https://svelte.dev/e/effect_orphan");
41
41
  }
42
- function ho() {
42
+ function go() {
43
43
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
44
44
  }
45
- function po() {
45
+ function mo() {
46
46
  throw new Error("https://svelte.dev/e/hydration_failed");
47
47
  }
48
- function vo(e) {
48
+ function yo(e) {
49
49
  throw new Error("https://svelte.dev/e/props_invalid_value");
50
50
  }
51
- function _o() {
51
+ function bo() {
52
52
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
53
53
  }
54
- function go() {
54
+ function wo() {
55
55
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
56
56
  }
57
- function mo() {
57
+ function To() {
58
58
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
59
59
  }
60
- function bo() {
60
+ function ko() {
61
61
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
62
62
  }
63
- function zt(e) {
63
+ function Vt(e) {
64
64
  console.warn("https://svelte.dev/e/hydration_mismatch");
65
65
  }
66
- function yo() {
66
+ function So() {
67
67
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
68
68
  }
69
69
  var O = !1;
@@ -73,26 +73,26 @@ function qe(e) {
73
73
  var I;
74
74
  function re(e) {
75
75
  if (e === null)
76
- throw zt(), Xe;
76
+ throw Vt(), Xe;
77
77
  return I = e;
78
78
  }
79
- function mr() {
79
+ function br() {
80
80
  return re(/* @__PURE__ */ me(I));
81
81
  }
82
- function Hr(e) {
82
+ function Gr(e) {
83
83
  if (O) {
84
84
  if (/* @__PURE__ */ me(I) !== null)
85
- throw zt(), Xe;
85
+ throw Vt(), Xe;
86
86
  I = e;
87
87
  }
88
88
  }
89
- function $i(e = 1) {
89
+ function Ei(e = 1) {
90
90
  if (O) {
91
91
  for (var t = e, r = I; t--; ) r = /* @__PURE__ */ me(r);
92
92
  I = r;
93
93
  }
94
94
  }
95
- function Ii(e = !0) {
95
+ function Mi(e = !0) {
96
96
  for (var t = 0, r = I; ; ) {
97
97
  if (r.nodeType === 8) {
98
98
  var i = r.data;
@@ -105,34 +105,34 @@ function Ii(e = !0) {
105
105
  e && r.remove(), r = n;
106
106
  }
107
107
  }
108
- function wo(e) {
108
+ function $o(e) {
109
109
  if (!e || e.nodeType !== 8)
110
- throw zt(), Xe;
110
+ throw Vt(), Xe;
111
111
  return e.data;
112
112
  }
113
- function Ai(e) {
113
+ function Oi(e) {
114
114
  return e === this.v;
115
115
  }
116
- function To(e, t) {
116
+ function Io(e, t) {
117
117
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
118
118
  }
119
- function Ei(e) {
120
- return !To(e, this.v);
119
+ function Pi(e) {
120
+ return !Io(e, this.v);
121
121
  }
122
122
  var Ee = !1, vt = !1;
123
- function Ur(e, t) {
124
- return e.label = t, ko(e.v, t), e;
123
+ function qr(e, t) {
124
+ return e.label = t, Ao(e.v, t), e;
125
125
  }
126
- function ko(e, t) {
127
- return e?.[oo]?.(t), e;
126
+ function Ao(e, t) {
127
+ return e?.[co]?.(t), e;
128
128
  }
129
- var R = null;
129
+ var L = null;
130
130
  function Qe(e) {
131
- R = e;
131
+ L = e;
132
132
  }
133
- function Mi(e, t = !1, r) {
134
- R = {
135
- p: R,
133
+ function xi(e, t = !1, r) {
134
+ L = {
135
+ p: L,
136
136
  i: !1,
137
137
  c: null,
138
138
  e: null,
@@ -146,38 +146,38 @@ function Mi(e, t = !1, r) {
146
146
  } : null
147
147
  };
148
148
  }
149
- function Oi(e) {
150
- var t = R, r = t.e;
149
+ function Li(e) {
150
+ var t = L, r = t.e;
151
151
  if (r !== null) {
152
152
  t.e = null;
153
- for (var i of r) rn(i);
153
+ for (var i of r) sn(i);
154
154
  }
155
- return e !== void 0 && (t.x = e), t.i = !0, R = t.p, e ?? {};
155
+ return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
156
156
  }
157
157
  function _t() {
158
- return !vt || R !== null && R.l === null;
158
+ return !vt || L !== null && L.l === null;
159
159
  }
160
- var Re = [];
161
- function Pi() {
162
- var e = Re;
163
- Re = [], eo(e);
160
+ var Le = [];
161
+ function Ri() {
162
+ var e = Le;
163
+ Le = [], no(e);
164
164
  }
165
165
  function Ze(e) {
166
- if (Re.length === 0 && !ct) {
167
- var t = Re;
166
+ if (Le.length === 0 && !ct) {
167
+ var t = Le;
168
168
  queueMicrotask(() => {
169
- t === Re && Pi();
169
+ t === Le && Ri();
170
170
  });
171
171
  }
172
- Re.push(e);
172
+ Le.push(e);
173
173
  }
174
- function So() {
175
- for (; Re.length > 0; ) Pi();
174
+ function Eo() {
175
+ for (; Le.length > 0; ) Ri();
176
176
  }
177
- function xi(e) {
177
+ function Ci(e) {
178
178
  var t = k;
179
179
  if (t === null)
180
- return S.f |= Rt, e;
180
+ return S.f |= Lt, e;
181
181
  if (!(t.f & 32768) && !(t.f & 4))
182
182
  throw e;
183
183
  $e(e, t);
@@ -197,23 +197,23 @@ function $e(e, t) {
197
197
  }
198
198
  throw e;
199
199
  }
200
- var $o = ~(le | Ve | K);
201
- function C(e, t) {
202
- e.f = e.f & $o | t;
200
+ var Mo = ~(le | Ve | K);
201
+ function R(e, t) {
202
+ e.f = e.f & Mo | t;
203
203
  }
204
- function br(e) {
205
- e.f & 512 || e.deps === null ? C(e, K) : C(e, Ve);
204
+ function wr(e) {
205
+ e.f & 512 || e.deps === null ? R(e, K) : R(e, Ve);
206
206
  }
207
- function Ri(e) {
207
+ function Ni(e) {
208
208
  if (e !== null)
209
209
  for (const t of e)
210
- !(t.f & 2) || !(t.f & 65536) || (t.f ^= pt, Ri(t.deps));
210
+ !(t.f & 2) || !(t.f & 65536) || (t.f ^= pt, Ni(t.deps));
211
211
  }
212
- function Ci(e, t, r) {
213
- e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), Ri(e.deps), C(e, K);
212
+ function Di(e, t, r) {
213
+ e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), Ni(e.deps), R(e, K);
214
214
  }
215
- var Io = !1, wt = !1;
216
- function Ao(e) {
215
+ var Oo = !1, wt = !1;
216
+ function Po(e) {
217
217
  var t = wt;
218
218
  try {
219
219
  return wt = !1, [e(), wt];
@@ -221,14 +221,14 @@ function Ao(e) {
221
221
  wt = t;
222
222
  }
223
223
  }
224
- function Li(e, t) {
224
+ function ji(e, t) {
225
225
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
226
226
  }
227
- function yr(e, t) {
228
- Li(e, t), t.add(e);
227
+ function Tr(e, t) {
228
+ ji(e, t), t.add(e);
229
229
  }
230
230
  function T(e, t, r) {
231
- Li(e, t), t.set(e, r);
231
+ ji(e, t), t.set(e, r);
232
232
  }
233
233
  function M(e, t, r) {
234
234
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
@@ -237,13 +237,13 @@ function M(e, t, r) {
237
237
  function l(e, t) {
238
238
  return e.get(M(e, t));
239
239
  }
240
- function b(e, t, r) {
240
+ function y(e, t, r) {
241
241
  return e.set(M(e, t), r), r;
242
242
  }
243
- var Ni, ve = /* @__PURE__ */ new Set(), $ = null, Gr = null, z = null, nr = null, ct = !1, Yt = !1, et = null, Ct = null, Di = 0;
244
- var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), Fe = class ji {
243
+ var zi, ve = /* @__PURE__ */ new Set(), $ = null, Yr = null, z = null, sr = null, ct = !1, Kt = !1, et = null, Rt = null, Vi = 0;
244
+ var xo = 1, Ct = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), We = class Wi {
245
245
  constructor() {
246
- yr(this, ne), g(this, "id", Eo++), g(this, "current", /* @__PURE__ */ new Map()), g(this, "previous", /* @__PURE__ */ new Map()), T(this, Lt, /* @__PURE__ */ new Set()), T(this, Tt, /* @__PURE__ */ new Set()), T(this, Be, 0), T(this, He, 0), T(this, It, null), T(this, Q, []), T(this, ft, /* @__PURE__ */ new Set()), T(this, Ne, /* @__PURE__ */ new Set()), T(this, xe, /* @__PURE__ */ new Map()), g(this, "is_fork", !1), T(this, kt, !1);
246
+ Tr(this, ne), g(this, "id", xo++), g(this, "current", /* @__PURE__ */ new Map()), g(this, "previous", /* @__PURE__ */ new Map()), T(this, Ct, /* @__PURE__ */ new Set()), T(this, Tt, /* @__PURE__ */ new Set()), T(this, He, 0), T(this, Be, 0), T(this, It, null), T(this, Q, []), T(this, ft, /* @__PURE__ */ new Set()), T(this, Ne, /* @__PURE__ */ new Set()), T(this, xe, /* @__PURE__ */ new Map()), g(this, "is_fork", !1), T(this, kt, !1);
247
247
  }
248
248
  skip_effect(t) {
249
249
  l(xe, this).has(t) || l(xe, this).set(t, {
@@ -256,9 +256,9 @@ var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap
256
256
  if (r) {
257
257
  l(xe, this).delete(t);
258
258
  for (var i of r.d)
259
- C(i, le), this.schedule(i);
259
+ R(i, le), this.schedule(i);
260
260
  for (i of r.m)
261
- C(i, Ve), this.schedule(i);
261
+ R(i, Ve), this.schedule(i);
262
262
  }
263
263
  }
264
264
  capture(t, r) {
@@ -273,9 +273,9 @@ var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap
273
273
  flush() {
274
274
  var t = null;
275
275
  try {
276
- Yt = !0, $ = this, M(ne, this, zi).call(this);
276
+ Kt = !0, $ = this, M(ne, this, Fi).call(this);
277
277
  } finally {
278
- Di = 0, nr = null, et = null, Ct = null, Yt = !1, $ = null, z = null, Ae.clear();
278
+ Vi = 0, sr = null, et = null, Rt = null, Kt = !1, $ = null, z = null, Ae.clear();
279
279
  }
280
280
  }
281
281
  discard() {
@@ -283,11 +283,11 @@ var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap
283
283
  l(Tt, this).clear(), ve.delete(this);
284
284
  }
285
285
  increment(t) {
286
- b(Be, this, l(Be, this) + 1), t && b(He, this, l(He, this) + 1);
286
+ y(He, this, l(He, this) + 1), t && y(Be, this, l(Be, this) + 1);
287
287
  }
288
288
  decrement(t, r) {
289
- b(Be, this, l(Be, this) - 1), t && b(He, this, l(He, this) - 1), !(l(kt, this) || r) && (b(kt, this, !0), Ze(() => {
290
- b(kt, this, !1), this.flush();
289
+ y(He, this, l(He, this) - 1), t && y(Be, this, l(Be, this) - 1), !(l(kt, this) || r) && (y(kt, this, !0), Ze(() => {
290
+ y(kt, this, !1), this.flush();
291
291
  }));
292
292
  }
293
293
  transfer_effects(t, r) {
@@ -296,18 +296,18 @@ var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap
296
296
  t.clear(), r.clear();
297
297
  }
298
298
  oncommit(t) {
299
- l(Lt, this).add(t);
299
+ l(Ct, this).add(t);
300
300
  }
301
301
  ondiscard(t) {
302
302
  l(Tt, this).add(t);
303
303
  }
304
304
  settled() {
305
- return (l(It, this) ?? b(It, this, ki())).promise;
305
+ return (l(It, this) ?? y(It, this, Ii())).promise;
306
306
  }
307
307
  static ensure() {
308
308
  if ($ === null) {
309
- const t = $ = new ji();
310
- Yt || (ve.add($), ct || Ze(() => {
309
+ const t = $ = new Wi();
310
+ Kt || (ve.add($), ct || Ze(() => {
311
311
  $ === t && t.flush();
312
312
  }));
313
313
  }
@@ -324,14 +324,14 @@ var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap
324
324
  for (const [r, i] of t.previous) z.has(r) || z.set(r, i);
325
325
  }
326
326
  schedule(t) {
327
- if (nr = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
327
+ if (sr = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
328
328
  t.b.defer_effect(t);
329
329
  return;
330
330
  }
331
331
  for (var r = t; r.parent !== null; ) {
332
332
  r = r.parent;
333
333
  var i = r.f;
334
- if (et !== null && r === k && (Ee || (S === null || !(S.f & 2)) && !Io))
334
+ if (et !== null && r === k && (Ee || (S === null || !(S.f & 2)) && !Oo))
335
335
  return;
336
336
  if (i & 96) {
337
337
  if (!(i & 1024)) return;
@@ -341,134 +341,134 @@ var Eo = 1, Lt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap
341
341
  l(Q, this).push(r);
342
342
  }
343
343
  };
344
- Ni = Fe;
345
- function qr() {
346
- return this.is_fork || l(He, this) > 0;
344
+ zi = We;
345
+ function Kr() {
346
+ return this.is_fork || l(Be, this) > 0;
347
347
  }
348
- function zi() {
349
- if (Di++ > 1e3 && (ve.delete(this), Oo()), !M(ne, this, qr).call(this)) {
350
- for (const s of l(ft, this))
351
- l(Ne, this).delete(s), C(s, le), this.schedule(s);
352
- for (const s of l(Ne, this))
353
- C(s, Ve), this.schedule(s);
348
+ function Fi() {
349
+ if (Vi++ > 1e3 && (ve.delete(this), Ro()), !M(ne, this, Kr).call(this)) {
350
+ for (const a of l(ft, this))
351
+ l(Ne, this).delete(a), R(a, le), this.schedule(a);
352
+ for (const a of l(Ne, this))
353
+ R(a, Ve), this.schedule(a);
354
354
  }
355
355
  const e = l(Q, this);
356
- b(Q, this, []), this.apply();
357
- var t = et = [], r = [], i = Ct = [];
358
- for (const s of e) try {
359
- M(ne, this, Vi).call(this, s, t, r);
360
- } catch (a) {
361
- throw Hi(s), a;
356
+ y(Q, this, []), this.apply();
357
+ var t = et = [], r = [], i = Rt = [];
358
+ for (const a of e) try {
359
+ M(ne, this, Hi).call(this, a, t, r);
360
+ } catch (s) {
361
+ throw qi(a), s;
362
362
  }
363
363
  if ($ = null, i.length > 0) {
364
- var n = Ni.ensure();
365
- for (const s of i) n.schedule(s);
364
+ var n = zi.ensure();
365
+ for (const a of i) n.schedule(a);
366
366
  }
367
- if (et = null, Ct = null, M(ne, this, qr).call(this)) {
368
- M(ne, this, Yr).call(this, r), M(ne, this, Yr).call(this, t);
369
- for (const [s, a] of l(xe, this)) Bi(s, a);
367
+ if (et = null, Rt = null, M(ne, this, Kr).call(this)) {
368
+ M(ne, this, Xr).call(this, r), M(ne, this, Xr).call(this, t);
369
+ for (const [a, s] of l(xe, this)) Gi(a, s);
370
370
  } else {
371
- l(Be, this) === 0 && ve.delete(this), l(ft, this).clear(), l(Ne, this).clear();
372
- for (const s of l(Lt, this)) s(this);
373
- l(Lt, this).clear(), Gr = this, Kr(r), Kr(t), Gr = null, l(It, this)?.resolve();
371
+ l(He, this) === 0 && ve.delete(this), l(ft, this).clear(), l(Ne, this).clear();
372
+ for (const a of l(Ct, this)) a(this);
373
+ l(Ct, this).clear(), Yr = this, Jr(r), Jr(t), Yr = null, l(It, this)?.resolve();
374
374
  }
375
375
  var o = $;
376
376
  if (l(Q, this).length > 0) {
377
- const s = o ?? (o = this);
378
- l(Q, s).push(...l(Q, this).filter((a) => !l(Q, s).includes(a)));
377
+ const a = o ?? (o = this);
378
+ l(Q, a).push(...l(Q, this).filter((s) => !l(Q, a).includes(s)));
379
379
  }
380
- o !== null && (ve.add(o), M(ne, o, zi).call(o)), ve.has(this) || M(ne, this, Mo).call(this);
380
+ o !== null && (ve.add(o), M(ne, o, Fi).call(o)), ve.has(this) || M(ne, this, Lo).call(this);
381
381
  }
382
- function Vi(e, t, r) {
382
+ function Hi(e, t, r) {
383
383
  e.f ^= K;
384
384
  for (var i = e.first; i !== null; ) {
385
385
  var n = i.f, o = (n & 96) !== 0;
386
386
  if (!(o && n & 1024 || n & 8192 || l(xe, this).has(i)) && i.fn !== null) {
387
- o ? i.f ^= K : n & 4 ? t.push(i) : Ee && n & 16777224 ? r.push(i) : bt(i) && (n & 16 && l(Ne, this).add(i), rt(i));
388
- var s = i.first;
389
- if (s !== null) {
390
- i = s;
387
+ o ? i.f ^= K : n & 4 ? t.push(i) : Ee && n & 16777224 ? r.push(i) : yt(i) && (n & 16 && l(Ne, this).add(i), rt(i));
388
+ var a = i.first;
389
+ if (a !== null) {
390
+ i = a;
391
391
  continue;
392
392
  }
393
393
  }
394
394
  for (; i !== null; ) {
395
- var a = i.next;
396
- if (a !== null) {
397
- i = a;
395
+ var s = i.next;
396
+ if (s !== null) {
397
+ i = s;
398
398
  break;
399
399
  }
400
400
  i = i.parent;
401
401
  }
402
402
  }
403
403
  }
404
- function Yr(e) {
405
- for (var t = 0; t < e.length; t += 1) Ci(e[t], l(ft, this), l(Ne, this));
404
+ function Xr(e) {
405
+ for (var t = 0; t < e.length; t += 1) Di(e[t], l(ft, this), l(Ne, this));
406
406
  }
407
- function Mo() {
408
- for (const a of ve) {
409
- var e = a.id < this.id, t = [];
407
+ function Lo() {
408
+ for (const s of ve) {
409
+ var e = s.id < this.id, t = [];
410
410
  for (const [c, h] of this.current) {
411
- if (a.current.has(c)) if (e && h !== a.current.get(c)) a.current.set(c, h);
411
+ if (s.current.has(c)) if (e && h !== s.current.get(c)) s.current.set(c, h);
412
412
  else continue;
413
413
  t.push(c);
414
414
  }
415
- var r = [...a.current.keys()].filter((c) => !this.current.has(c));
415
+ var r = [...s.current.keys()].filter((c) => !this.current.has(c));
416
416
  if (r.length === 0)
417
- e && a.discard();
417
+ e && s.discard();
418
418
  else if (t.length > 0) {
419
- a.activate();
419
+ s.activate();
420
420
  var i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
421
- for (var o of t) Fi(o, r, i, n);
422
- if (l(Q, a).length > 0) {
423
- a.apply();
424
- for (var s of l(Q, a)) M(ne, a, Vi).call(a, s, [], []);
425
- b(Q, a, []);
421
+ for (var o of t) Bi(o, r, i, n);
422
+ if (l(Q, s).length > 0) {
423
+ s.apply();
424
+ for (var a of l(Q, s)) M(ne, s, Hi).call(s, a, [], []);
425
+ y(Q, s, []);
426
426
  }
427
- a.deactivate();
427
+ s.deactivate();
428
428
  }
429
429
  }
430
430
  }
431
- function or(e) {
431
+ function ar(e) {
432
432
  var t = ct;
433
433
  ct = !0;
434
434
  try {
435
435
  var r;
436
436
  for (e && ($ !== null && !$.is_fork && $.flush(), r = e()); ; ) {
437
- if (So(), $ === null) return r;
437
+ if (Eo(), $ === null) return r;
438
438
  $.flush();
439
439
  }
440
440
  } finally {
441
441
  ct = t;
442
442
  }
443
443
  }
444
- function Oo() {
444
+ function Ro() {
445
445
  if (0) {
446
446
  var e;
447
447
  for (const r of $.current.keys()) for (const [i, n] of r.updated ?? [])
448
448
  var t;
449
449
  }
450
450
  try {
451
- ho();
451
+ go();
452
452
  } catch (r) {
453
- $e(r, nr);
453
+ $e(r, sr);
454
454
  }
455
455
  }
456
456
  var oe = null;
457
- function Kr(e) {
457
+ function Jr(e) {
458
458
  var t = e.length;
459
459
  if (t !== 0) {
460
460
  for (var r = 0; r < t; ) {
461
461
  var i = e[r++];
462
- if (!(i.f & 24576) && bt(i) && (oe = /* @__PURE__ */ new Set(), rt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && an(i), oe?.size > 0)) {
462
+ if (!(i.f & 24576) && yt(i) && (oe = /* @__PURE__ */ new Set(), rt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && un(i), oe?.size > 0)) {
463
463
  Ae.clear();
464
464
  for (const n of oe) {
465
465
  if (n.f & 24576) continue;
466
466
  const o = [n];
467
- let s = n.parent;
468
- for (; s !== null; )
469
- oe.has(s) && (oe.delete(s), o.push(s)), s = s.parent;
470
- for (let a = o.length - 1; a >= 0; a--) {
471
- const c = o[a];
467
+ let a = n.parent;
468
+ for (; a !== null; )
469
+ oe.has(a) && (oe.delete(a), o.push(a)), a = a.parent;
470
+ for (let s = o.length - 1; s >= 0; s--) {
471
+ const c = o[s];
472
472
  c.f & 24576 || rt(c);
473
473
  }
474
474
  }
@@ -478,73 +478,73 @@ function Kr(e) {
478
478
  oe = null;
479
479
  }
480
480
  }
481
- function Fi(e, t, r, i) {
481
+ function Bi(e, t, r, i) {
482
482
  if (!r.has(e) && (r.add(e), e.reactions !== null))
483
483
  for (const n of e.reactions) {
484
484
  const o = n.f;
485
- o & 2 ? Fi(n, t, r, i) : o & 4194320 && !(o & 2048) && Wi(n, t, i) && (C(n, le), wr(n));
485
+ o & 2 ? Bi(n, t, r, i) : o & 4194320 && !(o & 2048) && Ui(n, t, i) && (R(n, le), kr(n));
486
486
  }
487
487
  }
488
- function Wi(e, t, r) {
488
+ function Ui(e, t, r) {
489
489
  const i = r.get(e);
490
490
  if (i !== void 0) return i;
491
491
  if (e.deps !== null) for (const n of e.deps) {
492
492
  if (Je.call(t, n)) return !0;
493
- if (n.f & 2 && Wi(n, t, r))
493
+ if (n.f & 2 && Ui(n, t, r))
494
494
  return r.set(n, !0), !0;
495
495
  }
496
496
  return r.set(e, !1), !1;
497
497
  }
498
- function wr(e) {
498
+ function kr(e) {
499
499
  $.schedule(e);
500
500
  }
501
- function Bi(e, t) {
501
+ function Gi(e, t) {
502
502
  if (!(e.f & 32 && e.f & 1024)) {
503
- e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), C(e, K);
503
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), R(e, K);
504
504
  for (var r = e.first; r !== null; )
505
- Bi(r, t), r = r.next;
505
+ Gi(r, t), r = r.next;
506
506
  }
507
507
  }
508
- function Hi(e) {
509
- C(e, K);
508
+ function qi(e) {
509
+ R(e, K);
510
510
  for (var t = e.first; t !== null; )
511
- Hi(t), t = t.next;
511
+ qi(t), t = t.next;
512
512
  }
513
- function Po(e) {
513
+ function Co(e) {
514
514
  let t = 0, r = gt(0), i;
515
515
  return () => {
516
- Ir() && (u(r), Ar(() => (t === 0 && (i = Ft(() => e(() => ut(r)))), t += 1, () => {
516
+ Er() && (d(r), Mr(() => (t === 0 && (i = Ft(() => e(() => ut(r)))), t += 1, () => {
517
517
  Ze(() => {
518
518
  t -= 1, t === 0 && (i?.(), i = void 0, ut(r));
519
519
  });
520
520
  })));
521
521
  };
522
522
  }
523
- var xo = gr | it;
524
- function Ro(e, t, r, i) {
525
- new Co(e, t, r, i);
523
+ var No = yr | it;
524
+ function Do(e, t, r, i) {
525
+ new jo(e, t, r, i);
526
526
  }
527
- var Z = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), Co = class {
527
+ var Z = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), jo = class {
528
528
  constructor(e, t, r, i) {
529
- yr(this, D), g(this, "parent", void 0), g(this, "is_pending", !1), g(this, "transform_error", void 0), T(this, Z, void 0), T(this, Kt, O ? I : null), T(this, Se, void 0), T(this, dt, void 0), T(this, G, void 0), T(this, Ie, null), T(this, ee, null), T(this, he, null), T(this, De, null), T(this, Ue, 0), T(this, je, 0), T(this, St, !1), T(this, sr, /* @__PURE__ */ new Set()), T(this, ar, /* @__PURE__ */ new Set()), T(this, Oe, null), T(this, Xr, Po(() => (b(Oe, this, gt(l(Ue, this))), () => {
530
- b(Oe, this, null);
531
- }))), b(Z, this, e), b(Se, this, t), b(dt, this, (n) => {
529
+ Tr(this, D), g(this, "parent", void 0), g(this, "is_pending", !1), g(this, "transform_error", void 0), T(this, Z, void 0), T(this, Xt, O ? I : null), T(this, Se, void 0), T(this, dt, void 0), T(this, G, void 0), T(this, Ie, null), T(this, ee, null), T(this, he, null), T(this, De, null), T(this, Ue, 0), T(this, je, 0), T(this, St, !1), T(this, lr, /* @__PURE__ */ new Set()), T(this, cr, /* @__PURE__ */ new Set()), T(this, Oe, null), T(this, Qr, Co(() => (y(Oe, this, gt(l(Ue, this))), () => {
530
+ y(Oe, this, null);
531
+ }))), y(Z, this, e), y(Se, this, t), y(dt, this, (n) => {
532
532
  var o = k;
533
533
  o.b = this, o.f |= 128, r(n);
534
- }), this.parent = k.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), b(G, this, on(() => {
534
+ }), this.parent = k.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), y(G, this, ln(() => {
535
535
  if (O) {
536
- const n = l(Kt, this);
537
- mr();
536
+ const n = l(Xt, this);
537
+ br();
538
538
  const o = n.data === "[!";
539
539
  if (n.data.startsWith("[?")) {
540
- const s = JSON.parse(n.data.slice(2));
541
- M(D, this, No).call(this, s);
542
- } else o ? M(D, this, Do).call(this) : M(D, this, Lo).call(this);
543
- } else M(D, this, Jr).call(this);
544
- }, xo)), O && b(Z, this, I);
540
+ const a = JSON.parse(n.data.slice(2));
541
+ M(D, this, Vo).call(this, a);
542
+ } else o ? M(D, this, Wo).call(this) : M(D, this, zo).call(this);
543
+ } else M(D, this, Zr).call(this);
544
+ }, No)), O && y(Z, this, I);
545
545
  }
546
546
  defer_effect(e) {
547
- Ci(e, l(sr, this), l(ar, this));
547
+ Di(e, l(lr, this), l(cr, this));
548
548
  }
549
549
  is_rendered() {
550
550
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -553,40 +553,40 @@ var Z = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), Se =
553
553
  return !!l(Se, this).pending;
554
554
  }
555
555
  update_pending_count(e, t) {
556
- M(D, this, Ui).call(this, e, t), b(Ue, this, l(Ue, this) + e), !(!l(Oe, this) || l(St, this)) && (b(St, this, !0), Ze(() => {
557
- b(St, this, !1), l(Oe, this) && Dt(l(Oe, this), l(Ue, this));
556
+ M(D, this, Yi).call(this, e, t), y(Ue, this, l(Ue, this) + e), !(!l(Oe, this) || l(St, this)) && (y(St, this, !0), Ze(() => {
557
+ y(St, this, !1), l(Oe, this) && Dt(l(Oe, this), l(Ue, this));
558
558
  }));
559
559
  }
560
560
  get_effect_pending() {
561
- return l(Xr, this).call(this), u(l(Oe, this));
561
+ return l(Qr, this).call(this), d(l(Oe, this));
562
562
  }
563
563
  error(e) {
564
564
  var t = l(Se, this).onerror;
565
565
  let r = l(Se, this).failed;
566
566
  if (!t && !r) throw e;
567
- l(Ie, this) && (V(l(Ie, this)), b(Ie, this, null)), l(ee, this) && (V(l(ee, this)), b(ee, this, null)), l(he, this) && (V(l(he, this)), b(he, this, null)), O && (re(l(Kt, this)), $i(), re(Ii()));
567
+ l(Ie, this) && (V(l(Ie, this)), y(Ie, this, null)), l(ee, this) && (V(l(ee, this)), y(ee, this, null)), l(he, this) && (V(l(he, this)), y(he, this, null)), O && (re(l(Xt, this)), Ei(), re(Mi()));
568
568
  var i = !1, n = !1;
569
569
  const o = () => {
570
570
  if (i) {
571
- yo();
571
+ So();
572
572
  return;
573
573
  }
574
- i = !0, n && bo(), l(he, this) !== null && mt(l(he, this), () => {
575
- b(he, this, null);
576
- }), M(D, this, lr).call(this, () => {
577
- M(D, this, Jr).call(this);
574
+ i = !0, n && ko(), l(he, this) !== null && mt(l(he, this), () => {
575
+ y(he, this, null);
576
+ }), M(D, this, ur).call(this, () => {
577
+ M(D, this, Zr).call(this);
578
578
  });
579
- }, s = (a) => {
579
+ }, a = (s) => {
580
580
  try {
581
- n = !0, t?.(a, o), n = !1;
581
+ n = !0, t?.(s, o), n = !1;
582
582
  } catch (c) {
583
583
  $e(c, l(G, this) && l(G, this).parent);
584
584
  }
585
- r && b(he, this, M(D, this, lr).call(this, () => {
585
+ r && y(he, this, M(D, this, ur).call(this, () => {
586
586
  try {
587
587
  return ge(() => {
588
588
  var c = k;
589
- c.b = this, c.f |= 128, r(l(Z, this), () => a, () => o);
589
+ c.b = this, c.f |= 128, r(l(Z, this), () => s, () => o);
590
590
  });
591
591
  } catch (c) {
592
592
  return $e(c, l(G, this).parent), null;
@@ -594,94 +594,94 @@ var Z = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), Se =
594
594
  }));
595
595
  };
596
596
  Ze(() => {
597
- var a;
597
+ var s;
598
598
  try {
599
- a = this.transform_error(e);
599
+ s = this.transform_error(e);
600
600
  } catch (c) {
601
601
  $e(c, l(G, this) && l(G, this).parent);
602
602
  return;
603
603
  }
604
- a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (c) => $e(c, l(G, this) && l(G, this).parent)) : s(a);
604
+ s !== null && typeof s == "object" && typeof s.then == "function" ? s.then(a, (c) => $e(c, l(G, this) && l(G, this).parent)) : a(s);
605
605
  });
606
606
  }
607
607
  };
608
- function Lo() {
608
+ function zo() {
609
609
  try {
610
- b(Ie, this, ge(() => l(dt, this).call(this, l(Z, this))));
610
+ y(Ie, this, ge(() => l(dt, this).call(this, l(Z, this))));
611
611
  } catch (e) {
612
612
  this.error(e);
613
613
  }
614
614
  }
615
- function No(e) {
615
+ function Vo(e) {
616
616
  const t = l(Se, this).failed;
617
- t && b(he, this, ge(() => {
617
+ t && y(he, this, ge(() => {
618
618
  t(l(Z, this), () => e, () => () => {
619
619
  });
620
620
  }));
621
621
  }
622
- function Do() {
622
+ function Wo() {
623
623
  const e = l(Se, this).pending;
624
- e && (this.is_pending = !0, b(ee, this, ge(() => e(l(Z, this)))), Ze(() => {
625
- var t = b(De, this, document.createDocumentFragment()), r = _e();
626
- t.append(r), b(Ie, this, M(D, this, lr).call(this, () => ge(() => l(dt, this).call(this, r)))), l(je, this) === 0 && (l(Z, this).before(t), b(De, this, null), mt(l(ee, this), () => {
627
- b(ee, this, null);
628
- }), M(D, this, Tr).call(this, $));
624
+ e && (this.is_pending = !0, y(ee, this, ge(() => e(l(Z, this)))), Ze(() => {
625
+ var t = y(De, this, document.createDocumentFragment()), r = _e();
626
+ t.append(r), y(Ie, this, M(D, this, ur).call(this, () => ge(() => l(dt, this).call(this, r)))), l(je, this) === 0 && (l(Z, this).before(t), y(De, this, null), mt(l(ee, this), () => {
627
+ y(ee, this, null);
628
+ }), M(D, this, Sr).call(this, $));
629
629
  }));
630
630
  }
631
- function Jr() {
631
+ function Zr() {
632
632
  try {
633
- if (this.is_pending = this.has_pending_snippet(), b(je, this, 0), b(Ue, this, 0), b(Ie, this, ge(() => {
633
+ if (this.is_pending = this.has_pending_snippet(), y(je, this, 0), y(Ue, this, 0), y(Ie, this, ge(() => {
634
634
  l(dt, this).call(this, l(Z, this));
635
635
  })), l(je, this) > 0) {
636
- var e = b(De, this, document.createDocumentFragment());
637
- un(l(Ie, this), e);
636
+ var e = y(De, this, document.createDocumentFragment());
637
+ hn(l(Ie, this), e);
638
638
  const t = l(Se, this).pending;
639
- b(ee, this, ge(() => t(l(Z, this))));
640
- } else M(D, this, Tr).call(this, $);
639
+ y(ee, this, ge(() => t(l(Z, this))));
640
+ } else M(D, this, Sr).call(this, $);
641
641
  } catch (t) {
642
642
  this.error(t);
643
643
  }
644
644
  }
645
- function Tr(e) {
646
- this.is_pending = !1, e.transfer_effects(l(sr, this), l(ar, this));
645
+ function Sr(e) {
646
+ this.is_pending = !1, e.transfer_effects(l(lr, this), l(cr, this));
647
647
  }
648
- function lr(e) {
649
- var t = k, r = S, i = R;
648
+ function ur(e) {
649
+ var t = k, r = S, i = L;
650
650
  ae(l(G, this)), X(l(G, this)), Qe(l(G, this).ctx);
651
651
  try {
652
- return Fe.ensure(), e();
652
+ return We.ensure(), e();
653
653
  } catch (n) {
654
- return xi(n), null;
654
+ return Ci(n), null;
655
655
  } finally {
656
656
  ae(t), X(r), Qe(i);
657
657
  }
658
658
  }
659
- function Ui(e, t) {
659
+ function Yi(e, t) {
660
660
  if (!this.has_pending_snippet()) {
661
661
  if (this.parent) {
662
662
  var r;
663
- M(D, r = this.parent, Ui).call(r, e, t);
663
+ M(D, r = this.parent, Yi).call(r, e, t);
664
664
  }
665
665
  return;
666
666
  }
667
- b(je, this, l(je, this) + e), l(je, this) === 0 && (M(D, this, Tr).call(this, t), l(ee, this) && mt(l(ee, this), () => {
668
- b(ee, this, null);
669
- }), l(De, this) && (l(Z, this).before(l(De, this)), b(De, this, null)));
667
+ y(je, this, l(je, this) + e), l(je, this) === 0 && (M(D, this, Sr).call(this, t), l(ee, this) && mt(l(ee, this), () => {
668
+ y(ee, this, null);
669
+ }), l(De, this) && (l(Z, this).before(l(De, this)), y(De, this, null)));
670
670
  }
671
- function jo(e, t, r, i) {
672
- const n = _t() ? Vt : qi;
671
+ function Fo(e, t, r, i) {
672
+ const n = _t() ? Wt : Xi;
673
673
  var o = e.filter((f) => !f.settled);
674
674
  if (r.length === 0 && o.length === 0) {
675
675
  i(t.map(n));
676
676
  return;
677
677
  }
678
- var s = k, a = zo(), c = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((f) => f.promise)) : null;
678
+ var a = k, s = Ho(), c = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((f) => f.promise)) : null;
679
679
  function h(f) {
680
- a();
680
+ s();
681
681
  try {
682
682
  i(f);
683
683
  } catch (v) {
684
- s.f & 16384 || $e(v, s);
684
+ a.f & 16384 || $e(v, a);
685
685
  }
686
686
  Nt();
687
687
  }
@@ -689,38 +689,38 @@ function jo(e, t, r, i) {
689
689
  c.then(() => h(t.map(n)));
690
690
  return;
691
691
  }
692
- var p = Gi();
693
- function d() {
694
- Promise.all(r.map((f) => /* @__PURE__ */ Vo(f))).then((f) => h([...t.map(n), ...f])).catch((f) => $e(f, s)).finally(() => p());
692
+ var u = Ki();
693
+ function p() {
694
+ Promise.all(r.map((f) => /* @__PURE__ */ Bo(f))).then((f) => h([...t.map(n), ...f])).catch((f) => $e(f, a)).finally(() => u());
695
695
  }
696
696
  c ? c.then(() => {
697
- a(), d(), Nt();
698
- }) : d();
697
+ s(), p(), Nt();
698
+ }) : p();
699
699
  }
700
- function zo() {
701
- var e = k, t = S, r = R, i = $;
700
+ function Ho() {
701
+ var e = k, t = S, r = L, i = $;
702
702
  if (0) var n;
703
- return function(s = !0) {
704
- ae(e), X(t), Qe(r), s && !(e.f & 16384) && (i?.activate(), i?.apply());
703
+ return function(a = !0) {
704
+ ae(e), X(t), Qe(r), a && !(e.f & 16384) && (i?.activate(), i?.apply());
705
705
  };
706
706
  }
707
707
  function Nt(e = !0) {
708
708
  ae(null), X(null), Qe(null), e && $?.deactivate();
709
709
  }
710
- function Gi() {
710
+ function Ki() {
711
711
  var e = k.b, t = $, r = e.is_rendered();
712
712
  return e.update_pending_count(1, t), t.increment(r), (i = !1) => {
713
713
  e.update_pending_count(-1, t), t.decrement(r, i);
714
714
  };
715
715
  }
716
716
  // @__NO_SIDE_EFFECTS__
717
- function Vt(e) {
717
+ function Wt(e) {
718
718
  var t = 2 | le, r = S !== null && S.f & 2 ? S : null;
719
719
  return k !== null && (k.f |= it), {
720
- ctx: R,
720
+ ctx: L,
721
721
  deps: null,
722
722
  effects: null,
723
- equals: Ai,
723
+ equals: Oi,
724
724
  f: t,
725
725
  fn: e,
726
726
  reactions: null,
@@ -732,117 +732,117 @@ function Vt(e) {
732
732
  };
733
733
  }
734
734
  // @__NO_SIDE_EFFECTS__
735
- function Vo(e, t, r) {
735
+ function Bo(e, t, r) {
736
736
  let i = k;
737
- i === null && lo();
738
- var n = void 0, o = gt(N), s = !S, a = /* @__PURE__ */ new Map();
739
- return rs(() => {
740
- var c = k, h = ki();
737
+ i === null && ho();
738
+ var n = void 0, o = gt(N), a = !S, s = /* @__PURE__ */ new Map();
739
+ return ss(() => {
740
+ var c = k, h = Ii();
741
741
  n = h.promise;
742
742
  try {
743
743
  Promise.resolve(e()).then(h.resolve, h.reject).finally(Nt);
744
744
  } catch (v) {
745
745
  h.reject(v), Nt();
746
746
  }
747
- var p = $;
748
- if (s) {
749
- if (c.f & 32768) var d = Gi();
747
+ var u = $;
748
+ if (a) {
749
+ if (c.f & 32768) var p = Ki();
750
750
  if (i.b.is_rendered())
751
- a.get(p)?.reject(pe), a.delete(p);
751
+ s.get(u)?.reject(pe), s.delete(u);
752
752
  else {
753
- for (const v of a.values()) v.reject(pe);
754
- a.clear();
753
+ for (const v of s.values()) v.reject(pe);
754
+ s.clear();
755
755
  }
756
- a.set(p, h);
756
+ s.set(u, h);
757
757
  }
758
758
  const f = (v, _ = void 0) => {
759
- if (d && d(_ === pe), !(_ === pe || c.f & 16384)) {
760
- if (p.activate(), _)
761
- o.f |= Rt, Dt(o, _);
759
+ if (p && p(_ === pe), !(_ === pe || c.f & 16384)) {
760
+ if (u.activate(), _)
761
+ o.f |= Lt, Dt(o, _);
762
762
  else {
763
- o.f & 8388608 && (o.f ^= Rt), Dt(o, v);
764
- for (const [m, y] of a) {
765
- if (a.delete(m), m === p) break;
766
- y.reject(pe);
763
+ o.f & 8388608 && (o.f ^= Lt), Dt(o, v);
764
+ for (const [m, b] of s) {
765
+ if (s.delete(m), m === u) break;
766
+ b.reject(pe);
767
767
  }
768
768
  }
769
- p.deactivate();
769
+ u.deactivate();
770
770
  }
771
771
  };
772
772
  h.promise.then(f, (v) => f(null, v || "unknown"));
773
- }), Zo(() => {
774
- for (const c of a.values()) c.reject(pe);
773
+ }), is(() => {
774
+ for (const c of s.values()) c.reject(pe);
775
775
  }), new Promise((c) => {
776
- function h(p) {
777
- function d() {
778
- p === n ? c(o) : h(n);
776
+ function h(u) {
777
+ function p() {
778
+ u === n ? c(o) : h(n);
779
779
  }
780
- p.then(d, d);
780
+ u.then(p, p);
781
781
  }
782
782
  h(n);
783
783
  });
784
784
  }
785
785
  // @__NO_SIDE_EFFECTS__
786
- function Qr(e) {
787
- const t = /* @__PURE__ */ Vt(e);
788
- return Ee || fn(t), t;
786
+ function ei(e) {
787
+ const t = /* @__PURE__ */ Wt(e);
788
+ return Ee || pn(t), t;
789
789
  }
790
790
  // @__NO_SIDE_EFFECTS__
791
- function qi(e) {
792
- const t = /* @__PURE__ */ Vt(e);
793
- return t.equals = Ei, t;
791
+ function Xi(e) {
792
+ const t = /* @__PURE__ */ Wt(e);
793
+ return t.equals = Pi, t;
794
794
  }
795
- function Fo(e) {
795
+ function Uo(e) {
796
796
  var t = e.effects;
797
797
  if (t !== null) {
798
798
  e.effects = null;
799
799
  for (var r = 0; r < t.length; r += 1) V(t[r]);
800
800
  }
801
801
  }
802
- function Wo(e) {
802
+ function Go(e) {
803
803
  for (var t = e.parent; t !== null; ) {
804
804
  if (!(t.f & 2)) return t.f & 16384 ? null : t;
805
805
  t = t.parent;
806
806
  }
807
807
  return null;
808
808
  }
809
- function kr(e) {
809
+ function $r(e) {
810
810
  var t, r = k;
811
- if (ae(Wo(e)), 0)
811
+ if (ae(Go(e)), 0)
812
812
  try {
813
813
  } finally {
814
814
  }
815
815
  else try {
816
- e.f &= ~pt, Fo(e), t = vn(e);
816
+ e.f &= ~pt, Uo(e), t = mn(e);
817
817
  } finally {
818
818
  ae(r);
819
819
  }
820
820
  return t;
821
821
  }
822
- function Yi(e) {
823
- var t = e.v, r = kr(e);
824
- if (!e.equals(r) && (e.wv = hn(), (!$?.is_fork || e.deps === null) && (e.v = r, $?.capture(e, t), e.deps === null))) {
825
- C(e, K);
822
+ function Ji(e) {
823
+ var t = e.v, r = $r(e);
824
+ if (!e.equals(r) && (e.wv = _n(), (!$?.is_fork || e.deps === null) && (e.v = r, $?.capture(e, t), e.deps === null))) {
825
+ R(e, K);
826
826
  return;
827
827
  }
828
- Me || (z !== null ? (Ir() || $?.is_fork) && z.set(e, r) : br(e));
828
+ Me || (z !== null ? (Er() || $?.is_fork) && z.set(e, r) : wr(e));
829
829
  }
830
- function Bo(e) {
830
+ function qo(e) {
831
831
  if (e.effects !== null)
832
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(pe), t.teardown = Zn, t.ac = null, ht(t, 0), Er(t));
832
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(pe), t.teardown = io, t.ac = null, ht(t, 0), Or(t));
833
833
  }
834
- function Ki(e) {
834
+ function Qi(e) {
835
835
  if (e.effects !== null)
836
836
  for (const t of e.effects) t.teardown && rt(t);
837
837
  }
838
- var cr = /* @__PURE__ */ new Set(), Ae = /* @__PURE__ */ new Map();
839
- var Xi = !1;
838
+ var fr = /* @__PURE__ */ new Set(), Ae = /* @__PURE__ */ new Map();
839
+ var Zi = !1;
840
840
  function gt(e, t) {
841
841
  var r = {
842
842
  f: 0,
843
843
  v: e,
844
844
  reactions: null,
845
- equals: Ai,
845
+ equals: Oi,
846
846
  rv: 0,
847
847
  wv: 0
848
848
  };
@@ -851,185 +851,185 @@ function gt(e, t) {
851
851
  // @__NO_SIDE_EFFECTS__
852
852
  function x(e, t) {
853
853
  const r = gt(e, t);
854
- return fn(r), r;
854
+ return pn(r), r;
855
855
  }
856
856
  // @__NO_SIDE_EFFECTS__
857
- function Ho(e, t = !1, r = !0) {
857
+ function Yo(e, t = !1, r = !0) {
858
858
  const i = gt(e);
859
- if (t || (i.equals = Ei), vt && r && R !== null && R.l !== null) {
859
+ if (t || (i.equals = Pi), vt && r && L !== null && L.l !== null) {
860
860
  var n;
861
- ((n = R.l).s ?? (n.s = [])).push(i);
861
+ ((n = L.l).s ?? (n.s = [])).push(i);
862
862
  }
863
863
  return i;
864
864
  }
865
865
  function P(e, t, r = !1) {
866
- S !== null && (!te || S.f & 131072) && _t() && S.f & 4325394 && (Y === null || !Je.call(Y, e)) && mo();
866
+ S !== null && (!te || S.f & 131072) && _t() && S.f & 4325394 && (Y === null || !Je.call(Y, e)) && To();
867
867
  let i = r ? se(t) : t;
868
- return Dt(e, i, Ct);
868
+ return Dt(e, i, Rt);
869
869
  }
870
870
  function Dt(e, t, r = null) {
871
871
  if (!e.equals(t)) {
872
872
  var i = e.v;
873
873
  Me ? Ae.set(e, t) : Ae.set(e, i), e.v = t;
874
- var n = Fe.ensure();
874
+ var n = We.ensure();
875
875
  if (n.capture(e, i), e.f & 2) {
876
876
  const o = e;
877
- e.f & 2048 && kr(o), z === null && br(o);
877
+ e.f & 2048 && $r(o), z === null && wr(o);
878
878
  }
879
- e.wv = hn(), Ji(e, le, r), _t() && k !== null && k.f & 1024 && !(k.f & 96) && (q === null ? as([e]) : q.push(e)), !n.is_fork && cr.size > 0 && !Xi && Uo();
879
+ e.wv = _n(), en(e, le, r), _t() && k !== null && k.f & 1024 && !(k.f & 96) && (q === null ? fs([e]) : q.push(e)), !n.is_fork && fr.size > 0 && !Zi && Ko();
880
880
  }
881
881
  return t;
882
882
  }
883
- function Uo() {
884
- Xi = !1;
885
- for (const e of cr)
886
- e.f & 1024 && C(e, Ve), bt(e) && rt(e);
887
- cr.clear();
883
+ function Ko() {
884
+ Zi = !1;
885
+ for (const e of fr)
886
+ e.f & 1024 && R(e, Ve), yt(e) && rt(e);
887
+ fr.clear();
888
888
  }
889
889
  function ut(e) {
890
890
  P(e, e.v + 1);
891
891
  }
892
- function Ji(e, t, r) {
892
+ function en(e, t, r) {
893
893
  var i = e.reactions;
894
894
  if (i !== null)
895
- for (var n = _t(), o = i.length, s = 0; s < o; s++) {
896
- var a = i[s], c = a.f;
897
- if (!(!n && a === k)) {
895
+ for (var n = _t(), o = i.length, a = 0; a < o; a++) {
896
+ var s = i[a], c = s.f;
897
+ if (!(!n && s === k)) {
898
898
  var h = (c & le) === 0;
899
- if (h && C(a, t), c & 2) {
900
- var p = a;
901
- z?.delete(p), c & 65536 || (c & 512 && (a.f |= pt), Ji(p, Ve, r));
899
+ if (h && R(s, t), c & 2) {
900
+ var u = s;
901
+ z?.delete(u), c & 65536 || (c & 512 && (s.f |= pt), en(u, Ve, r));
902
902
  } else if (h) {
903
- var d = a;
904
- c & 16 && oe !== null && oe.add(d), r !== null ? r.push(d) : wr(d);
903
+ var p = s;
904
+ c & 16 && oe !== null && oe.add(p), r !== null ? r.push(p) : kr(p);
905
905
  }
906
906
  }
907
907
  }
908
908
  }
909
- var Go = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
909
+ var Xo = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
910
910
  function se(e) {
911
911
  if (typeof e != "object" || e === null || lt in e) return e;
912
- const t = Ti(e);
913
- if (t !== Jn && t !== Qn) return e;
914
- var r = /* @__PURE__ */ new Map(), i = qn(e), n = /* @__PURE__ */ x(0), o = null, s = ze, a = (d) => {
915
- if (ze === s) return d();
912
+ const t = $i(e);
913
+ if (t !== to && t !== ro) return e;
914
+ var r = /* @__PURE__ */ new Map(), i = Jn(e), n = /* @__PURE__ */ x(0), o = null, a = ze, s = (p) => {
915
+ if (ze === a) return p();
916
916
  var f = S, v = ze;
917
- X(null), ii(s);
918
- var _ = d();
919
- return X(f), ii(v), _;
917
+ X(null), oi(a);
918
+ var _ = p();
919
+ return X(f), oi(v), _;
920
920
  };
921
921
  i && r.set("length", /* @__PURE__ */ x(e.length, o));
922
922
  var c = "";
923
923
  let h = !1;
924
- function p(d) {
924
+ function u(p) {
925
925
  if (!h) {
926
- h = !0, c = d, Ur(n, `${c} version`);
927
- for (const [f, v] of r) Ur(v, qo(c, f));
926
+ h = !0, c = p, qr(n, `${c} version`);
927
+ for (const [f, v] of r) qr(v, Jo(c, f));
928
928
  h = !1;
929
929
  }
930
930
  }
931
931
  return new Proxy(e, {
932
- defineProperty(d, f, v) {
933
- (!("value" in v) || v.configurable === !1 || v.enumerable === !1 || v.writable === !1) && _o();
932
+ defineProperty(p, f, v) {
933
+ (!("value" in v) || v.configurable === !1 || v.enumerable === !1 || v.writable === !1) && bo();
934
934
  var _ = r.get(f);
935
- return _ === void 0 ? a(() => {
935
+ return _ === void 0 ? s(() => {
936
936
  var m = /* @__PURE__ */ x(v.value, o);
937
937
  return r.set(f, m), m;
938
938
  }) : P(_, v.value, !0), !0;
939
939
  },
940
- deleteProperty(d, f) {
940
+ deleteProperty(p, f) {
941
941
  var v = r.get(f);
942
942
  if (v === void 0) {
943
- if (f in d) {
944
- const _ = a(() => /* @__PURE__ */ x(N, o));
943
+ if (f in p) {
944
+ const _ = s(() => /* @__PURE__ */ x(N, o));
945
945
  r.set(f, _), ut(n);
946
946
  }
947
947
  } else
948
948
  P(v, N), ut(n);
949
949
  return !0;
950
950
  },
951
- get(d, f, v) {
951
+ get(p, f, v) {
952
952
  if (f === lt) return e;
953
- var _ = r.get(f), m = f in d;
954
- if (_ === void 0 && (!m || Le(d, f)?.writable) && (_ = a(() => {
955
- var A = /* @__PURE__ */ x(se(m ? d[f] : N), o);
953
+ var _ = r.get(f), m = f in p;
954
+ if (_ === void 0 && (!m || Ce(p, f)?.writable) && (_ = s(() => {
955
+ var A = /* @__PURE__ */ x(se(m ? p[f] : N), o);
956
956
  return A;
957
957
  }), r.set(f, _)), _ !== void 0) {
958
- var y = u(_);
959
- return y === N ? void 0 : y;
958
+ var b = d(_);
959
+ return b === N ? void 0 : b;
960
960
  }
961
- return Reflect.get(d, f, v);
961
+ return Reflect.get(p, f, v);
962
962
  },
963
- getOwnPropertyDescriptor(d, f) {
964
- var v = Reflect.getOwnPropertyDescriptor(d, f);
963
+ getOwnPropertyDescriptor(p, f) {
964
+ var v = Reflect.getOwnPropertyDescriptor(p, f);
965
965
  if (v && "value" in v) {
966
966
  var _ = r.get(f);
967
- _ && (v.value = u(_));
967
+ _ && (v.value = d(_));
968
968
  } else if (v === void 0) {
969
- var m = r.get(f), y = m?.v;
970
- if (m !== void 0 && y !== N) return {
969
+ var m = r.get(f), b = m?.v;
970
+ if (m !== void 0 && b !== N) return {
971
971
  enumerable: !0,
972
972
  configurable: !0,
973
- value: y,
973
+ value: b,
974
974
  writable: !0
975
975
  };
976
976
  }
977
977
  return v;
978
978
  },
979
- has(d, f) {
979
+ has(p, f) {
980
980
  if (f === lt) return !0;
981
- var v = r.get(f), _ = v !== void 0 && v.v !== N || Reflect.has(d, f);
982
- return (v !== void 0 || k !== null && (!_ || Le(d, f)?.writable)) && (v === void 0 && (v = a(() => {
983
- var m = /* @__PURE__ */ x(_ ? se(d[f]) : N, o);
981
+ var v = r.get(f), _ = v !== void 0 && v.v !== N || Reflect.has(p, f);
982
+ return (v !== void 0 || k !== null && (!_ || Ce(p, f)?.writable)) && (v === void 0 && (v = s(() => {
983
+ var m = /* @__PURE__ */ x(_ ? se(p[f]) : N, o);
984
984
  return m;
985
- }), r.set(f, v)), u(v) === N) ? !1 : _;
985
+ }), r.set(f, v)), d(v) === N) ? !1 : _;
986
986
  },
987
- set(d, f, v, _) {
988
- var m = r.get(f), y = f in d;
987
+ set(p, f, v, _) {
988
+ var m = r.get(f), b = f in p;
989
989
  if (i && f === "length") for (var A = v; A < m.v; A += 1) {
990
- var B = r.get(A + "");
991
- B !== void 0 ? P(B, N) : A in d && (B = a(() => /* @__PURE__ */ x(N, o)), r.set(A + "", B));
990
+ var H = r.get(A + "");
991
+ H !== void 0 ? P(H, N) : A in p && (H = s(() => /* @__PURE__ */ x(N, o)), r.set(A + "", H));
992
992
  }
993
993
  if (m === void 0)
994
- (!y || Le(d, f)?.writable) && (m = a(() => /* @__PURE__ */ x(void 0, o)), P(m, se(v)), r.set(f, m));
994
+ (!b || Ce(p, f)?.writable) && (m = s(() => /* @__PURE__ */ x(void 0, o)), P(m, se(v)), r.set(f, m));
995
995
  else {
996
- y = m.v !== N;
997
- var E = a(() => se(v));
996
+ b = m.v !== N;
997
+ var E = s(() => se(v));
998
998
  P(m, E);
999
999
  }
1000
- var H = Reflect.getOwnPropertyDescriptor(d, f);
1001
- if (H?.set && H.set.call(_, v), !y) {
1000
+ var B = Reflect.getOwnPropertyDescriptor(p, f);
1001
+ if (B?.set && B.set.call(_, v), !b) {
1002
1002
  if (i && typeof f == "string") {
1003
- var we = r.get("length"), F = Number(f);
1004
- Number.isInteger(F) && F >= we.v && P(we, F + 1);
1003
+ var we = r.get("length"), W = Number(f);
1004
+ Number.isInteger(W) && W >= we.v && P(we, W + 1);
1005
1005
  }
1006
1006
  ut(n);
1007
1007
  }
1008
1008
  return !0;
1009
1009
  },
1010
- ownKeys(d) {
1011
- u(n);
1012
- var f = Reflect.ownKeys(d).filter((m) => {
1013
- var y = r.get(m);
1014
- return y === void 0 || y.v !== N;
1010
+ ownKeys(p) {
1011
+ d(n);
1012
+ var f = Reflect.ownKeys(p).filter((m) => {
1013
+ var b = r.get(m);
1014
+ return b === void 0 || b.v !== N;
1015
1015
  });
1016
- for (var [v, _] of r) _.v !== N && !(v in d) && f.push(v);
1016
+ for (var [v, _] of r) _.v !== N && !(v in p) && f.push(v);
1017
1017
  return f;
1018
1018
  },
1019
1019
  setPrototypeOf() {
1020
- go();
1020
+ wo();
1021
1021
  }
1022
1022
  });
1023
1023
  }
1024
- function qo(e, t) {
1025
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Go.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1024
+ function Jo(e, t) {
1025
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Xo.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1026
1026
  }
1027
- var Zr, Yo, Qi, Zi, en;
1028
- function ur() {
1029
- if (Zr === void 0) {
1030
- Zr = window, Yo = document, Qi = /Firefox/.test(navigator.userAgent);
1027
+ var ti, Qo, tn, rn, nn;
1028
+ function dr() {
1029
+ if (ti === void 0) {
1030
+ ti = window, Qo = document, tn = /Firefox/.test(navigator.userAgent);
1031
1031
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
1032
- Zi = Le(t, "firstChild").get, en = Le(t, "nextSibling").get, Fr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Fr(r) && (r.__t = void 0);
1032
+ rn = Ce(t, "firstChild").get, nn = Ce(t, "nextSibling").get, Hr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Hr(r) && (r.__t = void 0);
1033
1033
  }
1034
1034
  }
1035
1035
  function _e(e = "") {
@@ -1037,13 +1037,13 @@ function _e(e = "") {
1037
1037
  }
1038
1038
  // @__NO_SIDE_EFFECTS__
1039
1039
  function tt(e) {
1040
- return Zi.call(e);
1040
+ return rn.call(e);
1041
1041
  }
1042
1042
  // @__NO_SIDE_EFFECTS__
1043
1043
  function me(e) {
1044
- return en.call(e);
1044
+ return nn.call(e);
1045
1045
  }
1046
- function ei(e, t) {
1046
+ function ri(e, t) {
1047
1047
  if (!O) return /* @__PURE__ */ tt(e);
1048
1048
  var r = /* @__PURE__ */ tt(I);
1049
1049
  if (r === null) r = I.appendChild(_e());
@@ -1051,9 +1051,9 @@ function ei(e, t) {
1051
1051
  var i = _e();
1052
1052
  return r?.before(i), re(i), i;
1053
1053
  }
1054
- return t && $r(r), re(r), r;
1054
+ return t && Ar(r), re(r), r;
1055
1055
  }
1056
- function Xt(e, t = !1) {
1056
+ function Jt(e, t = !1) {
1057
1057
  if (!O) {
1058
1058
  var r = /* @__PURE__ */ tt(e);
1059
1059
  return r instanceof Comment && r.data === "" ? /* @__PURE__ */ me(r) : r;
@@ -1063,7 +1063,7 @@ function Xt(e, t = !1) {
1063
1063
  var i = _e();
1064
1064
  return I?.before(i), re(i), i;
1065
1065
  }
1066
- $r(I);
1066
+ Ar(I);
1067
1067
  }
1068
1068
  return I;
1069
1069
  }
@@ -1077,27 +1077,27 @@ function nt(e, t = 1, r = !1) {
1077
1077
  var o = _e();
1078
1078
  return i === null ? n?.after(o) : i.before(o), re(o), o;
1079
1079
  }
1080
- $r(i);
1080
+ Ar(i);
1081
1081
  }
1082
1082
  return re(i), i;
1083
1083
  }
1084
- function Ko(e) {
1084
+ function Zo(e) {
1085
1085
  e.textContent = "";
1086
1086
  }
1087
- function Xo() {
1088
- return !Ee || oe !== null ? !1 : (k.f & _r) !== 0;
1087
+ function es() {
1088
+ return !Ee || oe !== null ? !1 : (k.f & mr) !== 0;
1089
1089
  }
1090
- function Sr(e, t, r) {
1090
+ function Ir(e, t, r) {
1091
1091
  let i = r ? { is: r } : void 0;
1092
1092
  return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, i);
1093
1093
  }
1094
- function $r(e) {
1094
+ function Ar(e) {
1095
1095
  if (e.nodeValue.length < 65536) return;
1096
1096
  let t = e.nextSibling;
1097
1097
  for (; t !== null && t.nodeType === 3; )
1098
1098
  t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1099
1099
  }
1100
- function tn(e) {
1100
+ function on(e) {
1101
1101
  var t = S, r = k;
1102
1102
  X(null), ae(null);
1103
1103
  try {
@@ -1106,18 +1106,18 @@ function tn(e) {
1106
1106
  X(t), ae(r);
1107
1107
  }
1108
1108
  }
1109
- function Jo(e) {
1110
- k === null && (S === null && fo(e), uo()), Me && co(e);
1109
+ function ts(e) {
1110
+ k === null && (S === null && _o(e), vo()), Me && po(e);
1111
1111
  }
1112
- function Qo(e, t) {
1112
+ function rs(e, t) {
1113
1113
  var r = t.last;
1114
1114
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1115
1115
  }
1116
1116
  function ce(e, t) {
1117
1117
  var r = k;
1118
- r !== null && r.f & 8192 && (e |= vr);
1118
+ r !== null && r.f & 8192 && (e |= gr);
1119
1119
  var i = {
1120
- ctx: R,
1120
+ ctx: L,
1121
1121
  deps: null,
1122
1122
  nodes: null,
1123
1123
  f: e | le | 512,
@@ -1132,48 +1132,48 @@ function ce(e, t) {
1132
1132
  wv: 0,
1133
1133
  ac: null
1134
1134
  }, n = i;
1135
- if (e & 4) et !== null ? et.push(i) : Fe.ensure().schedule(i);
1135
+ if (e & 4) et !== null ? et.push(i) : We.ensure().schedule(i);
1136
1136
  else if (t !== null) {
1137
1137
  try {
1138
1138
  rt(i);
1139
- } catch (s) {
1140
- throw V(i), s;
1139
+ } catch (a) {
1140
+ throw V(i), a;
1141
1141
  }
1142
- n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= gr));
1142
+ n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= yr));
1143
1143
  }
1144
- if (n !== null && (n.parent = r, r !== null && Qo(n, r), S !== null && S.f & 2 && !(e & 64))) {
1144
+ if (n !== null && (n.parent = r, r !== null && rs(n, r), S !== null && S.f & 2 && !(e & 64))) {
1145
1145
  var o = S;
1146
1146
  (o.effects ?? (o.effects = [])).push(n);
1147
1147
  }
1148
1148
  return i;
1149
1149
  }
1150
- function Ir() {
1150
+ function Er() {
1151
1151
  return S !== null && !te;
1152
1152
  }
1153
- function Zo(e) {
1153
+ function is(e) {
1154
1154
  const t = ce(8, null);
1155
- return C(t, K), t.teardown = e, t;
1155
+ return R(t, K), t.teardown = e, t;
1156
1156
  }
1157
1157
  function at(e) {
1158
- Jo("$effect");
1158
+ ts("$effect");
1159
1159
  var t = k.f;
1160
1160
  if (!S && t & 32 && !(t & 32768)) {
1161
- var r = R;
1161
+ var r = L;
1162
1162
  (r.e ?? (r.e = [])).push(e);
1163
- } else return rn(e);
1163
+ } else return sn(e);
1164
1164
  }
1165
- function rn(e) {
1166
- return ce(4 | ro, e);
1165
+ function sn(e) {
1166
+ return ce(4 | so, e);
1167
1167
  }
1168
- function es(e) {
1169
- Fe.ensure();
1168
+ function ns(e) {
1169
+ We.ensure();
1170
1170
  const t = ce(64 | it, e);
1171
1171
  return () => {
1172
1172
  V(t);
1173
1173
  };
1174
1174
  }
1175
- function ts(e) {
1176
- Fe.ensure();
1175
+ function os(e) {
1176
+ We.ensure();
1177
1177
  const t = ce(64 | it, e);
1178
1178
  return (r = {}) => new Promise((i) => {
1179
1179
  r.outro ? mt(t, () => {
@@ -1181,51 +1181,51 @@ function ts(e) {
1181
1181
  }) : (V(t), i(void 0));
1182
1182
  });
1183
1183
  }
1184
- function nn(e) {
1184
+ function an(e) {
1185
1185
  return ce(4, e);
1186
1186
  }
1187
- function rs(e) {
1188
- return ce(io | it, e);
1187
+ function ss(e) {
1188
+ return ce(ao | it, e);
1189
1189
  }
1190
- function Ar(e, t = 0) {
1190
+ function Mr(e, t = 0) {
1191
1191
  return ce(8 | t, e);
1192
1192
  }
1193
- function ti(e, t = [], r = [], i = []) {
1194
- jo(i, t, r, (n) => {
1195
- ce(8, () => e(...n.map(u)));
1193
+ function ii(e, t = [], r = [], i = []) {
1194
+ Fo(i, t, r, (n) => {
1195
+ ce(8, () => e(...n.map(d)));
1196
1196
  });
1197
1197
  }
1198
- function on(e, t = 0) {
1198
+ function ln(e, t = 0) {
1199
1199
  var r = ce(16 | t, e);
1200
1200
  return r;
1201
1201
  }
1202
1202
  function ge(e) {
1203
1203
  return ce(32 | it, e);
1204
1204
  }
1205
- function sn(e) {
1205
+ function cn(e) {
1206
1206
  var t = e.teardown;
1207
1207
  if (t !== null) {
1208
1208
  const r = Me, i = S;
1209
- ri(!0), X(null);
1209
+ ni(!0), X(null);
1210
1210
  try {
1211
1211
  t.call(null);
1212
1212
  } finally {
1213
- ri(r), X(i);
1213
+ ni(r), X(i);
1214
1214
  }
1215
1215
  }
1216
1216
  }
1217
- function Er(e, t = !1) {
1217
+ function Or(e, t = !1) {
1218
1218
  var r = e.first;
1219
1219
  for (e.first = e.last = null; r !== null; ) {
1220
1220
  const n = r.ac;
1221
- n !== null && tn(() => {
1221
+ n !== null && on(() => {
1222
1222
  n.abort(pe);
1223
1223
  });
1224
1224
  var i = r.next;
1225
1225
  r.f & 64 ? r.parent = null : V(r, t), r = i;
1226
1226
  }
1227
1227
  }
1228
- function is(e) {
1228
+ function as(e) {
1229
1229
  for (var t = e.first; t !== null; ) {
1230
1230
  var r = t.next;
1231
1231
  t.f & 32 || V(t), t = r;
@@ -1233,70 +1233,70 @@ function is(e) {
1233
1233
  }
1234
1234
  function V(e, t = !0) {
1235
1235
  var r = !1;
1236
- (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (ns(e.nodes.start, e.nodes.end), r = !0), C(e, Wr), Er(e, t && !r), ht(e, 0);
1236
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (ls(e.nodes.start, e.nodes.end), r = !0), R(e, Br), Or(e, t && !r), ht(e, 0);
1237
1237
  var i = e.nodes && e.nodes.t;
1238
1238
  if (i !== null) for (const o of i) o.stop();
1239
- sn(e), e.f ^= Wr, e.f |= to;
1239
+ cn(e), e.f ^= Br, e.f |= oo;
1240
1240
  var n = e.parent;
1241
- n !== null && n.first !== null && an(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1241
+ n !== null && n.first !== null && un(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1242
1242
  }
1243
- function ns(e, t) {
1243
+ function ls(e, t) {
1244
1244
  for (; e !== null; ) {
1245
1245
  var r = e === t ? null : /* @__PURE__ */ me(e);
1246
1246
  e.remove(), e = r;
1247
1247
  }
1248
1248
  }
1249
- function an(e) {
1249
+ function un(e) {
1250
1250
  var t = e.parent, r = e.prev, i = e.next;
1251
1251
  r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
1252
1252
  }
1253
1253
  function mt(e, t, r = !0) {
1254
1254
  var i = [];
1255
- ln(e, i, !0);
1255
+ fn(e, i, !0);
1256
1256
  var n = () => {
1257
1257
  r && V(e), t && t();
1258
1258
  }, o = i.length;
1259
1259
  if (o > 0) {
1260
- var s = () => --o || n();
1261
- for (var a of i) a.out(s);
1260
+ var a = () => --o || n();
1261
+ for (var s of i) s.out(a);
1262
1262
  } else n();
1263
1263
  }
1264
- function ln(e, t, r) {
1264
+ function fn(e, t, r) {
1265
1265
  if (!(e.f & 8192)) {
1266
- e.f ^= vr;
1266
+ e.f ^= gr;
1267
1267
  var i = e.nodes && e.nodes.t;
1268
1268
  if (i !== null)
1269
- for (const a of i) (a.is_global || r) && t.push(a);
1269
+ for (const s of i) (s.is_global || r) && t.push(s);
1270
1270
  for (var n = e.first; n !== null; ) {
1271
- var o = n.next, s = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1272
- ln(n, t, s ? r : !1), n = o;
1271
+ var o = n.next, a = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1272
+ fn(n, t, a ? r : !1), n = o;
1273
1273
  }
1274
1274
  }
1275
1275
  }
1276
- function os(e) {
1277
- cn(e, !0);
1276
+ function cs(e) {
1277
+ dn(e, !0);
1278
1278
  }
1279
- function cn(e, t) {
1279
+ function dn(e, t) {
1280
1280
  if (e.f & 8192) {
1281
- e.f ^= vr, e.f & 1024 || (C(e, le), Fe.ensure().schedule(e));
1281
+ e.f ^= gr, e.f & 1024 || (R(e, le), We.ensure().schedule(e));
1282
1282
  for (var r = e.first; r !== null; ) {
1283
1283
  var i = r.next, n = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1284
- cn(r, n ? t : !1), r = i;
1284
+ dn(r, n ? t : !1), r = i;
1285
1285
  }
1286
1286
  var o = e.nodes && e.nodes.t;
1287
1287
  if (o !== null)
1288
- for (const s of o) (s.is_global || t) && s.in();
1288
+ for (const a of o) (a.is_global || t) && a.in();
1289
1289
  }
1290
1290
  }
1291
- function un(e, t) {
1291
+ function hn(e, t) {
1292
1292
  if (e.nodes)
1293
1293
  for (var r = e.nodes.start, i = e.nodes.end; r !== null; ) {
1294
1294
  var n = r === i ? null : /* @__PURE__ */ me(r);
1295
1295
  t.append(r), r = n;
1296
1296
  }
1297
1297
  }
1298
- var ss = null, At = !1, Me = !1;
1299
- function ri(e) {
1298
+ var us = null, At = !1, Me = !1;
1299
+ function ni(e) {
1300
1300
  Me = e;
1301
1301
  }
1302
1302
  var S = null, te = !1;
@@ -1308,77 +1308,77 @@ function ae(e) {
1308
1308
  k = e;
1309
1309
  }
1310
1310
  var Y = null;
1311
- function fn(e) {
1311
+ function pn(e) {
1312
1312
  S !== null && (!Ee || S.f & 2) && (Y === null ? Y = [e] : Y.push(e));
1313
1313
  }
1314
- var j = null, W = 0, q = null;
1315
- function as(e) {
1314
+ var j = null, F = 0, q = null;
1315
+ function fs(e) {
1316
1316
  q = e;
1317
1317
  }
1318
- var dn = 1, Ce = 0, ze = Ce;
1319
- function ii(e) {
1318
+ var vn = 1, Re = 0, ze = Re;
1319
+ function oi(e) {
1320
1320
  ze = e;
1321
1321
  }
1322
- function hn() {
1323
- return ++dn;
1322
+ function _n() {
1323
+ return ++vn;
1324
1324
  }
1325
- function bt(e) {
1325
+ function yt(e) {
1326
1326
  var t = e.f;
1327
1327
  if (t & 2048) return !0;
1328
1328
  if (t & 2 && (e.f &= ~pt), t & 4096) {
1329
1329
  for (var r = e.deps, i = r.length, n = 0; n < i; n++) {
1330
1330
  var o = r[n];
1331
- if (bt(o) && Yi(o), o.wv > e.wv) return !0;
1331
+ if (yt(o) && Ji(o), o.wv > e.wv) return !0;
1332
1332
  }
1333
- t & 512 && z === null && C(e, K);
1333
+ t & 512 && z === null && R(e, K);
1334
1334
  }
1335
1335
  return !1;
1336
1336
  }
1337
- function pn(e, t, r = !0) {
1337
+ function gn(e, t, r = !0) {
1338
1338
  var i = e.reactions;
1339
1339
  if (i !== null && !(!Ee && Y !== null && Je.call(Y, e)))
1340
1340
  for (var n = 0; n < i.length; n++) {
1341
1341
  var o = i[n];
1342
- o.f & 2 ? pn(o, t, !1) : t === o && (r ? C(o, le) : o.f & 1024 && C(o, Ve), wr(o));
1342
+ o.f & 2 ? gn(o, t, !1) : t === o && (r ? R(o, le) : o.f & 1024 && R(o, Ve), kr(o));
1343
1343
  }
1344
1344
  }
1345
- function vn(e) {
1346
- var t = j, r = W, i = q, n = S, o = Y, s = R, a = te, c = ze, h = e.f;
1347
- j = null, W = 0, q = null, S = h & 96 ? null : e, Y = null, Qe(e.ctx), te = !1, ze = ++Ce, e.ac !== null && (tn(() => {
1345
+ function mn(e) {
1346
+ var t = j, r = F, i = q, n = S, o = Y, a = L, s = te, c = ze, h = e.f;
1347
+ j = null, F = 0, q = null, S = h & 96 ? null : e, Y = null, Qe(e.ctx), te = !1, ze = ++Re, e.ac !== null && (on(() => {
1348
1348
  e.ac.abort(pe);
1349
1349
  }), e.ac = null);
1350
1350
  try {
1351
- e.f |= Br;
1352
- var p = e.fn, d = p();
1353
- e.f |= _r;
1351
+ e.f |= Ur;
1352
+ var u = e.fn, p = u();
1353
+ e.f |= mr;
1354
1354
  var f = e.deps, v = $?.is_fork;
1355
1355
  if (j !== null) {
1356
1356
  var _;
1357
- if (v || ht(e, W), f !== null && W > 0)
1358
- for (f.length = W + j.length, _ = 0; _ < j.length; _++) f[W + _] = j[_];
1357
+ if (v || ht(e, F), f !== null && F > 0)
1358
+ for (f.length = F + j.length, _ = 0; _ < j.length; _++) f[F + _] = j[_];
1359
1359
  else e.deps = f = j;
1360
- if (Ir() && e.f & 512) for (_ = W; _ < f.length; _++) {
1360
+ if (Er() && e.f & 512) for (_ = F; _ < f.length; _++) {
1361
1361
  var m;
1362
1362
  ((m = f[_]).reactions ?? (m.reactions = [])).push(e);
1363
1363
  }
1364
- } else !v && f !== null && W < f.length && (ht(e, W), f.length = W);
1365
- if (_t() && q !== null && !te && f !== null && !(e.f & 6146)) for (_ = 0; _ < q.length; _++) pn(q[_], e);
1364
+ } else !v && f !== null && F < f.length && (ht(e, F), f.length = F);
1365
+ if (_t() && q !== null && !te && f !== null && !(e.f & 6146)) for (_ = 0; _ < q.length; _++) gn(q[_], e);
1366
1366
  if (n !== null && n !== e) {
1367
- if (Ce++, n.deps !== null) for (let y = 0; y < r; y += 1) n.deps[y].rv = Ce;
1368
- if (t !== null) for (const y of t) y.rv = Ce;
1367
+ if (Re++, n.deps !== null) for (let b = 0; b < r; b += 1) n.deps[b].rv = Re;
1368
+ if (t !== null) for (const b of t) b.rv = Re;
1369
1369
  q !== null && (i === null ? i = q : i.push(...q));
1370
1370
  }
1371
- return e.f & 8388608 && (e.f ^= Rt), d;
1372
- } catch (y) {
1373
- return xi(y);
1371
+ return e.f & 8388608 && (e.f ^= Lt), p;
1372
+ } catch (b) {
1373
+ return Ci(b);
1374
1374
  } finally {
1375
- e.f ^= Br, j = t, W = r, q = i, S = n, Y = o, Qe(s), te = a, ze = c;
1375
+ e.f ^= Ur, j = t, F = r, q = i, S = n, Y = o, Qe(a), te = s, ze = c;
1376
1376
  }
1377
1377
  }
1378
- function ls(e, t) {
1378
+ function ds(e, t) {
1379
1379
  let r = t.reactions;
1380
1380
  if (r !== null) {
1381
- var i = Yn.call(r, e);
1381
+ var i = Qn.call(r, e);
1382
1382
  if (i !== -1) {
1383
1383
  var n = r.length - 1;
1384
1384
  n === 0 ? r = t.reactions = null : (r[i] = r[n], r.pop());
@@ -1386,37 +1386,37 @@ function ls(e, t) {
1386
1386
  }
1387
1387
  if (r === null && t.f & 2 && (j === null || !Je.call(j, t))) {
1388
1388
  var o = t;
1389
- o.f & 512 && (o.f ^= 512, o.f &= ~pt), br(o), Bo(o), ht(o, 0);
1389
+ o.f & 512 && (o.f ^= 512, o.f &= ~pt), wr(o), qo(o), ht(o, 0);
1390
1390
  }
1391
1391
  }
1392
1392
  function ht(e, t) {
1393
1393
  var r = e.deps;
1394
1394
  if (r !== null)
1395
- for (var i = t; i < r.length; i++) ls(e, r[i]);
1395
+ for (var i = t; i < r.length; i++) ds(e, r[i]);
1396
1396
  }
1397
1397
  function rt(e) {
1398
1398
  var t = e.f;
1399
1399
  if (!(t & 16384)) {
1400
- C(e, K);
1400
+ R(e, K);
1401
1401
  var r = k, i = At;
1402
1402
  if (k = e, At = !0, 0)
1403
1403
  var n, o;
1404
1404
  try {
1405
- t & 16777232 ? is(e) : Er(e), sn(e);
1406
- var s = vn(e);
1407
- if (e.teardown = typeof s == "function" ? s : null, e.wv = dn, 0)
1408
- for (var a of e.deps) ;
1405
+ t & 16777232 ? as(e) : Or(e), cn(e);
1406
+ var a = mn(e);
1407
+ if (e.teardown = typeof a == "function" ? a : null, e.wv = vn, 0)
1408
+ for (var s of e.deps) ;
1409
1409
  } finally {
1410
1410
  At = i, k = r;
1411
1411
  }
1412
1412
  }
1413
1413
  }
1414
- function u(e) {
1414
+ function d(e) {
1415
1415
  var t = (e.f & 2) !== 0;
1416
- if (ss?.add(e), S !== null && !te && !(k !== null && k.f & 16384) && (Y === null || !Je.call(Y, e))) {
1416
+ if (us?.add(e), S !== null && !te && !(k !== null && k.f & 16384) && (Y === null || !Je.call(Y, e))) {
1417
1417
  var r = S.deps;
1418
1418
  if (S.f & 2097152)
1419
- e.rv < Ce && (e.rv = Ce, j === null && r !== null && r[W] === e ? W++ : j === null ? j = [e] : j.push(e));
1419
+ e.rv < Re && (e.rv = Re, j === null && r !== null && r[F] === e ? F++ : j === null ? j = [e] : j.push(e));
1420
1420
  else {
1421
1421
  var i;
1422
1422
  ((i = S).deps ?? (i.deps = [])).push(e);
@@ -1429,7 +1429,7 @@ function u(e) {
1429
1429
  var o;
1430
1430
  if (tracing_mode_flag && !te && tracing_expressions !== null && S !== null && tracing_expressions.reaction === S && !e.trace) {
1431
1431
  if (o)
1432
- var s, a;
1432
+ var a, s;
1433
1433
  }
1434
1434
  }
1435
1435
  if (Me && Ae.has(e)) return Ae.get(e);
@@ -1437,25 +1437,25 @@ function u(e) {
1437
1437
  var c = e;
1438
1438
  if (Me) {
1439
1439
  var h = c.v;
1440
- return (!(c.f & 1024) && c.reactions !== null || gn(c)) && (h = kr(c)), Ae.set(c, h), h;
1440
+ return (!(c.f & 1024) && c.reactions !== null || bn(c)) && (h = $r(c)), Ae.set(c, h), h;
1441
1441
  }
1442
- var p = (c.f & 512) === 0 && !te && S !== null && (At || (S.f & 512) !== 0), d = (c.f & _r) === 0;
1443
- bt(c) && (p && (c.f |= 512), Yi(c)), p && !d && (Ki(c), _n(c));
1442
+ var u = (c.f & 512) === 0 && !te && S !== null && (At || (S.f & 512) !== 0), p = (c.f & mr) === 0;
1443
+ yt(c) && (u && (c.f |= 512), Ji(c)), u && !p && (Qi(c), yn(c));
1444
1444
  }
1445
1445
  if (z?.has(e)) return z.get(e);
1446
1446
  if (e.f & 8388608) throw e.v;
1447
1447
  return e.v;
1448
1448
  }
1449
- function _n(e) {
1449
+ function yn(e) {
1450
1450
  if (e.f |= 512, e.deps !== null)
1451
1451
  for (const t of e.deps)
1452
- (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (Ki(t), _n(t));
1452
+ (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (Qi(t), yn(t));
1453
1453
  }
1454
- function gn(e) {
1454
+ function bn(e) {
1455
1455
  if (e.v === N) return !0;
1456
1456
  if (e.deps === null) return !1;
1457
1457
  for (const t of e.deps)
1458
- if (Ae.has(t) || t.f & 2 && gn(t)) return !0;
1458
+ if (Ae.has(t) || t.f & 2 && bn(t)) return !0;
1459
1459
  return !1;
1460
1460
  }
1461
1461
  function Ft(e) {
@@ -1466,37 +1466,37 @@ function Ft(e) {
1466
1466
  te = t;
1467
1467
  }
1468
1468
  }
1469
- var Ye = Symbol("events"), mn = /* @__PURE__ */ new Set(), fr = /* @__PURE__ */ new Set();
1470
- function ni(e, t, r) {
1469
+ var Ye = Symbol("events"), wn = /* @__PURE__ */ new Set(), hr = /* @__PURE__ */ new Set();
1470
+ function si(e, t, r) {
1471
1471
  (t[Ye] ?? (t[Ye] = {}))[e] = r;
1472
1472
  }
1473
- function cs(e) {
1474
- for (var t = 0; t < e.length; t++) mn.add(e[t]);
1475
- for (var r of fr) r(e);
1473
+ function hs(e) {
1474
+ for (var t = 0; t < e.length; t++) wn.add(e[t]);
1475
+ for (var r of hr) r(e);
1476
1476
  }
1477
- var oi = null;
1478
- function si(e) {
1477
+ var ai = null;
1478
+ function li(e) {
1479
1479
  var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [], o = n[0] || e.target;
1480
- oi = e;
1481
- var s = 0, a = oi === e && e[Ye];
1482
- if (a) {
1483
- var c = n.indexOf(a);
1480
+ ai = e;
1481
+ var a = 0, s = ai === e && e[Ye];
1482
+ if (s) {
1483
+ var c = n.indexOf(s);
1484
1484
  if (c !== -1 && (t === document || t === window)) {
1485
1485
  e[Ye] = t;
1486
1486
  return;
1487
1487
  }
1488
1488
  var h = n.indexOf(t);
1489
1489
  if (h === -1) return;
1490
- c <= h && (s = c);
1490
+ c <= h && (a = c);
1491
1491
  }
1492
- if (o = n[s] || e.target, o !== t) {
1492
+ if (o = n[a] || e.target, o !== t) {
1493
1493
  xt(e, "currentTarget", {
1494
1494
  configurable: !0,
1495
1495
  get() {
1496
1496
  return o || r;
1497
1497
  }
1498
1498
  });
1499
- var p = S, d = k;
1499
+ var u = S, p = k;
1500
1500
  X(null), ae(null);
1501
1501
  try {
1502
1502
  for (var f, v = []; o !== null; ) {
@@ -1504,30 +1504,30 @@ function si(e) {
1504
1504
  try {
1505
1505
  var m = o[Ye]?.[i];
1506
1506
  m != null && (!o.disabled || e.target === o) && m.call(o, e);
1507
- } catch (y) {
1508
- f ? v.push(y) : f = y;
1507
+ } catch (b) {
1508
+ f ? v.push(b) : f = b;
1509
1509
  }
1510
1510
  if (e.cancelBubble || _ === t || _ === null) break;
1511
1511
  o = _;
1512
1512
  }
1513
1513
  if (f) {
1514
- for (let y of v) queueMicrotask(() => {
1515
- throw y;
1514
+ for (let b of v) queueMicrotask(() => {
1515
+ throw b;
1516
1516
  });
1517
1517
  throw f;
1518
1518
  }
1519
1519
  } finally {
1520
- e[Ye] = t, delete e.currentTarget, X(p), ae(d);
1520
+ e[Ye] = t, delete e.currentTarget, X(u), ae(p);
1521
1521
  }
1522
1522
  }
1523
1523
  }
1524
- var us = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1525
- function fs(e) {
1526
- return us?.createHTML(e) ?? e;
1524
+ var ps = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1525
+ function vs(e) {
1526
+ return ps?.createHTML(e) ?? e;
1527
1527
  }
1528
- function ds(e) {
1529
- var t = Sr("template");
1530
- return t.innerHTML = fs(e.replaceAll("<!>", "<!---->")), t.content;
1528
+ function _s(e) {
1529
+ var t = Ir("template");
1530
+ return t.innerHTML = vs(e.replaceAll("<!>", "<!---->")), t.content;
1531
1531
  }
1532
1532
  function Ke(e, t) {
1533
1533
  var r = k;
@@ -1539,21 +1539,21 @@ function Ke(e, t) {
1539
1539
  });
1540
1540
  }
1541
1541
  // @__NO_SIDE_EFFECTS__
1542
- function bn(e, t) {
1542
+ function Tn(e, t) {
1543
1543
  var r = (t & 1) !== 0, i = (t & 2) !== 0, n, o = !e.startsWith("<!>");
1544
1544
  return () => {
1545
1545
  if (O)
1546
1546
  return Ke(I, null), I;
1547
- n === void 0 && (n = ds(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ tt(n)));
1548
- var s = i || Qi ? document.importNode(n, !0) : n.cloneNode(!0);
1547
+ n === void 0 && (n = _s(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ tt(n)));
1548
+ var a = i || tn ? document.importNode(n, !0) : n.cloneNode(!0);
1549
1549
  if (r) {
1550
- var a = /* @__PURE__ */ tt(s), c = s.lastChild;
1551
- Ke(a, c);
1552
- } else Ke(s, s);
1553
- return s;
1550
+ var s = /* @__PURE__ */ tt(a), c = a.lastChild;
1551
+ Ke(s, c);
1552
+ } else Ke(a, a);
1553
+ return a;
1554
1554
  };
1555
1555
  }
1556
- function hs() {
1556
+ function gs() {
1557
1557
  if (O)
1558
1558
  return Ke(I, null), I;
1559
1559
  var e = document.createDocumentFragment(), t = document.createComment(""), r = _e();
@@ -1562,12 +1562,12 @@ function hs() {
1562
1562
  function Et(e, t) {
1563
1563
  if (O) {
1564
1564
  var r = k;
1565
- (!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = I), mr();
1565
+ (!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = I), br();
1566
1566
  return;
1567
1567
  }
1568
1568
  e !== null && e.before(t);
1569
1569
  }
1570
- var ps = [
1570
+ var ms = [
1571
1571
  "allowfullscreen",
1572
1572
  "async",
1573
1573
  "autofocus",
@@ -1596,8 +1596,8 @@ var ps = [
1596
1596
  "defer",
1597
1597
  "disablepictureinpicture",
1598
1598
  "disableremoteplayback"
1599
- ], Ga = [
1600
- ...ps,
1599
+ ], Ja = [
1600
+ ...ms,
1601
1601
  "formNoValidate",
1602
1602
  "isMap",
1603
1603
  "noModule",
@@ -1612,17 +1612,17 @@ var ps = [
1612
1612
  "allowFullscreen",
1613
1613
  "disablePictureInPicture",
1614
1614
  "disableRemotePlayback"
1615
- ], vs = ["touchstart", "touchmove"];
1616
- function _s(e) {
1617
- return vs.includes(e);
1615
+ ], ys = ["touchstart", "touchmove"];
1616
+ function bs(e) {
1617
+ return ys.includes(e);
1618
1618
  }
1619
- var gs = [
1619
+ var ws = [
1620
1620
  "$state",
1621
1621
  "$state.raw",
1622
1622
  "$derived",
1623
1623
  "$derived.by"
1624
- ], qa = [
1625
- ...gs,
1624
+ ], Qa = [
1625
+ ...ws,
1626
1626
  "$state.eager",
1627
1627
  "$state.snapshot",
1628
1628
  "$props",
@@ -1637,116 +1637,116 @@ var gs = [
1637
1637
  "$inspect().with",
1638
1638
  "$inspect.trace",
1639
1639
  "$host"
1640
- ], ai = !0;
1641
- function ms(e, t) {
1640
+ ], ci = !0;
1641
+ function Ts(e, t) {
1642
1642
  var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1643
1643
  r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = `${r}`);
1644
1644
  }
1645
- function yn(e, t) {
1646
- return wn(e, t);
1645
+ function kn(e, t) {
1646
+ return Sn(e, t);
1647
1647
  }
1648
- function bs(e, t) {
1649
- ur(), t.intro = t.intro ?? !1;
1648
+ function ks(e, t) {
1649
+ dr(), t.intro = t.intro ?? !1;
1650
1650
  const r = t.target, i = O, n = I;
1651
1651
  try {
1652
1652
  for (var o = /* @__PURE__ */ tt(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ me(o);
1653
1653
  if (!o) throw Xe;
1654
1654
  qe(!0), re(o);
1655
- const s = wn(e, {
1655
+ const a = Sn(e, {
1656
1656
  ...t,
1657
1657
  anchor: o
1658
1658
  });
1659
- return qe(!1), s;
1660
- } catch (s) {
1661
- if (s instanceof Error && s.message.split(`
1662
- `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1663
- return s !== Xe && console.warn("Failed to hydrate: ", s), t.recover === !1 && po(), ur(), Ko(r), qe(!1), yn(e, t);
1659
+ return qe(!1), a;
1660
+ } catch (a) {
1661
+ if (a instanceof Error && a.message.split(`
1662
+ `).some((s) => s.startsWith("https://svelte.dev/e/"))) throw a;
1663
+ return a !== Xe && console.warn("Failed to hydrate: ", a), t.recover === !1 && mo(), dr(), Zo(r), qe(!1), kn(e, t);
1664
1664
  } finally {
1665
1665
  qe(i), re(n);
1666
1666
  }
1667
1667
  }
1668
1668
  var $t = /* @__PURE__ */ new Map();
1669
- function wn(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: s = !0, transformError: a }) {
1670
- ur();
1671
- var c = void 0, h = ts(() => {
1672
- var p = r ?? t.appendChild(_e());
1673
- Ro(p, { pending: () => {
1669
+ function Sn(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: a = !0, transformError: s }) {
1670
+ dr();
1671
+ var c = void 0, h = os(() => {
1672
+ var u = r ?? t.appendChild(_e());
1673
+ Do(u, { pending: () => {
1674
1674
  } }, (v) => {
1675
- Mi({});
1676
- var _ = R;
1677
- if (o && (_.c = o), n && (i.$$events = n), O && Ke(v, null), ai = s, c = e(v, i) || {}, ai = !0, O && (k.nodes.end = I, I === null || I.nodeType !== 8 || I.data !== "]"))
1678
- throw zt(), Xe;
1679
- Oi();
1680
- }, a);
1681
- var d = /* @__PURE__ */ new Set(), f = (v) => {
1675
+ xi({});
1676
+ var _ = L;
1677
+ if (o && (_.c = o), n && (i.$$events = n), O && Ke(v, null), ci = a, c = e(v, i) || {}, ci = !0, O && (k.nodes.end = I, I === null || I.nodeType !== 8 || I.data !== "]"))
1678
+ throw Vt(), Xe;
1679
+ Li();
1680
+ }, s);
1681
+ var p = /* @__PURE__ */ new Set(), f = (v) => {
1682
1682
  for (var _ = 0; _ < v.length; _++) {
1683
1683
  var m = v[_];
1684
- if (!d.has(m)) {
1685
- d.add(m);
1686
- var y = _s(m);
1684
+ if (!p.has(m)) {
1685
+ p.add(m);
1686
+ var b = bs(m);
1687
1687
  for (const E of [t, document]) {
1688
1688
  var A = $t.get(E);
1689
1689
  A === void 0 && (A = /* @__PURE__ */ new Map(), $t.set(E, A));
1690
- var B = A.get(m);
1691
- B === void 0 ? (E.addEventListener(m, si, { passive: y }), A.set(m, 1)) : A.set(m, B + 1);
1690
+ var H = A.get(m);
1691
+ H === void 0 ? (E.addEventListener(m, li, { passive: b }), A.set(m, 1)) : A.set(m, H + 1);
1692
1692
  }
1693
1693
  }
1694
1694
  }
1695
1695
  };
1696
- return f(Kn(mn)), fr.add(f), () => {
1697
- for (var v of d) for (const y of [t, document]) {
1698
- var _ = $t.get(y), m = _.get(v);
1699
- --m == 0 ? (y.removeEventListener(v, si), _.delete(v), _.size === 0 && $t.delete(y)) : _.set(v, m);
1696
+ return f(Zn(wn)), hr.add(f), () => {
1697
+ for (var v of p) for (const b of [t, document]) {
1698
+ var _ = $t.get(b), m = _.get(v);
1699
+ --m == 0 ? (b.removeEventListener(v, li), _.delete(v), _.size === 0 && $t.delete(b)) : _.set(v, m);
1700
1700
  }
1701
- fr.delete(f), p !== r && p.parentNode?.removeChild(p);
1701
+ hr.delete(f), u !== r && u.parentNode?.removeChild(u);
1702
1702
  };
1703
1703
  });
1704
- return dr.set(c, h), c;
1704
+ return pr.set(c, h), c;
1705
1705
  }
1706
- var dr = /* @__PURE__ */ new WeakMap();
1707
- function ys(e, t) {
1708
- const r = dr.get(e);
1709
- return r ? (dr.delete(e), r(t)) : Promise.resolve();
1706
+ var pr = /* @__PURE__ */ new WeakMap();
1707
+ function Ss(e, t) {
1708
+ const r = pr.get(e);
1709
+ return r ? (pr.delete(e), r(t)) : Promise.resolve();
1710
1710
  }
1711
- var de = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap(), ws = class {
1711
+ var de = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ui = /* @__PURE__ */ new WeakMap(), $s = class {
1712
1712
  constructor(e, t = !0) {
1713
- g(this, "anchor", void 0), T(this, de, /* @__PURE__ */ new Map()), T(this, ke, /* @__PURE__ */ new Map()), T(this, J, /* @__PURE__ */ new Map()), T(this, ot, /* @__PURE__ */ new Set()), T(this, Jt, !0), T(this, Qt, (r) => {
1713
+ g(this, "anchor", void 0), T(this, de, /* @__PURE__ */ new Map()), T(this, ke, /* @__PURE__ */ new Map()), T(this, J, /* @__PURE__ */ new Map()), T(this, ot, /* @__PURE__ */ new Set()), T(this, Qt, !0), T(this, Zt, (r) => {
1714
1714
  if (l(de, this).has(r)) {
1715
1715
  var i = l(de, this).get(r), n = l(ke, this).get(i);
1716
1716
  if (n)
1717
- os(n), l(ot, this).delete(i);
1717
+ cs(n), l(ot, this).delete(i);
1718
1718
  else {
1719
1719
  var o = l(J, this).get(i);
1720
1720
  o && (l(ke, this).set(i, o.effect), l(J, this).delete(i), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), n = o.effect);
1721
1721
  }
1722
- for (const [s, a] of l(de, this)) {
1723
- if (l(de, this).delete(s), s === r) break;
1724
- const c = l(J, this).get(a);
1725
- c && (V(c.effect), l(J, this).delete(a));
1722
+ for (const [a, s] of l(de, this)) {
1723
+ if (l(de, this).delete(a), a === r) break;
1724
+ const c = l(J, this).get(s);
1725
+ c && (V(c.effect), l(J, this).delete(s));
1726
1726
  }
1727
- for (const [s, a] of l(ke, this)) {
1728
- if (s === i || l(ot, this).has(s)) continue;
1727
+ for (const [a, s] of l(ke, this)) {
1728
+ if (a === i || l(ot, this).has(a)) continue;
1729
1729
  const c = () => {
1730
- if (Array.from(l(de, this).values()).includes(s)) {
1730
+ if (Array.from(l(de, this).values()).includes(a)) {
1731
1731
  var h = document.createDocumentFragment();
1732
- un(a, h), h.append(_e()), l(J, this).set(s, {
1733
- effect: a,
1732
+ hn(s, h), h.append(_e()), l(J, this).set(a, {
1733
+ effect: s,
1734
1734
  fragment: h
1735
1735
  });
1736
- } else V(a);
1737
- l(ot, this).delete(s), l(ke, this).delete(s);
1736
+ } else V(s);
1737
+ l(ot, this).delete(a), l(ke, this).delete(a);
1738
1738
  };
1739
- l(Jt, this) || !n ? (l(ot, this).add(s), mt(a, c, !1)) : c();
1739
+ l(Qt, this) || !n ? (l(ot, this).add(a), mt(s, c, !1)) : c();
1740
1740
  }
1741
1741
  }
1742
- }), T(this, li, (r) => {
1742
+ }), T(this, ui, (r) => {
1743
1743
  l(de, this).delete(r);
1744
1744
  const i = Array.from(l(de, this).values());
1745
1745
  for (const [n, o] of l(J, this)) i.includes(n) || (V(o.effect), l(J, this).delete(n));
1746
- }), this.anchor = e, b(Jt, this, t);
1746
+ }), this.anchor = e, y(Qt, this, t);
1747
1747
  }
1748
1748
  ensure(e, t) {
1749
- var r = $, i = Xo();
1749
+ var r = $, i = es();
1750
1750
  if (t && !l(ke, this).has(e) && !l(J, this).has(e)) if (i) {
1751
1751
  var n = document.createDocumentFragment(), o = _e();
1752
1752
  n.append(o), l(J, this).set(e, {
@@ -1755,20 +1755,20 @@ var de = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), J =
1755
1755
  });
1756
1756
  } else l(ke, this).set(e, ge(() => t(this.anchor)));
1757
1757
  if (l(de, this).set(r, e), i) {
1758
- for (const [s, a] of l(ke, this)) s === e ? r.unskip_effect(a) : r.skip_effect(a);
1759
- for (const [s, a] of l(J, this)) s === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1760
- r.oncommit(l(Qt, this)), r.ondiscard(l(li, this));
1758
+ for (const [a, s] of l(ke, this)) a === e ? r.unskip_effect(s) : r.skip_effect(s);
1759
+ for (const [a, s] of l(J, this)) a === e ? r.unskip_effect(s.effect) : r.skip_effect(s.effect);
1760
+ r.oncommit(l(Zt, this)), r.ondiscard(l(ui, this));
1761
1761
  } else
1762
- O && (this.anchor = I), l(Qt, this).call(this, r);
1762
+ O && (this.anchor = I), l(Zt, this).call(this, r);
1763
1763
  }
1764
1764
  };
1765
- function Ts(e) {
1766
- R === null && ao("onMount"), vt && R.l !== null ? ks(R).m.push(e) : at(() => {
1765
+ function Is(e) {
1766
+ L === null && fo("onMount"), vt && L.l !== null ? As(L).m.push(e) : at(() => {
1767
1767
  const t = Ft(e);
1768
1768
  if (typeof t == "function") return t;
1769
1769
  });
1770
1770
  }
1771
- function ks(e) {
1771
+ function As(e) {
1772
1772
  var t = e.l;
1773
1773
  return t.u ?? (t.u = {
1774
1774
  a: [],
@@ -1776,52 +1776,52 @@ function ks(e) {
1776
1776
  m: []
1777
1777
  });
1778
1778
  }
1779
- function ci(e, t, r = !1) {
1779
+ function fi(e, t, r = !1) {
1780
1780
  var i;
1781
- O && (i = I, mr());
1782
- var n = new ws(e), o = r ? gr : 0;
1783
- function s(a, c) {
1781
+ O && (i = I, br());
1782
+ var n = new $s(e), o = r ? yr : 0;
1783
+ function a(s, c) {
1784
1784
  if (O) {
1785
- var h = wo(i);
1786
- if (a !== parseInt(h.substring(1))) {
1787
- var p = Ii();
1788
- re(p), n.anchor = p, qe(!1), n.ensure(a, c), qe(!0);
1785
+ var h = $o(i);
1786
+ if (s !== parseInt(h.substring(1))) {
1787
+ var u = Mi();
1788
+ re(u), n.anchor = u, qe(!1), n.ensure(s, c), qe(!0);
1789
1789
  return;
1790
1790
  }
1791
1791
  }
1792
- n.ensure(a, c);
1792
+ n.ensure(s, c);
1793
1793
  }
1794
- on(() => {
1795
- var a = !1;
1794
+ ln(() => {
1795
+ var s = !1;
1796
1796
  t((c, h = 0) => {
1797
- a = !0, s(h, c);
1798
- }), a || s(-1, null);
1797
+ s = !0, a(h, c);
1798
+ }), s || a(-1, null);
1799
1799
  }, o);
1800
1800
  }
1801
- function Ss(e, t) {
1802
- nn(() => {
1801
+ function Es(e, t) {
1802
+ an(() => {
1803
1803
  var r = e.getRootNode(), i = r.host ? r : r.head ?? r.ownerDocument.head;
1804
1804
  if (!i.querySelector("#" + t.hash)) {
1805
- const n = Sr("style");
1805
+ const n = Ir("style");
1806
1806
  n.id = t.hash, n.textContent = t.code, i.appendChild(n);
1807
1807
  }
1808
1808
  });
1809
1809
  }
1810
- var ui = [...`
1810
+ var di = [...`
1811
1811
  \r\f \v\uFEFF`];
1812
- function $s(e, t, r) {
1812
+ function Ms(e, t, r) {
1813
1813
  var i = e == null ? "" : "" + e;
1814
1814
  if (t && (i = i ? i + " " + t : t), r) {
1815
1815
  for (var n of Object.keys(r)) if (r[n]) i = i ? i + " " + n : n;
1816
1816
  else if (i.length)
1817
- for (var o = n.length, s = 0; (s = i.indexOf(n, s)) >= 0; ) {
1818
- var a = s + o;
1819
- (s === 0 || ui.includes(i[s - 1])) && (a === i.length || ui.includes(i[a])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(a + 1) : s = a;
1817
+ for (var o = n.length, a = 0; (a = i.indexOf(n, a)) >= 0; ) {
1818
+ var s = a + o;
1819
+ (a === 0 || di.includes(i[a - 1])) && (s === i.length || di.includes(i[s])) ? i = (a === 0 ? "" : i.substring(0, a)) + i.substring(s + 1) : a = s;
1820
1820
  }
1821
1821
  }
1822
1822
  return i === "" ? null : i;
1823
1823
  }
1824
- function fi(e, t = !1) {
1824
+ function hi(e, t = !1) {
1825
1825
  var r = t ? " !important;" : ";", i = "";
1826
1826
  for (var n of Object.keys(e)) {
1827
1827
  var o = e[n];
@@ -1829,196 +1829,196 @@ function fi(e, t = !1) {
1829
1829
  }
1830
1830
  return i;
1831
1831
  }
1832
- function Zt(e) {
1832
+ function er(e) {
1833
1833
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
1834
1834
  }
1835
- function Is(e, t) {
1835
+ function Os(e, t) {
1836
1836
  if (t) {
1837
1837
  var r = "", i, n;
1838
1838
  if (Array.isArray(t) ? (i = t[0], n = t[1]) : i = t, e) {
1839
1839
  e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1840
- var o = !1, s = 0, a = !1, c = [];
1841
- i && c.push(...Object.keys(i).map(Zt)), n && c.push(...Object.keys(n).map(Zt));
1842
- var h = 0, p = -1;
1840
+ var o = !1, a = 0, s = !1, c = [];
1841
+ i && c.push(...Object.keys(i).map(er)), n && c.push(...Object.keys(n).map(er));
1842
+ var h = 0, u = -1;
1843
1843
  const m = e.length;
1844
- for (var d = 0; d < m; d++) {
1845
- var f = e[d];
1846
- if (a ? f === "/" && e[d - 1] === "*" && (a = !1) : o ? o === f && (o = !1) : f === "/" && e[d + 1] === "*" ? a = !0 : f === '"' || f === "'" ? o = f : f === "(" ? s++ : f === ")" && s--, !a && o === !1 && s === 0) {
1847
- if (f === ":" && p === -1) p = d;
1848
- else if (f === ";" || d === m - 1) {
1849
- if (p !== -1) {
1850
- var v = Zt(e.substring(h, p).trim());
1844
+ for (var p = 0; p < m; p++) {
1845
+ var f = e[p];
1846
+ if (s ? f === "/" && e[p - 1] === "*" && (s = !1) : o ? o === f && (o = !1) : f === "/" && e[p + 1] === "*" ? s = !0 : f === '"' || f === "'" ? o = f : f === "(" ? a++ : f === ")" && a--, !s && o === !1 && a === 0) {
1847
+ if (f === ":" && u === -1) u = p;
1848
+ else if (f === ";" || p === m - 1) {
1849
+ if (u !== -1) {
1850
+ var v = er(e.substring(h, u).trim());
1851
1851
  if (!c.includes(v)) {
1852
- f !== ";" && d++;
1853
- var _ = e.substring(h, d).trim();
1852
+ f !== ";" && p++;
1853
+ var _ = e.substring(h, p).trim();
1854
1854
  r += " " + _ + ";";
1855
1855
  }
1856
1856
  }
1857
- h = d + 1, p = -1;
1857
+ h = p + 1, u = -1;
1858
1858
  }
1859
1859
  }
1860
1860
  }
1861
1861
  }
1862
- return i && (r += fi(i)), n && (r += fi(n, !0)), r = r.trim(), r === "" ? null : r;
1862
+ return i && (r += hi(i)), n && (r += hi(n, !0)), r = r.trim(), r === "" ? null : r;
1863
1863
  }
1864
1864
  return e == null ? null : String(e);
1865
1865
  }
1866
- function As(e, t, r, i, n, o) {
1867
- var s = e.__className;
1868
- if (O || s !== r || s === void 0) {
1869
- var a = $s(r, i, o);
1870
- (!O || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e.__className = r;
1866
+ function Ps(e, t, r, i, n, o) {
1867
+ var a = e.__className;
1868
+ if (O || a !== r || a === void 0) {
1869
+ var s = Ms(r, i, o);
1870
+ (!O || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e.__className = r;
1871
1871
  } else if (o && n !== o) for (var c in o) {
1872
1872
  var h = !!o[c];
1873
1873
  (n == null || h !== !!n[c]) && e.classList.toggle(c, h);
1874
1874
  }
1875
1875
  return o;
1876
1876
  }
1877
- function er(e, t = {}, r, i) {
1877
+ function tr(e, t = {}, r, i) {
1878
1878
  for (var n in r) {
1879
1879
  var o = r[n];
1880
1880
  t[n] !== o && (r[n] == null ? e.style.removeProperty(n) : e.style.setProperty(n, o, i));
1881
1881
  }
1882
1882
  }
1883
- function We(e, t, r, i) {
1883
+ function Fe(e, t, r, i) {
1884
1884
  var n = e.__style;
1885
1885
  if (O || n !== t) {
1886
- var o = Is(t, i);
1886
+ var o = Os(t, i);
1887
1887
  (!O || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e.__style = t;
1888
- } else i && (Array.isArray(i) ? (er(e, r?.[0], i[0]), er(e, r?.[1], i[1], "important")) : er(e, r, i));
1888
+ } else i && (Array.isArray(i) ? (tr(e, r?.[0], i[0]), tr(e, r?.[1], i[1], "important")) : tr(e, r, i));
1889
1889
  return i;
1890
1890
  }
1891
- var Es = Symbol("is custom element"), Ms = Symbol("is html"), Os = so ? "link" : "LINK";
1892
- function Ps(e, t, r, i) {
1893
- var n = xs(e);
1894
- if (O && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Os)) {
1891
+ var xs = Symbol("is custom element"), Ls = Symbol("is html"), Rs = uo ? "link" : "LINK";
1892
+ function Cs(e, t, r, i) {
1893
+ var n = Ns(e);
1894
+ if (O && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Rs)) {
1895
1895
  i || void 0;
1896
1896
  return;
1897
1897
  }
1898
- n[t] !== (n[t] = r) && (t === "loading" && (e[no] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Rs(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1898
+ n[t] !== (n[t] = r) && (t === "loading" && (e[lo] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ds(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1899
1899
  }
1900
- function xs(e) {
1900
+ function Ns(e) {
1901
1901
  return e.__attributes ?? (e.__attributes = {
1902
- [Es]: e.nodeName.includes("-"),
1903
- [Ms]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
1902
+ [xs]: e.nodeName.includes("-"),
1903
+ [Ls]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
1904
1904
  });
1905
1905
  }
1906
- var di = /* @__PURE__ */ new Map();
1907
- function Rs(e) {
1908
- var t = e.getAttribute("is") || e.nodeName, r = di.get(t);
1906
+ var pi = /* @__PURE__ */ new Map();
1907
+ function Ds(e) {
1908
+ var t = e.getAttribute("is") || e.nodeName, r = pi.get(t);
1909
1909
  if (r) return r;
1910
- di.set(t, r = []);
1910
+ pi.set(t, r = []);
1911
1911
  for (var i, n = e, o = Element.prototype; o !== n; ) {
1912
- i = Xn(n);
1913
- for (var s in i) i[s].set && r.push(s);
1914
- n = Ti(n);
1912
+ i = eo(n);
1913
+ for (var a in i) i[a].set && r.push(a);
1914
+ n = $i(n);
1915
1915
  }
1916
1916
  return r;
1917
1917
  }
1918
- var Tn, Ge = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakSet(), kn = class {
1918
+ var $n, Ge = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakSet(), In = class {
1919
1919
  constructor(e) {
1920
- yr(this, hi), T(this, Ge, /* @__PURE__ */ new WeakMap()), T(this, jt, void 0), T(this, tr, void 0), b(tr, this, e);
1920
+ Tr(this, vi), T(this, Ge, /* @__PURE__ */ new WeakMap()), T(this, jt, void 0), T(this, rr, void 0), y(rr, this, e);
1921
1921
  }
1922
1922
  observe(e, t) {
1923
1923
  var r = l(Ge, this).get(e) || /* @__PURE__ */ new Set();
1924
- return r.add(t), l(Ge, this).set(e, r), M(hi, this, Cs).call(this).observe(e, l(tr, this)), () => {
1924
+ return r.add(t), l(Ge, this).set(e, r), M(vi, this, js).call(this).observe(e, l(rr, this)), () => {
1925
1925
  var i = l(Ge, this).get(e);
1926
1926
  i.delete(t), i.size === 0 && (l(Ge, this).delete(e), l(jt, this).unobserve(e));
1927
1927
  };
1928
1928
  }
1929
1929
  };
1930
- Tn = kn;
1931
- function Cs() {
1932
- return l(jt, this) ?? b(jt, this, new ResizeObserver((e) => {
1930
+ $n = In;
1931
+ function js() {
1932
+ return l(jt, this) ?? y(jt, this, new ResizeObserver((e) => {
1933
1933
  for (var t of e) {
1934
- Tn.entries.set(t.target, t);
1934
+ $n.entries.set(t.target, t);
1935
1935
  for (var r of l(Ge, this).get(t.target) || []) r(t);
1936
1936
  }
1937
1937
  }));
1938
1938
  }
1939
- g(kn, "entries", /* @__PURE__ */ new WeakMap());
1940
- function pi(e, t) {
1939
+ g(In, "entries", /* @__PURE__ */ new WeakMap());
1940
+ function _i(e, t) {
1941
1941
  return e === t || e?.[lt] === t;
1942
1942
  }
1943
- function Ls(e = {}, t, r, i) {
1944
- var n = R.r, o = k;
1945
- return nn(() => {
1946
- var s, a;
1947
- return Ar(() => {
1948
- s = a, a = i?.() || [], Ft(() => {
1949
- e !== r(...a) && (t(e, ...a), s && pi(r(...s), e) && t(null, ...s));
1943
+ function zs(e = {}, t, r, i) {
1944
+ var n = L.r, o = k;
1945
+ return an(() => {
1946
+ var a, s;
1947
+ return Mr(() => {
1948
+ a = s, s = i?.() || [], Ft(() => {
1949
+ e !== r(...s) && (t(e, ...s), a && _i(r(...a), e) && t(null, ...a));
1950
1950
  });
1951
1951
  }), () => {
1952
1952
  let c = o;
1953
1953
  for (; c !== n && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
1954
1954
  const h = () => {
1955
- a && pi(r(...a), e) && t(null, ...a);
1956
- }, p = c.teardown;
1955
+ s && _i(r(...s), e) && t(null, ...s);
1956
+ }, u = c.teardown;
1957
1957
  c.teardown = () => {
1958
- h(), p?.();
1958
+ h(), u?.();
1959
1959
  };
1960
1960
  };
1961
1961
  }), e;
1962
1962
  }
1963
- function vi(e, t, r, i) {
1964
- var n = !vt || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, a = i, c = !0, h = () => (c && (c = !1, a = s ? Ft(i) : i), a);
1965
- let p;
1963
+ function gi(e, t, r, i) {
1964
+ var n = !vt || (r & 2) !== 0, o = (r & 8) !== 0, a = (r & 16) !== 0, s = i, c = !0, h = () => (c && (c = !1, s = a ? Ft(i) : i), s);
1965
+ let u;
1966
1966
  if (o) {
1967
- var d = lt in e || Si in e;
1968
- p = Le(e, t)?.set ?? (d && t in e ? (E) => e[t] = E : void 0);
1967
+ var p = lt in e || Ai in e;
1968
+ u = Ce(e, t)?.set ?? (p && t in e ? (E) => e[t] = E : void 0);
1969
1969
  }
1970
1970
  var f, v = !1;
1971
- o ? [f, v] = Ao(() => e[t]) : f = e[t], f === void 0 && i !== void 0 && (f = h(), p && (n && vo(t), p(f)));
1971
+ o ? [f, v] = Po(() => e[t]) : f = e[t], f === void 0 && i !== void 0 && (f = h(), u && (n && yo(t), u(f)));
1972
1972
  var _;
1973
1973
  if (n ? _ = () => {
1974
1974
  var E = e[t];
1975
1975
  return E === void 0 ? h() : (c = !0, E);
1976
1976
  } : _ = () => {
1977
1977
  var E = e[t];
1978
- return E !== void 0 && (a = void 0), E === void 0 ? a : E;
1978
+ return E !== void 0 && (s = void 0), E === void 0 ? s : E;
1979
1979
  }, n && !(r & 4)) return _;
1980
- if (p) {
1980
+ if (u) {
1981
1981
  var m = e.$$legacy;
1982
- return function(E, H) {
1983
- return arguments.length > 0 ? ((!n || !H || m || v) && p(H ? _() : E), E) : _();
1982
+ return function(E, B) {
1983
+ return arguments.length > 0 ? ((!n || !B || m || v) && u(B ? _() : E), E) : _();
1984
1984
  };
1985
1985
  }
1986
- var y = !1, A = (r & 1 ? Vt : qi)(() => (y = !1, _()));
1987
- o && u(A);
1988
- var B = k;
1989
- return function(E, H) {
1986
+ var b = !1, A = (r & 1 ? Wt : Xi)(() => (b = !1, _()));
1987
+ o && d(A);
1988
+ var H = k;
1989
+ return function(E, B) {
1990
1990
  if (arguments.length > 0) {
1991
- const we = H ? u(A) : n && o ? se(E) : E;
1992
- return P(A, we), y = !0, a !== void 0 && (a = we), E;
1991
+ const we = B ? d(A) : n && o ? se(E) : E;
1992
+ return P(A, we), b = !0, s !== void 0 && (s = we), E;
1993
1993
  }
1994
- return Me && y || B.f & 16384 ? A.v : u(A);
1994
+ return Me && b || H.f & 16384 ? A.v : d(A);
1995
1995
  };
1996
1996
  }
1997
- function Ns(e) {
1998
- return new Ds(e);
1997
+ function Vs(e) {
1998
+ return new Ws(e);
1999
1999
  }
2000
- var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ds = class {
2000
+ var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ws = class {
2001
2001
  constructor(e) {
2002
2002
  T(this, Pe, void 0), T(this, ie, void 0);
2003
2003
  var t = /* @__PURE__ */ new Map(), r = (n, o) => {
2004
- var s = /* @__PURE__ */ Ho(o, !1, !1);
2005
- return t.set(n, s), s;
2004
+ var a = /* @__PURE__ */ Yo(o, !1, !1);
2005
+ return t.set(n, a), a;
2006
2006
  };
2007
2007
  const i = new Proxy({
2008
2008
  ...e.props || {},
2009
2009
  $$events: {}
2010
2010
  }, {
2011
2011
  get(n, o) {
2012
- return u(t.get(o) ?? r(o, Reflect.get(n, o)));
2012
+ return d(t.get(o) ?? r(o, Reflect.get(n, o)));
2013
2013
  },
2014
2014
  has(n, o) {
2015
- return o === Si ? !0 : (u(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
2015
+ return o === Ai ? !0 : (d(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
2016
2016
  },
2017
- set(n, o, s) {
2018
- return P(t.get(o) ?? r(o, s), s), Reflect.set(n, o, s);
2017
+ set(n, o, a) {
2018
+ return P(t.get(o) ?? r(o, a), a), Reflect.set(n, o, a);
2019
2019
  }
2020
2020
  });
2021
- b(ie, this, (e.hydrate ? bs : yn)(e.component, {
2021
+ y(ie, this, (e.hydrate ? ks : kn)(e.component, {
2022
2022
  target: e.target,
2023
2023
  anchor: e.anchor,
2024
2024
  props: i,
@@ -2026,7 +2026,7 @@ var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ds =
2026
2026
  intro: e.intro ?? !1,
2027
2027
  recover: e.recover,
2028
2028
  transformError: e.transformError
2029
- })), !Ee && (!e?.props?.$$host || e.sync === !1) && or(), b(Pe, this, i.$$events);
2029
+ })), !Ee && (!e?.props?.$$host || e.sync === !1) && ar(), y(Pe, this, i.$$events);
2030
2030
  for (const n of Object.keys(l(ie, this)))
2031
2031
  n === "$set" || n === "$destroy" || n === "$on" || xt(this, n, {
2032
2032
  get() {
@@ -2040,7 +2040,7 @@ var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ds =
2040
2040
  l(ie, this).$set = (n) => {
2041
2041
  Object.assign(i, n);
2042
2042
  }, l(ie, this).$destroy = () => {
2043
- ys(l(ie, this));
2043
+ Ss(l(ie, this));
2044
2044
  };
2045
2045
  }
2046
2046
  $set(e) {
@@ -2056,8 +2056,8 @@ var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ds =
2056
2056
  $destroy() {
2057
2057
  l(ie, this).$destroy();
2058
2058
  }
2059
- }, Sn;
2060
- typeof HTMLElement == "function" && (Sn = class extends HTMLElement {
2059
+ }, An;
2060
+ typeof HTMLElement == "function" && (An = class extends HTMLElement {
2061
2061
  constructor(e, t, r) {
2062
2062
  super(), g(this, "$$ctor", void 0), g(this, "$$s", void 0), g(this, "$$c", void 0), g(this, "$$cn", !1), g(this, "$$d", {}), g(this, "$$r", !1), g(this, "$$p_d", {}), g(this, "$$l", {}), g(this, "$$l_u", /* @__PURE__ */ new Map()), g(this, "$$me", void 0), g(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
2063
2063
  }
@@ -2078,19 +2078,19 @@ typeof HTMLElement == "function" && (Sn = class extends HTMLElement {
2078
2078
  if (this.$$cn = !0, !this.$$c) {
2079
2079
  let e = function(i) {
2080
2080
  return (n) => {
2081
- const o = Sr("slot");
2081
+ const o = Ir("slot");
2082
2082
  i !== "default" && (o.name = i), Et(n, o);
2083
2083
  };
2084
2084
  };
2085
2085
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2086
- const t = {}, r = js(this);
2086
+ const t = {}, r = Fs(this);
2087
2087
  for (const i of this.$$s) i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
2088
2088
  for (const i of this.attributes) {
2089
2089
  const n = this.$$g_p(i.name);
2090
2090
  n in this.$$d || (this.$$d[n] = Mt(n, i.value, this.$$p_d, "toProp"));
2091
2091
  }
2092
2092
  for (const i in this.$$p_d) !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
2093
- this.$$c = Ns({
2093
+ this.$$c = Vs({
2094
2094
  component: this.$$ctor,
2095
2095
  target: this.$$shadowRoot || this,
2096
2096
  props: {
@@ -2098,8 +2098,8 @@ typeof HTMLElement == "function" && (Sn = class extends HTMLElement {
2098
2098
  $$slots: t,
2099
2099
  $$host: this
2100
2100
  }
2101
- }), this.$$me = es(() => {
2102
- Ar(() => {
2101
+ }), this.$$me = ns(() => {
2102
+ Mr(() => {
2103
2103
  this.$$r = !0;
2104
2104
  for (const i of Pt(this.$$c)) {
2105
2105
  if (!this.$$p_d[i]?.reflect) continue;
@@ -2155,46 +2155,46 @@ function Mt(e, t, r, i) {
2155
2155
  return t;
2156
2156
  }
2157
2157
  }
2158
- function js(e) {
2158
+ function Fs(e) {
2159
2159
  const t = {};
2160
2160
  return e.childNodes.forEach((r) => {
2161
2161
  t[r.slot || "default"] = !0;
2162
2162
  }), t;
2163
2163
  }
2164
- function zs(e, t, r, i, n, o) {
2165
- let s = class extends Sn {
2164
+ function Hs(e, t, r, i, n, o) {
2165
+ let a = class extends An {
2166
2166
  constructor() {
2167
2167
  super(e, r, n), this.$$p_d = t;
2168
2168
  }
2169
2169
  static get observedAttributes() {
2170
- return Pt(t).map((a) => (t[a].attribute || a).toLowerCase());
2170
+ return Pt(t).map((s) => (t[s].attribute || s).toLowerCase());
2171
2171
  }
2172
2172
  };
2173
- return Pt(t).forEach((a) => {
2174
- xt(s.prototype, a, {
2173
+ return Pt(t).forEach((s) => {
2174
+ xt(a.prototype, s, {
2175
2175
  get() {
2176
- return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2176
+ return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
2177
2177
  },
2178
2178
  set(c) {
2179
- c = Mt(a, c, t), this.$$d[a] = c;
2179
+ c = Mt(s, c, t), this.$$d[s] = c;
2180
2180
  var h = this.$$c;
2181
- h && (Le(h, a)?.get ? h[a] = c : h.$set({ [a]: c }));
2181
+ h && (Ce(h, s)?.get ? h[s] = c : h.$set({ [s]: c }));
2182
2182
  }
2183
2183
  });
2184
- }), i.forEach((a) => {
2185
- xt(s.prototype, a, { get() {
2186
- return this.$$c?.[a];
2184
+ }), i.forEach((s) => {
2185
+ xt(a.prototype, s, { get() {
2186
+ return this.$$c?.[s];
2187
2187
  } });
2188
- }), o && (s = o(s)), e.element = s, s;
2188
+ }), o && (a = o(a)), e.element = a, a;
2189
2189
  }
2190
- var Vs = class extends Event {
2190
+ var Bs = class extends Event {
2191
2191
  constructor(e, t, r, i) {
2192
2192
  super("context-request", {
2193
2193
  bubbles: !0,
2194
2194
  composed: !0
2195
2195
  }), g(this, "context", void 0), g(this, "contextTarget", void 0), g(this, "callback", void 0), g(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = i ?? !1;
2196
2196
  }
2197
- }, Fs = class {
2197
+ }, Us = class {
2198
2198
  constructor(e, t) {
2199
2199
  g(this, "host", void 0), g(this, "context", void 0), g(this, "subscribe", void 0), g(this, "onValue", void 0), g(this, "isConnected", !1), g(this, "unsubscribe", void 0), g(this, "currentValue", void 0), g(this, "handleValue", (r, i) => {
2200
2200
  i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
@@ -2210,12 +2210,12 @@ var Vs = class extends Event {
2210
2210
  return this.currentValue;
2211
2211
  }
2212
2212
  requestValue() {
2213
- this.host.dispatchEvent(new Vs(this.context, this.host, this.handleValue, this.subscribe));
2213
+ this.host.dispatchEvent(new Bs(this.context, this.host, this.handleValue, this.subscribe));
2214
2214
  }
2215
- }, Wt = (e) => e, Ws = Wt(Symbol.for("pie.assessmentToolkit.runtimeContext")), Ya = Wt(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Ka = Wt(Symbol.for("pie.assessmentToolkit.shellContext")), Xa = Wt(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2216
- function Bs(e, t, r) {
2215
+ }, Ht = (e) => e, Gs = Ht(Symbol.for("pie.assessmentToolkit.runtimeContext")), Za = Ht(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), el = Ht(Symbol.for("pie.assessmentToolkit.shellContext")), tl = Ht(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2216
+ function qs(e, t, r) {
2217
2217
  let i = !1;
2218
- const n = new Fs(e, {
2218
+ const n = new Us(e, {
2219
2219
  context: t,
2220
2220
  subscribe: !0,
2221
2221
  onValue: (h) => {
@@ -2227,54 +2227,54 @@ function Bs(e, t, r) {
2227
2227
  h.context === t && n.requestValue();
2228
2228
  };
2229
2229
  e.addEventListener("context-provider", o);
2230
- let s = 0;
2231
- const a = 200, c = globalThis.setInterval(() => {
2232
- if (i || s >= a) {
2230
+ let a = 0;
2231
+ const s = 200, c = globalThis.setInterval(() => {
2232
+ if (i || a >= s) {
2233
2233
  globalThis.clearInterval(c);
2234
2234
  return;
2235
2235
  }
2236
- s += 1, n.requestValue();
2236
+ a += 1, n.requestValue();
2237
2237
  }, 50);
2238
2238
  return () => {
2239
2239
  globalThis.clearInterval(c), e.removeEventListener("context-provider", o), n.disconnect();
2240
2240
  };
2241
2241
  }
2242
- function Hs(e, t) {
2243
- return Bs(e, Ws, t);
2242
+ function Ys(e, t) {
2243
+ return qs(e, Gs, t);
2244
2244
  }
2245
- function Us(e, t) {
2246
- return Hs(e, t);
2245
+ function Ks(e, t) {
2246
+ return Ys(e, t);
2247
2247
  }
2248
- var _i;
2248
+ var mi;
2249
2249
  (function(e) {
2250
2250
  e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
2251
- })(_i || (_i = {}));
2252
- var gi;
2251
+ })(mi || (mi = {}));
2252
+ var yi;
2253
2253
  (function(e) {
2254
2254
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2255
- })(gi || (gi = {}));
2256
- function $n(e) {
2255
+ })(yi || (yi = {}));
2256
+ function En(e) {
2257
2257
  return (...t) => {
2258
2258
  console.debug(`[${e}]`, ...t);
2259
2259
  };
2260
2260
  }
2261
- var Ja = $n("I18nService"), rr = {
2261
+ var rl = En("I18nService"), ir = {
2262
2262
  assessment: [],
2263
2263
  section: [],
2264
2264
  item: [],
2265
2265
  passage: [],
2266
2266
  rubric: [],
2267
2267
  element: []
2268
- }, Qa = {
2269
- section: [...rr.section],
2270
- item: [...rr.item],
2271
- passage: [...rr.passage]
2268
+ }, il = {
2269
+ section: [...ir.section],
2270
+ item: [...ir.item],
2271
+ passage: [...ir.passage]
2272
2272
  };
2273
- function Gs(e) {
2273
+ function Xs(e) {
2274
2274
  const t = e.trim();
2275
2275
  return t || "";
2276
2276
  }
2277
- var qs = [
2277
+ var Js = [
2278
2278
  "assessment",
2279
2279
  "section",
2280
2280
  "item",
@@ -2285,10 +2285,10 @@ var qs = [
2285
2285
  function Ot(e, t) {
2286
2286
  if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
2287
2287
  }
2288
- function mi(e) {
2288
+ function bi(e) {
2289
2289
  if (Ot(e.toolId, "toolId"), Ot(e.name, "name"), Ot(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
2290
2290
  if (!Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2291
- const t = e.supportedLevels.find((r) => !qs.includes(r));
2291
+ const t = e.supportedLevels.find((r) => !Js.includes(r));
2292
2292
  if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
2293
2293
  if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
2294
2294
  if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
@@ -2297,23 +2297,23 @@ function mi(e) {
2297
2297
  if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
2298
2298
  if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
2299
2299
  }
2300
- var Ys = class {
2300
+ var Qs = class {
2301
2301
  constructor() {
2302
2302
  g(this, "tools", /* @__PURE__ */ new Map()), g(this, "pnpIndex", /* @__PURE__ */ new Map()), g(this, "componentOverrides", {}), g(this, "moduleLoaders", /* @__PURE__ */ new Map()), g(this, "loadedToolModules", /* @__PURE__ */ new Set()), g(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
2303
2303
  }
2304
2304
  normalizeToolId(e) {
2305
- return Gs(e);
2305
+ return Xs(e);
2306
2306
  }
2307
2307
  normalizeToolIds(e) {
2308
2308
  return e.map((t) => this.normalizeToolId(t));
2309
2309
  }
2310
2310
  register(e) {
2311
- if (mi(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2311
+ if (bi(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2312
2312
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
2313
2313
  this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
2314
2314
  }
2315
2315
  override(e) {
2316
- if (mi(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2316
+ if (bi(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2317
2317
  const t = this.tools.get(e.toolId);
2318
2318
  if (t.pnpSupportIds) for (const r of t.pnpSupportIds) this.pnpIndex.get(r)?.delete(e.toolId);
2319
2319
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const r of e.pnpSupportIds)
@@ -2440,35 +2440,35 @@ var Ys = class {
2440
2440
  return i.renderToolbar(t, n);
2441
2441
  }
2442
2442
  };
2443
- function In(e) {
2443
+ function Mn(e) {
2444
2444
  return e.level === "item";
2445
2445
  }
2446
- function Ks(e) {
2446
+ function Zs(e) {
2447
2447
  return e.level === "passage";
2448
2448
  }
2449
- function Xs(e) {
2449
+ function ea(e) {
2450
2450
  return e.level === "rubric";
2451
2451
  }
2452
- function An(e) {
2452
+ function On(e) {
2453
2453
  return e.level === "element";
2454
2454
  }
2455
- function Mr(e) {
2456
- if (An(e)) {
2455
+ function Pr(e) {
2456
+ if (On(e)) {
2457
2457
  const t = e.item.config;
2458
2458
  if (!t) return "";
2459
- const r = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
2459
+ const r = [], i = (s) => s.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
2460
2460
  n && typeof n == "string" && r.push(i(n));
2461
- const o = t.models, s = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((a) => a && typeof a == "object" && a.id === e.elementId);
2462
- if (s) {
2463
- for (const a of Object.values(s))
2464
- if (typeof a == "string" && r.push(i(a)), Array.isArray(a)) {
2465
- for (const c of a) if (c && typeof c == "object")
2461
+ const o = t.models, a = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((s) => s && typeof s == "object" && s.id === e.elementId);
2462
+ if (a) {
2463
+ for (const s of Object.values(a))
2464
+ if (typeof s == "string" && r.push(i(s)), Array.isArray(s)) {
2465
+ for (const c of s) if (c && typeof c == "object")
2466
2466
  for (const h of Object.values(c)) typeof h == "string" && r.push(i(h));
2467
2467
  }
2468
2468
  }
2469
2469
  return r.filter(Boolean).join(" ").trim();
2470
2470
  }
2471
- if (In(e)) {
2471
+ if (Mn(e)) {
2472
2472
  const t = e.item;
2473
2473
  if (!t?.config) return "";
2474
2474
  const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
@@ -2476,18 +2476,18 @@ function Mr(e) {
2476
2476
  const o = r.elements;
2477
2477
  if (o && typeof o == "object")
2478
2478
  for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
2479
- const s = r.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2480
- for (const c of a)
2479
+ const a = r.models, s = Array.isArray(a) ? a : a && typeof a == "object" ? Object.values(a) : [];
2480
+ for (const c of s)
2481
2481
  if (!(!c || typeof c != "object")) {
2482
2482
  for (const h of Object.values(c))
2483
2483
  if (typeof h == "string" && i.push(n(h)), Array.isArray(h)) {
2484
- for (const p of h) if (p && typeof p == "object")
2485
- for (const d of Object.values(p)) typeof d == "string" && i.push(n(d));
2484
+ for (const u of h) if (u && typeof u == "object")
2485
+ for (const p of Object.values(u)) typeof p == "string" && i.push(n(p));
2486
2486
  }
2487
2487
  }
2488
2488
  return i.filter(Boolean).join(" ").trim();
2489
2489
  }
2490
- if (Ks(e)) {
2490
+ if (Zs(e)) {
2491
2491
  const t = e.passage;
2492
2492
  if (!t?.config) return "";
2493
2493
  const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
@@ -2495,25 +2495,25 @@ function Mr(e) {
2495
2495
  const o = r.elements;
2496
2496
  if (o && typeof o == "object")
2497
2497
  for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
2498
- const s = r.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2499
- for (const c of a)
2498
+ const a = r.models, s = Array.isArray(a) ? a : a && typeof a == "object" ? Object.values(a) : [];
2499
+ for (const c of s)
2500
2500
  if (!(!c || typeof c != "object")) {
2501
2501
  for (const h of Object.values(c))
2502
2502
  if (typeof h == "string" && i.push(n(h)), Array.isArray(h)) {
2503
- for (const p of h) if (p && typeof p == "object")
2504
- for (const d of Object.values(p)) typeof d == "string" && i.push(n(d));
2503
+ for (const u of h) if (u && typeof u == "object")
2504
+ for (const p of Object.values(u)) typeof p == "string" && i.push(n(p));
2505
2505
  }
2506
2506
  }
2507
2507
  return i.filter(Boolean).join(" ").trim();
2508
2508
  }
2509
- if (Xs(e)) {
2509
+ if (ea(e)) {
2510
2510
  const t = e.rubricBlock;
2511
2511
  return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
2512
2512
  }
2513
2513
  return "";
2514
2514
  }
2515
2515
  function Bt(e) {
2516
- const t = Mr(e);
2516
+ const t = Pr(e);
2517
2517
  return [
2518
2518
  /<math[>\s]/i,
2519
2519
  /\\\[([^\]]+)\\\]/,
@@ -2523,7 +2523,7 @@ function Bt(e) {
2523
2523
  /\d+\s*[+\-*/=]\s*\d+/
2524
2524
  ].some((r) => r.test(t));
2525
2525
  }
2526
- function Js(e) {
2526
+ function ta(e) {
2527
2527
  const t = [
2528
2528
  "pie-multiple-choice",
2529
2529
  "pie-inline-choice",
@@ -2532,7 +2532,7 @@ function Js(e) {
2532
2532
  "inline-choice",
2533
2533
  "select-text"
2534
2534
  ];
2535
- if (An(e)) {
2535
+ if (On(e)) {
2536
2536
  const r = e.item.config;
2537
2537
  if (!r?.models) return !1;
2538
2538
  const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((o) => o && typeof o == "object" && o.id === e.elementId);
@@ -2540,7 +2540,7 @@ function Js(e) {
2540
2540
  const n = i.element || "";
2541
2541
  return t.includes(n);
2542
2542
  }
2543
- if (In(e)) {
2543
+ if (Mn(e)) {
2544
2544
  const r = e.item.config?.models;
2545
2545
  return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((i) => {
2546
2546
  if (!i || typeof i != "object") return !1;
@@ -2550,11 +2550,11 @@ function Js(e) {
2550
2550
  }
2551
2551
  return !1;
2552
2552
  }
2553
- function Ht(e) {
2554
- return Mr(e).trim().length >= 10;
2553
+ function Ut(e) {
2554
+ return Pr(e).trim().length >= 10;
2555
2555
  }
2556
- function Qs(e) {
2557
- const t = Mr(e);
2556
+ function ra(e) {
2557
+ const t = Pr(e);
2558
2558
  return [
2559
2559
  /chemistry|chemical|element|atom|molecule|compound/i,
2560
2560
  /periodic\s+table/i,
@@ -2564,23 +2564,23 @@ function Qs(e) {
2564
2564
  /physics|force|energy|velocity|acceleration/i
2565
2565
  ].some((r) => r.test(t));
2566
2566
  }
2567
- var Zs = [
2567
+ var ia = [
2568
2568
  "assessment",
2569
2569
  "section",
2570
2570
  "item",
2571
2571
  "passage",
2572
2572
  "rubric"
2573
- ], ea = new Set(Zs);
2574
- function ta(e) {
2575
- return ea.has(e);
2573
+ ], na = new Set(ia);
2574
+ function oa(e) {
2575
+ return na.has(e);
2576
2576
  }
2577
- function Or(e, t, r) {
2577
+ function xr(e, t, r) {
2578
2578
  const i = e.trim(), n = r.trim();
2579
2579
  if (!i || !n) throw new Error("Tool instance ids require non-empty tool and scope ids");
2580
- if (!ta(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
2580
+ if (!oa(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
2581
2581
  return `${i}:${t}:${n}`;
2582
2582
  }
2583
- var ra = class {
2583
+ var sa = class {
2584
2584
  constructor() {
2585
2585
  g(this, "providerId", "desmos-calculator"), g(this, "providerName", "Desmos Calculator"), g(this, "category", "calculator"), g(this, "version", "1.10"), g(this, "requiresAuth", !0), g(this, "desmosProvider", null), g(this, "config", null);
2586
2586
  }
@@ -2655,13 +2655,13 @@ var ra = class {
2655
2655
  destroy() {
2656
2656
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
2657
2657
  }
2658
- }, ia = (e, t) => {
2658
+ }, aa = (e, t) => {
2659
2659
  const r = t?.useSentenceSegmenter !== !1;
2660
2660
  try {
2661
2661
  if (!r) throw new Error("Segmenter disabled by policy");
2662
- const s = globalThis.Intl?.Segmenter;
2663
- if (typeof s == "function") {
2664
- const a = new s(t?.locale, { granularity: "sentence" }), c = Array.from(a.segment(e)).map((h) => ({
2662
+ const a = globalThis.Intl?.Segmenter;
2663
+ if (typeof a == "function") {
2664
+ const s = new a(t?.locale, { granularity: "sentence" }), c = Array.from(s.segment(e)).map((h) => ({
2665
2665
  text: h.segment,
2666
2666
  offset: h.index
2667
2667
  })).filter((h) => h.text.trim().length > 0);
@@ -2671,25 +2671,25 @@ var ra = class {
2671
2671
  }
2672
2672
  const i = e.match(/[^.!?]+(?:[.!?]+|$)/g) || [e], n = [];
2673
2673
  let o = 0;
2674
- for (const s of i) {
2675
- const a = e.indexOf(s, o);
2676
- a !== -1 && (n.push({
2677
- text: s,
2678
- offset: a
2679
- }), o = a + s.length);
2674
+ for (const a of i) {
2675
+ const s = e.indexOf(a, o);
2676
+ s !== -1 && (n.push({
2677
+ text: a,
2678
+ offset: s
2679
+ }), o = s + a.length);
2680
2680
  }
2681
2681
  return n.length > 0 ? n : [{
2682
2682
  text: e,
2683
2683
  offset: 0
2684
2684
  }];
2685
- }, na = class {
2685
+ }, la = class {
2686
2686
  constructor() {
2687
2687
  g(this, "providerId", "browser"), g(this, "providerName", "Browser Speech Synthesis"), g(this, "version", "1.0.0");
2688
2688
  }
2689
2689
  async initialize(e) {
2690
2690
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
2691
2691
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
2692
- return new oa(e);
2692
+ return new ca(e);
2693
2693
  }
2694
2694
  supportsFeature(e) {
2695
2695
  return !0;
@@ -2706,7 +2706,7 @@ var ra = class {
2706
2706
  }
2707
2707
  destroy() {
2708
2708
  }
2709
- }, oa = class {
2709
+ }, ca = class {
2710
2710
  constructor(e) {
2711
2711
  g(this, "utterance", null), g(this, "config", null), g(this, "_isPlaying", !1), g(this, "_isPaused", !1), g(this, "speakRunId", 0), g(this, "onWordBoundary", void 0), this.config = e;
2712
2712
  }
@@ -2741,19 +2741,19 @@ var ra = class {
2741
2741
  }];
2742
2742
  const r = this.segmentSentences(e), i = [];
2743
2743
  let n = "", o = 0;
2744
- for (const s of r) {
2745
- const a = s.text.trim();
2746
- if (!a) continue;
2747
- const c = s.text.search(/\S/), h = s.offset + (c === -1 ? 0 : c);
2744
+ for (const a of r) {
2745
+ const s = a.text.trim();
2746
+ if (!s) continue;
2747
+ const c = a.text.search(/\S/), h = a.offset + (c === -1 ? 0 : c);
2748
2748
  if (!n) {
2749
- n = a, o = h;
2749
+ n = s, o = h;
2750
2750
  continue;
2751
2751
  }
2752
- const p = `${n} ${a}`;
2753
- p.length <= 260 ? n = p : (i.push({
2752
+ const u = `${n} ${s}`;
2753
+ u.length <= 260 ? n = u : (i.push({
2754
2754
  text: n,
2755
2755
  offset: o
2756
- }), n = a, o = h);
2756
+ }), n = s, o = h);
2757
2757
  }
2758
2758
  return n && i.push({
2759
2759
  text: n,
@@ -2776,7 +2776,7 @@ var ra = class {
2776
2776
  }
2777
2777
  segmentSentences(e) {
2778
2778
  const t = this.getSegmentationPolicy();
2779
- return ia(e, {
2779
+ return aa(e, {
2780
2780
  locale: t.locale,
2781
2781
  useSentenceSegmenter: t.useSentenceSegmenter
2782
2782
  });
@@ -2792,7 +2792,7 @@ var ra = class {
2792
2792
  return;
2793
2793
  }
2794
2794
  if (this.utterance = new SpeechSynthesisUtterance(e), this.config?.voice) {
2795
- const o = speechSynthesis.getVoices().find((s) => s.name === this.config.voice);
2795
+ const o = speechSynthesis.getVoices().find((a) => a.name === this.config.voice);
2796
2796
  o && (this.utterance.voice = o);
2797
2797
  }
2798
2798
  this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
@@ -2819,8 +2819,8 @@ var ra = class {
2819
2819
  r === this.speakRunId && (this._isPaused = !1);
2820
2820
  }, this.utterance.onboundary = (o) => {
2821
2821
  if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
2822
- const s = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), a = Number(o.charLength || 0), c = this.inferWordLength(e, s), h = Number.isFinite(a) && a > 0 && a <= 80 && s + a <= e.length ? a : c, p = e.substring(s, Math.min(e.length, s + h)).trim(), d = t + s;
2823
- console.log("[BrowserProvider] Calling onWordBoundary with word:", p, "at position:", d), this.onWordBoundary(p, d, h);
2822
+ const a = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), s = Number(o.charLength || 0), c = this.inferWordLength(e, a), h = Number.isFinite(s) && s > 0 && s <= 80 && a + s <= e.length ? s : c, u = e.substring(a, Math.min(e.length, a + h)).trim(), p = t + a;
2823
+ console.log("[BrowserProvider] Calling onWordBoundary with word:", u, "at position:", p), this.onWordBoundary(u, p, h);
2824
2824
  }, speechSynthesis.speak(this.utterance);
2825
2825
  });
2826
2826
  }
@@ -2845,7 +2845,7 @@ var ra = class {
2845
2845
  ...e.providerOptions || {}
2846
2846
  });
2847
2847
  }
2848
- }, sa = class {
2848
+ }, ua = class {
2849
2849
  async emitTelemetry(e, t) {
2850
2850
  try {
2851
2851
  await this.config?.onTelemetry?.(e, t);
@@ -2877,7 +2877,7 @@ var ra = class {
2877
2877
  }
2878
2878
  async _initializeBrowserTTS(e) {
2879
2879
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
2880
- this.ttsProvider = new na(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2880
+ this.ttsProvider = new la(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2881
2881
  }
2882
2882
  async _initializeServerTTS(e) {
2883
2883
  if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
@@ -2933,7 +2933,7 @@ var ra = class {
2933
2933
  destroy() {
2934
2934
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
2935
2935
  }
2936
- }, aa = /* @__PURE__ */ new Set([
2936
+ }, fa = /* @__PURE__ */ new Set([
2937
2937
  "annotation-xml",
2938
2938
  "color-profile",
2939
2939
  "font-face",
@@ -2942,16 +2942,16 @@ var ra = class {
2942
2942
  "font-face-format",
2943
2943
  "font-face-name",
2944
2944
  "missing-glyph"
2945
- ]), la = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, ca = (e, t = "custom element tag") => {
2945
+ ]), da = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, ha = (e, t = "custom element tag") => {
2946
2946
  if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
2947
2947
  const r = e.trim();
2948
2948
  if (!r) throw new Error(`Invalid ${t}: tag is empty`);
2949
2949
  if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
2950
2950
  if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
2951
- if (aa.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
2952
- if (!la.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2951
+ if (fa.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
2952
+ if (!da.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2953
2953
  return r;
2954
- }, En = {
2954
+ }, Pn = {
2955
2955
  calculator: "pie-tool-calculator",
2956
2956
  textToSpeech: "pie-tool-text-to-speech",
2957
2957
  ruler: "pie-tool-ruler",
@@ -2964,22 +2964,22 @@ var ra = class {
2964
2964
  annotationToolbar: "pie-tool-annotation-toolbar",
2965
2965
  graph: "pie-tool-graph",
2966
2966
  periodicTable: "pie-tool-periodic-table"
2967
- }, ua = (e, t) => ca(t?.toolTagMap?.[e] ?? En[e] ?? e, `tool component tag for "${e}"`), fa = (e) => document.createElement(e), ue = (e, t, r, i) => {
2968
- const n = ua(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
2967
+ }, pa = (e, t) => ha(t?.toolTagMap?.[e] ?? Pn[e] ?? e, `tool component tag for "${e}"`), va = (e) => document.createElement(e), ue = (e, t, r, i) => {
2968
+ const n = pa(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
2969
2969
  return o ? o({
2970
2970
  toolId: e,
2971
2971
  tagName: n,
2972
2972
  context: t,
2973
2973
  toolbarContext: r
2974
- }) : fa(n);
2975
- }, da = {
2974
+ }) : va(n);
2975
+ }, _a = {
2976
2976
  toolId: "calculator",
2977
2977
  name: "Calculator",
2978
2978
  description: "Multi-type calculator (basic, scientific, graphing)",
2979
2979
  icon: "calculator",
2980
2980
  provider: {
2981
2981
  getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
2982
- createProvider: () => new ra(),
2982
+ createProvider: () => new sa(),
2983
2983
  getInitConfig: (e) => e?.provider?.init ?? {},
2984
2984
  getAuthFetcher: (e) => {
2985
2985
  const t = e?.provider?.runtime?.authFetcher;
@@ -3005,7 +3005,7 @@ var ra = class {
3005
3005
  return Bt(e);
3006
3006
  },
3007
3007
  renderToolbar(e, t) {
3008
- const r = Or(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ue(this.toolId, e, t, i);
3008
+ const r = xr(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ue(this.toolId, e, t, i);
3009
3009
  n.setAttribute("tool-id", r), n.toolkitCoordinator = t.toolkitCoordinator;
3010
3010
  const o = {
3011
3011
  toolId: this.toolId,
@@ -3017,7 +3017,7 @@ var ra = class {
3017
3017
  onClick: () => t.toggleTool(this.toolId),
3018
3018
  active: t.isToolVisible(r)
3019
3019
  };
3020
- let s = o.active;
3020
+ let a = o.active;
3021
3021
  return n.visible = o.active, {
3022
3022
  toolId: this.toolId,
3023
3023
  elements: [{
@@ -3036,46 +3036,64 @@ var ra = class {
3036
3036
  }],
3037
3037
  button: o,
3038
3038
  sync: () => {
3039
- const a = t.isToolVisible(r);
3040
- o.active = a, o.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = a ? "Close calculator" : "Calculator", s !== a && (n.visible = a, s = a), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
3039
+ const s = t.isToolVisible(r);
3040
+ o.active = s, o.ariaLabel = s ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = s ? "Close calculator" : "Calculator", a !== s && (n.visible = s, a = s), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
3041
3041
  },
3042
- subscribeActive: (a) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3043
- a(t.isToolVisible(r));
3042
+ subscribeActive: (s) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3043
+ s(t.isToolVisible(r));
3044
3044
  }) : () => {
3045
3045
  }
3046
3046
  };
3047
3047
  }
3048
- }, bi = (e) => e && typeof e == "object" ? e : {}, ha = (e) => e === "polly" || e === "google" || e === "server", U = (e, t) => e === void 0 ? t : e, pa = (e) => {
3049
- const t = e.backend || "browser";
3050
- if (!ha(t)) return e;
3051
- const r = {
3048
+ }, ga = /* @__PURE__ */ new Set([
3049
+ "reserved-row",
3050
+ "expanding-row",
3051
+ "floating-overlay",
3052
+ "left-aligned"
3053
+ ]), wi = (e) => e && typeof e == "object" ? e : {}, ma = (e) => e === "polly" || e === "google" || e === "server", U = (e, t) => e === void 0 ? t : e, zt = (e, t = "left-aligned") => typeof e == "string" && ga.has(e) ? e : t, Ti = Object.freeze([0.8, 1.25]), nr = (e) => {
3054
+ if (!Array.isArray(e)) return [...Ti];
3055
+ if (e.length === 0) return [];
3056
+ const t = /* @__PURE__ */ new Set();
3057
+ for (const r of e) {
3058
+ if (typeof r != "number" || !Number.isFinite(r) || r <= 0) continue;
3059
+ const i = Math.round(r * 100) / 100;
3060
+ i !== 1 && t.add(i);
3061
+ }
3062
+ return t.size ? Array.from(t) : [...Ti];
3063
+ }, ya = (e) => {
3064
+ const t = {
3052
3065
  ...e,
3053
- apiEndpoint: U(e.apiEndpoint, "/api/tts"),
3054
- transportMode: U(e.transportMode, "pie"),
3055
- endpointValidationMode: U(e.endpointValidationMode, "voices"),
3056
- validateEndpoint: U(e.validateEndpoint, !0),
3057
- includeAuthOnAssetFetch: U(e.includeAuthOnAssetFetch, !1),
3058
- rate: U(e.rate, 1),
3059
- language: U(e.language, "en-US")
3066
+ layoutMode: zt(e.layoutMode)
3067
+ }, r = e.backend || "browser";
3068
+ if (!ma(r)) return t;
3069
+ const i = {
3070
+ ...t,
3071
+ apiEndpoint: U(t.apiEndpoint, "/api/tts"),
3072
+ transportMode: U(t.transportMode, "pie"),
3073
+ endpointValidationMode: U(t.endpointValidationMode, "voices"),
3074
+ validateEndpoint: U(t.validateEndpoint, !0),
3075
+ includeAuthOnAssetFetch: U(t.includeAuthOnAssetFetch, !1),
3076
+ rate: U(t.rate, 1),
3077
+ language: U(t.language, "en-US")
3060
3078
  };
3061
- return t === "polly" ? {
3062
- ...r,
3063
- defaultVoice: U(r.defaultVoice, "Joanna"),
3064
- engine: U(r.engine, "neural"),
3065
- format: U(r.format, "mp3"),
3066
- speechMarksMode: U(r.speechMarksMode, "word+sentence")
3067
- } : t === "google" ? {
3068
- ...r,
3069
- defaultVoice: U(r.defaultVoice, "en-US-Wavenet-A")
3070
- } : r;
3071
- }, ir = (e) => {
3072
- const t = bi(e), r = bi(e?.settings);
3073
- return pa({
3079
+ return r === "polly" ? {
3080
+ ...i,
3081
+ defaultVoice: U(i.defaultVoice, "Joanna"),
3082
+ engine: U(i.engine, "neural"),
3083
+ format: U(i.format, "mp3"),
3084
+ speechMarksMode: U(i.speechMarksMode, "word+sentence")
3085
+ } : r === "google" ? {
3086
+ ...i,
3087
+ defaultVoice: U(i.defaultVoice, "en-US-Wavenet-A")
3088
+ } : i;
3089
+ }, or = (e) => {
3090
+ const t = wi(e), r = wi(e?.settings);
3091
+ return ya({
3074
3092
  ...t,
3075
3093
  ...r
3076
3094
  });
3077
- }, hr = (e) => e.backend || "browser", Mn = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, On = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), va = (e) => {
3078
- const t = hr(e), r = Mn(e, t), i = On(e, r);
3095
+ }, vr = (e) => e.backend || "browser", xn = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Ln = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), ba = (e) => {
3096
+ const t = vr(e), r = xn(e, t), i = Ln(e, r);
3079
3097
  return {
3080
3098
  voice: e.defaultVoice,
3081
3099
  rate: e.rate,
@@ -3099,45 +3117,63 @@ var ra = class {
3099
3117
  includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
3100
3118
  validateEndpoint: e.validateEndpoint
3101
3119
  };
3102
- }, st = /* @__PURE__ */ new Map(), _a = "__pieToolElementUnmount", yi = Object.freeze([1.5, 2]), ga = (e) => {
3103
- if (!Array.isArray(e)) return [...yi];
3104
- if (e.length === 0) return [];
3105
- const t = /* @__PURE__ */ new Set();
3106
- for (const r of e) {
3107
- if (typeof r != "number" || !Number.isFinite(r) || r <= 0) continue;
3108
- const i = Math.round(r * 100) / 100;
3109
- i !== 1 && t.add(i);
3120
+ }, Rn = (e) => zt(e.layoutMode), wa = (e) => {
3121
+ switch (Rn(e)) {
3122
+ case "reserved-row":
3123
+ return {
3124
+ mount: "before-buttons",
3125
+ controlsRow: {
3126
+ reserveSpace: !0,
3127
+ expandWhenToolActive: !1
3128
+ }
3129
+ };
3130
+ case "expanding-row":
3131
+ return {
3132
+ mount: "before-buttons",
3133
+ controlsRow: {
3134
+ reserveSpace: !1,
3135
+ expandWhenToolActive: !0
3136
+ }
3137
+ };
3138
+ default:
3139
+ return {
3140
+ mount: "before-buttons",
3141
+ controlsRow: {
3142
+ reserveSpace: !1,
3143
+ expandWhenToolActive: !1
3144
+ }
3145
+ };
3110
3146
  }
3111
- return t.size ? Array.from(t) : [...yi];
3112
- }, ma = {
3147
+ }, st = /* @__PURE__ */ new Map(), Ta = "__pieToolElementUnmount", ki = "pie-tool-active-change", ka = {
3113
3148
  toolId: "textToSpeech",
3114
3149
  name: "Text to Speech",
3115
3150
  description: "Read content aloud",
3116
3151
  icon: "volume-up",
3117
3152
  provider: {
3118
3153
  getProviderId: () => "tts",
3119
- createProvider: (e) => new sa(hr(ir(e))),
3154
+ createProvider: (e) => new ua(vr(or(e))),
3120
3155
  getInitConfig: (e) => {
3121
- const t = ir(e), r = hr(t), i = Mn(t, r);
3156
+ const t = or(e), r = vr(t), i = xn(t, r);
3122
3157
  return {
3123
3158
  backend: r,
3124
3159
  serverProvider: i,
3125
- transportMode: On(t, i),
3126
- ...va(t)
3160
+ transportMode: Ln(t, i),
3161
+ ...ba(t)
3127
3162
  };
3128
3163
  },
3129
3164
  getAuthFetcher: (e) => {
3130
3165
  const t = e?.provider?.runtime?.authFetcher;
3131
3166
  return typeof t == "function" ? t : void 0;
3132
3167
  },
3168
+ sanitizeConfig: (e) => {
3169
+ const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
3170
+ t && "layoutMode" in t && (t.layoutMode = zt(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = nr(t.speedOptions));
3171
+ const r = { ...e };
3172
+ return "layoutMode" in r && (r.layoutMode = zt(r.layoutMode)), "speedOptions" in r && (r.speedOptions = nr(r.speedOptions)), t && (r.settings = t), r;
3173
+ },
3133
3174
  lazy: !0
3134
3175
  },
3135
- supportedLevels: [
3136
- "section",
3137
- "item",
3138
- "passage",
3139
- "rubric"
3140
- ],
3176
+ supportedLevels: ["item", "passage"],
3141
3177
  pnpSupportIds: [
3142
3178
  "textToSpeech",
3143
3179
  "readAloud",
@@ -3145,34 +3181,47 @@ var ra = class {
3145
3181
  "speechOutput"
3146
3182
  ],
3147
3183
  isVisibleInContext(e) {
3148
- return Ht(e);
3184
+ return Ut(e);
3149
3185
  },
3150
3186
  renderToolbar(e, t) {
3151
- const r = () => ga(ir(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0).speedOptions), i = Or(this.toolId, t.scope.level, t.scope.scopeId), n = () => {
3152
- const s = t.ui?.size;
3153
- return s === "sm" || s === "lg" ? s : "md";
3154
- }, o = () => {
3155
- let s = st.get(i);
3156
- return s && typeof s.isConnected == "boolean" && !s.isConnected && (st.delete(i), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[_a] = () => {
3157
- st.get(i) === s && st.delete(i);
3158
- }, st.set(i, s)), s.setAttribute("tool-id", i), s.setAttribute("catalog-id", t.catalogId || t.itemId), s.setAttribute("language", t.language || "en-US"), s.setAttribute("size", n()), s.speedOptions = r(), s;
3159
- };
3187
+ const r = () => or(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => nr(r().speedOptions), n = () => Rn(r()), o = () => wa(r()), a = xr(this.toolId, t.scope.level, t.scope.scopeId), s = () => {
3188
+ const u = t.ui?.size;
3189
+ return u === "sm" || u === "lg" ? u : "md";
3190
+ }, c = () => {
3191
+ let u = st.get(a);
3192
+ return u && typeof u.isConnected == "boolean" && !u.isConnected && (st.delete(a), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[Ta] = () => {
3193
+ st.get(a) === u && st.delete(a);
3194
+ }, st.set(a, u)), u.setAttribute("tool-id", a), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", s()), u.setAttribute("layout-mode", n()), u.speedOptions = i(), u;
3195
+ }, h = o();
3160
3196
  return {
3161
3197
  toolId: this.toolId,
3162
3198
  button: null,
3163
3199
  elements: [{
3164
- element: o(),
3165
- mount: "before-buttons"
3200
+ element: c(),
3201
+ mount: h.mount,
3202
+ layoutHints: { controlsRow: {
3203
+ reserveSpace: h.controlsRow.reserveSpace,
3204
+ showWhenToolActive: h.controlsRow.expandWhenToolActive
3205
+ } }
3166
3206
  }],
3207
+ subscribeActive: (u) => {
3208
+ const p = c(), f = (v) => {
3209
+ const _ = v.detail;
3210
+ u(_?.active === !0);
3211
+ };
3212
+ return p.addEventListener(ki, f), () => {
3213
+ p.removeEventListener(ki, f);
3214
+ };
3215
+ },
3167
3216
  sync: () => {
3168
- const s = o();
3169
- s.setAttribute("tool-id", i), s.setAttribute("catalog-id", t.catalogId || t.itemId), s.setAttribute("language", t.language || "en-US"), s.setAttribute("size", n()), s.speedOptions = r();
3217
+ const u = c();
3218
+ u.setAttribute("tool-id", a), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", s()), u.setAttribute("layout-mode", n()), u.speedOptions = i();
3170
3219
  }
3171
3220
  };
3172
3221
  }
3173
3222
  };
3174
- function be(e, t) {
3175
- const r = Or(e, t.scope.level, t.scope.scopeId);
3223
+ function ye(e, t) {
3224
+ const r = xr(e, t.scope.level, t.scope.scopeId);
3176
3225
  return {
3177
3226
  fullToolId: r,
3178
3227
  isActive: () => t.isToolVisible(r),
@@ -3182,25 +3231,29 @@ function be(e, t) {
3182
3231
  }
3183
3232
  };
3184
3233
  }
3185
- function ye(e) {
3234
+ function be(e) {
3186
3235
  const t = e.isActive();
3187
3236
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
3188
3237
  }
3189
- function Pr(e, t) {
3238
+ function Lr(e, t) {
3190
3239
  e.setAttribute("data-pie-tool-surface", t);
3191
3240
  }
3192
- var ba = {
3241
+ var Sa = {
3193
3242
  toolId: "ruler",
3194
3243
  name: "Ruler",
3195
3244
  description: "On-screen ruler for measurements",
3196
3245
  icon: "ruler",
3197
- supportedLevels: ["item", "element"],
3246
+ supportedLevels: [
3247
+ "section",
3248
+ "item",
3249
+ "element"
3250
+ ],
3198
3251
  pnpSupportIds: ["ruler", "measurement"],
3199
3252
  isVisibleInContext(e) {
3200
3253
  return Bt(e);
3201
3254
  },
3202
3255
  renderToolbar(e, t) {
3203
- const r = be(this.toolId, t), i = {
3256
+ const r = ye(this.toolId, t), i = {
3204
3257
  toolId: this.toolId,
3205
3258
  label: this.name,
3206
3259
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3210,7 +3263,7 @@ var ba = {
3210
3263
  onClick: () => t.toggleTool(this.toolId),
3211
3264
  active: r.isActive()
3212
3265
  }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3213
- return o.setAttribute("tool-id", r.fullToolId), Pr(o, "frameless"), {
3266
+ return o.setAttribute("tool-id", r.fullToolId), Lr(o, "frameless"), {
3214
3267
  toolId: this.toolId,
3215
3268
  button: i,
3216
3269
  elements: [{
@@ -3218,7 +3271,7 @@ var ba = {
3218
3271
  mount: "after-buttons"
3219
3272
  }],
3220
3273
  sync: () => {
3221
- ye({
3274
+ be({
3222
3275
  button: i,
3223
3276
  overlay: o,
3224
3277
  isActive: r.isActive
@@ -3227,18 +3280,22 @@ var ba = {
3227
3280
  subscribeActive: r.subscribeActive
3228
3281
  };
3229
3282
  }
3230
- }, ya = {
3283
+ }, $a = {
3231
3284
  toolId: "protractor",
3232
3285
  name: "Protractor",
3233
3286
  description: "On-screen protractor for angle measurements",
3234
3287
  icon: "protractor",
3235
- supportedLevels: ["item", "element"],
3288
+ supportedLevels: [
3289
+ "section",
3290
+ "item",
3291
+ "element"
3292
+ ],
3236
3293
  pnpSupportIds: ["protractor", "angleMeasurement"],
3237
3294
  isVisibleInContext(e) {
3238
3295
  return Bt(e);
3239
3296
  },
3240
3297
  renderToolbar(e, t) {
3241
- const r = be(this.toolId, t), i = {
3298
+ const r = ye(this.toolId, t), i = {
3242
3299
  toolId: this.toolId,
3243
3300
  label: this.name,
3244
3301
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3248,7 +3305,7 @@ var ba = {
3248
3305
  onClick: () => t.toggleTool(this.toolId),
3249
3306
  active: r.isActive()
3250
3307
  }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3251
- return o.setAttribute("tool-id", r.fullToolId), Pr(o, "frameless"), {
3308
+ return o.setAttribute("tool-id", r.fullToolId), Lr(o, "frameless"), {
3252
3309
  toolId: this.toolId,
3253
3310
  button: i,
3254
3311
  elements: [{
@@ -3256,7 +3313,7 @@ var ba = {
3256
3313
  mount: "after-buttons"
3257
3314
  }],
3258
3315
  sync: () => {
3259
- ye({
3316
+ be({
3260
3317
  button: i,
3261
3318
  overlay: o,
3262
3319
  isActive: r.isActive
@@ -3265,7 +3322,7 @@ var ba = {
3265
3322
  subscribeActive: r.subscribeActive
3266
3323
  };
3267
3324
  }
3268
- }, wa = {
3325
+ }, Ia = {
3269
3326
  toolId: "answerEliminator",
3270
3327
  name: "Answer Eliminator",
3271
3328
  description: "Strike through answer choices",
@@ -3278,10 +3335,10 @@ var ba = {
3278
3335
  "choiceMasking"
3279
3336
  ],
3280
3337
  isVisibleInContext(e) {
3281
- return Js(e);
3338
+ return ta(e);
3282
3339
  },
3283
3340
  renderToolbar(e, t) {
3284
- const r = be(this.toolId, t), i = t.componentOverrides ?? {}, n = ue(this.toolId, e, t, i);
3341
+ const r = ye(this.toolId, t), i = t.componentOverrides ?? {}, n = ue(this.toolId, e, t, i);
3285
3342
  n.setAttribute("tool-id", r.fullToolId), n.setAttribute("strategy", "strikethrough"), n.setAttribute("button-alignment", "inline");
3286
3343
  const o = {
3287
3344
  toolId: this.toolId,
@@ -3301,18 +3358,18 @@ var ba = {
3301
3358
  mount: "after-buttons"
3302
3359
  }],
3303
3360
  sync: () => {
3304
- ye({
3361
+ be({
3305
3362
  button: o,
3306
3363
  overlay: n,
3307
3364
  isActive: r.isActive
3308
3365
  }), t.toolCoordinator && (n.coordinator = t.toolCoordinator), n.scopeElement = t.getScopeElement?.() || null, t.elementToolStateStore && (n.elementToolStateStore = t.elementToolStateStore);
3309
- const s = t.getGlobalElementId?.();
3310
- s && (n.globalElementId = s);
3366
+ const a = t.getGlobalElementId?.();
3367
+ a && (n.globalElementId = a);
3311
3368
  },
3312
3369
  subscribeActive: r.subscribeActive
3313
3370
  };
3314
3371
  }
3315
- }, Ta = {
3372
+ }, Aa = {
3316
3373
  toolId: "highlighter",
3317
3374
  name: "Highlighter",
3318
3375
  description: "Highlight text",
@@ -3330,10 +3387,10 @@ var ba = {
3330
3387
  "annotation"
3331
3388
  ],
3332
3389
  isVisibleInContext(e) {
3333
- return Ht(e);
3390
+ return Ut(e);
3334
3391
  },
3335
3392
  renderToolbar(e, t) {
3336
- const r = be(this.toolId, t), i = {
3393
+ const r = ye(this.toolId, t), i = {
3337
3394
  toolId: this.toolId,
3338
3395
  label: this.name,
3339
3396
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3351,24 +3408,25 @@ var ba = {
3351
3408
  mount: "after-buttons"
3352
3409
  }],
3353
3410
  sync: () => {
3354
- ye({
3411
+ be({
3355
3412
  button: i,
3356
3413
  overlay: o,
3357
3414
  isActive: r.isActive,
3358
- onActiveChange: (s) => {
3359
- o.enabled = s;
3415
+ onActiveChange: (a) => {
3416
+ o.enabled = a;
3360
3417
  }
3361
3418
  }), t.ttsService && (o.ttsService = t.ttsService);
3362
3419
  },
3363
3420
  subscribeActive: r.subscribeActive
3364
3421
  };
3365
3422
  }
3366
- }, ka = {
3423
+ }, Ea = {
3367
3424
  toolId: "lineReader",
3368
3425
  name: "Line Reader",
3369
3426
  description: "Reading guide overlay",
3370
3427
  icon: "bars-3",
3371
3428
  supportedLevels: [
3429
+ "section",
3372
3430
  "passage",
3373
3431
  "rubric",
3374
3432
  "item"
@@ -3381,10 +3439,10 @@ var ba = {
3381
3439
  "trackingGuide"
3382
3440
  ],
3383
3441
  isVisibleInContext(e) {
3384
- return Ht(e);
3442
+ return Ut(e);
3385
3443
  },
3386
3444
  renderToolbar(e, t) {
3387
- const r = be(this.toolId, t), i = {
3445
+ const r = ye(this.toolId, t), i = {
3388
3446
  toolId: this.toolId,
3389
3447
  label: this.name,
3390
3448
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3394,7 +3452,7 @@ var ba = {
3394
3452
  onClick: () => t.toggleTool(this.toolId),
3395
3453
  active: r.isActive()
3396
3454
  }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3397
- return o.setAttribute("tool-id", r.fullToolId), Pr(o, "frameless"), {
3455
+ return o.setAttribute("tool-id", r.fullToolId), Lr(o, "frameless"), {
3398
3456
  toolId: this.toolId,
3399
3457
  button: i,
3400
3458
  elements: [{
@@ -3402,7 +3460,7 @@ var ba = {
3402
3460
  mount: "after-buttons"
3403
3461
  }],
3404
3462
  sync: () => {
3405
- ye({
3463
+ be({
3406
3464
  button: i,
3407
3465
  overlay: o,
3408
3466
  isActive: r.isActive
@@ -3411,7 +3469,7 @@ var ba = {
3411
3469
  subscribeActive: r.subscribeActive
3412
3470
  };
3413
3471
  }
3414
- }, Sa = {
3472
+ }, Ma = {
3415
3473
  toolId: "theme",
3416
3474
  name: "Theme",
3417
3475
  description: "Accessible themes and contrast",
@@ -3430,7 +3488,7 @@ var ba = {
3430
3488
  return !0;
3431
3489
  },
3432
3490
  renderToolbar(e, t) {
3433
- const r = be(this.toolId, t), i = {
3491
+ const r = ye(this.toolId, t), i = {
3434
3492
  toolId: this.toolId,
3435
3493
  label: this.name,
3436
3494
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3458,7 +3516,7 @@ var ba = {
3458
3516
  }
3459
3517
  }],
3460
3518
  sync: () => {
3461
- ye({
3519
+ be({
3462
3520
  button: i,
3463
3521
  overlay: o,
3464
3522
  isActive: r.isActive
@@ -3467,7 +3525,7 @@ var ba = {
3467
3525
  subscribeActive: r.subscribeActive
3468
3526
  };
3469
3527
  }
3470
- }, $a = {
3528
+ }, Oa = {
3471
3529
  toolId: "annotationToolbar",
3472
3530
  name: "Highlighter",
3473
3531
  description: "Highlight and annotate text",
@@ -3488,10 +3546,10 @@ var ba = {
3488
3546
  "annotation"
3489
3547
  ],
3490
3548
  isVisibleInContext(e) {
3491
- return Ht(e);
3549
+ return Ut(e);
3492
3550
  },
3493
3551
  renderToolbar(e, t) {
3494
- const r = be(this.toolId, t), i = {
3552
+ const r = ye(this.toolId, t), i = {
3495
3553
  toolId: this.toolId,
3496
3554
  label: this.name,
3497
3555
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3509,7 +3567,7 @@ var ba = {
3509
3567
  mount: "after-buttons"
3510
3568
  }],
3511
3569
  sync: () => {
3512
- ye({
3570
+ be({
3513
3571
  button: i,
3514
3572
  overlay: o,
3515
3573
  isActive: r.isActive
@@ -3518,7 +3576,7 @@ var ba = {
3518
3576
  subscribeActive: r.subscribeActive
3519
3577
  };
3520
3578
  }
3521
- }, Ia = {
3579
+ }, Pa = {
3522
3580
  toolId: "graph",
3523
3581
  name: "Graph",
3524
3582
  description: "Graphing calculator and coordinate plane",
@@ -3534,7 +3592,7 @@ var ba = {
3534
3592
  return Bt(e);
3535
3593
  },
3536
3594
  renderToolbar(e, t) {
3537
- const r = be(this.toolId, t), i = {
3595
+ const r = ye(this.toolId, t), i = {
3538
3596
  toolId: this.toolId,
3539
3597
  label: this.name,
3540
3598
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3562,7 +3620,7 @@ var ba = {
3562
3620
  }
3563
3621
  }],
3564
3622
  sync: () => {
3565
- ye({
3623
+ be({
3566
3624
  button: i,
3567
3625
  overlay: o,
3568
3626
  isActive: r.isActive
@@ -3571,7 +3629,7 @@ var ba = {
3571
3629
  subscribeActive: r.subscribeActive
3572
3630
  };
3573
3631
  }
3574
- }, Aa = {
3632
+ }, xa = {
3575
3633
  toolId: "periodicTable",
3576
3634
  name: "Periodic Table",
3577
3635
  description: "Chemistry periodic table reference",
@@ -3583,10 +3641,10 @@ var ba = {
3583
3641
  "elementReference"
3584
3642
  ],
3585
3643
  isVisibleInContext(e) {
3586
- return Qs(e);
3644
+ return ra(e);
3587
3645
  },
3588
3646
  renderToolbar(e, t) {
3589
- const r = be(this.toolId, t), i = {
3647
+ const r = ye(this.toolId, t), i = {
3590
3648
  toolId: this.toolId,
3591
3649
  label: this.name,
3592
3650
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3614,7 +3672,7 @@ var ba = {
3614
3672
  }
3615
3673
  }],
3616
3674
  sync: () => {
3617
- ye({
3675
+ be({
3618
3676
  button: i,
3619
3677
  overlay: o,
3620
3678
  isActive: r.isActive
@@ -3623,54 +3681,54 @@ var ba = {
3623
3681
  subscribeActive: r.subscribeActive
3624
3682
  };
3625
3683
  }
3626
- }, Ea = [
3627
- da,
3628
- ma,
3629
- ba,
3630
- ya,
3631
- wa,
3632
- Ta,
3684
+ }, La = [
3685
+ _a,
3633
3686
  ka,
3634
3687
  Sa,
3635
3688
  $a,
3636
3689
  Ia,
3637
- Aa
3690
+ Aa,
3691
+ Ea,
3692
+ Ma,
3693
+ Oa,
3694
+ Pa,
3695
+ xa
3638
3696
  ];
3639
- function Ma(e = {}) {
3640
- const t = new Ys(), r = {
3697
+ function Ra(e = {}) {
3698
+ const t = new Qs(), r = {
3641
3699
  toolTagMap: {
3642
- ...En,
3700
+ ...Pn,
3643
3701
  ...e.toolTagMap || {}
3644
3702
  },
3645
3703
  toolComponentFactory: e.toolComponentFactory,
3646
3704
  toolComponentFactories: e.toolComponentFactories
3647
3705
  }, i = (n) => e.overrides?.[n.toolId] || n;
3648
- return e.includePackagedTools && Oa(t, {
3706
+ return e.includePackagedTools && Ca(t, {
3649
3707
  toolIds: e.toolIds,
3650
3708
  applyOverrides: i
3651
3709
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
3652
3710
  }
3653
- function Oa(e, t = {}) {
3711
+ function Ca(e, t = {}) {
3654
3712
  const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, i = t.applyOverrides || ((n) => n);
3655
- for (const n of Ea)
3713
+ for (const n of La)
3656
3714
  r && !r.has(n.toolId) || e.register(i(n));
3657
3715
  }
3658
- function Pa(e = {}) {
3659
- return Ma({
3716
+ function Na(e = {}) {
3717
+ return Ra({
3660
3718
  ...e,
3661
3719
  includePackagedTools: !0
3662
3720
  });
3663
3721
  }
3664
- function xa() {
3665
- const e = Pa(), t = /* @__PURE__ */ new Set();
3722
+ function Da() {
3723
+ const e = Na(), t = /* @__PURE__ */ new Set();
3666
3724
  for (const r of e.getAllTools()) for (const i of r.pnpSupportIds || []) t.add(i);
3667
3725
  return [...t].sort();
3668
3726
  }
3669
- var Ra = xa(), Za = {
3670
- supports: [...Ra],
3727
+ var ja = Da(), nl = {
3728
+ supports: [...ja],
3671
3729
  prohibitedSupports: [],
3672
3730
  activateAtInit: []
3673
- }, Ca = {
3731
+ }, za = {
3674
3732
  visual: {
3675
3733
  magnification: "magnification",
3676
3734
  screenMagnifier: "screenMagnifier",
@@ -3783,15 +3841,15 @@ var Ra = xa(), Za = {
3783
3841
  itemGlossary: "itemGlossary",
3784
3842
  tutorialAvailable: "tutorialAvailable"
3785
3843
  }
3786
- }, el = Object.values(Ca).flatMap((e) => Object.values(e)), tl = $n("ToolCoordinator"), pr;
3844
+ }, ol = Object.values(za).flatMap((e) => Object.values(e)), sl = En("ToolCoordinator"), _r;
3787
3845
  (function(e) {
3788
3846
  e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
3789
- })(pr || (pr = {}));
3790
- var wi;
3847
+ })(_r || (_r = {}));
3848
+ var Si;
3791
3849
  (function(e) {
3792
3850
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
3793
- })(wi || (wi = {}));
3794
- var La = /* @__PURE__ */ bn('<div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--top svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--left svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--right svelte-1a3d6dx" aria-hidden="true"></div>', 1), Na = /* @__PURE__ */ bn('<div class="pie-sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="group" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="pie-tool-line-reader__container svelte-1a3d6dx"></div> <div class="pie-tool-line-reader__resize-handle pie-tool-line-reader__resize-handle--bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="var(--pie-primary, #4CAF50)" rx="1"></rect></svg></div></div>', 1), Da = {
3851
+ })(Si || (Si = {}));
3852
+ var Va = /* @__PURE__ */ Tn('<div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--top svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--left svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--right svelte-1a3d6dx" aria-hidden="true"></div>', 1), Wa = /* @__PURE__ */ Tn('<div class="pie-sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="group" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="pie-tool-line-reader__container svelte-1a3d6dx"></div> <div class="pie-tool-line-reader__resize-handle pie-tool-line-reader__resize-handle--bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="var(--pie-primary, #4CAF50)" rx="1"></rect></svg></div></div>', 1), Fa = {
3795
3853
  hash: "svelte-1a3d6dx",
3796
3854
  code: `.pie-sr-only.svelte-1a3d6dx {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}.pie-tool-line-reader.svelte-1a3d6dx {border:none;cursor:move;overflow:visible;position:absolute;transform:translate(-50%, -50%);user-select:none;pointer-events:auto;touch-action:none;}.pie-tool-line-reader.svelte-1a3d6dx:focus-visible {outline:3px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2));outline-offset:2px;}.pie-tool-line-reader__container.svelte-1a3d6dx {width:100%;height:100%;position:relative;transition:background-color 0.2s ease;}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx {position:absolute;cursor:ns-resize;z-index:10;display:flex;align-items:center;justify-content:center;}.pie-tool-line-reader__resize-handle--bottom.svelte-1a3d6dx {bottom:-12px;left:50%;transform:translateX(-50%);width:44px;height:24px;background-color:color-mix(in srgb, var(--pie-background, #fff) 90%, transparent);border-radius:12px;border:2px solid var(--pie-primary, #4caf50);}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx:hover {background-color:color-mix(in srgb, var(--pie-primary, #4caf50) 20%, transparent);}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx:active {cursor:ns-resize;}.pie-tool-line-reader.svelte-1a3d6dx:active {cursor:grabbing;}
3797
3855
 
@@ -3805,16 +3863,16 @@ var La = /* @__PURE__ */ bn('<div class="pie-tool-line-reader__mask pie-tool-lin
3805
3863
 
3806
3864
  /* In masking mode, the window should be transparent to show content underneath */.pie-tool-line-reader.pie-tool-line-reader--masking-mode.svelte-1a3d6dx .pie-tool-line-reader__container:where(.svelte-1a3d6dx) {background-color:transparent !important;}`
3807
3865
  };
3808
- function ja(e, t) {
3809
- Mi(t, !0), Ss(e, Da);
3810
- let r = vi(t, "visible", 7, !1), i = vi(t, "toolId", 7, "lineReader");
3866
+ function Ha(e, t) {
3867
+ xi(t, !0), Es(e, Fa);
3868
+ let r = gi(t, "visible", 7, !1), i = gi(t, "toolId", 7, "lineReader");
3811
3869
  const n = typeof window < "u";
3812
- let o = /* @__PURE__ */ x(void 0), s = /* @__PURE__ */ x(null);
3813
- const a = /* @__PURE__ */ Qr(() => u(s)?.toolCoordinator);
3814
- let c = /* @__PURE__ */ x(!1), h = /* @__PURE__ */ x(!1), p = /* @__PURE__ */ x(se({
3870
+ let o = /* @__PURE__ */ x(void 0), a = /* @__PURE__ */ x(null);
3871
+ const s = /* @__PURE__ */ ei(() => d(a)?.toolCoordinator);
3872
+ let c = /* @__PURE__ */ x(!1), h = /* @__PURE__ */ x(!1), u = /* @__PURE__ */ x(se({
3815
3873
  x: n ? window.innerWidth / 2 : 400,
3816
3874
  y: n ? window.innerHeight / 2 : 300
3817
- })), d = /* @__PURE__ */ x(se({
3875
+ })), p = /* @__PURE__ */ x(se({
3818
3876
  width: 600,
3819
3877
  height: 60
3820
3878
  })), f = /* @__PURE__ */ x(se({
@@ -3824,7 +3882,7 @@ function ja(e, t) {
3824
3882
  width: 0,
3825
3883
  height: 0,
3826
3884
  mouseY: 0
3827
- })), _ = /* @__PURE__ */ x(""), m = /* @__PURE__ */ x("#ffff00"), y = /* @__PURE__ */ x(0.3), A = /* @__PURE__ */ x("highlight"), B = /* @__PURE__ */ x(!1);
3885
+ })), _ = /* @__PURE__ */ x(""), m = /* @__PURE__ */ x("#ffff00"), b = /* @__PURE__ */ x(0.3), A = /* @__PURE__ */ x("highlight"), H = /* @__PURE__ */ x(!1);
3828
3886
  const E = [
3829
3887
  {
3830
3888
  name: "Yellow",
@@ -3846,143 +3904,143 @@ function ja(e, t) {
3846
3904
  name: "Orange",
3847
3905
  value: "#ffa500"
3848
3906
  }
3849
- ], H = 10, we = 10;
3907
+ ], B = 10, we = 10;
3850
3908
  at(() => {
3851
- if (u(o))
3852
- return Us(u(o), (w) => {
3853
- P(s, w, !0);
3909
+ if (d(o))
3910
+ return Ks(d(o), (w) => {
3911
+ P(a, w, !0);
3854
3912
  });
3855
3913
  });
3856
- function F(w) {
3914
+ function W(w) {
3857
3915
  P(_, w, !0), setTimeout(() => P(_, ""), 1e3);
3858
3916
  }
3859
- function Pn() {
3860
- const w = (E.findIndex((L) => L.value === u(m)) + 1) % E.length;
3861
- P(m, E[w].value, !0), F(`Color changed to ${E[w].name}`);
3917
+ function Cn() {
3918
+ const w = (E.findIndex((C) => C.value === d(m)) + 1) % E.length;
3919
+ P(m, E[w].value, !0), W(`Color changed to ${E[w].name}`);
3862
3920
  }
3863
- function xr(w) {
3864
- P(y, Math.max(0.1, Math.min(0.9, u(y) + w)), !0), F(`Opacity ${Math.round(u(y) * 100)}%`);
3921
+ function Rr(w) {
3922
+ P(b, Math.max(0.1, Math.min(0.9, d(b) + w)), !0), W(`Opacity ${Math.round(d(b) * 100)}%`);
3865
3923
  }
3866
- function xn() {
3867
- P(A, u(A) === "highlight" ? "obscure" : "highlight", !0), F(`Mode changed to ${u(A) === "highlight" ? "highlight" : "masking"}`);
3924
+ function Nn() {
3925
+ P(A, d(A) === "highlight" ? "obscure" : "highlight", !0), W(`Mode changed to ${d(A) === "highlight" ? "highlight" : "masking"}`);
3868
3926
  }
3869
- function Rn(w) {
3870
- w.target.closest(".resize-handle") ? Ln(w) : Cn(w);
3927
+ function Dn(w) {
3928
+ w.target.closest(".resize-handle") ? zn(w) : jn(w);
3871
3929
  }
3872
- function Cn(w) {
3873
- u(o) && (u(o).setPointerCapture(w.pointerId), P(c, !0), P(f, {
3874
- x: w.clientX - u(p).x,
3875
- y: w.clientY - u(p).y
3876
- }, !0), u(a)?.bringToFront(u(o)), u(o).addEventListener("pointermove", Ut), u(o).addEventListener("pointerup", Gt), w.preventDefault());
3930
+ function jn(w) {
3931
+ d(o) && (d(o).setPointerCapture(w.pointerId), P(c, !0), P(f, {
3932
+ x: w.clientX - d(u).x,
3933
+ y: w.clientY - d(u).y
3934
+ }, !0), d(s)?.bringToFront(d(o)), d(o).addEventListener("pointermove", Gt), d(o).addEventListener("pointerup", qt), w.preventDefault());
3877
3935
  }
3878
- function Ln(w) {
3879
- u(o) && (u(o).setPointerCapture(w.pointerId), P(h, !0), P(v, {
3880
- width: u(d).width,
3881
- height: u(d).height,
3936
+ function zn(w) {
3937
+ d(o) && (d(o).setPointerCapture(w.pointerId), P(h, !0), P(v, {
3938
+ width: d(p).width,
3939
+ height: d(p).height,
3882
3940
  mouseY: w.clientY
3883
- }, !0), u(a)?.bringToFront(u(o)), u(o).addEventListener("pointermove", Ut), u(o).addEventListener("pointerup", Gt), w.preventDefault(), w.stopPropagation());
3941
+ }, !0), d(s)?.bringToFront(d(o)), d(o).addEventListener("pointermove", Gt), d(o).addEventListener("pointerup", qt), w.preventDefault(), w.stopPropagation());
3884
3942
  }
3885
- function Ut(w) {
3886
- if (u(c)) P(p, {
3887
- x: w.clientX - u(f).x,
3888
- y: w.clientY - u(f).y
3943
+ function Gt(w) {
3944
+ if (d(c)) P(u, {
3945
+ x: w.clientX - d(f).x,
3946
+ y: w.clientY - d(f).y
3889
3947
  }, !0);
3890
- else if (u(h)) {
3891
- const L = w.clientY - u(v).mouseY;
3892
- u(d).height = Math.max(20, Math.min(400, u(v).height + L));
3948
+ else if (d(h)) {
3949
+ const C = w.clientY - d(v).mouseY;
3950
+ d(p).height = Math.max(20, Math.min(400, d(v).height + C));
3893
3951
  }
3894
3952
  }
3895
- function Gt(w) {
3896
- u(o) && (u(o).releasePointerCapture(w.pointerId), u(o).removeEventListener("pointermove", Ut), u(o).removeEventListener("pointerup", Gt), P(c, !1), P(h, !1));
3953
+ function qt(w) {
3954
+ d(o) && (d(o).releasePointerCapture(w.pointerId), d(o).removeEventListener("pointermove", Gt), d(o).removeEventListener("pointerup", qt), P(c, !1), P(h, !1));
3897
3955
  }
3898
- function Nn(w) {
3899
- let L = !1;
3956
+ function Vn(w) {
3957
+ let C = !1;
3900
3958
  switch (w.key) {
3901
3959
  case "ArrowUp":
3902
- u(p).y -= H, F(`Moved up to ${Math.round(u(p).y)}`), L = !0;
3960
+ d(u).y -= B, W(`Moved up to ${Math.round(d(u).y)}`), C = !0;
3903
3961
  break;
3904
3962
  case "ArrowDown":
3905
- u(p).y += H, F(`Moved down to ${Math.round(u(p).y)}`), L = !0;
3963
+ d(u).y += B, W(`Moved down to ${Math.round(d(u).y)}`), C = !0;
3906
3964
  break;
3907
3965
  case "ArrowLeft":
3908
- u(p).x -= H, F(`Moved left to ${Math.round(u(p).x)}`), L = !0;
3966
+ d(u).x -= B, W(`Moved left to ${Math.round(d(u).x)}`), C = !0;
3909
3967
  break;
3910
3968
  case "ArrowRight":
3911
- u(p).x += H, F(`Moved right to ${Math.round(u(p).x)}`), L = !0;
3969
+ d(u).x += B, W(`Moved right to ${Math.round(d(u).x)}`), C = !0;
3912
3970
  break;
3913
3971
  case "+":
3914
3972
  case "=":
3915
- u(d).height = Math.min(400, u(d).height + we), F(`Height ${u(d).height} pixels`), L = !0;
3973
+ d(p).height = Math.min(400, d(p).height + we), W(`Height ${d(p).height} pixels`), C = !0;
3916
3974
  break;
3917
3975
  case "-":
3918
3976
  case "_":
3919
- u(d).height = Math.max(20, u(d).height - we), F(`Height ${u(d).height} pixels`), L = !0;
3977
+ d(p).height = Math.max(20, d(p).height - we), W(`Height ${d(p).height} pixels`), C = !0;
3920
3978
  break;
3921
3979
  case "c":
3922
3980
  case "C":
3923
- Pn(), L = !0;
3981
+ Cn(), C = !0;
3924
3982
  break;
3925
3983
  case "]":
3926
- xr(0.1), L = !0;
3984
+ Rr(0.1), C = !0;
3927
3985
  break;
3928
3986
  case "[":
3929
- xr(-0.1), L = !0;
3987
+ Rr(-0.1), C = !0;
3930
3988
  break;
3931
3989
  case "m":
3932
3990
  case "M":
3933
- xn(), L = !0;
3991
+ Nn(), C = !0;
3934
3992
  break;
3935
3993
  }
3936
- L && w.preventDefault();
3994
+ C && w.preventDefault();
3937
3995
  }
3938
3996
  at(() => {
3939
- u(a) && i() && !u(B) && (u(a).registerTool(i(), "Line Reader", void 0, pr.TOOL), P(B, !0));
3940
- }), Ts(() => () => {
3941
- u(a) && i() && u(a).unregisterTool(i());
3997
+ d(s) && i() && !d(H) && (d(s).registerTool(i(), "Line Reader", void 0, _r.TOOL), P(H, !0));
3998
+ }), Is(() => () => {
3999
+ d(s) && i() && d(s).unregisterTool(i());
3942
4000
  }), at(() => {
3943
- u(a) && u(o) && i() && u(a).updateToolElement(i(), u(o));
4001
+ d(s) && d(o) && i() && d(s).updateToolElement(i(), d(o));
3944
4002
  }), at(() => {
3945
- r() && u(o) && setTimeout(() => u(o)?.focus(), 100);
4003
+ r() && d(o) && setTimeout(() => d(o)?.focus(), 100);
3946
4004
  });
3947
- let Dn = /* @__PURE__ */ Qr(() => u(m) + Math.round(u(y) * 255).toString(16).padStart(2, "0"));
3948
- var jn = {
4005
+ let Wn = /* @__PURE__ */ ei(() => d(m) + Math.round(d(b) * 255).toString(16).padStart(2, "0"));
4006
+ var Fn = {
3949
4007
  get visible() {
3950
4008
  return r();
3951
4009
  },
3952
4010
  set visible(w = !1) {
3953
- r(w), or();
4011
+ r(w), ar();
3954
4012
  },
3955
4013
  get toolId() {
3956
4014
  return i();
3957
4015
  },
3958
4016
  set toolId(w = "lineReader") {
3959
- i(w), or();
3960
- }
3961
- }, Rr = hs(), zn = Xt(Rr), Vn = (w) => {
3962
- var L = Na(), qt = Xt(L), Fn = ei(qt, !0);
3963
- Hr(qt);
3964
- var Cr = nt(qt, 2), Wn = (fe) => {
3965
- var yt = La(), Nr = Xt(yt), Dr = nt(Nr, 2), jr = nt(Dr, 2), Hn = nt(jr, 2);
3966
- ti((Un, Gn) => {
3967
- We(Nr, `height: ${Un ?? ""}px;`), We(Dr, `top: ${u(p).y + u(d).height / 2}px;`), We(jr, `top: ${u(p).y - u(d).height / 2}px; height: ${u(d).height ?? ""}px; width: ${Gn ?? ""}px;`), We(Hn, `top: ${u(p).y - u(d).height / 2}px; height: ${u(d).height ?? ""}px; left: ${u(p).x + u(d).width / 2}px;`);
3968
- }, [() => Math.max(0, u(p).y - u(d).height / 2), () => Math.max(0, u(p).x - u(d).width / 2)]), Et(fe, yt);
4017
+ i(w), ar();
4018
+ }
4019
+ }, Cr = gs(), Hn = Jt(Cr), Bn = (w) => {
4020
+ var C = Wa(), Yt = Jt(C), Un = ri(Yt, !0);
4021
+ Gr(Yt);
4022
+ var Nr = nt(Yt, 2), Gn = (fe) => {
4023
+ var bt = Va(), jr = Jt(bt), zr = nt(jr, 2), Vr = nt(zr, 2), Yn = nt(Vr, 2);
4024
+ ii((Kn, Xn) => {
4025
+ Fe(jr, `height: ${Kn ?? ""}px;`), Fe(zr, `top: ${d(u).y + d(p).height / 2}px;`), Fe(Vr, `top: ${d(u).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; width: ${Xn ?? ""}px;`), Fe(Yn, `top: ${d(u).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; left: ${d(u).x + d(p).width / 2}px;`);
4026
+ }, [() => Math.max(0, d(u).y - d(p).height / 2), () => Math.max(0, d(u).x - d(p).width / 2)]), Et(fe, bt);
3969
4027
  };
3970
- ci(Cr, (fe) => {
3971
- u(A) === "obscure" && fe(Wn);
4028
+ fi(Nr, (fe) => {
4029
+ d(A) === "obscure" && fe(Gn);
3972
4030
  });
3973
- var Te = nt(Cr, 2);
3974
- let Lr;
3975
- var Bn = ei(Te);
3976
- $i(2), Hr(Te), Ls(Te, (fe) => P(o, fe), () => u(o)), ti((fe, yt) => {
3977
- ms(Fn, u(_)), Lr = As(Te, 1, "pie-tool-line-reader svelte-1a3d6dx", null, Lr, { "pie-tool-line-reader--masking-mode": u(A) === "obscure" }), We(Te, `left: ${u(p).x ?? ""}px; top: ${u(p).y ?? ""}px; width: ${u(d).width ?? ""}px; height: ${u(d).height ?? ""}px;`), Ps(Te, "aria-label", `Line Reader tool. Mode: ${u(A) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${fe ?? ""}, Opacity: ${yt ?? ""}%`), We(Bn, `background-color: ${u(Dn) ?? ""};`);
3978
- }, [() => E.find((fe) => fe.value === u(m))?.name, () => Math.round(u(y) * 100)]), ni("pointerdown", Te, Rn), ni("keydown", Te, Nn), Et(w, L);
4031
+ var Te = nt(Nr, 2);
4032
+ let Dr;
4033
+ var qn = ri(Te);
4034
+ Ei(2), Gr(Te), zs(Te, (fe) => P(o, fe), () => d(o)), ii((fe, bt) => {
4035
+ Ts(Un, d(_)), Dr = Ps(Te, 1, "pie-tool-line-reader svelte-1a3d6dx", null, Dr, { "pie-tool-line-reader--masking-mode": d(A) === "obscure" }), Fe(Te, `left: ${d(u).x ?? ""}px; top: ${d(u).y ?? ""}px; width: ${d(p).width ?? ""}px; height: ${d(p).height ?? ""}px;`), Cs(Te, "aria-label", `Line Reader tool. Mode: ${d(A) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${fe ?? ""}, Opacity: ${bt ?? ""}%`), Fe(qn, `background-color: ${d(Wn) ?? ""};`);
4036
+ }, [() => E.find((fe) => fe.value === d(m))?.name, () => Math.round(d(b) * 100)]), si("pointerdown", Te, Dn), si("keydown", Te, Vn), Et(w, C);
3979
4037
  };
3980
- return ci(zn, (w) => {
3981
- r() && w(Vn);
3982
- }), Et(e, Rr), Oi(jn);
4038
+ return fi(Hn, (w) => {
4039
+ r() && w(Bn);
4040
+ }), Et(e, Cr), Li(Fn);
3983
4041
  }
3984
- cs(["pointerdown", "keydown"]);
3985
- customElements.define("pie-tool-line-reader", zs(ja, {
4042
+ hs(["pointerdown", "keydown"]);
4043
+ customElements.define("pie-tool-line-reader", Hs(Ha, {
3986
4044
  visible: {
3987
4045
  attribute: "visible",
3988
4046
  type: "Boolean"
@@ -3993,5 +4051,5 @@ customElements.define("pie-tool-line-reader", zs(ja, {
3993
4051
  }
3994
4052
  }, [], [], { mode: "open" }));
3995
4053
  export {
3996
- ja as default
4054
+ Ha as default
3997
4055
  };