mario-core 2.0.107-release → 2.0.108-release

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.
Files changed (99) hide show
  1. package/dist/Dashboard-BoYmBZNH.js +1 -0
  2. package/dist/Dashboard-BohWITqY.mjs +206 -0
  3. package/dist/Dashboard-CNeLkxKn.mjs +206 -0
  4. package/dist/Dashboard-CdE8azYL.mjs +206 -0
  5. package/dist/Dashboard-J2_aB4nr.js +1 -0
  6. package/dist/Dashboard-UaTWEdw7.js +1 -0
  7. package/dist/EmailTemplateDetail-BUXh0rmo.mjs +443 -0
  8. package/dist/EmailTemplateDetail-BVvZIx3m.js +1 -0
  9. package/dist/EmailTemplateDetail-B__EDhB8.mjs +443 -0
  10. package/dist/EmailTemplateDetail-CCjCTnSu.js +1 -0
  11. package/dist/EmailTemplateDetail-CxZ-vu_-.js +1 -0
  12. package/dist/EmailTemplateDetail-Qhx-osUA.mjs +443 -0
  13. package/dist/EmailTemplateList-B8f6wVB3.js +1 -0
  14. package/dist/EmailTemplateList-CUCMBqBJ.js +1 -0
  15. package/dist/EmailTemplateList-CzfA-3kQ.mjs +170 -0
  16. package/dist/EmailTemplateList-DBKq5mG7.mjs +170 -0
  17. package/dist/EmailTemplateList-DEmHB3bi.mjs +170 -0
  18. package/dist/EmailTemplateList-uuxfqcEO.js +1 -0
  19. package/dist/GalleryList-Bgwjxzce.js +1 -0
  20. package/dist/GalleryList-Bi89gGR2.mjs +329 -0
  21. package/dist/GalleryList-Dlc2e9PL.mjs +329 -0
  22. package/dist/GalleryList-DnhQAwOw.js +1 -0
  23. package/dist/GalleryList-P4_Es_iv.mjs +329 -0
  24. package/dist/GalleryList-w-ECfc3W.js +1 -0
  25. package/dist/Login-BNjTZptP.js +1 -0
  26. package/dist/Login-BtTGTO_G.js +1 -0
  27. package/dist/Login-CPYV_-gQ.mjs +1697 -0
  28. package/dist/Login-CSmQdSBL.js +1 -0
  29. package/dist/Login-CbC6Q-Yk.mjs +1697 -0
  30. package/dist/Login-Dx5u6cvm.mjs +1697 -0
  31. package/dist/NotificationList-BChmo09j.js +2 -0
  32. package/dist/NotificationList-BOytZRAN.mjs +3982 -0
  33. package/dist/NotificationList-BafFtIAD.js +2 -0
  34. package/dist/NotificationList-Bvy5c_o1.mjs +3982 -0
  35. package/dist/NotificationList-CubwqBsm.mjs +3982 -0
  36. package/dist/NotificationList-KmXVzoAr.js +2 -0
  37. package/dist/SkillList-CFZ22qQ9.mjs +386 -0
  38. package/dist/SkillList-C_1JfxfB.js +1 -0
  39. package/dist/SkillList-DKcDkv94.js +1 -0
  40. package/dist/SkillList-DmC__72S.mjs +386 -0
  41. package/dist/SkillList-IVVDVSZy.js +1 -0
  42. package/dist/SkillList-jK0IHAIH.mjs +386 -0
  43. package/dist/TeacherSelector-BpES1FKj.js +1 -0
  44. package/dist/TeacherSelector-BuhI-rGs.mjs +30 -0
  45. package/dist/TeacherSelector-De6mBvx2.mjs +30 -0
  46. package/dist/TeacherSelector-HTemy-Ez.js +1 -0
  47. package/dist/TeacherSelector-fEPchTjh.js +1 -0
  48. package/dist/TeacherSelector-lR6Ch-At.mjs +30 -0
  49. package/dist/TheContent-BHBSuj40.mjs +38 -0
  50. package/dist/TheContent-C-xV_3xT.js +1 -0
  51. package/dist/TheContent-DEgi129y.js +1 -0
  52. package/dist/TheContent-Di5D7Gbr.mjs +38 -0
  53. package/dist/TheContent-GAKUlCji.mjs +38 -0
  54. package/dist/TheContent-ZKcVU5qk.js +1 -0
  55. package/dist/UserContainer--xRA0JQU.js +5 -0
  56. package/dist/UserContainer-B6yMu-I3.js +5 -0
  57. package/dist/UserContainer-CkZ53kH4.mjs +2902 -0
  58. package/dist/UserContainer-D3Xz2HUW.mjs +2902 -0
  59. package/dist/UserContainer-DSQ-U3F0.js +5 -0
  60. package/dist/UserContainer-Dyn6ibh1.mjs +2902 -0
  61. package/dist/UserDetail-7FH_HSWR.mjs +903 -0
  62. package/dist/UserDetail-BKnlgUEz.js +1 -0
  63. package/dist/UserDetail-DBpzl5fo.mjs +903 -0
  64. package/dist/UserDetail-DQOnt-wM.js +1 -0
  65. package/dist/UserDetail-fUJTkzDg.mjs +903 -0
  66. package/dist/UserDetail-oF6NNexq.js +1 -0
  67. package/dist/UserList-B50qyfjL.mjs +1261 -0
  68. package/dist/UserList-C2Aaq5z8.js +7 -0
  69. package/dist/UserList-Cenxl6uR.mjs +1261 -0
  70. package/dist/UserList-DhIaXh_s.mjs +1261 -0
  71. package/dist/UserList-EX5eXQba.js +7 -0
  72. package/dist/UserList-EcYGduyj.js +7 -0
  73. package/dist/constants--_acGsaz.js +1 -0
  74. package/dist/constants-B9hWa6_R.mjs +286 -0
  75. package/dist/constants-BjESNXd6.mjs +286 -0
  76. package/dist/constants-C5BtfcR2.js +1 -0
  77. package/dist/constants-C5WkZZdL.mjs +286 -0
  78. package/dist/constants-DsRvQ2-W.js +1 -0
  79. package/dist/index-BGTGhZlt.js +15 -0
  80. package/dist/index-CO_pMkbk.mjs +19148 -0
  81. package/dist/index-CVKal53K.mjs +19158 -0
  82. package/dist/index-D0HO9-Jy.js +15 -0
  83. package/dist/index-DaEyv-Te.mjs +19158 -0
  84. package/dist/index-txMWO23Z.js +15 -0
  85. package/dist/index.js +1 -1
  86. package/dist/index.modern.js +1 -1
  87. package/dist/mailCategoryService-B2QTjf12.js +1 -0
  88. package/dist/mailCategoryService-BFfwPcnM.mjs +11 -0
  89. package/dist/mailCategoryService-Bnr7gh_G.js +1 -0
  90. package/dist/mailCategoryService-D00fI25v.js +1 -0
  91. package/dist/mailCategoryService-DprdWJcz.mjs +11 -0
  92. package/dist/mailCategoryService-RFcp_8SH.mjs +11 -0
  93. package/dist/userService-B50oEL_l.mjs +56 -0
  94. package/dist/userService-B_lNnb--.js +1 -0
  95. package/dist/userService-C4d9YEpa.js +1 -0
  96. package/dist/userService-CiQiZh4G.mjs +56 -0
  97. package/dist/userService-DTLWpqzW.js +1 -0
  98. package/dist/userService-fA4Xahnz.mjs +56 -0
  99. package/package.json +1 -1
