@cuemath/leap 2.9.7-rj-3 → 2.9.8-as1

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 (316) hide show
  1. package/dist/assets/illustrations/illustrations.js +9 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/alarm.js +41 -0
  4. package/dist/assets/line-icons/icons/alarm.js.map +1 -0
  5. package/dist/assets/line-icons/icons/bin2.js +7 -8
  6. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  7. package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
  8. package/dist/assets/line-icons/icons/dart.js +23 -0
  9. package/dist/assets/line-icons/icons/dart.js.map +1 -0
  10. package/dist/assets/line-icons/icons/exclamation.js +26 -0
  11. package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
  12. package/dist/assets/line-icons/icons/home2.js +25 -0
  13. package/dist/assets/line-icons/icons/home2.js.map +1 -0
  14. package/dist/assets/line-icons/icons/important.js +23 -0
  15. package/dist/assets/line-icons/icons/important.js.map +1 -0
  16. package/dist/assets/line-icons/icons/puzzle.js +25 -0
  17. package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
  18. package/dist/assets/line-icons/icons/recap.js +32 -0
  19. package/dist/assets/line-icons/icons/recap.js.map +1 -0
  20. package/dist/assets/line-icons/icons/skip-colored.js +43 -0
  21. package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
  22. package/dist/assets/line-icons/icons/status.js +41 -0
  23. package/dist/assets/line-icons/icons/status.js.map +1 -0
  24. package/dist/assets/line-icons/icons/testtube.js +33 -0
  25. package/dist/assets/line-icons/icons/testtube.js.map +1 -0
  26. package/dist/assets/lottie/lottie.js +9 -1
  27. package/dist/assets/lottie/lottie.js.map +1 -1
  28. package/dist/constants/api.js +3 -2
  29. package/dist/constants/api.js.map +1 -1
  30. package/dist/features/analytics-events/platform-events-student.js +3 -3
  31. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  32. package/dist/features/analytics-events/whitelist-events.js +13 -11
  33. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  34. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
  35. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  36. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
  37. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  38. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  39. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  40. package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
  41. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  42. package/dist/features/chapters-v2/api/chapter.js +10 -0
  43. package/dist/features/chapters-v2/api/chapter.js.map +1 -0
  44. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
  45. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
  46. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +35 -0
  47. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
  48. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +83 -0
  49. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
  50. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
  51. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
  52. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +98 -0
  53. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
  54. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +51 -0
  55. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
  56. package/dist/features/chapters-v2/chapter-details/chapter-details.js +129 -0
  57. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
  58. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
  59. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
  60. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +159 -0
  61. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
  62. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
  63. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
  64. package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
  65. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
  66. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +30 -0
  67. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +1 -0
  68. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
  69. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
  70. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +9 -0
  71. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
  72. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +189 -0
  73. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
  74. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +194 -0
  75. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
  76. package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
  77. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
  78. package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
  79. package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
  80. package/dist/features/chapters-v2/constants/block-constants.js +20 -0
  81. package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
  82. package/dist/features/chapters-v2/constants/node-constants.js +14 -0
  83. package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
  84. package/dist/features/chapters-v2/utils/index.js +38 -0
  85. package/dist/features/chapters-v2/utils/index.js.map +1 -0
  86. package/dist/features/chapters-v2/utils/node-card-utils.js +177 -0
  87. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
  88. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +100 -107
  89. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  90. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +93 -96
  91. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  92. package/dist/features/circle-games/games/tutorial/constants.js +2 -3
  93. package/dist/features/circle-games/games/tutorial/constants.js.map +1 -1
  94. package/dist/features/circle-games/games/tutorial/tutorial-styled.js +17 -21
  95. package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
  96. package/dist/features/circle-games/games/tutorial/tutorial.js +41 -47
  97. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  98. package/dist/features/circle-games/games/web-view/web-view.js +52 -45
  99. package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
  100. package/dist/features/circle-games/leaderboard/comps/banner/banner.js +6 -6
  101. package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
  102. package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js +1 -1
  103. package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js.map +1 -1
  104. package/dist/features/circle-games/leaderboard/leaderboard-styled.js +1 -1
  105. package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
  106. package/dist/features/circle-games/leaderboard/leaderboard.js +9 -9
  107. package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
  108. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +8 -8
  109. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
  110. package/dist/features/circle-games/sign-up/constants.js +9 -9
  111. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  112. package/dist/features/communication/pub-sub/constants.js +12 -6
  113. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  114. package/dist/features/homework/card-menu-option.js +28 -0
  115. package/dist/features/homework/card-menu-option.js.map +1 -0
  116. package/dist/features/homework/card-menu-options.js +22 -0
  117. package/dist/features/homework/card-menu-options.js.map +1 -0
  118. package/dist/features/homework/card-title.js +16 -0
  119. package/dist/features/homework/card-title.js.map +1 -0
  120. package/dist/features/homework/homework-analytics-events.js +10 -0
  121. package/dist/features/homework/homework-analytics-events.js.map +1 -0
  122. package/dist/features/homework/homework-card-view.js +143 -0
  123. package/dist/features/homework/homework-card-view.js.map +1 -0
  124. package/dist/features/homework/homework-card.js +245 -0
  125. package/dist/features/homework/homework-card.js.map +1 -0
  126. package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
  127. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
  128. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +63 -0
  129. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
  130. package/dist/features/homework/hw-card-list/hw-card-list.js +191 -0
  131. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
  132. package/dist/features/homework/node-progress.js +29 -0
  133. package/dist/features/homework/node-progress.js.map +1 -0
  134. package/dist/features/homework/styles.js +130 -0
  135. package/dist/features/homework/styles.js.map +1 -0
  136. package/dist/features/homework/utils.js +48 -0
  137. package/dist/features/homework/utils.js.map +1 -0
  138. package/dist/features/journey/comps/coachmark/coachmark-styled.js +12 -5
  139. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  140. package/dist/features/journey/comps/coachmark/coachmark.js +23 -24
  141. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  142. package/dist/features/journey/hooks/use-chapter-journey.js +194 -0
  143. package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -0
  144. package/dist/features/journey/hooks/use-home-page-journey.js +189 -0
  145. package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -0
  146. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  147. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  148. package/dist/features/journey/journey-id/journey-id-teacher.js +5 -0
  149. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -0
  150. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +587 -0
  151. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -0
  152. package/dist/features/journey/use-journey/constants.js +4 -2
  153. package/dist/features/journey/use-journey/constants.js.map +1 -1
  154. package/dist/features/journey/use-journey/journey-context-provider.js +36 -28
  155. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  156. package/dist/features/journey/use-journey/journey-styled.js +10 -4
  157. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  158. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  159. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  160. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
  161. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  162. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
  163. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  164. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
  165. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  166. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
  167. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  168. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
  169. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  170. package/dist/features/milestone/create/milestone-create.js +49 -43
  171. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  172. package/dist/features/milestone/create/utils/index.js +33 -38
  173. package/dist/features/milestone/create/utils/index.js.map +1 -1
  174. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  175. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  176. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  177. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  178. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
  179. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  180. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
  181. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  182. package/dist/features/milestone/edit/goal-edit-container.js +64 -62
  183. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  184. package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
  185. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  186. package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
  187. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  188. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  189. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  190. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
  191. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  192. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  193. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  194. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +138 -105
  195. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  196. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
  197. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  198. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +157 -176
  199. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  200. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
  201. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  202. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
  203. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  204. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
  205. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  206. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
  207. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  208. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
  209. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  210. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
  211. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  212. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +17 -25
  213. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  214. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
  215. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  216. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +110 -113
  217. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  218. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
  219. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
  220. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  221. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  222. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  223. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  224. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +116 -113
  225. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  226. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
  227. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
  228. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
  229. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
  230. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +87 -0
  231. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
  232. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
  233. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
  234. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +46 -50
  235. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  236. package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
  237. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
  238. package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
  239. package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
  240. package/dist/features/recent-chapters/recent-chapters.js +39 -0
  241. package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
  242. package/dist/features/sheet-v2/resource-list/resource-list.js +45 -0
  243. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
  244. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  245. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  246. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
  247. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  248. package/dist/features/ui/arc-button/constants.js +4 -4
  249. package/dist/features/ui/arc-button/constants.js.map +1 -1
  250. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
  251. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  252. package/dist/features/ui/constants/z-index.js +2 -3
  253. package/dist/features/ui/constants/z-index.js.map +1 -1
  254. package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
  255. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  256. package/dist/features/ui/context-menu/context-menu.js +30 -15
  257. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  258. package/dist/features/ui/lottie-animation/lottie-animation.js +19 -13
  259. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  260. package/dist/features/ui/theme/button.js +22 -107
  261. package/dist/features/ui/theme/button.js.map +1 -1
  262. package/dist/features/ui/theme/get-theme.js +18 -20
  263. package/dist/features/ui/theme/get-theme.js.map +1 -1
  264. package/dist/index.d.ts +357 -47
  265. package/dist/index.js +503 -471
  266. package/dist/index.js.map +1 -1
  267. package/dist/node_modules/date-fns/differenceInDays.js +17 -0
  268. package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
  269. package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
  270. package/dist/static/competitive-arena.b9c40801.json +1 -0
  271. package/dist/static/learn.71b13323.json +1 -0
  272. package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
  273. package/dist/static/node-learn-bg.b61f815c.svg +1 -0
  274. package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
  275. package/dist/static/node-project-bg.e6a33e28.svg +1 -0
  276. package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
  277. package/dist/static/node-recap-bg.546154e4.svg +1 -0
  278. package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
  279. package/dist/static/node-video-bg.3df3f73a.svg +1 -0
  280. package/dist/static/practice.158dd488.json +1 -0
  281. package/dist/static/project.eb665827.json +1 -0
  282. package/dist/static/puzzle.b298c7e4.json +1 -0
  283. package/dist/static/recap.0dd2c1e2.json +1 -0
  284. package/dist/static/test.803d6036.json +1 -0
  285. package/dist/static/video.b41451e2.json +1 -0
  286. package/package.json +1 -1
  287. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
  288. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
  289. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
  290. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
  291. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
  292. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
  293. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
  294. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
  295. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
  296. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
  297. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
  298. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
  299. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
  300. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
  301. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
  302. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
  303. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
  304. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
  305. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
  306. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
  307. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
  308. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
  309. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
  310. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
  311. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
  312. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
  313. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
  314. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
  315. package/dist/features/ui/theme/breakpoints.js +0 -11
  316. package/dist/features/ui/theme/breakpoints.js.map +0 -1
