@cuemath/leap 3.3.4-j1 → 3.3.4

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 (154) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -3
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +0 -1
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/auth/comps/pill-button/pill-button-styled.js +17 -17
  6. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -1
  7. package/dist/features/auth/comps/pill-button/pill-button.js +33 -35
  8. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
  9. package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -32
  10. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  11. package/dist/features/auth/comps/user-list/user-list.js +19 -20
  12. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  13. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +9 -9
  14. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -1
  15. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +29 -58
  16. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -1
  17. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +41 -78
  18. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
  19. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +35 -37
  20. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -1
  21. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +71 -76
  22. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
  23. package/dist/features/auth/signup/custom-input-field/custom-input-field.js +50 -55
  24. package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
  25. package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +25 -47
  26. package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -1
  27. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
  28. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +19 -20
  29. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
  30. package/dist/features/sheets/constants/sheet.js +12 -7
  31. package/dist/features/sheets/constants/sheet.js.map +1 -1
  32. package/dist/features/sheets/utils/is-v3-worksheet.js +17 -0
  33. package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
  34. package/dist/features/student-details/class-details/class-details-utils.js +6 -6
  35. package/dist/features/trial-session/comps/learning-plan/index.js +62 -88
  36. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  37. package/dist/features/trial-session/comps/session-report/report-information/report-card.js +16 -31
  38. package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -1
  39. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +13 -21
  40. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
  41. package/dist/features/trial-session/comps/session-report/report-information/report-information.js +94 -166
  42. package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
  43. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js +31 -46
  44. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -1
  45. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +42 -121
  46. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -1
  47. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +56 -174
  48. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  49. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  50. package/dist/features/ui/modals/modal.js +28 -30
  51. package/dist/features/ui/modals/modal.js.map +1 -1
  52. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +86 -90
  53. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
  54. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +147 -0
  55. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -0
  56. package/dist/features/worksheet/worksheet/worksheet-container.js +62 -42
  57. package/dist/features/worksheet/worksheet/worksheet-container.js.map +1 -1
  58. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +197 -199
  59. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  60. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +219 -293
  61. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  62. package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
  63. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  64. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  65. package/dist/features/worksheet/worksheet/worksheet.js +206 -215
  66. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  67. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +31 -32
  68. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
  69. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +30 -28
  70. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  71. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +68 -73
  72. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  73. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +30 -79
  74. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  75. package/dist/index.d.ts +45 -123
  76. package/dist/index.js +383 -395
  77. package/dist/index.js.map +1 -1
  78. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  79. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  80. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  81. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  82. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  83. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  84. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
  85. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  86. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  87. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  88. package/dist/static/{book-checked-green.0436b91e.svg → book-checked-green.c275dbd9.svg} +1 -1
  89. package/package.json +1 -1
  90. package/dist/constants/config.js +0 -5
  91. package/dist/constants/config.js.map +0 -1
  92. package/dist/features/parent-dashboard/cuemath-app-features/cuemath-app-features-constants.js +0 -25
  93. package/dist/features/parent-dashboard/cuemath-app-features/cuemath-app-features-constants.js.map +0 -1
  94. package/dist/features/parent-dashboard/cuemath-app-features/cuemath-app-features-styled.js +0 -15
  95. package/dist/features/parent-dashboard/cuemath-app-features/cuemath-app-features-styled.js.map +0 -1
  96. package/dist/features/parent-dashboard/cuemath-app-features/cuemath-app-features.js +0 -90
  97. package/dist/features/parent-dashboard/cuemath-app-features/cuemath-app-features.js.map +0 -1
  98. package/dist/features/parent-dashboard/math-practice/math-practice-constants.js +0 -19
  99. package/dist/features/parent-dashboard/math-practice/math-practice-constants.js.map +0 -1
  100. package/dist/features/parent-dashboard/math-practice/math-practice-styled.js +0 -32
  101. package/dist/features/parent-dashboard/math-practice/math-practice-styled.js.map +0 -1
  102. package/dist/features/parent-dashboard/math-practice/math-practice.js +0 -67
  103. package/dist/features/parent-dashboard/math-practice/math-practice.js.map +0 -1
  104. package/dist/features/parent-dashboard/parent-dashboard-faqs/parent-dashboard-faqs-constants.js +0 -42
  105. package/dist/features/parent-dashboard/parent-dashboard-faqs/parent-dashboard-faqs-constants.js.map +0 -1
  106. package/dist/features/parent-dashboard/parent-dashboard-faqs/parent-dashboard-faqs.js +0 -20
  107. package/dist/features/parent-dashboard/parent-dashboard-faqs/parent-dashboard-faqs.js.map +0 -1
  108. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js +0 -25
  109. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +0 -1
  110. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js +0 -43
  111. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +0 -1
  112. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +0 -49
  113. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +0 -1
  114. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +0 -11
  115. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +0 -1
  116. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +0 -19
  117. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +0 -1
  118. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js +0 -17
  119. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +0 -1
  120. package/dist/features/trial-session/comps/pla/session-status/session-status.js +0 -243
  121. package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +0 -1
  122. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +0 -52
  123. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +0 -1
  124. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +0 -52
  125. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +0 -1
  126. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js +0 -17
  127. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +0 -1
  128. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +0 -56
  129. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +0 -1
  130. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js +0 -5
  131. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
  132. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js +0 -17
  133. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
  134. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js +0 -5
  135. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
  136. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +0 -96
  137. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +0 -1
  138. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js +0 -12
  139. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js.map +0 -1
  140. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  141. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  142. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -10
  143. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +0 -1
  144. package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -9
  145. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +0 -1
  146. package/dist/node_modules/date-fns/differenceInSeconds.js +0 -11
  147. package/dist/node_modules/date-fns/differenceInSeconds.js.map +0 -1
  148. package/dist/node_modules/date-fns/fromUnixTime.js +0 -9
  149. package/dist/node_modules/date-fns/fromUnixTime.js.map +0 -1
  150. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  151. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
  152. package/dist/static/community-bulb-yellow-2.f89c30f9.svg +0 -1
  153. package/dist/static/learning-puzzle-bot.6fe93cf6.svg +0 -1
  154. package/dist/static/username-responsive.787b5515.json +0 -1
