@cuemath/leap 3.3.18-j2 → 3.3.18-m-af
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/assets/lottie/lottie.js +2 -2
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +6 -6
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +19 -19
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +4 -5
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +1 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +24 -24
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js +5 -7
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +71 -75
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js +12 -12
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js.map +1 -1
- package/dist/features/circle-games/sign-up/sign-up-types.js.map +1 -1
- package/dist/features/circle-games/sign-up/sign-up.js +128 -156
- package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +42 -45
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js +2 -3
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +127 -139
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +7 -8
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +26 -27
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +16 -16
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +13 -15
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
- package/dist/features/trial-session/comps/worksheet/worksheet.js +23 -23
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/index.d.ts +20 -68
- package/dist/index.js +367 -383
- package/dist/index.js.map +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/static/error.cbe1ddde.json +1 -0
- package/dist/static/username.9e034d51.json +1 -0
- package/package.json +1 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js +0 -16
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js.map +0 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js +0 -62
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js.map +0 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable.js +0 -17
- package/dist/features/auth/signup-unavailable/signup-unavailable.js.map +0 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/helper.js +0 -19
- package/dist/features/circle-games/hooks/use-circle-sounds/helper.js.map +0 -1
- package/dist/features/circle-games/sign-up/api/use-update-username-api/use-update-username-api.js +0 -9
- package/dist/features/circle-games/sign-up/api/use-update-username-api/use-update-username-api.js.map +0 -1
- package/dist/features/circle-games/sign-up/dal/update-username-dal/update-username-dal.js +0 -34
- package/dist/features/circle-games/sign-up/dal/update-username-dal/update-username-dal.js.map +0 -1
- package/dist/features/parent-dashboard/api/get-student-profile-summary.js +0 -9
- package/dist/features/parent-dashboard/api/get-student-profile-summary.js.map +0 -1
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js +0 -10
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +0 -42
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +0 -1
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js +0 -24
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js.map +0 -1
- package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js +0 -40
- package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js.map +0 -1
- package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js +0 -44
- package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js.map +0 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js +0 -32
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +0 -12
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +0 -44
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +0 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +0 -13
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +0 -28
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +0 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js +0 -43
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js.map +0 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +0 -59
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js +0 -86
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js.map +0 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- package/dist/static/error.dd744fa5.json +0 -1
- package/dist/static/username.2c755605.json +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-dashboard-types.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-types.ts"],"sourcesContent":["import type { TSession } from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { ReactElement } from 'react';\n\nexport enum EClassStatus {\n S_NO_SHOW = 'S_NO_SHOW',\n T_NO_SHOW = 'T_NO_SHOW',\n}\nexport interface ISessionDetails {\n completed_sessions: number;\n next_session_start: number;\n next_session_end: number;\n student_demo_id: string;\n upcoming_sessions: TSession[];\n demo_class_status: EClassStatus | null;\n
|
|
1
|
+
{"version":3,"file":"parent-dashboard-types.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-types.ts"],"sourcesContent":["import type { TSession } from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { ReactElement } from 'react';\n\nexport enum EClassStatus {\n S_NO_SHOW = 'S_NO_SHOW',\n T_NO_SHOW = 'T_NO_SHOW',\n}\nexport interface ISessionDetails {\n completed_sessions: number;\n next_session_start: number;\n next_session_end: number;\n student_demo_id: string;\n upcoming_sessions: TSession[];\n demo_class_status: EClassStatus | null;\n}\n\ninterface IDegreeInfo {\n degree_name: string;\n degree_code: string;\n field_of_study: string;\n}\nexport interface ITeacherDetails {\n first_name: string;\n last_name: string;\n years_of_experience: number;\n number_of_students_taught: number;\n lower_grade: string;\n higher_grade: string;\n degree: IDegreeInfo;\n countries: string[];\n teacher_profile_url: string;\n header_image: string;\n}\n\ninterface PaymentMethodDetails {\n brand: string;\n last_4_digits: string;\n type: string;\n exp_month: number;\n exp_year: number;\n}\n\ninterface IBillingDetails {\n amount: number;\n next_due_date: string;\n payment_method_details: PaymentMethodDetails;\n}\n\nexport interface IParentHome {\n session_details: ISessionDetails;\n teacher_details: ITeacherDetails | null;\n billing_details: IBillingDetails;\n}\n\nexport interface IParentDashboardProps {\n studentName: string;\n studentServiceId: string;\n onRescheduleDemo: (demoId?: string) => void;\n onChangeTutor: (demoId: string) => void;\n onGetStartedAgain?: () => void;\n onViewSummary?: (key: string) => void;\n onSwitchUser?: () => void;\n canChangeTutor: boolean;\n isSubscriptionCancelled: boolean;\n HeaderAvatar: ReactElement;\n}\n\nexport interface ISpacingConfig {\n small: number;\n medium: number;\n large: number;\n separator: {\n small: number;\n medium: number;\n large: number;\n extraLarge: number;\n };\n}\n"],"names":["EClassStatus"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,YAAY,aAFFA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,198 +1,186 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import pe from "../ui/loader/app-loader/app-loader.js";
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as N, useCallback as o, useMemo as R } from "react";
|
|
3
|
+
import { useTheme as X } from "styled-components";
|
|
4
|
+
import J from "../auth/pla-signup/onboarding-guide/onboarding-guide.js";
|
|
5
|
+
import Q from "../auth/pla-signup/signup-header/signup-header.js";
|
|
6
|
+
import U from "../trial-session/comps/pla/next-steps/next-steps.js";
|
|
7
|
+
import Y from "../trial-session/comps/pla/session-status/session-status.js";
|
|
8
|
+
import Z from "../trial-session/comps/pla/session-summary/session-summary.js";
|
|
9
|
+
import ee from "../trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js";
|
|
10
|
+
import B from "../trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js";
|
|
11
|
+
import re from "../ui/buttons/button/button.js";
|
|
12
|
+
import te from "../ui/buttons/text-button/text-button.js";
|
|
13
|
+
import i from "../ui/layout/flex-view.js";
|
|
14
|
+
import oe from "../ui/loader/app-loader/app-loader.js";
|
|
16
15
|
import n from "../ui/separator/separator.js";
|
|
17
|
-
import
|
|
18
|
-
import { EDeviceType as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
const Ve = ee(
|
|
16
|
+
import F from "../ui/text/text.js";
|
|
17
|
+
import { EDeviceType as ie } from "../ui/theme/constants.js";
|
|
18
|
+
import ne from "./comps/compact-header/compact-header.js";
|
|
19
|
+
import ae from "./comps/cuemath-app-features/cuemath-app-features.js";
|
|
20
|
+
import se from "./comps/math-practice/math-practice.js";
|
|
21
|
+
import le from "./comps/parent-dashboard-faqs/parent-dashboard-faqs.js";
|
|
22
|
+
import ce from "./hooks/use-parent-home-data.js";
|
|
23
|
+
import { MOBILE_SPACING as he, DESKTOP_SPACING as me } from "./parent-dashboard-constants.js";
|
|
24
|
+
import { MathPracticeWrapper as pe, Container as de, ContentWrapper as ue } from "./parent-dashboard-styled.js";
|
|
25
|
+
const qe = N(
|
|
28
26
|
({
|
|
29
|
-
studentName:
|
|
30
|
-
|
|
31
|
-
onRescheduleDemo:
|
|
32
|
-
onViewSummary:
|
|
33
|
-
onGetStartedAgain:
|
|
34
|
-
onChangeTutor:
|
|
35
|
-
canChangeTutor:
|
|
36
|
-
onSwitchUser:
|
|
37
|
-
isSubscriptionCancelled:
|
|
38
|
-
HeaderAvatar:
|
|
27
|
+
studentName: l,
|
|
28
|
+
studentServiceId: _,
|
|
29
|
+
onRescheduleDemo: d,
|
|
30
|
+
onViewSummary: u,
|
|
31
|
+
onGetStartedAgain: m,
|
|
32
|
+
onChangeTutor: f,
|
|
33
|
+
canChangeTutor: g,
|
|
34
|
+
onSwitchUser: S,
|
|
35
|
+
isSubscriptionCancelled: q,
|
|
36
|
+
HeaderAvatar: v
|
|
39
37
|
}) => {
|
|
40
|
-
const { device:
|
|
41
|
-
teacherDetails:
|
|
42
|
-
teacherName:
|
|
43
|
-
completedSessions:
|
|
44
|
-
nextSessionStart:
|
|
45
|
-
nextSessionEnd:
|
|
46
|
-
classStatus:
|
|
47
|
-
upcomingSessions:
|
|
38
|
+
const { device: G } = X(), p = G <= ie.MOBILE, {
|
|
39
|
+
teacherDetails: a,
|
|
40
|
+
teacherName: x,
|
|
41
|
+
completedSessions: b,
|
|
42
|
+
nextSessionStart: L,
|
|
43
|
+
nextSessionEnd: C,
|
|
44
|
+
classStatus: T,
|
|
45
|
+
upcomingSessions: $,
|
|
48
46
|
isDemoDone: s,
|
|
49
|
-
isOnlyOneSessionCompleted:
|
|
47
|
+
isOnlyOneSessionCompleted: P,
|
|
50
48
|
isMoreThanOneSessionCompleted: h,
|
|
51
|
-
showLoading:
|
|
52
|
-
demoId:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
() => d ? Le : Ce,
|
|
64
|
-
[d]
|
|
65
|
-
), k = t(
|
|
66
|
-
(Z) => {
|
|
67
|
-
m == null || m(Z, { ...M, userAttemptId: A });
|
|
68
|
-
},
|
|
69
|
-
[m, M, A]
|
|
70
|
-
), H = d ? "100%" : 200, U = t(
|
|
71
|
-
() => /* @__PURE__ */ o(a, { children: [
|
|
72
|
-
/* @__PURE__ */ e(ae, {}),
|
|
49
|
+
showLoading: K = !1,
|
|
50
|
+
demoId: c
|
|
51
|
+
} = ce({ studentName: l, studentServiceId: _ }), M = o(() => {
|
|
52
|
+
d(c);
|
|
53
|
+
}, [c, d]), O = o(() => {
|
|
54
|
+
c && f(c);
|
|
55
|
+
}, [c, f]), r = R(
|
|
56
|
+
() => p ? he : me,
|
|
57
|
+
[p]
|
|
58
|
+
), D = p ? "100%" : 200, j = o(
|
|
59
|
+
() => /* @__PURE__ */ t(i, { children: [
|
|
60
|
+
/* @__PURE__ */ e(Q, {}),
|
|
73
61
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
74
|
-
/* @__PURE__ */ e(
|
|
75
|
-
|
|
62
|
+
/* @__PURE__ */ e(J, { orientation: "horizontal" }),
|
|
63
|
+
m && /* @__PURE__ */ t(i, { children: [
|
|
76
64
|
/* @__PURE__ */ e(n, { height: r.medium }),
|
|
77
65
|
/* @__PURE__ */ e(
|
|
78
|
-
|
|
66
|
+
re,
|
|
79
67
|
{
|
|
80
68
|
label: "Get Started",
|
|
81
69
|
renderAs: "yellow-dark",
|
|
82
70
|
shape: "square",
|
|
83
|
-
width:
|
|
84
|
-
onClick:
|
|
71
|
+
width: D,
|
|
72
|
+
onClick: m
|
|
85
73
|
}
|
|
86
74
|
)
|
|
87
75
|
] })
|
|
88
76
|
] }),
|
|
89
|
-
[r,
|
|
90
|
-
),
|
|
77
|
+
[r, D, m]
|
|
78
|
+
), A = o(
|
|
91
79
|
() => /* @__PURE__ */ e(
|
|
92
|
-
|
|
80
|
+
Y,
|
|
93
81
|
{
|
|
94
|
-
completedSessions:
|
|
95
|
-
nextSessionStartTime:
|
|
96
|
-
teacherName:
|
|
97
|
-
status:
|
|
98
|
-
nextSessionEndTime:
|
|
99
|
-
studentName:
|
|
100
|
-
onRescheduleClick:
|
|
82
|
+
completedSessions: b,
|
|
83
|
+
nextSessionStartTime: L,
|
|
84
|
+
teacherName: x,
|
|
85
|
+
status: T,
|
|
86
|
+
nextSessionEndTime: C,
|
|
87
|
+
studentName: l,
|
|
88
|
+
onRescheduleClick: M
|
|
101
89
|
}
|
|
102
90
|
),
|
|
103
91
|
[
|
|
104
|
-
L,
|
|
105
|
-
C,
|
|
106
92
|
b,
|
|
107
|
-
|
|
93
|
+
L,
|
|
94
|
+
x,
|
|
108
95
|
T,
|
|
109
|
-
|
|
110
|
-
|
|
96
|
+
C,
|
|
97
|
+
l,
|
|
98
|
+
M
|
|
111
99
|
]
|
|
112
|
-
),
|
|
100
|
+
), E = o(() => !a || s ? null : /* @__PURE__ */ t(i, { children: [
|
|
113
101
|
/* @__PURE__ */ e(n, { height: r.separator.large }),
|
|
114
|
-
/* @__PURE__ */ e(
|
|
115
|
-
] }), [
|
|
102
|
+
/* @__PURE__ */ e(B, { teacherProfile: a })
|
|
103
|
+
] }), [a, s, r.separator.large]), y = o(() => h ? null : /* @__PURE__ */ t(i, { children: [
|
|
116
104
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
117
105
|
/* @__PURE__ */ e(
|
|
118
|
-
|
|
106
|
+
Z,
|
|
119
107
|
{
|
|
120
108
|
isDemoDone: s,
|
|
121
|
-
studentName:
|
|
122
|
-
onViewSummary:
|
|
109
|
+
studentName: l,
|
|
110
|
+
onViewSummary: u
|
|
123
111
|
}
|
|
124
112
|
)
|
|
125
113
|
] }), [
|
|
126
114
|
h,
|
|
127
115
|
r.separator.extraLarge,
|
|
128
116
|
s,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
]),
|
|
117
|
+
l,
|
|
118
|
+
u
|
|
119
|
+
]), I = o(() => g ? null : /* @__PURE__ */ t(i, { children: [
|
|
132
120
|
/* @__PURE__ */ e(n, { height: r.separator.small }),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ t(i, { $flexDirection: "row", $flexColumnGapX: 0.25, children: [
|
|
122
|
+
/* @__PURE__ */ e(F, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE", children: "Not the right fit for your child?" }),
|
|
135
123
|
/* @__PURE__ */ e(
|
|
136
|
-
|
|
124
|
+
te,
|
|
137
125
|
{
|
|
138
126
|
color: "WHITE_1",
|
|
139
127
|
sizeOnMobile: "small",
|
|
140
128
|
label: "Try another tutor",
|
|
141
|
-
onClick:
|
|
129
|
+
onClick: O
|
|
142
130
|
}
|
|
143
131
|
)
|
|
144
132
|
] })
|
|
145
|
-
] })
|
|
133
|
+
] }), [g, r.separator.small, O]), w = o(() => a ? /* @__PURE__ */ t(i, { children: [
|
|
146
134
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
147
|
-
/* @__PURE__ */ e(
|
|
135
|
+
/* @__PURE__ */ e(F, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Know your tutor" }),
|
|
148
136
|
/* @__PURE__ */ e(n, { height: r.separator.medium }),
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
-
|
|
151
|
-
] }) : null, [
|
|
137
|
+
/* @__PURE__ */ e(B, { teacherProfile: a }),
|
|
138
|
+
I()
|
|
139
|
+
] }) : null, [a, r.separator, I]), k = o(() => P ? /* @__PURE__ */ t(i, { children: [
|
|
152
140
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
153
|
-
/* @__PURE__ */ e(
|
|
141
|
+
/* @__PURE__ */ e(U, {}),
|
|
154
142
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
155
|
-
/* @__PURE__ */ e(
|
|
156
|
-
|
|
143
|
+
/* @__PURE__ */ e(ee, { sessions: $ }),
|
|
144
|
+
w()
|
|
157
145
|
] }) : null, [
|
|
158
|
-
D,
|
|
159
|
-
r.separator.extraLarge,
|
|
160
146
|
P,
|
|
161
|
-
|
|
162
|
-
|
|
147
|
+
r.separator.extraLarge,
|
|
148
|
+
$,
|
|
149
|
+
w
|
|
150
|
+
]), H = o(() => s ? /* @__PURE__ */ t(i, { children: [
|
|
163
151
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
] }) : null, [s, r.separator.extraLarge]),
|
|
152
|
+
/* @__PURE__ */ e(ae, {})
|
|
153
|
+
] }) : null, [s, r.separator.extraLarge]), W = o(() => h ? null : /* @__PURE__ */ t(i, { children: [
|
|
166
154
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
167
|
-
/* @__PURE__ */ e(
|
|
168
|
-
] }), [h, r.separator.extraLarge,
|
|
169
|
-
() => /* @__PURE__ */
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
155
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(se, { onSwitchUser: S }) })
|
|
156
|
+
] }), [h, r.separator.extraLarge, S]), z = o(
|
|
157
|
+
() => /* @__PURE__ */ t(i, { children: [
|
|
158
|
+
A(),
|
|
159
|
+
E(),
|
|
160
|
+
y(),
|
|
161
|
+
k(),
|
|
162
|
+
H(),
|
|
163
|
+
W()
|
|
176
164
|
] }),
|
|
177
165
|
[
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
A,
|
|
167
|
+
E,
|
|
168
|
+
y,
|
|
169
|
+
k,
|
|
170
|
+
H,
|
|
171
|
+
W
|
|
184
172
|
]
|
|
185
|
-
),
|
|
186
|
-
() => /* @__PURE__ */
|
|
173
|
+
), V = o(
|
|
174
|
+
() => /* @__PURE__ */ t(i, { children: [
|
|
187
175
|
/* @__PURE__ */ e(n, { height: r.separator.extraLarge }),
|
|
188
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ e(le, {})
|
|
189
177
|
] }),
|
|
190
178
|
[r.separator.extraLarge]
|
|
191
179
|
);
|
|
192
|
-
return
|
|
193
|
-
/* @__PURE__ */ e(
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
|
|
180
|
+
return K ? /* @__PURE__ */ e(oe, { height: "100vh" }) : /* @__PURE__ */ t(de, { children: [
|
|
181
|
+
/* @__PURE__ */ e(ne, { HeaderAvatar: v }),
|
|
182
|
+
/* @__PURE__ */ t(
|
|
183
|
+
ue,
|
|
196
184
|
{
|
|
197
185
|
$flex: 1,
|
|
198
186
|
$width: "100%",
|
|
@@ -201,8 +189,8 @@ const Ve = ee(
|
|
|
201
189
|
$gap: r.medium,
|
|
202
190
|
$gutter: r.small,
|
|
203
191
|
children: [
|
|
204
|
-
|
|
205
|
-
|
|
192
|
+
q ? j() : z(),
|
|
193
|
+
V()
|
|
206
194
|
]
|
|
207
195
|
}
|
|
208
196
|
)
|
|
@@ -210,6 +198,6 @@ const Ve = ee(
|
|
|
210
198
|
}
|
|
211
199
|
);
|
|
212
200
|
export {
|
|
213
|
-
|
|
201
|
+
qe as default
|
|
214
202
|
};
|
|
215
203
|
//# sourceMappingURL=parent-dashboard-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-dashboard-view.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-view.tsx"],"sourcesContent":["import type { ESummaryType, IParentDashboardProps, ISpacingConfig } from './parent-dashboard-types';\n\nimport React, { memo, useMemo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport OnboardingGuide from '../auth/pla-signup/onboarding-guide/onboarding-guide';\nimport SignupHeader from '../auth/pla-signup/signup-header/signup-header';\nimport NextSteps from '../trial-session/comps/pla/next-steps/next-steps';\nimport SessionStatus from '../trial-session/comps/pla/session-status/session-status';\nimport SessionSummary from '../trial-session/comps/pla/session-summary/session-summary';\nimport UpcomingSessions from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions';\nimport TeacherProfile from '../trial-session/comps/teacher-intro/teacher-profile/teacher-profile';\nimport Button from '../ui/buttons/button/button';\nimport TextButton from '../ui/buttons/text-button/text-button';\nimport Error from '../ui/error/error';\nimport FlexView from '../ui/layout/flex-view';\nimport AppLoader from '../ui/loader/app-loader/app-loader';\nimport Separator from '../ui/separator/separator';\nimport Text from '../ui/text/text';\nimport { EDeviceType } from '../ui/theme/constants';\nimport CompactHeader from './comps/compact-header/compact-header';\nimport CuemathAppFeatures from './comps/cuemath-app-features/cuemath-app-features';\nimport MathPractice from './comps/math-practice/math-practice';\nimport ParentDashboardFaqs from './comps/parent-dashboard-faqs/parent-dashboard-faqs';\nimport useParentHomeData from './hooks/use-parent-home-data';\nimport useStudentProfileSummaryData from './hooks/use-student-profile-summary-data';\nimport { DESKTOP_SPACING, MOBILE_SPACING } from './parent-dashboard-constants';\nimport * as Styled from './parent-dashboard-styled';\n\nconst ParentDashboardView: React.FC<IParentDashboardProps> = memo(\n ({\n studentName,\n studentId,\n onRescheduleDemo,\n onViewSummary,\n onGetStartedAgain,\n onChangeTutor,\n canChangeTutor,\n onSwitchUser,\n isSubscriptionCancelled,\n HeaderAvatar,\n }) => {\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const {\n teacherDetails,\n teacherName,\n completedSessions,\n nextSessionStart,\n nextSessionEnd,\n classStatus,\n upcomingSessions,\n isDemoDone,\n isOnlyOneSessionCompleted,\n isMoreThanOneSessionCompleted,\n showLoading = false,\n demoId,\n fetchData: fetchParentHomeData,\n isProcessingFailed,\n userAttemptId,\n } = useParentHomeData(studentId);\n\n const { summaryInfo, fetchSummaryData } = useStudentProfileSummaryData(studentId);\n\n const handleTryAgain = useCallback(() => {\n fetchParentHomeData();\n fetchSummaryData();\n }, [fetchParentHomeData, fetchSummaryData]);\n\n const handleRescheduleDemo = useCallback(() => {\n onRescheduleDemo(demoId);\n }, [demoId, onRescheduleDemo]);\n\n const handleChangeTutor = useCallback(() => {\n if (demoId) {\n onChangeTutor(demoId);\n }\n }, [demoId, onChangeTutor]);\n\n const spacing: ISpacingConfig = useMemo(\n () => (isMobile ? MOBILE_SPACING : DESKTOP_SPACING),\n [isMobile],\n );\n\n const handleViewSummary = useCallback(\n (key: ESummaryType) => {\n onViewSummary?.(key, { ...summaryInfo, userAttemptId });\n },\n [onViewSummary, summaryInfo, userAttemptId],\n );\n\n const buttonWidth = isMobile ? '100%' : 200;\n\n const renderCancelledSubscriptionView = useCallback(\n () => (\n <FlexView>\n <SignupHeader />\n <Separator height={spacing.separator.extraLarge} />\n <OnboardingGuide orientation=\"horizontal\" />\n {onGetStartedAgain && (\n <FlexView>\n <Separator height={spacing.medium} />\n <Button\n label=\"Get Started\"\n renderAs=\"yellow-dark\"\n shape=\"square\"\n width={buttonWidth}\n onClick={onGetStartedAgain}\n />\n </FlexView>\n )}\n </FlexView>\n ),\n [spacing, buttonWidth, onGetStartedAgain],\n );\n\n const renderSessionStatusSection = useCallback(\n () => (\n <SessionStatus\n completedSessions={completedSessions}\n nextSessionStartTime={nextSessionStart}\n teacherName={teacherName}\n status={classStatus}\n nextSessionEndTime={nextSessionEnd}\n studentName={studentName}\n onRescheduleClick={handleRescheduleDemo}\n />\n ),\n [\n completedSessions,\n nextSessionStart,\n teacherName,\n classStatus,\n nextSessionEnd,\n studentName,\n handleRescheduleDemo,\n ],\n );\n\n const renderTeacherProfileSection = useCallback(() => {\n if (!teacherDetails || isDemoDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.large} />\n <TeacherProfile teacherProfile={teacherDetails} />\n </FlexView>\n );\n }, [teacherDetails, isDemoDone, spacing.separator.large]);\n\n const renderSessionSummarySection = useCallback(() => {\n if (isMoreThanOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <SessionSummary\n isDemoDone={isDemoDone}\n studentName={studentName}\n onViewSummary={handleViewSummary}\n />\n </FlexView>\n );\n }, [\n isMoreThanOneSessionCompleted,\n spacing.separator.extraLarge,\n isDemoDone,\n studentName,\n handleViewSummary,\n ]);\n\n const renderTutorChangeSection = useCallback(() => {\n if (!canChangeTutor) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.small} />\n <FlexView $flexDirection=\"row\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE\">\n Not the right fit for your child?\n </Text>\n <TextButton\n color=\"WHITE_1\"\n sizeOnMobile=\"small\"\n label=\"Try another tutor\"\n onClick={handleChangeTutor}\n />\n </FlexView>\n </FlexView>\n );\n }, [canChangeTutor, spacing.separator.small, handleChangeTutor]);\n\n const renderTeacherDetailsSection = useCallback(() => {\n if (!teacherDetails) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Know your tutor\n </Text>\n <Separator height={spacing.separator.medium} />\n <TeacherProfile teacherProfile={teacherDetails} />\n {renderTutorChangeSection()}\n </FlexView>\n );\n }, [teacherDetails, spacing.separator, renderTutorChangeSection]);\n\n const renderOnlyOneSessionSection = useCallback(() => {\n if (!isOnlyOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <NextSteps />\n <Separator height={spacing.separator.extraLarge} />\n <UpcomingSessions sessions={upcomingSessions} />\n {renderTeacherDetailsSection()}\n </FlexView>\n );\n }, [\n isOnlyOneSessionCompleted,\n spacing.separator.extraLarge,\n upcomingSessions,\n renderTeacherDetailsSection,\n ]);\n\n const renderAppFeaturesSection = useCallback(() => {\n if (!isDemoDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <CuemathAppFeatures />\n </FlexView>\n );\n }, [isDemoDone, spacing.separator.extraLarge]);\n\n const renderMathPracticeSection = useCallback(() => {\n if (isMoreThanOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Styled.MathPracticeWrapper>\n <MathPractice onSwitchUser={onSwitchUser} />\n </Styled.MathPracticeWrapper>\n </FlexView>\n );\n }, [isMoreThanOneSessionCompleted, spacing.separator.extraLarge, onSwitchUser]);\n\n const renderMainContent = useCallback(\n () => (\n <FlexView>\n {renderSessionStatusSection()}\n {renderTeacherProfileSection()}\n {renderSessionSummarySection()}\n {renderOnlyOneSessionSection()}\n {renderAppFeaturesSection()}\n {renderMathPracticeSection()}\n </FlexView>\n ),\n [\n renderSessionStatusSection,\n renderTeacherProfileSection,\n renderSessionSummarySection,\n renderOnlyOneSessionSection,\n renderAppFeaturesSection,\n renderMathPracticeSection,\n ],\n );\n\n const renderFaqsSection = useCallback(\n () => (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <ParentDashboardFaqs />\n </FlexView>\n ),\n [spacing.separator.extraLarge],\n );\n\n if (showLoading) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isProcessingFailed)\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <Error theme=\"dark\" onTryAgain={handleTryAgain} />\n </FlexView>\n );\n\n return (\n <Styled.Container>\n <CompactHeader HeaderAvatar={HeaderAvatar} />\n <Styled.ContentWrapper\n $flex={1}\n $width=\"100%\"\n $height=\"100%\"\n $background=\"BLACK_1\"\n $gap={spacing.medium}\n $gutter={spacing.small}\n >\n {isSubscriptionCancelled ? renderCancelledSubscriptionView() : renderMainContent()}\n {renderFaqsSection()}\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n },\n);\n\nexport default ParentDashboardView;\n"],"names":["ParentDashboardView","memo","studentName","studentId","onRescheduleDemo","onViewSummary","onGetStartedAgain","onChangeTutor","canChangeTutor","onSwitchUser","isSubscriptionCancelled","HeaderAvatar","device","useTheme","isMobile","EDeviceType","teacherDetails","teacherName","completedSessions","nextSessionStart","nextSessionEnd","classStatus","upcomingSessions","isDemoDone","isOnlyOneSessionCompleted","isMoreThanOneSessionCompleted","showLoading","demoId","fetchParentHomeData","isProcessingFailed","userAttemptId","useParentHomeData","summaryInfo","fetchSummaryData","useStudentProfileSummaryData","handleTryAgain","useCallback","handleRescheduleDemo","handleChangeTutor","spacing","useMemo","MOBILE_SPACING","DESKTOP_SPACING","handleViewSummary","key","buttonWidth","renderCancelledSubscriptionView","FlexView","jsx","SignupHeader","Separator","OnboardingGuide","Button","renderSessionStatusSection","SessionStatus","renderTeacherProfileSection","TeacherProfile","renderSessionSummarySection","SessionSummary","renderTutorChangeSection","jsxs","Text","TextButton","renderTeacherDetailsSection","renderOnlyOneSessionSection","NextSteps","UpcomingSessions","renderAppFeaturesSection","CuemathAppFeatures","renderMathPracticeSection","Styled.MathPracticeWrapper","MathPractice","renderMainContent","renderFaqsSection","ParentDashboardFaqs","AppLoader","Error","Styled.Container","CompactHeader","Styled.ContentWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAMA,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBA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EF;AAAA,QACEhB;AAAA,QACAE;AAAA,QACAE;AAAA,QACAO;AAAA,QACAG;AAAA,QACAE;AAAA,MACF;AAAA,IAAA,GAGII,IAAoBrC;AAAA,MACxB,wBACGW,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAC,EAACE,GAAU,EAAA,QAAQX,EAAQ,UAAU,YAAY;AAAA,0BAChDmC,IAAoB,EAAA;AAAA,MAAA,GACvB;AAAA,MAEF,CAACnC,EAAQ,UAAU,UAAU;AAAA,IAAA;AAG/B,WAAIb,IACK,gBAAAsB,EAAC2B,IAAU,EAAA,QAAO,QAAQ,CAAA,IAG/B9C,IAEC,gBAAAmB,EAAAD,GAAA,EAAS,OAAO,GAAG,aAAY,UAAS,iBAAgB,UACvD,UAAA,gBAAAC,EAAC4B,IAAM,EAAA,OAAM,QAAO,YAAYzC,GAAgB,EAClD,CAAA,IAIF,gBAAAyB,EAACiB,IAAA,EACC,UAAA;AAAA,MAAA,gBAAA7B,EAAC8B,MAAc,cAAAnE,GAA4B;AAAA,MAC3C,gBAAAiD;AAAA,QAACmB;AAAAA,QAAA;AAAA,UACC,OAAO;AAAA,UACP,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,aAAY;AAAA,UACZ,MAAMxC,EAAQ;AAAA,UACd,SAASA,EAAQ;AAAA,UAEhB,UAAA;AAAA,YAA0B7B,IAAAoC,MAAoC0B,EAAkB;AAAA,YAChFC,EAAkB;AAAA,UAAA;AAAA,QAAA;AAAA,MACrB;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
1
|
+
{"version":3,"file":"parent-dashboard-view.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-view.tsx"],"sourcesContent":["import type { IParentDashboardProps, ISpacingConfig } from './parent-dashboard-types';\n\nimport React, { memo, useMemo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport OnboardingGuide from '../auth/pla-signup/onboarding-guide/onboarding-guide';\nimport SignupHeader from '../auth/pla-signup/signup-header/signup-header';\nimport NextSteps from '../trial-session/comps/pla/next-steps/next-steps';\nimport SessionStatus from '../trial-session/comps/pla/session-status/session-status';\nimport SessionSummary from '../trial-session/comps/pla/session-summary/session-summary';\nimport UpcomingSessions from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions';\nimport TeacherProfile from '../trial-session/comps/teacher-intro/teacher-profile/teacher-profile';\nimport Button from '../ui/buttons/button/button';\nimport TextButton from '../ui/buttons/text-button/text-button';\nimport FlexView from '../ui/layout/flex-view';\nimport AppLoader from '../ui/loader/app-loader/app-loader';\nimport Separator from '../ui/separator/separator';\nimport Text from '../ui/text/text';\nimport { EDeviceType } from '../ui/theme/constants';\nimport CompactHeader from './comps/compact-header/compact-header';\nimport CuemathAppFeatures from './comps/cuemath-app-features/cuemath-app-features';\nimport MathPractice from './comps/math-practice/math-practice';\nimport ParentDashboardFaqs from './comps/parent-dashboard-faqs/parent-dashboard-faqs';\nimport useParentHomeData from './hooks/use-parent-home-data';\nimport { DESKTOP_SPACING, MOBILE_SPACING } from './parent-dashboard-constants';\nimport * as Styled from './parent-dashboard-styled';\n\nconst ParentDashboardView: React.FC<IParentDashboardProps> = memo(\n ({\n studentName,\n studentServiceId,\n onRescheduleDemo,\n onViewSummary,\n onGetStartedAgain,\n onChangeTutor,\n canChangeTutor,\n onSwitchUser,\n isSubscriptionCancelled,\n HeaderAvatar,\n }) => {\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const {\n teacherDetails,\n teacherName,\n completedSessions,\n nextSessionStart,\n nextSessionEnd,\n classStatus,\n upcomingSessions,\n isDemoDone,\n isOnlyOneSessionCompleted,\n isMoreThanOneSessionCompleted,\n showLoading = false,\n demoId,\n } = useParentHomeData({ studentName, studentServiceId });\n\n const handleRescheduleDemo = useCallback(() => {\n onRescheduleDemo(demoId);\n }, [demoId, onRescheduleDemo]);\n\n const handleChangeTutor = useCallback(() => {\n if (demoId) {\n onChangeTutor(demoId);\n }\n }, [demoId, onChangeTutor]);\n\n const spacing: ISpacingConfig = useMemo(\n () => (isMobile ? MOBILE_SPACING : DESKTOP_SPACING),\n [isMobile],\n );\n\n const buttonWidth = isMobile ? '100%' : 200;\n\n const renderCancelledSubscriptionView = useCallback(\n () => (\n <FlexView>\n <SignupHeader />\n <Separator height={spacing.separator.extraLarge} />\n <OnboardingGuide orientation=\"horizontal\" />\n {onGetStartedAgain && (\n <FlexView>\n <Separator height={spacing.medium} />\n <Button\n label=\"Get Started\"\n renderAs=\"yellow-dark\"\n shape=\"square\"\n width={buttonWidth}\n onClick={onGetStartedAgain}\n />\n </FlexView>\n )}\n </FlexView>\n ),\n [spacing, buttonWidth, onGetStartedAgain],\n );\n\n const renderSessionStatusSection = useCallback(\n () => (\n <SessionStatus\n completedSessions={completedSessions}\n nextSessionStartTime={nextSessionStart}\n teacherName={teacherName}\n status={classStatus}\n nextSessionEndTime={nextSessionEnd}\n studentName={studentName}\n onRescheduleClick={handleRescheduleDemo}\n />\n ),\n [\n completedSessions,\n nextSessionStart,\n teacherName,\n classStatus,\n nextSessionEnd,\n studentName,\n handleRescheduleDemo,\n ],\n );\n\n const renderTeacherProfileSection = useCallback(() => {\n if (!teacherDetails || isDemoDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.large} />\n <TeacherProfile teacherProfile={teacherDetails} />\n </FlexView>\n );\n }, [teacherDetails, isDemoDone, spacing.separator.large]);\n\n const renderSessionSummarySection = useCallback(() => {\n if (isMoreThanOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <SessionSummary\n isDemoDone={isDemoDone}\n studentName={studentName}\n onViewSummary={onViewSummary}\n />\n </FlexView>\n );\n }, [\n isMoreThanOneSessionCompleted,\n spacing.separator.extraLarge,\n isDemoDone,\n studentName,\n onViewSummary,\n ]);\n\n const renderTutorChangeSection = useCallback(() => {\n if (canChangeTutor) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.small} />\n <FlexView $flexDirection=\"row\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE\">\n Not the right fit for your child?\n </Text>\n <TextButton\n color=\"WHITE_1\"\n sizeOnMobile=\"small\"\n label=\"Try another tutor\"\n onClick={handleChangeTutor}\n />\n </FlexView>\n </FlexView>\n );\n }, [canChangeTutor, spacing.separator.small, handleChangeTutor]);\n\n const renderTeacherDetailsSection = useCallback(() => {\n if (!teacherDetails) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Know your tutor\n </Text>\n <Separator height={spacing.separator.medium} />\n <TeacherProfile teacherProfile={teacherDetails} />\n {renderTutorChangeSection()}\n </FlexView>\n );\n }, [teacherDetails, spacing.separator, renderTutorChangeSection]);\n\n const renderOnlyOneSessionSection = useCallback(() => {\n if (!isOnlyOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <NextSteps />\n <Separator height={spacing.separator.extraLarge} />\n <UpcomingSessions sessions={upcomingSessions} />\n {renderTeacherDetailsSection()}\n </FlexView>\n );\n }, [\n isOnlyOneSessionCompleted,\n spacing.separator.extraLarge,\n upcomingSessions,\n renderTeacherDetailsSection,\n ]);\n\n const renderAppFeaturesSection = useCallback(() => {\n if (!isDemoDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <CuemathAppFeatures />\n </FlexView>\n );\n }, [isDemoDone, spacing.separator.extraLarge]);\n\n const renderMathPracticeSection = useCallback(() => {\n if (isMoreThanOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Styled.MathPracticeWrapper>\n <MathPractice onSwitchUser={onSwitchUser} />\n </Styled.MathPracticeWrapper>\n </FlexView>\n );\n }, [isMoreThanOneSessionCompleted, spacing.separator.extraLarge, onSwitchUser]);\n\n const renderMainContent = useCallback(\n () => (\n <FlexView>\n {renderSessionStatusSection()}\n {renderTeacherProfileSection()}\n {renderSessionSummarySection()}\n {renderOnlyOneSessionSection()}\n {renderAppFeaturesSection()}\n {renderMathPracticeSection()}\n </FlexView>\n ),\n [\n renderSessionStatusSection,\n renderTeacherProfileSection,\n renderSessionSummarySection,\n renderOnlyOneSessionSection,\n renderAppFeaturesSection,\n renderMathPracticeSection,\n ],\n );\n\n const renderFaqsSection = useCallback(\n () => (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <ParentDashboardFaqs />\n </FlexView>\n ),\n [spacing.separator.extraLarge],\n );\n\n if (showLoading) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <CompactHeader HeaderAvatar={HeaderAvatar} />\n <Styled.ContentWrapper\n $flex={1}\n $width=\"100%\"\n $height=\"100%\"\n $background=\"BLACK_1\"\n $gap={spacing.medium}\n $gutter={spacing.small}\n >\n {isSubscriptionCancelled ? renderCancelledSubscriptionView() : renderMainContent()}\n {renderFaqsSection()}\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n },\n);\n\nexport default ParentDashboardView;\n"],"names":["ParentDashboardView","memo","studentName","studentServiceId","onRescheduleDemo","onViewSummary","onGetStartedAgain","onChangeTutor","canChangeTutor","onSwitchUser","isSubscriptionCancelled","HeaderAvatar","device","useTheme","isMobile","EDeviceType","teacherDetails","teacherName","completedSessions","nextSessionStart","nextSessionEnd","classStatus","upcomingSessions","isDemoDone","isOnlyOneSessionCompleted","isMoreThanOneSessionCompleted","showLoading","demoId","useParentHomeData","handleRescheduleDemo","useCallback","handleChangeTutor","spacing","useMemo","MOBILE_SPACING","DESKTOP_SPACING","buttonWidth","renderCancelledSubscriptionView","FlexView","jsx","SignupHeader","Separator","OnboardingGuide","Button","renderSessionStatusSection","SessionStatus","renderTeacherProfileSection","TeacherProfile","renderSessionSummarySection","SessionSummary","renderTutorChangeSection","jsxs","Text","TextButton","renderTeacherDetailsSection","renderOnlyOneSessionSection","NextSteps","UpcomingSessions","renderAppFeaturesSection","CuemathAppFeatures","renderMathPracticeSection","Styled.MathPracticeWrapper","MathPractice","renderMainContent","renderFaqsSection","ParentDashboardFaqs","AppLoader","Styled.Container","CompactHeader","Styled.ContentWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,GAAY,QAEjC;AAAA,MACJ,gBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,2BAAAC;AAAA,MACA,+BAAAC;AAAA,MACA,aAAAC,IAAc;AAAA,MACd,QAAAC;AAAA,IACE,IAAAC,GAAkB,EAAE,aAAA1B,GAAa,kBAAAC,EAAkB,CAAA,GAEjD0B,IAAuBC,EAAY,MAAM;AAC7C,MAAA1B,EAAiBuB,CAAM;AAAA,IAAA,GACtB,CAACA,GAAQvB,CAAgB,CAAC,GAEvB2B,IAAoBD,EAAY,MAAM;AAC1C,MAAIH,KACFpB,EAAcoB,CAAM;AAAA,IACtB,GACC,CAACA,GAAQpB,CAAa,CAAC,GAEpByB,IAA0BC;AAAA,MAC9B,MAAOnB,IAAWoB,KAAiBC;AAAA,MACnC,CAACrB,CAAQ;AAAA,IAAA,GAGLsB,IAActB,IAAW,SAAS,KAElCuB,IAAkCP;AAAA,MACtC,wBACGQ,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAa,EAAA;AAAA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AAA,QACAE;AAAA,MACF;AAAA,IAAA,GAGII,IAAoBlC;AAAA,MACxB,wBACGQ,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAC,EAACE,GAAU,EAAA,QAAQT,EAAQ,UAAU,YAAY;AAAA,0BAChDiC,IAAoB,EAAA;AAAA,MAAA,GACvB;AAAA,MAEF,CAACjC,EAAQ,UAAU,UAAU;AAAA,IAAA;AAG/B,WAAIN,IACK,gBAAAa,EAAC2B,IAAU,EAAA,QAAO,QAAQ,CAAA,IAIjC,gBAAAf,EAACgB,IAAA,EACC,UAAA;AAAA,MAAA,gBAAA5B,EAAC6B,MAAc,cAAAzD,GAA4B;AAAA,MAC3C,gBAAAwC;AAAA,QAACkB;AAAAA,QAAA;AAAA,UACC,OAAO;AAAA,UACP,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,aAAY;AAAA,UACZ,MAAMrC,EAAQ;AAAA,UACd,SAASA,EAAQ;AAAA,UAEhB,UAAA;AAAA,YAA0BtB,IAAA2B,MAAoC0B,EAAkB;AAAA,YAChFC,EAAkB;AAAA,UAAA;AAAA,QAAA;AAAA,MACrB;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GIF as e } from "../../../../../assets/gif/gif.js";
|
|
2
|
-
|
|
3
|
-
const n = [
|
|
2
|
+
const i = [
|
|
4
3
|
{
|
|
5
4
|
title: "introduction & goals",
|
|
6
5
|
description: "Get to know your tutor and discuss your goals and expectations",
|
|
@@ -22,17 +21,17 @@ const n = [
|
|
|
22
21
|
textBG: "GREEN_6",
|
|
23
22
|
ctaLabel: "View Learning Plan"
|
|
24
23
|
}
|
|
25
|
-
],
|
|
24
|
+
], a = [
|
|
26
25
|
{
|
|
27
26
|
title: "created student profile",
|
|
28
|
-
|
|
27
|
+
key: "studentProfile",
|
|
29
28
|
image: e.YOUR_GOALS_GRID_BG,
|
|
30
29
|
textBG: "ORANGE_6",
|
|
31
30
|
ctaLabel: "View Profile"
|
|
32
31
|
},
|
|
33
32
|
{
|
|
34
33
|
title: "Shared Learning insights",
|
|
35
|
-
|
|
34
|
+
key: "insights",
|
|
36
35
|
image: e.LEARNING_SESSION_GRID_BG,
|
|
37
36
|
textBG: "YELLOW_6",
|
|
38
37
|
ctaLabel: "View Insights"
|
|
@@ -43,11 +42,11 @@ const n = [
|
|
|
43
42
|
image: e.WAY_FORWARD_GRID_BG,
|
|
44
43
|
textBG: "GREEN_6",
|
|
45
44
|
ctaLabel: "View Learning Plan",
|
|
46
|
-
|
|
45
|
+
key: "learningPlan"
|
|
47
46
|
}
|
|
48
47
|
];
|
|
49
48
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
a as sessionSummaryAfterDemo,
|
|
50
|
+
i as sessionSummaryData
|
|
52
51
|
};
|
|
53
52
|
//# sourceMappingURL=session-summary-constants.js.map
|
package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-summary-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary-constants.ts"],"sourcesContent":["import type { ISessionSummary } from './session-summary-types';\n\nimport { GIF } from '../../../../../assets/gif/gif';\
|
|
1
|
+
{"version":3,"file":"session-summary-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary-constants.ts"],"sourcesContent":["import type { ISessionSummary } from './session-summary-types';\n\nimport { GIF } from '../../../../../assets/gif/gif';\n\nexport const sessionSummaryData: ISessionSummary[] = [\n {\n title: 'introduction & goals',\n description: 'Get to know your tutor and discuss your goals and expectations',\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'interactive sessions',\n description: 'Watch your child learn concepts and tackle problems with their tutorʼs guidance.',\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'way forward',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n },\n];\n\nexport const sessionSummaryAfterDemo: ISessionSummary[] = [\n {\n title: 'created student profile',\n key: 'studentProfile',\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'Shared Learning insights',\n key: 'insights',\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'Created learning plan',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n key: 'learningPlan',\n },\n];\n"],"names":["sessionSummaryData","GIF","sessionSummaryAfterDemo"],"mappings":";AAIO,MAAMA,IAAwC;AAAA,EACnD;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOC,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,GAEaC,IAA6C;AAAA,EACxD;AAAA,IACE,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAOD,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,KAAK;AAAA,EACP;AACF;"}
|
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import g from "../../../../ui/separator/separator.js";
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as g, useCallback as l } from "react";
|
|
3
|
+
import { useTheme as $ } from "styled-components";
|
|
4
|
+
import a from "../../../../ui/layout/flex-view.js";
|
|
5
|
+
import b from "../../../../ui/separator/separator.js";
|
|
7
6
|
import x from "../../../../ui/text/text.js";
|
|
8
|
-
import { EDeviceType as
|
|
9
|
-
import { sessionSummaryAfterDemo as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
const
|
|
7
|
+
import { EDeviceType as v } from "../../../../ui/theme/constants.js";
|
|
8
|
+
import { sessionSummaryAfterDemo as C, sessionSummaryData as T } from "./session-summary-constants.js";
|
|
9
|
+
import W from "./summary-card/summary-card.js";
|
|
10
|
+
const S = g(({ isDemoDone: i, studentName: r, onViewSummary: o }) => {
|
|
11
|
+
const t = $().device <= v.MOBILE, p = l(
|
|
13
12
|
(e) => {
|
|
14
13
|
if (!e) return "";
|
|
15
|
-
if (e ===
|
|
14
|
+
if (e === "studentProfile")
|
|
16
15
|
return `We understood your goals and expectations to create ${r}'s profile.`;
|
|
17
|
-
if (e ===
|
|
16
|
+
if (e === "insights")
|
|
18
17
|
return `With tutor’s guidance ${r} solved problems, helping us assess their math proficiency.`;
|
|
19
|
-
if (e ===
|
|
18
|
+
if (e === "learningPlan")
|
|
20
19
|
return `The plan will keep evolving based on ${r}'s progress and evolving needs.`;
|
|
21
20
|
},
|
|
22
21
|
[r]
|
|
23
|
-
),
|
|
22
|
+
), c = l(
|
|
24
23
|
(e) => {
|
|
25
24
|
o == null || o(e);
|
|
26
25
|
},
|
|
27
26
|
[o]
|
|
28
27
|
);
|
|
29
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ u(a, { children: [
|
|
30
29
|
/* @__PURE__ */ s(x, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: i ? "What happened in today’s session" : "What happens in the first session?" }),
|
|
31
|
-
/* @__PURE__ */ s(
|
|
32
|
-
/* @__PURE__ */ s(
|
|
33
|
-
({ title: e, description:
|
|
34
|
-
|
|
30
|
+
/* @__PURE__ */ s(b, { height: t ? 16 : 20 }),
|
|
31
|
+
/* @__PURE__ */ s(a, { $flexGapX: 1, $justifyContent: "center", $flexDirection: t ? "column" : "row", children: (i ? C : T).map(
|
|
32
|
+
({ title: e, description: m, image: f, textBG: d, ctaLabel: h, key: n }) => /* @__PURE__ */ s(
|
|
33
|
+
W,
|
|
35
34
|
{
|
|
36
35
|
title: e,
|
|
37
|
-
description:
|
|
38
|
-
image:
|
|
36
|
+
description: p(n) || m,
|
|
37
|
+
image: f,
|
|
39
38
|
textBG: d,
|
|
40
|
-
ctaLabel:
|
|
41
|
-
|
|
39
|
+
ctaLabel: h,
|
|
40
|
+
keyId: n,
|
|
42
41
|
isDemoDone: i,
|
|
43
|
-
onClick:
|
|
42
|
+
onClick: c
|
|
44
43
|
},
|
|
45
44
|
e
|
|
46
45
|
)
|
|
47
46
|
) })
|
|
48
47
|
] });
|
|
49
|
-
}),
|
|
48
|
+
}), D = S;
|
|
50
49
|
export {
|
|
51
|
-
|
|
50
|
+
D as default
|
|
52
51
|
};
|
|
53
52
|
//# sourceMappingURL=session-summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-summary.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary.tsx"],"sourcesContent":["import type { ISessionSummaryProps } from './session-summary-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport
|
|
1
|
+
{"version":3,"file":"session-summary.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary.tsx"],"sourcesContent":["import type { ISessionSummaryProps } from './session-summary-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { sessionSummaryAfterDemo, sessionSummaryData } from './session-summary-constants';\nimport SessionSummaryCard from './summary-card/summary-card';\n\nconst SessionSummary = memo(({ isDemoDone, studentName, onViewSummary }: ISessionSummaryProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const getDescription = useCallback(\n (key?: string) => {\n if (!key) return '';\n\n if (key === 'studentProfile') {\n return `We understood your goals and expectations to create ${studentName}'s profile.`;\n }\n\n if (key === 'insights') {\n return `With tutor’s guidance ${studentName} solved problems, helping us assess their math proficiency.`;\n }\n\n if (key === 'learningPlan') {\n return `The plan will keep evolving based on ${studentName}'s progress and evolving needs.`;\n }\n },\n [studentName],\n );\n\n const handleClick = useCallback(\n (key: string) => {\n onViewSummary?.(key);\n },\n [onViewSummary],\n );\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {isDemoDone ? `What happened in today’s session` : `What happens in the first session?`}\n </Text>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $flexGapX={1} $justifyContent=\"center\" $flexDirection={isMobile ? 'column' : 'row'}>\n {(isDemoDone ? sessionSummaryAfterDemo : sessionSummaryData).map(\n ({ title, description, image, textBG, ctaLabel, key }) => (\n <SessionSummaryCard\n key={title}\n title={title}\n description={getDescription(key) || (description as string)}\n image={image}\n textBG={textBG}\n ctaLabel={ctaLabel}\n keyId={key}\n isDemoDone={isDemoDone}\n onClick={handleClick}\n />\n ),\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default SessionSummary;\n"],"names":["SessionSummary","memo","isDemoDone","studentName","onViewSummary","isMobile","useTheme","EDeviceType","getDescription","useCallback","key","handleClick","FlexView","jsx","Text","Separator","sessionSummaryAfterDemo","sessionSummaryData","title","description","image","textBG","ctaLabel","SessionSummaryCard","SessionSummary$1"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAiBC,EAAK,CAAC,EAAE,YAAAC,GAAY,aAAAC,GAAa,eAAAC,QAA0C;AAE1F,QAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAiBC;AAAA,IACrB,CAACC,MAAiB;AACZ,UAAA,CAACA,EAAY,QAAA;AAEjB,UAAIA,MAAQ;AACV,eAAO,uDAAuDP,CAAW;AAG3E,UAAIO,MAAQ;AACV,eAAO,yBAAyBP,CAAW;AAG7C,UAAIO,MAAQ;AACV,eAAO,wCAAwCP,CAAW;AAAA,IAE9D;AAAA,IACA,CAACA,CAAW;AAAA,EAAA,GAGRQ,IAAcF;AAAA,IAClB,CAACC,MAAgB;AACf,MAAAN,KAAA,QAAAA,EAAgBM;AAAA,IAClB;AAAA,IACA,CAACN,CAAa;AAAA,EAAA;AAGhB,2BACGQ,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAC5D,UAAaZ,IAAA,qCAAqC,sCACrD;AAAA,IACC,gBAAAW,EAAAE,GAAA,EAAU,QAAQV,IAAW,KAAK,IAAI;AAAA,IACtC,gBAAAQ,EAAAD,GAAA,EAAS,WAAW,GAAG,iBAAgB,UAAS,gBAAgBP,IAAW,WAAW,OACnF,WAAaH,IAAAc,IAA0BC,GAAoB;AAAA,MAC3D,CAAC,EAAE,OAAAC,GAAO,aAAAC,GAAa,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,KAAAZ,QAC9C,gBAAAG;AAAA,QAACU;AAAA,QAAA;AAAA,UAEC,OAAAL;AAAA,UACA,aAAaV,EAAeE,CAAG,KAAMS;AAAA,U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