@pie-element/inline-dropdown 11.0.6 → 11.0.7-next.20261019062545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Close-C9TW5P5n.js → Close-fTRpxtBv.js} +1167 -1152
- package/dist/browser/Close-fTRpxtBv.js.map +1 -0
- package/dist/browser/author/index.js +6151 -6151
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/delivery/index.js +174 -173
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{Close-CxbANkRj.js → Close-CdhoLEys.js} +1167 -1152
- package/dist/browser/editor-runtime/Close-CdhoLEys.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +1361 -1361
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +174 -173
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/index.iife.js +21 -21
- package/dist/schemas/configuration.schema.json +1 -1
- package/dist/schemas/model.schema.json +1 -1
- package/dist/schemas/session.schema.json +1 -1
- package/package.json +15 -15
- package/dist/browser/Close-C9TW5P5n.js.map +0 -1
- package/dist/browser/editor-runtime/Close-CxbANkRj.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { m as e } from "../speech-worker-CTpOB9m5-BIgcSm3A.js";
|
|
2
|
-
import { A as t,
|
|
3
|
-
import { c as
|
|
4
|
-
import D, { useRef as
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import
|
|
7
|
-
import { Fragment as
|
|
2
|
+
import { A as t, C as n, Ht as r, M as i, N as a, T as o, Vt as s, a as c, f as l, ft as u, gt as d, h as f, ht as p, i as m, m as h, mt as g, n as _, o as v, p as y, pt as b, s as x, t as S, vt as C, y as w, z as T } from "../Close-fTRpxtBv.js";
|
|
3
|
+
import { c as E, n as ee } from "../dist-FMIRkZir.js";
|
|
4
|
+
import D, { useRef as te } from "react";
|
|
5
|
+
import { createRoot as ne } from "react-dom/client";
|
|
6
|
+
import re from "react-dom";
|
|
7
|
+
import { Fragment as ie, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
8
8
|
//#region ../../shared/player-events/dist/index.js
|
|
9
|
-
var
|
|
9
|
+
var ae = class e extends CustomEvent {
|
|
10
10
|
static {
|
|
11
11
|
this.TYPE = "model-set";
|
|
12
12
|
}
|
|
@@ -21,7 +21,7 @@ var ie = class e extends CustomEvent {
|
|
|
21
21
|
}
|
|
22
22
|
}), this.component = t, this.complete = n;
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, oe = class e extends CustomEvent {
|
|
25
25
|
static {
|
|
26
26
|
this.TYPE = "session-changed";
|
|
27
27
|
}
|
|
@@ -35,7 +35,7 @@ var ie = class e extends CustomEvent {
|
|
|
35
35
|
}
|
|
36
36
|
}), this.component = t, this.complete = n;
|
|
37
37
|
}
|
|
38
|
-
}, A = /* @__PURE__ */ e(
|
|
38
|
+
}, A = /* @__PURE__ */ e(s(), 1), se = "height ease-in 300ms, opacity ease-in 300ms", ce = C("div")(() => ({
|
|
39
39
|
position: "relative",
|
|
40
40
|
height: 0,
|
|
41
41
|
overflow: "hidden",
|
|
@@ -43,7 +43,7 @@ var ie = class e extends CustomEvent {
|
|
|
43
43
|
visibility: "hidden",
|
|
44
44
|
width: 0,
|
|
45
45
|
"&.enter": {
|
|
46
|
-
transition:
|
|
46
|
+
transition: se,
|
|
47
47
|
opacity: 1,
|
|
48
48
|
height: "auto",
|
|
49
49
|
width: "auto",
|
|
@@ -57,7 +57,7 @@ var ie = class e extends CustomEvent {
|
|
|
57
57
|
minHeight: "25px"
|
|
58
58
|
},
|
|
59
59
|
"&.exit": {
|
|
60
|
-
transition:
|
|
60
|
+
transition: se,
|
|
61
61
|
opacity: 0,
|
|
62
62
|
height: 0,
|
|
63
63
|
visibility: "visible",
|
|
@@ -69,9 +69,9 @@ var ie = class e extends CustomEvent {
|
|
|
69
69
|
height: 0,
|
|
70
70
|
width: 0
|
|
71
71
|
}
|
|
72
|
-
})),
|
|
73
|
-
let { show: t, children: n, className: r } = e, i =
|
|
74
|
-
return /* @__PURE__ */ O(
|
|
72
|
+
})), le = (e) => {
|
|
73
|
+
let { show: t, children: n, className: r } = e, i = te(null);
|
|
74
|
+
return /* @__PURE__ */ O(d, {
|
|
75
75
|
nodeRef: i,
|
|
76
76
|
in: t,
|
|
77
77
|
appear: !0,
|
|
@@ -83,21 +83,21 @@ var ie = class e extends CustomEvent {
|
|
|
83
83
|
exit: "exit",
|
|
84
84
|
exitDone: "exit-done"
|
|
85
85
|
},
|
|
86
|
-
children: /* @__PURE__ */ O(
|
|
86
|
+
children: /* @__PURE__ */ O(ce, {
|
|
87
87
|
ref: i,
|
|
88
88
|
className: r,
|
|
89
89
|
children: n
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
|
-
|
|
93
|
+
le.propTypes = {
|
|
94
94
|
show: A.default.bool.isRequired,
|
|
95
95
|
className: A.default.string,
|
|
96
96
|
children: A.default.oneOfType([A.default.arrayOf(A.default.node), A.default.node]).isRequired
|
|
97
97
|
};
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region ../../lib-react/correct-answer-toggle/dist/i18n/index.js
|
|
100
|
-
var
|
|
100
|
+
var ue = p({
|
|
101
101
|
packageName: "@pie-lib/correct-answer-toggle",
|
|
102
102
|
source: {
|
|
103
103
|
showCorrectAnswer: "Show correct answer",
|
|
@@ -153,7 +153,7 @@ var le = g({
|
|
|
153
153
|
"../sv-CIiWPsen.js"
|
|
154
154
|
)
|
|
155
155
|
}
|
|
156
|
-
}),
|
|
156
|
+
}), de = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ k("svg", {
|
|
157
157
|
"aria-hidden": "true",
|
|
158
158
|
focusable: "false",
|
|
159
159
|
preserveAspectRatio: "xMinYMin meet",
|
|
@@ -177,11 +177,11 @@ var le = g({
|
|
|
177
177
|
})
|
|
178
178
|
]
|
|
179
179
|
});
|
|
180
|
-
|
|
180
|
+
de.propTypes = {
|
|
181
181
|
bgFill: A.default.string.isRequired,
|
|
182
182
|
fgFill: A.default.string.isRequired
|
|
183
183
|
};
|
|
184
|
-
var
|
|
184
|
+
var fe = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ k("svg", {
|
|
185
185
|
"aria-hidden": "true",
|
|
186
186
|
focusable: "false",
|
|
187
187
|
preserveAspectRatio: "xMinYMin meet",
|
|
@@ -223,20 +223,20 @@ var de = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ k("svg", {
|
|
|
223
223
|
})
|
|
224
224
|
]
|
|
225
225
|
});
|
|
226
|
-
|
|
226
|
+
fe.propTypes = {
|
|
227
227
|
bgFill: A.default.string.isRequired,
|
|
228
228
|
fgFill: A.default.string.isRequired,
|
|
229
229
|
borderFill: A.default.string.isRequired
|
|
230
230
|
};
|
|
231
|
-
var
|
|
231
|
+
var pe = C("div")(({ size: e }) => ({
|
|
232
232
|
width: e || "25px",
|
|
233
233
|
height: e || "25px"
|
|
234
|
-
})), j = ({ open: e, size: t }) => /* @__PURE__ */ O(
|
|
234
|
+
})), j = ({ open: e, size: t }) => /* @__PURE__ */ O(pe, {
|
|
235
235
|
size: t,
|
|
236
|
-
children: e ? /* @__PURE__ */ O(
|
|
236
|
+
children: e ? /* @__PURE__ */ O(de, {
|
|
237
237
|
bgFill: "#bce2ff",
|
|
238
238
|
fgFill: "#1a9cff"
|
|
239
|
-
}) : /* @__PURE__ */ O(
|
|
239
|
+
}) : /* @__PURE__ */ O(fe, {
|
|
240
240
|
bgFill: "white",
|
|
241
241
|
fgFill: "#1a9cff",
|
|
242
242
|
borderFill: "#bce2ff"
|
|
@@ -251,20 +251,20 @@ j.propTypes = {
|
|
|
251
251
|
function M(e) {
|
|
252
252
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function me(e, t) {
|
|
255
255
|
return !e || M(e) ? e : M(e.default) ? e.default : t && M(e[t]) ? e[t] : t && M(e[t]?.default) ? e[t].default : e;
|
|
256
256
|
}
|
|
257
|
-
var
|
|
257
|
+
var he = v, N = he.default, ge = N && typeof N == "object" ? N : he, _e = me(h, "Readable") || me(ge.Readable, "Readable"), ve = {
|
|
258
258
|
WebkitTouchCallout: "none",
|
|
259
259
|
WebkitUserSelect: "none",
|
|
260
260
|
KhtmlUserSelect: "none",
|
|
261
261
|
MozUserSelect: "none",
|
|
262
262
|
msUserSelect: "none",
|
|
263
263
|
userSelect: "none"
|
|
264
|
-
},
|
|
264
|
+
}, ye = C("div")(() => ({
|
|
265
265
|
width: "100%",
|
|
266
266
|
cursor: "pointer"
|
|
267
|
-
})),
|
|
267
|
+
})), be = C("button")(() => ({
|
|
268
268
|
margin: "0 auto",
|
|
269
269
|
textAlign: "center",
|
|
270
270
|
display: "flex",
|
|
@@ -280,15 +280,15 @@ var me = v, N = me.default, he = N && typeof N == "object" ? N : me, ge = pe(h,
|
|
|
280
280
|
outline: `2px solid ${b.buttonFocusOutline()}`,
|
|
281
281
|
outlineOffset: "-2px"
|
|
282
282
|
}
|
|
283
|
-
})),
|
|
283
|
+
})), xe = C("div")(() => ({
|
|
284
284
|
width: "fit-content",
|
|
285
285
|
minWidth: "140px",
|
|
286
286
|
alignSelf: "center",
|
|
287
287
|
verticalAlign: "middle",
|
|
288
288
|
color: `var(--correct-answer-toggle-label-color, ${b.text()})`,
|
|
289
289
|
fontWeight: "normal",
|
|
290
|
-
...
|
|
291
|
-
})),
|
|
290
|
+
...ve
|
|
291
|
+
})), Se = C("div")(() => ({
|
|
292
292
|
position: "absolute",
|
|
293
293
|
width: "25px",
|
|
294
294
|
"&.enter": { opacity: "0" },
|
|
@@ -301,12 +301,12 @@ var me = v, N = me.default, he = N && typeof N == "object" ? N : me, ge = pe(h,
|
|
|
301
301
|
opacity: "0",
|
|
302
302
|
transition: "opacity 0.3s ease-in"
|
|
303
303
|
}
|
|
304
|
-
})),
|
|
304
|
+
})), Ce = C("div")(() => ({
|
|
305
305
|
width: "25px",
|
|
306
306
|
marginRight: "5px",
|
|
307
307
|
display: "flex",
|
|
308
308
|
alignItems: "center"
|
|
309
|
-
})),
|
|
309
|
+
})), we = class extends D.Component {
|
|
310
310
|
static propTypes = {
|
|
311
311
|
onToggle: A.default.func,
|
|
312
312
|
toggled: A.default.bool,
|
|
@@ -334,17 +334,18 @@ var me = v, N = me.default, he = N && typeof N == "object" ? N : me, ge = pe(h,
|
|
|
334
334
|
this.setState({ show: e.show });
|
|
335
335
|
}
|
|
336
336
|
render() {
|
|
337
|
-
let { className: e, toggled: t, language: n } = this.props, r =
|
|
338
|
-
return /* @__PURE__ */ O(
|
|
337
|
+
let { className: e, toggled: t, language: n } = this.props, r = ue.forLocale(n, this.relabel), i = this.props.hideMessage ?? r.t("hideCorrectAnswer"), a = this.props.showMessage ?? r.t("showCorrectAnswer");
|
|
338
|
+
return /* @__PURE__ */ O(ye, {
|
|
339
339
|
className: e,
|
|
340
|
-
|
|
340
|
+
...g(n),
|
|
341
|
+
children: /* @__PURE__ */ O(le, {
|
|
341
342
|
show: this.state.show,
|
|
342
|
-
children: /* @__PURE__ */ k(
|
|
343
|
+
children: /* @__PURE__ */ k(be, {
|
|
343
344
|
type: "button",
|
|
344
345
|
"aria-pressed": !!t,
|
|
345
346
|
onClick: this.onClick.bind(this),
|
|
346
347
|
onTouchEnd: this.onTouch.bind(this),
|
|
347
|
-
children: [/* @__PURE__ */ k(
|
|
348
|
+
children: [/* @__PURE__ */ k(Ce, { children: [/* @__PURE__ */ O(d, {
|
|
348
349
|
nodeRef: this.openIconRef,
|
|
349
350
|
timeout: 400,
|
|
350
351
|
in: t,
|
|
@@ -355,11 +356,11 @@ var me = v, N = me.default, he = N && typeof N == "object" ? N : me, ge = pe(h,
|
|
|
355
356
|
exit: "exit",
|
|
356
357
|
exitActive: "exit-active"
|
|
357
358
|
},
|
|
358
|
-
children: /* @__PURE__ */ O(
|
|
359
|
+
children: /* @__PURE__ */ O(Se, {
|
|
359
360
|
ref: this.openIconRef,
|
|
360
361
|
children: /* @__PURE__ */ O(j, { open: t }, "correct-open")
|
|
361
362
|
})
|
|
362
|
-
}), /* @__PURE__ */ O(
|
|
363
|
+
}), /* @__PURE__ */ O(d, {
|
|
363
364
|
nodeRef: this.closedIconRef,
|
|
364
365
|
timeout: 5e3,
|
|
365
366
|
in: !t,
|
|
@@ -370,13 +371,13 @@ var me = v, N = me.default, he = N && typeof N == "object" ? N : me, ge = pe(h,
|
|
|
370
371
|
exit: "exit",
|
|
371
372
|
exitActive: "exit-active"
|
|
372
373
|
},
|
|
373
|
-
children: /* @__PURE__ */ O(
|
|
374
|
+
children: /* @__PURE__ */ O(Se, {
|
|
374
375
|
ref: this.closedIconRef,
|
|
375
376
|
children: /* @__PURE__ */ O(j, { open: t }, "correct-closed")
|
|
376
377
|
})
|
|
377
|
-
})] }), /* @__PURE__ */ O(
|
|
378
|
+
})] }), /* @__PURE__ */ O(_e, {
|
|
378
379
|
false: !0,
|
|
379
|
-
children: /* @__PURE__ */ O(
|
|
380
|
+
children: /* @__PURE__ */ O(xe, {
|
|
380
381
|
"aria-hidden": !this.state.show,
|
|
381
382
|
children: t ? i : a
|
|
382
383
|
})
|
|
@@ -385,7 +386,7 @@ var me = v, N = me.default, he = N && typeof N == "object" ? N : me, ge = pe(h,
|
|
|
385
386
|
})
|
|
386
387
|
});
|
|
387
388
|
}
|
|
388
|
-
},
|
|
389
|
+
}, Te = /\{\{(\d+)\}\}/g, Ee = (e, t) => e ? { markup: e.replace(Te, (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) => {
|
|
389
390
|
t.exports = {
|
|
390
391
|
"border-radius": 1,
|
|
391
392
|
"border-top-left-radius": 1,
|
|
@@ -467,16 +468,16 @@ var R = /* @__PURE__ */ P(((e, t) => {
|
|
|
467
468
|
R();
|
|
468
469
|
//#endregion
|
|
469
470
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js
|
|
470
|
-
var
|
|
471
|
+
var De = /* @__PURE__ */ P(((e, t) => {
|
|
471
472
|
t.exports = /[-\s]+(.)?/g;
|
|
472
473
|
}));
|
|
473
|
-
|
|
474
|
+
De();
|
|
474
475
|
//#endregion
|
|
475
476
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js
|
|
476
477
|
var z = /* @__PURE__ */ P(((e, t) => {
|
|
477
478
|
var n = function(e, t) {
|
|
478
479
|
return t ? t.toUpperCase() : "";
|
|
479
|
-
}, r =
|
|
480
|
+
}, r = De();
|
|
480
481
|
t.exports = function(e) {
|
|
481
482
|
return e ? e.replace(r, n) : "";
|
|
482
483
|
};
|
|
@@ -484,17 +485,17 @@ var z = /* @__PURE__ */ P(((e, t) => {
|
|
|
484
485
|
z();
|
|
485
486
|
//#endregion
|
|
486
487
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js
|
|
487
|
-
var
|
|
488
|
+
var Oe = /* @__PURE__ */ P(((e, t) => {
|
|
488
489
|
var n = /::/g, r = /([A-Z]+)([A-Z][a-z])/g, i = /([a-z\d])([A-Z])/g, a = /_/g;
|
|
489
490
|
t.exports = function(e, t) {
|
|
490
491
|
return e ? e.replace(n, "/").replace(r, "$1_$2").replace(i, "$1_$2").replace(a, t || "-") : "";
|
|
491
492
|
};
|
|
492
493
|
}));
|
|
493
|
-
|
|
494
|
+
Oe();
|
|
494
495
|
//#endregion
|
|
495
496
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js
|
|
496
497
|
var B = /* @__PURE__ */ P(((e, t) => {
|
|
497
|
-
var n =
|
|
498
|
+
var n = Oe();
|
|
498
499
|
t.exports = function(e) {
|
|
499
500
|
return n(e).toLowerCase();
|
|
500
501
|
};
|
|
@@ -502,16 +503,16 @@ var B = /* @__PURE__ */ P(((e, t) => {
|
|
|
502
503
|
B();
|
|
503
504
|
//#endregion
|
|
504
505
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js
|
|
505
|
-
var
|
|
506
|
+
var ke = /* @__PURE__ */ P(((e, t) => {
|
|
506
507
|
t.exports = function(e) {
|
|
507
508
|
return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
|
|
508
509
|
};
|
|
509
510
|
}));
|
|
510
|
-
|
|
511
|
+
ke();
|
|
511
512
|
//#endregion
|
|
512
513
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js
|
|
513
|
-
var
|
|
514
|
-
var n = z(), r = B(), i =
|
|
514
|
+
var Ae = /* @__PURE__ */ P(((e, t) => {
|
|
515
|
+
var n = z(), r = B(), i = ke(), a = L(), o = R(), s = F(), c = typeof document > "u" ? {} : document.documentElement.style;
|
|
515
516
|
t.exports = function(e) {
|
|
516
517
|
return function(t, l) {
|
|
517
518
|
l ||= {};
|
|
@@ -528,13 +529,13 @@ var ke = /* @__PURE__ */ P(((e, t) => {
|
|
|
528
529
|
};
|
|
529
530
|
};
|
|
530
531
|
}));
|
|
531
|
-
|
|
532
|
+
Ae();
|
|
532
533
|
//#endregion
|
|
533
534
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js
|
|
534
|
-
var
|
|
535
|
-
t.exports =
|
|
535
|
+
var je = /* @__PURE__ */ P(((e, t) => {
|
|
536
|
+
t.exports = Ae()();
|
|
536
537
|
}));
|
|
537
|
-
|
|
538
|
+
je();
|
|
538
539
|
//#endregion
|
|
539
540
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js
|
|
540
541
|
var V = /* @__PURE__ */ P(((e, t) => {
|
|
@@ -546,27 +547,27 @@ var V = /* @__PURE__ */ P(((e, t) => {
|
|
|
546
547
|
V();
|
|
547
548
|
//#endregion
|
|
548
549
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js
|
|
549
|
-
var
|
|
550
|
+
var Me = /* @__PURE__ */ P(((e, t) => {
|
|
550
551
|
var n = Object.prototype.toString;
|
|
551
552
|
t.exports = function(e) {
|
|
552
553
|
return !!e && n.call(e) === "[object Object]";
|
|
553
554
|
};
|
|
554
555
|
}));
|
|
555
|
-
|
|
556
|
+
Me();
|
|
556
557
|
//#endregion
|
|
557
558
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js
|
|
558
|
-
var
|
|
559
|
+
var Ne = /* @__PURE__ */ P(((e, t) => {
|
|
559
560
|
var n = Object.prototype.toString;
|
|
560
561
|
t.exports = function(e) {
|
|
561
562
|
return n.apply(e) === "[object Function]";
|
|
562
563
|
};
|
|
563
564
|
}));
|
|
564
|
-
|
|
565
|
+
Ne();
|
|
565
566
|
//#endregion
|
|
566
567
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js
|
|
567
568
|
var H = /* @__PURE__ */ P(((e, t) => {
|
|
568
569
|
R();
|
|
569
|
-
var n =
|
|
570
|
+
var n = je(), r = B(), i = z(), a = V(), o = Me(), s = Ne(), c = function(e, t, r, i) {
|
|
570
571
|
n(t).forEach(function(t) {
|
|
571
572
|
e[i ? i(t) : t] = r;
|
|
572
573
|
});
|
|
@@ -609,7 +610,7 @@ var H = /* @__PURE__ */ P(((e, t) => {
|
|
|
609
610
|
H();
|
|
610
611
|
//#endregion
|
|
611
612
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js
|
|
612
|
-
var
|
|
613
|
+
var Pe = /* @__PURE__ */ P(((e, t) => {
|
|
613
614
|
var n = H(), r = V();
|
|
614
615
|
t.exports = function(e, t) {
|
|
615
616
|
e = n(e, t);
|
|
@@ -618,25 +619,25 @@ var Ne = /* @__PURE__ */ P(((e, t) => {
|
|
|
618
619
|
return i.join("; ");
|
|
619
620
|
};
|
|
620
621
|
}));
|
|
621
|
-
|
|
622
|
+
Pe();
|
|
622
623
|
//#endregion
|
|
623
624
|
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js
|
|
624
|
-
var
|
|
625
|
+
var Fe = /* @__PURE__ */ P(((e, t) => {
|
|
625
626
|
t.exports = {
|
|
626
627
|
prefixProperties: F(),
|
|
627
628
|
cssUnitless: I(),
|
|
628
629
|
object: H(),
|
|
629
|
-
string:
|
|
630
|
+
string: Pe()
|
|
630
631
|
};
|
|
631
632
|
}));
|
|
632
|
-
|
|
633
|
+
Fe();
|
|
633
634
|
//#endregion
|
|
634
635
|
//#region ../../lib-react/mask-markup/dist/serialization.js
|
|
635
|
-
var
|
|
636
|
+
var Ie = /* @__PURE__ */ e(a(), 1), Le = Fe(), Re = (0, Ie.default)("@pie-lib:mask-markup:serialization"), ze = ["span"], Be = [
|
|
636
637
|
"em",
|
|
637
638
|
"strong",
|
|
638
639
|
"u"
|
|
639
|
-
],
|
|
640
|
+
], Ve = 3, He = 8, Ue = 1, We = (e) => {
|
|
640
641
|
if (!e.attributes || e.attributes.length <= 0) return;
|
|
641
642
|
let t = {}, n;
|
|
642
643
|
for (n = 0; n < e.attributes.length; n++) {
|
|
@@ -644,31 +645,31 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
644
645
|
t[r.name] = r.value;
|
|
645
646
|
}
|
|
646
647
|
return t;
|
|
647
|
-
},
|
|
648
|
+
}, Ge = (e) => ze.includes(e) ? "inline" : Be.includes(e) ? "mark" : "block", Ke = (e) => {
|
|
648
649
|
let t = /([\w-]*)\s*:\s*([^;]*)/g, n, r = {};
|
|
649
650
|
for (; n = t.exec(e);) r[n[1]] = n[2].trim();
|
|
650
651
|
return r;
|
|
651
|
-
},
|
|
652
|
+
}, qe = (e) => (0, Le.object)(e, {
|
|
652
653
|
camelize: !0,
|
|
653
654
|
addUnits: !1
|
|
654
|
-
}),
|
|
655
|
+
}), Je = (e, t) => qe(Ke(e.getAttribute(t))), Ye = (e, t, n) => {
|
|
655
656
|
let r = e.getAttribute(n);
|
|
656
657
|
return delete t.class, r;
|
|
657
|
-
},
|
|
658
|
+
}, Xe = (e) => (t, n) => {
|
|
658
659
|
if (!e.getAttribute) return t;
|
|
659
660
|
if (e.getAttribute(n)) switch (n) {
|
|
660
661
|
case "style":
|
|
661
|
-
t.style =
|
|
662
|
+
t.style = Je(e, n);
|
|
662
663
|
break;
|
|
663
664
|
case "class":
|
|
664
|
-
t.className =
|
|
665
|
+
t.className = Ye(e, t, n);
|
|
665
666
|
break;
|
|
666
667
|
default:
|
|
667
668
|
t[n] = e.getAttribute(n);
|
|
668
669
|
break;
|
|
669
670
|
}
|
|
670
671
|
return t;
|
|
671
|
-
},
|
|
672
|
+
}, Ze = [
|
|
672
673
|
"border",
|
|
673
674
|
"class",
|
|
674
675
|
"style"
|
|
@@ -679,9 +680,9 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
679
680
|
s: "strikethrough",
|
|
680
681
|
code: "code",
|
|
681
682
|
strong: "strong"
|
|
682
|
-
},
|
|
683
|
-
if (e.nodeType ===
|
|
684
|
-
if (e.nodeType ===
|
|
683
|
+
}, Qe = (e, t = []) => {
|
|
684
|
+
if (e.nodeType === He) return null;
|
|
685
|
+
if (e.nodeType === Ve) {
|
|
685
686
|
let n = { text: e.textContent };
|
|
686
687
|
return t.length > 0 && (n.marks = t.map((e) => ({
|
|
687
688
|
type: e,
|
|
@@ -691,9 +692,9 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
691
692
|
leaves: [n]
|
|
692
693
|
};
|
|
693
694
|
}
|
|
694
|
-
if (e.nodeType ===
|
|
695
|
+
if (e.nodeType === Ue) {
|
|
695
696
|
let n = e.tagName.toLowerCase(), r = U[n];
|
|
696
|
-
if (r) return
|
|
697
|
+
if (r) return Re("[deserialize] mark: ", r), {
|
|
697
698
|
_flatten: !0,
|
|
698
699
|
nodes: W(e.childNodes, [...t, r])
|
|
699
700
|
};
|
|
@@ -701,9 +702,9 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
701
702
|
isMath: !0,
|
|
702
703
|
nodes: [e]
|
|
703
704
|
};
|
|
704
|
-
let i =
|
|
705
|
+
let i = We(e) || {};
|
|
705
706
|
n === "audio" && i.controls === "" && (i.controls = !0);
|
|
706
|
-
let a =
|
|
707
|
+
let a = Ze.reduce(Xe(e), { ...i }), o = Ge(n), s = W(e.childNodes, t);
|
|
707
708
|
return {
|
|
708
709
|
object: o,
|
|
709
710
|
type: n,
|
|
@@ -718,11 +719,11 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
718
719
|
}, W = (e, t = []) => {
|
|
719
720
|
let n = [];
|
|
720
721
|
for (let r = 0; r < e.length; r++) {
|
|
721
|
-
let i =
|
|
722
|
+
let i = Qe(e[r], t);
|
|
722
723
|
i !== null && (i._flatten && i.nodes ? n.push(...i.nodes) : n.push(i));
|
|
723
724
|
}
|
|
724
725
|
return n;
|
|
725
|
-
},
|
|
726
|
+
}, $e = (e) => {
|
|
726
727
|
if (!e || !e.trim()) return {
|
|
727
728
|
object: "value",
|
|
728
729
|
document: {
|
|
@@ -758,44 +759,44 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
758
759
|
nodes: t
|
|
759
760
|
}
|
|
760
761
|
};
|
|
761
|
-
},
|
|
762
|
+
}, et = C("div")(({ theme: e }) => ({
|
|
762
763
|
paddingTop: e.spacing(.5),
|
|
763
764
|
paddingBottom: e.spacing(.5)
|
|
764
|
-
})),
|
|
765
|
+
})), tt = C("span")(() => ({
|
|
765
766
|
display: "inline-block",
|
|
766
767
|
width: ".75em"
|
|
767
|
-
})),
|
|
768
|
+
})), nt = ["tbody", "tr"], rt = (e, t) => {
|
|
768
769
|
let n = t.trim() === "", r = e && e.type;
|
|
769
|
-
if (!(n &&
|
|
770
|
-
},
|
|
771
|
-
let t = e.leaves.find((e) =>
|
|
770
|
+
if (!(n && nt.includes(r))) return t;
|
|
771
|
+
}, it = (e) => {
|
|
772
|
+
let t = e.leaves.find((e) => E(e, "marks", []).length);
|
|
772
773
|
return t ? t.marks : null;
|
|
773
|
-
},
|
|
774
|
+
}, at = (e, t, n, r, i, a) => {
|
|
774
775
|
if (!t) return null;
|
|
775
776
|
let o = [];
|
|
776
777
|
return (e.nodes || []).forEach((e, s) => {
|
|
777
778
|
let c = e.type ? `${e.type}-${s}` : `${s}`;
|
|
778
|
-
if (e.isMath) return o.push(/* @__PURE__ */ O("span", { dangerouslySetInnerHTML: { __html:
|
|
779
|
+
if (e.isMath) return o.push(/* @__PURE__ */ O("span", { dangerouslySetInnerHTML: { __html: u(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`) } })), o;
|
|
779
780
|
if (r) {
|
|
780
781
|
let a = r(e, t, n);
|
|
781
782
|
if (a) {
|
|
782
783
|
let t = e.data?.dataset?.component === "blank" && i?.type !== "td";
|
|
783
|
-
t && o.push(/* @__PURE__ */ O(
|
|
784
|
+
t && o.push(/* @__PURE__ */ O(tt, {}, `spacer-${s}-before`)), o.push(a), t && o.push(/* @__PURE__ */ O(tt, {}, `spacer-${s}-after`));
|
|
784
785
|
return;
|
|
785
786
|
}
|
|
786
787
|
}
|
|
787
788
|
if (e.object === "text") {
|
|
788
789
|
let t = e.leaves.reduce((e, t) => {
|
|
789
|
-
let n = t.text, r =
|
|
790
|
+
let n = t.text, r = rt(i, n);
|
|
790
791
|
return r ? e + r : e;
|
|
791
|
-
}, ""), n =
|
|
792
|
+
}, ""), n = it(e);
|
|
792
793
|
if (n?.length > 0) {
|
|
793
794
|
let e = n.map((e) => Object.keys(U).find((t) => U[t] === e.type)).filter(Boolean);
|
|
794
795
|
e.length > 0 ? o.push(e.reduceRight((e, t, n) => /* @__PURE__ */ O(t, { children: e }, `${c}-${t}-${n}`), t)) : o.push(t);
|
|
795
796
|
} else t.length > 0 && o.push(t);
|
|
796
797
|
} else {
|
|
797
|
-
let i =
|
|
798
|
-
if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ O(
|
|
798
|
+
let i = at(e, t, n, r, e, a);
|
|
799
|
+
if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ O(et, { children: i }, c));
|
|
799
800
|
else {
|
|
800
801
|
let t = e.type;
|
|
801
802
|
e.nodes && e.nodes.length > 0 ? o.push(/* @__PURE__ */ O(t, {
|
|
@@ -805,14 +806,14 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
805
806
|
}
|
|
806
807
|
}
|
|
807
808
|
}), o;
|
|
808
|
-
},
|
|
809
|
+
}, ot = C("div")(() => ({
|
|
809
810
|
display: "initial",
|
|
810
811
|
"&:not(.MathJax) table": { borderCollapse: "collapse" },
|
|
811
812
|
"&:not(.MathJax) table td, &:not(.MathJax) table th": {
|
|
812
813
|
padding: "8px 12px",
|
|
813
814
|
textAlign: "left"
|
|
814
815
|
}
|
|
815
|
-
})),
|
|
816
|
+
})), st = class extends D.Component {
|
|
816
817
|
constructor(e) {
|
|
817
818
|
super(e), this.internalContainerRef = D.createRef();
|
|
818
819
|
}
|
|
@@ -826,7 +827,7 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
826
827
|
};
|
|
827
828
|
componentDidMount() {
|
|
828
829
|
let e = this.props.containerRef || this.internalContainerRef;
|
|
829
|
-
e.current && typeof
|
|
830
|
+
e.current && typeof r == "function" && r(e.current);
|
|
830
831
|
}
|
|
831
832
|
handleChange = (e, t) => {
|
|
832
833
|
let n = {
|
|
@@ -836,16 +837,16 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
836
837
|
this.props.onChange(n);
|
|
837
838
|
};
|
|
838
839
|
render() {
|
|
839
|
-
let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i =
|
|
840
|
-
return /* @__PURE__ */ O(
|
|
840
|
+
let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = at(t, e, this.handleChange, this.props.renderChildren, null, n);
|
|
841
|
+
return /* @__PURE__ */ O(ot, {
|
|
841
842
|
ref: r || this.internalContainerRef,
|
|
842
843
|
children: i
|
|
843
844
|
});
|
|
844
845
|
}
|
|
845
|
-
},
|
|
846
|
-
let { markup: n } =
|
|
847
|
-
return
|
|
848
|
-
},
|
|
846
|
+
}, ct = (e, t) => {
|
|
847
|
+
let { markup: n } = Ee(e, t);
|
|
848
|
+
return $e(u(n)).document;
|
|
849
|
+
}, lt = (e, t) => class extends D.Component {
|
|
849
850
|
static propTypes = {
|
|
850
851
|
markup: A.default.string,
|
|
851
852
|
layout: A.default.object,
|
|
@@ -867,8 +868,8 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
867
868
|
}
|
|
868
869
|
}
|
|
869
870
|
render() {
|
|
870
|
-
let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r ||
|
|
871
|
-
return /* @__PURE__ */ O(
|
|
871
|
+
let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || ct(n, e);
|
|
872
|
+
return /* @__PURE__ */ O(st, {
|
|
872
873
|
containerRef: this.containerRef,
|
|
873
874
|
elementType: o,
|
|
874
875
|
layout: s,
|
|
@@ -877,16 +878,16 @@ var Fe = /* @__PURE__ */ e(a(), 1), Ie = Pe(), Le = (0, Fe.default)("@pie-lib:ma
|
|
|
877
878
|
renderChildren: t(this.props)
|
|
878
879
|
});
|
|
879
880
|
}
|
|
880
|
-
},
|
|
881
|
+
}, ut = T(/*#__PURE__*/ O("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), dt = T(/*#__PURE__*/ O("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
|
|
881
882
|
//#endregion
|
|
882
883
|
//#region ../../lib-react/mask-markup/dist/components/dropdown.js
|
|
883
884
|
function G(e) {
|
|
884
885
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
885
886
|
}
|
|
886
|
-
function
|
|
887
|
+
function ft(e, t) {
|
|
887
888
|
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;
|
|
888
889
|
}
|
|
889
|
-
var
|
|
890
|
+
var pt = v, K = pt.default, mt = K && typeof K == "object" ? K : pt, ht = ft(x, "InlineMenu") || ft(mt.InlineMenu, "InlineMenu"), { translator: gt } = c, _t = b.v("pie"), vt = C(o)(() => ({
|
|
890
891
|
color: b.text(),
|
|
891
892
|
border: `1px solid ${b.borderGray()}`,
|
|
892
893
|
borderRadius: "4px",
|
|
@@ -922,13 +923,13 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
922
923
|
borderColor: b.incorrectWithIcon(),
|
|
923
924
|
color: `${b.text()} !important`
|
|
924
925
|
}
|
|
925
|
-
})),
|
|
926
|
+
})), yt = C(ht)(() => ({
|
|
926
927
|
"& .MuiPaper-root": {
|
|
927
|
-
backgroundColor:
|
|
928
|
+
backgroundColor: _t("background", b.defaults.WHITE),
|
|
928
929
|
border: `1px solid ${b.borderGray()}`
|
|
929
930
|
},
|
|
930
931
|
"& .MuiList-root": { padding: 0 }
|
|
931
|
-
})),
|
|
932
|
+
})), bt = C(_)(() => ({
|
|
932
933
|
height: 24,
|
|
933
934
|
overflow: "hidden",
|
|
934
935
|
fontSize: "1rem",
|
|
@@ -959,18 +960,18 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
959
960
|
backgroundColor: `${b.dropdownBackground()} !important`
|
|
960
961
|
}
|
|
961
962
|
}
|
|
962
|
-
})), q =
|
|
963
|
+
})), q = C("span")(() => ({ fontSize: "max(1rem, 14px)" })), xt = C("span")(() => ({
|
|
963
964
|
fontSize: "max(1rem, 14px)",
|
|
964
965
|
flexShrink: 0,
|
|
965
966
|
paddingLeft: "8px"
|
|
966
|
-
})),
|
|
967
|
+
})), St = C(w)(() => ({
|
|
967
968
|
position: "absolute",
|
|
968
969
|
left: "-10000px",
|
|
969
970
|
top: "auto",
|
|
970
971
|
width: "1px",
|
|
971
972
|
height: "1px",
|
|
972
973
|
overflow: "hidden"
|
|
973
|
-
})),
|
|
974
|
+
})), Ct = C(m)(() => ({
|
|
974
975
|
color: `${b.white()} !important`,
|
|
975
976
|
position: "absolute",
|
|
976
977
|
top: "-8px !important",
|
|
@@ -981,7 +982,7 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
981
982
|
padding: "2px",
|
|
982
983
|
"&.correct": { backgroundColor: b.correct() },
|
|
983
984
|
"&.incorrect": { backgroundColor: b.incorrectWithIcon() }
|
|
984
|
-
})),
|
|
985
|
+
})), wt = C(S)(() => ({
|
|
985
986
|
color: `${b.white()} !important`,
|
|
986
987
|
position: "absolute",
|
|
987
988
|
top: "-8px !important",
|
|
@@ -992,7 +993,7 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
992
993
|
padding: "2px",
|
|
993
994
|
"&.correct": { backgroundColor: b.correct() },
|
|
994
995
|
"&.incorrect": { backgroundColor: b.incorrectWithIcon() }
|
|
995
|
-
})),
|
|
996
|
+
})), Tt = class extends D.Component {
|
|
996
997
|
static propTypes = {
|
|
997
998
|
id: A.default.string,
|
|
998
999
|
value: A.default.string,
|
|
@@ -1024,13 +1025,13 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
1024
1025
|
let n = this.hiddenRef.current;
|
|
1025
1026
|
if (!t.anchorEl && this.state.anchorEl && this.elementRefs.forEach((e) => {
|
|
1026
1027
|
if (!e) return;
|
|
1027
|
-
let t = e.querySelector("[data-latex], [data-raw]"), n = e.querySelector("mjx-container"),
|
|
1028
|
-
t && (!
|
|
1028
|
+
let t = e.querySelector("[data-latex], [data-raw]"), n = e.querySelector("mjx-container"), i = e.querySelector("[data-math-handled=\"true\"]");
|
|
1029
|
+
t && (!i || !n) && r(e);
|
|
1029
1030
|
}), n) {
|
|
1030
1031
|
let e = n.clientWidth;
|
|
1031
1032
|
e !== this.state.menuWidth && (this.elementRefs.forEach((e) => {
|
|
1032
|
-
e &&
|
|
1033
|
-
}),
|
|
1033
|
+
e && r(e);
|
|
1034
|
+
}), r(n), this.setState({ menuWidth: e }));
|
|
1034
1035
|
}
|
|
1035
1036
|
}
|
|
1036
1037
|
handleClick = (e) => {
|
|
@@ -1075,13 +1076,13 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
1075
1076
|
return n ? n.label.trim() : void 0;
|
|
1076
1077
|
}
|
|
1077
1078
|
render() {
|
|
1078
|
-
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,
|
|
1079
|
+
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, d = !!l, f = `${this.idPrefix}-button`, p = `${this.idPrefix}-menu`, m = `${this.idPrefix}-listbox`, h = `${this.idPrefix}-value`, g;
|
|
1079
1080
|
this.elementRefs = [], n && t !== void 0 && (g = t || a ? "disabledCorrect" : "disabledIncorrect");
|
|
1080
|
-
let _ = parseInt(e, 10) + 1, v = `${this.idPrefix}-query-label`, y = o ?
|
|
1081
|
+
let _ = parseInt(e, 10) + 1, v = `${this.idPrefix}-query-label`, y = o ? gt.t("inlineDropdown.query", { lng: c }) : gt.t("inlineDropdown.queryNumber", {
|
|
1081
1082
|
lng: c,
|
|
1082
1083
|
index: _
|
|
1083
1084
|
}), b = null;
|
|
1084
|
-
return n && t !== void 0 && (b = t || a ? /* @__PURE__ */ O(
|
|
1085
|
+
return n && t !== void 0 && (b = t || a ? /* @__PURE__ */ O(Ct, { className: "correct" }) : /* @__PURE__ */ O(wt, { className: "incorrect" })), /* @__PURE__ */ k(ie, { children: [
|
|
1085
1086
|
/* @__PURE__ */ O("div", {
|
|
1086
1087
|
ref: this.hiddenRef,
|
|
1087
1088
|
style: {
|
|
@@ -1092,28 +1093,28 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
1092
1093
|
},
|
|
1093
1094
|
tabIndex: -1,
|
|
1094
1095
|
"aria-hidden": "true",
|
|
1095
|
-
children: (i || []).map((e, t) => /* @__PURE__ */ O(
|
|
1096
|
+
children: (i || []).map((e, t) => /* @__PURE__ */ O(bt, {
|
|
1096
1097
|
tabIndex: -1,
|
|
1097
1098
|
"aria-hidden": "true",
|
|
1098
|
-
children: /* @__PURE__ */ O(q, { dangerouslySetInnerHTML: { __html:
|
|
1099
|
+
children: /* @__PURE__ */ O(q, { dangerouslySetInnerHTML: { __html: u(e.label) } })
|
|
1099
1100
|
}, t))
|
|
1100
1101
|
}),
|
|
1101
|
-
/* @__PURE__ */ O(
|
|
1102
|
+
/* @__PURE__ */ O(St, {
|
|
1102
1103
|
id: v,
|
|
1103
1104
|
tabIndex: -1,
|
|
1104
1105
|
"aria-hidden": "true",
|
|
1105
1106
|
children: y
|
|
1106
1107
|
}),
|
|
1107
|
-
/* @__PURE__ */ k(
|
|
1108
|
+
/* @__PURE__ */ k(vt, {
|
|
1108
1109
|
ref: this.buttonRef,
|
|
1109
1110
|
style: {
|
|
1110
1111
|
...this.state.menuWidth && { minWidth: `calc(${this.state.menuWidth}px + 8px)` },
|
|
1111
|
-
borderWidth:
|
|
1112
|
+
borderWidth: d ? "2px" : "1px",
|
|
1112
1113
|
transition: "border-width 0.2s ease-in-out"
|
|
1113
1114
|
},
|
|
1114
|
-
"aria-controls":
|
|
1115
|
+
"aria-controls": d ? m : void 0,
|
|
1115
1116
|
"aria-haspopup": "listbox",
|
|
1116
|
-
"aria-expanded":
|
|
1117
|
+
"aria-expanded": d ? "true" : "false",
|
|
1117
1118
|
"aria-activedescendant": this.state.highlightedOptionId,
|
|
1118
1119
|
onClick: this.handleClick,
|
|
1119
1120
|
className: g,
|
|
@@ -1126,16 +1127,16 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
1126
1127
|
/* @__PURE__ */ O(q, {
|
|
1127
1128
|
id: h,
|
|
1128
1129
|
ref: this.previewRef,
|
|
1129
|
-
dangerouslySetInnerHTML: { __html:
|
|
1130
|
+
dangerouslySetInnerHTML: { __html: u(s || (d && this.state.previewValue ? this.getLabel(i, this.state.previewValue) : this.getLabel(i, r) || "")) }
|
|
1130
1131
|
}),
|
|
1131
|
-
O(
|
|
1132
|
+
O(d ? dt : ut, {})
|
|
1132
1133
|
]
|
|
1133
1134
|
}),
|
|
1134
|
-
/* @__PURE__ */ O(
|
|
1135
|
+
/* @__PURE__ */ O(yt, {
|
|
1135
1136
|
id: p,
|
|
1136
1137
|
anchorEl: l,
|
|
1137
1138
|
keepMounted: !0,
|
|
1138
|
-
open:
|
|
1139
|
+
open: d,
|
|
1139
1140
|
onClose: this.handleClose,
|
|
1140
1141
|
getContentAnchorEl: null,
|
|
1141
1142
|
anchorOrigin: {
|
|
@@ -1164,7 +1165,7 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
1164
1165
|
},
|
|
1165
1166
|
children: (i || []).map((e, t) => {
|
|
1166
1167
|
let n = this.optionId(t);
|
|
1167
|
-
return /* @__PURE__ */ k(
|
|
1168
|
+
return /* @__PURE__ */ k(bt, {
|
|
1168
1169
|
id: n,
|
|
1169
1170
|
className: e.value === r ? "selected" : "",
|
|
1170
1171
|
selected: e.value === r,
|
|
@@ -1175,18 +1176,18 @@ var ft = v, K = ft.default, pt = K && typeof K == "object" ? K : ft, mt = dt(x,
|
|
|
1175
1176
|
onMouseOver: () => this.handleHover(t),
|
|
1176
1177
|
children: [/* @__PURE__ */ O(q, {
|
|
1177
1178
|
ref: (e) => this.elementRefs[t] = e,
|
|
1178
|
-
dangerouslySetInnerHTML: { __html:
|
|
1179
|
-
}), /* @__PURE__ */ O(
|
|
1179
|
+
dangerouslySetInnerHTML: { __html: u(e.label) }
|
|
1180
|
+
}), /* @__PURE__ */ O(xt, { dangerouslySetInnerHTML: { __html: e.value === r ? " ✓" : "" } })]
|
|
1180
1181
|
}, `${e.label}-${t}`);
|
|
1181
1182
|
})
|
|
1182
1183
|
})
|
|
1183
1184
|
] });
|
|
1184
1185
|
}
|
|
1185
|
-
},
|
|
1186
|
+
}, Et = lt("dropdown", (e) => (t, n, r) => {
|
|
1186
1187
|
let i = t.data && t.data.dataset || {};
|
|
1187
1188
|
if (i.component === "dropdown") {
|
|
1188
1189
|
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];
|
|
1189
|
-
return /* @__PURE__ */ O(
|
|
1190
|
+
return /* @__PURE__ */ O(Tt, {
|
|
1190
1191
|
correct: s && s[i.id] && s[i.id] === "correct",
|
|
1191
1192
|
disabled: o || c,
|
|
1192
1193
|
value: d,
|
|
@@ -1208,23 +1209,23 @@ function J(e) {
|
|
|
1208
1209
|
function Y(e, t) {
|
|
1209
1210
|
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;
|
|
1210
1211
|
}
|
|
1211
|
-
var
|
|
1212
|
+
var Dt = v, X = Dt.default, Z = X && typeof X == "object" ? X : Dt, Ot = Y(n, "UiLayout") || Y(Z.UiLayout, "UiLayout"), Q = Y(f, "PreviewPrompt") || Y(Z.PreviewPrompt, "PreviewPrompt"), kt = Y(t, "Collapsible") || Y(Z.Collapsible, "Collapsible"), { translator: $ } = c, At = C(Ot)({
|
|
1212
1213
|
color: b.text(),
|
|
1213
1214
|
backgroundColor: b.background()
|
|
1214
|
-
}),
|
|
1215
|
+
}), jt = C(kt)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Mt = C("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), Nt = C("div")({
|
|
1215
1216
|
display: "flex",
|
|
1216
1217
|
whiteSpace: "break-spaces"
|
|
1217
|
-
}),
|
|
1218
|
+
}), Pt = C("div")(({ correct: e }) => ({
|
|
1218
1219
|
display: "flex",
|
|
1219
1220
|
...e ? { color: b.correct() } : { color: b.incorrectWithIcon() }
|
|
1220
|
-
})),
|
|
1221
|
+
})), Ft = C("h2")({
|
|
1221
1222
|
position: "absolute",
|
|
1222
1223
|
left: "-10000px",
|
|
1223
1224
|
top: "auto",
|
|
1224
1225
|
width: "1px",
|
|
1225
1226
|
height: "1px",
|
|
1226
1227
|
overflow: "hidden"
|
|
1227
|
-
}),
|
|
1228
|
+
}), It = class extends D.Component {
|
|
1228
1229
|
static propTypes = {
|
|
1229
1230
|
prompt: A.default.string,
|
|
1230
1231
|
disabled: A.default.bool,
|
|
@@ -1243,22 +1244,22 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1243
1244
|
static defaultProps = { value: {} };
|
|
1244
1245
|
state = { showCorrectAnswer: !1 };
|
|
1245
1246
|
UNSAFE_componentWillReceiveProps(e) {
|
|
1246
|
-
|
|
1247
|
+
ee(e.feedback) && this.setState({ showCorrectAnswer: !1 });
|
|
1247
1248
|
}
|
|
1248
1249
|
componentDidUpdate() {
|
|
1249
|
-
|
|
1250
|
+
r(re.findDOMNode(this));
|
|
1250
1251
|
}
|
|
1251
1252
|
toggleShowCorrect = () => {
|
|
1252
1253
|
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
|
|
1253
1254
|
};
|
|
1254
1255
|
render() {
|
|
1255
|
-
let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: o, displayType: s, language: c } = this.props, { extraCSSRules:
|
|
1256
|
-
return /* @__PURE__ */ k(
|
|
1257
|
-
extraCSSRules:
|
|
1256
|
+
let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: o, displayType: s, language: c } = this.props, { extraCSSRules: d } = r || {}, f = n === "evaluate", p = !1, m = i && (y(i) || l(i)), h = a && (y(a) || l(a)), g = (Object.keys(o) || []).map((e) => (o[e] || []).reduce((e, t) => (t.rationale && y(t.rationale) && (p = !0, e.push(t)), e), []));
|
|
1257
|
+
return /* @__PURE__ */ k(At, {
|
|
1258
|
+
extraCSSRules: d,
|
|
1258
1259
|
style: { display: `${s}` },
|
|
1259
1260
|
children: [
|
|
1260
|
-
n === "gather" && /* @__PURE__ */ O(
|
|
1261
|
-
h && /* @__PURE__ */ O(
|
|
1261
|
+
n === "gather" && /* @__PURE__ */ O(Ft, { children: $.t("inlineDropdown.inlineDropdownQuestion", { lng: c }) }),
|
|
1262
|
+
h && /* @__PURE__ */ O(jt, {
|
|
1262
1263
|
labels: {
|
|
1263
1264
|
hidden: $.t("common:showTeacherInstructions", { lng: c }),
|
|
1264
1265
|
visible: $.t("common:hideTeacherInstructions", { lng: c })
|
|
@@ -1266,27 +1267,27 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1266
1267
|
children: /* @__PURE__ */ O(Q, { prompt: a })
|
|
1267
1268
|
}),
|
|
1268
1269
|
t && /* @__PURE__ */ O(Q, { prompt: t }),
|
|
1269
|
-
/* @__PURE__ */ O(
|
|
1270
|
+
/* @__PURE__ */ O(we, {
|
|
1270
1271
|
show: f,
|
|
1271
1272
|
toggled: e,
|
|
1272
1273
|
onToggle: this.toggleShowCorrect,
|
|
1273
1274
|
language: c
|
|
1274
1275
|
}),
|
|
1275
|
-
/* @__PURE__ */ O(
|
|
1276
|
+
/* @__PURE__ */ O(Et, {
|
|
1276
1277
|
...this.props,
|
|
1277
1278
|
showCorrectAnswer: e
|
|
1278
1279
|
}),
|
|
1279
|
-
p && /* @__PURE__ */ O(
|
|
1280
|
+
p && /* @__PURE__ */ O(jt, {
|
|
1280
1281
|
labels: {
|
|
1281
1282
|
hidden: $.t("inlineDropdown.showRationaleForChoices", { lng: c }),
|
|
1282
1283
|
visible: $.t("inlineDropdown.hideRationaleForChoices", { lng: c })
|
|
1283
1284
|
},
|
|
1284
|
-
children: g.map((e, t) => /* @__PURE__ */ O(
|
|
1285
|
+
children: g.map((e, t) => /* @__PURE__ */ O(Mt, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ k(Nt, { children: [/* @__PURE__ */ O(Pt, {
|
|
1285
1286
|
correct: e.correct,
|
|
1286
|
-
dangerouslySetInnerHTML: { __html: `${
|
|
1287
|
+
dangerouslySetInnerHTML: { __html: `${u(e.label)}: ` }
|
|
1287
1288
|
}), /* @__PURE__ */ O(Q, { prompt: e.rationale })] }, e.label)) }, t))
|
|
1288
1289
|
}),
|
|
1289
|
-
m && /* @__PURE__ */ O(
|
|
1290
|
+
m && /* @__PURE__ */ O(kt, {
|
|
1290
1291
|
labels: {
|
|
1291
1292
|
hidden: $.t("common:showRationale", { lng: c }),
|
|
1292
1293
|
visible: $.t("common:hideRationale", { lng: c })
|
|
@@ -1296,12 +1297,12 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1296
1297
|
]
|
|
1297
1298
|
});
|
|
1298
1299
|
}
|
|
1299
|
-
}, { translator:
|
|
1300
|
+
}, { translator: Lt } = c, Rt = class extends HTMLElement {
|
|
1300
1301
|
constructor() {
|
|
1301
1302
|
super(), this._model = null, this._session = null, this._root = null;
|
|
1302
1303
|
}
|
|
1303
1304
|
set model(e) {
|
|
1304
|
-
this._model = e, this.dispatchEvent(new
|
|
1305
|
+
this._model = e, this.dispatchEvent(new ae(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this._render();
|
|
1305
1306
|
}
|
|
1306
1307
|
set session(e) {
|
|
1307
1308
|
this._session = e, this._render();
|
|
@@ -1310,7 +1311,7 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1310
1311
|
return this._session;
|
|
1311
1312
|
}
|
|
1312
1313
|
setRegionLabel() {
|
|
1313
|
-
this.setAttribute("aria-label",
|
|
1314
|
+
this.setAttribute("aria-label", Lt.t("inlineDropdown.inlineDropdownQuestion", { lng: this._model?.language }));
|
|
1314
1315
|
}
|
|
1315
1316
|
setLangAttribute() {
|
|
1316
1317
|
let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
|
|
@@ -1318,7 +1319,7 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1318
1319
|
}
|
|
1319
1320
|
_render = () => {
|
|
1320
1321
|
if (this._model && this._session) {
|
|
1321
|
-
let e = D.createElement(
|
|
1322
|
+
let e = D.createElement(It, {
|
|
1322
1323
|
model: this._model,
|
|
1323
1324
|
prompt: this._model.prompt,
|
|
1324
1325
|
rationale: this._model.rationale,
|
|
@@ -1333,13 +1334,13 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1333
1334
|
language: this._model.language,
|
|
1334
1335
|
onChange: this.changeSession
|
|
1335
1336
|
});
|
|
1336
|
-
this.setLangAttribute(), this.setRegionLabel(), this._root ||=
|
|
1337
|
-
|
|
1337
|
+
this.setLangAttribute(), this.setRegionLabel(), this._root ||= ne(this), this._root.render(e), queueMicrotask(() => {
|
|
1338
|
+
r(this);
|
|
1338
1339
|
});
|
|
1339
1340
|
}
|
|
1340
1341
|
};
|
|
1341
1342
|
dispatchChangedEvent = () => {
|
|
1342
|
-
this.dispatchEvent(new
|
|
1343
|
+
this.dispatchEvent(new oe(this.tagName.toLowerCase(), this.session && !!this.session.value));
|
|
1343
1344
|
};
|
|
1344
1345
|
changeSession = (e) => {
|
|
1345
1346
|
this.session.value = e, this.dispatchChangedEvent(), this._render();
|
|
@@ -1350,11 +1351,11 @@ var Et = v, X = Et.default, Z = X && typeof X == "object" ? X : Et, Dt = Y(r, "U
|
|
|
1350
1351
|
disconnectedCallback() {
|
|
1351
1352
|
this._root &&= (this._root.unmount(), null);
|
|
1352
1353
|
}
|
|
1353
|
-
},
|
|
1354
|
+
}, zt = Object.freeze({
|
|
1354
1355
|
name: "@pie-element/inline-dropdown",
|
|
1355
|
-
version: "11.0.
|
|
1356
|
+
version: "11.0.7-next.20261019062545"
|
|
1356
1357
|
});
|
|
1357
1358
|
//#endregion
|
|
1358
|
-
export {
|
|
1359
|
+
export { Rt as default, zt as piePackage };
|
|
1359
1360
|
|
|
1360
1361
|
//# sourceMappingURL=index.js.map
|