@pie-element/inline-dropdown 11.0.2-next.20261007003844 → 11.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,12 +1,12 @@
1
1
  import { m as e } from "../speech-worker-CP5P4gRS-OkQyXQak.js";
2
- import { A as t, M as n, N as r, Rt as i, S as a, a as o, d as s, f as c, ft as l, ht as u, i as d, k as f, m as p, n as m, o as h, p as g, pt as _, t as v, v as y, w as b, z as x, zt as S } from "../Close-6mCxdf3b.js";
3
- import { c as C, n as w } from "../dist-FMIRkZir.js";
4
- import T, { useRef as E } from "react";
5
- import { createRoot as ee } from "react-dom/client";
6
- import te from "react-dom";
7
- import { Fragment as ne, jsx as D, jsxs as O } from "react/jsx-runtime";
2
+ import { A as t, Bt as n, M as r, N as i, S as a, a as o, d as s, f as c, ft as l, gt as u, i as d, k as f, m as p, mt as m, n as h, o as g, p as _, pt as v, t as y, v as b, w as x, z as S, zt as C } from "../Close-BeMUhd2I.js";
3
+ import { c as w, n as T } from "../dist-FMIRkZir.js";
4
+ import E, { useRef as ee } from "react";
5
+ import { createRoot as te } from "react-dom/client";
6
+ import ne from "react-dom";
7
+ import { Fragment as re, jsx as D, jsxs as O } from "react/jsx-runtime";
8
8
  //#region ../../shared/player-events/dist/index.js
9
- var re = class e extends CustomEvent {
9
+ var ie = class e extends CustomEvent {
10
10
  static {
11
11
  this.TYPE = "model-set";
12
12
  }
@@ -21,7 +21,7 @@ var re = class e extends CustomEvent {
21
21
  }
22
22
  }), this.component = t, this.complete = n;
23
23
  }
24
- }, ie = class e extends CustomEvent {
24
+ }, ae = class e extends CustomEvent {
25
25
  static {
26
26
  this.TYPE = "session-changed";
27
27
  }
@@ -35,7 +35,7 @@ var re = class e extends CustomEvent {
35
35
  }
36
36
  }), this.component = t, this.complete = n;
37
37
  }
38
- }, k = /* @__PURE__ */ e(i(), 1), ae = "height ease-in 300ms, opacity ease-in 300ms", oe = u("div")(() => ({
38
+ }, k = /* @__PURE__ */ e(C(), 1), oe = "height ease-in 300ms, opacity ease-in 300ms", se = u("div")(() => ({
39
39
  position: "relative",
40
40
  height: 0,
41
41
  overflow: "hidden",
@@ -43,7 +43,7 @@ var re = class e extends CustomEvent {
43
43
  visibility: "hidden",
44
44
  width: 0,
45
45
  "&.enter": {
46
- transition: ae,
46
+ transition: oe,
47
47
  opacity: 1,
48
48
  height: "auto",
49
49
  width: "auto",
@@ -57,7 +57,7 @@ var re = class e extends CustomEvent {
57
57
  minHeight: "25px"
58
58
  },
59
59
  "&.exit": {
60
- transition: ae,
60
+ transition: oe,
61
61
  opacity: 0,
62
62
  height: 0,
63
63
  visibility: "visible",
@@ -69,9 +69,9 @@ var re = class e extends CustomEvent {
69
69
  height: 0,
70
70
  width: 0
71
71
  }
72
- })), se = (e) => {
73
- let { show: t, children: n, className: r } = e, i = E(null);
74
- return /* @__PURE__ */ D(_, {
72
+ })), ce = (e) => {
73
+ let { show: t, children: n, className: r } = e, i = ee(null);
74
+ return /* @__PURE__ */ D(m, {
75
75
  nodeRef: i,
76
76
  in: t,
77
77
  appear: !0,
@@ -83,21 +83,21 @@ var re = class e extends CustomEvent {
83
83
  exit: "exit",
84
84
  exitDone: "exit-done"
85
85
  },
86
- children: /* @__PURE__ */ D(oe, {
86
+ children: /* @__PURE__ */ D(se, {
87
87
  ref: i,
88
88
  className: r,
89
89
  children: n
90
90
  })
91
91
  });
92
92
  };
93
- se.propTypes = {
93
+ ce.propTypes = {
94
94
  show: k.default.bool.isRequired,
95
95
  className: k.default.string,
96
96
  children: k.default.oneOfType([k.default.arrayOf(k.default.node), k.default.node]).isRequired
97
97
  };
98
98
  //#endregion
99
99
  //#region ../../lib-react/icons/dist/correct-response-icon.js
100
- var ce = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
100
+ var le = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
101
101
  "aria-hidden": "true",
102
102
  focusable: "false",
103
103
  preserveAspectRatio: "xMinYMin meet",
@@ -121,11 +121,11 @@ var ce = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
121
121
  })
122
122
  ]
123
123
  });
124
- ce.propTypes = {
124
+ le.propTypes = {
125
125
  bgFill: k.default.string.isRequired,
126
126
  fgFill: k.default.string.isRequired
127
127
  };
128
- var le = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
128
+ var ue = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
129
129
  "aria-hidden": "true",
130
130
  focusable: "false",
131
131
  preserveAspectRatio: "xMinYMin meet",
@@ -167,20 +167,20 @@ var le = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
167
167
  })
168
168
  ]
169
169
  });
