@pie-qti/item-player 0.1.22 → 0.1.24

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.
@@ -2,7 +2,7 @@ import { Qti2xAttributeNameMapper as e, Qti2xElementNameMapper as t, Qti3Attribu
2
2
  import { parse as s } from "node-html-parser";
3
3
  import { decodeXmlAttribute as c, isBlockedStylesheetCss as l, normalizeCssForPolicy as u, normalizeHeuristicsConfig as d, parseSrcsetCandidates as f } from "@pie-qti/ims-cp-core";
4
4
  import { DeclarationContext as p, OperatorRegistry as m, buildOutcomeProcessingAst as h, buildResponseProcessingAst as g, buildTemplateProcessingAst as _, childElements as v, coerceBaseValue as y, evalExpr as b, execProgram as ee, findAssessmentItem as x, findDescendants as S, findFirstDescendant as te, getAttr as C, parseXml as ne, qtiNull as re, qtiValue as w, serializeXml as ie, toBoolean as ae, toNumber as oe, toStringValue as se } from "@pie-qti/qti-processing";
5
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/shared/utils.js
5
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/shared/utils.js
6
6
  var ce = Array.isArray, le = Array.prototype.indexOf, ue = Array.prototype.includes, de = Array.from, fe = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, me = Object.getOwnPropertyDescriptors, he = Object.prototype, ge = Array.prototype, _e = Object.getPrototypeOf, ve = Object.isExtensible, ye = () => {};
7
7
  function be(e) {
8
8
  for (var t = 0; t < e.length; t++) e[t]();
@@ -56,14 +56,14 @@ function Te(e, t, n) {
56
56
  }) : e[t] = n, e;
57
57
  }
58
58
  //#endregion
