@cuemath/leap 3.5.32-as3 → 3.5.32-as6
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/timeline/comps/new-progress-intro-modal/new-progress-intro-modal-constants.js +7 -7
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal-constants.js.map +1 -1
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal.js +13 -13
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +5 -5
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +40 -40
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/constants.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/api/{use-monthly-report-get.js → use-monthly-report-api.js} +4 -4
- package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-api.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js +52 -52
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +39 -88
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.js +66 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js +13 -13
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js +6 -12
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js +12 -12
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js +69 -59
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js +49 -46
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -1
- package/dist/features/timeline/timeline-tabs/constants.js +17 -0
- package/dist/features/timeline/timeline-tabs/constants.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js +23 -37
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-get.js.map +0 -1
|
@@ -1,107 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import f from "
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { IS_APP_RUNNING_IN_RN as g } from "../../../../../../../constants/app-config.js";
|
|
13
|
-
const j = ({
|
|
14
|
-
puzzles: u,
|
|
15
|
-
onPuzzleClick: o
|
|
16
|
-
}) => {
|
|
17
|
-
const n = u || [], r = v(null), [_, C] = m(!1), [b, p] = m(!1), S = s(() => {
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as S, useRef as R, useState as h, useCallback as i, useEffect as b } from "react";
|
|
3
|
+
import x from "../../../../../../../assets/line-icons/icons/chevron-left.js";
|
|
4
|
+
import L from "../../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import { ContentWrapper as _, ScrollButton as a, ScrollContainer as w } from "./activities-card-puzzles.styled.js";
|
|
6
|
+
import c from "../../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import I from "../../../../../../ui/separator/separator.js";
|
|
8
|
+
import { IS_APP_RUNNING_IN_RN as f } from "../../../../../../../constants/app-config.js";
|
|
9
|
+
import A from "./activity-puzzle-card.js";
|
|
10
|
+
const B = ({ puzzles: o, onPuzzleClick: u }) => {
|
|
11
|
+
const r = R(null), [d, m] = h(!1), [$, p] = h(!1), g = i(() => {
|
|
18
12
|
r.current && r.current.scrollBy({ left: -180, behavior: "smooth" });
|
|
19
|
-
}, []),
|
|
13
|
+
}, []), C = i(() => {
|
|
20
14
|
r.current && r.current.scrollBy({ left: 180, behavior: "smooth" });
|
|
21
|
-
}, []),
|
|
15
|
+
}, []), l = i(() => {
|
|
22
16
|
if (r.current) {
|
|
23
|
-
const { scrollLeft: t, scrollWidth:
|
|
24
|
-
|
|
17
|
+
const { scrollLeft: t, scrollWidth: n, clientWidth: v } = r.current;
|
|
18
|
+
m(t > 0), p(t < n - v - 10);
|
|
25
19
|
}
|
|
26
20
|
}, []);
|
|
27
|
-
|
|
21
|
+
return b(() => {
|
|
28
22
|
const t = r.current;
|
|
29
23
|
if (t)
|
|
30
|
-
return
|
|
31
|
-
t.removeEventListener("scroll",
|
|
24
|
+
return l(), t.addEventListener("scroll", l), () => {
|
|
25
|
+
t.removeEventListener("scroll", l);
|
|
32
26
|
};
|
|
33
|
-
}, [
|
|
34
|
-
const R = s(
|
|
35
|
-
(t, a) => /* @__PURE__ */ l(
|
|
36
|
-
T,
|
|
37
|
-
{
|
|
38
|
-
$gapX: 1,
|
|
39
|
-
$imageHue: t.image_hue || "BLUE",
|
|
40
|
-
$width: 146,
|
|
41
|
-
$height: 162,
|
|
42
|
-
$background: `${t.image_hue || "BLUE"}_2`,
|
|
43
|
-
onClick: () => o == null ? void 0 : o({
|
|
44
|
-
item_ref: t.item_ref,
|
|
45
|
-
feedback_comments: t.feedback_comments,
|
|
46
|
-
image_hue: t.image_hue,
|
|
47
|
-
title: t.title,
|
|
48
|
-
tip: t.tip
|
|
49
|
-
}),
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
X,
|
|
53
|
-
{
|
|
54
|
-
$borderRadiusX: 1,
|
|
55
|
-
$background: t.state === h.PENDING || t.state === h.NOT_STARTED ? "RED" : "BLACK_1",
|
|
56
|
-
$widthX: 1,
|
|
57
|
-
$heightX: 1,
|
|
58
|
-
$alignItems: "center",
|
|
59
|
-
$justifyContent: "center",
|
|
60
|
-
children: t.state && ($[t.state] || $[h.COMPLETED])
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ l(i, { $background: "TRANSPARENT", $alignItems: "center", children: [
|
|
64
|
-
t.image_url && /* @__PURE__ */ e(
|
|
65
|
-
k,
|
|
66
|
-
{
|
|
67
|
-
src: t.image_url ?? "",
|
|
68
|
-
alt: "Puzzle illustration",
|
|
69
|
-
width: 68,
|
|
70
|
-
height: 68,
|
|
71
|
-
withLoader: !0
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
/* @__PURE__ */ e(f, { heightX: 1 }),
|
|
75
|
-
/* @__PURE__ */ e(i, { $gutterX: 0.25, children: /* @__PURE__ */ e(D, { $renderAs: "ab3", $align: "center", children: t.title }) })
|
|
76
|
-
] })
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
`${t.id}-${a}`
|
|
80
|
-
),
|
|
81
|
-
[o]
|
|
82
|
-
);
|
|
83
|
-
return !n || n.length === 0 ? null : /* @__PURE__ */ e(x, { $flexRowGapX: 1, children: /* @__PURE__ */ l(i, { $position: "relative", $borderColor: "GREY_2", children: [
|
|
27
|
+
}, [l, o.length]), !o || o.length === 0 ? null : /* @__PURE__ */ e(_, { $flexRowGapX: 1, children: /* @__PURE__ */ s(c, { $position: "relative", $borderColor: "GREY_2", children: [
|
|
84
28
|
/* @__PURE__ */ e(
|
|
85
|
-
|
|
29
|
+
a,
|
|
86
30
|
{
|
|
87
31
|
$background: "BLACK_T_60",
|
|
88
32
|
$justifyContent: "center",
|
|
89
33
|
$alignItems: "center",
|
|
90
34
|
$widthX: 2,
|
|
91
35
|
$height: "100%",
|
|
92
|
-
onClick:
|
|
93
|
-
$visible: !
|
|
36
|
+
onClick: g,
|
|
37
|
+
$visible: !f && d,
|
|
94
38
|
$left: "0px",
|
|
95
39
|
$right: "auto",
|
|
96
|
-
children: /* @__PURE__ */ e(
|
|
40
|
+
children: /* @__PURE__ */ e(x, { width: 24, height: 24 })
|
|
97
41
|
}
|
|
98
42
|
),
|
|
99
|
-
/* @__PURE__ */ e(
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
|
|
43
|
+
/* @__PURE__ */ e(c, { $gapX: 1, children: /* @__PURE__ */ e(w, { ref: r, children: /* @__PURE__ */ s(c, { $flexDirection: "row", $flexGapX: 1, children: [
|
|
44
|
+
/* @__PURE__ */ e(I, {}),
|
|
45
|
+
o.map((t, n) => /* @__PURE__ */ e(
|
|
46
|
+
A,
|
|
47
|
+
{
|
|
48
|
+
puzzle: t,
|
|
49
|
+
onPuzzleClick: u
|
|
50
|
+
},
|
|
51
|
+
`${t.id}-${n}`
|
|
52
|
+
))
|
|
102
53
|
] }) }) }),
|
|
103
54
|
/* @__PURE__ */ e(
|
|
104
|
-
|
|
55
|
+
a,
|
|
105
56
|
{
|
|
106
57
|
$position: "absolute",
|
|
107
58
|
$widthX: 2,
|
|
@@ -109,16 +60,16 @@ const j = ({
|
|
|
109
60
|
$background: "BLACK_T_60",
|
|
110
61
|
$justifyContent: "center",
|
|
111
62
|
$alignItems: "center",
|
|
112
|
-
onClick:
|
|
113
|
-
$visible: !
|
|
63
|
+
onClick: C,
|
|
64
|
+
$visible: !f && $,
|
|
114
65
|
$left: "auto",
|
|
115
66
|
$right: "0px",
|
|
116
|
-
children: /* @__PURE__ */ e(
|
|
67
|
+
children: /* @__PURE__ */ e(L, { width: 24, height: 24 })
|
|
117
68
|
}
|
|
118
69
|
)
|
|
119
70
|
] }) });
|
|
120
|
-
},
|
|
71
|
+
}, z = S(B);
|
|
121
72
|
export {
|
|
122
|
-
|
|
73
|
+
z as default
|
|
123
74
|
};
|
|
124
75
|
//# sourceMappingURL=activities-card-puzzles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activities-card-puzzles.js","sources":["../../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.tsx"],"sourcesContent":["import { type FC, useRef, memo, useCallback, useState, useEffect } from 'react';\n\nimport ChevronLeftIcon from '../../../../../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../../../../../assets/line-icons/icons/chevron-right';\nimport { type IActivitiesCardPuzzlesProps } from './activities-card-puzzles-types';\nimport
|
|
1
|
+
{"version":3,"file":"activities-card-puzzles.js","sources":["../../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.tsx"],"sourcesContent":["import { type FC, useRef, memo, useCallback, useState, useEffect } from 'react';\n\nimport ChevronLeftIcon from '../../../../../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../../../../../assets/line-icons/icons/chevron-right';\nimport { type IActivitiesCardPuzzlesProps } from './activities-card-puzzles-types';\nimport * as Styled from './activities-card-puzzles.styled';\nimport FlexView from '../../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../../ui/separator/separator';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../../../constants/app-config';\nimport ActivityPuzzleCard from './activity-puzzle-card';\n\nconst ActivitiesCardPuzzles: FC<IActivitiesCardPuzzlesProps> = ({ puzzles, onPuzzleClick }) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const [canScrollLeft, setCanScrollLeft] = useState(false);\n const [canScrollRight, setCanScrollRight] = useState(false);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -180, behavior: 'smooth' });\n }\n }, []);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 180, behavior: 'smooth' });\n }\n }, []);\n\n const updateScrollButtons = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n setCanScrollLeft(scrollLeft > 0);\n setCanScrollRight(scrollLeft < scrollWidth - clientWidth - 10);\n }\n }, []);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n updateScrollButtons();\n\n scrollElement.addEventListener('scroll', updateScrollButtons);\n\n return () => {\n scrollElement.removeEventListener('scroll', updateScrollButtons);\n };\n }\n }, [updateScrollButtons, puzzles.length]);\n\n if (!puzzles || puzzles.length === 0) return null;\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1}>\n <FlexView $position=\"relative\" $borderColor=\"GREY_2\">\n <Styled.ScrollButton\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={2}\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={!IS_APP_RUNNING_IN_RN && canScrollLeft}\n $left=\"0px\"\n $right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n <FlexView $gapX={1}>\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n <Separator />\n {puzzles.map((item, index) => {\n return (\n <ActivityPuzzleCard\n key={`${item.id}-${index}`}\n puzzle={item}\n onPuzzleClick={onPuzzleClick}\n />\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n </FlexView>\n\n <Styled.ScrollButton\n $position=\"absolute\"\n $widthX={2}\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={!IS_APP_RUNNING_IN_RN && canScrollRight}\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(ActivitiesCardPuzzles);\n"],"names":["ActivitiesCardPuzzles","puzzles","onPuzzleClick","scrollRef","useRef","canScrollLeft","setCanScrollLeft","useState","canScrollRight","setCanScrollRight","handleScrollLeft","useCallback","handleScrollRight","updateScrollButtons","scrollLeft","scrollWidth","clientWidth","useEffect","scrollElement","jsx","Styled.ContentWrapper","jsxs","FlexView","Styled.ScrollButton","IS_APP_RUNNING_IN_RN","ChevronLeftIcon","Styled.ScrollContainer","Separator","item","index","ActivityPuzzleCard","ChevronRightIcon","ActivitiesCardPuzzles$1","memo"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAyD,CAAC,EAAE,SAAAC,GAAS,eAAAC,QAAoB;AACvF,QAAAC,IAAYC,EAAuB,IAAI,GACvC,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GAEpDG,IAAmBC,EAAY,MAAM;AACzC,IAAIR,EAAU,WACZA,EAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,UAAU,UAAU;AAAA,EAEjE,GAAG,CAAE,CAAA,GAECS,IAAoBD,EAAY,MAAM;AAC1C,IAAIR,EAAU,WACZA,EAAU,QAAQ,SAAS,EAAE,MAAM,KAAK,UAAU,UAAU;AAAA,EAEhE,GAAG,CAAE,CAAA,GAECU,IAAsBF,EAAY,MAAM;AAC5C,QAAIR,EAAU,SAAS;AACrB,YAAM,EAAE,YAAAW,GAAY,aAAAC,GAAa,aAAAC,EAAA,IAAgBb,EAAU;AAE3D,MAAAG,EAAiBQ,IAAa,CAAC,GACbL,EAAAK,IAAaC,IAAcC,IAAc,EAAE;AAAA,IAC/D;AAAA,EACF,GAAG,CAAE,CAAA;AAgBL,SAdAC,EAAU,MAAM;AACd,UAAMC,IAAgBf,EAAU;AAEhC,QAAIe;AACkB,aAA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QACT,UAAU,CAACY,KAAwBhB;AAAA,QACnC,OAAM;AAAA,QACN,QAAO;AAAA,QAEP,UAAC,gBAAAW,EAAAY,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,MAAA;AAAA,IAC3C;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEeC,IAAAC,EAAKjC,CAAqB;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f, useCallback as p } from "react";
|
|
3
|
+
import { PuzzleContainer as E, StatusIcon as _ } from "./activities-card-puzzles.styled.js";
|
|
4
|
+
import g from "../../../../../../ui/layout/flex-view.js";
|
|
5
|
+
import A from "../../../../../../ui/image/image.js";
|
|
6
|
+
import T from "../../../../../../ui/separator/separator.js";
|
|
7
|
+
import b from "../../../../../../ui/text/text.js";
|
|
8
|
+
import { NODE_STATE as o } from "../../../../../daily-timeline/daily-timeline-types.js";
|
|
9
|
+
import { stateIcon as h } from "../constants.js";
|
|
10
|
+
function D({ puzzle: u, onPuzzleClick: e }) {
|
|
11
|
+
const {
|
|
12
|
+
image_url: m,
|
|
13
|
+
state: r,
|
|
14
|
+
item_ref: n,
|
|
15
|
+
feedback_comments: c,
|
|
16
|
+
image_hue: i,
|
|
17
|
+
title: a,
|
|
18
|
+
tip: s
|
|
19
|
+
} = u, $ = p(() => {
|
|
20
|
+
e == null || e({ item_ref: n, feedback_comments: c, image_hue: i, title: a, tip: s });
|
|
21
|
+
}, [e, n, c, i, a, s]), l = r === o.PENDING || r === o.NOT_STARTED ? "RED" : "BLACK_1";
|
|
22
|
+
return /* @__PURE__ */ d(
|
|
23
|
+
E,
|
|
24
|
+
{
|
|
25
|
+
$gapX: 1,
|
|
26
|
+
$imageHue: i || "BLUE",
|
|
27
|
+
$width: 146,
|
|
28
|
+
$height: 162,
|
|
29
|
+
$background: `${i || "BLUE"}_2`,
|
|
30
|
+
onClick: $,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ t(
|
|
33
|
+
_,
|
|
34
|
+
{
|
|
35
|
+
$borderRadiusX: 1,
|
|
36
|
+
$background: l ? "RED" : "BLACK_1",
|
|
37
|
+
$widthX: 1,
|
|
38
|
+
$heightX: 1,
|
|
39
|
+
$alignItems: "center",
|
|
40
|
+
$justifyContent: "center",
|
|
41
|
+
children: r && (h[r] || h[o.COMPLETED])
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ d(g, { $background: "TRANSPARENT", $alignItems: "center", children: [
|
|
45
|
+
m && /* @__PURE__ */ t(
|
|
46
|
+
A,
|
|
47
|
+
{
|
|
48
|
+
src: m ?? "",
|
|
49
|
+
alt: "Puzzle illustration",
|
|
50
|
+
width: 68,
|
|
51
|
+
height: 68,
|
|
52
|
+
withLoader: !0
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ t(T, { heightX: 1 }),
|
|
56
|
+
/* @__PURE__ */ t(g, { $gutterX: 0.25, children: /* @__PURE__ */ t(b, { $renderAs: "ab3", $align: "center", children: a }) })
|
|
57
|
+
] })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
const S = f(D);
|
|
63
|
+
export {
|
|
64
|
+
S as default
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=activity-puzzle-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-puzzle-card.js","sources":["../../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport * as Styled from './activities-card-puzzles.styled';\nimport FlexView from '../../../../../../ui/layout/flex-view';\nimport Image from '../../../../../../ui/image/image';\nimport Separator from '../../../../../../ui/separator/separator';\nimport Text from '../../../../../../ui/text/text';\nimport { NODE_STATE } from '../../../../../daily-timeline/daily-timeline-types';\nimport { stateIcon } from '../constants';\nimport { type IActivityPuzzleCardProps } from './activities-card-puzzles-types';\n\nfunction ActivityPuzzleCard({ puzzle, onPuzzleClick }: IActivityPuzzleCardProps) {\n const {\n image_url: imageUrl,\n state,\n item_ref,\n feedback_comments,\n image_hue: imageHue,\n title,\n tip,\n } = puzzle;\n\n const handlePuzzleClick = useCallback(() => {\n onPuzzleClick?.({ item_ref, feedback_comments, image_hue: imageHue, title, tip });\n }, [onPuzzleClick, item_ref, feedback_comments, imageHue, title, tip]);\n const statusBg =\n state === NODE_STATE.PENDING || state === NODE_STATE.NOT_STARTED ? 'RED' : 'BLACK_1';\n\n return (\n <Styled.PuzzleContainer\n $gapX={1}\n $imageHue={imageHue || 'BLUE'}\n $width={146}\n $height={162}\n $background={`${imageHue || 'BLUE'}_2`}\n onClick={handlePuzzleClick}\n >\n <Styled.StatusIcon\n $borderRadiusX={1}\n $background={statusBg ? 'RED' : 'BLACK_1'}\n $widthX={1}\n $heightX={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {state && (stateIcon[state as NODE_STATE] || stateIcon[NODE_STATE.COMPLETED])}\n </Styled.StatusIcon>\n <FlexView $background=\"TRANSPARENT\" $alignItems=\"center\">\n {imageUrl && (\n <Image\n src={imageUrl ?? ''}\n alt=\"Puzzle illustration\"\n width={68}\n height={68}\n withLoader={true}\n />\n )}\n <Separator heightX={1} />\n <FlexView $gutterX={0.25}>\n <Text $renderAs=\"ab3\" $align=\"center\">\n {title}\n </Text>\n </FlexView>\n </FlexView>\n </Styled.PuzzleContainer>\n );\n}\n\nexport default memo(ActivityPuzzleCard);\n"],"names":["ActivityPuzzleCard","puzzle","onPuzzleClick","imageUrl","state","item_ref","feedback_comments","imageHue","title","tip","handlePuzzleClick","useCallback","statusBg","NODE_STATE","jsxs","Styled.PuzzleContainer","jsx","Styled.StatusIcon","stateIcon","FlexView","Image","Separator","Text","ActivityPuzzleCard$1","memo"],"mappings":";;;;;;;;;AAWA,SAASA,E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,GAAS,EAAA,UAAU,MAClB,UAAA,gBAAAH,EAACM,GAAK,EAAA,WAAU,OAAM,QAAO,UAC1B,UAAAd,EACH,CAAA,GACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAee,IAAAC,EAAKxB,CAAkB;"}
|
package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as t } from "react";
|
|
3
|
+
import d from "./activities-card/activities-card.js";
|
|
4
4
|
import l from "../../../../../ui/layout/flex-view.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
/* @__PURE__ */ e(
|
|
9
|
-
/* @__PURE__ */ e(
|
|
10
|
-
/* @__PURE__ */ e(l, { $flexRowGapX: 1.5, children: Object.entries(o).map(([n, r]
|
|
5
|
+
import h from "../../../../../ui/text/text.js";
|
|
6
|
+
import u from "../../../../../ui/separator/separator.js";
|
|
7
|
+
const x = ({ activities: o, onPuzzleClick: p }) => !o || Object.keys(o).length === 0 ? null : /* @__PURE__ */ f(l, { children: [
|
|
8
|
+
/* @__PURE__ */ e(h, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Activities" }),
|
|
9
|
+
/* @__PURE__ */ e(u, { heightX: 1 }),
|
|
10
|
+
/* @__PURE__ */ e(l, { $flexRowGapX: 1.5, children: Object.entries(o).map(([n, r]) => {
|
|
11
11
|
var m;
|
|
12
12
|
return r != null && r.length ? /* @__PURE__ */ e(
|
|
13
|
-
|
|
13
|
+
d,
|
|
14
14
|
{
|
|
15
15
|
nodeType: (m = r[0]) == null ? void 0 : m.node_type,
|
|
16
16
|
cardType: n,
|
|
17
17
|
activitiesList: r,
|
|
18
18
|
onPuzzleClick: p
|
|
19
19
|
},
|
|
20
|
-
|
|
20
|
+
n
|
|
21
21
|
) : null;
|
|
22
22
|
}) })
|
|
23
|
-
] }),
|
|
23
|
+
] }), w = t(x);
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
w as default
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=activities.js.map
|
package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activities.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { type IActivitiesProps } from './activities-types';\nimport { type TNodeTypes } from '../../../../../chapters-v2/comps/node-card/node-card-types';\nimport ActivitiesCard from './activities-card/activities-card';\nimport { type CARD_TYPE } from '../../monthly-report-types';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport Separator from '../../../../../ui/separator/separator';\n\nconst Activities: FC<IActivitiesProps> = ({ activities, onPuzzleClick }) => {\n if (!activities || Object.keys(activities).length === 0) return null;\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Activities\n </Text>\n <Separator heightX={1} />\n <FlexView $flexRowGapX={1.5}>\n {Object.entries(activities).map(([cardType, activitiesList]
|
|
1
|
+
{"version":3,"file":"activities.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { type IActivitiesProps } from './activities-types';\nimport { type TNodeTypes } from '../../../../../chapters-v2/comps/node-card/node-card-types';\nimport ActivitiesCard from './activities-card/activities-card';\nimport { type CARD_TYPE } from '../../monthly-report-types';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport Separator from '../../../../../ui/separator/separator';\n\nconst Activities: FC<IActivitiesProps> = ({ activities, onPuzzleClick }) => {\n if (!activities || Object.keys(activities).length === 0) return null;\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Activities\n </Text>\n <Separator heightX={1} />\n <FlexView $flexRowGapX={1.5}>\n {Object.entries(activities).map(([cardType, activitiesList]) => {\n if (!activitiesList?.length) return null;\n\n return (\n <ActivitiesCard\n key={cardType}\n nodeType={activitiesList[0]?.node_type as TNodeTypes}\n cardType={cardType as CARD_TYPE}\n activitiesList={activitiesList}\n onPuzzleClick={onPuzzleClick}\n />\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(Activities);\n"],"names":["Activities","activities","onPuzzleClick","FlexView","jsx","Text","Separator","cardType","activitiesList","ActivitiesCard","_a","Activities$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAAmC,CAAC,EAAE,YAAAC,GAAY,eAAAC,QAClD,CAACD,KAAc,OAAO,KAAKA,CAAU,EAAE,WAAW,IAAU,yBAG7DE,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,cAAA;AAAA,EACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EACtB,gBAAAF,EAAAD,GAAA,EAAS,cAAc,KACrB,UAAO,OAAA,QAAQF,CAAU,EAAE,IAAI,CAAC,CAACM,GAAUC,CAAc,MAAM;;AAC1D,WAACA,KAAA,QAAAA,EAAgB,SAGnB,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QAEC,WAAUC,IAAAF,EAAe,CAAC,MAAhB,gBAAAE,EAAmB;AAAA,QAC7B,UAAAH;AAAA,QACA,gBAAAC;AAAA,QACA,eAAAN;AAAA,MAAA;AAAA,MAJKK;AAAA,IAAA,IAJ2B;AAAA,EAWrC,CAAA,GACH;AACF,EAAA,CAAA,GAIWI,IAAAC,EAAKZ,CAAU;"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { NODE_STATE as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(t) => t.state === e.IN_PROGRESS
|
|
7
|
-
).length, r = n.filter(
|
|
8
|
-
(t) => t.state === e.PENDING || t.state === e.NOT_STARTED
|
|
9
|
-
).length;
|
|
10
|
-
return { totalDone: o, totalPending: l, totalOverdue: r };
|
|
11
|
-
};
|
|
1
|
+
import { NODE_STATE as o } from "../../../../daily-timeline/daily-timeline-types.js";
|
|
2
|
+
const E = (i) => i.reduce(
|
|
3
|
+
(t, { state: e }) => (e === o.COMPLETED || e === o.WAIT_FOR_REVIEW ? t.totalDone++ : e === o.IN_PROGRESS ? t.totalPending++ : (e === o.PENDING || e === o.NOT_STARTED) && t.totalOverdue++, t),
|
|
4
|
+
{ totalDone: 0, totalPending: 0, totalOverdue: 0 }
|
|
5
|
+
);
|
|
12
6
|
export {
|
|
13
|
-
|
|
7
|
+
E as countActivitiesByState
|
|
14
8
|
};
|
|
15
9
|
//# sourceMappingURL=utils.js.map
|
package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.ts"],"sourcesContent":["import { type IMonthlyActivity } from '../../monthly-report-types';\nimport { NODE_STATE } from '../../../../daily-timeline/daily-timeline-types';\n\nexport const countActivitiesByState = (activitiesList: IMonthlyActivity[])
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.ts"],"sourcesContent":["import { type IMonthlyActivity } from '../../monthly-report-types';\nimport { NODE_STATE } from '../../../../daily-timeline/daily-timeline-types';\n\nexport const countActivitiesByState = (activitiesList: IMonthlyActivity[]) =>\n activitiesList.reduce(\n (acc, { state }) => {\n if (state === NODE_STATE.COMPLETED || state === NODE_STATE.WAIT_FOR_REVIEW) {\n acc.totalDone++;\n } else if (state === NODE_STATE.IN_PROGRESS) {\n acc.totalPending++;\n } else if (state === NODE_STATE.PENDING || state === NODE_STATE.NOT_STARTED) {\n acc.totalOverdue++;\n }\n\n return acc;\n },\n { totalDone: 0, totalPending: 0, totalOverdue: 0 },\n );\n"],"names":["countActivitiesByState","activitiesList","acc","state","NODE_STATE"],"mappings":";AAGa,MAAAA,IAAyB,CAACC,MACrCA,EAAe;AAAA,EACb,CAACC,GAAK,EAAE,OAAAC,SACFA,MAAUC,EAAW,aAAaD,MAAUC,EAAW,kBACrDF,EAAA,cACKC,MAAUC,EAAW,cAC1BF,EAAA,kBACKC,MAAUC,EAAW,WAAWD,MAAUC,EAAW,gBAC1DF,EAAA,gBAGCA;AAAA,EAET,EAAE,WAAW,GAAG,cAAc,GAAG,cAAc,EAAE;AACnD;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as R, useCallback as l } from "react";
|
|
3
3
|
import c from "../../../../../ui/layout/flex-view.js";
|
|
4
4
|
import { ILLUSTRATIONS as g } from "../../../../../../assets/illustrations/illustrations.js";
|
|
5
5
|
import $ from "../../../../../ui/image/image.js";
|
|
6
|
-
import { invalidateMonthlyReport as P,
|
|
6
|
+
import { invalidateMonthlyReport as P, monthlyReportPatch as k } from "../../api/use-monthly-report-api.js";
|
|
7
7
|
import f from "../../../../../ui/separator/separator.js";
|
|
8
8
|
import A from "../../../../../ui/text/text.js";
|
|
9
9
|
import C from "../../../../../ui/buttons/clickable/clickable.js";
|
|
@@ -13,19 +13,19 @@ import { MONTHLY_REPORT_ANALYTICS_EVENTS as b } from "../../monthly-report-event
|
|
|
13
13
|
const L = ({
|
|
14
14
|
reportId: t,
|
|
15
15
|
studentName: E,
|
|
16
|
-
onFeedback:
|
|
16
|
+
onFeedback: m,
|
|
17
17
|
studentCourseId: a,
|
|
18
|
-
showSnackbar:
|
|
18
|
+
showSnackbar: s
|
|
19
19
|
}) => {
|
|
20
20
|
const _ = l(
|
|
21
21
|
(r, n) => {
|
|
22
|
-
r &&
|
|
22
|
+
r && s && s({
|
|
23
23
|
type: "error",
|
|
24
24
|
message: "Something went wrong. Please try again.",
|
|
25
25
|
bgColor: "red"
|
|
26
|
-
}), !r &&
|
|
26
|
+
}), !r && m && (n != null && n.feedback) && (P(t), m(n.feedback, a));
|
|
27
27
|
},
|
|
28
|
-
[
|
|
28
|
+
[m, t, s, a]
|
|
29
29
|
), { onEvent: i } = y(), { patch: d, isProcessing: p } = k({
|
|
30
30
|
onComplete: _
|
|
31
31
|
}), o = l(
|
|
@@ -42,14 +42,14 @@ const L = ({
|
|
|
42
42
|
report_id: t
|
|
43
43
|
}), o("negative");
|
|
44
44
|
}, [o, t, i]);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ e(c, { $gutterX: 1, children: /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ h(X, { $gapX: 1.25, $background: "WHITE_3", children: [
|
|
46
|
+
/* @__PURE__ */ e(c, { $gutterX: 1, children: /* @__PURE__ */ h(A, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
|
|
47
47
|
"Are you happy with ",
|
|
48
48
|
E ?? "her",
|
|
49
49
|
" progress?"
|
|
50
50
|
] }) }),
|
|
51
51
|
/* @__PURE__ */ e(f, { heightX: 1.5 }),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ h(c, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
|
|
53
53
|
/* @__PURE__ */ e(
|
|
54
54
|
C,
|
|
55
55
|
{
|
|
@@ -93,8 +93,8 @@ const L = ({
|
|
|
93
93
|
] }),
|
|
94
94
|
/* @__PURE__ */ e(f, { heightX: 1.5 })
|
|
95
95
|
] });
|
|
96
|
-
},
|
|
96
|
+
}, B = R(L);
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
B as default
|
|
99
99
|
};
|
|
100
100
|
//# sourceMappingURL=feedback.js.map
|
package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../../ui/image/image';\nimport { invalidateMonthlyReport,
|
|
1
|
+
{"version":3,"file":"feedback.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../../ui/image/image';\nimport { invalidateMonthlyReport, monthlyReportPatch } from '../../api/use-monthly-report-api';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport * as Styled from './feedback-styled';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { MONTHLY_REPORT_ANALYTICS_EVENTS } from '../../monthly-report-events';\n\nconst Feedback = ({\n reportId,\n studentName,\n onFeedback,\n studentCourseId,\n showSnackbar,\n}: IFeedbackTypesProps) => {\n const onComplete = useCallback(\n (err: string | null, data?: IMonthlyReportResponse) => {\n if (err && showSnackbar) {\n showSnackbar({\n type: 'error',\n message: 'Something went wrong. Please try again.',\n bgColor: 'red',\n });\n }\n\n if (!err && onFeedback && data?.feedback) {\n invalidateMonthlyReport(reportId);\n onFeedback(data.feedback, studentCourseId);\n }\n },\n [onFeedback, reportId, showSnackbar, studentCourseId],\n );\n const { onEvent: trackEvent } = useUIContext();\n\n const { patch: updateMilestone, isProcessing } = monthlyReportPatch({\n onComplete,\n });\n\n const handleFeedback = useCallback(\n (feedback: TFeedback) => {\n updateMilestone(reportId, { feedback });\n },\n [reportId, updateMilestone],\n );\n\n const handlePositiveFeedback = useCallback(() => {\n trackEvent(MONTHLY_REPORT_ANALYTICS_EVENTS.REPORT_POSITIVE_FEEDBACK_CLICKED, {\n report_id: reportId,\n });\n handleFeedback('positive');\n }, [handleFeedback, reportId, trackEvent]);\n\n const handleNegativeFeedback = useCallback(() => {\n trackEvent(MONTHLY_REPORT_ANALYTICS_EVENTS.REPORT_NEGATIVE_FEEDBACK_CLICKED, {\n report_id: reportId,\n });\n handleFeedback('negative');\n }, [handleFeedback, reportId, trackEvent]);\n\n return (\n <Styled.FeedbackContainer $gapX={1.25} $background=\"WHITE_3\">\n <FlexView $gutterX={1}>\n <Text $renderAs=\"ab2-black\" $color=\"BLACK_1\" $align=\"center\">\n Are you happy with {studentName ?? 'her'} progress?\n </Text>\n </FlexView>\n <Separator heightX={1.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={3} $alignItems=\"center\" $justifyContent=\"center\">\n <Clickable\n label=\"Report thumps up\"\n disabled={isProcessing}\n onClick={handlePositiveFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2.5}\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.THUMPS_UP} alt=\"UP\" width={32} height={32} />\n </FlexView>\n </Clickable>\n <Clickable\n label=\"Report thumps down\"\n disabled={isProcessing}\n onClick={handleNegativeFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"BLACK_5\"\n $borderRadiusX={2.5}\n >\n <Image src={ILLUSTRATIONS.THUMPS_DOWN} alt=\"DOWN\" width={32} height={32} />\n </FlexView>\n </Clickable>\n </FlexView>\n <Separator heightX={1.5} />\n </Styled.FeedbackContainer>\n );\n};\n\nexport default memo(Feedback);\n"],"names":["Feedback","reportId","studentName","onFeedback","studentCourseId","showSnackbar","onComplete","useCallback","err","data","invalidateMonthlyReport","trackEvent","useUIContext","updateMilestone","isProcessing","monthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","MONTHLY_REPORT_ANALYTICS_EVENTS","handleNegativeFeedback","Styled.FeedbackContainer","jsx","FlexView","jsxs","Text","Separator","Clickable","Image","ILLUSTRATIONS","Feedback$1","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAW,CAAC;AAAA,EAChB,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AACF,MAA2B;AACzB,QAAMC,IAAaC;AAAA,IACjB,CAACC,GAAoBC,MAAkC;AACrD,MAAID,KAAOH,KACIA,EAAA;AAAA,QACX,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,MAAA,CACV,GAGC,CAACG,KAAOL,MAAcM,KAAA,QAAAA,EAAM,cAC9BC,EAAwBT,CAAQ,GACrBE,EAAAM,EAAK,UAAUL,CAAe;AAAA,IAE7C;AAAA,IACA,CAACD,GAAYF,GAAUI,GAAcD,CAAe;AAAA,EAAA,GAEhD,EAAE,SAASO,EAAW,IAAIC,EAAa,GAEvC,EAAE,OAAOC,GAAiB,cAAAC,EAAA,IAAiBC,EAAmB;AAAA,IAClE,YAAAT;AAAA,EAAA,CACD,GAEKU,IAAiBT;AAAA,IACrB,CAACU,MAAwB;AACP,MAAAJ,EAAAZ,GAAU,EAAE,UAAAgB,EAAA,CAAU;AAAA,IACxC;AAAA,IACA,CAAChB,GAAUY,CAAe;AAAA,EAAA,GAGtBK,IAAyBX,EAAY,MAAM;AAC/C,IAAAI,EAAWQ,EAAgC,kCAAkC;AAA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