@pie-element/math-inline 13.0.6 → 13.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 (29) hide show
  1. package/dist/browser/author/index.js +3775 -3775
  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/{dist-BVdDxOHw.js → dist-CtFXsAFT.js} +2850 -2835
  6. package/dist/browser/dist-CtFXsAFT.js.map +1 -0
  7. package/dist/browser/editor-runtime/author/index.js +761 -761
  8. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  9. package/dist/browser/editor-runtime/controller/index.js +1 -1
  10. package/dist/browser/editor-runtime/delivery/index.js +2 -2
  11. package/dist/browser/editor-runtime/{dist-BEIVwMMd.js → dist-C-42kMD_.js} +2850 -2835
  12. package/dist/browser/editor-runtime/dist-C-42kMD_.js.map +1 -0
  13. package/dist/browser/editor-runtime/{main-CBPT0tJf.js → main-CBEFxpiU.js} +158 -157
  14. package/dist/browser/editor-runtime/main-CBEFxpiU.js.map +1 -0
  15. package/dist/browser/editor-runtime/print/index.js +3 -3
  16. package/dist/browser/{main-BG7QHLlI.js → main-C1uzmgrm.js} +158 -157
  17. package/dist/browser/main-C1uzmgrm.js.map +1 -0
  18. package/dist/browser/print/index.js +3 -3
  19. package/dist/index.iife.js +30 -30
  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 +5886 -5870
  24. package/module/print.js.map +1 -1
  25. package/package.json +16 -16
  26. package/dist/browser/dist-BVdDxOHw.js.map +0 -1
  27. package/dist/browser/editor-runtime/dist-BEIVwMMd.js.map +0 -1
  28. package/dist/browser/editor-runtime/main-CBPT0tJf.js.map +0 -1
  29. package/dist/browser/main-BG7QHLlI.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { s as e } from "./rolldown-runtime-DgMJErsw.js";
2
2
  import { d as t, p as n, t as r } from "./dist-w6lPOmAs.js";
3
- import { C as i, H as a, L as o, M as s, Mt as c, R as l, S as u, T as d, _ as f, f as ee, ft as p, g as m, gt as h, h as g, ht as _, m as v, mt as y, n as b, pt as x, u as te, v as S, vt as C, w } from "./dist-BEIVwMMd.js";
4
- import T, { useRef as ne } from "react";
5
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
3
+ import { C as i, H as a, L as o, M as s, Nt as c, R as l, S as u, T as d, _ as ee, _t as f, f as te, ft as p, g as m, gt as h, h as g, ht as _, m as v, mt as y, n as b, pt as x, u as ne, v as S, w as C, yt as w } from "./dist-C-42kMD_.js";
4
+ import T, { useRef as E } from "react";
5
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
6
6
  import re from "react-dom";
7
7
  //#region ../../lib-react/correct-answer-toggle/dist/expander.js
