@cuemath/leap 3.2.9-link.0 → 3.2.9-pzd-0.1-testing

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 (185) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +5 -9
  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 +10 -8
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +12 -17
  12. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  13. package/dist/features/auth/comps/resend-otp/resend-otp.js +47 -54
  14. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  15. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +17 -29
  16. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  17. package/dist/features/auth/comps/tabs/tabs-styled.js +10 -22
  18. package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
  19. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +19 -19
  20. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  21. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
  22. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
  23. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
  24. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
  25. package/dist/features/circle-games/sign-up/constants.js +3 -1
  26. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  27. package/dist/features/communication/pub-sub/constants.js +7 -4
  28. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  29. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
  30. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  31. package/dist/features/homework/homework-card-view.js +85 -97
  32. package/dist/features/homework/homework-card-view.js.map +1 -1
  33. package/dist/features/homework/homework-card.js +44 -42
  34. package/dist/features/homework/homework-card.js.map +1 -1
  35. package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
  36. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  37. package/dist/features/homework/hw-card-list/hw-card-list.js +57 -50
  38. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  39. package/dist/features/homework/utils.js +33 -27
  40. package/dist/features/homework/utils.js.map +1 -1
  41. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
  42. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  43. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
  44. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
  45. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
  46. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
  47. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
  48. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
  49. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
  50. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
  51. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
  52. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
  53. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
  54. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
  55. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
  56. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
  57. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
  58. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
  59. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  60. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  61. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  62. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  63. package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
  64. package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
  65. package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
  66. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  67. package/dist/features/puzzles/comps/puzzle-card.js +72 -30
  68. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  69. package/dist/features/puzzles/constants/puzzle-container.js +8 -0
  70. package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
  71. package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
  72. package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
  73. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
  74. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  75. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
  76. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
  77. package/dist/features/puzzles/puzzle-container/puzzle-container.js +98 -108
  78. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  79. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
  80. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
  81. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +110 -0
  82. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
  83. package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
  84. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  85. package/dist/features/ui/error/error.js +65 -27
  86. package/dist/features/ui/error/error.js.map +1 -1
  87. package/dist/features/ui/image/image.js +1 -1
  88. package/dist/features/ui/image/image.js.map +1 -1
  89. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  90. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  91. package/dist/features/ui/inputs/text-input/text-input.js +18 -19
  92. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  93. package/dist/features/ui/modals/modal-styled.js +35 -28
  94. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  95. package/dist/features/ui/modals/modal.js +40 -14
  96. package/dist/features/ui/modals/modal.js.map +1 -1
  97. package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
  98. package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
  99. package/dist/features/ui/streak-icon/streak-icon.js +17 -15
  100. package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
  101. package/dist/features/ui/theme/button.js +78 -78
  102. package/dist/features/ui/theme/button.js.map +1 -1
  103. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
  104. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
  105. package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
  106. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  107. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +29 -25
  108. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  109. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +97 -47
  110. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  111. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +204 -196
  112. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  113. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
  114. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  115. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
  116. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  117. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  118. package/dist/features/worksheet/worksheet/worksheet.js +307 -313
  119. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  120. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  121. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  122. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
  123. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  124. package/dist/index.d.ts +89 -97
  125. package/dist/index.js +517 -531
  126. package/dist/index.js.map +1 -1
  127. package/dist/static/puzzle-blue-lottie.7017e2e8.json +1 -0
  128. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
  129. package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
  130. package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
  131. package/dist/static/puzzle-orange-lottie.cfcf3724.json +1 -0
  132. package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
  133. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
  134. package/package.json +3 -2
  135. package/dist/assets/line-icons/icons/after-noon.js +0 -34
  136. package/dist/assets/line-icons/icons/after-noon.js.map +0 -1
  137. package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
  138. package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
  139. package/dist/assets/line-icons/icons/evening.js +0 -35
  140. package/dist/assets/line-icons/icons/evening.js.map +0 -1
  141. package/dist/assets/line-icons/icons/morning.js +0 -35
  142. package/dist/assets/line-icons/icons/morning.js.map +0 -1
  143. package/dist/assets/line-icons/icons/star3.js +0 -32
  144. package/dist/assets/line-icons/icons/star3.js.map +0 -1
  145. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
  146. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
  147. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -33
  148. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
  149. package/dist/features/auth/comps/otp-input/otp-input-styled.js +0 -22
  150. package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +0 -1
  151. package/dist/features/auth/comps/otp-input/otp-input.js +0 -51
  152. package/dist/features/auth/comps/otp-input/otp-input.js.map +0 -1
  153. package/dist/features/auth/comps/pill-button/pill-button-styled.js +0 -63
  154. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +0 -1
  155. package/dist/features/auth/comps/pill-button/pill-button.js +0 -66
  156. package/dist/features/auth/comps/pill-button/pill-button.js.map +0 -1
  157. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +0 -17
  158. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +0 -1
  159. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +0 -60
  160. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +0 -1
  161. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +0 -19
  162. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +0 -1
  163. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +0 -22
  164. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +0 -1
  165. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +0 -18
  166. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +0 -1
  167. package/dist/features/auth/signup-v2/signup-header/signup-header.js +0 -25
  168. package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +0 -1
  169. package/dist/features/auth/signup-v2/signup-options/signup-options.js +0 -71
  170. package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +0 -1
  171. package/dist/static/calendar-purple.1a840b41.svg +0 -1
  172. package/dist/static/flying-disk.c7f6ed39.json +0 -1
  173. package/dist/static/graduation-cap.3be3340a.json +0 -1
  174. package/dist/static/handshake.287e7dfb.svg +0 -1
  175. package/dist/static/light-bulb.c6db0b23.json +0 -1
  176. package/dist/static/money.332aacf1.svg +0 -1
  177. package/dist/static/muscle.9bcfb8a7.json +0 -1
  178. package/dist/static/parent-avatar.822c7b9b.svg +0 -1
  179. package/dist/static/pencil.23df9da0.json +0 -1
  180. package/dist/static/plus-sign.de6af957.json +0 -1
  181. package/dist/static/racing-car.2cbf864e.json +0 -1
  182. package/dist/static/rocket.0a3ccab0.json +0 -1
  183. package/dist/static/shovel.abeec04c.json +0 -1
  184. package/dist/static/stripe-blurple.6abf422f.svg +0 -1
  185. package/dist/static/trustpilot.bd3d79e1.svg +0 -1