@@ -1,122 +1,121 @@
1
- import { jsx as r, Fragment as O } from "react/jsx-runtime";
2
- import { useRef as N, useCallback as L, useEffect as j } from "react";
3
- import Z from "../../../../../assets/line-icons/icons/carat-right.js";
4
- import { PLATFORM_EVENTS_STUDENT as M } from "../../../../analytics-events/platform-events-student.js";
5
- import { JOURNEY_ID_STUDENT as q } from "../../../../journey/journey-id/journey-id-student.js";
1
+ import { jsx as r, Fragment as b } from "react/jsx-runtime";
2
+ import { useRef as O, useCallback as A, useEffect as X } from "react";
3
+ import J from "../../../../../assets/line-icons/icons/carat-right.js";
4
+ import { PLATFORM_EVENTS_STUDENT as G } from "../../../../analytics-events/platform-events-student.js";
5
+ import { JOURNEY_ID_STUDENT as K } from "../../../../journey/journey-id/journey-id-student.js";
6
6
  import { IndicatorType as d } from "../../../../journey/use-journey/constants.js";
7
- import { useJourney as z } from "../../../../journey/use-journey/use-journey.js";
8
- import Q from "../../../../ui/buttons/icon-button/icon-button.js";
9
- import { useUIContext as ee } from "../../../../ui/context/context.js";
10
- import S from "../../../../ui/layout/flex-view.js";
11
- import T from "../../../../ui/text/text.js";
12
- import { getTheme as te } from "../../../../ui/theme/get-theme.js";
13
- import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as x } from "../../../enum/circle-onboarding-steps.js";
14
- import { useCircleSounds as re } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
15
- import { TablesCard as $ } from "../../comps/tables-card/tables-card.js";
16
- import { GAME_LAUNCHER_ANALYTICS_EVENTS as ne } from "../../game-launcher-analytics-events.js";
17
- import { SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS as oe, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS as ie, START_ANIMATING_CLONED_ELEM as w, TABLE_CARD_INDEX as F, GO_TO_TABLE_LAUNCHER_DURATION_MS as le, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as ce, PUZZLE_CARD_INDEX as ae, SHOW_INITIAL_COACHMARK_AFTER_MS as V, LESSON_CARD_INDEX as se, SHOW_INITIAL_TOOLTIP_AFTER_MS as de } from "./constants.js";
18
- import { Indicator as ue } from "./use-table-launcher-journey-styled.js";
19
- const He = ({
7
+ import { useJourney as j } from "../../../../journey/use-journey/use-journey.js";
8
+ import Z from "../../../../ui/buttons/icon-button/icon-button.js";
9
+ import { useUIContext as q } from "../../../../ui/context/context.js";
10
+ import R from "../../../../ui/layout/flex-view.js";
11
+ import m from "../../../../ui/text/text.js";
12
+ import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as v } from "../../../enum/circle-onboarding-steps.js";
13
+ import { useCircleSounds as z } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
14
+ import { TablesCard as M } from "../../comps/tables-card/tables-card.js";
15
+ import { GAME_LAUNCHER_ANALYTICS_EVENTS as Q } from "../../game-launcher-analytics-events.js";
16
+ import { SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS as ee, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS as te, START_ANIMATING_CLONED_ELEM as $, TABLE_CARD_INDEX as x, GO_TO_TABLE_LAUNCHER_DURATION_MS as re, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as ne, PUZZLE_CARD_INDEX as oe, SHOW_INITIAL_COACHMARK_AFTER_MS as w, LESSON_CARD_INDEX as ie, SHOW_INITIAL_TOOLTIP_AFTER_MS as le } from "./constants.js";
17
+ import { Indicator as ce } from "./use-table-launcher-journey-styled.js";
18
+ const Oe = ({
20
19
  carouselRefs: a,
21
- onTableSegmentClick: P,
22
- onJourneyComplete: H
20
+ onTableSegmentClick: N,
21
+ onJourneyComplete: S
23
22
  }) => {
24
- const e = q.CIRCLE_TABLES_INTRO_JOURNEY, { breakpoints: X } = te(), { isMobile: u } = X, g = u ? "ab3-bold" : "ab2-bold", t = N(null), A = N(null), E = N([]), { playButtonSound: y } = re(), { nextCoachmark: l, setJourney: I, addCoachmark: m, endJourney: D } = z(), { onEvent: C } = ee(), R = L(
23
+ const e = K.CIRCLE_TABLES_INTRO_JOURNEY, t = O(null), p = O(null), T = O([]), { playButtonSound: P } = z(), { nextCoachmark: l, setJourney: C, addCoachmark: u, endJourney: H } = j(), { onEvent: f } = q(), L = A(
25
24
  (n) => {
26
25
  var c, o;
27
- D(e), n && P(n), C(M.ONBOARDING_STEP_COMPLETED, {
28
- step: x.TABLES
29
- }), (c = t == null ? void 0 : t.current) == null || c.setLabelVisiblity(!0), (o = t == null ? void 0 : t.current) == null || o.stopLabelAnimation(), H(e);
26
+ H(e), n && N(n), f(G.ONBOARDING_STEP_COMPLETED, {
27
+ step: v.TABLES
28
+ }), (c = t == null ? void 0 : t.current) == null || c.setLabelVisiblity(!0), (o = t == null ? void 0 : t.current) == null || o.stopLabelAnimation(), S(e);
30
29
  },
31
- [D, e, H, P, C]
32
- ), W = L(
30
+ [H, e, S, N, f]
31
+ ), y = A(
33
32
  (n, c) => {
34
- var h, p, _;
35
- if (!((h = t.current) != null && h.segmentedCardWrapperRef.current) || !((p = t.current) != null && p.labelRef.current))
33
+ var g, E, h;
34
+ if (!((g = t.current) != null && g.segmentedCardWrapperRef.current) || !((E = t.current) != null && E.labelRef.current))
36
35
  return;
37
- const o = t.current.labelRef.current.getBoundingClientRect(), i = (_ = t.current) == null ? void 0 : _.segmentedCardWrapperRef.current.getBoundingClientRect();
38
- m(e, {
36
+ const o = t.current.labelRef.current.getBoundingClientRect(), i = (h = t.current) == null ? void 0 : h.segmentedCardWrapperRef.current.getBoundingClientRect();
37
+ u(e, {
39
38
  originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
40
39
  isActive: !1,
41
40
  type: d.TOOLTIP,
42
41
  elementToHighlight: /* @__PURE__ */ r(
43
- $,
42
+ M,
44
43
  {
45
- ref: A,
44
+ ref: p,
46
45
  defaultTable: c,
47
46
  label: n.label,
48
47
  data: n.data,
49
- onPress: R,
50
- onGoBackFromTableLevel: R
48
+ onPress: L,
49
+ onGoBackFromTableLevel: L
51
50
  }
52
51
  ),
53
52
  indicator: {
54
- position: "top",
53
+ position: "left",
55
54
  backgroundColor: "YELLOW_4",
56
55
  width: 236,
57
- tooltipItem: /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(T, { $renderAs: g, children: "Each table has 3 levels—clear them and earn 3 stars!" }) }),
58
- tooltipXCoOrdinates: o.width / 2,
59
- tooltipYCoOrdinates: 45
56
+ tooltipItem: /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "Each table has 3 levels—clear them and earn 3 stars!" }) }),
57
+ tooltipXCoOrdinates: 0,
58
+ tooltipYCoOrdinates: o.height * 0.35
60
59
  }
61
- }), m(e, {
60
+ }), u(e, {
62
61
  originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
63
62
  isActive: !1,
64
63
  type: d.NUDGE,
65
64
  indicator: {
66
65
  nudge: "click",
67
- content: !u && /* @__PURE__ */ r(T, { $renderAs: "ab1", $color: "WHITE", children: "Pick a level" }),
66
+ content: /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Pick a level" }),
68
67
  nudgePointerX: i.width / 2 + 50,
69
68
  nudgePointerY: i.height * 0.4
70
69
  },
71
- elementToHighlight: /* @__PURE__ */ r(O, {})
72
- }), l(e, !1, oe), l(e, !0, ie);
70
+ elementToHighlight: /* @__PURE__ */ r(b, {})
71
+ }), l(e, !1, ee), l(e, !0, te);
73
72
  const s = setTimeout(() => {
74
- var f;
75
- clearTimeout(s), (f = A.current) == null || f.startLabelAnimation("YELLOW_4");
76
- }, w);
77
- E.current.push(s);
73
+ var _;
74
+ clearTimeout(s), (_ = p.current) == null || _.startLabelAnimation("YELLOW_4");
75
+ }, $);
76
+ T.current.push(s);
78
77
  },
