@pie-players/pie-tool-answer-eliminator 0.3.30 → 0.3.31
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/dist/tool-answer-eliminator.js +1124 -1044
- package/package.json +4 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as u } from "./defineProperty-CyepwRr5.js";
|
|
2
2
|
if (typeof window < "u") {
|
|
3
|
-
var
|
|
4
|
-
((
|
|
3
|
+
var Ir, Er;
|
|
4
|
+
((Ir = (Er = window).__svelte ?? (Er.__svelte = {})).v ?? (Ir.v = /* @__PURE__ */ new Set())).add("5");
|
|
5
5
|
}
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var kt = {}, M = Symbol(), Xs = Symbol("filename");
|
|
7
|
+
var ln = Array.isArray, cn = Array.prototype.indexOf, Ke = Array.prototype.includes, un = Array.from, Ct = Object.keys, $t = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, dn = Object.prototype, fn = Array.prototype, hn = Object.getPrototypeOf, kr = Object.isExtensible, pn = () => {
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function vn(e) {
|
|
10
10
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function gn() {
|
|
13
13
|
var e, t;
|
|
14
14
|
return {
|
|
15
15
|
promise: new Promise((r, i) => {
|
|
@@ -19,73 +19,73 @@ function dn() {
|
|
|
19
19
|
reject: t
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var Qs = 1 << 24, re = 1024, le = 2048, Fe = 4096, Jr = 8192, mn = 16384, Zr = 32768, Cr = 1 << 25, ei = 65536, Js = 1 << 17, Zs = 1 << 18, ut = 1 << 19, _n = 1 << 20, dt = 65536, $r = 1 << 21, ea = 1 << 22, ti = 1 << 23, nt = Symbol("$state"), ri = Symbol("legacy props"), yn = Symbol("proxy path"), lr = new class extends Error {
|
|
23
23
|
constructor(...t) {
|
|
24
24
|
super(...t), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
25
25
|
}
|
|
26
|
-
}(),
|
|
27
|
-
function
|
|
26
|
+
}(), ra = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
27
|
+
function bn(e) {
|
|
28
28
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function wn(e) {
|
|
31
31
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Tn() {
|
|
34
34
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function An(e) {
|
|
37
37
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Sn() {
|
|
40
40
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function In() {
|
|
43
43
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function En(e) {
|
|
46
46
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function kn() {
|
|
49
49
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Cn() {
|
|
52
52
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function $n() {
|
|
55
55
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ln() {
|
|
58
58
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function On() {
|
|
61
61
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function ii(e) {
|
|
64
64
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Rn() {
|
|
67
67
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
68
68
|
}
|
|
69
69
|
var Z = !1;
|
|
70
|
-
function
|
|
70
|
+
function pt(e) {
|
|
71
71
|
Z = e;
|
|
72
72
|
}
|
|
73
73
|
var N;
|
|
74
|
-
function
|
|
74
|
+
function at(e) {
|
|
75
75
|
if (e === null)
|
|
76
|
-
throw
|
|
76
|
+
throw ii(), kt;
|
|
77
77
|
return N = e;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
79
|
+
function ni() {
|
|
80
|
+
return at(/* @__PURE__ */ Ze(N));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Mn(e = 1) {
|
|
83
83
|
if (Z) {
|
|
84
|
-
for (var t = e, r = N; t--; ) r = /* @__PURE__ */
|
|
84
|
+
for (var t = e, r = N; t--; ) r = /* @__PURE__ */ Ze(r);
|
|
85
85
|
N = r;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Pn(e = !0) {
|
|
89
89
|
for (var t = 0, r = N; ; ) {
|
|
90
90
|
if (r.nodeType === 8) {
|
|
91
91
|
var i = r.data;
|
|
@@ -94,31 +94,31 @@ function $n(e = !0) {
|
|
|
94
94
|
t -= 1;
|
|
95
95
|
} else (i === "[" || i === "[!" || i[0] === "[" && !isNaN(Number(i.slice(1)))) && (t += 1);
|
|
96
96
|
}
|
|
97
|
-
var n = /* @__PURE__ */
|
|
97
|
+
var n = /* @__PURE__ */ Ze(r);
|
|
98
98
|
e && r.remove(), r = n;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function oi(e) {
|
|
102
102
|
return e === this.v;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function xn(e, t) {
|
|
105
105
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return !
|
|
107
|
+
function si(e) {
|
|
108
|
+
return !xn(e, this.v);
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
112
|
-
return e.label = t,
|
|
110
|
+
var we = !1, ft = !1;
|
|
111
|
+
function Lr(e, t) {
|
|
112
|
+
return e.label = t, Hn(e.v, t), e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return e?.[
|
|
114
|
+
function Hn(e, t) {
|
|
115
|
+
return e?.[yn]?.(t), e;
|
|
116
116
|
}
|
|
117
117
|
var L = null;
|
|
118
|
-
function
|
|
118
|
+
function Lt(e) {
|
|
119
119
|
L = e;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function ai(e, t = !1, r) {
|
|
122
122
|
L = {
|
|
123
123
|
p: L,
|
|
124
124
|
i: !1,
|
|
@@ -127,50 +127,50 @@ function ii(e, t = !1, r) {
|
|
|
127
127
|
s: e,
|
|
128
128
|
x: null,
|
|
129
129
|
r: A,
|
|
130
|
-
l:
|
|
130
|
+
l: ft && !t ? {
|
|
131
131
|
s: null,
|
|
132
132
|
u: null,
|
|
133
133
|
$: []
|
|
134
134
|
} : null
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function li(e) {
|
|
138
138
|
var t = L, r = t.e;
|
|
139
139
|
if (r !== null) {
|
|
140
140
|
t.e = null;
|
|
141
|
-
for (var i of r)
|
|
141
|
+
for (var i of r) Pi(i);
|
|
142
142
|
}
|
|
143
143
|
return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return !
|
|
145
|
+
function xt() {
|
|
146
|
+
return !ft || L !== null && L.l === null;
|
|
147
147
|
}
|
|
148
|
-
var
|
|
149
|
-
function
|
|
150
|
-
var e =
|
|
151
|
-
|
|
148
|
+
var $e = [];
|
|
149
|
+
function ci() {
|
|
150
|
+
var e = $e;
|
|
151
|
+
$e = [], vn(e);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (
|
|
155
|
-
var t =
|
|
153
|
+
function Ue(e) {
|
|
154
|
+
if ($e.length === 0 && !ot) {
|
|
155
|
+
var t = $e;
|
|
156
156
|
queueMicrotask(() => {
|
|
157
|
-
t ===
|
|
157
|
+
t === $e && ci();
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
$e.push(e);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
for (;
|
|
162
|
+
function Nn() {
|
|
163
|
+
for (; $e.length > 0; ) ci();
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ui(e) {
|
|
166
166
|
var t = A;
|
|
167
167
|
if (t === null)
|
|
168
|
-
return T.f |=
|
|
168
|
+
return T.f |= ti, e;
|
|
169
169
|
if (!(t.f & 32768) && !(t.f & 4))
|
|
170
170
|
throw e;
|
|
171
|
-
|
|
171
|
+
Ge(e, t);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Ge(e, t) {
|
|
174
174
|
for (; t !== null; ) {
|
|
175
175
|
if (t.f & 128) {
|
|
176
176
|
if (!(t.f & 32768)) throw e;
|
|
@@ -185,38 +185,38 @@ function je(e, t) {
|
|
|
185
185
|
}
|
|
186
186
|
throw e;
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var Dn = ~(le | Fe | re);
|
|
189
189
|
function O(e, t) {
|
|
190
|
-
e.f = e.f &
|
|
190
|
+
e.f = e.f & Dn | t;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
e.f & 512 || e.deps === null ? O(e, re) : O(e,
|
|
192
|
+
function cr(e) {
|
|
193
|
+
e.f & 512 || e.deps === null ? O(e, re) : O(e, Fe);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function di(e) {
|
|
196
196
|
if (e !== null)
|
|
197
197
|
for (const t of e)
|
|
198
|
-
!(t.f & 2) || !(t.f & 65536) || (t.f ^=
|
|
198
|
+
!(t.f & 2) || !(t.f & 65536) || (t.f ^= dt, di(t.deps));
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e),
|
|
200
|
+
function fi(e, t, r) {
|
|
201
|
+
e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), di(e.deps), O(e, re);
|
|
202
202
|
}
|
|
203
|
-
var
|
|
204
|
-
function
|
|
205
|
-
var t =
|
|
203
|
+
var Fn = !1, vt = !1;
|
|
204
|
+
function Bn(e) {
|
|
205
|
+
var t = vt;
|
|
206
206
|
try {
|
|
207
|
-
return
|
|
207
|
+
return vt = !1, [e(), vt];
|
|
208
208
|
} finally {
|
|
209
|
-
|
|
209
|
+
vt = t;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function hi(e, t) {
|
|
213
213
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
215
|
+
function ur(e, t) {
|
|
216
|
+
hi(e, t), t.add(e);
|
|
217
217
|
}
|
|
218
218
|
function w(e, t, r) {
|
|
219
|
-
|
|
219
|
+
hi(e, t), t.set(e, r);
|
|
220
220
|
}
|
|
221
221
|
function S(e, t, r) {
|
|
222
222
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
|
|
@@ -228,27 +228,27 @@ function a(e, t) {
|
|
|
228
228
|
function b(e, t, r) {
|
|
229
229
|
return e.set(S(e, t), r), r;
|
|
230
230
|
}
|
|
231
|
-
var
|
|
232
|
-
var
|
|
231
|
+
var pi, oe = /* @__PURE__ */ new Set(), I = null, Or = null, x = null, Ut = null, ot = !1, zt = !1, Ye = null, Ot = null, vi = 0;
|
|
232
|
+
var jn = 1, Rt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Je = class gi {
|
|
233
233
|
constructor() {
|
|
234
|
-
|
|
234
|
+
ur(this, F), u(this, "id", jn++), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), w(this, Rt, /* @__PURE__ */ new Set()), w(this, gt, /* @__PURE__ */ new Set()), w(this, tt, /* @__PURE__ */ new Set()), w(this, ke, /* @__PURE__ */ new Map()), w(this, ye, /* @__PURE__ */ new Map()), w(this, wt, null), w(this, Q, []), w(this, Yt, []), w(this, Xe, /* @__PURE__ */ new Set()), w(this, Re, /* @__PURE__ */ new Set()), w(this, be, /* @__PURE__ */ new Map()), w(this, Tt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), w(this, mt, !1), w(this, qe, /* @__PURE__ */ new Set());
|
|
235
235
|
}
|
|
236
236
|
skip_effect(t) {
|
|
237
|
-
a(
|
|
237
|
+
a(be, this).has(t) || a(be, this).set(t, {
|
|
238
238
|
d: [],
|
|
239
239
|
m: []
|
|
240
|
-
}), a(
|
|
240
|
+
}), a(Tt, this).delete(t);
|
|
241
241
|
}
|
|
242
242
|
unskip_effect(t, r = (i) => this.schedule(i)) {
|
|
243
|
-
var i = a(
|
|
243
|
+
var i = a(be, this).get(t);
|
|
244
244
|
if (i) {
|
|
245
|
-
a(
|
|
245
|
+
a(be, this).delete(t);
|
|
246
246
|
for (var n of i.d)
|
|
247
247
|
O(n, le), r(n);
|
|
248
248
|
for (n of i.m)
|
|
249
|
-
O(n,
|
|
249
|
+
O(n, Fe), r(n);
|
|
250
250
|
}
|
|
251
|
-
a(
|
|
251
|
+
a(Tt, this).add(t);
|
|
252
252
|
}
|
|
253
253
|
capture(t, r, i = !1) {
|
|
254
254
|
t.v !== M && !this.previous.has(t) && this.previous.set(t, t.v), t.f & 8388608 || (this.current.set(t, [r, i]), x?.set(t, r)), this.is_fork || (t.v = r);
|
|
@@ -262,90 +262,90 @@ var Hn = 1, $t = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap
|
|
|
262
262
|
flush() {
|
|
263
263
|
var t = null;
|
|
264
264
|
try {
|
|
265
|
-
|
|
265
|
+
zt = !0, I = this, S(F, this, dr).call(this);
|
|
266
266
|
} finally {
|
|
267
|
-
|
|
267
|
+
vi = 0, Ut = null, Ye = null, Ot = null, zt = !1, I = null, x = null, xe.clear();
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
discard() {
|
|
271
|
-
for (const t of a(
|
|
272
|
-
a(
|
|
271
|
+
for (const t of a(gt, this)) t(this);
|
|
272
|
+
a(gt, this).clear(), a(tt, this).clear(), oe.delete(this);
|
|
273
273
|
}
|
|
274
274
|
register_created_effect(t) {
|
|
275
|
-
a(
|
|
275
|
+
a(Yt, this).push(t);
|
|
276
276
|
}
|
|
277
277
|
increment(t, r) {
|
|
278
|
-
let i = a(
|
|
279
|
-
if (a(
|
|
280
|
-
let n = a(
|
|
281
|
-
a(
|
|
278
|
+
let i = a(ke, this).get(r) ?? 0;
|
|
279
|
+
if (a(ke, this).set(r, i + 1), t) {
|
|
280
|
+
let n = a(ye, this).get(r) ?? 0;
|
|
281
|
+
a(ye, this).set(r, n + 1);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
decrement(t, r, i) {
|
|
285
|
-
let n = a(
|
|
286
|
-
if (n === 1 ? a(
|
|
287
|
-
let
|
|
288
|
-
|
|
285
|
+
let n = a(ke, this).get(r) ?? 0;
|
|
286
|
+
if (n === 1 ? a(ke, this).delete(r) : a(ke, this).set(r, n - 1), t) {
|
|
287
|
+
let o = a(ye, this).get(r) ?? 0;
|
|
288
|
+
o === 1 ? a(ye, this).delete(r) : a(ye, this).set(r, o - 1);
|
|
289
289
|
}
|
|
290
|
-
a(
|
|
291
|
-
b(
|
|
290
|
+
a(mt, this) || i || (b(mt, this, !0), Ue(() => {
|
|
291
|
+
b(mt, this, !1), this.flush();
|
|
292
292
|
}));
|
|
293
293
|
}
|
|
294
294
|
transfer_effects(t, r) {
|
|
295
|
-
for (const i of t) a(
|
|
296
|
-
for (const i of r) a(
|
|
295
|
+
for (const i of t) a(Xe, this).add(i);
|
|
296
|
+
for (const i of r) a(Re, this).add(i);
|
|
297
297
|
t.clear(), r.clear();
|
|
298
298
|
}
|
|
299
299
|
oncommit(t) {
|
|
300
|
-
a(
|
|
300
|
+
a(Rt, this).add(t);
|
|
301
301
|
}
|
|
302
302
|
ondiscard(t) {
|
|
303
|
-
a(
|
|
303
|
+
a(gt, this).add(t);
|
|
304
304
|
}
|
|
305
305
|
on_fork_commit(t) {
|
|
306
|
-
a(
|
|
306
|
+
a(tt, this).add(t);
|
|
307
307
|
}
|
|
308
308
|
run_fork_commit_callbacks() {
|
|
309
|
-
for (const t of a(
|
|
310
|
-
a(
|
|
309
|
+
for (const t of a(tt, this)) t(this);
|
|
310
|
+
a(tt, this).clear();
|
|
311
311
|
}
|
|
312
312
|
settled() {
|
|
313
|
-
return (a(
|
|
313
|
+
return (a(wt, this) ?? b(wt, this, gn())).promise;
|
|
314
314
|
}
|
|
315
315
|
static ensure() {
|
|
316
316
|
if (I === null) {
|
|
317
|
-
const t = I = new
|
|
318
|
-
|
|
317
|
+
const t = I = new gi();
|
|
318
|
+
zt || (oe.add(I), ot || Ue(() => {
|
|
319
319
|
I === t && t.flush();
|
|
320
320
|
}));
|
|
321
321
|
}
|
|
322
322
|
return I;
|
|
323
323
|
}
|
|
324
324
|
apply() {
|
|
325
|
-
if (!
|
|
325
|
+
if (!we || !this.is_fork && oe.size === 1) {
|
|
326
326
|
x = null;
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
329
|
x = /* @__PURE__ */ new Map();
|
|
330
330
|
for (const [i, [n]] of this.current) x.set(i, n);
|
|
331
|
-
for (const i of
|
|
331
|
+
for (const i of oe)
|
|
332
332
|
if (!(i === this || i.is_fork)) {
|
|
333
333
|
var t = !1, r = !1;
|
|
334
|
-
if (i.id < this.id) for (const [n, [,
|
|
335
|
-
|
|
336
|
-
if (t && r) a(
|
|
337
|
-
else for (const [n,
|
|
334
|
+
if (i.id < this.id) for (const [n, [, o]] of i.current)
|
|
335
|
+
o || (t || (t = this.current.has(n)), r || (r = !this.current.has(n)));
|
|
336
|
+
if (t && r) a(qe, this).add(i);
|
|
337
|
+
else for (const [n, o] of i.previous) x.has(n) || x.set(n, o);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
schedule(t) {
|
|
341
|
-
if (
|
|
341
|
+
if (Ut = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
|
|
342
342
|
t.b.defer_effect(t);
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
345
|
for (var r = t; r.parent !== null; ) {
|
|
346
346
|
r = r.parent;
|
|
347
347
|
var i = r.f;
|
|
348
|
-
if (
|
|
348
|
+
if (Ye !== null && r === A && (we || (T === null || !(T.f & 2)) && !Fn))
|
|
349
349
|
return;
|
|
350
350
|
if (i & 96) {
|
|
351
351
|
if (!(i & 1024)) return;
|
|
@@ -355,14 +355,14 @@ var Hn = 1, $t = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap
|
|
|
355
355
|
a(Q, this).push(r);
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
|
|
359
|
-
function
|
|
360
|
-
return this.is_fork || a(
|
|
358
|
+
pi = Je;
|
|
359
|
+
function Xt() {
|
|
360
|
+
return this.is_fork || a(ye, this).size > 0;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
for (const r of a(
|
|
362
|
+
function zn() {
|
|
363
|
+
for (const r of a(qe, this)) for (const i of a(ye, r).keys()) {
|
|
364
364
|
for (var e = !1, t = i; t.parent !== null; ) {
|
|
365
|
-
if (a(
|
|
365
|
+
if (a(be, this).has(t)) {
|
|
366
366
|
e = !0;
|
|
367
367
|
break;
|
|
368
368
|
}
|
|
@@ -372,49 +372,49 @@ function Nn() {
|
|
|
372
372
|
}
|
|
373
373
|
return !1;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
if (
|
|
377
|
-
for (const
|
|
378
|
-
a(
|
|
379
|
-
for (const
|
|
380
|
-
O(
|
|
375
|
+
function dr() {
|
|
376
|
+
if (vi++ > 1e3 && (oe.delete(this), Gn()), !S(F, this, Xt).call(this)) {
|
|
377
|
+
for (const s of a(Xe, this))
|
|
378
|
+
a(Re, this).delete(s), O(s, le), this.schedule(s);
|
|
379
|
+
for (const s of a(Re, this))
|
|
380
|
+
O(s, Fe), this.schedule(s);
|
|
381
381
|
}
|
|
382
382
|
const e = a(Q, this);
|
|
383
383
|
b(Q, this, []), this.apply();
|
|
384
|
-
var t =
|
|
385
|
-
for (const
|
|
386
|
-
S(F, this,
|
|
384
|
+
var t = Ye = [], r = [], i = Ot = [];
|
|
385
|
+
for (const s of e) try {
|
|
386
|
+
S(F, this, mi).call(this, s, t, r);
|
|
387
387
|
} catch (l) {
|
|
388
|
-
throw
|
|
388
|
+
throw bi(s), l;
|
|
389
389
|
}
|
|
390
390
|
if (I = null, i.length > 0) {
|
|
391
|
-
var n =
|
|
392
|
-
for (const
|
|
391
|
+
var n = pi.ensure();
|
|
392
|
+
for (const s of i) n.schedule(s);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
395
|
-
S(F, this,
|
|
396
|
-
for (const [
|
|
394
|
+
if (Ye = null, Ot = null, S(F, this, Xt).call(this) || S(F, this, zn).call(this)) {
|
|
395
|
+
S(F, this, Qt).call(this, r), S(F, this, Qt).call(this, t);
|
|
396
|
+
for (const [s, l] of a(be, this)) yi(s, l);
|
|
397
397
|
} else {
|
|
398
|
-
a(
|
|
399
|
-
for (const
|
|
400
|
-
a(
|
|
398
|
+
a(ke, this).size === 0 && oe.delete(this), a(Xe, this).clear(), a(Re, this).clear();
|
|
399
|
+
for (const s of a(Rt, this)) s(this);
|
|
400
|
+
a(Rt, this).clear(), Or = this, Rr(r), Rr(t), Or = null, a(wt, this)?.resolve();
|
|
401
401
|
}
|
|
402
|
-
var
|
|
402
|
+
var o = I;
|
|
403
403
|
if (a(Q, this).length > 0) {
|
|
404
|
-
const
|
|
405
|
-
a(Q,
|
|
404
|
+
const s = o ?? (o = this);
|
|
405
|
+
a(Q, s).push(...a(Q, this).filter((l) => !a(Q, s).includes(l)));
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
o !== null && (oe.add(o), S(F, o, dr).call(o)), we && !oe.has(this) && S(F, this, Vn).call(this);
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function mi(e, t, r) {
|
|
410
410
|
e.f ^= re;
|
|
411
411
|
for (var i = e.first; i !== null; ) {
|
|
412
|
-
var n = i.f,
|
|
413
|
-
if (!(
|
|
414
|
-
|
|
415
|
-
var
|
|
416
|
-
if (
|
|
417
|
-
i =
|
|
412
|
+
var n = i.f, o = (n & 96) !== 0;
|
|
413
|
+
if (!(o && n & 1024 || n & 8192 || a(be, this).has(i)) && i.fn !== null) {
|
|
414
|
+
o ? i.f ^= re : n & 4 ? t.push(i) : we && n & 16777224 ? r.push(i) : ht(i) && (n & 16 && a(Re, this).add(i), Qe(i));
|
|
415
|
+
var s = i.first;
|
|
416
|
+
if (s !== null) {
|
|
417
|
+
i = s;
|
|
418
418
|
continue;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
@@ -428,11 +428,11 @@ function hi(e, t, r) {
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
function
|
|
432
|
-
for (var t = 0; t < e.length; t += 1)
|
|
431
|
+
function Qt(e) {
|
|
432
|
+
for (var t = 0; t < e.length; t += 1) fi(e[t], a(Xe, this), a(Re, this));
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
for (const d of
|
|
434
|
+
function Vn() {
|
|
435
|
+
for (const d of oe) {
|
|
436
436
|
var e = d.id < this.id, t = [];
|
|
437
437
|
for (const [f, [v, h]] of this.current) {
|
|
438
438
|
if (d.current.has(f)) {
|
|
@@ -446,67 +446,67 @@ function Dn() {
|
|
|
446
446
|
if (i.length === 0)
|
|
447
447
|
e && d.discard();
|
|
448
448
|
else if (t.length > 0) {
|
|
449
|
-
if (e) for (const f of a(
|
|
450
|
-
v.f & 4194320 ? d.schedule(v) : S(F, d,
|
|
449
|
+
if (e) for (const f of a(Tt, this)) d.unskip_effect(f, (v) => {
|
|
450
|
+
v.f & 4194320 ? d.schedule(v) : S(F, d, Qt).call(d, [v]);
|
|
451
451
|
});
|
|
452
452
|
d.activate();
|
|
453
|
-
var n = /* @__PURE__ */ new Set(),
|
|
454
|
-
for (var
|
|
455
|
-
|
|
453
|
+
var n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
454
|
+
for (var s of t) _i(s, i, n, o);
|
|
455
|
+
o = /* @__PURE__ */ new Map();
|
|
456
456
|
var l = [...d.current.keys()].filter((f) => this.current.has(f) ? this.current.get(f)[0] !== f : !0);
|
|
457
|
-
for (const f of a(
|
|
457
|
+
for (const f of a(Yt, this)) !(f.f & 155648) && fr(f, l, o) && (f.f & 4194320 ? (O(f, le), d.schedule(f)) : a(Xe, d).add(f));
|
|
458
458
|
if (a(Q, d).length > 0) {
|
|
459
459
|
d.apply();
|
|
460
|
-
for (var c of a(Q, d)) S(F, d,
|
|
460
|
+
for (var c of a(Q, d)) S(F, d, mi).call(d, c, [], []);
|
|
461
461
|
b(Q, d, []);
|
|
462
462
|
}
|
|
463
463
|
d.deactivate();
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
for (const d of
|
|
466
|
+
for (const d of oe) a(qe, d).has(this) && (a(qe, d).delete(this), a(qe, d).size === 0 && !S(F, d, Xt).call(d) && (d.activate(), S(F, d, dr).call(d)));
|
|
467
467
|
}
|
|
468
468
|
function ue(e) {
|
|
469
|
-
var t =
|
|
470
|
-
|
|
469
|
+
var t = ot;
|
|
470
|
+
ot = !0;
|
|
471
471
|
try {
|
|
472
472
|
var r;
|
|
473
473
|
for (e && (I !== null && !I.is_fork && I.flush(), r = e()); ; ) {
|
|
474
|
-
if (
|
|
474
|
+
if (Nn(), I === null) return r;
|
|
475
475
|
I.flush();
|
|
476
476
|
}
|
|
477
477
|
} finally {
|
|
478
|
-
|
|
478
|
+
ot = t;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Gn() {
|
|
482
482
|
if (0) {
|
|
483
483
|
var e;
|
|
484
484
|
for (const r of I.current.keys()) for (const [i, n] of r.updated ?? [])
|
|
485
485
|
var t;
|
|
486
486
|
}
|
|
487
487
|
try {
|
|
488
|
-
|
|
488
|
+
Sn();
|
|
489
489
|
} catch (r) {
|
|
490
|
-
|
|
490
|
+
Ge(r, Ut);
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
var de = null;
|
|
494
|
-
function
|
|
494
|
+
function Rr(e) {
|
|
495
495
|
var t = e.length;
|
|
496
496
|
if (t !== 0) {
|
|
497
497
|
for (var r = 0; r < t; ) {
|
|
498
498
|
var i = e[r++];
|
|
499
|
-
if (!(i.f & 24576) &&
|
|
500
|
-
|
|
499
|
+
if (!(i.f & 24576) && ht(i) && (de = /* @__PURE__ */ new Set(), Qe(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Hi(i), de?.size > 0)) {
|
|
500
|
+
xe.clear();
|
|
501
501
|
for (const n of de) {
|
|
502
502
|
if (n.f & 24576) continue;
|
|
503
|
-
const
|
|
504
|
-
let
|
|
505
|
-
for (;
|
|
506
|
-
de.has(
|
|
507
|
-
for (let l =
|
|
508
|
-
const c =
|
|
509
|
-
c.f & 24576 ||
|
|
503
|
+
const o = [n];
|
|
504
|
+
let s = n.parent;
|
|
505
|
+
for (; s !== null; )
|
|
506
|
+
de.has(s) && (de.delete(s), o.push(s)), s = s.parent;
|
|
507
|
+
for (let l = o.length - 1; l >= 0; l--) {
|
|
508
|
+
const c = o[l];
|
|
509
|
+
c.f & 24576 || Qe(c);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
de.clear();
|
|
@@ -515,73 +515,73 @@ function Cr(e) {
|
|
|
515
515
|
de = null;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function _i(e, t, r, i) {
|
|
519
519
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
520
520
|
for (const n of e.reactions) {
|
|
521
|
-
const
|
|
522
|
-
|
|
521
|
+
const o = n.f;
|
|
522
|
+
o & 2 ? _i(n, t, r, i) : o & 4194320 && !(o & 2048) && fr(n, t, i) && (O(n, le), hr(n));
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function fr(e, t, r) {
|
|
526
526
|
const i = r.get(e);
|
|
527
527
|
if (i !== void 0) return i;
|
|
528
528
|
if (e.deps !== null) for (const n of e.deps) {
|
|
529
|
-
if (
|
|
530
|
-
if (n.f & 2 &&
|
|
529
|
+
if (Ke.call(t, n)) return !0;
|
|
530
|
+
if (n.f & 2 && fr(n, t, r))
|
|
531
531
|
return r.set(n, !0), !0;
|
|
532
532
|
}
|
|
533
533
|
return r.set(e, !1), !1;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function hr(e) {
|
|
536
536
|
I.schedule(e);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function yi(e, t) {
|
|
539
539
|
if (!(e.f & 32 && e.f & 1024)) {
|
|
540
540
|
e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), O(e, re);
|
|
541
541
|
for (var r = e.first; r !== null; )
|
|
542
|
-
|
|
542
|
+
yi(r, t), r = r.next;
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function bi(e) {
|
|
546
546
|
O(e, re);
|
|
547
547
|
for (var t = e.first; t !== null; )
|
|
548
|
-
|
|
548
|
+
bi(t), t = t.next;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
let t = 0, r =
|
|
550
|
+
function Wn(e) {
|
|
551
|
+
let t = 0, r = Ht(0), i;
|
|
552
552
|
return () => {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
t -= 1, t === 0 && (i?.(), i = void 0,
|
|
553
|
+
mr() && (m(r), _r(() => (t === 0 && (i = Dt(() => e(() => st(r)))), t += 1, () => {
|
|
554
|
+
Ue(() => {
|
|
555
|
+
t -= 1, t === 0 && (i?.(), i = void 0, st(r));
|
|
556
556
|
});
|
|
557
557
|
})));
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function
|
|
562
|
-
new
|
|
560
|
+
var qn = ei | ut;
|
|
561
|
+
function Kn(e, t, r, i) {
|
|
562
|
+
new Un(e, t, r, i);
|
|
563
563
|
}
|
|
564
|
-
var ee = /* @__PURE__ */ new WeakMap(),
|
|
564
|
+
var ee = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakSet(), Un = class {
|
|
565
565
|
constructor(e, t, r, i) {
|
|
566
|
-
|
|
567
|
-
b(
|
|
568
|
-
}))), b(ee, this, e), b(ne, this, t), b(
|
|
569
|
-
var
|
|
570
|
-
|
|
571
|
-
}), this.parent = A.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), b(q, this,
|
|
566
|
+
ur(this, P), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), w(this, ee, void 0), w(this, Jt, Z ? N : null), w(this, ne, void 0), w(this, lt, void 0), w(this, q, void 0), w(this, se, null), w(this, V, null), w(this, X, null), w(this, Me, null), w(this, ze, 0), w(this, Pe, 0), w(this, _t, !1), w(this, Zt, /* @__PURE__ */ new Set()), w(this, er, /* @__PURE__ */ new Set()), w(this, Ie, null), w(this, Mr, Wn(() => (b(Ie, this, Ht(a(ze, this))), () => {
|
|
567
|
+
b(Ie, this, null);
|
|
568
|
+
}))), b(ee, this, e), b(ne, this, t), b(lt, this, (n) => {
|
|
569
|
+
var o = A;
|
|
570
|
+
o.b = this, o.f |= 128, r(n);
|
|
571
|
+
}), this.parent = A.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), b(q, this, ho(() => {
|
|
572
572
|
if (Z) {
|
|
573
|
-
const n = a(
|
|
574
|
-
|
|
575
|
-
const
|
|
573
|
+
const n = a(Jt, this);
|
|
574
|
+
ni();
|
|
575
|
+
const o = n.data === "[!";
|
|
576
576
|
if (n.data.startsWith("[?")) {
|
|
577
|
-
const
|
|
578
|
-
S(P, this,
|
|
579
|
-
} else
|
|
580
|
-
} else S(P, this,
|
|
581
|
-
},
|
|
577
|
+
const s = JSON.parse(n.data.slice(2));
|
|
578
|
+
S(P, this, Xn).call(this, s);
|
|
579
|
+
} else o ? S(P, this, Qn).call(this) : S(P, this, Yn).call(this);
|
|
580
|
+
} else S(P, this, wi).call(this);
|
|
581
|
+
}, qn)), Z && b(ee, this, N);
|
|
582
582
|
}
|
|
583
583
|
defer_effect(e) {
|
|
584
|
-
|
|
584
|
+
fi(e, a(Zt, this), a(er, this));
|
|
585
585
|
}
|
|
586
586
|
is_rendered() {
|
|
587
587
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
@@ -590,134 +590,134 @@ var ee = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), ne =
|
|
|
590
590
|
return !!a(ne, this).pending;
|
|
591
591
|
}
|
|
592
592
|
update_pending_count(e, t) {
|
|
593
|
-
S(P, this,
|
|
594
|
-
b(
|
|
593
|
+
S(P, this, Ti).call(this, e, t), b(ze, this, a(ze, this) + e), !(!a(Ie, this) || a(_t, this)) && (b(_t, this, !0), Ue(() => {
|
|
594
|
+
b(_t, this, !1), a(Ie, this) && Ei(a(Ie, this), a(ze, this));
|
|
595
595
|
}));
|
|
596
596
|
}
|
|
597
597
|
get_effect_pending() {
|
|
598
|
-
return a(
|
|
598
|
+
return a(Mr, this).call(this), m(a(Ie, this));
|
|
599
599
|
}
|
|
600
600
|
error(e) {
|
|
601
601
|
if (!a(ne, this).onerror && !a(ne, this).failed) throw e;
|
|
602
|
-
I?.is_fork ? (a(
|
|
603
|
-
S(P, this,
|
|
604
|
-
})) : S(P, this,
|
|
602
|
+
I?.is_fork ? (a(se, this) && I.skip_effect(a(se, this)), a(V, this) && I.skip_effect(a(V, this)), a(X, this) && I.skip_effect(a(X, this)), I.on_fork_commit(() => {
|
|
603
|
+
S(P, this, Pr).call(this, e);
|
|
604
|
+
})) : S(P, this, Pr).call(this, e);
|
|
605
605
|
}
|
|
606
606
|
};
|
|
607
|
-
function
|
|
607
|
+
function Yn() {
|
|
608
608
|
try {
|
|
609
|
-
b(
|
|
609
|
+
b(se, this, De(() => a(lt, this).call(this, a(ee, this))));
|
|
610
610
|
} catch (e) {
|
|
611
611
|
this.error(e);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Xn(e) {
|
|
615
615
|
const t = a(ne, this).failed;
|
|
616
|
-
t && b(X, this,
|
|
616
|
+
t && b(X, this, De(() => {
|
|
617
617
|
t(a(ee, this), () => e, () => () => {
|
|
618
618
|
});
|
|
619
619
|
}));
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function Qn() {
|
|
622
622
|
const e = a(ne, this).pending;
|
|
623
|
-
e && (this.is_pending = !0, b(
|
|
624
|
-
var t = b(
|
|
625
|
-
t.append(r), b(
|
|
626
|
-
b(
|
|
627
|
-
}), S(P, this,
|
|
623
|
+
e && (this.is_pending = !0, b(V, this, De(() => e(a(ee, this)))), Ue(() => {
|
|
624
|
+
var t = b(Me, this, document.createDocumentFragment()), r = Oi();
|
|
625
|
+
t.append(r), b(se, this, S(P, this, tr).call(this, () => De(() => a(lt, this).call(this, r)))), a(Pe, this) === 0 && (a(ee, this).before(t), b(Me, this, null), Nt(a(V, this), () => {
|
|
626
|
+
b(V, this, null);
|
|
627
|
+
}), S(P, this, pr).call(this, I));
|
|
628
628
|
}));
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function wi() {
|
|
631
631
|
try {
|
|
632
|
-
if (this.is_pending = this.has_pending_snippet(), b(
|
|
633
|
-
a(
|
|
634
|
-
})), a(
|
|
635
|
-
var e = b(
|
|
636
|
-
|
|
632
|
+
if (this.is_pending = this.has_pending_snippet(), b(Pe, this, 0), b(ze, this, 0), b(se, this, De(() => {
|
|
633
|
+
a(lt, this).call(this, a(ee, this));
|
|
634
|
+
})), a(Pe, this) > 0) {
|
|
635
|
+
var e = b(Me, this, document.createDocumentFragment());
|
|
636
|
+
go(a(se, this), e);
|
|
637
637
|
const t = a(ne, this).pending;
|
|
638
|
-
b(
|
|
639
|
-
} else S(P, this,
|
|
638
|
+
b(V, this, De(() => t(a(ee, this))));
|
|
639
|
+
} else S(P, this, pr).call(this, I);
|
|
640
640
|
} catch (t) {
|
|
641
641
|
this.error(t);
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
this.is_pending = !1, e.transfer_effects(a(
|
|
644
|
+
function pr(e) {
|
|
645
|
+
this.is_pending = !1, e.transfer_effects(a(Zt, this), a(er, this));
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function tr(e) {
|
|
648
648
|
var t = A, r = T, i = L;
|
|
649
|
-
|
|
649
|
+
Te(a(q, this)), ae(a(q, this)), Lt(a(q, this).ctx);
|
|
650
650
|
try {
|
|
651
|
-
return
|
|
651
|
+
return Je.ensure(), e();
|
|
652
652
|
} catch (n) {
|
|
653
|
-
return
|
|
653
|
+
return ui(n), null;
|
|
654
654
|
} finally {
|
|
655
|
-
|
|
655
|
+
Te(t), ae(r), Lt(i);
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Ti(e, t) {
|
|
659
659
|
if (!this.has_pending_snippet()) {
|
|
660
660
|
if (this.parent) {
|
|
661
661
|
var r;
|
|
662
|
-
S(P, r = this.parent,
|
|
662
|
+
S(P, r = this.parent, Ti).call(r, e, t);
|
|
663
663
|
}
|
|
664
664
|
return;
|
|
665
665
|
}
|
|
666
|
-
b(
|
|
667
|
-
b(
|
|
668
|
-
}), a(
|
|
666
|
+
b(Pe, this, a(Pe, this) + e), a(Pe, this) === 0 && (S(P, this, pr).call(this, t), a(V, this) && Nt(a(V, this), () => {
|
|
667
|
+
b(V, this, null);
|
|
668
|
+
}), a(Me, this) && (a(ee, this).before(a(Me, this)), b(Me, this, null)));
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
a(
|
|
670
|
+
function Pr(e) {
|
|
671
|
+
a(se, this) && (te(a(se, this)), b(se, this, null)), a(V, this) && (te(a(V, this)), b(V, this, null)), a(X, this) && (te(a(X, this)), b(X, this, null)), Z && (at(a(Jt, this)), Mn(), at(Pn()));
|
|
672
672
|
var t = a(ne, this).onerror;
|
|
673
673
|
let r = a(ne, this).failed;
|
|
674
674
|
var i = !1, n = !1;
|
|
675
|
-
const
|
|
675
|
+
const o = () => {
|
|
676
676
|
if (i) {
|
|
677
|
-
|
|
677
|
+
Rn();
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
|
-
i = !0, n &&
|
|
680
|
+
i = !0, n && Ln(), a(X, this) !== null && Nt(a(X, this), () => {
|
|
681
681
|
b(X, this, null);
|
|
682
|
-
}), S(P, this,
|
|
683
|
-
S(P, this,
|
|
682
|
+
}), S(P, this, tr).call(this, () => {
|
|
683
|
+
S(P, this, wi).call(this);
|
|
684
684
|
});
|
|
685
|
-
},
|
|
685
|
+
}, s = (l) => {
|
|
686
686
|
try {
|
|
687
|
-
n = !0, t?.(l,
|
|
687
|
+
n = !0, t?.(l, o), n = !1;
|
|
688
688
|
} catch (c) {
|
|
689
|
-
|
|
689
|
+
Ge(c, a(q, this) && a(q, this).parent);
|
|
690
690
|
}
|
|
691
|
-
r && b(X, this, S(P, this,
|
|
691
|
+
r && b(X, this, S(P, this, tr).call(this, () => {
|
|
692
692
|
try {
|
|
693
|
-
return
|
|
693
|
+
return De(() => {
|
|
694
694
|
var c = A;
|
|
695
|
-
c.b = this, c.f |= 128, r(a(ee, this), () => l, () =>
|
|
695
|
+
c.b = this, c.f |= 128, r(a(ee, this), () => l, () => o);
|
|
696
696
|
});
|
|
697
697
|
} catch (c) {
|
|
698
|
-
return
|
|
698
|
+
return Ge(c, a(q, this).parent), null;
|
|
699
699
|
}
|
|
700
700
|
}));
|
|
701
701
|
};
|
|
702
|
-
|
|
702
|
+
Ue(() => {
|
|
703
703
|
var l;
|
|
704
704
|
try {
|
|
705
705
|
l = this.transform_error(e);
|
|
706
706
|
} catch (c) {
|
|
707
|
-
|
|
707
|
+
Ge(c, a(q, this) && a(q, this).parent);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
l !== null && typeof l == "object" && typeof l.then == "function" ? l.then(
|
|
710
|
+
l !== null && typeof l == "object" && typeof l.then == "function" ? l.then(s, (c) => Ge(c, a(q, this) && a(q, this).parent)) : s(l);
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
713
|
// @__NO_SIDE_EFFECTS__
|
|
714
|
-
function
|
|
714
|
+
function vr(e) {
|
|
715
715
|
var t = 2 | le;
|
|
716
|
-
return A !== null && (A.f |=
|
|
716
|
+
return A !== null && (A.f |= ut), {
|
|
717
717
|
ctx: L,
|
|
718
718
|
deps: null,
|
|
719
719
|
effects: null,
|
|
720
|
-
equals:
|
|
720
|
+
equals: oi,
|
|
721
721
|
f: t,
|
|
722
722
|
fn: e,
|
|
723
723
|
reactions: null,
|
|
@@ -729,61 +729,61 @@ function dr(e) {
|
|
|
729
729
|
};
|
|
730
730
|
}
|
|
731
731
|
// @__NO_SIDE_EFFECTS__
|
|
732
|
-
function
|
|
733
|
-
const t = /* @__PURE__ */
|
|
734
|
-
return
|
|
732
|
+
function xr(e) {
|
|
733
|
+
const t = /* @__PURE__ */ vr(e);
|
|
734
|
+
return we || Di(t), t;
|
|
735
735
|
}
|
|
736
736
|
// @__NO_SIDE_EFFECTS__
|
|
737
|
-
function
|
|
738
|
-
const t = /* @__PURE__ */
|
|
739
|
-
return t.equals =
|
|
737
|
+
function Jn(e) {
|
|
738
|
+
const t = /* @__PURE__ */ vr(e);
|
|
739
|
+
return t.equals = si, t;
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Zn(e) {
|
|
742
742
|
var t = e.effects;
|
|
743
743
|
if (t !== null) {
|
|
744
744
|
e.effects = null;
|
|
745
745
|
for (var r = 0; r < t.length; r += 1) te(t[r]);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function gr(e) {
|
|
749
749
|
var t, r = A, i = e.parent;
|
|
750
750
|
if (!fe && i !== null && i.f & 24576)
|
|
751
|
-
return
|
|
752
|
-
if (
|
|
751
|
+
return On(), e.v;
|
|
752
|
+
if (Te(i), 0)
|
|
753
753
|
try {
|
|
754
754
|
} finally {
|
|
755
755
|
}
|
|
756
756
|
else try {
|
|
757
|
-
e.f &= ~
|
|
757
|
+
e.f &= ~dt, Zn(e), t = zi(e);
|
|
758
758
|
} finally {
|
|
759
|
-
|
|
759
|
+
Te(r);
|
|
760
760
|
}
|
|
761
761
|
return t;
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
var t =
|
|
765
|
-
if (!e.equals(t) && (e.wv =
|
|
763
|
+
function Ai(e) {
|
|
764
|
+
var t = gr(e);
|
|
765
|
+
if (!e.equals(t) && (e.wv = Bi(), (!I?.is_fork || e.deps === null) && (I !== null ? I.capture(e, t, !0) : e.v = t, e.deps === null))) {
|
|
766
766
|
O(e, re);
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
769
|
-
fe || (x !== null ? (
|
|
769
|
+
fe || (x !== null ? (mr() || I?.is_fork) && x.set(e, t) : cr(e));
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function eo(e) {
|
|
772
772
|
if (e.effects !== null)
|
|
773
|
-
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
773
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(lr), t.teardown = pn, t.ac = null, ct(t, 0), yr(t));
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Si(e) {
|
|
776
776
|
if (e.effects !== null)
|
|
777
|
-
for (const t of e.effects) t.teardown &&
|
|
777
|
+
for (const t of e.effects) t.teardown && Qe(t);
|
|
778
778
|
}
|
|
779
|
-
var
|
|
780
|
-
var
|
|
781
|
-
function
|
|
779
|
+
var rr = /* @__PURE__ */ new Set(), xe = /* @__PURE__ */ new Map();
|
|
780
|
+
var Ii = !1;
|
|
781
|
+
function Ht(e, t) {
|
|
782
782
|
var r = {
|
|
783
783
|
f: 0,
|
|
784
784
|
v: e,
|
|
785
785
|
reactions: null,
|
|
786
|
-
equals:
|
|
786
|
+
equals: oi,
|
|
787
787
|
rv: 0,
|
|
788
788
|
wv: 0
|
|
789
789
|
};
|
|
@@ -791,121 +791,121 @@ function Mt(e, t) {
|
|
|
791
791
|
}
|
|
792
792
|
// @__NO_SIDE_EFFECTS__
|
|
793
793
|
function H(e, t) {
|
|
794
|
-
const r =
|
|
795
|
-
return
|
|
794
|
+
const r = Ht(e, t);
|
|
795
|
+
return Di(r), r;
|
|
796
796
|
}
|
|
797
797
|
// @__NO_SIDE_EFFECTS__
|
|
798
|
-
function
|
|
799
|
-
const i =
|
|
800
|
-
if (t || (i.equals =
|
|
798
|
+
function to(e, t = !1, r = !0) {
|
|
799
|
+
const i = Ht(e);
|
|
800
|
+
if (t || (i.equals = si), ft && r && L !== null && L.l !== null) {
|
|
801
801
|
var n;
|
|
802
802
|
((n = L.l).s ?? (n.s = [])).push(i);
|
|
803
803
|
}
|
|
804
804
|
return i;
|
|
805
805
|
}
|
|
806
806
|
function $(e, t, r = !1) {
|
|
807
|
-
T !== null && (!J || T.f & 131072) &&
|
|
808
|
-
let i = r ?
|
|
809
|
-
return
|
|
807
|
+
T !== null && (!J || T.f & 131072) && xt() && T.f & 4325394 && (K === null || !Ke.call(K, e)) && $n();
|
|
808
|
+
let i = r ? We(t) : t;
|
|
809
|
+
return Ei(e, i, Ot);
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Ei(e, t, r = null) {
|
|
812
812
|
if (!e.equals(t)) {
|
|
813
|
-
|
|
814
|
-
var i =
|
|
813
|
+
xe.set(e, fe ? t : e.v);
|
|
814
|
+
var i = Je.ensure();
|
|
815
815
|
if (i.capture(e, t), e.f & 2) {
|
|
816
816
|
const n = e;
|
|
817
|
-
e.f & 2048 &&
|
|
817
|
+
e.f & 2048 && gr(n), x === null && cr(n);
|
|
818
818
|
}
|
|
819
|
-
e.wv =
|
|
819
|
+
e.wv = Bi(), ki(e, le, r), xt() && A !== null && A.f & 1024 && !(A.f & 96) && (W === null ? _o([e]) : W.push(e)), !i.is_fork && rr.size > 0 && !Ii && ro();
|
|
820
820
|
}
|
|
821
821
|
return t;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
|
|
825
|
-
for (const e of
|
|
826
|
-
e.f & 1024 && O(e,
|
|
827
|
-
|
|
823
|
+
function ro() {
|
|
824
|
+
Ii = !1;
|
|
825
|
+
for (const e of rr)
|
|
826
|
+
e.f & 1024 && O(e, Fe), ht(e) && Qe(e);
|
|
827
|
+
rr.clear();
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function st(e) {
|
|
830
830
|
$(e, e.v + 1);
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function ki(e, t, r) {
|
|
833
833
|
var i = e.reactions;
|
|
834
834
|
if (i !== null)
|
|
835
|
-
for (var n =
|
|
836
|
-
var l = i[
|
|
835
|
+
for (var n = xt(), o = i.length, s = 0; s < o; s++) {
|
|
836
|
+
var l = i[s], c = l.f;
|
|
837
837
|
if (!(!n && l === A)) {
|
|
838
838
|
var d = (c & le) === 0;
|
|
839
839
|
if (d && O(l, t), c & 2) {
|
|
840
840
|
var f = l;
|
|
841
|
-
x?.delete(f), c & 65536 || (c & 512 && (l.f |=
|
|
841
|
+
x?.delete(f), c & 65536 || (c & 512 && (l.f |= dt), ki(f, Fe, r));
|
|
842
842
|
} else if (d) {
|
|
843
843
|
var v = l;
|
|
844
|
-
c & 16 && de !== null && de.add(v), r !== null ? r.push(v) :
|
|
844
|
+
c & 16 && de !== null && de.add(v), r !== null ? r.push(v) : hr(v);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
var
|
|
850
|
-
function
|
|
851
|
-
if (typeof e != "object" || e === null ||
|
|
852
|
-
const t =
|
|
853
|
-
if (t !==
|
|
854
|
-
var r = /* @__PURE__ */ new Map(), i =
|
|
855
|
-
if (
|
|
856
|
-
var h = T,
|
|
857
|
-
ae(null),
|
|
849
|
+
var io = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
850
|
+
function We(e) {
|
|
851
|
+
if (typeof e != "object" || e === null || nt in e) return e;
|
|
852
|
+
const t = hn(e);
|
|
853
|
+
if (t !== dn && t !== fn) return e;
|
|
854
|
+
var r = /* @__PURE__ */ new Map(), i = ln(e), n = /* @__PURE__ */ H(0), o = null, s = He, l = (v) => {
|
|
855
|
+
if (He === s) return v();
|
|
856
|
+
var h = T, g = He;
|
|
857
|
+
ae(null), Dr(s);
|
|
858
858
|
var p = v();
|
|
859
|
-
return ae(h),
|
|
859
|
+
return ae(h), Dr(g), p;
|
|
860
860
|
};
|
|
861
|
-
i && r.set("length", /* @__PURE__ */ H(e.length,
|
|
861
|
+
i && r.set("length", /* @__PURE__ */ H(e.length, o));
|
|
862
862
|
var c = "";
|
|
863
863
|
let d = !1;
|
|
864
864
|
function f(v) {
|
|
865
865
|
if (!d) {
|
|
866
|
-
d = !0, c = v,
|
|
867
|
-
for (const [h,
|
|
866
|
+
d = !0, c = v, Lr(n, `${c} version`);
|
|
867
|
+
for (const [h, g] of r) Lr(g, no(c, h));
|
|
868
868
|
d = !1;
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
return new Proxy(e, {
|
|
872
|
-
defineProperty(v, h,
|
|
873
|
-
(!("value" in
|
|
872
|
+
defineProperty(v, h, g) {
|
|
873
|
+
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && kn();
|
|
874
874
|
var p = r.get(h);
|
|
875
875
|
return p === void 0 ? l(() => {
|
|
876
|
-
var y = /* @__PURE__ */ H(
|
|
876
|
+
var y = /* @__PURE__ */ H(g.value, o);
|
|
877
877
|
return r.set(h, y), y;
|
|
878
|
-
}) : $(p,
|
|
878
|
+
}) : $(p, g.value, !0), !0;
|
|
879
879
|
},
|
|
880
880
|
deleteProperty(v, h) {
|
|
881
|
-
var
|
|
882
|
-
if (
|
|
881
|
+
var g = r.get(h);
|
|
882
|
+
if (g === void 0) {
|
|
883
883
|
if (h in v) {
|
|
884
|
-
const p = l(() => /* @__PURE__ */ H(M,
|
|
885
|
-
r.set(h, p),
|
|
884
|
+
const p = l(() => /* @__PURE__ */ H(M, o));
|
|
885
|
+
r.set(h, p), st(n);
|
|
886
886
|
}
|
|
887
887
|
} else
|
|
888
|
-
$(
|
|
888
|
+
$(g, M), st(n);
|
|
889
889
|
return !0;
|
|
890
890
|
},
|
|
891
|
-
get(v, h,
|
|
892
|
-
if (h ===
|
|
891
|
+
get(v, h, g) {
|
|
892
|
+
if (h === nt) return e;
|
|
893
893
|
var p = r.get(h), y = h in v;
|
|
894
|
-
if (p === void 0 && (!y ||
|
|
895
|
-
var E = /* @__PURE__ */ H(
|
|
894
|
+
if (p === void 0 && (!y || Oe(v, h)?.writable) && (p = l(() => {
|
|
895
|
+
var E = /* @__PURE__ */ H(We(y ? v[h] : M), o);
|
|
896
896
|
return E;
|
|
897
897
|
}), r.set(h, p)), p !== void 0) {
|
|
898
|
-
var _ =
|
|
898
|
+
var _ = m(p);
|
|
899
899
|
return _ === M ? void 0 : _;
|
|
900
900
|
}
|
|
901
|
-
return Reflect.get(v, h,
|
|
901
|
+
return Reflect.get(v, h, g);
|
|
902
902
|
},
|
|
903
903
|
getOwnPropertyDescriptor(v, h) {
|
|
904
|
-
var
|
|
905
|
-
if (
|
|
904
|
+
var g = Reflect.getOwnPropertyDescriptor(v, h);
|
|
905
|
+
if (g && "value" in g) {
|
|
906
906
|
var p = r.get(h);
|
|
907
|
-
p && (
|
|
908
|
-
} else if (
|
|
907
|
+
p && (g.value = m(p));
|
|
908
|
+
} else if (g === void 0) {
|
|
909
909
|
var y = r.get(h), _ = y?.v;
|
|
910
910
|
if (y !== void 0 && _ !== M) return {
|
|
911
911
|
enumerable: !0,
|
|
@@ -914,101 +914,101 @@ function Ve(e) {
|
|
|
914
914
|
writable: !0
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
|
-
return
|
|
917
|
+
return g;
|
|
918
918
|
},
|
|
919
919
|
has(v, h) {
|
|
920
|
-
if (h ===
|
|
921
|
-
var
|
|
922
|
-
return (
|
|
923
|
-
var y = /* @__PURE__ */ H(p ?
|
|
920
|
+
if (h === nt) return !0;
|
|
921
|
+
var g = r.get(h), p = g !== void 0 && g.v !== M || Reflect.has(v, h);
|
|
922
|
+
return (g !== void 0 || A !== null && (!p || Oe(v, h)?.writable)) && (g === void 0 && (g = l(() => {
|
|
923
|
+
var y = /* @__PURE__ */ H(p ? We(v[h]) : M, o);
|
|
924
924
|
return y;
|
|
925
|
-
}), r.set(h,
|
|
925
|
+
}), r.set(h, g)), m(g) === M) ? !1 : p;
|
|
926
926
|
},
|
|
927
|
-
set(v, h,
|
|
927
|
+
set(v, h, g, p) {
|
|
928
928
|
var y = r.get(h), _ = h in v;
|
|
929
|
-
if (i && h === "length") for (var E =
|
|
929
|
+
if (i && h === "length") for (var E = g; E < y.v; E += 1) {
|
|
930
930
|
var j = r.get(E + "");
|
|
931
|
-
j !== void 0 ? $(j, M) : E in v && (j = l(() => /* @__PURE__ */ H(M,
|
|
931
|
+
j !== void 0 ? $(j, M) : E in v && (j = l(() => /* @__PURE__ */ H(M, o)), r.set(E + "", j));
|
|
932
932
|
}
|
|
933
933
|
if (y === void 0)
|
|
934
|
-
(!_ ||
|
|
934
|
+
(!_ || Oe(v, h)?.writable) && (y = l(() => /* @__PURE__ */ H(void 0, o)), $(y, We(g)), r.set(h, y));
|
|
935
935
|
else {
|
|
936
936
|
_ = y.v !== M;
|
|
937
|
-
var C = l(() =>
|
|
937
|
+
var C = l(() => We(g));
|
|
938
938
|
$(y, C);
|
|
939
939
|
}
|
|
940
940
|
var U = Reflect.getOwnPropertyDescriptor(v, h);
|
|
941
|
-
if (U?.set && U.set.call(p,
|
|
941
|
+
if (U?.set && U.set.call(p, g), !_) {
|
|
942
942
|
if (i && typeof h == "string") {
|
|
943
|
-
var
|
|
944
|
-
Number.isInteger(
|
|
943
|
+
var Se = r.get("length"), et = Number(h);
|
|
944
|
+
Number.isInteger(et) && et >= Se.v && $(Se, et + 1);
|
|
945
945
|
}
|
|
946
|
-
|
|
946
|
+
st(n);
|
|
947
947
|
}
|
|
948
948
|
return !0;
|
|
949
949
|
},
|
|
950
950
|
ownKeys(v) {
|
|
951
|
-
|
|
951
|
+
m(n);
|
|
952
952
|
var h = Reflect.ownKeys(v).filter((y) => {
|
|
953
953
|
var _ = r.get(y);
|
|
954
954
|
return _ === void 0 || _.v !== M;
|
|
955
955
|
});
|
|
956
|
-
for (var [
|
|
956
|
+
for (var [g, p] of r) p.v !== M && !(g in v) && h.push(g);
|
|
957
957
|
return h;
|
|
958
958
|
},
|
|
959
959
|
setPrototypeOf() {
|
|
960
|
-
|
|
960
|
+
Cn();
|
|
961
961
|
}
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` :
|
|
964
|
+
function no(e, t) {
|
|
965
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : io.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
966
966
|
}
|
|
967
|
-
var
|
|
968
|
-
function
|
|
969
|
-
if (
|
|
970
|
-
|
|
967
|
+
var Hr, oo, Ci, $i, Li;
|
|
968
|
+
function ir() {
|
|
969
|
+
if (Hr === void 0) {
|
|
970
|
+
Hr = window, oo = document, Ci = /Firefox/.test(navigator.userAgent);
|
|
971
971
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
972
|
-
|
|
972
|
+
$i = Oe(t, "firstChild").get, Li = Oe(t, "nextSibling").get, kr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), kr(r) && (r.__t = void 0);
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function Oi(e = "") {
|
|
976
976
|
return document.createTextNode(e);
|
|
977
977
|
}
|
|
978
978
|
// @__NO_SIDE_EFFECTS__
|
|
979
|
-
function
|
|
980
|
-
return
|
|
979
|
+
function nr(e) {
|
|
980
|
+
return $i.call(e);
|
|
981
981
|
}
|
|
982
982
|
// @__NO_SIDE_EFFECTS__
|
|
983
|
-
function
|
|
984
|
-
return
|
|
983
|
+
function Ze(e) {
|
|
984
|
+
return Li.call(e);
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function so(e) {
|
|
987
987
|
e.textContent = "";
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function Ri(e, t, r) {
|
|
990
990
|
let i = r ? { is: r } : void 0;
|
|
991
991
|
return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, i);
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Mi(e) {
|
|
994
994
|
var t = T, r = A;
|
|
995
|
-
ae(null),
|
|
995
|
+
ae(null), Te(null);
|
|
996
996
|
try {
|
|
997
997
|
return e();
|
|
998
998
|
} finally {
|
|
999
|
-
ae(t),
|
|
999
|
+
ae(t), Te(r);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
A === null && (T === null &&
|
|
1002
|
+
function ao(e) {
|
|
1003
|
+
A === null && (T === null && An(e), Tn()), fe && wn(e);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function lo(e, t) {
|
|
1006
1006
|
var r = t.last;
|
|
1007
1007
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Be(e, t) {
|
|
1010
1010
|
var r = A;
|
|
1011
|
-
r !== null && r.f & 8192 && (e |=
|
|
1011
|
+
r !== null && r.f & 8192 && (e |= Jr);
|
|
1012
1012
|
var i = {
|
|
1013
1013
|
ctx: L,
|
|
1014
1014
|
deps: null,
|
|
@@ -1027,88 +1027,88 @@ function Ne(e, t) {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
I?.register_created_effect(i);
|
|
1029
1029
|
var n = i;
|
|
1030
|
-
if (e & 4)
|
|
1030
|
+
if (e & 4) Ye !== null ? Ye.push(i) : Je.ensure().schedule(i);
|
|
1031
1031
|
else if (t !== null) {
|
|
1032
1032
|
try {
|
|
1033
|
-
|
|
1034
|
-
} catch (
|
|
1035
|
-
throw te(i),
|
|
1033
|
+
Qe(i);
|
|
1034
|
+
} catch (s) {
|
|
1035
|
+
throw te(i), s;
|
|
1036
1036
|
}
|
|
1037
|
-
n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |=
|
|
1037
|
+
n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= ei));
|
|
1038
1038
|
}
|
|
1039
|
-
if (n !== null && (n.parent = r, r !== null &&
|
|
1040
|
-
var
|
|
1041
|
-
(
|
|
1039
|
+
if (n !== null && (n.parent = r, r !== null && lo(n, r), T !== null && T.f & 2 && !(e & 64))) {
|
|
1040
|
+
var o = T;
|
|
1041
|
+
(o.effects ?? (o.effects = [])).push(n);
|
|
1042
1042
|
}
|
|
1043
1043
|
return i;
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function mr() {
|
|
1046
1046
|
return T !== null && !J;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1048
|
+
function Ce(e) {
|
|
1049
|
+
ao("$effect");
|
|
1050
1050
|
var t = A.f;
|
|
1051
1051
|
if (!T && t & 32 && !(t & 32768)) {
|
|
1052
1052
|
var r = L;
|
|
1053
1053
|
(r.e ?? (r.e = [])).push(e);
|
|
1054
|
-
} else return
|
|
1054
|
+
} else return Pi(e);
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return
|
|
1056
|
+
function Pi(e) {
|
|
1057
|
+
return Be(4 | _n, e);
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1061
|
-
const t =
|
|
1059
|
+
function co(e) {
|
|
1060
|
+
Je.ensure();
|
|
1061
|
+
const t = Be(64 | ut, e);
|
|
1062
1062
|
return () => {
|
|
1063
1063
|
te(t);
|
|
1064
1064
|
};
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1068
|
-
const t =
|
|
1066
|
+
function uo(e) {
|
|
1067
|
+
Je.ensure();
|
|
1068
|
+
const t = Be(64 | ut, e);
|
|
1069
1069
|
return (r = {}) => new Promise((i) => {
|
|
1070
|
-
r.outro ?
|
|
1070
|
+
r.outro ? Nt(t, () => {
|
|
1071
1071
|
te(t), i(void 0);
|
|
1072
1072
|
}) : (te(t), i(void 0));
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1075
|
+
function fo(e) {
|
|
1076
|
+
return Be(4, e);
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1078
|
+
function _r(e, t = 0) {
|
|
1079
|
+
return Be(8 | t, e);
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
var r =
|
|
1081
|
+
function ho(e, t = 0) {
|
|
1082
|
+
var r = Be(16 | t, e);
|
|
1083
1083
|
return r;
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1085
|
+
function De(e) {
|
|
1086
|
+
return Be(32 | ut, e);
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function xi(e) {
|
|
1089
1089
|
var t = e.teardown;
|
|
1090
1090
|
if (t !== null) {
|
|
1091
1091
|
const r = fe, i = T;
|
|
1092
|
-
|
|
1092
|
+
Nr(!0), ae(null);
|
|
1093
1093
|
try {
|
|
1094
1094
|
t.call(null);
|
|
1095
1095
|
} finally {
|
|
1096
|
-
|
|
1096
|
+
Nr(r), ae(i);
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function yr(e, t = !1) {
|
|
1101
1101
|
var r = e.first;
|
|
1102
1102
|
for (e.first = e.last = null; r !== null; ) {
|
|
1103
1103
|
const n = r.ac;
|
|
1104
|
-
n !== null &&
|
|
1105
|
-
n.abort(
|
|
1104
|
+
n !== null && Mi(() => {
|
|
1105
|
+
n.abort(lr);
|
|
1106
1106
|
});
|
|
1107
1107
|
var i = r.next;
|
|
1108
1108
|
r.f & 64 ? r.parent = null : te(r, t), r = i;
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function po(e) {
|
|
1112
1112
|
for (var t = e.first; t !== null; ) {
|
|
1113
1113
|
var r = t.next;
|
|
1114
1114
|
t.f & 32 || te(t), t = r;
|
|
@@ -1116,59 +1116,59 @@ function ls(e) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
function te(e, t = !0) {
|
|
1118
1118
|
var r = !1;
|
|
1119
|
-
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (
|
|
1119
|
+
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (vo(e.nodes.start, e.nodes.end), r = !0), O(e, Cr), yr(e, t && !r), ct(e, 0);
|
|
1120
1120
|
var i = e.nodes && e.nodes.t;
|
|
1121
|
-
if (i !== null) for (const
|
|
1122
|
-
|
|
1121
|
+
if (i !== null) for (const o of i) o.stop();
|
|
1122
|
+
xi(e), e.f ^= Cr, e.f |= mn;
|
|
1123
1123
|
var n = e.parent;
|
|
1124
|
-
n !== null && n.first !== null &&
|
|
1124
|
+
n !== null && n.first !== null && Hi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function vo(e, t) {
|
|
1127
1127
|
for (; e !== null; ) {
|
|
1128
|
-
var r = e === t ? null : /* @__PURE__ */
|
|
1128
|
+
var r = e === t ? null : /* @__PURE__ */ Ze(e);
|
|
1129
1129
|
e.remove(), e = r;
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function Hi(e) {
|
|
1133
1133
|
var t = e.parent, r = e.prev, i = e.next;
|
|
1134
1134
|
r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function Nt(e, t, r = !0) {
|
|
1137
1137
|
var i = [];
|
|
1138
|
-
|
|
1138
|
+
Ni(e, i, !0);
|
|
1139
1139
|
var n = () => {
|
|
1140
1140
|
r && te(e), t && t();
|
|
1141
|
-
},
|
|
1142
|
-
if (
|
|
1143
|
-
var
|
|
1144
|
-
for (var l of i) l.out(
|
|
1141
|
+
}, o = i.length;
|
|
1142
|
+
if (o > 0) {
|
|
1143
|
+
var s = () => --o || n();
|
|
1144
|
+
for (var l of i) l.out(s);
|
|
1145
1145
|
} else n();
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function Ni(e, t, r) {
|
|
1148
1148
|
if (!(e.f & 8192)) {
|
|
1149
|
-
e.f ^=
|
|
1149
|
+
e.f ^= Jr;
|
|
1150
1150
|
var i = e.nodes && e.nodes.t;
|
|
1151
1151
|
if (i !== null)
|
|
1152
1152
|
for (const l of i) (l.is_global || r) && t.push(l);
|
|
1153
1153
|
for (var n = e.first; n !== null; ) {
|
|
1154
|
-
var
|
|
1154
|
+
var o = n.next;
|
|
1155
1155
|
if (!(n.f & 64)) {
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1156
|
+
var s = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
|
|
1157
|
+
Ni(n, t, s ? r : !1);
|
|
1158
1158
|
}
|
|
1159
|
-
n =
|
|
1159
|
+
n = o;
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1163
|
+
function go(e, t) {
|
|
1164
1164
|
if (e.nodes)
|
|
1165
1165
|
for (var r = e.nodes.start, i = e.nodes.end; r !== null; ) {
|
|
1166
|
-
var n = r === i ? null : /* @__PURE__ */
|
|
1166
|
+
var n = r === i ? null : /* @__PURE__ */ Ze(r);
|
|
1167
1167
|
t.append(r), r = n;
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
var
|
|
1171
|
-
function
|
|
1170
|
+
var mo = null, At = !1, fe = !1;
|
|
1171
|
+
function Nr(e) {
|
|
1172
1172
|
fe = e;
|
|
1173
1173
|
}
|
|
1174
1174
|
var T = null, J = !1;
|
|
@@ -1176,161 +1176,161 @@ function ae(e) {
|
|
|
1176
1176
|
T = e;
|
|
1177
1177
|
}
|
|
1178
1178
|
var A = null;
|
|
1179
|
-
function
|
|
1179
|
+
function Te(e) {
|
|
1180
1180
|
A = e;
|
|
1181
1181
|
}
|
|
1182
1182
|
var K = null;
|
|
1183
|
-
function
|
|
1184
|
-
T !== null && (!
|
|
1183
|
+
function Di(e) {
|
|
1184
|
+
T !== null && (!we || T.f & 2) && (K === null ? K = [e] : K.push(e));
|
|
1185
1185
|
}
|
|
1186
|
-
var B = null,
|
|
1187
|
-
function
|
|
1186
|
+
var B = null, z = 0, W = null;
|
|
1187
|
+
function _o(e) {
|
|
1188
1188
|
W = e;
|
|
1189
1189
|
}
|
|
1190
|
-
var
|
|
1191
|
-
function
|
|
1192
|
-
|
|
1190
|
+
var Fi = 1, Le = 0, He = Le;
|
|
1191
|
+
function Dr(e) {
|
|
1192
|
+
He = e;
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return ++
|
|
1194
|
+
function Bi() {
|
|
1195
|
+
return ++Fi;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function ht(e) {
|
|
1198
1198
|
var t = e.f;
|
|
1199
1199
|
if (t & 2048) return !0;
|
|
1200
|
-
if (t & 2 && (e.f &= ~
|
|
1200
|
+
if (t & 2 && (e.f &= ~dt), t & 4096) {
|
|
1201
1201
|
for (var r = e.deps, i = r.length, n = 0; n < i; n++) {
|
|
1202
|
-
var
|
|
1203
|
-
if (
|
|
1202
|
+
var o = r[n];
|
|
1203
|
+
if (ht(o) && Ai(o), o.wv > e.wv) return !0;
|
|
1204
1204
|
}
|
|
1205
1205
|
t & 512 && x === null && O(e, re);
|
|
1206
1206
|
}
|
|
1207
1207
|
return !1;
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1209
|
+
function ji(e, t, r = !0) {
|
|
1210
1210
|
var i = e.reactions;
|
|
1211
|
-
if (i !== null && !(!
|
|
1211
|
+
if (i !== null && !(!we && K !== null && Ke.call(K, e)))
|
|
1212
1212
|
for (var n = 0; n < i.length; n++) {
|
|
1213
|
-
var
|
|
1214
|
-
|
|
1213
|
+
var o = i[n];
|
|
1214
|
+
o.f & 2 ? ji(o, t, !1) : t === o && (r ? O(o, le) : o.f & 1024 && O(o, Fe), hr(o));
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1218
|
-
var t = B, r =
|
|
1219
|
-
B = null,
|
|
1220
|
-
e.ac.abort(
|
|
1217
|
+
function zi(e) {
|
|
1218
|
+
var t = B, r = z, i = W, n = T, o = K, s = L, l = J, c = He, d = e.f;
|
|
1219
|
+
B = null, z = 0, W = null, T = d & 96 ? null : e, K = null, Lt(e.ctx), J = !1, He = ++Le, e.ac !== null && (Mi(() => {
|
|
1220
|
+
e.ac.abort(lr);
|
|
1221
1221
|
}), e.ac = null);
|
|
1222
1222
|
try {
|
|
1223
|
-
e.f |=
|
|
1223
|
+
e.f |= $r;
|
|
1224
1224
|
var f = e.fn, v = f();
|
|
1225
|
-
e.f |=
|
|
1226
|
-
var h = e.deps,
|
|
1225
|
+
e.f |= Zr;
|
|
1226
|
+
var h = e.deps, g = I?.is_fork;
|
|
1227
1227
|
if (B !== null) {
|
|
1228
1228
|
var p;
|
|
1229
|
-
if (
|
|
1230
|
-
for (h.length =
|
|
1229
|
+
if (g || ct(e, z), h !== null && z > 0)
|
|
1230
|
+
for (h.length = z + B.length, p = 0; p < B.length; p++) h[z + p] = B[p];
|
|
1231
1231
|
else e.deps = h = B;
|
|
1232
|
-
if (
|
|
1232
|
+
if (mr() && e.f & 512) for (p = z; p < h.length; p++) {
|
|
1233
1233
|
var y;
|
|
1234
1234
|
((y = h[p]).reactions ?? (y.reactions = [])).push(e);
|
|
1235
1235
|
}
|
|
1236
|
-
} else !
|
|
1237
|
-
if (
|
|
1236
|
+
} else !g && h !== null && z < h.length && (ct(e, z), h.length = z);
|
|
1237
|
+
if (xt() && W !== null && !J && h !== null && !(e.f & 6146)) for (p = 0; p < W.length; p++) ji(W[p], e);
|
|
1238
1238
|
if (n !== null && n !== e) {
|
|
1239
|
-
if (
|
|
1240
|
-
if (t !== null) for (const _ of t) _.rv =
|
|
1239
|
+
if (Le++, n.deps !== null) for (let _ = 0; _ < r; _ += 1) n.deps[_].rv = Le;
|
|
1240
|
+
if (t !== null) for (const _ of t) _.rv = Le;
|
|
1241
1241
|
W !== null && (i === null ? i = W : i.push(...W));
|
|
1242
1242
|
}
|
|
1243
|
-
return e.f & 8388608 && (e.f ^=
|
|
1243
|
+
return e.f & 8388608 && (e.f ^= ti), v;
|
|
1244
1244
|
} catch (_) {
|
|
1245
|
-
return
|
|
1245
|
+
return ui(_);
|
|
1246
1246
|
} finally {
|
|
1247
|
-
e.f ^=
|
|
1247
|
+
e.f ^= $r, B = t, z = r, W = i, T = n, K = o, Lt(s), J = l, He = c;
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function yo(e, t) {
|
|
1251
1251
|
let r = t.reactions;
|
|
1252
1252
|
if (r !== null) {
|
|
1253
|
-
var i =
|
|
1253
|
+
var i = cn.call(r, e);
|
|
1254
1254
|
if (i !== -1) {
|
|
1255
1255
|
var n = r.length - 1;
|
|
1256
1256
|
n === 0 ? r = t.reactions = null : (r[i] = r[n], r.pop());
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
if (r === null && t.f & 2 && (B === null || !
|
|
1260
|
-
var
|
|
1261
|
-
|
|
1259
|
+
if (r === null && t.f & 2 && (B === null || !Ke.call(B, t))) {
|
|
1260
|
+
var o = t;
|
|
1261
|
+
o.f & 512 && (o.f ^= 512, o.f &= ~dt), o.v !== M && cr(o), eo(o), ct(o, 0);
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function ct(e, t) {
|
|
1265
1265
|
var r = e.deps;
|
|
1266
1266
|
if (r !== null)
|
|
1267
|
-
for (var i = t; i < r.length; i++)
|
|
1267
|
+
for (var i = t; i < r.length; i++) yo(e, r[i]);
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function Qe(e) {
|
|
1270
1270
|
var t = e.f;
|
|
1271
1271
|
if (!(t & 16384)) {
|
|
1272
1272
|
O(e, re);
|
|
1273
|
-
var r = A, i =
|
|
1274
|
-
if (A = e,
|
|
1275
|
-
var n,
|
|
1273
|
+
var r = A, i = At;
|
|
1274
|
+
if (A = e, At = !0, 0)
|
|
1275
|
+
var n, o;
|
|
1276
1276
|
try {
|
|
1277
|
-
t & 16777232 ?
|
|
1278
|
-
var
|
|
1279
|
-
if (e.teardown = typeof
|
|
1277
|
+
t & 16777232 ? po(e) : yr(e), xi(e);
|
|
1278
|
+
var s = zi(e);
|
|
1279
|
+
if (e.teardown = typeof s == "function" ? s : null, e.wv = Fi, 0)
|
|
1280
1280
|
for (var l of e.deps) ;
|
|
1281
1281
|
} finally {
|
|
1282
|
-
|
|
1282
|
+
At = i, A = r;
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function m(e) {
|
|
1287
1287
|
var t = (e.f & 2) !== 0;
|
|
1288
|
-
if (
|
|
1288
|
+
if (mo?.add(e), T !== null && !J && !(A !== null && A.f & 16384) && (K === null || !Ke.call(K, e))) {
|
|
1289
1289
|
var r = T.deps;
|
|
1290
1290
|
if (T.f & 2097152)
|
|
1291
|
-
e.rv <
|
|
1291
|
+
e.rv < Le && (e.rv = Le, B === null && r !== null && r[z] === e ? z++ : B === null ? B = [e] : B.push(e));
|
|
1292
1292
|
else {
|
|
1293
1293
|
var i;
|
|
1294
1294
|
((i = T).deps ?? (i.deps = [])).push(e);
|
|
1295
1295
|
var n = e.reactions;
|
|
1296
|
-
n === null ? e.reactions = [T] :
|
|
1296
|
+
n === null ? e.reactions = [T] : Ke.call(n, T) || n.push(T);
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
1299
|
if (0) {
|
|
1300
1300
|
if (!J && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152) && !reactivity_loss_tracker.effect_deps.has(e))
|
|
1301
|
-
var
|
|
1301
|
+
var o;
|
|
1302
1302
|
if (tracing_mode_flag && !J && tracing_expressions !== null && T !== null && tracing_expressions.reaction === T && !e.trace) {
|
|
1303
|
-
if (
|
|
1304
|
-
var
|
|
1303
|
+
if (o)
|
|
1304
|
+
var s, l;
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
if (fe &&
|
|
1307
|
+
if (fe && xe.has(e)) return xe.get(e);
|
|
1308
1308
|
if (t) {
|
|
1309
1309
|
var c = e;
|
|
1310
1310
|
if (fe) {
|
|
1311
1311
|
var d = c.v;
|
|
1312
|
-
return (!(c.f & 1024) && c.reactions !== null ||
|
|
1312
|
+
return (!(c.f & 1024) && c.reactions !== null || Gi(c)) && (d = gr(c)), xe.set(c, d), d;
|
|
1313
1313
|
}
|
|
1314
|
-
var f = (c.f & 512) === 0 && !J && T !== null && (
|
|
1315
|
-
|
|
1314
|
+
var f = (c.f & 512) === 0 && !J && T !== null && (At || (T.f & 512) !== 0), v = (c.f & Zr) === 0;
|
|
1315
|
+
ht(c) && (f && (c.f |= 512), Ai(c)), f && !v && (Si(c), Vi(c));
|
|
1316
1316
|
}
|
|
1317
1317
|
if (x?.has(e)) return x.get(e);
|
|
1318
1318
|
if (e.f & 8388608) throw e.v;
|
|
1319
1319
|
return e.v;
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Vi(e) {
|
|
1322
1322
|
if (e.f |= 512, e.deps !== null)
|
|
1323
1323
|
for (const t of e.deps)
|
|
1324
|
-
(t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (
|
|
1324
|
+
(t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (Si(t), Vi(t));
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function Gi(e) {
|
|
1327
1327
|
if (e.v === M) return !0;
|
|
1328
1328
|
if (e.deps === null) return !1;
|
|
1329
1329
|
for (const t of e.deps)
|
|
1330
|
-
if (
|
|
1330
|
+
if (xe.has(t) || t.f & 2 && Gi(t)) return !0;
|
|
1331
1331
|
return !1;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function Dt(e) {
|
|
1334
1334
|
var t = J;
|
|
1335
1335
|
try {
|
|
1336
1336
|
return J = !0, e();
|
|
@@ -1338,62 +1338,62 @@ function xt(e) {
|
|
|
1338
1338
|
J = t;
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1342
|
-
function
|
|
1343
|
-
var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [],
|
|
1344
|
-
|
|
1345
|
-
var
|
|
1341
|
+
var yt = Symbol("events"), bo = /* @__PURE__ */ new Set(), Fr = /* @__PURE__ */ new Set(), Br = null;
|
|
1342
|
+
function jr(e) {
|
|
1343
|
+
var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [], o = n[0] || e.target;
|
|
1344
|
+
Br = e;
|
|
1345
|
+
var s = 0, l = Br === e && e[yt];
|
|
1346
1346
|
if (l) {
|
|
1347
1347
|
var c = n.indexOf(l);
|
|
1348
1348
|
if (c !== -1 && (t === document || t === window)) {
|
|
1349
|
-
e[
|
|
1349
|
+
e[yt] = t;
|
|
1350
1350
|
return;
|
|
1351
1351
|
}
|
|
1352
1352
|
var d = n.indexOf(t);
|
|
1353
1353
|
if (d === -1) return;
|
|
1354
|
-
c <= d && (
|
|
1354
|
+
c <= d && (s = c);
|
|
1355
1355
|
}
|
|
1356
|
-
if (
|
|
1357
|
-
|
|
1356
|
+
if (o = n[s] || e.target, o !== t) {
|
|
1357
|
+
$t(e, "currentTarget", {
|
|
1358
1358
|
configurable: !0,
|
|
1359
1359
|
get() {
|
|
1360
|
-
return
|
|
1360
|
+
return o || r;
|
|
1361
1361
|
}
|
|
1362
1362
|
});
|
|
1363
1363
|
var f = T, v = A;
|
|
1364
|
-
ae(null),
|
|
1364
|
+
ae(null), Te(null);
|
|
1365
1365
|
try {
|
|
1366
|
-
for (var h,
|
|
1367
|
-
var p =
|
|
1366
|
+
for (var h, g = []; o !== null; ) {
|
|
1367
|
+
var p = o.assignedSlot || o.parentNode || o.host || null;
|
|
1368
1368
|
try {
|
|
1369
|
-
var y =
|
|
1370
|
-
y != null && (!
|
|
1369
|
+
var y = o[yt]?.[i];
|
|
1370
|
+
y != null && (!o.disabled || e.target === o) && y.call(o, e);
|
|
1371
1371
|
} catch (_) {
|
|
1372
|
-
h ?
|
|
1372
|
+
h ? g.push(_) : h = _;
|
|
1373
1373
|
}
|
|
1374
1374
|
if (e.cancelBubble || p === t || p === null) break;
|
|
1375
|
-
|
|
1375
|
+
o = p;
|
|
1376
1376
|
}
|
|
1377
1377
|
if (h) {
|
|
1378
|
-
for (let _ of
|
|
1378
|
+
for (let _ of g) queueMicrotask(() => {
|
|
1379
1379
|
throw _;
|
|
1380
1380
|
});
|
|
1381
1381
|
throw h;
|
|
1382
1382
|
}
|
|
1383
1383
|
} finally {
|
|
1384
|
-
e[
|
|
1384
|
+
e[yt] = t, delete e.currentTarget, ae(f), Te(v);
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
-
var
|
|
1389
|
-
function
|
|
1390
|
-
return
|
|
1388
|
+
var wo = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1389
|
+
function To(e) {
|
|
1390
|
+
return wo?.createHTML(e) ?? e;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
var t =
|
|
1394
|
-
return t.innerHTML =
|
|
1392
|
+
function Ao(e) {
|
|
1393
|
+
var t = Ri("template");
|
|
1394
|
+
return t.innerHTML = To(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function St(e, t) {
|
|
1397
1397
|
var r = A;
|
|
1398
1398
|
r.nodes === null && (r.nodes = {
|
|
1399
1399
|
start: e,
|
|
@@ -1403,29 +1403,29 @@ function wt(e, t) {
|
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
1405
|
// @__NO_SIDE_EFFECTS__
|
|
1406
|
-
function
|
|
1407
|
-
var r = (t & 1) !== 0, i = (t & 2) !== 0, n,
|
|
1406
|
+
function So(e, t) {
|
|
1407
|
+
var r = (t & 1) !== 0, i = (t & 2) !== 0, n, o = !e.startsWith("<!>");
|
|
1408
1408
|
return () => {
|
|
1409
1409
|
if (Z)
|
|
1410
|
-
return
|
|
1411
|
-
n === void 0 && (n =
|
|
1412
|
-
var
|
|
1410
|
+
return St(N, null), N;
|
|
1411
|
+
n === void 0 && (n = Ao(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ nr(n)));
|
|
1412
|
+
var s = i || Ci ? document.importNode(n, !0) : n.cloneNode(!0);
|
|
1413
1413
|
if (r) {
|
|
1414
|
-
var l = /* @__PURE__ */
|
|
1415
|
-
|
|
1416
|
-
} else
|
|
1417
|
-
return
|
|
1414
|
+
var l = /* @__PURE__ */ nr(s), c = s.lastChild;
|
|
1415
|
+
St(l, c);
|
|
1416
|
+
} else St(s, s);
|
|
1417
|
+
return s;
|
|
1418
1418
|
};
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Wi(e, t) {
|
|
1421
1421
|
if (Z) {
|
|
1422
1422
|
var r = A;
|
|
1423
|
-
(!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = N),
|
|
1423
|
+
(!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = N), ni();
|
|
1424
1424
|
return;
|
|
1425
1425
|
}
|
|
1426
1426
|
e !== null && e.before(t);
|
|
1427
1427
|
}
|
|
1428
|
-
var
|
|
1428
|
+
var Io = [
|
|
1429
1429
|
"allowfullscreen",
|
|
1430
1430
|
"async",
|
|
1431
1431
|
"autofocus",
|
|
@@ -1454,8 +1454,8 @@ var ys = [
|
|
|
1454
1454
|
"defer",
|
|
1455
1455
|
"disablepictureinpicture",
|
|
1456
1456
|
"disableremoteplayback"
|
|
1457
|
-
],
|
|
1458
|
-
...
|
|
1457
|
+
], ia = [
|
|
1458
|
+
...Io,
|
|
1459
1459
|
"formNoValidate",
|
|
1460
1460
|
"isMap",
|
|
1461
1461
|
"noModule",
|
|
@@ -1470,17 +1470,17 @@ var ys = [
|
|
|
1470
1470
|
"allowFullscreen",
|
|
1471
1471
|
"disablePictureInPicture",
|
|
1472
1472
|
"disableRemotePlayback"
|
|
1473
|
-
],
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1473
|
+
], Eo = ["touchstart", "touchmove"];
|
|
1474
|
+
function ko(e) {
|
|
1475
|
+
return Eo.includes(e);
|
|
1476
1476
|
}
|
|
1477
|
-
var
|
|
1477
|
+
var Co = [
|
|
1478
1478
|
"$state",
|
|
1479
1479
|
"$state.raw",
|
|
1480
1480
|
"$derived",
|
|
1481
1481
|
"$derived.by"
|
|
1482
|
-
],
|
|
1483
|
-
...
|
|
1482
|
+
], na = [
|
|
1483
|
+
...Co,
|
|
1484
1484
|
"$state.eager",
|
|
1485
1485
|
"$state.snapshot",
|
|
1486
1486
|
"$props",
|
|
@@ -1495,80 +1495,80 @@ var Ts = [
|
|
|
1495
1495
|
"$inspect().with",
|
|
1496
1496
|
"$inspect.trace",
|
|
1497
1497
|
"$host"
|
|
1498
|
-
],
|
|
1499
|
-
function
|
|
1500
|
-
return
|
|
1498
|
+
], zr = !0;
|
|
1499
|
+
function qi(e, t) {
|
|
1500
|
+
return Ki(e, t);
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1503
|
-
|
|
1502
|
+
function $o(e, t) {
|
|
1503
|
+
ir(), t.intro = t.intro ?? !1;
|
|
1504
1504
|
const r = t.target, i = Z, n = N;
|
|
1505
1505
|
try {
|
|
1506
|
-
for (var
|
|
1507
|
-
if (!
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1506
|
+
for (var o = /* @__PURE__ */ nr(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ Ze(o);
|
|
1507
|
+
if (!o) throw kt;
|
|
1508
|
+
pt(!0), at(o);
|
|
1509
|
+
const s = Ki(e, {
|
|
1510
1510
|
...t,
|
|
1511
|
-
anchor:
|
|
1511
|
+
anchor: o
|
|
1512
1512
|
});
|
|
1513
|
-
return
|
|
1514
|
-
} catch (
|
|
1515
|
-
if (
|
|
1516
|
-
`).some((l) => l.startsWith("https://svelte.dev/e/"))) throw
|
|
1517
|
-
return
|
|
1513
|
+
return pt(!1), s;
|
|
1514
|
+
} catch (s) {
|
|
1515
|
+
if (s instanceof Error && s.message.split(`
|
|
1516
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1517
|
+
return s !== kt && console.warn("Failed to hydrate: ", s), t.recover === !1 && In(), ir(), so(r), pt(!1), qi(e, t);
|
|
1518
1518
|
} finally {
|
|
1519
|
-
|
|
1519
|
+
pt(i), at(n);
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
|
-
var
|
|
1523
|
-
function
|
|
1524
|
-
|
|
1525
|
-
var c = void 0, d =
|
|
1526
|
-
var f = r ?? t.appendChild(
|
|
1527
|
-
|
|
1528
|
-
} }, (
|
|
1529
|
-
|
|
1522
|
+
var bt = /* @__PURE__ */ new Map();
|
|
1523
|
+
function Ki(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: s = !0, transformError: l }) {
|
|
1524
|
+
ir();
|
|
1525
|
+
var c = void 0, d = uo(() => {
|
|
1526
|
+
var f = r ?? t.appendChild(Oi());
|
|
1527
|
+
Kn(f, { pending: () => {
|
|
1528
|
+
} }, (g) => {
|
|
1529
|
+
ai({});
|
|
1530
1530
|
var p = L;
|
|
1531
|
-
if (
|
|
1532
|
-
throw
|
|
1533
|
-
|
|
1531
|
+
if (o && (p.c = o), n && (i.$$events = n), Z && St(g, null), zr = s, c = e(g, i) || {}, zr = !0, Z && (A.nodes.end = N, N === null || N.nodeType !== 8 || N.data !== "]"))
|
|
1532
|
+
throw ii(), kt;
|
|
1533
|
+
li();
|
|
1534
1534
|
}, l);
|
|
1535
|
-
var v = /* @__PURE__ */ new Set(), h = (
|
|
1536
|
-
for (var p = 0; p <
|
|
1537
|
-
var y =
|
|
1535
|
+
var v = /* @__PURE__ */ new Set(), h = (g) => {
|
|
1536
|
+
for (var p = 0; p < g.length; p++) {
|
|
1537
|
+
var y = g[p];
|
|
1538
1538
|
if (!v.has(y)) {
|
|
1539
1539
|
v.add(y);
|
|
1540
|
-
var _ =
|
|
1540
|
+
var _ = ko(y);
|
|
1541
1541
|
for (const C of [t, document]) {
|
|
1542
|
-
var E =
|
|
1543
|
-
E === void 0 && (E = /* @__PURE__ */ new Map(),
|
|
1542
|
+
var E = bt.get(C);
|
|
1543
|
+
E === void 0 && (E = /* @__PURE__ */ new Map(), bt.set(C, E));
|
|
1544
1544
|
var j = E.get(y);
|
|
1545
|
-
j === void 0 ? (C.addEventListener(y,
|
|
1545
|
+
j === void 0 ? (C.addEventListener(y, jr, { passive: _ }), E.set(y, 1)) : E.set(y, j + 1);
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
};
|
|
1550
|
-
return h(
|
|
1551
|
-
for (var
|
|
1552
|
-
var p =
|
|
1553
|
-
--y == 0 ? (_.removeEventListener(
|
|
1550
|
+
return h(un(bo)), Fr.add(h), () => {
|
|
1551
|
+
for (var g of v) for (const _ of [t, document]) {
|
|
1552
|
+
var p = bt.get(_), y = p.get(g);
|
|
1553
|
+
--y == 0 ? (_.removeEventListener(g, jr), p.delete(g), p.size === 0 && bt.delete(_)) : p.set(g, y);
|
|
1554
1554
|
}
|
|
1555
|
-
|
|
1555
|
+
Fr.delete(h), f !== r && f.parentNode?.removeChild(f);
|
|
1556
1556
|
};
|
|
1557
1557
|
});
|
|
1558
|
-
return
|
|
1558
|
+
return or.set(c, d), c;
|
|
1559
1559
|
}
|
|
1560
|
-
var
|
|
1561
|
-
function
|
|
1562
|
-
const r =
|
|
1563
|
-
return r ? (
|
|
1560
|
+
var or = /* @__PURE__ */ new WeakMap();
|
|
1561
|
+
function Lo(e, t) {
|
|
1562
|
+
const r = or.get(e);
|
|
1563
|
+
return r ? (or.delete(e), r(t)) : Promise.resolve();
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1566
|
-
L === null &&
|
|
1567
|
-
const t =
|
|
1565
|
+
function Oo(e) {
|
|
1566
|
+
L === null && bn("onMount"), ft && L.l !== null ? Ro(L).m.push(e) : Ce(() => {
|
|
1567
|
+
const t = Dt(e);
|
|
1568
1568
|
if (typeof t == "function") return t;
|
|
1569
1569
|
});
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Ro(e) {
|
|
1572
1572
|
var t = e.l;
|
|
1573
1573
|
return t.u ?? (t.u = {
|
|
1574
1574
|
a: [],
|
|
@@ -1576,44 +1576,44 @@ function Es(e) {
|
|
|
1576
1576
|
m: []
|
|
1577
1577
|
});
|
|
1578
1578
|
}
|
|
1579
|
-
var
|
|
1579
|
+
var Ui, Ve = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakSet(), Yi = class {
|
|
1580
1580
|
constructor(e) {
|
|
1581
|
-
|
|
1581
|
+
ur(this, Vr), w(this, Ve, /* @__PURE__ */ new WeakMap()), w(this, Mt, void 0), w(this, Vt, void 0), b(Vt, this, e);
|
|
1582
1582
|
}
|
|
1583
1583
|
observe(e, t) {
|
|
1584
|
-
var r = a(
|
|
1585
|
-
return r.add(t), a(
|
|
1586
|
-
var i = a(
|
|
1587
|
-
i.delete(t), i.size === 0 && (a(
|
|
1584
|
+
var r = a(Ve, this).get(e) || /* @__PURE__ */ new Set();
|
|
1585
|
+
return r.add(t), a(Ve, this).set(e, r), S(Vr, this, Mo).call(this).observe(e, a(Vt, this)), () => {
|
|
1586
|
+
var i = a(Ve, this).get(e);
|
|
1587
|
+
i.delete(t), i.size === 0 && (a(Ve, this).delete(e), a(Mt, this).unobserve(e));
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
1590
|
};
|
|
1591
|
-
|
|
1592
|
-
function
|
|
1593
|
-
return a(
|
|
1591
|
+
Ui = Yi;
|
|
1592
|
+
function Mo() {
|
|
1593
|
+
return a(Mt, this) ?? b(Mt, this, new ResizeObserver((e) => {
|
|
1594
1594
|
for (var t of e) {
|
|
1595
|
-
|
|
1596
|
-
for (var r of a(
|
|
1595
|
+
Ui.entries.set(t.target, t);
|
|
1596
|
+
for (var r of a(Ve, this).get(t.target) || []) r(t);
|
|
1597
1597
|
}
|
|
1598
1598
|
}));
|
|
1599
1599
|
}
|
|
1600
|
-
u(
|
|
1601
|
-
function
|
|
1602
|
-
return e === t || e?.[
|
|
1603
|
-
}
|
|
1604
|
-
function
|
|
1605
|
-
var n = L.r,
|
|
1606
|
-
return
|
|
1607
|
-
var
|
|
1608
|
-
return
|
|
1609
|
-
|
|
1610
|
-
e !== r(...l) && (t(e, ...l),
|
|
1600
|
+
u(Yi, "entries", /* @__PURE__ */ new WeakMap());
|
|
1601
|
+
function Gr(e, t) {
|
|
1602
|
+
return e === t || e?.[nt] === t;
|
|
1603
|
+
}
|
|
1604
|
+
function Po(e = {}, t, r, i) {
|
|
1605
|
+
var n = L.r, o = A;
|
|
1606
|
+
return fo(() => {
|
|
1607
|
+
var s, l;
|
|
1608
|
+
return _r(() => {
|
|
1609
|
+
s = l, l = i?.() || [], Dt(() => {
|
|
1610
|
+
e !== r(...l) && (t(e, ...l), s && Gr(r(...s), e) && t(null, ...s));
|
|
1611
1611
|
});
|
|
1612
1612
|
}), () => {
|
|
1613
|
-
let c =
|
|
1613
|
+
let c = o;
|
|
1614
1614
|
for (; c !== n && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
|
|
1615
1615
|
const d = () => {
|
|
1616
|
-
l &&
|
|
1616
|
+
l && Gr(r(...l), e) && t(null, ...l);
|
|
1617
1617
|
}, f = c.teardown;
|
|
1618
1618
|
c.teardown = () => {
|
|
1619
1619
|
d(), f?.();
|
|
@@ -1621,15 +1621,15 @@ function Cs(e = {}, t, r, i) {
|
|
|
1621
1621
|
};
|
|
1622
1622
|
}), e;
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1625
|
-
var n = !
|
|
1624
|
+
function ge(e, t, r, i) {
|
|
1625
|
+
var n = !ft || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, l = i, c = !0, d = () => (c && (c = !1, l = s ? Dt(i) : i), l);
|
|
1626
1626
|
let f;
|
|
1627
|
-
if (
|
|
1628
|
-
var v =
|
|
1629
|
-
f =
|
|
1627
|
+
if (o) {
|
|
1628
|
+
var v = nt in e || ri in e;
|
|
1629
|
+
f = Oe(e, t)?.set ?? (v && t in e ? (C) => e[t] = C : void 0);
|
|
1630
1630
|
}
|
|
1631
|
-
var h,
|
|
1632
|
-
|
|
1631
|
+
var h, g = !1;
|
|
1632
|
+
o ? [h, g] = Bn(() => e[t]) : h = e[t], h === void 0 && i !== void 0 && (h = d(), f && (n && En(t), f(h)));
|
|
1633
1633
|
var p;
|
|
1634
1634
|
if (n ? p = () => {
|
|
1635
1635
|
var C = e[t];
|
|
@@ -1641,45 +1641,45 @@ function me(e, t, r, i) {
|
|
|
1641
1641
|
if (f) {
|
|
1642
1642
|
var y = e.$$legacy;
|
|
1643
1643
|
return function(C, U) {
|
|
1644
|
-
return arguments.length > 0 ? ((!n || !U || y ||
|
|
1644
|
+
return arguments.length > 0 ? ((!n || !U || y || g) && f(U ? p() : C), C) : p();
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
1647
|
-
var _ = !1, E = (r & 1 ?
|
|
1648
|
-
|
|
1647
|
+
var _ = !1, E = (r & 1 ? vr : Jn)(() => (_ = !1, p()));
|
|
1648
|
+
o && m(E);
|
|
1649
1649
|
var j = A;
|
|
1650
1650
|
return function(C, U) {
|
|
1651
1651
|
if (arguments.length > 0) {
|
|
1652
|
-
const
|
|
1653
|
-
return $(E,
|
|
1652
|
+
const Se = U ? m(E) : n && o ? We(C) : C;
|
|
1653
|
+
return $(E, Se), _ = !0, l !== void 0 && (l = Se), C;
|
|
1654
1654
|
}
|
|
1655
|
-
return fe && _ || j.f & 16384 ? E.v :
|
|
1655
|
+
return fe && _ || j.f & 16384 ? E.v : m(E);
|
|
1656
1656
|
};
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1659
|
-
return new
|
|
1658
|
+
function xo(e) {
|
|
1659
|
+
return new Ho(e);
|
|
1660
1660
|
}
|
|
1661
|
-
var
|
|
1661
|
+
var Ee = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ho = class {
|
|
1662
1662
|
constructor(e) {
|
|
1663
|
-
w(this,
|
|
1664
|
-
var t = /* @__PURE__ */ new Map(), r = (n,
|
|
1665
|
-
var
|
|
1666
|
-
return t.set(n,
|
|
1663
|
+
w(this, Ee, void 0), w(this, ie, void 0);
|
|
1664
|
+
var t = /* @__PURE__ */ new Map(), r = (n, o) => {
|
|
1665
|
+
var s = /* @__PURE__ */ to(o, !1, !1);
|
|
1666
|
+
return t.set(n, s), s;
|
|
1667
1667
|
};
|
|
1668
1668
|
const i = new Proxy({
|
|
1669
1669
|
...e.props || {},
|
|
1670
1670
|
$$events: {}
|
|
1671
1671
|
}, {
|
|
1672
|
-
get(n,
|
|
1673
|
-
return
|
|
1672
|
+
get(n, o) {
|
|
1673
|
+
return m(t.get(o) ?? r(o, Reflect.get(n, o)));
|
|
1674
1674
|
},
|
|
1675
|
-
has(n,
|
|
1676
|
-
return
|
|
1675
|
+
has(n, o) {
|
|
1676
|
+
return o === ri ? !0 : (m(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
|
|
1677
1677
|
},
|
|
1678
|
-
set(n,
|
|
1679
|
-
return $(t.get(
|
|
1678
|
+
set(n, o, s) {
|
|
1679
|
+
return $(t.get(o) ?? r(o, s), s), Reflect.set(n, o, s);
|
|
1680
1680
|
}
|
|
1681
1681
|
});
|
|
1682
|
-
b(ie, this, (e.hydrate ?
|
|
1682
|
+
b(ie, this, (e.hydrate ? $o : qi)(e.component, {
|
|
1683
1683
|
target: e.target,
|
|
1684
1684
|
anchor: e.anchor,
|
|
1685
1685
|
props: i,
|
|
@@ -1687,38 +1687,38 @@ var Se = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ls =
|
|
|
1687
1687
|
intro: e.intro ?? !1,
|
|
1688
1688
|
recover: e.recover,
|
|
1689
1689
|
transformError: e.transformError
|
|
1690
|
-
})), !
|
|
1690
|
+
})), !we && (!e?.props?.$$host || e.sync === !1) && ue(), b(Ee, this, i.$$events);
|
|
1691
1691
|
for (const n of Object.keys(a(ie, this)))
|
|
1692
|
-
n === "$set" || n === "$destroy" || n === "$on" ||
|
|
1692
|
+
n === "$set" || n === "$destroy" || n === "$on" || $t(this, n, {
|
|
1693
1693
|
get() {
|
|
1694
1694
|
return a(ie, this)[n];
|
|
1695
1695
|
},
|
|
1696
|
-
set(
|
|
1697
|
-
a(ie, this)[n] =
|
|
1696
|
+
set(o) {
|
|
1697
|
+
a(ie, this)[n] = o;
|
|
1698
1698
|
},
|
|
1699
1699
|
enumerable: !0
|
|
1700
1700
|
});
|
|
1701
1701
|
a(ie, this).$set = (n) => {
|
|
1702
1702
|
Object.assign(i, n);
|
|
1703
1703
|
}, a(ie, this).$destroy = () => {
|
|
1704
|
-
|
|
1704
|
+
Lo(a(ie, this));
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
1707
|
$set(e) {
|
|
1708
1708
|
a(ie, this).$set(e);
|
|
1709
1709
|
}
|
|
1710
1710
|
$on(e, t) {
|
|
1711
|
-
a(
|
|
1711
|
+
a(Ee, this)[e] = a(Ee, this)[e] || [];
|
|
1712
1712
|
const r = (...i) => t.call(this, ...i);
|
|
1713
|
-
return a(
|
|
1714
|
-
a(
|
|
1713
|
+
return a(Ee, this)[e].push(r), () => {
|
|
1714
|
+
a(Ee, this)[e] = a(Ee, this)[e].filter((i) => i !== r);
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
1717
|
$destroy() {
|
|
1718
1718
|
a(ie, this).$destroy();
|
|
1719
1719
|
}
|
|
1720
|
-
},
|
|
1721
|
-
typeof HTMLElement == "function" && (
|
|
1720
|
+
}, Xi;
|
|
1721
|
+
typeof HTMLElement == "function" && (Xi = class extends HTMLElement {
|
|
1722
1722
|
constructor(e, t, r) {
|
|
1723
1723
|
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 = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
1724
1724
|
}
|
|
@@ -1739,19 +1739,19 @@ typeof HTMLElement == "function" && (qi = class extends HTMLElement {
|
|
|
1739
1739
|
if (this.$$cn = !0, !this.$$c) {
|
|
1740
1740
|
let e = function(i) {
|
|
1741
1741
|
return (n) => {
|
|
1742
|
-
const
|
|
1743
|
-
i !== "default" && (
|
|
1742
|
+
const o = Ri("slot");
|
|
1743
|
+
i !== "default" && (o.name = i), Wi(n, o);
|
|
1744
1744
|
};
|
|
1745
1745
|
};
|
|
1746
1746
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
1747
|
-
const t = {}, r =
|
|
1747
|
+
const t = {}, r = No(this);
|
|
1748
1748
|
for (const i of this.$$s) i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
|
|
1749
1749
|
for (const i of this.attributes) {
|
|
1750
1750
|
const n = this.$$g_p(i.name);
|
|
1751
|
-
n in this.$$d || (this.$$d[n] =
|
|
1751
|
+
n in this.$$d || (this.$$d[n] = It(n, i.value, this.$$p_d, "toProp"));
|
|
1752
1752
|
}
|
|
1753
1753
|
for (const i in this.$$p_d) !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
1754
|
-
this.$$c =
|
|
1754
|
+
this.$$c = xo({
|
|
1755
1755
|
component: this.$$ctor,
|
|
1756
1756
|
target: this.$$shadowRoot || this,
|
|
1757
1757
|
props: {
|
|
@@ -1759,27 +1759,27 @@ typeof HTMLElement == "function" && (qi = class extends HTMLElement {
|
|
|
1759
1759
|
$$slots: t,
|
|
1760
1760
|
$$host: this
|
|
1761
1761
|
}
|
|
1762
|
-
}), this.$$me =
|
|
1763
|
-
|
|
1762
|
+
}), this.$$me = co(() => {
|
|
1763
|
+
_r(() => {
|
|
1764
1764
|
this.$$r = !0;
|
|
1765
|
-
for (const i of
|
|
1765
|
+
for (const i of Ct(this.$$c)) {
|
|
1766
1766
|
if (!this.$$p_d[i]?.reflect) continue;
|
|
1767
1767
|
this.$$d[i] = this.$$c[i];
|
|
1768
|
-
const n =
|
|
1768
|
+
const n = It(i, this.$$d[i], this.$$p_d, "toAttribute");
|
|
1769
1769
|
n == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, n);
|
|
1770
1770
|
}
|
|
1771
1771
|
this.$$r = !1;
|
|
1772
1772
|
});
|
|
1773
1773
|
});
|
|
1774
1774
|
for (const i in this.$$l) for (const n of this.$$l[i]) {
|
|
1775
|
-
const
|
|
1776
|
-
this.$$l_u.set(n,
|
|
1775
|
+
const o = this.$$c.$on(i, n);
|
|
1776
|
+
this.$$l_u.set(n, o);
|
|
1777
1777
|
}
|
|
1778
1778
|
this.$$l = {};
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
attributeChangedCallback(e, t, r) {
|
|
1782
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
1782
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = It(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
1783
1783
|
}
|
|
1784
1784
|
disconnectedCallback() {
|
|
1785
1785
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1787,10 +1787,10 @@ typeof HTMLElement == "function" && (qi = class extends HTMLElement {
|
|
|
1787
1787
|
});
|
|
1788
1788
|
}
|
|
1789
1789
|
$$g_p(e) {
|
|
1790
|
-
return
|
|
1790
|
+
return Ct(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
1791
1791
|
}
|
|
1792
1792
|
});
|
|
1793
|
-
function
|
|
1793
|
+
function It(e, t, r, i) {
|
|
1794
1794
|
const n = r[e]?.type;
|
|
1795
1795
|
if (t = n === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e]) return t;
|
|
1796
1796
|
if (i === "toAttribute") switch (n) {
|
|
@@ -1816,46 +1816,46 @@ function Tt(e, t, r, i) {
|
|
|
1816
1816
|
return t;
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function No(e) {
|
|
1820
1820
|
const t = {};
|
|
1821
1821
|
return e.childNodes.forEach((r) => {
|
|
1822
1822
|
t[r.slot || "default"] = !0;
|
|
1823
1823
|
}), t;
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1826
|
-
let
|
|
1825
|
+
function Do(e, t, r, i, n, o) {
|
|
1826
|
+
let s = class extends Xi {
|
|
1827
1827
|
constructor() {
|
|
1828
1828
|
super(e, r, n), this.$$p_d = t;
|
|
1829
1829
|
}
|
|
1830
1830
|
static get observedAttributes() {
|
|
1831
|
-
return
|
|
1831
|
+
return Ct(t).map((l) => (t[l].attribute || l).toLowerCase());
|
|
1832
1832
|
}
|
|
1833
1833
|
};
|
|
1834
|
-
return
|
|
1835
|
-
|
|
1834
|
+
return Ct(t).forEach((l) => {
|
|
1835
|
+
$t(s.prototype, l, {
|
|
1836
1836
|
get() {
|
|
1837
1837
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
1838
1838
|
},
|
|
1839
1839
|
set(c) {
|
|
1840
|
-
c =
|
|
1840
|
+
c = It(l, c, t), this.$$d[l] = c;
|
|
1841
1841
|
var d = this.$$c;
|
|
1842
|
-
d && (
|
|
1842
|
+
d && (Oe(d, l)?.get ? d[l] = c : d.$set({ [l]: c }));
|
|
1843
1843
|
}
|
|
1844
1844
|
});
|
|
1845
1845
|
}), i.forEach((l) => {
|
|
1846
|
-
|
|
1846
|
+
$t(s.prototype, l, { get() {
|
|
1847
1847
|
return this.$$c?.[l];
|
|
1848
1848
|
} });
|
|
1849
|
-
}),
|
|
1849
|
+
}), o && (s = o(s)), e.element = s, s;
|
|
1850
1850
|
}
|
|
1851
|
-
var
|
|
1851
|
+
var Fo = class extends Event {
|
|
1852
1852
|
constructor(e, t, r, i) {
|
|
1853
1853
|
super("context-request", {
|
|
1854
1854
|
bubbles: !0,
|
|
1855
1855
|
composed: !0
|
|
1856
1856
|
}), u(this, "context", void 0), u(this, "contextTarget", void 0), u(this, "callback", void 0), u(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = i ?? !1;
|
|
1857
1857
|
}
|
|
1858
|
-
},
|
|
1858
|
+
}, Bo = class {
|
|
1859
1859
|
constructor(e, t) {
|
|
1860
1860
|
u(this, "host", void 0), u(this, "context", void 0), u(this, "subscribe", void 0), u(this, "onValue", void 0), u(this, "isConnected", !1), u(this, "unsubscribe", void 0), u(this, "currentValue", void 0), u(this, "handleValue", (r, i) => {
|
|
1861
1861
|
i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
|
|
@@ -1871,12 +1871,12 @@ var Ms = class extends Event {
|
|
|
1871
1871
|
return this.currentValue;
|
|
1872
1872
|
}
|
|
1873
1873
|
requestValue() {
|
|
1874
|
-
this.host.dispatchEvent(new
|
|
1874
|
+
this.host.dispatchEvent(new Fo(this.context, this.host, this.handleValue, this.subscribe));
|
|
1875
1875
|
}
|
|
1876
|
-
},
|
|
1877
|
-
function
|
|
1876
|
+
}, Ft = (e) => e, jo = Ft(Symbol.for("pie.assessmentToolkit.runtimeContext")), oa = Ft(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), zo = Ft(Symbol.for("pie.assessmentToolkit.shellContext")), sa = Ft(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
1877
|
+
function Qi(e, t, r) {
|
|
1878
1878
|
let i = !1;
|
|
1879
|
-
const n = new
|
|
1879
|
+
const n = new Bo(e, {
|
|
1880
1880
|
context: t,
|
|
1881
1881
|
subscribe: !0,
|
|
1882
1882
|
onValue: (d) => {
|
|
@@ -1884,64 +1884,133 @@ function Ki(e, t, r) {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
});
|
|
1886
1886
|
n.connect();
|
|
1887
|
-
const
|
|
1887
|
+
const o = (d) => {
|
|
1888
1888
|
d.context === t && n.requestValue();
|
|
1889
1889
|
};
|
|
1890
|
-
e.addEventListener("context-provider",
|
|
1891
|
-
let
|
|
1890
|
+
e.addEventListener("context-provider", o);
|
|
1891
|
+
let s = 0;
|
|
1892
1892
|
const l = 200, c = globalThis.setInterval(() => {
|
|
1893
|
-
if (i ||
|
|
1893
|
+
if (i || s >= l) {
|
|
1894
1894
|
globalThis.clearInterval(c);
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
|
-
|
|
1897
|
+
s += 1, n.requestValue();
|
|
1898
1898
|
}, 50);
|
|
1899
1899
|
return () => {
|
|
1900
|
-
globalThis.clearInterval(c), e.removeEventListener("context-provider",
|
|
1900
|
+
globalThis.clearInterval(c), e.removeEventListener("context-provider", o), n.disconnect();
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1904
|
-
return
|
|
1903
|
+
function Vo(e, t) {
|
|
1904
|
+
return Qi(e, jo, t);
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1907
|
-
return
|
|
1906
|
+
function Go(e, t) {
|
|
1907
|
+
return Qi(e, zo, t);
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1910
|
-
return
|
|
1909
|
+
function Wo(e, t) {
|
|
1910
|
+
return Vo(e, t);
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1913
|
-
return
|
|
1912
|
+
function qo(e, t) {
|
|
1913
|
+
return Go(e, t);
|
|
1914
1914
|
}
|
|
1915
|
-
var
|
|
1915
|
+
var Wr;
|
|
1916
1916
|
(function(e) {
|
|
1917
1917
|
e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
|
|
1918
|
-
})(
|
|
1919
|
-
var
|
|
1918
|
+
})(Wr || (Wr = {}));
|
|
1919
|
+
var qr;
|
|
1920
1920
|
(function(e) {
|
|
1921
1921
|
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
1922
|
-
})(
|
|
1923
|
-
function
|
|
1922
|
+
})(qr || (qr = {}));
|
|
1923
|
+
function Ji(e) {
|
|
1924
1924
|
return (...t) => {
|
|
1925
1925
|
console.debug(`[${e}]`, ...t);
|
|
1926
1926
|
};
|
|
1927
1927
|
}
|
|
1928
|
-
var
|
|
1928
|
+
var aa = Ji("I18nService"), Gt = {
|
|
1929
1929
|
assessment: [],
|
|
1930
1930
|
section: [],
|
|
1931
1931
|
item: [],
|
|
1932
1932
|
passage: [],
|
|
1933
1933
|
rubric: [],
|
|
1934
1934
|
element: []
|
|
1935
|
-
},
|
|
1936
|
-
section: [...
|
|
1937
|
-
item: [...
|
|
1938
|
-
passage: [...
|
|
1935
|
+
}, Wt = {
|
|
1936
|
+
section: [...Gt.section],
|
|
1937
|
+
item: [...Gt.item],
|
|
1938
|
+
passage: [...Gt.passage]
|
|
1939
1939
|
};
|
|
1940
|
-
function
|
|
1940
|
+
function Ne(e) {
|
|
1941
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1942
|
+
}
|
|
1943
|
+
function me(e, t) {
|
|
1944
|
+
if (e == null) return [];
|
|
1945
|
+
if (!Array.isArray(e)) throw new Error(`Invalid tools config at "${t}": expected an array of tool ids.`);
|
|
1946
|
+
if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
1947
|
+
return e;
|
|
1948
|
+
}
|
|
1949
|
+
function Ko(e) {
|
|
1950
|
+
if (e != null) {
|
|
1951
|
+
if (!Ne(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
|
|
1952
|
+
return e;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
function Uo(e) {
|
|
1956
|
+
if (e != null) {
|
|
1957
|
+
if (!Ne(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
|
|
1958
|
+
return e;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
function Yo(e, t) {
|
|
1962
|
+
if (t == null) return;
|
|
1963
|
+
if (!Ne(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
|
|
1964
|
+
const r = t;
|
|
1965
|
+
if ("enabled" in r && r.enabled !== void 0 && typeof r.enabled != "boolean") throw new Error(`Invalid tools config at "providers.${e}.enabled": expected a boolean.`);
|
|
1966
|
+
if ("settings" in r && r.settings !== void 0 && !Ne(r.settings)) throw new Error(`Invalid tools config at "providers.${e}.settings": expected an object.`);
|
|
1967
|
+
if ("provider" in r && r.provider !== void 0 && !Ne(r.provider)) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
|
|
1968
|
+
return r;
|
|
1969
|
+
}
|
|
1970
|
+
function Xo(e) {
|
|
1971
|
+
if (e == null) return {};
|
|
1972
|
+
if (!Ne(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
|
|
1973
|
+
const t = {};
|
|
1974
|
+
for (const [r, i] of Object.entries(e)) t[r] = Yo(r, i);
|
|
1975
|
+
return t;
|
|
1976
|
+
}
|
|
1977
|
+
function Zi(e) {
|
|
1941
1978
|
const t = e.trim();
|
|
1942
1979
|
return t || "";
|
|
1943
1980
|
}
|
|
1944
|
-
|
|
1981
|
+
function _e(e) {
|
|
1982
|
+
if (!e || e.length === 0) return [];
|
|
1983
|
+
const t = /* @__PURE__ */ new Set();
|
|
1984
|
+
for (const r of e) {
|
|
1985
|
+
if (typeof r != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
|
|
1986
|
+
const i = Zi(r);
|
|
1987
|
+
i && t.add(i);
|
|
1988
|
+
}
|
|
1989
|
+
return Array.from(t);
|
|
1990
|
+
}
|
|
1991
|
+
function Qo(e) {
|
|
1992
|
+
if (e != null) {
|
|
1993
|
+
if (e === "on" || e === "off") return e;
|
|
1994
|
+
throw new Error(`Invalid tools config at "qtiEnforcement": expected "on" or "off", got ${JSON.stringify(e)}.`);
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
function Jo(e) {
|
|
1998
|
+
if (e != null && !Ne(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
1999
|
+
const t = Uo(e?.policy), r = Ko(e?.placement), i = Xo(e?.providers), n = Qo(e?.qtiEnforcement), o = {
|
|
2000
|
+
policy: {
|
|
2001
|
+
allowed: _e(me(t?.allowed, "policy.allowed")),
|
|
2002
|
+
blocked: _e(me(t?.blocked, "policy.blocked"))
|
|
2003
|
+
},
|
|
2004
|
+
placement: {
|
|
2005
|
+
section: _e(me(r?.section, "placement.section")).length ? _e(me(r?.section, "placement.section")) : [...Wt.section],
|
|
2006
|
+
item: _e(me(r?.item, "placement.item")).length ? _e(me(r?.item, "placement.item")) : [...Wt.item],
|
|
2007
|
+
passage: _e(me(r?.passage, "placement.passage")).length ? _e(me(r?.passage, "placement.passage")) : [...Wt.passage]
|
|
2008
|
+
},
|
|
2009
|
+
providers: i
|
|
2010
|
+
};
|
|
2011
|
+
return n && (o.qtiEnforcement = n), o;
|
|
2012
|
+
}
|
|
2013
|
+
var Zo = [
|
|
1945
2014
|
"assessment",
|
|
1946
2015
|
"section",
|
|
1947
2016
|
"item",
|
|
@@ -1949,10 +2018,10 @@ var Vs = [
|
|
|
1949
2018
|
"rubric",
|
|
1950
2019
|
"element"
|
|
1951
2020
|
];
|
|
1952
|
-
function
|
|
2021
|
+
function Et(e, t) {
|
|
1953
2022
|
if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
|
|
1954
2023
|
}
|
|
1955
|
-
var
|
|
2024
|
+
var es = [
|
|
1956
2025
|
{
|
|
1957
2026
|
pattern: /<script\b/i,
|
|
1958
2027
|
reason: "contains a <script> tag"
|
|
@@ -1970,17 +2039,17 @@ var zs = [
|
|
|
1970
2039
|
reason: "contains a <foreignObject> element"
|
|
1971
2040
|
}
|
|
1972
2041
|
];
|
|
1973
|
-
function
|
|
1974
|
-
const i = t.trimStart(), n = i.toLowerCase().startsWith("<svg"),
|
|
2042
|
+
function ts(e, t, r) {
|
|
2043
|
+
const i = t.trimStart(), n = i.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(i);
|
|
1975
2044
|
if (/^data:/i.test(i)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
|
|
1976
|
-
if (!(!n && !
|
|
1977
|
-
for (const { pattern:
|
|
2045
|
+
if (!(!n && !o)) {
|
|
2046
|
+
for (const { pattern: s, reason: l } of es) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${l}. Inline SVG icons must not include scriptable content.`);
|
|
1978
2047
|
}
|
|
1979
2048
|
}
|
|
1980
|
-
function
|
|
1981
|
-
if (
|
|
1982
|
-
if (typeof e.icon == "string" &&
|
|
1983
|
-
const t = e.supportedLevels.find((r) => !
|
|
2049
|
+
function Kr(e) {
|
|
2050
|
+
if (Et(e.toolId, "toolId"), Et(e.name, "name"), Et(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
|
|
2051
|
+
if (typeof e.icon == "string" && ts(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2052
|
+
const t = e.supportedLevels.find((r) => !Zo.includes(r));
|
|
1984
2053
|
if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
|
|
1985
2054
|
if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
|
|
1986
2055
|
if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
|
|
@@ -1989,23 +2058,23 @@ function zr(e) {
|
|
|
1989
2058
|
if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
|
|
1990
2059
|
if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
|
|
1991
2060
|
}
|
|
1992
|
-
var
|
|
2061
|
+
var rs = class {
|
|
1993
2062
|
constructor() {
|
|
1994
2063
|
u(this, "tools", /* @__PURE__ */ new Map()), u(this, "pnpIndex", /* @__PURE__ */ new Map()), u(this, "componentOverrides", {}), u(this, "moduleLoaders", /* @__PURE__ */ new Map()), u(this, "loadedToolModules", /* @__PURE__ */ new Set()), u(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
1995
2064
|
}
|
|
1996
2065
|
normalizeToolId(e) {
|
|
1997
|
-
return
|
|
2066
|
+
return Zi(e);
|
|
1998
2067
|
}
|
|
1999
2068
|
normalizeToolIds(e) {
|
|
2000
2069
|
return e.map((t) => this.normalizeToolId(t));
|
|
2001
2070
|
}
|
|
2002
2071
|
register(e) {
|
|
2003
|
-
if (
|
|
2072
|
+
if (Kr(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
2004
2073
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
|
|
2005
2074
|
this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
|
|
2006
2075
|
}
|
|
2007
2076
|
override(e) {
|
|
2008
|
-
if (
|
|
2077
|
+
if (Kr(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
2009
2078
|
const t = this.tools.get(e.toolId);
|
|
2010
2079
|
if (t.pnpSupportIds) for (const r of t.pnpSupportIds) this.pnpIndex.get(r)?.delete(e.toolId);
|
|
2011
2080
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const r of e.pnpSupportIds)
|
|
@@ -2056,8 +2125,8 @@ var Ws = class {
|
|
|
2056
2125
|
if (n.supportedLevels.includes(t.level))
|
|
2057
2126
|
try {
|
|
2058
2127
|
n.isVisibleInContext(t) && r.push(n);
|
|
2059
|
-
} catch (
|
|
2060
|
-
console.error(`Error evaluating visibility for tool '${i}':`,
|
|
2128
|
+
} catch (o) {
|
|
2129
|
+
console.error(`Error evaluating visibility for tool '${i}':`, o);
|
|
2061
2130
|
}
|
|
2062
2131
|
}
|
|
2063
2132
|
return r;
|
|
@@ -2090,7 +2159,7 @@ var Ws = class {
|
|
|
2090
2159
|
setToolModuleLoaders(e) {
|
|
2091
2160
|
for (const [t, r] of Object.entries(e))
|
|
2092
2161
|
if (r) {
|
|
2093
|
-
if (
|
|
2162
|
+
if (Et(t, "tool module loader id"), typeof r != "function") throw new Error(`Invalid tool module loader for "${t}": expected a function.`);
|
|
2094
2163
|
this.moduleLoaders.set(t, r);
|
|
2095
2164
|
}
|
|
2096
2165
|
}
|
|
@@ -2132,27 +2201,27 @@ var Ws = class {
|
|
|
2132
2201
|
return i.renderToolbar(t, n);
|
|
2133
2202
|
}
|
|
2134
2203
|
};
|
|
2135
|
-
function
|
|
2204
|
+
function en(e) {
|
|
2136
2205
|
return e.level === "item";
|
|
2137
2206
|
}
|
|
2138
|
-
function
|
|
2207
|
+
function is(e) {
|
|
2139
2208
|
return e.level === "passage";
|
|
2140
2209
|
}
|
|
2141
|
-
function
|
|
2210
|
+
function ns(e) {
|
|
2142
2211
|
return e.level === "rubric";
|
|
2143
2212
|
}
|
|
2144
|
-
function
|
|
2213
|
+
function tn(e) {
|
|
2145
2214
|
return e.level === "element";
|
|
2146
2215
|
}
|
|
2147
|
-
function
|
|
2148
|
-
if (
|
|
2216
|
+
function br(e) {
|
|
2217
|
+
if (tn(e)) {
|
|
2149
2218
|
const t = e.item.config;
|
|
2150
2219
|
if (!t) return "";
|
|
2151
2220
|
const r = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
|
|
2152
2221
|
n && typeof n == "string" && r.push(i(n));
|
|
2153
|
-
const
|
|
2154
|
-
if (
|
|
2155
|
-
for (const l of Object.values(
|
|
2222
|
+
const o = t.models, s = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((l) => l && typeof l == "object" && l.id === e.elementId);
|
|
2223
|
+
if (s) {
|
|
2224
|
+
for (const l of Object.values(s))
|
|
2156
2225
|
if (typeof l == "string" && r.push(i(l)), Array.isArray(l)) {
|
|
2157
2226
|
for (const c of l) if (c && typeof c == "object")
|
|
2158
2227
|
for (const d of Object.values(c)) typeof d == "string" && r.push(i(d));
|
|
@@ -2160,15 +2229,15 @@ function mr(e) {
|
|
|
2160
2229
|
}
|
|
2161
2230
|
return r.filter(Boolean).join(" ").trim();
|
|
2162
2231
|
}
|
|
2163
|
-
if (
|
|
2232
|
+
if (en(e)) {
|
|
2164
2233
|
const t = e.item;
|
|
2165
2234
|
if (!t?.config) return "";
|
|
2166
2235
|
const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
|
|
2167
2236
|
typeof r.markup == "string" && i.push(n(r.markup));
|
|
2168
|
-
const
|
|
2169
|
-
if (
|
|
2170
|
-
for (const c of Object.values(
|
|
2171
|
-
const
|
|
2237
|
+
const o = r.elements;
|
|
2238
|
+
if (o && typeof o == "object")
|
|
2239
|
+
for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
|
|
2240
|
+
const s = r.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2172
2241
|
for (const c of l)
|
|
2173
2242
|
if (!(!c || typeof c != "object")) {
|
|
2174
2243
|
for (const d of Object.values(c))
|
|
@@ -2179,15 +2248,15 @@ function mr(e) {
|
|
|
2179
2248
|
}
|
|
2180
2249
|
return i.filter(Boolean).join(" ").trim();
|
|
2181
2250
|
}
|
|
2182
|
-
if (
|
|
2251
|
+
if (is(e)) {
|
|
2183
2252
|
const t = e.passage;
|
|
2184
2253
|
if (!t?.config) return "";
|
|
2185
2254
|
const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
|
|
2186
2255
|
typeof r.markup == "string" && i.push(n(r.markup)), typeof r.content == "string" && i.push(n(r.content)), typeof r.prompt == "string" && i.push(n(r.prompt));
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2189
|
-
for (const c of Object.values(
|
|
2190
|
-
const
|
|
2256
|
+
const o = r.elements;
|
|
2257
|
+
if (o && typeof o == "object")
|
|
2258
|
+
for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
|
|
2259
|
+
const s = r.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2191
2260
|
for (const c of l)
|
|
2192
2261
|
if (!(!c || typeof c != "object")) {
|
|
2193
2262
|
for (const d of Object.values(c))
|
|
@@ -2198,14 +2267,14 @@ function mr(e) {
|
|
|
2198
2267
|
}
|
|
2199
2268
|
return i.filter(Boolean).join(" ").trim();
|
|
2200
2269
|
}
|
|
2201
|
-
if (
|
|
2270
|
+
if (ns(e)) {
|
|
2202
2271
|
const t = e.rubricBlock;
|
|
2203
2272
|
return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
2204
2273
|
}
|
|
2205
2274
|
return "";
|
|
2206
2275
|
}
|
|
2207
|
-
function
|
|
2208
|
-
const t =
|
|
2276
|
+
function Bt(e) {
|
|
2277
|
+
const t = br(e);
|
|
2209
2278
|
return [
|
|
2210
2279
|
/<math[>\s]/i,
|
|
2211
2280
|
/\\\[([^\]]+)\\\]/,
|
|
@@ -2215,7 +2284,7 @@ function Nt(e) {
|
|
|
2215
2284
|
/\d+\s*[+\-*/=]\s*\d+/
|
|
2216
2285
|
].some((r) => r.test(t));
|
|
2217
2286
|
}
|
|
2218
|
-
function
|
|
2287
|
+
function os(e) {
|
|
2219
2288
|
const t = [
|
|
2220
2289
|
"pie-multiple-choice",
|
|
2221
2290
|
"pie-inline-choice",
|
|
@@ -2224,15 +2293,15 @@ function Us(e) {
|
|
|
2224
2293
|
"inline-choice",
|
|
2225
2294
|
"select-text"
|
|
2226
2295
|
];
|
|
2227
|
-
if (
|
|
2296
|
+
if (tn(e)) {
|
|
2228
2297
|
const r = e.item.config;
|
|
2229
2298
|
if (!r?.models) return !1;
|
|
2230
|
-
const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((
|
|
2299
|
+
const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((o) => o && typeof o == "object" && o.id === e.elementId);
|
|
2231
2300
|
if (!i) return !1;
|
|
2232
2301
|
const n = i.element || "";
|
|
2233
2302
|
return t.includes(n);
|
|
2234
2303
|
}
|
|
2235
|
-
if (
|
|
2304
|
+
if (en(e)) {
|
|
2236
2305
|
const r = e.item.config?.models;
|
|
2237
2306
|
return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((i) => {
|
|
2238
2307
|
if (!i || typeof i != "object") return !1;
|
|
@@ -2242,11 +2311,11 @@ function Us(e) {
|
|
|
2242
2311
|
}
|
|
2243
2312
|
return !1;
|
|
2244
2313
|
}
|
|
2245
|
-
function
|
|
2246
|
-
return
|
|
2314
|
+
function jt(e) {
|
|
2315
|
+
return br(e).trim().length >= 10;
|
|
2247
2316
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const t =
|
|
2317
|
+
function ss(e) {
|
|
2318
|
+
const t = br(e);
|
|
2250
2319
|
return [
|
|
2251
2320
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
2252
2321
|
/periodic\s+table/i,
|
|
@@ -2256,23 +2325,23 @@ function Ys(e) {
|
|
|
2256
2325
|
/physics|force|energy|velocity|acceleration/i
|
|
2257
2326
|
].some((r) => r.test(t));
|
|
2258
2327
|
}
|
|
2259
|
-
var
|
|
2328
|
+
var as = [
|
|
2260
2329
|
"assessment",
|
|
2261
2330
|
"section",
|
|
2262
2331
|
"item",
|
|
2263
2332
|
"passage",
|
|
2264
2333
|
"rubric"
|
|
2265
|
-
],
|
|
2266
|
-
function
|
|
2267
|
-
return
|
|
2334
|
+
], ls = new Set(as);
|
|
2335
|
+
function cs(e) {
|
|
2336
|
+
return ls.has(e);
|
|
2268
2337
|
}
|
|
2269
|
-
function
|
|
2338
|
+
function wr(e, t, r) {
|
|
2270
2339
|
const i = e.trim(), n = r.trim();
|
|
2271
2340
|
if (!i || !n) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
2272
|
-
if (!
|
|
2341
|
+
if (!cs(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
2273
2342
|
return `${i}:${t}:${n}`;
|
|
2274
2343
|
}
|
|
2275
|
-
var
|
|
2344
|
+
var us = class {
|
|
2276
2345
|
constructor() {
|
|
2277
2346
|
u(this, "providerId", "desmos-calculator"), u(this, "providerName", "Desmos Calculator"), u(this, "category", "calculator"), u(this, "version", "1.10"), u(this, "requiresAuth", !0), u(this, "desmosProvider", null), u(this, "config", null);
|
|
2278
2347
|
}
|
|
@@ -2349,13 +2418,13 @@ var Zs = class {
|
|
|
2349
2418
|
destroy() {
|
|
2350
2419
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
2351
2420
|
}
|
|
2352
|
-
},
|
|
2421
|
+
}, ds = (e, t) => {
|
|
2353
2422
|
const r = t?.useSentenceSegmenter !== !1;
|
|
2354
2423
|
try {
|
|
2355
2424
|
if (!r) throw new Error("Segmenter disabled by policy");
|
|
2356
|
-
const
|
|
2357
|
-
if (typeof
|
|
2358
|
-
const l = new
|
|
2425
|
+
const s = globalThis.Intl?.Segmenter;
|
|
2426
|
+
if (typeof s == "function") {
|
|
2427
|
+
const l = new s(t?.locale, { granularity: "sentence" }), c = Array.from(l.segment(e)).map((d) => ({
|
|
2359
2428
|
text: d.segment,
|
|
2360
2429
|
offset: d.index
|
|
2361
2430
|
})).filter((d) => d.text.trim().length > 0);
|
|
@@ -2364,26 +2433,26 @@ var Zs = class {
|
|
|
2364
2433
|
} catch {
|
|
2365
2434
|
}
|
|
2366
2435
|
const i = e.match(/[^.!?]+(?:[.!?]+|$)/g) || [e], n = [];
|
|
2367
|
-
let
|
|
2368
|
-
for (const
|
|
2369
|
-
const l = e.indexOf(
|
|
2436
|
+
let o = 0;
|
|
2437
|
+
for (const s of i) {
|
|
2438
|
+
const l = e.indexOf(s, o);
|
|
2370
2439
|
l !== -1 && (n.push({
|
|
2371
|
-
text:
|
|
2440
|
+
text: s,
|
|
2372
2441
|
offset: l
|
|
2373
|
-
}),
|
|
2442
|
+
}), o = l + s.length);
|
|
2374
2443
|
}
|
|
2375
2444
|
return n.length > 0 ? n : [{
|
|
2376
2445
|
text: e,
|
|
2377
2446
|
offset: 0
|
|
2378
2447
|
}];
|
|
2379
|
-
},
|
|
2448
|
+
}, fs = class {
|
|
2380
2449
|
constructor() {
|
|
2381
2450
|
u(this, "providerId", "browser"), u(this, "providerName", "Browser Speech Synthesis"), u(this, "version", "1.0.0");
|
|
2382
2451
|
}
|
|
2383
2452
|
async initialize(e) {
|
|
2384
2453
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
2385
2454
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
2386
|
-
return new
|
|
2455
|
+
return new hs(e);
|
|
2387
2456
|
}
|
|
2388
2457
|
supportsFeature(e) {
|
|
2389
2458
|
return !0;
|
|
@@ -2400,7 +2469,7 @@ var Zs = class {
|
|
|
2400
2469
|
}
|
|
2401
2470
|
destroy() {
|
|
2402
2471
|
}
|
|
2403
|
-
},
|
|
2472
|
+
}, hs = class {
|
|
2404
2473
|
constructor(e) {
|
|
2405
2474
|
u(this, "utterance", null), u(this, "config", null), u(this, "_isPlaying", !1), u(this, "_isPaused", !1), u(this, "speakRunId", 0), u(this, "onWordBoundary", void 0), this.config = e;
|
|
2406
2475
|
}
|
|
@@ -2418,8 +2487,8 @@ var Zs = class {
|
|
|
2418
2487
|
for (const r of e) {
|
|
2419
2488
|
if (t !== this.speakRunId) break;
|
|
2420
2489
|
const i = this.splitIntoChunks(r.text);
|
|
2421
|
-
for (const
|
|
2422
|
-
if (t !== this.speakRunId || !await this.speakChunk(
|
|
2490
|
+
for (const o of i)
|
|
2491
|
+
if (t !== this.speakRunId || !await this.speakChunk(o.text, r.startOffset + o.offset, t)) break;
|
|
2423
2492
|
const n = Math.max(0, Number(r.pauseMsAfter || 0));
|
|
2424
2493
|
if (n > 0 && t === this.speakRunId && !await this.waitForPause(n, t))
|
|
2425
2494
|
break;
|
|
@@ -2434,24 +2503,24 @@ var Zs = class {
|
|
|
2434
2503
|
offset: 0
|
|
2435
2504
|
}];
|
|
2436
2505
|
const r = this.segmentSentences(e), i = [];
|
|
2437
|
-
let n = "",
|
|
2438
|
-
for (const
|
|
2439
|
-
const l =
|
|
2506
|
+
let n = "", o = 0;
|
|
2507
|
+
for (const s of r) {
|
|
2508
|
+
const l = s.text.trim();
|
|
2440
2509
|
if (!l) continue;
|
|
2441
|
-
const c =
|
|
2510
|
+
const c = s.text.search(/\S/), d = s.offset + (c === -1 ? 0 : c);
|
|
2442
2511
|
if (!n) {
|
|
2443
|
-
n = l,
|
|
2512
|
+
n = l, o = d;
|
|
2444
2513
|
continue;
|
|
2445
2514
|
}
|
|
2446
2515
|
const f = `${n} ${l}`;
|
|
2447
2516
|
f.length <= 260 ? n = f : (i.push({
|
|
2448
2517
|
text: n,
|
|
2449
|
-
offset:
|
|
2450
|
-
}), n = l,
|
|
2518
|
+
offset: o
|
|
2519
|
+
}), n = l, o = d);
|
|
2451
2520
|
}
|
|
2452
2521
|
return n && i.push({
|
|
2453
2522
|
text: n,
|
|
2454
|
-
offset:
|
|
2523
|
+
offset: o
|
|
2455
2524
|
}), i.length ? i : [{
|
|
2456
2525
|
text: e,
|
|
2457
2526
|
offset: 0
|
|
@@ -2470,7 +2539,7 @@ var Zs = class {
|
|
|
2470
2539
|
}
|
|
2471
2540
|
segmentSentences(e) {
|
|
2472
2541
|
const t = this.getSegmentationPolicy();
|
|
2473
|
-
return
|
|
2542
|
+
return ds(e, {
|
|
2474
2543
|
locale: t.locale,
|
|
2475
2544
|
useSentenceSegmenter: t.useSentenceSegmenter
|
|
2476
2545
|
});
|
|
@@ -2486,8 +2555,8 @@ var Zs = class {
|
|
|
2486
2555
|
return;
|
|
2487
2556
|
}
|
|
2488
2557
|
if (this.utterance = new SpeechSynthesisUtterance(e), this.config?.voice) {
|
|
2489
|
-
const
|
|
2490
|
-
|
|
2558
|
+
const o = speechSynthesis.getVoices().find((s) => s.name === this.config.voice);
|
|
2559
|
+
o && (this.utterance.voice = o);
|
|
2491
2560
|
}
|
|
2492
2561
|
this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
|
|
2493
2562
|
r === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
@@ -2497,23 +2566,23 @@ var Zs = class {
|
|
|
2497
2566
|
return;
|
|
2498
2567
|
}
|
|
2499
2568
|
this._isPlaying = !1, this._isPaused = !1, i(!0);
|
|
2500
|
-
}, this.utterance.onerror = (
|
|
2569
|
+
}, this.utterance.onerror = (o) => {
|
|
2501
2570
|
if (r !== this.speakRunId) {
|
|
2502
2571
|
i(!1);
|
|
2503
2572
|
return;
|
|
2504
2573
|
}
|
|
2505
|
-
if (this._isPlaying = !1, this._isPaused = !1,
|
|
2574
|
+
if (this._isPlaying = !1, this._isPaused = !1, o.error === "interrupted" || o.error === "canceled") {
|
|
2506
2575
|
i(!1);
|
|
2507
2576
|
return;
|
|
2508
2577
|
}
|
|
2509
|
-
n(/* @__PURE__ */ new Error(`Speech synthesis error: ${
|
|
2578
|
+
n(/* @__PURE__ */ new Error(`Speech synthesis error: ${o.error}`));
|
|
2510
2579
|
}, this.utterance.onpause = () => {
|
|
2511
2580
|
r === this.speakRunId && (this._isPaused = !0);
|
|
2512
2581
|
}, this.utterance.onresume = () => {
|
|
2513
2582
|
r === this.speakRunId && (this._isPaused = !1);
|
|
2514
|
-
}, this.utterance.onboundary = (
|
|
2515
|
-
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:",
|
|
2516
|
-
const
|
|
2583
|
+
}, this.utterance.onboundary = (o) => {
|
|
2584
|
+
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
|
|
2585
|
+
const s = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), l = Number(o.charLength || 0), c = this.inferWordLength(e, s), d = Number.isFinite(l) && l > 0 && l <= 80 && s + l <= e.length ? l : c, f = e.substring(s, Math.min(e.length, s + d)).trim(), v = t + s;
|
|
2517
2586
|
console.log("[BrowserProvider] Calling onWordBoundary with word:", f, "at position:", v), this.onWordBoundary(f, v, d);
|
|
2518
2587
|
}, speechSynthesis.speak(this.utterance);
|
|
2519
2588
|
});
|
|
@@ -2539,7 +2608,7 @@ var Zs = class {
|
|
|
2539
2608
|
...e.providerOptions || {}
|
|
2540
2609
|
});
|
|
2541
2610
|
}
|
|
2542
|
-
},
|
|
2611
|
+
}, ps = class {
|
|
2543
2612
|
async emitTelemetry(e, t) {
|
|
2544
2613
|
try {
|
|
2545
2614
|
await this.config?.onTelemetry?.(e, t);
|
|
@@ -2571,7 +2640,7 @@ var Zs = class {
|
|
|
2571
2640
|
}
|
|
2572
2641
|
async _initializeBrowserTTS(e) {
|
|
2573
2642
|
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
2574
|
-
this.ttsProvider = new
|
|
2643
|
+
this.ttsProvider = new fs(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
2575
2644
|
}
|
|
2576
2645
|
async _initializeServerTTS(e) {
|
|
2577
2646
|
if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
@@ -2629,7 +2698,7 @@ var Zs = class {
|
|
|
2629
2698
|
destroy() {
|
|
2630
2699
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
2631
2700
|
}
|
|
2632
|
-
},
|
|
2701
|
+
}, vs = /* @__PURE__ */ new Set([
|
|
2633
2702
|
"annotation-xml",
|
|
2634
2703
|
"color-profile",
|
|
2635
2704
|
"font-face",
|
|
@@ -2638,16 +2707,16 @@ var Zs = class {
|
|
|
2638
2707
|
"font-face-format",
|
|
2639
2708
|
"font-face-name",
|
|
2640
2709
|
"missing-glyph"
|
|
2641
|
-
]),
|
|
2710
|
+
]), gs = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, ms = (e, t = "custom element tag") => {
|
|
2642
2711
|
if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
|
|
2643
2712
|
const r = e.trim();
|
|
2644
2713
|
if (!r) throw new Error(`Invalid ${t}: tag is empty`);
|
|
2645
2714
|
if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
|
|
2646
2715
|
if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
|
|
2647
|
-
if (
|
|
2648
|
-
if (!
|
|
2716
|
+
if (vs.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
|
|
2717
|
+
if (!gs.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
2649
2718
|
return r;
|
|
2650
|
-
},
|
|
2719
|
+
}, rn = {
|
|
2651
2720
|
calculator: "pie-tool-calculator",
|
|
2652
2721
|
textToSpeech: "pie-tool-text-to-speech",
|
|
2653
2722
|
ruler: "pie-tool-ruler",
|
|
@@ -2660,22 +2729,22 @@ var Zs = class {
|
|
|
2660
2729
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
2661
2730
|
graph: "pie-tool-graph",
|
|
2662
2731
|
periodicTable: "pie-tool-periodic-table"
|
|
2663
|
-
},
|
|
2664
|
-
const n =
|
|
2665
|
-
return
|
|
2732
|
+
}, _s = (e, t) => ms(t?.toolTagMap?.[e] ?? rn[e] ?? e, `tool component tag for "${e}"`), ys = (e) => document.createElement(e), ce = (e, t, r, i) => {
|
|
2733
|
+
const n = _s(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
|
|
2734
|
+
return o ? o({
|
|
2666
2735
|
toolId: e,
|
|
2667
2736
|
tagName: n,
|
|
2668
2737
|
context: t,
|
|
2669
2738
|
toolbarContext: r
|
|
2670
|
-
}) :
|
|
2671
|
-
},
|
|
2739
|
+
}) : ys(n);
|
|
2740
|
+
}, bs = {
|
|
2672
2741
|
toolId: "calculator",
|
|
2673
2742
|
name: "Calculator",
|
|
2674
2743
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
2675
2744
|
icon: "calculator",
|
|
2676
2745
|
provider: {
|
|
2677
2746
|
getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
|
|
2678
|
-
createProvider: () => new
|
|
2747
|
+
createProvider: () => new us(),
|
|
2679
2748
|
getInitConfig: (e) => e?.provider?.init ?? {},
|
|
2680
2749
|
getAuthFetcher: (e) => {
|
|
2681
2750
|
const t = e?.provider?.runtime?.authFetcher;
|
|
@@ -2698,12 +2767,12 @@ var Zs = class {
|
|
|
2698
2767
|
"scientificCalculator"
|
|
2699
2768
|
],
|
|
2700
2769
|
isVisibleInContext(e) {
|
|
2701
|
-
return
|
|
2770
|
+
return Bt(e);
|
|
2702
2771
|
},
|
|
2703
2772
|
renderToolbar(e, t) {
|
|
2704
|
-
const r =
|
|
2773
|
+
const r = wr(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ce(this.toolId, e, t, i);
|
|
2705
2774
|
n.setAttribute("tool-id", r), n.toolkitCoordinator = t.toolkitCoordinator;
|
|
2706
|
-
const
|
|
2775
|
+
const o = {
|
|
2707
2776
|
toolId: this.toolId,
|
|
2708
2777
|
label: this.name,
|
|
2709
2778
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -2713,8 +2782,8 @@ var Zs = class {
|
|
|
2713
2782
|
onClick: () => t.toggleTool(this.toolId),
|
|
2714
2783
|
active: t.isToolVisible(r)
|
|
2715
2784
|
};
|
|
2716
|
-
let
|
|
2717
|
-
return n.visible =
|
|
2785
|
+
let s = o.active;
|
|
2786
|
+
return n.visible = o.active, {
|
|
2718
2787
|
toolId: this.toolId,
|
|
2719
2788
|
elements: [{
|
|
2720
2789
|
element: n,
|
|
@@ -2730,10 +2799,10 @@ var Zs = class {
|
|
|
2730
2799
|
minHeight: 420
|
|
2731
2800
|
}
|
|
2732
2801
|
}],
|
|
2733
|
-
button:
|
|
2802
|
+
button: o,
|
|
2734
2803
|
sync: () => {
|
|
2735
2804
|
const l = t.isToolVisible(r);
|
|
2736
|
-
|
|
2805
|
+
o.active = l, o.ariaLabel = l ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = l ? "Close calculator" : "Calculator", s !== l && (n.visible = l, s = l), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
|
|
2737
2806
|
},
|
|
2738
2807
|
subscribeActive: (l) => t.subscribeVisibility ? t.subscribeVisibility(() => {
|
|
2739
2808
|
l(t.isToolVisible(r));
|
|
@@ -2741,13 +2810,13 @@ var Zs = class {
|
|
|
2741
2810
|
}
|
|
2742
2811
|
};
|
|
2743
2812
|
}
|
|
2744
|
-
},
|
|
2813
|
+
}, ws = /* @__PURE__ */ new Set([
|
|
2745
2814
|
"reserved-row",
|
|
2746
2815
|
"expanding-row",
|
|
2747
2816
|
"floating-overlay",
|
|
2748
2817
|
"left-aligned"
|
|
2749
|
-
]),
|
|
2750
|
-
if (!Array.isArray(e)) return [...
|
|
2818
|
+
]), Ur = (e) => e && typeof e == "object" ? e : {}, Ts = (e) => e === "polly" || e === "google" || e === "server", G = (e, t) => e === void 0 ? t : e, Pt = (e, t = "left-aligned") => typeof e == "string" && ws.has(e) ? e : t, Yr = Object.freeze([0.8, 1.25]), qt = (e) => {
|
|
2819
|
+
if (!Array.isArray(e)) return [...Yr];
|
|
2751
2820
|
if (e.length === 0) return [];
|
|
2752
2821
|
const t = /* @__PURE__ */ new Set();
|
|
2753
2822
|
for (const r of e) {
|
|
@@ -2755,13 +2824,13 @@ var Zs = class {
|
|
|
2755
2824
|
const i = Math.round(r * 100) / 100;
|
|
2756
2825
|
i !== 1 && t.add(i);
|
|
2757
2826
|
}
|
|
2758
|
-
return t.size ? Array.from(t) : [...
|
|
2759
|
-
},
|
|
2827
|
+
return t.size ? Array.from(t) : [...Yr];
|
|
2828
|
+
}, As = (e) => {
|
|
2760
2829
|
const t = {
|
|
2761
2830
|
...e,
|
|
2762
|
-
layoutMode:
|
|
2831
|
+
layoutMode: Pt(e.layoutMode)
|
|
2763
2832
|
}, r = e.backend || "browser";
|
|
2764
|
-
if (!
|
|
2833
|
+
if (!Ts(r)) return t;
|
|
2765
2834
|
const i = {
|
|
2766
2835
|
...t,
|
|
2767
2836
|
apiEndpoint: G(t.apiEndpoint, "/api/tts"),
|
|
@@ -2782,14 +2851,14 @@ var Zs = class {
|
|
|
2782
2851
|
...i,
|
|
2783
2852
|
defaultVoice: G(i.defaultVoice, "en-US-Wavenet-A")
|
|
2784
2853
|
} : i;
|
|
2785
|
-
},
|
|
2786
|
-
const t =
|
|
2787
|
-
return
|
|
2854
|
+
}, Kt = (e) => {
|
|
2855
|
+
const t = Ur(e), r = Ur(e?.settings);
|
|
2856
|
+
return As({
|
|
2788
2857
|
...t,
|
|
2789
2858
|
...r
|
|
2790
2859
|
});
|
|
2791
|
-
},
|
|
2792
|
-
const t =
|
|
2860
|
+
}, sr = (e) => e.backend || "browser", nn = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, on = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Ss = (e) => {
|
|
2861
|
+
const t = sr(e), r = nn(e, t), i = on(e, r);
|
|
2793
2862
|
return {
|
|
2794
2863
|
voice: e.defaultVoice,
|
|
2795
2864
|
rate: e.rate,
|
|
@@ -2813,8 +2882,8 @@ var Zs = class {
|
|
|
2813
2882
|
includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
|
|
2814
2883
|
validateEndpoint: e.validateEndpoint
|
|
2815
2884
|
};
|
|
2816
|
-
},
|
|
2817
|
-
switch (
|
|
2885
|
+
}, sn = (e) => Pt(e.layoutMode), Is = (e) => {
|
|
2886
|
+
switch (sn(e)) {
|
|
2818
2887
|
case "reserved-row":
|
|
2819
2888
|
return {
|
|
2820
2889
|
mount: "before-buttons",
|
|
@@ -2840,21 +2909,21 @@ var Zs = class {
|
|
|
2840
2909
|
}
|
|
2841
2910
|
};
|
|
2842
2911
|
}
|
|
2843
|
-
},
|
|
2912
|
+
}, rt = /* @__PURE__ */ new Map(), Es = "__pieToolElementUnmount", Xr = "pie-tool-active-change", ks = {
|
|
2844
2913
|
toolId: "textToSpeech",
|
|
2845
2914
|
name: "Text to Speech",
|
|
2846
2915
|
description: "Read content aloud",
|
|
2847
2916
|
icon: "volume-up",
|
|
2848
2917
|
provider: {
|
|
2849
2918
|
getProviderId: () => "tts",
|
|
2850
|
-
createProvider: (e) => new
|
|
2919
|
+
createProvider: (e) => new ps(sr(Kt(e))),
|
|
2851
2920
|
getInitConfig: (e) => {
|
|
2852
|
-
const t =
|
|
2921
|
+
const t = Kt(e), r = sr(t), i = nn(t, r);
|
|
2853
2922
|
return {
|
|
2854
2923
|
backend: r,
|
|
2855
2924
|
serverProvider: i,
|
|
2856
|
-
transportMode:
|
|
2857
|
-
...
|
|
2925
|
+
transportMode: on(t, i),
|
|
2926
|
+
...Ss(t)
|
|
2858
2927
|
};
|
|
2859
2928
|
},
|
|
2860
2929
|
getAuthFetcher: (e) => {
|
|
@@ -2863,9 +2932,9 @@ var Zs = class {
|
|
|
2863
2932
|
},
|
|
2864
2933
|
sanitizeConfig: (e) => {
|
|
2865
2934
|
const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
|
|
2866
|
-
t && "layoutMode" in t && (t.layoutMode =
|
|
2935
|
+
t && "layoutMode" in t && (t.layoutMode = Pt(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = qt(t.speedOptions));
|
|
2867
2936
|
const r = { ...e };
|
|
2868
|
-
return "layoutMode" in r && (r.layoutMode =
|
|
2937
|
+
return "layoutMode" in r && (r.layoutMode = Pt(r.layoutMode)), "speedOptions" in r && (r.speedOptions = qt(r.speedOptions)), t && (r.settings = t), r;
|
|
2869
2938
|
},
|
|
2870
2939
|
lazy: !0
|
|
2871
2940
|
},
|
|
@@ -2877,18 +2946,18 @@ var Zs = class {
|
|
|
2877
2946
|
"speechOutput"
|
|
2878
2947
|
],
|
|
2879
2948
|
isVisibleInContext(e) {
|
|
2880
|
-
return
|
|
2949
|
+
return jt(e);
|
|
2881
2950
|
},
|
|
2882
2951
|
renderToolbar(e, t) {
|
|
2883
|
-
const r = () =>
|
|
2952
|
+
const r = () => Kt(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => qt(r().speedOptions), n = () => sn(r()), o = () => Is(r()), s = wr(this.toolId, t.scope.level, t.scope.scopeId), l = () => {
|
|
2884
2953
|
const f = t.ui?.size;
|
|
2885
2954
|
return f === "sm" || f === "lg" ? f : "md";
|
|
2886
2955
|
}, c = () => {
|
|
2887
|
-
let f =
|
|
2888
|
-
return f && typeof f.isConnected == "boolean" && !f.isConnected && (
|
|
2889
|
-
|
|
2890
|
-
},
|
|
2891
|
-
}, d =
|
|
2956
|
+
let f = rt.get(s);
|
|
2957
|
+
return f && typeof f.isConnected == "boolean" && !f.isConnected && (rt.delete(s), f = void 0), f || (f = document.createElement("pie-tool-tts-inline"), f[Es] = () => {
|
|
2958
|
+
rt.get(s) === f && rt.delete(s);
|
|
2959
|
+
}, rt.set(s, f)), f.setAttribute("tool-id", s), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", l()), f.setAttribute("layout-mode", n()), f.speedOptions = i(), f;
|
|
2960
|
+
}, d = o();
|
|
2892
2961
|
return {
|
|
2893
2962
|
toolId: this.toolId,
|
|
2894
2963
|
button: null,
|
|
@@ -2901,23 +2970,23 @@ var Zs = class {
|
|
|
2901
2970
|
} }
|
|
2902
2971
|
}],
|
|
2903
2972
|
subscribeActive: (f) => {
|
|
2904
|
-
const v = c(), h = (
|
|
2905
|
-
const p =
|
|
2973
|
+
const v = c(), h = (g) => {
|
|
2974
|
+
const p = g.detail;
|
|
2906
2975
|
f(p?.active === !0);
|
|
2907
2976
|
};
|
|
2908
|
-
return v.addEventListener(
|
|
2909
|
-
v.removeEventListener(
|
|
2977
|
+
return v.addEventListener(Xr, h), () => {
|
|
2978
|
+
v.removeEventListener(Xr, h);
|
|
2910
2979
|
};
|
|
2911
2980
|
},
|
|
2912
2981
|
sync: () => {
|
|
2913
2982
|
const f = c();
|
|
2914
|
-
f.setAttribute("tool-id",
|
|
2983
|
+
f.setAttribute("tool-id", s), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", l()), f.setAttribute("layout-mode", n()), f.speedOptions = i();
|
|
2915
2984
|
}
|
|
2916
2985
|
};
|
|
2917
2986
|
}
|
|
2918
2987
|
};
|
|
2919
2988
|
function he(e, t) {
|
|
2920
|
-
const r =
|
|
2989
|
+
const r = wr(e, t.scope.level, t.scope.scopeId);
|
|
2921
2990
|
return {
|
|
2922
2991
|
fullToolId: r,
|
|
2923
2992
|
isActive: () => t.isToolVisible(r),
|
|
@@ -2931,10 +3000,10 @@ function pe(e) {
|
|
|
2931
3000
|
const t = e.isActive();
|
|
2932
3001
|
e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
|
|
2933
3002
|
}
|
|
2934
|
-
function
|
|
3003
|
+
function Tr(e, t) {
|
|
2935
3004
|
e.setAttribute("data-pie-tool-surface", t);
|
|
2936
3005
|
}
|
|
2937
|
-
var
|
|
3006
|
+
var Cs = {
|
|
2938
3007
|
toolId: "ruler",
|
|
2939
3008
|
name: "Ruler",
|
|
2940
3009
|
description: "On-screen ruler for measurements",
|
|
@@ -2946,7 +3015,7 @@ var _o = {
|
|
|
2946
3015
|
],
|
|
2947
3016
|
pnpSupportIds: ["ruler", "measurement"],
|
|
2948
3017
|
isVisibleInContext(e) {
|
|
2949
|
-
return
|
|
3018
|
+
return Bt(e);
|
|
2950
3019
|
},
|
|
2951
3020
|
renderToolbar(e, t) {
|
|
2952
3021
|
const r = he(this.toolId, t), i = {
|
|
@@ -2958,25 +3027,25 @@ var _o = {
|
|
|
2958
3027
|
tooltip: "Ruler",
|
|
2959
3028
|
onClick: () => t.toggleTool(this.toolId),
|
|
2960
3029
|
active: r.isActive()
|
|
2961
|
-
}, n = t.componentOverrides ?? {},
|
|
2962
|
-
return
|
|
3030
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3031
|
+
return o.setAttribute("tool-id", r.fullToolId), Tr(o, "frameless"), {
|
|
2963
3032
|
toolId: this.toolId,
|
|
2964
3033
|
button: i,
|
|
2965
3034
|
elements: [{
|
|
2966
|
-
element:
|
|
3035
|
+
element: o,
|
|
2967
3036
|
mount: "after-buttons"
|
|
2968
3037
|
}],
|
|
2969
3038
|
sync: () => {
|
|
2970
3039
|
pe({
|
|
2971
3040
|
button: i,
|
|
2972
|
-
overlay:
|
|
3041
|
+
overlay: o,
|
|
2973
3042
|
isActive: r.isActive
|
|
2974
|
-
}), t.toolkitCoordinator && (
|
|
3043
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
2975
3044
|
},
|
|
2976
3045
|
subscribeActive: r.subscribeActive
|
|
2977
3046
|
};
|
|
2978
3047
|
}
|
|
2979
|
-
},
|
|
3048
|
+
}, $s = {
|
|
2980
3049
|
toolId: "protractor",
|
|
2981
3050
|
name: "Protractor",
|
|
2982
3051
|
description: "On-screen protractor for angle measurements",
|
|
@@ -2988,7 +3057,7 @@ var _o = {
|
|
|
2988
3057
|
],
|
|
2989
3058
|
pnpSupportIds: ["protractor", "angleMeasurement"],
|
|
2990
3059
|
isVisibleInContext(e) {
|
|
2991
|
-
return
|
|
3060
|
+
return Bt(e);
|
|
2992
3061
|
},
|
|
2993
3062
|
renderToolbar(e, t) {
|
|
2994
3063
|
const r = he(this.toolId, t), i = {
|
|
@@ -3000,25 +3069,25 @@ var _o = {
|
|
|
3000
3069
|
tooltip: "Protractor",
|
|
3001
3070
|
onClick: () => t.toggleTool(this.toolId),
|
|
3002
3071
|
active: r.isActive()
|
|
3003
|
-
}, n = t.componentOverrides ?? {},
|
|
3004
|
-
return
|
|
3072
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3073
|
+
return o.setAttribute("tool-id", r.fullToolId), Tr(o, "frameless"), {
|
|
3005
3074
|
toolId: this.toolId,
|
|
3006
3075
|
button: i,
|
|
3007
3076
|
elements: [{
|
|
3008
|
-
element:
|
|
3077
|
+
element: o,
|
|
3009
3078
|
mount: "after-buttons"
|
|
3010
3079
|
}],
|
|
3011
3080
|
sync: () => {
|
|
3012
3081
|
pe({
|
|
3013
3082
|
button: i,
|
|
3014
|
-
overlay:
|
|
3083
|
+
overlay: o,
|
|
3015
3084
|
isActive: r.isActive
|
|
3016
|
-
}), t.toolkitCoordinator && (
|
|
3085
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3017
3086
|
},
|
|
3018
3087
|
subscribeActive: r.subscribeActive
|
|
3019
3088
|
};
|
|
3020
3089
|
}
|
|
3021
|
-
},
|
|
3090
|
+
}, Ls = {
|
|
3022
3091
|
toolId: "answerEliminator",
|
|
3023
3092
|
name: "Answer Eliminator",
|
|
3024
3093
|
description: "Strike through answer choices",
|
|
@@ -3031,12 +3100,12 @@ var _o = {
|
|
|
3031
3100
|
"choiceMasking"
|
|
3032
3101
|
],
|
|
3033
3102
|
isVisibleInContext(e) {
|
|
3034
|
-
return
|
|
3103
|
+
return os(e);
|
|
3035
3104
|
},
|
|
3036
3105
|
renderToolbar(e, t) {
|
|
3037
3106
|
const r = he(this.toolId, t), i = t.componentOverrides ?? {}, n = ce(this.toolId, e, t, i);
|
|
3038
3107
|
n.setAttribute("tool-id", r.fullToolId), n.setAttribute("strategy", "strikethrough"), n.setAttribute("button-alignment", "inline");
|
|
3039
|
-
const
|
|
3108
|
+
const o = {
|
|
3040
3109
|
toolId: this.toolId,
|
|
3041
3110
|
label: this.name,
|
|
3042
3111
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M19,3H16.3H7.7H5A2,2 0 0,0 3,5V7.7V16.4V19A2,2 0 0,0 5,21H7.7H16.4H19A2,2 0 0,0 21,19V16.3V7.7V5A2,2 0 0,0 19,3M15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4L13.4,12L17,15.6L15.6,17Z"/></svg>',
|
|
@@ -3048,24 +3117,24 @@ var _o = {
|
|
|
3048
3117
|
};
|
|
3049
3118
|
return {
|
|
3050
3119
|
toolId: this.toolId,
|
|
3051
|
-
button:
|
|
3120
|
+
button: o,
|
|
3052
3121
|
elements: [{
|
|
3053
3122
|
element: n,
|
|
3054
3123
|
mount: "after-buttons"
|
|
3055
3124
|
}],
|
|
3056
3125
|
sync: () => {
|
|
3057
3126
|
pe({
|
|
3058
|
-
button:
|
|
3127
|
+
button: o,
|
|
3059
3128
|
overlay: n,
|
|
3060
3129
|
isActive: r.isActive
|
|
3061
3130
|
}), t.toolCoordinator && (n.coordinator = t.toolCoordinator), n.scopeElement = t.getScopeElement?.() || null, t.elementToolStateStore && (n.elementToolStateStore = t.elementToolStateStore);
|
|
3062
|
-
const
|
|
3063
|
-
|
|
3131
|
+
const s = t.getGlobalElementId?.();
|
|
3132
|
+
s && (n.globalElementId = s);
|
|
3064
3133
|
},
|
|
3065
3134
|
subscribeActive: r.subscribeActive
|
|
3066
3135
|
};
|
|
3067
3136
|
}
|
|
3068
|
-
},
|
|
3137
|
+
}, Os = {
|
|
3069
3138
|
toolId: "highlighter",
|
|
3070
3139
|
name: "Highlighter",
|
|
3071
3140
|
description: "Highlight text",
|
|
@@ -3083,7 +3152,7 @@ var _o = {
|
|
|
3083
3152
|
"annotation"
|
|
3084
3153
|
],
|
|
3085
3154
|
isVisibleInContext(e) {
|
|
3086
|
-
return
|
|
3155
|
+
return jt(e);
|
|
3087
3156
|
},
|
|
3088
3157
|
renderToolbar(e, t) {
|
|
3089
3158
|
const r = he(this.toolId, t), i = {
|
|
@@ -3095,28 +3164,28 @@ var _o = {
|
|
|
3095
3164
|
tooltip: "Highlight",
|
|
3096
3165
|
onClick: () => t.toggleTool(this.toolId),
|
|
3097
3166
|
active: r.isActive()
|
|
3098
|
-
}, n = t.componentOverrides ?? {},
|
|
3099
|
-
return
|
|
3167
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3168
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3100
3169
|
toolId: this.toolId,
|
|
3101
3170
|
button: i,
|
|
3102
3171
|
elements: [{
|
|
3103
|
-
element:
|
|
3172
|
+
element: o,
|
|
3104
3173
|
mount: "after-buttons"
|
|
3105
3174
|
}],
|
|
3106
3175
|
sync: () => {
|
|
3107
3176
|
pe({
|
|
3108
3177
|
button: i,
|
|
3109
|
-
overlay:
|
|
3178
|
+
overlay: o,
|
|
3110
3179
|
isActive: r.isActive,
|
|
3111
|
-
onActiveChange: (
|
|
3112
|
-
|
|
3180
|
+
onActiveChange: (s) => {
|
|
3181
|
+
o.enabled = s;
|
|
3113
3182
|
}
|
|
3114
|
-
}), t.ttsService && (
|
|
3183
|
+
}), t.ttsService && (o.ttsService = t.ttsService);
|
|
3115
3184
|
},
|
|
3116
3185
|
subscribeActive: r.subscribeActive
|
|
3117
3186
|
};
|
|
3118
3187
|
}
|
|
3119
|
-
},
|
|
3188
|
+
}, Rs = {
|
|
3120
3189
|
toolId: "lineReader",
|
|
3121
3190
|
name: "Line Reader",
|
|
3122
3191
|
description: "Reading guide overlay",
|
|
@@ -3135,7 +3204,7 @@ var _o = {
|
|
|
3135
3204
|
"trackingGuide"
|
|
3136
3205
|
],
|
|
3137
3206
|
isVisibleInContext(e) {
|
|
3138
|
-
return
|
|
3207
|
+
return jt(e);
|
|
3139
3208
|
},
|
|
3140
3209
|
renderToolbar(e, t) {
|
|
3141
3210
|
const r = he(this.toolId, t), i = {
|
|
@@ -3147,25 +3216,25 @@ var _o = {
|
|
|
3147
3216
|
tooltip: "Line Reader",
|
|
3148
3217
|
onClick: () => t.toggleTool(this.toolId),
|
|
3149
3218
|
active: r.isActive()
|
|
3150
|
-
}, n = t.componentOverrides ?? {},
|
|
3151
|
-
return
|
|
3219
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3220
|
+
return o.setAttribute("tool-id", r.fullToolId), Tr(o, "frameless"), {
|
|
3152
3221
|
toolId: this.toolId,
|
|
3153
3222
|
button: i,
|
|
3154
3223
|
elements: [{
|
|
3155
|
-
element:
|
|
3224
|
+
element: o,
|
|
3156
3225
|
mount: "after-buttons"
|
|
3157
3226
|
}],
|
|
3158
3227
|
sync: () => {
|
|
3159
3228
|
pe({
|
|
3160
3229
|
button: i,
|
|
3161
|
-
overlay:
|
|
3230
|
+
overlay: o,
|
|
3162
3231
|
isActive: r.isActive
|
|
3163
|
-
}), t.toolkitCoordinator && (
|
|
3232
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3164
3233
|
},
|
|
3165
3234
|
subscribeActive: r.subscribeActive
|
|
3166
3235
|
};
|
|
3167
3236
|
}
|
|
3168
|
-
},
|
|
3237
|
+
}, Ms = {
|
|
3169
3238
|
toolId: "theme",
|
|
3170
3239
|
name: "Theme",
|
|
3171
3240
|
description: "Accessible themes and contrast",
|
|
@@ -3193,12 +3262,12 @@ var _o = {
|
|
|
3193
3262
|
tooltip: "Theme",
|
|
3194
3263
|
onClick: () => t.toggleTool(this.toolId),
|
|
3195
3264
|
active: r.isActive()
|
|
3196
|
-
}, n = t.componentOverrides ?? {},
|
|
3197
|
-
return
|
|
3265
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3266
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3198
3267
|
toolId: this.toolId,
|
|
3199
3268
|
button: i,
|
|
3200
3269
|
elements: [{
|
|
3201
|
-
element:
|
|
3270
|
+
element: o,
|
|
3202
3271
|
mount: "after-buttons",
|
|
3203
3272
|
shell: {
|
|
3204
3273
|
title: this.name,
|
|
@@ -3214,14 +3283,14 @@ var _o = {
|
|
|
3214
3283
|
sync: () => {
|
|
3215
3284
|
pe({
|
|
3216
3285
|
button: i,
|
|
3217
|
-
overlay:
|
|
3286
|
+
overlay: o,
|
|
3218
3287
|
isActive: r.isActive
|
|
3219
|
-
}), t.toolkitCoordinator && (
|
|
3288
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3220
3289
|
},
|
|
3221
3290
|
subscribeActive: r.subscribeActive
|
|
3222
3291
|
};
|
|
3223
3292
|
}
|
|
3224
|
-
},
|
|
3293
|
+
}, Ps = {
|
|
3225
3294
|
toolId: "annotationToolbar",
|
|
3226
3295
|
name: "Highlighter",
|
|
3227
3296
|
description: "Highlight and annotate text",
|
|
@@ -3242,7 +3311,7 @@ var _o = {
|
|
|
3242
3311
|
"annotation"
|
|
3243
3312
|
],
|
|
3244
3313
|
isVisibleInContext(e) {
|
|
3245
|
-
return
|
|
3314
|
+
return jt(e);
|
|
3246
3315
|
},
|
|
3247
3316
|
renderToolbar(e, t) {
|
|
3248
3317
|
const r = he(this.toolId, t), i = {
|
|
@@ -3254,25 +3323,25 @@ var _o = {
|
|
|
3254
3323
|
tooltip: "Highlight",
|
|
3255
3324
|
onClick: () => t.toggleTool(this.toolId),
|
|
3256
3325
|
active: r.isActive()
|
|
3257
|
-
}, n = t.componentOverrides ?? {},
|
|
3258
|
-
return
|
|
3326
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3327
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3259
3328
|
toolId: this.toolId,
|
|
3260
3329
|
button: i,
|
|
3261
3330
|
elements: [{
|
|
3262
|
-
element:
|
|
3331
|
+
element: o,
|
|
3263
3332
|
mount: "after-buttons"
|
|
3264
3333
|
}],
|
|
3265
3334
|
sync: () => {
|
|
3266
3335
|
pe({
|
|
3267
3336
|
button: i,
|
|
3268
|
-
overlay:
|
|
3337
|
+
overlay: o,
|
|
3269
3338
|
isActive: r.isActive
|
|
3270
|
-
}), t.toolkitCoordinator && (
|
|
3339
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3271
3340
|
},
|
|
3272
3341
|
subscribeActive: r.subscribeActive
|
|
3273
3342
|
};
|
|
3274
3343
|
}
|
|
3275
|
-
},
|
|
3344
|
+
}, xs = {
|
|
3276
3345
|
toolId: "graph",
|
|
3277
3346
|
name: "Graph",
|
|
3278
3347
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -3285,7 +3354,7 @@ var _o = {
|
|
|
3285
3354
|
"graphingTool"
|
|
3286
3355
|
],
|
|
3287
3356
|
isVisibleInContext(e) {
|
|
3288
|
-
return
|
|
3357
|
+
return Bt(e);
|
|
3289
3358
|
},
|
|
3290
3359
|
renderToolbar(e, t) {
|
|
3291
3360
|
const r = he(this.toolId, t), i = {
|
|
@@ -3297,12 +3366,12 @@ var _o = {
|
|
|
3297
3366
|
tooltip: "Graph",
|
|
3298
3367
|
onClick: () => t.toggleTool(this.toolId),
|
|
3299
3368
|
active: r.isActive()
|
|
3300
|
-
}, n = t.componentOverrides ?? {},
|
|
3301
|
-
return
|
|
3369
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3370
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3302
3371
|
toolId: this.toolId,
|
|
3303
3372
|
button: i,
|
|
3304
3373
|
elements: [{
|
|
3305
|
-
element:
|
|
3374
|
+
element: o,
|
|
3306
3375
|
mount: "after-buttons",
|
|
3307
3376
|
shell: {
|
|
3308
3377
|
title: this.name,
|
|
@@ -3318,14 +3387,14 @@ var _o = {
|
|
|
3318
3387
|
sync: () => {
|
|
3319
3388
|
pe({
|
|
3320
3389
|
button: i,
|
|
3321
|
-
overlay:
|
|
3390
|
+
overlay: o,
|
|
3322
3391
|
isActive: r.isActive
|
|
3323
3392
|
});
|
|
3324
3393
|
},
|
|
3325
3394
|
subscribeActive: r.subscribeActive
|
|
3326
3395
|
};
|
|
3327
3396
|
}
|
|
3328
|
-
},
|
|
3397
|
+
}, Hs = {
|
|
3329
3398
|
toolId: "periodicTable",
|
|
3330
3399
|
name: "Periodic Table",
|
|
3331
3400
|
description: "Chemistry periodic table reference",
|
|
@@ -3337,7 +3406,7 @@ var _o = {
|
|
|
3337
3406
|
"elementReference"
|
|
3338
3407
|
],
|
|
3339
3408
|
isVisibleInContext(e) {
|
|
3340
|
-
return
|
|
3409
|
+
return ss(e);
|
|
3341
3410
|
},
|
|
3342
3411
|
renderToolbar(e, t) {
|
|
3343
3412
|
const r = he(this.toolId, t), i = {
|
|
@@ -3349,12 +3418,12 @@ var _o = {
|
|
|
3349
3418
|
tooltip: "Periodic Table",
|
|
3350
3419
|
onClick: () => t.toggleTool(this.toolId),
|
|
3351
3420
|
active: r.isActive()
|
|
3352
|
-
}, n = t.componentOverrides ?? {},
|
|
3353
|
-
return
|
|
3421
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3422
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3354
3423
|
toolId: this.toolId,
|
|
3355
3424
|
button: i,
|
|
3356
3425
|
elements: [{
|
|
3357
|
-
element:
|
|
3426
|
+
element: o,
|
|
3358
3427
|
mount: "after-buttons",
|
|
3359
3428
|
shell: {
|
|
3360
3429
|
title: this.name,
|
|
@@ -3370,61 +3439,61 @@ var _o = {
|
|
|
3370
3439
|
sync: () => {
|
|
3371
3440
|
pe({
|
|
3372
3441
|
button: i,
|
|
3373
|
-
overlay:
|
|
3442
|
+
overlay: o,
|
|
3374
3443
|
isActive: r.isActive
|
|
3375
3444
|
});
|
|
3376
3445
|
},
|
|
3377
3446
|
subscribeActive: r.subscribeActive
|
|
3378
3447
|
};
|
|
3379
3448
|
}
|
|
3380
|
-
},
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3449
|
+
}, Ns = [
|
|
3450
|
+
bs,
|
|
3451
|
+
ks,
|
|
3452
|
+
Cs,
|
|
3453
|
+
$s,
|
|
3454
|
+
Ls,
|
|
3455
|
+
Os,
|
|
3456
|
+
Rs,
|
|
3457
|
+
Ms,
|
|
3458
|
+
Ps,
|
|
3459
|
+
xs,
|
|
3460
|
+
Hs
|
|
3392
3461
|
];
|
|
3393
|
-
function
|
|
3394
|
-
const t = new
|
|
3462
|
+
function Ds(e = {}) {
|
|
3463
|
+
const t = new rs(), r = {
|
|
3395
3464
|
toolTagMap: {
|
|
3396
|
-
...
|
|
3465
|
+
...rn,
|
|
3397
3466
|
...e.toolTagMap || {}
|
|
3398
3467
|
},
|
|
3399
3468
|
toolComponentFactory: e.toolComponentFactory,
|
|
3400
3469
|
toolComponentFactories: e.toolComponentFactories
|
|
3401
3470
|
}, i = (n) => e.overrides?.[n.toolId] || n;
|
|
3402
|
-
return e.includePackagedTools &&
|
|
3471
|
+
return e.includePackagedTools && Fs(t, {
|
|
3403
3472
|
toolIds: e.toolIds,
|
|
3404
3473
|
applyOverrides: i
|
|
3405
3474
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
|
|
3406
3475
|
}
|
|
3407
|
-
function
|
|
3476
|
+
function Fs(e, t = {}) {
|
|
3408
3477
|
const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, i = t.applyOverrides || ((n) => n);
|
|
3409
|
-
for (const n of
|
|
3478
|
+
for (const n of Ns)
|
|
3410
3479
|
r && !r.has(n.toolId) || e.register(i(n));
|
|
3411
3480
|
}
|
|
3412
|
-
function
|
|
3413
|
-
return
|
|
3481
|
+
function Bs(e = {}) {
|
|
3482
|
+
return Ds({
|
|
3414
3483
|
...e,
|
|
3415
3484
|
includePackagedTools: !0
|
|
3416
3485
|
});
|
|
3417
3486
|
}
|
|
3418
|
-
function
|
|
3419
|
-
const e =
|
|
3487
|
+
function js() {
|
|
3488
|
+
const e = Bs(), t = /* @__PURE__ */ new Set();
|
|
3420
3489
|
for (const r of e.getAllTools()) for (const i of r.pnpSupportIds || []) t.add(i);
|
|
3421
3490
|
return [...t].sort();
|
|
3422
3491
|
}
|
|
3423
|
-
var
|
|
3424
|
-
supports: [...
|
|
3492
|
+
var zs = js(), la = {
|
|
3493
|
+
supports: [...zs],
|
|
3425
3494
|
prohibitedSupports: [],
|
|
3426
3495
|
activateAtInit: []
|
|
3427
|
-
},
|
|
3496
|
+
}, Vs = {
|
|
3428
3497
|
visual: {
|
|
3429
3498
|
magnification: "magnification",
|
|
3430
3499
|
screenMagnifier: "screenMagnifier",
|
|
@@ -3537,15 +3606,26 @@ var Ro = Oo(), Zo = {
|
|
|
3537
3606
|
itemGlossary: "itemGlossary",
|
|
3538
3607
|
tutorialAvailable: "tutorialAvailable"
|
|
3539
3608
|
}
|
|
3540
|
-
},
|
|
3609
|
+
}, ca = Object.values(Vs).flatMap((e) => Object.values(e)), ua = Ji("ToolCoordinator"), ar;
|
|
3541
3610
|
(function(e) {
|
|
3542
3611
|
e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
3543
|
-
})(
|
|
3544
|
-
var
|
|
3612
|
+
})(ar || (ar = {}));
|
|
3613
|
+
var Qr;
|
|
3545
3614
|
(function(e) {
|
|
3546
3615
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
3547
|
-
})(
|
|
3548
|
-
var
|
|
3616
|
+
})(Qr || (Qr = {}));
|
|
3617
|
+
var da = Jo({
|
|
3618
|
+
policy: {
|
|
3619
|
+
allowed: [],
|
|
3620
|
+
blocked: []
|
|
3621
|
+
},
|
|
3622
|
+
placement: {
|
|
3623
|
+
section: [],
|
|
3624
|
+
item: [],
|
|
3625
|
+
passage: []
|
|
3626
|
+
},
|
|
3627
|
+
providers: {}
|
|
3628
|
+
}), an, Ae = class Y {
|
|
3549
3629
|
constructor() {
|
|
3550
3630
|
u(this, "elementType", "multiple-choice"), u(this, "priority", 100);
|
|
3551
3631
|
}
|
|
@@ -3594,15 +3674,15 @@ var tn, we = class Y {
|
|
|
3594
3674
|
for (const r of t.querySelectorAll(".feedback-tick")) r.setAttribute(Y.FEEDBACK_HOOK_ATTR, "true");
|
|
3595
3675
|
}
|
|
3596
3676
|
};
|
|
3597
|
-
|
|
3598
|
-
u(
|
|
3599
|
-
u(
|
|
3600
|
-
u(
|
|
3601
|
-
u(
|
|
3602
|
-
u(
|
|
3603
|
-
var
|
|
3677
|
+
an = Ae;
|
|
3678
|
+
u(Ae, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
3679
|
+
u(Ae, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
3680
|
+
u(Ae, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
|
|
3681
|
+
u(Ae, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
|
|
3682
|
+
u(Ae, "CHOICE_SELECTOR", `[${an.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
3683
|
+
var Gs = class {
|
|
3604
3684
|
constructor() {
|
|
3605
|
-
u(this, "elementType", "ebsr"), u(this, "priority", 95), u(this, "mcAdapter", new
|
|
3685
|
+
u(this, "elementType", "ebsr"), u(this, "priority", 95), u(this, "mcAdapter", new Ae());
|
|
3606
3686
|
}
|
|
3607
3687
|
canHandle(e) {
|
|
3608
3688
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
@@ -3626,7 +3706,7 @@ var Po = class {
|
|
|
3626
3706
|
getButtonContainer(e) {
|
|
3627
3707
|
return this.mcAdapter.getButtonContainer(e);
|
|
3628
3708
|
}
|
|
3629
|
-
},
|
|
3709
|
+
}, Ws = class {
|
|
3630
3710
|
constructor() {
|
|
3631
3711
|
u(this, "elementType", "inline-dropdown"), u(this, "priority", 90);
|
|
3632
3712
|
}
|
|
@@ -3652,12 +3732,12 @@ var Po = class {
|
|
|
3652
3732
|
getButtonContainer(e) {
|
|
3653
3733
|
return e;
|
|
3654
3734
|
}
|
|
3655
|
-
},
|
|
3735
|
+
}, qs = class {
|
|
3656
3736
|
constructor() {
|
|
3657
3737
|
u(this, "adapters", void 0), this.adapters = [
|
|
3658
|
-
new
|
|
3659
|
-
new
|
|
3660
|
-
new
|
|
3738
|
+
new Ae(),
|
|
3739
|
+
new Gs(),
|
|
3740
|
+
new Ws()
|
|
3661
3741
|
].sort((e, t) => t.priority - e.priority);
|
|
3662
3742
|
}
|
|
3663
3743
|
findAdapter(e) {
|
|
@@ -3667,9 +3747,9 @@ var Po = class {
|
|
|
3667
3747
|
const t = [], r = /* @__PURE__ */ new Set();
|
|
3668
3748
|
for (const i of this.adapters) {
|
|
3669
3749
|
const n = i.findChoices(e);
|
|
3670
|
-
for (const
|
|
3671
|
-
r.has(
|
|
3672
|
-
choice:
|
|
3750
|
+
for (const o of n)
|
|
3751
|
+
r.has(o) || (r.add(o), t.push({
|
|
3752
|
+
choice: o,
|
|
3673
3753
|
adapter: i
|
|
3674
3754
|
}));
|
|
3675
3755
|
}
|
|
@@ -3678,7 +3758,7 @@ var Po = class {
|
|
|
3678
3758
|
registerAdapter(e) {
|
|
3679
3759
|
this.adapters.push(e), this.adapters.sort((t, r) => r.priority - t.priority);
|
|
3680
3760
|
}
|
|
3681
|
-
},
|
|
3761
|
+
}, je = class D {
|
|
3682
3762
|
constructor() {
|
|
3683
3763
|
u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
3684
3764
|
}
|
|
@@ -3760,12 +3840,12 @@ var Po = class {
|
|
|
3760
3840
|
i.selectNodeContents(r), this.removeAriaAttributes(i), this.fallbackContainers.delete(t);
|
|
3761
3841
|
}
|
|
3762
3842
|
};
|
|
3763
|
-
u(
|
|
3764
|
-
u(
|
|
3765
|
-
u(
|
|
3766
|
-
u(
|
|
3767
|
-
u(
|
|
3768
|
-
u(
|
|
3843
|
+
u(je, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
|
|
3844
|
+
u(je, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
|
|
3845
|
+
u(je, "FALLBACK_CLASS", "pie-answer-masked-fallback");
|
|
3846
|
+
u(je, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
3847
|
+
u(je, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
3848
|
+
u(je, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
3769
3849
|
var ve = class R {
|
|
3770
3850
|
constructor() {
|
|
3771
3851
|
u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
@@ -3868,14 +3948,14 @@ u(ve, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
|
3868
3948
|
u(ve, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
3869
3949
|
u(ve, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
3870
3950
|
u(ve, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
3871
|
-
var
|
|
3951
|
+
var Ar = class it {
|
|
3872
3952
|
constructor(t = "strikethrough", r = "right") {
|
|
3873
|
-
u(this, "registry", void 0), u(this, "strategy", void 0), u(this, "eliminatedChoices", /* @__PURE__ */ new Set()), u(this, "choiceElements", /* @__PURE__ */ new Map()), u(this, "choiceButtons", /* @__PURE__ */ new Map()), u(this, "choiceAdapters", /* @__PURE__ */ new Map()), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "storeIntegration", null), this.registry = new
|
|
3953
|
+
u(this, "registry", void 0), u(this, "strategy", void 0), u(this, "eliminatedChoices", /* @__PURE__ */ new Set()), u(this, "choiceElements", /* @__PURE__ */ new Map()), u(this, "choiceButtons", /* @__PURE__ */ new Map()), u(this, "choiceAdapters", /* @__PURE__ */ new Map()), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "storeIntegration", null), this.registry = new qs(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = r;
|
|
3874
3954
|
}
|
|
3875
3955
|
createStrategy(t) {
|
|
3876
3956
|
switch (t) {
|
|
3877
3957
|
case "mask":
|
|
3878
|
-
return new
|
|
3958
|
+
return new je();
|
|
3879
3959
|
default:
|
|
3880
3960
|
return new ve();
|
|
3881
3961
|
}
|
|
@@ -3892,14 +3972,14 @@ var yr = class et {
|
|
|
3892
3972
|
const n = this.createToggleButton(t, r);
|
|
3893
3973
|
if (!n) return;
|
|
3894
3974
|
this.choiceButtons.set(i, n);
|
|
3895
|
-
const
|
|
3896
|
-
|
|
3975
|
+
const o = r.getButtonContainer(t);
|
|
3976
|
+
o && (o.style.position = "relative", o.appendChild(n));
|
|
3897
3977
|
}
|
|
3898
3978
|
createToggleButton(t, r) {
|
|
3899
|
-
const i = r.getChoiceId(t), n = r.getChoiceLabel(t),
|
|
3900
|
-
return
|
|
3901
|
-
|
|
3902
|
-
}),
|
|
3979
|
+
const i = r.getChoiceId(t), n = r.getChoiceLabel(t), o = document.createElement("button");
|
|
3980
|
+
return o.type = "button", o.className = it.TOGGLE_CLASS, o.setAttribute("aria-label", `Toggle elimination for ${n}`), o.setAttribute("data-choice-id", i), o.textContent = "⊗", this.applyButtonAlignment(o), o.addEventListener("click", (s) => {
|
|
3981
|
+
s.preventDefault(), s.stopPropagation(), this.toggleElimination(t, r);
|
|
3982
|
+
}), o;
|
|
3903
3983
|
}
|
|
3904
3984
|
toggleElimination(t, r) {
|
|
3905
3985
|
const i = r.getChoiceId(t);
|
|
@@ -3920,13 +4000,13 @@ var yr = class et {
|
|
|
3920
4000
|
return;
|
|
3921
4001
|
}
|
|
3922
4002
|
this.strategy.apply(i, n), this.eliminatedChoices.add(i);
|
|
3923
|
-
const
|
|
3924
|
-
|
|
4003
|
+
const o = this.choiceButtons.get(i);
|
|
4004
|
+
o && (o.classList.add(it.TOGGLE_ACTIVE_CLASS), o.setAttribute("aria-pressed", "true")), this.saveState();
|
|
3925
4005
|
}
|
|
3926
4006
|
restoreChoice(t) {
|
|
3927
4007
|
this.strategy.remove(t), this.eliminatedChoices.delete(t);
|
|
3928
4008
|
const r = this.choiceButtons.get(t);
|
|
3929
|
-
r && (r.classList.remove(
|
|
4009
|
+
r && (r.classList.remove(it.TOGGLE_ACTIVE_CLASS), r.setAttribute("aria-pressed", "false")), this.saveState();
|
|
3930
4010
|
}
|
|
3931
4011
|
resetAll() {
|
|
3932
4012
|
if (this.eliminatedChoices.size !== 0) {
|
|
@@ -3958,13 +4038,13 @@ var yr = class et {
|
|
|
3958
4038
|
for (const i of r) {
|
|
3959
4039
|
const n = this.choiceElements.get(i);
|
|
3960
4040
|
if (!n) continue;
|
|
3961
|
-
const
|
|
3962
|
-
if (!
|
|
3963
|
-
const
|
|
3964
|
-
if (
|
|
3965
|
-
this.strategy.apply(i,
|
|
4041
|
+
const o = this.choiceAdapters.get(i);
|
|
4042
|
+
if (!o) continue;
|
|
4043
|
+
const s = o.createChoiceRange(n);
|
|
4044
|
+
if (s) {
|
|
4045
|
+
this.strategy.apply(i, s), this.eliminatedChoices.add(i);
|
|
3966
4046
|
const l = this.choiceButtons.get(i);
|
|
3967
|
-
l && (l.classList.add(
|
|
4047
|
+
l && (l.classList.add(it.TOGGLE_ACTIVE_CLASS), l.setAttribute("aria-pressed", "true"));
|
|
3968
4048
|
}
|
|
3969
4049
|
}
|
|
3970
4050
|
} catch (r) {
|
|
@@ -4017,63 +4097,63 @@ var yr = class et {
|
|
|
4017
4097
|
this.cleanupButtons(), this.strategy.destroy();
|
|
4018
4098
|
}
|
|
4019
4099
|
};
|
|
4020
|
-
u(
|
|
4021
|
-
u(
|
|
4022
|
-
var
|
|
4023
|
-
function
|
|
4024
|
-
|
|
4025
|
-
let r =
|
|
4026
|
-
const
|
|
4027
|
-
let p = /* @__PURE__ */ H(null), y = /* @__PURE__ */ H(null), _ = /* @__PURE__ */ H(null), E = /* @__PURE__ */ H(null), j = /* @__PURE__ */
|
|
4028
|
-
|
|
4029
|
-
if (
|
|
4030
|
-
return
|
|
4100
|
+
u(Ar, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
|
|
4101
|
+
u(Ar, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
4102
|
+
var Ks = /* @__PURE__ */ So('<div style="display: none;" aria-hidden="true"></div>');
|
|
4103
|
+
function Us(e, t) {
|
|
4104
|
+
ai(t, !0);
|
|
4105
|
+
let r = ge(t, "visible", 7, !1), i = ge(t, "toolId", 7, "answerEliminator"), n = ge(t, "strategy", 7, "strikethrough"), o = ge(t, "alwaysOn", 7, !1), s = ge(t, "buttonAlignment", 7, "right"), l = ge(t, "scopeElement", 7, null), c = ge(t, "elementToolStateStore", 7, null), d = ge(t, "globalElementId", 7, ""), f = /* @__PURE__ */ H(null), v = /* @__PURE__ */ H(null), h = /* @__PURE__ */ H(null);
|
|
4106
|
+
const g = /* @__PURE__ */ xr(() => m(v)?.toolCoordinator);
|
|
4107
|
+
let p = /* @__PURE__ */ H(null), y = /* @__PURE__ */ H(null), _ = /* @__PURE__ */ H(null), E = /* @__PURE__ */ H(null), j = /* @__PURE__ */ xr(() => o() || r());
|
|
4108
|
+
Ce(() => {
|
|
4109
|
+
if (m(f))
|
|
4110
|
+
return Wo(m(f), (k) => {
|
|
4031
4111
|
$(v, k, !0);
|
|
4032
4112
|
});
|
|
4033
|
-
}),
|
|
4034
|
-
if (
|
|
4035
|
-
return
|
|
4113
|
+
}), Ce(() => {
|
|
4114
|
+
if (m(f))
|
|
4115
|
+
return qo(m(f), (k) => {
|
|
4036
4116
|
$(h, k, !0);
|
|
4037
4117
|
});
|
|
4038
4118
|
});
|
|
4039
4119
|
function C() {
|
|
4040
|
-
return l() ||
|
|
4120
|
+
return l() || m(h)?.scopeElement || null;
|
|
4041
4121
|
}
|
|
4042
4122
|
function U() {
|
|
4043
|
-
if (!
|
|
4123
|
+
if (!m(j) || !m(p)) return;
|
|
4044
4124
|
const k = C();
|
|
4045
4125
|
if (!k) {
|
|
4046
4126
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
4047
4127
|
return;
|
|
4048
4128
|
}
|
|
4049
|
-
|
|
4129
|
+
m(p).initializeForQuestion(k);
|
|
4050
4130
|
}
|
|
4051
|
-
function
|
|
4131
|
+
function Se() {
|
|
4052
4132
|
requestAnimationFrame(() => {
|
|
4053
4133
|
requestAnimationFrame(() => {
|
|
4054
4134
|
U();
|
|
4055
4135
|
});
|
|
4056
4136
|
});
|
|
4057
4137
|
}
|
|
4058
|
-
|
|
4059
|
-
!g
|
|
4060
|
-
}),
|
|
4061
|
-
|
|
4062
|
-
}),
|
|
4063
|
-
|
|
4064
|
-
})),
|
|
4065
|
-
const k =
|
|
4138
|
+
Ce(() => {
|
|
4139
|
+
!m(g) || !i() || (m(E) && m(_) && (m(E) !== m(g) || m(_) !== i()) && (m(E).unregisterTool(m(_)), $(E, null), $(_, null)), m(_) || (m(g).registerTool(i(), "Answer Eliminator", void 0, ar.MODAL), $(E, m(g), !0), $(_, i())));
|
|
4140
|
+
}), Ce(() => {
|
|
4141
|
+
m(p) && c() && d() && m(p).setStoreIntegration(c(), d());
|
|
4142
|
+
}), Oo(() => ($(p, new Ar(n(), s()), !0), m(p) && c() && d() && m(p).setStoreIntegration(c(), d()), m(j) ? U() : m(p).cleanup(), () => {
|
|
4143
|
+
m(p)?.destroy(), $(p, null), m(E) && m(_) && (m(E).unregisterTool(m(_)), $(E, null), $(_, null));
|
|
4144
|
+
})), Ce(() => {
|
|
4145
|
+
const k = m(h)?.contextVersion ?? null;
|
|
4066
4146
|
if (k !== null) {
|
|
4067
|
-
if (
|
|
4147
|
+
if (m(y) === null) {
|
|
4068
4148
|
$(y, k, !0);
|
|
4069
4149
|
return;
|
|
4070
4150
|
}
|
|
4071
|
-
k !==
|
|
4151
|
+
k !== m(y) && ($(y, k, !0), Se());
|
|
4072
4152
|
}
|
|
4073
|
-
}),
|
|
4074
|
-
|
|
4153
|
+
}), Ce(() => {
|
|
4154
|
+
m(p) && (m(j) ? (m(p).enableStateRestoration(), U()) : m(p).cleanup());
|
|
4075
4155
|
});
|
|
4076
|
-
var
|
|
4156
|
+
var et = {
|
|
4077
4157
|
get visible() {
|
|
4078
4158
|
return r();
|
|
4079
4159
|
},
|
|
@@ -4093,16 +4173,16 @@ function Do(e, t) {
|
|
|
4093
4173
|
n(k), ue();
|
|
4094
4174
|
},
|
|
4095
4175
|
get alwaysOn() {
|
|
4096
|
-
return
|
|
4176
|
+
return o();
|
|
4097
4177
|
},
|
|
4098
4178
|
set alwaysOn(k = !1) {
|
|
4099
|
-
|
|
4179
|
+
o(k), ue();
|
|
4100
4180
|
},
|
|
4101
4181
|
get buttonAlignment() {
|
|
4102
|
-
return
|
|
4182
|
+
return s();
|
|
4103
4183
|
},
|
|
4104
4184
|
set buttonAlignment(k = "right") {
|
|
4105
|
-
|
|
4185
|
+
s(k), ue();
|
|
4106
4186
|
},
|
|
4107
4187
|
get scopeElement() {
|
|
4108
4188
|
return l();
|
|
@@ -4122,10 +4202,10 @@ function Do(e, t) {
|
|
|
4122
4202
|
set globalElementId(k = "") {
|
|
4123
4203
|
d(k), ue();
|
|
4124
4204
|
}
|
|
4125
|
-
},
|
|
4126
|
-
return
|
|
4205
|
+
}, Sr = Ks();
|
|
4206
|
+
return Po(Sr, (k) => $(f, k), () => m(f)), Wi(e, Sr), li(et);
|
|
4127
4207
|
}
|
|
4128
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
4208
|
+
customElements.define("pie-tool-answer-eliminator", Do(Us, {
|
|
4129
4209
|
visible: {
|
|
4130
4210
|
attribute: "visible",
|
|
4131
4211
|
type: "Boolean"
|
|
@@ -4151,5 +4231,5 @@ customElements.define("pie-tool-answer-eliminator", Rs(Do, {
|
|
|
4151
4231
|
globalElementId: { type: "String" }
|
|
4152
4232
|
}, [], [], { mode: "open" }));
|
|
4153
4233
|
export {
|
|
4154
|
-
|
|
4234
|
+
Us as default
|
|
4155
4235
|
};
|