@pie-element/math-templated 8.0.6 → 8.0.7-next.20261019062545

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.
Files changed (27) hide show
  1. package/dist/browser/author/index.js +3071 -3071
  2. package/dist/browser/author/index.js.map +1 -1
  3. package/dist/browser/controller/index.js +1 -1
  4. package/dist/browser/delivery/index.js +2 -2
  5. package/dist/browser/editor-runtime/author/index.js +1259 -1259
  6. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  7. package/dist/browser/editor-runtime/controller/index.js +1 -1
  8. package/dist/browser/editor-runtime/delivery/index.js +2 -2
  9. package/dist/browser/editor-runtime/{horizontal-keypad-D71I_hsg.js → horizontal-keypad-BzF-ph1O.js} +718 -703
  10. package/dist/browser/editor-runtime/{horizontal-keypad-D71I_hsg.js.map → horizontal-keypad-BzF-ph1O.js.map} +1 -1
  11. package/dist/browser/editor-runtime/{main-CjydLdRr.js → main-DwwlYPR4.js} +234 -233
  12. package/dist/browser/editor-runtime/main-DwwlYPR4.js.map +1 -0
  13. package/dist/browser/editor-runtime/print/index.js +3 -3
  14. package/dist/browser/{horizontal-keypad-DXhquYz2.js → horizontal-keypad-DIf2m7kJ.js} +718 -703
  15. package/dist/browser/{horizontal-keypad-DXhquYz2.js.map → horizontal-keypad-DIf2m7kJ.js.map} +1 -1
  16. package/dist/browser/{main-CwjSoHLf.js → main-DRW3nE42.js} +234 -233
  17. package/dist/browser/main-DRW3nE42.js.map +1 -0
  18. package/dist/browser/print/index.js +3 -3
  19. package/dist/index.iife.js +7 -7
  20. package/dist/schemas/configuration.schema.json +1 -1
  21. package/dist/schemas/model.schema.json +1 -1
  22. package/dist/schemas/session.schema.json +1 -1
  23. package/module/print.js +1133 -1117
  24. package/module/print.js.map +1 -1
  25. package/package.json +17 -17
  26. package/dist/browser/editor-runtime/main-CjydLdRr.js.map +0 -1
  27. package/dist/browser/main-CwjSoHLf.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { o as e } from "./rolldown-runtime-DY7j01NX.js";
2
- import { J as t, Lt as n, Q as r, T as i, X as a, Y as o, Z as s, c, ct as l, d as u, i as d, k as f, l as p, mt as m, q as h, r as g, t as _, u as v, w as y, y as b } from "./horizontal-keypad-DXhquYz2.js";
3
- import { _ as x, n as S, r as C, t as w, u as T } from "./dist-CiGbvCAW.js";
4
- import E, { useRef as ee } from "react";
5
- import { jsx as D, jsxs as O } from "react/jsx-runtime";
2
+ import { $ as t, A as n, J as r, Q as i, Rt as a, T as o, X as s, Y as c, Z as l, c as u, d, ht as f, i as p, k as m, l as h, lt as g, r as _, t as v, u as y, w as b, y as x } from "./horizontal-keypad-DIf2m7kJ.js";
3
+ import { _ as S, n as C, r as w, t as T, u as E } from "./dist-CiGbvCAW.js";
4
+ import D, { useRef as ee } from "react";
5
+ import { jsx as O, jsxs as k } from "react/jsx-runtime";
6
6
  import te from "react-dom";
7
7
  //#region ../../lib-react/icons/dist/correct-response-icon.js
