@pie-element/math-templated 8.0.2-next.20261007003844 → 8.0.2

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.
@@ -1,11 +1,11 @@
1
1
  import { s as e } from "./rolldown-runtime-DgMJErsw.js";
2
- import { Ft as t, J as n, K as r, T as i, X as a, Y as o, c as s, d as c, ft as l, i as u, l as d, ot as f, q as p, r as m, t as h, u as g, w as _, y as v } from "./horizontal-keypad-CVfEAxPy.js";
3
- import { _ as y, n as b, r as x, t as S, u as C } from "./dist-BgelMX3V.js";
4
- import w, { useRef as T } from "react";
5
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
2
+ import { It as t, J as n, K as r, T as i, X as a, Y as o, Z as s, c, d as l, i as u, l as d, pt as f, q as p, r as m, st as h, t as g, u as _, w as v, y } from "./horizontal-keypad-BHA2V7Wd.js";
3
+ import { _ as b, n as x, r as S, t as C, u as w } from "./dist-BgelMX3V.js";
4
+ import T, { useRef as E } from "react";
5
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
6
6
  import ee from "react-dom";
7
7
  //#region ../../lib-react/icons/dist/correct-response-icon.js
8
- var O = /* @__PURE__ */ e(t(), 1), te = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ D("svg", {
8
+ var k = /* @__PURE__ */ e(t(), 1), te = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
9
9
  "aria-hidden": "true",
10
10
  focusable: "false",
11
11
  preserveAspectRatio: "xMinYMin meet",
@@ -13,27 +13,27 @@ var O = /* @__PURE__ */ e(t(), 1), te = ({ 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__ */ E("circle", {
16
+ /* @__PURE__ */ D("circle", {
17
17
  cx: "-266",
18
18
  cy: "375.9",
19
19
  r: "14",
20
20
  fill: e
21
21
  }),
22
- /* @__PURE__ */ E("path", {
22
+ /* @__PURE__ */ D("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__ */ E("polygon", {
26
+ /* @__PURE__ */ D("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
  te.propTypes = {
33
- bgFill: O.default.string.isRequired,
34
- fgFill: O.default.string.isRequired
33
+ bgFill: k.default.string.isRequired,
34
+ fgFill: k.default.string.isRequired
35
35
  };
36
- var ne = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
36
+ var ne = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
37
37
  "aria-hidden": "true",
38
38
  focusable: "false",
39
39
  preserveAspectRatio: "xMinYMin meet",
@@ -41,7 +41,7 @@ var ne = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
41
41
  viewBox: "-129.5 127 34 35",
42
42
  style: { enableBackground: "new -129.5 127 34 35" },
43
43
  children: [
44
- /* @__PURE__ */ E("path", {
44
+ /* @__PURE__ */ D("path", {
45
45
  style: {
46
46
  fill: "#D0CAC5",
47
47
  stroke: "#E6E3E0",
@@ -50,7 +50,7 @@ var ne = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("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__ */ E("path", {
53
+ /* @__PURE__ */ D("path", {
54
54
  style: {
55
55
  fill: "#B3ABA4",
56
56
  stroke: "#CDC7C2",
@@ -59,48 +59,48 @@ var ne = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("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__ */ E("circle", {
62
+ /* @__PURE__ */ D("circle", {
63
63
  cx: "-114.2",
64
64
  cy: "143.5",
65
65
  r: "14",
66
66
  fill: e
67
67
  }),
68
- /* @__PURE__ */ E("path", {
68
+ /* @__PURE__ */ D("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__ */ E("polygon", {
72
+ /* @__PURE__ */ D("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
  ne.propTypes = {
79
- bgFill: O.default.string.isRequired,
80
- fgFill: O.default.string.isRequired,
81
- borderFill: O.default.string.isRequired
79
+ bgFill: k.default.string.isRequired,
80
+ fgFill: k.default.string.isRequired,
81
+ borderFill: k.default.string.isRequired
82
82
  };
83
- var re = l("div")(({ size: e }) => ({
83
+ var re = f("div")(({ size: e }) => ({
84
84
  width: e || "25px",
85
85
  height: e || "25px"
86
- })), k = ({ open: e, size: t }) => /* @__PURE__ */ E(re, {
86
+ })), A = ({ open: e, size: t }) => /* @__PURE__ */ D(re, {
87
87
  size: t,
88
- children: e ? /* @__PURE__ */ E(te, {
88
+ children: e ? /* @__PURE__ */ D(te, {
89
89
  bgFill: "#bce2ff",
90
90
  fgFill: "#1a9cff"
91
- }) : /* @__PURE__ */ E(ne, {
91
+ }) : /* @__PURE__ */ D(ne, {
92
92
  bgFill: "white",
93
93
  fgFill: "#1a9cff",
94
94
  borderFill: "#bce2ff"
95
95
  })
96
96
  });
97
- k.propTypes = {
98
- open: O.default.bool,
99
- size: O.default.string
100
- }, k.defaultProps = { open: !1 };
97
+ A.propTypes = {
98
+ open: k.default.bool,
99
+ size: k.default.string
100
+ }, A.defaultProps = { open: !1 };
101
101
  //#endregion
102
102
  //#region ../../lib-react/mask-markup/dist/componentize.js
103
- var ie = /* @__PURE__ */ e(b(), 1), ae = /\{\{(\d+)\}\}/g, oe = (e, t) => e ? { markup: e.replace(ae, (e, n) => `<span data-component="${t}" data-id="${n}"></span>`) } : { markup: "" }, A = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), j = /* @__PURE__ */ A(((e, t) => {
103
+ var ie = /* @__PURE__ */ e(x(), 1), ae = /\{\{(\d+)\}\}/g, oe = (e, t) => e ? { markup: e.replace(ae, (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) => {
104
104
  t.exports = {
105
105
  "border-radius": 1,
106
106
  "border-top-left-radius": 1,
@@ -127,10 +127,10 @@ var ie = /* @__PURE__ */ e(b(), 1), ae = /\{\{(\d+)\}\}/g, oe = (e, t) => e ? {
127
127
  "box-pack": 1
128
128
  };
129
129
  }));
130
- j();
130
+ M();
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 M = /* @__PURE__ */ A(((e, t) => {
133
+ var N = /* @__PURE__ */ j(((e, t) => {
134
134
  t.exports = {
135
135
  animation: 1,
136
136
  "column-count": 1,
@@ -150,19 +150,19 @@ var M = /* @__PURE__ */ A(((e, t) => {
150
150
  rowspan: 1
151
151
  };
152
152
  }));
153
- M();
153
+ N();
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 N = /* @__PURE__ */ A(((e, t) => {
156
+ var P = /* @__PURE__ */ j(((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
- N();
161
+ P();
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 P = /* @__PURE__ */ A(((e, t) => {
165
- var n = N(), r = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, i = typeof document > "u" ? {} : document.documentElement.style;
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;
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 P = /* @__PURE__ */ A(((e, t) => {
179
179
  };
180
180
  })();
181
181
  }));
182
- P();
182
+ F();
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 se = /* @__PURE__ */ A(((e, t) => {
185
+ var se = /* @__PURE__ */ j(((e, t) => {
186
186
  t.exports = /[-\s]+(.)?/g;
187
187
  }));
188
188
  se();
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 F = /* @__PURE__ */ A(((e, t) => {
191
+ var I = /* @__PURE__ */ j(((e, t) => {
192
192
  var n = function(e, t) {
193
193
  return t ? t.toUpperCase() : "";
194
194
  }, r = se();
@@ -196,10 +196,10 @@ var F = /* @__PURE__ */ A(((e, t) => {
196
196
  return e ? e.replace(r, n) : "";
197
197
  };
198
198
  }));
199
- F();
199
+ I();
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 ce = /* @__PURE__ */ A(((e, t) => {
202
+ var ce = /* @__PURE__ */ j(((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,25 +208,25 @@ var ce = /* @__PURE__ */ A(((e, t) => {
208
208
  ce();
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 I = /* @__PURE__ */ A(((e, t) => {
211
+ var L = /* @__PURE__ */ j(((e, t) => {
212
212
  var n = ce();
213
213
  t.exports = function(e) {
214
214
  return n(e).toLowerCase();
215
215
  };
216
216
  }));
217
- I();
217
+ L();
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 le = /* @__PURE__ */ A(((e, t) => {
220
+ var R = /* @__PURE__ */ j(((e, t) => {
221
221
  t.exports = function(e) {
222
222
  return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
223
223
  };
224
224
  }));
225
- le();
225
+ R();
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 ue = /* @__PURE__ */ A(((e, t) => {
229
- var n = F(), r = I(), i = le(), a = N(), o = P(), s = j(), c = typeof document > "u" ? {} : document.documentElement.style;
228
+ var le = /* @__PURE__ */ j(((e, t) => {
229
+ var n = I(), r = L(), i = R(), a = P(), o = F(), s = M(), c = typeof document > "u" ? {} : document.documentElement.style;
230
230
  t.exports = function(e) {
231
231
  return function(t, l) {
232
232
  l ||= {};
@@ -243,45 +243,45 @@ var ue = /* @__PURE__ */ A(((e, t) => {
243
243
  };
244
244
  };
245
245
  }));
246
- ue();
246
+ le();
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 de = /* @__PURE__ */ A(((e, t) => {
250
- t.exports = ue()();
249
+ var ue = /* @__PURE__ */ j(((e, t) => {
250
+ t.exports = le()();
251
251
  }));
252
- de();
252
+ ue();
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 L = /* @__PURE__ */ A(((e, t) => {
255
+ var z = /* @__PURE__ */ j(((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
- L();
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 fe = /* @__PURE__ */ A(((e, t) => {
264
+ var de = /* @__PURE__ */ j(((e, t) => {
265
265
  var n = Object.prototype.toString;
266
266
  t.exports = function(e) {
267
267
  return !!e && n.call(e) === "[object Object]";
268
268
  };
269
269
  }));
270
- fe();
270
+ de();
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 pe = /* @__PURE__ */ A(((e, t) => {
273
+ var fe = /* @__PURE__ */ j(((e, t) => {
274
274
  var n = Object.prototype.toString;
275
275
  t.exports = function(e) {
276
276
  return n.apply(e) === "[object Function]";
277
277
  };
278
278
  }));
279
- pe();
279
+ fe();
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 R = /* @__PURE__ */ A(((e, t) => {
283
- P();
284
- var n = de(), r = I(), i = F(), a = L(), o = fe(), s = pe(), c = function(e, t, r, i) {
282
+ var B = /* @__PURE__ */ j(((e, t) => {
283
+ F();
284
+ var n = ue(), r = L(), i = I(), a = z(), o = de(), s = fe(), 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 R = /* @__PURE__ */ A(((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: M() }, d = function(e, t, n, f) {
295
+ }, u = { cssUnitless: N() }, 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 R = /* @__PURE__ */ A(((e, t) => {
321
321
  };
322
322
  t.exports = d;
323
323
  }));
324
- R();
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 z = /* @__PURE__ */ A(((e, t) => {
328
- var n = R(), r = L();
327
+ var pe = /* @__PURE__ */ j(((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;
@@ -333,25 +333,25 @@ var z = /* @__PURE__ */ A(((e, t) => {
333
333
  return i.join("; ");
334
334
  };
335
335
  }));
336
- z();
336
+ pe();
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 B = /* @__PURE__ */ A(((e, t) => {
339
+ var me = /* @__PURE__ */ j(((e, t) => {
340
340
  t.exports = {
341
- prefixProperties: j(),
342
- cssUnitless: M(),
343
- object: R(),
344
- string: z()
341
+ prefixProperties: M(),
342
+ cssUnitless: N(),
343
+ object: B(),
344
+ string: pe()
345
345
  };
346
346
  }));
347
- B();
347
+ me();
348
348
  //#endregion
349
349
  //#region ../../lib-react/mask-markup/dist/serialization.js
350
- var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = ["span"], _e = [
350
+ var he = me(), ge = (0, ie.default)("@pie-lib:mask-markup:serialization"), _e = ["span"], ve = [
351
351
  "em",
352
352
  "strong",
353
353
  "u"
354
- ], ve = 3, ye = 8, be = 1, xe = (e) => {
354
+ ], ye = 3, be = 8, xe = 1, Se = (e) => {
355
355
  if (!e.attributes || e.attributes.length <= 0) return;
356
356
  let t = {}, n;
357
357
  for (n = 0; n < e.attributes.length; n++) {
@@ -359,31 +359,31 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
359
359
  t[r.name] = r.value;
360
360
  }
361
361
  return t;
362
- }, Se = (e) => ge.includes(e) ? "inline" : _e.includes(e) ? "mark" : "block", Ce = (e) => {
362
+ }, Ce = (e) => _e.includes(e) ? "inline" : ve.includes(e) ? "mark" : "block", we = (e) => {
363
363
  let t = /([\w-]*)\s*:\s*([^;]*)/g, n, r = {};
364
364
  for (; n = t.exec(e);) r[n[1]] = n[2].trim();
365
365
  return r;
366
- }, we = (e) => (0, me.object)(e, {
366
+ }, Te = (e) => (0, he.object)(e, {
367
367
  camelize: !0,
368
368
  addUnits: !1
369
- }), Te = (e, t) => we(Ce(e.getAttribute(t))), Ee = (e, t, n) => {
369
+ }), Ee = (e, t) => Te(we(e.getAttribute(t))), De = (e, t, n) => {
370
370
  let r = e.getAttribute(n);
371
371
  return delete t.class, r;
372
- }, De = (e) => (t, n) => {
372
+ }, Oe = (e) => (t, n) => {
373
373
  if (!e.getAttribute) return t;
374
374
  if (e.getAttribute(n)) switch (n) {
375
375
  case "style":
376
- t.style = Te(e, n);
376
+ t.style = Ee(e, n);
377
377
  break;
378
378
  case "class":
379
- t.className = Ee(e, t, n);
379
+ t.className = De(e, t, n);
380
380
  break;
381
381
  default:
382
382
  t[n] = e.getAttribute(n);
383
383
  break;
384
384
  }
385
385
  return t;
386
- }, Oe = [
386
+ }, ke = [
387
387
  "border",
388
388
  "class",
389
389
  "style"
@@ -394,9 +394,9 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
394
394
  s: "strikethrough",
395
395
  code: "code",
396
396
  strong: "strong"
397
- }, ke = (e, t = []) => {
398
- if (e.nodeType === ye) return null;
399
- if (e.nodeType === ve) {
397
+ }, Ae = (e, t = []) => {
398
+ if (e.nodeType === be) return null;
399
+ if (e.nodeType === ye) {
400
400
  let n = { text: e.textContent };
401
401
  return t.length > 0 && (n.marks = t.map((e) => ({
402
402
  type: e,
@@ -406,9 +406,9 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
406
406
  leaves: [n]
407
407
  };
408
408
  }
409
- if (e.nodeType === be) {
409
+ if (e.nodeType === xe) {
410
410
  let n = e.tagName.toLowerCase(), r = V[n];
411
- if (r) return he("[deserialize] mark: ", r), {
411
+ if (r) return ge("[deserialize] mark: ", r), {
412
412
  _flatten: !0,
413
413
  nodes: H(e.childNodes, [...t, r])
414
414
  };
@@ -416,9 +416,9 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
416
416
  isMath: !0,
417
417
  nodes: [e]
418
418
  };
419
- let i = xe(e) || {};
419
+ let i = Se(e) || {};
420
420
  n === "audio" && i.controls === "" && (i.controls = !0);
421
- let a = Oe.reduce(De(e), { ...i }), o = Se(n), s = H(e.childNodes, t);
421
+ let a = ke.reduce(Oe(e), { ...i }), o = Ce(n), s = H(e.childNodes, t);
422
422
  return {
423
423
  object: o,
424
424
  type: n,
@@ -433,11 +433,11 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
433
433
  }, H = (e, t = []) => {
434
434
  let n = [];
435
435
  for (let r = 0; r < e.length; r++) {
436
- let i = ke(e[r], t);
436
+ let i = Ae(e[r], t);
437
437
  i !== null && (i._flatten && i.nodes ? n.push(...i.nodes) : n.push(i));
438
438
  }
439
439
  return n;
440
- }, Ae = (e) => {
440
+ }, je = (e) => {
441
441
  if (!e || !e.trim()) return {
442
442
  object: "value",
443
443
  document: {
@@ -473,71 +473,71 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
473
473
  nodes: t
474
474
  }
475
475
  };
476
- }, je = l("div")(({ theme: e }) => ({
476
+ }, Me = f("div")(({ theme: e }) => ({
477
477
  paddingTop: e.spacing(.5),
478
478
  paddingBottom: e.spacing(.5)
479
- })), Me = l("span")(() => ({
479
+ })), Ne = f("span")(() => ({
480
480
  display: "inline-block",
481
481
  width: ".75em"
482
- })), Ne = ["tbody", "tr"], Pe = (e, t) => {
482
+ })), Pe = ["tbody", "tr"], Fe = (e, t) => {
483
483
  let n = t.trim() === "", r = e && e.type;
484
- if (!(n && Ne.includes(r))) return t;
485
- }, Fe = (e) => {
486
- let t = e.leaves.find((e) => C(e, "marks", []).length);
484
+ if (!(n && Pe.includes(r))) return t;
485
+ }, Ie = (e) => {
486
+ let t = e.leaves.find((e) => w(e, "marks", []).length);
487
487
  return t ? t.marks : null;
488
- }, Ie = (e, t, n, r, i, a) => {
488
+ }, U = (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__ */ E("span", { dangerouslySetInnerHTML: { __html: `<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__ */ E(Me, {}, `spacer-${s}-before`)), o.push(a), t && o.push(/* @__PURE__ */ E(Me, {}, `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__ */ D("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__ */ D(Ne, {}, `spacer-${c}-before`)), s.push(r), t && s.push(/* @__PURE__ */ D(Ne, {}, `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 = Pe(i, n);
504
+ let n = t.text, r = Fe(a, n);
505
505
  return r ? e + r : e;
506
- }, ""), n = Fe(e);
506
+ }, ""), n = Ie(e);
507
507
  if (n?.length > 0) {
508
508
  let e = n.map((e) => Object.keys(V).find((t) => V[t] === e.type)).filter(Boolean);
509
- e.length > 0 ? o.push(e.reduceRight((e, t, n) => /* @__PURE__ */ E(t, { children: e }, `${c}-${t}-${n}`), t)) : o.push(t);
510
- } else t.length > 0 && o.push(t);
509
+ e.length > 0 ? s.push(e.reduceRight((e, t, n) => /* @__PURE__ */ D(t, { children: e }, `${l}-${t}-${n}`), t)) : s.push(t);
510
+ } else t.length > 0 && s.push(t);
511
511
  } else {
512
- let i = Ie(e, t, n, r, e, a);
513
- if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ E(je, { children: i }, c));
512
+ let r = U(e, t, n, i, e, o);
513
+ if (e.type === "p" || e.type === "paragraph") s.push(/* @__PURE__ */ D(Me, { children: r }, l));
514
514
  else {
515
515
  let t = e.type;
516
- e.nodes && e.nodes.length > 0 ? o.push(/* @__PURE__ */ E(t, {
516
+ e.nodes && e.nodes.length > 0 ? s.push(/* @__PURE__ */ D(t, {
517
517
  ...e.data.attributes,
518
- children: i
519
- }, c)) : o.push(/* @__PURE__ */ E(t, { ...e.data.attributes }, c));
518
+ children: r
519
+ }, l)) : s.push(/* @__PURE__ */ D(t, { ...e.data.attributes }, l));
520
520
  }
521
521
  }
522
- }), o;
523
- }, Le = l("div")(() => ({
522
+ }), s;
523
+ }, Le = 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
- })), Re = class extends w.Component {
530
+ })), Re = class extends T.Component {
531
531
  constructor(e) {
532
- super(e), this.internalContainerRef = w.createRef();
532
+ super(e), this.internalContainerRef = T.createRef();
533
533
  }
534
534
  static propTypes = {
535
- renderChildren: O.default.func,
536
- layout: O.default.object,
537
- value: O.default.object,
538
- onChange: O.default.func,
539
- elementType: O.default.string,
540
- containerRef: O.default.oneOfType([O.default.func, O.default.shape({ current: O.default.instanceOf(Element) })])
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) })])
541
541
  };
542
542
  componentDidMount() {
543
543
  let e = this.props.containerRef || this.internalContainerRef;
@@ -551,39 +551,39 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
551
551
  this.props.onChange(n);
552
552
  };
553
553
  render() {
554
- let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = Ie(t, e, this.handleChange, this.props.renderChildren, null, n);
555
- return /* @__PURE__ */ E(Le, {
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(Le, {
556
556
  ref: r || this.internalContainerRef,
557
557
  children: i
558
558
  });
559
559
  }
560
560
  }, ze = (e, t) => {
561
561
  let { markup: n } = oe(e, t);
562
- return Ae(n).document;
563
- }, Be = ((e, t) => class extends w.Component {
562
+ return je(r(n)).document;
563
+ }, Be = ((e, t) => class extends T.Component {
564
564
  static propTypes = {
565
- markup: O.default.string,
566
- layout: O.default.object,
567
- value: O.default.object,
568
- onChange: O.default.func,
569
- customMarkMarkupComponent: O.default.func,
570
- elementType: O.default.string
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
571
571
  };
572
572
  constructor(e) {
573
- super(e), this.containerRef = w.createRef();
573
+ super(e), this.containerRef = T.createRef();
574
574
  }
575
575
  componentDidUpdate(e) {
576
576
  if (this.props.markup !== e.markup) {
577
577
  let e = this.containerRef.current;
578
578
  (e && e.querySelectorAll("[data-latex][data-math-handled=\"true\"]") || []).forEach((e) => {
579
579
  let t = e.querySelector("mjx-container");
580
- t && e.removeChild(t), e.innerHTML = e.getAttribute("data-raw"), e.removeAttribute("data-math-handled");
580
+ t && e.removeChild(t), e.textContent = e.getAttribute("data-raw"), e.removeAttribute("data-math-handled");
581
581
  });
582
582
  }
583
583
  }
584
584
  render() {
585
585
  let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || ze(n, e);
586
- return /* @__PURE__ */ E(Re, {
586
+ return /* @__PURE__ */ D(Re, {
587
587
  containerRef: this.containerRef,
588
588
  elementType: o,
589
589
  layout: s,
@@ -595,7 +595,7 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
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
- }), Ve = "height ease-in 300ms, opacity ease-in 300ms", He = l("div")(() => ({
598
+ }), Ve = "height ease-in 300ms, opacity ease-in 300ms", He = f("div")(() => ({
599
599
  position: "relative",
600
600
  height: 0,
601
601
  overflow: "hidden",
@@ -630,8 +630,8 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
630
630
  width: 0
631
631
  }
632
632
  })), Ue = (e) => {
633
- let { show: t, children: n, className: r } = e, i = T(null);
634
- return /* @__PURE__ */ E(f, {
633
+ let { show: t, children: n, className: r } = e, i = E(null);
634
+ return /* @__PURE__ */ D(h, {
635
635
  nodeRef: i,
636
636
  in: t,
637
637
  appear: !0,
@@ -643,7 +643,7 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
643
643
  exit: "exit",
644
644
  exitDone: "exit-done"
645
645
  },
646
- children: /* @__PURE__ */ E(He, {
646
+ children: /* @__PURE__ */ D(He, {
647
647
  ref: i,
648
648
  className: r,
649
649
  children: n
@@ -651,29 +651,29 @@ var me = B(), he = (0, ie.default)("@pie-lib:mask-markup:serialization"), ge = [
651
651
  });
652
652
  };
653
653
  Ue.propTypes = {
654
- show: O.default.bool.isRequired,
655
- className: O.default.string,
656
- children: O.default.oneOfType([O.default.arrayOf(O.default.node), O.default.node]).isRequired
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
657
657
  };
658
658
  //#endregion
659
659
  //#region ../../lib-react/correct-answer-toggle/dist/index.js
660
- function U(e) {
660
+ function W(e) {
661
661
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
662
662
  }
663
663
  function We(e, t) {
664
- return !e || U(e) ? e : U(e.default) ? e.default : t && U(e[t]) ? e[t] : t && U(e[t]?.default) ? e[t].default : e;
664
+ return !e || W(e) ? e : W(e.default) ? e.default : t && W(e[t]) ? e[t] : t && W(e[t]?.default) ? e[t].default : e;
665
665
  }
666
- var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.default, qe = W && typeof W == "object" ? W : Ke, { translator: G } = S, Je = {
666
+ var Ge = We(_, "Readable") || We(qe.Readable, "Readable"), Ke = u, G = Ke.default, qe = G && typeof G == "object" ? G : Ke, { translator: K } = C, Je = {
667
667
  WebkitTouchCallout: "none",
668
668
  WebkitUserSelect: "none",
669
669
  KhtmlUserSelect: "none",
670
670
  MozUserSelect: "none",
671
671
  msUserSelect: "none",
672
672
  userSelect: "none"
673
- }, Ye = l("div")(() => ({
673
+ }, Ye = f("div")(() => ({
674
674
  width: "100%",
675
675
  cursor: "pointer"
676
- })), Xe = l("button")(() => ({
676
+ })), Xe = f("button")(() => ({
677
677
  margin: "0 auto",
678
678
  textAlign: "center",
679
679
  display: "flex",
@@ -686,18 +686,18 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
686
686
  font: "inherit",
687
687
  cursor: "pointer",
688
688
  "&:focus-visible": {
689
- outline: `2px solid ${r.buttonFocusOutline()}`,
689
+ outline: `2px solid ${p.buttonFocusOutline()}`,
690
690
  outlineOffset: "-2px"
691
691
  }
692
- })), Ze = l("div")(() => ({
692
+ })), Ze = f("div")(() => ({
693
693
  width: "fit-content",
694
694
  minWidth: "140px",
695
695
  alignSelf: "center",
696
696
  verticalAlign: "middle",
697
- color: `var(--correct-answer-toggle-label-color, ${r.text()})`,
697
+ color: `var(--correct-answer-toggle-label-color, ${p.text()})`,
698
698
  fontWeight: "normal",
699
699
  ...Je
700
- })), Qe = l("div")(() => ({
700
+ })), Qe = f("div")(() => ({
701
701
  position: "absolute",
702
702
  width: "25px",
703
703
  "&.enter": { opacity: "0" },
@@ -710,20 +710,20 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
710
710
  opacity: "0",
711
711
  transition: "opacity 0.3s ease-in"
712
712
  }
713
- })), $e = l("div")(() => ({
713
+ })), $e = f("div")(() => ({
714
714
  width: "25px",
715
715
  marginRight: "5px",
716
716
  display: "flex",
717
717
  alignItems: "center"
718
- })), et = class e extends w.Component {
718
+ })), et = class e extends T.Component {
719
719
  static propTypes = {
720
- onToggle: O.default.func,
721
- toggled: O.default.bool,
722
- show: O.default.bool,
723
- hideMessage: O.default.string,
724
- showMessage: O.default.string,
725
- className: O.default.string,
726
- language: O.default.string
720
+ onToggle: k.default.func,
721
+ toggled: k.default.bool,
722
+ show: k.default.bool,
723
+ hideMessage: k.default.string,
724
+ showMessage: k.default.string,
725
+ className: k.default.string,
726
+ language: k.default.string
727
727
  };
728
728
  static defaultProps = {
729
729
  showMessage: "Show correct answer",
@@ -732,10 +732,10 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
732
732
  toggled: !1
733
733
  };
734
734
  constructor(t) {
735
- super(t), this.state = { show: t.show }, this.openIconRef = w.createRef(), this.closedIconRef = w.createRef(), e.defaultProps = {
735
+ super(t), this.state = { show: t.show }, this.openIconRef = T.createRef(), this.closedIconRef = T.createRef(), e.defaultProps = {
736
736
  ...e.defaultProps,
737
- showMessage: G.t("common:showCorrectAnswer", { lng: t.language }),
738
- hideMessage: G.t("common:hideCorrectAnswer", { lng: t.language })
737
+ showMessage: K.t("common:showCorrectAnswer", { lng: t.language }),
738
+ hideMessage: K.t("common:hideCorrectAnswer", { lng: t.language })
739
739
  };
740
740
  }
741
741
  onClick() {
@@ -747,22 +747,22 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
747
747
  UNSAFE_componentWillReceiveProps(t) {
748
748
  this.setState({ show: t.show }), t.language !== this.props?.language && (e.defaultProps = {
749
749
  ...e.defaultProps,
750
- showMessage: G.t("common:showCorrectAnswer", { lng: t.language }),
751
- hideMessage: G.t("common:hideCorrectAnswer", { lng: t.language })
750
+ showMessage: K.t("common:showCorrectAnswer", { lng: t.language }),
751
+ hideMessage: K.t("common:hideCorrectAnswer", { lng: t.language })
752
752
  });
753
753
  }
754
754
  render() {
755
755
  let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
756
- return /* @__PURE__ */ E(Ye, {
756
+ return /* @__PURE__ */ D(Ye, {
757
757
  className: e,
758
- children: /* @__PURE__ */ E(Ue, {
758
+ children: /* @__PURE__ */ D(Ue, {
759
759
  show: this.state.show,
760
- children: /* @__PURE__ */ D(Xe, {
760
+ children: /* @__PURE__ */ O(Xe, {
761
761
  type: "button",
762
762
  "aria-pressed": !!t,
763
763
  onClick: this.onClick.bind(this),
764
764
  onTouchEnd: this.onTouch.bind(this),
765
- children: [/* @__PURE__ */ D($e, { children: [/* @__PURE__ */ E(f, {
765
+ children: [/* @__PURE__ */ O($e, { children: [/* @__PURE__ */ D(h, {
766
766
  nodeRef: this.openIconRef,
767
767
  timeout: 400,
768
768
  in: t,
@@ -773,11 +773,11 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
773
773
  exit: "exit",
774
774
  exitActive: "exit-active"
775
775
  },
776
- children: /* @__PURE__ */ E(Qe, {
776
+ children: /* @__PURE__ */ D(Qe, {
777
777
  ref: this.openIconRef,
778
- children: /* @__PURE__ */ E(k, { open: t }, "correct-open")
778
+ children: /* @__PURE__ */ D(A, { open: t }, "correct-open")
779
779
  })
780
- }), /* @__PURE__ */ E(f, {
780
+ }), /* @__PURE__ */ D(h, {
781
781
  nodeRef: this.closedIconRef,
782
782
  timeout: 5e3,
783
783
  in: !t,
@@ -788,13 +788,13 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
788
788
  exit: "exit",
789
789
  exitActive: "exit-active"
790
790
  },
791
- children: /* @__PURE__ */ E(Qe, {
791
+ children: /* @__PURE__ */ D(Qe, {
792
792
  ref: this.closedIconRef,
793
- children: /* @__PURE__ */ E(k, { open: t }, "correct-closed")
793
+ children: /* @__PURE__ */ D(A, { open: t }, "correct-closed")
794
794
  })
795
- })] }), /* @__PURE__ */ E(Ge, {
795
+ })] }), /* @__PURE__ */ D(Ge, {
796
796
  false: !0,
797
- children: /* @__PURE__ */ E(Ze, {
797
+ children: /* @__PURE__ */ D(Ze, {
798
798
  "aria-hidden": !this.state.show,
799
799
  children: t ? n : r
800
800
  })
@@ -806,22 +806,22 @@ var Ge = We(g, "Readable") || We(qe.Readable, "Readable"), Ke = u, W = Ke.defaul
806
806
  };
807
807
  //#endregion
808
808
  //#region src/delivery/main.tsx
809
- function K(e) {
809
+ function q(e) {
810
810
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
811
811
  }
812
- function q(e, t) {
813
- return !e || K(e) ? e : K(e.default) ? e.default : t && K(e[t]) ? e[t] : t && K(e[t]?.default) ? e[t].default : e;
812
+ function J(e, t) {
813
+ 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;
814
814
  }
815
- var tt = q(v, "UiLayout") || q(X.UiLayout, "UiLayout"), J = q(c, "PreviewPrompt") || q(X.PreviewPrompt, "PreviewPrompt"), nt = q(g, "Readable") || q(X.Readable, "Readable"), rt = q(_, "Collapsible") || q(X.Collapsible, "Collapsible"), it = u, Y = it.default, X = Y && typeof Y == "object" ? Y : it, { translator: Z } = S, at = l(tt)({
816
- color: r.text(),
817
- backgroundColor: r.background(),
815
+ var tt = J(y, "UiLayout") || J(Z.UiLayout, "UiLayout"), Y = J(l, "PreviewPrompt") || J(Z.PreviewPrompt, "PreviewPrompt"), nt = J(_, "Readable") || J(Z.Readable, "Readable"), rt = J(v, "Collapsible") || J(Z.Collapsible, "Collapsible"), it = u, X = it.default, Z = X && typeof X == "object" ? X : it, { translator: Q } = C, at = f(tt)({
816
+ color: p.text(),
817
+ backgroundColor: p.background(),
818
818
  display: "inline-block"
819
- }), Q = l("div")({
819
+ }), ot = f("div")({
820
820
  width: "100%",
821
821
  position: "relative",
822
- backgroundColor: r.background(),
823
- color: r.text()
824
- }), ot = l("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), st = l("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ct = l("div")({
822
+ backgroundColor: p.background(),
823
+ color: p.text()
824
+ }), st = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ct = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), lt = f("div")({
825
825
  position: "relative",
826
826
  "& > div > div": {
827
827
  display: "flex",
@@ -856,12 +856,12 @@ var tt = q(v, "UiLayout") || q(X.UiLayout, "UiLayout"), J = q(c, "PreviewPrompt"
856
856
  paddingTop: "1.5px !important"
857
857
  },
858
858
  "& .mq-parallelogram": { lineHeight: .85 }
859
- }), lt = l("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: i, $correctAnswerShown: a }) => ({
859
+ }), ut = f("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: r, $correctAnswerShown: i }) => ({
860
860
  maxWidth: "fit-content",
861
- ...t && { borderColor: `${r.incorrect()} !important` },
862
- ...n && { borderColor: `${r.correct()} !important` },
863
- ...i && { border: "2px solid" },
864
- ...a && {
861
+ ...t && { borderColor: `${p.incorrect()} !important` },
862
+ ...n && { borderColor: `${p.correct()} !important` },
863
+ ...r && { border: "2px solid" },
864
+ ...i && {
865
865
  padding: e.spacing(1),
866
866
  letterSpacing: "0.5px"
867
867
  },
@@ -872,22 +872,22 @@ var tt = q(v, "UiLayout") || q(X.UiLayout, "UiLayout"), J = q(c, "PreviewPrompt"
872
872
  } },
873
873
  "& sup": { top: 0 }
874
874
  }
875
- })), ut = l(m.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: r.text() } } }), dt = l("div")(({ theme: e }) => ({
875
+ })), dt = f(m.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: p.text() } } }), ft = f("div")(({ theme: e }) => ({
876
876
  zIndex: 10,
877
877
  minWidth: "400px",
878
878
  marginTop: e.spacing(2)
879
- })), ft = l("div")(({ theme: e }) => ({
879
+ })), pt = f("div")(({ theme: e }) => ({
880
880
  marginBottom: e.spacing(1),
881
881
  pointerEvents: "none"
882
- })), pt = l("h2")({
882
+ })), mt = f("h2")({
883
883
  position: "absolute",
884
884
  left: "-10000px",
885
885
  top: "auto",
886
886
  width: "1px",
887
887
  height: "1px",
888
888
  overflow: "hidden"
889
- }), mt = l("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ht = l(et)(({ theme: e }) => ({
890
- color: r.text(),
889
+ }), ht = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), gt = f(et)(({ theme: e }) => ({
890
+ color: p.text(),
891
891
  marginBottom: e.spacing(2)
892
892
  }));
893
893
  if (typeof document < "u") {
@@ -912,8 +912,8 @@ if (typeof document < "u") {
912
912
  border-right: 2px solid #bdbdbd !important;
913
913
  }
914
914
  .block-math {
915
- color: ${r.text()};
916
- background-color: ${r.background()};
915
+ color: ${p.text()};
916
+ background-color: ${p.background()};
917
917
  padding: 4px !important;
918
918
  display: flex;
919
919
  align-items: center;
@@ -924,16 +924,16 @@ if (typeof document < "u") {
924
924
  display: none;
925
925
  }
926
926
  .correct {
927
- border-color: ${r.correct()} !important;
927
+ border-color: ${p.correct()} !important;
928
928
  }
929
929
  .incorrect {
930
- border-color: ${r.incorrect()} !important;
930
+ border-color: ${p.incorrect()} !important;
931
931
  }
932
932
  `, document.head.appendChild(t);
933
933
  }
934
934
  }
935
- var gt = !1, $ = /(\{\{\d+\}\})/gm, _t = 6, vt = 8, yt = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
936
- function bt(e = []) {
935
+ var _t = !1, $ = /(\{\{\d+\}\})/gm, vt = 6, yt = 8, bt = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
936
+ function xt(e = []) {
937
937
  return e.map((e) => ({
938
938
  name: e,
939
939
  latex: e,
@@ -941,17 +941,17 @@ function bt(e = []) {
941
941
  label: e
942
942
  }));
943
943
  }
944
- function xt(e = [], t) {
944
+ function St(e = [], t) {
945
945
  return Math.floor(e.length / 5) * 30 + (t === "miscellaneous" ? 600 : 500);
946
946
  }
947
- function St(e) {
947
+ function Ct(e) {
948
948
  return e.split($).filter((e) => e);
949
949
  }
950
- function Ct(e, t) {
950
+ function wt(e, t) {
951
951
  let { responses: n, disabled: r, markup: i, printMode: a, alwaysShowCorrect: o } = e || {};
952
- if (i) return t.showCorrect ? Object.keys(n || {}).reduce((e, t) => (e[t] = n?.[t]?.answer, e), {}) : St(i).reduce((e, n) => {
952
+ if (i) return t.showCorrect ? Object.keys(n || {}).reduce((e, t) => (e[t] = n?.[t]?.answer, e), {}) : Ct(i).reduce((e, n) => {
953
953
  if (n.match($)) {
954
- let i = Tt.getResponseKey(n), s = t.session.answers[`r${i}`];
954
+ let i = Et.getResponseKey(n), s = t.session.answers[`r${i}`];
955
955
  if (a && !o) {
956
956
  let t = "\\ \\ ".repeat(30) + "\\embed{newLine}[] ";
957
957
  return {
@@ -970,7 +970,7 @@ function Ct(e, t) {
970
970
  return e;
971
971
  }, {});
972
972
  }
973
- var wt = {
973
+ var Tt = {
974
974
  name: "smartHorizontalPlacement",
975
975
  enabled: !0,
976
976
  phase: "main",
@@ -978,15 +978,15 @@ var wt = {
978
978
  fn: ({ state: e }) => {
979
979
  let t = e.modifiersData.popperOffsets;
980
980
  if (!t) return;
981
- 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 + vt, d = l + n - r - vt;
981
+ 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 + yt, d = l + n - r - yt;
982
982
  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);
983
983
  }
984
- }, Tt = class e extends w.Component {
984
+ }, Et = class e extends T.Component {
985
985
  static getResponseKey = (e) => (e || "").replaceAll("{{", "").replaceAll("}}", "");
986
986
  static propTypes = {
987
- session: O.default.object.isRequired,
988
- onSessionChange: O.default.func,
989
- model: O.default.object.isRequired
987
+ session: k.default.object.isRequired,
988
+ onSessionChange: k.default.func,
989
+ model: k.default.object.isRequired
990
990
  };
991
991
  constructor(t) {
992
992
  super(t);
@@ -1001,11 +1001,11 @@ var wt = {
1001
1001
  },
1002
1002
  activeAnswerBlock: "",
1003
1003
  showCorrect: o || !1,
1004
- tooltipContainerRef: w.createRef()
1004
+ tooltipContainerRef: T.createRef()
1005
1005
  };
1006
1006
  }
1007
1007
  UNSAFE_componentWillMount() {
1008
- typeof window < "u" && (gt ||= (n("answerBlock", (e) => ({
1008
+ typeof window < "u" && (_t ||= (o("answerBlock", (e) => ({
1009
1009
  htmlString: `<div class="block-container">
1010
1010
  <div class="block-response" data-answer-block-index="${e}">R</div>
1011
1011
  <div class="block-math">
@@ -1017,12 +1017,12 @@ var wt = {
1017
1017
  })), !0));
1018
1018
  }
1019
1019
  handleAnswerBlockDomUpdate = () => {
1020
- let { model: e } = this.props, { session: t, showCorrect: n } = this.state, r = t.answers;
1021
- this.root && e.disabled && !n && Object.keys(r).forEach((t) => {
1022
- let n = this.root.querySelector(`[data-answer-block="${t}"]`), i = this.root.querySelector(`[data-answer-block-index="${t}"]`);
1023
- if (n) {
1024
- let a = r[t];
1025
- p(n, a && a.value || ""), e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
1020
+ let { model: e } = this.props, { session: t, showCorrect: r } = this.state, a = t.answers;
1021
+ this.root && e.disabled && !r && Object.keys(a).forEach((t) => {
1022
+ let r = this.root.querySelector(`[data-answer-block="${t}"]`), i = this.root.querySelector(`[data-answer-block-index="${t}"]`);
1023
+ if (r) {
1024
+ let o = a[t];
1025
+ n(r, o && o.value || ""), e.view && (r.parentElement.parentElement.classList.remove("correct"), r.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
1026
1026
  }
1027
1027
  }), i(this.root);
1028
1028
  };
@@ -1033,7 +1033,7 @@ var wt = {
1033
1033
  showCorrect: !1
1034
1034
  })), c && this.setState({ showCorrect: !0 });
1035
1035
  let u = i.match($), d = o.match($);
1036
- if (!y(u, d)) {
1036
+ if (!b(u, d)) {
1037
1037
  let t = {}, n = this.state.session.answers;
1038
1038
  (d || []).forEach((r) => {
1039
1039
  let i = e.getResponseKey(r), a = n && n[`r${i}`];
@@ -1047,7 +1047,7 @@ var wt = {
1047
1047
  }
1048
1048
  }
1049
1049
  shouldComponentUpdate(e, t) {
1050
- let n = y(this.props.model, e.model), r = y(this.state, t);
1050
+ let n = b(this.props.model, e.model), r = b(this.state, t);
1051
1051
  return !n || !r;
1052
1052
  }
1053
1053
  componentDidMount() {
@@ -1114,7 +1114,7 @@ var wt = {
1114
1114
  this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
1115
1115
  };
1116
1116
  subFieldChanged = (e, t) => {
1117
- o(), e && this.setState((n) => ({ session: {
1117
+ a(), e && this.setState((n) => ({ session: {
1118
1118
  ...n.session,
1119
1119
  answers: {
1120
1120
  ...n.session.answers,
@@ -1146,43 +1146,43 @@ var wt = {
1146
1146
  };
1147
1147
  setTooltipRef(e) {
1148
1148
  setTimeout(() => {
1149
- if (e && yt) {
1149
+ if (e && bt) {
1150
1150
  let e = document.querySelector("[role='tooltip']");
1151
1151
  e && e.firstChild.setAttribute("tabindex", "-1");
1152
1152
  }
1153
1153
  }, 1);
1154
1154
  }
1155
1155
  renderTeacherInstructions = () => {
1156
- let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (d(t) || s(t)), i = /* @__PURE__ */ E(J, {
1156
+ let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (d(t) || c(t)), i = /* @__PURE__ */ D(Y, {
1157
1157
  defaultClassName: "teacher-instructions",
1158
1158
  prompt: t
1159
1159
  });
1160
- return r && /* @__PURE__ */ E(st, { children: n ? i : /* @__PURE__ */ E(rt, {
1160
+ return r && /* @__PURE__ */ D(ct, { children: n ? i : /* @__PURE__ */ D(rt, {
1161
1161
  labels: {
1162
- hidden: Z.t("common:showTeacherInstructions", { lng: e?.language }),
1163
- visible: Z.t("common:hideTeacherInstructions", { lng: e?.language })
1162
+ hidden: Q.t("common:showTeacherInstructions", { lng: e?.language }),
1163
+ visible: Q.t("common:hideTeacherInstructions", { lng: e?.language })
1164
1164
  },
1165
1165
  children: i
1166
1166
  }) });
1167
1167
  };
1168
1168
  renderRationale = () => {
1169
- let { model: e } = this.props, { rationale: t, animationsDisabled: n } = e || {}, r = /* @__PURE__ */ E(J, { prompt: t });
1170
- return t && (d(t) || s(t)) && /* @__PURE__ */ E(st, { children: n ? r : /* @__PURE__ */ E(rt, {
1169
+ let { model: e } = this.props, { rationale: t, animationsDisabled: n } = e || {}, r = /* @__PURE__ */ D(Y, { prompt: t });
1170
+ return t && (d(t) || c(t)) && /* @__PURE__ */ D(ct, { children: n ? r : /* @__PURE__ */ D(rt, {
1171
1171
  labels: {
1172
- hidden: Z.t("common:showRationale", { lng: e?.language }),
1173
- visible: Z.t("common:hideRationale", { lng: e?.language })
1172
+ hidden: Q.t("common:showRationale", { lng: e?.language }),
1173
+ visible: Q.t("common:hideRationale", { lng: e?.language })
1174
1174
  },
1175
1175
  children: r
1176
1176
  }) });
1177
1177
  };
1178
1178
  renderPlayerContent = () => {
1179
- let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: r, tooltipContainerRef: i } = this.state, { correctness: o, disabled: s, view: c, responses: l, equationEditor: u, customKeys: d, feedback: f, env: { mode: p } = {}, printMode: m, alwaysShowCorrect: g, language: _ } = e || {}, v = x(l), y = bt(d), b = Ct(e, this.state) || "", S = m && !g;
1180
- return /* @__PURE__ */ E(ct, { children: /* @__PURE__ */ E(Be, {
1181
- disabled: s,
1179
+ let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: r, tooltipContainerRef: i } = this.state, { correctness: a, disabled: o, view: c, responses: l, equationEditor: u, customKeys: d, feedback: f, env: { mode: p } = {}, printMode: m, alwaysShowCorrect: h, language: _ } = e || {}, v = S(l), y = xt(d), b = wt(e, this.state) || "", x = m && !h;
1180
+ return /* @__PURE__ */ D(lt, { children: /* @__PURE__ */ D(Be, {
1181
+ disabled: o,
1182
1182
  markup: e.markup,
1183
1183
  value: {},
1184
1184
  customMarkMarkupComponent: (e) => {
1185
- let l = p === "evaluate" && f && f[e], d = /* @__PURE__ */ E(ut, {
1185
+ let l = p === "evaluate" && f && f[e], d = /* @__PURE__ */ D(dt, {
1186
1186
  ref: (e) => {
1187
1187
  this.mqStatic = e || this.mqStatic;
1188
1188
  },
@@ -1194,13 +1194,13 @@ var wt = {
1194
1194
  onSubFieldFocus: this.onSubFieldFocus,
1195
1195
  onBlur: this.onBlur
1196
1196
  });
1197
- return /* @__PURE__ */ E(lt, {
1197
+ return /* @__PURE__ */ D(ut, {
1198
1198
  ref: i,
1199
1199
  $incorrect: !v && !l && !n,
1200
1200
  $correct: !v && (l || n),
1201
- $showCorrectness: !v && s && o && !c,
1201
+ $showCorrectness: !v && o && a && !c,
1202
1202
  $correctAnswerShown: n,
1203
- children: /* @__PURE__ */ E(a, {
1203
+ children: /* @__PURE__ */ D(s, {
1204
1204
  ref: (e) => this.setTooltipRef(e),
1205
1205
  enterTouchDelay: 0,
1206
1206
  interactive: !0,
@@ -1224,7 +1224,7 @@ var wt = {
1224
1224
  name: "flip",
1225
1225
  enabled: !1
1226
1226
  },
1227
- wt
1227
+ Tt
1228
1228
  ]
1229
1229
  },
1230
1230
  tooltip: { sx: {
@@ -1237,46 +1237,46 @@ var wt = {
1237
1237
  boxShadow: "none"
1238
1238
  } }
1239
1239
  },
1240
- title: Object.keys(r.answers).map((e) => e === t && !(n || s) && /* @__PURE__ */ E(dt, {
1240
+ title: Object.keys(r.answers).map((e) => e === t && !(n || o) && /* @__PURE__ */ D(ft, {
1241
1241
  "data-keypad": !0,
1242
- style: { width: xt(y, u) },
1243
- children: /* @__PURE__ */ E(h, {
1242
+ style: { width: St(y, u) },
1243
+ children: /* @__PURE__ */ D(g, {
1244
1244
  additionalKeys: y,
1245
- mode: u || _t,
1245
+ mode: u || vt,
1246
1246
  onClick: this.onClick
1247
1247
  })
1248
1248
  }, e) || null),
1249
- children: E(S ? ft : "div", { children: d })
1249
+ children: D(x ? pt : "div", { children: d })
1250
1250
  })
1251
1251
  });
1252
1252
  }
1253
1253
  }) });
1254
1254
  };
1255
1255
  render() {
1256
- 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 = !x(s) && o && o.correctness !== "correct", f = (t || r === "view" && i === "instructor") && l && u;
1257
- return /* @__PURE__ */ E(at, {
1258
- extraCSSRules: a,
1256
+ 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 = !S(c) && s && s.correctness !== "correct", p = (t || i === "view" && a === "instructor") && u && d;
1257
+ return /* @__PURE__ */ D(at, {
1258
+ extraCSSRules: o,
1259
1259
  ref: (e) => {
1260
1260
  let t = ee.findDOMNode(e);
1261
1261
  this.root = t || this.root;
1262
1262
  },
1263
- children: /* @__PURE__ */ D(Q, { children: [
1264
- r === "gather" && /* @__PURE__ */ E(pt, { children: Z.t("mathInline.mathEquationResponseQuestion", { lng: c }) }),
1265
- /* @__PURE__ */ E(Q, { children: d && /* @__PURE__ */ E(ht, {
1266
- language: c,
1263
+ children: /* @__PURE__ */ O(ot, { children: [
1264
+ i === "gather" && /* @__PURE__ */ D(mt, { children: Q.t("mathInline.mathEquationResponseQuestion", { lng: l }) }),
1265
+ /* @__PURE__ */ D(ot, { children: f && /* @__PURE__ */ D(gt, {
1266
+ language: l,
1267
1267
  show: !0,
1268
1268
  toggled: t,
1269
1269
  onToggle: this.toggleShowCorrect
1270
1270
  }) }),
1271
1271
  this.renderTeacherInstructions(),
1272
- n && /* @__PURE__ */ E(ot, { children: /* @__PURE__ */ E(J, { prompt: n }) }),
1273
- /* @__PURE__ */ E(nt, {
1272
+ n && /* @__PURE__ */ D(st, { children: /* @__PURE__ */ D(Y, { prompt: n }) }),
1273
+ /* @__PURE__ */ D(nt, {
1274
1274
  false: !0,
1275
1275
  children: this.renderPlayerContent()
1276
1276
  }),
1277
- f && /* @__PURE__ */ E(mt, {
1277
+ p && /* @__PURE__ */ D(ht, {
1278
1278
  className: "note",
1279
- dangerouslySetInnerHTML: { __html: u }
1279
+ dangerouslySetInnerHTML: { __html: r(d) }
1280
1280
  }),
1281
1281
  this.renderRationale()
1282
1282
  ] })
@@ -1284,6 +1284,6 @@ var wt = {
1284
1284
  }
1285
1285
  };
1286
1286
  //#endregion
1287
- export { Tt as t };
1287
+ export { Et as t };
1288
1288
 
1289
- //# sourceMappingURL=main-CoTwYVPd.js.map
1289
+ //# sourceMappingURL=main-Bd8xrUwS.js.map