mario-core 2.0.7 → 2.0.8-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 (574) hide show
  1. package/dist/Dashboard-1z9IAA2b.js +1 -0
  2. package/dist/Dashboard-Be6dTx_o.js +1 -0
  3. package/dist/Dashboard-BsDeySam.js +1 -0
  4. package/dist/Dashboard-BtwZdccP.mjs +206 -0
  5. package/dist/Dashboard-C6CC7LNc.mjs +206 -0
  6. package/dist/Dashboard-C8i4BvyG.js +1 -0
  7. package/dist/Dashboard-CEJHkjrj.mjs +206 -0
  8. package/dist/Dashboard-CRRvwGed.js +1 -0
  9. package/dist/Dashboard-CZW-qGyN.mjs +206 -0
  10. package/dist/Dashboard-C_ztxjUK.mjs +206 -0
  11. package/dist/Dashboard-CaX-62QW.js +1 -0
  12. package/dist/Dashboard-DbdqZ10M.mjs +206 -0
  13. package/dist/Dashboard-DdFlAyjg.js +1 -0
  14. package/dist/Dashboard-DvDBWFhH.mjs +206 -0
  15. package/dist/Dashboard-DyvEA6z-.mjs +206 -0
  16. package/dist/Dashboard-HzY9FZ7Z.js +1 -0
  17. package/dist/Dashboard-ctVUb592.mjs +206 -0
  18. package/dist/Dashboard-zCoIVhnf.js +1 -0
  19. package/dist/EmailTemplateDetail-B7BAwkbk.mjs +417 -0
  20. package/dist/EmailTemplateDetail-BHIlR8yu.mjs +417 -0
  21. package/dist/EmailTemplateDetail-BQPspomy.mjs +417 -0
  22. package/dist/EmailTemplateDetail-BVBf9btq.js +1 -0
  23. package/dist/EmailTemplateDetail-BX_tfwoM.mjs +417 -0
  24. package/dist/EmailTemplateDetail-C7lmyoQx.js +1 -0
  25. package/dist/EmailTemplateDetail-CITCgbC8.mjs +417 -0
  26. package/dist/EmailTemplateDetail-CNh5de_u.js +1 -0
  27. package/dist/EmailTemplateDetail-CdAQlzKa.mjs +417 -0
  28. package/dist/EmailTemplateDetail-CktC_iBl.mjs +417 -0
  29. package/dist/EmailTemplateDetail-CyTeZ6B4.js +1 -0
  30. package/dist/EmailTemplateDetail-D-jgcfDM.js +1 -0
  31. package/dist/EmailTemplateDetail-DDmp6Q3m.js +1 -0
  32. package/dist/EmailTemplateDetail-DcwJEPvb.js +1 -0
  33. package/dist/EmailTemplateDetail-RjCbC78p.js +1 -0
  34. package/dist/EmailTemplateDetail-ZgNkQHV7.mjs +417 -0
  35. package/dist/EmailTemplateDetail-dxSRgDcj.mjs +417 -0
  36. package/dist/EmailTemplateDetail-mdYeUDJg.js +1 -0
  37. package/dist/EmailTemplateList-2KPUfdVe.mjs +168 -0
  38. package/dist/EmailTemplateList-2OYjV-ox.mjs +168 -0
  39. package/dist/EmailTemplateList-3ETSGWfg.mjs +168 -0
  40. package/dist/EmailTemplateList-5giJyVMs.js +1 -0
  41. package/dist/EmailTemplateList-95xlBgxC.js +1 -0
  42. package/dist/EmailTemplateList-9G-A6FZq.js +1 -0
  43. package/dist/EmailTemplateList-BBrwv30e.mjs +168 -0
  44. package/dist/EmailTemplateList-BUL8h6T2.mjs +168 -0
  45. package/dist/EmailTemplateList-BV-QOv5K.mjs +168 -0
  46. package/dist/EmailTemplateList-CuYu-78c.js +1 -0
  47. package/dist/EmailTemplateList-Cuigk9u8.js +1 -0
  48. package/dist/EmailTemplateList-Cw69biiR.mjs +168 -0
  49. package/dist/EmailTemplateList-DATMwmRX.mjs +168 -0
  50. package/dist/EmailTemplateList-DPH9n1zg.js +1 -0
  51. package/dist/EmailTemplateList-DZqCQ8Yo.js +1 -0
  52. package/dist/EmailTemplateList-Dgf0hucr.js +1 -0
  53. package/dist/EmailTemplateList-DqpO5NbB.js +1 -0
  54. package/dist/EmailTemplateList-TA3tBqQx.mjs +168 -0
  55. package/dist/GalleryList-B2kxc3Uv.js +1 -0
  56. package/dist/GalleryList-BJ0QGyWF.mjs +329 -0
  57. package/dist/GalleryList-BM67p8qw.mjs +329 -0
  58. package/dist/GalleryList-BRIM0Ij_.mjs +329 -0
  59. package/dist/GalleryList-BU0as1ZP.mjs +329 -0
  60. package/dist/GalleryList-BYwvWx1S.js +1 -0
  61. package/dist/GalleryList-BfwC12EN.js +1 -0
  62. package/dist/GalleryList-C2kwrrbY.js +1 -0
  63. package/dist/GalleryList-C46NhLPp.js +1 -0
  64. package/dist/GalleryList-CJFy67aI.js +1 -0
  65. package/dist/GalleryList-CS8FPhB-.mjs +329 -0
  66. package/dist/GalleryList-CYIPiU3F.js +1 -0
  67. package/dist/GalleryList-CabpMOTP.mjs +329 -0
  68. package/dist/GalleryList-Cl2umZvg.js +1 -0
  69. package/dist/GalleryList-D2_BCJq6.js +1 -0
  70. package/dist/GalleryList-JJbcEbTi.mjs +329 -0
  71. package/dist/GalleryList-QXdN6TSs.mjs +329 -0
  72. package/dist/GalleryList-k_IHJH_i.mjs +329 -0
  73. package/dist/Login-0ruS_M9L.mjs +1387 -0
  74. package/dist/Login-BPXlNvpX.mjs +1387 -0
  75. package/dist/Login-BWsVc8Np.mjs +1384 -0
  76. package/dist/Login-BYWZjmhv.mjs +1384 -0
  77. package/dist/Login-C1-QzAuV.mjs +1384 -0
  78. package/dist/Login-CDOjfF6B.js +1 -0
  79. package/dist/Login-CGa7aER1.js +1 -0
  80. package/dist/Login-CUcmbeia.js +1 -0
  81. package/dist/Login-CXt0_tBl.mjs +1387 -0
  82. package/dist/Login-Cz46nMrL.mjs +1387 -0
  83. package/dist/Login-D-9_HESK.js +1 -0
  84. package/dist/Login-DwvRJ0LH.js +1 -0
  85. package/dist/Login-DyL5Gz_Y.js +1 -0
  86. package/dist/Login-SxZya_gO.js +1 -0
  87. package/dist/Login-d7fhYAI5.mjs +1387 -0
  88. package/dist/Login-erVjidLp.js +1 -0
  89. package/dist/Login-fyvhErZA.js +1 -0
  90. package/dist/Login-ucRXJYBk.mjs +1387 -0
  91. package/dist/NotificationList-85ZNspu5.mjs +3878 -0
  92. package/dist/NotificationList-BDtxAveg.js +2 -0
  93. package/dist/NotificationList-BFTZrMUI.mjs +3878 -0
  94. package/dist/NotificationList-BHBBFNSJ.mjs +3878 -0
  95. package/dist/NotificationList-BldkOV9D.js +2 -0
  96. package/dist/NotificationList-BmsuB956.js +2 -0
  97. package/dist/NotificationList-Bv_7KnH-.js +2 -0
  98. package/dist/NotificationList-CS-nka9T.mjs +3878 -0
  99. package/dist/NotificationList-CjicPpp3.js +2 -0
  100. package/dist/NotificationList-Cl1bozJV.js +2 -0
  101. package/dist/NotificationList-D-0_UC0H.js +2 -0
  102. package/dist/NotificationList-D7Emce8u.mjs +3878 -0
  103. package/dist/NotificationList-DGvQIhTt.mjs +3878 -0
  104. package/dist/NotificationList-DqqIOC4p.js +2 -0
  105. package/dist/NotificationList-Dt_TZlLL.mjs +3969 -0
  106. package/dist/NotificationList-RXsROL30.mjs +3878 -0
  107. package/dist/NotificationList-j6FB8Ea2.js +2 -0
  108. package/dist/NotificationList-qFV94D7S.mjs +3878 -0
  109. package/dist/SchoolList-CClJ_UPT.js +1 -0
  110. package/dist/SchoolList-JmrmL2zE.mjs +5 -0
  111. package/dist/SkillList-B8uw4QZF.mjs +386 -0
  112. package/dist/SkillList-BBkZJpCw.mjs +386 -0
  113. package/dist/SkillList-BhVXby3M.mjs +386 -0
  114. package/dist/SkillList-BjP12yM0.js +1 -0
  115. package/dist/SkillList-C1LxFTRP.mjs +386 -0
  116. package/dist/SkillList-CJyAJrM9.js +1 -0
  117. package/dist/SkillList-CMfE8NKb.js +1 -0
  118. package/dist/SkillList-Cjt8Kney.mjs +386 -0
  119. package/dist/SkillList-Cs_lxx12.mjs +386 -0
  120. package/dist/SkillList-D80PWiq0.mjs +386 -0
  121. package/dist/SkillList-DF--jHTh.mjs +386 -0
  122. package/dist/SkillList-DPZwDt80.js +1 -0
  123. package/dist/SkillList-D_tQAQqL.js +1 -0
  124. package/dist/SkillList-DcNgTDlA.mjs +386 -0
  125. package/dist/SkillList-DhEchac9.js +1 -0
  126. package/dist/SkillList-DqlhMpSA.js +1 -0
  127. package/dist/SkillList-RwckcULz.js +1 -0
  128. package/dist/SkillList-WqwHRR6L.js +1 -0
  129. package/dist/TeacherSelector-0BpJU3HM.js +1 -0
  130. package/dist/TeacherSelector-10txqE_O.mjs +30 -0
  131. package/dist/TeacherSelector-BI2iyKlw.mjs +30 -0
  132. package/dist/TeacherSelector-BKSay316.mjs +30 -0
  133. package/dist/TeacherSelector-BUZUQPuu.mjs +30 -0
  134. package/dist/TeacherSelector-BuEM64ML.js +1 -0
  135. package/dist/TeacherSelector-C52rXj2q.mjs +30 -0
  136. package/dist/TeacherSelector-CAo3E6h-.mjs +30 -0
  137. package/dist/TeacherSelector-CKdM3Z8y.js +1 -0
  138. package/dist/TeacherSelector-CT1vR4JR.mjs +30 -0
  139. package/dist/TeacherSelector-Ce7pEJlG.js +1 -0
  140. package/dist/TeacherSelector-CeCJEF4W.js +1 -0
  141. package/dist/TeacherSelector-CvDvEwls.js +1 -0
  142. package/dist/TeacherSelector-DXG3itVQ.js +1 -0
  143. package/dist/TeacherSelector-DXv_vBJI.js +1 -0
  144. package/dist/TeacherSelector-DgfugjyF.js +1 -0
  145. package/dist/TeacherSelector-DpcBvLY-.mjs +30 -0
  146. package/dist/TeacherSelector-Xd8QnKWa.mjs +30 -0
  147. package/dist/TheContent-9YzVbOWj.js +1 -0
  148. package/dist/TheContent-B7iKDWWl.mjs +38 -0
  149. package/dist/TheContent-BQNAOyQ1.js +1 -0
  150. package/dist/TheContent-BcPcCqnd.mjs +28 -0
  151. package/dist/TheContent-BjfyIeSm.js +1 -0
  152. package/dist/TheContent-C7s0FxEV.js +1 -0
  153. package/dist/TheContent-CCqXVVvk.mjs +38 -0
  154. package/dist/TheContent-CDVWxnOm.js +1 -0
  155. package/dist/TheContent-CDaAPYCa.js +1 -0
  156. package/dist/TheContent-CtCoUbS9.js +1 -0
  157. package/dist/TheContent-CyIFLtrd.mjs +28 -0
  158. package/dist/TheContent-DlLYa4WT.js +1 -0
  159. package/dist/TheContent-Dnu_bJD9.mjs +38 -0
  160. package/dist/TheContent-Dw9fAAxI.mjs +38 -0
  161. package/dist/TheContent-Dwm9IxNz.js +1 -0
  162. package/dist/TheContent-kfDEaXOp.mjs +28 -0
  163. package/dist/TheContent-mTUR10lr.mjs +28 -0
  164. package/dist/TheContent-q6q9KswZ.mjs +28 -0
  165. package/dist/UserContainer-B5OwFSHh.js +5 -0
  166. package/dist/UserContainer-BD0grJiW.js +5 -0
  167. package/dist/UserContainer-BJ-VlgOe.mjs +2771 -0
  168. package/dist/UserContainer-BfGPXq1w.js +5 -0
  169. package/dist/UserContainer-BjY7YDtT.js +5 -0
  170. package/dist/UserContainer-BmpvX_61.js +5 -0
  171. package/dist/UserContainer-BxDgQxlT.mjs +2771 -0
  172. package/dist/UserContainer-CCerxkEw.mjs +2771 -0
  173. package/dist/UserContainer-CilrSMeD.mjs +2771 -0
  174. package/dist/UserContainer-CsWRpc7V.js +5 -0
  175. package/dist/UserContainer-CsxfRZ2W.js +5 -0
  176. package/dist/UserContainer-DQoP15se.mjs +2771 -0
  177. package/dist/UserContainer-DUFpFjmN.mjs +2771 -0
  178. package/dist/UserContainer-DbdoSq-Q.js +5 -0
  179. package/dist/UserContainer-Dl2PbU2F.mjs +2771 -0
  180. package/dist/UserContainer-DuoEITq2.js +5 -0
  181. package/dist/UserContainer-Zsre6Ztl.mjs +2770 -0
  182. package/dist/UserContainer-hWvp6IhQ.mjs +2771 -0
  183. package/dist/UserDetail-BVJMuRIz.mjs +902 -0
  184. package/dist/UserDetail-Brs13Wua.js +1 -0
  185. package/dist/UserDetail-CJtccXfo.mjs +902 -0
  186. package/dist/UserDetail-C_pmgUnE.js +1 -0
  187. package/dist/UserDetail-CcZmp1Mp.js +1 -0
  188. package/dist/UserDetail-CpPTUVCj.js +1 -0
  189. package/dist/UserDetail-CwJnuEcF.js +1 -0
  190. package/dist/UserDetail-D-U-tBne.mjs +902 -0
  191. package/dist/UserDetail-Dp4Oq_j9.mjs +902 -0
  192. package/dist/UserDetail-DtBbGjOH.js +1 -0
  193. package/dist/UserDetail-DxGAQjfn.js +1 -0
  194. package/dist/UserDetail-GaRReB9G.mjs +902 -0
  195. package/dist/UserDetail-MHs6uPbO.mjs +902 -0
  196. package/dist/UserDetail-P4KB2MaX.js +1 -0
  197. package/dist/UserDetail-XHKLiGNl.mjs +902 -0
  198. package/dist/UserDetail-aijcf7nD.mjs +902 -0
  199. package/dist/UserDetail-qQxtBbVa.mjs +902 -0
  200. package/dist/UserDetail-qXX-264Q.js +1 -0
  201. package/dist/UserList-7gE8aU_I.js +5 -0
  202. package/dist/UserList-B7sk8bc6.mjs +1162 -0
  203. package/dist/UserList-B_kL52Yt.js +5 -0
  204. package/dist/UserList-BxHukWx6.mjs +1171 -0
  205. package/dist/UserList-CBNielQ4.mjs +1162 -0
  206. package/dist/UserList-CNMbjvWP.mjs +1162 -0
  207. package/dist/UserList-CRwZa5DB.js +5 -0
  208. package/dist/UserList-CftAVe0u.mjs +1162 -0
  209. package/dist/UserList-CkOGJbgn.mjs +1162 -0
  210. package/dist/UserList-CrnzZCR6.mjs +1162 -0
  211. package/dist/UserList-D4V-QZm0.js +5 -0
  212. package/dist/UserList-DGX1gVn-.js +5 -0
  213. package/dist/UserList-DV5CSVza.js +5 -0
  214. package/dist/UserList-DxfQlgFm.mjs +1162 -0
  215. package/dist/UserList-YSUHq2R_.mjs +1162 -0
  216. package/dist/UserList-gVvCNuMM.js +5 -0
  217. package/dist/UserList-h-OWFIax.js +5 -0
  218. package/dist/UserList-x7wvqBuO.js +5 -0
  219. package/dist/assets/Images.d.ts +14 -14
  220. package/dist/components/Alerts/CommonAlert.d.ts +3 -3
  221. package/dist/components/Alerts/EmptyDataAlert.d.ts +8 -8
  222. package/dist/components/Alerts/ErrorHandler.d.ts +6 -6
  223. package/dist/components/Alerts/SandboxAlert.d.ts +3 -0
  224. package/dist/components/Buttons/AddButton.d.ts +7 -7
  225. package/dist/components/Buttons/AddButtonIcon.d.ts +6 -6
  226. package/dist/components/Buttons/CloseButton.d.ts +8 -8
  227. package/dist/components/Buttons/DeleteButtonIcon.d.ts +7 -6
  228. package/dist/components/Buttons/DetailActionButtons.d.ts +8 -8
  229. package/dist/components/Buttons/EditButtonIcon.d.ts +7 -6
  230. package/dist/components/Buttons/LinkEditButton.d.ts +7 -7
  231. package/dist/components/Buttons/LoginNavButton.d.ts +8 -8
  232. package/dist/components/Buttons/SyncButton.d.ts +8 -0
  233. package/dist/components/Buttons/ToggleButton.d.ts +10 -10
  234. package/dist/components/Buttons/UploadFileButton.d.ts +13 -13
  235. package/dist/components/Headers/CommonHeader.d.ts +7 -7
  236. package/dist/components/Image/UploadImage.d.ts +2 -3
  237. package/dist/components/Inputs/FileInput.d.ts +8 -8
  238. package/dist/components/Inputs/PasswordInput.d.ts +9 -8
  239. package/dist/components/Inputs/SearchBox.d.ts +10 -10
  240. package/dist/components/Inputs/SearchBoxContainer.d.ts +9 -10
  241. package/dist/components/Labels/RequiredLabel.d.ts +6 -6
  242. package/dist/components/Loading/Loading.d.ts +3 -3
  243. package/dist/components/Modals/CommonModal.d.ts +2 -3
  244. package/dist/components/Modals/NotificationLogoutModal.d.ts +2 -0
  245. package/dist/components/Modals/NotificationModal.d.ts +2 -3
  246. package/dist/components/Others/QuitPrompt.d.ts +5 -2
  247. package/dist/components/Pagination/CustomPagination.d.ts +2 -3
  248. package/dist/components/Scroll/ScrollToTop.d.ts +3 -0
  249. package/dist/components/Selectors/AcademicClassSelector.d.ts +2 -3
  250. package/dist/components/Selectors/CategorySelector.d.ts +2 -0
  251. package/dist/components/Selectors/CreatableSelector.d.ts +2 -3
  252. package/dist/components/Selectors/CustomSelector.d.ts +2 -3
  253. package/dist/components/Selectors/MailCategorySelectors.d.ts +2 -3
  254. package/dist/components/Selectors/QuestionCategorySelector.d.ts +2 -3
  255. package/dist/components/Selectors/QuestionTypeSelector.d.ts +2 -3
  256. package/dist/components/Selectors/StarRatingSelector.d.ts +2 -3
  257. package/dist/components/Selectors/SuggestionCategorySelector.d.ts +2 -3
  258. package/dist/components/Selectors/constants/constant.d.ts +10 -0
  259. package/dist/components/Selectors/hooks/useCategorySelector.d.ts +5 -0
  260. package/dist/components/Tabs/CustomTab.d.ts +2 -3
  261. package/dist/components/Tabs/TabsWithComponent.d.ts +10 -0
  262. package/dist/configs/editorConfig.d.ts +7 -7
  263. package/dist/constants-BDS_Ev5l.mjs +320 -0
  264. package/dist/constants-BwS8xQgr.js +1 -0
  265. package/dist/constants-C4pJSK8g.mjs +320 -0
  266. package/dist/constants-CGewtxeZ.mjs +320 -0
  267. package/dist/constants-CIfplYOX.js +1 -0
  268. package/dist/constants-CNvNsffe.js +1 -0
  269. package/dist/constants-CPedfvLg.mjs +320 -0
  270. package/dist/constants-Clwj65ie.mjs +320 -0
  271. package/dist/constants-D5AWD8a_.mjs +320 -0
  272. package/dist/constants-Dbpki_CG.js +1 -0
  273. package/dist/constants-Dk81SvKq.js +1 -0
  274. package/dist/constants-Dp8QZ8kV.js +1 -0
  275. package/dist/constants-VDpWRY6o.js +1 -0
  276. package/dist/constants-VdCs8Ytb.mjs +320 -0
  277. package/dist/constants-bBHOR_Ma.mjs +320 -0
  278. package/dist/constants-ra-9n6_H.mjs +320 -0
  279. package/dist/constants-t9grLzgU.js +1 -0
  280. package/dist/constants-ztu46Xk3.js +1 -0
  281. package/dist/containers/Commons/NotFound.d.ts +3 -3
  282. package/dist/containers/DistrictSchools/views/SchoolList.d.ts +3 -3
  283. package/dist/containers/EmailTemplate/components/AttachmentFile.d.ts +7 -7
  284. package/dist/containers/EmailTemplate/components/MailParam.d.ts +7 -7
  285. package/dist/containers/EmailTemplate/configs/emailTemplateSchema.d.ts +13 -13
  286. package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +28 -28
  287. package/dist/containers/EmailTemplate/hooks/useEmailTemplateList.d.ts +11 -12
  288. package/dist/containers/EmailTemplate/views/EmailTemplateDetail.d.ts +3 -3
  289. package/dist/containers/EmailTemplate/views/EmailTemplateList.d.ts +3 -3
  290. package/dist/containers/Gallery/components/ActionModal.d.ts +2 -3
  291. package/dist/containers/Gallery/components/Filter.d.ts +8 -8
  292. package/dist/containers/Gallery/components/Media.d.ts +7 -8
  293. package/dist/containers/Gallery/components/MediaDetail.d.ts +6 -7
  294. package/dist/containers/Gallery/components/MediaList.d.ts +7 -7
  295. package/dist/containers/Gallery/components/MediaNav.d.ts +17 -18
  296. package/dist/containers/Gallery/constants/gallery.types.d.ts +21 -20
  297. package/dist/containers/Gallery/extensions/helpers.d.ts +4 -4
  298. package/dist/containers/Gallery/hooks/useGalleryList.d.ts +30 -31
  299. package/dist/containers/Gallery/views/GalleryList.d.ts +6 -6
  300. package/dist/containers/Login/constant/authConfig.d.ts +38 -0
  301. package/dist/containers/Login/constant/types.d.ts +34 -0
  302. package/dist/containers/Login/hooks/useCreatePassword.d.ts +12 -0
  303. package/dist/containers/Login/hooks/useForgotPassword.d.ts +22 -21
  304. package/dist/containers/Login/hooks/useLogin.d.ts +29 -16
  305. package/dist/containers/Login/hooks/useLoginTwoFactor.d.ts +4 -4
  306. package/dist/containers/Login/views/Dashboard.d.ts +3 -3
  307. package/dist/containers/Login/views/Login.d.ts +9 -9
  308. package/dist/containers/Login/views/block/BlockBackground.d.ts +7 -0
  309. package/dist/containers/Login/views/block/BlockCreatePassword.d.ts +2 -0
  310. package/dist/containers/Login/views/block/BlockForgetPassword.d.ts +6 -3
  311. package/dist/containers/Login/views/block/BlockLogin.d.ts +21 -7
  312. package/dist/containers/Login/views/block/BlockResetPassword.d.ts +2 -3
  313. package/dist/containers/Login/views/block/BlockSelectTeacher.d.ts +10 -0
  314. package/dist/containers/Login/views/block/BlockTwoFactorLogin.d.ts +2 -3
  315. package/dist/containers/Login/views/block/CloseBlock.d.ts +6 -6
  316. package/dist/containers/Login/views/block/ContentHomePage.d.ts +5 -5
  317. package/dist/containers/Login/views/block/IconContent.d.ts +7 -7
  318. package/dist/containers/Login/views/block/QuoteContent.d.ts +2 -7
  319. package/dist/containers/Notifications/components/NotificationButton.d.ts +5 -5
  320. package/dist/containers/Notifications/components/NotificationStatusSelector.d.ts +6 -7
  321. package/dist/containers/Notifications/hooks/useNotificationList.d.ts +17 -15
  322. package/dist/containers/Notifications/hooks/useUnreadNotification.d.ts +4 -4
  323. package/dist/containers/Notifications/views/NotificationList.d.ts +2 -3
  324. package/dist/containers/Skill/components/SkillDetailModal.d.ts +2 -3
  325. package/dist/containers/Skill/components/SkillSelector.d.ts +2 -3
  326. package/dist/containers/Skill/hooks/useSkillDetail.d.ts +19 -20
  327. package/dist/containers/Skill/hooks/useSkillList.d.ts +9 -10
  328. package/dist/containers/Skill/views/SkillList.d.ts +3 -3
  329. package/dist/containers/User/components/AssignStudentModal.d.ts +20 -0
  330. package/dist/containers/User/components/DeleteBulkModel copy.d.ts +4 -0
  331. package/dist/containers/User/components/DeleteBulkModel.d.ts +3 -0
  332. package/dist/containers/User/components/FilterPopover.d.ts +21 -0
  333. package/dist/containers/User/components/HeaderCell.d.ts +19 -0
  334. package/dist/containers/User/components/RemoveAssistant.d.ts +3 -0
  335. package/dist/containers/User/components/RemoveCounselor.d.ts +3 -0
  336. package/dist/containers/User/components/RemoveSupportTeacher.d.ts +3 -0
  337. package/dist/containers/User/components/RemoveTeacher.d.ts +3 -0
  338. package/dist/containers/User/components/SwitchDataTeacherModel.d.ts +12 -0
  339. package/dist/containers/User/components/SwitchTeacherModal.d.ts +2 -0
  340. package/dist/containers/User/components/TableHeader.d.ts +15 -0
  341. package/dist/containers/User/components/TeacherSelector.d.ts +2 -0
  342. package/dist/containers/User/components/UploadCSVButton.d.ts +11 -0
  343. package/dist/containers/User/components/UserDeletedModal.d.ts +2 -0
  344. package/dist/containers/User/configs/changePasswordSchema.d.ts +11 -0
  345. package/dist/containers/User/configs/userSchema.d.ts +13 -15
  346. package/dist/containers/User/configs/utils.d.ts +8 -0
  347. package/dist/containers/User/constants/constants.d.ts +63 -0
  348. package/dist/containers/User/constants/types.d.ts +265 -0
  349. package/dist/containers/User/hooks/useAssignStudent.d.ts +44 -0
  350. package/dist/containers/User/hooks/useAssignStudentList.d.ts +36 -0
  351. package/dist/containers/User/hooks/useAssistantList.d.ts +9 -0
  352. package/dist/containers/User/hooks/useCSVImport.d.ts +37 -0
  353. package/dist/containers/User/hooks/useCSVImportTab.d.ts +45 -0
  354. package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
  355. package/dist/containers/User/hooks/useCounselorList.d.ts +9 -0
  356. package/dist/containers/User/hooks/useExportUsersCsv.d.ts +5 -0
  357. package/dist/containers/User/hooks/useFilterPopover.d.ts +37 -0
  358. package/dist/containers/User/hooks/useResendMail.d.ts +5 -0
  359. package/dist/containers/User/hooks/useRosterUserSelector.d.ts +8 -0
  360. package/dist/containers/User/hooks/useSecondaryTeacherList.d.ts +9 -0
  361. package/dist/containers/User/hooks/useTableHeader.d.ts +20 -0
  362. package/dist/containers/User/hooks/useTeacherList.d.ts +9 -0
  363. package/dist/containers/User/hooks/useUserDeletedList.d.ts +21 -0
  364. package/dist/containers/User/hooks/useUserDeletedModal.d.ts +13 -0
  365. package/dist/containers/User/hooks/useUserDetail.d.ts +41 -22
  366. package/dist/containers/User/hooks/useUserList.d.ts +18 -11
  367. package/dist/containers/User/hooks/userFilters.d.ts +7 -0
  368. package/dist/containers/User/views/AssignStudentList.d.ts +2 -0
  369. package/dist/containers/User/views/CSVImport.d.ts +3 -0
  370. package/dist/containers/User/views/RosterUserSelector.d.ts +8 -0
  371. package/dist/containers/User/views/UserContainer.d.ts +2 -0
  372. package/dist/containers/User/views/UserDeletedList.d.ts +2 -0
  373. package/dist/containers/User/views/UserDetail.d.ts +2 -3
  374. package/dist/containers/User/views/UserList.d.ts +2 -3
  375. package/dist/hooks/useFilters.d.ts +7 -0
  376. package/dist/hooks/useLanguages.d.ts +9 -0
  377. package/dist/i18n.d.ts +2 -0
  378. package/dist/index-AD5wA316.js +15 -0
  379. package/dist/index-B42VGUfr.mjs +17653 -0
  380. package/dist/index-B4U_4-fu.js +15 -0
  381. package/dist/index-BE9QPMie.mjs +17668 -0
  382. package/dist/index-BF3ajZ4F.mjs +17673 -0
  383. package/dist/index-BTZpY1uf.mjs +17606 -0
  384. package/dist/index-BlgOYHBz.js +15 -0
  385. package/dist/index-BmlIO--V.js +15 -0
  386. package/dist/index-CFvswiRi.mjs +17591 -0
  387. package/dist/index-Cmo6_CCl.js +15 -0
  388. package/dist/index-CrMu3c_0.js +15 -0
  389. package/dist/index-CtWbFZ9d.js +15 -0
  390. package/dist/index-D-Z2VEoE.js +15 -0
  391. package/dist/index-DSGOm1zi.js +15 -0
  392. package/dist/index-DvGA0ecI.mjs +17608 -0
  393. package/dist/index-S9mI_rxc.mjs +17608 -0
  394. package/dist/index-VWLBvvhC.mjs +17677 -0
  395. package/dist/index-mofrQOyf.mjs +17608 -0
  396. package/dist/index.css +1037 -287
  397. package/dist/index.d.ts +114 -101
  398. package/dist/index.esm-B5Zde_ik.js +1 -0
  399. package/dist/index.esm-B63qcj54.js +1 -0
  400. package/dist/index.esm-BgMnHsks.js +1 -0
  401. package/dist/index.esm-BtPGK8iJ.mjs +19 -0
  402. package/dist/index.esm-BtSbIjvM.mjs +19 -0
  403. package/dist/index.esm-BzK2DfJz.js +1 -0
  404. package/dist/index.esm-C7Wb7vZp.mjs +19 -0
  405. package/dist/index.esm-CPJEAL1u.js +1 -0
  406. package/dist/index.esm-CWv2HCrn.mjs +19 -0
  407. package/dist/index.esm-CryF_PoG.js +1 -0
  408. package/dist/index.esm-D1KTN__I.js +1 -0
  409. package/dist/index.esm-D6Zacg53.mjs +19 -0
  410. package/dist/index.esm-DMTAvOCa.js +1 -0
  411. package/dist/index.esm-DwtbAhcy.mjs +19 -0
  412. package/dist/index.esm-fD-khqqa.mjs +19 -0
  413. package/dist/index.esm-l7AIvAYG.mjs +19 -0
  414. package/dist/index.js +1 -7537
  415. package/dist/index.js.map +1 -1
  416. package/dist/index.modern.js +170 -7405
  417. package/dist/index.modern.js.map +1 -1
  418. package/dist/layouts/TheContent.d.ts +2 -3
  419. package/dist/mailCategoryService-B19vYJRa.js +1 -0
  420. package/dist/mailCategoryService-BCp8iaXA.mjs +11 -0
  421. package/dist/mailCategoryService-Bb3FPk-a.mjs +11 -0
  422. package/dist/mailCategoryService-Bdq58J2L.js +1 -0
  423. package/dist/mailCategoryService-By7wn1rV.mjs +11 -0
  424. package/dist/mailCategoryService-CEgGm2FV.js +1 -0
  425. package/dist/mailCategoryService-CQusJSL4.mjs +11 -0
  426. package/dist/mailCategoryService-C_ZJZs-z.js +1 -0
  427. package/dist/mailCategoryService-D6V5Wq1K.js +1 -0
  428. package/dist/mailCategoryService-DBhYGQsS.mjs +11 -0
  429. package/dist/mailCategoryService-Dag3hyB2.js +1 -0
  430. package/dist/mailCategoryService-Ddnvm8Cm.js +1 -0
  431. package/dist/mailCategoryService-Dis1n9kR.mjs +11 -0
  432. package/dist/mailCategoryService-DxKsL_4m.mjs +11 -0
  433. package/dist/mailCategoryService-M_l9miAs.mjs +11 -0
  434. package/dist/mailCategoryService-T_3sXv5B.mjs +11 -0
  435. package/dist/mailCategoryService-_WxeTzNN.js +1 -0
  436. package/dist/mailCategoryService-nptgAr-L.js +1 -0
  437. package/dist/mario-core.css +1 -0
  438. package/dist/redux/assessments/action.d.ts +1 -1
  439. package/dist/redux/assessments/reducer.d.ts +10 -5
  440. package/dist/redux/assignment/action.d.ts +1 -1
  441. package/dist/redux/assignment/reducer.d.ts +4 -2
  442. package/dist/redux/assistants/action.d.ts +1 -1
  443. package/dist/redux/assistants/reducer.d.ts +4 -2
  444. package/dist/redux/badges/action.d.ts +1 -1
  445. package/dist/redux/badges/reducer.d.ts +4 -2
  446. package/dist/redux/bandScores/action.d.ts +1 -1
  447. package/dist/redux/bandScores/reducer.d.ts +4 -2
  448. package/dist/redux/certificate/action.d.ts +1 -1
  449. package/dist/redux/certificate/reducer.d.ts +4 -2
  450. package/dist/redux/classes/action.d.ts +1 -1
  451. package/dist/redux/classes/reducer.d.ts +4 -2
  452. package/dist/redux/commons/action.d.ts +23 -8
  453. package/dist/redux/commons/reducer.d.ts +4 -2
  454. package/dist/redux/conferenceRubrics/action.d.ts +1 -1
  455. package/dist/redux/conferenceRubrics/reducer.d.ts +4 -2
  456. package/dist/redux/customAlert/action.d.ts +1 -1
  457. package/dist/redux/customAlert/reducer.d.ts +4 -2
  458. package/dist/redux/dashboard/action.d.ts +5 -4
  459. package/dist/redux/dashboard/reducer.d.ts +4 -2
  460. package/dist/redux/dataPlayer/action.d.ts +2 -2
  461. package/dist/redux/dataPlayer/reducer.d.ts +4 -2
  462. package/dist/redux/emailTemplates/action.d.ts +1 -1
  463. package/dist/redux/emailTemplates/reducer.d.ts +4 -2
  464. package/dist/redux/faqs/action.d.ts +1 -1
  465. package/dist/redux/faqs/reducer.d.ts +4 -2
  466. package/dist/redux/feedback/action.d.ts +1 -1
  467. package/dist/redux/feedback/reducer.d.ts +4 -2
  468. package/dist/redux/gallery/action.d.ts +2 -2
  469. package/dist/redux/gallery/reducer.d.ts +4 -2
  470. package/dist/redux/goalExamples/action.d.ts +1 -1
  471. package/dist/redux/goalExamples/reducer.d.ts +4 -2
  472. package/dist/redux/improveMyClass/action.d.ts +1 -1
  473. package/dist/redux/improveMyClass/reducer.d.ts +4 -2
  474. package/dist/redux/learningStrategies/action.d.ts +1 -1
  475. package/dist/redux/learningStrategies/reducer.d.ts +4 -2
  476. package/dist/redux/learningSupportCategories/action.d.ts +1 -1
  477. package/dist/redux/learningSupportCategories/reducer.d.ts +4 -2
  478. package/dist/redux/mailCategories/action.d.ts +1 -1
  479. package/dist/redux/mailCategories/reducer.d.ts +4 -2
  480. package/dist/redux/navMobile/action.d.ts +1 -0
  481. package/dist/redux/navMobile/reducer.d.ts +4 -0
  482. package/dist/redux/notifications/action.d.ts +3 -3
  483. package/dist/redux/notifications/reducer.d.ts +4 -2
  484. package/dist/redux/questionBanks/action.d.ts +1 -1
  485. package/dist/redux/questionBanks/reducer.d.ts +4 -2
  486. package/dist/redux/questionByCategory/action.d.ts +8 -8
  487. package/dist/redux/questionByCategory/reducer.d.ts +4 -2
  488. package/dist/redux/questionCategory/action.d.ts +1 -1
  489. package/dist/redux/questionCategory/reducer.d.ts +4 -2
  490. package/dist/redux/reflectionForms/action.d.ts +1 -1
  491. package/dist/redux/reflectionForms/reducer.d.ts +4 -2
  492. package/dist/redux/reflectionResults/action.d.ts +1 -1
  493. package/dist/redux/reflectionResults/reducer.d.ts +4 -2
  494. package/dist/redux/schoolBlankDays/action.d.ts +1 -1
  495. package/dist/redux/schoolBlankDays/reducer.d.ts +4 -2
  496. package/dist/redux/semester/action.d.ts +1 -1
  497. package/dist/redux/semester/reducer.d.ts +4 -2
  498. package/dist/redux/sessionPlayers/action.d.ts +5 -4
  499. package/dist/redux/sessionPlayers/reducer.d.ts +4 -2
  500. package/dist/redux/sessionTemplateGeneralClasses/action.d.ts +1 -1
  501. package/dist/redux/sessionTemplateGeneralClasses/reducer.d.ts +4 -2
  502. package/dist/redux/sessionTemplates/action.d.ts +1 -1
  503. package/dist/redux/sessionTemplates/reducer.d.ts +4 -2
  504. package/dist/redux/skills/action.d.ts +1 -1
  505. package/dist/redux/skills/reducer.d.ts +4 -2
  506. package/dist/redux/subjects/action.d.ts +1 -1
  507. package/dist/redux/subjects/reducer.d.ts +4 -2
  508. package/dist/redux/suggestionBanks/action.d.ts +1 -1
  509. package/dist/redux/suggestionBanks/reducer.d.ts +4 -2
  510. package/dist/redux/teacher/myStudent/action.d.ts +1 -1
  511. package/dist/redux/teacher/myStudent/reducer.d.ts +4 -2
  512. package/dist/redux/tutorialScreen/action.d.ts +1 -1
  513. package/dist/redux/tutorialScreen/reducer.d.ts +10 -5
  514. package/dist/redux/users/action.d.ts +2 -2
  515. package/dist/redux/users/reducer.d.ts +4 -2
  516. package/dist/redux/weeklyQuests/action.d.ts +2 -0
  517. package/dist/redux/weeklyQuests/reducer.d.ts +12 -0
  518. package/dist/redux/widget/action.d.ts +1 -1
  519. package/dist/redux/widget/reducer.d.ts +4 -2
  520. package/dist/rootReducer.d.ts +106 -48
  521. package/dist/services/accountService.d.ts +22 -8
  522. package/dist/services/api.d.ts +3 -3
  523. package/dist/services/classService.d.ts +1 -1
  524. package/dist/services/csvImportService.d.ts +9 -0
  525. package/dist/services/csvService.d.ts +8 -0
  526. package/dist/services/emailTemplateService.d.ts +7 -6
  527. package/dist/services/fileServices.d.ts +13 -13
  528. package/dist/services/galleryService.d.ts +2 -2
  529. package/dist/services/mailCategoryService.d.ts +1 -1
  530. package/dist/services/notificationService.d.ts +7 -6
  531. package/dist/services/questionCategoryService.d.ts +3 -1
  532. package/dist/services/schoolService.d.ts +2 -0
  533. package/dist/services/skillService.d.ts +6 -6
  534. package/dist/services/suggestionCategoryService.d.ts +1 -1
  535. package/dist/services/userService.d.ts +37 -7
  536. package/dist/store.d.ts +3 -3
  537. package/dist/types/Conversation.d.ts +8 -8
  538. package/dist/types/ConversationMember.d.ts +5 -5
  539. package/dist/types/Dashboard.d.ts +5 -5
  540. package/dist/types/Filter.d.ts +16 -10
  541. package/dist/types/Language.d.ts +8 -0
  542. package/dist/types/Message.d.ts +13 -13
  543. package/dist/types/Notification.d.ts +8 -8
  544. package/dist/types/Payload.d.ts +17 -0
  545. package/dist/types/user.d.ts +3 -0
  546. package/dist/types-BvnbDeJF.mjs +5 -0
  547. package/dist/types-CTFcZUFS.js +1 -0
  548. package/dist/utils/canAccessRoute.d.ts +2 -2
  549. package/dist/utils/constants.d.ts +87 -58
  550. package/dist/utils/debounce.d.ts +2 -2
  551. package/dist/utils/domHelpers.d.ts +2 -2
  552. package/dist/utils/encodeParams.d.ts +2 -2
  553. package/dist/utils/firstCheckToken.d.ts +2 -2
  554. package/dist/utils/generateRandomString.d.ts +2 -2
  555. package/dist/utils/getAccessToken.d.ts +2 -2
  556. package/dist/utils/getCookieValue.d.ts +2 -0
  557. package/dist/utils/getFileUrl.d.ts +2 -2
  558. package/dist/utils/getStaticFileUrl.d.ts +2 -0
  559. package/dist/utils/getTextFromHTML.d.ts +2 -2
  560. package/dist/utils/utcToLocalTime.d.ts +1 -2
  561. package/package.json +80 -64
  562. package/dist/components/Alerts/ReactNotification.d.ts +0 -4
  563. package/dist/containers/Faq/components/FaqDetailModal.d.ts +0 -3
  564. package/dist/containers/Faq/hooks/useFaqDetail.d.ts +0 -18
  565. package/dist/containers/Faq/hooks/useFaqList.d.ts +0 -10
  566. package/dist/containers/Faq/views/FaqList.d.ts +0 -3
  567. package/dist/layouts/TheFooter.d.ts +0 -3
  568. package/dist/layouts/TheHeader.d.ts +0 -3
  569. package/dist/layouts/TheHeaderDropdown.d.ts +0 -3
  570. package/dist/layouts/TheLayout.d.ts +0 -3
  571. package/dist/layouts/TheSidebar.d.ts +0 -3
  572. package/dist/redux/bandScoreBreakPoint/action.d.ts +0 -1
  573. package/dist/redux/bandScoreBreakPoint/reducer.d.ts +0 -2
  574. package/dist/services/faqService.d.ts +0 -6
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),u=require("reactstrap"),F=require("react-router-dom"),e=require("./index-DSGOm1zi.js"),q=require("react-redux"),J=require("formik"),we=require("yup"),H=require("react-google-recaptcha-v3"),ie=require("@react-oauth/google"),M=require("./types-CTFcZUFS.js"),K=require("@azure/msal-browser"),ye=require("@amplitude/analytics-browser");function ce(o){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(a,r,l.get?l:{enumerable:!0,get:()=>o[r]})}}return a.default=o,Object.freeze(a)}const v=ce(we),B=ce(ye),Se={backgroundColor:"#f7f9fc",borderRadius:"4px",marginBottom:"5px",position:"relative"},xe={backgroundColor:"#ffffff",paddingRight:"50px",color:"#333333",caretColor:"#333333"},Ne={fontSize:"20px",position:"absolute",right:"10px",color:"#316CD9"},je=o=>o.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(a,r)=>r.toUpperCase()),z=({isShowPassword:o,togglePasswordVisible:a,onChange:r,placeholder:l})=>s.jsxs("div",{className:"d-flex align-items-center w-100",style:Se,children:[s.jsx(u.Input,{className:"border password-input",style:xe,type:o?"text":"password",name:"password",onChange:r,placeholder:l||"Password",autocomplete:l?je(l):"password",required:!0}),s.jsx("i",{className:`far ${o?"fa-eye-slash":"fa-eye"} mx-2 cursor-pointer`,style:Ne,onClick:()=>a(),title:o?"Hide":"Show"})]}),Ie=v.object({email:v.string().email("Email is invalid").required("Email is required"),password:v.string().required("Password is required"),rememberMe:v.boolean()}),Ee=({onSuccess:o,onError:a})=>{const r=ie.useGoogleLogin({onSuccess:async l=>{try{const i=await fetch("https://www.googleapis.com/oauth2/v3/userinfo",{headers:{Authorization:`Bearer ${l.access_token}`}}).then(p=>p.json()),h={accessToken:l.access_token,googleId:i.sub,profileObj:{email:i.email,familyName:i.family_name,givenName:i.given_name,imageUrl:i.picture,name:i.name}};o(h)}catch(i){a(i)}},onError:l=>a(l)});return s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>r(),children:[s.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"24px",height:"24px",style:{marginRight:"8px"},children:[s.jsx("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"}),s.jsx("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"}),s.jsx("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"}),s.jsx("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"}),s.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]}),s.jsx("p",{children:"GOOGLE"})]})},be=({defaultInfo:o,userLogin:a,school:r,isShowPassword:l,setIsShowPassword:i,fnIsCheckLogin:h,googleClientId:p,fnLoginSSO:w,extensionEmail:I,onLoginWidthClever:y})=>{const x=()=>i(!l),c=q.useDispatch(),{executeRecaptcha:f}=H.useGoogleReCaptcha(),k=n.useCallback(async()=>{if(!f){console.log("execute recaptcha undefined");return}return await f("login")},[f]),R=n.useCallback(()=>{},[]),P=async d=>{try{await e.AccountSSOLogApi(d)}catch(S){console.error(S)}},E=async d=>{if(d?.accessToken){let{email:S,familyName:L,givenName:T,imageUrl:$,name:N}=d.profileObj,b=d.accessToken,A=d.googleId;const G=window.location.hostname.split(".marioforme.com")?.[0],D=S.split("@")?.[1],Z=I?.split(",")?.map(U=>U.trim())?.filter(U=>U).some(U=>D.includes(U));if(!D.includes(G)&&!Z){alert("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"),await P([`${D} is incorrect`]);return}const O={firstName:T,lastName:L,imageUrl:$,fullName:N,email:S,accessToken:b,googleId:A};c(e.setInforUserGoogle(O)),h(M.TypeLogin.Google,O,b,k)}};return s.jsx(n.Fragment,{children:s.jsx(J.Formik,{initialValues:o,validationSchema:Ie,onSubmit:async d=>{try{const S=await k();if(!S)return;d.captcha=S,d.loginType=M.LoginType.Default,a(d)}catch(S){console.error(S)}},children:d=>{const{handleBlur:S,handleSubmit:L,values:T,touched:$,errors:N,setFieldValue:b}=d,A=$.email&&N.email,W=$.password&&N.password;return s.jsx("div",{className:`${e.styles["box-login"]} w-100`,children:s.jsx(u.Form,{className:`${e.styles["block-login"]}`,onSubmit:L,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsxs("div",{className:"d-flex align-items-center mb-4",children:[s.jsx("img",{hidden:!r?.schoolLogo,src:r?.schoolLogo,className:`${e.styles["school-icon"]} mr-3`}),s.jsx("p",{className:`${e.styles["school-name"]} mb-0`,children:r.schoolName})]}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"Welcome Back!"}),s.jsx("p",{className:`${e.styles["login-description"]} mb-5`,children:"Please enter your MARIO Education account details"}),s.jsxs(u.FormGroup,{className:`${e.styles["form-user-name"]}`,children:[s.jsx(u.Input,{type:"text",name:"email",placeholder:"Email",value:T.email,onChange:G=>b("email",G.target?.value?.trim()||""),autocomplete:"email",onBlur:S("email"),required:!0}),A&&s.jsx(e.ErrorHandler,{text:N.email})]}),s.jsxs(u.FormGroup,{children:[s.jsx(z,{isShowPassword:l,togglePasswordVisible:x,onChange:G=>b("password",G.target?.value?.trim()||"")}),W&&s.jsx(e.ErrorHandler,{text:N.password})]}),s.jsx(u.FormGroup,{children:s.jsx(H.GoogleReCaptcha,{action:"login",onVerify:R})}),s.jsxs("div",{className:"d-flex justify-content-between",children:[s.jsxs("div",{className:"d-flex align-items-center",style:{gap:"8px"},children:[s.jsx("input",{type:"checkbox",checked:!T.isSessionUserBrowser,className:`${e.styles["checkbox-keep-login"]}`,onChange:()=>b("isSessionUserBrowser",!T.isSessionUserBrowser)}),s.jsx("p",{className:`${e.styles["label-keep-login"]} mb-0 ml-2`,children:"Keep me logged in"})]}),s.jsx(F.Link,{to:"/forgot-password",className:`${e.styles["link-to-login"]}`,children:"Forgot password?"})]}),s.jsx("button",{className:`${e.styles["btn-login"]} mt-5`,type:"submit",children:"LOG IN"}),s.jsx("p",{className:`${e.styles["option-text"]} my-3 text-center`,children:"OR"}),s.jsxs(u.Row,{className:"mb-4",children:[s.jsx(u.Col,{lg:6,md:6,xs:12,className:"pr-md-3",children:!!p&&s.jsx(ie.GoogleOAuthProvider,{clientId:p,children:s.jsx(Ee,{onSuccess:E,onError:()=>console.log("Google login failed")})})}),r.schoolId&&s.jsx(u.Col,{lg:6,md:6,xs:12,className:`${e.styles["btn-login-sso"]} pl-md-2`,hidden:!r?.schoolId,children:s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>w(k),children:[s.jsx("img",{src:"images/microsoft-logo.png"}),s.jsx("p",{children:"MICROSOFT"})]})})]}),s.jsx("div",{className:`${e.styles["btn-login-sso"]}`,children:s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>window.open("https://launchpad.classlink.com/login"),children:[s.jsx("img",{src:"images/class-link-icon.png"}),s.jsx("p",{children:"SIGN IN WITH CLASSLINK"})]})}),s.jsx("div",{className:`${e.styles["btn-login-sso"]} mt-4`,children:s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>y(),children:[s.jsx("img",{src:"images/clever-icon.png"}),s.jsx("p",{children:"SIGN IN WITH CLEVER"})]})})]})})})}})})},Ce={email:"",captcha:""},ke="/",ae="/login",Le="Log in",de=()=>{const o=new URLSearchParams(F.useLocation().search),a=o.get("token"),r=o.get("key")??"",l=q.useDispatch(),i=F.useNavigate(),[h,p]=n.useState(!1),w=n.useCallback(()=>{p(!h)},[h]),[I,y]=n.useState(!1),[x,c]=n.useState(!1),[f,k]=n.useState({token:"",password:"",reEnterPassword:"",email:"",userId:""}),[R,P]=n.useState(!0),{executeRecaptcha:E}=H.useGoogleReCaptcha();n.useEffect(()=>{document.title=Le,e.getAccessToken()&&i(ke)},[]);const d=n.useCallback(async N=>{l(e.setLoading(!0));try{await e.forgotPassword(N),i(ae),l(e.setAlert({type:"success",message:"A mail to reset password was sent"}))}catch(b){l(e.setAlert({type:"danger",message:b.response?.data?.title||b.message||"Error occured"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}l(e.setLoading(!1))},[]),S=n.useCallback(async(N,b)=>{l(e.setLoading(!0));try{const A=await e.checkResetToken(N,b);A.data?k({...f,token:N,email:A.data}):P(!1)}catch{P(!1)}l(e.setLoading(!1))},[]),L=n.useCallback(async N=>{l(e.setLoading(!0));try{await e.resetPassword({...N,key:r}),i(ae),l(e.setAlert({type:"success",message:"Reset password sucessfully"}))}catch(b){l(e.setAlert({type:"danger",message:b.response?.data?.title||b.message||"Error occured"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}l(e.setLoading(!1))},[]),T=n.useCallback(async()=>{if(!E){console.log("execute recaptcha undefined");return}return await E("forgetPass")},[E]),$=n.useCallback(()=>{},[]);return n.useEffect(()=>{a&&r&&S(a,r)},[a,r]),{defaultInfo:Ce,forgotPasswordRequest:d,checkResetTokenRequest:S,validLink:R,resetPasswordRequest:L,openLogin:h,toggle:w,isShowNewPassword:I,setIsShowNewPassword:y,isShowReTypePassword:x,setIsShowReTypePassword:c,clickHandler:T,handleVerify:$,initialValues:f}},ve={email:"",captcha:""},Pe=v.object({email:v.string().email("Email is invalid").required("Email is required")}),Te=({school:o})=>{const{forgotPasswordRequest:a,clickHandler:r,handleVerify:l}=de();return s.jsx(J.Formik,{initialValues:ve,enableReinitialize:!0,validationSchema:Pe,onSubmit:async i=>{const h=await r();h&&(i.captcha=h,a(i))},children:i=>{const{handleChange:h,handleSubmit:p,values:w,touched:I,errors:y}=i;return s.jsx("div",{className:`${e.styles["box-login"]}`,children:s.jsx("div",{className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsxs("div",{className:"d-flex align-items-center mb-4",children:[s.jsx("img",{src:o.schoolLogo,className:`${e.styles["school-icon"]} mr-3`}),s.jsx("p",{className:`${e.styles["school-name"]} mb-0`,children:o.schoolName})]}),s.jsx("p",{className:`${e.styles["title-login"]} `,children:"Forgot password"}),s.jsx("p",{className:`${e.styles["recover-account"]} mb-5`,children:"Enter email to recover your account"}),s.jsxs("div",{className:"w-100",children:[s.jsx(u.Input,{type:"text",name:"email",id:"email",placeholder:"Input email",onChange:h,value:w.email}),I.email&&y.email&&s.jsx(e.ErrorHandler,{text:y.email})]}),s.jsx(F.Link,{to:"/login",className:`${e.styles["link-to-login"]} mt-2`,children:"Return to login"}),s.jsx(H.GoogleReCaptcha,{action:"forgetPass",onVerify:l}),s.jsx(u.Col,{className:"p-0",children:s.jsx("button",{className:`${e.styles["btn-login"]} mt-5`,onClick:()=>p(),children:"Continue"})})]})})})}})},Re=v.object({password:v.string().required("New password is required"),reEnterPassword:v.string().required("Please re-enter new password").test("matching","Passwords do not match",function(){return this.parent.password===this.parent.reEnterPassword})}),Ae=()=>{const{validLink:o,resetPasswordRequest:a,isShowNewPassword:r,setIsShowNewPassword:l,isShowReTypePassword:i,setIsShowReTypePassword:h,initialValues:p}=de();return s.jsx(J.Formik,{initialValues:p,enableReinitialize:!0,validationSchema:Re,onSubmit:w=>{a(w)},children:w=>{const{setFieldValue:I,handleSubmit:y,touched:x,errors:c,values:f}=w;return s.jsx(u.Row,{className:`${e.styles["box-login"]}`,children:s.jsx(u.Col,{className:"p-0",children:s.jsx("div",{className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsx("img",{src:`${e.getStaticFileUrl("/images/horizontal-logo-blue.svg")}`,className:`${e.styles["img-login-rectangle"]}`}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"Reset Password"}),s.jsx("div",{className:"w-100",children:o?s.jsxs(n.Fragment,{children:[s.jsx(u.FormGroup,{className:`${e.styles["form-user-name"]}`,children:s.jsx(u.Input,{disabled:!0,type:"text",name:"email",placeholder:"Email",value:f.email,autocomplete:"email",required:!0,className:`${e.styles.input}`})}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{isShowPassword:r,togglePasswordVisible:()=>l(!r),onChange:k=>I("password",k.target.value)}),x.password&&c.password&&s.jsx(e.ErrorHandler,{text:c.password})]}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{placeholder:"Confirm Password",isShowPassword:i,togglePasswordVisible:()=>h(!i),onChange:k=>I("reEnterPassword",k.target.value)}),x.reEnterPassword&&c.reEnterPassword&&s.jsx(e.ErrorHandler,{text:c.reEnterPassword})]})]}):s.jsxs(n.Fragment,{children:[s.jsx("p",{className:`${e.styles["recover-account"]} mb-5`,children:"Invalid reset password link"}),s.jsx("p",{className:"w-100",children:"It may have been accessed before or expired or you have just tried to reset another account's password"})]})}),o&&s.jsx(u.Col,{className:"p-0",children:s.jsx("button",{className:`${e.styles["btn-login"]} ${e.styles["btn-rounder"]} mt-4`,onClick:()=>y(),children:"SET A NEW PASSWORD"})})]})})})})}})},me=`${e.BASE_URL}/api/school`,$e=()=>e.api.get(`${me}/settings`),Oe=()=>e.api.get(`${me}/info`),_e={auth:{clientId:e.isLocalhost?"a27f8ac9-e039-4bbd-a9e1-3096e52a77bb":"90c6897c-f17b-475e-a7a8-9a19651e0060",authority:"https://login.microsoftonline.com/common",redirectUri:"https://sso.marioforme.com/microsoft-login.html"},cache:{cacheLocation:"sessionStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(o,a,r)=>{if(!r)switch(o){case K.LogLevel.Error:console.error(a);return;case K.LogLevel.Info:console.info(a);return;case K.LogLevel.Verbose:console.debug(a);return;case K.LogLevel.Warning:console.warn(a);return;default:return}}}}},Ge={email:"",password:"",captcha:"",rememberMe:!1,isSessionUserBrowser:!!sessionStorage.getItem(e.IS_USER_SESSION_BROWSER)},Ue="/home",ne="/home",Me="/admin/home",qe="/parent",Fe="/admin/schools",He="/list-student",De="Log in",Ve=()=>{const o=q.useDispatch(),a=F.useNavigate(),[r,l]=n.useState(!1),i=q.useSelector(t=>t.common.isLoginGoogle),[h,p]=n.useState(""),[w,I]=n.useState(""),[y,x]=n.useState(""),c=q.useSelector(t=>t.common.inforUserGoogle),f=new URLSearchParams(location.search),k=f.get("type")==="classlink",R=f.get("token"),P=f.get("isAdminUser"),[E]=n.useState(!1),[d,S]=n.useState({schoolName:"",schoolLogo:"",schoolId:0}),[L,T]=n.useState(null),$=n.useCallback(()=>{l(!r)},[r]),[N,b]=n.useState(!1);n.useEffect(()=>{document.title=De;const t=e.getCookieValue("auth-token");if(t){const g=window.location.hostname;if(localStorage.setItem(e.ACCESS_TOKEN,t),document.cookie=`auth-token=;domain=${g.includes("localhost")?g:".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=/",P)return a("/admin/home")}e.getAccessToken()&&a("/"),U()},[P]);const A=()=>{localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN),localStorage.removeItem("USER_EMAIL")};n.useEffect(()=>{k&&R!=""&&G()},[]);const W=()=>{if(e.isLocalhost){const t="https://clever.com/oauth/instant-login?client_id=c3da6c669d239c70d48e&district_id=66132a6f222bda41cc8abe5d";window.location.href=t}else{const t=`https://clever.com/oauth/authorize?response_type=code&redirect_uri=${encodeURIComponent("https://classlink.marioforme.com/api/clever/clever-login")}&client_id=c3da6c669d239c70d48e`;window.location.href=t}},G=async()=>{o(e.setLoading(!0));try{const t={tokenClassLink:R},m=await e.apiInforUserClassLink(t),{email:g,token:j}=m.data;await O({email:g,rememberMe:!1,password:"default",accessToken:j})}catch(t){o(e.setAlert({type:"danger",message:t.response?.data?.title||t.message}))}o(e.setLoading(!1))},D=window.location.host.includes("-district"),Z=n.useCallback(async()=>{o(e.setLoading(!0));try{const t=await Oe(),m=t.data.schoolLogo??"";t.data&&S({schoolName:t.data.schoolName,schoolLogo:m?e.getFileUrl(m):e.getStaticFileUrl("/images/logo_header_blue.png"),schoolId:t.data.schoolId})}catch(t){o(e.setAlert({type:"danger",message:t.response?.data?.title||t.message}))}o(e.setLoading(!1))},[]),O=n.useCallback(async t=>{o(e.setLoading(!0));try{const m=t?.isSessionUserBrowser??!1,g=await e.logIn({...t,email:t?.email?.trim(),password:t?.password?.trim()}),{token:j,id:_,firstName:Y,lastName:V,roles:C,email:Q,profileImageFileName:pe,isLoginFirst:fe}=g.data;if(m?(sessionStorage.setItem(e.ACCESS_TOKEN,j),sessionStorage.setItem(e.IS_USER_SESSION_BROWSER,m)):(sessionStorage.removeItem(e.IS_USER_SESSION_BROWSER),localStorage.setItem(e.ACCESS_TOKEN,j)),localStorage.removeItem(e.NOTIFICATION_ALERT_KEY),o(e.setUser({id:_,firstName:Y,lastName:V,roles:C,email:Q,profileImageFileName:pe})),!localStorage.getItem("ROLES")&&C.includes("Admin")&&localStorage.setItem("ROLES","Admin"),t?.email&&!C.includes("Admin")){B.init(e.isLocalhost?e.INIT_AMPLITUDE_KEY_STAGE:e.INIT_AMPLITUDE_KEY_PROD,t.email,{defaultTracking:!1});const X=window.location.hostname,oe=new B.Identify;oe.set("domain",X),B.identify(oe),B.track("general: session start",{user_id:t.email,domain:X,roles:t?.roles?.toString()}),localStorage.setItem("USER_EMAIL",t.email),fe&&B.track("general: first login",{user_id:t.email,domain:X,roles:t?.roles?.toString()})}D?a(Fe):C.includes("Admin")?a(Me):C.includes("Teacher")||C.includes("Assistant")||C.includes("Counselor")||C.includes("SecondaryTeacher")?a(Ue):C.includes("Student")?a(ne):C.includes("Parent")?a(qe):C.includes("EduTeacher")&&a(He)}catch(m){o(e.setAlert({type:"danger",message:m.response?.data?.title||m.message||"Login failed"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}o(e.setLoading(!1))},[]),U=async()=>{try{const t=await e.getGoogleClientId();p(t.data.googleClientId),I(t.data.googleCaptchaId),x(t.data.extensionEmail)}catch(t){o(e.setAlert({type:"danger",message:t.response?.data?.title||t.message||"Login failed"}))}},ee=n.useCallback(async(t,m,g,j)=>{o(e.setLoading(!0));try{if((await e.checkUserGoogle(t,m)).data){const V={email:m.email,isLoginGoogle:!0,rememberMe:!1,password:"default",accessToken:g,captcha:"",loginType:M.LoginType.Google};if(j!=null){const C=await j();V.captcha=C}await O(V),o(e.setIsLoginGoogle(!1))}else if((await e.registerUserStudent(m))?.data){const C={email:m.email,isLoginGoogle:!0,rememberMe:!1,password:"default",accessToken:g,captcha:"",loginType:M.LoginType.Google};if(j!=null){const Q=await j();C.captcha=Q}await O(C)}}catch(_){o(e.setAlert({type:"danger",message:_.response?.data?.title||_.message||"Login failed"}))}o(e.setLoading(!1))},[]),ge=async(t,m)=>{o(e.setLoading(!0));try{const g={firstName:c.firstName,lastName:c.lastName,imageUrl:c.imageUrl,fullName:c.fullName,email:c.email,accessToken:c.accessToken,teacherId:t};if((await e.registerUserStudent(g)).data){const _=await m(),Y={email:c.email,captcha:_,isLoginGoogle:!0,rememberMe:!1,password:"default",accessToken:c.accessToken,loginType:M.LoginType.Google};o(e.setIsLoginGoogle(!1)),await O(Y),a(ne)}}catch(g){o(e.setAlert({type:"danger",message:g.response?.data?.title||g.message||"Login failed"}))}o(e.setIsLoginGoogle(!1)),o(e.setLoading(!1))},ue=async()=>{try{const t=await $e();o(e.setSandboxMode(t.data.isSandboxMode))}catch(t){console.error(t)}},se=async t=>{L.handleRedirectPromise().then(async m=>{if(d?.schoolId)if(m){let g=m.account;await te(g,t)}else{const g=L.getAllAccounts();if(g.length===0){const j=e.isLocalhost?"https://brightsoft.marioforme.com":"https://sso.marioforme.com";window.location.href=(window.location.hostname==="localhost"?"https://localhost:3000":j)+`/microsoft-login.html?redirect-uri=${window.location.href}&schoolId=${d.schoolId}`}else{let j=g[0];await te(j,t)}}}).catch(m=>{console.error(m)})},te=async(t,m)=>{let g=t.name,j={firstName:g.split(" ").slice(0,-1).join(" "),lastName:g.split(" ").slice(-1).join(" "),fullName:g,imageUrl:"",email:t.username,accessToken:t.idTokenClaims.aio,googleId:t.tenantId};o(e.setInforUserGoogle(j)),await ee(M.TypeLogin.MicrosoftSSO,j,t.idTokenClaims.aio,m)},he=async()=>{const t=new K.PublicClientApplication(_e);await t.initialize(),T(t)};return n.useEffect(()=>{let t=window.location.href;L&&t.includes("code")&&t.includes("client_info")&&se()},[JSON.stringify(L)]),n.useEffect(()=>{ue(),he(),Z()},[]),{defaultInfo:Ge,userLogin:O,openLogin:r,toggle:$,isShowPassword:N,setIsShowPassword:b,fnIsCheckLogin:ee,isLoginGoogle:i,infoUser:c,submitLogin:ge,googleClientId:h,googleRecaptchaId:w,handleCancelModelAssign:A,openModelAssign:E,fnLoginSSO:se,school:d,extensionEmail:y,handleLoginWidthClever:W}},re="/",Be="/login",le="Log in",Ke=()=>{const o=q.useDispatch(),a=F.useNavigate(),r=location.search,i=new URLSearchParams(r).get("userId"),[h,p]=n.useState(!1),[w,I]=n.useState(!1),[y,x]=n.useState({password:"",reEnterPassword:"",email:"",userId:i??"",token:""}),{executeRecaptcha:c}=H.useGoogleReCaptcha(),f=n.useCallback(async E=>{o(e.setLoading(!0));try{const d=await e.getUserNewPassword(E);x({...y,email:d.data})}catch(d){o(e.setAlert({type:"danger",message:d.message}))}o(e.setLoading(!1))},[]),k=n.useCallback(async E=>{o(e.setLoading(!0));try{await e.createPassword(E),a(Be),o(e.setAlert({type:"success",message:"Create password sucessfully"}))}catch(d){o(e.setAlert({type:"danger",message:d.response?.data?.title||d.message||"Error occured"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}o(e.setLoading(!1))},[]),R=n.useCallback(async()=>{if(!c){console.log("execute recaptcha undefined");return}return await c("forgetPass")},[c]),P=n.useCallback(()=>{},[]);return n.useEffect(()=>{document.title=le,e.getAccessToken()&&a(re),i&&f(i)},[i]),n.useEffect(()=>{document.title=le,e.getAccessToken()&&a(re)},[]),{createPasswordRequest:k,isShowNewPassword:h,setIsShowNewPassword:p,isShowReTypePassword:w,setIsShowReTypePassword:I,clickHandler:R,handleVerify:P,initialValues:y}},ze=v.object({password:v.string().required("Password is required"),reEnterPassword:v.string().required("Please re-enter Password").test("matching","Passwords do not match",function(){return this.parent.password===this.parent.reEnterPassword})}),We=()=>{const{createPasswordRequest:o,isShowNewPassword:a,setIsShowNewPassword:r,isShowReTypePassword:l,setIsShowReTypePassword:i,initialValues:h}=Ke();return s.jsx(J.Formik,{initialValues:h,enableReinitialize:!0,validationSchema:ze,onSubmit:p=>{o(p)},children:p=>{const{setFieldValue:w,handleSubmit:I,touched:y,errors:x,values:c}=p;return s.jsx(u.Row,{className:`${e.styles["box-login"]}`,children:s.jsxs(u.Col,{className:"p-0",children:[s.jsx("div",{hidden:!c.email,className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsx("img",{src:`${e.getStaticFileUrl("/images/horizontal-logo-blue.svg")}`,className:`${e.styles["img-login-rectangle"]}`}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"Create Your Password"}),s.jsx("div",{className:"w-100",children:s.jsxs(n.Fragment,{children:[s.jsx(u.FormGroup,{className:`${e.styles["form-user-name"]}`,children:s.jsx(u.Input,{disabled:!0,type:"text",name:"email",placeholder:"Email",value:c.email,autocomplete:"email",required:!0,className:`${e.styles.input}`})}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{isShowPassword:a,togglePasswordVisible:()=>r(!a),onChange:f=>w("password",f.target.value)}),y.password&&x.password&&s.jsx(e.ErrorHandler,{text:x.password})]}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{placeholder:"Confirm Password",isShowPassword:l,togglePasswordVisible:()=>i(!l),onChange:f=>w("reEnterPassword",f.target.value)}),y.reEnterPassword&&x.reEnterPassword&&s.jsx(e.ErrorHandler,{text:x.reEnterPassword})]})]})}),s.jsx("button",{className:`${e.styles["btn-login"]} ${e.styles["btn-rounder"]} mt-4`,onClick:()=>I(),children:"CREATE YOUR PASSWORD"})]})}),s.jsx("div",{hidden:!!c.email,className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsx("img",{src:`${e.getStaticFileUrl("/images/horizontal-logo-blue.svg")}`,className:`${e.styles["img-login-rectangle"]}`}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"You cannot regenerate the password"})]})})]})})}})},Ye="Log in",Je="Forgot password",Ze="Reset password",Qe=o=>{const{isLogin:a,isForgotPassword:r,isResetPassword:l,isCreatePassword:i}=o,{defaultInfo:h,userLogin:p,googleRecaptchaId:w,handleCancelModelAssign:I,school:y,openModelAssign:x,setIsShowPassword:c,fnIsCheckLogin:f,isLoginGoogle:k,submitLogin:R,infoUser:P,googleClientId:E,isShowPassword:d,fnLoginSSO:S,extensionEmail:L,handleLoginWidthClever:T}=Ve();return n.useEffect(()=>{a&&(document.title=Ye),r&&(document.title=Je),l&&(document.title=Ze)},[a,r,l]),s.jsx("div",{className:`${e.styles.login} container-fluid font-family-lato`,children:s.jsxs(u.Row,{className:"h-100",children:[s.jsxs(u.Col,{lg:8,md:12,xs:12,className:"d-flex justify-content-center h-100 align-items-center p-3 flex-column",children:[!!w&&s.jsxs(H.GoogleReCaptchaProvider,{useRecaptchaNet:!0,reCaptchaKey:w,scriptProps:{async:!0,defer:!0,appendTo:"body"},children:[a&&s.jsx(be,{userLogin:p,defaultInfo:h,onCancelModelAssign:I,openModelAssign:x,school:y,fnIsCheckLogin:f,googleClientId:E,infoUser:P,isLoginGoogle:k,isShowPassword:d,setIsShowPassword:c,submitLogin:R,fnLoginSSO:S,extensionEmail:L,onLoginWidthClever:T}),r&&s.jsx(Te,{school:y})]}),l&&s.jsx(Ae,{}),i&&s.jsx(We,{}),s.jsx("a",{href:"/privacy-policy/",target:"blank",className:`${e.styles["privacy-policy"]}`,children:"Privacy Policy"})]}),s.jsx(u.Col,{className:"p-3 mh-100 d-flex justify-content-end",lg:4,md:12,xs:12,children:s.jsx("img",{src:`${e.getStaticFileUrl(window.innerWidth>992?"/images/img-login.png":"/images/img-login-tablet.png")}`,className:`${e.styles["img-login"]}`})})]})})};exports.default=Qe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("react"),u=require("reactstrap"),F=require("react-router-dom"),e=require("./index-Cmo6_CCl.js"),q=require("react-redux"),J=require("formik"),we=require("yup"),H=require("react-google-recaptcha-v3"),ie=require("@react-oauth/google"),M=require("./types-CTFcZUFS.js"),K=require("@azure/msal-browser"),ye=require("@amplitude/analytics-browser");function ce(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const r=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(n,l,r.get?r:{enumerable:!0,get:()=>o[l]})}}return n.default=o,Object.freeze(n)}const v=ce(we),B=ce(ye),Se={height:"40px",backgroundColor:"#f7f9fc",borderRadius:"4px",marginBottom:"5px",position:"relative"},xe={backgroundColor:"#ffffff",paddingRight:"50px"},Ne={fontSize:"20px",position:"absolute",right:"10px",color:"#316CD9"},je=o=>o.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(n,l)=>l.toUpperCase()),z=({isShowPassword:o,togglePasswordVisible:n,onChange:l,placeholder:r})=>s.jsxs("div",{className:"d-flex align-items-center w-100",style:Se,children:[s.jsx(u.Input,{className:"border password-input",style:xe,type:o?"text":"password",name:"password",onChange:l,placeholder:r||"Password",autocomplete:r?je(r):"password",required:!0}),s.jsx("i",{className:`far ${o?"fa-eye-slash":"fa-eye"} mx-2 cursor-pointer`,style:Ne,onClick:()=>n(),title:o?"Hide":"Show"})]}),Ee=v.object({email:v.string().email("Email is invalid").required("Email is required"),password:v.string().required("Password is required"),rememberMe:v.boolean()}),Ie=({onSuccess:o,onError:n})=>{const l=ie.useGoogleLogin({onSuccess:async r=>{try{const i=await fetch("https://www.googleapis.com/oauth2/v3/userinfo",{headers:{Authorization:`Bearer ${r.access_token}`}}).then(p=>p.json()),h={accessToken:r.access_token,googleId:i.sub,profileObj:{email:i.email,familyName:i.family_name,givenName:i.given_name,imageUrl:i.picture,name:i.name}};o(h)}catch(i){n(i)}},onError:r=>n(r)});return s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>l(),children:[s.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"24px",height:"24px",style:{marginRight:"8px"},children:[s.jsx("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"}),s.jsx("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"}),s.jsx("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"}),s.jsx("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"}),s.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]}),s.jsx("p",{children:"GOOGLE"})]})},be=({defaultInfo:o,userLogin:n,school:l,isShowPassword:r,setIsShowPassword:i,fnIsCheckLogin:h,googleClientId:p,fnLoginSSO:w,extensionEmail:E,onLoginWidthClever:y})=>{const x=()=>i(!r),c=q.useDispatch(),{executeRecaptcha:f}=H.useGoogleReCaptcha(),C=a.useCallback(async()=>{if(!f){console.log("execute recaptcha undefined");return}return await f("login")},[f]),T=a.useCallback(()=>{},[]),P=async d=>{try{await e.AccountSSOLogApi(d)}catch(S){console.error(S)}},I=async d=>{if(d?.accessToken){let{email:S,familyName:L,givenName:A,imageUrl:$,name:k}=d.profileObj,N=d.accessToken,R=d.googleId;const D=window.location.hostname.split(".marioforme.com")?.[0],G=S.split("@")?.[1],Z=E?.split(",")?.map(U=>U.trim())?.filter(U=>U).some(U=>G.includes(U));if(!G.includes(D)&&!Z){alert("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"),await P([`${G} is incorrect`]);return}const O={firstName:A,lastName:L,imageUrl:$,fullName:k,email:S,accessToken:N,googleId:R};c(e.setInforUserGoogle(O)),h(M.TypeLogin.Google,O,N,C)}};return s.jsx(a.Fragment,{children:s.jsx(J.Formik,{initialValues:o,validationSchema:Ee,onSubmit:async d=>{try{const S=await C();if(!S)return;d.captcha=S,d.loginType=M.LoginType.Default,n(d)}catch(S){console.error(S)}},children:d=>{const{handleChange:S,handleBlur:L,handleSubmit:A,values:$,touched:k,errors:N,setFieldValue:R}=d,W=k.email&&N.email,D=k.password&&N.password;return s.jsx("div",{className:`${e.styles["box-login"]} w-100`,children:s.jsx(u.Form,{className:`${e.styles["block-login"]}`,onSubmit:A,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsxs("div",{className:"d-flex align-items-center mb-4",children:[s.jsx("img",{hidden:!l?.schoolLogo,src:l?.schoolLogo,className:`${e.styles["school-icon"]} mr-3`}),s.jsx("p",{className:`${e.styles["school-name"]} mb-0`,children:l.schoolName})]}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"Welcome Back!"}),s.jsx("p",{className:`${e.styles["login-description"]} mb-5`,children:"Please enter your MARIO Education account details"}),s.jsxs(u.FormGroup,{className:`${e.styles["form-user-name"]}`,children:[s.jsx(u.Input,{type:"text",name:"email",placeholder:"Email",value:$.email,onChange:S,autocomplete:"email",onBlur:L("email"),required:!0}),W&&s.jsx(e.ErrorHandler,{text:N.email})]}),s.jsxs(u.FormGroup,{children:[s.jsx(z,{isShowPassword:r,togglePasswordVisible:x,onChange:G=>R("password",G.target.value)}),D&&s.jsx(e.ErrorHandler,{text:N.password})]}),s.jsx(u.FormGroup,{children:s.jsx(H.GoogleReCaptcha,{action:"login",onVerify:T})}),s.jsxs("div",{className:"d-flex justify-content-between",children:[s.jsxs("div",{className:"d-flex align-items-center",style:{gap:"8px"},children:[s.jsx("input",{type:"checkbox",checked:!$.isSessionUserBrowser,className:`${e.styles["checkbox-keep-login"]}`,onChange:()=>R("isSessionUserBrowser",!$.isSessionUserBrowser)}),s.jsx("p",{className:`${e.styles["label-keep-login"]} mb-0 ml-2`,children:"Keep me logged in"})]}),s.jsx(F.Link,{to:"/forgot-password",className:`${e.styles["link-to-login"]}`,children:"Forgot password?"})]}),s.jsx("button",{className:`${e.styles["btn-login"]} mt-5`,type:"submit",children:"LOG IN"}),s.jsx("p",{className:`${e.styles["option-text"]} my-3 text-center`,children:"OR"}),s.jsxs(u.Row,{className:"mb-4",children:[s.jsx(u.Col,{lg:6,md:6,xs:12,className:"pr-md-3",children:!!p&&s.jsx(ie.GoogleOAuthProvider,{clientId:p,children:s.jsx(Ie,{onSuccess:I,onError:()=>console.log("Google login failed")})})}),s.jsx(u.Col,{lg:6,md:6,xs:12,className:`${e.styles["btn-login-sso"]} pl-md-2`,hidden:!l?.schoolId,children:s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>w(C),children:[s.jsx("img",{src:"images/microsoft-logo.png"}),s.jsx("p",{children:"MICROSOFT"})]})})]}),s.jsx("div",{className:`${e.styles["btn-login-sso"]}`,children:s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>window.open("https://launchpad.classlink.com/login"),children:[s.jsx("img",{src:"images/class-link-icon.png"}),s.jsx("p",{children:"SIGN IN WITH CLASSLINK"})]})}),s.jsx("div",{className:`${e.styles["btn-login-sso"]} mt-4`,children:s.jsxs("div",{className:e.styles["btn-login-with-sso"],onClick:()=>y(),children:[s.jsx("img",{src:"images/clever-icon.png"}),s.jsx("p",{children:"SIGN IN WITH CLEVER"})]})})]})})})}})})},Ce={email:"",captcha:""},ke="/",ae="/login",Le="Log in",de=()=>{const o=new URLSearchParams(F.useLocation().search),n=o.get("token"),l=o.get("key")??"",r=q.useDispatch(),i=F.useNavigate(),[h,p]=a.useState(!1),w=a.useCallback(()=>{p(!h)},[h]),[E,y]=a.useState(!1),[x,c]=a.useState(!1),[f,C]=a.useState({token:"",password:"",reEnterPassword:"",email:"",userId:""}),[T,P]=a.useState(!0),{executeRecaptcha:I}=H.useGoogleReCaptcha();a.useEffect(()=>{document.title=Le,e.getAccessToken()&&i(ke)},[]);const d=a.useCallback(async k=>{r(e.setLoading(!0));try{await e.forgotPassword(k),i(ae),r(e.setAlert({type:"success",message:"A mail to reset password was sent"}))}catch(N){r(e.setAlert({type:"danger",message:N.response?.data?.title||N.message||"Error occured"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}r(e.setLoading(!1))},[]),S=a.useCallback(async(k,N)=>{r(e.setLoading(!0));try{const R=await e.checkResetToken(k,N);R.data?C({...f,token:k,email:R.data}):P(!1)}catch{P(!1)}r(e.setLoading(!1))},[]),L=a.useCallback(async k=>{r(e.setLoading(!0));try{await e.resetPassword({...k,key:l}),i(ae),r(e.setAlert({type:"success",message:"Reset password sucessfully"}))}catch(N){r(e.setAlert({type:"danger",message:N.response?.data?.title||N.message||"Error occured"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}r(e.setLoading(!1))},[]),A=a.useCallback(async()=>{if(!I){console.log("execute recaptcha undefined");return}return await I("forgetPass")},[I]),$=a.useCallback(()=>{},[]);return a.useEffect(()=>{S(n,l)},[]),{defaultInfo:Ce,forgotPasswordRequest:d,checkResetTokenRequest:S,validLink:T,resetPasswordRequest:L,openLogin:h,toggle:w,isShowNewPassword:E,setIsShowNewPassword:y,isShowReTypePassword:x,setIsShowReTypePassword:c,clickHandler:A,handleVerify:$,initialValues:f}},ve={email:"",captcha:""},Pe=v.object({email:v.string().email("Email is invalid").required("Email is required")}),Te=({school:o})=>{const{forgotPasswordRequest:n,clickHandler:l,handleVerify:r}=de();return s.jsx(J.Formik,{initialValues:ve,enableReinitialize:!0,validationSchema:Pe,onSubmit:async i=>{const h=await l();h&&(i.captcha=h,n(i))},children:i=>{const{handleChange:h,handleSubmit:p,values:w,touched:E,errors:y}=i;return s.jsx("div",{className:`${e.styles["box-login"]}`,children:s.jsx("div",{className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsxs("div",{className:"d-flex align-items-center mb-4",children:[s.jsx("img",{src:o.schoolLogo,className:`${e.styles["school-icon"]} mr-3`}),s.jsx("p",{className:`${e.styles["school-name"]} mb-0`,children:o.schoolName})]}),s.jsx("p",{className:`${e.styles["title-login"]} `,children:"Forgot password"}),s.jsx("p",{className:`${e.styles["recover-account"]} mb-5`,children:"Enter email to recover your account"}),s.jsxs("div",{className:"w-100",children:[s.jsx(u.Input,{type:"text",name:"email",id:"email",placeholder:"Input email",onChange:h,value:w.email}),E.email&&y.email&&s.jsx(e.ErrorHandler,{text:y.email})]}),s.jsx(F.Link,{to:"/login",className:`${e.styles["link-to-login"]} mt-2`,children:"Return to login"}),s.jsx(H.GoogleReCaptcha,{action:"forgetPass",onVerify:r}),s.jsx(u.Col,{className:"p-0",children:s.jsx("button",{className:`${e.styles["btn-login"]} mt-5`,onClick:()=>p(),children:"Continue"})})]})})})}})},Re=v.object({password:v.string().required("New password is required"),reEnterPassword:v.string().required("Please re-enter new password").test("matching","Passwords do not match",function(){return this.parent.password===this.parent.reEnterPassword})}),Ae=()=>{const{validLink:o,resetPasswordRequest:n,isShowNewPassword:l,setIsShowNewPassword:r,isShowReTypePassword:i,setIsShowReTypePassword:h,initialValues:p}=de();return s.jsx(J.Formik,{initialValues:p,enableReinitialize:!0,validationSchema:Re,onSubmit:w=>{n(w)},children:w=>{const{setFieldValue:E,handleSubmit:y,touched:x,errors:c,values:f}=w;return s.jsx(u.Row,{className:`${e.styles["box-login"]}`,children:s.jsx(u.Col,{className:"p-0",children:s.jsx("div",{className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsx("img",{src:`${e.getStaticFileUrl("/images/horizontal-logo-blue.svg")}`,className:`${e.styles["img-login-rectangle"]}`}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"Reset Password"}),s.jsx("div",{className:"w-100",children:o?s.jsxs(a.Fragment,{children:[s.jsx(u.FormGroup,{className:`${e.styles["form-user-name"]}`,children:s.jsx(u.Input,{disabled:!0,type:"text",name:"email",placeholder:"Email",value:f.email,autocomplete:"email",required:!0,className:`${e.styles.input}`})}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{isShowPassword:l,togglePasswordVisible:()=>r(!l),onChange:C=>E("password",C.target.value)}),x.password&&c.password&&s.jsx(e.ErrorHandler,{text:c.password})]}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{placeholder:"Confirm Password",isShowPassword:i,togglePasswordVisible:()=>h(!i),onChange:C=>E("reEnterPassword",C.target.value)}),x.reEnterPassword&&c.reEnterPassword&&s.jsx(e.ErrorHandler,{text:c.reEnterPassword})]})]}):s.jsxs(a.Fragment,{children:[s.jsx("p",{className:`${e.styles["recover-account"]} mb-5`,children:"Invalid reset password link"}),s.jsx("p",{className:"w-100",children:"It may have been accessed before or expired or you have just tried to reset another account's password"})]})}),o&&s.jsx(u.Col,{className:"p-0",children:s.jsx("button",{className:`${e.styles["btn-login"]} ${e.styles["btn-rounder"]} mt-4`,onClick:()=>y(),children:"SET A NEW PASSWORD"})})]})})})})}})},me=`${e.BASE_URL}/api/school`,$e=()=>e.api.get(`${me}/settings`),Oe=()=>e.api.get(`${me}/info`),_e={auth:{clientId:e.isLocalhost?"a27f8ac9-e039-4bbd-a9e1-3096e52a77bb":"90c6897c-f17b-475e-a7a8-9a19651e0060",authority:"https://login.microsoftonline.com/common",redirectUri:"https://sso.marioforme.com/microsoft-login.html"},cache:{cacheLocation:"sessionStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(o,n,l)=>{if(!l)switch(o){case K.LogLevel.Error:console.error(n);return;case K.LogLevel.Info:console.info(n);return;case K.LogLevel.Verbose:console.debug(n);return;case K.LogLevel.Warning:console.warn(n);return;default:return}}}}},Ge={email:"",password:"",captcha:"",rememberMe:!1,isSessionUserBrowser:!!sessionStorage.getItem(e.IS_USER_SESSION_BROWSER)},Ue="/home",ne="/home",Me="/admin/home",qe="/parent",Fe="/admin/schools",He="/list-student",De="Log in",Ve=()=>{const o=q.useDispatch(),n=F.useNavigate(),[l,r]=a.useState(!1),i=q.useSelector(t=>t.common.isLoginGoogle),[h,p]=a.useState(""),[w,E]=a.useState(""),[y,x]=a.useState(""),c=q.useSelector(t=>t.common.inforUserGoogle),f=new URLSearchParams(location.search),C=f.get("type")==="classlink",T=f.get("token"),P=f.get("isAdminUser"),[I]=a.useState(!1),[d,S]=a.useState({schoolName:"",schoolLogo:"",schoolId:0}),[L,A]=a.useState(null),$=a.useCallback(()=>{r(!l)},[l]),[k,N]=a.useState(!1);a.useEffect(()=>{document.title=De;const t=e.getCookieValue("auth-token");if(t){const g=window.location.hostname;if(localStorage.setItem(e.ACCESS_TOKEN,t),document.cookie=`auth-token=;domain=${g.includes("localhost")?g:".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=/",P)return n("/admin/home")}e.getAccessToken()&&n("/"),U()},[P]);const R=()=>{localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN),localStorage.removeItem("USER_EMAIL")};a.useEffect(()=>{C&&T!=""&&D()},[]);const W=()=>{if(e.isLocalhost){const t="https://clever.com/oauth/instant-login?client_id=c3da6c669d239c70d48e&district_id=66132a6f222bda41cc8abe5d";window.location.href=t}else{const t=`https://clever.com/oauth/authorize?response_type=code&redirect_uri=${encodeURIComponent("https://classlink.marioforme.com/api/clever/clever-login")}&client_id=c3da6c669d239c70d48e`;window.location.href=t}},D=async()=>{o(e.setLoading(!0));try{const t={tokenClassLink:T},m=await e.apiInforUserClassLink(t),{email:g,token:j}=m.data;await O({email:g,rememberMe:!1,password:"default",accessToken:j})}catch(t){o(e.setAlert({type:"danger",message:t.response?.data?.title||t.message}))}o(e.setLoading(!1))},G=window.location.host.includes("-district"),Z=a.useCallback(async()=>{o(e.setLoading(!0));try{const t=await Oe(),m=t.data.schoolLogo??"";t.data&&S({schoolName:t.data.schoolName,schoolLogo:m?e.getFileUrl(m):e.getStaticFileUrl("/images/logo_header_blue.png"),schoolId:t.data.schoolId})}catch(t){o(e.setAlert({type:"danger",message:t.response?.data?.title||t.message}))}o(e.setLoading(!1))},[]),O=a.useCallback(async t=>{o(e.setLoading(!0));try{const m=t?.isSessionUserBrowser??!1,g=await e.logIn({...t,email:t?.email?.trim(),password:t?.password?.trim()}),{token:j,id:_,firstName:Y,lastName:V,roles:b,email:Q,profileImageFileName:pe,isLoginFirst:fe}=g.data;if(m?(sessionStorage.setItem(e.ACCESS_TOKEN,j),sessionStorage.setItem(e.IS_USER_SESSION_BROWSER,m)):(sessionStorage.removeItem(e.IS_USER_SESSION_BROWSER),localStorage.setItem(e.ACCESS_TOKEN,j)),localStorage.removeItem(e.NOTIFICATION_ALERT_KEY),o(e.setUser({id:_,firstName:Y,lastName:V,roles:b,email:Q,profileImageFileName:pe})),!localStorage.getItem("ROLES")&&b.includes("Admin")&&localStorage.setItem("ROLES","Admin"),t?.email&&!b.includes("Admin")){B.init(e.isLocalhost?e.INIT_AMPLITUDE_KEY_STAGE:e.INIT_AMPLITUDE_KEY_PROD,t.email,{defaultTracking:!1});const X=window.location.hostname,oe=new B.Identify;oe.set("domain",X),B.identify(oe),B.track("general: session start",{user_id:t.email,domain:X,roles:t?.roles?.toString()}),localStorage.setItem("USER_EMAIL",t.email),fe&&B.track("general: first login",{user_id:t.email,domain:X,roles:t?.roles?.toString()})}G?n(Fe):b.includes("Admin")?n(Me):b.includes("Teacher")||b.includes("Assistant")||b.includes("Counselor")||b.includes("SecondaryTeacher")?n(Ue):b.includes("Student")?n(ne):b.includes("Parent")?n(qe):b.includes("EduTeacher")&&n(He)}catch(m){o(e.setAlert({type:"danger",message:m.response?.data?.title||m.message||"Login failed"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}o(e.setLoading(!1))},[]),U=async()=>{try{const t=await e.getGoogleClientId();p(t.data.googleClientId),E(t.data.googleCaptchaId),x(t.data.extensionEmail)}catch(t){o(e.setAlert({type:"danger",message:t.response?.data?.title||t.message||"Login failed"}))}},ee=a.useCallback(async(t,m,g,j)=>{o(e.setLoading(!0));try{if((await e.checkUserGoogle(t,m)).data){const V={email:m.email,isLoginGoogle:!0,rememberMe:!1,password:"default",accessToken:g,captcha:"",loginType:M.LoginType.Google};if(j!=null){const b=await j();V.captcha=b}await O(V),o(e.setIsLoginGoogle(!1))}else if((await e.registerUserStudent(m))?.data){const b={email:m.email,isLoginGoogle:!0,rememberMe:!1,password:"default",accessToken:g,captcha:"",loginType:M.LoginType.Google};if(j!=null){const Q=await j();b.captcha=Q}await O(b)}}catch(_){o(e.setAlert({type:"danger",message:_.response?.data?.title||_.message||"Login failed"}))}o(e.setLoading(!1))},[]),ge=async(t,m)=>{o(e.setLoading(!0));try{const g={firstName:c.firstName,lastName:c.lastName,imageUrl:c.imageUrl,fullName:c.fullName,email:c.email,accessToken:c.accessToken,teacherId:t};if((await e.registerUserStudent(g)).data){const _=await m(),Y={email:c.email,captcha:_,isLoginGoogle:!0,rememberMe:!1,password:"default",accessToken:c.accessToken,loginType:M.LoginType.Google};o(e.setIsLoginGoogle(!1)),await O(Y),n(ne)}}catch(g){o(e.setAlert({type:"danger",message:g.response?.data?.title||g.message||"Login failed"}))}o(e.setIsLoginGoogle(!1)),o(e.setLoading(!1))},ue=async()=>{try{const t=await $e();o(e.setSandboxMode(t.data.isSandboxMode))}catch(t){console.error(t)}},se=async t=>{L.handleRedirectPromise().then(async m=>{if(d?.schoolId)if(m){let g=m.account;await te(g,t)}else{const g=L.getAllAccounts();if(g.length===0){const j=e.isLocalhost?"https://brightsoft.marioforme.com":"https://sso.marioforme.com";window.location.href=(window.location.hostname==="localhost"?"https://localhost:3000":j)+`/microsoft-login.html?redirect-uri=${window.location.href}&schoolId=${d.schoolId}`}else{let j=g[0];await te(j,t)}}}).catch(m=>{console.error(m)})},te=async(t,m)=>{let g=t.name,j={firstName:g.split(" ").slice(0,-1).join(" "),lastName:g.split(" ").slice(-1).join(" "),fullName:g,imageUrl:"",email:t.username,accessToken:t.idTokenClaims.aio,googleId:t.tenantId};o(e.setInforUserGoogle(j)),await ee(M.TypeLogin.MicrosoftSSO,j,t.idTokenClaims.aio,m)},he=async()=>{const t=new K.PublicClientApplication(_e);await t.initialize(),A(t)};return a.useEffect(()=>{let t=window.location.href;L&&t.includes("code")&&t.includes("client_info")&&se()},[JSON.stringify(L)]),a.useEffect(()=>{ue(),he(),Z()},[]),{defaultInfo:Ge,userLogin:O,openLogin:l,toggle:$,isShowPassword:k,setIsShowPassword:N,fnIsCheckLogin:ee,isLoginGoogle:i,infoUser:c,submitLogin:ge,googleClientId:h,googleRecaptchaId:w,handleCancelModelAssign:R,openModelAssign:I,fnLoginSSO:se,school:d,extensionEmail:y,handleLoginWidthClever:W}},re="/",Be="/login",le="Log in",Ke=()=>{const o=q.useDispatch(),n=F.useNavigate(),l=location.search,i=new URLSearchParams(l).get("userId"),[h,p]=a.useState(!1),[w,E]=a.useState(!1),[y,x]=a.useState({password:"",reEnterPassword:"",email:"",userId:i??"",token:""}),{executeRecaptcha:c}=H.useGoogleReCaptcha(),f=a.useCallback(async I=>{o(e.setLoading(!0));try{const d=await e.getUserNewPassword(I);x({...y,email:d.data})}catch(d){o(e.setAlert({type:"danger",message:d.message}))}o(e.setLoading(!1))},[]),C=a.useCallback(async I=>{o(e.setLoading(!0));try{await e.createPassword(I),n(Be),o(e.setAlert({type:"success",message:"Create password sucessfully"}))}catch(d){o(e.setAlert({type:"danger",message:d.response?.data?.title||d.message||"Error occured"})),localStorage.removeItem(e.ACCESS_TOKEN),sessionStorage.removeItem(e.ACCESS_TOKEN)}o(e.setLoading(!1))},[]),T=a.useCallback(async()=>{if(!c){console.log("execute recaptcha undefined");return}return await c("forgetPass")},[c]),P=a.useCallback(()=>{},[]);return a.useEffect(()=>{document.title=le,e.getAccessToken()&&n(re),i&&f(i)},[i]),a.useEffect(()=>{document.title=le,e.getAccessToken()&&n(re)},[]),{createPasswordRequest:C,isShowNewPassword:h,setIsShowNewPassword:p,isShowReTypePassword:w,setIsShowReTypePassword:E,clickHandler:T,handleVerify:P,initialValues:y}},ze=v.object({password:v.string().required("Password is required"),reEnterPassword:v.string().required("Please re-enter Password").test("matching","Passwords do not match",function(){return this.parent.password===this.parent.reEnterPassword})}),We=()=>{const{createPasswordRequest:o,isShowNewPassword:n,setIsShowNewPassword:l,isShowReTypePassword:r,setIsShowReTypePassword:i,initialValues:h}=Ke();return s.jsx(J.Formik,{initialValues:h,enableReinitialize:!0,validationSchema:ze,onSubmit:p=>{o(p)},children:p=>{const{setFieldValue:w,handleSubmit:E,touched:y,errors:x,values:c}=p;return s.jsx(u.Row,{className:`${e.styles["box-login"]}`,children:s.jsxs(u.Col,{className:"p-0",children:[s.jsx("div",{hidden:!c.email,className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsx("img",{src:`${e.getStaticFileUrl("/images/horizontal-logo-blue.svg")}`,className:`${e.styles["img-login-rectangle"]}`}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"Create Your Password"}),s.jsx("div",{className:"w-100",children:s.jsxs(a.Fragment,{children:[s.jsx(u.FormGroup,{className:`${e.styles["form-user-name"]}`,children:s.jsx(u.Input,{disabled:!0,type:"text",name:"email",placeholder:"Email",value:c.email,autocomplete:"email",required:!0,className:`${e.styles.input}`})}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{isShowPassword:n,togglePasswordVisible:()=>l(!n),onChange:f=>w("password",f.target.value)}),y.password&&x.password&&s.jsx(e.ErrorHandler,{text:x.password})]}),s.jsxs("div",{className:`${e.styles["form-user-name"]}`,children:[s.jsx(z,{placeholder:"Confirm Password",isShowPassword:r,togglePasswordVisible:()=>i(!r),onChange:f=>w("reEnterPassword",f.target.value)}),y.reEnterPassword&&x.reEnterPassword&&s.jsx(e.ErrorHandler,{text:x.reEnterPassword})]})]})}),s.jsx("button",{className:`${e.styles["btn-login"]} ${e.styles["btn-rounder"]} mt-4`,onClick:()=>E(),children:"CREATE YOUR PASSWORD"})]})}),s.jsx("div",{hidden:!!c.email,className:`${e.styles["block-login"]}`,children:s.jsxs("div",{className:`${e.styles["block-form"]}`,children:[s.jsx("img",{src:`${e.getStaticFileUrl("/images/horizontal-logo-blue.svg")}`,className:`${e.styles["img-login-rectangle"]}`}),s.jsx("p",{className:`${e.styles["title-login"]}`,children:"You cannot regenerate the password"})]})})]})})}})},Ye="Log in",Je="Forgot password",Ze="Reset password",Qe=o=>{const{isLogin:n,isForgotPassword:l,isResetPassword:r,isCreatePassword:i}=o,{defaultInfo:h,userLogin:p,googleRecaptchaId:w,handleCancelModelAssign:E,school:y,openModelAssign:x,setIsShowPassword:c,fnIsCheckLogin:f,isLoginGoogle:C,submitLogin:T,infoUser:P,googleClientId:I,isShowPassword:d,fnLoginSSO:S,extensionEmail:L,handleLoginWidthClever:A}=Ve();return a.useEffect(()=>{n&&(document.title=Ye),l&&(document.title=Je),r&&(document.title=Ze)},[n,l,r]),s.jsx("div",{className:`${e.styles.login} container-fluid font-family-lato`,children:s.jsxs(u.Row,{className:"h-100",children:[s.jsxs(u.Col,{lg:8,md:12,xs:12,className:"d-flex justify-content-center h-100 align-items-center p-3 flex-column",children:[!!w&&s.jsxs(H.GoogleReCaptchaProvider,{useRecaptchaNet:!0,reCaptchaKey:w,scriptProps:{async:!0,defer:!0,appendTo:"body"},children:[n&&s.jsx(be,{userLogin:p,defaultInfo:h,onCancelModelAssign:E,openModelAssign:x,school:y,fnIsCheckLogin:f,googleClientId:I,infoUser:P,isLoginGoogle:C,isShowPassword:d,setIsShowPassword:c,submitLogin:T,fnLoginSSO:S,extensionEmail:L,onLoginWidthClever:A}),l&&s.jsx(Te,{school:y})]}),r&&s.jsx(Ae,{}),i&&s.jsx(We,{}),s.jsx("a",{href:"/privacy-policy/",target:"blank",className:`${e.styles["privacy-policy"]}`,children:"Privacy Policy"})]}),s.jsx(u.Col,{className:"p-3 mh-100 d-flex justify-content-end",lg:4,md:12,xs:12,children:s.jsx("img",{src:`${e.getStaticFileUrl(window.innerWidth>992?"/images/img-login.png":"/images/img-login-tablet.png")}`,className:`${e.styles["img-login"]}`})})]})})};exports.default=Qe;