@@ -1,308 +1,316 @@
1
- import { jsxs as b, jsx as r, Fragment as Ut } from "react/jsx-runtime";
2
- import { memo as zt, useMemo as $, useState as T, useRef as z, useCallback as Dt, useEffect as _, useLayoutEffect as Vt } from "react";
1
+ import { jsxs as I, jsx as r, Fragment as Ut } from "react/jsx-runtime";
2
+ import { memo as Dt, useMemo as $, useState as M, useRef as D, useCallback as Pt, useEffect as _, useLayoutEffect as Vt } from "react";
3
3
  import { IMAGES as Xt } from "../../../../assets/images/images.js";
4
- import Pt from "../../../cue-canvas/cue-canvas.js";
5
- import jt from "../../../pointer-sync/pointer.js";
6
- import vt from "../../../ui/layout/flex-view.js";
7
- import Ft from "../../constants/events.js";
8
- import { QUESTIONS_GAP as Gt } from "../constants.js";
9
- import { getPaperColorByQuestion as Yt, isConceptIntroWidget as Zt, scrollToQuestion as wt } from "../worksheet-helpers.js";
10
- import Kt from "./header/header.js";
11
- import Jt from "./learnosity-question.js";
4
+ import jt from "../../../cue-canvas/cue-canvas.js";
5
+ import Ft from "../../../pointer-sync/pointer.js";
6
+ import Ht from "../../../ui/layout/flex-view.js";
7
+ import Gt from "../../constants/events.js";
8
+ import { QUESTIONS_GAP as Yt } from "../constants.js";
9
+ import { getPaperColorByQuestion as Zt, isConceptIntroWidget as Kt, scrollToQuestion as vt } from "../worksheet-helpers.js";
10
+ import Jt from "./header/header.js";
11
+ import kt from "./learnosity-question.js";
12
12
  import qt from "./question-backdrop/question-backdrop.js";