170
- le.propTypes = {
170
+ ue.propTypes = {
171
171
  bgFill: k.default.string.isRequired,
172
172
  fgFill: k.default.string.isRequired,
173
173
  borderFill: k.default.string.isRequired
174
174
  };
175
- var ue = u("div")(({ size: e }) => ({
175
+ var de = u("div")(({ size: e }) => ({
176
176
  width: e || "25px",
177
177
  height: e || "25px"
178
- })), A = ({ open: e, size: t }) => /* @__PURE__ */ D(ue, {
178
+ })), A = ({ open: e, size: t }) => /* @__PURE__ */ D(de, {
179
179
  size: t,
180
- children: e ? /* @__PURE__ */ D(ce, {
180
+ children: e ? /* @__PURE__ */ D(le, {
181
181
  bgFill: "#bce2ff",
182
182
  fgFill: "#1a9cff"
183
- }) : /* @__PURE__ */ D(le, {
183
+ }) : /* @__PURE__ */ D(ue, {
184
184
  bgFill: "white",
185
185
  fgFill: "#1a9cff",
186
186
  borderFill: "#bce2ff"
@@ -195,20 +195,20 @@ A.propTypes = {
195
195
  function j(e) {
196
196
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
197
197
  }
198
- function de(e, t) {
198
+ function fe(e, t) {
199
199
  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;
200
200
  }
201
- var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.default, me = M && typeof M == "object" ? M : pe, { translator: N } = t, he = {
201
+ var pe = fe(_, "Readable") || fe(he.Readable, "Readable"), me = o, M = me.default, he = M && typeof M == "object" ? M : me, { translator: N } = t, ge = {
202
202
  WebkitTouchCallout: "none",
203
203
  WebkitUserSelect: "none",
204
204
  KhtmlUserSelect: "none",
205
205
  MozUserSelect: "none",
206
206
  msUserSelect: "none",
207
207
  userSelect: "none"
208
- }, ge = u("div")(() => ({
208
+ }, _e = u("div")(() => ({
209
209
  width: "100%",
210
210
  cursor: "pointer"
211
- })), _e = u("button")(() => ({
211
+ })), ve = u("button")(() => ({
212
212
  margin: "0 auto",
213
213
  textAlign: "center",
214
214
  display: "flex",
@@ -221,18 +221,18 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
221
221
  font: "inherit",
222
222
  cursor: "pointer",
223
223
  "&:focus-visible": {
224
- outline: `2px solid ${l.buttonFocusOutline()}`,
224
+ outline: `2px solid ${v.buttonFocusOutline()}`,
225
225
  outlineOffset: "-2px"
226
226
  }
227
- })), ve = u("div")(() => ({
227
+ })), ye = u("div")(() => ({
228
228
  width: "fit-content",
229
229
  minWidth: "140px",
230
230
  alignSelf: "center",
231
231
  verticalAlign: "middle",
232
- color: `var(--correct-answer-toggle-label-color, ${l.text()})`,
232
+ color: `var(--correct-answer-toggle-label-color, ${v.text()})`,
233
233
  fontWeight: "normal",
234
- ...he
235
- })), ye = u("div")(() => ({
234
+ ...ge
235
+ })), be = u("div")(() => ({
236
236
  position: "absolute",
237
237
  width: "25px",
238
238
  "&.enter": { opacity: "0" },
@@ -245,12 +245,12 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
245
245
  opacity: "0",
246
246
  transition: "opacity 0.3s ease-in"
247
247
  }
248
- })), be = u("div")(() => ({
248
+ })), xe = u("div")(() => ({
249
249
  width: "25px",
250
250
  marginRight: "5px",
251
251
  display: "flex",
252
252
  alignItems: "center"
253
- })), xe = class e extends T.Component {
253
+ })), Se = class e extends E.Component {
254
254
  static propTypes = {
255
255
  onToggle: k.default.func,
256
256
  toggled: k.default.bool,
@@ -267,7 +267,7 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
267
267
  toggled: !1
268
268
  };
269
269
  constructor(t) {
270
- super(t), this.state = { show: t.show }, this.openIconRef = T.createRef(), this.closedIconRef = T.createRef(), e.defaultProps = {
270
+ super(t), this.state = { show: t.show }, this.openIconRef = E.createRef(), this.closedIconRef = E.createRef(), e.defaultProps = {
271
271
  ...e.defaultProps,
272
272
  showMessage: N.t("common:showCorrectAnswer", { lng: t.language }),
273
273
  hideMessage: N.t("common:hideCorrectAnswer", { lng: t.language })
@@ -288,16 +288,16 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
288
288
  }
289
289
  render() {
290
290
  let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
291
- return /* @__PURE__ */ D(ge, {
291
+ return /* @__PURE__ */ D(_e, {
292
292
  className: e,
293
- children: /* @__PURE__ */ D(se, {
293
+ children: /* @__PURE__ */ D(ce, {
294
294
  show: this.state.show,
295
- children: /* @__PURE__ */ O(_e, {
295
+ children: /* @__PURE__ */ O(ve, {
296
296
  type: "button",
297
297
  "aria-pressed": !!t,
298
298
  onClick: this.onClick.bind(this),
299
299
  onTouchEnd: this.onTouch.bind(this),
300
- children: [/* @__PURE__ */ O(be, { children: [/* @__PURE__ */ D(_, {
300
+ children: [/* @__PURE__ */ O(xe, { children: [/* @__PURE__ */ D(m, {
301
301
  nodeRef: this.openIconRef,
302
302
  timeout: 400,
303
303
  in: t,
@@ -308,11 +308,11 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
308
308
  exit: "exit",
309
309
  exitActive: "exit-active"
310
310
  },
311
- children: /* @__PURE__ */ D(ye, {
311
+ children: /* @__PURE__ */ D(be, {
312
312
  ref: this.openIconRef,
313
313
  children: /* @__PURE__ */ D(A, { open: t }, "correct-open")
314
314
  })
315
- }), /* @__PURE__ */ D(_, {
315
+ }), /* @__PURE__ */ D(m, {
316
316
  nodeRef: this.closedIconRef,
317
317
  timeout: 5e3,
318
318
  in: !t,
@@ -323,13 +323,13 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
323
323
  exit: "exit",
324
324
  exitActive: "exit-active"
325
325
  },
326
- children: /* @__PURE__ */ D(ye, {
326
+ children: /* @__PURE__ */ D(be, {
327
327
  ref: this.closedIconRef,
328
328
  children: /* @__PURE__ */ D(A, { open: t }, "correct-closed")
329
329
  })
330
- })] }), /* @__PURE__ */ D(fe, {
330
+ })] }), /* @__PURE__ */ D(pe, {
331
331
  false: !0,
332
- children: /* @__PURE__ */ D(ve, {
332
+ children: /* @__PURE__ */ D(ye, {
333
333
  "aria-hidden": !this.state.show,
334
334
  children: t ? n : r
335
335
  })
@@ -338,7 +338,7 @@ var fe = de(g, "Readable") || de(me.Readable, "Readable"), pe = o, M = pe.defaul
338
338
  })
339
339
  });
340
340
  }
341
- }, Se = /\{\{(\d+)\}\}/g, Ce = (e, t) => e ? { markup: e.replace(Se, (e, n) => `<span data-component="${t}" data-id="${n}"></span>`) } : { markup: "" }, P = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), F = /* @__PURE__ */ P(((e, t) => {
341
+ }, Ce = /\{\{(\d+)\}\}/g, we = (e, t) => e ? { markup: e.replace(Ce, (e, n) => `<span data-component="${t}" data-id="${n}"></span>`) } : { markup: "" }, P = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), F = /* @__PURE__ */ P(((e, t) => {
342
342
  t.exports = {
343
343
  "border-radius": 1,
344
344
  "border-top-left-radius": 1,
@@ -420,16 +420,16 @@ var R = /* @__PURE__ */ P(((e, t) => {
420
420
  R();
421
421
  //#endregion
422
422
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js
423
- var we = /* @__PURE__ */ P(((e, t) => {
423
+ var Te = /* @__PURE__ */ P(((e, t) => {
424
424
  t.exports = /[-\s]+(.)?/g;
425
425
  }));
426
- we();
426
+ Te();
427
427
  //#endregion
428
428
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js
429
429
  var z = /* @__PURE__ */ P(((e, t) => {
430
430
  var n = function(e, t) {
431
431
  return t ? t.toUpperCase() : "";
432
- }, r = we();
432
+ }, r = Te();
433
433
  t.exports = function(e) {
434
434
  return e ? e.replace(r, n) : "";
435
435
  };
@@ -437,17 +437,17 @@ var z = /* @__PURE__ */ P(((e, t) => {
437
437
  z();
438
438
  //#endregion
439
439
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js
440
- var Te = /* @__PURE__ */ P(((e, t) => {
440
+ var Ee = /* @__PURE__ */ P(((e, t) => {
441
441
  var n = /::/g, r = /([A-Z]+)([A-Z][a-z])/g, i = /([a-z\d])([A-Z])/g, a = /_/g;
442
442
  t.exports = function(e, t) {
443
443
  return e ? e.replace(n, "/").replace(r, "$1_$2").replace(i, "$1_$2").replace(a, t || "-") : "";
444
444
  };
445
445
  }));
446
- Te();
446
+ Ee();
447
447
  //#endregion
448
448
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js
449
449
  var B = /* @__PURE__ */ P(((e, t) => {
450
- var n = Te();
450
+ var n = Ee();
451
451
  t.exports = function(e) {
452
452
  return n(e).toLowerCase();
453
453
  };
@@ -455,16 +455,16 @@ var B = /* @__PURE__ */ P(((e, t) => {
455
455
  B();
456
456
  //#endregion
457
457
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js
458
- var Ee = /* @__PURE__ */ P(((e, t) => {
458
+ var De = /* @__PURE__ */ P(((e, t) => {
459
459
  t.exports = function(e) {
460
460
  return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
461
461
  };
462
462
  }));
463
- Ee();
463
+ De();
464
464
  //#endregion
465
465
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js
466
- var De = /* @__PURE__ */ P(((e, t) => {
467
- var n = z(), r = B(), i = Ee(), a = L(), o = R(), s = F(), c = typeof document > "u" ? {} : document.documentElement.style;
466
+ var Oe = /* @__PURE__ */ P(((e, t) => {
467
+ var n = z(), r = B(), i = De(), a = L(), o = R(), s = F(), c = typeof document > "u" ? {} : document.documentElement.style;
468
468
  t.exports = function(e) {
469
469
  return function(t, l) {
470
470
  l ||= {};
@@ -481,13 +481,13 @@ var De = /* @__PURE__ */ P(((e, t) => {
481
481
  };
482
482
  };
483
483
  }));
484
- De();
484
+ Oe();
485
485
  //#endregion
486
486
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js
487
- var Oe = /* @__PURE__ */ P(((e, t) => {
488
- t.exports = De()();
487
+ var ke = /* @__PURE__ */ P(((e, t) => {
488
+ t.exports = Oe()();
489
489
  }));
490
- Oe();
490
+ ke();
491
491
  //#endregion
492
492
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js
493
493
  var V = /* @__PURE__ */ P(((e, t) => {
@@ -499,27 +499,27 @@ var V = /* @__PURE__ */ P(((e, t) => {
499
499
  V();
500
500
  //#endregion
501
501
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js
502
- var ke = /* @__PURE__ */ P(((e, t) => {
502
+ var Ae = /* @__PURE__ */ P(((e, t) => {
503
503
  var n = Object.prototype.toString;
504
504
  t.exports = function(e) {
505
505
  return !!e && n.call(e) === "[object Object]";
506
506
  };
507
507
  }));
508
- ke();
508
+ Ae();
509
509
  //#endregion
510
510
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js
511
- var Ae = /* @__PURE__ */ P(((e, t) => {
511
+ var je = /* @__PURE__ */ P(((e, t) => {
512
512
  var n = Object.prototype.toString;
513
513
  t.exports = function(e) {
514
514
  return n.apply(e) === "[object Function]";
515
515
  };
516
516
  }));
517
- Ae();
517
+ je();
518
518
  //#endregion
519
519
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js
520
520
  var H = /* @__PURE__ */ P(((e, t) => {
521
521
  R();
522
- var n = Oe(), r = B(), i = z(), a = V(), o = ke(), s = Ae(), c = function(e, t, r, i) {
522
+ var n = ke(), r = B(), i = z(), a = V(), o = Ae(), s = je(), c = function(e, t, r, i) {
523
523
  n(t).forEach(function(t) {
524
524
  e[i ? i(t) : t] = r;
525
525
  });
@@ -562,7 +562,7 @@ var H = /* @__PURE__ */ P(((e, t) => {
562
562
  H();
563
563
  //#endregion
564
564
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js
565
- var je = /* @__PURE__ */ P(((e, t) => {
565
+ var Me = /* @__PURE__ */ P(((e, t) => {
566
566
  var n = H(), r = V();
567
567
  t.exports = function(e, t) {
568
568
  e = n(e, t);
@@ -571,25 +571,25 @@ var je = /* @__PURE__ */ P(((e, t) => {
571
571
  return i.join("; ");
572
572
  };
573
573
  }));
574
- je();
574
+ Me();
575
575
  //#endregion
576
576
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js
577
- var Me = /* @__PURE__ */ P(((e, t) => {
577
+ var Ne = /* @__PURE__ */ P(((e, t) => {
578
578
  t.exports = {
579
579
  prefixProperties: F(),
580
580
  cssUnitless: I(),
581
581
  object: H(),
582
- string: je()
582
+ string: Me()
583
583
  };
584
584
  }));
585
- Me();
585
+ Ne();
586
586
  //#endregion
587
587
  //#region ../../lib-react/mask-markup/dist/serialization.js
588
- var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:mask-markup:serialization"), Ie = ["span"], Le = [
588
+ var Pe = /* @__PURE__ */ e(i(), 1), Fe = Ne(), Ie = (0, Pe.default)("@pie-lib:mask-markup:serialization"), Le = ["span"], Re = [
589
589
  "em",
590
590
  "strong",
591
591
  "u"
592
- ], Re = 3, ze = 8, Be = 1, Ve = (e) => {
592
+ ], ze = 3, Be = 8, Ve = 1, He = (e) => {
593
593
  if (!e.attributes || e.attributes.length <= 0) return;
594
594
  let t = {}, n;
595
595
  for (n = 0; n < e.attributes.length; n++) {
@@ -597,31 +597,31 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
597
597
  t[r.name] = r.value;
598
598
  }
599
599
  return t;
600
- }, He = (e) => Ie.includes(e) ? "inline" : Le.includes(e) ? "mark" : "block", Ue = (e) => {
600
+ }, Ue = (e) => Le.includes(e) ? "inline" : Re.includes(e) ? "mark" : "block", We = (e) => {
601
601
  let t = /([\w-]*)\s*:\s*([^;]*)/g, n, r = {};
602
602
  for (; n = t.exec(e);) r[n[1]] = n[2].trim();
603
603
  return r;
604
- }, We = (e) => (0, Pe.object)(e, {
604
+ }, Ge = (e) => (0, Fe.object)(e, {
605
605
  camelize: !0,
606
606
  addUnits: !1
607
- }), Ge = (e, t) => We(Ue(e.getAttribute(t))), Ke = (e, t, n) => {
607
+ }), Ke = (e, t) => Ge(We(e.getAttribute(t))), qe = (e, t, n) => {
608
608
  let r = e.getAttribute(n);
609
609
  return delete t.class, r;
610
- }, qe = (e) => (t, n) => {
610
+ }, Je = (e) => (t, n) => {
611
611
  if (!e.getAttribute) return t;
612
612
  if (e.getAttribute(n)) switch (n) {
613
613
  case "style":
614
- t.style = Ge(e, n);
614
+ t.style = Ke(e, n);
615
615
  break;
616
616
  case "class":
617
- t.className = Ke(e, t, n);
617
+ t.className = qe(e, t, n);
618
618
  break;
619
619
  default:
620
620
  t[n] = e.getAttribute(n);
621
621
  break;
622
622
  }
623
623
  return t;
624
- }, Je = [
624
+ }, Ye = [
625
625
  "border",
626
626
  "class",
627
627
  "style"
@@ -632,9 +632,9 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
632
632
  s: "strikethrough",
633
633
  code: "code",
634
634
  strong: "strong"
635
- }, Ye = (e, t = []) => {
636
- if (e.nodeType === ze) return null;
637
- if (e.nodeType === Re) {
635
+ }, Xe = (e, t = []) => {
636
+ if (e.nodeType === Be) return null;
637
+ if (e.nodeType === ze) {
638
638
  let n = { text: e.textContent };
639
639
  return t.length > 0 && (n.marks = t.map((e) => ({
640
640
  type: e,
@@ -644,9 +644,9 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
644
644
  leaves: [n]
645
645
  };
646
646
  }
647
- if (e.nodeType === Be) {
647
+ if (e.nodeType === Ve) {
648
648
  let n = e.tagName.toLowerCase(), r = U[n];
649
- if (r) return Fe("[deserialize] mark: ", r), {
649
+ if (r) return Ie("[deserialize] mark: ", r), {
650
650
  _flatten: !0,
651
651
  nodes: W(e.childNodes, [...t, r])
652
652
  };
@@ -654,9 +654,9 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
654
654
  isMath: !0,
655
655
  nodes: [e]
656
656
  };
657
- let i = Ve(e) || {};
657
+ let i = He(e) || {};
658
658
  n === "audio" && i.controls === "" && (i.controls = !0);
659
- let a = Je.reduce(qe(e), { ...i }), o = He(n), s = W(e.childNodes, t);
659
+ let a = Ye.reduce(Je(e), { ...i }), o = Ue(n), s = W(e.childNodes, t);
660
660
  return {
661
661
  object: o,
662
662
  type: n,
@@ -671,11 +671,11 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
671
671
  }, W = (e, t = []) => {
672
672
  let n = [];
673
673
  for (let r = 0; r < e.length; r++) {
674
- let i = Ye(e[r], t);
674
+ let i = Xe(e[r], t);
675
675
  i !== null && (i._flatten && i.nodes ? n.push(...i.nodes) : n.push(i));
676
676
  }
677
677
  return n;
678
- }, Xe = (e) => {
678
+ }, Ze = (e) => {
679
679
  if (!e || !e.trim()) return {
680
680
  object: "value",
681
681
  document: {
@@ -711,44 +711,44 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
711
711
  nodes: t
712
712
  }
713
713
  };
714
- }, Ze = u("div")(({ theme: e }) => ({
714
+ }, Qe = u("div")(({ theme: e }) => ({
715
715
  paddingTop: e.spacing(.5),
716
716
  paddingBottom: e.spacing(.5)
717
- })), Qe = u("span")(() => ({
717
+ })), $e = u("span")(() => ({
718
718
  display: "inline-block",
719
719
  width: ".75em"
720
- })), $e = ["tbody", "tr"], et = (e, t) => {
720
+ })), et = ["tbody", "tr"], tt = (e, t) => {
721
721
  let n = t.trim() === "", r = e && e.type;
722
- if (!(n && $e.includes(r))) return t;
723
- }, tt = (e) => {
724
- let t = e.leaves.find((e) => C(e, "marks", []).length);
722
+ if (!(n && et.includes(r))) return t;
723
+ }, nt = (e) => {
724
+ let t = e.leaves.find((e) => w(e, "marks", []).length);
725
725
  return t ? t.marks : null;
726
- }, nt = (e, t, n, r, i, a) => {
726
+ }, rt = (e, t, n, r, i, a) => {
727
727
  if (!t) return null;
728
728
  let o = [];
729
729
  return (e.nodes || []).forEach((e, s) => {
730
730
  let c = e.type ? `${e.type}-${s}` : `${s}`;
731
- if (e.isMath) return o.push(/* @__PURE__ */ D("span", { dangerouslySetInnerHTML: { __html: `<math displaystyle="true">${e.nodes[0].innerHTML}</math>` } })), o;
731
+ if (e.isMath) return o.push(/* @__PURE__ */ D("span", { dangerouslySetInnerHTML: { __html: l(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`) } })), o;
732
732
  if (r) {
733
733
  let a = r(e, t, n);
734
734
  if (a) {
735
735
  let t = e.data?.dataset?.component === "blank" && i?.type !== "td";
736
- t && o.push(/* @__PURE__ */ D(Qe, {}, `spacer-${s}-before`)), o.push(a), t && o.push(/* @__PURE__ */ D(Qe, {}, `spacer-${s}-after`));
736
+ t && o.push(/* @__PURE__ */ D($e, {}, `spacer-${s}-before`)), o.push(a), t && o.push(/* @__PURE__ */ D($e, {}, `spacer-${s}-after`));
737
737
  return;
738
738
  }
739
739
  }
740
740
  if (e.object === "text") {
741
741
  let t = e.leaves.reduce((e, t) => {
742
- let n = t.text, r = et(i, n);
742
+ let n = t.text, r = tt(i, n);
743
743
  return r ? e + r : e;
744
- }, ""), n = tt(e);
744
+ }, ""), n = nt(e);
745
745
  if (n?.length > 0) {
746
746
  let e = n.map((e) => Object.keys(U).find((t) => U[t] === e.type)).filter(Boolean);
747
747
  e.length > 0 ? o.push(e.reduceRight((e, t, n) => /* @__PURE__ */ D(t, { children: e }, `${c}-${t}-${n}`), t)) : o.push(t);
748
748
  } else t.length > 0 && o.push(t);
749
749
  } else {
750
- let i = nt(e, t, n, r, e, a);
751
- if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ D(Ze, { children: i }, c));
750
+ let i = rt(e, t, n, r, e, a);
751
+ if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ D(Qe, { children: i }, c));
752
752
  else {
753
753
  let t = e.type;
754
754
  e.nodes && e.nodes.length > 0 ? o.push(/* @__PURE__ */ D(t, {
@@ -758,16 +758,16 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
758
758
  }
759
759
  }
760
760
  }), o;
761
- }, rt = u("div")(() => ({
761
+ }, it = u("div")(() => ({
762
762
  display: "initial",
763
763
  "&:not(.MathJax) table": { borderCollapse: "collapse" },
764
764
  "&:not(.MathJax) table td, &:not(.MathJax) table th": {
765
765
  padding: "8px 12px",
766
766
  textAlign: "left"
767
767
  }
768
- })), it = class extends T.Component {
768
+ })), at = class extends E.Component {
769
769
  constructor(e) {
770
- super(e), this.internalContainerRef = T.createRef();
770
+ super(e), this.internalContainerRef = E.createRef();
771
771
  }
772
772
  static propTypes = {
773
773
  renderChildren: k.default.func,
@@ -779,7 +779,7 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
779
779
  };
780
780
  componentDidMount() {
781
781
  let e = this.props.containerRef || this.internalContainerRef;
782
- e.current && typeof S == "function" && S(e.current);
782
+ e.current && typeof n == "function" && n(e.current);
783
783
  }
784
784
  handleChange = (e, t) => {
785
785
  let n = {
@@ -789,16 +789,16 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
789
789
  this.props.onChange(n);
790
790
  };
791
791
  render() {
792
- let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = nt(t, e, this.handleChange, this.props.renderChildren, null, n);
793
- return /* @__PURE__ */ D(rt, {
792
+ let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = rt(t, e, this.handleChange, this.props.renderChildren, null, n);
793
+ return /* @__PURE__ */ D(it, {
794
794
  ref: r || this.internalContainerRef,
795
795
  children: i
796
796
  });
797
797
  }
798
- }, at = (e, t) => {
799
- let { markup: n } = Ce(e, t);
800
- return Xe(n).document;
801
- }, ot = (e, t) => class extends T.Component {
798
+ }, ot = (e, t) => {
799
+ let { markup: n } = we(e, t);
800
+ return Ze(l(n)).document;
801
+ }, st = (e, t) => class extends E.Component {
802
802
  static propTypes = {
803
803
  markup: k.default.string,
804
804
  layout: k.default.object,
@@ -808,20 +808,20 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
808
808
  elementType: k.default.string
809
809
  };
810
810
  constructor(e) {
811
- super(e), this.containerRef = T.createRef();
811
+ super(e), this.containerRef = E.createRef();
812
812
  }
813
813
  componentDidUpdate(e) {
814
814
  if (this.props.markup !== e.markup) {
815
815
  let e = this.containerRef.current;
816
816
  (e && e.querySelectorAll("[data-latex][data-math-handled=\"true\"]") || []).forEach((e) => {
817
817
  let t = e.querySelector("mjx-container");
818
- t && e.removeChild(t), e.innerHTML = e.getAttribute("data-raw"), e.removeAttribute("data-math-handled");
818
+ t && e.removeChild(t), e.textContent = e.getAttribute("data-raw"), e.removeAttribute("data-math-handled");
819
819
  });
820
820
  }
821
821
  }
822
822
  render() {
823
- let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || at(n, e);
824
- return /* @__PURE__ */ D(it, {
823
+ let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || ot(n, e);
824
+ return /* @__PURE__ */ D(at, {
825
825
  containerRef: this.containerRef,
826
826
  elementType: o,
827
827
  layout: s,
@@ -830,21 +830,21 @@ var Ne = /* @__PURE__ */ e(r(), 1), Pe = Me(), Fe = (0, Ne.default)("@pie-lib:ma
830
830
  renderChildren: t(this.props)
831
831
  });
832
832
  }
833
- }, st = x(/*#__PURE__*/ D("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), ct = x(/*#__PURE__*/ D("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
833
+ }, ct = S(/*#__PURE__*/ D("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), lt = S(/*#__PURE__*/ D("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
834
834
  //#endregion
835
835
  //#region ../../lib-react/mask-markup/dist/components/dropdown.js
836
836
  function G(e) {
837
837
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
838
838
  }
839
- function lt(e, t) {
839
+ function ut(e, t) {
840
840
  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;
841
841
  }
842
- var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.default, ft = K && typeof K == "object" ? K : dt, { translator: pt } = t, mt = l.v("pie"), ht = u(b)(() => ({
843
- color: l.text(),
844
- border: `1px solid ${l.borderGray()}`,
842
+ var dt = ut(g, "InlineMenu") || ut(pt.InlineMenu, "InlineMenu"), ft = o, K = ft.default, pt = K && typeof K == "object" ? K : ft, { translator: mt } = t, ht = v.v("pie"), gt = u(x)(() => ({
843
+ color: v.text(),
844
+ border: `1px solid ${v.borderGray()}`,
845
845
  borderRadius: "4px",
846
846
  justifyContent: "space-between",
847
- backgroundColor: l.background(),
847
+ backgroundColor: v.background(),
848
848
  position: "relative",
849
849
  height: "45px",
850
850
  width: "fit-content",
@@ -856,29 +856,29 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
856
856
  right: "4px",
857
857
  top: "calc(50% - 12px)",
858
858
  pointerEvents: "none",
859
- color: l.text(),
859
+ color: v.text(),
860
860
  marginLeft: "5px"
861
861
  },
862
862
  "&.Mui-focusVisible": {
863
- outline: `3px solid ${l.tertiary()}`,
863
+ outline: `3px solid ${v.tertiary()}`,
864
864
  outlineOffset: "2px",
865
865
  borderWidth: "3px"
866
866
  },
867
- "&.Mui-disabled": { color: l.disabledText() },
867
+ "&.Mui-disabled": { color: v.disabledText() },
868
868
  "&.disabledCorrect": {
869
869
  borderWidth: "2px",
870
- borderColor: l.correct(),
871
- color: `${l.text()} !important`
870
+ borderColor: v.correct(),
871
+ color: `${v.text()} !important`
872
872
  },
873
873
  "&.disabledIncorrect": {
874
874
  borderWidth: "2px",
875
- borderColor: l.incorrectWithIcon(),
876
- color: `${l.text()} !important`
875
+ borderColor: v.incorrectWithIcon(),
876
+ color: `${v.text()} !important`
877
877
  }
878
- })), gt = u(ut)(() => ({
879
- "& .MuiPaper-root": { backgroundColor: mt("background", l.defaults.WHITE) },
878
+ })), _t = u(dt)(() => ({
879
+ "& .MuiPaper-root": { backgroundColor: ht("background", v.defaults.WHITE) },
880
880
  "& .MuiList-root": { padding: 0 }
881
- })), _t = u(m)(() => ({
881
+ })), vt = u(h)(() => ({
882
882
  height: 24,
883
883
  overflow: "hidden",
884
884
  fontSize: "1rem",
@@ -886,42 +886,42 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
886
886
  fontFamily: "inherit",
887
887
  lineHeight: "1.5em",
888
888
  whiteSpace: "nowrap",
889
- color: l.text(),
890
- backgroundColor: l.background(),
889
+ color: v.text(),
890
+ backgroundColor: v.background(),
891
891
  "&.Mui-focusVisible": {
892
- outline: `3px solid ${l.tertiary()}`,
892
+ outline: `3px solid ${v.tertiary()}`,
893
893
  outlineOffset: "-1px",
894
- color: l.text(),
895
- backgroundColor: l.background()
894
+ color: v.text(),
895
+ backgroundColor: v.background()
896
896
  },
897
897
  "&:hover": {
898
- color: l.text(),
899
- backgroundColor: l.dropdownBackground()
898
+ color: v.text(),
899
+ backgroundColor: v.dropdownBackground()
900
900
  },
901
901
  boxSizing: "border-box",
902
902
  padding: "16px 8px",
903
903
  borderRadius: "4px",
904
904
  "&.selected": {
905
- color: `${l.text()} !important`,
906
- backgroundColor: `${l.background()} !important`,
905
+ color: `${v.text()} !important`,
906
+ backgroundColor: `${v.background()} !important`,
907
907
  "&:hover": {
908
- color: l.text(),
909
- backgroundColor: `${l.dropdownBackground()} !important`
908
+ color: v.text(),
909
+ backgroundColor: `${v.dropdownBackground()} !important`
910
910
  }
911
911
  }
912
- })), q = u("span")(() => ({ fontSize: "max(1rem, 14px)" })), vt = u("span")(() => ({
912
+ })), q = u("span")(() => ({ fontSize: "max(1rem, 14px)" })), yt = u("span")(() => ({
913
913
  fontSize: "max(1rem, 14px)",
914
914
  flexShrink: 0,
915
915
  paddingLeft: "8px"
916
- })), yt = u(y)(() => ({
916
+ })), bt = u(b)(() => ({
917
917
  position: "absolute",
918
918
  left: "-10000px",
919
919
  top: "auto",
920
920
  width: "1px",
921
921
  height: "1px",
922
922
  overflow: "hidden"
923
- })), bt = u(d)(() => ({
924
- color: `${l.white()} !important`,
923
+ })), xt = u(d)(() => ({
924
+ color: `${v.white()} !important`,
925
925
  position: "absolute",
926
926
  top: "-8px !important",
927
927
  left: "-8px",
@@ -929,10 +929,10 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
929
929
  borderRadius: "50%",
930
930
  fontSize: "16px",
931
931
  padding: "2px",
932
- "&.correct": { backgroundColor: l.correct() },
933
- "&.incorrect": { backgroundColor: l.incorrectWithIcon() }
934
- })), xt = u(v)(() => ({
935
- color: `${l.white()} !important`,
932
+ "&.correct": { backgroundColor: v.correct() },
933
+ "&.incorrect": { backgroundColor: v.incorrectWithIcon() }
934
+ })), St = u(y)(() => ({
935
+ color: `${v.white()} !important`,
936
936
  position: "absolute",
937
937
  top: "-8px !important",
938
938
  left: "-8px",
@@ -940,9 +940,9 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
940
940
  borderRadius: "50%",
941
941
  fontSize: "16px",
942
942
  padding: "2px",
943
- "&.correct": { backgroundColor: l.correct() },
944
- "&.incorrect": { backgroundColor: l.incorrectWithIcon() }
945
- })), St = class extends T.Component {
943
+ "&.correct": { backgroundColor: v.correct() },
944
+ "&.incorrect": { backgroundColor: v.incorrectWithIcon() }
945
+ })), Ct = class extends E.Component {
946
946
  static propTypes = {
947
947
  id: k.default.string,
948
948
  value: k.default.string,
@@ -964,23 +964,23 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
964
964
  highlightedOptionId: null,
965
965
  menuWidth: null,
966
966
  previewValue: null
967
- }, this.hiddenRef = T.createRef(), this.buttonRef = T.createRef(), this.previewRef = T.createRef(), this.elementRefs = [], this.idPrefix = n(`dropdown-${e.id}`);
967
+ }, this.hiddenRef = E.createRef(), this.buttonRef = E.createRef(), this.previewRef = E.createRef(), this.elementRefs = [], this.idPrefix = r(`dropdown-${e.id}`);
968
968
  }
969
969
  optionId = (e) => `${this.idPrefix}-option-${e}`;
970
970
  componentDidMount() {
971
971
  this.hiddenRef.current && this.state.menuWidth === null && this.setState({ menuWidth: this.hiddenRef.current.clientWidth });
972
972
  }
973
973
  componentDidUpdate(e, t) {
974
- let n = this.hiddenRef.current;
974
+ let r = this.hiddenRef.current;
975
975
  if (!t.anchorEl && this.state.anchorEl && this.elementRefs.forEach((e) => {
976
976
  if (!e) return;
977
- let t = e.querySelector("[data-latex], [data-raw]"), n = e.querySelector("mjx-container"), r = e.querySelector("[data-math-handled=\"true\"]");
978
- t && (!r || !n) && S(e);
979
- }), n) {
980
- let e = n.clientWidth;
977
+ let t = e.querySelector("[data-latex], [data-raw]"), r = e.querySelector("mjx-container"), i = e.querySelector("[data-math-handled=\"true\"]");
978
+ t && (!i || !r) && n(e);
979
+ }), r) {
980
+ let e = r.clientWidth;
981
981
  e !== this.state.menuWidth && (this.elementRefs.forEach((e) => {
982
- e && S(e);
983
- }), S(n), this.setState({ menuWidth: e }));
982
+ e && n(e);
983
+ }), n(r), this.setState({ menuWidth: e }));
984
984
  }
985
985
  }
986
986
  handleClick = (e) => {
@@ -1025,13 +1025,13 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
1025
1025
  return n ? n.label.trim() : void 0;
1026
1026
  }
1027
1027
  render() {
1028
- let { id: e, correct: t, disabled: n, value: r, choices: i, showCorrectAnswer: a, singleQuery: o, correctValue: s, language: c } = this.props, { anchorEl: l } = this.state, u = !!l, d = `${this.idPrefix}-button`, f = `${this.idPrefix}-menu`, p = `${this.idPrefix}-listbox`, m = `${this.idPrefix}-value`, h;
1029
- this.elementRefs = [], n && t !== void 0 && (h = t || a ? "disabledCorrect" : "disabledIncorrect");
1030
- let g = parseInt(e, 10) + 1, _ = `${this.idPrefix}-query-label`, v = o ? pt.t("inlineDropdown.query", { lng: c }) : pt.t("inlineDropdown.queryNumber", {
1028
+ let { id: e, correct: t, disabled: n, value: r, choices: i, showCorrectAnswer: a, singleQuery: o, correctValue: s, language: c } = this.props, { anchorEl: u } = this.state, d = !!u, f = `${this.idPrefix}-button`, p = `${this.idPrefix}-menu`, m = `${this.idPrefix}-listbox`, h = `${this.idPrefix}-value`, g;
1029
+ this.elementRefs = [], n && t !== void 0 && (g = t || a ? "disabledCorrect" : "disabledIncorrect");
1030
+ let _ = parseInt(e, 10) + 1, v = `${this.idPrefix}-query-label`, y = o ? mt.t("inlineDropdown.query", { lng: c }) : mt.t("inlineDropdown.queryNumber", {
1031
1031
  lng: c,
1032
- index: g
1033
- }), y = null;
1034
- return n && t !== void 0 && (y = t || a ? /* @__PURE__ */ D(bt, { className: "correct" }) : /* @__PURE__ */ D(xt, { className: "incorrect" })), /* @__PURE__ */ O(ne, { children: [
1032
+ index: _
1033
+ }), b = null;
1034
+ return n && t !== void 0 && (b = t || a ? /* @__PURE__ */ D(xt, { className: "correct" }) : /* @__PURE__ */ D(St, { className: "incorrect" })), /* @__PURE__ */ O(re, { children: [
1035
1035
  /* @__PURE__ */ D("div", {
1036
1036
  ref: this.hiddenRef,
1037
1037
  style: {
@@ -1042,50 +1042,50 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
1042
1042
  },
1043
1043
  tabIndex: -1,
1044
1044
  "aria-hidden": "true",
1045
- children: (i || []).map((e, t) => /* @__PURE__ */ D(_t, {
1045
+ children: (i || []).map((e, t) => /* @__PURE__ */ D(vt, {
1046
1046
  tabIndex: -1,
1047
1047
  "aria-hidden": "true",
1048
- children: /* @__PURE__ */ D(q, { dangerouslySetInnerHTML: { __html: e.label } })
1048
+ children: /* @__PURE__ */ D(q, { dangerouslySetInnerHTML: { __html: l(e.label) } })
1049
1049
  }, t))
1050
1050
  }),
1051
- /* @__PURE__ */ D(yt, {
1052
- id: _,
1051
+ /* @__PURE__ */ D(bt, {
1052
+ id: v,
1053
1053
  tabIndex: -1,
1054
1054
  "aria-hidden": "true",
1055
- children: v
1055
+ children: y
1056
1056
  }),
1057
- /* @__PURE__ */ O(ht, {
1057
+ /* @__PURE__ */ O(gt, {
1058
1058
  ref: this.buttonRef,
1059
1059
  style: {
1060
1060
  ...this.state.menuWidth && { minWidth: `calc(${this.state.menuWidth}px + 8px)` },
1061
- borderWidth: u ? "2px" : "1px",
1061
+ borderWidth: d ? "2px" : "1px",
1062
1062
  transition: "border-width 0.2s ease-in-out"
1063
1063
  },
1064
- "aria-controls": u ? p : void 0,
1064
+ "aria-controls": d ? m : void 0,
1065
1065
  "aria-haspopup": "listbox",
1066
- "aria-expanded": u ? "true" : "false",
1066
+ "aria-expanded": d ? "true" : "false",
1067
1067
  "aria-activedescendant": this.state.highlightedOptionId,
1068
1068
  onClick: this.handleClick,
1069
- className: h,
1069
+ className: g,
1070
1070
  disabled: n,
1071
- id: d,
1071
+ id: f,
1072
1072
  role: "combobox",
1073
- "aria-labelledby": `${_} ${m}`,
1073
+ "aria-labelledby": `${v} ${h}`,
1074
1074
  children: [
1075
- y,
1075
+ b,
1076
1076
  /* @__PURE__ */ D(q, {
1077
- id: m,
1077
+ id: h,
1078
1078
  ref: this.previewRef,
1079
- dangerouslySetInnerHTML: { __html: s || (u && this.state.previewValue ? this.getLabel(i, this.state.previewValue) : this.getLabel(i, r) || "") }
1079
+ dangerouslySetInnerHTML: { __html: l(s || (d && this.state.previewValue ? this.getLabel(i, this.state.previewValue) : this.getLabel(i, r) || "")) }
1080
1080
  }),
1081
- D(u ? ct : st, {})
1081
+ D(d ? lt : ct, {})
1082
1082
  ]
1083
1083
  }),
1084
- /* @__PURE__ */ D(gt, {
1085
- id: f,
1086
- anchorEl: l,
1084
+ /* @__PURE__ */ D(_t, {
1085
+ id: p,
1086
+ anchorEl: u,
1087
1087
  keepMounted: !0,
1088
- open: u,
1088
+ open: d,
1089
1089
  onClose: this.handleClose,
1090
1090
  getContentAnchorEl: null,
1091
1091
  anchorOrigin: {
@@ -1106,15 +1106,15 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
1106
1106
  padding: "4px"
1107
1107
  } } : void 0,
1108
1108
  list: {
1109
- id: p,
1110
- "aria-labelledby": _,
1109
+ id: m,
1110
+ "aria-labelledby": v,
1111
1111
  role: "listbox",
1112
1112
  disablePadding: !0
1113
1113
  }
1114
1114
  },
1115
1115
  children: (i || []).map((e, t) => {
1116
1116
  let n = this.optionId(t);
1117
- return /* @__PURE__ */ O(_t, {
1117
+ return /* @__PURE__ */ O(vt, {
1118
1118
  id: n,
1119
1119
  className: e.value === r ? "selected" : "",
1120
1120
  selected: e.value === r,
@@ -1125,18 +1125,18 @@ var ut = lt(h, "InlineMenu") || lt(ft.InlineMenu, "InlineMenu"), dt = o, K = dt.
1125
1125
  onMouseOver: () => this.handleHover(t),
1126
1126
  children: [/* @__PURE__ */ D(q, {
1127
1127
  ref: (e) => this.elementRefs[t] = e,
1128
- dangerouslySetInnerHTML: { __html: e.label }
1129
- }), /* @__PURE__ */ D(vt, { dangerouslySetInnerHTML: { __html: e.value === r ? " &check;" : "" } })]
1128
+ dangerouslySetInnerHTML: { __html: l(e.label) }
1129
+ }), /* @__PURE__ */ D(yt, { dangerouslySetInnerHTML: { __html: e.value === r ? " &check;" : "" } })]
1130
1130
  }, `${e.label}-${t}`);
1131
1131
  })
1132
1132
  })
1133
1133
  ] });
1134
1134
  }
1135
- }, Ct = ot("dropdown", (e) => (t, n, r) => {
1135
+ }, wt = st("dropdown", (e) => (t, n, r) => {
1136
1136
  let i = t.data && t.data.dataset || {};
1137
1137
  if (i.component === "dropdown") {
1138
1138
  let { choices: a, disabled: o, feedback: s, showCorrectAnswer: c, language: l } = e, u = a && a[i.id] && a[i.id].find((e) => e.correct), d = c ? u && u.value : n[i.id];
1139
- return /* @__PURE__ */ D(St, {
1139
+ return /* @__PURE__ */ D(Ct, {
1140
1140
  correct: s && s[i.id] && s[i.id] === "correct",
1141
1141
  disabled: o || c,
1142
1142
  value: d,
@@ -1158,23 +1158,23 @@ function J(e) {
1158
1158
  function Y(e, t) {
1159
1159
  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;
1160
1160
  }
1161
- var wt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt") || Y(Q.PreviewPrompt, "PreviewPrompt"), Tt = Y(f, "Collapsible") || Y(Q.Collapsible, "Collapsible"), Et = o, Z = Et.default, Q = Z && typeof Z == "object" ? Z : Et, { translator: $ } = t, Dt = u(wt)({
1162
- color: l.text(),
1163
- backgroundColor: l.background()
1164
- }), Ot = u(Tt)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), kt = u("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), At = u("div")({
1161
+ var Tt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt") || Y(Q.PreviewPrompt, "PreviewPrompt"), Et = Y(f, "Collapsible") || Y(Q.Collapsible, "Collapsible"), Dt = o, Z = Dt.default, Q = Z && typeof Z == "object" ? Z : Dt, { translator: $ } = t, Ot = u(Tt)({
1162
+ color: v.text(),
1163
+ backgroundColor: v.background()
1164
+ }), kt = u(Et)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), At = u("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), jt = u("div")({
1165
1165
  display: "flex",
1166
1166
  whiteSpace: "break-spaces"
1167
- }), jt = u("div")(({ correct: e }) => ({
1167
+ }), Mt = u("div")(({ correct: e }) => ({
1168
1168
  display: "flex",
1169
- ...e ? { color: l.correct() } : { color: l.incorrectWithIcon() }
1170
- })), Mt = u("h2")({
1169
+ ...e ? { color: v.correct() } : { color: v.incorrectWithIcon() }
1170
+ })), Nt = u("h2")({
1171
1171
  position: "absolute",
1172
1172
  left: "-10000px",
1173
1173
  top: "auto",
1174
1174
  width: "1px",
1175
1175
  height: "1px",
1176
1176
  overflow: "hidden"
1177
- }), Nt = class extends T.Component {
1177
+ }), Pt = class extends E.Component {
1178
1178
  static propTypes = {
1179
1179
  prompt: k.default.string,
1180
1180
  disabled: k.default.bool,
@@ -1193,65 +1193,65 @@ var wt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt"
1193
1193
  static defaultProps = { value: {} };
1194
1194
  state = { showCorrectAnswer: !1 };
1195
1195
  UNSAFE_componentWillReceiveProps(e) {
1196
- w(e.feedback) && this.setState({ showCorrectAnswer: !1 });
1196
+ T(e.feedback) && this.setState({ showCorrectAnswer: !1 });
1197
1197
  }
1198
1198
  componentDidUpdate() {
1199
- S(te.findDOMNode(this));
1199
+ n(ne.findDOMNode(this));
1200
1200
  }
1201
1201
  toggleShowCorrect = () => {
1202
1202
  this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
1203
1203
  };
1204
1204
  render() {
1205
- let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: o, displayType: l, language: u } = this.props, { extraCSSRules: d } = r || {}, f = n === "evaluate", p = !1, m = i && (c(i) || s(i)), h = a && (c(a) || s(a)), g = (Object.keys(o) || []).map((e) => (o[e] || []).reduce((e, t) => (t.rationale && c(t.rationale) && (p = !0, e.push(t)), e), []));
1206
- return /* @__PURE__ */ O(Dt, {
1207
- extraCSSRules: d,
1208
- style: { display: `${l}` },
1205
+ let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: o, displayType: u, language: d } = this.props, { extraCSSRules: f } = r || {}, p = n === "evaluate", m = !1, h = i && (c(i) || s(i)), g = a && (c(a) || s(a)), _ = (Object.keys(o) || []).map((e) => (o[e] || []).reduce((e, t) => (t.rationale && c(t.rationale) && (m = !0, e.push(t)), e), []));
1206
+ return /* @__PURE__ */ O(Ot, {
1207
+ extraCSSRules: f,
1208
+ style: { display: `${u}` },
1209
1209
  children: [
1210
- n === "gather" && /* @__PURE__ */ D(Mt, { children: $.t("inlineDropdown.inlineDropdownQuestion", { lng: u }) }),
1211
- h && /* @__PURE__ */ D(Ot, {
1210
+ n === "gather" && /* @__PURE__ */ D(Nt, { children: $.t("inlineDropdown.inlineDropdownQuestion", { lng: d }) }),
1211
+ g && /* @__PURE__ */ D(kt, {
1212
1212
  labels: {
1213
- hidden: $.t("common:showTeacherInstructions", { lng: u }),
1214
- visible: $.t("common:hideTeacherInstructions", { lng: u })
1213
+ hidden: $.t("common:showTeacherInstructions", { lng: d }),
1214
+ visible: $.t("common:hideTeacherInstructions", { lng: d })
1215
1215
  },
1216
1216
  children: /* @__PURE__ */ D(X, { prompt: a })
1217
1217
  }),
1218
1218
  t && /* @__PURE__ */ D(X, { prompt: t }),
1219
- /* @__PURE__ */ D(xe, {
1220
- show: f,
1219
+ /* @__PURE__ */ D(Se, {
1220
+ show: p,
1221
1221
  toggled: e,
1222
1222
  onToggle: this.toggleShowCorrect,
1223
- language: u
1223
+ language: d
1224
1224
  }),
1225
- /* @__PURE__ */ D(Ct, {
1225
+ /* @__PURE__ */ D(wt, {
1226
1226
  ...this.props,
1227
1227
  showCorrectAnswer: e
1228
1228
  }),
1229
- p && /* @__PURE__ */ D(Ot, {
1229
+ m && /* @__PURE__ */ D(kt, {
1230
1230
  labels: {
1231
- hidden: $.t("inlineDropdown.showRationaleForChoices", { lng: u }),
1232
- visible: $.t("inlineDropdown.hideRationaleForChoices", { lng: u })
1231
+ hidden: $.t("inlineDropdown.showRationaleForChoices", { lng: d }),
1232
+ visible: $.t("inlineDropdown.hideRationaleForChoices", { lng: d })
1233
1233
  },
1234
- children: g.map((e, t) => /* @__PURE__ */ D(kt, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ O(At, { children: [/* @__PURE__ */ D(jt, {
1234
+ children: _.map((e, t) => /* @__PURE__ */ D(At, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ O(jt, { children: [/* @__PURE__ */ D(Mt, {
1235
1235
  correct: e.correct,
1236
- dangerouslySetInnerHTML: { __html: `${e.label}: ` }
1236
+ dangerouslySetInnerHTML: { __html: `${l(e.label)}: ` }
1237
1237
  }), /* @__PURE__ */ D(X, { prompt: e.rationale })] }, e.label)) }, t))
1238
1238
  }),
1239
- m && /* @__PURE__ */ D(Tt, {
1239
+ h && /* @__PURE__ */ D(Et, {
1240
1240
  labels: {
1241
- hidden: $.t("common:showRationale", { lng: u }),
1242
- visible: $.t("common:hideRationale", { lng: u })
1241
+ hidden: $.t("common:showRationale", { lng: d }),
1242
+ visible: $.t("common:hideRationale", { lng: d })
1243
1243
  },
1244
1244
  children: /* @__PURE__ */ D(X, { prompt: i })
1245
1245
  })
1246
1246
  ]
1247
1247
  });
1248
1248
  }
1249
- }, { translator: Pt } = t, Ft = class extends HTMLElement {
1249
+ }, { translator: Ft } = t, It = class extends HTMLElement {
1250
1250
  constructor() {
1251
1251
  super(), this._model = null, this._session = null, this._root = null;
1252
1252
  }
1253
1253
  set model(e) {
1254
- this._model = e, this.dispatchEvent(new re(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this._render();
1254
+ this._model = e, this.dispatchEvent(new ie(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this._render();
1255
1255
  }
1256
1256
  set session(e) {
1257
1257
  this._session = e, this._render();
@@ -1260,7 +1260,7 @@ var wt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt"
1260
1260
  return this._session;
1261
1261
  }
1262
1262
  setRegionLabel() {
1263
- this.setAttribute("aria-label", Pt.t("inlineDropdown.inlineDropdownQuestion", { lng: this._model?.language }));
1263
+ this.setAttribute("aria-label", Ft.t("inlineDropdown.inlineDropdownQuestion", { lng: this._model?.language }));
1264
1264
  }
1265
1265
  setLangAttribute() {
1266
1266
  let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
@@ -1268,7 +1268,7 @@ var wt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt"
1268
1268
  }
1269
1269
  _render = () => {
1270
1270
  if (this._model && this._session) {
1271
- let e = T.createElement(Nt, {
1271
+ let e = E.createElement(Pt, {
1272
1272
  model: this._model,
1273
1273
  prompt: this._model.prompt,
1274
1274
  rationale: this._model.rationale,
@@ -1283,13 +1283,13 @@ var wt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt"
1283
1283
  language: this._model.language,
1284
1284
  onChange: this.changeSession
1285
1285
  });
1286
- this.setLangAttribute(), this.setRegionLabel(), this._root ||= ee(this), this._root.render(e), queueMicrotask(() => {
1287
- S(this);
1286
+ this.setLangAttribute(), this.setRegionLabel(), this._root ||= te(this), this._root.render(e), queueMicrotask(() => {
1287
+ n(this);
1288
1288
  });
1289
1289
  }
1290
1290
  };
1291
1291
  dispatchChangedEvent = () => {
1292
- this.dispatchEvent(new ie(this.tagName.toLowerCase(), this.session && !!this.session.value));
1292
+ this.dispatchEvent(new ae(this.tagName.toLowerCase(), this.session && !!this.session.value));
1293
1293
  };
1294
1294
  changeSession = (e) => {
1295
1295
  this.session.value = e, this.dispatchChangedEvent(), this._render();
@@ -1302,6 +1302,6 @@ var wt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt"
1302
1302
  }
1303
1303
  };
1304
1304
  //#endregion
1305
- export { Ft as default };
1305
+ export { It as default };
1306
1306
 
1307
1307
  //# sourceMappingURL=index.js.map