79
- [m, R, u, e, l, g]
80
- ), b = L(() => {
78
+ [u, L, e, l]
79
+ ), I = A(() => {
81
80
  var o;
82
- y(), (o = a.current) == null || o.goToIndex(F), l(e, !1, le), C(M.ONBOARDING_STEP_VIEWED, {
83
- step: x.TABLES
81
+ P(), (o = a.current) == null || o.goToIndex(x), l(e, !1, re), f(G.ONBOARDING_STEP_VIEWED, {
82
+ step: v.TABLES
84
83
  });
85
84
  const n = setTimeout(() => {
86
85
  var i;
87
86
  clearTimeout(n), (i = t.current) == null || i.setLabelVisiblity(!1), l(e, !0);
88
- }, ce);
89
- E.current.push(n);
87
+ }, ne);
88
+ T.current.push(n);
90
89
  const c = setTimeout(() => {
91
90
  var i;
92
- clearTimeout(c), (i = A.current) == null || i.startLabelAnimation("YELLOW_4");
93
- }, w);
94
- E.current.push(c);
95
- }, [a, e, l, y, C]), J = L(
91
+ clearTimeout(c), (i = p.current) == null || i.startLabelAnimation("YELLOW_4");
92
+ }, $);
93
+ T.current.push(c);
94
+ }, [a, e, l, P, f]), F = A(
96
95
  (n, c = !1) => {
97
- var _, f, k, Y, B, U, G, v;
98
- const o = (_ = a.current) == null ? void 0 : _.indicatorRefs, i = (f = a.current) == null ? void 0 : f.nextBtnRef, s = o == null ? void 0 : o[F];
99
- if (!((k = t.current) != null && k.segmentedCardWrapperRef.current) || !((Y = t.current) != null && Y.labelRef.current) || !o || !(i != null && i.current) || !s || !s.current)
96
+ var h, _, D, W, Y, k, B, U;
97
+ const o = (h = a.current) == null ? void 0 : h.indicatorRefs, i = (_ = a.current) == null ? void 0 : _.nextBtnRef, s = o == null ? void 0 : o[x];
98
+ if (!((D = t.current) != null && D.segmentedCardWrapperRef.current) || !((W = t.current) != null && W.labelRef.current) || !o || !(i != null && i.current) || !s || !s.current)
100
99
  return;
101
- const h = t.current.labelRef.current.getBoundingClientRect(), p = (B = t.current) == null ? void 0 : B.segmentedCardWrapperRef.current.getBoundingClientRect();
102
- c ? (I(e, [
100
+ const g = t.current.labelRef.current.getBoundingClientRect(), E = (Y = t.current) == null ? void 0 : Y.segmentedCardWrapperRef.current.getBoundingClientRect();
101
+ c ? (C(e, [
103
102
  {
104
103
  originalElementToHighlightRef: s,
105
104
  isActive: !1,
106
105
  type: d.TOOLTIP,
107
- elementToHighlight: /* @__PURE__ */ r(ue, { $isActive: !1 }),
106
+ elementToHighlight: /* @__PURE__ */ r(ce, { $isActive: !1 }),
108
107
  indicator: {
109
108
  position: "bottom",
110
109
  backgroundColor: "YELLOW_4",
111
110
  width: 52,
112
111
  tooltipItem: /* @__PURE__ */ r(
113
- S,
112
+ R,
114
113
  {
115
114
  $position: "absolute",
116
115
  $flexDirection: "row",
117
116
  style: { top: 6, left: 8, cursor: "pointer" },
118
- onClick: b,
119
- children: /* @__PURE__ */ r(T, { $renderAs: g, children: "NEW" })
117
+ onClick: I,
118
+ children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "NEW" })
120
119
  }
121
120
  ),
122
121
  tooltipYCoOrdinates: 14
@@ -132,85 +131,83 @@ const He = ({
132
131
  content: "",
133
132
  nudgePointerY: 20
134
133
  },
135
- elementToHighlight: /* @__PURE__ */ r(O, {})
134
+ elementToHighlight: /* @__PURE__ */ r(b, {})
136
135
  }
137
- ]), (v = a.current) == null || v.goToIndex(se), l(e, !1, V), l(e, !0, de)) : (I(e, [
136
+ ]), (U = a.current) == null || U.goToIndex(ie), l(e, !1, w), l(e, !0, le)) : (C(e, [
138
137
  {
139
- originalElementToHighlightRef: (U = a.current) == null ? void 0 : U.nextBtnRef,
138
+ originalElementToHighlightRef: (k = a.current) == null ? void 0 : k.nextBtnRef,
140
139
  isActive: !1,
141
140
  type: d.NUDGE,
142
141
  indicator: {
143
142
  nudge: "click",
144
- content: !u && /* @__PURE__ */ r(T, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
143
+ content: /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
145
144
  nudgePointerX: 0,
146
145
  nudgePointerY: 0
147
146
  },
148
147
  elementToHighlight: /* @__PURE__ */ r(
149
- Q,
148
+ Z,
150
149
  {
151
150
  renderAs: "secondary",
152
- Icon: Z,
153
- onClick: b,
154
- analyticsLabel: ne.JOURNEY_NEXT_ACTIVITY
151
+ Icon: J,
152
+ onClick: I,
153
+ analyticsLabel: Q.JOURNEY_NEXT_ACTIVITY
155
154
  }
156
155
  )
157
156
  }
158
- ]), (G = a.current) == null || G.goToIndex(ae), l(e, !1, V)), m(e, {
157
+ ]), (B = a.current) == null || B.goToIndex(oe), l(e, !1, w)), u(e, {
159
158
  originalElementToHighlightRef: t.current.labelRef,
160
159
  isActive: !1,
161
160
  type: d.TOOLTIP,
162
- elementToHighlight: /* @__PURE__ */ r(O, {}),
161
+ elementToHighlight: /* @__PURE__ */ r(b, {}),
163
162
  indicator: {
164
- position: "top",
163
+ position: "right",
165
164
  backgroundColor: "YELLOW_4",
166
165
  width: 264,
167
- tooltipItem: /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(T, { $renderAs: g, children: "Get faster at multiplication! Practice everyday and become a Tables champ." }) }),
168
- tooltipXCoOrdinates: h.width / 2,
169
- tooltipYCoOrdinates: h.height + 10
166
+ tooltipItem: /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "Get faster at multiplication! Practice everyday and become a Tables champ." }) }),
167
+ tooltipXCoOrdinates: g.width + 50,
168
+ tooltipYCoOrdinates: g.height / 2
170
169
  }
171
- }), m(e, {
170
+ }), u(e, {
172
171
  originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
173
172
  isActive: !1,
174
173
  type: d.NUDGE,
175
174
  indicator: {
176
175
  nudge: "click",
177
- content: !u && /* @__PURE__ */ r(T, { $renderAs: "ab1", $color: "WHITE", children: "Pick a table to start" }),
178
- nudgePointerX: p.width / 2 + 50,
179
- nudgePointerY: p.height / 2
176
+ content: /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Pick a table to start" }),
177
+ nudgePointerX: E.width / 2 + 50,
178
+ nudgePointerY: E.height / 2
180
179
  },
181
180
  elementToHighlight: /* @__PURE__ */ r(
182
- $,
181
+ M,
183
182
  {
184
- ref: A,
183
+ ref: p,
185
184
  label: n.label,
186
185
  data: n.data,
187
186
  onPress: () => {
188
187
  },
189
- onPressTableSegment: (K) => W(n, K)
188
+ onPressTableSegment: (V) => y(n, V)
190
189
  }
191
190
  )
192
191
  });