8
- var k = /* @__PURE__ */ e(n(), 1), ne = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
8
+ var A = /* @__PURE__ */ e(a(), 1), ne = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ k("svg", {
9
9
  "aria-hidden": "true",
10
10
  focusable: "false",
11
11
  preserveAspectRatio: "xMinYMin meet",
@@ -13,27 +13,27 @@ var k = /* @__PURE__ */ e(n(), 1), ne = ({ bgFill: e, fgFill: t }) => /* @__PURE
13
13
  viewBox: "-283 359 34 35",
14
14
  style: { enableBackground: "new -283 359 34 35" },
15
15
  children: [
16
- /* @__PURE__ */ D("circle", {
16
+ /* @__PURE__ */ O("circle", {
17
17
  cx: "-266",
18
18
  cy: "375.9",
19
19
  r: "14",
20
20
  fill: e
21
21
  }),
22
- /* @__PURE__ */ D("path", {
22
+ /* @__PURE__ */ O("path", {
23
23
  d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
24
24
  fill: e
25
25
  }),
26
- /* @__PURE__ */ D("polygon", {
26
+ /* @__PURE__ */ O("polygon", {
27
27
  points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
28
28
  fill: t
29
29
  })
30
30
  ]
31
31
  });
32
32
  ne.propTypes = {
33
- bgFill: k.default.string.isRequired,
34
- fgFill: k.default.string.isRequired
33
+ bgFill: A.default.string.isRequired,
34
+ fgFill: A.default.string.isRequired
35
35
  };
36
- var re = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
36
+ var re = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ k("svg", {
37
37
  "aria-hidden": "true",
38
38
  focusable: "false",
39
39
  preserveAspectRatio: "xMinYMin meet",
@@ -41,7 +41,7 @@ var re = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
41
41
  viewBox: "-129.5 127 34 35",
42
42
  style: { enableBackground: "new -129.5 127 34 35" },
43
43
  children: [
44
- /* @__PURE__ */ D("path", {
44
+ /* @__PURE__ */ O("path", {
45
45
  style: {
46
46
  fill: "#D0CAC5",
47
47
  stroke: "#E6E3E0",
@@ -50,7 +50,7 @@ var re = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
50
50
  },
51
51
  d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
52
52
  }),
53
- /* @__PURE__ */ D("path", {
53
+ /* @__PURE__ */ O("path", {
54
54
  style: {
55
55
  fill: "#B3ABA4",
56
56
  stroke: "#CDC7C2",
@@ -59,48 +59,48 @@ var re = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
59
59
  },
60
60
  d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
61
61
  }),
62
- /* @__PURE__ */ D("circle", {
62
+ /* @__PURE__ */ O("circle", {
63
63
  cx: "-114.2",
64
64
  cy: "143.5",
65
65
  r: "14",
66
66
  fill: e
67
67
  }),
68
- /* @__PURE__ */ D("path", {
68
+ /* @__PURE__ */ O("path", {
69
69
  d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
70
70
  fill: n
71
71
  }),
72
- /* @__PURE__ */ D("polygon", {
72
+ /* @__PURE__ */ O("polygon", {
73
73
  points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
74
74
  fill: t
75
75
  })
76
76
  ]
77
77
  });
78
78
  re.propTypes = {
79
- bgFill: k.default.string.isRequired,
80
- fgFill: k.default.string.isRequired,
81
- borderFill: k.default.string.isRequired
79
+ bgFill: A.default.string.isRequired,
80
+ fgFill: A.default.string.isRequired,
81
+ borderFill: A.default.string.isRequired
82
82
  };
83
- var ie = m("div")(({ size: e }) => ({
83
+ var ie = f("div")(({ size: e }) => ({
84
84
  width: e || "25px",
85
85
  height: e || "25px"
86
- })), A = ({ open: e, size: t }) => /* @__PURE__ */ D(ie, {
86
+ })), j = ({ open: e, size: t }) => /* @__PURE__ */ O(ie, {
87
87
  size: t,
88
- children: e ? /* @__PURE__ */ D(ne, {
88
+ children: e ? /* @__PURE__ */ O(ne, {
89
89
  bgFill: "#bce2ff",
90
90
  fgFill: "#1a9cff"
91
- }) : /* @__PURE__ */ D(re, {
91
+ }) : /* @__PURE__ */ O(re, {
92
92
  bgFill: "white",
93
93
  fgFill: "#1a9cff",
94
94
  borderFill: "#bce2ff"
95
95
  })
96
96
  });
97
- A.propTypes = {
98
- open: k.default.bool,
99
- size: k.default.string
100
- }, A.defaultProps = { open: !1 };
97
+ j.propTypes = {
98
+ open: A.default.bool,
99
+ size: A.default.string
100
+ }, j.defaultProps = { open: !1 };
101
101
  //#endregion
102
102
  //#region ../../lib-react/mask-markup/dist/componentize.js
103
- var ae = /* @__PURE__ */ e(S(), 1), oe = /\{\{(\d+)\}\}/g, se = (e, t) => e ? { markup: e.replace(oe, (e, n) => `<span data-component="${t}" data-id="${n}"></span>`) } : { markup: "" }, j = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), M = /* @__PURE__ */ j(((e, t) => {
103
+ var ae = /* @__PURE__ */ e(C(), 1), oe = /\{\{(\d+)\}\}/g, se = (e, t) => e ? { markup: e.replace(oe, (e, n) => `<span data-component="${t}" data-id="${n}"></span>`) } : { markup: "" }, M = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), N = /* @__PURE__ */ M(((e, t) => {
104
104
  t.exports = {
105
105
  "border-radius": 1,
106
106
  "border-top-left-radius": 1,
@@ -127,10 +127,10 @@ var ae = /* @__PURE__ */ e(S(), 1), oe = /\{\{(\d+)\}\}/g, se = (e, t) => e ? {
127
127
  "box-pack": 1
128
128
  };
129
129
  }));
130
- M();
130
+ N();
131
131
  //#endregion
132
132
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssUnitless.js
133
- var N = /* @__PURE__ */ j(((e, t) => {
133
+ var P = /* @__PURE__ */ M(((e, t) => {
134
134
  t.exports = {
135
135
  animation: 1,
136
136
  "column-count": 1,
@@ -150,19 +150,19 @@ var N = /* @__PURE__ */ j(((e, t) => {
150
150
  rowspan: 1
151
151
  };
152
152
  }));
153
- N();
153
+ P();
154
154
  //#endregion
155
155
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toUpperFirst.js
156
- var P = /* @__PURE__ */ j(((e, t) => {
156
+ var F = /* @__PURE__ */ M(((e, t) => {
157
157
  t.exports = function(e) {
158
158
  return e.length ? e.charAt(0).toUpperCase() + e.substring(1) : e;
159
159
  };
160
160
  }));
161
- P();
161
+ F();
162
162
  //#endregion
163
163
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixInfo.js
164
- var F = /* @__PURE__ */ j(((e, t) => {
165
- var n = P(), r = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, i = typeof document > "u" ? {} : document.documentElement.style;
164
+ var I = /* @__PURE__ */ M(((e, t) => {
165
+ var n = F(), r = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, i = typeof document > "u" ? {} : document.documentElement.style;
166
166
  t.exports = (function() {
167
167
  var e = (function() {
168
168
  for (var e in i) if (r.test(e)) return e.match(r)[0];
@@ -179,16 +179,16 @@ var F = /* @__PURE__ */ j(((e, t) => {
179
179
  };
180
180
  })();
181
181
  }));
182
- F();
182
+ I();
183
183
  //#endregion
184
184
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js
185
- var ce = /* @__PURE__ */ j(((e, t) => {
185
+ var ce = /* @__PURE__ */ M(((e, t) => {
186
186
  t.exports = /[-\s]+(.)?/g;
187
187
  }));
188
188
  ce();
189
189
  //#endregion
190
190
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js
191
- var I = /* @__PURE__ */ j(((e, t) => {
191
+ var L = /* @__PURE__ */ M(((e, t) => {
192
192
  var n = function(e, t) {
193
193
  return t ? t.toUpperCase() : "";
194
194
  }, r = ce();
@@ -196,10 +196,10 @@ var I = /* @__PURE__ */ j(((e, t) => {
196
196
  return e ? e.replace(r, n) : "";
197
197
  };
198
198
  }));
199
- I();
199
+ L();
200
200
  //#endregion
201
201
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js
202
- var le = /* @__PURE__ */ j(((e, t) => {
202
+ var le = /* @__PURE__ */ M(((e, t) => {
203
203
  var n = /::/g, r = /([A-Z]+)([A-Z][a-z])/g, i = /([a-z\d])([A-Z])/g, a = /_/g;
204
204
  t.exports = function(e, t) {
205
205
  return e ? e.replace(n, "/").replace(r, "$1_$2").replace(i, "$1_$2").replace(a, t || "-") : "";
@@ -208,16 +208,16 @@ var le = /* @__PURE__ */ j(((e, t) => {
208
208
  le();
209
209
  //#endregion
210
210
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js
211
- var L = /* @__PURE__ */ j(((e, t) => {
211
+ var R = /* @__PURE__ */ M(((e, t) => {
212
212
  var n = le();
213
213
  t.exports = function(e) {
214
214
  return n(e).toLowerCase();
215
215
  };
216
216
  }));
217
- L();
217
+ R();
218
218
  //#endregion
219
219
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js
220
- var ue = /* @__PURE__ */ j(((e, t) => {
220
+ var ue = /* @__PURE__ */ M(((e, t) => {
221
221
  t.exports = function(e) {
222
222
  return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
223
223
  };
@@ -225,8 +225,8 @@ var ue = /* @__PURE__ */ j(((e, t) => {
225
225
  ue();
226
226
  //#endregion
227
227
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js
228
- var de = /* @__PURE__ */ j(((e, t) => {
229
- var n = I(), r = L(), i = ue(), a = P(), o = F(), s = M(), c = typeof document > "u" ? {} : document.documentElement.style;
228
+ var de = /* @__PURE__ */ M(((e, t) => {
229
+ var n = L(), r = R(), i = ue(), a = F(), o = I(), s = N(), c = typeof document > "u" ? {} : document.documentElement.style;
230
230
  t.exports = function(e) {
231
231
  return function(t, l) {
232
232
  l ||= {};
@@ -246,22 +246,22 @@ var de = /* @__PURE__ */ j(((e, t) => {
246
246
  de();
247
247
  //#endregion
248
248
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js
249
- var fe = /* @__PURE__ */ j(((e, t) => {
249
+ var fe = /* @__PURE__ */ M(((e, t) => {
250
250
  t.exports = de()();
251
251
  }));
252
252
  fe();
253
253
  //#endregion
254
254
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js
255
- var R = /* @__PURE__ */ j(((e, t) => {
255
+ var z = /* @__PURE__ */ M(((e, t) => {
256
256
  var n = Object.prototype.hasOwnProperty;
257
257
  t.exports = function(e, t) {
258
258
  return n.call(e, t);
259
259
  };
260
260
  }));
261
- R();
261
+ z();
262
262
  //#endregion
263
263
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js
264
- var pe = /* @__PURE__ */ j(((e, t) => {
264
+ var pe = /* @__PURE__ */ M(((e, t) => {
265
265
  var n = Object.prototype.toString;
266
266
  t.exports = function(e) {
267
267
  return !!e && n.call(e) === "[object Object]";
@@ -270,7 +270,7 @@ var pe = /* @__PURE__ */ j(((e, t) => {
270
270
  pe();
271
271
  //#endregion
272
272
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js
273
- var me = /* @__PURE__ */ j(((e, t) => {
273
+ var me = /* @__PURE__ */ M(((e, t) => {
274
274
  var n = Object.prototype.toString;
275
275
  t.exports = function(e) {
276
276
  return n.apply(e) === "[object Function]";
@@ -279,9 +279,9 @@ var me = /* @__PURE__ */ j(((e, t) => {
279
279
  me();
280
280
  //#endregion
281
281
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js
282
- var z = /* @__PURE__ */ j(((e, t) => {
283
- F();
284
- var n = fe(), r = L(), i = I(), a = R(), o = pe(), s = me(), c = function(e, t, r, i) {
282
+ var B = /* @__PURE__ */ M(((e, t) => {
283
+ I();
284
+ var n = fe(), r = R(), i = L(), a = z(), o = pe(), s = me(), c = function(e, t, r, i) {
285
285
  n(t).forEach(function(t) {
286
286
  e[i ? i(t) : t] = r;
287
287
  });
@@ -292,7 +292,7 @@ var z = /* @__PURE__ */ j(((e, t) => {
292
292
  var n = e.split(":");
293
293
  n.length == 2 && (t[n[0].trim()] = n[1].trim());
294
294
  }), t;
295
- }, u = { cssUnitless: N() }, d = function(e, t, n, f) {
295
+ }, u = { cssUnitless: P() }, d = function(e, t, n, f) {
296
296
  typeof e == "string" && (e = l(e)), t ||= u, t.cssUnitless = t.cssUnitless || u.cssUnitless, f ||= {};
297
297
  var p = t.scope || {}, m = t.addUnits == null ? p && p.addUnits != null ? p.addUnits : !0 : t.addUnits, h = (t.cssUnitless == null ? p ? p.cssUnitless : null : t.cssUnitless) || {}, g = (t.cssUnit || p ? p.cssUnit : null) || "px", _ = t.prefixProperties || (p ? p.prefixProperties : null) || {}, v = t.camelize ? i : r, y, b, x, S, C, w, T, E;
298
298
  for (x in e) if (a(e, x)) {
@@ -321,11 +321,11 @@ var z = /* @__PURE__ */ j(((e, t) => {
321
321
  };
322
322
  t.exports = d;
323
323
  }));
324
- z();
324
+ B();
325
325
  //#endregion
326
326
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js
327
- var he = /* @__PURE__ */ j(((e, t) => {
328
- var n = z(), r = R();
327
+ var he = /* @__PURE__ */ M(((e, t) => {
328
+ var n = B(), r = z();
329
329
  t.exports = function(e, t) {
330
330
  e = n(e, t);
331
331
  var i = [], a;
@@ -336,11 +336,11 @@ var he = /* @__PURE__ */ j(((e, t) => {
336
336
  he();
337
337
  //#endregion
338
338
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js
339
- var ge = /* @__PURE__ */ j(((e, t) => {
339
+ var ge = /* @__PURE__ */ M(((e, t) => {
340
340
  t.exports = {
341
- prefixProperties: M(),
342
- cssUnitless: N(),
343
- object: z(),
341
+ prefixProperties: N(),
342
+ cssUnitless: P(),
343
+ object: B(),
344
344
  string: he()
345
345
  };
346
346
  }));
@@ -387,7 +387,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
387
387
  "border",
388
388
  "class",
389
389
  "style"
390
- ], B = {
390
+ ], V = {
391
391
  b: "bold",
392
392
  em: "italic",
393
393
  u: "underline",
@@ -407,10 +407,10 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
407
407
  };
408
408
  }
409
409
  if (e.nodeType === Ce) {
410
- let n = e.tagName.toLowerCase(), r = B[n];
410
+ let n = e.tagName.toLowerCase(), r = V[n];
411
411
  if (r) return ve("[deserialize] mark: ", r), {
412
412
  _flatten: !0,
413
- nodes: V(e.childNodes, [...t, r])
413
+ nodes: H(e.childNodes, [...t, r])
414
414
  };
415
415
  if (n === "math") return {
416
416
  isMath: !0,
@@ -418,7 +418,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
418
418
  };
419
419
  let i = we(e) || {};
420
420
  n === "audio" && i.controls === "" && (i.controls = !0);
421
- let a = je.reduce(Ae(e), { ...i }), o = Te(n), s = V(e.childNodes, t);
421
+ let a = je.reduce(Ae(e), { ...i }), o = Te(n), s = H(e.childNodes, t);
422
422
  return {
423
423
  object: o,
424
424
  type: n,
@@ -430,7 +430,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
430
430
  };
431
431
  }
432
432
  return null;
433
- }, V = (e, t = []) => {
433
+ }, H = (e, t = []) => {
434
434
  let n = [];
435
435
  for (let r = 0; r < e.length; r++) {
436
436
  let i = Me(e[r], t);
@@ -452,7 +452,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
452
452
  }]
453
453
  }
454
454
  };
455
- let t = V(new DOMParser().parseFromString(e, "text/html").body.childNodes);
455
+ let t = H(new DOMParser().parseFromString(e, "text/html").body.childNodes);
456
456
  return !t.some((e) => e.object === "block" || e.object === "inline") && t.length > 0 && (t = [{
457
457
  object: "block",
458
458
  type: "span",
@@ -473,75 +473,75 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
473
473
  nodes: t
474
474
  }
475
475
  };
476
- }, Pe = m("div")(({ theme: e }) => ({
476
+ }, Pe = f("div")(({ theme: e }) => ({
477
477
  paddingTop: e.spacing(.5),
478
478
  paddingBottom: e.spacing(.5)
479
- })), H = m("span")(() => ({
479
+ })), U = f("span")(() => ({
480
480
  display: "inline-block",
481
481
  width: ".75em"
482
482
  })), Fe = ["tbody", "tr"], Ie = (e, t) => {
483
483
  let n = t.trim() === "", r = e && e.type;
484
484
  if (!(n && Fe.includes(r))) return t;
485
485
  }, Le = (e) => {
486
- let t = e.leaves.find((e) => T(e, "marks", []).length);
486
+ let t = e.leaves.find((e) => E(e, "marks", []).length);
487
487
  return t ? t.marks : null;
488
- }, U = (e, t, n, r, i, a) => {
488
+ }, Re = (e, t, n, i, a, o) => {
489
489
  if (!t) return null;
490
- let o = [];
491
- return (e.nodes || []).forEach((e, s) => {
492
- let c = e.type ? `${e.type}-${s}` : `${s}`;
493
- if (e.isMath) return o.push(/* @__PURE__ */ D("span", { dangerouslySetInnerHTML: { __html: h(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`) } })), o;
494
- if (r) {
495
- let a = r(e, t, n);
496
- if (a) {
497
- let t = e.data?.dataset?.component === "blank" && i?.type !== "td";
498
- t && o.push(/* @__PURE__ */ D(H, {}, `spacer-${s}-before`)), o.push(a), t && o.push(/* @__PURE__ */ D(H, {}, `spacer-${s}-after`));
490
+ let s = [];
491
+ return (e.nodes || []).forEach((e, c) => {
492
+ let l = e.type ? `${e.type}-${c}` : `${c}`;
493
+ if (e.isMath) return s.push(/* @__PURE__ */ O("span", { dangerouslySetInnerHTML: { __html: r(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`) } })), s;
494
+ if (i) {
495
+ let r = i(e, t, n);
496
+ if (r) {
497
+ let t = e.data?.dataset?.component === "blank" && a?.type !== "td";
498
+ t && s.push(/* @__PURE__ */ O(U, {}, `spacer-${c}-before`)), s.push(r), t && s.push(/* @__PURE__ */ O(U, {}, `spacer-${c}-after`));
499
499
  return;
500
500
  }
501
501
  }
502
502
  if (e.object === "text") {
503
503
  let t = e.leaves.reduce((e, t) => {
504
- let n = t.text, r = Ie(i, n);
504
+ let n = t.text, r = Ie(a, n);
505
505
  return r ? e + r : e;
506
506
  }, ""), n = Le(e);
507
507
  if (n?.length > 0) {
508
- let e = n.map((e) => Object.keys(B).find((t) => B[t] === e.type)).filter(Boolean);
509
- e.length > 0 ? o.push(e.reduceRight((e, t, n) => /* @__PURE__ */ D(t, { children: e }, `${c}-${t}-${n}`), t)) : o.push(t);
510
- } else t.length > 0 && o.push(t);
508
+ let e = n.map((e) => Object.keys(V).find((t) => V[t] === e.type)).filter(Boolean);
509
+ e.length > 0 ? s.push(e.reduceRight((e, t, n) => /* @__PURE__ */ O(t, { children: e }, `${l}-${t}-${n}`), t)) : s.push(t);
510
+ } else t.length > 0 && s.push(t);
511
511
  } else {
512
- let i = U(e, t, n, r, e, a);
513
- if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ D(Pe, { children: i }, c));
512
+ let r = Re(e, t, n, i, e, o);
513
+ if (e.type === "p" || e.type === "paragraph") s.push(/* @__PURE__ */ O(Pe, { children: r }, l));
514
514
  else {
515
515
  let t = e.type;
516
- e.nodes && e.nodes.length > 0 ? o.push(/* @__PURE__ */ D(t, {
516
+ e.nodes && e.nodes.length > 0 ? s.push(/* @__PURE__ */ O(t, {
517
517
  ...e.data.attributes,
518
- children: i
519
- }, c)) : o.push(/* @__PURE__ */ D(t, { ...e.data.attributes }, c));
518
+ children: r
519
+ }, l)) : s.push(/* @__PURE__ */ O(t, { ...e.data.attributes }, l));
520
520
  }
521
521
  }
522
- }), o;
523
- }, Re = m("div")(() => ({
522
+ }), s;
523
+ }, ze = f("div")(() => ({
524
524
  display: "initial",
525
525
  "&:not(.MathJax) table": { borderCollapse: "collapse" },
526
526
  "&:not(.MathJax) table td, &:not(.MathJax) table th": {
527
527
  padding: "8px 12px",
528
528
  textAlign: "left"
529
529
  }
530
- })), ze = class extends E.Component {
530
+ })), Be = class extends D.Component {
531
531
  constructor(e) {
532
- super(e), this.internalContainerRef = E.createRef();
532
+ super(e), this.internalContainerRef = D.createRef();
533
533
  }
534
534
  static propTypes = {
535
- renderChildren: k.default.func,
536
- layout: k.default.object,
537
- value: k.default.object,
538
- onChange: k.default.func,
539
- elementType: k.default.string,
540
- containerRef: k.default.oneOfType([k.default.func, k.default.shape({ current: k.default.instanceOf(Element) })])
535
+ renderChildren: A.default.func,
536
+ layout: A.default.object,
537
+ value: A.default.object,
538
+ onChange: A.default.func,
539
+ elementType: A.default.string,
540
+ containerRef: A.default.oneOfType([A.default.func, A.default.shape({ current: A.default.instanceOf(Element) })])
541
541
  };
542
542
  componentDidMount() {
543
543
  let e = this.props.containerRef || this.internalContainerRef;
544
- e.current && typeof i == "function" && i(e.current);
544
+ e.current && typeof o == "function" && o(e.current);
545
545
  }
546
546
  handleChange = (e, t) => {
547
547
  let n = {
@@ -551,26 +551,26 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
551
551
  this.props.onChange(n);
552
552
  };
553
553
  render() {
554
- let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = U(t, e, this.handleChange, this.props.renderChildren, null, n);
555
- return /* @__PURE__ */ D(Re, {
554
+ let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = Re(t, e, this.handleChange, this.props.renderChildren, null, n);
555
+ return /* @__PURE__ */ O(ze, {
556
556
  ref: r || this.internalContainerRef,
557
557
  children: i
558
558
  });
559
559
  }
560
- }, Be = (e, t) => {
560
+ }, Ve = (e, t) => {
561
561
  let { markup: n } = se(e, t);
562
- return Ne(h(n)).document;
563
- }, Ve = ((e, t) => class extends E.Component {
562
+ return Ne(r(n)).document;
563
+ }, He = ((e, t) => class extends D.Component {
564
564
  static propTypes = {
565
- markup: k.default.string,
566
- layout: k.default.object,
567
- value: k.default.object,
568
- onChange: k.default.func,
569
- customMarkMarkupComponent: k.default.func,
570
- elementType: k.default.string
565
+ markup: A.default.string,
566
+ layout: A.default.object,
567
+ value: A.default.object,
568
+ onChange: A.default.func,
569
+ customMarkMarkupComponent: A.default.func,
570
+ elementType: A.default.string
571
571
  };
572
572
  constructor(e) {
573
- super(e), this.containerRef = E.createRef();
573
+ super(e), this.containerRef = D.createRef();
574
574
  }
575
575
  componentDidUpdate(e) {
576
576
  if (this.props.markup !== e.markup) {
@@ -582,8 +582,8 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
582
582
  }
583
583
  }
584
584
  render() {
585
- let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || Be(n, e);
586
- return /* @__PURE__ */ D(ze, {
585
+ let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || Ve(n, e);
586
+ return /* @__PURE__ */ O(Be, {
587
587
  containerRef: this.containerRef,
588
588
  elementType: o,
589
589
  layout: s,
@@ -595,7 +595,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
595
595
  })("input", (e) => (t, n, r) => {
596
596
  let i = t.data && t.data.dataset || {};
597
597
  if (i.component === "input") return e.customMarkMarkupComponent(i.id);
598
- }), He = "height ease-in 300ms, opacity ease-in 300ms", Ue = m("div")(() => ({
598
+ }), Ue = "height ease-in 300ms, opacity ease-in 300ms", We = f("div")(() => ({
599
599
  position: "relative",
600
600
  height: 0,
601
601
  overflow: "hidden",
@@ -603,7 +603,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
603
603
  visibility: "hidden",
604
604
  width: 0,
605
605
  "&.enter": {
606
- transition: He,
606
+ transition: Ue,
607
607
  opacity: 1,
608
608
  height: "auto",
609
609
  width: "auto",
@@ -617,7 +617,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
617
617
  minHeight: "25px"
618
618
  },
619
619
  "&.exit": {
620
- transition: He,
620
+ transition: Ue,
621
621
  opacity: 0,
622
622
  height: 0,
623
623
  visibility: "visible",
@@ -631,7 +631,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
631
631
  }
632
632
  })), W = (e) => {
633
633
  let { show: t, children: n, className: r } = e, i = ee(null);
634
- return /* @__PURE__ */ D(l, {
634
+ return /* @__PURE__ */ O(g, {
635
635
  nodeRef: i,
636
636
  in: t,
637
637
  appear: !0,
@@ -643,7 +643,7 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
643
643
  exit: "exit",
644
644
  exitDone: "exit-done"
645
645
  },
646
- children: /* @__PURE__ */ D(Ue, {
646
+ children: /* @__PURE__ */ O(We, {
647
647
  ref: i,
648
648
  className: r,
649
649
  children: n
@@ -651,13 +651,13 @@ var _e = ge(), ve = (0, ae.default)("@pie-lib:mask-markup:serialization"), ye =
651
651
  });
652
652
  };
653
653
  W.propTypes = {
654
- show: k.default.bool.isRequired,
655
- className: k.default.string,
656
- children: k.default.oneOfType([k.default.arrayOf(k.default.node), k.default.node]).isRequired
654
+ show: A.default.bool.isRequired,
655
+ className: A.default.string,
656
+ children: A.default.oneOfType([A.default.arrayOf(A.default.node), A.default.node]).isRequired
657
657
  };
658
658
  //#endregion
659
659
  //#region ../../lib-react/correct-answer-toggle/dist/i18n/index.js
660
- var We = f({
660
+ var Ge = n({
661
661
  packageName: "@pie-lib/correct-answer-toggle",
662
662
  source: {
663
663
  showCorrectAnswer: "Show correct answer",
@@ -719,20 +719,20 @@ var We = f({
719
719
  function G(e) {
720
720
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
721
721
  }
722
- function Ge(e, t) {
722
+ function Ke(e, t) {
723
723
  return !e || G(e) ? e : G(e.default) ? e.default : t && G(e[t]) ? e[t] : t && G(e[t]?.default) ? e[t].default : e;
724
724
  }
725
- var Ke = d, K = Ke.default, qe = K && typeof K == "object" ? K : Ke, Je = Ge(v, "Readable") || Ge(qe.Readable, "Readable"), Ye = {
725
+ var qe = p, K = qe.default, Je = K && typeof K == "object" ? K : qe, Ye = Ke(y, "Readable") || Ke(Je.Readable, "Readable"), Xe = {
726
726
  WebkitTouchCallout: "none",
727
727
  WebkitUserSelect: "none",
728
728
  KhtmlUserSelect: "none",
729
729
  MozUserSelect: "none",
730
730
  msUserSelect: "none",
731
731
  userSelect: "none"
732
- }, Xe = m("div")(() => ({
732
+ }, Ze = f("div")(() => ({
733
733
  width: "100%",
734
734
  cursor: "pointer"
735
- })), Ze = m("button")(() => ({
735
+ })), Qe = f("button")(() => ({
736
736
  margin: "0 auto",
737
737
  textAlign: "center",
738
738
  display: "flex",
@@ -745,18 +745,18 @@ var Ke = d, K = Ke.default, qe = K && typeof K == "object" ? K : Ke, Je = Ge(v,
745
745
  font: "inherit",
746
746
  cursor: "pointer",
747
747
  "&:focus-visible": {
748
- outline: `2px solid ${t.buttonFocusOutline()}`,
748
+ outline: `2px solid ${c.buttonFocusOutline()}`,
749
749
  outlineOffset: "-2px"
750
750
  }
751
- })), Qe = m("div")(() => ({
751
+ })), $e = f("div")(() => ({
752
752
  width: "fit-content",
753
753
  minWidth: "140px",
754
754
  alignSelf: "center",
755
755
  verticalAlign: "middle",
756
- color: `var(--correct-answer-toggle-label-color, ${t.text()})`,
756
+ color: `var(--correct-answer-toggle-label-color, ${c.text()})`,
757
757
  fontWeight: "normal",
758
- ...Ye
759
- })), $e = m("div")(() => ({
758
+ ...Xe
759
+ })), et = f("div")(() => ({
760
760
  position: "absolute",
761
761
  width: "25px",
762
762
  "&.enter": { opacity: "0" },
@@ -769,27 +769,27 @@ var Ke = d, K = Ke.default, qe = K && typeof K == "object" ? K : Ke, Je = Ge(v,
769
769
  opacity: "0",
770
770
  transition: "opacity 0.3s ease-in"
771
771
  }
772
- })), et = m("div")(() => ({
772
+ })), tt = f("div")(() => ({
773
773
  width: "25px",
774
774
  marginRight: "5px",
775
775
  display: "flex",
776
776
  alignItems: "center"
777
- })), tt = class extends E.Component {
777
+ })), nt = class extends D.Component {
778
778
  static propTypes = {
779
- onToggle: k.default.func,
780
- toggled: k.default.bool,
781
- show: k.default.bool,
782
- hideMessage: k.default.string,
783
- showMessage: k.default.string,
784
- className: k.default.string,
785
- language: k.default.string
779
+ onToggle: A.default.func,
780
+ toggled: A.default.bool,
781
+ show: A.default.bool,
782
+ hideMessage: A.default.string,
783
+ showMessage: A.default.string,
784
+ className: A.default.string,
785
+ language: A.default.string
786
786
  };
787
787
  static defaultProps = {
788
788
  show: !1,
789
789
  toggled: !1
790
790
  };
791
791
  constructor(e) {
792
- super(e), this.state = { show: e.show }, this.openIconRef = E.createRef(), this.closedIconRef = E.createRef();
792
+ super(e), this.state = { show: e.show }, this.openIconRef = D.createRef(), this.closedIconRef = D.createRef();
793
793
  }
794
794
  relabel = () => this.forceUpdate();
795
795
  onClick() {
@@ -802,17 +802,18 @@ var Ke = d, K = Ke.default, qe = K && typeof K == "object" ? K : Ke, Je = Ge(v,
802
802
  this.setState({ show: e.show });
803
803
  }
804
804
  render() {
805
- let { className: e, toggled: t, language: n } = this.props, r = We.forLocale(n, this.relabel), i = this.props.hideMessage ?? r.t("hideCorrectAnswer"), a = this.props.showMessage ?? r.t("showCorrectAnswer");
806
- return /* @__PURE__ */ D(Xe, {
805
+ let { className: e, toggled: t, language: n } = this.props, r = Ge.forLocale(n, this.relabel), i = this.props.hideMessage ?? r.t("hideCorrectAnswer"), a = this.props.showMessage ?? r.t("showCorrectAnswer");
806
+ return /* @__PURE__ */ O(Ze, {
807
807
  className: e,
808
- children: /* @__PURE__ */ D(W, {
808
+ ...m(n),
809
+ children: /* @__PURE__ */ O(W, {
809
810
  show: this.state.show,
810
- children: /* @__PURE__ */ O(Ze, {
811
+ children: /* @__PURE__ */ k(Qe, {
811
812
  type: "button",
812
813
  "aria-pressed": !!t,
813
814
  onClick: this.onClick.bind(this),
814
815
  onTouchEnd: this.onTouch.bind(this),
815
- children: [/* @__PURE__ */ O(et, { children: [/* @__PURE__ */ D(l, {
816
+ children: [/* @__PURE__ */ k(tt, { children: [/* @__PURE__ */ O(g, {
816
817
  nodeRef: this.openIconRef,
817
818
  timeout: 400,
818
819
  in: t,
@@ -823,11 +824,11 @@ var Ke = d, K = Ke.default, qe = K && typeof K == "object" ? K : Ke, Je = Ge(v,
823
824
  exit: "exit",
824
825
  exitActive: "exit-active"
825
826
  },
826
- children: /* @__PURE__ */ D($e, {
827
+ children: /* @__PURE__ */ O(et, {
827
828
  ref: this.openIconRef,
828
- children: /* @__PURE__ */ D(A, { open: t }, "correct-open")
829
+ children: /* @__PURE__ */ O(j, { open: t }, "correct-open")
829
830
  })
830
- }), /* @__PURE__ */ D(l, {
831
+ }), /* @__PURE__ */ O(g, {
831
832
  nodeRef: this.closedIconRef,
832
833
  timeout: 5e3,
833
834
  in: !t,
@@ -838,13 +839,13 @@ var Ke = d, K = Ke.default, qe = K && typeof K == "object" ? K : Ke, Je = Ge(v,
838
839
  exit: "exit",
839
840
  exitActive: "exit-active"
840
841
  },
841
- children: /* @__PURE__ */ D($e, {
842
+ children: /* @__PURE__ */ O(et, {
842
843
  ref: this.closedIconRef,
843
- children: /* @__PURE__ */ D(A, { open: t }, "correct-closed")
844
+ children: /* @__PURE__ */ O(j, { open: t }, "correct-closed")
844
845
  })
845
- })] }), /* @__PURE__ */ D(Je, {
846
+ })] }), /* @__PURE__ */ O(Ye, {
846
847
  false: !0,
847
- children: /* @__PURE__ */ D(Qe, {
848
+ children: /* @__PURE__ */ O($e, {
848
849
  "aria-hidden": !this.state.show,
849
850
  children: t ? i : a
850
851
  })
@@ -862,16 +863,16 @@ function q(e) {
862
863
  function J(e, t) {
863
864
  return !e || q(e) ? e : q(e.default) ? e.default : t && q(e[t]) ? e[t] : t && q(e[t]?.default) ? e[t].default : e;
864
865
  }
865
- var nt = d, Y = nt.default, X = Y && typeof Y == "object" ? Y : nt, rt = J(b, "UiLayout") || J(X.UiLayout, "UiLayout"), Z = J(u, "PreviewPrompt") || J(X.PreviewPrompt, "PreviewPrompt"), it = J(v, "Readable") || J(X.Readable, "Readable"), at = J(y, "Collapsible") || J(X.Collapsible, "Collapsible"), { translator: Q } = w, ot = m(rt)({
866
- color: t.text(),
867
- backgroundColor: t.background(),
866
+ var rt = p, Y = rt.default, X = Y && typeof Y == "object" ? Y : rt, it = J(x, "UiLayout") || J(X.UiLayout, "UiLayout"), Z = J(d, "PreviewPrompt") || J(X.PreviewPrompt, "PreviewPrompt"), at = J(y, "Readable") || J(X.Readable, "Readable"), ot = J(b, "Collapsible") || J(X.Collapsible, "Collapsible"), { translator: Q } = T, st = f(it)({
867
+ color: c.text(),
868
+ backgroundColor: c.background(),
868
869
  display: "inline-block"
869
- }), st = m("div")({
870
+ }), ct = f("div")({
870
871
  width: "100%",
871
872
  position: "relative",
872
- backgroundColor: t.background(),
873
- color: t.text()
874
- }), ct = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), lt = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ut = m("div")({
873
+ backgroundColor: c.background(),
874
+ color: c.text()
875
+ }), lt = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ut = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), dt = f("div")({
875
876
  position: "relative",
876
877
  "& > div > div": {
877
878
  display: "flex",
@@ -906,12 +907,12 @@ var nt = d, Y = nt.default, X = Y && typeof Y == "object" ? Y : nt, rt = J(b, "U
906
907
  paddingTop: "1.5px !important"
907
908
  },
908
909
  "& .mq-parallelogram": { lineHeight: .85 }
909
- }), dt = m("div")(({ theme: e, $incorrect: n, $correct: r, $showCorrectness: i, $correctAnswerShown: a }) => ({
910
+ }), ft = f("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: r, $correctAnswerShown: i }) => ({
910
911
  maxWidth: "fit-content",
911
- ...n && { borderColor: `${t.incorrect()} !important` },
912
- ...r && { borderColor: `${t.correct()} !important` },
913
- ...i && { border: "2px solid" },
914
- ...a && {
912
+ ...t && { borderColor: `${c.incorrect()} !important` },
913
+ ...n && { borderColor: `${c.correct()} !important` },
914
+ ...r && { border: "2px solid" },
915
+ ...i && {
915
916
  padding: e.spacing(1),
916
917
  letterSpacing: "0.5px"
917
918
  },
@@ -922,29 +923,29 @@ var nt = d, Y = nt.default, X = Y && typeof Y == "object" ? Y : nt, rt = J(b, "U
922
923
  } },
923
924
  "& sup": { top: 0 }
924
925
  }
925
- })), ft = m(g.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: t.text() } } }), pt = m("div")(({ theme: e }) => ({
926
+ })), pt = f(_.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: c.text() } } }), mt = f("div")(({ theme: e }) => ({
926
927
  zIndex: 10,
927
928
  minWidth: "400px",
928
929
  marginTop: e.spacing(2)
929
- })), mt = m("div")(({ theme: e }) => ({
930
+ })), ht = f("div")(({ theme: e }) => ({
930
931
  marginBottom: e.spacing(1),
931
932
  pointerEvents: "none"
932
- })), ht = m("h2")({
933
+ })), gt = f("h2")({
933
934
  position: "absolute",
934
935
  left: "-10000px",
935
936
  top: "auto",
936
937
  width: "1px",
937
938
  height: "1px",
938
939
  overflow: "hidden"
939
- }), gt = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), _t = m(tt)(({ theme: e }) => ({
940
- color: t.text(),
940
+ }), _t = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), vt = f(nt)(({ theme: e }) => ({
941
+ color: c.text(),
941
942
  marginBottom: e.spacing(2)
942
943
  }));
943
944
  if (typeof document < "u") {
944
945
  let e = "math-templated-main-styles";
945
946
  if (!document.getElementById(e)) {
946
- let n = document.createElement("style");
947
- n.id = e, n.textContent = `
947
+ let t = document.createElement("style");
948
+ t.id = e, t.textContent = `
948
949
  .block-container {
949
950
  margin: 8px !important;
950
951
  display: inline-flex;
@@ -962,8 +963,8 @@ if (typeof document < "u") {
962
963
  border-right: 2px solid #bdbdbd !important;
963
964
  }
964
965
  .block-math {
965
- color: ${t.text()};
966
- background-color: ${t.background()};
966
+ color: ${c.text()};
967
+ background-color: ${c.background()};
967
968
  padding: 4px !important;
968
969
  display: flex;
969
970
  align-items: center;
@@ -974,16 +975,16 @@ if (typeof document < "u") {
974
975
  display: none;
975
976
  }
976
977
  .correct {
977
- border-color: ${t.correct()} !important;
978
+ border-color: ${c.correct()} !important;
978
979
  }
979
980
  .incorrect {
980
- border-color: ${t.incorrect()} !important;
981
+ border-color: ${c.incorrect()} !important;
981
982
  }
982
- `, document.head.appendChild(n);
983
+ `, document.head.appendChild(t);
983
984
  }
984
985
  }
985
- var vt = !1, $ = /(\{\{\d+\}\})/gm, yt = 6, bt = 8, xt = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
986
- function St(e = []) {
986
+ var yt = !1, $ = /(\{\{\d+\}\})/gm, bt = 6, xt = 8, St = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
987
+ function Ct(e = []) {
987
988
  return e.map((e) => ({
988
989
  name: e,
989
990
  latex: e,
@@ -991,17 +992,17 @@ function St(e = []) {
991
992
  label: e
992
993
  }));
993
994
  }
994
- function Ct(e = [], t) {
995
+ function wt(e = [], t) {
995
996
  return Math.floor(e.length / 5) * 30 + (t === "miscellaneous" ? 600 : 500);
996
997
  }
997
- function wt(e) {
998
+ function Tt(e) {
998
999
  return e.split($).filter((e) => e);
999
1000
  }
1000
- function Tt(e, t) {
1001
+ function Et(e, t) {
1001
1002
  let { responses: n, disabled: r, markup: i, printMode: a, alwaysShowCorrect: o } = e || {};
1002
- if (i) return t.showCorrect ? Object.keys(n || {}).reduce((e, t) => (e[t] = n?.[t]?.answer, e), {}) : wt(i).reduce((e, n) => {
1003
+ if (i) return t.showCorrect ? Object.keys(n || {}).reduce((e, t) => (e[t] = n?.[t]?.answer, e), {}) : Tt(i).reduce((e, n) => {
1003
1004
  if (n.match($)) {
1004
- let i = Dt.getResponseKey(n), s = t.session.answers[`r${i}`];
1005
+ let i = Ot.getResponseKey(n), s = t.session.answers[`r${i}`];
1005
1006
  if (a && !o) {
1006
1007
  let t = "\\ \\ ".repeat(30) + "\\embed{newLine}[] ";
1007
1008
  return {
@@ -1020,7 +1021,7 @@ function Tt(e, t) {
1020
1021
  return e;
1021
1022
  }, {});
1022
1023
  }
1023
- var Et = {
1024
+ var Dt = {
1024
1025
  name: "smartHorizontalPlacement",
1025
1026
  enabled: !0,
1026
1027
  phase: "main",
@@ -1028,15 +1029,15 @@ var Et = {
1028
1029
  fn: ({ state: e }) => {
1029
1030
  let t = e.modifiersData.popperOffsets;
1030
1031
  if (!t) return;
1031
- let n = window.innerWidth || document.documentElement.clientWidth, r = e.rects.popper.width, i = e.elements.reference.getBoundingClientRect().left, a = e.elements.popper?.offsetParent, o = a?.getBoundingClientRect?.() || { left: 0 }, s = a?.scrollLeft || 0, c = i - o.left + s, l = c - i, u = l + bt, d = l + n - r - bt;
1032
+ let n = window.innerWidth || document.documentElement.clientWidth, r = e.rects.popper.width, i = e.elements.reference.getBoundingClientRect().left, a = e.elements.popper?.offsetParent, o = a?.getBoundingClientRect?.() || { left: 0 }, s = a?.scrollLeft || 0, c = i - o.left + s, l = c - i, u = l + xt, d = l + n - r - xt;
1032
1033
  i + r <= n ? t.x = c : t.x = c - r, d < u ? t.x = u : t.x = Math.min(Math.max(t.x, u), d);
1033
1034
  }
1034
- }, Dt = class e extends E.Component {
1035
+ }, Ot = class e extends D.Component {
1035
1036
  static getResponseKey = (e) => (e || "").replaceAll("{{", "").replaceAll("}}", "");
1036
1037
  static propTypes = {
1037
- session: k.default.object.isRequired,
1038
- onSessionChange: k.default.func,
1039
- model: k.default.object.isRequired
1038
+ session: A.default.object.isRequired,
1039
+ onSessionChange: A.default.func,
1040
+ model: A.default.object.isRequired
1040
1041
  };
1041
1042
  constructor(t) {
1042
1043
  super(t);
@@ -1051,11 +1052,11 @@ var Et = {
1051
1052
  },
1052
1053
  activeAnswerBlock: "",
1053
1054
  showCorrect: o || !1,
1054
- tooltipContainerRef: E.createRef()
1055
+ tooltipContainerRef: D.createRef()
1055
1056
  };
1056
1057
  }
1057
1058
  UNSAFE_componentWillMount() {
1058
- typeof window < "u" && (vt ||= (a("answerBlock", (e) => ({
1059
+ typeof window < "u" && (yt ||= (l("answerBlock", (e) => ({
1059
1060
  htmlString: `<div class="block-container">
1060
1061
  <div class="block-response" data-answer-block-index="${e}">R</div>
1061
1062
  <div class="block-math">
@@ -1072,9 +1073,9 @@ var Et = {
1072
1073
  let n = this.root.querySelector(`[data-answer-block="${t}"]`), i = this.root.querySelector(`[data-answer-block-index="${t}"]`);
1073
1074
  if (n) {
1074
1075
  let a = r[t];
1075
- o(n, a && a.value || ""), e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
1076
+ s(n, a && a.value || ""), e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
1076
1077
  }
1077
- }), i(this.root);
1078
+ }), o(this.root);
1078
1079
  };
1079
1080
  UNSAFE_componentWillReceiveProps(t) {
1080
1081
  let { model: n } = this.props, { model: r = {} } = t || {}, { markup: i = "", env: a = {} } = n || {}, { markup: o = "", env: s = {}, alwaysShowCorrect: c = !1 } = r, l = (e) => e && e.mode === "evaluate";
@@ -1083,7 +1084,7 @@ var Et = {
1083
1084
  showCorrect: !1
1084
1085
  })), c && this.setState({ showCorrect: !0 });
1085
1086
  let u = i.match($), d = o.match($);
1086
- if (!x(u, d)) {
1087
+ if (!S(u, d)) {
1087
1088
  let t = {}, n = this.state.session.answers;
1088
1089
  (d || []).forEach((r) => {
1089
1090
  let i = e.getResponseKey(r), a = n && n[`r${i}`];
@@ -1097,11 +1098,11 @@ var Et = {
1097
1098
  }
1098
1099
  }
1099
1100
  shouldComponentUpdate(e, t) {
1100
- let n = x(this.props.model, e.model), r = x(this.state, t);
1101
+ let n = S(this.props.model, e.model), r = S(this.state, t);
1101
1102
  return !n || !r;
1102
1103
  }
1103
1104
  componentDidMount() {
1104
- this.handleAnswerBlockDomUpdate(), setTimeout(() => i(this.root), 100);
1105
+ this.handleAnswerBlockDomUpdate(), setTimeout(() => o(this.root), 100);
1105
1106
  }
1106
1107
  componentDidUpdate() {
1107
1108
  this.handleAnswerBlockDomUpdate();
@@ -1164,7 +1165,7 @@ var Et = {
1164
1165
  this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
1165
1166
  };
1166
1167
  subFieldChanged = (e, t) => {
1167
- s(), e && this.setState((n) => ({ session: {
1168
+ i(), e && this.setState((n) => ({ session: {
1168
1169
  ...n.session,
1169
1170
  answers: {
1170
1171
  ...n.session.answers,
@@ -1196,18 +1197,18 @@ var Et = {
1196
1197
  };
1197
1198
  setTooltipRef(e) {
1198
1199
  setTimeout(() => {
1199
- if (e && xt) {
1200
+ if (e && St) {
1200
1201
  let e = document.querySelector("[role='tooltip']");
1201
1202
  e && e.firstChild.setAttribute("tabindex", "-1");
1202
1203
  }
1203
1204
  }, 1);
1204
1205
  }
1205
1206
  renderTeacherInstructions = () => {
1206
- let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (p(t) || c(t)), i = /* @__PURE__ */ D(Z, {
1207
+ let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (h(t) || u(t)), i = /* @__PURE__ */ O(Z, {
1207
1208
  defaultClassName: "teacher-instructions",
1208
1209
  prompt: t
1209
1210
  });
1210
- return r && /* @__PURE__ */ D(lt, { children: n ? i : /* @__PURE__ */ D(at, {
1211
+ return r && /* @__PURE__ */ O(ut, { children: n ? i : /* @__PURE__ */ O(ot, {
1211
1212
  labels: {
1212
1213
  hidden: Q.t("common:showTeacherInstructions", { lng: e?.language }),
1213
1214
  visible: Q.t("common:hideTeacherInstructions", { lng: e?.language })
@@ -1216,8 +1217,8 @@ var Et = {
1216
1217
  }) });
1217
1218
  };
1218
1219
  renderRationale = () => {
1219
- let { model: e } = this.props, { rationale: t, animationsDisabled: n } = e || {}, r = /* @__PURE__ */ D(Z, { prompt: t });
1220
- return t && (p(t) || c(t)) && /* @__PURE__ */ D(lt, { children: n ? r : /* @__PURE__ */ D(at, {
1220
+ let { model: e } = this.props, { rationale: t, animationsDisabled: n } = e || {}, r = /* @__PURE__ */ O(Z, { prompt: t });
1221
+ return t && (h(t) || u(t)) && /* @__PURE__ */ O(ut, { children: n ? r : /* @__PURE__ */ O(ot, {
1221
1222
  labels: {
1222
1223
  hidden: Q.t("common:showRationale", { lng: e?.language }),
1223
1224
  visible: Q.t("common:hideRationale", { lng: e?.language })
@@ -1226,13 +1227,13 @@ var Et = {
1226
1227
  }) });
1227
1228
  };
1228
1229
  renderPlayerContent = () => {
1229
- let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: i, tooltipContainerRef: a } = this.state, { correctness: o, disabled: s, view: c, responses: l, equationEditor: u, customKeys: d, feedback: f, env: { mode: p } = {}, printMode: m, alwaysShowCorrect: h, language: g } = e || {}, v = C(l), y = St(d), b = Tt(e, this.state) || "", x = m && !h;
1230
- return /* @__PURE__ */ D(ut, { children: /* @__PURE__ */ D(Ve, {
1230
+ let { model: e } = this.props, { activeAnswerBlock: n, showCorrect: r, session: i, tooltipContainerRef: a } = this.state, { correctness: o, disabled: s, view: c, responses: l, equationEditor: u, customKeys: d, feedback: f, env: { mode: p } = {}, printMode: m, alwaysShowCorrect: h, language: g } = e || {}, _ = w(l), y = Ct(d), b = Et(e, this.state) || "", x = m && !h;
1231
+ return /* @__PURE__ */ O(dt, { children: /* @__PURE__ */ O(He, {
1231
1232
  disabled: s,
1232
1233
  markup: e.markup,
1233
1234
  value: {},
1234
1235
  customMarkMarkupComponent: (e) => {
1235
- let l = p === "evaluate" && f && f[e], d = /* @__PURE__ */ D(ft, {
1236
+ let l = p === "evaluate" && f && f[e], d = /* @__PURE__ */ O(pt, {
1236
1237
  ref: (e) => {
1237
1238
  this.mqStatic = e || this.mqStatic;
1238
1239
  },
@@ -1244,17 +1245,17 @@ var Et = {
1244
1245
  onSubFieldFocus: this.onSubFieldFocus,
1245
1246
  onBlur: this.onBlur
1246
1247
  });
1247
- return /* @__PURE__ */ D(dt, {
1248
+ return /* @__PURE__ */ O(ft, {
1248
1249
  ref: a,
1249
- $incorrect: !v && !l && !n,
1250
- $correct: !v && (l || n),
1251
- $showCorrectness: !v && s && o && !c,
1252
- $correctAnswerShown: n,
1253
- children: /* @__PURE__ */ D(r, {
1250
+ $incorrect: !_ && !l && !r,
1251
+ $correct: !_ && (l || r),
1252
+ $showCorrectness: !_ && s && o && !c,
1253
+ $correctAnswerShown: r,
1254
+ children: /* @__PURE__ */ O(t, {
1254
1255
  ref: (e) => this.setTooltipRef(e),
1255
1256
  enterTouchDelay: 0,
1256
1257
  interactive: !0,
1257
- open: t === `r${e}`,
1258
+ open: n === `r${e}`,
1258
1259
  slotProps: {
1259
1260
  popper: {
1260
1261
  container: a?.current || void 0,
@@ -1274,7 +1275,7 @@ var Et = {
1274
1275
  name: "flip",
1275
1276
  enabled: !1
1276
1277
  },
1277
- Et
1278
+ Dt
1278
1279
  ]
1279
1280
  },
1280
1281
  tooltip: { sx: {
@@ -1287,46 +1288,46 @@ var Et = {
1287
1288
  boxShadow: "none"
1288
1289
  } }
1289
1290
  },
1290
- title: Object.keys(i.answers).map((e) => e === t && !(n || s) && /* @__PURE__ */ D(pt, {
1291
+ title: Object.keys(i.answers).map((e) => e === n && !(r || s) && /* @__PURE__ */ O(mt, {
1291
1292
  "data-keypad": !0,
1292
- style: { width: Ct(y, u) },
1293
- children: /* @__PURE__ */ D(_, {
1293
+ style: { width: wt(y, u) },
1294
+ children: /* @__PURE__ */ O(v, {
1294
1295
  additionalKeys: y,
1295
- mode: u || yt,
1296
+ mode: u || bt,
1296
1297
  onClick: this.onClick
1297
1298
  })
1298
1299
  }, e) || null),
1299
- children: D(x ? mt : "div", { children: d })
1300
+ children: O(x ? ht : "div", { children: d })
1300
1301
  })
1301
1302
  });
1302
1303
  }
1303
1304
  }) });
1304
1305
  };
1305
1306
  render() {
1306
- let { model: e } = this.props, { showCorrect: t } = this.state, { prompt: n, env: { mode: r, role: i } = {}, extraCSSRules: a, correctness: o, responses: s, language: c, showNote: l, note: u } = e || {}, d = !C(s) && o && o.correctness !== "correct", f = (t || r === "view" && i === "instructor") && l && u;
1307
- return /* @__PURE__ */ D(ot, {
1308
- extraCSSRules: a,
1307
+ let { model: e } = this.props, { showCorrect: t } = this.state, { prompt: n, env: { mode: i, role: a } = {}, extraCSSRules: o, correctness: s, responses: c, language: l, showNote: u, note: d } = e || {}, f = !w(c) && s && s.correctness !== "correct", p = (t || i === "view" && a === "instructor") && u && d;
1308
+ return /* @__PURE__ */ O(st, {
1309
+ extraCSSRules: o,
1309
1310
  ref: (e) => {
1310
1311
  let t = te.findDOMNode(e);
1311
1312
  this.root = t || this.root;
1312
1313
  },
1313
- children: /* @__PURE__ */ O(st, { children: [
1314
- r === "gather" && /* @__PURE__ */ D(ht, { children: Q.t("mathInline.mathEquationResponseQuestion", { lng: c }) }),
1315
- /* @__PURE__ */ D(st, { children: d && /* @__PURE__ */ D(_t, {
1316
- language: c,
1314
+ children: /* @__PURE__ */ k(ct, { children: [
1315
+ i === "gather" && /* @__PURE__ */ O(gt, { children: Q.t("mathInline.mathEquationResponseQuestion", { lng: l }) }),
1316
+ /* @__PURE__ */ O(ct, { children: f && /* @__PURE__ */ O(vt, {
1317
+ language: l,
1317
1318
  show: !0,
1318
1319
  toggled: t,
1319
1320
  onToggle: this.toggleShowCorrect
1320
1321
  }) }),
1321
1322
  this.renderTeacherInstructions(),
1322
- n && /* @__PURE__ */ D(ct, { children: /* @__PURE__ */ D(Z, { prompt: n }) }),
1323
- /* @__PURE__ */ D(it, {
1323
+ n && /* @__PURE__ */ O(lt, { children: /* @__PURE__ */ O(Z, { prompt: n }) }),
1324
+ /* @__PURE__ */ O(at, {
1324
1325
  false: !0,
1325
1326
  children: this.renderPlayerContent()
1326
1327
  }),
1327
- f && /* @__PURE__ */ D(gt, {
1328
+ p && /* @__PURE__ */ O(_t, {
1328
1329
  className: "note",
1329
- dangerouslySetInnerHTML: { __html: h(u) }
1330
+ dangerouslySetInnerHTML: { __html: r(d) }
1330
1331
  }),
1331
1332
  this.renderRationale()
1332
1333
  ] })
@@ -1334,6 +1335,6 @@ var Et = {
1334
1335
  }
1335
1336
  };
1336
1337
  //#endregion
1337
- export { Dt as t };
1338
+ export { Ot as t };
1338
1339
 
1339
- //# sourceMappingURL=main-CwjSoHLf.js.map
1340
+ //# sourceMappingURL=main-DRW3nE42.js.map