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