193
192
  },
194
193
  [
195
- m,
196
- a,
197
- b,
198
- W,
199
194
  u,
195
+ a,
196
+ I,
197
+ y,
200
198
  e,
201
199
  l,
202
- I,
203
- g
200
+ C
204
201
  ]
205
202
  );
206
- return j(() => () => {
207
- E.current.forEach((n) => clearTimeout(n)), E.current = [];
203
+ return X(() => () => {
204
+ T.current.forEach((n) => clearTimeout(n)), T.current = [];
208
205
  }, [e]), {
209
206
  tableRef: t,
210
- startJourney: J
207
+ startJourney: F
211
208
  };
212
209
  };
213
210
  export {
214
- He as useTableLauncherJourney
211
+ Oe as useTableLauncherJourney
215
212
  };
216
213
  //# sourceMappingURL=use-table-launcher-journey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as Action } from '../../../enum/circle-onboarding-steps';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n LESSON_CARD_INDEX,\n PUZZLE_CARD_INDEX,\n SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS,\n SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS,\n TABLE_CARD_INDEX,\n} from './constants';\nimport {\n GO_TO_TABLE_LAUNCHER_DURATION_MS,\n SHOW_CLICK_TABLE_NUDGE_AFTER_MS,\n SHOW_INITIAL_COACHMARK_AFTER_MS,\n SHOW_INITIAL_TOOLTIP_AFTER_MS,\n START_ANIMATING_CLONED_ELEM,\n} from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n\n const { breakpoints } = getTheme();\n const { isMobile } = breakpoints;\n const tooltipTextRenderAs = isMobile ? 'ab3-bold' : 'ab2-bold';\n\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const handleEndJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n endJourney(journeyId);\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED, {\n step: Action.TABLES,\n });\n\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n },\n [endJourney, journeyId, onJourneyComplete, onTableSegmentClick, trackAnalytics],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={handleEndJourney}\n onGoBackFromTableLevel={handleEndJourney}\n />\n ),\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Each table has 3 levels—clear them and earn 3 stars!\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: segmentedCardDims.width / 2,\n tooltipYCoOrdinates: 45,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(startAnimationOnLabelAgain);\n },\n [addCoachmark, handleEndJourney, isMobile, journeyId, nextCoachmark, tooltipTextRenderAs],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, GO_TO_TABLE_LAUNCHER_DURATION_MS);\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step: Action.TABLES,\n });\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n\n timerRefs.current.push(showNudge);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(animateLabel);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackAnalytics]);\n\n const startJourney = useCallback(\n (tablesData: ITables, isTutorialOnboardingDone: boolean = false) => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n // TAKE THE USER TO THE TABLE CARD\n if (!isTutorialOnboardingDone) {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n },\n ]);\n carouselRefs.current?.goToIndex(PUZZLE_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show nudge => Click to proceed\n } else {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs={tooltipTextRenderAs}>NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n },\n ]);\n carouselRefs.current?.goToIndex(LESSON_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, SHOW_INITIAL_TOOLTIP_AFTER_MS); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Get faster at multiplication! Practice everyday and become a Tables champ.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width / 2,\n tooltipYCoOrdinates: labelDims.height + 10,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n isMobile,\n journeyId,\n nextCoachmark,\n setJourney,\n tooltipTextRenderAs,\n ],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [journeyId]);\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","breakpoints","getTheme","isMobile","tooltipTextRenderAs","originalTableRef","useRef","highlightedTableRef","timerRefs","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","endJourney","useJourney","trackAnalytics","useUIContext","handleEndJourney","useCallback","tableDetails","PLATFORM_EVENTS_STUDENT","Action","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS","SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS","startAnimationOnLabelAgain","START_ANIMATING_CLONED_ELEM","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","showNudge","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","animateLabel","startJourney","tablesData","isTutorialOnboardingDone","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","S.Indicator","_h","LESSON_CARD_INDEX","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","_f","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","_g","PUZZLE_CARD_INDEX","tableInfo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;;;AA0CO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAYC,EAAmB,6BAE/B,EAAE,aAAAC,MAAgBC,MAClB,EAAE,UAAAC,EAAa,IAAAF,GACfG,IAAsBD,IAAW,aAAa,YAE9CE,IAAmBC,EAAsB,IAAI,GAC7CC,IAAsBD,EAAsB,IAAI,GAEhDE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,iBAAAG,MAAoBC,MACtB,EAAE,eAAAC,GAAe,YAAAC,GAAY,cAAAC,GAAc,YAAAC,EAAA,IAAeC,KAC1D,EAAE,SAASC,EAAe,IAAIC,GAAa,GAE3CC,IAAmBC;AAAA,IACvB,CAACC,MAAiC;;AAChC,MAAAN,EAAWf,CAAS,GAEhBqB,KACFvB,EAAoBuB,CAAY,GAElCJ,EAAeK,EAAwB,2BAA2B;AAAA,QAChE,MAAMC,EAAO;AAA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,QAC1C;AAAA,MAAA,CACD,GAEDzC,EAAad,GAAW;AAAA,QACtB,+BAA+BM,EAAiB,QAAQ;AAAA,QACxD,UAAU;AAAA,QACV,MAAM0B,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,OAAO;AAAA,UACP,SAAS,CAAC5B,KACR,gBAAA6B,EAACG,KAAK,WAAU,OAAM,QAAO,SAC1B,UACH,wBAAA,CAAA;AAAA,UAEF,eAAeN,EAAc,QAAQ,IAAI;AAAA,UACzC,eAAeA,EAAc,SAAS;AAAA,QACxC;AAAA,QACA,oBACE,gBAAAG;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAK1B;AAAA,YACL,OAAOyC,EAAW;AAAA,YAClB,MAAMA,EAAW;AAAA,YACjB,SAAS,MAAM;AAAA,YAAC;AAAA,YAChB,qBAAqB,CAAAmB,MAAa1C,EAAwBuB,GAAYmB,CAAS;AAAA,UAAA;AAAA,QACjF;AAAA,MAAA,CAEH;AAAA,IACH;AAAA,IACA;AAAA,MACEtD;AAAA,MACAjB;AAAA,MACA6C;AAAA,MACAhB;AAAA,MACAtB;AAAA,MACAJ;AAAA,MACAY;AAAA,MACAC;AAAA,MACAR;AAAA,IACF;AAAA,EAAA;AAIF,SAAAgE,EAAU,MACD,MAAM;AACX,IAAA5D,EAAU,QAAQ,QAAQ,CAAS6D,MAAA,aAAaA,CAAK,CAAC,GACtD7D,EAAU,UAAU;EAAC,GAEtB,CAACT,CAAS,CAAC,GAEP;AAAA,IACL,UAAUM;AAAA,IACV,cAAA0C;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as Action } from '../../../enum/circle-onboarding-steps';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n LESSON_CARD_INDEX,\n PUZZLE_CARD_INDEX,\n SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS,\n SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS,\n TABLE_CARD_INDEX,\n} from './constants';\nimport {\n GO_TO_TABLE_LAUNCHER_DURATION_MS,\n SHOW_CLICK_TABLE_NUDGE_AFTER_MS,\n SHOW_INITIAL_COACHMARK_AFTER_MS,\n SHOW_INITIAL_TOOLTIP_AFTER_MS,\n START_ANIMATING_CLONED_ELEM,\n} from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const handleEndJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n endJourney(journeyId);\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED, {\n step: Action.TABLES,\n });\n\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n },\n [endJourney, journeyId, onJourneyComplete, onTableSegmentClick, trackAnalytics],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={handleEndJourney}\n onGoBackFromTableLevel={handleEndJourney}\n />\n ),\n indicator: {\n position: 'left',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">Each table has 3 levels—clear them and earn 3 stars!</Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: segmentedCardDims.height * 0.35,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(startAnimationOnLabelAgain);\n },\n [addCoachmark, handleEndJourney, journeyId, nextCoachmark],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, GO_TO_TABLE_LAUNCHER_DURATION_MS);\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step: Action.TABLES,\n });\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n\n timerRefs.current.push(showNudge);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(animateLabel);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackAnalytics]);\n\n const startJourney = useCallback(\n (tablesData: ITables, isTutorialOnboardingDone: boolean = false) => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n // TAKE THE USER TO THE TABLE CARD\n if (!isTutorialOnboardingDone) {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n },\n ]);\n carouselRefs.current?.goToIndex(PUZZLE_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show nudge => Click to proceed\n } else {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs=\"ab2-bold\">NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n },\n ]);\n carouselRefs.current?.goToIndex(LESSON_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, SHOW_INITIAL_TOOLTIP_AFTER_MS); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'YELLOW_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster at multiplication! Practice everyday and become a Tables champ.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width + 50,\n tooltipYCoOrdinates: labelDims.height / 2,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n journeyId,\n nextCoachmark,\n setJourney,\n ],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [journeyId]);\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","originalTableRef","useRef","highlightedTableRef","timerRefs","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","endJourney","useJourney","trackAnalytics","useUIContext","handleEndJourney","useCallback","tableDetails","PLATFORM_EVENTS_STUDENT","Action","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS","SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS","startAnimationOnLabelAgain","START_ANIMATING_CLONED_ELEM","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","showNudge","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","animateLabel","startJourney","tablesData","isTutorialOnboardingDone","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","S.Indicator","_h","LESSON_CARD_INDEX","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","_f","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","_g","PUZZLE_CARD_INDEX","tableInfo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;;AAyCO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAYC,EAAmB,6BAE/BC,IAAmBC,EAAsB,IAAI,GAC7CC,IAAsBD,EAAsB,IAAI,GAEhDE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,iBAAAG,MAAoBC,KACtB,EAAE,e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HT,
4
- H as JOURNEY_SEPARATOR_HEIGHT
3
+ t as HEADER_HEIGHT
5
4
  };