@@ -0,0 +1,1697 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { memo as je, useState as y, useCallback as I, Fragment as ve, useEffect as Z } from "react";
3
+ import { Input as ie, Modal as Ye, ModalBody as Ke, ModalFooter as us, Button as ps, Form as fs, FormGroup as me, Row as be, Col as ee } from "reactstrap";
4
+ import { Link as Je, useLocation as ws, useNavigate as xe } from "react-router-dom";
5
+ import { s as o, M as Ze, E as te, a as Qe, A as Ss, g as Ie, b as g, f as ys, c as L, d as M, e as Ns, r as vs, h as ge, i as Xe, B as Is, j as ye, k as bs, l as ks, m as Ts, I as Pe, N as Es, n as Cs, o as Ls, p as Ps, q as xs, t as Rs, u as Be, v as _s, w as $s, x as Ce, y as Fe, z as As, C as Ms, D as Gs, F as Os } from "./index-CVKal53K.mjs";
6
+ import { useDispatch as ke, useSelector as Le } from "react-redux";
7
+ import { Formik as Te } from "formik";
8
+ import * as V from "yup";
9
+ import { useGoogleReCaptcha as Re, GoogleReCaptcha as Us, GoogleReCaptchaProvider as zs } from "react-google-recaptcha-v3";
10
+ import { GoogleOAuthProvider as Bs, useGoogleLogin as Fs } from "@react-oauth/google";
11
+ import { L as Ne, T as es } from "./types-BvnbDeJF.mjs";
12
+ import { G as Ve } from "./constants-C5WkZZdL.mjs";
13
+ import { LogLevel as Se, PublicClientApplication as Vs } from "@azure/msal-browser";
14
+ import * as de from "@amplitude/analytics-browser";
15
+ const Ds = {
16
+ backgroundColor: "#f7f9fc",
17
+ borderRadius: "4px",
18
+ marginBottom: "5px",
19
+ position: "relative"
20
+ }, Hs = {
21
+ backgroundColor: "#ffffff",
22
+ paddingRight: "50px",
23
+ color: "#333333",
24
+ caretColor: "#333333"
25
+ }, qs = {
26
+ fontSize: "20px",
27
+ position: "absolute",
28
+ right: "10px",
29
+ color: "#316CD9"
30
+ }, Ws = (s) => s.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (t, i) => i.toUpperCase()), he = ({
31
+ isShowPassword: s,
32
+ togglePasswordVisible: t,
33
+ onChange: i,
34
+ placeholder: c
35
+ }) => /* @__PURE__ */ n("div", { className: "d-flex align-items-center w-100", style: Ds, children: [
36
+ /* @__PURE__ */ e(
37
+ ie,
38
+ {
39
+ className: "border password-input",
40
+ style: Hs,
41
+ type: s ? "text" : "password",
42
+ name: "password",
43
+ onChange: i,
44
+ placeholder: c || "Password",
45
+ autocomplete: c ? Ws(c) : "password",
46
+ required: !0
47
+ }
48
+ ),
49
+ /* @__PURE__ */ e(
50
+ "i",
51
+ {
52
+ className: `far ${s ? "fa-eye-slash" : "fa-eye"} mx-2 cursor-pointer`,
53
+ style: qs,
54
+ onClick: () => t(),
55
+ title: s ? "Hide" : "Show"
56
+ }
57
+ )
58
+ ] }), js = ({ open: s, onConfirm: t, onClose: i, clickHandler: c }) => {
59
+ const [m, p] = y(Ve[0].value);
60
+ return /* @__PURE__ */ n(
61
+ Ye,
62
+ {
63
+ isOpen: s,
64
+ className: `${o["teacher-code"]}`,
65
+ style: { zIndex: 1201 },
66
+ centered: !0,
67
+ autoFocus: !1,
68
+ returnFocusAfterClose: !1,
69
+ children: [
70
+ /* @__PURE__ */ n("div", { className: `${o["header-teacher-code"]}`, children: [
71
+ /* @__PURE__ */ e("div", { style: { padding: "16px 24px", margin: 0, fontWeight: 500, fontSize: "1.25rem" }, children: "Select Grade" }),
72
+ /* @__PURE__ */ e("div", { hidden: !i, children: /* @__PURE__ */ e(Ze, { onClick: () => i?.(), className: `${o["close-icon"]}`, size: 24, style: { color: "rgba(0, 0, 0, 0.54)" } }) })
73
+ ] }),
74
+ /* @__PURE__ */ n(Ke, { style: { padding: "20px 24px" }, children: [
75
+ /* @__PURE__ */ e("p", { className: `${o["teacher-code-label"]}`, style: { margin: 0, marginBottom: "16px", color: "rgba(0, 0, 0, 0.6)" }, children: "You are logging in as a student, please select your grade" }),
76
+ /* @__PURE__ */ n("div", { className: "form-floating", style: { marginTop: "16px", marginBottom: "8px" }, children: [
77
+ /* @__PURE__ */ e(
78
+ ie,
79
+ {
80
+ type: "select",
81
+ id: "floatingSelectGrade",
82
+ value: m,
83
+ onChange: (u) => p(u.target.value),
84
+ children: Ve.map((u) => /* @__PURE__ */ e("option", { value: u.value, children: u.label }, u.value))
85
+ }
86
+ ),
87
+ /* @__PURE__ */ e("label", { htmlFor: "floatingSelectGrade", children: "Select grade" })
88
+ ] })
89
+ ] }),
90
+ /* @__PURE__ */ e(us, { style: { borderTop: "none", padding: "8px 24px" }, children: /* @__PURE__ */ e(ps, { disabled: !m, style: { borderRadius: 20, background: "#316cd9", border: "none", opacity: m ? 1 : 0.65 }, color: "primary", onClick: () => t(m, c), children: "Confirm" }) })
91
+ ]
92
+ }
93
+ );
94
+ };
95
+ function Ys(s, t) {
96
+ return JSON.stringify(s) === JSON.stringify(t);
97
+ }
98
+ const Ks = je(js, Ys), Js = V.object({
99
+ email: V.string().email("Email is invalid").required("Email is required"),
100
+ password: V.string().required("Password is required"),
101
+ rememberMe: V.boolean()
102
+ }), Zs = ({ onSuccess: s, onError: t }) => {
103
+ const i = Fs({
104
+ onSuccess: async (c) => {
105
+ try {
106
+ const m = await fetch("https://www.googleapis.com/oauth2/v3/userinfo", {
107
+ headers: { Authorization: `Bearer ${c.access_token}` }
108
+ }).then((u) => u.json()), p = {
109
+ accessToken: c.access_token,
110
+ googleId: m.sub,
111
+ profileObj: {
112
+ email: m.email,
113
+ familyName: m.family_name,
114
+ givenName: m.given_name,
115
+ imageUrl: m.picture,
116
+ name: m.name
117
+ }
118
+ };
119
+ s(p);
120
+ } catch (m) {
121
+ t(m);
122
+ }
123
+ },
124
+ onError: (c) => t(c)
125
+ });
126
+ return /* @__PURE__ */ n("div", { className: o["btn-login-with-sso"], onClick: () => i(), children: [
127
+ /* @__PURE__ */ n("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: "24px", height: "24px", style: { marginRight: "8px" }, children: [
128
+ /* @__PURE__ */ e("path", { fill: "#EA4335", d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" }),
129
+ /* @__PURE__ */ e("path", { fill: "#4285F4", d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z" }),
130
+ /* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z" }),
131
+ /* @__PURE__ */ e("path", { fill: "#34A853", d: "M24 48c6.48 0 12.38-2.12 16.66-5.73l-7.73-6c-2.15 1.45-4.92 2.3-8.93 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" }),
132
+ /* @__PURE__ */ e("path", { fill: "none", d: "M0 0h48v48H0z" })
133
+ ] }),
134
+ /* @__PURE__ */ e("p", { children: "GOOGLE" })
135
+ ] });
136
+ }, Qs = ({
137
+ defaultInfo: s,
138
+ userLogin: t,
139
+ school: i,
140
+ isShowPassword: c,
141
+ setIsShowPassword: m,
142
+ fnIsCheckLogin: p,
143
+ // isLoginGoogle,
144
+ // submitLogin,
145
+ // infoUser,
146
+ googleClientId: u,
147
+ fnLoginSSO: b,
148
+ extensionEmail: x,
149
+ onLoginWidthClever: k,
150
+ openModalSelectGrade: P,
151
+ handleRegisterUser: w,
152
+ onToggleModelGrade: R
153
+ }) => {
154
+ const N = () => m(!c), j = ke(), { executeRecaptcha: G } = Re(), T = I(async () => {
155
+ if (!G) {
156
+ console.log("execute recaptcha undefined");
157
+ return;
158
+ }
159
+ return await G("login");
160
+ }, [G]), $ = async (E) => {
161
+ try {
162
+ await Ss(E);
163
+ } catch (C) {
164
+ console.error(C);
165
+ }
166
+ }, Y = async (E) => {
167
+ if (E?.accessToken) {
168
+ let {
169
+ email: C,
170
+ familyName: K,
171
+ givenName: v,
172
+ imageUrl: _,
173
+ name: O
174
+ // fullName
175
+ } = E.profileObj, H = E.accessToken, se = E.googleId;
176
+ const ae = window.location.hostname.split(".marioforme.com")?.[0], Q = C.split("@")?.[1], Ee = x?.split(",")?.map((D) => D.trim())?.filter((D) => D).some((D) => Q.includes(D));
177
+ if (!Q.includes(ae) && !Ee) {
178
+ alert(
179
+ "The email address you used does not match the login information in the database. Please check that you are using your school assigned email address to log into MARIO for Me. If you have further trouble please notify your school site administrator"
180
+ ), await $([`${Q} is incorrect`]);
181
+ return;
182
+ }
183
+ const ue = {
184
+ firstName: v,
185
+ lastName: K,
186
+ imageUrl: _,
187
+ fullName: O,
188
+ email: C,
189
+ accessToken: H,
190
+ googleId: se
191
+ };
192
+ j(Qe(ue)), p(
193
+ es.Google,
194
+ ue,
195
+ H,
196
+ T
197
+ );
198
+ }
199
+ };
200
+ return /* @__PURE__ */ n(ve, { children: [
201
+ /* @__PURE__ */ e(
202
+ Te,
203
+ {
204
+ initialValues: s,
205
+ validationSchema: Js,
206
+ onSubmit: async (E) => {
207
+ try {
208
+ const C = await T();
209
+ if (!C) return;
210
+ E.captcha = C, E.loginType = Ne.Default, t(E);
211
+ } catch (C) {
212
+ console.error(C);
213
+ }
214
+ },
215
+ children: (E) => {
216
+ const {
217
+ handleBlur: C,
218
+ handleSubmit: K,
219
+ values: v,
220
+ touched: _,
221
+ errors: O,
222
+ setFieldValue: H
223
+ } = E, se = _.email && O.email, le = _.password && O.password;
224
+ return /* @__PURE__ */ e("div", { className: `${o["box-login"]} w-100`, children: /* @__PURE__ */ e(
225
+ fs,
226
+ {
227
+ className: `${o["block-login"]}`,
228
+ onSubmit: K,
229
+ children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
230
+ /* @__PURE__ */ n("div", { className: "d-flex align-items-center mb-4", children: [
231
+ /* @__PURE__ */ e(
232
+ "img",
233
+ {
234
+ hidden: !i?.schoolLogo,
235
+ src: i?.schoolLogo,
236
+ className: `${o["school-icon"]} mr-3`
237
+ }
238
+ ),
239
+ /* @__PURE__ */ e(
240
+ "p",
241
+ {
242
+ className: `${o["school-name"]} mb-0`,
243
+ children: i.schoolName
244
+ }
245
+ )
246
+ ] }),
247
+ /* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Welcome Back!" }),
248
+ /* @__PURE__ */ e(
249
+ "p",
250
+ {
251
+ className: `${o["login-description"]} mb-5`,
252
+ children: "Please enter your MARIO Education account details"
253
+ }
254
+ ),
255
+ /* @__PURE__ */ n(
256
+ me,
257
+ {
258
+ className: `${o["form-user-name"]}`,
259
+ children: [
260
+ /* @__PURE__ */ e(
261
+ ie,
262
+ {
263
+ type: "text",
264
+ name: "email",
265
+ placeholder: "Email",
266
+ value: v.email,
267
+ onChange: (ae) => H(
268
+ "email",
269
+ ae.target?.value?.trim() || ""
270
+ ),
271
+ autocomplete: "email",
272
+ onBlur: C("email"),
273
+ required: !0
274
+ }
275
+ ),
276
+ se && /* @__PURE__ */ e(
277
+ te,
278
+ {
279
+ text: O.email
280
+ }
281
+ )
282
+ ]
283
+ }
284
+ ),
285
+ /* @__PURE__ */ n(me, { children: [
286
+ /* @__PURE__ */ e(
287
+ he,
288
+ {
289
+ isShowPassword: c,
290
+ togglePasswordVisible: N,
291
+ onChange: (ae) => H(
292
+ "password",
293
+ ae.target?.value?.trim() || ""
294
+ )
295
+ }
296
+ ),
297
+ le && /* @__PURE__ */ e(
298
+ te,
299
+ {
300
+ text: O.password
301
+ }
302
+ )
303
+ ] }),
304
+ /* @__PURE__ */ e(me, {}),
305
+ /* @__PURE__ */ n("div", { className: "d-flex justify-content-between", children: [
306
+ /* @__PURE__ */ n("div", { className: "d-flex align-items-center", style: { gap: "8px" }, children: [
307
+ /* @__PURE__ */ e(
308
+ "input",
309
+ {
310
+ type: "checkbox",
311
+ checked: !v.isSessionUserBrowser,
312
+ className: `${o["checkbox-keep-login"]}`,
313
+ onChange: () => H(
314
+ "isSessionUserBrowser",
315
+ !v.isSessionUserBrowser
316
+ )
317
+ }
318
+ ),
319
+ /* @__PURE__ */ e(
320
+ "p",
321
+ {
322
+ className: `${o["label-keep-login"]} mb-0 ml-2`,
323
+ children: "Keep me logged in"
324
+ }
325
+ )
326
+ ] }),
327
+ /* @__PURE__ */ e(
328
+ Je,
329
+ {
330
+ to: "/forgot-password",
331
+ className: `${o["link-to-login"]}`,
332
+ children: "Forgot password?"
333
+ }
334
+ )
335
+ ] }),
336
+ /* @__PURE__ */ e(
337
+ "button",
338
+ {
339
+ className: `${o["btn-login"]} mt-5`,
340
+ type: "submit",
341
+ children: "LOG IN"
342
+ }
343
+ ),
344
+ /* @__PURE__ */ e(
345
+ "p",
346
+ {
347
+ className: `${o["option-text"]} my-3 text-center`,
348
+ children: "OR"
349
+ }
350
+ ),
351
+ /* @__PURE__ */ n(be, { className: "mb-4", children: [
352
+ /* @__PURE__ */ e(
353
+ ee,
354
+ {
355
+ lg: 6,
356
+ md: 6,
357
+ xs: 12,
358
+ className: "pr-md-3",
359
+ children: !!u && /* @__PURE__ */ e(
360
+ Bs,
361
+ {
362
+ clientId: u,
363
+ children: /* @__PURE__ */ e(
364
+ Zs,
365
+ {
366
+ onSuccess: Y,
367
+ onError: () => console.log("Google login failed")
368
+ }
369
+ )
370
+ }
371
+ )
372
+ }
373
+ ),
374
+ i.schoolId && /* @__PURE__ */ e(
375
+ ee,
376
+ {
377
+ lg: 6,
378
+ md: 6,
379
+ xs: 12,
380
+ className: `${o["btn-login-sso"]} pl-md-2`,
381
+ hidden: !i?.schoolId,
382
+ children: /* @__PURE__ */ n(
383
+ "div",
384
+ {
385
+ className: o["btn-login-with-sso"],
386
+ onClick: () => b(T),
387
+ children: [
388
+ /* @__PURE__ */ e("img", { src: "images/microsoft-logo.png" }),
389
+ /* @__PURE__ */ e("p", { children: "MICROSOFT" })
390
+ ]
391
+ }
392
+ )
393
+ }
394
+ )
395
+ ] }),
396
+ /* @__PURE__ */ e(
397
+ "div",
398
+ {
399
+ className: `${o["btn-login-sso"]}`,
400
+ children: /* @__PURE__ */ n(
401
+ "div",
402
+ {
403
+ className: o["btn-login-with-sso"],
404
+ onClick: () => window.open(
405
+ "https://launchpad.classlink.com/login"
406
+ ),
407
+ children: [
408
+ /* @__PURE__ */ e("img", { src: "images/class-link-icon.png" }),
409
+ /* @__PURE__ */ e("p", { children: "SIGN IN WITH CLASSLINK" })
410
+ ]
411
+ }
412
+ )
413
+ }
414
+ ),
415
+ /* @__PURE__ */ e(
416
+ "div",
417
+ {
418
+ className: `${o["btn-login-sso"]} mt-4`,
419
+ children: /* @__PURE__ */ n(
420
+ "div",
421
+ {
422
+ className: o["btn-login-with-sso"],
423
+ onClick: () => k(),
424
+ children: [
425
+ /* @__PURE__ */ e("img", { src: "images/clever-icon.png" }),
426
+ /* @__PURE__ */ e("p", { children: "SIGN IN WITH CLEVER" })
427
+ ]
428
+ }
429
+ )
430
+ }
431
+ )
432
+ ] })
433
+ }
434
+ ) });
435
+ }
436
+ }
437
+ ),
438
+ /* @__PURE__ */ e(Ks, { open: P, onConfirm: w, clickHandler: T, onClose: R })
439
+ ] });
440
+ }, Xs = {
441
+ email: "",
442
+ captcha: ""
443
+ }, ea = "/", De = "/login", sa = "Log in", ss = () => {
444
+ const s = new URLSearchParams(ws().search), t = s.get("token"), i = s.get("key") ?? "", c = ke(), m = xe(), [p, u] = y(!1), b = I(() => {
445
+ u(!p);
446
+ }, [p]), [x, k] = y(!1), [P, w] = y(!1), [R, N] = y({
447
+ token: "",
448
+ password: "",
449
+ reEnterPassword: "",
450
+ email: "",
451
+ userId: ""
452
+ }), [j, G] = y(!0), { executeRecaptcha: T } = Re();
453
+ Z(() => {
454
+ document.title = sa, Ie() && m(ea);
455
+ }, []);
456
+ const $ = I(async (v) => {
457
+ c(g(!0));
458
+ try {
459
+ await ys(v), m(De), c(
460
+ L({
461
+ type: "success",
462
+ message: "A mail to reset password was sent"
463
+ })
464
+ );
465
+ } catch (_) {
466
+ c(
467
+ L({
468
+ type: "danger",
469
+ message: _.response?.data?.title || _.message || "Error occured"
470
+ })
471
+ ), localStorage.removeItem(M), sessionStorage.removeItem(M);
472
+ }
473
+ c(g(!1));
474
+ }, []), Y = I(
475
+ async (v, _) => {
476
+ c(g(!0));
477
+ try {
478
+ const O = await Ns(v, _);
479
+ O.data ? N({
480
+ ...R,
481
+ token: v,
482
+ email: O.data
483
+ }) : G(!1);
484
+ } catch {
485
+ G(!1);
486
+ }
487
+ c(g(!1));
488
+ },
489
+ []
490
+ ), E = I(async (v) => {
491
+ c(g(!0));
492
+ try {
493
+ await vs({ ...v, key: i }), m(De), c(
494
+ L({
495
+ type: "success",
496
+ message: "Reset password sucessfully"
497
+ })
498
+ );
499
+ } catch (_) {
500
+ c(
501
+ L({
502
+ type: "danger",
503
+ message: _.response?.data?.title || _.message || "Error occured"
504
+ })
505
+ ), localStorage.removeItem(M), sessionStorage.removeItem(M);
506
+ }
507
+ c(g(!1));
508
+ }, []), C = I(async () => {
509
+ if (!T) {
510
+ console.log("execute recaptcha undefined");
511
+ return;
512
+ }
513
+ return await T("forgetPass");
514
+ }, [T]), K = I(() => {
515
+ }, []);
516
+ return Z(() => {
517
+ t && i && Y(t, i);
518
+ }, [t, i]), {
519
+ defaultInfo: Xs,
520
+ forgotPasswordRequest: $,
521
+ checkResetTokenRequest: Y,
522
+ validLink: j,
523
+ resetPasswordRequest: E,
524
+ openLogin: p,
525
+ toggle: b,
526
+ isShowNewPassword: x,
527
+ setIsShowNewPassword: k,
528
+ isShowReTypePassword: P,
529
+ setIsShowReTypePassword: w,
530
+ clickHandler: C,
531
+ handleVerify: K,
532
+ initialValues: R
533
+ };
534
+ }, aa = {
535
+ email: "",
536
+ captcha: ""
537
+ }, oa = V.object({
538
+ email: V.string().email("Email is invalid").required("Email is required")
539
+ }), ta = ({ school: s }) => {
540
+ const {
541
+ forgotPasswordRequest: t,
542
+ clickHandler: i,
543
+ handleVerify: c
544
+ } = ss();
545
+ return /* @__PURE__ */ e(
546
+ Te,
547
+ {
548
+ initialValues: aa,
549
+ enableReinitialize: !0,
550
+ validationSchema: oa,
551
+ onSubmit: async (m) => {
552
+ const p = await i();
553
+ p && (m.captcha = p, t(m));
554
+ },
555
+ children: (m) => {
556
+ const {
557
+ handleChange: p,
558
+ handleSubmit: u,
559
+ values: b,
560
+ touched: x,
561
+ errors: k
562
+ } = m;
563
+ return /* @__PURE__ */ e("div", { className: `${o["box-login"]}`, children: /* @__PURE__ */ e("div", { className: `${o["block-login"]}`, children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
564
+ /* @__PURE__ */ n("div", { className: "d-flex align-items-center mb-4", children: [
565
+ /* @__PURE__ */ e(
566
+ "img",
567
+ {
568
+ src: s.schoolLogo,
569
+ className: `${o["school-icon"]} mr-3`
570
+ }
571
+ ),
572
+ /* @__PURE__ */ e(
573
+ "p",
574
+ {
575
+ className: `${o["school-name"]} mb-0`,
576
+ children: s.schoolName
577
+ }
578
+ )
579
+ ] }),
580
+ /* @__PURE__ */ e("p", { className: `${o["title-login"]} `, children: "Forgot password" }),
581
+ /* @__PURE__ */ e(
582
+ "p",
583
+ {
584
+ className: `${o["recover-account"]} mb-5`,
585
+ children: "Enter email to recover your account"
586
+ }
587
+ ),
588
+ /* @__PURE__ */ n("div", { className: "w-100", children: [
589
+ /* @__PURE__ */ e(
590
+ ie,
591
+ {
592
+ type: "text",
593
+ name: "email",
594
+ id: "email",
595
+ placeholder: "Input email",
596
+ onChange: p,
597
+ value: b.email
598
+ }
599
+ ),
600
+ x.email && k.email && /* @__PURE__ */ e(te, { text: k.email })
601
+ ] }),
602
+ /* @__PURE__ */ e(
603
+ Je,
604
+ {
605
+ to: "/login",
606
+ className: `${o["link-to-login"]} mt-2`,
607
+ children: "Return to login"
608
+ }
609
+ ),
610
+ /* @__PURE__ */ e(
611
+ Us,
612
+ {
613
+ action: "forgetPass",
614
+ onVerify: c
615
+ }
616
+ ),
617
+ /* @__PURE__ */ e(ee, { className: "p-0", children: /* @__PURE__ */ e(
618
+ "button",
619
+ {
620
+ className: `${o["btn-login"]} mt-5`,
621
+ onClick: () => u(),
622
+ children: "Continue"
623
+ }
624
+ ) })
625
+ ] }) }) });
626
+ }
627
+ }
628
+ );
629
+ }, na = V.object({
630
+ password: V.string().required("New password is required"),
631
+ reEnterPassword: V.string().required("Please re-enter new password").test("matching", "Passwords do not match", function() {
632
+ return this.parent.password === this.parent.reEnterPassword;
633
+ })
634
+ }), ra = () => {
635
+ const {
636
+ validLink: s,
637
+ resetPasswordRequest: t,
638
+ isShowNewPassword: i,
639
+ setIsShowNewPassword: c,
640
+ isShowReTypePassword: m,
641
+ setIsShowReTypePassword: p,
642
+ initialValues: u
643
+ } = ss();
644
+ return /* @__PURE__ */ e(
645
+ Te,
646
+ {
647
+ initialValues: u,
648
+ enableReinitialize: !0,
649
+ validationSchema: na,
650
+ onSubmit: (b) => {
651
+ t(b);
652
+ },
653
+ children: (b) => {
654
+ const { setFieldValue: x, handleSubmit: k, touched: P, errors: w, values: R } = b;
655
+ return /* @__PURE__ */ e(be, { className: `${o["box-login"]}`, children: /* @__PURE__ */ e(ee, { className: "p-0", children: /* @__PURE__ */ e("div", { className: `${o["block-login"]}`, children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
656
+ /* @__PURE__ */ e(
657
+ "img",
658
+ {
659
+ src: `${ge(
660
+ "/images/horizontal-logo-blue.svg"
661
+ )}`,
662
+ className: `${o["img-login-rectangle"]}`
663
+ }
664
+ ),
665
+ /* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Reset Password" }),
666
+ /* @__PURE__ */ e("div", { className: "w-100", children: s ? /* @__PURE__ */ n(ve, { children: [
667
+ /* @__PURE__ */ e(
668
+ me,
669
+ {
670
+ className: `${o["form-user-name"]}`,
671
+ children: /* @__PURE__ */ e(
672
+ ie,
673
+ {
674
+ disabled: !0,
675
+ type: "text",
676
+ name: "email",
677
+ placeholder: "Email",
678
+ value: R.email,
679
+ autocomplete: "email",
680
+ required: !0,
681
+ className: `${o.input}`
682
+ }
683
+ )
684
+ }
685
+ ),
686
+ /* @__PURE__ */ n(
687
+ "div",
688
+ {
689
+ className: `${o["form-user-name"]}`,
690
+ children: [
691
+ /* @__PURE__ */ e(
692
+ he,
693
+ {
694
+ isShowPassword: i,
695
+ togglePasswordVisible: () => c(
696
+ !i
697
+ ),
698
+ onChange: (N) => x(
699
+ "password",
700
+ N.target.value
701
+ )
702
+ }
703
+ ),
704
+ P.password && w.password && /* @__PURE__ */ e(
705
+ te,
706
+ {
707
+ text: w.password
708
+ }
709
+ )
710
+ ]
711
+ }
712
+ ),
713
+ /* @__PURE__ */ n(
714
+ "div",
715
+ {
716
+ className: `${o["form-user-name"]}`,
717
+ children: [
718
+ /* @__PURE__ */ e(
719
+ he,
720
+ {
721
+ placeholder: "Confirm Password",
722
+ isShowPassword: m,
723
+ togglePasswordVisible: () => p(
724
+ !m
725
+ ),
726
+ onChange: (N) => x(
727
+ "reEnterPassword",
728
+ N.target.value
729
+ )
730
+ }
731
+ ),
732
+ P.reEnterPassword && w.reEnterPassword && /* @__PURE__ */ e(
733
+ te,
734
+ {
735
+ text: w.reEnterPassword
736
+ }
737
+ )
738
+ ]
739
+ }
740
+ )
741
+ ] }) : /* @__PURE__ */ n(ve, { children: [
742
+ /* @__PURE__ */ e(
743
+ "p",
744
+ {
745
+ className: `${o["recover-account"]} mb-5`,
746
+ children: "Invalid reset password link"
747
+ }
748
+ ),
749
+ /* @__PURE__ */ e("p", { className: "w-100", children: "It may have been accessed before or expired or you have just tried to reset another account's password" })
750
+ ] }) }),
751
+ s && /* @__PURE__ */ e(ee, { className: "p-0", children: /* @__PURE__ */ e(
752
+ "button",
753
+ {
754
+ className: `${o["btn-login"]} ${o["btn-rounder"]} mt-4`,
755
+ onClick: () => k(),
756
+ children: "SET A NEW PASSWORD"
757
+ }
758
+ ) })
759
+ ] }) }) }) });
760
+ }
761
+ }
762
+ );
763
+ }, as = `${Is}/api/school`, ia = () => Xe.get(`${as}/settings`), la = () => Xe.get(`${as}/info`), ca = {
764
+ auth: {
765
+ clientId: ye ? "a27f8ac9-e039-4bbd-a9e1-3096e52a77bb" : "90c6897c-f17b-475e-a7a8-9a19651e0060",
766
+ authority: "https://login.microsoftonline.com/common",
767
+ redirectUri: "https://sso.marioforme.com/microsoft-login.html"
768
+ },
769
+ cache: {
770
+ cacheLocation: "sessionStorage",
771
+ // This configures where your cache will be stored
772
+ storeAuthStateInCookie: !1
773
+ // Set this to "true" if you are having issues on IE11 or Edge
774
+ },
775
+ system: {
776
+ loggerOptions: {
777
+ loggerCallback: (s, t, i) => {
778
+ if (!i)
779
+ switch (s) {
780
+ case Se.Error:
781
+ console.error(t);
782
+ return;
783
+ case Se.Info:
784
+ console.info(t);
785
+ return;
786
+ case Se.Verbose:
787
+ console.debug(t);
788
+ return;
789
+ case Se.Warning:
790
+ console.warn(t);
791
+ return;
792
+ default:
793
+ return;
794
+ }
795
+ }
796
+ }
797
+ }
798
+ }, da = {
799
+ email: "",
800
+ password: "",
801
+ captcha: "",
802
+ rememberMe: !1,
803
+ isSessionUserBrowser: !!sessionStorage.getItem(Pe)
804
+ }, ma = "/home", He = "/home", ga = "/admin/home", ha = "/parent", ua = "/admin/schools", pa = "/list-student", fa = "Log in", wa = () => {
805
+ const s = ke(), t = xe(), [i, c] = y(!1), m = Le(
806
+ (a) => a.common.isLoginGoogle
807
+ ), [p, u] = y(""), [b, x] = y(""), [k, P] = y(""), [w, R] = y(!1), N = Le((a) => a.common.inforUserGoogle), j = Le((a) => a.common.environment), G = new URLSearchParams(location.search), T = G.get("type") === "classlink", $ = G.get("token"), Y = G.get("isAdminUser"), [
808
+ E
809
+ /*, setOpenModelAssign*/
810
+ ] = y(!1), [C, K] = y({
811
+ schoolName: "",
812
+ schoolLogo: "",
813
+ schoolId: 0
814
+ }), [v, _] = y(null), O = I(() => {
815
+ c(!i);
816
+ }, [i]), [H, se] = y(!1), [le, ae] = y(!1), [Q, Ee] = y({
817
+ firstName: "",
818
+ lastName: "",
819
+ fullName: "",
820
+ imageUrl: "",
821
+ email: "",
822
+ accessToken: "",
823
+ googleId: ""
824
+ });
825
+ Z(() => {
826
+ document.title = fa;
827
+ const a = bs("auth-token");
828
+ if (a) {
829
+ const d = window.location.hostname;
830
+ if (localStorage.setItem(M, a), document.cookie = `auth-token=;domain=${d.includes("localhost") ? d : ".marioforme.com"}; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`, document.cookie = "redirect-uri=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/", Y)
831
+ return t("/admin/home");
832
+ Me(a);
833
+ return;
834
+ }
835
+ Ie() && t("/"), ls();
836
+ }, [Y, Me, t]);
837
+ const ue = () => {
838
+ localStorage.removeItem(M), sessionStorage.removeItem(M), localStorage.removeItem("USER_EMAIL");
839
+ };
840
+ Z(() => {
841
+ T && $ != "" && ts();
842
+ }, []);
843
+ const D = () => {
844
+ ae(!le);
845
+ }, os = () => {
846
+ if (ye) {
847
+ const a = "https://clever.com/oauth/instant-login?client_id=44f4bbf55cd873d3f7e5&district_id=6620cba31f1ddde7bd689dc5";
848
+ window.location.href = a;
849
+ } else {
850
+ const a = `https://clever.com/oauth/authorize?response_type=code&redirect_uri=${encodeURIComponent("https://classlink.marioforme.com/api/clever/clever-login")}&client_id=c3da6c669d239c70d48e`;
851
+ window.location.href = a;
852
+ }
853
+ }, ts = async () => {
854
+ s(g(!0));
855
+ try {
856
+ const r = await ks({
857
+ tokenClassLink: $
858
+ }), { email: d, token: f } = r.data;
859
+ await oe({
860
+ email: d,
861
+ rememberMe: !1,
862
+ password: "default",
863
+ accessToken: f
864
+ });
865
+ } catch (a) {
866
+ s(
867
+ L({
868
+ type: "danger",
869
+ message: a.response?.data?.title || a.message
870
+ })
871
+ );
872
+ }
873
+ s(g(!1));
874
+ }, _e = window.location.host.includes("-district"), ns = I(async () => {
875
+ s(g(!0));
876
+ try {
877
+ const a = await la(), r = a.data.schoolLogo ?? "";
878
+ a.data && K({
879
+ schoolName: a.data.schoolName,
880
+ schoolLogo: r ? Ts(r) : ge("/images/logo_header_blue.png"),
881
+ schoolId: a.data.schoolId
882
+ });
883
+ } catch (a) {
884
+ s(
885
+ L({
886
+ type: "danger",
887
+ message: a.response?.data?.title || a.message
888
+ })
889
+ );
890
+ }
891
+ s(g(!1));
892
+ }, []), [rs, pe] = y(!1), [ne, $e] = y(null), ce = I((a, r, d, f, l, q, z, W, J, A) => {
893
+ const B = A?.isSessionUserBrowser ?? !1;
894
+ B ? (sessionStorage.setItem(M, a), sessionStorage.setItem(
895
+ Pe,
896
+ String(B)
897
+ )) : (sessionStorage.removeItem(Pe), localStorage.setItem(M, a)), localStorage.removeItem(Es), sessionStorage.removeItem("ACTIVE_ROLE"), s(
898
+ Cs({
899
+ id: r,
900
+ firstName: d,
901
+ lastName: f,
902
+ roles: l,
903
+ email: q,
904
+ profileImageFileName: z
905
+ })
906
+ );
907
+ let S = localStorage.getItem("ROLES") || "";
908
+ if (!S) {
909
+ if (l.includes("Admin"))
910
+ S = "Admin";
911
+ else {
912
+ const U = ((r ? localStorage.getItem(`PREFERRED_ROLE_${r}`) : null) || "").split(",").map((we) => we.trim()).filter(Boolean);
913
+ U.length > 0 && U.every((we) => l.includes(we)) ? U.length > 1 ? S = U.every(
914
+ (ze) => ze === "Teacher" || ze === "Assistant"
915
+ ) ? "Teacher,Assistant" : U[0] : S = U[0] : l.includes("Teacher") ? S = l.includes("Assistant") ? "Teacher,Assistant" : "Teacher" : l.includes("Assistant") ? S = "Assistant" : l.includes("Counselor") ? S = "Counselor" : l.includes("SecondaryTeacher") ? S = "SecondaryTeacher" : l.includes("EduTeacher") ? S = "EduTeacher" : l.includes("Student") ? S = "Student" : l.includes("Parent") ? S = "Parent" : l.length > 0 && (S = l[0]);
916
+ }
917
+ S && (localStorage.setItem("ROLES", S), sessionStorage.setItem("ACTIVE_ROLE", S));
918
+ }
919
+ if (A?.email && !l.includes("Admin")) {
920
+ de.init(
921
+ ye ? Ps : Ls,
922
+ A.email,
923
+ {
924
+ defaultTracking: !1
925
+ }
926
+ );
927
+ const re = window.location.hostname, U = new de.Identify();
928
+ U.set("domain", re), de.identify(U), de.track("general: session start", {
929
+ user_id: A.email,
930
+ domain: re,
931
+ roles: l?.toString()
932
+ }), localStorage.setItem("USER_EMAIL", A.email), W && de.track("general: first login", {
933
+ user_id: A.email,
934
+ domain: re,
935
+ roles: l?.toString()
936
+ });
937
+ }
938
+ const X = (re) => {
939
+ const U = As(re, J);
940
+ window.location.pathname.startsWith("/es") ? J === "es" ? t(U) : window.location.href = U : J === "es" ? window.location.href = U : t(U);
941
+ }, F = S.split(",")[0] || "";
942
+ _e ? X(ua) : l.includes("Admin") || F === "Admin" ? X(ga) : F === "Teacher" || F === "Assistant" || F === "Counselor" || F === "SecondaryTeacher" || !F && (l.includes("Teacher") || l.includes("Assistant") || l.includes("Counselor") || l.includes("SecondaryTeacher")) ? X(ma) : F === "Student" || !F && l.includes("Student") ? X(He) : F === "Parent" || !F && l.includes("Parent") ? X(ha) : (F === "EduTeacher" || !F && l.includes("EduTeacher")) && X(pa), s(g(!1));
943
+ }, [s, t, _e]), fe = I((a, r, d) => w && a?.includes("Student") && (r === "es" || d === "ES") ? (s(
944
+ L({
945
+ type: "danger",
946
+ message: "Unable to sign in with SSO. Please contact your admin or teacher."
947
+ })
948
+ ), localStorage.removeItem(M), sessionStorage.removeItem(M), s(g(!1)), !0) : !1, [w, s]), Ae = I((a) => w && a && xs.includes(a.trim()) ? (s(
949
+ L({
950
+ type: "danger",
951
+ message: "Unable to sign in with SSO. Please contact your admin or teacher."
952
+ })
953
+ ), s(g(!1)), !0) : !1, [w, s]);
954
+ async function Me(a) {
955
+ s(g(!0));
956
+ try {
957
+ const r = await Rs();
958
+ let {
959
+ id: d,
960
+ firstName: f,
961
+ lastName: l,
962
+ roles: q,
963
+ email: z,
964
+ profileImageFileName: W,
965
+ isLoginFirst: J,
966
+ schoolLevel: A,
967
+ appType: B,
968
+ preferredAppType: S,
969
+ needsAppTypeChoice: X
970
+ } = r.data;
971
+ if (X) {
972
+ $e({ email: z }), pe(!0), s(g(!1));
973
+ return;
974
+ }
975
+ A || (B === "ES" || B === "ES, MS" && S === "ES") && (A = "es"), ce(
976
+ a,
977
+ d,
978
+ f,
979
+ l,
980
+ q,
981
+ z,
982
+ W,
983
+ J,
984
+ A,
985
+ { email: z }
986
+ );
987
+ } catch (r) {
988
+ s(
989
+ L({
990
+ type: "danger",
991
+ message: r.response?.data?.title || r.message || "Login failed"
992
+ })
993
+ ), s(g(!1));
994
+ }
995
+ }
996
+ const is = I(async (a) => {
997
+ if (pe(!1), !ne) return;
998
+ s(g(!0));
999
+ const r = a === "es" ? "ES" : a === "ms" ? "MS" : "ES, MS";
1000
+ try {
1001
+ const d = await Be({
1002
+ ...ne,
1003
+ email: ne?.email?.trim(),
1004
+ password: ne?.password?.trim(),
1005
+ preferredAppType: r
1006
+ });
1007
+ let {
1008
+ token: f,
1009
+ id: l,
1010
+ firstName: q,
1011
+ lastName: z,
1012
+ roles: W,
1013
+ email: J,
1014
+ profileImageFileName: A,
1015
+ isLoginFirst: B,
1016
+ schoolLevel: S
1017
+ } = d.data;
1018
+ if (!S && a === "es" && (S = "es"), fe(W, S, d.data.appType)) return;
1019
+ ce(
1020
+ f,
1021
+ l,
1022
+ q,
1023
+ z,
1024
+ W,
1025
+ J,
1026
+ A,
1027
+ B,
1028
+ S,
1029
+ ne
1030
+ );
1031
+ } catch (d) {
1032
+ s(
1033
+ L({
1034
+ type: "danger",
1035
+ message: d.response?.data?.title || d.message || "Login failed"
1036
+ })
1037
+ ), s(g(!1));
1038
+ }
1039
+ }, [ne, ce, fe, s]), oe = I(async (a) => {
1040
+ s(g(!0));
1041
+ try {
1042
+ const r = await Be({
1043
+ ...a,
1044
+ email: a?.email?.trim(),
1045
+ password: a?.password?.trim()
1046
+ });
1047
+ let {
1048
+ token: d,
1049
+ id: f,
1050
+ firstName: l,
1051
+ lastName: q,
1052
+ roles: z,
1053
+ email: W,
1054
+ profileImageFileName: J,
1055
+ isLoginFirst: A,
1056
+ schoolLevel: B
1057
+ } = r.data;
1058
+ if (r.data.needsAppTypeChoice) {
1059
+ $e(a), pe(!0), s(g(!1));
1060
+ return;
1061
+ }
1062
+ if (B || (r.data.appType === "ES" || r.data.appType === "ES, MS" && r.data.preferredAppType === "ES") && (B = "es"), fe(z, B, r.data.appType)) return;
1063
+ ce(
1064
+ d,
1065
+ f,
1066
+ l,
1067
+ q,
1068
+ z,
1069
+ W,
1070
+ J,
1071
+ A,
1072
+ B,
1073
+ a
1074
+ );
1075
+ } catch (r) {
1076
+ s(
1077
+ L({
1078
+ type: "danger",
1079
+ message: r.response?.data?.title || r.message || "Login failed"
1080
+ })
1081
+ ), localStorage.removeItem(M), sessionStorage.removeItem(M), s(g(!1));
1082
+ }
1083
+ }, [ce, fe, s]), ls = async () => {
1084
+ try {
1085
+ const a = await _s();
1086
+ u(a.data.googleClientId), x(a.data.googleCaptchaId), P(a.data.extensionEmail), R(a.data.isRestrictedLogin);
1087
+ } catch (a) {
1088
+ s(
1089
+ L({
1090
+ type: "danger",
1091
+ message: a.response?.data?.title || a.message || "Login failed"
1092
+ })
1093
+ );
1094
+ }
1095
+ }, Ge = I(
1096
+ async (a, r, d, f) => {
1097
+ s(g(!0));
1098
+ try {
1099
+ if ((await $s(a, r)).data) {
1100
+ const z = {
1101
+ email: r.email,
1102
+ isLoginGoogle: !0,
1103
+ rememberMe: !1,
1104
+ password: "default",
1105
+ accessToken: d,
1106
+ captcha: "",
1107
+ loginType: Ne.Google
1108
+ };
1109
+ if (f != null) {
1110
+ const W = await f();
1111
+ z.captcha = W;
1112
+ }
1113
+ await oe(z), s(Ce(!1));
1114
+ } else
1115
+ Ee({ ...r, token: d }), D();
1116
+ } catch (l) {
1117
+ s(
1118
+ L({
1119
+ type: "danger",
1120
+ message: l.response?.data?.title || l.message || "Login failed"
1121
+ })
1122
+ );
1123
+ }
1124
+ s(g(!1));
1125
+ },
1126
+ [oe, s, D]
1127
+ ), cs = I(async (a, r) => {
1128
+ s(g(!0));
1129
+ try {
1130
+ if (Ae(a)) return;
1131
+ if ((await Fe({ ...Q, gradeLevel: a }))?.data) {
1132
+ const f = {
1133
+ email: Q.email,
1134
+ isLoginGoogle: !0,
1135
+ rememberMe: !1,
1136
+ password: "default",
1137
+ accessToken: Q.accessToken,
1138
+ captcha: "",
1139
+ loginType: Ne.Google
1140
+ };
1141
+ if (r != null) {
1142
+ const l = await r();
1143
+ f.captcha = l;
1144
+ }
1145
+ await oe(f), D();
1146
+ }
1147
+ } catch (d) {
1148
+ s(
1149
+ L({
1150
+ type: "danger",
1151
+ message: d.response?.data?.title || d.message || "Login failed"
1152
+ })
1153
+ );
1154
+ }
1155
+ s(g(!1));
1156
+ }, [Ae, Q, oe, D, s]), ds = async (a, r) => {
1157
+ s(g(!0));
1158
+ try {
1159
+ const d = {
1160
+ firstName: N.firstName,
1161
+ lastName: N.lastName,
1162
+ imageUrl: N.imageUrl,
1163
+ fullName: N.fullName,
1164
+ email: N.email,
1165
+ accessToken: N.accessToken,
1166
+ teacherId: a
1167
+ };
1168
+ if ((await Fe(d)).data) {
1169
+ const l = await r(), q = {
1170
+ email: N.email,
1171
+ captcha: l,
1172
+ isLoginGoogle: !0,
1173
+ rememberMe: !1,
1174
+ password: "default",
1175
+ accessToken: N.accessToken,
1176
+ loginType: Ne.Google
1177
+ };
1178
+ s(Ce(!1)), await oe(q), t(He);
1179
+ }
1180
+ } catch (d) {
1181
+ s(
1182
+ L({
1183
+ type: "danger",
1184
+ message: d.response?.data?.title || d.message || "Login failed"
1185
+ })
1186
+ );
1187
+ }
1188
+ s(Ce(!1)), s(g(!1));
1189
+ }, ms = async () => {
1190
+ try {
1191
+ const a = await ia();
1192
+ s(Ms(a.data.isSandboxMode));
1193
+ } catch (a) {
1194
+ console.error(a);
1195
+ }
1196
+ }, Oe = async (a) => {
1197
+ v.handleRedirectPromise().then(async (r) => {
1198
+ if (C?.schoolId)
1199
+ if (r) {
1200
+ let d = r.account;
1201
+ await Ue(d, a);
1202
+ } else {
1203
+ const d = v.getAllAccounts();
1204
+ if (d.length === 0) {
1205
+ const f = j === "PreProduction" ? "https://mario1.marioforme.com" : ye ? "https://brightsoft.marioforme.com" : "https://sso.marioforme.com";
1206
+ window.location.href = (window.location.hostname === "localhost" ? window.location.origin : f) + `/microsoft-login.html?redirect-uri=${window.location.origin}&schoolId=${C.schoolId}`;
1207
+ } else {
1208
+ let f = d[0];
1209
+ await Ue(f, a);
1210
+ }
1211
+ }
1212
+ }).catch((r) => {
1213
+ console.error(r);
1214
+ });
1215
+ }, Ue = async (a, r) => {
1216
+ let d = a.name, f = {
1217
+ firstName: d.split(" ").slice(0, -1).join(" "),
1218
+ lastName: d.split(" ").slice(-1).join(" "),
1219
+ fullName: d,
1220
+ imageUrl: "",
1221
+ email: a.username,
1222
+ accessToken: a.idTokenClaims.aio,
1223
+ googleId: a.tenantId
1224
+ };
1225
+ s(Qe(f)), await Ge(
1226
+ es.MicrosoftSSO,
1227
+ f,
1228
+ a.idTokenClaims.aio,
1229
+ r
1230
+ );
1231
+ }, gs = async () => {
1232
+ const a = new Vs(ca);
1233
+ await a.initialize(), _(a);
1234
+ };
1235
+ return Z(() => {
1236
+ let a = window.location.href;
1237
+ v && a.includes("code") && a.includes("client_info") && Oe();
1238
+ }, [JSON.stringify(v)]), Z(() => {
1239
+ ms(), gs(), ns();
1240
+ }, []), {
1241
+ defaultInfo: da,
1242
+ userLogin: oe,
1243
+ openLogin: i,
1244
+ toggle: O,
1245
+ isShowPassword: H,
1246
+ setIsShowPassword: se,
1247
+ fnIsCheckLogin: Ge,
1248
+ isLoginGoogle: m,
1249
+ infoUser: N,
1250
+ submitLogin: ds,
1251
+ googleClientId: p,
1252
+ googleRecaptchaId: b,
1253
+ handleCancelModelAssign: ue,
1254
+ openModelAssign: E,
1255
+ // handleAssignTeacherByCode,
1256
+ fnLoginSSO: Oe,
1257
+ school: C,
1258
+ extensionEmail: k,
1259
+ handleLoginWidthClever: os,
1260
+ openModalSelectGrade: le,
1261
+ handleRegisterUser: cs,
1262
+ handleToggleModelGrade: D,
1263
+ openModalSelectTier: rs,
1264
+ handleSelectTier: is,
1265
+ setOpenModalSelectTier: pe
1266
+ };
1267
+ }, qe = "/", Sa = "/login", We = "Log in", ya = () => {
1268
+ const s = ke(), t = xe(), i = location.search, m = new URLSearchParams(i).get("userId"), [p, u] = y(!1), [b, x] = y(
1269
+ !1
1270
+ ), [k, P] = y({
1271
+ password: "",
1272
+ reEnterPassword: "",
1273
+ email: "",
1274
+ userId: m ?? "",
1275
+ token: ""
1276
+ }), { executeRecaptcha: w } = Re(), R = I(async (T) => {
1277
+ s(g(!0));
1278
+ try {
1279
+ const $ = await Gs(T);
1280
+ P({ ...k, email: $.data });
1281
+ } catch ($) {
1282
+ s(
1283
+ L({
1284
+ type: "danger",
1285
+ message: $.message
1286
+ })
1287
+ );
1288
+ }
1289
+ s(g(!1));
1290
+ }, []), N = I(async (T) => {
1291
+ s(g(!0));
1292
+ try {
1293
+ await Os(T), t(Sa), s(
1294
+ L({
1295
+ type: "success",
1296
+ message: "Create password sucessfully"
1297
+ })
1298
+ );
1299
+ } catch ($) {
1300
+ s(
1301
+ L({
1302
+ type: "danger",
1303
+ message: $.response?.data?.title || $.message || "Error occured"
1304
+ })
1305
+ ), localStorage.removeItem(M), sessionStorage.removeItem(M);
1306
+ }
1307
+ s(g(!1));
1308
+ }, []), j = I(async () => {
1309
+ if (!w) {
1310
+ console.log("execute recaptcha undefined");
1311
+ return;
1312
+ }
1313
+ return await w("forgetPass");
1314
+ }, [w]), G = I(() => {
1315
+ }, []);
1316
+ return Z(() => {
1317
+ document.title = We, Ie() && t(qe), m && R(m);
1318
+ }, [m]), Z(() => {
1319
+ document.title = We, Ie() && t(qe);
1320
+ }, []), {
1321
+ createPasswordRequest: N,
1322
+ isShowNewPassword: p,
1323
+ setIsShowNewPassword: u,
1324
+ isShowReTypePassword: b,
1325
+ setIsShowReTypePassword: x,
1326
+ clickHandler: j,
1327
+ handleVerify: G,
1328
+ initialValues: k
1329
+ };
1330
+ }, Na = V.object({
1331
+ password: V.string().required("Password is required"),
1332
+ reEnterPassword: V.string().required("Please re-enter Password").test("matching", "Passwords do not match", function() {
1333
+ return this.parent.password === this.parent.reEnterPassword;
1334
+ })
1335
+ }), va = () => {
1336
+ const {
1337
+ createPasswordRequest: s,
1338
+ isShowNewPassword: t,
1339
+ setIsShowNewPassword: i,
1340
+ isShowReTypePassword: c,
1341
+ setIsShowReTypePassword: m,
1342
+ initialValues: p
1343
+ } = ya();
1344
+ return /* @__PURE__ */ e(
1345
+ Te,
1346
+ {
1347
+ initialValues: p,
1348
+ enableReinitialize: !0,
1349
+ validationSchema: Na,
1350
+ onSubmit: (u) => {
1351
+ s(u);
1352
+ },
1353
+ children: (u) => {
1354
+ const {
1355
+ setFieldValue: b,
1356
+ handleSubmit: x,
1357
+ touched: k,
1358
+ errors: P,
1359
+ values: w
1360
+ } = u;
1361
+ return /* @__PURE__ */ e(be, { className: `${o["box-login"]}`, children: /* @__PURE__ */ n(ee, { className: "p-0", children: [
1362
+ /* @__PURE__ */ e(
1363
+ "div",
1364
+ {
1365
+ hidden: !w.email,
1366
+ className: `${o["block-login"]}`,
1367
+ children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
1368
+ /* @__PURE__ */ e(
1369
+ "img",
1370
+ {
1371
+ src: `${ge(
1372
+ "/images/horizontal-logo-blue.svg"
1373
+ )}`,
1374
+ className: `${o["img-login-rectangle"]}`
1375
+ }
1376
+ ),
1377
+ /* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Create Your Password" }),
1378
+ /* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ n(ve, { children: [
1379
+ /* @__PURE__ */ e(
1380
+ me,
1381
+ {
1382
+ className: `${o["form-user-name"]}`,
1383
+ children: /* @__PURE__ */ e(
1384
+ ie,
1385
+ {
1386
+ disabled: !0,
1387
+ type: "text",
1388
+ name: "email",
1389
+ placeholder: "Email",
1390
+ value: w.email,
1391
+ autocomplete: "email",
1392
+ required: !0,
1393
+ className: `${o.input}`
1394
+ }
1395
+ )
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ n(
1399
+ "div",
1400
+ {
1401
+ className: `${o["form-user-name"]}`,
1402
+ children: [
1403
+ /* @__PURE__ */ e(
1404
+ he,
1405
+ {
1406
+ isShowPassword: t,
1407
+ togglePasswordVisible: () => i(
1408
+ !t
1409
+ ),
1410
+ onChange: (R) => b(
1411
+ "password",
1412
+ R.target.value
1413
+ )
1414
+ }
1415
+ ),
1416
+ k.password && P.password && /* @__PURE__ */ e(
1417
+ te,
1418
+ {
1419
+ text: P.password
1420
+ }
1421
+ )
1422
+ ]
1423
+ }
1424
+ ),
1425
+ /* @__PURE__ */ n(
1426
+ "div",
1427
+ {
1428
+ className: `${o["form-user-name"]}`,
1429
+ children: [
1430
+ /* @__PURE__ */ e(
1431
+ he,
1432
+ {
1433
+ placeholder: "Confirm Password",
1434
+ isShowPassword: c,
1435
+ togglePasswordVisible: () => m(
1436
+ !c
1437
+ ),
1438
+ onChange: (R) => b(
1439
+ "reEnterPassword",
1440
+ R.target.value
1441
+ )
1442
+ }
1443
+ ),
1444
+ k.reEnterPassword && P.reEnterPassword && /* @__PURE__ */ e(
1445
+ te,
1446
+ {
1447
+ text: P.reEnterPassword
1448
+ }
1449
+ )
1450
+ ]
1451
+ }
1452
+ )
1453
+ ] }) }),
1454
+ /* @__PURE__ */ e(
1455
+ "button",
1456
+ {
1457
+ className: `${o["btn-login"]} ${o["btn-rounder"]} mt-4`,
1458
+ onClick: () => x(),
1459
+ children: "CREATE YOUR PASSWORD"
1460
+ }
1461
+ )
1462
+ ] })
1463
+ }
1464
+ ),
1465
+ /* @__PURE__ */ e(
1466
+ "div",
1467
+ {
1468
+ hidden: !!w.email,
1469
+ className: `${o["block-login"]}`,
1470
+ children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
1471
+ /* @__PURE__ */ e(
1472
+ "img",
1473
+ {
1474
+ src: `${ge(
1475
+ "/images/horizontal-logo-blue.svg"
1476
+ )}`,
1477
+ className: `${o["img-login-rectangle"]}`
1478
+ }
1479
+ ),
1480
+ /* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "You cannot regenerate the password" })
1481
+ ] })
1482
+ }
1483
+ )
1484
+ ] }) });
1485
+ }
1486
+ }
1487
+ );
1488
+ }, Ia = "_modalContent_1pxxz_1", ba = "_closeButton_1pxxz_6", ka = "_modalBody_1pxxz_17", Ta = "_iconWrapper_1pxxz_22", Ea = "_title_1pxxz_38", Ca = "_subtitle_1pxxz_45", La = "_tierCard_1pxxz_51", Pa = "_es_1pxxz_60", xa = "_tierTitle_1pxxz_71", Ra = "_tierDesc_1pxxz_76", _a = "_arrow_1pxxz_81", $a = "_ms_1pxxz_85", Aa = "_both_1pxxz_110", Ma = "_cardLeft_1pxxz_134", Ga = "_cardText_1pxxz_138", h = {
1489
+ modalContent: Ia,
1490
+ closeButton: ba,
1491
+ modalBody: ka,
1492
+ iconWrapper: Ta,
1493
+ title: Ea,
1494
+ subtitle: Ca,
1495
+ tierCard: La,
1496
+ es: Pa,
1497
+ tierTitle: xa,
1498
+ tierDesc: Ra,
1499
+ arrow: _a,
1500
+ ms: $a,
1501
+ both: Aa,
1502
+ cardLeft: Ma,
1503
+ cardText: Ga
1504
+ }, Oa = ({ open: s, onSelectTier: t, onClose: i }) => /* @__PURE__ */ n(
1505
+ Ye,
1506
+ {
1507
+ isOpen: s,
1508
+ style: { zIndex: 1201, maxWidth: 450 },
1509
+ centered: !0,
1510
+ autoFocus: !1,
1511
+ returnFocusAfterClose: !1,
1512
+ contentClassName: h.modalContent,
1513
+ children: [
1514
+ /* @__PURE__ */ e("div", { className: h.closeButton, children: i && /* @__PURE__ */ e(Ze, { onClick: () => i(), size: 24 }) }),
1515
+ /* @__PURE__ */ n(Ke, { className: h.modalBody, children: [
1516
+ /* @__PURE__ */ e("div", { className: h.iconWrapper, children: /* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }),
1517
+ /* @__PURE__ */ e("h4", { className: h.title, children: "Select Grade Level" }),
1518
+ /* @__PURE__ */ e("p", { className: h.subtitle, children: "Select the grade levels you support" }),
1519
+ /* @__PURE__ */ n(
1520
+ "div",
1521
+ {
1522
+ onClick: () => t("es"),
1523
+ className: `${h.tierCard} ${h.es}`,
1524
+ children: [
1525
+ /* @__PURE__ */ n("div", { className: h.cardLeft, children: [
1526
+ /* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" }) }),
1527
+ /* @__PURE__ */ n("div", { className: h.cardText, children: [
1528
+ /* @__PURE__ */ e("div", { className: h.tierTitle, children: "Elementary / Primary" }),
1529
+ /* @__PURE__ */ e("div", { className: h.tierDesc, children: "Grades 2-5 / Years 3-6" })
1530
+ ] })
1531
+ ] }),
1532
+ /* @__PURE__ */ e("div", { className: h.arrow, children: ">" })
1533
+ ]
1534
+ }
1535
+ ),
1536
+ /* @__PURE__ */ n(
1537
+ "div",
1538
+ {
1539
+ onClick: () => t("ms"),
1540
+ className: `${h.tierCard} ${h.ms}`,
1541
+ children: [
1542
+ /* @__PURE__ */ n("div", { className: h.cardLeft, children: [
1543
+ /* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" }) }),
1544
+ /* @__PURE__ */ n("div", { className: h.cardText, children: [
1545
+ /* @__PURE__ */ e("div", { className: h.tierTitle, children: "Middle & High / Secondary" }),
1546
+ /* @__PURE__ */ e("div", { className: h.tierDesc, children: "Grades 6-12 / Years 7-13" })
1547
+ ] })
1548
+ ] }),
1549
+ /* @__PURE__ */ e("div", { className: h.arrow, children: ">" })
1550
+ ]
1551
+ }
1552
+ ),
1553
+ /* @__PURE__ */ n(
1554
+ "div",
1555
+ {
1556
+ onClick: () => t("both"),
1557
+ className: `${h.tierCard} ${h.both}`,
1558
+ children: [
1559
+ /* @__PURE__ */ n("div", { className: h.cardLeft, children: [
1560
+ /* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z" }) }),
1561
+ /* @__PURE__ */ n("div", { className: h.cardText, children: [
1562
+ /* @__PURE__ */ e("div", { className: h.tierTitle, children: "Both Tiers" }),
1563
+ /* @__PURE__ */ e("div", { className: h.tierDesc, children: "Access all grade levels" })
1564
+ ] })
1565
+ ] }),
1566
+ /* @__PURE__ */ e("div", { className: h.arrow, children: ">" })
1567
+ ]
1568
+ }
1569
+ )
1570
+ ] })
1571
+ ]
1572
+ }
1573
+ ), Ua = je(Oa), za = "Log in", Ba = "Forgot password", Fa = "Reset password", eo = (s) => {
1574
+ const {
1575
+ isLogin: t,
1576
+ isForgotPassword: i,
1577
+ isResetPassword: c,
1578
+ isCreatePassword: m
1579
+ // isLoginTwoFactor
1580
+ } = s, {
1581
+ defaultInfo: p,
1582
+ userLogin: u,
1583
+ googleRecaptchaId: b,
1584
+ handleCancelModelAssign: x,
1585
+ school: k,
1586
+ openModelAssign: P,
1587
+ setIsShowPassword: w,
1588
+ fnIsCheckLogin: R,
1589
+ isLoginGoogle: N,
1590
+ submitLogin: j,
1591
+ infoUser: G,
1592
+ googleClientId: T,
1593
+ isShowPassword: $,
1594
+ fnLoginSSO: Y,
1595
+ extensionEmail: E,
1596
+ handleLoginWidthClever: C,
1597
+ openModalSelectGrade: K,
1598
+ handleRegisterUser: v,
1599
+ handleToggleModelGrade: _,
1600
+ openModalSelectTier: O,
1601
+ handleSelectTier: H,
1602
+ setOpenModalSelectTier: se
1603
+ } = wa();
1604
+ return Z(() => {
1605
+ t && (document.title = za), i && (document.title = Ba), c && (document.title = Fa);
1606
+ }, [t, i, c]), /* @__PURE__ */ n("div", { className: `${o.login} container-fluid font-family-lato`, children: [
1607
+ /* @__PURE__ */ n(be, { className: "h-100", children: [
1608
+ /* @__PURE__ */ n(
1609
+ ee,
1610
+ {
1611
+ lg: 8,
1612
+ md: 12,
1613
+ xs: 12,
1614
+ className: "d-flex justify-content-center h-100 align-items-center p-3 flex-column",
1615
+ children: [
1616
+ !!b && /* @__PURE__ */ n(
1617
+ zs,
1618
+ {
1619
+ useRecaptchaNet: !0,
1620
+ reCaptchaKey: b,
1621
+ scriptProps: {
1622
+ async: !0,
1623
+ defer: !0,
1624
+ appendTo: "body"
1625
+ },
1626
+ children: [
1627
+ t && /* @__PURE__ */ e(
1628
+ Qs,
1629
+ {
1630
+ userLogin: u,
1631
+ defaultInfo: p,
1632
+ onCancelModelAssign: x,
1633
+ openModelAssign: P,
1634
+ school: k,
1635
+ fnIsCheckLogin: R,
1636
+ googleClientId: T,
1637
+ infoUser: G,
1638
+ isLoginGoogle: N,
1639
+ isShowPassword: $,
1640
+ setIsShowPassword: w,
1641
+ submitLogin: j,
1642
+ fnLoginSSO: Y,
1643
+ extensionEmail: E,
1644
+ onLoginWidthClever: C,
1645
+ openModalSelectGrade: K,
1646
+ handleRegisterUser: v,
1647
+ onToggleModelGrade: _
1648
+ }
1649
+ ),
1650
+ i && /* @__PURE__ */ e(ta, { school: k })
1651
+ ]
1652
+ }
1653
+ ),
1654
+ c && /* @__PURE__ */ e(ra, {}),
1655
+ m && /* @__PURE__ */ e(va, {}),
1656
+ /* @__PURE__ */ e(
1657
+ "a",
1658
+ {
1659
+ href: "/privacy-policy/",
1660
+ target: "blank",
1661
+ className: `${o["privacy-policy"]}`,
1662
+ children: "Privacy Policy"
1663
+ }
1664
+ )
1665
+ ]
1666
+ }
1667
+ ),
1668
+ /* @__PURE__ */ e(
1669
+ ee,
1670
+ {
1671
+ className: "p-3 mh-100 d-flex justify-content-end",
1672
+ lg: 4,
1673
+ md: 12,
1674
+ xs: 12,
1675
+ children: /* @__PURE__ */ e(
1676
+ "img",
1677
+ {
1678
+ src: `${ge(window.innerWidth > 992 ? "/images/img-login.png" : "/images/img-login-tablet.png")}`,
1679
+ className: `${o["img-login"]}`
1680
+ }
1681
+ )
1682
+ }
1683
+ )
1684
+ ] }),
1685
+ /* @__PURE__ */ e(
1686
+ Ua,
1687
+ {
1688
+ open: O,
1689
+ onSelectTier: H,
1690
+ onClose: () => se(!1)
1691
+ }
1692
+ )
1693
+ ] });
1694
+ };
1695
+ export {
1696
+ eo as default
1697
+ };