@pie-qti/player-elements 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{define-CLdVOnMl.js → define-B9h1kNmq.js} +4 -4
- package/dist/{define-CLdVOnMl.js.map → define-B9h1kNmq.js.map} +1 -1
- package/dist/{element-Bekvepqe.js → element-CSO0tq-A.js} +2 -2
- package/dist/{element-Bekvepqe.js.map → element-CSO0tq-A.js.map} +1 -1
- package/dist/{element-class-C8OTgYHE-DsvwOAOP.js → element-class-BEpwHdcP-BHKRGZoi.js} +432 -417
- package/dist/{element-class-C8OTgYHE-DsvwOAOP.js.map → element-class-BEpwHdcP-BHKRGZoi.js.map} +1 -1
- package/dist/elements.js +3 -3
- package/dist/index.js +2 -2
- package/dist/register-players.js +1 -1
- package/dist/register.js +4860 -4845
- package/dist/register.js.map +1 -1
- package/dist/{resolveItems-Bp65Mj_Z.js → resolveItems-CLMM7L3B.js} +81 -66
- package/dist/{resolveItems-Bp65Mj_Z.js.map → resolveItems-CLMM7L3B.js.map} +1 -1
- package/package.json +6 -6
|
@@ -9634,7 +9634,7 @@ function Qo(e) {
|
|
|
9634
9634
|
});
|
|
9635
9635
|
}
|
|
9636
9636
|
//#endregion
|
|
9637
|
-
//#region ../item-player/dist/element-class-
|
|
9637
|
+
//#region ../item-player/dist/element-class-BEpwHdcP.js
|
|
9638
9638
|
var $o = Array.isArray, es = Array.prototype.indexOf, ts = Array.prototype.includes, ns = Array.from, rs = Object.defineProperty, is = Object.getOwnPropertyDescriptor, as = Object.getOwnPropertyDescriptors, os = Object.prototype, ss = Array.prototype, cs = Object.getPrototypeOf, ls = Object.isExtensible, us = () => {};
|
|
9639
9639
|
function ds(e) {
|
|
9640
9640
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
@@ -12805,7 +12805,20 @@ function Pm(e) {
|
|
|
12805
12805
|
});
|
|
12806
12806
|
return r || !n || /url\(/i.test(i);
|
|
12807
12807
|
}
|
|
12808
|
-
function Fm(e
|
|
12808
|
+
function Fm(e) {
|
|
12809
|
+
let t = e.parentNode;
|
|
12810
|
+
for (; t;) {
|
|
12811
|
+
if (t.rawTagName?.toLowerCase() === "svg") return !0;
|
|
12812
|
+
t = t.parentNode;
|
|
12813
|
+
}
|
|
12814
|
+
return !1;
|
|
12815
|
+
}
|
|
12816
|
+
function Im(e, t, n, r) {
|
|
12817
|
+
let i = [...e.childNodes];
|
|
12818
|
+
for (let e of i) e.rawTagName && Lm(e, t, n, r + 1);
|
|
12819
|
+
e.replaceWith(...e.childNodes);
|
|
12820
|
+
}
|
|
12821
|
+
function Lm(e, t, n, r) {
|
|
12809
12822
|
if (n.enabled) {
|
|
12810
12823
|
if (r > n.maxDepth) throw new bm(`HTML depth exceeds maxHtmlDepth (${r} > ${n.maxDepth})`);
|
|
12811
12824
|
if (n.nodes++, n.nodes > n.maxNodes) throw new bm(`HTML node count exceeds maxHtmlNodes (${n.nodes} > ${n.maxNodes})`);
|
|
@@ -12816,7 +12829,11 @@ function Fm(e, t, n, r) {
|
|
|
12816
12829
|
return;
|
|
12817
12830
|
}
|
|
12818
12831
|
if (i && Nm.has(i)) {
|
|
12819
|
-
e
|
|
12832
|
+
if (Fm(e)) {
|
|
12833
|
+
e.remove();
|
|
12834
|
+
return;
|
|
12835
|
+
}
|
|
12836
|
+
Im(e, t, n, r);
|
|
12820
12837
|
return;
|
|
12821
12838
|
}
|
|
12822
12839
|
if (i === "iframe" && !Cm(t)) {
|
|
@@ -12824,7 +12841,7 @@ function Fm(e, t, n, r) {
|
|
|
12824
12841
|
return;
|
|
12825
12842
|
}
|
|
12826
12843
|
if ((i === "object" || i === "embed") && !Sm(t)) {
|
|
12827
|
-
let n =
|
|
12844
|
+
let n = Bm(e, t);
|
|
12828
12845
|
if (n) {
|
|
12829
12846
|
e.replaceWith(n);
|
|
12830
12847
|
return;
|
|
@@ -12837,9 +12854,7 @@ function Fm(e, t, n, r) {
|
|
|
12837
12854
|
return;
|
|
12838
12855
|
}
|
|
12839
12856
|
if (i?.includes("-") && !jm(i)) {
|
|
12840
|
-
|
|
12841
|
-
for (let e of i) e.rawTagName && Fm(e, t, n, r + 1);
|
|
12842
|
-
e.replaceWith(...e.childNodes);
|
|
12857
|
+
Im(e, t, n, r);
|
|
12843
12858
|
return;
|
|
12844
12859
|
}
|
|
12845
12860
|
let a = e.attributes || {};
|
|
@@ -12884,9 +12899,9 @@ function Fm(e, t, n, r) {
|
|
|
12884
12899
|
}
|
|
12885
12900
|
}
|
|
12886
12901
|
let o = e.childNodes.filter((e) => e.rawTagName);
|
|
12887
|
-
for (let e of o)
|
|
12902
|
+
for (let e of o) Lm(e, t, n, r + 1);
|
|
12888
12903
|
}
|
|
12889
|
-
function
|
|
12904
|
+
function Rm(e, t) {
|
|
12890
12905
|
if (!e || typeof e != "string") return "";
|
|
12891
12906
|
try {
|
|
12892
12907
|
let n = Mp(t?.security);
|
|
@@ -12900,16 +12915,16 @@ function Im(e, t) {
|
|
|
12900
12915
|
maxNodes: n.maxHtmlNodes,
|
|
12901
12916
|
maxDepth: n.maxHtmlDepth
|
|
12902
12917
|
};
|
|
12903
|
-
for (let e of i)
|
|
12918
|
+
for (let e of i) Lm(e, t, a, 1);
|
|
12904
12919
|
return r.toString();
|
|
12905
12920
|
} catch (e) {
|
|
12906
12921
|
return e instanceof bm || console.error("HTML sanitization failed:", e), "";
|
|
12907
12922
|
}
|
|
12908
12923
|
}
|
|
12909
|
-
function
|
|
12910
|
-
return !e || typeof e != "string" ? "" : /<[^>]+>/.test(e) ?
|
|
12924
|
+
function zm(e, t) {
|
|
12925
|
+
return !e || typeof e != "string" ? "" : /<[^>]+>/.test(e) ? Rm(e, t) : e;
|
|
12911
12926
|
}
|
|
12912
|
-
function
|
|
12927
|
+
function Bm(e, t) {
|
|
12913
12928
|
if (e.rawTagName?.toLowerCase() !== "object") return null;
|
|
12914
12929
|
let n = e.getAttribute("type")?.trim().toLowerCase() ?? "", r = e.getAttribute("data")?.trim() ?? "";
|
|
12915
12930
|
if (!n || !r) return null;
|
|
@@ -12932,7 +12947,7 @@ function Rm(e, t) {
|
|
|
12932
12947
|
}
|
|
12933
12948
|
return null;
|
|
12934
12949
|
}
|
|
12935
|
-
var
|
|
12950
|
+
var Vm = {
|
|
12936
12951
|
id: "qti:hottext-interaction",
|
|
12937
12952
|
name: "QTI Standard Hottext Interaction",
|
|
12938
12953
|
priority: 10,
|
|
@@ -12955,7 +12970,7 @@ var zm = {
|
|
|
12955
12970
|
};
|
|
12956
12971
|
}), 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 = "";
|
|
12957
12972
|
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);
|
|
12958
|
-
return f =
|
|
12973
|
+
return f = Rm(f, { security: t.config.security }), {
|
|
12959
12974
|
hottextChoices: i,
|
|
12960
12975
|
contentHtml: f,
|
|
12961
12976
|
maxChoices: a,
|
|
@@ -12978,7 +12993,7 @@ var zm = {
|
|
|
12978
12993
|
warnings: n.length > 0 ? n : void 0
|
|
12979
12994
|
};
|
|
12980
12995
|
}
|
|
12981
|
-
},
|
|
12996
|
+
}, Hm = {
|
|
12982
12997
|
id: "qti:inline-choice-interaction",
|
|
12983
12998
|
name: "QTI Standard Inline Choice Interaction",
|
|
12984
12999
|
priority: 10,
|
|
@@ -13017,7 +13032,7 @@ var zm = {
|
|
|
13017
13032
|
warnings: n.length > 0 ? n : void 0
|
|
13018
13033
|
};
|
|
13019
13034
|
}
|
|
13020
|
-
},
|
|
13035
|
+
}, Um = {
|
|
13021
13036
|
id: "qti:match-interaction",
|
|
13022
13037
|
name: "QTI Standard Match Interaction",
|
|
13023
13038
|
priority: 10,
|
|
@@ -13096,7 +13111,7 @@ var zm = {
|
|
|
13096
13111
|
errors: t.length > 0 ? t : void 0
|
|
13097
13112
|
};
|
|
13098
13113
|
}
|
|
13099
|
-
},
|
|
13114
|
+
}, Wm = {
|
|
13100
13115
|
id: "qti:media-interaction",
|
|
13101
13116
|
name: "QTI Standard Media Interaction",
|
|
13102
13117
|
priority: 10,
|
|
@@ -13161,7 +13176,7 @@ var zm = {
|
|
|
13161
13176
|
warnings: n.length > 0 ? n : void 0
|
|
13162
13177
|
};
|
|
13163
13178
|
}
|
|
13164
|
-
},
|
|
13179
|
+
}, Gm = {
|
|
13165
13180
|
id: "qti:order-interaction",
|
|
13166
13181
|
name: "QTI Standard Order Interaction",
|
|
13167
13182
|
priority: 10,
|
|
@@ -13206,7 +13221,7 @@ var zm = {
|
|
|
13206
13221
|
};
|
|
13207
13222
|
}
|
|
13208
13223
|
};
|
|
13209
|
-
function
|
|
13224
|
+
function Km(e, t, n, r) {
|
|
13210
13225
|
if (!e) return null;
|
|
13211
13226
|
let i = t.getAttribute(e, "type", ""), a = t.getAttribute(e, "data", ""), o = t.getAttribute(e, "width", n), s = t.getAttribute(e, "height", r), c = t.getHtmlContent(e);
|
|
13212
13227
|
return i.startsWith("image/svg") && /<svg[\s>]/i.test(c) ? {
|
|
@@ -13221,7 +13236,7 @@ function Wm(e, t, n, r) {
|
|
|
13221
13236
|
height: s
|
|
13222
13237
|
};
|
|
13223
13238
|
}
|
|
13224
|
-
var
|
|
13239
|
+
var qm = {
|
|
13225
13240
|
id: "qti:position-object-interaction",
|
|
13226
13241
|
name: "QTI Standard Position Object Interaction",
|
|
13227
13242
|
priority: 10,
|
|
@@ -13232,7 +13247,7 @@ var Gm = {
|
|
|
13232
13247
|
return t === "positionobjectinteraction" || t === "qti-position-object-interaction";
|
|
13233
13248
|
},
|
|
13234
13249
|
extract(e, t) {
|
|
13235
|
-
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 =
|
|
13250
|
+
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 = Km(s, n, "500", "300"), u = Km(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);
|
|
13236
13251
|
return {
|
|
13237
13252
|
imageData: l,
|
|
13238
13253
|
positionObjectStages: [{
|
|
@@ -13258,7 +13273,7 @@ var Gm = {
|
|
|
13258
13273
|
warnings: n.length > 0 ? n : void 0
|
|
13259
13274
|
};
|
|
13260
13275
|
}
|
|
13261
|
-
},
|
|
13276
|
+
}, Jm = {
|
|
13262
13277
|
id: "qti:portable-custom-interaction",
|
|
13263
13278
|
name: "QTI Portable Custom Interaction",
|
|
13264
13279
|
priority: 20,
|
|
@@ -13269,29 +13284,29 @@ var Gm = {
|
|
|
13269
13284
|
],
|
|
13270
13285
|
description: "Extracts QTI 2.x/3.0 portable custom interaction module paths, markup, and config",
|
|
13271
13286
|
canHandle(e, t) {
|
|
13272
|
-
let n =
|
|
13273
|
-
return n === "portablecustominteraction" || n === "qti-portable-custom-interaction" || n === "custominteraction" &&
|
|
13287
|
+
let n = Ym(e);
|
|
13288
|
+
return n === "portablecustominteraction" || n === "qti-portable-custom-interaction" || n === "custominteraction" && Xm(e, ["portablecustominteraction"]) !== null;
|
|
13274
13289
|
},
|
|
13275
13290
|
extract(e, t) {
|
|
13276
|
-
let { utils: n } = t, r =
|
|
13291
|
+
let { utils: n } = t, r = Ym(e) === "custominteraction" ? Xm(e, ["portablecustominteraction"]) : e;
|
|
13277
13292
|
if (!r) throw Error("customInteraction does not contain a portableCustomInteraction payload");
|
|
13278
|
-
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 =
|
|
13293
|
+
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 = Xm(r, ["interactionmodules", "qti-interaction-modules"]);
|
|
13279
13294
|
if (c) {
|
|
13280
|
-
let e =
|
|
13295
|
+
let e = Xm(c, ["interactionmodule", "qti-interaction-module"]);
|
|
13281
13296
|
if (e) {
|
|
13282
13297
|
o = n.getAttribute(e, "primaryPath") || n.getAttribute(e, "primary-path") || "";
|
|
13283
13298
|
let t = n.getAttribute(e, "fallbackPath") || n.getAttribute(e, "fallback-path") || "";
|
|
13284
13299
|
t && (s = t);
|
|
13285
13300
|
}
|
|
13286
13301
|
}
|
|
13287
|
-
let l =
|
|
13302
|
+
let l = Xm(r, ["instance"]);
|
|
13288
13303
|
if (!o && l) {
|
|
13289
|
-
let e =
|
|
13304
|
+
let e = Zm(l, ["script"]).find((e) => !!n.getAttribute(e, "src"));
|
|
13290
13305
|
o = e ? n.getAttribute(e, "src") : "";
|
|
13291
13306
|
}
|
|
13292
|
-
let u =
|
|
13307
|
+
let u = Xm(r, ["interactionmarkup", "qti-interaction-markup"]) ?? l, d = u ? n.getHtmlContent(u) : "", f = {}, p = Xm(r, ["pciproperties", "qti-pci-properties"]);
|
|
13293
13308
|
if (p) {
|
|
13294
|
-
let e =
|
|
13309
|
+
let e = Zm(p, ["pciproperty", "qti-pci-property"]);
|
|
13295
13310
|
for (let t of e) {
|
|
13296
13311
|
let e = n.getAttribute(t, "key") || n.getAttribute(t, "name") || "", r = n.getAttribute(t, "value") || (t.textContent ?? "").trim() || "";
|
|
13297
13312
|
e && (f[e] = r);
|
|
@@ -13316,23 +13331,23 @@ var Gm = {
|
|
|
13316
13331
|
};
|
|
13317
13332
|
}
|
|
13318
13333
|
};
|
|
13319
|
-
function
|
|
13334
|
+
function Ym(e) {
|
|
13320
13335
|
let t = e.rawTagName?.toLowerCase() ?? "";
|
|
13321
13336
|
return t.includes(":") ? t.slice(t.lastIndexOf(":") + 1) : t;
|
|
13322
13337
|
}
|
|
13323
|
-
function
|
|
13324
|
-
return
|
|
13338
|
+
function Xm(e, t) {
|
|
13339
|
+
return Zm(e, t)[0] ?? null;
|
|
13325
13340
|
}
|
|
13326
|
-
function
|
|
13341
|
+
function Zm(e, t) {
|
|
13327
13342
|
let n = new Set(t.map((e) => e.toLowerCase())), r = [], i = (e) => {
|
|
13328
13343
|
for (let t of e.childNodes ?? []) {
|
|
13329
13344
|
let e = t;
|
|
13330
|
-
e.rawTagName && (n.has(
|
|
13345
|
+
e.rawTagName && (n.has(Ym(e)) && r.push(e), i(e));
|
|
13331
13346
|
}
|
|
13332
13347
|
};
|
|
13333
13348
|
return i(e), r;
|
|
13334
13349
|
}
|
|
13335
|
-
var
|
|
13350
|
+
var Qm = [
|
|
13336
13351
|
{
|
|
13337
13352
|
type: "choiceInteraction",
|
|
13338
13353
|
extractor: Bp,
|
|
@@ -13378,17 +13393,17 @@ var Xm = [
|
|
|
13378
13393
|
},
|
|
13379
13394
|
{
|
|
13380
13395
|
type: "inlineChoiceInteraction",
|
|
13381
|
-
extractor:
|
|
13396
|
+
extractor: Hm,
|
|
13382
13397
|
placement: "inline"
|
|
13383
13398
|
},
|
|
13384
13399
|
{
|
|
13385
13400
|
type: "orderInteraction",
|
|
13386
|
-
extractor:
|
|
13401
|
+
extractor: Gm,
|
|
13387
13402
|
placement: "block"
|
|
13388
13403
|
},
|
|
13389
13404
|
{
|
|
13390
13405
|
type: "matchInteraction",
|
|
13391
|
-
extractor:
|
|
13406
|
+
extractor: Um,
|
|
13392
13407
|
placement: "block"
|
|
13393
13408
|
},
|
|
13394
13409
|
{
|
|
@@ -13495,17 +13510,17 @@ var Xm = [
|
|
|
13495
13510
|
},
|
|
13496
13511
|
{
|
|
13497
13512
|
type: "portableCustomInteraction",
|
|
13498
|
-
extractor:
|
|
13513
|
+
extractor: Jm,
|
|
13499
13514
|
placement: "block"
|
|
13500
13515
|
},
|
|
13501
13516
|
{
|
|
13502
13517
|
type: "mediaInteraction",
|
|
13503
|
-
extractor:
|
|
13518
|
+
extractor: Wm,
|
|
13504
13519
|
placement: "block"
|
|
13505
13520
|
},
|
|
13506
13521
|
{
|
|
13507
13522
|
type: "hottextInteraction",
|
|
13508
|
-
extractor:
|
|
13523
|
+
extractor: Vm,
|
|
13509
13524
|
placement: "block"
|
|
13510
13525
|
},
|
|
13511
13526
|
{
|
|
@@ -13574,7 +13589,7 @@ var Xm = [
|
|
|
13574
13589
|
},
|
|
13575
13590
|
{
|
|
13576
13591
|
type: "positionObjectInteraction",
|
|
13577
|
-
extractor:
|
|
13592
|
+
extractor: qm,
|
|
13578
13593
|
placement: "block"
|
|
13579
13594
|
},
|
|
13580
13595
|
{
|
|
@@ -13583,27 +13598,27 @@ var Xm = [
|
|
|
13583
13598
|
placement: "block"
|
|
13584
13599
|
}
|
|
13585
13600
|
];
|
|
13586
|
-
function
|
|
13587
|
-
return
|
|
13601
|
+
function $m() {
|
|
13602
|
+
return Qm.map((e) => e.extractor);
|
|
13588
13603
|
}
|
|
13589
|
-
var
|
|
13590
|
-
function
|
|
13604
|
+
var eh = new Map(Qm.map((e) => [e.type.toLowerCase(), e.type]));
|
|
13605
|
+
function th(e) {
|
|
13591
13606
|
let t = e.toLowerCase();
|
|
13592
|
-
return t.startsWith("qti-") ? t.slice(4).replace(/-([a-z])/g, (e, t) => t.toUpperCase()) :
|
|
13607
|
+
return t.startsWith("qti-") ? t.slice(4).replace(/-([a-z])/g, (e, t) => t.toUpperCase()) : eh.get(t) ?? e;
|
|
13593
13608
|
}
|
|
13594
|
-
function
|
|
13595
|
-
let t =
|
|
13596
|
-
return
|
|
13609
|
+
function nh(e) {
|
|
13610
|
+
let t = th(e);
|
|
13611
|
+
return Qm.find((e) => e.type === t) ?? null;
|
|
13597
13612
|
}
|
|
13598
|
-
function
|
|
13599
|
-
return
|
|
13613
|
+
function rh(e) {
|
|
13614
|
+
return nh(e)?.placement === "inline";
|
|
13600
13615
|
}
|
|
13601
|
-
function
|
|
13602
|
-
return th(
|
|
13616
|
+
function ih(e) {
|
|
13617
|
+
return rh(th(e));
|
|
13603
13618
|
}
|
|
13604
|
-
var
|
|
13619
|
+
var ah = class {
|
|
13605
13620
|
constructor({ itemXml: e, elementNameMapper: t, attributeNameMapper: n, security: r }) {
|
|
13606
|
-
this.extractionDocument = null, this.extractionRoot = null, this.itemXml = e, this.security = r, this.mathMlPrefixes =
|
|
13621
|
+
this.extractionDocument = null, this.extractionRoot = null, this.itemXml = e, this.security = r, this.mathMlPrefixes = lh(e), this.elementNameMapper = t, this.attributeNameMapper = n, Np(this.itemXml, this.security), this.xmlDocument = de(this.itemXml), this.assessmentItem = re(this.xmlDocument);
|
|
13607
13622
|
}
|
|
13608
13623
|
getAssessmentItem() {
|
|
13609
13624
|
return this.assessmentItem;
|
|
@@ -13638,7 +13653,7 @@ var rh = class {
|
|
|
13638
13653
|
return this.assessmentItem.getAttribute(this.attributeNameMapper.toNative(e));
|
|
13639
13654
|
}
|
|
13640
13655
|
serializeChildren(e) {
|
|
13641
|
-
return ch(
|
|
13656
|
+
return uh(ch(this.serializeChildNodes(e)), this.mathMlPrefixes);
|
|
13642
13657
|
}
|
|
13643
13658
|
findExtractionElements(e) {
|
|
13644
13659
|
let t = this.getExtractionRoot();
|
|
@@ -13652,7 +13667,7 @@ var rh = class {
|
|
|
13652
13667
|
element: e,
|
|
13653
13668
|
contextRoot: t,
|
|
13654
13669
|
responseIdentifier: a,
|
|
13655
|
-
normalizedType:
|
|
13670
|
+
normalizedType: th(i)
|
|
13656
13671
|
});
|
|
13657
13672
|
}), r;
|
|
13658
13673
|
}
|
|
@@ -13687,7 +13702,7 @@ var rh = class {
|
|
|
13687
13702
|
walkExtractionChildren(e, t) {
|
|
13688
13703
|
for (let n of e.childNodes ?? []) {
|
|
13689
13704
|
let e = n;
|
|
13690
|
-
e.rawTagName && (
|
|
13705
|
+
e.rawTagName && (oh(e.rawTagName) || (t(e), this.walkExtractionChildren(e, t)));
|
|
13691
13706
|
}
|
|
13692
13707
|
}
|
|
13693
13708
|
getExtractionResponseIdentifier(e) {
|
|
@@ -13695,17 +13710,17 @@ var rh = class {
|
|
|
13695
13710
|
return e.getAttribute?.("responseIdentifier") || e.getAttribute?.(t) || e.getAttribute?.("response-identifier") || e.getAttribute?.("responseidentifier") || "";
|
|
13696
13711
|
}
|
|
13697
13712
|
};
|
|
13698
|
-
function
|
|
13713
|
+
function oh(e) {
|
|
13699
13714
|
let t = e.toLowerCase();
|
|
13700
13715
|
return t === "rubricblock" || t === "qti-rubric-block";
|
|
13701
13716
|
}
|
|
13702
|
-
function
|
|
13703
|
-
return new
|
|
13717
|
+
function sh(e) {
|
|
13718
|
+
return new ah(e);
|
|
13704
13719
|
}
|
|
13705
|
-
function
|
|
13720
|
+
function ch(e) {
|
|
13706
13721
|
return e.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, (e, t) => t);
|
|
13707
13722
|
}
|
|
13708
|
-
function
|
|
13723
|
+
function lh(e) {
|
|
13709
13724
|
let t = /* @__PURE__ */ new Set();
|
|
13710
13725
|
for (let n of e.matchAll(/\sxmlns:([A-Za-z_][\w.-]*)=(["'])http:\/\/www\.w3\.org\/1998\/Math\/MathML\2/g)) {
|
|
13711
13726
|
let e = n[1];
|
|
@@ -13713,22 +13728,22 @@ function sh(e) {
|
|
|
13713
13728
|
}
|
|
13714
13729
|
return t;
|
|
13715
13730
|
}
|
|
13716
|
-
function
|
|
13731
|
+
function uh(e, t) {
|
|
13717
13732
|
let n = e;
|
|
13718
13733
|
for (let e of t) {
|
|
13719
|
-
let t =
|
|
13734
|
+
let t = dh(e);
|
|
13720
13735
|
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"), "");
|
|
13721
13736
|
}
|
|
13722
13737
|
return n;
|
|
13723
13738
|
}
|
|
13724
|
-
function
|
|
13739
|
+
function dh(e) {
|
|
13725
13740
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
13726
13741
|
}
|
|
13727
|
-
var
|
|
13742
|
+
var fh = class extends Error {
|
|
13728
13743
|
constructor(e, t, n, r) {
|
|
13729
13744
|
super(e), this.extractorId = t, this.elementType = n, this.cause = r, this.name = "ExtractionError";
|
|
13730
13745
|
}
|
|
13731
|
-
},
|
|
13746
|
+
}, ph = class e {
|
|
13732
13747
|
constructor(e) {
|
|
13733
13748
|
this.extractorsById = /* @__PURE__ */ new Map(), this.extractorsByType = /* @__PURE__ */ new Map(), this.extractorCache = /* @__PURE__ */ new WeakMap(), this.qti2xMapper = new t(), this.elementNameMapper = e;
|
|
13734
13749
|
}
|
|
@@ -13777,7 +13792,7 @@ var uh = class extends Error {
|
|
|
13777
13792
|
let t = e.rawTagName || "unknown";
|
|
13778
13793
|
return {
|
|
13779
13794
|
success: !1,
|
|
13780
|
-
error: new
|
|
13795
|
+
error: new fh(`No extractor available for element '${t}'. Registered types: ${Array.from(this.extractorsByType.keys()).join(", ")}`, "none", t)
|
|
13781
13796
|
};
|
|
13782
13797
|
}
|
|
13783
13798
|
try {
|
|
@@ -13786,7 +13801,7 @@ var uh = class extends Error {
|
|
|
13786
13801
|
let t = n.validate(r);
|
|
13787
13802
|
if (!t.valid) return {
|
|
13788
13803
|
success: !1,
|
|
13789
|
-
error: new
|
|
13804
|
+
error: new fh(`Validation failed for extractor '${n.id}': ${t.errors?.join(", ")}`, n.id, e.rawTagName || "unknown")
|
|
13790
13805
|
};
|
|
13791
13806
|
if (t.warnings && t.warnings.length > 0) return {
|
|
13792
13807
|
success: !0,
|
|
@@ -13802,7 +13817,7 @@ var uh = class extends Error {
|
|
|
13802
13817
|
let r = e.rawTagName || "unknown";
|
|
13803
13818
|
return {
|
|
13804
13819
|
success: !1,
|
|
13805
|
-
error: t instanceof
|
|
13820
|
+
error: t instanceof fh ? t : new fh(`Extraction failed for '${r}': ${t instanceof Error ? t.message : String(t)}`, n.id, r, t instanceof Error ? t : void 0)
|
|
13806
13821
|
};
|
|
13807
13822
|
}
|
|
13808
13823
|
}
|
|
@@ -13826,19 +13841,19 @@ var uh = class extends Error {
|
|
|
13826
13841
|
return t;
|
|
13827
13842
|
}
|
|
13828
13843
|
};
|
|
13829
|
-
function
|
|
13830
|
-
return new
|
|
13844
|
+
function mh(e) {
|
|
13845
|
+
return new ph(e);
|
|
13831
13846
|
}
|
|
13832
|
-
function
|
|
13847
|
+
function hh(e) {
|
|
13833
13848
|
return e?.textContent?.trim() || "";
|
|
13834
13849
|
}
|
|
13835
|
-
function
|
|
13836
|
-
return
|
|
13850
|
+
function gh(e) {
|
|
13851
|
+
return zm(e?.innerHTML?.trim() || "");
|
|
13837
13852
|
}
|
|
13838
|
-
function
|
|
13839
|
-
return e?.childNodes ? e.childNodes.filter((e) =>
|
|
13853
|
+
function _h(e, t, n) {
|
|
13854
|
+
return e?.childNodes ? e.childNodes.filter((e) => Sh(e.rawTagName, t, n)) : [];
|
|
13840
13855
|
}
|
|
13841
|
-
function
|
|
13856
|
+
function vh(e, t, n = !1, r) {
|
|
13842
13857
|
let i = e.getAttribute(t);
|
|
13843
13858
|
if (i == null && r) {
|
|
13844
13859
|
let n = r.toNative(t);
|
|
@@ -13846,7 +13861,7 @@ function gh(e, t, n = !1, r) {
|
|
|
13846
13861
|
}
|
|
13847
13862
|
return i == null ? n : i === "true";
|
|
13848
13863
|
}
|
|
13849
|
-
function
|
|
13864
|
+
function yh(e, t, n, r) {
|
|
13850
13865
|
let i = e.getAttribute(t);
|
|
13851
13866
|
if (i == null && r) {
|
|
13852
13867
|
let n = r.toNative(t);
|
|
@@ -13854,7 +13869,7 @@ function _h(e, t, n, r) {
|
|
|
13854
13869
|
}
|
|
13855
13870
|
return i ? Number(i) : n;
|
|
13856
13871
|
}
|
|
13857
|
-
function
|
|
13872
|
+
function bh(e, t, n = "", r) {
|
|
13858
13873
|
let i = e.getAttribute(t);
|
|
13859
13874
|
if (i == null && r) {
|
|
13860
13875
|
let n = r.toNative(t);
|
|
@@ -13862,26 +13877,26 @@ function vh(e, t, n = "", r) {
|
|
|
13862
13877
|
}
|
|
13863
13878
|
return i || n;
|
|
13864
13879
|
}
|
|
13865
|
-
function
|
|
13880
|
+
function xh(e) {
|
|
13866
13881
|
let t = e.getAttribute("class");
|
|
13867
13882
|
return t ? t.split(/\s+/).filter(Boolean) : [];
|
|
13868
13883
|
}
|
|
13869
|
-
function
|
|
13884
|
+
function Sh(e, t, n) {
|
|
13870
13885
|
if (!e) return !1;
|
|
13871
13886
|
let r = t.toLowerCase(), i = n.toNative(r);
|
|
13872
13887
|
return e.toLowerCase() === i.toLowerCase();
|
|
13873
13888
|
}
|
|
13874
|
-
function
|
|
13889
|
+
function Ch(e, n, r) {
|
|
13875
13890
|
let i = n || new t(), a = r || new v();
|
|
13876
13891
|
return {
|
|
13877
13892
|
getChildrenByTag(e, t) {
|
|
13878
|
-
return
|
|
13893
|
+
return _h(e, t, i);
|
|
13879
13894
|
},
|
|
13880
13895
|
querySelectorAll(e, t) {
|
|
13881
13896
|
let n = t.split(/\s+/), r = [e];
|
|
13882
13897
|
for (let e of n) {
|
|
13883
13898
|
let t = [];
|
|
13884
|
-
for (let n of r) if (
|
|
13899
|
+
for (let n of r) if (Sh(n.rawTagName, e, i) && t.push(n), n.childNodes) for (let r of n.childNodes) typeof r != "string" && Sh(r.rawTagName, e, i) && t.push(r);
|
|
13885
13900
|
r = t;
|
|
13886
13901
|
}
|
|
13887
13902
|
return r;
|
|
@@ -13892,65 +13907,65 @@ function xh(e, n, r) {
|
|
|
13892
13907
|
},
|
|
13893
13908
|
hasChildWithTag(e, t) {
|
|
13894
13909
|
if (!e.childNodes) return !1;
|
|
13895
|
-
for (let n of e.childNodes) if (typeof n != "string" &&
|
|
13910
|
+
for (let n of e.childNodes) if (typeof n != "string" && Sh(n.rawTagName, t, i)) return !0;
|
|
13896
13911
|
return !1;
|
|
13897
13912
|
},
|
|
13898
13913
|
getHtmlContent(t) {
|
|
13899
|
-
return
|
|
13914
|
+
return zm(t?.innerHTML?.trim() || "", { security: e });
|
|
13900
13915
|
},
|
|
13901
13916
|
getTextContent(e) {
|
|
13902
|
-
return
|
|
13917
|
+
return hh(e);
|
|
13903
13918
|
},
|
|
13904
13919
|
getAttribute(e, t, n = "") {
|
|
13905
|
-
return
|
|
13920
|
+
return bh(e, t, n, a);
|
|
13906
13921
|
},
|
|
13907
13922
|
getBooleanAttribute(e, t, n = !1) {
|
|
13908
|
-
return
|
|
13923
|
+
return vh(e, t, n, a);
|
|
13909
13924
|
},
|
|
13910
13925
|
getNumberAttribute(e, t, n = 0) {
|
|
13911
|
-
return
|
|
13926
|
+
return yh(e, t, n, a);
|
|
13912
13927
|
},
|
|
13913
13928
|
getPrompt(e) {
|
|
13914
|
-
let t =
|
|
13915
|
-
return t ?
|
|
13929
|
+
let t = _h(e, "prompt", i)[0];
|
|
13930
|
+
return t ? gh(t) : null;
|
|
13916
13931
|
},
|
|
13917
13932
|
getClasses(e) {
|
|
13918
|
-
return
|
|
13933
|
+
return xh(e);
|
|
13919
13934
|
}
|
|
13920
13935
|
};
|
|
13921
13936
|
}
|
|
13922
|
-
function
|
|
13937
|
+
function wh(e, t, n, r, i, a) {
|
|
13923
13938
|
let o = i.elementNameMapper, s = i.attributeNameMapper;
|
|
13924
13939
|
return {
|
|
13925
13940
|
element: e,
|
|
13926
13941
|
responseId: t,
|
|
13927
13942
|
dom: n,
|
|
13928
13943
|
declarations: r,
|
|
13929
|
-
utils:
|
|
13944
|
+
utils: Ch(i.security, o, s),
|
|
13930
13945
|
config: i,
|
|
13931
13946
|
...a ? { shuffleRng: Ip(a, t) } : {}
|
|
13932
13947
|
};
|
|
13933
13948
|
}
|
|
13934
|
-
function
|
|
13949
|
+
function Th() {
|
|
13935
13950
|
return globalThis.trustedTypes;
|
|
13936
13951
|
}
|
|
13937
|
-
var
|
|
13938
|
-
function
|
|
13939
|
-
let t =
|
|
13952
|
+
var Eh = /* @__PURE__ */ new Map();
|
|
13953
|
+
function Dh(e) {
|
|
13954
|
+
let t = Eh.get(e);
|
|
13940
13955
|
if (t) return t;
|
|
13941
|
-
let n =
|
|
13956
|
+
let n = Th();
|
|
13942
13957
|
if (!n?.createPolicy) return null;
|
|
13943
13958
|
try {
|
|
13944
13959
|
let t = n.createPolicy(e, { createHTML: (e) => e });
|
|
13945
|
-
return t?.createHTML ? (
|
|
13960
|
+
return t?.createHTML ? (Eh.set(e, t), t) : null;
|
|
13946
13961
|
} catch {
|
|
13947
13962
|
return null;
|
|
13948
13963
|
}
|
|
13949
13964
|
}
|
|
13950
|
-
function
|
|
13965
|
+
function Oh(e, t) {
|
|
13951
13966
|
if (!t) return e;
|
|
13952
13967
|
if (!e) return "";
|
|
13953
|
-
let n =
|
|
13968
|
+
let n = Dh(t);
|
|
13954
13969
|
if (!n) return e;
|
|
13955
13970
|
try {
|
|
13956
13971
|
return n.createHTML(e);
|
|
@@ -13958,37 +13973,37 @@ function Eh(e, t) {
|
|
|
13958
13973
|
return e;
|
|
13959
13974
|
}
|
|
13960
13975
|
}
|
|
13961
|
-
function
|
|
13976
|
+
function kh(e, t) {
|
|
13962
13977
|
let n = t?.urlPolicy, r = t?.allowObjectEmbeds === !0, i = t?.trustedTypesPolicyName;
|
|
13963
13978
|
for (let t of e) {
|
|
13964
|
-
if (t.type === "choiceInteraction" && Array.isArray(t.choices)) for (let e of t.choices) typeof e?.text == "string" && (e.text =
|
|
13965
|
-
if (t.imageData?.src && (t.imageData.src = gm(t.imageData.src, n, "img") ?? ""), t.imageData?.content && typeof t.imageData.content == "string" && (t.imageData.content =
|
|
13979
|
+
if (t.type === "choiceInteraction" && Array.isArray(t.choices)) for (let e of t.choices) typeof e?.text == "string" && (e.text = Oh(e.text, i));
|
|
13980
|
+
if (t.imageData?.src && (t.imageData.src = gm(t.imageData.src, n, "img") ?? ""), t.imageData?.content && typeof t.imageData.content == "string" && (t.imageData.content = Oh(t.imageData.content, i)), Array.isArray(t.positionObjectStages)) for (let e of t.positionObjectStages) e?.objectData?.src && (e.objectData.src = gm(e.objectData.src, n, "img") ?? ""), e?.objectData?.content && typeof e.objectData.content == "string" && (e.objectData.content = Oh(e.objectData.content, i));
|
|
13966
13981
|
if (t.type === "mediaInteraction" && t.mediaElement?.src) {
|
|
13967
13982
|
let e = t.mediaElement.type === "object" ? "object" : "media";
|
|
13968
13983
|
t.mediaElement.src = gm(t.mediaElement.src, n, e) ?? "", t.allowObjectEmbeds = r;
|
|
13969
13984
|
}
|
|
13970
|
-
t.type === "hottextInteraction" && typeof t.contentHtml == "string" && (t.contentHtml =
|
|
13985
|
+
t.type === "hottextInteraction" && typeof t.contentHtml == "string" && (t.contentHtml = Oh(t.contentHtml, i));
|
|
13971
13986
|
}
|
|
13972
13987
|
return e;
|
|
13973
13988
|
}
|
|
13974
|
-
function
|
|
13975
|
-
let a =
|
|
13989
|
+
function Ah({ document: e, extractionRegistry: t, declarations: n, config: r, sessionGuid: i }) {
|
|
13990
|
+
let a = Mh(n), o = e.findExtractionElements(jh(t)), s = [];
|
|
13976
13991
|
for (let e of o) {
|
|
13977
|
-
let n =
|
|
13992
|
+
let n = wh(e.element, e.responseIdentifier, e.contextRoot, a, r, i), o = t.extract(e.element, n);
|
|
13978
13993
|
o.success && s.push({
|
|
13979
13994
|
type: o.data?.type ?? e.normalizedType,
|
|
13980
13995
|
responseId: e.responseIdentifier,
|
|
13981
13996
|
...o.data
|
|
13982
13997
|
});
|
|
13983
13998
|
}
|
|
13984
|
-
return
|
|
13999
|
+
return kh(s, r.security);
|
|
13985
14000
|
}
|
|
13986
|
-
function
|
|
14001
|
+
function jh(e) {
|
|
13987
14002
|
let t = /* @__PURE__ */ new Set();
|
|
13988
14003
|
for (let n of e.getExtractors()) for (let e of n.elementTypes) t.add(e);
|
|
13989
14004
|
return [...t];
|
|
13990
14005
|
}
|
|
13991
|
-
function
|
|
14006
|
+
function Mh(e) {
|
|
13992
14007
|
let t = /* @__PURE__ */ new Map();
|
|
13993
14008
|
for (let n of Object.values(e)) t.set(n.identifier, {
|
|
13994
14009
|
identifier: n.identifier,
|
|
@@ -13997,7 +14012,7 @@ function Ah(e) {
|
|
|
13997
14012
|
});
|
|
13998
14013
|
return t;
|
|
13999
14014
|
}
|
|
14000
|
-
var
|
|
14015
|
+
var Nh = {
|
|
14001
14016
|
choiceInteraction: {
|
|
14002
14017
|
name: "default-choice",
|
|
14003
14018
|
tagName: "pie-qti-choice"
|
|
@@ -14082,7 +14097,7 @@ var jh = {
|
|
|
14082
14097
|
name: "default-catalog-popup",
|
|
14083
14098
|
tagName: "pie-qti-catalog-popup"
|
|
14084
14099
|
}
|
|
14085
|
-
},
|
|
14100
|
+
}, Ph = class {
|
|
14086
14101
|
constructor() {
|
|
14087
14102
|
this.components = /* @__PURE__ */ new Map(), this.definedElements = /* @__PURE__ */ new Set();
|
|
14088
14103
|
}
|
|
@@ -14124,39 +14139,39 @@ var jh = {
|
|
|
14124
14139
|
return !t || t.length === 0 ? null : t[0].config.tagName;
|
|
14125
14140
|
}
|
|
14126
14141
|
};
|
|
14127
|
-
function
|
|
14128
|
-
let e = new
|
|
14129
|
-
return
|
|
14142
|
+
function Fh() {
|
|
14143
|
+
let e = new Ph();
|
|
14144
|
+
return Ih(e), e;
|
|
14130
14145
|
}
|
|
14131
|
-
function
|
|
14132
|
-
for (let [t, n] of Object.entries(
|
|
14146
|
+
function Ih(e) {
|
|
14147
|
+
for (let [t, n] of Object.entries(Nh)) e.register(t, {
|
|
14133
14148
|
...n,
|
|
14134
14149
|
description: `Default web component tag for ${t}`,
|
|
14135
14150
|
priority: -100
|
|
14136
14151
|
});
|
|
14137
14152
|
}
|
|
14138
|
-
var
|
|
14139
|
-
function
|
|
14153
|
+
var Lh = "data-qti-colorscheme", Rh = "data-qti-magnification";
|
|
14154
|
+
function zh(e, t) {
|
|
14140
14155
|
let n = t?.display?.colorScheme;
|
|
14141
|
-
!n || n === "default" ? e.removeAttribute(
|
|
14156
|
+
!n || n === "default" ? e.removeAttribute(Lh) : e.setAttribute(Lh, n);
|
|
14142
14157
|
let r = t?.display?.magnification;
|
|
14143
|
-
r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(
|
|
14158
|
+
r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(Rh, String(r)), e.style?.setProperty?.("--qti-magnification", String(r))) : (e.removeAttribute(Rh), e.style?.removeProperty?.("--qti-magnification"));
|
|
14144
14159
|
}
|
|
14145
|
-
function
|
|
14160
|
+
function Bh(e) {
|
|
14146
14161
|
if (!e.trim()) return /* @__PURE__ */ new Map();
|
|
14147
14162
|
let t = Wo(`<root>${e}</root>`, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
|
|
14148
|
-
return t ?
|
|
14163
|
+
return t ? Uh(t) : /* @__PURE__ */ new Map();
|
|
14149
14164
|
}
|
|
14150
|
-
function
|
|
14165
|
+
function Vh(e) {
|
|
14151
14166
|
let t = Wo(e, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
|
|
14152
|
-
return t ?
|
|
14167
|
+
return t ? Uh(t) : /* @__PURE__ */ new Map();
|
|
14153
14168
|
}
|
|
14154
|
-
function
|
|
14169
|
+
function Hh(e, t) {
|
|
14155
14170
|
let n = new Map(e);
|
|
14156
14171
|
for (let [e, r] of t) n.set(e, r);
|
|
14157
14172
|
return n;
|
|
14158
14173
|
}
|
|
14159
|
-
function
|
|
14174
|
+
function Uh(e) {
|
|
14160
14175
|
let t = /* @__PURE__ */ new Map();
|
|
14161
14176
|
for (let n of e.querySelectorAll("qti-catalog")) {
|
|
14162
14177
|
let e = n.getAttribute("id") ?? n.getAttribute("identifier");
|
|
@@ -14164,14 +14179,14 @@ function Vh(e) {
|
|
|
14164
14179
|
let r = [];
|
|
14165
14180
|
for (let e of n.querySelectorAll("qti-card")) {
|
|
14166
14181
|
let t = e.getAttribute("support") ?? e.getAttribute("usage");
|
|
14167
|
-
for (let n of
|
|
14182
|
+
for (let n of Wh(e, t ?? void 0)) r.push(n);
|
|
14168
14183
|
}
|
|
14169
14184
|
r.length > 0 && t.set(e, { entries: r });
|
|
14170
14185
|
}
|
|
14171
14186
|
for (let n of e.querySelectorAll("qti-card")) {
|
|
14172
14187
|
let e = n.getAttribute("identifier");
|
|
14173
14188
|
if (!e) continue;
|
|
14174
|
-
let r =
|
|
14189
|
+
let r = Wh(n);
|
|
14175
14190
|
if (r.length > 0) {
|
|
14176
14191
|
let n = t.get(e);
|
|
14177
14192
|
n ? n.entries.push(...r) : t.set(e, { entries: r });
|
|
@@ -14179,33 +14194,33 @@ function Vh(e) {
|
|
|
14179
14194
|
}
|
|
14180
14195
|
return t;
|
|
14181
14196
|
}
|
|
14182
|
-
function
|
|
14197
|
+
function Wh(e, t) {
|
|
14183
14198
|
let n = e.querySelectorAll("qti-card-entry"), r = [];
|
|
14184
14199
|
if (n.length > 0) {
|
|
14185
14200
|
for (let e of n) {
|
|
14186
14201
|
let n = e.getAttribute("usage") ?? e.getAttribute("data-reading-type") ?? t;
|
|
14187
14202
|
n && r.push({
|
|
14188
14203
|
usage: n,
|
|
14189
|
-
lang:
|
|
14190
|
-
html:
|
|
14204
|
+
lang: Gh(e),
|
|
14205
|
+
html: Kh(e)
|
|
14191
14206
|
});
|
|
14192
14207
|
}
|
|
14193
14208
|
return r;
|
|
14194
14209
|
}
|
|
14195
14210
|
return t && r.push({
|
|
14196
14211
|
usage: t,
|
|
14197
|
-
lang:
|
|
14198
|
-
html:
|
|
14212
|
+
lang: Gh(e),
|
|
14213
|
+
html: Kh(e)
|
|
14199
14214
|
}), r;
|
|
14200
14215
|
}
|
|
14201
|
-
function
|
|
14216
|
+
function Gh(e) {
|
|
14202
14217
|
return e.getAttribute("xml:lang") ?? e.getAttribute("xmllang") ?? e.getAttribute("lang") ?? void 0;
|
|
14203
14218
|
}
|
|
14204
|
-
function
|
|
14219
|
+
function Kh(e) {
|
|
14205
14220
|
let t = e.querySelector("qti-html-content"), n = e.querySelector("qti-file-href");
|
|
14206
14221
|
return t ? t.innerHTML ?? t.text ?? "" : n ? n.getAttribute("src") ?? n.text?.trim() ?? "" : "";
|
|
14207
14222
|
}
|
|
14208
|
-
function
|
|
14223
|
+
function qh(e, t, n, r) {
|
|
14209
14224
|
let i = e.get(t);
|
|
14210
14225
|
if (!i) return null;
|
|
14211
14226
|
let a = i.entries.filter((e) => e.usage === n);
|
|
@@ -14219,11 +14234,11 @@ function Gh(e, t, n, r) {
|
|
|
14219
14234
|
let o = a.find((e) => !e.lang);
|
|
14220
14235
|
return o ? o.html : a.length === 1 ? a[0].html : null;
|
|
14221
14236
|
}
|
|
14222
|
-
var
|
|
14237
|
+
var Jh = class extends Error {
|
|
14223
14238
|
constructor(e, t) {
|
|
14224
14239
|
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";
|
|
14225
14240
|
}
|
|
14226
|
-
},
|
|
14241
|
+
}, Yh = class extends Error {
|
|
14227
14242
|
constructor(e, t, n) {
|
|
14228
14243
|
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", {
|
|
14229
14244
|
value: n,
|
|
@@ -14231,7 +14246,7 @@ var Kh = class extends Error {
|
|
|
14231
14246
|
configurable: !0
|
|
14232
14247
|
});
|
|
14233
14248
|
}
|
|
14234
|
-
},
|
|
14249
|
+
}, Xh = class {
|
|
14235
14250
|
constructor(e, t = {}) {
|
|
14236
14251
|
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;
|
|
14237
14252
|
}
|
|
@@ -14240,7 +14255,7 @@ var Kh = class extends Error {
|
|
|
14240
14255
|
}
|
|
14241
14256
|
async load() {
|
|
14242
14257
|
if (this.destroyed) throw Error("Cannot load a destroyed PciHost");
|
|
14243
|
-
if (!this.moduleResolver) throw new
|
|
14258
|
+
if (!this.moduleResolver) throw new Jh(this.data.responseIdentifier, this.data.primaryPath);
|
|
14244
14259
|
let e = ++this.loadGeneration, t = this.resolveUrl(this.data.primaryPath);
|
|
14245
14260
|
try {
|
|
14246
14261
|
let n = await this.resolveModule(t, this.data.primaryPath, "primary");
|
|
@@ -14248,14 +14263,14 @@ var Kh = class extends Error {
|
|
|
14248
14263
|
return;
|
|
14249
14264
|
} catch (t) {
|
|
14250
14265
|
if (!this.isCurrentLoad(e)) throw t;
|
|
14251
|
-
if (!this.data.fallbackPath) throw new
|
|
14266
|
+
if (!this.data.fallbackPath) throw new Yh(this.data.primaryPath, void 0, t);
|
|
14252
14267
|
}
|
|
14253
14268
|
let n = this.resolveUrl(this.data.fallbackPath);
|
|
14254
14269
|
try {
|
|
14255
14270
|
let t = await this.resolveModule(n, this.data.fallbackPath, "fallback");
|
|
14256
14271
|
this.adoptResolvedModule(t, this.data.fallbackPath, e);
|
|
14257
14272
|
} catch (t) {
|
|
14258
|
-
throw this.isCurrentLoad(e) ? new
|
|
14273
|
+
throw this.isCurrentLoad(e) ? new Yh(this.data.primaryPath, this.data.fallbackPath, t) : t;
|
|
14259
14274
|
}
|
|
14260
14275
|
}
|
|
14261
14276
|
initialize(e) {
|
|
@@ -14326,15 +14341,15 @@ var Kh = class extends Error {
|
|
|
14326
14341
|
if (r.length > 0) throw Error(`PCI module at '${t}' does not export a valid PciModule interface; missing: ${r.join(", ")}`);
|
|
14327
14342
|
return n;
|
|
14328
14343
|
}
|
|
14329
|
-
},
|
|
14344
|
+
}, Zh = class {
|
|
14330
14345
|
constructor(e) {
|
|
14331
|
-
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 = e, this.itemXml = e.itemXml ?? "", this.role = e.role ?? "candidate", this.sessionGuid =
|
|
14346
|
+
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 = e, this.itemXml = e.itemXml ?? "", this.role = e.role ?? "candidate", this.sessionGuid = $h(), this.sessionStartedAt = Date.now(), this.rng = e.rng ?? (typeof e.seed == "number" ? Pp(e.seed) : Math.random), e.elementNameMapper ? (this.mapper = e.elementNameMapper, e.attributeNameMapper ||= this.mapper.version === "3.0" ? new b() : new v()) : ee(this.itemXml) === "3.0" ? (this.mapper = new _(), e.elementNameMapper = this.mapper, e.attributeNameMapper ||= new b()) : (this.mapper = new t(), e.elementNameMapper = this.mapper, e.attributeNameMapper ||= new v()), this.itemDocument = sh({
|
|
14332
14347
|
itemXml: this.itemXml,
|
|
14333
14348
|
elementNameMapper: this.mapper,
|
|
14334
14349
|
attributeNameMapper: e.attributeNameMapper,
|
|
14335
14350
|
security: this.config.security
|
|
14336
|
-
}), this.assessmentItem = this.itemDocument.getAssessmentItem(), this.decls = this.buildDeclarations(), this.ensureBuiltinDeclarations(this.decls), this.ctx = new bn(this.decls), this.ops = new pn(), e.sessionState && this.applySessionState(e.sessionState), this.extractionRegistry = e.extractionRegistry ??
|
|
14337
|
-
for (let e of
|
|
14351
|
+
}), this.assessmentItem = this.itemDocument.getAssessmentItem(), this.decls = this.buildDeclarations(), this.ensureBuiltinDeclarations(this.decls), this.ctx = new bn(this.decls), this.ops = new pn(), e.sessionState && this.applySessionState(e.sessionState), this.extractionRegistry = e.extractionRegistry ?? mh(this.mapper), this.componentRegistry = e.componentRegistry ?? Fh(), this.i18nProvider = e.i18nProvider ?? this.createDefaultI18nProvider();
|
|
14352
|
+
for (let e of $m()) try {
|
|
14338
14353
|
this.extractionRegistry.register(e);
|
|
14339
14354
|
} catch {}
|
|
14340
14355
|
for (let t of e.plugins ?? []) try {
|
|
@@ -14355,19 +14370,19 @@ var Kh = class extends Error {
|
|
|
14355
14370
|
o === "unknown" ? console.warn("[QTI Player] Could not detect QTI version. Assuming QTI 2.2 compatibility.") : o === "2.0" ? console.warn("[QTI Player] QTI 2.0 detected. Some features may not be fully supported. QTI 2.2 is recommended.") : o === "2.1" && console.info("[QTI Player] QTI 2.1 detected. Using QTI 2.2 compatibility mode with CC2 template support."), this._pnp = e.pnp;
|
|
14356
14371
|
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
14357
14372
|
for (let t of e.deliveryContext?.catalogSources ?? []) {
|
|
14358
|
-
let e =
|
|
14373
|
+
let e = Bh(t.xml);
|
|
14359
14374
|
if (t.scope === "stimulus" && t.stimulusIdentifier) {
|
|
14360
14375
|
let n = this._stimulusCatalogIndexes.get(t.stimulusIdentifier) ?? /* @__PURE__ */ new Map();
|
|
14361
|
-
this._stimulusCatalogIndexes.set(t.stimulusIdentifier,
|
|
14362
|
-
} else c =
|
|
14376
|
+
this._stimulusCatalogIndexes.set(t.stimulusIdentifier, Hh(n, e));
|
|
14377
|
+
} else c = Hh(c, e);
|
|
14363
14378
|
}
|
|
14364
|
-
e.catalogXml && (s =
|
|
14379
|
+
e.catalogXml && (s = Hh(s, Vh(e.catalogXml))), s = Hh(s, Vh(this.itemXml)), this._catalogIndex = Hh(s, c), this.config.strictQtiCompliance?.enabled && this.validateStrictCompliance();
|
|
14365
14380
|
}
|
|
14366
14381
|
applyPnp(e) {
|
|
14367
|
-
this._rootEl = e,
|
|
14382
|
+
this._rootEl = e, zh(e, this._pnp);
|
|
14368
14383
|
}
|
|
14369
14384
|
updatePnp(e) {
|
|
14370
|
-
this._pnp =
|
|
14385
|
+
this._pnp = Qh(this._pnp, e), this._rootEl && zh(this._rootEl, this._pnp);
|
|
14371
14386
|
for (let e of this._pnpChangeListeners) e(this._pnp);
|
|
14372
14387
|
}
|
|
14373
14388
|
getPnp() {
|
|
@@ -14380,14 +14395,14 @@ var Kh = class extends Error {
|
|
|
14380
14395
|
return this.config.deliveryContext;
|
|
14381
14396
|
}
|
|
14382
14397
|
getCatalogEntry(e, t, n, r) {
|
|
14383
|
-
let i = (r?.stimulusIdentifier ?
|
|
14384
|
-
return i === null ? null :
|
|
14398
|
+
let i = (r?.stimulusIdentifier ? qh(this._stimulusCatalogIndexes.get(r.stimulusIdentifier) ?? /* @__PURE__ */ new Map(), e, t, n) : null) ?? qh(this._catalogIndex, e, t, n);
|
|
14399
|
+
return i === null ? null : eg(i) ? gm(i.trim(), this.config.security?.urlPolicy, "img") : this.sanitizeHtmlContent(i);
|
|
14385
14400
|
}
|
|
14386
14401
|
sanitizeHtmlContent(e) {
|
|
14387
|
-
return
|
|
14402
|
+
return Rm(e, { security: this.config.security });
|
|
14388
14403
|
}
|
|
14389
14404
|
createPciHost(e) {
|
|
14390
|
-
let t = new
|
|
14405
|
+
let t = new Xh(e, {
|
|
14391
14406
|
baseUrl: this.config.pci?.baseUrl ?? this.config.pciBaseUrl,
|
|
14392
14407
|
moduleResolver: this.config.pci?.moduleResolver
|
|
14393
14408
|
});
|
|
@@ -14594,7 +14609,7 @@ var Kh = class extends Error {
|
|
|
14594
14609
|
if (e.scope && e.scope !== "all" && n !== e.scope) continue;
|
|
14595
14610
|
let a = (k(i, "view") || "").trim(), o = a ? a.split(/[\s,]+/).filter(Boolean) : [], s = (k(i, "use") || "").trim() || void 0;
|
|
14596
14611
|
if (o.length > 0 && t && !o.includes(t)) continue;
|
|
14597
|
-
let c = this.itemDocument.serializeChildren(i) || i.textContent || "", l =
|
|
14612
|
+
let c = this.itemDocument.serializeChildren(i) || i.textContent || "", l = Oh(Rm(this.renderPrintedVariables(c), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
|
|
14598
14613
|
r.push({
|
|
14599
14614
|
view: o,
|
|
14600
14615
|
html: l,
|
|
@@ -14611,7 +14626,7 @@ var Kh = class extends Error {
|
|
|
14611
14626
|
return this.extractionRegistry;
|
|
14612
14627
|
}
|
|
14613
14628
|
getInteractionData() {
|
|
14614
|
-
return
|
|
14629
|
+
return Ah({
|
|
14615
14630
|
document: this.itemDocument,
|
|
14616
14631
|
extractionRegistry: this.extractionRegistry,
|
|
14617
14632
|
declarations: this.decls,
|
|
@@ -15236,12 +15251,12 @@ var Kh = class extends Error {
|
|
|
15236
15251
|
return r = r.replace(/<printedVariable\b([^>]*)\/>/gi, (e, r) => n(t(String(r)))), r;
|
|
15237
15252
|
}
|
|
15238
15253
|
renderHtmlContent(e) {
|
|
15239
|
-
return
|
|
15254
|
+
return Oh(Rm(this.renderPrintedVariables(e), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
|
|
15240
15255
|
}
|
|
15241
15256
|
getModalFeedback(e) {
|
|
15242
15257
|
let t = this.itemDocument.findModalFeedbackElements(), n = [];
|
|
15243
15258
|
for (let r of t) {
|
|
15244
|
-
let t = this.getAttrMapped(r, "identifier") || "", i = this.getAttrMapped(r, "outcomeIdentifier") || "", a = this.getAttrMapped(r, "showHide") || "show", o = this.getAttrMapped(r, "title") || void 0, s =
|
|
15259
|
+
let t = this.getAttrMapped(r, "identifier") || "", i = this.getAttrMapped(r, "outcomeIdentifier") || "", a = this.getAttrMapped(r, "showHide") || "show", o = this.getAttrMapped(r, "title") || void 0, s = Oh(Rm(this.itemDocument.serializeChildren(r) || r.textContent || "", { security: this.config.security }), this.config.security?.trustedTypesPolicyName), c = e[i];
|
|
15245
15260
|
(a === "show" ? c === t : c !== t) && s && n.push({
|
|
15246
15261
|
identifier: t,
|
|
15247
15262
|
outcomeIdentifier: i,
|
|
@@ -15253,7 +15268,7 @@ var Kh = class extends Error {
|
|
|
15253
15268
|
return n;
|
|
15254
15269
|
}
|
|
15255
15270
|
};
|
|
15256
|
-
function
|
|
15271
|
+
function Qh(e, t) {
|
|
15257
15272
|
return {
|
|
15258
15273
|
display: {
|
|
15259
15274
|
...e?.display ?? {},
|
|
@@ -15269,7 +15284,7 @@ function Xh(e, t) {
|
|
|
15269
15284
|
}
|
|
15270
15285
|
};
|
|
15271
15286
|
}
|
|
15272
|
-
function
|
|
15287
|
+
function $h() {
|
|
15273
15288
|
let e = typeof crypto < "u" ? crypto : void 0;
|
|
15274
15289
|
if (typeof e?.randomUUID == "function") return e.randomUUID();
|
|
15275
15290
|
if (typeof e?.getRandomValues == "function") {
|
|
@@ -15278,11 +15293,11 @@ function Zh() {
|
|
|
15278
15293
|
}
|
|
15279
15294
|
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).");
|
|
15280
15295
|
}
|
|
15281
|
-
function
|
|
15296
|
+
function eg(e) {
|
|
15282
15297
|
let t = e.trim();
|
|
15283
15298
|
return /^(https?:\/\/|\/\/|\/|\.{0,2}\/|data:|blob:)/i.test(t) || /\.(png|jpe?g|gif|webp|svg|mp3|wav|ogg|mp4|webm|pdf)(\?.*)?$/i.test(t);
|
|
15284
15299
|
}
|
|
15285
|
-
function
|
|
15300
|
+
function tg(e, t) {
|
|
15286
15301
|
if (!(typeof window < "u" && typeof MutationObserver < "u")) return {
|
|
15287
15302
|
update() {},
|
|
15288
15303
|
destroy() {}
|
|
@@ -15311,7 +15326,7 @@ function $h(e, t) {
|
|
|
15311
15326
|
}
|
|
15312
15327
|
};
|
|
15313
15328
|
}
|
|
15314
|
-
var
|
|
15329
|
+
var ng = [
|
|
15315
15330
|
{
|
|
15316
15331
|
usage: "tts-pronunciation",
|
|
15317
15332
|
flag: "ttsPronunciation",
|
|
@@ -15342,90 +15357,90 @@ var eg = [
|
|
|
15342
15357
|
label: "Request extended description",
|
|
15343
15358
|
text: "D"
|
|
15344
15359
|
}
|
|
15345
|
-
],
|
|
15360
|
+
], rg = "illustrated-glossary", ig = new Set([
|
|
15346
15361
|
"glossary-on-screen",
|
|
15347
15362
|
"keyword-translation",
|
|
15348
|
-
|
|
15349
|
-
]),
|
|
15350
|
-
function
|
|
15351
|
-
|
|
15363
|
+
rg
|
|
15364
|
+
]), ag = new Set(ng.map((e) => e.flag)), og = new Set(ng.map((e) => e.usage)), sg = /^[a-z][a-z0-9._-]*$/;
|
|
15365
|
+
function cg(e, t) {
|
|
15366
|
+
lg(e);
|
|
15352
15367
|
let n = t.getPnp();
|
|
15353
|
-
if (!n) return () =>
|
|
15354
|
-
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 =
|
|
15355
|
-
if (!r && !a && !o && !l && c.length === 0) return () =>
|
|
15368
|
+
if (!n) return () => lg(e);
|
|
15369
|
+
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 = pg(s), l = ng.some((e) => hg(mg(s, e)));
|
|
15370
|
+
if (!r && !a && !o && !l && c.length === 0) return () => lg(e);
|
|
15356
15371
|
let u = e.querySelectorAll("[data-catalog-idref]");
|
|
15357
|
-
if (u.length === 0) return () =>
|
|
15372
|
+
if (u.length === 0) return () => lg(e);
|
|
15358
15373
|
let d = null;
|
|
15359
15374
|
for (let e of Array.from(u)) {
|
|
15360
15375
|
let n = e.getAttribute("data-catalog-idref");
|
|
15361
15376
|
if (!n) continue;
|
|
15362
|
-
let l =
|
|
15377
|
+
let l = fg(e), u = document.createElement("span");
|
|
15363
15378
|
if (u.className = "qti-catalog-term", u.style.cssText = "position:relative;display:inline", e.parentNode?.insertBefore(u, e), u.appendChild(e), r) {
|
|
15364
|
-
let r =
|
|
15379
|
+
let r = ug(e.textContent ?? n, "glossary-on-screen", "Show definition");
|
|
15365
15380
|
u.appendChild(r), r.addEventListener("click", () => {
|
|
15366
15381
|
if (d) {
|
|
15367
15382
|
d(), d = null;
|
|
15368
15383
|
return;
|
|
15369
15384
|
}
|
|
15370
15385
|
let i = t.getCatalogEntry(n, "glossary-on-screen", void 0, { stimulusIdentifier: l });
|
|
15371
|
-
i !== null && (d =
|
|
15386
|
+
i !== null && (d = yg(u, e.textContent ?? n, i, r, t, () => {
|
|
15372
15387
|
d = null;
|
|
15373
15388
|
}));
|
|
15374
15389
|
});
|
|
15375
15390
|
}
|
|
15376
15391
|
if (a) {
|
|
15377
|
-
let r = i.languageCode, a =
|
|
15392
|
+
let r = i.languageCode, a = ug(e.textContent ?? n, "keyword-translation", "Show translation");
|
|
15378
15393
|
u.appendChild(a), a.addEventListener("click", () => {
|
|
15379
15394
|
if (d) {
|
|
15380
15395
|
d(), d = null;
|
|
15381
15396
|
return;
|
|
15382
15397
|
}
|
|
15383
15398
|
let i = t.getCatalogEntry(n, "keyword-translation", r, { stimulusIdentifier: l });
|
|
15384
|
-
i !== null && (d =
|
|
15399
|
+
i !== null && (d = yg(u, e.textContent ?? n, i, a, t, () => {
|
|
15385
15400
|
d = null;
|
|
15386
15401
|
}));
|
|
15387
15402
|
});
|
|
15388
15403
|
}
|
|
15389
15404
|
if (o) {
|
|
15390
|
-
let r =
|
|
15405
|
+
let r = ug(e.textContent ?? n, rg, "Show illustrated glossary");
|
|
15391
15406
|
u.appendChild(r), r.addEventListener("click", () => {
|
|
15392
15407
|
if (d) {
|
|
15393
15408
|
d(), d = null;
|
|
15394
15409
|
return;
|
|
15395
15410
|
}
|
|
15396
|
-
let i = t.getCatalogEntry(n,
|
|
15397
|
-
i !== null && (d =
|
|
15411
|
+
let i = t.getCatalogEntry(n, rg, void 0, { stimulusIdentifier: l });
|
|
15412
|
+
i !== null && (d = yg(u, e.textContent ?? n, i, r, t, () => {
|
|
15398
15413
|
d = null;
|
|
15399
15414
|
}));
|
|
15400
15415
|
});
|
|
15401
15416
|
}
|
|
15402
|
-
for (let r of
|
|
15403
|
-
let i =
|
|
15404
|
-
|
|
15417
|
+
for (let r of ng) {
|
|
15418
|
+
let i = mg(s, r);
|
|
15419
|
+
hg(i) && dg(u, e, n, {
|
|
15405
15420
|
...r,
|
|
15406
|
-
languageCode:
|
|
15421
|
+
languageCode: gg(i)
|
|
15407
15422
|
}, t, l);
|
|
15408
15423
|
}
|
|
15409
|
-
for (let r of c)
|
|
15424
|
+
for (let r of c) dg(u, e, n, r, t, l);
|
|
15410
15425
|
}
|
|
15411
15426
|
return () => {
|
|
15412
|
-
d?.(),
|
|
15427
|
+
d?.(), lg(e);
|
|
15413
15428
|
};
|
|
15414
15429
|
}
|
|
15415
|
-
function
|
|
15430
|
+
function lg(e) {
|
|
15416
15431
|
for (let t of Array.from(e.querySelectorAll(".qti-catalog-term"))) {
|
|
15417
15432
|
let e = Array.from(t.children).find((e) => e.getAttribute?.("data-catalog-idref") !== null);
|
|
15418
15433
|
e && t.parentNode && t.parentNode.insertBefore(e, t), t.remove();
|
|
15419
15434
|
}
|
|
15420
15435
|
}
|
|
15421
|
-
function
|
|
15436
|
+
function ug(e, t, n, r) {
|
|
15422
15437
|
let i = document.createElement("button");
|
|
15423
|
-
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 ===
|
|
15438
|
+
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 === rg ? "I" : "?"), i;
|
|
15424
15439
|
}
|
|
15425
|
-
function
|
|
15440
|
+
function dg(e, t, n, r, i, a) {
|
|
15426
15441
|
let o = i.getCatalogEntry(n, r.usage, r.languageCode, { stimulusIdentifier: a });
|
|
15427
15442
|
if (o === null) return;
|
|
15428
|
-
let s =
|
|
15443
|
+
let s = ug(t.textContent ?? n, r.usage, r.label, r.text);
|
|
15429
15444
|
e.appendChild(s), s.addEventListener("click", () => {
|
|
15430
15445
|
s.dispatchEvent(new CustomEvent("qti-catalog-lookup", {
|
|
15431
15446
|
bubbles: !0,
|
|
@@ -15440,39 +15455,39 @@ function lg(e, t, n, r, i, a) {
|
|
|
15440
15455
|
}));
|
|
15441
15456
|
});
|
|
15442
15457
|
}
|
|
15443
|
-
function
|
|
15458
|
+
function fg(e) {
|
|
15444
15459
|
return (e.closest?.("[data-stimulus-idref]"))?.getAttribute?.("data-stimulus-idref")?.trim() || void 0;
|
|
15445
15460
|
}
|
|
15446
|
-
function
|
|
15461
|
+
function pg(e) {
|
|
15447
15462
|
return Object.entries(e).map(([e, t]) => ({
|
|
15448
|
-
usage:
|
|
15463
|
+
usage: _g(e),
|
|
15449
15464
|
preference: t
|
|
15450
|
-
})).filter(({ usage: e, preference: t }) => e !== null &&
|
|
15465
|
+
})).filter(({ usage: e, preference: t }) => e !== null && hg(t) && !vg(e)).map(({ usage: e, preference: t }) => ({
|
|
15451
15466
|
usage: e,
|
|
15452
15467
|
label: `Request ${e.replace(/[-_]+/g, " ")}`,
|
|
15453
15468
|
text: e.slice(0, 1).toUpperCase(),
|
|
15454
|
-
languageCode:
|
|
15469
|
+
languageCode: gg(t)
|
|
15455
15470
|
}));
|
|
15456
15471
|
}
|
|
15457
|
-
function
|
|
15472
|
+
function mg(e, t) {
|
|
15458
15473
|
return e[t.flag] ?? e[t.usage];
|
|
15459
15474
|
}
|
|
15460
|
-
function
|
|
15475
|
+
function hg(e) {
|
|
15461
15476
|
return e === void 0 ? !1 : typeof e == "boolean" ? e : e.active !== !1;
|
|
15462
15477
|
}
|
|
15463
|
-
function
|
|
15478
|
+
function gg(e) {
|
|
15464
15479
|
if (!e || typeof e == "boolean") return;
|
|
15465
15480
|
let t = e.languageCode?.trim();
|
|
15466
15481
|
if (!(!t || !/^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$/.test(t))) return t;
|
|
15467
15482
|
}
|
|
15468
|
-
function
|
|
15483
|
+
function _g(e) {
|
|
15469
15484
|
let t = e.trim().toLowerCase();
|
|
15470
|
-
return
|
|
15485
|
+
return sg.test(t) ? t : null;
|
|
15471
15486
|
}
|
|
15472
|
-
function
|
|
15473
|
-
return
|
|
15487
|
+
function vg(e) {
|
|
15488
|
+
return ag.has(e) || og.has(e) || ig.has(e);
|
|
15474
15489
|
}
|
|
15475
|
-
function
|
|
15490
|
+
function yg(e, t, n, r, i, a) {
|
|
15476
15491
|
let o = i.getComponentRegistry(), s, c = !1;
|
|
15477
15492
|
function l() {
|
|
15478
15493
|
c || (c = !0, s.remove(), r.focus(), a());
|
|
@@ -15481,10 +15496,10 @@ function _g(e, t, n, r, i, a) {
|
|
|
15481
15496
|
if (u !== null) {
|
|
15482
15497
|
let r = document.createElement(u);
|
|
15483
15498
|
r.content = n, r.label = t, r.onClose = l, e.appendChild(r), s = r;
|
|
15484
|
-
} else s =
|
|
15499
|
+
} else s = bg(t, n, l), e.appendChild(s);
|
|
15485
15500
|
return l;
|
|
15486
15501
|
}
|
|
15487
|
-
function
|
|
15502
|
+
function bg(e, t, n) {
|
|
15488
15503
|
let r = document.createElement("div");
|
|
15489
15504
|
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";
|
|
15490
15505
|
let i = document.createElement("div");
|
|
@@ -15516,14 +15531,14 @@ function vg(e, t, n) {
|
|
|
15516
15531
|
}
|
|
15517
15532
|
return r.addEventListener("keydown", c), o.addEventListener("click", () => n()), setTimeout(() => o.focus(), 0), r;
|
|
15518
15533
|
}
|
|
15519
|
-
function
|
|
15520
|
-
let n =
|
|
15521
|
-
n(), n =
|
|
15534
|
+
function xg(e, t) {
|
|
15535
|
+
let n = cg(e, t.player), r = t.player.onPnpChange?.(() => {
|
|
15536
|
+
n(), n = cg(e, t.player);
|
|
15522
15537
|
}) ?? (() => {});
|
|
15523
15538
|
return {
|
|
15524
15539
|
update(t) {
|
|
15525
|
-
n(), r(), n =
|
|
15526
|
-
n(), n =
|
|
15540
|
+
n(), r(), n = cg(e, t.player), r = t.player.onPnpChange?.(() => {
|
|
15541
|
+
n(), n = cg(e, t.player);
|
|
15527
15542
|
}) ?? (() => {});
|
|
15528
15543
|
},
|
|
15529
15544
|
destroy() {
|
|
@@ -15531,23 +15546,23 @@ function yg(e, t) {
|
|
|
15531
15546
|
}
|
|
15532
15547
|
};
|
|
15533
15548
|
}
|
|
15534
|
-
var
|
|
15549
|
+
var Sg = /* @__PURE__ */ gf("<option> </option>"), Cg = /* @__PURE__ */ gf("<span class=\"qti-inline-choice-correct-badge svelte-p2969z\"> </span>"), wg = /* @__PURE__ */ gf("<span class=\"inline-choice-wrapper svelte-p2969z\"><select><option> </option><!></select> <!></span>"), Tg = {
|
|
15535
15550
|
hash: "svelte-p2969z",
|
|
15536
15551
|
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;}"
|
|
15537
15552
|
};
|
|
15538
|
-
function
|
|
15539
|
-
xc(t, !0), Kf(e,
|
|
15553
|
+
function Eg(e, t) {
|
|
15554
|
+
xc(t, !0), Kf(e, Tg);
|
|
15540
15555
|
let n = Dp(t, "response", 3, ""), r = Dp(t, "correctAnswer", 3, null), i = Dp(t, "disabled", 3, !1), a = Dp(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ Tl(() => r() === null ? n() : r()), s = /* @__PURE__ */ Tl(() => r() ? t.interaction.choices.find((e) => e.identifier === r()) : null);
|
|
15541
15556
|
function c(e) {
|
|
15542
15557
|
let n = e.currentTarget?.value ?? "";
|
|
15543
15558
|
a()(t.interaction.responseId, n);
|
|
15544
15559
|
}
|
|
15545
|
-
var l =
|
|
15560
|
+
var l = wg(), u = Gu(l);
|
|
15546
15561
|
let d;
|
|
15547
15562
|
var f = Gu(u), p = Gu(f, !0);
|
|
15548
15563
|
uc(f), f.value = f.__value = "", Rf(qu(f), 17, () => t.interaction.choices, Pf, (e, t) => {
|
|
15549
15564
|
let n = /* @__PURE__ */ Tl(() => r() === $(t).identifier);
|
|
15550
|
-
var i =
|
|
15565
|
+
var i = Sg(), a = Gu(i);
|
|
15551
15566
|
uc(i);
|
|
15552
15567
|
var o = {};
|
|
15553
15568
|
ld(() => {
|
|
@@ -15557,7 +15572,7 @@ function wg(e, t) {
|
|
|
15557
15572
|
var m;
|
|
15558
15573
|
op(u);
|
|
15559
15574
|
var h = qu(u, 2), g = (e) => {
|
|
15560
|
-
var n =
|
|
15575
|
+
var n = Cg(), r = Gu(n);
|
|
15561
15576
|
uc(n), ld((e) => yf(r, `${e ?? ""}: ${$(s).text ?? ""}`), [() => t.i18n?.t("interactions.choice.correct", "Correct") ?? "Correct"]), vf(e, n);
|
|
15562
15577
|
};
|
|
15563
15578
|
Nf(h, (e) => {
|
|
@@ -15570,12 +15585,12 @@ function wg(e, t) {
|
|
|
15570
15585
|
}, [() => t.interaction.label ?? t.interaction.dataPrompt ?? t.i18n?.t("interactions.inline.selectPlaceholder", "Select...")]), cf("change", u, c), vf(e, l), Sc();
|
|
15571
15586
|
}
|
|
15572
15587
|
lf(["change"]);
|
|
15573
|
-
var
|
|
15588
|
+
var Dg = /* @__PURE__ */ gf("<span role=\"alert\" class=\"qti-text-entry-error svelte-v4bfxs\"> </span>"), Og = /* @__PURE__ */ gf("<input type=\"text\"/> <!>", 1), kg = {
|
|
15574
15589
|
hash: "svelte-v4bfxs",
|
|
15575
15590
|
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;}"
|
|
15576
15591
|
};
|
|
15577
|
-
function
|
|
15578
|
-
xc(t, !0), Kf(e,
|
|
15592
|
+
function Ag(e, t) {
|
|
15593
|
+
xc(t, !0), Kf(e, kg);
|
|
15579
15594
|
let n = Dp(t, "response", 3, ""), r = Dp(t, "correctAnswer", 3, null), i = Dp(t, "disabled", 3, !1), a = Dp(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ Du(null), s = /* @__PURE__ */ Tl(() => r() === null ? n() : r()), c = /* @__PURE__ */ Tl(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ Tl(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ Tl(() => `${t.interaction.responseId}-error`);
|
|
15580
15595
|
function d(e) {
|
|
15581
15596
|
let n = e.currentTarget, r = n?.value ?? "";
|
|
@@ -15587,10 +15602,10 @@ function Og(e, t) {
|
|
|
15587
15602
|
function p(e) {
|
|
15588
15603
|
e.currentTarget?.checkValidity();
|
|
15589
15604
|
}
|
|
15590
|
-
var m =
|
|
15605
|
+
var m = Og(), h = Ku(m);
|
|
15591
15606
|
fp(h);
|
|
15592
15607
|
var g = qu(h, 2), _ = (e) => {
|
|
15593
|
-
var t =
|
|
15608
|
+
var t = Dg(), n = Gu(t, !0);
|
|
15594
15609
|
uc(t), ld(() => {
|
|
15595
15610
|
mp(t, "id", $(u)), yf(n, $(o));
|
|
15596
15611
|
}), vf(e, t);
|
|
@@ -15607,21 +15622,21 @@ function Og(e, t) {
|
|
|
15607
15622
|
].filter(Boolean).join(" "))]), cf("input", h, d), sf("invalid", h, f), sf("blur", h, p), vf(e, m), Sc();
|
|
15608
15623
|
}
|
|
15609
15624
|
lf(["input"]);
|
|
15610
|
-
var
|
|
15625
|
+
var jg = new Set([
|
|
15611
15626
|
"scorer",
|
|
15612
15627
|
"author",
|
|
15613
15628
|
"tutor",
|
|
15614
15629
|
"testConstructor"
|
|
15615
15630
|
]);
|
|
15616
|
-
function
|
|
15617
|
-
let t = e === "candidate", n =
|
|
15631
|
+
function Mg(e) {
|
|
15632
|
+
let t = e === "candidate", n = jg.has(e);
|
|
15618
15633
|
return {
|
|
15619
15634
|
isCandidate: t,
|
|
15620
15635
|
isReadOnly: !t,
|
|
15621
15636
|
canViewCorrectResponses: n
|
|
15622
15637
|
};
|
|
15623
15638
|
}
|
|
15624
|
-
var
|
|
15639
|
+
var Ng = [
|
|
15625
15640
|
{
|
|
15626
15641
|
pattern: /<strong>Incorrect;<\/strong>/gi,
|
|
15627
15642
|
replacement: "<strong>Incorrect</strong> "
|
|
@@ -15639,53 +15654,53 @@ var jg = [
|
|
|
15639
15654
|
replacement: "Correct "
|
|
15640
15655
|
}
|
|
15641
15656
|
];
|
|
15642
|
-
function
|
|
15657
|
+
function Pg(e, t = Ng) {
|
|
15643
15658
|
if (!e) return e;
|
|
15644
15659
|
let n = e;
|
|
15645
15660
|
for (let e of t) n = n.replace(e.pattern, e.replacement);
|
|
15646
15661
|
return n;
|
|
15647
15662
|
}
|
|
15648
|
-
function
|
|
15663
|
+
function Fg(e, t) {
|
|
15649
15664
|
let { outcomeValues: n, applyHeuristics: r = !1, wrapWithSpan: i = !1, transforms: a } = t;
|
|
15650
15665
|
return e && e.replace(/<feedbackInline\b([^>]*)>([\s\S]*?)<\/feedbackInline>/gi, (e, t, o) => {
|
|
15651
|
-
let s =
|
|
15666
|
+
let s = Ig(t, "outcomeIdentifier"), c = Ig(t, "identifier"), l = Ig(t, "showHide") ?? "show", u = s ? n[s] : void 0;
|
|
15652
15667
|
if (s === null || c === null || u == null || u === "") return "";
|
|
15653
15668
|
let d = Array.isArray(u) ? u.includes(c) : u === c;
|
|
15654
|
-
return (l.toLowerCase() === "show" ? d : !d) ? (r && (o =
|
|
15669
|
+
return (l.toLowerCase() === "show" ? d : !d) ? (r && (o = Pg(o, a)), i ? ` <span class="qti-feedback-inline">${o}</span>` : o) : "";
|
|
15655
15670
|
});
|
|
15656
15671
|
}
|
|
15657
|
-
function
|
|
15672
|
+
function Ig(e, t) {
|
|
15658
15673
|
return (RegExp(`\\b${t}\\s*=\\s*"([^"]*)"`, "i").exec(e) ?? RegExp(`\\b${t}\\s*=\\s*'([^']*)'`, "i").exec(e))?.[1] ?? null;
|
|
15659
15674
|
}
|
|
15660
|
-
function
|
|
15661
|
-
return e ? e.stylesheets.map((e) =>
|
|
15675
|
+
function Lg(e, t = "[data-qti-item-body-scope]") {
|
|
15676
|
+
return e ? e.stylesheets.map((e) => Rg(e, t)).filter(Boolean).join("\n") : "";
|
|
15662
15677
|
}
|
|
15663
|
-
function
|
|
15678
|
+
function Rg(e, t) {
|
|
15664
15679
|
let n = e.cssText?.trim();
|
|
15665
|
-
return !n || Xo(n) ? "" :
|
|
15680
|
+
return !n || Xo(n) ? "" : Hg(n, Gg(e, t)) || "";
|
|
15666
15681
|
}
|
|
15667
|
-
var
|
|
15682
|
+
var zg = new Set([
|
|
15668
15683
|
"media",
|
|
15669
15684
|
"supports",
|
|
15670
15685
|
"container",
|
|
15671
15686
|
"layer",
|
|
15672
15687
|
"scope"
|
|
15673
|
-
]),
|
|
15674
|
-
function
|
|
15688
|
+
]), Bg = /^(?::root|html|body)(?![\w-])/, Vg = /^@(?:-[a-z]+-)?([\w-]+)/i;
|
|
15689
|
+
function Hg(e, t = "[data-qti-item-body-scope]") {
|
|
15675
15690
|
if (!e) return "";
|
|
15676
15691
|
let n = t?.trim();
|
|
15677
|
-
return n ?
|
|
15692
|
+
return n ? Ug(Xg(e), n).trim() : e;
|
|
15678
15693
|
}
|
|
15679
|
-
function
|
|
15694
|
+
function Ug(e, t) {
|
|
15680
15695
|
let n = "", r = 0;
|
|
15681
15696
|
for (; r < e.length;) {
|
|
15682
|
-
let i =
|
|
15697
|
+
let i = qg(e, r);
|
|
15683
15698
|
if (i.end <= r) break;
|
|
15684
|
-
n +=
|
|
15699
|
+
n += Wg(i, t), r = i.end;
|
|
15685
15700
|
}
|
|
15686
15701
|
return n;
|
|
15687
15702
|
}
|
|
15688
|
-
function
|
|
15703
|
+
function Wg(e, t) {
|
|
15689
15704
|
if (e.kind === "statement") {
|
|
15690
15705
|
let t = e.text.trim();
|
|
15691
15706
|
return t === ";" ? "" : `${t}\n`;
|
|
@@ -15694,28 +15709,28 @@ function Hg(e, t) {
|
|
|
15694
15709
|
let n = e.prelude.trim();
|
|
15695
15710
|
if (!n) return "";
|
|
15696
15711
|
if (n.startsWith("@")) {
|
|
15697
|
-
let r =
|
|
15698
|
-
if (r &&
|
|
15699
|
-
let r =
|
|
15712
|
+
let r = Vg.exec(n)?.[1]?.toLowerCase();
|
|
15713
|
+
if (r && zg.has(r)) {
|
|
15714
|
+
let r = Ug(e.block, t);
|
|
15700
15715
|
return r.trim() ? `${n} {\n${r}}\n` : "";
|
|
15701
15716
|
}
|
|
15702
15717
|
return `${n} {${e.block}}\n`;
|
|
15703
15718
|
}
|
|
15704
15719
|
let r = e.block.trim();
|
|
15705
15720
|
if (!r) return "";
|
|
15706
|
-
let i =
|
|
15721
|
+
let i = Yg(n, ",").map((e) => Kg(e.trim(), t)).filter(Boolean);
|
|
15707
15722
|
return i.length === 0 ? "" : `${i.join(", ")} { ${r} }\n`;
|
|
15708
15723
|
}
|
|
15709
|
-
function
|
|
15710
|
-
return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${
|
|
15724
|
+
function Gg(e, t) {
|
|
15725
|
+
return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${Zg(e.stimulusIdentifier)}"]`;
|
|
15711
15726
|
}
|
|
15712
|
-
function
|
|
15727
|
+
function Kg(e, t) {
|
|
15713
15728
|
if (!e) return "";
|
|
15714
15729
|
if (e === t || e.startsWith(`${t} `)) return e;
|
|
15715
|
-
let n =
|
|
15730
|
+
let n = Bg.exec(e);
|
|
15716
15731
|
return n ? `${t}${e.slice(n[0].length)}` : `${t} ${e}`;
|
|
15717
15732
|
}
|
|
15718
|
-
function
|
|
15733
|
+
function qg(e, t) {
|
|
15719
15734
|
let n = t, r = null, i = 0;
|
|
15720
15735
|
for (; n < e.length;) {
|
|
15721
15736
|
let a = e[n];
|
|
@@ -15729,7 +15744,7 @@ function Gg(e, t) {
|
|
|
15729
15744
|
end: n + 1
|
|
15730
15745
|
};
|
|
15731
15746
|
else if (i === 0 && a === "{") {
|
|
15732
|
-
let r =
|
|
15747
|
+
let r = Jg(e, n);
|
|
15733
15748
|
return {
|
|
15734
15749
|
kind: "rule",
|
|
15735
15750
|
prelude: e.slice(t, n),
|
|
@@ -15745,7 +15760,7 @@ function Gg(e, t) {
|
|
|
15745
15760
|
end: e.length
|
|
15746
15761
|
};
|
|
15747
15762
|
}
|
|
15748
|
-
function
|
|
15763
|
+
function Jg(e, t) {
|
|
15749
15764
|
let n = 0, r = null;
|
|
15750
15765
|
for (let i = t; i < e.length; i += 1) {
|
|
15751
15766
|
let t = e[i];
|
|
@@ -15768,7 +15783,7 @@ function Kg(e, t) {
|
|
|
15768
15783
|
end: e.length
|
|
15769
15784
|
};
|
|
15770
15785
|
}
|
|
15771
|
-
function
|
|
15786
|
+
function Yg(e, t) {
|
|
15772
15787
|
let n = [], r = "", i = null, a = 0;
|
|
15773
15788
|
for (let o = 0; o < e.length; o += 1) {
|
|
15774
15789
|
let s = e[o];
|
|
@@ -15788,7 +15803,7 @@ function qg(e, t) {
|
|
|
15788
15803
|
}
|
|
15789
15804
|
return n.push(r), n;
|
|
15790
15805
|
}
|
|
15791
|
-
function
|
|
15806
|
+
function Xg(e) {
|
|
15792
15807
|
let t = "", n = null, r = 0;
|
|
15793
15808
|
for (; r < e.length;) {
|
|
15794
15809
|
let i = e[r];
|
|
@@ -15813,67 +15828,67 @@ function Jg(e) {
|
|
|
15813
15828
|
}
|
|
15814
15829
|
return t;
|
|
15815
15830
|
}
|
|
15816
|
-
function
|
|
15831
|
+
function Zg(e) {
|
|
15817
15832
|
return e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n|\r|\f/g, " ");
|
|
15818
15833
|
}
|
|
15819
|
-
function
|
|
15834
|
+
function Qg(e, t, n) {
|
|
15820
15835
|
let r = Object.fromEntries(Object.entries(e?.stimuli ?? {}).map(([e, t]) => [e, n(t.bodyHtml)])), i = Object.fromEntries(Object.entries(t).map(([e, t]) => [e, n(t)]));
|
|
15821
15836
|
return {
|
|
15822
15837
|
...r,
|
|
15823
15838
|
...i
|
|
15824
15839
|
};
|
|
15825
15840
|
}
|
|
15826
|
-
function
|
|
15841
|
+
function $g(e, t) {
|
|
15827
15842
|
if (Object.keys(t).length === 0) return e;
|
|
15828
15843
|
let n = /* @__PURE__ */ new Set(), r = e.replace(/<([a-z][\w:-]*)([^>]*\bdata-stimulus-idref=(["'])([^"']+)\3[^>]*)>\s*<\/\1>/gi, (e, r, i, a, o) => {
|
|
15829
15844
|
let s = t[o];
|
|
15830
|
-
return s ? (n.add(o), `<${r}${
|
|
15845
|
+
return s ? (n.add(o), `<${r}${t_(i, "qti-stimulus-dock")}>${s}</${r}>`) : e;
|
|
15831
15846
|
});
|
|
15832
15847
|
r = r.replace(/<qti-assessment-stimulus-ref\b([^>]*)\/?>\s*(?:<\/qti-assessment-stimulus-ref>)?/gi, (e, r) => {
|
|
15833
|
-
let i =
|
|
15848
|
+
let i = e_(r, "identifier");
|
|
15834
15849
|
if (!i) return e;
|
|
15835
15850
|
if (n.has(i)) return "";
|
|
15836
15851
|
let a = t[i];
|
|
15837
|
-
return a ? (n.add(i), `<div data-stimulus-idref="${
|
|
15852
|
+
return a ? (n.add(i), `<div data-stimulus-idref="${n_(i)}" class="qti-stimulus-dock">${a}</div>`) : e;
|
|
15838
15853
|
});
|
|
15839
|
-
let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${
|
|
15854
|
+
let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${n_(e)}" class="qti-stimulus-block">${t}</div>`).join("");
|
|
15840
15855
|
return i ? i + r : r;
|
|
15841
15856
|
}
|
|
15842
|
-
function
|
|
15857
|
+
function e_(e, t) {
|
|
15843
15858
|
return e.match(RegExp(`\\b${t}\\s*=\\s*["']([^"']+)["']`, "i"))?.[1] ?? null;
|
|
15844
15859
|
}
|
|
15845
|
-
function
|
|
15860
|
+
function t_(e, t) {
|
|
15846
15861
|
let n = e.match(/\bclass\s*=\s*(["'])([^"']*)\1/i);
|
|
15847
15862
|
if (!n) return `${e} class="${t}"`;
|
|
15848
15863
|
let r = n[1], i = n[2] ?? "", a = new Set(i.split(/\s+/).filter(Boolean));
|
|
15849
15864
|
return a.add(t), e.replace(n[0], `class=${r}${Array.from(a).join(" ")}${r}`);
|
|
15850
15865
|
}
|
|
15851
|
-
function
|
|
15866
|
+
function n_(e) {
|
|
15852
15867
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
15853
15868
|
}
|
|
15854
|
-
function
|
|
15855
|
-
return
|
|
15869
|
+
function r_(e) {
|
|
15870
|
+
return rh(e);
|
|
15856
15871
|
}
|
|
15857
|
-
function
|
|
15858
|
-
return
|
|
15872
|
+
function i_(e) {
|
|
15873
|
+
return ih(e);
|
|
15859
15874
|
}
|
|
15860
|
-
function
|
|
15861
|
-
return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) =>
|
|
15875
|
+
function a_(e, t) {
|
|
15876
|
+
return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => c_(t, n, "textEntryInteraction") ? s_("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => c_(t, n, "textEntryInteraction") ? s_("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => c_(t, n, "inlineChoiceInteraction") ? s_("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => c_(t, n, "inlineChoiceInteraction") ? s_("inlineChoice", n) : e);
|
|
15862
15877
|
}
|
|
15863
|
-
function
|
|
15864
|
-
let n =
|
|
15878
|
+
function o_(e, t) {
|
|
15879
|
+
let n = a_(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
|
|
15865
15880
|
for (; (o = i.exec(n)) !== null;) {
|
|
15866
15881
|
if (o.index > a && r.push({
|
|
15867
15882
|
type: "html",
|
|
15868
15883
|
content: n.substring(a, o.index)
|
|
15869
15884
|
}), o[0].startsWith("[TEXTENTRY:")) {
|
|
15870
|
-
let e =
|
|
15885
|
+
let e = l_(t, o[1], "textEntryInteraction");
|
|
15871
15886
|
e && r.push({
|
|
15872
15887
|
type: "textEntry",
|
|
15873
15888
|
interaction: e
|
|
15874
15889
|
});
|
|
15875
15890
|
} else {
|
|
15876
|
-
let e =
|
|
15891
|
+
let e = l_(t, o[2], "inlineChoiceInteraction");
|
|
15877
15892
|
e && r.push({
|
|
15878
15893
|
type: "inlineChoice",
|
|
15879
15894
|
interaction: e
|
|
@@ -15889,17 +15904,17 @@ function i_(e, t) {
|
|
|
15889
15904
|
content: n
|
|
15890
15905
|
}];
|
|
15891
15906
|
}
|
|
15892
|
-
function
|
|
15907
|
+
function s_(e, t) {
|
|
15893
15908
|
return e === "textEntry" ? `[TEXTENTRY:${t}]` : `[INLINECHOICE:${t}]`;
|
|
15894
15909
|
}
|
|
15895
|
-
function
|
|
15896
|
-
return !!
|
|
15910
|
+
function c_(e, t, n) {
|
|
15911
|
+
return !!l_(e, t, n);
|
|
15897
15912
|
}
|
|
15898
|
-
function
|
|
15913
|
+
function l_(e, t, n) {
|
|
15899
15914
|
return e.find((e) => e.responseId === t && e.type === n) ?? null;
|
|
15900
15915
|
}
|
|
15901
|
-
function
|
|
15902
|
-
let d = e.getInteractionData(), f =
|
|
15916
|
+
function u_({ player: e, responses: t = {}, disabled: n = !1, role: r = "candidate", outcomeValues: i = {}, heuristicsConfig: a, stimulusContent: o = {}, deliveryContext: s, itemBodyScopeSelector: c = "[data-qti-item-body-scope]", renderItemBodyRubrics: l = !0, onComponentError: u }) {
|
|
15917
|
+
let d = e.getInteractionData(), f = Mg(r), p = n || f.isReadOnly, m = f.canViewCorrectResponses ? e.getCorrectResponses() : {}, h = d_({
|
|
15903
15918
|
player: e,
|
|
15904
15919
|
role: r,
|
|
15905
15920
|
outcomeValues: i,
|
|
@@ -15914,8 +15929,8 @@ function c_({ player: e, responses: t = {}, disabled: n = !1, role: r = "candida
|
|
|
15914
15929
|
effectiveDisabled: p,
|
|
15915
15930
|
correctResponses: m,
|
|
15916
15931
|
itemBodyHtml: h,
|
|
15917
|
-
inlineSegments:
|
|
15918
|
-
blockInteractions:
|
|
15932
|
+
inlineSegments: o_(h, d),
|
|
15933
|
+
blockInteractions: x_({
|
|
15919
15934
|
interactions: d,
|
|
15920
15935
|
player: e,
|
|
15921
15936
|
responses: t,
|
|
@@ -15926,75 +15941,75 @@ function c_({ player: e, responses: t = {}, disabled: n = !1, role: r = "candida
|
|
|
15926
15941
|
})
|
|
15927
15942
|
};
|
|
15928
15943
|
}
|
|
15929
|
-
function
|
|
15930
|
-
let c = String(e.getItemBodyHtml()), l = a ?? e.getDeliveryContext(), u =
|
|
15931
|
-
c =
|
|
15944
|
+
function d_({ player: e, role: t, outcomeValues: n, heuristicsConfig: r, stimulusContent: i, deliveryContext: a, itemBodyScopeSelector: o, renderItemBodyRubrics: s }) {
|
|
15945
|
+
let c = String(e.getItemBodyHtml()), l = a ?? e.getDeliveryContext(), u = Lg(l, o), d = Qg(l, i, (t) => e.sanitizeHtmlContent(t));
|
|
15946
|
+
c = $g(c, d), u && (c = `<style data-qti-stylesheets="resolved">${u}</style>${c}`), c = f_(c, t, { renderRubrics: s });
|
|
15932
15947
|
let f = qo(r);
|
|
15933
|
-
return c =
|
|
15948
|
+
return c = Fg(c, {
|
|
15934
15949
|
outcomeValues: n,
|
|
15935
15950
|
applyHeuristics: f.feedbackTextFormatting,
|
|
15936
15951
|
wrapWithSpan: !1
|
|
15937
|
-
}),
|
|
15952
|
+
}), b_(c);
|
|
15938
15953
|
}
|
|
15939
|
-
function
|
|
15954
|
+
function f_(e, t, { renderRubrics: n }) {
|
|
15940
15955
|
if (!e || !/rubric-?block/i.test(e)) return e;
|
|
15941
15956
|
try {
|
|
15942
15957
|
let r = Wo(e, {
|
|
15943
15958
|
lowerCaseTagName: !1,
|
|
15944
15959
|
comment: !1
|
|
15945
15960
|
});
|
|
15946
|
-
return
|
|
15961
|
+
return p_(r, t, { renderRubrics: n }), r.toString();
|
|
15947
15962
|
} catch {
|
|
15948
15963
|
return e;
|
|
15949
15964
|
}
|
|
15950
15965
|
}
|
|
15951
|
-
function
|
|
15966
|
+
function p_(e, t, { renderRubrics: n }) {
|
|
15952
15967
|
let r = [...e.childNodes];
|
|
15953
15968
|
for (let e of r) {
|
|
15954
15969
|
let r = e.rawTagName?.toLowerCase();
|
|
15955
|
-
if (r &&
|
|
15970
|
+
if (r && m_(r) && (!n || !h_(e, t))) {
|
|
15956
15971
|
e.remove();
|
|
15957
15972
|
continue;
|
|
15958
15973
|
}
|
|
15959
|
-
e.childNodes?.length &&
|
|
15974
|
+
e.childNodes?.length && p_(e, t, { renderRubrics: n }), r && m_(r) && e.replaceWith(g_(e));
|
|
15960
15975
|
}
|
|
15961
15976
|
}
|
|
15962
|
-
function
|
|
15977
|
+
function m_(e) {
|
|
15963
15978
|
return e === "rubricblock" || e === "qti-rubric-block";
|
|
15964
15979
|
}
|
|
15965
|
-
function
|
|
15980
|
+
function h_(e, t) {
|
|
15966
15981
|
let n = e.getAttribute("view")?.trim();
|
|
15967
|
-
return n ?
|
|
15982
|
+
return n ? __(n).includes(t) : !0;
|
|
15968
15983
|
}
|
|
15969
|
-
function
|
|
15984
|
+
function g_(e) {
|
|
15970
15985
|
let t = e.getAttribute("view")?.trim(), n = e.getAttribute("use")?.trim();
|
|
15971
15986
|
return `<div ${[
|
|
15972
15987
|
"class=\"qti-rubric-block\"",
|
|
15973
|
-
t ? `data-qti-rubric-view="${
|
|
15974
|
-
n ? `data-qti-rubric-use="${
|
|
15975
|
-
].filter(Boolean).join(" ")}>${
|
|
15988
|
+
t ? `data-qti-rubric-view="${y_(t)}"` : "",
|
|
15989
|
+
n ? `data-qti-rubric-use="${y_(n)}"` : ""
|
|
15990
|
+
].filter(Boolean).join(" ")}>${v_(e)}</div>`;
|
|
15976
15991
|
}
|
|
15977
|
-
function
|
|
15992
|
+
function __(e) {
|
|
15978
15993
|
return e.split(/[\s,]+/).filter(Boolean);
|
|
15979
15994
|
}
|
|
15980
|
-
function
|
|
15995
|
+
function v_(e) {
|
|
15981
15996
|
return [...e.childNodes].map((e) => e.toString()).join("");
|
|
15982
15997
|
}
|
|
15983
|
-
function
|
|
15998
|
+
function y_(e) {
|
|
15984
15999
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
15985
16000
|
}
|
|
15986
|
-
function
|
|
15987
|
-
return e.replace(/<(\w+Interaction|qti-[\w-]+-interaction)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) =>
|
|
16001
|
+
function b_(e) {
|
|
16002
|
+
return e.replace(/<(\w+Interaction|qti-[\w-]+-interaction)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => i_(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`);
|
|
15988
16003
|
}
|
|
15989
|
-
function
|
|
16004
|
+
function x_({ interactions: e, player: t, responses: n, correctResponses: r, roleCapabilities: i, effectiveDisabled: a, onComponentError: o }) {
|
|
15990
16005
|
let s = t.getComponentRegistry();
|
|
15991
|
-
return e.filter((e) => !
|
|
16006
|
+
return e.filter((e) => !r_(e.type)).map((e) => {
|
|
15992
16007
|
try {
|
|
15993
16008
|
let o = "stringIdentifier" in e && typeof e.stringIdentifier == "string" ? e.stringIdentifier : void 0;
|
|
15994
16009
|
return {
|
|
15995
16010
|
interaction: e,
|
|
15996
16011
|
tagName: s.getTagName(e),
|
|
15997
|
-
key:
|
|
16012
|
+
key: S_(e),
|
|
15998
16013
|
response: n[e.responseId] ?? null,
|
|
15999
16014
|
...o ? { stringResponse: n[o] ?? null } : {},
|
|
16000
16015
|
correctResponse: i.canViewCorrectResponses ? r[e.responseId] ?? null : null,
|
|
@@ -16008,17 +16023,17 @@ function y_({ interactions: e, player: t, responses: n, correctResponses: r, rol
|
|
|
16008
16023
|
}
|
|
16009
16024
|
}).filter((e) => e !== null);
|
|
16010
16025
|
}
|
|
16011
|
-
function
|
|
16026
|
+
function S_(e) {
|
|
16012
16027
|
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 : "";
|
|
16013
16028
|
return `${e.type}|${e.responseId}|${n}|${r}`;
|
|
16014
16029
|
}
|
|
16015
|
-
var
|
|
16030
|
+
var C_ = 0, w_ = /* @__PURE__ */ gf("<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>"), T_ = {
|
|
16016
16031
|
hash: "svelte-11qbngh",
|
|
16017
16032
|
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;}"
|
|
16018
16033
|
};
|
|
16019
|
-
function
|
|
16020
|
-
xc(t, !0), Kf(e,
|
|
16021
|
-
let n = Dp(t, "responses", 19, () => ({})), r = Dp(t, "disabled", 3, !1), i = Dp(t, "role", 3, "candidate"), a = Dp(t, "onResponseChange", 3, () => {}), o = Dp(t, "outcomeValues", 19, () => ({})), s = Dp(t, "stimulusContent", 19, () => ({})), c = Dp(t, "renderItemBodyRubrics", 3, !0), l = `qti-item-body-${++
|
|
16034
|
+
function E_(e, t) {
|
|
16035
|
+
xc(t, !0), Kf(e, T_);
|
|
16036
|
+
let n = Dp(t, "responses", 19, () => ({})), r = Dp(t, "disabled", 3, !1), i = Dp(t, "role", 3, "candidate"), a = Dp(t, "onResponseChange", 3, () => {}), o = Dp(t, "outcomeValues", 19, () => ({})), s = Dp(t, "stimulusContent", 19, () => ({})), c = Dp(t, "renderItemBodyRubrics", 3, !0), l = `qti-item-body-${++C_}`, u = `[data-qti-item-body-scope="${l}"]`, d = /* @__PURE__ */ Tl(() => u_({
|
|
16022
16037
|
player: t.player,
|
|
16023
16038
|
responses: n(),
|
|
16024
16039
|
disabled: r(),
|
|
@@ -16061,7 +16076,7 @@ function w_(e, t) {
|
|
|
16061
16076
|
destroy() {}
|
|
16062
16077
|
};
|
|
16063
16078
|
}
|
|
16064
|
-
var v =
|
|
16079
|
+
var v = w_(), y = Gu(v), b = Gu(y);
|
|
16065
16080
|
Rf(b, 21, () => $(d).inlineSegments, Pf, (e, n) => {
|
|
16066
16081
|
var r = _f(), i = Ku(r), a = (e) => {
|
|
16067
16082
|
var t = _f();
|
|
@@ -16070,7 +16085,7 @@ function w_(e, t) {
|
|
|
16070
16085
|
let r = /* @__PURE__ */ Tl(() => $(d).roleCapabilities.canViewCorrectResponses ? $(d).correctResponses[$(n).interaction.responseId] ?? null : null);
|
|
16071
16086
|
{
|
|
16072
16087
|
let i = /* @__PURE__ */ Tl(() => f($(n).interaction.responseId)), a = /* @__PURE__ */ Tl(() => $(d).roleCapabilities.canViewCorrectResponses ? $(r) : null);
|
|
16073
|
-
|
|
16088
|
+
Ag(e, {
|
|
16074
16089
|
get interaction() {
|
|
16075
16090
|
return $(n).interaction;
|
|
16076
16091
|
},
|
|
@@ -16093,7 +16108,7 @@ function w_(e, t) {
|
|
|
16093
16108
|
let r = /* @__PURE__ */ Tl(() => $(d).roleCapabilities.canViewCorrectResponses ? $(d).correctResponses[$(n).interaction.responseId] ?? null : null);
|
|
16094
16109
|
{
|
|
16095
16110
|
let i = /* @__PURE__ */ Tl(() => f($(n).interaction.responseId)), a = /* @__PURE__ */ Tl(() => $(d).roleCapabilities.canViewCorrectResponses ? $(r) : null);
|
|
16096
|
-
|
|
16111
|
+
Eg(e, {
|
|
16097
16112
|
get interaction() {
|
|
16098
16113
|
return $(n).interaction;
|
|
16099
16114
|
},
|
|
@@ -16134,14 +16149,14 @@ function w_(e, t) {
|
|
|
16134
16149
|
createPciHost: h
|
|
16135
16150
|
}));
|
|
16136
16151
|
}), vf(e, r);
|
|
16137
|
-
}), uc(v), Ep(v, (e) => ku(g, e), () => $(g)), qf(v, (e, t) =>
|
|
16152
|
+
}), uc(v), Ep(v, (e) => ku(g, e), () => $(g)), qf(v, (e, t) => tg?.(e, t), () => ({ typeset: t.typeset })), qf(v, (e, t) => xg?.(e, t), () => ({ player: t.player })), ld(() => mp(v, "data-qti-item-body-scope", l)), vf(e, v), Sc();
|
|
16138
16153
|
}
|
|
16139
|
-
var
|
|
16154
|
+
var D_ = /* @__PURE__ */ gf("<h3 class=\"qti-feedback-title svelte-i66ia0\"> </h3>"), O_ = /* @__PURE__ */ gf("<div class=\"qti-feedback-content svelte-i66ia0\"></div>"), k_ = /* @__PURE__ */ gf("<div><!> <!></div>"), A_ = /* @__PURE__ */ gf("<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>"), j_ = {
|
|
16140
16155
|
hash: "svelte-i66ia0",
|
|
16141
16156
|
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;}"
|
|
16142
16157
|
};
|
|
16143
|
-
function
|
|
16144
|
-
xc(t, !0), Kf(e,
|
|
16158
|
+
function M_(e, t) {
|
|
16159
|
+
xc(t, !0), Kf(e, j_);
|
|
16145
16160
|
let n = Dp(t, "feedback", 19, () => []), r = /* @__PURE__ */ Tl(() => n().length > 0), i = "item-player-modal-feedback-title", a = /* @__PURE__ */ Tl(() => n().find((e) => e.title)?.title);
|
|
16146
16161
|
function o() {
|
|
16147
16162
|
t.onClose?.();
|
|
@@ -16150,12 +16165,12 @@ function A_(e, t) {
|
|
|
16150
16165
|
e.target === e.currentTarget && o();
|
|
16151
16166
|
}
|
|
16152
16167
|
var c = _f(), l = Ku(c), u = (e) => {
|
|
16153
|
-
var r =
|
|
16168
|
+
var r = A_(), c = Gu(r), l = Gu(c), u = qu(l, 2);
|
|
16154
16169
|
Rf(u, 17, n, Pf, (e, r, a) => {
|
|
16155
|
-
var o =
|
|
16170
|
+
var o = k_();
|
|
16156
16171
|
let s;
|
|
16157
16172
|
var c = Gu(o), l = (e) => {
|
|
16158
|
-
var t =
|
|
16173
|
+
var t = D_();
|
|
16159
16174
|
mp(t, "id", a === 0 ? i : void 0);
|
|
16160
16175
|
var n = Gu(t, !0);
|
|
16161
16176
|
uc(t), ld(() => yf(n, $(r).title)), vf(e, t);
|
|
@@ -16164,10 +16179,10 @@ function A_(e, t) {
|
|
|
16164
16179
|
$(r).title && e(l);
|
|
16165
16180
|
});
|
|
16166
16181
|
var u = qu(c, 2), d = (e) => {
|
|
16167
|
-
var n =
|
|
16168
|
-
Wf(n, () => $(r).content, !0), uc(n), qf(n, (e, t) =>
|
|
16182
|
+
var n = O_();
|
|
16183
|
+
Wf(n, () => $(r).content, !0), uc(n), qf(n, (e, t) => tg?.(e, t), () => ({ typeset: t.typeset })), vf(e, n);
|
|
16169
16184
|
}, f = (e) => {
|
|
16170
|
-
var t =
|
|
16185
|
+
var t = O_();
|
|
16171
16186
|
Wf(t, () => $(r).content, !0), uc(t), vf(e, t);
|
|
16172
16187
|
};
|
|
16173
16188
|
Nf(u, (e) => {
|
|
@@ -16191,16 +16206,16 @@ function A_(e, t) {
|
|
|
16191
16206
|
}), vf(e, c), Sc();
|
|
16192
16207
|
}
|
|
16193
16208
|
lf(["click"]);
|
|
16194
|
-
var
|
|
16209
|
+
var N_ = /* @__PURE__ */ gf("<div class=\"qti-player-alert qti-player-alert-error svelte-129urwy\"><span> </span></div>"), P_ = /* @__PURE__ */ gf("<span class=\"qti-player-badge qti-player-badge-success svelte-129urwy\"> </span>"), F_ = /* @__PURE__ */ gf("<span> </span>"), I_ = /* @__PURE__ */ gf("<div class=\"qti-player-attempt-status svelte-129urwy\"><!></div>"), L_ = /* @__PURE__ */ gf("<div class=\"qti-player-actions svelte-129urwy\"><button class=\"qti-player-button qti-player-button-primary svelte-129urwy\"> </button> <!></div>"), R_ = /* @__PURE__ */ gf("<!> <!> <!>", 1), z_ = /* @__PURE__ */ gf("<div class=\"qti-player-alert qti-player-alert-info svelte-129urwy\"><span> </span></div>"), B_ = /* @__PURE__ */ gf("<div class=\"qti-item-player svelte-129urwy\"><!></div>"), V_ = {
|
|
16195
16210
|
hash: "svelte-129urwy",
|
|
16196
16211
|
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);}"
|
|
16197
16212
|
};
|
|
16198
|
-
function
|
|
16199
|
-
xc(t, !0), Kf(e,
|
|
16213
|
+
function H_(e, t) {
|
|
16214
|
+
xc(t, !0), Kf(e, V_);
|
|
16200
16215
|
let n = Dp(t, "role", 3, "candidate"), r = Dp(t, "responses", 19, () => ({})), i = Dp(t, "disabled", 3, !1), a = Dp(t, "renderItemBodyRubrics", 3, !0), o = /* @__PURE__ */ Tl(() => t.showSubmit ?? !!t.onSubmit), s = /* @__PURE__ */ Du(null), c = /* @__PURE__ */ Du(Pu({})), l = /* @__PURE__ */ Du(null), u = /* @__PURE__ */ Du(Pu([])), d = /* @__PURE__ */ Du(Pu({})), f = /* @__PURE__ */ Du(!1), p = /* @__PURE__ */ Du(!1), m = /* @__PURE__ */ Du(0);
|
|
16201
16216
|
rd(() => {
|
|
16202
16217
|
try {
|
|
16203
|
-
let e = Yd(() => r()), i = new
|
|
16218
|
+
let e = Yd(() => r()), i = new Zh({
|
|
16204
16219
|
itemXml: t.itemXml,
|
|
16205
16220
|
role: n(),
|
|
16206
16221
|
security: t.security,
|
|
@@ -16242,12 +16257,12 @@ function B_(e, t) {
|
|
|
16242
16257
|
function _() {
|
|
16243
16258
|
ku(u, [], !0);
|
|
16244
16259
|
}
|
|
16245
|
-
var v = { submit: g }, y =
|
|
16246
|
-
var t =
|
|
16260
|
+
var v = { submit: g }, y = B_(), b = Gu(y), ee = (e) => {
|
|
16261
|
+
var t = N_(), n = Gu(t), r = Gu(n, !0);
|
|
16247
16262
|
uc(n), uc(t), ld(() => yf(r, $(l))), vf(e, t);
|
|
16248
16263
|
}, x = (e) => {
|
|
16249
|
-
var r =
|
|
16250
|
-
|
|
16264
|
+
var r = R_(), l = Ku(r);
|
|
16265
|
+
E_(l, {
|
|
16251
16266
|
get player() {
|
|
16252
16267
|
return $(s);
|
|
16253
16268
|
},
|
|
@@ -16279,14 +16294,14 @@ function B_(e, t) {
|
|
|
16279
16294
|
});
|
|
16280
16295
|
var v = qu(l, 2), y = (e) => {
|
|
16281
16296
|
let n = /* @__PURE__ */ Tl(() => $(s).canSubmitResponses($(c)));
|
|
16282
|
-
var r =
|
|
16297
|
+
var r = L_(), i = Gu(r), a = Gu(i, !0);
|
|
16283
16298
|
uc(i);
|
|
16284
16299
|
var o = qu(i, 2), l = (e) => {
|
|
16285
|
-
var n =
|
|
16286
|
-
var n =
|
|
16300
|
+
var n = I_(), r = Gu(n), i = (e) => {
|
|
16301
|
+
var n = P_(), r = Gu(n, !0);
|
|
16287
16302
|
uc(n), ld((e) => yf(r, e), [() => t.i18n?.t("item.complete") ?? "item.complete"]), vf(e, n);
|
|
16288
16303
|
}, a = (e) => {
|
|
16289
|
-
var n =
|
|
16304
|
+
var n = F_(), r = Gu(n, !0);
|
|
16290
16305
|
uc(n), ld((e) => yf(r, e), [() => t.i18n?.t("item.attempt", { numAttempts: $(m) + 1 }) ?? `item.attempt (${$(m) + 1})`]), vf(e, n);
|
|
16291
16306
|
};
|
|
16292
16307
|
Nf(r, (e) => {
|
|
@@ -16301,7 +16316,7 @@ function B_(e, t) {
|
|
|
16301
16316
|
};
|
|
16302
16317
|
Nf(v, (e) => {
|
|
16303
16318
|
n() === "candidate" && !i() && $(o) && e(y);
|
|
16304
|
-
}),
|
|
16319
|
+
}), M_(qu(v, 2), {
|
|
16305
16320
|
get feedback() {
|
|
16306
16321
|
return $(u);
|
|
16307
16322
|
},
|
|
@@ -16314,7 +16329,7 @@ function B_(e, t) {
|
|
|
16314
16329
|
}
|
|
16315
16330
|
}), vf(e, r);
|
|
16316
16331
|
}, S = (e) => {
|
|
16317
|
-
var n =
|
|
16332
|
+
var n = z_(), r = Gu(n), i = Gu(r, !0);
|
|
16318
16333
|
uc(r), uc(n), ld((e) => yf(i, e), [() => t.i18n?.t("item.loading") ?? "item.loading"]), vf(e, n);
|
|
16319
16334
|
};
|
|
16320
16335
|
return Nf(b, (e) => {
|
|
@@ -16322,16 +16337,16 @@ function B_(e, t) {
|
|
|
16322
16337
|
}), uc(y), vf(e, y), Sc(v);
|
|
16323
16338
|
}
|
|
16324
16339
|
lf(["click"]);
|
|
16325
|
-
var
|
|
16340
|
+
var U_ = globalThis.HTMLElement ?? class {}, W_ = /* @__PURE__ */ new WeakMap(), G_ = /* @__PURE__ */ new WeakMap(), K_ = /* @__PURE__ */ new WeakMap(), q_ = /* @__PURE__ */ new WeakMap(), J_ = /* @__PURE__ */ new WeakMap(), Y_ = /* @__PURE__ */ new WeakMap(), X_ = /* @__PURE__ */ new WeakMap(), Z_ = /* @__PURE__ */ new WeakMap(), Q_ = /* @__PURE__ */ new WeakMap(), $_ = /* @__PURE__ */ new WeakMap(), ev = /* @__PURE__ */ new WeakMap(), tv = /* @__PURE__ */ new WeakMap(), nv = /* @__PURE__ */ new WeakMap(), rv = /* @__PURE__ */ new WeakMap(), iv = /* @__PURE__ */ new WeakMap(), av = /* @__PURE__ */ new WeakMap(), ov = /* @__PURE__ */ new WeakMap(), sv = /* @__PURE__ */ new WeakSet(), cv = class extends U_ {
|
|
16326
16341
|
constructor(...e) {
|
|
16327
|
-
super(...e), Hc(this,
|
|
16342
|
+
super(...e), Hc(this, sv), K(this, W_, w({
|
|
16328
16343
|
host: this,
|
|
16329
|
-
mount: (e, t) => bf(
|
|
16344
|
+
mount: (e, t) => bf(H_, {
|
|
16330
16345
|
target: e,
|
|
16331
16346
|
props: t
|
|
16332
16347
|
}),
|
|
16333
16348
|
unmount: wf
|
|
16334
|
-
})), K(this,
|
|
16349
|
+
})), K(this, G_, ""), K(this, K_, "candidate"), K(this, q_, !1), K(this, J_, !0), K(this, Y_, void 0), K(this, X_, void 0), K(this, Z_, void 0), K(this, Q_, void 0), K(this, $_, void 0), K(this, ev, void 0), K(this, tv, void 0), K(this, nv, void 0), K(this, rv, void 0), K(this, iv, void 0), K(this, av, void 0), K(this, ov, void 0);
|
|
16335
16350
|
}
|
|
16336
16351
|
static get observedAttributes() {
|
|
16337
16352
|
return [
|
|
@@ -16341,103 +16356,103 @@ var V_ = globalThis.HTMLElement ?? class {}, H_ = /* @__PURE__ */ new WeakMap(),
|
|
|
16341
16356
|
];
|
|
16342
16357
|
}
|
|
16343
16358
|
get itemXml() {
|
|
16344
|
-
return Y(
|
|
16359
|
+
return Y(G_, this);
|
|
16345
16360
|
}
|
|
16346
16361
|
set itemXml(e) {
|
|
16347
|
-
J(
|
|
16362
|
+
J(G_, this, e ?? ""), q(sv, this, uv).call(this);
|
|
16348
16363
|
}
|
|
16349
16364
|
get role() {
|
|
16350
|
-
return Y(
|
|
16365
|
+
return Y(K_, this);
|
|
16351
16366
|
}
|
|
16352
16367
|
set role(e) {
|
|
16353
|
-
J(
|
|
16368
|
+
J(K_, this, e ?? "candidate"), q(sv, this, uv).call(this);
|
|
16354
16369
|
}
|
|
16355
16370
|
get disabled() {
|
|
16356
|
-
return Y(
|
|
16371
|
+
return Y(q_, this);
|
|
16357
16372
|
}
|
|
16358
16373
|
set disabled(e) {
|
|
16359
|
-
J(
|
|
16374
|
+
J(q_, this, !!e), q(sv, this, uv).call(this);
|
|
16360
16375
|
}
|
|
16361
16376
|
get renderItemBodyRubrics() {
|
|
16362
|
-
return Y(
|
|
16377
|
+
return Y(J_, this);
|
|
16363
16378
|
}
|
|
16364
16379
|
set renderItemBodyRubrics(e) {
|
|
16365
|
-
J(
|
|
16380
|
+
J(J_, this, e !== !1), q(sv, this, uv).call(this);
|
|
16366
16381
|
}
|
|
16367
16382
|
get typeset() {
|
|
16368
|
-
return Y(
|
|
16383
|
+
return Y(Y_, this);
|
|
16369
16384
|
}
|
|
16370
16385
|
set typeset(e) {
|
|
16371
|
-
J(
|
|
16386
|
+
J(Y_, this, e), q(sv, this, uv).call(this);
|
|
16372
16387
|
}
|
|
16373
16388
|
get i18n() {
|
|
16374
|
-
return Y(
|
|
16389
|
+
return Y(X_, this);
|
|
16375
16390
|
}
|
|
16376
16391
|
set i18n(e) {
|
|
16377
|
-
J(
|
|
16392
|
+
J(X_, this, e), q(sv, this, uv).call(this);
|
|
16378
16393
|
}
|
|
16379
16394
|
get security() {
|
|
16380
|
-
return Y(
|
|
16395
|
+
return Y(Z_, this);
|
|
16381
16396
|
}
|
|
16382
16397
|
set security(e) {
|
|
16383
|
-
J(
|
|
16398
|
+
J(Z_, this, e), q(sv, this, uv).call(this);
|
|
16384
16399
|
}
|
|
16385
16400
|
get pnp() {
|
|
16386
|
-
return Y(
|
|
16401
|
+
return Y(Q_, this);
|
|
16387
16402
|
}
|
|
16388
16403
|
set pnp(e) {
|
|
16389
|
-
J(
|
|
16404
|
+
J(Q_, this, e), q(sv, this, uv).call(this);
|
|
16390
16405
|
}
|
|
16391
16406
|
get deliveryContext() {
|
|
16392
|
-
return Y(
|
|
16407
|
+
return Y($_, this);
|
|
16393
16408
|
}
|
|
16394
16409
|
set deliveryContext(e) {
|
|
16395
|
-
J(
|
|
16410
|
+
J($_, this, e), q(sv, this, uv).call(this);
|
|
16396
16411
|
}
|
|
16397
16412
|
get pci() {
|
|
16398
|
-
return Y(
|
|
16413
|
+
return Y(nv, this);
|
|
16399
16414
|
}
|
|
16400
16415
|
set pci(e) {
|
|
16401
|
-
J(
|
|
16416
|
+
J(nv, this, e), q(sv, this, uv).call(this);
|
|
16402
16417
|
}
|
|
16403
16418
|
get resolveProcessingFragment() {
|
|
16404
|
-
return Y(
|
|
16419
|
+
return Y(ev, this);
|
|
16405
16420
|
}
|
|
16406
16421
|
set resolveProcessingFragment(e) {
|
|
16407
|
-
J(
|
|
16422
|
+
J(ev, this, e), q(sv, this, uv).call(this);
|
|
16408
16423
|
}
|
|
16409
16424
|
get processingFragmentLimits() {
|
|
16410
|
-
return Y(
|
|
16425
|
+
return Y(tv, this);
|
|
16411
16426
|
}
|
|
16412
16427
|
set processingFragmentLimits(e) {
|
|
16413
|
-
J(
|
|
16428
|
+
J(tv, this, e), q(sv, this, uv).call(this);
|
|
16414
16429
|
}
|
|
16415
16430
|
get responses() {
|
|
16416
|
-
return Y(
|
|
16431
|
+
return Y(rv, this);
|
|
16417
16432
|
}
|
|
16418
16433
|
set responses(e) {
|
|
16419
|
-
J(
|
|
16434
|
+
J(rv, this, e ? { ...e } : void 0), q(sv, this, uv).call(this);
|
|
16420
16435
|
}
|
|
16421
16436
|
get onResponseChange() {
|
|
16422
|
-
return Y(
|
|
16437
|
+
return Y(iv, this);
|
|
16423
16438
|
}
|
|
16424
16439
|
set onResponseChange(e) {
|
|
16425
|
-
J(
|
|
16440
|
+
J(iv, this, e);
|
|
16426
16441
|
}
|
|
16427
16442
|
get onSubmit() {
|
|
16428
|
-
return Y(
|
|
16443
|
+
return Y(av, this);
|
|
16429
16444
|
}
|
|
16430
16445
|
set onSubmit(e) {
|
|
16431
|
-
J(
|
|
16446
|
+
J(av, this, e), q(sv, this, uv).call(this);
|
|
16432
16447
|
}
|
|
16433
16448
|
get onComplete() {
|
|
16434
|
-
return Y(
|
|
16449
|
+
return Y(ov, this);
|
|
16435
16450
|
}
|
|
16436
16451
|
set onComplete(e) {
|
|
16437
|
-
J(
|
|
16452
|
+
J(ov, this, e);
|
|
16438
16453
|
}
|
|
16439
16454
|
connectedCallback() {
|
|
16440
|
-
Y(
|
|
16455
|
+
Y(W_, this).mountOrUpdate(q(sv, this, lv).call(this)), queueMicrotask(() => {
|
|
16441
16456
|
this.isConnected && this.dispatchEvent(new CustomEvent("ready", {
|
|
16442
16457
|
bubbles: !0,
|
|
16443
16458
|
composed: !0
|
|
@@ -16445,45 +16460,45 @@ var V_ = globalThis.HTMLElement ?? class {}, H_ = /* @__PURE__ */ new WeakMap(),
|
|
|
16445
16460
|
});
|
|
16446
16461
|
}
|
|
16447
16462
|
disconnectedCallback() {
|
|
16448
|
-
Y(
|
|
16463
|
+
Y(W_, this).teardown({ removeContainer: !0 });
|
|
16449
16464
|
}
|
|
16450
16465
|
attributeChangedCallback(e, t, n) {
|
|
16451
|
-
e === "item-xml" ? J(
|
|
16466
|
+
e === "item-xml" ? J(G_, this, n ?? "") : e === "role" ? J(K_, this, n ?? "candidate") : e === "disabled" && J(q_, this, n !== null), q(sv, this, uv).call(this);
|
|
16452
16467
|
}
|
|
16453
16468
|
submit(e = !0) {
|
|
16454
|
-
return Y(
|
|
16469
|
+
return Y(W_, this).instance?.submit(e);
|
|
16455
16470
|
}
|
|
16456
16471
|
addEventListener(e, t, n) {
|
|
16457
16472
|
super.addEventListener(e, t, n);
|
|
16458
16473
|
}
|
|
16459
16474
|
};
|
|
16460
|
-
function
|
|
16475
|
+
function lv() {
|
|
16461
16476
|
return {
|
|
16462
|
-
itemXml: Y(
|
|
16463
|
-
role: Y(
|
|
16464
|
-
disabled: Y(
|
|
16465
|
-
renderItemBodyRubrics: Y(
|
|
16466
|
-
typeset: Y(
|
|
16467
|
-
i18n: Y(
|
|
16477
|
+
itemXml: Y(G_, this),
|
|
16478
|
+
role: Y(K_, this),
|
|
16479
|
+
disabled: Y(q_, this),
|
|
16480
|
+
renderItemBodyRubrics: Y(J_, this),
|
|
16481
|
+
typeset: Y(Y_, this),
|
|
16482
|
+
i18n: Y(X_, this),
|
|
16468
16483
|
security: {
|
|
16469
|
-
...Y(
|
|
16484
|
+
...Y(Z_, this) ?? {},
|
|
16470
16485
|
parsingLimits: {
|
|
16471
16486
|
enabled: !0,
|
|
16472
|
-
...Y(
|
|
16487
|
+
...Y(Z_, this)?.parsingLimits ?? {}
|
|
16473
16488
|
}
|
|
16474
16489
|
},
|
|
16475
|
-
pnp: Y(
|
|
16476
|
-
deliveryContext: Y(
|
|
16477
|
-
resolveProcessingFragment: Y(
|
|
16478
|
-
processingFragmentLimits: Y(
|
|
16479
|
-
pci: Y(
|
|
16480
|
-
responses: Y(
|
|
16490
|
+
pnp: Y(Q_, this),
|
|
16491
|
+
deliveryContext: Y($_, this),
|
|
16492
|
+
resolveProcessingFragment: Y(ev, this),
|
|
16493
|
+
processingFragmentLimits: Y(tv, this),
|
|
16494
|
+
pci: Y(nv, this),
|
|
16495
|
+
responses: Y(rv, this),
|
|
16481
16496
|
onResponseChange: (e, t) => {
|
|
16482
16497
|
let n = {
|
|
16483
|
-
...Y(
|
|
16498
|
+
...Y(rv, this) ?? {},
|
|
16484
16499
|
[e]: t
|
|
16485
16500
|
};
|
|
16486
|
-
J(
|
|
16501
|
+
J(rv, this, n), Y(iv, this)?.call(this, e, t), this.dispatchEvent(new CustomEvent("response-change", {
|
|
16487
16502
|
detail: {
|
|
16488
16503
|
responseId: e,
|
|
16489
16504
|
value: t,
|
|
@@ -16495,7 +16510,7 @@ function sv() {
|
|
|
16495
16510
|
},
|
|
16496
16511
|
onSubmit: (e, t) => {
|
|
16497
16512
|
let n = { ...e };
|
|
16498
|
-
J(
|
|
16513
|
+
J(rv, this, n), Y(av, this)?.call(this, n, t), this.dispatchEvent(new CustomEvent("submit", {
|
|
16499
16514
|
detail: {
|
|
16500
16515
|
responses: n,
|
|
16501
16516
|
result: t
|
|
@@ -16504,9 +16519,9 @@ function sv() {
|
|
|
16504
16519
|
composed: !0
|
|
16505
16520
|
}));
|
|
16506
16521
|
},
|
|
16507
|
-
showSubmit: !!Y(
|
|
16522
|
+
showSubmit: !!Y(av, this),
|
|
16508
16523
|
onComplete: (e) => {
|
|
16509
|
-
Y(
|
|
16524
|
+
Y(ov, this)?.call(this, e), this.dispatchEvent(new CustomEvent("complete", {
|
|
16510
16525
|
detail: { result: e },
|
|
16511
16526
|
bubbles: !0,
|
|
16512
16527
|
composed: !0
|
|
@@ -16514,10 +16529,10 @@ function sv() {
|
|
|
16514
16529
|
}
|
|
16515
16530
|
};
|
|
16516
16531
|
}
|
|
16517
|
-
function
|
|
16518
|
-
Y(
|
|
16532
|
+
function uv() {
|
|
16533
|
+
Y(W_, this).update(q(sv, this, lv).call(this));
|
|
16519
16534
|
}
|
|
16520
16535
|
//#endregion
|
|
16521
|
-
export { w as A, de as C, ne as D, re as E, _ as F, t as I, ee as M, b as N, A as O, v as P, pe as S, D as T, B as _, Yo as a, he as b, Wo as c, pn as d, V as f, sn as g, z as h, Zo as i, C as j, k, bn as l, L as m, Jo as n, Go as o, un as p, Xo as r, qo as s,
|
|
16536
|
+
export { w as A, de as C, ne as D, re as E, _ as F, t as I, ee as M, b as N, A as O, v as P, pe as S, D as T, B as _, Yo as a, he as b, Wo as c, pn as d, V as f, sn as g, z as h, Zo as i, C as j, k, bn as l, L as m, Jo as n, Go as o, un as p, Xo as r, qo as s, cv as t, gn as u, cn as v, fe as w, me as x, M as y };
|
|
16522
16537
|
|
|
16523
|
-
//# sourceMappingURL=element-class-
|
|
16538
|
+
//# sourceMappingURL=element-class-BEpwHdcP-BHKRGZoi.js.map
|