@project-sunbird/sunbird-questionset-editor-web-component-react 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/sunbird-quml-player.js +5 -5
- package/dist/index.js +151 -151
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var Ua = (e) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Wd = (e, t, n) => t in e ? Qd(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
6
|
var ja = (e, t, n) => Wd(e, typeof t != "symbol" ? t + "" : t, n), js = (e, t, n) => t.has(e) || Ua("Cannot " + n);
|
|
7
|
-
var T = (e, t, n) => (js(e, t, "read from private field"), n ? n.call(e) : t.get(e)),
|
|
7
|
+
var T = (e, t, n) => (js(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ae = (e, t, n) => t.has(e) ? Ua("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), W = (e, t, n, r) => (js(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), ye = (e, t, n) => (js(e, t, "access private method"), n);
|
|
8
8
|
var Hi = (e, t, n, r) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
W(e, t, i, n);
|
|
@@ -37,9 +37,9 @@ var Kr = class {
|
|
|
37
37
|
}, ir, Mn, Rr, _c, Jd = (_c = class extends Kr {
|
|
38
38
|
constructor() {
|
|
39
39
|
super();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
ae(this, ir);
|
|
41
|
+
ae(this, Mn);
|
|
42
|
+
ae(this, Rr);
|
|
43
43
|
W(this, Rr, (t) => {
|
|
44
44
|
if (typeof window < "u" && window.addEventListener) {
|
|
45
45
|
const n = () => t();
|
|
@@ -99,8 +99,8 @@ var Kr = class {
|
|
|
99
99
|
//
|
|
100
100
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
101
101
|
// this class is unsafe internally to allow for extension.
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
ae(this, qn, Zd);
|
|
103
|
+
ae(this, Zo, !1);
|
|
104
104
|
}
|
|
105
105
|
setTimeoutProvider(e) {
|
|
106
106
|
W(this, qn, e);
|
|
@@ -366,9 +366,9 @@ function uh() {
|
|
|
366
366
|
var rt = uh(), Dr, In, Nr, xc, dh = (xc = class extends Kr {
|
|
367
367
|
constructor() {
|
|
368
368
|
super();
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
ae(this, Dr, !0);
|
|
370
|
+
ae(this, In);
|
|
371
|
+
ae(this, Nr);
|
|
372
372
|
W(this, Nr, (t) => {
|
|
373
373
|
if (typeof window < "u" && window.addEventListener) {
|
|
374
374
|
const n = () => t(!0), r = () => t(!1);
|
|
@@ -470,7 +470,7 @@ function Ic(e) {
|
|
|
470
470
|
}
|
|
471
471
|
var sr, Cc, Fc = (Cc = class {
|
|
472
472
|
constructor() {
|
|
473
|
-
|
|
473
|
+
ae(this, sr);
|
|
474
474
|
}
|
|
475
475
|
destroy() {
|
|
476
476
|
this.clearGcTimeout();
|
|
@@ -574,15 +574,15 @@ function ph(e, { pages: t, pageParams: n }) {
|
|
|
574
574
|
var Or, or, Lr, Qt, ar, ct, wi, lr, Ft, zc, yn, Tc, mh = (Tc = class extends Fc {
|
|
575
575
|
constructor(t) {
|
|
576
576
|
super();
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
577
|
+
ae(this, Ft);
|
|
578
|
+
ae(this, Or);
|
|
579
|
+
ae(this, or);
|
|
580
|
+
ae(this, Lr);
|
|
581
|
+
ae(this, Qt);
|
|
582
|
+
ae(this, ar);
|
|
583
|
+
ae(this, ct);
|
|
584
|
+
ae(this, wi);
|
|
585
|
+
ae(this, lr);
|
|
586
586
|
W(this, lr, !1), W(this, wi, t.defaultOptions), this.setOptions(t.options), this.observers = [], W(this, ar, t.client), W(this, Qt, T(this, ar).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, W(this, or, Ga(this.options)), this.state = t.state ?? T(this, or), this.scheduleGc();
|
|
587
587
|
}
|
|
588
588
|
get meta() {
|
|
@@ -897,24 +897,24 @@ function Ga(e) {
|
|
|
897
897
|
var Dt, Ee, _i, Et, cr, Pr, vn, Fn, Si, Mr, qr, ur, dr, zn, Ir, Le, oi, ho, fo, po, mo, go, bo, yo, jc, Ec, ia = (Ec = class extends Kr {
|
|
898
898
|
constructor(t, n) {
|
|
899
899
|
super();
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
900
|
+
ae(this, Le);
|
|
901
|
+
ae(this, Dt);
|
|
902
|
+
ae(this, Ee);
|
|
903
|
+
ae(this, _i);
|
|
904
|
+
ae(this, Et);
|
|
905
|
+
ae(this, cr);
|
|
906
|
+
ae(this, Pr);
|
|
907
|
+
ae(this, vn);
|
|
908
|
+
ae(this, Fn);
|
|
909
|
+
ae(this, Si);
|
|
910
|
+
ae(this, Mr);
|
|
911
911
|
// This property keeps track of the last query with defined data.
|
|
912
912
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
913
|
+
ae(this, qr);
|
|
914
|
+
ae(this, ur);
|
|
915
|
+
ae(this, dr);
|
|
916
|
+
ae(this, zn);
|
|
917
|
+
ae(this, Ir, /* @__PURE__ */ new Set());
|
|
918
918
|
this.options = n, W(this, Dt, t), W(this, Fn, null), W(this, vn, co()), this.bindMethods(), this.setOptions(n);
|
|
919
919
|
}
|
|
920
920
|
bindMethods() {
|
|
@@ -1181,11 +1181,11 @@ function bh(e, t) {
|
|
|
1181
1181
|
var xi, ln, wt, hr, cn, Dn, Ac, yh = (Ac = class extends Fc {
|
|
1182
1182
|
constructor(t) {
|
|
1183
1183
|
super();
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1184
|
+
ae(this, cn);
|
|
1185
|
+
ae(this, xi);
|
|
1186
|
+
ae(this, ln);
|
|
1187
|
+
ae(this, wt);
|
|
1188
|
+
ae(this, hr);
|
|
1189
1189
|
W(this, xi, t.client), this.mutationId = t.mutationId, W(this, wt, t.mutationCache), W(this, ln, []), this.state = t.state || vh(), this.setOptions(t.options), this.scheduleGc();
|
|
1190
1190
|
}
|
|
1191
1191
|
setOptions(t) {
|
|
@@ -1425,9 +1425,9 @@ function vh() {
|
|
|
1425
1425
|
var wn, en, Ci, kc, wh = (kc = class extends Kr {
|
|
1426
1426
|
constructor(t = {}) {
|
|
1427
1427
|
super();
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1428
|
+
ae(this, wn);
|
|
1429
|
+
ae(this, en);
|
|
1430
|
+
ae(this, Ci);
|
|
1431
1431
|
this.config = t, W(this, wn, /* @__PURE__ */ new Set()), W(this, en, /* @__PURE__ */ new Map()), W(this, Ci, 0);
|
|
1432
1432
|
}
|
|
1433
1433
|
build(t, n, r) {
|
|
@@ -1532,17 +1532,17 @@ function _h(e, t, n) {
|
|
|
1532
1532
|
var Fr, Nt, zr, fr, It, Un, Ti, Ei, Ai, ki, ot, wo, _o, Bc, So, xo, Co, Rc, Sh = (Rc = class extends Kr {
|
|
1533
1533
|
constructor(t, n, r) {
|
|
1534
1534
|
super();
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1535
|
+
ae(this, ot);
|
|
1536
|
+
ae(this, Fr);
|
|
1537
|
+
ae(this, Nt);
|
|
1538
|
+
ae(this, zr);
|
|
1539
|
+
ae(this, fr);
|
|
1540
|
+
ae(this, It);
|
|
1541
|
+
ae(this, Un);
|
|
1542
|
+
ae(this, Ti);
|
|
1543
|
+
ae(this, Ei);
|
|
1544
|
+
ae(this, Ai);
|
|
1545
|
+
ae(this, ki, []);
|
|
1546
1546
|
W(this, Fr, t), W(this, fr, r), W(this, zr, []), W(this, It, []), W(this, Nt, []), this.setQueries(n);
|
|
1547
1547
|
}
|
|
1548
1548
|
onSubscribe() {
|
|
@@ -1661,7 +1661,7 @@ var Fr, Nt, zr, fr, It, Un, Ti, Ei, Ai, ki, ot, wo, _o, Bc, So, xo, Co, Rc, Sh =
|
|
|
1661
1661
|
}, Rc), un, Dc, xh = (Dc = class extends Kr {
|
|
1662
1662
|
constructor(t = {}) {
|
|
1663
1663
|
super();
|
|
1664
|
-
|
|
1664
|
+
ae(this, un);
|
|
1665
1665
|
this.config = t, W(this, un, /* @__PURE__ */ new Map());
|
|
1666
1666
|
}
|
|
1667
1667
|
build(t, n, r) {
|
|
@@ -1732,14 +1732,14 @@ var Fr, Nt, zr, fr, It, Un, Ti, Ei, Ai, ki, ot, wo, _o, Bc, So, xo, Co, Rc, Sh =
|
|
|
1732
1732
|
}
|
|
1733
1733
|
}, un = new WeakMap(), Dc), Ke, jn, Bn, Ur, jr, $n, Br, $r, Nc, Ch = (Nc = class {
|
|
1734
1734
|
constructor(e = {}) {
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1735
|
+
ae(this, Ke);
|
|
1736
|
+
ae(this, jn);
|
|
1737
|
+
ae(this, Bn);
|
|
1738
|
+
ae(this, Ur);
|
|
1739
|
+
ae(this, jr);
|
|
1740
|
+
ae(this, $n);
|
|
1741
|
+
ae(this, Br);
|
|
1742
|
+
ae(this, $r);
|
|
1743
1743
|
W(this, Ke, e.queryCache || new xh()), W(this, jn, e.mutationCache || new wh()), W(this, Bn, e.defaultOptions || {}), W(this, Ur, /* @__PURE__ */ new Map()), W(this, jr, /* @__PURE__ */ new Map()), W(this, $n, 0);
|
|
1744
1744
|
}
|
|
1745
1745
|
mount() {
|
|
@@ -6702,7 +6702,7 @@ const ma = "1.18.1", vl = 64 * 1024, { isFunction: Wi } = A, qg = (e) => encodeU
|
|
|
6702
6702
|
maxContentLength: P,
|
|
6703
6703
|
maxBodyLength: Q
|
|
6704
6704
|
} = Hu(f);
|
|
6705
|
-
const ne = A.isNumber(P) && P > -1, F = A.isNumber(Q) && Q > -1,
|
|
6705
|
+
const ne = A.isNumber(P) && P > -1, F = A.isNumber(Q) && Q > -1, se = (Y) => A.hasOwnProp(f, Y) ? f[Y] : void 0;
|
|
6706
6706
|
let re = i || fetch;
|
|
6707
6707
|
z = z ? (z + "").toLowerCase() : "text";
|
|
6708
6708
|
let ge = Dg(
|
|
@@ -6721,7 +6721,7 @@ const ma = "1.18.1", vl = 64 * 1024, { isFunction: Wi } = A, qg = (e) => encodeU
|
|
|
6721
6721
|
);
|
|
6722
6722
|
try {
|
|
6723
6723
|
let Y;
|
|
6724
|
-
const de =
|
|
6724
|
+
const de = se("auth");
|
|
6725
6725
|
if (de) {
|
|
6726
6726
|
const le = A.getSafeProp(de, "username") || "", $e = A.getSafeProp(de, "password") || "";
|
|
6727
6727
|
Y = {
|
|
@@ -6790,7 +6790,7 @@ const ma = "1.18.1", vl = 64 * 1024, { isFunction: Wi } = A, qg = (e) => encodeU
|
|
|
6790
6790
|
te
|
|
6791
6791
|
);
|
|
6792
6792
|
A.isString(j) || (j = j ? "include" : "omit");
|
|
6793
|
-
const
|
|
6793
|
+
const oe = c && "credentials" in s.prototype;
|
|
6794
6794
|
if (A.isFormData(w)) {
|
|
6795
6795
|
const le = U.getContentType();
|
|
6796
6796
|
le && /^multipart\/form-data/i.test(le) && !/boundary=/i.test(le) && U.delete("content-type");
|
|
@@ -6803,7 +6803,7 @@ const ma = "1.18.1", vl = 64 * 1024, { isFunction: Wi } = A, qg = (e) => encodeU
|
|
|
6803
6803
|
headers: Lu(U.normalize()),
|
|
6804
6804
|
body: w,
|
|
6805
6805
|
duplex: "half",
|
|
6806
|
-
credentials:
|
|
6806
|
+
credentials: oe ? j : void 0
|
|
6807
6807
|
};
|
|
6808
6808
|
te = c && new s(g, be);
|
|
6809
6809
|
let ke = await (c ? re(te, B) : re(g, be));
|
|
@@ -8693,10 +8693,10 @@ const Al = ({
|
|
|
8693
8693
|
var Pe, qe, He;
|
|
8694
8694
|
const a = ie((Y) => Y.reviewComments), c = ie((Y) => Y.labels), h = (Y, de) => aa(c, Y, de), u = me((Y) => Y.treeData)[0], y = (u == null ? void 0 : u.name) ?? "Untitled", p = ov(((Pe = u == null ? void 0 : u.metadata) == null ? void 0 : Pe.status) ?? (u == null ? void 0 : u.status)), v = ie(
|
|
8695
8695
|
(Y) => {
|
|
8696
|
-
var de, Ie, O,
|
|
8697
|
-
return ((Ie = (de = Y.editorConfig) == null ? void 0 : de.context) == null ? void 0 : Ie.contentId) ?? ((
|
|
8696
|
+
var de, Ie, O, oe;
|
|
8697
|
+
return ((Ie = (de = Y.editorConfig) == null ? void 0 : de.context) == null ? void 0 : Ie.contentId) ?? ((oe = (O = Y.editorConfig) == null ? void 0 : O.context) == null ? void 0 : oe.identifier) ?? "";
|
|
8698
8698
|
}
|
|
8699
|
-
), b = ie((Y) => Y.buttonLoaders), { activeModal: m, modalData: f, closeModal: g, openModal: S } = Wt(), [w, C] = ue(!1), [N, I] = ue(!1), [q, L] = ue(!1), z = ie((Y) => Y.editorConfig), U = t === "edit", j = t === "review" || t === "orgreview", B = t === "sourcingreview", P = (t === "orgreview" || t === "sourcingreview") && !!((qe = z == null ? void 0 : z.context) != null && qe.enableReviewEdit), Q = !!((He = z == null ? void 0 : z.config) != null && He.hideSubmitForReviewBtn), [ne, F] = ue(!1),
|
|
8699
|
+
), b = ie((Y) => Y.buttonLoaders), { activeModal: m, modalData: f, closeModal: g, openModal: S } = Wt(), [w, C] = ue(!1), [N, I] = ue(!1), [q, L] = ue(!1), z = ie((Y) => Y.editorConfig), U = t === "edit", j = t === "review" || t === "orgreview", B = t === "sourcingreview", P = (t === "orgreview" || t === "sourcingreview") && !!((qe = z == null ? void 0 : z.context) != null && qe.enableReviewEdit), Q = !!((He = z == null ? void 0 : z.config) != null && He.hideSubmitForReviewBtn), [ne, F] = ue(!1), se = U ? a.filter((Y) => Y.text.trim()) : [], re = xe(
|
|
8700
8700
|
(Y, de) => {
|
|
8701
8701
|
o({ action: Y, data: de });
|
|
8702
8702
|
},
|
|
@@ -8757,7 +8757,7 @@ const Al = ({
|
|
|
8757
8757
|
]
|
|
8758
8758
|
}
|
|
8759
8759
|
) : null,
|
|
8760
|
-
|
|
8760
|
+
se.length > 0 && /* @__PURE__ */ E(
|
|
8761
8761
|
"button",
|
|
8762
8762
|
{
|
|
8763
8763
|
className: "ce-btn ghost",
|
|
@@ -8926,7 +8926,7 @@ const Al = ({
|
|
|
8926
8926
|
}
|
|
8927
8927
|
)
|
|
8928
8928
|
] }),
|
|
8929
|
-
/* @__PURE__ */ l("div", { style: { padding: "0 24px 24px", overflow: "auto", display: "flex", flexDirection: "column", gap: 12 }, children:
|
|
8929
|
+
/* @__PURE__ */ l("div", { style: { padding: "0 24px 24px", overflow: "auto", display: "flex", flexDirection: "column", gap: 12 }, children: se.map((Y) => /* @__PURE__ */ E("div", { style: { background: "var(--sb-bg-warm)", border: "1px solid var(--sb-border-soft)", borderRadius: 12, padding: "12px 16px" }, children: [
|
|
8930
8930
|
/* @__PURE__ */ E("p", { style: { fontSize: 14.5, color: "var(--sb-text-2)", lineHeight: 1.6, margin: 0 }, children: [
|
|
8931
8931
|
"“",
|
|
8932
8932
|
Y.text,
|
|
@@ -9260,11 +9260,11 @@ function ad() {
|
|
|
9260
9260
|
}
|
|
9261
9261
|
}, P = function() {
|
|
9262
9262
|
return L || (q = Qv(u, i), L = !0), q;
|
|
9263
|
-
}, Q = n, ne = Q.implementation, F = Q.createNodeIterator,
|
|
9263
|
+
}, Q = n, ne = Q.implementation, F = Q.createNodeIterator, se = Q.createDocumentFragment, re = Q.getElementsByTagName, ge = r.importNode;
|
|
9264
9264
|
let te = jl();
|
|
9265
9265
|
t.isSupported = typeof sd == "function" && typeof f == "function" && ne && ne.createHTMLDocument !== void 0;
|
|
9266
9266
|
const Oe = Lv, Pe = Pv, qe = Mv, He = qv, Y = Iv, de = Fv, Ie = zv, O = jv;
|
|
9267
|
-
let
|
|
9267
|
+
let oe = zl, be = null;
|
|
9268
9268
|
const ke = Re({}, [...Ml, ...Xs, ...Js, ...Zs, ...ql]);
|
|
9269
9269
|
let Se = null;
|
|
9270
9270
|
const Be = Re({}, [...Il, ...eo, ...Fl, ...Gi]);
|
|
@@ -9380,7 +9380,7 @@ function ad() {
|
|
|
9380
9380
|
transform: We
|
|
9381
9381
|
}), $e = kn(_, "FORBID_ATTR", Tt({}), {
|
|
9382
9382
|
transform: We
|
|
9383
|
-
}), he = lt(_, "USE_PROFILES") ? _.USE_PROFILES && typeof _.USE_PROFILES == "object" ? Tt(_.USE_PROFILES) : _.USE_PROFILES : !1, Fe = _.ALLOW_ARIA_ATTR !== !1, Gt = _.ALLOW_DATA_ATTR !== !1, Pt = _.ALLOW_UNKNOWN_PROTOCOLS || !1, Mt = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, kt = _.SAFE_FOR_TEMPLATES || !1, Kt = _.SAFE_FOR_XML !== !1, $t = _.WHOLE_DOCUMENT || !1, x = _.RETURN_DOM || !1, k = _.RETURN_DOM_FRAGMENT || !1, R = _.RETURN_TRUSTED_TYPE || !1, pn = _.FORCE_BODY || !1, M = _.SANITIZE_DOM !== !1, $ = _.SANITIZE_NAMED_PROPS || !1, H = _.KEEP_CONTENT !== !1, Z = _.IN_PLACE || !1,
|
|
9383
|
+
}), he = lt(_, "USE_PROFILES") ? _.USE_PROFILES && typeof _.USE_PROFILES == "object" ? Tt(_.USE_PROFILES) : _.USE_PROFILES : !1, Fe = _.ALLOW_ARIA_ATTR !== !1, Gt = _.ALLOW_DATA_ATTR !== !1, Pt = _.ALLOW_UNKNOWN_PROTOCOLS || !1, Mt = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, kt = _.SAFE_FOR_TEMPLATES || !1, Kt = _.SAFE_FOR_XML !== !1, $t = _.WHOLE_DOCUMENT || !1, x = _.RETURN_DOM || !1, k = _.RETURN_DOM_FRAGMENT || !1, R = _.RETURN_TRUSTED_TYPE || !1, pn = _.FORCE_BODY || !1, M = _.SANITIZE_DOM !== !1, $ = _.SANITIZE_NAMED_PROPS || !1, H = _.KEEP_CONTENT !== !1, Z = _.IN_PLACE || !1, oe = Dv(_.ALLOWED_URI_REGEXP) ? _.ALLOWED_URI_REGEXP : zl, wr = typeof _.NAMESPACE == "string" ? _.NAMESPACE : qt, Ms = lt(_, "MATHML_TEXT_INTEGRATION_POINTS") && _.MATHML_TEXT_INTEGRATION_POINTS && typeof _.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Tt(_.MATHML_TEXT_INTEGRATION_POINTS) : Re({}, ka), qs = lt(_, "HTML_INTEGRATION_POINTS") && _.HTML_INTEGRATION_POINTS && typeof _.HTML_INTEGRATION_POINTS == "object" ? Tt(_.HTML_INTEGRATION_POINTS) : Re({}, Ra);
|
|
9384
9384
|
const D = lt(_, "CUSTOM_ELEMENT_HANDLING") && _.CUSTOM_ELEMENT_HANDLING && typeof _.CUSTOM_ELEMENT_HANDLING == "object" ? Tt(_.CUSTOM_ELEMENT_HANDLING) : Ar(null);
|
|
9385
9385
|
if (fe = Ar(null), lt(D, "tagNameCheck") && Da(D.tagNameCheck) && (fe.tagNameCheck = D.tagNameCheck), lt(D, "attributeNameCheck") && Da(D.attributeNameCheck) && (fe.attributeNameCheck = D.attributeNameCheck), lt(D, "allowCustomizedBuiltInElements") && typeof D.allowCustomizedBuiltInElements == "boolean" && (fe.allowCustomizedBuiltInElements = D.allowCustomizedBuiltInElements), yt(fe), kt && (Gt = !1), k && (x = !0), he && (be = Re({}, ql), Se = Ar(null), he.html === !0 && (Re(be, Ml), Re(Se, Il)), he.svg === !0 && (Re(be, Xs), Re(Se, eo), Re(Se, Gi)), he.svgFilters === !0 && (Re(be, Js), Re(Se, eo), Re(Se, Gi)), he.mathMl === !0 && (Re(be, Zs), Re(Se, Fl), Re(Se, Gi))), Me.tagCheck = null, Me.attributeCheck = null, lt(_, "ADD_TAGS") && (typeof _.ADD_TAGS == "function" ? Me.tagCheck = _.ADD_TAGS : Pn(_.ADD_TAGS) && (be === ke && (be = Tt(be)), Re(be, _.ADD_TAGS, We))), lt(_, "ADD_ATTR") && (typeof _.ADD_ATTR == "function" ? Me.attributeCheck = _.ADD_ATTR : Pn(_.ADD_ATTR) && (Se === Be && (Se = Tt(Se)), Re(Se, _.ADD_ATTR, We))), lt(_, "ADD_URI_SAFE_ATTR") && Pn(_.ADD_URI_SAFE_ATTR) && Re(gn, _.ADD_URI_SAFE_ATTR, We), lt(_, "FORBID_CONTENTS") && Pn(_.FORBID_CONTENTS) && (Te === dt && (Te = Tt(Te)), Re(Te, _.FORBID_CONTENTS, We)), lt(_, "ADD_FORBID_CONTENTS") && Pn(_.ADD_FORBID_CONTENTS) && (Te === dt && (Te = Tt(Te)), Re(Te, _.ADD_FORBID_CONTENTS, We)), H && (be["#text"] = !0), $t && Re(be, ["html", "head", "body"]), be.table && (Re(be, ["tbody"]), delete le.tbody), _.TRUSTED_TYPES_POLICY) {
|
|
9386
9386
|
if (typeof _.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
@@ -9630,7 +9630,7 @@ function ad() {
|
|
|
9630
9630
|
if (!(Fe && ft(Y, D))) {
|
|
9631
9631
|
if (ce) {
|
|
9632
9632
|
if (!gn[D]) {
|
|
9633
|
-
if (!ft(
|
|
9633
|
+
if (!ft(oe, ri(K, Ie, ""))) {
|
|
9634
9634
|
if (!((D === "src" || D === "xlink:href" || D === "href") && _ !== "script" && Ol(K, "data:") === 0 && mn[_])) {
|
|
9635
9635
|
if (!(Pt && !ft(de, ri(K, Ie, "")))) {
|
|
9636
9636
|
if (K)
|
|
@@ -9803,7 +9803,7 @@ function ad() {
|
|
|
9803
9803
|
}), kt && Fs(X), X;
|
|
9804
9804
|
if (x) {
|
|
9805
9805
|
if (kt && Fs(D), k)
|
|
9806
|
-
for (_e =
|
|
9806
|
+
for (_e = se.call(D.ownerDocument); D.firstChild; )
|
|
9807
9807
|
_e.appendChild(D.firstChild);
|
|
9808
9808
|
else
|
|
9809
9809
|
_e = D;
|
|
@@ -10647,31 +10647,31 @@ const cw = (e) => {
|
|
|
10647
10647
|
me((F) => F.deleteNode);
|
|
10648
10648
|
const o = ie((F) => F.editorMode), { openModal: a } = Wt(), c = o === "edit", [h, d] = ue(() => {
|
|
10649
10649
|
const F = /* @__PURE__ */ new Set();
|
|
10650
|
-
function
|
|
10650
|
+
function se(re) {
|
|
10651
10651
|
re.forEach((ge) => {
|
|
10652
10652
|
const te = gi(ge);
|
|
10653
|
-
(te === "root" || te === "section") && F.add(ge.id), ge.children &&
|
|
10653
|
+
(te === "root" || te === "section") && F.add(ge.id), ge.children && se(ge.children);
|
|
10654
10654
|
});
|
|
10655
10655
|
}
|
|
10656
|
-
return
|
|
10656
|
+
return se(n), F;
|
|
10657
10657
|
}), [u, y] = ue(null), p = xe((F) => {
|
|
10658
|
-
d((
|
|
10659
|
-
const re = new Set(
|
|
10658
|
+
d((se) => {
|
|
10659
|
+
const re = new Set(se);
|
|
10660
10660
|
return re.has(F) ? re.delete(F) : re.add(F), re;
|
|
10661
10661
|
});
|
|
10662
10662
|
}, []), v = xe((F) => {
|
|
10663
10663
|
i(F);
|
|
10664
10664
|
}, [i]), b = xe((F) => {
|
|
10665
10665
|
var ge;
|
|
10666
|
-
const
|
|
10667
|
-
if (!(!!ie.getState().lastSaved || (((ge =
|
|
10666
|
+
const se = me.getState().treeData[0];
|
|
10667
|
+
if (!(!!ie.getState().lastSaved || (((ge = se == null ? void 0 : se.children) == null ? void 0 : ge.length) ?? 0) > 0)) {
|
|
10668
10668
|
yr(t("ui.saveSectionFirst", "Please save the question set before adding a section."));
|
|
10669
10669
|
return;
|
|
10670
10670
|
}
|
|
10671
10671
|
s(F, "section");
|
|
10672
10672
|
}, [s, t]), m = xe((F) => {
|
|
10673
|
-
const
|
|
10674
|
-
if (
|
|
10673
|
+
const se = me.getState().getNodeById(F);
|
|
10674
|
+
if (se != null && se.identifier.startsWith("temp-")) {
|
|
10675
10675
|
yr(t("ui.saveQuestionFirst", "Please save the section before adding a question."));
|
|
10676
10676
|
return;
|
|
10677
10677
|
}
|
|
@@ -12054,8 +12054,8 @@ var Er = (e) => Ve(e) && !bs(e) ? e : {
|
|
|
12054
12054
|
const ne = o.valueAsNumber || g && +g;
|
|
12055
12055
|
mt(P.value) || (j = ne > P.value), mt(Q.value) || (B = ne < Q.value);
|
|
12056
12056
|
} else {
|
|
12057
|
-
const ne = o.valueAsDate || new Date(g), F = (ge) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ge),
|
|
12058
|
-
St(P.value) && g && (j =
|
|
12057
|
+
const ne = o.valueAsDate || new Date(g), F = (ge) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ge), se = o.type == "time", re = o.type == "week";
|
|
12058
|
+
St(P.value) && g && (j = se ? F(g) > F(P.value) : re ? g > P.value : ne > new Date(P.value)), St(Q.value) && g && (B = se ? F(g) < F(Q.value) : re ? g < Q.value : ne < new Date(Q.value));
|
|
12059
12059
|
}
|
|
12060
12060
|
if ((j || B) && (U(!!j, P.message, Q.message, Zt.max, Zt.min), !r))
|
|
12061
12061
|
return w(C[b].message), C;
|
|
@@ -12197,7 +12197,7 @@ function i0(e = {}) {
|
|
|
12197
12197
|
}
|
|
12198
12198
|
(v.dirtyFields || b.dirtyFields) && C(), m.state.next({
|
|
12199
12199
|
name: x,
|
|
12200
|
-
isDirty:
|
|
12200
|
+
isDirty: se(x, k),
|
|
12201
12201
|
dirtyFields: n.dirtyFields,
|
|
12202
12202
|
errors: n.errors,
|
|
12203
12203
|
isValid: n.isValid
|
|
@@ -12228,7 +12228,7 @@ function i0(e = {}) {
|
|
|
12228
12228
|
if (L(x))
|
|
12229
12229
|
return;
|
|
12230
12230
|
const V = je(J(s, x)), H = J(s, x, je(R) ? J(i, x) : R);
|
|
12231
|
-
je(H) || M && M.defaultChecked || k ? ze(s, x, k ? H : nc($._f)) : te(x, H), o.mount && !o.action && (S(), V && n.isDirty && (v.isDirty || b.isDirty) && (
|
|
12231
|
+
je(H) || M && M.defaultChecked || k ? ze(s, x, k ? H : nc($._f)) : te(x, H), o.mount && !o.action && (S(), V && n.isDirty && (v.isDirty || b.isDirty) && (se() || (n.isDirty = !1, m.state.next({ ...n }))), e.shouldUnregister && V && !je(J(s, x)) && no(x, a) && (o.watch = !0));
|
|
12232
12232
|
}
|
|
12233
12233
|
}, U = (x, k, R, M, $) => {
|
|
12234
12234
|
let V = !1, H = !1;
|
|
@@ -12238,7 +12238,7 @@ function i0(e = {}) {
|
|
|
12238
12238
|
if (!t.disabled) {
|
|
12239
12239
|
if (!R || M) {
|
|
12240
12240
|
const he = jt(J(i, x), k);
|
|
12241
|
-
(v.isDirty || b.isDirty) && (H = n.isDirty, n.isDirty = Z.isDirty = !he ||
|
|
12241
|
+
(v.isDirty || b.isDirty) && (H = n.isDirty, n.isDirty = Z.isDirty = !he || se(), V = H !== Z.isDirty), H = !!J(n.dirtyFields, x), he !== n.isDirty ? n.dirtyFields = Jn(i, s) : he ? tt(n.dirtyFields, x) : ze(n.dirtyFields, x, !0), Z.dirtyFields = n.dirtyFields, V = V || (v.dirtyFields || b.dirtyFields) && H !== !he;
|
|
12242
12242
|
}
|
|
12243
12243
|
if (R) {
|
|
12244
12244
|
const he = J(n.touchedFields, x);
|
|
@@ -12331,7 +12331,7 @@ function i0(e = {}) {
|
|
|
12331
12331
|
k && (k._f.refs ? k._f.refs.every((R) => !to(R)) : !to(k._f.ref)) && le(x);
|
|
12332
12332
|
}
|
|
12333
12333
|
a.unMount = /* @__PURE__ */ new Set();
|
|
12334
|
-
},
|
|
12334
|
+
}, se = (x, k) => !t.disabled && (x && k && ze(s, x, k), !jt(o.mount ? s : i, i)), re = (x, k, R) => Ho(x, a, {
|
|
12335
12335
|
...o.mount ? s : je(k) ? i : St(x) ? { [x]: k } : k
|
|
12336
12336
|
}, R, k), ge = (x) => bd(J(o.mount ? s : i, x, t.shouldUnregister ? J(i, x, []) : [])), te = (x, k, R = {}, M = !1, $ = !1) => {
|
|
12337
12337
|
const V = J(r, x);
|
|
@@ -12362,7 +12362,7 @@ function i0(e = {}) {
|
|
|
12362
12362
|
}), (v.isDirty || v.dirtyFields || b.isDirty || b.dirtyFields) && R.shouldDirty && (C(), $ || m.state.next({
|
|
12363
12363
|
name: x,
|
|
12364
12364
|
dirtyFields: n.dirtyFields,
|
|
12365
|
-
isDirty:
|
|
12365
|
+
isDirty: se(x, Z)
|
|
12366
12366
|
}));
|
|
12367
12367
|
else {
|
|
12368
12368
|
const dt = Array.isArray(Z) && !Z.length || pt(Z);
|
|
@@ -12460,7 +12460,7 @@ function i0(e = {}) {
|
|
|
12460
12460
|
...o.mount ? s : i
|
|
12461
12461
|
};
|
|
12462
12462
|
return k && (R = yd(k.dirtyFields ? n.dirtyFields : n.touchedFields, R)), je(x) ? R : St(x) ? J(R, x) : x.map((M) => J(R, M));
|
|
12463
|
-
},
|
|
12463
|
+
}, oe = (x, k) => ({
|
|
12464
12464
|
invalid: !!J((k || n).errors, x),
|
|
12465
12465
|
isDirty: !!J((k || n).dirtyFields, x),
|
|
12466
12466
|
error: J((k || n).errors, x),
|
|
@@ -12540,7 +12540,7 @@ function i0(e = {}) {
|
|
|
12540
12540
|
values: Ge(s)
|
|
12541
12541
|
}), m.state.next({
|
|
12542
12542
|
...n,
|
|
12543
|
-
...k.keepDirty ? { isDirty:
|
|
12543
|
+
...k.keepDirty ? { isDirty: se() } : {}
|
|
12544
12544
|
}), !k.keepIsValid && S();
|
|
12545
12545
|
}, $e = ({ disabled: x, name: k }) => {
|
|
12546
12546
|
if (Ut(x) && o.mount || x || a.disabled.has(k)) {
|
|
@@ -12641,7 +12641,7 @@ function i0(e = {}) {
|
|
|
12641
12641
|
}), M)
|
|
12642
12642
|
throw M;
|
|
12643
12643
|
}, Mt = (x, k = {}) => {
|
|
12644
|
-
J(r, x) && (je(k.defaultValue) ? qe(x, Ge(J(i, x))) : (qe(x, k.defaultValue), ze(i, x, Ge(k.defaultValue))), k.keepTouched || tt(n.touchedFields, x), k.keepDirty || (tt(n.dirtyFields, x), n.isDirty = k.defaultValue ?
|
|
12644
|
+
J(r, x) && (je(k.defaultValue) ? qe(x, Ge(J(i, x))) : (qe(x, k.defaultValue), ze(i, x, Ge(k.defaultValue))), k.keepTouched || tt(n.touchedFields, x), k.keepDirty || (tt(n.dirtyFields, x), n.isDirty = k.defaultValue ? se(x, Ge(J(i, x))) : se()), k.keepError || (tt(n.errors, x), v.isValid && S()), m.state.next({ ...n }));
|
|
12645
12645
|
}, kt = (x, k = {}) => {
|
|
12646
12646
|
const R = x ? Ge(x) : i, M = Ge(R), $ = pt(x), V = M;
|
|
12647
12647
|
if (k.keepDefaultValues || (i = R), !k.keepValues) {
|
|
@@ -12698,7 +12698,7 @@ function i0(e = {}) {
|
|
|
12698
12698
|
focus: ""
|
|
12699
12699
|
}, o.mount = !v.isValid || !!k.keepIsValid || !!k.keepDirtyValues || !t.shouldUnregister && !pt(V), o.watch = !!t.shouldUnregister, o.keepIsValid = !!k.keepIsValid, o.action = !1, k.keepErrors || (n.errors = {}), m.state.next({
|
|
12700
12700
|
submitCount: k.keepSubmitCount ? n.submitCount : 0,
|
|
12701
|
-
isDirty: $ ? !1 : k.keepDirty ? n.isDirty : k.keepValues ?
|
|
12701
|
+
isDirty: $ ? !1 : k.keepDirty ? n.isDirty : k.keepValues ? se() : !!(k.keepDefaultValues && !jt(x, i)),
|
|
12702
12702
|
isSubmitted: k.keepIsSubmitted ? n.isSubmitted : !1,
|
|
12703
12703
|
dirtyFields: $ ? {} : k.keepDirtyValues ? k.keepDefaultValues && s ? Jn(i, s) : n.dirtyFields : k.keepDefaultValues && x ? Jn(i, x) : k.keepDirty ? n.dirtyFields : {},
|
|
12704
12704
|
touchedFields: k.keepTouched ? n.touchedFields : {},
|
|
@@ -12724,7 +12724,7 @@ function i0(e = {}) {
|
|
|
12724
12724
|
control: {
|
|
12725
12725
|
register: Me,
|
|
12726
12726
|
unregister: le,
|
|
12727
|
-
getFieldState:
|
|
12727
|
+
getFieldState: oe,
|
|
12728
12728
|
handleSubmit: Pt,
|
|
12729
12729
|
setError: ke,
|
|
12730
12730
|
_subscribe: Be,
|
|
@@ -12732,7 +12732,7 @@ function i0(e = {}) {
|
|
|
12732
12732
|
_updateIsValidating: w,
|
|
12733
12733
|
_focusError: Fe,
|
|
12734
12734
|
_getWatch: re,
|
|
12735
|
-
_getDirty:
|
|
12735
|
+
_getDirty: se,
|
|
12736
12736
|
_setValid: S,
|
|
12737
12737
|
_setFieldArray: N,
|
|
12738
12738
|
_setDisabledField: $e,
|
|
@@ -12806,7 +12806,7 @@ function i0(e = {}) {
|
|
|
12806
12806
|
unregister: le,
|
|
12807
12807
|
setError: ke,
|
|
12808
12808
|
setFocus: $t,
|
|
12809
|
-
getFieldState:
|
|
12809
|
+
getFieldState: oe
|
|
12810
12810
|
};
|
|
12811
12811
|
return {
|
|
12812
12812
|
...pn,
|
|
@@ -13227,8 +13227,8 @@ const li = ({
|
|
|
13227
13227
|
className: `${Ue.select} ${w ? Ue.inputError : ""}`,
|
|
13228
13228
|
value: P,
|
|
13229
13229
|
onChange: (ne) => {
|
|
13230
|
-
const F = ne.target.value;
|
|
13231
|
-
U.onChange(
|
|
13230
|
+
const F = ne.target.value, se = g.code === "maxQuestions" && F !== "" ? Number(F) : F;
|
|
13231
|
+
U.onChange(se), n(g.code, se), f(g.code);
|
|
13232
13232
|
},
|
|
13233
13233
|
onBlur: U.onBlur,
|
|
13234
13234
|
disabled: C,
|
|
@@ -13485,21 +13485,21 @@ const U0 = ({
|
|
|
13485
13485
|
Ce(() => {
|
|
13486
13486
|
we.getState().isSaving || (j(u ? "question" : "details"), m && m === N ? (P(!0), I(null)) : P(!1));
|
|
13487
13487
|
}, [m, u]);
|
|
13488
|
-
const
|
|
13489
|
-
m && (S(m, { [O]:
|
|
13488
|
+
const se = xe((O, oe) => {
|
|
13489
|
+
m && (S(m, { [O]: oe }), t({ action: "onFormValueChange", data: { field: O, value: oe } }));
|
|
13490
13490
|
}, [m, S, t]), re = xe((O) => {
|
|
13491
13491
|
t({ action: "onFormStatusChange", data: { isValid: O } });
|
|
13492
13492
|
}, [t]), ge = ie((O) => O.licenses), te = me(
|
|
13493
|
-
(O) => O.selectedNodeId ? O.getChildrenOf(O.selectedNodeId).filter((
|
|
13493
|
+
(O) => O.selectedNodeId ? O.getChildrenOf(O.selectedNodeId).filter((oe) => oe.isQuestion).length : 0
|
|
13494
13494
|
), Oe = xe(
|
|
13495
|
-
(O) => (O ?? []).map((
|
|
13495
|
+
(O) => (O ?? []).map((oe) => oe.code === "license" && !oe.range && ge.length ? { ...oe, range: ge } : oe.code === "maxQuestions" ? { ...oe, range: Array.from({ length: te }, (be, ke) => String(ke + 1)) } : oe),
|
|
13496
13496
|
[ge, te]
|
|
13497
13497
|
), Pe = h ? y : p, qe = u ? z0 : h ? I0 : F0, He = (() => {
|
|
13498
|
-
var
|
|
13498
|
+
var oe, be, ke, Se;
|
|
13499
13499
|
if (!f) return "";
|
|
13500
13500
|
const O = f;
|
|
13501
13501
|
if (h) {
|
|
13502
|
-
const Be = O.primaryCategory ?? "", fe = ((
|
|
13502
|
+
const Be = O.primaryCategory ?? "", fe = ((oe = O.gradeLevel) == null ? void 0 : oe[0]) ?? "", le = ((be = O.subject) == null ? void 0 : be[0]) ?? "";
|
|
13503
13503
|
return [Be, [fe, le].filter(Boolean).join(" ")].filter(Boolean).join(" · ");
|
|
13504
13504
|
}
|
|
13505
13505
|
if (d) {
|
|
@@ -13535,8 +13535,8 @@ const U0 = ({
|
|
|
13535
13535
|
var O;
|
|
13536
13536
|
return w(((O = g[0]) == null ? void 0 : O.id) ?? "");
|
|
13537
13537
|
}, title: "Home", children: /* @__PURE__ */ l(G, { name: "home", size: 15 }) }),
|
|
13538
|
-
g.map((O,
|
|
13539
|
-
const be =
|
|
13538
|
+
g.map((O, oe) => {
|
|
13539
|
+
const be = oe === g.length - 1;
|
|
13540
13540
|
return /* @__PURE__ */ E(pe.Fragment, { children: [
|
|
13541
13541
|
/* @__PURE__ */ l("span", { className: "sep", children: /* @__PURE__ */ l(G, { name: "caret-right", size: 13 }) }),
|
|
13542
13542
|
be ? /* @__PURE__ */ l("span", { className: "cur", children: O.name }) : /* @__PURE__ */ l("button", { onClick: () => w(O.id), children: O.name })
|
|
@@ -13565,7 +13565,7 @@ const U0 = ({
|
|
|
13565
13565
|
className: "ce-thumb-remove",
|
|
13566
13566
|
title: "Remove icon",
|
|
13567
13567
|
"aria-label": "Remove icon",
|
|
13568
|
-
onClick: () =>
|
|
13568
|
+
onClick: () => se("appIcon", ""),
|
|
13569
13569
|
children: /* @__PURE__ */ l(G, { name: "x", size: 10 })
|
|
13570
13570
|
}
|
|
13571
13571
|
) : null
|
|
@@ -13575,7 +13575,7 @@ const U0 = ({
|
|
|
13575
13575
|
{
|
|
13576
13576
|
preserveAbsoluteUrl: !0,
|
|
13577
13577
|
onSelect: (O) => {
|
|
13578
|
-
m &&
|
|
13578
|
+
m && se("appIcon", O), F(!1);
|
|
13579
13579
|
},
|
|
13580
13580
|
onClose: () => F(!1)
|
|
13581
13581
|
}
|
|
@@ -13584,8 +13584,8 @@ const U0 = ({
|
|
|
13584
13584
|
d && !h && /* @__PURE__ */ l("div", { className: "ce-thumb folder", children: /* @__PURE__ */ l(G, { name: "folder", size: 28 }) }),
|
|
13585
13585
|
u && (() => {
|
|
13586
13586
|
var be, ke;
|
|
13587
|
-
const O = (f == null ? void 0 : f.questionType) ?? ((be = f == null ? void 0 : f.metadata) == null ? void 0 : be.questionType) ?? "",
|
|
13588
|
-
return /* @__PURE__ */ l("div", { className: "ce-thumb question", children: /* @__PURE__ */ l(G, { name:
|
|
13587
|
+
const O = (f == null ? void 0 : f.questionType) ?? ((be = f == null ? void 0 : f.metadata) == null ? void 0 : be.questionType) ?? "", oe = ((ke = Wr(O)) == null ? void 0 : ke.icon) ?? "help";
|
|
13588
|
+
return /* @__PURE__ */ l("div", { className: "ce-thumb question", children: /* @__PURE__ */ l(G, { name: oe, size: 26 }) });
|
|
13589
13589
|
})(),
|
|
13590
13590
|
/* @__PURE__ */ E("div", { style: { minWidth: 0 }, children: [
|
|
13591
13591
|
/* @__PURE__ */ l("h1", { style: { margin: 0, fontSize: 26, fontWeight: 800, letterSpacing: "-.015em", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: (f == null ? void 0 : f.name) || "Untitled" }),
|
|
@@ -13622,7 +13622,7 @@ const U0 = ({
|
|
|
13622
13622
|
{
|
|
13623
13623
|
fields: Oe(b ?? v),
|
|
13624
13624
|
values: f,
|
|
13625
|
-
onChange:
|
|
13625
|
+
onChange: se,
|
|
13626
13626
|
onValidityChange: re,
|
|
13627
13627
|
readOnly: !0,
|
|
13628
13628
|
frameworkTerms: r
|
|
@@ -13642,7 +13642,7 @@ const U0 = ({
|
|
|
13642
13642
|
{
|
|
13643
13643
|
fields: Oe(Pe),
|
|
13644
13644
|
values: f,
|
|
13645
|
-
onChange:
|
|
13645
|
+
onChange: se,
|
|
13646
13646
|
onValidityChange: re,
|
|
13647
13647
|
readOnly: z,
|
|
13648
13648
|
section: "Details",
|
|
@@ -13658,7 +13658,7 @@ const U0 = ({
|
|
|
13658
13658
|
{
|
|
13659
13659
|
fields: Oe(Pe),
|
|
13660
13660
|
values: f,
|
|
13661
|
-
onChange:
|
|
13661
|
+
onChange: se,
|
|
13662
13662
|
onValidityChange: re,
|
|
13663
13663
|
readOnly: z,
|
|
13664
13664
|
section: "Audience & Curriculum",
|
|
@@ -13680,7 +13680,7 @@ const U0 = ({
|
|
|
13680
13680
|
{
|
|
13681
13681
|
fields: Oe(Pe),
|
|
13682
13682
|
values: f,
|
|
13683
|
-
onChange:
|
|
13683
|
+
onChange: se,
|
|
13684
13684
|
onValidityChange: re,
|
|
13685
13685
|
readOnly: z,
|
|
13686
13686
|
section: "Behaviour",
|
|
@@ -14034,23 +14034,23 @@ function V0({ events: e }) {
|
|
|
14034
14034
|
break;
|
|
14035
14035
|
}
|
|
14036
14036
|
case "saveContent": {
|
|
14037
|
-
const { rootFormConfig: P, unitFormConfig: Q } = ie.getState(), { treeData: ne, treeCache: F } = me.getState(),
|
|
14037
|
+
const { rootFormConfig: P, unitFormConfig: Q } = ie.getState(), { treeData: ne, treeCache: F } = me.getState(), se = (de) => ({ ...de.metadata ?? {}, ...F[de.id] ?? {} }), re = {
|
|
14038
14038
|
"Audience & Curriculum": Ot("ui.audience", "Audience & Curriculum"),
|
|
14039
14039
|
Behaviour: Ot("ui.behaviour", "Behaviour")
|
|
14040
14040
|
}, ge = Ot("ui.details", "Details"), te = [], Oe = /* @__PURE__ */ new Map(), Pe = (de, Ie, O) => {
|
|
14041
|
-
for (const
|
|
14042
|
-
const be =
|
|
14043
|
-
Oe.has(ke) || (Oe.set(ke, []), te.push(ke)), Oe.get(ke).push(
|
|
14041
|
+
for (const oe of R0(de ?? [], Ie)) {
|
|
14042
|
+
const be = oe.section && re[oe.section] || ge, ke = O ? `${O} — ${be}` : be;
|
|
14043
|
+
Oe.has(ke) || (Oe.set(ke, []), te.push(ke)), Oe.get(ke).push(oe.label);
|
|
14044
14044
|
}
|
|
14045
14045
|
}, qe = ne[0];
|
|
14046
|
-
qe && Pe(P,
|
|
14046
|
+
qe && Pe(P, se(qe));
|
|
14047
14047
|
const He = [], Y = [...(qe == null ? void 0 : qe.children) ?? []];
|
|
14048
14048
|
for (; Y.length; ) {
|
|
14049
14049
|
const de = Y.shift();
|
|
14050
14050
|
gi(de) === "section" && He.push(de), de.children && Y.push(...de.children);
|
|
14051
14051
|
}
|
|
14052
14052
|
for (const de of He)
|
|
14053
|
-
Pe(Q,
|
|
14053
|
+
Pe(Q, se(de), de.name);
|
|
14054
14054
|
if (te.length > 0) {
|
|
14055
14055
|
d(te.map((de) => ({ tab: de, fields: Oe.get(de) })));
|
|
14056
14056
|
break;
|
|
@@ -15793,8 +15793,8 @@ function D_({ disabled: e = !1 }) {
|
|
|
15793
15793
|
Ce(() => {
|
|
15794
15794
|
const P = () => {
|
|
15795
15795
|
var re;
|
|
15796
|
-
const ne = document.activeElement, F = !!(ne != null && ne.closest("[contenteditable]")),
|
|
15797
|
-
C(F ||
|
|
15796
|
+
const ne = document.activeElement, F = !!(ne != null && ne.closest("[contenteditable]")), se = !!((re = S.current) != null && re.contains(ne));
|
|
15797
|
+
C(F || se);
|
|
15798
15798
|
}, Q = () => setTimeout(P, 0);
|
|
15799
15799
|
return document.addEventListener("focusin", P), document.addEventListener("focusout", Q), () => {
|
|
15800
15800
|
document.removeEventListener("focusin", P), document.removeEventListener("focusout", Q);
|
|
@@ -15816,15 +15816,15 @@ function D_({ disabled: e = !1 }) {
|
|
|
15816
15816
|
}, L = (P) => {
|
|
15817
15817
|
const Q = I.current;
|
|
15818
15818
|
if (!Q) return;
|
|
15819
|
-
const ne = Q.commonAncestorContainer, F = ne.nodeType === Node.ELEMENT_NODE ? ne : ne.parentElement,
|
|
15820
|
-
|
|
15819
|
+
const ne = Q.commonAncestorContainer, F = ne.nodeType === Node.ELEMENT_NODE ? ne : ne.parentElement, se = F == null ? void 0 : F.closest("[contenteditable]");
|
|
15820
|
+
se && se.focus();
|
|
15821
15821
|
const re = window.getSelection();
|
|
15822
15822
|
re && (re.removeAllRanges(), re.addRange(Q)), Q.deleteContents();
|
|
15823
15823
|
const ge = document.createElement("div");
|
|
15824
15824
|
ge.innerHTML = P;
|
|
15825
15825
|
const te = document.createDocumentFragment();
|
|
15826
15826
|
for (; ge.firstChild; ) te.appendChild(ge.firstChild);
|
|
15827
|
-
Q.insertNode(te), Q.collapse(!1), re && (re.removeAllRanges(), re.addRange(Q)),
|
|
15827
|
+
Q.insertNode(te), Q.collapse(!1), re && (re.removeAllRanges(), re.addRange(Q)), se == null || se.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
15828
15828
|
}, z = (P) => s((Q) => Q === P ? null : P), U = () => {
|
|
15829
15829
|
p.current && m(p.current.getBoundingClientRect()), z("chars");
|
|
15830
15830
|
}, j = () => {
|
|
@@ -15850,8 +15850,8 @@ function D_({ disabled: e = !1 }) {
|
|
|
15850
15850
|
P.stopPropagation(), q();
|
|
15851
15851
|
},
|
|
15852
15852
|
onChange: (P) => {
|
|
15853
|
-
var
|
|
15854
|
-
const Q = P.target.value, ne = ((
|
|
15853
|
+
var se, re;
|
|
15854
|
+
const Q = P.target.value, ne = ((se = fc.find((ge) => ge.code === Q)) == null ? void 0 : se.dir) ?? "ltr";
|
|
15855
15855
|
document.dispatchEvent(new CustomEvent("ce-lang-changed", { detail: { lang: Q, dir: ne } })), we.getState().switchContentLang(Q.toLowerCase());
|
|
15856
15856
|
const F = I.current;
|
|
15857
15857
|
if (F) {
|
|
@@ -16040,8 +16040,8 @@ function D_({ disabled: e = !1 }) {
|
|
|
16040
16040
|
Ds,
|
|
16041
16041
|
{
|
|
16042
16042
|
onSelect: (P) => {
|
|
16043
|
-
var F,
|
|
16044
|
-
const Q = (F = P.match(/(do_[A-Za-z0-9]+)/)) == null ? void 0 : F[1], ne = ((
|
|
16043
|
+
var F, se;
|
|
16044
|
+
const Q = (F = P.match(/(do_[A-Za-z0-9]+)/)) == null ? void 0 : F[1], ne = ((se = P.split("/").pop()) == null ? void 0 : se.split("?")[0]) ?? "";
|
|
16045
16045
|
L(
|
|
16046
16046
|
`<figure class="image"><img src="${ps(P)}" alt="${ps(ne)}"${Q ? ` data-asset-variable="${Q}"` : ""}></figure>`
|
|
16047
16047
|
), u(!1);
|
|
@@ -16357,7 +16357,7 @@ function P_() {
|
|
|
16357
16357
|
return { save: xe(async () => {
|
|
16358
16358
|
var Mt, kt, Kt, $t, Sn, Qn, Wn, pn, x, k, R;
|
|
16359
16359
|
if (!t || !q || we.getState().isSaving) return !1;
|
|
16360
|
-
const P = ((Mt = I == null ? void 0 : I.context) == null ? void 0 : Mt.channel) ?? "", Q = Di(I == null ? void 0 : I.context), ne = ((kt = I == null ? void 0 : I.context) == null ? void 0 : kt.framework) ?? "", F = Wr(t),
|
|
16360
|
+
const P = ((Mt = I == null ? void 0 : I.context) == null ? void 0 : Mt.channel) ?? "", Q = Di(I == null ? void 0 : I.context), ne = ((kt = I == null ? void 0 : I.context) == null ? void 0 : kt.framework) ?? "", F = Wr(t), se = (F == null ? void 0 : F.primaryCategory) ?? "Multiple Choice Question", re = (F == null ? void 0 : F.qType) ?? "MCQ", ge = me.getState().treeCache[q] ?? {}, te = typeof ge.name == "string" && ge.name.trim() ? ge.name.trim() : void 0, Oe = Number(ge.maxScore), Pe = (e == null ? void 0 : e.identifier) && !e.identifier.startsWith("temp-"), qe = (n || "").replace(/<[^>]+>/g, "").slice(0, 60).trim() || "Untitled Question", He = te ?? (Pe ? e == null ? void 0 : e.name : void 0) ?? qe, Y = t === "ftb" ? Ta(n).length : t === "mtf" ? i.length : 0, de = Number.isFinite(Oe) && Oe > 0 ? Oe : m ?? 1, Ie = (t === "ftb" || t === "mtf" && f) && Y > 1 ? "multiple" : "single", O = !!(F != null && F.interactionType), oe = we.getState().getI18nSnapshot(), be = (M) => `<div class='answer-container'><div class='answer-body'>${M}</div></div>`, ke = ((Kt = I == null ? void 0 : I.context) == null ? void 0 : Kt.host) || window.location.origin, Se = L_(
|
|
16361
16361
|
[
|
|
16362
16362
|
n,
|
|
16363
16363
|
y,
|
|
@@ -16371,9 +16371,9 @@ function P_() {
|
|
|
16371
16371
|
), Be = u || di();
|
|
16372
16372
|
let fe, le = {};
|
|
16373
16373
|
h === "html" && c.trim() ? (fe = [{ id: Be, value: { [w]: { type: "html", value: c } } }], le = { [Be]: c }) : (h === "video" || h === "audio") && d && (fe = [{ id: Be, value: { [w]: { type: h, value: d.id } } }], le = { [Be]: so(h, d) });
|
|
16374
|
-
for (const [M, $] of Object.entries(
|
|
16374
|
+
for (const [M, $] of Object.entries(oe.solutionType)) {
|
|
16375
16375
|
if ($ !== "video" && $ !== "audio") continue;
|
|
16376
|
-
const V =
|
|
16376
|
+
const V = oe.solutionAsset[M];
|
|
16377
16377
|
if (V && (Se.some((H) => H.id === V.id) || Se.push({
|
|
16378
16378
|
id: V.id,
|
|
16379
16379
|
src: V.src,
|
|
@@ -16434,7 +16434,7 @@ function P_() {
|
|
|
16434
16434
|
maxScore: de,
|
|
16435
16435
|
name: He,
|
|
16436
16436
|
qType: re,
|
|
16437
|
-
primaryCategory:
|
|
16437
|
+
primaryCategory: se,
|
|
16438
16438
|
// Old editor sends interaction fields only for interactive types —
|
|
16439
16439
|
// SA payloads carry just interactions:{} (no interactionTypes/
|
|
16440
16440
|
// responseDeclaration/hints keys).
|
|
@@ -16469,12 +16469,12 @@ function P_() {
|
|
|
16469
16469
|
};
|
|
16470
16470
|
return pc(M, {
|
|
16471
16471
|
type: t,
|
|
16472
|
-
i18n:
|
|
16472
|
+
i18n: oe,
|
|
16473
16473
|
options: r,
|
|
16474
16474
|
matchPairs: i,
|
|
16475
16475
|
hintUuid: Me,
|
|
16476
16476
|
solutionId: Be,
|
|
16477
|
-
solutionAsset:
|
|
16477
|
+
solutionAsset: oe.solutionAsset,
|
|
16478
16478
|
assetSolutionHtml: so,
|
|
16479
16479
|
buildBodyHtml: Zi,
|
|
16480
16480
|
answerWrap: be
|
|
@@ -16519,7 +16519,7 @@ function P_() {
|
|
|
16519
16519
|
maxScore: de,
|
|
16520
16520
|
name: He,
|
|
16521
16521
|
qType: re,
|
|
16522
|
-
primaryCategory:
|
|
16522
|
+
primaryCategory: se,
|
|
16523
16523
|
// Old editor sends interaction fields only for interactive types —
|
|
16524
16524
|
// SA payloads carry just interactions:{} (no interactionTypes/
|
|
16525
16525
|
// responseDeclaration/hints keys).
|
|
@@ -16554,12 +16554,12 @@ function P_() {
|
|
|
16554
16554
|
};
|
|
16555
16555
|
return pc($, {
|
|
16556
16556
|
type: t,
|
|
16557
|
-
i18n:
|
|
16557
|
+
i18n: oe,
|
|
16558
16558
|
options: r,
|
|
16559
16559
|
matchPairs: i,
|
|
16560
16560
|
hintUuid: Me,
|
|
16561
16561
|
solutionId: Be,
|
|
16562
|
-
solutionAsset:
|
|
16562
|
+
solutionAsset: oe.solutionAsset,
|
|
16563
16563
|
assetSolutionHtml: so,
|
|
16564
16564
|
buildBodyHtml: Zi,
|
|
16565
16565
|
answerWrap: be
|
|
@@ -16818,8 +16818,8 @@ function z_({ editorMode: e, onBack: t }) {
|
|
|
16818
16818
|
sequence: c,
|
|
16819
16819
|
answerText: h,
|
|
16820
16820
|
sentence: d
|
|
16821
|
-
} = we(), { save: u } = P_(), y = ie((O) => O.labels), p = (O,
|
|
16822
|
-
U && z(U, { [O]:
|
|
16821
|
+
} = we(), { save: u } = P_(), y = ie((O) => O.labels), p = (O, oe) => aa(y, O, oe), v = (Ie = ie.getState().editorConfig) == null ? void 0 : Ie.context, b = !mu(e, v), m = n, f = Wr(m), g = f ? p(f.labelKey, f.label) : p("ui.question", "Question"), S = (f == null ? void 0 : f.icon) ?? "help", w = m ? m === "ftb" ? p("ui.ftbHint", wc.ftb) : p("ui.richTextHint", wc[m] ?? "") : "", C = (O) => (O ?? "").replace(/<[^>]+>/g, "").replace(/ /g, " ").trim() || (/<(img|figure)\b/i.test(O ?? "") ? "[image]" : ""), N = we((O) => O.i18nText), I = (O, oe) => C(oe) ? oe : Object.values(O ?? {}).find((be) => C(be)) ?? "", q = ie((O) => O.questionFormConfig), L = me((O) => O.activeNodeMeta), z = me((O) => O.updateNode), U = me((O) => O.selectedNodeId), { frameworkTerms: j } = cd(), B = (O, oe) => {
|
|
16822
|
+
U && z(U, { [O]: oe });
|
|
16823
16823
|
}, P = L ?? {}, [Q, ne] = ue(!0), F = (() => {
|
|
16824
16824
|
const O = I(N.questionBody, r);
|
|
16825
16825
|
if (!C(O)) return p("ui.invalidEnterQuestion", "Enter the question first");
|
|
@@ -16831,24 +16831,24 @@ function z_({ editorMode: e, onBack: t }) {
|
|
|
16831
16831
|
switch (m) {
|
|
16832
16832
|
case "mcq":
|
|
16833
16833
|
case "boolean":
|
|
16834
|
-
return o.some((
|
|
16834
|
+
return o.some((oe) => !C(I(N.options[oe.id], oe.body))) ? p("ui.invalidFillOptions", "Fill in all options") : o.some((oe) => oe.isCorrect) ? null : p("ui.invalidMarkCorrect", "Mark one option as the correct answer");
|
|
16835
16835
|
case "ftb":
|
|
16836
16836
|
return /\[\[.+?\]\]/.test(O) ? null : p("ui.invalidAddBlank", "Add at least one [[blank]] with its answer");
|
|
16837
16837
|
case "sa":
|
|
16838
16838
|
return C(I(N.answerText, h)) ? null : p("ui.invalidEnterAnswer", "Enter the answer");
|
|
16839
16839
|
case "mtf":
|
|
16840
|
-
return a.length < 2 || a.some((
|
|
16840
|
+
return a.length < 2 || a.some((oe) => !C(I(N.pairsLeft[oe.id], oe.left)) || !C(I(N.pairsRight[oe.id], oe.right))) ? p("ui.invalidFillPairs", "Fill in all matching pairs") : null;
|
|
16841
16841
|
case "seq":
|
|
16842
|
-
return c.length < 2 || c.some((
|
|
16842
|
+
return c.length < 2 || c.some((oe, be) => !C(I(N.sequence[be], oe))) ? p("ui.invalidFillSequence", "Fill in all sequence items") : null;
|
|
16843
16843
|
case "reo":
|
|
16844
16844
|
return C(I(N.sentence, d)).split(/\s+/).filter(Boolean).length < 2 ? p("ui.invalidSentence", "Enter a sentence with at least two words") : null;
|
|
16845
16845
|
default:
|
|
16846
16846
|
return null;
|
|
16847
16847
|
}
|
|
16848
|
-
})(),
|
|
16849
|
-
var
|
|
16850
|
-
const O = !!((
|
|
16851
|
-
!b && (
|
|
16848
|
+
})(), se = we((O) => O.isDirty), re = we((O) => O.activeQuestion), [ge, te] = ue(!1), [Oe, Pe] = ue(!1), qe = me((O) => O.selectedNodeId), He = () => {
|
|
16849
|
+
var oe;
|
|
16850
|
+
const O = !!((oe = re == null ? void 0 : re.identifier) != null && oe.startsWith("temp-"));
|
|
16851
|
+
!b && (se || O) ? te(!0) : t == null || t();
|
|
16852
16852
|
}, Y = () => {
|
|
16853
16853
|
var O;
|
|
16854
16854
|
te(!1), (O = re == null ? void 0 : re.identifier) != null && O.startsWith("temp-") && me.getState().deleteNode(re.identifier), t == null || t();
|