59
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/constants.js
59
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/constants.js
60
60
  var Ee = 1 << 24, De = 1024, Oe = 2048, ke = 4096, Ae = 8192, je = 16384, Me = 32768, Ne = 1 << 25, Pe = 65536, Fe = 1 << 19, Ie = 1 << 20, Le = 1 << 25, Re = 65536, ze = 1 << 21, Be = 1 << 22, Ve = 1 << 23, He = Symbol("$state"), Ue = Symbol("legacy props"), We = Symbol(""), Ge = Symbol("attributes"), Ke = Symbol("class"), qe = Symbol("style"), Je = Symbol("text"), Ye = Symbol("form reset"), Xe = new class extends Error {
61
61
  constructor(...e) {
62
62
  super(...e), Te(this, "name", "StaleReactionError"), Te(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
63
63
  }
64
64
  }(), Ze = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
65
65
  //#endregion
66
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/errors.js
66
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/errors.js
67
67
  function Qe() {
68
68
  throw Error("https://svelte.dev/e/async_derived_orphan");
69
69
  }
@@ -98,7 +98,7 @@ function ct() {
98
98
  throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
99
99
  }
100
100
  //#endregion
101
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/constants.js
101
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/constants.js
102
102
  var lt = {}, T = Symbol("uninitialized"), ut = "http://www.w3.org/2000/svg", dt = "http://www.w3.org/1998/Math/MathML";
103
103
  function ft() {
104
104
  console.warn("https://svelte.dev/e/derived_inert");
@@ -113,7 +113,7 @@ function ht() {
113
113
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
114
114
  }
115
115
  //#endregion
116
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/hydration.js
116
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/hydration.js
117
117
  var E = !1;
118
118
  function gt(e) {
119
119
  E = e;
@@ -156,7 +156,7 @@ function bt(e) {
156
156
  return e.data;
157
157
  }
158
158
  //#endregion
159
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/equality.js
159
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/equality.js
160
160
  function xt(e) {
161
161
  return e === this.v;
162
162
  }
@@ -167,7 +167,7 @@ function Ct(e) {
167
167
  return !St(e, this.v);
168
168
  }
169
169
  //#endregion
170
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/context.js
170
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/context.js
171
171
  var wt = null;
172
172
  function Tt(e) {
173
173
  wt = e;
@@ -196,7 +196,7 @@ function Ot() {
196
196
  return !0;
197
197
  }
198
198
  //#endregion
199
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/task.js
199
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/task.js
200
200
  var kt = [];
201
201
  function At() {
202
202
  var e = kt;
@@ -235,7 +235,7 @@ function Nt(e, t) {
235
235
  }
236
236
  }
237
237
  //#endregion
238
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/status.js
238
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/status.js
239
239
  var Pt = ~(Oe | ke | De);
240
240
  function A(e, t) {
241
241
  e.f = e.f & Pt | t;
@@ -244,7 +244,7 @@ function Ft(e) {
244
244
  e.f & 512 || e.deps === null ? A(e, De) : A(e, ke);
245
245
  }
246
246
  //#endregion
247
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/utils.js
247
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/utils.js
248
248
  function It(e) {
249
249
  if (e !== null) for (let t of e) !(t.f & 2) || !(t.f & 65536) || (t.f ^= Re, It(t.deps));
250
250
  }
@@ -252,7 +252,7 @@ function Lt(e, t, n) {
252
252
  e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), It(e.deps), A(e, De);
253
253
  }
254
254
  //#endregion
255
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/store.js
255
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/store.js
256
256
  var Rt = !1;
257
257
  function zt(e) {
258
258
  var t = Rt;
@@ -263,7 +263,7 @@ function zt(e) {
263
263
  }
264
264
  }
265
265
  //#endregion
266
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/misc.js
266
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/misc.js
267
267
  function Bt(e, t) {
268
268
  if (t) {
269
269
  let t = document.body;
@@ -281,7 +281,7 @@ function Ht() {
281
281
  }, { capture: !0 }));
282
282
  }
283
283
  //#endregion
284
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
284
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
285
285
  function Ut(e) {
286
286
  var t = W, n = G;
287
287
  Si(null), Ci(null);
@@ -292,13 +292,13 @@ function Ut(e) {
292
292
  }
293
293
  }
294
294
  //#endregion
295
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/reactivity/create-subscriber.js
295
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/reactivity/create-subscriber.js
296
296
  function Wt(e) {
297
297
  let t = 0, n = wr(0), r;
298
298
  return () => {
299
- Xr() && (K(n), ri(() => (t === 0 && (r = Ui(() => e(() => kr(n)))), t += 1, () => {
299
+ Xr() && (K(n), ri(() => (t === 0 && (r = Ui(() => e(() => Or(n)))), t += 1, () => {
300
300
  jt(() => {
301
- --t, t === 0 && (r?.(), r = void 0, kr(n));
301
+ --t, t === 0 && (r?.(), r = void 0, Or(n));
302
302
  });
303
303
  })));
304
304
  };
@@ -335,7 +335,7 @@ function P(e, t) {
335
335
  return e.get(M(e, t));
336
336
  }
337
337
  //#endregion
338
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
338
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
339
339
  var qt = Pe | Fe;
340
340
  function Jt(e, t, n, r) {
341
341
  new fn(e, t, n, r);
@@ -370,7 +370,7 @@ var Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Zt =
370
370
  }
371
371
  update_pending_count(e, t) {
372
372
  M(F, this, bn).call(this, e, t), N(an, this, P(an, this) + e), !(!P(un, this) || P(sn, this)) && (N(sn, this, !0), jt(() => {
373
- N(sn, this, !1), P(un, this) && Dr(P(un, this), P(an, this));
373
+ N(sn, this, !1), P(un, this) && Er(P(un, this), P(an, this));
374
374
  }));
375
375
  }
376
376
  get_effect_pending() {
@@ -423,7 +423,7 @@ function hn(e) {
423
423
  function gn() {
424
424
  let e = P(Zt, this).pending;
425
425
  e && (this.is_pending = !0, N(tn, this, oi(() => e(P(Yt, this)))), jt(() => {
426
- var e = N(rn, this, document.createDocumentFragment()), t = B();
426
+ var e = N(rn, this, document.createDocumentFragment()), t = Rr();
427
427
  e.append(t), N(en, this, M(F, this, yn).call(this, () => oi(() => P(Qt, this).call(this, t)))), P(on, this) === 0 && (P(Yt, this).before(e), N(rn, this, null), fi(P(tn, this), () => {
428
428
  N(tn, this, null);
429
429
  }), M(F, this, vn).call(this, L));
@@ -496,7 +496,7 @@ function xn(e) {
496
496
  });
497
497
  }
498
498
  //#endregion
499
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/async.js
499
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/async.js
500
500
  function Sn(e, t, n, r) {
501
501
  let i = Ot() ? En : kn;
502
502
  var a = e.filter((e) => !e.settled), o = t.map(i);
@@ -585,7 +585,7 @@ function On(e, t, n) {
585
585
  s.add(n), c.async_deriveds.set(t, n);
586
586
  }
587
587
  let u = (e, t = void 0) => {
588
- l?.(), s.delete(n), t !== Dn && (c.activate(), t ? (a.f |= Ve, Dr(a, t)) : (a.f & 8388608 && (a.f ^= Ve), Dr(a, e)), c.deactivate());
588
+ l?.(), s.delete(n), t !== Dn && (c.activate(), t ? (a.f |= Ve, Er(a, t)) : (a.f & 8388608 && (a.f ^= Ve), Er(a, e)), c.deactivate());
589
589
  };
590
590
  n.promise.then(u, (e) => u(null, e || "unknown"));
591
591
  }), Zr(() => {
@@ -645,7 +645,7 @@ function Pn(e) {
645
645
  if (e.effects !== null) for (let t of e.effects) t.teardown && t.fn !== null && Bi(t);
646
646
  }
647
647
  //#endregion
648
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/batch.js
648
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/batch.js
649
649
  var Fn, In = null, L = null, Ln = null, Rn = null, zn = null, Bn = !1, Vn = !1, Hn = null, Un = null, Wn = 0, Gn = 1, Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakSet(), sr = class e {
650
650
  constructor() {
651
651
  Kt(this, R), Te(this, "id", Gn++), j(this, Kn, !1), Te(this, "linked", !0), j(this, qn, null), j(this, Jn, null), Te(this, "async_deriveds", /* @__PURE__ */ new Map()), Te(this, "current", /* @__PURE__ */ new Map()), Te(this, "previous", /* @__PURE__ */ new Map()), j(this, Yn, /* @__PURE__ */ new Set()), j(this, Xn, /* @__PURE__ */ new Set()), j(this, Zn, 0), j(this, Qn, /* @__PURE__ */ new Map()), j(this, $n, null), j(this, er, []), j(this, tr, []), j(this, nr, /* @__PURE__ */ new Set()), j(this, rr, /* @__PURE__ */ new Set()), j(this, ir, /* @__PURE__ */ new Map()), j(this, ar, /* @__PURE__ */ new Set()), Te(this, "is_fork", !1), j(this, or, !1), In === null ? In = this : (N(Jn, In, this), N(qn, this, In)), In = this;
@@ -907,7 +907,7 @@ function br(e) {
907
907
  for (var t = e.first; t !== null;) br(t), t = t.next;
908
908
  }
909
909
  //#endregion
910
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/sources.js
910
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/sources.js
911
911
  var xr = /* @__PURE__ */ new Set(), Sr = /* @__PURE__ */ new Map(), Cr = !1;
912
912
  function wr(e, t) {
913
913
  return {
@@ -920,19 +920,19 @@ function wr(e, t) {
920
920
  };
921
921
  }
922
922
  /*#__NO_SIDE_EFFECTS__*/
923
- function Tr(e, t) {
923
+ function z(e, t) {
924
924
  let n = wr(e, t);
925
925
  return Ti(n), n;
926
926
  }
927
927
  /*#__NO_SIDE_EFFECTS__*/
928
- function Er(e, t = !1, n = !0) {
928
+ function Tr(e, t = !1, n = !0) {
929
929
  let r = wr(e);
930
930
  return t || (r.equals = Ct), r;
931
931
  }
932
- function z(e, t, n = !1) {
933
- return W !== null && (!xi || W.f & 131072) && Ot() && W.f & 4325394 && (wi === null || !wi.has(e)) && st(), Dr(e, n ? jr(t) : t, Un);
932
+ function B(e, t, n = !1) {
933
+ return W !== null && (!xi || W.f & 131072) && Ot() && W.f & 4325394 && (wi === null || !wi.has(e)) && st(), Er(e, n ? Ar(t) : t, Un);
934
934
  }
935
- function Dr(e, t, n = null) {
935
+ function Er(e, t, n = null) {
936
936
  if (!e.equals(t)) {
937
937
  Sr.set(e, yi ? t : e.v);
938
938
  var r = sr.ensure();
@@ -940,11 +940,11 @@ function Dr(e, t, n = null) {
940
940
  let t = e;
941
941
  e.f & 2048 && jn(t), Rn === null && Ft(t);
942
942
  }
943
- e.wv = Pi(), Ar(e, Oe, n), Ot() && G !== null && G.f & 1024 && !(G.f & 96) && (Oi === null ? ki([e]) : Oi.push(e)), !r.is_fork && xr.size > 0 && !Cr && Or();
943
+ e.wv = Pi(), kr(e, Oe, n), Ot() && G !== null && G.f & 1024 && !(G.f & 96) && (Oi === null ? ki([e]) : Oi.push(e)), !r.is_fork && xr.size > 0 && !Cr && Dr();
944
944
  }
945
945
  return t;
946
946
  }
947
- function Or() {
947
+ function Dr() {
948
948
  Cr = !1;
949
949
  for (let e of xr) {
950
950
  e.f & 1024 && A(e, ke);
@@ -958,10 +958,10 @@ function Or() {
958
958
  }
959
959
  xr.clear();
960
960
  }
961
- function kr(e) {
962
- z(e, e.v + 1);
961
+ function Or(e) {
962
+ B(e, e.v + 1);
963
963
  }
964
- function Ar(e, t, n) {
964
+ function kr(e, t, n) {
965
965
  var r = e.reactions;
966
966
  if (r !== null) for (var i = Ot(), a = r.length, o = 0; o < a; o++) {
967
967
  var s = r[o], c = s.f;
@@ -970,7 +970,7 @@ function Ar(e, t, n) {
970
970
  if (l && A(s, t), c & 131072) xr.add(s);
971
971
  else if (c & 2) {
972
972
  var u = s;
973
- Rn?.delete(u), c & 65536 || (c & 512 && (G === null || !(G.f & 2097152)) && (s.f |= Re), Ar(u, ke, n));
973
+ Rn?.delete(u), c & 65536 || (c & 512 && (G === null || !(G.f & 2097152)) && (s.f |= Re), kr(u, ke, n));
974
974
  } else if (l) {
975
975
  var d = s;
976
976
  c & 16 && gr !== null && gr.add(d), n === null ? vr(d) : n.push(d);
@@ -978,40 +978,40 @@ function Ar(e, t, n) {
978
978
  }
979
979
  }
980
980
  }
981
- function jr(e) {
981
+ function Ar(e) {
982
982
  if (typeof e != "object" || !e || He in e) return e;
983
983
  let t = _e(e);
984
984
  if (t !== he && t !== ge) return e;
985
- var n = /* @__PURE__ */ new Map(), r = ce(e), i = /* @__PURE__ */ Tr(0), a = null, o = Mi, s = (e) => {
985
+ var n = /* @__PURE__ */ new Map(), r = ce(e), i = /* @__PURE__ */ z(0), a = null, o = Mi, s = (e) => {
986
986
  if (Mi === o) return e();
987
987
  var t = W, n = Mi;
988
988
  Si(null), Ni(o);
989
989
  var r = e();
990
990
  return Si(t), Ni(n), r;
991
991
  };
992
- return r && n.set("length", /* @__PURE__ */ Tr(e.length, a)), new Proxy(e, {
992
+ return r && n.set("length", /* @__PURE__ */ z(e.length, a)), new Proxy(e, {
993
993
  defineProperty(e, t, r) {
994
994
  (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && at();
995
995
  var i = n.get(t);
996
996
  return i === void 0 ? s(() => {
997
- var e = /* @__PURE__ */ Tr(r.value, a);
997
+ var e = /* @__PURE__ */ z(r.value, a);
998
998
  return n.set(t, e), e;
999
- }) : z(i, r.value, !0), !0;
999
+ }) : B(i, r.value, !0), !0;
1000
1000
  },
1001
1001
  deleteProperty(e, t) {
1002
1002
  var r = n.get(t);
1003
1003
  if (r === void 0) {
1004
1004
  if (t in e) {
1005
- let e = s(() => /* @__PURE__ */ Tr(T, a));
1006
- n.set(t, e), kr(i);
1005
+ let e = s(() => /* @__PURE__ */ z(T, a));
1006
+ n.set(t, e), Or(i);
1007
1007
  }
1008
- } else z(r, T), kr(i);
1008
+ } else B(r, T), Or(i);
1009
1009
  return !0;
1010
1010
  },
1011
1011
  get(t, r, i) {
1012
1012
  if (r === He) return e;
1013
1013
  var o = n.get(r), c = r in t;
1014
- if (o === void 0 && (!c || pe(t, r)?.writable) && (o = s(() => /* @__PURE__ */ Tr(jr(c ? t[r] : T), a)), n.set(r, o)), o !== void 0) {
1014
+ if (o === void 0 && (!c || pe(t, r)?.writable) && (o = s(() => /* @__PURE__ */ z(Ar(c ? t[r] : T), a)), n.set(r, o)), o !== void 0) {
1015
1015
  var l = K(o);
1016
1016
  return l === T ? void 0 : l;
1017
1017
  }
@@ -1036,27 +1036,27 @@ function jr(e) {
1036
1036
  has(e, t) {
1037
1037
  if (t === He) return !0;
1038
1038
  var r = n.get(t), i = r !== void 0 && r.v !== T || Reflect.has(e, t);
1039
- return (r !== void 0 || G !== null && (!i || pe(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ Tr(i ? jr(e[t]) : T, a)), n.set(t, r)), K(r) === T) ? !1 : i;
1039
+ return (r !== void 0 || G !== null && (!i || pe(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ z(i ? Ar(e[t]) : T, a)), n.set(t, r)), K(r) === T) ? !1 : i;
1040
1040
  },
1041
1041
  set(e, t, o, c) {
1042
1042
  var l = n.get(t), u = t in e;
1043
1043
  if (r && t === "length") for (var d = o; d < l.v; d += 1) {
1044
1044
  var f = n.get(d + "");
1045
- f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ Tr(T, a)), n.set(d + "", f)) : z(f, T);
1045
+ f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ z(T, a)), n.set(d + "", f)) : B(f, T);
1046
1046
  }
1047
- if (l === void 0) (!u || pe(e, t)?.writable) && (l = s(() => /* @__PURE__ */ Tr(void 0, a)), z(l, jr(o)), n.set(t, l));
1047
+ if (l === void 0) (!u || pe(e, t)?.writable) && (l = s(() => /* @__PURE__ */ z(void 0, a)), B(l, Ar(o)), n.set(t, l));
1048
1048
  else {
1049
1049
  u = l.v !== T;
1050
- var p = s(() => jr(o));
1051
- z(l, p);
1050
+ var p = s(() => Ar(o));
1051
+ B(l, p);
1052
1052
  }
1053
1053
  var m = Reflect.getOwnPropertyDescriptor(e, t);
1054
1054
  if (m?.set && m.set.call(c, o), !u) {
1055
1055
  if (r && typeof t == "string") {
1056
1056
  var h = n.get("length"), g = Number(t);
1057
- Number.isInteger(g) && g >= h.v && z(h, g + 1);
1057
+ Number.isInteger(g) && g >= h.v && B(h, g + 1);
1058
1058
  }
1059
- kr(i);
1059
+ Or(i);
1060
1060
  }
1061
1061
  return !0;
1062
1062
  },
@@ -1074,40 +1074,40 @@ function jr(e) {
1074
1074
  }
1075
1075
  });
1076
1076
  }
1077
- function Mr(e) {
1077
+ function jr(e) {
1078
1078
  try {
1079
1079
  if (typeof e == "object" && e && He in e) return e[He];
1080
1080
  } catch {}
1081
1081
  return e;
1082
1082
  }
1083
- function Nr(e, t) {
1084
- return Object.is(Mr(e), Mr(t));
1083
+ function Mr(e, t) {
1084
+ return Object.is(jr(e), jr(t));
1085
1085
  }
1086
- var Pr, Fr, Ir, Lr;
1087
- function Rr() {
1088
- if (Pr === void 0) {
1089
- Pr = window, Fr = /Firefox/.test(navigator.userAgent);
1086
+ var Nr, Pr, Fr, Ir;
1087
+ function Lr() {
1088
+ if (Nr === void 0) {
1089
+ Nr = window, Pr = /Firefox/.test(navigator.userAgent);
1090
1090
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1091
- Ir = pe(t, "firstChild").get, Lr = pe(t, "nextSibling").get, ve(e) && (e[Ke] = void 0, e[Ge] = null, e[qe] = void 0, e.__e = void 0), ve(n) && (n[Je] = void 0);
1091
+ Fr = pe(t, "firstChild").get, Ir = pe(t, "nextSibling").get, ve(e) && (e[Ke] = void 0, e[Ge] = null, e[qe] = void 0, e.__e = void 0), ve(n) && (n[Je] = void 0);
1092
1092
  }
1093
1093
  }
1094
- function B(e = "") {
1094
+ function Rr(e = "") {
1095
1095
  return document.createTextNode(e);
1096
1096
  }
1097
1097
  /*@__NO_SIDE_EFFECTS__*/
1098
1098
  function zr(e) {
1099
- return Ir.call(e);
1099
+ return Fr.call(e);
1100
1100
  }
1101
1101
  /*@__NO_SIDE_EFFECTS__*/
1102
1102
  function Br(e) {
1103
- return Lr.call(e);
1103
+ return Ir.call(e);
1104
1104
  }
1105
1105
  function V(e, t) {
1106
1106
  if (!E) return /* @__PURE__ */ zr(e);
1107
1107
  var n = /* @__PURE__ */ zr(D);
1108
- if (n === null) n = D.appendChild(B());
1108
+ if (n === null) n = D.appendChild(Rr());
1109
1109
  else if (t && n.nodeType !== 3) {
1110
- var r = B();
1110
+ var r = Rr();
1111
1111
  return n?.before(r), O(r), r;
1112
1112
  }
1113
1113
  return t && Kr(n), O(n), n;
@@ -1119,7 +1119,7 @@ function Vr(e, t = !1) {
1119
1119
  }
1120
1120
  if (t) {
1121
1121
  if (D?.nodeType !== 3) {
1122
- var r = B();
1122
+ var r = Rr();
1123
1123
  return D?.before(r), O(r), r;
1124
1124
  }
1125
1125
  Kr(D);
@@ -1132,7 +1132,7 @@ function Hr(e, t = 1, n = !1) {
1132
1132
  if (!E) return r;
1133
1133
  if (n) {
1134
1134
  if (r?.nodeType !== 3) {
1135
- var a = B();
1135
+ var a = Rr();
1136
1136
  return r === null ? i?.after(a) : r.before(a), O(a), a;
1137
1137
  }
1138
1138
  Kr(r);
@@ -1154,7 +1154,7 @@ function Kr(e) {
1154
1154
  for (; t !== null && t.nodeType === 3;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1155
1155
  }
1156
1156
  //#endregion
1157
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/effects.js
1157
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/effects.js
1158
1158
  function qr(e) {
1159
1159
  G === null && (W === null && nt(e), tt()), yi && et(e);
1160
1160
  }
@@ -1345,7 +1345,7 @@ function gi(e, t) {
1345
1345
  }
1346
1346
  }
1347
1347
  //#endregion
1348
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/legacy.js
1348
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/legacy.js
1349
1349
  var _i = null, vi = !1, yi = !1;
1350
1350
  function bi(e) {
1351
1351
  yi = e;
@@ -1592,7 +1592,7 @@ function ta(e) {
1592
1592
  return ea.includes(e);
1593
1593
  }
1594
1594
  //#endregion
1595
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dev/css.js
1595
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dev/css.js
1596
1596
  var na = Symbol("events"), ra = /* @__PURE__ */ new Set(), ia = /* @__PURE__ */ new Set();
1597
1597
  function aa(e, t, n, r = {}) {
1598
1598
  function i(e) {
@@ -1665,7 +1665,7 @@ function ua(e) {
1665
1665
  }
1666
1666
  }
1667
1667
  //#endregion
1668
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/reconciler.js
1668
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/reconciler.js
1669
1669
  var da = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1670
1670
  function fa(e) {
1671
1671
  return da?.createHTML(e) ?? e;
@@ -1675,7 +1675,7 @@ function pa(e) {
1675
1675
  return t.innerHTML = fa(e.replaceAll("<!>", "<!---->")), t.content;
1676
1676
  }
1677
1677
  //#endregion
1678
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/template.js
1678
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/template.js
1679
1679
  function ma(e, t) {
1680
1680
  var n = G;
1681
1681
  n.nodes === null && (n.nodes = {
@@ -1691,7 +1691,7 @@ function q(e, t) {
1691
1691
  return () => {
1692
1692
  if (E) return ma(D, null), D;
1693
1693
  i === void 0 && (i = pa(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ zr(i)));
1694
- var t = r || Fr ? document.importNode(i, !0) : i.cloneNode(!0);
1694
+ var t = r || Pr ? document.importNode(i, !0) : i.cloneNode(!0);
1695
1695
  if (n) {
1696
1696
  var o = /* @__PURE__ */ zr(t), s = t.lastChild;
1697
1697
  ma(o, s);
@@ -1701,15 +1701,15 @@ function q(e, t) {
1701
1701
  }
1702
1702
  function ha(e = "") {
1703
1703
  if (!E) {
1704
- var t = B(e + "");
1704
+ var t = Rr(e + "");
1705
1705
  return ma(t, t), t;
1706
1706
  }
1707
1707
  var n = D;
1708
- return n.nodeType === 3 ? Kr(n) : (n.before(n = B()), O(n)), ma(n, n), n;
1708
+ return n.nodeType === 3 ? Kr(n) : (n.before(n = Rr()), O(n)), ma(n, n), n;
1709
1709
  }
1710
1710
  function ga() {
1711
1711
  if (E) return ma(D, null), D;
1712
- var e = document.createDocumentFragment(), t = document.createComment(""), n = B();
1712
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = Rr();
1713
1713
  return e.append(t, n), ma(t, n), e;
1714
1714
  }
1715
1715
  function J(e, t) {
@@ -1729,9 +1729,9 @@ function va(e, t) {
1729
1729
  }
1730
1730
  var ya = /* @__PURE__ */ new Map();
1731
1731
  function ba(e, { target: t, anchor: n, props: r = {}, events: i, context: a, intro: o = !0, transformError: s }) {
1732
- Rr();
1732
+ Lr();
1733
1733
  var c = void 0, l = ei(() => {
1734
- var o = n ?? t.appendChild(B());
1734
+ var o = n ?? t.appendChild(Rr());
1735
1735
  Jt(o, { pending: () => {} }, (t) => {
1736
1736
  Et({});
1737
1737
  var n = wt;
@@ -1769,7 +1769,7 @@ function Sa(e, t) {
1769
1769
  return n ? (xa.delete(e), n(t)) : Promise.resolve();
1770
1770
  }
1771
1771
  //#endregion
1772
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/branches.js
1772
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/blocks/branches.js
1773
1773
  var Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta = /* @__PURE__ */ new WeakMap(), Ea = /* @__PURE__ */ new WeakMap(), Da = /* @__PURE__ */ new WeakMap(), Oa = /* @__PURE__ */ new WeakMap(), ka = /* @__PURE__ */ new WeakMap(), Aa = class {
1774
1774
  constructor(e, t = !0) {
1775
1775
  Te(this, "anchor", void 0), j(this, Ca, /* @__PURE__ */ new Map()), j(this, wa, /* @__PURE__ */ new Map()), j(this, Ta, /* @__PURE__ */ new Map()), j(this, Ea, /* @__PURE__ */ new Set()), j(this, Da, !0), j(this, Oa, (e) => {
@@ -1790,7 +1790,7 @@ var Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta =
1790
1790
  let i = () => {
1791
1791
  if (Array.from(P(Ca, this).values()).includes(e)) {
1792
1792
  var t = document.createDocumentFragment();
1793
- gi(r, t), t.append(B()), P(Ta, this).set(e, {
1793
+ gi(r, t), t.append(Rr()), P(Ta, this).set(e, {
1794
1794
  effect: r,
1795
1795
  fragment: t
1796
1796
  });
@@ -1810,7 +1810,7 @@ var Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta =
1810
1810
  var n = L, r = Wr();
1811
1811
  if (t && !P(wa, this).has(e) && !P(Ta, this).has(e)) {
1812
1812
  if (r) {
1813
- var i = document.createDocumentFragment(), a = B();
1813
+ var i = document.createDocumentFragment(), a = Rr();
1814
1814
  i.append(a), P(Ta, this).set(e, {
1815
1815
  effect: oi(() => t(a)),
1816
1816
  fragment: i
@@ -1825,7 +1825,7 @@ var Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta =
1825
1825
  }
1826
1826
  };
1827
1827
  //#endregion
1828
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/if.js
1828
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/blocks/if.js
1829
1829
  function ja(e, t, n = !1) {
1830
1830
  var r;
1831
1831
  E && (r = D, _t());
@@ -1849,7 +1849,7 @@ function ja(e, t, n = !1) {
1849
1849
  }, a);
1850
1850
  }
1851
1851
  //#endregion
1852
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/each.js
1852
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/blocks/each.js
1853
1853
  function Ma(e, t) {
1854
1854
  return t;
1855
1855
  }
@@ -1866,7 +1866,7 @@ function Na(e, t, n) {
1866
1866
  }, !1);
1867
1867
  }
1868
1868
  if (o === 0) {
1869
- var c = r.length === 0 && n !== null;
1869
+ var c = r.length === 0 && n !== null && e.pending.size === 0;
1870
1870
  if (c) {
1871
1871
  var l = n, u = l.parentNode;
1872
1872
  Ur(u), u.append(l), e.items.clear();
@@ -1893,7 +1893,7 @@ function Ia(e, t, n, r, i, a = null) {
1893
1893
  var o = e, s = /* @__PURE__ */ new Map();
1894
1894
  if (t & 4) {
1895
1895
  var c = e;
1896
- o = E ? O(/* @__PURE__ */ zr(c)) : c.appendChild(B());
1896
+ o = E ? O(/* @__PURE__ */ zr(c)) : c.appendChild(Rr());
1897
1897
  }
1898
1898
  E && _t();
1899
1899
  var l = null, u = /* @__PURE__ */ kn(() => {
@@ -1917,9 +1917,9 @@ function Ia(e, t, n, r, i, a = null) {
1917
1917
  for (var g = /* @__PURE__ */ new Set(), _ = L, v = Wr(), y = 0; y < e; y += 1) {
1918
1918
  E && D.nodeType === 8 && D.data === "]" && (o = D, c = !0, gt(!1));
1919
1919
  var b = d[y], ee = r(b, y), x = p ? null : s.get(ee);
1920
- x ? (x.v && Dr(x.v, b), x.i && Dr(x.i, y), v && _.unskip_effect(x.e)) : (x = za(s, p ? o : Fa ?? (Fa = B()), b, ee, y, i, t, n), p || (x.e.f |= Le), s.set(ee, x)), g.add(ee);
1920
+ x ? (x.v && Er(x.v, b), x.i && Er(x.i, y), v && _.unskip_effect(x.e)) : (x = za(s, p ? o : Fa ?? (Fa = Rr()), b, ee, y, i, t, n), p || (x.e.f |= Le), s.set(ee, x)), g.add(ee);
1921
1921
  }
1922
- if (e === 0 && a && !l && (p ? l = oi(() => a(o)) : (l = oi(() => a(Fa ?? (Fa = B()))), l.f |= Le)), e > g.size && $e("", "", ""), E && e > 0 && O(yt()), !p) {
1922
+ if (e === 0 && a && !l && (p ? l = oi(() => a(o)) : (l = oi(() => a(Fa ?? (Fa = Rr()))), l.f |= Le)), e > g.size && $e("", "", ""), E && e > 0 && O(yt()), !p) {
1923
1923
  if (f.set(_, g), v) {
1924
1924
  for (let [e, t] of s) g.has(e) || _.skip_effect(t.e);
1925
1925
  _.oncommit(m), _.ondiscard(h);
@@ -1992,7 +1992,7 @@ function Ra(e, t, n, r, i) {
1992
1992
  });
1993
1993
  }
1994
1994
  function za(e, t, n, r, i, a, o, s) {
1995
- var c = o & 1 ? o & 16 ? wr(n) : /* @__PURE__ */ Er(n, !1, !1) : null, l = o & 2 ? wr(i) : null;
1995
+ var c = o & 1 ? o & 16 ? wr(n) : /* @__PURE__ */ Tr(n, !1, !1) : null, l = o & 2 ? wr(i) : null;
1996
1996
  return {
1997
1997
  v: c,
1998
1998
  i: l,
@@ -2043,7 +2043,7 @@ function Ha(e, t, n = !1, r = !1, i = !1, a = !1) {
2043
2043
  });
2044
2044
  }
2045
2045
  //#endregion
2046
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js
2046
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js
2047
2047
  function Ua(e, t, n, r, i, a) {
2048
2048
  let o = E;
2049
2049
  E && _t();
@@ -2062,7 +2062,7 @@ function Ua(e, t, n, r, i, a) {
2062
2062
  if (s = E ? s : Gr(e, a), ma(s, s), r) {
2063
2063
  var n = null;
2064
2064
  E && ta(e) && s.append(n = document.createComment(""));
2065
- var i = E ? /* @__PURE__ */ zr(s) : s.appendChild(B());
2065
+ var i = E ? /* @__PURE__ */ zr(s) : s.appendChild(Rr());
2066
2066
  E && (i === null ? gt(!1) : O(i)), r(s, i), n?.remove();
2067
2067
  }
2068
2068
  G.nodes.end = s, t.before(s);
@@ -2072,7 +2072,7 @@ function Ua(e, t, n, r, i, a) {
2072
2072
  }, Pe), Zr(() => {}), o && (gt(!0), O(c));
2073
2073
  }
2074
2074
  //#endregion
2075
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/css.js
2075
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/css.js
2076
2076
  function Wa(e, t) {
2077
2077
  ti(() => {
2078
2078
  var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
@@ -2083,7 +2083,7 @@ function Wa(e, t) {
2083
2083
  });
2084
2084
  }
2085
2085
  //#endregion
2086
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/actions.js
2086
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/actions.js
2087
2087
  function Ga(e, t, n) {
2088
2088
  ti(() => {
2089
2089
  var r = Ui(() => t(e, n?.()) || {});
@@ -2098,7 +2098,7 @@ function Ga(e, t, n) {
2098
2098
  });
2099
2099
  }
2100
2100
  //#endregion
2101
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/attachments.js
2101
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/attachments.js
2102
2102
  function Ka(e, t) {
2103
2103
  var n = void 0, r;
2104
2104
  ai(() => {
@@ -2125,7 +2125,7 @@ function Ja() {
2125
2125
  return r;
2126
2126
  }
2127
2127
  //#endregion
2128
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/shared/attributes.js
2128
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/shared/attributes.js
2129
2129
  function Ya(e) {
2130
2130
  return typeof e == "object" ? Ja(e) : e ?? "";
2131
2131
  }
@@ -2184,7 +2184,7 @@ function eo(e, t) {
2184
2184
  return e == null ? null : String(e);
2185
2185
  }
2186
2186
  //#endregion
2187
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/class.js
2187
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/class.js
2188
2188
  function to(e, t, n, r, i, a) {
2189
2189
  var o = e[Ke];
2190
2190
  if (E || o !== n || o === void 0) {
@@ -2197,7 +2197,7 @@ function to(e, t, n, r, i, a) {
2197
2197
  return a;
2198
2198
  }
2199
2199
  //#endregion
2200
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/style.js
2200
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/style.js
2201
2201
  function no(e, t = {}, n, r) {
2202
2202
  for (var i in n) {
2203
2203
  var a = n[i];
@@ -2213,7 +2213,7 @@ function ro(e, t, n, r) {
2213
2213
  return r;
2214
2214
  }
2215
2215
  //#endregion
2216
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/select.js
2216
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/bindings/select.js
2217
2217
  function io(e, t, n = !1) {
2218
2218
  if (e.multiple) {
2219
2219
  if (t == null) return;
@@ -2221,7 +2221,7 @@ function io(e, t, n = !1) {
2221
2221
  for (var r of e.options) r.selected = t.includes(oo(r));
2222
2222
  return;
2223
2223
  }
2224
- for (r of e.options) if (Nr(oo(r), t)) {
2224
+ for (r of e.options) if (Mr(oo(r), t)) {
2225
2225
  r.selected = !0;
2226
2226
  return;
2227
2227
  }
@@ -2244,7 +2244,7 @@ function oo(e) {
2244
2244
  return "__value" in e ? e.__value : e.value;
2245
2245
  }
2246
2246
  //#endregion
2247
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/attributes.js
2247
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/attributes.js
2248
2248
  var so = Symbol("class"), co = Symbol("style"), lo = Symbol("is custom element"), uo = Symbol("is html"), fo = Ze ? "link" : "LINK", po = Ze ? "input" : "INPUT", mo = Ze ? "option" : "OPTION", ho = Ze ? "select" : "SELECT", go = Ze ? "progress" : "PROGRESS";
2249
2249
  function _o(e) {
2250
2250
  if (E) {
@@ -2388,7 +2388,7 @@ function wo(e) {
2388
2388
  return n;
2389
2389
  }
2390
2390
  //#endregion
2391
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
2391
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
2392
2392
  var To, Eo = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakSet(), Ao = class {
2393
2393
  constructor(e) {
2394
2394
  Kt(this, ko), j(this, Eo, /* @__PURE__ */ new WeakMap()), j(this, Do, void 0), j(this, Oo, void 0), N(Oo, this, e);
@@ -2412,7 +2412,7 @@ function jo() {
2412
2412
  }
2413
2413
  Te(Ao, "entries", /* @__PURE__ */ new WeakMap());
2414
2414
  //#endregion
2415
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
2415
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
2416
2416
  function Mo(e, t) {
2417
2417
  return e === t || e?.[He] === t;
2418
2418
  }
@@ -2437,7 +2437,7 @@ function No(e = {}, t, n, r) {
2437
2437
  }), e;
2438
2438
  }
2439
2439
  //#endregion
2440
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/props.js
2440
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/client/reactivity/props.js
2441
2441
  function Po(e, t, n, r) {
2442
2442
  var i = !0, a = !!(n & 8), o = !!(n & 16), s = r, c = !0, l = void 0, u = () => o && i ? (l ?? (l = /* @__PURE__ */ En(r)), K(l)) : (c && (c = !1, s = o ? Ui(r) : r), s);
2443
2443
  let d;
@@ -2466,25 +2466,239 @@ function Po(e, t, n, r) {
2466
2466
  var y = G;
2467
2467
  return (function(e, t) {
2468
2468
  if (arguments.length > 0) {
2469
- let n = t ? K(v) : i && a ? jr(e) : e;
2470
- return z(v, n), _ = !0, s !== void 0 && (s = n), e;
2469
+ let n = t ? K(v) : i && a ? Ar(e) : e;
2470
+ return B(v, n), _ = !0, s !== void 0 && (s = n), e;
2471
2471
  }
2472
2472
  return yi && _ || y.f & 16384 ? v.v : K(v);
2473
2473
  });
2474
2474
  }
2475
+ var Fo, Io = !1, Lo = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakSet();
2476
+ Fo = class extends Date {
2477
+ constructor(...e) {
2478
+ super(...e), Kt(this, Bo), j(this, Lo, /* @__PURE__ */ z(super.getTime())), j(this, Ro, /* @__PURE__ */ new Map()), j(this, zo, W), Io || M(Bo, this, Vo).call(this);
2479
+ }
2480
+ };
2481
+ function Vo() {
2482
+ Io = !0;
2483
+ var e = Fo.prototype, t = Date.prototype, n = Object.getOwnPropertyNames(t);
2484
+ for (let r of n) (r.startsWith("get") || r.startsWith("to") || r === "valueOf") && (e[r] = function(...e) {
2485
+ if (e.length > 0) return K(P(Lo, this)), t[r].apply(this, e);
2486
+ var n = P(Ro, this).get(r);
2487
+ if (n === void 0) {
2488
+ let i = W;
2489
+ Si(P(zo, this)), n = /* @__PURE__ */ I(() => (K(P(Lo, this)), t[r].apply(this, e))), P(Ro, this).set(r, n), Si(i);
2490
+ }
2491
+ return K(n);
2492
+ }), r.startsWith("set") && (e[r] = function(...e) {
2493
+ var n = t[r].apply(this, e);
2494
+ return B(P(Lo, this), t.getTime.call(this)), n;
2495
+ });
2496
+ }
2497
+ //#endregion
2498
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/reactivity/set.js
2499
+ var Ho, Uo, Wo = [
2500
+ "forEach",
2501
+ "isDisjointFrom",
2502
+ "isSubsetOf",
2503
+ "isSupersetOf"
2504
+ ], Go = [
2505
+ "difference",
2506
+ "intersection",
2507
+ "symmetricDifference",
2508
+ "union"
2509
+ ], Ko = !1, qo = /* @__PURE__ */ new WeakMap(), Jo = /* @__PURE__ */ new WeakMap(), Yo = /* @__PURE__ */ new WeakMap(), Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakSet();
2510
+ Uo = Symbol.iterator, Ho = class extends Set {
2511
+ constructor(e) {
2512
+ if (super(), Kt(this, Zo), j(this, qo, /* @__PURE__ */ new Map()), j(this, Jo, /* @__PURE__ */ z(0)), j(this, Yo, /* @__PURE__ */ z(0)), j(this, Xo, Mi || -1), e) {
2513
+ for (var t of e) super.add(t);
2514
+ P(Yo, this).v = super.size;
2515
+ }
2516
+ Ko || M(Zo, this, $o).call(this);
2517
+ }
2518
+ has(e) {
2519
+ var t = super.has(e), n = P(qo, this), r = n.get(e);
2520
+ if (r === void 0) {
2521
+ if (!t) return K(P(Jo, this)), !1;
2522
+ r = M(Zo, this, Qo).call(this, !0), n.set(e, r);
2523
+ }
2524
+ return K(r), t;
2525
+ }
2526
+ add(e) {
2527
+ return super.has(e) || (super.add(e), B(P(Yo, this), super.size), Or(P(Jo, this))), this;
2528
+ }
2529
+ delete(e) {
2530
+ var t = super.delete(e), n = P(qo, this), r = n.get(e);
2531
+ return r !== void 0 && (n.delete(e), B(r, !1)), t && (B(P(Yo, this), super.size), Or(P(Jo, this))), t;
2532
+ }
2533
+ clear() {
2534
+ if (super.size !== 0) {
2535
+ super.clear();
2536
+ var e = P(qo, this);
2537
+ for (var t of e.values()) B(t, !1);
2538
+ e.clear(), B(P(Yo, this), 0), Or(P(Jo, this));
2539
+ }
2540
+ }
2541
+ keys() {
2542
+ return this.values();
2543
+ }
2544
+ values() {
2545
+ return K(P(Jo, this)), super.values();
2546
+ }
2547
+ entries() {
2548
+ return K(P(Jo, this)), super.entries();
2549
+ }
2550
+ [Uo]() {
2551
+ return this.keys();
2552
+ }
2553
+ get size() {
2554
+ return K(P(Yo, this));
2555
+ }
2556
+ };
2557
+ function Qo(e) {
2558
+ return Mi === P(Xo, this) ? /* @__PURE__ */ z(e) : wr(e);
2559
+ }
2560
+ function $o() {
2561
+ Ko = !0;
2562
+ var e = Ho.prototype, t = Set.prototype;
2563
+ for (let n of Wo) e[n] = function(...e) {
2564
+ return K(P(Jo, this)), t[n].apply(this, e);
2565
+ };
2566
+ for (let n of Go) e[n] = function(...e) {
2567
+ K(P(Jo, this));
2568
+ var r = t[n].apply(this, e);
2569
+ return new Ho(r);
2570
+ };
2571
+ }
2572
+ //#endregion
2573
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/getPrototypeOf.js
2574
+ function es(e) {
2575
+ return es = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2576
+ return e.__proto__ || Object.getPrototypeOf(e);
2577
+ }, es(e);
2578
+ }
2579
+ //#endregion
2580
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/superPropBase.js
2581
+ function ts(e, t) {
2582
+ for (; !{}.hasOwnProperty.call(e, t) && (e = es(e)) !== null;);
2583
+ return e;
2584
+ }
2585
+ //#endregion
2586
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/get.js
2587
+ function ns() {
2588
+ return ns = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(e, t, n) {
2589
+ var r = ts(e, t);
2590
+ if (r) {
2591
+ var i = Object.getOwnPropertyDescriptor(r, t);
2592
+ return i.get ? i.get.call(arguments.length < 3 ? e : n) : i.value;
2593
+ }
2594
+ }, ns.apply(null, arguments);
2595
+ }
2596
+ //#endregion
2597
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/superPropGet.js
2598
+ function rs(e, t, n, r) {
2599
+ var i = ns(es(1 & r ? e.prototype : e), t, n);
2600
+ return 2 & r && typeof i == "function" ? function(e) {
2601
+ return i.apply(n, e);
2602
+ } : i;
2603
+ }
2604
+ //#endregion
2605
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/reactivity/map.js
2606
+ var is, as, os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakSet();
2607
+ as = Symbol.iterator, is = class extends Map {
2608
+ constructor(e) {
2609
+ if (super(), Kt(this, us), j(this, os, /* @__PURE__ */ new Map()), j(this, ss, /* @__PURE__ */ z(0)), j(this, cs, /* @__PURE__ */ z(0)), j(this, ls, Mi || -1), e) {
2610
+ for (var [t, n] of e) super.set(t, n);
2611
+ P(cs, this).v = super.size;
2612
+ }
2613
+ }
2614
+ has(e) {
2615
+ var t = P(os, this), n = t.get(e);
2616
+ if (n === void 0) {
2617
+ if (super.has(e)) n = M(us, this, ds).call(this, 0), t.set(e, n);
2618
+ else return K(P(ss, this)), !1;
2619
+ }
2620
+ return K(n), !0;
2621
+ }
2622
+ forEach(e, t) {
2623
+ M(us, this, fs).call(this), super.forEach(e, t);
2624
+ }
2625
+ get(e) {
2626
+ var t = P(os, this), n = t.get(e);
2627
+ if (n === void 0) {
2628
+ if (super.has(e)) n = M(us, this, ds).call(this, 0), t.set(e, n);
2629
+ else {
2630
+ K(P(ss, this));
2631
+ return;
2632
+ }
2633
+ }
2634
+ return K(n), super.get(e);
2635
+ }
2636
+ set(e, t) {
2637
+ var n = P(os, this), r = n.get(e), i = super.get(e), a = super.set(e, t), o = P(ss, this);
2638
+ if (r === void 0) r = M(us, this, ds).call(this, 0), n.set(e, r), B(P(cs, this), super.size), Or(o);
2639
+ else if (i !== t) {
2640
+ Or(r);
2641
+ var s = o.reactions === null ? null : new Set(o.reactions);
2642
+ (s === null || !r.reactions?.every((e) => s.has(e))) && Or(o);
2643
+ }
2644
+ return a;
2645
+ }
2646
+ delete(e) {
2647
+ var t = P(os, this), n = t.get(e), r = super.delete(e);
2648
+ return n !== void 0 && (t.delete(e), B(n, -1)), r && (B(P(cs, this), super.size), Or(P(ss, this))), r;
2649
+ }
2650
+ clear() {
2651
+ if (super.size !== 0) {
2652
+ super.clear();
2653
+ var e = P(os, this);
2654
+ B(P(cs, this), 0);
2655
+ for (var t of e.values()) B(t, -1);
2656
+ Or(P(ss, this)), e.clear();
2657
+ }
2658
+ }
2659
+ keys() {
2660
+ return K(P(ss, this)), super.keys();
2661
+ }
2662
+ values() {
2663
+ return M(us, this, fs).call(this), super.values();
2664
+ }
2665
+ entries() {
2666
+ return M(us, this, fs).call(this), super.entries();
2667
+ }
2668
+ [as]() {
2669
+ return this.entries();
2670
+ }
2671
+ get size() {
2672
+ return K(P(cs, this)), super.size;
2673
+ }
2674
+ };
2675
+ function ds(e) {
2676
+ return Mi === P(ls, this) ? /* @__PURE__ */ z(e) : wr(e);
2677
+ }
2678
+ function fs() {
2679
+ K(P(ss, this));
2680
+ var e = P(os, this);
2681
+ if (P(cs, this).v !== e.size) {
2682
+ for (var t of rs(is.prototype, "keys", this, 2)([])) if (!e.has(t)) {
2683
+ var n = M(us, this, ds).call(this, 0);
2684
+ e.set(t, n);
2685
+ }
2686
+ }
2687
+ for ([, n] of P(os, this)) K(n);
2688
+ }
2475
2689
  //#endregion
2476
- //#region ../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/disclose-version.js
2690
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/disclose-version.js
2477
2691
  if (typeof window < "u") {
2478
- var Fo, Io;
2479
- ((Fo = (Io = window).__svelte ?? (Io.__svelte = {})).v ?? (Fo.v = /* @__PURE__ */ new Set())).add("5");
2692
+ var ps, ms;
2693
+ ((ps = (ms = window).__svelte ?? (ms.__svelte = {})).v ?? (ps.v = /* @__PURE__ */ new Set())).add("5");
2480
2694
  }
2481
2695
  //#endregion
2482
2696
  //#region src/extraction/types.ts
2483
- var Lo = class extends Error {
2697
+ var hs = class extends Error {
2484
2698
  constructor(e, t, n, r) {
2485
2699
  super(e), this.extractorId = t, this.elementType = n, this.cause = r, this.name = "ExtractionError";
2486
2700
  }
2487
- }, Ro = Symbol("registerFrameworkDeliveryFields"), zo = class e {
2701
+ }, gs = Symbol("registerFrameworkDeliveryFields"), _s = class e {
2488
2702
  constructor(e) {
2489
2703
  this.extractorsById = /* @__PURE__ */ new Map(), this.extractorsByType = /* @__PURE__ */ new Map(), this.deliveryFieldsByType = /* @__PURE__ */ new Map(), this.frameworkDeliveryFieldsByType = /* @__PURE__ */ new Map(), this.sealed = !1, this.qti2xMapper = new t(), this.elementNameMapper = e;
2490
2704
  }
@@ -2494,7 +2708,7 @@ var Lo = class extends Error {
2494
2708
  if (!e.elementTypes || e.elementTypes.length === 0) throw Error(`Extractor '${e.id}' must specify at least one element type`);
2495
2709
  if (typeof e.priority != "number") throw Error(`Extractor '${e.id}' must have a numeric priority`);
2496
2710
  if (e.outputType !== void 0 && (typeof e.outputType != "string" || !e.outputType)) throw Error(`Extractor '${e.id}' must have a non-empty outputType`);
2497
- let t = Uo(e);
2711
+ let t = xs(e);
2498
2712
  this.extractorsById.set(t.id, t);
2499
2713
  for (let e of t.elementTypes) {
2500
2714
  let n = this.qti2xMapper.toCanonical(e), r = this.extractorsByType.get(n);
@@ -2533,7 +2747,7 @@ var Lo = class extends Error {
2533
2747
  let t = e.rawTagName || "unknown";
2534
2748
  return {
2535
2749
  success: !1,
2536
- error: new Lo(`No extractor available for element '${t}'. Registered types: ${Array.from(this.extractorsByType.keys()).join(", ")}`, "none", t)
2750
+ error: new hs(`No extractor available for element '${t}'. Registered types: ${Array.from(this.extractorsByType.keys()).join(", ")}`, "none", t)
2537
2751
  };
2538
2752
  }
2539
2753
  try {
@@ -2542,7 +2756,7 @@ var Lo = class extends Error {
2542
2756
  let t = n.validate(r);
2543
2757
  if (!t.valid) return {
2544
2758
  success: !1,
2545
- error: new Lo(`Validation failed for extractor '${n.id}': ${t.errors?.join(", ")}`, n.id, e.rawTagName || "unknown")
2759
+ error: new hs(`Validation failed for extractor '${n.id}': ${t.errors?.join(", ")}`, n.id, e.rawTagName || "unknown")
2546
2760
  };
2547
2761
  if (t.warnings && t.warnings.length > 0) return {
2548
2762
  success: !0,
@@ -2560,7 +2774,7 @@ var Lo = class extends Error {
2560
2774
  let r = e.rawTagName || "unknown";
2561
2775
  return {
2562
2776
  success: !1,
2563
- error: t instanceof Lo ? t : new Lo(`Extraction failed for '${r}': ${t instanceof Error ? t.message : String(t)}`, n.id, r, t instanceof Error ? t : void 0)
2777
+ error: t instanceof hs ? t : new hs(`Extraction failed for '${r}': ${t instanceof Error ? t.message : String(t)}`, n.id, r, t instanceof Error ? t : void 0)
2564
2778
  };
2565
2779
  }
2566
2780
  }
@@ -2575,16 +2789,16 @@ var Lo = class extends Error {
2575
2789
  registerDeliveryFields(e, t) {
2576
2790
  this.assertMutable();
2577
2791
  let n = this.qti2xMapper.toCanonical(e), r = this.deliveryFieldsByType.get(n) ?? [];
2578
- this.deliveryFieldsByType.set(n, Wo([...r, ...t]));
2792
+ this.deliveryFieldsByType.set(n, Ss([...r, ...t]));
2579
2793
  }
2580
- [Ro](e, t) {
2794
+ [gs](e, t) {
2581
2795
  this.assertMutable();
2582
2796
  let n = this.qti2xMapper.toCanonical(e), r = this.frameworkDeliveryFieldsByType.get(n) ?? [];
2583
- this.frameworkDeliveryFieldsByType.set(n, Wo([...r, ...t]));
2797
+ this.frameworkDeliveryFieldsByType.set(n, Ss([...r, ...t]));
2584
2798
  }
2585
2799
  getDeliveryFieldsForType(e) {
2586
2800
  let t = this.qti2xMapper.toCanonical(e);
2587
- return Go(this.deliveryFieldsByType.get(t) ?? Bo, this.frameworkDeliveryFieldsByType.get(t) ?? Bo);
2801
+ return Cs(this.deliveryFieldsByType.get(t) ?? vs, this.frameworkDeliveryFieldsByType.get(t) ?? vs);
2588
2802
  }
2589
2803
  hasExtractor(e) {
2590
2804
  return this.extractorsById.has(e);
@@ -2595,8 +2809,8 @@ var Lo = class extends Error {
2595
2809
  clone() {
2596
2810
  let t = new e(this.elementNameMapper);
2597
2811
  for (let e of this.extractorsById.values()) t.register(e);
2598
- for (let [e, n] of this.deliveryFieldsByType) t.deliveryFieldsByType.set(e, Wo(n));
2599
- for (let [e, n] of this.frameworkDeliveryFieldsByType) t.frameworkDeliveryFieldsByType.set(e, Wo(n));
2812
+ for (let [e, n] of this.deliveryFieldsByType) t.deliveryFieldsByType.set(e, Ss(n));
2813
+ for (let [e, n] of this.frameworkDeliveryFieldsByType) t.frameworkDeliveryFieldsByType.set(e, Ss(n));
2600
2814
  return t;
2601
2815
  }
2602
2816
  seal() {
@@ -2608,15 +2822,15 @@ var Lo = class extends Error {
2608
2822
  assertMutable() {
2609
2823
  if (this.sealed) throw Error("ExtractionRegistry is sealed for this AssessmentItem; create a new definition to change InteractionModules");
2610
2824
  }
2611
- }, Bo = Object.freeze([]);
2612
- function Vo(e) {
2613
- return new zo(e);
2825
+ }, vs = Object.freeze([]);
2826
+ function ys(e) {
2827
+ return new _s(e);
2614
2828
  }
2615
- function Ho(e, t, n) {
2616
- e[Ro](t, n);
2829
+ function bs(e, t, n) {
2830
+ e[gs](t, n);
2617
2831
  }
2618
- function Uo(e) {
2619
- let t = e.delivery ? Object.freeze({ fields: Wo(e.delivery.fields) }) : void 0;
2832
+ function xs(e) {
2833
+ let t = e.delivery ? Object.freeze({ fields: Ss(e.delivery.fields) }) : void 0;
2620
2834
  return Object.freeze({
2621
2835
  id: e.id,
2622
2836
  name: e.name,
@@ -2630,27 +2844,27 @@ function Uo(e) {
2630
2844
  ...e.validate ? { validate: e.validate.bind(e) } : {}
2631
2845
  });
2632
2846
  }
2633
- function Wo(e) {
2847
+ function Ss(e) {
2634
2848
  return Object.freeze(e.map((e) => Object.freeze({
2635
2849
  ...e,
2636
2850
  path: Object.freeze([...e.path])
2637
2851
  })));
2638
2852
  }
2639
- function Go(e, t) {
2640
- if (e.length === 0 && t.length === 0) return Bo;
2853
+ function Cs(e, t) {
2854
+ if (e.length === 0 && t.length === 0) return vs;
2641
2855
  let n = /* @__PURE__ */ new Map();
2642
2856
  for (let r of [...e, ...t]) n.set(JSON.stringify(r.path), r);
2643
- return Wo([...n.values()]);
2857
+ return Ss([...n.values()]);
2644
2858
  }
2645
2859
  //#endregion
2646
2860
  //#region src/extraction/deliveryTypes.ts
2647
- function Ko(...e) {
2861
+ function ws(...e) {
2648
2862
  return {
2649
2863
  kind: "html",
2650
2864
  path: e
2651
2865
  };
2652
2866
  }
2653
- function qo(e, ...t) {
2867
+ function Ts(e, ...t) {
2654
2868
  return {
2655
2869
  kind: "url",
2656
2870
  path: t,
@@ -2659,7 +2873,7 @@ function qo(e, ...t) {
2659
2873
  }
2660
2874
  //#endregion
2661
2875
  //#region src/core/random.ts
2662
- function Jo(e) {
2876
+ function Es(e) {
2663
2877
  let t = e >>> 0;
2664
2878
  return () => {
2665
2879
  t = t + 1831565813 >>> 0;
@@ -2669,15 +2883,15 @@ function Jo(e) {
2669
2883
  }
2670
2884
  //#endregion
2671
2885
  //#region src/core/shuffle.ts
2672
- function Yo(e) {
2886
+ function Ds(e) {
2673
2887
  let t = 2166136261;
2674
2888
  for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
2675
2889
  return t >>> 0;
2676
2890
  }
2677
- function Xo(e, t) {
2678
- return Jo(Yo(`${e}:${t}`));
2891
+ function Os(e, t) {
2892
+ return Es(Ds(`${e}:${t}`));
2679
2893
  }
2680
- function Zo(e, t, n) {
2894
+ function ks(e, t, n) {
2681
2895
  let r = /* @__PURE__ */ new Map(), i = [];
2682
2896
  for (let n = 0; n < e.length; n++) {
2683
2897
  let a = e[n];
@@ -2694,12 +2908,12 @@ function Zo(e, t, n) {
2694
2908
  }
2695
2909
  return a;
2696
2910
  }
2697
- function Qo(e, t, n) {
2698
- return !t || !n || e.length < 2 ? [...e] : Zo(e, (e) => e.fixed === !0, n);
2911
+ function As(e, t, n) {
2912
+ return !t || !n || e.length < 2 ? [...e] : ks(e, (e) => e.fixed === !0, n);
2699
2913
  }
2700
2914
  //#endregion
2701
2915
  //#region src/interactions/associate/extractor.ts
2702
- var $o = {
2916
+ var js = {
2703
2917
  id: "qti:associate-interaction",
2704
2918
  name: "QTI Standard Associate Interaction",
2705
2919
  priority: 10,
@@ -2721,7 +2935,7 @@ var $o = {
2721
2935
  };
2722
2936
  }), i = n.getBooleanAttribute(e, "shuffle"), a = n.getNumberAttribute(e, "maxAssociations", 0), o = n.getNumberAttribute(e, "minAssociations", 0), s = n.getChildrenByTag(e, "prompt"), c = s.length > 0 ? n.getHtmlContent(s[0]) : null;
2723
2937
  return {
2724
- choices: Qo(r, i, t.shuffleRng),
2938
+ choices: As(r, i, t.shuffleRng),
2725
2939
  shuffle: i,
2726
2940
  maxAssociations: a,
2727
2941
  ...o > 0 ? { minAssociations: o } : {},
@@ -2739,7 +2953,7 @@ var $o = {
2739
2953
  errors: t.length > 0 ? t : void 0
2740
2954
  };
2741
2955
  }
2742
- }, es = {
2956
+ }, Ms = {
2743
2957
  id: "qti:choice-interaction",
2744
2958
  name: "QTI Standard Choice Interaction",
2745
2959
  priority: 10,
@@ -2759,7 +2973,7 @@ var $o = {
2759
2973
  };
2760
2974
  }), i = n.querySelector(e, "prompt"), a = i ? n.getHtmlContent(i) : null, o = n.getBooleanAttribute(e, "shuffle"), s = n.getNumberAttribute(e, "maxChoices", 1), c = n.getNumberAttribute(e, "minChoices", 0), l = n.getClasses(e), u = n.getAttribute(e, "data-max-selections-message", "") || null, d = n.getAttribute(e, "data-min-selections-message", "") || null;
2761
2975
  return {
2762
- choices: Qo(r, o, t.shuffleRng),
2976
+ choices: As(r, o, t.shuffleRng),
2763
2977
  shuffle: o,
2764
2978
  maxChoices: s,
2765
2979
  minChoices: c,
@@ -2781,7 +2995,7 @@ var $o = {
2781
2995
  warnings: n.length > 0 ? n : void 0
2782
2996
  };
2783
2997
  }
2784
- }, ts = {
2998
+ }, Ns = {
2785
2999
  id: "qti:custom-interaction",
2786
3000
  name: "QTI Standard Custom Interaction",
2787
3001
  priority: 10,
@@ -2789,7 +3003,7 @@ var $o = {
2789
3003
  description: "Extracts standard QTI customInteraction (custom/portable interactions)",
2790
3004
  canHandle(e, t) {
2791
3005
  let n = e.rawTagName?.toLowerCase() ?? "";
2792
- return n !== "custominteraction" && n !== "qti-custom-interaction" ? !1 : !ns(e);
3006
+ return n !== "custominteraction" && n !== "qti-custom-interaction" ? !1 : !Ps(e);
2793
3007
  },
2794
3008
  extract(e, t) {
2795
3009
  let { utils: n } = t, r = e.outerHTML || e.toString(), i = {};
@@ -2809,7 +3023,7 @@ var $o = {
2809
3023
  };
2810
3024
  }
2811
3025
  };
2812
- function ns(e) {
3026
+ function Ps(e) {
2813
3027
  let t = (e) => {
2814
3028
  for (let n of e.childNodes ?? []) {
2815
3029
  let e = n, r = e.rawTagName?.toLowerCase() ?? "", i = r.includes(":") ? r.slice(r.lastIndexOf(":") + 1) : r;
@@ -2821,29 +3035,29 @@ function ns(e) {
2821
3035
  }
2822
3036
  //#endregion
2823
3037
  //#region src/security/styleValues.ts
2824
- var rs = /^(?:\d+(?:\.\d*)?|\.\d+)$/, is = 1e5;
2825
- function as(e, t) {
3038
+ var Fs = /^(?:\d+(?:\.\d*)?|\.\d+)$/, Is = 1e5;
3039
+ function Ls(e, t) {
2826
3040
  if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? e : null;
2827
3041
  if (typeof e != "string") return null;
2828
3042
  let n = e.trim();
2829
- if (t && n.toLowerCase().endsWith("px") && (n = n.slice(0, -2).trim()), !rs.test(n)) return null;
3043
+ if (t && n.toLowerCase().endsWith("px") && (n = n.slice(0, -2).trim()), !Fs.test(n)) return null;
2830
3044
  let r = Number(n);
2831
- return Number.isFinite(r) && r >= 0 && r <= is ? r : null;
3045
+ return Number.isFinite(r) && r >= 0 && r <= Is ? r : null;
2832
3046
  }
2833
- function os(e) {
2834
- let t = as(e, !0);
3047
+ function Rs(e) {
3048
+ let t = Ls(e, !0);
2835
3049
  return t === null ? null : `${t}px`;
2836
3050
  }
2837
3051
  function X(e, t) {
2838
- let n = as(e, !1);
3052
+ let n = Ls(e, !1);
2839
3053
  if (n !== null && n > 0) return String(n);
2840
3054
  if (t === void 0) return;
2841
- let r = as(t, !1);
3055
+ let r = Ls(t, !1);
2842
3056
  return r !== null && r > 0 ? String(r) : void 0;
2843
3057
  }
2844
3058
  //#endregion
2845
3059
  //#region src/interactions/drawing/extractor.ts
2846
- var ss = {
3060
+ var zs = {
2847
3061
  id: "qti:drawing-interaction",
2848
3062
  name: "QTI Standard Drawing Interaction",
2849
3063
  priority: 10,
@@ -2884,7 +3098,7 @@ var ss = {
2884
3098
  warnings: t.length > 0 ? t : void 0
2885
3099
  };
2886
3100
  }
2887
- }, cs = {
3101
+ }, Bs = {
2888
3102
  id: "qti:end-attempt-interaction",
2889
3103
  name: "QTI Standard End Attempt Interaction",
2890
3104
  priority: 10,
@@ -2909,7 +3123,7 @@ var ss = {
2909
3123
  warnings: n.length > 0 ? n : void 0
2910
3124
  };
2911
3125
  }
2912
- }, ls = {
3126
+ }, Vs = {
2913
3127
  id: "qti:extended-text-interaction",
2914
3128
  name: "QTI Standard Extended Text Interaction",
2915
3129
  priority: 10,
@@ -2954,18 +3168,18 @@ var ss = {
2954
3168
  warnings: n.length > 0 ? n : void 0
2955
3169
  };
2956
3170
  }
2957
- }, us = /<(?:qti-gap|gap)(?=[\s/>])([^>]*)\/?>/gi, ds = /<\/(?:qti-gap|gap)>/gi, fs = /<(?:qti-gap-text|gapText)\b[\s\S]*?<\/(?:qti-gap-text|gapText)>/gi, ps = /<(?:qti-gap-match-interaction|gapMatchInteraction)\b[^>]*>/i, ms = /<\/(?:qti-gap-match-interaction|gapMatchInteraction)>/i, hs = /<(?:qti-prompt|prompt)\b[\s\S]*?<\/(?:qti-prompt|prompt)>/gi;
2958
- function gs(e, t) {
3171
+ }, Hs = /<(?:qti-gap|gap)(?=[\s/>])([^>]*)\/?>/gi, Us = /<\/(?:qti-gap|gap)>/gi, Ws = /<(?:qti-gap-text|gapText)\b[\s\S]*?<\/(?:qti-gap-text|gapText)>/gi, Gs = /<(?:qti-gap-match-interaction|gapMatchInteraction)\b[^>]*>/i, Ks = /<\/(?:qti-gap-match-interaction|gapMatchInteraction)>/i, qs = /<(?:qti-prompt|prompt)\b[\s\S]*?<\/(?:qti-prompt|prompt)>/gi;
3172
+ function Js(e, t) {
2959
3173
  let n = RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(e);
2960
3174
  return (n?.[1] ?? n?.[2] ?? "").trim();
2961
3175
  }
2962
- function _s(e) {
2963
- return e.replace(ps, "").replace(ms, "").replace(hs, "").replace(fs, "").replace(us, (e, t) => {
2964
- let n = gs(t, "identifier");
3176
+ function Ys(e) {
3177
+ return e.replace(Gs, "").replace(Ks, "").replace(qs, "").replace(Ws, "").replace(Hs, (e, t) => {
3178
+ let n = Js(t, "identifier");
2965
3179
  return n ? `[GAP:${n}]` : "";
2966
- }).replace(ds, "").trim();
3180
+ }).replace(Us, "").trim();
2967
3181
  }
2968
- var vs = {
3182
+ var Xs = {
2969
3183
  id: "qti:gap-match-interaction",
2970
3184
  name: "QTI Standard Gap Match Interaction",
2971
3185
  priority: 10,
@@ -2991,22 +3205,22 @@ var vs = {
2991
3205
  a = n.getHtmlContent(e);
2992
3206
  let t = n.getChildrenByTag(e, "gap");
2993
3207
  for (let e of t) s.push(n.getAttribute(e, "identifier", ""));
2994
- o = a.replace(us, (e, t) => {
2995
- let n = gs(t, "identifier");
3208
+ o = a.replace(Hs, (e, t) => {
3209
+ let n = Js(t, "identifier");
2996
3210
  return n ? `[GAP:${n}]` : "";
2997
- }).replace(ds, "").trim();
3211
+ }).replace(Us, "").trim();
2998
3212
  }
2999
3213
  if (s.length === 0) {
3000
- let t = n.getHtmlContent(e), r = Array.from(t.matchAll(us));
3214
+ let t = n.getHtmlContent(e), r = Array.from(t.matchAll(Hs));
3001
3215
  for (let e of r) {
3002
- let t = gs(e[1] ?? "", "identifier");
3216
+ let t = Js(e[1] ?? "", "identifier");
3003
3217
  t && s.push(t);
3004
3218
  }
3005
- s.length > 0 && (!o || !o.includes("[GAP:")) && (o = _s(t));
3219
+ s.length > 0 && (!o || !o.includes("[GAP:")) && (o = Ys(t));
3006
3220
  }
3007
- let c = n.getBooleanAttribute(e, "shuffle"), l = n.getClasses(e), u = os(n.getAttribute(e, "data-choices-container-width", "")), d = n.getAttribute(e, "data-max-selections-message", "") || null, f = n.getAttribute(e, "data-min-selections-message", "") || null;
3221
+ let c = n.getBooleanAttribute(e, "shuffle"), l = n.getClasses(e), u = Rs(n.getAttribute(e, "data-choices-container-width", "")), d = n.getAttribute(e, "data-max-selections-message", "") || null, f = n.getAttribute(e, "data-min-selections-message", "") || null;
3008
3222
  return {
3009
- gapTexts: Qo(r, c, t.shuffleRng),
3223
+ gapTexts: As(r, c, t.shuffleRng),
3010
3224
  gaps: s,
3011
3225
  shuffle: c,
3012
3226
  prompt: a,
@@ -3032,7 +3246,7 @@ var vs = {
3032
3246
  errors: t.length > 0 ? t : void 0
3033
3247
  };
3034
3248
  }
3035
- }, ys = {
3249
+ }, Zs = {
3036
3250
  id: "qti:graphic-associate-interaction",
3037
3251
  name: "QTI Standard Graphic Associate Interaction",
3038
3252
  priority: 10,
@@ -3090,7 +3304,7 @@ var vs = {
3090
3304
  warnings: n.length > 0 ? n : void 0
3091
3305
  };
3092
3306
  }
3093
- }, bs = {
3307
+ }, Qs = {
3094
3308
  id: "qti:graphic-gap-match-interaction",
3095
3309
  name: "QTI Standard Graphic Gap Match Interaction",
3096
3310
  priority: 10,
@@ -3155,7 +3369,7 @@ var vs = {
3155
3369
  shape: n.getAttribute(e, "shape", "rect"),
3156
3370
  coords: n.getAttribute(e, "coords", ""),
3157
3371
  matchMax: n.getNumberAttribute(e, "matchMax", 1)
3158
- })), l = n.getChildrenByTag(e, "prompt"), u = l.length > 0 ? n.getHtmlContent(l[0]) : null, d = n.getClasses(e), f = os(n.getAttribute(e, "data-choices-container-width", "")), p = n.getAttribute(e, "data-max-selections-message", "") || null, m = n.getAttribute(e, "data-min-selections-message", "") || null;
3372
+ })), l = n.getChildrenByTag(e, "prompt"), u = l.length > 0 ? n.getHtmlContent(l[0]) : null, d = n.getClasses(e), f = Rs(n.getAttribute(e, "data-choices-container-width", "")), p = n.getAttribute(e, "data-max-selections-message", "") || null, m = n.getAttribute(e, "data-min-selections-message", "") || null;
3159
3373
  return {
3160
3374
  imageData: i,
3161
3375
  maxAssociations: a,
@@ -3185,7 +3399,7 @@ var vs = {
3185
3399
  warnings: n.length > 0 ? n : void 0
3186
3400
  };
3187
3401
  }
3188
- }, xs = {
3402
+ }, $s = {
3189
3403
  id: "qti:graphic-order-interaction",
3190
3404
  name: "QTI Standard Graphic Order Interaction",
3191
3405
  priority: 10,
@@ -3239,7 +3453,7 @@ var vs = {
3239
3453
  warnings: n.length > 0 ? n : void 0
3240
3454
  };
3241
3455
  }
3242
- }, Ss = {
3456
+ }, ec = {
3243
3457
  id: "qti:hotspot-interaction",
3244
3458
  name: "QTI Standard Hotspot Interaction",
3245
3459
  priority: 10,
@@ -3306,41 +3520,41 @@ var vs = {
3306
3520
  warnings: n.length > 0 ? n : void 0
3307
3521
  };
3308
3522
  }
3309
- }, Cs = {
3523
+ }, tc = {
3310
3524
  rejectDoctype: !0,
3311
3525
  maxItemXmlBytes: 1e7,
3312
3526
  maxHtmlBytes: 5e6,
3313
3527
  maxHtmlNodes: 2e5,
3314
3528
  maxHtmlDepth: 200
3315
3529
  };
3316
- function ws(e) {
3530
+ function nc(e) {
3317
3531
  let t = globalThis.TextEncoder;
3318
3532
  return t ? new t().encode(e).byteLength : e.length * 2;
3319
3533
  }
3320
- function Ts(e) {
3534
+ function rc(e) {
3321
3535
  let t = e?.parsingLimits;
3322
3536
  return t?.enabled === !0 ? {
3323
3537
  enabled: !0,
3324
- rejectDoctype: t?.rejectDoctype ?? Cs.rejectDoctype,
3325
- maxItemXmlBytes: t?.maxItemXmlBytes ?? Cs.maxItemXmlBytes,
3326
- maxHtmlBytes: t?.maxHtmlBytes ?? Cs.maxHtmlBytes,
3327
- maxHtmlNodes: t?.maxHtmlNodes ?? Cs.maxHtmlNodes,
3328
- maxHtmlDepth: t?.maxHtmlDepth ?? Cs.maxHtmlDepth
3538
+ rejectDoctype: t?.rejectDoctype ?? tc.rejectDoctype,
3539
+ maxItemXmlBytes: t?.maxItemXmlBytes ?? tc.maxItemXmlBytes,
3540
+ maxHtmlBytes: t?.maxHtmlBytes ?? tc.maxHtmlBytes,
3541
+ maxHtmlNodes: t?.maxHtmlNodes ?? tc.maxHtmlNodes,
3542
+ maxHtmlDepth: t?.maxHtmlDepth ?? tc.maxHtmlDepth
3329
3543
  } : {
3330
3544
  enabled: !1,
3331
- ...Cs
3545
+ ...tc
3332
3546
  };
3333
3547
  }
3334
- function Es(e, t) {
3335
- let n = Ts(t);
3548
+ function ic(e, t) {
3549
+ let n = rc(t);
3336
3550
  if (!n.enabled) return;
3337
- let r = ws(String(e ?? ""));
3551
+ let r = nc(String(e ?? ""));
3338
3552
  if (r > n.maxItemXmlBytes) throw Error(`itemXml exceeds maxItemXmlBytes (${r} > ${n.maxItemXmlBytes})`);
3339
3553
  if (n.rejectDoctype && /<!\s*doctype/i.test(e)) throw Error("itemXml contains <!DOCTYPE>, which is rejected by parsingLimits");
3340
3554
  }
3341
3555
  //#endregion
3342
3556
  //#region src/core/urlPolicy.ts
3343
- var Ds = {
3557
+ var ac = {
3344
3558
  allowHttps: !0,
3345
3559
  allowHttp: !1,
3346
3560
  allowProtocolRelative: !1,
@@ -3349,21 +3563,21 @@ var Ds = {
3349
3563
  allowBlobImages: !1,
3350
3564
  allowBlobMedia: !1
3351
3565
  };
3352
- function Os(e) {
3566
+ function oc(e) {
3353
3567
  return {
3354
- ...Ds,
3568
+ ...ac,
3355
3569
  ...e ?? {}
3356
3570
  };
3357
3571
  }
3358
- function ks(e) {
3572
+ function sc(e) {
3359
3573
  let t = e.toLowerCase().trim();
3360
3574
  return t.startsWith("javascript:") || t.startsWith("vbscript:") || t.startsWith("data:text/html");
3361
3575
  }
3362
- function As(e, t) {
3576
+ function cc(e, t) {
3363
3577
  let n = t.allowedHosts;
3364
3578
  return !n || n.length === 0 || n.includes(e);
3365
3579
  }
3366
- function js(e, t) {
3580
+ function lc(e, t) {
3367
3581
  let n;
3368
3582
  try {
3369
3583
  n = new URL(e);
@@ -3371,86 +3585,86 @@ function js(e, t) {
3371
3585
  return null;
3372
3586
  }
3373
3587
  let r = n.protocol.toLowerCase();
3374
- return r === "https:" && !t.allowHttps || r === "http:" && !t.allowHttp || r !== "https:" && r !== "http:" || !As(n.hostname, t) ? null : n.toString();
3588
+ return r === "https:" && !t.allowHttps || r === "http:" && !t.allowHttp || r !== "https:" && r !== "http:" || !cc(n.hostname, t) ? null : n.toString();
3375
3589
  }
3376
- function Ms(e, t, n) {
3590
+ function uc(e, t, n) {
3377
3591
  let r = e.toLowerCase().trim();
3378
3592
  return !r.startsWith("data:") || t !== "img" || !n.allowDataImages || !r.startsWith("data:image/") || !n.allowSvgDataImages && r.startsWith("data:image/svg+xml") ? null : e.trim();
3379
3593
  }
3380
- function Ns(e, t, n = "any") {
3381
- let r = Os(t), i = String(e ?? "").trim();
3594
+ function dc(e, t, n = "any") {
3595
+ let r = oc(t), i = String(e ?? "").trim();
3382
3596
  if (!i) return null;
3383
- let a = c(i), o = Fs(a), s = Ps(a).trim();
3384
- if (!o || !s || ks(o)) return null;
3385
- let l = Ms(o, n, r);
3597
+ let a = c(i), o = pc(a), s = fc(a).trim();
3598
+ if (!o || !s || sc(o)) return null;
3599
+ let l = uc(o, n, r);
3386
3600
  if (l) return l;
3387
3601
  if (o.toLowerCase().startsWith("data:")) return null;
3388
- if (/^[\\/]{2}/.test(s)) return r.allowProtocolRelative ? js(`https:${s.replace(/\\/g, "/")}`, r) : null;
3602
+ if (/^[\\/]{2}/.test(s)) return r.allowProtocolRelative ? lc(`https:${s.replace(/\\/g, "/")}`, r) : null;
3389
3603
  if (o.toLowerCase().startsWith("blob:")) return n === "img" && r.allowBlobImages || n === "media" && r.allowBlobMedia ? o : null;
3390
3604
  let u = /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(o);
3391
3605
  if (s.startsWith("/") || s.startsWith("./") || s.startsWith("../") || !u) {
3392
3606
  if (r.assetBaseUrl) try {
3393
3607
  let e = s.startsWith("/") ? s.slice(1) : s;
3394
- return js(new URL(e, r.assetBaseUrl).toString(), r);
3608
+ return lc(new URL(e, r.assetBaseUrl).toString(), r);
3395
3609
  } catch {
3396
3610
  return null;
3397
3611
  }
3398
3612
  return s;
3399
3613
  }
3400
- return js(o, r);
3614
+ return lc(o, r);
3401
3615
  }
3402
- function Ps(e) {
3403
- return Array.from(e).filter((e) => !Is(e)).join("");
3616
+ function fc(e) {
3617
+ return Array.from(e).filter((e) => !mc(e)).join("");
3404
3618
  }
3405
- function Fs(e) {
3406
- return Array.from(e).filter((e) => !Is(e) && !/\s/.test(e)).join("");
3619
+ function pc(e) {
3620
+ return Array.from(e).filter((e) => !mc(e) && !/\s/.test(e)).join("");
3407
3621
  }
3408
- function Is(e) {
3622
+ function mc(e) {
3409
3623
  let t = e.charCodeAt(0);
3410
3624
  return t <= 31 || t === 127;
3411
3625
  }
3412
3626
  //#endregion
3413
3627
  //#region src/core/sanitizer.ts
3414
- var Ls = class extends Error {
3628
+ var hc = class extends Error {
3415
3629
  constructor(e) {
3416
3630
  super(e);
3417
3631
  }
3418
3632
  };
3419
- function Rs(e) {
3633
+ function gc(e) {
3420
3634
  return e?.security?.urlPolicy;
3421
3635
  }
3422
- function zs(e) {
3636
+ function _c(e) {
3423
3637
  return e?.security?.allowObjectEmbeds === !0;
3424
3638
  }
3425
- function Bs(e) {
3639
+ function vc(e) {
3426
3640
  return e?.security?.allowIframes === !0;
3427
3641
  }
3428
- function Vs(e) {
3642
+ function yc(e) {
3429
3643
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3430
3644
  }
3431
- function Hs(e, t) {
3645
+ function bc(e, t) {
3432
3646
  let n = e.getAttribute(t);
3433
- return n ? ` ${t}="${Vs(n)}"` : "";
3647
+ return n ? ` ${t}="${yc(n)}"` : "";
3434
3648
  }
3435
- function Us(e, t, n) {
3436
- let r = Rs(t), i = Ns(e, r, n);
3649
+ function xc(e, t, n) {
3650
+ let r = gc(t), i = dc(e, r, n);
3437
3651
  if (!i) return null;
3438
3652
  if (!t?.sanitizeUrl) return i;
3439
3653
  let a = t.sanitizeUrl(i, n);
3440
- return a ? Ns(a, r, n) : null;
3654
+ return a ? dc(a, r, n) : null;
3441
3655
  }
3442
- function Ws(e, t, n) {
3443
- return Us(e, t, n) ?? "#";
3656
+ function Sc(e, t, n) {
3657
+ return xc(e, t, n) ?? "#";
3444
3658
  }
3445
- function Gs(e, t) {
3659
+ function Cc(e, t) {
3446
3660
  let n = [];
3447
3661
  for (let r of f(e)) {
3448
- let e = Us(r.url, t, "img");
3662
+ let e = xc(r.url, t, "img");
3449
3663
  e && n.push([e, r.descriptors].filter(Boolean).join(" "));
3450
3664
  }
3451
3665
  return n.join(", ");
3452
3666
  }
3453
- function Ks(e) {
3667
+ function wc(e) {
3454
3668
  if (l(e)) return !0;
3455
3669
  let t = u(e);
3456
3670
  for (let e of t.matchAll(/(?:^|;)position:([^;]*)/gi)) {
@@ -3459,13 +3673,13 @@ function Ks(e) {
3459
3673
  }
3460
3674
  return !1;
3461
3675
  }
3462
- var qs = new r();
3463
- function Js(e) {
3676
+ var Tc = new r();
3677
+ function Ec(e) {
3464
3678
  if (!e.startsWith("qti-")) return !1;
3465
- let t = qs.toCanonical(e);
3466
- return qs.toNative(t) === e;
3679
+ let t = Tc.toCanonical(e);
3680
+ return Tc.toNative(t) === e;
3467
3681
  }
3468
- var Ys = /* @__PURE__ */ new Set([
3682
+ var Dc = /* @__PURE__ */ new Set([
3469
3683
  "clip-path",
3470
3684
  "color-profile",
3471
3685
  "cursor",
@@ -3477,7 +3691,7 @@ var Ys = /* @__PURE__ */ new Set([
3477
3691
  "marker-start",
3478
3692
  "mask",
3479
3693
  "stroke"
3480
- ]), Xs = /* @__PURE__ */ new Set([
3694
+ ]), Oc = /* @__PURE__ */ new Set([
3481
3695
  "animate",
3482
3696
  "animatecolor",
3483
3697
  "animatemotion",
@@ -3485,7 +3699,7 @@ var Ys = /* @__PURE__ */ new Set([
3485
3699
  "discard",
3486
3700
  "set"
3487
3701
  ]);
3488
- function Zs(e) {
3702
+ function kc(e) {
3489
3703
  let t = u(e);
3490
3704
  if (!/url\(/i.test(t)) return !1;
3491
3705
  let n = !1, r = !1, i = t.replace(/url\(([^)]*)\)/gi, (e, t) => {
@@ -3495,7 +3709,7 @@ function Zs(e) {
3495
3709
  });
3496
3710
  return r || !n || /url\(/i.test(i);
3497
3711
  }
3498
- function Qs(e) {
3712
+ function Ac(e) {
3499
3713
  let t = e.parentNode;
3500
3714
  for (; t;) {
3501
3715
  if (t.rawTagName?.toLowerCase() === "svg") return !0;
@@ -3503,35 +3717,35 @@ function Qs(e) {
3503
3717
  }
3504
3718
  return !1;
3505
3719
  }
3506
- function $s(e, t, n, r) {
3720
+ function jc(e, t, n, r) {
3507
3721
  let i = [...e.childNodes];
3508
- for (let e of i) e.rawTagName && ec(e, t, n, r + 1);
3722
+ for (let e of i) e.rawTagName && Mc(e, t, n, r + 1);
3509
3723
  e.replaceWith(...e.childNodes);
3510
3724
  }
3511
- function ec(e, t, n, r) {
3725
+ function Mc(e, t, n, r) {
3512
3726
  if (n.enabled) {
3513
- if (r > n.maxDepth) throw new Ls(`HTML depth exceeds maxHtmlDepth (${r} > ${n.maxDepth})`);
3514
- if (n.nodes++, n.nodes > n.maxNodes) throw new Ls(`HTML node count exceeds maxHtmlNodes (${n.nodes} > ${n.maxNodes})`);
3727
+ if (r > n.maxDepth) throw new hc(`HTML depth exceeds maxHtmlDepth (${r} > ${n.maxDepth})`);
3728
+ if (n.nodes++, n.nodes > n.maxNodes) throw new hc(`HTML node count exceeds maxHtmlNodes (${n.nodes} > ${n.maxNodes})`);
3515
3729
  }
3516
3730
  let i = e.rawTagName?.toLowerCase();
3517
3731
  if (i === "script") {
3518
3732
  e.remove();
3519
3733
  return;
3520
3734
  }
3521
- if (i && Xs.has(i)) {
3522
- if (Qs(e)) {
3735
+ if (i && Oc.has(i)) {
3736
+ if (Ac(e)) {
3523
3737
  e.remove();
3524
3738
  return;
3525
3739
  }
3526
- $s(e, t, n, r);
3740
+ jc(e, t, n, r);
3527
3741
  return;
3528
3742
  }
3529
- if (i === "iframe" && !Bs(t)) {
3743
+ if (i === "iframe" && !vc(t)) {
3530
3744
  e.remove();
3531
3745
  return;
3532
3746
  }
3533
- if ((i === "object" || i === "embed") && !zs(t)) {
3534
- let n = rc(e, t);
3747
+ if ((i === "object" || i === "embed") && !_c(t)) {
3748
+ let n = Fc(e, t);
3535
3749
  if (n) {
3536
3750
  e.replaceWith(n);
3537
3751
  return;
@@ -3543,8 +3757,8 @@ function ec(e, t, n, r) {
3543
3757
  e.remove();
3544
3758
  return;
3545
3759
  }
3546
- if (i?.includes("-") && !Js(i)) {
3547
- $s(e, t, n, r);
3760
+ if (i?.includes("-") && !Ec(i)) {
3761
+ jc(e, t, n, r);
3548
3762
  return;
3549
3763
  }
3550
3764
  let a = e.attributes || {};
@@ -3564,37 +3778,37 @@ function ec(e, t, n, r) {
3564
3778
  e.removeAttribute(n);
3565
3779
  continue;
3566
3780
  }
3567
- if (r === "style" && Ks(a)) {
3781
+ if (r === "style" && wc(a)) {
3568
3782
  e.removeAttribute(n);
3569
3783
  continue;
3570
3784
  }
3571
3785
  if (r === "srcset") {
3572
- let r = Gs(a, t);
3786
+ let r = Cc(a, t);
3573
3787
  r ? r !== a && e.setAttribute(n, r) : e.removeAttribute(n);
3574
3788
  continue;
3575
3789
  }
3576
- if (Ys.has(r) && Zs(a)) {
3790
+ if (Dc.has(r) && kc(a)) {
3577
3791
  e.removeAttribute(n);
3578
3792
  continue;
3579
3793
  }
3580
3794
  if (r === "background") {
3581
- let r = Us(a, t, "img");
3795
+ let r = xc(a, t, "img");
3582
3796
  r ? r !== a && e.setAttribute(n, r) : e.removeAttribute(n);
3583
3797
  continue;
3584
3798
  }
3585
3799
  if (r === "href" || r === "xlink:href" || r === "src" || r === "data" || r === "action" || r === "formaction" || r === "poster") {
3586
- let r = Ws(a, t, i === "img" ? "img" : i === "audio" || i === "video" || i === "source" ? "media" : i === "object" || i === "embed" ? "object" : i === "a" ? "link" : "any");
3800
+ let r = Sc(a, t, i === "img" ? "img" : i === "audio" || i === "video" || i === "source" ? "media" : i === "object" || i === "embed" ? "object" : i === "a" ? "link" : "any");
3587
3801
  r !== a && e.setAttribute(n, r);
3588
3802
  }
3589
3803
  }
3590
3804
  }
3591
3805
  let o = e.childNodes.filter((e) => e.rawTagName);
3592
- for (let e of o) ec(e, t, n, r + 1);
3806
+ for (let e of o) Mc(e, t, n, r + 1);
3593
3807
  }
3594
- function tc(e, t) {
3808
+ function Nc(e, t) {
3595
3809
  if (!e || typeof e != "string") return "";
3596
3810
  try {
3597
- let n = Ts(t?.security);
3811
+ let n = rc(t?.security);
3598
3812
  if (n.enabled) {
3599
3813
  let t = globalThis.TextEncoder;
3600
3814
  if ((t ? new t().encode(e).byteLength : e.length * 2) > n.maxHtmlBytes) return "";
@@ -3605,41 +3819,41 @@ function tc(e, t) {
3605
3819
  maxNodes: n.maxHtmlNodes,
3606
3820
  maxDepth: n.maxHtmlDepth
3607
3821
  };
3608
- for (let e of i) ec(e, t, a, 1);
3822
+ for (let e of i) Mc(e, t, a, 1);
3609
3823
  return r.toString();
3610
3824
  } catch (e) {
3611
- return e instanceof Ls || console.error("HTML sanitization failed:", e), "";
3825
+ return e instanceof hc || console.error("HTML sanitization failed:", e), "";
3612
3826
  }
3613
3827
  }
3614
- function nc(e, t) {
3615
- return !e || typeof e != "string" ? "" : /<[^>]+>/.test(e) ? tc(e, t) : e;
3828
+ function Pc(e, t) {
3829
+ return !e || typeof e != "string" ? "" : /<[^>]+>/.test(e) ? Nc(e, t) : e;
3616
3830
  }
3617
- function rc(e, t) {
3831
+ function Fc(e, t) {
3618
3832
  if (e.rawTagName?.toLowerCase() !== "object") return null;
3619
3833
  let n = e.getAttribute("type")?.trim().toLowerCase() ?? "", r = e.getAttribute("data")?.trim() ?? "";
3620
3834
  if (!n || !r) return null;
3621
- let i = `${Hs(e, "width")}${Hs(e, "height")}`, a = Hs(e, "class"), o = Hs(e, "id");
3835
+ let i = `${bc(e, "width")}${bc(e, "height")}`, a = bc(e, "class"), o = bc(e, "id");
3622
3836
  if (n.startsWith("image/")) {
3623
- let n = Us(r, t, "img");
3837
+ let n = xc(r, t, "img");
3624
3838
  if (!n) return null;
3625
3839
  let s = e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent?.trim() ?? "";
3626
- return `<img src="${Vs(n)}" alt="${Vs(s)}"${i}${a}${o}>`;
3840
+ return `<img src="${yc(n)}" alt="${yc(s)}"${i}${a}${o}>`;
3627
3841
  }
3628
3842
  if (n.startsWith("audio/")) {
3629
- let e = Us(r, t, "media");
3630
- return e ? `<audio controls${a}${o}><source src="${Vs(e)}" type="${Vs(n)}"></audio>` : null;
3843
+ let e = xc(r, t, "media");
3844
+ return e ? `<audio controls${a}${o}><source src="${yc(e)}" type="${yc(n)}"></audio>` : null;
3631
3845
  }
3632
3846
  if (n.startsWith("video/")) {
3633
- let s = Us(r, t, "media");
3847
+ let s = xc(r, t, "media");
3634
3848
  if (!s) return null;
3635
- let c = e.getAttribute("poster")?.trim() ?? "", l = c ? Us(c, t, "img") : null;
3636
- return `<video controls${i}${a}${o}${l ? ` poster="${Vs(l)}"` : ""}><source src="${Vs(s)}" type="${Vs(n)}"></video>`;
3849
+ let c = e.getAttribute("poster")?.trim() ?? "", l = c ? xc(c, t, "img") : null;
3850
+ return `<video controls${i}${a}${o}${l ? ` poster="${yc(l)}"` : ""}><source src="${yc(s)}" type="${yc(n)}"></video>`;
3637
3851
  }
3638
3852
  return null;
3639
3853
  }
3640
3854
  //#endregion
3641
3855
  //#region src/interactions/hottext/extractor.ts
3642
- var ic = {
3856
+ var Ic = {
3643
3857
  id: "qti:hottext-interaction",
3644
3858
  name: "QTI Standard Hottext Interaction",
3645
3859
  priority: 10,
@@ -3662,7 +3876,7 @@ var ic = {
3662
3876
  };
3663
3877
  }), a = n.getNumberAttribute(e, "maxChoices", 1), o = n.getNumberAttribute(e, "minChoices", 0), s = n.getClasses(e), c = n.getAttribute(e, "data-max-selections-message", "") || null, l = n.getAttribute(e, "data-min-selections-message", "") || null, u = n.getChildrenByTag(e, "prompt"), d = u.length > 0 ? n.getHtmlContent(u[0]) : null, f = "";
3664
3878
  for (let t of e.childNodes) typeof t != "string" && t.rawTagName !== "prompt" && t.rawTagName !== "qti-prompt" ? f += t.outerHTML || t.toString() : typeof t == "string" && (f += t);
3665
- return f = tc(f, { security: t.config.security }), {
3879
+ return f = Nc(f, { security: t.config.security }), {
3666
3880
  hottextChoices: i,
3667
3881
  contentHtml: f,
3668
3882
  maxChoices: a,
@@ -3685,7 +3899,7 @@ var ic = {
3685
3899
  warnings: n.length > 0 ? n : void 0
3686
3900
  };
3687
3901
  }
3688
- }, ac = {
3902
+ }, Lc = {
3689
3903
  id: "qti:inline-choice-interaction",
3690
3904
  name: "QTI Standard Inline Choice Interaction",
3691
3905
  priority: 10,
@@ -3704,7 +3918,7 @@ var ic = {
3704
3918
  };
3705
3919
  }), i = n.getChildrenByTag(e, "label"), a = i.length > 0 ? n.getTextContent(i[0]) : null, o = n.getAttribute(e, "data-prompt", "") || null, s = n.getBooleanAttribute(e, "shuffle"), c = n.getClasses(e);
3706
3920
  return {
3707
- choices: Qo(r, s, t.shuffleRng),
3921
+ choices: As(r, s, t.shuffleRng),
3708
3922
  shuffle: s,
3709
3923
  label: a,
3710
3924
  ...o ? { dataPrompt: o } : {},
@@ -3724,7 +3938,7 @@ var ic = {
3724
3938
  warnings: n.length > 0 ? n : void 0
3725
3939
  };
3726
3940
  }
3727
- }, oc = {
3941
+ }, Rc = {
3728
3942
  id: "qti:match-interaction",
3729
3943
  name: "QTI Standard Match Interaction",
3730
3944
  priority: 10,
@@ -3776,8 +3990,8 @@ var ic = {
3776
3990
  }
3777
3991
  let s = n.getBooleanAttribute(e, "shuffle"), c = n.getNumberAttribute(e, "maxAssociations", 1), l = n.getNumberAttribute(e, "minAssociations", 0), u = l > 0 ? l : void 0, d = n.getClasses(e), f = n.getAttribute(e, "data-qti-max-selections-message", "") || null, p = n.getAttribute(e, "data-qti-min-selections-message", "") || null, m = n.getAttribute(e, "data-qti-first-column-header", "") || null, h = n.getChildrenByTag(e, "prompt"), g = h.length > 0 ? n.getHtmlContent(h[0]) : null;
3778
3992
  return {
3779
- sourceSet: Qo(a, s, t.shuffleRng),
3780
- targetSet: Qo(o, s, t.shuffleRng),
3993
+ sourceSet: As(a, s, t.shuffleRng),
3994
+ targetSet: As(o, s, t.shuffleRng),
3781
3995
  shuffle: s,
3782
3996
  maxAssociations: c,
3783
3997
  ...u === void 0 ? {} : { minAssociations: u },
@@ -3803,7 +4017,7 @@ var ic = {
3803
4017
  errors: t.length > 0 ? t : void 0
3804
4018
  };
3805
4019
  }
3806
- }, sc = {
4020
+ }, zc = {
3807
4021
  id: "qti:media-interaction",
3808
4022
  name: "QTI Standard Media Interaction",
3809
4023
  priority: 10,
@@ -3868,7 +4082,7 @@ var ic = {
3868
4082
  warnings: n.length > 0 ? n : void 0
3869
4083
  };
3870
4084
  }
3871
- }, cc = {
4085
+ }, Bc = {
3872
4086
  id: "qti:order-interaction",
3873
4087
  name: "QTI Standard Order Interaction",
3874
4088
  priority: 10,
@@ -3888,7 +4102,7 @@ var ic = {
3888
4102
  };
3889
4103
  }), i = n.querySelector(e, "prompt"), a = i ? n.getHtmlContent(i) : null, o = n.getBooleanAttribute(e, "shuffle"), s = n.getAttribute(e, "orientation", "vertical"), c = n.getNumberAttribute(e, "minChoices", 0), l = n.getNumberAttribute(e, "maxChoices", 0);
3890
4104
  return {
3891
- choices: Qo(r, o, t.shuffleRng),
4105
+ choices: As(r, o, t.shuffleRng),
3892
4106
  shuffle: o,
3893
4107
  orientation: s,
3894
4108
  minChoices: c,
@@ -3915,7 +4129,7 @@ var ic = {
3915
4129
  };
3916
4130
  //#endregion
3917
4131
  //#region src/interactions/position-object/extractor.ts
3918
- function lc(e, t, n, r) {
4132
+ function Vc(e, t, n, r) {
3919
4133
  if (!e) return null;
3920
4134
  let i = t.getAttribute(e, "type", ""), a = t.getAttribute(e, "data", ""), o = X(t.getAttribute(e, "width", ""), n), s = X(t.getAttribute(e, "height", ""), r), c = t.getHtmlContent(e);
3921
4135
  return i.startsWith("image/svg") && /<svg[\s>]/i.test(c) ? {
@@ -3930,7 +4144,7 @@ function lc(e, t, n, r) {
3930
4144
  height: s
3931
4145
  };
3932
4146
  }
3933
- var uc = {
4147
+ var Hc = {
3934
4148
  id: "qti:position-object-interaction",
3935
4149
  name: "QTI Standard Position Object Interaction",
3936
4150
  priority: 10,
@@ -3941,7 +4155,7 @@ var uc = {
3941
4155
  return t === "positionobjectinteraction" || t === "qti-position-object-interaction";
3942
4156
  },
3943
4157
  extract(e, t) {
3944
- let { utils: n, responseId: r } = t, i = e.parentNode, a = i?.rawTagName?.toLowerCase(), o = i && (a === "positionobjectstage" || a === "qti-position-object-stage") && n.getChildrenByTag(i, "positionObjectInteraction").includes(e) ? i : void 0, s = o ? n.getChildrenByTag(o, "object")[0] : void 0, c = n.getChildrenByTag(e, "object")[0], l = lc(s, n, "500", "300"), u = lc(c, n, "50", "50"), d = n.getNumberAttribute(e, "maxChoices", 1), f = n.getNumberAttribute(e, "minChoices", 0), p = n.getTextContent(c).trim() || r, m = n.getClasses(e), h = n.getPrompt(e);
4158
+ let { utils: n, responseId: r } = t, i = e.parentNode, a = i?.rawTagName?.toLowerCase(), o = i && (a === "positionobjectstage" || a === "qti-position-object-stage") && n.getChildrenByTag(i, "positionObjectInteraction").includes(e) ? i : void 0, s = o ? n.getChildrenByTag(o, "object")[0] : void 0, c = n.getChildrenByTag(e, "object")[0], l = Vc(s, n, "500", "300"), u = Vc(c, n, "50", "50"), d = n.getNumberAttribute(e, "maxChoices", 1), f = n.getNumberAttribute(e, "minChoices", 0), p = n.getTextContent(c).trim() || r, m = n.getClasses(e), h = n.getPrompt(e);
3945
4159
  return {
3946
4160
  imageData: l,
3947
4161
  positionObjectStages: [{
@@ -3967,7 +4181,7 @@ var uc = {
3967
4181
  warnings: n.length > 0 ? n : void 0
3968
4182
  };
3969
4183
  }
3970
- }, dc = {
4184
+ }, Uc = {
3971
4185
  id: "qti:portable-custom-interaction",
3972
4186
  name: "QTI Portable Custom Interaction",
3973
4187
  outputType: "portableCustomInteraction",
@@ -3979,29 +4193,29 @@ var uc = {
3979
4193
  ],
3980
4194
  description: "Extracts QTI 2.x/3.0 portable custom interaction module paths, markup, and config",
3981
4195
  canHandle(e, t) {
3982
- let n = fc(e);
3983
- return n === "portablecustominteraction" || n === "qti-portable-custom-interaction" || n === "custominteraction" && pc(e, ["portablecustominteraction"]) !== null;
4196
+ let n = Wc(e);
4197
+ return n === "portablecustominteraction" || n === "qti-portable-custom-interaction" || n === "custominteraction" && Gc(e, ["portablecustominteraction"]) !== null;
3984
4198
  },
3985
4199
  extract(e, t) {
3986
- let { utils: n } = t, r = fc(e) === "custominteraction" ? pc(e, ["portablecustominteraction"]) : e;
4200
+ let { utils: n } = t, r = Wc(e) === "custominteraction" ? Gc(e, ["portablecustominteraction"]) : e;
3987
4201
  if (!r) throw Error("customInteraction does not contain a portableCustomInteraction payload");
3988
- let i = n.getAttribute(e, "responseIdentifier") || n.getAttribute(e, "response-identifier") || t.responseId || "", a = n.getAttribute(r, "customInteractionTypeIdentifier") || n.getAttribute(r, "custom-interaction-type-identifier") || n.getAttribute(r, "customInteractionIdentifierType") || n.getAttribute(r, "custom-interaction-identifier-type") || "", o = "", s, c = pc(r, ["interactionmodules", "qti-interaction-modules"]);
4202
+ let i = n.getAttribute(e, "responseIdentifier") || n.getAttribute(e, "response-identifier") || t.responseId || "", a = n.getAttribute(r, "customInteractionTypeIdentifier") || n.getAttribute(r, "custom-interaction-type-identifier") || n.getAttribute(r, "customInteractionIdentifierType") || n.getAttribute(r, "custom-interaction-identifier-type") || "", o = "", s, c = Gc(r, ["interactionmodules", "qti-interaction-modules"]);
3989
4203
  if (c) {
3990
- let e = pc(c, ["interactionmodule", "qti-interaction-module"]);
4204
+ let e = Gc(c, ["interactionmodule", "qti-interaction-module"]);
3991
4205
  if (e) {
3992
4206
  o = n.getAttribute(e, "primaryPath") || n.getAttribute(e, "primary-path") || "";
3993
4207
  let t = n.getAttribute(e, "fallbackPath") || n.getAttribute(e, "fallback-path") || "";
3994
4208
  t && (s = t);
3995
4209
  }
3996
4210
  }
3997
- let l = pc(r, ["instance"]);
4211
+ let l = Gc(r, ["instance"]);
3998
4212
  if (!o && l) {
3999
- let e = mc(l, ["script"]).find((e) => !!n.getAttribute(e, "src"));
4213
+ let e = Kc(l, ["script"]).find((e) => !!n.getAttribute(e, "src"));
4000
4214
  o = e ? n.getAttribute(e, "src") : "";
4001
4215
  }
4002
- let u = pc(r, ["interactionmarkup", "qti-interaction-markup"]) ?? l, d = u ? n.getHtmlContent(u) : "", f = {}, p = pc(r, ["pciproperties", "qti-pci-properties"]);
4216
+ let u = Gc(r, ["interactionmarkup", "qti-interaction-markup"]) ?? l, d = u ? n.getHtmlContent(u) : "", f = {}, p = Gc(r, ["pciproperties", "qti-pci-properties"]);
4003
4217
  if (p) {
4004
- let e = mc(p, ["pciproperty", "qti-pci-property"]);
4218
+ let e = Kc(p, ["pciproperty", "qti-pci-property"]);
4005
4219
  for (let t of e) {
4006
4220
  let e = n.getAttribute(t, "key") || n.getAttribute(t, "name") || "", r = n.getAttribute(t, "value") || (t.textContent ?? "").trim() || "";
4007
4221
  e && (f[e] = r);
@@ -4025,25 +4239,25 @@ var uc = {
4025
4239
  };
4026
4240
  }
4027
4241
  };
4028
- function fc(e) {
4242
+ function Wc(e) {
4029
4243
  let t = e.rawTagName?.toLowerCase() ?? "";
4030
4244
  return t.includes(":") ? t.slice(t.lastIndexOf(":") + 1) : t;
4031
4245
  }
4032
- function pc(e, t) {
4033
- return mc(e, t)[0] ?? null;
4246
+ function Gc(e, t) {
4247
+ return Kc(e, t)[0] ?? null;
4034
4248
  }
4035
- function mc(e, t) {
4249
+ function Kc(e, t) {
4036
4250
  let n = new Set(t.map((e) => e.toLowerCase())), r = [], i = (e) => {
4037
4251
  for (let t of e.childNodes ?? []) {
4038
4252
  let e = t;
4039
- e.rawTagName && (n.has(fc(e)) && r.push(e), i(e));
4253
+ e.rawTagName && (n.has(Wc(e)) && r.push(e), i(e));
4040
4254
  }
4041
4255
  };
4042
4256
  return i(e), r;
4043
4257
  }
4044
4258
  //#endregion
4045
4259
  //#region src/interactions/select-point/extractor.ts
4046
- var hc = {
4260
+ var qc = {
4047
4261
  id: "qti:select-point-interaction",
4048
4262
  name: "QTI Standard Select Point Interaction",
4049
4263
  priority: 10,
@@ -4092,7 +4306,7 @@ var hc = {
4092
4306
  warnings: n.length > 0 ? n : void 0
4093
4307
  };
4094
4308
  }
4095
- }, gc = {
4309
+ }, Jc = {
4096
4310
  id: "qti:slider-interaction",
4097
4311
  name: "QTI Standard Slider Interaction",
4098
4312
  priority: 10,
@@ -4123,7 +4337,7 @@ var hc = {
4123
4337
  warnings: n.length > 0 ? n : void 0
4124
4338
  };
4125
4339
  }
4126
- }, _c = {
4340
+ }, Yc = {
4127
4341
  id: "qti:text-entry-interaction",
4128
4342
  name: "QTI Standard Text Entry Interaction",
4129
4343
  priority: 10,
@@ -4151,7 +4365,7 @@ var hc = {
4151
4365
  warnings: n.length > 0 ? n : void 0
4152
4366
  };
4153
4367
  }
4154
- }, vc = {
4368
+ }, Xc = {
4155
4369
  id: "qti:upload-interaction",
4156
4370
  name: "QTI Standard Upload Interaction",
4157
4371
  priority: 10,
@@ -4182,172 +4396,172 @@ var hc = {
4182
4396
  warnings: t.length > 0 ? t : void 0
4183
4397
  };
4184
4398
  }
4185
- }, Z = Ko("prompt"), yc = [Ko("imageData", "content"), qo("img", "imageData", "src")], bc = Dc([
4399
+ }, Z = ws("prompt"), Zc = [ws("imageData", "content"), Ts("img", "imageData", "src")], Qc = al([
4186
4400
  {
4187
4401
  type: "choiceInteraction",
4188
- extractor: es,
4402
+ extractor: Ms,
4189
4403
  placement: "block",
4190
- delivery: [Z, Ko("choices", "*", "text")]
4404
+ delivery: [Z, ws("choices", "*", "text")]
4191
4405
  },
4192
4406
  {
4193
4407
  type: "textEntryInteraction",
4194
- extractor: _c,
4408
+ extractor: Yc,
4195
4409
  placement: "inline",
4196
4410
  delivery: []
4197
4411
  },
4198
4412
  {
4199
4413
  type: "extendedTextInteraction",
4200
- extractor: ls,
4414
+ extractor: Vs,
4201
4415
  placement: "block",
4202
4416
  delivery: [Z]
4203
4417
  },
4204
4418
  {
4205
4419
  type: "inlineChoiceInteraction",
4206
- extractor: ac,
4420
+ extractor: Lc,
4207
4421
  placement: "inline",
4208
4422
  delivery: []
4209
4423
  },
4210
4424
  {
4211
4425
  type: "orderInteraction",
4212
- extractor: cc,
4426
+ extractor: Bc,
4213
4427
  placement: "block",
4214
- delivery: [Z, Ko("choices", "*", "text")]
4428
+ delivery: [Z, ws("choices", "*", "text")]
4215
4429
  },
4216
4430
  {
4217
4431
  type: "matchInteraction",
4218
- extractor: oc,
4432
+ extractor: Rc,
4219
4433
  placement: "block",
4220
4434
  delivery: [
4221
4435
  Z,
4222
- Ko("sourceSet", "*", "text"),
4223
- Ko("targetSet", "*", "text")
4436
+ ws("sourceSet", "*", "text"),
4437
+ ws("targetSet", "*", "text")
4224
4438
  ]
4225
4439
  },
4226
4440
  {
4227
4441
  type: "associateInteraction",
4228
- extractor: $o,
4442
+ extractor: js,
4229
4443
  placement: "block",
4230
- delivery: [Z, Ko("choices", "*", "text")]
4444
+ delivery: [Z, ws("choices", "*", "text")]
4231
4445
  },
4232
4446
  {
4233
4447
  type: "gapMatchInteraction",
4234
- extractor: vs,
4448
+ extractor: Xs,
4235
4449
  placement: "block",
4236
- delivery: [Z, Ko("promptText")]
4450
+ delivery: [Z, ws("promptText")]
4237
4451
  },
4238
4452
  {
4239
4453
  type: "sliderInteraction",
4240
- extractor: gc,
4454
+ extractor: Jc,
4241
4455
  placement: "block",
4242
4456
  delivery: [Z]
4243
4457
  },
4244
4458
  {
4245
4459
  type: "hotspotInteraction",
4246
- extractor: Ss,
4460
+ extractor: ec,
4247
4461
  placement: "block",
4248
- delivery: [Z, ...yc]
4462
+ delivery: [Z, ...Zc]
4249
4463
  },
4250
4464
  {
4251
4465
  type: "graphicGapMatchInteraction",
4252
- extractor: bs,
4466
+ extractor: Qs,
4253
4467
  placement: "block",
4254
4468
  delivery: [
4255
4469
  Z,
4256
- ...yc,
4257
- qo("img", "gapImages", "*", "src")
4470
+ ...Zc,
4471
+ Ts("img", "gapImages", "*", "src")
4258
4472
  ]
4259
4473
  },
4260
4474
  {
4261
4475
  type: "uploadInteraction",
4262
- extractor: vc,
4476
+ extractor: Xc,
4263
4477
  placement: "block",
4264
4478
  delivery: [Z]
4265
4479
  },
4266
4480
  {
4267
4481
  type: "drawingInteraction",
4268
- extractor: ss,
4482
+ extractor: zs,
4269
4483
  placement: "block",
4270
- delivery: [Z, ...yc]
4484
+ delivery: [Z, ...Zc]
4271
4485
  },
4272
4486
  {
4273
4487
  type: "customInteraction",
4274
- extractor: ts,
4488
+ extractor: Ns,
4275
4489
  placement: "block",
4276
4490
  delivery: [Z]
4277
4491
  },
4278
4492
  {
4279
4493
  type: "portableCustomInteraction",
4280
- extractor: dc,
4494
+ extractor: Uc,
4281
4495
  placement: "block",
4282
- delivery: [Ko("markup")]
4496
+ delivery: [ws("markup")]
4283
4497
  },
4284
4498
  {
4285
4499
  type: "mediaInteraction",
4286
- extractor: sc,
4500
+ extractor: zc,
4287
4501
  placement: "block",
4288
- delivery: [Z, qo("media-or-object", "mediaElement", "src")]
4502
+ delivery: [Z, Ts("media-or-object", "mediaElement", "src")]
4289
4503
  },
4290
4504
  {
4291
4505
  type: "hottextInteraction",
4292
- extractor: ic,
4506
+ extractor: Ic,
4293
4507
  placement: "block",
4294
- delivery: [Z, Ko("contentHtml")]
4508
+ delivery: [Z, ws("contentHtml")]
4295
4509
  },
4296
4510
  {
4297
4511
  type: "selectPointInteraction",
4298
- extractor: hc,
4512
+ extractor: qc,
4299
4513
  placement: "block",
4300
- delivery: [Z, ...yc]
4514
+ delivery: [Z, ...Zc]
4301
4515
  },
4302
4516
  {
4303
4517
  type: "graphicOrderInteraction",
4304
- extractor: xs,
4518
+ extractor: $s,
4305
4519
  placement: "block",
4306
- delivery: [Z, ...yc]
4520
+ delivery: [Z, ...Zc]
4307
4521
  },
4308
4522
  {
4309
4523
  type: "graphicAssociateInteraction",
4310
- extractor: ys,
4524
+ extractor: Zs,
4311
4525
  placement: "block",
4312
- delivery: [Z, ...yc]
4526
+ delivery: [Z, ...Zc]
4313
4527
  },
4314
4528
  {
4315
4529
  type: "positionObjectInteraction",
4316
- extractor: uc,
4530
+ extractor: Hc,
4317
4531
  placement: "block",
4318
4532
  delivery: [
4319
4533
  Z,
4320
- ...yc,
4321
- Ko("positionObjectStages", "*", "objectData", "content"),
4322
- qo("img", "positionObjectStages", "*", "objectData", "src")
4534
+ ...Zc,
4535
+ ws("positionObjectStages", "*", "objectData", "content"),
4536
+ Ts("img", "positionObjectStages", "*", "objectData", "src")
4323
4537
  ]
4324
4538
  },
4325
4539
  {
4326
4540
  type: "endAttemptInteraction",
4327
- extractor: cs,
4541
+ extractor: Bs,
4328
4542
  placement: "block",
4329
4543
  delivery: [Z]
4330
4544
  }
4331
4545
  ]);
4332
- function xc() {
4333
- return bc;
4546
+ function $c() {
4547
+ return Qc;
4334
4548
  }
4335
- var Sc = new Map(bc.map((e) => [e.type.toLowerCase(), e.type]));
4336
- function Cc(e) {
4549
+ var el = new Map(Qc.map((e) => [e.type.toLowerCase(), e.type]));
4550
+ function tl(e) {
4337
4551
  let t = e.toLowerCase();
4338
- return t.startsWith("qti-") ? t.slice(4).replace(/-([a-z])/g, (e, t) => t.toUpperCase()) : Sc.get(t) ?? e;
4552
+ return t.startsWith("qti-") ? t.slice(4).replace(/-([a-z])/g, (e, t) => t.toUpperCase()) : el.get(t) ?? e;
4339
4553
  }
4340
- function wc(e) {
4341
- let t = Cc(e);
4342
- return bc.find((e) => e.type === t) ?? null;
4554
+ function nl(e) {
4555
+ let t = tl(e);
4556
+ return Qc.find((e) => e.type === t) ?? null;
4343
4557
  }
4344
- function Tc(e) {
4345
- return wc(e)?.placement === "inline";
4558
+ function rl(e) {
4559
+ return nl(e)?.placement === "inline";
4346
4560
  }
4347
- function Ec(e) {
4348
- return Tc(Cc(e));
4561
+ function il(e) {
4562
+ return rl(tl(e));
4349
4563
  }
4350
- function Dc(e) {
4564
+ function al(e) {
4351
4565
  return Object.freeze(e.map((e) => Object.freeze({
4352
4566
  ...e,
4353
4567
  delivery: Object.freeze(e.delivery.map((e) => Object.freeze({
@@ -4358,7 +4572,7 @@ function Dc(e) {
4358
4572
  }
4359
4573
  //#endregion
4360
4574
  //#region src/core/ComponentRegistry.ts
4361
- var Oc = {
4575
+ var ol = {
4362
4576
  choiceInteraction: {
4363
4577
  name: "default-choice",
4364
4578
  tagName: "pie-qti-choice"
@@ -4443,7 +4657,7 @@ var Oc = {
4443
4657
  name: "default-catalog-popup",
4444
4658
  tagName: "pie-qti-catalog-popup"
4445
4659
  }
4446
- }, kc = class {
4660
+ }, sl = class {
4447
4661
  constructor() {
4448
4662
  this.components = /* @__PURE__ */ new Map(), this.definedElements = /* @__PURE__ */ new Set(), this.sealed = !1;
4449
4663
  }
@@ -4502,12 +4716,12 @@ var Oc = {
4502
4716
  if (this.sealed) throw Error("ComponentRegistry is sealed for this AssessmentItem; create a new definition to change renderers");
4503
4717
  }
4504
4718
  };
4505
- function Ac() {
4506
- let e = new kc();
4507
- return jc(e), e;
4719
+ function cl() {
4720
+ let e = new sl();
4721
+ return ll(e), e;
4508
4722
  }
4509
- function jc(e) {
4510
- for (let [t, n] of Object.entries(Oc)) e.register(t, {
4723
+ function ll(e) {
4724
+ for (let [t, n] of Object.entries(ol)) e.register(t, {
4511
4725
  ...n,
4512
4726
  description: `Default web component tag for ${t}`,
4513
4727
  priority: -100
@@ -4515,9 +4729,9 @@ function jc(e) {
4515
4729
  }
4516
4730
  //#endregion
4517
4731
  //#region src/document/AssessmentItemDocument.ts
4518
- var Mc = class {
4732
+ var ul = class {
4519
4733
  constructor({ itemXml: e, elementNameMapper: t, attributeNameMapper: n, security: r }) {
4520
- this.itemXml = e, this.security = r, this.mathMlPrefixes = Ic(e), this.elementNameMapper = t, this.attributeNameMapper = n, Es(this.itemXml, this.security), this.xmlDocument = ne(this.itemXml), this.assessmentItem = x(this.xmlDocument), this.extractionSource = this.serializeItemBodyForExtraction();
4734
+ this.itemXml = e, this.security = r, this.mathMlPrefixes = ml(e), this.elementNameMapper = t, this.attributeNameMapper = n, ic(this.itemXml, this.security), this.xmlDocument = ne(this.itemXml), this.assessmentItem = x(this.xmlDocument), this.extractionSource = this.serializeItemBodyForExtraction();
4521
4735
  }
4522
4736
  detectVersion() {
4523
4737
  let e = this.assessmentItem.namespaceURI;
@@ -4605,7 +4819,7 @@ var Mc = class {
4605
4819
  return e.getAttribute(this.attributeNameMapper.toNative(t));
4606
4820
  }
4607
4821
  serializeChildren(e) {
4608
- return Lc(Fc(this.serializeChildNodes(e)), this.mathMlPrefixes);
4822
+ return hl(pl(this.serializeChildNodes(e)), this.mathMlPrefixes);
4609
4823
  }
4610
4824
  findExtractionElements(e) {
4611
4825
  let t = this.createExtractionRoot();
@@ -4619,7 +4833,7 @@ var Mc = class {
4619
4833
  element: e,
4620
4834
  contextRoot: t,
4621
4835
  responseIdentifier: a,
4622
- normalizedType: Cc(i)
4836
+ normalizedType: tl(i)
4623
4837
  });
4624
4838
  }), r;
4625
4839
  }
@@ -4650,7 +4864,7 @@ var Mc = class {
4650
4864
  walkExtractionChildren(e, t) {
4651
4865
  for (let n of e.childNodes ?? []) {
4652
4866
  let e = n;
4653
- e.rawTagName && (Nc(e.rawTagName) || (t(e), this.walkExtractionChildren(e, t)));
4867
+ e.rawTagName && (dl(e.rawTagName) || (t(e), this.walkExtractionChildren(e, t)));
4654
4868
  }
4655
4869
  }
4656
4870
  getExtractionResponseIdentifier(e) {
@@ -4658,17 +4872,17 @@ var Mc = class {
4658
4872
  return e.getAttribute?.("responseIdentifier") || e.getAttribute?.(t) || e.getAttribute?.("response-identifier") || e.getAttribute?.("responseidentifier") || "";
4659
4873
  }
4660
4874
  };
4661
- function Nc(e) {
4875
+ function dl(e) {
4662
4876
  let t = e.toLowerCase();
4663
4877
  return t === "rubricblock" || t === "qti-rubric-block";
4664
4878
  }
4665
- function Pc(e) {
4666
- return new Mc(e);
4879
+ function fl(e) {
4880
+ return new ul(e);
4667
4881
  }
4668
- function Fc(e) {
4882
+ function pl(e) {
4669
4883
  return e.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, (e, t) => t);
4670
4884
  }
4671
- function Ic(e) {
4885
+ function ml(e) {
4672
4886
  let t = /* @__PURE__ */ new Set();
4673
4887
  for (let n of e.matchAll(/\sxmlns:([A-Za-z_][\w.-]*)=(["'])http:\/\/www\.w3\.org\/1998\/Math\/MathML\2/g)) {
4674
4888
  let e = n[1];
@@ -4676,26 +4890,26 @@ function Ic(e) {
4676
4890
  }
4677
4891
  return t;
4678
4892
  }
4679
- function Lc(e, t) {
4893
+ function hl(e, t) {
4680
4894
  let n = e;
4681
4895
  for (let e of t) {
4682
- let t = Rc(e);
4896
+ let t = gl(e);
4683
4897
  n = n.replace(RegExp(`(<\\/?)${t}:([A-Za-z][\\w.-]*)(?=[\\s>/])`, "g"), "$1$2").replace(RegExp(`\\sxmlns:${t}=(["'])http:\\/\\/www\\.w3\\.org\\/1998\\/Math\\/MathML\\1`, "g"), "");
4684
4898
  }
4685
4899
  return n;
4686
4900
  }
4687
- function Rc(e) {
4901
+ function gl(e) {
4688
4902
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4689
4903
  }
4690
4904
  //#endregion
4691
4905
  //#region src/extraction/utils.ts
4692
- function zc(e) {
4906
+ function _l(e) {
4693
4907
  return e?.textContent?.trim() || "";
4694
4908
  }
4695
- function Bc(e, t, n) {
4696
- return e?.childNodes ? e.childNodes.filter((e) => Gc(e.rawTagName, t, n)) : [];
4909
+ function vl(e, t, n) {
4910
+ return e?.childNodes ? e.childNodes.filter((e) => Cl(e.rawTagName, t, n)) : [];
4697
4911
  }
4698
- function Vc(e, t, n = !1, r) {
4912
+ function yl(e, t, n = !1, r) {
4699
4913
  let i = e.getAttribute(t);
4700
4914
  if (i == null && r) {
4701
4915
  let n = r.toNative(t);
@@ -4703,7 +4917,7 @@ function Vc(e, t, n = !1, r) {
4703
4917
  }
4704
4918
  return i == null ? n : i === "true";
4705
4919
  }
4706
- function Hc(e, t, n, r) {
4920
+ function bl(e, t, n, r) {
4707
4921
  let i = e.getAttribute(t);
4708
4922
  if (i == null && r) {
4709
4923
  let n = r.toNative(t);
@@ -4711,7 +4925,7 @@ function Hc(e, t, n, r) {
4711
4925
  }
4712
4926
  return i ? Number(i) : n;
4713
4927
  }
4714
- function Uc(e, t, n = "", r) {
4928
+ function xl(e, t, n = "", r) {
4715
4929
  let i = e.getAttribute(t);
4716
4930
  if (i == null && r) {
4717
4931
  let n = r.toNative(t);
@@ -4719,29 +4933,29 @@ function Uc(e, t, n = "", r) {
4719
4933
  }
4720
4934
  return i || n;
4721
4935
  }
4722
- function Wc(e) {
4936
+ function Sl(e) {
4723
4937
  let t = e.getAttribute("class");
4724
4938
  return t ? t.split(/\s+/).filter(Boolean) : [];
4725
4939
  }
4726
- function Gc(e, t, n) {
4940
+ function Cl(e, t, n) {
4727
4941
  if (!e) return !1;
4728
4942
  let r = t.toLowerCase(), i = n.toNative(r);
4729
4943
  return e.toLowerCase() === i.toLowerCase();
4730
4944
  }
4731
- function Kc(n, r, i) {
4945
+ function wl(n, r, i) {
4732
4946
  let a = r || new t(), o = i || new e();
4733
4947
  return {
4734
4948
  matchesTag(e, t) {
4735
- return Gc(e.rawTagName, t, a);
4949
+ return Cl(e.rawTagName, t, a);
4736
4950
  },
4737
4951
  getChildrenByTag(e, t) {
4738
- return Bc(e, t, a);
4952
+ return vl(e, t, a);
4739
4953
  },
4740
4954
  querySelectorAll(e, t) {
4741
4955
  let n = t.split(/\s+/), r = [e];
4742
4956
  for (let e of n) {
4743
4957
  let t = [];
4744
- for (let n of r) if (Gc(n.rawTagName, e, a) && t.push(n), n.childNodes) for (let r of n.childNodes) typeof r != "string" && Gc(r.rawTagName, e, a) && t.push(r);
4958
+ for (let n of r) if (Cl(n.rawTagName, e, a) && t.push(n), n.childNodes) for (let r of n.childNodes) typeof r != "string" && Cl(r.rawTagName, e, a) && t.push(r);
4745
4959
  r = t;
4746
4960
  }
4747
4961
  return r;
@@ -4752,69 +4966,69 @@ function Kc(n, r, i) {
4752
4966
  },
4753
4967
  hasChildWithTag(e, t) {
4754
4968
  if (!e.childNodes) return !1;
4755
- for (let n of e.childNodes) if (typeof n != "string" && Gc(n.rawTagName, t, a)) return !0;
4969
+ for (let n of e.childNodes) if (typeof n != "string" && Cl(n.rawTagName, t, a)) return !0;
4756
4970
  return !1;
4757
4971
  },
4758
4972
  getHtmlContent(e) {
4759
- return nc(e?.innerHTML?.trim() || "", { security: n });
4973
+ return Pc(e?.innerHTML?.trim() || "", { security: n });
4760
4974
  },
4761
4975
  getTextContent(e) {
4762
- return zc(e);
4976
+ return _l(e);
4763
4977
  },
4764
4978
  getAttribute(e, t, n = "") {
4765
- return Uc(e, t, n, o);
4979
+ return xl(e, t, n, o);
4766
4980
  },
4767
4981
  getBooleanAttribute(e, t, n = !1) {
4768
- return Vc(e, t, n, o);
4982
+ return yl(e, t, n, o);
4769
4983
  },
4770
4984
  getNumberAttribute(e, t, n = 0) {
4771
- return Hc(e, t, n, o);
4985
+ return bl(e, t, n, o);
4772
4986
  },
4773
4987
  getPrompt(e) {
4774
- let t = Bc(e, "prompt", a)[0];
4988
+ let t = vl(e, "prompt", a)[0];
4775
4989
  return t ? this.getHtmlContent(t) : null;
4776
4990
  },
4777
4991
  getClasses(e) {
4778
- return Wc(e);
4992
+ return Sl(e);
4779
4993
  }
4780
4994
  };
4781
4995
  }
4782
4996
  //#endregion
4783
4997
  //#region src/extraction/createContext.ts
4784
- function qc(e, t, n, r, i, a) {
4998
+ function Tl(e, t, n, r, i, a) {
4785
4999
  let o = i.elementNameMapper, s = i.attributeNameMapper;
4786
5000
  return {
4787
5001
  element: e,
4788
5002
  responseId: t,
4789
5003
  dom: n,
4790
5004
  declarations: r,
4791
- utils: Kc(i.security, o, s),
5005
+ utils: wl(i.security, o, s),
4792
5006
  config: i,
4793
- ...a ? { shuffleRng: Xo(a, t) } : {}
5007
+ ...a ? { shuffleRng: Os(a, t) } : {}
4794
5008
  };
4795
5009
  }
4796
5010
  //#endregion
4797
5011
  //#region src/core/trustedTypes.ts
4798
- function Jc() {
5012
+ function El() {
4799
5013
  return globalThis.trustedTypes;
4800
5014
  }
4801
- var Yc = /* @__PURE__ */ new Map();
4802
- function Xc(e) {
4803
- let t = Yc.get(e);
5015
+ var Dl = /* @__PURE__ */ new Map();
5016
+ function Ol(e) {
5017
+ let t = Dl.get(e);
4804
5018
  if (t) return t;
4805
- let n = Jc();
5019
+ let n = El();
4806
5020
  if (!n?.createPolicy) return null;
4807
5021
  try {
4808
5022
  let t = n.createPolicy(e, { createHTML: (e) => e });
4809
- return t?.createHTML ? (Yc.set(e, t), t) : null;
5023
+ return t?.createHTML ? (Dl.set(e, t), t) : null;
4810
5024
  } catch {
4811
5025
  return null;
4812
5026
  }
4813
5027
  }
4814
- function Zc(e, t) {
5028
+ function kl(e, t) {
4815
5029
  if (!t) return e;
4816
5030
  if (!e) return "";
4817
- let n = Xc(t);
5031
+ let n = Ol(t);
4818
5032
  if (!n) return e;
4819
5033
  try {
4820
5034
  return n.createHTML(e);
@@ -4822,28 +5036,28 @@ function Zc(e, t) {
4822
5036
  return e;
4823
5037
  }
4824
5038
  }
4825
- function Qc(e) {
5039
+ function Al(e) {
4826
5040
  return typeof e == "string" ? e : String(e);
4827
5041
  }
4828
5042
  //#endregion
4829
5043
  //#region src/extraction/interactionSecurity.ts
4830
- function $c(e, t, n, r = e.type) {
4831
- let i = rl(e);
4832
- for (let e of t) el(i, e.path, (t, a, o) => {
5044
+ function jl(e, t, n, r = e.type) {
5045
+ let i = Fl(e);
5046
+ for (let e of t) Ml(i, e.path, (t, a, o) => {
4833
5047
  if (e.kind === "html") {
4834
- nl(a, o, Zc(tc(typeof t == "string" ? t : "", { security: n }), n?.trustedTypesPolicyName));
5048
+ Pl(a, o, kl(Nc(typeof t == "string" ? t : "", { security: n }), n?.trustedTypesPolicyName));
4835
5049
  return;
4836
5050
  }
4837
5051
  if (typeof t != "string") {
4838
- nl(a, o, "");
5052
+ Pl(a, o, "");
4839
5053
  return;
4840
5054
  }
4841
- let s = tl(e.use, i, r);
4842
- nl(a, o, Ns(t, n?.urlPolicy, s) ?? "");
5055
+ let s = Nl(e.use, i, r);
5056
+ Pl(a, o, dc(t, n?.urlPolicy, s) ?? "");
4843
5057
  });
4844
- return r === "mediaInteraction" && (i.allowObjectEmbeds = n?.allowObjectEmbeds === !0), il(i);
5058
+ return r === "mediaInteraction" && (i.allowObjectEmbeds = n?.allowObjectEmbeds === !0), Il(i);
4845
5059
  }
4846
- function el(e, t, n, r, i) {
5060
+ function Ml(e, t, n, r, i) {
4847
5061
  if (t.length === 0) {
4848
5062
  r !== void 0 && i !== void 0 && n(e, r, i);
4849
5063
  return;
@@ -4852,70 +5066,70 @@ function el(e, t, n, r, i) {
4852
5066
  let [a, ...o] = t;
4853
5067
  if (a === "*") {
4854
5068
  if (Array.isArray(e)) {
4855
- for (let t = 0; t < e.length; t += 1) el(e[t], o, n, e, t);
5069
+ for (let t = 0; t < e.length; t += 1) Ml(e[t], o, n, e, t);
4856
5070
  return;
4857
5071
  }
4858
- for (let [t, r] of Object.entries(e)) el(r, o, n, e, t);
5072
+ for (let [t, r] of Object.entries(e)) Ml(r, o, n, e, t);
4859
5073
  return;
4860
5074
  }
4861
5075
  let s = e;
4862
- a in s && el(s[a], o, n, s, a);
5076
+ a in s && Ml(s[a], o, n, s, a);
4863
5077
  }
4864
- function tl(e, t, n) {
5078
+ function Nl(e, t, n) {
4865
5079
  if (e !== "media-or-object") return e;
4866
5080
  let r = n === "mediaInteraction" && "mediaElement" in t ? t.mediaElement : null;
4867
5081
  return r && typeof r == "object" && "type" in r && r.type === "object" ? "object" : "media";
4868
5082
  }
4869
- function nl(e, t, n) {
5083
+ function Pl(e, t, n) {
4870
5084
  if (Array.isArray(e) && typeof t == "number") {
4871
5085
  e[t] = n;
4872
5086
  return;
4873
5087
  }
4874
5088
  e[String(t)] = n;
4875
5089
  }
4876
- function rl(e) {
4877
- if (Array.isArray(e)) return e.map((e) => rl(e));
5090
+ function Fl(e) {
5091
+ if (Array.isArray(e)) return e.map((e) => Fl(e));
4878
5092
  if (e && typeof e == "object") {
4879
5093
  let t = Object.getPrototypeOf(e);
4880
- return t !== Object.prototype && t !== null ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, rl(t)]));
5094
+ return t !== Object.prototype && t !== null ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Fl(t)]));
4881
5095
  }
4882
5096
  return e;
4883
5097
  }
4884
- function il(e) {
5098
+ function Il(e) {
4885
5099
  if (!e || typeof e != "object" || Object.isFrozen(e)) return e;
4886
5100
  let t = Object.getPrototypeOf(e);
4887
5101
  if (!Array.isArray(e) && t !== Object.prototype && t !== null) return e;
4888
5102
  Object.freeze(e);
4889
- for (let t of Object.values(e)) il(t);
5103
+ for (let t of Object.values(e)) Il(t);
4890
5104
  return e;
4891
5105
  }
4892
5106
  //#endregion
4893
5107
  //#region src/extraction/interactionExtractionPipeline.ts
4894
- function al({ document: e, extractionRegistry: t, declarations: n, config: r, sessionGuid: i }) {
4895
- let a = cl(n), o = e.findExtractionElements(sl(t)), s = [];
5108
+ function Ll({ document: e, extractionRegistry: t, declarations: n, config: r, sessionGuid: i }) {
5109
+ let a = Bl(n), o = e.findExtractionElements(zl(t)), s = [];
4896
5110
  for (let e of o) {
4897
- let n = qc(e.element, e.responseIdentifier, e.contextRoot, a, r, i), o = t.extract(e.element, n);
5111
+ let n = Tl(e.element, e.responseIdentifier, e.contextRoot, a, r, i), o = t.extract(e.element, n);
4898
5112
  if (!o.success) throw o.error;
4899
5113
  let c = o.extractor, l = c?.outputType ?? e.normalizedType, u = {
4900
5114
  ...o.data,
4901
5115
  type: l,
4902
5116
  responseId: e.responseIdentifier
4903
5117
  }, d = t.getDeliveryFieldsForType(e.normalizedType), f = c.delivery?.fields ?? [];
4904
- s.push($c(u, ol(d, f), r.security, e.normalizedType));
5118
+ s.push(jl(u, Rl(d, f), r.security, e.normalizedType));
4905
5119
  }
4906
5120
  return Object.freeze(s);
4907
5121
  }
4908
- function ol(e, t) {
5122
+ function Rl(e, t) {
4909
5123
  let n = /* @__PURE__ */ new Map();
4910
5124
  for (let r of [...t, ...e]) n.set(JSON.stringify(r.path), r);
4911
5125
  return [...n.values()];
4912
5126
  }
4913
- function sl(e) {
5127
+ function zl(e) {
4914
5128
  let t = /* @__PURE__ */ new Set();
4915
5129
  for (let n of e.getExtractors()) for (let e of n.elementTypes) t.add(e);
4916
5130
  return [...t];
4917
5131
  }
4918
- function cl(e) {
5132
+ function Bl(e) {
4919
5133
  let t = /* @__PURE__ */ new Map();
4920
5134
  for (let n of Object.values(e)) t.set(n.identifier, {
4921
5135
  identifier: n.identifier,
@@ -4926,30 +5140,30 @@ function cl(e) {
4926
5140
  }
4927
5141
  //#endregion
4928
5142
  //#region src/pnp/applyPnp.ts
4929
- var ll = "data-qti-colorscheme", ul = "data-qti-magnification";
4930
- function dl(e, t) {
5143
+ var Vl = "data-qti-colorscheme", Hl = "data-qti-magnification";
5144
+ function Ul(e, t) {
4931
5145
  let n = t?.display?.colorScheme;
4932
- !n || n === "default" ? e.removeAttribute(ll) : e.setAttribute(ll, n);
5146
+ !n || n === "default" ? e.removeAttribute(Vl) : e.setAttribute(Vl, n);
4933
5147
  let r = t?.display?.magnification;
4934
- r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(ul, String(r)), e.style?.setProperty?.("--qti-magnification", String(r))) : (e.removeAttribute(ul), e.style?.removeProperty?.("--qti-magnification"));
5148
+ r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(Hl, String(r)), e.style?.setProperty?.("--qti-magnification", String(r))) : (e.removeAttribute(Hl), e.style?.removeProperty?.("--qti-magnification"));
4935
5149
  }
4936
5150
  //#endregion
4937
5151
  //#region src/catalog/catalogExtractor.ts
4938
- function fl(e) {
5152
+ function Wl(e) {
4939
5153
  if (!e.trim()) return /* @__PURE__ */ new Map();
4940
5154
  let t = s(`<root>${e}</root>`, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4941
- return t ? hl(t) : /* @__PURE__ */ new Map();
5155
+ return t ? ql(t) : /* @__PURE__ */ new Map();
4942
5156
  }
4943
- function pl(e) {
5157
+ function Gl(e) {
4944
5158
  let t = s(e, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4945
- return t ? hl(t) : /* @__PURE__ */ new Map();
5159
+ return t ? ql(t) : /* @__PURE__ */ new Map();
4946
5160
  }
4947
- function ml(e, t) {
5161
+ function Kl(e, t) {
4948
5162
  let n = new Map(e);
4949
5163
  for (let [e, r] of t) n.set(e, r);
4950
5164
  return n;
4951
5165
  }
4952
- function hl(e) {
5166
+ function ql(e) {
4953
5167
  let t = /* @__PURE__ */ new Map();
4954
5168
  for (let n of e.querySelectorAll("qti-catalog")) {
4955
5169
  let e = n.getAttribute("id") ?? n.getAttribute("identifier");
@@ -4957,14 +5171,14 @@ function hl(e) {
4957
5171
  let r = [];
4958
5172
  for (let e of n.querySelectorAll("qti-card")) {
4959
5173
  let t = e.getAttribute("support") ?? e.getAttribute("usage");
4960
- for (let n of gl(e, t ?? void 0)) r.push(n);
5174
+ for (let n of Jl(e, t ?? void 0)) r.push(n);
4961
5175
  }
4962
5176
  r.length > 0 && t.set(e, { entries: r });
4963
5177
  }
4964
5178
  for (let n of e.querySelectorAll("qti-card")) {
4965
5179
  let e = n.getAttribute("identifier");
4966
5180
  if (!e) continue;
4967
- let r = gl(n);
5181
+ let r = Jl(n);
4968
5182
  if (r.length > 0) {
4969
5183
  let n = t.get(e);
4970
5184
  n ? n.entries.push(...r) : t.set(e, { entries: r });
@@ -4972,35 +5186,35 @@ function hl(e) {
4972
5186
  }
4973
5187
  return t;
4974
5188
  }
4975
- function gl(e, t) {
5189
+ function Jl(e, t) {
4976
5190
  let n = e.querySelectorAll("qti-card-entry"), r = [];
4977
5191
  if (n.length > 0) {
4978
5192
  for (let e of n) {
4979
5193
  let n = e.getAttribute("usage") ?? e.getAttribute("data-reading-type") ?? t;
4980
5194
  n && r.push({
4981
5195
  usage: n,
4982
- lang: _l(e),
4983
- html: vl(e)
5196
+ lang: Yl(e),
5197
+ html: Xl(e)
4984
5198
  });
4985
5199
  }
4986
5200
  return r;
4987
5201
  }
4988
5202
  return t && r.push({
4989
5203
  usage: t,
4990
- lang: _l(e),
4991
- html: vl(e)
5204
+ lang: Yl(e),
5205
+ html: Xl(e)
4992
5206
  }), r;
4993
5207
  }
4994
- function _l(e) {
5208
+ function Yl(e) {
4995
5209
  return e.getAttribute("xml:lang") ?? e.getAttribute("xmllang") ?? e.getAttribute("lang") ?? void 0;
4996
5210
  }
4997
- function vl(e) {
5211
+ function Xl(e) {
4998
5212
  let t = e.querySelector("qti-html-content"), n = e.querySelector("qti-file-href");
4999
5213
  return t ? t.innerHTML ?? t.text ?? "" : n ? n.getAttribute("src") ?? n.text?.trim() ?? "" : "";
5000
5214
  }
5001
5215
  //#endregion
5002
5216
  //#region src/catalog/catalogLookup.ts
5003
- function yl(e, t, n, r) {
5217
+ function Zl(e, t, n, r) {
5004
5218
  let i = e.get(t);
5005
5219
  if (!i) return null;
5006
5220
  let a = i.entries.filter((e) => e.usage === n);
@@ -5016,11 +5230,11 @@ function yl(e, t, n, r) {
5016
5230
  }
5017
5231
  //#endregion
5018
5232
  //#region src/pci/types.ts
5019
- var bl = class extends Error {
5233
+ var Ql = class extends Error {
5020
5234
  constructor(e, t) {
5021
5235
  super(`PCI module loading is disabled for response '${e}'. Provide a host-controlled moduleResolver before loading '${t}'.`), this.responseIdentifier = e, this.authoredPath = t, this.name = "PciModuleResolverRequiredError";
5022
5236
  }
5023
- }, xl = class extends Error {
5237
+ }, $l = class extends Error {
5024
5238
  constructor(e, t, n) {
5025
5239
  super(t ? `PCI module failed to load from '${e}' and fallback '${t}'` : `PCI module failed to load from '${e}'`), this.primaryPath = e, this.fallbackPath = t, this.name = "PciLoadError", n && Object.defineProperty(this, "cause", {
5026
5240
  value: n,
@@ -5028,16 +5242,19 @@ var bl = class extends Error {
5028
5242
  configurable: !0
5029
5243
  });
5030
5244
  }
5031
- }, Sl = class {
5245
+ }, eu = class {
5032
5246
  constructor(e, t = {}) {
5033
- this.module = null, this.destroyed = !1, this.loadGeneration = 0, this._response = null, this._hasResponse = !1, this._responseChangeListeners = /* @__PURE__ */ new Set(), this.data = e, this.baseUrl = typeof t == "string" ? t : t.baseUrl ?? "", this.moduleResolver = typeof t == "string" ? void 0 : t.moduleResolver;
5247
+ this.module = null, this.destroyed = !1, this.loadGeneration = 0, this._response = null, this._hasResponse = !1, this._moduleOwnsResponse = !1, this._restorePending = !1, this._responseChangeListeners = /* @__PURE__ */ new Set(), this._remountRequestListeners = /* @__PURE__ */ new Set(), this.data = e, this.baseUrl = typeof t == "string" ? t : t.baseUrl ?? "", this.moduleResolver = typeof t == "string" ? void 0 : t.moduleResolver;
5034
5248
  }
5035
5249
  onResponseChange(e) {
5036
5250
  return this._responseChangeListeners.add(e), () => this._responseChangeListeners.delete(e);
5037
5251
  }
5252
+ onRemountRequest(e) {
5253
+ return this._remountRequestListeners.add(e), () => this._remountRequestListeners.delete(e);
5254
+ }
5038
5255
  async load() {
5039
5256
  if (this.destroyed) throw Error("Cannot load a destroyed PciHost");
5040
- if (!this.moduleResolver) throw new bl(this.data.responseIdentifier, this.data.primaryPath);
5257
+ if (!this.moduleResolver) throw new Ql(this.data.responseIdentifier, this.data.primaryPath);
5041
5258
  let e = ++this.loadGeneration, t = this.resolveUrl(this.data.primaryPath);
5042
5259
  try {
5043
5260
  let n = await this.resolveModule(t, this.data.primaryPath, "primary");
@@ -5045,14 +5262,14 @@ var bl = class extends Error {
5045
5262
  return;
5046
5263
  } catch (t) {
5047
5264
  if (!this.isCurrentLoad(e)) throw t;
5048
- if (!this.data.fallbackPath) throw new xl(this.data.primaryPath, void 0, t);
5265
+ if (!this.data.fallbackPath) throw new $l(this.data.primaryPath, void 0, t);
5049
5266
  }
5050
5267
  let n = this.resolveUrl(this.data.fallbackPath);
5051
5268
  try {
5052
5269
  let t = await this.resolveModule(n, this.data.fallbackPath, "fallback");
5053
5270
  this.adoptResolvedModule(t, this.data.fallbackPath, e);
5054
5271
  } catch (t) {
5055
- throw this.isCurrentLoad(e) ? new xl(this.data.primaryPath, this.data.fallbackPath, t) : t;
5272
+ throw this.isCurrentLoad(e) ? new $l(this.data.primaryPath, this.data.fallbackPath, t) : t;
5056
5273
  }
5057
5274
  }
5058
5275
  initialize(e) {
@@ -5060,22 +5277,36 @@ var bl = class extends Error {
5060
5277
  let t = {
5061
5278
  onReady: () => {},
5062
5279
  onResponseChange: (e) => {
5063
- this._response = e, this._hasResponse = !0;
5280
+ this._response = e, this._hasResponse = !0, this._moduleOwnsResponse = !0, this._restorePending = !1;
5064
5281
  for (let t of this._responseChangeListeners) t(this.data.responseIdentifier, e);
5065
5282
  }
5066
5283
  };
5067
5284
  try {
5068
- this.module.initialize(e, this.data.config, t), this._hasResponse && this.module.setResponse(this._response);
5285
+ this.module.initialize(e, this.data.config, t), this._hasResponse && this.module.setResponse(this._response), this._restorePending = !1;
5069
5286
  } catch (e) {
5070
5287
  let t = this.module;
5071
5288
  throw this.module = null, t.destroy(), e;
5072
5289
  }
5073
5290
  }
5074
5291
  getResponse() {
5075
- return this.module ? this.module.getResponse() : this._response;
5292
+ return this._restorePending ? this._response : this.module ? this.module.getResponse() : this._response;
5293
+ }
5294
+ offerResponse(e) {
5295
+ return !this._moduleOwnsResponse && (this._response = e, this._hasResponse = !0, this.module && (this.module.setResponse(e), this._restorePending = !1), !0);
5296
+ }
5297
+ restore(e) {
5298
+ if (this._response = e, this._hasResponse = !0, this._moduleOwnsResponse = !1, this.module) {
5299
+ if (this._remountRequestListeners.size === 0) {
5300
+ this.module.setResponse(e);
5301
+ return;
5302
+ }
5303
+ this._restorePending = !0;
5304
+ for (let e of this._remountRequestListeners) e();
5305
+ }
5076
5306
  }
5077
- setResponse(e) {
5078
- this._response = e, this._hasResponse = !0, this.module?.setResponse(e);
5307
+ async remount(e) {
5308
+ if (this.destroyed) throw Error("Cannot remount a destroyed PciHost");
5309
+ this.module?.destroy(), this.module = null, await this.load(), this.initialize(e);
5079
5310
  }
5080
5311
  disable() {
5081
5312
  this.module?.disable();
@@ -5084,7 +5315,7 @@ var bl = class extends Error {
5084
5315
  this.module?.enable();
5085
5316
  }
5086
5317
  destroy() {
5087
- this.destroyed = !0, this.loadGeneration++, this.module?.destroy(), this.module = null, this._responseChangeListeners.clear();
5318
+ this.destroyed = !0, this.loadGeneration++, this.module?.destroy(), this.module = null, this._responseChangeListeners.clear(), this._remountRequestListeners.clear();
5088
5319
  }
5089
5320
  resolveModule(e, t, n) {
5090
5321
  return Promise.resolve(this.moduleResolver(e, {
@@ -5109,7 +5340,7 @@ var bl = class extends Error {
5109
5340
  adoptResolvedModule(e, t, n) {
5110
5341
  let r = this.extractPciInterface(e, t);
5111
5342
  if (!this.isCurrentLoad(n)) throw r.destroy(), Error("PciHost was destroyed before its module finished loading");
5112
- this.module?.destroy(), this.module = r;
5343
+ this.module?.destroy(), this.module = r, this._moduleOwnsResponse = !1;
5113
5344
  }
5114
5345
  extractPciInterface(e, t) {
5115
5346
  let n = e?.default ?? e?.getInstance?.() ?? e, r = [
@@ -5123,7 +5354,7 @@ var bl = class extends Error {
5123
5354
  if (r.length > 0) throw Error(`PCI module at '${t}' does not export a valid PciModule interface; missing: ${r.join(", ")}`);
5124
5355
  return n;
5125
5356
  }
5126
- }, Cl = {
5357
+ }, tu = {
5127
5358
  stringValue: "string",
5128
5359
  floatValue: "float",
5129
5360
  integerValue: "integer",
@@ -5133,20 +5364,20 @@ var bl = class extends Error {
5133
5364
  nsf: "integer",
5134
5365
  exponent: "integer"
5135
5366
  };
5136
- function wl(e) {
5367
+ function nu(e) {
5137
5368
  let t = e.toUpperCase().charCodeAt(0);
5138
5369
  return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 90 ? t - 65 + 10 : -1;
5139
5370
  }
5140
- function Tl(e, t) {
5371
+ function ru(e, t) {
5141
5372
  let n = 0;
5142
5373
  for (let r of e) {
5143
- let e = wl(r);
5374
+ let e = nu(r);
5144
5375
  if (e < 0 || e >= t) return null;
5145
5376
  n = n * t + e;
5146
5377
  }
5147
5378
  return n;
5148
5379
  }
5149
- function El(e, t) {
5380
+ function iu(e, t) {
5150
5381
  if (!Number.isInteger(t) || t < 2 || t > 36) return {
5151
5382
  valid: !1,
5152
5383
  value: null,
@@ -5168,7 +5399,7 @@ function El(e, t) {
5168
5399
  nsf: null,
5169
5400
  exponent: null
5170
5401
  };
5171
- let o = Tl(i || "0", t), s = Tl(a || "0", t);
5402
+ let o = ru(i || "0", t), s = ru(a || "0", t);
5172
5403
  if (o === null || s === null) return {
5173
5404
  valid: !1,
5174
5405
  value: null,
@@ -5202,8 +5433,8 @@ function El(e, t) {
5202
5433
  exponent: c
5203
5434
  };
5204
5435
  }
5205
- function Dl(e, t = 10) {
5206
- let n = El(e, t);
5436
+ function au(e, t = 10) {
5437
+ let n = iu(e, t);
5207
5438
  return {
5208
5439
  stringValue: e,
5209
5440
  floatValue: n.value,
@@ -5217,32 +5448,32 @@ function Dl(e, t = 10) {
5217
5448
  }
5218
5449
  //#endregion
5219
5450
  //#region src/core/Player.ts
5220
- function Ol(e) {
5221
- let t = new Al(e, void 0, { compileOnly: !0 });
5451
+ function ou(e) {
5452
+ let t = new cu(e, void 0, { compileOnly: !0 });
5222
5453
  try {
5223
5454
  return t.capturePreparedDefinition();
5224
5455
  } finally {
5225
5456
  t.destroy();
5226
5457
  }
5227
5458
  }
5228
- function kl(e, t, n = !1) {
5229
- return new Al(e, t, { skipTemplateProcessing: n });
5459
+ function su(e, t, n = !1) {
5460
+ return new cu(e, t, { skipTemplateProcessing: n });
5230
5461
  }
5231
- var Al = class {
5462
+ var cu = class {
5232
5463
  constructor(i, a, s = {}) {
5233
- this.interactionDataCache = null, this.warnedImpliedZeroMaxScore = !1, this.responseProcessingProgram = null, this.templateProcessingProgram = null, this.outcomeProcessingProgram = null, this._catalogIndex = /* @__PURE__ */ new Map(), this._stimulusCatalogIndexes = /* @__PURE__ */ new Map(), this._pciHosts = /* @__PURE__ */ new Map(), this._pnpChangeListeners = /* @__PURE__ */ new Set(), this.lifecycleStatus = "initial", this.accumulatedDurationMs = 0, this.config = i, this.itemXml = i.itemXml ?? "", this.role = i.role ?? "candidate", this.sessionGuid = Ml(), this.sessionStartedAt = Date.now(), this.rng = i.rng ?? (typeof i.seed == "number" ? Jo(i.seed) : Math.random), this.mapper = a ? a.mapper : i.elementNameMapper ? i.elementNameMapper : o(this.itemXml) === "3.0" ? new r() : new t();
5464
+ this.interactionDataCache = null, this.warnedImpliedZeroMaxScore = !1, this.responseProcessingProgram = null, this.templateProcessingProgram = null, this.outcomeProcessingProgram = null, this._catalogIndex = /* @__PURE__ */ new Map(), this._stimulusCatalogIndexes = /* @__PURE__ */ new Map(), this._pciHosts = /* @__PURE__ */ new Map(), this._pnpChangeListeners = /* @__PURE__ */ new Set(), this.lifecycleStatus = "initial", this.accumulatedDurationMs = 0, this.config = i, this.itemXml = i.itemXml ?? "", this.role = i.role ?? "candidate", this.sessionGuid = uu(), this.sessionStartedAt = Date.now(), this.rng = i.rng ?? (typeof i.seed == "number" ? Es(i.seed) : Math.random), this.mapper = a ? a.mapper : i.elementNameMapper ? i.elementNameMapper : o(this.itemXml) === "3.0" ? new r() : new t();
5234
5465
  let c = a?.attributeMapper ?? i.attributeNameMapper ?? (this.mapper.version === "3.0" ? new n() : new e());
5235
5466
  if (this.config = {
5236
5467
  ...i,
5237
5468
  elementNameMapper: this.mapper,
5238
5469
  attributeNameMapper: c
5239
- }, a ? (this.itemDocument = a.itemDocument, this.decls = Nl(a.declarations)) : (this.itemDocument = Pc({
5470
+ }, a ? (this.itemDocument = a.itemDocument, this.decls = du(a.declarations)) : (this.itemDocument = fl({
5240
5471
  itemXml: this.itemXml,
5241
5472
  elementNameMapper: this.mapper,
5242
5473
  attributeNameMapper: c,
5243
5474
  security: this.config.security
5244
- }), this.decls = this.buildDeclarations(), this.ensureBuiltinDeclarations(this.decls)), this.sourceDeclarations = Nl(this.decls), this.ctx = new p(this.decls), this.ops = new m(), this.extractionRegistry = this.config.extractionRegistry ?? Vo(this.mapper), this.componentRegistry = this.config.componentRegistry ?? Ac(), this.i18nProvider = this.config.i18nProvider ?? this.createDefaultI18nProvider(), !this.extractionRegistry.isSealed()) {
5245
- for (let e of xc()) this.extractionRegistry.register(e.extractor), Ho(this.extractionRegistry, e.type, e.delivery);
5475
+ }), this.decls = this.buildDeclarations(), this.ensureBuiltinDeclarations(this.decls)), this.sourceDeclarations = du(this.decls), this.ctx = new p(this.decls), this.ops = new m(), this.extractionRegistry = this.config.extractionRegistry ?? ys(this.mapper), this.componentRegistry = this.config.componentRegistry ?? cl(), this.i18nProvider = this.config.i18nProvider ?? this.createDefaultI18nProvider(), !this.extractionRegistry.isSealed()) {
5476
+ for (let e of $c()) this.extractionRegistry.register(e.extractor), bs(this.extractionRegistry, e.type, e.delivery);
5246
5477
  this.extractionRegistry.seal();
5247
5478
  }
5248
5479
  let l = {
@@ -5261,13 +5492,13 @@ var Al = class {
5261
5492
  else {
5262
5493
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
5263
5494
  for (let e of this.config.deliveryContext?.catalogSources ?? []) {
5264
- let n = fl(e.xml);
5495
+ let n = Wl(e.xml);
5265
5496
  if (e.scope === "stimulus" && e.stimulusIdentifier) {
5266
5497
  let t = this._stimulusCatalogIndexes.get(e.stimulusIdentifier) ?? /* @__PURE__ */ new Map();
5267
- this._stimulusCatalogIndexes.set(e.stimulusIdentifier, ml(t, n));
5268
- } else t = ml(t, n);
5498
+ this._stimulusCatalogIndexes.set(e.stimulusIdentifier, Kl(t, n));
5499
+ } else t = Kl(t, n);
5269
5500
  }
5270
- this.config.catalogXml && (e = ml(e, pl(this.config.catalogXml))), e = ml(e, pl(this.itemXml)), this._catalogIndex = ml(e, t);
5501
+ this.config.catalogXml && (e = Kl(e, Gl(this.config.catalogXml))), e = Kl(e, Gl(this.itemXml)), this._catalogIndex = Kl(e, t);
5271
5502
  }
5272
5503
  !a && this.config.strictQtiCompliance?.enabled && this.validateStrictCompliance();
5273
5504
  }
@@ -5279,7 +5510,7 @@ var Al = class {
5279
5510
  mapper: this.mapper,
5280
5511
  attributeMapper: this.config.attributeNameMapper,
5281
5512
  itemDocument: this.itemDocument,
5282
- declarations: Nl(this.sourceDeclarations),
5513
+ declarations: du(this.sourceDeclarations),
5283
5514
  responseProcessing: this.responseProcessing,
5284
5515
  responseProcessingProgram: this.responseProcessingProgram,
5285
5516
  templateProcessingProgram: this.templateProcessingProgram,
@@ -5289,10 +5520,10 @@ var Al = class {
5289
5520
  });
5290
5521
  }
5291
5522
  applyPnp(e) {
5292
- this._rootEl = e, dl(e, this._pnp);
5523
+ this._rootEl = e, Ul(e, this._pnp);
5293
5524
  }
5294
5525
  updatePnp(e) {
5295
- this._pnp = jl(this._pnp, e), this._rootEl && dl(this._rootEl, this._pnp);
5526
+ this._pnp = lu(this._pnp, e), this._rootEl && Ul(this._rootEl, this._pnp);
5296
5527
  for (let e of this._pnpChangeListeners) e(this._pnp);
5297
5528
  }
5298
5529
  getPnp() {
@@ -5305,14 +5536,14 @@ var Al = class {
5305
5536
  return this.config.deliveryContext;
5306
5537
  }
5307
5538
  getCatalogEntry(e, t, n, r) {
5308
- let i = (r?.stimulusIdentifier ? yl(this._stimulusCatalogIndexes.get(r.stimulusIdentifier) ?? /* @__PURE__ */ new Map(), e, t, n) : null) ?? yl(this._catalogIndex, e, t, n);
5309
- return i === null ? null : Fl(i) ? Ns(i.trim(), this.config.security?.urlPolicy, "img") : Zc(this.sanitizeHtmlContent(i), this.config.security?.trustedTypesPolicyName);
5539
+ let i = (r?.stimulusIdentifier ? Zl(this._stimulusCatalogIndexes.get(r.stimulusIdentifier) ?? /* @__PURE__ */ new Map(), e, t, n) : null) ?? Zl(this._catalogIndex, e, t, n);
5540
+ return i === null ? null : pu(i) ? dc(i.trim(), this.config.security?.urlPolicy, "img") : kl(this.sanitizeHtmlContent(i), this.config.security?.trustedTypesPolicyName);
5310
5541
  }
5311
5542
  sanitizeHtmlContent(e) {
5312
- return tc(e, { security: this.config.security });
5543
+ return Nc(e, { security: this.config.security });
5313
5544
  }
5314
5545
  createPciHost(e) {
5315
- let t = new Sl(e, {
5546
+ let t = new eu(e, {
5316
5547
  baseUrl: this.config.pci?.baseUrl,
5317
5548
  moduleResolver: this.config.pci?.moduleResolver
5318
5549
  });
@@ -5322,8 +5553,11 @@ var Al = class {
5322
5553
  n && (n.value = this.coerceToDeclarationValue(n.baseType, n.cardinality, t, n.identifier));
5323
5554
  }), this._pciHosts.set(e.responseIdentifier, t), t;
5324
5555
  }
5325
- setPciResponse(e, t) {
5326
- this._pciHosts.get(e)?.setResponse(t);
5556
+ offerPciResponse(e, t) {
5557
+ this._pciHosts.get(e)?.offerResponse(t);
5558
+ }
5559
+ restorePciResponse(e, t) {
5560
+ this._pciHosts.get(e)?.restore(t);
5327
5561
  }
5328
5562
  syncPciDisabledState() {
5329
5563
  let e = this.role !== "candidate";
@@ -5337,9 +5571,15 @@ var Al = class {
5337
5571
  return this.decls;
5338
5572
  }
5339
5573
  setResponses(e) {
5340
- for (let [t, n] of Object.entries(e)) {
5341
- let e = this.decls[t];
5342
- e && (e.value = this.coerceToDeclarationValue(e.baseType, e.cardinality, n, e.identifier), this.setPciResponse(t, this.qtiValueToPublic(e.value)));
5574
+ this.applyResponses(e, (e, t) => this.offerPciResponse(e, t));
5575
+ }
5576
+ restoreResponses(e) {
5577
+ this.applyResponses(e, (e, t) => this.restorePciResponse(e, t));
5578
+ }
5579
+ applyResponses(e, t) {
5580
+ for (let [n, r] of Object.entries(e)) {
5581
+ let e = this.decls[n];
5582
+ e && (e.value = this.coerceToDeclarationValue(e.baseType, e.cardinality, r, e.identifier), t(n, this.qtiValueToPublic(e.value)));
5343
5583
  }
5344
5584
  }
5345
5585
  destroy() {
@@ -5479,7 +5719,7 @@ var Al = class {
5479
5719
  for (let e of Object.values(this.decls)) e.__kind === "outcome" && e.identifier !== "numAttempts" && e.identifier !== "completionStatus" && e.identifier !== "duration" && this.ctx.resetToDefault(e.identifier);
5480
5720
  }
5481
5721
  resetResponsesToDefault() {
5482
- for (let e of Object.values(this.decls)) e.__kind === "response" && (this.ctx.resetToDefault(e.identifier), this.setPciResponse(e.identifier, e.value.kind === "value" ? e.value.value : null));
5722
+ for (let e of Object.values(this.decls)) e.__kind === "response" && (this.ctx.resetToDefault(e.identifier), this.restorePciResponse(e.identifier, e.value.kind === "value" ? e.value.value : null));
5483
5723
  }
5484
5724
  resetTemplatesToDefault() {
5485
5725
  for (let e of Object.values(this.decls)) e.isTemplate && this.ctx.resetToDefault(e.identifier);
@@ -5514,7 +5754,7 @@ var Al = class {
5514
5754
  if (e.scope && e.scope !== "all" && n !== e.scope) continue;
5515
5755
  let a = [...i.view];
5516
5756
  if (a.length > 0 && t && !a.includes(t)) continue;
5517
- let o = Zc(tc(this.renderPrintedVariables(i.content), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
5757
+ let o = kl(Nc(this.renderPrintedVariables(i.content), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
5518
5758
  r.push({
5519
5759
  view: a,
5520
5760
  html: o,
@@ -5531,7 +5771,7 @@ var Al = class {
5531
5771
  return this.extractionRegistry;
5532
5772
  }
5533
5773
  getInteractionData() {
5534
- return this.interactionDataCache || (this.interactionDataCache = al({
5774
+ return this.interactionDataCache || (this.interactionDataCache = Ll({
5535
5775
  document: this.itemDocument,
5536
5776
  extractionRegistry: this.extractionRegistry,
5537
5777
  declarations: this.decls,
@@ -5923,7 +6163,7 @@ var Al = class {
5923
6163
  applySerializedVariables(e) {
5924
6164
  for (let t of Object.values(e)) {
5925
6165
  let e = this.decls[t.identifier];
5926
- e && (e.value = this.coerceToDeclarationValue(e.baseType, e.cardinality, t.value, e.identifier), e.__kind === "response" && this.setPciResponse(e.identifier, this.qtiValueToPublic(e.value)));
6166
+ e && (e.value = this.coerceToDeclarationValue(e.baseType, e.cardinality, t.value, e.identifier), e.__kind === "response" && this.restorePciResponse(e.identifier, this.qtiValueToPublic(e.value)));
5927
6167
  }
5928
6168
  }
5929
6169
  serializeItemSession() {
@@ -5976,7 +6216,7 @@ var Al = class {
5976
6216
  }
5977
6217
  qtiValueToSerializable(e) {
5978
6218
  if (!e || e.kind !== "value") return null;
5979
- if (e.cardinality !== "record") return Pl(e.value);
6219
+ if (e.cardinality !== "record") return fu(e.value);
5980
6220
  let t = {};
5981
6221
  for (let [n, r] of Object.entries(e.value)) t[n] = {
5982
6222
  ...r.baseType ? { baseType: r.baseType } : {},
@@ -5987,7 +6227,7 @@ var Al = class {
5987
6227
  }
5988
6228
  qtiValueToPublic(e) {
5989
6229
  if (!e || e.kind !== "value") return null;
5990
- if (e.cardinality !== "record") return Pl(e.value);
6230
+ if (e.cardinality !== "record") return fu(e.value);
5991
6231
  let t = {};
5992
6232
  for (let [n, r] of Object.entries(e.value)) t[n] = this.qtiValueToPublic(r);
5993
6233
  return t;
@@ -6087,15 +6327,15 @@ var Al = class {
6087
6327
  }
6088
6328
  coerceToDeclarationValue(e, t, n, r) {
6089
6329
  if (n == null) return re(e, t);
6090
- if (typeof n == "object" && n && "kind" in n) return Pl(n);
6330
+ if (typeof n == "object" && n && "kind" in n) return fu(n);
6091
6331
  let i = r ? this.getExtendedTextBase(r) : void 0;
6092
6332
  if (t === "record") return this.coerceRecordValue(n, i ?? 10);
6093
6333
  if (!e) return re(void 0, t);
6094
- if (e === "file") return t === "multiple" || t === "ordered" ? w(e, t, Pl((Array.isArray(n) ? n : [n]).filter((e) => e != null))) : w(e, t, Pl(n));
6334
+ if (e === "file") return t === "multiple" || t === "ordered" ? w(e, t, fu((Array.isArray(n) ? n : [n]).filter((e) => e != null))) : w(e, t, fu(n));
6095
6335
  if (t === "multiple" || t === "ordered") {
6096
6336
  let r = (Array.isArray(n) ? n : [n]).map((e) => String(e ?? "").trim()).filter((e) => e.length > 0).map((t) => {
6097
6337
  if (i && (e === "integer" || e === "float")) {
6098
- let n = Dl(t, i);
6338
+ let n = au(t, i);
6099
6339
  return e === "integer" ? n.integerValue : n.floatValue;
6100
6340
  }
6101
6341
  let n = y(e, t);
@@ -6106,7 +6346,7 @@ var Al = class {
6106
6346
  let a = String(n ?? "").trim();
6107
6347
  if (a.length === 0) return re(e, t);
6108
6348
  if (i && (e === "integer" || e === "float")) {
6109
- let t = Dl(a, i), n = e === "integer" ? t.integerValue : t.floatValue;
6349
+ let t = au(a, i), n = e === "integer" ? t.integerValue : t.floatValue;
6110
6350
  return n === null ? re(e, "single") : w(e, "single", n);
6111
6351
  }
6112
6352
  return y(e, a);
@@ -6124,7 +6364,7 @@ var Al = class {
6124
6364
  } catch {
6125
6365
  return re(void 0, "record");
6126
6366
  }
6127
- else n = Dl(e, t);
6367
+ else n = au(e, t);
6128
6368
  }
6129
6369
  if (!n || typeof n != "object" || Array.isArray(n)) return re(void 0, "record");
6130
6370
  let r = {};
@@ -6133,7 +6373,7 @@ var Al = class {
6133
6373
  r[e] = t;
6134
6374
  continue;
6135
6375
  }
6136
- let n = Cl[e], i = t;
6376
+ let n = tu[e], i = t;
6137
6377
  if (t && typeof t == "object" && !Array.isArray(t) && "value" in t) {
6138
6378
  let e = t;
6139
6379
  n = e.baseType ?? n, i = e.value;
@@ -6159,12 +6399,12 @@ var Al = class {
6159
6399
  return r = r.replace(/<printedVariable\b([^>]*)\/>/gi, (e, r) => n(t(String(r)))), r;
6160
6400
  }
6161
6401
  renderHtmlContent(e) {
6162
- return Zc(tc(this.renderPrintedVariables(e), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
6402
+ return kl(Nc(this.renderPrintedVariables(e), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
6163
6403
  }
6164
6404
  getModalFeedback(e) {
6165
6405
  let t = [];
6166
6406
  for (let n of this.itemDocument.readModalFeedback()) {
6167
- let { identifier: r, outcomeIdentifier: i, showHide: a, title: o } = n, s = Zc(tc(n.content, { security: this.config.security }), this.config.security?.trustedTypesPolicyName), c = e[i];
6407
+ let { identifier: r, outcomeIdentifier: i, showHide: a, title: o } = n, s = kl(Nc(n.content, { security: this.config.security }), this.config.security?.trustedTypesPolicyName), c = e[i];
6168
6408
  (a === "show" ? c === r : c !== r) && s && t.push({
6169
6409
  identifier: r,
6170
6410
  outcomeIdentifier: i,
@@ -6176,7 +6416,7 @@ var Al = class {
6176
6416
  return t;
6177
6417
  }
6178
6418
  };
6179
- function jl(e, t) {
6419
+ function lu(e, t) {
6180
6420
  return {
6181
6421
  display: {
6182
6422
  ...e?.display ?? {},
@@ -6192,7 +6432,7 @@ function jl(e, t) {
6192
6432
  }
6193
6433
  };
6194
6434
  }
6195
- function Ml() {
6435
+ function uu() {
6196
6436
  let e = typeof crypto < "u" ? crypto : void 0;
6197
6437
  if (typeof e?.randomUUID == "function") return e.randomUUID();
6198
6438
  if (typeof e?.getRandomValues == "function") {
@@ -6201,26 +6441,26 @@ function Ml() {
6201
6441
  }
6202
6442
  throw Error("No Web Crypto API available: cannot generate a session GUID. @pie-qti/item-player requires crypto.randomUUID or crypto.getRandomValues (present in all supported browsers and in Node >= 20).");
6203
6443
  }
6204
- function Nl(e) {
6444
+ function du(e) {
6205
6445
  return structuredClone(e);
6206
6446
  }
6207
- function Pl(e) {
6447
+ function fu(e) {
6208
6448
  return !e || typeof e != "object" ? e : structuredClone(e);
6209
6449
  }
6210
- function Fl(e) {
6450
+ function pu(e) {
6211
6451
  let t = e.trim();
6212
6452
  return /^(https?:\/\/|\/\/|\/|\.{0,2}\/|data:|blob:)/i.test(t) || /\.(png|jpe?g|gif|webp|svg|mp3|wav|ogg|mp4|webm|pdf)(\?.*)?$/i.test(t);
6213
6453
  }
6214
6454
  //#endregion
6215
6455
  //#region src/core/rolePolicy.ts
6216
- var Il = /* @__PURE__ */ new Set([
6456
+ var mu = /* @__PURE__ */ new Set([
6217
6457
  "scorer",
6218
6458
  "author",
6219
6459
  "tutor",
6220
6460
  "testConstructor"
6221
6461
  ]);
6222
- function Ll(e) {
6223
- let t = e === "candidate", n = Il.has(e);
6462
+ function hu(e) {
6463
+ let t = e === "candidate", n = mu.has(e);
6224
6464
  return {
6225
6465
  isCandidate: t,
6226
6466
  isReadOnly: !t,
@@ -6229,7 +6469,7 @@ function Ll(e) {
6229
6469
  }
6230
6470
  //#endregion
6231
6471
  //#region src/components/utils/feedbackUtils.ts
6232
- var Rl = [
6472
+ var gu = [
6233
6473
  {
6234
6474
  pattern: /<strong>Incorrect;<\/strong>/gi,
6235
6475
  replacement: "<strong>Incorrect</strong> "
@@ -6247,55 +6487,55 @@ var Rl = [
6247
6487
  replacement: "Correct "
6248
6488
  }
6249
6489
  ];
6250
- function zl(e, t = Rl) {
6490
+ function _u(e, t = gu) {
6251
6491
  if (!e) return e;
6252
6492
  let n = e;
6253
6493
  for (let e of t) n = n.replace(e.pattern, e.replacement);
6254
6494
  return n;
6255
6495
  }
6256
- function Bl(e, t) {
6496
+ function vu(e, t) {
6257
6497
  let { outcomeValues: n, applyHeuristics: r = !1, wrapWithSpan: i = !1, transforms: a } = t;
6258
6498
  return e && e.replace(/<feedbackInline\b([^>]*)>([\s\S]*?)<\/feedbackInline>/gi, (e, t, o) => {
6259
- let s = Vl(t, "outcomeIdentifier"), c = Vl(t, "identifier"), l = Vl(t, "showHide") ?? "show", u = s ? n[s] : void 0;
6499
+ let s = yu(t, "outcomeIdentifier"), c = yu(t, "identifier"), l = yu(t, "showHide") ?? "show", u = s ? n[s] : void 0;
6260
6500
  if (s === null || c === null || u == null || u === "") return "";
6261
6501
  let d = Array.isArray(u) ? u.includes(c) : u === c;
6262
- return (l.toLowerCase() === "show" ? d : !d) ? (r && (o = zl(o, a)), i ? ` <span class="qti-feedback-inline">${o}</span>` : o) : "";
6502
+ return (l.toLowerCase() === "show" ? d : !d) ? (r && (o = _u(o, a)), i ? ` <span class="qti-feedback-inline">${o}</span>` : o) : "";
6263
6503
  });
6264
6504
  }
6265
- function Vl(e, t) {
6505
+ function yu(e, t) {
6266
6506
  return (RegExp(`\\b${t}\\s*=\\s*"([^"]*)"`, "i").exec(e) ?? RegExp(`\\b${t}\\s*=\\s*'([^']*)'`, "i").exec(e))?.[1] ?? null;
6267
6507
  }
6268
6508
  //#endregion
6269
6509
  //#region src/components/utils/stylesheetRender.ts
6270
- function Hl(e, t = "[data-qti-item-body-scope]") {
6271
- return e ? e.stylesheets.map((e) => Ul(e, t)).filter(Boolean).join("\n") : "";
6510
+ function bu(e, t = "[data-qti-item-body-scope]") {
6511
+ return e ? e.stylesheets.map((e) => xu(e, t)).filter(Boolean).join("\n") : "";
6272
6512
  }
6273
- function Ul(e, t) {
6513
+ function xu(e, t) {
6274
6514
  let n = e.cssText?.trim();
6275
- return !n || l(n) ? "" : ql(n, Xl(e, t)) || "";
6515
+ return !n || l(n) ? "" : Tu(n, Ou(e, t)) || "";
6276
6516
  }
6277
- var Wl = /* @__PURE__ */ new Set([
6517
+ var Su = /* @__PURE__ */ new Set([
6278
6518
  "media",
6279
6519
  "supports",
6280
6520
  "container",
6281
6521
  "layer",
6282
6522
  "scope"
6283
- ]), Gl = /^(?::root|html|body)(?![\w-])/, Kl = /^@(?:-[a-z]+-)?([\w-]+)/i;
6284
- function ql(e, t = "[data-qti-item-body-scope]") {
6523
+ ]), Cu = /^(?::root|html|body)(?![\w-])/, wu = /^@(?:-[a-z]+-)?([\w-]+)/i;
6524
+ function Tu(e, t = "[data-qti-item-body-scope]") {
6285
6525
  if (!e) return "";
6286
6526
  let n = t?.trim();
6287
- return n ? Jl(tu(e), n).trim() : e;
6527
+ return n ? Eu(Nu(e), n).trim() : e;
6288
6528
  }
6289
- function Jl(e, t) {
6529
+ function Eu(e, t) {
6290
6530
  let n = "", r = 0;
6291
6531
  for (; r < e.length;) {
6292
- let i = Ql(e, r);
6532
+ let i = Au(e, r);
6293
6533
  if (i.end <= r) break;
6294
- n += Yl(i, t), r = i.end;
6534
+ n += Du(i, t), r = i.end;
6295
6535
  }
6296
6536
  return n;
6297
6537
  }
6298
- function Yl(e, t) {
6538
+ function Du(e, t) {
6299
6539
  if (e.kind === "statement") {
6300
6540
  let t = e.text.trim();
6301
6541
  return t === ";" ? "" : `${t}\n`;
@@ -6304,28 +6544,28 @@ function Yl(e, t) {
6304
6544
  let n = e.prelude.trim();
6305
6545
  if (!n) return "";
6306
6546
  if (n.startsWith("@")) {
6307
- let r = Kl.exec(n)?.[1]?.toLowerCase();
6308
- if (r && Wl.has(r)) {
6309
- let r = Jl(e.block, t);
6547
+ let r = wu.exec(n)?.[1]?.toLowerCase();
6548
+ if (r && Su.has(r)) {
6549
+ let r = Eu(e.block, t);
6310
6550
  return r.trim() ? `${n} {\n${r}}\n` : "";
6311
6551
  }
6312
6552
  return `${n} {${e.block}}\n`;
6313
6553
  }
6314
6554
  let r = e.block.trim();
6315
6555
  if (!r) return "";
6316
- let i = eu(n, ",").map((e) => Zl(e.trim(), t)).filter(Boolean);
6556
+ let i = Mu(n, ",").map((e) => ku(e.trim(), t)).filter(Boolean);
6317
6557
  return i.length === 0 ? "" : `${i.join(", ")} { ${r} }\n`;
6318
6558
  }
6319
- function Xl(e, t) {
6320
- return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${nu(e.stimulusIdentifier)}"]`;
6559
+ function Ou(e, t) {
6560
+ return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${Pu(e.stimulusIdentifier)}"]`;
6321
6561
  }
6322
- function Zl(e, t) {
6562
+ function ku(e, t) {
6323
6563
  if (!e) return "";
6324
6564
  if (e === t || e.startsWith(`${t} `)) return e;
6325
- let n = Gl.exec(e);
6565
+ let n = Cu.exec(e);
6326
6566
  return n ? `${t}${e.slice(n[0].length)}` : `${t} ${e}`;
6327
6567
  }
6328
- function Ql(e, t) {
6568
+ function Au(e, t) {
6329
6569
  let n = t, r = null, i = 0;
6330
6570
  for (; n < e.length;) {
6331
6571
  let a = e[n];
@@ -6339,7 +6579,7 @@ function Ql(e, t) {
6339
6579
  end: n + 1
6340
6580
  };
6341
6581
  else if (i === 0 && a === "{") {
6342
- let r = $l(e, n);
6582
+ let r = ju(e, n);
6343
6583
  return {
6344
6584
  kind: "rule",
6345
6585
  prelude: e.slice(t, n),
@@ -6355,7 +6595,7 @@ function Ql(e, t) {
6355
6595
  end: e.length
6356
6596
  };
6357
6597
  }
6358
- function $l(e, t) {
6598
+ function ju(e, t) {
6359
6599
  let n = 0, r = null;
6360
6600
  for (let i = t; i < e.length; i += 1) {
6361
6601
  let t = e[i];
@@ -6378,7 +6618,7 @@ function $l(e, t) {
6378
6618
  end: e.length
6379
6619
  };
6380
6620
  }
6381
- function eu(e, t) {
6621
+ function Mu(e, t) {
6382
6622
  let n = [], r = "", i = null, a = 0;
6383
6623
  for (let o = 0; o < e.length; o += 1) {
6384
6624
  let s = e[o];
@@ -6398,7 +6638,7 @@ function eu(e, t) {
6398
6638
  }
6399
6639
  return n.push(r), n;
6400
6640
  }
6401
- function tu(e) {
6641
+ function Nu(e) {
6402
6642
  let t = "", n = null, r = 0;
6403
6643
  for (; r < e.length;) {
6404
6644
  let i = e[r];
@@ -6423,67 +6663,67 @@ function tu(e) {
6423
6663
  }
6424
6664
  return t;
6425
6665
  }
6426
- function nu(e) {
6666
+ function Pu(e) {
6427
6667
  return e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n|\r|\f/g, " ");
6428
6668
  }
6429
6669
  //#endregion
6430
6670
  //#region src/components/utils/stimulusRender.ts
6431
- function ru(e, t) {
6671
+ function Fu(e, t) {
6432
6672
  return Object.fromEntries(Object.entries(e?.stimuli ?? {}).map(([e, n]) => [e, t(n.bodyHtml)]));
6433
6673
  }
6434
- function iu(e, t) {
6674
+ function Iu(e, t) {
6435
6675
  if (Object.keys(t).length === 0) return e;
6436
6676
  let n = /* @__PURE__ */ new Set(), r = e.replace(/<([a-z][\w:-]*)([^>]*\bdata-stimulus-idref=(["'])([^"']+)\3[^>]*)>\s*<\/\1>/gi, (e, r, i, a, o) => {
6437
6677
  let s = t[o];
6438
- return s ? (n.add(o), `<${r}${ou(i, "qti-stimulus-dock")}>${s}</${r}>`) : e;
6678
+ return s ? (n.add(o), `<${r}${Ru(i, "qti-stimulus-dock")}>${s}</${r}>`) : e;
6439
6679
  });
6440
6680
  r = r.replace(/<qti-assessment-stimulus-ref\b([^>]*)\/?>\s*(?:<\/qti-assessment-stimulus-ref>)?/gi, (e, r) => {
6441
- let i = au(r, "identifier");
6681
+ let i = Lu(r, "identifier");
6442
6682
  if (!i) return e;
6443
6683
  if (n.has(i)) return "";
6444
6684
  let a = t[i];
6445
- return a ? (n.add(i), `<div data-stimulus-idref="${su(i)}" class="qti-stimulus-dock">${a}</div>`) : e;
6685
+ return a ? (n.add(i), `<div data-stimulus-idref="${zu(i)}" class="qti-stimulus-dock">${a}</div>`) : e;
6446
6686
  });
6447
- let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${su(e)}" class="qti-stimulus-block">${t}</div>`).join("");
6687
+ let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${zu(e)}" class="qti-stimulus-block">${t}</div>`).join("");
6448
6688
  return i ? i + r : r;
6449
6689
  }
6450
- function au(e, t) {
6690
+ function Lu(e, t) {
6451
6691
  return e.match(RegExp(`\\b${t}\\s*=\\s*["']([^"']+)["']`, "i"))?.[1] ?? null;
6452
6692
  }
6453
- function ou(e, t) {
6693
+ function Ru(e, t) {
6454
6694
  let n = e.match(/\bclass\s*=\s*(["'])([^"']*)\1/i);
6455
6695
  if (!n) return `${e} class="${t}"`;
6456
6696
  let r = n[1], i = n[2] ?? "", a = new Set(i.split(/\s+/).filter(Boolean));
6457
6697
  return a.add(t), e.replace(n[0], `class=${r}${Array.from(a).join(" ")}${r}`);
6458
6698
  }
6459
- function su(e) {
6699
+ function zu(e) {
6460
6700
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
6461
6701
  }
6462
6702
  //#endregion
6463
6703
  //#region src/interactions/inline/render-plan.ts
6464
- function cu(e) {
6465
- return Tc(e);
6704
+ function Bu(e) {
6705
+ return rl(e);
6466
6706
  }
6467
- function lu(e) {
6468
- return Ec(e);
6707
+ function Vu(e) {
6708
+ return il(e);
6469
6709
  }
6470
- function uu(e, t) {
6471
- return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => pu(t, n, "textEntryInteraction") ? fu("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => pu(t, n, "textEntryInteraction") ? fu("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => pu(t, n, "inlineChoiceInteraction") ? fu("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => pu(t, n, "inlineChoiceInteraction") ? fu("inlineChoice", n) : e);
6710
+ function Hu(e, t) {
6711
+ return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => Gu(t, n, "textEntryInteraction") ? Wu("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => Gu(t, n, "textEntryInteraction") ? Wu("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => Gu(t, n, "inlineChoiceInteraction") ? Wu("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => Gu(t, n, "inlineChoiceInteraction") ? Wu("inlineChoice", n) : e);
6472
6712
  }
6473
- function du(e, t) {
6474
- let n = uu(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
6713
+ function Uu(e, t) {
6714
+ let n = Hu(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
6475
6715
  for (; (o = i.exec(n)) !== null;) {
6476
6716
  if (o.index > a && r.push({
6477
6717
  type: "html",
6478
6718
  content: n.substring(a, o.index)
6479
6719
  }), o[0].startsWith("[TEXTENTRY:")) {
6480
- let e = mu(t, o[1], "textEntryInteraction");
6720
+ let e = Ku(t, o[1], "textEntryInteraction");
6481
6721
  e && r.push({
6482
6722
  type: "textEntry",
6483
6723
  interaction: e
6484
6724
  });
6485
6725
  } else {
6486
- let e = mu(t, o[2], "inlineChoiceInteraction");
6726
+ let e = Ku(t, o[2], "inlineChoiceInteraction");
6487
6727
  e && r.push({
6488
6728
  type: "inlineChoice",
6489
6729
  interaction: e
@@ -6499,28 +6739,28 @@ function du(e, t) {
6499
6739
  content: n
6500
6740
  }];
6501
6741
  }
6502
- function fu(e, t) {
6742
+ function Wu(e, t) {
6503
6743
  return e === "textEntry" ? `[TEXTENTRY:${t}]` : `[INLINECHOICE:${t}]`;
6504
6744
  }
6505
- function pu(e, t, n) {
6506
- return !!mu(e, t, n);
6745
+ function Gu(e, t, n) {
6746
+ return !!Ku(e, t, n);
6507
6747
  }
6508
- function mu(e, t, n) {
6748
+ function Ku(e, t, n) {
6509
6749
  return e.find((e) => e.responseId === t && e.type === n) ?? null;
6510
6750
  }
6511
6751
  //#endregion
6512
6752
  //#region src/presentation/itemPresentationPlan.ts
6513
- function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candidate", outcomeValues: i = {}, heuristicsConfig: a, itemBodyScopeSelector: o = "[data-qti-item-body-scope]", renderItemBodyRubrics: s = !0, onComponentError: c }) {
6514
- let l = Ll(r), u = n || l.isReadOnly, d = l.canViewCorrectResponses ? e.correctResponses : {}, { html: f, scopedCss: p } = _u({
6753
+ function qu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candidate", outcomeValues: i = {}, heuristicsConfig: a, itemBodyScopeSelector: o = "[data-qti-item-body-scope]", renderItemBodyRubrics: s = !0, onComponentError: c }) {
6754
+ let l = hu(r), u = n || l.isReadOnly, d = l.canViewCorrectResponses ? e.correctResponses : {}, { html: f, scopedCss: p } = Yu({
6515
6755
  source: e,
6516
6756
  role: r,
6517
6757
  outcomeValues: i,
6518
6758
  heuristicsConfig: a,
6519
6759
  itemBodyScopeSelector: o,
6520
6760
  renderItemBodyRubrics: s
6521
- }), m = du(f, e.interactions).map((t) => t.type === "html" ? {
6761
+ }), m = Uu(f, e.interactions).map((t) => t.type === "html" ? {
6522
6762
  kind: "html",
6523
- html: vu(tc(t.content, { security: e.security }), e.security)
6763
+ html: Xu(Nc(t.content, { security: e.security }), e.security)
6524
6764
  } : t.type === "textEntry" ? {
6525
6765
  kind: "interaction",
6526
6766
  mount: {
@@ -6535,7 +6775,7 @@ function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candida
6535
6775
  renderer: "inline-choice",
6536
6776
  interaction: t.interaction
6537
6777
  }
6538
- }), h = Ou({
6778
+ }), h = od({
6539
6779
  interactions: e.interactions,
6540
6780
  source: e,
6541
6781
  responses: t,
@@ -6547,7 +6787,7 @@ function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candida
6547
6787
  kind: "interaction",
6548
6788
  mount: e
6549
6789
  }));
6550
- return gu({
6790
+ return Ju({
6551
6791
  capabilities: l,
6552
6792
  disabled: u,
6553
6793
  correctResponses: d,
@@ -6556,82 +6796,82 @@ function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candida
6556
6796
  scopedCss: p
6557
6797
  });
6558
6798
  }
6559
- function gu(e) {
6799
+ function Ju(e) {
6560
6800
  if (!e || typeof e != "object" || Object.isFrozen(e)) return e;
6561
6801
  let t = Object.getPrototypeOf(e);
6562
6802
  if (!Array.isArray(e) && t !== Object.prototype && t !== null) return e;
6563
6803
  Object.freeze(e);
6564
- for (let t of Object.values(e)) gu(t);
6804
+ for (let t of Object.values(e)) Ju(t);
6565
6805
  return e;
6566
6806
  }
6567
- function _u({ source: e, role: t, outcomeValues: n, heuristicsConfig: r, itemBodyScopeSelector: i, renderItemBodyRubrics: a }) {
6568
- let o = Qc(e.itemBodyHtml), s = Hl(e.deliveryContext, i), c = ru(e.deliveryContext, (t) => tc(t, { security: e.security }));
6569
- o = iu(o, c), o = yu(o, t, { renderRubrics: a });
6807
+ function Yu({ source: e, role: t, outcomeValues: n, heuristicsConfig: r, itemBodyScopeSelector: i, renderItemBodyRubrics: a }) {
6808
+ let o = Al(e.itemBodyHtml), s = bu(e.deliveryContext, i), c = Fu(e.deliveryContext, (t) => Nc(t, { security: e.security }));
6809
+ o = Iu(o, c), o = Zu(o, t, { renderRubrics: a });
6570
6810
  let l = d(r);
6571
- return o = Bl(o, {
6811
+ return o = vu(o, {
6572
6812
  outcomeValues: n,
6573
6813
  applyHeuristics: l.feedbackTextFormatting,
6574
6814
  wrapWithSpan: !1
6575
6815
  }), {
6576
- html: Du(o),
6816
+ html: ad(o),
6577
6817
  scopedCss: s
6578
6818
  };
6579
6819
  }
6580
- function vu(e, t) {
6581
- return Zc(e, t?.trustedTypesPolicyName);
6820
+ function Xu(e, t) {
6821
+ return kl(e, t?.trustedTypesPolicyName);
6582
6822
  }
6583
- function yu(e, t, { renderRubrics: n }) {
6823
+ function Zu(e, t, { renderRubrics: n }) {
6584
6824
  if (!e || !/rubric-?block/i.test(e)) return e;
6585
6825
  try {
6586
6826
  let r = s(e, {
6587
6827
  lowerCaseTagName: !1,
6588
6828
  comment: !1
6589
6829
  });
6590
- return bu(r, t, { renderRubrics: n }), r.toString();
6830
+ return Qu(r, t, { renderRubrics: n }), r.toString();
6591
6831
  } catch {
6592
6832
  return e;
6593
6833
  }
6594
6834
  }
6595
- function bu(e, t, { renderRubrics: n }) {
6835
+ function Qu(e, t, { renderRubrics: n }) {
6596
6836
  let r = [...e.childNodes];
6597
6837
  for (let e of r) {
6598
6838
  let r = e.rawTagName?.toLowerCase();
6599
- if (r && xu(r) && (!n || !Su(e, t))) {
6839
+ if (r && $u(r) && (!n || !ed(e, t))) {
6600
6840
  e.remove();
6601
6841
  continue;
6602
6842
  }
6603
- e.childNodes?.length && bu(e, t, { renderRubrics: n }), r && xu(r) && e.replaceWith(Cu(e));
6843
+ e.childNodes?.length && Qu(e, t, { renderRubrics: n }), r && $u(r) && e.replaceWith(td(e));
6604
6844
  }
6605
6845
  }
6606
- function xu(e) {
6846
+ function $u(e) {
6607
6847
  return e === "rubricblock" || e === "qti-rubric-block";
6608
6848
  }
6609
- function Su(e, t) {
6849
+ function ed(e, t) {
6610
6850
  let n = e.getAttribute("view")?.trim();
6611
- return !n || wu(n).includes(t);
6851
+ return !n || nd(n).includes(t);
6612
6852
  }
6613
- function Cu(e) {
6853
+ function td(e) {
6614
6854
  let t = e.getAttribute("view")?.trim(), n = e.getAttribute("use")?.trim();
6615
6855
  return `<div ${[
6616
6856
  "class=\"qti-rubric-block\"",
6617
- t ? `data-qti-rubric-view="${Eu(t)}"` : "",
6618
- n ? `data-qti-rubric-use="${Eu(n)}"` : ""
6619
- ].filter(Boolean).join(" ")}>${Tu(e)}</div>`;
6857
+ t ? `data-qti-rubric-view="${id(t)}"` : "",
6858
+ n ? `data-qti-rubric-use="${id(n)}"` : ""
6859
+ ].filter(Boolean).join(" ")}>${rd(e)}</div>`;
6620
6860
  }
6621
- function wu(e) {
6861
+ function nd(e) {
6622
6862
  return e.split(/[\s,]+/).filter(Boolean);
6623
6863
  }
6624
- function Tu(e) {
6864
+ function rd(e) {
6625
6865
  return [...e.childNodes].map((e) => e.toString()).join("");
6626
6866
  }
6627
- function Eu(e) {
6867
+ function id(e) {
6628
6868
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
6629
6869
  }
6630
- function Du(e) {
6631
- return e.replace(/<(\w+Interaction|qti-[\w-]+-interaction|positionObjectStage|qti-position-object-stage)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => lu(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`);
6870
+ function ad(e) {
6871
+ return e.replace(/<(\w+Interaction|qti-[\w-]+-interaction|positionObjectStage|qti-position-object-stage)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => Vu(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`);
6632
6872
  }
6633
- function Ou({ interactions: e, source: t, responses: n, correctResponses: r, roleCapabilities: i, effectiveDisabled: a, onComponentError: o }) {
6634
- return e.filter((e) => !cu(e.type)).map((e) => {
6873
+ function od({ interactions: e, source: t, responses: n, correctResponses: r, roleCapabilities: i, effectiveDisabled: a, onComponentError: o }) {
6874
+ return e.filter((e) => !Bu(e.type)).map((e) => {
6635
6875
  try {
6636
6876
  let o = "stringIdentifier" in e && typeof e.stringIdentifier == "string" ? e.stringIdentifier : void 0;
6637
6877
  return {
@@ -6639,7 +6879,7 @@ function Ou({ interactions: e, source: t, responses: n, correctResponses: r, rol
6639
6879
  renderer: "web-component",
6640
6880
  interaction: e,
6641
6881
  tagName: t.componentRegistry.getTagName(e),
6642
- key: ku(e),
6882
+ key: sd(e),
6643
6883
  response: n[e.responseId] ?? null,
6644
6884
  ...o ? { stringResponse: n[o] ?? null } : {},
6645
6885
  correctResponse: i.canViewCorrectResponses ? r[e.responseId] ?? null : null,
@@ -6653,26 +6893,26 @@ function Ou({ interactions: e, source: t, responses: n, correctResponses: r, rol
6653
6893
  }
6654
6894
  }).filter((e) => e !== null);
6655
6895
  }
6656
- function ku(e) {
6896
+ function sd(e) {
6657
6897
  let t = e, n = Array.isArray(t?.choices) && t.choices.length > 0 ? t.choices.map((e) => e?.identifier).filter(Boolean).join(",") : "", r = typeof t?.prompt == "string" ? t.prompt : "";
6658
6898
  return `${e.type}|${e.responseId}|${n}|${r}`;
6659
6899
  }
6660
6900
  //#endregion
6661
6901
  //#region src/core/ItemSession.ts
6662
- function Au(e) {
6902
+ function cd(e) {
6663
6903
  let t = e;
6664
6904
  if (typeof t.getRuntimeBinding != "function") throw Error("ItemSession runtime binding is unavailable");
6665
6905
  return t.getRuntimeBinding();
6666
6906
  }
6667
- var ju = class {
6907
+ var ld = class {
6668
6908
  constructor(e, t, n = {}, r) {
6669
6909
  this.itemIdentifier = e, this.listeners = /* @__PURE__ */ new Set(), this.revision = 0, this.disposed = !1, this.defaultRole = t.role ?? "candidate";
6670
6910
  let i = { ...t };
6671
- this.player = r ? kl(i, r, !!n.restore) : new Al(i);
6911
+ this.player = r ? su(i, r, !!n.restore) : new cu(i);
6672
6912
  try {
6673
6913
  if (n.responses && this.assertKnownResponseIdentifiers(Object.keys(n.responses)), n.restore && this.player.restoreItemSession(n.restore), n.activate && this.player.getLifecycleStatus() === "suspended" && this.player.activateAttempt(), n.responses) {
6674
6914
  let e = this.player.getLifecycleStatus();
6675
- if (!Mu(e)) throw Error(`Cannot override responses while item session is ${e}`);
6915
+ if (!ud(e)) throw Error(`Cannot override responses while item session is ${e}`);
6676
6916
  this.player.setResponses({ ...n.responses });
6677
6917
  }
6678
6918
  this.currentView = this.captureView();
@@ -6682,10 +6922,10 @@ var ju = class {
6682
6922
  this.runtimeBinding = this.createBinding();
6683
6923
  }
6684
6924
  state() {
6685
- return Lu(this.currentView);
6925
+ return hd(this.currentView);
6686
6926
  }
6687
6927
  dispatch(e) {
6688
- if (this.assertActive(), Nu(e) && !Mu(this.currentView.lifecycleStatus)) throw Error(`Cannot ${Pu(e)} while item session is ${this.currentView.lifecycleStatus}`);
6928
+ if (this.assertActive(), dd(e) && !ud(this.currentView.lifecycleStatus)) throw Error(`Cannot ${fd(e)} while item session is ${this.currentView.lifecycleStatus}`);
6689
6929
  let t = this.currentView, n;
6690
6930
  switch (e.action) {
6691
6931
  case "setResponse":
@@ -6700,7 +6940,7 @@ var ju = class {
6700
6940
  default: n = this.player.runItemSessionAction(e);
6701
6941
  }
6702
6942
  this.revision += 1, this.currentView = this.captureView(n?.sessionState);
6703
- let r = Iu({
6943
+ let r = md({
6704
6944
  command: e,
6705
6945
  previous: t,
6706
6946
  current: this.currentView,
@@ -6709,9 +6949,9 @@ var ju = class {
6709
6949
  return this.notify(r), r;
6710
6950
  }
6711
6951
  present(e = {}) {
6712
- return this.assertActive(), hu({
6952
+ return this.assertActive(), qu({
6713
6953
  ...e,
6714
- disabled: e.disabled === !0 || !Mu(this.currentView.lifecycleStatus),
6954
+ disabled: e.disabled === !0 || !ud(this.currentView.lifecycleStatus),
6715
6955
  source: {
6716
6956
  itemBodyHtml: this.player.getItemBodyHtml(),
6717
6957
  interactions: this.player.getInteractionData(),
@@ -6722,8 +6962,8 @@ var ju = class {
6722
6962
  security: this.player.getSecurityConfig(),
6723
6963
  directRubrics: this.player.getRubrics({ scope: "direct" })
6724
6964
  },
6725
- responses: Lu(this.currentView.responses),
6726
- outcomeValues: Lu(this.currentView.outcomes),
6965
+ responses: hd(this.currentView.responses),
6966
+ outcomeValues: hd(this.currentView.outcomes),
6727
6967
  role: this.defaultRole
6728
6968
  });
6729
6969
  }
@@ -6731,7 +6971,7 @@ var ju = class {
6731
6971
  return this.assertActive(), this.listeners.add(e), () => this.listeners.delete(e);
6732
6972
  }
6733
6973
  serialize() {
6734
- return this.assertActive(), Lu(this.player.saveItemSession());
6974
+ return this.assertActive(), hd(this.player.saveItemSession());
6735
6975
  }
6736
6976
  getRuntimeBinding() {
6737
6977
  return this.assertActive(), this.runtimeBinding;
@@ -6739,19 +6979,19 @@ var ju = class {
6739
6979
  dispose() {
6740
6980
  if (this.disposed) return;
6741
6981
  let e = this.currentView;
6742
- this.disposed = !0, this.revision += 1, this.currentView = Lu({
6982
+ this.disposed = !0, this.revision += 1, this.currentView = hd({
6743
6983
  ...e,
6744
6984
  revision: this.revision,
6745
6985
  disposed: !0
6746
- }), this.player.destroy(), this.notify(Iu({
6986
+ }), this.player.destroy(), this.notify(md({
6747
6987
  command: { action: "dispose" },
6748
6988
  previous: e,
6749
6989
  current: this.currentView
6750
6990
  })), this.listeners.clear();
6751
6991
  }
6752
6992
  captureView(e = this.player.saveItemSession()) {
6753
- let t = Fu(e.responseVariables);
6754
- return Lu({
6993
+ let t = pd(e.responseVariables);
6994
+ return hd({
6755
6995
  revision: this.revision,
6756
6996
  itemIdentifier: e.itemIdentifier || this.itemIdentifier || void 0,
6757
6997
  role: this.defaultRole,
@@ -6764,9 +7004,9 @@ var ju = class {
6764
7004
  canSubmit: this.player.canSubmitResponses(t),
6765
7005
  disposed: this.disposed,
6766
7006
  responses: t,
6767
- outcomes: Fu(e.outcomeVariables),
6768
- templates: Fu(e.templateVariables),
6769
- context: Fu(e.contextVariables)
7007
+ outcomes: pd(e.outcomeVariables),
7008
+ templates: pd(e.templateVariables),
7009
+ context: pd(e.contextVariables)
6770
7010
  });
6771
7011
  }
6772
7012
  createBinding() {
@@ -6786,9 +7026,9 @@ var ju = class {
6786
7026
  this.assertActive();
6787
7027
  let t = this.player.createPciHost(e);
6788
7028
  return t.onResponseChange(() => {
6789
- if (this.disposed || !Mu(this.currentView.lifecycleStatus)) return;
7029
+ if (this.disposed || !ud(this.currentView.lifecycleStatus)) return;
6790
7030
  let n = this.currentView;
6791
- this.revision += 1, this.currentView = this.captureView(), this.notify(Iu({
7031
+ this.revision += 1, this.currentView = this.captureView(), this.notify(md({
6792
7032
  command: {
6793
7033
  action: "setResponse",
6794
7034
  responseIdentifier: e.responseIdentifier,
@@ -6803,7 +7043,7 @@ var ju = class {
6803
7043
  }
6804
7044
  notify(e) {
6805
7045
  for (let t of [...this.listeners]) try {
6806
- t(Lu(e));
7046
+ t(hd(e));
6807
7047
  } catch (e) {
6808
7048
  console.error("[QTI ItemSession] subscriber failed:", e);
6809
7049
  }
@@ -6816,56 +7056,56 @@ var ju = class {
6816
7056
  if (n) throw Error(`Unknown response identifier '${n}'`);
6817
7057
  }
6818
7058
  };
6819
- function Mu(e) {
7059
+ function ud(e) {
6820
7060
  return e === "initial" || e === "interacting";
6821
7061
  }
6822
- function Nu(e) {
7062
+ function dd(e) {
6823
7063
  return e.action === "setResponse" || e.action === "setResponses" || e.action === "suspendAttempt" || e.action === "endAttempt" || e.action === "submitAttempt";
6824
7064
  }
6825
- function Pu(e) {
7065
+ function fd(e) {
6826
7066
  return e.action === "setResponse" || e.action === "setResponses" ? "update responses" : `run ${e.action}`;
6827
7067
  }
6828
- function Fu(e) {
6829
- return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Lu(t.value)]));
7068
+ function pd(e) {
7069
+ return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, hd(t.value)]));
6830
7070
  }
6831
- function Iu(e) {
6832
- return Lu(e);
7071
+ function md(e) {
7072
+ return hd(e);
6833
7073
  }
6834
- function Lu(e) {
6835
- if (Array.isArray(e)) return Object.freeze(e.map((e) => Lu(e)));
7074
+ function hd(e) {
7075
+ if (Array.isArray(e)) return Object.freeze(e.map((e) => hd(e)));
6836
7076
  if (!e || typeof e != "object") return e;
6837
7077
  if (ArrayBuffer.isView(e)) return structuredClone(e);
6838
7078
  if (e instanceof ArrayBuffer) return e.slice(0);
6839
7079
  let t = Object.getPrototypeOf(e);
6840
7080
  if (t !== Object.prototype && t !== null) return e;
6841
- let n = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Lu(t)]));
7081
+ let n = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, hd(t)]));
6842
7082
  return Object.freeze(n);
6843
7083
  }
6844
7084
  //#endregion
6845
7085
  //#region src/core/AssessmentItemDefinition.ts
6846
- function Ru(e) {
6847
- return new zu(e);
7086
+ function gd(e) {
7087
+ return new _d(e);
6848
7088
  }
6849
- var zu = class {
7089
+ var _d = class {
6850
7090
  constructor(e) {
6851
7091
  if (!e.itemXml.trim()) throw Error("AssessmentItemDefinition requires non-empty itemXml");
6852
7092
  this.rngFactory = e.rngFactory;
6853
- let t = e.plugins ? Object.freeze([...e.plugins]) : Object.freeze([]), n = Hu(e), { elementNameMapper: r, attributeNameMapper: i } = Vu(n), a = Uu(n, {
7093
+ let t = e.plugins ? Object.freeze([...e.plugins]) : Object.freeze([]), n = bd(e), { elementNameMapper: r, attributeNameMapper: i } = yd(n), a = xd(n, {
6854
7094
  elementNameMapper: r,
6855
7095
  attributeNameMapper: i
6856
7096
  }, t);
6857
- this.prepared = Ol({ ...a }), this.identifier = Bu(this.prepared), this.playerConfig = a, Object.freeze(this);
7097
+ this.prepared = ou({ ...a }), this.identifier = vd(this.prepared), this.playerConfig = a, Object.freeze(this);
6858
7098
  }
6859
7099
  openSession(e = {}) {
6860
7100
  if (e.restore?.itemIdentifier && this.identifier && e.restore.itemIdentifier !== this.identifier) throw Error(`Cannot restore item session for '${e.restore.itemIdentifier}' into '${this.identifier}'`);
6861
- return new ju(this.identifier, Gu(this.playerConfig, this.rngFactory), e, this.prepared);
7101
+ return new ld(this.identifier, Cd(this.playerConfig, this.rngFactory), e, this.prepared);
6862
7102
  }
6863
7103
  };
6864
- function Bu(e) {
7104
+ function vd(e) {
6865
7105
  if (!e || typeof e != "object" || !("identifier" in e) || typeof e.identifier != "string") throw Error("AssessmentItemDefinition compilation did not produce an identifier");
6866
7106
  return e.identifier;
6867
7107
  }
6868
- function Vu(i) {
7108
+ function yd(i) {
6869
7109
  if (i.elementNameMapper && i.attributeNameMapper) return {
6870
7110
  elementNameMapper: i.elementNameMapper,
6871
7111
  attributeNameMapper: i.attributeNameMapper
@@ -6876,24 +7116,24 @@ function Vu(i) {
6876
7116
  attributeNameMapper: i.attributeNameMapper ?? (a ? new n() : new e())
6877
7117
  };
6878
7118
  }
6879
- function Hu(e) {
7119
+ function bd(e) {
6880
7120
  let { plugins: t, rngFactory: n, ...r } = e, i = {
6881
7121
  ...r,
6882
7122
  itemXml: e.itemXml,
6883
7123
  ...e.processingFragmentLimits ? { processingFragmentLimits: Object.freeze({ ...e.processingFragmentLimits }) } : {},
6884
7124
  ...e.pci ? { pci: Object.freeze({ ...e.pci }) } : {},
6885
7125
  ...e.customOperators ? { customOperators: Object.freeze({ ...e.customOperators }) } : {},
6886
- ...e.security ? { security: Ku(e.security) } : {},
6887
- ...e.pnp ? { pnp: Ku(e.pnp) } : {},
6888
- ...e.deliveryContext ? { deliveryContext: Ku(e.deliveryContext) } : {}
7126
+ ...e.security ? { security: wd(e.security) } : {},
7127
+ ...e.pnp ? { pnp: wd(e.pnp) } : {},
7128
+ ...e.deliveryContext ? { deliveryContext: wd(e.deliveryContext) } : {}
6889
7129
  };
6890
7130
  return Object.freeze(i);
6891
7131
  }
6892
- function Uu(e, t, n) {
6893
- let r = Vo(t.elementNameMapper);
6894
- for (let e of xc()) r.register(e.extractor), Ho(r, e.type, e.delivery);
6895
- let i = Ac(), a = /* @__PURE__ */ new Set();
6896
- for (let e of n) Wu(e, a), e.registerExtractors?.(r), e.registerComponents?.(i), a.add(e.name);
7132
+ function xd(e, t, n) {
7133
+ let r = ys(t.elementNameMapper);
7134
+ for (let e of $c()) r.register(e.extractor), bs(r, e.type, e.delivery);
7135
+ let i = cl(), a = /* @__PURE__ */ new Set();
7136
+ for (let e of n) Sd(e, a), e.registerExtractors?.(r), e.registerComponents?.(i), a.add(e.name);
6897
7137
  return r.seal(), i.seal(), Object.freeze({
6898
7138
  ...e,
6899
7139
  elementNameMapper: t.elementNameMapper,
@@ -6902,7 +7142,7 @@ function Uu(e, t, n) {
6902
7142
  componentRegistry: i
6903
7143
  });
6904
7144
  }
6905
- function Wu(e, t) {
7145
+ function Sd(e, t) {
6906
7146
  if (e.kind !== "assessment-item-definition-plugin") throw Error(`Definition plugin '${e.name || "<unnamed>"}' must declare kind 'assessment-item-definition-plugin'`);
6907
7147
  if (!e.name || typeof e.name != "string") throw Error("AssessmentItemDefinition plugin must have a valid name");
6908
7148
  if (!/^\d+\.\d+\.\d+/.test(e.version)) throw Error(`Definition plugin '${e.name}' has invalid version format: ${e.version}`);
@@ -6910,21 +7150,21 @@ function Wu(e, t) {
6910
7150
  let n = (e.dependencies ?? []).filter((e) => !t.has(e));
6911
7151
  if (n.length > 0) throw Error(`Definition plugin '${e.name}' has missing dependencies: ${n.join(", ")}`);
6912
7152
  }
6913
- function Gu(e, t) {
7153
+ function Cd(e, t) {
6914
7154
  return {
6915
7155
  ...e,
6916
7156
  ...t ? { rng: t() } : {}
6917
7157
  };
6918
7158
  }
6919
- function Ku(e) {
6920
- if (Array.isArray(e)) return Object.freeze(e.map((e) => Ku(e)));
7159
+ function wd(e) {
7160
+ if (Array.isArray(e)) return Object.freeze(e.map((e) => wd(e)));
6921
7161
  if (!e || typeof e != "object" || Object.getPrototypeOf(e) !== Object.prototype) return e;
6922
- let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Ku(t)]));
7162
+ let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, wd(t)]));
6923
7163
  return Object.freeze(t);
6924
7164
  }
6925
7165
  //#endregion
6926
7166
  //#region src/components/actions/typesetAction.ts
6927
- function qu(e, t) {
7167
+ function Td(e, t) {
6928
7168
  if (!(typeof window < "u" && typeof MutationObserver < "u")) return {
6929
7169
  update() {},
6930
7170
  destroy() {}
@@ -6955,7 +7195,7 @@ function qu(e, t) {
6955
7195
  }
6956
7196
  //#endregion
6957
7197
  //#region src/catalog/applyGlossaryTriggers.ts
6958
- var Ju = [
7198
+ var Ed = [
6959
7199
  {
6960
7200
  usage: "tts-pronunciation",
6961
7201
  flag: "ttsPronunciation",
@@ -6986,90 +7226,90 @@ var Ju = [
6986
7226
  label: "Request extended description",
6987
7227
  text: "D"
6988
7228
  }
6989
- ], Yu = "illustrated-glossary", Xu = /* @__PURE__ */ new Set([
7229
+ ], Dd = "illustrated-glossary", Od = /* @__PURE__ */ new Set([
6990
7230
  "glossary-on-screen",
6991
7231
  "keyword-translation",
6992
- Yu
6993
- ]), Zu = new Set(Ju.map((e) => e.flag)), Qu = new Set(Ju.map((e) => e.usage)), $u = /^[a-z][a-z0-9._-]*$/;
6994
- function ed(e, t) {
6995
- td(e);
7232
+ Dd
7233
+ ]), kd = new Set(Ed.map((e) => e.flag)), Ad = new Set(Ed.map((e) => e.usage)), jd = /^[a-z][a-z0-9._-]*$/;
7234
+ function Md(e, t) {
7235
+ Nd(e);
6996
7236
  let n = t.getPnp();
6997
- if (!n) return () => td(e);
6998
- let r = n.content?.glossaryOnScreen === !0, i = n.content?.keywordTranslation, a = i?.active === !0 && !!i.languageCode, o = n.content?.illustratedGlossary === !0, s = n.content?.catalogSupports ?? {}, c = ad(s), l = Ju.some((e) => sd(od(s, e)));
6999
- if (!r && !a && !o && !l && c.length === 0) return () => td(e);
7237
+ if (!n) return () => Nd(e);
7238
+ let r = n.content?.glossaryOnScreen === !0, i = n.content?.keywordTranslation, a = i?.active === !0 && !!i.languageCode, o = n.content?.illustratedGlossary === !0, s = n.content?.catalogSupports ?? {}, c = Ld(s), l = Ed.some((e) => zd(Rd(s, e)));
7239
+ if (!r && !a && !o && !l && c.length === 0) return () => Nd(e);
7000
7240
  let u = e.querySelectorAll("[data-catalog-idref]");
7001
- if (u.length === 0) return () => td(e);
7241
+ if (u.length === 0) return () => Nd(e);
7002
7242
  let d = null;
7003
7243
  for (let e of Array.from(u)) {
7004
7244
  let n = e.getAttribute("data-catalog-idref");
7005
7245
  if (!n) continue;
7006
- let l = id(e), u = document.createElement("span");
7246
+ let l = Id(e), u = document.createElement("span");
7007
7247
  if (u.className = "qti-catalog-term", u.style.cssText = "position:relative;display:inline", e.parentNode?.insertBefore(u, e), u.appendChild(e), r) {
7008
- let r = nd(e.textContent ?? n, "glossary-on-screen", "Show definition");
7248
+ let r = Pd(e.textContent ?? n, "glossary-on-screen", "Show definition");
7009
7249
  u.appendChild(r), r.addEventListener("click", () => {
7010
7250
  if (d) {
7011
7251
  d(), d = null;
7012
7252
  return;
7013
7253
  }
7014
7254
  let i = t.getCatalogEntry(n, "glossary-on-screen", void 0, { stimulusIdentifier: l });
7015
- i !== null && (d = dd(u, e.textContent ?? n, i, r, t, () => {
7255
+ i !== null && (d = Ud(u, e.textContent ?? n, i, r, t, () => {
7016
7256
  d = null;
7017
7257
  }));
7018
7258
  });
7019
7259
  }
7020
7260
  if (a) {
7021
- let r = i.languageCode, a = nd(e.textContent ?? n, "keyword-translation", "Show translation");
7261
+ let r = i.languageCode, a = Pd(e.textContent ?? n, "keyword-translation", "Show translation");
7022
7262
  u.appendChild(a), a.addEventListener("click", () => {
7023
7263
  if (d) {
7024
7264
  d(), d = null;
7025
7265
  return;
7026
7266
  }
7027
7267
  let i = t.getCatalogEntry(n, "keyword-translation", r, { stimulusIdentifier: l });
7028
- i !== null && (d = dd(u, e.textContent ?? n, i, a, t, () => {
7268
+ i !== null && (d = Ud(u, e.textContent ?? n, i, a, t, () => {
7029
7269
  d = null;
7030
7270
  }));
7031
7271
  });
7032
7272
  }
7033
7273
  if (o) {
7034
- let r = nd(e.textContent ?? n, Yu, "Show illustrated glossary");
7274
+ let r = Pd(e.textContent ?? n, Dd, "Show illustrated glossary");
7035
7275
  u.appendChild(r), r.addEventListener("click", () => {
7036
7276
  if (d) {
7037
7277
  d(), d = null;
7038
7278
  return;
7039
7279
  }
7040
- let i = t.getCatalogEntry(n, Yu, void 0, { stimulusIdentifier: l });
7041
- i !== null && (d = dd(u, e.textContent ?? n, i, r, t, () => {
7280
+ let i = t.getCatalogEntry(n, Dd, void 0, { stimulusIdentifier: l });
7281
+ i !== null && (d = Ud(u, e.textContent ?? n, i, r, t, () => {
7042
7282
  d = null;
7043
7283
  }));
7044
7284
  });
7045
7285
  }
7046
- for (let r of Ju) {
7047
- let i = od(s, r);
7048
- sd(i) && rd(u, e, n, {
7286
+ for (let r of Ed) {
7287
+ let i = Rd(s, r);
7288
+ zd(i) && Fd(u, e, n, {
7049
7289
  ...r,
7050
- languageCode: cd(i)
7290
+ languageCode: Bd(i)
7051
7291
  }, t, l);
7052
7292
  }
7053
- for (let r of c) rd(u, e, n, r, t, l);
7293
+ for (let r of c) Fd(u, e, n, r, t, l);
7054
7294
  }
7055
7295
  return () => {
7056
- d?.(), td(e);
7296
+ d?.(), Nd(e);
7057
7297
  };
7058
7298
  }
7059
- function td(e) {
7299
+ function Nd(e) {
7060
7300
  for (let t of Array.from(e.querySelectorAll(".qti-catalog-term"))) {
7061
7301
  let e = Array.from(t.children).find((e) => e.getAttribute?.("data-catalog-idref") !== null);
7062
7302
  e && t.parentNode && t.parentNode.insertBefore(e, t), t.remove();
7063
7303
  }
7064
7304
  }
7065
- function nd(e, t, n, r) {
7305
+ function Pd(e, t, n, r) {
7066
7306
  let i = document.createElement("button");
7067
- return i.type = "button", i.className = "qti-catalog-trigger", i.style.cssText = "display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;margin-inline:0.25rem;line-height:1;", i.setAttribute("aria-label", `${n}: ${e}`), i.setAttribute("data-catalog-usage", t), i.textContent = r ?? (t === "keyword-translation" ? "T" : t === Yu ? "I" : "?"), i;
7307
+ return i.type = "button", i.className = "qti-catalog-trigger", i.style.cssText = "display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;margin-inline:0.25rem;line-height:1;", i.setAttribute("aria-label", `${n}: ${e}`), i.setAttribute("data-catalog-usage", t), i.textContent = r ?? (t === "keyword-translation" ? "T" : t === Dd ? "I" : "?"), i;
7068
7308
  }
7069
- function rd(e, t, n, r, i, a) {
7309
+ function Fd(e, t, n, r, i, a) {
7070
7310
  let o = i.getCatalogEntry(n, r.usage, r.languageCode, { stimulusIdentifier: a });
7071
7311
  if (o === null) return;
7072
- let s = nd(t.textContent ?? n, r.usage, r.label, r.text);
7312
+ let s = Pd(t.textContent ?? n, r.usage, r.label, r.text);
7073
7313
  e.appendChild(s), s.addEventListener("click", () => {
7074
7314
  s.dispatchEvent(new CustomEvent("qti-catalog-lookup", {
7075
7315
  bubbles: !0,
@@ -7084,39 +7324,39 @@ function rd(e, t, n, r, i, a) {
7084
7324
  }));
7085
7325
  });
7086
7326
  }
7087
- function id(e) {
7327
+ function Id(e) {
7088
7328
  return (e.closest?.("[data-stimulus-idref]"))?.getAttribute?.("data-stimulus-idref")?.trim() || void 0;
7089
7329
  }
7090
- function ad(e) {
7330
+ function Ld(e) {
7091
7331
  return Object.entries(e).map(([e, t]) => ({
7092
- usage: ld(e),
7332
+ usage: Vd(e),
7093
7333
  preference: t
7094
- })).filter(({ usage: e, preference: t }) => e !== null && sd(t) && !ud(e)).map(({ usage: e, preference: t }) => ({
7334
+ })).filter(({ usage: e, preference: t }) => e !== null && zd(t) && !Hd(e)).map(({ usage: e, preference: t }) => ({
7095
7335
  usage: e,
7096
7336
  label: `Request ${e.replace(/[-_]+/g, " ")}`,
7097
7337
  text: e.slice(0, 1).toUpperCase(),
7098
- languageCode: cd(t)
7338
+ languageCode: Bd(t)
7099
7339
  }));
7100
7340
  }
7101
- function od(e, t) {
7341
+ function Rd(e, t) {
7102
7342
  return e[t.flag] ?? e[t.usage];
7103
7343
  }
7104
- function sd(e) {
7344
+ function zd(e) {
7105
7345
  return e === void 0 ? !1 : typeof e == "boolean" ? e : e.active !== !1;
7106
7346
  }
7107
- function cd(e) {
7347
+ function Bd(e) {
7108
7348
  if (!e || typeof e == "boolean") return;
7109
7349
  let t = e.languageCode?.trim();
7110
7350
  if (!(!t || !/^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$/.test(t))) return t;
7111
7351
  }
7112
- function ld(e) {
7352
+ function Vd(e) {
7113
7353
  let t = e.trim().toLowerCase();
7114
- return $u.test(t) ? t : null;
7354
+ return jd.test(t) ? t : null;
7115
7355
  }
7116
- function ud(e) {
7117
- return Zu.has(e) || Qu.has(e) || Xu.has(e);
7356
+ function Hd(e) {
7357
+ return kd.has(e) || Ad.has(e) || Od.has(e);
7118
7358
  }
7119
- function dd(e, t, n, r, i, a) {
7359
+ function Ud(e, t, n, r, i, a) {
7120
7360
  let o = i.getComponentRegistry(), s, c = !1;
7121
7361
  function l() {
7122
7362
  c || (c = !0, s.remove(), r.focus(), a());
@@ -7125,10 +7365,10 @@ function dd(e, t, n, r, i, a) {
7125
7365
  if (u !== null) {
7126
7366
  let r = document.createElement(u);
7127
7367
  r.content = n, r.label = t, r.onClose = l, e.appendChild(r), s = r;
7128
- } else s = fd(t, n, l), e.appendChild(s);
7368
+ } else s = Wd(t, n, l), e.appendChild(s);
7129
7369
  return l;
7130
7370
  }
7131
- function fd(e, t, n) {
7371
+ function Wd(e, t, n) {
7132
7372
  let r = document.createElement("div");
7133
7373
  r.className = "card card-bordered bg-base-100 shadow-lg qti-catalog-popup", r.setAttribute("role", "dialog"), r.setAttribute("aria-label", e), r.setAttribute("aria-modal", "true"), r.style.cssText = "position:absolute;z-index:1000;min-width:16rem;max-width:24rem";
7134
7374
  let i = document.createElement("div");
@@ -7139,7 +7379,7 @@ function fd(e, t, n) {
7139
7379
  o.type = "button", o.className = "btn btn-ghost btn-xs", o.setAttribute("aria-label", "Close"), o.textContent = "✕", i.appendChild(a), i.appendChild(o);
7140
7380
  let s = document.createElement("div");
7141
7381
  s.className = "card-body p-3";
7142
- let c = Qc(t);
7382
+ let c = Al(t);
7143
7383
  if (/^(https?:\/\/|\/)/i.test(c.trim())) {
7144
7384
  let t = document.createElement("img");
7145
7385
  t.src = c.trim(), t.alt = e, t.className = "max-w-full h-auto block mx-auto", s.appendChild(t);
@@ -7164,14 +7404,14 @@ function fd(e, t, n) {
7164
7404
  }
7165
7405
  //#endregion
7166
7406
  //#region src/catalog/glossaryAction.ts
7167
- function pd(e, t) {
7168
- let n = ed(e, t.player), r = t.player.onPnpChange?.(() => {
7169
- n(), n = ed(e, t.player);
7407
+ function Gd(e, t) {
7408
+ let n = Md(e, t.player), r = t.player.onPnpChange?.(() => {
7409
+ n(), n = Md(e, t.player);
7170
7410
  }) ?? (() => {});
7171
7411
  return {
7172
7412
  update(t) {
7173
- n(), r(), n = ed(e, t.player), r = t.player.onPnpChange?.(() => {
7174
- n(), n = ed(e, t.player);
7413
+ n(), r(), n = Md(e, t.player), r = t.player.onPnpChange?.(() => {
7414
+ n(), n = Md(e, t.player);
7175
7415
  }) ?? (() => {});
7176
7416
  },
7177
7417
  destroy() {
@@ -7181,23 +7421,23 @@ function pd(e, t) {
7181
7421
  }
7182
7422
  //#endregion
7183
7423
  //#region src/interactions/inline-choice/InlineChoice.svelte
7184
- var md = /* @__PURE__ */ q("<option> </option>"), hd = /* @__PURE__ */ q("<span class=\"qti-inline-choice-correct-badge svelte-p2969z\"> </span>"), gd = /* @__PURE__ */ q("<span class=\"inline-choice-wrapper svelte-p2969z\"><select><option> </option><!></select> <!></span>"), _d = {
7424
+ var Kd = /* @__PURE__ */ q("<option> </option>"), qd = /* @__PURE__ */ q("<span class=\"qti-inline-choice-correct-badge svelte-p2969z\"> </span>"), Jd = /* @__PURE__ */ q("<span class=\"inline-choice-wrapper svelte-p2969z\"><select><option> </option><!></select> <!></span>"), Yd = {
7185
7425
  hash: "svelte-p2969z",
7186
7426
  code: ".inline-choice-wrapper.svelte-p2969z {position:relative;display:inline-block;}.qti-inline-select.svelte-p2969z {display:inline-block;width:auto;min-width:120px;margin:0 4px;padding:0.25rem 1.75rem 0.25rem 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.5rem;background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;}.qti-inline-select.svelte-p2969z:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-inline-select-correct.svelte-p2969z {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 10%, transparent);}.qti-inline-choice-correct-badge.svelte-p2969z {position:absolute;top:-1.5rem;left:0;display:inline-flex;align-items:center;white-space:nowrap;min-height:1.1rem;padding:0 0.5rem;border:1px solid var(--pie-qti-success, oklch(76% 0.177 163.223));border-radius:9999px;background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 12%, transparent);color:var(--pie-qti-base-content, oklch(21% 0 0));font-size:0.7rem;font-weight:600;}"
7187
7427
  };
7188
- function vd(e, t) {
7189
- Et(t, !0), Wa(e, _d);
7428
+ function Xd(e, t) {
7429
+ Et(t, !0), Wa(e, Yd);
7190
7430
  let n = Po(t, "response", 3, ""), r = Po(t, "correctAnswer", 3, null), i = Po(t, "disabled", 3, !1), a = Po(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ I(() => r() === null ? n() : r()), s = /* @__PURE__ */ I(() => r() ? t.interaction.choices.find((e) => e.identifier === r()) : null);
7191
7431
  function c(e) {
7192
7432
  let n = e.currentTarget?.value ?? "";
7193
7433
  a()(t.interaction.responseId, n);
7194
7434
  }
7195
- var l = gd(), u = V(l);
7435
+ var l = Jd(), u = V(l);
7196
7436
  let d;
7197
7437
  var f = V(u), p = V(f, !0);
7198
7438
  k(f), f.value = f.__value = "", Ia(Hr(f), 17, () => t.interaction.choices, Ma, (e, t) => {
7199
7439
  let n = /* @__PURE__ */ I(() => r() === K(t).identifier);
7200
- var i = md(), a = V(i);
7440
+ var i = Kd(), a = V(i);
7201
7441
  k(i);
7202
7442
  var o = {};
7203
7443
  H(() => {
@@ -7207,7 +7447,7 @@ function vd(e, t) {
7207
7447
  var m;
7208
7448
  ao(u);
7209
7449
  var h = Hr(u, 2), g = (e) => {
7210
- var n = hd(), r = V(n);
7450
+ var n = qd(), r = V(n);
7211
7451
  k(n), H((e) => _a(r, `${e ?? ""}: ${K(s).text ?? ""}`), [() => t.i18n?.t("interactions.choice.correct", "Correct") ?? "Correct"]), J(e, n);
7212
7452
  };
7213
7453
  ja(h, (e) => {
@@ -7222,27 +7462,27 @@ function vd(e, t) {
7222
7462
  ca(["change"]);
7223
7463
  //#endregion
7224
7464
  //#region src/interactions/text-entry/InlineTextEntry.svelte
7225
- var yd = /* @__PURE__ */ q("<span role=\"alert\" class=\"qti-text-entry-error svelte-v4bfxs\"> </span>"), bd = /* @__PURE__ */ q("<input type=\"text\"/> <!>", 1), xd = {
7465
+ var Zd = /* @__PURE__ */ q("<span role=\"alert\" class=\"qti-text-entry-error svelte-v4bfxs\"> </span>"), Qd = /* @__PURE__ */ q("<input type=\"text\"/> <!>", 1), $d = {
7226
7466
  hash: "svelte-v4bfxs",
7227
7467
  code: ".qti-inline-input.svelte-v4bfxs {box-sizing:border-box;padding:0.25rem 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.5rem;background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;}.qti-inline-input.svelte-v4bfxs:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-inline-input-correct.svelte-v4bfxs {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 10%, transparent);}.qti-text-entry-error.svelte-v4bfxs {display:block;color:var(--pie-qti-error, oklch(71% 0.194 13.428));font-size:0.75rem;}"
7228
7468
  };
7229
- function Sd(e, t) {
7230
- Et(t, !0), Wa(e, xd);
7231
- let n = Po(t, "response", 3, ""), r = Po(t, "correctAnswer", 3, null), i = Po(t, "disabled", 3, !1), a = Po(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ Tr(null), s = /* @__PURE__ */ I(() => r() === null ? n() : r()), c = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ I(() => `${t.interaction.responseId}-error`);
7469
+ function ef(e, t) {
7470
+ Et(t, !0), Wa(e, $d);
7471
+ let n = Po(t, "response", 3, ""), r = Po(t, "correctAnswer", 3, null), i = Po(t, "disabled", 3, !1), a = Po(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ z(null), s = /* @__PURE__ */ I(() => r() === null ? n() : r()), c = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ I(() => `${t.interaction.responseId}-error`);
7232
7472
  function d(e) {
7233
7473
  let n = e.currentTarget, r = n?.value ?? "";
7234
- a()(t.interaction.responseId, r), n?.validity.valid && z(o, null);
7474
+ a()(t.interaction.responseId, r), n?.validity.valid && B(o, null);
7235
7475
  }
7236
7476
  function f(e) {
7237
- e.preventDefault(), z(o, t.interaction.patternMaskMessage ?? t.i18n?.t("interactions.textEntry.patternError", "Please match the required format") ?? "Please match the required format", !0);
7477
+ e.preventDefault(), B(o, t.interaction.patternMaskMessage ?? t.i18n?.t("interactions.textEntry.patternError", "Please match the required format") ?? "Please match the required format", !0);
7238
7478
  }
7239
7479
  function p(e) {
7240
7480
  e.currentTarget?.checkValidity();
7241
7481
  }
7242
- var m = bd(), h = Vr(m);
7482
+ var m = Qd(), h = Vr(m);
7243
7483
  _o(h);
7244
7484
  var g = Hr(h, 2), _ = (e) => {
7245
- var t = yd(), n = V(t, !0);
7485
+ var t = Zd(), n = V(t, !0);
7246
7486
  k(t), H(() => {
7247
7487
  Y(t, "id", K(u)), _a(n, K(o));
7248
7488
  }), J(e, t);
@@ -7261,13 +7501,13 @@ function Sd(e, t) {
7261
7501
  ca(["input"]);
7262
7502
  //#endregion
7263
7503
  //#region src/components/ItemBody.svelte
7264
- var Cd = 0, wd = /* @__PURE__ */ q("<div class=\"qti-item-body svelte-11qbngh\"><div class=\"qti-item-body-content svelte-11qbngh\"><div class=\"inline-interaction-container svelte-11qbngh\"><!> <!></div></div> <!></div>"), Td = {
7504
+ var tf = 0, nf = /* @__PURE__ */ q("<div class=\"qti-item-body svelte-11qbngh\"><div class=\"qti-item-body-content svelte-11qbngh\"><div class=\"inline-interaction-container svelte-11qbngh\"><!> <!></div></div> <!></div>"), rf = {
7265
7505
  hash: "svelte-11qbngh",
7266
7506
  code: "\n /* Allow the whole item body to shrink inside flex/grid layouts (prevents overflow). */.qti-item-body.svelte-11qbngh {max-width:100%;min-width:0;}.qti-item-body-content.svelte-11qbngh {max-width:none;margin-bottom:1rem;}\n\n /*\n * Custom elements default to inline; force them to be block-level and width-contained.\n * This prevents wide interactions (SVGs, tables, canvases) from spilling outside panels.\n */.qti-item-body :is(\n pie-qti-choice,\n pie-qti-slider,\n pie-qti-order,\n pie-qti-match,\n pie-qti-associate,\n pie-qti-gap-match,\n pie-qti-hotspot,\n pie-qti-hottext,\n pie-qti-media,\n pie-qti-custom,\n pie-qti-portable-custom,\n pie-qti-end-attempt,\n pie-qti-position-object,\n pie-qti-graphic-gap-match,\n pie-qti-graphic-order,\n pie-qti-graphic-associate,\n pie-qti-select-point,\n pie-qti-extended-text\n ) {display:block;max-width:100%;min-width:0;}\n\n /* Keep inline interactions from breaking paragraph flow */.inline-interaction-container.svelte-11qbngh p {display:inline;}\n\n /*\n * Hide all QTI interaction elements wrapped with qti-hidden-interaction.\n * These are rendered separately as web components above.\n * Keeping them in the HTML (but hidden) makes debugging easier and is fully extensible.\n * Any *Interaction element will be automatically wrapped and hidden - no hardcoded list needed!\n */.qti-item-body .qti-hidden-interaction {display:none !important;}\n\n /*\n * Style for inline feedback elements that appear within choice text or other content.\n * Provides visual distinction and spacing for feedback that appears inline with content.\n */.qti-feedback-inline {display:inline-block;margin-left:0.5rem;padding-left:0.5rem;border-left:2px solid var(--pie-qti-base-content, currentColor);opacity:0.8;}\n\n /* QTI 3.0 Shared Stimulus: stimulus blocks that were prepended before the item body */.qti-stimulus-block {margin-bottom:1rem;}\n\n /* QTI rubricBlock / qti-rubric-block content rendered in item-body source order. */.qti-item-body .qti-rubric-block {display:block;max-width:100%;min-width:0;margin:1rem 0;padding:1rem;overflow-x:auto;border:1px solid var(--pie-qti-base-300, #d1d5db);border-inline-start:4px solid var(--pie-qti-primary, #2563eb);border-radius:0.5rem;background:var(--pie-qti-base-200, #f8fafc);}.qti-item-body .qti-rubric-block > :first-child {margin-top:0;}.qti-item-body .qti-rubric-block > :last-child {margin-bottom:0;}.qti-item-body .qti-rubric-block table {max-width:100%;border-collapse:collapse;}.qti-item-body .qti-rubric-block th,\n .qti-item-body .qti-rubric-block td {padding:0.5rem;border:1px solid var(--pie-qti-base-300, #d1d5db);vertical-align:top;}\n\n /* QTI 3.0 Shared Vocabulary: qti-input-width-N sets minimum input width in character units. */.qti-input-width-1 {min-width:1ch;}.qti-input-width-2 {min-width:2ch;}.qti-input-width-3 {min-width:3ch;}.qti-input-width-4 {min-width:4ch;}.qti-input-width-5 {min-width:5ch;}.qti-input-width-6 {min-width:6ch;}.qti-input-width-10 {min-width:10ch;}.qti-input-width-15 {min-width:15ch;}.qti-input-width-20 {min-width:20ch;}.qti-input-width-25 {min-width:25ch;}.qti-input-width-30 {min-width:30ch;}.qti-input-width-35 {min-width:35ch;}.qti-input-width-40 {min-width:40ch;}.qti-input-width-45 {min-width:45ch;}.qti-input-width-50 {min-width:50ch;}.qti-input-width-72 {min-width:72ch;}"
7267
7507
  };
7268
- function Ed(e, t) {
7269
- Et(t, !0), Wa(e, Td);
7270
- let n = Po(t, "disabled", 3, !1), r = Po(t, "renderItemBodyRubrics", 3, !0), a = `qti-item-body-${++Cd}`, o = `[data-qti-item-body-scope="${a}"]`, s = /* @__PURE__ */ I(() => t.i18n?.getLocale()), c = /* @__PURE__ */ I(() => t.i18n?.getDirection?.()), l = /* @__PURE__ */ I(() => Au(t.session)), u = /* @__PURE__ */ I(() => (t.revision, t.session.state())), d = /* @__PURE__ */ I(() => K(u).responses), f = /* @__PURE__ */ I(() => (t.revision, t.session.present({
7508
+ function af(e, t) {
7509
+ Et(t, !0), Wa(e, rf);
7510
+ let n = Po(t, "disabled", 3, !1), r = Po(t, "renderItemBodyRubrics", 3, !0), a = `qti-item-body-${++tf}`, o = `[data-qti-item-body-scope="${a}"]`, s = /* @__PURE__ */ I(() => t.i18n?.getLocale()), c = /* @__PURE__ */ I(() => t.i18n?.getDirection?.()), l = /* @__PURE__ */ I(() => cd(t.session)), u = /* @__PURE__ */ I(() => (t.revision, t.session.state())), d = /* @__PURE__ */ I(() => K(u).responses), f = /* @__PURE__ */ I(() => (t.revision, t.session.present({
7271
7511
  disabled: n(),
7272
7512
  heuristicsConfig: t.heuristicsConfig,
7273
7513
  itemBodyScopeSelector: o,
@@ -7297,7 +7537,7 @@ function Ed(e, t) {
7297
7537
  let { responseId: t, value: n } = e.detail;
7298
7538
  h(t, n);
7299
7539
  }
7300
- let _ = (e) => K(l).createPciHost(e), v = /* @__PURE__ */ Tr(null);
7540
+ let _ = (e) => K(l).createPciHost(e), v = /* @__PURE__ */ z(null);
7301
7541
  Qr(() => {
7302
7542
  if (!K(v)) return;
7303
7543
  t.revision, K(l).applyPnp(K(v));
@@ -7316,7 +7556,7 @@ function Ed(e, t) {
7316
7556
  destroy() {}
7317
7557
  };
7318
7558
  }
7319
- var b = wd(), ee = V(b), x = V(ee), S = V(x), te = (e) => {
7559
+ var b = nf(), ee = V(b), x = V(ee), S = V(x), te = (e) => {
7320
7560
  var t = ga();
7321
7561
  Ua(Vr(t), () => "style", !1, (e, t) => {
7322
7562
  xo(e, () => ({ "data-qti-stylesheets": "resolved" }));
@@ -7334,7 +7574,7 @@ function Ed(e, t) {
7334
7574
  let r = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(f).correctResponses[K(n).mount.interaction.responseId] ?? null : null);
7335
7575
  {
7336
7576
  let i = /* @__PURE__ */ I(() => m(K(n).mount.interaction.responseId)), a = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(r) : null);
7337
- Sd(e, {
7577
+ ef(e, {
7338
7578
  get interaction() {
7339
7579
  return K(n).mount.interaction;
7340
7580
  },
@@ -7357,7 +7597,7 @@ function Ed(e, t) {
7357
7597
  let r = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(f).correctResponses[K(n).mount.interaction.responseId] ?? null : null);
7358
7598
  {
7359
7599
  let i = /* @__PURE__ */ I(() => m(K(n).mount.interaction.responseId)), a = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(r) : null);
7360
- vd(e, {
7600
+ Xd(e, {
7361
7601
  get interaction() {
7362
7602
  return K(n).mount.interaction;
7363
7603
  },
@@ -7398,18 +7638,18 @@ function Ed(e, t) {
7398
7638
  createPciHost: _
7399
7639
  }));
7400
7640
  }), J(e, r);
7401
- }), k(b), No(b, (e) => z(v, e), () => K(v)), Ga(b, (e, t) => qu?.(e, t), () => ({ typeset: t.typeset })), Ga(b, (e, t) => pd?.(e, t), () => ({ player: K(l) })), H(() => {
7641
+ }), k(b), No(b, (e) => B(v, e), () => K(v)), Ga(b, (e, t) => Td?.(e, t), () => ({ typeset: t.typeset })), Ga(b, (e, t) => Gd?.(e, t), () => ({ player: K(l) })), H(() => {
7402
7642
  Y(b, "data-qti-item-body-scope", a), Y(b, "lang", K(s)), Y(b, "dir", K(c)), b.dir = b.dir;
7403
7643
  }), J(e, b), Dt();
7404
7644
  }
7405
7645
  //#endregion
7406
7646
  //#region src/components/ModalFeedbackDisplay.svelte
7407
- var Dd = /* @__PURE__ */ q("<h3 class=\"qti-feedback-title svelte-i66ia0\"> </h3>"), Od = /* @__PURE__ */ q("<div class=\"qti-feedback-content svelte-i66ia0\"></div>"), kd = /* @__PURE__ */ q("<div><!> <!></div>"), Ad = /* @__PURE__ */ q("<dialog open=\"\" class=\"qti-feedback-modal svelte-i66ia0\" aria-modal=\"true\"><div class=\"qti-feedback-modal-box svelte-i66ia0\"><button class=\"qti-feedback-close-button svelte-i66ia0\" type=\"button\">✕</button> <!> <div class=\"qti-feedback-actions svelte-i66ia0\"><button class=\"qti-feedback-primary-button svelte-i66ia0\" type=\"button\"> </button></div></div></dialog>"), jd = {
7647
+ var of = /* @__PURE__ */ q("<h3 class=\"qti-feedback-title svelte-i66ia0\"> </h3>"), sf = /* @__PURE__ */ q("<div class=\"qti-feedback-content svelte-i66ia0\"></div>"), cf = /* @__PURE__ */ q("<div><!> <!></div>"), lf = /* @__PURE__ */ q("<dialog open=\"\" class=\"qti-feedback-modal svelte-i66ia0\" aria-modal=\"true\"><div class=\"qti-feedback-modal-box svelte-i66ia0\"><button class=\"qti-feedback-close-button svelte-i66ia0\" type=\"button\">✕</button> <!> <div class=\"qti-feedback-actions svelte-i66ia0\"><button class=\"qti-feedback-primary-button svelte-i66ia0\" type=\"button\"> </button></div></div></dialog>"), uf = {
7408
7648
  hash: "svelte-i66ia0",
7409
7649
  code: ".qti-feedback-modal.svelte-i66ia0 {box-sizing:border-box;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background-color:rgba(0, 0, 0, 0.5);color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-feedback-modal[open].svelte-i66ia0 {display:grid;place-items:center;}.qti-feedback-modal-box.svelte-i66ia0 {position:relative;box-sizing:border-box;width:min(48rem, calc(100vw - 2rem));max-height:80vh;overflow-y:auto;padding:1.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:1rem;background:var(--pie-qti-base-100, oklch(100% 0 0));box-shadow:0 20px 45px rgba(0, 0, 0, 0.2);}.qti-feedback-close-button.svelte-i66ia0,\n .qti-feedback-primary-button.svelte-i66ia0 {display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;cursor:pointer;}.qti-feedback-close-button.svelte-i66ia0 {position:absolute;top:0.5rem;right:0.5rem;width:2rem;height:2rem;padding:0;border-radius:9999px;background:transparent;border-color:transparent;}.qti-feedback-close-button.svelte-i66ia0:hover {background:var(--pie-qti-base-200, oklch(98% 0 0));border-color:var(--pie-qti-base-300, oklch(95% 0 0));}.qti-feedback-primary-button.svelte-i66ia0 {gap:0.5rem;padding:0.5rem 0.75rem;border-radius:0.75rem;border-color:var(--pie-qti-primary, oklch(45% 0.24 277));background:color-mix(in oklch, var(--pie-qti-primary, oklch(45% 0.24 277)) 12%, transparent);}.qti-feedback-close-button.svelte-i66ia0:focus-visible,\n .qti-feedback-primary-button.svelte-i66ia0:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-feedback-item.svelte-i66ia0 {margin-bottom:1rem;}.qti-feedback-item-bordered.svelte-i66ia0 {padding-bottom:1rem;border-bottom:1px solid var(--pie-qti-base-300, oklch(95% 0 0));}.qti-feedback-title.svelte-i66ia0 {margin:0 0 0.5rem;font-size:1.125rem;font-weight:700;}.qti-feedback-content.svelte-i66ia0 {max-width:none;}.qti-feedback-actions.svelte-i66ia0 {display:flex;justify-content:flex-end;margin-top:1rem;}"
7410
7650
  };
7411
- function Md(e, t) {
7412
- Et(t, !0), Wa(e, jd);
7651
+ function df(e, t) {
7652
+ Et(t, !0), Wa(e, uf);
7413
7653
  let n = Po(t, "feedback", 19, () => []), r = /* @__PURE__ */ I(() => n().length > 0), i = "item-player-modal-feedback-title", a = /* @__PURE__ */ I(() => n().find((e) => e.title)?.title);
7414
7654
  function o() {
7415
7655
  t.onClose?.();
@@ -7418,12 +7658,12 @@ function Md(e, t) {
7418
7658
  e.target === e.currentTarget && o();
7419
7659
  }
7420
7660
  var c = ga(), l = Vr(c), u = (e) => {
7421
- var r = Ad(), c = V(r), l = V(c), u = Hr(l, 2);
7661
+ var r = lf(), c = V(r), l = V(c), u = Hr(l, 2);
7422
7662
  Ia(u, 17, n, Ma, (e, r, a) => {
7423
- var o = kd();
7663
+ var o = cf();
7424
7664
  let s;
7425
7665
  var c = V(o), l = (e) => {
7426
- var t = Dd();
7666
+ var t = of();
7427
7667
  Y(t, "id", a === 0 ? i : void 0);
7428
7668
  var n = V(t, !0);
7429
7669
  k(t), H(() => _a(n, K(r).title)), J(e, t);
@@ -7432,10 +7672,10 @@ function Md(e, t) {
7432
7672
  K(r).title && e(l);
7433
7673
  });
7434
7674
  var u = Hr(c, 2), d = (e) => {
7435
- var n = Od();
7436
- Ha(n, () => K(r).content, !0), k(n), Ga(n, (e, t) => qu?.(e, t), () => ({ typeset: t.typeset })), J(e, n);
7675
+ var n = sf();
7676
+ Ha(n, () => K(r).content, !0), k(n), Ga(n, (e, t) => Td?.(e, t), () => ({ typeset: t.typeset })), J(e, n);
7437
7677
  }, f = (e) => {
7438
- var t = Od();
7678
+ var t = sf();
7439
7679
  Ha(t, () => K(r).content, !0), k(t), J(e, t);
7440
7680
  };
7441
7681
  ja(u, (e) => {
@@ -7461,15 +7701,15 @@ function Md(e, t) {
7461
7701
  ca(["click"]);
7462
7702
  //#endregion
7463
7703
  //#region src/components/ItemPlayer.svelte
7464
- var Nd = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-error svelte-129urwy\"><span> </span></div>"), Pd = /* @__PURE__ */ q("<span class=\"qti-player-badge qti-player-badge-success svelte-129urwy\"> </span>"), Fd = /* @__PURE__ */ q("<span> </span>"), Id = /* @__PURE__ */ q("<div class=\"qti-player-attempt-status svelte-129urwy\"><!></div>"), Ld = /* @__PURE__ */ q("<div class=\"qti-player-actions svelte-129urwy\"><button class=\"qti-player-button qti-player-button-primary svelte-129urwy\"> </button> <!></div>"), Rd = /* @__PURE__ */ q("<!> <!> <!>", 1), zd = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-info svelte-129urwy\"><span> </span></div>"), Bd = /* @__PURE__ */ q("<div class=\"qti-item-player svelte-129urwy\"><!></div>"), Vd = {
7704
+ var ff = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-error svelte-129urwy\"><span> </span></div>"), pf = /* @__PURE__ */ q("<span class=\"qti-player-badge qti-player-badge-success svelte-129urwy\"> </span>"), mf = /* @__PURE__ */ q("<span> </span>"), hf = /* @__PURE__ */ q("<div class=\"qti-player-attempt-status svelte-129urwy\"><!></div>"), gf = /* @__PURE__ */ q("<div class=\"qti-player-actions svelte-129urwy\"><button class=\"qti-player-button qti-player-button-primary svelte-129urwy\"> </button> <!></div>"), _f = /* @__PURE__ */ q("<!> <!> <!>", 1), vf = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-info svelte-129urwy\"><span> </span></div>"), yf = /* @__PURE__ */ q("<div class=\"qti-item-player svelte-129urwy\"><!></div>"), bf = {
7465
7705
  hash: "svelte-129urwy",
7466
7706
  code: ".qti-item-player.svelte-129urwy {color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-player-alert.svelte-129urwy {display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.75rem;background:var(--pie-qti-base-200, oklch(98% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-player-alert-error.svelte-129urwy {border-color:var(--pie-qti-error, oklch(71% 0.194 13.428));background:color-mix(in oklch, var(--pie-qti-error, oklch(71% 0.194 13.428)) 8%, transparent);}.qti-player-alert-info.svelte-129urwy {border-color:var(--pie-qti-info, oklch(74% 0.16 232.661));background:color-mix(in oklch, var(--pie-qti-info, oklch(74% 0.16 232.661)) 8%, transparent);}.qti-player-actions.svelte-129urwy {display:flex;align-items:center;gap:1rem;margin-top:1.5rem;}.qti-player-button.svelte-129urwy {display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;padding:0.5rem 0.75rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.75rem;background:var(--pie-qti-base-200, oklch(98% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;line-height:1.1;cursor:pointer;}.qti-player-button-primary.svelte-129urwy {border-color:var(--pie-qti-primary, oklch(45% 0.24 277));background:color-mix(in oklch, var(--pie-qti-primary, oklch(45% 0.24 277)) 12%, transparent);}.qti-player-button.svelte-129urwy:disabled {opacity:0.55;cursor:not-allowed;}.qti-player-button.svelte-129urwy:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-player-attempt-status.svelte-129urwy {color:color-mix(in oklch, var(--pie-qti-base-content, oklch(21% 0 0)) 70%, transparent);font-size:0.875rem;}.qti-player-badge.svelte-129urwy {display:inline-flex;align-items:center;justify-content:center;min-height:1.25rem;padding:0 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:9999px;font-size:0.75rem;font-weight:600;}.qti-player-badge-success.svelte-129urwy {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 12%, transparent);}"
7467
7707
  };
7468
- function Hd(e, t) {
7469
- Et(t, !0), Wa(e, Vd);
7470
- let n = Po(t, "role", 3, "candidate"), r = Po(t, "responses", 19, () => ({})), i = Po(t, "disabled", 3, !1), a = Po(t, "renderItemBodyRubrics", 3, !0), o = /* @__PURE__ */ I(() => t.showSubmit ?? !!t.onSubmit), s = /* @__PURE__ */ Tr(null), c = /* @__PURE__ */ Tr(null), l = /* @__PURE__ */ Tr(null), u = /* @__PURE__ */ Tr(jr([])), d = /* @__PURE__ */ I(() => K(c)?.adaptive ?? !1), f = /* @__PURE__ */ I(() => K(c)?.completed ?? !1), p = /* @__PURE__ */ I(() => K(c)?.numAttempts ?? 0), m = /* @__PURE__ */ I(() => K(c)?.canSubmit ?? !1), h = /* @__PURE__ */ I(() => K(c)?.role ?? n());
7708
+ function xf(e, t) {
7709
+ Et(t, !0), Wa(e, bf);
7710
+ let n = Po(t, "role", 3, "candidate"), r = Po(t, "responses", 19, () => ({})), i = Po(t, "disabled", 3, !1), a = Po(t, "renderItemBodyRubrics", 3, !0), o = /* @__PURE__ */ I(() => t.showSubmit ?? !!t.onSubmit), s = /* @__PURE__ */ z(null), c = /* @__PURE__ */ z(null), l = /* @__PURE__ */ z(null), u = /* @__PURE__ */ z(Ar([])), d = /* @__PURE__ */ I(() => K(c)?.adaptive ?? !1), f = /* @__PURE__ */ I(() => K(c)?.completed ?? !1), p = /* @__PURE__ */ I(() => K(c)?.numAttempts ?? 0), m = /* @__PURE__ */ I(() => K(c)?.canSubmit ?? !1), h = /* @__PURE__ */ I(() => K(c)?.role ?? n());
7471
7711
  function g(e) {
7472
- z(c, e, !0);
7712
+ B(c, e, !0);
7473
7713
  }
7474
7714
  Qr(() => {
7475
7715
  let e = null, i = !1;
@@ -7477,7 +7717,7 @@ function Hd(e, t) {
7477
7717
  if (t.session) e = t.session;
7478
7718
  else {
7479
7719
  let a = Ui(() => r());
7480
- e = Ru({
7720
+ e = gd({
7481
7721
  itemXml: t.itemXml,
7482
7722
  role: n(),
7483
7723
  security: t.security,
@@ -7489,19 +7729,19 @@ function Hd(e, t) {
7489
7729
  plugins: t.plugins
7490
7730
  }).openSession({ responses: a }), i = !0;
7491
7731
  }
7492
- z(s, e, !0), g(e.state()), z(l, null), z(u, [], !0);
7732
+ B(s, e, !0), g(e.state()), B(l, null), B(u, [], !0);
7493
7733
  let a = e.subscribe(({ command: n, current: r }) => {
7494
7734
  if (g(r), r.disposed) {
7495
- K(s) === e && z(s, null);
7735
+ K(s) === e && B(s, null);
7496
7736
  return;
7497
7737
  }
7498
7738
  n.action === "setResponse" && t.onResponseChange?.(n.responseIdentifier, r.responses[n.responseIdentifier]);
7499
7739
  });
7500
7740
  return () => {
7501
- a(), i && e?.dispose(), K(s) === e && (z(s, null), z(c, null));
7741
+ a(), i && e?.dispose(), K(s) === e && (B(s, null), B(c, null));
7502
7742
  };
7503
7743
  } catch (n) {
7504
- i && e?.dispose(), z(l, n instanceof Error ? n.message : t.i18n?.t("item.parsingError") ?? "item.parsingError", !0), z(s, null), z(c, null);
7744
+ i && e?.dispose(), B(l, n instanceof Error ? n.message : t.i18n?.t("item.parsingError") ?? "item.parsingError", !0), B(s, null), B(c, null);
7505
7745
  }
7506
7746
  }), Qr(() => {
7507
7747
  let e = r(), n = K(s);
@@ -7513,11 +7753,11 @@ function Hd(e, t) {
7513
7753
  responses: e
7514
7754
  });
7515
7755
  } catch (e) {
7516
- z(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7756
+ B(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7517
7757
  }
7518
7758
  });
7519
7759
  function _(e) {
7520
- z(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7760
+ B(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7521
7761
  }
7522
7762
  function v(e = !0) {
7523
7763
  if (K(s)) try {
@@ -7529,7 +7769,7 @@ function Hd(e, t) {
7529
7769
  countAttempt: e
7530
7770
  }), r = n.result?.scoring;
7531
7771
  if (!r) throw Error("Item session submission did not produce a scoring result");
7532
- z(u, r.modalFeedback || [], !0);
7772
+ B(u, r.modalFeedback || [], !0);
7533
7773
  let i = { ...n.current.responses };
7534
7774
  if (t.onSubmit?.(i, r), K(d)) {
7535
7775
  let e = r;
@@ -7537,18 +7777,18 @@ function Hd(e, t) {
7537
7777
  }
7538
7778
  return r;
7539
7779
  } catch (e) {
7540
- z(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7780
+ B(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7541
7781
  }
7542
7782
  }
7543
7783
  function y() {
7544
- z(u, [], !0);
7784
+ B(u, [], !0);
7545
7785
  }
7546
- var b = { submit: v }, ee = Bd(), x = V(ee), S = (e) => {
7547
- var t = Nd(), n = V(t), r = V(n, !0);
7786
+ var b = { submit: v }, ee = yf(), x = V(ee), S = (e) => {
7787
+ var t = ff(), n = V(t), r = V(n, !0);
7548
7788
  k(n), k(t), H(() => _a(r, K(l))), J(e, t);
7549
7789
  }, te = (e) => {
7550
- var n = Rd(), r = Vr(n);
7551
- Ed(r, {
7790
+ var n = _f(), r = Vr(n);
7791
+ af(r, {
7552
7792
  get session() {
7553
7793
  return K(s);
7554
7794
  },
@@ -7570,14 +7810,14 @@ function Hd(e, t) {
7570
7810
  onError: _
7571
7811
  });
7572
7812
  var l = Hr(r, 2), g = (e) => {
7573
- var n = Ld(), r = V(n), i = V(r, !0);
7813
+ var n = gf(), r = V(n), i = V(r, !0);
7574
7814
  k(r);
7575
7815
  var a = Hr(r, 2), o = (e) => {
7576
- var n = Id(), r = V(n), i = (e) => {
7577
- var n = Pd(), r = V(n, !0);
7816
+ var n = hf(), r = V(n), i = (e) => {
7817
+ var n = pf(), r = V(n, !0);
7578
7818
  k(n), H((e) => _a(r, e), [() => t.i18n?.t("item.complete") ?? "item.complete"]), J(e, n);
7579
7819
  }, a = (e) => {
7580
- var n = Fd(), r = V(n, !0);
7820
+ var n = mf(), r = V(n, !0);
7581
7821
  k(n), H((e) => _a(r, e), [() => t.i18n?.t("item.attempt", { numAttempts: K(p) + 1 }) ?? `item.attempt (${K(p) + 1})`]), J(e, n);
7582
7822
  };
7583
7823
  ja(r, (e) => {
@@ -7592,7 +7832,7 @@ function Hd(e, t) {
7592
7832
  };
7593
7833
  ja(l, (e) => {
7594
7834
  K(h) === "candidate" && !i() && K(o) && e(g);
7595
- }), Md(Hr(l, 2), {
7835
+ }), df(Hr(l, 2), {
7596
7836
  get feedback() {
7597
7837
  return K(u);
7598
7838
  },
@@ -7605,7 +7845,7 @@ function Hd(e, t) {
7605
7845
  }
7606
7846
  }), J(e, n);
7607
7847
  }, C = (e) => {
7608
- var n = zd(), r = V(n), i = V(r, !0);
7848
+ var n = vf(), r = V(n), i = V(r, !0);
7609
7849
  k(r), k(n), H((e) => _a(i, e), [() => t.i18n?.t("item.loading") ?? "item.loading"]), J(e, n);
7610
7850
  };
7611
7851
  return ja(x, (e) => {
@@ -7615,16 +7855,17 @@ function Hd(e, t) {
7615
7855
  ca(["click"]);
7616
7856
  //#endregion
7617
7857
  //#region src/element-class.ts
7618
- var Ud = globalThis.HTMLElement ?? class {}, Wd = /* @__PURE__ */ new WeakMap(), Gd = /* @__PURE__ */ new WeakMap(), Kd = /* @__PURE__ */ new WeakMap(), qd = /* @__PURE__ */ new WeakMap(), Jd = /* @__PURE__ */ new WeakMap(), Yd = /* @__PURE__ */ new WeakMap(), Xd = /* @__PURE__ */ new WeakMap(), Zd = /* @__PURE__ */ new WeakMap(), Qd = /* @__PURE__ */ new WeakMap(), $d = /* @__PURE__ */ new WeakMap(), ef = /* @__PURE__ */ new WeakMap(), tf = /* @__PURE__ */ new WeakMap(), nf = /* @__PURE__ */ new WeakMap(), rf = /* @__PURE__ */ new WeakMap(), af = /* @__PURE__ */ new WeakMap(), of = /* @__PURE__ */ new WeakMap(), sf = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), cf = class extends Ud {
7858
+ var Sf = globalThis.HTMLElement ?? class {}, Cf = /* @__PURE__ */ new WeakMap(), wf = /* @__PURE__ */ new WeakMap(), Tf = /* @__PURE__ */ new WeakMap(), Ef = /* @__PURE__ */ new WeakMap(), Df = /* @__PURE__ */ new WeakMap(), Of = /* @__PURE__ */ new WeakMap(), kf = /* @__PURE__ */ new WeakMap(), Af = /* @__PURE__ */ new WeakMap(), jf = /* @__PURE__ */ new WeakMap(), Mf = /* @__PURE__ */ new WeakMap(), Nf = /* @__PURE__ */ new WeakMap(), Pf = /* @__PURE__ */ new WeakMap(), Ff = /* @__PURE__ */ new WeakMap(), If = /* @__PURE__ */ new WeakMap(), Lf = /* @__PURE__ */ new WeakMap(), Rf = /* @__PURE__ */ new WeakMap(), zf = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), Bf = class extends Sf {
7619
7859
  constructor(...e) {
7620
- super(...e), Kt(this, Q), j(this, Wd, a({
7860
+ super(...e), Kt(this, Q), j(this, Cf, a({
7621
7861
  host: this,
7622
- mount: (e, t) => va(Hd, {
7862
+ createSubscriber: Wt,
7863
+ mount: (e, t) => va(xf, {
7623
7864
  target: e,
7624
7865
  props: t
7625
7866
  }),
7626
7867
  unmount: Sa
7627
- })), j(this, Gd, ""), j(this, Kd, "candidate"), j(this, qd, !1), j(this, Jd, void 0), j(this, Yd, !0), j(this, Xd, void 0), j(this, Zd, void 0), j(this, Qd, void 0), j(this, $d, void 0), j(this, ef, void 0), j(this, tf, void 0), j(this, nf, void 0), j(this, rf, void 0), j(this, af, void 0), j(this, of, void 0), j(this, sf, void 0);
7868
+ })), j(this, wf, ""), j(this, Tf, "candidate"), j(this, Ef, !1), j(this, Df, void 0), j(this, Of, !0), j(this, kf, void 0), j(this, Af, void 0), j(this, jf, void 0), j(this, Mf, void 0), j(this, Nf, void 0), j(this, Pf, void 0), j(this, Ff, void 0), j(this, If, void 0), j(this, Lf, void 0), j(this, Rf, void 0), j(this, zf, void 0);
7628
7869
  }
7629
7870
  static get observedAttributes() {
7630
7871
  return [
@@ -7635,103 +7876,103 @@ var Ud = globalThis.HTMLElement ?? class {}, Wd = /* @__PURE__ */ new WeakMap(),
7635
7876
  ];
7636
7877
  }
7637
7878
  get itemXml() {
7638
- return P(Gd, this);
7879
+ return P(wf, this);
7639
7880
  }
7640
7881
  set itemXml(e) {
7641
- N(Gd, this, e ?? ""), M(Q, this, $).call(this);
7882
+ N(wf, this, e ?? ""), M(Q, this, $).call(this);
7642
7883
  }
7643
7884
  get role() {
7644
- return P(Kd, this);
7885
+ return P(Tf, this);
7645
7886
  }
7646
7887
  set role(e) {
7647
- N(Kd, this, e ?? "candidate"), M(Q, this, $).call(this);
7888
+ N(Tf, this, e ?? "candidate"), M(Q, this, $).call(this);
7648
7889
  }
7649
7890
  get disabled() {
7650
- return P(qd, this);
7891
+ return P(Ef, this);
7651
7892
  }
7652
7893
  set disabled(e) {
7653
- N(qd, this, !!e), M(Q, this, $).call(this);
7894
+ N(Ef, this, !!e), M(Q, this, $).call(this);
7654
7895
  }
7655
7896
  get locale() {
7656
- return P(Jd, this);
7897
+ return P(Df, this);
7657
7898
  }
7658
7899
  set locale(e) {
7659
- N(Jd, this, e ?? void 0), M(Q, this, $).call(this);
7900
+ N(Df, this, e ?? void 0), M(Q, this, $).call(this);
7660
7901
  }
7661
7902
  get renderItemBodyRubrics() {
7662
- return P(Yd, this);
7903
+ return P(Of, this);
7663
7904
  }
7664
7905
  set renderItemBodyRubrics(e) {
7665
- N(Yd, this, e !== !1), M(Q, this, $).call(this);
7906
+ N(Of, this, e !== !1), M(Q, this, $).call(this);
7666
7907
  }
7667
7908
  get typeset() {
7668
- return P(Xd, this);
7909
+ return P(kf, this);
7669
7910
  }
7670
7911
  set typeset(e) {
7671
- N(Xd, this, e), M(Q, this, $).call(this);
7912
+ N(kf, this, e), M(Q, this, $).call(this);
7672
7913
  }
7673
7914
  get i18n() {
7674
- return P(Zd, this);
7915
+ return P(Af, this);
7675
7916
  }
7676
7917
  set i18n(e) {
7677
- N(Zd, this, e), M(Q, this, $).call(this);
7918
+ N(Af, this, e), M(Q, this, $).call(this);
7678
7919
  }
7679
7920
  get security() {
7680
- return P(Qd, this);
7921
+ return P(jf, this);
7681
7922
  }
7682
7923
  set security(e) {
7683
- N(Qd, this, e), M(Q, this, $).call(this);
7924
+ N(jf, this, e), M(Q, this, $).call(this);
7684
7925
  }
7685
7926
  get pnp() {
7686
- return P($d, this);
7927
+ return P(Mf, this);
7687
7928
  }
7688
7929
  set pnp(e) {
7689
- N($d, this, e), M(Q, this, $).call(this);
7930
+ N(Mf, this, e), M(Q, this, $).call(this);
7690
7931
  }
7691
7932
  get deliveryContext() {
7692
- return P(ef, this);
7933
+ return P(Nf, this);
7693
7934
  }
7694
7935
  set deliveryContext(e) {
7695
- N(ef, this, e), M(Q, this, $).call(this);
7936
+ N(Nf, this, e), M(Q, this, $).call(this);
7696
7937
  }
7697
7938
  get pci() {
7698
- return P(rf, this);
7939
+ return P(If, this);
7699
7940
  }
7700
7941
  set pci(e) {
7701
- N(rf, this, e), M(Q, this, $).call(this);
7942
+ N(If, this, e), M(Q, this, $).call(this);
7702
7943
  }
7703
7944
  get plugins() {
7704
- return P(af, this);
7945
+ return P(Lf, this);
7705
7946
  }
7706
7947
  set plugins(e) {
7707
- N(af, this, e ? Object.freeze([...e]) : void 0), M(Q, this, $).call(this);
7948
+ N(Lf, this, e ? Object.freeze([...e]) : void 0), M(Q, this, $).call(this);
7708
7949
  }
7709
7950
  get resolveProcessingFragment() {
7710
- return P(tf, this);
7951
+ return P(Pf, this);
7711
7952
  }
7712
7953
  set resolveProcessingFragment(e) {
7713
- N(tf, this, e), M(Q, this, $).call(this);
7954
+ N(Pf, this, e), M(Q, this, $).call(this);
7714
7955
  }
7715
7956
  get processingFragmentLimits() {
7716
- return P(nf, this);
7957
+ return P(Ff, this);
7717
7958
  }
7718
7959
  set processingFragmentLimits(e) {
7719
- N(nf, this, e), M(Q, this, $).call(this);
7960
+ N(Ff, this, e), M(Q, this, $).call(this);
7720
7961
  }
7721
7962
  get responses() {
7722
- return P(sf, this);
7963
+ return P(zf, this);
7723
7964
  }
7724
7965
  get session() {
7725
- return P(of, this);
7966
+ return P(Rf, this);
7726
7967
  }
7727
7968
  set session(e) {
7728
- N(of, this, e), M(Q, this, $).call(this);
7969
+ N(Rf, this, e), M(Q, this, $).call(this);
7729
7970
  }
7730
7971
  set responses(e) {
7731
- N(sf, this, e ? { ...e } : void 0), M(Q, this, $).call(this);
7972
+ N(zf, this, e ? { ...e } : void 0), M(Q, this, $).call(this);
7732
7973
  }
7733
7974
  connectedCallback() {
7734
- P(Wd, this).mountOrUpdate(M(Q, this, uf).call(this)), queueMicrotask(() => {
7975
+ P(Cf, this).mountOrUpdate(M(Q, this, Hf).call(this)), queueMicrotask(() => {
7735
7976
  this.isConnected && this.dispatchEvent(new CustomEvent("ready", {
7736
7977
  bubbles: !0,
7737
7978
  composed: !0
@@ -7739,50 +7980,50 @@ var Ud = globalThis.HTMLElement ?? class {}, Wd = /* @__PURE__ */ new WeakMap(),
7739
7980
  });
7740
7981
  }
7741
7982
  disconnectedCallback() {
7742
- P(Wd, this).teardown({ removeContainer: !0 });
7983
+ P(Cf, this).teardown({ removeContainer: !0 });
7743
7984
  }
7744
7985
  attributeChangedCallback(e, t, n) {
7745
- e === "item-xml" ? N(Gd, this, n ?? "") : e === "role" ? N(Kd, this, n ?? "candidate") : e === "disabled" ? N(qd, this, n !== null) : e === "locale" && N(Jd, this, n ?? void 0), M(Q, this, $).call(this);
7986
+ e === "item-xml" ? N(wf, this, n ?? "") : e === "role" ? N(Tf, this, n ?? "candidate") : e === "disabled" ? N(Ef, this, n !== null) : e === "locale" && N(Df, this, n ?? void 0), M(Q, this, $).call(this);
7746
7987
  }
7747
7988
  submit(e = !0) {
7748
- return P(Wd, this).instance?.submit(e);
7989
+ return P(Cf, this).instance?.submit(e);
7749
7990
  }
7750
7991
  addEventListener(e, t, n) {
7751
7992
  super.addEventListener(e, t, n);
7752
7993
  }
7753
7994
  };
7754
- function lf() {
7755
- return !P(Zd, this) || !P(Jd, this) ? P(Zd, this) : P(Zd, this).withLocale?.(P(Jd, this)) ?? P(Zd, this);
7995
+ function Vf() {
7996
+ return !P(Af, this) || !P(Df, this) ? P(Af, this) : P(Af, this).withLocale?.(P(Df, this)) ?? P(Af, this);
7756
7997
  }
7757
- function uf() {
7998
+ function Hf() {
7758
7999
  return {
7759
- itemXml: P(Gd, this),
7760
- session: P(of, this),
7761
- role: P(Kd, this),
7762
- disabled: P(qd, this),
7763
- renderItemBodyRubrics: P(Yd, this),
7764
- typeset: P(Xd, this),
7765
- i18n: M(Q, this, lf).call(this),
8000
+ itemXml: P(wf, this),
8001
+ session: P(Rf, this),
8002
+ role: P(Tf, this),
8003
+ disabled: P(Ef, this),
8004
+ renderItemBodyRubrics: P(Of, this),
8005
+ typeset: P(kf, this),
8006
+ i18n: M(Q, this, Vf).call(this),
7766
8007
  security: {
7767
- ...P(Qd, this) ?? {},
8008
+ ...P(jf, this) ?? {},
7768
8009
  parsingLimits: {
7769
8010
  enabled: !0,
7770
- ...P(Qd, this)?.parsingLimits ?? {}
8011
+ ...P(jf, this)?.parsingLimits ?? {}
7771
8012
  }
7772
8013
  },
7773
- pnp: P($d, this),
7774
- deliveryContext: P(ef, this),
7775
- resolveProcessingFragment: P(tf, this),
7776
- processingFragmentLimits: P(nf, this),
7777
- pci: P(rf, this),
7778
- plugins: P(af, this),
7779
- responses: P(sf, this),
8014
+ pnp: P(Mf, this),
8015
+ deliveryContext: P(Nf, this),
8016
+ resolveProcessingFragment: P(Pf, this),
8017
+ processingFragmentLimits: P(Ff, this),
8018
+ pci: P(If, this),
8019
+ plugins: P(Lf, this),
8020
+ responses: P(zf, this),
7780
8021
  onResponseChange: (e, t) => {
7781
- let n = P(of, this) ? { ...P(of, this).state().responses } : {
7782
- ...P(sf, this) ?? {},
8022
+ let n = P(Rf, this) ? { ...P(Rf, this).state().responses } : {
8023
+ ...P(zf, this) ?? {},
7783
8024
  [e]: t
7784
8025
  };
7785
- N(sf, this, n), this.dispatchEvent(new CustomEvent("response-change", {
8026
+ N(zf, this, n), this.dispatchEvent(new CustomEvent("response-change", {
7786
8027
  detail: {
7787
8028
  responseId: e,
7788
8029
  value: t,
@@ -7794,7 +8035,7 @@ function uf() {
7794
8035
  },
7795
8036
  onSubmit: (e, t) => {
7796
8037
  let n = { ...e };
7797
- N(sf, this, n), this.dispatchEvent(new CustomEvent("submit", {
8038
+ N(zf, this, n), this.dispatchEvent(new CustomEvent("submit", {
7798
8039
  detail: {
7799
8040
  responses: n,
7800
8041
  result: t
@@ -7814,9 +8055,9 @@ function uf() {
7814
8055
  };
7815
8056
  }
7816
8057
  function $() {
7817
- P(Wd, this).update(M(Q, this, uf).call(this));
8058
+ P(Cf, this).update(M(Q, this, Hf).call(this));
7818
8059
  }
7819
8060
  //#endregion
7820
- export { cf as t };
8061
+ export { Bf as t };
7821
8062
 
7822
- //# sourceMappingURL=element-class-DWoLXp_r.js.map
8063
+ //# sourceMappingURL=element-class-DQy2cIPM.js.map