@cuemath/leap 4.1.1-link.0 → 4.1.2

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 (53) hide show
  1. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +17 -15
  2. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
  3. package/dist/features/chapters-v2/chapter-details/chapter-details.js +9 -7
  4. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  5. package/dist/features/fraud-detection/api/send-email.js +9 -0
  6. package/dist/features/fraud-detection/api/send-email.js.map +1 -0
  7. package/dist/features/fraud-detection/hooks/report-fraud-helper.js +65 -0
  8. package/dist/features/fraud-detection/hooks/report-fraud-helper.js.map +1 -0
  9. package/dist/features/fraud-detection/hooks/use-report-fraud.js +70 -54
  10. package/dist/features/fraud-detection/hooks/use-report-fraud.js.map +1 -1
  11. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-chapter-details-journey.js +7 -7
  12. package/dist/features/journey/hooks/use-learning-plan-journey/use-chapter-details-journey.js.map +1 -0
  13. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-learning-plan-journey.js +7 -7
  14. package/dist/features/journey/hooks/use-learning-plan-journey/use-learning-plan-journey.js.map +1 -0
  15. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-resource-assignment-journey.js +7 -7
  16. package/dist/features/journey/hooks/use-learning-plan-journey/use-resource-assignment-journey.js.map +1 -0
  17. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-test-creation-journey.js +7 -7
  18. package/dist/features/journey/hooks/use-learning-plan-journey/use-test-creation-journey.js.map +1 -0
  19. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-worksheet-preview-journey.js +7 -7
  20. package/dist/features/journey/hooks/use-learning-plan-journey/use-worksheet-preview-journey.js.map +1 -0
  21. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +1 -1
  22. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
  23. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +14 -13
  24. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  25. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +7 -6
  26. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  27. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +23 -22
  28. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
  29. package/dist/features/trial-session/comps/learning-plan/learning-chapter-details.js +1 -1
  30. package/dist/features/trial-session/comps/learning-plan/learning-chapter-details.js.map +1 -1
  31. package/dist/features/trial-session/comps/learning-plan/learning-milestone-sync.js +3 -3
  32. package/dist/features/trial-session/comps/learning-plan/learning-milestone-sync.js.map +1 -1
  33. package/dist/features/trial-session/comps/learning-plan/learning-preview-worksheet.js +1 -1
  34. package/dist/features/trial-session/comps/learning-plan/learning-preview-worksheet.js.map +1 -1
  35. package/dist/features/trial-session/comps/worksheet/worksheet.js +41 -34
  36. package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
  37. package/dist/features/trial-session/right-panel/index.js +26 -26
  38. package/dist/features/trial-session/right-panel/index.js.map +1 -1
  39. package/dist/features/trial-session/right-panel/right-panel-styled.js +27 -31
  40. package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
  41. package/dist/features/ui/buttons/button/button.js +51 -50
  42. package/dist/features/ui/buttons/button/button.js.map +1 -1
  43. package/dist/features/ui/buttons/icon-button/icon-button.js +21 -20
  44. package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
  45. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +16 -15
  46. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  47. package/dist/index.d.ts +12 -12
  48. package/package.json +1 -1
  49. package/dist/features/trial-session/hooks/use-chapter-details-journey.js.map +0 -1
  50. package/dist/features/trial-session/hooks/use-learning-plan-journey.js.map +0 -1
  51. package/dist/features/trial-session/hooks/use-resource-assignment-journey.js.map +0 -1
  52. package/dist/features/trial-session/hooks/use-test-creation-journey.js.map +0 -1
  53. package/dist/features/trial-session/hooks/use-worksheet-preview-journey.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { jsxs as O, jsx as c } from "react/jsx-runtime";
2
- import { memo as y, useMemo as D } from "react";
3
- import { BLOCK_TYPE as G, SECTION_CODE as I } from "../../constants/block-constants.js";
1
+ import { jsxs as y, jsx as c } from "react/jsx-runtime";
2
+ import { memo as D, useMemo as G } from "react";
3
+ import { BLOCK_TYPE as I, SECTION_CODE as L } from "../../constants/block-constants.js";
4
4
  import m from "./block-section-view.js";
