mario-core 2.0.16-stage → 2.0.17-stage

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 (169) hide show
  1. package/dist/{Dashboard-BsDeySam.js → Dashboard-A7HsX0Fj.js} +1 -1
  2. package/dist/{Dashboard-CZW-qGyN.mjs → Dashboard-CSt20Z3O.mjs} +1 -1
  3. package/dist/{EmailTemplateDetail-BQPspomy.mjs → EmailTemplateDetail-CEvbXoPQ.mjs} +2 -2
  4. package/dist/{EmailTemplateDetail-CNh5de_u.js → EmailTemplateDetail-CK47dc1M.js} +1 -1
  5. package/dist/{EmailTemplateList-BBrwv30e.mjs → EmailTemplateList-5Xl-eMr-.mjs} +2 -2
  6. package/dist/{EmailTemplateList-9G-A6FZq.js → EmailTemplateList-BcI45rPX.js} +1 -1
  7. package/dist/{GalleryList-B2kxc3Uv.js → GalleryList-CbsfUVEL.js} +1 -1
  8. package/dist/{GalleryList-BJ0QGyWF.mjs → GalleryList-DJDjtfMp.mjs} +1 -1
  9. package/dist/{Login-BPXlNvpX.mjs → Login-BrHWkoEL.mjs} +1 -1
  10. package/dist/{Login-CGa7aER1.js → Login-DlD95dbw.js} +1 -1
  11. package/dist/{NotificationList-Bv_7KnH-.js → NotificationList-B_SGjApI.js} +1 -1
  12. package/dist/{NotificationList-85ZNspu5.mjs → NotificationList-S5OlFuaT.mjs} +2 -2
  13. package/dist/{SkillList-B8uw4QZF.mjs → SkillList-B5Ao1l_E.mjs} +1 -1
  14. package/dist/{SkillList-CJyAJrM9.js → SkillList-BHVtVj0Z.js} +1 -1
  15. package/dist/{TeacherSelector-CKdM3Z8y.js → TeacherSelector-DR3WLipJ.js} +1 -1
  16. package/dist/{TeacherSelector-BKSay316.mjs → TeacherSelector-DmslXGuT.mjs} +1 -1
  17. package/dist/TheContent-BuJO0KEN.js +1 -0
  18. package/dist/TheContent-Df8qj2u6.mjs +38 -0
  19. package/dist/{UserContainer-B5OwFSHh.js → UserContainer-BMLRBaGZ.js} +1 -1
  20. package/dist/{UserContainer-CilrSMeD.mjs → UserContainer-DZ0euPE1.mjs} +5 -5
  21. package/dist/{UserDetail-CJtccXfo.mjs → UserDetail-CQtfmCNN.mjs} +3 -3
  22. package/dist/{UserDetail-C_pmgUnE.js → UserDetail-Dxu00ZwV.js} +1 -1
  23. package/dist/{UserList-7gE8aU_I.js → UserList-7JsTnaCD.js} +1 -1
  24. package/dist/{UserList-B7sk8bc6.mjs → UserList-aU6phngY.mjs} +3 -3
  25. package/dist/{constants-BDS_Ev5l.mjs → constants-BXyN3IQ9.mjs} +1 -1
  26. package/dist/{constants-CNvNsffe.js → constants-ByTzisqO.js} +1 -1
  27. package/dist/index-MYE51KWp.js +15 -0
  28. package/dist/{index-S9mI_rxc.mjs → index-be-uwmuG.mjs} +10200 -10180
  29. package/dist/{index.esm-BtSbIjvM.mjs → index.esm-B-XjHK8t.mjs} +1 -1
  30. package/dist/{index.esm-B5Zde_ik.js → index.esm-C48n_7AC.js} +1 -1
  31. package/dist/{mailCategoryService-Bb3FPk-a.mjs → mailCategoryService-BlNnMeYL.mjs} +1 -1
  32. package/dist/{mailCategoryService-B19vYJRa.js → mailCategoryService-BzyReYht.js} +1 -1
  33. package/package.json +1 -1
  34. package/dist/Dashboard-C8i4BvyG.js +0 -1
  35. package/dist/Dashboard-CEJHkjrj.mjs +0 -206
  36. package/dist/Dashboard-CRRvwGed.js +0 -1
  37. package/dist/Dashboard-C_ztxjUK.mjs +0 -206
  38. package/dist/Dashboard-CaX-62QW.js +0 -1
  39. package/dist/Dashboard-DyvEA6z-.mjs +0 -206
  40. package/dist/Dashboard-HzY9FZ7Z.js +0 -1
  41. package/dist/Dashboard-ctVUb592.mjs +0 -206
  42. package/dist/EmailTemplateDetail-BX_tfwoM.mjs +0 -417
  43. package/dist/EmailTemplateDetail-CITCgbC8.mjs +0 -417
  44. package/dist/EmailTemplateDetail-CdAQlzKa.mjs +0 -417
  45. package/dist/EmailTemplateDetail-CyTeZ6B4.js +0 -1
  46. package/dist/EmailTemplateDetail-D-jgcfDM.js +0 -1
  47. package/dist/EmailTemplateDetail-DcwJEPvb.js +0 -1
  48. package/dist/EmailTemplateDetail-dxSRgDcj.mjs +0 -417
  49. package/dist/EmailTemplateDetail-mdYeUDJg.js +0 -1
  50. package/dist/EmailTemplateList-BUL8h6T2.mjs +0 -168
  51. package/dist/EmailTemplateList-BV-QOv5K.mjs +0 -168
  52. package/dist/EmailTemplateList-CuYu-78c.js +0 -1
  53. package/dist/EmailTemplateList-Cw69biiR.mjs +0 -168
  54. package/dist/EmailTemplateList-DATMwmRX.mjs +0 -168
  55. package/dist/EmailTemplateList-DPH9n1zg.js +0 -1
  56. package/dist/EmailTemplateList-Dgf0hucr.js +0 -1
  57. package/dist/EmailTemplateList-DqpO5NbB.js +0 -1
  58. package/dist/GalleryList-BM67p8qw.mjs +0 -329
  59. package/dist/GalleryList-BRIM0Ij_.mjs +0 -329
  60. package/dist/GalleryList-BU0as1ZP.mjs +0 -329
  61. package/dist/GalleryList-BYwvWx1S.js +0 -1
  62. package/dist/GalleryList-C2kwrrbY.js +0 -1
  63. package/dist/GalleryList-C46NhLPp.js +0 -1
  64. package/dist/GalleryList-D2_BCJq6.js +0 -1
  65. package/dist/GalleryList-JJbcEbTi.mjs +0 -329
  66. package/dist/Login-BWsVc8Np.mjs +0 -1384
  67. package/dist/Login-BYWZjmhv.mjs +0 -1384
  68. package/dist/Login-C1-QzAuV.mjs +0 -1384
  69. package/dist/Login-CUcmbeia.js +0 -1
  70. package/dist/Login-CXt0_tBl.mjs +0 -1387
  71. package/dist/Login-SxZya_gO.js +0 -1
  72. package/dist/Login-erVjidLp.js +0 -1
  73. package/dist/Login-fyvhErZA.js +0 -1
  74. package/dist/NotificationList-BDtxAveg.js +0 -2
  75. package/dist/NotificationList-BFTZrMUI.mjs +0 -3878
  76. package/dist/NotificationList-BmsuB956.js +0 -2
  77. package/dist/NotificationList-D7Emce8u.mjs +0 -3878
  78. package/dist/NotificationList-DqqIOC4p.js +0 -2
  79. package/dist/NotificationList-RXsROL30.mjs +0 -3878
  80. package/dist/NotificationList-j6FB8Ea2.js +0 -2
  81. package/dist/NotificationList-qFV94D7S.mjs +0 -3878
  82. package/dist/SkillList-BhVXby3M.mjs +0 -386
  83. package/dist/SkillList-Cjt8Kney.mjs +0 -386
  84. package/dist/SkillList-Cs_lxx12.mjs +0 -386
  85. package/dist/SkillList-DF--jHTh.mjs +0 -386
  86. package/dist/SkillList-D_tQAQqL.js +0 -1
  87. package/dist/SkillList-DqlhMpSA.js +0 -1
  88. package/dist/SkillList-RwckcULz.js +0 -1
  89. package/dist/SkillList-WqwHRR6L.js +0 -1
  90. package/dist/TeacherSelector-C52rXj2q.mjs +0 -30
  91. package/dist/TeacherSelector-CAo3E6h-.mjs +0 -30
  92. package/dist/TeacherSelector-CeCJEF4W.js +0 -1
  93. package/dist/TeacherSelector-DXG3itVQ.js +0 -1
  94. package/dist/TeacherSelector-DXv_vBJI.js +0 -1
  95. package/dist/TeacherSelector-DgfugjyF.js +0 -1
  96. package/dist/TeacherSelector-DpcBvLY-.mjs +0 -30
  97. package/dist/TeacherSelector-Xd8QnKWa.mjs +0 -30
  98. package/dist/TheContent-BQNAOyQ1.js +0 -1
  99. package/dist/TheContent-BcPcCqnd.mjs +0 -28
  100. package/dist/TheContent-C7s0FxEV.js +0 -1
  101. package/dist/TheContent-CDVWxnOm.js +0 -1
  102. package/dist/TheContent-CtCoUbS9.js +0 -1
  103. package/dist/TheContent-CyIFLtrd.mjs +0 -28
  104. package/dist/TheContent-DlLYa4WT.js +0 -1
  105. package/dist/TheContent-kfDEaXOp.mjs +0 -28
  106. package/dist/TheContent-mTUR10lr.mjs +0 -28
  107. package/dist/TheContent-q6q9KswZ.mjs +0 -28
  108. package/dist/UserContainer-BD0grJiW.js +0 -5
  109. package/dist/UserContainer-BxDgQxlT.mjs +0 -2771
  110. package/dist/UserContainer-CCerxkEw.mjs +0 -2771
  111. package/dist/UserContainer-CsxfRZ2W.js +0 -5
  112. package/dist/UserContainer-DQoP15se.mjs +0 -2771
  113. package/dist/UserContainer-DbdoSq-Q.js +0 -5
  114. package/dist/UserContainer-DuoEITq2.js +0 -5
  115. package/dist/UserContainer-hWvp6IhQ.mjs +0 -2771
  116. package/dist/UserDetail-Brs13Wua.js +0 -1
  117. package/dist/UserDetail-CpPTUVCj.js +0 -1
  118. package/dist/UserDetail-Dp4Oq_j9.mjs +0 -902
  119. package/dist/UserDetail-DxGAQjfn.js +0 -1
  120. package/dist/UserDetail-GaRReB9G.mjs +0 -902
  121. package/dist/UserDetail-MHs6uPbO.mjs +0 -902
  122. package/dist/UserDetail-XHKLiGNl.mjs +0 -902
  123. package/dist/UserDetail-qXX-264Q.js +0 -1
  124. package/dist/UserList-B_kL52Yt.js +0 -5
  125. package/dist/UserList-CNMbjvWP.mjs +0 -1162
  126. package/dist/UserList-CRwZa5DB.js +0 -5
  127. package/dist/UserList-CftAVe0u.mjs +0 -1162
  128. package/dist/UserList-CkOGJbgn.mjs +0 -1162
  129. package/dist/UserList-CrnzZCR6.mjs +0 -1162
  130. package/dist/UserList-D4V-QZm0.js +0 -5
  131. package/dist/UserList-DGX1gVn-.js +0 -5
  132. package/dist/constants-C4pJSK8g.mjs +0 -320
  133. package/dist/constants-CGewtxeZ.mjs +0 -320
  134. package/dist/constants-Clwj65ie.mjs +0 -320
  135. package/dist/constants-Dbpki_CG.js +0 -1
  136. package/dist/constants-Dk81SvKq.js +0 -1
  137. package/dist/constants-Dp8QZ8kV.js +0 -1
  138. package/dist/constants-ra-9n6_H.mjs +0 -320
  139. package/dist/constants-t9grLzgU.js +0 -1
  140. package/dist/containers/User/components/DeleteBulkModel copy.d.ts +0 -4
  141. package/dist/index-B4U_4-fu.js +0 -15
  142. package/dist/index-BTZpY1uf.mjs +0 -17606
  143. package/dist/index-BlgOYHBz.js +0 -15
  144. package/dist/index-CFvswiRi.mjs +0 -17591
  145. package/dist/index-Cmo6_CCl.js +0 -15
  146. package/dist/index-D-Z2VEoE.js +0 -15
  147. package/dist/index-DSGOm1zi.js +0 -15
  148. package/dist/index-DvGA0ecI.mjs +0 -17608
  149. package/dist/index-mofrQOyf.mjs +0 -17608
  150. package/dist/index.css +0 -1240
  151. package/dist/index.esm-B63qcj54.js +0 -1
  152. package/dist/index.esm-CWv2HCrn.mjs +0 -19
  153. package/dist/index.esm-CryF_PoG.js +0 -1
  154. package/dist/index.esm-D1KTN__I.js +0 -1
  155. package/dist/index.esm-D6Zacg53.mjs +0 -19
  156. package/dist/index.esm-DMTAvOCa.js +0 -1
  157. package/dist/index.esm-fD-khqqa.mjs +0 -19
  158. package/dist/index.esm-l7AIvAYG.mjs +0 -19
  159. package/dist/index.js.map +0 -1
  160. package/dist/index.modern.js.map +0 -1
  161. package/dist/index.test.d.ts +0 -1
  162. package/dist/mailCategoryService-Bdq58J2L.js +0 -1
  163. package/dist/mailCategoryService-By7wn1rV.mjs +0 -11
  164. package/dist/mailCategoryService-CEgGm2FV.js +0 -1
  165. package/dist/mailCategoryService-C_ZJZs-z.js +0 -1
  166. package/dist/mailCategoryService-Dis1n9kR.mjs +0 -11
  167. package/dist/mailCategoryService-M_l9miAs.mjs +0 -11
  168. package/dist/mailCategoryService-T_3sXv5B.mjs +0 -11
  169. package/dist/mailCategoryService-_WxeTzNN.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),p=require("react-redux"),n=require("reactstrap"),s=require("./index-DSGOm1zi.js"),g=require("react-router-dom"),j=()=>e.jsxs("div",{className:`${s.styles["content-quote"]}`,children:[e.jsxs("div",{className:`${s.styles["title-quote"]} d-block`,children:[e.jsx("p",{children:"Powerful"}),e.jsx("p",{children:"Personalized"}),e.jsx("p",{children:"Learning"})]}),e.jsxs("div",{className:`${s.styles["descriptions-quote"]} d-block`,children:[e.jsx("p",{children:"Focus on what matters most to you and"}),e.jsx("p",{children:"make learning meaningful."})]})]}),x=({srcIcon:t,content:a})=>e.jsxs("div",{className:`${s.styles["content-icon"]}`,children:[e.jsx("div",{className:`${s.styles["title-icon"]}`,children:e.jsx("img",{src:s.getStaticFileUrl(t),alt:"icon"})}),e.jsx("div",{className:`${s.styles["descriptions-icon"]}`,dangerouslySetInnerHTML:{__html:a}})]},a),v=[{scrIcon:"/images/ChatsTeardrop.svg",content:"<p>Understand yourself better through <span>helpful feedback</span>.</p>"},{scrIcon:"/images/Student.svg",content:"<p>Create, explore, and share exciting <span>personalized</span> learning journeys.</p>"},{scrIcon:"/images/Confetti.svg",content:"<p>Set, monitor, and achieve <span>your goals</span>.</p>"}],y=({})=>e.jsxs(n.Row,{className:`${s.styles["page-not-login"]}`,children:[e.jsx(n.Col,{md:12,children:e.jsx(j,{})}),e.jsx(n.Col,{md:12,className:`${s.styles["box-content-home-page"]} d-flex align-items-center`,children:v.map(t=>e.jsx(x,{srcIcon:t.scrIcon,content:t.content},t.scrIcon))})]});function N(t){return s.GenIcon({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"}}]})(t)}const b=1e4,f=({data:t,duration:a=b})=>{const[i,o]=c.useState(t.length),r=c.useRef(null),d=c.useCallback(l=>l===i?`${s.styles.active} ${s.styles.show}`:"",[i]),h=c.useCallback(l=>i===0&&l===t.length-1||l===i-1?s.styles.behind:"",[i,t.length]),u=c.useCallback(()=>{r&&r.current&&clearInterval(r.current),r.current=setInterval(()=>{o(l=>l>=t.length-1?0:l+1)},a)},[a,t.length]);return c.useEffect(()=>(u(),()=>{r&&r.current&&clearInterval(r.current)}),[t.length,a]),e.jsx("div",{className:`${s.styles["bg-animate"]} position-absolute`,children:t.map((l,m)=>e.jsx("img",{alt:`Image ${m+1}`,className:`${h(m)} ${d(m)}`,src:s.getStaticFileUrl(l)},m))})},I="/admin/users/user-list",$="/home",k="/home",C="Dashboard",T="Mario Education",S=["images/landing-page.jpg","images/landing-page2.jpg","images/landing-page3.jpg"],E=({version:t})=>{const[a,i]=c.useState(!1),o=p.useSelector(d=>d.common.user),r=()=>i(!a);return c.useEffect(()=>{o?document.title=C:document.title=T},[o]),e.jsxs("div",{className:`${s.styles.login} ${s.styles["red-background"]} position-relative`,children:[e.jsx("span",{className:`${s.styles["version-prod"]}`,children:`v ${t}`}),e.jsx(f,{data:S}),e.jsxs("div",{className:`${s.styles["login-content"]}`,children:[e.jsxs(n.Navbar,{light:!0,expand:"md",children:[e.jsx(n.NavbarBrand,{href:"/",className:`${s.styles["logo-home"]}`,children:e.jsx("img",{src:s.getStaticFileUrl("/images/logo-white.svg"),alt:"mario"})}),e.jsx(N,{onClick:r,className:`${s.styles["hide-in-desktop"]} ${s.styles["hamburger-menu"]}`}),e.jsxs(n.Collapse,{isOpen:a,navbar:!0,className:`${s.styles["collapse-box"]}`,children:[e.jsxs(n.Nav,{className:`${s.styles["nav-home"]} d-md-flex w-100 justify-content-center mr-auto`,navbar:!0,children:[e.jsx(n.NavItem,{children:e.jsx(n.NavLink,{className:`${s.styles["learn-more"]} align-self-md-center`,href:"https://marioframework.com/software",target:"blank",children:"Learn More"})}),e.jsx(n.NavItem,{children:e.jsx(n.NavLink,{className:`${s.styles["learn-more"]} align-self-md-center`,href:"mailto: Info@marioeducation.com",target:"blank",children:"Contact"})}),e.jsx(n.NavItem,{children:e.jsx(n.NavLink,{className:`${s.styles["learn-more"]} align-self-md-center`,href:"/privacy-policy",target:"blank",children:"Privacy Policy"})})]}),e.jsx("div",{className:`${s.styles["hide-in-mobile"]} d-flex justify-content-end`,children:o?e.jsx(g.Link,{to:o.roles.includes("Admin")?I:o.roles.includes("Teacher")?$:k,className:`${s.styles["btn-trans-border"]}`,children:"Dashboard"}):e.jsx(g.Link,{to:"/login",className:`${s.styles["btn-trans-border"]}`,children:"Login"})})]})]}),e.jsx("div",{className:"",children:e.jsx(y,{})}),e.jsx("div",{className:`${s.styles["digital-privacy-icon"]}`,children:e.jsx("a",{href:"https://cert.privo.com/#/companies/marioFrameworkLlc",target:"blank",children:e.jsx("img",{src:s.getStaticFileUrl("/images/STUDENT.png"),alt:"icon"})})})]})]})};exports.default=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),p=require("react-redux"),n=require("reactstrap"),s=require("./index-MYE51KWp.js"),g=require("react-router-dom"),j=()=>e.jsxs("div",{className:`${s.styles["content-quote"]}`,children:[e.jsxs("div",{className:`${s.styles["title-quote"]} d-block`,children:[e.jsx("p",{children:"Powerful"}),e.jsx("p",{children:"Personalized"}),e.jsx("p",{children:"Learning"})]}),e.jsxs("div",{className:`${s.styles["descriptions-quote"]} d-block`,children:[e.jsx("p",{children:"Focus on what matters most to you and"}),e.jsx("p",{children:"make learning meaningful."})]})]}),x=({srcIcon:t,content:a})=>e.jsxs("div",{className:`${s.styles["content-icon"]}`,children:[e.jsx("div",{className:`${s.styles["title-icon"]}`,children:e.jsx("img",{src:s.getStaticFileUrl(t),alt:"icon"})}),e.jsx("div",{className:`${s.styles["descriptions-icon"]}`,dangerouslySetInnerHTML:{__html:a}})]},a),v=[{scrIcon:"/images/ChatsTeardrop.svg",content:"<p>Understand yourself better through <span>helpful feedback</span>.</p>"},{scrIcon:"/images/Student.svg",content:"<p>Create, explore, and share exciting <span>personalized</span> learning journeys.</p>"},{scrIcon:"/images/Confetti.svg",content:"<p>Set, monitor, and achieve <span>your goals</span>.</p>"}],y=({})=>e.jsxs(n.Row,{className:`${s.styles["page-not-login"]}`,children:[e.jsx(n.Col,{md:12,children:e.jsx(j,{})}),e.jsx(n.Col,{md:12,className:`${s.styles["box-content-home-page"]} d-flex align-items-center`,children:v.map(t=>e.jsx(x,{srcIcon:t.scrIcon,content:t.content},t.scrIcon))})]});function N(t){return s.GenIcon({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"}}]})(t)}const b=1e4,f=({data:t,duration:a=b})=>{const[i,o]=c.useState(t.length),r=c.useRef(null),d=c.useCallback(l=>l===i?`${s.styles.active} ${s.styles.show}`:"",[i]),h=c.useCallback(l=>i===0&&l===t.length-1||l===i-1?s.styles.behind:"",[i,t.length]),u=c.useCallback(()=>{r&&r.current&&clearInterval(r.current),r.current=setInterval(()=>{o(l=>l>=t.length-1?0:l+1)},a)},[a,t.length]);return c.useEffect(()=>(u(),()=>{r&&r.current&&clearInterval(r.current)}),[t.length,a]),e.jsx("div",{className:`${s.styles["bg-animate"]} position-absolute`,children:t.map((l,m)=>e.jsx("img",{alt:`Image ${m+1}`,className:`${h(m)} ${d(m)}`,src:s.getStaticFileUrl(l)},m))})},I="/admin/users/user-list",$="/home",k="/home",C="Dashboard",T="Mario Education",S=["images/landing-page.jpg","images/landing-page2.jpg","images/landing-page3.jpg"],E=({version:t})=>{const[a,i]=c.useState(!1),o=p.useSelector(d=>d.common.user),r=()=>i(!a);return c.useEffect(()=>{o?document.title=C:document.title=T},[o]),e.jsxs("div",{className:`${s.styles.login} ${s.styles["red-background"]} position-relative`,children:[e.jsx("span",{className:`${s.styles["version-prod"]}`,children:`v ${t}`}),e.jsx(f,{data:S}),e.jsxs("div",{className:`${s.styles["login-content"]}`,children:[e.jsxs(n.Navbar,{light:!0,expand:"md",children:[e.jsx(n.NavbarBrand,{href:"/",className:`${s.styles["logo-home"]}`,children:e.jsx("img",{src:s.getStaticFileUrl("/images/logo-white.svg"),alt:"mario"})}),e.jsx(N,{onClick:r,className:`${s.styles["hide-in-desktop"]} ${s.styles["hamburger-menu"]}`}),e.jsxs(n.Collapse,{isOpen:a,navbar:!0,className:`${s.styles["collapse-box"]}`,children:[e.jsxs(n.Nav,{className:`${s.styles["nav-home"]} d-md-flex w-100 justify-content-center mr-auto`,navbar:!0,children:[e.jsx(n.NavItem,{children:e.jsx(n.NavLink,{className:`${s.styles["learn-more"]} align-self-md-center`,href:"https://marioframework.com/software",target:"blank",children:"Learn More"})}),e.jsx(n.NavItem,{children:e.jsx(n.NavLink,{className:`${s.styles["learn-more"]} align-self-md-center`,href:"mailto: Info@marioeducation.com",target:"blank",children:"Contact"})}),e.jsx(n.NavItem,{children:e.jsx(n.NavLink,{className:`${s.styles["learn-more"]} align-self-md-center`,href:"/privacy-policy",target:"blank",children:"Privacy Policy"})})]}),e.jsx("div",{className:`${s.styles["hide-in-mobile"]} d-flex justify-content-end`,children:o?e.jsx(g.Link,{to:o.roles.includes("Admin")?I:o.roles.includes("Teacher")?$:k,className:`${s.styles["btn-trans-border"]}`,children:"Dashboard"}):e.jsx(g.Link,{to:"/login",className:`${s.styles["btn-trans-border"]}`,children:"Login"})})]})]}),e.jsx("div",{className:"",children:e.jsx(y,{})}),e.jsx("div",{className:`${s.styles["digital-privacy-icon"]}`,children:e.jsx("a",{href:"https://cert.privo.com/#/companies/marioFrameworkLlc",target:"blank",children:e.jsx("img",{src:s.getStaticFileUrl("/images/STUDENT.png"),alt:"icon"})})})]})]})};exports.default=E;
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as N, useRef as I, useCallback as h, useEffect as f } from "react";
3
3
  import { useSelector as k } from "react-redux";
4
4
  import { Row as T, Col as u, Navbar as C, NavbarBrand as y, Collapse as E, Nav as A, NavItem as g, NavLink as p } from "reactstrap";
5
- import { s as n, h as m, G as H } from "./index-CFvswiRi.mjs";
5
+ import { s as n, h as m, G as H } from "./index-be-uwmuG.mjs";
6
6
  import { Link as v } from "react-router-dom";
7
7
  const M = () => /* @__PURE__ */ a("div", { className: `${n["content-quote"]}`, children: [
8
8
  /* @__PURE__ */ a("div", { className: `${n["title-quote"]} d-block`, children: [
@@ -3,12 +3,12 @@ import { Table as Q, Row as R, Col as p, Input as X, Button as Z, Label as J } f
3
3
  import { useNavigate as Y, useParams as ee } from "react-router-dom";
4
4
  import { Editor as te } from "@tinymce/tinymce-react";
5
5
  import { Formik as ae } from "formik";
6
- import { R as ne, H as se, b as C, c as w, S as ie, T as le, U, E as q, V as oe, W as re } from "./index-S9mI_rxc.mjs";
6
+ import { R as ne, H as se, b as C, c as w, S as ie, T as le, U, E as q, V as oe, W as re } from "./index-be-uwmuG.mjs";
7
7
  import { useTranslation as H } from "react-i18next";
8
8
  import { useEffect as j, Fragment as ce, useState as D, useCallback as z } from "react";
9
9
  import me from "react-select";
10
10
  import { useDispatch as G, useSelector as O } from "react-redux";
11
- import { a as de, b as ue, u as pe, c as he, d as ge } from "./mailCategoryService-Bb3FPk-a.mjs";
11
+ import { a as de, b as ue, u as pe, c as he, d as ge } from "./mailCategoryService-BlNnMeYL.mjs";
12
12
  import * as L from "yup";
13
13
  const ye = ({ onClick: n }) => /* @__PURE__ */ e("div", { className: "d-inline text-center cursor-pointer hover-opacity", title: "Delete", onClick: n, children: /* @__PURE__ */ e(ne, {}) }), V = [
14
14
  { label: "$USER_FIRST_NAME$", meaning: "user_first_name" },
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("reactstrap"),B=require("react-router-dom"),O=require("@tinymce/tinymce-react"),H=require("formik"),l=require("./index-D-Z2VEoE.js"),U=require("react-i18next"),u=require("react"),K=require("react-select"),N=require("react-redux"),v=require("./mailCategoryService-_WxeTzNN.js"),V=require("yup");function G(a){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const p=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(s,n,p.get?p:{enumerable:!0,get:()=>a[n]})}}return s.default=a,Object.freeze(s)}const A=G(V),Q=({onClick:a})=>e.jsx("div",{className:"d-inline text-center cursor-pointer hover-opacity",title:"Delete",onClick:a,children:e.jsx(l.FaPlus,{})}),F=[{label:"$USER_FIRST_NAME$",meaning:"user_first_name"},{label:"$USER_LAST_NAME$",meaning:"user_last_name"},{label:"$PASSWORD$",meaning:"password"},{label:"$USER_NAME$",meaning:"user_name"},{label:"$USER_EMAIL$",meaning:"user_email"},{label:"$MESSAGE$",meaning:"message"},{label:"$DOMAIN$",meaning:"domain"}],W=({onClick:a,isResetPasswordTemplate:s})=>{const{t:n}=U.useTranslation();let p=s?[...F,{label:"$RESET_LINK$",meaning:"Reset link"}]:F;return e.jsxs(r.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:n("params")}),e.jsx("th",{className:"align-top",children:n("meaning")}),e.jsx("th",{})]})}),e.jsx("tbody",{children:p.map(h=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:h.label}),e.jsx("td",{className:"align-middle",children:n(h.meaning)}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(Q,{onClick:()=>a(h)})})]},h.label))})]})},X=a=>{const s=N.useDispatch(),n=N.useSelector(c=>c.mailCategory.mailCategoryList);u.useEffect(()=>{p()},[]);const p=async()=>{try{const c=await v.get$1();s(l.setMailCategory(c.data.items))}catch(c){console.error(c)}},{id:h}=a,E=n.map(c=>({id:c.id,value:c.id,label:c.name})),C=h&&E.find(c=>c.value===h)||null;return e.jsx(K,{options:E,value:C,...a})},P=({label:a,onRemove:s})=>e.jsxs(u.Fragment,{children:[e.jsx("span",{className:"mr-2",children:a}),e.jsx("i",{className:"fa fa-times text-danger cursor-pointer hover-opacity",onClick:s})]}),Z={id:0,subject:"",categoryId:0,body:"",attachments:[]},J="/admin/email-template",Y="Email template detail",ee=4194304,te=a=>{let s;const n=N.useDispatch(),p=B.useNavigate(),[h,E]=u.useState(Z),[C,c]=u.useState(!1),D=async()=>{localStorage.setItem(window.location.href,"true"),c(!0)},[y,w]=u.useState([]),[g,L]=u.useState([]),[M,q]=u.useState("");u.useEffect(()=>{a&&I()},[a]);const I=u.useCallback(async()=>{n(l.setLoading(!0));try{const t=await v.getById(a);E({id:t.data.id,subject:t.data.subject,categoryId:t.data.category.id,body:t.data.body,attachments:t.data.attachments||[]}),document.title=t.data.subject,s&&s.editor.execCommand("mceSetContent",!1,t.data.body)}catch(t){n(l.setAlert({type:"danger",message:t.response?.data?.title||t.message}))}n(l.setLoading(!1))},[a]),x=async()=>{n(l.setLoading(!0));try{const i=(await v.getTinyMCEKeyApi()).data;i&&q(i.key)}catch(t){n(l.setAlert({type:"danger",message:t.response?.data?.title||"Get key failed"}))}n(l.setLoading(!1))},b=t=>s=t,S=t=>{s&&s.editor.execCommand("mceInsertContent",!1,` ${t.label}`)},f=u.useCallback(()=>{p(J)},[]),T=u.useCallback(async t=>{n(l.setLoading(!0));try{if(g&&g.length){const m=(await o()).map(d=>({key:d.data.key,name:d.data.name}));t.attachments=[...t.attachments,...m]}await(a?v.update:v.create)(t),n(l.setAlert({type:"success",message:`${a?"Update":"Create"} template successfully`})),f()}catch(i){n(l.setAlert({type:"danger",message:i.response?.data?.title||i.message}))}n(l.setLoading(!1))},[a,g]),k=()=>{const t=document.getElementsByClassName("input-attachment"),i=document.createElement("input");document.getElementById("email-detail")?.append(i),i.className="input-attachment",i.id=`inputAttachment-${t.length+1}`,i.type="file",i.style.display="none",i.setAttribute("multiple","multiple"),i.addEventListener("change",R),i.click()},R=()=>{const t=[];let i=0;const j=document.getElementsByClassName("input-attachment");for(const m of j)for(const d of m.files)i+=d.size,i>ee&&(n(l.setAlert({type:"danger",message:"Max attachment size is 4MB"})),i-=d.size,m.remove());for(const m of j)for(const d of m.files){const{name:_}=d;!y.includes(d)&&!t.some(z=>z.name===_)&&t.push({name:_,inputId:m.id})}L(t)},$=(t,i)=>{if(g.filter(j=>j.inputId===t).length===1){document.getElementById(t)?.remove();let m=g.filter(d=>d.inputId===t);g.filter(d=>d.inputId!==m.inputId),y.push(m),w([...y]),L([...g]);return}w([...y,i])};u.useEffect(()=>{R()},[y]);const o=async()=>{const t=document.getElementsByClassName("input-attachment"),i=[];for(const j of t)for(const m of j.files){const{name:d}=m,_=new FormData;_.append("file",m,d),i.push(l.systemEmailUpload(_))}return Promise.all(i)};return u.useEffect(()=>{document.title=Y,x(),c(!1),localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href)},[]),{emailTemplateDetail:h,setEditorRef:b,addParams:S,backToList:f,confirmData:T,edited:C,setEdited:c,setEditedTrue:D,onAttachFile:k,updateAttachment:R,fileUpload:g,removeAttachment:$,tinyMCEKey:M}},ae=A.object({subject:A.string().required("Template subject is required"),categoryId:A.number().required("Template category is required").test("test category id","Template category is required",a=>a>=1),comment:A.string(),body:A.string().required("Template body is required")}),se="create_email_template",ne="edit_email_template",ie=()=>{const{id:a}=B.useParams(),{t:s}=U.useTranslation(),{emailTemplateDetail:n,setEditorRef:p,addParams:h,backToList:E,confirmData:C,edited:c,setEdited:D,setEditedTrue:y,onAttachFile:w,fileUpload:g,removeAttachment:L}=te(parseInt(a||"0")),M=s(a?ne:se),q=s(a?"update":"create"),I=N.useSelector(x=>x.mailCategory.mailCategoryList);return e.jsx(H.Formik,{initialValues:n,enableReinitialize:!0,validationSchema:ae,onSubmit:x=>{C(x),D(!1),localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href)},children:x=>{const{values:b,touched:S,errors:f,setFieldValue:T,handleChange:k,handleBlur:R,handleSubmit:$}=x;return e.jsxs("div",{className:"animated fadeIn detail-buttons-padding",id:"email-detail",children:[e.jsx(l.QuitPrompt,{when:c}),e.jsx("h5",{className:"mb-2",style:{textTransform:"capitalize"},children:M}),e.jsxs(r.Row,{className:"my-2",children:[e.jsxs(r.Col,{md:8,children:[e.jsx(l.RequiredLabel,{text:s("mail_subject")}),e.jsx(r.Input,{placeholder:s("mail_subject_nm"),name:"subject",value:b.subject,onChange:o=>{k(o),y()},onBlur:R("subject"),className:"selector-input"}),S.subject&&f.subject&&e.jsx(l.ErrorHandler,{text:f.subject})]}),e.jsxs(r.Col,{md:4,children:[e.jsx(l.RequiredLabel,{text:s("category")}),e.jsx(X,{onChange:o=>{T("categoryId",o.value),y()},id:b.categoryId}),S.categoryId&&f.categoryId&&e.jsx(l.ErrorHandler,{text:f.categoryId})]})]}),e.jsxs(r.Row,{className:"mb-2",children:[e.jsx(r.Col,{md:8,children:e.jsxs(r.Row,{children:[e.jsxs(r.Col,{md:12,className:"mb-2",children:[e.jsx(l.RequiredLabel,{text:s("mail_body")}),(n.body||!a)&&e.jsx(O.Editor,{tinymceScriptSrc:"/tinymce/tinymce.min.js",ref:o=>p(o),initialValue:n.body,init:l.editorConfig.email,onEditorChange:o=>{T("body",o),y()}}),S.body&&f.body&&e.jsx(l.ErrorHandler,{text:f.body})]}),e.jsx(r.Col,{md:12,children:e.jsxs(r.Row,{children:[e.jsx(r.Col,{md:3,children:e.jsx(r.Button,{color:"link",size:"sm",className:"pl-0",onClick:w,children:s("add_attachment")})}),e.jsx(r.Col,{md:12,children:e.jsxs(r.Row,{children:[b.attachments.map(o=>e.jsx(r.Col,{md:2,children:e.jsx(P,{label:o.name,onRemove:()=>T("attachments",b.attachments.filter(t=>t.name!==o.name))})},o.key)),g.map((o,t)=>e.jsx(r.Col,{md:2,className:"d-flex align-items-center",children:e.jsx(P,{label:o.name,onRemove:()=>L(o.inputId,o.name)})},t))]})})]})})]})}),e.jsxs(r.Col,{md:4,children:[e.jsx(r.Label,{children:s("mail_params")}),e.jsx(W,{onClick:o=>h(o),isResetPasswordTemplate:b.categoryId==(I&&I.length>0&&I.filter(o=>o.name=="Reset password")[0].id)})]})]}),e.jsx(l.DetailActionButtons,{confirmText:q,onConfirm:$,onCancel:E})]})}})};exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("reactstrap"),B=require("react-router-dom"),O=require("@tinymce/tinymce-react"),H=require("formik"),l=require("./index-MYE51KWp.js"),U=require("react-i18next"),u=require("react"),K=require("react-select"),N=require("react-redux"),v=require("./mailCategoryService-BzyReYht.js"),V=require("yup");function G(a){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const p=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(s,n,p.get?p:{enumerable:!0,get:()=>a[n]})}}return s.default=a,Object.freeze(s)}const A=G(V),Q=({onClick:a})=>e.jsx("div",{className:"d-inline text-center cursor-pointer hover-opacity",title:"Delete",onClick:a,children:e.jsx(l.FaPlus,{})}),F=[{label:"$USER_FIRST_NAME$",meaning:"user_first_name"},{label:"$USER_LAST_NAME$",meaning:"user_last_name"},{label:"$PASSWORD$",meaning:"password"},{label:"$USER_NAME$",meaning:"user_name"},{label:"$USER_EMAIL$",meaning:"user_email"},{label:"$MESSAGE$",meaning:"message"},{label:"$DOMAIN$",meaning:"domain"}],W=({onClick:a,isResetPasswordTemplate:s})=>{const{t:n}=U.useTranslation();let p=s?[...F,{label:"$RESET_LINK$",meaning:"Reset link"}]:F;return e.jsxs(r.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:n("params")}),e.jsx("th",{className:"align-top",children:n("meaning")}),e.jsx("th",{})]})}),e.jsx("tbody",{children:p.map(h=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:h.label}),e.jsx("td",{className:"align-middle",children:n(h.meaning)}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(Q,{onClick:()=>a(h)})})]},h.label))})]})},X=a=>{const s=N.useDispatch(),n=N.useSelector(c=>c.mailCategory.mailCategoryList);u.useEffect(()=>{p()},[]);const p=async()=>{try{const c=await v.get$1();s(l.setMailCategory(c.data.items))}catch(c){console.error(c)}},{id:h}=a,E=n.map(c=>({id:c.id,value:c.id,label:c.name})),C=h&&E.find(c=>c.value===h)||null;return e.jsx(K,{options:E,value:C,...a})},P=({label:a,onRemove:s})=>e.jsxs(u.Fragment,{children:[e.jsx("span",{className:"mr-2",children:a}),e.jsx("i",{className:"fa fa-times text-danger cursor-pointer hover-opacity",onClick:s})]}),Z={id:0,subject:"",categoryId:0,body:"",attachments:[]},J="/admin/email-template",Y="Email template detail",ee=4194304,te=a=>{let s;const n=N.useDispatch(),p=B.useNavigate(),[h,E]=u.useState(Z),[C,c]=u.useState(!1),D=async()=>{localStorage.setItem(window.location.href,"true"),c(!0)},[y,w]=u.useState([]),[g,L]=u.useState([]),[M,q]=u.useState("");u.useEffect(()=>{a&&I()},[a]);const I=u.useCallback(async()=>{n(l.setLoading(!0));try{const t=await v.getById(a);E({id:t.data.id,subject:t.data.subject,categoryId:t.data.category.id,body:t.data.body,attachments:t.data.attachments||[]}),document.title=t.data.subject,s&&s.editor.execCommand("mceSetContent",!1,t.data.body)}catch(t){n(l.setAlert({type:"danger",message:t.response?.data?.title||t.message}))}n(l.setLoading(!1))},[a]),x=async()=>{n(l.setLoading(!0));try{const i=(await v.getTinyMCEKeyApi()).data;i&&q(i.key)}catch(t){n(l.setAlert({type:"danger",message:t.response?.data?.title||"Get key failed"}))}n(l.setLoading(!1))},b=t=>s=t,S=t=>{s&&s.editor.execCommand("mceInsertContent",!1,` ${t.label}`)},f=u.useCallback(()=>{p(J)},[]),T=u.useCallback(async t=>{n(l.setLoading(!0));try{if(g&&g.length){const m=(await o()).map(d=>({key:d.data.key,name:d.data.name}));t.attachments=[...t.attachments,...m]}await(a?v.update:v.create)(t),n(l.setAlert({type:"success",message:`${a?"Update":"Create"} template successfully`})),f()}catch(i){n(l.setAlert({type:"danger",message:i.response?.data?.title||i.message}))}n(l.setLoading(!1))},[a,g]),k=()=>{const t=document.getElementsByClassName("input-attachment"),i=document.createElement("input");document.getElementById("email-detail")?.append(i),i.className="input-attachment",i.id=`inputAttachment-${t.length+1}`,i.type="file",i.style.display="none",i.setAttribute("multiple","multiple"),i.addEventListener("change",R),i.click()},R=()=>{const t=[];let i=0;const j=document.getElementsByClassName("input-attachment");for(const m of j)for(const d of m.files)i+=d.size,i>ee&&(n(l.setAlert({type:"danger",message:"Max attachment size is 4MB"})),i-=d.size,m.remove());for(const m of j)for(const d of m.files){const{name:_}=d;!y.includes(d)&&!t.some(z=>z.name===_)&&t.push({name:_,inputId:m.id})}L(t)},$=(t,i)=>{if(g.filter(j=>j.inputId===t).length===1){document.getElementById(t)?.remove();let m=g.filter(d=>d.inputId===t);g.filter(d=>d.inputId!==m.inputId),y.push(m),w([...y]),L([...g]);return}w([...y,i])};u.useEffect(()=>{R()},[y]);const o=async()=>{const t=document.getElementsByClassName("input-attachment"),i=[];for(const j of t)for(const m of j.files){const{name:d}=m,_=new FormData;_.append("file",m,d),i.push(l.systemEmailUpload(_))}return Promise.all(i)};return u.useEffect(()=>{document.title=Y,x(),c(!1),localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href)},[]),{emailTemplateDetail:h,setEditorRef:b,addParams:S,backToList:f,confirmData:T,edited:C,setEdited:c,setEditedTrue:D,onAttachFile:k,updateAttachment:R,fileUpload:g,removeAttachment:$,tinyMCEKey:M}},ae=A.object({subject:A.string().required("Template subject is required"),categoryId:A.number().required("Template category is required").test("test category id","Template category is required",a=>a>=1),comment:A.string(),body:A.string().required("Template body is required")}),se="create_email_template",ne="edit_email_template",ie=()=>{const{id:a}=B.useParams(),{t:s}=U.useTranslation(),{emailTemplateDetail:n,setEditorRef:p,addParams:h,backToList:E,confirmData:C,edited:c,setEdited:D,setEditedTrue:y,onAttachFile:w,fileUpload:g,removeAttachment:L}=te(parseInt(a||"0")),M=s(a?ne:se),q=s(a?"update":"create"),I=N.useSelector(x=>x.mailCategory.mailCategoryList);return e.jsx(H.Formik,{initialValues:n,enableReinitialize:!0,validationSchema:ae,onSubmit:x=>{C(x),D(!1),localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href)},children:x=>{const{values:b,touched:S,errors:f,setFieldValue:T,handleChange:k,handleBlur:R,handleSubmit:$}=x;return e.jsxs("div",{className:"animated fadeIn detail-buttons-padding",id:"email-detail",children:[e.jsx(l.QuitPrompt,{when:c}),e.jsx("h5",{className:"mb-2",style:{textTransform:"capitalize"},children:M}),e.jsxs(r.Row,{className:"my-2",children:[e.jsxs(r.Col,{md:8,children:[e.jsx(l.RequiredLabel,{text:s("mail_subject")}),e.jsx(r.Input,{placeholder:s("mail_subject_nm"),name:"subject",value:b.subject,onChange:o=>{k(o),y()},onBlur:R("subject"),className:"selector-input"}),S.subject&&f.subject&&e.jsx(l.ErrorHandler,{text:f.subject})]}),e.jsxs(r.Col,{md:4,children:[e.jsx(l.RequiredLabel,{text:s("category")}),e.jsx(X,{onChange:o=>{T("categoryId",o.value),y()},id:b.categoryId}),S.categoryId&&f.categoryId&&e.jsx(l.ErrorHandler,{text:f.categoryId})]})]}),e.jsxs(r.Row,{className:"mb-2",children:[e.jsx(r.Col,{md:8,children:e.jsxs(r.Row,{children:[e.jsxs(r.Col,{md:12,className:"mb-2",children:[e.jsx(l.RequiredLabel,{text:s("mail_body")}),(n.body||!a)&&e.jsx(O.Editor,{tinymceScriptSrc:"/tinymce/tinymce.min.js",ref:o=>p(o),initialValue:n.body,init:l.editorConfig.email,onEditorChange:o=>{T("body",o),y()}}),S.body&&f.body&&e.jsx(l.ErrorHandler,{text:f.body})]}),e.jsx(r.Col,{md:12,children:e.jsxs(r.Row,{children:[e.jsx(r.Col,{md:3,children:e.jsx(r.Button,{color:"link",size:"sm",className:"pl-0",onClick:w,children:s("add_attachment")})}),e.jsx(r.Col,{md:12,children:e.jsxs(r.Row,{children:[b.attachments.map(o=>e.jsx(r.Col,{md:2,children:e.jsx(P,{label:o.name,onRemove:()=>T("attachments",b.attachments.filter(t=>t.name!==o.name))})},o.key)),g.map((o,t)=>e.jsx(r.Col,{md:2,className:"d-flex align-items-center",children:e.jsx(P,{label:o.name,onRemove:()=>L(o.inputId,o.name)})},t))]})})]})})]})}),e.jsxs(r.Col,{md:4,children:[e.jsx(r.Label,{children:s("mail_params")}),e.jsx(W,{onClick:o=>h(o),isResetPasswordTemplate:b.categoryId==(I&&I.length>0&&I.filter(o=>o.name=="Reset password")[0].id)})]})]}),e.jsx(l.DetailActionButtons,{confirmText:q,onConfirm:$,onCancel:E})]})}})};exports.default=ie;
@@ -1,11 +1,11 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import { Row as f, Col as o, Table as _ } from "reactstrap";
3
- import { D, b as g, F as I, H as A, c as y, J as R, K as w, L as x, M as P, O as M, P as k, Q as j } from "./index-DvGA0ecI.mjs";
3
+ import { D, b as g, F as I, H as A, c as y, J as R, K as w, L as x, M as P, O as M, P as k, Q as j } from "./index-be-uwmuG.mjs";
4
4
  import { format as F } from "date-fns";
