@pie-players/pie-tool-answer-eliminator 1.0.0-beta.7 → 1.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- import { coerceBooleanAttributes as Dn } from "@pie-players/pie-players-shared/ui/attribute-coercion";
2
- import { resolveInterfaceI18n as zt, stampInterfaceLocale as pr } from "@pie-players/pie-players-shared/i18n/provider";
3
- import { connectToolRuntimeContext as Wn, connectToolShellContext as jn } from "@pie-players/pie-assessment-toolkit/tools/registration";
4
- import { parseVersionedTagName as qn } from "@pie-players/pie-players-shared/pie/tag-names";
1
+ import { coerceBooleanAttributes as Fn } from "@pie-players/pie-players-shared/ui/attribute-coercion";
2
+ import { resolveInterfaceI18n as Wt, stampInterfaceLocale as hr } from "@pie-players/pie-players-shared/i18n/provider";
3
+ import { connectToolRuntimeContext as Gn, connectToolShellContext as Dn } from "@pie-players/pie-assessment-toolkit/tools/registration";
4
+ import { parseVersionedTagName as Wn } from "@pie-players/pie-players-shared/pie/tag-names";
5
5
  if (typeof window < "u") {
6
- var mr, gr;
7
- ((mr = (gr = window).__svelte ?? (gr.__svelte = {})).v ?? (mr.v = /* @__PURE__ */ new Set())).add("5");
6
+ var dr, vr;
7
+ ((dr = (vr = window).__svelte ?? (vr.__svelte = {})).v ?? (dr.v = /* @__PURE__ */ new Set())).add("5");
8
8
  }
