@cuemath/leap 3.4.9-m → 3.4.9

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 (31) hide show
  1. package/dist/features/journey/use-journey/constants.js +7 -5
  2. package/dist/features/journey/use-journey/constants.js.map +1 -1
  3. package/dist/features/journey/use-journey/journey-context-provider.js +84 -72
  4. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  5. package/dist/features/stickers/hooks/use-handle-sticker-send.js +44 -0
  6. package/dist/features/stickers/hooks/use-handle-sticker-send.js.map +1 -0
  7. package/dist/features/stickers/hooks/use-stickers-error-logger.js +17 -0
  8. package/dist/features/stickers/hooks/use-stickers-error-logger.js.map +1 -0
  9. package/dist/features/stickers/{sticker-selector/hooks → hooks}/use-stickers-journey/use-stickers-journey.js +7 -7
  10. package/dist/features/stickers/hooks/use-stickers-journey/use-stickers-journey.js.map +1 -0
  11. package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js +27 -26
  12. package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js.map +1 -1
  13. package/dist/features/stickers/sticker-selector/sticker-selector.js +67 -66
  14. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
  15. package/dist/features/stickers/stickers-analytics-events.js +8 -0
  16. package/dist/features/stickers/stickers-analytics-events.js.map +1 -0
  17. package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js +52 -119
  18. package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js.map +1 -1
  19. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +17 -21
  20. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -1
  21. package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js +27 -33
  22. package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js.map +1 -1
  23. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  24. package/dist/features/worksheet/worksheet/worksheet.js +247 -251
  25. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  26. package/dist/index.d.ts +15 -15
  27. package/dist/index.js +2 -2
  28. package/package.json +1 -1
  29. package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +0 -33
  30. package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +0 -1
  31. package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +0 -1