6
5
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/games/tutorial/constants.ts"],"sourcesContent":["export const HEADER_HEIGHT = 64;\n\nexport const JOURNEY_SEPARATOR_HEIGHT = 129;\n"],"names":["HEADER_HEIGHT","JOURNEY_SEPARATOR_HEIGHT"],"mappings":"AAAO,MAAMA,IAAgB,IAEhBC,IAA2B;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/games/tutorial/constants.ts"],"sourcesContent":["export const HEADER_HEIGHT = 64 + (window.ReactNativeTopInset || 0);\n"],"names":["HEADER_HEIGHT"],"mappings":"AAAa,MAAAA,IAAgB,MAAM,OAAO,uBAAuB;"}
@@ -1,6 +1,6 @@
1
1
  import o from "styled-components";
2
- import { HEADER_HEIGHT as e, JOURNEY_SEPARATOR_HEIGHT as t } from "./constants.js";
3
- const s = o.div`
2
+ import { HEADER_HEIGHT as t } from "./constants.js";
3
+ const n = o.div`
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  height: 100%;
@@ -9,23 +9,23 @@ const s = o.div`
9
9
  position: relative;
10
10
  width: inherit;
11
11
  `, d = o.div`
12
- height: ${e}px;
13
- padding-top: 24px;
12
+ height: ${t}px;
13
+ padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;
14
14
  width: 100%;
15
15
  background: ${({ theme: i }) => i.colors.WHITE_T_03};
16
16
  backdrop-filter: blur(40px);
17
17
  position: relative;
18
18
  flex-shrink: 0;
19
- `, a = o.div`
19
+ `, s = o.div`
20
20
  position: absolute;
21
21
  right: 16px;
22
- top: 22px;
22
+ top: ${(window.ReactNativeTopInset || 0) + 22}px;
23
23
  z-index: 1;
24
24
  &:hover {
25
25
  background: ${({ theme: i }) => i.colors.BLACK_4};
26
26
  cursor: pointer;
27
27
  }
28
- `, l = o.div`
28
+ `, a = o.div`
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  /* overflow: hidden; */
@@ -39,24 +39,20 @@ const s = o.div`
39
39
  bottom: 0;
