@pie-framework/pie-fixed-player-static 1.0.0-24d9476.1 → 1.0.0-351df72.10
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 +5 -2
- package/dist/index.js +10 -6
- package/dist/pie-elements-bundle-351df72.js +218 -0
- package/dist/pie-fixed-player.js +2439 -1367
- package/package.json +14 -10
- package/dist/pie-elements-bundle-24d9476.js +0 -92
package/dist/pie-fixed-player.js
CHANGED
|
@@ -1,263 +1,380 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Yr = Object.defineProperty;
|
|
2
|
+
var _n = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
typeof window < "u" && ((
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
function
|
|
5
|
+
var Wr = (e, t, n) => t in e ? Yr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var O = (e, t, n) => Wr(e, typeof t != "symbol" ? t + "" : t, n), yn = (e, t, n) => t.has(e) || _n("Cannot " + n);
|
|
7
|
+
var V = (e, t, n) => (yn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), qt = (e, t, n) => t.has(e) ? _n("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Vt = (e, t, n, r) => (yn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
const Gr = "5";
|
|
9
|
+
var qn;
|
|
10
|
+
typeof window < "u" && ((qn = window.__svelte ?? (window.__svelte = {})).v ?? (qn.v = /* @__PURE__ */ new Set())).add(Gr);
|
|
11
|
+
const Jr = 1, Xr = 4, Zr = 8, Kr = 16, es = 2, It = "[", rn = "[!", sn = "]", Ye = {}, H = Symbol(), k = Symbol("filename"), bn = !0, fe = 2, Vn = 4, Ft = 8, on = 16, ye = 32, Be = 64, wt = 128, te = 256, Et = 512, W = 1024, be = 2048, De = 4096, Ge = 8192, Ot = 16384, ts = 32768, ln = 65536, Hn = 1 << 18, ns = 1 << 19, Yn = 1 << 20, Gt = 1 << 21, Ie = Symbol("$state"), Ze = Symbol("$state metadata"), Wn = Symbol("legacy props");
|
|
12
|
+
var Gn = Array.isArray, rs = Array.prototype.indexOf, ss = Array.from, $t = Object.keys, ue = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, is = Object.prototype, os = Array.prototype, ls = Object.getPrototypeOf, wn = Object.isExtensible;
|
|
13
|
+
function Jn(e) {
|
|
14
14
|
for (var t = 0; t < e.length; t++)
|
|
15
15
|
e[t]();
|
|
16
16
|
}
|
|
17
|
-
let
|
|
18
|
-
function
|
|
19
|
-
var e =
|
|
20
|
-
|
|
17
|
+
let it = [], Jt = [];
|
|
18
|
+
function Xn() {
|
|
19
|
+
var e = it;
|
|
20
|
+
it = [], Jn(e);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
var e =
|
|
24
|
-
|
|
22
|
+
function as() {
|
|
23
|
+
var e = Jt;
|
|
24
|
+
Jt = [], Jn(e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function Zn(e) {
|
|
27
|
+
it.length === 0 && queueMicrotask(Xn), it.push(e);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function En() {
|
|
30
|
+
it.length > 0 && Xn(), Jt.length > 0 && as();
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Kn(e) {
|
|
33
33
|
return e === this.v;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function us(e, t) {
|
|
36
36
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return !
|
|
38
|
+
function er(e) {
|
|
39
|
+
return !us(e, this.v);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
41
|
+
function cs(e, t, n) {
|
|
42
|
+
{
|
|
43
|
+
const r = new Error(`component_api_changed
|
|
44
|
+
${e} called \`${t}\` on an instance of ${n}, which is no longer valid in Svelte 5
|
|
45
|
+
https://svelte.dev/e/component_api_changed`);
|
|
46
|
+
throw r.name = "Svelte error", r;
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
49
|
+
function fs(e, t) {
|
|
50
|
+
{
|
|
51
|
+
const n = new Error(`component_api_invalid_new
|
|
52
|
+
Attempted to instantiate ${e} with \`new ${t}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`compatibility.componentApi\` compiler option to \`4\` to keep it working.
|
|
53
|
+
https://svelte.dev/e/component_api_invalid_new`);
|
|
54
|
+
throw n.name = "Svelte error", n;
|
|
55
|
+
}
|
|
46
56
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
57
|
+
function ds() {
|
|
58
|
+
{
|
|
59
|
+
const e = new Error(`derived_references_self
|
|
60
|
+
A derived value cannot reference itself recursively
|
|
61
|
+
https://svelte.dev/e/derived_references_self`);
|
|
62
|
+
throw e.name = "Svelte error", e;
|
|
63
|
+
}
|
|
49
64
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
65
|
+
function hs(e) {
|
|
66
|
+
{
|
|
67
|
+
const t = new Error(`effect_in_teardown
|
|
68
|
+
\`${e}\` cannot be used inside an effect cleanup function
|
|
69
|
+
https://svelte.dev/e/effect_in_teardown`);
|
|
70
|
+
throw t.name = "Svelte error", t;
|
|
71
|
+
}
|
|
52
72
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
73
|
+
function gs() {
|
|
74
|
+
{
|
|
75
|
+
const e = new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");
|
|
76
|
+
throw e.name = "Svelte error", e;
|
|
77
|
+
}
|
|
55
78
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
79
|
+
function ps(e) {
|
|
80
|
+
{
|
|
81
|
+
const t = new Error(`effect_orphan
|
|
82
|
+
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
83
|
+
https://svelte.dev/e/effect_orphan`);
|
|
84
|
+
throw t.name = "Svelte error", t;
|
|
85
|
+
}
|
|
58
86
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
87
|
+
function vs() {
|
|
88
|
+
{
|
|
89
|
+
const e = new Error(`effect_update_depth_exceeded
|
|
90
|
+
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
|
|
91
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);
|
|
92
|
+
throw e.name = "Svelte error", e;
|
|
93
|
+
}
|
|
61
94
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
95
|
+
function ms() {
|
|
96
|
+
{
|
|
97
|
+
const e = new Error(`hydration_failed
|
|
98
|
+
Failed to hydrate the application
|
|
99
|
+
https://svelte.dev/e/hydration_failed`);
|
|
100
|
+
throw e.name = "Svelte error", e;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function _s(e) {
|
|
104
|
+
{
|
|
105
|
+
const t = new Error(`props_invalid_value
|
|
106
|
+
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
107
|
+
https://svelte.dev/e/props_invalid_value`);
|
|
108
|
+
throw t.name = "Svelte error", t;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function ys(e) {
|
|
112
|
+
{
|
|
113
|
+
const t = new Error(`rune_outside_svelte
|
|
114
|
+
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
115
|
+
https://svelte.dev/e/rune_outside_svelte`);
|
|
116
|
+
throw t.name = "Svelte error", t;
|
|
117
|
+
}
|
|
64
118
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
119
|
+
function bs() {
|
|
120
|
+
{
|
|
121
|
+
const e = new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");
|
|
122
|
+
throw e.name = "Svelte error", e;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function ws() {
|
|
126
|
+
{
|
|
127
|
+
const e = new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");
|
|
128
|
+
throw e.name = "Svelte error", e;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function Es() {
|
|
132
|
+
{
|
|
133
|
+
const e = new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");
|
|
134
|
+
throw e.name = "Svelte error", e;
|
|
135
|
+
}
|
|
67
136
|
}
|
|
68
|
-
let $
|
|
69
|
-
|
|
70
|
-
|
|
137
|
+
let $s = !1;
|
|
138
|
+
var Ke = null;
|
|
139
|
+
function ke(e, t) {
|
|
140
|
+
if (typeof e != "object" || e === null || Ie in e)
|
|
71
141
|
return e;
|
|
72
|
-
const n =
|
|
73
|
-
if (n !==
|
|
142
|
+
const n = ls(e);
|
|
143
|
+
if (n !== is && n !== os)
|
|
74
144
|
return e;
|
|
75
|
-
var r = /* @__PURE__ */ new Map(),
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
|
|
145
|
+
var r = /* @__PURE__ */ new Map(), s = Gn(e), i = U(0), o = b, l = (a) => {
|
|
146
|
+
var f = b;
|
|
147
|
+
Pe(o);
|
|
148
|
+
var d;
|
|
149
|
+
{
|
|
150
|
+
var c = Ke;
|
|
151
|
+
Ke = u, d = a(), Ke = c;
|
|
152
|
+
}
|
|
153
|
+
return Pe(f), d;
|
|
80
154
|
};
|
|
81
|
-
|
|
155
|
+
s && r.set("length", U(
|
|
82
156
|
/** @type {any[]} */
|
|
83
157
|
e.length
|
|
84
|
-
))
|
|
158
|
+
));
|
|
159
|
+
var u;
|
|
160
|
+
if (u = {
|
|
161
|
+
parent: Ke,
|
|
162
|
+
owners: null
|
|
163
|
+
}, t) {
|
|
164
|
+
const a = t.v?.[Ze]?.owners;
|
|
165
|
+
u.owners = a ? new Set(a) : null;
|
|
166
|
+
} else
|
|
167
|
+
u.owners = Ke === null ? D !== null ? /* @__PURE__ */ new Set([D.function]) : null : /* @__PURE__ */ new Set();
|
|
168
|
+
return new Proxy(
|
|
85
169
|
/** @type {any} */
|
|
86
170
|
e,
|
|
87
171
|
{
|
|
88
|
-
defineProperty(a,
|
|
89
|
-
(!("value" in
|
|
90
|
-
var c = r.get(
|
|
91
|
-
return c === void 0 ? (c =
|
|
172
|
+
defineProperty(a, f, d) {
|
|
173
|
+
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && bs();
|
|
174
|
+
var c = r.get(f);
|
|
175
|
+
return c === void 0 ? (c = l(() => U(d.value)), r.set(f, c)) : _(
|
|
92
176
|
c,
|
|
93
|
-
|
|
177
|
+
l(() => ke(d.value))
|
|
94
178
|
), !0;
|
|
95
179
|
},
|
|
96
|
-
deleteProperty(a,
|
|
97
|
-
var
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
180
|
+
deleteProperty(a, f) {
|
|
181
|
+
var d = r.get(f);
|
|
182
|
+
if (d === void 0)
|
|
183
|
+
f in a && r.set(
|
|
184
|
+
f,
|
|
185
|
+
l(() => U(H))
|
|
102
186
|
);
|
|
103
187
|
else {
|
|
104
|
-
if (
|
|
188
|
+
if (s && typeof f == "string") {
|
|
105
189
|
var c = (
|
|
106
190
|
/** @type {Source<number>} */
|
|
107
191
|
r.get("length")
|
|
108
|
-
),
|
|
109
|
-
Number.isInteger(
|
|
192
|
+
), h = Number(f);
|
|
193
|
+
Number.isInteger(h) && h < c.v && _(c, h);
|
|
110
194
|
}
|
|
111
|
-
|
|
195
|
+
_(d, H), $n(i);
|
|
112
196
|
}
|
|
113
197
|
return !0;
|
|
114
198
|
},
|
|
115
|
-
get(a,
|
|
116
|
-
if (
|
|
199
|
+
get(a, f, d) {
|
|
200
|
+
if (f === Ze)
|
|
201
|
+
return u;
|
|
202
|
+
if (f === Ie)
|
|
117
203
|
return e;
|
|
118
|
-
var c = r.get(
|
|
119
|
-
if (c === void 0 && (!
|
|
120
|
-
var
|
|
121
|
-
|
|
204
|
+
var c = r.get(f), h = f in a;
|
|
205
|
+
if (c === void 0 && (!h || Fe(a, f)?.writable) && (c = l(() => U(ke(h ? a[f] : H))), r.set(f, c)), c !== void 0) {
|
|
206
|
+
var m = p(c);
|
|
207
|
+
{
|
|
208
|
+
var y = m?.[Ze];
|
|
209
|
+
y && y?.parent !== u && Fn(u, y);
|
|
210
|
+
}
|
|
211
|
+
return m === H ? void 0 : m;
|
|
122
212
|
}
|
|
123
|
-
return Reflect.get(a,
|
|
213
|
+
return Reflect.get(a, f, d);
|
|
124
214
|
},
|
|
125
|
-
getOwnPropertyDescriptor(a,
|
|
126
|
-
var
|
|
127
|
-
if (
|
|
128
|
-
var c = r.get(
|
|
129
|
-
c && (
|
|
130
|
-
} else if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
215
|
+
getOwnPropertyDescriptor(a, f) {
|
|
216
|
+
var d = Reflect.getOwnPropertyDescriptor(a, f);
|
|
217
|
+
if (d && "value" in d) {
|
|
218
|
+
var c = r.get(f);
|
|
219
|
+
c && (d.value = p(c));
|
|
220
|
+
} else if (d === void 0) {
|
|
221
|
+
var h = r.get(f), m = h?.v;
|
|
222
|
+
if (h !== void 0 && m !== H)
|
|
133
223
|
return {
|
|
134
224
|
enumerable: !0,
|
|
135
225
|
configurable: !0,
|
|
136
|
-
value:
|
|
226
|
+
value: m,
|
|
137
227
|
writable: !0
|
|
138
228
|
};
|
|
139
229
|
}
|
|
140
|
-
return
|
|
230
|
+
return d;
|
|
141
231
|
},
|
|
142
|
-
has(a,
|
|
143
|
-
if (
|
|
232
|
+
has(a, f) {
|
|
233
|
+
if (f === Ze || f === Ie)
|
|
144
234
|
return !0;
|
|
145
|
-
var
|
|
146
|
-
if (
|
|
147
|
-
|
|
148
|
-
var
|
|
149
|
-
if (
|
|
235
|
+
var d = r.get(f), c = d !== void 0 && d.v !== H || Reflect.has(a, f);
|
|
236
|
+
if (d !== void 0 || x !== null && (!c || Fe(a, f)?.writable)) {
|
|
237
|
+
d === void 0 && (d = l(() => U(c ? ke(a[f]) : H)), r.set(f, d));
|
|
238
|
+
var h = p(d);
|
|
239
|
+
if (h === H)
|
|
150
240
|
return !1;
|
|
151
241
|
}
|
|
152
242
|
return c;
|
|
153
243
|
},
|
|
154
|
-
set(a,
|
|
155
|
-
var
|
|
156
|
-
if (
|
|
157
|
-
for (var
|
|
158
|
-
|
|
159
|
-
var
|
|
160
|
-
|
|
244
|
+
set(a, f, d, c) {
|
|
245
|
+
var h = r.get(f), m = f in a;
|
|
246
|
+
if (s && f === "length")
|
|
247
|
+
for (var y = d; y < /** @type {Source<number>} */
|
|
248
|
+
h.v; y += 1) {
|
|
249
|
+
var C = r.get(y + "");
|
|
250
|
+
C !== void 0 ? _(C, H) : y in a && (C = l(() => U(H)), r.set(y + "", C));
|
|
161
251
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
), r.set(
|
|
166
|
-
|
|
167
|
-
|
|
252
|
+
h === void 0 ? (!m || Fe(a, f)?.writable) && (h = l(() => U(void 0)), _(
|
|
253
|
+
h,
|
|
254
|
+
l(() => ke(d))
|
|
255
|
+
), r.set(f, h)) : (m = h.v !== H, _(
|
|
256
|
+
h,
|
|
257
|
+
l(() => ke(d))
|
|
168
258
|
));
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
259
|
+
{
|
|
260
|
+
var j = d?.[Ze];
|
|
261
|
+
j && j?.parent !== u && Fn(u, j), Gs(u);
|
|
262
|
+
}
|
|
263
|
+
var N = Reflect.getOwnPropertyDescriptor(a, f);
|
|
264
|
+
if (N?.set && N.set.call(c, d), !m) {
|
|
265
|
+
if (s && typeof f == "string") {
|
|
266
|
+
var M = (
|
|
173
267
|
/** @type {Source<number>} */
|
|
174
268
|
r.get("length")
|
|
175
|
-
),
|
|
176
|
-
Number.isInteger(
|
|
269
|
+
), T = Number(f);
|
|
270
|
+
Number.isInteger(T) && T >= M.v && _(M, T + 1);
|
|
177
271
|
}
|
|
178
|
-
|
|
272
|
+
$n(i);
|
|
179
273
|
}
|
|
180
274
|
return !0;
|
|
181
275
|
},
|
|
182
276
|
ownKeys(a) {
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
var
|
|
186
|
-
return
|
|
277
|
+
p(i);
|
|
278
|
+
var f = Reflect.ownKeys(a).filter((h) => {
|
|
279
|
+
var m = r.get(h);
|
|
280
|
+
return m === void 0 || m.v !== H;
|
|
187
281
|
});
|
|
188
|
-
for (var [
|
|
189
|
-
c.v !==
|
|
190
|
-
return
|
|
282
|
+
for (var [d, c] of r)
|
|
283
|
+
c.v !== H && !(d in a) && f.push(d);
|
|
284
|
+
return f;
|
|
191
285
|
},
|
|
192
286
|
setPrototypeOf() {
|
|
193
|
-
|
|
287
|
+
ws();
|
|
194
288
|
}
|
|
195
289
|
}
|
|
196
290
|
);
|
|
197
291
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
292
|
+
function $n(e, t = 1) {
|
|
293
|
+
_(e, e.v + t);
|
|
200
294
|
}
|
|
201
|
-
|
|
202
|
-
|
|
295
|
+
function Oe(e) {
|
|
296
|
+
try {
|
|
297
|
+
if (e !== null && typeof e == "object" && Ie in e)
|
|
298
|
+
return e[Ie];
|
|
299
|
+
} catch {
|
|
300
|
+
}
|
|
301
|
+
return e;
|
|
302
|
+
}
|
|
303
|
+
let We = /* @__PURE__ */ new Set();
|
|
304
|
+
const ot = /* @__PURE__ */ new Map();
|
|
305
|
+
function Rn(e) {
|
|
306
|
+
We = e;
|
|
307
|
+
}
|
|
308
|
+
function tr(e, t) {
|
|
203
309
|
var n = {
|
|
204
310
|
f: 0,
|
|
205
311
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
206
312
|
v: e,
|
|
207
313
|
reactions: null,
|
|
208
|
-
equals:
|
|
314
|
+
equals: Kn,
|
|
209
315
|
rv: 0,
|
|
210
316
|
wv: 0
|
|
211
317
|
};
|
|
212
318
|
return n;
|
|
213
319
|
}
|
|
214
|
-
function
|
|
215
|
-
const n =
|
|
216
|
-
return
|
|
320
|
+
function U(e, t) {
|
|
321
|
+
const n = tr(e);
|
|
322
|
+
return ar(n), n;
|
|
217
323
|
}
|
|
218
324
|
// @__NO_SIDE_EFFECTS__
|
|
219
|
-
function
|
|
220
|
-
const n =
|
|
221
|
-
return t || (n.equals =
|
|
325
|
+
function nr(e, t = !1) {
|
|
326
|
+
const n = tr(e);
|
|
327
|
+
return t || (n.equals = er), n;
|
|
222
328
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
225
|
-
let r = n ?
|
|
226
|
-
return
|
|
329
|
+
function _(e, t, n = !1) {
|
|
330
|
+
b !== null && !ae && Sr() && (b.f & (fe | on)) !== 0 && !ve?.includes(e) && Es();
|
|
331
|
+
let r = n ? ke(t, e) : t;
|
|
332
|
+
return Rs(e, r);
|
|
227
333
|
}
|
|
228
|
-
function
|
|
334
|
+
function Rs(e, t) {
|
|
229
335
|
if (!e.equals(t)) {
|
|
230
336
|
var n = e.v;
|
|
231
|
-
|
|
337
|
+
if (ht ? ot.set(e, t) : ot.set(e, n), e.v = t, e.wv = cr(), rr(e, be), x !== null && (x.f & W) !== 0 && (x.f & (ye | Be)) === 0 && (K === null ? Os([e]) : K.push(e)), We.size > 0) {
|
|
338
|
+
const r = Array.from(We);
|
|
339
|
+
for (const s of r)
|
|
340
|
+
(s.f & W) !== 0 && re(s, De), Xe(s) && Bt(s);
|
|
341
|
+
We.clear();
|
|
342
|
+
}
|
|
232
343
|
}
|
|
233
344
|
return t;
|
|
234
345
|
}
|
|
235
|
-
function
|
|
346
|
+
function rr(e, t) {
|
|
236
347
|
var n = e.reactions;
|
|
237
348
|
if (n !== null)
|
|
238
|
-
for (var r = n.length,
|
|
239
|
-
var
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
349
|
+
for (var r = n.length, s = 0; s < r; s++) {
|
|
350
|
+
var i = n[s], o = i.f;
|
|
351
|
+
if ((o & be) === 0) {
|
|
352
|
+
if ((o & Hn) !== 0) {
|
|
353
|
+
We.add(i);
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
re(i, t), (o & (W | te)) !== 0 && ((o & fe) !== 0 ? rr(
|
|
357
|
+
/** @type {Derived} */
|
|
358
|
+
i,
|
|
359
|
+
De
|
|
360
|
+
) : Dt(
|
|
361
|
+
/** @type {Effect} */
|
|
362
|
+
i
|
|
363
|
+
));
|
|
364
|
+
}
|
|
248
365
|
}
|
|
249
366
|
}
|
|
250
367
|
// @__NO_SIDE_EFFECTS__
|
|
251
|
-
function
|
|
252
|
-
var t =
|
|
368
|
+
function an(e) {
|
|
369
|
+
var t = fe | be, n = b !== null && (b.f & fe) !== 0 ? (
|
|
253
370
|
/** @type {Derived} */
|
|
254
|
-
|
|
371
|
+
b
|
|
255
372
|
) : null;
|
|
256
|
-
return
|
|
257
|
-
ctx:
|
|
373
|
+
return x === null || n !== null && (n.f & te) !== 0 ? t |= te : x.f |= Yn, {
|
|
374
|
+
ctx: D,
|
|
258
375
|
deps: null,
|
|
259
376
|
effects: null,
|
|
260
|
-
equals:
|
|
377
|
+
equals: Kn,
|
|
261
378
|
f: t,
|
|
262
379
|
fn: e,
|
|
263
380
|
reactions: null,
|
|
@@ -267,27 +384,28 @@ function Lt(e) {
|
|
|
267
384
|
null
|
|
268
385
|
),
|
|
269
386
|
wv: 0,
|
|
270
|
-
parent: n ??
|
|
387
|
+
parent: n ?? x
|
|
271
388
|
};
|
|
272
389
|
}
|
|
273
|
-
function
|
|
274
|
-
const t = /* @__PURE__ */
|
|
275
|
-
return
|
|
390
|
+
function Y(e) {
|
|
391
|
+
const t = /* @__PURE__ */ an(e);
|
|
392
|
+
return ar(t), t;
|
|
276
393
|
}
|
|
277
|
-
function
|
|
394
|
+
function sr(e) {
|
|
278
395
|
var t = e.effects;
|
|
279
396
|
if (t !== null) {
|
|
280
397
|
e.effects = null;
|
|
281
398
|
for (var n = 0; n < t.length; n += 1)
|
|
282
|
-
|
|
399
|
+
_e(
|
|
283
400
|
/** @type {Effect} */
|
|
284
401
|
t[n]
|
|
285
402
|
);
|
|
286
403
|
}
|
|
287
404
|
}
|
|
288
|
-
|
|
405
|
+
let Ht = [];
|
|
406
|
+
function Cs(e) {
|
|
289
407
|
for (var t = e.parent; t !== null; ) {
|
|
290
|
-
if ((t.f &
|
|
408
|
+
if ((t.f & fe) === 0)
|
|
291
409
|
return (
|
|
292
410
|
/** @type {Effect} */
|
|
293
411
|
t
|
|
@@ -296,617 +414,849 @@ function Pr(e) {
|
|
|
296
414
|
}
|
|
297
415
|
return null;
|
|
298
416
|
}
|
|
299
|
-
function
|
|
300
|
-
var t, n =
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
417
|
+
function Ps(e) {
|
|
418
|
+
var t, n = x;
|
|
419
|
+
Je(Cs(e));
|
|
420
|
+
{
|
|
421
|
+
let r = We;
|
|
422
|
+
Rn(/* @__PURE__ */ new Set());
|
|
423
|
+
try {
|
|
424
|
+
Ht.includes(e) && ds(), Ht.push(e), sr(e), t = dr(e);
|
|
425
|
+
} finally {
|
|
426
|
+
Je(n), Rn(r), Ht.pop();
|
|
427
|
+
}
|
|
306
428
|
}
|
|
307
429
|
return t;
|
|
308
430
|
}
|
|
309
|
-
function
|
|
310
|
-
var t =
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
function ot(e) {
|
|
314
|
-
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
431
|
+
function ir(e) {
|
|
432
|
+
var t = Ps(e), n = (Re || (e.f & te) !== 0) && e.deps !== null ? De : W;
|
|
433
|
+
re(e, n), e.equals(t) || (e.v = t, e.wv = cr());
|
|
315
434
|
}
|
|
316
|
-
|
|
317
|
-
function
|
|
318
|
-
|
|
435
|
+
var ft = "font-weight: bold", dt = "font-weight: normal";
|
|
436
|
+
function Ss(e) {
|
|
437
|
+
console.warn(`%c[svelte] hydration_html_changed
|
|
438
|
+
%c${e ? `The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
439
|
+
https://svelte.dev/e/hydration_html_changed`, ft, dt);
|
|
319
440
|
}
|
|
320
|
-
|
|
321
|
-
|
|
441
|
+
function Ut(e) {
|
|
442
|
+
console.warn(`%c[svelte] hydration_mismatch
|
|
443
|
+
%cHydration failed because the initial UI does not match what was rendered on the server
|
|
444
|
+
https://svelte.dev/e/hydration_mismatch`, ft, dt);
|
|
445
|
+
}
|
|
446
|
+
function xs() {
|
|
447
|
+
console.warn(`%c[svelte] lifecycle_double_unmount
|
|
448
|
+
%cTried to unmount a component that was not mounted
|
|
449
|
+
https://svelte.dev/e/lifecycle_double_unmount`, ft, dt);
|
|
450
|
+
}
|
|
451
|
+
function Cn(e, t) {
|
|
452
|
+
console.warn(`%c[svelte] ownership_invalid_mutation
|
|
453
|
+
%c${e ? `${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead` : "Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
|
|
454
|
+
https://svelte.dev/e/ownership_invalid_mutation`, ft, dt);
|
|
455
|
+
}
|
|
456
|
+
function et(e) {
|
|
457
|
+
console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
458
|
+
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
459
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`, ft, dt);
|
|
460
|
+
}
|
|
461
|
+
let B = !1;
|
|
462
|
+
function Ve(e) {
|
|
463
|
+
B = e;
|
|
464
|
+
}
|
|
465
|
+
let A;
|
|
466
|
+
function me(e) {
|
|
322
467
|
if (e === null)
|
|
323
|
-
throw
|
|
324
|
-
return
|
|
468
|
+
throw Ut(), Ye;
|
|
469
|
+
return A = e;
|
|
325
470
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
471
|
+
function lt() {
|
|
472
|
+
return me(
|
|
328
473
|
/** @type {TemplateNode} */
|
|
329
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ Ne(A)
|
|
330
475
|
);
|
|
331
476
|
}
|
|
332
|
-
function
|
|
333
|
-
if (
|
|
334
|
-
if (/* @__PURE__ */
|
|
335
|
-
throw
|
|
336
|
-
|
|
477
|
+
function oe(e) {
|
|
478
|
+
if (B) {
|
|
479
|
+
if (/* @__PURE__ */ Ne(A) !== null)
|
|
480
|
+
throw Ut(), Ye;
|
|
481
|
+
A = e;
|
|
337
482
|
}
|
|
338
483
|
}
|
|
339
|
-
function
|
|
340
|
-
for (var e = 0, t =
|
|
484
|
+
function Ts() {
|
|
485
|
+
for (var e = 0, t = A; ; ) {
|
|
341
486
|
if (t.nodeType === 8) {
|
|
342
487
|
var n = (
|
|
343
488
|
/** @type {Comment} */
|
|
344
489
|
t.data
|
|
345
490
|
);
|
|
346
|
-
if (n ===
|
|
491
|
+
if (n === sn) {
|
|
347
492
|
if (e === 0) return t;
|
|
348
493
|
e -= 1;
|
|
349
|
-
} else (n ===
|
|
494
|
+
} else (n === It || n === rn) && (e += 1);
|
|
350
495
|
}
|
|
351
496
|
var r = (
|
|
352
497
|
/** @type {TemplateNode} */
|
|
353
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ Ne(t)
|
|
354
499
|
);
|
|
355
500
|
t.remove(), t = r;
|
|
356
501
|
}
|
|
357
502
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
503
|
+
function Ls() {
|
|
504
|
+
const e = Array.prototype, t = Array.__svelte_cleanup;
|
|
505
|
+
t && t();
|
|
506
|
+
const { indexOf: n, lastIndexOf: r, includes: s } = e;
|
|
507
|
+
e.indexOf = function(i, o) {
|
|
508
|
+
const l = n.call(this, i, o);
|
|
509
|
+
if (l === -1) {
|
|
510
|
+
for (let u = o ?? 0; u < this.length; u += 1)
|
|
511
|
+
if (Oe(this[u]) === i) {
|
|
512
|
+
et("array.indexOf(...)");
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return l;
|
|
517
|
+
}, e.lastIndexOf = function(i, o) {
|
|
518
|
+
const l = r.call(this, i, o ?? this.length - 1);
|
|
519
|
+
if (l === -1) {
|
|
520
|
+
for (let u = 0; u <= (o ?? this.length - 1); u += 1)
|
|
521
|
+
if (Oe(this[u]) === i) {
|
|
522
|
+
et("array.lastIndexOf(...)");
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return l;
|
|
527
|
+
}, e.includes = function(i, o) {
|
|
528
|
+
const l = s.call(this, i, o);
|
|
529
|
+
if (!l) {
|
|
530
|
+
for (let u = 0; u < this.length; u += 1)
|
|
531
|
+
if (Oe(this[u]) === i) {
|
|
532
|
+
et("array.includes(...)");
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return l;
|
|
537
|
+
}, Array.__svelte_cleanup = () => {
|
|
538
|
+
e.indexOf = n, e.lastIndexOf = r, e.includes = s;
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
function S(e, t, n = !0) {
|
|
542
|
+
try {
|
|
543
|
+
e === t != (Oe(e) === Oe(t)) && et(n ? "===" : "!==");
|
|
544
|
+
} catch {
|
|
545
|
+
}
|
|
546
|
+
return e === t === n;
|
|
547
|
+
}
|
|
548
|
+
function ks(e, t, n = !0) {
|
|
549
|
+
return e == t != (Oe(e) == Oe(t)) && et(n ? "==" : "!="), e == t === n;
|
|
550
|
+
}
|
|
551
|
+
var Pn, un, or, lr;
|
|
552
|
+
function Xt() {
|
|
553
|
+
if (Pn === void 0) {
|
|
554
|
+
Pn = window, un = /Firefox/.test(navigator.userAgent);
|
|
362
555
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
363
|
-
|
|
556
|
+
or = Fe(t, "firstChild").get, lr = Fe(t, "nextSibling").get, wn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), wn(n) && (n.__t = void 0), e.__svelte_meta = null, Ls();
|
|
364
557
|
}
|
|
365
558
|
}
|
|
366
|
-
function
|
|
559
|
+
function Rt(e = "") {
|
|
367
560
|
return document.createTextNode(e);
|
|
368
561
|
}
|
|
369
562
|
// @__NO_SIDE_EFFECTS__
|
|
370
|
-
function
|
|
371
|
-
return
|
|
563
|
+
function at(e) {
|
|
564
|
+
return or.call(e);
|
|
372
565
|
}
|
|
373
566
|
// @__NO_SIDE_EFFECTS__
|
|
374
|
-
function
|
|
375
|
-
return
|
|
567
|
+
function Ne(e) {
|
|
568
|
+
return lr.call(e);
|
|
376
569
|
}
|
|
377
|
-
function
|
|
378
|
-
if (!
|
|
379
|
-
return /* @__PURE__ */
|
|
570
|
+
function le(e, t) {
|
|
571
|
+
if (!B)
|
|
572
|
+
return /* @__PURE__ */ at(e);
|
|
380
573
|
var n = (
|
|
381
574
|
/** @type {TemplateNode} */
|
|
382
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ at(A)
|
|
383
576
|
);
|
|
384
577
|
if (n === null)
|
|
385
|
-
n =
|
|
578
|
+
n = A.appendChild(Rt());
|
|
386
579
|
else if (t && n.nodeType !== 3) {
|
|
387
|
-
var r =
|
|
388
|
-
return n?.before(r),
|
|
580
|
+
var r = Rt();
|
|
581
|
+
return n?.before(r), me(r), r;
|
|
389
582
|
}
|
|
390
|
-
return
|
|
391
|
-
}
|
|
392
|
-
function
|
|
393
|
-
let r =
|
|
394
|
-
for (var
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
if (!
|
|
583
|
+
return me(n), n;
|
|
584
|
+
}
|
|
585
|
+
function Zt(e, t = 1, n = !1) {
|
|
586
|
+
let r = B ? A : e;
|
|
587
|
+
for (var s; t--; )
|
|
588
|
+
s = r, r = /** @type {TemplateNode} */
|
|
589
|
+
/* @__PURE__ */ Ne(r);
|
|
590
|
+
if (!B)
|
|
398
591
|
return r;
|
|
399
|
-
var
|
|
400
|
-
if (n &&
|
|
401
|
-
var
|
|
402
|
-
return r === null ?
|
|
592
|
+
var i = r?.nodeType;
|
|
593
|
+
if (n && i !== 3) {
|
|
594
|
+
var o = Rt();
|
|
595
|
+
return r === null ? s?.after(o) : r.before(o), me(o), o;
|
|
403
596
|
}
|
|
404
|
-
return
|
|
597
|
+
return me(r), /** @type {TemplateNode} */
|
|
405
598
|
r;
|
|
406
599
|
}
|
|
407
|
-
function
|
|
600
|
+
function Is(e) {
|
|
408
601
|
e.textContent = "";
|
|
409
602
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
603
|
+
const Sn = /* @__PURE__ */ new WeakSet();
|
|
604
|
+
let yt = !1, Ct = !1, Pt = null, Ue = !1, ht = !1;
|
|
605
|
+
function xn(e) {
|
|
606
|
+
ht = e;
|
|
413
607
|
}
|
|
414
|
-
let
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
E = e;
|
|
608
|
+
let tt = [], St = [], b = null, ae = !1;
|
|
609
|
+
function Pe(e) {
|
|
610
|
+
b = e;
|
|
418
611
|
}
|
|
419
|
-
let
|
|
420
|
-
function
|
|
421
|
-
|
|
612
|
+
let x = null;
|
|
613
|
+
function Je(e) {
|
|
614
|
+
x = e;
|
|
422
615
|
}
|
|
423
|
-
let
|
|
424
|
-
function
|
|
425
|
-
|
|
616
|
+
let ve = null;
|
|
617
|
+
function Fs(e) {
|
|
618
|
+
ve = e;
|
|
426
619
|
}
|
|
427
|
-
function
|
|
428
|
-
|
|
620
|
+
function ar(e) {
|
|
621
|
+
b !== null && b.f & Gt && (ve === null ? Fs([e]) : ve.push(e));
|
|
429
622
|
}
|
|
430
|
-
let
|
|
431
|
-
function
|
|
432
|
-
|
|
623
|
+
let Q = null, X = 0, K = null;
|
|
624
|
+
function Os(e) {
|
|
625
|
+
K = e;
|
|
433
626
|
}
|
|
434
|
-
let
|
|
435
|
-
function
|
|
436
|
-
return ++
|
|
627
|
+
let ur = 1, xt = 0, Re = !1;
|
|
628
|
+
function cr() {
|
|
629
|
+
return ++ur;
|
|
437
630
|
}
|
|
438
|
-
function
|
|
631
|
+
function Xe(e) {
|
|
439
632
|
var t = e.f;
|
|
440
|
-
if ((t &
|
|
633
|
+
if ((t & be) !== 0)
|
|
441
634
|
return !0;
|
|
442
|
-
if ((t &
|
|
443
|
-
var n = e.deps, r = (t &
|
|
635
|
+
if ((t & De) !== 0) {
|
|
636
|
+
var n = e.deps, r = (t & te) !== 0;
|
|
444
637
|
if (n !== null) {
|
|
445
|
-
var
|
|
446
|
-
if (
|
|
447
|
-
var
|
|
638
|
+
var s, i, o = (t & Et) !== 0, l = r && x !== null && !Re, u = n.length;
|
|
639
|
+
if (o || l) {
|
|
640
|
+
var a = (
|
|
448
641
|
/** @type {Derived} */
|
|
449
642
|
e
|
|
450
|
-
),
|
|
451
|
-
for (
|
|
452
|
-
|
|
453
|
-
|
|
643
|
+
), f = a.parent;
|
|
644
|
+
for (s = 0; s < u; s++)
|
|
645
|
+
i = n[s], (o || !i?.reactions?.includes(a)) && (i.reactions ?? (i.reactions = [])).push(a);
|
|
646
|
+
o && (a.f ^= Et), l && f !== null && (f.f & te) === 0 && (a.f ^= te);
|
|
454
647
|
}
|
|
455
|
-
for (
|
|
456
|
-
if (
|
|
648
|
+
for (s = 0; s < u; s++)
|
|
649
|
+
if (i = n[s], Xe(
|
|
457
650
|
/** @type {Derived} */
|
|
458
|
-
|
|
459
|
-
) &&
|
|
651
|
+
i
|
|
652
|
+
) && ir(
|
|
460
653
|
/** @type {Derived} */
|
|
461
|
-
|
|
462
|
-
),
|
|
654
|
+
i
|
|
655
|
+
), i.wv > e.wv)
|
|
463
656
|
return !0;
|
|
464
657
|
}
|
|
465
|
-
(!r ||
|
|
658
|
+
(!r || x !== null && !Re) && re(e, W);
|
|
466
659
|
}
|
|
467
660
|
return !1;
|
|
468
661
|
}
|
|
469
|
-
function
|
|
662
|
+
function Tn(e, t) {
|
|
470
663
|
for (var n = t; n !== null; ) {
|
|
471
|
-
if ((n.f &
|
|
664
|
+
if ((n.f & wt) !== 0)
|
|
472
665
|
try {
|
|
473
666
|
n.fn(e);
|
|
474
667
|
return;
|
|
475
668
|
} catch {
|
|
476
|
-
n.f ^=
|
|
669
|
+
n.f ^= wt;
|
|
477
670
|
}
|
|
478
671
|
n = n.parent;
|
|
479
672
|
}
|
|
480
|
-
throw
|
|
673
|
+
throw yt = !1, e;
|
|
481
674
|
}
|
|
482
|
-
function
|
|
483
|
-
return (e.f &
|
|
675
|
+
function Ln(e) {
|
|
676
|
+
return (e.f & Ot) === 0 && (e.parent === null || (e.parent.f & wt) === 0);
|
|
484
677
|
}
|
|
485
|
-
function
|
|
486
|
-
if (
|
|
487
|
-
if (n === null && (
|
|
678
|
+
function At(e, t, n, r) {
|
|
679
|
+
if (yt) {
|
|
680
|
+
if (n === null && (yt = !1), Ln(t))
|
|
488
681
|
throw e;
|
|
489
682
|
return;
|
|
490
683
|
}
|
|
491
|
-
n !== null && (
|
|
492
|
-
|
|
493
|
-
Tr(e, t);
|
|
684
|
+
if (n !== null && (yt = !0), r === null || !(e instanceof Error) || Sn.has(e)) {
|
|
685
|
+
Tn(e, t);
|
|
494
686
|
return;
|
|
495
687
|
}
|
|
688
|
+
Sn.add(e);
|
|
689
|
+
const s = [], i = t.fn?.name;
|
|
690
|
+
i && s.push(i);
|
|
691
|
+
let o = r;
|
|
692
|
+
for (; o !== null; ) {
|
|
693
|
+
{
|
|
694
|
+
var l = o.function?.[k];
|
|
695
|
+
if (l) {
|
|
696
|
+
const f = l.split("/").pop();
|
|
697
|
+
s.push(f);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
o = o.p;
|
|
701
|
+
}
|
|
702
|
+
const u = un ? " " : " ";
|
|
703
|
+
ue(e, "message", {
|
|
704
|
+
value: e.message + `
|
|
705
|
+
${s.map((f) => `
|
|
706
|
+
${u}in ${f}`).join("")}
|
|
707
|
+
`
|
|
708
|
+
}), ue(e, "component_stack", {
|
|
709
|
+
value: s
|
|
710
|
+
});
|
|
711
|
+
const a = e.stack;
|
|
712
|
+
if (a) {
|
|
713
|
+
const f = a.split(`
|
|
714
|
+
`), d = [];
|
|
715
|
+
for (let c = 0; c < f.length; c++) {
|
|
716
|
+
const h = f[c];
|
|
717
|
+
h.includes("svelte/src/internal") || d.push(h);
|
|
718
|
+
}
|
|
719
|
+
ue(e, "stack", {
|
|
720
|
+
value: d.join(`
|
|
721
|
+
`)
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
if (Tn(e, t), Ln(t))
|
|
725
|
+
throw e;
|
|
496
726
|
}
|
|
497
|
-
function
|
|
727
|
+
function fr(e, t, n = !0) {
|
|
498
728
|
var r = e.reactions;
|
|
499
729
|
if (r !== null)
|
|
500
|
-
for (var
|
|
501
|
-
var
|
|
502
|
-
|
|
730
|
+
for (var s = 0; s < r.length; s++) {
|
|
731
|
+
var i = r[s];
|
|
732
|
+
ve?.includes(e) || ((i.f & fe) !== 0 ? fr(
|
|
503
733
|
/** @type {Derived} */
|
|
504
|
-
|
|
734
|
+
i,
|
|
505
735
|
t,
|
|
506
736
|
!1
|
|
507
|
-
) : t ===
|
|
737
|
+
) : t === i && (n ? re(i, be) : (i.f & W) !== 0 && re(i, De), Dt(
|
|
508
738
|
/** @type {Effect} */
|
|
509
|
-
|
|
739
|
+
i
|
|
510
740
|
)));
|
|
511
741
|
}
|
|
512
742
|
}
|
|
513
|
-
function
|
|
743
|
+
function dr(e) {
|
|
514
744
|
var h;
|
|
515
|
-
var t =
|
|
516
|
-
|
|
517
|
-
null,
|
|
745
|
+
var t = Q, n = X, r = K, s = b, i = Re, o = ve, l = D, u = ae, a = e.f;
|
|
746
|
+
Q = /** @type {null | Value[]} */
|
|
747
|
+
null, X = 0, K = null, Re = (a & te) !== 0 && (ae || !Ue || b === null), b = (a & (ye | Be)) === 0 ? e : null, ve = null, On(e.ctx), ae = !1, xt++, e.f |= Gt;
|
|
518
748
|
try {
|
|
519
|
-
var
|
|
749
|
+
var f = (
|
|
520
750
|
/** @type {Function} */
|
|
521
751
|
(0, e.fn)()
|
|
522
|
-
),
|
|
523
|
-
if (
|
|
524
|
-
var
|
|
525
|
-
if (
|
|
526
|
-
for (
|
|
527
|
-
|
|
752
|
+
), d = e.deps;
|
|
753
|
+
if (Q !== null) {
|
|
754
|
+
var c;
|
|
755
|
+
if (Tt(e, X), d !== null && X > 0)
|
|
756
|
+
for (d.length = X + Q.length, c = 0; c < Q.length; c++)
|
|
757
|
+
d[X + c] = Q[c];
|
|
528
758
|
else
|
|
529
|
-
e.deps =
|
|
530
|
-
if (!
|
|
531
|
-
for (
|
|
532
|
-
((h = c
|
|
533
|
-
} else
|
|
534
|
-
if (
|
|
535
|
-
for (
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
759
|
+
e.deps = d = Q;
|
|
760
|
+
if (!Re)
|
|
761
|
+
for (c = X; c < d.length; c++)
|
|
762
|
+
((h = d[c]).reactions ?? (h.reactions = [])).push(e);
|
|
763
|
+
} else d !== null && X < d.length && (Tt(e, X), d.length = X);
|
|
764
|
+
if (Sr() && K !== null && !ae && d !== null && (e.f & (fe | De | be)) === 0)
|
|
765
|
+
for (c = 0; c < /** @type {Source[]} */
|
|
766
|
+
K.length; c++)
|
|
767
|
+
fr(
|
|
768
|
+
K[c],
|
|
539
769
|
/** @type {Effect} */
|
|
540
770
|
e
|
|
541
771
|
);
|
|
542
|
-
return
|
|
543
|
-
|
|
772
|
+
return s !== null && (xt++, K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
|
|
773
|
+
K))), f;
|
|
544
774
|
} finally {
|
|
545
|
-
|
|
775
|
+
Q = t, X = n, K = r, b = s, Re = i, ve = o, On(l), ae = u, e.f ^= Gt;
|
|
546
776
|
}
|
|
547
777
|
}
|
|
548
|
-
function
|
|
778
|
+
function Us(e, t) {
|
|
549
779
|
let n = t.reactions;
|
|
550
780
|
if (n !== null) {
|
|
551
|
-
var r =
|
|
781
|
+
var r = rs.call(n, e);
|
|
552
782
|
if (r !== -1) {
|
|
553
|
-
var
|
|
554
|
-
|
|
783
|
+
var s = n.length - 1;
|
|
784
|
+
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
555
785
|
}
|
|
556
786
|
}
|
|
557
|
-
n === null && (t.f &
|
|
787
|
+
n === null && (t.f & fe) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
558
788
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
559
789
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
560
|
-
(
|
|
790
|
+
(Q === null || !Q.includes(t)) && (re(t, De), (t.f & (te | Et)) === 0 && (t.f ^= Et), sr(
|
|
561
791
|
/** @type {Derived} **/
|
|
562
792
|
t
|
|
563
|
-
),
|
|
793
|
+
), Tt(
|
|
564
794
|
/** @type {Derived} **/
|
|
565
795
|
t,
|
|
566
796
|
0
|
|
567
797
|
));
|
|
568
798
|
}
|
|
569
|
-
function
|
|
799
|
+
function Tt(e, t) {
|
|
570
800
|
var n = e.deps;
|
|
571
801
|
if (n !== null)
|
|
572
802
|
for (var r = t; r < n.length; r++)
|
|
573
|
-
|
|
803
|
+
Us(e, n[r]);
|
|
574
804
|
}
|
|
575
|
-
function
|
|
805
|
+
function Bt(e) {
|
|
576
806
|
var t = e.f;
|
|
577
|
-
if ((t &
|
|
578
|
-
|
|
579
|
-
var n =
|
|
580
|
-
|
|
807
|
+
if ((t & Ot) === 0) {
|
|
808
|
+
re(e, W);
|
|
809
|
+
var n = x, r = D, s = Ue;
|
|
810
|
+
x = e, Ue = !0;
|
|
811
|
+
{
|
|
812
|
+
var i = Ae;
|
|
813
|
+
Un(e.component_function);
|
|
814
|
+
}
|
|
581
815
|
try {
|
|
582
|
-
(t &
|
|
583
|
-
var
|
|
584
|
-
e.teardown = typeof
|
|
585
|
-
var
|
|
586
|
-
|
|
816
|
+
(t & on) !== 0 ? Vs(e) : mr(e), vr(e);
|
|
817
|
+
var o = dr(e);
|
|
818
|
+
e.teardown = typeof o == "function" ? o : null, e.wv = ur;
|
|
819
|
+
var l = e.deps, u;
|
|
820
|
+
bn && $s && e.f & be, bn && St.push(e);
|
|
587
821
|
} catch (a) {
|
|
588
|
-
|
|
822
|
+
At(a, e, n, r || e.ctx);
|
|
589
823
|
} finally {
|
|
590
|
-
|
|
824
|
+
Ue = s, x = n, Un(i);
|
|
591
825
|
}
|
|
592
826
|
}
|
|
593
827
|
}
|
|
594
|
-
function
|
|
828
|
+
function kn() {
|
|
829
|
+
console.error(
|
|
830
|
+
"Last ten effects were: ",
|
|
831
|
+
St.slice(-10).map((e) => e.fn)
|
|
832
|
+
), St = [];
|
|
833
|
+
}
|
|
834
|
+
function As() {
|
|
595
835
|
try {
|
|
596
|
-
|
|
836
|
+
vs();
|
|
597
837
|
} catch (e) {
|
|
598
|
-
if (
|
|
599
|
-
|
|
838
|
+
if (ue(e, "stack", {
|
|
839
|
+
value: ""
|
|
840
|
+
}), Pt !== null)
|
|
841
|
+
try {
|
|
842
|
+
At(e, Pt, null, null);
|
|
843
|
+
} catch (t) {
|
|
844
|
+
throw kn(), t;
|
|
845
|
+
}
|
|
600
846
|
else
|
|
601
|
-
throw e;
|
|
847
|
+
throw kn(), e;
|
|
602
848
|
}
|
|
603
849
|
}
|
|
604
|
-
function
|
|
605
|
-
var e =
|
|
850
|
+
function hr() {
|
|
851
|
+
var e = Ue;
|
|
606
852
|
try {
|
|
607
853
|
var t = 0;
|
|
608
|
-
for (
|
|
609
|
-
t++ > 1e3 &&
|
|
610
|
-
var n =
|
|
611
|
-
|
|
612
|
-
for (var
|
|
613
|
-
var
|
|
614
|
-
|
|
854
|
+
for (Ue = !0; tt.length > 0; ) {
|
|
855
|
+
t++ > 1e3 && As();
|
|
856
|
+
var n = tt, r = n.length;
|
|
857
|
+
tt = [];
|
|
858
|
+
for (var s = 0; s < r; s++) {
|
|
859
|
+
var i = Ds(n[s]);
|
|
860
|
+
Bs(i);
|
|
615
861
|
}
|
|
616
862
|
}
|
|
617
863
|
} finally {
|
|
618
|
-
|
|
864
|
+
Ct = !1, Ue = e, Pt = null, St = [], ot.clear();
|
|
619
865
|
}
|
|
620
866
|
}
|
|
621
|
-
function
|
|
867
|
+
function Bs(e) {
|
|
622
868
|
var t = e.length;
|
|
623
869
|
if (t !== 0)
|
|
624
870
|
for (var n = 0; n < t; n++) {
|
|
625
871
|
var r = e[n];
|
|
626
|
-
if ((r.f & (
|
|
872
|
+
if ((r.f & (Ot | Ge)) === 0)
|
|
627
873
|
try {
|
|
628
|
-
|
|
629
|
-
} catch (
|
|
630
|
-
|
|
874
|
+
Xe(r) && (Bt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? _r(r) : r.fn = null));
|
|
875
|
+
} catch (s) {
|
|
876
|
+
At(s, r, null, r.ctx);
|
|
631
877
|
}
|
|
632
878
|
}
|
|
633
879
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
636
|
-
for (var t =
|
|
880
|
+
function Dt(e) {
|
|
881
|
+
Ct || (Ct = !0, queueMicrotask(hr));
|
|
882
|
+
for (var t = Pt = e; t.parent !== null; ) {
|
|
637
883
|
t = t.parent;
|
|
638
884
|
var n = t.f;
|
|
639
|
-
if ((n & (
|
|
640
|
-
if ((n &
|
|
641
|
-
t.f ^=
|
|
885
|
+
if ((n & (Be | ye)) !== 0) {
|
|
886
|
+
if ((n & W) === 0) return;
|
|
887
|
+
t.f ^= W;
|
|
642
888
|
}
|
|
643
889
|
}
|
|
644
|
-
|
|
890
|
+
tt.push(t);
|
|
645
891
|
}
|
|
646
|
-
function
|
|
892
|
+
function Ds(e) {
|
|
647
893
|
for (var t = [], n = e; n !== null; ) {
|
|
648
|
-
var r = n.f,
|
|
649
|
-
if (!
|
|
650
|
-
if ((r &
|
|
894
|
+
var r = n.f, s = (r & (ye | Be)) !== 0, i = s && (r & W) !== 0;
|
|
895
|
+
if (!i && (r & Ge) === 0) {
|
|
896
|
+
if ((r & Vn) !== 0)
|
|
651
897
|
t.push(n);
|
|
652
|
-
else if (
|
|
653
|
-
n.f ^=
|
|
898
|
+
else if (s)
|
|
899
|
+
n.f ^= W;
|
|
654
900
|
else {
|
|
655
|
-
var
|
|
901
|
+
var o = b;
|
|
656
902
|
try {
|
|
657
|
-
|
|
658
|
-
} catch (
|
|
659
|
-
|
|
903
|
+
b = n, Xe(n) && Bt(n);
|
|
904
|
+
} catch (a) {
|
|
905
|
+
At(a, n, null, n.ctx);
|
|
660
906
|
} finally {
|
|
661
|
-
|
|
907
|
+
b = o;
|
|
662
908
|
}
|
|
663
909
|
}
|
|
664
|
-
var
|
|
665
|
-
if (
|
|
666
|
-
n =
|
|
910
|
+
var l = n.first;
|
|
911
|
+
if (l !== null) {
|
|
912
|
+
n = l;
|
|
667
913
|
continue;
|
|
668
914
|
}
|
|
669
915
|
}
|
|
670
|
-
var
|
|
671
|
-
for (n = n.next; n === null &&
|
|
672
|
-
n =
|
|
916
|
+
var u = n.parent;
|
|
917
|
+
for (n = n.next; n === null && u !== null; )
|
|
918
|
+
n = u.next, u = u.parent;
|
|
673
919
|
}
|
|
674
920
|
return t;
|
|
675
921
|
}
|
|
676
|
-
function
|
|
922
|
+
function R(e) {
|
|
677
923
|
var t;
|
|
678
|
-
for (
|
|
679
|
-
|
|
924
|
+
for (En(); tt.length > 0; )
|
|
925
|
+
Ct = !0, hr(), En();
|
|
680
926
|
return (
|
|
681
927
|
/** @type {T} */
|
|
682
928
|
t
|
|
683
929
|
);
|
|
684
930
|
}
|
|
685
|
-
async function
|
|
686
|
-
await Promise.resolve(),
|
|
931
|
+
async function gr() {
|
|
932
|
+
await Promise.resolve(), R();
|
|
687
933
|
}
|
|
688
|
-
function
|
|
689
|
-
var t = e.f, n = (t &
|
|
690
|
-
if (
|
|
691
|
-
if (!
|
|
692
|
-
var r =
|
|
693
|
-
e.rv <
|
|
934
|
+
function p(e) {
|
|
935
|
+
var t = e.f, n = (t & fe) !== 0;
|
|
936
|
+
if (b !== null && !ae) {
|
|
937
|
+
if (!ve?.includes(e)) {
|
|
938
|
+
var r = b.deps;
|
|
939
|
+
e.rv < xt && (e.rv = xt, Q === null && r !== null && r[X] === e ? X++ : Q === null ? Q = [e] : (!Re || !Q.includes(e)) && Q.push(e));
|
|
694
940
|
}
|
|
695
941
|
} else if (n && /** @type {Derived} */
|
|
696
942
|
e.deps === null && /** @type {Derived} */
|
|
697
943
|
e.effects === null) {
|
|
698
|
-
var
|
|
944
|
+
var s = (
|
|
699
945
|
/** @type {Derived} */
|
|
700
946
|
e
|
|
701
|
-
),
|
|
702
|
-
|
|
947
|
+
), i = s.parent;
|
|
948
|
+
i !== null && (i.f & te) === 0 && (s.f ^= te);
|
|
703
949
|
}
|
|
704
|
-
return n && (
|
|
705
|
-
e,
|
|
950
|
+
return n && (s = /** @type {Derived} */
|
|
951
|
+
e, Xe(s) && ir(s)), ht && ot.has(e) ? ot.get(e) : e.v;
|
|
706
952
|
}
|
|
707
|
-
function
|
|
708
|
-
var t =
|
|
953
|
+
function ut(e) {
|
|
954
|
+
var t = ae;
|
|
709
955
|
try {
|
|
710
|
-
return
|
|
956
|
+
return ae = !0, e();
|
|
711
957
|
} finally {
|
|
712
|
-
|
|
958
|
+
ae = t;
|
|
713
959
|
}
|
|
714
960
|
}
|
|
715
|
-
const
|
|
716
|
-
function
|
|
717
|
-
e.f = e.f &
|
|
961
|
+
const Ns = -7169;
|
|
962
|
+
function re(e, t) {
|
|
963
|
+
e.f = e.f & Ns | t;
|
|
718
964
|
}
|
|
719
|
-
function
|
|
720
|
-
|
|
965
|
+
function Ms(e) {
|
|
966
|
+
x === null && b === null && ps(e), b !== null && (b.f & te) !== 0 && x === null && gs(), ht && hs(e);
|
|
721
967
|
}
|
|
722
|
-
function
|
|
968
|
+
function js(e, t) {
|
|
723
969
|
var n = t.last;
|
|
724
970
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
725
971
|
}
|
|
726
|
-
function
|
|
727
|
-
var
|
|
728
|
-
|
|
972
|
+
function Me(e, t, n, r = !0) {
|
|
973
|
+
for (var s = x; s !== null && (s.f & Hn) !== 0; )
|
|
974
|
+
s = s.parent;
|
|
975
|
+
var i = {
|
|
976
|
+
ctx: D,
|
|
729
977
|
deps: null,
|
|
730
978
|
nodes_start: null,
|
|
731
979
|
nodes_end: null,
|
|
732
|
-
f: e |
|
|
980
|
+
f: e | be,
|
|
733
981
|
first: null,
|
|
734
982
|
fn: t,
|
|
735
983
|
last: null,
|
|
736
984
|
next: null,
|
|
737
|
-
parent:
|
|
985
|
+
parent: s,
|
|
738
986
|
prev: null,
|
|
739
987
|
teardown: null,
|
|
740
988
|
transitions: null,
|
|
741
989
|
wv: 0
|
|
742
990
|
};
|
|
743
|
-
if (n)
|
|
991
|
+
if (i.component_function = Ae, n)
|
|
744
992
|
try {
|
|
745
|
-
|
|
746
|
-
} catch (
|
|
747
|
-
throw
|
|
993
|
+
Bt(i), i.f |= ts;
|
|
994
|
+
} catch (u) {
|
|
995
|
+
throw _e(i), u;
|
|
748
996
|
}
|
|
749
|
-
else t !== null &&
|
|
750
|
-
var
|
|
751
|
-
if (!
|
|
752
|
-
var
|
|
997
|
+
else t !== null && Dt(i);
|
|
998
|
+
var o = n && i.deps === null && i.first === null && i.nodes_start === null && i.teardown === null && (i.f & (Yn | wt)) === 0;
|
|
999
|
+
if (!o && r && (s !== null && js(i, s), b !== null && (b.f & fe) !== 0)) {
|
|
1000
|
+
var l = (
|
|
753
1001
|
/** @type {Derived} */
|
|
754
|
-
|
|
1002
|
+
b
|
|
755
1003
|
);
|
|
756
|
-
(
|
|
1004
|
+
(l.effects ?? (l.effects = [])).push(i);
|
|
757
1005
|
}
|
|
758
|
-
return
|
|
759
|
-
}
|
|
760
|
-
function
|
|
761
|
-
const t =
|
|
762
|
-
return
|
|
763
|
-
}
|
|
764
|
-
function
|
|
765
|
-
|
|
766
|
-
var t =
|
|
767
|
-
if (
|
|
1006
|
+
return i;
|
|
1007
|
+
}
|
|
1008
|
+
function Qs(e) {
|
|
1009
|
+
const t = Me(Ft, null, !1);
|
|
1010
|
+
return re(t, W), t.teardown = e, t;
|
|
1011
|
+
}
|
|
1012
|
+
function Ce(e) {
|
|
1013
|
+
Ms("$effect");
|
|
1014
|
+
var t = x !== null && (x.f & ye) !== 0 && D !== null && !D.m;
|
|
1015
|
+
if (ue(e, "name", {
|
|
1016
|
+
value: "$effect"
|
|
1017
|
+
}), t) {
|
|
768
1018
|
var n = (
|
|
769
1019
|
/** @type {ComponentContext} */
|
|
770
|
-
|
|
1020
|
+
D
|
|
771
1021
|
);
|
|
772
1022
|
(n.e ?? (n.e = [])).push({
|
|
773
1023
|
fn: e,
|
|
774
|
-
effect:
|
|
775
|
-
reaction:
|
|
1024
|
+
effect: x,
|
|
1025
|
+
reaction: b
|
|
776
1026
|
});
|
|
777
1027
|
} else {
|
|
778
|
-
var r =
|
|
1028
|
+
var r = cn(e);
|
|
779
1029
|
return r;
|
|
780
1030
|
}
|
|
781
1031
|
}
|
|
782
|
-
function
|
|
783
|
-
const t =
|
|
1032
|
+
function zs(e) {
|
|
1033
|
+
const t = Me(Be, e, !0);
|
|
784
1034
|
return () => {
|
|
785
|
-
|
|
1035
|
+
_e(t);
|
|
786
1036
|
};
|
|
787
1037
|
}
|
|
788
|
-
function
|
|
789
|
-
const t =
|
|
1038
|
+
function qs(e) {
|
|
1039
|
+
const t = Me(Be, e, !0);
|
|
790
1040
|
return (n = {}) => new Promise((r) => {
|
|
791
|
-
n.outro ?
|
|
792
|
-
|
|
793
|
-
}) : (
|
|
1041
|
+
n.outro ? Kt(t, () => {
|
|
1042
|
+
_e(t), r(void 0);
|
|
1043
|
+
}) : (_e(t), r(void 0));
|
|
794
1044
|
});
|
|
795
1045
|
}
|
|
796
|
-
function
|
|
797
|
-
return
|
|
1046
|
+
function cn(e) {
|
|
1047
|
+
return Me(Vn, e, !1);
|
|
798
1048
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
1049
|
+
function pr(e) {
|
|
1050
|
+
return Me(Ft, e, !0);
|
|
801
1051
|
}
|
|
802
|
-
function
|
|
803
|
-
const r = t.map(n);
|
|
804
|
-
return
|
|
1052
|
+
function nt(e, t = [], n = an) {
|
|
1053
|
+
const r = t.map(n), s = () => e(...r.map(p));
|
|
1054
|
+
return ue(s, "name", {
|
|
1055
|
+
value: "{expression}"
|
|
1056
|
+
}), fn(s);
|
|
805
1057
|
}
|
|
806
|
-
function
|
|
807
|
-
return
|
|
1058
|
+
function fn(e, t = 0) {
|
|
1059
|
+
return Me(Ft | on | t, e, !0);
|
|
808
1060
|
}
|
|
809
|
-
function
|
|
810
|
-
return
|
|
1061
|
+
function Lt(e, t = !0) {
|
|
1062
|
+
return Me(Ft | ye, e, !0, t);
|
|
811
1063
|
}
|
|
812
|
-
function
|
|
1064
|
+
function vr(e) {
|
|
813
1065
|
var t = e.teardown;
|
|
814
1066
|
if (t !== null) {
|
|
815
|
-
const n =
|
|
816
|
-
|
|
1067
|
+
const n = ht, r = b;
|
|
1068
|
+
xn(!0), Pe(null);
|
|
817
1069
|
try {
|
|
818
1070
|
t.call(null);
|
|
819
1071
|
} finally {
|
|
820
|
-
|
|
1072
|
+
xn(n), Pe(r);
|
|
821
1073
|
}
|
|
822
1074
|
}
|
|
823
1075
|
}
|
|
824
|
-
function
|
|
1076
|
+
function mr(e, t = !1) {
|
|
825
1077
|
var n = e.first;
|
|
826
1078
|
for (e.first = e.last = null; n !== null; ) {
|
|
827
1079
|
var r = n.next;
|
|
828
|
-
(n.f &
|
|
1080
|
+
(n.f & Be) !== 0 ? n.parent = null : _e(n, t), n = r;
|
|
829
1081
|
}
|
|
830
1082
|
}
|
|
831
|
-
function
|
|
1083
|
+
function Vs(e) {
|
|
832
1084
|
for (var t = e.first; t !== null; ) {
|
|
833
1085
|
var n = t.next;
|
|
834
|
-
(t.f &
|
|
1086
|
+
(t.f & ye) === 0 && _e(t), t = n;
|
|
835
1087
|
}
|
|
836
1088
|
}
|
|
837
|
-
function
|
|
1089
|
+
function _e(e, t = !0) {
|
|
838
1090
|
var n = !1;
|
|
839
|
-
if ((t || (e.f &
|
|
840
|
-
for (var r = e.nodes_start,
|
|
841
|
-
var
|
|
1091
|
+
if ((t || (e.f & ns) !== 0) && e.nodes_start !== null) {
|
|
1092
|
+
for (var r = e.nodes_start, s = e.nodes_end; r !== null; ) {
|
|
1093
|
+
var i = r === s ? null : (
|
|
842
1094
|
/** @type {TemplateNode} */
|
|
843
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ Ne(r)
|
|
844
1096
|
);
|
|
845
|
-
r.remove(), r =
|
|
1097
|
+
r.remove(), r = i;
|
|
846
1098
|
}
|
|
847
1099
|
n = !0;
|
|
848
1100
|
}
|
|
849
|
-
|
|
850
|
-
var
|
|
851
|
-
if (
|
|
852
|
-
for (const
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
var
|
|
856
|
-
|
|
1101
|
+
mr(e, t && !n), Tt(e, 0), re(e, Ot);
|
|
1102
|
+
var o = e.transitions;
|
|
1103
|
+
if (o !== null)
|
|
1104
|
+
for (const u of o)
|
|
1105
|
+
u.stop();
|
|
1106
|
+
vr(e);
|
|
1107
|
+
var l = e.parent;
|
|
1108
|
+
l !== null && l.first !== null && _r(e), e.component_function = null, e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
|
|
857
1109
|
}
|
|
858
|
-
function
|
|
1110
|
+
function _r(e) {
|
|
859
1111
|
var t = e.parent, n = e.prev, r = e.next;
|
|
860
1112
|
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
1113
|
}
|
|
862
|
-
function
|
|
1114
|
+
function Kt(e, t) {
|
|
863
1115
|
var n = [];
|
|
864
|
-
|
|
865
|
-
|
|
1116
|
+
yr(e, n, !0), Hs(n, () => {
|
|
1117
|
+
_e(e), t && t();
|
|
866
1118
|
});
|
|
867
1119
|
}
|
|
868
|
-
function
|
|
1120
|
+
function Hs(e, t) {
|
|
869
1121
|
var n = e.length;
|
|
870
1122
|
if (n > 0) {
|
|
871
1123
|
var r = () => --n || t();
|
|
872
|
-
for (var
|
|
873
|
-
|
|
1124
|
+
for (var s of e)
|
|
1125
|
+
s.out(r);
|
|
874
1126
|
} else
|
|
875
1127
|
t();
|
|
876
1128
|
}
|
|
877
|
-
function
|
|
878
|
-
if ((e.f &
|
|
879
|
-
if (e.f ^=
|
|
880
|
-
for (const
|
|
881
|
-
(
|
|
1129
|
+
function yr(e, t, n) {
|
|
1130
|
+
if ((e.f & Ge) === 0) {
|
|
1131
|
+
if (e.f ^= Ge, e.transitions !== null)
|
|
1132
|
+
for (const o of e.transitions)
|
|
1133
|
+
(o.is_global || n) && t.push(o);
|
|
882
1134
|
for (var r = e.first; r !== null; ) {
|
|
883
|
-
var
|
|
884
|
-
|
|
1135
|
+
var s = r.next, i = (r.f & ln) !== 0 || (r.f & ye) !== 0;
|
|
1136
|
+
yr(r, t, i ? n : !1), r = s;
|
|
885
1137
|
}
|
|
886
1138
|
}
|
|
887
1139
|
}
|
|
888
|
-
function
|
|
889
|
-
|
|
1140
|
+
function In(e) {
|
|
1141
|
+
br(e, !0);
|
|
890
1142
|
}
|
|
891
|
-
function
|
|
892
|
-
if ((e.f &
|
|
893
|
-
e.f ^=
|
|
1143
|
+
function br(e, t) {
|
|
1144
|
+
if ((e.f & Ge) !== 0) {
|
|
1145
|
+
e.f ^= Ge, (e.f & W) === 0 && (e.f ^= W), Xe(e) && (re(e, be), Dt(e));
|
|
894
1146
|
for (var n = e.first; n !== null; ) {
|
|
895
|
-
var r = n.next,
|
|
896
|
-
|
|
1147
|
+
var r = n.next, s = (n.f & ln) !== 0 || (n.f & ye) !== 0;
|
|
1148
|
+
br(n, s ? t : !1), n = r;
|
|
897
1149
|
}
|
|
898
1150
|
if (e.transitions !== null)
|
|
899
|
-
for (const
|
|
900
|
-
(
|
|
1151
|
+
for (const i of e.transitions)
|
|
1152
|
+
(i.is_global || t) && i.in();
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
const rt = {}, Ys = /at (?:.+ \()?(.+):(\d+):(\d+)\)?$/, Ws = /@(.+):(\d+):(\d+)$/;
|
|
1156
|
+
function dn() {
|
|
1157
|
+
const e = new Error().stack;
|
|
1158
|
+
if (!e) return null;
|
|
1159
|
+
const t = [];
|
|
1160
|
+
for (const n of e.split(`
|
|
1161
|
+
`)) {
|
|
1162
|
+
let r = Ys.exec(n) ?? Ws.exec(n);
|
|
1163
|
+
r && t.push({
|
|
1164
|
+
file: r[1],
|
|
1165
|
+
line: +r[2],
|
|
1166
|
+
column: +r[3]
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
return t;
|
|
1170
|
+
}
|
|
1171
|
+
function wr() {
|
|
1172
|
+
const e = dn()?.slice(4);
|
|
1173
|
+
if (!e) return null;
|
|
1174
|
+
for (let t = 0; t < e.length; t++) {
|
|
1175
|
+
const n = e[t], r = rt[n.file];
|
|
1176
|
+
if (!r) {
|
|
1177
|
+
if (t === 0) return null;
|
|
1178
|
+
continue;
|
|
1179
|
+
}
|
|
1180
|
+
for (const s of r) {
|
|
1181
|
+
if (s.end == null)
|
|
1182
|
+
return null;
|
|
1183
|
+
if (s.start.line < n.line && s.end.line > n.line)
|
|
1184
|
+
return s.component;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
return null;
|
|
1188
|
+
}
|
|
1189
|
+
function Er() {
|
|
1190
|
+
var t;
|
|
1191
|
+
const e = dn()?.[2];
|
|
1192
|
+
e && (rt[t = e.file] ?? (rt[t] = [])).push({
|
|
1193
|
+
start: e,
|
|
1194
|
+
// @ts-expect-error
|
|
1195
|
+
end: null,
|
|
1196
|
+
// @ts-expect-error we add the component at the end, since HMR will overwrite the function
|
|
1197
|
+
component: null
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
function $r(e) {
|
|
1201
|
+
const t = dn()?.[2];
|
|
1202
|
+
if (t) {
|
|
1203
|
+
const n = rt[t.file], r = n[n.length - 1];
|
|
1204
|
+
r.end = t, r.component = e;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
function Fn(e, t) {
|
|
1208
|
+
if (t.owners !== null)
|
|
1209
|
+
for (; e; ) {
|
|
1210
|
+
if (e.owners === null) {
|
|
1211
|
+
t.owners = null;
|
|
1212
|
+
break;
|
|
1213
|
+
}
|
|
1214
|
+
for (const n of e.owners)
|
|
1215
|
+
t.owners.add(n);
|
|
1216
|
+
e = e.parent;
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
function Rr(e, t) {
|
|
1220
|
+
return e.owners === null ? !0 : e.owners.has(t) || // This helps avoid false positives when using HMR, where the component function is replaced
|
|
1221
|
+
k in t && [...e.owners].some(
|
|
1222
|
+
(n) => (
|
|
1223
|
+
/** @type {any} */
|
|
1224
|
+
n[k] === t[k]
|
|
1225
|
+
)
|
|
1226
|
+
) || e.parent !== null && Rr(e.parent, t);
|
|
1227
|
+
}
|
|
1228
|
+
function Cr(e) {
|
|
1229
|
+
return e?.owners?.values().next().value ?? Cr(
|
|
1230
|
+
/** @type {ProxyMetadata} */
|
|
1231
|
+
e.parent
|
|
1232
|
+
);
|
|
1233
|
+
}
|
|
1234
|
+
function Gs(e) {
|
|
1235
|
+
const t = wr();
|
|
1236
|
+
if (t && !Rr(e, t)) {
|
|
1237
|
+
let n = Cr(e);
|
|
1238
|
+
n[k] !== t[k] ? Cn(t[k], n[k]) : Cn();
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
function Pr(e) {
|
|
1242
|
+
{
|
|
1243
|
+
const t = new Error(`lifecycle_outside_component
|
|
1244
|
+
\`${e}(...)\` can only be used during component initialisation
|
|
1245
|
+
https://svelte.dev/e/lifecycle_outside_component`);
|
|
1246
|
+
throw t.name = "Svelte error", t;
|
|
901
1247
|
}
|
|
902
1248
|
}
|
|
903
|
-
let
|
|
904
|
-
function
|
|
905
|
-
|
|
1249
|
+
let D = null;
|
|
1250
|
+
function On(e) {
|
|
1251
|
+
D = e;
|
|
1252
|
+
}
|
|
1253
|
+
let Ae = null;
|
|
1254
|
+
function Un(e) {
|
|
1255
|
+
Ae = e;
|
|
906
1256
|
}
|
|
907
|
-
function
|
|
908
|
-
var r =
|
|
909
|
-
p:
|
|
1257
|
+
function hn(e, t = !1, n) {
|
|
1258
|
+
var r = D = {
|
|
1259
|
+
p: D,
|
|
910
1260
|
c: null,
|
|
911
1261
|
d: !1,
|
|
912
1262
|
e: null,
|
|
@@ -915,144 +1265,177 @@ function Ot(e, t = !1, n) {
|
|
|
915
1265
|
x: null,
|
|
916
1266
|
l: null
|
|
917
1267
|
};
|
|
918
|
-
|
|
1268
|
+
Qs(() => {
|
|
919
1269
|
r.d = !0;
|
|
920
|
-
});
|
|
1270
|
+
}), D.function = n, Ae = n;
|
|
921
1271
|
}
|
|
922
|
-
function
|
|
923
|
-
const t =
|
|
1272
|
+
function gn(e) {
|
|
1273
|
+
const t = D;
|
|
924
1274
|
if (t !== null) {
|
|
925
1275
|
e !== void 0 && (t.x = e);
|
|
926
|
-
const
|
|
927
|
-
if (
|
|
928
|
-
var n =
|
|
1276
|
+
const o = t.e;
|
|
1277
|
+
if (o !== null) {
|
|
1278
|
+
var n = x, r = b;
|
|
929
1279
|
t.e = null;
|
|
930
1280
|
try {
|
|
931
|
-
for (var
|
|
932
|
-
var
|
|
933
|
-
|
|
1281
|
+
for (var s = 0; s < o.length; s++) {
|
|
1282
|
+
var i = o[s];
|
|
1283
|
+
Je(i.effect), Pe(i.reaction), cn(i.fn);
|
|
934
1284
|
}
|
|
935
1285
|
} finally {
|
|
936
|
-
|
|
1286
|
+
Je(n), Pe(r);
|
|
937
1287
|
}
|
|
938
1288
|
}
|
|
939
|
-
|
|
1289
|
+
D = t.p, Ae = t.p?.function ?? null, t.m = !0;
|
|
940
1290
|
}
|
|
941
1291
|
return e || /** @type {T} */
|
|
942
1292
|
{};
|
|
943
1293
|
}
|
|
944
|
-
function
|
|
1294
|
+
function Sr() {
|
|
945
1295
|
return !0;
|
|
946
1296
|
}
|
|
947
|
-
const
|
|
948
|
-
function
|
|
949
|
-
|
|
1297
|
+
const Js = /\r/g;
|
|
1298
|
+
function Xs(e) {
|
|
1299
|
+
e = e.replace(Js, "");
|
|
1300
|
+
let t = 5381, n = e.length;
|
|
1301
|
+
for (; n--; ) t = (t << 5) - t ^ e.charCodeAt(n);
|
|
1302
|
+
return (t >>> 0).toString(36);
|
|
1303
|
+
}
|
|
1304
|
+
const Zs = ["touchstart", "touchmove"];
|
|
1305
|
+
function Ks(e) {
|
|
1306
|
+
return Zs.includes(e);
|
|
1307
|
+
}
|
|
1308
|
+
function ei(e) {
|
|
1309
|
+
return e?.replace(/\//g, "/");
|
|
1310
|
+
}
|
|
1311
|
+
var An = /* @__PURE__ */ new Map();
|
|
1312
|
+
function ti(e, t) {
|
|
1313
|
+
var n = An.get(e);
|
|
1314
|
+
n || (n = /* @__PURE__ */ new Set(), An.set(e, n)), n.add(t);
|
|
1315
|
+
}
|
|
1316
|
+
function Se(e, t, n) {
|
|
1317
|
+
return (...r) => {
|
|
1318
|
+
const s = e(...r);
|
|
1319
|
+
var i = B ? s : s.nodeType === 11 ? s.firstChild : s;
|
|
1320
|
+
return xr(i, t, n), s;
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
function ni(e, t, n) {
|
|
1324
|
+
e.__svelte_meta = {
|
|
1325
|
+
loc: { file: t, line: n[0], column: n[1] }
|
|
1326
|
+
}, n[2] && xr(e.firstChild, t, n[2]);
|
|
950
1327
|
}
|
|
951
|
-
|
|
952
|
-
|
|
1328
|
+
function xr(e, t, n) {
|
|
1329
|
+
for (var r = 0, s = 0; e && r < n.length; ) {
|
|
1330
|
+
if (B && e.nodeType === 8) {
|
|
1331
|
+
var i = (
|
|
1332
|
+
/** @type {Comment} */
|
|
1333
|
+
e
|
|
1334
|
+
);
|
|
1335
|
+
i.data === It || i.data === rn ? s += 1 : i.data[0] === sn && (s -= 1);
|
|
1336
|
+
}
|
|
1337
|
+
s === 0 && e.nodeType === 1 && ni(
|
|
1338
|
+
/** @type {Element} */
|
|
1339
|
+
e,
|
|
1340
|
+
t,
|
|
1341
|
+
n[r++]
|
|
1342
|
+
), e = e.nextSibling;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
const ri = /* @__PURE__ */ new Set(), Bn = /* @__PURE__ */ new Set();
|
|
1346
|
+
function vt(e) {
|
|
953
1347
|
var t = this, n = (
|
|
954
1348
|
/** @type {Node} */
|
|
955
1349
|
t.ownerDocument
|
|
956
|
-
), r = e.type,
|
|
1350
|
+
), r = e.type, s = e.composedPath?.() || [], i = (
|
|
957
1351
|
/** @type {null | Element} */
|
|
958
|
-
|
|
959
|
-
),
|
|
960
|
-
if (
|
|
961
|
-
var
|
|
962
|
-
if (
|
|
1352
|
+
s[0] || e.target
|
|
1353
|
+
), o = 0, l = e.__root;
|
|
1354
|
+
if (l) {
|
|
1355
|
+
var u = s.indexOf(l);
|
|
1356
|
+
if (u !== -1 && (t === document || t === /** @type {any} */
|
|
963
1357
|
window)) {
|
|
964
1358
|
e.__root = t;
|
|
965
1359
|
return;
|
|
966
1360
|
}
|
|
967
|
-
var
|
|
968
|
-
if (
|
|
1361
|
+
var a = s.indexOf(t);
|
|
1362
|
+
if (a === -1)
|
|
969
1363
|
return;
|
|
970
|
-
|
|
1364
|
+
u <= a && (o = u);
|
|
971
1365
|
}
|
|
972
|
-
if (
|
|
973
|
-
o
|
|
974
|
-
|
|
1366
|
+
if (i = /** @type {Element} */
|
|
1367
|
+
s[o] || e.target, i !== t) {
|
|
1368
|
+
ue(e, "currentTarget", {
|
|
975
1369
|
configurable: !0,
|
|
976
1370
|
get() {
|
|
977
|
-
return
|
|
1371
|
+
return i || n;
|
|
978
1372
|
}
|
|
979
1373
|
});
|
|
980
|
-
var
|
|
981
|
-
|
|
1374
|
+
var f = b, d = x;
|
|
1375
|
+
Pe(null), Je(null);
|
|
982
1376
|
try {
|
|
983
|
-
for (var
|
|
984
|
-
var
|
|
985
|
-
|
|
1377
|
+
for (var c, h = []; i !== null; ) {
|
|
1378
|
+
var m = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1379
|
+
i.host || null;
|
|
986
1380
|
try {
|
|
987
|
-
var
|
|
988
|
-
if (
|
|
989
|
-
|
|
1381
|
+
var y = i["__" + r];
|
|
1382
|
+
if (y != null && (!/** @type {any} */
|
|
1383
|
+
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
990
1384
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
991
|
-
e.target ===
|
|
992
|
-
if (
|
|
993
|
-
var [
|
|
994
|
-
|
|
1385
|
+
e.target === i))
|
|
1386
|
+
if (Gn(y)) {
|
|
1387
|
+
var [C, ...j] = y;
|
|
1388
|
+
C.apply(i, [e, ...j]);
|
|
995
1389
|
} else
|
|
996
|
-
|
|
997
|
-
} catch (
|
|
998
|
-
|
|
1390
|
+
y.call(i, e);
|
|
1391
|
+
} catch (N) {
|
|
1392
|
+
c ? h.push(N) : c = N;
|
|
999
1393
|
}
|
|
1000
|
-
if (e.cancelBubble ||
|
|
1394
|
+
if (e.cancelBubble || m === t || m === null)
|
|
1001
1395
|
break;
|
|
1002
|
-
|
|
1396
|
+
i = m;
|
|
1003
1397
|
}
|
|
1004
|
-
if (
|
|
1005
|
-
for (let
|
|
1398
|
+
if (c) {
|
|
1399
|
+
for (let N of h)
|
|
1006
1400
|
queueMicrotask(() => {
|
|
1007
|
-
throw
|
|
1401
|
+
throw N;
|
|
1008
1402
|
});
|
|
1009
|
-
throw
|
|
1403
|
+
throw c;
|
|
1010
1404
|
}
|
|
1011
1405
|
} finally {
|
|
1012
|
-
e.__root = t, delete e.currentTarget,
|
|
1406
|
+
e.__root = t, delete e.currentTarget, Pe(f), Je(d);
|
|
1013
1407
|
}
|
|
1014
1408
|
}
|
|
1015
1409
|
}
|
|
1016
|
-
function
|
|
1410
|
+
function Tr(e) {
|
|
1017
1411
|
var t = document.createElement("template");
|
|
1018
1412
|
return t.innerHTML = e, t.content;
|
|
1019
1413
|
}
|
|
1020
|
-
function
|
|
1414
|
+
function ct(e, t) {
|
|
1021
1415
|
var n = (
|
|
1022
1416
|
/** @type {Effect} */
|
|
1023
|
-
|
|
1417
|
+
x
|
|
1024
1418
|
);
|
|
1025
1419
|
n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
|
|
1026
1420
|
}
|
|
1027
1421
|
// @__NO_SIDE_EFFECTS__
|
|
1028
|
-
function
|
|
1029
|
-
var n = (t &
|
|
1422
|
+
function xe(e, t) {
|
|
1423
|
+
var n = (t & es) !== 0, r, s = !e.startsWith("<!>");
|
|
1030
1424
|
return () => {
|
|
1031
|
-
if (
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1034
|
-
/* @__PURE__ */
|
|
1425
|
+
if (B)
|
|
1426
|
+
return ct(A, null), A;
|
|
1427
|
+
r === void 0 && (r = Tr(s ? e : "<!>" + e), r = /** @type {Node} */
|
|
1428
|
+
/* @__PURE__ */ at(r));
|
|
1035
1429
|
var i = (
|
|
1036
1430
|
/** @type {TemplateNode} */
|
|
1037
|
-
|
|
1431
|
+
n || un ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1038
1432
|
);
|
|
1039
|
-
|
|
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;
|
|
1433
|
+
return ct(i, i), i;
|
|
1051
1434
|
};
|
|
1052
1435
|
}
|
|
1053
|
-
function
|
|
1054
|
-
if (
|
|
1055
|
-
|
|
1436
|
+
function pe(e, t) {
|
|
1437
|
+
if (B) {
|
|
1438
|
+
x.nodes_end = A, lt();
|
|
1056
1439
|
return;
|
|
1057
1440
|
}
|
|
1058
1441
|
e !== null && e.before(
|
|
@@ -1060,155 +1443,183 @@ function ne(e, t) {
|
|
|
1060
1443
|
t
|
|
1061
1444
|
);
|
|
1062
1445
|
}
|
|
1063
|
-
function
|
|
1446
|
+
function si(e, t) {
|
|
1064
1447
|
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1065
1448
|
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1066
1449
|
}
|
|
1067
|
-
function
|
|
1068
|
-
return
|
|
1450
|
+
function Lr(e, t) {
|
|
1451
|
+
return kr(e, t);
|
|
1069
1452
|
}
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1072
|
-
const n = t.target, r =
|
|
1453
|
+
function ii(e, t) {
|
|
1454
|
+
Xt(), t.intro = t.intro ?? !1;
|
|
1455
|
+
const n = t.target, r = B, s = A;
|
|
1073
1456
|
try {
|
|
1074
|
-
for (var
|
|
1457
|
+
for (var i = (
|
|
1075
1458
|
/** @type {TemplateNode} */
|
|
1076
|
-
/* @__PURE__ */
|
|
1077
|
-
);
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
if (!
|
|
1082
|
-
throw
|
|
1083
|
-
|
|
1459
|
+
/* @__PURE__ */ at(n)
|
|
1460
|
+
); i && (i.nodeType !== 8 || /** @type {Comment} */
|
|
1461
|
+
i.data !== It); )
|
|
1462
|
+
i = /** @type {TemplateNode} */
|
|
1463
|
+
/* @__PURE__ */ Ne(i);
|
|
1464
|
+
if (!i)
|
|
1465
|
+
throw Ye;
|
|
1466
|
+
Ve(!0), me(
|
|
1084
1467
|
/** @type {Comment} */
|
|
1085
|
-
|
|
1086
|
-
),
|
|
1087
|
-
const
|
|
1088
|
-
if (
|
|
1089
|
-
|
|
1090
|
-
throw
|
|
1091
|
-
return
|
|
1092
|
-
|
|
1093
|
-
} catch (
|
|
1094
|
-
if (
|
|
1095
|
-
return t.recover === !1 &&
|
|
1096
|
-
throw
|
|
1468
|
+
i
|
|
1469
|
+
), lt();
|
|
1470
|
+
const o = kr(e, { ...t, anchor: i });
|
|
1471
|
+
if (A === null || A.nodeType !== 8 || /** @type {Comment} */
|
|
1472
|
+
A.data !== sn)
|
|
1473
|
+
throw Ut(), Ye;
|
|
1474
|
+
return Ve(!1), /** @type {Exports} */
|
|
1475
|
+
o;
|
|
1476
|
+
} catch (o) {
|
|
1477
|
+
if (o === Ye)
|
|
1478
|
+
return t.recover === !1 && ms(), Xt(), Is(n), Ve(!1), Lr(e, t);
|
|
1479
|
+
throw o;
|
|
1097
1480
|
} finally {
|
|
1098
|
-
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
const
|
|
1102
|
-
function
|
|
1103
|
-
|
|
1104
|
-
var
|
|
1105
|
-
for (var
|
|
1106
|
-
var h = c
|
|
1107
|
-
if (!
|
|
1108
|
-
|
|
1109
|
-
var
|
|
1110
|
-
t.addEventListener(h,
|
|
1111
|
-
var
|
|
1112
|
-
|
|
1481
|
+
Ve(r), me(s);
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
const qe = /* @__PURE__ */ new Map();
|
|
1485
|
+
function kr(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
|
|
1486
|
+
Xt();
|
|
1487
|
+
var l = /* @__PURE__ */ new Set(), u = (d) => {
|
|
1488
|
+
for (var c = 0; c < d.length; c++) {
|
|
1489
|
+
var h = d[c];
|
|
1490
|
+
if (!l.has(h)) {
|
|
1491
|
+
l.add(h);
|
|
1492
|
+
var m = Ks(h);
|
|
1493
|
+
t.addEventListener(h, vt, { passive: m });
|
|
1494
|
+
var y = qe.get(h);
|
|
1495
|
+
y === void 0 ? (document.addEventListener(h, vt, { passive: m }), qe.set(h, 1)) : qe.set(h, y + 1);
|
|
1113
1496
|
}
|
|
1114
1497
|
}
|
|
1115
1498
|
};
|
|
1116
|
-
|
|
1117
|
-
var
|
|
1118
|
-
var
|
|
1119
|
-
return
|
|
1120
|
-
if (
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1499
|
+
u(ss(ri)), Bn.add(u);
|
|
1500
|
+
var a = void 0, f = qs(() => {
|
|
1501
|
+
var d = n ?? t.appendChild(Rt());
|
|
1502
|
+
return Lt(() => {
|
|
1503
|
+
if (i) {
|
|
1504
|
+
hn({});
|
|
1505
|
+
var c = (
|
|
1123
1506
|
/** @type {ComponentContext} */
|
|
1124
|
-
|
|
1507
|
+
D
|
|
1125
1508
|
);
|
|
1126
|
-
|
|
1509
|
+
c.c = i;
|
|
1127
1510
|
}
|
|
1128
|
-
|
|
1511
|
+
s && (r.$$events = s), B && ct(
|
|
1129
1512
|
/** @type {TemplateNode} */
|
|
1130
|
-
|
|
1513
|
+
d,
|
|
1131
1514
|
null
|
|
1132
|
-
),
|
|
1515
|
+
), a = e(d, r) || {}, B && (x.nodes_end = A), i && gn();
|
|
1133
1516
|
}), () => {
|
|
1134
|
-
for (var
|
|
1135
|
-
t.removeEventListener(
|
|
1517
|
+
for (var c of l) {
|
|
1518
|
+
t.removeEventListener(c, vt);
|
|
1136
1519
|
var h = (
|
|
1137
1520
|
/** @type {number} */
|
|
1138
|
-
|
|
1521
|
+
qe.get(c)
|
|
1139
1522
|
);
|
|
1140
|
-
--h === 0 ? (document.removeEventListener(
|
|
1523
|
+
--h === 0 ? (document.removeEventListener(c, vt), qe.delete(c)) : qe.set(c, h);
|
|
1141
1524
|
}
|
|
1142
|
-
|
|
1525
|
+
Bn.delete(u), d !== n && d.parentNode?.removeChild(d);
|
|
1143
1526
|
};
|
|
1144
1527
|
});
|
|
1145
|
-
return
|
|
1146
|
-
}
|
|
1147
|
-
let
|
|
1148
|
-
function
|
|
1149
|
-
const n =
|
|
1150
|
-
return n ? (
|
|
1151
|
-
}
|
|
1152
|
-
function
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1528
|
+
return en.set(a, f), a;
|
|
1529
|
+
}
|
|
1530
|
+
let en = /* @__PURE__ */ new WeakMap();
|
|
1531
|
+
function oi(e, t) {
|
|
1532
|
+
const n = en.get(e);
|
|
1533
|
+
return n ? (en.delete(e), n(t)) : (xs(), Promise.resolve());
|
|
1534
|
+
}
|
|
1535
|
+
function Ir(e) {
|
|
1536
|
+
e && fs(e[k] ?? "a component", e.name);
|
|
1537
|
+
}
|
|
1538
|
+
function Fr() {
|
|
1539
|
+
const e = D?.function;
|
|
1540
|
+
function t(n) {
|
|
1541
|
+
const r = wr()?.[k] ?? "Something";
|
|
1542
|
+
cs(r, n, e[k]);
|
|
1543
|
+
}
|
|
1544
|
+
return {
|
|
1545
|
+
$destroy: () => t("$destroy()"),
|
|
1546
|
+
$on: () => t("$on(...)"),
|
|
1547
|
+
$set: () => t("$set(...)")
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
function st(e, t, [n, r] = [0, 0]) {
|
|
1551
|
+
B && n === 0 && lt();
|
|
1552
|
+
var s = e, i = null, o = null, l = H, u = n > 0 ? ln : 0, a = !1;
|
|
1553
|
+
const f = (c, h = !0) => {
|
|
1554
|
+
a = !0, d(h, c);
|
|
1555
|
+
}, d = (c, h) => {
|
|
1556
|
+
if (l === (l = c)) return;
|
|
1557
|
+
let m = !1;
|
|
1558
|
+
if (B && r !== -1) {
|
|
1161
1559
|
if (n === 0) {
|
|
1162
|
-
const
|
|
1560
|
+
const C = (
|
|
1163
1561
|
/** @type {Comment} */
|
|
1164
|
-
|
|
1562
|
+
s.data
|
|
1165
1563
|
);
|
|
1166
|
-
|
|
1564
|
+
C === It ? r = 0 : C === rn ? r = 1 / 0 : (r = parseInt(C.substring(1)), r !== r && (r = l ? 1 / 0 : -1));
|
|
1167
1565
|
}
|
|
1168
|
-
const
|
|
1169
|
-
!!
|
|
1566
|
+
const y = r > n;
|
|
1567
|
+
!!l === y && (s = Ts(), me(s), Ve(!1), m = !0, r = -1);
|
|
1170
1568
|
}
|
|
1171
|
-
|
|
1569
|
+
l ? (i ? In(i) : h && (i = Lt(() => h(s))), o && Kt(o, () => {
|
|
1570
|
+
o = null;
|
|
1571
|
+
})) : (o ? In(o) : h && (o = Lt(() => h(s, [n + 1, r]))), i && Kt(i, () => {
|
|
1172
1572
|
i = null;
|
|
1173
|
-
}))
|
|
1174
|
-
s = null;
|
|
1175
|
-
})), _ && ce(!0);
|
|
1573
|
+
})), m && Ve(!0);
|
|
1176
1574
|
};
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
},
|
|
1180
|
-
}
|
|
1181
|
-
function
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1575
|
+
fn(() => {
|
|
1576
|
+
a = !1, t(f), a || d(null, null);
|
|
1577
|
+
}, u), B && (s = A);
|
|
1578
|
+
}
|
|
1579
|
+
function li(e, t, n) {
|
|
1580
|
+
if (!t || t === Xs(String(n ?? ""))) return;
|
|
1581
|
+
let r;
|
|
1582
|
+
const s = e.__svelte_meta?.loc;
|
|
1583
|
+
s ? r = `near ${s.file}:${s.line}:${s.column}` : Ae?.[k] && (r = `in ${Ae[k]}`), Ss(ei(r));
|
|
1584
|
+
}
|
|
1585
|
+
function Dn(e, t, n, r, s) {
|
|
1586
|
+
var i = e, o = "", l;
|
|
1587
|
+
fn(() => {
|
|
1588
|
+
if (o === (o = t() ?? "")) {
|
|
1589
|
+
B && lt();
|
|
1186
1590
|
return;
|
|
1187
1591
|
}
|
|
1188
|
-
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1191
|
-
|
|
1592
|
+
l !== void 0 && (_e(l), l = void 0), o !== "" && (l = Lt(() => {
|
|
1593
|
+
if (B) {
|
|
1594
|
+
for (var u = (
|
|
1595
|
+
/** @type {Comment} */
|
|
1596
|
+
A.data
|
|
1597
|
+
), a = lt(), f = a; a !== null && (a.nodeType !== 8 || /** @type {Comment} */
|
|
1192
1598
|
a.data !== ""); )
|
|
1193
|
-
|
|
1194
|
-
/* @__PURE__ */
|
|
1599
|
+
f = a, a = /** @type {TemplateNode} */
|
|
1600
|
+
/* @__PURE__ */ Ne(a);
|
|
1195
1601
|
if (a === null)
|
|
1196
|
-
throw
|
|
1197
|
-
|
|
1602
|
+
throw Ut(), Ye;
|
|
1603
|
+
li(
|
|
1604
|
+
/** @type {Element} */
|
|
1605
|
+
a.parentNode,
|
|
1606
|
+
u,
|
|
1607
|
+
o
|
|
1608
|
+
), ct(A, f), i = me(a);
|
|
1198
1609
|
return;
|
|
1199
1610
|
}
|
|
1200
|
-
var
|
|
1201
|
-
|
|
1611
|
+
var d = o + "", c = Tr(d);
|
|
1612
|
+
ct(
|
|
1202
1613
|
/** @type {TemplateNode} */
|
|
1203
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ at(c),
|
|
1204
1615
|
/** @type {TemplateNode} */
|
|
1205
1616
|
c.lastChild
|
|
1206
|
-
),
|
|
1617
|
+
), i.before(c);
|
|
1207
1618
|
}));
|
|
1208
1619
|
});
|
|
1209
1620
|
}
|
|
1210
|
-
function
|
|
1211
|
-
|
|
1621
|
+
function Or(e, t) {
|
|
1622
|
+
Zn(() => {
|
|
1212
1623
|
var n = e.getRootNode(), r = (
|
|
1213
1624
|
/** @type {ShadowRoot} */
|
|
1214
1625
|
n.host ? (
|
|
@@ -1221,131 +1632,138 @@ function Fn(e, t) {
|
|
|
1221
1632
|
)
|
|
1222
1633
|
);
|
|
1223
1634
|
if (!r.querySelector("#" + t.hash)) {
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1635
|
+
const s = document.createElement("style");
|
|
1636
|
+
s.id = t.hash, s.textContent = t.code, r.appendChild(s), ti(t.hash, s);
|
|
1226
1637
|
}
|
|
1227
1638
|
});
|
|
1228
1639
|
}
|
|
1229
|
-
function
|
|
1640
|
+
function ai(e, t, n) {
|
|
1230
1641
|
var r = e == null ? "" : "" + e;
|
|
1231
1642
|
return t && (r = r ? r + " " + t : t), r === "" ? null : r;
|
|
1232
1643
|
}
|
|
1233
|
-
function
|
|
1234
|
-
var
|
|
1235
|
-
if (
|
|
1236
|
-
var
|
|
1237
|
-
(!
|
|
1644
|
+
function He(e, t, n, r, s, i) {
|
|
1645
|
+
var o = e.__className;
|
|
1646
|
+
if (B || o !== n || o === void 0) {
|
|
1647
|
+
var l = ai(n, r);
|
|
1648
|
+
(!B || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
|
|
1238
1649
|
}
|
|
1239
|
-
return
|
|
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));
|
|
1650
|
+
return i;
|
|
1245
1651
|
}
|
|
1246
|
-
function
|
|
1247
|
-
|
|
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
|
-
}
|
|
1652
|
+
function Nn(e, t) {
|
|
1653
|
+
return e === t || e?.[Ie] === t;
|
|
1260
1654
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return (
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
})
|
|
1269
|
-
|
|
1655
|
+
function ui(e = {}, t, n, r) {
|
|
1656
|
+
return cn(() => {
|
|
1657
|
+
var s, i;
|
|
1658
|
+
return pr(() => {
|
|
1659
|
+
s = i, i = [], ut(() => {
|
|
1660
|
+
e !== n(...i) && (t(e, ...i), s && Nn(n(...s), e) && t(null, ...s));
|
|
1661
|
+
});
|
|
1662
|
+
}), () => {
|
|
1663
|
+
Zn(() => {
|
|
1664
|
+
i && Nn(n(...i), e) && t(null, ...i);
|
|
1665
|
+
});
|
|
1666
|
+
};
|
|
1667
|
+
}), e;
|
|
1668
|
+
}
|
|
1669
|
+
{
|
|
1670
|
+
let e = function(t) {
|
|
1671
|
+
if (!(t in globalThis)) {
|
|
1672
|
+
let n;
|
|
1673
|
+
Object.defineProperty(globalThis, t, {
|
|
1674
|
+
configurable: !0,
|
|
1675
|
+
// eslint-disable-next-line getter-return
|
|
1676
|
+
get: () => {
|
|
1677
|
+
if (n !== void 0)
|
|
1678
|
+
return n;
|
|
1679
|
+
ys(t);
|
|
1680
|
+
},
|
|
1681
|
+
set: (r) => {
|
|
1682
|
+
n = r;
|
|
1683
|
+
}
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
};
|
|
1687
|
+
var Qi = e;
|
|
1688
|
+
e("$state"), e("$effect"), e("$derived"), e("$inspect"), e("$props"), e("$bindable");
|
|
1689
|
+
}
|
|
1690
|
+
function ci(e) {
|
|
1691
|
+
D === null && Pr("onMount"), Ce(() => {
|
|
1692
|
+
const t = ut(e);
|
|
1693
|
+
if (typeof t == "function") return (
|
|
1694
|
+
/** @type {() => void} */
|
|
1695
|
+
t
|
|
1696
|
+
);
|
|
1697
|
+
});
|
|
1270
1698
|
}
|
|
1271
|
-
|
|
1272
|
-
|
|
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;
|
|
1699
|
+
function fi(e) {
|
|
1700
|
+
D === null && Pr("onDestroy"), ci(() => () => ut(e));
|
|
1283
1701
|
}
|
|
1284
|
-
let
|
|
1285
|
-
function
|
|
1286
|
-
var t =
|
|
1702
|
+
let mt = !1;
|
|
1703
|
+
function di(e) {
|
|
1704
|
+
var t = mt;
|
|
1287
1705
|
try {
|
|
1288
|
-
return
|
|
1706
|
+
return mt = !1, [e(), mt];
|
|
1289
1707
|
} finally {
|
|
1290
|
-
|
|
1708
|
+
mt = t;
|
|
1291
1709
|
}
|
|
1292
1710
|
}
|
|
1293
|
-
function
|
|
1711
|
+
function Mn(e) {
|
|
1294
1712
|
return e.ctx?.d ?? !1;
|
|
1295
1713
|
}
|
|
1296
|
-
function
|
|
1297
|
-
var
|
|
1298
|
-
|
|
1714
|
+
function P(e, t, n, r) {
|
|
1715
|
+
var s = (n & Jr) !== 0, i = !0, o = (n & Zr) !== 0, l = (n & Kr) !== 0, u = !1, a;
|
|
1716
|
+
o ? [a, u] = di(() => (
|
|
1299
1717
|
/** @type {V} */
|
|
1300
1718
|
e[t]
|
|
1301
|
-
)) :
|
|
1719
|
+
)) : a = /** @type {V} */
|
|
1302
1720
|
e[t];
|
|
1303
|
-
var
|
|
1721
|
+
var f = Ie in e || Wn in e, d = o && (Fe(e, t)?.set ?? (f && t in e && ((L) => e[t] = L))) || void 0, c = (
|
|
1304
1722
|
/** @type {V} */
|
|
1305
1723
|
r
|
|
1306
|
-
), h = !0,
|
|
1724
|
+
), h = !0, m = !1, y = () => (m = !0, h && (h = !1, l ? c = ut(
|
|
1307
1725
|
/** @type {() => V} */
|
|
1308
1726
|
r
|
|
1309
|
-
) :
|
|
1310
|
-
r),
|
|
1311
|
-
|
|
1312
|
-
var
|
|
1313
|
-
if (
|
|
1314
|
-
var
|
|
1727
|
+
) : c = /** @type {V} */
|
|
1728
|
+
r), c);
|
|
1729
|
+
a === void 0 && r !== void 0 && (d && i && _s(t), a = y(), d && d(a));
|
|
1730
|
+
var C;
|
|
1731
|
+
if (C = () => {
|
|
1732
|
+
var L = (
|
|
1315
1733
|
/** @type {V} */
|
|
1316
1734
|
e[t]
|
|
1317
1735
|
);
|
|
1318
|
-
return
|
|
1319
|
-
}, (n &
|
|
1320
|
-
return
|
|
1321
|
-
if (
|
|
1322
|
-
var
|
|
1323
|
-
return function(
|
|
1324
|
-
return arguments.length > 0 ? ((!F ||
|
|
1736
|
+
return L === void 0 ? y() : (h = !0, m = !1, L);
|
|
1737
|
+
}, (n & Xr) === 0)
|
|
1738
|
+
return C;
|
|
1739
|
+
if (d) {
|
|
1740
|
+
var j = e.$$legacy;
|
|
1741
|
+
return function(L, F) {
|
|
1742
|
+
return arguments.length > 0 ? ((!F || j || u) && d(F ? C() : L), L) : C();
|
|
1325
1743
|
};
|
|
1326
1744
|
}
|
|
1327
|
-
var
|
|
1328
|
-
var
|
|
1329
|
-
return
|
|
1745
|
+
var N = !1, M = /* @__PURE__ */ nr(a), T = /* @__PURE__ */ an(() => {
|
|
1746
|
+
var L = C(), F = p(M);
|
|
1747
|
+
return N ? (N = !1, F) : M.v = L;
|
|
1330
1748
|
});
|
|
1331
|
-
return
|
|
1749
|
+
return o && p(T), s || (T.equals = er), function(L, F) {
|
|
1332
1750
|
if (arguments.length > 0) {
|
|
1333
|
-
const
|
|
1334
|
-
if (!
|
|
1335
|
-
if (
|
|
1336
|
-
return
|
|
1337
|
-
|
|
1751
|
+
const q = F ? p(T) : o ? ke(L) : L;
|
|
1752
|
+
if (!T.equals(q)) {
|
|
1753
|
+
if (N = !0, _(M, q), m && c !== void 0 && (c = q), Mn(T))
|
|
1754
|
+
return L;
|
|
1755
|
+
ut(() => p(T));
|
|
1338
1756
|
}
|
|
1339
|
-
return
|
|
1757
|
+
return L;
|
|
1340
1758
|
}
|
|
1341
|
-
return
|
|
1759
|
+
return Mn(T) ? T.v : p(T);
|
|
1342
1760
|
};
|
|
1343
1761
|
}
|
|
1344
|
-
function
|
|
1345
|
-
return new
|
|
1762
|
+
function hi(e) {
|
|
1763
|
+
return new gi(e);
|
|
1346
1764
|
}
|
|
1347
|
-
var
|
|
1348
|
-
class
|
|
1765
|
+
var ge, ee;
|
|
1766
|
+
class gi {
|
|
1349
1767
|
/**
|
|
1350
1768
|
* @param {ComponentConstructorOptions & {
|
|
1351
1769
|
* component: any;
|
|
@@ -1353,56 +1771,56 @@ class is {
|
|
|
1353
1771
|
*/
|
|
1354
1772
|
constructor(t) {
|
|
1355
1773
|
/** @type {any} */
|
|
1356
|
-
|
|
1774
|
+
qt(this, ge);
|
|
1357
1775
|
/** @type {Record<string, any>} */
|
|
1358
|
-
|
|
1359
|
-
var n = /* @__PURE__ */ new Map(), r = (
|
|
1360
|
-
var
|
|
1361
|
-
return n.set(
|
|
1776
|
+
qt(this, ee);
|
|
1777
|
+
var n = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
1778
|
+
var l = /* @__PURE__ */ nr(o);
|
|
1779
|
+
return n.set(i, l), l;
|
|
1362
1780
|
};
|
|
1363
|
-
const
|
|
1781
|
+
const s = new Proxy(
|
|
1364
1782
|
{ ...t.props || {}, $$events: {} },
|
|
1365
1783
|
{
|
|
1366
|
-
get(
|
|
1367
|
-
return
|
|
1784
|
+
get(i, o) {
|
|
1785
|
+
return p(n.get(o) ?? r(o, Reflect.get(i, o)));
|
|
1368
1786
|
},
|
|
1369
|
-
has(
|
|
1370
|
-
return
|
|
1787
|
+
has(i, o) {
|
|
1788
|
+
return o === Wn ? !0 : (p(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
1371
1789
|
},
|
|
1372
|
-
set(
|
|
1373
|
-
return
|
|
1790
|
+
set(i, o, l) {
|
|
1791
|
+
return _(n.get(o) ?? r(o, l), l), Reflect.set(i, o, l);
|
|
1374
1792
|
}
|
|
1375
1793
|
}
|
|
1376
1794
|
);
|
|
1377
|
-
|
|
1795
|
+
Vt(this, ee, (t.hydrate ? ii : Lr)(t.component, {
|
|
1378
1796
|
target: t.target,
|
|
1379
1797
|
anchor: t.anchor,
|
|
1380
|
-
props:
|
|
1798
|
+
props: s,
|
|
1381
1799
|
context: t.context,
|
|
1382
1800
|
intro: t.intro ?? !1,
|
|
1383
1801
|
recover: t.recover
|
|
1384
|
-
})), (!t?.props?.$$host || t.sync === !1) &&
|
|
1385
|
-
for (const
|
|
1386
|
-
|
|
1802
|
+
})), (!t?.props?.$$host || t.sync === !1) && R(), Vt(this, ge, s.$$events);
|
|
1803
|
+
for (const i of Object.keys(V(this, ee)))
|
|
1804
|
+
i === "$set" || i === "$destroy" || i === "$on" || ue(this, i, {
|
|
1387
1805
|
get() {
|
|
1388
|
-
return
|
|
1806
|
+
return V(this, ee)[i];
|
|
1389
1807
|
},
|
|
1390
1808
|
/** @param {any} value */
|
|
1391
|
-
set(
|
|
1392
|
-
|
|
1809
|
+
set(o) {
|
|
1810
|
+
V(this, ee)[i] = o;
|
|
1393
1811
|
},
|
|
1394
1812
|
enumerable: !0
|
|
1395
1813
|
});
|
|
1396
|
-
|
|
1397
|
-
(
|
|
1398
|
-
Object.assign(
|
|
1399
|
-
},
|
|
1400
|
-
|
|
1814
|
+
V(this, ee).$set = /** @param {Record<string, any>} next */
|
|
1815
|
+
(i) => {
|
|
1816
|
+
Object.assign(s, i);
|
|
1817
|
+
}, V(this, ee).$destroy = () => {
|
|
1818
|
+
oi(V(this, ee));
|
|
1401
1819
|
};
|
|
1402
1820
|
}
|
|
1403
1821
|
/** @param {Record<string, any>} props */
|
|
1404
1822
|
$set(t) {
|
|
1405
|
-
|
|
1823
|
+
V(this, ee).$set(t);
|
|
1406
1824
|
}
|
|
1407
1825
|
/**
|
|
1408
1826
|
* @param {string} event
|
|
@@ -1410,22 +1828,22 @@ class is {
|
|
|
1410
1828
|
* @returns {any}
|
|
1411
1829
|
*/
|
|
1412
1830
|
$on(t, n) {
|
|
1413
|
-
|
|
1414
|
-
const r = (...
|
|
1415
|
-
return
|
|
1416
|
-
|
|
1831
|
+
V(this, ge)[t] = V(this, ge)[t] || [];
|
|
1832
|
+
const r = (...s) => n.call(this, ...s);
|
|
1833
|
+
return V(this, ge)[t].push(r), () => {
|
|
1834
|
+
V(this, ge)[t] = V(this, ge)[t].filter(
|
|
1417
1835
|
/** @param {any} fn */
|
|
1418
|
-
(
|
|
1836
|
+
(s) => s !== r
|
|
1419
1837
|
);
|
|
1420
1838
|
};
|
|
1421
1839
|
}
|
|
1422
1840
|
$destroy() {
|
|
1423
|
-
|
|
1841
|
+
V(this, ee).$destroy();
|
|
1424
1842
|
}
|
|
1425
1843
|
}
|
|
1426
|
-
|
|
1427
|
-
let
|
|
1428
|
-
typeof HTMLElement == "function" && (
|
|
1844
|
+
ge = new WeakMap(), ee = new WeakMap();
|
|
1845
|
+
let Ur;
|
|
1846
|
+
typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
1429
1847
|
/**
|
|
1430
1848
|
* @param {*} $$componentCtor
|
|
1431
1849
|
* @param {*} $$slots
|
|
@@ -1434,25 +1852,25 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
1434
1852
|
constructor(t, n, r) {
|
|
1435
1853
|
super();
|
|
1436
1854
|
/** The Svelte component constructor */
|
|
1437
|
-
|
|
1855
|
+
O(this, "$$ctor");
|
|
1438
1856
|
/** Slots */
|
|
1439
|
-
|
|
1857
|
+
O(this, "$$s");
|
|
1440
1858
|
/** @type {any} The Svelte component instance */
|
|
1441
|
-
|
|
1859
|
+
O(this, "$$c");
|
|
1442
1860
|
/** Whether or not the custom element is connected */
|
|
1443
|
-
|
|
1861
|
+
O(this, "$$cn", !1);
|
|
1444
1862
|
/** @type {Record<string, any>} Component props data */
|
|
1445
|
-
|
|
1863
|
+
O(this, "$$d", {});
|
|
1446
1864
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1447
|
-
|
|
1865
|
+
O(this, "$$r", !1);
|
|
1448
1866
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1449
|
-
|
|
1867
|
+
O(this, "$$p_d", {});
|
|
1450
1868
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1451
|
-
|
|
1869
|
+
O(this, "$$l", {});
|
|
1452
1870
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1453
|
-
|
|
1871
|
+
O(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1454
1872
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1455
|
-
|
|
1873
|
+
O(this, "$$me");
|
|
1456
1874
|
this.$$ctor = t, this.$$s = n, r && this.attachShadow({ mode: "open" });
|
|
1457
1875
|
}
|
|
1458
1876
|
/**
|
|
@@ -1462,8 +1880,8 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
1462
1880
|
*/
|
|
1463
1881
|
addEventListener(t, n, r) {
|
|
1464
1882
|
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
|
|
1465
|
-
const
|
|
1466
|
-
this.$$l_u.set(n,
|
|
1883
|
+
const s = this.$$c.$on(t, n);
|
|
1884
|
+
this.$$l_u.set(n, s);
|
|
1467
1885
|
}
|
|
1468
1886
|
super.addEventListener(t, n, r);
|
|
1469
1887
|
}
|
|
@@ -1474,31 +1892,31 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
1474
1892
|
*/
|
|
1475
1893
|
removeEventListener(t, n, r) {
|
|
1476
1894
|
if (super.removeEventListener(t, n, r), this.$$c) {
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1895
|
+
const s = this.$$l_u.get(n);
|
|
1896
|
+
s && (s(), this.$$l_u.delete(n));
|
|
1479
1897
|
}
|
|
1480
1898
|
}
|
|
1481
1899
|
async connectedCallback() {
|
|
1482
1900
|
if (this.$$cn = !0, !this.$$c) {
|
|
1483
|
-
let n = function(
|
|
1484
|
-
return (
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1901
|
+
let n = function(i) {
|
|
1902
|
+
return (o) => {
|
|
1903
|
+
const l = document.createElement("slot");
|
|
1904
|
+
i !== "default" && (l.name = i), pe(o, l);
|
|
1487
1905
|
};
|
|
1488
1906
|
};
|
|
1489
1907
|
var t = n;
|
|
1490
1908
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1491
1909
|
return;
|
|
1492
|
-
const r = {},
|
|
1493
|
-
for (const
|
|
1494
|
-
|
|
1495
|
-
for (const
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1910
|
+
const r = {}, s = pi(this);
|
|
1911
|
+
for (const i of this.$$s)
|
|
1912
|
+
i in s && (i === "default" && !this.$$d.children ? (this.$$d.children = n(i), r.default = !0) : r[i] = n(i));
|
|
1913
|
+
for (const i of this.attributes) {
|
|
1914
|
+
const o = this.$$g_p(i.name);
|
|
1915
|
+
o in this.$$d || (this.$$d[o] = bt(o, i.value, this.$$p_d, "toProp"));
|
|
1498
1916
|
}
|
|
1499
|
-
for (const
|
|
1500
|
-
!(
|
|
1501
|
-
this.$$c =
|
|
1917
|
+
for (const i in this.$$p_d)
|
|
1918
|
+
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
1919
|
+
this.$$c = hi({
|
|
1502
1920
|
component: this.$$ctor,
|
|
1503
1921
|
target: this.shadowRoot || this,
|
|
1504
1922
|
props: {
|
|
@@ -1506,27 +1924,27 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
1506
1924
|
$$slots: r,
|
|
1507
1925
|
$$host: this
|
|
1508
1926
|
}
|
|
1509
|
-
}), this.$$me =
|
|
1510
|
-
|
|
1927
|
+
}), this.$$me = zs(() => {
|
|
1928
|
+
pr(() => {
|
|
1511
1929
|
this.$$r = !0;
|
|
1512
|
-
for (const
|
|
1513
|
-
if (!this.$$p_d[
|
|
1514
|
-
this.$$d[
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1517
|
-
this.$$d[
|
|
1930
|
+
for (const i of $t(this.$$c)) {
|
|
1931
|
+
if (!this.$$p_d[i]?.reflect) continue;
|
|
1932
|
+
this.$$d[i] = this.$$c[i];
|
|
1933
|
+
const o = bt(
|
|
1934
|
+
i,
|
|
1935
|
+
this.$$d[i],
|
|
1518
1936
|
this.$$p_d,
|
|
1519
1937
|
"toAttribute"
|
|
1520
1938
|
);
|
|
1521
|
-
|
|
1939
|
+
o == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, o);
|
|
1522
1940
|
}
|
|
1523
1941
|
this.$$r = !1;
|
|
1524
1942
|
});
|
|
1525
1943
|
});
|
|
1526
|
-
for (const
|
|
1527
|
-
for (const
|
|
1528
|
-
const
|
|
1529
|
-
this.$$l_u.set(
|
|
1944
|
+
for (const i in this.$$l)
|
|
1945
|
+
for (const o of this.$$l[i]) {
|
|
1946
|
+
const l = this.$$c.$on(i, o);
|
|
1947
|
+
this.$$l_u.set(o, l);
|
|
1530
1948
|
}
|
|
1531
1949
|
this.$$l = {};
|
|
1532
1950
|
}
|
|
@@ -1539,7 +1957,7 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
1539
1957
|
* @param {string} newValue
|
|
1540
1958
|
*/
|
|
1541
1959
|
attributeChangedCallback(t, n, r) {
|
|
1542
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
1960
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = bt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
1543
1961
|
}
|
|
1544
1962
|
disconnectedCallback() {
|
|
1545
1963
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1550,17 +1968,17 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
1550
1968
|
* @param {string} attribute_name
|
|
1551
1969
|
*/
|
|
1552
1970
|
$$g_p(t) {
|
|
1553
|
-
return
|
|
1971
|
+
return $t(this.$$p_d).find(
|
|
1554
1972
|
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
1555
1973
|
) || t;
|
|
1556
1974
|
}
|
|
1557
1975
|
});
|
|
1558
|
-
function
|
|
1559
|
-
const
|
|
1560
|
-
if (t =
|
|
1976
|
+
function bt(e, t, n, r) {
|
|
1977
|
+
const s = n[e]?.type;
|
|
1978
|
+
if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
1561
1979
|
return t;
|
|
1562
1980
|
if (r === "toAttribute")
|
|
1563
|
-
switch (
|
|
1981
|
+
switch (s) {
|
|
1564
1982
|
case "Object":
|
|
1565
1983
|
case "Array":
|
|
1566
1984
|
return t == null ? null : JSON.stringify(t);
|
|
@@ -1572,7 +1990,7 @@ function He(e, t, n, r) {
|
|
|
1572
1990
|
return t;
|
|
1573
1991
|
}
|
|
1574
1992
|
else
|
|
1575
|
-
switch (
|
|
1993
|
+
switch (s) {
|
|
1576
1994
|
case "Object":
|
|
1577
1995
|
case "Array":
|
|
1578
1996
|
return t && JSON.parse(t);
|
|
@@ -1585,7 +2003,7 @@ function He(e, t, n, r) {
|
|
|
1585
2003
|
return t;
|
|
1586
2004
|
}
|
|
1587
2005
|
}
|
|
1588
|
-
function
|
|
2006
|
+
function pi(e) {
|
|
1589
2007
|
const t = {};
|
|
1590
2008
|
return e.childNodes.forEach((n) => {
|
|
1591
2009
|
t[
|
|
@@ -1594,45 +2012,64 @@ function ls(e) {
|
|
|
1594
2012
|
] = !0;
|
|
1595
2013
|
}), t;
|
|
1596
2014
|
}
|
|
1597
|
-
function
|
|
1598
|
-
let
|
|
2015
|
+
function Ar(e, t, n, r, s, i) {
|
|
2016
|
+
let o = class extends Ur {
|
|
1599
2017
|
constructor() {
|
|
1600
|
-
super(e, n,
|
|
2018
|
+
super(e, n, s), this.$$p_d = t;
|
|
1601
2019
|
}
|
|
1602
2020
|
static get observedAttributes() {
|
|
1603
|
-
return
|
|
1604
|
-
(
|
|
2021
|
+
return $t(t).map(
|
|
2022
|
+
(l) => (t[l].attribute || l).toLowerCase()
|
|
1605
2023
|
);
|
|
1606
2024
|
}
|
|
1607
2025
|
};
|
|
1608
|
-
return
|
|
1609
|
-
|
|
2026
|
+
return $t(t).forEach((l) => {
|
|
2027
|
+
ue(o.prototype, l, {
|
|
1610
2028
|
get() {
|
|
1611
|
-
return this.$$c &&
|
|
2029
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
1612
2030
|
},
|
|
1613
|
-
set(
|
|
1614
|
-
|
|
1615
|
-
var
|
|
1616
|
-
if (
|
|
1617
|
-
var
|
|
1618
|
-
|
|
2031
|
+
set(u) {
|
|
2032
|
+
u = bt(l, u, t), this.$$d[l] = u;
|
|
2033
|
+
var a = this.$$c;
|
|
2034
|
+
if (a) {
|
|
2035
|
+
var f = Fe(a, l)?.get;
|
|
2036
|
+
f ? a[l] = u : a.$set({ [l]: u });
|
|
1619
2037
|
}
|
|
1620
2038
|
}
|
|
1621
2039
|
});
|
|
1622
|
-
}), r.forEach((
|
|
1623
|
-
|
|
2040
|
+
}), r.forEach((l) => {
|
|
2041
|
+
ue(o.prototype, l, {
|
|
1624
2042
|
get() {
|
|
1625
|
-
return this.$$c?.[
|
|
2043
|
+
return this.$$c?.[l];
|
|
1626
2044
|
}
|
|
1627
2045
|
});
|
|
1628
2046
|
}), e.element = /** @type {any} */
|
|
1629
|
-
|
|
2047
|
+
o, o;
|
|
1630
2048
|
}
|
|
1631
|
-
const
|
|
2049
|
+
const jn = "-pie-editor--", Br = (...e) => e.reduce((t, n) => {
|
|
1632
2050
|
for (const r in n)
|
|
1633
2051
|
n.hasOwnProperty(r) && n[r] !== null && n[r] !== void 0 && (t[r] = n[r]);
|
|
1634
2052
|
return t;
|
|
1635
|
-
}, {}),
|
|
2053
|
+
}, {}), Dr = {}, vi = "https://builder.pie-api.com", mi = Dr.PUBLIC_BUILDER_ORIGIN_URL || vi, _i = Dr.PUBLIC_BUILDER_BUNDLE_URL || `${mi}/api/v1/bundles/`;
|
|
2054
|
+
var z = /* @__PURE__ */ ((e) => (e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js", e))(z || {}), tn = /* @__PURE__ */ ((e) => (e.loading = "loading", e.loaded = "loaded", e))(tn || {});
|
|
2055
|
+
const yi = {
|
|
2056
|
+
invokeControllerForModel: !0,
|
|
2057
|
+
env: { mode: "gather", role: "student", partialScoring: !1 },
|
|
2058
|
+
eventListeners: {}
|
|
2059
|
+
};
|
|
2060
|
+
function bi(e) {
|
|
2061
|
+
return e && typeof e.pie == "object";
|
|
2062
|
+
}
|
|
2063
|
+
function Qn(e) {
|
|
2064
|
+
return typeof e == "function" && "prototype" in e && e.prototype instanceof HTMLElement;
|
|
2065
|
+
}
|
|
2066
|
+
function wi(e) {
|
|
2067
|
+
return e && typeof e.PIE_REGISTRY == "object";
|
|
2068
|
+
}
|
|
2069
|
+
const pn = () => {
|
|
2070
|
+
let e;
|
|
2071
|
+
return wi(window) ? e = window.PIE_REGISTRY : (e = {}, window.PIE_REGISTRY = e), e;
|
|
2072
|
+
}, Nr = (e) => {
|
|
1636
2073
|
if (!e)
|
|
1637
2074
|
throw new Error("Parameter is required: input");
|
|
1638
2075
|
const t = e.charAt(0) === "@" ? e.match(/^(@[^/]+\/[^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/) : e.match(/^([^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/);
|
|
@@ -1643,452 +2080,483 @@ const Gt = "-pie-editor--", Mn = (...e) => e.reduce((t, n) => {
|
|
|
1643
2080
|
path: t[2] || "",
|
|
1644
2081
|
version: t[3] || ""
|
|
1645
2082
|
};
|
|
1646
|
-
},
|
|
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) => {
|
|
2083
|
+
}, Ei = (e) => e.split("+").map((t) => Nr(t).name).join("+"), Mr = (e, t, n) => {
|
|
1660
2084
|
if (!e)
|
|
1661
2085
|
throw new Error("session data is required");
|
|
1662
|
-
const r = e.find((
|
|
2086
|
+
const r = e.find((i) => i.id === t);
|
|
1663
2087
|
if (r)
|
|
1664
2088
|
return n && !r.element && (r.element = n), r;
|
|
1665
|
-
const
|
|
1666
|
-
return e.push(
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
2089
|
+
const s = n ? { id: t, element: n } : { id: t };
|
|
2090
|
+
return e.push(s), s;
|
|
2091
|
+
};
|
|
2092
|
+
function je(e, t = !1) {
|
|
2093
|
+
const n = `[${e}]`;
|
|
2094
|
+
return {
|
|
2095
|
+
debug: t ? (r, ...s) => console.debug(n, r, ...s) : () => {
|
|
2096
|
+
},
|
|
2097
|
+
// No-op when debug disabled (zero overhead)
|
|
2098
|
+
info: (r, ...s) => console.info(n, r, ...s),
|
|
2099
|
+
warn: (r, ...s) => console.warn(n, r, ...s),
|
|
2100
|
+
error: (r, ...s) => console.error(n, r, ...s)
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
2103
|
+
function gt() {
|
|
2104
|
+
return typeof window < "u" && window.PIE_DEBUG === !0;
|
|
2105
|
+
}
|
|
2106
|
+
const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
2107
|
+
const t = pn();
|
|
2108
|
+
ne.debug(`[findPieController] Looking for controller for: ${e}`), ne.debug("[findPieController] Registry has entries for:", Object.keys(t));
|
|
1674
2109
|
const n = t[e];
|
|
1675
2110
|
if (!n) {
|
|
1676
|
-
|
|
2111
|
+
ne.error(`[findPieController] ❌ No registry entry found for element: ${e}`), ne.error("[findPieController] Available element names:", Object.keys(t)), ne.error("[findPieController] Full registry:", t);
|
|
1677
2112
|
return;
|
|
1678
2113
|
}
|
|
1679
|
-
|
|
2114
|
+
ne.debug(`[findPieController] Found registry entry for ${e}:`, {
|
|
1680
2115
|
package: n.package,
|
|
1681
2116
|
tagName: n.tagName,
|
|
1682
2117
|
hasController: !!n.controller,
|
|
1683
|
-
controllerKeys: n.controller ? Object.keys(n.controller) : []
|
|
2118
|
+
controllerKeys: n.controller ? Object.keys(n.controller) : [],
|
|
2119
|
+
bundleType: n.bundleType
|
|
1684
2120
|
});
|
|
1685
2121
|
const r = n.controller;
|
|
1686
|
-
|
|
1687
|
-
`[findPieController]
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
2122
|
+
if (r)
|
|
2123
|
+
ne.debug(`[findPieController] ✅ Controller found for ${e} with functions:`, Object.keys(r));
|
|
2124
|
+
else {
|
|
2125
|
+
if (n.bundleType === z.clientPlayer)
|
|
2126
|
+
throw ne.error(
|
|
2127
|
+
`[findPieController] ❌ CRITICAL: Registry entry exists for ${e} but controller is missing!`
|
|
2128
|
+
), ne.error(`[findPieController] Bundle type: ${n.bundleType} (controllers required)`), ne.error("[findPieController] Entry:", n), new Error(
|
|
2129
|
+
`No controller found for ${e}. client-player.js bundles MUST include controllers. Check bundle loading and registration.`
|
|
2130
|
+
);
|
|
2131
|
+
ne.debug(
|
|
2132
|
+
`[findPieController] ℹ️ No controller for ${e} - using server-processed models (player.js bundle)`
|
|
2133
|
+
);
|
|
2134
|
+
}
|
|
2135
|
+
return r;
|
|
2136
|
+
}, Z = je("pie-updates", gt()), $i = async (e, t, n, r, s, i) => {
|
|
2137
|
+
Z.debug(`${i} Using controller, env:`, s), Z.debug(`${i} Model before filter:`, {
|
|
2138
|
+
id: t.id,
|
|
2139
|
+
element: t.element,
|
|
2140
|
+
hasCorrectResponse: "correctResponse" in t
|
|
2141
|
+
});
|
|
2142
|
+
const o = (l, u, a) => (Z.debug(`${i} updateSession called for ${l} with:`, a), Object.assign(n, a), Promise.resolve());
|
|
2143
|
+
try {
|
|
2144
|
+
const l = await r.model(t, n, s, o), u = {
|
|
2145
|
+
id: t.id,
|
|
2146
|
+
element: t.element,
|
|
2147
|
+
...l
|
|
2148
|
+
};
|
|
2149
|
+
Z.debug(`${i} ✅ Controller filtered model:`, {
|
|
2150
|
+
id: u.id,
|
|
2151
|
+
element: u.element,
|
|
2152
|
+
hasCorrectResponse: "correctResponse" in u,
|
|
2153
|
+
mode: s.mode,
|
|
2154
|
+
role: s.role
|
|
2155
|
+
}), e.model = u;
|
|
2156
|
+
} catch (l) {
|
|
2157
|
+
throw Z.error(`${i} ❌ Controller error:`, l), l;
|
|
2158
|
+
}
|
|
2159
|
+
}, nn = (e, t) => {
|
|
2160
|
+
const { config: n, session: r, env: s, eventListeners: i, invokeControllerForModel: o } = Br(
|
|
2161
|
+
yi,
|
|
1695
2162
|
t
|
|
1696
2163
|
);
|
|
1697
|
-
if (!
|
|
2164
|
+
if (!s)
|
|
1698
2165
|
throw new Error("env is required");
|
|
1699
2166
|
if (!r)
|
|
1700
2167
|
throw new Error("session is required");
|
|
1701
2168
|
if (!n)
|
|
1702
2169
|
throw new Error("config is required");
|
|
1703
|
-
const
|
|
1704
|
-
if (!
|
|
1705
|
-
|
|
2170
|
+
const l = document.querySelectorAll(e);
|
|
2171
|
+
if (!l || l.length === 0) {
|
|
2172
|
+
Z.debug(`no elements found for ${e}`);
|
|
1706
2173
|
return;
|
|
1707
2174
|
}
|
|
1708
|
-
|
|
1709
|
-
const
|
|
1710
|
-
let
|
|
1711
|
-
if (!
|
|
1712
|
-
throw
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1715
|
-
if (
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
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
|
-
});
|
|
2175
|
+
l.forEach((u) => {
|
|
2176
|
+
const a = u;
|
|
2177
|
+
let f = t?.config?.models?.find((c) => c.id === u.id);
|
|
2178
|
+
if (!f)
|
|
2179
|
+
throw Z.error("[updatePieElement] Model not found for", e, t), new Error(`model not found for ${e}`);
|
|
2180
|
+
Z.debug(`[updatePieElement] Updating ${e}#${u.id}, env:`, s);
|
|
2181
|
+
const d = Mr(r, f.id, f.element);
|
|
2182
|
+
if (a.session = d, i && Object.entries(i).forEach(([c, h]) => {
|
|
2183
|
+
a.addEventListener(c, h);
|
|
2184
|
+
}), s && o) {
|
|
2185
|
+
const c = vn(e);
|
|
2186
|
+
c ? (Z.debug(`[updatePieElement] Invoking controller for ${e}#${u.id}`, {
|
|
2187
|
+
mode: s.mode,
|
|
2188
|
+
role: s.role,
|
|
2189
|
+
hasCorrectResponse: "correctResponse" in f
|
|
2190
|
+
}), $i(
|
|
2191
|
+
a,
|
|
2192
|
+
f,
|
|
2193
|
+
d,
|
|
2194
|
+
c,
|
|
2195
|
+
s,
|
|
2196
|
+
`[updatePieElement(${e}#${u.id})]`
|
|
2197
|
+
).catch((h) => {
|
|
2198
|
+
Z.error(`[updatePieElement] Controller failed for ${e}#${u.id}:`, h), a.model = f;
|
|
2199
|
+
})) : (Z.debug(`[updatePieElement] ℹ️ No controller for ${e}, using server-processed model`), a.model = f);
|
|
1745
2200
|
} else
|
|
1746
|
-
|
|
1747
|
-
`[updatePieElement] Direct model assignment for ${e}#${
|
|
1748
|
-
),
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
2201
|
+
Z.debug(
|
|
2202
|
+
`[updatePieElement] Direct model assignment for ${e}#${u.id} (no controller invocation requested)`
|
|
2203
|
+
), a.model = f;
|
|
2204
|
+
});
|
|
2205
|
+
}, _t = (e, t, n) => {
|
|
2206
|
+
Z.debug("[updatePieElements] Updating all elements with env:", n), Object.entries(e.elements).forEach(([r, s]) => {
|
|
2207
|
+
nn(r, { config: e, session: t, env: n });
|
|
1752
2208
|
});
|
|
1753
|
-
},
|
|
1754
|
-
buildServiceBase:
|
|
1755
|
-
bundleType:
|
|
2209
|
+
}, $ = je("pie-initialization", gt()), Ri = {
|
|
2210
|
+
buildServiceBase: _i,
|
|
2211
|
+
bundleType: z.player,
|
|
2212
|
+
// Default to player.js (no controllers, server-processed models)
|
|
1756
2213
|
env: { mode: "gather", role: "student" }
|
|
1757
|
-
},
|
|
1758
|
-
const { config: n, session: r, env:
|
|
1759
|
-
|
|
1760
|
-
let
|
|
1761
|
-
if (!
|
|
1762
|
-
|
|
2214
|
+
}, Yt = (e, t) => {
|
|
2215
|
+
const { config: n, session: r, env: s, eventListeners: i } = t, o = e.tagName.toLowerCase();
|
|
2216
|
+
$.debug(`[initializePieElement] Initializing ${o}#${e.id}`);
|
|
2217
|
+
let l = n?.models?.find((f) => f.id === e.id);
|
|
2218
|
+
if (!l) {
|
|
2219
|
+
const d = pn()[o];
|
|
2220
|
+
d && d.bundleType === z.clientPlayer && $.warn(
|
|
2221
|
+
`[initializePieElement] Model not found for PIE element ${o}#${e.id} (client-player.js bundle)`
|
|
2222
|
+
);
|
|
1763
2223
|
return;
|
|
1764
2224
|
}
|
|
1765
|
-
const
|
|
1766
|
-
e.session =
|
|
1767
|
-
const
|
|
1768
|
-
if (!
|
|
1769
|
-
throw
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
2225
|
+
const u = Mr(r, l.id, l.element);
|
|
2226
|
+
e.session = u, $.debug(`[initializePieElement] Session set for ${o}#${e.id}:`, u);
|
|
2227
|
+
const a = vn(o);
|
|
2228
|
+
if (!s)
|
|
2229
|
+
throw $.error(`[initializePieElement] ❌ FATAL: No env provided for ${o}`), new Error(`No env provided for ${o}. PIE elements require an env object with mode and role.`);
|
|
2230
|
+
a ? $.debug(`[initializePieElement] Controller found for ${o}, will invoke model() function`) : ($.debug(`[initializePieElement] ℹ️ No controller for ${o}, using server-processed model`), $.debug("[initializePieElement] Model already processed by server:", {
|
|
2231
|
+
id: l.id,
|
|
2232
|
+
element: l.element,
|
|
2233
|
+
hasCorrectResponse: "correctResponse" in l,
|
|
2234
|
+
mode: s.mode,
|
|
2235
|
+
role: s.role
|
|
2236
|
+
}), e.model = l), i && Object.entries(i).forEach(([f, d]) => {
|
|
2237
|
+
e.addEventListener(f, d);
|
|
1778
2238
|
});
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
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
|
|
2239
|
+
}, Ci = (e, t, n, r, s) => {
|
|
2240
|
+
const i = [];
|
|
2241
|
+
return $.debug("[registerPieElementsFromBundle] Available packages in bundle:", Object.keys(e)), $.debug("[registerPieElementsFromBundle] config.elements:", t.elements), typeof window < "u" && (window._pieCurrentContext = { config: t, session: n, env: s.env }), Object.entries(t.elements).forEach(([o, l]) => {
|
|
2242
|
+
$.debug(`[registerPieElementsFromBundle] Processing element: ${o} -> ${l}`);
|
|
2243
|
+
const u = Ei(l);
|
|
2244
|
+
$.debug(`[registerPieElementsFromBundle] Package without version: "${u}"`);
|
|
2245
|
+
const a = e[u];
|
|
2246
|
+
if ($.debug("[registerPieElementsFromBundle] elementData result:", a ? "FOUND" : "UNDEFINED"), !a)
|
|
2247
|
+
throw $.error(`[registerPieElementsFromBundle] ❌ Package "${u}" not found in bundle!`), $.error(`[registerPieElementsFromBundle] Lookup key: "${u}"`), $.error("[registerPieElementsFromBundle] Available packages:", Object.keys(e)), new Error(`pie ${u} not found in ${Object.keys(e)}`);
|
|
2248
|
+
if ($.debug(`[registerPieElementsFromBundle] elementData for ${u}:`, {
|
|
2249
|
+
hasController: !!a.controller,
|
|
2250
|
+
hasElement: !!a.Element,
|
|
2251
|
+
hasConfig: !!a.config,
|
|
2252
|
+
controllerKeys: a.controller ? Object.keys(a.controller) : [],
|
|
2253
|
+
bundleType: s.bundleType
|
|
2254
|
+
}), !a.controller) {
|
|
2255
|
+
if (s.bundleType === z.clientPlayer)
|
|
2256
|
+
throw $.error(`[registerPieElementsFromBundle] ❌ CRITICAL: No controller found for ${u}!`), $.error(`[registerPieElementsFromBundle] Bundle type: ${s.bundleType} (controllers required)`), new Error(`No controller found for ${u}. client-player.js bundles MUST include controllers!`);
|
|
2257
|
+
$.debug(
|
|
2258
|
+
`[registerPieElementsFromBundle] ℹ️ No controller found for ${u} - using server-processed models (player.js bundle)`
|
|
1809
2259
|
);
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
2260
|
+
}
|
|
2261
|
+
if (customElements.get(o)) {
|
|
2262
|
+
if (nn(o, {
|
|
2263
|
+
config: t,
|
|
2264
|
+
session: n,
|
|
2265
|
+
env: s.env,
|
|
2266
|
+
...s.eventListeners?.[o] && { eventListeners: s.eventListeners[o] }
|
|
2267
|
+
}), s.bundleType === z.editor) {
|
|
2268
|
+
const f = o + jn;
|
|
2269
|
+
nn(f, {
|
|
2270
|
+
config: t,
|
|
2271
|
+
session: n,
|
|
2272
|
+
...s.eventListeners?.[f] && {
|
|
2273
|
+
eventListeners: s.eventListeners[f]
|
|
2274
|
+
}
|
|
2275
|
+
});
|
|
2276
|
+
}
|
|
2277
|
+
} else if ($.debug(
|
|
2278
|
+
`[registerPieElementsFromBundle] Registering ${o} in registry${a.controller ? " with controller" : " (no controller - server-processed models)"}`
|
|
2279
|
+
), r[o] = {
|
|
2280
|
+
package: l,
|
|
2281
|
+
status: tn.loading,
|
|
2282
|
+
tagName: o,
|
|
2283
|
+
controller: a.controller || null,
|
|
2284
|
+
config: a.config,
|
|
2285
|
+
bundleType: s.bundleType
|
|
2286
|
+
}, Qn(a.Element)) {
|
|
2287
|
+
customElements.define(o, a.Element);
|
|
2288
|
+
const f = document.querySelectorAll(o);
|
|
2289
|
+
if ($.debug(`[registerPieElementsFromBundle] Found ${f.length} elements for tag '${o}'`), f.forEach((d) => {
|
|
2290
|
+
Yt(d, {
|
|
2291
|
+
config: t,
|
|
2292
|
+
session: n,
|
|
2293
|
+
env: s.env,
|
|
2294
|
+
eventListeners: s.eventListeners?.[o]
|
|
2295
|
+
});
|
|
2296
|
+
}), r[o] = {
|
|
2297
|
+
...r[o],
|
|
2298
|
+
status: tn.loaded
|
|
2299
|
+
}, i.push(
|
|
2300
|
+
customElements.whenDefined(o).then(() => {
|
|
2301
|
+
$.debug("[registerPieElementsFromBundle] defined custom PIE element: %s", o);
|
|
2302
|
+
})
|
|
2303
|
+
), window._pieElementObserver || (window._pieElementObserver = new MutationObserver((d) => {
|
|
2304
|
+
const c = window._pieCurrentContext;
|
|
2305
|
+
if (!c) {
|
|
2306
|
+
$.warn("[MutationObserver] No current context available");
|
|
2307
|
+
return;
|
|
1846
2308
|
}
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
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
|
-
});
|
|
2309
|
+
d.forEach((h) => {
|
|
2310
|
+
h.type === "childList" && h.addedNodes.forEach((m) => {
|
|
2311
|
+
if (m.nodeType === Node.ELEMENT_NODE) {
|
|
2312
|
+
const y = m.tagName.toLowerCase();
|
|
2313
|
+
r[y] && Yt(m, {
|
|
2314
|
+
config: c.config,
|
|
2315
|
+
session: c.session,
|
|
2316
|
+
env: c.env,
|
|
2317
|
+
eventListeners: s.eventListeners?.[y]
|
|
2318
|
+
}), m.querySelectorAll("*").forEach((C) => {
|
|
2319
|
+
const j = C.tagName.toLowerCase();
|
|
2320
|
+
r[j] && Yt(C, {
|
|
2321
|
+
config: c.config,
|
|
2322
|
+
session: c.session,
|
|
2323
|
+
env: c.env,
|
|
2324
|
+
eventListeners: s.eventListeners?.[j]
|
|
1890
2325
|
});
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
1893
2328
|
});
|
|
1894
|
-
})
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2329
|
+
});
|
|
2330
|
+
}), window._pieElementObserver.observe(document.body, {
|
|
2331
|
+
childList: !0,
|
|
2332
|
+
subtree: !0
|
|
2333
|
+
})), s.bundleType === z.editor)
|
|
2334
|
+
if (Qn(a.Configure)) {
|
|
2335
|
+
const d = o + jn;
|
|
2336
|
+
customElements.define(d, a.Configure), i.push(
|
|
2337
|
+
customElements.whenDefined(d).then(() => {
|
|
2338
|
+
$.debug(`[registerPieElementsFromBundle] defined custom PIE editor element: ${d}`);
|
|
2339
|
+
})
|
|
2340
|
+
);
|
|
2341
|
+
} else
|
|
2342
|
+
$.error(
|
|
2343
|
+
`[registerPieElementsFromBundle] pie.Configure for ${u} is not a valid custom element constructor.`,
|
|
2344
|
+
a.configure
|
|
2345
|
+
);
|
|
2346
|
+
} else
|
|
2347
|
+
$.error(
|
|
2348
|
+
`[registerPieElementsFromBundle] pie.Element for ${u} is not a valid custom element constructor.`
|
|
2349
|
+
);
|
|
2350
|
+
}), i;
|
|
2351
|
+
}, zn = (e, t, n = {}) => {
|
|
2352
|
+
const r = pn(), s = Br(Ri, n);
|
|
2353
|
+
if (bi(window)) {
|
|
2354
|
+
$.debug("[initializePiesFromLoadedBundle] window.pie available");
|
|
2355
|
+
const i = window.pie.default;
|
|
2356
|
+
Ci(i, e, t, r, s);
|
|
1911
2357
|
} else
|
|
1912
|
-
|
|
2358
|
+
$.error("[initializePiesFromLoadedBundle] window.pie not found; was the bundle inlined correctly?");
|
|
1913
2359
|
};
|
|
1914
|
-
|
|
1915
|
-
|
|
2360
|
+
Er();
|
|
2361
|
+
ce[k] = "src/lib/components/PieItemPlayer.svelte";
|
|
2362
|
+
var Pi = Se(/* @__PURE__ */ xe("<div><!></div>"), ce[k], [[236, 2]]), Si = Se(/* @__PURE__ */ xe("<div><!></div>"), ce[k], [[242, 2]]), xi = Se(/* @__PURE__ */ xe('<div class="pie-item-player svelte-d1rctr"><!> <!></div>'), ce[k], [[234, 0]]);
|
|
2363
|
+
const Ti = {
|
|
1916
2364
|
hash: "svelte-d1rctr",
|
|
1917
|
-
code:
|
|
1918
|
-
.pie-item-
|
|
2365
|
+
code: `
|
|
2366
|
+
.pie-item-player.svelte-d1rctr {
|
|
2367
|
+
display: block;
|
|
2368
|
+
width: 100%;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
.pie-passage-container.svelte-d1rctr,
|
|
2372
|
+
.pie-item-container.svelte-d1rctr {
|
|
2373
|
+
display: block;
|
|
2374
|
+
width: 100%;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGllSXRlbVBsYXllci5zdmVsdGUiLCJtYXBwaW5ncyI6IjtBQXdQQSxDQUFDLDhCQUFnQixDQUFDO0FBQ2xCLEVBQUUsY0FBYztBQUNoQixFQUFFLFdBQVc7QUFDYjs7QUFFQSxDQUFDLG9DQUFzQjtBQUN2QixDQUFDLGlDQUFtQixDQUFDO0FBQ3JCLEVBQUUsY0FBYztBQUNoQixFQUFFLFdBQVc7QUFDYiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiUGllSXRlbVBsYXllci5zdmVsdGUiXX0= */`
|
|
1919
2378
|
};
|
|
1920
|
-
function
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
2379
|
+
function ce(e, t) {
|
|
2380
|
+
Ir(new.target), hn(t, !0, ce), Or(e, Ti);
|
|
2381
|
+
const n = je("pie-item-player", gt());
|
|
2382
|
+
let r = P(t, "itemConfig", 7), s = P(t, "passageConfig", 7, null), i = P(t, "env", 23, () => ({ mode: "gather", role: "student" })), o = P(t, "session", 23, () => []), l = P(t, "addCorrectResponse", 7, !1), u = P(t, "customClassname", 7, ""), a = P(t, "passageContainerClass", 7, ""), f = P(t, "containerClass", 7, ""), d = P(t, "bundleType", 23, () => z.player), c = P(t, "onLoadComplete", 7), h = P(t, "onPlayerError", 7), m = P(t, "onSessionChanged", 7), y = U(!1);
|
|
2383
|
+
const C = (v, w) => {
|
|
2384
|
+
S(v, "load-complete") && c() ? c()(w) : S(v, "player-error") && h() ? h()(w) : S(v, "session-changed") && m() && m()(w);
|
|
2385
|
+
const G = new CustomEvent(v, {
|
|
2386
|
+
detail: w,
|
|
1927
2387
|
bubbles: !0,
|
|
1928
2388
|
composed: !0
|
|
1929
2389
|
// Allow events to cross shadow DOM boundaries
|
|
1930
2390
|
});
|
|
1931
|
-
dispatchEvent(
|
|
2391
|
+
dispatchEvent(G);
|
|
1932
2392
|
};
|
|
1933
|
-
async function
|
|
1934
|
-
if (!
|
|
1935
|
-
|
|
1936
|
-
const
|
|
1937
|
-
for (const
|
|
1938
|
-
const
|
|
1939
|
-
if (
|
|
2393
|
+
async function j() {
|
|
2394
|
+
if (!l() || !r() || p(y)) return;
|
|
2395
|
+
n.debug("[PieItemPlayer] Populating session with correct responses");
|
|
2396
|
+
const v = [];
|
|
2397
|
+
for (const w of r().models) {
|
|
2398
|
+
const G = vn(w.element);
|
|
2399
|
+
if (G && G.createCorrectResponseSession)
|
|
1940
2400
|
try {
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1943
|
-
id:
|
|
1944
|
-
element:
|
|
1945
|
-
...
|
|
2401
|
+
const Le = await G.createCorrectResponseSession(w, i()), { id: mn, ...g } = Le;
|
|
2402
|
+
v.push({
|
|
2403
|
+
id: w.id,
|
|
2404
|
+
element: w.element,
|
|
2405
|
+
...g
|
|
1946
2406
|
});
|
|
1947
|
-
} catch (
|
|
1948
|
-
|
|
2407
|
+
} catch (Le) {
|
|
2408
|
+
n.warn(`[PieItemPlayer] Failed to create correct response for ${w.element}:`, Le);
|
|
1949
2409
|
}
|
|
1950
2410
|
}
|
|
1951
|
-
|
|
2411
|
+
o().length = 0, o().push(...v), _(y, !0), n.debug("[PieItemPlayer] Correct responses added to session:", o());
|
|
1952
2412
|
}
|
|
1953
|
-
const
|
|
2413
|
+
const N = Y(() => [
|
|
1954
2414
|
"pie-passage-container",
|
|
1955
2415
|
u(),
|
|
1956
2416
|
a()
|
|
1957
|
-
].filter(Boolean).join(" ")),
|
|
2417
|
+
].filter(Boolean).join(" ")), M = Y(() => [
|
|
1958
2418
|
"pie-item-container",
|
|
1959
2419
|
u(),
|
|
1960
|
-
|
|
2420
|
+
f()
|
|
1961
2421
|
].filter(Boolean).join(" "));
|
|
1962
|
-
let
|
|
1963
|
-
|
|
1964
|
-
!
|
|
2422
|
+
let T = U(!1), L = U(!1), F = U(!1);
|
|
2423
|
+
Ce(() => {
|
|
2424
|
+
!r() || p(T) || (n.debug("[PieItemPlayer] Item config received, initializing after DOM renders..."), gr().then(async () => {
|
|
1965
2425
|
try {
|
|
1966
|
-
if (
|
|
1967
|
-
itemElements: Object.keys(
|
|
1968
|
-
itemModels: (
|
|
1969
|
-
passageElements:
|
|
1970
|
-
passageModels:
|
|
1971
|
-
sessionLength:
|
|
1972
|
-
addCorrectResponse:
|
|
1973
|
-
env:
|
|
1974
|
-
}),
|
|
1975
|
-
const
|
|
1976
|
-
if (
|
|
2426
|
+
if (n.debug("[PieItemPlayer] DOM ready, initializing PIE elements"), n.debug("[PieItemPlayer] Config:", {
|
|
2427
|
+
itemElements: Object.keys(r().elements || {}),
|
|
2428
|
+
itemModels: (r().models || []).length,
|
|
2429
|
+
passageElements: s() ? Object.keys(s().elements || {}) : [],
|
|
2430
|
+
passageModels: s() ? (s().models || []).length : 0,
|
|
2431
|
+
sessionLength: o().length,
|
|
2432
|
+
addCorrectResponse: l(),
|
|
2433
|
+
env: i()
|
|
2434
|
+
}), zn(r(), [], { env: i(), bundleType: d() }), n.debug("[PieItemPlayer] Item bundle initialized (bundle type: %s)", d()), s() && (zn(s(), [], { env: i(), bundleType: d() }), n.debug("[PieItemPlayer] Passage bundle initialized (bundle type: %s)", d())), await j(), n.debug("[PieItemPlayer] Updating elements with session (length=" + o().length + ")"), _t(r(), o(), i()), s() && _t(s(), o(), i()), _(T, !0), !p(L)) {
|
|
2435
|
+
const v = document.querySelector(".pie-item-player"), w = (G) => {
|
|
2436
|
+
if (p(F))
|
|
1977
2437
|
return;
|
|
1978
|
-
const
|
|
1979
|
-
|
|
2438
|
+
const Le = G;
|
|
2439
|
+
n.debug("[PieItemPlayer] session-changed event received from PIE element"), _(F, !0);
|
|
1980
2440
|
try {
|
|
1981
|
-
|
|
2441
|
+
C("session-changed", Le.detail);
|
|
1982
2442
|
} finally {
|
|
1983
2443
|
setTimeout(
|
|
1984
2444
|
() => {
|
|
1985
|
-
|
|
2445
|
+
_(F, !1);
|
|
1986
2446
|
},
|
|
1987
2447
|
0
|
|
1988
2448
|
);
|
|
1989
2449
|
}
|
|
1990
2450
|
};
|
|
1991
|
-
|
|
2451
|
+
v && (v.addEventListener("session-changed", w), _(L, !0), n.debug("[PieItemPlayer] session-changed listener attached to root element"));
|
|
1992
2452
|
}
|
|
1993
|
-
|
|
1994
|
-
} catch (
|
|
1995
|
-
|
|
2453
|
+
n.debug("[PieItemPlayer] ✅ Initialization complete, dispatching load-complete event"), C("load-complete");
|
|
2454
|
+
} catch (v) {
|
|
2455
|
+
n.error("[PieItemPlayer] Error initializing:", v), C("player-error", v.message);
|
|
1996
2456
|
}
|
|
1997
2457
|
}));
|
|
1998
|
-
}),
|
|
1999
|
-
!
|
|
2458
|
+
}), Ce(() => {
|
|
2459
|
+
!p(T) || !i() || !r() || !o() || (n.debug("[PieItemPlayer] Dependencies changed, updating elements"), n.debug("[PieItemPlayer] Env:", i()), n.debug("[PieItemPlayer] Session (length=" + o().length + "):", o()), _t(r(), o(), i()), s() && _t(s(), o(), i()));
|
|
2000
2460
|
});
|
|
2001
|
-
var
|
|
2461
|
+
var q = xi(), de = le(q);
|
|
2002
2462
|
{
|
|
2003
|
-
var
|
|
2004
|
-
var
|
|
2005
|
-
|
|
2463
|
+
var Te = (v) => {
|
|
2464
|
+
var w = Pi(), G = le(w);
|
|
2465
|
+
Dn(G, () => s().markup), oe(w), nt(() => He(w, 1, p(N), "svelte-d1rctr")), pe(v, w);
|
|
2006
2466
|
};
|
|
2007
|
-
|
|
2008
|
-
|
|
2467
|
+
st(de, (v) => {
|
|
2468
|
+
s()?.markup && v(Te);
|
|
2009
2469
|
});
|
|
2010
2470
|
}
|
|
2011
|
-
var
|
|
2471
|
+
var pt = Zt(de, 2);
|
|
2012
2472
|
{
|
|
2013
|
-
var
|
|
2014
|
-
var
|
|
2015
|
-
|
|
2473
|
+
var he = (v) => {
|
|
2474
|
+
var w = Si(), G = le(w);
|
|
2475
|
+
Dn(G, () => r().markup), oe(w), nt(() => He(w, 1, p(M), "svelte-d1rctr")), pe(v, w);
|
|
2016
2476
|
};
|
|
2017
|
-
|
|
2018
|
-
|
|
2477
|
+
st(pt, (v) => {
|
|
2478
|
+
r()?.markup && v(he);
|
|
2019
2479
|
});
|
|
2020
2480
|
}
|
|
2021
|
-
return
|
|
2481
|
+
return oe(q), pe(e, q), gn({
|
|
2022
2482
|
get itemConfig() {
|
|
2023
|
-
return
|
|
2483
|
+
return r();
|
|
2024
2484
|
},
|
|
2025
|
-
set itemConfig(
|
|
2026
|
-
|
|
2485
|
+
set itemConfig(v) {
|
|
2486
|
+
r(v), R();
|
|
2027
2487
|
},
|
|
2028
2488
|
get passageConfig() {
|
|
2029
|
-
return
|
|
2489
|
+
return s();
|
|
2030
2490
|
},
|
|
2031
|
-
set passageConfig(
|
|
2032
|
-
|
|
2491
|
+
set passageConfig(v = null) {
|
|
2492
|
+
s(v), R();
|
|
2033
2493
|
},
|
|
2034
2494
|
get env() {
|
|
2035
|
-
return
|
|
2495
|
+
return i();
|
|
2036
2496
|
},
|
|
2037
|
-
set env(
|
|
2038
|
-
|
|
2497
|
+
set env(v = { mode: "gather", role: "student" }) {
|
|
2498
|
+
i(v), R();
|
|
2039
2499
|
},
|
|
2040
2500
|
get session() {
|
|
2041
|
-
return
|
|
2501
|
+
return o();
|
|
2042
2502
|
},
|
|
2043
|
-
set session(
|
|
2044
|
-
|
|
2503
|
+
set session(v = []) {
|
|
2504
|
+
o(v), R();
|
|
2045
2505
|
},
|
|
2046
2506
|
get addCorrectResponse() {
|
|
2047
|
-
return
|
|
2507
|
+
return l();
|
|
2048
2508
|
},
|
|
2049
|
-
set addCorrectResponse(
|
|
2050
|
-
|
|
2509
|
+
set addCorrectResponse(v = !1) {
|
|
2510
|
+
l(v), R();
|
|
2051
2511
|
},
|
|
2052
2512
|
get customClassname() {
|
|
2053
2513
|
return u();
|
|
2054
2514
|
},
|
|
2055
|
-
set customClassname(
|
|
2056
|
-
u(
|
|
2515
|
+
set customClassname(v = "") {
|
|
2516
|
+
u(v), R();
|
|
2057
2517
|
},
|
|
2058
2518
|
get passageContainerClass() {
|
|
2059
2519
|
return a();
|
|
2060
2520
|
},
|
|
2061
|
-
set passageContainerClass(
|
|
2062
|
-
a(
|
|
2521
|
+
set passageContainerClass(v = "") {
|
|
2522
|
+
a(v), R();
|
|
2063
2523
|
},
|
|
2064
2524
|
get containerClass() {
|
|
2065
|
-
return
|
|
2525
|
+
return f();
|
|
2066
2526
|
},
|
|
2067
|
-
set containerClass(
|
|
2068
|
-
|
|
2527
|
+
set containerClass(v = "") {
|
|
2528
|
+
f(v), R();
|
|
2529
|
+
},
|
|
2530
|
+
get bundleType() {
|
|
2531
|
+
return d();
|
|
2532
|
+
},
|
|
2533
|
+
set bundleType(v = z.player) {
|
|
2534
|
+
d(v), R();
|
|
2069
2535
|
},
|
|
2070
2536
|
get onLoadComplete() {
|
|
2071
|
-
return
|
|
2537
|
+
return c();
|
|
2072
2538
|
},
|
|
2073
|
-
set onLoadComplete(
|
|
2074
|
-
v
|
|
2539
|
+
set onLoadComplete(v) {
|
|
2540
|
+
c(v), R();
|
|
2075
2541
|
},
|
|
2076
2542
|
get onPlayerError() {
|
|
2077
|
-
return
|
|
2543
|
+
return h();
|
|
2078
2544
|
},
|
|
2079
|
-
set onPlayerError(
|
|
2080
|
-
|
|
2545
|
+
set onPlayerError(v) {
|
|
2546
|
+
h(v), R();
|
|
2081
2547
|
},
|
|
2082
2548
|
get onSessionChanged() {
|
|
2083
|
-
return
|
|
2549
|
+
return m();
|
|
2084
2550
|
},
|
|
2085
|
-
set onSessionChanged(
|
|
2086
|
-
|
|
2087
|
-
}
|
|
2551
|
+
set onSessionChanged(v) {
|
|
2552
|
+
m(v), R();
|
|
2553
|
+
},
|
|
2554
|
+
...Fr()
|
|
2088
2555
|
});
|
|
2089
2556
|
}
|
|
2090
|
-
|
|
2091
|
-
|
|
2557
|
+
$r(ce);
|
|
2558
|
+
Ar(
|
|
2559
|
+
ce,
|
|
2092
2560
|
{
|
|
2093
2561
|
itemConfig: {},
|
|
2094
2562
|
passageConfig: {},
|
|
@@ -2098,6 +2566,7 @@ Nn(
|
|
|
2098
2566
|
customClassname: {},
|
|
2099
2567
|
passageContainerClass: {},
|
|
2100
2568
|
containerClass: {},
|
|
2569
|
+
bundleType: {},
|
|
2101
2570
|
onLoadComplete: {},
|
|
2102
2571
|
onPlayerError: {},
|
|
2103
2572
|
onSessionChanged: {}
|
|
@@ -2106,10 +2575,534 @@ Nn(
|
|
|
2106
2575
|
[],
|
|
2107
2576
|
!0
|
|
2108
2577
|
);
|
|
2109
|
-
const
|
|
2110
|
-
trackPageActions: !1
|
|
2111
|
-
|
|
2112
|
-
|
|
2578
|
+
const kt = {
|
|
2579
|
+
trackPageActions: !1,
|
|
2580
|
+
maxResourceRetries: 3,
|
|
2581
|
+
resourceRetryDelay: 500
|
|
2582
|
+
}, Wt = (e) => {
|
|
2583
|
+
const t = "--version-", n = (u) => {
|
|
2584
|
+
const a = u.match(`${t}(\\d+-\\d+-\\d+)$`);
|
|
2585
|
+
return a ? {
|
|
2586
|
+
baseName: u.replace(`${t}${a[1]}`, ""),
|
|
2587
|
+
existingVersion: a[1].replace(/-/g, ".")
|
|
2588
|
+
} : { baseName: u };
|
|
2589
|
+
}, r = (u, a) => {
|
|
2590
|
+
const { baseName: f, existingVersion: d } = n(u), { version: c } = Nr(a);
|
|
2591
|
+
return d !== c ? `${f}${t}${c.replace(/\./g, "-")}` : u;
|
|
2592
|
+
}, s = Object.entries(e.config.elements).reduce(
|
|
2593
|
+
(u, [a, f]) => {
|
|
2594
|
+
const d = r(a, f);
|
|
2595
|
+
return {
|
|
2596
|
+
...u,
|
|
2597
|
+
[a]: {
|
|
2598
|
+
versionedName: d,
|
|
2599
|
+
package: f
|
|
2600
|
+
}
|
|
2601
|
+
};
|
|
2602
|
+
},
|
|
2603
|
+
{}
|
|
2604
|
+
), i = Object.entries(s).reduce(
|
|
2605
|
+
(u, [a, { versionedName: f }]) => a !== f ? u.replace(new RegExp(`<${a}`, "g"), `<${f}`).replace(new RegExp(`</${a}`, "g"), `</${f}`) : u,
|
|
2606
|
+
e.config.markup
|
|
2607
|
+
), o = Object.values(s).reduce(
|
|
2608
|
+
(u, { versionedName: a, package: f }) => ({
|
|
2609
|
+
...u,
|
|
2610
|
+
[a]: f
|
|
2611
|
+
}),
|
|
2612
|
+
{}
|
|
2613
|
+
), l = e.config.models.map((u) => {
|
|
2614
|
+
const a = u.element, f = s[a];
|
|
2615
|
+
if (f && f.versionedName !== a)
|
|
2616
|
+
return {
|
|
2617
|
+
...u,
|
|
2618
|
+
element: f.versionedName
|
|
2619
|
+
};
|
|
2620
|
+
if (o[a])
|
|
2621
|
+
return u;
|
|
2622
|
+
const d = Object.entries(s).filter(([c, { versionedName: h }]) => {
|
|
2623
|
+
const { baseName: m } = n(c);
|
|
2624
|
+
return m === a;
|
|
2625
|
+
});
|
|
2626
|
+
if (d.length > 0) {
|
|
2627
|
+
const [, { versionedName: c }] = d[0];
|
|
2628
|
+
return {
|
|
2629
|
+
...u,
|
|
2630
|
+
element: c
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2633
|
+
return u;
|
|
2634
|
+
});
|
|
2635
|
+
return {
|
|
2636
|
+
...e,
|
|
2637
|
+
config: {
|
|
2638
|
+
...e.config,
|
|
2639
|
+
elements: o,
|
|
2640
|
+
markup: i,
|
|
2641
|
+
models: l
|
|
2642
|
+
}
|
|
2643
|
+
};
|
|
2644
|
+
}, Li = {
|
|
2645
|
+
trackPageActions: !1,
|
|
2646
|
+
maxRetries: 3,
|
|
2647
|
+
initialRetryDelay: 500,
|
|
2648
|
+
maxRetryDelay: 5e3,
|
|
2649
|
+
debug: !1
|
|
2650
|
+
}, ki = 80;
|
|
2651
|
+
class Ii {
|
|
2652
|
+
// Track resources within our container
|
|
2653
|
+
constructor(t = {}) {
|
|
2654
|
+
O(this, "config");
|
|
2655
|
+
O(this, "logger");
|
|
2656
|
+
O(this, "observer", null);
|
|
2657
|
+
O(this, "mutationObserver", null);
|
|
2658
|
+
O(this, "errorHandler", null);
|
|
2659
|
+
O(this, "retryAttempts", /* @__PURE__ */ new Map());
|
|
2660
|
+
O(this, "container", null);
|
|
2661
|
+
O(this, "isBrowser");
|
|
2662
|
+
O(this, "containerResources", /* @__PURE__ */ new Set());
|
|
2663
|
+
this.config = { ...Li, ...t }, this.logger = je("resource-monitor", this.config.debug), this.isBrowser = typeof window < "u" && typeof document < "u";
|
|
2664
|
+
}
|
|
2665
|
+
/**
|
|
2666
|
+
* Truncate URL for display in logs
|
|
2667
|
+
*/
|
|
2668
|
+
truncateUrl(t) {
|
|
2669
|
+
return t.length > ki ? "..." + t.slice(-77) : t;
|
|
2670
|
+
}
|
|
2671
|
+
/**
|
|
2672
|
+
* Track action with New Relic if enabled
|
|
2673
|
+
*/
|
|
2674
|
+
trackNewRelicAction(t, n) {
|
|
2675
|
+
!this.config.trackPageActions || !window.newrelic || window.newrelic.addPageAction(t, {
|
|
2676
|
+
...n,
|
|
2677
|
+
component: "pie-fixed-player",
|
|
2678
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2679
|
+
});
|
|
2680
|
+
}
|
|
2681
|
+
/**
|
|
2682
|
+
* Track error with New Relic if enabled
|
|
2683
|
+
*/
|
|
2684
|
+
trackNewRelicError(t, n) {
|
|
2685
|
+
!this.config.trackPageActions || !window.newrelic || window.newrelic.noticeError(t, {
|
|
2686
|
+
...n,
|
|
2687
|
+
component: "pie-fixed-player"
|
|
2688
|
+
});
|
|
2689
|
+
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Start monitoring resources in the given container
|
|
2692
|
+
*/
|
|
2693
|
+
start(t) {
|
|
2694
|
+
if (!this.isBrowser) {
|
|
2695
|
+
this.logger.debug("Not in browser environment, skipping resource monitoring");
|
|
2696
|
+
return;
|
|
2697
|
+
}
|
|
2698
|
+
this.container = t, this.setupMutationObserver(), this.scanContainerResources(), this.setupPerformanceObserver(), this.setupErrorHandler(), this.logger.info("✅ Resource monitoring started");
|
|
2699
|
+
}
|
|
2700
|
+
/**
|
|
2701
|
+
* Stop monitoring and clean up
|
|
2702
|
+
*/
|
|
2703
|
+
stop() {
|
|
2704
|
+
this.observer && (this.observer.disconnect(), this.observer = null), this.mutationObserver && (this.mutationObserver.disconnect(), this.mutationObserver = null), this.errorHandler && this.container && (this.container.removeEventListener("error", this.errorHandler, !0), this.errorHandler = null), this.retryAttempts.clear(), this.containerResources.clear(), this.container = null, this.logger.info("Resource monitoring stopped");
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* Set up MutationObserver to track DOM changes within container
|
|
2708
|
+
* This allows us to know which resources belong to our container
|
|
2709
|
+
*/
|
|
2710
|
+
setupMutationObserver() {
|
|
2711
|
+
if (!this.isBrowser || typeof MutationObserver > "u" || !this.container) {
|
|
2712
|
+
this.logger.debug("MutationObserver not available or no container");
|
|
2713
|
+
return;
|
|
2714
|
+
}
|
|
2715
|
+
try {
|
|
2716
|
+
this.mutationObserver = new MutationObserver((t) => {
|
|
2717
|
+
for (const n of t)
|
|
2718
|
+
if (n.addedNodes.forEach((r) => {
|
|
2719
|
+
r instanceof HTMLElement && this.scanElementForResources(r);
|
|
2720
|
+
}), n.type === "attributes" && n.target instanceof HTMLElement) {
|
|
2721
|
+
const r = n.target;
|
|
2722
|
+
if (this.isResourceElement(r)) {
|
|
2723
|
+
const s = this.getResourceSrc(r);
|
|
2724
|
+
s && (this.containerResources.add(s), this.config.debug && this.logger.debug(`📌 Tracked resource attribute change: ${s}`));
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
}), this.mutationObserver.observe(this.container, {
|
|
2728
|
+
childList: !0,
|
|
2729
|
+
subtree: !0,
|
|
2730
|
+
attributes: !0,
|
|
2731
|
+
attributeFilter: ["src", "href"]
|
|
2732
|
+
}), this.logger.debug("MutationObserver set up successfully");
|
|
2733
|
+
} catch (t) {
|
|
2734
|
+
this.logger.warn("Failed to set up MutationObserver:", t);
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
/**
|
|
2738
|
+
* Scan an element and its descendants for resources
|
|
2739
|
+
*/
|
|
2740
|
+
scanElementForResources(t) {
|
|
2741
|
+
if (this.isResourceElement(t)) {
|
|
2742
|
+
const r = this.getResourceSrc(t);
|
|
2743
|
+
r && (this.containerResources.add(r), this.config.debug && this.logger.debug(`📌 Tracked new resource in container: ${r}`));
|
|
2744
|
+
}
|
|
2745
|
+
["img", "audio", "video", 'link[rel="stylesheet"]', "source"].forEach((r) => {
|
|
2746
|
+
t.querySelectorAll(r).forEach((s) => {
|
|
2747
|
+
if (this.isResourceElement(s)) {
|
|
2748
|
+
const i = this.getResourceSrc(s);
|
|
2749
|
+
i && this.containerResources.add(i);
|
|
2750
|
+
}
|
|
2751
|
+
});
|
|
2752
|
+
});
|
|
2753
|
+
}
|
|
2754
|
+
/**
|
|
2755
|
+
* Initial scan of container for existing resources
|
|
2756
|
+
*/
|
|
2757
|
+
scanContainerResources() {
|
|
2758
|
+
this.container && (this.scanElementForResources(this.container), this.config.debug && this.logger.debug(`📊 Initial container scan found ${this.containerResources.size} resources`));
|
|
2759
|
+
}
|
|
2760
|
+
/**
|
|
2761
|
+
* Set up PerformanceObserver to track resource loading timing
|
|
2762
|
+
*/
|
|
2763
|
+
setupPerformanceObserver() {
|
|
2764
|
+
if (!this.isBrowser || typeof PerformanceObserver > "u") {
|
|
2765
|
+
this.logger.debug("PerformanceObserver not available");
|
|
2766
|
+
return;
|
|
2767
|
+
}
|
|
2768
|
+
try {
|
|
2769
|
+
this.observer = new PerformanceObserver((t) => {
|
|
2770
|
+
for (const n of t.getEntries())
|
|
2771
|
+
n.entryType === "resource" && this.handleResourceTiming(n);
|
|
2772
|
+
}), this.observer.observe({
|
|
2773
|
+
type: "resource",
|
|
2774
|
+
buffered: !0
|
|
2775
|
+
// Capture resources loaded before observer started
|
|
2776
|
+
}), this.logger.debug("PerformanceObserver set up successfully");
|
|
2777
|
+
} catch (t) {
|
|
2778
|
+
this.logger.warn("Failed to set up PerformanceObserver:", t);
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* Handle resource timing entry
|
|
2783
|
+
*/
|
|
2784
|
+
handleResourceTiming(t) {
|
|
2785
|
+
if (!this.isRelevantResource(t))
|
|
2786
|
+
return;
|
|
2787
|
+
const r = t.duration, s = t.transferSize, i = t.name, o = t.responseEnd === 0 && t.duration > 0, l = this.retryAttempts.has(i), u = this.retryAttempts.get(i) || 0;
|
|
2788
|
+
if (this.config.debug) {
|
|
2789
|
+
const a = this.truncateUrl(i), f = (s / 1024).toFixed(2), d = o ? "❌ FAILED" : "✅ SUCCESS", c = {
|
|
2790
|
+
total: `${r.toFixed(2)}ms`,
|
|
2791
|
+
dns: t.domainLookupEnd > 0 ? `${(t.domainLookupEnd - t.domainLookupStart).toFixed(2)}ms` : "n/a",
|
|
2792
|
+
tcp: t.connectEnd > 0 ? `${(t.connectEnd - t.connectStart).toFixed(2)}ms` : "n/a",
|
|
2793
|
+
request: t.responseStart > 0 ? `${(t.responseStart - t.requestStart).toFixed(2)}ms` : "n/a",
|
|
2794
|
+
response: t.responseEnd > 0 ? `${(t.responseEnd - t.responseStart).toFixed(2)}ms` : "n/a",
|
|
2795
|
+
size: s > 0 ? `${f} KB` : "0 KB",
|
|
2796
|
+
type: t.initiatorType,
|
|
2797
|
+
protocol: t.nextHopProtocol || "unknown"
|
|
2798
|
+
}, h = l && !o ? `
|
|
2799
|
+
🔄 Retry Success: Succeeded after ${u} ${u === 1 ? "retry" : "retries"}` : "";
|
|
2800
|
+
this.logger.info(
|
|
2801
|
+
`📊 PIE Resource Load ${d}
|
|
2802
|
+
URL: ${a}
|
|
2803
|
+
Type: ${c.type} | Protocol: ${c.protocol}
|
|
2804
|
+
⏱️ Total Time: ${c.total}
|
|
2805
|
+
└─ DNS Lookup: ${c.dns}
|
|
2806
|
+
└─ TCP Connect: ${c.tcp}
|
|
2807
|
+
└─ Request Time: ${c.request}
|
|
2808
|
+
└─ Response Time: ${c.response}
|
|
2809
|
+
📦 Transfer Size: ${c.size}${h}`
|
|
2810
|
+
);
|
|
2811
|
+
} else
|
|
2812
|
+
this.logger.debug(`Resource loaded: ${t.name}`, {
|
|
2813
|
+
duration: `${r.toFixed(2)}ms`,
|
|
2814
|
+
size: `${s} bytes`,
|
|
2815
|
+
type: t.initiatorType,
|
|
2816
|
+
failed: o,
|
|
2817
|
+
wasRetried: l,
|
|
2818
|
+
retryCount: u
|
|
2819
|
+
});
|
|
2820
|
+
o || this.handleSuccessfulLoad(i, t, r, s, u, l), this.trackNewRelicAction("pie-resource-load", {
|
|
2821
|
+
url: t.name,
|
|
2822
|
+
duration: Math.round(r),
|
|
2823
|
+
size: s,
|
|
2824
|
+
type: t.initiatorType,
|
|
2825
|
+
failed: o,
|
|
2826
|
+
wasRetried: l,
|
|
2827
|
+
retryCount: u
|
|
2828
|
+
}), o && this.handleFailedLoad(i, t, r, u, l);
|
|
2829
|
+
}
|
|
2830
|
+
/**
|
|
2831
|
+
* Handle successful resource load
|
|
2832
|
+
*/
|
|
2833
|
+
handleSuccessfulLoad(t, n, r, s, i, o) {
|
|
2834
|
+
if (this.dispatchEvent("pie-resource-load-success", {
|
|
2835
|
+
url: t,
|
|
2836
|
+
resourceType: n.initiatorType,
|
|
2837
|
+
duration: r,
|
|
2838
|
+
size: s,
|
|
2839
|
+
retryCount: i,
|
|
2840
|
+
maxRetries: this.config.maxRetries
|
|
2841
|
+
}), o) {
|
|
2842
|
+
const l = this.truncateUrl(t);
|
|
2843
|
+
this.logger.info(
|
|
2844
|
+
`✅ PIE Resource Retry Succeeded!
|
|
2845
|
+
URL: ${l}
|
|
2846
|
+
Retry Attempt: ${i}
|
|
2847
|
+
Load Time: ${r.toFixed(2)}ms
|
|
2848
|
+
Result: Resource now available to user`
|
|
2849
|
+
), this.dispatchEvent("pie-resource-retry-success", {
|
|
2850
|
+
url: t,
|
|
2851
|
+
resourceType: n.initiatorType,
|
|
2852
|
+
duration: r,
|
|
2853
|
+
size: s,
|
|
2854
|
+
retryCount: i,
|
|
2855
|
+
maxRetries: this.config.maxRetries
|
|
2856
|
+
}), this.retryAttempts.delete(t);
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
/**
|
|
2860
|
+
* Handle failed resource load
|
|
2861
|
+
*/
|
|
2862
|
+
handleFailedLoad(t, n, r, s, i) {
|
|
2863
|
+
const o = this.truncateUrl(t);
|
|
2864
|
+
i ? (this.logger.error(
|
|
2865
|
+
`❌ PIE Resource Retry Failed
|
|
2866
|
+
URL: ${o}
|
|
2867
|
+
Retry Attempt: ${s}
|
|
2868
|
+
Remaining Attempts: ${this.config.maxRetries - s}
|
|
2869
|
+
Status: Will ${s >= this.config.maxRetries ? "give up" : "retry again"}`
|
|
2870
|
+
), this.dispatchEvent("pie-resource-retry-failed", {
|
|
2871
|
+
url: t,
|
|
2872
|
+
resourceType: n.initiatorType,
|
|
2873
|
+
duration: r,
|
|
2874
|
+
retryCount: s,
|
|
2875
|
+
maxRetries: this.config.maxRetries,
|
|
2876
|
+
error: "Resource load failed after retry"
|
|
2877
|
+
})) : (this.logger.error(
|
|
2878
|
+
`❌ PIE Resource Initial Load Failed
|
|
2879
|
+
URL: ${o}
|
|
2880
|
+
Status: Will attempt ${this.config.maxRetries} ${this.config.maxRetries === 1 ? "retry" : "retries"}`
|
|
2881
|
+
), this.dispatchEvent("pie-resource-load-failed", {
|
|
2882
|
+
url: t,
|
|
2883
|
+
resourceType: n.initiatorType,
|
|
2884
|
+
duration: r,
|
|
2885
|
+
retryCount: 0,
|
|
2886
|
+
maxRetries: this.config.maxRetries,
|
|
2887
|
+
error: "Initial resource load failed"
|
|
2888
|
+
})), this.trackNewRelicError(
|
|
2889
|
+
new Error(`Resource load failed: ${n.name}`),
|
|
2890
|
+
{
|
|
2891
|
+
resourceUrl: n.name,
|
|
2892
|
+
resourceType: n.initiatorType,
|
|
2893
|
+
duration: Math.round(r),
|
|
2894
|
+
wasRetried: i,
|
|
2895
|
+
retryCount: s
|
|
2896
|
+
}
|
|
2897
|
+
);
|
|
2898
|
+
}
|
|
2899
|
+
/**
|
|
2900
|
+
* Check if resource is relevant to our container
|
|
2901
|
+
* Uses container-scoped tracking via MutationObserver
|
|
2902
|
+
*/
|
|
2903
|
+
isRelevantResource(t) {
|
|
2904
|
+
const n = t.name, r = this.containerResources.has(n);
|
|
2905
|
+
if (!r) {
|
|
2906
|
+
for (const s of this.containerResources)
|
|
2907
|
+
if (n.endsWith(s) || s.endsWith(n))
|
|
2908
|
+
return !0;
|
|
2909
|
+
}
|
|
2910
|
+
return r;
|
|
2911
|
+
}
|
|
2912
|
+
/**
|
|
2913
|
+
* Set up error event handler for resource loading failures
|
|
2914
|
+
*/
|
|
2915
|
+
setupErrorHandler() {
|
|
2916
|
+
this.container && (this.errorHandler = (t) => {
|
|
2917
|
+
const n = t.target;
|
|
2918
|
+
if (!this.isResourceElement(n))
|
|
2919
|
+
return;
|
|
2920
|
+
const r = n.tagName.toLowerCase(), s = this.getResourceSrc(n);
|
|
2921
|
+
if (s) {
|
|
2922
|
+
if (this.config.debug) {
|
|
2923
|
+
const i = this.truncateUrl(s), o = this.retryAttempts.get(s) || 0, l = this.config.maxRetries - o;
|
|
2924
|
+
this.logger.error(
|
|
2925
|
+
`❌ PIE Resource Load Error
|
|
2926
|
+
Element: <${r}>
|
|
2927
|
+
URL: ${i}
|
|
2928
|
+
Current Attempts: ${o}
|
|
2929
|
+
Remaining Retries: ${l}/${this.config.maxRetries}
|
|
2930
|
+
Action: ${l > 0 ? "Will retry with exponential backoff" : "Max retries reached, giving up"}`
|
|
2931
|
+
);
|
|
2932
|
+
} else
|
|
2933
|
+
this.logger.error(`❌ Resource error: ${r} failed to load ${s}`);
|
|
2934
|
+
this.trackNewRelicError(
|
|
2935
|
+
new Error(`Resource load error: ${s}`),
|
|
2936
|
+
{
|
|
2937
|
+
resourceType: r,
|
|
2938
|
+
resourceUrl: s
|
|
2939
|
+
}
|
|
2940
|
+
), this.retryResourceLoad(n, s);
|
|
2941
|
+
}
|
|
2942
|
+
}, this.container.addEventListener("error", this.errorHandler, !0), this.logger.debug("Error handler attached to container"));
|
|
2943
|
+
}
|
|
2944
|
+
/**
|
|
2945
|
+
* Check if element is a resource element
|
|
2946
|
+
*/
|
|
2947
|
+
isResourceElement(t) {
|
|
2948
|
+
if (!t || !(t instanceof HTMLElement))
|
|
2949
|
+
return !1;
|
|
2950
|
+
const n = t.tagName.toLowerCase();
|
|
2951
|
+
return ["img", "audio", "video", "link", "source"].includes(n);
|
|
2952
|
+
}
|
|
2953
|
+
/**
|
|
2954
|
+
* Get resource src/href from element
|
|
2955
|
+
*/
|
|
2956
|
+
getResourceSrc(t) {
|
|
2957
|
+
return t instanceof HTMLLinkElement ? t.href : "src" in t && t.src ? t.src : null;
|
|
2958
|
+
}
|
|
2959
|
+
/**
|
|
2960
|
+
* Handle permanent resource failure after all retries exhausted
|
|
2961
|
+
*/
|
|
2962
|
+
handlePermanentFailure(t, n, r) {
|
|
2963
|
+
if (this.config.debug) {
|
|
2964
|
+
const s = this.truncateUrl(t);
|
|
2965
|
+
this.logger.error(
|
|
2966
|
+
`❌ PIE Resource Permanently Failed
|
|
2967
|
+
URL: ${s}
|
|
2968
|
+
Total Attempts: ${r + 1} (initial + ${r} retries)
|
|
2969
|
+
Status: Giving up after ${this.config.maxRetries} retries
|
|
2970
|
+
⚠️ This resource will not be available to the user`
|
|
2971
|
+
);
|
|
2972
|
+
} else
|
|
2973
|
+
this.logger.error(`❌ Failed to load resource after ${this.config.maxRetries} retries: ${t}`);
|
|
2974
|
+
this.dispatchEvent("pie-resource-load-error", {
|
|
2975
|
+
url: t,
|
|
2976
|
+
resourceType: n,
|
|
2977
|
+
retryCount: r,
|
|
2978
|
+
maxRetries: this.config.maxRetries,
|
|
2979
|
+
error: `Resource permanently failed after ${this.config.maxRetries} retries`
|
|
2980
|
+
}), this.trackNewRelicError(
|
|
2981
|
+
new Error(`Resource permanently failed after ${this.config.maxRetries} retries: ${t}`),
|
|
2982
|
+
{
|
|
2983
|
+
resourceUrl: t,
|
|
2984
|
+
retryCount: r,
|
|
2985
|
+
resourceType: n
|
|
2986
|
+
}
|
|
2987
|
+
);
|
|
2988
|
+
}
|
|
2989
|
+
/**
|
|
2990
|
+
* Log retry schedule information
|
|
2991
|
+
*/
|
|
2992
|
+
logRetrySchedule(t, n, r, s) {
|
|
2993
|
+
if (this.config.debug) {
|
|
2994
|
+
const i = this.truncateUrl(t), o = Math.min(
|
|
2995
|
+
this.config.initialRetryDelay * Math.pow(2, n + 1),
|
|
2996
|
+
this.config.maxRetryDelay
|
|
2997
|
+
), l = s === "img" ? "Cache-busting URL" : s === "audio" || s === "video" ? "element.load()" : "Element replacement";
|
|
2998
|
+
this.logger.info(
|
|
2999
|
+
`🔄 PIE Resource Retry Scheduled
|
|
3000
|
+
URL: ${i}
|
|
3001
|
+
Attempt: ${n + 1}/${this.config.maxRetries}
|
|
3002
|
+
⏰ Wait Time: ${r}ms (exponential backoff)
|
|
3003
|
+
Next Retry Delay: ${o}ms (if this fails)
|
|
3004
|
+
Strategy: ${l}`
|
|
3005
|
+
);
|
|
3006
|
+
} else
|
|
3007
|
+
this.logger.info(`🔄 Retrying resource load (attempt ${n + 1}/${this.config.maxRetries}) after ${r}ms: ${t}`);
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Retry loading a failed resource with exponential backoff
|
|
3011
|
+
*/
|
|
3012
|
+
async retryResourceLoad(t, n) {
|
|
3013
|
+
const r = this.retryAttempts.get(n) || 0;
|
|
3014
|
+
if (r >= this.config.maxRetries) {
|
|
3015
|
+
this.handlePermanentFailure(n, t.tagName.toLowerCase(), r);
|
|
3016
|
+
return;
|
|
3017
|
+
}
|
|
3018
|
+
const s = Math.min(
|
|
3019
|
+
this.config.initialRetryDelay * Math.pow(2, r),
|
|
3020
|
+
this.config.maxRetryDelay
|
|
3021
|
+
);
|
|
3022
|
+
this.logRetrySchedule(n, r, s, t.tagName.toLowerCase()), this.trackNewRelicAction("pie-resource-retry", {
|
|
3023
|
+
url: n,
|
|
3024
|
+
attempt: r + 1,
|
|
3025
|
+
delay: s
|
|
3026
|
+
}), await new Promise((i) => setTimeout(i, s)), this.config.debug && this.logger.debug(`⏱️ Retry wait completed (${s}ms), attempting reload now...`), this.retryAttempts.set(n, r + 1);
|
|
3027
|
+
try {
|
|
3028
|
+
if (t instanceof HTMLAudioElement || t instanceof HTMLVideoElement)
|
|
3029
|
+
t.load(), this.config.debug ? this.logger.debug(`✓ Triggered load() on <${t.tagName.toLowerCase()}>`) : this.logger.debug(`Triggered load() on ${t.tagName.toLowerCase()}`);
|
|
3030
|
+
else if (t instanceof HTMLImageElement) {
|
|
3031
|
+
const i = new URL(n);
|
|
3032
|
+
i.searchParams.set("retry", (r + 1).toString()), i.searchParams.set("t", Date.now().toString()), t.src = i.toString(), this.config.debug ? this.logger.debug(`✓ Updated <img> src with cache-busting params: retry=${r + 1}, t=${Date.now()}`) : this.logger.debug("Updated img src with cache-busting params");
|
|
3033
|
+
} else if (t instanceof HTMLLinkElement) {
|
|
3034
|
+
const i = t.cloneNode(!0), o = new URL(n);
|
|
3035
|
+
o.searchParams.set("retry", (r + 1).toString()), i.href = o.toString(), t.parentNode?.replaceChild(i, t), this.config.debug ? this.logger.debug("✓ Recreated <link> element with cache-busting params") : this.logger.debug("Recreated link element with cache-busting params");
|
|
3036
|
+
}
|
|
3037
|
+
} catch (i) {
|
|
3038
|
+
this.config.debug ? this.logger.error(`❌ Error during retry attempt for ${n}:`, i) : this.logger.error(`Error during retry for ${n}:`, i);
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3042
|
+
* Dispatch a custom event from the container
|
|
3043
|
+
*/
|
|
3044
|
+
dispatchEvent(t, n) {
|
|
3045
|
+
if (!this.container)
|
|
3046
|
+
return;
|
|
3047
|
+
const r = new CustomEvent(t, {
|
|
3048
|
+
detail: n,
|
|
3049
|
+
bubbles: !0,
|
|
3050
|
+
composed: !0
|
|
3051
|
+
// Allow crossing shadow DOM boundaries
|
|
3052
|
+
});
|
|
3053
|
+
this.container.dispatchEvent(r);
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3056
|
+
* Get current retry statistics
|
|
3057
|
+
*/
|
|
3058
|
+
getStats() {
|
|
3059
|
+
const t = [];
|
|
3060
|
+
return this.retryAttempts.forEach((n, r) => {
|
|
3061
|
+
t.push({ url: r, attempts: n });
|
|
3062
|
+
}), {
|
|
3063
|
+
activeRetries: this.retryAttempts.size,
|
|
3064
|
+
failedResources: t.sort((n, r) => r.attempts - n.attempts)
|
|
3065
|
+
};
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
const Fi = 5e3;
|
|
3069
|
+
function Oi(e, t, n, r = "pie-player") {
|
|
3070
|
+
const s = je("use-resource-monitor", n());
|
|
3071
|
+
let i = U(null), o = U(!1);
|
|
3072
|
+
return Ce(() => {
|
|
3073
|
+
const l = e(), u = t(), a = n();
|
|
3074
|
+
l && !p(o) && u?.trackPageActions && (s.debug(`Initializing resource monitor for ${r}`), _(
|
|
3075
|
+
i,
|
|
3076
|
+
new Ii({
|
|
3077
|
+
trackPageActions: u.trackPageActions,
|
|
3078
|
+
maxRetries: u.maxResourceRetries ?? kt.maxResourceRetries,
|
|
3079
|
+
initialRetryDelay: u.resourceRetryDelay ?? kt.resourceRetryDelay,
|
|
3080
|
+
maxRetryDelay: Fi,
|
|
3081
|
+
debug: a
|
|
3082
|
+
}),
|
|
3083
|
+
!0
|
|
3084
|
+
), p(i).start(l), _(o, !0), s.info(`✅ Resource monitoring enabled for ${r}`));
|
|
3085
|
+
}), fi(() => {
|
|
3086
|
+
if (p(i)) {
|
|
3087
|
+
const l = p(i).getStats();
|
|
3088
|
+
s.debug(`Resource monitor stats at cleanup for ${r}:`, l), p(i).stop(), _(i, null), _(o, !1);
|
|
3089
|
+
}
|
|
3090
|
+
}), {
|
|
3091
|
+
get instance() {
|
|
3092
|
+
return p(i);
|
|
3093
|
+
},
|
|
3094
|
+
getStats() {
|
|
3095
|
+
return p(i)?.getStats() ?? { activeRetries: 0, failedResources: [] };
|
|
3096
|
+
},
|
|
3097
|
+
get isActive() {
|
|
3098
|
+
return p(o) && S(p(i), null, !1);
|
|
3099
|
+
}
|
|
3100
|
+
};
|
|
3101
|
+
}
|
|
3102
|
+
Er();
|
|
3103
|
+
we[k] = "src/lib/tags/pie-fixed-player/PieFixedPlayer.svelte";
|
|
3104
|
+
var Ui = Se(
|
|
3105
|
+
/* @__PURE__ */ xe(`<div class="pie-player-error" style="
|
|
2113
3106
|
padding: 20px;
|
|
2114
3107
|
margin: 20px;
|
|
2115
3108
|
border: 2px solid #d32f2f;
|
|
@@ -2117,258 +3110,335 @@ var Es = /* @__PURE__ */ he(`<div class="pie-player-error" style="
|
|
|
2117
3110
|
background-color: #ffebee;
|
|
2118
3111
|
color: #c62828;
|
|
2119
3112
|
font-family: sans-serif;
|
|
2120
|
-
"><h3 style="margin: 0 0 10px 0">⚠️ Configuration Error</h3> <p style="margin: 0"> </p></div>`),
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
3113
|
+
"><h3 style="margin: 0 0 10px 0">⚠️ Configuration Error</h3> <p style="margin: 0"> </p></div>`),
|
|
3114
|
+
we[k],
|
|
3115
|
+
[[336, 2, [[345, 3], [346, 3]]]]
|
|
3116
|
+
), Ai = Se(/* @__PURE__ */ xe('<div class="pie-loading" style="padding: 20px; text-align: center;"><p>Loading...</p></div>'), we[k], [[349, 2, [[350, 3]]]]), Bi = Se(/* @__PURE__ */ xe('<div class="pie-stimulus-container" style="display: flex; gap: 20px; width: 100%;"><div style="flex: 1; min-width: 0;"><!></div> <div style="flex: 1; min-width: 0;"><!></div></div>'), we[k], [[355, 2, [[356, 3], [372, 3]]]]), Di = Se(/* @__PURE__ */ xe("<div><!></div>"), we[k], [[391, 2]]), Ni = Se(/* @__PURE__ */ xe("<div><!></div>"), we[k], [[334, 0]]);
|
|
3117
|
+
const Mi = {
|
|
3118
|
+
hash: "svelte-1ol77e0",
|
|
3119
|
+
code: `
|
|
3120
|
+
:host {
|
|
3121
|
+
display: block;
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
.pie-fixed-player {
|
|
3125
|
+
width: 100%;
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
.player-item-container,
|
|
3129
|
+
.player-stimulus-container {
|
|
3130
|
+
width: 100%;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGllRml4ZWRQbGF5ZXIuc3ZlbHRlIiwibWFwcGluZ3MiOiI7QUE2WkEsQ0FBQyxLQUFLLENBQUM7QUFDUCxFQUFFLGNBQWM7QUFDaEI7QUFDQTtBQUNBLENBQVMsaUJBQWtCLENBQUM7QUFDNUIsRUFBRSxXQUFXO0FBQ2I7QUFDQTtBQUNBLENBQVMsc0JBQXVCO0FBQ2hDLENBQVMsMEJBQTJCLENBQUM7QUFDckMsRUFBRSxXQUFXO0FBQ2IiLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VzIjpbIlBpZUZpeGVkUGxheWVyLnN2ZWx0ZSJdfQ== */`
|
|
2124
3134
|
};
|
|
2125
|
-
function
|
|
2126
|
-
|
|
2127
|
-
let n =
|
|
2128
|
-
const
|
|
2129
|
-
|
|
3135
|
+
function we(e, t) {
|
|
3136
|
+
Ir(new.target), hn(t, !0, we), Or(e, Mi);
|
|
3137
|
+
let n = P(t, "config", 7, null), r = P(t, "session", 23, () => ({ id: "", data: [] })), s = P(t, "env", 23, () => ({ mode: "gather", role: "student" })), i = P(t, "addCorrectResponse", 7, !1), o = P(t, "renderStimulus", 7, !0), l = P(t, "allowedResize", 7, !1), u = P(t, "showBottomBorder", 7, !1), a = P(t, "debug", 7, !1), f = P(t, "customClassname", 7, ""), d = P(t, "containerClass", 7, ""), c = P(t, "passageContainerClass", 7, ""), h = P(t, "externalStyleUrls", 7, ""), m = P(t, "bundleType", 7, "player.js"), y = P(t, "loaderConfig", 7, kt);
|
|
3138
|
+
const C = S(typeof window, "undefined", !1) && S(typeof document, "undefined", !1), j = Y(() => p(de)?.parentElement?.getAttribute("debug")), N = Y(() => {
|
|
3139
|
+
if (ks(p(j), null, !1)) {
|
|
3140
|
+
const g = String(p(j)).toLowerCase();
|
|
3141
|
+
return S(g, "") || S(g, "true") ? !0 : !S(g, "false");
|
|
3142
|
+
}
|
|
3143
|
+
return gt();
|
|
3144
|
+
}), M = Y(() => je("pie-fixed-player", p(N)));
|
|
3145
|
+
let T = U(!0), L = U(null), F = U(null), q = U(null), de = U(null);
|
|
3146
|
+
Oi(() => p(de), () => y(), () => p(N), "pie-fixed-player");
|
|
3147
|
+
const Te = f() || `pie-player-${Date.now().toString(36)}`;
|
|
3148
|
+
Ce(() => {
|
|
2130
3149
|
if (n()) {
|
|
2131
3150
|
performance.mark("pie-load-end");
|
|
2132
3151
|
try {
|
|
2133
|
-
const
|
|
2134
|
-
if (
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
3152
|
+
const g = S(typeof n(), "string") ? JSON.parse(n()) : n();
|
|
3153
|
+
if (g.pie && g.passage) {
|
|
3154
|
+
const E = Wt({ config: g.pie }), I = Wt({ config: g.passage });
|
|
3155
|
+
_(F, E.config, !0), _(q, o() ? I.config : null, !0), _(T, !1), _(L, null);
|
|
3156
|
+
} else if (g.elements || g.models || g.markup) {
|
|
3157
|
+
const E = Wt({ config: g });
|
|
3158
|
+
_(F, E.config, !0), _(q, null), _(T, !1), _(L, null);
|
|
3159
|
+
} else {
|
|
3160
|
+
const E = "Invalid config: must contain elements, models, and markup, or pie/passage structure";
|
|
3161
|
+
if (_(L, E), _(T, !1), C && y()?.trackPageActions)
|
|
3162
|
+
try {
|
|
3163
|
+
const I = window?.newrelic;
|
|
3164
|
+
I && S(typeof I.noticeError, "function") && I.noticeError(new Error(E), {
|
|
3165
|
+
component: "pie-fixed-player",
|
|
3166
|
+
errorType: "InvalidConfig"
|
|
3167
|
+
});
|
|
3168
|
+
} catch {
|
|
3169
|
+
p(M).debug("New Relic tracking skipped (InvalidConfig)");
|
|
3170
|
+
}
|
|
2144
3171
|
}
|
|
2145
|
-
} catch (
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
3172
|
+
} catch (g) {
|
|
3173
|
+
const E = `Error parsing config: ${g.message}`;
|
|
3174
|
+
if (_(L, E), _(T, !1), C && y()?.trackPageActions)
|
|
3175
|
+
try {
|
|
3176
|
+
const I = window?.newrelic;
|
|
3177
|
+
I && S(typeof I.noticeError, "function") && I.noticeError(g, {
|
|
3178
|
+
component: "pie-fixed-player",
|
|
3179
|
+
errorType: "ConfigParseError"
|
|
3180
|
+
});
|
|
3181
|
+
} catch {
|
|
3182
|
+
p(M).debug("New Relic tracking skipped (ConfigParseError)");
|
|
3183
|
+
}
|
|
2151
3184
|
}
|
|
2152
3185
|
} else
|
|
2153
|
-
|
|
2154
|
-
})
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
}
|
|
3186
|
+
_(F, null), _(q, null), _(T, !0);
|
|
3187
|
+
});
|
|
3188
|
+
const pt = async (g) => {
|
|
3189
|
+
if (!(!C || !g || S(typeof g, "string", !1))) {
|
|
3190
|
+
if (document.querySelector(`style[data-pie-style="${g}"]`)) {
|
|
3191
|
+
p(M).debug(`Stylesheet already loaded: ${g}`);
|
|
3192
|
+
return;
|
|
3193
|
+
}
|
|
3194
|
+
try {
|
|
3195
|
+
const se = (await (await fetch(g)).text()).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g, `.pie-fixed-player.${Te} $1$2`), ie = document.createElement("style");
|
|
3196
|
+
ie.setAttribute("data-pie-style", g), ie.textContent = se, document.head.appendChild(ie), p(M).info(`✅ Loaded and scoped stylesheet: ${g}`);
|
|
3197
|
+
} catch (E) {
|
|
3198
|
+
p(M).error(`❌ Failed to load external stylesheet: ${g}`, E);
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
};
|
|
3202
|
+
Ce(() => {
|
|
3203
|
+
h() && S(typeof h(), "string") && h().split(",").map((E) => E.trim()).forEach((E) => {
|
|
3204
|
+
E && pt(E);
|
|
2163
3205
|
});
|
|
2164
|
-
}),
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
3206
|
+
}), Ce(() => {
|
|
3207
|
+
if (!p(F)?.resources?.stylesheets) return;
|
|
3208
|
+
const g = p(F).resources.stylesheets;
|
|
3209
|
+
Array.isArray(g) && g.forEach((E) => {
|
|
3210
|
+
const I = E?.url;
|
|
3211
|
+
I && S(typeof I, "string") && pt(I);
|
|
3212
|
+
});
|
|
3213
|
+
}), Ce(() => {
|
|
3214
|
+
u() && S(s().mode, "evaluate") && p(F)?.elements && gr().then(() => {
|
|
3215
|
+
Object.keys(p(F).elements).forEach((E) => {
|
|
3216
|
+
document.querySelectorAll(E).forEach((se) => {
|
|
3217
|
+
se instanceof HTMLElement && (se.style.borderBottom = "1px solid #ddd", se.style.paddingBottom = "20px", se.style.marginBottom = "20px");
|
|
2169
3218
|
});
|
|
2170
3219
|
});
|
|
2171
3220
|
});
|
|
2172
3221
|
});
|
|
2173
|
-
const
|
|
2174
|
-
const
|
|
2175
|
-
detail:
|
|
3222
|
+
const he = (g) => {
|
|
3223
|
+
const E = new CustomEvent(g.type, {
|
|
3224
|
+
detail: g.detail,
|
|
2176
3225
|
bubbles: !0,
|
|
2177
3226
|
composed: !0
|
|
2178
3227
|
});
|
|
2179
|
-
dispatchEvent(g);
|
|
2180
|
-
},
|
|
2181
|
-
|
|
3228
|
+
p(de)?.parentElement ? (p(de).parentElement.dispatchEvent(E), p(M).debug(`Dispatched ${g.type} event from custom element host`)) : p(M).warn("⚠️ Cannot dispatch event: custom element host not found");
|
|
3229
|
+
}, v = (g) => {
|
|
3230
|
+
he(g);
|
|
2182
3231
|
};
|
|
2183
|
-
var
|
|
2184
|
-
|
|
2185
|
-
var
|
|
3232
|
+
var w = Ni();
|
|
3233
|
+
He(w, 1, `pie-fixed-player ${Te ?? ""}`);
|
|
3234
|
+
var G = le(w);
|
|
2186
3235
|
{
|
|
2187
|
-
var
|
|
2188
|
-
var
|
|
2189
|
-
|
|
2190
|
-
},
|
|
3236
|
+
var Le = (g) => {
|
|
3237
|
+
var E = Ui(), I = Zt(le(E), 2), se = le(I, !0);
|
|
3238
|
+
oe(I), oe(E), nt(() => si(se, p(L))), pe(g, E);
|
|
3239
|
+
}, mn = (g, E) => {
|
|
2191
3240
|
{
|
|
2192
|
-
var
|
|
2193
|
-
var
|
|
2194
|
-
|
|
2195
|
-
},
|
|
3241
|
+
var I = (ie) => {
|
|
3242
|
+
var Nt = Ai();
|
|
3243
|
+
pe(ie, Nt);
|
|
3244
|
+
}, se = (ie, Nt) => {
|
|
2196
3245
|
{
|
|
2197
|
-
var
|
|
2198
|
-
var
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
const ct = fe(() => typeof o() == "string" ? JSON.parse(o()) : o()), ue = fe(() => (typeof r() == "string" ? JSON.parse(r()) : r()).data || []);
|
|
2202
|
-
Ke(ft, {
|
|
3246
|
+
var jr = (Qe) => {
|
|
3247
|
+
var Ee = Bi(), ze = le(Ee), Mt = le(ze);
|
|
3248
|
+
const jt = Y(() => S(typeof s(), "string") ? JSON.parse(s()) : s()), Qt = Y(() => (S(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), $e = Y(() => S(m(), "client-player.js") ? z.clientPlayer : z.player);
|
|
3249
|
+
ce(Mt, {
|
|
2203
3250
|
get itemConfig() {
|
|
2204
|
-
return
|
|
3251
|
+
return p(q);
|
|
2205
3252
|
},
|
|
2206
3253
|
get env() {
|
|
2207
|
-
return
|
|
3254
|
+
return p(jt);
|
|
2208
3255
|
},
|
|
2209
3256
|
get session() {
|
|
2210
|
-
return
|
|
3257
|
+
return p(Qt);
|
|
2211
3258
|
},
|
|
2212
3259
|
get addCorrectResponse() {
|
|
2213
|
-
return
|
|
3260
|
+
return i();
|
|
3261
|
+
},
|
|
3262
|
+
customClassname: Te,
|
|
3263
|
+
get bundleType() {
|
|
3264
|
+
return p($e);
|
|
2214
3265
|
},
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
Ke(Hn, {
|
|
3266
|
+
onLoadComplete: (J) => he(new CustomEvent("load-complete", { detail: J })),
|
|
3267
|
+
onPlayerError: (J) => he(new CustomEvent("player-error", { detail: J })),
|
|
3268
|
+
onSessionChanged: (J) => v(new CustomEvent("session-changed", { detail: J }))
|
|
3269
|
+
}), oe(ze);
|
|
3270
|
+
var zt = Zt(ze, 2), zr = le(zt);
|
|
3271
|
+
const qr = Y(() => S(typeof s(), "string") ? JSON.parse(s()) : s()), Vr = Y(() => (S(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), Hr = Y(() => S(m(), "client-player.js") ? z.clientPlayer : z.player);
|
|
3272
|
+
ce(zr, {
|
|
2223
3273
|
get itemConfig() {
|
|
2224
|
-
return
|
|
3274
|
+
return p(F);
|
|
2225
3275
|
},
|
|
2226
3276
|
get env() {
|
|
2227
|
-
return
|
|
3277
|
+
return p(qr);
|
|
2228
3278
|
},
|
|
2229
3279
|
get session() {
|
|
2230
|
-
return
|
|
3280
|
+
return p(Vr);
|
|
2231
3281
|
},
|
|
2232
3282
|
get addCorrectResponse() {
|
|
2233
|
-
return
|
|
3283
|
+
return i();
|
|
3284
|
+
},
|
|
3285
|
+
customClassname: Te,
|
|
3286
|
+
get bundleType() {
|
|
3287
|
+
return p(Hr);
|
|
2234
3288
|
},
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
Ke($e, {
|
|
3289
|
+
onLoadComplete: (J) => he(new CustomEvent("load-complete", { detail: J })),
|
|
3290
|
+
onPlayerError: (J) => he(new CustomEvent("player-error", { detail: J })),
|
|
3291
|
+
onSessionChanged: (J) => v(new CustomEvent("session-changed", { detail: J }))
|
|
3292
|
+
}), oe(zt), oe(Ee), nt(() => {
|
|
3293
|
+
He(ze, 1, `player-stimulus-container ${c() ?? ""}`), He(zt, 1, `player-item-container ${d() ?? ""}`);
|
|
3294
|
+
}), pe(Qe, Ee);
|
|
3295
|
+
}, Qr = (Qe) => {
|
|
3296
|
+
var Ee = Di(), ze = le(Ee);
|
|
3297
|
+
const Mt = Y(() => S(typeof s(), "string") ? JSON.parse(s()) : s()), jt = Y(() => (S(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), Qt = Y(() => S(m(), "client-player.js") ? z.clientPlayer : z.player);
|
|
3298
|
+
ce(ze, {
|
|
2246
3299
|
get itemConfig() {
|
|
2247
|
-
return
|
|
3300
|
+
return p(F);
|
|
2248
3301
|
},
|
|
2249
3302
|
get passageConfig() {
|
|
2250
|
-
return
|
|
3303
|
+
return p(q);
|
|
2251
3304
|
},
|
|
2252
3305
|
get env() {
|
|
2253
|
-
return
|
|
3306
|
+
return p(Mt);
|
|
2254
3307
|
},
|
|
2255
3308
|
get session() {
|
|
2256
|
-
return
|
|
3309
|
+
return p(jt);
|
|
2257
3310
|
},
|
|
2258
3311
|
get addCorrectResponse() {
|
|
2259
|
-
return
|
|
3312
|
+
return i();
|
|
2260
3313
|
},
|
|
2261
|
-
customClassname:
|
|
3314
|
+
customClassname: Te,
|
|
2262
3315
|
get passageContainerClass() {
|
|
2263
3316
|
return c();
|
|
2264
3317
|
},
|
|
2265
3318
|
get containerClass() {
|
|
2266
|
-
return
|
|
3319
|
+
return d();
|
|
2267
3320
|
},
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
3321
|
+
get bundleType() {
|
|
3322
|
+
return p(Qt);
|
|
3323
|
+
},
|
|
3324
|
+
onLoadComplete: ($e) => he(new CustomEvent("load-complete", { detail: $e })),
|
|
3325
|
+
onPlayerError: ($e) => he(new CustomEvent("player-error", { detail: $e })),
|
|
3326
|
+
onSessionChanged: ($e) => v(new CustomEvent("session-changed", { detail: $e }))
|
|
3327
|
+
}), oe(Ee), nt(() => He(Ee, 1, `player-item-container ${d() ?? ""}`)), pe(Qe, Ee);
|
|
2272
3328
|
};
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
(
|
|
2276
|
-
|
|
3329
|
+
st(
|
|
3330
|
+
ie,
|
|
3331
|
+
(Qe) => {
|
|
3332
|
+
p(q) && o() ? Qe(jr) : Qe(Qr, !1);
|
|
2277
3333
|
},
|
|
2278
|
-
|
|
3334
|
+
Nt
|
|
2279
3335
|
);
|
|
2280
3336
|
}
|
|
2281
3337
|
};
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
(
|
|
2285
|
-
|
|
3338
|
+
st(
|
|
3339
|
+
g,
|
|
3340
|
+
(ie) => {
|
|
3341
|
+
p(T) || !p(F) ? ie(I) : ie(se, !1);
|
|
2286
3342
|
},
|
|
2287
|
-
|
|
3343
|
+
E
|
|
2288
3344
|
);
|
|
2289
3345
|
}
|
|
2290
3346
|
};
|
|
2291
|
-
|
|
2292
|
-
|
|
3347
|
+
st(G, (g) => {
|
|
3348
|
+
p(L) ? g(Le) : g(mn, !1);
|
|
2293
3349
|
});
|
|
2294
3350
|
}
|
|
2295
|
-
return
|
|
3351
|
+
return oe(w), ui(w, (g) => _(de, g), () => p(de)), pe(e, w), gn({
|
|
2296
3352
|
get config() {
|
|
2297
3353
|
return n();
|
|
2298
3354
|
},
|
|
2299
|
-
set config(
|
|
2300
|
-
n(
|
|
3355
|
+
set config(g = null) {
|
|
3356
|
+
n(g), R();
|
|
2301
3357
|
},
|
|
2302
3358
|
get session() {
|
|
2303
3359
|
return r();
|
|
2304
3360
|
},
|
|
2305
|
-
set session(
|
|
2306
|
-
r(
|
|
3361
|
+
set session(g = { id: "", data: [] }) {
|
|
3362
|
+
r(g), R();
|
|
2307
3363
|
},
|
|
2308
3364
|
get env() {
|
|
2309
|
-
return
|
|
3365
|
+
return s();
|
|
2310
3366
|
},
|
|
2311
|
-
set env(
|
|
2312
|
-
|
|
3367
|
+
set env(g = { mode: "gather", role: "student" }) {
|
|
3368
|
+
s(g), R();
|
|
2313
3369
|
},
|
|
2314
3370
|
get addCorrectResponse() {
|
|
2315
|
-
return
|
|
3371
|
+
return i();
|
|
2316
3372
|
},
|
|
2317
|
-
set addCorrectResponse(
|
|
2318
|
-
|
|
3373
|
+
set addCorrectResponse(g = !1) {
|
|
3374
|
+
i(g), R();
|
|
2319
3375
|
},
|
|
2320
3376
|
get renderStimulus() {
|
|
2321
|
-
return
|
|
3377
|
+
return o();
|
|
2322
3378
|
},
|
|
2323
|
-
set renderStimulus(
|
|
2324
|
-
|
|
3379
|
+
set renderStimulus(g = !0) {
|
|
3380
|
+
o(g), R();
|
|
2325
3381
|
},
|
|
2326
3382
|
get allowedResize() {
|
|
2327
|
-
return
|
|
3383
|
+
return l();
|
|
2328
3384
|
},
|
|
2329
|
-
set allowedResize(
|
|
2330
|
-
|
|
3385
|
+
set allowedResize(g = !1) {
|
|
3386
|
+
l(g), R();
|
|
2331
3387
|
},
|
|
2332
3388
|
get showBottomBorder() {
|
|
3389
|
+
return u();
|
|
3390
|
+
},
|
|
3391
|
+
set showBottomBorder(g = !1) {
|
|
3392
|
+
u(g), R();
|
|
3393
|
+
},
|
|
3394
|
+
get debug() {
|
|
2333
3395
|
return a();
|
|
2334
3396
|
},
|
|
2335
|
-
set
|
|
2336
|
-
a(
|
|
3397
|
+
set debug(g = !1) {
|
|
3398
|
+
a(g), R();
|
|
2337
3399
|
},
|
|
2338
3400
|
get customClassname() {
|
|
2339
|
-
return
|
|
3401
|
+
return f();
|
|
2340
3402
|
},
|
|
2341
|
-
set customClassname(
|
|
2342
|
-
|
|
3403
|
+
set customClassname(g = "") {
|
|
3404
|
+
f(g), R();
|
|
2343
3405
|
},
|
|
2344
3406
|
get containerClass() {
|
|
2345
|
-
return
|
|
3407
|
+
return d();
|
|
2346
3408
|
},
|
|
2347
|
-
set containerClass(
|
|
2348
|
-
|
|
3409
|
+
set containerClass(g = "") {
|
|
3410
|
+
d(g), R();
|
|
2349
3411
|
},
|
|
2350
3412
|
get passageContainerClass() {
|
|
2351
3413
|
return c();
|
|
2352
3414
|
},
|
|
2353
|
-
set passageContainerClass(
|
|
2354
|
-
c(
|
|
3415
|
+
set passageContainerClass(g = "") {
|
|
3416
|
+
c(g), R();
|
|
2355
3417
|
},
|
|
2356
3418
|
get externalStyleUrls() {
|
|
2357
|
-
return
|
|
3419
|
+
return h();
|
|
3420
|
+
},
|
|
3421
|
+
set externalStyleUrls(g = "") {
|
|
3422
|
+
h(g), R();
|
|
3423
|
+
},
|
|
3424
|
+
get bundleType() {
|
|
3425
|
+
return m();
|
|
2358
3426
|
},
|
|
2359
|
-
set
|
|
2360
|
-
|
|
3427
|
+
set bundleType(g = "player.js") {
|
|
3428
|
+
m(g), R();
|
|
2361
3429
|
},
|
|
2362
3430
|
get loaderConfig() {
|
|
2363
|
-
return
|
|
3431
|
+
return y();
|
|
2364
3432
|
},
|
|
2365
|
-
set loaderConfig(
|
|
2366
|
-
|
|
2367
|
-
}
|
|
3433
|
+
set loaderConfig(g = kt) {
|
|
3434
|
+
y(g), R();
|
|
3435
|
+
},
|
|
3436
|
+
...Fr()
|
|
2368
3437
|
});
|
|
2369
3438
|
}
|
|
2370
|
-
|
|
2371
|
-
|
|
3439
|
+
$r(we);
|
|
3440
|
+
customElements.define("pie-fixed-player", Ar(
|
|
3441
|
+
we,
|
|
2372
3442
|
{
|
|
2373
3443
|
config: { attribute: "config", type: "Object" },
|
|
2374
3444
|
session: { attribute: "session", type: "Object" },
|
|
@@ -2383,6 +3453,7 @@ customElements.define("pie-fixed-player", Nn(
|
|
|
2383
3453
|
attribute: "show-bottom-border",
|
|
2384
3454
|
type: "Boolean"
|
|
2385
3455
|
},
|
|
3456
|
+
debug: { attribute: "debug", type: "Boolean" },
|
|
2386
3457
|
customClassname: { attribute: "custom-classname", type: "String" },
|
|
2387
3458
|
containerClass: { attribute: "container-class", type: "String" },
|
|
2388
3459
|
passageContainerClass: {
|
|
@@ -2393,6 +3464,7 @@ customElements.define("pie-fixed-player", Nn(
|
|
|
2393
3464
|
attribute: "external-style-urls",
|
|
2394
3465
|
type: "String"
|
|
2395
3466
|
},
|
|
3467
|
+
bundleType: { attribute: "bundle-type", type: "String" },
|
|
2396
3468
|
loaderConfig: { attribute: "loader-config", type: "Object" }
|
|
2397
3469
|
},
|
|
2398
3470
|
[],
|