9
- var Ie = {}, x = /* @__PURE__ */ Symbol("uninitialized");
10
- var Yn = Array.isArray, zn = Array.prototype.indexOf, rt = Array.prototype.includes, Vn = Array.from, St = Object.keys, nt = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, Xn = Object.prototype, Un = Array.prototype, Qn = Object.getPrototypeOf, yr = Object.isExtensible, Jn = () => {
9
+ var Ie = {}, N = /* @__PURE__ */ Symbol("uninitialized");
10
+ var jn = Array.isArray, qn = Array.prototype.indexOf, Ze = Array.prototype.includes, Yn = Array.from, bt = Object.keys, et = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, zn = Object.prototype, Vn = Array.prototype, Xn = Object.getPrototypeOf, _r = Object.isExtensible, Un = () => {
11
11
  };
12
- function Zn(t) {
12
+ function Jn(t) {
13
13
  for (var e = 0; e < t.length; e++) t[e]();
14
14
  }
15
- function ei() {
15
+ function Qn() {
16
16
  var t, e;
17
17
  return {
18
18
  promise: new Promise((r, n) => {
@@ -22,71 +22,71 @@ function ei() {
22
22
  reject: e
23
23
  };
24
24
  }
25
- function it(t) {
25
+ function tt(t) {
26
26
  "@babel/helpers - typeof";
27
- return it = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
27
+ return tt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
28
28
  return typeof e;
29
29
  } : function(e) {
30
30
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
31
- }, it(t);
31
+ }, tt(t);
32
32
  }
33
- function ti(t, e) {
34
- if (it(t) != "object" || !t) return t;
33
+ function Zn(t, e) {
34
+ if (tt(t) != "object" || !t) return t;
35
35
  var r = t[Symbol.toPrimitive];
36
36
  if (r !== void 0) {
37
37
  var n = r.call(t, e || "default");
38
- if (it(n) != "object") return n;
38
+ if (tt(n) != "object") return n;
39
39
  throw new TypeError("@@toPrimitive must return a primitive value.");
40
40
  }
41
41
  return (e === "string" ? String : Number)(t);
42
42
  }
43
- function ri(t) {
44
- var e = ti(t, "string");
45
- return it(e) == "symbol" ? e : e + "";
43
+ function ei(t) {
44
+ var e = Zn(t, "string");
45
+ return tt(e) == "symbol" ? e : e + "";
46
46
  }
47
47
  function u(t, e, r) {
48
- return (e = ri(e)) in t ? Object.defineProperty(t, e, {
48
+ return (e = ei(e)) in t ? Object.defineProperty(t, e, {
49
49
  value: r,
50
50
  enumerable: !0,
51
51
  configurable: !0,
52
52
  writable: !0
53
53
  }) : t[e] = r, t;
54
54
  }
55
- var Ys = 1 << 24, re = 1024, z = 2048, He = 4096, Br = 8192, Fr = 16384, Gr = 32768, Vt = 1 << 25, Dr = 65536, zs = 1 << 17, Vs = 1 << 18, ut = 1 << 19, ni = 1 << 20, br = 1 << 21, Xs = 1 << 22, Wr = 1 << 23, Ze = /* @__PURE__ */ Symbol("$state"), jr = /* @__PURE__ */ Symbol("component"), qr = /* @__PURE__ */ Symbol("legacy props"), ii = /* @__PURE__ */ Symbol("proxy path"), si = /* @__PURE__ */ Symbol("attributes"), ai = /* @__PURE__ */ Symbol("class"), li = /* @__PURE__ */ Symbol("style"), oi = /* @__PURE__ */ Symbol("text"), xt = new class extends Error {
55
+ var qs = 1 << 24, re = 1024, z = 2048, be = 4096, Hr = 8192, Nr = 16384, Pr = 32768, jt = 1 << 25, Kr = 65536, Ys = 1 << 17, zs = 1 << 18, lt = 1 << 19, ti = 1 << 20, pr = 1 << 21, Vs = 1 << 22, Br = 1 << 23, Ue = /* @__PURE__ */ Symbol("$state"), Fr = /* @__PURE__ */ Symbol("component"), Gr = /* @__PURE__ */ Symbol("legacy props"), ri = /* @__PURE__ */ Symbol("proxy path"), ni = /* @__PURE__ */ Symbol("attributes"), ii = /* @__PURE__ */ Symbol("class"), si = /* @__PURE__ */ Symbol("style"), ai = /* @__PURE__ */ Symbol("text"), It = new class extends Error {
56
56
  constructor(...e) {
57
57
  super(...e), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
58
58
  }
59
- }(), Qs = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
60
- function ui() {
59
+ }(), Us = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
60
+ function li() {
61
61
  console.warn("https://svelte.dev/e/derived_inert");
62
62
  }
63
- function ir(t) {
63
+ function Zt(t) {
64
64
  console.warn("https://svelte.dev/e/hydration_mismatch");
65
65
  }
66
- function ci() {
66
+ function oi() {
67
67
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
68
68
  }
69
- var Q = !1;
70
- function ft(t) {
71
- Q = t;
69
+ var J = !1;
70
+ function ut(t) {
71
+ J = t;
72
72
  }
73
- var B;
74
- function st(t) {
73
+ var F;
74
+ function rt(t) {
75
75
  if (t === null)
76
- throw ir(), Ie;
77
- return B = t;
76
+ throw Zt(), Ie;
77
+ return F = t;
78
78
  }
79
- function Yr() {
80
- return st(/* @__PURE__ */ Ve(B));
79
+ function Dr() {
80
+ return rt(/* @__PURE__ */ Ye(F));
81
81
  }
82
- function fi(t = 1) {
83
- if (Q) {
84
- for (var e = t, r = B; e--; ) r = /* @__PURE__ */ Ve(r);
85
- B = r;
82
+ function ui(t = 1) {
83
+ if (J) {
84
+ for (var e = t, r = F; e--; ) r = /* @__PURE__ */ Ye(r);
85
+ F = r;
86
86
  }
87
87
  }
88
- function hi(t = !0) {
89
- for (var e = 0, r = B; ; ) {
88
+ function ci(t = !0) {
89
+ for (var e = 0, r = F; ; ) {
90
90
  if (r.nodeType === 8) {
91
91
  var n = r.data;
92
92
  if (n === "]") {
@@ -94,348 +94,335 @@ function hi(t = !0) {
94
94
  e -= 1;
95
95
  } else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
96
96
  }
97
- var i = /* @__PURE__ */ Ve(r);
97
+ var i = /* @__PURE__ */ Ye(r);
98
98
  t && r.remove(), r = i;
99
99
  }
100
100
  }
101
- function di(t) {
101
+ function fi(t) {
102
102
  if (!t || t.nodeType !== 8)
103
- throw ir(), Ie;
103
+ throw Zt(), Ie;
104
104
  return t.data;
105
105
  }
106
- function zr(t) {
106
+ function Wr(t) {
107
107
  return t === this.v;
108
108
  }
109
- function vi(t, e) {
109
+ function hi(t, e) {
110
110
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
111
111
  }
112
- function Vr(t) {
113
- return !vi(t, this.v);
112
+ function jr(t) {
113
+ return !hi(t, this.v);
114
114
  }
115
- function _i(t) {
115
+ function di(t) {
116
116
  throw new Error("https://svelte.dev/e/effect_in_teardown");
117
117
  }
118
- function pi() {
118
+ function vi() {
119
119
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
120
120
  }
121
- function mi(t) {
121
+ function _i(t) {
122
122
  throw new Error("https://svelte.dev/e/effect_orphan");
123
123
  }
124
- function gi() {
124
+ function pi() {
125
125
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
126
126
  }
127
- function yi() {
127
+ function mi() {
128
128
  throw new Error("https://svelte.dev/e/hydration_failed");
129
129
  }
130
- function bi(t) {
130
+ function gi(t) {
131
131
  throw new Error("https://svelte.dev/e/props_invalid_value");
132
132
  }
133
- function wi() {
133
+ function yi() {
134
134
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
135
135
  }
136
- function Si() {
136
+ function bi() {
137
137
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
138
138
  }
139
- function Ai() {
139
+ function wi() {
140
140
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
141
141
  }
142
- function Ei() {
142
+ function Si() {
143
143
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
144
144
  }
145
- var Ne = !1, Ht = !1;
146
- function wr(t, e) {
147
- return t.label = e, Ti(t.v, e), t;
145
+ var He = !1, Ot = !1;
146
+ function mr(t, e) {
147
+ return t.label = e, Ai(t.v, e), t;
148
148
  }
149
- function Ti(t, e) {
150
- return t?.[ii]?.(e), t;
149
+ function Ai(t, e) {
150
+ return t?.[ri]?.(e), t;
151
151
  }
152
- var M = null;
153
- function At(t) {
154
- M = t;
152
+ var x = null;
153
+ function wt(t) {
154
+ x = t;
155
155
  }
156
- function Xr(t, e = !1, r) {
157
- M = {
158
- p: M,
156
+ function qr(t, e = !1, r) {
157
+ x = {
158
+ p: x,
159
159
  i: !1,
160
160
  c: null,
161
161
  e: null,
162
162
  s: t,
163
163
  x: null,
164
164
  r: T,
165
- l: Ht && !e ? {
165
+ l: Ot && !e ? {
166
166
  s: null,
167
167
  u: null,
168
168
  $: []
169
169
  } : null
170
170
  };
171
171
  }
172
- function Ur(t) {
173
- var e = M, r = e.e;
172
+ function Yr(t) {
173
+ var e = x, r = e.e;
174
174
  if (r !== null) {
175
175
  e.e = null;
176
- for (var n of r) yn(n);
176
+ for (var n of r) pn(n);
177
177
  }
178
- return t !== void 0 && (e.x = t), e.i = !0, M = e.p, sr(t);
178
+ return t !== void 0 && (e.x = t), e.i = !0, x = e.p, er(t);
179
179
  }
180
- function sr(t = {}) {
181
- return nt(t, jr, { value: !0 }), t;
180
+ function er(t = {}) {
181
+ return et(t, Fr, { value: !0 }), t;
182
182
  }
183
- function Nt() {
184
- return !Ht || M !== null && M.l === null;
183
+ function Mt() {
184
+ return !Ot || x !== null && x.l === null;
185
185
  }
186
- var Ae = [];
187
- function Qr() {
188
- var t = Ae;
189
- Ae = [], Zn(t);
186
+ var Te = [];
187
+ function zr() {
188
+ var t = Te;
189
+ Te = [], Jn(t);
190
190
  }
191
191
  function Oe(t) {
192
- if (Ae.length === 0 && !et) {
193
- var e = Ae;
192
+ if (Te.length === 0 && !Je) {
193
+ var e = Te;
194
194
  queueMicrotask(() => {
195
- e === Ae && Qr();
195
+ e === Te && zr();
196
196
  });
197
197
  }
198
- Ae.push(t);
198
+ Te.push(t);
199
199
  }
200
- function $i() {
201
- for (; Ae.length > 0; ) Qr();
200
+ function Ei() {
201
+ for (; Te.length > 0; ) zr();
202
202
  }
203
- var Ci = ~(z | He | re);
204
- function O(t, e) {
205
- t.f = t.f & Ci | e;
203
+ var Ti = ~(z | be | re);
204
+ function H(t, e) {
205
+ t.f = t.f & Ti | e;
206
206
  }
207
- function ar(t) {
208
- (t.f & 512) !== 0 || t.deps === null ? O(t, re) : O(t, He);
207
+ function tr(t) {
208
+ (t.f & 512) !== 0 || t.deps === null ? H(t, re) : H(t, be);
209
209
  }
210
- function Jr(t, e, r) {
211
- (t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && r.add(t), O(t, re);
210
+ function Vr(t, e) {
211
+ (t.f & 2048) !== 0 ? e.set(t, z) : (t.f & 4096) !== 0 && e.get(t) !== 2048 && e.set(t, be), H(t, re);
212
212
  }
213
- function Pt(t) {
214
- var e = E, r = T;
215
- le(null), _e(null);
213
+ function xt(t) {
214
+ var e = A, r = T;
215
+ oe(null), ye(null);
216
216
  try {
217
217
  return t();
218
218
  } finally {
219
- le(e), _e(r);
219
+ oe(e), ye(r);
220
220
  }
221
221
  }
222
222
  // @__NO_SIDE_EFFECTS__
223
- function Et(t) {
223
+ function St(t) {
224
224
  var e = 2 | z;
225
- return T !== null && (T.f |= ut), {
226
- ctx: M,
225
+ return T !== null && (T.f |= lt), {
226
+ ctx: x,
227
227
  deps: null,
228
228
  effects: null,
229
- equals: zr,
229
+ equals: Wr,
230
230
  f: e,
231
231
  fn: t,
232
232
  reactions: null,
233
233
  rv: 0,
234
- v: x,
234
+ v: N,
235
235
  wv: 0,
236
236
  parent: T,
237
237
  ac: null
238
238
  };
239
239
  }
240
- var ki = /* @__PURE__ */ Symbol("obsolete");
240
+ var Ci = /* @__PURE__ */ Symbol("obsolete");
241
241
  // @__NO_SIDE_EFFECTS__
242
- function Gt(t) {
243
- const e = /* @__PURE__ */ Et(t);
244
- return Ne || An(e), e;
242
+ function Pt(t) {
243
+ const e = /* @__PURE__ */ St(t);
244
+ return He || bn(e), e;
245
245
  }
246
246
  // @__NO_SIDE_EFFECTS__
247
- function Ri(t) {
248
- const e = /* @__PURE__ */ Et(t);
249
- return e.equals = Vr, e;
247
+ function $i(t) {
248
+ const e = /* @__PURE__ */ St(t);
249
+ return e.equals = jr, e;
250
250
  }
251
- function Li(t) {
251
+ function ki(t) {
252
252
  var e = t.effects;
253
253
  if (e !== null) {
254
254
  t.effects = null;
255
- for (var r = 0; r < e.length; r += 1) J(e[r]);
255
+ for (var r = 0; r < e.length; r += 1) Q(e[r]);
256
256
  }
257
257
  }
258
- function lr(t) {
258
+ function rr(t) {
259
259
  var e, r = T, n = t.parent;
260
- if (!fe && n !== null && t.v !== x && (n.f & 24576) !== 0)
261
- return ui(), t.v;
262
- _e(n);
260
+ if (!fe && n !== null && t.v !== N && (n.f & 24576) !== 0)
261
+ return li(), t.v;
262
+ ye(n);
263
263
  try {
264
- Li(t), e = Cn(t);
264
+ ki(t), e = En(t);
265
265
  } finally {
266
- _e(r);
266
+ ye(r);
267
267
  }
268
268
  return e;
269
269
  }
270
- function Zr(t) {
271
- var e = lr(t);
272
- if (!t.equals(e) && (t.wv = Tn(), (!$?.is_fork || t.deps === null) && ($ !== null ? ($.capture(t, e, !0), qe?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
273
- O(t, re);
270
+ function Xr(t) {
271
+ var e = rr(t);
272
+ if (!t.equals(e) && (t.wv = Sn(), (!C?.is_fork || t.deps === null) && (C !== null ? (C.capture(t, e, !0), We?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
273
+ H(t, re);
274
274
  return;
275
275
  }
276
- fe || (K !== null ? (fr() || $?.is_fork) && K.set(t, e) : ar(t));
276
+ fe || (B !== null ? (ar() || C?.is_fork) && B.set(t, e) : tr(t));
277
277
  }
278
- function Ii(t) {
278
+ function Ri(t) {
279
279
  if (t.effects !== null)
280
- for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && Pt(() => {
281
- e.ac.abort(xt), e.ac = null;
282
- }), e.fn !== null && (e.teardown = Jn), lt(e, 0), dr(e));
280
+ for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && xt(() => {
281
+ e.ac.abort(It), e.ac = null;
282
+ }), e.fn !== null && (e.teardown = Un), it(e, 0), or(e));
283
283
  }
284
- function en(t) {
284
+ function Ur(t) {
285
285
  if (t.effects !== null)
286
- for (const e of t.effects) e.teardown && e.fn !== null && Ye(e);
286
+ for (const e of t.effects) e.teardown && e.fn !== null && je(e);
287
287
  }
288
- function tn(t, e) {
288
+ function Jr(t, e) {
289
289
  if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
290
290
  }
291
- function or(t, e) {
292
- tn(t, e), e.add(t);
291
+ function nr(t, e) {
292
+ Jr(t, e), e.add(t);
293
293
  }
294
- function A(t, e, r) {
295
- tn(t, e), e.set(t, r);
294
+ function E(t, e, r) {
295
+ Jr(t, e), e.set(t, r);
296
296
  }
297
297
  function p(t, e, r) {
298
298
  if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : r;
299
299
  throw new TypeError("Private element is not present on this object");
300
300
  }
301
- function g(t, e, r) {
302
- return t.set(p(t, e), r), r;
303
- }
304
- function a(t, e) {
301
+ function l(t, e) {
305
302
  return t.get(p(t, e));
306
303
  }
307
- var rn, Tt = null, Fe = null, $ = null, qe = null, K = null, Xt = null, et = !1, Dt = !1, at = null, $t = null, nn = 0;
308
- var Oi = 1, Ct = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakSet(), ze = class sn {
304
+ function w(t, e, r) {
305
+ return t.set(p(t, e), r), r;
306
+ }
307
+ var Qr, At = null, Ke = null, C = null, We = null, B = null, qt = null, Je = !1, Kt = !1, nt = null, Et = null, Zr = 0;
308
+ var Li = 1, Tt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), qe = class en {
309
309
  constructor() {
310
- or(this, R), u(this, "id", Oi++), A(this, Ct, !1), u(this, "linked", !0), A(this, Ce, null), A(this, Ee, null), u(this, "async_deriveds", /* @__PURE__ */ new Map()), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), A(this, kt, /* @__PURE__ */ new Set()), A(this, ht, /* @__PURE__ */ new Set()), A(this, Ge, 0), A(this, be, /* @__PURE__ */ new Map()), A(this, Ue, null), A(this, V, []), A(this, Ut, []), A(this, Me, /* @__PURE__ */ new Set()), A(this, ce, /* @__PURE__ */ new Set()), A(this, he, /* @__PURE__ */ new Map()), A(this, mt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), A(this, Qe, !1), Fe === null ? Tt = Fe = this : (g(Ee, Fe, this), g(Ce, this, Fe)), Fe = this;
310
+ nr(this, $), u(this, "id", Li++), u(this, "started", !1), u(this, "linked", !0), u(this, "prev", null), u(this, "next", null), u(this, "async_deriveds", /* @__PURE__ */ new Map()), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), E(this, Tt, /* @__PURE__ */ new Set()), E(this, ct, /* @__PURE__ */ new Set()), E(this, Be, 0), E(this, Ae, /* @__PURE__ */ new Map()), E(this, ze, null), E(this, Me, []), E(this, Yt, []), E(this, pe, /* @__PURE__ */ new Map()), E(this, _e, /* @__PURE__ */ new Map()), E(this, _t, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), E(this, Ve, !1), Ke === null ? At = Ke = this : (Ke.next = this, this.prev = Ke), Ke = this;
311
311
  }
312
312
  skip_effect(e) {
313
- a(he, this).has(e) || a(he, this).set(e, {
313
+ l(_e, this).has(e) || l(_e, this).set(e, {
314
314
  d: [],
315
315
  m: []
316
- }), a(mt, this).delete(e);
316
+ }), l(_t, this).delete(e);
317
317
  }
318
318
  unskip_effect(e, r = (n) => this.schedule(n)) {
319
- var n = a(he, this).get(e);
319
+ var n = l(_e, this).get(e);
320
320
  if (n) {
321
- a(he, this).delete(e);
321
+ l(_e, this).delete(e);
322
322
  for (var i of n.d)
323
- O(i, z), r(i);
323
+ H(i, z), r(i);
324
324
  for (i of n.m)
325
- O(i, He), r(i);
325
+ H(i, be), r(i);
326
326
  }
327
- a(mt, this).add(e);
327
+ l(_t, this).add(e);
328
328
  }
329
329
  capture(e, r, n = !1) {
330
- e.v !== x && !this.previous.has(e) && this.previous.set(e, e.v), (e.f & 8388608) === 0 && (this.current.set(e, [r, n]), K?.set(e, r)), this.is_fork || (e.v = r);
330
+ e.v !== N && !this.previous.has(e) && this.previous.set(e, e.v), (e.f & 8388608) === 0 && (this.current.set(e, [r, n]), B?.set(e, r)), this.is_fork || (e.v = r);
331
331
  }
332
332
  activate() {
333
- $ = this;
333
+ C = this;
334
334
  }
335
335
  deactivate() {
336
- $ = null, K = null;
336
+ C = null, B = null;
337
337
  }
338
338
  flush() {
339
339
  try {
340
- Dt = !0, $ = this, p(R, this, Rt).call(this);
340
+ Kt = !0, C = this, p($, this, Ct).call(this);
341
341
  } finally {
342
- nn = 0, Xt = null, at = null, $t = null, Dt = !1, $ = null, K = null, ae.clear();
342
+ Zr = 0, qt = null, nt = null, Et = null, Kt = !1, C = null, B = null, le.clear();
343
343
  }
344
344
  }
345
345
  discard() {
346
- for (const e of a(ht, this)) e(this);
347
- a(ht, this).clear();
348
- for (const e of this.async_deriveds.values()) e.reject(ki);
349
- p(R, this, Lt).call(this), a(Ue, this)?.resolve();
346
+ for (const e of l(ct, this)) e(this);
347
+ l(ct, this).clear();
348
+ for (const e of this.async_deriveds.values()) e.reject(Ci);
349
+ p($, this, $t).call(this), l(ze, this)?.resolve();
350
350
  }
351
351
  register_created_effect(e) {
352
- a(Ut, this).push(e);
352
+ l(Yt, this).push(e);
353
353
  }
354
354
  increment(e, r) {
355
- if (g(Ge, this, a(Ge, this) + 1), e) {
356
- let n = a(be, this).get(r) ?? 0;
357
- a(be, this).set(r, n + 1);
355
+ if (w(Be, this, l(Be, this) + 1), e) {
356
+ let n = l(Ae, this).get(r) ?? 0;
357
+ l(Ae, this).set(r, n + 1);
358
358
  }
359
359
  }
360
360
  decrement(e, r) {
361
- if (g(Ge, this, a(Ge, this) - 1), e) {
362
- let n = a(be, this).get(r) ?? 0;
363
- n === 1 ? a(be, this).delete(r) : a(be, this).set(r, n - 1);
361
+ if (w(Be, this, l(Be, this) - 1), e) {
362
+ let n = l(Ae, this).get(r) ?? 0;
363
+ n === 1 ? l(Ae, this).delete(r) : l(Ae, this).set(r, n - 1);
364
364
  }
365
- a(Qe, this) || (g(Qe, this, !0), Oe(() => {
366
- g(Qe, this, !1), this.linked && this.flush();
365
+ l(Ve, this) || (w(Ve, this, !0), Oe(() => {
366
+ w(Ve, this, !1), this.linked && this.flush();
367
367
  }));
368
368
  }
369
- transfer_effects(e, r) {
370
- for (const n of e) a(Me, this).add(n);
371
- for (const n of r) a(ce, this).add(n);
372
- e.clear(), r.clear();
369
+ transfer_reactions(e) {
370
+ for (const [r, n] of e) this.add_dirty_reaction(r, n);
371
+ e.clear();
372
+ }
373
+ add_dirty_reaction(e, r) {
374
+ (r === 2048 || l(pe, this).get(e) !== 2048) && l(pe, this).set(e, r);
373
375
  }
374
376
  oncommit(e) {
375
- a(kt, this).add(e);
377
+ l(Tt, this).add(e);
376
378
  }
377
379
  ondiscard(e) {
378
- a(ht, this).add(e);
380
+ l(ct, this).add(e);
379
381
  }
380
382
  settled() {
381
- return (a(Ue, this) ?? g(Ue, this, ei())).promise;
383
+ return (l(ze, this) ?? w(ze, this, Qn())).promise;
382
384
  }
383
385
  static ensure() {
384
- if ($ === null) {
385
- const e = $ = new sn();
386
- !Dt && !et && Oe(() => {
387
- a(Ct, e) || e.flush();
386
+ if (C === null) {
387
+ const e = C = new en();
388
+ !Kt && !Je && Oe(() => {
389
+ e.started || e.flush();
388
390
  });
389
391
  }
390
- return $;
392
+ return C;
391
393
  }
392
394
  apply() {
393
- if (!Ne || !this.is_fork && a(Ce, this) === null && a(Ee, this) === null) {
394
- K = null;
395
+ if (!He || !this.is_fork && this.prev === null && this.next === null) {
396
+ B = null;
395
397
  return;
396
398
  }
397
- K = /* @__PURE__ */ new Map();
398
- for (const [r, [n]] of this.current) K.set(r, n);
399
- for (let r = Tt; r !== null; r = a(Ee, r))
400
- if (!(r === this || r.is_fork)) {
401
- var e = !1;
402
- if (r.id < this.id) {
403
- for (const [n, [, i]] of r.current)
404
- if (!i && this.current.has(n)) {
405
- e = !0;
406
- break;
407
- }
408
- }
409
- if (!e)
410
- for (const [n, i] of r.previous) K.has(n) || K.set(n, i);
411
- }
399
+ B = /* @__PURE__ */ new Map();
400
+ for (const [e, [r]] of this.current) B.set(e, r);
401
+ for (let e = At; e !== null; e = e.next)
402
+ if (!(e === this || e.is_fork) && (e.id >= this.id || !p($, e, nn).call(e, this)))
403
+ for (const [r, n] of e.previous) B.has(r) || B.set(r, n);
412
404
  }
413
405
  schedule(e) {
414
- if (Xt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
406
+ if (qt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
415
407
  e.b.defer_effect(e);
416
408
  return;
417
409
  }
418
- a(V, this).push(e);
410
+ l(Me, this).push(e);
419
411
  }
420
412
  };
421
- rn = ze;
422
- function Sr() {
413
+ Qr = qe;
414
+ function gr() {
423
415
  if (this.is_fork) return !0;
424
- for (const r of a(be, this).keys()) {
425
- for (var t = r, e = !1; t.parent !== null; ) {
426
- if (a(he, this).has(t)) {
427
- e = !0;
428
- break;
429
- }
430
- t = t.parent;
431
- }
432
- if (!e) return !0;
433
- }
416
+ for (const t of l(Ae, this).keys()) if (!p($, this, Ii).call(this, t)) return !0;
417
+ return !1;
418
+ }
419
+ function Ii(t) {
420
+ for (var e = t; e !== null; e = e.parent) if (l(_e, this).has(e)) return !0;
434
421
  return !1;
435
422
  }
436
- function an() {
423
+ function tn() {
437
424
  var t = [];
438
- for (const i of a(V, this))
425
+ for (const i of l(Me, this))
439
426
  if (!((i.f & 16384) !== 0 || (i.f & 6144) === 0)) {
440
427
  for (var e = i, r = !1; e.parent !== null; ) {
441
428
  e = e.parent;
@@ -450,58 +437,51 @@ function an() {
450
437
  }
451
438
  r || t.push(e);
452
439
  }
453
- return g(V, this, []), t;
440
+ return w(Me, this, []), t;
454
441
  }
455
- function Rt() {
456
- g(Ct, this, !0);
457
- for (const l of a(Me, this))
458
- a(ce, this).delete(l), O(l, z), this.schedule(l);
459
- for (const l of a(ce, this))
460
- O(l, He), this.schedule(l);
442
+ function Ct() {
443
+ this.started = !0;
444
+ for (const [a, o] of l(pe, this))
445
+ H(a, o), this.schedule(a);
461
446
  this.apply();
462
- for (var t = at = [], e = [], r = $t = []; a(V, this).length > 0; ) {
463
- nn++ > 1e3 && (p(R, this, Lt).call(this), Ni());
464
- for (const l of p(R, this, an).call(this)) try {
465
- p(R, this, ln).call(this, l, t, e);
447
+ for (var t = nt = [], e = [], r = Et = []; l(Me, this).length > 0; ) {
448
+ Zr++ > 1e3 && (p($, this, $t).call(this), Hi());
449
+ for (const a of p($, this, tn).call(this)) try {
450
+ p($, this, rn).call(this, a, t, e);
466
451
  } catch (o) {
467
- throw cn(l), p(R, this, Sr).call(this) || this.discard(), o;
452
+ throw ln(a), p($, this, gr).call(this) || this.discard(), o;
468
453
  }
469
454
  }
470
- if ($ = null, r.length > 0) {
471
- var n = rn.ensure();
472
- for (const l of r) n.schedule(l);
455
+ if (C = null, r.length > 0) {
456
+ var n = Qr.ensure();
457
+ for (const a of r) n.schedule(a);
473
458
  }
474
- if (at = null, $t = null, p(R, this, Sr).call(this)) {
475
- p(R, this, Je).call(this, e), p(R, this, Je).call(this, t);
476
- for (const [l, o] of a(he, this)) un(l, o);
477
- r.length > 0 && p(R, $, Rt).call($);
459
+ if (nt = null, Et = null, p($, this, gr).call(this)) {
460
+ p($, this, Xe).call(this, e), p($, this, Xe).call(this, t);
461
+ for (const [a, o] of l(_e, this)) an(a, o);
462
+ r.length > 0 && p($, C, Ct).call(C);
478
463
  return;
479
464
  }
480
- const i = p(R, this, Mi).call(this);
465
+ const i = p($, this, Oi).call(this);
481
466
  if (i) {
482
- p(R, this, Je).call(this, e), p(R, this, Je).call(this, t), p(R, i, xi).call(i, this);
467
+ p($, this, Xe).call(this, e), p($, this, Xe).call(this, t), p($, i, Mi).call(i, this);
483
468
  return;
484
469
  }
485
- a(Me, this).clear(), a(ce, this).clear();
486
- for (const l of a(kt, this)) l(this);
487
- a(kt, this).clear(), qe = this, Ar(e), Ar(t), qe = null, a(Ue, this)?.resolve();
488
- var s = $;
489
- if (a(Ge, this) === 0 && (a(V, this).length === 0 || s !== null) && (p(R, this, Lt).call(this), Ne && (p(R, this, Hi).call(this), $ = s)), a(V, this).length > 0)
490
- if (s !== null) {
491
- for (const l of a(V, this)) a(V, s).push(l);
492
- g(V, this, []);
493
- } else s = this;
494
- s !== null && (ae.clear(), p(R, s, Rt).call(s));
495
- }
496
- function ln(t, e, r) {
470
+ l(pe, this).clear();
471
+ for (const a of l(Tt, this)) a(this);
472
+ l(Tt, this).clear(), We = this, yr(e), yr(t), We = null, l(ze, this)?.resolve();
473
+ var s = C;
474
+ l(Be, this) === 0 && (l(Me, this).length === 0 || s !== null) && (p($, this, $t).call(this), He && (p($, this, xi).call(this), C = s)), s !== null && (le.clear(), p($, s, Ct).call(s));
475
+ }
476
+ function rn(t, e, r) {
497
477
  t.f ^= re;
498
478
  for (var n = t.first; n !== null; ) {
499
479
  var i = n.f, s = (i & 96) !== 0;
500
- if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || a(he, this).has(n)) && n.fn !== null) {
501
- s ? n.f ^= re : (i & 4) !== 0 ? e.push(n) : Ne && (i & 16777224) !== 0 ? r.push(n) : ct(n) && ((i & 16) !== 0 && a(ce, this).add(n), Ye(n));
502
- var l = n.first;
503
- if (l !== null) {
504
- n = l;
480
+ if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || l(_e, this).has(n)) && n.fn !== null) {
481
+ s ? n.f ^= re : (i & 4) !== 0 ? e.push(n) : He && (i & 16777224) !== 0 ? r.push(n) : ot(n) && ((i & 16) !== 0 && this.add_dirty_reaction(n, be), je(n));
482
+ var a = n.first;
483
+ if (a !== null) {
484
+ n = a;
505
485
  continue;
506
486
  }
507
487
  }
@@ -515,410 +495,411 @@ function ln(t, e, r) {
515
495
  }
516
496
  }
517
497
  }
518
- function Mi() {
519
- for (var t = a(Ce, this); t !== null; ) {
520
- if (!t.is_fork) {
521
- for (const [e, [, r]] of this.current) if (t.current.has(e) && !r) return t;
522
- }
523
- t = a(Ce, t);
524
- }
498
+ function Oi() {
499
+ for (var t = this.prev; t !== null; t = t.prev) if (!t.is_fork && p($, this, nn).call(this, t)) return t;
525
500
  return null;
526
501
  }
527
- function xi(t) {
502
+ function nn(t) {
503
+ for (const [e, [, r]] of this.current)
504
+ if (!r && t.current.has(e))
505
+ return !0;
506
+ return !1;
507
+ }
508
+ function Mi(t) {
528
509
  for (const [r, n] of t.current)
529
510
  !this.previous.has(r) && t.previous.has(r) && this.previous.set(r, t.previous.get(r)), this.current.set(r, n);
530
511
  for (const [r, n] of t.async_deriveds) {
531
512
  const i = this.async_deriveds.get(r);
532
513
  i && n.promise.then(i.resolve).catch(i.reject);
533
514
  }
534
- t.async_deriveds.clear(), this.transfer_effects(a(Me, t), a(ce, t));
515
+ t.async_deriveds.clear(), this.transfer_reactions(l(pe, t));
535
516
  const e = (r) => {
536
517
  var n = r.reactions;
537
518
  if (n !== null && !((r.f & 2) !== 0 && (r.f & 6144) === 0))
538
- for (const l of n) {
539
- var i = l.f;
540
- if ((i & 2) !== 0) e(l);
519
+ for (const a of n) {
520
+ var i = a.f;
521
+ if ((i & 2) !== 0) e(a);
541
522
  else {
542
- var s = l;
543
- i & 4194320 && !this.async_deriveds.has(s) && (a(ce, this).delete(s), O(s, z), this.schedule(s));
523
+ var s = a;
524
+ i & 4194320 && !this.async_deriveds.has(s) && (l(pe, this).delete(s), H(s, z), this.schedule(s));
544
525
  }
545
526
  }
546
527
  };
547
528
  for (const r of this.current.keys()) e(r);
548
- this.oncommit(() => t.discard()), p(R, t, Lt).call(t), $ = this, p(R, this, Rt).call(this);
529
+ this.oncommit(() => t.discard()), p($, t, $t).call(t), C = this, p($, this, Ct).call(this);
549
530
  }
550
- function Je(t) {
551
- for (var e = 0; e < t.length; e += 1) Jr(t[e], a(Me, this), a(ce, this));
531
+ function Xe(t) {
532
+ for (var e = 0; e < t.length; e += 1) Vr(t[e], l(pe, this));
552
533
  }
553
- function Hi() {
554
- for (let v = Tt; v !== null; v = a(Ee, v)) {
534
+ function xi() {
535
+ for (let v = At; v !== null; v = v.next) {
555
536
  var t = v.id < this.id, e = [];
556
- for (const [c, [d, h]] of this.current) {
557
- if (v.current.has(c)) {
558
- var r = v.current.get(c)[0];
559
- if (t && d !== r) v.current.set(c, [d, h]);
537
+ for (const [h, [f, d]] of this.current) {
538
+ if (v.current.has(h)) {
539
+ var r = v.current.get(h)[0];
540
+ if (t && f !== r) v.current.set(h, [f, d]);
560
541
  else continue;
561
542
  }
562
- e.push(c);
543
+ e.push(h);
563
544
  }
564
- if (t) for (const [c, d] of this.async_deriveds) {
565
- const h = v.async_deriveds.get(c);
566
- h && d.promise.then(h.resolve).catch(h.reject);
545
+ if (t) for (const [h, f] of this.async_deriveds) {
546
+ const d = v.async_deriveds.get(h);
547
+ d && f.promise.then(d.resolve).catch(d.reject);
567
548
  }
568
- var n = [...v.current.keys()].filter((c) => !v.current.get(c)[1]);
569
- if (!(!a(Ct, v) || n.length === 0)) {
570
- var i = n.filter((c) => !this.current.has(c));
549
+ var n = [...v.current.keys()].filter((h) => !v.current.get(h)[1]);
550
+ if (!(!v.started || n.length === 0)) {
551
+ var i = n.filter((h) => !this.current.has(h));
571
552
  if (i.length === 0)
572
553
  t && v.discard();
573
554
  else if (e.length > 0) {
574
- if (t) for (const c of a(mt, this)) v.unskip_effect(c, (d) => {
575
- (d.f & 4194320) !== 0 ? v.schedule(d) : p(R, v, Je).call(v, [d]);
555
+ if (t) for (const h of l(_t, this)) v.unskip_effect(h, (f) => {
556
+ (f.f & 4194320) !== 0 ? v.schedule(f) : p($, v, Xe).call(v, [f]);
576
557
  });
577
558
  v.activate();
578
- var s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
579
- for (var o of e) on(o, i, s, l);
580
- l = /* @__PURE__ */ new Map();
581
- var f = [...v.current].filter(([c, d]) => {
582
- const h = this.current.get(c);
583
- return h ? h[0] !== d[0] || h[1] !== d[1] : !0;
584
- }).map(([c]) => c);
585
- if (f.length > 0)
586
- for (const c of a(Ut, this)) (c.f & 155648) === 0 && ur(c, f, l) && ((c.f & 4194320) !== 0 ? (O(c, z), v.schedule(c)) : a(Me, v).add(c));
587
- if (a(V, v).length > 0 && !a(Qe, v)) {
559
+ var s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
560
+ for (var o of e) sn(o, i, s, a);
561
+ a = /* @__PURE__ */ new Map();
562
+ var c = [...v.current].filter(([h, f]) => {
563
+ const d = this.current.get(h);
564
+ return d ? d[0] !== f[0] || d[1] !== f[1] : !0;
565
+ }).map(([h]) => h);
566
+ if (c.length > 0)
567
+ for (const h of l(Yt, this)) (h.f & 155648) === 0 && ir(h, c, a) && ((h.f & 4194320) !== 0 ? (H(h, z), v.schedule(h)) : v.add_dirty_reaction(h, z));
568
+ if (l(Me, v).length > 0 && !l(Ve, v)) {
588
569
  v.apply();
589
- for (var b of p(R, v, an).call(v)) p(R, v, ln).call(v, b, [], []);
570
+ for (var y of p($, v, tn).call(v)) p($, v, rn).call(v, y, [], []);
590
571
  }
591
572
  v.deactivate();
592
573
  }
593
574
  }
594
575
  }
595
576
  }
596
- function Lt() {
577
+ function $t() {
597
578
  if (this.linked) {
598
- var t = a(Ce, this), e = a(Ee, this);
599
- t === null ? Tt = e : g(Ee, t, e), e === null ? Fe = t : g(Ce, e, t), this.linked = !1;
579
+ var t = this.prev, e = this.next;
580
+ t === null ? At = e : t.next = e, e === null ? Ke = t : e.prev = t, this.linked = !1;
600
581
  }
601
582
  }
602
- function we(t) {
603
- var e = et, r = qe;
604
- qe = null, et = !0;
583
+ function ve(t) {
584
+ var e = Je, r = We;
585
+ We = null, Je = !0;
605
586
  try {
606
587
  var n;
607
- for (t && (we(), n = t()); ; ) {
608
- if ($i(), $ === null) return n;
609
- $.flush();
588
+ for (t && (ve(), n = t()); ; ) {
589
+ if (Ei(), C === null) return n;
590
+ C.flush();
610
591
  }
611
592
  } finally {
612
- et = e, qe = r;
593
+ Je = e, We = r;
613
594
  }
614
595
  }
615
- function Ni() {
596
+ function Hi() {
616
597
  if (0) {
617
598
  var t;
618
- for (const r of $.current.keys()) for (const [n, i] of r.updated ?? [])
599
+ for (const r of C.current.keys()) for (const [n, i] of r.updated ?? [])
619
600
  var e;
620
601
  }
621
602
  try {
622
- gi();
603
+ pi();
623
604
  } catch (r) {
624
- de(r, Xt);
605
+ me(r, qt);
625
606
  }
626
607
  }
627
- var ue = null;
628
- function Ar(t) {
608
+ var ce = null;
609
+ function yr(t) {
629
610
  var e = t.length;
630
611
  if (e !== 0) {
631
612
  for (var r = 0; r < e; ) {
632
613
  var n = t[r++];
633
- if ((n.f & 24576) === 0 && ct(n) && (ue = /* @__PURE__ */ new Set(), Ye(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && wn(n), ue?.size > 0)) {
634
- ae.clear();
635
- for (const i of ue) {
614
+ if ((n.f & 24576) === 0 && ot(n) && (ce = /* @__PURE__ */ new Set(), je(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && gn(n), ce?.size > 0)) {
615
+ le.clear();
616
+ for (const i of ce) {
636
617
  if ((i.f & 24576) !== 0) continue;
637
618
  const s = [i];
638
- let l = i.parent;
639
- for (; l !== null; )
640
- ue.has(l) && (ue.delete(l), s.push(l)), l = l.parent;
619
+ let a = i.parent;
620
+ for (; a !== null; )
621
+ ce.has(a) && (ce.delete(a), s.push(a)), a = a.parent;
641
622
  for (let o = s.length - 1; o >= 0; o--) {
642
- const f = s[o];
643
- (f.f & 24576) === 0 && Ye(f);
623
+ const c = s[o];
624
+ (c.f & 24576) === 0 && je(c);
644
625
  }
645
626
  }
646
- ue.clear();
627
+ ce.clear();
647
628
  }
648
629
  }
649
- ue = null;
630
+ ce = null;
650
631
  }
651
632
  }
652
- function on(t, e, r, n) {
633
+ function sn(t, e, r, n) {
653
634
  if (!r.has(t) && (r.add(t), t.reactions !== null))
654
635
  for (const i of t.reactions) {
655
636
  const s = i.f;
656
- (s & 2) !== 0 ? on(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && ur(i, e, n) && (O(i, z), cr(i));
637
+ (s & 2) !== 0 ? sn(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && ir(i, e, n) && (H(i, z), sr(i));
657
638
  }
658
639
  }
659
- function ur(t, e, r) {
640
+ function ir(t, e, r) {
660
641
  const n = r.get(t);
661
642
  if (n !== void 0) return n;
662
643
  if (t.deps !== null) for (const i of t.deps) {
663
- if (rt.call(e, i)) return !0;
664
- if ((i.f & 2) !== 0 && ur(i, e, r))
644
+ if (Ze.call(e, i)) return !0;
645
+ if ((i.f & 2) !== 0 && ir(i, e, r))
665
646
  return r.set(i, !0), !0;
666
647
  }
667
648
  return r.set(t, !1), !1;
668
649
  }
669
- function cr(t) {
670
- $.schedule(t);
650
+ function sr(t) {
651
+ C.schedule(t);
671
652
  }
672
- function un(t, e) {
653
+ function an(t, e) {
673
654
  if (!((t.f & 32) !== 0 && (t.f & 1024) !== 0)) {
674
- (t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), O(t, re);
655
+ (t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), H(t, re);
675
656
  for (var r = t.first; r !== null; )
676
- un(r, e), r = r.next;
657
+ an(r, e), r = r.next;
677
658
  }
678
659
  }
679
- function cn(t) {
680
- O(t, re);
660
+ function ln(t) {
661
+ H(t, re);
681
662
  for (var e = t.first; e !== null; )
682
- cn(e), e = e.next;
663
+ ln(e), e = e.next;
683
664
  }
684
- var It = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map();
685
- var fn = !1;
686
- function Kt(t, e) {
665
+ var kt = /* @__PURE__ */ new Set(), le = /* @__PURE__ */ new Map();
666
+ var on = !1;
667
+ function Ht(t, e) {
687
668
  var r = {
688
669
  f: 0,
689
670
  v: t,
690
671
  reactions: null,
691
- equals: zr,
672
+ equals: Wr,
692
673
  rv: 0,
693
674
  wv: 0
694
675
  };
695
676
  return r;
696
677
  }
697
678
  // @__NO_SIDE_EFFECTS__
698
- function W(t, e) {
699
- const r = Kt(t, e);
700
- return An(r), r;
679
+ function j(t, e) {
680
+ const r = Ht(t, e);
681
+ return bn(r), r;
701
682
  }
702
683
  // @__NO_SIDE_EFFECTS__
703
- function Pi(t, e = !1, r = !0) {
704
- const n = Kt(t);
705
- if (e || (n.equals = Vr), Ht && r && M !== null && M.l !== null) {
684
+ function Ni(t, e = !1, r = !0) {
685
+ const n = Ht(t);
686
+ if (e || (n.equals = jr), Ot && r && x !== null && x.l !== null) {
706
687
  var i;
707
- ((i = M.l).s ?? (i.s = [])).push(n);
688
+ ((i = x.l).s ?? (i.s = [])).push(n);
708
689
  }
709
690
  return n;
710
691
  }
711
- function N(t, e, r = !1) {
712
- E !== null && (!X || (E.f & 131072) !== 0) && Nt() && (E.f & 4325394) !== 0 && (Z === null || !Z.has(t)) && Ai();
713
- let n = r ? je(e) : e;
714
- return hn(t, n, $t);
692
+ function K(t, e, r = !1) {
693
+ A !== null && (!X || (A.f & 131072) !== 0) && Mt() && (A.f & 4325394) !== 0 && (Z === null || !Z.has(t)) && wi();
694
+ let n = r ? De(e) : e;
695
+ return un(t, n, Et);
715
696
  }
716
- var Se = null, Qt = 0;
717
- function hn(t, e, r = null) {
697
+ var Ee = null, zt = 0;
698
+ function un(t, e, r = null) {
718
699
  if (!t.equals(e)) {
719
- fe ? ae.set(t, e) : ae.has(t) || ae.set(t, t.v);
720
- var n = ze.ensure();
700
+ fe ? le.set(t, e) : le.has(t) || le.set(t, t.v);
701
+ var n = qe.ensure();
721
702
  if (n.capture(t, e), (t.f & 2) !== 0) {
722
703
  const i = t;
723
- (t.f & 2048) !== 0 && lr(i), K === null && ar(i);
704
+ (t.f & 2048) !== 0 && rr(i), B === null && tr(i);
724
705
  }
725
- t.wv = Tn(), Se = null, Qt = 0, dn(t, z, r), Se = null, Nt() && T !== null && (T.f & 1024) !== 0 && (T.f & 96) === 0 && (Y === null ? es([t]) : Y.push(t)), !n.is_fork && It.size > 0 && !fn && Ki();
706
+ t.wv = Sn(), Ee = null, zt = 0, cn(t, z, r), Ee = null, Mt() && T !== null && (T.f & 1024) !== 0 && (T.f & 96) === 0 && (V === null ? Zi([t]) : V.push(t)), !n.is_fork && kt.size > 0 && !on && Pi();
726
707
  }
727
708
  return e;
728
709
  }
729
- function Ki() {
730
- fn = !1;
731
- for (const t of It) {
732
- (t.f & 1024) !== 0 && O(t, He);
710
+ function Pi() {
711
+ on = !1;
712
+ for (const t of kt) {
713
+ (t.f & 1024) !== 0 && H(t, be);
733
714
  let e;
734
715
  try {
735
- e = ct(t);
716
+ e = ot(t);
736
717
  } catch {
737
718
  e = !0;
738
719
  }
739
- e && Ye(t);
720
+ e && je(t);
740
721
  }
741
- It.clear();
722
+ kt.clear();
742
723
  }
743
- function tt(t) {
744
- N(t, t.v + 1);
724
+ function Qe(t) {
725
+ K(t, t.v + 1);
745
726
  }
746
- function dn(t, e, r) {
727
+ function cn(t, e, r) {
747
728
  var n = t.reactions;
748
729
  if (n !== null) {
749
- var i = Nt(), s = n.length;
750
- if (Qt += s, Qt > 1e5 && Se === null && (Se = /* @__PURE__ */ new Set()), Se !== null) {
751
- if (Se.has(t)) return;
752
- Se.add(t);
730
+ var i = Mt(), s = n.length;
731
+ if (zt += s, zt > 1e5 && Ee === null && (Ee = /* @__PURE__ */ new Set()), Ee !== null) {
732
+ if (Ee.has(t)) return;
733
+ Ee.add(t);
753
734
  }
754
- for (var l = 0; l < s; l++) {
755
- var o = n[l], f = o.f;
735
+ for (var a = 0; a < s; a++) {
736
+ var o = n[a], c = o.f;
756
737
  if (!(!i && o === T)) {
757
- var b = (f & z) === 0;
758
- if (b && O(o, e), (f & 131072) !== 0) It.add(o);
759
- else if ((f & 2) !== 0) {
738
+ var y = (c & z) === 0;
739
+ if (y && H(o, e), (c & 131072) !== 0) kt.add(o);
740
+ else if ((c & 2) !== 0) {
760
741
  var v = o;
761
- K?.delete(v), dn(v, He, r);
762
- } else if (b) {
763
- var c = o;
764
- (f & 16) !== 0 && ue !== null && ue.add(c), r !== null ? r.push(c) : cr(c);
742
+ B?.delete(v), cn(v, be, r);
743
+ } else if (y) {
744
+ var h = o;
745
+ (c & 16) !== 0 && ce !== null && ce.add(h), r !== null ? r.push(h) : sr(h);
765
746
  }
766
747
  }
767
748
  }
768
749
  }
769
750
  }
770
- var Bi = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
771
- function je(t) {
772
- if (typeof t != "object" || t === null || Ze in t || jr in t) return t;
773
- const e = Qn(t);
774
- if (e !== Xn && e !== Un) return t;
775
- var r = /* @__PURE__ */ new Map(), n = Yn(t), i = /* @__PURE__ */ W(0), s = null, l = ke, o = (c) => {
776
- if (ke === l) return c();
777
- var d = E, h = ke;
778
- le(null), $r(l);
779
- var _ = c();
780
- return le(d), $r(h), _;
751
+ var Ki = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
752
+ function De(t) {
753
+ if (typeof t != "object" || t === null || Ue in t || Fr in t) return t;
754
+ const e = Xn(t);
755
+ if (e !== zn && e !== Vn) return t;
756
+ var r = /* @__PURE__ */ new Map(), n = jn(t), i = /* @__PURE__ */ j(0), s = null, a = ke, o = (h) => {
757
+ if (ke === a) return h();
758
+ var f = A, d = ke;
759
+ oe(null), Sr(a);
760
+ var _ = h();
761
+ return oe(f), Sr(d), _;
781
762
  };
782
- n && r.set("length", /* @__PURE__ */ W(t.length, s));
783
- var f = "";
784
- let b = !1;
785
- function v(c) {
786
- if (!b) {
787
- b = !0, f = c, wr(i, `${f} version`);
788
- for (const [d, h] of r) wr(h, Fi(f, d));
789
- b = !1;
763
+ n && r.set("length", /* @__PURE__ */ j(t.length, s));
764
+ var c = "";
765
+ let y = !1;
766
+ function v(h) {
767
+ if (!y) {
768
+ y = !0, c = h, mr(i, `${c} version`);
769
+ for (const [f, d] of r) mr(d, Bi(c, f));
770
+ y = !1;
790
771
  }
791
772
  }
792
773
  return new Proxy(t, {
793
- defineProperty(c, d, h) {
794
- (!("value" in h) || h.configurable === !1 || h.enumerable === !1 || h.writable === !1) && wi();
795
- var _ = r.get(d);
774
+ defineProperty(h, f, d) {
775
+ (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && yi();
776
+ var _ = r.get(f);
796
777
  return _ === void 0 ? o(() => {
797
- var y = /* @__PURE__ */ W(h.value, s);
798
- return r.set(d, y), y;
799
- }) : N(_, h.value, !0), !0;
778
+ var m = /* @__PURE__ */ j(d.value, s);
779
+ return r.set(f, m), m;
780
+ }) : K(_, d.value, !0), !0;
800
781
  },
801
- deleteProperty(c, d) {
802
- var h = r.get(d);
803
- if (h === void 0) {
804
- if (d in c) {
805
- const _ = o(() => /* @__PURE__ */ W(x, s));
806
- r.set(d, _), tt(i);
782
+ deleteProperty(h, f) {
783
+ var d = r.get(f);
784
+ if (d === void 0) {
785
+ if (f in h) {
786
+ const _ = o(() => /* @__PURE__ */ j(N, s));
787
+ r.set(f, _), Qe(i);
807
788
  }
808
789
  } else
809
- N(h, x), tt(i);
790
+ K(d, N), Qe(i);
810
791
  return !0;
811
792
  },
812
- get(c, d, h) {
813
- if (d === Ze) return t;
814
- var _ = r.get(d), y = d in c;
815
- if (_ === void 0 && (!y || $e(c, d)?.writable) && (_ = o(() => {
816
- var I = je(y ? c[d] : x), H = /* @__PURE__ */ W(I, s);
817
- return H;
818
- }), r.set(d, _)), _ !== void 0) {
819
- var k = S(_);
820
- return k === x ? void 0 : k;
793
+ get(h, f, d) {
794
+ if (f === Ue) return t;
795
+ var _ = r.get(f), m = f in h;
796
+ if (_ === void 0 && (!m || $e(h, f)?.writable) && (_ = o(() => {
797
+ var R = De(m ? h[f] : N), P = /* @__PURE__ */ j(R, s);
798
+ return P;
799
+ }), r.set(f, _)), _ !== void 0) {
800
+ var I = S(_);
801
+ return I === N ? void 0 : I;
821
802
  }
822
- return Reflect.get(c, d, h);
803
+ return Reflect.get(h, f, d);
823
804
  },
824
- getOwnPropertyDescriptor(c, d) {
825
- this.has?.(c, d);
826
- var h = Reflect.getOwnPropertyDescriptor(c, d), _ = r.get(d);
805
+ getOwnPropertyDescriptor(h, f) {
806
+ this.has?.(h, f);
807
+ var d = Reflect.getOwnPropertyDescriptor(h, f), _ = r.get(f);
827
808
  if (_ !== void 0) {
828
- var y = S(_);
829
- if (y === x) return;
830
- if (h && "value" in h) h.value = y;
809
+ var m = S(_);
810
+ if (m === N) return;
811
+ if (d && "value" in d) d.value = m;
831
812
  else return {
832
813
  enumerable: !0,
833
814
  configurable: !0,
834
- value: y,
815
+ value: m,
835
816
  writable: !0
836
817
  };
837
818
  }
838
- return h;
819
+ return d;
839
820
  },
840
- has(c, d) {
841
- if (d === Ze) return !0;
842
- var h = r.get(d), _ = h !== void 0 && h.v !== x || Reflect.has(c, d);
843
- return (h !== void 0 || T !== null && (!_ || $e(c, d)?.writable)) && (h === void 0 && (h = o(() => {
844
- var y = _ ? je(c[d]) : x, k = /* @__PURE__ */ W(y, s);
845
- return k;
846
- }), r.set(d, h)), S(h) === x) ? !1 : _;
821
+ has(h, f) {
822
+ if (f === Ue) return !0;
823
+ var d = r.get(f), _ = d !== void 0 && d.v !== N || Reflect.has(h, f);
824
+ return (d !== void 0 || (T !== null || A !== null) && (!_ || $e(h, f)?.writable)) && (d === void 0 && (d = o(() => {
825
+ var m = _ ? De(h[f]) : N, I = /* @__PURE__ */ j(m, s);
826
+ return I;
827
+ }), r.set(f, d)), S(d) === N) ? !1 : _;
847
828
  },
848
- set(c, d, h, _) {
849
- var y = r.get(d), k = d in c;
850
- if (n && d === "length") for (var I = h; I < y.v; I += 1) {
851
- var H = r.get(I + "");
852
- H !== void 0 ? N(H, x) : I in c && (H = o(() => /* @__PURE__ */ W(x, s)), r.set(I + "", H));
829
+ set(h, f, d, _) {
830
+ var m = r.get(f), I = f in h;
831
+ if (n && f === "length") for (var R = d; R < m.v; R += 1) {
832
+ var P = r.get(R + "");
833
+ P !== void 0 ? K(P, N) : R in h && (P = o(() => /* @__PURE__ */ j(N, s)), r.set(R + "", P));
853
834
  }
854
- if (y === void 0)
855
- (!k || $e(c, d)?.writable) && (y = o(() => /* @__PURE__ */ W(void 0, s)), N(y, je(h)), r.set(d, y));
835
+ if (m === void 0)
836
+ (!I || $e(h, f)?.writable) && (m = o(() => /* @__PURE__ */ j(void 0, s)), K(m, De(d)), r.set(f, m));
856
837
  else {
857
- k = y.v !== x;
858
- var ne = o(() => je(h));
859
- N(y, ne);
838
+ I = m.v !== N;
839
+ var ne = o(() => De(d));
840
+ K(m, ne);
860
841
  }
861
- var m = Reflect.getOwnPropertyDescriptor(c, d);
862
- if (m?.set && m.set.call(_, h), !k) {
863
- if (n && typeof d == "string") {
864
- var pe = r.get("length"), Be = Number(d);
865
- Number.isInteger(Be) && Be >= pe.v && N(pe, Be + 1);
842
+ var O = Reflect.getOwnPropertyDescriptor(h, f);
843
+ if (O?.set && O.set.call(_, d), !I) {
844
+ if (n && typeof f == "string") {
845
+ var ie = r.get("length"), g = Number(f);
846
+ Number.isInteger(g) && g >= ie.v && K(ie, g + 1);
866
847
  }
867
- tt(i);
848
+ Qe(i);
868
849
  }
869
850
  return !0;
870
851
  },
871
- ownKeys(c) {
852
+ ownKeys(h) {
872
853
  S(i);
873
- var d = Reflect.ownKeys(c).filter((y) => {
874
- var k = r.get(y);
875
- return k === void 0 || k.v !== x;
854
+ var f = Reflect.ownKeys(h).filter((m) => {
855
+ var I = r.get(m);
856
+ return I === void 0 || I.v !== N;
876
857
  });
877
- for (var [h, _] of r) _.v !== x && !(h in c) && d.push(h);
878
- return d;
858
+ for (var [d, _] of r) _.v !== N && !(d in h) && f.push(d);
859
+ return f;
879
860
  },
880
861
  setPrototypeOf() {
881
- Si();
862
+ bi();
882
863
  }
883
864
  });
884
865
  }
885
- function Fi(t, e) {
886
- return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Bi.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
866
+ function Bi(t, e) {
867
+ return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Ki.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
887
868
  }
888
- var Er, Gi, vn, _n, pn;
889
- function Jt() {
890
- if (Er === void 0) {
891
- Er = window, Gi = document, vn = /Firefox/.test(navigator.userAgent);
869
+ var br, Fi, fn, hn, dn;
870
+ function Vt() {
871
+ if (br === void 0) {
872
+ br = window, Fi = document, fn = /Firefox/.test(navigator.userAgent);
892
873
  var t = Element.prototype, e = Node.prototype, r = Text.prototype;
893
- _n = $e(e, "firstChild").get, pn = $e(e, "nextSibling").get, yr(t) && (t[ai] = void 0, t[si] = null, t[li] = void 0, t.__e = void 0), yr(r) && (r[oi] = void 0);
874
+ hn = $e(e, "firstChild").get, dn = $e(e, "nextSibling").get, _r(t) && (t[ii] = void 0, t[ni] = null, t[si] = void 0, t.__e = void 0), _r(r) && (r[ai] = void 0);
894
875
  }
895
876
  }
896
- function mn(t = "") {
877
+ function vn(t = "") {
897
878
  return document.createTextNode(t);
898
879
  }
899
880
  // @__NO_SIDE_EFFECTS__
900
- function Zt(t) {
901
- return _n.call(t);
881
+ function Xt(t) {
882
+ return hn.call(t);
902
883
  }
903
884
  // @__NO_SIDE_EFFECTS__
904
- function Ve(t) {
905
- return pn.call(t);
885
+ function Ye(t) {
886
+ return dn.call(t);
906
887
  }
907
- function Di(t) {
888
+ function Gi(t) {
908
889
  t.textContent = "";
909
890
  }
910
- function gn(t, e, r) {
891
+ function _n(t, e, r) {
911
892
  return e == null || e === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(t, { is: r }) : document.createElement(t) : r ? document.createElementNS(e, t, { is: r }) : document.createElementNS(e, t);
912
893
  }
913
- function Wi(t) {
894
+ function Di(t) {
914
895
  var e = T;
915
896
  if (e === null)
916
- return E.f |= Wr, t;
897
+ return A.f |= Br, t;
917
898
  if ((e.f & 32768) === 0 && (e.f & 4) === 0)
918
899
  throw t;
919
- de(t, e);
900
+ me(t, e);
920
901
  }
921
- function de(t, e) {
902
+ function me(t, e) {
922
903
  if (t === Ie) throw t;
923
904
  if (!(e !== null && (e.f & 16384) !== 0)) {
924
905
  for (; e !== null; ) {
@@ -936,18 +917,18 @@ function de(t, e) {
936
917
  throw t;
937
918
  }
938
919
  }
939
- function ji(t) {
940
- T === null && (E === null && mi(t), pi()), fe && _i(t);
920
+ function Wi(t) {
921
+ T === null && (A === null && _i(t), vi()), fe && di(t);
941
922
  }
942
- function qi(t, e) {
923
+ function ji(t, e) {
943
924
  var r = e.last;
944
925
  r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
945
926
  }
946
- function Pe(t, e) {
927
+ function Ne(t, e) {
947
928
  var r = T;
948
- r !== null && (r.f & 8192) !== 0 && (t |= Br);
929
+ r !== null && (r.f & 8192) !== 0 && (t |= Hr);
949
930
  var n = {
950
- ctx: M,
931
+ ctx: x,
951
932
  deps: null,
952
933
  nodes: null,
953
934
  f: t | z | 512,
@@ -962,139 +943,139 @@ function Pe(t, e) {
962
943
  wv: 0,
963
944
  ac: null
964
945
  };
965
- $?.register_created_effect(n);
946
+ C?.register_created_effect(n);
966
947
  var i = n;
967
948
  if ((t & 4) !== 0)
968
- at !== null ? at.push(n) : ze.ensure().schedule(n);
949
+ nt !== null ? nt.push(n) : qe.ensure().schedule(n);
969
950
  else if (e !== null) {
970
951
  try {
971
- Ye(n);
972
- } catch (l) {
973
- throw J(n), l;
952
+ je(n);
953
+ } catch (a) {
954
+ throw Q(n), a;
974
955
  }
975
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Dr));
956
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Kr));
976
957
  }
977
- if (i !== null && (i.parent = r, r !== null && qi(i, r), E !== null && (E.f & 2) !== 0 && (t & 64) === 0)) {
978
- var s = E;
958
+ if (i !== null && (i.parent = r, r !== null && ji(i, r), A !== null && (A.f & 2) !== 0 && (t & 64) === 0)) {
959
+ var s = A;
979
960
  (s.effects ?? (s.effects = [])).push(i);
980
961
  }
981
962
  return n;
982
963
  }
983
- function fr() {
984
- return E !== null && !X;
964
+ function ar() {
965
+ return A !== null && !X;
985
966
  }
986
- function me(t) {
987
- ji("$effect");
967
+ function de(t) {
968
+ Wi("$effect");
988
969
  var e = T.f;
989
- if (!E && (e & 32) !== 0 && M !== null && !M.i) {
990
- var r = M;
970
+ if (!A && (e & 32) !== 0 && x !== null && !x.i) {
971
+ var r = x;
991
972
  (r.e ?? (r.e = [])).push(t);
992
- } else return yn(t);
973
+ } else return pn(t);
993
974
  }
994
- function yn(t) {
995
- return Pe(4 | ni, t);
975
+ function pn(t) {
976
+ return Ne(4 | ti, t);
996
977
  }
997
- function Yi(t) {
998
- ze.ensure();
999
- const e = Pe(64 | ut, t);
978
+ function qi(t) {
979
+ qe.ensure();
980
+ const e = Ne(64 | lt, t);
1000
981
  return () => {
1001
- J(e);
982
+ Q(e);
1002
983
  };
1003
984
  }
1004
- function zi(t) {
1005
- ze.ensure();
1006
- const e = Pe(64 | ut, t);
985
+ function Yi(t) {
986
+ qe.ensure();
987
+ const e = Ne(64 | lt, t);
1007
988
  return (r = {}) => new Promise((n) => {
1008
- r.outro ? Bt(e, () => {
1009
- J(e), n(void 0);
1010
- }) : (J(e), n(void 0));
989
+ r.outro ? Nt(e, () => {
990
+ Q(e), n(void 0);
991
+ }) : (Q(e), n(void 0));
1011
992
  });
1012
993
  }
1013
- function Vi(t) {
1014
- return Pe(4, t);
994
+ function zi(t) {
995
+ return Ne(4, t);
1015
996
  }
1016
- function hr(t, e = 0) {
1017
- return Pe(8 | e, t);
997
+ function lr(t, e = 0) {
998
+ return Ne(8 | e, t);
1018
999
  }
1019
- function Xi(t, e = 0) {
1020
- var r = Pe(16 | e, t);
1000
+ function Vi(t, e = 0) {
1001
+ var r = Ne(16 | e, t);
1021
1002
  return r;
1022
1003
  }
1023
1004
  function xe(t) {
1024
- return Pe(32 | ut, t);
1005
+ return Ne(32 | lt, t);
1025
1006
  }
1026
- function bn(t) {
1007
+ function mn(t) {
1027
1008
  var e = t.teardown;
1028
1009
  if (e !== null) {
1029
- const r = fe, n = E;
1030
- Tr(!0), le(null);
1010
+ const r = fe, n = A;
1011
+ wr(!0), oe(null);
1031
1012
  try {
1032
1013
  e.call(null);
1033
1014
  } catch (i) {
1034
- de(i, t.parent);
1015
+ me(i, t.parent);
1035
1016
  } finally {
1036
- Tr(r), le(n);
1017
+ wr(r), oe(n);
1037
1018
  }
1038
1019
  }
1039
1020
  }
1040
- function dr(t, e = !1) {
1021
+ function or(t, e = !1) {
1041
1022
  var r = t.first;
1042
1023
  for (t.first = t.last = null; r !== null; ) {
1043
1024
  const i = r.ac;
1044
- i !== null && Pt(() => {
1045
- i.abort(xt);
1025
+ i !== null && xt(() => {
1026
+ i.abort(It);
1046
1027
  });
1047
1028
  var n = r.next;
1048
- (r.f & 64) !== 0 ? r.parent = null : J(r, e), r = n;
1029
+ (r.f & 64) !== 0 ? r.parent = null : Q(r, e), r = n;
1049
1030
  }
1050
1031
  }
1051
- function Ui(t) {
1032
+ function Xi(t) {
1052
1033
  for (var e = t.first; e !== null; ) {
1053
1034
  var r = e.next;
1054
- (e.f & 32) === 0 && J(e), e = r;
1035
+ (e.f & 32) === 0 && Q(e), e = r;
1055
1036
  }
1056
1037
  }
1057
- function J(t, e = !0) {
1038
+ function Q(t, e = !0) {
1058
1039
  var r = !1;
1059
- (e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Qi(t.nodes.start, t.nodes.end), r = !0), t.f |= Vt, dr(t, e && !r), lt(t, 0);
1040
+ (e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Ui(t.nodes.start, t.nodes.end), r = !0), t.f |= jt, or(t, e && !r), it(t, 0);
1060
1041
  var n = t.nodes && t.nodes.t;
1061
1042
  if (n !== null) for (const s of n) s.stop();
1062
- bn(t), t.f ^= Vt, t.f |= Fr;
1043
+ mn(t), t.f ^= jt, t.f |= Nr;
1063
1044
  var i = t.parent;
1064
- i !== null && i.first !== null && wn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1045
+ i !== null && i.first !== null && gn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1065
1046
  }
1066
- function Qi(t, e) {
1047
+ function Ui(t, e) {
1067
1048
  for (; t !== null; ) {
1068
- var r = t === e ? null : /* @__PURE__ */ Ve(t);
1049
+ var r = t === e ? null : /* @__PURE__ */ Ye(t);
1069
1050
  t.remove(), t = r;
1070
1051
  }
1071
1052
  }
1072
- function wn(t) {
1053
+ function gn(t) {
1073
1054
  var e = t.parent, r = t.prev, n = t.next;
1074
1055
  r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
1075
1056
  }
1076
- function Bt(t, e, r = !0) {
1057
+ function Nt(t, e, r = !0) {
1077
1058
  var n = [];
1078
- t.f |= 256, Sn(t, n, !0);
1059
+ t.f |= 256, yn(t, n, !0);
1079
1060
  var i = () => {
1080
- r && J(t), e && e();
1061
+ r && Q(t), e && e();
1081
1062
  }, s = n.length;
1082
1063
  if (s > 0) {
1083
- var l = () => --s || i();
1084
- for (var o of n) o.out(l);
1064
+ var a = () => --s || i();
1065
+ for (var o of n) o.out(a);
1085
1066
  } else i();
1086
1067
  }
1087
- function Sn(t, e, r) {
1068
+ function yn(t, e, r) {
1088
1069
  if ((t.f & 8192) === 0) {
1089
- t.f ^= Br;
1070
+ t.f ^= Hr;
1090
1071
  var n = t.nodes && t.nodes.t;
1091
1072
  if (n !== null)
1092
1073
  for (const o of n) (o.is_global || r) && e.push(o);
1093
1074
  for (var i = t.first; i !== null; ) {
1094
1075
  var s = i.next;
1095
1076
  if ((i.f & 64) === 0) {
1096
- var l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1097
- Sn(i, e, l ? r : !1);
1077
+ var a = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1078
+ yn(i, e, a ? r : !1);
1098
1079
  }
1099
1080
  i = s;
1100
1081
  }
@@ -1103,127 +1084,127 @@ function Sn(t, e, r) {
1103
1084
  function Ji(t, e) {
1104
1085
  if (t.nodes)
1105
1086
  for (var r = t.nodes.start, n = t.nodes.end; r !== null; ) {
1106
- var i = r === n ? null : /* @__PURE__ */ Ve(r);
1087
+ var i = r === n ? null : /* @__PURE__ */ Ye(r);
1107
1088
  e.append(r), r = i;
1108
1089
  }
1109
1090
  }
1110
- var Zi = null, fe = !1;
1111
- function Tr(t) {
1091
+ var Qi = null, fe = !1;
1092
+ function wr(t) {
1112
1093
  fe = t;
1113
1094
  }
1114
- var E = null, X = !1;
1115
- function le(t) {
1116
- E = t;
1095
+ var A = null, X = !1;
1096
+ function oe(t) {
1097
+ A = t;
1117
1098
  }
1118
1099
  var T = null;
1119
- function _e(t) {
1100
+ function ye(t) {
1120
1101
  T = t;
1121
1102
  }
1122
1103
  var Z = null;
1123
- function An(t) {
1124
- E !== null && (!Ne && (E.f & 2097152) !== 0 || (E.f & 2) !== 0) && (Z ?? (Z = /* @__PURE__ */ new Set())).add(t);
1104
+ function bn(t) {
1105
+ A !== null && (!He && (A.f & 2097152) !== 0 || (A.f & 2) !== 0) && (Z ?? (Z = /* @__PURE__ */ new Set())).add(t);
1125
1106
  }
1126
- var F = null, j = 0, Y = null;
1127
- function es(t) {
1128
- Y = t;
1107
+ var G = null, q = 0, V = null;
1108
+ function Zi(t) {
1109
+ V = t;
1129
1110
  }
1130
- var En = 1, Te = 0, ke = Te;
1131
- function $r(t) {
1111
+ var wn = 1, Ce = 0, ke = Ce;
1112
+ function Sr(t) {
1132
1113
  ke = t;
1133
1114
  }
1134
- function Tn() {
1135
- return ++En;
1115
+ function Sn() {
1116
+ return ++wn;
1136
1117
  }
1137
- function ct(t) {
1118
+ function ot(t) {
1138
1119
  var e = t.f;
1139
1120
  if ((e & 2048) !== 0) return !0;
1140
1121
  if ((e & 4096) !== 0) {
1141
1122
  for (var r = t.deps, n = r.length, i = 0; i < n; i++) {
1142
1123
  var s = r[i];
1143
- if (ct(s) && Zr(s), s.wv > t.wv) return !0;
1124
+ if (ot(s) && Xr(s), s.wv > t.wv) return !0;
1144
1125
  }
1145
- (e & 512) !== 0 && K === null && O(t, re);
1126
+ (e & 512) !== 0 && B === null && H(t, re);
1146
1127
  }
1147
1128
  return !1;
1148
1129
  }
1149
- function $n(t, e, r = !0) {
1130
+ function An(t, e, r = !0) {
1150
1131
  var n = t.reactions;
1151
- if (n !== null && !(!Ne && Z !== null && Z.has(t)))
1132
+ if (n !== null && !(!He && Z !== null && Z.has(t)))
1152
1133
  for (var i = 0; i < n.length; i++) {
1153
1134
  var s = n[i];
1154
- (s.f & 2) !== 0 ? $n(s, e, !1) : e === s && (r ? O(s, z) : (s.f & 1024) !== 0 && O(s, He), cr(s));
1135
+ (s.f & 2) !== 0 ? An(s, e, !1) : e === s && (r ? H(s, z) : (s.f & 1024) !== 0 && H(s, be), sr(s));
1155
1136
  }
1156
1137
  }
1157
- function Cn(t) {
1158
- var e = F, r = j, n = Y, i = E, s = Z, l = M, o = X, f = ke, b = t.f;
1159
- F = null, j = 0, Y = null, E = (b & 96) === 0 ? t : null, Z = null, At(t.ctx), X = !1, ke = ++Te, t.ac !== null && (Pt(() => {
1160
- t.ac.abort(xt);
1138
+ function En(t) {
1139
+ var e = G, r = q, n = V, i = A, s = Z, a = x, o = X, c = ke, y = t.f;
1140
+ G = null, q = 0, V = null, A = (y & 96) === 0 ? t : null, Z = null, wt(t.ctx), X = !1, ke = ++Ce, t.ac !== null && (xt(() => {
1141
+ t.ac.abort(It);
1161
1142
  }), t.ac = null);
1162
1143
  try {
1163
- t.f |= br;
1164
- var v = t.fn, c = v();
1165
- t.f |= Gr;
1166
- var d = Cr(t);
1167
- if (Nt() && Y !== null && !X && d !== null && (t.f & 6146) === 0) for (var h = 0; h < Y.length; h++) $n(Y[h], t);
1144
+ t.f |= pr;
1145
+ var v = t.fn, h = v();
1146
+ t.f |= Pr;
1147
+ var f = Ar(t);
1148
+ if (Mt() && V !== null && !X && f !== null && (t.f & 6146) === 0) for (var d = 0; d < V.length; d++) An(V[d], t);
1168
1149
  if (i !== null && i !== t) {
1169
- if (Te++, i.deps !== null) for (let _ = 0; _ < r; _ += 1) i.deps[_].rv = Te;
1170
- if (e !== null) for (const _ of e) _.rv = Te;
1171
- Y !== null && (n === null ? n = Y : n.push(...Y));
1150
+ if (Ce++, i.deps !== null) for (let _ = 0; _ < r; _ += 1) i.deps[_].rv = Ce;
1151
+ if (e !== null) for (const _ of e) _.rv = Ce;
1152
+ V !== null && (n === null ? n = V : n.push(...V));
1172
1153
  }
1173
- return (t.f & 8388608) !== 0 && (t.f ^= Wr), c;
1154
+ return (t.f & 8388608) !== 0 && (t.f ^= Br), h;
1174
1155
  } catch (_) {
1175
- return Cr(t), Wi(_);
1156
+ return Ar(t), Di(_);
1176
1157
  } finally {
1177
- t.f ^= br, F = e, j = r, Y = n, E = i, Z = s, At(l), X = o, ke = f;
1158
+ t.f ^= pr, G = e, q = r, V = n, A = i, Z = s, wt(a), X = o, ke = c;
1178
1159
  }
1179
1160
  }
1180
- function Cr(t) {
1181
- var e = t.deps, r = $?.is_fork;
1182
- if (F !== null) {
1161
+ function Ar(t) {
1162
+ var e = t.deps, r = C?.is_fork;
1163
+ if (G !== null) {
1183
1164
  var n;
1184
- if (r || lt(t, j), e !== null && j > 0)
1185
- for (e.length = j + F.length, n = 0; n < F.length; n++) e[j + n] = F[n];
1186
- else t.deps = e = F;
1187
- if (fr() && (t.f & 512) !== 0) for (n = j; n < e.length; n++) {
1165
+ if (r || it(t, q), e !== null && q > 0)
1166
+ for (e.length = q + G.length, n = 0; n < G.length; n++) e[q + n] = G[n];
1167
+ else t.deps = e = G;
1168
+ if (ar() && (t.f & 512) !== 0) for (n = q; n < e.length; n++) {
1188
1169
  var i;
1189
1170
  ((i = e[n]).reactions ?? (i.reactions = [])).push(t);
1190
1171
  }
1191
- } else !r && e !== null && j < e.length && (lt(t, j), e.length = j);
1172
+ } else !r && e !== null && q < e.length && (it(t, q), e.length = q);
1192
1173
  return e;
1193
1174
  }
1194
- function ts(t, e) {
1175
+ function es(t, e) {
1195
1176
  let r = e.reactions;
1196
1177
  if (r !== null) {
1197
- var n = zn.call(r, t);
1178
+ var n = qn.call(r, t);
1198
1179
  if (n !== -1) {
1199
1180
  var i = r.length - 1;
1200
1181
  i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
1201
1182
  }
1202
1183
  }
1203
- if (r === null && (e.f & 2) !== 0 && (F === null || !rt.call(F, e))) {
1184
+ if (r === null && (e.f & 2) !== 0 && (G === null || !Ze.call(G, e))) {
1204
1185
  var s = e;
1205
- (s.f & 512) !== 0 && (s.f ^= 512), s.v !== x && ar(s), s.ac !== null && Pt(() => {
1206
- s.ac.abort(xt), s.ac = null, O(s, z);
1207
- }), Ii(s), lt(s, 0);
1186
+ (s.f & 512) !== 0 && (s.f ^= 512), s.v !== N && tr(s), s.ac !== null && xt(() => {
1187
+ s.ac.abort(It), s.ac = null, H(s, z);
1188
+ }), Ri(s), it(s, 0);
1208
1189
  }
1209
1190
  }
1210
- function lt(t, e) {
1191
+ function it(t, e) {
1211
1192
  var r = t.deps;
1212
1193
  if (r !== null)
1213
- for (var n = e; n < r.length; n++) ts(t, r[n]);
1194
+ for (var n = e; n < r.length; n++) es(t, r[n]);
1214
1195
  }
1215
- function Ye(t) {
1196
+ function je(t) {
1216
1197
  var e = t.f;
1217
1198
  if ((e & 16384) === 0) {
1218
- O(t, re);
1199
+ H(t, re);
1219
1200
  var r = T;
1220
1201
  if (T = t, 0)
1221
1202
  var n, i;
1222
1203
  try {
1223
- (e & 16777232) !== 0 ? Ui(t) : dr(t), bn(t);
1224
- var s = Cn(t);
1225
- if (t.teardown = typeof s == "function" ? s : null, t.wv = En, 0)
1226
- for (var l of t.deps) ;
1204
+ (e & 16777232) !== 0 ? Xi(t) : or(t), mn(t);
1205
+ var s = En(t);
1206
+ if (t.teardown = typeof s == "function" ? s : null, t.wv = wn, 0)
1207
+ for (var a of t.deps) ;
1227
1208
  } finally {
1228
1209
  T = r;
1229
1210
  }
@@ -1231,54 +1212,54 @@ function Ye(t) {
1231
1212
  }
1232
1213
  function S(t) {
1233
1214
  var e = (t.f & 2) !== 0;
1234
- if (Zi?.add(t), E !== null && !X && !(T !== null && (T.f & 16384) !== 0) && (Z === null || !Z.has(t))) {
1235
- var r = E.deps;
1236
- if ((E.f & 2097152) !== 0)
1237
- t.rv < Te && (t.rv = Te, F === null && r !== null && r[j] === t ? j++ : F === null ? F = [t] : F.push(t));
1215
+ if (Qi?.add(t), A !== null && !X && !(T !== null && (T.f & 16384) !== 0) && (Z === null || !Z.has(t))) {
1216
+ var r = A.deps;
1217
+ if ((A.f & 2097152) !== 0)
1218
+ t.rv < Ce && (t.rv = Ce, G === null && r !== null && r[q] === t ? q++ : G === null ? G = [t] : G.push(t));
1238
1219
  else {
1239
1220
  var n;
1240
- (n = E).deps ?? (n.deps = []), rt.call(E.deps, t) || E.deps.push(t);
1221
+ (n = A).deps ?? (n.deps = []), Ze.call(A.deps, t) || A.deps.push(t);
1241
1222
  var i = t.reactions;
1242
- i === null ? t.reactions = [E] : rt.call(i, E) || i.push(E);
1223
+ i === null ? t.reactions = [A] : Ze.call(i, A) || i.push(A);
1243
1224
  }
1244
1225
  }
1245
1226
  if (0) {
1246
- if (!X && reactivity_loss_tracker && $ === null && qe === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
1227
+ if (!X && reactivity_loss_tracker && C === null && We === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
1247
1228
  var s;
1248
- if (tracing_mode_flag && !X && tracing_expressions !== null && E !== null && tracing_expressions.reaction === E && !t.trace) {
1229
+ if (tracing_mode_flag && !X && tracing_expressions !== null && A !== null && tracing_expressions.reaction === A && !t.trace) {
1249
1230
  if (s)
1250
- var l, o;
1231
+ var a, o;
1251
1232
  }
1252
1233
  }
1253
- if (fe && ae.has(t)) return ae.get(t);
1234
+ if (fe && le.has(t)) return le.get(t);
1254
1235
  if (e) {
1255
- var f = t;
1236
+ var c = t;
1256
1237
  if (fe) {
1257
- var b = f.v;
1258
- return ((f.f & 1024) === 0 && f.reactions !== null || Rn(f)) && (b = lr(f)), ae.set(f, b), b;
1238
+ var y = c.v;
1239
+ return ((c.f & 1024) === 0 && c.reactions !== null || Cn(c)) && (y = rr(c)), le.set(c, y), y;
1259
1240
  }
1260
- var v = (f.f & 512) === 0 && !X && E !== null && (E.f & 512) !== 0, c = (f.f & Gr) === 0;
1261
- ct(f) && (v && (f.f |= 512), Zr(f)), v && !c && (en(f), kn(f));
1241
+ var v = (c.f & 512) === 0 && !X && A !== null && (A.f & 512) !== 0, h = (c.f & Pr) === 0;
1242
+ ot(c) && (v && (c.f |= 512), Xr(c)), v && !h && (Ur(c), Tn(c));
1262
1243
  }
1263
- if (K?.has(t)) return K.get(t);
1244
+ if (B?.has(t)) return B.get(t);
1264
1245
  if ((t.f & 8388608) !== 0) throw t.v;
1265
1246
  return t.v;
1266
1247
  }
1267
- function kn(t) {
1248
+ function Tn(t) {
1268
1249
  if (t.f |= 512, t.deps !== null)
1269
1250
  for (const r of t.deps) {
1270
1251
  var e = r.reactions;
1271
- e === null ? r.reactions = [t] : rt.call(e, t) || e.push(t), (r.f & 2) !== 0 && (r.f & 512) === 0 && (en(r), kn(r));
1252
+ e === null ? r.reactions = [t] : Ze.call(e, t) || e.push(t), (r.f & 2) !== 0 && (r.f & 512) === 0 && (Ur(r), Tn(r));
1272
1253
  }
1273
1254
  }
1274
- function Rn(t) {
1275
- if (t.v === x) return !0;
1255
+ function Cn(t) {
1256
+ if (t.v === N) return !0;
1276
1257
  if (t.deps === null) return !1;
1277
1258
  for (const e of t.deps)
1278
- if (ae.has(e) || (e.f & 2) !== 0 && Rn(e)) return !0;
1259
+ if (le.has(e) || (e.f & 2) !== 0 && Cn(e)) return !0;
1279
1260
  return !1;
1280
1261
  }
1281
- function Ft(t) {
1262
+ function st(t) {
1282
1263
  var e = X;
1283
1264
  try {
1284
1265
  return X = !0, t();
@@ -1286,63 +1267,63 @@ function Ft(t) {
1286
1267
  X = e;
1287
1268
  }
1288
1269
  }
1289
- var dt = /* @__PURE__ */ Symbol("events"), rs = /* @__PURE__ */ new Set(), kr = /* @__PURE__ */ new Set(), Wt = null, jt = !1;
1290
- function Rr(t) {
1270
+ var ft = /* @__PURE__ */ Symbol("events"), ts = /* @__PURE__ */ new Set(), Er = /* @__PURE__ */ new Set(), Bt = null, Ft = !1;
1271
+ function Tr(t) {
1291
1272
  var e = this, r = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], s = i[0] || t.target;
1292
- Wt = t, jt || (jt = !0, setTimeout(() => {
1293
- jt = !1, Wt = null;
1273
+ Bt = t, Ft || (Ft = !0, setTimeout(() => {
1274
+ Ft = !1, Bt = null;
1294
1275
  }));
1295
- var l = 0, o = Wt === t && t[dt];
1276
+ var a = 0, o = Bt === t && t[ft];
1296
1277
  if (o) {
1297
- var f = i.indexOf(o);
1298
- if (f !== -1 && (e === document || e === window)) {
1299
- t[dt] = e;
1278
+ var c = i.indexOf(o);
1279
+ if (c !== -1 && (e === document || e === window)) {
1280
+ t[ft] = e;
1300
1281
  return;
1301
1282
  }
1302
- var b = i.indexOf(e);
1303
- if (b === -1) return;
1304
- f <= b && (l = f);
1283
+ var y = i.indexOf(e);
1284
+ if (y === -1) return;
1285
+ c <= y && (a = c);
1305
1286
  }
1306
- if (s = i[l] || t.target, s !== e) {
1307
- nt(t, "currentTarget", {
1287
+ if (s = i[a] || t.target, s !== e) {
1288
+ et(t, "currentTarget", {
1308
1289
  configurable: !0,
1309
1290
  get() {
1310
1291
  return s || r;
1311
1292
  }
1312
1293
  });
1313
- var v = E, c = T;
1314
- le(null), _e(null);
1294
+ var v = A, h = T;
1295
+ oe(null), ye(null);
1315
1296
  try {
1316
- for (var d, h = []; s !== null && s !== e; ) {
1297
+ for (var f, d = []; s !== null && s !== e; ) {
1317
1298
  try {
1318
- var _ = s[dt]?.[n];
1299
+ var _ = s[ft]?.[n];
1319
1300
  _ != null && (!s.disabled || t.target === s) && _.call(s, t);
1320
- } catch (y) {
1321
- d ? h.push(y) : d = y;
1301
+ } catch (m) {
1302
+ f ? d.push(m) : f = m;
1322
1303
  }
1323
1304
  if (t.cancelBubble) break;
1324
- l++, s = l < i.length ? i[l] : null;
1305
+ a++, s = a < i.length ? i[a] : null;
1325
1306
  }
1326
- if (d) {
1327
- for (let y of h) queueMicrotask(() => {
1328
- throw y;
1307
+ if (f) {
1308
+ for (let m of d) queueMicrotask(() => {
1309
+ throw m;
1329
1310
  });
1330
- throw d;
1311
+ throw f;
1331
1312
  }
1332
1313
  } finally {
1333
- t[dt] = e, delete t.currentTarget, le(v), _e(c);
1314
+ t[ft] = e, delete t.currentTarget, oe(v), ye(h);
1334
1315
  }
1335
1316
  }
1336
1317
  }
1337
- var ns = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1338
- function is(t) {
1339
- return ns?.createHTML(t) ?? t;
1318
+ var rs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1319
+ function ns(t) {
1320
+ return rs?.createHTML(t) ?? t;
1340
1321
  }
1341
- function ss(t) {
1342
- var e = gn("template");
1343
- return e.innerHTML = is(t.replaceAll("<!>", "<!---->")), e.content;
1322
+ function is(t) {
1323
+ var e = _n("template");
1324
+ return e.innerHTML = ns(t.replaceAll("<!>", "<!---->")), e.content;
1344
1325
  }
1345
- function gt(t, e) {
1326
+ function pt(t, e) {
1346
1327
  var r = T;
1347
1328
  r.nodes === null && (r.nodes = {
1348
1329
  start: t,
@@ -1352,29 +1333,29 @@ function gt(t, e) {
1352
1333
  });
1353
1334
  }
1354
1335
  // @__NO_SIDE_EFFECTS__
1355
- function as(t, e) {
1336
+ function ss(t, e) {
1356
1337
  var r = (e & 1) !== 0, n = (e & 2) !== 0, i, s = !t.startsWith("<!>");
1357
1338
  return () => {
1358
- if (Q)
1359
- return gt(B, null), B;
1360
- i === void 0 && (i = ss(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Zt(i)));
1361
- var l = n || vn ? document.importNode(i, !0) : i.cloneNode(!0);
1339
+ if (J)
1340
+ return pt(F, null), F;
1341
+ i === void 0 && (i = is(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Xt(i)));
1342
+ var a = n || fn ? document.importNode(i, !0) : i.cloneNode(!0);
1362
1343
  if (r) {
1363
- var o = /* @__PURE__ */ Zt(l), f = l.lastChild;
1364
- gt(o, f);
1365
- } else gt(l, l);
1366
- return l;
1344
+ var o = /* @__PURE__ */ Xt(a), c = a.lastChild;
1345
+ pt(o, c);
1346
+ } else pt(a, a);
1347
+ return a;
1367
1348
  };
1368
1349
  }
1369
- function Ln(t, e) {
1370
- if (Q) {
1350
+ function $n(t, e) {
1351
+ if (J) {
1371
1352
  var r = T;
1372
- ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = B), Yr();
1353
+ ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = F), Dr();
1373
1354
  return;
1374
1355
  }
1375
1356
  t !== null && t.before(e);
1376
1357
  }
1377
- var ls = [
1358
+ var as = [
1378
1359
  "allowfullscreen",
1379
1360
  "async",
1380
1361
  "autofocus",
@@ -1404,7 +1385,7 @@ var ls = [
1404
1385
  "disablepictureinpicture",
1405
1386
  "disableremoteplayback"
1406
1387
  ], Js = [
1407
- ...ls,
1388
+ ...as,
1408
1389
  "formNoValidate",
1409
1390
  "isMap",
1410
1391
  "noModule",
@@ -1419,17 +1400,17 @@ var ls = [
1419
1400
  "allowFullscreen",
1420
1401
  "disablePictureInPicture",
1421
1402
  "disableRemotePlayback"
1422
- ], os = ["touchstart", "touchmove"];
1423
- function us(t) {
1424
- return os.includes(t);
1403
+ ], ls = ["touchstart", "touchmove"];
1404
+ function os(t) {
1405
+ return ls.includes(t);
1425
1406
  }
1426
- var cs = [
1407
+ var us = [
1427
1408
  "$state",
1428
1409
  "$state.raw",
1429
1410
  "$derived",
1430
1411
  "$derived.by"
1431
- ], Zs = [
1432
- ...cs,
1412
+ ], Qs = [
1413
+ ...us,
1433
1414
  "$state.eager",
1434
1415
  "$state.snapshot",
1435
1416
  "$props",
@@ -1445,364 +1426,364 @@ var cs = [
1445
1426
  "$inspect.trace",
1446
1427
  "$host"
1447
1428
  ];
1448
- function fs(t) {
1449
- let e = 0, r = Kt(0), n;
1429
+ function cs(t) {
1430
+ let e = 0, r = Ht(0), n;
1450
1431
  return () => {
1451
- fr() && (S(r), hr(() => (e === 0 && (n = Ft(() => t(() => tt(r)))), e += 1, () => {
1432
+ ar() && (S(r), lr(() => (e === 0 && (n = st(() => t(() => Qe(r)))), e += 1, () => {
1452
1433
  Oe(() => {
1453
- e -= 1, e === 0 && (n?.(), n = void 0, tt(r));
1434
+ e -= 1, e === 0 && (n?.(), n = void 0, Qe(r));
1454
1435
  });
1455
1436
  })));
1456
1437
  };
1457
1438
  }
1458
- var hs = Dr | ut;
1459
- function ds(t, e, r, n) {
1460
- new vs(t, e, r, n);
1439
+ var fs = Kr | lt;
1440
+ function hs(t, e, r, n) {
1441
+ new ds(t, e, r, n);
1461
1442
  }
1462
- var ee = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakSet(), vs = class {
1443
+ var ee = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), ds = class {
1463
1444
  constructor(t, e, r, n) {
1464
- or(this, C), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), A(this, ee, void 0), A(this, er, Q ? B : null), A(this, se, void 0), A(this, ot, void 0), A(this, G, void 0), A(this, te, null), A(this, q, null), A(this, U, null), A(this, ve, null), A(this, De, 0), A(this, Re, 0), A(this, vt, !1), A(this, tr, /* @__PURE__ */ new Set()), A(this, rr, /* @__PURE__ */ new Set()), A(this, ge, null), A(this, Lr, fs(() => (g(ge, this, Kt(a(De, this))), () => {
1465
- g(ge, this, null);
1466
- }))), g(ee, this, t), g(se, this, e), g(ot, this, (i) => {
1445
+ nr(this, k), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), E(this, ee, void 0), E(this, Ut, J ? F : null), E(this, ae, void 0), E(this, at, void 0), E(this, D, void 0), E(this, te, null), E(this, Y, null), E(this, U, null), E(this, ge, null), E(this, Fe, 0), E(this, Re, 0), E(this, ht, !1), E(this, Jt, /* @__PURE__ */ new Map()), E(this, we, null), E(this, Cr, cs(() => (w(we, this, Ht(l(Fe, this))), () => {
1446
+ w(we, this, null);
1447
+ }))), w(ee, this, t), w(ae, this, e), w(at, this, (i) => {
1467
1448
  var s = T;
1468
1449
  s.b = this, s.f |= 128, r(i);
1469
- }), this.parent = T.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), g(G, this, Xi(() => {
1470
- if (Q) {
1471
- const i = di(a(er, this));
1472
- Yr();
1450
+ }), this.parent = T.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), w(D, this, Vi(() => {
1451
+ if (J) {
1452
+ const i = fi(l(Ut, this));
1453
+ Dr();
1473
1454
  const s = i === "[!";
1474
1455
  if (i.startsWith("[?")) {
1475
- const l = JSON.parse(i.slice(2));
1476
- p(C, this, ps).call(this, l);
1477
- } else s ? p(C, this, ms).call(this) : p(C, this, _s).call(this);
1478
- } else p(C, this, On).call(this);
1479
- }, hs)), Q && g(ee, this, B);
1456
+ const a = JSON.parse(i.slice(2));
1457
+ p(k, this, _s).call(this, a);
1458
+ } else s ? p(k, this, ps).call(this) : p(k, this, vs).call(this);
1459
+ } else p(k, this, Rn).call(this);
1460
+ }, fs)), J && w(ee, this, F);
1480
1461
  }
1481
1462
  defer_effect(t) {
1482
- Jr(t, a(tr, this), a(rr, this));
1463
+ Vr(t, l(Jt, this));
1483
1464
  }
1484
1465
  is_rendered() {
1485
1466
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
1486
1467
  }
1487
1468
  has_pending_snippet() {
1488
- return !!a(se, this).pending;
1469
+ return !!l(ae, this).pending;
1489
1470
  }
1490
1471
  update_pending_count(t, e) {
1491
- p(C, this, Mn).call(this, t, e), g(De, this, a(De, this) + t), !(!a(ge, this) || a(vt, this)) && (g(vt, this, !0), Oe(() => {
1492
- g(vt, this, !1), a(ge, this) && hn(a(ge, this), a(De, this));
1472
+ p(k, this, Ln).call(this, t, e), w(Fe, this, l(Fe, this) + t), !(!l(we, this) || l(ht, this)) && (w(ht, this, !0), Oe(() => {
1473
+ w(ht, this, !1), l(we, this) && un(l(we, this), l(Fe, this));
1493
1474
  }));
1494
1475
  }
1495
1476
  get_effect_pending() {
1496
- return a(Lr, this).call(this), S(a(ge, this));
1477
+ return l(Cr, this).call(this), S(l(we, this));
1497
1478
  }
1498
1479
  error(t) {
1499
- if (t === Ie || !a(se, this).onerror && !a(se, this).failed) throw t;
1500
- $?.is_fork ? (a(te, this) && $.skip_effect(a(te, this)), a(q, this) && $.skip_effect(a(q, this)), a(U, this) && $.skip_effect(a(U, this)), $.oncommit(() => {
1501
- p(C, this, Le).call(this) || p(C, this, Ir).call(this, t);
1502
- })) : p(C, this, Ir).call(this, t);
1480
+ if (t === Ie || !l(ae, this).onerror && !l(ae, this).failed) throw t;
1481
+ C?.is_fork ? (l(te, this) && C.skip_effect(l(te, this)), l(Y, this) && C.skip_effect(l(Y, this)), l(U, this) && C.skip_effect(l(U, this)), C.oncommit(() => {
1482
+ p(k, this, Le).call(this) || p(k, this, $r).call(this, t);
1483
+ })) : p(k, this, $r).call(this, t);
1503
1484
  }
1504
1485
  };
1505
- function _s() {
1486
+ function vs() {
1506
1487
  try {
1507
- g(te, this, xe(() => a(ot, this).call(this, a(ee, this))));
1488
+ w(te, this, xe(() => l(at, this).call(this, l(ee, this))));
1508
1489
  } catch (t) {
1509
1490
  this.error(t);
1510
1491
  }
1511
1492
  }
1512
- function ps(t) {
1513
- const e = a(se, this).failed, { reset: r, invoke_onerror: n } = p(C, this, In).call(this, t);
1514
- Oe(n), e && g(U, this, xe(() => {
1515
- e(a(ee, this), () => t, () => r);
1493
+ function _s(t) {
1494
+ const e = l(ae, this).failed, { reset: r, invoke_onerror: n } = p(k, this, kn).call(this, t);
1495
+ Oe(n), e && w(U, this, xe(() => {
1496
+ e(l(ee, this), () => t, () => r);
1516
1497
  }));
1517
1498
  }
1518
- function In(t) {
1499
+ function kn(t) {
1519
1500
  var e = !1, r = !1;
1520
1501
  const n = () => {
1521
- if (!p(C, this, Le).call(this)) {
1502
+ if (!p(k, this, Le).call(this)) {
1522
1503
  if (e) {
1523
- ci();
1504
+ oi();
1524
1505
  return;
1525
1506
  }
1526
- e = !0, r && Ei(), a(U, this) !== null && Bt(a(U, this), () => {
1527
- g(U, this, null);
1528
- }), p(C, this, vr).call(this, () => {
1529
- p(C, this, On).call(this);
1507
+ e = !0, r && Si(), l(U, this) !== null && Nt(l(U, this), () => {
1508
+ w(U, this, null);
1509
+ }), p(k, this, ur).call(this, () => {
1510
+ p(k, this, Rn).call(this);
1530
1511
  });
1531
1512
  }
1532
1513
  };
1533
1514
  return {
1534
1515
  reset: n,
1535
1516
  invoke_onerror: () => {
1536
- if (!p(C, this, Le).call(this))
1517
+ if (!p(k, this, Le).call(this))
1537
1518
  try {
1538
- r = !0, a(se, this).onerror?.(t, n), r = !1;
1519
+ r = !0, l(ae, this).onerror?.(t, n), r = !1;
1539
1520
  } catch (s) {
1540
- de(s, a(G, this) && a(G, this).parent);
1521
+ me(s, l(D, this) && l(D, this).parent);
1541
1522
  }
1542
1523
  }
1543
1524
  };
1544
1525
  }
1545
1526
  function Le() {
1546
- return (a(G, this).f & (Fr | Vt)) !== 0;
1547
- }
1548
- function ms() {
1549
- const t = a(se, this).pending;
1550
- t && (this.is_pending = !0, g(q, this, xe(() => t(a(ee, this)))), Oe(() => {
1551
- if (!p(C, this, Le).call(this)) {
1552
- var e = g(ve, this, document.createDocumentFragment()), r = mn(), n = !1;
1553
- if (e.append(r), g(te, this, p(C, this, vr).call(this, () => {
1527
+ return (l(D, this).f & (Nr | jt)) !== 0;
1528
+ }
1529
+ function ps() {
1530
+ const t = l(ae, this).pending;
1531
+ t && (this.is_pending = !0, w(Y, this, xe(() => t(l(ee, this)))), Oe(() => {
1532
+ if (!p(k, this, Le).call(this)) {
1533
+ var e = w(ge, this, document.createDocumentFragment()), r = vn(), n = !1;
1534
+ if (e.append(r), w(te, this, p(k, this, ur).call(this, () => {
1554
1535
  try {
1555
- return xe(() => a(ot, this).call(this, r));
1536
+ return xe(() => l(at, this).call(this, r));
1556
1537
  } catch (i) {
1557
1538
  try {
1558
1539
  this.error(i), n = !0;
1559
1540
  } catch (s) {
1560
- de(s, a(G, this).parent);
1541
+ me(s, l(D, this).parent);
1561
1542
  }
1562
1543
  return null;
1563
1544
  }
1564
- })), a(te, this) === null) {
1565
- g(ve, this, null), n && p(C, this, Ot).call(this, $);
1545
+ })), l(te, this) === null) {
1546
+ w(ge, this, null), n && p(k, this, Rt).call(this, C);
1566
1547
  return;
1567
1548
  }
1568
- a(Re, this) === 0 && (a(ee, this).before(e), g(ve, this, null), Bt(a(q, this), () => {
1569
- g(q, this, null);
1570
- }), p(C, this, Ot).call(this, $));
1549
+ l(Re, this) === 0 && (l(ee, this).before(e), w(ge, this, null), Nt(l(Y, this), () => {
1550
+ w(Y, this, null);
1551
+ }), p(k, this, Rt).call(this, C));
1571
1552
  }
1572
1553
  }));
1573
1554
  }
1574
- function On() {
1555
+ function Rn() {
1575
1556
  try {
1576
- if (this.is_pending = this.has_pending_snippet(), g(Re, this, 0), g(De, this, 0), g(te, this, xe(() => {
1577
- a(ot, this).call(this, a(ee, this));
1578
- })), a(Re, this) > 0) {
1579
- var t = g(ve, this, document.createDocumentFragment());
1580
- Ji(a(te, this), t);
1581
- const e = a(se, this).pending;
1582
- g(q, this, xe(() => e(a(ee, this))));
1583
- } else p(C, this, Ot).call(this, $);
1557
+ if (this.is_pending = this.has_pending_snippet(), w(Re, this, 0), w(Fe, this, 0), w(te, this, xe(() => {
1558
+ l(at, this).call(this, l(ee, this));
1559
+ })), l(Re, this) > 0) {
1560
+ var t = w(ge, this, document.createDocumentFragment());
1561
+ Ji(l(te, this), t);
1562
+ const e = l(ae, this).pending;
1563
+ w(Y, this, xe(() => e(l(ee, this))));
1564
+ } else p(k, this, Rt).call(this, C);
1584
1565
  } catch (e) {
1585
1566
  this.error(e);
1586
1567
  }
1587
1568
  }
1588
- function Ot(t) {
1589
- this.is_pending = !1, t.transfer_effects(a(tr, this), a(rr, this));
1569
+ function Rt(t) {
1570
+ this.is_pending = !1, t.transfer_reactions(l(Jt, this));
1590
1571
  }
1591
- function vr(t) {
1592
- var e = T, r = E, n = M;
1593
- _e(a(G, this)), le(a(G, this)), At(a(G, this).ctx);
1572
+ function ur(t) {
1573
+ var e = T, r = A, n = x;
1574
+ ye(l(D, this)), oe(l(D, this)), wt(l(D, this).ctx);
1594
1575
  try {
1595
- return ze.ensure(), t();
1576
+ return qe.ensure(), t();
1596
1577
  } finally {
1597
- _e(e), le(r), At(n);
1578
+ ye(e), oe(r), wt(n);
1598
1579
  }
1599
1580
  }
1600
- function Mn(t, e) {
1581
+ function Ln(t, e) {
1601
1582
  if (!this.has_pending_snippet()) {
1602
1583
  if (this.parent) {
1603
1584
  var r;
1604
- p(C, r = this.parent, Mn).call(r, t, e);
1585
+ p(k, r = this.parent, Ln).call(r, t, e);
1605
1586
  }
1606
1587
  return;
1607
1588
  }
1608
- g(Re, this, a(Re, this) + t), a(Re, this) === 0 && (p(C, this, Ot).call(this, e), a(q, this) && Bt(a(q, this), () => {
1609
- g(q, this, null);
1610
- }), a(ve, this) && (a(ee, this).before(a(ve, this)), g(ve, this, null)));
1589
+ w(Re, this, l(Re, this) + t), l(Re, this) === 0 && (p(k, this, Rt).call(this, e), l(Y, this) && Nt(l(Y, this), () => {
1590
+ w(Y, this, null);
1591
+ }), l(ge, this) && (l(ee, this).before(l(ge, this)), w(ge, this, null)));
1611
1592
  }
1612
- function Ir(t) {
1613
- a(te, this) && (J(a(te, this)), g(te, this, null)), a(q, this) && (J(a(q, this)), g(q, this, null)), a(U, this) && (J(a(U, this)), g(U, this, null)), Q && (st(a(er, this)), fi(), st(hi()));
1614
- let e = a(se, this).failed;
1593
+ function $r(t) {
1594
+ l(te, this) && (Q(l(te, this)), w(te, this, null)), l(Y, this) && (Q(l(Y, this)), w(Y, this, null)), l(U, this) && (Q(l(U, this)), w(U, this, null)), J && (rt(l(Ut, this)), ui(), rt(ci()));
1595
+ let e = l(ae, this).failed;
1615
1596
  const r = (n) => {
1616
- if (p(C, this, Le).call(this)) return;
1617
- const { reset: i, invoke_onerror: s } = p(C, this, In).call(this, n);
1618
- s(), e && !p(C, this, Le).call(this) && g(U, this, p(C, this, vr).call(this, () => {
1597
+ if (p(k, this, Le).call(this)) return;
1598
+ const { reset: i, invoke_onerror: s } = p(k, this, kn).call(this, n);
1599
+ s(), e && !p(k, this, Le).call(this) && w(U, this, p(k, this, ur).call(this, () => {
1619
1600
  try {
1620
1601
  return xe(() => {
1621
- var l = T;
1622
- l.b = this, l.f |= 128, e(a(ee, this), () => n, () => i);
1602
+ var a = T;
1603
+ a.b = this, a.f |= 128, e(l(ee, this), () => n, () => i);
1623
1604
  });
1624
- } catch (l) {
1625
- return de(l, a(G, this).parent), null;
1605
+ } catch (a) {
1606
+ return me(a, l(D, this).parent), null;
1626
1607
  }
1627
1608
  }));
1628
1609
  };
1629
1610
  Oe(() => {
1630
- if (!p(C, this, Le).call(this)) {
1611
+ if (!p(k, this, Le).call(this)) {
1631
1612
  var n;
1632
1613
  try {
1633
1614
  n = this.transform_error(t);
1634
1615
  } catch (i) {
1635
- de(i, a(G, this) && a(G, this).parent);
1616
+ me(i, l(D, this) && l(D, this).parent);
1636
1617
  return;
1637
1618
  }
1638
- n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => de(i, a(G, this) && a(G, this).parent)) : r(n);
1619
+ n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => me(i, l(D, this) && l(D, this).parent)) : r(n);
1639
1620
  }
1640
1621
  });
1641
1622
  }
1642
- var Or = !0;
1643
- function xn(t, e) {
1644
- return Hn(t, e);
1623
+ var kr = !0;
1624
+ function In(t, e) {
1625
+ return On(t, e);
1645
1626
  }
1646
- function gs(t, e) {
1647
- Jt(), e.intro = e.intro ?? !1;
1648
- const r = e.target, n = Q, i = B;
1627
+ function ms(t, e) {
1628
+ Vt(), e.intro = e.intro ?? !1;
1629
+ const r = e.target, n = J, i = F;
1649
1630
  try {
1650
- for (var s = /* @__PURE__ */ Zt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ve(s);
1631
+ for (var s = /* @__PURE__ */ Xt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ye(s);
1651
1632
  if (!s) throw Ie;
1652
- ft(!0), st(s);
1653
- const l = Hn(t, {
1633
+ ut(!0), rt(s);
1634
+ const a = On(t, {
1654
1635
  ...e,
1655
1636
  anchor: s
1656
1637
  });
1657
- return ft(!1), l;
1658
- } catch (l) {
1659
- if (l instanceof Error && l.message.split(`
1660
- `).some((o) => o.startsWith("https://svelte.dev/e/"))) throw l;
1661
- return l !== Ie && console.warn("Failed to hydrate: ", l), e.recover === !1 && yi(), Jt(), Di(r), ft(!1), xn(t, e);
1638
+ return ut(!1), a;
1639
+ } catch (a) {
1640
+ if (a instanceof Error && a.message.split(`
1641
+ `).some((o) => o.startsWith("https://svelte.dev/e/"))) throw a;
1642
+ return a !== Ie && console.warn("Failed to hydrate: ", a), e.recover === !1 && mi(), Vt(), Gi(r), ut(!1), In(t, e);
1662
1643
  } finally {
1663
- ft(n), st(i);
1664
- }
1665
- }
1666
- var _t = /* @__PURE__ */ new Map();
1667
- function Hn(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: o }) {
1668
- Jt();
1669
- var f = void 0, b = zi(() => {
1670
- var v = r ?? e.appendChild(mn());
1671
- ds(v, { pending: () => {
1672
- } }, (h) => {
1673
- Xr({});
1674
- var _ = M;
1675
- if (s && (_.c = s), i && (n.$$events = i), Q && gt(h, null), Or = l, f = t(h, n) || sr(), Or = !0, Q && (T.nodes.end = B, B === null || B.nodeType !== 8 || B.data !== "]"))
1676
- throw ir(), Ie;
1677
- Ur();
1644
+ ut(n), rt(i);
1645
+ }
1646
+ }
1647
+ var dt = /* @__PURE__ */ new Map();
1648
+ function On(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: a = !0, transformError: o }) {
1649
+ Vt();
1650
+ var c = void 0, y = Yi(() => {
1651
+ var v = r ?? e.appendChild(vn());
1652
+ hs(v, { pending: () => {
1653
+ } }, (d) => {
1654
+ qr({});
1655
+ var _ = x;
1656
+ if (s && (_.c = s), i && (n.$$events = i), J && pt(d, null), kr = a, c = t(d, n) || er(), kr = !0, J && (T.nodes.end = F, F === null || F.nodeType !== 8 || F.data !== "]"))
1657
+ throw Zt(), Ie;
1658
+ Yr();
1678
1659
  }, o);
1679
- var c = /* @__PURE__ */ new Set(), d = (h) => {
1680
- for (var _ = 0; _ < h.length; _++) {
1681
- var y = h[_];
1682
- if (!c.has(y)) {
1683
- c.add(y);
1684
- var k = us(y);
1660
+ var h = /* @__PURE__ */ new Set(), f = (d) => {
1661
+ for (var _ = 0; _ < d.length; _++) {
1662
+ var m = d[_];
1663
+ if (!h.has(m)) {
1664
+ h.add(m);
1665
+ var I = os(m);
1685
1666
  for (const ne of [e, document]) {
1686
- var I = _t.get(ne);
1687
- I === void 0 && (I = /* @__PURE__ */ new Map(), _t.set(ne, I));
1688
- var H = I.get(y);
1689
- H === void 0 ? (ne.addEventListener(y, Rr, { passive: k }), I.set(y, 1)) : I.set(y, H + 1);
1667
+ var R = dt.get(ne);
1668
+ R === void 0 && (R = /* @__PURE__ */ new Map(), dt.set(ne, R));
1669
+ var P = R.get(m);
1670
+ P === void 0 ? (ne.addEventListener(m, Tr, { passive: I }), R.set(m, 1)) : R.set(m, P + 1);
1690
1671
  }
1691
1672
  }
1692
1673
  }
1693
1674
  };
1694
- return d(Vn(rs)), kr.add(d), () => {
1695
- for (var h of c) for (const k of [e, document]) {
1696
- var _ = _t.get(k), y = _.get(h);
1697
- --y == 0 ? (k.removeEventListener(h, Rr), _.delete(h), _.size === 0 && _t.delete(k)) : _.set(h, y);
1675
+ return f(Yn(ts)), Er.add(f), () => {
1676
+ for (var d of h) for (const I of [e, document]) {
1677
+ var _ = dt.get(I), m = _.get(d);
1678
+ --m == 0 ? (I.removeEventListener(d, Tr), _.delete(d), _.size === 0 && dt.delete(I)) : _.set(d, m);
1698
1679
  }
1699
- kr.delete(d), v !== r && v.parentNode?.removeChild(v);
1680
+ Er.delete(f), v !== r && v.parentNode?.removeChild(v);
1700
1681
  };
1701
1682
  });
1702
- return nr.set(f, b), f;
1683
+ return Qt.set(c, y), c;
1703
1684
  }
1704
- var nr = /* @__PURE__ */ new WeakMap();
1705
- function ys(t, e) {
1706
- const r = nr.get(t);
1707
- return r ? (nr.delete(t), r(e)) : Promise.resolve();
1685
+ var Qt = /* @__PURE__ */ new WeakMap();
1686
+ function gs(t, e) {
1687
+ const r = Qt.get(t);
1688
+ return r ? (Qt.delete(t), r(e)) : Promise.resolve();
1708
1689
  }
1709
- var Nn, We = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakSet(), Pn = class {
1690
+ var Mn, Ge = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakSet(), xn = class {
1710
1691
  constructor(t) {
1711
- or(this, Mr), A(this, We, /* @__PURE__ */ new WeakMap()), A(this, Mt, void 0), A(this, qt, void 0), g(qt, this, t);
1692
+ nr(this, Rr), E(this, Ge, /* @__PURE__ */ new WeakMap()), E(this, Lt, void 0), E(this, Gt, void 0), w(Gt, this, t);
1712
1693
  }
1713
1694
  observe(t, e) {
1714
- var r = a(We, this).get(t) || /* @__PURE__ */ new Set();
1715
- return r.add(e), a(We, this).set(t, r), p(Mr, this, bs).call(this).observe(t, a(qt, this)), () => {
1716
- var n = a(We, this).get(t);
1717
- n.delete(e), n.size === 0 && (a(We, this).delete(t), a(Mt, this).unobserve(t));
1695
+ var r = l(Ge, this).get(t) || /* @__PURE__ */ new Set();
1696
+ return r.add(e), l(Ge, this).set(t, r), p(Rr, this, ys).call(this).observe(t, l(Gt, this)), () => {
1697
+ var n = l(Ge, this).get(t);
1698
+ n.delete(e), n.size === 0 && (l(Ge, this).delete(t), l(Lt, this).unobserve(t));
1718
1699
  };
1719
1700
  }
1720
1701
  };
1721
- Nn = Pn;
1722
- function bs() {
1723
- return a(Mt, this) ?? g(Mt, this, new ResizeObserver((t) => {
1702
+ Mn = xn;
1703
+ function ys() {
1704
+ return l(Lt, this) ?? w(Lt, this, new ResizeObserver((t) => {
1724
1705
  for (var e of t) {
1725
- Nn.entries.set(e.target, e);
1726
- for (var r of a(We, this).get(e.target) || []) r(e);
1706
+ Mn.entries.set(e.target, e);
1707
+ for (var r of l(Ge, this).get(e.target) || []) r(e);
1727
1708
  }
1728
1709
  }));
1729
1710
  }
1730
- u(Pn, "entries", /* @__PURE__ */ new WeakMap());
1731
- function Yt(t, e) {
1732
- return t === e || t?.[Ze] === e;
1733
- }
1734
- function ws(t = sr(), e, r, n) {
1735
- var i = M.r, s = T;
1736
- return Vi(() => {
1737
- var l, o;
1738
- return hr(() => {
1739
- l = o, o = n?.() || [], Ft(() => {
1740
- Yt(r(...o), t) || (e(t, ...o), l && Yt(r(...l), t) && e(null, ...l));
1711
+ u(xn, "entries", /* @__PURE__ */ new WeakMap());
1712
+ function Dt(t, e) {
1713
+ return t === e || t?.[Ue] === e;
1714
+ }
1715
+ function bs(t = er(), e, r, n) {
1716
+ var i = x.r, s = T;
1717
+ return zi(() => {
1718
+ var a, o;
1719
+ return lr(() => {
1720
+ a = o, o = n?.() || [], st(() => {
1721
+ Dt(r(...o), t) || (e(t, ...o), a && Dt(r(...a), t) && e(null, ...a));
1741
1722
  });
1742
1723
  }), () => {
1743
- let f = s;
1744
- for (; f !== i && f.parent !== null && f.parent.f & 33554432; ) f = f.parent;
1745
- const b = () => {
1746
- o && Yt(r(...o), t) && e(null, ...o);
1747
- }, v = f.teardown;
1748
- f.teardown = () => {
1749
- b(), v?.();
1724
+ let c = s;
1725
+ for (; c !== i && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
1726
+ const y = () => {
1727
+ o && Dt(r(...o), t) && e(null, ...o);
1728
+ }, v = c.teardown;
1729
+ c.teardown = () => {
1730
+ y(), v?.();
1750
1731
  };
1751
1732
  };
1752
1733
  }), t;
1753
1734
  }
1754
- var pt = !1;
1755
- function Ss(t) {
1756
- var e = pt;
1735
+ var vt = !1;
1736
+ function ws(t) {
1737
+ var e = vt;
1757
1738
  try {
1758
- return pt = !1, [t(), pt];
1739
+ return vt = !1, [t(), vt];
1759
1740
  } finally {
1760
- pt = e;
1741
+ vt = e;
1761
1742
  }
1762
1743
  }
1763
- function Xe(t, e, r, n) {
1764
- var i = !Ht || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, o = n, f = !0, b = void 0, v = () => l && i ? (b ?? (b = /* @__PURE__ */ Et(n)), S(b)) : (f && (f = !1, o = l ? Ft(n) : n), o);
1765
- let c;
1744
+ function Pe(t, e, r, n) {
1745
+ var i = !Ot || (r & 2) !== 0, s = (r & 8) !== 0, a = (r & 16) !== 0, o = n, c = !0, y = void 0, v = () => a && i ? (y ?? (y = /* @__PURE__ */ St(n)), S(y)) : (c && (c = !1, o = a ? st(n) : n), o);
1746
+ let h;
1766
1747
  if (s) {
1767
- var d = Ze in t || qr in t;
1768
- c = $e(t, e)?.set ?? (d && e in t ? (m) => t[e] = m : void 0);
1769
- }
1770
- var h, _ = !1;
1771
- s ? [h, _] = Ss(() => t[e]) : h = t[e], h === void 0 && n !== void 0 && (h = v(), c && (i && bi(e), c(h)));
1772
- var y;
1773
- if (i ? y = () => {
1774
- var m = t[e];
1775
- return m === void 0 ? v() : (f = !0, m);
1776
- } : y = () => {
1777
- var m = t[e];
1778
- return m !== void 0 && (o = void 0), m === void 0 ? o : m;
1779
- }, i && (r & 4) === 0) return y;
1780
- if (c) {
1781
- var k = t.$$legacy;
1782
- return (function(m, pe) {
1783
- return arguments.length > 0 ? ((!i || !pe || k || _) && c(pe ? y() : m), m) : y();
1748
+ var f = Ue in t || Gr in t;
1749
+ h = $e(t, e)?.set ?? (f && e in t ? (O) => t[e] = O : void 0);
1750
+ }
1751
+ var d, _ = !1;
1752
+ s ? [d, _] = ws(() => t[e]) : d = t[e], d === void 0 && n !== void 0 && (d = v(), h && (i && gi(e), h(d)));
1753
+ var m;
1754
+ if (i ? m = () => {
1755
+ var O = t[e];
1756
+ return O === void 0 ? v() : (c = !0, O);
1757
+ } : m = () => {
1758
+ var O = t[e];
1759
+ return O !== void 0 && (o = void 0), O === void 0 ? o : O;
1760
+ }, i && (r & 4) === 0) return m;
1761
+ if (h) {
1762
+ var I = t.$$legacy;
1763
+ return (function(O, ie) {
1764
+ return arguments.length > 0 ? ((!i || !ie || I || _) && h(ie ? m() : O), O) : m();
1784
1765
  });
1785
1766
  }
1786
- var I = !1, H = ((r & 1) !== 0 ? Et : Ri)(() => (I = !1, y()));
1787
- s && S(H);
1767
+ var R = !1, P = ((r & 1) !== 0 ? St : $i)(() => (R = !1, m()));
1768
+ s && S(P);
1788
1769
  var ne = T;
1789
- return (function(m, pe) {
1770
+ return (function(O, ie) {
1790
1771
  if (arguments.length > 0) {
1791
- const Be = pe ? S(H) : i && s ? je(m) : m;
1792
- return N(H, Be), I = !0, o !== void 0 && (o = Be), m;
1772
+ const g = ie ? S(P) : i && s ? De(O) : O;
1773
+ return K(P, g), R = !0, o !== void 0 && (o = g), O;
1793
1774
  }
1794
- return fe && I || (ne.f & 16384) !== 0 ? H.v : S(H);
1775
+ return fe && R || (ne.f & 16384) !== 0 ? P.v : S(P);
1795
1776
  });
1796
1777
  }
1797
- function As(t) {
1798
- return new Es(t);
1778
+ function Ss(t) {
1779
+ return new As(t);
1799
1780
  }
1800
- var ye = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Es = class {
1781
+ var Se = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), As = class {
1801
1782
  constructor(t) {
1802
- A(this, ye, void 0), A(this, ie, void 0);
1783
+ E(this, Se, void 0), E(this, se, void 0);
1803
1784
  var e = /* @__PURE__ */ new Map(), r = (i, s) => {
1804
- var l = /* @__PURE__ */ Pi(s, !1, !1);
1805
- return e.set(i, l), l;
1785
+ var a = /* @__PURE__ */ Ni(s, !1, !1);
1786
+ return e.set(i, a), a;
1806
1787
  };
1807
1788
  const n = new Proxy({
1808
1789
  ...t.props || {},
@@ -1812,13 +1793,13 @@ var ye = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Es =
1812
1793
  return S(e.get(s) ?? r(s, Reflect.get(i, s)));
1813
1794
  },
1814
1795
  has(i, s) {
1815
- return s === qr ? !0 : (S(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
1796
+ return s === Gr ? !0 : (S(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
1816
1797
  },
1817
- set(i, s, l) {
1818
- return N(e.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
1798
+ set(i, s, a) {
1799
+ return K(e.get(s) ?? r(s, a), a), Reflect.set(i, s, a);
1819
1800
  }
1820
1801
  });
1821
- g(ie, this, (t.hydrate ? gs : xn)(t.component, {
1802
+ w(se, this, (t.hydrate ? ms : In)(t.component, {
1822
1803
  target: t.target,
1823
1804
  anchor: t.anchor,
1824
1805
  props: n,
@@ -1826,38 +1807,38 @@ var ye = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Es =
1826
1807
  intro: t.intro ?? !1,
1827
1808
  recover: t.recover,
1828
1809
  transformError: t.transformError
1829
- })), !Ne && (!t?.props?.$$host || t.sync === !1) && we(), g(ye, this, n.$$events);
1830
- for (const i of Object.keys(a(ie, this)))
1831
- i === "$set" || i === "$destroy" || i === "$on" || nt(this, i, {
1810
+ })), !He && (!t?.props?.$$host || t.sync === !1) && ve(), w(Se, this, n.$$events);
1811
+ for (const i of Object.keys(l(se, this)))
1812
+ i === "$set" || i === "$destroy" || i === "$on" || et(this, i, {
1832
1813
  get() {
1833
- return a(ie, this)[i];
1814
+ return l(se, this)[i];
1834
1815
  },
1835
1816
  set(s) {
1836
- a(ie, this)[i] = s;
1817
+ l(se, this)[i] = s;
1837
1818
  },
1838
1819
  enumerable: !0
1839
1820
  });
1840
- a(ie, this).$set = (i) => {
1821
+ l(se, this).$set = (i) => {
1841
1822
  Object.assign(n, i);
1842
- }, a(ie, this).$destroy = () => {
1843
- ys(a(ie, this));
1823
+ }, l(se, this).$destroy = () => {
1824
+ gs(l(se, this));
1844
1825
  };
1845
1826
  }
1846
1827
  $set(t) {
1847
- a(ie, this).$set(t);
1828
+ l(se, this).$set(t);
1848
1829
  }
1849
1830
  $on(t, e) {
1850
- a(ye, this)[t] = a(ye, this)[t] || [];
1831
+ l(Se, this)[t] = l(Se, this)[t] || [];
1851
1832
  const r = (...n) => e.call(this, ...n);
1852
- return a(ye, this)[t].push(r), () => {
1853
- a(ye, this)[t] = a(ye, this)[t].filter((n) => n !== r);
1833
+ return l(Se, this)[t].push(r), () => {
1834
+ l(Se, this)[t] = l(Se, this)[t].filter((n) => n !== r);
1854
1835
  };
1855
1836
  }
1856
1837
  $destroy() {
1857
- a(ie, this).$destroy();
1838
+ l(se, this).$destroy();
1858
1839
  }
1859
- }, Kn;
1860
- typeof HTMLElement == "function" && (Kn = class extends HTMLElement {
1840
+ }, Hn;
1841
+ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
1861
1842
  constructor(t, e, r) {
1862
1843
  super(), u(this, "$$ctor", void 0), u(this, "$$s", void 0), u(this, "$$c", void 0), u(this, "$$cn", !1), u(this, "$$d", {}), u(this, "$$r", !1), u(this, "$$p_d", {}), u(this, "$$l", {}), u(this, "$$l_u", /* @__PURE__ */ new Map()), u(this, "$$me", void 0), u(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, r && (this.$$shadowRoot = this.attachShadow(r));
1863
1844
  }
@@ -1878,19 +1859,19 @@ typeof HTMLElement == "function" && (Kn = class extends HTMLElement {
1878
1859
  if (this.$$cn = !0, !this.$$c) {
1879
1860
  let t = function(n) {
1880
1861
  return (i) => {
1881
- const s = gn("slot");
1882
- n !== "default" && (s.name = n), Ln(i, s);
1862
+ const s = _n("slot");
1863
+ n !== "default" && (s.name = n), $n(i, s);
1883
1864
  };
1884
1865
  };
1885
1866
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
1886
- const e = {}, r = Ts(this);
1867
+ const e = {}, r = Es(this);
1887
1868
  for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
1888
1869
  for (const n of this.attributes) {
1889
1870
  const i = this.$$g_p(n.name);
1890
- i in this.$$d || (this.$$d[i] = yt(i, n.value, this.$$p_d, "toProp"));
1871
+ i in this.$$d || (this.$$d[i] = mt(i, n.value, this.$$p_d, "toProp"));
1891
1872
  }
1892
1873
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
1893
- this.$$c = As({
1874
+ this.$$c = Ss({
1894
1875
  component: this.$$ctor,
1895
1876
  target: this.$$shadowRoot || this,
1896
1877
  props: {
@@ -1898,13 +1879,13 @@ typeof HTMLElement == "function" && (Kn = class extends HTMLElement {
1898
1879
  $$slots: e,
1899
1880
  $$host: this
1900
1881
  }
1901
- }), this.$$me = Yi(() => {
1902
- hr(() => {
1882
+ }), this.$$me = qi(() => {
1883
+ lr(() => {
1903
1884
  this.$$r = !0;
1904
- for (const n of St(this.$$c)) {
1885
+ for (const n of bt(this.$$c)) {
1905
1886
  if (!this.$$p_d[n]?.reflect) continue;
1906
1887
  this.$$d[n] = this.$$c[n];
1907
- const i = yt(n, this.$$d[n], this.$$p_d, "toAttribute");
1888
+ const i = mt(n, this.$$d[n], this.$$p_d, "toAttribute");
1908
1889
  i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
1909
1890
  }
1910
1891
  this.$$r = !1;
@@ -1918,7 +1899,7 @@ typeof HTMLElement == "function" && (Kn = class extends HTMLElement {
1918
1899
  }
1919
1900
  }
1920
1901
  attributeChangedCallback(t, e, r) {
1921
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = yt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
1902
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = mt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
1922
1903
  }
1923
1904
  disconnectedCallback() {
1924
1905
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -1926,10 +1907,10 @@ typeof HTMLElement == "function" && (Kn = class extends HTMLElement {
1926
1907
  });
1927
1908
  }
1928
1909
  $$g_p(t) {
1929
- return St(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
1910
+ return bt(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
1930
1911
  }
1931
1912
  });
1932
- function yt(t, e, r, n) {
1913
+ function mt(t, e, r, n) {
1933
1914
  const i = r[t]?.type;
1934
1915
  if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !r[t]) return e;
1935
1916
  if (n === "toAttribute") switch (i) {
@@ -1955,42 +1936,42 @@ function yt(t, e, r, n) {
1955
1936
  return e;
1956
1937
  }
1957
1938
  }
1958
- function Ts(t) {
1939
+ function Es(t) {
1959
1940
  const e = {};
1960
1941
  return t.childNodes.forEach((r) => {
1961
1942
  e[r.slot || "default"] = !0;
1962
1943
  }), e;
1963
1944
  }
1964
- function $s(t, e, r, n, i, s) {
1965
- let l = class extends Kn {
1945
+ function Ts(t, e, r, n, i, s) {
1946
+ let a = class extends Hn {
1966
1947
  constructor() {
1967
1948
  super(t, r, i), this.$$p_d = e;
1968
1949
  }
1969
1950
  static get observedAttributes() {
1970
- return St(e).map((o) => (e[o].attribute || o).toLowerCase());
1951
+ return bt(e).map((o) => (e[o].attribute || o).toLowerCase());
1971
1952
  }
1972
1953
  };
1973
- return St(e).forEach((o) => {
1974
- nt(l.prototype, o, {
1954
+ return bt(e).forEach((o) => {
1955
+ et(a.prototype, o, {
1975
1956
  get() {
1976
1957
  return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
1977
1958
  },
1978
- set(f) {
1979
- f = yt(o, f, e), this.$$d[o] = f;
1980
- var b = this.$$c;
1981
- b && ($e(b, o)?.get ? b[o] = f : b.$set({ [o]: f }));
1959
+ set(c) {
1960
+ c = mt(o, c, e), this.$$d[o] = c;
1961
+ var y = this.$$c;
1962
+ y && ($e(y, o)?.get ? y[o] = c : y.$set({ [o]: c }));
1982
1963
  }
1983
1964
  });
1984
1965
  }), n.forEach((o) => {
1985
- nt(l.prototype, o, { get() {
1966
+ et(a.prototype, o, { get() {
1986
1967
  return this.$$c?.[o];
1987
1968
  } });
1988
- }), s && (l = s(l)), t.element = l, l;
1969
+ }), s && (a = s(a)), t.element = a, a;
1989
1970
  }
1990
- var Bn, oe = class D {
1971
+ var Nn, ue = class W {
1991
1972
  findChoices(e) {
1992
- e.setAttribute(D.ROOT_HOOK_ATTR, "true");
1993
- const r = Array.from(e.querySelectorAll(D.CHOICE_SELECTOR));
1973
+ e.setAttribute(W.ROOT_HOOK_ATTR, "true");
1974
+ const r = Array.from(e.querySelectorAll(W.CHOICE_SELECTOR));
1994
1975
  for (const n of r) this.annotateChoice(n);
1995
1976
  return this.annotateFeedbackTicks(e), r;
1996
1977
  }
@@ -2013,59 +1994,59 @@ var Bn, oe = class D {
2013
1994
  }
2014
1995
  canEliminate(e) {
2015
1996
  const r = e.querySelector('input[type="checkbox"], input[type="radio"]');
2016
- return !(!r || this.isSelected(e) || r.disabled || (e.closest(`[${D.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(`[${D.FEEDBACK_HOOK_ATTR}="true"]`));
1997
+ return !(!r || this.isSelected(e) || r.disabled || (e.closest(`[${W.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(`[${W.FEEDBACK_HOOK_ATTR}="true"]`));
2017
1998
  }
2018
1999
  setSelectable(e, r) {
2019
2000
  const n = e.querySelector('input[type="checkbox"], input[type="radio"]');
2020
2001
  if (!n) return;
2021
2002
  n.disabled = !r, r ? n.removeAttribute("aria-disabled") : n.setAttribute("aria-disabled", "true");
2022
- const i = n.closest(D.MUI_BUTTON_SELECTOR);
2023
- i && i.classList.toggle(D.MUI_DISABLED_CLASS, !r);
2003
+ const i = n.closest(W.MUI_BUTTON_SELECTOR);
2004
+ i && i.classList.toggle(W.MUI_DISABLED_CLASS, !r);
2024
2005
  }
2025
2006
  generateFallbackId(e) {
2026
- const r = (e.closest(`[${D.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(`[${D.CHOICE_HOOK_ATTR}="true"]`) || [];
2007
+ const r = (e.closest(`[${W.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(`[${W.CHOICE_HOOK_ATTR}="true"]`) || [];
2027
2008
  return `choice-${Array.from(r).indexOf(e)}`;
2028
2009
  }
2029
2010
  annotateChoice(e) {
2030
- e.setAttribute(D.CHOICE_HOOK_ATTR, "true");
2011
+ e.setAttribute(W.CHOICE_HOOK_ATTR, "true");
2031
2012
  const r = this.resolveLabelElement(e);
2032
- r && r.setAttribute(D.LABEL_HOOK_ATTR, "true");
2013
+ r && r.setAttribute(W.LABEL_HOOK_ATTR, "true");
2033
2014
  }
2034
2015
  resolveLabelElement(e) {
2035
- return e.querySelector(`[${D.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label") || e.querySelector("span");
2016
+ return e.querySelector(`[${W.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label") || e.querySelector("span");
2036
2017
  }
2037
2018
  annotateFeedbackTicks(e) {
2038
- for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(D.FEEDBACK_HOOK_ATTR, "true");
2019
+ for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(W.FEEDBACK_HOOK_ATTR, "true");
2039
2020
  }
2040
2021
  };
2041
- Bn = oe;
2042
- u(oe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2043
- u(oe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2044
- u(oe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
2045
- u(oe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
2046
- u(oe, "CHOICE_SELECTOR", `[${Bn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
2047
- u(oe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
2048
- u(oe, "MUI_DISABLED_CLASS", "Mui-disabled");
2049
- var Cs = "ebsr-multiple-choice", Fn = (t) => t instanceof HTMLElement && qn(t.tagName.toLowerCase()).baseName === Cs, xr = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(Fn) ?? null, ks = (t) => {
2022
+ Nn = ue;
2023
+ u(ue, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2024
+ u(ue, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2025
+ u(ue, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
2026
+ u(ue, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
2027
+ u(ue, "CHOICE_SELECTOR", `[${Nn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
2028
+ u(ue, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
2029
+ u(ue, "MUI_DISABLED_CLASS", "Mui-disabled");
2030
+ var Cs = "ebsr-multiple-choice", Pn = (t) => t instanceof HTMLElement && Wn(t.tagName.toLowerCase()).baseName === Cs, Lr = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(Pn) ?? null, $s = (t) => {
2050
2031
  let e = t.parentElement;
2051
2032
  for (; e !== null; ) {
2052
- if (Fn(e)) return e;
2033
+ if (Pn(e)) return e;
2053
2034
  e = e.parentElement;
2054
2035
  }
2055
2036
  return null;
2056
- }, Rs = class {
2037
+ }, ks = class {
2057
2038
  constructor() {
2058
- u(this, "mcAdapter", new oe());
2039
+ u(this, "mcAdapter", new ue());
2059
2040
  }
2060
2041
  findChoices(t) {
2061
- const e = xr(t, "a"), r = xr(t, "b"), n = [];
2042
+ const e = Lr(t, "a"), r = Lr(t, "b"), n = [];
2062
2043
  return e && n.push(...this.mcAdapter.findChoices(e)), r && n.push(...this.mcAdapter.findChoices(r)), n;
2063
2044
  }
2064
2045
  createChoiceRange(t) {
2065
2046
  return this.mcAdapter.createChoiceRange(t);
2066
2047
  }
2067
2048
  getChoiceId(t) {
2068
- return `${ks(t)?.id || "unknown"}-${this.mcAdapter.getChoiceId(t)}`;
2049
+ return `${$s(t)?.id || "unknown"}-${this.mcAdapter.getChoiceId(t)}`;
2069
2050
  }
2070
2051
  getChoiceLabel(t) {
2071
2052
  return this.mcAdapter.getChoiceLabel(t);
@@ -2079,8 +2060,8 @@ var Cs = "ebsr-multiple-choice", Fn = (t) => t instanceof HTMLElement && qn(t.ta
2079
2060
  setSelectable(t, e) {
2080
2061
  this.mcAdapter.setSelectable(t, e);
2081
2062
  }
2082
- }, Hr = "answer-masking", Ls = "data-pie-answer-eliminator-choice", Is = "data-pie-answer-eliminator-label";
2083
- function Gn(t) {
2063
+ }, Ir = "answer-masking", Rs = "data-pie-answer-eliminator-choice", Ls = "data-pie-answer-eliminator-label";
2064
+ function Kn(t) {
2084
2065
  if (!t.localName.includes("-")) return null;
2085
2066
  try {
2086
2067
  const e = t.constructor.pieSupports;
@@ -2089,65 +2070,65 @@ function Gn(t) {
2089
2070
  return null;
2090
2071
  }
2091
2072
  }
2092
- function Os(t) {
2073
+ function Is(t) {
2093
2074
  const e = [];
2094
2075
  for (const r of [t, ...t.querySelectorAll("*")])
2095
- Gn(r) && (e.some((n) => n.contains(r)) || e.push(r));
2076
+ Kn(r) && (e.some((n) => n.contains(r)) || e.push(r));
2096
2077
  return e;
2097
2078
  }
2098
- function bt(t, e, r) {
2079
+ function gt(t, e, r) {
2099
2080
  try {
2100
2081
  return t();
2101
2082
  } catch (n) {
2102
2083
  return console.error(`[AnswerEliminator] ${r} threw:`, n), e;
2103
2084
  }
2104
2085
  }
2105
- function Ms(t) {
2086
+ function Os(t) {
2106
2087
  if (!t || typeof t != "object") return null;
2107
- const e = t, { id: r, label: n, container: i, content: s } = e, { isSelected: l, isEliminable: o, setEliminated: f } = e;
2108
- return typeof r != "string" || !r || typeof n != "string" || !(i instanceof HTMLElement) || !(s instanceof Element) || !i.contains(s) || typeof l != "function" || typeof o != "function" || typeof f != "function" ? null : {
2088
+ const e = t, { id: r, label: n, container: i, content: s } = e, { isSelected: a, isEliminable: o, setEliminated: c } = e;
2089
+ return typeof r != "string" || !r || typeof n != "string" || !(i instanceof HTMLElement) || !(s instanceof Element) || !i.contains(s) || typeof a != "function" || typeof o != "function" || typeof c != "function" ? null : {
2109
2090
  target: {
2110
2091
  id: r,
2111
2092
  label: n.trim() || s.textContent?.trim() || "",
2112
2093
  container: i,
2113
2094
  createRange() {
2114
- const b = document.createRange();
2115
- return b.selectNodeContents(s), b;
2095
+ const y = document.createRange();
2096
+ return y.selectNodeContents(s), y;
2116
2097
  },
2117
- isSelected: () => bt(() => l.call(t) === !0, !1, "isSelected"),
2118
- canEliminate: () => bt(() => o.call(t) === !0, !1, "isEliminable"),
2119
- setEliminated: (b) => bt(() => f.call(t, b), void 0, "setEliminated")
2098
+ isSelected: () => gt(() => a.call(t) === !0, !1, "isSelected"),
2099
+ canEliminate: () => gt(() => o.call(t) === !0, !1, "isEliminable"),
2100
+ setEliminated: (y) => gt(() => c.call(t, y), void 0, "setEliminated")
2120
2101
  },
2121
2102
  content: s
2122
2103
  };
2123
2104
  }
2124
- function Nr(t, e) {
2105
+ function Or(t, e) {
2125
2106
  t.getAttribute(e) !== "true" && t.setAttribute(e, "true");
2126
2107
  }
2127
- function xs(t) {
2128
- if (!Gn(t)?.includes("answer-masking")) return [];
2108
+ function Ms(t) {
2109
+ if (!Kn(t)?.includes("answer-masking")) return [];
2129
2110
  const e = t.pieSupportTargets;
2130
2111
  if (typeof e != "function")
2131
- return console.warn(`[AnswerEliminator] <${t.localName}> declares ${Hr} but has no pieSupportTargets()`), [];
2132
- const r = bt(() => e.call(t, Hr), [], `<${t.localName}>.pieSupportTargets`);
2112
+ return console.warn(`[AnswerEliminator] <${t.localName}> declares ${Ir} but has no pieSupportTargets()`), [];
2113
+ const r = gt(() => e.call(t, Ir), [], `<${t.localName}>.pieSupportTargets`);
2133
2114
  if (!Array.isArray(r)) return [];
2134
2115
  const n = [], i = /* @__PURE__ */ new Set();
2135
2116
  for (const s of r) {
2136
- const l = Ms(s);
2137
- if (!l || i.has(l.target.id)) {
2117
+ const a = Os(s);
2118
+ if (!a || i.has(a.target.id)) {
2138
2119
  console.warn(`[AnswerEliminator] <${t.localName}> supplied a choice that is malformed or repeats an id`, s);
2139
2120
  continue;
2140
2121
  }
2141
- const { target: o, content: f } = l;
2142
- i.add(o.id), Nr(o.container, Ls), Nr(f, Is), n.push({
2122
+ const { target: o, content: c } = a;
2123
+ i.add(o.id), Or(o.container, Rs), Or(c, Ls), n.push({
2143
2124
  target: o,
2144
2125
  owner: t
2145
2126
  });
2146
2127
  }
2147
2128
  return n;
2148
2129
  }
2149
- var Hs = [new Rs(), new oe()];
2150
- function Ns(t, e) {
2130
+ var xs = [new ks(), new ue()];
2131
+ function Hs(t, e) {
2151
2132
  return {
2152
2133
  id: e.getChoiceId(t),
2153
2134
  label: e.getChoiceLabel(t),
@@ -2158,25 +2139,40 @@ function Ns(t, e) {
2158
2139
  setEliminated: (r) => e.setSelectable(t, !r)
2159
2140
  };
2160
2141
  }
2161
- function Ps(t, e, r) {
2142
+ function Ns(t, e, r) {
2162
2143
  const n = [], i = new Set(r.map(({ target: s }) => s.container));
2163
- for (const s of Hs) for (const l of s.findChoices(t))
2164
- i.has(l) || (i.add(l), !e.some((o) => o.contains(l)) && n.push({
2165
- target: Ns(l, s),
2144
+ for (const s of xs) for (const a of s.findChoices(t))
2145
+ i.has(a) || (i.add(a), !e.some((o) => o.contains(a)) && n.push({
2146
+ target: Hs(a, s),
2166
2147
  owner: null
2167
2148
  }));
2168
2149
  return n;
2169
2150
  }
2170
- function Pr(t) {
2171
- const e = Os(t), r = e.flatMap(xs);
2172
- return [...r, ...Ps(t, e, r)];
2151
+ function Mr(t) {
2152
+ const e = Is(t), r = e.flatMap(Ms);
2153
+ return [...r, ...Ns(t, e, r)];
2173
2154
  }
2174
- var Ke = class P {
2155
+ var Bn = () => ({
2156
+ eliminatedText: "(eliminated)",
2157
+ stamp: () => {
2158
+ }
2159
+ }), he = class M {
2175
2160
  constructor() {
2176
- u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
2161
+ u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "chrome", Bn());
2177
2162
  }
2178
2163
  initialize() {
2179
2164
  }
2165
+ setChrome(e) {
2166
+ this.chrome = e;
2167
+ const r = [...Array.from(this.ranges.values(), (n) => this.findChoiceContainer(n)), ...this.fallbackContainers.values()];
2168
+ for (const n of r) {
2169
+ const i = n?.querySelector(`.${M.SR_CLASS}`);
2170
+ i && this.labelAnnouncement(i);
2171
+ }
2172
+ }
2173
+ labelAnnouncement(e) {
2174
+ e.textContent = ` ${this.chrome.eliminatedText}`, this.chrome.stamp(e);
2175
+ }
2180
2176
  destroy() {
2181
2177
  this.clearAll();
2182
2178
  }
@@ -2187,14 +2183,14 @@ var Ke = class P {
2187
2183
  }
2188
2184
  this.injectHighlightCSS(e);
2189
2185
  const n = new Highlight(r);
2190
- CSS.highlights.set(`${P.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2186
+ CSS.highlights.set(`${M.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2191
2187
  }
2192
2188
  remove(e) {
2193
2189
  if (!this.isSupported()) {
2194
2190
  this.removeFallback(e);
2195
2191
  return;
2196
2192
  }
2197
- CSS.highlights.delete(`${P.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2193
+ CSS.highlights.delete(`${M.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2198
2194
  const r = this.ranges.get(e);
2199
2195
  r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
2200
2196
  }
@@ -2212,60 +2208,67 @@ var Ke = class P {
2212
2208
  return typeof CSS < "u" && "highlights" in CSS;
2213
2209
  }
2214
2210
  injectHighlightCSS(e) {
2215
- const r = `${P.HIGHLIGHT_STYLE_PREFIX}${e}`;
2211
+ const r = `${M.HIGHLIGHT_STYLE_PREFIX}${e}`;
2216
2212
  if (document.getElementById(r)) return;
2217
2213
  const n = document.createElement("style");
2218
2214
  n.id = r, n.textContent = `
2219
- ::highlight(${P.HIGHLIGHT_NAME_PREFIX}${e}) {
2215
+ ::highlight(${M.HIGHLIGHT_NAME_PREFIX}${e}) {
2220
2216
  opacity: 0.2;
2221
2217
  filter: blur(2px);
2222
2218
  }
2223
2219
  `, document.head.appendChild(n);
2224
2220
  }
2225
2221
  removeHighlightCSS(e) {
2226
- document.getElementById(`${P.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2222
+ document.getElementById(`${M.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2227
2223
  }
2228
2224
  addAriaAttributes(e) {
2229
2225
  const r = this.findChoiceContainer(e);
2230
- r && (r.setAttribute(P.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
2226
+ if (!r) return;
2227
+ r.setAttribute(M.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
2228
+ const n = this.resolveLabelElement(r);
2229
+ if (n && !n.querySelector(`.${M.SR_CLASS}`)) {
2230
+ const i = document.createElement("span");
2231
+ i.className = M.SR_CLASS, this.labelAnnouncement(i), n.appendChild(i);
2232
+ }
2231
2233
  }
2232
2234
  removeAriaAttributes(e) {
2233
2235
  const r = this.findChoiceContainer(e);
2234
- r && (r.removeAttribute(P.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
2236
+ r && (r.removeAttribute(M.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${M.SR_CLASS}`)?.remove());
2237
+ }
2238
+ resolveLabelElement(e) {
2239
+ return e.querySelector(`[${M.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2235
2240
  }
2236
2241
  findChoiceContainer(e) {
2237
2242
  let r = e.startContainer;
2238
2243
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
2239
- if (r.getAttribute(P.CHOICE_HOOK_ATTR) === "true") return r;
2244
+ if (r.getAttribute(M.CHOICE_HOOK_ATTR) === "true") return r;
2240
2245
  r = r.parentElement;
2241
2246
  }
2242
2247
  return null;
2243
2248
  }
2244
2249
  applyFallback(e, r) {
2245
2250
  const n = this.findChoiceContainer(r);
2246
- n && (n.classList.add(P.FALLBACK_CLASS), n.setAttribute(P.ELIMINATED_ATTR, "true"), n.setAttribute(P.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2251
+ n && (n.classList.add(M.FALLBACK_CLASS), n.setAttribute(M.ELIMINATED_ATTR, "true"), n.setAttribute(M.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2247
2252
  }
2248
2253
  removeFallback(e) {
2249
2254
  const r = this.fallbackContainers.get(e);
2250
2255
  if (!r) return;
2251
- r.classList.remove(P.FALLBACK_CLASS), r.removeAttribute(P.ELIMINATED_ATTR), r.removeAttribute(P.ELIMINATED_ID_ATTR);
2256
+ r.classList.remove(M.FALLBACK_CLASS), r.removeAttribute(M.ELIMINATED_ATTR), r.removeAttribute(M.ELIMINATED_ID_ATTR);
2252
2257
  const n = document.createRange();
2253
2258
  n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
2254
2259
  }
2255
2260
  };
2256
- u(Ke, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
2257
- u(Ke, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
2258
- u(Ke, "FALLBACK_CLASS", "pie-answer-masked-fallback");
2259
- u(Ke, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2260
- u(Ke, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2261
- u(Ke, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2262
- var L = class w {
2261
+ u(he, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
2262
+ u(he, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
2263
+ u(he, "FALLBACK_CLASS", "pie-answer-masked-fallback");
2264
+ u(he, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
2265
+ u(he, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2266
+ u(he, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2267
+ u(he, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2268
+ u(he, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2269
+ var L = class b {
2263
2270
  constructor() {
2264
- u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map()), u(this, "chrome", {
2265
- eliminatedText: "(eliminated)",
2266
- stamp: () => {
2267
- }
2268
- });
2271
+ u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map()), u(this, "chrome", Bn());
2269
2272
  }
2270
2273
  initialize() {
2271
2274
  this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
@@ -2277,7 +2280,7 @@ var L = class w {
2277
2280
  this.chrome = e;
2278
2281
  const r = [...Array.from(this.ranges.values(), (n) => this.findChoiceContainer(n)), ...this.fallbackContainers.values()];
2279
2282
  for (const n of r) {
2280
- const i = n?.querySelector(`.${w.SR_CLASS}`);
2283
+ const i = n?.querySelector(`.${b.SR_CLASS}`);
2281
2284
  i && this.labelAnnouncement(i);
2282
2285
  }
2283
2286
  }
@@ -2288,7 +2291,7 @@ var L = class w {
2288
2291
  if (this.isSupported()) {
2289
2292
  this.injectHighlightCSS(e);
2290
2293
  const n = new Highlight(r);
2291
- CSS.highlights.set(`${w.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2294
+ CSS.highlights.set(`${b.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2292
2295
  } else this.applyFallback(e, r);
2293
2296
  this.strikeImages(e, r), this.strikeMath(e, r);
2294
2297
  }
@@ -2297,7 +2300,7 @@ var L = class w {
2297
2300
  this.removeFallback(e);
2298
2301
  return;
2299
2302
  }
2300
- CSS.highlights.delete(`${w.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2303
+ CSS.highlights.delete(`${b.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2301
2304
  const r = this.ranges.get(e);
2302
2305
  r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
2303
2306
  }
@@ -2321,11 +2324,11 @@ var L = class w {
2321
2324
  return typeof CSS < "u" && "highlights" in CSS;
2322
2325
  }
2323
2326
  injectHighlightCSS(e) {
2324
- const r = `${w.HIGHLIGHT_STYLE_PREFIX}${e}`;
2327
+ const r = `${b.HIGHLIGHT_STYLE_PREFIX}${e}`;
2325
2328
  if (document.getElementById(r)) return;
2326
2329
  const n = document.createElement("style");
2327
2330
  n.id = r, n.textContent = `
2328
- ::highlight(${w.HIGHLIGHT_NAME_PREFIX}${e}) {
2331
+ ::highlight(${b.HIGHLIGHT_NAME_PREFIX}${e}) {
2329
2332
  text-decoration: line-through;
2330
2333
  text-decoration-thickness: 2px;
2331
2334
  text-decoration-color: var(--pie-answer-eliminator-strike-color, var(--pie-incorrect, #ff9800));
@@ -2333,38 +2336,38 @@ var L = class w {
2333
2336
  `, document.head.appendChild(n);
2334
2337
  }
2335
2338
  removeHighlightCSS(e) {
2336
- document.getElementById(`${w.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2339
+ document.getElementById(`${b.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2337
2340
  }
2338
2341
  addAriaAttributes(e) {
2339
2342
  const r = this.findChoiceContainer(e);
2340
2343
  if (!r) return;
2341
- r.setAttribute(w.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
2344
+ r.setAttribute(b.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
2342
2345
  const n = this.resolveLabelElement(r);
2343
- if (n && !n.querySelector(`.${w.SR_CLASS}`)) {
2346
+ if (n && !n.querySelector(`.${b.SR_CLASS}`)) {
2344
2347
  const i = document.createElement("span");
2345
- i.className = w.SR_CLASS, this.labelAnnouncement(i), n.appendChild(i);
2348
+ i.className = b.SR_CLASS, this.labelAnnouncement(i), n.appendChild(i);
2346
2349
  }
2347
2350
  }
2348
2351
  removeAriaAttributes(e) {
2349
2352
  const r = this.findChoiceContainer(e);
2350
- r && (r.removeAttribute(w.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${w.SR_CLASS}`)?.remove());
2353
+ r && (r.removeAttribute(b.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${b.SR_CLASS}`)?.remove());
2351
2354
  }
2352
2355
  findChoiceContainer(e) {
2353
2356
  let r = e.startContainer;
2354
2357
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
2355
- if (r.getAttribute(w.CHOICE_HOOK_ATTR) === "true") return r;
2358
+ if (r.getAttribute(b.CHOICE_HOOK_ATTR) === "true") return r;
2356
2359
  r = r.parentElement;
2357
2360
  }
2358
2361
  return null;
2359
2362
  }
2360
2363
  applyFallback(e, r) {
2361
2364
  const n = this.findChoiceContainer(r);
2362
- n && (n.classList.add(w.FALLBACK_CLASS), n.setAttribute(w.ELIMINATED_ATTR, "true"), n.setAttribute(w.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2365
+ n && (n.classList.add(b.FALLBACK_CLASS), n.setAttribute(b.ELIMINATED_ATTR, "true"), n.setAttribute(b.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2363
2366
  }
2364
2367
  removeFallback(e) {
2365
2368
  const r = this.fallbackContainers.get(e);
2366
2369
  if (!r) return;
2367
- r.classList.remove(w.FALLBACK_CLASS), r.removeAttribute(w.ELIMINATED_ATTR), r.removeAttribute(w.ELIMINATED_ID_ATTR);
2370
+ r.classList.remove(b.FALLBACK_CLASS), r.removeAttribute(b.ELIMINATED_ATTR), r.removeAttribute(b.ELIMINATED_ID_ATTR);
2368
2371
  const n = document.createRange();
2369
2372
  n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
2370
2373
  }
@@ -2373,8 +2376,8 @@ var L = class w {
2373
2376
  if (!n) return;
2374
2377
  const i = [];
2375
2378
  for (const s of Array.from(n.querySelectorAll("img"))) {
2376
- const l = this.wrapImage(s);
2377
- l && i.push(l);
2379
+ const a = this.wrapImage(s);
2380
+ a && i.push(a);
2378
2381
  }
2379
2382
  i.length > 0 && this.imageWrappers.set(e, i);
2380
2383
  }
@@ -2389,9 +2392,9 @@ var L = class w {
2389
2392
  const n = this.resolveImageScope(r);
2390
2393
  if (!n) return;
2391
2394
  const i = [];
2392
- for (const s of n.querySelectorAll(w.MATH_SELECTOR)) {
2393
- const l = s.querySelector(w.MATH_BOX_SELECTOR) ?? s, o = !!l.querySelector(w.MATH_STACKED_SELECTOR);
2394
- l.classList.add(w.MATH_STRIKE_CLASS, o ? w.MATH_STRIKE_CROSS_CLASS : w.MATH_STRIKE_LINE_CLASS), l.setAttribute(w.MATH_STRIKE_ATTR, o ? "cross" : "line"), i.push(l);
2395
+ for (const s of n.querySelectorAll(b.MATH_SELECTOR)) {
2396
+ const a = s.querySelector(b.MATH_BOX_SELECTOR) ?? s, o = !!a.querySelector(b.MATH_STACKED_SELECTOR);
2397
+ a.classList.add(b.MATH_STRIKE_CLASS, o ? b.MATH_STRIKE_CROSS_CLASS : b.MATH_STRIKE_LINE_CLASS), a.setAttribute(b.MATH_STRIKE_ATTR, o ? "cross" : "line"), i.push(a);
2395
2398
  }
2396
2399
  i.length > 0 && this.mathTargets.set(e, i);
2397
2400
  }
@@ -2399,7 +2402,7 @@ var L = class w {
2399
2402
  const r = this.mathTargets.get(e);
2400
2403
  if (r) {
2401
2404
  for (const n of r)
2402
- n.classList.remove(w.MATH_STRIKE_CLASS, w.MATH_STRIKE_LINE_CLASS, w.MATH_STRIKE_CROSS_CLASS), n.removeAttribute(w.MATH_STRIKE_ATTR);
2405
+ n.classList.remove(b.MATH_STRIKE_CLASS, b.MATH_STRIKE_LINE_CLASS, b.MATH_STRIKE_CROSS_CLASS), n.removeAttribute(b.MATH_STRIKE_ATTR);
2403
2406
  this.mathTargets.delete(e);
2404
2407
  }
2405
2408
  }
@@ -2410,16 +2413,16 @@ var L = class w {
2410
2413
  wrapImage(e) {
2411
2414
  const r = e.parentElement;
2412
2415
  if (!r) return null;
2413
- if (r.classList.contains(w.IMAGE_WRAPPER_CLASS) || r.hasAttribute(w.IMAGE_WRAPPER_ATTR)) return r;
2416
+ if (r.classList.contains(b.IMAGE_WRAPPER_CLASS) || r.hasAttribute(b.IMAGE_WRAPPER_ATTR)) return r;
2414
2417
  const n = document.createElement("span");
2415
- return n.className = w.IMAGE_WRAPPER_CLASS, n.setAttribute(w.IMAGE_WRAPPER_ATTR, "true"), this.fillsParentWidth(e, r) ? n.style.display = "block" : w.BLOCK_DISPLAYS.has(getComputedStyle(e).display) && (n.style.display = "block", n.style.width = "fit-content"), r.insertBefore(n, e), n.appendChild(e), n.appendChild(this.createImageStrikeOverlay()), n;
2418
+ return n.className = b.IMAGE_WRAPPER_CLASS, n.setAttribute(b.IMAGE_WRAPPER_ATTR, "true"), this.fillsParentWidth(e, r) ? n.style.display = "block" : b.BLOCK_DISPLAYS.has(getComputedStyle(e).display) && (n.style.display = "block", n.style.width = "fit-content"), r.insertBefore(n, e), n.appendChild(e), n.appendChild(this.createImageStrikeOverlay()), n;
2416
2419
  }
2417
2420
  fillsParentWidth(e, r) {
2418
2421
  const n = e.getBoundingClientRect().width, i = r.clientWidth;
2419
2422
  return n === 0 || i === 0 ? !1 : n >= i - 1;
2420
2423
  }
2421
2424
  unwrapImage(e) {
2422
- e.querySelector(`.${w.IMAGE_OVERLAY_CLASS}`)?.remove();
2425
+ e.querySelector(`.${b.IMAGE_OVERLAY_CLASS}`)?.remove();
2423
2426
  const r = e.parentElement;
2424
2427
  if (r) {
2425
2428
  for (; e.firstChild; ) r.insertBefore(e.firstChild, e);
@@ -2427,8 +2430,8 @@ var L = class w {
2427
2430
  }
2428
2431
  }
2429
2432
  createImageStrikeOverlay() {
2430
- const e = document.createElementNS(w.SVG_NS, "svg");
2431
- e.setAttribute("class", w.IMAGE_OVERLAY_CLASS), e.setAttribute("viewBox", "0 0 100 100"), e.setAttribute("preserveAspectRatio", "none"), e.setAttribute("aria-hidden", "true"), e.setAttribute("focusable", "false");
2433
+ const e = document.createElementNS(b.SVG_NS, "svg");
2434
+ e.setAttribute("class", b.IMAGE_OVERLAY_CLASS), e.setAttribute("viewBox", "0 0 100 100"), e.setAttribute("preserveAspectRatio", "none"), e.setAttribute("aria-hidden", "true"), e.setAttribute("focusable", "false");
2432
2435
  const r = [{
2433
2436
  x1: "0",
2434
2437
  y1: "0",
@@ -2440,14 +2443,14 @@ var L = class w {
2440
2443
  x2: "100",
2441
2444
  y2: "0"
2442
2445
  }];
2443
- for (const n of [w.IMAGE_CASING_CLASS, w.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: l, y2: o } of r) {
2444
- const f = document.createElementNS(w.SVG_NS, "line");
2445
- f.setAttribute("class", n), f.setAttribute("x1", i), f.setAttribute("y1", s), f.setAttribute("x2", l), f.setAttribute("y2", o), f.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(f);
2446
+ for (const n of [b.IMAGE_CASING_CLASS, b.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: a, y2: o } of r) {
2447
+ const c = document.createElementNS(b.SVG_NS, "line");
2448
+ c.setAttribute("class", n), c.setAttribute("x1", i), c.setAttribute("y1", s), c.setAttribute("x2", a), c.setAttribute("y2", o), c.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(c);
2446
2449
  }
2447
2450
  return e;
2448
2451
  }
2449
2452
  resolveLabelElement(e) {
2450
- return e.querySelector(`[${w.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2453
+ return e.querySelector(`[${b.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2451
2454
  }
2452
2455
  };
2453
2456
  u(L, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
@@ -2479,7 +2482,7 @@ u(L, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2479
2482
  "flow-root",
2480
2483
  "list-item"
2481
2484
  ]));
2482
- function Ks(t) {
2485
+ function Ps(t) {
2483
2486
  switch (t) {
2484
2487
  case "start":
2485
2488
  case "left":
@@ -2491,33 +2494,33 @@ function Ks(t) {
2491
2494
  return "inline";
2492
2495
  }
2493
2496
  }
2494
- var Kr = "answerEliminator", _r = class wt {
2497
+ var xr = "answerEliminator", cr = class yt {
2495
2498
  constructor(e = "strikethrough", r = "inline") {
2496
- u(this, "strategy", void 0), u(this, "choices", /* @__PURE__ */ new Map()), u(this, "eliminated", /* @__PURE__ */ new Set()), u(this, "strategyKeys", /* @__PURE__ */ new Map()), u(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), u(this, "nextToken", 0), u(this, "buttonAlignment", "inline"), u(this, "i18n", zt(null)), u(this, "shouldRestoreState", !0), u(this, "active", !0), u(this, "questionRoot", null), u(this, "selectionChangeHandler", null), u(this, "selectionObserver", null), u(this, "selectionRefreshFrame", null), u(this, "focusedKey", null), u(this, "store", null), u(this, "elementStateKeys", {}), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.applyStrategyChrome(), this.buttonAlignment = Ks(r);
2499
+ u(this, "strategy", void 0), u(this, "choices", /* @__PURE__ */ new Map()), u(this, "eliminated", /* @__PURE__ */ new Set()), u(this, "strategyKeys", /* @__PURE__ */ new Map()), u(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), u(this, "nextToken", 0), u(this, "buttonAlignment", "inline"), u(this, "i18n", Wt(null)), u(this, "shouldRestoreState", !0), u(this, "active", !0), u(this, "questionRoot", null), u(this, "selectionChangeHandler", null), u(this, "selectionObserver", null), u(this, "selectionRefreshFrame", null), u(this, "focusedKey", null), u(this, "store", null), u(this, "elementStateKeys", {}), u(this, "elementIds", null), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.applyStrategyChrome(), this.buttonAlignment = Ps(r);
2497
2500
  }
2498
2501
  setInterfaceI18n(e) {
2499
- this.i18n = e ?? zt(null);
2502
+ this.i18n = e ?? Wt(null);
2500
2503
  for (const r of this.choices.values()) r.button && this.labelToggle(r.button, r);
2501
2504
  this.applyStrategyChrome();
2502
2505
  }
2503
2506
  applyStrategyChrome() {
2504
2507
  this.strategy.setChrome?.({
2505
2508
  eliminatedText: this.i18n.t("tools.answerEliminator.eliminatedA11y"),
2506
- stamp: (e) => pr(e, this.i18n)
2509
+ stamp: (e) => hr(e, this.i18n)
2507
2510
  });
2508
2511
  }
2509
2512
  labelToggle(e, r) {
2510
2513
  const n = r.target.label || this.i18n.t("tools.answerEliminator.unlabeledChoice");
2511
- e.setAttribute("aria-label", this.i18n.t("tools.answerEliminator.toggleA11y", { choice: n })), pr(e, this.i18n);
2514
+ e.setAttribute("aria-label", this.i18n.t("tools.answerEliminator.toggleA11y", { choice: n })), hr(e, this.i18n);
2512
2515
  }
2513
2516
  createStrategy(e) {
2514
- return e === "mask" ? new Ke() : new L();
2517
+ return e === "mask" ? new he() : new L();
2515
2518
  }
2516
2519
  initializeForQuestion(e) {
2517
2520
  this.active = !0;
2518
2521
  const r = new Set(this.eliminated);
2519
2522
  this.restoreAllSelectable(), this.strategy.clearAll(), this.eliminated.clear(), this.cleanupButtons();
2520
- for (const i of Pr(e)) this.initializeChoice(i, e);
2523
+ for (const i of Mr(e)) this.initializeChoice(i, e);
2521
2524
  const n = this.readPersistedEliminations();
2522
2525
  for (const [i, s] of this.choices) (n.has(s.group) ? n.get(s.group)?.has(s.choiceId) : r.has(i)) && this.applyElimination(i, s);
2523
2526
  this.attachSelectionListener(e);
@@ -2532,35 +2535,42 @@ var Kr = "answerEliminator", _r = class wt {
2532
2535
  i === null && o.localName.includes("-") && (i = o);
2533
2536
  }
2534
2537
  const s = i ?? n;
2535
- let l = this.anonymousGroups.get(s);
2536
- return l || (l = `\0anonymous-${this.nextToken++}`, this.anonymousGroups.set(s, l)), l;
2538
+ let a = this.anonymousGroups.get(s);
2539
+ return a || (a = `\0anonymous-${this.nextToken++}`, this.anonymousGroups.set(s, a)), a;
2540
+ }
2541
+ isEligible({ target: e, owner: r }, n) {
2542
+ const i = this.elementIds;
2543
+ if (i === null) return !0;
2544
+ for (let s = r ?? e.container; s !== null; s = s === n ? null : s.parentElement) if (s.id && i.has(s.id)) return !0;
2545
+ return !1;
2537
2546
  }
2538
2547
  strategyKeyFor(e) {
2539
2548
  let r = this.strategyKeys.get(e);
2540
2549
  return r || (r = `choice-${this.nextToken++}`, this.strategyKeys.set(e, r)), r;
2541
2550
  }
2542
2551
  initializeChoice(e, r) {
2543
- const { target: n, owner: i } = e, s = n.id, l = this.resolveGroup(e, r), o = this.trackingKey(l, s), f = {
2552
+ if (!this.isEligible(e, r)) return;
2553
+ const { target: n, owner: i } = e, s = n.id, a = this.resolveGroup(e, r), o = this.trackingKey(a, s), c = {
2544
2554
  choiceId: s,
2545
- group: l,
2555
+ group: a,
2546
2556
  strategyKey: this.strategyKeyFor(o),
2547
2557
  target: n,
2548
2558
  owner: i,
2549
2559
  button: null
2550
2560
  };
2551
- this.choices.set(o, f);
2552
- const b = this.createToggleButton(o, f, this.alignmentFor(n.container));
2553
- f.button = b, this.updateButtonVisibility(o), n.container.style.position = "relative", n.container.appendChild(b);
2561
+ this.choices.set(o, c);
2562
+ const y = this.createToggleButton(o, c, this.alignmentFor(n.container));
2563
+ c.button = y, this.updateButtonVisibility(o), n.container.style.position = "relative", n.container.appendChild(y);
2554
2564
  }
2555
2565
  alignmentFor(e) {
2556
2566
  return this.buttonAlignment === "inline" || getComputedStyle(e).display === "inline" ? "inline" : this.buttonAlignment;
2557
2567
  }
2558
2568
  createToggleButton(e, r, n) {
2559
2569
  const i = document.createElement("button");
2560
- i.type = "button", i.className = wt.TOGGLE_CLASS, this.labelToggle(i, r), i.setAttribute("aria-pressed", "false"), i.setAttribute("data-choice-id", r.choiceId);
2570
+ i.type = "button", i.className = yt.TOGGLE_CLASS, this.labelToggle(i, r), i.setAttribute("aria-pressed", "false"), i.setAttribute("data-choice-id", r.choiceId);
2561
2571
  const s = document.createElement("span");
2562
- return s.setAttribute("aria-hidden", "true"), s.textContent = "⊗", i.appendChild(s), this.applyButtonAlignment(i, n, r.target.container), i.dataset.pieShownDisplay = i.style.display, i.addEventListener("click", (l) => {
2563
- l.preventDefault(), l.stopPropagation(), this.toggleElimination(e);
2572
+ return s.setAttribute("aria-hidden", "true"), s.textContent = "⊗", i.appendChild(s), this.applyButtonAlignment(i, n, r.target.container), i.dataset.pieShownDisplay = i.style.display, i.addEventListener("click", (a) => {
2573
+ a.preventDefault(), a.stopPropagation(), this.toggleElimination(e);
2564
2574
  }), i.addEventListener("focus", () => {
2565
2575
  this.focusedKey = e;
2566
2576
  }), i.addEventListener("blur", () => {
@@ -2589,11 +2599,11 @@ var Kr = "answerEliminator", _r = class wt {
2589
2599
  applyElimination(e, r, n = !0) {
2590
2600
  if (r.target.isSelected()) return !1;
2591
2601
  const i = r.target.createRange();
2592
- return i ? (this.strategy.apply(r.strategyKey, i), this.eliminated.add(e), n && r.target.setEliminated(!0), r.button && (r.button.classList.add(wt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(e), !0) : !1;
2602
+ return i ? (this.strategy.apply(r.strategyKey, i), this.eliminated.add(e), n && r.target.setEliminated(!0), r.button && (r.button.classList.add(yt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(e), !0) : !1;
2593
2603
  }
2594
2604
  restoreChoice(e) {
2595
2605
  const r = this.choices.get(e);
2596
- this.eliminated.delete(e), r && (this.strategy.remove(r.strategyKey), r.target.setEliminated(!1), r.button && (r.button.classList.remove(wt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(e));
2606
+ this.eliminated.delete(e), r && (this.strategy.remove(r.strategyKey), r.target.setEliminated(!1), r.button && (r.button.classList.remove(yt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(e));
2597
2607
  }
2598
2608
  resetAll() {
2599
2609
  if (this.eliminated.size === 0) return;
@@ -2607,6 +2617,9 @@ var Kr = "answerEliminator", _r = class wt {
2607
2617
  getEliminatedCount() {
2608
2618
  return this.eliminated.size;
2609
2619
  }
2620
+ setElementIds(e) {
2621
+ this.elementIds = e ? new Set(e) : null;
2622
+ }
2610
2623
  setStoreIntegration(e, r) {
2611
2624
  this.store = e, this.elementStateKeys = r;
2612
2625
  }
@@ -2617,7 +2630,7 @@ var Kr = "answerEliminator", _r = class wt {
2617
2630
  const i = this.choices.get(n);
2618
2631
  i?.group === e && r.push(i.choiceId);
2619
2632
  }
2620
- this.store.setState(this.elementStateKeys[e], Kr, { eliminatedChoices: r });
2633
+ this.store.setState(this.elementStateKeys[e], xr, { eliminatedChoices: r });
2621
2634
  }
2622
2635
  readPersistedEliminations() {
2623
2636
  const e = /* @__PURE__ */ new Map();
@@ -2625,7 +2638,7 @@ var Kr = "answerEliminator", _r = class wt {
2625
2638
  for (const { group: r } of this.choices.values())
2626
2639
  if (!(e.has(r) || !Object.hasOwn(this.elementStateKeys, r)))
2627
2640
  try {
2628
- const n = this.store.getState(this.elementStateKeys[r], Kr), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
2641
+ const n = this.store.getState(this.elementStateKeys[r], xr), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
2629
2642
  e.set(r, new Set(i));
2630
2643
  } catch (n) {
2631
2644
  console.error("Failed to restore eliminator state:", n);
@@ -2660,10 +2673,10 @@ var Kr = "answerEliminator", _r = class wt {
2660
2673
  this.strategy.clearAll(), this.eliminated.clear();
2661
2674
  for (const { button: s } of n.values()) s?.remove();
2662
2675
  this.choices = /* @__PURE__ */ new Map();
2663
- for (const s of Pr(e)) this.initializeChoice(s, e);
2676
+ for (const s of Mr(e)) this.initializeChoice(s, e);
2664
2677
  for (const s of i) {
2665
- const l = n.get(s), o = this.choices.get(s), f = !!l?.owner && o?.owner === l.owner;
2666
- o && this.applyElimination(s, o, !f) || (o ?? l)?.target.setEliminated(!1);
2678
+ const a = n.get(s), o = this.choices.get(s), c = !!a?.owner && o?.owner === a.owner;
2679
+ o && this.applyElimination(s, o, !c) || (o ?? a)?.target.setEliminated(!1);
2667
2680
  }
2668
2681
  r && this.choices.get(r)?.button?.focus({ preventScroll: !0 });
2669
2682
  }
@@ -2727,104 +2740,117 @@ var Kr = "answerEliminator", _r = class wt {
2727
2740
  this.restoreAllSelectable(), this.eliminated.clear(), this.cleanupButtons(), this.strategy.destroy();
2728
2741
  }
2729
2742
  };
2730
- u(_r, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
2731
- u(_r, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
2732
- var Bs = /* @__PURE__ */ as('<div style="display: none;" aria-hidden="true"></div>');
2733
- function Fs(t, e) {
2734
- Xr(e, !0);
2735
- let r = Xe(e, "visible", 7, !1), n = Xe(e, "strategy", 7, "strikethrough"), i = Xe(e, "alwaysOn", 7, !1), s = Xe(e, "buttonAlignment", 7, "inline"), l = Xe(e, "elementStateKeys", 23, () => ({})), o = /* @__PURE__ */ W(null), f = /* @__PURE__ */ W(null), b = /* @__PURE__ */ W(null);
2736
- const v = /* @__PURE__ */ Gt(() => S(f)?.elementToolStateStore ?? null);
2737
- let c = /* @__PURE__ */ W(null);
2738
- const d = /* @__PURE__ */ Gt(() => zt(S(f)));
2739
- let h = /* @__PURE__ */ W(null), _ = /* @__PURE__ */ Gt(() => i() || r());
2740
- me(() => {
2741
- if (S(o))
2742
- return Wn(S(o), (m) => {
2743
- N(f, m, !0);
2743
+ u(cr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
2744
+ u(cr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
2745
+ var Ks = /* @__PURE__ */ ss('<div style="display: none;" aria-hidden="true"></div>');
2746
+ function Bs(t, e) {
2747
+ qr(e, !0);
2748
+ let r = Pe(e, "visible", 7, !1), n = Pe(e, "strategy", 7, "strikethrough"), i = Pe(e, "alwaysOn", 7, !1), s = Pe(e, "buttonAlignment", 7, "inline"), a = Pe(e, "elementStateKeys", 23, () => ({})), o = Pe(e, "elementIds", 7, void 0), c = /* @__PURE__ */ j(null), y = /* @__PURE__ */ j(null), v = /* @__PURE__ */ j(null);
2749
+ const h = /* @__PURE__ */ Pt(() => S(y)?.elementToolStateStore ?? null);
2750
+ let f = /* @__PURE__ */ j(null);
2751
+ const d = /* @__PURE__ */ Pt(() => Wt(S(y)));
2752
+ let _ = /* @__PURE__ */ j(null), m = /* @__PURE__ */ Pt(() => i() || r());
2753
+ de(() => {
2754
+ if (S(c))
2755
+ return Gn(S(c), (g) => {
2756
+ K(y, g, !0);
2744
2757
  });
2745
- }), me(() => {
2746
- if (S(o))
2747
- return jn(S(o), (m) => {
2748
- N(b, m, !0);
2758
+ }), de(() => {
2759
+ if (S(c))
2760
+ return Dn(S(c), (g) => {
2761
+ K(v, g, !0);
2749
2762
  });
2750
2763
  });
2751
- function y() {
2752
- return S(b)?.scopeElement || null;
2764
+ function I() {
2765
+ return S(v)?.scopeElement || null;
2753
2766
  }
2754
- function k() {
2755
- if (!S(_) || !S(c)) return;
2756
- const m = y();
2757
- if (!m) {
2767
+ function R() {
2768
+ if (!S(m) || !S(f)) return;
2769
+ const g = I();
2770
+ if (!g) {
2758
2771
  console.warn("[AnswerEliminator] Missing shell scope context for question root");
2759
2772
  return;
2760
2773
  }
2761
- S(c).initializeForQuestion(m);
2774
+ S(f).initializeForQuestion(g);
2762
2775
  }
2763
- function I() {
2776
+ function P() {
2764
2777
  requestAnimationFrame(() => {
2765
2778
  requestAnimationFrame(() => {
2766
- k();
2779
+ R();
2767
2780
  });
2768
2781
  });
2769
2782
  }
2770
- me(() => {
2771
- S(c)?.setInterfaceI18n(S(d));
2772
- }), me(() => {
2773
- S(c)?.setStoreIntegration(S(v), l() ?? {});
2774
- }), me(() => {
2775
- const m = new _r(n(), s());
2776
- return Ft(() => {
2777
- m.setStoreIntegration(S(v), l() ?? {}), m.setInterfaceI18n(S(d)), N(c, m, !0), S(_) ? k() : m.cleanup();
2783
+ de(() => {
2784
+ S(f)?.setInterfaceI18n(S(d));
2785
+ }), de(() => {
2786
+ S(f)?.setStoreIntegration(S(h), a() ?? {});
2787
+ });
2788
+ let ne = null;
2789
+ de(() => {
2790
+ const g = o() ? [...o()] : null, fr = g ? JSON.stringify(g) : null;
2791
+ st(() => {
2792
+ S(f) && (S(f).setElementIds(g), fr !== ne && (ne = fr, R()));
2793
+ });
2794
+ }), de(() => {
2795
+ const g = new cr(n(), s());
2796
+ return st(() => {
2797
+ g.setStoreIntegration(S(h), a() ?? {}), g.setElementIds(o() ? [...o()] : null), g.setInterfaceI18n(S(d)), K(f, g, !0), S(m) ? R() : g.cleanup();
2778
2798
  }), () => {
2779
- m.destroy(), S(c) === m && N(c, null);
2799
+ g.destroy(), S(f) === g && K(f, null);
2780
2800
  };
2781
- }), me(() => {
2782
- const m = S(b)?.contextVersion ?? null;
2783
- if (m !== null) {
2784
- if (S(h) === null) {
2785
- N(h, m, !0);
2801
+ }), de(() => {
2802
+ const g = S(v)?.contextVersion ?? null;
2803
+ if (g !== null) {
2804
+ if (S(_) === null) {
2805
+ K(_, g, !0);
2786
2806
  return;
2787
2807
  }
2788
- m !== S(h) && (N(h, m, !0), I());
2808
+ g !== S(_) && (K(_, g, !0), P());
2789
2809
  }
2790
- }), me(() => {
2791
- S(c) && (S(_) ? (S(c).enableStateRestoration(), k()) : S(c).cleanup());
2810
+ }), de(() => {
2811
+ S(f) && (S(m) ? (S(f).enableStateRestoration(), R()) : S(f).cleanup());
2792
2812
  });
2793
- var H = {
2813
+ var O = {
2794
2814
  get visible() {
2795
2815
  return r();
2796
2816
  },
2797
- set visible(m = !1) {
2798
- r(m), we();
2817
+ set visible(g = !1) {
2818
+ r(g), ve();
2799
2819
  },
2800
2820
  get strategy() {
2801
2821
  return n();
2802
2822
  },
2803
- set strategy(m = "strikethrough") {
2804
- n(m), we();
2823
+ set strategy(g = "strikethrough") {
2824
+ n(g), ve();
2805
2825
  },
2806
2826
  get alwaysOn() {
2807
2827
  return i();
2808
2828
  },
2809
- set alwaysOn(m = !1) {
2810
- i(m), we();
2829
+ set alwaysOn(g = !1) {
2830
+ i(g), ve();
2811
2831
  },
2812
2832
  get buttonAlignment() {
2813
2833
  return s();
2814
2834
  },
2815
- set buttonAlignment(m = "inline") {
2816
- s(m), we();
2835
+ set buttonAlignment(g = "inline") {
2836
+ s(g), ve();
2817
2837
  },
2818
2838
  get elementStateKeys() {
2819
- return l();
2839
+ return a();
2820
2840
  },
2821
- set elementStateKeys(m = {}) {
2822
- l(m), we();
2841
+ set elementStateKeys(g = {}) {
2842
+ a(g), ve();
2843
+ },
2844
+ get elementIds() {
2845
+ return o();
2846
+ },
2847
+ set elementIds(g = void 0) {
2848
+ o(g), ve();
2823
2849
  }
2824
- }, ne = Bs();
2825
- return ws(ne, (m) => N(o, m), () => S(o)), Ln(t, ne), Ur(H);
2850
+ }, ie = Ks();
2851
+ return bs(ie, (g) => K(c, g), () => S(c)), $n(t, ie), Yr(O);
2826
2852
  }
2827
- Gs("pie-tool-answer-eliminator", $s(Fs, {
2853
+ Fs("pie-tool-answer-eliminator", Ts(Bs, {
2828
2854
  visible: {
2829
2855
  attribute: "visible",
2830
2856
  type: "Boolean"
@@ -2841,11 +2867,12 @@ Gs("pie-tool-answer-eliminator", $s(Fs, {
2841
2867
  attribute: "button-alignment",
2842
2868
  type: "String"
2843
2869
  },
2844
- elementStateKeys: { type: "Object" }
2845
- }, [], [], { mode: "open" }, Dn));
2846
- function Gs(t, e) {
2870
+ elementStateKeys: { type: "Object" },
2871
+ elementIds: { type: "Array" }
2872
+ }, [], [], { mode: "open" }, Fn));
2873
+ function Fs(t, e) {
2847
2874
  customElements.get(t) || customElements.define(t, e);
2848
2875
  }
2849
2876
  export {
2850
- Fs as default
2877
+ Bs as default
2851
2878
  };