40
40
  right: 0;
41
41
  & video {
42
- height: ${({ isJourneyActive: i }) => i ? `calc(100% - ${t}px)` : "100%"};
43
- transform: translateY(
44
- ${({ isJourneyActive: i }) => i ? `${t}px` : 0}
45
- );
46
- transition: all 0.2s ease-in-out;
47
42
  width: 100%;
43
+ height: 100%;
48
44
  }
49
- `, h = o.div`
45
+ `, l = o.div`
50
46
  height: 40px;
51
47
  width: 100%;
52
48
  position: relative;
53
49
  display: flex;
54
- `, c = o.div`
50
+ `, h = o.div`
55
51
  height: 2px;
56
52
  position: relative;
57
53
  width: 100%;
58
54
  z-index: 1;
59
- `, x = o.div`
55
+ `, c = o.div`
60
56
  height: inherit;
61
57
  background: ${({ theme: i }) => i.colors.WHITE};
62
58
  position: absolute;
@@ -65,13 +61,13 @@ const s = o.div`
65
61
  transition: width 0.4s linear;
66
62
  `;
67
63
  export {
68
- l as GameTutorialContainer,
64
+ a as GameTutorialContainer,
69
65
  d as GameTutorialHeader,
70
- s as GameTutorialWrapper,
71
- a as HeaderIconContainer,
66
+ n as GameTutorialWrapper,
67
+ s as HeaderIconContainer,
72
68
  p as VideoContainer,
73
- x as VideoProgress,
74
- c as VideoProgressContainer,
75
- h as VideoProgressWrapper
69
+ c as VideoProgress,
70
+ h as VideoProgressContainer,
71
+ l as VideoProgressWrapper
76
72
  };
