fansunited-frontend-components 0.0.31-RC4 → 0.0.31-RC5

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 (363) hide show
  1. package/ClassicQuizPlay.js +5 -0
  2. package/CollectLead.js +5 -0
  3. package/EventGamePlay.js +5 -0
  4. package/MatchQuizPlay.js +5 -0
  5. package/PersonalityQuizPlay.js +5 -0
  6. package/PollVote.js +5 -0
  7. package/_virtual/_commonjsHelpers.js +6 -0
  8. package/_virtual/index.js +4 -0
  9. package/_virtual/index2.js +4 -0
  10. package/_virtual/index3.js +4 -0
  11. package/_virtual/jsx-runtime.js +4 -0
  12. package/_virtual/react-is.development.js +4 -0
  13. package/_virtual/react-is.development2.js +4 -0
  14. package/_virtual/react-is.production.min.js +4 -0
  15. package/_virtual/react-is.production.min2.js +4 -0
  16. package/_virtual/react-jsx-runtime.development.js +4 -0
  17. package/_virtual/react-jsx-runtime.production.js +4 -0
  18. package/index.js +14 -0
  19. package/package.json +37 -4
  20. package/packages/classic-quiz-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  21. package/packages/classic-quiz-play/src/assets/default-quiz-bg.png.js +4 -0
  22. package/packages/classic-quiz-play/src/assets/emojis/3dicons-bookmark-fav-dynamic-color.svg.js +4 -0
  23. package/packages/classic-quiz-play/src/assets/emojis/3dicons-crow-dynamic-color.svg.js +4 -0
  24. package/packages/classic-quiz-play/src/assets/emojis/3dicons-fire-dynamic-color.svg.js +4 -0
  25. package/packages/classic-quiz-play/src/assets/emojis/3dicons-flag-dynamic-color.svg.js +4 -0
  26. package/packages/classic-quiz-play/src/assets/emojis/3dicons-medal-dynamic-color.svg.js +4 -0
  27. package/packages/classic-quiz-play/src/assets/emojis/3dicons-rocket-dynamic-color.svg.js +4 -0
  28. package/packages/classic-quiz-play/src/assets/emojis/3dicons-target-dynamic-color.svg.js +4 -0
  29. package/packages/classic-quiz-play/src/assets/emojis/3dicons-thumb-down-dynamic-color.svg.js +4 -0
  30. package/packages/classic-quiz-play/src/assets/emojis/bottle-with-popping-cork.svg.js +4 -0
  31. package/packages/classic-quiz-play/src/assets/emojis/crown.svg.js +4 -0
  32. package/packages/classic-quiz-play/src/assets/emojis/direct-hit.svg.js +4 -0
  33. package/packages/classic-quiz-play/src/assets/emojis/hundred-points.svg.js +4 -0
  34. package/packages/classic-quiz-play/src/assets/emojis/person-facepalming.svg.js +4 -0
  35. package/packages/classic-quiz-play/src/assets/emojis/sports-medal.svg.js +4 -0
  36. package/packages/classic-quiz-play/src/assets/emojis/thumbs-down.svg.js +4 -0
  37. package/packages/classic-quiz-play/src/assets/emojis/trophy.svg.js +4 -0
  38. package/packages/classic-quiz-play/src/assets/emojis/upside-down-face.svg.js +4 -0
  39. package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-danger.svg.js +4 -0
  40. package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-success.svg.js +4 -0
  41. package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-warning.svg.js +4 -0
  42. package/packages/classic-quiz-play/src/assets/info.svg.js +4 -0
  43. package/packages/classic-quiz-play/src/assets/school.svg.js +4 -0
  44. package/packages/classic-quiz-play/src/assets/sports_score.svg.js +4 -0
  45. package/packages/classic-quiz-play/src/components/ClassicQuizNotFound.js +23 -0
  46. package/packages/classic-quiz-play/src/components/ClassicQuizPlay.js +353 -0
  47. package/packages/classic-quiz-play/src/components/Leads/CollectLeadWrapper.js +65 -0
  48. package/packages/classic-quiz-play/src/components/Shared/AlertMessage.js +93 -0
  49. package/packages/classic-quiz-play/src/components/Shared/Answers/Answers.js +80 -0
  50. package/packages/classic-quiz-play/src/components/Shared/Answers/Option.js +130 -0
  51. package/packages/classic-quiz-play/src/components/Shared/Button.js +67 -0
  52. package/packages/classic-quiz-play/src/components/Shared/MainCard.js +34 -0
  53. package/packages/classic-quiz-play/src/components/Shared/PresentedBy.js +122 -0
  54. package/packages/classic-quiz-play/src/components/Shared/ScoreStateWrapper.js +443 -0
  55. package/packages/classic-quiz-play/src/components/Shared/Stepper.js +59 -0
  56. package/packages/classic-quiz-play/src/components/Shared/Stopwatch.js +109 -0
  57. package/packages/classic-quiz-play/src/components/Variants/Overlay/Error/OverlayError.js +45 -0
  58. package/packages/classic-quiz-play/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +35 -0
  59. package/packages/classic-quiz-play/src/components/Variants/Overlay/OverlayVariant.js +170 -0
  60. package/packages/classic-quiz-play/src/components/Variants/Overlay/OverlayVariant.styles.js +190 -0
  61. package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js +177 -0
  62. package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.js +373 -0
  63. package/packages/classic-quiz-play/src/components/Variants/Overlay/SignIn/OverlaySignIn.js +120 -0
  64. package/packages/classic-quiz-play/src/components/Variants/Overlay/SignIn/OverlaySignIn.styles.js +42 -0
  65. package/packages/classic-quiz-play/src/components/Variants/Split/Error/SplitError.js +42 -0
  66. package/packages/classic-quiz-play/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +37 -0
  67. package/packages/classic-quiz-play/src/components/Variants/Split/ScoreState/SplitScoreState.js +231 -0
  68. package/packages/classic-quiz-play/src/components/Variants/Split/ScoreState/SplitScoreState.styles.js +353 -0
  69. package/packages/classic-quiz-play/src/components/Variants/Split/SignIn/SplitSignIn.js +118 -0
  70. package/packages/classic-quiz-play/src/components/Variants/Split/SignIn/SplitSignIn.styles.js +52 -0
  71. package/packages/classic-quiz-play/src/components/Variants/Split/SplitVariant.js +183 -0
  72. package/packages/classic-quiz-play/src/components/Variants/Split/SplitVariant.styles.js +145 -0
  73. package/packages/classic-quiz-play/src/components/Variants/Standard/Error/StandardError.js +43 -0
  74. package/packages/classic-quiz-play/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +35 -0
  75. package/packages/classic-quiz-play/src/components/Variants/Standard/ScoreState/StandardScoreState.js +220 -0
  76. package/packages/classic-quiz-play/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.js +347 -0
  77. package/packages/classic-quiz-play/src/components/Variants/Standard/SignIn/StandardSignIn.js +117 -0
  78. package/packages/classic-quiz-play/src/components/Variants/Standard/SignIn/StandardSignIn.styles.js +52 -0
  79. package/packages/classic-quiz-play/src/components/Variants/Standard/StandardVariant.js +209 -0
  80. package/packages/classic-quiz-play/src/components/Variants/Standard/StandardVariant.styles.js +182 -0
  81. package/packages/classic-quiz-play/src/constants/constants.js +4 -0
  82. package/packages/classic-quiz-play/src/hooks/useClassicQuizById.js +18 -0
  83. package/packages/classic-quiz-play/src/hooks/useEmbedCodeContainer.js +30 -0
  84. package/packages/classic-quiz-play/src/hooks/useMyParticipation.js +40 -0
  85. package/packages/classic-quiz-play/src/hooks/useScoreStateHelpers.js +117 -0
  86. package/packages/classic-quiz-play/src/index.js +4 -0
  87. package/packages/classic-quiz-play/src/main.js +7 -0
  88. package/packages/collect-lead/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  89. package/packages/collect-lead/src/assets/default-quiz-bg.png.js +4 -0
  90. package/packages/collect-lead/src/components/CollectLead.js +18 -0
  91. package/packages/collect-lead/src/components/Leads/CollectLeadWrapper.js +63 -0
  92. package/packages/collect-lead/src/components/Shared/MainCard.js +31 -0
  93. package/packages/collect-lead/src/components/Shared/PresentedBy.js +118 -0
  94. package/packages/collect-lead/src/components/Variants/Overlay/LeadOverlayVariant.js +72 -0
  95. package/packages/collect-lead/src/components/Variants/Overlay/LeadOverlayVariant.styles.js +187 -0
  96. package/packages/collect-lead/src/components/Variants/Split/LeadSplitVariant.js +81 -0
  97. package/packages/collect-lead/src/components/Variants/Split/LeadSplitVariant.styles.js +338 -0
  98. package/packages/collect-lead/src/components/Variants/Standard/LeadStandardVariant.js +82 -0
  99. package/packages/collect-lead/src/components/Variants/Standard/LeadStandardVariant.styles.js +313 -0
  100. package/packages/collect-lead/src/index.js +4 -0
  101. package/packages/collect-lead/src/main.js +39 -0
  102. package/packages/collect-lead/src/providers/ConfigurationProvider.js +50 -0
  103. package/packages/common/src/components/AdditionalCTA.js +24 -0
  104. package/packages/common/src/components/AlertMessage.js +88 -0
  105. package/packages/common/src/components/LeadCollection/OverlayLeadAfterCollection.js +111 -0
  106. package/packages/common/src/components/LeadCollection/SplitLeadAfterCollection.js +103 -0
  107. package/packages/common/src/components/LeadCollection/StandardLeadAfterCollection.js +101 -0
  108. package/packages/common/src/components/Leads/CollectLeadForm.js +72 -0
  109. package/packages/common/src/components/Leads/ConsentsCheckboxes.js +82 -0
  110. package/packages/common/src/components/Leads/LeadAgreementCheckbox.js +104 -0
  111. package/packages/common/src/components/Leads/LeadForm.js +498 -0
  112. package/packages/common/src/components/Portal.js +62 -0
  113. package/packages/common/src/components/Rules.js +299 -0
  114. package/packages/common/src/components/Skeletons/NotFoundSkeleton.js +83 -0
  115. package/packages/common/src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.js +80 -0
  116. package/packages/common/src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.styles.js +190 -0
  117. package/packages/common/src/components/Skeletons/Overlay/OverlaySkeleton.js +68 -0
  118. package/packages/common/src/components/Skeletons/Overlay/OverlaySkeleton.styles.js +100 -0
  119. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.js +65 -0
  120. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.styles.js +90 -0
  121. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.js +34 -0
  122. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.styles.js +55 -0
  123. package/packages/common/src/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.js +58 -0
  124. package/packages/common/src/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.styles.js +105 -0
  125. package/packages/common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.js +98 -0
  126. package/packages/common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.styles.js +167 -0
  127. package/packages/common/src/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.js +64 -0
  128. package/packages/common/src/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.styles.js +107 -0
  129. package/packages/common/src/components/Skeletons/Split/SignIn/SplitSignInSkeleton.js +55 -0
  130. package/packages/common/src/components/Skeletons/Split/SignIn/SplitSignInSkeleton.styles.js +94 -0
  131. package/packages/common/src/components/Skeletons/Split/SplitSkeleton.js +186 -0
  132. package/packages/common/src/components/Skeletons/Split/SplitSkeleton.styles.js +181 -0
  133. package/packages/common/src/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.js +173 -0
  134. package/packages/common/src/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.styles.js +275 -0
  135. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.js +23 -0
  136. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.styles.js +40 -0
  137. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.js +142 -0
  138. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.styles.js +203 -0
  139. package/packages/common/src/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.js +157 -0
  140. package/packages/common/src/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.styles.js +194 -0
  141. package/packages/common/src/components/Skeletons/Standard/StandardSkeleton.js +238 -0
  142. package/packages/common/src/components/Skeletons/Standard/StandardSkeleton.styles.js +211 -0
  143. package/packages/common/src/components/Spinner.js +36 -0
  144. package/packages/common/src/constants/constants.js +457 -0
  145. package/packages/common/src/enums/enums.js +4 -0
  146. package/packages/common/src/functions/helpers.js +58 -0
  147. package/packages/common/src/functions/i18n.js +69 -0
  148. package/packages/common/src/functions/theme.js +301 -0
  149. package/packages/common/src/hooks/useConstantContext.js +10 -0
  150. package/packages/common/src/hooks/useImageUrl.js +8 -0
  151. package/packages/common/src/hooks/useImageVariant.js +11 -0
  152. package/packages/common/src/hooks/useLeadForm.js +129 -0
  153. package/packages/common/src/hooks/useThemeMode.js +30 -0
  154. package/packages/common/src/locales/bg.json.js +363 -0
  155. package/packages/common/src/locales/de.json.js +362 -0
  156. package/packages/common/src/locales/el.json.js +362 -0
  157. package/packages/common/src/locales/en.json.js +368 -0
  158. package/packages/common/src/locales/es.json.js +362 -0
  159. package/packages/common/src/locales/fr-be.json.js +362 -0
  160. package/packages/common/src/locales/fr.json.js +362 -0
  161. package/packages/common/src/locales/it.json.js +362 -0
  162. package/packages/common/src/locales/pl.json.js +362 -0
  163. package/packages/common/src/locales/pt-br.json.js +362 -0
  164. package/packages/common/src/locales/pt.json.js +362 -0
  165. package/packages/common/src/locales/ro.json.js +362 -0
  166. package/packages/common/src/locales/sk.json.js +362 -0
  167. package/packages/common/src/locales/sr.json.js +362 -0
  168. package/packages/common/src/providers/ConstantsProvider.js +29 -0
  169. package/packages/common/src/providers/ContainerProvider.js +35 -0
  170. package/packages/common/src/providers/FontProvider.js +25 -0
  171. package/packages/common/src/providers/ThemeProvider.js +80 -0
  172. package/packages/event-game-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  173. package/packages/event-game-play/src/assets/default-quiz-bg.png.js +4 -0
  174. package/packages/event-game-play/src/assets/school.svg.js +4 -0
  175. package/packages/event-game-play/src/assets/sports_score.svg.js +4 -0
  176. package/packages/event-game-play/src/components/EventGameNotFound.js +23 -0
  177. package/packages/event-game-play/src/components/EventGamePlay.js +318 -0
  178. package/packages/event-game-play/src/components/Shared/AlertMessage.js +93 -0
  179. package/packages/event-game-play/src/components/Shared/Countdown.js +125 -0
  180. package/packages/event-game-play/src/components/Shared/FinishedGameWrapper/FinishedGameWrapper.js +574 -0
  181. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanFixture.js +60 -0
  182. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanFixture.styles.js +29 -0
  183. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanSelector.js +108 -0
  184. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanSelector.styles.js +44 -0
  185. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberFixture.js +70 -0
  186. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberFixture.styles.js +37 -0
  187. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberSelector.js +82 -0
  188. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberSelector.styles.js +64 -0
  189. package/packages/event-game-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.js +70 -0
  190. package/packages/event-game-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.styles.js +98 -0
  191. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextFixture.js +62 -0
  192. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextFixture.styles.js +29 -0
  193. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextSelector.js +344 -0
  194. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextSelector.styles.js +70 -0
  195. package/packages/event-game-play/src/components/Shared/Fixtures/shared.styles.js +63 -0
  196. package/packages/event-game-play/src/components/Shared/Leaderboard/LeaderboardComponent.js +220 -0
  197. package/packages/event-game-play/src/components/Shared/Leaderboard/LeaderboardPagination.js +88 -0
  198. package/packages/event-game-play/src/components/Shared/MainCard.js +34 -0
  199. package/packages/event-game-play/src/components/Shared/Notification.js +67 -0
  200. package/packages/event-game-play/src/components/Shared/Stepper.js +151 -0
  201. package/packages/event-game-play/src/components/Shared/Summary/EditPredictionModal.js +163 -0
  202. package/packages/event-game-play/src/components/Shared/Summary/EditPredictionModal.styles.js +110 -0
  203. package/packages/event-game-play/src/components/Shared/Summary/PredictionSummary.js +118 -0
  204. package/packages/event-game-play/src/components/Shared/Summary/PredictionSummary.styles.js +180 -0
  205. package/packages/event-game-play/src/components/Variants/Overlay/Error/EventGameOverlayError.js +30 -0
  206. package/packages/event-game-play/src/components/Variants/Overlay/EventGameOverlayVariant.js +348 -0
  207. package/packages/event-game-play/src/components/Variants/Overlay/EventGameOverlayVariant.styles.js +213 -0
  208. package/packages/event-game-play/src/components/Variants/Overlay/FinishedGame/EventGameOverlayFinishedGame.js +130 -0
  209. package/packages/event-game-play/src/components/Variants/Overlay/FinishedGame/EventGameOverlayFinishedGame.styles.js +712 -0
  210. package/packages/event-game-play/src/components/Variants/Overlay/ScoreState/EventGameOverlayScoreState.js +141 -0
  211. package/packages/event-game-play/src/components/Variants/Overlay/ScoreState/EventGameOverlayScoreState.styles.js +156 -0
  212. package/packages/event-game-play/src/components/Variants/Split/Error/EventGameSplitError.js +28 -0
  213. package/packages/event-game-play/src/components/Variants/Split/EventGameSplitVariant.js +347 -0
  214. package/packages/event-game-play/src/components/Variants/Split/EventGameSplitVariant.styles.js +149 -0
  215. package/packages/event-game-play/src/components/Variants/Split/FinishedGame/EventGameSplitFinishedGame.js +119 -0
  216. package/packages/event-game-play/src/components/Variants/Split/FinishedGame/EventGameSplitFinishedGame.styles.js +230 -0
  217. package/packages/event-game-play/src/components/Variants/Split/ScoreState/EventGameSplitScoreState.js +139 -0
  218. package/packages/event-game-play/src/components/Variants/Split/ScoreState/EventGameSplitScoreState.styles.js +45 -0
  219. package/packages/event-game-play/src/components/Variants/Standard/Error/EventGameStandardError.js +29 -0
  220. package/packages/event-game-play/src/components/Variants/Standard/EventGameStandardVariant.js +329 -0
  221. package/packages/event-game-play/src/components/Variants/Standard/EventGameStandardVariant.styles.js +373 -0
  222. package/packages/event-game-play/src/components/Variants/Standard/FinishedGame/EventGameStandardFinishedGame.js +219 -0
  223. package/packages/event-game-play/src/components/Variants/Standard/FinishedGame/EventGameStandardFinishedGame.styles.js +548 -0
  224. package/packages/event-game-play/src/components/Variants/Standard/ScoreState/EventGameStandardScoreState.js +117 -0
  225. package/packages/event-game-play/src/components/Variants/Standard/ScoreState/EventGameStandardScoreState.styles.js +259 -0
  226. package/packages/event-game-play/src/helpers/helpers.js +11 -0
  227. package/packages/event-game-play/src/hooks/useEventGameById.js +27 -0
  228. package/packages/event-game-play/src/hooks/useEventGamePrediction.js +54 -0
  229. package/packages/event-game-play/src/hooks/useEventRankings.js +61 -0
  230. package/packages/event-game-play/src/index.js +4 -0
  231. package/packages/event-game-play/src/main.js +7 -0
  232. package/packages/event-game-play/src/providers/ConstantsProvider.js +17 -0
  233. package/packages/match-quiz-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  234. package/packages/match-quiz-play/src/assets/default-quiz-bg.png.js +4 -0
  235. package/packages/match-quiz-play/src/assets/school.svg.js +4 -0
  236. package/packages/match-quiz-play/src/assets/sports_score.svg.js +4 -0
  237. package/packages/match-quiz-play/src/components/Leads/CollectLeadWrapper.js +65 -0
  238. package/packages/match-quiz-play/src/components/MatchQuizNotFound.js +23 -0
  239. package/packages/match-quiz-play/src/components/MatchQuizPlay.js +490 -0
  240. package/packages/match-quiz-play/src/components/Shared/AlertMessage.js +93 -0
  241. package/packages/match-quiz-play/src/components/Shared/Countdown.js +125 -0
  242. package/packages/match-quiz-play/src/components/Shared/FinishedGameWrapper/EarnedPointsDisplay.js +64 -0
  243. package/packages/match-quiz-play/src/components/Shared/FinishedGameWrapper/FinishedGameWrapper.js +854 -0
  244. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoFixture.js +63 -0
  245. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoFixture.styles.js +29 -0
  246. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelector.js +143 -0
  247. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelector.styles.js +101 -0
  248. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelectorSplit.js +97 -0
  249. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelectorSplit.styles.js +77 -0
  250. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersFixture.js +61 -0
  251. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersFixture.styles.js +29 -0
  252. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersSelector.js +63 -0
  253. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersSelector.styles.js +41 -0
  254. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/CorrectScoreFixture.js +72 -0
  255. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/CorrectScoreFixture.styles.js +30 -0
  256. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelector.js +179 -0
  257. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelector.styles.js +163 -0
  258. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelectorSplit.js +103 -0
  259. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelectorSplit.styles.js +86 -0
  260. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersFixture.js +79 -0
  261. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersFixture.styles.js +29 -0
  262. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersSelector.js +213 -0
  263. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersSelector.styles.js +293 -0
  264. package/packages/match-quiz-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.js +116 -0
  265. package/packages/match-quiz-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.styles.js +98 -0
  266. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoFixture.js +72 -0
  267. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoFixture.styles.js +29 -0
  268. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoSelector.js +108 -0
  269. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoSelector.styles.js +44 -0
  270. package/packages/match-quiz-play/src/components/Shared/Fixtures/shared.styles.js +63 -0
  271. package/packages/match-quiz-play/src/components/Shared/Leaderboard/LeaderboardComponent.js +220 -0
  272. package/packages/match-quiz-play/src/components/Shared/Leaderboard/RoundedPagination.js +207 -0
  273. package/packages/match-quiz-play/src/components/Shared/MainCard.js +34 -0
  274. package/packages/match-quiz-play/src/components/Shared/Notification.js +67 -0
  275. package/packages/match-quiz-play/src/components/Shared/PresentedBy.js +118 -0
  276. package/packages/match-quiz-play/src/components/Shared/Stepper.js +151 -0
  277. package/packages/match-quiz-play/src/components/Shared/Summary/EditPredictionModal.js +172 -0
  278. package/packages/match-quiz-play/src/components/Shared/Summary/EditPredictionModal.styles.js +109 -0
  279. package/packages/match-quiz-play/src/components/Shared/Summary/PredictionSummary.js +235 -0
  280. package/packages/match-quiz-play/src/components/Shared/Summary/PredictionSummary.styles.js +219 -0
  281. package/packages/match-quiz-play/src/components/Variants/Overlay/Error/MatchQuizOverlayError.js +45 -0
  282. package/packages/match-quiz-play/src/components/Variants/Overlay/FinishedGame/MatchQuizOverlayFinishedGame.js +157 -0
  283. package/packages/match-quiz-play/src/components/Variants/Overlay/FinishedGame/MatchQuizOverlayFinishedGame.styles.js +710 -0
  284. package/packages/match-quiz-play/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +35 -0
  285. package/packages/match-quiz-play/src/components/Variants/Overlay/MatchQuizOverlayVariant.js +499 -0
  286. package/packages/match-quiz-play/src/components/Variants/Overlay/MatchQuizOverlayVariant.styles.js +213 -0
  287. package/packages/match-quiz-play/src/components/Variants/Overlay/ScoreState/MatchQuizOverlayScoreState.js +178 -0
  288. package/packages/match-quiz-play/src/components/Variants/Overlay/ScoreState/MatchQuizOverlayScoreState.styles.js +128 -0
  289. package/packages/match-quiz-play/src/components/Variants/Overlay/SignIn/MatchQuizOverlaySignIn.js +120 -0
  290. package/packages/match-quiz-play/src/components/Variants/Overlay/SignIn/MatchQuizOverlaySignIn.styles.js +42 -0
  291. package/packages/match-quiz-play/src/components/Variants/Split/Error/MatchQuizSplitError.js +42 -0
  292. package/packages/match-quiz-play/src/components/Variants/Split/FinishedGame/MatchQuizSplitFinishedGame.js +185 -0
  293. package/packages/match-quiz-play/src/components/Variants/Split/FinishedGame/MatchQuizSplitFinishedGame.styles.js +233 -0
  294. package/packages/match-quiz-play/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +37 -0
  295. package/packages/match-quiz-play/src/components/Variants/Split/MatchQuizSplitVariant.js +511 -0
  296. package/packages/match-quiz-play/src/components/Variants/Split/MatchQuizSplitVariant.styles.js +149 -0
  297. package/packages/match-quiz-play/src/components/Variants/Split/ScoreState/MatchQuizSplitScoreState.js +164 -0
  298. package/packages/match-quiz-play/src/components/Variants/Split/ScoreState/MatchQuizSplitScoreState.styles.js +27 -0
  299. package/packages/match-quiz-play/src/components/Variants/Split/SignIn/MatchQuizSplitSignIn.js +118 -0
  300. package/packages/match-quiz-play/src/components/Variants/Split/SignIn/MatchQuizSplitSignIn.styles.js +52 -0
  301. package/packages/match-quiz-play/src/components/Variants/Standard/Error/MatchQuizStandardError.js +43 -0
  302. package/packages/match-quiz-play/src/components/Variants/Standard/FinishedGame/MatchQuizStandardFinishedGame.js +234 -0
  303. package/packages/match-quiz-play/src/components/Variants/Standard/FinishedGame/MatchQuizStandardFinishedGame.styles.js +548 -0
  304. package/packages/match-quiz-play/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +35 -0
  305. package/packages/match-quiz-play/src/components/Variants/Standard/MatchQuizStandardVariant.js +513 -0
  306. package/packages/match-quiz-play/src/components/Variants/Standard/MatchQuizStandardVariant.styles.js +376 -0
  307. package/packages/match-quiz-play/src/components/Variants/Standard/ScoreState/MatchQuizStandardScoreState.js +135 -0
  308. package/packages/match-quiz-play/src/components/Variants/Standard/ScoreState/MatchQuizStandardScoreState.styles.js +259 -0
  309. package/packages/match-quiz-play/src/components/Variants/Standard/SignIn/MatchQuizStandardSignIn.js +129 -0
  310. package/packages/match-quiz-play/src/components/Variants/Standard/SignIn/MatchQuizStandardSignIn.styles.js +239 -0
  311. package/packages/match-quiz-play/src/helpers/helpers.js +9 -0
  312. package/packages/match-quiz-play/src/hooks/useMatchQuiz.js +42 -0
  313. package/packages/match-quiz-play/src/hooks/useMatchQuizLeaderboard.js +53 -0
  314. package/packages/match-quiz-play/src/hooks/useMatchQuizMarketsResults.js +29 -0
  315. package/packages/match-quiz-play/src/hooks/useMatchQuizPrediction.js +38 -0
  316. package/packages/match-quiz-play/src/index.js +4 -0
  317. package/packages/match-quiz-play/src/main.js +7 -0
  318. package/packages/match-quiz-play/src/providers/ConstantsProvider.js +26 -0
  319. package/packages/personality-quiz-play/dist/personality-quiz-play.es.js +39513 -0
  320. package/packages/poll-vote/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  321. package/packages/poll-vote/src/assets/default-quiz-bg.png.js +4 -0
  322. package/packages/poll-vote/src/components/Leads/CollectLeadWrapper.js +65 -0
  323. package/packages/poll-vote/src/components/PollNotFound.js +23 -0
  324. package/packages/poll-vote/src/components/PollVote.js +270 -0
  325. package/packages/poll-vote/src/components/Shared/AlertMessage.js +93 -0
  326. package/packages/poll-vote/src/components/Shared/Answers/PollOption.js +132 -0
  327. package/packages/poll-vote/src/components/Shared/Answers/PollOptions.js +82 -0
  328. package/packages/poll-vote/src/components/Shared/Button.js +76 -0
  329. package/packages/poll-vote/src/components/Shared/MainCard.js +36 -0
  330. package/packages/poll-vote/src/components/Shared/PresentedBy.js +118 -0
  331. package/packages/poll-vote/src/components/Shared/Results/PollOptionResult.js +257 -0
  332. package/packages/poll-vote/src/components/Shared/Results/PollOptionsResults.js +232 -0
  333. package/packages/poll-vote/src/components/Variants/Overlay/Error/PollOverlayError.js +45 -0
  334. package/packages/poll-vote/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +34 -0
  335. package/packages/poll-vote/src/components/Variants/Overlay/PollOverlayVariant.js +137 -0
  336. package/packages/poll-vote/src/components/Variants/Overlay/PollOverlayVariant.styles.js +105 -0
  337. package/packages/poll-vote/src/components/Variants/Overlay/ScoreState/PollOverlayScoreState.js +107 -0
  338. package/packages/poll-vote/src/components/Variants/Overlay/ScoreState/PollOverlayScoreState.styles.js +178 -0
  339. package/packages/poll-vote/src/components/Variants/Overlay/SignIn/PollOverlaySignIn.js +120 -0
  340. package/packages/poll-vote/src/components/Variants/Overlay/SignIn/PollOverlaySignIn.styles.js +42 -0
  341. package/packages/poll-vote/src/components/Variants/Split/Error/PollSplitError.js +42 -0
  342. package/packages/poll-vote/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +36 -0
  343. package/packages/poll-vote/src/components/Variants/Split/PollSplitVariant.js +231 -0
  344. package/packages/poll-vote/src/components/Variants/Split/PollSplitVariant.styles.js +332 -0
  345. package/packages/poll-vote/src/components/Variants/Split/ScoreState/PollSplitScoreState.js +155 -0
  346. package/packages/poll-vote/src/components/Variants/Split/ScoreState/PollSplitScoreState.styles.js +156 -0
  347. package/packages/poll-vote/src/components/Variants/Split/SignIn/PollSplitSignIn.js +117 -0
  348. package/packages/poll-vote/src/components/Variants/Split/SignIn/PollSplitSignIn.styles.js +52 -0
  349. package/packages/poll-vote/src/components/Variants/Standard/Error/PollStandardError.js +43 -0
  350. package/packages/poll-vote/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +34 -0
  351. package/packages/poll-vote/src/components/Variants/Standard/PollStandardVariant.js +138 -0
  352. package/packages/poll-vote/src/components/Variants/Standard/PollStandardVariant.styles.js +92 -0
  353. package/packages/poll-vote/src/components/Variants/Standard/ScoreState/PollStandardScoreState.js +146 -0
  354. package/packages/poll-vote/src/components/Variants/Standard/ScoreState/PollStandardScoreState.styles.js +164 -0
  355. package/packages/poll-vote/src/components/Variants/Standard/SignIn/PollStandardSignIn.js +129 -0
  356. package/packages/poll-vote/src/components/Variants/Standard/SignIn/PollStandardSignIn.styles.js +248 -0
  357. package/packages/poll-vote/src/hooks/useEmbedCodeContainer.js +30 -0
  358. package/packages/poll-vote/src/hooks/useMyPollVote.js +43 -0
  359. package/packages/poll-vote/src/hooks/usePollById.js +16 -0
  360. package/packages/poll-vote/src/hooks/usePollOptionsImages.js +19 -0
  361. package/packages/poll-vote/src/index.js +4 -0
  362. package/packages/poll-vote/src/main.js +7 -0
  363. package/components.js +0 -86783
