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