77
73
  //# sourceMappingURL=tutorial-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tutorial-styled.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { HEADER_HEIGHT, JOURNEY_SEPARATOR_HEIGHT } from './constants';\n\nexport const GameTutorialWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 250px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n width: inherit;\n`;\n\nexport const GameTutorialHeader = styled.div`\n height: ${HEADER_HEIGHT}px;\n padding-top: 24px;\n width: 100%;\n background: ${({ theme }) => theme.colors.WHITE_T_03};\n backdrop-filter: blur(40px);\n position: relative;\n flex-shrink: 0;\n`;\n\nexport const HeaderIconContainer = styled.div`\n position: absolute;\n right: 16px;\n top: 22px;\n z-index: 1;\n &:hover {\n background: ${({ theme }) => theme.colors.BLACK_4};\n cursor: pointer;\n }\n`;\n\nexport const GameTutorialContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* overflow: hidden; */\n flex-grow: 1;\n position: relative;\n`;\n\nexport const VideoContainer = styled.div<{ isJourneyActive?: boolean }>`\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n & video {\n height: ${({ isJourneyActive }) =>\n isJourneyActive ? `calc(100% - ${JOURNEY_SEPARATOR_HEIGHT}px)` : '100%'};\n transform: translateY(\n ${({ isJourneyActive }) => (isJourneyActive ? `${JOURNEY_SEPARATOR_HEIGHT}px` : 0)}\n );\n transition: all 0.2s ease-in-out;\n width: 100%;\n }\n`;\n\nexport const VideoProgressWrapper = styled.div`\n height: 40px;\n width: 100%;\n position: relative;\n display: flex;\n`;\n\nexport const VideoProgressContainer = styled.div`\n height: 2px;\n position: relative;\n width: 100%;\n z-index: 1;\n`;\n\nexport const VideoProgress = styled.div<{ $width: number }>`\n height: inherit;\n background: ${({ theme }) => theme.colors.WHITE};\n position: absolute;\n z-index: 2;\n width: ${({ $width }) => $width || 0}%;\n transition: width 0.4s linear;\n`;\n"],"names":["GameTutorialWrapper","styled","theme","GameTutorialHeader","HEADER_HEIGHT","HeaderIconContainer","GameTutorialContainer","VideoContainer","isJourneyActive","JOURNEY_SEPARATOR_HEIGHT","VideoProgressWrapper","VideoProgressContainer","VideoProgress","$width"],"mappings":";;AAIO,MAAMA,IAAsBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAK1B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKtCC,IAAqBF,EAAO;AAAA,YAC7BG,CAAa;AAAA;AAAA;AAAA,gBAGT,CAAC,EAAE,OAAAF,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,GAMzCG,IAAsBJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMxB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKxCI,IAAwBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ/BM,IAAiBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQvB,CAAC,EAAE,iBAAAO,EAAgB,MAC3BA,IAAkB,eAAeC,CAAwB,QAAQ,MAAM;AAAA;AAAA,QAErE,CAAC,EAAE,iBAAAD,EAAgB,MAAOA,IAAkB,GAAGC,CAAwB,OAAO,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA,GAO3EC,IAAuBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAO9BU,IAAyBV,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOhCW,IAAgBX,EAAO;AAAA;AAAA,gBAEpB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA,WAGtC,CAAC,EAAE,QAAAW,QAAaA,KAAU,CAAC;AAAA;AAAA;"}