@@ -0,0 +1,141 @@
1
+ import { j as t } from "../../../../../../../node_modules/react/jsx-runtime.js";
2
+ import { Box as a } from "@mui/joy";
3
+ import { useInternalTheme as k, useSpacingScale as R, isMobile as B, useImageBackgroundGradient as E } from "../../../../../../common/src/functions/theme.js";
4
+ import { sanitizeBackgroundUrl as G } from "../../../../../../common/src/functions/helpers.js";
5
+ import "../../../../../../../node_modules/i18next/dist/esm/i18next.js";
6
+ import "../../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
7
+ import { WidgetTemplate as y } from "../../../../../../common/src/enums/enums.js";
8
+ import f from "../../../../../../common/src/components/AdditionalCTA.js";
9
+ import "react";
10
+ import "../../../../../../common/src/providers/ConstantsProvider.js";
11
+ import F from "../../../../../../common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.js";
12
+ import { useImageVariant as O } from "../../../../../../common/src/hooks/useImageVariant.js";
13
+ import "../../../../../../common/src/providers/ContainerProvider.js";
14
+ import U from "../../../../assets/default-quiz-bg.png.js";
15
+ import V from "../../../../assets/default-quiz-bg-vertical.jpg.js";
16
+ import { createStyles as M } from "./EventGameOverlayScoreState.styles.js";
17
+ import W from "../../../Shared/AlertMessage.js";
18
+ import w from "../../../Shared/Summary/PredictionSummary.js";
19
+ import { useTranslation as z } from "../../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
20
+ const ie = (e) => {
21
+ const n = k(), o = R(), { t: i } = z(), r = B(), g = E(
22
+ y.OVERLAY
23
+ ), h = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : r ? V : U, S = O(
24
+ {
25
+ images: e.eventGame.images,
26
+ imagePlaceholder: h
27
+ },
28
+ y.OVERLAY
29
+ ), p = G(S), C = n.colorSchemes.dark.textSecondary, s = n.colorSchemes.dark.secondaryContainer, j = n.colorSchemes.dark.textPrimary, c = n.customFontFamily.light.primary, P = n.customRadius.light.md, m = n.customRadius.light.xl, b = n.colorSchemes.dark.surfaceVariant, v = e.eventGame.status === "OPEN" && e.prediction && e.onPredictionUpdate, T = (I) => {
30
+ console.log(`Edit prediction for fixture at index: ${I}`);
31
+ }, l = M({
32
+ spacingScale: o,
33
+ textPrimary: j,
34
+ fontFamilyPrimary: c,
35
+ mdBorderRadius: P,
36
+ xlBorderRadius: m,
37
+ contentBgColor: b,
38
+ onSurfaceColor: n.colorSchemes.dark.onSurface,
39
+ surfaceVariantColor: n.colorSchemes.dark.surfaceVariant
40
+ }), d = {
41
+ display: "flex",
42
+ py: r ? o.xs : o.sm,
43
+ px: r ? o.sm : o.md,
44
+ flexDirection: "row",
45
+ justifyContent: "center",
46
+ alignItems: "center",
47
+ gap: "8px",
48
+ borderRadius: m,
49
+ bgcolor: s,
50
+ "&:hover": {
51
+ bgcolor: s,
52
+ opacity: 0.9
53
+ },
54
+ fontSize: r ? "0.750em" : "0.8125em",
55
+ fontWeight: 500,
56
+ textTransform: "uppercase"
57
+ }, u = {
58
+ display: "flex",
59
+ justifyContent: "center",
60
+ alignItems: "center",
61
+ gap: "8px"
62
+ }, x = {
63
+ color: C,
64
+ fontFamily: c,
65
+ fontStyle: "normal",
66
+ lineHeight: "24px",
67
+ letterSpacing: "0.40px",
68
+ textTransform: "uppercase"
69
+ }, A = () => /* @__PURE__ */ t.jsxs(a, { sx: l.mainContentWrapper, children: [
70
+ e.isUnauthorized ? /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
71
+ W,
72
+ {
73
+ variant: "error",
74
+ title: i("common.authentication.accessRequired"),
75
+ message: i("common.authentication.invalidOrMissingAuth")
76
+ }
77
+ ) }) : /* @__PURE__ */ t.jsx(a, { sx: l.resultsContainer, children: /* @__PURE__ */ t.jsx(a, { sx: l.resultsWrapper, children: v ? /* @__PURE__ */ t.jsx(
78
+ w,
79
+ {
80
+ fixtures: e.eventGame.fixtures,
81
+ prediction: e.prediction,
82
+ onEditPrediction: T,
83
+ onPredictionUpdate: e.onPredictionUpdate,
84
+ play: e.play,
85
+ view: "score",
86
+ isOverlayVariant: !0,
87
+ onPlayResult: e.onPlayResult
88
+ }
89
+ ) : null }) }),
90
+ r ? /* @__PURE__ */ t.jsx(t.Fragment, { children: e.additionalCTA && /* @__PURE__ */ t.jsx(
91
+ a,
92
+ {
93
+ sx: {
94
+ display: "flex",
95
+ justifyContent: "center",
96
+ alignItems: "center"
97
+ },
98
+ children: /* @__PURE__ */ t.jsx(
99
+ f,
100
+ {
101
+ additionalCTA: e.additionalCTA,
102
+ buttonStyle: d,
103
+ buttonContentStyle: u,
104
+ textStyle: x
105
+ }
106
+ )
107
+ }
108
+ ) }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: e.additionalCTA && /* @__PURE__ */ t.jsx(
109
+ a,
110
+ {
111
+ sx: {
112
+ display: "flex",
113
+ justifyContent: "flex-end"
114
+ },
115
+ children: /* @__PURE__ */ t.jsx(
116
+ f,
117
+ {
118
+ additionalCTA: e.additionalCTA,
119
+ buttonStyle: d,
120
+ buttonContentStyle: u,
121
+ textStyle: x
122
+ }
123
+ )
124
+ }
125
+ ) })
126
+ ] });
127
+ return /* @__PURE__ */ t.jsx(
128
+ F,
129
+ {
130
+ entity: { ...e.eventGame, labels: null },
131
+ headline: i("eventGame.headline"),
132
+ backgroundImage: p,
133
+ imageBackgroundGradient: g,
134
+ rulesDisplay: e.rulesDisplay,
135
+ children: A()
136
+ }
137
+ );
138
+ };
139
+ export {
140
+ ie as default
141
+ };
@@ -0,0 +1,156 @@
1
+ const t = (e) => ({
2
+ // Main content wrapper
3
+ mainContentWrapper: {
4
+ display: "flex",
5
+ flexDirection: "column",
6
+ gap: "24px",
7
+ zIndex: 10
8
+ },
9
+ resultsContainer: {
10
+ borderRadius: e.mdBorderRadius,
11
+ p: e.spacingScale.md,
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ alignItems: "center",
15
+ alignSelf: "stretch",
16
+ gap: e.spacingScale.md,
17
+ backdropFilter: "blur(4px)",
18
+ position: "relative",
19
+ "&::before": {
20
+ content: '""',
21
+ position: "absolute",
22
+ top: 0,
23
+ left: 0,
24
+ right: 0,
25
+ bottom: 0,
26
+ backgroundColor: e.contentBgColor,
27
+ opacity: 0.25,
28
+ borderRadius: "inherit",
29
+ zIndex: 0,
30
+ backdropFilter: "blur(4px)"
31
+ },
32
+ "& > *": {
33
+ position: "relative",
34
+ zIndex: 1
35
+ }
36
+ },
37
+ resultsWrapper: {
38
+ display: "flex",
39
+ flexDirection: "column",
40
+ justifyContent: "center",
41
+ alignItems: "center",
42
+ alignSelf: "stretch"
43
+ },
44
+ ctaSection: {
45
+ borderRadius: e.mdBorderRadius,
46
+ py: e.spacingScale.md,
47
+ display: "flex",
48
+ flexDirection: "column",
49
+ alignItems: "center",
50
+ alignSelf: "stretch",
51
+ gap: e.spacingScale.md,
52
+ backdropFilter: "blur(4px)",
53
+ position: "relative",
54
+ "&::before": {
55
+ content: '""',
56
+ position: "absolute",
57
+ top: 0,
58
+ left: 0,
59
+ right: 0,
60
+ bottom: 0,
61
+ backgroundColor: e.contentBgColor,
62
+ opacity: 0.25,
63
+ borderRadius: "inherit",
64
+ zIndex: 0,
65
+ backdropFilter: "blur(4px)"
66
+ },
67
+ "& > *": {
68
+ position: "relative",
69
+ zIndex: 1
70
+ }
71
+ },
72
+ // Buttons container
73
+ buttonsContainer: {
74
+ display: "flex",
75
+ flexDirection: "column",
76
+ gap: e.spacingScale.md
77
+ },
78
+ // Play again button
79
+ playAgainButton: {
80
+ display: "flex",
81
+ minHeight: "48px",
82
+ py: "12px",
83
+ pr: "24px",
84
+ pl: "16px",
85
+ flexDirection: "column",
86
+ justifyContent: "center",
87
+ alignItems: "center",
88
+ gap: "8px",
89
+ borderRadius: e.xlBorderRadius,
90
+ bgcolor: e.onSurfaceColor,
91
+ "&:hover": {
92
+ bgcolor: e.surfaceVariantColor
93
+ },
94
+ fontSize: "0.9375em"
95
+ },
96
+ // Play again button content
97
+ playAgainButtonContent: {
98
+ display: "flex",
99
+ justifyContent: "center",
100
+ alignItems: "center",
101
+ gap: "8px",
102
+ alignSelf: "stretch"
103
+ },
104
+ // Play again icon
105
+ playAgainIcon: {
106
+ display: "flex",
107
+ width: "24px",
108
+ height: "24px",
109
+ justifyContent: "center",
110
+ alignItems: "center",
111
+ color: e.textPrimary
112
+ },
113
+ // Play again text
114
+ playAgainText: {
115
+ color: e.textPrimary,
116
+ textAlign: "center",
117
+ fontFamily: e.fontFamilyPrimary,
118
+ fontSize: "0.9375em",
119
+ fontStyle: "normal",
120
+ fontWeight: 500,
121
+ lineHeight: "24px",
122
+ letterSpacing: "0.46px",
123
+ textTransform: "uppercase"
124
+ },
125
+ // Lead collection container
126
+ leadCollectionContainer: {
127
+ borderRadius: e.mdBorderRadius,
128
+ p: e.spacingScale.md,
129
+ display: "flex",
130
+ flexDirection: "column",
131
+ alignSelf: "stretch",
132
+ gap: e.spacingScale.md,
133
+ backdropFilter: "blur(4px)",
134
+ position: "relative",
135
+ "&::before": {
136
+ content: '""',
137
+ position: "absolute",
138
+ top: 0,
139
+ left: 0,
140
+ right: 0,
141
+ bottom: 0,
142
+ backgroundColor: e.contentBgColor,
143
+ opacity: 0.25,
144
+ borderRadius: "inherit",
145
+ zIndex: 0,
146
+ backdropFilter: "blur(4px)"
147
+ },
148
+ "& > *": {
149
+ position: "relative",
150
+ zIndex: 1
151
+ }
152
+ }
153
+ });
154
+ export {
155
+ t as createStyles
156
+ };
@@ -0,0 +1,28 @@
1
+ import { j as e } from "../../../../../../../node_modules/react/jsx-runtime.js";
2
+ import "react";
3
+ import "../../../../../../common/src/providers/ContainerProvider.js";
4
+ import "../../../../../../../node_modules/i18next/dist/esm/i18next.js";
5
+ import "../../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
6
+ import "@mui/joy";
7
+ import "../../../../../../common/src/providers/ConstantsProvider.js";
8
+ import o from "../../../../../../common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.js";
9
+ import i from "../../../Shared/MainCard.js";
10
+ import { useTranslation as n } from "../../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
11
+ const y = (r) => {
12
+ const { t } = n();
13
+ return /* @__PURE__ */ e.jsx(i, { brandingBorderColor: null, children: /* @__PURE__ */ e.jsx(
14
+ o,
15
+ {
16
+ entity: { ...r.eventGame, labels: null },
17
+ headline: t("eventGame.headline"),
18
+ tryAgainButtonText: t("eventGame.buttons.tryAgain"),
19
+ defaultImagePlaceholderUrl: r.defaultImagePlaceholderUrl,
20
+ isApiError: r.isApiError,
21
+ toggleTryAgain: r.toggleTryAgain,
22
+ renderPresentedBy: (a) => /* @__PURE__ */ e.jsx(e.Fragment, {})
23
+ }
24
+ ) });
25
+ };
26
+ export {
27
+ y as default
28
+ };
@@ -0,0 +1,347 @@
1
+ import { j as e } from "../../../../../../node_modules/react/jsx-runtime.js";
2
+ import re, { useCallback as oe, useMemo as U } from "react";
3
+ import { Box as o, Typography as u, Button as k } from "@mui/joy";
4
+ import { isMobile as se, useColors as v, useFontFamily as ae, useCornerRadius as w, useSpacingScale as ce } from "../../../../../common/src/functions/theme.js";
5
+ import { hexToRgb as le } from "../../../../../common/src/functions/helpers.js";
6
+ import "../../../../../../node_modules/i18next/dist/esm/i18next.js";
7
+ import "../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
8
+ import { WidgetTemplate as de } from "../../../../../common/src/enums/enums.js";
9
+ import "../../../../../common/src/providers/ConstantsProvider.js";
10
+ import me from "../../../../../common/src/components/Skeletons/Split/SplitSkeleton.js";
11
+ import { useImageVariant as ue } from "../../../../../common/src/hooks/useImageVariant.js";
12
+ import "../../../../../common/src/providers/ContainerProvider.js";
13
+ import xe from "../../Shared/MainCard.js";
14
+ import fe from "../../../assets/default-quiz-bg.png.js";
15
+ import pe from "../../../assets/default-quiz-bg-vertical.jpg.js";
16
+ import { createStyles as ge } from "./EventGameSplitVariant.styles.js";
17
+ import { EventGameOutcomeTypeEnum as f } from "fansunited-sdk-esm";
18
+ import he from "../../Shared/Fixtures/Number/NumberFixture.js";
19
+ import Ce from "../../Shared/Fixtures/Boolean/BooleanFixture.js";
20
+ import L from "../../Shared/Fixtures/Text/TextFixture.js";
21
+ import ve from "../../Shared/Stepper.js";
22
+ import ye from "../../Shared/Countdown.js";
23
+ import Se from "../../Shared/Summary/PredictionSummary.js";
24
+ import { isPredictionsCutoffPassed as je, clampNumberPrediction as be } from "../../../helpers/helpers.js";
25
+ import { useTranslation as Ge } from "../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
26
+ const Qe = (n) => {
27
+ const [r, E] = re.useState(1), { t: c } = Ge(), O = se(), M = n.defaultImagePlaceholderUrl ? n.defaultImagePlaceholderUrl : O ? pe : fe, D = ue(
28
+ {
29
+ images: n.eventGame.images,
30
+ imagePlaceholder: M
31
+ },
32
+ de.SPLIT
33
+ ), $ = v().palette.danger.plainColor, z = v().textColor, A = v().textColor, T = ae().primary, _ = v().surfaceVariant, W = w(), p = v().palette.primary.plainColor, g = v().palette.primary.onPrimary, N = w().xl, q = ce(), i = ge({
34
+ spacingScale: q,
35
+ borderRadius: W,
36
+ fontFamilyPrimary: T,
37
+ bgcolor: le(_ || ""),
38
+ textColor: z,
39
+ secondaryColor: A,
40
+ isMobile: O,
41
+ dangerColor: $
42
+ }), I = oe(
43
+ (t, s) => {
44
+ n.setPrediction((d) => {
45
+ const m = { ...d }, l = m.fixtures.find(
46
+ (x) => x.id === t
47
+ );
48
+ return l && (l.prediction = s), m;
49
+ });
50
+ },
51
+ [n.setPrediction]
52
+ ), h = n.eventGame.fixtures.length + 1, y = n.eventGame.status === "OPEN" && je(n.eventGame.predictionsCutoff || ""), H = () => {
53
+ var s, d;
54
+ const t = n.eventGame.fixtures[r - 1];
55
+ if (t && t.outcomeType === f.NUMBER) {
56
+ const m = t.validOutcomes, l = (d = (s = n.prediction) == null ? void 0 : s.fixtures) == null ? void 0 : d.find(
57
+ (x) => x.id === t.id
58
+ );
59
+ if (l && typeof l.prediction == "number") {
60
+ const x = be(
61
+ l.prediction,
62
+ m
63
+ );
64
+ x !== l.prediction && I(t.id, x);
65
+ }
66
+ }
67
+ r < h ? E(r + 1) : n.play();
68
+ }, J = (t) => {
69
+ E(t + 1);
70
+ }, F = () => {
71
+ var d, m;
72
+ if (r === h) return !0;
73
+ const t = n.eventGame.fixtures[r - 1];
74
+ if (!t) return !1;
75
+ const s = (m = (d = n.prediction) == null ? void 0 : d.fixtures) == null ? void 0 : m.find(
76
+ (l) => l.id === t.id
77
+ );
78
+ if (!s) return !1;
79
+ switch (t.outcomeType) {
80
+ case f.BOOLEAN:
81
+ return typeof s.prediction == "boolean";
82
+ case f.NUMBER:
83
+ return typeof s.prediction == "number";
84
+ case f.FREE_INPUT:
85
+ return typeof s.prediction == "string" && s.prediction.trim().length > 0;
86
+ case f.ENUM:
87
+ return typeof s.prediction == "string" && s.prediction.trim().length > 0;
88
+ default:
89
+ return !1;
90
+ }
91
+ }, K = () => {
92
+ r > 1 && E(r - 1);
93
+ }, Q = () => /* @__PURE__ */ e.jsx(o, { sx: i.questionAreaContent, children: /* @__PURE__ */ e.jsx(o, { sx: i.mainContentContainer, children: /* @__PURE__ */ e.jsxs(o, { sx: i.gameStateContainer, children: [
94
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateTitle, children: c("eventGame.states.pending.title") }),
95
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateDescription, children: c("eventGame.states.pending.description") })
96
+ ] }) }) }), X = () => /* @__PURE__ */ e.jsx(o, { sx: i.questionAreaContent, children: /* @__PURE__ */ e.jsx(o, { sx: i.mainContentContainer, children: /* @__PURE__ */ e.jsxs(o, { sx: i.gameStateContainer, children: [
97
+ /* @__PURE__ */ e.jsxs(o, { sx: i.liveIndicatorContainer, children: [
98
+ /* @__PURE__ */ e.jsx(o, { sx: i.liveIndicator }),
99
+ /* @__PURE__ */ e.jsx(u, { sx: i.liveText, children: c("eventGame.states.live.indicator") })
100
+ ] }),
101
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateDescription, children: c("eventGame.states.live.description") })
102
+ ] }) }) }), Y = () => /* @__PURE__ */ e.jsx(o, { sx: i.questionAreaContent, children: /* @__PURE__ */ e.jsx(o, { sx: i.mainContentContainer, children: /* @__PURE__ */ e.jsxs(o, { sx: i.gameStateContainer, children: [
103
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateTitle, children: c("eventGame.states.closed.title") }),
104
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateDescription, children: c("eventGame.states.closed.description") })
105
+ ] }) }) }), Z = () => /* @__PURE__ */ e.jsxs(o, { sx: i.gameStateContainer, children: [
106
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateTitle, children: c("eventGame.states.open.title") }),
107
+ /* @__PURE__ */ e.jsx(u, { sx: i.stateDescription, children: c("eventGame.states.open.description") })
108
+ ] }), C = U(() => n.eventGame.fixtures[r - 1], [n.eventGame.fixtures, r]), S = U(() => C ? {
109
+ onSelectionChange: (t) => I(C.id, t)
110
+ } : {}, [C == null ? void 0 : C.id, I]), ee = () => {
111
+ var s, d, m, l, x, B, R, V;
112
+ const t = C;
113
+ if (y)
114
+ return Z();
115
+ if (t)
116
+ switch (t.outcomeType) {
117
+ case f.NUMBER:
118
+ const j = (d = (s = n.prediction) == null ? void 0 : s.fixtures) == null ? void 0 : d.find(
119
+ (a) => a.id === t.id
120
+ ), ie = t.validOutcomes;
121
+ return /* @__PURE__ */ e.jsx(
122
+ he,
123
+ {
124
+ prediction: typeof (j == null ? void 0 : j.prediction) == "number" ? j.prediction : 0,
125
+ isSplitVariant: !0,
126
+ onChange: (a) => S.onSelectionChange(a),
127
+ question: t.question,
128
+ validOutcomes: ie || null,
129
+ fixtureId: t.id
130
+ },
131
+ `${t.id}-${r}`
132
+ );
133
+ case f.BOOLEAN:
134
+ const b = (l = (m = n.prediction) == null ? void 0 : m.fixtures) == null ? void 0 : l.find(
135
+ (a) => a.id === t.id
136
+ );
137
+ return /* @__PURE__ */ e.jsx(
138
+ Ce,
139
+ {
140
+ prediction: typeof (b == null ? void 0 : b.prediction) == "boolean" ? b.prediction : null,
141
+ isSplitVariant: !0,
142
+ onSelectionChange: S.onSelectionChange,
143
+ question: t.question,
144
+ fixtureId: t.id
145
+ },
146
+ t.id
147
+ );
148
+ case f.FREE_INPUT:
149
+ const G = (B = (x = n.prediction) == null ? void 0 : x.fixtures) == null ? void 0 : B.find(
150
+ (a) => a.id === t.id
151
+ );
152
+ return /* @__PURE__ */ e.jsx(
153
+ L,
154
+ {
155
+ question: t.question,
156
+ prediction: typeof (G == null ? void 0 : G.prediction) == "string" ? G.prediction : null,
157
+ validOutcomes: null,
158
+ onTextChange: (a) => S.onSelectionChange(a),
159
+ isSplitVariant: !0,
160
+ fixtureId: t.id
161
+ },
162
+ `${t.id}-${r}`
163
+ );
164
+ case f.ENUM:
165
+ const P = (V = (R = n.prediction) == null ? void 0 : R.fixtures) == null ? void 0 : V.find(
166
+ (a) => a.id === t.id
167
+ );
168
+ return /* @__PURE__ */ e.jsx(
169
+ L,
170
+ {
171
+ question: t.question,
172
+ prediction: typeof (P == null ? void 0 : P.prediction) == "string" ? P.prediction : null,
173
+ validOutcomes: t.validOutcomes,
174
+ onTextChange: (a) => S.onSelectionChange(a),
175
+ isSplitVariant: !0,
176
+ fixtureId: t.id,
177
+ optionsLayout: n.optionsLayout
178
+ },
179
+ `${t.id}-${r}`
180
+ );
181
+ }
182
+ }, te = () => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
183
+ n.showCountdown && !y && n.eventGame.status === "OPEN" && /* @__PURE__ */ e.jsx(
184
+ o,
185
+ {
186
+ sx: {
187
+ my: q.lg
188
+ },
189
+ children: /* @__PURE__ */ e.jsx(
190
+ ye,
191
+ {
192
+ predictionsCutoffTime: n.eventGame.predictionsCutoff || "",
193
+ isSplitVariant: !0
194
+ }
195
+ )
196
+ }
197
+ ),
198
+ !y && /* @__PURE__ */ e.jsx(o, { sx: i.paginationContainer, children: /* @__PURE__ */ e.jsx(
199
+ ve,
200
+ {
201
+ eventGame: n.eventGame,
202
+ currentStep: r,
203
+ totalSteps: h,
204
+ isSplitVariant: !0
205
+ }
206
+ ) }),
207
+ /* @__PURE__ */ e.jsx(o, { sx: i.questionAreaContent, children: /* @__PURE__ */ e.jsxs(o, { sx: i.mainContentContainer, children: [
208
+ r === h ? /* @__PURE__ */ e.jsx(
209
+ Se,
210
+ {
211
+ fixtures: n.eventGame.fixtures,
212
+ prediction: n.prediction,
213
+ onEditPrediction: J,
214
+ onPredictionUpdate: n.setPrediction,
215
+ view: "play",
216
+ play: async () => n.play(),
217
+ isSplitVariant: !0
218
+ }
219
+ ) : ee(),
220
+ /* @__PURE__ */ e.jsxs(o, { sx: i.navigationContainer, children: [
221
+ r > 1 && r < h && /* @__PURE__ */ e.jsx(
222
+ k,
223
+ {
224
+ variant: "outlined",
225
+ onClick: K,
226
+ sx: {
227
+ borderRadius: N,
228
+ py: "10px",
229
+ px: "16px",
230
+ borderColor: p,
231
+ color: g,
232
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
233
+ transform: "scale(1)",
234
+ alignSelf: "center",
235
+ "&:hover": {
236
+ borderColor: p,
237
+ backgroundColor: `${p}10`,
238
+ transform: "scale(1.02)"
239
+ },
240
+ "&:active": {
241
+ transform: "scale(0.98)"
242
+ },
243
+ fontSize: "0.9375em"
244
+ },
245
+ children: /* @__PURE__ */ e.jsx(
246
+ u,
247
+ {
248
+ sx: {
249
+ fontFamily: T,
250
+ fontWeight: 500,
251
+ fontSize: "0.9375em",
252
+ lineHeight: "24px",
253
+ letterSpacing: "0.46px",
254
+ textTransform: "uppercase",
255
+ gap: "8px",
256
+ display: "flex",
257
+ alignItems: "center"
258
+ },
259
+ children: c("eventGame.buttons.back")
260
+ }
261
+ )
262
+ }
263
+ ),
264
+ !y && /* @__PURE__ */ e.jsx(
265
+ k,
266
+ {
267
+ variant: "soft",
268
+ onClick: F() ? H : () => {
269
+ },
270
+ loading: n.isPlaying,
271
+ sx: {
272
+ cursor: F() ? "pointer" : "not-allowed",
273
+ opacity: F() ? "1" : "0.5",
274
+ borderRadius: N,
275
+ py: "10px",
276
+ px: "16px",
277
+ bgcolor: p,
278
+ color: g,
279
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
280
+ transform: "scale(1)",
281
+ alignSelf: "center",
282
+ "&:hover": {
283
+ bgcolor: p,
284
+ transform: "scale(1.02)"
285
+ },
286
+ "&:active": {
287
+ color: g,
288
+ transform: "scale(0.98)"
289
+ },
290
+ "&:disabled": {
291
+ bgcolor: p,
292
+ color: g,
293
+ opacity: "12%"
294
+ },
295
+ "--Icon-color": g,
296
+ fontSize: "0.9375em"
297
+ },
298
+ children: /* @__PURE__ */ e.jsx(
299
+ u,
300
+ {
301
+ sx: {
302
+ fontFamily: T,
303
+ fontWeight: 500,
304
+ fontSize: "0.9375em",
305
+ lineHeight: "24px",
306
+ letterSpacing: "0.46px",
307
+ textTransform: "uppercase",
308
+ color: g,
309
+ gap: "8px",
310
+ display: "flex",
311
+ alignItems: "center"
312
+ },
313
+ children: c(r === h ? "eventGame.buttons.play" : "eventGame.buttons.next")
314
+ }
315
+ )
316
+ }
317
+ )
318
+ ] })
319
+ ] }) })
320
+ ] }), ne = () => {
321
+ switch (n.eventGame.status) {
322
+ case "PENDING":
323
+ return Q();
324
+ case "LIVE":
325
+ return X();
326
+ case "CLOSED":
327
+ return Y();
328
+ default:
329
+ return te();
330
+ }
331
+ };
332
+ return /* @__PURE__ */ e.jsx(xe, { brandingBorderColor: null, children: /* @__PURE__ */ e.jsx(
333
+ me,
334
+ {
335
+ entity: { ...n.eventGame, labels: null },
336
+ headline: c("eventGame.headline"),
337
+ finalImage: D,
338
+ brandingLogo: "",
339
+ renderPresentedBy: (t) => /* @__PURE__ */ e.jsx(e.Fragment, {}),
340
+ rulesDisplay: n.rulesDisplay,
341
+ children: ne()
342
+ }
343
+ ) });
344
+ };
345
+ export {
346
+ Qe as default
347
+ };