@clickview/streamable-learning 0.34.0 → 0.34.1-dev.1

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 (437) hide show
  1. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  2. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  3. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  4. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  5. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  6. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  7. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  10. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  11. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  12. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  13. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  16. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  17. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  18. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  19. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  20. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  21. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  22. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  23. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  24. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  25. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  26. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  27. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  28. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  29. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  30. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  31. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  32. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  33. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  34. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  35. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  36. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  37. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  43. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  44. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  45. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  46. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  47. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  48. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  49. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  50. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  51. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  52. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  53. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  54. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  55. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  56. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  57. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  58. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  59. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  60. package/dist/bundles.json +2 -2
  61. package/dist/css/B-attovs.chunk.css +9 -0
  62. package/dist/css/B1NucFMn.chunk.css +1 -0
  63. package/dist/css/BPdg7JW4.chunk.css +1 -0
  64. package/dist/css/BPrUSCaY.chunk.css +1 -0
  65. package/dist/css/BR0fUt9D.chunk.css +1 -0
  66. package/dist/css/BhYm6SRm.chunk.css +1 -0
  67. package/dist/css/BiRz4h1c.chunk.css +1 -0
  68. package/dist/css/Bq1ChJn4.chunk.css +1 -0
  69. package/dist/css/Bt85j9js.chunk.css +1 -0
  70. package/dist/css/BuYrqi9E.chunk.css +1 -0
  71. package/dist/css/BugV1Bpa.chunk.css +1 -0
  72. package/dist/css/BuuVPl7n.chunk.css +1 -0
  73. package/dist/css/C1NkrNqQ.chunk.css +1 -0
  74. package/dist/css/C1qv5jz5.chunk.css +1 -0
  75. package/dist/css/C7XoyEPr.chunk.css +1 -0
  76. package/dist/css/C7_MDu56.chunk.css +1 -0
  77. package/dist/css/CC5F5C8O.chunk.css +1 -0
  78. package/dist/css/CChSC6Ta.chunk.css +1 -0
  79. package/dist/css/CCsCPLDG.chunk.css +1 -0
  80. package/dist/css/CD1qrI1T.chunk.css +1 -0
  81. package/dist/css/CKqvCBj4.chunk.css +1 -0
  82. package/dist/css/CLZ0Ycds.chunk.css +1 -0
  83. package/dist/css/CO7M4rZW.chunk.css +1 -0
  84. package/dist/css/CY0yvCW4.chunk.css +1 -0
  85. package/dist/css/CYGsw8FT.chunk.css +1 -0
  86. package/dist/css/Cbi3KYBa.chunk.css +1 -0
  87. package/dist/css/CliS8Q8r.chunk.css +1 -0
  88. package/dist/css/D-kQKsZN.chunk.css +1 -0
  89. package/dist/css/D2NwUVrK.chunk.css +1 -0
  90. package/dist/css/D4g1IoUU.chunk.css +1 -0
  91. package/dist/css/DBgpcO3T.chunk.css +1 -0
  92. package/dist/css/DDnpOnVB.chunk.css +1 -0
  93. package/dist/css/DZJSONGP.chunk.css +1 -0
  94. package/dist/css/Dc0zNt2E.chunk.css +1 -0
  95. package/dist/css/DeAfaPiD.chunk.css +1 -0
  96. package/dist/css/Dj731zLm.chunk.css +1 -0
  97. package/dist/css/DjPPxa0A.chunk.css +1 -0
  98. package/dist/css/DlOtoSz0.chunk.css +1 -0
  99. package/dist/css/DwduQat7.chunk.css +1 -0
  100. package/dist/css/Dzuu2GTx.chunk.css +1 -0
  101. package/dist/css/JAvsJreH.chunk.css +1 -0
  102. package/dist/css/NKlFYVOc.chunk.css +1 -0
  103. package/dist/css/VZd8qGtK.chunk.css +1 -0
  104. package/dist/css/Y7U--2na.chunk.css +1 -0
  105. package/dist/css/ir3IcK_l.chunk.css +1 -0
  106. package/dist/css/jbMisi9r.chunk.css +1 -0
  107. package/dist/css/kS5aDtIJ.chunk.css +1 -0
  108. package/dist/css/mqCL1o7m.chunk.css +1 -0
  109. package/dist/css/qZzkUeZk.chunk.css +1 -0
  110. package/dist/css/sC_H3yXE.chunk.css +1 -0
  111. package/dist/css/wR_6C_NV.chunk.css +1 -0
  112. package/dist/en.json +1 -0
  113. package/dist/scripts/-Oi3rE3V.chunk.js +5 -0
  114. package/dist/scripts/-Oi3rE3V.chunk.js.map +1 -0
  115. package/dist/scripts/-cwk-1Iv.chunk.js +2 -0
  116. package/dist/scripts/-cwk-1Iv.chunk.js.map +1 -0
  117. package/dist/scripts/4oi1ldJ4.chunk.js +3 -0
  118. package/dist/scripts/4oi1ldJ4.chunk.js.map +1 -0
  119. package/dist/scripts/6UeJLeAd.chunk.js +2 -0
  120. package/dist/scripts/6UeJLeAd.chunk.js.map +1 -0
  121. package/dist/scripts/8zar0u1i.chunk.js +2 -0
  122. package/dist/scripts/8zar0u1i.chunk.js.map +1 -0
  123. package/dist/scripts/9NIa7Pi_.chunk.js +2 -0
  124. package/dist/scripts/9NIa7Pi_.chunk.js.map +1 -0
  125. package/dist/scripts/B5OOLcT3.chunk.js +2 -0
  126. package/dist/scripts/B5OOLcT3.chunk.js.map +1 -0
  127. package/dist/scripts/B8XJmK96.chunk.js +8 -0
  128. package/dist/scripts/B8XJmK96.chunk.js.map +1 -0
  129. package/dist/scripts/BA6k9XoA.chunk.js +2 -0
  130. package/dist/scripts/BA6k9XoA.chunk.js.map +1 -0
  131. package/dist/scripts/BBnDr_iy.chunk.js +2 -0
  132. package/dist/scripts/BBnDr_iy.chunk.js.map +1 -0
  133. package/dist/scripts/BEL0opwe.chunk.js +2 -0
  134. package/dist/scripts/BEL0opwe.chunk.js.map +1 -0
  135. package/dist/scripts/BHmtLW9C.chunk.js +2 -0
  136. package/dist/scripts/BHmtLW9C.chunk.js.map +1 -0
  137. package/dist/scripts/BJ0C6oH6.chunk.js +2 -0
  138. package/dist/scripts/BJ0C6oH6.chunk.js.map +1 -0
  139. package/dist/scripts/BPcJv8Nj.chunk.js +2 -0
  140. package/dist/scripts/BPcJv8Nj.chunk.js.map +1 -0
  141. package/dist/scripts/BQQ9SPei.chunk.js +10 -0
  142. package/dist/scripts/BQQ9SPei.chunk.js.map +1 -0
  143. package/dist/scripts/BQQZ0Zva.chunk.js +2 -0
  144. package/dist/scripts/BQQZ0Zva.chunk.js.map +1 -0
  145. package/dist/scripts/BRKKXF-k.chunk.js +2 -0
  146. package/dist/scripts/BRKKXF-k.chunk.js.map +1 -0
  147. package/dist/scripts/BUhbk0mt.chunk.js +2 -0
  148. package/dist/scripts/BUhbk0mt.chunk.js.map +1 -0
  149. package/dist/scripts/BXKrMYdw.chunk.js +2 -0
  150. package/dist/scripts/BXKrMYdw.chunk.js.map +1 -0
  151. package/dist/scripts/B_eK8A25.chunk.js +2 -0
  152. package/dist/scripts/B_eK8A25.chunk.js.map +1 -0
  153. package/dist/scripts/BbjveACT.chunk.js +2 -0
  154. package/dist/scripts/BbjveACT.chunk.js.map +1 -0
  155. package/dist/scripts/BdHxGaRy.chunk.js +2 -0
  156. package/dist/scripts/BdHxGaRy.chunk.js.map +1 -0
  157. package/dist/scripts/BeHz9c4V.chunk.js +2 -0
  158. package/dist/scripts/BeHz9c4V.chunk.js.map +1 -0
  159. package/dist/scripts/BexFb8rj.chunk.js +2 -0
  160. package/dist/scripts/BexFb8rj.chunk.js.map +1 -0
  161. package/dist/scripts/Bi8YRFeY.chunk.js +2 -0
  162. package/dist/scripts/Bi8YRFeY.chunk.js.map +1 -0
  163. package/dist/scripts/Bj3i6I7i.chunk.js +2 -0
  164. package/dist/scripts/Bj3i6I7i.chunk.js.map +1 -0
  165. package/dist/scripts/BktU87GA.chunk.js +2 -0
  166. package/dist/scripts/BktU87GA.chunk.js.map +1 -0
  167. package/dist/scripts/Bl1HvG0b.chunk.js +2 -0
  168. package/dist/scripts/Bl1HvG0b.chunk.js.map +1 -0
  169. package/dist/scripts/BnWlQ7-4.chunk.js +2 -0
  170. package/dist/scripts/BnWlQ7-4.chunk.js.map +1 -0
  171. package/dist/scripts/BoqzK1u7.chunk.js +2 -0
  172. package/dist/scripts/BoqzK1u7.chunk.js.map +1 -0
  173. package/dist/scripts/Bsa3zcW0.chunk.js +2 -0
  174. package/dist/scripts/Bsa3zcW0.chunk.js.map +1 -0
  175. package/dist/scripts/Bt3kaRtU.chunk.js +6 -0
  176. package/dist/scripts/Bt3kaRtU.chunk.js.map +1 -0
  177. package/dist/scripts/BtiKTu8r.chunk.js +2 -0
  178. package/dist/scripts/BtiKTu8r.chunk.js.map +1 -0
  179. package/dist/scripts/BwOoIPmc.chunk.js +2 -0
  180. package/dist/scripts/BwOoIPmc.chunk.js.map +1 -0
  181. package/dist/scripts/BwuSNwcs.chunk.js +2 -0
  182. package/dist/scripts/BwuSNwcs.chunk.js.map +1 -0
  183. package/dist/scripts/Byn8R7bs.chunk.js +2 -0
  184. package/dist/scripts/Byn8R7bs.chunk.js.map +1 -0
  185. package/dist/scripts/C2Zu5vKc.chunk.js +2 -0
  186. package/dist/scripts/C2Zu5vKc.chunk.js.map +1 -0
  187. package/dist/scripts/C2uxO8e2.chunk.js +2 -0
  188. package/dist/scripts/C2uxO8e2.chunk.js.map +1 -0
  189. package/dist/scripts/C35NlkUr.chunk.js +2 -0
  190. package/dist/scripts/C35NlkUr.chunk.js.map +1 -0
  191. package/dist/scripts/C5QPXJGU.chunk.js +15 -0
  192. package/dist/scripts/C5QPXJGU.chunk.js.map +1 -0
  193. package/dist/scripts/C6mGMCz4.chunk.js +2 -0
  194. package/dist/scripts/C6mGMCz4.chunk.js.map +1 -0
  195. package/dist/scripts/C8ZuWYfb.chunk.js +2 -0
  196. package/dist/scripts/C8ZuWYfb.chunk.js.map +1 -0
  197. package/dist/scripts/CEmtkty-.chunk.js +2 -0
  198. package/dist/scripts/CEmtkty-.chunk.js.map +1 -0
  199. package/dist/scripts/CICkmQW6.chunk.js +2 -0
  200. package/dist/scripts/CICkmQW6.chunk.js.map +1 -0
  201. package/dist/scripts/CLumRL-T.chunk.js +2 -0
  202. package/dist/scripts/CLumRL-T.chunk.js.map +1 -0
  203. package/dist/scripts/CO_D2O4I.chunk.js +2 -0
  204. package/dist/scripts/CO_D2O4I.chunk.js.map +1 -0
  205. package/dist/scripts/CPXlV0fg.chunk.js +2 -0
  206. package/dist/scripts/CPXlV0fg.chunk.js.map +1 -0
  207. package/dist/scripts/CQZOieOF.chunk.js +2 -0
  208. package/dist/scripts/CQZOieOF.chunk.js.map +1 -0
  209. package/dist/scripts/CQoWqq54.chunk.js +2 -0
  210. package/dist/scripts/CQoWqq54.chunk.js.map +1 -0
  211. package/dist/scripts/CRT9qru0.chunk.js +2 -0
  212. package/dist/scripts/CRT9qru0.chunk.js.map +1 -0
  213. package/dist/scripts/CU6iZ8MR.chunk.js +2 -0
  214. package/dist/scripts/CU6iZ8MR.chunk.js.map +1 -0
  215. package/dist/scripts/CUltMbyK.chunk.js +2 -0
  216. package/dist/scripts/CUltMbyK.chunk.js.map +1 -0
  217. package/dist/scripts/CW7x8M-z.chunk.js +2 -0
  218. package/dist/scripts/CW7x8M-z.chunk.js.map +1 -0
  219. package/dist/scripts/CYlwi5iC.chunk.js +7 -0
  220. package/dist/scripts/CYlwi5iC.chunk.js.map +1 -0
  221. package/dist/scripts/CgJckl-g.chunk.js +2 -0
  222. package/dist/scripts/CgJckl-g.chunk.js.map +1 -0
  223. package/dist/scripts/Cj5ETNHP.chunk.js +2 -0
  224. package/dist/scripts/Cj5ETNHP.chunk.js.map +1 -0
  225. package/dist/scripts/Cmu1J2M7.chunk.js +262 -0
  226. package/dist/scripts/Cmu1J2M7.chunk.js.map +1 -0
  227. package/dist/scripts/Cr8fUgj9.chunk.js +2 -0
  228. package/dist/scripts/Cr8fUgj9.chunk.js.map +1 -0
  229. package/dist/scripts/CtM_cXum.chunk.js +2 -0
  230. package/dist/scripts/CtM_cXum.chunk.js.map +1 -0
  231. package/dist/scripts/Cv1FGdNu.chunk.js +2 -0
  232. package/dist/scripts/Cv1FGdNu.chunk.js.map +1 -0
  233. package/dist/scripts/CvPDjx7y.chunk.js +2 -0
  234. package/dist/scripts/CvPDjx7y.chunk.js.map +1 -0
  235. package/dist/scripts/D0bydDVL.chunk.js +2 -0
  236. package/dist/scripts/D0bydDVL.chunk.js.map +1 -0
  237. package/dist/scripts/D1EE4AEz.chunk.js +356 -0
  238. package/dist/scripts/D1EE4AEz.chunk.js.map +1 -0
  239. package/dist/scripts/D84-WY3k.chunk.js +2 -0
  240. package/dist/scripts/D84-WY3k.chunk.js.map +1 -0
  241. package/dist/scripts/DAh7Ea13.chunk.js +2 -0
  242. package/dist/scripts/DAh7Ea13.chunk.js.map +1 -0
  243. package/dist/scripts/DBIkG3Bu.chunk.js +2 -0
  244. package/dist/scripts/DBIkG3Bu.chunk.js.map +1 -0
  245. package/dist/scripts/DCcI7sWt.chunk.js +2 -0
  246. package/dist/scripts/DCcI7sWt.chunk.js.map +1 -0
  247. package/dist/scripts/DEP24A-f.chunk.js +2 -0
  248. package/dist/scripts/DEP24A-f.chunk.js.map +1 -0
  249. package/dist/scripts/DGFORsAE.chunk.js +2 -0
  250. package/dist/scripts/DGFORsAE.chunk.js.map +1 -0
  251. package/dist/scripts/DGaf-Jy9.chunk.js +2 -0
  252. package/dist/scripts/DGaf-Jy9.chunk.js.map +1 -0
  253. package/dist/scripts/DJyZ6Hx7.chunk.js +2 -0
  254. package/dist/scripts/DJyZ6Hx7.chunk.js.map +1 -0
  255. package/dist/scripts/DOCam-GK.chunk.js +2 -0
  256. package/dist/scripts/DOCam-GK.chunk.js.map +1 -0
  257. package/dist/scripts/DSLX3H2r.chunk.js +2 -0
  258. package/dist/scripts/DSLX3H2r.chunk.js.map +1 -0
  259. package/dist/scripts/DSq4f4jm.chunk.js +2 -0
  260. package/dist/scripts/DSq4f4jm.chunk.js.map +1 -0
  261. package/dist/scripts/DXxBqeLg.chunk.js +2 -0
  262. package/dist/scripts/DXxBqeLg.chunk.js.map +1 -0
  263. package/dist/scripts/DZ6Jrm23.chunk.js +2 -0
  264. package/dist/scripts/DZ6Jrm23.chunk.js.map +1 -0
  265. package/dist/scripts/Daes5Wgy.chunk.js +2 -0
  266. package/dist/scripts/Daes5Wgy.chunk.js.map +1 -0
  267. package/dist/scripts/DeUbJqVo.chunk.js +2 -0
  268. package/dist/scripts/DeUbJqVo.chunk.js.map +1 -0
  269. package/dist/scripts/DgEqkZy0.chunk.js +8 -0
  270. package/dist/scripts/DgEqkZy0.chunk.js.map +1 -0
  271. package/dist/scripts/DhB-Uugx.chunk.js +2 -0
  272. package/dist/scripts/DhB-Uugx.chunk.js.map +1 -0
  273. package/dist/scripts/DhqAA1wT.chunk.js +2 -0
  274. package/dist/scripts/DhqAA1wT.chunk.js.map +1 -0
  275. package/dist/scripts/Di5-l4QJ.chunk.js +2 -0
  276. package/dist/scripts/Di5-l4QJ.chunk.js.map +1 -0
  277. package/dist/scripts/DiQkAtUx.chunk.js +53 -0
  278. package/dist/scripts/DiQkAtUx.chunk.js.map +1 -0
  279. package/dist/scripts/DireiQEp.chunk.js +2 -0
  280. package/dist/scripts/DireiQEp.chunk.js.map +1 -0
  281. package/dist/scripts/Dj66TI5y.chunk.js +2 -0
  282. package/dist/scripts/Dj66TI5y.chunk.js.map +1 -0
  283. package/dist/scripts/DkFkYS-j.chunk.js +2 -0
  284. package/dist/scripts/DkFkYS-j.chunk.js.map +1 -0
  285. package/dist/scripts/Dkq5GtOV.chunk.js +2 -0
  286. package/dist/scripts/Dkq5GtOV.chunk.js.map +1 -0
  287. package/dist/scripts/DmSSmUHZ.chunk.js +2 -0
  288. package/dist/scripts/DmSSmUHZ.chunk.js.map +1 -0
  289. package/dist/scripts/DoQU9vjn.chunk.js +2 -0
  290. package/dist/scripts/DoQU9vjn.chunk.js.map +1 -0
  291. package/dist/scripts/DtHh_hpg.chunk.js +2 -0
  292. package/dist/scripts/DtHh_hpg.chunk.js.map +1 -0
  293. package/dist/scripts/DvDdiDQN.chunk.js +7 -0
  294. package/dist/scripts/DvDdiDQN.chunk.js.map +1 -0
  295. package/dist/scripts/DwhG2uva.chunk.js +2 -0
  296. package/dist/scripts/DwhG2uva.chunk.js.map +1 -0
  297. package/dist/scripts/DxJlWHZr.chunk.js +2 -0
  298. package/dist/scripts/DxJlWHZr.chunk.js.map +1 -0
  299. package/dist/scripts/DxmeZ4C9.chunk.js +2 -0
  300. package/dist/scripts/DxmeZ4C9.chunk.js.map +1 -0
  301. package/dist/scripts/KuveJuNy.chunk.js +2 -0
  302. package/dist/scripts/KuveJuNy.chunk.js.map +1 -0
  303. package/dist/scripts/LKCLmV2A.chunk.js +2 -0
  304. package/dist/scripts/LKCLmV2A.chunk.js.map +1 -0
  305. package/dist/scripts/RnuR8yr3.chunk.js +2 -0
  306. package/dist/scripts/RnuR8yr3.chunk.js.map +1 -0
  307. package/dist/scripts/XxrnElSv.chunk.js +2 -0
  308. package/dist/scripts/XxrnElSv.chunk.js.map +1 -0
  309. package/dist/scripts/YF_QoXEj.chunk.js +3 -0
  310. package/dist/scripts/YF_QoXEj.chunk.js.map +1 -0
  311. package/dist/scripts/Z2sDSVPb.chunk.js +2 -0
  312. package/dist/scripts/Z2sDSVPb.chunk.js.map +1 -0
  313. package/dist/scripts/Zbze2j9b.chunk.js +2 -0
  314. package/dist/scripts/Zbze2j9b.chunk.js.map +1 -0
  315. package/dist/scripts/app-C56EnOMP.js +216 -0
  316. package/dist/scripts/app-C56EnOMP.js.map +1 -0
  317. package/dist/scripts/cvX-F_mx.chunk.js +2 -0
  318. package/dist/scripts/cvX-F_mx.chunk.js.map +1 -0
  319. package/dist/scripts/h34ZSRKe.chunk.js +2 -0
  320. package/dist/scripts/h34ZSRKe.chunk.js.map +1 -0
  321. package/dist/scripts/leubTuJo.chunk.js +2 -0
  322. package/dist/scripts/leubTuJo.chunk.js.map +1 -0
  323. package/dist/scripts/m5XtnRaH.chunk.js +2 -0
  324. package/dist/scripts/m5XtnRaH.chunk.js.map +1 -0
  325. package/dist/scripts/nay4aGaa.chunk.js +2 -0
  326. package/dist/scripts/nay4aGaa.chunk.js.map +1 -0
  327. package/dist/scripts/p61U8kXz.chunk.js +2 -0
  328. package/dist/scripts/p61U8kXz.chunk.js.map +1 -0
  329. package/dist/scripts/pkzD5BEm.chunk.js +2 -0
  330. package/dist/scripts/pkzD5BEm.chunk.js.map +1 -0
  331. package/dist/scripts/sc9-PV9Y.chunk.js +2 -0
  332. package/dist/scripts/sc9-PV9Y.chunk.js.map +1 -0
  333. package/dist/scripts/tAsRziXo.chunk.js +8 -0
  334. package/dist/scripts/tAsRziXo.chunk.js.map +1 -0
  335. package/dist/scripts/xrHhD6CF.chunk.js +8 -0
  336. package/dist/scripts/xrHhD6CF.chunk.js.map +1 -0
  337. package/dist/scripts/xxo027lm.chunk.js +2 -0
  338. package/dist/scripts/xxo027lm.chunk.js.map +1 -0
  339. package/package.json +5 -3
  340. package/typings/utils/imports.d.ts +2 -1
  341. package/vite.config.ts +6 -0
  342. package/dist/css/103-streamable-learning-5060b6cda5.chunk.css +0 -7
  343. package/dist/css/1269-streamable-learning-a12c4ebc99.chunk.css +0 -2
  344. package/dist/css/1457-streamable-learning-c8c8b3b9b1.chunk.css +0 -50
  345. package/dist/css/2334-streamable-learning-de03ae073a.chunk.css +0 -2
  346. package/dist/css/3322-streamable-learning-510e1aa3f3.chunk.css +0 -34
  347. package/dist/css/3838-streamable-learning-da10685fe8.chunk.css +0 -22
  348. package/dist/css/4254-streamable-learning-e493f4a027.chunk.css +0 -2
  349. package/dist/css/4607-streamable-learning-2605302fc2.chunk.css +0 -90
  350. package/dist/css/4772-streamable-learning-f83b838d71.chunk.css +0 -9
  351. package/dist/css/5003-streamable-learning-b38d2ddbbe.chunk.css +0 -98
  352. package/dist/css/5565-streamable-learning-0caae3809b.chunk.css +0 -13
  353. package/dist/css/6017-streamable-learning-098a205d01.chunk.css +0 -6
  354. package/dist/css/6356-streamable-learning-8c5b220bf6.chunk.css +0 -1
  355. package/dist/css/6987-streamable-learning-8f682301c6.chunk.css +0 -1
  356. package/dist/css/7317-streamable-learning-b5d226bbb6.chunk.css +0 -5
  357. package/dist/css/8058-streamable-learning-539cf7be18.chunk.css +0 -12
  358. package/dist/css/8294-streamable-learning-c797263ac2.chunk.css +0 -1
  359. package/dist/css/8496-streamable-learning-ce19f6ca52.chunk.css +0 -13
  360. package/dist/css/8601-streamable-learning-f525210660.chunk.css +0 -6
  361. package/dist/css/9514-streamable-learning-251703c6d1.chunk.css +0 -2
  362. package/dist/css/9766-streamable-learning-31650ffe5d.chunk.css +0 -8
  363. package/dist/css/9842-streamable-learning-24729103f7.chunk.css +0 -4
  364. package/dist/css/9899-streamable-learning-0338f8d2dc.chunk.css +0 -4
  365. package/dist/css/streamable-learning-dd0c1095d5.css +0 -23
  366. package/dist/languages/en.json +0 -1
  367. package/dist/scripts/103-aceced8961-streamable-learning.chunk.js +0 -1
  368. package/dist/scripts/1097-680a971192-streamable-learning.chunk.js +0 -2
  369. package/dist/scripts/1097-680a971192-streamable-learning.chunk.js.LICENSE.txt +0 -105
  370. package/dist/scripts/1269-2d0b903343-streamable-learning.chunk.js +0 -2
  371. package/dist/scripts/1269-2d0b903343-streamable-learning.chunk.js.LICENSE.txt +0 -1
  372. package/dist/scripts/1457-899f40d09a-streamable-learning.chunk.js +0 -1
  373. package/dist/scripts/1482-b1dd75897c-streamable-learning.chunk.js +0 -1
  374. package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js +0 -2
  375. package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js.LICENSE.txt +0 -9
  376. package/dist/scripts/2042-d51622d63e-streamable-learning.chunk.js +0 -1
  377. package/dist/scripts/2087-eba9033b1c-streamable-learning.chunk.js +0 -1
  378. package/dist/scripts/2245-8cd3224e1b-streamable-learning.chunk.js +0 -1
  379. package/dist/scripts/2334-00b028191d-streamable-learning.chunk.js +0 -1
  380. package/dist/scripts/2676-c842ec7e8d-streamable-learning.chunk.js +0 -2
  381. package/dist/scripts/2676-c842ec7e8d-streamable-learning.chunk.js.LICENSE.txt +0 -1
  382. package/dist/scripts/2877-5ffc9711f6-streamable-learning.chunk.js +0 -1
  383. package/dist/scripts/2911-9e2725fd22-streamable-learning.chunk.js +0 -1
  384. package/dist/scripts/3057-731a8ca978-streamable-learning.chunk.js +0 -1
  385. package/dist/scripts/3093-efbcc927ea-streamable-learning.chunk.js +0 -1
  386. package/dist/scripts/3186-d1a6ccffde-streamable-learning.chunk.js +0 -1
  387. package/dist/scripts/3322-33c015dec9-streamable-learning.chunk.js +0 -1
  388. package/dist/scripts/3472-50ca92bde3-streamable-learning.chunk.js +0 -1
  389. package/dist/scripts/3838-4a38f33dc2-streamable-learning.chunk.js +0 -1
  390. package/dist/scripts/3941-2ef15ca9ac-streamable-learning.chunk.js +0 -1
  391. package/dist/scripts/4254-ef581b8105-streamable-learning.chunk.js +0 -1
  392. package/dist/scripts/4607-36e8f52a55-streamable-learning.chunk.js +0 -2
  393. package/dist/scripts/4607-36e8f52a55-streamable-learning.chunk.js.LICENSE.txt +0 -1
  394. package/dist/scripts/4772-3cb280f959-streamable-learning.chunk.js +0 -2
  395. package/dist/scripts/4772-3cb280f959-streamable-learning.chunk.js.LICENSE.txt +0 -1
  396. package/dist/scripts/4951-df701c6a8d-streamable-learning.chunk.js +0 -1
  397. package/dist/scripts/5003-c23dd99aad-streamable-learning.chunk.js +0 -2
  398. package/dist/scripts/5003-c23dd99aad-streamable-learning.chunk.js.LICENSE.txt +0 -1
  399. package/dist/scripts/5088-2e09e1ba6e-streamable-learning.chunk.js +0 -1
  400. package/dist/scripts/5173-a800a17d0d-streamable-learning.chunk.js +0 -1
  401. package/dist/scripts/5446-2cbe9f9d1b-streamable-learning.chunk.js +0 -1
  402. package/dist/scripts/5543-205aaa36a6-streamable-learning.chunk.js +0 -1
  403. package/dist/scripts/5565-224d86dc1b-streamable-learning.chunk.js +0 -1
  404. package/dist/scripts/578-2cc99f46f7-streamable-learning.chunk.js +0 -1
  405. package/dist/scripts/6017-5bd6f9bf7a-streamable-learning.chunk.js +0 -2
  406. package/dist/scripts/6017-5bd6f9bf7a-streamable-learning.chunk.js.LICENSE.txt +0 -1
  407. package/dist/scripts/6356-eefa3ff22e-streamable-learning.chunk.js +0 -1
  408. package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js +0 -2
  409. package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js.LICENSE.txt +0 -1
  410. package/dist/scripts/6987-e58de31cfe-streamable-learning.chunk.js +0 -1
  411. package/dist/scripts/7317-6b7186c85d-streamable-learning.chunk.js +0 -1
  412. package/dist/scripts/7347-e2b82be015-streamable-learning.chunk.js +0 -1
  413. package/dist/scripts/7570-cd4f70ff52-streamable-learning.chunk.js +0 -2
  414. package/dist/scripts/7570-cd4f70ff52-streamable-learning.chunk.js.LICENSE.txt +0 -1
  415. package/dist/scripts/7904-e07cdef2de-streamable-learning.chunk.js +0 -1
  416. package/dist/scripts/7925-1e1cfa2a04-streamable-learning.chunk.js +0 -1
  417. package/dist/scripts/8058-5333f0f01b-streamable-learning.chunk.js +0 -1
  418. package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js +0 -2
  419. package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js.LICENSE.txt +0 -60
  420. package/dist/scripts/8397-39ce77876d-streamable-learning.chunk.js +0 -1
  421. package/dist/scripts/8496-1b2519f9fd-streamable-learning.chunk.js +0 -2
  422. package/dist/scripts/8496-1b2519f9fd-streamable-learning.chunk.js.LICENSE.txt +0 -1
  423. package/dist/scripts/8599-b74e1ab6e3-streamable-learning.chunk.js +0 -1
  424. package/dist/scripts/8601-37783cf18b-streamable-learning.chunk.js +0 -1
  425. package/dist/scripts/8819-2a50dd6a9b-streamable-learning.chunk.js +0 -1
  426. package/dist/scripts/8937-5103db88d8-streamable-learning.chunk.js +0 -1
  427. package/dist/scripts/9390-0f988af378-streamable-learning.chunk.js +0 -1
  428. package/dist/scripts/9514-a31ca9af06-streamable-learning.chunk.js +0 -1
  429. package/dist/scripts/9766-7c34cab592-streamable-learning.chunk.js +0 -2
  430. package/dist/scripts/9766-7c34cab592-streamable-learning.chunk.js.LICENSE.txt +0 -1
  431. package/dist/scripts/9842-3add7f20d0-streamable-learning.chunk.js +0 -1
  432. package/dist/scripts/9899-ca1a1a08c4-streamable-learning.chunk.js +0 -2
  433. package/dist/scripts/9899-ca1a1a08c4-streamable-learning.chunk.js.LICENSE.txt +0 -1
  434. package/dist/scripts/bundle-91983aeacb.min.js +0 -2
  435. package/dist/scripts/bundle-91983aeacb.min.js.LICENSE.txt +0 -108
  436. package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js +0 -2
  437. package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js.LICENSE.txt +0 -21
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BeHz9c4V.chunk.js","sources":["../../../../libs/shared/src/apps/calendar/components/calendar-cell/CalendarCell.tsx","../../../../libs/shared/src/apps/calendar/components/empty-state/SpecialEventEmptyState.tsx","../../../../libs/shared/src/apps/calendar/components/special-event-list/SpecialEventList.tsx","../../../../libs/shared/src/apps/calendar/components/calendar-body/CalendarBody.tsx","../../../../libs/shared/src/apps/calendar/utils/CalendarHelper.ts","../../../../libs/shared/src/apps/calendar/components/calendar-nav/CalendarNav.tsx","../../../../libs/shared/src/apps/calendar/components/error-state/SpecialEventErrorState.tsx","../../../../libs/shared/src/apps/calendar/hooks/useCalendarWeeksTable.ts","../../src/apps/calendar/hooks/useCalendarEventsData.ts","../../src/apps/calendar/views/calendar-view/CalendarView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { CalendarDay } from 'libs/shared/apps/calendar/components/calendar-day/CalendarDay';\nimport { CalendarCellProps } from 'libs/shared/apps/calendar/interfaces/CalendarCellProps';\nimport { HoverToPortalContainer } from 'libs/shared/components/hover-to-portal-container/HoverToPortalContainer';\n\nimport styles from './calendar-cell.module.scss';\n\nfunction getIsWeekend(date: Date): boolean {\n return DateHelper.getWeekday(date) === 0 || DateHelper.getWeekday(date) === 6;\n}\n\nexport function CalendarCell(props: CalendarCellProps): JSX.Element {\n const { date, notCurrentMonth } = props;\n const [ sliderStep, setSliderStep ] = React.useState<number>(0);\n\n let wrapperClassname = `position-relative border ${props.theme.border} ${styles.wrapper}`;\n if (getIsWeekend(date)) wrapperClassname += ` ${styles.weekend}`;\n if (notCurrentMonth) wrapperClassname += `opacity-50`;\n\n const eventsOnDay = props.events?.filter(e => DateHelper.isSame(props.date, e.startDate)) || [];\n const updatedProps = { ...props, eventsOnDay, sliderStep, setSliderStep };\n\n return (\n <td className={wrapperClassname}>\n {eventsOnDay?.length > 0 ? (\n <HoverToPortalContainer<CalendarCellProps>\n hoverableComponent={CalendarDay}\n componentProps={updatedProps}\n hoverScale={1.35}\n />\n ) : <CalendarDay {...updatedProps} isHovering={false} />}\n </td>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'specialEvent.eventsEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface SpecialEventEmptyStateProps {\n appLink: Core.AppLink;\n imageUrl: string;\n heading?: string;\n}\n\nexport function SpecialEventEmptyState(props: SpecialEventEmptyStateProps): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('info')} />\n <EmptyState.Heading>{props.heading || <Text phrase='heading' />}</EmptyState.Heading>\n {props.appLink &&\n <EmptyState.Info>\n <>\n <Text namespace={namespace} phrase='info' />\n <AppLink appLink={props.appLink}>\n <span className='text-info'>{getPhrase('link')}</span>\n </AppLink>\n </>\n </EmptyState.Info>\n }\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { SpecialEventListItem } from 'libs/shared/apps/calendar/components/special-event-list-item/SpecialEventListItem';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { CalendarEvent, CalendarEventContent } from 'libs/shared/interfaces';\n\nimport styles from './special-event-list.module.scss';\n\ninterface SpecialEventListProps {\n events: CalendarEvent[];\n presentationId: string;\n appLink: (content: CalendarEventContent, slug?: string) => Core.AppLink;\n getIconUrl?: (content: CalendarEventContent) => string;\n getBannerUrl?: (content: CalendarEventContent) => string;\n getBackgroundColor?: (content: CalendarEventContent) => string;\n getActionLabel?: (content?: CalendarEventContent) => string;\n getStartTime?: (content: CalendarEventContent) => string;\n isPastEvent?: (content: CalendarEventContent) => boolean;\n}\n\nexport function SpecialEventList(props: SpecialEventListProps): JSX.Element {\n const eventsInMonth: Record<string, CalendarEvent<CalendarEventContent>[]> = {};\n\n props.events.forEach(e => {\n const startDate = e.startDate;\n if (eventsInMonth[startDate]) {\n eventsInMonth[startDate].push(e);\n } else {\n eventsInMonth[startDate] = [e];\n }\n });\n\n const keys = Object.keys(eventsInMonth);\n keys.sort((a, b) => DateHelper.isBefore(a, b) ? -1 : 0);\n\n return (\n <div className='py-1'>\n {keys.map((k, idx) => {\n let prevTime = '';\n let currentTime = '';\n return (\n <div key={k}>\n <div className={`h4 mt-4 ${styles.date} ${idx === 0 ? styles.first : ''}`}>{SpecialEventHelper.getOrdinalDate(k)}</div>\n {eventsInMonth[k].map(e => {\n prevTime = currentTime;\n currentTime = props.getStartTime?.(e.content);\n\n return (\n <SpecialEventListItem\n key={e.content.id}\n getAppLink={(id, name) => {\n return props.appLink(id, TextHelper.slugify(name));\n }}\n event={e}\n presentationId={props.presentationId}\n getIconUrl={props.getIconUrl}\n getBannerUrl={props.getBannerUrl}\n getBackgroundColor={props.getBackgroundColor}\n getActionLabel={() => props.getActionLabel(e.content)}\n getStartTime={props.getStartTime && prevTime !== currentTime\n ? props.getStartTime\n : null\n }\n isPastEvent={props.isPastEvent}\n />\n );\n })}\n </div>\n );\n })}\n </div>\n );\n}","import React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { CalendarCell } from 'libs/shared/apps/calendar/components/calendar-cell/CalendarCell';\nimport { CalendarAppLinks } from 'libs/shared/apps/calendar/interfaces/CalendarAppLinks';\nimport { CalendarImageUrls } from 'libs/shared/apps/calendar/interfaces/CalendarImageUrls';\nimport { CalendarTheme } from 'libs/shared/apps/calendar/interfaces/CalendarTheme';\nimport { MonthQuery } from 'libs/shared/apps/calendar/interfaces/MonthQuery';\nimport { PatchedDate } from 'libs/shared/apps/calendar/utils/CalendarHelper';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { Timezone } from 'libs/shared/apps/streamable-learning/constants/Timezones';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { CalendarEvent, CalendarEventContent } from 'libs/shared/interfaces';\n\nimport { SpecialEventEmptyState } from '../empty-state/SpecialEventEmptyState';\nimport { SpecialEventList } from '../special-event-list/SpecialEventList';\n\nimport styles from './calendar-body.module.scss';\n\nCalendarBody.defaultProps = {\n theme: {\n border: 'border-light-blue',\n background: 'bg-light-blue'\n }\n};\n\ninterface CalendarBodyProps {\n weekDays: PatchedDate[][];\n weekDaysHeader: string[];\n events?: CalendarEvent[];\n monthQuery: MonthQuery;\n viewingMonth: Date;\n eventsLoaded: boolean;\n presentationId: string;\n appLinks: CalendarAppLinks;\n imageUrls: CalendarImageUrls;\n viewMode?: string;\n theme?: CalendarTheme;\n emptyStateHeading?: string;\n fadePastEvents?: boolean;\n timezone?: Timezone;\n getIconUrl?: (content: CalendarEventContent) => string;\n getBackgroundColor?: (content: CalendarEventContent) => string;\n getBannerUrl?: (content: CalendarEventContent) => string;\n getCoverUrl?: (content: CalendarEventContent) => string;\n getActionLabel?: (content?: CalendarEventContent) => string;\n getStartTime?: (content: CalendarEventContent) => string;\n getHardCodedEvent?: (content: CalendarEventContent) => HashObject;\n isPastEvent?: (content: CalendarEventContent) => boolean;\n}\n\nexport function CalendarBody(props: CalendarBodyProps): JSX.Element {\n const { appLinks, imageUrls } = props;\n\n const breakpoints = useBreakpoints();\n\n const eventsInMonth = SpecialEventHelper.getEventsInMonth(props.events || [], props.viewingMonth);\n\n const [ hasInitialized, setHasInitialized ] = React.useState(false);\n const [ hoveredEvent, setHoveredEvent ] = React.useState<CalendarEvent<CalendarEventContent>>(null);\n\n if (props.eventsLoaded && !eventsInMonth?.length) {\n return (\n <SpecialEventEmptyState\n imageUrl={imageUrls.emptyState}\n appLink={appLinks.emptyStateRedirect?.()}\n heading={props.emptyStateHeading}\n />\n );\n }\n\n if (props.viewMode === 'list' || breakpoints.xs || breakpoints.sm || breakpoints.md) {\n if (!props.eventsLoaded) {\n return (\n <div className='d-flex justify-content-center align-items-center mb-4'>\n <Spinner as='div' animation='border' role='status' />\n </div>\n );\n }\n\n return (\n <SpecialEventList\n events={eventsInMonth}\n presentationId={props.presentationId}\n appLink={props.appLinks.event}\n getIconUrl={props.getIconUrl}\n getBannerUrl={props.getBannerUrl}\n getBackgroundColor={props.getBackgroundColor}\n getActionLabel={props.getActionLabel}\n getStartTime={props.getStartTime}\n isPastEvent={props.isPastEvent}\n />\n );\n }\n\n return (\n <table className='user-select-none w-100 mt-3 overflow-hidden rounded-top-lg'>\n <thead className={`border ${props.theme.border} ${styles.thead}`}>\n <tr className={`fw-semibold ${props.theme.background} ${styles.header}`}>\n {props.weekDaysHeader.map(w => <th key={w} className='px-2 h4' scope='col'>{w}</th>)}\n </tr>\n </thead>\n\n <tbody>\n {props.weekDays.map(w => (\n <tr key={w[0].toString()}>\n {w.map(d => {\n return (\n <CalendarCell\n key={d.toString()}\n date={d}\n notCurrentMonth={!!d.notCurrentMonth}\n events={props.events}\n monthQuery={props.monthQuery}\n hasInitialized={hasInitialized}\n setHasInitialized={setHasInitialized}\n presentationId={props.presentationId}\n hoveredEvent={hoveredEvent}\n theme={props.theme}\n setHoveredEvent={setHoveredEvent}\n getEventsListAppLink={() => props.appLinks.eventList(props.monthQuery, d, props.presentationId)}\n getTopicAppLink={(calendarEventContent, slug) =>\n props.appLinks.event(calendarEventContent, slug)}\n getIconUrl={props.getIconUrl}\n getBackgroundColor={props.getBackgroundColor}\n getCoverUrl={props.getCoverUrl}\n getHardCodedEvent={props.getHardCodedEvent}\n fadePastEvents={props.fadePastEvents}\n timezone={props.timezone}\n />\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}","/**\n * Inspired by nghilevi/moment-calendar-2\n */\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nexport type PatchedDate = Date & { notCurrentMonth: boolean }\nexport type WeeksTable = PatchedDate[][]\nexport type DatePositionMap = Record<string, {row: number, col: number}>\n\nconst CALENDAR_START_DATE = new Date('2023-01-01');\nconst NEXT_MONTH_LIMIT = 12; // in month\n\nfunction getDaysOfMonth(date: Date): PatchedDate[] {\n const numberOfDays = DateHelper.daysInMonth(date);\n\n const daysArray = [];\n\n for (let i = 1; i <= numberOfDays; i++) {\n const day = DateHelper.set(date, 'date', i);\n daysArray.push(Object.assign(day, { notCurrentMonth: false }));\n }\n\n return daysArray;\n}\n\n// Get days from previous month overlapping current month\nfunction getPreviousMonthOverlappingDays(date: Date, startAtMon: boolean): PatchedDate[] {\n const firstDay = DateHelper.startOf(date, 'month');\n const firstWeekDay = DateHelper.getWeekday(firstDay);\n const prevMonthDays = [];\n const prevMonthDaysCount = startAtMon ? firstWeekDay === 0 ? 6 : firstWeekDay - 1 : firstWeekDay;\n\n for (let i = startAtMon ? 1 : 0; i <= prevMonthDaysCount; i++) {\n const originalDay = firstDay;\n const preDay = DateHelper.weekday(originalDay, firstWeekDay - i);\n prevMonthDays.push(Object.assign(preDay, { notCurrentMonth: true }));\n }\n\n return prevMonthDays.reverse();\n}\n\n// Get days from previous month overlapping current month\nfunction getNextMonthOverlappingDays(date: Date, startAtMon: boolean): PatchedDate[] {\n const lastDay = DateHelper.endOf(date, 'month');\n const lastWeekDay = DateHelper.getWeekday(lastDay);\n const nextMonthDays = [];\n const nextMonthDaysCount = startAtMon ? 7 - (lastWeekDay === 0 ? 7 : lastWeekDay) : 7 - lastWeekDay;\n\n for (let i = 1; i <= nextMonthDaysCount; i += 1) {\n const nextDay = DateHelper.add(lastDay, i, 'days');\n nextMonthDays.push(Object.assign(nextDay, { notCurrentMonth: true }));\n }\n\n return nextMonthDays;\n}\n\nexport function initWeekDays(startAtMon: boolean): string[] {\n const weekdays = startAtMon ? [ 1, 2, 3, 4, 5, 6, 0 ] : [ 0, 1, 2, 3, 4, 5, 6 ];\n const date = new Date();\n return weekdays.map(w => DateHelper.format(DateHelper.weekday(date, w), 'ddd'));\n}\n\nexport function buildWeeksTable(date: Date, startAtMon: boolean) {\n const weeksTable: WeeksTable = [];\n const datePositionMap: DatePositionMap = {};\n\n const monthDays = getPreviousMonthOverlappingDays(date, startAtMon)\n .concat(getDaysOfMonth(date))\n .concat(getNextMonthOverlappingDays(date, startAtMon));\n\n for (let j = 0, rowId = 0; j < monthDays.length; j = j + 7) {\n const week = monthDays.slice(j, j + 7);\n week.forEach((day, colId) => {\n datePositionMap[DateHelper.format(day, 'YYYY-MM-DD')] = { row: rowId, col: colId };\n });\n\n weeksTable.push(week);\n rowId++;\n }\n\n return {\n datePositionMap,\n weeksTable\n };\n}\n\nfunction getFirstDateInCalendar(monthDate: Date) {\n const firstDayOfMonth = DateHelper.startOf(monthDate, 'month');\n if (DateHelper.getWeekday(firstDayOfMonth) === 1) {\n return firstDayOfMonth;\n }\n return ArrayHelper.first(getPreviousMonthOverlappingDays(monthDate, true));\n}\n\nfunction getLastDateInCalendar(monthDate: Date) {\n const lastDayOfMonth = DateHelper.endOf(monthDate, 'month');\n if (DateHelper.getWeekday(lastDayOfMonth) === 0) {\n return lastDayOfMonth;\n }\n return ArrayHelper.last(getNextMonthOverlappingDays(monthDate, true));\n}\n\nexport function getCalendarRange(monthDate: Date) {\n return [ getFirstDateInCalendar(monthDate), getLastDateInCalendar(monthDate) ];\n}\n\nfunction capitalizeMonthString(monthStr: string) {\n return monthStr.charAt(0).toUpperCase() + monthStr.slice(1);\n}\n\nexport function getIsValidMonth(monthDateString: string) {\n if (!monthDateString)\n return true;\n const capitalized = capitalizeMonthString(monthDateString);\n const isValidMonthString = DateHelper.formatIsValid(capitalized, 'MMMM-YYYY', true);\n\n if (!isValidMonthString)\n return false;\n\n const monthDate = DateHelper.parseDateString(capitalized, 'MMMM-YYYY');\n\n return DateHelper.isSame(monthDate, CALENDAR_START_DATE, 'month') || DateHelper.isAfter(monthDate, CALENDAR_START_DATE, 'month');\n}\n\nconst CUR_DATE = new Date();\nexport function canNavToOtherMonths(monthDate: Date) {\n const monthDiff = DateHelper.diffBetween(DateHelper.startOf(monthDate, 'month'), DateHelper.startOf(CUR_DATE, 'month'), 'months');\n const showPrev = DateHelper.isAfter(monthDate, CALENDAR_START_DATE, 'month');\n const showNext = monthDiff < NEXT_MONTH_LIMIT;\n return { showPrev, showNext };\n}\n\nexport function parseMonthString(monthStr: string) {\n if (!monthStr)\n return DateHelper.parseDateString();\n\n const capitalized = capitalizeMonthString(monthStr);\n return DateHelper.parseDateString(capitalized, 'MMMM-YYYY');\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { AnalyticsOptions, CalendarDisplayModeDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { CalendarAppLinks } from 'libs/shared/apps/calendar/interfaces/CalendarAppLinks';\nimport { CalendarViewMode } from 'libs/shared/apps/calendar/interfaces/CalendarViewMode';\nimport { canNavToOtherMonths } from 'libs/shared/apps/calendar/utils/CalendarHelper';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { ChevronLeftSvg } from 'libs/shared/images/svg/arrows/ChevronLeftSvg';\nimport { ChevronRightSvg } from 'libs/shared/images/svg/arrows/ChevronRightSvg';\nimport { CalendarSvg } from 'libs/shared/images/svg/objects/CalendarSvg';\nimport { TableOfContentsSvg } from 'libs/shared/images/svg/objects/TableOfContentsSvg';\n\nimport styles from './calendar-nav.module.scss';\n\nconst namespace = 'specialEventCalendar.calendarNav';\n\ninterface CalendarNavProps extends React.PropsWithChildren {\n monthDate: Date;\n appLinks: CalendarAppLinks;\n viewMode?: CalendarViewMode;\n queryParams?: HashObject;\n setViewingMonthDate: (date?: Date) => void;\n setViewMode?: (viewMode: CalendarViewMode) => void;\n}\n\ninterface ViewModeSwitcherProps {\n viewMode: CalendarViewMode;\n setViewMode?: (viewMode: CalendarViewMode) => void;\n}\n\nfunction ViewModeSwitcher(props: ViewModeSwitcherProps): JSX.Element {\n return (\n <div className={`${styles.viewModeContainer} d-none d-lg-block`}>\n <IconButton\n svg={CalendarSvg}\n className={`${props.viewMode === 'calendar' ? 'bg-dark text-white' : ''} btn btn-outline-dark rounded-start rounded-end-0 border-end-0 px-3 h-100`}\n onClick={() => props.setViewMode('calendar')}\n analyticsData={{}}\n analyticsOptions={{\n entity: EntityType.AppLink,\n actionType: UserAction.Click,\n descriptor: CalendarDisplayModeDescriptor.Calendar,\n location: LocationContext.CalendarNav\n }}\n />\n <IconButton\n svg={TableOfContentsSvg}\n className={`${props.viewMode === 'list' ? 'bg-dark text-white' : ''} btn btn-outline-dark rounded-end rounded-start-0 border-start-0 px-3 h-100`}\n onClick={() => props.setViewMode('list')}\n analyticsData={{}}\n analyticsOptions={{\n entity: EntityType.AppLink,\n actionType: UserAction.Click,\n descriptor: CalendarDisplayModeDescriptor.List,\n location: LocationContext.CalendarNav\n }}\n />\n </div>\n );\n}\n\ninterface NavigateButtonProps {\n action: 'next' | 'previous';\n appLink?: Core.AppLink;\n analyticsOptions?: AnalyticsOptions;\n analyticsData?: HashObject;\n onClick: () => void;\n}\n\nfunction NavigateButton(props: NavigateButtonProps): JSX.Element {\n const arrowSvg = props.action === 'previous' ? ChevronLeftSvg : ChevronRightSvg;\n const className = props.action === 'previous' ? styles.left : styles.right;\n\n function onClick() {\n Core.AppLinkHelper.trigger(props.appLink);\n\n props.onClick();\n }\n\n return (\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n className={`${styles.chevron} ${className} border border-dark rounded-circle bg-white d-flex align-items-center justify-content-center`}\n onClick={onClick}\n >\n <SvgContainer\n svg={arrowSvg}\n size={SvgContainerSize.Medium}\n className={`svg-container d-inline-block ${styles.svg}`}\n />\n </AppLink>\n );\n}\n\nconst CUR_DATE = new Date();\n\nexport function CalendarNav(props: CalendarNavProps): JSX.Element {\n const { appLinks } = props;\n\n const breakpoints = useBreakpoints();\n \n function getAppLink(monthDate?: Date): Core.AppLink {\n const month = DateHelper.format(monthDate, 'MMMM').toLocaleLowerCase();\n\n const appLink: Core.AppLink = appLinks.month(month);\n\n const params: HashObject = {};\n\n if (monthDate) {\n const currentYear = new Date().getFullYear();\n const year = monthDate.getFullYear();\n \n if (currentYear !== year)\n params.year = year;\n }\n\n if (props.queryParams?.classification)\n params.classification = props.queryParams.classification;\n\n if (props.queryParams?.yearGroup)\n params.yearGroup = props.queryParams.yearGroup;\n\n appLink.params = params;\n\n return appLink;\n }\n\n function onClickNext () {\n const nextMonth = DateHelper.add(props.monthDate, 1, 'month');\n props.setViewingMonthDate(nextMonth);\n }\n\n function onClickPrevious() {\n const prevMonth = DateHelper.subtract(props.monthDate, 1, 'month');\n props.setViewingMonthDate(prevMonth);\n }\n\n function onClickToday() {\n if (DateHelper.format(CUR_DATE, 'M YY') === DateHelper.format(props.monthDate, 'M YY')) return;\n \n props.setViewingMonthDate();\n }\n \n const { showPrev, showNext } = canNavToOtherMonths(props.monthDate);\n\n const analyticsOptions: AnalyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.SpecialEvent,\n location: LocationContext.CalendarNav\n };\n\n function formatAnalyticDataDate(date: Date) {\n return DateHelper.format(date, 'YYYY-MM-DD');\n }\n return (\n <div className='d-flex flex-wrap gap-3 justify-content-end align-items-center'>\n <h1 className='mb-0 h2 me-auto'>{DateHelper.format(props.monthDate, breakpoints.xs ? 'MMM YYYY' : 'MMMM YYYY')}</h1>\n\n {props.children}\n\n {props.setViewMode && (\n <ViewModeSwitcher viewMode={props.viewMode} setViewMode={props.setViewMode} />\n )}\n <div className='d-flex gap-3'>\n {showPrev && (\n <NavigateButton\n appLink={getAppLink(DateHelper.startOf(DateHelper.subtract(props.monthDate, 1, 'month'), 'month'))}\n action='previous'\n onClick={onClickPrevious}\n analyticsOptions={analyticsOptions}\n analyticsData={{ action: 'previous', date: formatAnalyticDataDate(DateHelper.startOf(DateHelper.add(props.monthDate, 1, 'month'), 'month')) }}\n />\n )}\n <AppLink\n appLink={getAppLink()}className={`${styles.todayWrapper} btn btn-outline-dark fw-semibold`}\n onClick={onClickToday}\n analyticsOptions={analyticsOptions}\n analyticsData={{ action: 'today', date: formatAnalyticDataDate(DateHelper.startOf(CUR_DATE, 'month')) }}\n >\n {LanguageService.getPhrase(namespace, 'today')}\n </AppLink>\n {showNext && (\n <NavigateButton\n appLink={getAppLink(DateHelper.startOf(DateHelper.add(props.monthDate, 1, 'month'), 'month'))}\n analyticsOptions={analyticsOptions}\n analyticsData={{ action: 'next', date: formatAnalyticDataDate(DateHelper.startOf(DateHelper.add(props.monthDate, 1, 'month'), 'month')) }}\n action='next'\n onClick={onClickNext}\n />\n )}\n </div>\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'specialEvent.eventsErrorState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface SpecialEventErrorStateProps {\n imageUrl: string;\n appLink: Core.AppLink;\n}\n\nexport function SpecialEventErrorState(props: SpecialEventErrorStateProps): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} />\n <EmptyState.Heading><Text phrase='heading' /></EmptyState.Heading>\n <EmptyState.Info>\n <Text namespace={namespace} phrase='info' />\n <br/>\n <AppLink appLink={props.appLink}>\n <span className='text-info'>{getPhrase('link')}</span>\n </AppLink>\n </EmptyState.Info>\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { CalendarAppLinks } from 'libs/shared/apps/calendar/interfaces/CalendarAppLinks';\n\nimport { buildWeeksTable, DatePositionMap, initWeekDays, PatchedDate, WeeksTable } from '../utils/CalendarHelper';\n\ntype Cache = Record<string, {\n datePositionMap: DatePositionMap,\n weeksTable: WeeksTable\n }>\n\nconst TODAY_DATE = new Date();\n\nexport function useCalendarWeeksTable(date: Date = TODAY_DATE, appLinks: CalendarAppLinks, startAtMon: boolean = true) {\n const weekDaysHeader = initWeekDays(startAtMon);\n\n const cacheRef = React.useRef<Cache>({});\n\n const [ weekDays, setWeekDays ] = React.useState<PatchedDate[][]>([]);\n const monthDateString = DateHelper.format(date, 'YYYY-MM');\n React.useEffect(() => {\n const cached = cacheRef.current[monthDateString];\n if (!cached) {\n const { weeksTable, datePositionMap } = buildWeeksTable(date, startAtMon);\n \n cacheRef.current[monthDateString] = { weeksTable, datePositionMap };\n\n setWeekDays(weeksTable);\n } else {\n setWeekDays(cached.weeksTable);\n }\n }, [DateHelper.format(date, 'YYYY-MM')]);\n\n function setViewingMonthDate(nextMonthDate?: Date) {\n if (!nextMonthDate) {\n Core.AppLinkHelper.trigger(appLinks.calendar());\n\n return;\n }\n\n if (monthDateString !== DateHelper.format(nextMonthDate, 'YYYY-MM')) {\n const month = DateHelper.format(nextMonthDate, 'MMMM').toLocaleLowerCase();\n\n const currentYear = new Date().getFullYear();\n const year = date.getFullYear();\n\n const appLink: Core.AppLink = appLinks.month(month);\n\n if (currentYear !== year)\n appLink.params = { year };\n\n Core.AppLinkHelper.trigger(appLink);\n }\n }\n\n const startDate = ArrayHelper.first(ArrayHelper.first(weekDays));\n const endDate = ArrayHelper.last(ArrayHelper.last(weekDays));\n\n return { weekDaysHeader, weekDays, monthDate: date, setMonthDate: setViewingMonthDate, startDate, endDate };\n}","import { Flight } from 'libs/common/flight';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { HashObject } from 'libs/analytics/interfaces';\n\nimport { getCalendarRange } from 'libs/shared/apps/calendar/utils/CalendarHelper';\nimport { CalendarEvent } from 'libs/shared/interfaces';\n\nimport { LivestreamRequests } from 'shared/flight-requests/LivestreamRequests';\n\nexport function useCalendarEventsData(viewMonth: Date, queryParams?: HashObject) {\n const [ startDate, endDate ] = getCalendarRange(viewMonth);\n\n const nextMonth = DateHelper.add(viewMonth, 1, 'month');\n const [ nextStartDate, nextEndDate ] = getCalendarRange(nextMonth);\n\n const prevMonth = DateHelper.subtract(viewMonth, 1, 'month');\n const [ prevStartDate, prevEndDate ] = getCalendarRange(prevMonth);\n\n const filters: HashObject = {};\n\n if (queryParams.yearGroup)\n filters.audienceId = queryParams.yearGroup;\n\n if (queryParams.classification) {\n filters.topicId = queryParams.classification;\n filters.includeChildrenTopics = true;\n }\n\n const events = Flight.useBasicFetch<CalendarEvent[]>((startDate && endDate)\n && LivestreamRequests.calendarLivestreams({\n from: DateHelper.format(startDate, 'YYYY-MM-DD'),\n to: DateHelper.format(endDate, 'YYYY-MM-DD'),\n ...filters\n }));\n \n const nextEvents = Flight.useBasicFetch<CalendarEvent[]>((nextStartDate && nextEndDate)\n && LivestreamRequests.calendarLivestreams({\n from: DateHelper.format(nextStartDate, 'YYYY-MM-DD'),\n to: DateHelper.format(nextEndDate, 'YYYY-MM-DD'),\n ...filters\n }));\n\n const prevEvents = Flight.useBasicFetch<CalendarEvent[]>((prevStartDate && prevEndDate)\n && LivestreamRequests.calendarLivestreams({\n from: DateHelper.format(prevStartDate, 'YYYY-MM-DD'),\n to: DateHelper.format(prevEndDate, 'YYYY-MM-DD'),\n ...filters\n }));\n\n const uniqueEventList = ArrayHelper.uniq(\n [ ...prevEvents.data || [], ...events.data || [], ...nextEvents.data || [] ],\n e => e.id\n );\n\n return { events: uniqueEventList, loaded: events.hasCompleted };\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { Flight } from 'libs/common/react/index';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { CalendarBody } from 'libs/shared/apps/calendar/components/calendar-body/CalendarBody';\nimport { CalendarNav } from 'libs/shared/apps/calendar/components/calendar-nav/CalendarNav';\nimport { SpecialEventErrorState } from 'libs/shared/apps/calendar/components/error-state/SpecialEventErrorState';\nimport { useCalendarWeeksTable } from 'libs/shared/apps/calendar/hooks/useCalendarWeeksTable';\nimport { CalendarQueryParams } from 'libs/shared/apps/calendar/interfaces/CalendarQueryParams';\nimport { CalendarViewMode } from 'libs/shared/apps/calendar/interfaces/CalendarViewMode';\nimport { getIsValidMonth, parseMonthString } from 'libs/shared/apps/calendar/utils/CalendarHelper';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { SearchFilters } from 'libs/shared/apps/search/components/search-filters/SearchFilters';\nimport { SearchFilter, TopicResults } from 'libs/shared/apps/search/interfaces';\nimport { StreamableHeader } from 'libs/shared/apps/streamable-learning/components/header/StreamableHeader';\nimport { TimezoneIndicator } from 'libs/shared/apps/streamable-learning/components/timezone-indicator/TimezoneIndicator';\nimport { Timezone } from 'libs/shared/apps/streamable-learning/constants/Timezones';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Livestream, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { StreamableConstants } from 'shared/constants/StreamableConstants';\nimport { PresentationRequests } from 'shared/flight-requests/PresentationRequests';\nimport { SeoHelper } from 'shared/utils/StreamableSeoHelper';\n\nimport { useCalendarEventsData } from 'apps/calendar/hooks/useCalendarEventsData';\nimport { CalendarUtils } from 'apps/calendar/utils/CalendarUtils';\nimport { getCalendarAppLinks, getCalendarImageUrls } from 'apps/calendar/views/calendar-view/CalendarViewUtils';\nimport { getStreamableHeaderAppLinks } from 'apps/dashboard/views/dashboard/DiscoverViewUtils';\n\nconst namespace = 'livestreamCalendar.calendarView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ViewModelViewModel {\n viewMode: CalendarViewMode;\n}\n\n\n/**\n * NOTE: Ensure any keys added here are also added\n * to sanitizePlayViewParams below.\n */\ninterface StreamableCalendarQueryParams extends CalendarQueryParams {\n classification?: string;\n yearGroup?: string;\n}\n\nexport function sanitizeCalendarViewParams(queryParams: StreamableCalendarQueryParams): StreamableCalendarQueryParams {\n if (!queryParams)\n return {};\n\n return ObjectHelper.pick(queryParams, [\n 'year',\n 'classification',\n 'yearGroup'\n ]);\n}\n\nCalendarView.defaultProps = {\n queryParams: {}\n};\n\nexport interface CalendarViewProps {\n month?: string\n queryParams?: StreamableCalendarQueryParams;\n}\n\nexport function CalendarView(props: CalendarViewProps): JSX.Element {\n const [{ viewMode }, setMode ] = useViewModel<ViewModelViewModel>('calendar:mode', { viewMode: 'calendar' }, {\n storage: StorageType.LocalStorage\n });\n\n const { hasPermissions } = usePermissions();\n const isStudent = hasPermissions(PermissionName.StudentExperience);\n\n const presentation = Flight.useBasicFetch<Presentation>(\n PresentationRequests.streamablePresentation()\n );\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(presentation.data &&\n AudienceRequests.presentationAudiences(presentation.data.id, PresentationType.StreamableLearning));\n\n const availableTopics = Flight.useBasicFetch<TopicResults>(presentation.data &&\n ClassificationRequests.topicsFromAllAvailablePresentations([presentation.data.id]));\n\n const isValidMonth = getIsValidMonth(props.month);\n\n const viewingMonth = parseMonthString(props.month);\n \n const {\n monthDate,\n setMonthDate,\n weekDays,\n weekDaysHeader,\n startDate,\n endDate\n } = useCalendarWeeksTable(viewingMonth, getCalendarAppLinks());\n\n const { events, loaded } = useCalendarEventsData(viewingMonth, props.queryParams);\n const currentMonthYear = DateHelper.format(monthDate, 'MMMM YYYY');\n\n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: currentMonthYear,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink<keyof CalendarQueryParams>({ allowedParams: ['year']}),\n allowIndexing: true,\n product: StreamableConstants.PRODUCT_NAME\n }));\n\n if (props.month !== null && !isValidMonth) {\n return (\n <SpecialEventErrorState\n imageUrl={getCalendarImageUrls().errorState}\n appLink={getStreamableHeaderAppLinks().calendar}\n />\n );\n }\n\n const mainFilters: SearchFilter<string>[] = [\n {\n id: 'classification',\n name: getPhrase('subjectFilter'),\n options: availableTopics.data?.topics.map(t => ({ name: t.name, id: t.topicIds.join(':') })),\n type: 'checkbox',\n compatibleIndices: []\n },\n {\n id: 'yearGroup',\n name: getPhrase('gradeFilter'),\n type: 'checkbox',\n options: audiences.data?.map(a => ({ name: a.name, id: a.masterId })),\n compatibleIndices: []\n }\n ];\n\n function getAppLink(): Core.AppLink {\n const month = DateHelper.format(monthDate, 'MMMM').toLocaleLowerCase();\n\n const currentYear = new Date().getFullYear();\n const year = monthDate.getFullYear();\n\n const appLink: Core.AppLink = getCalendarAppLinks().month(month);\n\n const params: HashObject = {};\n\n if (currentYear !== year)\n params.year = year;\n\n if (props.queryParams.classification)\n params.classification = props.queryParams.classification;\n\n if (props.queryParams.yearGroup)\n params.yearGroup = props.queryParams.yearGroup;\n\n return appLink;\n }\n\n function getActionLabel(livestream: Livestream): string {\n return isStudent || DateHelper.isBefore(livestream.endDateTime, new Date()) ? 'pastActionLabel' : 'actionLabel';\n }\n\n function getEmptyStateHeading(): string {\n const eventsInMonth = SpecialEventHelper.getEventsInMonth(events || [], viewingMonth);\n\n if (!eventsInMonth.length && (props.queryParams.yearGroup || props.queryParams.classification))\n return getPhrase('emptyStateText');\n }\n\n function getIconUrl(content: Livestream) {\n return ImageHelper.createUrl(content.company.logo?.url, { size: ImageSize.Small });\n }\n\n function getBannerUrl(content: Livestream) {\n return ImageHelper.createUrl(content.company.banner?.url, { size: ImageSize.Large });\n }\n\n return (\n <div className='bg-white px-4'>\n <StreamableHeader\n appLinks={getStreamableHeaderAppLinks()}\n active='calendar'\n />\n\n <CalendarNav\n monthDate={monthDate}\n setViewingMonthDate={setMonthDate}\n appLinks={getCalendarAppLinks()}\n queryParams={props.queryParams}\n viewMode={viewMode}\n setViewMode={(viewMode: CalendarViewMode) => setMode({ viewMode })}\n >\n <div className='mx-n1 order-1 order-sm-0'>\n <SearchFilters\n queryParams={ObjectHelper.omit(props.queryParams, ['year'])}\n mainFilters={mainFilters}\n appLink={getAppLink()}\n isFetchingOptions={!availableTopics.data || !presentation.data || !audiences.data}\n alignResetButtonLeft\n hideDivider\n hideHeading\n hideCaret={false}\n />\n </div>\n </CalendarNav>\n <div className={`position-relative mt-3 ${viewMode === 'list' ? '' : 'mt-lg-0'}`}>\n <div className={`d-block ${viewMode === 'list' ? '' : 'd-lg-none'} position-absolute top-0 end-0 mt-2`}>\n <TimezoneIndicator />\n </div>\n <CalendarBody\n weekDays={weekDays}\n weekDaysHeader={weekDaysHeader}\n events={events}\n monthQuery={{ from: startDate?.toString(), to: endDate?.toString() }}\n viewingMonth={viewingMonth}\n eventsLoaded={loaded}\n presentationId={presentation.data?.id}\n appLinks={getCalendarAppLinks()}\n imageUrls={getCalendarImageUrls()}\n viewMode={viewMode}\n getActionLabel={livestream => getPhrase(getActionLabel(livestream as Livestream))}\n getBackgroundColor={(content: Livestream) => content.company.metadata?.colour}\n getBannerUrl={getBannerUrl}\n getIconUrl={getIconUrl}\n getStartTime={CalendarUtils.getStartTime}\n theme={{\n background: 'bg-light-green',\n border: 'border-light-green'\n }}\n emptyStateHeading={getEmptyStateHeading()}\n fadePastEvents\n timezone={Timezone.ET}\n isPastEvent={CalendarUtils.isPastEvent}\n />\n </div>\n </div>\n );\n}"],"names":["getIsWeekend","date","DateHelper","CalendarCell","props","notCurrentMonth","sliderStep","setSliderStep","React","wrapperClassname","styles","eventsOnDay","_a","e","updatedProps","jsx","HoverToPortalContainer","CalendarDay","namespace","getPhrase","LanguageService","SpecialEventEmptyState","LanguageNamespaceContext","EmptyState","Text","jsxs","Fragment","AppLink","SpecialEventList","eventsInMonth","startDate","keys","a","b","k","idx","prevTime","currentTime","SpecialEventHelper","SpecialEventListItem","id","name","TextHelper","CalendarBody","appLinks","imageUrls","breakpoints","useBreakpoints","hasInitialized","setHasInitialized","hoveredEvent","setHoveredEvent","Spinner","w","calendarEventContent","slug","CALENDAR_START_DATE","NEXT_MONTH_LIMIT","getDaysOfMonth","numberOfDays","daysArray","day","getPreviousMonthOverlappingDays","startAtMon","firstDay","firstWeekDay","prevMonthDays","prevMonthDaysCount","i","originalDay","preDay","getNextMonthOverlappingDays","lastDay","lastWeekDay","nextMonthDays","nextMonthDaysCount","nextDay","initWeekDays","weekdays","buildWeeksTable","weeksTable","datePositionMap","monthDays","j","rowId","week","colId","getFirstDateInCalendar","monthDate","firstDayOfMonth","ArrayHelper","getLastDateInCalendar","lastDayOfMonth","getCalendarRange","capitalizeMonthString","monthStr","getIsValidMonth","monthDateString","capitalized","CUR_DATE","canNavToOtherMonths","monthDiff","showPrev","showNext","parseMonthString","ViewModeSwitcher","IconButton","CalendarSvg","EntityType","UserAction","CalendarDisplayModeDescriptor","LocationContext","TableOfContentsSvg","NavigateButton","arrowSvg","ChevronLeftSvg","ChevronRightSvg","className","onClick","Core.AppLinkHelper","SvgContainer","SvgContainerSize","CalendarNav","getAppLink","month","appLink","params","currentYear","year","_b","onClickNext","nextMonth","onClickPrevious","prevMonth","onClickToday","analyticsOptions","formatAnalyticDataDate","SpecialEventErrorState","TODAY_DATE","useCalendarWeeksTable","weekDaysHeader","cacheRef","weekDays","setWeekDays","cached","setViewingMonthDate","nextMonthDate","endDate","useCalendarEventsData","viewMonth","queryParams","nextStartDate","nextEndDate","prevStartDate","prevEndDate","filters","events","Flight.useBasicFetch","LivestreamRequests","nextEvents","prevEvents","sanitizeCalendarViewParams","ObjectHelper","CalendarView","viewMode","setMode","useViewModel","StorageType","hasPermissions","usePermissions","isStudent","PermissionName","presentation","PresentationRequests","audiences","AudienceRequests","PresentationType","availableTopics","ClassificationRequests","isValidMonth","viewingMonth","setMonthDate","getCalendarAppLinks","loaded","currentMonthYear","useSetPageMetadata","PageMetadataHelper","SeoHelper","StreamableConstants","getCalendarImageUrls","getStreamableHeaderAppLinks","mainFilters","t","getActionLabel","livestream","getEmptyStateHeading","getIconUrl","content","ImageHelper","ImageSize","getBannerUrl","StreamableHeader","SearchFilters","TimezoneIndicator","_c","CalendarUtils","Timezone"],"mappings":"ioDAUA,SAASA,GAAaC,EAAqB,CACzC,OAAOC,EAAW,WAAWD,CAAI,IAAM,GAAKC,EAAW,WAAWD,CAAI,IAAM,CAC9E,CAEO,SAASE,GAAaC,EAAuC,OAClE,KAAM,CAAE,KAAAH,EAAM,gBAAAI,CAAA,EAAoBD,EAC5B,CAAEE,EAAYC,CAAc,EAAIC,EAAM,SAAiB,CAAC,EAE9D,IAAIC,EAAmB,4BAA4BL,EAAM,MAAM,MAAM,IAAIM,GAAO,OAAO,GACnFV,GAAaC,CAAI,IAAGQ,GAAoB,IAAIC,GAAO,OAAO,IAC1DL,IAAiBI,GAAoB,cAEzC,MAAME,IAAcC,EAAAR,EAAM,SAAN,YAAAQ,EAAc,OAAOC,GAAKX,EAAW,OAAOE,EAAM,KAAMS,EAAE,SAAS,KAAM,CAAA,EACvFC,EAAe,CAAE,GAAGV,EAAO,YAAAO,EAAa,WAAAL,EAAY,cAAAC,CAAA,EAE1D,aACG,KAAA,CAAG,UAAWE,EACZ,UAAAE,GAAA,YAAAA,EAAa,QAAS,EACrBI,EAAAA,IAACC,GAAA,CACC,mBAAoBC,EACpB,eAAgBH,EAChB,WAAY,IAAA,CAAA,EAEZC,EAAAA,IAACE,EAAA,CAAa,GAAGH,EAAc,WAAY,GAAO,EACxD,CAEJ,CC3BA,MAAMI,EAAY,gCACZC,GAAYC,EAAgB,iBAAiBF,CAAS,EAQrD,SAASG,GAAuBjB,EAAiD,CACtF,aACGkB,GAAyB,SAAzB,CAAkC,MAAOJ,EACxC,gBAACK,EAAA,CACC,SAAA,CAAAR,EAAAA,IAACQ,EAAW,MAAX,CA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,EAAS,UAAS,EACjE,aAAAiC,EACA,aAAcG,EACd,gBAAgBqB,EAAAhC,EAAa,OAAb,YAAAgC,EAAmB,GACnC,SAAUtB,EAAA,EACV,UAAWO,EAAA,EACX,SAAAzB,EACA,eAAgB8B,GAAc/K,EAAU8K,GAAeC,CAAwB,CAAC,EAChF,mBAAqBG,GAAA,OAAwB,OAAAzL,EAAAyL,EAAQ,QAAQ,WAAhB,YAAAzL,EAA0B,QACvE,aAAA4L,GACA,WAAAJ,GACA,aAAcS,EAAc,aAC5B,MAAO,CACL,WAAY,iBACZ,OAAQ,oBAAA,EAEV,kBAAmBV,GAAA,EACnB,eAAc,GACd,SAAUW,GAAS,GACnB,YAAaD,EAAc,WAAA,CAAA,CAC7B,CAAA,CACF,CAAA,EACF,CAEJ"}
@@ -0,0 +1,2 @@
1
+ import{bx as d,j as y,z as l,dt as T,ba as m,F as I}from"./app-C56EnOMP.js";import{R as n}from"./cvX-F_mx.chunk.js";import{M as c}from"./sc9-PV9Y.chunk.js";import{B as p}from"./DkFkYS-j.chunk.js";const R="_imageStyle_9s5en_1",b="_imageTypeResource_9s5en_6",h="_fallBackImage_9s5en_12",u={imageStyle:R,imageTypeResource:b,fallBackImage:h},_={width:200,resizeType:d.Cover};function k(e,a,t=_){var i,g,o;const s=f(a);if("thumbnail"in a&&((i=a.thumbnail)!=null&&i.url))return l.createUrl((g=a.thumbnail)==null?void 0:g.url,{...t});const r=T.safeUrlConcat(e,"/v1/previews");return c.isResource(a)?s===m.Pdf?a.metadata.type===n.Pdf?l.createResourceImage(r,a.url,{...t}):l.createResourceImage(r,(o=a.pdf)==null?void 0:o.url,{...t}):a.metadata.type!==n.Zip?l.createUrl(a.url,{size:I.Medium,resizeType:d.Cover}):"/images/zip-resource.png":l.createResourceImage(r,a.url,{...t})}function f(e){var a;return c.isResource(e)?e.metadata.type===n.Pdf||(a=e.pdf)!=null&&a.url?m.Pdf:m.Thumbnails:m.Link}function A(e){var r,i;let a=null,t=0;c.isResource(e.resource)&&(a=e.resource.metadata,t=((i=(r=e.resource.thumbnail)==null?void 0:r.metadata)==null?void 0:i.rotation)??0);const s=k(e.imageCdnUrl,e.resource,e.dynamicRatioImageOptions);return y.jsx(p,{data:s,imageType:f(e.resource),imageStyle:{transform:`rotate(${t}deg)`},alt:e.resource.name,errorFallbackImageSrc:e.imageErrorFallbackUrl,errorFallbackImageClassName:u.fallBackImage,imageClassName:(a==null?void 0:a.type)===n.Image?`${u.imageTypeResource} ${u.imageStyle}`:"",preload:e.preloadImage,preventLoad:!e.preloadImage})}const C={getResourceTypeName(e){switch(e){case"additional-materials":return"Additional Materials";case"atom-guide":return"ATOM Guide";case"teacher-pack":return"Teacher Pack";case"student-activity":return"Student Activity";default:return"N/A"}}};export{A as R,C as a};
2
+ //# sourceMappingURL=BexFb8rj.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BexFb8rj.chunk.js","sources":["../../../../libs/shared/src/components/resource-thumbnail/ResourceThumbnail.tsx","../../../../libs/shared/src/utils/ResourceHelper.ts"],"sourcesContent":["import React from 'react';\n\nimport { UrlHelper } from 'libs/analytics/utils/UrlHelper';\n\nimport { ImageSize, ImageType, ResizeType } from 'libs/shared/enums/Images';\nimport { ResourceFileType } from 'libs/shared/enums/ResourceFileType';\nimport { Link, Resource } from 'libs/shared/interfaces';\nimport { ImageHelper, ImageOptions } from 'libs/shared/utils/ImageHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\n\nimport { BaseImage } from '../image/BaseImage';\n\nimport styles from './resource-thumbnail.module.scss';\n\n// Used for both PDFs and Links where we don't know the image ratio\nconst DYNAMIC_RATIO_IMAGE_OPTIONS: ImageOptions = {\n width: 200,\n resizeType: ResizeType.Cover\n};\n\nfunction getThumbnailUrl(\n imageCdnUrl: string,\n resource: Resource | Link,\n dynamicRatioImageOptions: ImageOptions = DYNAMIC_RATIO_IMAGE_OPTIONS\n): string {\n const imageType = getImageType(resource);\n\n // Use the thumbnail if defined\n if ('thumbnail' in resource && resource.thumbnail?.url)\n return ImageHelper.createUrl(resource.thumbnail?.url, { ...dynamicRatioImageOptions });\n \n const previewUrl = UrlHelper.safeUrlConcat(imageCdnUrl, '/v1/previews');\n\n if (!MasterTypeHelper.isResource(resource))\n return ImageHelper.createResourceImage(previewUrl, resource.url, { ...dynamicRatioImageOptions });\n\n if (imageType === ImageType.Pdf) {\n return resource.metadata.type === ResourceFileType.Pdf\n ? ImageHelper.createResourceImage(previewUrl, resource.url, { ...dynamicRatioImageOptions })\n : ImageHelper.createResourceImage(previewUrl, resource.pdf?.url, { ...dynamicRatioImageOptions });\n }\n\n if (resource.metadata.type !== ResourceFileType.Zip)\n return ImageHelper.createUrl(resource.url, { size: ImageSize.Medium, resizeType: ResizeType.Cover });\n\n return '/images/zip-resource.png';\n}\n\nfunction getImageType(resource: Resource | Link): ImageType {\n if (!MasterTypeHelper.isResource(resource))\n return ImageType.Link;\n\n if (resource.metadata.type === ResourceFileType.Pdf || resource.pdf?.url)\n return ImageType.Pdf;\n\n return ImageType.Thumbnails;\n}\n\ninterface ResourceThumbnailProps {\n imageCdnUrl: string;\n resource: Resource | Link;\n imageErrorFallbackUrl: string;\n preloadImage: boolean;\n dynamicRatioImageOptions?: ImageOptions;\n}\n\nexport function ResourceThumbnail(props: ResourceThumbnailProps): JSX.Element {\n let metadata = null;\n let rotation = 0;\n\n if (MasterTypeHelper.isResource(props.resource)) {\n metadata = props.resource.metadata;\n rotation = props.resource.thumbnail?.metadata?.rotation ?? 0;\n }\n\n const thumbnailUrl = getThumbnailUrl(props.imageCdnUrl, props.resource, props.dynamicRatioImageOptions);\n\n return (\n <BaseImage\n data={thumbnailUrl}\n imageType={getImageType(props.resource)}\n imageStyle={{ transform: `rotate(${rotation}deg)` }}\n alt={props.resource.name}\n errorFallbackImageSrc={props.imageErrorFallbackUrl}\n errorFallbackImageClassName={styles.fallBackImage}\n imageClassName={metadata?.type === ResourceFileType.Image ? `${styles.imageTypeResource} ${styles.imageStyle}` : ''}\n preload={props.preloadImage}\n preventLoad={!props.preloadImage}\n >\n </BaseImage>\n );\n}","import { ResourceType } from 'libs/shared/interfaces';\n\nexport const ResourceHelper = {\n getResourceTypeName(resourceType: ResourceType): string {\n switch (resourceType) {\n case 'additional-materials':\n return 'Additional Materials';\n\n case 'atom-guide':\n return 'ATOM Guide';\n\n case 'teacher-pack':\n return 'Teacher Pack';\n\n case 'student-activity':\n return 'Student Activity';\n\n default:\n return 'N/A';\n }\n }\n};"],"names":["DYNAMIC_RATIO_IMAGE_OPTIONS","ResizeType","getThumbnailUrl","imageCdnUrl","resource","dynamicRatioImageOptions","imageType","getImageType","_a","ImageHelper","_b","previewUrl","UrlHelper","MasterTypeHelper","ImageType","ResourceFileType","_c","ImageSize","ResourceThumbnail","props","metadata","rotation","thumbnailUrl","jsx","BaseImage","styles","ResourceHelper","resourceType"],"mappings":"kVAeMA,EAA4C,CAChD,MAAO,IACP,WAAYC,EAAW,KACzB,EAEA,SAASC,EACPC,EACAC,EACAC,EAAyCL,EACjC,WACR,MAAMM,EAAYC,EAAaH,CAAQ,EAGvC,GAAI,cAAeA,KAAYI,EAAAJ,EAAS,YAAT,MAAAI,EAAoB,KACjD,OAAOC,EAAY,WAAUC,EAAAN,EAAS,YAAT,YAAAM,EAAoB,IAAK,CAAE,GAAGL,EAA0B,EAEvF,MAAMM,EAAaC,EAAU,cAAcT,EAAa,cAAc,EAEtE,OAAKU,EAAiB,WAAWT,CAAQ,EAGrCE,IAAcQ,EAAU,IACnBV,EAAS,SAAS,OAASW,EAAiB,IAC/CN,EAAY,oBAAoBE,EAAYP,EAAS,IAAK,CAAE,GAAGC,EAA0B,EACzFI,EAAY,oBAAoBE,GAAYK,EAAAZ,EAAS,MAAT,YAAAY,EAAc,IAAK,CAAE,GAAGX,EAA0B,EAGhGD,EAAS,SAAS,OAASW,EAAiB,IACvCN,EAAY,UAAUL,EAAS,IAAK,CAAE,KAAMa,EAAU,OAAQ,WAAYhB,EAAW,KAAA,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te,k as Ae,f as we}from"./app-C56EnOMP.js";import{F as X}from"./Dkq5GtOV.chunk.js";var z={exports:{}},ee;function Ee(){return ee||(ee=1,(function(t,o){(function(s){t.exports=s()})(function(s){var u=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function c(l,a){var n=l[0],e=l[1],i=l[2],r=l[3];n+=(e&i|~e&r)+a[0]-680876936|0,n=(n<<7|n>>>25)+e|0,r+=(n&e|~n&i)+a[1]-389564586|0,r=(r<<12|r>>>20)+n|0,i+=(r&n|~r&e)+a[2]+606105819|0,i=(i<<17|i>>>15)+r|0,e+=(i&r|~i&n)+a[3]-1044525330|0,e=(e<<22|e>>>10)+i|0,n+=(e&i|~e&r)+a[4]-176418897|0,n=(n<<7|n>>>25)+e|0,r+=(n&e|~n&i)+a[5]+1200080426|0,r=(r<<12|r>>>20)+n|0,i+=(r&n|~r&e)+a[6]-1473231341|0,i=(i<<17|i>>>15)+r|0,e+=(i&r|~i&n)+a[7]-45705983|0,e=(e<<22|e>>>10)+i|0,n+=(e&i|~e&r)+a[8]+1770035416|0,n=(n<<7|n>>>25)+e|0,r+=(n&e|~n&i)+a[9]-1958414417|0,r=(r<<12|r>>>20)+n|0,i+=(r&n|~r&e)+a[10]-42063|0,i=(i<<17|i>>>15)+r|0,e+=(i&r|~i&n)+a[11]-1990404162|0,e=(e<<22|e>>>10)+i|0,n+=(e&i|~e&r)+a[12]+1804603682|0,n=(n<<7|n>>>25)+e|0,r+=(n&e|~n&i)+a[13]-40341101|0,r=(r<<12|r>>>20)+n|0,i+=(r&n|~r&e)+a[14]-1502002290|0,i=(i<<17|i>>>15)+r|0,e+=(i&r|~i&n)+a[15]+1236535329|0,e=(e<<22|e>>>10)+i|0,n+=(e&r|i&~r)+a[1]-165796510|0,n=(n<<5|n>>>27)+e|0,r+=(n&i|e&~i)+a[6]-1069501632|0,r=(r<<9|r>>>23)+n|0,i+=(r&e|n&~e)+a[11]+643717713|0,i=(i<<14|i>>>18)+r|0,e+=(i&n|r&~n)+a[0]-373897302|0,e=(e<<20|e>>>12)+i|0,n+=(e&r|i&~r)+a[5]-701558691|0,n=(n<<5|n>>>27)+e|0,r+=(n&i|e&~i)+a[10]+38016083|0,r=(r<<9|r>>>23)+n|0,i+=(r&e|n&~e)+a[15]-660478335|0,i=(i<<14|i>>>18)+r|0,e+=(i&n|r&~n)+a[4]-405537848|0,e=(e<<20|e>>>12)+i|0,n+=(e&r|i&~r)+a[9]+568446438|0,n=(n<<5|n>>>27)+e|0,r+=(n&i|e&~i)+a[14]-1019803690|0,r=(r<<9|r>>>23)+n|0,i+=(r&e|n&~e)+a[3]-187363961|0,i=(i<<14|i>>>18)+r|0,e+=(i&n|r&~n)+a[8]+1163531501|0,e=(e<<20|e>>>12)+i|0,n+=(e&r|i&~r)+a[13]-1444681467|0,n=(n<<5|n>>>27)+e|0,r+=(n&i|e&~i)+a[2]-51403784|0,r=(r<<9|r>>>23)+n|0,i+=(r&e|n&~e)+a[7]+1735328473|0,i=(i<<14|i>>>18)+r|0,e+=(i&n|r&~n)+a[12]-1926607734|0,e=(e<<20|e>>>12)+i|0,n+=(e^i^r)+a[5]-378558|0,n=(n<<4|n>>>28)+e|0,r+=(n^e^i)+a[8]-2022574463|0,r=(r<<11|r>>>21)+n|0,i+=(r^n^e)+a[11]+1839030562|0,i=(i<<16|i>>>16)+r|0,e+=(i^r^n)+a[14]-35309556|0,e=(e<<23|e>>>9)+i|0,n+=(e^i^r)+a[1]-1530992060|0,n=(n<<4|n>>>28)+e|0,r+=(n^e^i)+a[4]+1272893353|0,r=(r<<11|r>>>21)+n|0,i+=(r^n^e)+a[7]-155497632|0,i=(i<<16|i>>>16)+r|0,e+=(i^r^n)+a[10]-1094730640|0,e=(e<<23|e>>>9)+i|0,n+=(e^i^r)+a[13]+681279174|0,n=(n<<4|n>>>28)+e|0,r+=(n^e^i)+a[0]-358537222|0,r=(r<<11|r>>>21)+n|0,i+=(r^n^e)+a[3]-722521979|0,i=(i<<16|i>>>16)+r|0,e+=(i^r^n)+a[6]+76029189|0,e=(e<<23|e>>>9)+i|0,n+=(e^i^r)+a[9]-640364487|0,n=(n<<4|n>>>28)+e|0,r+=(n^e^i)+a[12]-421815835|0,r=(r<<11|r>>>21)+n|0,i+=(r^n^e)+a[15]+530742520|0,i=(i<<16|i>>>16)+r|0,e+=(i^r^n)+a[2]-995338651|0,e=(e<<23|e>>>9)+i|0,n+=(i^(e|~r))+a[0]-198630844|0,n=(n<<6|n>>>26)+e|0,r+=(e^(n|~i))+a[7]+1126891415|0,r=(r<<10|r>>>22)+n|0,i+=(n^(r|~e))+a[14]-1416354905|0,i=(i<<15|i>>>17)+r|0,e+=(r^(i|~n))+a[5]-57434055|0,e=(e<<21|e>>>11)+i|0,n+=(i^(e|~r))+a[12]+1700485571|0,n=(n<<6|n>>>26)+e|0,r+=(e^(n|~i))+a[3]-1894986606|0,r=(r<<10|r>>>22)+n|0,i+=(n^(r|~e))+a[10]-1051523|0,i=(i<<15|i>>>17)+r|0,e+=(r^(i|~n))+a[1]-2054922799|0,e=(e<<21|e>>>11)+i|0,n+=(i^(e|~r))+a[8]+1873313359|0,n=(n<<6|n>>>26)+e|0,r+=(e^(n|~i))+a[15]-30611744|0,r=(r<<10|r>>>22)+n|0,i+=(n^(r|~e))+a[6]-1560198380|0,i=(i<<15|i>>>17)+r|0,e+=(r^(i|~n))+a[13]+1309151649|0,e=(e<<21|e>>>11)+i|0,n+=(i^(e|~r))+a[4]-145523070|0,n=(n<<6|n>>>26)+e|0,r+=(e^(n|~i))+a[11]-1120210379|0,r=(r<<10|r>>>22)+n|0,i+=(n^(r|~e))+a[2]+718787259|0,i=(i<<15|i>>>17)+r|0,e+=(r^(i|~n))+a[9]-343485551|0,e=(e<<21|e>>>11)+i|0,l[0]=n+l[0]|0,l[1]=e+l[1]|0,l[2]=i+l[2]|0,l[3]=r+l[3]|0}function d(l){var a=[],n;for(n=0;n<64;n+=4)a[n>>2]=l.charCodeAt(n)+(l.charCodeAt(n+1)<<8)+(l.charCodeAt(n+2)<<16)+(l.charCodeAt(n+3)<<24);return a}function h(l){var a=[],n;for(n=0;n<64;n+=4)a[n>>2]=l[n]+(l[n+1]<<8)+(l[n+2]<<16)+(l[n+3]<<24);return a}function y(l){var a=l.length,n=[1732584193,-271733879,-1732584194,271733878],e,i,r,A,L,P;for(e=64;e<=a;e+=64)c(n,d(l.substring(e-64,e)));for(l=l.substring(e-64),i=l.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)r[e>>2]|=l.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(c(n,r),e=0;e<16;e+=1)r[e]=0;return A=a*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(A[2],16),P=parseInt(A[1],16)||0,r[14]=L,r[15]=P,c(n,r),n}function m(l){var a=l.length,n=[1732584193,-271733879,-1732584194,271733878],e,i,r,A,L,P;for(e=64;e<=a;e+=64)c(n,h(l.subarray(e-64,e)));for(l=e-64<a?l.subarray(e-64):new Uint8Array(0),i=l.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)r[e>>2]|=l[e]<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(c(n,r),e=0;e<16;e+=1)r[e]=0;return A=a*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(A[2],16),P=parseInt(A[1],16)||0,r[14]=L,r[15]=P,c(n,r),n}function _(l){var a="",n;for(n=0;n<4;n+=1)a+=u[l>>n*8+4&15]+u[l>>n*8&15];return a}function g(l){var a;for(a=0;a<l.length;a+=1)l[a]=_(l[a]);return l.join("")}g(y("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function l(a,n){return a=a|0||0,a<0?Math.max(a+n,0):Math.min(a,n)}ArrayBuffer.prototype.slice=function(a,n){var e=this.byteLength,i=l(a,e),r=e,A,L,P,j;return n!==s&&(r=l(n,e)),i>r?new ArrayBuffer(0):(A=r-i,L=new ArrayBuffer(A),P=new Uint8Array(L),j=new Uint8Array(this,i,A),P.set(j),L)}})();function b(l){return/[\u0080-\uFFFF]/.test(l)&&(l=unescape(encodeURIComponent(l))),l}function T(l,a){var n=l.length,e=new ArrayBuffer(n),i=new Uint8Array(e),r;for(r=0;r<n;r+=1)i[r]=l.charCodeAt(r);return a?i:e}function w(l){return String.fromCharCode.apply(null,new Uint8Array(l))}function v(l,a,n){var e=new Uint8Array(l.byteLength+a.byteLength);return e.set(new Uint8Array(l)),e.set(new Uint8Array(a),l.byteLength),e}function E(l){var a=[],n=l.length,e;for(e=0;e<n-1;e+=2)a.push(parseInt(l.substr(e,2),16));return String.fromCharCode.apply(String,a)}function p(){this.reset()}return p.prototype.append=function(l){return this.appendBinary(b(l)),this},p.prototype.appendBinary=function(l){this._buff+=l,this._length+=l.length;var a=this._buff.length,n;for(n=64;n<=a;n+=64)c(this._hash,d(this._buff.substring(n-64,n)));return this._buff=this._buff.substring(n-64),this},p.prototype.end=function(l){var a=this._buff,n=a.length,e,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r;for(e=0;e<n;e+=1)i[e>>2]|=a.charCodeAt(e)<<(e%4<<3);return this._finish(i,n),r=g(this._hash),l&&(r=E(r)),this.reset(),r},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(l){return this._buff=l.buff,this._length=l.length,this._hash=l.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(l,a){var n=a,e,i,r;if(l[n>>2]|=128<<(n%4<<3),n>55)for(c(this._hash,l),n=0;n<16;n+=1)l[n]=0;e=this._length*8,e=e.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(e[2],16),r=parseInt(e[1],16)||0,l[14]=i,l[15]=r,c(this._hash,l)},p.hash=function(l,a){return p.hashBinary(b(l),a)},p.hashBinary=function(l,a){var n=y(l),e=g(n);return a?E(e):e},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(l){var a=v(this._buff.buffer,l),n=a.length,e;for(this._length+=l.byteLength,e=64;e<=n;e+=64)c(this._hash,h(a.subarray(e-64,e)));return this._buff=e-64<n?new Uint8Array(a.buffer.slice(e-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(l){var a=this._buff,n=a.length,e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,r;for(i=0;i<n;i+=1)e[i>>2]|=a[i]<<(i%4<<3);return this._finish(e,n),r=g(this._hash),l&&(r=E(r)),this.reset(),r},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var l=p.prototype.getState.call(this);return l.buff=w(l.buff),l},p.ArrayBuffer.prototype.setState=function(l){return l.buff=T(l.buff,!0),p.prototype.setState.call(this,l)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(l,a){var n=m(new Uint8Array(l)),e=g(n);return a?E(e):e},p})})(z)),z.exports}var Le=Ee();const Pe=Se(Le),te={secondary:{label:"Secondary",isTertiary:!1},"primary & secondary":{label:"Primary & Secondary",isTertiary:!1},k12:{label:"Primary & Secondary",isTertiary:!1},primary:{label:"Primary",isTertiary:!1},special:{label:"Special",isTertiary:!1},university:{label:"University",isTertiary:!0},middle:{label:"Middle",isTertiary:!1},"fe college":{label:"FE College",isTertiary:!0},"high school":{label:"Secondary",isTertiary:!1},elementary:{label:"Primary",isTertiary:!1},"middle school":{label:"Middle",isTertiary:!1},tafe:{label:"TAFE",isTertiary:!0},college:{label:"FE College",isTertiary:!0},"sixth form college":{label:"Sixth Form College",isTertiary:!0}},je={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},Ne={hashedEmail(t){const o=t.trim().toLowerCase();return Pe.hash(o)},removeEmptyKeys(t){if(Array.isArray(t))return t;const o={...t};return Object.entries(o).filter(([,s])=>!(s==null||typeof s=="string"&&!s.length)).reduce((s,[u,c])=>({...s,[u]:c===Object(c)?Ne.removeEmptyKeys(c):c}),{})},EVENT_TOPIC:"Free Trial Request",BDM_EVENT_TOPIC:"Requested free trial (Streamable Customer)",SOURCE:"cv_product_trial_requested",BDM_SOURCE:"cv_product_bdm_trial_requested",TRIAL_UPGRADE_SOURCE:"cv_product_trial_upgrade_requested",getSchoolType(t){var u;if(!t)return;const o=t.toLowerCase();if(["unknown","other"].includes(o))return;const s=(u=te[o])==null?void 0:u.label;return s||t},isTertiarySchool(t){var o;return((o=te[t==null?void 0:t.toLowerCase()])==null?void 0:o.isTertiary)||!1},parseProvince(t){return t.length?je[t.toLowerCase()]||t:""}},vt={checkEmail(t){return{url:"/api/braze/check-email",key:`braze:check:email:${t}`,type:M.POST,data:{email:t}}},prospectLookups(t){return{url:`{gateway}/v1/prospects/${t}/lookups`,key:`prospect:lookup:${t}`}}};function xt(){return{createOrUpdateProfile:_e(ve.ProfileApiClient).createOrUpdate}}var Oe=(t=>(t.LivestreamBooking="sl_product_livestream",t.ContactUs="sl_marketing_form_contact_us",t))(Oe||{}),Ue=(t=>(t.ContactUs="Contact us",t.LivestreamBooking="Livestream booking",t))(Ue||{});function Re(t,o){return{...t,custom:{...t==null?void 0:t.custom,topic:o.topic,source:o.source},event:{...t==null?void 0:t.event,eventTopic:o.topic}}}function $e(){const t=xe(Ie.BrazeClient);function o({user:s,additionalData:u,source:c,eventType:d,topic:h,productType:y,callback:m}){const _=Re(s,{source:c,topic:h});t.setUserInit(_),t.logFormEvent({eventType:d,additionalData:u,callback:m,internalOptions:{subscriptionGroups:y}})}return{client:t,logFormSubmission:o}}function It(){return $e()}const Be=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal","Business Manager"],De=["Teacher","Librarian / Teacher Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],he=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],Fe=["Teacher","Librarian / Teacher Librarian","Curriculum Leader","e-Learning Coordinator","IT","Head of Department","Head of Faculty","Learning Support","Learning Assistant","Deputy Principal","Assistant Principal","Principal"],Ke=["Teacher","Librarian / Teacher Librarian","Educational Assistant (EA)","Learning Support Teacher / Resource Teacher","Department Head / Manager","Curriculum Coordinator / Consultant","School Counsellor / Guidance Counsellor","Vice-Principal","Principal","Superintendent","Director of Education"],fe=["Professor","Lecturer","Course Coordinator / Administrator","Digital Learning Manager","Tutor","Teaching Fellow","Librarian","Learning Technologist","Teaching Assistant","Researcher","IT"],Me=["Professor","Lecturer","Course Coordinator / Administrator","Digital Learning Manager","Tutor","Teaching Fellow","Librarian","Learning Technologist","Teacher","Teaching Assistant","Researcher","IT"],ze={[U.AU]:Be,[U.NZ]:Fe,[U.UK]:De,[U.US]:he,[U.CA]:Ke},Ge={[U.AU]:fe,[U.UK]:Me};function ke(t){var s;const o=(s=t.countryCode)==null?void 0:s.toLowerCase();return t.isTertiary?Ge[o]||fe:ze[o]||he}const D="OTHER";function ne(t,o){return o.includes(t)?t:t?D:""}function Tt(t){const{error:o,onChange:s,countryCode:u,isTertiary:c}=t,d=ke({countryCode:u,isTertiary:c}),h=ne(t.initialValue,d),[y,m]=S.useState(h),[_,g]=S.useState(h===D?t.initialValue:"");S.useEffect(()=>{m(ne(t.initialValue,d))},[t.initialValue]);function b(v){m(v.target.value),g(""),s(v.target.value===D?"":v.target.value)}function T(v){g(v.target.value),s(v.target.value)}const w=y===D;return f.jsxs("div",{className:"form-group",children:[f.jsxs("label",{htmlFor:t.id,className:t.labelClassName,children:["Job title",t.required&&f.jsx("span",{className:"text-danger",children:"*"})]}),f.jsxs("div",{className:"mb-2",children:[f.jsxs("select",{id:t.id,name:t.id,className:`form-select ${t.size==="lg"?"form-select-lg":""} ${y.length?"text-dark":"text-secondary"} ${!!o&&"is-invalid"}`,value:y,placeholder:"Role",onChange:b,children:[f.jsx("option",{value:"",disabled:!0,className:"text-secondary",children:t.placeholder?t.placeholder:f.jsx(f.Fragment,{children:"What do you do?"})}),d.map((v,E)=>f.jsx("option",{value:v,className:"text-dark",children:v},E)),f.jsx("option",{value:D,className:"text-dark",children:"Other"})]}),!!o&&!w&&f.jsx(X,{name:t.id,children:o})]}),w&&f.jsxs("div",{className:"mb-3",children:[f.jsx("input",{className:`form-control ${t.size==="lg"?"form-select-lg":""} ${!!o&&"is-invalid"}`,type:"text",value:_,placeholder:"What do you do?",autoFocus:!0,onChange:T}),!!o&&f.jsx(X,{name:t.id,children:o})]})]})}function He(){return f.jsx("svg",{viewBox:"0 0 24 24",children:f.jsx("path",{d:"M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"})})}const qe="_clearInput_1l19p_1",Je="_clearableInput_1l19p_8",re={clearInput:qe,clearableInput:Je},ge=S.forwardRef((t,o)=>{const{onClickClear:s,showClearButton:u,clearClassName:c,...d}=t;return f.jsxs("div",{className:"position-relative",children:[f.jsx("input",{...d,ref:o,className:`${t.className} ${re.clearableInput}`}),(!!t.value||u)&&f.jsx("span",{className:`${re.clearInput} position-absolute cursor-pointer text-secondary ${c||""}`,role:"button",onClick:s,onKeyDown:h=>h.key==="Enter"&&s(),tabIndex:0,children:f.jsx("div",{className:"d-inline-block svg-container md",children:f.jsx(He,{})})})]})});var Ve=function t(o,s){if(o===s)return!0;if(o&&s&&typeof o=="object"&&typeof s=="object"){if(o.constructor!==s.constructor)return!1;var u,c,d;if(Array.isArray(o)){if(u=o.length,u!=s.length)return!1;for(c=u;c--!==0;)if(!t(o[c],s[c]))return!1;return!0}if(o.constructor===RegExp)return o.source===s.source&&o.flags===s.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===s.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===s.toString();if(d=Object.keys(o),u=d.length,u!==Object.keys(s).length)return!1;for(c=u;c--!==0;)if(!Object.prototype.hasOwnProperty.call(s,d[c]))return!1;for(c=u;c--!==0;){var h=d[c];if(!t(o[h],s[h]))return!1}return!0}return o!==o&&s!==s};const ie="__googleMapsScriptId";var B;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(B||(B={}));class R{constructor({apiKey:o,authReferrerPolicy:s,channel:u,client:c,id:d=ie,language:h,libraries:y=[],mapIds:m,nonce:_,region:g,retries:b=3,url:T="https://maps.googleapis.com/maps/api/js",version:w}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=o,this.authReferrerPolicy=s,this.channel=u,this.client=c,this.id=d||ie,this.language=h,this.libraries=y,this.mapIds=m,this.nonce=_,this.region=g,this.retries=b,this.url=T,this.version=w,R.instance){if(!Ve(this.options,R.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(R.instance.options)}`);return R.instance}R.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?B.FAILURE:this.done?B.SUCCESS:this.loading?B.LOADING:B.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let o=this.url;return o+=`?callback=${this.CALLBACK}`,this.apiKey&&(o+=`&key=${this.apiKey}`),this.channel&&(o+=`&channel=${this.channel}`),this.client&&(o+=`&client=${this.client}`),this.libraries.length>0&&(o+=`&libraries=${this.libraries.join(",")}`),this.language&&(o+=`&language=${this.language}`),this.region&&(o+=`&region=${this.region}`),this.version&&(o+=`&v=${this.version}`),this.mapIds&&(o+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(o+=`&auth_referrer_policy=${this.authReferrerPolicy}`),o}deleteScript(){const o=document.getElementById(this.id);o&&o.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((o,s)=>{this.loadCallback(u=>{u?s(u.error):o(window.google)})})}loadCallback(o){this.callbacks.push(o),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const o=this.createUrl(),s=document.createElement("script");s.id=this.id,s.type="text/javascript",s.src=o,s.onerror=this.loadErrorCallback.bind(this),s.defer=!0,s.async=!0,this.nonce&&(s.nonce=this.nonce),document.head.appendChild(s)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(o){if(this.errors.push(o),this.errors.length<=this.retries){const s=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${s} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},s)}else this.onerrorEvent=o,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(o=>{o(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}function oe(t){return new R({apiKey:t.apiKey,version:"weekly",libraries:t.libraries,retries:3})}function ye(t){const o={apiKey:t.apiKey,libraries:t.libraries||["places"]},[s,u]=S.useState(!1),[c,d]=S.useState(oe(o));S.useEffect(()=>{h()},[]);function h(y,m){if(!c){d(oe(o));return}c.loadCallback(_=>{if(_){u(!1),m&&m(_);return}u(!0),y&&y()})}return{loader:c,scriptLoaded:s,onGoogleApiReady:h}}function pe(t){const{scriptLoaded:o}=ye({apiKey:t.googleApiKey}),[s,u]=S.useState();return S.useEffect(()=>{o&&u(new google.maps.places.AutocompleteService)},[o]),s}const ae="us",me="country:placeholder:text";function Ye(t){const o=le.getLocalizedLocalityPlaceholderText(t==null?void 0:t.countryCode);if(o)return o;const s=ue.cacheGet(`${me}:${t==null?void 0:t.countryCode}`);if(s)return s}function Ze(){return String.fromCharCode(96+ce.getRandomInt(26))}function We({apiKey:t,geoLocation:o,makeRequest:s=!0,template:u="E.g. [placeholder]",templateKey:c="[placeholder]"}){const d=pe({googleApiKey:t}),[h,y]=S.useState(()=>Ye(o));S.useEffect(()=>{if(h||!d||!s)return;const g=(o==null?void 0:o.countryCode)||ae,T={input:Ze(),types:["(cities)"],region:g,componentRestrictions:{country:g}};d.getPlacePredictions(T,(w,v)=>_(w,v,g))},[h,d,o,s]);function m(g,b){ue.cacheSet(`${me}:${b}`,g,86400),y(g)}function _(g,b,T){if(b!==google.maps.places.PlacesServiceStatus.OK||!g){m(le.getLocalizedLocalityPlaceholderText(ae),T);return}const w=ce.getRandomInt(g.length),v=g[w].description;m(u.replace(c,v),T)}return h}function be(t){const[o,s]=S.useState(0),u=S.useRef(null),[c,d]=S.useState(!!t.hideInitially);function h(){var g;u.current&&((g=u.current.children[o-1])==null||g.scrollIntoView({block:"center"}))}function y(g){if(t.hideOnEnter&&d(!1),g.code==="ArrowDown"){g.stopPropagation(),g.preventDefault();let b=o+1;b>t.itemCount&&(b=1),s(b),h();return}if(g.code==="ArrowUp"){g.stopPropagation(),g.preventDefault();let b=o-1;b<=0&&(b=t.itemCount),s(b),h();return}if(g.code==="Enter"&&o>0){g.stopPropagation(),g.preventDefault(),t.onSelected(o-1),t.hideOnEnter&&d(!0);return}s(0)}function m(){t.hideOnBlur&&d(!1)}function _(){t.hideOnBlur&&d(!0)}return{selectedIndex:o,onKeyDown:y,containerRef:u,hide:c,onFocus:m,onBlur:_}}const Ce={getPlaceDetails(t){let o,s,u,c;const d=t.formatted_address;for(const h of t.address_components)for(const y of h.types)y==="locality"&&(o=h.short_name),y==="administrative_area_level_1"&&(s=h.short_name),y==="postal_code"&&(c=h.short_name),y==="country"&&(u=h.short_name);return{locality:d,country:u,postalCode:c,city:o,province:s}}},Qe={1:"geocoderPermissionDenied",2:"geocoderUnavailable",3:"geocoderTimeout"};function Xe(t){const[o,s]=S.useState({}),{onGoogleApiReady:u}=ye(t);function c(){u(()=>{window.navigator.geolocation.getCurrentPosition(d,h)})}function d(y){const{latitude:m,longitude:_}=y.coords,g=new google.maps.LatLng(m,_);new google.maps.Geocoder().geocode({location:g},(T,w)=>{if(w!==google.maps.GeocoderStatus.OK)return;const v=T.find(p=>p.types.includes("locality")||p.types.includes("administrative_area_level_2")),E=Ce.getPlaceDetails(v);s({...E,longitude:_,latitude:m})})}function h(y){Qe[y.code],t.onPositionError("We are unable to access your location. Please try again later.")}return{placeDetails:o,onClickGetCurrentLocation:c}}function et({search:t,makePredicition:o,geoLocation:s,apiKey:u}){const c=pe({googleApiKey:u}),d=de(t,300),[h,y]=S.useState();S.useEffect(()=>{if(!c)return;if((d==null?void 0:d.length)===0||!o){y(void 0);return}const g=(s==null?void 0:s.countryCode)||"us";c.getPlacePredictions({input:d,componentRestrictions:s!=null&&s.isFallback?void 0:{country:g},region:g,types:["locality","sublocality","postal_code"]},m)},[d,o,c]);function m(g,b){if(b!==google.maps.places.PlacesServiceStatus.OK||!g){y(void 0);return}y(g)}function _(g,b,T){new google.maps.places.PlacesService(b.current).getDetails({placeId:g.place_id,fields:["geometry","address_components","formatted_address"],region:s.countryCode},(v,E)=>{if(E!==google.maps.places.PlacesServiceStatus.OK)return;const p=v.geometry.location.lng(),l=v.geometry.location.lat(),{locality:a,country:n,postalCode:e,city:i,province:r}=Ce.getPlaceDetails(v);T({longitude:p,latitude:l,locality:a,country:n,city:i,postalCode:e,province:r})})}return{localityPredicitions:h,getPlaceInfo:_}}function se(){return f.jsx("svg",{viewBox:"0 0 24 24",children:f.jsx("path",{d:"m12.00559,20.40189c4.60881,0 8.37242,-3.78424 8.37242,-8.40189c0,-4.61764 -3.76361,-8.40187 -8.37242,-8.40187c-4.62002,0 -8.38365,3.78422 -8.38365,8.40187c0,4.61765 3.76364,8.40189 8.38365,8.40189zm0,-1.65557c-3.75235,0 -6.67085,-2.96208 -6.67085,-6.74632c0,-3.7842 2.91851,-6.74625 6.67085,-6.74625c3.74105,0 6.67084,2.96206 6.67084,6.74625c0,3.78424 -2.92978,6.74632 -6.67084,6.74632zm-10.14151,-6.02552l6.01731,0c0.40566,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208l-6.01731,0c-0.40566,0 -0.72117,0.31536 -0.72117,0.7208c0,0.40544 0.31551,0.7208 0.72118,0.7208l-0.00001,0zm14.25442,0l6.0174,0c0.40565,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31553,-0.7208 -0.72118,-0.7208l-6.0174,0c-0.40565,0 -0.72118,0.31536 -0.72118,0.7208c0,0.40544 0.31553,0.7208 0.72118,0.7208zm-4.12417,-4.1221c0.40566,0 0.72118,-0.31534 0.72118,-0.70952l0,-6.02547c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208c-0.3944,0 -0.7099,0.31536 -0.7099,0.7208l0,6.02547c0,0.39418 0.31551,0.70952 0.7099,0.70952zm0,14.25838c0.40566,0 0.72118,-0.3154 0.72118,-0.72077l0,-6.02541c0,-0.39425 -0.31552,-0.70965 -0.72118,-0.70965c-0.3944,0 -0.7099,0.3154 -0.7099,0.70965l0,6.02541c0,0.40538 0.31551,0.72077 0.7099,0.72077z"})})}const tt="_baseText_5xxp4_1",nt="_inputFocused_5xxp4_4",rt="_dropdown_5xxp4_7",it="_suggestionContainer_5xxp4_10",ot="_suggestionItem_5xxp4_20",at="_suggestionLoading_5xxp4_20",st="_noSuggestion_5xxp4_20",lt="_large_5xxp4_24",ct="_input_5xxp4_4",ut="_selected_5xxp4_42",dt="_useMyLocation_5xxp4_46",I={baseText:tt,inputFocused:nt,dropdown:rt,suggestionContainer:it,suggestionItem:ot,suggestionLoading:at,noSuggestion:st,large:lt,input:ct,selected:ut,useMyLocation:dt};function ht(t){const{predictions:o,getPlaceInfo:s,selectedIndex:u}=t;return f.jsx(f.Fragment,{children:o.map((c,d)=>f.jsx(H,{className:`${I.suggestionItem} ${u-1===d?I.selected:""}`,onKeyDown:h=>h.key==="Enter"&&s(c),onMouseDown:()=>s(c),onClick:()=>s(c),children:c.description},c.place_id))})}function At(t){var q,J,V,Y,Z;const o=S.useRef(null),[s,u]=S.useState(((q=t.data)==null?void 0:q.schoolLocality)||""),[c,d]=S.useState(!1),h=We({apiKey:t.googleMapsApiKey,geoLocation:t.geoLocation}),{localityPredicitions:y,getPlaceInfo:m}=et({search:s,makePredicition:c,geoLocation:t.geoLocation,apiKey:t.googleMapsApiKey}),{placeDetails:_,onClickGetCurrentLocation:g}=Xe({apiKey:t.googleMapsApiKey,onPositionError:e}),b=window.navigator.geolocation?1:0,{selectedIndex:T,onKeyDown:w,containerRef:v,hide:E,onBlur:p,onFocus:l}=be({onSelected:A,itemCount:((y==null?void 0:y.length)??0)+b,hideOnBlur:t.hideOnBlur}),[a,n]=S.useState();S.useEffect(()=>{L(_)},[_]);function e(C){d(!0),n(C)}function i(C){var O,W,Q;a&&n(void 0),c||d(!0),((O=t.data)!=null&&O.longitude||(W=t.data)!=null&&W.latitude||(Q=t.data)!=null&&Q.schoolLocality)&&t.clearData(),u(C)}function r(){i(""),o.current.focus()}function A(C){if(!y)return;if(C===y.length){j();return}const O=y[C];O&&P(O)}function L(C){t.setData({schoolLocality:C.locality,country:C.country,province:C.province,schoolPostCode:C.postalCode,longitude:C.longitude,latitude:C.latitude}),C.locality&&u(C.locality)}function P(C){c&&d(!1),m(C,o,L)}function j(C){var O;C==null||C.preventDefault(),d(!1),g(),(O=t.logUserAction)==null||O.call(t,{},{actionType:Ae.Click,descriptor:Te.UseMyLocation})}function F(){let C="form-control";return t.size==="lg"&&(C+=" form-control-lg"),!$||E?`${C} ${I.input}`:`${C} ${I.inputFocused}`}const $=(y==null?void 0:y.length)&&!((V=(J=t.data)==null?void 0:J.schoolLocality)!=null&&V.length),x=window.navigator.geolocation&&!((Z=(Y=t.data)==null?void 0:Y.schoolLocality)!=null&&Z.length),N=t.labelClassName||`d-block text-center mb-3 fw-normal ${I.baseText}`;let K="form-group position-relative";return t.size==="lg"&&(K+=` ${I.large}`),f.jsxs("div",{className:K,children:[f.jsxs("label",{className:N,htmlFor:"locality-input",children:["ZIP code or city",t.required&&f.jsx("span",{className:"text-danger",children:"*"})]}),f.jsx(ge,{type:"text",value:s,onChange:C=>i(C.currentTarget.value),id:"locality-input",className:F(),ref:o,autoComplete:"off",placeholder:h||"Loading...",disabled:t.disabled||!h,autoFocus:t==null?void 0:t.autoFocus,onClickClear:r,onKeyDown:w,onFocus:l,onBlur:p}),f.jsxs("div",{className:`position-absolute z-1 w-100 ${I.dropdown} ${E?"d-none":""}`,children:[!!$&&f.jsxs("div",{className:I.suggestionContainer,ref:v,children:[f.jsx(ht,{predictions:y,getPlaceInfo:P,selectedIndex:T}),window.navigator.geolocation&&t.useGeoLocationApi&&f.jsx(H,{className:`${I.suggestionItem} px-1 ${T-1===y.length?I.selected:""}`,onClick:j,children:f.jsxs("div",{className:"btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1",children:[f.jsx(se,{}),"Use my current location"]})})]}),x&&!$&&t.useGeoLocationApi&&f.jsx("div",{className:`d-flex ${I.useMyLocation}`,children:f.jsxs("button",{onClick:j,className:"btn btn-link info-link bg-white btn-with-icon",children:[f.jsx(se,{}),"Use my current location"]})}),!!a&&f.jsx("div",{className:"text-danger p-2",children:a})]})]})}class ft extends Error{constructor(o,s="Error"){super(s),this.body=o}}const gt={prepareQuery(t,o){let s=t;return Object.keys(o).forEach((u,c)=>{o[u]&&(c===0?s+="?":s+="&",s+=`${u}=${encodeURIComponent(o[u])}`)}),s}};function G(t){let o={method:M.GET,headers:{"Content-type":"application/json"}};t.method&&(o={...o,method:t.method}),t.init&&(o={...o,...t.init});let s=t.url;return o.method===M.GET&&t.data?s=gt.prepareQuery(s,t.data):t.data&&(o={...o,body:JSON.stringify(t.data)}),{init:o,url:s}}const k={async asyncFetch(t){const o=G(t),s=await fetch(o.url,o.init);if(!s.ok){const u=await s.json();throw new ft(u)}if(s.status!==204)return await s.json()},async asyncFetchPlain(t){const o=G(t),s=await fetch(o.url,o.init);if(s.ok)return await s.text()},fetch(t){const o=G(t);return fetch(o.url,o.init).then(s=>{if(s.status!==204)return s.json()}).then(s=>(t.success&&t.success(s),s)).catch(s=>(t.error&&t.error(),s)).finally(()=>{t.always&&t.always()})}},yt={search(t,o,s,u,c){const d={longitude:o.longitude,latitude:o.latitude};o.query&&(d.query=o.query),k.fetch({url:t,data:d,success:s,error:u,always:c})},async create(t,o){return k.asyncFetch({url:t.createProspect,method:M.POST,data:o})},getLookups(t,o){return k.asyncFetch({url:t.prospectLookups(o)})}};function pt(t){return t.toLowerCase().split(" ").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" ")}function mt(t){const o=[];return t.city&&o.push(pt(t.city)),t.province&&o.push(t.province),t.postCode&&o.push(t.postCode),o.join(" ")}function bt(t){const{filteredSchoolsList:o,getSchoolName:s,onSchoolSuggestionClick:u,selectedIndex:c}=t;return f.jsx(f.Fragment,{children:o.map((d,h)=>f.jsxs(H,{className:`${I.suggestionItem} ${c-1===h?I.selected:""}`,onKeyDown:y=>y.key==="Enter"&&u(d),onMouseDown:()=>u(d),onClick:()=>u(d),children:[s(d)," ",f.jsx("br",{}),f.jsx("small",{className:"text-secondary",children:mt(d)})]},d.id))})}function Ct(t){return f.jsx("div",{className:`info-link ${I.suggestionItem} ${I.noSuggestion} ${t.selected?I.selected:""}`,onKeyDown:o=>o.key==="Enter"&&t.handleNoSuggestion(),onMouseDown:t.handleNoSuggestion,onClick:t.handleNoSuggestion,children:"Can't find your school?"})}function wt(t){var $;const o=S.useRef(null),[s,u]=S.useState(!0),[c,d]=S.useState(t.data.schoolName&&t.data.schoolPostCode?t.data.schoolName+", "+t.data.schoolPostCode:t.data.schoolName?t.data.schoolName:""),[h,y]=S.useState(),m=de(c,250),{selectedIndex:_,onKeyDown:g,containerRef:b,hide:T,onBlur:w,onFocus:v}=be({onSelected:E,itemCount:((h==null?void 0:h.length)??0)+1,hideOnBlur:t.hideOnBlur});function E(x){if(!h&&!x)return;if(x===h.length){t.onClickNoSuggestions(c);return}const N=h[x];N&&A(N)}const p=!!(($=t.data)!=null&&$.prospectId),l=s&&!p,a=!s&&!p&&(h==null?void 0:h.length)<5,n=(h==null?void 0:h.length)&&!p;S.useEffect(()=>{if(!p){if(!m.length){r();return}if(!p&&m.length>1&&m===c){r(m);return}}},[m,p]);function e(x){(t.data.schoolName||t.data.prospectId)&&t.clearData(),x!==c&&d(x)}function i(){e(""),o.current.focus()}function r(x){if(!t.data.latitude&&!t.data.longitude){u(!1);return}u(!0);const N={latitude:t.data.latitude,longitude:t.data.longitude};x&&x.length&&(N.query=x),yt.search(t.searchUrl,N,K=>y(K),null,()=>u(!1))}function A(x){d(L(x)),t.setData({prospectId:x.id,schoolName:x.name,schoolPostCode:x.postCode,schoolType:x.prospectType,province:x.province,city:x.city,country:x.countryCode})}function L(x){return x.name}const P=(n||l||a)&&!t.disabled&&!T;let j=`form-control ${P?I.inputFocused:I.input}`,F="form-group position-relative";return t.size==="lg"&&(j+=" form-control-lg",F+=` ${I.large}`),f.jsxs("div",{className:F,children:[f.jsxs("label",{className:t.labelClassName,htmlFor:"school-input",children:["School",t.required&&f.jsx("span",{className:"text-danger",children:"*"})]}),f.jsx(ge,{id:"school-input",value:c,onChange:x=>e(x.currentTarget.value),ref:o,className:j,type:"text",autoComplete:"off",placeholder:t.placeholder||"Select your school below",disabled:t.disabled,autoFocus:!0,onClickClear:i,onKeyDown:g,onFocus:v,onBlur:w}),f.jsx("div",{className:`position-absolute z-1 w-100 ${I.dropdown} ${T?"d-none":""}`,children:f.jsxs("div",{className:`${I.suggestionContainer} ${P?"":"d-none"}`,ref:b,children:[n?f.jsx(bt,{filteredSchoolsList:h,onSchoolSuggestionClick:A,getSchoolName:L,selectedIndex:_}):l&&f.jsx("div",{className:`${I.suggestionLoading} py-4 d-flex justify-content-center`,children:f.jsx(we,{animation:"border"})}),!l&&a&&f.jsx(Ct,{selected:_===h.length+1,handleNoSuggestion:()=>{t.onClickNoSuggestions(c)}})]})})]})}export{vt as B,Tt as J,At as S,wt as a,xt as b,Ne as c,Ue as d,Oe as e,It as u};
2
+ //# sourceMappingURL=Bi8YRFeY.chunk.js.map