@cuemath/leap 3.0.1-as1 → 3.0.1-hg1

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.
@@ -1,77 +1,76 @@
1
- import { jsx as e, jsxs as m, Fragment as j } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as m, Fragment as P } from "react/jsx-runtime";
2
2
  import { memo as z, useRef as F, useCallback as l } from "react";
3
3
  import Y from "../../../../../assets/line-icons/icons/eye2.js";
4
4
  import Z from "../../../../../assets/line-icons/icons/redo.js";
5
5
  import q from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
6
- import J from "../../../../ui/border-path-animation/border-path-animation.js";
7
- import Q from "../../../../ui/context-menu/context-menu.js";
8
- import U from "../../../../ui/lottie-animation/lottie-animation.js";
9
- import V from "../../../../ui/text/text.js";
10
- import { BLOCK_TYPE as ee } from "../../../constants/block-constants.js";
6
+ import J from "../../../../ui/context-menu/context-menu.js";
7
+ import Q from "../../../../ui/lottie-animation/lottie-animation.js";
8
+ import U from "../../../../ui/text/text.js";
9
+ import { BLOCK_TYPE as V } from "../../../constants/block-constants.js";
11
10
  import { NODE_CARD_STATES as $ } from "../../../constants/node-constants.js";
12
- import { getNodeTypeBasedBgImage as te } from "../../../utils/index.js";
13
- import { getNodeCardBasedIcon as oe } from "../../../utils/node-card-utils.js";
14
- import { NodeCardContainer as re, NodeCardInfoWrapper as ne, IconWrapper as ae, StyledImportantIcon as ie, NodeCardContentWrapper as se, NodeCardTitle as ce } from "../node-card-styled.js";
15
- import de from "../node-card-tags.js";
16
- import me from "../node-menu-options/node-menu-options.js";
17
- const le = { renderer: "canvas", autoplay: !1 }, Le = z((A) => {
11
+ import { getNodeTypeBasedBgImage as ee } from "../../../utils/index.js";
12
+ import { getNodeCardBasedIcon as te } from "../../../utils/node-card-utils.js";
13
+ import { NodeCardContainer as ne, NodeCardInfoWrapper as oe, IconWrapper as re, StyledImportantIcon as ae, NodeCardContentWrapper as ie, NodeCardTitle as se } from "../node-card-styled.js";
14
+ import ce from "../node-card-tags.js";
15
+ import de from "../node-menu-options/node-menu-options.js";
16
+ const me = { renderer: "canvas", autoplay: !1 }, Ae = z((S) => {
18
17
  const {
19
18
  nodeData: t,
20
- imageHue: S,
19
+ imageHue: b,
21
20
  blockType: T,
22
21
  onNodeAttempt: a,
23
22
  onNodeReattempt: i,
24
23
  onNodeReview: s,
25
- onNodeView: o,
26
- isStudent: E
27
- } = A, {
28
- accuracy: L,
24
+ onNodeView: n,
25
+ isStudent: A
26
+ } = S, {
27
+ accuracy: E,
29
28
  attempt_location: y,
30
29
  node_type: p,
31
- card_header: R,
32
- title: w,
30
+ card_header: L,
31
+ title: R,
33
32
  state: c,
34
33
  is_optional: g,
35
34
  sheet_statement: _,
36
- permissions: B,
35
+ permissions: w,
37
36
  marked_as_completed: d
38
37
  } = t, {
39
38
  can_review: I,
40
39
  can_start: u,
41
- can_resume: h,
40
+ can_resume: f,
42
41
  can_reset: O
43
- } = B, x = T === ee.GOAL, n = c === $.LOCKED, N = c === $.NOT_STARTED, W = c === $.IN_PROGRESS, v = y === "INCLASS", M = u || h, b = !g && (W || N), f = !M && (O || I), C = F(null), D = te(p), { lottie: K } = oe(p), k = l(
44
- (r) => {
45
- switch (r) {
42
+ } = w, x = T === V.GOAL, r = c === $.LOCKED, N = c === $.NOT_STARTED, v = c === $.IN_PROGRESS, B = y === "INCLASS", M = u || f, W = !g && (v || N), h = !M && (O || I), C = F(null), D = ee(p), { lottie: G } = te(p), k = l(
43
+ (o) => {
44
+ switch (o) {
46
45
  case "node-card-review":
47
- d ? o == null || o(t) : s == null || s(t);
46
+ d ? n == null || n(t) : s == null || s(t);
48
47
  return;
49
48
  case "node-card-reattempt":
50
49
  i == null || i(t);
51
50
  return;
52
51
  default:
53
- throw new Error(`No callback function for ${r}`);
52
+ throw new Error(`No callback function for ${o}`);
54
53
  }
55
54
  },
56
- [t, i, s, o, d]
57
- ), G = l(() => {
58
- f || n || (u || h ? a == null || a(t) : d && (o == null || o(t)));
55
+ [t, i, s, n, d]
56
+ ), H = l(() => {
57
+ h || r || (u || f ? a == null || a(t) : d && (n == null || n(t)));
59
58
  }, [
60
- h,
59
+ f,
61
60
  u,
62
61
  t,
63
62
  a,
64
- o,
65
- f,
66
63
  n,
64
+ h,
65
+ r,
67
66
  d
68
- ]), H = l(() => {
69
- var r;
70
- n || (r = C.current) == null || r.play();
71
- }, [n]), P = l(() => {
72
- var r;
73
- (r = C.current) == null || r.stop();
74
- }, []), X = [
67
+ ]), K = l(() => {
68
+ var o;
69
+ r || (o = C.current) == null || o.play();
70
+ }, [r]), X = l(() => {
71
+ var o;
72
+ (o = C.current) == null || o.stop();
73
+ }, []), j = [
75
74
  {
76
75
  id: "node-card-review",
77
76
  label: "Review",
@@ -88,15 +87,15 @@ const le = { renderer: "canvas", autoplay: !1 }, Le = z((A) => {
88
87
  }
89
88
  ];
90
89
  return /* @__PURE__ */ e(
91
- Q,
90
+ J,
92
91
  {
93
92
  targetElement: /* @__PURE__ */ e(
94
- re,
93
+ ne,
95
94
  {
96
- $showOutline: !b,
97
- $background: `${S}_2`,
98
- $disabled: n,
99
- onClick: G,
95
+ $showOutline: !W,
96
+ $background: `${b}_2`,
97
+ $disabled: r,
98
+ onClick: H,
100
99
  children: /* @__PURE__ */ m(
101
100
  q,
102
101
  {
@@ -109,7 +108,7 @@ const le = { renderer: "canvas", autoplay: !1 }, Le = z((A) => {
109
108
  widthX: 11.25,
110
109
  children: [
111
110
  /* @__PURE__ */ m(
112
- ne,
111
+ oe,
113
112
  {
114
113
  $flexDirection: "row",
115
114
  $alignItems: "center",
@@ -117,12 +116,12 @@ const le = { renderer: "canvas", autoplay: !1 }, Le = z((A) => {
117
116
  $bgImage: D,
118
117
  $gutterX: 0.78125,
119
118
  $flexGap: 8.5,
120
- $opacity: n ? 0.5 : 1,
121
- onMouseEnter: H,
122
- onMouseLeave: P,
119
+ $opacity: r ? 0.5 : 1,
120
+ onMouseEnter: K,
121
+ onMouseLeave: X,
123
122
  children: [
124
123
  /* @__PURE__ */ m(
125
- ae,
124
+ re,
126
125
  {
127
126
  $width: 31,
128
127
  $height: 31,
@@ -132,42 +131,41 @@ const le = { renderer: "canvas", autoplay: !1 }, Le = z((A) => {
132
131
  $justifyContent: "center",
133
132
  children: [
134
133
  /* @__PURE__ */ e(
135
- U,
134
+ Q,
136
135
  {
137
- src: K,
136
+ src: G,
138
137
  ref: C,
139
- settings: le
138
+ settings: me
140
139
  }
141
140
  ),
142
- !g && /* @__PURE__ */ e(ie, {})
141
+ !g && /* @__PURE__ */ e(ae, {})
143
142
  ]
144
143
  }
145
144
  ),
146
- /* @__PURE__ */ m(V, { $renderAs: "ac4-black", $color: "BLACK", children: [
147
- R,
145
+ /* @__PURE__ */ m(U, { $renderAs: "ac4-black", $color: "BLACK", children: [
146
+ L,
148
147
  " ",
149
- v && "• CW"
150
- ] }),
151
- b && /* @__PURE__ */ e(J, { borderColor: "BLACK_1", borderWidth: 1 })
148
+ B && "• CW"
149
+ ] })
152
150
  ]
153
151
  }
154
152
  ),
155
153
  /* @__PURE__ */ e(
156
- de,
154
+ ce,
157
155
  {
158
156
  nodeType: p,
159
157
  state: c,
160
- accuracy: L,
161
- isStudent: E
158
+ accuracy: E,
159
+ isStudent: A
162
160
  }
163
161
  ),
164
- !x && /* @__PURE__ */ e(se, { $background: "WHITE_1", $heightX: 4, children: /* @__PURE__ */ e(
165
- ce,
162
+ !x && /* @__PURE__ */ e(ie, { $background: "WHITE_1", $heightX: 4, children: /* @__PURE__ */ e(
163
+ se,
166
164
  {
167
165
  $renderAs: "ab3",
168
166
  $color: "BLACK_1",
169
- $opacity: n ? 0.5 : 1,
170
- children: w
167
+ $opacity: r ? 0.5 : 1,
168
+ children: R
171
169
  }
172
170
  ) })
173
171
  ]
@@ -179,11 +177,11 @@ const le = { renderer: "canvas", autoplay: !1 }, Le = z((A) => {
179
177
  menuWidth: "100%",
180
178
  menuZIndex: 6,
181
179
  menuOffset: 2,
182
- menuElement: f ? /* @__PURE__ */ e(me, { options: X }) : /* @__PURE__ */ e(j, {})
180
+ menuElement: h ? /* @__PURE__ */ e(de, { options: j }) : /* @__PURE__ */ e(P, {})
183
181
  }
184
182
  );
185
183
  });
186
184
  export {
187
- Le as default
185
+ Ae as default
188
186
  };
189
187
  //# sourceMappingURL=student-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"student-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/student-actions/student-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\n\nimport { memo, useCallback, useRef, type FC } from 'react';\n\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport RedoIcon from '../../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport BorderPathAnimation from '../../../../ui/border-path-animation/border-path-animation';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\nconst StudentActions: FC<Omit<INodeCardProps, 'userType'>> = memo(props => {\n const {\n nodeData,\n imageHue,\n blockType,\n onNodeAttempt,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n isStudent,\n } = props;\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n marked_as_completed: teacherMarkedAsCompleted,\n } = nodeData;\n const {\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n can_reset: canReset,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n const canStartOrResume = canStart || canResume;\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n const renderOptions = !canStartOrResume && (canReset || canReview);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-review':\n teacherMarkedAsCompleted ? onNodeView?.(nodeData) : onNodeReview?.(nodeData);\n\n return;\n\n case 'node-card-reattempt':\n onNodeReattempt?.(nodeData);\n\n return;\n\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [nodeData, onNodeReattempt, onNodeReview, onNodeView, teacherMarkedAsCompleted],\n );\n\n const handleOnNodeCardClick = useCallback(() => {\n if (renderOptions || sheetLocked) return;\n\n if (canStart || canResume) {\n onNodeAttempt?.(nodeData);\n } else if (teacherMarkedAsCompleted) {\n onNodeView?.(nodeData);\n }\n }, [\n canResume,\n canStart,\n nodeData,\n onNodeAttempt,\n onNodeView,\n renderOptions,\n sheetLocked,\n teacherMarkedAsCompleted,\n ]);\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-review',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-reattempt',\n label: 'Reattempt',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <ContextMenu\n targetElement={\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $background={`${imageHue}_2`}\n $disabled={sheetLocked}\n onClick={handleOnNodeCardClick}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={!sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $opacity={sheetLocked ? 0.5 : 1}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n {showCardAnimation && <BorderPathAnimation borderColor=\"BLACK_1\" borderWidth={1} />}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n isStudent={isStudent}\n />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper $background=\"WHITE_1\" $heightX={4}>\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n }\n startLeft\n menuWidth=\"100%\"\n menuZIndex={6}\n menuOffset={2}\n menuElement={renderOptions ? <NodeMenuOptions options={menuOptions} /> : <></>}\n />\n );\n});\n\nexport default StudentActions;\n"],"names":["renderSettings","StudentActions","memo","props","nodeData","imageHue","blockType","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeView","isStudent","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","teacherMarkedAsCompleted","canReview","canStart","canResume","canReset","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","canStartOrResume","showCardAnimation","renderOptions","animationRef","useRef","nodeBgImage","getNodeTypeBasedBgImage","nodeCardLottie","getNodeCardBasedIcon","handleOnMenuOptionClick","useCallback","optionId","handleOnNodeCardClick","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","RedoIcon","jsx","ContextMenu","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","NodeMenuOptions","Fragment"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAEvDC,KAAuDC,EAAK,CAASC,MAAA;AACnE,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,EACE,IAAAR,GACE;AAAA,IACJ,UAAAS;AAAA,IACA,kBAAkBC;AAAA,IAClB,WAAWC;AAAA,IACX,aAAaC;AAAA,IACb,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAaC;AAAA,IACb,iBAAiBC;AAAA,IACjB,aAAAC;AAA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AAA,8BAACO;AAAA,8BAAA;AAAA,gCACC,KAAKnB;AAAA,gCACL,KAAKJ;AAAA,gCACL,UAAUpC;AAAA,8BAAA;AAAA,4BACZ;AAAA,4BACC,CAACkB,KAAe,gBAAAkC,EAAAQ,IAAA,EAA2B;AAAA,0BAAA;AAAA,wBAAA;AAAA,sBAC9C;AAAA,sBAEC,gBAAAL,EAAAM,GAAA,EAAK,WAAU,aAAY,QAAO,SAChC,UAAA;AAAA,wBAAA9C;AAAA,wBAAW;AAAA,wBAAEiB,KAAgB;AAAA,sBAAA,GAChC;AAAA,sBACCE,KAAsB,gBAAAkB,EAAAU,GAAA,EAAoB,aAAY,WAAU,aAAa,GAAG;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACnF;AAAA,gBAEA,gBAAAV;AAAA,kBAACW;AAAA,kBAAA;AAAA,oBACC,UAAAjD;AAAA,oBACA,OAAAG;AAAA,oBACA,UAAAL;AAAA,oBACA,WAAAD;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAEC,CAACe,KACC,gBAAA0B,EAAAY,IAAA,EAA8B,aAAY,WAAU,UAAU,GAC7D,UAAA,gBAAAZ;AAAA,kBAACa;AAAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,QAAO;AAAA,oBACP,UAAUrC,IAAc,MAAM;AAAA,oBAE7B,UAAAZ;AAAA,kBAAA;AAAA,gBAAA,GAEL;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,WAAS;AAAA,MACT,WAAU;AAAA,MACV,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,aAAamB,IAAgB,gBAAAiB,EAACc,MAAgB,SAASjB,EAAA,CAAa,IAAO,gBAAAG,EAAAe,GAAA,EAAA;AAAA,IAAA;AAAA,EAAA;AAGjF,CAAC;"}
1
+ {"version":3,"file":"student-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/student-actions/student-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\n\nimport { memo, useCallback, useRef, type FC } from 'react';\n\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport RedoIcon from '../../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\n// import BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\nconst StudentActions: FC<Omit<INodeCardProps, 'userType'>> = memo(props => {\n const {\n nodeData,\n imageHue,\n blockType,\n onNodeAttempt,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n isStudent,\n } = props;\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n marked_as_completed: teacherMarkedAsCompleted,\n } = nodeData;\n const {\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n can_reset: canReset,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n const canStartOrResume = canStart || canResume;\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n const renderOptions = !canStartOrResume && (canReset || canReview);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-review':\n teacherMarkedAsCompleted ? onNodeView?.(nodeData) : onNodeReview?.(nodeData);\n\n return;\n\n case 'node-card-reattempt':\n onNodeReattempt?.(nodeData);\n\n return;\n\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [nodeData, onNodeReattempt, onNodeReview, onNodeView, teacherMarkedAsCompleted],\n );\n\n const handleOnNodeCardClick = useCallback(() => {\n if (renderOptions || sheetLocked) return;\n\n if (canStart || canResume) {\n onNodeAttempt?.(nodeData);\n } else if (teacherMarkedAsCompleted) {\n onNodeView?.(nodeData);\n }\n }, [\n canResume,\n canStart,\n nodeData,\n onNodeAttempt,\n onNodeView,\n renderOptions,\n sheetLocked,\n teacherMarkedAsCompleted,\n ]);\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-review',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-reattempt',\n label: 'Reattempt',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <ContextMenu\n targetElement={\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $background={`${imageHue}_2`}\n $disabled={sheetLocked}\n onClick={handleOnNodeCardClick}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={!sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $opacity={sheetLocked ? 0.5 : 1}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n {/* {showCardAnimation && <BorderPathAnimation />} */}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n isStudent={isStudent}\n />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper $background=\"WHITE_1\" $heightX={4}>\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n }\n startLeft\n menuWidth=\"100%\"\n menuZIndex={6}\n menuOffset={2}\n menuElement={renderOptions ? <NodeMenuOptions options={menuOptions} /> : <></>}\n />\n );\n});\n\nexport default StudentActions;\n"],"names":["renderSettings","StudentActions","memo","props","nodeData","imageHue","blockType","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeView","isStudent","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","teacherMarkedAsCompleted","canReview","canStart","canResume","canReset","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","canStartOrResume","showCardAnimation","renderOptions","animationRef","useRef","nodeBgImage","getNodeTypeBasedBgImage","nodeCardLottie","getNodeCardBasedIcon","handleOnMenuOptionClick","useCallback","optionId","handleOnNodeCardClick","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","RedoIcon","jsx","ContextMenu","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","NodeMenuOptions","Fragment"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAEvDC,KAAuDC,EAAK,CAASC,MAAA;AACnE,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,EACE,IAAAR,GACE;AAAA,IACJ,UAAAS;AAAA,IACA,kBAAkBC;AAAA,IAClB,WAAWC;AAAA,IACX,aAAaC;AAAA,IACb,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAaC;AAAA,IACb,iBAAiBC;AAAA,IACjB,aAAAC;AAAA,IACA,qBAAqBC;AAAA,EACnB,IAAAjB,GACE;AAAA,IACJ,YAAYkB;AAAA,IACZ,WAAWC;AAAA,IACX,YAAYC;AAAA,IACZ,WAAWC;AAAA,EACT,IAAAL,GAEEM,IAAcpB,MAAcqB,EAAW,MACvCC,IAAcX,MAAUY,EAAiB,QACzCC,IAAkBb,MAAUY,EAAiB,aAC7CE,IAAkBd,MAAUY,EAAiB,aAC7CG,IAAenB,MAAoB,WACnCoB,IAAmBV,KAAYC,GAE/BU,IAAoB,CAAChB,MAAea,KAAmBD,IACvDK,IAAgB,CAACF,MAAqBR,KA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BAAA;AAAA,gBAGF;AAAA,gBAEA,gBAAAoB;AAAA,kBAACU;AAAA,kBAAA;AAAA,oBACC,UAAAhD;AAAA,oBACA,OAAAG;AAAA,oBACA,UAAAL;AAAA,oBACA,WAAAD;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAEC,CAACe,KACC,gBAAA0B,EAAAW,IAAA,EAA8B,aAAY,WAAU,UAAU,GAC7D,UAAA,gBAAAX;AAAA,kBAACY;AAAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,QAAO;AAAA,oBACP,UAAUpC,IAAc,MAAM;AAAA,oBAE7B,UAAAZ;AAAA,kBAAA;AAAA,gBAAA,GAEL;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,WAAS;AAAA,MACT,WAAU;AAAA,MACV,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,aAAamB,IAAgB,gBAAAiB,EAACa,MAAgB,SAAShB,EAAA,CAAa,IAAO,gBAAAG,EAAAc,GAAA,EAAA;AAAA,IAAA;AAAA,EAAA;AAGjF,CAAC;"}
@@ -1,111 +1,110 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { memo as U, useRef as O, useCallback as $ } from "react";
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { memo as U, useRef as S, useCallback as $ } from "react";
3
3
  import Y from "../../../../../assets/line-icons/icons/check2.js";
4
4
  import q from "../../../../../assets/line-icons/icons/eye2.js";
5
5
  import J from "../../../../../assets/line-icons/icons/home2.js";
6
- import T from "../../../../../assets/line-icons/icons/more-vertical.js";
6
+ import k from "../../../../../assets/line-icons/icons/more-vertical.js";
7
7
  import N from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
8
- import Q from "../../../../ui/border-path-animation/border-path-animation.js";
9
- import V from "../../../../ui/hooks/use-context-menu-click-handler.js";
10
- import Z from "../../../../ui/layout/flex-view.js";
11
- import D from "../../../../ui/lottie-animation/lottie-animation.js";
12
- import ee from "../../../../ui/text/text.js";
13
- import { BLOCK_TYPE as re } from "../../../constants/block-constants.js";
8
+ import Q from "../../../../ui/hooks/use-context-menu-click-handler.js";
9
+ import V from "../../../../ui/layout/flex-view.js";
10
+ import Z from "../../../../ui/lottie-animation/lottie-animation.js";
11
+ import D from "../../../../ui/text/text.js";
12
+ import { BLOCK_TYPE as ee } from "../../../constants/block-constants.js";
14
13
  import { NODE_CARD_STATES as C, TEACHER_MENU_LABELS as te } from "../../../constants/node-constants.js";
15
- import { getNodeTypeBasedBgImage as ne } from "../../../utils/index.js";
16
- import { getNodeCardBasedIcon as oe } from "../../../utils/node-card-utils.js";
17
- import { NodeCardContainer as ie, NodeCardInfoWrapper as ae, IconWrapper as ce, StyledImportantIcon as se, NodeKebabMenuWrapper as y, NodeCardContentWrapper as le, NodeCardTitle as de, NodeMenuOptionsWrapper as me } from "../node-card-styled.js";
18
- import pe from "../node-card-tags.js";
19
- import he from "../node-menu-options/node-menu-options.js";
20
- const fe = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: ue, REVIEW: $e, VIEW: Ce, MARK_AS_DONE: _e } = te, Re = U(
14
+ import { getNodeTypeBasedBgImage as re } from "../../../utils/index.js";
15
+ import { getNodeCardBasedIcon as ne } from "../../../utils/node-card-utils.js";
16
+ import { NodeCardContainer as ie, NodeCardInfoWrapper as oe, IconWrapper as ae, StyledImportantIcon as ce, NodeKebabMenuWrapper as O, NodeCardContentWrapper as se, NodeCardTitle as le, NodeMenuOptionsWrapper as de } from "../node-card-styled.js";
17
+ import me from "../node-card-tags.js";
18
+ import pe from "../node-menu-options/node-menu-options.js";
19
+ const he = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: fe, REVIEW: ue, VIEW: $e, MARK_AS_DONE: Ce } = te, Ge = U(
21
20
  ({
22
- nodeData: t,
23
- imageHue: A,
24
- blockType: W,
25
- isSkipped: _,
26
- onNodeAttemptLocationChange: i,
21
+ nodeData: r,
22
+ imageHue: T,
23
+ blockType: y,
24
+ isSkipped: x,
25
+ onNodeAttemptLocationChange: o,
27
26
  onNodeMarkAsDone: a,
28
27
  onNodeView: c,
29
28
  onNodeReview: s
30
29
  }) => {
31
- const d = O(null), { menuVisible: x, onMenuClick: I } = V(d), {
32
- accuracy: B,
33
- attempt_location: L,
30
+ const d = S(null), { menuVisible: A, onMenuClick: _ } = Q(d), {
31
+ accuracy: W,
32
+ attempt_location: w,
34
33
  node_type: m,
35
- card_header: w,
36
- title: M,
34
+ card_header: L,
35
+ title: B,
37
36
  state: l,
38
- is_optional: b,
37
+ is_optional: I,
39
38
  sheet_statement: g,
40
- permissions: H,
39
+ permissions: M,
41
40
  user_attempt_id: p
42
- } = t, { lottie: K } = oe(m), h = O(null), {
41
+ } = r, { lottie: H } = ne(m), h = S(null), {
43
42
  can_change_attempt_location: G,
44
- can_mark_familiar: R,
43
+ can_mark_familiar: K,
45
44
  can_review: f
46
- } = H, E = W === re.GOAL, n = l === C.LOCKED, j = l === C.NOT_STARTED, v = l === C.IN_PROGRESS, S = L === "INCLASS", k = !b && (v || j), P = ne(m), u = $(
47
- (r) => {
48
- switch (r) {
45
+ } = M, b = y === ee.GOAL, n = l === C.LOCKED, R = l === C.NOT_STARTED, j = l === C.IN_PROGRESS, E = w === "INCLASS", v = !I && (j || R), X = re(m), u = $(
46
+ (t) => {
47
+ switch (t) {
49
48
  case "node-card-view":
50
- f && p ? s == null || s(t) : c == null || c(t);
49
+ f && p ? s == null || s(r) : c == null || c(r);
51
50
  return;
52
51
  case "node-card-assign-as-hw":
53
- i == null || i(t);
52
+ o == null || o(r);
54
53
  return;
55
54
  case "node-card-mark-as-done":
56
- a == null || a(t);
55
+ a == null || a(r);
57
56
  return;
58
57
  default:
59
- throw new Error(`No callback function for ${r}`);
58
+ throw new Error(`No callback function for ${t}`);
60
59
  }
61
60
  },
62
61
  [
63
62
  f,
64
- t,
65
- i,
63
+ r,
64
+ o,
66
65
  a,
67
66
  s,
68
67
  c,
69
68
  p
70
69
  ]
71
- ), X = $(() => {
72
- var r;
73
- n || (r = h.current) == null || r.play();
70
+ ), P = $(() => {
71
+ var t;
72
+ n || (t = h.current) == null || t.play();
74
73
  }, [n]), F = $(() => {
75
- var r;
76
- (r = h.current) == null || r.stop();
74
+ var t;
75
+ (t = h.current) == null || t.stop();
77
76
  }, []), z = [
78
77
  {
79
78
  id: "node-card-view",
80
- label: f && p ? $e : Ce,
79
+ label: f && p ? ue : $e,
81
80
  icon: q,
82
81
  disabled: !1,
83
82
  onClick: u
84
83
  },
85
84
  {
86
85
  id: "node-card-assign-as-hw",
87
- label: ue,
86
+ label: fe,
88
87
  icon: J,
89
- disabled: !G || !S,
88
+ disabled: !G || !E,
90
89
  onClick: u
91
90
  },
92
91
  {
93
92
  id: "node-card-mark-as-done",
94
- label: _e,
93
+ label: Ce,
95
94
  icon: Y,
96
- disabled: !R,
95
+ disabled: !K,
97
96
  onClick: u
98
97
  }
99
98
  ];
100
- return /* @__PURE__ */ o(
99
+ return /* @__PURE__ */ i(
101
100
  ie,
102
101
  {
103
- $showOutline: !k,
102
+ $showOutline: !v,
104
103
  $isSheetLocked: n,
105
- $background: `${A}_2`,
106
- $disabled: !!_,
104
+ $background: `${T}_2`,
105
+ $disabled: !!x,
107
106
  children: [
108
- /* @__PURE__ */ o(
107
+ /* @__PURE__ */ i(
109
108
  N,
110
109
  {
111
110
  renderAs: "primary",
@@ -116,21 +115,21 @@ const fe = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: ue, REVIEW: $e,
116
115
  parentWidth: "100%",
117
116
  widthX: 11.25,
118
117
  children: [
119
- /* @__PURE__ */ o(
120
- ae,
118
+ /* @__PURE__ */ i(
119
+ oe,
121
120
  {
122
121
  $flexDirection: "row",
123
122
  $alignItems: "center",
124
123
  $width: "100%",
125
124
  $heightX: 3.5,
126
- $bgImage: P,
125
+ $bgImage: X,
127
126
  $gutterX: 0.78125,
128
127
  $flexGap: 8.5,
129
- onMouseEnter: X,
128
+ onMouseEnter: P,
130
129
  onMouseLeave: F,
131
130
  children: [
132
- /* @__PURE__ */ o(
133
- ce,
131
+ /* @__PURE__ */ i(
132
+ ae,
134
133
  {
135
134
  $width: 31,
136
135
  $height: 31,
@@ -140,24 +139,23 @@ const fe = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: ue, REVIEW: $e,
140
139
  $justifyContent: "center",
141
140
  $opacity: n ? 0.5 : 1,
142
141
  children: [
143
- /* @__PURE__ */ e(D, { src: K, ref: h, settings: fe }),
144
- !b && /* @__PURE__ */ e(se, {})
142
+ /* @__PURE__ */ e(Z, { src: H, ref: h, settings: he }),
143
+ !I && /* @__PURE__ */ e(ce, {})
145
144
  ]
146
145
  }
147
146
  ),
148
- /* @__PURE__ */ o(ee, { $renderAs: "ac4-black", $color: "BLACK", $opacity: n ? 0.5 : 1, children: [
149
- w,
147
+ /* @__PURE__ */ i(D, { $renderAs: "ac4-black", $color: "BLACK", $opacity: n ? 0.5 : 1, children: [
148
+ L,
150
149
  " ",
151
- S && "• CW"
150
+ E && "• CW"
152
151
  ] }),
153
- /* @__PURE__ */ e(Z, { className: "context-menu", children: E && /* @__PURE__ */ e(y, { ref: d, onClick: I, children: /* @__PURE__ */ e(T, { width: 16, height: 16 }) }) }),
154
- k && !_ && /* @__PURE__ */ e(Q, { borderColor: "BLACK_1", borderWidth: 1 })
152
+ /* @__PURE__ */ e(V, { className: "context-menu", children: b && /* @__PURE__ */ e(O, { ref: d, onClick: _, children: /* @__PURE__ */ e(k, { width: 16, height: 16 }) }) })
155
153
  ]
156
154
  }
157
155
  ),
158
- /* @__PURE__ */ e(pe, { nodeType: m, state: l, accuracy: B }),
159
- !E && /* @__PURE__ */ o(
160
- le,
156
+ /* @__PURE__ */ e(me, { nodeType: m, state: l, accuracy: W }),
157
+ !b && /* @__PURE__ */ i(
158
+ se,
161
159
  {
162
160
  $flexDirection: "row",
163
161
  $alignItems: "center",
@@ -167,28 +165,28 @@ const fe = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: ue, REVIEW: $e,
167
165
  $justifyContent: "space-between",
168
166
  children: [
169
167
  /* @__PURE__ */ e(
170
- de,
168
+ le,
171
169
  {
172
170
  $renderAs: "ab3",
173
171
  $color: "BLACK_1",
174
172
  $opacity: n ? 0.5 : 1,
175
- children: M
173
+ children: B
176
174
  }
177
175
  ),
178
- /* @__PURE__ */ e(y, { ref: d, onClick: I, children: /* @__PURE__ */ e(T, { width: 16, height: 16 }) })
176
+ /* @__PURE__ */ e(O, { ref: d, onClick: _, children: /* @__PURE__ */ e(k, { width: 16, height: 16 }) })
179
177
  ]
180
178
  }
181
179
  )
182
180
  ]
183
181
  }
184
182
  ),
185
- /* @__PURE__ */ e(me, { $visible: x, children: /* @__PURE__ */ e(he, { options: z }) })
183
+ /* @__PURE__ */ e(de, { $visible: A, children: /* @__PURE__ */ e(pe, { options: z }) })
186
184
  ]
187
185
  }
188
186
  );
189
187
  }
190
188
  );
191
189
  export {
192
- Re as default
190
+ Ge as default
193
191
  };
194
192
  //# sourceMappingURL=teacher-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport BorderPathAnimation from '../../../../ui/border-path-animation/border-path-animation';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES, TEACHER_MENU_LABELS } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\nconst { ASSIGN_AS_HW, REVIEW, VIEW, MARK_AS_DONE } = TEACHER_MENU_LABELS;\n\nconst TeacherActions: FC<Omit<INodeCardProps, 'userType'>> = memo(\n ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeView,\n onNodeReview,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n user_attempt_id: userAttemptId,\n } = nodeData;\n\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_review: canReview,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAttemptLocationChange?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n canReview,\n nodeData,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReview,\n onNodeView,\n userAttemptId,\n ],\n );\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: canReview && userAttemptId ? REVIEW : VIEW,\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: ASSIGN_AS_HW,\n icon: Home2Icon,\n disabled: !canChangeAttemptLocation || !inClassSheet,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: MARK_AS_DONE,\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $isSheetLocked={sheetLocked}\n $background={`${imageHue}_2`}\n $disabled={Boolean(isSkipped)}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={!sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\" $opacity={sheetLocked ? 0.5 : 1}>\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n )}\n </FlexView>\n\n {showCardAnimation && !isSkipped && (\n <BorderPathAnimation borderColor=\"BLACK_1\" borderWidth={1} />\n )}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n\n <Styled.NodeMenuOptionsWrapper $visible={menuVisible}>\n <NodeMenuOptions options={menuOptions} />\n </Styled.NodeMenuOptionsWrapper>\n </Styled.NodeCardContainer>\n );\n },\n);\n\nexport default TeacherActions;\n"],"names":["renderSettings","ASSIGN_AS_HW","REVIEW","VIEW","MARK_AS_DONE","TEACHER_MENU_LABELS","TeacherActions","memo","nodeData","imageHue","blockType","isSkipped","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeView","onNodeReview","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","userAttemptId","nodeCardLottie","getNodeCardBasedIcon","animationRef","canChangeAttemptLocation","canMarkFamiliar","canReview","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","showCardAnimation","nodeBgImage","getNodeTypeBasedBgImage","handleOnMenuOptionClick","useCallback","optionId","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","Home2Icon","Check2Icon","jsxs","Styled.NodeCardContainer","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","jsx","LottieAnimation","Styled.StyledImportantIcon","Text","FlexView","Styled.NodeKebabMenuWrapper","MoreVerticalIcon","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","Styled.NodeMenuOptionsWrapper","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GACvD,EAAE,cAAAC,IAAc,QAAAC,IAAQ,MAAAC,IAAM,cAAAC,OAAiBC,IAE/CC,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY,GAEtE;AAAA,MACJ,UAAAK;AAAA,MACA,k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C,EAACM,GAAiB,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,GAC3C;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,UAEA,gBAAAN,EAACW,IAAA,EAA8B,UAAUvD,GACvC,UAAC,gBAAA4C,EAAAY,IAAA,EAAgB,SAASrB,EAAA,CAAa,EACzC,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES, TEACHER_MENU_LABELS } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\n// import BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\nconst { ASSIGN_AS_HW, REVIEW, VIEW, MARK_AS_DONE } = TEACHER_MENU_LABELS;\n\nconst TeacherActions: FC<Omit<INodeCardProps, 'userType'>> = memo(\n ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeView,\n onNodeReview,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n user_attempt_id: userAttemptId,\n } = nodeData;\n\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_review: canReview,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAttemptLocationChange?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n canReview,\n nodeData,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReview,\n onNodeView,\n userAttemptId,\n ],\n );\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: canReview && userAttemptId ? REVIEW : VIEW,\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: ASSIGN_AS_HW,\n icon: Home2Icon,\n disabled: !canChangeAttemptLocation || !inClassSheet,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: MARK_AS_DONE,\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $isSheetLocked={sheetLocked}\n $background={`${imageHue}_2`}\n $disabled={Boolean(isSkipped)}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={!sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\" $opacity={sheetLocked ? 0.5 : 1}>\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n )}\n </FlexView>\n\n {/* {showCardAnimation && !isSkipped && <BorderPathAnimation />} */}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n\n <Styled.NodeMenuOptionsWrapper $visible={menuVisible}>\n <NodeMenuOptions options={menuOptions} />\n </Styled.NodeMenuOptionsWrapper>\n </Styled.NodeCardContainer>\n );\n },\n);\n\nexport default TeacherActions;\n"],"names":["renderSettings","ASSIGN_AS_HW","REVIEW","VIEW","MARK_AS_DONE","TEACHER_MENU_LABELS","TeacherActions","memo","nodeData","imageHue","blockType","isSkipped","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeView","onNodeReview","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","userAttemptId","nodeCardLottie","getNodeCardBasedIcon","animationRef","canChangeAttemptLocation","canMarkFamiliar","canReview","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","showCardAnimation","nodeBgImage","getNodeTypeBasedBgImage","handleOnMenuOptionClick","useCallback","optionId","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","Home2Icon","Check2Icon","jsxs","Styled.NodeCardContainer","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","jsx","LottieAnimation","Styled.StyledImportantIcon","Text","FlexView","Styled.NodeKebabMenuWrapper","MoreVerticalIcon","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","Styled.NodeMenuOptionsWrapper","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GACvD,EAAE,cAAAC,IAAc,QAAAC,IAAQ,MAAAC,IAAM,cAAAC,OAAiBC,IAE/CC,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY,GAEtE;AAAA,MACJ,UAAAK;AAAA,MACA,kBAAkBC;AAAA,MAClB,WAAWC;AAAA,MACX,aAAaC;AAAA,MACb,OAAAC;AAAA,MACA,OAAAC;AAAA,MACA,aAAaC;AAAA,MACb,iBAAiBC;AAAA,MACjB,aAAAC;AAAA,MACA,iBAAiBC;AAAA,IACf,IAAAtB,GAEE,EAAE,QAAQuB,EAAe,IAAIC,GAAqBT,CAAQ,GAC1DU,IAAehB,EAAmC,IAAI,GAEtD;AAAA,MACJ,6BAA6BiB;AAAA,MAC7B,mBAAmBC;AAAA,MACnB,YAAYC;AAAA,IACV,IAAAP,GAEEQ,IAAc3B,MAAc4B,GAAW,MACvCC,IAAcb,MAAUc,EAAiB,QACzCC,IAAkBf,MAAU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,WAAU,gBACjB,eACE,gBAAAJ,EAAAK,GAAA,EAA4B,KAAKnD,GAAc,SAASG,GACvD,4BAACiD,GAAiB,EAAA,OAAO,IAAI,QAAQ,IAAI,GAC3C,EAEJ,CAAA;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAGF;AAAA,gBAEC,gBAAAN,EAAAO,IAAA,EAAa,UAAA9C,GAAoB,OAAAG,GAAc,UAAAL,EAAoB,CAAA;AAAA,gBAEnE,CAACgB,KACA,gBAAAoB;AAAA,kBAACa;AAAAA,kBAAA;AAAA,oBACC,gBAAe;AAAA,oBACf,aAAY;AAAA,oBACZ,aAAY;AAAA,oBACZ,UAAU;AAAA,oBACV,UAAU;AAAA,oBACV,iBAAgB;AAAA,oBAEhB,UAAA;AAAA,sBAAA,gBAAAR;AAAA,wBAACS;AAAAA,wBAAA;AAAA,0BACC,WAAU;AAAA,0BACV,QAAO;AAAA,0BACP,UAAUhC,IAAc,MAAM;AAAA,0BAE7B,UAAAd;AAAA,wBAAA;AAAA,sBACH;AAAA,sBAEC,gBAAAqC,EAAAK,GAAA,EAA4B,KAAKnD,GAAc,SAASG,GACvD,UAAA,gBAAA2C,EAACM,GAAiB,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,GAC3C;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,UAEA,gBAAAN,EAACU,IAAA,EAA8B,UAAUtD,GACvC,UAAC,gBAAA4C,EAAAW,IAAA,EAAgB,SAASpB,EAAA,CAAa,EACzC,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
@@ -1,5 +1,5 @@
1
1
  import { State as e } from "./sign-up-types.js";
2
- const h = [e.ACTIVE, e.PAUSED, e.PAID], i = [e.TRIAL, e.DEMO], p = [
2
+ const a = [e.ACTIVE, e.PAUSED, e.PAID], h = [e.TRIAL, e.DEMO], p = [
3
3
  { label: "2", key: "2", sup: "nd" },
4
4
  { label: "3", key: "3", sup: "rd" },
5
5
  { label: "4", key: "4", sup: "th" },
@@ -11,14 +11,14 @@ const h = [e.ACTIVE, e.PAUSED, e.PAID], i = [e.TRIAL, e.DEMO], p = [
11
11
  { label: "10", key: "10", sup: "th" },
12
12
  { label: "11", key: "11", sup: "th" },
13
13
  { label: "12", key: "12", sup: "th" }
14
- ], t = 440, s = 640, n = window.innerWidth / t, a = window.innerHeight / s, l = Math.min(n, a), u = Math.min(s * l, s), b = Math.min(t * l, t);
14
+ ], t = 440, s = 640, l = window.innerWidth / t, i = window.innerHeight / s, n = window.innerWidth < window.innerHeight ? l : i, r = Math.min(s * n, s), u = Math.min(t * n, t);
15
15
  export {
16
16
  s as ACTUAL_HEIGHT,
17
17
  t as ACTUAL_WIDTH,
18
- u as CONTAINER_HEIGHT,
19
- b as CONTAINER_WIDTH,
18
+ r as CONTAINER_HEIGHT,
19
+ u as CONTAINER_WIDTH,
20
20
  p as GRADES,
21
- h as userIsEnrolledCases,
22
- i as userIsOnTrialCases
21
+ a as userIsEnrolledCases,
22
+ h as userIsOnTrialCases
23
23
  };
24
24
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/features/circle-games/sign-up/constants.ts"],"sourcesContent":["import type { Grade } from './comp/grade-input/grade-input-types';\n\nimport { State } from './sign-up-types';\n\nexport const userIsEnrolledCases = [State.ACTIVE, State.PAUSED, State.PAID];\nexport const userIsOnTrialCases = [State.TRIAL, State.DEMO];\n\nexport const GRADES: Grade[] = [\n { label: '2', key: '2', sup: 'nd' },\n { label: '3', key: '3', sup: 'rd' },\n { label: '4', key: '4', sup: 'th' },\n { label: '5', key: '5', sup: 'th' },\n { label: '6', key: '6', sup: 'th' },\n { label: '7', key: '7', sup: 'th' },\n { label: '8', key: '8', sup: 'th' },\n { label: '9', key: '9', sup: 'th' },\n { label: '10', key: '10', sup: 'th' },\n { label: '11', key: '11', sup: 'th' },\n { label: '12', key: '12', sup: 'th' },\n];\n\nexport const MIN_HEIGHT_TO_SUPPORT = 540;\nexport const ACTUAL_WIDTH = 440;\nexport const ACTUAL_HEIGHT = 640;\n\nconst widthRatio = window.innerWidth / ACTUAL_WIDTH;\nconst heightRatio = window.innerHeight / ACTUAL_HEIGHT;\nconst ratio = Math.min(widthRatio, heightRatio);\n\nexport const CONTAINER_HEIGHT = Math.min(ACTUAL_HEIGHT * ratio, ACTUAL_HEIGHT);\nexport const CONTAINER_WIDTH = Math.min(ACTUAL_WIDTH * ratio, ACTUAL_WIDTH);\n"],"names":["userIsEnrolledCases","State","userIsOnTrialCases","GRADES","ACTUAL_WIDTH","ACTUAL_HEIGHT","widthRatio","heightRatio","ratio","CONTAINER_HEIGHT","CONTAINER_WIDTH"],"mappings":";AAIO,MAAMA,IAAsB,CAACC,EAAM,QAAQA,EAAM,QAAQA,EAAM,IAAI,GAC7DC,IAAqB,CAACD,EAAM,OAAOA,EAAM,IAAI,GAE7CE,IAAkB;AAAA,EAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AACtC,GAGaC,IAAe,KACfC,IAAgB,KAEvBC,IAAa,OAAO,aAAaF,GACjCG,IAAc,OAAO,cAAcF,GACnCG,IAAQ,KAAK,IAAIF,GAAYC,CAAW,GAEjCE,IAAmB,KAAK,IAAIJ,IAAgBG,GAAOH,CAAa,GAChEK,IAAkB,KAAK,IAAIN,IAAeI,GAAOJ,CAAY;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/features/circle-games/sign-up/constants.ts"],"sourcesContent":["import type { Grade } from './comp/grade-input/grade-input-types';\n\nimport { State } from './sign-up-types';\n\nexport const userIsEnrolledCases = [State.ACTIVE, State.PAUSED, State.PAID];\nexport const userIsOnTrialCases = [State.TRIAL, State.DEMO];\n\nexport const GRADES: Grade[] = [\n { label: '2', key: '2', sup: 'nd' },\n { label: '3', key: '3', sup: 'rd' },\n { label: '4', key: '4', sup: 'th' },\n { label: '5', key: '5', sup: 'th' },\n { label: '6', key: '6', sup: 'th' },\n { label: '7', key: '7', sup: 'th' },\n { label: '8', key: '8', sup: 'th' },\n { label: '9', key: '9', sup: 'th' },\n { label: '10', key: '10', sup: 'th' },\n { label: '11', key: '11', sup: 'th' },\n { label: '12', key: '12', sup: 'th' },\n];\n\nexport const MIN_HEIGHT_TO_SUPPORT = 540;\nexport const ACTUAL_WIDTH = 440;\nexport const ACTUAL_HEIGHT = 640;\n\nconst widthRatio = window.innerWidth / ACTUAL_WIDTH;\nconst heightRatio = window.innerHeight / ACTUAL_HEIGHT;\nconst ratio = window.innerWidth < window.innerHeight ? widthRatio : heightRatio;\n\nexport const CONTAINER_HEIGHT = Math.min(ACTUAL_HEIGHT * ratio, ACTUAL_HEIGHT);\nexport const CONTAINER_WIDTH = Math.min(ACTUAL_WIDTH * ratio, ACTUAL_WIDTH);\n"],"names":["userIsEnrolledCases","State","userIsOnTrialCases","GRADES","ACTUAL_WIDTH","ACTUAL_HEIGHT","widthRatio","heightRatio","ratio","CONTAINER_HEIGHT","CONTAINER_WIDTH"],"mappings":";AAIO,MAAMA,IAAsB,CAACC,EAAM,QAAQA,EAAM,QAAQA,EAAM,IAAI,GAC7DC,IAAqB,CAACD,EAAM,OAAOA,EAAM,IAAI,GAE7CE,IAAkB;AAAA,EAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AACtC,GAGaC,IAAe,KACfC,IAAgB,KAEvBC,IAAa,OAAO,aAAaF,GACjCG,IAAc,OAAO,cAAcF,GACnCG,IAAQ,OAAO,aAAa,OAAO,cAAcF,IAAaC,GAEvDE,IAAmB,KAAK,IAAIJ,IAAgBG,GAAOH,CAAa,GAChEK,IAAkB,KAAK,IAAIN,IAAeI,GAAOJ,CAAY;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.0.1-as1",
3
+ "version": "3.0.1-hg1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -93,6 +93,5 @@
93
93
  "vite-plugin-dts": "3.6.4",
94
94
  "vite-plugin-svgr": "3.2.0",
95
95
  "vite-tsconfig-paths": "^4.2.2"
96
- },
97
- "packageManager": "yarn@4.4.1"
96
+ }
98
97
  }
@@ -1,51 +0,0 @@
1
- import i, { css as s } from "styled-components";
2
- const o = i.div`
3
- position: absolute;
4
- z-index: 1;
5
- overflow: hidden;
6
- `, d = i(o)(
7
- ({ $borderWidth: t }) => `
8
- top: 0;
9
- left: 0;
10
- width: 100%;
11
- height: ${t}px;
12
- `
13
- ), c = i(o)(
14
- ({ $borderWidth: t }) => `
15
- bottom: 0;
16
- left: 0;
17
- width: 100%;
18
- height: ${t}px;
19
- `
20
- ), l = i(o)(
21
- ({ $borderWidth: t }) => `
22
- top: 0;
23
- right: 0;
24
- width: ${t}px;
25
- height: 100%;
26
- `
27
- ), $ = i(o)(
28
- ({ $borderWidth: t }) => `
29
- top: 0;
30
- left: 0;
31
- width: ${t}px;
32
- height: 100%;
33
- `
34
- ), g = i.div(
35
- ({ theme: t, $width: n, $height: e, $borderColor: h, $animationDuration: p, $keyframes: r }) => s`
36
- position: relative;
37
- width: ${n}px;
38
- height: ${e}px;
39
- background-color: ${t.colors[h]};
40
- opacity: 0;
41
- animation: ${r} ${p}s linear infinite;
42
- `
43
- );
44
- export {
45
- c as BottomLineContainer,
46
- $ as LeftLineContainer,
47
- g as Line,
48
- l as RightLineContainer,
49
- d as TopLineContainer
50
- };
51
- //# sourceMappingURL=border-path-animation-styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"border-path-animation-styled.js","sources":["../../../../src/features/ui/border-path-animation/border-path-animation-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../types';\nimport type { keyframes } from 'styled-components';\n\nimport styled, { css } from 'styled-components';\n\nconst LineContainer = styled.div`\n position: absolute;\n z-index: 1;\n overflow: hidden;\n`;\n\nexport const TopLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n top: 0;\n left: 0;\n width: 100%;\n height: ${$borderWidth}px;\n`,\n);\n\nexport const BottomLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n bottom: 0;\n left: 0;\n width: 100%;\n height: ${$borderWidth}px;\n`,\n);\n\nexport const RightLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n top: 0;\n right: 0;\n width: ${$borderWidth}px;\n height: 100%;\n`,\n);\n\nexport const LeftLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n top: 0;\n left: 0;\n width: ${$borderWidth}px;\n height: 100%;\n`,\n);\n\nexport const Line = styled.div<{\n $borderColor: TColorNames;\n $animationDuration: number;\n $keyframes: ReturnType<typeof keyframes>;\n $width: number;\n $height: number;\n}>(\n ({ theme, $width, $height, $borderColor, $animationDuration, $keyframes }) => css`\n position: relative;\n width: ${$width}px;\n height: ${$height}px;\n background-color: ${theme.colors[$borderColor]};\n opacity: 0;\n animation: ${$keyframes} ${$animationDuration}s linear infinite;\n `,\n);\n"],"names":["LineContainer","styled","TopLineContainer","$borderWidth","BottomLineContainer","RightLineContainer","LeftLineContainer","Line","theme","$width","$height","$borderColor","$animationDuration","$keyframes","css"],"mappings":";AAKA,MAAMA,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMhBC,IAAmBD,EAAOD,CAAa;AAAA,EAGlD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA;AAAA,YAIZA,CAAY;AAAA;AAExB,GAEaC,IAAsBH,EAAOD,CAAa;AAAA,EAGrD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA;AAAA,YAIZA,CAAY;AAAA;AAExB,GAEaE,IAAqBJ,EAAOD,CAAa;AAAA,EAGpD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA,WAGbA,CAAY;AAAA;AAAA;AAGvB,GAEaG,IAAoBL,EAAOD,CAAa;AAAA,EAGnD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA,WAGbA,CAAY;AAAA;AAAA;AAGvB,GAEaI,IAAON,EAAO;AAAA,EAOzB,CAAC,EAAE,OAAAO,GAAO,QAAAC,GAAQ,SAAAC,GAAS,cAAAC,GAAc,oBAAAC,GAAoB,YAAAC,EAAiB,MAAAC;AAAA;AAAA,aAEnEL,CAAM;AAAA,cACLC,CAAO;AAAA,wBACGF,EAAM,OAAOG,CAAY,CAAC;AAAA;AAAA,iBAEjCE,CAAU,IAAID,CAAkB;AAAA;AAEjD;"}
@@ -1,108 +0,0 @@
1
- import { jsxs as p, Fragment as g, jsx as s } from "react/jsx-runtime";
2
- import { memo as b, useState as d, useMemo as l, useRef as u, useLayoutEffect as C } from "react";
3
- import { keyframes as L } from "styled-components";
4
- import { TopLineContainer as k, Line as c, RightLineContainer as W, BottomLineContainer as R, LeftLineContainer as D } from "./border-path-animation-styled.js";
5
- const F = (i, r) => {
6
- const t = (i + r) * 2, o = i, e = r, y = i / t, n = (i + r) / t, a = (i + r + i) / t;
7
- return {
8
- top: [
9
- [0, { x: 0, y: 0, o: 1 }],
10
- [y, { x: o, y: 0, o: 1 }],
11
- [y + 1e-3, { x: o, y: 0, o: 0 }],
12
- [n - 1e-3, { x: -o, y: 0, o: 0 }],
13
- [n, { x: -o, y: 0, o: 1 }],
14
- [a, { x: 0, y: 0, o: 1 }],
15
- [1, { x: 0, y: 0, o: 1 }]
16
- ],
17
- right: [
18
- [0, { x: 0, y: 0, o: 1 }],
19
- [y, { x: 0, y: 0, o: 1 }],
20
- [n, { x: 0, y: e, o: 1 }],
21
- [n + 1e-3, { x: 0, y: e, o: 0 }],
22
- [a - 1e-3, { x: 0, y: -e, o: 0 }],
23
- [a, { x: 0, y: -e, o: 1 }],
24
- [1, { x: 0, y: 0, o: 1 }]
25
- ],
26
- bottom: [
27
- [0, { x: o, y: 0, o: 1 }],
28
- [y, { x: 0, y: 0, o: 1 }],
29
- [n, { x: 0, y: 0, o: 1 }],
30
- [a, { x: -o, y: 0, o: 1 }],
31
- [a + 1e-3, { x: -o, y: 0, o: 0 }],
32
- [a + 2e-3, { x: o, y: 0, o: 0 }],
33
- [1, { x: o, y: 0, o: 1 }]
34
- ],
35
- left: [
36
- [0, { x: 0, y: e, o: 1 }],
37
- [y, { x: 0, y: e, o: 1 }],
38
- [n, { x: 0, y: 0, o: 1 }],
39
- [a, { x: 0, y: 0, o: 1 }],
40
- [1, { x: 0, y: -e, o: 1 }]
41
- ]
42
- };
43
- }, $ = (i) => L`
44
- ${i.map(
45
- ([r, { x: t, y: o, o: e }]) => `${r * 100}% {
46
- transform: translate(${t}px, ${o}px);
47
- opacity: ${e};
48
- }`
49
- ).join(" ")}
50
- `, K = b((i) => {
51
- const { animationDuration: r = 6, borderWidth: t = 1, borderColor: o = "YELLOW_3" } = i, [e, y] = d(1), [n, a] = d(1), m = l(() => F(e, n), [e, n]), x = l(
52
- () => ({
53
- top: $(m.top),
54
- right: $(m.right),
55
- bottom: $(m.bottom),
56
- left: $(m.left)
57
- }),
58
- [m]
59
- ), f = u(null), h = u(null);
60
- return C(() => {
61
- f.current && y(f.current.getBoundingClientRect().width), h.current && a(h.current.getBoundingClientRect().height);
62
- }, []), /* @__PURE__ */ p(g, { children: [
63
- /* @__PURE__ */ s(k, { className: "top-line", ref: f, $borderWidth: t, children: /* @__PURE__ */ s(
64
- c,
65
- {
66
- $borderColor: o,
67
- $width: e,
68
- $height: t,
69
- $animationDuration: r,
70
- $keyframes: x.top
71
- }
72
- ) }),
73
- /* @__PURE__ */ s(W, { ref: h, $borderWidth: t, children: /* @__PURE__ */ s(
74
- c,
75
- {
76
- $width: t,
77
- $height: n,
78
- $borderColor: o,
79
- $animationDuration: r,
80
- $keyframes: x.right
81
- }
82
- ) }),
83
- /* @__PURE__ */ s(R, { $borderWidth: t, children: /* @__PURE__ */ s(
84
- c,
85
- {
86
- $borderColor: o,
87
- $width: e,
88
- $height: t,
89
- $animationDuration: r,
90
- $keyframes: x.bottom
91
- }
92
- ) }),
93
- /* @__PURE__ */ s(D, { $borderWidth: t, children: /* @__PURE__ */ s(
94
- c,
95
- {
96
- $width: t,
97
- $height: n,
98
- $borderColor: o,
99
- $animationDuration: r,
100
- $keyframes: x.left
101
- }
102
- ) })
103
- ] });
104
- });
105
- export {
106
- K as default
107
- };
108
- //# sourceMappingURL=border-path-animation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"border-path-animation.js","sources":["../../../../src/features/ui/border-path-animation/border-path-animation.tsx"],"sourcesContent":["import type {\n IBorderPathAnimationProps,\n IGetKeyFrames,\n IGetKeyFramesConfig,\n} from './border-path-animation-types';\nimport type { FC } from 'react';\n\nimport { memo, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { keyframes } from 'styled-components';\n\nimport * as Styled from './border-path-animation-styled';\n\nconst getKeyFramesConfig: IGetKeyFramesConfig = (width, height) => {\n const p = (width + height) * 2; // perimeter\n const w = width;\n const h = height;\n const bp1 = width / p;\n const bp2 = (width + height) / p;\n const bp3 = (width + height + width) / p;\n\n return {\n top: [\n [0, { x: 0, y: 0, o: 1 }],\n [bp1, { x: w, y: 0, o: 1 }],\n\n [bp1 + 0.001, { x: w, y: 0, o: 0 }],\n [bp2 - 0.001, { x: -w, y: 0, o: 0 }],\n\n [bp2, { x: -w, y: 0, o: 1 }],\n [bp3, { x: 0, y: 0, o: 1 }],\n [1, { x: 0, y: 0, o: 1 }],\n ],\n right: [\n [0, { x: 0, y: 0, o: 1 }],\n [bp1, { x: 0, y: 0, o: 1 }],\n [bp2, { x: 0, y: h, o: 1 }],\n\n [bp2 + 0.001, { x: 0, y: h, o: 0 }],\n [bp3 - 0.001, { x: 0, y: -h, o: 0 }],\n\n [bp3, { x: 0, y: -h, o: 1 }],\n [1, { x: 0, y: 0, o: 1 }],\n ],\n bottom: [\n [0, { x: w, y: 0, o: 1 }],\n [bp1, { x: 0, y: 0, o: 1 }],\n [bp2, { x: 0, y: 0, o: 1 }],\n [bp3, { x: -w, y: 0, o: 1 }],\n\n [bp3 + 0.001, { x: -w, y: 0, o: 0 }],\n [bp3 + 0.002, { x: w, y: 0, o: 0 }],\n [1, { x: w, y: 0, o: 1 }],\n ],\n left: [\n [0, { x: 0, y: h, o: 1 }],\n [bp1, { x: 0, y: h, o: 1 }],\n [bp2, { x: 0, y: 0, o: 1 }],\n [bp3, { x: 0, y: 0, o: 1 }],\n [1, { x: 0, y: -h, o: 1 }],\n ],\n };\n};\n\nconst getKeyFrames: IGetKeyFrames = config => {\n return keyframes`\n ${config\n .map(\n ([percentage, { x, y, o }]) => `${percentage * 100}% {\n transform: translate(${x}px, ${y}px);\n opacity: ${o};\n }`,\n )\n .join(' ')}\n `;\n};\n\nconst BorderPathAnimation: FC<IBorderPathAnimationProps> = memo(props => {\n const { animationDuration = 6, borderWidth = 1, borderColor = 'YELLOW_3' } = props;\n const [width, setWidth] = useState(1);\n const [height, setHeight] = useState(1);\n const keyFramesConfig = useMemo(() => getKeyFramesConfig(width, height), [width, height]);\n const keyFrames = useMemo(\n () => ({\n top: getKeyFrames(keyFramesConfig.top),\n right: getKeyFrames(keyFramesConfig.right),\n bottom: getKeyFrames(keyFramesConfig.bottom),\n left: getKeyFrames(keyFramesConfig.left),\n }),\n [keyFramesConfig],\n );\n const topRef = useRef<HTMLDivElement>(null);\n const rightRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n if (topRef.current) {\n setWidth(topRef.current.getBoundingClientRect().width);\n }\n\n if (rightRef.current) {\n setHeight(rightRef.current.getBoundingClientRect().height);\n }\n }, []);\n\n return (\n <>\n <Styled.TopLineContainer className=\"top-line\" ref={topRef} $borderWidth={borderWidth}>\n <Styled.Line\n $borderColor={borderColor}\n $width={width}\n $height={borderWidth}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.top}\n />\n </Styled.TopLineContainer>\n <Styled.RightLineContainer ref={rightRef} $borderWidth={borderWidth}>\n <Styled.Line\n $width={borderWidth}\n $height={height}\n $borderColor={borderColor}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.right}\n />\n </Styled.RightLineContainer>\n <Styled.BottomLineContainer $borderWidth={borderWidth}>\n <Styled.Line\n $borderColor={borderColor}\n $width={width}\n $height={borderWidth}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.bottom}\n />\n </Styled.BottomLineContainer>\n <Styled.LeftLineContainer $borderWidth={borderWidth}>\n <Styled.Line\n $width={borderWidth}\n $height={height}\n $borderColor={borderColor}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.left}\n />\n </Styled.LeftLineContainer>\n </>\n );\n});\n\nexport default BorderPathAnimation;\n"],"names":["getKeyFramesConfig","width","height","p","w","h","bp1","bp2","bp3","getKeyFrames","config","keyframes","percentage","x","y","o","BorderPathAnimation","memo","props","animationDuration","borderWidth","borderColor","setWidth","useState","setHeight","keyFramesConfig","useMemo","keyFrames","topRef","useRef","rightRef","useLayoutEffect","jsxs","Fragment","jsx","Styled.TopLineContainer","Styled.Line","Styled.RightLineContainer","Styled.BottomLineContainer","Styled.LeftLineContainer"],"mappings":";;;;AAYA,MAAMA,IAA0C,CAACC,GAAOC,MAAW;AAC3D,QAAAC,KAAKF,IAAQC,KAAU,GACvBE,IAAIH,GACJI,IAAIH,GACJI,IAAML,IAAQE,GACdI,KAAON,IAAQC,KAAUC,GACzBK,KAAOP,IAAQC,IAASD,KAASE;AAEhC,SAAA;AAAA,IACL,KAAK;AAAA,MACH,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MACxB,CAACG,GAAK,EAAE,GAAGF,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MAE1B,CAACE,IAAM,MAAO,EAAE,GAAGF,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MAClC,CAACG,IAAM,MAAO,EAAE,GAAG,CAACH,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MAEnC,CAACG,GAAK,EAAE,GAAG,CAACH,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MAC3B,CAACI,GAAK,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MAC1B,CAAC,GAAG,EAAE,G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