@@ -1,148 +1,146 @@
1
- import { jsxs as W, Fragment as ct, jsx as i } from "react/jsx-runtime";
2
- import { memo as dt, forwardRef as lt, useMemo as J, useState as S, useCallback as C, useEffect as v, useLayoutEffect as mt } from "react";
3
- import ut from "../../../assets/line-icons/icons/check2.js";
4
- import ht from "../../../assets/line-icons/icons/info2.js";
5
- import ft from "../../../helpers/get-device-details.js";
6
- import pt from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
7
- import me from "../../ui/layout/flex-view.js";
8
- import gt from "../../ui/text/text.js";
9
- import bt from "../user-pointer-pin/user-pin.js";
10
- import { WORKSHEET_NUDGE_BANNER_HEIGHT as ue, TOP_NAVIGATION_HEIGHT as It, DESMOS_CALC_POSITION as St } from "./constants.js";
11
- import Ct from "./hooks/use-create-imperative-handle.js";
12
- import kt from "./hooks/use-get-active-question-id.js";
13
- import $t from "./hooks/use-time-on-questions.js";
14
- import Tt from "./question-tips.js";
15
- import vt from "./worksheet-action-bar/worksheet-action-bar.js";
16
- import Et from "./worksheet-blocker/worksheet-blocker.js";
17
- import { getWorksheetDimensions as wt, getQuestionsFromItems as Nt, getInitialResponses as Bt, getLastUnlockedQuestionIndex as he, getInitialQuestionId as At, getQuestionMetadata as fe, scrollToQuestion as R, getRenderableQuestions as yt, getWorksheetNudgeBannerInfo as Wt } from "./worksheet-helpers.js";
18
- import _t from "./worksheet-navigation/worksheet-navigation.js";
19
- import Ot from "./worksheet-question/worksheet-question.js";
20
- import Dt from "./worksheet-sidebar/navigator.js";
21
- import Vt from "./worksheet-sidebar/sidebar.js";
22
- import { NudgeBannerWrapper as Ht, NudgeBannerIcon as pe, WorksheetContainer as Mt, NavigationContainer as xt, NavigationWrapper as Rt, BlockerWrapper as Pt, DesmosCalcWrapper as Qt, ActionbarContainer as Gt, ActionbarWrapper as Ft, StudentWorksheetSideBar as jt, QuestionsWrapper as qt } from "./worksheet-styled.js";
23
- import Lt from "./worksheet-summary/worksheet-summary.js";
24
- const Xt = (ge, be) => {
25
- var ce, de;
1
+ import { jsxs as y, Fragment as rt, jsx as i } from "react/jsx-runtime";
2
+ import { memo as st, forwardRef as at, useMemo as z, useState as C, useCallback as S, useEffect as T, useLayoutEffect as ct } from "react";
3
+ import dt from "../../../assets/line-icons/icons/check2.js";
4
+ import lt from "../../../assets/line-icons/icons/info2.js";
5
+ import mt from "../../../helpers/get-device-details.js";
6
+ import ut from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
7
+ import ce from "../../ui/layout/flex-view.js";
8
+ import ht from "../../ui/text/text.js";
9
+ import ft from "../user-pointer-pin/user-pin.js";
10
+ import { WORKSHEET_NUDGE_BANNER_HEIGHT as de, TOP_NAVIGATION_HEIGHT as pt, DESMOS_CALC_POSITION as gt } from "./constants.js";
11
+ import bt from "./hooks/use-create-imperative-handle.js";
12
+ import It from "./hooks/use-get-active-question-id.js";
13
+ import Ct from "./hooks/use-time-on-questions.js";
14
+ import St from "./question-tips.js";
15
+ import kt from "./worksheet-action-bar/worksheet-action-bar.js";
16
+ import $t from "./worksheet-blocker/worksheet-blocker.js";
17
+ import { getWorksheetDimensions as Tt, getQuestionsFromItems as vt, getInitialResponses as Et, getLastUnlockedQuestionIndex as le, getInitialQuestionId as wt, getQuestionMetadata as me, scrollToQuestion as x, getRenderableQuestions as Nt, getWorksheetNudgeBannerInfo as Bt } from "./worksheet-helpers.js";
18
+ import At from "./worksheet-navigation/worksheet-navigation.js";
19
+ import yt from "./worksheet-question/worksheet-question.js";
20
+ import Wt from "./worksheet-sidebar/navigator.js";
21
+ import _t from "./worksheet-sidebar/sidebar.js";
22
+ import { NudgeBannerWrapper as Ot, NudgeBannerIcon as ue, WorksheetContainer as Dt, NavigationContainer as Vt, NavigationWrapper as Ht, BlockerWrapper as Mt, DesmosCalcWrapper as xt, ActionbarContainer as Rt, ActionbarWrapper as Pt, StudentWorksheetSideBar as Qt, QuestionsWrapper as Gt } from "./worksheet-styled.js";
23
+ import Ft from "./worksheet-summary/worksheet-summary.js";
24
+ const jt = (he, fe) => {
26
25
  const {
27
26
  userType: r,
28
- studentName: Ie = "Student",
29
- questionsSignedRequest: Se,
30
- worksheetName: U,
31
- initialResponseId: Ce,
32
- initialItemIndex: ke,
27
+ studentName: pe = "Student",
28
+ questionsSignedRequest: ge,
29
+ worksheetName: J,
30
+ initialResponseId: be,
31
+ initialItemIndex: Ie,
33
32
  // learnosityActivityRef,
34
- learnosityItems: P,
35
- learnosityResponses: $e,
33
+ learnosityItems: R,
34
+ learnosityResponses: Ce,
36
35
  layout: k,
37
36
  behavior: a,
38
- updatedResponses: Q,
39
- showNudgeBanner: Te,
40
- markedAsCompleted: Y,
37
+ updatedResponses: P,
38
+ showNudgeBanner: Se,
39
+ markedAsCompleted: U,
41
40
  onResponseChange: f,
42
- onBulkResponsesChange: ve,
43
- onResponsesChange: G,
44
- onMediaStateChange: F,
45
- onTeacherValidation: Z,
46
- onOptionalItemAssignment: Ee,
47
- onOptionalItemSkip: we,
48
- onExitTicketStart: _,
49
- onExitTicketSubmit: O,
50
- onSubmit: Ne,
41
+ onBulkResponsesChange: ke,
42
+ onResponsesChange: Q,
43
+ onMediaStateChange: G,
44
+ onTeacherValidation: Y,
45
+ onOptionalItemAssignment: $e,
46
+ onOptionalItemSkip: Te,
47
+ onExitTicketStart: W,
48
+ onExitTicketSubmit: _,
49
+ onSubmit: ve,
51
50
  learnosity: p,
52
- appendedQuestionIds: ee,
53
- worksheetCompleted: Be,
54
- userId: Ae,
55
- onPublishStrokes: ye,
56
- onReceiveStrokes: We,
57
- initialStrokesData: _e,
58
- onHelp: Oe,
59
- onPublishMouseMove: De,
60
- onSubscribeMouseMove: Ve,
61
- onActiveQuestionChange: j,
62
- openQuestionFeedbackModal: He,
63
- summaryDescription: Me,
64
- canSubmitWorksheet: xe,
65
- loggerRef: q,
66
- canResolveDoubt: Re,
67
- onResolveDoubt: Pe,
68
- onSkip: Qe,
69
- studentId: Ge,
70
- subjectiveProps: Fe,
71
- canShowActionBar: je = !0,
72
- actionBarRightElement: qe,
73
- featuresConfig: $
74
- } = ge, { initialQuestion: Le, navigationMode: m, teacherValidationEnabled: Xe, maximumAttempts: te } = a, {
75
- containerStyle: D,
76
- containerWidth: Ke,
77
- minQuestionHeight: ie,
78
- minSummaryHeight: ze,
79
- questionsScrollable: V,
80
- navigationBar: Je,
81
- topOffset: H,
82
- renderSideBar: Ue,
83
- showUserPointer: Ye = !0,
84
- questionPadding: Ze
85
- } = k, { actionbarHeight: g, maxQuestionWidth: L, questionsContainerWidth: X } = J(
86
- () => wt(P, k),
87
- [k, P]
88
- ), [t] = S(
89
- () => Nt(P, {
90
- sectioned: Xe && m !== "ADAPTIVE" && m !== "CURRENT",
51
+ appendedQuestionIds: Z,
52
+ worksheetCompleted: Ee,
53
+ userId: we,
54
+ onPublishStrokes: Ne,
55
+ onReceiveStrokes: Be,
56
+ initialStrokesData: Ae,
57
+ onHelp: ye,
58
+ onPublishMouseMove: We,
59
+ onSubscribeMouseMove: _e,
60
+ onActiveQuestionChange: F,
61
+ openQuestionFeedbackModal: Oe,
62
+ summaryDescription: De,
63
+ canSubmitWorksheet: Ve,
64
+ loggerRef: j,
65
+ canResolveDoubt: He,
66
+ onResolveDoubt: Me,
67
+ onSkip: xe,
68
+ studentId: Re,
69
+ subjectiveProps: Pe,
70
+ canShowActionBar: Qe = !0,
71
+ actionBarRightElement: Ge
72
+ } = he, { initialQuestion: Fe, navigationMode: m, teacherValidationEnabled: je, maximumAttempts: ee } = a, {
73
+ containerStyle: O,
74
+ containerWidth: qe,
75
+ minQuestionHeight: te,
76
+ minSummaryHeight: Le,
77
+ questionsScrollable: D,
78
+ navigationBar: Xe,
79
+ topOffset: V,
80
+ renderSideBar: Ke,
81
+ showUserPointer: ze = !0,
82
+ questionPadding: Je
83
+ } = k, { actionbarHeight: g, maxQuestionWidth: q, questionsContainerWidth: L } = z(
84
+ () => Tt(R, k),
85
+ [k, R]
86
+ ), [t] = C(
87
+ () => vt(R, {
88
+ sectioned: je && m !== "ADAPTIVE" && m !== "CURRENT",
91
89
  adaptive: m === "ADAPTIVE"
92
90
  })
93
- ), [c, E] = S(
94
- () => $e ?? Bt(t)
95
- ), [ne, et] = S(!1), u = J(
96
- () => m !== "OPEN" ? he({
91
+ ), [c, v] = C(
92
+ () => Ce ?? Et(t)
93
+ ), [ie, Ue] = C(!1), u = z(
94
+ () => m !== "OPEN" ? le({
97
95
  questions: t,
98
96
  responses: c,
99
97
  behavior: a,
100
98
  userType: r
101
99
  }) : t.length - 1,
102
100
  [a, m, t, c, r]
103
- ), d = t[u], n = c[(d == null ? void 0 : d.response_id) ?? ""], { bannerBackgroundColor: tt, label: it } = Wt(r, !!Y), [w] = S(
104
- () => At({
101
+ ), d = t[u], n = c[(d == null ? void 0 : d.response_id) ?? ""], { bannerBackgroundColor: Ye, label: Ze } = Bt(r, !!U), [E] = C(
102
+ () => wt({
105
103
  questions: t,
106
- initialQuestion: Le,
107
- lastUnlockedQuestionIndex: he({
104
+ initialQuestion: Fe,
105
+ lastUnlockedQuestionIndex: le({
108
106
  questions: t,
109
107
  responses: c,
110
108
  behavior: a,
111
109
  userType: r
112
110
  }),
113
- initialResponseId: Ce,
114
- initialItemIndex: ke
111
+ initialResponseId: be,
112
+ initialItemIndex: Ie
115
113
  })
116
- ), { activeQuestionId: N, setActiveQuestionId: M, intersectionObserver: K } = kt(w), l = J(
117
- () => t.findIndex((e) => e.response_id === N),
118
- [N, t]
119
- ), [h, z] = S(!1), [oe, B] = S(), [re, se] = S(!1), ae = $t(a, c, N), nt = C(
114
+ ), { activeQuestionId: w, setActiveQuestionId: H, intersectionObserver: X } = It(E), l = z(
115
+ () => t.findIndex((e) => e.response_id === w),
116
+ [w, t]
117
+ ), [h, K] = C(!1), [ne, N] = C(), [oe, re] = C(!1), se = Ct(a, c, w), et = S(
120
118
  (e, s, o) => {
121
119
  const b = s === "SIMULATION" ? "simState" : void 0;
122
- b && (f ? E((T) => {
123
- const I = e.response_id, y = fe(t, I);
124
- if (!y) return T;
125
- const le = {
126
- ...y,
127
- ...T[I],
120
+ b && (f ? v(($) => {
121
+ const I = e.response_id, A = me(t, I);
122
+ if (!A) return $;
123
+ const ae = {
124
+ ...A,
125
+ ...$[I],
128
126
  [b]: o
129
127
  };
130
128
  return f == null || f({
131
129
  responseId: I,
132
- response: le,
130
+ response: ae,
133
131
  isNewAttempt: !1,
134
132
  question: e
135
133
  }), {
136
- ...T,
137
- [I]: le
134
+ ...$,
135
+ [I]: ae
138
136
  };
139
- }) : F && F(e, s, o));
137
+ }) : G && G(e, s, o));
140
138
  },
141
- [F, f, t]
142
- ), ot = C(
139
+ [G, f, t]
140
+ ), tt = S(
143
141
  (e, s) => {
144
- E((o) => {
145
- const b = fe(t, e);
142
+ v((o) => {
143
+ const b = me(t, e);
146
144
  return b ? {
147
145
  ...o,
148
146
  [e]: {
@@ -154,98 +152,98 @@ const Xt = (ge, be) => {
154
152
  });
155
153
  },
156
154
  [t]
157
- ), A = C(() => {
158
- B((e) => {
155
+ ), B = S(() => {
156
+ N((e) => {
159
157
  var s;
160
158
  if (e) {
161
159
  const o = (s = t[u]) == null ? void 0 : s.response_id;
162
160
  o && setTimeout(() => {
163
- R(o);
161
+ x(o);
164
162
  }, 50);
165
163
  }
166
164
  });
167
- }, [u, t]), x = C(
165
+ }, [u, t]), M = S(
168
166
  (e) => {
169
- z(!1), V ? requestAnimationFrame(() => R(e)) : M(e);
167
+ K(!1), D ? requestAnimationFrame(() => x(e)) : H(e);
170
168
  },
171
- [V, M]
172
- ), rt = C(() => {
173
- se(!1);
174
- }, []), st = C(() => {
175
- se(!0);
176
- }, []), at = C(() => {
177
- z(!0);
169
+ [D, H]
170
+ ), it = S(() => {
171
+ re(!1);
172
+ }, []), nt = S(() => {
173
+ re(!0);
174
+ }, []), ot = S(() => {
175
+ K(!0);
178
176
  }, []);
179
- return v(() => {
177
+ return T(() => {
180
178
  const e = t[l];
181
- e && j && j(e);
182
- }, [j, t, l]), Ct(be, {
179
+ e && F && F(e);
180
+ }, [F, t, l]), bt(fe, {
183
181
  behavior: a,
184
182
  questions: t,
185
- setResponses: E,
183
+ setResponses: v,
186
184
  onResponseChange: f,
187
- onBulkResponsesChange: ve,
188
- getTimeSpentOnQuestion: ae
189
- }), v(() => () => {
190
- K.disconnect();
191
- }, [K]), v(() => {
192
- G && c && G(c);
193
- }, [G, c]), v(() => {
194
- Q && E(Q);
195
- }, [Q]), mt(() => {
185
+ onBulkResponsesChange: ke,
186
+ getTimeSpentOnQuestion: se
187
+ }), T(() => () => {
188
+ X.disconnect();
189
+ }, [X]), T(() => {
190
+ Q && c && Q(c);
191
+ }, [Q, c]), T(() => {
192
+ P && v(P);
193
+ }, [P]), ct(() => {
196
194
  let e;
197
- return p && w && (ft().browser_name === "Safari" ? e = setTimeout(() => {
198
- R(w);
199
- }, 400) : R(w)), () => {
195
+ return p && E && (mt().browser_name === "Safari" ? e = setTimeout(() => {
196
+ x(E);
197
+ }, 400) : x(E)), () => {
200
198
  clearTimeout(e);
201
199
  };
202
- }, [p, w, H]), v(() => {
200
+ }, [p, E, V]), T(() => {
203
201
  if (a.teacherValidationEnabled && d) {
204
202
  const { item_type: e, instructor_stimulus: s, is_optional: o } = d;
205
- r === "TEACHER" && (e === "exit-ticket" && s !== "SystemIntro" ? n != null && n.submittedByStudent && !(n != null && n.validatedByTeacher) ? B("exit-ticket-review-available") : n != null && n.validatedByTeacher ? A() : B("exit-ticket-teacher-intervention") : o ? n != null && n.assignStatus ? A() : B("optional-items-assignment") : o || A());
203
+ r === "TEACHER" && (e === "exit-ticket" && s !== "SystemIntro" ? n != null && n.submittedByStudent && !(n != null && n.validatedByTeacher) ? N("exit-ticket-review-available") : n != null && n.validatedByTeacher ? B() : N("exit-ticket-teacher-intervention") : o ? n != null && n.assignStatus ? B() : N("optional-items-assignment") : o || B());
206
204
  }
207
205
  }, [
208
206
  a.teacherValidationEnabled,
209
- A,
207
+ B,
210
208
  d,
211
209
  n,
212
210
  r
213
- ]), v(() => {
211
+ ]), T(() => {
214
212
  if (a.teacherValidationEnabled && d) {
215
213
  const { item_type: e, instructor_stimulus: s } = d;
216
- r === "STUDENT" && e === "exit-ticket" && s !== "SystemIntro" && (n != null && n.submittedByStudent ? O == null || O() : _ == null || _());
214
+ r === "STUDENT" && e === "exit-ticket" && s !== "SystemIntro" && (n != null && n.submittedByStudent ? _ == null || _() : W == null || W());
217
215
  }
218
216
  }, [
219
217
  a.teacherValidationEnabled,
220
218
  d,
221
219
  n == null ? void 0 : n.submittedByStudent,
220
+ W,
222
221
  _,
223
- O,
224
222
  r
225
- ]), p ? /* @__PURE__ */ W(ct, { children: [
226
- Te && /* @__PURE__ */ W(
227
- Ht,
223
+ ]), p ? /* @__PURE__ */ y(rt, { children: [
224
+ Se && /* @__PURE__ */ y(
225
+ Ot,
228
226
  {
229
227
  $flexDirection: "row",
230
228
  $justifyContent: "center",
231
229
  $alignItems: "center",
232
230
  $width: "100%",
233
231
  $heightX: 1.75,
234
- $height: ue,
232
+ $height: de,
235
233
  $gap: 8,
236
234
  $gutter: 8,
237
235
  $flexGap: 8,
238
- $background: tt,
239
- $topOffset: k.topOffset - ue,
236
+ $background: Ye,
237
+ $topOffset: k.topOffset - de,
240
238
  children: [
241
- Y ? /* @__PURE__ */ i(pe, { children: /* @__PURE__ */ i(ut, { width: 16, height: 16 }) }) : /* @__PURE__ */ i(pe, { children: /* @__PURE__ */ i(ht, { width: 16, height: 16 }) }),
242
- /* @__PURE__ */ i(gt, { $renderAs: "ub3", children: it })
239
+ U ? /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i(dt, { width: 16, height: 16 }) }) : /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i(lt, { width: 16, height: 16 }) }),
240
+ /* @__PURE__ */ i(ht, { $renderAs: "ub3", children: Ze })
243
241
  ]
244
242
  }
245
243
  ),
246
- /* @__PURE__ */ W(Mt, { $background: "WHITE_1", $width: Ke, children: [
247
- Je === "top" && /* @__PURE__ */ i(xt, { $topOffset: H, $height: It, children: /* @__PURE__ */ i(Rt, { children: /* @__PURE__ */ i(
248
- _t,
244
+ /* @__PURE__ */ y(Dt, { $background: "WHITE_1", $width: qe, children: [
245
+ Xe === "top" && /* @__PURE__ */ i(Vt, { $topOffset: V, $height: pt, children: /* @__PURE__ */ i(Ht, { children: /* @__PURE__ */ i(
246
+ At,
249
247
  {
250
248
  placement: "top",
251
249
  questions: t,
@@ -253,197 +251,195 @@ const Xt = (ge, be) => {
253
251
  activeQuestionIndex: l,
254
252
  lastUnlockedQuestionIndex: u,
255
253
  behavior: a,
256
- onItemNumberClick: x,
254
+ onItemNumberClick: M,
257
255
  userType: r,
258
256
  summaryVisible: h
259
257
  }
260
258
  ) }) }),
261
- oe && d && /* @__PURE__ */ i(Pt, { $minHeight: ie, $topOffset: H, children: /* @__PURE__ */ i(me, { $width: L, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ i(
262
- Et,
259
+ ne && d && /* @__PURE__ */ i(Mt, { $minHeight: te, $topOffset: V, children: /* @__PURE__ */ i(ce, { $width: q, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ i(
260
+ $t,
263
261
  {
264
- blocker: oe,
262
+ blocker: ne,
265
263
  lastUnlockedQuestion: d,
266
- studentName: Ie,
267
- onBlockerClose: A,
268
- onOptionalItemAssignment: Ee,
269
- onOptionalItemSkip: we,
270
- onTeacherValidation: Z
264
+ studentName: pe,
265
+ onBlockerClose: B,
266
+ onOptionalItemAssignment: $e,
267
+ onOptionalItemSkip: Te,
268
+ onTeacherValidation: Y
271
269
  }
272
270
  ) }) }),
273
- Ye && /* @__PURE__ */ i(
274
- bt,
271
+ ze && /* @__PURE__ */ i(
272
+ ft,
275
273
  {
276
274
  activeQuestionIndex: l,
277
- onClick: x,
275
+ onClick: M,
278
276
  questions: t,
279
277
  bottomOffset: g,
280
- topOffset: H,
278
+ topOffset: V,
281
279
  userType: r
282
280
  }
283
281
  ),
284
- re && /* @__PURE__ */ i(Qt, { children: /* @__PURE__ */ i(pt, { initialPosition: St, onClose: rt }) }),
285
- /* @__PURE__ */ W(
286
- Gt,
282
+ oe && /* @__PURE__ */ i(xt, { children: /* @__PURE__ */ i(ut, { initialPosition: gt, onClose: it }) }),
283
+ /* @__PURE__ */ y(
284
+ Rt,
287
285
  {
288
286
  $marginTop: r === "TEACHER" && h ? "0" : g,
289
287
  $height: g,
290
- $isCardView: D === "card",
288
+ $isCardView: O === "card",
291
289
  children: [
292
- te !== -2 && /* @__PURE__ */ i(
293
- Tt,
290
+ ee !== -2 && /* @__PURE__ */ i(
291
+ St,
294
292
  {
295
- width: X - 32,
293
+ width: L - 32,
296
294
  question: t[l],
297
295
  learnosity: p,
298
296
  userType: r
299
297
  }
300
298
  ),
301
- je && /* @__PURE__ */ i(
302
- Ft,
299
+ Qe && /* @__PURE__ */ i(
300
+ Pt,
303
301
  {
304
302
  $height: g,
305
- $width: D === "card" || te === -2 ? X - 32 : "100%",
306
- $isCardView: D === "card",
303
+ $width: O === "card" || ee === -2 ? L - 32 : "100%",
304
+ $isCardView: O === "card",
307
305
  children: /* @__PURE__ */ i(
308
- me,
306
+ ce,
309
307
  {
310
308
  $gutterX: 1,
311
309
  $flexDirection: "row",
312
310
  $justifyContent: "space-between",
313
311
  $alignItems: "center",
314
- $width: X - 32,
312
+ $width: L - 32,
315
313
  children: /* @__PURE__ */ i(
316
- vt,
314
+ kt,
317
315
  {
318
316
  userType: r,
319
317
  layout: k,
320
318
  behavior: a,
321
- worksheetName: U,
319
+ worksheetName: J,
322
320
  questions: t,
323
321
  responses: c,
324
- onCalculatorOpen: st,
322
+ onCalculatorOpen: nt,
325
323
  activeQuestionIndex: l,
326
324
  lastUnlockedQuestionIndex: u,
327
- appendedQuestionIds: ee,
325
+ appendedQuestionIds: Z,
328
326
  learnosity: p,
329
- canSubmitWorksheet: xe,
330
- isScribblingEnabled: ne,
327
+ canSubmitWorksheet: Ve,
328
+ isScribblingEnabled: ie,
331
329
  isSummaryVisible: h,
332
- setResponses: E,
333
- getTimeSpentOnQuestion: ae,
334
- setSummaryVisible: z,
335
- setBlocker: B,
336
- setIsScribblingEnabled: et,
337
- setActiveQuestionId: M,
338
- onItemNumberClick: x,
339
- onGoToReview: at,
330
+ setResponses: v,
331
+ getTimeSpentOnQuestion: se,
332
+ setSummaryVisible: K,
333
+ setBlocker: N,
334
+ setIsScribblingEnabled: Ue,
335
+ setActiveQuestionId: H,
336
+ onItemNumberClick: M,
337
+ onGoToReview: ot,
340
338
  onResponseChange: f,
341
- onHelp: Oe,
342
- onTeacherValidation: Z,
343
- onSubmit: Ne,
344
- showCalculator: re,
345
- loggerRef: q,
346
- onSkip: Qe,
347
- actionBarRightElement: qe
339
+ onHelp: ye,
340
+ onTeacherValidation: Y,
341
+ onSubmit: ve,
342
+ showCalculator: oe,
343
+ loggerRef: j,
344
+ onSkip: xe,
345
+ actionBarRightElement: Ge
348
346
  }
349
347
  )
350
348
  }
351
349
  )
352
350
  }
353
351
  ),
354
- !h && V && r === "STUDENT" && /* @__PURE__ */ i(jt, { children: /* @__PURE__ */ i(Dt, {}) })
352
+ !h && D && r === "STUDENT" && /* @__PURE__ */ i(Qt, { children: /* @__PURE__ */ i(Wt, {}) })
355
353
  ]
356
354
  }
357
355
  ),
358
- /* @__PURE__ */ W(
359
- qt,
356
+ /* @__PURE__ */ y(
357
+ Gt,
360
358
  {
361
359
  $actionbarHeight: g,
362
- $isCardView: D === "card",
363
- $questionPadding: Ze,
360
+ $isCardView: O === "card",
361
+ $questionPadding: Je,
364
362
  children: [
365
- yt({ questions: t, lastUnlockedQuestionIndex: u, userType: r }).map(
363
+ Nt({ questions: t, lastUnlockedQuestionIndex: u, userType: r }).map(
366
364
  (e, s) => {
367
- var I, y;
368
- const { response_id: o, is_optional: b } = e, T = (I = c[o]) == null ? void 0 : I.assignStatus;
369
- return a.teacherValidationEnabled && (T === "skipped" || b && T !== "assigned" && r === "STUDENT") ? null : /* @__PURE__ */ i(
370
- Ot,
365
+ var I, A;
366
+ const { response_id: o, is_optional: b } = e, $ = (I = c[o]) == null ? void 0 : I.assignStatus;
367
+ return a.teacherValidationEnabled && ($ === "skipped" || b && $ !== "assigned" && r === "STUDENT") ? null : /* @__PURE__ */ i(
368
+ yt,
371
369
  {
372
- signedRequest: Se,
370
+ signedRequest: ge,
373
371
  userType: r,
374
- worksheetCompleted: Be,
372
+ worksheetCompleted: Ee,
375
373
  question: e,
376
374
  response: c[o],
377
- nextQuestionId: m === "ADAPTIVE" || m === "CURRENT" ? d == null ? void 0 : d.response_id : s < u ? (y = t[s + 1]) == null ? void 0 : y.response_id : void 0,
378
- maxQuestionWidth: L,
375
+ nextQuestionId: m === "ADAPTIVE" || m === "CURRENT" ? d == null ? void 0 : d.response_id : s < u ? (A = t[s + 1]) == null ? void 0 : A.response_id : void 0,
376
+ maxQuestionWidth: q,
379
377
  learnosity: p,
380
- isActive: o === N,
381
- isHidden: !V && o !== N || h,
378
+ isActive: o === w,
379
+ isHidden: !D && o !== w || h,
382
380
  canRender: l > -1 && (s === l || m !== "CURRENT" && s === l + 1),
383
- appended: ee.includes(o),
381
+ appended: Z.includes(o),
384
382
  behavior: a,
385
383
  layout: k,
386
384
  actionbarHeight: g,
387
- intersectionObserver: K,
388
- onMarkForReview: ot,
389
- onMediaStateChange: nt,
390
- userId: Ae,
391
- isScribblingEnabled: ne,
392
- onPublishStrokes: ye,
393
- onReceiveStrokes: We,
394
- initialStrokesData: _e,
395
- onPublishMouseMove: De,
396
- onSubscribeMouseMove: Ve,
397
- setActiveQuestionId: M,
398
- canResolveDoubt: Re,
399
- onResolveDoubt: Pe,
400
- studentId: Ge,
401
- subjectiveProps: Fe,
385
+ intersectionObserver: X,
386
+ onMarkForReview: tt,
387
+ onMediaStateChange: et,
388
+ userId: we,
389
+ isScribblingEnabled: ie,
390
+ onPublishStrokes: Ne,
391
+ onReceiveStrokes: Be,
392
+ initialStrokesData: Ae,
393
+ onPublishMouseMove: We,
394
+ onSubscribeMouseMove: _e,
395
+ setActiveQuestionId: H,
396
+ canResolveDoubt: He,
397
+ onResolveDoubt: Me,
398
+ studentId: Re,
399
+ subjectiveProps: Pe,
402
400
  responses: c,
403
- loggerRef: q
401
+ loggerRef: j
404
402
  },
405
403
  o
406
404
  );
407
405
  }
408
406
  ),
409
407
  h && /* @__PURE__ */ i(
410
- Lt,
408
+ Ft,
411
409
  {
412
- worksheetName: U,
410
+ worksheetName: J,
413
411
  questions: t,
414
412
  responses: c,
415
413
  activeQuestionIndex: l,
416
414
  lastUnlockedQuestionIndex: u,
417
- onItemNumberClick: x,
415
+ onItemNumberClick: M,
418
416
  behavior: a,
419
- minHeight: ze,
420
- summaryDescription: Me,
417
+ minHeight: Le,
418
+ summaryDescription: De,
421
419
  summaryVisible: h
422
420
  }
423
421
  )
424
422
  ]
425
423
  }
426
424
  ),
427
- !h && Ue && /* @__PURE__ */ i(
428
- Vt,
425
+ !h && Ke && /* @__PURE__ */ i(
426
+ _t,
429
427
  {
430
- questionWidth: L,
428
+ questionWidth: q,
431
429
  questions: t,
432
430
  activeQuestionIndex: l,
433
431
  learnosity: p,
434
432
  userType: r,
435
- height: ie,
433
+ height: te,
436
434
  actionbarHeight: g,
437
- openQuestionFeedbackModal: He,
438
- loggerRef: q,
439
- studentClassroomId: (ce = $ == null ? void 0 : $.stickers) == null ? void 0 : ce.studentClassroomId,
440
- enableStickers: (de = $ == null ? void 0 : $.stickers) == null ? void 0 : de.enableStickers
435
+ openQuestionFeedbackModal: Oe,
436
+ loggerRef: j
441
437
  }
442
438
  )
443
439
  ] })
444
440
  ] }) : null;
445
- }, bi = dt(lt(Xt));
441
+ }, fi = st(at(jt));
446
442
  export {
447
- bi as default
443
+ fi as default
448
444
  };
449
445
  //# sourceMappingURL=worksheet.js.map