5
5
  import { useCallback as T, useEffect as E } from "react";
6
6
  import { useSelector as L, useDispatch as z } from "react-redux";
7
7
  import { useNavigate as B } from "react-router-dom";
8
- import { g as S, a as U, r as $ } from "./mailCategoryService-By7wn1rV.mjs";
8
+ import { g as S, a as U, r as $ } from "./mailCategoryService-BlNnMeYL.mjs";
9
9
  import { useTranslation as N } from "react-i18next";
10
10
  const O = "/admin/email-template", H = "/admin/create-email-template", J = "Email template list", K = () => {
11
11
  const n = B(), { t: c } = N(), u = L(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("reactstrap"),a=require("./index-DSGOm1zi.js"),_=require("date-fns"),m=require("react"),x=require("react-redux"),f=require("react-router-dom"),j=require("./mailCategoryService-B19vYJRa.js"),y=require("react-i18next"),E="/admin/email-template",N="/admin/create-email-template",b="Email template list",v=()=>{const c=f.useNavigate(),{t:d}=y.useTranslation(),p=x.useSelector(l=>l.emailTemplate.emailTemplateList),u=x.useSelector(l=>l.emailTemplate.totalItems),o=x.useSelector(l=>l.mailCategory.mailCategoryList),{filters:n,changeFilters:h}=a.useFilters(),t=x.useDispatch(),g=m.useCallback(async()=>{t(a.setLoading(!0));try{const l=await j.get(n),{items:r,totalItems:L}=l.data;if(t(a.setEmailTemplateList({emailTemplateList:r,totalItems:L})),o&&o.length==0){const C=await j.get$1();t(a.setMailCategory(C.data.items))}}catch(l){t(a.setAlert({type:"danger",message:l.response?.data?.title||l.message}))}t(a.setLoading(!1))},[t,n]),s=m.useCallback(l=>{t(a.setLoading(!0));try{t(a.setModal({isOpen:!0,type:"warning",message:d("do_you_want_to_remove_this_email_template"),onConfirm:async()=>{await j.remove(l),t(a.setAlert({type:"success",message:"Remove template successfully"})),h({currentPage:1})}}))}catch(r){t(a.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}t(a.setLoading(!1))},[n]),T=m.useCallback(l=>{const r=l?`${E}/${l}`:N;c(r)},[]);return m.useEffect(()=>{document.title=b},[]),m.useEffect(()=>{g()},[n]),{emailTemplateList:p,totalItems:u,filters:n,changeFilters:h,getData:g,removeData:s,goToDetail:T,mailCategoryList:o}},R="email_template",A=()=>{const{emailTemplateList:c,totalItems:d,filters:p,changeFilters:u,removeData:o,goToDetail:n,mailCategoryList:h}=v(),{t}=y.useTranslation(),g=s=>{o(s)};return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx("h5",{className:"mb-2",children:t(R)}),e.jsxs(i.Row,{className:"my-2",children:[e.jsx(i.Col,{md:4,children:e.jsx(a.AddButton,{text:t("create_template"),onClick:()=>n()})}),e.jsxs(i.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[t("total_of_templates"),": ",d]})]}),e.jsxs(i.Row,{className:"mb-2",children:[e.jsxs(i.Col,{md:8,children:[c&&c.length>0?e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:t("template_name")}),e.jsx("th",{className:"align-top",children:t("category_name")}),e.jsx("th",{className:"align-top",children:t("created_date")}),e.jsx("th",{className:"text-center",children:t("action")})]})}),e.jsx("tbody",{children:c.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:e.jsx(a.LinkEditButton,{label:s.subject,onClick:()=>n(s.id)})}),e.jsx("td",{className:"align-middle",children:s.category.name}),e.jsx("td",{className:"align-middle",children:_.format(new Date(s.createdAt),a.DATE_RESULT)}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(a.DeleteButtonIcon,{onClick:()=>g(s.id)})})]},s.id))})]}):e.jsx(a.EmptyDataAlert,{label:t("template")}),e.jsx(i.Row,{className:"mt-2",children:e.jsx(i.Col,{md:12,children:e.jsx(a.CustomPagination,{filters:p,totalRecordCount:d,changePageSize:s=>u({pageSize:s}),changePage:s=>u({currentPage:s})})})})]}),e.jsx(i.Col,{md:4,children:e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{className:"align-top",children:t("category_name")})})}),e.jsx("tbody",{children:h.map(s=>e.jsx("tr",{children:e.jsx("td",{className:"align-middle",children:s.name})},s.id))})]})})]})]})};exports.default=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("reactstrap"),a=require("./index-MYE51KWp.js"),_=require("date-fns"),m=require("react"),x=require("react-redux"),f=require("react-router-dom"),j=require("./mailCategoryService-BzyReYht.js"),y=require("react-i18next"),E="/admin/email-template",N="/admin/create-email-template",b="Email template list",v=()=>{const c=f.useNavigate(),{t:d}=y.useTranslation(),p=x.useSelector(l=>l.emailTemplate.emailTemplateList),u=x.useSelector(l=>l.emailTemplate.totalItems),o=x.useSelector(l=>l.mailCategory.mailCategoryList),{filters:n,changeFilters:h}=a.useFilters(),t=x.useDispatch(),g=m.useCallback(async()=>{t(a.setLoading(!0));try{const l=await j.get(n),{items:r,totalItems:L}=l.data;if(t(a.setEmailTemplateList({emailTemplateList:r,totalItems:L})),o&&o.length==0){const C=await j.get$1();t(a.setMailCategory(C.data.items))}}catch(l){t(a.setAlert({type:"danger",message:l.response?.data?.title||l.message}))}t(a.setLoading(!1))},[t,n]),s=m.useCallback(l=>{t(a.setLoading(!0));try{t(a.setModal({isOpen:!0,type:"warning",message:d("do_you_want_to_remove_this_email_template"),onConfirm:async()=>{await j.remove(l),t(a.setAlert({type:"success",message:"Remove template successfully"})),h({currentPage:1})}}))}catch(r){t(a.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}t(a.setLoading(!1))},[n]),T=m.useCallback(l=>{const r=l?`${E}/${l}`:N;c(r)},[]);return m.useEffect(()=>{document.title=b},[]),m.useEffect(()=>{g()},[n]),{emailTemplateList:p,totalItems:u,filters:n,changeFilters:h,getData:g,removeData:s,goToDetail:T,mailCategoryList:o}},R="email_template",A=()=>{const{emailTemplateList:c,totalItems:d,filters:p,changeFilters:u,removeData:o,goToDetail:n,mailCategoryList:h}=v(),{t}=y.useTranslation(),g=s=>{o(s)};return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx("h5",{className:"mb-2",children:t(R)}),e.jsxs(i.Row,{className:"my-2",children:[e.jsx(i.Col,{md:4,children:e.jsx(a.AddButton,{text:t("create_template"),onClick:()=>n()})}),e.jsxs(i.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[t("total_of_templates"),": ",d]})]}),e.jsxs(i.Row,{className:"mb-2",children:[e.jsxs(i.Col,{md:8,children:[c&&c.length>0?e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:t("template_name")}),e.jsx("th",{className:"align-top",children:t("category_name")}),e.jsx("th",{className:"align-top",children:t("created_date")}),e.jsx("th",{className:"text-center",children:t("action")})]})}),e.jsx("tbody",{children:c.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:e.jsx(a.LinkEditButton,{label:s.subject,onClick:()=>n(s.id)})}),e.jsx("td",{className:"align-middle",children:s.category.name}),e.jsx("td",{className:"align-middle",children:_.format(new Date(s.createdAt),a.DATE_RESULT)}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(a.DeleteButtonIcon,{onClick:()=>g(s.id)})})]},s.id))})]}):e.jsx(a.EmptyDataAlert,{label:t("template")}),e.jsx(i.Row,{className:"mt-2",children:e.jsx(i.Col,{md:12,children:e.jsx(a.CustomPagination,{filters:p,totalRecordCount:d,changePageSize:s=>u({pageSize:s}),changePage:s=>u({currentPage:s})})})})]}),e.jsx(i.Col,{md:4,children:e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{className:"align-top",children:t("category_name")})})}),e.jsx("tbody",{children:h.map(s=>e.jsx("tr",{children:e.jsx("td",{className:"align-middle",children:s.name})},s.id))})]})})]})]})};exports.default=A;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("reactstrap"),F=require("react-redux"),x=require("react"),t=require("./index-DSGOm1zi.js"),v=require("formik"),E=require("yup"),D=require("react-i18next");function A(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:()=>s[a]})}}return n.default=s,Object.freeze(n)}const b=A(E),G=b.object({name:b.string().required("Name is required")}),U=(s,n)=>{const{targetMedia:a,onConfirm:i}=s,r=a?.key?"Update":"Create",m=a?.key?"Rename":"Folder";return e.jsx(v.Formik,{initialValues:{name:a?.name},enableReinitialize:!0,validationSchema:G,onSubmit:(c,u)=>{i&&i(c),u.resetForm()},children:c=>{const{values:u,touched:g,errors:p,handleChange:y,handleBlur:C,handleSubmit:j}=c;return e.jsx(t.CommonModal,{header:m,confirmText:r,onConfirm:j,ref:n,children:e.jsx(l.Row,{children:e.jsxs(l.Col,{md:12,children:[e.jsx(l.Input,{name:"name",placeholder:`Enter your ${a?.key?"file":"folder"} name`,value:u.name,onChange:y,onBlur:C("question")}),g.name&&p.name&&e.jsx(t.ErrorHandler,{text:p.name})]})})})}})},R=x.forwardRef(U),S=({isLibrary:s,step:n,breadcumb:a,currentPrefix:i,targetMedia:r,handleSelectFile:m,handleCreateFolder:c,handleRenameFile:u,handleGoBack:g,handleDownloadMedia:p,handleDeleteMediaOrFolder:y,showErrorAlert:C})=>{const j=x.useRef(null),I=x.useRef(null),{t:O}=D.useTranslation(),f=()=>j?.current?.toggle(),_=()=>e.jsxs(l.Row,{className:"p-2 pl-3",style:{gap:"8px"},children:[!!n&&e.jsxs(l.Button,{className:"mr-2",color:"secondary",onClick:g,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaArrowLeft,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Go up"})]}),r&&!r.isFolder&&e.jsxs(l.Button,{className:"mr-2",color:"success",onClick:p,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaDownload,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Download"})]}),r&&!s&&e.jsxs(l.Button,{className:"mr-2",color:"danger",onClick:y,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaTrash,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Delete"})]}),r&&!s&&!r.isFolder&&e.jsxs(l.Button,{className:"mr-2",color:"primary",onClick:f,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaEdit,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Rename"})]}),!r&&!s&&e.jsxs(l.Button,{className:"mr-2",color:"success",onClick:f,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaFolderPlus,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:O("new_folder")})]}),!r&&!s&&e.jsxs(l.Button,{className:"mr-2",color:"info",onClick:()=>I?.current?.click(),style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaFileUpload,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:O("upload")})]}),a&&e.jsx(l.Col,{className:"h-100 d-flex align-items-center",children:a})]});return e.jsxs("div",{children:[_(),e.jsx(R,{ref:j,targetMedia:r,onConfirm:async h=>{h.name!=""?r&&!r.isFolder?(f(),await u(h.name)):(f(),await c(i,h.name)):C("Name can't be empty")}}),e.jsx("input",{type:"file",id:"customMediaUpload",ref:I,style:{display:"none"},onChange:async h=>{const d=h?.target?.files[0];d&&await m({key:i,file:d})}})]})},B=x.memo(S),N={"media-wrapper":"_media-wrapper_1nc2k_6","media-image":"_media-image_1nc2k_11","media-image-selected":"_media-image-selected_1nc2k_17","media-title":"_media-title_1nc2k_21","filter-media-file":"_filter-media-file_1nc2k_30"};var o=(s=>(s[s.IMAGE=0]="IMAGE",s[s.VIDEO=1]="VIDEO",s[s.AUDIO=2]="AUDIO",s[s.DOC=3]="DOC",s[s.UNKNOW=4]="UNKNOW",s))(o||{});const q=["png","jpg","jpeg","gif"],M=["mp4","mp4v"],V=["txt","pdf","doc","docx","xls","csv"],L=["wav","mp3"],k=s=>{if(s){if(q.includes(s))return o.IMAGE;if(M.includes(s))return o.VIDEO;if(V.includes(s))return o.DOC;if(L.includes(s))return o.AUDIO}return o.UNKNOW},$=s=>{if(s.isFolder)return t.Images.FOLDER_IMAGE;const n=k(s.extension);return n===o.IMAGE?t.Images.PHOTO_IMAGE:n===o.VIDEO?t.Images.VIDEO_IMAGE:n===o.AUDIO?t.Images.AUDIO_IMAGE:n===o.DOC?t.Images.DOCS_IMAGE:t.Images.UNKNOW_IMAGE},T=({media:s,isTarget:n})=>{const a=$(s);return e.jsxs(l.Card,{className:`${n?N["media-image-selected"]:""} border-0 `,children:[e.jsx(l.CardImg,{className:`${N["media-image"]} p-1`,top:!0,width:"90%",src:t.getStaticFileUrl(a),alt:s.name}),e.jsx(l.CardBody,{className:"p-1",style:{height:45},children:e.jsx(l.CardTitle,{tag:"h6",className:N["media-title"],children:s.name})})]})},H=x.memo(T),P=[{value:o.IMAGE,label:"images"},{value:o.AUDIO,label:"audios"},{value:o.DOC,label:"docs"},{value:o.VIDEO,label:"videos"}],K=({changeFilters:s})=>{const[n,a]=x.useState(),{t:i}=D.useTranslation();return e.jsxs(l.Row,{className:`${N["filter-media-file"]}`,children:[e.jsx(l.Col,{sm:8,children:e.jsx(t.SearchBox,{initValue:"",onSearch:r=>s({searchString:r}),placeholder:i("type_something_to_search_by_file_name")})}),e.jsx(l.Col,{sm:4,children:e.jsx(t.CustomSelector,{value:n,isMulti:!0,options:P.map(r=>({...r,label:i(r.label)})),onChange:r=>{a(r);const m=r.map(c=>c.value);s({types:m})}})})]})},W=({height:s,isLibrary:n})=>{const{filters:a,mediaList:i,targetMedia:r,router:m,breadcrumb:c,changeFilters:u,handleOpenFolder:g,handleSelectMedia:p,handleSelectFile:y,handleCreateFolder:C,handleRenameFile:j,handleDownloadMedia:I,handleDeleteMediaOrFolder:O,handleGoBack:f,showErrorAlert:_}=t.useGalleryList(n),h=()=>i.map(d=>{const w=r?.key===d.key;return e.jsx(l.Col,{className:"p-2",xs:"auto",children:e.jsx("div",{onDoubleClick:()=>g(d),onClick:()=>p(d),className:N["media-wrapper"],children:e.jsx(H,{media:d,isTarget:w})})},d.key)});return e.jsxs(l.Card,{children:[e.jsxs(l.CardHeader,{children:[e.jsx(K,{changeFilters:u,filters:a}),e.jsx(B,{isLibrary:n,step:m.step,breadcumb:c,currentPrefix:a.prefix||"",targetMedia:r,handleSelectFile:y,handleCreateFolder:C,handleRenameFile:j,handleDownloadMedia:I,handleDeleteMediaOrFolder:O,handleGoBack:f,showErrorAlert:_})]}),e.jsx(l.CardBody,{style:{minHeight:s},children:e.jsx(l.Row,{className:"p-1",children:h()})})]})},z=({targetMedia:s})=>{if(!s||s?.isFolder)return e.jsx("div",{});const n=k(s.extension),a=t.getFileUrl(s.key||"");return e.jsxs(l.Card,{className:"position-sticky",children:[e.jsx(l.CardHeader,{children:s?.name||"Media name"}),n===o.IMAGE&&e.jsx(l.CardImg,{className:"p-2",src:a,loading:"lazy"}),n===o.VIDEO&&e.jsx("div",{className:"p-2",children:e.jsx("video",{id:s.key,width:"100%",height:"100%",controls:!0,children:e.jsx("source",{src:a})})}),n===o.AUDIO&&e.jsx("div",{className:"p-2",children:e.jsx("audio",{controls:!0,className:"w-100",children:e.jsx("source",{src:a})})}),e.jsxs(l.CardBody,{children:[e.jsx(l.CardTitle,{tag:"h6",children:"General Info"}),e.jsxs(l.CardText,{children:["File extension: ",s.extension?.toUpperCase()]})]})]})},Q=x.memo(z),J="media_gallery",X=({isLibrary:s})=>{const n=F.useSelector(i=>i.gallery.targetMedia),{t:a}=D.useTranslation();return e.jsxs("div",{className:"fadeIn animated",children:[!s&&e.jsx("h5",{className:"mb-2",children:a(J)}),e.jsxs(l.Row,{className:"mb-2",children:[e.jsx(l.Col,{md:8,children:e.jsx(W,{height:"100vh",isLibrary:s})}),e.jsx(l.Col,{md:4,children:e.jsx(Q,{targetMedia:n},n?.key)})]})]})};exports.default=X;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("reactstrap"),F=require("react-redux"),x=require("react"),t=require("./index-MYE51KWp.js"),v=require("formik"),E=require("yup"),D=require("react-i18next");function A(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:()=>s[a]})}}return n.default=s,Object.freeze(n)}const b=A(E),G=b.object({name:b.string().required("Name is required")}),U=(s,n)=>{const{targetMedia:a,onConfirm:i}=s,r=a?.key?"Update":"Create",m=a?.key?"Rename":"Folder";return e.jsx(v.Formik,{initialValues:{name:a?.name},enableReinitialize:!0,validationSchema:G,onSubmit:(c,u)=>{i&&i(c),u.resetForm()},children:c=>{const{values:u,touched:g,errors:p,handleChange:y,handleBlur:C,handleSubmit:j}=c;return e.jsx(t.CommonModal,{header:m,confirmText:r,onConfirm:j,ref:n,children:e.jsx(l.Row,{children:e.jsxs(l.Col,{md:12,children:[e.jsx(l.Input,{name:"name",placeholder:`Enter your ${a?.key?"file":"folder"} name`,value:u.name,onChange:y,onBlur:C("question")}),g.name&&p.name&&e.jsx(t.ErrorHandler,{text:p.name})]})})})}})},R=x.forwardRef(U),S=({isLibrary:s,step:n,breadcumb:a,currentPrefix:i,targetMedia:r,handleSelectFile:m,handleCreateFolder:c,handleRenameFile:u,handleGoBack:g,handleDownloadMedia:p,handleDeleteMediaOrFolder:y,showErrorAlert:C})=>{const j=x.useRef(null),I=x.useRef(null),{t:O}=D.useTranslation(),f=()=>j?.current?.toggle(),_=()=>e.jsxs(l.Row,{className:"p-2 pl-3",style:{gap:"8px"},children:[!!n&&e.jsxs(l.Button,{className:"mr-2",color:"secondary",onClick:g,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaArrowLeft,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Go up"})]}),r&&!r.isFolder&&e.jsxs(l.Button,{className:"mr-2",color:"success",onClick:p,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaDownload,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Download"})]}),r&&!s&&e.jsxs(l.Button,{className:"mr-2",color:"danger",onClick:y,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaTrash,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Delete"})]}),r&&!s&&!r.isFolder&&e.jsxs(l.Button,{className:"mr-2",color:"primary",onClick:f,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaEdit,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:"Rename"})]}),!r&&!s&&e.jsxs(l.Button,{className:"mr-2",color:"success",onClick:f,style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaFolderPlus,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:O("new_folder")})]}),!r&&!s&&e.jsxs(l.Button,{className:"mr-2",color:"info",onClick:()=>I?.current?.click(),style:{width:"auto",display:"flex",gap:"4px"},children:[e.jsx(t.FaFileUpload,{}),e.jsx(l.Label,{className:"ml-1 h6 m-0",children:O("upload")})]}),a&&e.jsx(l.Col,{className:"h-100 d-flex align-items-center",children:a})]});return e.jsxs("div",{children:[_(),e.jsx(R,{ref:j,targetMedia:r,onConfirm:async h=>{h.name!=""?r&&!r.isFolder?(f(),await u(h.name)):(f(),await c(i,h.name)):C("Name can't be empty")}}),e.jsx("input",{type:"file",id:"customMediaUpload",ref:I,style:{display:"none"},onChange:async h=>{const d=h?.target?.files[0];d&&await m({key:i,file:d})}})]})},B=x.memo(S),N={"media-wrapper":"_media-wrapper_1nc2k_6","media-image":"_media-image_1nc2k_11","media-image-selected":"_media-image-selected_1nc2k_17","media-title":"_media-title_1nc2k_21","filter-media-file":"_filter-media-file_1nc2k_30"};var o=(s=>(s[s.IMAGE=0]="IMAGE",s[s.VIDEO=1]="VIDEO",s[s.AUDIO=2]="AUDIO",s[s.DOC=3]="DOC",s[s.UNKNOW=4]="UNKNOW",s))(o||{});const q=["png","jpg","jpeg","gif"],M=["mp4","mp4v"],V=["txt","pdf","doc","docx","xls","csv"],L=["wav","mp3"],k=s=>{if(s){if(q.includes(s))return o.IMAGE;if(M.includes(s))return o.VIDEO;if(V.includes(s))return o.DOC;if(L.includes(s))return o.AUDIO}return o.UNKNOW},$=s=>{if(s.isFolder)return t.Images.FOLDER_IMAGE;const n=k(s.extension);return n===o.IMAGE?t.Images.PHOTO_IMAGE:n===o.VIDEO?t.Images.VIDEO_IMAGE:n===o.AUDIO?t.Images.AUDIO_IMAGE:n===o.DOC?t.Images.DOCS_IMAGE:t.Images.UNKNOW_IMAGE},T=({media:s,isTarget:n})=>{const a=$(s);return e.jsxs(l.Card,{className:`${n?N["media-image-selected"]:""} border-0 `,children:[e.jsx(l.CardImg,{className:`${N["media-image"]} p-1`,top:!0,width:"90%",src:t.getStaticFileUrl(a),alt:s.name}),e.jsx(l.CardBody,{className:"p-1",style:{height:45},children:e.jsx(l.CardTitle,{tag:"h6",className:N["media-title"],children:s.name})})]})},H=x.memo(T),P=[{value:o.IMAGE,label:"images"},{value:o.AUDIO,label:"audios"},{value:o.DOC,label:"docs"},{value:o.VIDEO,label:"videos"}],K=({changeFilters:s})=>{const[n,a]=x.useState(),{t:i}=D.useTranslation();return e.jsxs(l.Row,{className:`${N["filter-media-file"]}`,children:[e.jsx(l.Col,{sm:8,children:e.jsx(t.SearchBox,{initValue:"",onSearch:r=>s({searchString:r}),placeholder:i("type_something_to_search_by_file_name")})}),e.jsx(l.Col,{sm:4,children:e.jsx(t.CustomSelector,{value:n,isMulti:!0,options:P.map(r=>({...r,label:i(r.label)})),onChange:r=>{a(r);const m=r.map(c=>c.value);s({types:m})}})})]})},W=({height:s,isLibrary:n})=>{const{filters:a,mediaList:i,targetMedia:r,router:m,breadcrumb:c,changeFilters:u,handleOpenFolder:g,handleSelectMedia:p,handleSelectFile:y,handleCreateFolder:C,handleRenameFile:j,handleDownloadMedia:I,handleDeleteMediaOrFolder:O,handleGoBack:f,showErrorAlert:_}=t.useGalleryList(n),h=()=>i.map(d=>{const w=r?.key===d.key;return e.jsx(l.Col,{className:"p-2",xs:"auto",children:e.jsx("div",{onDoubleClick:()=>g(d),onClick:()=>p(d),className:N["media-wrapper"],children:e.jsx(H,{media:d,isTarget:w})})},d.key)});return e.jsxs(l.Card,{children:[e.jsxs(l.CardHeader,{children:[e.jsx(K,{changeFilters:u,filters:a}),e.jsx(B,{isLibrary:n,step:m.step,breadcumb:c,currentPrefix:a.prefix||"",targetMedia:r,handleSelectFile:y,handleCreateFolder:C,handleRenameFile:j,handleDownloadMedia:I,handleDeleteMediaOrFolder:O,handleGoBack:f,showErrorAlert:_})]}),e.jsx(l.CardBody,{style:{minHeight:s},children:e.jsx(l.Row,{className:"p-1",children:h()})})]})},z=({targetMedia:s})=>{if(!s||s?.isFolder)return e.jsx("div",{});const n=k(s.extension),a=t.getFileUrl(s.key||"");return e.jsxs(l.Card,{className:"position-sticky",children:[e.jsx(l.CardHeader,{children:s?.name||"Media name"}),n===o.IMAGE&&e.jsx(l.CardImg,{className:"p-2",src:a,loading:"lazy"}),n===o.VIDEO&&e.jsx("div",{className:"p-2",children:e.jsx("video",{id:s.key,width:"100%",height:"100%",controls:!0,children:e.jsx("source",{src:a})})}),n===o.AUDIO&&e.jsx("div",{className:"p-2",children:e.jsx("audio",{controls:!0,className:"w-100",children:e.jsx("source",{src:a})})}),e.jsxs(l.CardBody,{children:[e.jsx(l.CardTitle,{tag:"h6",children:"General Info"}),e.jsxs(l.CardText,{children:["File extension: ",s.extension?.toUpperCase()]})]})]})},Q=x.memo(z),J="media_gallery",X=({isLibrary:s})=>{const n=F.useSelector(i=>i.gallery.targetMedia),{t:a}=D.useTranslation();return e.jsxs("div",{className:"fadeIn animated",children:[!s&&e.jsx("h5",{className:"mb-2",children:a(J)}),e.jsxs(l.Row,{className:"mb-2",children:[e.jsx(l.Col,{md:8,children:e.jsx(W,{height:"100vh",isLibrary:s})}),e.jsx(l.Col,{md:4,children:e.jsx(Q,{targetMedia:n},n?.key)})]})]})};exports.default=X;
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { Row as k, Col as u, Input as $, Button as y, Label as g, Card as E, CardImg as S, CardBody as w, CardTitle as M, CardHeader as B, CardText as j } from "reactstrap";
3
3
  import { useSelector as q } from "react-redux";
4
4
  import { forwardRef as H, memo as v, useRef as U, useState as K } from "react";
5
- import { Y as W, E as L, am as z, an as P, ao as T, ap as Q, aq as X, ar as Y, as as C, h as J, _ as Z, X as ee, at as le, m as ae } from "./index-S9mI_rxc.mjs";
5
+ import { Y as W, E as L, am as z, an as P, ao as T, ap as Q, aq as X, ar as Y, as as C, h as J, _ as Z, X as ee, at as le, m as ae } from "./index-be-uwmuG.mjs";
6
6
  import { Formik as ne } from "formik";
7
7
  import * as b from "yup";
8
8
  import { useTranslation as A } from "react-i18next";
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import { useCallback as C, Fragment as te, useState as L, useEffect as M } from "react";
3
3
  import { Input as Q, Form as Me, FormGroup as Y, Row as re, Col as F } from "reactstrap";
4
4
  import { Link as Ee, useLocation as Ve, useNavigate as ue } from "react-router-dom";
5
- import { s as o, E as z, a as Le, A as qe, g as ne, b as f, f as Be, c as $, d as T, e as Fe, r as He, h as J, i as Ce, B as De, j as oe, k as ze, l as je, m as We, n as Ke, I as he, N as Ye, o as Je, p as Ze, q as Qe, t as Xe, u as es, v as ge, w as ye, x as ss, y as os, z as as } from "./index-S9mI_rxc.mjs";
5
+ import { s as o, E as z, a as Le, A as qe, g as ne, b as f, f as Be, c as $, d as T, e as Fe, r as He, h as J, i as Ce, B as De, j as oe, k as ze, l as je, m as We, n as Ke, I as he, N as Ye, o as Je, p as Ze, q as Qe, t as Xe, u as es, v as ge, w as ye, x as ss, y as os, z as as } from "./index-be-uwmuG.mjs";
6
6
  import { useDispatch as ie, useSelector as Ie } from "react-redux";
7
7
  import { Formik as le } from "formik";
8
8
  import * as A from "yup";
@@ -1 +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-D-Z2VEoE.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;
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-MYE51KWp.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;