@pie-element/multiple-choice 14.0.3-next.20261007184841 → 14.0.3

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 (30) hide show
  1. package/dist/browser/{editor-runtime/Radio-DunACTpA.js → Radio-CdxrHstE.js} +3324 -3361
  2. package/dist/browser/Radio-CdxrHstE.js.map +1 -0
  3. package/dist/browser/author/index.js +6696 -6696
  4. package/dist/browser/author/index.js.map +1 -1
  5. package/dist/browser/delivery/index.js +9 -9
  6. package/dist/browser/{Radio-D8xV6gXW.js → editor-runtime/Radio-BO3TWJnT.js} +3114 -3151
  7. package/dist/browser/editor-runtime/Radio-BO3TWJnT.js.map +1 -0
  8. package/dist/browser/editor-runtime/author/index.js +1659 -1659
  9. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  10. package/dist/browser/editor-runtime/delivery/index.js +10 -10
  11. package/dist/browser/editor-runtime/{main-CrByvp15.js → main-nz8Bp_TJ.js} +348 -362
  12. package/dist/browser/editor-runtime/main-nz8Bp_TJ.js.map +1 -0
  13. package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-CWQwfvI5.js → mathjax-BKrHE4xs-DtsPQ6Zq.js} +14 -14
  14. package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-CWQwfvI5.js.map → mathjax-BKrHE4xs-DtsPQ6Zq.js.map} +1 -1
  15. package/dist/browser/editor-runtime/print/index.js +3 -3
  16. package/dist/browser/{main-Clsf7I8G.js → main-CIn-5xKa.js} +348 -362
  17. package/dist/browser/main-CIn-5xKa.js.map +1 -0
  18. package/dist/browser/{mathjax-BKrHE4xs-DVnrK6qA.js → mathjax-BKrHE4xs-CyELJtN1.js} +16 -16
  19. package/dist/browser/{mathjax-BKrHE4xs-DVnrK6qA.js.map → mathjax-BKrHE4xs-CyELJtN1.js.map} +1 -1
  20. package/dist/browser/print/index.js +2 -2
  21. package/dist/delivery/choice-input.js +91 -105
  22. package/dist/index.iife.js +21 -21
  23. package/module/print.js +977 -1028
  24. package/module/print.js.map +1 -1
  25. package/package.json +12 -12
  26. package/dist/browser/Radio-D8xV6gXW.js.map +0 -1
  27. package/dist/browser/editor-runtime/Radio-DunACTpA.js.map +0 -1
  28. package/dist/browser/editor-runtime/main-CrByvp15.js.map +0 -1
  29. package/dist/browser/main-Clsf7I8G.js.map +0 -1
  30. package/dist/delivery/__tests__/math-control-names.test.d.ts +0 -1
@@ -1,8 +1,8 @@
1
- import { Et as e, Gt as t, M as n, N as r, Ot as i, T as a, Tt as o, U as s, Xt as c, _ as l, c as u, g as d, i as f, m as p, n as m, o as h, qt as g, s as _, t as v, wt as y, zt as b } from "./Radio-D8xV6gXW.js";
2
- import x, { useRef as S } from "react";
3
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
1
+ import { Ct as e, Dt as t, H as n, Kt as r, M as i, Rt as a, Tt as o, Wt as s, Yt as c, g as l, h as u, i as d, j as f, n as p, o as m, p as h, s as g, t as _, w as v, wt as y } from "./Radio-CdxrHstE.js";
2
+ import b, { useRef as x } from "react";
3
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
4
4
  //#region ../../lib-react/icons/dist/correct-response-icon.js
