@pie-element/math-inline 13.0.2-next.20261007003844 → 13.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
2
  import { d as t, p as n, t as r } from "./dist-w6lPOmAs.js";
3
- import { At as i, C as a, H as o, L as s, M as c, R as l, S as u, T as d, _ as ee, f as te, ft as f, g as p, gt as m, h, m as g, mt as _, n as v, pt as y, u as ne, v as b, w as x } from "./dist-DTpumvp_.js";
4
- import S, { useRef as C } from "react";
5
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
6
- import re from "react-dom";
3
+ import { C as i, H as a, L as o, M as s, R as c, S as l, T as u, _ as d, _t as f, f as ee, ft as p, g as m, h, ht as g, jt as _, m as v, mt as y, n as b, pt as x, u as te, v as S, w as C } from "./dist-CMbgPo5-.js";
4
+ import w, { useRef as T } from "react";
5
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
6
+ import ne from "react-dom";
7
7
  //#region ../../lib-react/correct-answer-toggle/dist/expander.js
8
- var E = /* @__PURE__ */ e(i(), 1), D = "height ease-in 300ms, opacity ease-in 300ms", O = m("div")(() => ({
8
+ var O = /* @__PURE__ */ e(_(), 1), k = "height ease-in 300ms, opacity ease-in 300ms", A = f("div")(() => ({
9
9
  position: "relative",
10
10
  height: 0,
11
11
  overflow: "hidden",
@@ -13,7 +13,7 @@ var E = /* @__PURE__ */ e(i(), 1), D = "height ease-in 300ms, opacity ease-in 30
13
13
  visibility: "hidden",
14
14
  width: 0,
15
15
  "&.enter": {
16
- transition: D,
16
+ transition: k,
17
17
  opacity: 1,
18
18
  height: "auto",
19
19
  width: "auto",
@@ -27,7 +27,7 @@ var E = /* @__PURE__ */ e(i(), 1), D = "height ease-in 300ms, opacity ease-in 30
27
27
  minHeight: "25px"
28
28
  },
29
29
  "&.exit": {
30
- transition: D,
30
+ transition: k,
31
31
  opacity: 0,
32
32
  height: 0,
33
33
  visibility: "visible",
@@ -39,9 +39,9 @@ var E = /* @__PURE__ */ e(i(), 1), D = "height ease-in 300ms, opacity ease-in 30
39
39
  height: 0,
40
40
  width: 0
41
41
  }
42
- })), k = (e) => {
43
- let { show: t, children: n, className: r } = e, i = C(null);
44
- return /* @__PURE__ */ w(_, {
42
+ })), j = (e) => {
43
+ let { show: t, children: n, className: r } = e, i = T(null);
44
+ return /* @__PURE__ */ E(g, {
45
45
  nodeRef: i,
46
46
  in: t,
47
47
  appear: !0,
@@ -53,21 +53,21 @@ var E = /* @__PURE__ */ e(i(), 1), D = "height ease-in 300ms, opacity ease-in 30
53
53
  exit: "exit",
54
54
  exitDone: "exit-done"
55
55
  },
56
- children: /* @__PURE__ */ w(O, {
56
+ children: /* @__PURE__ */ E(A, {
57
57
  ref: i,
58
58
  className: r,
59
59
  children: n
60
60
  })
61
61
  });
62
62
  };
63
- k.propTypes = {
64
- show: E.default.bool.isRequired,
65
- className: E.default.string,
66
- children: E.default.oneOfType([E.default.arrayOf(E.default.node), E.default.node]).isRequired
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
67
67
  };
68
68
  //#endregion
69
69
  //#region ../../lib-react/icons/dist/correct-response-icon.js
70
- var A = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ T("svg", {
70
+ var M = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ D("svg", {
71
71
  "aria-hidden": "true",
72
72
  focusable: "false",
73
73
  preserveAspectRatio: "xMinYMin meet",
@@ -75,27 +75,27 @@ var A = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ T("svg", {
75
75
  viewBox: "-283 359 34 35",
76
76
  style: { enableBackground: "new -283 359 34 35" },
77
77
  children: [
78
- /* @__PURE__ */ w("circle", {
78
+ /* @__PURE__ */ E("circle", {
79
79
  cx: "-266",
80
80
  cy: "375.9",
81
81
  r: "14",
82
82
  fill: e
83
83
  }),
84
- /* @__PURE__ */ w("path", {
84
+ /* @__PURE__ */ E("path", {
85
85
  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",
86
86
  fill: e
87
87
  }),
88
- /* @__PURE__ */ w("polygon", {
88
+ /* @__PURE__ */ E("polygon", {
89
89
  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",
90
90
  fill: t
91
91
  })
92
92
  ]
93
93
  });
94
- A.propTypes = {
95
- bgFill: E.default.string.isRequired,
96
- fgFill: E.default.string.isRequired
94
+ M.propTypes = {
95
+ bgFill: O.default.string.isRequired,
96
+ fgFill: O.default.string.isRequired
97
97
  };
98
- var j = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
98
+ var N = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ D("svg", {
99
99
  "aria-hidden": "true",
100
100
  focusable: "false",
101
101
  preserveAspectRatio: "xMinYMin meet",
@@ -103,7 +103,7 @@ var j = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
103
103
  viewBox: "-129.5 127 34 35",
104
104
  style: { enableBackground: "new -129.5 127 34 35" },
105
105
  children: [
106
- /* @__PURE__ */ w("path", {
106
+ /* @__PURE__ */ E("path", {
107
107
  style: {
108
108
  fill: "#D0CAC5",
109
109
  stroke: "#E6E3E0",
@@ -112,7 +112,7 @@ var j = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
112
112
  },
113
113
  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"
114
114
  }),
115
- /* @__PURE__ */ w("path", {
115
+ /* @__PURE__ */ E("path", {
116
116
  style: {
117
117
  fill: "#B3ABA4",
118
118
  stroke: "#CDC7C2",
@@ -121,64 +121,64 @@ var j = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
121
121
  },
122
122
  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"
123
123
  }),
124
- /* @__PURE__ */ w("circle", {
124
+ /* @__PURE__ */ E("circle", {
125
125
  cx: "-114.2",
126
126
  cy: "143.5",
127
127
  r: "14",
128
128
  fill: e
129
129
  }),
130
- /* @__PURE__ */ w("path", {
130
+ /* @__PURE__ */ E("path", {
131
131
  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",
132
132
  fill: n
133
133
  }),
134
- /* @__PURE__ */ w("polygon", {
134
+ /* @__PURE__ */ E("polygon", {
135
135
  points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
136
136
  fill: t
137
137
  })
138
138
  ]
139
139
  });
140
- j.propTypes = {
141
- bgFill: E.default.string.isRequired,
142
- fgFill: E.default.string.isRequired,
143
- borderFill: E.default.string.isRequired
140
+ N.propTypes = {
141
+ bgFill: O.default.string.isRequired,
142
+ fgFill: O.default.string.isRequired,
143
+ borderFill: O.default.string.isRequired
144
144
  };
145
- var M = m("div")(({ size: e }) => ({
145
+ var P = f("div")(({ size: e }) => ({
146
146
  width: e || "25px",
147
147
  height: e || "25px"
148
- })), N = ({ open: e, size: t }) => /* @__PURE__ */ w(M, {
148
+ })), F = ({ open: e, size: t }) => /* @__PURE__ */ E(P, {
149
149
  size: t,
150
- children: e ? /* @__PURE__ */ w(A, {
150
+ children: e ? /* @__PURE__ */ E(M, {
151
151
  bgFill: "#bce2ff",
152
152
  fgFill: "#1a9cff"
153
- }) : /* @__PURE__ */ w(j, {
153
+ }) : /* @__PURE__ */ E(N, {
154
154
  bgFill: "white",
155
155
  fgFill: "#1a9cff",
156
156
  borderFill: "#bce2ff"
157
157
  })
158
158
  });
159
- N.propTypes = {
160
- open: E.default.bool,
161
- size: E.default.string
162
- }, N.defaultProps = { open: !1 };
159
+ F.propTypes = {
160
+ open: O.default.bool,
161
+ size: O.default.string
162
+ }, F.defaultProps = { open: !1 };
163
163
  //#endregion
164
164
  //#region ../../lib-react/correct-answer-toggle/dist/index.js
165
- function P(e) {
165
+ function I(e) {
166
166
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
167
167
  }
168
- function F(e, t) {
169
- return !e || P(e) ? e : P(e.default) ? e.default : t && P(e[t]) ? e[t] : t && P(e[t]?.default) ? e[t].default : e;
168
+ function L(e, t) {
169
+ 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;
170
170
  }
171
- var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z = R && typeof R == "object" ? R : L, { translator: B } = n, V = {
171
+ var R = L(C, "Readable") || L(V.Readable, "Readable"), z = S, B = z.default, V = B && typeof B == "object" ? B : z, { translator: H } = n, U = {
172
172
  WebkitTouchCallout: "none",
173
173
  WebkitUserSelect: "none",
174
174
  KhtmlUserSelect: "none",
175
175
  MozUserSelect: "none",
176
176
  msUserSelect: "none",
177
177
  userSelect: "none"
178
- }, H = m("div")(() => ({
178
+ }, W = f("div")(() => ({
179
179
  width: "100%",
180
180
  cursor: "pointer"
181
- })), ie = m("button")(() => ({
181
+ })), re = f("button")(() => ({
182
182
  margin: "0 auto",
183
183
  textAlign: "center",
184
184
  display: "flex",
@@ -194,15 +194,15 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
194
194
  outline: `2px solid ${y.buttonFocusOutline()}`,
195
195
  outlineOffset: "-2px"
196
196
  }
197
- })), U = m("div")(() => ({
197
+ })), G = f("div")(() => ({
198
198
  width: "fit-content",
199
199
  minWidth: "140px",
200
200
  alignSelf: "center",
201
201
  verticalAlign: "middle",
202
202
  color: `var(--correct-answer-toggle-label-color, ${y.text()})`,
203
203
  fontWeight: "normal",
204
- ...V
205
- })), ae = m("div")(() => ({
204
+ ...U
205
+ })), ie = f("div")(() => ({
206
206
  position: "absolute",
207
207
  width: "25px",
208
208
  "&.enter": { opacity: "0" },
@@ -215,20 +215,20 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
215
215
  opacity: "0",
216
216
  transition: "opacity 0.3s ease-in"
217
217
  }
218
- })), oe = m("div")(() => ({
218
+ })), ae = f("div")(() => ({
219
219
  width: "25px",
220
220
  marginRight: "5px",
221
221
  display: "flex",
222
222
  alignItems: "center"
223
- })), se = class e extends S.Component {
223
+ })), oe = class e extends w.Component {
224
224
  static propTypes = {
225
- onToggle: E.default.func,
226
- toggled: E.default.bool,
227
- show: E.default.bool,
228
- hideMessage: E.default.string,
229
- showMessage: E.default.string,
230
- className: E.default.string,
231
- language: E.default.string
225
+ onToggle: O.default.func,
226
+ toggled: O.default.bool,
227
+ show: O.default.bool,
228
+ hideMessage: O.default.string,
229
+ showMessage: O.default.string,
230
+ className: O.default.string,
231
+ language: O.default.string
232
232
  };
233
233
  static defaultProps = {
234
234
  showMessage: "Show correct answer",
@@ -237,10 +237,10 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
237
237
  toggled: !1
238
238
  };
239
239
  constructor(t) {
240
- super(t), this.state = { show: t.show }, this.openIconRef = S.createRef(), this.closedIconRef = S.createRef(), e.defaultProps = {
240
+ super(t), this.state = { show: t.show }, this.openIconRef = w.createRef(), this.closedIconRef = w.createRef(), e.defaultProps = {
241
241
  ...e.defaultProps,
242
- showMessage: B.t("common:showCorrectAnswer", { lng: t.language }),
243
- hideMessage: B.t("common:hideCorrectAnswer", { lng: t.language })
242
+ showMessage: H.t("common:showCorrectAnswer", { lng: t.language }),
243
+ hideMessage: H.t("common:hideCorrectAnswer", { lng: t.language })
244
244
  };
245
245
  }
246
246
  onClick() {
@@ -252,22 +252,22 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
252
252
  UNSAFE_componentWillReceiveProps(t) {
253
253
  this.setState({ show: t.show }), t.language !== this.props?.language && (e.defaultProps = {
254
254
  ...e.defaultProps,
255
- showMessage: B.t("common:showCorrectAnswer", { lng: t.language }),
256
- hideMessage: B.t("common:hideCorrectAnswer", { lng: t.language })
255
+ showMessage: H.t("common:showCorrectAnswer", { lng: t.language }),
256
+ hideMessage: H.t("common:hideCorrectAnswer", { lng: t.language })
257
257
  });
258
258
  }
259
259
  render() {
260
260
  let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
261
- return /* @__PURE__ */ w(H, {
261
+ return /* @__PURE__ */ E(W, {
262
262
  className: e,
263
- children: /* @__PURE__ */ w(k, {
263
+ children: /* @__PURE__ */ E(j, {
264
264
  show: this.state.show,
265
- children: /* @__PURE__ */ T(ie, {
265
+ children: /* @__PURE__ */ D(re, {
266
266
  type: "button",
267
267
  "aria-pressed": !!t,
268
268
  onClick: this.onClick.bind(this),
269
269
  onTouchEnd: this.onTouch.bind(this),
270
- children: [/* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(_, {
270
+ children: [/* @__PURE__ */ D(ae, { children: [/* @__PURE__ */ E(g, {
271
271
  nodeRef: this.openIconRef,
272
272
  timeout: 400,
273
273
  in: t,
@@ -278,11 +278,11 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
278
278
  exit: "exit",
279
279
  exitActive: "exit-active"
280
280
  },
281
- children: /* @__PURE__ */ w(ae, {
281
+ children: /* @__PURE__ */ E(ie, {
282
282
  ref: this.openIconRef,
283
- children: /* @__PURE__ */ w(N, { open: t }, "correct-open")
283
+ children: /* @__PURE__ */ E(F, { open: t }, "correct-open")
284
284
  })
285
- }), /* @__PURE__ */ w(_, {
285
+ }), /* @__PURE__ */ E(g, {
286
286
  nodeRef: this.closedIconRef,
287
287
  timeout: 5e3,
288
288
  in: !t,
@@ -293,13 +293,13 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
293
293
  exit: "exit",
294
294
  exitActive: "exit-active"
295
295
  },
296
- children: /* @__PURE__ */ w(ae, {
296
+ children: /* @__PURE__ */ E(ie, {
297
297
  ref: this.closedIconRef,
298
- children: /* @__PURE__ */ w(N, { open: t }, "correct-closed")
298
+ children: /* @__PURE__ */ E(F, { open: t }, "correct-closed")
299
299
  })
300
- })] }), /* @__PURE__ */ w(I, {
300
+ })] }), /* @__PURE__ */ E(R, {
301
301
  false: !0,
302
- children: /* @__PURE__ */ w(U, {
302
+ children: /* @__PURE__ */ E(G, {
303
303
  "aria-hidden": !this.state.show,
304
304
  children: t ? n : r
305
305
  })
@@ -308,14 +308,14 @@ var I = F(x, "Readable") || F(z.Readable, "Readable"), L = b, R = L.default, z =
308
308
  })
309
309
  });
310
310
  }
311
- }, W = {
311
+ }, se = {
312
312
  advanced: "Advanced Multi",
313
313
  simple: "Simple"
314
- }, ce = m("div")(({ theme: e }) => ({
314
+ }, ce = f("div")(({ theme: e }) => ({
315
315
  marginTop: e.spacing(2),
316
316
  marginBottom: e.spacing(2),
317
317
  padding: e.spacing(1)
318
- })), le = m("div", { shouldForwardProp: (e) => !["isCorrect", "isIncorrect"].includes(e) })(({ theme: e, isCorrect: t, isIncorrect: n }) => ({
318
+ })), le = f("div", { shouldForwardProp: (e) => !["isCorrect", "isIncorrect"].includes(e) })(({ theme: e, isCorrect: t, isIncorrect: n }) => ({
319
319
  color: y.text(),
320
320
  background: y.background(),
321
321
  border: t ? `2px solid ${y.correct()} !important` : n ? `2px solid ${y.incorrect()} !important` : `1px solid ${y.primaryLight()}`,
@@ -345,18 +345,18 @@ if (typeof document < "u") {
345
345
  `, document.head.appendChild(t);
346
346
  }
347
347
  }
348
- var ue = class extends S.Component {
348
+ var ue = class extends w.Component {
349
349
  static propTypes = {
350
- onSimpleResponseChange: E.default.func,
351
- model: E.default.object.isRequired,
352
- emptyResponse: E.default.bool,
353
- session: E.default.object.isRequired,
354
- showCorrect: E.default.bool,
355
- onSubFieldFocus: E.default.func.isRequired,
356
- showKeypad: E.default.bool.isRequired
350
+ onSimpleResponseChange: O.default.func,
351
+ model: O.default.object.isRequired,
352
+ emptyResponse: O.default.bool,
353
+ session: O.default.object.isRequired,
354
+ showCorrect: O.default.bool,
355
+ onSubFieldFocus: O.default.func.isRequired,
356
+ showKeypad: O.default.bool.isRequired
357
357
  };
358
358
  constructor(e) {
359
- super(e), this.mathToolBarId = o("math-toolbar");
359
+ super(e), this.mathToolBarId = a("math-toolbar");
360
360
  }
361
361
  mathToolBarContainsTarget = (e) => document.getElementById(this.mathToolBarId).contains(e.target);
362
362
  handleClick = (e) => {
@@ -372,15 +372,15 @@ var ue = class extends S.Component {
372
372
  let { model: e, showCorrect: t, session: n, emptyResponse: r, onSimpleResponseChange: i, showKeypad: a } = this.props, { config: o, disabled: s, correctness: c } = e || {};
373
373
  if (!o) return;
374
374
  let l = c && c.correct, { responses: u, equationEditor: d } = o;
375
- return /* @__PURE__ */ w(ce, {
375
+ return /* @__PURE__ */ E(ce, {
376
376
  "data-keypad": !0,
377
- children: t || s ? /* @__PURE__ */ w(le, {
377
+ children: t || s ? /* @__PURE__ */ E(le, {
378
378
  isIncorrect: !r && !l && !t,
379
379
  isCorrect: !r && (l || t),
380
- children: /* @__PURE__ */ w(g.Static, { latex: t ? u && u.length && u[0].answer : n.response || "" })
381
- }) : /* @__PURE__ */ w("div", {
380
+ children: /* @__PURE__ */ E(v.Static, { latex: t ? u && u.length && u[0].answer : n.response || "" })
381
+ }) : /* @__PURE__ */ E("div", {
382
382
  id: this.mathToolBarId,
383
- children: /* @__PURE__ */ w(v, {
383
+ children: /* @__PURE__ */ E(b, {
384
384
  classNames: { editor: "response-editor" },
385
385
  latex: n.response,
386
386
  keypadMode: d,
@@ -397,14 +397,14 @@ var ue = class extends S.Component {
397
397
  };
398
398
  //#endregion
399
399
  //#region src/delivery/main.tsx
400
- function G(e) {
400
+ function K(e) {
401
401
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
402
402
  }
403
- function K(e, t) {
404
- 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;
403
+ function q(e, t) {
404
+ 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;
405
405
  }
406
- var de = K(c, "UiLayout") || K(X.UiLayout, "UiLayout"), q = K(d, "PreviewPrompt") || K(X.PreviewPrompt, "PreviewPrompt"), fe = K(x, "Readable") || K(X.Readable, "Readable"), pe = K(s, "Collapsible") || K(X.Collapsible, "Collapsible"), me = K(f, "Feedback") || K(X.Feedback, "Feedback"), J = b, Y = J.default, X = Y && typeof Y == "object" ? Y : J, { translator: Z } = n, he = !1, ge = /\\newline/g, Q = /{{response}}/gm, _e = 6, ve = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
407
- function ye(e = []) {
406
+ var de = q(s, "UiLayout") || q(X.UiLayout, "UiLayout"), J = q(u, "PreviewPrompt") || q(X.PreviewPrompt, "PreviewPrompt"), fe = q(C, "Readable") || q(X.Readable, "Readable"), pe = q(o, "Collapsible") || q(X.Collapsible, "Collapsible"), me = q(p, "Feedback") || q(X.Feedback, "Feedback"), he = S, Y = he.default, X = Y && typeof Y == "object" ? Y : he, { translator: Z } = n, ge = !1, _e = /\\newline/g, Q = /{{response}}/gm, ve = 6, ye = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
407
+ function be(e = []) {
408
408
  return e.map((e) => ({
409
409
  name: e,
410
410
  latex: e,
@@ -412,7 +412,7 @@ function ye(e = []) {
412
412
  label: e
413
413
  }));
414
414
  }
415
- function be(e, t) {
415
+ function xe(e, t) {
416
416
  let n = e;
417
417
  for (; n !== null;) {
418
418
  if (t && n === t) return !0;
@@ -420,10 +420,10 @@ function be(e, t) {
420
420
  }
421
421
  return !1;
422
422
  }
423
- function xe(e = [], t) {
423
+ function Se(e = [], t) {
424
424
  return Math.floor(e.length / 5) * 30 + (t === "miscellaneous" ? 600 : 500);
425
425
  }
426
- function Se(e, t) {
426
+ function Ce(e, t) {
427
427
  let { config: n, disabled: r } = e || {}, { expression: i, responses: a, printMode: o, alwaysShowCorrect: s } = n || {};
428
428
  if (n && i) {
429
429
  let e = i;
@@ -436,10 +436,10 @@ function Se(e, t) {
436
436
  return `\\MathQuillMathField[r${n++}]{${e.repeat(3)}}`;
437
437
  }
438
438
  return r ? `\\embed{answerBlock}[r${n++}]` : `\\MathQuillMathField[r${n++}]{${e && e.value || ""}}`;
439
- }).replace(ge, "\\embed{newLine}[]");
439
+ }).replace(_e, "\\embed{newLine}[]");
440
440
  }
441
441
  }
442
- function Ce(e, t) {
442
+ function we(e, t) {
443
443
  let n = {};
444
444
  if (t.config && t.config.expression) {
445
445
  let r = 1;
@@ -449,15 +449,15 @@ function Ce(e, t) {
449
449
  }
450
450
  return n;
451
451
  }
452
- var we = class extends S.Component {
452
+ var Te = class extends w.Component {
453
453
  static propTypes = {
454
- session: E.default.object.isRequired,
455
- onSessionChange: E.default.func,
456
- model: E.default.object.isRequired
454
+ session: O.default.object.isRequired,
455
+ onSessionChange: O.default.func,
456
+ model: O.default.object.isRequired
457
457
  };
458
458
  constructor(e) {
459
459
  super(e);
460
- let { model: t, session: n } = e, r = Ce(n, t);
460
+ let { model: t, session: n } = e, r = we(n, t);
461
461
  this.state = {
462
462
  session: {
463
463
  ...e.session,
@@ -465,12 +465,12 @@ var we = class extends S.Component {
465
465
  },
466
466
  activeAnswerBlock: "",
467
467
  showCorrect: this.props.model.config.alwaysShowCorrect || !1,
468
- tooltipContainerRef: S.createRef()
469
- }, this.instructionsIdPrefix = o("math-inline-instructions");
468
+ tooltipContainerRef: w.createRef()
469
+ }, this.instructionsIdPrefix = a("math-inline-instructions");
470
470
  }
471
471
  UNSAFE_componentWillMount() {
472
- typeof window < "u" && (he ||= (p("answerBlock", (e) => {
473
- let t = Te();
472
+ typeof window < "u" && (ge ||= (m("answerBlock", (e) => {
473
+ let t = Ee();
474
474
  return {
475
475
  htmlString: `<div class="${t.blockContainer}">
476
476
  <div class="${t.blockResponse}" data-answer-block-index="${e}">R</div>
@@ -491,7 +491,7 @@ var we = class extends S.Component {
491
491
  let a = r[t];
492
492
  h(n, a && a.value || ""), e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
493
493
  }
494
- }), l(this.root);
494
+ }), c(this.root);
495
495
  };
496
496
  countResponseOccurrences(e) {
497
497
  let t = e?.match(/\{\{response\}\}/g);
@@ -501,7 +501,7 @@ var we = class extends S.Component {
501
501
  let { config: n } = this.props.model, { config: r = {} } = e.model || {}, { session: i } = this.props, { session: a = {} } = e || {};
502
502
  if (i && a && !t(i.answers, a.answers) && this.setState({ session: {
503
503
  ...a,
504
- answers: Ce(a, this.props.model)
504
+ answers: we(a, this.props.model)
505
505
  } }), 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({
506
506
  ...this.state.session,
507
507
  showCorrect: !1
@@ -521,7 +521,7 @@ var we = class extends S.Component {
521
521
  return !r || !i;
522
522
  }
523
523
  componentDidMount() {
524
- this.handleAnswerBlockDomUpdate(), this.updateAria(), setTimeout(() => l(this.root), 100);
524
+ this.handleAnswerBlockDomUpdate(), this.updateAria(), setTimeout(() => c(this.root), 100);
525
525
  }
526
526
  componentDidUpdate(e, t) {
527
527
  this.handleAnswerBlockDomUpdate(), (e.model?.config?.responseType !== this.props.model?.config?.responseType || e.model?.language !== this.props.model?.language) && this.updateAria();
@@ -549,7 +549,7 @@ var we = class extends S.Component {
549
549
  }, 0);
550
550
  };
551
551
  handleKeyDown = (e, t) => {
552
- let n = be(e.target, this.root), r = this.mqStatic && this.mqStatic.inputRef?.current ? this.mqStatic.inputRef?.current.contains(document.activeElement) : !!document.activeElement?.closest(".mq-editable-field"), { key: i, type: a } = e;
552
+ let n = xe(e.target, this.root), r = this.mqStatic && this.mqStatic.inputRef?.current ? this.mqStatic.inputRef?.current.contains(document.activeElement) : !!document.activeElement?.closest(".mq-editable-field"), { key: i, type: a } = e;
553
553
  r && (i === "ArrowDown" || a === "click" || a === "touchstart") ? this.state.activeAnswerBlock !== t && n && (this.cleanupKeyDownListener(), this.setState({ activeAnswerBlock: t }, () => {
554
554
  this.onSubFieldFocus(t), i === "ArrowDown" && this.focusFirstKeypadElement();
555
555
  })) : e.key === "Escape" && this.setState({ activeAnswerBlock: "" });
@@ -602,7 +602,7 @@ var we = class extends S.Component {
602
602
  this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
603
603
  };
604
604
  subFieldChanged = (e, t) => {
605
- if (ee(), e) {
605
+ if (d(), e) {
606
606
  let n = window.scrollX, r = window.scrollY;
607
607
  this.setState((n) => ({ session: {
608
608
  ...n.session,
@@ -642,57 +642,57 @@ var we = class extends S.Component {
642
642
  };
643
643
  setTooltipRef(e) {
644
644
  setTimeout(() => {
645
- if (e && ve) {
645
+ if (e && ye) {
646
646
  let e = document.querySelector("[role='tooltip']");
647
647
  e && e.firstChild.setAttribute("tabindex", "-1");
648
648
  }
649
649
  }, 1);
650
650
  }
651
651
  render() {
652
- let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: i, tooltipContainerRef: o } = this.state, { config: s, correctness: c, disabled: l, extraCSSRules: d, view: ee, teacherInstructions: f, rationale: p, feedback: m, animationsDisabled: h, printMode: _, alwaysShowCorrect: v, language: b } = e || {};
652
+ let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, session: a, tooltipContainerRef: o } = this.state, { config: s, correctness: c, disabled: u, extraCSSRules: d, view: f, teacherInstructions: p, rationale: m, feedback: h, animationsDisabled: g, printMode: _, alwaysShowCorrect: b, language: S } = e || {};
653
653
  if (!s) return null;
654
- let { showNote: x, note: S, prompt: C, responses: E, responseType: D, equationEditor: O, customKeys: k, env: { mode: A, role: j } = {} } = s || {}, M = (n || A === "view" && j === "instructor") && x && S, N = r(E), P = !N && c && c.correctness !== "correct", F = l && c, I = ye(k), L = c && c.correct, R = Se(e, this.state) || "", z = l && !c, B = _ && !v, V = p && (a(p) || u(p)), H = f && (a(f) || u(f)), ie = /* @__PURE__ */ w(Pe, { children: /* @__PURE__ */ w(g.Static, {
654
+ let { showNote: C, note: w, prompt: T, responses: O, responseType: k, equationEditor: A, customKeys: j, env: { mode: M, role: N } = {} } = s || {}, P = (n || M === "view" && N === "instructor") && C && w, F = r(O), I = !F && c && c.correctness !== "correct", L = u && c, R = be(j), z = c && c.correct, B = Ce(e, this.state) || "", V = u && !c, H = _ && !b, U = m && (i(m) || l(m)), W = p && (i(p) || l(p)), re = /* @__PURE__ */ E(Fe, { children: /* @__PURE__ */ E(v.Static, {
655
655
  className: "static-math",
656
656
  ref: (e) => {
657
657
  e && (this.mqStatic = e);
658
658
  },
659
- latex: R,
660
- language: b,
659
+ latex: B,
660
+ language: S,
661
661
  onSubFieldChange: this.subFieldChanged,
662
662
  getFieldName: this.getFieldName,
663
663
  setInput: this.setInput,
664
664
  onSubFieldFocus: this.onSubFieldFocus,
665
665
  onBlur: this.onBlur
666
- }) }), U = /* @__PURE__ */ T(ke, { children: [
667
- A === "gather" && /* @__PURE__ */ w(Fe, { children: Z.t("mathInline.mathEquationResponseQuestion", { lng: b }) }),
668
- z && H && (h ? /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: f } }) : /* @__PURE__ */ w($, {
666
+ }) }), G = /* @__PURE__ */ D(Ae, { children: [
667
+ M === "gather" && /* @__PURE__ */ E(Ie, { children: Z.t("mathInline.mathEquationResponseQuestion", { lng: S }) }),
668
+ V && W && (g ? /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(p) } }) : /* @__PURE__ */ E($, {
669
669
  labels: {
670
- hidden: Z.t("common:showTeacherInstructions", { lng: b }),
671
- visible: Z.t("common:hideTeacherInstructions", { lng: b })
670
+ hidden: Z.t("common:showTeacherInstructions", { lng: S }),
671
+ visible: Z.t("common:hideTeacherInstructions", { lng: S })
672
672
  },
673
- children: /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: f } })
673
+ children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(p) } })
674
674
  })),
675
- C && /* @__PURE__ */ w(Oe, { children: /* @__PURE__ */ w(q, { prompt: C }) }),
676
- B ? ie : /* @__PURE__ */ w(fe, {
675
+ T && /* @__PURE__ */ E(ke, { children: /* @__PURE__ */ E(J, { prompt: T }) }),
676
+ H ? re : /* @__PURE__ */ E(fe, {
677
677
  false: !0,
678
- children: /* @__PURE__ */ T(Ne, {
678
+ children: /* @__PURE__ */ D(Pe, {
679
679
  tabIndex: 0,
680
- children: [D === W.simple && /* @__PURE__ */ w(ue, {
680
+ children: [k === se.simple && /* @__PURE__ */ E(ue, {
681
681
  onSimpleResponseChange: this.onSimpleResponseChange,
682
682
  showCorrect: n,
683
- emptyResponse: N,
683
+ emptyResponse: F,
684
684
  model: e,
685
- session: i,
685
+ session: a,
686
686
  onSubFieldFocus: this.onSubFieldFocus,
687
687
  showKeypad: !!t
688
- }), D === W.advanced && /* @__PURE__ */ w(Me, {
688
+ }), k === se.advanced && /* @__PURE__ */ E(Ne, {
689
689
  ref: o,
690
- isIncorrect: !N && !L && !n,
691
- isCorrect: !N && (L || n),
692
- showCorrectness: !N && l && c && !ee,
690
+ isIncorrect: !F && !z && !n,
691
+ isCorrect: !F && (z || n),
692
+ showCorrectness: !F && u && c && !f,
693
693
  correctAnswerShown: n,
694
- printCorrect: _ && v,
695
- children: /* @__PURE__ */ w(ne, {
694
+ printCorrect: _ && b,
695
+ children: /* @__PURE__ */ E(te, {
696
696
  ref: (e) => this.setTooltipRef(e),
697
697
  enterTouchDelay: 0,
698
698
  interactive: !0,
@@ -742,22 +742,22 @@ var we = class extends S.Component {
742
742
  boxShadow: "none"
743
743
  } }
744
744
  },
745
- title: Object.keys(i.answers).map((e) => e === t && !(n || l) && /* @__PURE__ */ w(je, {
745
+ title: Object.keys(a.answers).map((e) => e === t && !(n || u) && /* @__PURE__ */ E(Me, {
746
746
  "data-keypad": !0,
747
- style: { width: xe(I, O) },
748
- children: /* @__PURE__ */ w(te, {
749
- additionalKeys: I,
750
- mode: O || _e,
747
+ style: { width: Se(R, A) },
748
+ children: /* @__PURE__ */ E(ee, {
749
+ additionalKeys: R,
750
+ mode: A || ve,
751
751
  onClick: this.onClick
752
752
  })
753
753
  }, e) || null),
754
- children: /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w(g.Static, {
754
+ children: /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(v.Static, {
755
755
  className: "static-math",
756
756
  ref: (e) => {
757
757
  e && (this.mqStatic = e);
758
758
  },
759
- latex: R,
760
- language: b,
759
+ latex: B,
760
+ language: S,
761
761
  onSubFieldChange: this.subFieldChanged,
762
762
  getFieldName: this.getFieldName,
763
763
  setInput: this.setInput,
@@ -768,22 +768,22 @@ var we = class extends S.Component {
768
768
  })]
769
769
  })
770
770
  }),
771
- z && M && /* @__PURE__ */ w(Ae, { dangerouslySetInnerHTML: { __html: `<strong>Note:</strong> ${S}` } }),
772
- z && V && (h ? /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: p } }) : /* @__PURE__ */ w(pe, {
771
+ V && P && /* @__PURE__ */ E(je, { dangerouslySetInnerHTML: { __html: `<strong>Note:</strong> ${x(w)}` } }),
772
+ V && U && (g ? /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(m) } }) : /* @__PURE__ */ E(pe, {
773
773
  labels: {
774
- hidden: Z.t("common:showRationale", { lng: b }),
775
- visible: Z.t("common:hideRationale", { lng: b })
774
+ hidden: Z.t("common:showRationale", { lng: S }),
775
+ visible: Z.t("common:hideRationale", { lng: S })
776
776
  },
777
- children: /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: p } })
777
+ children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: x(m) } })
778
778
  }))
779
779
  ] });
780
- return F && (P || H || V || m) ? /* @__PURE__ */ w(Ee, {
780
+ return L && (I || W || U || h) ? /* @__PURE__ */ E(De, {
781
781
  extraCSSRules: d,
782
782
  ref: (e) => {
783
- let t = re.findDOMNode(e);
783
+ let t = ne.findDOMNode(e);
784
784
  this.root = t || this.root;
785
785
  },
786
- children: /* @__PURE__ */ w(De, {
786
+ children: /* @__PURE__ */ E(Oe, {
787
787
  interactive: !0,
788
788
  enterTouchDelay: 0,
789
789
  placement: "bottom-start",
@@ -804,51 +804,51 @@ var we = class extends S.Component {
804
804
  }]
805
805
  }
806
806
  },
807
- title: /* @__PURE__ */ T("div", { children: [
808
- /* @__PURE__ */ w(ke, { children: P && /* @__PURE__ */ w(Ie, {
809
- language: b,
807
+ title: /* @__PURE__ */ D("div", { children: [
808
+ /* @__PURE__ */ E(Ae, { children: I && /* @__PURE__ */ E(Le, {
809
+ language: S,
810
810
  show: !0,
811
811
  toggled: n,
812
812
  onToggle: this.toggleShowCorrect
813
813
  }) }),
814
- H && /* @__PURE__ */ w($, {
814
+ W && /* @__PURE__ */ E($, {
815
815
  labels: {
816
- hidden: Z.t("common:showTeacherInstructions", { lng: b }),
817
- visible: Z.t("common:hideTeacherInstructions", { lng: b })
816
+ hidden: Z.t("common:showTeacherInstructions", { lng: S }),
817
+ visible: Z.t("common:hideTeacherInstructions", { lng: S })
818
818
  },
819
- children: /* @__PURE__ */ w(q, { prompt: f })
819
+ children: /* @__PURE__ */ E(J, { prompt: p })
820
820
  }, "collapsible-teacher-instructions"),
821
- M && a(S) && /* @__PURE__ */ w($, {
821
+ P && i(w) && /* @__PURE__ */ E($, {
822
822
  labels: {
823
- hidden: Z.t("common:showNote", { lng: b }),
824
- visible: Z.t("common:hideNote", { lng: b })
823
+ hidden: Z.t("common:showNote", { lng: S }),
824
+ visible: Z.t("common:hideNote", { lng: S })
825
825
  },
826
- children: /* @__PURE__ */ w(q, { prompt: S })
826
+ children: /* @__PURE__ */ E(J, { prompt: w })
827
827
  }, "collapsible-note"),
828
- V && /* @__PURE__ */ w($, {
828
+ U && /* @__PURE__ */ E($, {
829
829
  labels: {
830
- hidden: Z.t("common:showRationale", { lng: b }),
831
- visible: Z.t("common:hideRationale", { lng: b })
830
+ hidden: Z.t("common:showRationale", { lng: S }),
831
+ visible: Z.t("common:hideRationale", { lng: S })
832
832
  },
833
- children: /* @__PURE__ */ w(q, { prompt: p })
833
+ children: /* @__PURE__ */ E(J, { prompt: m })
834
834
  }, "collapsible-rationale"),
835
- m && /* @__PURE__ */ w(me, {
835
+ h && /* @__PURE__ */ E(me, {
836
836
  correctness: c.correctness,
837
- feedback: m
837
+ feedback: h
838
838
  })
839
839
  ] }),
840
- children: U
840
+ children: G
841
841
  })
842
- }) : /* @__PURE__ */ w(Ee, {
842
+ }) : /* @__PURE__ */ E(De, {
843
843
  extraCSSRules: d,
844
844
  ref: (e) => {
845
- let t = re.findDOMNode(e);
845
+ let t = ne.findDOMNode(e);
846
846
  this.root = t || this.root;
847
847
  },
848
- children: U
848
+ children: G
849
849
  });
850
850
  }
851
- }, Te = () => ({
851
+ }, Ee = () => ({
852
852
  blockContainer: "block-container",
853
853
  blockResponse: "block-response",
854
854
  blockMath: "block-math"
@@ -902,20 +902,20 @@ if (typeof document < "u") {
902
902
  `, document.head.appendChild(t);
903
903
  }
904
904
  }
905
- var Ee = m(de)(() => ({
905
+ var De = f(de)(() => ({
906
906
  color: y.text(),
907
907
  backgroundColor: y.background(),
908
908
  display: "inline-block"
909
- })), De = m(ne)({}), Oe = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ke = m("div")({
909
+ })), Oe = f(te)({}), ke = f("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Ae = f("div")({
910
910
  width: "100%",
911
911
  position: "relative",
912
912
  backgroundColor: y.background(),
913
913
  color: y.text()
914
- }), Ae = m("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), $ = m(pe)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), je = m("div")(({ theme: e }) => ({
914
+ }), je = f("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), $ = f(pe)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Me = f("div")(({ theme: e }) => ({
915
915
  zIndex: 10,
916
916
  minWidth: "400px",
917
917
  marginTop: e.spacing(2)
918
- })), Me = m("div", { shouldForwardProp: (e) => ![
918
+ })), Ne = f("div", { shouldForwardProp: (e) => ![
919
919
  "isIncorrect",
920
920
  "isCorrect",
921
921
  "showCorrectness",
@@ -945,7 +945,7 @@ var Ee = m(de)(() => ({
945
945
  "& sup": { top: 0 }
946
946
  }
947
947
  };
948
- }), Ne = m("div")({
948
+ }), Pe = f("div")({
949
949
  position: "relative",
950
950
  "& .mq-overarrow-inner": {
951
951
  border: "none !important",
@@ -975,21 +975,21 @@ var Ee = m(de)(() => ({
975
975
  paddingTop: "1.5px !important"
976
976
  },
977
977
  "& .mq-parallelogram": { lineHeight: .85 }
978
- }), Pe = m("div")(({ theme: e }) => ({
978
+ }), Fe = f("div")(({ theme: e }) => ({
979
979
  marginBottom: e.spacing(1),
980
980
  pointerEvents: "none"
981
- })), Fe = m("h2")({
981
+ })), Ie = f("h2")({
982
982
  position: "absolute",
983
983
  left: "-10000px",
984
984
  top: "auto",
985
985
  width: "1px",
986
986
  height: "1px",
987
987
  overflow: "hidden"
988
- }), Ie = m(se)(({ theme: e }) => ({
988
+ }), Le = f(oe)(({ theme: e }) => ({
989
989
  color: y.text(),
990
990
  marginBottom: e.spacing(2)
991
991
  }));
992
992
  //#endregion
993
- export { we as t };
993
+ export { Te as t };
994
994
 
995
- //# sourceMappingURL=main-BhJ6__1J.js.map
995
+ //# sourceMappingURL=main-CSiqPOLM.js.map