5
- import { ChapterDetailsWrapper as L } from "./block-sections-styled.js";
6
- const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, K = y(function(h) {
5
+ import { ChapterDetailsWrapper as w } from "./block-sections-styled.js";
6
+ const { SAT_MOCK_TEST: _, GOAL: N } = I, { GOALS: x, READINESS: H } = L, M = D(function(h) {
7
7
  const {
8
8
  blocks: t,
9
9
  imageHue: i,
@@ -11,38 +11,40 @@ const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, K = y(f
11
11
  coreBlocksRef: S,
12
12
  challengeBlockRef: C,
13
13
  downloadBlockRef: E,
14
- downloadCoreBlockRef: g,
14
+ downloadCoreBlockRef: R,
15
+ nodeCardsRef: g,
15
16
  ...d
16
17
  } = h;
17
18
  let a = 0, k = !1, f = !1;
18
- const { goalBlocks: p, nonGoalBlocks: B } = D(
19
+ const { goalBlocks: p, nonGoalBlocks: B } = G(
19
20
  () => t.reduce(
20
- (o, e) => (e.section_code === N || e.section_code === x || e.block_type === _ ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
21
+ (o, e) => (e.section_code === x || e.section_code === H || e.block_type === _ ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
21
22
  { goalBlocks: [], nonGoalBlocks: [] }
22
23
  ),
23
24
  [t]
24
25
  );
25
- return /* @__PURE__ */ O(
26
- L,
26
+ return /* @__PURE__ */ y(
27
+ w,
27
28
  {
28
29
  $width: "100%",
30
+ ref: g,
29
31
  $background: B.length ? "WHITE_3" : "WHITE_1",
30
32
  children: [
31
33
  /* @__PURE__ */ c("div", { ref: S, children: p.map((o, e) => {
32
34
  const { block_type: l, block_id: n, permissions: s, sheets: A } = o;
33
35
  let u = 0;
34
- const R = e === p.length - 1, T = A.find((b) => b.node_type === "PDF");
35
- return (l === w || l === _) && (s.can_un_skip || (a += 1), u = a), /* @__PURE__ */ c(
36
+ const T = e === p.length - 1, b = A.find((O) => O.node_type === "PDF");
37
+ return (l === N || l === _) && (s.can_un_skip || (a += 1), u = a), /* @__PURE__ */ c(
36
38
  m,
37
39
  {
38
40
  blockData: o,
39
41
  userType: r,
40
- isLastBlock: R,
42
+ isLastBlock: T,
41
43
  lessonIdx: u,
42
44
  imageHue: i,
43
45
  isGoalBlock: !0,
44
46
  ...d,
45
- blockSectionRef: T ? g : void 0
47
+ blockSectionRef: b ? R : void 0
46
48
  },
47
49
  n
48
50
  );
@@ -66,6 +68,6 @@ const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, K = y(f
66
68
  );
67
69
  });
68
70
  export {
69
- K as default
71
+ M as default
70
72
  };
71
73
  //# sourceMappingURL=block-sections.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\nimport type { IBlockSectionsProps } from './block-sections-types';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(function BlockSections(props) {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings":";;;;;AAOA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,SAAuBC,GAAO;AAC1E,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAR;AAEJ,MAAIS,IAAc,GACdC,IAAuB,IACvBC,IAAsB;AAEpB,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;AAAA,IACpC,MACEb,EAAO;AAAA,MACL,CAACc,GAAKC,OAEFA,EAAM,iBAAiBrB,KACvBqB,EA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AAV;AAAA,cACA,UAAAjB;AAAA,cACA,UAAAD;AAAA,cACC,GAAGM;AAAA,cACJ,iBACEuB,IACI1B,IACA2B,IACE1B,IACA;AAAA,YAAA;AAAA,YAVHiB;AAAA,UAAA;AAAA,QAYP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\nimport type { IBlockSectionsProps } from './block-sections-types';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(function BlockSections(props) {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n nodeCardsRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n ref={nodeCardsRef}\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","nodeCardsRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings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IAAAjB,IAIZ,gBAAAU;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,WAAAV;AAAA,cACA,UAAAlB;AAAA,cACA,aAAAyB;AAAA,cAEA,WAAAD;AAAA,cACA,UAAAzB;AAAA,cACA,aAAW;AAAA,cACV,GAAGO;AAAA,cACJ,iBAAiBoB,IAAatB,IAAuB;AAAA,YAAA;AAAA,YALhDiB;AAAA,UAAA;AAAA,QAQV,CAAA,GACH;AAAA,QAECV,EAAc,IAAI,CAAaO,MAAA;AAC9B,gBAAM,EAAE,UAAUG,GAAS,YAAYD,MAAcF,GAG/CW,IAAwBT,MAAc,qBAAqB,CAACZ,GAE5DsB,IAAkBV,MAAc,eAAe,CAACX;AAEtD,iBAAIoB,MACqBrB,IAAA,KAGrBsB,MACoBrB,IAAA,KAItB,gBAAAQ;AAAA,YAACW;AAAA,YAAA;AAAA,cAEC,WAAAV;AAAA,cACA,UAAAlB;AAAA,cACA,UAAAD;AAAA,cACC,GAAGO;AAAA,cACJ,iBACEuB,IACI3B,IACA4B,IACE3B,IACA;AAAA,YAAA;AAAA,YAVHkB;AAAA,UAAA;AAAA,QAYP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -26,8 +26,8 @@ const ge = V(function(S) {
26
26
  onNodeAssignAsHomework: A,
27
27
  onNodeMarkAsDone: $,
28
28
  onNodeReattempt: x,
29
- onNodeReview: v,
30
- onNodeView: I,
29
+ onNodeReview: I,
30
+ onNodeView: v,
31
31
  onExit: P,
32
32
  onNodeUnassign: _,
33
33
  onNodeUnlock: E,
@@ -133,9 +133,10 @@ const ge = V(function(S) {
133
133
  $alignItems: "center",
134
134
  $height: "max-content",
135
135
  children: [
136
- t === "TEACHER" && /* @__PURE__ */ o(pe, { $height: "100%", className: "goal-widget-chapter-item", children: /* @__PURE__ */ o(ue, { ref: F, children: /* @__PURE__ */ o(
136
+ t === "TEACHER" && /* @__PURE__ */ o(pe, { $height: "100%", className: "goal-widget-chapter-item", children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(
137
137
  re,
138
138
  {
139
+ ref: F,
139
140
  Icon: Q,
140
141
  renderAs: "secondary-gray",
141
142
  analyticsLabel: "chapter_page_exit",
@@ -155,7 +156,7 @@ const ge = V(function(S) {
155
156
  bannerRef: U
156
157
  }
157
158
  ),
158
- /* @__PURE__ */ o("div", { ref: j, children: /* @__PURE__ */ o(
159
+ /* @__PURE__ */ o(
159
160
  de,
160
161
  {
161
162
  imageHue: e.image_hue,
@@ -166,18 +167,19 @@ const ge = V(function(S) {
166
167
  onNodeAssignAsHomework: A,
167
168
  onNodeMarkAsDone: $,
168
169
  onNodeReattempt: x,
169
- onNodeReview: v,
170
- onNodeView: I,
170
+ onNodeReview: I,
171
+ onNodeView: v,
171
172
  coreBlocksRef: W,
172
173
  challengeBlockRef: X,
173
174
  downloadCoreBlockRef: z,
174
175
  downloadBlockRef: G,
176
+ nodeCardsRef: j,
175
177
  onNodeUnassign: _,
176
178
  onNodeUnlock: E,
177
179
  onNodeSkipUnSkip: H,
178
180
  onBlockReset: L
179
181
  }
180
- ) })
182
+ )
181
183
  ] })
182
184
  ]
183
185
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useDownloadBlockJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-block-journey';\nimport { useDownloadNodeJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-node-journey';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport { getHasDownloadBlock, getHasNonDownloadBlockWithPdfNode } from '../utils';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\nimport type { IChapterDetails } from './chapter-details-types';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(function ChapterDetails(props) {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n nodeCardsRef,\n backButtonRef,\n } = props;\n\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n const { blockSectionRef: challengeBlockRef, startJourney: startChallengeArenaJourney } =\n useChallengeArenaJourney();\n\n const {\n blockSectionRef: downloadBlockRef,\n downloadCoreBlockRef,\n startJourney: startDownloadNodeJourney,\n } = useDownloadNodeJourney();\n\n const { blockSectionRef: downloadBlockSectionRef, startJourney: startDownloadBlockJourney } =\n useDownloadBlockJourney();\n\n const hasDownloadBlock = useMemo(\n () => chapterDetails && getHasDownloadBlock(chapterDetails.blocks),\n [chapterDetails],\n );\n const hasNonDownloadBlockWithPdfNode = useMemo(\n () => chapterDetails && getHasNonDownloadBlockWithPdfNode(chapterDetails.blocks),\n [chapterDetails],\n );\n\n const activeDownloadBlockRef = useMemo(\n () =>\n canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode\n ? downloadBlockRef\n : canStartDownloadBlockJourney\n ? downloadBlockSectionRef\n : undefined,\n [\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n hasNonDownloadBlockWithPdfNode,\n downloadBlockRef,\n downloadBlockSectionRef,\n ],\n );\n\n useEffect(() => {\n if (chapterDetails && !isJourneyActive) {\n if (canStartJourney && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (!canStartJourney && canStartChallengeArenaJourney) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n\n if (!canStartJourney && canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode) {\n startDownloadNodeJourney({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n });\n }\n\n if (!canStartJourney && canStartDownloadBlockJourney && hasDownloadBlock) {\n startDownloadBlockJourney({\n chapterDetails,\n userType,\n });\n }\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n startDownloadBlockJourney,\n startDownloadNodeJourney,\n studentId,\n userChapterId,\n userType,\n hasNonDownloadBlockWithPdfNode,\n hasDownloadBlock,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"ab1-bold\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper ref={backButtonRef}>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <div ref={nodeCardsRef}>\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n challengeBlockRef={challengeBlockRef}\n downloadCoreBlockRef={downloadCoreBlockRef}\n downloadBlockRef={activeDownloadBlockRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\n />\n </div>\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","startChapterPageJourney","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","canStartDownloadNodeJourney","canStartDownloadBlockJourney","nodeCardsRef","backButtonRef","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","challengeBlockRef","startChallengeArenaJourney","useChallengeArenaJourney","downloadBlockRef","downloadCoreBlockRef","startDownloadNodeJourney","useDownloadNodeJourney","downloadBlockSectionRef","startDownloadBlockJourney","useDownloadBlockJourney","hasDownloadBlock","useMemo","getHasDownloadBlock","hasNonDownloadBlockWithPdfNode","getHasNonDownloadBlockWithPdfNode","activeDownloadBlockRef","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,MAAMA,KAAsCC,EAAK,SAAwBC,GAAO;AACxE,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,+BAAA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
+ {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useDownloadBlockJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-block-journey';\nimport { useDownloadNodeJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-node-journey';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport { getHasDownloadBlock, getHasNonDownloadBlockWithPdfNode } from '../utils';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\nimport type { IChapterDetails } from './chapter-details-types';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(function ChapterDetails(props) {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n nodeCardsRef,\n backButtonRef,\n } = props;\n\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n const { blockSectionRef: challengeBlockRef, startJourney: startChallengeArenaJourney } =\n useChallengeArenaJourney();\n\n const {\n blockSectionRef: downloadBlockRef,\n downloadCoreBlockRef,\n startJourney: startDownloadNodeJourney,\n } = useDownloadNodeJourney();\n\n const { blockSectionRef: downloadBlockSectionRef, startJourney: startDownloadBlockJourney } =\n useDownloadBlockJourney();\n\n const hasDownloadBlock = useMemo(\n () => chapterDetails && getHasDownloadBlock(chapterDetails.blocks),\n [chapterDetails],\n );\n const hasNonDownloadBlockWithPdfNode = useMemo(\n () => chapterDetails && getHasNonDownloadBlockWithPdfNode(chapterDetails.blocks),\n [chapterDetails],\n );\n\n const activeDownloadBlockRef = useMemo(\n () =>\n canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode\n ? downloadBlockRef\n : canStartDownloadBlockJourney\n ? downloadBlockSectionRef\n : undefined,\n [\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n hasNonDownloadBlockWithPdfNode,\n downloadBlockRef,\n downloadBlockSectionRef,\n ],\n );\n\n useEffect(() => {\n if (chapterDetails && !isJourneyActive) {\n if (canStartJourney && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (!canStartJourney && canStartChallengeArenaJourney) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n\n if (!canStartJourney && canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode) {\n startDownloadNodeJourney({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n });\n }\n\n if (!canStartJourney && canStartDownloadBlockJourney && hasDownloadBlock) {\n startDownloadBlockJourney({\n chapterDetails,\n userType,\n });\n }\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n startDownloadBlockJourney,\n startDownloadNodeJourney,\n studentId,\n userChapterId,\n userType,\n hasNonDownloadBlockWithPdfNode,\n hasDownloadBlock,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"ab1-bold\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper>\n <IconButton\n ref={backButtonRef}\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n challengeBlockRef={challengeBlockRef}\n downloadCoreBlockRef={downloadCoreBlockRef}\n downloadBlockRef={activeDownloadBlockRef}\n nodeCardsRef={nodeCardsRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","startChapterPageJourney","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","canStartDownloadNodeJourney","canStartDownloadBlockJourney","nodeCardsRef","backButtonRef","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","challengeBlockRef","startChallengeArenaJourney","useChallengeArenaJourney","downloadBlockRef","downloadCoreBlockRef","startDownloadNodeJourney","useDownloadNodeJourney","downloadBlockSectionRef","startDownloadBlockJourney","useDownloadBlockJourney","hasDownloadBlock","useMemo","getHasDownloadBlock","hasNonDownloadBlockWithPdfNode","getHasNonDownloadBlockWithPdfNode","activeDownloadBlockRef","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","Block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B,UAAA1B;AAAA,cACA,QAAQ0B,EAAe;AAAA,cACvB,mBAAAzB;AAAA,cACA,eAAAC;AAAA,cACA,wBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAS;AAAA,cACA,mBAAAkB;AAAA,cACA,sBAAAI;AAAA,cACA,kBAAkBW;AAAA,cAClB,cAAA5B;AAAA,cACA,gBAAAZ;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,cAAAE;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDqD,KAAevE;"}
@@ -0,0 +1,9 @@
1
+ import { createPostAPI as t } from "@cuemath/rest-api";
2
+ import { BASE_URL_V1 as e } from "../../../constants/api.js";
3
+ const { usePost: m } = t({
4
+ getURL: () => `${e}/utility/send-email`
5
+ });
6
+ export {
7
+ m as useSendEmail
8
+ };
9
+ //# sourceMappingURL=send-email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-email.js","sources":["../../../../src/features/fraud-detection/api/send-email.tsx"],"sourcesContent":["import { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport { type IFraudEmailPayload } from '../hooks/report-fraud-types';\n\nexport const { usePost: useSendEmail } = createPostAPI<null, IFraudEmailPayload>({\n getURL: () => `${BASE_URL_V1}/utility/send-email`,\n});\n"],"names":["useSendEmail","createPostAPI","BASE_URL_V1"],"mappings":";;AAKO,MAAM,EAAE,SAASA,EAAa,IAAIC,EAAwC;AAAA,EAC/E,QAAQ,MAAM,GAAGC,CAAW;AAC9B,CAAC;"}
@@ -0,0 +1,65 @@
1
+ const p = ({
2
+ teacherId: t,
3
+ studentName: e,
4
+ studentId: o,
5
+ classStartTs: d,
6
+ teacherClassroomId: r,
7
+ studentClassroomId: l,
8
+ teacherUrl: a,
9
+ studentUrl: n
10
+ }) => `
11
+ <div style="font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 800px; margin: 0 auto; background-color: #ffffff; padding: 30px; border: 1px solid #e0e0e0; border-radius: 8px;">
12
+ <h2 style="margin: 0; font-weight: 500;">A teacher has been flagged for breach of professional standards due to fraud login during a regular class session.</h2>
13
+ <h3 style=" margin: 30px 0 15px 0; font-size: 18px; font-weight: 600; padding-bottom: 8px;">📋 Evidence Captured:</h3>
14
+ <table style="border-collapse: collapse; width: 80%; margin: 20px auto; box-shadow: 0 2px 4px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;">
15
+ <tbody>
16
+ <tr style="background-color: #f8f9fa;">
17
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242; width: 40%;">Tutor ID</td>
18
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;">${t}</td>
19
+ </tr>
20
+ <tr style="background-color: #ffffff;">
21
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;">Student Name</td>
22
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;">${e}</td>
23
+ </tr>
24
+ <tr style="background-color: #f8f9fa;">
25
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;">Student ID</td>
26
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;">${o}</td>
27
+ </tr>
28
+ <tr style="background-color: #ffffff;">
29
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;">Class Date & Time</td>
30
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;">${new Date(
31
+ d * 1e3
32
+ ).toLocaleString()}</td>
33
+ </tr>
34
+ <tr style="background-color: #f8f9fa;">
35
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;">Teacher Classroom ID</td>
36
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121; font-family: monospace; font-size: 13px;">${r}</td>
37
+ </tr>
38
+ <tr style="background-color: #ffffff;">
39
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;">Student Classroom ID</td>
40
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121; font-family: monospace; font-size: 13px;">${l}</td>
41
+ </tr>
42
+ <tr style="background-color: #f8f9fa;">
43
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;">Teacher Screenshot</td>
44
+ <td style="padding: 14px 16px; border-bottom: 1px solid #e0e0e0;">
45
+ <a href="${a}" style="color: #1976d2; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center;">
46
+ <span style="margin-right: 6px;">🔗</span> View Screenshot
47
+ </a>
48
+ </td>
49
+ </tr>
50
+ <tr style="background-color: #ffffff;">
51
+ <td style="padding: 14px 16px; font-weight: 600; color: #424242;">Student Screenshot</td>
52
+ <td style="padding: 14px 16px;">
53
+ <a href="${n}" style="color: #1976d2; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center;">
54
+ <span style="margin-right: 6px;">🔗</span> View Screenshot
55
+ </a>
56
+ </td>
57
+ </tr>
58
+ </tbody>
59
+ </table>
60
+ </div>
61
+ `;
62
+ export {
63
+ p as generateEmailBody
64
+ };
65
+ //# sourceMappingURL=report-fraud-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-fraud-helper.js","sources":["../../../../src/features/fraud-detection/hooks/report-fraud-helper.ts"],"sourcesContent":["export const generateEmailBody = ({\n teacherId,\n studentName,\n studentId,\n classStartTs,\n teacherClassroomId,\n studentClassroomId,\n teacherUrl,\n studentUrl,\n}: {\n teacherId: string;\n studentName: string;\n studentId: string;\n classStartTs: number;\n teacherClassroomId: string;\n studentClassroomId: string;\n teacherUrl: string;\n studentUrl: string;\n}) => `\n <div style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 800px; margin: 0 auto; background-color: #ffffff; padding: 30px; border: 1px solid #e0e0e0; border-radius: 8px;\">\n <h2 style=\"margin: 0; font-weight: 500;\">A teacher has been flagged for breach of professional standards due to fraud login during a regular class session.</h2>\n <h3 style=\" margin: 30px 0 15px 0; font-size: 18px; font-weight: 600; padding-bottom: 8px;\">📋 Evidence Captured:</h3>\n <table style=\"border-collapse: collapse; width: 80%; margin: 20px auto; box-shadow: 0 2px 4px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;\">\n <tbody>\n <tr style=\"background-color: #f8f9fa;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242; width: 40%;\">Tutor ID</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;\">${teacherId}</td>\n </tr>\n <tr style=\"background-color: #ffffff;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;\">Student Name</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;\">${studentName}</td>\n </tr>\n <tr style=\"background-color: #f8f9fa;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;\">Student ID</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;\">${studentId}</td>\n </tr>\n <tr style=\"background-color: #ffffff;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;\">Class Date & Time</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121;\">${new Date(\n classStartTs * 1000,\n ).toLocaleString()}</td>\n </tr>\n <tr style=\"background-color: #f8f9fa;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;\">Teacher Classroom ID</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121; font-family: monospace; font-size: 13px;\">${teacherClassroomId}</td>\n </tr>\n <tr style=\"background-color: #ffffff;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;\">Student Classroom ID</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; color: #212121; font-family: monospace; font-size: 13px;\">${studentClassroomId}</td>\n </tr>\n <tr style=\"background-color: #f8f9fa;\">\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0; font-weight: 600; color: #424242;\">Teacher Screenshot</td>\n <td style=\"padding: 14px 16px; border-bottom: 1px solid #e0e0e0;\">\n <a href=\"${teacherUrl}\" style=\"color: #1976d2; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center;\">\n <span style=\"margin-right: 6px;\">🔗</span> View Screenshot\n </a>\n </td>\n </tr>\n <tr style=\"background-color: #ffffff;\">\n <td style=\"padding: 14px 16px; font-weight: 600; color: #424242;\">Student Screenshot</td>\n <td style=\"padding: 14px 16px;\">\n <a href=\"${studentUrl}\" style=\"color: #1976d2; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center;\">\n <span style=\"margin-right: 6px;\">🔗</span> View Screenshot\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n`;\n"],"names":["generateEmailBody","teacherId","studentName","studentId","classStartTs","teacherClassroomId","studentClassroomId","teacherUrl","studentUrl"],"mappings":"AAAO,MAAMA,IAAoB,CAAC;AAAA,EAChC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AACF,MASM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8FAQwFP,CAAS;AAAA;AAAA;AAAA;AAAA,8FAITC,CAAW;AAAA;AAAA;AAAA;AAAA,8FAIXC,CAAS;AAAA;AAAA;AAAA;AAAA,8FAIT,IAAI;AAAA,EACtFC,IAAe;AACjB,EAAE,gBAAgB;AAAA;AAAA;AAAA;AAAA,uIAI2GC,CAAkB;AAAA;AAAA;AAAA;AAAA,uIAIlBC,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKlIC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAQVC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,83 +1,99 @@
1
- import { useState as D, useCallback as c, useEffect as $ } from "react";
2
- import { useLocalPeer as U, useRemotePeers as N, useCaptureMediaStreamImage as l } from "@cuemath/av";
3
- import { useUIContext as L } from "../../ui/context/context.js";
4
- import { base64ToFile as S } from "../fraud-alert-modal/fraud-alert-modal-helpers.js";
5
- import { FRAUD_DETECTION_ANALYTICS_EVENTS as k } from "./report-fraud-analytics.js";
6
- import v from "../../hooks/use-s3-helper/use-s3-helper.js";
7
- const y = { type: "class_fraud_login" }, b = ({
8
- teacherId: a,
9
- studentId: i,
10
- studentClassroomId: u,
11
- teacherClassroomId: o,
12
- classStartTs: r,
13
- studentName: m
1
+ import { useState as D, useCallback as _, useEffect as T } from "react";
2
+ import { useLocalPeer as $, useRemotePeers as y, useCaptureMediaStreamImage as L } from "@cuemath/av";
3
+ import { useUIContext as b } from "../../ui/context/context.js";
4
+ import { base64ToFile as U } from "../fraud-alert-modal/fraud-alert-modal-helpers.js";
5
+ import { FRAUD_DETECTION_ANALYTICS_EVENTS as N } from "./report-fraud-analytics.js";
6
+ import d from "../../hooks/use-s3-helper/use-s3-helper.js";
7
+ import { useSendEmail as k } from "../api/send-email.js";
8
+ import { generateEmailBody as v } from "./report-fraud-helper.js";
9
+ const w = { type: "class_fraud_login" }, x = ({
10
+ teacherId: n,
11
+ studentId: a,
12
+ studentClassroomId: r,
13
+ teacherClassroomId: t,
14
+ classStartTs: u,
15
+ studentName: f
14
16
  }) => {
15
- const { onEvent: _ } = L(), [s, g] = D(!1), e = U(), n = N().find((t) => t.userId === a), f = l(), p = v({
16
- studentId: i,
17
- query: y
18
- }), E = c(
19
- (t) => {
20
- _(k.FRAUD_LOGIN_TEACHER_ENTERED_CLASS_AS_STUDENT, {
21
- teacher_url: t[0],
22
- student_url: t[1],
23
- classStartTs: r,
24
- teacherId: a,
25
- studentId: i,
26
- studentClassroomId: u,
27
- studentName: m,
28
- teacherClassroomId: o
17
+ const { onEvent: m } = b(), [p, g] = D(!1), e = $(), i = y().find((o) => o.userId === n), c = L(), E = d({
18
+ studentId: a,
19
+ query: w
20
+ }), { post: s } = k(), F = _(
21
+ (o) => {
22
+ m(N.FRAUD_LOGIN_TEACHER_ENTERED_CLASS_AS_STUDENT, {
23
+ teacher_url: o[0],
24
+ student_url: o[1],
25
+ classStartTs: u,
26
+ teacherId: n,
27
+ studentId: a,
28
+ studentClassroomId: r,
29
+ studentName: f,
30
+ teacherClassroomId: t
31
+ }), s({
32
+ recipient_emails: ["ayush.singhal@cuemath.com"],
33
+ subject: "Breach of Professional Standards: Fraud Login",
34
+ body: v({
35
+ teacherId: n,
36
+ studentName: f,
37
+ studentId: a,
38
+ classStartTs: u,
39
+ teacherClassroomId: t,
40
+ studentClassroomId: r,
41
+ teacherUrl: o[0] || "",
42
+ studentUrl: o[1] || ""
43
+ })
29
44
  });
30
45
  },
31
46
  [
32
- r,
33
- _,
34
47
  u,
35
- i,
36
48
  m,
37
- o,
38
- a
49
+ s,
50
+ r,
51
+ a,
52
+ f,
53
+ t,
54
+ n
39
55
  ]
40
- ), R = c(() => {
41
- _("fraud_detection_images_failed", { classStartTs: r, teacherId: a, studentId: i });
42
- }, [r, _, i, a]);
43
- return $(() => {
44
- if (!s || !(n != null && n.id) || !(e != null && e.id))
56
+ ), R = _(() => {
57
+ m("fraud_detection_images_failed", { classStartTs: u, teacherId: n, studentId: a });
58
+ }, [u, m, a, n]);
59
+ return T(() => {
60
+ if (!p || !(i != null && i.id) || !(e != null && e.id))
45
61
  return;
46
- const { image: t } = f(n == null ? void 0 : n.id, "camera"), { image: T } = f(e == null ? void 0 : e.id, "camera"), A = S(t, `teacher-${Date.now()}.png`), F = S(T, `student-${Date.now()}.png`);
47
- !A || !F || (p({
62
+ const { image: o } = c(i == null ? void 0 : i.id, "camera"), { image: l } = c(e == null ? void 0 : e.id, "camera"), A = U(o, `teacher-${Date.now()}.png`), S = U(l, `student-${Date.now()}.png`);
63
+ !A || !S || (E({
48
64
  fileKey: "media/class_fraud_login/",
49
- onSuccess: E,
65
+ onSuccess: F,
50
66
  onError: R,
51
67
  images: [
52
68
  {
53
69
  file: A,
54
- name: `teacher_${o}_${a}`,
70
+ name: `teacher_${t}_${n}`,
55
71
  url: ""
56
72
  },
57
73
  {
58
- file: F,
59
- name: `student_${u}_${i}`,
74
+ file: S,
75
+ name: `student_${r}_${a}`,
60
76
  url: ""
61
77
  }
62
78
  ]
63
79
  }), g(!1));
64
80
  }, [
65
- s,
66
- f,
81
+ p,
82
+ c,
67
83
  e == null ? void 0 : e.id,
68
84
  R,
69
- E,
70
- n == null ? void 0 : n.id,
71
- u,
72
- i,
73
- o,
85
+ F,
86
+ i == null ? void 0 : i.id,
87
+ r,
74
88
  a,
75
- p
76
- ]), c(() => {
89
+ t,
90
+ n,
91
+ E
92
+ ]), _(() => {
77
93
  g(!0);
78
94
  }, []);
79
- }, Y = b;
95
+ }, Q = x;
80
96
  export {
81
- Y as default
97
+ Q as default
82
98
  };
83
99
  //# sourceMappingURL=use-report-fraud.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-report-fraud.js","sources":["../../../../src/features/fraud-detection/hooks/use-report-fraud.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useCaptureMediaStreamImage, useLocalPeer, useRemotePeers } from '@cuemath/av';\n\nimport { useUIContext } from '../../ui/context/context';\nimport { base64ToFile } from '../fraud-alert-modal/fraud-alert-modal-helpers';\nimport { type IUseFraudAlertProps } from './report-fraud-types';\nimport { FRAUD_DETECTION_ANALYTICS_EVENTS } from './report-fraud-analytics';\nimport useS3ImageUploadHelper from '../../hooks/use-s3-helper/use-s3-helper';\n\nconst QUERY = { type: 'class_fraud_login' };\n\nconst useReportFraud = ({\n teacherId,\n studentId,\n studentClassroomId,\n teacherClassroomId,\n classStartTs,\n studentName,\n}: IUseFraudAlertProps) => {\n const { onEvent } = useUIContext();\n\n const [canTrackEvent, setCanTrackEvent] = useState(false);\n const localpeer = useLocalPeer();\n const remotePeer = useRemotePeers().find(peer => peer.userId === teacherId);\n const captureMediaStreamImage = useCaptureMediaStreamImage();\n const uploadImages = useS3ImageUploadHelper({\n studentId,\n query: QUERY,\n });\n const onSuccess = useCallback(\n (urls: string[]) => {\n onEvent(FRAUD_DETECTION_ANALYTICS_EVENTS.FRAUD_LOGIN_TEACHER_ENTERED_CLASS_AS_STUDENT, {\n teacher_url: urls[0],\n student_url: urls[1],\n classStartTs,\n teacherId,\n studentId,\n studentClassroomId,\n studentName,\n teacherClassroomId,\n });\n },\n [\n classStartTs,\n onEvent,\n studentClassroomId,\n studentId,\n studentName,\n teacherClassroomId,\n teacherId,\n ],\n );\n\n const onError = useCallback(() => {\n onEvent('fraud_detection_images_failed', { classStartTs, teacherId, studentId });\n }, [classStartTs, onEvent, studentId, teacherId]);\n\n useEffect(() => {\n if (!canTrackEvent || !remotePeer?.id || !localpeer?.id) {\n return;\n }\n\n const { image: teacherImage } = captureMediaStreamImage(remotePeer?.id, 'camera');\n const { image: studentImage } = captureMediaStreamImage(localpeer?.id, 'camera');\n const teacherFile = base64ToFile(teacherImage, `teacher-${Date.now()}.png`);\n const studentFile = base64ToFile(studentImage, `student-${Date.now()}.png`);\n\n if (!teacherFile || !studentFile) {\n return;\n }\n\n uploadImages({\n fileKey: `media/class_fraud_login/`,\n onSuccess,\n onError,\n images: [\n {\n file: teacherFile,\n name: `teacher_${teacherClassroomId}_${teacherId}`,\n url: '',\n },\n {\n file: studentFile,\n name: `student_${studentClassroomId}_${studentId}`,\n url: '',\n },\n ],\n });\n\n setCanTrackEvent(false);\n }, [\n canTrackEvent,\n captureMediaStreamImage,\n localpeer?.id,\n onError,\n onSuccess,\n remotePeer?.id,\n studentClassroomId,\n studentId,\n teacherClassroomId,\n teacherId,\n uploadImages,\n ]);\n\n const captureAndReportFraudImages = useCallback(() => {\n setCanTrackEvent(true);\n }, []);\n\n return captureAndReportFraudImages;\n};\n\nexport default useReportFraud;\n"],"names":["QUERY","useReportFraud","teacherId","studentId","studentClassroomId","teacherClassroomId","classStartTs","studentName","onEvent","useUIContext","canTrackEvent","setCanTrackEvent","useState","localpeer","useLocalPeer","remotePeer","useRemotePeers","peer","captureMediaStreamImage","useCaptureMediaStreamImage","uploadImages","useS3ImageUploadHelper","onSuccess","useCallback","urls","FRAUD_DETECTION_ANALYTICS_EVENTS","onError","useEffect","teacherImage","studentImage","teacherFile","base64ToFile","studentFile","useReportFraud$1"],"mappings":";;;;;;AAUA,MAAMA,IAAQ,EAAE,MAAM,uBAEhBC,IAAiB,CAAC;AAAA,EACtB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AACF,MAA2B;AACnB,QAAA,EAAE,SAAAC,MAAYC,KAEd,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClDC,IAAYC,KACZC,IAAaC,EAAe,EAAE,KAAK,CAAQC,MAAAA,EAAK,WAAWf,CAAS,GACpEgB,IAA0BC,KAC1BC,IAAeC,EAAuB;AAAA,IAC1C,WAAAlB;AAAA,IACA,OAAOH;AAAA,EAAA,CACR,GACKsB,IAAYC;AAAA,IAChB,CAACC,MAAmB;AAClB,MAAAhB,EAAQiB,EAAiC,8CAA8C;AAAA,QACrF,aAAaD,EAAK,CAAC;AAAA,QACnB,aAAaA,EAAK,CAAC;AAAA,QACnB,cAAAlB;AAAA,QACA,WAAAJ;AAAA,QACA,WAAAC;AAAA,QACA,oBAAAC;AAAA,QACA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;AAAA,IACAD;AAAA,IACAE;AAAA,IACAH;AAAA,IACAkB;AAAA,EAAA,CACD,GAEmCG,EAAY,MAAM;AACpD,IAAAZ,EAAiB,EAAI;AAAA,EACvB,GAAG,CAAE,CAAA;AAGP,GAEAsB,IAAehC;"}
1
+ {"version":3,"file":"use-report-fraud.js","sources":["../../../../src/features/fraud-detection/hooks/use-report-fraud.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useCaptureMediaStreamImage, useLocalPeer, useRemotePeers } from '@cuemath/av';\n\nimport { useUIContext } from '../../ui/context/context';\nimport { base64ToFile } from '../fraud-alert-modal/fraud-alert-modal-helpers';\nimport { type IUseFraudAlertProps } from './report-fraud-types';\nimport { FRAUD_DETECTION_ANALYTICS_EVENTS } from './report-fraud-analytics';\nimport useS3ImageUploadHelper from '../../hooks/use-s3-helper/use-s3-helper';\nimport { useSendEmail } from '../api/send-email';\nimport { generateEmailBody } from './report-fraud-helper';\n\nconst QUERY = { type: 'class_fraud_login' };\n\nconst useReportFraud = ({\n teacherId,\n studentId,\n studentClassroomId,\n teacherClassroomId,\n classStartTs,\n studentName,\n}: IUseFraudAlertProps) => {\n const { onEvent } = useUIContext();\n\n const [canTrackEvent, setCanTrackEvent] = useState(false);\n const localpeer = useLocalPeer();\n const remotePeer = useRemotePeers().find(peer => peer.userId === teacherId);\n const captureMediaStreamImage = useCaptureMediaStreamImage();\n const uploadImages = useS3ImageUploadHelper({\n studentId,\n query: QUERY,\n });\n const { post: sendEmail } = useSendEmail();\n const onSuccess = useCallback(\n (urls: string[]) => {\n onEvent(FRAUD_DETECTION_ANALYTICS_EVENTS.FRAUD_LOGIN_TEACHER_ENTERED_CLASS_AS_STUDENT, {\n teacher_url: urls[0],\n student_url: urls[1],\n classStartTs,\n teacherId,\n studentId,\n studentClassroomId,\n studentName,\n teacherClassroomId,\n });\n\n sendEmail({\n recipient_emails: ['ayush.singhal@cuemath.com'],\n subject: 'Breach of Professional Standards: Fraud Login',\n body: generateEmailBody({\n teacherId,\n studentName,\n studentId,\n classStartTs,\n teacherClassroomId,\n studentClassroomId,\n teacherUrl: urls[0] || '',\n studentUrl: urls[1] || '',\n }),\n });\n },\n [\n classStartTs,\n onEvent,\n sendEmail,\n studentClassroomId,\n studentId,\n studentName,\n teacherClassroomId,\n teacherId,\n ],\n );\n\n const onError = useCallback(() => {\n onEvent('fraud_detection_images_failed', { classStartTs, teacherId, studentId });\n }, [classStartTs, onEvent, studentId, teacherId]);\n\n useEffect(() => {\n if (!canTrackEvent || !remotePeer?.id || !localpeer?.id) {\n return;\n }\n\n const { image: teacherImage } = captureMediaStreamImage(remotePeer?.id, 'camera');\n const { image: studentImage } = captureMediaStreamImage(localpeer?.id, 'camera');\n const teacherFile = base64ToFile(teacherImage, `teacher-${Date.now()}.png`);\n const studentFile = base64ToFile(studentImage, `student-${Date.now()}.png`);\n\n if (!teacherFile || !studentFile) {\n return;\n }\n\n uploadImages({\n fileKey: `media/class_fraud_login/`,\n onSuccess,\n onError,\n images: [\n {\n file: teacherFile,\n name: `teacher_${teacherClassroomId}_${teacherId}`,\n url: '',\n },\n {\n file: studentFile,\n name: `student_${studentClassroomId}_${studentId}`,\n url: '',\n },\n ],\n });\n\n setCanTrackEvent(false);\n }, [\n canTrackEvent,\n captureMediaStreamImage,\n localpeer?.id,\n onError,\n onSuccess,\n remotePeer?.id,\n studentClassroomId,\n studentId,\n teacherClassroomId,\n teacherId,\n uploadImages,\n ]);\n\n const captureAndReportFraudImages = useCallback(() => {\n setCanTrackEvent(true);\n }, []);\n\n return captureAndReportFraudImages;\n};\n\nexport default useReportFraud;\n"],"names":["QUERY","useReportFraud","teacherId","studentId","studentClassroomId","teacherClassroomId","classStartTs","studentName","onEvent","useUIContext","canTrackEvent","setCanTrackEvent","useState","localpeer","useLocalPeer","remotePeer","useRemotePeers","peer","captureMediaStreamImage","useCaptureMediaStreamImage","uploadImages","useS3ImageUploadHelper","sendEmail","useSendEmail","onSuccess","useCallback","urls","FRAUD_DETECTION_ANALYTICS_EVENTS","generateEmailBody","onError","useEffect","teacherImage","studentImage","teacherFile","base64ToFile","studentFile","useReportFraud$1"],"mappings":";;;;;;;;AAYA,MAAMA,IAAQ,EAAE,MAAM,uBAEhBC,IAAiB,CAAC;AAAA,EACtB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AACF,MAA2B;AACnB,QAAA,EAAE,SAAAC,MAAYC,KAEd,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClDC,IAAYC,KACZC,IAAaC,EAAe,EAAE,KAAK,CAAQC,MAAAA,EAAK,WAAWf,CAAS,GACpEgB,IAA0BC,KAC1BC,IAAeC,EAAuB;AAAA,IAC1C,WAAAlB;AAAA,IACA,OAAOH;AAAA,EAAA,CACR,GACK,EAAE,MAAMsB,EAAU,IAAIC,EAAa,GACnCC,IAAYC;AAAA,IAChB,CAACC,MAAmB;AAClB,MAAAlB,EAAQmB,EAAiC,8CAA8C;AAAA,QACrF,aAAaD,EAAK,CAAC;AAAA,QACnB,aAAaA,EAAK,CAAC;AAAA,QACnB,cAAApB;AAAA,QACA,WAAAJ;AAAA,QACA,WAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,aAAAG;AAAA,QACA,oBAAAF;AAAA,MAAA,CACD,GAESiB,EAAA;AAAA,QACR,kBAAkB,CAAC,2BAA2B;AAAA,QAC9C,SAAS;AAAA,QACT,MAAMM,EAAkB;AAAA,UACtB,WAAA1B;AAAA,UACA,aAAAK;AAAA,UACA,WAAAJ;AAAA,UACA,cAAAG;AAAA,UACA,oBAAAD;AAAA,UACA,oBAAAD;AAAA,UACA,YAAYsB,EAAK,CAAC,KAAK;AAAA,UACvB,YAAYA,EAAK,CAAC,KAAK;AAAA,QAAA,CACxB;AAAA,MAAA,CACF;AAAA,IACH;AAAA,IACA;AAAA,MACEpB;AAAA,MACAE;AAAA,MACAc;AAAA,MAC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AAAd,EAAiB,EAAI;AAAA,EACvB,GAAG,CAAE,CAAA;AAGP,GAEAyB,IAAenC;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as o, Fragment as b, jsxs as f } from "react/jsx-runtime";
2
2
  import { useRef as a, useCallback as s, useEffect as E, useMemo as k } from "react";
3
- import y from "../../ui/layout/flex-view.js";
4
- import { JOURNEY_ID_TEACHER as I } from "../../journey/journey-id/journey-id-teacher.js";
5
- import { IndicatorType as T } from "../../journey/use-journey/constants.js";
6
- import g from "../../ui/separator/separator.js";
7
- import i from "../../ui/text/text.js";
8
- import A from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
9
- import { useJourney as L } from "../../journey/use-journey/use-journey.js";
3
+ import y from "../../../ui/layout/flex-view.js";
4
+ import { JOURNEY_ID_TEACHER as I } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as T } from "../../use-journey/constants.js";
6
+ import g from "../../../ui/separator/separator.js";
7
+ import i from "../../../ui/text/text.js";
8
+ import A from "../use-home-page-journey/tooltip-item.js";
9
+ import { useJourney as L } from "../../use-journey/use-journey.js";
10
10
  const D = ({ onComplete: d }) => {
11
11
  const n = I.CHAPTER_DETAILS_INTRO_JOURNEY, e = a(null), t = a(null), O = a([]), { setJourney: m, clearJourney: r, nextCoachmark: c, isJourneyActive: u } = L(), h = s(() => {
12
12
  document.body.style.overflow = "unset", r(), d();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-chapter-details-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-chapter-details-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseChapterDetailsJourney {\n (params: { onComplete: () => void }): {\n nodeCardsRef: RefObject<HTMLDivElement>;\n backButtonRef: RefObject<HTMLButtonElement>;\n startJourney: () => void;\n };\n}\n\nconst useChapterDetailsJourney: IUseChapterDetailsJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.CHAPTER_DETAILS_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const nodeCardsRef = useRef<HTMLDivElement>(null) as RefObject<HTMLDivElement>;\n const backButtonRef = useRef<HTMLButtonElement>(null) as RefObject<HTMLButtonElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, clearJourney, nextCoachmark, isJourneyActive } = useJourney();\n\n // Helper to mark journey as completed for a class\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId);\n }, [journeyId, nextCoachmark]);\n\n const startJourney = useCallback(() => {\n // Check if elements are absent or journey was already completed for this class\n if (!nodeCardsRef?.current || !backButtonRef?.current || isJourneyActive) return;\n\n const chapterDetailsSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: nodeCardsRef,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: 145,\n tooltipYCoOrdinates: 125,\n arrowSize: 10,\n arrowXCoOrdinates: -100,\n position: 'bottom',\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Open a worksheet</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap to open any worksheet.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: backButtonRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 283,\n renderAs: 'primary',\n tooltipXCoOrdinates: 130,\n tooltipYCoOrdinates: 40,\n arrowSize: 10,\n arrowXCoOrdinates: -115,\n position: 'bottom',\n backgroundColor: 'ORANGE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Back to Goals</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap here to go back to learning home.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, chapterDetailsSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [handleEndJourney, handleNextCoachmark, isJourneyActive, journeyId, setJourney]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n nodeCardsRef,\n backButtonRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useChapterDetailsJourney };\n"],"names":["useChapterDetailsJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","nodeCardsRef","useRef","backButtonRef","timerRefs","setJourney","clearJourney","nextCoachmark","isJourneyActive","useJourney","handleEndJourney","useCallback","handleNextCoachmark","startJourney","chapterDetailsSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","Text","Separator","delayBeforeStart","useEffect","useMemo"],"mappings":";;;;;;;;;AAoBA,MAAMA,IAAsD,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
1
1
  import { jsx as o, Fragment as y, jsxs as b } from "react/jsx-runtime";
2
2
  import { useRef as a, useCallback as s, useEffect as w, useMemo as L } from "react";
3
- import f from "../../ui/layout/flex-view.js";
4
- import { JOURNEY_ID_TEACHER as I } from "../../journey/journey-id/journey-id-teacher.js";
5
- import { IndicatorType as g } from "../../journey/use-journey/constants.js";
6
- import T from "../../ui/separator/separator.js";
7
- import l from "../../ui/text/text.js";
8
- import A from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
9
- import { useJourney as J } from "../../journey/use-journey/use-journey.js";
3
+ import f from "../../../ui/layout/flex-view.js";
4
+ import { JOURNEY_ID_TEACHER as I } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as g } from "../../use-journey/constants.js";
6
+ import T from "../../../ui/separator/separator.js";
7
+ import l from "../../../ui/text/text.js";
8
+ import A from "../use-home-page-journey/tooltip-item.js";
9
+ import { useJourney as J } from "../../use-journey/use-journey.js";
10
10
  const Y = ({ onComplete: d }) => {
11
11
  const e = I.LEARNING_PLAN_INTRO_JOURNEY, r = a(null), t = a(null), O = a([]), { isJourneyActive: c, setJourney: m, clearJourney: n, nextCoachmark: i } = J(), u = s(() => {
12
12
  i(e);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-learning-plan-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-learning-plan-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseLearningPlanJourney {\n ({ onComplete }: { onComplete: () => void }): {\n editButtonRef: RefObject<HTMLButtonElement>;\n firstChapterRef: RefObject<HTMLDivElement>;\n startJourney: () => void;\n };\n}\n\nconst useLearningPlanJourney: IUseLearningPlanJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.LEARNING_PLAN_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const editButtonRef = useRef<HTMLButtonElement>(null) as RefObject<HTMLButtonElement>;\n const firstChapterRef = useRef<HTMLDivElement>(null) as RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { isJourneyActive, setJourney, clearJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const startJourney = useCallback(() => {\n // Check if targeted is absent or journey was already completed or active for this class\n if (!editButtonRef?.current || !firstChapterRef?.current || isJourneyActive) {\n return;\n }\n\n const learningPlanSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: editButtonRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: -85,\n tooltipYCoOrdinates: 40,\n arrowSize: 10,\n arrowXCoOrdinates: 102,\n position: 'bottom',\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Edit a Goal</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">You can always edit this later.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: firstChapterRef,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 232,\n renderAs: 'primary',\n tooltipXCoOrdinates: 175,\n tooltipYCoOrdinates: 75,\n arrowSize: 10,\n arrowXCoOrdinates: 0,\n position: 'right',\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Open a Chapter</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap to open any chapter.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, learningPlanSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n nextCoachmark(journeyId);\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [\n handleEndJourney,\n handleNextCoachmark,\n isJourneyActive,\n journeyId,\n nextCoachmark,\n setJourney,\n ]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n editButtonRef,\n firstChapterRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useLearningPlanJourney };\n"],"names":["useLearningPlanJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","editButtonRef","useRef","firstChapterRef","timerRefs","isJourneyActive","setJourney","clearJourney","nextCoachmark","useJourney","handleNextCoachmark","useCallback","handleEndJourney","startJourney","learningPlanSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","Text","Separator","delayBeforeStart","useEffect","useMemo"],"mappings":";;;;;;;;;AAoBA,MAAMA,IAAkD,CAAC,EAAE,YAAAC,QAAiB;AAC1E,QAAMC,IAAYC,EAAmB,6BAG/BC,IAAgBC,EAA0B,IAAI,GAC9CC,IAAkBD,EAAuB,IAA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