@cuemath/leap 3.5.0-gg1 → 3.5.1-link0
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/milestone/constants.js +15 -28
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js +16 -23
- package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +13 -13
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +60 -60
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +44 -44
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info.js +35 -35
- package/dist/features/trial-session/comps/student-info/student-info.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +45 -45
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/helper.js +49 -49
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/index.d.ts +28 -28
- package/package.json +3 -4
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GIF as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as A, useMemo as f, useCallback as L } from "react";
|
|
3
|
+
import { GIF as x } from "../../../../assets/gif/gif.js";
|
|
4
4
|
import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
|
|
5
|
-
import { getGoalsFromConfig as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { epochTimestampAfterOneYear as
|
|
11
|
-
import { useTrialSessionContext as
|
|
12
|
-
import { isPLASource as
|
|
13
|
-
import
|
|
14
|
-
import { Container as O, ContentWrapper as
|
|
15
|
-
const
|
|
16
|
-
const { formData:
|
|
17
|
-
() =>
|
|
18
|
-
countryCode:
|
|
5
|
+
import { getGoalsFromConfig as H } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import R from "../../../ui/image/image.js";
|
|
7
|
+
import M from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
|
+
import g from "../../../ui/separator/separator.js";
|
|
9
|
+
import D from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as j } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as k } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { isPLASource as w, updateGoalInFormData as P } from "../../helper.js";
|
|
13
|
+
import F from "../slide-header/index.js";
|
|
14
|
+
import { Container as O, ContentWrapper as W, ImageWrapper as X, InputContainer as U } from "./student-enrichment-styled.js";
|
|
15
|
+
const ne = A(() => {
|
|
16
|
+
const { formData: u, milestoneConfig: i, updateSlideConfig: n, trialHomeData: h } = k(), { grade: s, goals: e } = u || {}, { demo_info: C, intel_student: a, student: _ } = h, { enrollment_type: m } = _ || {}, { stream: l, region_data: E } = C || {}, { opportunity_country: c = "US" } = E || {}, p = w(a == null ? void 0 : a.source), I = f(
|
|
17
|
+
() => H(i, {
|
|
18
|
+
countryCode: c,
|
|
19
19
|
grade: s ?? "",
|
|
20
20
|
goalCategory: r.ENRICHMENT,
|
|
21
|
-
courseStream:
|
|
22
|
-
enrollmentType:
|
|
21
|
+
courseStream: l,
|
|
22
|
+
enrollmentType: m
|
|
23
23
|
}),
|
|
24
|
-
[i,
|
|
25
|
-
), { goal_code:
|
|
24
|
+
[i, c, s, l, m]
|
|
25
|
+
), { goal_code: T } = f(
|
|
26
26
|
() => (e == null ? void 0 : e.find((t) => t.goal_category === r.ENRICHMENT)) ?? {},
|
|
27
27
|
[e]
|
|
28
|
-
),
|
|
28
|
+
), y = L(
|
|
29
29
|
(t, N) => {
|
|
30
30
|
if (!t) {
|
|
31
|
-
const
|
|
32
|
-
(
|
|
31
|
+
const G = e == null ? void 0 : e.filter(
|
|
32
|
+
(S) => S.goal_category !== r.ENRICHMENT
|
|
33
33
|
);
|
|
34
|
-
n({ goals:
|
|
34
|
+
n({ goals: G });
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
const { label:
|
|
37
|
+
const { label: $ } = N, b = P(e, r.ENRICHMENT, {
|
|
38
38
|
goal_code: t,
|
|
39
|
-
milestone_name:
|
|
40
|
-
milestone_date_ts:
|
|
41
|
-
publish:
|
|
39
|
+
milestone_name: $,
|
|
40
|
+
milestone_date_ts: j(),
|
|
41
|
+
publish: p
|
|
42
42
|
});
|
|
43
|
-
n({ goals:
|
|
43
|
+
n({ goals: b });
|
|
44
44
|
},
|
|
45
|
-
[e,
|
|
45
|
+
[e, p, n]
|
|
46
46
|
);
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ o(
|
|
49
|
-
/* @__PURE__ */ o(
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */ o(
|
|
47
|
+
return /* @__PURE__ */ d(O, { children: [
|
|
48
|
+
/* @__PURE__ */ o(g, { height: 60 }),
|
|
49
|
+
/* @__PURE__ */ o(F, {}),
|
|
50
|
+
/* @__PURE__ */ d(W, { $width: 750, $flexDirection: "row", $justifyContent: "center", children: [
|
|
51
|
+
/* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(R, { withLoader: !0, height: 402, width: 302, src: x.ENRICHMENT, className: "image" }) }),
|
|
52
52
|
/* @__PURE__ */ o(
|
|
53
|
-
|
|
53
|
+
U,
|
|
54
54
|
{
|
|
55
55
|
$flexGap: 24,
|
|
56
56
|
$justifyContent: "center",
|
|
@@ -59,26 +59,26 @@ const te = G(() => {
|
|
|
59
59
|
$gapX: 2.5,
|
|
60
60
|
$gutterX: 2.5,
|
|
61
61
|
children: /* @__PURE__ */ o(
|
|
62
|
-
|
|
62
|
+
M,
|
|
63
63
|
{
|
|
64
64
|
renderAs: "primary",
|
|
65
65
|
label: "Select a Goal",
|
|
66
|
-
value:
|
|
67
|
-
options:
|
|
66
|
+
value: T,
|
|
67
|
+
options: I,
|
|
68
68
|
shape: "borderLess",
|
|
69
69
|
theme: "dark",
|
|
70
|
-
onChange:
|
|
70
|
+
onChange: y,
|
|
71
71
|
isTransparent: !0
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
] }),
|
|
77
|
-
/* @__PURE__ */ o(
|
|
78
|
-
/* @__PURE__ */ o(
|
|
77
|
+
/* @__PURE__ */ o(g, { heightX: 1 }),
|
|
78
|
+
/* @__PURE__ */ o(D, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
79
79
|
] });
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
ne as default
|
|
83
83
|
};
|
|
84
84
|
//# sourceMappingURL=student-enrichment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-enrichment.js","sources":["../../../../../src/features/trial-session/comps/student-enrichment/student-enrichment.tsx"],"sourcesContent":["import { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-enrichment-styled';\n\nconst StudentEnrichment = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n const { grade, goals } = formData || {};\n\n const { demo_info: demoInfo, intel_student: intelStudent } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const isPLA = isPLASource(intelStudent?.source);\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.ENRICHMENT,\n courseStream: stream,\n enrollmentType:
|
|
1
|
+
{"version":3,"file":"student-enrichment.js","sources":["../../../../../src/features/trial-session/comps/student-enrichment/student-enrichment.tsx"],"sourcesContent":["import { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-enrichment-styled';\n\nconst StudentEnrichment = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n const { grade, goals } = formData || {};\n\n const { demo_info: demoInfo, intel_student: intelStudent, student } = trialHomeData;\n\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const isPLA = isPLASource(intelStudent?.source);\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.ENRICHMENT,\n courseStream: stream,\n enrollmentType: enrollmentType,\n }),\n [milestoneConfig, countryCode, grade, stream, enrollmentType],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.ENRICHMENT) ?? {},\n [goals],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutEnrichment = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.ENRICHMENT,\n );\n\n updateSlideConfig({ goals: goalsWithoutEnrichment });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.ENRICHMENT, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, isPLA, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={750} $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.ENRICHMENT} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={24}\n $justifyContent=\"center\"\n $background=\"PURPLE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Select a Goal\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default StudentEnrichment;\n"],"names":["StudentEnrichment","memo","formData","milestoneConfig","updateSlideConfig","trialHomeData","useTrialSessionContext","grade","goals","demoInfo","intelStudent","student","enrollmentType","stream","regionData","countryCode","isPLA","isPLASource","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutEnrichment","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAgBM,MAAAA,KAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAClE,EAAE,OAAAC,GAAO,OAAAC,MAAUN,KAAY,CAAA,GAE/B,EAAE,WAAWO,GAAU,eAAeC,GAAc,SAAAC,EAAY,IAAAN,GAEhE,EAAE,iBAAiBO,MAAmBD,KAAW,CAAA,GACjD,EAAE,QAAAE,GAAQ,aAAaC,EAAW,IAAIL,KAAY,CAAA,GAClD,EAAE,qBAAqBM,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5DE,IAAQC,EAAYP,KAAA,gBAAAA,EAAc,MAAM,GAExCQ,IAAYC;AAAA,IAChB,MACEC,EAAmBjB,GAAiB;AAAA,MAClC,aAAAY;AAAA,MACA,OAAOR,KAAS;AAAA,MAChB,cAAcc,EAAc;AAAA,MAC5B,cAAcR;AAAA,MACd,gBAAAD;AAAA,IAAA,CACD;AAAA,IACH,CAACT,GAAiBY,GAAaR,GAAOM,GAAQD,CAAc;AAAA,EAAA,GAGxD,EAAE,WAAWU,EAAA,IAAiBH;AAAA,IAClC,OAAMX,KAAA,gBAAAA,EAAO,KAAK,CAAAe,MAAQA,EAAK,kBAAkBF,EAAc,gBAAe,CAAC;AAAA,IAC/E,CAACb,CAAK;AAAA,EAAA,GAGFgB,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACzD,UAAI,CAACD,GAAO;AACV,cAAME,IAAyBpB,KAAA,gB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EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ILLUSTRATIONS as
|
|
4
|
-
import { GOAL_CATEGORY as
|
|
2
|
+
import { memo as x, useCallback as t, useEffect as B } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as E } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { GOAL_CATEGORY as G } from "../../../milestone/constants.js";
|
|
5
5
|
import { getCategorizedCurriculumStandards as O } from "../../../milestone/create/comps/class-details-step/class-details-utils.js";
|
|
6
|
-
import { getGradesFromConfig as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useTrialSessionContext as
|
|
13
|
-
import
|
|
14
|
-
import { Container as
|
|
15
|
-
const
|
|
16
|
-
const { formData: c, milestoneConfig: m, updateSlideConfig: a, updateButtonState: s, trialHomeData: f } =
|
|
17
|
-
countryCode:
|
|
6
|
+
import { getGradesFromConfig as U } from "../../../milestone/create/milestone-create-helpers.js";
|
|
7
|
+
import $ from "../../../ui/image/image.js";
|
|
8
|
+
import D from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
9
|
+
import H from "../../../ui/inputs/select-input/select-input.js";
|
|
10
|
+
import W from "../../../ui/inputs/text-input/text-input.js";
|
|
11
|
+
import k from "../../../ui/separator/separator.js";
|
|
12
|
+
import { useTrialSessionContext as v } from "../../context/use-trial-session-context.js";
|
|
13
|
+
import R from "../slide-header/index.js";
|
|
14
|
+
import { Container as j, StudentInfoWrapper as w, ImageWrapper as F, InformationWrapper as K } from "./student-info-styled.js";
|
|
15
|
+
const te = x(() => {
|
|
16
|
+
const { formData: c, milestoneConfig: m, updateSlideConfig: a, updateButtonState: s, trialHomeData: f } = v(), { name: d, grade: n, curriculum: l } = c || {}, g = U(m), { demo_info: h, student: C } = f, { enrollment_type: S } = C || {}, { stream: I, region_data: L } = h || {}, { opportunity_country: b = "US" } = L || {}, _ = O(m, {
|
|
17
|
+
countryCode: b,
|
|
18
18
|
grade: n ?? "",
|
|
19
|
-
goalCategory:
|
|
20
|
-
courseStream:
|
|
21
|
-
enrollmentType:
|
|
19
|
+
goalCategory: G.SCHOOL_SUCCESS,
|
|
20
|
+
courseStream: I,
|
|
21
|
+
enrollmentType: S
|
|
22
22
|
}), u = !!(d && n && l), o = t(
|
|
23
23
|
(e, p) => {
|
|
24
24
|
a(e === "grade" ? { [e]: p, goals: [] } : { [e]: p });
|
|
25
25
|
},
|
|
26
26
|
[a]
|
|
27
|
-
),
|
|
27
|
+
), A = t((e) => o("name", e.target.value), [o]), T = t(
|
|
28
28
|
(e) => o("grade", e),
|
|
29
29
|
[o]
|
|
30
|
-
),
|
|
30
|
+
), y = t(
|
|
31
31
|
(e) => o("curriculum", e),
|
|
32
32
|
[o]
|
|
33
33
|
);
|
|
34
|
-
return
|
|
34
|
+
return B(() => {
|
|
35
35
|
s("right", { isDisabled: !u, isLoading: !1 });
|
|
36
|
-
}, [u, s]), /* @__PURE__ */ i(
|
|
37
|
-
/* @__PURE__ */ r(
|
|
38
|
-
/* @__PURE__ */ r(
|
|
39
|
-
/* @__PURE__ */ i(
|
|
40
|
-
/* @__PURE__ */ r(
|
|
41
|
-
/* @__PURE__ */ i(
|
|
36
|
+
}, [u, s]), /* @__PURE__ */ i(j, { children: [
|
|
37
|
+
/* @__PURE__ */ r(k, { height: 60 }),
|
|
38
|
+
/* @__PURE__ */ r(R, {}),
|
|
39
|
+
/* @__PURE__ */ i(w, { $background: "BLUE_4", $borderColor: "BLACK_T_87", children: [
|
|
40
|
+
/* @__PURE__ */ r(F, { children: /* @__PURE__ */ r($, { withLoader: !1, src: E.BLUE_CLIP, width: 261, height: 31 }) }),
|
|
41
|
+
/* @__PURE__ */ i(K, { $flexGapX: 2.75, $background: "WHITE_1", $borderColor: "BLACK_T_87", children: [
|
|
42
42
|
/* @__PURE__ */ r(
|
|
43
|
-
|
|
43
|
+
W,
|
|
44
44
|
{
|
|
45
45
|
renderAs: "primary",
|
|
46
46
|
label: "Student name",
|
|
@@ -48,32 +48,32 @@ const re = T(() => {
|
|
|
48
48
|
type: "text",
|
|
49
49
|
name: "name",
|
|
50
50
|
shape: "borderLess",
|
|
51
|
-
onChange:
|
|
51
|
+
onChange: A
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
54
|
/* @__PURE__ */ r(
|
|
55
|
-
|
|
55
|
+
D,
|
|
56
56
|
{
|
|
57
57
|
renderAs: "primary",
|
|
58
58
|
label: "Grade",
|
|
59
59
|
value: n,
|
|
60
60
|
options: g,
|
|
61
61
|
shape: "borderLess",
|
|
62
|
-
onChange:
|
|
62
|
+
onChange: T,
|
|
63
63
|
theme: "dark"
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
66
|
/* @__PURE__ */ r(
|
|
67
|
-
|
|
67
|
+
H,
|
|
68
68
|
{
|
|
69
69
|
renderAs: "primary",
|
|
70
70
|
label: "Curriculum",
|
|
71
71
|
value: l,
|
|
72
|
-
options:
|
|
72
|
+
options: _,
|
|
73
73
|
shape: "borderLess",
|
|
74
74
|
renderOptionsAs: "section-list",
|
|
75
75
|
theme: "dark",
|
|
76
|
-
onChange:
|
|
76
|
+
onChange: y
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
] })
|
|
@@ -81,6 +81,6 @@ const re = T(() => {
|
|
|
81
81
|
] });
|
|
82
82
|
});
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
te as default
|
|
85
85
|
};
|
|
86
86
|
//# sourceMappingURL=student-info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-info.js","sources":["../../../../../src/features/trial-session/comps/student-info/student-info.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type InputHTMLAttributes } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport { getGradesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport SelectInput from '../../../ui/inputs/select-input/select-input';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport Separator from '../../../ui/separator/separator';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-info-styled';\n\nconst StudentInformation = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, updateButtonState, trialHomeData } =\n useTrialSessionContext();\n\n const { name, grade, curriculum } = formData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n\n const curriculumStandards = getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType:
|
|
1
|
+
{"version":3,"file":"student-info.js","sources":["../../../../../src/features/trial-session/comps/student-info/student-info.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type InputHTMLAttributes } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport { getGradesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport SelectInput from '../../../ui/inputs/select-input/select-input';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport Separator from '../../../ui/separator/separator';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-info-styled';\n\nconst StudentInformation = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, updateButtonState, trialHomeData } =\n useTrialSessionContext();\n\n const { name, grade, curriculum } = formData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n\n const { demo_info: demoInfo, student } = trialHomeData;\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n\n const curriculumStandards = getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType: enrollmentType,\n });\n const hasRequiredFields = Boolean(name && grade && curriculum);\n\n const updateStudentInformation = useCallback(\n (key: string, value: string) => {\n if (key === 'grade') {\n // reset goals as well if grade changes\n updateSlideConfig({ [key]: value, goals: [] });\n } else {\n updateSlideConfig({ [key]: value });\n }\n },\n [updateSlideConfig],\n );\n\n const handleNameChange = useCallback<\n NonNullable<InputHTMLAttributes<HTMLInputElement>['onChange']>\n >(event => updateStudentInformation('name', event.target.value), [updateStudentInformation]);\n\n const handleGradeChange = useCallback(\n (value: string) => updateStudentInformation('grade', value),\n [updateStudentInformation],\n );\n\n const handleCurriculumChange = useCallback(\n (value: string) => updateStudentInformation('curriculum', value),\n [updateStudentInformation],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.StudentInfoWrapper $background=\"BLUE_4\" $borderColor=\"BLACK_T_87\">\n <Styled.ImageWrapper>\n <Image withLoader={false} src={ILLUSTRATIONS.BLUE_CLIP} width={261} height={31} />\n </Styled.ImageWrapper>\n <Styled.InformationWrapper $flexGapX={2.75} $background=\"WHITE_1\" $borderColor=\"BLACK_T_87\">\n <TextInput\n renderAs=\"primary\"\n label=\"Student name\"\n value={name}\n type=\"text\"\n name=\"name\"\n shape=\"borderLess\"\n onChange={handleNameChange}\n />\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Grade\"\n value={grade}\n options={grades}\n shape=\"borderLess\"\n onChange={handleGradeChange}\n theme=\"dark\"\n />\n <SelectInput\n renderAs=\"primary\"\n label=\"Curriculum\"\n value={curriculum}\n options={curriculumStandards}\n shape=\"borderLess\"\n renderOptionsAs=\"section-list\"\n theme=\"dark\"\n onChange={handleCurriculumChange}\n />\n </Styled.InformationWrapper>\n </Styled.StudentInfoWrapper>\n </Styled.Container>\n );\n});\n\nexport default StudentInformation;\n"],"names":["StudentInformation","memo","formData","milestoneConfig","updateSlideConfig","updateButtonState","trialHomeData","useTrialSessionContext","name","grade","curriculum","grades","getGradesFromConfig","demoInfo","student","enrollmentType","stream","regionData","countryCode","curriculumStandards","getCategorizedCurriculumStandards","GOAL_CATEGORY","hasRequiredFields","updateStudentInformation","useCallback","key","value","handleNameChange","event","handleGradeChange","handleCurriculumChange","useEffect","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.StudentInfoWrapper","Styled.ImageWrapper","Image","ILLUSTRATIONS","Styled.InformationWrapper","TextInput","SearchableSelectInput","SelectInput"],"mappings":";;;;;;;;;;;;;;AAeM,MAAAA,KAAqBC,EAAK,MAAM;AACpC,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,mBAAAC,GAAmB,eAAAC,EAAA,IACvEC,KAEI,EAAE,MAAAC,GAAM,OAAAC,GAAO,YAAAC,EAAW,IAAIR,KAAY,CAAA,GAC1CS,IAASC,EAAoBT,CAAe,GAE5C,EAAE,WAAWU,GAAU,SAAAC,EAAA,IAAYR,GACnC,EAAE,iBAAiBS,MAAmBD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AY,IAAO,KAAKC,EAAc,WAAW,OAAO,KAAK,QAAQ,GAAI,CAAA,GAClF;AAAA,MACA,gBAAAR,EAACS,GAAA,EAA0B,WAAW,MAAM,aAAY,WAAU,cAAa,cAC7E,UAAA;AAAA,QAAA,gBAAAP;AAAA,UAACQ;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAOlC;AAAA,YACP,MAAK;AAAA,YACL,MAAK;AAAA,YACL,OAAM;AAAA,YACN,UAAUmB;AAAA,UAAA;AAAA,QACZ;AAAA,QACA,gBAAAO;AAAA,UAACS;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAOlC;AAAA,YACP,SAASE;AAAA,YACT,OAAM;AAAA,YACN,UAAUkB;AAAA,YACV,OAAM;AAAA,UAAA;AAAA,QACR;AAAA,QACA,gBAAAK;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAOlC;AAAA,YACP,SAASS;AAAA,YACT,OAAM;AAAA,YACN,iBAAgB;AAAA,YAChB,OAAM;AAAA,YACN,UAAUW;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GIF as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as A, useMemo as L, useCallback as x } from "react";
|
|
3
|
+
import { GIF as I } from "../../../../assets/gif/gif.js";
|
|
4
4
|
import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
|
|
5
|
-
import { getGoalsFromConfig as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { epochTimestampAfterOneYear as
|
|
11
|
-
import { useTrialSessionContext as
|
|
12
|
-
import { isPLASource as O, updateGoalInFormData as
|
|
13
|
-
import
|
|
14
|
-
import { Container as
|
|
15
|
-
const
|
|
16
|
-
const { milestoneConfig: i, formData:
|
|
17
|
-
() =>
|
|
18
|
-
countryCode:
|
|
19
|
-
grade:
|
|
5
|
+
import { getGoalsFromConfig as R } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import D from "../../../ui/image/image.js";
|
|
7
|
+
import j from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
|
+
import f from "../../../ui/separator/separator.js";
|
|
9
|
+
import k from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as w } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as F } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { isPLASource as O, updateGoalInFormData as W } from "../../helper.js";
|
|
13
|
+
import X from "../slide-header/index.js";
|
|
14
|
+
import { Container as B, ContentWrapper as H, ImageWrapper as U, InputContainer as Y } from "./test-prep-styled.js";
|
|
15
|
+
const ne = A(() => {
|
|
16
|
+
const { milestoneConfig: i, formData: g, updateSlideConfig: n, trialHomeData: u } = F(), { demo_info: h, intel_student: a, student: T } = u, { enrollment_type: s } = T || {}, { stream: m, region_data: _ } = h || {}, { opportunity_country: l = "US" } = _ || {}, { grade: p, goals: e } = g || {}, c = O(a == null ? void 0 : a.source), C = L(
|
|
17
|
+
() => R(i, {
|
|
18
|
+
countryCode: l,
|
|
19
|
+
grade: p ?? "",
|
|
20
20
|
goalCategory: r.TEST_PREP,
|
|
21
|
-
courseStream:
|
|
22
|
-
enrollmentType:
|
|
21
|
+
courseStream: m,
|
|
22
|
+
enrollmentType: s
|
|
23
23
|
}),
|
|
24
|
-
[
|
|
25
|
-
), { goal_code:
|
|
26
|
-
(t,
|
|
24
|
+
[l, s, p, i, m]
|
|
25
|
+
), { goal_code: P } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, S = x(
|
|
26
|
+
(t, E) => {
|
|
27
27
|
if (!t) {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
28
|
+
const $ = e == null ? void 0 : e.filter(
|
|
29
|
+
(G) => G.goal_category !== r.TEST_PREP
|
|
30
30
|
);
|
|
31
|
-
|
|
31
|
+
n({ goals: $ });
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const { label:
|
|
34
|
+
const { label: y } = E, b = W(e, r.TEST_PREP, {
|
|
35
35
|
goal_code: t,
|
|
36
|
-
milestone_name:
|
|
37
|
-
milestone_date_ts:
|
|
38
|
-
publish:
|
|
36
|
+
milestone_name: y,
|
|
37
|
+
milestone_date_ts: w(),
|
|
38
|
+
publish: c
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
n({ goals: b });
|
|
41
41
|
},
|
|
42
|
-
[e,
|
|
42
|
+
[e, c, n]
|
|
43
43
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */ o(
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ o(
|
|
44
|
+
return /* @__PURE__ */ d(B, { children: [
|
|
45
|
+
/* @__PURE__ */ o(f, { height: 60 }),
|
|
46
|
+
/* @__PURE__ */ o(X, {}),
|
|
47
|
+
/* @__PURE__ */ d(H, { $flexDirection: "row", $justifyContent: "center", children: [
|
|
48
|
+
/* @__PURE__ */ o(U, { children: /* @__PURE__ */ o(D, { withLoader: !0, height: 402, width: 302, src: I.TEST_PREP, className: "image" }) }),
|
|
49
49
|
/* @__PURE__ */ o(
|
|
50
|
-
|
|
50
|
+
Y,
|
|
51
51
|
{
|
|
52
52
|
$flexGap: 40,
|
|
53
53
|
$justifyContent: "center",
|
|
@@ -56,26 +56,26 @@ const te = $(() => {
|
|
|
56
56
|
$gapX: 2.5,
|
|
57
57
|
$gutterX: 2.5,
|
|
58
58
|
children: /* @__PURE__ */ o(
|
|
59
|
-
|
|
59
|
+
j,
|
|
60
60
|
{
|
|
61
61
|
renderAs: "primary",
|
|
62
62
|
label: "Select a Test",
|
|
63
|
-
value:
|
|
64
|
-
options:
|
|
63
|
+
value: P,
|
|
64
|
+
options: C,
|
|
65
65
|
shape: "borderLess",
|
|
66
66
|
theme: "dark",
|
|
67
|
-
onChange:
|
|
67
|
+
onChange: S,
|
|
68
68
|
isTransparent: !0
|
|
69
69
|
}
|
|
70
70
|
)
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ o(
|
|
75
|
-
/* @__PURE__ */ o(
|
|
74
|
+
/* @__PURE__ */ o(f, { heightX: 1 }),
|
|
75
|
+
/* @__PURE__ */ o(k, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
76
76
|
] });
|
|
77
77
|
});
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
ne as default
|
|
80
80
|
};
|
|
81
81
|
//# sourceMappingURL=test-prep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(() => {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo, intel_student: intelStudent } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { grade, goals } = formData || {};\n const isPLA = isPLASource(intelStudent?.source);\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.TEST_PREP,\n courseStream: stream,\n enrollmentType:
|
|
1
|
+
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(() => {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo, intel_student: intelStudent, student } = trialHomeData;\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { grade, goals } = formData || {};\n const isPLA = isPLASource(intelStudent?.source);\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.TEST_PREP,\n courseStream: stream,\n enrollmentType: enrollmentType,\n }),\n [countryCode, enrollmentType, grade, milestoneConfig, stream],\n );\n\n const { goal_code: selectedGoal } =\n goals?.find(goal => goal.goal_category === GOAL_CATEGORY.TEST_PREP) ?? {};\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutTestPrep = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.TEST_PREP,\n );\n\n updateSlideConfig({ goals: goalsWithoutTestPrep });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.TEST_PREP, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, isPLA, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.TEST_PREP} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={40}\n $justifyContent=\"center\"\n $background=\"BLUE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Select a Test\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default TestPrep;\n"],"names":["TestPrep","memo","milestoneConfig","formData","updateSlideConfig","trialHomeData","useTrialSessionContext","demoInfo","intelStudent","student","enrollmentType","stream","regionData","countryCode","grade","goals","isPLA","isPLASource","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutTestPrep","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAgBM,MAAAA,KAAWC,EAAK,MAAM;AAC1B,QAAM,EAAE,iBAAAC,GAAiB,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAElE,EAAE,WAAWC,GAAU,eAAeC,GAAc,SAAAC,EAAY,IAAAJ,GAChE,EAAE,iBAAiBK,MAAmBD,KAAW,CAAA,GACjD,EAAE,QAAAE,GAAQ,aAAaC,EAAW,IAAIL,KAAY,CAAA,GAClD,EAAE,qBAAqBM,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5D,EAAE,OAAAE,GAAO,OAAAC,MAAUZ,KAAY,CAAA,GAC/Ba,IAAQC,EAAYT,KAAA,gBAAAA,EAAc,MAAM,GAExCU,IAAYC;AAAA,IAChB,MACEC,EAAmBlB,GAAiB;AAAA,MAClC,aAAAW;AAAA,MACA,OAAOC,KAAS;AAAA,MAChB,cAAcO,EAAc;AAAA,MAC5B,cAAcV;AAAA,MACd,gBAAAD;AAAA,IAAA,CACD;AAAA,IACH,CAACG,GAAaH,GAAgBI,GAAOZ,GAAiBS,CAAM;AAAA,EAAA,GAGxD,EAAE,WAAWW,OACjBP,KAAA,gBAAAA,EAAO,KAAK,CAAQQ,MAAAA,EAAK,kBAAkBF,EAAc,eAAc,CAAA,GAEnEG,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACzD,UAAI,CAACD,GAAO;AACV,cAAME,IAAuBb,KAAA,gBAAAA,EAAO;AAAA,UAClC,CAAAQ,MAAQA,EAAK,kBAAkBF,EAAc;AAAA;AAG7B,QAAAjB,EAAA,EAAE,OAAOwB,EAAA,CAAsB;AAEjD;AAAA,MACF;AAEM,YAAA,EAAE,OAAAC,EAAU,IAAAF,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