@cuemath/leap 3.2.27 → 3.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/assets/illustrations/illustrations.js +6 -5
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +5 -0
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +2 -1
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +6 -4
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +9 -7
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
  12. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  13. package/dist/features/communication/pub-sub/constants.js +7 -4
  14. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  15. package/dist/features/homework/homework-card-view.js +85 -97
  16. package/dist/features/homework/homework-card-view.js.map +1 -1
  17. package/dist/features/homework/homework-card.js +44 -42
  18. package/dist/features/homework/homework-card.js.map +1 -1
  19. package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
  20. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  21. package/dist/features/homework/hw-card-list/hw-card-list.js +54 -48
  22. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  23. package/dist/features/homework/utils.js +33 -27
  24. package/dist/features/homework/utils.js.map +1 -1
  25. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
  26. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  27. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
  28. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
  29. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
  30. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
  31. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
  32. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
  33. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
  34. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
  35. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
  36. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
  37. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
  38. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
  39. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
  40. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
  41. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
  42. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
  43. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  44. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  45. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  46. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  47. package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
  48. package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
  49. package/dist/features/puzzles/app/puzzle-app-styled.js +10 -6
  50. package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
  51. package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
  52. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  53. package/dist/features/puzzles/comps/puzzle-card.js +79 -30
  54. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  55. package/dist/features/puzzles/constants/puzzle-container.js +8 -0
  56. package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
  57. package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
  58. package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
  59. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
  60. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  61. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
  62. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
  63. package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
  64. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  65. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
  66. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
  67. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +107 -0
  68. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
  69. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  70. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  71. package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
  72. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  73. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
  74. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
  75. package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
  76. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  77. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +16 -12
  78. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  79. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
  80. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  81. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +166 -163
  82. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  83. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
  84. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  85. package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
  86. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  87. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  88. package/dist/features/worksheet/worksheet/worksheet.js +303 -309
  89. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  90. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  91. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  92. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
  93. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  94. package/dist/index.d.ts +87 -4
  95. package/dist/index.js +285 -275
  96. package/dist/index.js.map +1 -1
  97. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
  98. package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
  99. package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
  100. package/dist/static/puzzle-orange-lottie.0a105c42.json +21206 -0
  101. package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
  102. package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
  103. package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
  104. package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
  105. package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
  106. package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
  107. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
  108. package/package.json +1 -1
  109. package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
  110. package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
  111. package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
  112. package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
  113. package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
@@ -1,146 +1,146 @@
1
1
  import { jsxs as L, jsx as i, Fragment as Vt } from "react/jsx-runtime";