@@ -1,330 +1,328 @@
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 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(
1
+ import { jsxs as T, jsx as i, Fragment as Pt } from "react/jsx-runtime";
2
+ import { memo as Vt, useMemo as p, useState as A, useRef as X, useCallback as Xt, useEffect as H, 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 Rt from "../../../ui/layout/flex-view.js";
7
+ import Jt from "../../constants/events.js";
8
+ import { QUESTIONS_GAP as kt, LEARNOSITY_KEYBOARD_HEIGHT as wt } from "../constants.js";
9
+ import { getPaperColorByQuestion as qt, isConceptIntroWidget as te, scrollToQuestion as St } 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 de, LessonOverviewBanner as fe, CueCanvasWrapper as he, Hint as ge, Solution as Ee } from "./worksheet-question-styled.js";
19
+ const Me = Vt(
20
20
  ({
21
21
  userType: c,
22
- signedRequest: Wt,
22
+ signedRequest: Ct,
23
23
  worksheetCompleted: g,
24
24
  question: n,
25
25
  response: e,
26
- nextQuestionId: R,
26
+ nextQuestionId: b,
27
27
  isActive: v,
28
- isHidden: A,
29
- canRender: V,
30
- loggerRef: M,
28
+ isHidden: M,
29
+ canRender: j,
30
+ loggerRef: O,
31
31
  appended: a,
32
- maxQuestionWidth: X,
33
- behavior: j,
34
- layout: G,
35
- actionbarHeight: yt,
36
- learnosity: b,
32
+ maxQuestionWidth: G,
33
+ behavior: S,
34
+ layout: N,
35
+ actionbarHeight: Wt,
36
+ learnosity: C,
37
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
- initialStrokesData: O,
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
38
+ onMediaStateChange: yt,
39
+ onMarkForReview: Bt,
40
+ userId: xt,
41
+ onPublishStrokes: Z,
42
+ onReceiveStrokes: J,
43
+ isScribblingEnabled: k,
44
+ initialStrokesData: Q,
45
+ onPublishMouseMove: q,
46
+ onSubscribeMouseMove: tt,
47
+ setActiveQuestionId: et,
48
+ canResolveDoubt: It,
49
+ onResolveDoubt: Lt,
50
+ studentId: Tt,
51
+ responses: At,
52
+ subjectiveProps: it
55
53
  }) => {
56
- const C = p(
57
- () => Z === "paper" ? te(n) : void 0,
58
- [Z, n]
59
- ), [W, Ot] = T(), [nt, Nt] = T(), {
60
- validation: ct,
61
- review: N,
62
- maximumAttempts: Q,
63
- canExceedAttempts: at,
64
- teacherValidationEnabled: w,
65
- solutionHidden: st
66
- } = j, { minQuestionHeight: Qt, topOffset: mt, questionsScrollable: y, renderQuestionHeader: zt, imageHue: lt } = G, {
54
+ const { background: rt = "paper" } = N, W = p(
55
+ () => rt === "paper" ? qt(n) : void 0,
56
+ [rt, n]
57
+ ), [y, Mt] = A(), [ot, Ot] = A(), {
58
+ validation: nt,
59
+ review: z,
60
+ maximumAttempts: F,
61
+ canExceedAttempts: ct,
62
+ teacherValidationEnabled: R,
63
+ solutionHidden: at
64
+ } = S, { minQuestionHeight: Nt, topOffset: st, questionsScrollable: B, renderQuestionHeader: Qt, imageHue: lt } = N, {
67
65
  type: E,
68
66
  response_id: r,
69
67
  stimulus_review: _,
70
- item_type: f,
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(() => {
68
+ item_type: d,
69
+ instructor_stimulus: mt,
70
+ metadata: { hints: f, solution: x, widget_reference: ut },
71
+ item_reference: dt,
72
+ question_number: ft,
73
+ item_number: ht,
74
+ item_display_number: gt
75
+ } = n, zt = !!_, I = d === "overview", m = te(mt), h = mt === "SystemIntro", D = m || h, Et = e == null ? void 0 : e.responseEdited, Ft = p(() => {
78
76
  const t = [];
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(" ");
77
+ return Et && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), E === "hotspot" && t.push("correct-answers-hidden"), a && R && E === "clozetext" && (!m || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), I && t.push("lesson-overview"), m && t.push("concept-intro"), h && t.push("system-intro"), t.join(" ");
80
78
  }, [
81
79
  a,
82
- l,
83
- x,
84
- d,
80
+ m,
81
+ I,
82
+ h,
85
83
  E,
86
- _t,
87
- w,
84
+ Et,
85
+ R,
88
86
  c
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(() => {
87
+ ]), U = X({}), K = (e == null ? void 0 : e.hintsUsed) ?? 0, [_t] = A((e == null ? void 0 : e.validatedByTeacher) ?? !1), L = X(null), P = X(null), V = p(() => f == null ? void 0 : f.slice(0, K), [f, K]), $t = p(() => c === "TEACHER" || g ? !0 : !e || !e.response || e.responseEdited ? !1 : nt, [e, c, nt, g]), pt = p(() => {
90
88
  if (c === "TEACHER") return !0;
91
- if (N) {
89
+ if (z) {
92
90
  const { attemptsHistory: t } = e ?? {};
93
- return ((t == null ? void 0 : t.length) ?? 0) >= Q && !at;
91
+ return ((t == null ? void 0 : t.length) ?? 0) >= F && !ct;
94
92
  }
95
93
  return !1;
96
- }, [at, Q, e, N, c]), Ut = p(
97
- () => B && g && !st,
98
- [st, B, g]
99
- ), [Rt, Kt] = T({
94
+ }, [ct, F, e, z, c]), Dt = p(
95
+ () => x && g && !at,
96
+ [at, x, g]
97
+ ), [Ht, Ut] = A({
100
98
  width: 0,
101
99
  height: 0
102
- }), Pt = jt((t) => {
103
- Nt(t);
100
+ }), Kt = Xt((t) => {
101
+ Ot(t);
104
102
  }, []);
105
103
  return H(() => {
106
- I.current && Y.observe(I.current);
104
+ L.current && Y.observe(L.current);
107
105
  }, [Y]), H(() => {
108
106
  if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
109
107
  const t = document.querySelectorAll(
110
108
  `.widget-${n.response_id} .lrn_draggable`
111
109
  );
112
110
  let s = 0, o = 0;
113
- t.forEach((m) => {
114
- s = Math.max(s, m.clientWidth + 33), o = Math.max(o, m.clientHeight + 1);
115
- }), Kt({
111
+ t.forEach((l) => {
112
+ s = Math.max(s, l.clientWidth + 33), o = Math.max(o, l.clientHeight + 1);
113
+ }), Ut({
116
114
  width: n.type !== "association" ? s : 0,
117
115
  height: o
118
116
  });
119
117
  }
120
118
  }, [a, n.response_id, n.type]), H(() => {
121
- if (a && pt) {
122
- const t = b.question(r);
119
+ if (a && $t) {
120
+ const t = C.question(r);
123
121
  t && t.validate({
124
- showCorrectAnswers: Ht
122
+ showCorrectAnswers: pt
125
123
  });
126
124
  }
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) {
125
+ }, [a, C, r, z, pt, c, $t]), H(() => {
126
+ const t = P.current;
127
+ if (a && t && O.current && U.current[r] === void 0 && !m && !h) {
130
128
  const s = t.clientWidth, o = t.querySelectorAll("*");
131
- for (let m = 0; m < o.length; m++) {
132
- const u = o[m];
129
+ for (let l = 0; l < o.length; l++) {
130
+ const u = o[l];
133
131
  if (u != null && u.closest(".resize-sensor"))
134
132
  continue;
135
133
  if (((u == null ? void 0 : u.clientWidth) ?? 0) > s) {
136
- F.current[r] = !0, M.current(kt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
- item_reference: ht,
138
- widget_reference: ft,
134
+ U.current[r] = !0, O.current(Jt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
135
+ item_reference: dt,
136
+ widget_reference: ut,
139
137
  question_type: E,
140
- question_number: dt,
138
+ question_number: ft,
141
139
  responseId: r,
142
- item_number: gt,
143
- item_display_number: Et
140
+ item_number: ht,
141
+ item_display_number: gt
144
142
  });
145
143
  break;
146
144
  }
147
145
  }
148
- F.current[r] = !1;
146
+ U.current[r] = !1;
149
147
  }
150
148
  }, [
151
149
  a,
152
- l,
153
- d,
154
- Et,
150
+ m,
151
+ h,
155
152
  gt,
156
153
  ht,
157
- M,
158
- E,
159
154
  dt,
155
+ O,
156
+ E,
157
+ ft,
160
158
  r,
161
- ft
159
+ ut
162
160
  ]), H(() => {
163
- const t = I.current, s = (o) => {
164
- const m = o.querySelector(".lrn_response_wrapper");
165
- if (z || !m)
161
+ const t = L.current, s = (o) => {
162
+ const l = o.querySelector(".lrn_response_wrapper");
163
+ if (D || !l)
166
164
  return 0;
167
- const u = o.getBoundingClientRect().bottom, S = m.getBoundingClientRect().bottom, $ = Math.abs(u - S);
168
- return $ < bt ? bt - $ : 0;
165
+ const u = o.getBoundingClientRect().bottom, w = l.getBoundingClientRect().bottom, $ = Math.abs(u - w);
166
+ return $ < wt ? wt - $ : 0;
169
167
  };
170
- a && t && Ot((o) => {
171
- var wt;
172
- const S = ((wt = n.ui_style) == null ? void 0 : wt.type) === "floating-keyboard" && !(w && E === "clozetext"), $ = t.clientHeight;
168
+ a && t && Mt((o) => {
169
+ var vt;
170
+ const w = ((vt = n.ui_style) == null ? void 0 : vt.type) === "floating-keyboard" && !(R && E === "clozetext"), $ = t.clientHeight;
173
171
  if ($ === 0)
174
172
  return o;
175
173
  if (!o)
176
174
  return Math.ceil(
177
- $ + (S ? s(t) : 0)
175
+ $ + (w ? s(t) : 0)
178
176
  );
179
- const vt = Math.ceil(
180
- $ + (S ? s(t) : 0)
177
+ const bt = Math.ceil(
178
+ $ + (w ? s(t) : 0)
181
179
  );
182
- return Math.abs(vt - o) > 4 ? vt : o;
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)) {
180
+ return Math.abs(bt - o) > 4 ? bt : o;
181
+ }), (K || zt || x && g) && C.renderMath("mathjax");
182
+ }), jt(() => {
183
+ !B && !M && St(r);
184
+ }, [M, B, r, st]), H(() => {
185
+ if (R && b && !_t && (e != null && e.validatedByTeacher)) {
188
186
  const t = setTimeout(() => {
189
- y ? Ct(R) : rt(R);
187
+ B ? St(b) : et(b);
190
188
  }, 1e3);
191
189
  return () => {
192
190
  clearTimeout(t);
193
191
  };
194
192
  }
195
193
  }, [
194
+ b,
196
195
  R,
197
- w,
198
- $t,
199
- y,
200
- rt,
196
+ _t,
197
+ B,
198
+ et,
201
199
  e == null ? void 0 : e.validatedByTeacher
202
- ]), /* @__PURE__ */ L(
200
+ ]), /* @__PURE__ */ T(
203
201
  le,
204
202
  {
205
203
  "data-response-id": r,
206
204
  className: `widget-${r}`,
207
- ref: I,
208
- $topOffset: mt,
205
+ ref: L,
206
+ $topOffset: st,
209
207
  $flexDirection: _ ? "row" : "column",
210
208
  $alignItems: _ ? "flex-start" : "center",
211
- $hidden: A,
212
- $marginBottom: qt,
209
+ $hidden: M,
210
+ $marginBottom: kt,
213
211
  children: [
214
212
  _ && /* @__PURE__ */ i(
215
- ue,
213
+ me,
216
214
  {
217
215
  dangerouslySetInnerHTML: {
218
216
  __html: _
219
217
  }
220
218
  }
221
219
  ),
222
- /* @__PURE__ */ L(
223
- fe,
220
+ /* @__PURE__ */ T(
221
+ ue,
224
222
  {
225
- ref: U,
226
- $width: _ ? "50%" : `${X}px`,
227
- $minHeight: W ? Math.max(W - 72, nt ?? 0) : Qt,
223
+ ref: P,
224
+ $width: _ ? "50%" : `${G}px`,
225
+ $minHeight: y ? Math.max(y - 72, ot ?? 0) : Nt,
228
226
  $isActive: v,
229
- $paperColor: C,
227
+ $paperColor: W,
230
228
  $opacity: v ? 1 : 0.2,
231
229
  $imageHue: lt,
232
230
  children: [
233
- v && !!et && !!it && tt && /* @__PURE__ */ i(
234
- Jt,
231
+ v && !!q && !!tt && !!S.canvasEnabled && /* @__PURE__ */ i(
232
+ Zt,
235
233
  {
236
- containerRef: U,
237
- onPublish: et,
238
- onSubscribe: it,
234
+ containerRef: P,
235
+ onPublish: q,
236
+ onSubscribe: tt,
239
237
  responseId: r
240
238
  }
241
239
  ),
242
- /* @__PURE__ */ L(
243
- he,
240
+ /* @__PURE__ */ T(
241
+ de,
244
242
  {
245
- className: Dt,
246
- $dropzoneMinWidth: Rt.width,
247
- $dropzoneMinHeight: Rt.height,
243
+ className: Ft,
244
+ $dropzoneMinWidth: Ht.width,
245
+ $dropzoneMinHeight: Ht.height,
248
246
  children: [
249
- zt && !(x || l || d) && /* @__PURE__ */ i(
250
- ie,
247
+ Qt && !(I || m || h) && /* @__PURE__ */ i(
248
+ ee,
251
249
  {
252
250
  userType: c,
253
251
  question: n,
254
252
  response: e,
255
- behavior: j,
256
- layout: G,
257
- paperColor: C,
258
- onMarkForReview: xt,
259
- actionbarHeight: yt,
260
- canResolveDoubt: Lt,
261
- onResolveDoubt: Tt,
253
+ behavior: S,
254
+ layout: N,
255
+ paperColor: W,
256
+ onMarkForReview: Bt,
257
+ actionbarHeight: Wt,
258
+ canResolveDoubt: It,
259
+ onResolveDoubt: Lt,
262
260
  worksheetCompleted: g
263
261
  }
264
262
  ),
265
- x && /* @__PURE__ */ i(de, { src: Yt.LESSON_OVERVIEW_BANNER }),
266
- l && C && /* @__PURE__ */ i(oe, { paperColor: C }),
267
- d ? /* @__PURE__ */ L(Vt, { children: [
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, {})
263
+ I && /* @__PURE__ */ i(fe, { src: Gt.LESSON_OVERVIEW_BANNER }),
264
+ m && W && /* @__PURE__ */ i(re, { paperColor: W }),
265
+ h ? /* @__PURE__ */ T(Pt, { children: [
266
+ d === "practice-basic" && /* @__PURE__ */ i(ce, {}),
267
+ d === "practice-regular" && /* @__PURE__ */ i(se, {}),
268
+ d === "exit-ticket" && /* @__PURE__ */ i(ae, {}),
269
+ (d == null ? void 0 : d.startsWith("advanced-")) && /* @__PURE__ */ i(ne, {})
272
270
  ] }) : void 0,
273
271
  /* @__PURE__ */ i(
274
- re,
272
+ ie,
275
273
  {
276
- signedRequest: Wt,
274
+ signedRequest: Ct,
277
275
  appended: a,
278
276
  question: n,
279
277
  response: e == null ? void 0 : e.response,
280
- canRender: V || v,
281
- learnosity: b,
278
+ canRender: j || v,
279
+ learnosity: C,
282
280
  canForceAppend: c === "TEACHER",
283
- isConceptIntro: l,
281
+ isConceptIntro: m,
284
282
  simState: e == null ? void 0 : e.simState,
285
- onMediaStateChange: Bt,
283
+ onMediaStateChange: yt,
286
284
  imageHue: lt,
287
- isPuzzle: Q === -2
285
+ isPuzzle: F === -2
288
286
  }
289
287
  ),
290
- !z && tt && J && k && W !== void 0 && /* @__PURE__ */ i(ge, { $canScribble: q, children: /* @__PURE__ */ i(
291
- Zt,
288
+ !D && !!S.canvasEnabled && Z && J && y !== void 0 && /* @__PURE__ */ i(he, { $canScribble: k, children: /* @__PURE__ */ i(
289
+ Yt,
292
290
  {
293
- canRender: V,
294
- canScribble: q && v,
291
+ canRender: j,
292
+ canScribble: k && v,
295
293
  appended: a,
296
294
  canvasId: r,
297
- width: X,
298
- height: Math.max(W, nt ?? 0),
299
- onUpdateHeight: Pt,
300
- onPublish: J,
301
- onSubscribe: k,
302
- userId: It,
303
- initialData: O == null ? void 0 : O[r],
295
+ width: G,
296
+ height: Math.max(y, ot ?? 0),
297
+ onUpdateHeight: Kt,
298
+ onPublish: Z,
299
+ onSubscribe: J,
300
+ userId: xt,
301
+ initialData: Q == null ? void 0 : Q[r],
304
302
  userType: c
305
303
  }
306
304
  ) }),
307
- !z && K && K.length > 0 && /* @__PURE__ */ i(
308
- St,
305
+ !D && V && V.length > 0 && /* @__PURE__ */ i(
306
+ Rt,
309
307
  {
310
308
  $background: "BLUE_1",
311
309
  $gutterX: 1,
312
310
  $gapX: 0.5,
313
311
  $borderRadiusX: 0,
314
312
  $borderColor: "BLUE_2",
315
- children: K.map((t, s) => /* @__PURE__ */ i(
316
- Ee,
313
+ children: V.map((t, s) => /* @__PURE__ */ i(
314
+ ge,
317
315
  {
318
316
  dangerouslySetInnerHTML: {
319
- __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span>&nbsp;${t}`
317
+ __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((f == null ? void 0 : f.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span>&nbsp;${t}`
320
318
  }
321
319
  },
322
320
  t
323
321
  ))
324
322
  }
325
323
  ),
326
- Ut && /* @__PURE__ */ i(
327
- St,
324
+ Dt && /* @__PURE__ */ i(
325
+ Rt,
328
326
  {
329
327
  $background: "YELLOW_1",
330
328
  $gutterX: 1,
@@ -332,25 +330,25 @@ const Oe = Xt(
332
330
  $borderRadiusX: 0,
333
331
  $borderColor: "YELLOW_2",
334
332
  children: /* @__PURE__ */ i(
335
- _e,
333
+ Ee,
336
334
  {
337
335
  dangerouslySetInnerHTML: {
338
- __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${B}`
336
+ __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${x}`
339
337
  }
340
338
  }
341
339
  )
342
340
  }
343
341
  ),
344
- !!ot && /* @__PURE__ */ i(
345
- ne,
342
+ !!it && /* @__PURE__ */ i(
343
+ oe,
346
344
  {
347
- responses: Mt,
345
+ responses: At,
348
346
  response: e,
349
- nextQuestionId: R,
347
+ nextQuestionId: b,
350
348
  responseId: r,
351
- studentId: At,
349
+ studentId: Tt,
352
350
  userType: c,
353
- ...ot
351
+ ...it
354
352
  }
355
353
  )
356
354
  ]
@@ -365,6 +363,6 @@ const Oe = Xt(
365
363
  }
366
364
  );
367
365
  export {
368
- Oe as default
366
+ Me as default
369
367
  };
370
368
  //# sourceMappingURL=worksheet-question.js.map