1
+ {"version":3,"file":"tutorial-styled.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { HEADER_HEIGHT } from './constants';\n\nexport const GameTutorialWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 250px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n width: inherit;\n`;\n\nexport const GameTutorialHeader = styled.div`\n height: ${HEADER_HEIGHT}px;\n padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;\n width: 100%;\n background: ${({ theme }) => theme.colors.WHITE_T_03};\n backdrop-filter: blur(40px);\n position: relative;\n flex-shrink: 0;\n`;\n\nexport const HeaderIconContainer = styled.div`\n position: absolute;\n right: 16px;\n top: ${(window.ReactNativeTopInset || 0) + 22}px;\n z-index: 1;\n &:hover {\n background: ${({ theme }) => theme.colors.BLACK_4};\n cursor: pointer;\n }\n`;\n\nexport const GameTutorialContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* overflow: hidden; */\n flex-grow: 1;\n position: relative;\n`;\n\nexport const VideoContainer = styled.div`\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n & video {\n width: 100%;\n height: 100%;\n }\n`;\n\nexport const VideoProgressWrapper = styled.div`\n height: 40px;\n width: 100%;\n position: relative;\n display: flex;\n`;\n\nexport const VideoProgressContainer = styled.div`\n height: 2px;\n position: relative;\n width: 100%;\n z-index: 1;\n`;\n\nexport const VideoProgress = styled.div<{ $width: number }>`\n height: inherit;\n background: ${({ theme }) => theme.colors.WHITE};\n position: absolute;\n z-index: 2;\n width: ${({ $width }) => $width || 0}%;\n transition: width 0.4s linear;\n`;\n"],"names":["GameTutorialWrapper","styled","theme","GameTutorialHeader","HEADER_HEIGHT","HeaderIconContainer","GameTutorialContainer","VideoContainer","VideoProgressWrapper","VideoProgressContainer","VideoProgress","$width"],"mappings":";;AAIO,MAAMA,IAAsBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAK1B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKtCC,IAAqBF,EAAO;AAAA,YAC7BG,CAAa;AAAA,kBACP,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA,gBAEvC,CAAC,EAAE,OAAAF,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,GAMzCG,IAAsBJ,EAAO;AAAA;AAAA;AAAA,UAGhC,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA;AAAA,kBAG7B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKxCI,IAAwBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ/BM,IAAiBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAaxBO,IAAuBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAO9BQ,IAAyBR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOhCS,IAAgBT,EAAO;AAAA;AAAA,gBAEpB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA,WAGtC,CAAC,EAAE,QAAAS,QAAaA,KAAU,CAAC;AAAA;AAAA;"}
@@ -1,50 +1,44 @@
1
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as I, useState as C, useRef as u, useCallback as V, useImperativeHandle as v } from "react";
3
- import x from "../../../../assets/line-icons/icons/cross.js";
4
- import H from "../../../ui/text/text.js";
5
- import { GameTutorialWrapper as T, GameTutorialHeader as $, HeaderIconContainer as G, GameTutorialContainer as P, VideoContainer as R, VideoProgressWrapper as W, VideoProgressContainer as b, VideoProgress as j } from "./tutorial-styled.js";
6
- const U = I(
7
- ({
8
- src: m,
9
- title: o,
10
- onCross: t,
11
- showProgress: p = !0,
12
- onTutorialPlayedOnce: e,
13
- isJourneyActive: f
14
- }, l) => {
15
- const [i, h] = C(0), n = u(!1), s = u(null), g = V(
16
- (a) => {
17
- const d = (a.target.currentTime || 0) / (a.target.duration || 1) * 100;
18
- d >= 90 && !n.current && (n.current = !0, e == null || e()), h(d);
19
- },
20
- [e]
21
- );
22
- return v(l, () => ({
23
- videoRef: s
24
- })), /* @__PURE__ */ c(T, { children: [
25
- (o || t) && /* @__PURE__ */ c($, { children: [
26
- o && /* @__PURE__ */ r(H, { $renderAs: "ac3", $color: "WHITE", $align: "center", children: o }),
27
- t && /* @__PURE__ */ r(G, { children: /* @__PURE__ */ r(x, { color: "#fff", onClick: t }) })
28
- ] }),
29
- /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(R, { isJourneyActive: f, children: /* @__PURE__ */ r(
30
- "video",
31
- {
32
- ref: s,
33
- loop: !0,
34
- autoPlay: !0,
35
- muted: !0,
36
- src: m,
37
- onTimeUpdate: g,
38
- disablePictureInPicture: !0,
39
- itemType: "video/mp4",
40
- playsInline: !0
41
- }
42
- ) }) }),
43
- p && /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(b, { children: i > 0 && /* @__PURE__ */ r(j, { $width: i }) }) })
44
- ] });
45
- }
46
- );
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { useState as l, useRef as f, useCallback as h } from "react";
3
+ import g from "../../../../assets/line-icons/icons/cross.js";
4
+ import C from "../../../ui/text/text.js";
5
+ import { GameTutorialWrapper as I, GameTutorialHeader as V, HeaderIconContainer as x, GameTutorialContainer as T, VideoContainer as $, VideoProgressWrapper as G, VideoProgressContainer as H, VideoProgress as P } from "./tutorial-styled.js";
6
+ const E = ({
7
+ src: d,
8
+ title: t,
9
+ onCross: o,
10
+ showProgress: m = !0,
11
+ onTutorialPlayedOnce: e
12
+ }) => {
13
+ const [i, u] = l(0), s = f(!1), p = h(
14
+ (n) => {
15
+ const c = (n.target.currentTime || 0) / (n.target.duration || 1) * 100;
16
+ c >= 90 && !s.current && (s.current = !0, e == null || e()), u(c);
17
+ },
18
+ [e]
19
+ );
20
+ return /* @__PURE__ */ a(I, { children: [
21
+ (t || o) && /* @__PURE__ */ a(V, { children: [
22
+ t && /* @__PURE__ */ r(C, { $renderAs: "ac3", $color: "WHITE", $align: "center", children: t }),
23
+ o && /* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(g, { color: "#fff", onClick: o }) })
24
+ ] }),
25
+ /* @__PURE__ */ r(T, { children: /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
26
+ "video",
27
+ {
28
+ loop: !0,
29
+ autoPlay: !0,
30
+ muted: !0,
31
+ src: d,
32
+ onTimeUpdate: p,
33
+ disablePictureInPicture: !0,
34
+ itemType: "video/mp4",
35
+ playsInline: !0
36
+ }
37
+ ) }) }),
38
+ m && /* @__PURE__ */ r(G, { children: /* @__PURE__ */ r(H, { children: i > 0 && /* @__PURE__ */ r(P, { $width: i }) }) })
39
+ ] });
40
+ };
47
41
  export {
48
- U as Tutorial
42
+ E as Tutorial
49
43
  };
50
44
  //# sourceMappingURL=tutorial.js.map