@pie-element/number-line 13.1.2-next.1 → 13.1.2-next.11
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/arrows.js +1 -1
- package/dist/author/domain.js +1 -1
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +5 -2
- package/dist/author/main.js +145 -145
- package/dist/author/ticks.js +1 -1
- package/dist/browser/author/index.js +17039 -21701
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +110 -110
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/{delivery-Ci_kZyOM.js → delivery-ZqHtCtAW.js} +3864 -3900
- package/dist/browser/delivery-ZqHtCtAW.js.map +1 -0
- package/dist/browser/{dist-D5T-OaLo.js → dist-clbS3pcd.js} +3739 -4335
- package/dist/browser/dist-clbS3pcd.js.map +1 -0
- package/dist/browser/{impureFunctionsAny.generated-Bqfato71.js → impureFunctionsAny.generated-DOBSXSdK.js} +1721 -2096
- package/dist/browser/impureFunctionsAny.generated-DOBSXSdK.js.map +1 -0
- package/dist/controller/tickUtils.d.ts +1 -1
- package/dist/controller/tickUtils.js +3 -3
- package/dist/delivery/data-converter.js +1 -1
- package/dist/delivery/index.js +3 -3
- package/dist/delivery/number-line/graph/arrow.js +1 -1
- package/dist/delivery/number-line/graph/elements/line.js +2 -2
- package/dist/delivery/number-line/graph/elements/point.js +5 -4
- package/dist/delivery/number-line/graph/elements/ray.js +3 -3
- package/dist/delivery/number-line/graph/index.js +6 -6
- package/dist/delivery/number-line/graph/line.js +1 -1
- package/dist/delivery/number-line/graph/stacks.js +1 -1
- package/dist/delivery/number-line/graph/tick-utils.d.ts +2 -2
- package/dist/delivery/number-line/graph/tick-utils.js +4 -4
- package/dist/delivery/number-line/graph/ticks.js +15 -15
- package/dist/delivery/number-line/index.js +3 -3
- package/dist/delivery/number-line/point-chooser/index.js +1 -1
- package/dist/index.iife.js +59 -59
- package/package.json +19 -20
- package/dist/browser/delivery-Ci_kZyOM.js.map +0 -1
- package/dist/browser/dist-D5T-OaLo.js.map +0 -1
- package/dist/browser/impureFunctionsAny.generated-Bqfato71.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { Et as e, G as t, Jr as n, Ln as r, Pn as i, Q as a, Vr as o, a as s, c, ca as l, d as u, f as d, h as f, hr as p, i as m, l as h, la as g, m as _, mr as v, n as y, ni as b, on as x, vn as S, wa as C } from "../dist-clbS3pcd.js";
|
|
2
|
+
import { t as ee } from "../impureFunctionsAny.generated-DOBSXSdK.js";
|
|
3
3
|
//#region ../../shared/feedback/dist/index.js
|
|
4
|
-
var
|
|
4
|
+
var w = {
|
|
5
5
|
correct: {
|
|
6
6
|
type: "default",
|
|
7
7
|
default: "Correct",
|
|
@@ -23,15 +23,15 @@ var T = {
|
|
|
23
23
|
custom: "You have not entered a response"
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function T(e) {
|
|
27
27
|
return e === "partially-correct" ? "partial" : e;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function E(e, t = {}) {
|
|
30
30
|
return new Promise((n) => {
|
|
31
31
|
let r = {
|
|
32
|
-
...
|
|
32
|
+
...w,
|
|
33
33
|
...t
|
|
34
|
-
}, i =
|
|
34
|
+
}, i = T(e), a = r[i], o = w[i];
|
|
35
35
|
te(a, o[a.type]).then(n);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -55,7 +55,7 @@ var D = Object.defineProperty, O = /* @__PURE__ */ ((e, t) => {
|
|
|
55
55
|
return t || D(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
56
56
|
})({ enabled: () => k });
|
|
57
57
|
function k(e, t, n) {
|
|
58
|
-
return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n
|
|
58
|
+
return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n != "boolean" || n;
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/controller/defaults.ts
|
|
@@ -116,7 +116,7 @@ var A = {
|
|
|
116
116
|
.2,
|
|
117
117
|
.25,
|
|
118
118
|
.5
|
|
119
|
-
],
|
|
119
|
+
], M = [
|
|
120
120
|
"1/1000",
|
|
121
121
|
"1/100",
|
|
122
122
|
"1/64",
|
|
@@ -136,7 +136,7 @@ var A = {
|
|
|
136
136
|
"1/4",
|
|
137
137
|
"1/3",
|
|
138
138
|
"1/2"
|
|
139
|
-
],
|
|
139
|
+
], N = {
|
|
140
140
|
1: [
|
|
141
141
|
1,
|
|
142
142
|
2,
|
|
@@ -257,57 +257,57 @@ var A = {
|
|
|
257
257
|
8,
|
|
258
258
|
10
|
|
259
259
|
]
|
|
260
|
-
},
|
|
261
|
-
if (!
|
|
262
|
-
if (
|
|
263
|
-
let
|
|
264
|
-
if (
|
|
265
|
-
if (
|
|
266
|
-
let
|
|
267
|
-
for (;
|
|
268
|
-
return
|
|
269
|
-
},
|
|
270
|
-
if (
|
|
271
|
-
let
|
|
272
|
-
start:
|
|
273
|
-
end:
|
|
274
|
-
interval:
|
|
275
|
-
multiplier:
|
|
276
|
-
},
|
|
277
|
-
return
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
let
|
|
281
|
-
return d((
|
|
282
|
-
},
|
|
260
|
+
}, ne = (e, n, r) => {
|
|
261
|
+
if (!S(o(t(e), t(r)), 0)) throw Error("start point must be divisible by interval");
|
|
262
|
+
if (S(e, n)) return [];
|
|
263
|
+
let i = C(n, o(n, t(r))), s = v(r, 0) ? "positive" : "negative";
|
|
264
|
+
if (s === "negative" && p(n, e)) throw Error("start must be > than end when doing a negative decrement");
|
|
265
|
+
if (s === "positive" && g(n, e)) throw Error("start must be < end when doing increments");
|
|
266
|
+
let c = s === "positive" ? g : S(i, n) ? p : v, l = [], u = e;
|
|
267
|
+
for (; c(u, i);) l.push(u), u = a(u, r);
|
|
268
|
+
return l;
|
|
269
|
+
}, re = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, P = (e, i, s) => {
|
|
270
|
+
if (e = r(e), i = r(i), s = r(s), v(t(C(i, e)), t(i))) throw Error(re(e, i));
|
|
271
|
+
let c = {
|
|
272
|
+
start: t(e),
|
|
273
|
+
end: t(i),
|
|
274
|
+
interval: t(s),
|
|
275
|
+
multiplier: l(s, 0) ? -1 : 1
|
|
276
|
+
}, u = o(c.start, c.interval), d = ne(v(u, 0) ? a(C(c.start, u), c.interval) : c.start, c.end, c.interval), f = c.multiplier === -1 ? d.map((e) => n(e, -1)) : d;
|
|
277
|
+
return l(s, 0) && f.reverse(), f;
|
|
278
|
+
}, ie = (e, t) => (e = r(e), t = r(t), l(e, t) ? e : t), ae = (e, t) => (e = r(e), t = r(t), v(e, t) ? e : t), oe = (e, t, i) => {
|
|
279
|
+
e = r(e), t = r(t), i = r(i);
|
|
280
|
+
let a = v(t, 0) ? P(ae(0, e), t, i) : [];
|
|
281
|
+
return d((l(e, 0) ? P(ie(0, t), e, n(i, -1)) : []).concat(a), S);
|
|
282
|
+
}, se = (e, t, n) => {
|
|
283
283
|
n ||= 2;
|
|
284
284
|
let r = 10 ** -n / 2;
|
|
285
285
|
return Math.abs(e - t) < r;
|
|
286
|
-
}, F = (e, t, n) =>
|
|
287
|
-
let
|
|
286
|
+
}, F = (e, t, n) => l(R(e), R(t)) ? t : v(R(e), R(n)) ? n : e, I = (e, t) => {
|
|
287
|
+
let i = b(n(10, x(r(e.max - e.min), t)));
|
|
288
288
|
return {
|
|
289
|
-
min:
|
|
290
|
-
max:
|
|
289
|
+
min: i,
|
|
290
|
+
max: b(n(20, i))
|
|
291
291
|
};
|
|
292
|
-
}, L = (e, t) =>
|
|
293
|
-
if (
|
|
294
|
-
if (
|
|
295
|
-
}, z = (
|
|
296
|
-
let a = i
|
|
292
|
+
}, L = (e, t) => S(o(e, t), 0), R = (e) => {
|
|
293
|
+
if (m(e)) return r(e.n * e.s, e.d);
|
|
294
|
+
if (h(e)) return r(e);
|
|
295
|
+
}, z = (e, t, r, i) => {
|
|
296
|
+
let a = !i || i.limit !== !1, o = I(e, t), s = a ? F(R(r.minor), o.min, o.max) : R(r.minor), c = a ? F(R(r.major), s, n(s, 20)) : R(r.major);
|
|
297
297
|
if (!L(c, s)) {
|
|
298
|
-
let
|
|
298
|
+
let e = x(c, s);
|
|
299
299
|
return {
|
|
300
300
|
minor: s,
|
|
301
|
-
major:
|
|
301
|
+
major: n(s, e <= 2 ? 2 : Math.round(e))
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
return {
|
|
305
305
|
major: c,
|
|
306
306
|
minor: s
|
|
307
307
|
};
|
|
308
|
-
}, B = (e, t, n,
|
|
308
|
+
}, B = (e, t, n, i) => (n = z(e, t, n, i), oe(e.min, e.max, n.minor).filter((t) => g(t, r(e.max))).map((e) => {
|
|
309
309
|
let t = "minor";
|
|
310
|
-
return
|
|
310
|
+
return se(b(o(e, n.major)), 0) && (t = "major"), {
|
|
311
311
|
x: e,
|
|
312
312
|
type: t
|
|
313
313
|
};
|
|
@@ -318,33 +318,33 @@ var A = {
|
|
|
318
318
|
};
|
|
319
319
|
return j.forEach((n) => {
|
|
320
320
|
n >= e.min && n <= e.max && t.decimal.push(n);
|
|
321
|
-
}),
|
|
322
|
-
let
|
|
323
|
-
|
|
321
|
+
}), M.forEach((n) => {
|
|
322
|
+
let i = b(r(n));
|
|
323
|
+
i >= e.min && i <= e.max && t.fraction.push(n);
|
|
324
324
|
}), t;
|
|
325
|
-
}, H = (
|
|
326
|
-
let
|
|
325
|
+
}, H = (e, t, i) => {
|
|
326
|
+
let a = {
|
|
327
327
|
decimal: [],
|
|
328
328
|
fraction: []
|
|
329
|
-
},
|
|
330
|
-
if (
|
|
331
|
-
let
|
|
332
|
-
U(
|
|
333
|
-
minor:
|
|
334
|
-
major:
|
|
335
|
-
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (
|
|
329
|
+
}, o = r(b(b(e))), s = Number(o.n), c = Number(o.d);
|
|
330
|
+
if (s >= 1 && c === 1) for (let r = 1; r <= 10; r++) {
|
|
331
|
+
let o = b(n(s, r));
|
|
332
|
+
U(t, i, {
|
|
333
|
+
minor: e,
|
|
334
|
+
major: o
|
|
335
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (a.fraction.push(o.toString()), a.decimal.push(o));
|
|
336
336
|
}
|
|
337
|
-
else for (let
|
|
338
|
-
let
|
|
339
|
-
U(
|
|
340
|
-
minor:
|
|
341
|
-
major:
|
|
342
|
-
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (
|
|
337
|
+
else for (let o in N[c]) {
|
|
338
|
+
let l = n(r(s, c), N[c][o]);
|
|
339
|
+
U(t, i, {
|
|
340
|
+
minor: e,
|
|
341
|
+
major: b(l)
|
|
342
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (Number(l.d) === 1 ? a.fraction.push(Number(l.n).toString()) : a.fraction.push(Number(l.n) + "/" + Number(l.d)), a.decimal.push(b(l)));
|
|
343
343
|
}
|
|
344
|
-
return
|
|
344
|
+
return a;
|
|
345
345
|
}, U = (e, t, n, r) => B(e, t, n, r).map((e) => r.fraction ? e : {
|
|
346
346
|
...e,
|
|
347
|
-
x:
|
|
347
|
+
x: b(e.x) || 0
|
|
348
348
|
}), W = (e) => {
|
|
349
349
|
let { domain: t, ticks: n, width: r } = e, i = H(n.minor, t, r);
|
|
350
350
|
if (i.decimal.indexOf(n.major) === -1) {
|
|
@@ -355,57 +355,57 @@ var A = {
|
|
|
355
355
|
...e,
|
|
356
356
|
ticks: n
|
|
357
357
|
};
|
|
358
|
-
}, G = (
|
|
359
|
-
let { domain: n, ticks:
|
|
360
|
-
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
363
|
-
else if (
|
|
364
|
-
|
|
365
|
-
let e = V(
|
|
366
|
-
if (
|
|
358
|
+
}, G = (t) => {
|
|
359
|
+
let { domain: n, ticks: a = {}, width: o } = t;
|
|
360
|
+
a.tickIntervalType || (a.minor > .5 ? a.tickIntervalType = "Integer" : a.tickIntervalType = "Decimal");
|
|
361
|
+
let s = I(n, o);
|
|
362
|
+
if (s.min >= 1) a.tickIntervalType = "Integer", a.minor = a.minor < 1 ? b(e(s.min)) : a.minor >= b(e(s.min)) && a.minor <= b(i(s.max)) ? a.minor : b(e(s.min)), a.integerTick = a.minor, a.fractionTick = "0", a.decimalTick = 0;
|
|
363
|
+
else if (s.min >= 0 && s.max < 1) {
|
|
364
|
+
a.tickIntervalType === "Integer" && (a.tickIntervalType = "Fraction");
|
|
365
|
+
let e = V(s), t = b(r(e.fraction[0])), n = b(r(e.fraction[e.fraction.length - 1]));
|
|
366
|
+
if (a.minor < t || a.minor > n) switch (a.tickIntervalType) {
|
|
367
367
|
case "Fraction":
|
|
368
|
-
|
|
368
|
+
a.minor = b(r(e.fraction[e.fraction.length - 1])), a.fractionTick = e.fraction[e.fraction.length - 1], a.decimalTick = e.decimal[0];
|
|
369
369
|
break;
|
|
370
370
|
case "Decimal":
|
|
371
|
-
case "Integer":
|
|
371
|
+
case "Integer": a.minor = e.decimal[e.decimal.length - 1], a.decimalTick = e.decimal[e.decimal.length - 1], a.fractionTick = e.fraction[0];
|
|
372
372
|
}
|
|
373
|
-
else switch (
|
|
373
|
+
else switch (a.tickIntervalType) {
|
|
374
374
|
case "Fraction":
|
|
375
|
-
let t =
|
|
376
|
-
|
|
375
|
+
let t = r(b(a.minor));
|
|
376
|
+
a.fractionTick = t.n + "/" + t.d, a.decimalTick = a.decimalTick ? a.decimalTick : e.decimal[0];
|
|
377
377
|
break;
|
|
378
378
|
case "Decimal":
|
|
379
|
-
case "Integer":
|
|
379
|
+
case "Integer": a.decimalTick = a.minor, a.fractionTick = a.fractionTick ? a.fractionTick : e.fraction[0];
|
|
380
380
|
}
|
|
381
|
-
|
|
382
|
-
} else if (
|
|
383
|
-
let
|
|
384
|
-
if (
|
|
381
|
+
a.integerTick = 1;
|
|
382
|
+
} else if (s.min < 1 && s.max >= 1) {
|
|
383
|
+
let t = V(s);
|
|
384
|
+
if (a.minor >= s.min && a.minor <= s.max) switch (a.tickIntervalType) {
|
|
385
385
|
case "Integer":
|
|
386
|
-
|
|
386
|
+
a.integerTick = a.minor, a.decimalTick = s.min > .5 ? 0 : t.decimal[0], a.fractionTick = s.min > .5 ? "0" : t.fraction[0];
|
|
387
387
|
break;
|
|
388
388
|
case "Decimal":
|
|
389
|
-
|
|
389
|
+
a.integerTick = 1, a.decimalTick = a.minor, a.fractionTick = t.fraction[0];
|
|
390
390
|
break;
|
|
391
391
|
case "Fraction":
|
|
392
|
-
|
|
393
|
-
let
|
|
394
|
-
|
|
392
|
+
a.integerTick = 1, a.decimalTick = t.decimal[0];
|
|
393
|
+
let e = r(b(a.minor));
|
|
394
|
+
a.fractionTick = e.n + "/" + e.d;
|
|
395
395
|
}
|
|
396
|
-
else switch (
|
|
396
|
+
else switch (s.min > .5 && (a.tickIntervalType = "Integer"), a.tickIntervalType) {
|
|
397
397
|
case "Integer":
|
|
398
|
-
|
|
398
|
+
a.minor = b(e(s.min)), a.integerTick = a.minor, a.decimalTick = s.min > .5 ? 0 : t.decimal[0], a.fractionTick = s.min > .5 ? "0" : t.fraction[0];
|
|
399
399
|
break;
|
|
400
400
|
case "Decimal":
|
|
401
|
-
|
|
401
|
+
a.minor = t.decimal[0], a.integerTick = 1, a.decimalTick = a.minor, a.fractionTick = t.fraction[0];
|
|
402
402
|
break;
|
|
403
|
-
case "Fraction":
|
|
403
|
+
case "Fraction": a.minor = b(r(t.fraction[0])), a.integerTick = 1, a.decimalTick = t.decimal[0], a.fractionTick = t.fraction[0];
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
return W({
|
|
407
|
-
...
|
|
408
|
-
ticks:
|
|
407
|
+
...t,
|
|
408
|
+
ticks: a
|
|
409
409
|
});
|
|
410
410
|
}, K = (e) => ({ score: { scaled: e } }), ce = (e, t) => {
|
|
411
411
|
let { correct: n } = e, r = t.find((e) => e.numberOfCorrect === n.length);
|
|
@@ -413,10 +413,10 @@ var A = {
|
|
|
413
413
|
}, le = (e) => (t, n) => t + +!!e.some((e) => Y(e)(n)), q = (e, t, n) => {
|
|
414
414
|
let r = [], i = t?.answer || [], a = e?.correctResponse || [];
|
|
415
415
|
if (!i.length) return ["Student did not interact with the number line."];
|
|
416
|
-
let { correct: o, incorrect: s, notInAnswer: c, noCorrectResponse: l } = X(i,
|
|
416
|
+
let { correct: o, incorrect: s, notInAnswer: c, noCorrectResponse: l } = X(i, f(a));
|
|
417
417
|
if (l) return ["No correct response is defined for this item."];
|
|
418
|
-
let u = o.length, d = s.length,
|
|
419
|
-
u > 0 && r.push(`${u} object(s) correctly placed.`), d > 0 && r.push(`${d} incorrect object(s) placed.`),
|
|
418
|
+
let u = o.length, d = s.length, p = c.length;
|
|
419
|
+
u > 0 && r.push(`${u} object(s) correctly placed.`), d > 0 && r.push(`${d} incorrect object(s) placed.`), p > 0 && r.push(`${p} expected object(s) were not placed.`);
|
|
420
420
|
let m = [...i];
|
|
421
421
|
[...a], o.forEach((e) => {
|
|
422
422
|
let t = m[e], n = t?.type || "object";
|
|
@@ -458,7 +458,7 @@ function de(e, t) {
|
|
|
458
458
|
if (!t || c(t)) n({ score: { scaled: 0 } });
|
|
459
459
|
else {
|
|
460
460
|
t.answer = t.answer || [];
|
|
461
|
-
let r = X(t.answer,
|
|
461
|
+
let r = X(t.answer, f(e.correctResponse)), i = Z(r);
|
|
462
462
|
if (i === "correct") n(K(1));
|
|
463
463
|
else if (i === "incorrect") n(K(0));
|
|
464
464
|
else if (i === "partial") {
|
|
@@ -472,7 +472,7 @@ var fe = 3, J = (e, t, n) => {
|
|
|
472
472
|
n ||= 5;
|
|
473
473
|
let r = 10 ** -n / 2;
|
|
474
474
|
return Math.abs(e - t) <= r;
|
|
475
|
-
}, Y = (e) => (t) =>
|
|
475
|
+
}, Y = (e) => (t) => _(e, t, (e, t) => {
|
|
476
476
|
if (typeof e == "number" && typeof t == "number") return J(e, t, 3);
|
|
477
477
|
}), X = (e, t) => c(t) && e.length > 0 ? {
|
|
478
478
|
correct: [],
|
|
@@ -495,7 +495,7 @@ var fe = 3, J = (e, t, n) => {
|
|
|
495
495
|
return i ? "unknown" : t.length === 0 && n.length === 0 ? "unanswered" : t.length === 0 && r.length === 0 ? "correct" : t.length > 0 || r.length > 0 ? n.length > 0 ? "partial" : "incorrect" : "unknown";
|
|
496
496
|
};
|
|
497
497
|
function Q(e) {
|
|
498
|
-
let t =
|
|
498
|
+
let t = y(A.feedback, e.feedback);
|
|
499
499
|
return {
|
|
500
500
|
...A,
|
|
501
501
|
...e,
|
|
@@ -504,7 +504,7 @@ function Q(e) {
|
|
|
504
504
|
}
|
|
505
505
|
function pe(e = {}) {
|
|
506
506
|
return new Promise((t) => {
|
|
507
|
-
t(
|
|
507
|
+
t(s({
|
|
508
508
|
...e,
|
|
509
509
|
graph: {
|
|
510
510
|
...A.graph,
|
|
@@ -518,7 +518,7 @@ var me = (e) => {
|
|
|
518
518
|
let { graph: { domain: t, labelStep: n, ticks: r = {} } = {} } = e, { minor: i, major: a } = r;
|
|
519
519
|
if (t && (t.min = Number((t.min || 0).toFixed(2)), t.max = Number((t.max || 0).toFixed(2))), n && typeof n == "string" && n.match(/^[1-9][0-9]*\/[1-9][0-9]*$/g)) {
|
|
520
520
|
e.graph.fraction = !0, r.tickIntervalType = "Fraction";
|
|
521
|
-
let t =
|
|
521
|
+
let t = ee(n);
|
|
522
522
|
t !== a && (r.major = t, r.minor = t / (a / i));
|
|
523
523
|
}
|
|
524
524
|
return e;
|
|
@@ -527,19 +527,19 @@ async function he(e, t, n) {
|
|
|
527
527
|
if (!e) throw Error("question is null");
|
|
528
528
|
let r = await Q(e), i = G(me(r).graph);
|
|
529
529
|
if (i) {
|
|
530
|
-
let e = n.mode === "evaluate", a =
|
|
530
|
+
let e = n.mode === "evaluate", a = f(r.correctResponse), o = e && X(t && t.answer || [], a), c = e && Z(o), { exhibitOnly: l } = i, u = n.mode !== "gather" || l === !0, d = null;
|
|
531
531
|
n.role === "instructor" && (n.mode === "view" || e) && (d = r.teacherInstructions);
|
|
532
|
-
let
|
|
533
|
-
return
|
|
532
|
+
let p = e ? await E(c, r.feedback) : void 0;
|
|
533
|
+
return s({
|
|
534
534
|
prompt: r.prompt,
|
|
535
535
|
teacherInstructions: d,
|
|
536
536
|
graph: i,
|
|
537
537
|
disabled: u,
|
|
538
|
-
corrected:
|
|
538
|
+
corrected: o,
|
|
539
539
|
correctResponse: e && ["unanswered", "correct"].indexOf(c) === -1 && r.correctResponse,
|
|
540
|
-
feedback:
|
|
540
|
+
feedback: p && {
|
|
541
541
|
type: c,
|
|
542
|
-
message:
|
|
542
|
+
message: p
|
|
543
543
|
},
|
|
544
544
|
colorContrast: n.accessibility && n.accessibility.colorContrast || "black_on_white",
|
|
545
545
|
language: r.language,
|