@cuemath/leap 2.9.8-as1 → 2.9.8-as12
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.
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +9 -9
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +19 -12
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +40 -48
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +157 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js +58 -182
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/styles.js +24 -24
- package/dist/features/homework/styles.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark-styled.js +5 -12
- package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +90 -111
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +268 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js +513 -0
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/styles.js +23 -0
- package/dist/features/journey/hooks/use-home-page-journey/styles.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +22 -0
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js +270 -0
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js.map +1 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +0 -3
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/index.d.ts +10 -25
- package/dist/index.js +495 -505
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/alarm.js +0 -41
- package/dist/assets/line-icons/icons/alarm.js.map +0 -1
- package/dist/assets/line-icons/icons/dart.js +0 -23
- package/dist/assets/line-icons/icons/dart.js.map +0 -1
- package/dist/assets/line-icons/icons/puzzle.js +0 -25
- package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
- package/dist/assets/line-icons/icons/recap.js +0 -32
- package/dist/assets/line-icons/icons/recap.js.map +0 -1
- package/dist/assets/line-icons/icons/testtube.js +0 -33
- package/dist/assets/line-icons/icons/testtube.js.map +0 -1
- package/dist/features/journey/hooks/use-home-page-journey.js +0 -189
- package/dist/features/journey/hooks/use-home-page-journey.js.map +0 -1
@@ -1,191 +1,67 @@
|
|
1
|
-
import {
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
|
7
|
-
|
8
|
-
import ee from "../homework-card.js";
|
9
|
-
import { useGetHomeworks as re } from "./api/get-homeworks.js";
|
10
|
-
import { ContentWrapper as oe, ScrollButton as x, ScrollContainer as te, QueueWrapper as ne, QueueText as ie } from "./hw-card-list-styled.js";
|
11
|
-
const le = ({
|
12
|
-
userType: a,
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
2
|
+
import { memo as b, useEffect as e, useCallback as j } from "react";
|
3
|
+
import { useJourney as A } from "../../journey/use-journey/use-journey.js";
|
4
|
+
import { useGetHomeworks as D } from "./api/get-homeworks.js";
|
5
|
+
import E from "./hw-card-list-view.js";
|
6
|
+
const F = ({
|
7
|
+
userType: r,
|
13
8
|
studentId: i,
|
14
|
-
stream:
|
15
|
-
onTestStart:
|
16
|
-
onNodeAttempt:
|
17
|
-
onTestPreview:
|
18
|
-
onNodeView:
|
19
|
-
onTestReview:
|
20
|
-
onNodeReview:
|
21
|
-
onNodeUnassign:
|
22
|
-
homeworkRef:
|
23
|
-
|
24
|
-
|
25
|
-
canStartJourney: k
|
9
|
+
stream: o,
|
10
|
+
onTestStart: k,
|
11
|
+
onNodeAttempt: p,
|
12
|
+
onTestPreview: C,
|
13
|
+
onNodeView: H,
|
14
|
+
onTestReview: a,
|
15
|
+
onNodeReview: g,
|
16
|
+
onNodeUnassign: v,
|
17
|
+
homeworkRef: L,
|
18
|
+
startHomePageJourney: c,
|
19
|
+
canStartJourney: m
|
26
20
|
}) => {
|
27
|
-
const
|
28
|
-
get:
|
29
|
-
data:
|
30
|
-
isProcessingFailed:
|
31
|
-
isProcessing:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
21
|
+
const {
|
22
|
+
get: l,
|
23
|
+
data: x,
|
24
|
+
isProcessingFailed: P,
|
25
|
+
isProcessing: f,
|
26
|
+
isProcessed: w,
|
27
|
+
isStale: t
|
28
|
+
} = D(i), { isJourneyActive: n } = A();
|
29
|
+
e(() => {
|
30
|
+
w && c && !n && m && c({ studentId: i, stream: o, userType: r });
|
36
31
|
}, [
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
32
|
+
m,
|
33
|
+
n,
|
34
|
+
w,
|
35
|
+
c,
|
36
|
+
o,
|
42
37
|
i,
|
43
|
-
|
38
|
+
r
|
44
39
|
]);
|
45
|
-
const
|
46
|
-
|
47
|
-
|
48
|
-
|
40
|
+
const s = j(() => {
|
41
|
+
l(i, void 0, { stream: o });
|
42
|
+
}, [l, o, i]);
|
43
|
+
return e(() => {
|
44
|
+
!f && t && s();
|
45
|
+
}, [s, f, t]), e(() => {
|
46
|
+
s();
|
47
|
+
}, [s]), P ? null : /* @__PURE__ */ h("div", { ref: L, children: /* @__PURE__ */ h(
|
48
|
+
E,
|
49
|
+
{
|
50
|
+
isHwProcessing: f,
|
51
|
+
hwDetails: x,
|
52
|
+
onTestStart: k,
|
53
|
+
onNodeAttempt: p,
|
54
|
+
onTestPreview: C,
|
55
|
+
onNodeView: H,
|
56
|
+
onTestReview: a,
|
57
|
+
onNodeReview: g,
|
58
|
+
onNodeUnassign: v,
|
59
|
+
userType: r,
|
60
|
+
studentId: i
|
49
61
|
}
|
50
|
-
|
51
|
-
|
52
|
-
}, [n]), F = s(() => {
|
53
|
-
o.current && (o.current.scrollBy({ left: 200, behavior: "smooth" }), n());
|
54
|
-
}, [n]), M = s(() => {
|
55
|
-
o.current && n();
|
56
|
-
}, [n]), Q = s(() => {
|
57
|
-
m(!1), L(!1);
|
58
|
-
}, []);
|
59
|
-
f(() => {
|
60
|
-
const r = o.current;
|
61
|
-
if (r)
|
62
|
-
return r.addEventListener("scroll", n), () => {
|
63
|
-
r.removeEventListener("scroll", n);
|
64
|
-
};
|
65
|
-
}, [n]), f(() => {
|
66
|
-
if (e && (e == null ? void 0 : e.length) > 3 && o.current) {
|
67
|
-
const { scrollLeft: r } = o.current;
|
68
|
-
r > 1 && m(!0);
|
69
|
-
}
|
70
|
-
}, [e]);
|
71
|
-
const u = s(() => {
|
72
|
-
_(i, void 0, { stream: d });
|
73
|
-
}, [_, d, i]);
|
74
|
-
f(() => {
|
75
|
-
!p && b && u();
|
76
|
-
}, [u, p, b]), f(() => {
|
77
|
-
u();
|
78
|
-
}, [u]);
|
79
|
-
const X = U(
|
80
|
-
() => ((e == null ? void 0 : e.filter((r) => r.state === "WAIT_FOR_REVIEW")) || []).length,
|
81
|
-
[e]
|
82
|
-
);
|
83
|
-
return e && e.length === 0 ? /* @__PURE__ */ c(h, { $flexRowGapX: 1, children: [
|
84
|
-
/* @__PURE__ */ c(C, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
85
|
-
"Homework (",
|
86
|
-
e == null ? void 0 : e.length,
|
87
|
-
")"
|
88
|
-
] }),
|
89
|
-
/* @__PURE__ */ t(C, { $renderAs: "ab2", $color: "BLACK_T_60", children: "No Homework assigned yet" })
|
90
|
-
] }) : G ? null : /* @__PURE__ */ c(oe, { ref: T, $flexRowGapX: 1, $disablePointerEvents: p, children: [
|
91
|
-
/* @__PURE__ */ c(C, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
92
|
-
"Homework (",
|
93
|
-
X,
|
94
|
-
"/",
|
95
|
-
e == null ? void 0 : e.length,
|
96
|
-
")"
|
97
|
-
] }),
|
98
|
-
/* @__PURE__ */ c(
|
99
|
-
h,
|
100
|
-
{
|
101
|
-
$position: "relative",
|
102
|
-
onMouseEnter: M,
|
103
|
-
onMouseLeave: Q,
|
104
|
-
children: [
|
105
|
-
/* @__PURE__ */ t(
|
106
|
-
x,
|
107
|
-
{
|
108
|
-
$position: "absolute",
|
109
|
-
$background: "BLACK_T_60",
|
110
|
-
$justifyContent: "center",
|
111
|
-
$alignItems: "center",
|
112
|
-
$height: "100%",
|
113
|
-
onClick: N,
|
114
|
-
$visible: K,
|
115
|
-
left: "0px",
|
116
|
-
right: "auto",
|
117
|
-
children: /* @__PURE__ */ t(Z, { width: 24, height: 24 })
|
118
|
-
}
|
119
|
-
),
|
120
|
-
/* @__PURE__ */ t(te, { ref: o, children: /* @__PURE__ */ t(h, { $flexDirection: "row", $flexGapX: 1, children: e == null ? void 0 : e.map((r, l) => {
|
121
|
-
const {
|
122
|
-
node_id: g,
|
123
|
-
worksheet_id: O,
|
124
|
-
node_type: V,
|
125
|
-
title: P,
|
126
|
-
subtext: Y
|
127
|
-
} = r, v = V === "DYNAMIC";
|
128
|
-
return /* @__PURE__ */ c(
|
129
|
-
h,
|
130
|
-
{
|
131
|
-
ref: l === 0 ? y : void 0,
|
132
|
-
$flexDirection: "row",
|
133
|
-
$flexGapX: 1,
|
134
|
-
children: [
|
135
|
-
e.length > 10 && l === 10 && /* @__PURE__ */ t(
|
136
|
-
ne,
|
137
|
-
{
|
138
|
-
$background: "BLACK_4",
|
139
|
-
$justifyContent: "center",
|
140
|
-
$gutter: 4,
|
141
|
-
$gap: 8,
|
142
|
-
children: /* @__PURE__ */ t(ie, { $renderAs: "ac3", $color: "WHITE", children: "In Queue" })
|
143
|
-
}
|
144
|
-
),
|
145
|
-
/* @__PURE__ */ t(
|
146
|
-
ee,
|
147
|
-
{
|
148
|
-
isInQueue: e.length > 10 && l > 9,
|
149
|
-
userType: a,
|
150
|
-
header: P,
|
151
|
-
subHeader: Y || "",
|
152
|
-
nodeData: r,
|
153
|
-
renderAs: "homework",
|
154
|
-
studentId: i,
|
155
|
-
onNodeAttempt: v ? R : w,
|
156
|
-
shouldOpenOnRight: !0,
|
157
|
-
onNodeView: v ? E : B,
|
158
|
-
onNodeReview: v ? W : I,
|
159
|
-
onNodeUnassign: S
|
160
|
-
}
|
161
|
-
)
|
162
|
-
]
|
163
|
-
},
|
164
|
-
`${O}_${g}_${l}`
|
165
|
-
);
|
166
|
-
}) }) }),
|
167
|
-
/* @__PURE__ */ t(
|
168
|
-
x,
|
169
|
-
{
|
170
|
-
$position: "absolute",
|
171
|
-
$width: "60px",
|
172
|
-
$height: "100%",
|
173
|
-
$background: "BLACK_T_60",
|
174
|
-
$justifyContent: "center",
|
175
|
-
$alignItems: "center",
|
176
|
-
onClick: F,
|
177
|
-
$visible: j,
|
178
|
-
left: "auto",
|
179
|
-
right: "0px",
|
180
|
-
children: /* @__PURE__ */ t(J, { width: 24, height: 24 })
|
181
|
-
}
|
182
|
-
)
|
183
|
-
]
|
184
|
-
}
|
185
|
-
)
|
186
|
-
] });
|
187
|
-
}, ge = q(le);
|
62
|
+
) });
|
63
|
+
}, u = b(F);
|
188
64
|
export {
|
189
|
-
|
65
|
+
u as default
|
190
66
|
};
|
191
67
|
//# sourceMappingURL=hw-card-list.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/types/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport ChevronLeftIcon from '../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../assets/line-icons/icons/chevron-right';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport HomeworkCard from '../homework-card';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport * as Styled from './hw-card-list-styled';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n individualHomeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({\n hwDetails,\n studentId,\n stream,\n userType,\n }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n individualHomeworkRef,\n startHomePageJourney,\n canStartJourney,\n}) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const [isLeftHovered, setIsLeftHovered] = useState(false);\n const [isRightHovered, setIsRightHovered] = useState(false);\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n useEffect(() => {\n if (hwDetails?.length && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ hwDetails, studentId, stream, userType });\n }\n }, [\n canStartJourney,\n hwDetails,\n isJourneyActive,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const updatedCanScroll = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n\n if (scrollLeft < scrollWidth - clientWidth - 1) {\n setIsRightHovered(true);\n }\n }\n }, []);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n const handleHoverEnter = useCallback(() => {\n if (!scrollRef.current) return;\n\n updatedCanScroll();\n }, [updatedCanScroll]);\n\n const handleHoverLeave = useCallback(() => {\n setIsLeftHovered(false);\n setIsRightHovered(false);\n }, []);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n scrollElement.addEventListener('scroll', updatedCanScroll);\n\n return () => {\n scrollElement.removeEventListener('scroll', updatedCanScroll);\n };\n }\n }, [updatedCanScroll]);\n\n useEffect(() => {\n if (hwDetails && hwDetails?.length > 3 && scrollRef.current) {\n const { scrollLeft } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n }\n }, [hwDetails]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n const waitForReviewSheets = useMemo(\n () => (hwDetails?.filter(sheet => sheet.state === 'WAIT_FOR_REVIEW') || []).length,\n [hwDetails],\n );\n\n if (hwDetails && hwDetails.length === 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({hwDetails?.length})\n </Text>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_60\">\n No Homework assigned yet\n </Text>\n </FlexView>\n );\n }\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <Styled.ContentWrapper ref={homeworkRef} $flexRowGapX={1} $disablePointerEvents={isProcessing}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({waitForReviewSheets}/{hwDetails?.length})\n </Text>\n <FlexView\n $position=\"relative\"\n onMouseEnter={handleHoverEnter}\n onMouseLeave={handleHoverLeave}\n >\n <Styled.ScrollButton\n $position=\"absolute\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={isLeftHovered}\n left=\"0px\"\n right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n {hwDetails?.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n ref={idx === 0 ? individualHomeworkRef : undefined}\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n {hwDetails.length > 10 && idx === 10 && (\n <Styled.QueueWrapper\n $background=\"BLACK_4\"\n $justifyContent=\"center\"\n $gutter={4}\n $gap={8}\n >\n <Styled.QueueText $renderAs=\"ac3\" $color=\"WHITE\">\n In Queue\n </Styled.QueueText>\n </Styled.QueueWrapper>\n )}\n <HomeworkCard\n isInQueue={hwDetails.length > 10 && idx > 9}\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n <Styled.ScrollButton\n $position=\"absolute\"\n $width=\"60px\"\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={isRightHovered}\n left=\"auto\"\n right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","individualHomeworkRef","startHomePageJourney","canStartJourney","scrollRef","useRef","isLeftHovered","setIsLeftHovered","useState","isRightHovered","setIsRightHovered","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isStale","useGetHomeworks","isJourneyActive","useJourney","useEffect","updatedCanScroll","useCallback","scrollLeft","scrollWidth","clientWidth","handleScrollLeft","handleScrollRight","handleHoverEnter","handleHoverLeave","scrollElement","fetchHomeworks","waitForReviewSheets","useMemo","sheet","jsxs","FlexView","Text","Styled.ContentWrapper","jsx","Styled.ScrollButton","ChevronLeftIcon","Styled.ScrollContainer","idx","nodeId","worksheetId","nodeType","title","subtext","isDynamicSheet","Styled.QueueWrapper","Styled.QueueText","HomeworkCard","ChevronRightIcon","HWCardList$1","memo"],"mappings":";;;;;;;;;;AAoCA,MAAMA,KAAwC,CAAC;AAAA,EAC7C,UAAAC;AAAA,EACA,WAAAC;AAAA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ACL,OAAM;AAAA,cAEN,UAAC,gBAAA6B,EAAAc,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,YAAA;AAAA,UAC3C;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeC,KAAAC,EAAKjE,EAAU;"}
|
1
|
+
{"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect } from 'react';\n\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport HwCardListView from './hw-card-list-view';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({ studentId, stream, userType }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n startHomePageJourney,\n canStartJourney,\n}) => {\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isProcessed,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n useEffect(() => {\n if (isProcessed && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ studentId, stream, userType });\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isProcessed,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <div ref={homeworkRef}>\n <HwCardListView\n isHwProcessing={isProcessing}\n hwDetails={hwDetails}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onTestPreview={onTestPreview}\n onNodeView={onNodeView}\n onTestReview={onTestReview}\n onNodeReview={onNodeReview}\n onNodeUnassign={onNodeUnassign}\n userType={userType}\n studentId={studentId}\n />\n </div>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","startHomePageJourney","canStartJourney","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isProcessed","isStale","useGetHomeworks","isJourneyActive","useJourney","useEffect","fetchHomeworks","useCallback","jsx","HwCardListView","hwCardList","memo"],"mappings":";;;;;AAyBA,MAAMA,IAAwC,CAAC;AAAA,EAC7C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,oBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,IACEC,EAAgBlB,CAAS,GACvB,EAAE,iBAAAmB,MAAoBC;AAE5B,EAAAC,EAAU,MAAM;AACd,IAAIL,KAAeN,KAAwB,CAACS,KAAmBR,KAC7DD,EAAqB,EAAE,WAAAV,GAAW,QAAAC,GAAQ,UAAAF,EAAU,CAAA;AAAA,EACtD,GACC;AAAA,IACDY;AAAA,IACAQ;AAAA,IACAH;AAAA,IACAN;AAAA,IACAT;AAAA,IACAD;AAAA,IACAD;AAAA,EAAA,CACD;AAEK,QAAAuB,IAAiBC,EAAY,MAAM;AACvC,IAAAX,EAAaZ,GAAW,QAAW,EAAE,QAAAC,EAAQ,CAAA;AAAA,EAC5C,GAAA,CAACW,GAAcX,GAAQD,CAAS,CAAC;AAYpC,SAVAqB,EAAU,MAAM;AACV,IAAA,CAACN,KAAgBE,KACJK;EAEhB,GAAA,CAACA,GAAgBP,GAAcE,CAAO,CAAC,GAE1CI,EAAU,MAAM;AACC,IAAAC;EAAA,GACd,CAACA,CAAc,CAAC,GAEfR,IACK,OAIP,gBAAAU,EAAC,OAAI,EAAA,KAAKf,GACR,UAAA,gBAAAe;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBV;AAAA,MAChB,WAAAF;AAAA,MACA,aAAAX;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAT;AAAA,MACA,WAAAC;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEe0B,IAAAC,EAAK7B,CAAU;"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import r from "styled-components";
|
2
2
|
import n from "../../assets/line-icons/icons/minus2.js";
|
3
|
-
import
|
3
|
+
import t from "../ui/layout/flex-view.js";
|
4
4
|
import i from "../ui/text/text.js";
|
5
|
-
const l = r(
|
5
|
+
const l = r(t)(({ theme: o }) => `
|
6
6
|
cursor: pointer;
|
7
7
|
width: 24px;
|
8
8
|
height: 24px;
|
@@ -18,9 +18,9 @@ const l = r(e)(({ theme: o }) => `
|
|
18
18
|
-webkit-box-orient: vertical;
|
19
19
|
overflow: hidden;
|
20
20
|
text-overflow: ellipsis;
|
21
|
-
`,
|
21
|
+
`, x = r(t)(({
|
22
22
|
$shouldopenonright: o,
|
23
|
-
$visible:
|
23
|
+
$visible: e
|
24
24
|
}) => `
|
25
25
|
cursor: pointer;
|
26
26
|
position: absolute;
|
@@ -28,37 +28,37 @@ const l = r(e)(({ theme: o }) => `
|
|
28
28
|
top: calc(100% + 4px);
|
29
29
|
right: ${o ? 0 : "auto"};
|
30
30
|
transform-origin: top;
|
31
|
-
transform: scaleY(${
|
32
|
-
opacity: ${
|
31
|
+
transform: scaleY(${e ? 1 : 0});
|
32
|
+
opacity: ${e ? 1 : 0};
|
33
33
|
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
34
34
|
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);
|
35
35
|
z-index: 10;
|
36
|
-
`),
|
36
|
+
`), u = r(t)`
|
37
37
|
border: 1px solid ${({ theme: o }) => o.colors.BLACK_T_15};
|
38
|
-
|
39
38
|
&:hover {
|
40
39
|
border: 1px solid ${({ theme: o }) => o.colors.BLACK};
|
40
|
+
border-top-width: 2px;
|
41
41
|
}
|
42
|
-
`, b = r(
|
42
|
+
`, b = r(t)(({ $bgImage: o }) => o ? `
|
43
43
|
background-image: url(${o});
|
44
44
|
background-repeat: no-repeat;
|
45
45
|
background-size: cover;
|
46
46
|
background-position: center;
|
47
47
|
overflow: hidden;
|
48
|
-
` : "overflow: hidden;"), h = r(
|
48
|
+
` : "overflow: hidden;"), h = r(t)`
|
49
49
|
display: flex;
|
50
50
|
align-items: center;
|
51
51
|
justify-content: center;
|
52
|
-
`, w = r(
|
52
|
+
`, w = r(t)`
|
53
53
|
position: absolute;
|
54
54
|
right: -18px;
|
55
55
|
top: -4px;
|
56
56
|
`, f = r.img(({ theme: o }) => {
|
57
|
-
const { gutter:
|
57
|
+
const { gutter: e } = o.layout;
|
58
58
|
return `
|
59
59
|
border: 1px solid ${o.colors.BLACK_T_15};
|
60
|
-
width: ${
|
61
|
-
height: ${
|
60
|
+
width: ${e * 4}px;
|
61
|
+
height: ${e * 4}px;
|
62
62
|
border-radius: 50%;
|
63
63
|
`;
|
64
64
|
}), g = r(n)`
|
@@ -73,15 +73,15 @@ const l = r(e)(({ theme: o }) => `
|
|
73
73
|
text-overflow: ellipsis;
|
74
74
|
white-space: break-spaces;
|
75
75
|
`;
|
76
|
-
r(
|
77
|
-
const k = r(
|
76
|
+
r(t)``;
|
77
|
+
const k = r(t)(({
|
78
78
|
theme: o,
|
79
|
-
$disabled:
|
79
|
+
$disabled: e
|
80
80
|
}) => `
|
81
|
-
cursor: ${
|
81
|
+
cursor: ${e ? "not-allowed" : "pointer"};
|
82
82
|
|
83
83
|
&:hover {
|
84
|
-
background: ${
|
84
|
+
background: ${e ? "transparent" : o.colors.BLACK};
|
85
85
|
};
|
86
86
|
|
87
87
|
path {
|
@@ -91,21 +91,21 @@ const k = r(e)(({
|
|
91
91
|
white-space: nowrap;
|
92
92
|
overflow: hidden;
|
93
93
|
text-overflow: ellipsis;
|
94
|
-
`, C = r(
|
94
|
+
`, C = r(t)`
|
95
95
|
position: absolute;
|
96
96
|
z-index: 6;
|
97
97
|
top: calc(100% - 36px);
|
98
98
|
right: 12px;
|
99
99
|
transform-origin: top;
|
100
100
|
transform: scaleY(1);
|
101
|
-
`, $ = r(
|
101
|
+
`, $ = r(t)`
|
102
102
|
position: absolute;
|
103
103
|
top: 0;
|
104
104
|
left: 0;
|
105
105
|
width: 100%;
|
106
106
|
height: 100%;
|
107
107
|
opacity: 0.5;
|
108
|
-
`, y = r(
|
108
|
+
`, y = r(t)`
|
109
109
|
position: absolute;
|
110
110
|
right: 42px;
|
111
111
|
top: 24px;
|
@@ -115,9 +115,9 @@ export {
|
|
115
115
|
w as BannerImageWrapper,
|
116
116
|
$ as BlurContainer,
|
117
117
|
y as BlurFlexView,
|
118
|
-
|
118
|
+
u as CardContainer,
|
119
119
|
l as CardKebabMenuWrapper,
|
120
|
-
|
120
|
+
x as CardMenuOptionsWrapper,
|
121
121
|
k as CardOptionWrapper,
|
122
122
|
b as CardWrapper,
|
123
123
|
m as HeaderText,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/features/homework/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport Minus2Icon from '../../assets/line-icons/icons/minus2';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\ninterface ICardWrapperProps {\n $bgImage: string;\n}\ninterface ICardOptionsMenuWrapperProps {\n $visible: boolean;\n $shouldopenonright: boolean;\n}\n\nexport const CardKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n width: 24px;\n height: 24px;\n \n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport const SubHeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const CardMenuOptionsWrapper = styled(FlexView)<ICardOptionsMenuWrapperProps>(({\n $shouldopenonright,\n $visible,\n}) => {\n return `\n cursor: pointer;\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n right: ${$shouldopenonright ? 0 : 'auto'};\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);\n z-index: 10;\n `;\n});\n\nexport const CardContainer = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.BLACK_T_15};\n
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/features/homework/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport Minus2Icon from '../../assets/line-icons/icons/minus2';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\ninterface ICardWrapperProps {\n $bgImage: string;\n}\ninterface ICardOptionsMenuWrapperProps {\n $visible: boolean;\n $shouldopenonright: boolean;\n}\n\nexport const CardKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n width: 24px;\n height: 24px;\n \n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport const SubHeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const CardMenuOptionsWrapper = styled(FlexView)<ICardOptionsMenuWrapperProps>(({\n $shouldopenonright,\n $visible,\n}) => {\n return `\n cursor: pointer;\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n right: ${$shouldopenonright ? 0 : 'auto'};\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);\n z-index: 10;\n `;\n});\n\nexport const CardContainer = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.BLACK_T_15};\n &:hover {\n border: 1px solid ${({ theme }) => theme.colors.BLACK};\n border-top-width: 2px;\n }\n`;\n\nexport const CardWrapper = styled(FlexView)<ICardWrapperProps>(({ $bgImage }) => {\n if ($bgImage) {\n return `\n background-image: url(${$bgImage});\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n overflow: hidden;\n `;\n }\n\n return 'overflow: hidden;';\n});\n\nexport const IconWrapper = styled(FlexView)`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const BannerImageWrapper = styled(FlexView)`\n position: absolute;\n right: -18px;\n top: -4px;\n`;\n\nexport const BannerImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n border: 1px solid ${theme.colors.BLACK_T_15};\n width: ${gutter * 4}px;\n height: ${gutter * 4}px;\n border-radius: 50%;\n `;\n});\n\nexport const StyledMinus2Icon = styled(Minus2Icon)`\n path {\n stroke: ${({ theme }) => theme.colors.WHITE};\n }\n`;\n\nexport const HeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n`;\n\ninterface ICardOptionWrapperProps {\n $disabled?: boolean;\n}\ninterface ICardOptionsProps {\n $top: number;\n $left: number;\n}\n\nexport const CardOptions = styled(FlexView)<ICardOptionsProps>``;\n\nexport const CardOptionWrapper = styled(FlexView)<ICardOptionWrapperProps>(({\n theme,\n $disabled,\n}) => {\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n \n &:hover {\n background: ${$disabled ? 'transparent' : theme.colors.BLACK};\n };\n \n path {\n fill: ${theme.colors.WHITE_1};\n }\n `;\n});\n\nexport const OptionText = styled(Text)`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const MenuWrapper = styled(FlexView)`\n position: absolute;\n z-index: 6;\n top: calc(100% - 36px);\n right: 12px;\n transform-origin: top;\n transform: scaleY(1);\n`;\n\nexport const BlurContainer = styled(FlexView)`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.5;\n`;\n\nexport const BlurFlexView = styled(FlexView)`\n position: absolute;\n right: 42px;\n top: 24px;\n`;\n"],"names":["CardKebabMenuWrapper","styled","FlexView","theme","SubHeaderText","Text","CardMenuOptionsWrapper","$shouldopenonright","$visible","CardContainer","CardWrapper","$bgImage","IconWrapper","BannerImageWrapper","BannerImage","gutter","StyledMinus2Icon","Minus2Icon","HeaderText","CardOptionWrapper","$disabled","OptionText","MenuWrapper","BlurContainer","BlurFlexView"],"mappings":";;;;AAcO,MAAMA,IAAuB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,EAAOI,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBVJ,EAAOC,CAAQ;AAEnC,MAAMiB,IAAoBlB,EAAOC,CAAQ,EAA2B,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,WAAAiB;AACF,MACS;AAAA,cACKA,IAAY,gBAAgB,SAAS;AAAA;AAAA;AAAA,oBAG/BA,IAAY,gBAAgBjB,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA,cAIpDA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGjC,GAEYkB,IAAapB,EAAOI,CAAI;AAAA;AAAA;AAAA;AAAA,GAMxBiB,IAAcrB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS7BqB,IAAgBtB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS/BsB,IAAevB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,24 +1,17 @@
|
|
1
1
|
import e from "styled-components";
|
2
|
-
import
|
3
|
-
const d = e(
|
2
|
+
import p from "../../../ui/layout/flex-view.js";
|
3
|
+
const d = e(p)`
|
4
4
|
top: ${({ $top: t }) => t}px;
|
5
5
|
left: ${({ $left: t }) => t}px;
|
6
|
-
`,
|
6
|
+
`, l = e(p)(({ theme: t }) => {
|
7
7
|
const { gutter: o } = t.layout;
|
8
8
|
return `
|
9
9
|
width: 100%;
|
10
10
|
padding: ${o * 0.75}px ${o * 0.5}px;
|
11
11
|
`;
|
12
|
-
})
|
13
|
-
pointer-events: none;
|
14
|
-
width: 720px;
|
15
|
-
overflow: hidden;
|
16
|
-
padding: 30px;
|
17
|
-
background-color: transparent;
|
18
|
-
`;
|
12
|
+
});
|
19
13
|
export {
|
20
14
|
d as ClonedElementWrapper,
|
21
|
-
|
22
|
-
i as ELementWrapper
|
15
|
+
l as CoachmarkBody
|
23
16
|
};
|
24
17
|
//# sourceMappingURL=coachmark-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n
|
1
|
+
{"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC;"}
|