2
- import { memo as Xt, useMemo as p, useState as T, useRef as K, useCallback as Pt, useEffect as R, useLayoutEffect as jt } from "react";
3
- import { IMAGES as Gt } from "../../../../assets/images/images.js";
4
- import Yt from "../../../cue-canvas/cue-canvas.js";
5
- import Zt from "../../../pointer-sync/pointer.js";
6
- import Ht from "../../../ui/layout/flex-view.js";
7
- import Jt from "../../constants/events.js";
8
- import { QUESTIONS_GAP as kt, LEARNOSITY_KEYBOARD_HEIGHT as St } from "../constants.js";
9
- import { getPaperColorByQuestion as qt, isConceptIntroWidget as te, scrollToQuestion as bt } from "../worksheet-helpers.js";
10
- import ee from "./header/header.js";
11
- import ie from "./learnosity-question.js";
12
- import re from "./question-backdrop/question-backdrop.js";
13
- import oe from "./subjective-review.js";
14
- import ne from "./system-intros/advanced-practice-intro.js";
15
- import ce from "./system-intros/basic-practice-intro.js";
16
- import ae from "./system-intros/exit-ticket-intro.js";
17
- import se from "./system-intros/regular-practice-intro.js";
18
- import { QuestionContainerWrapper as le, StimulusReview as me, QuestionContainer as ue, QuestionWrapper as fe, LessonOverviewBanner as he, CueCanvasWrapper as de, Hint as ge, Solution as Ee } from "./worksheet-question-styled.js";
19
- const Me = Xt(
2
+ import { memo as Xt, useMemo as p, useState as T, useRef as P, useCallback as jt, useEffect as H, useLayoutEffect as Gt } from "react";
3
+ import { IMAGES as Yt } from "../../../../assets/images/images.js";
4
+ import Zt from "../../../cue-canvas/cue-canvas.js";
5
+ import Jt from "../../../pointer-sync/pointer.js";
6
+ import St from "../../../ui/layout/flex-view.js";
7
+ import kt from "../../constants/events.js";
8
+ import { QUESTIONS_GAP as qt, LEARNOSITY_KEYBOARD_HEIGHT as bt } from "../constants.js";
9
+ import { getPaperColorByQuestion as te, isConceptIntroWidget as ee, scrollToQuestion as Ct } from "../worksheet-helpers.js";
10
+ import ie from "./header/header.js";
11
+ import re from "./learnosity-question.js";
12
+ import oe from "./question-backdrop/question-backdrop.js";
13
+ import ne from "./subjective-review.js";
14
+ import ce from "./system-intros/advanced-practice-intro.js";
15
+ import ae from "./system-intros/basic-practice-intro.js";
16
+ import se from "./system-intros/exit-ticket-intro.js";
17
+ import me from "./system-intros/regular-practice-intro.js";
18
+ import { QuestionContainerWrapper as le, StimulusReview as ue, QuestionContainer as fe, QuestionWrapper as he, LessonOverviewBanner as de, CueCanvasWrapper as ge, Hint as Ee, Solution as _e } from "./worksheet-question-styled.js";
19
+ const Oe = Xt(
20
20
  ({
21
21
  userType: c,
22
- signedRequest: Ct,
22
+ signedRequest: Wt,
23
23
  worksheetCompleted: g,
24
24
  question: n,
25
25
  response: e,
26
- nextQuestionId: v,
27
- isActive: w,
26
+ nextQuestionId: R,
27
+ isActive: v,
28
28
  isHidden: A,
29
29
  canRender: V,
30
30
  loggerRef: M,
31
31
  appended: a,
32
32
  maxQuestionWidth: X,
33
- behavior: P,
34
- layout: j,
35
- actionbarHeight: Wt,
33
+ behavior: j,
34
+ layout: G,
35
+ actionbarHeight: yt,
36
36
  learnosity: b,
37
- intersectionObserver: G,
38
- background: Y = "paper",
39
- onMediaStateChange: yt,
40
- onMarkForReview: Bt,
41
- userId: xt,
42
- onPublishStrokes: Z,
43
- onReceiveStrokes: J,
44
- isScribblingEnabled: k,
37
+ intersectionObserver: Y,
38
+ background: Z = "paper",
39
+ onMediaStateChange: Bt,
40
+ onMarkForReview: xt,
41
+ userId: It,
42
+ onPublishStrokes: J,
43
+ onReceiveStrokes: k,
44
+ isScribblingEnabled: q,
45
45
  initialStrokesData: O,
46
- isCanvasEnabled: q,
47
- onPublishMouseMove: tt,
48
- onSubscribeMouseMove: et,
49
- setActiveQuestionId: it,
50
- canResolveDoubt: It,
51
- onResolveDoubt: Lt,
52
- studentId: Tt,
53
- responses: At,
54
- subjectiveProps: rt
46
+ isCanvasEnabled: tt,
47
+ onPublishMouseMove: et,
48
+ onSubscribeMouseMove: it,
49
+ setActiveQuestionId: rt,
50
+ canResolveDoubt: Lt,
51
+ onResolveDoubt: Tt,
52
+ studentId: At,
53
+ responses: Mt,
54
+ subjectiveProps: ot
55
55
  }) => {
56
56
  const C = p(
57
- () => Y === "paper" ? qt(n) : void 0,
58
- [Y, n]
59
- ), [W, Mt] = T(), [ot, Ot] = T(), {
60
- validation: nt,
57
+ () => Z === "paper" ? te(n) : void 0,
58
+ [Z, n]
59
+ ), [W, Ot] = T(), [nt, Nt] = T(), {
60
+ validation: ct,
61
61
  review: N,
62
- maximumAttempts: ct,
62
+ maximumAttempts: Q,
63
63
  canExceedAttempts: at,
64
- teacherValidationEnabled: H,
64
+ teacherValidationEnabled: w,
65
65
  solutionHidden: st
66
- } = P, { minQuestionHeight: Nt, topOffset: lt, questionsScrollable: y, renderQuestionHeader: Qt } = j, {
66
+ } = j, { minQuestionHeight: Qt, topOffset: mt, questionsScrollable: y, renderQuestionHeader: zt, imageHue: lt } = G, {
67
67
  type: E,
68
68
  response_id: r,
69
69
  stimulus_review: _,
70
70
  item_type: f,
71
- instructor_stimulus: mt,
72
- metadata: { hints: h, solution: B, widget_reference: ut },
73
- item_reference: ft,
74
- question_number: ht,
75
- item_number: dt,
76
- item_display_number: gt
77
- } = n, Ft = !!_, x = f === "overview", m = te(mt), d = mt === "SystemIntro", Q = m || d, Et = e == null ? void 0 : e.responseEdited, zt = p(() => {
71
+ instructor_stimulus: ut,
72
+ metadata: { hints: h, solution: B, widget_reference: ft },
73
+ item_reference: ht,
74
+ question_number: dt,
75
+ item_number: gt,
76
+ item_display_number: Et
77
+ } = n, Ft = !!_, x = f === "overview", l = ee(ut), d = ut === "SystemIntro", z = l || d, _t = e == null ? void 0 : e.responseEdited, Dt = p(() => {
78
78
  const t = [];
79
- return Et && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), E === "hotspot" && t.push("correct-answers-hidden"), a && H && E === "clozetext" && (!m || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), m && t.push("concept-intro"), d && t.push("system-intro"), t.join(" ");
79
+ return _t && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), E === "hotspot" && t.push("correct-answers-hidden"), a && w && E === "clozetext" && (!l || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), l && t.push("concept-intro"), d && t.push("system-intro"), t.join(" ");
80
80
  }, [
81
81
  a,
82
- m,
82
+ l,
83
83
  x,
84
84
  d,
85
85
  E,
86
- Et,
87
- H,
86
+ _t,
87
+ w,
88
88
  c
89
- ]), F = K({}), z = (e == null ? void 0 : e.hintsUsed) ?? 0, [_t] = T((e == null ? void 0 : e.validatedByTeacher) ?? !1), I = K(null), D = K(null), U = p(() => h == null ? void 0 : h.slice(0, z), [h, z]), $t = p(() => c === "TEACHER" || g ? !0 : !e || !e.response || e.responseEdited ? !1 : nt, [e, c, nt, g]), pt = p(() => {
89
+ ]), F = P({}), D = (e == null ? void 0 : e.hintsUsed) ?? 0, [$t] = T((e == null ? void 0 : e.validatedByTeacher) ?? !1), I = P(null), U = P(null), K = p(() => h == null ? void 0 : h.slice(0, D), [h, D]), pt = p(() => c === "TEACHER" || g ? !0 : !e || !e.response || e.responseEdited ? !1 : ct, [e, c, ct, g]), Ht = p(() => {
90
90
  if (c === "TEACHER") return !0;
91
91
  if (N) {
92
92
  const { attemptsHistory: t } = e ?? {};
93
- return ((t == null ? void 0 : t.length) ?? 0) >= ct && !at;
93
+ return ((t == null ? void 0 : t.length) ?? 0) >= Q && !at;
94
94
  }
95
95
  return !1;
96
- }, [at, ct, e, N, c]), Dt = p(
96
+ }, [at, Q, e, N, c]), Ut = p(
97
97
  () => B && g && !st,
98
98
  [st, B, g]
99
- ), [Rt, Ut] = T({
99
+ ), [Rt, Kt] = T({
100
100
  width: 0,
101
101
  height: 0
102
- }), Kt = Pt((t) => {
103
- Ot(t);
102
+ }), Pt = jt((t) => {
103
+ Nt(t);
104
104
  }, []);
105
- return R(() => {
106
- I.current && G.observe(I.current);
107
- }, [G]), R(() => {
105
+ return H(() => {
106
+ I.current && Y.observe(I.current);
107
+ }, [Y]), H(() => {
108
108
  if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
109
109
  const t = document.querySelectorAll(
110
110
  `.widget-${n.response_id} .lrn_draggable`
111
111
  );
112
112
  let s = 0, o = 0;
113
- t.forEach((l) => {
114
- s = Math.max(s, l.clientWidth + 33), o = Math.max(o, l.clientHeight + 1);
115
- }), Ut({
113
+ t.forEach((m) => {
114
+ s = Math.max(s, m.clientWidth + 33), o = Math.max(o, m.clientHeight + 1);
115
+ }), Kt({
116
116
  width: n.type !== "association" ? s : 0,
117
117
  height: o
118
118
  });
119
119
  }
120
- }, [a, n.response_id, n.type]), R(() => {
121
- if (a && $t) {
120
+ }, [a, n.response_id, n.type]), H(() => {
121
+ if (a && pt) {
122
122
  const t = b.question(r);
123
123
  t && t.validate({
124
- showCorrectAnswers: pt
124
+ showCorrectAnswers: Ht
125
125
  });
126
126
  }
127
- }, [a, b, r, N, pt, c, $t]), R(() => {
128
- const t = D.current;
129
- if (a && t && M.current && F.current[r] === void 0 && !m && !d) {
127
+ }, [a, b, r, N, Ht, c, pt]), H(() => {
128
+ const t = U.current;
129
+ if (a && t && M.current && F.current[r] === void 0 && !l && !d) {
130
130
  const s = t.clientWidth, o = t.querySelectorAll("*");
131
- for (let l = 0; l < o.length; l++) {
132
- const u = o[l];
131
+ for (let m = 0; m < o.length; m++) {
132
+ const u = o[m];
133
133
  if (u != null && u.closest(".resize-sensor"))
134
134
  continue;
135
135
  if (((u == null ? void 0 : u.clientWidth) ?? 0) > s) {
136
- F.current[r] = !0, M.current(Jt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
- item_reference: ft,
138
- widget_reference: ut,
136
+ F.current[r] = !0, M.current(kt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
+ item_reference: ht,
138
+ widget_reference: ft,
139
139
  question_type: E,
140
- question_number: ht,
140
+ question_number: dt,
141
141
  responseId: r,
142
- item_number: dt,
143
- item_display_number: gt
142
+ item_number: gt,
143
+ item_display_number: Et
144
144
  });
145
145
  break;
146
146
  }
@@ -149,27 +149,27 @@ const Me = Xt(
149
149
  }
150
150
  }, [
151
151
  a,
152
- m,
152
+ l,
153
153
  d,
154
+ Et,
154
155
  gt,
155
- dt,
156
- ft,
156
+ ht,
157
157
  M,
158
158
  E,
159
- ht,
159
+ dt,
160
160
  r,
161
- ut
162
- ]), R(() => {
161
+ ft
162
+ ]), H(() => {
163
163
  const t = I.current, s = (o) => {
164
- const l = o.querySelector(".lrn_response_wrapper");
165
- if (Q || !l)
164
+ const m = o.querySelector(".lrn_response_wrapper");
165
+ if (z || !m)
166
166
  return 0;
167
- const u = o.getBoundingClientRect().bottom, S = l.getBoundingClientRect().bottom, $ = Math.abs(u - S);
168
- return $ < St ? St - $ : 0;
167
+ const u = o.getBoundingClientRect().bottom, S = m.getBoundingClientRect().bottom, $ = Math.abs(u - S);
168
+ return $ < bt ? bt - $ : 0;
169
169
  };
170
- a && t && Mt((o) => {
170
+ a && t && Ot((o) => {
171
171
  var wt;
172
- const S = ((wt = n.ui_style) == null ? void 0 : wt.type) === "floating-keyboard" && !(H && E === "clozetext"), $ = t.clientHeight;
172
+ const S = ((wt = n.ui_style) == null ? void 0 : wt.type) === "floating-keyboard" && !(w && E === "clozetext"), $ = t.clientHeight;
173
173
  if ($ === 0)
174
174
  return o;
175
175
  if (!o)
@@ -180,24 +180,24 @@ const Me = Xt(
180
180
  $ + (S ? s(t) : 0)
181
181
  );
182
182
  return Math.abs(vt - o) > 4 ? vt : o;
183
- }), (z || Ft || B && g) && b.renderMath("mathjax");
184
- }), jt(() => {
185
- !y && !A && bt(r);
186
- }, [A, y, r, lt]), R(() => {
187
- if (H && v && !_t && (e != null && e.validatedByTeacher)) {
183
+ }), (D || Ft || B && g) && b.renderMath("mathjax");
184
+ }), Gt(() => {
185
+ !y && !A && Ct(r);
186
+ }, [A, y, r, mt]), H(() => {
187
+ if (w && R && !$t && (e != null && e.validatedByTeacher)) {
188
188
  const t = setTimeout(() => {
189
- y ? bt(v) : it(v);
189
+ y ? Ct(R) : rt(R);
190
190
  }, 1e3);
191
191
  return () => {
192
192
  clearTimeout(t);
193
193
  };
194
194
  }
195
195
  }, [
196
- v,
197
- H,
198
- _t,
196
+ R,
197
+ w,
198
+ $t,
199
199
  y,
200
- it,
200
+ rt,
201
201
  e == null ? void 0 : e.validatedByTeacher
202
202
  ]), /* @__PURE__ */ L(
203
203
  le,
@@ -205,14 +205,14 @@ const Me = Xt(
205
205
  "data-response-id": r,
206
206
  className: `widget-${r}`,
207
207
  ref: I,
208
- $topOffset: lt,
208
+ $topOffset: mt,
209
209
  $flexDirection: _ ? "row" : "column",
210
210
  $alignItems: _ ? "flex-start" : "center",
211
211
  $hidden: A,
212
- $marginBottom: kt,
212
+ $marginBottom: qt,
213
213
  children: [
214
214
  _ && /* @__PURE__ */ i(
215
- me,
215
+ ue,
216
216
  {
217
217
  dangerouslySetInnerHTML: {
218
218
  __html: _
@@ -220,97 +220,100 @@ const Me = Xt(
220
220
  }
221
221
  ),
222
222
  /* @__PURE__ */ L(
223
- ue,
223
+ fe,
224
224
  {
225
- ref: D,
225
+ ref: U,
226
226
  $width: _ ? "50%" : `${X}px`,
227
- $minHeight: W ? Math.max(W - 72, ot ?? 0) : Nt,
228
- $isActive: w,
227
+ $minHeight: W ? Math.max(W - 72, nt ?? 0) : Qt,
228
+ $isActive: v,
229
229
  $paperColor: C,
230
- $opacity: w ? 1 : 0.2,
230
+ $opacity: v ? 1 : 0.2,
231
+ $imageHue: lt,
231
232
  children: [
232
- w && !!tt && !!et && q && /* @__PURE__ */ i(
233
- Zt,
233
+ v && !!et && !!it && tt && /* @__PURE__ */ i(
234
+ Jt,
234
235
  {
235
- containerRef: D,
236
- onPublish: tt,
237
- onSubscribe: et,
236
+ containerRef: U,
237
+ onPublish: et,
238
+ onSubscribe: it,
238
239
  responseId: r
239
240
  }
240
241
  ),
241
242
  /* @__PURE__ */ L(
242
- fe,
243
+ he,
243
244
  {
244
- className: zt,
245
+ className: Dt,
245
246
  $dropzoneMinWidth: Rt.width,
246
247
  $dropzoneMinHeight: Rt.height,
247
248
  children: [
248
- Qt && !(x || m || d) && /* @__PURE__ */ i(
249
- ee,
249
+ zt && !(x || l || d) && /* @__PURE__ */ i(
250
+ ie,
250
251
  {
251
252
  userType: c,
252
253
  question: n,
253
254
  response: e,
254
- behavior: P,
255
- layout: j,
255
+ behavior: j,
256
+ layout: G,
256
257
  paperColor: C,
257
- onMarkForReview: Bt,
258
- actionbarHeight: Wt,
259
- canResolveDoubt: It,
260
- onResolveDoubt: Lt,
258
+ onMarkForReview: xt,
259
+ actionbarHeight: yt,
260
+ canResolveDoubt: Lt,
261
+ onResolveDoubt: Tt,
261
262
  worksheetCompleted: g
262
263
  }
263
264
  ),
264
- x && /* @__PURE__ */ i(he, { src: Gt.LESSON_OVERVIEW_BANNER }),
265
- m && C && /* @__PURE__ */ i(re, { paperColor: C }),
265
+ x && /* @__PURE__ */ i(de, { src: Yt.LESSON_OVERVIEW_BANNER }),
266
+ l && C && /* @__PURE__ */ i(oe, { paperColor: C }),
266
267
  d ? /* @__PURE__ */ L(Vt, { children: [
267
- f === "practice-basic" && /* @__PURE__ */ i(ce, {}),
268
- f === "practice-regular" && /* @__PURE__ */ i(se, {}),
269
- f === "exit-ticket" && /* @__PURE__ */ i(ae, {}),
270
- (f == null ? void 0 : f.startsWith("advanced-")) && /* @__PURE__ */ i(ne, {})
268
+ f === "practice-basic" && /* @__PURE__ */ i(ae, {}),
269
+ f === "practice-regular" && /* @__PURE__ */ i(me, {}),
270
+ f === "exit-ticket" && /* @__PURE__ */ i(se, {}),
271
+ (f == null ? void 0 : f.startsWith("advanced-")) && /* @__PURE__ */ i(ce, {})
271
272
  ] }) : void 0,
272
273
  /* @__PURE__ */ i(
273
- ie,
274
+ re,
274
275
  {
275
- signedRequest: Ct,
276
+ signedRequest: Wt,
276
277
  appended: a,
277
278
  question: n,
278
279
  response: e == null ? void 0 : e.response,
279
- canRender: V || w,
280
+ canRender: V || v,
280
281
  learnosity: b,
281
282
  canForceAppend: c === "TEACHER",
282
- isConceptIntro: m,
283
+ isConceptIntro: l,
283
284
  simState: e == null ? void 0 : e.simState,
284
- onMediaStateChange: yt
285
+ onMediaStateChange: Bt,
286
+ imageHue: lt,
287
+ isPuzzle: Q === -2
285
288
  }
286
289
  ),
287
- !Q && q && Z && J && W !== void 0 && /* @__PURE__ */ i(de, { $canScribble: k, children: /* @__PURE__ */ i(
288
- Yt,
290
+ !z && tt && J && k && W !== void 0 && /* @__PURE__ */ i(ge, { $canScribble: q, children: /* @__PURE__ */ i(
291
+ Zt,
289
292
  {
290
293
  canRender: V,
291
- canScribble: k && w,
294
+ canScribble: q && v,
292
295
  appended: a,
293
296
  canvasId: r,
294
297
  width: X,
295
- height: Math.max(W, ot ?? 0),
296
- onUpdateHeight: Kt,
297
- onPublish: Z,
298
- onSubscribe: J,
299
- userId: xt,
298
+ height: Math.max(W, nt ?? 0),
299
+ onUpdateHeight: Pt,
300
+ onPublish: J,
301
+ onSubscribe: k,
302
+ userId: It,
300
303
  initialData: O == null ? void 0 : O[r],
301
304
  userType: c
302
305
  }
303
306
  ) }),
304
- !Q && U && U.length > 0 && /* @__PURE__ */ i(
305
- Ht,
307
+ !z && K && K.length > 0 && /* @__PURE__ */ i(
308
+ St,
306
309
  {
307
310
  $background: "BLUE_1",
308
311
  $gutterX: 1,
309
312
  $gapX: 0.5,
310
313
  $borderRadiusX: 0,
311
314
  $borderColor: "BLUE_2",
312
- children: U.map((t, s) => /* @__PURE__ */ i(
313
- ge,
315
+ children: K.map((t, s) => /* @__PURE__ */ i(
316
+ Ee,
314
317
  {
315
318
  dangerouslySetInnerHTML: {
316
319
  __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span>&nbsp;${t}`
@@ -320,8 +323,8 @@ const Me = Xt(
320
323
  ))
321
324
  }
322
325
  ),
323
- Dt && /* @__PURE__ */ i(
324
- Ht,
326
+ Ut && /* @__PURE__ */ i(
327
+ St,
325
328
  {
326
329
  $background: "YELLOW_1",
327
330
  $gutterX: 1,
@@ -329,7 +332,7 @@ const Me = Xt(
329
332
  $borderRadiusX: 0,
330
333
  $borderColor: "YELLOW_2",
331
334
  children: /* @__PURE__ */ i(
332
- Ee,
335
+ _e,
333
336
  {
334
337
  dangerouslySetInnerHTML: {
335
338
  __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${B}`
@@ -338,16 +341,16 @@ const Me = Xt(
338
341
  )
339
342
  }
340
343
  ),
341
- !!rt && /* @__PURE__ */ i(
342
- oe,
344
+ !!ot && /* @__PURE__ */ i(
345
+ ne,
343
346
  {
344
- responses: At,
347
+ responses: Mt,
345
348
  response: e,
346
- nextQuestionId: v,
349
+ nextQuestionId: R,
347
350
  responseId: r,
348
- studentId: Tt,
351
+ studentId: At,
349
352
  userType: c,
350
- ...rt
353
+ ...ot
351
354
  }
352
355
  )
353
356
  ]
@@ -362,6 +365,6 @@ const Me = Xt(
362
365
  }
363
366
  );
364
367
  export {
365
- Me as default
368
+ Oe as default
366
369
  };
367
370
  //# sourceMappingURL=worksheet-question.js.map