@pie-framework/pie-fixed-player-static 1.0.0-24d9476.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +39 -0
- package/dist/math-rendering.js +89442 -0
- package/dist/pie-elements-bundle-24d9476.js +92 -0
- package/dist/pie-fixed-player.js +2402 -0
- package/package.json +33 -0
|
@@ -0,0 +1,2402 @@
|
|
|
1
|
+
var Vn = Object.defineProperty;
|
|
2
|
+
var At = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var Jn = (e, t, n) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var K = (e, t, n) => Jn(e, typeof t != "symbol" ? t + "" : t, n), xt = (e, t, n) => t.has(e) || At("Cannot " + n);
|
|
7
|
+
var B = (e, t, n) => (xt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), vt = (e, t, n) => t.has(e) ? At("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ht = (e, t, n, r) => (xt(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
const Wn = "5";
|
|
9
|
+
var Zt;
|
|
10
|
+
typeof window < "u" && ((Zt = window.__svelte ?? (window.__svelte = {})).v ?? (Zt.v = /* @__PURE__ */ new Set())).add(Wn);
|
|
11
|
+
const Zn = 1, Qn = 4, Xn = 8, er = 16, tr = 1, nr = 2, bt = "[", Qt = "[!", Xt = "]", Le = {}, D = Symbol(), rr = "http://www.w3.org/1999/xhtml", Ft = !1, W = 2, en = 4, rt = 8, Pt = 16, ie = 32, ye = 64, Ge = 128, H = 256, Ve = 512, j = 1024, le = 2048, Te = 4096, Ie = 8192, st = 16384, sr = 32768, St = 65536, or = 1 << 19, tn = 1 << 20, _t = 1 << 21, qe = Symbol("$state"), nn = Symbol("legacy props");
|
|
12
|
+
var rn = Array.isArray, ir = Array.prototype.indexOf, lr = Array.from, Je = Object.keys, We = Object.defineProperty, me = Object.getOwnPropertyDescriptor, ar = Object.getOwnPropertyDescriptors, ur = Object.prototype, fr = Array.prototype, sn = Object.getPrototypeOf, Bt = Object.isExtensible;
|
|
13
|
+
function on(e) {
|
|
14
|
+
for (var t = 0; t < e.length; t++)
|
|
15
|
+
e[t]();
|
|
16
|
+
}
|
|
17
|
+
let Fe = [], mt = [];
|
|
18
|
+
function ln() {
|
|
19
|
+
var e = Fe;
|
|
20
|
+
Fe = [], on(e);
|
|
21
|
+
}
|
|
22
|
+
function cr() {
|
|
23
|
+
var e = mt;
|
|
24
|
+
mt = [], on(e);
|
|
25
|
+
}
|
|
26
|
+
function dr(e) {
|
|
27
|
+
Fe.length === 0 && queueMicrotask(ln), Fe.push(e);
|
|
28
|
+
}
|
|
29
|
+
function Dt() {
|
|
30
|
+
Fe.length > 0 && ln(), mt.length > 0 && cr();
|
|
31
|
+
}
|
|
32
|
+
function an(e) {
|
|
33
|
+
return e === this.v;
|
|
34
|
+
}
|
|
35
|
+
function vr(e, t) {
|
|
36
|
+
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
37
|
+
}
|
|
38
|
+
function un(e) {
|
|
39
|
+
return !vr(e, this.v);
|
|
40
|
+
}
|
|
41
|
+
function hr(e) {
|
|
42
|
+
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
43
|
+
}
|
|
44
|
+
function gr() {
|
|
45
|
+
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
46
|
+
}
|
|
47
|
+
function _r(e) {
|
|
48
|
+
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
49
|
+
}
|
|
50
|
+
function mr() {
|
|
51
|
+
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
52
|
+
}
|
|
53
|
+
function pr() {
|
|
54
|
+
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
55
|
+
}
|
|
56
|
+
function yr(e) {
|
|
57
|
+
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
58
|
+
}
|
|
59
|
+
function wr() {
|
|
60
|
+
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
61
|
+
}
|
|
62
|
+
function Er() {
|
|
63
|
+
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
64
|
+
}
|
|
65
|
+
function Cr() {
|
|
66
|
+
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
67
|
+
}
|
|
68
|
+
let $r = !1;
|
|
69
|
+
function _e(e, t) {
|
|
70
|
+
if (typeof e != "object" || e === null || qe in e)
|
|
71
|
+
return e;
|
|
72
|
+
const n = sn(e);
|
|
73
|
+
if (n !== ur && n !== fr)
|
|
74
|
+
return e;
|
|
75
|
+
var r = /* @__PURE__ */ new Map(), o = rn(e), s = T(0), i = E, u = (a) => {
|
|
76
|
+
var l = E;
|
|
77
|
+
Z(i);
|
|
78
|
+
var v;
|
|
79
|
+
return v = a(), Z(l), v;
|
|
80
|
+
};
|
|
81
|
+
return o && r.set("length", T(
|
|
82
|
+
/** @type {any[]} */
|
|
83
|
+
e.length
|
|
84
|
+
)), new Proxy(
|
|
85
|
+
/** @type {any} */
|
|
86
|
+
e,
|
|
87
|
+
{
|
|
88
|
+
defineProperty(a, l, v) {
|
|
89
|
+
(!("value" in v) || v.configurable === !1 || v.enumerable === !1 || v.writable === !1) && wr();
|
|
90
|
+
var c = r.get(l);
|
|
91
|
+
return c === void 0 ? (c = u(() => T(v.value)), r.set(l, c)) : w(
|
|
92
|
+
c,
|
|
93
|
+
u(() => _e(v.value))
|
|
94
|
+
), !0;
|
|
95
|
+
},
|
|
96
|
+
deleteProperty(a, l) {
|
|
97
|
+
var v = r.get(l);
|
|
98
|
+
if (v === void 0)
|
|
99
|
+
l in a && r.set(
|
|
100
|
+
l,
|
|
101
|
+
u(() => T(D))
|
|
102
|
+
);
|
|
103
|
+
else {
|
|
104
|
+
if (o && typeof l == "string") {
|
|
105
|
+
var c = (
|
|
106
|
+
/** @type {Source<number>} */
|
|
107
|
+
r.get("length")
|
|
108
|
+
), d = Number(l);
|
|
109
|
+
Number.isInteger(d) && d < c.v && w(c, d);
|
|
110
|
+
}
|
|
111
|
+
w(v, D), Nt(s);
|
|
112
|
+
}
|
|
113
|
+
return !0;
|
|
114
|
+
},
|
|
115
|
+
get(a, l, v) {
|
|
116
|
+
if (l === qe)
|
|
117
|
+
return e;
|
|
118
|
+
var c = r.get(l), d = l in a;
|
|
119
|
+
if (c === void 0 && (!d || me(a, l)?.writable) && (c = u(() => T(_e(d ? a[l] : D))), r.set(l, c)), c !== void 0) {
|
|
120
|
+
var h = m(c);
|
|
121
|
+
return h === D ? void 0 : h;
|
|
122
|
+
}
|
|
123
|
+
return Reflect.get(a, l, v);
|
|
124
|
+
},
|
|
125
|
+
getOwnPropertyDescriptor(a, l) {
|
|
126
|
+
var v = Reflect.getOwnPropertyDescriptor(a, l);
|
|
127
|
+
if (v && "value" in v) {
|
|
128
|
+
var c = r.get(l);
|
|
129
|
+
c && (v.value = m(c));
|
|
130
|
+
} else if (v === void 0) {
|
|
131
|
+
var d = r.get(l), h = d?.v;
|
|
132
|
+
if (d !== void 0 && h !== D)
|
|
133
|
+
return {
|
|
134
|
+
enumerable: !0,
|
|
135
|
+
configurable: !0,
|
|
136
|
+
value: h,
|
|
137
|
+
writable: !0
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return v;
|
|
141
|
+
},
|
|
142
|
+
has(a, l) {
|
|
143
|
+
if (l === qe)
|
|
144
|
+
return !0;
|
|
145
|
+
var v = r.get(l), c = v !== void 0 && v.v !== D || Reflect.has(a, l);
|
|
146
|
+
if (v !== void 0 || C !== null && (!c || me(a, l)?.writable)) {
|
|
147
|
+
v === void 0 && (v = u(() => T(c ? _e(a[l]) : D)), r.set(l, v));
|
|
148
|
+
var d = m(v);
|
|
149
|
+
if (d === D)
|
|
150
|
+
return !1;
|
|
151
|
+
}
|
|
152
|
+
return c;
|
|
153
|
+
},
|
|
154
|
+
set(a, l, v, c) {
|
|
155
|
+
var d = r.get(l), h = l in a;
|
|
156
|
+
if (o && l === "length")
|
|
157
|
+
for (var _ = v; _ < /** @type {Source<number>} */
|
|
158
|
+
d.v; _ += 1) {
|
|
159
|
+
var p = r.get(_ + "");
|
|
160
|
+
p !== void 0 ? w(p, D) : _ in a && (p = u(() => T(D)), r.set(_ + "", p));
|
|
161
|
+
}
|
|
162
|
+
d === void 0 ? (!h || me(a, l)?.writable) && (d = u(() => T(void 0)), w(
|
|
163
|
+
d,
|
|
164
|
+
u(() => _e(v))
|
|
165
|
+
), r.set(l, d)) : (h = d.v !== D, w(
|
|
166
|
+
d,
|
|
167
|
+
u(() => _e(v))
|
|
168
|
+
));
|
|
169
|
+
var y = Reflect.getOwnPropertyDescriptor(a, l);
|
|
170
|
+
if (y?.set && y.set.call(c, v), !h) {
|
|
171
|
+
if (o && typeof l == "string") {
|
|
172
|
+
var k = (
|
|
173
|
+
/** @type {Source<number>} */
|
|
174
|
+
r.get("length")
|
|
175
|
+
), O = Number(l);
|
|
176
|
+
Number.isInteger(O) && O >= k.v && w(k, O + 1);
|
|
177
|
+
}
|
|
178
|
+
Nt(s);
|
|
179
|
+
}
|
|
180
|
+
return !0;
|
|
181
|
+
},
|
|
182
|
+
ownKeys(a) {
|
|
183
|
+
m(s);
|
|
184
|
+
var l = Reflect.ownKeys(a).filter((d) => {
|
|
185
|
+
var h = r.get(d);
|
|
186
|
+
return h === void 0 || h.v !== D;
|
|
187
|
+
});
|
|
188
|
+
for (var [v, c] of r)
|
|
189
|
+
c.v !== D && !(v in a) && l.push(v);
|
|
190
|
+
return l;
|
|
191
|
+
},
|
|
192
|
+
setPrototypeOf() {
|
|
193
|
+
Er();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function Nt(e, t = 1) {
|
|
199
|
+
w(e, e.v + t);
|
|
200
|
+
}
|
|
201
|
+
const Be = /* @__PURE__ */ new Map();
|
|
202
|
+
function fn(e, t) {
|
|
203
|
+
var n = {
|
|
204
|
+
f: 0,
|
|
205
|
+
// TODO ideally we could skip this altogether, but it causes type errors
|
|
206
|
+
v: e,
|
|
207
|
+
reactions: null,
|
|
208
|
+
equals: an,
|
|
209
|
+
rv: 0,
|
|
210
|
+
wv: 0
|
|
211
|
+
};
|
|
212
|
+
return n;
|
|
213
|
+
}
|
|
214
|
+
function T(e, t) {
|
|
215
|
+
const n = fn(e);
|
|
216
|
+
return pn(n), n;
|
|
217
|
+
}
|
|
218
|
+
// @__NO_SIDE_EFFECTS__
|
|
219
|
+
function cn(e, t = !1) {
|
|
220
|
+
const n = fn(e);
|
|
221
|
+
return t || (n.equals = un), n;
|
|
222
|
+
}
|
|
223
|
+
function w(e, t, n = !1) {
|
|
224
|
+
E !== null && !J && Tn() && (E.f & (W | Pt)) !== 0 && !re?.includes(e) && Cr();
|
|
225
|
+
let r = n ? _e(t) : t;
|
|
226
|
+
return br(e, r);
|
|
227
|
+
}
|
|
228
|
+
function br(e, t) {
|
|
229
|
+
if (!e.equals(t)) {
|
|
230
|
+
var n = e.v;
|
|
231
|
+
Ne ? Be.set(e, t) : Be.set(e, n), e.v = t, e.wv = wn(), dn(e, le), C !== null && (C.f & j) !== 0 && (C.f & (ie | ye)) === 0 && (q === null ? Or([e]) : q.push(e));
|
|
232
|
+
}
|
|
233
|
+
return t;
|
|
234
|
+
}
|
|
235
|
+
function dn(e, t) {
|
|
236
|
+
var n = e.reactions;
|
|
237
|
+
if (n !== null)
|
|
238
|
+
for (var r = n.length, o = 0; o < r; o++) {
|
|
239
|
+
var s = n[o], i = s.f;
|
|
240
|
+
(i & le) === 0 && (Q(s, t), (i & (j | H)) !== 0 && ((i & W) !== 0 ? dn(
|
|
241
|
+
/** @type {Derived} */
|
|
242
|
+
s,
|
|
243
|
+
Te
|
|
244
|
+
) : lt(
|
|
245
|
+
/** @type {Effect} */
|
|
246
|
+
s
|
|
247
|
+
)));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// @__NO_SIDE_EFFECTS__
|
|
251
|
+
function Lt(e) {
|
|
252
|
+
var t = W | le, n = E !== null && (E.f & W) !== 0 ? (
|
|
253
|
+
/** @type {Derived} */
|
|
254
|
+
E
|
|
255
|
+
) : null;
|
|
256
|
+
return C === null || n !== null && (n.f & H) !== 0 ? t |= H : C.f |= tn, {
|
|
257
|
+
ctx: z,
|
|
258
|
+
deps: null,
|
|
259
|
+
effects: null,
|
|
260
|
+
equals: an,
|
|
261
|
+
f: t,
|
|
262
|
+
fn: e,
|
|
263
|
+
reactions: null,
|
|
264
|
+
rv: 0,
|
|
265
|
+
v: (
|
|
266
|
+
/** @type {V} */
|
|
267
|
+
null
|
|
268
|
+
),
|
|
269
|
+
wv: 0,
|
|
270
|
+
parent: n ?? C
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function fe(e) {
|
|
274
|
+
const t = /* @__PURE__ */ Lt(e);
|
|
275
|
+
return pn(t), t;
|
|
276
|
+
}
|
|
277
|
+
function vn(e) {
|
|
278
|
+
var t = e.effects;
|
|
279
|
+
if (t !== null) {
|
|
280
|
+
e.effects = null;
|
|
281
|
+
for (var n = 0; n < t.length; n += 1)
|
|
282
|
+
oe(
|
|
283
|
+
/** @type {Effect} */
|
|
284
|
+
t[n]
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
function Pr(e) {
|
|
289
|
+
for (var t = e.parent; t !== null; ) {
|
|
290
|
+
if ((t.f & W) === 0)
|
|
291
|
+
return (
|
|
292
|
+
/** @type {Effect} */
|
|
293
|
+
t
|
|
294
|
+
);
|
|
295
|
+
t = t.parent;
|
|
296
|
+
}
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
function Sr(e) {
|
|
300
|
+
var t, n = C;
|
|
301
|
+
ve(Pr(e));
|
|
302
|
+
try {
|
|
303
|
+
vn(e), t = Cn(e);
|
|
304
|
+
} finally {
|
|
305
|
+
ve(n);
|
|
306
|
+
}
|
|
307
|
+
return t;
|
|
308
|
+
}
|
|
309
|
+
function hn(e) {
|
|
310
|
+
var t = Sr(e), n = (de || (e.f & H) !== 0) && e.deps !== null ? Te : j;
|
|
311
|
+
Q(e, n), e.equals(t) || (e.v = t, e.wv = wn());
|
|
312
|
+
}
|
|
313
|
+
function ot(e) {
|
|
314
|
+
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
315
|
+
}
|
|
316
|
+
let R = !1;
|
|
317
|
+
function ce(e) {
|
|
318
|
+
R = e;
|
|
319
|
+
}
|
|
320
|
+
let I;
|
|
321
|
+
function se(e) {
|
|
322
|
+
if (e === null)
|
|
323
|
+
throw ot(), Le;
|
|
324
|
+
return I = e;
|
|
325
|
+
}
|
|
326
|
+
function De() {
|
|
327
|
+
return se(
|
|
328
|
+
/** @type {TemplateNode} */
|
|
329
|
+
/* @__PURE__ */ we(I)
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
function G(e) {
|
|
333
|
+
if (R) {
|
|
334
|
+
if (/* @__PURE__ */ we(I) !== null)
|
|
335
|
+
throw ot(), Le;
|
|
336
|
+
I = e;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function Lr() {
|
|
340
|
+
for (var e = 0, t = I; ; ) {
|
|
341
|
+
if (t.nodeType === 8) {
|
|
342
|
+
var n = (
|
|
343
|
+
/** @type {Comment} */
|
|
344
|
+
t.data
|
|
345
|
+
);
|
|
346
|
+
if (n === Xt) {
|
|
347
|
+
if (e === 0) return t;
|
|
348
|
+
e -= 1;
|
|
349
|
+
} else (n === bt || n === Qt) && (e += 1);
|
|
350
|
+
}
|
|
351
|
+
var r = (
|
|
352
|
+
/** @type {TemplateNode} */
|
|
353
|
+
/* @__PURE__ */ we(t)
|
|
354
|
+
);
|
|
355
|
+
t.remove(), t = r;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
var Mt, gn, _n, mn;
|
|
359
|
+
function pt() {
|
|
360
|
+
if (Mt === void 0) {
|
|
361
|
+
Mt = window, gn = /Firefox/.test(navigator.userAgent);
|
|
362
|
+
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
363
|
+
_n = me(t, "firstChild").get, mn = me(t, "nextSibling").get, Bt(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Bt(n) && (n.__t = void 0);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function Ze(e = "") {
|
|
367
|
+
return document.createTextNode(e);
|
|
368
|
+
}
|
|
369
|
+
// @__NO_SIDE_EFFECTS__
|
|
370
|
+
function Oe(e) {
|
|
371
|
+
return _n.call(e);
|
|
372
|
+
}
|
|
373
|
+
// @__NO_SIDE_EFFECTS__
|
|
374
|
+
function we(e) {
|
|
375
|
+
return mn.call(e);
|
|
376
|
+
}
|
|
377
|
+
function V(e, t) {
|
|
378
|
+
if (!R)
|
|
379
|
+
return /* @__PURE__ */ Oe(e);
|
|
380
|
+
var n = (
|
|
381
|
+
/** @type {TemplateNode} */
|
|
382
|
+
/* @__PURE__ */ Oe(I)
|
|
383
|
+
);
|
|
384
|
+
if (n === null)
|
|
385
|
+
n = I.appendChild(Ze());
|
|
386
|
+
else if (t && n.nodeType !== 3) {
|
|
387
|
+
var r = Ze();
|
|
388
|
+
return n?.before(r), se(r), r;
|
|
389
|
+
}
|
|
390
|
+
return se(n), n;
|
|
391
|
+
}
|
|
392
|
+
function yt(e, t = 1, n = !1) {
|
|
393
|
+
let r = R ? I : e;
|
|
394
|
+
for (var o; t--; )
|
|
395
|
+
o = r, r = /** @type {TemplateNode} */
|
|
396
|
+
/* @__PURE__ */ we(r);
|
|
397
|
+
if (!R)
|
|
398
|
+
return r;
|
|
399
|
+
var s = r?.nodeType;
|
|
400
|
+
if (n && s !== 3) {
|
|
401
|
+
var i = Ze();
|
|
402
|
+
return r === null ? o?.after(i) : r.before(i), se(i), i;
|
|
403
|
+
}
|
|
404
|
+
return se(r), /** @type {TemplateNode} */
|
|
405
|
+
r;
|
|
406
|
+
}
|
|
407
|
+
function Rr(e) {
|
|
408
|
+
e.textContent = "";
|
|
409
|
+
}
|
|
410
|
+
let Ye = !1, Qe = !1, Xe = null, pe = !1, Ne = !1;
|
|
411
|
+
function zt(e) {
|
|
412
|
+
Ne = e;
|
|
413
|
+
}
|
|
414
|
+
let ke = [];
|
|
415
|
+
let E = null, J = !1;
|
|
416
|
+
function Z(e) {
|
|
417
|
+
E = e;
|
|
418
|
+
}
|
|
419
|
+
let C = null;
|
|
420
|
+
function ve(e) {
|
|
421
|
+
C = e;
|
|
422
|
+
}
|
|
423
|
+
let re = null;
|
|
424
|
+
function Ir(e) {
|
|
425
|
+
re = e;
|
|
426
|
+
}
|
|
427
|
+
function pn(e) {
|
|
428
|
+
E !== null && E.f & _t && (re === null ? Ir([e]) : re.push(e));
|
|
429
|
+
}
|
|
430
|
+
let x = null, M = 0, q = null;
|
|
431
|
+
function Or(e) {
|
|
432
|
+
q = e;
|
|
433
|
+
}
|
|
434
|
+
let yn = 1, et = 0, de = !1;
|
|
435
|
+
function wn() {
|
|
436
|
+
return ++yn;
|
|
437
|
+
}
|
|
438
|
+
function Me(e) {
|
|
439
|
+
var t = e.f;
|
|
440
|
+
if ((t & le) !== 0)
|
|
441
|
+
return !0;
|
|
442
|
+
if ((t & Te) !== 0) {
|
|
443
|
+
var n = e.deps, r = (t & H) !== 0;
|
|
444
|
+
if (n !== null) {
|
|
445
|
+
var o, s, i = (t & Ve) !== 0, u = r && C !== null && !de, a = n.length;
|
|
446
|
+
if (i || u) {
|
|
447
|
+
var l = (
|
|
448
|
+
/** @type {Derived} */
|
|
449
|
+
e
|
|
450
|
+
), v = l.parent;
|
|
451
|
+
for (o = 0; o < a; o++)
|
|
452
|
+
s = n[o], (i || !s?.reactions?.includes(l)) && (s.reactions ?? (s.reactions = [])).push(l);
|
|
453
|
+
i && (l.f ^= Ve), u && v !== null && (v.f & H) === 0 && (l.f ^= H);
|
|
454
|
+
}
|
|
455
|
+
for (o = 0; o < a; o++)
|
|
456
|
+
if (s = n[o], Me(
|
|
457
|
+
/** @type {Derived} */
|
|
458
|
+
s
|
|
459
|
+
) && hn(
|
|
460
|
+
/** @type {Derived} */
|
|
461
|
+
s
|
|
462
|
+
), s.wv > e.wv)
|
|
463
|
+
return !0;
|
|
464
|
+
}
|
|
465
|
+
(!r || C !== null && !de) && Q(e, j);
|
|
466
|
+
}
|
|
467
|
+
return !1;
|
|
468
|
+
}
|
|
469
|
+
function Tr(e, t) {
|
|
470
|
+
for (var n = t; n !== null; ) {
|
|
471
|
+
if ((n.f & Ge) !== 0)
|
|
472
|
+
try {
|
|
473
|
+
n.fn(e);
|
|
474
|
+
return;
|
|
475
|
+
} catch {
|
|
476
|
+
n.f ^= Ge;
|
|
477
|
+
}
|
|
478
|
+
n = n.parent;
|
|
479
|
+
}
|
|
480
|
+
throw Ye = !1, e;
|
|
481
|
+
}
|
|
482
|
+
function kr(e) {
|
|
483
|
+
return (e.f & st) === 0 && (e.parent === null || (e.parent.f & Ge) === 0);
|
|
484
|
+
}
|
|
485
|
+
function it(e, t, n, r) {
|
|
486
|
+
if (Ye) {
|
|
487
|
+
if (n === null && (Ye = !1), kr(t))
|
|
488
|
+
throw e;
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
n !== null && (Ye = !0);
|
|
492
|
+
{
|
|
493
|
+
Tr(e, t);
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
function En(e, t, n = !0) {
|
|
498
|
+
var r = e.reactions;
|
|
499
|
+
if (r !== null)
|
|
500
|
+
for (var o = 0; o < r.length; o++) {
|
|
501
|
+
var s = r[o];
|
|
502
|
+
re?.includes(e) || ((s.f & W) !== 0 ? En(
|
|
503
|
+
/** @type {Derived} */
|
|
504
|
+
s,
|
|
505
|
+
t,
|
|
506
|
+
!1
|
|
507
|
+
) : t === s && (n ? Q(s, le) : (s.f & j) !== 0 && Q(s, Te), lt(
|
|
508
|
+
/** @type {Effect} */
|
|
509
|
+
s
|
|
510
|
+
)));
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
function Cn(e) {
|
|
514
|
+
var h;
|
|
515
|
+
var t = x, n = M, r = q, o = E, s = de, i = re, u = z, a = J, l = e.f;
|
|
516
|
+
x = /** @type {null | Value[]} */
|
|
517
|
+
null, M = 0, q = null, de = (l & H) !== 0 && (J || !pe || E === null), E = (l & (ie | ye)) === 0 ? e : null, re = null, qt(e.ctx), J = !1, et++, e.f |= _t;
|
|
518
|
+
try {
|
|
519
|
+
var v = (
|
|
520
|
+
/** @type {Function} */
|
|
521
|
+
(0, e.fn)()
|
|
522
|
+
), c = e.deps;
|
|
523
|
+
if (x !== null) {
|
|
524
|
+
var d;
|
|
525
|
+
if (tt(e, M), c !== null && M > 0)
|
|
526
|
+
for (c.length = M + x.length, d = 0; d < x.length; d++)
|
|
527
|
+
c[M + d] = x[d];
|
|
528
|
+
else
|
|
529
|
+
e.deps = c = x;
|
|
530
|
+
if (!de)
|
|
531
|
+
for (d = M; d < c.length; d++)
|
|
532
|
+
((h = c[d]).reactions ?? (h.reactions = [])).push(e);
|
|
533
|
+
} else c !== null && M < c.length && (tt(e, M), c.length = M);
|
|
534
|
+
if (Tn() && q !== null && !J && c !== null && (e.f & (W | Te | le)) === 0)
|
|
535
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
536
|
+
q.length; d++)
|
|
537
|
+
En(
|
|
538
|
+
q[d],
|
|
539
|
+
/** @type {Effect} */
|
|
540
|
+
e
|
|
541
|
+
);
|
|
542
|
+
return o !== null && (et++, q !== null && (r === null ? r = q : r.push(.../** @type {Source[]} */
|
|
543
|
+
q))), v;
|
|
544
|
+
} finally {
|
|
545
|
+
x = t, M = n, q = r, E = o, de = s, re = i, qt(u), J = a, e.f ^= _t;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
function Ar(e, t) {
|
|
549
|
+
let n = t.reactions;
|
|
550
|
+
if (n !== null) {
|
|
551
|
+
var r = ir.call(n, e);
|
|
552
|
+
if (r !== -1) {
|
|
553
|
+
var o = n.length - 1;
|
|
554
|
+
o === 0 ? n = t.reactions = null : (n[r] = n[o], n.pop());
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
n === null && (t.f & W) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
558
|
+
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
559
|
+
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
560
|
+
(x === null || !x.includes(t)) && (Q(t, Te), (t.f & (H | Ve)) === 0 && (t.f ^= Ve), vn(
|
|
561
|
+
/** @type {Derived} **/
|
|
562
|
+
t
|
|
563
|
+
), tt(
|
|
564
|
+
/** @type {Derived} **/
|
|
565
|
+
t,
|
|
566
|
+
0
|
|
567
|
+
));
|
|
568
|
+
}
|
|
569
|
+
function tt(e, t) {
|
|
570
|
+
var n = e.deps;
|
|
571
|
+
if (n !== null)
|
|
572
|
+
for (var r = t; r < n.length; r++)
|
|
573
|
+
Ar(e, n[r]);
|
|
574
|
+
}
|
|
575
|
+
function Rt(e) {
|
|
576
|
+
var t = e.f;
|
|
577
|
+
if ((t & st) === 0) {
|
|
578
|
+
Q(e, j);
|
|
579
|
+
var n = C, r = z, o = pe;
|
|
580
|
+
C = e, pe = !0;
|
|
581
|
+
try {
|
|
582
|
+
(t & Pt) !== 0 ? Yr(e) : Ln(e), Sn(e);
|
|
583
|
+
var s = Cn(e);
|
|
584
|
+
e.teardown = typeof s == "function" ? s : null, e.wv = yn;
|
|
585
|
+
var i = e.deps, u;
|
|
586
|
+
Ft && $r && e.f & le;
|
|
587
|
+
} catch (a) {
|
|
588
|
+
it(a, e, n, r || e.ctx);
|
|
589
|
+
} finally {
|
|
590
|
+
pe = o, C = n;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
function xr() {
|
|
595
|
+
try {
|
|
596
|
+
mr();
|
|
597
|
+
} catch (e) {
|
|
598
|
+
if (Xe !== null)
|
|
599
|
+
it(e, Xe, null);
|
|
600
|
+
else
|
|
601
|
+
throw e;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function $n() {
|
|
605
|
+
var e = pe;
|
|
606
|
+
try {
|
|
607
|
+
var t = 0;
|
|
608
|
+
for (pe = !0; ke.length > 0; ) {
|
|
609
|
+
t++ > 1e3 && xr();
|
|
610
|
+
var n = ke, r = n.length;
|
|
611
|
+
ke = [];
|
|
612
|
+
for (var o = 0; o < r; o++) {
|
|
613
|
+
var s = Br(n[o]);
|
|
614
|
+
Fr(s);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
} finally {
|
|
618
|
+
Qe = !1, pe = e, Xe = null, Be.clear();
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
function Fr(e) {
|
|
622
|
+
var t = e.length;
|
|
623
|
+
if (t !== 0)
|
|
624
|
+
for (var n = 0; n < t; n++) {
|
|
625
|
+
var r = e[n];
|
|
626
|
+
if ((r.f & (st | Ie)) === 0)
|
|
627
|
+
try {
|
|
628
|
+
Me(r) && (Rt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? Rn(r) : r.fn = null));
|
|
629
|
+
} catch (o) {
|
|
630
|
+
it(o, r, null, r.ctx);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
function lt(e) {
|
|
635
|
+
Qe || (Qe = !0, queueMicrotask($n));
|
|
636
|
+
for (var t = Xe = e; t.parent !== null; ) {
|
|
637
|
+
t = t.parent;
|
|
638
|
+
var n = t.f;
|
|
639
|
+
if ((n & (ye | ie)) !== 0) {
|
|
640
|
+
if ((n & j) === 0) return;
|
|
641
|
+
t.f ^= j;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
ke.push(t);
|
|
645
|
+
}
|
|
646
|
+
function Br(e) {
|
|
647
|
+
for (var t = [], n = e; n !== null; ) {
|
|
648
|
+
var r = n.f, o = (r & (ie | ye)) !== 0, s = o && (r & j) !== 0;
|
|
649
|
+
if (!s && (r & Ie) === 0) {
|
|
650
|
+
if ((r & en) !== 0)
|
|
651
|
+
t.push(n);
|
|
652
|
+
else if (o)
|
|
653
|
+
n.f ^= j;
|
|
654
|
+
else {
|
|
655
|
+
var i = E;
|
|
656
|
+
try {
|
|
657
|
+
E = n, Me(n) && Rt(n);
|
|
658
|
+
} catch (l) {
|
|
659
|
+
it(l, n, null, n.ctx);
|
|
660
|
+
} finally {
|
|
661
|
+
E = i;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
var u = n.first;
|
|
665
|
+
if (u !== null) {
|
|
666
|
+
n = u;
|
|
667
|
+
continue;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
var a = n.parent;
|
|
671
|
+
for (n = n.next; n === null && a !== null; )
|
|
672
|
+
n = a.next, a = a.parent;
|
|
673
|
+
}
|
|
674
|
+
return t;
|
|
675
|
+
}
|
|
676
|
+
function $(e) {
|
|
677
|
+
var t;
|
|
678
|
+
for (Dt(); ke.length > 0; )
|
|
679
|
+
Qe = !0, $n(), Dt();
|
|
680
|
+
return (
|
|
681
|
+
/** @type {T} */
|
|
682
|
+
t
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
async function bn() {
|
|
686
|
+
await Promise.resolve(), $();
|
|
687
|
+
}
|
|
688
|
+
function m(e) {
|
|
689
|
+
var t = e.f, n = (t & W) !== 0;
|
|
690
|
+
if (E !== null && !J) {
|
|
691
|
+
if (!re?.includes(e)) {
|
|
692
|
+
var r = E.deps;
|
|
693
|
+
e.rv < et && (e.rv = et, x === null && r !== null && r[M] === e ? M++ : x === null ? x = [e] : (!de || !x.includes(e)) && x.push(e));
|
|
694
|
+
}
|
|
695
|
+
} else if (n && /** @type {Derived} */
|
|
696
|
+
e.deps === null && /** @type {Derived} */
|
|
697
|
+
e.effects === null) {
|
|
698
|
+
var o = (
|
|
699
|
+
/** @type {Derived} */
|
|
700
|
+
e
|
|
701
|
+
), s = o.parent;
|
|
702
|
+
s !== null && (s.f & H) === 0 && (o.f ^= H);
|
|
703
|
+
}
|
|
704
|
+
return n && (o = /** @type {Derived} */
|
|
705
|
+
e, Me(o) && hn(o)), Ne && Be.has(e) ? Be.get(e) : e.v;
|
|
706
|
+
}
|
|
707
|
+
function jt(e) {
|
|
708
|
+
var t = J;
|
|
709
|
+
try {
|
|
710
|
+
return J = !0, e();
|
|
711
|
+
} finally {
|
|
712
|
+
J = t;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
const Dr = -7169;
|
|
716
|
+
function Q(e, t) {
|
|
717
|
+
e.f = e.f & Dr | t;
|
|
718
|
+
}
|
|
719
|
+
function Nr(e) {
|
|
720
|
+
C === null && E === null && _r(), E !== null && (E.f & H) !== 0 && C === null && gr(), Ne && hr();
|
|
721
|
+
}
|
|
722
|
+
function Mr(e, t) {
|
|
723
|
+
var n = t.last;
|
|
724
|
+
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
725
|
+
}
|
|
726
|
+
function Ee(e, t, n, r = !0) {
|
|
727
|
+
var o = C, s = {
|
|
728
|
+
ctx: z,
|
|
729
|
+
deps: null,
|
|
730
|
+
nodes_start: null,
|
|
731
|
+
nodes_end: null,
|
|
732
|
+
f: e | le,
|
|
733
|
+
first: null,
|
|
734
|
+
fn: t,
|
|
735
|
+
last: null,
|
|
736
|
+
next: null,
|
|
737
|
+
parent: o,
|
|
738
|
+
prev: null,
|
|
739
|
+
teardown: null,
|
|
740
|
+
transitions: null,
|
|
741
|
+
wv: 0
|
|
742
|
+
};
|
|
743
|
+
if (n)
|
|
744
|
+
try {
|
|
745
|
+
Rt(s), s.f |= sr;
|
|
746
|
+
} catch (a) {
|
|
747
|
+
throw oe(s), a;
|
|
748
|
+
}
|
|
749
|
+
else t !== null && lt(s);
|
|
750
|
+
var i = n && s.deps === null && s.first === null && s.nodes_start === null && s.teardown === null && (s.f & (tn | Ge)) === 0;
|
|
751
|
+
if (!i && r && (o !== null && Mr(s, o), E !== null && (E.f & W) !== 0)) {
|
|
752
|
+
var u = (
|
|
753
|
+
/** @type {Derived} */
|
|
754
|
+
E
|
|
755
|
+
);
|
|
756
|
+
(u.effects ?? (u.effects = [])).push(s);
|
|
757
|
+
}
|
|
758
|
+
return s;
|
|
759
|
+
}
|
|
760
|
+
function zr(e) {
|
|
761
|
+
const t = Ee(rt, null, !1);
|
|
762
|
+
return Q(t, j), t.teardown = e, t;
|
|
763
|
+
}
|
|
764
|
+
function Ae(e) {
|
|
765
|
+
Nr();
|
|
766
|
+
var t = C !== null && (C.f & ie) !== 0 && z !== null && !z.m;
|
|
767
|
+
if (t) {
|
|
768
|
+
var n = (
|
|
769
|
+
/** @type {ComponentContext} */
|
|
770
|
+
z
|
|
771
|
+
);
|
|
772
|
+
(n.e ?? (n.e = [])).push({
|
|
773
|
+
fn: e,
|
|
774
|
+
effect: C,
|
|
775
|
+
reaction: E
|
|
776
|
+
});
|
|
777
|
+
} else {
|
|
778
|
+
var r = Pn(e);
|
|
779
|
+
return r;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
function jr(e) {
|
|
783
|
+
const t = Ee(ye, e, !0);
|
|
784
|
+
return () => {
|
|
785
|
+
oe(t);
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
function Ur(e) {
|
|
789
|
+
const t = Ee(ye, e, !0);
|
|
790
|
+
return (n = {}) => new Promise((r) => {
|
|
791
|
+
n.outro ? wt(t, () => {
|
|
792
|
+
oe(t), r(void 0);
|
|
793
|
+
}) : (oe(t), r(void 0));
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
function Pn(e) {
|
|
797
|
+
return Ee(en, e, !1);
|
|
798
|
+
}
|
|
799
|
+
function qr(e) {
|
|
800
|
+
return Ee(rt, e, !0);
|
|
801
|
+
}
|
|
802
|
+
function Pe(e, t = [], n = Lt) {
|
|
803
|
+
const r = t.map(n);
|
|
804
|
+
return It(() => e(...r.map(m)));
|
|
805
|
+
}
|
|
806
|
+
function It(e, t = 0) {
|
|
807
|
+
return Ee(rt | Pt | t, e, !0);
|
|
808
|
+
}
|
|
809
|
+
function nt(e, t = !0) {
|
|
810
|
+
return Ee(rt | ie, e, !0, t);
|
|
811
|
+
}
|
|
812
|
+
function Sn(e) {
|
|
813
|
+
var t = e.teardown;
|
|
814
|
+
if (t !== null) {
|
|
815
|
+
const n = Ne, r = E;
|
|
816
|
+
zt(!0), Z(null);
|
|
817
|
+
try {
|
|
818
|
+
t.call(null);
|
|
819
|
+
} finally {
|
|
820
|
+
zt(n), Z(r);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
function Ln(e, t = !1) {
|
|
825
|
+
var n = e.first;
|
|
826
|
+
for (e.first = e.last = null; n !== null; ) {
|
|
827
|
+
var r = n.next;
|
|
828
|
+
(n.f & ye) !== 0 ? n.parent = null : oe(n, t), n = r;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
function Yr(e) {
|
|
832
|
+
for (var t = e.first; t !== null; ) {
|
|
833
|
+
var n = t.next;
|
|
834
|
+
(t.f & ie) === 0 && oe(t), t = n;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
function oe(e, t = !0) {
|
|
838
|
+
var n = !1;
|
|
839
|
+
if ((t || (e.f & or) !== 0) && e.nodes_start !== null) {
|
|
840
|
+
for (var r = e.nodes_start, o = e.nodes_end; r !== null; ) {
|
|
841
|
+
var s = r === o ? null : (
|
|
842
|
+
/** @type {TemplateNode} */
|
|
843
|
+
/* @__PURE__ */ we(r)
|
|
844
|
+
);
|
|
845
|
+
r.remove(), r = s;
|
|
846
|
+
}
|
|
847
|
+
n = !0;
|
|
848
|
+
}
|
|
849
|
+
Ln(e, t && !n), tt(e, 0), Q(e, st);
|
|
850
|
+
var i = e.transitions;
|
|
851
|
+
if (i !== null)
|
|
852
|
+
for (const a of i)
|
|
853
|
+
a.stop();
|
|
854
|
+
Sn(e);
|
|
855
|
+
var u = e.parent;
|
|
856
|
+
u !== null && u.first !== null && Rn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
|
|
857
|
+
}
|
|
858
|
+
function Rn(e) {
|
|
859
|
+
var t = e.parent, n = e.prev, r = e.next;
|
|
860
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
861
|
+
}
|
|
862
|
+
function wt(e, t) {
|
|
863
|
+
var n = [];
|
|
864
|
+
In(e, n, !0), Hr(n, () => {
|
|
865
|
+
oe(e), t && t();
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
function Hr(e, t) {
|
|
869
|
+
var n = e.length;
|
|
870
|
+
if (n > 0) {
|
|
871
|
+
var r = () => --n || t();
|
|
872
|
+
for (var o of e)
|
|
873
|
+
o.out(r);
|
|
874
|
+
} else
|
|
875
|
+
t();
|
|
876
|
+
}
|
|
877
|
+
function In(e, t, n) {
|
|
878
|
+
if ((e.f & Ie) === 0) {
|
|
879
|
+
if (e.f ^= Ie, e.transitions !== null)
|
|
880
|
+
for (const i of e.transitions)
|
|
881
|
+
(i.is_global || n) && t.push(i);
|
|
882
|
+
for (var r = e.first; r !== null; ) {
|
|
883
|
+
var o = r.next, s = (r.f & St) !== 0 || (r.f & ie) !== 0;
|
|
884
|
+
In(r, t, s ? n : !1), r = o;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
function Ut(e) {
|
|
889
|
+
On(e, !0);
|
|
890
|
+
}
|
|
891
|
+
function On(e, t) {
|
|
892
|
+
if ((e.f & Ie) !== 0) {
|
|
893
|
+
e.f ^= Ie, (e.f & j) === 0 && (e.f ^= j), Me(e) && (Q(e, le), lt(e));
|
|
894
|
+
for (var n = e.first; n !== null; ) {
|
|
895
|
+
var r = n.next, o = (n.f & St) !== 0 || (n.f & ie) !== 0;
|
|
896
|
+
On(n, o ? t : !1), n = r;
|
|
897
|
+
}
|
|
898
|
+
if (e.transitions !== null)
|
|
899
|
+
for (const s of e.transitions)
|
|
900
|
+
(s.is_global || t) && s.in();
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
let z = null;
|
|
904
|
+
function qt(e) {
|
|
905
|
+
z = e;
|
|
906
|
+
}
|
|
907
|
+
function Ot(e, t = !1, n) {
|
|
908
|
+
var r = z = {
|
|
909
|
+
p: z,
|
|
910
|
+
c: null,
|
|
911
|
+
d: !1,
|
|
912
|
+
e: null,
|
|
913
|
+
m: !1,
|
|
914
|
+
s: e,
|
|
915
|
+
x: null,
|
|
916
|
+
l: null
|
|
917
|
+
};
|
|
918
|
+
zr(() => {
|
|
919
|
+
r.d = !0;
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
function Tt(e) {
|
|
923
|
+
const t = z;
|
|
924
|
+
if (t !== null) {
|
|
925
|
+
e !== void 0 && (t.x = e);
|
|
926
|
+
const i = t.e;
|
|
927
|
+
if (i !== null) {
|
|
928
|
+
var n = C, r = E;
|
|
929
|
+
t.e = null;
|
|
930
|
+
try {
|
|
931
|
+
for (var o = 0; o < i.length; o++) {
|
|
932
|
+
var s = i[o];
|
|
933
|
+
ve(s.effect), Z(s.reaction), Pn(s.fn);
|
|
934
|
+
}
|
|
935
|
+
} finally {
|
|
936
|
+
ve(n), Z(r);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
z = t.p, t.m = !0;
|
|
940
|
+
}
|
|
941
|
+
return e || /** @type {T} */
|
|
942
|
+
{};
|
|
943
|
+
}
|
|
944
|
+
function Tn() {
|
|
945
|
+
return !0;
|
|
946
|
+
}
|
|
947
|
+
const Kr = ["touchstart", "touchmove"];
|
|
948
|
+
function Gr(e) {
|
|
949
|
+
return Kr.includes(e);
|
|
950
|
+
}
|
|
951
|
+
const Vr = /* @__PURE__ */ new Set(), Yt = /* @__PURE__ */ new Set();
|
|
952
|
+
function ze(e) {
|
|
953
|
+
var t = this, n = (
|
|
954
|
+
/** @type {Node} */
|
|
955
|
+
t.ownerDocument
|
|
956
|
+
), r = e.type, o = e.composedPath?.() || [], s = (
|
|
957
|
+
/** @type {null | Element} */
|
|
958
|
+
o[0] || e.target
|
|
959
|
+
), i = 0, u = e.__root;
|
|
960
|
+
if (u) {
|
|
961
|
+
var a = o.indexOf(u);
|
|
962
|
+
if (a !== -1 && (t === document || t === /** @type {any} */
|
|
963
|
+
window)) {
|
|
964
|
+
e.__root = t;
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
var l = o.indexOf(t);
|
|
968
|
+
if (l === -1)
|
|
969
|
+
return;
|
|
970
|
+
a <= l && (i = a);
|
|
971
|
+
}
|
|
972
|
+
if (s = /** @type {Element} */
|
|
973
|
+
o[i] || e.target, s !== t) {
|
|
974
|
+
We(e, "currentTarget", {
|
|
975
|
+
configurable: !0,
|
|
976
|
+
get() {
|
|
977
|
+
return s || n;
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
var v = E, c = C;
|
|
981
|
+
Z(null), ve(null);
|
|
982
|
+
try {
|
|
983
|
+
for (var d, h = []; s !== null; ) {
|
|
984
|
+
var _ = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
985
|
+
s.host || null;
|
|
986
|
+
try {
|
|
987
|
+
var p = s["__" + r];
|
|
988
|
+
if (p != null && (!/** @type {any} */
|
|
989
|
+
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
990
|
+
// -> the target could not have been disabled because it emits the event in the first place
|
|
991
|
+
e.target === s))
|
|
992
|
+
if (rn(p)) {
|
|
993
|
+
var [y, ...k] = p;
|
|
994
|
+
y.apply(s, [e, ...k]);
|
|
995
|
+
} else
|
|
996
|
+
p.call(s, e);
|
|
997
|
+
} catch (O) {
|
|
998
|
+
d ? h.push(O) : d = O;
|
|
999
|
+
}
|
|
1000
|
+
if (e.cancelBubble || _ === t || _ === null)
|
|
1001
|
+
break;
|
|
1002
|
+
s = _;
|
|
1003
|
+
}
|
|
1004
|
+
if (d) {
|
|
1005
|
+
for (let O of h)
|
|
1006
|
+
queueMicrotask(() => {
|
|
1007
|
+
throw O;
|
|
1008
|
+
});
|
|
1009
|
+
throw d;
|
|
1010
|
+
}
|
|
1011
|
+
} finally {
|
|
1012
|
+
e.__root = t, delete e.currentTarget, Z(v), ve(c);
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
function kn(e) {
|
|
1017
|
+
var t = document.createElement("template");
|
|
1018
|
+
return t.innerHTML = e, t.content;
|
|
1019
|
+
}
|
|
1020
|
+
function Re(e, t) {
|
|
1021
|
+
var n = (
|
|
1022
|
+
/** @type {Effect} */
|
|
1023
|
+
C
|
|
1024
|
+
);
|
|
1025
|
+
n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
|
|
1026
|
+
}
|
|
1027
|
+
// @__NO_SIDE_EFFECTS__
|
|
1028
|
+
function he(e, t) {
|
|
1029
|
+
var n = (t & tr) !== 0, r = (t & nr) !== 0, o, s = !e.startsWith("<!>");
|
|
1030
|
+
return () => {
|
|
1031
|
+
if (R)
|
|
1032
|
+
return Re(I, null), I;
|
|
1033
|
+
o === void 0 && (o = kn(s ? e : "<!>" + e), n || (o = /** @type {Node} */
|
|
1034
|
+
/* @__PURE__ */ Oe(o)));
|
|
1035
|
+
var i = (
|
|
1036
|
+
/** @type {TemplateNode} */
|
|
1037
|
+
r || gn ? document.importNode(o, !0) : o.cloneNode(!0)
|
|
1038
|
+
);
|
|
1039
|
+
if (n) {
|
|
1040
|
+
var u = (
|
|
1041
|
+
/** @type {TemplateNode} */
|
|
1042
|
+
/* @__PURE__ */ Oe(i)
|
|
1043
|
+
), a = (
|
|
1044
|
+
/** @type {TemplateNode} */
|
|
1045
|
+
i.lastChild
|
|
1046
|
+
);
|
|
1047
|
+
Re(u, a);
|
|
1048
|
+
} else
|
|
1049
|
+
Re(i, i);
|
|
1050
|
+
return i;
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
function ne(e, t) {
|
|
1054
|
+
if (R) {
|
|
1055
|
+
C.nodes_end = I, De();
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
e !== null && e.before(
|
|
1059
|
+
/** @type {Node} */
|
|
1060
|
+
t
|
|
1061
|
+
);
|
|
1062
|
+
}
|
|
1063
|
+
function Jr(e, t) {
|
|
1064
|
+
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1065
|
+
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1066
|
+
}
|
|
1067
|
+
function An(e, t) {
|
|
1068
|
+
return xn(e, t);
|
|
1069
|
+
}
|
|
1070
|
+
function Wr(e, t) {
|
|
1071
|
+
pt(), t.intro = t.intro ?? !1;
|
|
1072
|
+
const n = t.target, r = R, o = I;
|
|
1073
|
+
try {
|
|
1074
|
+
for (var s = (
|
|
1075
|
+
/** @type {TemplateNode} */
|
|
1076
|
+
/* @__PURE__ */ Oe(n)
|
|
1077
|
+
); s && (s.nodeType !== 8 || /** @type {Comment} */
|
|
1078
|
+
s.data !== bt); )
|
|
1079
|
+
s = /** @type {TemplateNode} */
|
|
1080
|
+
/* @__PURE__ */ we(s);
|
|
1081
|
+
if (!s)
|
|
1082
|
+
throw Le;
|
|
1083
|
+
ce(!0), se(
|
|
1084
|
+
/** @type {Comment} */
|
|
1085
|
+
s
|
|
1086
|
+
), De();
|
|
1087
|
+
const i = xn(e, { ...t, anchor: s });
|
|
1088
|
+
if (I === null || I.nodeType !== 8 || /** @type {Comment} */
|
|
1089
|
+
I.data !== Xt)
|
|
1090
|
+
throw ot(), Le;
|
|
1091
|
+
return ce(!1), /** @type {Exports} */
|
|
1092
|
+
i;
|
|
1093
|
+
} catch (i) {
|
|
1094
|
+
if (i === Le)
|
|
1095
|
+
return t.recover === !1 && pr(), pt(), Rr(n), ce(!1), An(e, t);
|
|
1096
|
+
throw i;
|
|
1097
|
+
} finally {
|
|
1098
|
+
ce(r), se(o);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
const be = /* @__PURE__ */ new Map();
|
|
1102
|
+
function xn(e, { target: t, anchor: n, props: r = {}, events: o, context: s, intro: i = !0 }) {
|
|
1103
|
+
pt();
|
|
1104
|
+
var u = /* @__PURE__ */ new Set(), a = (c) => {
|
|
1105
|
+
for (var d = 0; d < c.length; d++) {
|
|
1106
|
+
var h = c[d];
|
|
1107
|
+
if (!u.has(h)) {
|
|
1108
|
+
u.add(h);
|
|
1109
|
+
var _ = Gr(h);
|
|
1110
|
+
t.addEventListener(h, ze, { passive: _ });
|
|
1111
|
+
var p = be.get(h);
|
|
1112
|
+
p === void 0 ? (document.addEventListener(h, ze, { passive: _ }), be.set(h, 1)) : be.set(h, p + 1);
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
a(lr(Vr)), Yt.add(a);
|
|
1117
|
+
var l = void 0, v = Ur(() => {
|
|
1118
|
+
var c = n ?? t.appendChild(Ze());
|
|
1119
|
+
return nt(() => {
|
|
1120
|
+
if (s) {
|
|
1121
|
+
Ot({});
|
|
1122
|
+
var d = (
|
|
1123
|
+
/** @type {ComponentContext} */
|
|
1124
|
+
z
|
|
1125
|
+
);
|
|
1126
|
+
d.c = s;
|
|
1127
|
+
}
|
|
1128
|
+
o && (r.$$events = o), R && Re(
|
|
1129
|
+
/** @type {TemplateNode} */
|
|
1130
|
+
c,
|
|
1131
|
+
null
|
|
1132
|
+
), l = e(c, r) || {}, R && (C.nodes_end = I), s && Tt();
|
|
1133
|
+
}), () => {
|
|
1134
|
+
for (var d of u) {
|
|
1135
|
+
t.removeEventListener(d, ze);
|
|
1136
|
+
var h = (
|
|
1137
|
+
/** @type {number} */
|
|
1138
|
+
be.get(d)
|
|
1139
|
+
);
|
|
1140
|
+
--h === 0 ? (document.removeEventListener(d, ze), be.delete(d)) : be.set(d, h);
|
|
1141
|
+
}
|
|
1142
|
+
Yt.delete(a), c !== n && c.parentNode?.removeChild(c);
|
|
1143
|
+
};
|
|
1144
|
+
});
|
|
1145
|
+
return Et.set(l, v), l;
|
|
1146
|
+
}
|
|
1147
|
+
let Et = /* @__PURE__ */ new WeakMap();
|
|
1148
|
+
function Zr(e, t) {
|
|
1149
|
+
const n = Et.get(e);
|
|
1150
|
+
return n ? (Et.delete(e), n(t)) : Promise.resolve();
|
|
1151
|
+
}
|
|
1152
|
+
function xe(e, t, [n, r] = [0, 0]) {
|
|
1153
|
+
R && n === 0 && De();
|
|
1154
|
+
var o = e, s = null, i = null, u = D, a = n > 0 ? St : 0, l = !1;
|
|
1155
|
+
const v = (d, h = !0) => {
|
|
1156
|
+
l = !0, c(h, d);
|
|
1157
|
+
}, c = (d, h) => {
|
|
1158
|
+
if (u === (u = d)) return;
|
|
1159
|
+
let _ = !1;
|
|
1160
|
+
if (R && r !== -1) {
|
|
1161
|
+
if (n === 0) {
|
|
1162
|
+
const y = (
|
|
1163
|
+
/** @type {Comment} */
|
|
1164
|
+
o.data
|
|
1165
|
+
);
|
|
1166
|
+
y === bt ? r = 0 : y === Qt ? r = 1 / 0 : (r = parseInt(y.substring(1)), r !== r && (r = u ? 1 / 0 : -1));
|
|
1167
|
+
}
|
|
1168
|
+
const p = r > n;
|
|
1169
|
+
!!u === p && (o = Lr(), se(o), ce(!1), _ = !0, r = -1);
|
|
1170
|
+
}
|
|
1171
|
+
u ? (s ? Ut(s) : h && (s = nt(() => h(o))), i && wt(i, () => {
|
|
1172
|
+
i = null;
|
|
1173
|
+
})) : (i ? Ut(i) : h && (i = nt(() => h(o, [n + 1, r]))), s && wt(s, () => {
|
|
1174
|
+
s = null;
|
|
1175
|
+
})), _ && ce(!0);
|
|
1176
|
+
};
|
|
1177
|
+
It(() => {
|
|
1178
|
+
l = !1, t(v), l || c(null, null);
|
|
1179
|
+
}, a), R && (o = I);
|
|
1180
|
+
}
|
|
1181
|
+
function Ht(e, t, n, r, o) {
|
|
1182
|
+
var s = e, i = "", u;
|
|
1183
|
+
It(() => {
|
|
1184
|
+
if (i === (i = t() ?? "")) {
|
|
1185
|
+
R && De();
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
u !== void 0 && (oe(u), u = void 0), i !== "" && (u = nt(() => {
|
|
1189
|
+
if (R) {
|
|
1190
|
+
I.data;
|
|
1191
|
+
for (var a = De(), l = a; a !== null && (a.nodeType !== 8 || /** @type {Comment} */
|
|
1192
|
+
a.data !== ""); )
|
|
1193
|
+
l = a, a = /** @type {TemplateNode} */
|
|
1194
|
+
/* @__PURE__ */ we(a);
|
|
1195
|
+
if (a === null)
|
|
1196
|
+
throw ot(), Le;
|
|
1197
|
+
Re(I, l), s = se(a);
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
var v = i + "", c = kn(v);
|
|
1201
|
+
Re(
|
|
1202
|
+
/** @type {TemplateNode} */
|
|
1203
|
+
/* @__PURE__ */ Oe(c),
|
|
1204
|
+
/** @type {TemplateNode} */
|
|
1205
|
+
c.lastChild
|
|
1206
|
+
), s.before(c);
|
|
1207
|
+
}));
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
function Fn(e, t) {
|
|
1211
|
+
dr(() => {
|
|
1212
|
+
var n = e.getRootNode(), r = (
|
|
1213
|
+
/** @type {ShadowRoot} */
|
|
1214
|
+
n.host ? (
|
|
1215
|
+
/** @type {ShadowRoot} */
|
|
1216
|
+
n
|
|
1217
|
+
) : (
|
|
1218
|
+
/** @type {Document} */
|
|
1219
|
+
n.head ?? /** @type {Document} */
|
|
1220
|
+
n.ownerDocument.head
|
|
1221
|
+
)
|
|
1222
|
+
);
|
|
1223
|
+
if (!r.querySelector("#" + t.hash)) {
|
|
1224
|
+
const o = document.createElement("style");
|
|
1225
|
+
o.id = t.hash, o.textContent = t.code, r.appendChild(o);
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
function Qr(e, t, n) {
|
|
1230
|
+
var r = e == null ? "" : "" + e;
|
|
1231
|
+
return t && (r = r ? r + " " + t : t), r === "" ? null : r;
|
|
1232
|
+
}
|
|
1233
|
+
function Se(e, t, n, r, o, s) {
|
|
1234
|
+
var i = e.__className;
|
|
1235
|
+
if (R || i !== n || i === void 0) {
|
|
1236
|
+
var u = Qr(n, r);
|
|
1237
|
+
(!R || u !== e.getAttribute("class")) && (u == null ? e.removeAttribute("class") : e.className = u), e.__className = n;
|
|
1238
|
+
}
|
|
1239
|
+
return s;
|
|
1240
|
+
}
|
|
1241
|
+
const Xr = Symbol("is custom element"), es = Symbol("is html");
|
|
1242
|
+
function ts(e, t, n, r) {
|
|
1243
|
+
var o = rs(e);
|
|
1244
|
+
R && (o[t] = e.getAttribute(t)), o[t] !== (o[t] = n) && (n == null ? e.removeAttribute(t) : typeof n != "string" && Bn(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
1245
|
+
}
|
|
1246
|
+
function ns(e, t, n) {
|
|
1247
|
+
var r = E, o = C;
|
|
1248
|
+
let s = R;
|
|
1249
|
+
R && ce(!1), Z(null), ve(null);
|
|
1250
|
+
try {
|
|
1251
|
+
// `style` should use `set_attribute` rather than the setter
|
|
1252
|
+
t !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
|
|
1253
|
+
// because during their upgrade/instantiation they might add more setters.
|
|
1254
|
+
// Instead, fall back to a simple "an object, then set as property" heuristic.
|
|
1255
|
+
(Ct.has(e.nodeName) || // customElements may not be available in browser extension contexts
|
|
1256
|
+
!customElements || customElements.get(e.tagName.toLowerCase()) ? Bn(e).includes(t) : n && typeof n == "object") ? e[t] = n : ts(e, t, n == null ? n : String(n));
|
|
1257
|
+
} finally {
|
|
1258
|
+
Z(r), ve(o), s && ce(!0);
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
function rs(e) {
|
|
1262
|
+
return (
|
|
1263
|
+
/** @type {Record<string | symbol, unknown>} **/
|
|
1264
|
+
// @ts-expect-error
|
|
1265
|
+
e.__attributes ?? (e.__attributes = {
|
|
1266
|
+
[Xr]: e.nodeName.includes("-"),
|
|
1267
|
+
[es]: e.namespaceURI === rr
|
|
1268
|
+
})
|
|
1269
|
+
);
|
|
1270
|
+
}
|
|
1271
|
+
var Ct = /* @__PURE__ */ new Map();
|
|
1272
|
+
function Bn(e) {
|
|
1273
|
+
var t = Ct.get(e.nodeName);
|
|
1274
|
+
if (t) return t;
|
|
1275
|
+
Ct.set(e.nodeName, t = []);
|
|
1276
|
+
for (var n, r = e, o = Element.prototype; o !== r; ) {
|
|
1277
|
+
n = ar(r);
|
|
1278
|
+
for (var s in n)
|
|
1279
|
+
n[s].set && t.push(s);
|
|
1280
|
+
r = sn(r);
|
|
1281
|
+
}
|
|
1282
|
+
return t;
|
|
1283
|
+
}
|
|
1284
|
+
let je = !1;
|
|
1285
|
+
function ss(e) {
|
|
1286
|
+
var t = je;
|
|
1287
|
+
try {
|
|
1288
|
+
return je = !1, [e(), je];
|
|
1289
|
+
} finally {
|
|
1290
|
+
je = t;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
function Kt(e) {
|
|
1294
|
+
return e.ctx?.d ?? !1;
|
|
1295
|
+
}
|
|
1296
|
+
function b(e, t, n, r) {
|
|
1297
|
+
var o = (n & Zn) !== 0, s = !0, i = (n & Xn) !== 0, u = (n & er) !== 0, a = !1, l;
|
|
1298
|
+
i ? [l, a] = ss(() => (
|
|
1299
|
+
/** @type {V} */
|
|
1300
|
+
e[t]
|
|
1301
|
+
)) : l = /** @type {V} */
|
|
1302
|
+
e[t];
|
|
1303
|
+
var v = qe in e || nn in e, c = i && (me(e, t)?.set ?? (v && t in e && ((P) => e[t] = P))) || void 0, d = (
|
|
1304
|
+
/** @type {V} */
|
|
1305
|
+
r
|
|
1306
|
+
), h = !0, _ = !1, p = () => (_ = !0, h && (h = !1, u ? d = jt(
|
|
1307
|
+
/** @type {() => V} */
|
|
1308
|
+
r
|
|
1309
|
+
) : d = /** @type {V} */
|
|
1310
|
+
r), d);
|
|
1311
|
+
l === void 0 && r !== void 0 && (c && s && yr(), l = p(), c && c(l));
|
|
1312
|
+
var y;
|
|
1313
|
+
if (y = () => {
|
|
1314
|
+
var P = (
|
|
1315
|
+
/** @type {V} */
|
|
1316
|
+
e[t]
|
|
1317
|
+
);
|
|
1318
|
+
return P === void 0 ? p() : (h = !0, _ = !1, P);
|
|
1319
|
+
}, (n & Qn) === 0)
|
|
1320
|
+
return y;
|
|
1321
|
+
if (c) {
|
|
1322
|
+
var k = e.$$legacy;
|
|
1323
|
+
return function(P, F) {
|
|
1324
|
+
return arguments.length > 0 ? ((!F || k || a) && c(F ? y() : P), P) : y();
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
var O = !1, U = /* @__PURE__ */ cn(l), S = /* @__PURE__ */ Lt(() => {
|
|
1328
|
+
var P = y(), F = m(U);
|
|
1329
|
+
return O ? (O = !1, F) : U.v = P;
|
|
1330
|
+
});
|
|
1331
|
+
return i && m(S), o || (S.equals = un), function(P, F) {
|
|
1332
|
+
if (arguments.length > 0) {
|
|
1333
|
+
const ge = F ? m(S) : i ? _e(P) : P;
|
|
1334
|
+
if (!S.equals(ge)) {
|
|
1335
|
+
if (O = !0, w(U, ge), _ && d !== void 0 && (d = ge), Kt(S))
|
|
1336
|
+
return P;
|
|
1337
|
+
jt(() => m(S));
|
|
1338
|
+
}
|
|
1339
|
+
return P;
|
|
1340
|
+
}
|
|
1341
|
+
return Kt(S) ? S.v : m(S);
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
function os(e) {
|
|
1345
|
+
return new is(e);
|
|
1346
|
+
}
|
|
1347
|
+
var te, Y;
|
|
1348
|
+
class is {
|
|
1349
|
+
/**
|
|
1350
|
+
* @param {ComponentConstructorOptions & {
|
|
1351
|
+
* component: any;
|
|
1352
|
+
* }} options
|
|
1353
|
+
*/
|
|
1354
|
+
constructor(t) {
|
|
1355
|
+
/** @type {any} */
|
|
1356
|
+
vt(this, te);
|
|
1357
|
+
/** @type {Record<string, any>} */
|
|
1358
|
+
vt(this, Y);
|
|
1359
|
+
var n = /* @__PURE__ */ new Map(), r = (s, i) => {
|
|
1360
|
+
var u = /* @__PURE__ */ cn(i);
|
|
1361
|
+
return n.set(s, u), u;
|
|
1362
|
+
};
|
|
1363
|
+
const o = new Proxy(
|
|
1364
|
+
{ ...t.props || {}, $$events: {} },
|
|
1365
|
+
{
|
|
1366
|
+
get(s, i) {
|
|
1367
|
+
return m(n.get(i) ?? r(i, Reflect.get(s, i)));
|
|
1368
|
+
},
|
|
1369
|
+
has(s, i) {
|
|
1370
|
+
return i === nn ? !0 : (m(n.get(i) ?? r(i, Reflect.get(s, i))), Reflect.has(s, i));
|
|
1371
|
+
},
|
|
1372
|
+
set(s, i, u) {
|
|
1373
|
+
return w(n.get(i) ?? r(i, u), u), Reflect.set(s, i, u);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
);
|
|
1377
|
+
ht(this, Y, (t.hydrate ? Wr : An)(t.component, {
|
|
1378
|
+
target: t.target,
|
|
1379
|
+
anchor: t.anchor,
|
|
1380
|
+
props: o,
|
|
1381
|
+
context: t.context,
|
|
1382
|
+
intro: t.intro ?? !1,
|
|
1383
|
+
recover: t.recover
|
|
1384
|
+
})), (!t?.props?.$$host || t.sync === !1) && $(), ht(this, te, o.$$events);
|
|
1385
|
+
for (const s of Object.keys(B(this, Y)))
|
|
1386
|
+
s === "$set" || s === "$destroy" || s === "$on" || We(this, s, {
|
|
1387
|
+
get() {
|
|
1388
|
+
return B(this, Y)[s];
|
|
1389
|
+
},
|
|
1390
|
+
/** @param {any} value */
|
|
1391
|
+
set(i) {
|
|
1392
|
+
B(this, Y)[s] = i;
|
|
1393
|
+
},
|
|
1394
|
+
enumerable: !0
|
|
1395
|
+
});
|
|
1396
|
+
B(this, Y).$set = /** @param {Record<string, any>} next */
|
|
1397
|
+
(s) => {
|
|
1398
|
+
Object.assign(o, s);
|
|
1399
|
+
}, B(this, Y).$destroy = () => {
|
|
1400
|
+
Zr(B(this, Y));
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
/** @param {Record<string, any>} props */
|
|
1404
|
+
$set(t) {
|
|
1405
|
+
B(this, Y).$set(t);
|
|
1406
|
+
}
|
|
1407
|
+
/**
|
|
1408
|
+
* @param {string} event
|
|
1409
|
+
* @param {(...args: any[]) => any} callback
|
|
1410
|
+
* @returns {any}
|
|
1411
|
+
*/
|
|
1412
|
+
$on(t, n) {
|
|
1413
|
+
B(this, te)[t] = B(this, te)[t] || [];
|
|
1414
|
+
const r = (...o) => n.call(this, ...o);
|
|
1415
|
+
return B(this, te)[t].push(r), () => {
|
|
1416
|
+
B(this, te)[t] = B(this, te)[t].filter(
|
|
1417
|
+
/** @param {any} fn */
|
|
1418
|
+
(o) => o !== r
|
|
1419
|
+
);
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
$destroy() {
|
|
1423
|
+
B(this, Y).$destroy();
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
te = new WeakMap(), Y = new WeakMap();
|
|
1427
|
+
let Dn;
|
|
1428
|
+
typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
1429
|
+
/**
|
|
1430
|
+
* @param {*} $$componentCtor
|
|
1431
|
+
* @param {*} $$slots
|
|
1432
|
+
* @param {*} use_shadow_dom
|
|
1433
|
+
*/
|
|
1434
|
+
constructor(t, n, r) {
|
|
1435
|
+
super();
|
|
1436
|
+
/** The Svelte component constructor */
|
|
1437
|
+
K(this, "$$ctor");
|
|
1438
|
+
/** Slots */
|
|
1439
|
+
K(this, "$$s");
|
|
1440
|
+
/** @type {any} The Svelte component instance */
|
|
1441
|
+
K(this, "$$c");
|
|
1442
|
+
/** Whether or not the custom element is connected */
|
|
1443
|
+
K(this, "$$cn", !1);
|
|
1444
|
+
/** @type {Record<string, any>} Component props data */
|
|
1445
|
+
K(this, "$$d", {});
|
|
1446
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1447
|
+
K(this, "$$r", !1);
|
|
1448
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1449
|
+
K(this, "$$p_d", {});
|
|
1450
|
+
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1451
|
+
K(this, "$$l", {});
|
|
1452
|
+
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1453
|
+
K(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1454
|
+
/** @type {any} The managed render effect for reflecting attributes */
|
|
1455
|
+
K(this, "$$me");
|
|
1456
|
+
this.$$ctor = t, this.$$s = n, r && this.attachShadow({ mode: "open" });
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* @param {string} type
|
|
1460
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
1461
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
1462
|
+
*/
|
|
1463
|
+
addEventListener(t, n, r) {
|
|
1464
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
|
|
1465
|
+
const o = this.$$c.$on(t, n);
|
|
1466
|
+
this.$$l_u.set(n, o);
|
|
1467
|
+
}
|
|
1468
|
+
super.addEventListener(t, n, r);
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* @param {string} type
|
|
1472
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
1473
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
1474
|
+
*/
|
|
1475
|
+
removeEventListener(t, n, r) {
|
|
1476
|
+
if (super.removeEventListener(t, n, r), this.$$c) {
|
|
1477
|
+
const o = this.$$l_u.get(n);
|
|
1478
|
+
o && (o(), this.$$l_u.delete(n));
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
async connectedCallback() {
|
|
1482
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
1483
|
+
let n = function(s) {
|
|
1484
|
+
return (i) => {
|
|
1485
|
+
const u = document.createElement("slot");
|
|
1486
|
+
s !== "default" && (u.name = s), ne(i, u);
|
|
1487
|
+
};
|
|
1488
|
+
};
|
|
1489
|
+
var t = n;
|
|
1490
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1491
|
+
return;
|
|
1492
|
+
const r = {}, o = ls(this);
|
|
1493
|
+
for (const s of this.$$s)
|
|
1494
|
+
s in o && (s === "default" && !this.$$d.children ? (this.$$d.children = n(s), r.default = !0) : r[s] = n(s));
|
|
1495
|
+
for (const s of this.attributes) {
|
|
1496
|
+
const i = this.$$g_p(s.name);
|
|
1497
|
+
i in this.$$d || (this.$$d[i] = He(i, s.value, this.$$p_d, "toProp"));
|
|
1498
|
+
}
|
|
1499
|
+
for (const s in this.$$p_d)
|
|
1500
|
+
!(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
|
|
1501
|
+
this.$$c = os({
|
|
1502
|
+
component: this.$$ctor,
|
|
1503
|
+
target: this.shadowRoot || this,
|
|
1504
|
+
props: {
|
|
1505
|
+
...this.$$d,
|
|
1506
|
+
$$slots: r,
|
|
1507
|
+
$$host: this
|
|
1508
|
+
}
|
|
1509
|
+
}), this.$$me = jr(() => {
|
|
1510
|
+
qr(() => {
|
|
1511
|
+
this.$$r = !0;
|
|
1512
|
+
for (const s of Je(this.$$c)) {
|
|
1513
|
+
if (!this.$$p_d[s]?.reflect) continue;
|
|
1514
|
+
this.$$d[s] = this.$$c[s];
|
|
1515
|
+
const i = He(
|
|
1516
|
+
s,
|
|
1517
|
+
this.$$d[s],
|
|
1518
|
+
this.$$p_d,
|
|
1519
|
+
"toAttribute"
|
|
1520
|
+
);
|
|
1521
|
+
i == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, i);
|
|
1522
|
+
}
|
|
1523
|
+
this.$$r = !1;
|
|
1524
|
+
});
|
|
1525
|
+
});
|
|
1526
|
+
for (const s in this.$$l)
|
|
1527
|
+
for (const i of this.$$l[s]) {
|
|
1528
|
+
const u = this.$$c.$on(s, i);
|
|
1529
|
+
this.$$l_u.set(i, u);
|
|
1530
|
+
}
|
|
1531
|
+
this.$$l = {};
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
1535
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
1536
|
+
/**
|
|
1537
|
+
* @param {string} attr
|
|
1538
|
+
* @param {string} _oldValue
|
|
1539
|
+
* @param {string} newValue
|
|
1540
|
+
*/
|
|
1541
|
+
attributeChangedCallback(t, n, r) {
|
|
1542
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = He(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
1543
|
+
}
|
|
1544
|
+
disconnectedCallback() {
|
|
1545
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
1546
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* @param {string} attribute_name
|
|
1551
|
+
*/
|
|
1552
|
+
$$g_p(t) {
|
|
1553
|
+
return Je(this.$$p_d).find(
|
|
1554
|
+
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
1555
|
+
) || t;
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
function He(e, t, n, r) {
|
|
1559
|
+
const o = n[e]?.type;
|
|
1560
|
+
if (t = o === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
1561
|
+
return t;
|
|
1562
|
+
if (r === "toAttribute")
|
|
1563
|
+
switch (o) {
|
|
1564
|
+
case "Object":
|
|
1565
|
+
case "Array":
|
|
1566
|
+
return t == null ? null : JSON.stringify(t);
|
|
1567
|
+
case "Boolean":
|
|
1568
|
+
return t ? "" : null;
|
|
1569
|
+
case "Number":
|
|
1570
|
+
return t ?? null;
|
|
1571
|
+
default:
|
|
1572
|
+
return t;
|
|
1573
|
+
}
|
|
1574
|
+
else
|
|
1575
|
+
switch (o) {
|
|
1576
|
+
case "Object":
|
|
1577
|
+
case "Array":
|
|
1578
|
+
return t && JSON.parse(t);
|
|
1579
|
+
case "Boolean":
|
|
1580
|
+
return t;
|
|
1581
|
+
// conversion already handled above
|
|
1582
|
+
case "Number":
|
|
1583
|
+
return t != null ? +t : t;
|
|
1584
|
+
default:
|
|
1585
|
+
return t;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
function ls(e) {
|
|
1589
|
+
const t = {};
|
|
1590
|
+
return e.childNodes.forEach((n) => {
|
|
1591
|
+
t[
|
|
1592
|
+
/** @type {Element} node */
|
|
1593
|
+
n.slot || "default"
|
|
1594
|
+
] = !0;
|
|
1595
|
+
}), t;
|
|
1596
|
+
}
|
|
1597
|
+
function Nn(e, t, n, r, o, s) {
|
|
1598
|
+
let i = class extends Dn {
|
|
1599
|
+
constructor() {
|
|
1600
|
+
super(e, n, o), this.$$p_d = t;
|
|
1601
|
+
}
|
|
1602
|
+
static get observedAttributes() {
|
|
1603
|
+
return Je(t).map(
|
|
1604
|
+
(u) => (t[u].attribute || u).toLowerCase()
|
|
1605
|
+
);
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
return Je(t).forEach((u) => {
|
|
1609
|
+
We(i.prototype, u, {
|
|
1610
|
+
get() {
|
|
1611
|
+
return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
|
|
1612
|
+
},
|
|
1613
|
+
set(a) {
|
|
1614
|
+
a = He(u, a, t), this.$$d[u] = a;
|
|
1615
|
+
var l = this.$$c;
|
|
1616
|
+
if (l) {
|
|
1617
|
+
var v = me(l, u)?.get;
|
|
1618
|
+
v ? l[u] = a : l.$set({ [u]: a });
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
});
|
|
1622
|
+
}), r.forEach((u) => {
|
|
1623
|
+
We(i.prototype, u, {
|
|
1624
|
+
get() {
|
|
1625
|
+
return this.$$c?.[u];
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
}), e.element = /** @type {any} */
|
|
1629
|
+
i, i;
|
|
1630
|
+
}
|
|
1631
|
+
const Gt = "-pie-editor--", Mn = (...e) => e.reduce((t, n) => {
|
|
1632
|
+
for (const r in n)
|
|
1633
|
+
n.hasOwnProperty(r) && n[r] !== null && n[r] !== void 0 && (t[r] = n[r]);
|
|
1634
|
+
return t;
|
|
1635
|
+
}, {}), zn = {}, as = "https://builder.pie-api.com", us = zn.PUBLIC_BUILDER_ORIGIN_URL || as, fs = zn.PUBLIC_BUILDER_BUNDLE_URL || `${us}/api/v1/bundles/`, cs = (e) => {
|
|
1636
|
+
if (!e)
|
|
1637
|
+
throw new Error("Parameter is required: input");
|
|
1638
|
+
const t = e.charAt(0) === "@" ? e.match(/^(@[^/]+\/[^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/) : e.match(/^([^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/);
|
|
1639
|
+
if (!t)
|
|
1640
|
+
throw new Error(`[parse-package-name] "${e}" is not a valid string`);
|
|
1641
|
+
return {
|
|
1642
|
+
name: t[1],
|
|
1643
|
+
path: t[2] || "",
|
|
1644
|
+
version: t[3] || ""
|
|
1645
|
+
};
|
|
1646
|
+
}, ds = (e) => e.split("+").map((t) => cs(t).name).join("+");
|
|
1647
|
+
function vs(e) {
|
|
1648
|
+
return e && typeof e.pie == "object";
|
|
1649
|
+
}
|
|
1650
|
+
function Vt(e) {
|
|
1651
|
+
return typeof e == "function" && "prototype" in e && e.prototype instanceof HTMLElement;
|
|
1652
|
+
}
|
|
1653
|
+
function hs(e) {
|
|
1654
|
+
return e && typeof e.PIE_REGISTRY == "object";
|
|
1655
|
+
}
|
|
1656
|
+
const jn = () => {
|
|
1657
|
+
let e;
|
|
1658
|
+
return hs(window) ? e = window.PIE_REGISTRY : (e = {}, window.PIE_REGISTRY = e), e;
|
|
1659
|
+
}, Un = (e, t, n) => {
|
|
1660
|
+
if (!e)
|
|
1661
|
+
throw new Error("session data is required");
|
|
1662
|
+
const r = e.find((s) => s.id === t);
|
|
1663
|
+
if (r)
|
|
1664
|
+
return n && !r.element && (r.element = n), r;
|
|
1665
|
+
const o = n ? { id: t, element: n } : { id: t };
|
|
1666
|
+
return e.push(o), o;
|
|
1667
|
+
}, Ue = (e, t, n) => {
|
|
1668
|
+
console.log("[updatePieElements] Updating all elements with env:", n), Object.entries(e.elements).forEach(([r, o]) => {
|
|
1669
|
+
$t(r, { config: e, session: t, env: n });
|
|
1670
|
+
});
|
|
1671
|
+
}, kt = (e) => {
|
|
1672
|
+
const t = jn();
|
|
1673
|
+
console.log(`[findPieController] Looking for controller for: ${e}`), console.log("[findPieController] Registry has entries for:", Object.keys(t));
|
|
1674
|
+
const n = t[e];
|
|
1675
|
+
if (!n) {
|
|
1676
|
+
console.error(`[findPieController] ❌ No registry entry found for element: ${e}`), console.error("[findPieController] Available element names:", Object.keys(t)), console.error("[findPieController] Full registry:", t);
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
console.log(`[findPieController] Found registry entry for ${e}:`, {
|
|
1680
|
+
package: n.package,
|
|
1681
|
+
tagName: n.tagName,
|
|
1682
|
+
hasController: !!n.controller,
|
|
1683
|
+
controllerKeys: n.controller ? Object.keys(n.controller) : []
|
|
1684
|
+
});
|
|
1685
|
+
const r = n.controller;
|
|
1686
|
+
return r ? console.log(`[findPieController] ✅ Controller found for ${e} with functions:`, Object.keys(r)) : (console.error(
|
|
1687
|
+
`[findPieController] ❌ CRITICAL: Registry entry exists for ${e} but controller is missing!`
|
|
1688
|
+
), console.error("[findPieController] Entry:", n), console.error("[findPieController] This is a fatal error - PIE elements MUST have controllers")), r;
|
|
1689
|
+
}, gs = {
|
|
1690
|
+
invokeControllerForModel: !0,
|
|
1691
|
+
env: { mode: "gather", role: "student", partialScoring: !1 }
|
|
1692
|
+
}, $t = (e, t) => {
|
|
1693
|
+
const { config: n, session: r, env: o, eventListeners: s, invokeControllerForModel: i } = Mn(
|
|
1694
|
+
gs,
|
|
1695
|
+
t
|
|
1696
|
+
);
|
|
1697
|
+
if (!o)
|
|
1698
|
+
throw new Error("env is required");
|
|
1699
|
+
if (!r)
|
|
1700
|
+
throw new Error("session is required");
|
|
1701
|
+
if (!n)
|
|
1702
|
+
throw new Error("config is required");
|
|
1703
|
+
const u = document.querySelectorAll(e);
|
|
1704
|
+
if (!u || u.length === 0) {
|
|
1705
|
+
console.debug(`no elements found for ${e}`);
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
u.forEach((a) => {
|
|
1709
|
+
const l = a;
|
|
1710
|
+
let v = t?.config?.models?.find((d) => d.id === a.id);
|
|
1711
|
+
if (!v)
|
|
1712
|
+
throw console.error("[updatePieElement] Model not found for", e, t), new Error(`model not found for ${e}`);
|
|
1713
|
+
console.log(`[updatePieElement] Updating ${e}#${a.id}, env:`, o);
|
|
1714
|
+
const c = Un(r, v.id, v.element);
|
|
1715
|
+
if (l.session = c, o && i) {
|
|
1716
|
+
const d = kt(e);
|
|
1717
|
+
if (!d && e === "pie-passage") {
|
|
1718
|
+
console.log("[updatePieElement] pie-passage has no controller (expected), using direct model assignment"), l.model = v;
|
|
1719
|
+
return;
|
|
1720
|
+
}
|
|
1721
|
+
if (!d)
|
|
1722
|
+
throw console.error(`[updatePieElement] ❌ FATAL: No controller found for ${e}`), new Error(`No controller found for ${e}. PIE elements MUST have controllers.`);
|
|
1723
|
+
console.log(`[updatePieElement] Invoking controller for ${e}#${a.id}`, {
|
|
1724
|
+
mode: o.mode,
|
|
1725
|
+
role: o.role,
|
|
1726
|
+
hasCorrectResponse: "correctResponse" in v
|
|
1727
|
+
});
|
|
1728
|
+
const h = (_, p, y) => (console.log(`[updatePieElement] updateSession called for ${_} with:`, y), Object.assign(c, y), Promise.resolve());
|
|
1729
|
+
d.model(v, c, o, h).then((_) => {
|
|
1730
|
+
const p = {
|
|
1731
|
+
id: v.id,
|
|
1732
|
+
element: v.element,
|
|
1733
|
+
..._
|
|
1734
|
+
};
|
|
1735
|
+
console.log(`[updatePieElement] ✅ Model updated for ${e}#${a.id}:`, {
|
|
1736
|
+
id: p.id,
|
|
1737
|
+
element: p.element,
|
|
1738
|
+
hasCorrectResponse: "correctResponse" in p,
|
|
1739
|
+
mode: o.mode,
|
|
1740
|
+
role: o.role
|
|
1741
|
+
}), l.model = p;
|
|
1742
|
+
}).catch((_) => {
|
|
1743
|
+
throw console.error(`[updatePieElement] ❌ Controller error for ${e}#${a.id}:`, _), _;
|
|
1744
|
+
});
|
|
1745
|
+
} else
|
|
1746
|
+
console.log(
|
|
1747
|
+
`[updatePieElement] Direct model assignment for ${e}#${a.id} (no controller invocation requested)`
|
|
1748
|
+
), l.model = v;
|
|
1749
|
+
s && Object.entries(s).forEach(([d, h]) => {
|
|
1750
|
+
l.addEventListener(d, h);
|
|
1751
|
+
});
|
|
1752
|
+
});
|
|
1753
|
+
}, _s = {
|
|
1754
|
+
buildServiceBase: fs,
|
|
1755
|
+
bundleType: "client-player.js",
|
|
1756
|
+
env: { mode: "gather", role: "student" }
|
|
1757
|
+
}, gt = (e, t) => {
|
|
1758
|
+
const { config: n, session: r, env: o, eventListeners: s } = t, i = e.tagName.toLowerCase();
|
|
1759
|
+
console.log(`[initializePieElement] Initializing ${i}#${e.id}`);
|
|
1760
|
+
let u = n?.models?.find((c) => c.id === e.id);
|
|
1761
|
+
if (!u) {
|
|
1762
|
+
console.warn(`[initializePieElement] Model not found for element ${i}#${e.id}`);
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
const a = Un(r, u.id, u.element);
|
|
1766
|
+
e.session = a, console.log(`[initializePieElement] Session set for ${i}#${e.id}:`, a);
|
|
1767
|
+
const l = kt(i);
|
|
1768
|
+
if (!l)
|
|
1769
|
+
throw console.error(`[initializePieElement] ❌ FATAL: No controller found for ${i}`), new Error(
|
|
1770
|
+
`No controller found for ${i}. PIE elements MUST have controllers. Check bundle loading and registration.`
|
|
1771
|
+
);
|
|
1772
|
+
if (!o)
|
|
1773
|
+
throw console.error(`[initializePieElement] ❌ FATAL: No env provided for ${i}`), new Error(`No env provided for ${i}. PIE elements require an env object with mode and role.`);
|
|
1774
|
+
console.log(`[initializePieElement] Using controller for ${i}, env:`, o), console.log("[initializePieElement] Model before filter:", {
|
|
1775
|
+
id: u.id,
|
|
1776
|
+
element: u.element,
|
|
1777
|
+
hasCorrectResponse: "correctResponse" in u
|
|
1778
|
+
});
|
|
1779
|
+
const v = (c, d, h) => (console.log(`[initializePieElement] updateSession called for ${c} with:`, h), Object.assign(a, h), Promise.resolve());
|
|
1780
|
+
l.model(u, a, o, v).then((c) => {
|
|
1781
|
+
const d = {
|
|
1782
|
+
id: u.id,
|
|
1783
|
+
element: u.element,
|
|
1784
|
+
...c
|
|
1785
|
+
};
|
|
1786
|
+
console.log(`[initializePieElement] ✅ Controller filtered model for ${i}#${e.id}:`, {
|
|
1787
|
+
id: d.id,
|
|
1788
|
+
element: d.element,
|
|
1789
|
+
hasCorrectResponse: "correctResponse" in d,
|
|
1790
|
+
mode: o.mode,
|
|
1791
|
+
role: o.role
|
|
1792
|
+
}), e.model = d;
|
|
1793
|
+
}).catch((c) => {
|
|
1794
|
+
throw console.error(`[initializePieElement] ❌ Controller error for ${i}:`, c), c;
|
|
1795
|
+
}), s && Object.entries(s).forEach(([c, d]) => {
|
|
1796
|
+
e.addEventListener(c, d);
|
|
1797
|
+
});
|
|
1798
|
+
}, Jt = (e, t, n = {}) => {
|
|
1799
|
+
const r = jn(), o = Mn(_s, n);
|
|
1800
|
+
if (vs(window)) {
|
|
1801
|
+
console.log("[initializePiesFromLoadedBundle] window.pie available");
|
|
1802
|
+
const s = window.pie.default;
|
|
1803
|
+
console.log("[initializePiesFromLoadedBundle] Available packages in bundle:", Object.keys(s)), console.log("[initializePiesFromLoadedBundle] config.elements:", e.elements), Object.entries(e.elements).forEach(([i, u]) => {
|
|
1804
|
+
console.log(`[initializePiesFromLoadedBundle] Processing element: ${i} -> ${u}`);
|
|
1805
|
+
const a = ds(u);
|
|
1806
|
+
console.log(`[initializePiesFromLoadedBundle] Package without version: "${a}"`), console.log(`[initializePiesFromLoadedBundle] Looking up elementModule["${a}"]`), console.log("[initializePiesFromLoadedBundle] Available keys in elementModule:", Object.keys(s)), console.log(
|
|
1807
|
+
`[initializePiesFromLoadedBundle] Exact match check: "${a}" in elementModule =`,
|
|
1808
|
+
a in s
|
|
1809
|
+
);
|
|
1810
|
+
const l = s[a];
|
|
1811
|
+
if (console.log("[initializePiesFromLoadedBundle] elementData result:", l ? "FOUND" : "UNDEFINED"), !l)
|
|
1812
|
+
throw console.error(`[initializePiesFromLoadedBundle] ❌ Package "${a}" not found in bundle!`), console.error(`[initializePiesFromLoadedBundle] Lookup key: "${a}"`), console.error("[initializePiesFromLoadedBundle] Available packages:", Object.keys(s)), console.error(
|
|
1813
|
+
"[initializePiesFromLoadedBundle] Key comparison:",
|
|
1814
|
+
Object.keys(s).map((v) => ({
|
|
1815
|
+
bundleKey: v,
|
|
1816
|
+
lookupKey: a,
|
|
1817
|
+
match: v === a,
|
|
1818
|
+
bundleKeyLength: v.length,
|
|
1819
|
+
lookupKeyLength: a.length
|
|
1820
|
+
}))
|
|
1821
|
+
), new Error(`pie ${a} not found in ${Object.keys(s)}`);
|
|
1822
|
+
if (console.log(`[initializePiesFromLoadedBundle] elementData for ${a}:`, {
|
|
1823
|
+
hasController: !!l.controller,
|
|
1824
|
+
hasElement: !!l.Element,
|
|
1825
|
+
hasConfig: !!l.config,
|
|
1826
|
+
controllerKeys: l.controller ? Object.keys(l.controller) : []
|
|
1827
|
+
}), !l.controller)
|
|
1828
|
+
throw console.error(
|
|
1829
|
+
`[initializePiesFromLoadedBundle] ❌ CRITICAL: No controller found in elementData for ${a}!`
|
|
1830
|
+
), console.error("[initializePiesFromLoadedBundle] elementData:", l), new Error(`No controller found for ${a}. PIE elements MUST have controllers!`);
|
|
1831
|
+
if (customElements.get(i)) {
|
|
1832
|
+
if ($t(i, {
|
|
1833
|
+
config: e,
|
|
1834
|
+
session: t,
|
|
1835
|
+
env: n.env,
|
|
1836
|
+
...n.eventListeners?.[i] && { eventListeners: n.eventListeners[i] }
|
|
1837
|
+
}), o.bundleType === "editor.js") {
|
|
1838
|
+
const v = i + Gt;
|
|
1839
|
+
$t(v, {
|
|
1840
|
+
config: e,
|
|
1841
|
+
session: t,
|
|
1842
|
+
...n.eventListeners?.[v] && {
|
|
1843
|
+
eventListeners: n.eventListeners[v]
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
} else if (console.log(`[initializePiesFromLoadedBundle] Registering ${i} in registry with controller`), r[i] = {
|
|
1848
|
+
package: u,
|
|
1849
|
+
status: "loading",
|
|
1850
|
+
tagName: i,
|
|
1851
|
+
controller: l.controller,
|
|
1852
|
+
config: l.config
|
|
1853
|
+
}, console.log(`[initializePiesFromLoadedBundle] Registry entry for ${i}:`, {
|
|
1854
|
+
hasController: !!r[i].controller,
|
|
1855
|
+
controllerFunctions: r[i].controller ? Object.keys(r[i].controller) : []
|
|
1856
|
+
}), Vt(l.Element)) {
|
|
1857
|
+
customElements.define(i, l.Element);
|
|
1858
|
+
const v = document.querySelectorAll(i);
|
|
1859
|
+
if (console.log(`Found ${v.length} elements for tag '${i}'`), v.forEach((c) => {
|
|
1860
|
+
gt(c, {
|
|
1861
|
+
config: e,
|
|
1862
|
+
session: t,
|
|
1863
|
+
env: n.env,
|
|
1864
|
+
eventListeners: n.eventListeners?.[i]
|
|
1865
|
+
});
|
|
1866
|
+
}), r[i] = {
|
|
1867
|
+
...r[i],
|
|
1868
|
+
status: "loaded"
|
|
1869
|
+
/* loaded */
|
|
1870
|
+
}, customElements.whenDefined(i).then(() => {
|
|
1871
|
+
console.debug("defined custom PIE element: %s: %O", i, r[i]);
|
|
1872
|
+
}), window._pieElementObserver || (window._pieElementObserver = new MutationObserver((c) => {
|
|
1873
|
+
c.forEach((d) => {
|
|
1874
|
+
d.type === "childList" && d.addedNodes.forEach((h) => {
|
|
1875
|
+
if (h.nodeType === Node.ELEMENT_NODE) {
|
|
1876
|
+
const _ = h.tagName.toLowerCase();
|
|
1877
|
+
r[_] && gt(h, {
|
|
1878
|
+
config: e,
|
|
1879
|
+
session: t,
|
|
1880
|
+
env: n.env,
|
|
1881
|
+
eventListeners: n.eventListeners?.[_]
|
|
1882
|
+
}), h.querySelectorAll("*").forEach((p) => {
|
|
1883
|
+
const y = p.tagName.toLowerCase();
|
|
1884
|
+
r[y] && gt(p, {
|
|
1885
|
+
config: e,
|
|
1886
|
+
session: t,
|
|
1887
|
+
env: n.env,
|
|
1888
|
+
eventListeners: n.eventListeners?.[y]
|
|
1889
|
+
});
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
});
|
|
1894
|
+
}), window._pieElementObserver.observe(document.body, {
|
|
1895
|
+
childList: !0,
|
|
1896
|
+
subtree: !0
|
|
1897
|
+
})), o.bundleType === "editor.js")
|
|
1898
|
+
if (Vt(l.Configure)) {
|
|
1899
|
+
const c = i + Gt;
|
|
1900
|
+
customElements.define(c, l.Configure), customElements.whenDefined(c).then(() => {
|
|
1901
|
+
console.debug(`defined custom PIE editor element: ${c}`);
|
|
1902
|
+
});
|
|
1903
|
+
} else
|
|
1904
|
+
console.error(
|
|
1905
|
+
`pie.Configure for ${a} is not a valid custom element constructor.`,
|
|
1906
|
+
l.configure
|
|
1907
|
+
);
|
|
1908
|
+
} else
|
|
1909
|
+
console.error(`pie.Element for ${a} is not a valid custom element constructor.`);
|
|
1910
|
+
});
|
|
1911
|
+
} else
|
|
1912
|
+
console.error("window.pie not found; was the bundle inlined correctly?");
|
|
1913
|
+
};
|
|
1914
|
+
var ms = /* @__PURE__ */ he("<div><!></div>"), ps = /* @__PURE__ */ he("<div><!></div>"), ys = /* @__PURE__ */ he('<div class="pie-item-player svelte-d1rctr"><!> <!></div>');
|
|
1915
|
+
const ws = {
|
|
1916
|
+
hash: "svelte-d1rctr",
|
|
1917
|
+
code: `.pie-item-player.svelte-d1rctr {display:block;width:100%;}.pie-passage-container.svelte-d1rctr,
|
|
1918
|
+
.pie-item-container.svelte-d1rctr {display:block;width:100%;}`
|
|
1919
|
+
};
|
|
1920
|
+
function Ke(e, t) {
|
|
1921
|
+
Ot(t, !0), Fn(e, ws);
|
|
1922
|
+
let n = b(t, "itemConfig", 7), r = b(t, "passageConfig", 7, null), o = b(t, "env", 23, () => ({ mode: "gather", role: "student" })), s = b(t, "session", 23, () => []), i = b(t, "addCorrectResponse", 7, !1), u = b(t, "customClassname", 7, ""), a = b(t, "passageContainerClass", 7, ""), l = b(t, "containerClass", 7, ""), v = b(t, "onLoadComplete", 7), c = b(t, "onPlayerError", 7), d = b(t, "onSessionChanged", 7), h = T(!1);
|
|
1923
|
+
const _ = (f, g) => {
|
|
1924
|
+
f === "load-complete" && v() ? v()(g) : f === "player-error" && c() ? c()(g) : f === "session-changed" && d() && d()(g);
|
|
1925
|
+
const L = new CustomEvent(f, {
|
|
1926
|
+
detail: g,
|
|
1927
|
+
bubbles: !0,
|
|
1928
|
+
composed: !0
|
|
1929
|
+
// Allow events to cross shadow DOM boundaries
|
|
1930
|
+
});
|
|
1931
|
+
dispatchEvent(L);
|
|
1932
|
+
};
|
|
1933
|
+
async function p() {
|
|
1934
|
+
if (!i() || !n() || m(h)) return;
|
|
1935
|
+
console.log("[PieItemPlayer] Populating session with correct responses");
|
|
1936
|
+
const f = [];
|
|
1937
|
+
for (const g of n().models) {
|
|
1938
|
+
const L = kt(g.element);
|
|
1939
|
+
if (L && L.createCorrectResponseSession)
|
|
1940
|
+
try {
|
|
1941
|
+
const A = await L.createCorrectResponseSession(g, o()), { id: X, ...ae } = A;
|
|
1942
|
+
f.push({
|
|
1943
|
+
id: g.id,
|
|
1944
|
+
element: g.element,
|
|
1945
|
+
...ae
|
|
1946
|
+
});
|
|
1947
|
+
} catch (A) {
|
|
1948
|
+
console.warn(`[PieItemPlayer] Failed to create correct response for ${g.element}:`, A);
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
s().length = 0, s().push(...f), w(h, !0), console.log("[PieItemPlayer] Correct responses added to session:", s());
|
|
1952
|
+
}
|
|
1953
|
+
const y = fe(() => [
|
|
1954
|
+
"pie-passage-container",
|
|
1955
|
+
u(),
|
|
1956
|
+
a()
|
|
1957
|
+
].filter(Boolean).join(" ")), k = fe(() => [
|
|
1958
|
+
"pie-item-container",
|
|
1959
|
+
u(),
|
|
1960
|
+
l()
|
|
1961
|
+
].filter(Boolean).join(" "));
|
|
1962
|
+
let O = T(!1), U = T(!1), S = T(!1);
|
|
1963
|
+
Ae(() => {
|
|
1964
|
+
!n() || m(O) || (console.log("[PieItemPlayer] Item config received, initializing after DOM renders..."), bn().then(async () => {
|
|
1965
|
+
try {
|
|
1966
|
+
if (console.log("[PieItemPlayer] DOM ready, initializing PIE elements"), console.log("[PieItemPlayer] Config:", {
|
|
1967
|
+
itemElements: Object.keys(n().elements || {}),
|
|
1968
|
+
itemModels: (n().models || []).length,
|
|
1969
|
+
passageElements: r() ? Object.keys(r().elements || {}) : [],
|
|
1970
|
+
passageModels: r() ? (r().models || []).length : 0,
|
|
1971
|
+
sessionLength: s().length,
|
|
1972
|
+
addCorrectResponse: i(),
|
|
1973
|
+
env: o()
|
|
1974
|
+
}), Jt(n(), [], { env: o() }), console.log("[PieItemPlayer] Item bundle initialized and controllers registered"), r() && (Jt(r(), [], { env: o() }), console.log("[PieItemPlayer] Passage bundle initialized and controllers registered")), await p(), console.log("[PieItemPlayer] Updating elements with session (length=" + s().length + ")"), Ue(n(), s(), o()), r() && Ue(r(), s(), o()), w(O, !0), !m(U)) {
|
|
1975
|
+
const f = document.querySelector(".pie-item-player"), g = (L) => {
|
|
1976
|
+
if (m(S))
|
|
1977
|
+
return;
|
|
1978
|
+
const A = L;
|
|
1979
|
+
console.log("[PieItemPlayer] session-changed event received from PIE element"), w(S, !0);
|
|
1980
|
+
try {
|
|
1981
|
+
_("session-changed", A.detail);
|
|
1982
|
+
} finally {
|
|
1983
|
+
setTimeout(
|
|
1984
|
+
() => {
|
|
1985
|
+
w(S, !1);
|
|
1986
|
+
},
|
|
1987
|
+
0
|
|
1988
|
+
);
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
f && (f.addEventListener("session-changed", g), w(U, !0), console.log("[PieItemPlayer] session-changed listener attached to root element"));
|
|
1992
|
+
}
|
|
1993
|
+
_("load-complete");
|
|
1994
|
+
} catch (f) {
|
|
1995
|
+
console.error("[PieItemPlayer] Error initializing:", f), _("player-error", f.message);
|
|
1996
|
+
}
|
|
1997
|
+
}));
|
|
1998
|
+
}), Ae(() => {
|
|
1999
|
+
!m(O) || !o() || !n() || !s() || (console.log("[PieItemPlayer] Dependencies changed, updating elements"), console.log("[PieItemPlayer] Env:", o()), console.log("[PieItemPlayer] Session (length=" + s().length + "):", s()), Ue(n(), s(), o()), r() && Ue(r(), s(), o()));
|
|
2000
|
+
});
|
|
2001
|
+
var P = ys(), F = V(P);
|
|
2002
|
+
{
|
|
2003
|
+
var ge = (f) => {
|
|
2004
|
+
var g = ms(), L = V(g);
|
|
2005
|
+
Ht(L, () => r().markup), G(g), Pe(() => Se(g, 1, m(y), "svelte-d1rctr")), ne(f, g);
|
|
2006
|
+
};
|
|
2007
|
+
xe(F, (f) => {
|
|
2008
|
+
r()?.markup && f(ge);
|
|
2009
|
+
});
|
|
2010
|
+
}
|
|
2011
|
+
var at = yt(F, 2);
|
|
2012
|
+
{
|
|
2013
|
+
var ut = (f) => {
|
|
2014
|
+
var g = ps(), L = V(g);
|
|
2015
|
+
Ht(L, () => n().markup), G(g), Pe(() => Se(g, 1, m(k), "svelte-d1rctr")), ne(f, g);
|
|
2016
|
+
};
|
|
2017
|
+
xe(at, (f) => {
|
|
2018
|
+
n()?.markup && f(ut);
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
return G(P), ne(e, P), Tt({
|
|
2022
|
+
get itemConfig() {
|
|
2023
|
+
return n();
|
|
2024
|
+
},
|
|
2025
|
+
set itemConfig(f) {
|
|
2026
|
+
n(f), $();
|
|
2027
|
+
},
|
|
2028
|
+
get passageConfig() {
|
|
2029
|
+
return r();
|
|
2030
|
+
},
|
|
2031
|
+
set passageConfig(f = null) {
|
|
2032
|
+
r(f), $();
|
|
2033
|
+
},
|
|
2034
|
+
get env() {
|
|
2035
|
+
return o();
|
|
2036
|
+
},
|
|
2037
|
+
set env(f = { mode: "gather", role: "student" }) {
|
|
2038
|
+
o(f), $();
|
|
2039
|
+
},
|
|
2040
|
+
get session() {
|
|
2041
|
+
return s();
|
|
2042
|
+
},
|
|
2043
|
+
set session(f = []) {
|
|
2044
|
+
s(f), $();
|
|
2045
|
+
},
|
|
2046
|
+
get addCorrectResponse() {
|
|
2047
|
+
return i();
|
|
2048
|
+
},
|
|
2049
|
+
set addCorrectResponse(f = !1) {
|
|
2050
|
+
i(f), $();
|
|
2051
|
+
},
|
|
2052
|
+
get customClassname() {
|
|
2053
|
+
return u();
|
|
2054
|
+
},
|
|
2055
|
+
set customClassname(f = "") {
|
|
2056
|
+
u(f), $();
|
|
2057
|
+
},
|
|
2058
|
+
get passageContainerClass() {
|
|
2059
|
+
return a();
|
|
2060
|
+
},
|
|
2061
|
+
set passageContainerClass(f = "") {
|
|
2062
|
+
a(f), $();
|
|
2063
|
+
},
|
|
2064
|
+
get containerClass() {
|
|
2065
|
+
return l();
|
|
2066
|
+
},
|
|
2067
|
+
set containerClass(f = "") {
|
|
2068
|
+
l(f), $();
|
|
2069
|
+
},
|
|
2070
|
+
get onLoadComplete() {
|
|
2071
|
+
return v();
|
|
2072
|
+
},
|
|
2073
|
+
set onLoadComplete(f) {
|
|
2074
|
+
v(f), $();
|
|
2075
|
+
},
|
|
2076
|
+
get onPlayerError() {
|
|
2077
|
+
return c();
|
|
2078
|
+
},
|
|
2079
|
+
set onPlayerError(f) {
|
|
2080
|
+
c(f), $();
|
|
2081
|
+
},
|
|
2082
|
+
get onSessionChanged() {
|
|
2083
|
+
return d();
|
|
2084
|
+
},
|
|
2085
|
+
set onSessionChanged(f) {
|
|
2086
|
+
d(f), $();
|
|
2087
|
+
}
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
Nn(
|
|
2091
|
+
Ke,
|
|
2092
|
+
{
|
|
2093
|
+
itemConfig: {},
|
|
2094
|
+
passageConfig: {},
|
|
2095
|
+
env: {},
|
|
2096
|
+
session: {},
|
|
2097
|
+
addCorrectResponse: {},
|
|
2098
|
+
customClassname: {},
|
|
2099
|
+
passageContainerClass: {},
|
|
2100
|
+
containerClass: {},
|
|
2101
|
+
onLoadComplete: {},
|
|
2102
|
+
onPlayerError: {},
|
|
2103
|
+
onSessionChanged: {}
|
|
2104
|
+
},
|
|
2105
|
+
[],
|
|
2106
|
+
[],
|
|
2107
|
+
!0
|
|
2108
|
+
);
|
|
2109
|
+
const Wt = {
|
|
2110
|
+
trackPageActions: !1
|
|
2111
|
+
};
|
|
2112
|
+
var Es = /* @__PURE__ */ he(`<div class="pie-player-error" style="
|
|
2113
|
+
padding: 20px;
|
|
2114
|
+
margin: 20px;
|
|
2115
|
+
border: 2px solid #d32f2f;
|
|
2116
|
+
border-radius: 4px;
|
|
2117
|
+
background-color: #ffebee;
|
|
2118
|
+
color: #c62828;
|
|
2119
|
+
font-family: sans-serif;
|
|
2120
|
+
"><h3 style="margin: 0 0 10px 0">⚠️ Configuration Error</h3> <p style="margin: 0"> </p></div>`), Cs = /* @__PURE__ */ he('<div class="pie-loading" style="padding: 20px; text-align: center;"><p>Loading...</p></div>'), $s = /* @__PURE__ */ he('<pie-stimulus-layout><div slot="stimulus"><!></div> <div><!></div></pie-stimulus-layout>', 2), bs = /* @__PURE__ */ he("<div><!></div>"), Ps = /* @__PURE__ */ he("<div><!></div>");
|
|
2121
|
+
const Ss = {
|
|
2122
|
+
hash: "svelte-1g19r5h",
|
|
2123
|
+
code: ":host {display:block;}"
|
|
2124
|
+
};
|
|
2125
|
+
function Ls(e, t) {
|
|
2126
|
+
Ot(t, !0), Fn(e, Ss);
|
|
2127
|
+
let n = b(t, "config", 7, null), r = b(t, "session", 23, () => ({ id: "", data: [] })), o = b(t, "env", 23, () => ({ mode: "gather", role: "student" })), s = b(t, "addCorrectResponse", 7, !1), i = b(t, "renderStimulus", 7, !0), u = b(t, "allowedResize", 7, !1), a = b(t, "showBottomBorder", 7, !1), l = b(t, "customClassname", 7, ""), v = b(t, "containerClass", 7, ""), c = b(t, "passageContainerClass", 7, ""), d = b(t, "externalStyleUrls", 7, ""), h = b(t, "loaderConfig", 7, Wt), _ = T(!0), p = T(null), y = T(null), k = T(null), O = T(!1);
|
|
2128
|
+
const U = l() || `pie-player-${Math.random().toString(36).substr(2, 9)}`;
|
|
2129
|
+
Ae(() => {
|
|
2130
|
+
if (n()) {
|
|
2131
|
+
performance.mark("pie-load-end");
|
|
2132
|
+
try {
|
|
2133
|
+
const f = typeof n() == "string" ? JSON.parse(n()) : n();
|
|
2134
|
+
if (f.pie && f.passage)
|
|
2135
|
+
w(y, f.pie, !0), w(k, i() ? f.passage : null, !0), w(_, !1), w(p, null);
|
|
2136
|
+
else if (f.elements || f.models || f.markup)
|
|
2137
|
+
w(y, f, !0), w(k, null), w(_, !1), w(p, null);
|
|
2138
|
+
else {
|
|
2139
|
+
const g = "Invalid config: must contain elements, models, and markup, or pie/passage structure";
|
|
2140
|
+
w(p, g), w(_, !1), h()?.trackPageActions && window.newrelic && window.newrelic.noticeError(new Error(g), {
|
|
2141
|
+
component: "pie-fixed-player",
|
|
2142
|
+
errorType: "InvalidConfig"
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
} catch (f) {
|
|
2146
|
+
const g = `Error parsing config: ${f.message}`;
|
|
2147
|
+
w(p, g), w(_, !1), h()?.trackPageActions && window.newrelic && window.newrelic.noticeError(f, {
|
|
2148
|
+
component: "pie-fixed-player",
|
|
2149
|
+
errorType: "ConfigParseError"
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
} else
|
|
2153
|
+
w(y, null), w(k, null), w(_, !0);
|
|
2154
|
+
}), Ae(() => {
|
|
2155
|
+
d() && typeof d() == "string" && d().split(",").map((g) => g.trim()).forEach(async (g) => {
|
|
2156
|
+
if (g)
|
|
2157
|
+
try {
|
|
2158
|
+
const X = (await (await fetch(g)).text()).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g, `.pie-fixed-player.${U} $1$2`), ae = document.createElement("style");
|
|
2159
|
+
ae.textContent = X, document.head.appendChild(ae), w(O, !0);
|
|
2160
|
+
} catch (L) {
|
|
2161
|
+
console.error(`[pie-fixed-player] Failed to load external stylesheet: ${g}`, L);
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
}), Ae(() => {
|
|
2165
|
+
a() && o().mode === "evaluate" && m(y)?.elements && bn().then(() => {
|
|
2166
|
+
Object.keys(m(y).elements).forEach((g) => {
|
|
2167
|
+
document.querySelectorAll(g).forEach((A) => {
|
|
2168
|
+
A instanceof HTMLElement && (A.style.borderBottom = "1px solid #ddd", A.style.paddingBottom = "20px", A.style.marginBottom = "20px");
|
|
2169
|
+
});
|
|
2170
|
+
});
|
|
2171
|
+
});
|
|
2172
|
+
});
|
|
2173
|
+
const S = (f) => {
|
|
2174
|
+
const g = new CustomEvent(f.type, {
|
|
2175
|
+
detail: f.detail,
|
|
2176
|
+
bubbles: !0,
|
|
2177
|
+
composed: !0
|
|
2178
|
+
});
|
|
2179
|
+
dispatchEvent(g);
|
|
2180
|
+
}, P = (f) => {
|
|
2181
|
+
S(f);
|
|
2182
|
+
};
|
|
2183
|
+
var F = Ps();
|
|
2184
|
+
Se(F, 1, `pie-fixed-player ${U ?? ""}`);
|
|
2185
|
+
var ge = V(F);
|
|
2186
|
+
{
|
|
2187
|
+
var at = (f) => {
|
|
2188
|
+
var g = Es(), L = yt(V(g), 2), A = V(L, !0);
|
|
2189
|
+
G(L), G(g), Pe(() => Jr(A, m(p))), ne(f, g);
|
|
2190
|
+
}, ut = (f, g) => {
|
|
2191
|
+
{
|
|
2192
|
+
var L = (X) => {
|
|
2193
|
+
var ae = Cs();
|
|
2194
|
+
ne(X, ae);
|
|
2195
|
+
}, A = (X, ae) => {
|
|
2196
|
+
{
|
|
2197
|
+
var qn = (Ce) => {
|
|
2198
|
+
var ee = $s();
|
|
2199
|
+
Pe(() => ns(ee, "allowedResize", u()));
|
|
2200
|
+
var $e = V(ee), ft = V($e);
|
|
2201
|
+
const ct = fe(() => typeof o() == "string" ? JSON.parse(o()) : o()), ue = fe(() => (typeof r() == "string" ? JSON.parse(r()) : r()).data || []);
|
|
2202
|
+
Ke(ft, {
|
|
2203
|
+
get itemConfig() {
|
|
2204
|
+
return m(k);
|
|
2205
|
+
},
|
|
2206
|
+
get env() {
|
|
2207
|
+
return m(ct);
|
|
2208
|
+
},
|
|
2209
|
+
get session() {
|
|
2210
|
+
return m(ue);
|
|
2211
|
+
},
|
|
2212
|
+
get addCorrectResponse() {
|
|
2213
|
+
return s();
|
|
2214
|
+
},
|
|
2215
|
+
customClassname: U,
|
|
2216
|
+
onLoadComplete: (N) => S(new CustomEvent("load-complete", { detail: N })),
|
|
2217
|
+
onPlayerError: (N) => S(new CustomEvent("player-error", { detail: N })),
|
|
2218
|
+
onSessionChanged: (N) => P(new CustomEvent("session-changed", { detail: N }))
|
|
2219
|
+
}), G($e);
|
|
2220
|
+
var dt = yt($e, 2), Hn = V(dt);
|
|
2221
|
+
const Kn = fe(() => typeof o() == "string" ? JSON.parse(o()) : o()), Gn = fe(() => (typeof r() == "string" ? JSON.parse(r()) : r()).data || []);
|
|
2222
|
+
Ke(Hn, {
|
|
2223
|
+
get itemConfig() {
|
|
2224
|
+
return m(y);
|
|
2225
|
+
},
|
|
2226
|
+
get env() {
|
|
2227
|
+
return m(Kn);
|
|
2228
|
+
},
|
|
2229
|
+
get session() {
|
|
2230
|
+
return m(Gn);
|
|
2231
|
+
},
|
|
2232
|
+
get addCorrectResponse() {
|
|
2233
|
+
return s();
|
|
2234
|
+
},
|
|
2235
|
+
customClassname: U,
|
|
2236
|
+
onLoadComplete: (N) => S(new CustomEvent("load-complete", { detail: N })),
|
|
2237
|
+
onPlayerError: (N) => S(new CustomEvent("player-error", { detail: N })),
|
|
2238
|
+
onSessionChanged: (N) => P(new CustomEvent("session-changed", { detail: N }))
|
|
2239
|
+
}), G(dt), G(ee), Pe(() => {
|
|
2240
|
+
Se($e, 1, `player-stimulus-container ${c() ?? ""}`), Se(dt, 1, `player-item-container ${v() ?? ""}`);
|
|
2241
|
+
}), ne(Ce, ee);
|
|
2242
|
+
}, Yn = (Ce) => {
|
|
2243
|
+
var ee = bs(), $e = V(ee);
|
|
2244
|
+
const ft = fe(() => typeof o() == "string" ? JSON.parse(o()) : o()), ct = fe(() => (typeof r() == "string" ? JSON.parse(r()) : r()).data || []);
|
|
2245
|
+
Ke($e, {
|
|
2246
|
+
get itemConfig() {
|
|
2247
|
+
return m(y);
|
|
2248
|
+
},
|
|
2249
|
+
get passageConfig() {
|
|
2250
|
+
return m(k);
|
|
2251
|
+
},
|
|
2252
|
+
get env() {
|
|
2253
|
+
return m(ft);
|
|
2254
|
+
},
|
|
2255
|
+
get session() {
|
|
2256
|
+
return m(ct);
|
|
2257
|
+
},
|
|
2258
|
+
get addCorrectResponse() {
|
|
2259
|
+
return s();
|
|
2260
|
+
},
|
|
2261
|
+
customClassname: U,
|
|
2262
|
+
get passageContainerClass() {
|
|
2263
|
+
return c();
|
|
2264
|
+
},
|
|
2265
|
+
get containerClass() {
|
|
2266
|
+
return v();
|
|
2267
|
+
},
|
|
2268
|
+
onLoadComplete: (ue) => S(new CustomEvent("load-complete", { detail: ue })),
|
|
2269
|
+
onPlayerError: (ue) => S(new CustomEvent("player-error", { detail: ue })),
|
|
2270
|
+
onSessionChanged: (ue) => P(new CustomEvent("session-changed", { detail: ue }))
|
|
2271
|
+
}), G(ee), Pe(() => Se(ee, 1, `player-item-container ${v() ?? ""}`)), ne(Ce, ee);
|
|
2272
|
+
};
|
|
2273
|
+
xe(
|
|
2274
|
+
X,
|
|
2275
|
+
(Ce) => {
|
|
2276
|
+
m(k) && i() ? Ce(qn) : Ce(Yn, !1);
|
|
2277
|
+
},
|
|
2278
|
+
ae
|
|
2279
|
+
);
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
xe(
|
|
2283
|
+
f,
|
|
2284
|
+
(X) => {
|
|
2285
|
+
m(_) || !m(y) ? X(L) : X(A, !1);
|
|
2286
|
+
},
|
|
2287
|
+
g
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
};
|
|
2291
|
+
xe(ge, (f) => {
|
|
2292
|
+
m(p) ? f(at) : f(ut, !1);
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2295
|
+
return G(F), ne(e, F), Tt({
|
|
2296
|
+
get config() {
|
|
2297
|
+
return n();
|
|
2298
|
+
},
|
|
2299
|
+
set config(f = null) {
|
|
2300
|
+
n(f), $();
|
|
2301
|
+
},
|
|
2302
|
+
get session() {
|
|
2303
|
+
return r();
|
|
2304
|
+
},
|
|
2305
|
+
set session(f = { id: "", data: [] }) {
|
|
2306
|
+
r(f), $();
|
|
2307
|
+
},
|
|
2308
|
+
get env() {
|
|
2309
|
+
return o();
|
|
2310
|
+
},
|
|
2311
|
+
set env(f = { mode: "gather", role: "student" }) {
|
|
2312
|
+
o(f), $();
|
|
2313
|
+
},
|
|
2314
|
+
get addCorrectResponse() {
|
|
2315
|
+
return s();
|
|
2316
|
+
},
|
|
2317
|
+
set addCorrectResponse(f = !1) {
|
|
2318
|
+
s(f), $();
|
|
2319
|
+
},
|
|
2320
|
+
get renderStimulus() {
|
|
2321
|
+
return i();
|
|
2322
|
+
},
|
|
2323
|
+
set renderStimulus(f = !0) {
|
|
2324
|
+
i(f), $();
|
|
2325
|
+
},
|
|
2326
|
+
get allowedResize() {
|
|
2327
|
+
return u();
|
|
2328
|
+
},
|
|
2329
|
+
set allowedResize(f = !1) {
|
|
2330
|
+
u(f), $();
|
|
2331
|
+
},
|
|
2332
|
+
get showBottomBorder() {
|
|
2333
|
+
return a();
|
|
2334
|
+
},
|
|
2335
|
+
set showBottomBorder(f = !1) {
|
|
2336
|
+
a(f), $();
|
|
2337
|
+
},
|
|
2338
|
+
get customClassname() {
|
|
2339
|
+
return l();
|
|
2340
|
+
},
|
|
2341
|
+
set customClassname(f = "") {
|
|
2342
|
+
l(f), $();
|
|
2343
|
+
},
|
|
2344
|
+
get containerClass() {
|
|
2345
|
+
return v();
|
|
2346
|
+
},
|
|
2347
|
+
set containerClass(f = "") {
|
|
2348
|
+
v(f), $();
|
|
2349
|
+
},
|
|
2350
|
+
get passageContainerClass() {
|
|
2351
|
+
return c();
|
|
2352
|
+
},
|
|
2353
|
+
set passageContainerClass(f = "") {
|
|
2354
|
+
c(f), $();
|
|
2355
|
+
},
|
|
2356
|
+
get externalStyleUrls() {
|
|
2357
|
+
return d();
|
|
2358
|
+
},
|
|
2359
|
+
set externalStyleUrls(f = "") {
|
|
2360
|
+
d(f), $();
|
|
2361
|
+
},
|
|
2362
|
+
get loaderConfig() {
|
|
2363
|
+
return h();
|
|
2364
|
+
},
|
|
2365
|
+
set loaderConfig(f = Wt) {
|
|
2366
|
+
h(f), $();
|
|
2367
|
+
}
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
customElements.define("pie-fixed-player", Nn(
|
|
2371
|
+
Ls,
|
|
2372
|
+
{
|
|
2373
|
+
config: { attribute: "config", type: "Object" },
|
|
2374
|
+
session: { attribute: "session", type: "Object" },
|
|
2375
|
+
env: { attribute: "env", type: "Object" },
|
|
2376
|
+
addCorrectResponse: {
|
|
2377
|
+
attribute: "add-correct-response",
|
|
2378
|
+
type: "Boolean"
|
|
2379
|
+
},
|
|
2380
|
+
renderStimulus: { attribute: "render-stimulus", type: "Boolean" },
|
|
2381
|
+
allowedResize: { attribute: "allowed-resize", type: "Boolean" },
|
|
2382
|
+
showBottomBorder: {
|
|
2383
|
+
attribute: "show-bottom-border",
|
|
2384
|
+
type: "Boolean"
|
|
2385
|
+
},
|
|
2386
|
+
customClassname: { attribute: "custom-classname", type: "String" },
|
|
2387
|
+
containerClass: { attribute: "container-class", type: "String" },
|
|
2388
|
+
passageContainerClass: {
|
|
2389
|
+
attribute: "passage-container-class",
|
|
2390
|
+
type: "String"
|
|
2391
|
+
},
|
|
2392
|
+
externalStyleUrls: {
|
|
2393
|
+
attribute: "external-style-urls",
|
|
2394
|
+
type: "String"
|
|
2395
|
+
},
|
|
2396
|
+
loaderConfig: { attribute: "loader-config", type: "Object" }
|
|
2397
|
+
},
|
|
2398
|
+
[],
|
|
2399
|
+
[],
|
|
2400
|
+
!1
|
|
2401
|
+
));
|
|
2402
|
+
//# sourceMappingURL=pie-fixed-player.js.map
|