@pie-element/mc-populated-blank 0.2.13-next.3 → 0.2.13
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/author/index.d.ts +1 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +171 -292
- package/dist/author/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +1 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/index.d.ts +1 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/computeAudioMode.d.ts +1 -0
- package/dist/delivery/computeAudioMode.d.ts.map +1 -0
- package/dist/delivery/computeChoiceCorrectness.d.ts +1 -0
- package/dist/delivery/computeChoiceCorrectness.d.ts.map +1 -0
- package/dist/delivery/computeDisplayState.d.ts +1 -0
- package/dist/delivery/computeDisplayState.d.ts.map +1 -0
- package/dist/delivery/computeLayoutProfile.d.ts +1 -0
- package/dist/delivery/computeLayoutProfile.d.ts.map +1 -0
- package/dist/delivery/computeLayoutStyle.d.ts +1 -0
- package/dist/delivery/computeLayoutStyle.d.ts.map +1 -0
- package/dist/delivery/index.d.ts +1 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +299 -418
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/variant-css-map.d.ts +1 -0
- package/dist/delivery/variant-css-map.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +1 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +97 -21
- package/dist/index.js +299 -418
- package/dist/index.js.map +1 -1
- package/dist/print/index.d.ts +1 -0
- package/dist/print/index.d.ts.map +1 -0
- package/dist/print/index.js +238 -363
- package/dist/print/index.js.map +1 -1
- package/dist/shared/layoutLimits.d.ts +1 -0
- package/dist/shared/layoutLimits.d.ts.map +1 -0
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/package.json +5 -31
- package/configure.js +0 -2
- package/dist/browser/author/index.js +0 -50
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/client-B0miu8E8.js +0 -2414
- package/dist/browser/client-B0miu8E8.js.map +0 -1
- package/dist/browser/controller/index.js +0 -221
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -1234
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/layoutLimits-ATKOwLHb.js +0 -42
- package/dist/browser/layoutLimits-ATKOwLHb.js.map +0 -1
- package/dist/browser/print/index.js +0 -125
- package/dist/browser/print/index.js.map +0 -1
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -14
- package/dist/runtime-support.js.map +0 -1
|
@@ -1,1234 +0,0 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, P as s, S as c, T as l, _ as u, a as d, c as f, d as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, o as C, r as w, s as T, t as E, u as ee, v as D, w as O, x as k, y as A } from "../client-B0miu8E8.js";
|
|
2
|
-
import { t as j } from "../layoutLimits-ATKOwLHb.js";
|
|
3
|
-
//#region ../../lib-svelte/styling/dist/index2.js
|
|
4
|
-
var M = {
|
|
5
|
-
50: "#e8f5e9",
|
|
6
|
-
500: "#4caf50"
|
|
7
|
-
}, N = {
|
|
8
|
-
200: "#9fa8da",
|
|
9
|
-
500: "#3f51b5",
|
|
10
|
-
800: "#283593"
|
|
11
|
-
}, P = { 500: "#ff9800" }, F = {
|
|
12
|
-
200: "#f48fb1",
|
|
13
|
-
900: "#880e4f",
|
|
14
|
-
A400: "#f50057"
|
|
15
|
-
}, I = {
|
|
16
|
-
50: "#ffebee",
|
|
17
|
-
700: "#d32f2f"
|
|
18
|
-
}, L = {
|
|
19
|
-
TEXT: "black",
|
|
20
|
-
DISABLED: "grey",
|
|
21
|
-
DISABLED_SECONDARY: "#ABABAB",
|
|
22
|
-
CORRECT: M[500],
|
|
23
|
-
CORRECT_SECONDARY: M[50],
|
|
24
|
-
CORRECT_TERTIARY: "#0EA449",
|
|
25
|
-
CORRECT_WITH_ICON: "#087D38",
|
|
26
|
-
INCORRECT: P[500],
|
|
27
|
-
INCORRECT_SECONDARY: I[50],
|
|
28
|
-
INCORRECT_WITH_ICON: "#BF0D00",
|
|
29
|
-
MISSING: I[700],
|
|
30
|
-
MISSING_WITH_ICON: "#6A78A1",
|
|
31
|
-
PRIMARY: N[500],
|
|
32
|
-
PRIMARY_LIGHT: N[200],
|
|
33
|
-
PRIMARY_DARK: N[800],
|
|
34
|
-
SECONDARY: F.A400,
|
|
35
|
-
SECONDARY_LIGHT: F[200],
|
|
36
|
-
SECONDARY_DARK: F[900],
|
|
37
|
-
TERTIARY: "#146EB3",
|
|
38
|
-
TERTIARY_LIGHT: "#D0E2F0",
|
|
39
|
-
BACKGROUND: "rgba(255,255,255,0)",
|
|
40
|
-
BACKGROUND_DARK: "#ECEDF1",
|
|
41
|
-
DROPDOWN_BACKGROUND: "#E0E1E6",
|
|
42
|
-
SECONDARY_BACKGROUND: "rgba(241,241,241,1)",
|
|
43
|
-
BORDER: "#9A9A9A",
|
|
44
|
-
BORDER_LIGHT: "#D1D1D1",
|
|
45
|
-
BORDER_DARK: "#646464",
|
|
46
|
-
BORDER_GRAY: "#7E8494",
|
|
47
|
-
BLACK: "#000000",
|
|
48
|
-
WHITE: "#ffffff",
|
|
49
|
-
TRANSPARENT: "transparent",
|
|
50
|
-
FOCUS_CHECKED: "#BBDEFB",
|
|
51
|
-
FOCUS_CHECKED_BORDER: "#1565C0",
|
|
52
|
-
FOCUS_UNCHECKED: "#E0E0E0",
|
|
53
|
-
FOCUS_UNCHECKED_BORDER: "#757575",
|
|
54
|
-
BLUE_GREY100: "#F3F5F7",
|
|
55
|
-
BLUE_GREY300: "#C0C3CF",
|
|
56
|
-
BLUE_GREY600: "#7E8494",
|
|
57
|
-
BLUE_GREY900: "#152452",
|
|
58
|
-
FADED_PRIMARY: "#DCDAFB"
|
|
59
|
-
};
|
|
60
|
-
Object.freeze(L);
|
|
61
|
-
var R = ((e) => (...t) => {
|
|
62
|
-
let n = t.pop();
|
|
63
|
-
return t.reduceRight((t, n) => `var(--${e}-${n}, ${t})`, n);
|
|
64
|
-
})("pie"), z = {
|
|
65
|
-
text: () => R("text", L.TEXT),
|
|
66
|
-
disabled: () => R("disabled", L.DISABLED),
|
|
67
|
-
disabledSecondary: () => R("disabled-secondary", L.DISABLED_SECONDARY),
|
|
68
|
-
correct: () => R("correct", L.CORRECT),
|
|
69
|
-
correctSecondary: () => R("correct-secondary", L.CORRECT_SECONDARY),
|
|
70
|
-
correctTertiary: () => R("correct-tertiary", L.CORRECT_TERTIARY),
|
|
71
|
-
correctWithIcon: () => R("correct-icon", L.CORRECT_WITH_ICON),
|
|
72
|
-
incorrect: () => R("incorrect", L.INCORRECT),
|
|
73
|
-
incorrectWithIcon: () => R("incorrect-icon", L.INCORRECT_WITH_ICON),
|
|
74
|
-
incorrectSecondary: () => R("incorrect-secondary", L.INCORRECT_SECONDARY),
|
|
75
|
-
missing: () => R("missing", L.MISSING),
|
|
76
|
-
missingWithIcon: () => R("missing-icon", L.MISSING_WITH_ICON),
|
|
77
|
-
primary: () => R("primary", L.PRIMARY),
|
|
78
|
-
primaryLight: () => R("primary-light", L.PRIMARY_LIGHT),
|
|
79
|
-
primaryDark: () => R("primary-dark", L.PRIMARY_DARK),
|
|
80
|
-
primaryText: () => R("primary-text", "text", L.TEXT),
|
|
81
|
-
fadedPrimary: () => R("faded-primary", L.FADED_PRIMARY),
|
|
82
|
-
secondary: () => R("secondary", L.SECONDARY),
|
|
83
|
-
secondaryLight: () => R("secondary-light", L.SECONDARY_LIGHT),
|
|
84
|
-
secondaryDark: () => R("secondary-dark", L.SECONDARY_DARK),
|
|
85
|
-
secondaryText: () => R("secondary-text", "text", L.TEXT),
|
|
86
|
-
background: () => R("background", L.BACKGROUND),
|
|
87
|
-
backgroundDark: () => R("background-dark", L.BACKGROUND_DARK),
|
|
88
|
-
secondaryBackground: () => R("secondary-background", L.SECONDARY_BACKGROUND),
|
|
89
|
-
dropdownBackground: () => R("dropdown-background", L.DROPDOWN_BACKGROUND),
|
|
90
|
-
tertiary: () => R("tertiary", L.TERTIARY),
|
|
91
|
-
tertiaryLight: () => R("tertiary-light", L.TERTIARY_LIGHT),
|
|
92
|
-
border: () => R("border", L.BORDER),
|
|
93
|
-
borderLight: () => R("border-light", L.BORDER_LIGHT),
|
|
94
|
-
borderDark: () => R("border-dark", L.BORDER_DARK),
|
|
95
|
-
borderGray: () => R("border-gray", L.BORDER_GRAY),
|
|
96
|
-
black: () => R("black", L.BLACK),
|
|
97
|
-
white: () => R("white", L.WHITE),
|
|
98
|
-
transparent: () => L.TRANSPARENT,
|
|
99
|
-
focusChecked: () => R("focus-checked", L.FOCUS_CHECKED),
|
|
100
|
-
focusCheckedBorder: () => R("focus-checked-border", L.FOCUS_CHECKED_BORDER),
|
|
101
|
-
focusUnchecked: () => R("focus-unchecked", L.FOCUS_UNCHECKED),
|
|
102
|
-
focusUncheckedBorder: () => R("focus-unchecked-border", L.FOCUS_UNCHECKED_BORDER),
|
|
103
|
-
blueGrey100: () => R("blue-grey-100", L.BLUE_GREY100),
|
|
104
|
-
blueGrey300: () => R("blue-grey-300", L.BLUE_GREY300),
|
|
105
|
-
blueGrey600: () => R("blue-grey-600", L.BLUE_GREY600),
|
|
106
|
-
blueGrey900: () => R("blue-grey-900", L.BLUE_GREY900)
|
|
107
|
-
}, B = class e extends CustomEvent {
|
|
108
|
-
static {
|
|
109
|
-
this.TYPE = "model-set";
|
|
110
|
-
}
|
|
111
|
-
constructor(t, n, r) {
|
|
112
|
-
super(e.TYPE, {
|
|
113
|
-
bubbles: !0,
|
|
114
|
-
composed: !0,
|
|
115
|
-
detail: {
|
|
116
|
-
complete: n,
|
|
117
|
-
component: t,
|
|
118
|
-
hasModel: r
|
|
119
|
-
}
|
|
120
|
-
}), this.component = t, this.complete = n;
|
|
121
|
-
}
|
|
122
|
-
}, V = class e extends CustomEvent {
|
|
123
|
-
static {
|
|
124
|
-
this.TYPE = "session-changed";
|
|
125
|
-
}
|
|
126
|
-
constructor(t, n) {
|
|
127
|
-
super(e.TYPE, {
|
|
128
|
-
bubbles: !0,
|
|
129
|
-
composed: !0,
|
|
130
|
-
detail: {
|
|
131
|
-
complete: n,
|
|
132
|
-
component: t
|
|
133
|
-
}
|
|
134
|
-
}), this.component = t, this.complete = n;
|
|
135
|
-
}
|
|
136
|
-
}, H = (e) => {
|
|
137
|
-
let t = e;
|
|
138
|
-
return t ? typeof t.onSessionChange == "function" || typeof t.onAudioStarted == "function" || typeof t.onAudioEnded == "function" : !1;
|
|
139
|
-
};
|
|
140
|
-
function U(e, t = {}) {
|
|
141
|
-
let n = t.hostPredicate ?? H, r = e;
|
|
142
|
-
for (; r;) {
|
|
143
|
-
if (n(r)) return r;
|
|
144
|
-
r = r.parentElement;
|
|
145
|
-
}
|
|
146
|
-
if (typeof document < "u" && t.fallbackSelector) {
|
|
147
|
-
let e = document.querySelector(t.fallbackSelector);
|
|
148
|
-
if (n(e)) return e;
|
|
149
|
-
}
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
|
-
function te({ sourceEl: e, fallbackSelector: t, component: n, complete: r, session: i }) {
|
|
153
|
-
let a = U(e, { fallbackSelector: t });
|
|
154
|
-
return a ? typeof a.onSessionChange == "function" ? (a.onSessionChange(i), a) : (a.dispatchEvent(new V(n, r)), a) : null;
|
|
155
|
-
}
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region src/delivery/computeAudioMode.ts
|
|
158
|
-
function W(e) {
|
|
159
|
-
return e.hasAudio ? e.audioUrl ? e.useFeatureButtonAudio ? "feature-button" : "controls" : "error" : "none";
|
|
160
|
-
}
|
|
161
|
-
//#endregion
|
|
162
|
-
//#region src/delivery/AudioPlayer.svelte
|
|
163
|
-
var ne = D("<audio class=\"sr-only pie-audio-player svelte-ypdwb3\" preload=\"metadata\" aria-hidden=\"true\" tabindex=\"-1\"></audio> <button class=\"listen-button pie-listen-button rli-feature-audio svelte-ypdwb3\" type=\"button\"><img/> <img/></button>", 1), re = D("<button class=\"mt-2 text-sm underline pie-audio-autoplay-enable\" type=\"button\"> </button>"), ie = D("<audio controls=\"\" class=\"w-full max-w-md pie-audio-player\" preload=\"metadata\"><track kind=\"captions\"/></audio> <!>", 1), ae = D("<p class=\"text-sm text-red-700 pie-audio-error\" role=\"alert\"> </p>"), oe = D("<div class=\"mb-4 audio-container pie-audio-container\"><!></div>"), se = {
|
|
164
|
-
hash: "svelte-ypdwb3",
|
|
165
|
-
code: ".listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}"
|
|
166
|
-
};
|
|
167
|
-
function ce(f, p) {
|
|
168
|
-
a(p, !0), ee(f, se);
|
|
169
|
-
let m = {
|
|
170
|
-
IDLE: "idle",
|
|
171
|
-
PLAYING: "playing",
|
|
172
|
-
BLOCKED: "blocked",
|
|
173
|
-
PAUSED: "paused"
|
|
174
|
-
}, _ = S(p, "hasAudio", 7, !1), C = S(p, "audioUrl", 7), T = S(p, "useFeatureButtonAudio", 7, !1), E = S(p, "autoplayEnabled", 7, !1), D = S(p, "audioTranscript", 7), A = S(p, "showVisibleTranscript", 7), j = S(p, "transcriptId", 7), M = S(p, "featureAudioSkin", 7), N = S(p, "uiText", 7), P = S(p, "locale", 7, ""), F = S(p, "onaudiostarted", 7), I = S(p, "onaudioended", 7), L = y(null), R = y(null), z = y(null), B = y(n(m.IDLE)), V = e(() => W({
|
|
175
|
-
hasAudio: _(),
|
|
176
|
-
audioUrl: C(),
|
|
177
|
-
useFeatureButtonAudio: T()
|
|
178
|
-
})), H = e(() => k(B) === m.PLAYING), U = e(() => k(B) === m.BLOCKED), te = e(() => k(V) === "error" ? N().audioResourceUnavailable : "");
|
|
179
|
-
t(() => {
|
|
180
|
-
C(), o(B, m.IDLE, !0);
|
|
181
|
-
});
|
|
182
|
-
function ce() {
|
|
183
|
-
k(V) !== "none" && k(V) !== "error" && k(L) && k(L).play().catch(() => {});
|
|
184
|
-
}
|
|
185
|
-
function le() {
|
|
186
|
-
k(V) !== "none" && k(V) !== "error" && k(L) && k(L).play().finally(() => {
|
|
187
|
-
k(B) === m.BLOCKED && o(B, m.PAUSED, !0);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
function G(e, n, r) {
|
|
191
|
-
t(() => {
|
|
192
|
-
let t = e();
|
|
193
|
-
if (t) return t.addEventListener(n, r), () => t.removeEventListener(n, r);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
G(() => k(L), "playing", () => {
|
|
197
|
-
o(B, m.PLAYING, !0), F()?.();
|
|
198
|
-
}), G(() => k(L), "ended", () => {
|
|
199
|
-
o(B, m.PAUSED, !0), I()?.();
|
|
200
|
-
}), G(() => k(R), "click", () => ce()), G(() => k(z), "click", () => le()), t(() => {
|
|
201
|
-
!E() || k(V) === "none" || k(V) === "error" || k(B) === m.IDLE && k(L) && C() && (o(B, m.PAUSED, !0), k(L).play().catch(() => {
|
|
202
|
-
o(B, m.BLOCKED, !0);
|
|
203
|
-
}));
|
|
204
|
-
});
|
|
205
|
-
function K(e = "") {
|
|
206
|
-
return e.toLowerCase().startsWith("es") ? "Escuchar" : "Listen";
|
|
207
|
-
}
|
|
208
|
-
function ue(e = "") {
|
|
209
|
-
return e.toLowerCase().startsWith("es") ? N().listenSilentAltEs ?? "Escuchar. Repetir las instrucciones." : N().listenSilentAlt ?? "Repeat instructions";
|
|
210
|
-
}
|
|
211
|
-
function q(e = "") {
|
|
212
|
-
return e.toLowerCase().startsWith("es") ? N().listenPlayingAltEs ?? "Escuchar. Estas son las instrucciones." : N().listenPlayingAlt ?? "Instructions are playing";
|
|
213
|
-
}
|
|
214
|
-
var de = {
|
|
215
|
-
get hasAudio() {
|
|
216
|
-
return _();
|
|
217
|
-
},
|
|
218
|
-
set hasAudio(e = !1) {
|
|
219
|
-
_(e), v();
|
|
220
|
-
},
|
|
221
|
-
get audioUrl() {
|
|
222
|
-
return C();
|
|
223
|
-
},
|
|
224
|
-
set audioUrl(e) {
|
|
225
|
-
C(e), v();
|
|
226
|
-
},
|
|
227
|
-
get useFeatureButtonAudio() {
|
|
228
|
-
return T();
|
|
229
|
-
},
|
|
230
|
-
set useFeatureButtonAudio(e = !1) {
|
|
231
|
-
T(e), v();
|
|
232
|
-
},
|
|
233
|
-
get autoplayEnabled() {
|
|
234
|
-
return E();
|
|
235
|
-
},
|
|
236
|
-
set autoplayEnabled(e = !1) {
|
|
237
|
-
E(e), v();
|
|
238
|
-
},
|
|
239
|
-
get audioTranscript() {
|
|
240
|
-
return D();
|
|
241
|
-
},
|
|
242
|
-
set audioTranscript(e) {
|
|
243
|
-
D(e), v();
|
|
244
|
-
},
|
|
245
|
-
get showVisibleTranscript() {
|
|
246
|
-
return A();
|
|
247
|
-
},
|
|
248
|
-
set showVisibleTranscript(e) {
|
|
249
|
-
A(e), v();
|
|
250
|
-
},
|
|
251
|
-
get transcriptId() {
|
|
252
|
-
return j();
|
|
253
|
-
},
|
|
254
|
-
set transcriptId(e) {
|
|
255
|
-
j(e), v();
|
|
256
|
-
},
|
|
257
|
-
get featureAudioSkin() {
|
|
258
|
-
return M();
|
|
259
|
-
},
|
|
260
|
-
set featureAudioSkin(e) {
|
|
261
|
-
M(e), v();
|
|
262
|
-
},
|
|
263
|
-
get uiText() {
|
|
264
|
-
return N();
|
|
265
|
-
},
|
|
266
|
-
set uiText(e) {
|
|
267
|
-
N(e), v();
|
|
268
|
-
},
|
|
269
|
-
get locale() {
|
|
270
|
-
return P();
|
|
271
|
-
},
|
|
272
|
-
set locale(e = "") {
|
|
273
|
-
P(e), v();
|
|
274
|
-
},
|
|
275
|
-
get onaudiostarted() {
|
|
276
|
-
return F();
|
|
277
|
-
},
|
|
278
|
-
set onaudiostarted(e) {
|
|
279
|
-
F(e), v();
|
|
280
|
-
},
|
|
281
|
-
get onaudioended() {
|
|
282
|
-
return I();
|
|
283
|
-
},
|
|
284
|
-
set onaudioended(e) {
|
|
285
|
-
I(e), v();
|
|
286
|
-
}
|
|
287
|
-
}, J = u(), Y = l(J), fe = (e) => {
|
|
288
|
-
var t = oe(), n = O(t), i = (e) => {
|
|
289
|
-
var t = ne(), n = l(t);
|
|
290
|
-
w(n, (e) => o(L, e), () => k(L));
|
|
291
|
-
var i = r(n, 2), a = O(i), u = r(a, 2);
|
|
292
|
-
s(i), w(i, (e) => o(R, e), () => k(R)), c((e, t, r) => {
|
|
293
|
-
d(n, "src", C()), d(i, "aria-label", e), b(a, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${k(H) ? "" : "listen-active"}`, "svelte-ypdwb3"), d(a, "src", M().silentUrl), d(a, "alt", t), b(u, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${k(H) ? "listen-active" : ""}`, "svelte-ypdwb3"), d(u, "src", M().playingUrl), d(u, "alt", r);
|
|
294
|
-
}, [
|
|
295
|
-
() => K(P()),
|
|
296
|
-
() => ue(P()),
|
|
297
|
-
() => q(P())
|
|
298
|
-
]), h(e, t);
|
|
299
|
-
}, a = (e) => {
|
|
300
|
-
var t = ie(), n = l(t);
|
|
301
|
-
w(n, (e) => o(L, e), () => k(L));
|
|
302
|
-
var i = r(n, 2), a = (e) => {
|
|
303
|
-
var t = re(), n = O(t, !0);
|
|
304
|
-
s(t), w(t, (e) => o(z, e), () => k(z)), c(() => g(n, N().clickToEnableAutoplay)), h(e, t);
|
|
305
|
-
};
|
|
306
|
-
x(i, (e) => {
|
|
307
|
-
k(U) && e(a);
|
|
308
|
-
}), c(() => {
|
|
309
|
-
d(n, "src", C()), d(n, "aria-describedby", D() ? j() : void 0);
|
|
310
|
-
}), h(e, t);
|
|
311
|
-
}, u = (e) => {
|
|
312
|
-
var t = ae(), n = O(t, !0);
|
|
313
|
-
s(t), c(() => g(n, k(te))), h(e, t);
|
|
314
|
-
};
|
|
315
|
-
x(n, (e) => {
|
|
316
|
-
k(V) === "feature-button" ? e(i) : k(V) === "controls" ? e(a, 1) : k(V) === "error" && e(u, 2);
|
|
317
|
-
}), s(t), h(e, t);
|
|
318
|
-
};
|
|
319
|
-
return x(Y, (e) => {
|
|
320
|
-
k(V) !== "none" && e(fe);
|
|
321
|
-
}), h(f, J), i(de);
|
|
322
|
-
}
|
|
323
|
-
E(ce, {
|
|
324
|
-
hasAudio: {},
|
|
325
|
-
audioUrl: {},
|
|
326
|
-
useFeatureButtonAudio: {},
|
|
327
|
-
autoplayEnabled: {},
|
|
328
|
-
audioTranscript: {},
|
|
329
|
-
showVisibleTranscript: {},
|
|
330
|
-
transcriptId: {},
|
|
331
|
-
featureAudioSkin: {},
|
|
332
|
-
uiText: {},
|
|
333
|
-
locale: {},
|
|
334
|
-
onaudiostarted: {},
|
|
335
|
-
onaudioended: {}
|
|
336
|
-
}, [], [], { mode: "open" });
|
|
337
|
-
//#endregion
|
|
338
|
-
//#region src/delivery/ClozeMarker.svelte
|
|
339
|
-
var le = D("<img class=\"w-auto object-contain pie-blank-image\" style=\"max-height:var(--mpb-selected-image-max-height, 4rem);\"/>"), G = D("<span class=\"cloze-marker-value pie-blank-value svelte-d9l5tb\"></span>"), K = D("<span class=\"cloze-marker-empty svelte-d9l5tb\" aria-hidden=\"true\"> </span>"), ue = D("<span role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><!></span>"), q = {
|
|
340
|
-
hash: "svelte-d9l5tb",
|
|
341
|
-
code: ".cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--pie-focus, #2563eb);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}"
|
|
342
|
-
};
|
|
343
|
-
function de(e, t) {
|
|
344
|
-
a(t, !0), ee(e, q);
|
|
345
|
-
let n = S(t, "choiceMode", 7, "text"), r = S(t, "displayChoice", 7, void 0), o = S(t, "displayChoiceLabelHtml", 7, ""), l = S(t, "isStandalone", 7, !1), u = S(t, "blankWidth", 7), m = S(t, "blankBorderWidth", 7), g = S(t, "ariaLabel", 7);
|
|
346
|
-
var _ = {
|
|
347
|
-
get choiceMode() {
|
|
348
|
-
return n();
|
|
349
|
-
},
|
|
350
|
-
set choiceMode(e = "text") {
|
|
351
|
-
n(e), v();
|
|
352
|
-
},
|
|
353
|
-
get displayChoice() {
|
|
354
|
-
return r();
|
|
355
|
-
},
|
|
356
|
-
set displayChoice(e = void 0) {
|
|
357
|
-
r(e), v();
|
|
358
|
-
},
|
|
359
|
-
get displayChoiceLabelHtml() {
|
|
360
|
-
return o();
|
|
361
|
-
},
|
|
362
|
-
set displayChoiceLabelHtml(e = "") {
|
|
363
|
-
o(e), v();
|
|
364
|
-
},
|
|
365
|
-
get isStandalone() {
|
|
366
|
-
return l();
|
|
367
|
-
},
|
|
368
|
-
set isStandalone(e = !1) {
|
|
369
|
-
l(e), v();
|
|
370
|
-
},
|
|
371
|
-
get blankWidth() {
|
|
372
|
-
return u();
|
|
373
|
-
},
|
|
374
|
-
set blankWidth(e) {
|
|
375
|
-
u(e), v();
|
|
376
|
-
},
|
|
377
|
-
get blankBorderWidth() {
|
|
378
|
-
return m();
|
|
379
|
-
},
|
|
380
|
-
set blankBorderWidth(e) {
|
|
381
|
-
m(e), v();
|
|
382
|
-
},
|
|
383
|
-
get ariaLabel() {
|
|
384
|
-
return g();
|
|
385
|
-
},
|
|
386
|
-
set ariaLabel(e) {
|
|
387
|
-
g(e), v();
|
|
388
|
-
}
|
|
389
|
-
}, y = ue(), C = O(y), w = (e) => {
|
|
390
|
-
var t = le();
|
|
391
|
-
c(() => {
|
|
392
|
-
d(t, "src", r().imageUrl), d(t, "alt", r().imageAlt || "Selected answer image");
|
|
393
|
-
}), h(e, t);
|
|
394
|
-
}, T = (e) => {
|
|
395
|
-
var t = G();
|
|
396
|
-
p(t, o, !0), s(t), h(e, t);
|
|
397
|
-
}, E = (e) => {
|
|
398
|
-
h(e, K());
|
|
399
|
-
};
|
|
400
|
-
return x(C, (e) => {
|
|
401
|
-
n() === "image" && r()?.imageUrl ? e(w) : o() ? e(T, 1) : e(E, -1);
|
|
402
|
-
}), s(y), c(() => {
|
|
403
|
-
b(y, 1, `inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline cloze-marker pie-blank-slot ${l() ? "cloze-marker-standalone pie-blank-slot-standalone" : ""}`, "svelte-d9l5tb"), f(y, `width:${u()};border-bottom-width:${m()};`), d(y, "aria-label", g());
|
|
404
|
-
}), h(e, y), i(_);
|
|
405
|
-
}
|
|
406
|
-
E(de, {
|
|
407
|
-
choiceMode: {},
|
|
408
|
-
displayChoice: {},
|
|
409
|
-
displayChoiceLabelHtml: {},
|
|
410
|
-
isStandalone: {},
|
|
411
|
-
blankWidth: {},
|
|
412
|
-
blankBorderWidth: {},
|
|
413
|
-
ariaLabel: {}
|
|
414
|
-
}, [], [], { mode: "open" });
|
|
415
|
-
//#endregion
|
|
416
|
-
//#region src/delivery/ChoiceRow.svelte
|
|
417
|
-
var J = D("<img class=\"object-contain pie-choice-image\" style=\"max-height:var(--mpb-choice-image-max-height, 5rem);\"/>"), Y = D("<span class=\"choice-html pie-choice-label svelte-8xu1pt\"></span>"), fe = D("<label class=\"cursor-pointer choice-tile text-center pie-choice-tile svelte-8xu1pt\"><span class=\"choice-tile-content pie-choice-tile-content svelte-8xu1pt\"><!></span> <input type=\"radio\" class=\"choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt\"/></label>"), pe = D("<input type=\"radio\" class=\"choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt\"/> <label class=\"cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt\"><!></label>", 1), X = D("<span aria-hidden=\"true\"> </span>"), me = D("<div style=\"gap:var(--mpb-choice-row-gap, 0.5rem);\"><!> <!></div>"), Z = {
|
|
418
|
-
hash: "svelte-8xu1pt",
|
|
419
|
-
code: ".choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-correct-answer-choice-hover-bg, #f2f2f2));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-correct-answer-choice-selected-bg, #fcfcd3));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-correct-answer-choice-selected-bg, #fcfcd3));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-hover-bg, #ececec);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-correct-border, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-incorrect-border, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-correct-bg, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-incorrect-bg, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-correct-answer-feedback-glyph-color, #fff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-correct-bg, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-incorrect-bg, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}"
|
|
420
|
-
};
|
|
421
|
-
function he(e, t) {
|
|
422
|
-
a(t, !0), ee(e, Z);
|
|
423
|
-
let n = S(t, "choice", 7), o = S(t, "choiceMode", 7, "text"), u = S(t, "isHorizontal", 7, !1), f = S(t, "isSelected", 7, !1), m = S(t, "isDisabled", 7, !1), y = S(t, "correctness", 7, void 0), w = S(t, "isEvaluateMode", 7, !1), E = S(t, "instanceId", 7), D = S(t, "radioGroupName", 7);
|
|
424
|
-
var k = {
|
|
425
|
-
get choice() {
|
|
426
|
-
return n();
|
|
427
|
-
},
|
|
428
|
-
set choice(e) {
|
|
429
|
-
n(e), v();
|
|
430
|
-
},
|
|
431
|
-
get choiceMode() {
|
|
432
|
-
return o();
|
|
433
|
-
},
|
|
434
|
-
set choiceMode(e = "text") {
|
|
435
|
-
o(e), v();
|
|
436
|
-
},
|
|
437
|
-
get isHorizontal() {
|
|
438
|
-
return u();
|
|
439
|
-
},
|
|
440
|
-
set isHorizontal(e = !1) {
|
|
441
|
-
u(e), v();
|
|
442
|
-
},
|
|
443
|
-
get isSelected() {
|
|
444
|
-
return f();
|
|
445
|
-
},
|
|
446
|
-
set isSelected(e = !1) {
|
|
447
|
-
f(e), v();
|
|
448
|
-
},
|
|
449
|
-
get isDisabled() {
|
|
450
|
-
return m();
|
|
451
|
-
},
|
|
452
|
-
set isDisabled(e = !1) {
|
|
453
|
-
m(e), v();
|
|
454
|
-
},
|
|
455
|
-
get correctness() {
|
|
456
|
-
return y();
|
|
457
|
-
},
|
|
458
|
-
set correctness(e = void 0) {
|
|
459
|
-
y(e), v();
|
|
460
|
-
},
|
|
461
|
-
get isEvaluateMode() {
|
|
462
|
-
return w();
|
|
463
|
-
},
|
|
464
|
-
set isEvaluateMode(e = !1) {
|
|
465
|
-
w(e), v();
|
|
466
|
-
},
|
|
467
|
-
get instanceId() {
|
|
468
|
-
return E();
|
|
469
|
-
},
|
|
470
|
-
set instanceId(e) {
|
|
471
|
-
E(e), v();
|
|
472
|
-
},
|
|
473
|
-
get radioGroupName() {
|
|
474
|
-
return D();
|
|
475
|
-
},
|
|
476
|
-
set radioGroupName(e) {
|
|
477
|
-
D(e), v();
|
|
478
|
-
}
|
|
479
|
-
}, A = me(), j = O(A), M = (e) => {
|
|
480
|
-
var t = fe(), i = O(t), a = O(i), l = (e) => {
|
|
481
|
-
var t = J();
|
|
482
|
-
c(() => {
|
|
483
|
-
d(t, "src", n().imageUrl), d(t, "alt", n().imageAlt || `Choice ${n().id}`);
|
|
484
|
-
}), h(e, t);
|
|
485
|
-
}, u = (e) => {
|
|
486
|
-
var t = Y();
|
|
487
|
-
p(t, () => n().labelHtml || "", !0), s(t), h(e, t);
|
|
488
|
-
};
|
|
489
|
-
x(a, (e) => {
|
|
490
|
-
o() === "image" && n().imageUrl ? e(l) : e(u, -1);
|
|
491
|
-
}), s(i);
|
|
492
|
-
var g = r(i, 2);
|
|
493
|
-
_(g), s(t), c(() => {
|
|
494
|
-
d(t, "for", `${E()}-opt-${n().id}`), d(g, "name", D()), d(g, "id", `${E()}-opt-${n().id}`), T(g, n().id), C(g, f()), g.disabled = m();
|
|
495
|
-
}), h(e, t);
|
|
496
|
-
}, N = (e) => {
|
|
497
|
-
var t = pe(), i = l(t);
|
|
498
|
-
_(i);
|
|
499
|
-
var a = r(i, 2), u = O(a), g = (e) => {
|
|
500
|
-
var t = J();
|
|
501
|
-
c(() => {
|
|
502
|
-
d(t, "src", n().imageUrl), d(t, "alt", n().imageAlt || `Choice ${n().id}`);
|
|
503
|
-
}), h(e, t);
|
|
504
|
-
}, v = (e) => {
|
|
505
|
-
var t = Y();
|
|
506
|
-
p(t, () => n().labelHtml || "", !0), s(t), h(e, t);
|
|
507
|
-
};
|
|
508
|
-
x(u, (e) => {
|
|
509
|
-
o() === "image" && n().imageUrl ? e(g) : e(v, -1);
|
|
510
|
-
}), s(a), c(() => {
|
|
511
|
-
d(i, "name", D()), d(i, "id", `${E()}-opt-${n().id}`), T(i, n().id), C(i, f()), i.disabled = m(), d(a, "for", `${E()}-opt-${n().id}`);
|
|
512
|
-
}), h(e, t);
|
|
513
|
-
};
|
|
514
|
-
x(j, (e) => {
|
|
515
|
-
u() ? e(M) : e(N, -1);
|
|
516
|
-
});
|
|
517
|
-
var P = r(j, 2), F = (e) => {
|
|
518
|
-
var t = X(), n = O(t, !0);
|
|
519
|
-
s(t), c(() => {
|
|
520
|
-
b(t, 1, `pie-choice-feedback-badge ${y() === "correct" ? "pie-choice-feedback-correct" : "pie-choice-feedback-incorrect"}`, "svelte-8xu1pt"), g(n, y() === "correct" ? "✓" : "✕");
|
|
521
|
-
}), h(e, t);
|
|
522
|
-
};
|
|
523
|
-
return x(P, (e) => {
|
|
524
|
-
w() && y() && e(F);
|
|
525
|
-
}), s(A), c(() => b(A, 1, `flex items-start choice-row pie-choice ${u() ? "choice-row-horizontal pie-choice-horizontal" : ""} ${f() ? "is-selected pie-choice-selected" : ""} ${y() ? `choice-${y()} pie-choice-${y()}` : ""}`, "svelte-8xu1pt")), h(e, A), i(k);
|
|
526
|
-
}
|
|
527
|
-
E(he, {
|
|
528
|
-
choice: {},
|
|
529
|
-
choiceMode: {},
|
|
530
|
-
isHorizontal: {},
|
|
531
|
-
isSelected: {},
|
|
532
|
-
isDisabled: {},
|
|
533
|
-
correctness: {},
|
|
534
|
-
isEvaluateMode: {},
|
|
535
|
-
instanceId: {},
|
|
536
|
-
radioGroupName: {}
|
|
537
|
-
}, [], [], { mode: "open" });
|
|
538
|
-
//#endregion
|
|
539
|
-
//#region src/delivery/computeChoiceCorrectness.ts
|
|
540
|
-
function ge(e) {
|
|
541
|
-
let t = /* @__PURE__ */ new Map(), { isEvaluateMode: n, correctChoiceId: r, selectedId: i, showCorrectAnswer: a } = e;
|
|
542
|
-
return !n || !r ? t : a ? (t.set(r, "correct"), t) : i ? i === r ? (t.set(r, "correct"), t) : (t.set(i, "incorrect"), t.set(r, "incorrect"), t) : (t.set(r, "incorrect"), t);
|
|
543
|
-
}
|
|
544
|
-
//#endregion
|
|
545
|
-
//#region src/delivery/computeLayoutProfile.ts
|
|
546
|
-
var _e = "{{blank}}", ve = new Set([
|
|
547
|
-
"audio_blank_only",
|
|
548
|
-
"stimulus_image_blank",
|
|
549
|
-
"token_sequence"
|
|
550
|
-
]);
|
|
551
|
-
function ye(e) {
|
|
552
|
-
let { interactionMode: t = "", template: n = "", choiceLayout: r, layoutProfile: i = "", hasAudio: a = !1, useFeatureButtonAudio: o } = e, s = t === "audio_mc_only", c = n ? n.replace(/<[^>]+>/g, "").replace(/ /g, " ").trim() === _e : !1, l = r === "horizontal" || r === "vertical" ? r : s || c ? "horizontal" : "vertical";
|
|
553
|
-
return {
|
|
554
|
-
isAudioOnlyMode: s,
|
|
555
|
-
isBlankOnlyTemplate: c,
|
|
556
|
-
choiceLayout: l,
|
|
557
|
-
isHorizontalChoices: l === "horizontal",
|
|
558
|
-
hasInlineSentenceAudioLayout: i === "inline_sentence" && a,
|
|
559
|
-
useFeatureButtonAudio: typeof o == "boolean" ? o : a && ve.has(i)
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
//#endregion
|
|
563
|
-
//#region src/delivery/computeLayoutStyle.ts
|
|
564
|
-
var be = {
|
|
565
|
-
blankStandaloneWidthRem: {
|
|
566
|
-
varName: "--mpb-blank-standalone-width",
|
|
567
|
-
unit: "rem"
|
|
568
|
-
},
|
|
569
|
-
blankWideWidthRem: {
|
|
570
|
-
varName: "--mpb-blank-wide-width",
|
|
571
|
-
unit: "rem"
|
|
572
|
-
},
|
|
573
|
-
blankUnderlineWidthPx: {
|
|
574
|
-
varName: "--mpb-blank-underline-width",
|
|
575
|
-
unit: "px"
|
|
576
|
-
},
|
|
577
|
-
blankUnderlineWideWidthPx: {
|
|
578
|
-
varName: "--mpb-blank-underline-wide-width",
|
|
579
|
-
unit: "px"
|
|
580
|
-
},
|
|
581
|
-
horizontalChoiceWidthPx: {
|
|
582
|
-
varName: "--mpb-choice-width-px",
|
|
583
|
-
unit: "px"
|
|
584
|
-
},
|
|
585
|
-
horizontalChoiceWidthVw: {
|
|
586
|
-
varName: "--mpb-choice-width-vw",
|
|
587
|
-
unit: "vw"
|
|
588
|
-
},
|
|
589
|
-
horizontalChoiceTileMinHeightRem: {
|
|
590
|
-
varName: "--mpb-choice-tile-min-height",
|
|
591
|
-
unit: "rem"
|
|
592
|
-
},
|
|
593
|
-
horizontalChoiceContentMinHeightRem: {
|
|
594
|
-
varName: "--mpb-choice-content-min-height",
|
|
595
|
-
unit: "rem"
|
|
596
|
-
},
|
|
597
|
-
choiceImageMaxHeightRem: {
|
|
598
|
-
varName: "--mpb-choice-image-max-height",
|
|
599
|
-
unit: "rem"
|
|
600
|
-
},
|
|
601
|
-
selectedImageMaxHeightRem: {
|
|
602
|
-
varName: "--mpb-selected-image-max-height",
|
|
603
|
-
unit: "rem"
|
|
604
|
-
},
|
|
605
|
-
choiceGroupGapRem: {
|
|
606
|
-
varName: "--mpb-choice-group-gap",
|
|
607
|
-
unit: "rem"
|
|
608
|
-
},
|
|
609
|
-
choiceRowGapRem: {
|
|
610
|
-
varName: "--mpb-choice-row-gap",
|
|
611
|
-
unit: "rem"
|
|
612
|
-
},
|
|
613
|
-
horizontalChoiceRadioTopMarginRem: {
|
|
614
|
-
varName: "--mpb-horizontal-choice-radio-top-margin",
|
|
615
|
-
unit: "rem"
|
|
616
|
-
},
|
|
617
|
-
narrowHorizontalChoiceMaxWidthPx: {
|
|
618
|
-
varName: "--mpb-narrow-choice-max-width",
|
|
619
|
-
unit: "px"
|
|
620
|
-
},
|
|
621
|
-
toggleButtonGapRem: {
|
|
622
|
-
varName: "--mpb-toggle-button-gap",
|
|
623
|
-
unit: "rem"
|
|
624
|
-
},
|
|
625
|
-
listenButtonSizePx: {
|
|
626
|
-
varName: "--mpb-listen-button-size",
|
|
627
|
-
unit: "px"
|
|
628
|
-
},
|
|
629
|
-
audioBlankTemplateMarginTopRem: {
|
|
630
|
-
varName: "--mpb-audio-blank-template-margin-top",
|
|
631
|
-
unit: "rem"
|
|
632
|
-
},
|
|
633
|
-
audioBlankTemplateMarginBottomRem: {
|
|
634
|
-
varName: "--mpb-audio-blank-template-margin-bottom",
|
|
635
|
-
unit: "rem"
|
|
636
|
-
},
|
|
637
|
-
audioInstructionsMaxWidthPx: {
|
|
638
|
-
varName: "--mpb-audio-instructions-max-width",
|
|
639
|
-
unit: "px"
|
|
640
|
-
},
|
|
641
|
-
stimulusMinColumnPx: {
|
|
642
|
-
varName: "--mpb-stimulus-min-column",
|
|
643
|
-
unit: "px"
|
|
644
|
-
},
|
|
645
|
-
textMinColumnPx: {
|
|
646
|
-
varName: "--mpb-text-min-column",
|
|
647
|
-
unit: "px"
|
|
648
|
-
},
|
|
649
|
-
stimulusGridColumnGapRem: {
|
|
650
|
-
varName: "--mpb-stimulus-grid-column-gap",
|
|
651
|
-
unit: "rem"
|
|
652
|
-
},
|
|
653
|
-
stimulusGridRowGapRem: {
|
|
654
|
-
varName: "--mpb-stimulus-grid-row-gap",
|
|
655
|
-
unit: "rem"
|
|
656
|
-
},
|
|
657
|
-
stimulusSentenceMarginTopRem: {
|
|
658
|
-
varName: "--mpb-stimulus-sentence-margin-top",
|
|
659
|
-
unit: "rem"
|
|
660
|
-
},
|
|
661
|
-
stimulusChoicesMarginTopRem: {
|
|
662
|
-
varName: "--mpb-stimulus-choices-margin-top",
|
|
663
|
-
unit: "rem"
|
|
664
|
-
},
|
|
665
|
-
tokenGridColumnGapRem: {
|
|
666
|
-
varName: "--mpb-token-grid-column-gap",
|
|
667
|
-
unit: "rem"
|
|
668
|
-
},
|
|
669
|
-
tokenGridRowGapRem: {
|
|
670
|
-
varName: "--mpb-token-grid-row-gap",
|
|
671
|
-
unit: "rem"
|
|
672
|
-
},
|
|
673
|
-
tokenTemplateMarginTopRem: {
|
|
674
|
-
varName: "--mpb-token-template-margin-top",
|
|
675
|
-
unit: "rem"
|
|
676
|
-
},
|
|
677
|
-
tokenInlineTokenGapRem: {
|
|
678
|
-
varName: "--mpb-token-inline-token-gap",
|
|
679
|
-
unit: "rem"
|
|
680
|
-
},
|
|
681
|
-
tokenChoicesMarginTopRem: {
|
|
682
|
-
varName: "--mpb-token-choices-margin-top",
|
|
683
|
-
unit: "rem"
|
|
684
|
-
},
|
|
685
|
-
inlineGridColumnGapRem: {
|
|
686
|
-
varName: "--mpb-inline-grid-column-gap",
|
|
687
|
-
unit: "rem"
|
|
688
|
-
},
|
|
689
|
-
inlineGridRowGapRem: {
|
|
690
|
-
varName: "--mpb-inline-grid-row-gap",
|
|
691
|
-
unit: "rem"
|
|
692
|
-
},
|
|
693
|
-
inlineTemplateMarginTopRem: {
|
|
694
|
-
varName: "--mpb-inline-template-margin-top",
|
|
695
|
-
unit: "rem"
|
|
696
|
-
},
|
|
697
|
-
inlineChoicesMarginTopRem: {
|
|
698
|
-
varName: "--mpb-inline-choices-margin-top",
|
|
699
|
-
unit: "rem"
|
|
700
|
-
}
|
|
701
|
-
}, xe = {
|
|
702
|
-
audio_blank_only: {
|
|
703
|
-
blankWideWidthRem: 10,
|
|
704
|
-
blankUnderlineWideWidthPx: 6,
|
|
705
|
-
horizontalChoiceTileMinHeightRem: 11.25,
|
|
706
|
-
horizontalChoiceContentMinHeightRem: 9.375,
|
|
707
|
-
choiceGroupGapRem: 1,
|
|
708
|
-
audioBlankTemplateMarginBottomRem: 1.875
|
|
709
|
-
},
|
|
710
|
-
stimulus_image_blank: {
|
|
711
|
-
blankWideWidthRem: 10,
|
|
712
|
-
blankUnderlineWideWidthPx: 6
|
|
713
|
-
},
|
|
714
|
-
token_sequence: {
|
|
715
|
-
blankStandaloneWidthRem: 7,
|
|
716
|
-
blankUnderlineWideWidthPx: 6
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
function Se(e) {
|
|
720
|
-
let { layoutProfile: t, isBlankOnlyTemplate: n, correctAnswerStyleVars: r } = e, i = e.configuredLimits && typeof e.configuredLimits == "object" ? e.configuredLimits : {}, a = e.customProfilePresets && typeof e.customProfilePresets == "object" ? e.customProfilePresets : {}, o = a[t] && typeof a[t] == "object" ? a[t] : {}, s = {
|
|
721
|
-
...xe[t] ?? {},
|
|
722
|
-
...o
|
|
723
|
-
}, c = {
|
|
724
|
-
...j,
|
|
725
|
-
...i,
|
|
726
|
-
...s
|
|
727
|
-
}, l = ["audio_blank_only", "stimulus_image_blank"], u = [
|
|
728
|
-
"audio_blank_only",
|
|
729
|
-
"stimulus_image_blank",
|
|
730
|
-
"token_sequence"
|
|
731
|
-
], d = l.includes(t) ? `${c.blankWideWidthRem}rem` : n ? `${c.blankStandaloneWidthRem}rem` : "auto", f = u.includes(t) ? `${c.blankUnderlineWideWidthPx}px` : `${c.blankUnderlineWidthPx}px`;
|
|
732
|
-
return {
|
|
733
|
-
rootStyle: [...Object.keys(be).map((e) => `${be[e].varName}:${c[e]}${be[e].unit}`), r].join(";"),
|
|
734
|
-
blankWidth: d,
|
|
735
|
-
blankBorderWidth: f,
|
|
736
|
-
legendMaxChars: c.legendMaxChars
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
//#endregion
|
|
740
|
-
//#region src/delivery/computeDisplayState.ts
|
|
741
|
-
var Ce = {
|
|
742
|
-
default: {
|
|
743
|
-
silentUrl: "https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg",
|
|
744
|
-
playingUrl: "https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg"
|
|
745
|
-
},
|
|
746
|
-
es: {
|
|
747
|
-
silentUrl: "https://assets.learnosity.com/organisations/844/27a9d5b5-d873-4bd5-b9ba-22748782d8ba.svg",
|
|
748
|
-
playingUrl: "https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg"
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
function we(e) {
|
|
752
|
-
let t = String(e.locale || "").toLowerCase(), n = t.slice(0, 2), r = e.audioButtonSkinsByLocale && typeof e.audioButtonSkinsByLocale == "object" ? e.audioButtonSkinsByLocale : {}, i = e.audioButtonSkin && typeof e.audioButtonSkin == "object" ? e.audioButtonSkin : null, a = t.startsWith("es") ? Ce.es : Ce.default;
|
|
753
|
-
return r[t] || r[n] || r.default || i || a;
|
|
754
|
-
}
|
|
755
|
-
function Te(e) {
|
|
756
|
-
let { selectedId: t, isEvaluateMode: n, showCorrectAnswer: r, alwaysShowCorrect: i, correctChoiceId: a } = e;
|
|
757
|
-
return i && a || n && r && a ? a : t;
|
|
758
|
-
}
|
|
759
|
-
function Ee(e) {
|
|
760
|
-
let { isEvaluateMode: t, showCorrectAnswer: n, isCorrect: r, isIncorrect: i, selectedId: a } = e;
|
|
761
|
-
return !t || n ? "" : r ? "Correct answer selected" : i && a ? "Incorrect answer selected" : "";
|
|
762
|
-
}
|
|
763
|
-
function De(e) {
|
|
764
|
-
let { prompt: t, legendMaxChars: n, answerChoicesLabel: r } = e, i = t.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim(), a = Math.max(8, n);
|
|
765
|
-
return i ? i.length > a ? `${i.slice(0, Math.max(1, a - 1))}…` : i : r;
|
|
766
|
-
}
|
|
767
|
-
//#endregion
|
|
768
|
-
//#region src/delivery/cqt-css/sel-r1-base.css?raw
|
|
769
|
-
var Oe = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied via the data-mpb-variant=\"sel-r1-base\" style element.\n Uses [class*=\"variant-sel-r1-\"] so it covers every r1 variant class.\n Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */\n\n/* r1.scss: Starial font throughout */\n[class*=\"variant-sel-r1-\"] {\n font-family: Starial, Arial, sans-serif;\n}\n\n/* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */\n[class*=\"variant-sel-r1-\"] .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.\n Makes inline font-size spans in the template multiply on top of this base. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n font-size: 1.9em;\n}\n\n/* r1.scss: .rli-r1-stem { display:flex; flex-direction:row; justify-content:center }\n r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.\n column-gap:4px replicates the 2px+2px per-element margin. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n justify-content: center;\n column-gap: 4px;\n}\n\n[class*=\"variant-sel-r1-\"] .pie-template-line p {\n margin: 0;\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 4px;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px; min-height:150px;\n line-height:89px } — every stem token (blank slot and adjacent spans) is a 150px box.\n Scoped to token_sequence layout so the audio_blank_only standalone blank (160px) is unaffected. */\n[class*=\"variant-sel-r1-\"].layout-token_sequence .pie-template-line span:not([class]),\n[class*=\"variant-sel-r1-\"].layout-token_sequence .pie-template-line .pie-blank-slot {\n min-width: 150px;\n max-width: 150px;\n min-height: 150px;\n line-height: 89px;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */\n[class*=\"variant-sel-r1-\"] .pie-choice-label {\n font-size: 1.9em;\n line-height: 89px;\n}\n", ke = {
|
|
770
|
-
"sel_r1-_plusggg": {
|
|
771
|
-
variantId: "sel-r1-plusggg",
|
|
772
|
-
variantClass: "variant-sel-r1-plusggg",
|
|
773
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css",
|
|
774
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-plusggg {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-group-gap: 1rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n\n.mc-populated-blank-root.variant-sel-r1-plusggg {\n --mpb-choice-radio-padding: 20px;\n}\n"
|
|
775
|
-
},
|
|
776
|
-
"sr-vic": {
|
|
777
|
-
variantId: "sr-vic",
|
|
778
|
-
variantClass: "variant-sr-vic",
|
|
779
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css",
|
|
780
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/vic.scss */\n.mc-populated-blank-root.variant-sr-vic {\n font-family: Starial, Arial, sans-serif;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-template-line,\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* vic.scss: .rli-vic-answer uses display:flex so sentence and cloze stay on\n one line. The template HTML wraps text in <p>, which is block by default and\n breaks to a new line. Making <p> inline keeps the sentence and blank inline. */\n.mc-populated-blank-root.variant-sr-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } applied to the\n whole distractor row (radio + label), not just the label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } applied to\n the full row element, not only the inner label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover — yellow persists when hovering a chosen row. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n"
|
|
781
|
-
},
|
|
782
|
-
sel_vic: {
|
|
783
|
-
variantId: "sel-vic",
|
|
784
|
-
variantClass: "variant-sel-vic",
|
|
785
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css",
|
|
786
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/sel_vic/scss/main.scss + vic.scss */\n.mc-populated-blank-root.variant-sel-vic {\n font-family: Starial, Arial, sans-serif;\n font-size: 1.5em;\n max-width: 800px;\n margin-inline: auto;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n --pie-correct-answer-choice-hover-bg: #e2e2e2;\n --pie-correct-answer-choice-selected-bg: #fcfcd3;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-template-line,\n.mc-populated-blank-root.variant-sel-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sel-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* sel_vic/main.scss: template left ~75%, audio right ~25% on the same row.\n Svelte scoping prevents the component-internal grid-area rule from reaching\n .audio-container inside AudioPlayer, so we override it here via the global\n .pie-audio-container class which is not subject to scope hashing. */\n.mc-populated-blank-root.variant-sel-vic .pie-audio-container {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n align-self: start;\n min-height: 128px;\n}\n\n/* vic.scss: sentence and cloze sit inline — the <p> wrapper must not break to\n a new line before the blank slot. */\n.mc-populated-blank-root.variant-sel-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sel-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* sel_vic/main.scss: .sel-vic { max-width: 800px } — the fieldset/choices must\n also be constrained so rows don't span beyond 800px. */\n.mc-populated-blank-root.variant-sel-vic .pie-choices-fieldset {\n max-width: 800px;\n width: 100%;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } on the full row. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } on the full row. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sel-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n@media (min-width: 620px) {\n .mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {\n min-width: 620px;\n max-width: 800px;\n transform: translateX(-55px);\n }\n}\n"
|
|
787
|
-
},
|
|
788
|
-
"sel_r1-_gplusggg": {
|
|
789
|
-
variantId: "sel-r1-gplusggg",
|
|
790
|
-
variantClass: "variant-sel-r1-gplusggg",
|
|
791
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_gplusggg/0.0.1/question.css",
|
|
792
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_gplusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-gplusggg {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-group-gap: 1rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n\n/* r1.scss: .rli-r1-content-element boxes all have fixed line-height:89px, so every\n token in the stem row shares a stable baseline regardless of content. In PIE,\n the blank slot's baseline shifts when the empty placeholder (short ) is\n replaced by the filled value span (full text height), dragging adjacent tokens\n down by ~9px. Switching to align-items:center is safe here because gplusggg has\n only one row of content (blank + \"four\"), so vertical centering and baseline\n alignment produce the same visual result. The :is() wrapper raises specificity\n above the base [class*=] rule without needing !important. */\n:is(.mc-populated-blank-root.variant-sel-r1-gplusggg) .pie-template-line {\n align-items: center;\n}\n"
|
|
793
|
-
},
|
|
794
|
-
"sel_r1-g_plusggg": {
|
|
795
|
-
variantId: "sel-r1-g-stem",
|
|
796
|
-
variantClass: "variant-sel-r1-g-stem",
|
|
797
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-g_plusggg/0.0.1/question.css",
|
|
798
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-g_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-g-stem {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n /* r1.scss: .rli-r1-cloze { border-bottom: 6px solid } */\n --mpb-blank-underline-wide-width: 6px;\n}\n"
|
|
799
|
-
},
|
|
800
|
-
"sel_r1-gg_plusggg": {
|
|
801
|
-
variantId: "sel-r1-gg-plus",
|
|
802
|
-
variantClass: "variant-sel-r1-gg-plus",
|
|
803
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-gg_plusggg/0.0.1/question.css",
|
|
804
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-gg_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-gg-plus {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n"
|
|
805
|
-
},
|
|
806
|
-
"sel_r1-_ggplusggg": {
|
|
807
|
-
variantId: "sel-r1-ggplus",
|
|
808
|
-
variantClass: "variant-sel-r1-ggplus",
|
|
809
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css",
|
|
810
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-ggplus {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n\n/* In this variant, the blank appears before trailing tokens; avoid left-margin offset. */\n.mc-populated-blank-root.variant-sel-r1-ggplus.layout-token_sequence .pie-blank-slot {\n margin-left: 0;\n}\n"
|
|
811
|
-
},
|
|
812
|
-
"sel_r1-s3_plusggg": {
|
|
813
|
-
variantId: "sel-r1-s3",
|
|
814
|
-
variantClass: "variant-sel-r1-s3",
|
|
815
|
-
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css",
|
|
816
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-s3 {\n max-width: 860px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-group-gap: 0.35rem;\n --mpb-choice-row-gap: 0.35rem;\n --mpb-horizontal-choice-radio-top-margin: 0.25rem;\n --mpb-stimulus-min-column: 240px;\n --mpb-stimulus-grid-column-gap: 1.1rem;\n --mpb-stimulus-choices-margin-top: 0.85rem;\n --mpb-audio-blank-template-margin-bottom: 0.9rem;\n --mpb-blank-wide-width: 6.8rem;\n}\n\n/* s3 overrides base choice-label with font-weight:500 */\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label,\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label :is(span, p, div) {\n font-size: 1.9em;\n line-height: 89px;\n font-weight: 500;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value,\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value :is(span, p, div) {\n line-height: 1.1;\n white-space: nowrap;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-tile {\n border-radius: 6px;\n background: #f1f1f1;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank {\n grid-template-columns: minmax(220px, auto) auto auto;\n grid-template-areas:\n \"transcript transcript transcript\"\n \"sentence template audio\"\n \"choices choices choices\";\n justify-content: center;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-template-line {\n grid-area: template;\n justify-self: center;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-sentence-line {\n justify-self: end;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-audio-container {\n justify-self: start;\n align-self: start;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-choices-fieldset {\n justify-self: center;\n width: fit-content;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-sentence-line img {\n max-width: 100%;\n height: auto;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal:hover .pie-choice-tile {\n background: #e2e2e2;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal.is-selected .pie-choice-tile,\n.mc-populated-blank-root.variant-sel-r1-s3\n .pie-choice-horizontal.is-selected:hover\n .pie-choice-tile {\n background: #fcfcd3;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {\n transform: scale(0.85);\n}\n"
|
|
817
|
-
}
|
|
818
|
-
}, Ae = (e) => String(e || "").trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i, ""), je = (e) => ke[Ae(e)], Me = (e) => je(e)?.variantClass || "", Ne = new Set([
|
|
819
|
-
"sel-r1-plusggg",
|
|
820
|
-
"sel-r1-gplusggg",
|
|
821
|
-
"sel-r1-g-stem",
|
|
822
|
-
"sel-r1-gg-plus",
|
|
823
|
-
"sel-r1-ggplus",
|
|
824
|
-
"sel-r1-s3"
|
|
825
|
-
]), Pe = (e, t, n) => {
|
|
826
|
-
let r = document.getElementById(e);
|
|
827
|
-
if (r) {
|
|
828
|
-
r.textContent !== n && (r.textContent = n);
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
let i = document.createElement("style");
|
|
832
|
-
i.id = e, i.setAttribute("data-mpb-variant", t), i.textContent = n, document.head.appendChild(i);
|
|
833
|
-
}, Fe = (e) => {
|
|
834
|
-
!e?.cssText || typeof document > "u" || (Ne.has(e.variantId) && Pe("mc-populated-blank-css-sel-r1-base", "sel-r1-base", Oe), Pe(`mc-populated-blank-css-${e.variantId}`, e.variantId, e.cssText));
|
|
835
|
-
}, Ie = D("<div class=\"mb-4 prose pie-prompt\"></div>"), Le = D("<p> </p>"), Re = A("<svg class=\"pie-correct-answer-toggle-svg svelte-6wlbb4\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-283 359 34 35\"><circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"var(--pie-correct-answer-toggle-icon-open-bg, #bce2ff)\"></circle><path d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\" fill=\"var(--pie-correct-answer-toggle-icon-open-bg, #bce2ff)\"></path><polygon points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\" fill=\"var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)\"></polygon></svg>"), ze = A("<svg class=\"pie-correct-answer-toggle-svg svelte-6wlbb4\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-129.5 127 34 35\"><path d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\" fill=\"#D0CAC5\" stroke=\"#E6E3E0\" stroke-width=\"0.75\"></path><path d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\" fill=\"#B3ABA4\" stroke=\"#CDC7C2\" stroke-width=\"0.5\"></path><circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"white\"></circle><path d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\" fill=\"var(--pie-correct-answer-toggle-icon-closed-bg, #bce2ff)\"></path><polygon points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\" fill=\"var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)\"></polygon></svg>"), Be = D("<div class=\"pie-correct-answer-toggle-row svelte-6wlbb4\"><button type=\"button\" class=\"mb-3 pie-toggle-correct-answer svelte-6wlbb4\" style=\"gap:var(--mpb-toggle-button-gap, 0.5rem);\" data-testid=\"show-correct-answer\"><span class=\"pie-correct-answer-toggle-content svelte-6wlbb4\"><span class=\"pie-correct-answer-toggle-icon-holder svelte-6wlbb4\" aria-hidden=\"true\"><!></span> <span class=\"pie-correct-answer-toggle-label svelte-6wlbb4\"> </span></span></button></div>"), Ve = D("<div class=\"mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4\"></div>"), He = D("<div class=\"mb-4 template-line pie-template-line svelte-6wlbb4\"><!> <!> <!></div>"), Ue = D("<p class=\"sr-only pie-result-feedback svelte-6wlbb4\" role=\"status\" aria-live=\"polite\"> </p>"), We = D("<div><!> <!> <!> <!> <!> <!> <!> <fieldset class=\"border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4\"><legend class=\"sr-only pie-choices-legend svelte-6wlbb4\"> </legend> <div style=\"gap:var(--mpb-choice-group-gap, 0.5rem);\" role=\"radiogroup\" tabindex=\"-1\"></div></fieldset></div>"), Ge = {
|
|
836
|
-
hash: "svelte-6wlbb4",
|
|
837
|
-
code: ".sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-correct-answer-toggle-label-color, var(--pie-text, black));}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),\n .pie-toggle-correct-answer.svelte-6wlbb4:focus-visible .pie-correct-answer-toggle-label:where(.svelte-6wlbb4) {text-decoration:underline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;}.template-line.svelte-6wlbb4 p {margin:0;}.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);}.layout-audio_blank_only.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {display:flex;justify-content:center;}.layout-audio_blank_only.svelte-6wlbb4 .pie-blank-slot,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 6px);min-height:160px;padding-bottom:4px;}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'transcript transcript'\n 'sentence audio'\n '. template'\n 'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-transcript:where(.svelte-6wlbb4) {grid-area:transcript;}.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;}.layout-stimulus_image_blank.svelte-6wlbb4 .sentence-line:where(.svelte-6wlbb4) {grid-area:sentence;margin:var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:0;text-align:center;justify-self:center;}.layout-stimulus_image_blank.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-stimulus-choices-margin-top, 0.9rem);}.layout-token_sequence.svelte-6wlbb4 {display:grid;grid-template-columns:1fr auto;grid-template-areas:'transcript audio'\n 'template template'\n 'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .pie-audio-transcript:where(.svelte-6wlbb4) {grid-area:transcript;}.layout-token_sequence.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-token-template-margin-top, 0.6rem) 0 0;justify-self:center;text-align:center;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) span + span {margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-standalone-width, 7rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-token-choices-margin-top, 0.2rem);}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'transcript transcript'\n 'template audio'\n 'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-transcript:where(.svelte-6wlbb4) {grid-area:transcript;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}\n\n /* Match Learnosity responsive behavior for CQT audio-blank layouts:\n at smaller widths, audio control shifts left and answer tiles stack. */\n @media (max-width: 760px) {.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container,\n .layout-token_sequence.svelte-6wlbb4 .pie-audio-container,\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {width:100%;margin-left:0;margin-right:0;justify-content:flex-start;justify-self:start;}.layout-audio_blank_only.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}.layout-audio_blank_only.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}\n }"
|
|
838
|
-
};
|
|
839
|
-
function Ke(n, l) {
|
|
840
|
-
a(l, !0), ee(n, Ge);
|
|
841
|
-
let u = {
|
|
842
|
-
answerChoices: "Answer choices",
|
|
843
|
-
selectedAnswerInSentence: "Selected answer in sentence",
|
|
844
|
-
showCorrectAnswer: "Show correct answer",
|
|
845
|
-
hideCorrectAnswer: "Hide correct answer",
|
|
846
|
-
clickToEnableAutoplay: "Click to enable audio autoplay",
|
|
847
|
-
audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured.",
|
|
848
|
-
transcriptLabel: "Transcript"
|
|
849
|
-
}, _ = S(l, "model", 7), C = S(l, "session", 7), T = y(""), E = y(null), D = y(null), A = y(null), j = y(!1), M = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`, N = e(() => (_()?.mode || _()?.env?.mode || "").toString()), P = e(() => k(N) === "evaluate"), F = e(() => _()?.correctness), I = e(() => typeof _()?.responseCorrect == "boolean" ? _().responseCorrect : k(F) === "correct"), L = e(() => k(F) === "correct"), R = e(() => k(F) === "incorrect"), B = y(!1), V = e(() => k(P) && !k(I) && !!_()?.correctChoiceId), H = e(() => _()?.layoutProfile || ""), W = e(() => ye({
|
|
850
|
-
interactionMode: _()?.interactionMode,
|
|
851
|
-
template: _()?.template,
|
|
852
|
-
choiceLayout: _()?.choiceLayout,
|
|
853
|
-
layoutProfile: k(H),
|
|
854
|
-
hasAudio: _()?.hasAudio,
|
|
855
|
-
useFeatureButtonAudio: _()?.useFeatureButtonAudio
|
|
856
|
-
})), ne = e(() => k(W).isAudioOnlyMode), re = e(() => k(W).isBlankOnlyTemplate), ie = e(() => k(W).isHorizontalChoices), ae = e(() => k(W).hasInlineSentenceAudioLayout), oe = e(() => k(W).useFeatureButtonAudio), se = e(() => k(j)), le = e(() => [
|
|
857
|
-
`--pie-correct-answer-toggle-label-color:${z.text()}`,
|
|
858
|
-
`--pie-correct-answer-toggle-icon-open-bg:${z.tertiaryLight()}`,
|
|
859
|
-
`--pie-correct-answer-toggle-icon-closed-bg:${z.backgroundDark()}`,
|
|
860
|
-
`--pie-correct-answer-toggle-icon-glyph-color:${z.tertiary()}`,
|
|
861
|
-
`--pie-correct-answer-choice-hover-bg:${z.backgroundDark()}`,
|
|
862
|
-
`--pie-correct-answer-choice-selected-bg:${z.secondaryBackground()}`,
|
|
863
|
-
`--pie-correct-answer-choice-correct-bg:${z.correctSecondary()}`,
|
|
864
|
-
`--pie-correct-answer-choice-incorrect-bg:${z.incorrectSecondary()}`,
|
|
865
|
-
`--pie-correct-answer-choice-correct-border:${z.correctTertiary()}`,
|
|
866
|
-
`--pie-correct-answer-choice-incorrect-border:${z.incorrectWithIcon()}`,
|
|
867
|
-
`--pie-correct-answer-feedback-correct-bg:${z.correctWithIcon()}`,
|
|
868
|
-
`--pie-correct-answer-feedback-incorrect-bg:${z.incorrectWithIcon()}`,
|
|
869
|
-
`--pie-correct-answer-feedback-glyph-color:${z.white()}`
|
|
870
|
-
].join(";")), G = e(() => Se({
|
|
871
|
-
layoutProfile: k(H),
|
|
872
|
-
isBlankOnlyTemplate: k(re),
|
|
873
|
-
configuredLimits: _()?.layoutLimits,
|
|
874
|
-
customProfilePresets: _()?.layoutProfilePresets,
|
|
875
|
-
correctAnswerStyleVars: k(le)
|
|
876
|
-
})), K = e(() => Array.isArray(_()?.choices) ? _().choices : []), ue = e(() => _()?.choiceMode || "text"), q = e(() => C()?.choiceId || k(T) || ""), J = e(() => `${M}-choice-group-${_()?.id || "1"}`), Y = e(() => Te({
|
|
877
|
-
selectedId: k(q),
|
|
878
|
-
isEvaluateMode: k(P),
|
|
879
|
-
showCorrectAnswer: k(B),
|
|
880
|
-
alwaysShowCorrect: !!_()?.alwaysShowCorrect,
|
|
881
|
-
correctChoiceId: String(_()?.correctChoiceId || "")
|
|
882
|
-
})), fe = e(() => k(K).find((e) => e.id === k(Y))), pe = e(() => String(k(fe)?.labelHtml || "")), X = e(() => Ee({
|
|
883
|
-
isEvaluateMode: k(P),
|
|
884
|
-
showCorrectAnswer: k(B),
|
|
885
|
-
isCorrect: k(L),
|
|
886
|
-
isIncorrect: k(R),
|
|
887
|
-
selectedId: k(q)
|
|
888
|
-
})), me = e(() => ge({
|
|
889
|
-
isEvaluateMode: k(P),
|
|
890
|
-
correctChoiceId: String(_()?.correctChoiceId || ""),
|
|
891
|
-
selectedId: String(k(q) || ""),
|
|
892
|
-
showCorrectAnswer: k(B)
|
|
893
|
-
})), Z = e(() => ({
|
|
894
|
-
...u,
|
|
895
|
-
..._()?.uiText || {}
|
|
896
|
-
})), _e = e(() => `${M}-prompt`), ve = e(() => `${M}-transcript`), be = e(() => `${M}-choices-legend`), xe = e(() => `${M}-result`), Ce = e(() => De({
|
|
897
|
-
prompt: _()?.prompt || "",
|
|
898
|
-
legendMaxChars: k(G).legendMaxChars,
|
|
899
|
-
answerChoicesLabel: k(Z).answerChoices
|
|
900
|
-
})), Oe = e(() => _()?.prompt ? k(_e) : void 0), ke = e(() => _()?.prompt ? void 0 : String(_()?.choiceGroupLabel || "").trim() || k(Ce)), Ae = e(() => {
|
|
901
|
-
let e = [];
|
|
902
|
-
return _()?.prompt && e.push(k(_e)), _()?.hasAudio && _()?.audioTranscript && e.push(k(ve)), e.length ? e.join(" ") : void 0;
|
|
903
|
-
}), Ne = e(() => {
|
|
904
|
-
let e = _()?.locale || "";
|
|
905
|
-
return e ? e.slice(0, 2) : "en";
|
|
906
|
-
}), Pe = e(() => je(_()?.customType)), Ke = e(() => Me(_()?.customType)), qe = e(() => {
|
|
907
|
-
let e = _()?.template || "", t = e.indexOf("{{blank}}");
|
|
908
|
-
return t < 0 ? {
|
|
909
|
-
before: e,
|
|
910
|
-
after: ""
|
|
911
|
-
} : {
|
|
912
|
-
before: e.slice(0, t),
|
|
913
|
-
after: e.slice(t + 9)
|
|
914
|
-
};
|
|
915
|
-
});
|
|
916
|
-
function Je(e, t) {
|
|
917
|
-
te({
|
|
918
|
-
sourceEl: t,
|
|
919
|
-
fallbackSelector: "mc-populated-blank",
|
|
920
|
-
component: "mc-populated-blank",
|
|
921
|
-
session: e,
|
|
922
|
-
complete: !!e?.choiceId
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
function Ye(e) {
|
|
926
|
-
let t = e.target;
|
|
927
|
-
if (!t.checked) return;
|
|
928
|
-
let n = t.value;
|
|
929
|
-
o(T, n, !0), Je({
|
|
930
|
-
...C(),
|
|
931
|
-
id: C()?.id || _()?.id || "1",
|
|
932
|
-
element: "mc-populated-blank",
|
|
933
|
-
choiceId: n
|
|
934
|
-
}, t);
|
|
935
|
-
}
|
|
936
|
-
function Xe() {
|
|
937
|
-
k(V) && o(B, !k(B));
|
|
938
|
-
}
|
|
939
|
-
t(() => {
|
|
940
|
-
(!k(P) || k(I)) && o(B, !1);
|
|
941
|
-
});
|
|
942
|
-
function Ze(e) {
|
|
943
|
-
if (_()?.disabled) return;
|
|
944
|
-
let t = e.key;
|
|
945
|
-
if (![
|
|
946
|
-
"ArrowDown",
|
|
947
|
-
"ArrowRight",
|
|
948
|
-
"ArrowUp",
|
|
949
|
-
"ArrowLeft"
|
|
950
|
-
].includes(t)) return;
|
|
951
|
-
e.preventDefault();
|
|
952
|
-
let n = e.currentTarget, r = Array.from(n.querySelectorAll("input[type=\"radio\"]:not([disabled])"));
|
|
953
|
-
if (r.length === 0) return;
|
|
954
|
-
let i = r.findIndex((e) => e.checked);
|
|
955
|
-
i = t === "ArrowDown" || t === "ArrowRight" ? i < 0 ? 0 : (i + 1) % r.length : i < 0 ? r.length - 1 : (i - 1 + r.length) % r.length;
|
|
956
|
-
let a = r[i];
|
|
957
|
-
a.checked = !0, a.dispatchEvent(new Event("change", { bubbles: !0 })), a.focus();
|
|
958
|
-
}
|
|
959
|
-
let Qe = e(() => we({
|
|
960
|
-
locale: _()?.locale,
|
|
961
|
-
audioButtonSkin: _()?.audioButtonSkin,
|
|
962
|
-
audioButtonSkinsByLocale: _()?.audioButtonSkinsByLocale
|
|
963
|
-
}));
|
|
964
|
-
function $e() {
|
|
965
|
-
U(k(A), { fallbackSelector: "mc-populated-blank" })?.onAudioStarted?.();
|
|
966
|
-
}
|
|
967
|
-
function et() {
|
|
968
|
-
U(k(A), { fallbackSelector: "mc-populated-blank" })?.onAudioEnded?.();
|
|
969
|
-
}
|
|
970
|
-
t(() => {
|
|
971
|
-
C()?.choiceId && o(T, C().choiceId, !0);
|
|
972
|
-
}), t(() => {
|
|
973
|
-
let e = k(E);
|
|
974
|
-
if (e) return e.addEventListener("click", Xe), () => e.removeEventListener("click", Xe);
|
|
975
|
-
}), t(() => {
|
|
976
|
-
let e = k(D);
|
|
977
|
-
if (!e) return;
|
|
978
|
-
let t = (e) => {
|
|
979
|
-
let t = e.target;
|
|
980
|
-
!t || t.type !== "radio" || Ye(e);
|
|
981
|
-
}, n = (e) => Ze(e);
|
|
982
|
-
return e.addEventListener("change", t), e.addEventListener("keydown", n), () => {
|
|
983
|
-
e.removeEventListener("change", t), e.removeEventListener("keydown", n);
|
|
984
|
-
};
|
|
985
|
-
}), t(() => {
|
|
986
|
-
Fe(k(Pe));
|
|
987
|
-
}), t(() => {
|
|
988
|
-
let e = k(A);
|
|
989
|
-
if (!e) return;
|
|
990
|
-
let t = () => {
|
|
991
|
-
o(j, !!e.closest(".rli-with-audio-transcript"));
|
|
992
|
-
};
|
|
993
|
-
t();
|
|
994
|
-
let n = new MutationObserver(t), r = e.parentElement;
|
|
995
|
-
for (; r;) n.observe(r, {
|
|
996
|
-
attributes: !0,
|
|
997
|
-
attributeFilter: ["class"]
|
|
998
|
-
}), r = r.parentElement;
|
|
999
|
-
return () => n.disconnect();
|
|
1000
|
-
});
|
|
1001
|
-
var tt = {
|
|
1002
|
-
get model() {
|
|
1003
|
-
return _();
|
|
1004
|
-
},
|
|
1005
|
-
set model(e) {
|
|
1006
|
-
_(e), v();
|
|
1007
|
-
},
|
|
1008
|
-
get session() {
|
|
1009
|
-
return C();
|
|
1010
|
-
},
|
|
1011
|
-
set session(e) {
|
|
1012
|
-
C(e), v();
|
|
1013
|
-
}
|
|
1014
|
-
}, Q = We(), nt = O(Q), rt = (e) => {
|
|
1015
|
-
var t = Ie();
|
|
1016
|
-
p(t, () => _().prompt, !0), s(t), c(() => d(t, "id", k(_e))), h(e, t);
|
|
1017
|
-
};
|
|
1018
|
-
x(nt, (e) => {
|
|
1019
|
-
_()?.prompt && e(rt);
|
|
1020
|
-
});
|
|
1021
|
-
var it = r(nt, 2), at = (e) => {
|
|
1022
|
-
var t = Le(), n = O(t, !0);
|
|
1023
|
-
s(t), c(() => {
|
|
1024
|
-
b(t, 1, `text-sm mb-3 text-gray-700 text-center pie-audio-transcript ${k(se) ? "" : "sr-only"}`, "svelte-6wlbb4"), d(t, "id", k(ve)), g(n, _().audioTranscript);
|
|
1025
|
-
}), h(e, t);
|
|
1026
|
-
};
|
|
1027
|
-
x(it, (e) => {
|
|
1028
|
-
_()?.audioTranscript && e(at);
|
|
1029
|
-
});
|
|
1030
|
-
var ot = r(it, 2), st = (e) => {
|
|
1031
|
-
var t = Be(), n = O(t), i = O(n), a = O(i), l = O(a), u = (e) => {
|
|
1032
|
-
h(e, Re());
|
|
1033
|
-
}, f = (e) => {
|
|
1034
|
-
h(e, ze());
|
|
1035
|
-
};
|
|
1036
|
-
x(l, (e) => {
|
|
1037
|
-
k(B) ? e(u) : e(f, -1);
|
|
1038
|
-
}), s(a);
|
|
1039
|
-
var p = r(a, 2), m = O(p, !0);
|
|
1040
|
-
s(p), s(i), s(n), w(n, (e) => o(E, e), () => k(E)), s(t), c(() => {
|
|
1041
|
-
d(n, "aria-pressed", k(B)), g(m, k(B) ? k(Z).hideCorrectAnswer : k(Z).showCorrectAnswer);
|
|
1042
|
-
}), h(e, t);
|
|
1043
|
-
};
|
|
1044
|
-
x(ot, (e) => {
|
|
1045
|
-
k(V) && e(st);
|
|
1046
|
-
});
|
|
1047
|
-
var ct = r(ot, 2);
|
|
1048
|
-
{
|
|
1049
|
-
let t = e(() => !!_()?.hasAudio), n = e(() => _()?.audioUrl), r = e(() => !!_()?.autoplayAudioEnabled), i = e(() => _()?.audioTranscript), a = e(() => _()?.locale);
|
|
1050
|
-
ce(ct, {
|
|
1051
|
-
get hasAudio() {
|
|
1052
|
-
return k(t);
|
|
1053
|
-
},
|
|
1054
|
-
get audioUrl() {
|
|
1055
|
-
return k(n);
|
|
1056
|
-
},
|
|
1057
|
-
get useFeatureButtonAudio() {
|
|
1058
|
-
return k(oe);
|
|
1059
|
-
},
|
|
1060
|
-
get autoplayEnabled() {
|
|
1061
|
-
return k(r);
|
|
1062
|
-
},
|
|
1063
|
-
get audioTranscript() {
|
|
1064
|
-
return k(i);
|
|
1065
|
-
},
|
|
1066
|
-
get showVisibleTranscript() {
|
|
1067
|
-
return k(se);
|
|
1068
|
-
},
|
|
1069
|
-
get transcriptId() {
|
|
1070
|
-
return k(ve);
|
|
1071
|
-
},
|
|
1072
|
-
get featureAudioSkin() {
|
|
1073
|
-
return k(Qe);
|
|
1074
|
-
},
|
|
1075
|
-
get uiText() {
|
|
1076
|
-
return k(Z);
|
|
1077
|
-
},
|
|
1078
|
-
get locale() {
|
|
1079
|
-
return k(a);
|
|
1080
|
-
},
|
|
1081
|
-
onaudiostarted: $e,
|
|
1082
|
-
onaudioended: et
|
|
1083
|
-
});
|
|
1084
|
-
}
|
|
1085
|
-
var lt = r(ct, 2), ut = (e) => {
|
|
1086
|
-
var t = Ve();
|
|
1087
|
-
p(t, () => _().sentenceHtml, !0), s(t), c(() => d(t, "aria-describedby", k(Ae))), h(e, t);
|
|
1088
|
-
};
|
|
1089
|
-
x(lt, (e) => {
|
|
1090
|
-
_()?.sentenceHtml && e(ut);
|
|
1091
|
-
});
|
|
1092
|
-
var dt = r(lt, 2), ft = (e) => {
|
|
1093
|
-
var t = He(), n = O(t);
|
|
1094
|
-
p(n, () => k(qe).before);
|
|
1095
|
-
var i = r(n, 2);
|
|
1096
|
-
de(i, {
|
|
1097
|
-
get choiceMode() {
|
|
1098
|
-
return k(ue);
|
|
1099
|
-
},
|
|
1100
|
-
get displayChoice() {
|
|
1101
|
-
return k(fe);
|
|
1102
|
-
},
|
|
1103
|
-
get displayChoiceLabelHtml() {
|
|
1104
|
-
return k(pe);
|
|
1105
|
-
},
|
|
1106
|
-
get isStandalone() {
|
|
1107
|
-
return k(re);
|
|
1108
|
-
},
|
|
1109
|
-
get blankWidth() {
|
|
1110
|
-
return k(G).blankWidth;
|
|
1111
|
-
},
|
|
1112
|
-
get blankBorderWidth() {
|
|
1113
|
-
return k(G).blankBorderWidth;
|
|
1114
|
-
},
|
|
1115
|
-
get ariaLabel() {
|
|
1116
|
-
return k(Z).selectedAnswerInSentence;
|
|
1117
|
-
}
|
|
1118
|
-
}), p(r(i, 2), () => k(qe).after), s(t), c(() => d(t, "aria-describedby", k(Ae))), h(e, t);
|
|
1119
|
-
};
|
|
1120
|
-
x(dt, (e) => {
|
|
1121
|
-
k(ne) || e(ft);
|
|
1122
|
-
});
|
|
1123
|
-
var pt = r(dt, 2), mt = (e) => {
|
|
1124
|
-
var t = Ue(), n = O(t, !0);
|
|
1125
|
-
s(t), c(() => {
|
|
1126
|
-
d(t, "id", k(xe)), g(n, k(X));
|
|
1127
|
-
}), h(e, t);
|
|
1128
|
-
};
|
|
1129
|
-
x(pt, (e) => {
|
|
1130
|
-
k(X) && e(mt);
|
|
1131
|
-
});
|
|
1132
|
-
var ht = r(pt, 2), gt = O(ht), _t = O(gt, !0);
|
|
1133
|
-
s(gt);
|
|
1134
|
-
var $ = r(gt, 2);
|
|
1135
|
-
return m($, 21, () => k(K), (e) => e.id, (t, n) => {
|
|
1136
|
-
{
|
|
1137
|
-
let r = e(() => k(Y) === k(n).id), i = e(() => !!_()?.disabled), a = e(() => k(me).get(k(n).id));
|
|
1138
|
-
he(t, {
|
|
1139
|
-
get choice() {
|
|
1140
|
-
return k(n);
|
|
1141
|
-
},
|
|
1142
|
-
get choiceMode() {
|
|
1143
|
-
return k(ue);
|
|
1144
|
-
},
|
|
1145
|
-
get isHorizontal() {
|
|
1146
|
-
return k(ie);
|
|
1147
|
-
},
|
|
1148
|
-
get isSelected() {
|
|
1149
|
-
return k(r);
|
|
1150
|
-
},
|
|
1151
|
-
get isDisabled() {
|
|
1152
|
-
return k(i);
|
|
1153
|
-
},
|
|
1154
|
-
get correctness() {
|
|
1155
|
-
return k(a);
|
|
1156
|
-
},
|
|
1157
|
-
get isEvaluateMode() {
|
|
1158
|
-
return k(P);
|
|
1159
|
-
},
|
|
1160
|
-
get instanceId() {
|
|
1161
|
-
return M;
|
|
1162
|
-
},
|
|
1163
|
-
get radioGroupName() {
|
|
1164
|
-
return k(J);
|
|
1165
|
-
}
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
}), s($), w($, (e) => o(D, e), () => k(D)), s(ht), s(Q), w(Q, (e) => o(A, e), () => k(A)), c(() => {
|
|
1169
|
-
b(Q, 1, `p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${k(H)} ${k(Ke)} ${k(ae) ? "has-inline-audio" : ""}`, "svelte-6wlbb4"), d(Q, "lang", k(Ne)), f(Q, k(G).rootStyle), ht.disabled = _()?.disabled, d(gt, "id", k(be)), g(_t, k(Ce)), b($, 1, `pie-choices ${k(ie) ? "flex flex-row flex-wrap items-start justify-center" : "flex flex-col"}`, "svelte-6wlbb4"), d($, "aria-labelledby", k(Oe)), d($, "aria-label", k(ke)), d($, "aria-describedby", k(X) ? k(xe) : void 0);
|
|
1170
|
-
}), h(n, Q), i(tt);
|
|
1171
|
-
}
|
|
1172
|
-
E(Ke, {
|
|
1173
|
-
model: { type: "Object" },
|
|
1174
|
-
session: { type: "Object" },
|
|
1175
|
-
options: { type: "Object" }
|
|
1176
|
-
}, [], []);
|
|
1177
|
-
//#endregion
|
|
1178
|
-
//#region src/delivery/index.ts
|
|
1179
|
-
function qe(e, t, n = !1) {
|
|
1180
|
-
return !(!t?.choiceId || e?.autoplayAudioEnabled && e?.completeAudioEnabled && e?.hasAudio && !n);
|
|
1181
|
-
}
|
|
1182
|
-
var Je = Ke.element, Ye = class extends Je {
|
|
1183
|
-
_internalSession = null;
|
|
1184
|
-
_model = null;
|
|
1185
|
-
_options = null;
|
|
1186
|
-
audioComplete = !1;
|
|
1187
|
-
_dispatchModelSet = () => {
|
|
1188
|
-
this.dispatchEvent(new B(this.tagName.toLowerCase(), this._isComplete(), this._model !== void 0));
|
|
1189
|
-
};
|
|
1190
|
-
_dispatchSessionChanged = () => {
|
|
1191
|
-
this.dispatchEvent(new V(this.tagName.toLowerCase(), this._isComplete()));
|
|
1192
|
-
};
|
|
1193
|
-
set model(e) {
|
|
1194
|
-
this._model = e, this.audioComplete = !1, super.model = e, this._dispatchModelSet();
|
|
1195
|
-
}
|
|
1196
|
-
get model() {
|
|
1197
|
-
return this._model;
|
|
1198
|
-
}
|
|
1199
|
-
set session(e) {
|
|
1200
|
-
this._internalSession = e, super.session = e, this._dispatchSessionChanged();
|
|
1201
|
-
}
|
|
1202
|
-
get session() {
|
|
1203
|
-
return this._internalSession;
|
|
1204
|
-
}
|
|
1205
|
-
set options(e) {
|
|
1206
|
-
this._options = e, super.options = e;
|
|
1207
|
-
}
|
|
1208
|
-
get options() {
|
|
1209
|
-
return this._options;
|
|
1210
|
-
}
|
|
1211
|
-
onSessionChange = (e) => {
|
|
1212
|
-
this._internalSession = e, super.session = e, this._dispatchSessionChanged();
|
|
1213
|
-
};
|
|
1214
|
-
onAudioStarted = () => {
|
|
1215
|
-
this._internalSession = {
|
|
1216
|
-
...this._internalSession || {},
|
|
1217
|
-
audioStartTime: Date.now()
|
|
1218
|
-
};
|
|
1219
|
-
};
|
|
1220
|
-
onAudioEnded = () => {
|
|
1221
|
-
this.audioComplete = !0, this._internalSession = {
|
|
1222
|
-
...this._internalSession || {},
|
|
1223
|
-
audioEndTime: Date.now()
|
|
1224
|
-
}, this._dispatchSessionChanged();
|
|
1225
|
-
};
|
|
1226
|
-
_isComplete = () => qe(this._model, this._internalSession, this.audioComplete);
|
|
1227
|
-
connectedCallback() {
|
|
1228
|
-
super.connectedCallback(), this.onSessionChange = this.onSessionChange, this.onAudioStarted = this.onAudioStarted, this.onAudioEnded = this.onAudioEnded;
|
|
1229
|
-
}
|
|
1230
|
-
};
|
|
1231
|
-
//#endregion
|
|
1232
|
-
export { Ye as default };
|
|
1233
|
-
|
|
1234
|
-
//# sourceMappingURL=index.js.map
|