5
- var E = /* @__PURE__ */ c(g(), 1), D = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ T("svg", {
5
+ var T = /* @__PURE__ */ c(r(), 1), E = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ w("svg", {
6
6
  "aria-hidden": "true",
7
7
  focusable: "false",
8
8
  preserveAspectRatio: "xMinYMin meet",
@@ -10,27 +10,27 @@ var E = /* @__PURE__ */ c(g(), 1), D = ({ bgFill: e, fgFill: t }) => /* @__PURE_
10
10
  viewBox: "-283 359 34 35",
11
11
  style: { enableBackground: "new -283 359 34 35" },
12
12
  children: [
13
- /* @__PURE__ */ w("circle", {
13
+ /* @__PURE__ */ C("circle", {
14
14
  cx: "-266",
15
15
  cy: "375.9",
16
16
  r: "14",
17
17
  fill: e
18
18
  }),
19
- /* @__PURE__ */ w("path", {
19
+ /* @__PURE__ */ C("path", {
20
20
  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",
21
21
  fill: e
22
22
  }),
23
- /* @__PURE__ */ w("polygon", {
23
+ /* @__PURE__ */ C("polygon", {
24
24
  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",
25
25
  fill: t
26
26
  })
27
27
  ]
28
28
  });
29
- D.propTypes = {
30
- bgFill: E.default.string.isRequired,
31
- fgFill: E.default.string.isRequired
29
+ E.propTypes = {
30
+ bgFill: T.default.string.isRequired,
31
+ fgFill: T.default.string.isRequired
32
32
  };
33
- var O = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
33
+ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
34
34
  "aria-hidden": "true",
35
35
  focusable: "false",
36
36
  preserveAspectRatio: "xMinYMin meet",
@@ -38,7 +38,7 @@ var O = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
38
38
  viewBox: "-129.5 127 34 35",
39
39
  style: { enableBackground: "new -129.5 127 34 35" },
40
40
  children: [
41
- /* @__PURE__ */ w("path", {
41
+ /* @__PURE__ */ C("path", {
42
42
  style: {
43
43
  fill: "#D0CAC5",
44
44
  stroke: "#E6E3E0",
@@ -47,7 +47,7 @@ var O = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
47
47
  },
48
48
  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"
49
49
  }),
50
- /* @__PURE__ */ w("path", {
50
+ /* @__PURE__ */ C("path", {
51
51
  style: {
52
52
  fill: "#B3ABA4",
53
53
  stroke: "#CDC7C2",
@@ -56,48 +56,48 @@ var O = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
56
56
  },
57
57
  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"
58
58
  }),
59
- /* @__PURE__ */ w("circle", {
59
+ /* @__PURE__ */ C("circle", {
60
60
  cx: "-114.2",
61
61
  cy: "143.5",
62
62
  r: "14",
63
63
  fill: e
64
64
  }),
65
- /* @__PURE__ */ w("path", {
65
+ /* @__PURE__ */ C("path", {
66
66
  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",
67
67
  fill: n
68
68
  }),
69
- /* @__PURE__ */ w("polygon", {
69
+ /* @__PURE__ */ C("polygon", {
70
70
  points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
71
71
  fill: t
72
72
  })
73
73
  ]
74
74
  });
75
- O.propTypes = {
76
- bgFill: E.default.string.isRequired,
77
- fgFill: E.default.string.isRequired,
78
- borderFill: E.default.string.isRequired
75
+ D.propTypes = {
76
+ bgFill: T.default.string.isRequired,
77
+ fgFill: T.default.string.isRequired,
78
+ borderFill: T.default.string.isRequired
79
79
  };
80
- var k = i("div")(({ size: e }) => ({
80
+ var O = t("div")(({ size: e }) => ({
81
81
  width: e || "25px",
82
82
  height: e || "25px"
83
- })), A = ({ open: e, size: t }) => /* @__PURE__ */ w(k, {
83
+ })), k = ({ open: e, size: t }) => /* @__PURE__ */ C(O, {
84
84
  size: t,
85
- children: e ? /* @__PURE__ */ w(D, {
85
+ children: e ? /* @__PURE__ */ C(E, {
86
86
  bgFill: "#bce2ff",
87
87
  fgFill: "#1a9cff"
88
- }) : /* @__PURE__ */ w(O, {
88
+ }) : /* @__PURE__ */ C(D, {
89
89
  bgFill: "white",
90
90
  fgFill: "#1a9cff",
91
91
  borderFill: "#bce2ff"
92
92
  })
93
93
  });
94
- A.propTypes = {
95
- open: E.default.bool,
96
- size: E.default.string
97
- }, A.defaultProps = { open: !1 };
94
+ k.propTypes = {
95
+ open: T.default.bool,
96
+ size: T.default.string
97
+ }, k.defaultProps = { open: !1 };
98
98
  //#endregion
99
99
  //#region ../../lib-react/correct-answer-toggle/dist/expander.js
100
- var j = "height ease-in 300ms, opacity ease-in 300ms", M = i("div")(() => ({
100
+ var A = "height ease-in 300ms, opacity ease-in 300ms", j = t("div")(() => ({
101
101
  position: "relative",
102
102
  height: 0,
103
103
  overflow: "hidden",
@@ -105,7 +105,7 @@ var j = "height ease-in 300ms, opacity ease-in 300ms", M = i("div")(() => ({
105
105
  visibility: "hidden",
106
106
  width: 0,
107
107
  "&.enter": {
108
- transition: j,
108
+ transition: A,
109
109
  opacity: 1,
110
110
  height: "auto",
111
111
  width: "auto",
@@ -119,7 +119,7 @@ var j = "height ease-in 300ms, opacity ease-in 300ms", M = i("div")(() => ({
119
119
  minHeight: "25px"
120
120
  },
121
121
  "&.exit": {
122
- transition: j,
122
+ transition: A,
123
123
  opacity: 0,
124
124
  height: 0,
125
125
  visibility: "visible",
@@ -131,11 +131,11 @@ var j = "height ease-in 300ms, opacity ease-in 300ms", M = i("div")(() => ({
131
131
  height: 0,
132
132
  width: 0
133
133
  }
134
- })), N = (t) => {
135
- let { show: n, children: r, className: i } = t, a = S(null);
136
- return /* @__PURE__ */ w(e, {
137
- nodeRef: a,
138
- in: n,
134
+ })), M = (e) => {
135
+ let { show: t, children: n, className: r } = e, i = x(null);
136
+ return /* @__PURE__ */ C(o, {
137
+ nodeRef: i,
138
+ in: t,
139
139
  appear: !0,
140
140
  mountOnEnter: !1,
141
141
  timeout: 300,
@@ -145,37 +145,37 @@ var j = "height ease-in 300ms, opacity ease-in 300ms", M = i("div")(() => ({
145
145
  exit: "exit",
146
146
  exitDone: "exit-done"
147
147
  },
148
- children: /* @__PURE__ */ w(M, {
149
- ref: a,
150
- className: i,
151
- children: r
148
+ children: /* @__PURE__ */ C(j, {
149
+ ref: i,
150
+ className: r,
151
+ children: n
152
152
  })
153
153
  });
154
154
  };
155
- N.propTypes = {
156
- show: E.default.bool.isRequired,
157
- className: E.default.string,
158
- children: E.default.oneOfType([E.default.arrayOf(E.default.node), E.default.node]).isRequired
155
+ M.propTypes = {
156
+ show: T.default.bool.isRequired,
157
+ className: T.default.string,
158
+ children: T.default.oneOfType([T.default.arrayOf(T.default.node), T.default.node]).isRequired
159
159
  };
160
160
  //#endregion
161
161
  //#region ../../lib-react/correct-answer-toggle/dist/index.js
162
- function P(e) {
162
+ function N(e) {
163
163
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
164
164
  }
165
- function F(e, t) {
166
- 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;
165
+ function P(e, t) {
166
+ return !e || N(e) ? e : N(e.default) ? e.default : t && N(e[t]) ? e[t] : t && N(e[t]?.default) ? e[t].default : e;
167
167
  }
168
- var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default, ne = I && typeof I == "object" ? I : te, { translator: L } = r, re = {
168
+ var F = P(u, "Readable") || P(ee.Readable, "Readable"), I = g, L = I.default, ee = L && typeof L == "object" ? L : I, { translator: R } = i, te = {
169
169
  WebkitTouchCallout: "none",
170
170
  WebkitUserSelect: "none",
171
171
  KhtmlUserSelect: "none",
172
172
  MozUserSelect: "none",
173
173
  msUserSelect: "none",
174
174
  userSelect: "none"
175
- }, ie = i("div")(() => ({
175
+ }, ne = t("div")(() => ({
176
176
  width: "100%",
177
177
  cursor: "pointer"
178
- })), ae = i("button")(() => ({
178
+ })), re = t("button")(() => ({
179
179
  margin: "0 auto",
180
180
  textAlign: "center",
181
181
  display: "flex",
@@ -188,18 +188,18 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
188
188
  font: "inherit",
189
189
  cursor: "pointer",
190
190
  "&:focus-visible": {
191
- outline: `2px solid ${t.buttonFocusOutline()}`,
191
+ outline: `2px solid ${s.buttonFocusOutline()}`,
192
192
  outlineOffset: "-2px"
193
193
  }
194
- })), oe = i("div")(() => ({
194
+ })), ie = t("div")(() => ({
195
195
  width: "fit-content",
196
196
  minWidth: "140px",
197
197
  alignSelf: "center",
198
198
  verticalAlign: "middle",
199
- color: `var(--correct-answer-toggle-label-color, ${t.text()})`,
199
+ color: `var(--correct-answer-toggle-label-color, ${s.text()})`,
200
200
  fontWeight: "normal",
201
- ...re
202
- })), R = i("div")(() => ({
201
+ ...te
202
+ })), ae = t("div")(() => ({
203
203
  position: "absolute",
204
204
  width: "25px",
205
205
  "&.enter": { opacity: "0" },
@@ -212,20 +212,20 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
212
212
  opacity: "0",
213
213
  transition: "opacity 0.3s ease-in"
214
214
  }
215
- })), se = i("div")(() => ({
215
+ })), oe = t("div")(() => ({
216
216
  width: "25px",
217
217
  marginRight: "5px",
218
218
  display: "flex",
219
219
  alignItems: "center"
220
- })), ce = class t extends x.Component {
220
+ })), se = class e extends b.Component {
221
221
  static propTypes = {
222
- onToggle: E.default.func,
223
- toggled: E.default.bool,
224
- show: E.default.bool,
225
- hideMessage: E.default.string,
226
- showMessage: E.default.string,
227
- className: E.default.string,
228
- language: E.default.string
222
+ onToggle: T.default.func,
223
+ toggled: T.default.bool,
224
+ show: T.default.bool,
225
+ hideMessage: T.default.string,
226
+ showMessage: T.default.string,
227
+ className: T.default.string,
228
+ language: T.default.string
229
229
  };
230
230
  static defaultProps = {
231
231
  showMessage: "Show correct answer",
@@ -233,11 +233,11 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
233
233
  show: !1,
234
234
  toggled: !1
235
235
  };
236
- constructor(e) {
237
- super(e), this.state = { show: e.show }, this.openIconRef = x.createRef(), this.closedIconRef = x.createRef(), t.defaultProps = {
238
- ...t.defaultProps,
239
- showMessage: L.t("common:showCorrectAnswer", { lng: e.language }),
240
- hideMessage: L.t("common:hideCorrectAnswer", { lng: e.language })
236
+ constructor(t) {
237
+ super(t), this.state = { show: t.show }, this.openIconRef = b.createRef(), this.closedIconRef = b.createRef(), e.defaultProps = {
238
+ ...e.defaultProps,
239
+ showMessage: R.t("common:showCorrectAnswer", { lng: t.language }),
240
+ hideMessage: R.t("common:hideCorrectAnswer", { lng: t.language })
241
241
  };
242
242
  }
243
243
  onClick() {
@@ -246,66 +246,66 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
246
246
  onTouch(e) {
247
247
  e.preventDefault(), this.props.onToggle(!this.props.toggled);
248
248
  }
249
- UNSAFE_componentWillReceiveProps(e) {
250
- this.setState({ show: e.show }), e.language !== this.props?.language && (t.defaultProps = {
251
- ...t.defaultProps,
252
- showMessage: L.t("common:showCorrectAnswer", { lng: e.language }),
253
- hideMessage: L.t("common:hideCorrectAnswer", { lng: e.language })
249
+ UNSAFE_componentWillReceiveProps(t) {
250
+ this.setState({ show: t.show }), t.language !== this.props?.language && (e.defaultProps = {
251
+ ...e.defaultProps,
252
+ showMessage: R.t("common:showCorrectAnswer", { lng: t.language }),
253
+ hideMessage: R.t("common:hideCorrectAnswer", { lng: t.language })
254
254
  });
255
255
  }
256
256
  render() {
257
- let { className: t, toggled: n, hideMessage: r, showMessage: i } = this.props;
258
- return /* @__PURE__ */ w(ie, {
259
- className: t,
260
- children: /* @__PURE__ */ w(N, {
257
+ let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
258
+ return /* @__PURE__ */ C(ne, {
259
+ className: e,
260
+ children: /* @__PURE__ */ C(M, {
261
261
  show: this.state.show,
262
- children: /* @__PURE__ */ T(ae, {
262
+ children: /* @__PURE__ */ w(re, {
263
263
  type: "button",
264
- "aria-pressed": !!n,
264
+ "aria-pressed": !!t,
265
265
  onClick: this.onClick.bind(this),
266
266
  onTouchEnd: this.onTouch.bind(this),
267
- children: [/* @__PURE__ */ T(se, { children: [/* @__PURE__ */ w(e, {
267
+ children: [/* @__PURE__ */ w(oe, { children: [/* @__PURE__ */ C(o, {
268
268
  nodeRef: this.openIconRef,
269
269
  timeout: 400,
270
- in: n,
271
- exit: !n,
270
+ in: t,
271
+ exit: !t,
272
272
  classNames: {
273
273
  enter: "enter",
274
274
  enterActive: "enter-active",
275
275
  exit: "exit",
276
276
  exitActive: "exit-active"
277
277
  },
278
- children: /* @__PURE__ */ w(R, {
278
+ children: /* @__PURE__ */ C(ae, {
279
279
  ref: this.openIconRef,
280
- children: /* @__PURE__ */ w(A, { open: n }, "correct-open")
280
+ children: /* @__PURE__ */ C(k, { open: t }, "correct-open")
281
281
  })
282
- }), /* @__PURE__ */ w(e, {
282
+ }), /* @__PURE__ */ C(o, {
283
283
  nodeRef: this.closedIconRef,
284
284
  timeout: 5e3,
285
- in: !n,
286
- exit: n,
285
+ in: !t,
286
+ exit: t,
287
287
  classNames: {
288
288
  enter: "enter",
289
289
  enterActive: "enter-active",
290
290
  exit: "exit",
291
291
  exitActive: "exit-active"
292
292
  },
293
- children: /* @__PURE__ */ w(R, {
293
+ children: /* @__PURE__ */ C(ae, {
294
294
  ref: this.closedIconRef,
295
- children: /* @__PURE__ */ w(A, { open: n }, "correct-closed")
295
+ children: /* @__PURE__ */ C(k, { open: t }, "correct-closed")
296
296
  })
297
- })] }), /* @__PURE__ */ w(ee, {
297
+ })] }), /* @__PURE__ */ C(F, {
298
298
  false: !0,
299
- children: /* @__PURE__ */ w(oe, {
299
+ children: /* @__PURE__ */ C(ie, {
300
300
  "aria-hidden": !this.state.show,
301
- children: n ? r : i
301
+ children: t ? n : r
302
302
  })
303
303
  })]
304
304
  })
305
305
  })
306
306
  });
307
307
  }
308
- }, le = i(h)({
308
+ }, ce = t(m)({
309
309
  width: "33px",
310
310
  height: "33px",
311
311
  "& svg": {
@@ -316,10 +316,10 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
316
316
  verticalAlign: "middle",
317
317
  "& hide": { display: "none" }
318
318
  }
319
- }), ue = i("svg")({
320
- "& .incorrect-fill": { fill: t.incorrect() },
321
- "& .correct-fill": { fill: t.correct() }
322
- }), de = i("div")({
319
+ }), le = t("svg")({
320
+ "& .incorrect-fill": { fill: s.incorrect() },
321
+ "& .correct-fill": { fill: s.correct() }
322
+ }), ue = t("div")({
323
323
  position: "relative",
324
324
  "&.feedback-tick-enter": {
325
325
  opacity: "0",
@@ -339,25 +339,25 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
339
339
  left: "-50px",
340
340
  transition: "left 300ms ease-in, opacity 300ms"
341
341
  }
342
- }), fe = class extends x.Component {
343
- static propTypes = { correctness: E.default.string };
342
+ }), de = class extends b.Component {
343
+ static propTypes = { correctness: T.default.string };
344
344
  constructor(e) {
345
- super(e), this.nodeRef = x.createRef();
345
+ super(e), this.nodeRef = b.createRef();
346
346
  }
347
- getIncorrectIcon = () => /* @__PURE__ */ w(ue, {
347
+ getIncorrectIcon = () => /* @__PURE__ */ C(le, {
348
348
  preserveAspectRatio: "xMinYMin meet",
349
349
  x: "0px",
350
350
  y: "0px",
351
351
  viewBox: "0 0 44 40",
352
352
  style: { enableBackground: "new 0 0 44 40" },
353
- children: /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w("rect", {
353
+ children: /* @__PURE__ */ w("g", { children: [/* @__PURE__ */ C("rect", {
354
354
  x: "11",
355
355
  y: "17.3",
356
356
  transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",
357
357
  className: "incorrect-fill",
358
358
  width: "16.6",
359
359
  height: "3.7"
360
- }), /* @__PURE__ */ w("rect", {
360
+ }), /* @__PURE__ */ C("rect", {
361
361
  x: "17.4",
362
362
  y: "10.7",
363
363
  transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",
@@ -366,21 +366,21 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
366
366
  height: "16.6"
367
367
  })] })
368
368
  }, "1");
369
- getCorrectIcon = () => /* @__PURE__ */ w(ue, {
369
+ getCorrectIcon = () => /* @__PURE__ */ C(le, {
370
370
  preserveAspectRatio: "xMinYMin meet",
371
371
  version: "1.1",
372
372
  x: "0px",
373
373
  y: "0px",
374
374
  viewBox: "0 0 44 40",
375
375
  style: { enableBackground: "new 0 0 44 40" },
376
- children: /* @__PURE__ */ w("polygon", {
376
+ children: /* @__PURE__ */ C("polygon", {
377
377
  className: "correct-fill",
378
378
  points: "19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"
379
379
  })
380
380
  }, "2");
381
381
  render() {
382
- let { correctness: t } = this.props, n = t === "incorrect" ? this.getIncorrectIcon() : t === "correct" ? this.getCorrectIcon() : null;
383
- return /* @__PURE__ */ w(le, { children: /* @__PURE__ */ w(o, { children: t && /* @__PURE__ */ w(e, {
382
+ let { correctness: e } = this.props, t = e === "incorrect" ? this.getIncorrectIcon() : e === "correct" ? this.getCorrectIcon() : null;
383
+ return /* @__PURE__ */ C(ce, { children: /* @__PURE__ */ C(y, { children: e && /* @__PURE__ */ C(o, {
384
384
  nodeRef: this.nodeRef,
385
385
  classNames: {
386
386
  enter: "feedback-tick-enter",
@@ -392,9 +392,9 @@ var ee = F(d, "Readable") || F(ne.Readable, "Readable"), te = _, I = te.default,
392
392
  enter: 700,
393
393
  exit: 300
394
394
  },
395
- children: /* @__PURE__ */ w(de, {
395
+ children: /* @__PURE__ */ C(ue, {
396
396
  ref: this.nodeRef,
397
- children: n
397
+ children: t
398
398
  })
399
399
  }) }) });
400
400
  }
@@ -407,94 +407,91 @@ function z(e) {
407
407
  function B(e, t) {
408
408
  return !e || z(e) ? e : z(e.default) ? e.default : t && z(e[t]) ? e[t] : t && z(e[t]?.default) ? e[t].default : e;
409
409
  }
410
- var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y, "Feedback") || B(me.Feedback, "Feedback"), H = _, U = H.default, me = U && typeof U == "object" ? U : H, W = "multiple-choice-component", he = i(h)({
410
+ var V = B(l, "PreviewPrompt") || B(W.PreviewPrompt, "PreviewPrompt"), fe = B(e, "Feedback") || B(W.Feedback, "Feedback"), H = g, U = H.default, W = U && typeof U == "object" ? U : H, G = "multiple-choice-component", K = t(m)({
411
411
  display: "flex",
412
412
  alignItems: "center",
413
- backgroundColor: t.background()
414
- }), ge = i(h)({
413
+ backgroundColor: s.background()
414
+ }), pe = t(m)({
415
415
  display: "flex",
416
416
  alignItems: "center",
417
- backgroundColor: t.background(),
417
+ backgroundColor: s.background(),
418
418
  flex: 1,
419
419
  "& .MuiFormControlLabel-root": { marginLeft: "-14px" },
420
420
  "& label": {
421
- color: t.text(),
421
+ color: s.text(),
422
422
  "& > span": { fontSize: "inherit" },
423
423
  "& > .MuiButtonBase-root": { padding: "12px" }
424
424
  }
425
- }), _e = i("span")(({ theme: e }) => ({
425
+ }), me = t("span")(({ theme: e }) => ({
426
426
  display: "flex",
427
427
  alignItems: "center",
428
428
  "& > span": { marginLeft: `-${e.spacing(1)}` }
429
- })), ve = i("span")({
429
+ })), he = t("span")({
430
430
  position: "absolute",
431
431
  left: "-10000px",
432
432
  top: "auto",
433
433
  width: "1px",
434
434
  height: "1px",
435
435
  overflow: "hidden"
436
- }), ye = i(f)({
436
+ }), ge = t(d)({
437
437
  "& .MuiFormControlLabel-label": {
438
- color: `${t.text()} !important`,
439
- backgroundColor: t.background(),
438
+ color: `${s.text()} !important`,
439
+ backgroundColor: s.background(),
440
440
  letterSpacing: "normal"
441
441
  },
442
442
  "&.Mui-disabled *": { cursor: "not-allowed !important" }
443
- }), G = (e, t) => ({ [`&.${W}`]: { color: `var(--choice-input-${e}, ${t}) !important` } }), be = (e) => {
444
- let n = (t) => e ? `${e}-${t}` : t;
443
+ }), q = (e, t) => ({ [`&.${G}`]: { color: `var(--choice-input-${e}, ${t}) !important` } }), _e = (e) => {
444
+ let t = (t) => e ? `${e}-${t}` : t;
445
445
  return {
446
- [n("root")]: {
447
- ...G("color", t.text()),
448
- ...e === "correct" ? G("correct-color", t.text()) : {},
449
- ...e === "incorrect" ? G("incorrect-color", t.incorrect()) : {}
446
+ [t("root")]: {
447
+ ...q("color", s.text()),
448
+ ...e === "correct" ? q("correct-color", s.text()) : {},
449
+ ...e === "incorrect" ? q("incorrect-color", s.incorrect()) : {}
450
450
  },
451
- [n("checked")]: {
452
- ...e === "correct" ? G("correct-selected-color", t.correct()) : {},
453
- ...e === "incorrect" ? G("incorrect-checked", t.incorrect()) : {},
454
- ...e ? {} : G("selected-color", t.primary())
451
+ [t("checked")]: {
452
+ ...e === "correct" ? q("correct-selected-color", s.correct()) : {},
453
+ ...e === "incorrect" ? q("incorrect-checked", s.incorrect()) : {},
454
+ ...e ? {} : q("selected-color", s.primary())
455
455
  },
456
- [n("disabled")]: {
457
- ...G("disabled-color", t.text()),
458
- ...e === "correct" ? G("correct-disabled-color", t.disabled()) : {},
459
- ...e === "incorrect" ? G("incorrect-disabled-color", t.disabled()) : {},
456
+ [t("disabled")]: {
457
+ ...q("disabled-color", s.text()),
458
+ ...e === "correct" ? q("correct-disabled-color", s.disabled()) : {},
459
+ ...e === "incorrect" ? q("incorrect-disabled-color", s.disabled()) : {},
460
460
  opacity: .6,
461
461
  cursor: "not-allowed !important",
462
462
  pointerEvents: "initial !important"
463
463
  },
464
464
  focusVisibleUnchecked: {
465
- outline: `2px solid ${t.focusOutline()}`,
465
+ outline: `2px solid ${s.focusOutline()}`,
466
466
  backgroundColor: "transparent"
467
467
  },
468
468
  focusVisibleChecked: {
469
- outline: `2px solid ${t.focusOutline()}`,
469
+ outline: `2px solid ${s.focusOutline()}`,
470
470
  backgroundColor: "transparent"
471
471
  }
472
472
  };
473
- }, xe = i(m, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: e }) => {
474
- let n = be(e), r = (t) => e ? `${e}-${t}` : t;
473
+ }, ve = t(p, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: e }) => {
474
+ let t = _e(e), n = (t) => e ? `${e}-${t}` : t;
475
475
  return {
476
- [`&.${W}`]: {
477
- ...n[r("root")],
478
- "&.Mui-checked": n[r("checked")],
479
- "&.Mui-disabled": e ? {} : n[r("disabled")],
476
+ [`&.${G}`]: {
477
+ ...t[n("root")],
478
+ "&.Mui-checked": t[n("checked")],
479
+ "&.Mui-disabled": e ? {} : t[n("disabled")],
480
480
  "&:hover:not(.Mui-disabled) svg": {
481
- boxShadow: `0px 0px 0px 2px ${t.focusOutline()}`,
481
+ boxShadow: `0px 0px 0px 2px ${s.focusOutline()}`,
482
482
  borderRadius: "4px"
483
483
  }
484
484
  },
485
485
  "&.Mui-focusVisible": {
486
- "&:not(.Mui-checked)": n.focusVisibleUnchecked,
487
- "&.Mui-checked": n.focusVisibleChecked
486
+ "&:not(.Mui-checked)": t.focusVisibleUnchecked,
487
+ "&.Mui-checked": t.focusVisibleChecked
488
488
  }
489
489
  };
490
- }), Se = (e) => {
491
- let { correctness: t, checked: n, onChange: r, disabled: i, value: a, id: o, onKeyDown: s, inputRef: c, ariaLabel: l } = e;
492
- return /* @__PURE__ */ w(xe, {
490
+ }), ye = (e) => {
491
+ let { correctness: t, checked: n, onChange: r, disabled: i, value: a, id: o, onKeyDown: s, inputRef: c } = e;
492
+ return /* @__PURE__ */ C(ve, {
493
493
  id: o,
494
- slotProps: { input: {
495
- ref: c,
496
- "aria-label": l
497
- } },
494
+ slotProps: { input: { ref: c } },
498
495
  onKeyDown: s,
499
496
  disableRipple: !0,
500
497
  checked: n,
@@ -502,19 +499,19 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
502
499
  disabled: i,
503
500
  value: a,
504
501
  correctness: t,
505
- className: W
502
+ className: G
506
503
  });
507
- }, Ce = i(v, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: e }) => {
508
- let n = be(e), r = (t) => e ? `${e}-${t}` : t;
504
+ }, be = t(_, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: e }) => {
505
+ let t = _e(e), n = (t) => e ? `${e}-${t}` : t;
509
506
  return {
510
- [`&.${W}`]: {
511
- ...n[r("root")],
512
- "&.Mui-checked": n[r("checked")],
513
- "&.Mui-disabled": e ? {} : n[r("disabled")],
514
- "&.Mui-focusVisible:not(.Mui-checked)": n.focusVisibleUnchecked,
515
- "&.Mui-focusVisible.Mui-checked": n.focusVisibleChecked,
507
+ [`&.${G}`]: {
508
+ ...t[n("root")],
509
+ "&.Mui-checked": t[n("checked")],
510
+ "&.Mui-disabled": e ? {} : t[n("disabled")],
511
+ "&.Mui-focusVisible:not(.Mui-checked)": t.focusVisibleUnchecked,
512
+ "&.Mui-focusVisible.Mui-checked": t.focusVisibleChecked,
516
513
  "&:hover:not(.Mui-disabled) svg": {
517
- boxShadow: `0px 0px 0px 2px ${t.focusOutline()}`,
514
+ boxShadow: `0px 0px 0px 2px ${s.focusOutline()}`,
518
515
  borderRadius: "50%"
519
516
  }
520
517
  },
@@ -523,45 +520,42 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
523
520
  "& .MuiTouchRipple-root": { display: "none" }
524
521
  }
525
522
  };
526
- }), we = (e) => {
527
- let { correctness: t, checked: n, onChange: r, disabled: i, value: a, id: o, tagName: s, inputRef: c, ariaLabel: l } = e;
528
- return /* @__PURE__ */ w(Ce, {
523
+ }), xe = (e) => {
524
+ let { correctness: t, checked: n, onChange: r, disabled: i, value: a, id: o, tagName: s, inputRef: c } = e;
525
+ return /* @__PURE__ */ C(be, {
529
526
  id: o,
530
- slotProps: { input: {
531
- ref: c,
532
- "aria-label": l
533
- } },
527
+ slotProps: { input: { ref: c } },
534
528
  disableRipple: !0,
535
529
  checked: n,
536
530
  onChange: r,
537
531
  disabled: i,
538
532
  value: a,
539
533
  correctness: t,
540
- className: W,
534
+ className: G,
541
535
  name: s
542
536
  });
543
- }, Te = class extends x.Component {
537
+ }, Se = class extends b.Component {
544
538
  static propTypes = {
545
- choiceMode: E.default.oneOf(["radio", "checkbox"]),
546
- displayKey: E.default.string,
547
- checked: E.default.bool.isRequired,
548
- correctness: E.default.string,
549
- disabled: E.default.bool.isRequired,
550
- feedback: E.default.string,
551
- label: E.default.string.isRequired,
552
- rationale: E.default.string,
553
- onChange: E.default.func.isRequired,
554
- value: E.default.string.isRequired,
555
- className: E.default.string,
556
- tagName: E.default.string,
557
- hideTick: E.default.bool,
558
- isEvaluateMode: E.default.bool,
559
- choicesLayout: E.default.oneOf([
539
+ choiceMode: T.default.oneOf(["radio", "checkbox"]),
540
+ displayKey: T.default.string,
541
+ checked: T.default.bool.isRequired,
542
+ correctness: T.default.string,
543
+ disabled: T.default.bool.isRequired,
544
+ feedback: T.default.string,
545
+ label: T.default.string.isRequired,
546
+ rationale: T.default.string,
547
+ onChange: T.default.func.isRequired,
548
+ value: T.default.string.isRequired,
549
+ className: T.default.string,
550
+ tagName: T.default.string,
551
+ hideTick: T.default.bool,
552
+ isEvaluateMode: T.default.bool,
553
+ choicesLayout: T.default.oneOf([
560
554
  "vertical",
561
555
  "grid",
562
556
  "horizontal"
563
557
  ]),
564
- isSelectionButtonBelow: E.default.bool
558
+ isSelectionButtonBelow: T.default.bool
565
559
  };
566
560
  static defaultProps = {
567
561
  rationale: null,
@@ -569,7 +563,7 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
569
563
  isEvaluateMode: !1
570
564
  };
571
565
  constructor(e) {
572
- super(e), this.onToggleChoice = this.onToggleChoice.bind(this), this.choiceId = s("choice"), this.descId = `${this.choiceId}-desc`;
566
+ super(e), this.onToggleChoice = this.onToggleChoice.bind(this), this.choiceId = n("choice"), this.descId = `${this.choiceId}-desc`;
573
567
  }
574
568
  onToggleChoice(e) {
575
569
  this.props.onChange(e);
@@ -590,8 +584,8 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
590
584
  c && c.focus();
591
585
  };
592
586
  render() {
593
- let { choiceMode: e, disabled: t, displayKey: n, feedback: r, label: i, correctness: a, className: o, rationale: s, hideTick: c, isEvaluateMode: l, choicesLayout: d, value: f, checked: p, tagName: m, isSelectionButtonBelow: h } = this.props, g = e === "checkbox" ? Se : we, _ = e === "checkbox" ? "checkbox" : "radio-button", v = {
594
- ...d === "horizontal" && { [`& .${W}`]: {
587
+ let { choiceMode: e, disabled: t, displayKey: n, feedback: r, label: i, correctness: o, className: s, rationale: c, hideTick: l, isEvaluateMode: u, choicesLayout: d, value: f, checked: p, tagName: m, isSelectionButtonBelow: h } = this.props, g = e === "checkbox" ? ye : xe, _ = e === "checkbox" ? "checkbox" : "radio-button", v = {
588
+ ...d === "horizontal" && { [`& .${G}`]: {
595
589
  padding: "8px",
596
590
  margin: "4px 0 4px 4px"
597
591
  } },
@@ -600,93 +594,85 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
600
594
  justifyContent: "center",
601
595
  "& > label": { alignItems: "center" }
602
596
  }
603
- }, y = typeof i == "string" && (i.includes("<math") || i.includes("\\(") || i.includes("\\[") || i.includes("<img") || i.includes("data-latex") || i.includes("data-raw") || i.includes("<mjx-container")), x = n ? /* @__PURE__ */ w(ve, {
597
+ }, y = typeof i == "string" && (i.includes("<math") || i.includes("\\(") || i.includes("\\[") || i.includes("<img") || i.includes("data-latex") || i.includes("data-raw") || i.includes("<mjx-container")), b = n ? /* @__PURE__ */ C(he, {
604
598
  id: this.descId,
605
599
  children: y ? `Pick the answer below, ${n}` : n
606
- }) : null, S = /* @__PURE__ */ w(C, { children: n && !h ? /* @__PURE__ */ T(he, {
600
+ }) : null, x = /* @__PURE__ */ C(S, { children: n && !h ? /* @__PURE__ */ w(K, {
607
601
  component: "span",
608
- children: [/* @__PURE__ */ T("span", {
602
+ children: [/* @__PURE__ */ w("span", {
609
603
  "aria-hidden": "true",
610
604
  children: [
611
605
  n,
612
606
  ".",
613
607
  "\xA0"
614
608
  ]
615
- }), /* @__PURE__ */ w(V, {
609
+ }), /* @__PURE__ */ C(V, {
616
610
  className: "prompt-label",
617
611
  prompt: i,
618
612
  tagName: "span"
619
613
  })]
620
- }) : /* @__PURE__ */ w(V, {
614
+ }) : /* @__PURE__ */ C(V, {
621
615
  className: "prompt-label",
622
616
  prompt: i,
623
617
  tagName: "span"
624
- }) }), E = {
618
+ }) }), T = {
625
619
  disabled: t,
626
620
  checked: p,
627
- correctness: a,
621
+ correctness: o,
628
622
  tagName: m,
629
623
  value: f,
630
624
  id: this.choiceId,
631
625
  onChange: this.onToggleChoice,
632
626
  onKeyDown: this.handleKeyDown,
633
- ...x ? { "aria-describedby": this.descId } : {}
634
- }, D = (e) => h ? /* @__PURE__ */ T(_e, { children: [
635
- x,
636
- /* @__PURE__ */ w(g, {
637
- ...E,
638
- ariaLabel: e,
627
+ ...b ? { "aria-describedby": this.descId } : {}
628
+ }, E = h ? /* @__PURE__ */ w(me, { children: [
629
+ b,
630
+ /* @__PURE__ */ C(g, {
631
+ ...T,
639
632
  style: { padding: 0 }
640
633
  }),
641
- /* @__PURE__ */ w("span", {
634
+ /* @__PURE__ */ C("span", {
642
635
  "aria-hidden": "true",
643
636
  children: n ? `${n}.` : ""
644
637
  })
645
- ] }) : /* @__PURE__ */ T(C, { children: [x, /* @__PURE__ */ w(g, {
646
- ...E,
647
- ariaLabel: e
648
- })] });
649
- return /* @__PURE__ */ T("div", {
650
- className: b(o, "corespring-" + _, "choice-input"),
638
+ ] }) : /* @__PURE__ */ w(S, { children: [b, /* @__PURE__ */ C(g, { ...T })] });
639
+ return /* @__PURE__ */ w("div", {
640
+ className: a(s, "corespring-" + _, "choice-input"),
651
641
  children: [
652
- /* @__PURE__ */ T(he, { children: [!c && l && /* @__PURE__ */ w(fe, { correctness: a }), /* @__PURE__ */ w(ge, {
642
+ /* @__PURE__ */ w(K, { children: [!l && u && /* @__PURE__ */ C(de, { correctness: o }), /* @__PURE__ */ C(pe, {
653
643
  className: "checkbox-holder",
654
644
  sx: v,
655
- children: /* @__PURE__ */ w(u, { children: (e, t) => /* @__PURE__ */ w(ye, {
656
- label: /* @__PURE__ */ w("span", {
657
- ref: t,
658
- style: { display: "contents" },
659
- children: S
660
- }),
645
+ children: /* @__PURE__ */ C(ge, {
646
+ label: x,
661
647
  value: f,
662
648
  htmlFor: this.choiceId,
663
649
  labelPlacement: h ? "top" : void 0,
664
- control: D(e)
665
- }) })
650
+ control: E
651
+ })
666
652
  })] }),
667
- s && /* @__PURE__ */ w(V, {
653
+ c && /* @__PURE__ */ C(V, {
668
654
  className: "rationale",
669
655
  defaultClassName: "rationale",
670
- prompt: s
656
+ prompt: c
671
657
  }),
672
- /* @__PURE__ */ w(pe, {
658
+ /* @__PURE__ */ C(fe, {
673
659
  feedback: r,
674
- correctness: a
660
+ correctness: o
675
661
  })
676
662
  ]
677
663
  });
678
664
  }
679
- }, Ee = i(h, { shouldForwardProp: (e) => e !== "noBorder" && e !== "horizontalLayout" })(({ theme: e, noBorder: n, horizontalLayout: r }) => ({
665
+ }, Ce = t(m, { shouldForwardProp: (e) => e !== "noBorder" && e !== "horizontalLayout" })(({ theme: e, noBorder: t, horizontalLayout: n }) => ({
680
666
  paddingTop: e.spacing(2.5),
681
667
  paddingBottom: `calc(${e.spacing(1)} + 2px)`,
682
668
  paddingLeft: `calc(${e.spacing(1)} + 2px)`,
683
669
  paddingRight: `calc(${e.spacing(1)} + 2px)`,
684
- borderBottom: n ? "none" : `1px solid ${t.border()}`,
685
- ...r && {
670
+ borderBottom: t ? "none" : `1px solid ${s.border()}`,
671
+ ...n && {
686
672
  paddingRight: e.spacing(2.5),
687
673
  "& label": { marginRight: e.spacing(1) }
688
674
  }
689
- })), K = class extends x.Component {
675
+ })), we = class extends b.Component {
690
676
  static propTypes = {};
691
677
  state = { isHovered: !1 };
692
678
  handleMouseEnter = () => {
@@ -701,7 +687,7 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
701
687
  t || n(e);
702
688
  };
703
689
  render() {
704
- let { choice: e, index: t, choicesLength: n, showCorrect: r, isEvaluateMode: i, choiceMode: a, disabled: o, checked: s, correctness: c, displayKey: l, choicesLayout: u, gridColumns: d, isSelectionButtonBelow: f, selectedAnswerBackgroundColor: p, selectedAnswerStrokeColor: m, selectedAnswerStrokeWidth: h, hoverAnswerBackgroundColor: g, hoverAnswerStrokeColor: _, hoverAnswerStrokeWidth: v, tagName: y } = this.props, { isHovered: b } = this.state, x = "choice" + (t === n - 1 ? " last" : ""), S = !i || r ? "" : e.feedback, C = {
690
+ let { choice: e, index: t, choicesLength: n, showCorrect: r, isEvaluateMode: i, choiceMode: a, disabled: o, checked: s, correctness: c, displayKey: l, choicesLayout: u, gridColumns: d, isSelectionButtonBelow: f, selectedAnswerBackgroundColor: p, selectedAnswerStrokeColor: m, selectedAnswerStrokeWidth: h, hoverAnswerBackgroundColor: g, hoverAnswerStrokeColor: _, hoverAnswerStrokeWidth: v, tagName: y } = this.props, { isHovered: b } = this.state, x = "choice" + (t === n - 1 ? " last" : ""), S = !i || r ? "" : e.feedback, w = {
705
691
  ...e,
706
692
  checked: s,
707
693
  choiceMode: a,
@@ -728,7 +714,7 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
728
714
  border: `${T(k)} solid ${O}`,
729
715
  borderRadius: "8px"
730
716
  } : {}, N = t === n - 1 || u !== "vertical" || j, P = u === "horizontal";
731
- return /* @__PURE__ */ w("div", {
717
+ return /* @__PURE__ */ C("div", {
732
718
  className: x,
733
719
  style: {
734
720
  backgroundColor: A === "initial" ? "initial" : A,
@@ -736,141 +722,141 @@ var V = B(l, "PreviewPrompt") || B(me.PreviewPrompt, "PreviewPrompt"), pe = B(y,
736
722
  },
737
723
  onMouseEnter: this.handleMouseEnter,
738
724
  onMouseLeave: this.handleMouseLeave,
739
- children: /* @__PURE__ */ w(Ee, {
725
+ children: /* @__PURE__ */ C(Ce, {
740
726
  component: "div",
741
727
  noBorder: N,
742
728
  horizontalLayout: P,
743
- children: /* @__PURE__ */ w(Te, { ...C })
729
+ children: /* @__PURE__ */ C(Se, { ...w })
744
730
  })
745
731
  }, t);
746
732
  }
747
733
  };
748
- K.propTypes = {
749
- choiceMode: E.default.oneOf(["radio", "checkbox"]),
750
- choice: E.default.object,
751
- disabled: E.default.bool.isRequired,
752
- onChoiceChanged: E.default.func,
753
- index: E.default.number,
754
- choicesLength: E.default.number,
755
- showCorrect: E.default.bool,
756
- isEvaluateMode: E.default.bool,
757
- checked: E.default.bool,
758
- correctness: E.default.string,
759
- displayKey: E.default.string,
760
- choicesLayout: E.default.oneOf([
734
+ we.propTypes = {
735
+ choiceMode: T.default.oneOf(["radio", "checkbox"]),
736
+ choice: T.default.object,
737
+ disabled: T.default.bool.isRequired,
738
+ onChoiceChanged: T.default.func,
739
+ index: T.default.number,
740
+ choicesLength: T.default.number,
741
+ showCorrect: T.default.bool,
742
+ isEvaluateMode: T.default.bool,
743
+ checked: T.default.bool,
744
+ correctness: T.default.string,
745
+ displayKey: T.default.string,
746
+ choicesLayout: T.default.oneOf([
761
747
  "vertical",
762
748
  "grid",
763
749
  "horizontal"
764
750
  ]),
765
- gridColumns: E.default.string,
766
- selectedAnswerBackgroundColor: E.default.string,
767
- selectedAnswerStrokeColor: E.default.string,
768
- selectedAnswerStrokeWidth: E.default.string,
769
- hoverAnswerBackgroundColor: E.default.string,
770
- hoverAnswerStrokeColor: E.default.string,
771
- hoverAnswerStrokeWidth: E.default.string,
772
- tagName: E.default.string,
773
- isSelectionButtonBelow: E.default.bool
751
+ gridColumns: T.default.string,
752
+ selectedAnswerBackgroundColor: T.default.string,
753
+ selectedAnswerStrokeColor: T.default.string,
754
+ selectedAnswerStrokeWidth: T.default.string,
755
+ hoverAnswerBackgroundColor: T.default.string,
756
+ hoverAnswerStrokeColor: T.default.string,
757
+ hoverAnswerStrokeWidth: T.default.string,
758
+ tagName: T.default.string,
759
+ isSelectionButtonBelow: T.default.bool
774
760
  };
775
761
  //#endregion
776
762
  //#region src/delivery/utils.ts
777
- var De = (e, t) => t != null && e >= t, Oe = (e, t) => t != null && e > t;
763
+ var Te = (e, t) => t != null && e >= t, Ee = (e, t) => t != null && e > t;
778
764
  //#endregion
779
765
  //#region src/delivery/multiple-choice.tsx
780
- function q(e) {
766
+ function J(e) {
781
767
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
782
768
  }
783
- function J(e, t) {
784
- 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;
769
+ function Y(e, t) {
770
+ return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
785
771
  }
786
- var ke = J(l, "PreviewPrompt") || J(Me.PreviewPrompt, "PreviewPrompt"), Ae = J(n, "Collapsible") || J(Me.Collapsible, "Collapsible"), je = _, Y = je.default, Me = Y && typeof Y == "object" ? Y : je, { translator: X } = r, Ne = i(h)({
787
- color: t.text(),
788
- backgroundColor: t.background(),
772
+ var De = Y(l, "PreviewPrompt") || Y(Ae.PreviewPrompt, "PreviewPrompt"), Oe = Y(f, "Collapsible") || Y(Ae.Collapsible, "Collapsible"), ke = g, X = ke.default, Ae = X && typeof X == "object" ? X : ke, { translator: Z } = i, je = t(m)({
773
+ color: s.text(),
774
+ backgroundColor: s.background(),
789
775
  "& *": { "-webkit-font-smoothing": "antialiased" },
790
776
  position: "relative",
791
777
  "& legend": { border: "none !important" }
792
- }), Pe = i("h2")(({ theme: e }) => ({
778
+ }), Me = t("h2")(({ theme: e }) => ({
793
779
  display: "block",
794
780
  fontSize: "inherit",
795
781
  margin: "0",
796
782
  fontWeight: "normal",
797
783
  paddingBottom: e.spacing(2)
798
- })), Fe = i(h)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Ie = i(h)({
784
+ })), Ne = t(m)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Pe = t(m)({
799
785
  display: "flex",
800
786
  flexDirection: "row",
801
787
  flexWrap: "wrap"
802
- }), Le = i(h)({ display: "grid" }), Re = i("fieldset")({
788
+ }), Fe = t(m)({ display: "grid" }), Ie = t("fieldset")({
803
789
  border: "0px",
804
790
  padding: "0.01em 0 0 0",
805
791
  margin: "0px",
806
792
  minWidth: "0px"
807
- }), ze = i("h3")({
793
+ }), Le = t("h3")({
808
794
  position: "absolute",
809
795
  left: "-10000px",
810
796
  top: "auto",
811
797
  width: "1px",
812
798
  height: "1px",
813
799
  overflow: "hidden"
814
- }), Be = i("div")(({ theme: e }) => ({
800
+ }), Re = t("div")(({ theme: e }) => ({
815
801
  fontSize: e.typography.fontSize - 2,
816
- color: t.missing(),
802
+ color: s.missing(),
817
803
  paddingTop: e.spacing(1)
818
- })), Ve = class extends x.Component {
804
+ })), ze = class extends b.Component {
819
805
  static propTypes = {
820
- className: E.default.string,
821
- mode: E.default.oneOf([
806
+ className: T.default.string,
807
+ mode: T.default.oneOf([
822
808
  "gather",
823
809
  "view",
824
810
  "evaluate"
825
811
  ]),
826
- choiceMode: E.default.oneOf(["radio", "checkbox"]),
827
- keyMode: E.default.oneOf([
812
+ choiceMode: T.default.oneOf(["radio", "checkbox"]),
813
+ keyMode: T.default.oneOf([
828
814
  "numbers",
829
815
  "letters",
830
816
  "none"
831
817
  ]),
832
- choices: E.default.array,
833
- partLabel: E.default.string,
834
- prompt: E.default.string,
835
- teacherInstructions: E.default.string,
836
- session: E.default.object,
837
- disabled: E.default.bool,
838
- onChoiceChanged: E.default.func,
839
- responseCorrect: E.default.bool,
840
- correctResponse: E.default.array,
841
- choicesLayout: E.default.oneOf([
818
+ choices: T.default.array,
819
+ partLabel: T.default.string,
820
+ prompt: T.default.string,
821
+ teacherInstructions: T.default.string,
822
+ session: T.default.object,
823
+ disabled: T.default.bool,
824
+ onChoiceChanged: T.default.func,
825
+ responseCorrect: T.default.bool,
826
+ correctResponse: T.default.array,
827
+ choicesLayout: T.default.oneOf([
842
828
  "vertical",
843
829
  "grid",
844
830
  "horizontal"
845
831
  ]),
846
- gridColumns: E.default.string,
847
- alwaysShowCorrect: E.default.bool,
848
- animationsDisabled: E.default.bool,
849
- language: E.default.string,
850
- selectedAnswerBackgroundColor: E.default.string,
851
- selectedAnswerStrokeColor: E.default.string,
852
- selectedAnswerStrokeWidth: E.default.string,
853
- hoverAnswerBackgroundColor: E.default.string,
854
- hoverAnswerStrokeColor: E.default.string,
855
- hoverAnswerStrokeWidth: E.default.string,
856
- onShowCorrectToggle: E.default.func,
857
- isSelectionButtonBelow: E.default.bool,
858
- minSelections: E.default.number,
859
- maxSelections: E.default.number,
860
- autoplayAudioEnabled: E.default.bool,
832
+ gridColumns: T.default.string,
833
+ alwaysShowCorrect: T.default.bool,
834
+ animationsDisabled: T.default.bool,
835
+ language: T.default.string,
836
+ selectedAnswerBackgroundColor: T.default.string,
837
+ selectedAnswerStrokeColor: T.default.string,
838
+ selectedAnswerStrokeWidth: T.default.string,
839
+ hoverAnswerBackgroundColor: T.default.string,
840
+ hoverAnswerStrokeColor: T.default.string,
841
+ hoverAnswerStrokeWidth: T.default.string,
842
+ onShowCorrectToggle: T.default.func,
843
+ isSelectionButtonBelow: T.default.bool,
844
+ minSelections: T.default.number,
845
+ maxSelections: T.default.number,
846
+ autoplayAudioEnabled: T.default.bool,
861
847
  customAudioButton: {
862
- playImage: E.default.string,
863
- pauseImage: E.default.string
848
+ playImage: T.default.string,
849
+ pauseImage: T.default.string
864
850
  },
865
- options: E.default.object,
866
- baseHeadingLevel: E.default.number,
867
- includeSrHeading: E.default.bool
851
+ options: T.default.object,
852
+ baseHeadingLevel: T.default.number,
853
+ includeSrHeading: T.default.bool
868
854
  };
869
855
  constructor(e) {
870
856
  super(e), this.state = {
871
857
  showCorrect: this.props.options && this.props.alwaysShowCorrect || !1,
872
858
  maxSelectionsErrorState: !1
873
- }, this.onToggle = this.onToggle.bind(this), this.groupName = `mc-group-${Math.random().toString(36).slice(2, 10)}`, this.mainContainerId = s("main-container");
859
+ }, this.onToggle = this.onToggle.bind(this), this.groupName = `mc-group-${Math.random().toString(36).slice(2, 10)}`, this.mainContainerId = n("main-container");
874
860
  }
875
861
  isSelected(e) {
876
862
  let t = this.props.session && this.props.session.value;
@@ -878,7 +864,7 @@ var ke = J(l, "PreviewPrompt") || J(Me.PreviewPrompt, "PreviewPrompt"), Ae = J(n
878
864
  }
879
865
  handleChange = (e) => {
880
866
  let { value: t, checked: n } = e.target, { choiceMode: r, maxSelections: i, onChoiceChanged: a, session: o } = this.props;
881
- r !== "radio" && o.value && De(o.value.length, i) && (this.setState({ maxSelectionsErrorState: n }), n) || a({
867
+ r !== "radio" && o.value && Te(o.value.length, i) && (this.setState({ maxSelectionsErrorState: n }), n) || a({
882
868
  value: t,
883
869
  selected: n,
884
870
  selector: "Mouse"
@@ -912,66 +898,66 @@ var ke = J(l, "PreviewPrompt") || J(Me.PreviewPrompt, "PreviewPrompt"), Ae = J(n
912
898
  let { mode: e, choiceMode: t, includeSrHeading: n, baseHeadingLevel: r, partLabel: i, language: a } = this.props;
913
899
  if (!(!i && n !== !1) || e !== "gather") return null;
914
900
  let o = r ? Math.min(6, r) : 2;
915
- return /* @__PURE__ */ w(ze.withComponent(`h${o}`), { children: X.t(t === "radio" ? "multipleChoice.multipleChoiceQuestion" : "multipleChoice.multipleSelectQuestion", { lng: a }) });
901
+ return /* @__PURE__ */ C(Le.withComponent(`h${o}`), { children: Z.t(t === "radio" ? "multipleChoice.multipleChoiceQuestion" : "multipleChoice.multipleSelectQuestion", { lng: a }) });
916
902
  }
917
903
  render() {
918
- let { mode: e, disabled: t, className: n, choices: r = [], choiceMode: i, gridColumns: a, partLabel: o, prompt: s, responseCorrect: c, teacherInstructions: l, alwaysShowCorrect: u, animationsDisabled: d, language: f, isSelectionButtonBelow: m, minSelections: g, maxSelections: _, autoplayAudioEnabled: v, session: y, customAudioButton: x, options: S, baseHeadingLevel: C } = this.props, { showCorrect: E, maxSelectionsErrorState: D } = this.state, O = e === "evaluate", k = O && !c, A = a > 1 ? { gridTemplateColumns: `repeat(${a}, 1fr)` } : void 0, j = y.value && y.value.length || 0, M = (() => {
919
- if (!C) return;
904
+ let { mode: e, disabled: t, className: n, choices: r = [], choiceMode: i, gridColumns: o, partLabel: s, prompt: c, responseCorrect: l, teacherInstructions: u, alwaysShowCorrect: d, animationsDisabled: f, language: p, isSelectionButtonBelow: g, minSelections: _, maxSelections: v, autoplayAudioEnabled: y, session: b, customAudioButton: x, options: S, baseHeadingLevel: T } = this.props, { showCorrect: E, maxSelectionsErrorState: D } = this.state, O = e === "evaluate", k = O && !l, A = o > 1 ? { gridTemplateColumns: `repeat(${o}, 1fr)` } : void 0, j = b.value && b.value.length || 0, M = (() => {
905
+ if (!T) return;
920
906
  let e = 1;
921
- return o && (e += 1), Math.min(6, C + e);
922
- })(), N = (e) => e && M ? p(e, M) : e, P = /* @__PURE__ */ w(ke, {
907
+ return s && (e += 1), Math.min(6, T + e);
908
+ })(), N = (e) => e && M ? h(e, M) : e, P = /* @__PURE__ */ C(De, {
923
909
  tagName: "div",
924
910
  className: "prompt",
925
911
  defaultClassName: "teacher-instructions",
926
- prompt: l
927
- }), F = () => g && _ ? g === _ ? X.t("translation:multipleChoice:minmaxSelections_equal", {
928
- lng: f,
929
- minSelections: g
930
- }) : X.t("translation:multipleChoice:minmaxSelections_range", {
931
- lng: f,
932
- minSelections: g,
933
- maxSelections: _
934
- }) : g ? X.t("translation:multipleChoice:minSelections", {
935
- lng: f,
936
- minSelections: g
937
- }) : "", ee = this.props.choicesLayout === "grid" ? Le : this.props.choicesLayout === "horizontal" ? Ie : h;
938
- return /* @__PURE__ */ T(Ne, {
912
+ prompt: u
913
+ }), F = () => _ && v ? _ === v ? Z.t("translation:multipleChoice:minmaxSelections_equal", {
914
+ lng: p,
915
+ minSelections: _
916
+ }) : Z.t("translation:multipleChoice:minmaxSelections_range", {
917
+ lng: p,
918
+ minSelections: _,
919
+ maxSelections: v
920
+ }) : _ ? Z.t("translation:multipleChoice:minSelections", {
921
+ lng: p,
922
+ minSelections: _
923
+ }) : "", I = this.props.choicesLayout === "grid" ? Fe : this.props.choicesLayout === "horizontal" ? Pe : m;
924
+ return /* @__PURE__ */ w(je, {
939
925
  id: this.mainContainerId,
940
- className: b(n, "multiple-choice", "main-container"),
926
+ className: a(n, "multiple-choice", "main-container"),
941
927
  children: [
942
- o && /* @__PURE__ */ w(Pe, {
943
- as: C ? `h${Math.min(6, C + 1)}` : "h2",
944
- children: o
928
+ s && /* @__PURE__ */ C(Me, {
929
+ as: T ? `h${Math.min(6, T + 1)}` : "h2",
930
+ children: s
945
931
  }),
946
932
  this.renderHeading(),
947
- l && /* @__PURE__ */ w(Fe, { children: d ? P : /* @__PURE__ */ w(Ae, {
933
+ u && /* @__PURE__ */ C(Ne, { children: f ? P : /* @__PURE__ */ C(Oe, {
948
934
  labels: {
949
- hidden: X.t("common:showTeacherInstructions", { lng: f }),
950
- visible: X.t("common:hideTeacherInstructions", { lng: f })
935
+ hidden: Z.t("common:showTeacherInstructions", { lng: p }),
936
+ visible: Z.t("common:hideTeacherInstructions", { lng: p })
951
937
  },
952
938
  children: P
953
939
  }) }),
954
- /* @__PURE__ */ T(Re, {
940
+ /* @__PURE__ */ w(Ie, {
955
941
  role: i === "radio" ? "radiogroup" : "group",
956
942
  children: [
957
- /* @__PURE__ */ w(ke, {
943
+ /* @__PURE__ */ C(De, {
958
944
  className: "prompt",
959
945
  defaultClassName: "prompt",
960
- prompt: N(s),
946
+ prompt: N(c),
961
947
  tagName: "legend",
962
- autoplayAudioEnabled: v,
948
+ autoplayAudioEnabled: y,
963
949
  customAudioButton: x,
964
- language: f
950
+ language: p
965
951
  }),
966
- !(S && u) && /* @__PURE__ */ w(ce, {
952
+ !(S && d) && /* @__PURE__ */ C(se, {
967
953
  show: k,
968
954
  toggled: E,
969
955
  onToggle: this.onToggle.bind(this),
970
- language: f
956
+ language: p
971
957
  }),
972
- /* @__PURE__ */ w(ee, {
958
+ /* @__PURE__ */ C(I, {
973
959
  style: A,
974
- children: r.map((e, n) => /* @__PURE__ */ w(K, {
960
+ children: r.map((e, n) => /* @__PURE__ */ C(we, {
975
961
  choicesLayout: this.props.choicesLayout,
976
962
  selectedAnswerBackgroundColor: this.props.selectedAnswerBackgroundColor,
977
963
  selectedAnswerStrokeColor: this.props.selectedAnswerStrokeColor,
@@ -979,7 +965,7 @@ var ke = J(l, "PreviewPrompt") || J(Me.PreviewPrompt, "PreviewPrompt"), Ae = J(n
979
965
  hoverAnswerBackgroundColor: this.props.hoverAnswerBackgroundColor,
980
966
  hoverAnswerStrokeColor: this.props.hoverAnswerStrokeColor,
981
967
  hoverAnswerStrokeWidth: this.props.hoverAnswerStrokeWidth,
982
- gridColumns: a,
968
+ gridColumns: o,
983
969
  choice: e,
984
970
  index: n,
985
971
  choicesLength: r.length,
@@ -993,42 +979,42 @@ var ke = J(l, "PreviewPrompt") || J(Me.PreviewPrompt, "PreviewPrompt"), Ae = J(n
993
979
  checked: this.getChecked(e),
994
980
  correctness: O ? this.getCorrectness(e) : void 0,
995
981
  displayKey: this.indexToSymbol(n),
996
- isSelectionButtonBelow: m
982
+ isSelectionButtonBelow: g
997
983
  }, `choice-${n}`))
998
984
  })
999
985
  ]
1000
986
  }),
1001
- i === "checkbox" && j < g && /* @__PURE__ */ w(Be, { children: F() }),
1002
- i === "checkbox" && D && /* @__PURE__ */ w(Be, { children: X.t(`translation:multipleChoice:maxSelections_${_ === 1 ? "one" : "other"}`, {
1003
- lng: f,
1004
- maxSelections: _
987
+ i === "checkbox" && j < _ && /* @__PURE__ */ C(Re, { children: F() }),
988
+ i === "checkbox" && D && /* @__PURE__ */ C(Re, { children: Z.t(`translation:multipleChoice:maxSelections_${v === 1 ? "one" : "other"}`, {
989
+ lng: p,
990
+ maxSelections: v
1005
991
  }) })
1006
992
  ]
1007
993
  });
1008
994
  }
1009
995
  };
1010
- Ve.defaultProps = { session: { value: [] } };
996
+ ze.defaultProps = { session: { value: [] } };
1011
997
  //#endregion
1012
998
  //#region src/delivery/main.tsx
1013
- function Z(e) {
999
+ function Q(e) {
1014
1000
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
1015
1001
  }
1016
- function Q(e, t) {
1017
- return !e || Z(e) ? e : Z(e.default) ? e.default : t && Z(e[t]) ? e[t] : t && Z(e[t]?.default) ? e[t].default : e;
1002
+ function Be(e, t) {
1003
+ 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;
1018
1004
  }
1019
- var He = Q(a, "PreviewLayout") || Q(We.PreviewLayout, "PreviewLayout"), Ue = _, $ = Ue.default, We = $ && typeof $ == "object" ? $ : Ue, Ge = class extends x.Component {
1005
+ var Ve = Be(v, "PreviewLayout") || Be(Ue.PreviewLayout, "PreviewLayout"), He = g, $ = He.default, Ue = $ && typeof $ == "object" ? $ : He, We = class extends b.Component {
1020
1006
  static propTypes = {
1021
- model: E.default.object,
1022
- session: E.default.object,
1023
- options: E.default.object,
1024
- onChoiceChanged: E.default.func,
1025
- onShowCorrectToggle: E.default.func,
1026
- extraCSSRules: E.default.shape({
1027
- names: E.default.arrayOf(E.default.string),
1028
- rules: E.default.string
1007
+ model: T.default.object,
1008
+ session: T.default.object,
1009
+ options: T.default.object,
1010
+ onChoiceChanged: T.default.func,
1011
+ onShowCorrectToggle: T.default.func,
1012
+ extraCSSRules: T.default.shape({
1013
+ names: T.default.arrayOf(T.default.string),
1014
+ rules: T.default.string
1029
1015
  }),
1030
- baseHeadingLevel: E.default.number,
1031
- includeSrHeading: E.default.bool
1016
+ baseHeadingLevel: T.default.number,
1017
+ includeSrHeading: T.default.bool
1032
1018
  };
1033
1019
  static defaultProps = {
1034
1020
  model: {},
@@ -1036,11 +1022,11 @@ var He = Q(a, "PreviewLayout") || Q(We.PreviewLayout, "PreviewLayout"), Ue = _,
1036
1022
  };
1037
1023
  render() {
1038
1024
  let { model: e, onChoiceChanged: t, session: n, onShowCorrectToggle: r, options: i, baseHeadingLevel: a, includeSrHeading: o } = this.props, { extraCSSRules: s, fontSizeFactor: c } = e;
1039
- return /* @__PURE__ */ w(He, {
1025
+ return /* @__PURE__ */ C(Ve, {
1040
1026
  extraCSSRules: s,
1041
1027
  fontSizeFactor: c,
1042
1028
  classes: {},
1043
- children: /* @__PURE__ */ w(Ve, {
1029
+ children: /* @__PURE__ */ C(ze, {
1044
1030
  ...e,
1045
1031
  options: i,
1046
1032
  session: n,
@@ -1053,6 +1039,6 @@ var He = Q(a, "PreviewLayout") || Q(We.PreviewLayout, "PreviewLayout"), Ue = _,
1053
1039
  }
1054
1040
  };
1055
1041
  //#endregion
1056
- export { Oe as n, Ge as t };
1042
+ export { Ee as n, We as t };
1057
1043
 
1058
- //# sourceMappingURL=main-Clsf7I8G.js.map
1044
+ //# sourceMappingURL=main-CIn-5xKa.js.map