13
- import kt from "./subjective-review.js";
14
- import ti from "./system-intros/advanced-practice-intro.js";
15
- import ii from "./system-intros/basic-practice-intro.js";
16
- import ri from "./system-intros/exit-ticket-intro.js";
17
- import ei from "./system-intros/regular-practice-intro.js";
18
- import { QuestionContainerWrapper as oi, StimulusReview as ni, QuestionContainer as ci, QuestionWrapper as ai, LessonOverviewBanner as mi, CueCanvasWrapper as li, Hint as hi, Solution as si } from "./worksheet-question-styled.js";
19
- const Ti = zt(
13
+ import ti from "./subjective-review.js";
14
+ import ii from "./system-intros/advanced-practice-intro.js";
15
+ import ri from "./system-intros/basic-practice-intro.js";
16
+ import ei from "./system-intros/exit-ticket-intro.js";
17
+ import oi from "./system-intros/regular-practice-intro.js";
18
+ import { QuestionContainerWrapper as ni, StimulusReview as ci, QuestionContainer as ai, QuestionWrapper as mi, LessonOverviewBanner as li, CueCanvasWrapper as ui, Hint as si, Solution as hi } from "./worksheet-question-styled.js";
19
+ const Ti = Dt(
20
20
  ({
21
- userType: o,
22
- signedRequest: Ht,
23
- worksheetCompleted: f,
24
- question: n,
21
+ userType: n,
22
+ signedRequest: St,
23
+ worksheetCompleted: d,
24
+ question: c,
25
25
  response: i,
26
- nextQuestionId: v,
27
- isActive: w,
28
- isHidden: A,
29
- canRender: D,
30
- loggerRef: B,
31
- appended: c,
26
+ nextQuestionId: w,
27
+ isActive: H,
28
+ isHidden: T,
29
+ canRender: P,
30
+ loggerRef: A,
31
+ appended: a,
32
32
  maxQuestionWidth: V,
33
33
  behavior: X,
34
- layout: P,
35
- actionbarHeight: St,
34
+ layout: j,
35
+ actionbarHeight: Rt,
36
36
  learnosity: S,
37
- intersectionObserver: j,
38
- background: F = "paper",
39
- onMediaStateChange: Rt,
40
- onMarkForReview: Wt,
41
- userId: Ct,
42
- onPublishStrokes: G,
43
- onReceiveStrokes: Y,
44
- isScribblingEnabled: Z,
45
- initialStrokesData: y,
46
- isCanvasEnabled: K,
47
- onPublishMouseMove: J,
37
+ intersectionObserver: F,
38
+ background: G = "paper",
39
+ onMediaStateChange: Wt,
40
+ onMarkForReview: Ct,
41
+ userId: pt,
42
+ onPublishStrokes: Y,
43
+ onReceiveStrokes: Z,
44
+ isScribblingEnabled: K,
45
+ initialStrokesData: B,
46
+ isCanvasEnabled: J,
47
+ onPublishMouseMove: k,
48
48
  onSubscribeMouseMove: q,
49
- setActiveQuestionId: k,
50
- canResolveDoubt: pt,
51
- onResolveDoubt: Lt,
49
+ setActiveQuestionId: tt,
50
+ canResolveDoubt: Lt,
51
+ onResolveDoubt: bt,
52
52
  studentId: xt,
53
53
  responses: It,
54
- subjectiveProps: tt
54
+ subjectiveProps: it
55
55
  }) => {
56
56
  const R = $(
57
- () => F === "paper" ? Yt(n) : void 0,
58
- [F, n]
59
- ), [W, bt] = T(), [it, Tt] = T(), {
60
- validation: rt,
61
- review: M,
62
- maximumAttempts: et,
57
+ () => G === "paper" ? Zt(c) : void 0,
58
+ [G, c]
59
+ ), [W, Mt] = M(), [rt, Tt] = M(), {
60
+ validation: et,
61
+ review: y,
62
+ maximumAttempts: O,
63
63
  canExceedAttempts: ot,
64
64
  teacherValidationEnabled: C,
65
65
  solutionHidden: nt
66
- } = X, { minQuestionHeight: At, topOffset: ct, questionsScrollable: p, renderQuestionHeader: Bt } = P, {
67
- type: H,
66
+ } = X, { minQuestionHeight: At, topOffset: ct, questionsScrollable: p, renderQuestionHeader: Bt, imageHue: at } = j, {
67
+ type: v,
68
68
  response_id: e,
69
- stimulus_review: u,
70
- item_type: l,
71
- instructor_stimulus: at,
72
- metadata: { hints: h, solution: L, widget_reference: mt },
73
- item_reference: lt,
74
- question_number: ht,
75
- item_number: st,
69
+ stimulus_review: g,
70
+ item_type: s,
71
+ instructor_stimulus: mt,
72
+ metadata: { hints: h, solution: L, widget_reference: lt },
73
+ item_reference: ut,
74
+ question_number: st,
75
+ item_number: ht,
76
76
  item_display_number: ft
77
- } = n, yt = !!u, x = l === "overview", m = Zt(at), s = at === "SystemIntro", ut = m || s, dt = i == null ? void 0 : i.responseEdited, Mt = $(() => {
77
+ } = c, yt = !!g, b = s === "overview", l = Kt(mt), f = mt === "SystemIntro", dt = l || f, gt = i == null ? void 0 : i.responseEdited, Ot = $(() => {
78
78
  const t = [];
79
- return dt && o === "TEACHER" && t.push("attempting"), c || t.push("hidden"), H === "hotspot" && t.push("correct-answers-hidden"), c && C && H === "clozetext" && (!m || o === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), m && t.push("concept-intro"), s && t.push("system-intro"), t.join(" ");
79
+ return gt && n === "TEACHER" && t.push("attempting"), a || t.push("hidden"), v === "hotspot" && t.push("correct-answers-hidden"), a && C && v === "clozetext" && (!l || n === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), b && t.push("lesson-overview"), l && t.push("concept-intro"), f && t.push("system-intro"), t.join(" ");
80
80
  }, [
81
- c,
82
- m,
83
- x,
84
- s,
85
- H,
86
- dt,
81
+ a,
82
+ l,
83
+ b,
84
+ f,
85
+ v,
86
+ gt,
87
87
  C,
88
- o
89
- ]), O = z({}), N = (i == null ? void 0 : i.hintsUsed) ?? 0, [gt] = T((i == null ? void 0 : i.validatedByTeacher) ?? !1), I = z(null), Q = z(null), U = $(() => h == null ? void 0 : h.slice(0, N), [h, N]), Et = $(() => o === "TEACHER" || f ? !0 : !i || !i.response || i.responseEdited ? !1 : rt, [i, o, rt, f]), $t = $(() => {
90
- if (o === "TEACHER") return !0;
91
- if (M) {
88
+ n
89
+ ]), Q = D({}), N = (i == null ? void 0 : i.hintsUsed) ?? 0, [Et] = M((i == null ? void 0 : i.validatedByTeacher) ?? !1), x = D(null), z = D(null), U = $(() => h == null ? void 0 : h.slice(0, N), [h, N]), $t = $(() => n === "TEACHER" || d ? !0 : !i || !i.response || i.responseEdited ? !1 : et, [i, n, et, d]), _t = $(() => {
90
+ if (n === "TEACHER") return !0;
91
+ if (y) {
92
92
  const { attemptsHistory: t } = i ?? {};
93
- return ((t == null ? void 0 : t.length) ?? 0) >= et && !ot;
93
+ return ((t == null ? void 0 : t.length) ?? 0) >= O && !ot;
94
94
  }
95
95
  return !1;
96
- }, [ot, et, i, M, o]), Ot = $(
97
- () => L && f && !nt,
98
- [nt, L, f]
99
- ), [_t, Nt] = T({
96
+ }, [ot, O, i, y, n]), Qt = $(
97
+ () => L && d && !nt,
98
+ [nt, L, d]
99
+ ), [wt, Nt] = M({
100
100
  width: 0,
101
101
  height: 0
102
- }), Qt = Dt((t) => {
102
+ }), zt = Pt((t) => {
103
103
  Tt(t);
104
104
  }, []);
105
105
  return _(() => {
106
- I.current && j.observe(I.current);
107
- }, [j]), _(() => {
108
- if (c && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
106
+ x.current && F.observe(x.current);
107
+ }, [F]), _(() => {
108
+ if (a && (c.type === "clozeassociation" || c.type === "association" || c.type === "clozeformula")) {
109
109
  const t = document.querySelectorAll(
110
- `.widget-${n.response_id} .lrn_draggable`
110
+ `.widget-${c.response_id} .lrn_draggable`
111
111
  );
112
- let a = 0, d = 0;
113
- t.forEach((g) => {
114
- a = Math.max(a, g.clientWidth + 33), d = Math.max(d, g.clientHeight + 1);
112
+ let o = 0, m = 0;
113
+ t.forEach((u) => {
114
+ o = Math.max(o, u.clientWidth + 33), m = Math.max(m, u.clientHeight + 1);
115
115
  }), Nt({
116
- width: n.type !== "association" ? a : 0,
117
- height: d
116
+ width: c.type !== "association" ? o : 0,
117
+ height: m
118
118
  });
119
119
  }
120
- }, [c, n.response_id, n.type]), _(() => {
121
- if (c && Et) {
120
+ }, [a, c.response_id, c.type]), _(() => {
121
+ if (a && $t) {
122
122
  const t = S.question(e);
123
123
  t && t.validate({
124
- showCorrectAnswers: $t
124
+ showCorrectAnswers: _t
125
125
  });
126
126
  }
127
- }, [c, S, e, M, $t, o, Et]), _(() => {
128
- const t = Q.current;
129
- if (c && t && B.current && O.current[e] === void 0 && !m && !s) {
130
- const a = t.clientWidth, d = t.querySelectorAll("*");
131
- for (let g = 0; g < d.length; g++) {
132
- const E = d[g];
127
+ }, [a, S, e, y, _t, n, $t]), _(() => {
128
+ const t = z.current;
129
+ if (a && t && A.current && Q.current[e] === void 0 && !l && !f) {
130
+ const o = t.clientWidth, m = t.querySelectorAll("*");
131
+ for (let u = 0; u < m.length; u++) {
132
+ const E = m[u];
133
133
  if (E != null && E.closest(".resize-sensor"))
134
134
  continue;
135
- if (((E == null ? void 0 : E.clientWidth) ?? 0) > a) {
136
- O.current[e] = !0, B.current(Ft.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
- item_reference: lt,
138
- widget_reference: mt,
139
- question_type: H,
140
- question_number: ht,
135
+ if (((E == null ? void 0 : E.clientWidth) ?? 0) > o) {
136
+ Q.current[e] = !0, A.current(Gt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
+ item_reference: ut,
138
+ widget_reference: lt,
139
+ question_type: v,
140
+ question_number: st,
141
141
  responseId: e,
142
- item_number: st,
142
+ item_number: ht,
143
143
  item_display_number: ft
144
144
  });
145
145
  break;
146
146
  }
147
147
  }
148
- O.current[e] = !1;
148
+ Q.current[e] = !1;
149
149
  }
150
150
  }, [
151
- c,
152
- m,
153
- s,
151
+ a,
152
+ l,
153
+ f,
154
154
  ft,
155
- st,
156
- lt,
157
- B,
158
- H,
159
155
  ht,
156
+ ut,
157
+ A,
158
+ v,
159
+ st,
160
160
  e,
161
- mt
161
+ lt
162
162
  ]), _(() => {
163
- const t = I.current, a = t == null ? void 0 : t.clientHeight;
164
- c && a && a > 0 && bt(Math.ceil(a)), (N || yt || L && f) && S.renderMath("mathjax");
163
+ const t = x.current, o = t == null ? void 0 : t.clientHeight;
164
+ a && o && o > 0 && Mt((m) => {
165
+ if (!m)
166
+ return Math.ceil(o);
167
+ const u = Math.ceil(o);
168
+ return Math.abs(u - m) > 4 ? u : m;
169
+ }), (N || yt || L && d) && S.renderMath("mathjax");
165
170
  }), Vt(() => {
166
- !p && !A && wt(e);
167
- }, [A, p, e, ct]), _(() => {
168
- if (C && v && !gt && (i != null && i.validatedByTeacher)) {
171
+ !p && !T && vt(e);
172
+ }, [T, p, e, ct]), _(() => {
173
+ if (C && w && !Et && (i != null && i.validatedByTeacher)) {
169
174
  const t = setTimeout(() => {
170
- p ? wt(v) : k(v);
175
+ p ? vt(w) : tt(w);
171
176
  }, 1e3);
172
177
  return () => {
173
178
  clearTimeout(t);
174
179
  };
175
180
  }
176
181
  }, [
177
- v,
182
+ w,
178
183
  C,
179
- gt,
184
+ Et,
180
185
  p,
181
- k,
186
+ tt,
182
187
  i == null ? void 0 : i.validatedByTeacher
183
- ]), /* @__PURE__ */ b(
184
- oi,
188
+ ]), /* @__PURE__ */ I(
189
+ ni,
185
190
  {
186
191
  "data-response-id": e,
187
192
  className: `widget-${e}`,
188
- ref: I,
193
+ ref: x,
189
194
  $topOffset: ct,
190
- $flexDirection: u ? "row" : "column",
191
- $alignItems: u ? "flex-start" : "center",
192
- $hidden: A,
193
- $marginBottom: Gt,
195
+ $flexDirection: g ? "row" : "column",
196
+ $alignItems: g ? "flex-start" : "center",
197
+ $hidden: T,
198
+ $marginBottom: Yt,
194
199
  children: [
195
- u && /* @__PURE__ */ r(
196
- ni,
200
+ g && /* @__PURE__ */ r(
201
+ ci,
197
202
  {
198
203
  dangerouslySetInnerHTML: {
199
- __html: u
204
+ __html: g
200
205
  }
201
206
  }
202
207
  ),
203
- /* @__PURE__ */ b(
204
- ci,
208
+ /* @__PURE__ */ I(
209
+ ai,
205
210
  {
206
- ref: Q,
207
- $width: u ? "50%" : `${V}px`,
208
- $minHeight: W ? Math.max(W - 72, it ?? 0) : At,
209
- $isActive: w,
211
+ ref: z,
212
+ $width: g ? "50%" : `${V}px`,
213
+ $minHeight: W ? Math.max(W - 72, rt ?? 0) : At,
214
+ $isActive: H,
210
215
  $paperColor: R,
211
- $opacity: w ? 1 : 0.2,
216
+ $opacity: H ? 1 : 0.2,
217
+ $imageHue: at,
212
218
  children: [
213
- w && !!J && !!q && K && /* @__PURE__ */ r(
214
- jt,
219
+ H && !!k && !!q && J && /* @__PURE__ */ r(
220
+ Ft,
215
221
  {
216
- containerRef: Q,
217
- onPublish: J,
222
+ containerRef: z,
223
+ onPublish: k,
218
224
  onSubscribe: q,
219
225
  responseId: e
220
226
  }
221
227
  ),
222
- /* @__PURE__ */ b(
223
- ai,
228
+ /* @__PURE__ */ I(
229
+ mi,
224
230
  {
225
- className: Mt,
226
- $dropzoneMinWidth: _t.width,
227
- $dropzoneMinHeight: _t.height,
231
+ className: Ot,
232
+ $dropzoneMinWidth: wt.width,
233
+ $dropzoneMinHeight: wt.height,
228
234
  children: [
229
- Bt && !(x || m || s) && /* @__PURE__ */ r(
230
- Kt,
235
+ Bt && !(b || l || f) && /* @__PURE__ */ r(
236
+ Jt,
231
237
  {
232
- userType: o,
233
- question: n,
238
+ userType: n,
239
+ question: c,
234
240
  response: i,
235
241
  behavior: X,
236
- layout: P,
242
+ layout: j,
237
243
  paperColor: R,
238
- onMarkForReview: Wt,
239
- actionbarHeight: St,
240
- canResolveDoubt: pt,
241
- onResolveDoubt: Lt,
242
- worksheetCompleted: f
244
+ onMarkForReview: Ct,
245
+ actionbarHeight: Rt,
246
+ canResolveDoubt: Lt,
247
+ onResolveDoubt: bt,
248
+ worksheetCompleted: d
243
249
  }
244
250
  ),
245
- x && /* @__PURE__ */ r(mi, { src: Xt.LESSON_OVERVIEW_BANNER }),
246
- m && R && /* @__PURE__ */ r(qt, { paperColor: R }),
247
- s ? /* @__PURE__ */ b(Ut, { children: [
248
- l === "practice-basic" && /* @__PURE__ */ r(ii, {}),
249
- l === "practice-regular" && /* @__PURE__ */ r(ei, {}),
250
- l === "exit-ticket" && /* @__PURE__ */ r(ri, {}),
251
- (l == null ? void 0 : l.startsWith("advanced-")) && /* @__PURE__ */ r(ti, {})
251
+ b && /* @__PURE__ */ r(li, { src: Xt.LESSON_OVERVIEW_BANNER }),
252
+ l && R && /* @__PURE__ */ r(qt, { paperColor: R }),
253
+ f ? /* @__PURE__ */ I(Ut, { children: [
254
+ s === "practice-basic" && /* @__PURE__ */ r(ri, {}),
255
+ s === "practice-regular" && /* @__PURE__ */ r(oi, {}),
256
+ s === "exit-ticket" && /* @__PURE__ */ r(ei, {}),
257
+ (s == null ? void 0 : s.startsWith("advanced-")) && /* @__PURE__ */ r(ii, {})
252
258
  ] }) : void 0,
253
259
  /* @__PURE__ */ r(
254
- Jt,
260
+ kt,
255
261
  {
256
- signedRequest: Ht,
257
- appended: c,
258
- question: n,
262
+ signedRequest: St,
263
+ appended: a,
264
+ question: c,
259
265
  response: i == null ? void 0 : i.response,
260
- canRender: D || w,
266
+ canRender: P || H,
261
267
  learnosity: S,
262
- canForceAppend: o === "TEACHER",
263
- isConceptIntro: m,
268
+ canForceAppend: n === "TEACHER",
269
+ isConceptIntro: l,
264
270
  simState: i == null ? void 0 : i.simState,
265
- onMediaStateChange: Rt
271
+ onMediaStateChange: Wt,
272
+ imageHue: at,
273
+ isPuzzle: O === -2
266
274
  }
267
275
  ),
268
- !ut && K && G && Y && W !== void 0 && /* @__PURE__ */ r(li, { $canScribble: Z, children: /* @__PURE__ */ r(
269
- Pt,
276
+ !dt && J && Y && Z && W !== void 0 && /* @__PURE__ */ r(ui, { $canScribble: K, children: /* @__PURE__ */ r(
277
+ jt,
270
278
  {
271
- canRender: D,
272
- canScribble: Z && w,
273
- appended: c,
279
+ canRender: P,
280
+ canScribble: K && H,
281
+ appended: a,
274
282
  canvasId: e,
275
283
  width: V,
276
- height: Math.max(W, it ?? 0),
277
- onUpdateHeight: Qt,
278
- onPublish: G,
279
- onSubscribe: Y,
280
- userId: Ct,
281
- initialData: y == null ? void 0 : y[e],
282
- userType: o
284
+ height: Math.max(W, rt ?? 0),
285
+ onUpdateHeight: zt,
286
+ onPublish: Y,
287
+ onSubscribe: Z,
288
+ userId: pt,
289
+ initialData: B == null ? void 0 : B[e],
290
+ userType: n
283
291
  }
284
292
  ) }),
285
- !ut && U && U.length > 0 && /* @__PURE__ */ r(
286
- vt,
293
+ !dt && U && U.length > 0 && /* @__PURE__ */ r(
294
+ Ht,
287
295
  {
288
296
  $background: "BLUE_1",
289
297
  $gutterX: 1,
290
298
  $gapX: 0.5,
291
299
  $borderRadiusX: 0,
292
300
  $borderColor: "BLUE_2",
293
- children: U.map((t, a) => /* @__PURE__ */ r(
294
- hi,
301
+ children: U.map((t, o) => /* @__PURE__ */ r(
302
+ si,
295
303
  {
296
304
  dangerouslySetInnerHTML: {
297
- __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${a + 1}` : ""}:</span>&nbsp;${t}`
305
+ __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${o + 1}` : ""}:</span>&nbsp;${t}`
298
306
  }
299
307
  },
300
308
  t
301
309
  ))
302
310
  }
303
311
  ),
304
- Ot && /* @__PURE__ */ r(
305
- vt,
312
+ Qt && /* @__PURE__ */ r(
313
+ Ht,
306
314
  {
307
315
  $background: "YELLOW_1",
308
316
  $gutterX: 1,
@@ -310,7 +318,7 @@ const Ti = zt(
310
318
  $borderRadiusX: 0,
311
319
  $borderColor: "YELLOW_2",
312
320
  children: /* @__PURE__ */ r(
313
- si,
321
+ hi,
314
322
  {
315
323
  dangerouslySetInnerHTML: {
316
324
  __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${L}`
@@ -319,16 +327,16 @@ const Ti = zt(
319
327
  )
320
328
  }
321
329
  ),
322
- !!tt && /* @__PURE__ */ r(
323
- kt,
330
+ !!it && /* @__PURE__ */ r(
331
+ ti,
324
332
  {
325
333
  responses: It,
326
334
  response: i,
327
- nextQuestionId: v,
335
+ nextQuestionId: w,
328
336
  responseId: e,
329
337
  studentId: xt,
330
- userType: o,
331
- ...tt
338
+ userType: n,
339
+ ...it
332
340
  }
333
341
  )
334
342
  ]