@pie-players/pie-tool-answer-eliminator 0.3.74 → 1.0.0-beta.0

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