8
- var O = /* @__PURE__ */ e(c(), 1), k = "height ease-in 300ms, opacity ease-in 300ms", A = C("div")(() => ({
8
+ var k = /* @__PURE__ */ e(c(), 1), A = "height ease-in 300ms, opacity ease-in 300ms", j = w("div")(() => ({
9
9
  position: "relative",
10
10
  height: 0,
11
11
  overflow: "hidden",
@@ -13,7 +13,7 @@ var O = /* @__PURE__ */ e(c(), 1), k = "height ease-in 300ms, opacity ease-in 30
13
13
  visibility: "hidden",
14
14
  width: 0,
15
15
  "&.enter": {
16
- transition: k,
16
+ transition: A,
17
17
  opacity: 1,
18
18
  height: "auto",
19
19
  width: "auto",
@@ -27,7 +27,7 @@ var O = /* @__PURE__ */ e(c(), 1), k = "height ease-in 300ms, opacity ease-in 30
27
27
  minHeight: "25px"
28
28
  },
29
29
  "&.exit": {
30
- transition: k,
30
+ transition: A,
31
31
  opacity: 0,
32
32
  height: 0,
33
33
  visibility: "visible",
@@ -39,9 +39,9 @@ var O = /* @__PURE__ */ e(c(), 1), k = "height ease-in 300ms, opacity ease-in 30
39
39
  height: 0,
40
40
  width: 0
41
41
  }
42
- })), j = (e) => {
43
- let { show: t, children: n, className: r } = e, i = ne(null);
44
- return /* @__PURE__ */ E(h, {
42
+ })), M = (e) => {
43
+ let { show: t, children: n, className: r } = e, i = E(null);
44
+ return /* @__PURE__ */ D(f, {
45
45
  nodeRef: i,
46
46
  in: t,
47
47
  appear: !0,
@@ -53,21 +53,21 @@ var O = /* @__PURE__ */ e(c(), 1), k = "height ease-in 300ms, opacity ease-in 30
53
53
  exit: "exit",
54
54
  exitDone: "exit-done"
55
55
  },
56
- children: /* @__PURE__ */ E(A, {
56
+ children: /* @__PURE__ */ D(j, {
57
57
  ref: i,
58
58
  className: r,
59
59
  children: n
60
60
  })
61
61
  });
62
62
  };
63
- j.propTypes = {
64
- show: O.default.bool.isRequired,
65
- className: O.default.string,
66
- children: O.default.oneOfType([O.default.arrayOf(O.default.node), O.default.node]).isRequired
63
+ M.propTypes = {
64
+ show: k.default.bool.isRequired,
65
+ className: k.default.string,
66
+ children: k.default.oneOfType([k.default.arrayOf(k.default.node), k.default.node]).isRequired
67
67
  };
68
68
  //#endregion
69
69
  //#region ../../lib-react/correct-answer-toggle/dist/i18n/index.js
70
- var ie = _({
70
+ var N = h({
71
71
  packageName: "@pie-lib/correct-answer-toggle",
72
72
  source: {
73
73
  showCorrectAnswer: "Show correct answer",
@@ -123,7 +123,7 @@ var ie = _({
123
123
  "./sv-CIiWPsen.js"
124
124
  )
125
125
  }
126
- }), M = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ D("svg", {
126
+ }), P = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
127
127
  "aria-hidden": "true",
128
128
  focusable: "false",
129
129
  preserveAspectRatio: "xMinYMin meet",
@@ -131,27 +131,27 @@ var ie = _({
131
131
  viewBox: "-283 359 34 35",
132
132
  style: { enableBackground: "new -283 359 34 35" },
133
133
  children: [
134
- /* @__PURE__ */ E("circle", {
134
+ /* @__PURE__ */ D("circle", {
135
135
  cx: "-266",
136
136
  cy: "375.9",
137
137
  r: "14",
138
138
  fill: e
139
139
  }),
140
- /* @__PURE__ */ E("path", {
140
+ /* @__PURE__ */ D("path", {
141
141
  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",
142
142
  fill: e
143
143
  }),
144
- /* @__PURE__ */ E("polygon", {
144
+ /* @__PURE__ */ D("polygon", {
145
145
  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",
146
146
  fill: t
147
147
  })
148
148
  ]
149
149
  });
150
- M.propTypes = {
151
- bgFill: O.default.string.isRequired,
152
- fgFill: O.default.string.isRequired
150
+ P.propTypes = {
151
+ bgFill: k.default.string.isRequired,
152
+ fgFill: k.default.string.isRequired
153
153
  };
154
- var N = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
154
+ var F = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
155
155
  "aria-hidden": "true",
156
156
  focusable: "false",
157
157
  preserveAspectRatio: "xMinYMin meet",
@@ -159,7 +159,7 @@ var N = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
159
159
  viewBox: "-129.5 127 34 35",
160
160
  style: { enableBackground: "new -129.5 127 34 35" },
161
161
  children: [
162
- /* @__PURE__ */ E("path", {
162
+ /* @__PURE__ */ D("path", {
163
163
  style: {
164
164
  fill: "#D0CAC5",
165
165
  stroke: "#E6E3E0",
@@ -168,7 +168,7 @@ var N = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
168
168
  },
169
169
  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"
170
170
  }),
171
- /* @__PURE__ */ E("path", {
171
+ /* @__PURE__ */ D("path", {
172
172
  style: {
173
173
  fill: "#B3ABA4",
174
174
  stroke: "#CDC7C2",
@@ -177,64 +177,64 @@ var N = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
177
177
  },
178
178
  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"
179
179
  }),
180
- /* @__PURE__ */ E("circle", {
180
+ /* @__PURE__ */ D("circle", {
181
181
  cx: "-114.2",
182
182
  cy: "143.5",
183
183
  r: "14",
184
184
  fill: e
185
185
  }),
186
- /* @__PURE__ */ E("path", {
186
+ /* @__PURE__ */ D("path", {
187
187
  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",
188
188
  fill: n
189
189
  }),
190
- /* @__PURE__ */ E("polygon", {
190
+ /* @__PURE__ */ D("polygon", {
191
191
  points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
192
192
  fill: t
193
193
  })
194
194
  ]
195
195
  });
196
- N.propTypes = {
197
- bgFill: O.default.string.isRequired,
198
- fgFill: O.default.string.isRequired,
199
- borderFill: O.default.string.isRequired
196
+ F.propTypes = {
197
+ bgFill: k.default.string.isRequired,
198
+ fgFill: k.default.string.isRequired,
199
+ borderFill: k.default.string.isRequired
200
200
  };
201
- var P = C("div")(({ size: e }) => ({
201
+ var ie = w("div")(({ size: e }) => ({
202
202
  width: e || "25px",
203
203
  height: e || "25px"
204
- })), F = ({ open: e, size: t }) => /* @__PURE__ */ E(P, {
204
+ })), I = ({ open: e, size: t }) => /* @__PURE__ */ D(ie, {
205
205
  size: t,
206
- children: e ? /* @__PURE__ */ E(M, {
206
+ children: e ? /* @__PURE__ */ D(P, {
207
207
  bgFill: "#bce2ff",
208
208
  fgFill: "#1a9cff"
209
- }) : /* @__PURE__ */ E(N, {
209
+ }) : /* @__PURE__ */ D(F, {
210
210
  bgFill: "white",
211
211
  fgFill: "#1a9cff",
212
212
  borderFill: "#bce2ff"
213
213
  })
214
214
  });
215
- F.propTypes = {
216
- open: O.default.bool,
217
- size: O.default.string
218
- }, F.defaultProps = { open: !1 };
215
+ I.propTypes = {
216
+ open: k.default.bool,
217
+ size: k.default.string
218
+ }, I.defaultProps = { open: !1 };
219
219
  //#endregion
220
220
  //#region ../../lib-react/correct-answer-toggle/dist/index.js
221
- function I(e) {
221
+ function L(e) {
222
222
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
223
223
  }
224
- function L(e, t) {
225
- return !e || I(e) ? e : I(e.default) ? e.default : t && I(e[t]) ? e[t] : t && I(e[t]?.default) ? e[t].default : e;
224
+ function R(e, t) {
225
+ return !e || L(e) ? e : L(e.default) ? e.default : t && L(e[t]) ? e[t] : t && L(e[t]?.default) ? e[t].default : e;
226
226
  }
227
- var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Readable") || L(ae.Readable, "Readable"), V = {
227
+ var z = S, B = z.default, V = B && typeof B == "object" ? B : z, H = R(C, "Readable") || R(V.Readable, "Readable"), U = {
228
228
  WebkitTouchCallout: "none",
229
229
  WebkitUserSelect: "none",
230
230
  KhtmlUserSelect: "none",
231
231
  MozUserSelect: "none",
232
232
  msUserSelect: "none",
233
233
  userSelect: "none"
234
- }, oe = C("div")(() => ({
234
+ }, W = w("div")(() => ({
235
235
  width: "100%",
236
236
  cursor: "pointer"
237
- })), H = C("button")(() => ({
237
+ })), ae = w("button")(() => ({
238
238
  margin: "0 auto",
239
239
  textAlign: "center",
240
240
  display: "flex",
@@ -250,15 +250,15 @@ var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Read
250
250
  outline: `2px solid ${y.buttonFocusOutline()}`,
251
251
  outlineOffset: "-2px"
252
252
  }
253
- })), se = C("div")(() => ({
253
+ })), oe = w("div")(() => ({
254
254
  width: "fit-content",
255
255
  minWidth: "140px",
256
256
  alignSelf: "center",
257
257
  verticalAlign: "middle",
258
258
  color: `var(--correct-answer-toggle-label-color, ${y.text()})`,
259
259
  fontWeight: "normal",
260
- ...V
261
- })), U = C("div")(() => ({
260
+ ...U
261
+ })), G = w("div")(() => ({
262
262
  position: "absolute",
263
263
  width: "25px",
264
264
  "&.enter": { opacity: "0" },
@@ -271,20 +271,20 @@ var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Read
271
271
  opacity: "0",
272
272
  transition: "opacity 0.3s ease-in"
273
273
  }
274
- })), ce = C("div")(() => ({
274
+ })), se = w("div")(() => ({
275
275
  width: "25px",
276
276
  marginRight: "5px",
277
277
  display: "flex",
278
278
  alignItems: "center"
279
- })), le = class extends T.Component {
279
+ })), ce = class extends T.Component {
280
280
  static propTypes = {
281
- onToggle: O.default.func,
282
- toggled: O.default.bool,
283
- show: O.default.bool,
284
- hideMessage: O.default.string,
285
- showMessage: O.default.string,
286
- className: O.default.string,
287
- language: O.default.string
281
+ onToggle: k.default.func,
282
+ toggled: k.default.bool,
283
+ show: k.default.bool,
284
+ hideMessage: k.default.string,
285
+ showMessage: k.default.string,
286
+ className: k.default.string,
287
+ language: k.default.string
288
288
  };
289
289
  static defaultProps = {
290
290
  show: !1,
@@ -304,17 +304,18 @@ var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Read
304
304
  this.setState({ show: e.show });
305
305
  }
306
306
  render() {
307
- let { className: e, toggled: t, language: n } = this.props, r = ie.forLocale(n, this.relabel), i = this.props.hideMessage ?? r.t("hideCorrectAnswer"), a = this.props.showMessage ?? r.t("showCorrectAnswer");
308
- return /* @__PURE__ */ E(oe, {
307
+ let { className: e, toggled: t, language: n } = this.props, r = N.forLocale(n, this.relabel), i = this.props.hideMessage ?? r.t("hideCorrectAnswer"), a = this.props.showMessage ?? r.t("showCorrectAnswer");
308
+ return /* @__PURE__ */ D(W, {
309
309
  className: e,
310
- children: /* @__PURE__ */ E(j, {
310
+ ..._(n),
311
+ children: /* @__PURE__ */ D(M, {
311
312
  show: this.state.show,
312
- children: /* @__PURE__ */ D(H, {
313
+ children: /* @__PURE__ */ O(ae, {
313
314
  type: "button",
314
315
  "aria-pressed": !!t,
315
316
  onClick: this.onClick.bind(this),
316
317
  onTouchEnd: this.onTouch.bind(this),
317
- children: [/* @__PURE__ */ D(ce, { children: [/* @__PURE__ */ E(h, {
318
+ children: [/* @__PURE__ */ O(se, { children: [/* @__PURE__ */ D(f, {
318
319
  nodeRef: this.openIconRef,
319
320
  timeout: 400,
320
321
  in: t,
@@ -325,11 +326,11 @@ var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Read
325
326
  exit: "exit",
326
327
  exitActive: "exit-active"
327
328
  },
328
- children: /* @__PURE__ */ E(U, {
329
+ children: /* @__PURE__ */ D(G, {
329
330
  ref: this.openIconRef,
330
- children: /* @__PURE__ */ E(F, { open: t }, "correct-open")
331
+ children: /* @__PURE__ */ D(I, { open: t }, "correct-open")
331
332
  })
332
- }), /* @__PURE__ */ E(h, {
333
+ }), /* @__PURE__ */ D(f, {
333
334
  nodeRef: this.closedIconRef,
334
335
  timeout: 5e3,
335
336
  in: !t,
@@ -340,13 +341,13 @@ var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Read
340
341
  exit: "exit",
341
342
  exitActive: "exit-active"
342
343
  },
343
- children: /* @__PURE__ */ E(U, {
344
+ children: /* @__PURE__ */ D(G, {
344
345
  ref: this.closedIconRef,
345
- children: /* @__PURE__ */ E(F, { open: t }, "correct-closed")
346
+ children: /* @__PURE__ */ D(I, { open: t }, "correct-closed")
346
347
  })
347
- })] }), /* @__PURE__ */ E(B, {
348
+ })] }), /* @__PURE__ */ D(H, {
348
349
  false: !0,
349
- children: /* @__PURE__ */ E(se, {
350
+ children: /* @__PURE__ */ D(oe, {
350
351
  "aria-hidden": !this.state.show,
351
352
  children: t ? i : a
352
353
  })
@@ -355,14 +356,14 @@ var R = S, z = R.default, ae = z && typeof z == "object" ? z : R, B = L(w, "Read
355
356
  })
356
357
  });
357
358
  }
358
- }, W = {
359
+ }, le = {
359
360
  advanced: "Advanced Multi",
360
361
  simple: "Simple"
361
- }, ue = C("div")(({ theme: e }) => ({
362
+ }, ue = w("div")(({ theme: e }) => ({
362
363
  marginTop: e.spacing(2),
363
364
  marginBottom: e.spacing(2),
364
365
  padding: e.spacing(1)
365
- })), de = C("div", { shouldForwardProp: (e) => !["isCorrect", "isIncorrect"].includes(e) })(({ theme: e, isCorrect: t, isIncorrect: n }) => ({
366
+ })), de = w("div", { shouldForwardProp: (e) => !["isCorrect", "isIncorrect"].includes(e) })(({ theme: e, isCorrect: t, isIncorrect: n }) => ({
366
367
  color: y.text(),
367
368
  background: y.background(),
368
369
  border: t ? `2px solid ${y.correct()} !important` : n ? `2px solid ${y.incorrect()} !important` : `1px solid ${y.primaryLight()}`,
@@ -394,13 +395,13 @@ if (typeof document < "u") {
394
395
  }
395
396
  var fe = class extends T.Component {
396
397
  static propTypes = {
397
- onSimpleResponseChange: O.default.func,
398
- model: O.default.object.isRequired,
399
- emptyResponse: O.default.bool,
400
- session: O.default.object.isRequired,
401
- showCorrect: O.default.bool,
402
- onSubFieldFocus: O.default.func.isRequired,
403
- showKeypad: O.default.bool.isRequired
398
+ onSimpleResponseChange: k.default.func,
399
+ model: k.default.object.isRequired,
400
+ emptyResponse: k.default.bool,
401
+ session: k.default.object.isRequired,
402
+ showCorrect: k.default.bool,
403
+ onSubFieldFocus: k.default.func.isRequired,
404
+ showKeypad: k.default.bool.isRequired
404
405
  };
405
406
  constructor(e) {
406
407
  super(e), this.mathToolBarId = a("math-toolbar");
@@ -419,15 +420,15 @@ var fe = class extends T.Component {
419
420
  let { model: e, showCorrect: t, session: n, emptyResponse: r, onSimpleResponseChange: i, showKeypad: a } = this.props, { config: o, disabled: s, correctness: c } = e || {};
420
421
  if (!o) return;
421
422
  let l = c && c.correct, { responses: u, equationEditor: d } = o;
422
- return /* @__PURE__ */ E(ue, {
423
+ return /* @__PURE__ */ D(ue, {
423
424
  "data-keypad": !0,
424
- children: t || s ? /* @__PURE__ */ E(de, {
425
+ children: t || s ? /* @__PURE__ */ D(de, {
425
426
  isIncorrect: !r && !l && !t,
426
427
  isCorrect: !r && (l || t),
427
- children: /* @__PURE__ */ E(v.Static, { latex: t ? u && u.length && u[0].answer : n.response || "" })
428
- }) : /* @__PURE__ */ E("div", {
428
+ children: /* @__PURE__ */ D(v.Static, { latex: t ? u && u.length && u[0].answer : n.response || "" })
429
+ }) : /* @__PURE__ */ D("div", {
429
430
  id: this.mathToolBarId,
430
- children: /* @__PURE__ */ E(b, {
431
+ children: /* @__PURE__ */ D(b, {
431
432
  classNames: { editor: "response-editor" },
432
433
  latex: n.response,
433
434
  keypadMode: d,
@@ -444,13 +445,13 @@ var fe = class extends T.Component {
444
445
  };
445
446
  //#endregion
446
447
  //#region src/delivery/main.tsx
447
- function G(e) {
448
+ function K(e) {
448
449
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
449
450
  }
450
- function K(e, t) {
451
- 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;
451
+ function q(e, t) {
452
+ 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;
452
453
  }
453
- var pe = S, q = pe.default, J = q && typeof q == "object" ? q : pe, me = K(s, "UiLayout") || K(J.UiLayout, "UiLayout"), Y = K(d, "PreviewPrompt") || K(J.PreviewPrompt, "PreviewPrompt"), he = K(w, "Readable") || K(J.Readable, "Readable"), ge = K(o, "Collapsible") || K(J.Collapsible, "Collapsible"), _e = K(p, "Feedback") || K(J.Feedback, "Feedback"), { translator: X } = n, ve = !1, ye = /\\newline/g, Z = /{{response}}/gm, be = 6, xe = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
454
+ var pe = S, J = pe.default, Y = J && typeof J == "object" ? J : pe, me = q(s, "UiLayout") || q(Y.UiLayout, "UiLayout"), X = q(d, "PreviewPrompt") || q(Y.PreviewPrompt, "PreviewPrompt"), he = q(C, "Readable") || q(Y.Readable, "Readable"), ge = q(o, "Collapsible") || q(Y.Collapsible, "Collapsible"), _e = q(p, "Feedback") || q(Y.Feedback, "Feedback"), { translator: Z } = n, ve = !1, ye = /\\newline/g, Q = /{{response}}/gm, be = 6, xe = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
454
455
  function Se(e = []) {
455
456
  return e.map((e) => ({
456
457
  name: e,
@@ -476,7 +477,7 @@ function Te(e, t) {
476
477
  let e = i;
477
478
  if (t.showCorrect) return a && a.length && a[0].answer;
478
479
  let n = 1;
479
- return (e || "").replace(Z, function() {
480
+ return (e || "").replace(Q, function() {
480
481
  let e = t.session.answers[`r${n}`];
481
482
  if (o && !s) {
482
483
  let e = "\\ \\ ".repeat(30) + "\\newline ";
@@ -490,7 +491,7 @@ function Ee(e, t) {
490
491
  let n = {};
491
492
  if (t.config && t.config.expression) {
492
493
  let r = 1;
493
- (t.config.expression || "").replace(Z, () => {
494
+ (t.config.expression || "").replace(Q, () => {
494
495
  n[`r${r}`] = { value: e && e.answers && e.answers[`r${r}`] && e.answers[`r${r}`].value || "" }, r += 1;
495
496
  });
496
497
  }
@@ -498,9 +499,9 @@ function Ee(e, t) {
498
499
  }
499
500
  var De = class extends T.Component {
500
501
  static propTypes = {
501
- session: O.default.object.isRequired,
502
- onSessionChange: O.default.func,
503
- model: O.default.object.isRequired
502
+ session: k.default.object.isRequired,
503
+ onSessionChange: k.default.func,
504
+ model: k.default.object.isRequired
504
505
  };
505
506
  constructor(e) {
506
507
  super(e);
@@ -549,12 +550,12 @@ var De = class extends T.Component {
549
550
  if (i && a && !t(i.answers, a.answers) && this.setState({ session: {
550
551
  ...a,
551
552
  answers: Ee(a, this.props.model)
552
- } }), n.note && n.language && n.language !== r.language && n.note === X.t("mathInline.primaryCorrectWithAlternates", { lng: n.language }) && (n.note = X.t("mathInline.primaryCorrectWithAlternates", { lng: r.language })), (n.env && n.env.mode !== "evaluate" || r.env && r.env.mode !== "evaluate") && this.setState({
553
+ } }), n.note && n.language && n.language !== r.language && n.note === Z.t("mathInline.primaryCorrectWithAlternates", { lng: n.language }) && (n.note = Z.t("mathInline.primaryCorrectWithAlternates", { lng: r.language })), (n.env && n.env.mode !== "evaluate" || r.env && r.env.mode !== "evaluate") && this.setState({
553
554
  ...this.state.session,
554
555
  showCorrect: !1
555
556
  }), r.alwaysShowCorrect && this.setState({ showCorrect: !0 }), this.countResponseOccurrences(n.expression) < this.countResponseOccurrences(r.expression) && setTimeout(() => this.updateAria(), 100), n && n.responses && n.responses.length !== r.responses.length || !n && r && r.responses || n && r && n.expression !== r.expression) {
556
557
  let e = {}, t = this.state.session.answers, n = 1;
557
- (r.expression || "").replace(Z, () => {
558
+ (r.expression || "").replace(Q, () => {
558
559
  e[`r${n}`] = { value: t && t[`r${n}`] && t[`r${n}`].value || "" }, n++;
559
560
  }), this.setState((t) => ({ session: {
560
561
  ...t.session,
@@ -576,7 +577,7 @@ var De = class extends T.Component {
576
577
  updateAria = () => {
577
578
  if (this.root) {
578
579
  this.root.querySelectorAll(".mq-selectable").forEach((e) => e.setAttribute("aria-hidden", "true"));
579
- let e = X.t("mathInline.keypadInstructions", { lng: this.props.model?.language });
580
+ let e = Z.t("mathInline.keypadInstructions", { lng: this.props.model?.language });
580
581
  this.root.querySelectorAll("textarea").forEach((t, n) => {
581
582
  let r = `${this.instructionsIdPrefix}-${n}`, i = t.closest(".mq-textarea");
582
583
  if (i) {
@@ -649,7 +650,7 @@ var De = class extends T.Component {
649
650
  this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
650
651
  };
651
652
  subFieldChanged = (e, t) => {
652
- if (f(), e) {
653
+ if (ee(), e) {
653
654
  let n = window.scrollX, r = window.scrollY;
654
655
  this.setState((n) => ({ session: {
655
656
  ...n.session,
@@ -696,48 +697,48 @@ var De = class extends T.Component {
696
697
  }, 1);
697
698
  }
698
699
  render() {
699
- let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: a, tooltipContainerRef: o } = this.state, { config: s, correctness: c, disabled: l, extraCSSRules: d, view: f, teacherInstructions: p, rationale: m, feedback: h, animationsDisabled: g, printMode: _, alwaysShowCorrect: b, language: S } = e || {};
700
+ let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: a, tooltipContainerRef: o } = this.state, { config: s, correctness: c, disabled: l, extraCSSRules: d, view: ee, teacherInstructions: f, rationale: p, feedback: m, animationsDisabled: h, printMode: g, alwaysShowCorrect: _, language: b } = e || {};
700
701
  if (!s) return null;
701
- let { showNote: C, note: w, prompt: T, responses: ne, responseType: O, equationEditor: k, customKeys: A, env: { mode: j, role: ie } = {} } = s || {}, M = (n || j === "view" && ie === "instructor") && C && w, N = r(ne), P = !N && c && c.correctness !== "correct", F = l && c, I = Se(A), L = c && c.correct, R = Te(e, this.state) || "", z = l && !c, ae = _ && !b, B = m && (i(m) || u(m)), V = p && (i(p) || u(p)), oe = /* @__PURE__ */ E(Ie, { children: /* @__PURE__ */ E(v.Static, {
702
+ let { showNote: S, note: C, prompt: w, responses: T, responseType: E, equationEditor: k, customKeys: A, env: { mode: j, role: M } = {} } = s || {}, N = (n || j === "view" && M === "instructor") && S && C, P = r(T), F = !P && c && c.correctness !== "correct", ie = l && c, I = Se(A), L = c && c.correct, R = Te(e, this.state) || "", z = l && !c, B = g && !_, V = p && (i(p) || u(p)), H = f && (i(f) || u(f)), U = /* @__PURE__ */ D(Le, { children: /* @__PURE__ */ D(v.Static, {
702
703
  className: "static-math",
703
704
  ref: (e) => {
704
705
  e && (this.mqStatic = e);
705
706
  },
706
707
  latex: R,
707
- language: S,
708
+ language: b,
708
709
  onSubFieldChange: this.subFieldChanged,
709
710
  getFieldName: this.getFieldName,
710
711
  setInput: this.setInput,
711
712
  onSubFieldFocus: this.onSubFieldFocus,
712
713
  onBlur: this.onBlur
713
- }) }), H = /* @__PURE__ */ D(je, { children: [
714
- j === "gather" && /* @__PURE__ */ E(Le, { children: X.t("mathInline.mathEquationResponseQuestion", { lng: S }) }),
715
- z && V && (g ? /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(p) } }) : /* @__PURE__ */ E($, {
714
+ }) }), W = /* @__PURE__ */ O(Me, { children: [
715
+ j === "gather" && /* @__PURE__ */ D(Re, { children: Z.t("mathInline.mathEquationResponseQuestion", { lng: b }) }),
716
+ z && H && (h ? /* @__PURE__ */ D("div", { dangerouslySetInnerHTML: { __html: x(f) } }) : /* @__PURE__ */ D($, {
716
717
  labels: {
717
- hidden: X.t("common:showTeacherInstructions", { lng: S }),
718
- visible: X.t("common:hideTeacherInstructions", { lng: S })
718
+ hidden: Z.t("common:showTeacherInstructions", { lng: b }),
719
+ visible: Z.t("common:hideTeacherInstructions", { lng: b })
719
720
  },
720
- children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(p) } })
721
+ children: /* @__PURE__ */ D("div", { dangerouslySetInnerHTML: { __html: x(f) } })
721
722
  })),
722
- T && /* @__PURE__ */ E(Ae, { children: /* @__PURE__ */ E(Y, { prompt: T }) }),
723
- ae ? oe : /* @__PURE__ */ E(he, {
723
+ w && /* @__PURE__ */ D(je, { children: /* @__PURE__ */ D(X, { prompt: w }) }),
724
+ B ? U : /* @__PURE__ */ D(he, {
724
725
  false: !0,
725
- children: /* @__PURE__ */ D(Fe, { children: [O === W.simple && /* @__PURE__ */ E(fe, {
726
+ children: /* @__PURE__ */ O(Ie, { children: [E === le.simple && /* @__PURE__ */ D(fe, {
726
727
  onSimpleResponseChange: this.onSimpleResponseChange,
727
728
  showCorrect: n,
728
- emptyResponse: N,
729
+ emptyResponse: P,
729
730
  model: e,
730
731
  session: a,
731
732
  onSubFieldFocus: this.onSubFieldFocus,
732
733
  showKeypad: !!t
733
- }), O === W.advanced && /* @__PURE__ */ E(Pe, {
734
+ }), E === le.advanced && /* @__PURE__ */ D(Fe, {
734
735
  ref: o,
735
- isIncorrect: !N && !L && !n,
736
- isCorrect: !N && (L || n),
737
- showCorrectness: !N && l && c && !f,
736
+ isIncorrect: !P && !L && !n,
737
+ isCorrect: !P && (L || n),
738
+ showCorrectness: !P && l && c && !ee,
738
739
  correctAnswerShown: n,
739
- printCorrect: _ && b,
740
- children: /* @__PURE__ */ E(te, {
740
+ printCorrect: g && _,
741
+ children: /* @__PURE__ */ D(ne, {
741
742
  ref: (e) => this.setTooltipRef(e),
742
743
  enterTouchDelay: 0,
743
744
  interactive: !0,
@@ -787,22 +788,22 @@ var De = class extends T.Component {
787
788
  boxShadow: "none"
788
789
  } }
789
790
  },
790
- title: Object.keys(a.answers).map((e) => e === t && !(n || l) && /* @__PURE__ */ E(Ne, {
791
+ title: Object.keys(a.answers).map((e) => e === t && !(n || l) && /* @__PURE__ */ D(Pe, {
791
792
  "data-keypad": !0,
792
793
  style: { width: we(I, k) },
793
- children: /* @__PURE__ */ E(ee, {
794
+ children: /* @__PURE__ */ D(te, {
794
795
  additionalKeys: I,
795
796
  mode: k || be,
796
797
  onClick: this.onClick
797
798
  })
798
799
  }, e) || null),
799
- children: /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(v.Static, {
800
+ children: /* @__PURE__ */ D("div", { children: /* @__PURE__ */ D(v.Static, {
800
801
  className: "static-math",
801
802
  ref: (e) => {
802
803
  e && (this.mqStatic = e);
803
804
  },
804
805
  latex: R,
805
- language: S,
806
+ language: b,
806
807
  onSubFieldChange: this.subFieldChanged,
807
808
  getFieldName: this.getFieldName,
808
809
  setInput: this.setInput,
@@ -812,22 +813,22 @@ var De = class extends T.Component {
812
813
  })
813
814
  })] })
814
815
  }),
815
- z && M && /* @__PURE__ */ E(Me, { dangerouslySetInnerHTML: { __html: `<strong>Note:</strong> ${x(w)}` } }),
816
- z && B && (g ? /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(m) } }) : /* @__PURE__ */ E(ge, {
816
+ z && N && /* @__PURE__ */ D(Ne, { dangerouslySetInnerHTML: { __html: `<strong>Note:</strong> ${x(C)}` } }),
817
+ z && V && (h ? /* @__PURE__ */ D("div", { dangerouslySetInnerHTML: { __html: x(p) } }) : /* @__PURE__ */ D(ge, {
817
818
  labels: {
818
- hidden: X.t("common:showRationale", { lng: S }),
819
- visible: X.t("common:hideRationale", { lng: S })
819
+ hidden: Z.t("common:showRationale", { lng: b }),
820
+ visible: Z.t("common:hideRationale", { lng: b })
820
821
  },
821
- children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(m) } })
822
+ children: /* @__PURE__ */ D("div", { dangerouslySetInnerHTML: { __html: x(p) } })
822
823
  }))
823
824
  ] });
824
- return F && (P || V || B || h) ? /* @__PURE__ */ E(Q, {
825
+ return ie && (F || H || V || m) ? /* @__PURE__ */ D(ke, {
825
826
  extraCSSRules: d,
826
827
  ref: (e) => {
827
828
  let t = re.findDOMNode(e);
828
829
  this.root = t || this.root;
829
830
  },
830
- children: /* @__PURE__ */ E(ke, {
831
+ children: /* @__PURE__ */ D(Ae, {
831
832
  interactive: !0,
832
833
  enterTouchDelay: 0,
833
834
  placement: "bottom-start",
@@ -848,48 +849,48 @@ var De = class extends T.Component {
848
849
  }]
849
850
  }
850
851
  },
851
- title: /* @__PURE__ */ D("div", { children: [
852
- /* @__PURE__ */ E(je, { children: P && /* @__PURE__ */ E(Re, {
853
- language: S,
852
+ title: /* @__PURE__ */ O("div", { children: [
853
+ /* @__PURE__ */ D(Me, { children: F && /* @__PURE__ */ D(ze, {
854
+ language: b,
854
855
  show: !0,
855
856
  toggled: n,
856
857
  onToggle: this.toggleShowCorrect
857
858
  }) }),
858
- V && /* @__PURE__ */ E($, {
859
+ H && /* @__PURE__ */ D($, {
859
860
  labels: {
860
- hidden: X.t("common:showTeacherInstructions", { lng: S }),
861
- visible: X.t("common:hideTeacherInstructions", { lng: S })
861
+ hidden: Z.t("common:showTeacherInstructions", { lng: b }),
862
+ visible: Z.t("common:hideTeacherInstructions", { lng: b })
862
863
  },
863
- children: /* @__PURE__ */ E(Y, { prompt: p })
864
+ children: /* @__PURE__ */ D(X, { prompt: f })
864
865
  }, "collapsible-teacher-instructions"),
865
- M && i(w) && /* @__PURE__ */ E($, {
866
+ N && i(C) && /* @__PURE__ */ D($, {
866
867
  labels: {
867
- hidden: X.t("common:showNote", { lng: S }),
868
- visible: X.t("common:hideNote", { lng: S })
868
+ hidden: Z.t("common:showNote", { lng: b }),
869
+ visible: Z.t("common:hideNote", { lng: b })
869
870
  },
870
- children: /* @__PURE__ */ E(Y, { prompt: w })
871
+ children: /* @__PURE__ */ D(X, { prompt: C })
871
872
  }, "collapsible-note"),
872
- B && /* @__PURE__ */ E($, {
873
+ V && /* @__PURE__ */ D($, {
873
874
  labels: {
874
- hidden: X.t("common:showRationale", { lng: S }),
875
- visible: X.t("common:hideRationale", { lng: S })
875
+ hidden: Z.t("common:showRationale", { lng: b }),
876
+ visible: Z.t("common:hideRationale", { lng: b })
876
877
  },
877
- children: /* @__PURE__ */ E(Y, { prompt: m })
878
+ children: /* @__PURE__ */ D(X, { prompt: p })
878
879
  }, "collapsible-rationale"),
879
- h && /* @__PURE__ */ E(_e, {
880
+ m && /* @__PURE__ */ D(_e, {
880
881
  correctness: c.correctness,
881
- feedback: h
882
+ feedback: m
882
883
  })
883
884
  ] }),
884
- children: H
885
+ children: W
885
886
  })
886
- }) : /* @__PURE__ */ E(Q, {
887
+ }) : /* @__PURE__ */ D(ke, {
887
888
  extraCSSRules: d,
888
889
  ref: (e) => {
889
890
  let t = re.findDOMNode(e);
890
891
  this.root = t || this.root;
891
892
  },
892
- children: H
893
+ children: W
893
894
  });
894
895
  }
895
896
  }, Oe = () => ({
@@ -946,20 +947,20 @@ if (typeof document < "u") {
946
947
  `, document.head.appendChild(t);
947
948
  }
948
949
  }
949
- var Q = C(me)(() => ({
950
+ var ke = w(me)(() => ({
950
951
  color: y.text(),
951
952
  backgroundColor: y.background(),
952
953
  display: "inline-block"
953
- })), ke = C(te)({}), Ae = C("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), je = C("div")({
954
+ })), Ae = w(ne)({}), je = w("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Me = w("div")({
954
955
  width: "100%",
955
956
  position: "relative",
956
957
  backgroundColor: y.background(),
957
958
  color: y.text()
958
- }), Me = C("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), $ = C(ge)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Ne = C("div")(({ theme: e }) => ({
959
+ }), Ne = w("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), $ = w(ge)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Pe = w("div")(({ theme: e }) => ({
959
960
  zIndex: 10,
960
961
  minWidth: "400px",
961
962
  marginTop: e.spacing(2)
962
- })), Pe = C("div", { shouldForwardProp: (e) => ![
963
+ })), Fe = w("div", { shouldForwardProp: (e) => ![
963
964
  "isIncorrect",
964
965
  "isCorrect",
965
966
  "showCorrectness",
@@ -989,7 +990,7 @@ var Q = C(me)(() => ({
989
990
  "& sup": { top: 0 }
990
991
  }
991
992
  };
992
- }), Fe = C("div")({
993
+ }), Ie = w("div")({
993
994
  position: "relative",
994
995
  "& .mq-overarrow-inner": {
995
996
  border: "none !important",
@@ -1019,21 +1020,21 @@ var Q = C(me)(() => ({
1019
1020
  paddingTop: "1.5px !important"
1020
1021
  },
1021
1022
  "& .mq-parallelogram": { lineHeight: .85 }
1022
- }), Ie = C("div")(({ theme: e }) => ({
1023
+ }), Le = w("div")(({ theme: e }) => ({
1023
1024
  marginBottom: e.spacing(1),
1024
1025
  pointerEvents: "none"
1025
- })), Le = C("h2")({
1026
+ })), Re = w("h2")({
1026
1027
  position: "absolute",
1027
1028
  left: "-10000px",
1028
1029
  top: "auto",
1029
1030
  width: "1px",
1030
1031
  height: "1px",
1031
1032
  overflow: "hidden"
1032
- }), Re = C(le)(({ theme: e }) => ({
1033
+ }), ze = w(ce)(({ theme: e }) => ({
1033
1034
  color: y.text(),
1034
1035
  marginBottom: e.spacing(2)
1035
1036
  }));
1036
1037
  //#endregion
1037
1038
  export { De as t };
1038
1039
 
1039
- //# sourceMappingURL=main-CBPT0tJf.js.map
1040
+ //# sourceMappingURL=main-CBEFxpiU.js.map