be-components 0.7.3 → 0.7.4

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 (426) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +18 -0
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/Authenticator/index.js.map +1 -1
  4. package/lib/commonjs/Checkout/api/index.js.map +1 -1
  5. package/lib/commonjs/Checkout/index.js.map +1 -1
  6. package/lib/commonjs/Competition/api/index.js +655 -0
  7. package/lib/commonjs/Competition/api/index.js.map +1 -0
  8. package/lib/commonjs/Competition/components/AthleteMarketCard.js +168 -0
  9. package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -0
  10. package/lib/commonjs/Competition/components/CompetitionCard.js +180 -0
  11. package/lib/commonjs/Competition/components/CompetitionCard.js.map +1 -0
  12. package/lib/commonjs/Competition/components/CompetitionInfoCard.js +264 -0
  13. package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -0
  14. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +281 -0
  15. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -0
  16. package/lib/commonjs/Competition/components/CompetitionPlay.js +1269 -0
  17. package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -0
  18. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +111 -0
  19. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -0
  20. package/lib/commonjs/Competition/components/CompetitionSelector.js +122 -0
  21. package/lib/commonjs/Competition/components/CompetitionSelector.js.map +1 -0
  22. package/lib/commonjs/Competition/components/CompetitionTypeCard.js +380 -0
  23. package/lib/commonjs/Competition/components/CompetitionTypeCard.js.map +1 -0
  24. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +237 -0
  25. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  26. package/lib/commonjs/Competition/components/LeaderPicks.js +322 -0
  27. package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -0
  28. package/lib/commonjs/Competition/components/ManageSeasonForm.js +605 -0
  29. package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +1 -0
  30. package/lib/commonjs/Competition/components/MarketsCard.js +148 -0
  31. package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -0
  32. package/lib/commonjs/Competition/components/MatchMarketCard.js +199 -0
  33. package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -0
  34. package/lib/commonjs/Competition/components/NavOutPrompt.js +159 -0
  35. package/lib/commonjs/Competition/components/NavOutPrompt.js.map +1 -0
  36. package/lib/commonjs/Competition/components/SeasonInfoModal.js +400 -0
  37. package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +1 -0
  38. package/lib/commonjs/Competition/components/TeamEventCard.js +217 -0
  39. package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -0
  40. package/lib/commonjs/Competition/components/WagerPickForm.js +278 -0
  41. package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -0
  42. package/lib/commonjs/Competition/index.js +42 -0
  43. package/lib/commonjs/Competition/index.js.map +1 -0
  44. package/lib/commonjs/Components/Icons.js.map +1 -1
  45. package/lib/commonjs/Components/Jerseys.js +713 -0
  46. package/lib/commonjs/Components/Jerseys.js.map +1 -0
  47. package/lib/commonjs/Components/LinearDiagnal.js +1 -1
  48. package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
  49. package/lib/commonjs/Components/Switch.js +81 -0
  50. package/lib/commonjs/Components/Switch.js.map +1 -0
  51. package/lib/commonjs/Components/index.js +14 -0
  52. package/lib/commonjs/Components/index.js.map +1 -1
  53. package/lib/commonjs/Poll/api/index.js +240 -0
  54. package/lib/commonjs/Poll/api/index.js.map +1 -0
  55. package/lib/commonjs/Poll/components/CampaignPlay.js +553 -0
  56. package/lib/commonjs/Poll/components/CampaignPlay.js.map +1 -0
  57. package/lib/commonjs/Poll/components/CampaignProgressBar.js +118 -0
  58. package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -0
  59. package/lib/commonjs/Poll/components/CampaignResult.js +382 -0
  60. package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -0
  61. package/lib/commonjs/Poll/components/CampaignSelector.js +124 -0
  62. package/lib/commonjs/Poll/components/CampaignSelector.js.map +1 -0
  63. package/lib/commonjs/Poll/components/PollCampaignCard.js +66 -0
  64. package/lib/commonjs/Poll/components/PollCampaignCard.js.map +1 -0
  65. package/lib/commonjs/Poll/components/PollCard.js +480 -0
  66. package/lib/commonjs/Poll/components/PollCard.js.map +1 -0
  67. package/lib/commonjs/Poll/components/PollOptionCard.js +158 -0
  68. package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -0
  69. package/lib/commonjs/Poll/components/PollSelectCard.js +189 -0
  70. package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -0
  71. package/lib/commonjs/Poll/components/ResponseTimer.js +48 -0
  72. package/lib/commonjs/Poll/components/ResponseTimer.js.map +1 -0
  73. package/lib/commonjs/Poll/components/WidgetHeader.js +83 -0
  74. package/lib/commonjs/Poll/components/WidgetHeader.js.map +1 -0
  75. package/lib/commonjs/Poll/index.js +31 -0
  76. package/lib/commonjs/Poll/index.js.map +1 -0
  77. package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  78. package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
  79. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +3 -1
  80. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
  81. package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
  82. package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
  83. package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
  84. package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
  85. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  86. package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  87. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +5 -0
  88. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
  89. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  90. package/lib/commonjs/ProfileManager/index.js +2 -0
  91. package/lib/commonjs/ProfileManager/index.js.map +1 -1
  92. package/lib/commonjs/Wallet/api/index.js +4 -1
  93. package/lib/commonjs/Wallet/api/index.js.map +1 -1
  94. package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
  95. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
  96. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
  97. package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
  98. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
  99. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
  100. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
  101. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
  102. package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
  103. package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
  104. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  105. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
  106. package/lib/commonjs/Wallet/index.js.map +1 -1
  107. package/lib/commonjs/index.js +14 -0
  108. package/lib/commonjs/index.js.map +1 -1
  109. package/lib/module/ApiOverrides/index.js +18 -0
  110. package/lib/module/ApiOverrides/index.js.map +1 -1
  111. package/lib/module/Authenticator/index.js.map +1 -1
  112. package/lib/module/Checkout/api/index.js.map +1 -1
  113. package/lib/module/Checkout/index.js.map +1 -1
  114. package/lib/module/Competition/api/index.js +649 -0
  115. package/lib/module/Competition/api/index.js.map +1 -0
  116. package/lib/module/Competition/components/AthleteMarketCard.js +161 -0
  117. package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -0
  118. package/lib/module/Competition/components/CompetitionCard.js +173 -0
  119. package/lib/module/Competition/components/CompetitionCard.js.map +1 -0
  120. package/lib/module/Competition/components/CompetitionInfoCard.js +257 -0
  121. package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -0
  122. package/lib/module/Competition/components/CompetitionLeaderboard.js +272 -0
  123. package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -0
  124. package/lib/module/Competition/components/CompetitionPlay.js +1260 -0
  125. package/lib/module/Competition/components/CompetitionPlay.js.map +1 -0
  126. package/lib/module/Competition/components/CompetitionSeasonCard.js +104 -0
  127. package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -0
  128. package/lib/module/Competition/components/CompetitionSelector.js +113 -0
  129. package/lib/module/Competition/components/CompetitionSelector.js.map +1 -0
  130. package/lib/module/Competition/components/CompetitionTypeCard.js +371 -0
  131. package/lib/module/Competition/components/CompetitionTypeCard.js.map +1 -0
  132. package/lib/module/Competition/components/EnterCompetitionPrompt.js +228 -0
  133. package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  134. package/lib/module/Competition/components/LeaderPicks.js +313 -0
  135. package/lib/module/Competition/components/LeaderPicks.js.map +1 -0
  136. package/lib/module/Competition/components/ManageSeasonForm.js +596 -0
  137. package/lib/module/Competition/components/ManageSeasonForm.js.map +1 -0
  138. package/lib/module/Competition/components/MarketsCard.js +139 -0
  139. package/lib/module/Competition/components/MarketsCard.js.map +1 -0
  140. package/lib/module/Competition/components/MatchMarketCard.js +192 -0
  141. package/lib/module/Competition/components/MatchMarketCard.js.map +1 -0
  142. package/lib/module/Competition/components/NavOutPrompt.js +152 -0
  143. package/lib/module/Competition/components/NavOutPrompt.js.map +1 -0
  144. package/lib/module/Competition/components/SeasonInfoModal.js +391 -0
  145. package/lib/module/Competition/components/SeasonInfoModal.js.map +1 -0
  146. package/lib/module/Competition/components/TeamEventCard.js +210 -0
  147. package/lib/module/Competition/components/TeamEventCard.js.map +1 -0
  148. package/lib/module/Competition/components/WagerPickForm.js +269 -0
  149. package/lib/module/Competition/components/WagerPickForm.js.map +1 -0
  150. package/lib/module/Competition/index.js +33 -0
  151. package/lib/module/Competition/index.js.map +1 -0
  152. package/lib/module/Components/Icons.js.map +1 -1
  153. package/lib/module/Components/Jerseys.js +705 -0
  154. package/lib/module/Components/Jerseys.js.map +1 -0
  155. package/lib/module/Components/LinearDiagnal.js +2 -3
  156. package/lib/module/Components/LinearDiagnal.js.map +1 -1
  157. package/lib/module/Components/Switch.js +74 -0
  158. package/lib/module/Components/Switch.js.map +1 -0
  159. package/lib/module/Components/index.js +3 -1
  160. package/lib/module/Components/index.js.map +1 -1
  161. package/lib/module/Poll/api/index.js +234 -0
  162. package/lib/module/Poll/api/index.js.map +1 -0
  163. package/lib/module/Poll/components/CampaignPlay.js +545 -0
  164. package/lib/module/Poll/components/CampaignPlay.js.map +1 -0
  165. package/lib/module/Poll/components/CampaignProgressBar.js +110 -0
  166. package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -0
  167. package/lib/module/Poll/components/CampaignResult.js +374 -0
  168. package/lib/module/Poll/components/CampaignResult.js.map +1 -0
  169. package/lib/module/Poll/components/CampaignSelector.js +115 -0
  170. package/lib/module/Poll/components/CampaignSelector.js.map +1 -0
  171. package/lib/module/Poll/components/PollCampaignCard.js +59 -0
  172. package/lib/module/Poll/components/PollCampaignCard.js.map +1 -0
  173. package/lib/module/Poll/components/PollCard.js +472 -0
  174. package/lib/module/Poll/components/PollCard.js.map +1 -0
  175. package/lib/module/Poll/components/PollOptionCard.js +149 -0
  176. package/lib/module/Poll/components/PollOptionCard.js.map +1 -0
  177. package/lib/module/Poll/components/PollSelectCard.js +182 -0
  178. package/lib/module/Poll/components/PollSelectCard.js.map +1 -0
  179. package/lib/module/Poll/components/ResponseTimer.js +39 -0
  180. package/lib/module/Poll/components/ResponseTimer.js.map +1 -0
  181. package/lib/module/Poll/components/WidgetHeader.js +76 -0
  182. package/lib/module/Poll/components/WidgetHeader.js.map +1 -0
  183. package/lib/module/Poll/index.js +22 -0
  184. package/lib/module/Poll/index.js.map +1 -0
  185. package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  186. package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
  187. package/lib/module/ProfileManager/Components/CodeRedeem.js +3 -1
  188. package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
  189. package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
  190. package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
  191. package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
  192. package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
  193. package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  194. package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  195. package/lib/module/ProfileManager/Components/ProfileWizard.js +5 -0
  196. package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
  197. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  198. package/lib/module/ProfileManager/index.js +2 -0
  199. package/lib/module/ProfileManager/index.js.map +1 -1
  200. package/lib/module/Wallet/api/index.js +4 -1
  201. package/lib/module/Wallet/api/index.js.map +1 -1
  202. package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
  203. package/lib/module/Wallet/components/AddressManager.js.map +1 -1
  204. package/lib/module/Wallet/components/DepositCard.js.map +1 -1
  205. package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
  206. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
  207. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
  208. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
  209. package/lib/module/Wallet/components/MyBalance.js.map +1 -1
  210. package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
  211. package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
  212. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  213. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
  214. package/lib/module/Wallet/index.js.map +1 -1
  215. package/lib/module/index.js +3 -1
  216. package/lib/module/index.js.map +1 -1
  217. package/lib/typescript/src/ApiOverrides/index.d.ts +1 -0
  218. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  219. package/lib/typescript/src/Authenticator/api/index.d.ts +2 -2
  220. package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
  221. package/lib/typescript/src/Authenticator/index.d.ts.map +1 -1
  222. package/lib/typescript/src/Checkout/api/index.d.ts +1 -2
  223. package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
  224. package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
  225. package/lib/typescript/src/Competition/api/index.d.ts +128 -0
  226. package/lib/typescript/src/Competition/api/index.d.ts.map +1 -0
  227. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts +19 -0
  228. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts.map +1 -0
  229. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts +12 -0
  230. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts.map +1 -0
  231. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +16 -0
  232. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -0
  233. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +14 -0
  234. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -0
  235. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +20 -0
  236. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -0
  237. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts +10 -0
  238. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts.map +1 -0
  239. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts +11 -0
  240. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts.map +1 -0
  241. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts +14 -0
  242. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts.map +1 -0
  243. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +16 -0
  244. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -0
  245. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +22 -0
  246. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -0
  247. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +10 -0
  248. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +1 -0
  249. package/lib/typescript/src/Competition/components/MarketsCard.d.ts +15 -0
  250. package/lib/typescript/src/Competition/components/MarketsCard.d.ts.map +1 -0
  251. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts +21 -0
  252. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -0
  253. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts +23 -0
  254. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts.map +1 -0
  255. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +14 -0
  256. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +1 -0
  257. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts +17 -0
  258. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts.map +1 -0
  259. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +15 -0
  260. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -0
  261. package/lib/typescript/src/Competition/index.d.ts +11 -0
  262. package/lib/typescript/src/Competition/index.d.ts.map +1 -0
  263. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  264. package/lib/typescript/src/Components/Jerseys.d.ts +16 -0
  265. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -0
  266. package/lib/typescript/src/Components/LinearDiagnal.d.ts.map +1 -1
  267. package/lib/typescript/src/Components/Switch.d.ts +9 -0
  268. package/lib/typescript/src/Components/Switch.d.ts.map +1 -0
  269. package/lib/typescript/src/Components/index.d.ts +3 -1
  270. package/lib/typescript/src/Components/index.d.ts.map +1 -1
  271. package/lib/typescript/src/Poll/api/index.d.ts +61 -0
  272. package/lib/typescript/src/Poll/api/index.d.ts.map +1 -0
  273. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +14 -0
  274. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +1 -0
  275. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts +12 -0
  276. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -0
  277. package/lib/typescript/src/Poll/components/CampaignResult.d.ts +13 -0
  278. package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -0
  279. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts +9 -0
  280. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts.map +1 -0
  281. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts +10 -0
  282. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts.map +1 -0
  283. package/lib/typescript/src/Poll/components/PollCard.d.ts +16 -0
  284. package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -0
  285. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts +14 -0
  286. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -0
  287. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +16 -0
  288. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -0
  289. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts +9 -0
  290. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts.map +1 -0
  291. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts +13 -0
  292. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts.map +1 -0
  293. package/lib/typescript/src/Poll/index.d.ts +7 -0
  294. package/lib/typescript/src/Poll/index.d.ts.map +1 -0
  295. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts +1 -1
  296. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  297. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +1 -2
  298. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  299. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts +9 -2
  300. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  301. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts +1 -1
  302. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  303. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts +1 -1
  304. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  305. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts +1 -1
  306. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  307. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts +1 -1
  308. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  309. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +1 -1
  310. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  311. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +1 -2
  312. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  313. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +10 -3
  314. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  315. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +2 -2
  316. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  317. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +1 -2
  318. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  319. package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
  320. package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
  321. package/lib/typescript/src/ProfileManager/index.d.ts +9 -2
  322. package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
  323. package/lib/typescript/src/Wallet/api/index.d.ts +2 -3
  324. package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
  325. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +1 -2
  326. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
  327. package/lib/typescript/src/Wallet/components/AddressManager.d.ts +1 -2
  328. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
  329. package/lib/typescript/src/Wallet/components/DepositCard.d.ts +1 -2
  330. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
  331. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +1 -2
  332. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
  333. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +1 -2
  334. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  335. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +1 -2
  336. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  337. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +1 -2
  338. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  339. package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -2
  340. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
  341. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +1 -2
  342. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  343. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -2
  344. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
  345. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +1 -2
  346. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  347. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +1 -2
  348. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
  349. package/lib/typescript/src/Wallet/index.d.ts +1 -2
  350. package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
  351. package/lib/typescript/src/index.d.ts +3 -1
  352. package/lib/typescript/src/index.d.ts.map +1 -1
  353. package/package.json +1 -1
  354. package/src/ApiOverrides/index.ts +19 -0
  355. package/src/Authenticator/api/index.ts +2 -2
  356. package/src/Authenticator/api/types.d.ts +1 -25
  357. package/src/Authenticator/index.tsx +2 -1
  358. package/src/Checkout/api/index.tsx +1 -2
  359. package/src/Checkout/index.tsx +1 -2
  360. package/src/Competition/api/index.ts +568 -0
  361. package/src/Competition/components/AthleteMarketCard.tsx +116 -0
  362. package/src/Competition/components/CompetitionCard.tsx +82 -0
  363. package/src/Competition/components/CompetitionInfoCard.tsx +149 -0
  364. package/src/Competition/components/CompetitionLeaderboard.tsx +183 -0
  365. package/src/Competition/components/CompetitionPlay.tsx +936 -0
  366. package/src/Competition/components/CompetitionSeasonCard.tsx +48 -0
  367. package/src/Competition/components/CompetitionSelector.tsx +91 -0
  368. package/src/Competition/components/CompetitionTypeCard.tsx +211 -0
  369. package/src/Competition/components/EnterCompetitionPrompt.tsx +127 -0
  370. package/src/Competition/components/LeaderPicks.tsx +214 -0
  371. package/src/Competition/components/ManageSeasonForm.tsx +271 -0
  372. package/src/Competition/components/MarketsCard.tsx +108 -0
  373. package/src/Competition/components/MatchMarketCard.tsx +126 -0
  374. package/src/Competition/components/NavOutPrompt.tsx +87 -0
  375. package/src/Competition/components/SeasonInfoModal.tsx +212 -0
  376. package/src/Competition/components/TeamEventCard.tsx +136 -0
  377. package/src/Competition/components/WagerPickForm.tsx +114 -0
  378. package/src/Competition/index.tsx +36 -0
  379. package/src/Components/Icons.tsx +0 -2
  380. package/src/Components/Jerseys.tsx +268 -0
  381. package/src/Components/LinearDiagnal.tsx +2 -3
  382. package/src/Components/Switch.tsx +55 -0
  383. package/src/Components/index.tsx +5 -1
  384. package/src/Poll/api/index.ts +178 -0
  385. package/src/Poll/components/CampaignPlay.tsx +407 -0
  386. package/src/Poll/components/CampaignProgressBar.tsx +70 -0
  387. package/src/Poll/components/CampaignResult.tsx +180 -0
  388. package/src/Poll/components/CampaignSelector.tsx +96 -0
  389. package/src/Poll/components/PollCampaignCard.tsx +35 -0
  390. package/src/Poll/components/PollCard.tsx +335 -0
  391. package/src/Poll/components/PollOptionCard.tsx +110 -0
  392. package/src/Poll/components/PollSelectCard.tsx +106 -0
  393. package/src/Poll/components/ResponseTimer.tsx +37 -0
  394. package/src/Poll/components/WidgetHeader.tsx +46 -0
  395. package/src/Poll/index.tsx +25 -0
  396. package/src/ProfileManager/Components/BasicInfoManager.tsx +1 -1
  397. package/src/ProfileManager/Components/BasicStatus.tsx +1 -2
  398. package/src/ProfileManager/Components/CodeRedeem.tsx +10 -3
  399. package/src/ProfileManager/Components/DOBManager.tsx +1 -1
  400. package/src/ProfileManager/Components/EmailManager.tsx +1 -1
  401. package/src/ProfileManager/Components/PasswordManager.tsx +2 -1
  402. package/src/ProfileManager/Components/PhoneManager.tsx +1 -1
  403. package/src/ProfileManager/Components/ProfilePicManager.tsx +1 -1
  404. package/src/ProfileManager/Components/ProfileWelcome.tsx +1 -2
  405. package/src/ProfileManager/Components/ProfileWizard.tsx +14 -3
  406. package/src/ProfileManager/Components/SettingsManager.tsx +2 -2
  407. package/src/ProfileManager/Components/VouchCard.tsx +1 -2
  408. package/src/ProfileManager/api/index.ts +2 -2
  409. package/src/ProfileManager/api/types.d.ts +0 -35
  410. package/src/ProfileManager/index.tsx +11 -3
  411. package/src/Wallet/api/index.ts +6 -4
  412. package/src/Wallet/components/ACHAddCard.tsx +1 -2
  413. package/src/Wallet/components/AddressManager.tsx +1 -2
  414. package/src/Wallet/components/DepositCard.tsx +1 -2
  415. package/src/Wallet/components/FundAccountCard.tsx +1 -2
  416. package/src/Wallet/components/ManageAccountCard.tsx +1 -2
  417. package/src/Wallet/components/ManualACHAdd.tsx +1 -2
  418. package/src/Wallet/components/ManualCardAdd.tsx +1 -2
  419. package/src/Wallet/components/MyBalance.tsx +1 -2
  420. package/src/Wallet/components/WalletActionSelector.tsx +1 -2
  421. package/src/Wallet/components/WalletSettings.tsx +1 -2
  422. package/src/Wallet/components/WalletSetup.tsx +1 -2
  423. package/src/Wallet/components/WithdrawCard.tsx +1 -2
  424. package/src/Wallet/index.tsx +1 -2
  425. package/src/index.tsx +5 -2
  426. package/src/types.d.ts +483 -0
@@ -0,0 +1,649 @@
1
+ import axios from "axios";
2
+ import { APIOverrides } from "../../ApiOverrides";
3
+ import moment from "moment-mini";
4
+ import Colors from "../../constants/colors";
5
+ let AUTH_SVC_API = '';
6
+ let TP_SVC_API = '';
7
+ let EVENT_SVC_API = '';
8
+ let MK_SVC_API = '';
9
+ export { CompetitionSeasonApi, CompetitionApi, CompetitionHelpers, CompetitionPlayerApi, PlayerPicksApi, CompetitionResultApi, CompetitionMatchApi };
10
+ const CompetitionSeasonApi = {
11
+ createCompetitionSeason: async competition_season => {
12
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/season/create`, {
13
+ competition_season
14
+ });
15
+ return resp.data.competition_season;
16
+ },
17
+ updateCompetitionSeason: async competition_season => {
18
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/season/update`, {
19
+ competition_season
20
+ });
21
+ return resp.data.competition_season;
22
+ },
23
+ getCompetitionSeasonTemplates: async league_id => {
24
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/seasons/templates?league_id=${league_id}`);
25
+ return resp.data.competition_seasons;
26
+ },
27
+ getCompetitionSeasonsByAdminId: async status => {
28
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/seasons/me?status=${status}`);
29
+ return resp.data.competition_seasons;
30
+ },
31
+ getCompetitionSeasonById: async competition_season_id => {
32
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/seasons/season/${competition_season_id}`);
33
+ return resp.data.competition_season;
34
+ },
35
+ getLeaderboardBySeasonId: async competition_season_id => {
36
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/leaderboard/season/${competition_season_id}`);
37
+ return resp.data.season_leaderboard;
38
+ },
39
+ getSponsoredCompetitionSeasons: async sponsor_id => {
40
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/seasons/sponsored/${sponsor_id}`);
41
+ return resp.data.competition_seasons;
42
+ }
43
+ };
44
+ const CompetitionApi = {
45
+ setEnvironment: () => {
46
+ const endpoints = APIOverrides.getEndpoints();
47
+ TP_SVC_API = endpoints['TP_SVC_API'];
48
+ EVENT_SVC_API = endpoints['EVENT_SVC_API'];
49
+ MK_SVC_API = endpoints['MK_SVC_API'];
50
+ AUTH_SVC_API = endpoints['AUTH_SVC_API'];
51
+ },
52
+ getPlayersByPlayerIds: async player_ids => {
53
+ const resp = await axios.post(`${AUTH_SVC_API}/v1/players/bulk/get`, {
54
+ player_ids
55
+ });
56
+ return resp.data.players;
57
+ },
58
+ getLeagues: async () => {
59
+ const resp = await axios.get(`${EVENT_SVC_API}/v1/leagues?status=active`);
60
+ return resp.data.leagues;
61
+ },
62
+ getMarkets: async () => {
63
+ const resp = await axios.get(`${MK_SVC_API}/v1/markets/all`);
64
+ return resp.data.markets;
65
+ },
66
+ getLeagueById: async league_id => {
67
+ const resp = await axios.get(`${EVENT_SVC_API}/v1/leagues/league/${league_id}`);
68
+ return resp.data.league;
69
+ },
70
+ getCompetitionsByCompanyId: async (company_id, offset, status) => {
71
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/company/${company_id}?offset=${offset}&status=${status}`);
72
+ return resp.data.competitions;
73
+ },
74
+ getCompetitionById: async competition_id => {
75
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/competition/${competition_id}`);
76
+ return resp.data.competition;
77
+ },
78
+ getCompetitionMatchesByCompetitionId: async competition_id => {
79
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/matches/${competition_id}`);
80
+ return {
81
+ competition_matches: resp.data.competition_matches,
82
+ competition_match_markets: resp.data.competition_match_markets
83
+ };
84
+ },
85
+ getEnteredCompetitions: async () => {
86
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/entered`);
87
+ return resp.data;
88
+ },
89
+ getCompetitionsBySeasonId: async competition_season_id => {
90
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/season/${competition_season_id}`);
91
+ return resp.data.competitions;
92
+ },
93
+ createCompetition: async draft_competition => {
94
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/competition/create`, {
95
+ draft_competition
96
+ });
97
+ return resp.data;
98
+ },
99
+ editCompetition: async draft_competition => {
100
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/competition/edit`, {
101
+ draft_competition
102
+ });
103
+ return resp.data;
104
+ },
105
+ getPublicCompetitions: async offset => {
106
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/all?offset=${offset}&status=scheduled`);
107
+ return resp.data.competitions;
108
+ },
109
+ getActiveSponsoredCompetitions: async sponsor_id => {
110
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/sponsored/${sponsor_id}`);
111
+ return resp.data.competitions;
112
+ },
113
+ getCompetitionOptions: async () => {
114
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/options`);
115
+ return resp.data;
116
+ },
117
+ getMyDetails: async () => {
118
+ const resp = await axios.get(`${AUTH_SVC_API}/v1/players/player/me`);
119
+ return resp.data.player;
120
+ },
121
+ getMyReferralCode: async () => {
122
+ const resp = await axios.get(`${AUTH_SVC_API}/v1/promos/referral/me`);
123
+ return resp.data;
124
+ },
125
+ getMyBalance: async () => {
126
+ const resp = await axios.get(`${AUTH_SVC_API}/v1/players/player/balance/me`);
127
+ return resp.data.player_balance;
128
+ }
129
+ };
130
+ const CompetitionMatchApi = {
131
+ getCompetitionMatchesByCompetitionId: async (competition_id, status) => {
132
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/matches/${competition_id}?status=${status}`);
133
+ return resp.data;
134
+ },
135
+ getEventsByEventIds: async event_ids => {
136
+ const resp = await axios.post(`${EVENT_SVC_API}/v1/events/bulk/get`, {
137
+ attribute: 'event_id',
138
+ values: event_ids
139
+ });
140
+ return resp.data.events;
141
+ },
142
+ getMatchesByMatchIds: async match_ids => {
143
+ const resp = await axios.post(`${EVENT_SVC_API}/v1/matches/bulk/get`, {
144
+ attribute: 'match_id',
145
+ values: match_ids
146
+ });
147
+ return resp.data.matches;
148
+ },
149
+ getAthletesByIds: async athlete_ids => {
150
+ const resp = await axios.post(`${EVENT_SVC_API}/v1/athletes/bulk/get`, {
151
+ attribute: 'athlete_id',
152
+ values: athlete_ids
153
+ });
154
+ return resp.data.athletes;
155
+ },
156
+ getTournamentsByTournamentIds: async tournament_ids => {
157
+ const resp = await axios.post(`${EVENT_SVC_API}/v1/tournaments/bulk/get`, {
158
+ attribute: 'event_id',
159
+ values: tournament_ids
160
+ });
161
+ return resp.data.tournaments;
162
+ },
163
+ getTeamsByIds: async team_ids => {
164
+ const resp = await axios.post(`${EVENT_SVC_API}/v1/teams/bulk/get`, {
165
+ attribute: 'team_id',
166
+ values: team_ids
167
+ });
168
+ return resp.data.teams;
169
+ },
170
+ getExoticsByIds: async exotic_ids => {
171
+ const resp = await axios.post(`${EVENT_SVC_API}/v1/exotics/bulk/get`, {
172
+ attribute: 'exotic_id',
173
+ values: exotic_ids
174
+ });
175
+ return resp.data.athletes;
176
+ }
177
+ };
178
+ const CompetitionPlayerApi = {
179
+ getCompetitionPlayersByCompetition: async (competition_id, offset, status) => {
180
+ const resp = await axios.get(`${TP_SVC_API}/v1/competitions/players/${competition_id}?offset=${offset}&status=${status}`);
181
+ return resp.data.competition_players;
182
+ },
183
+ joinCompetition: async competition_player => {
184
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/player/join`, {
185
+ competition_player
186
+ });
187
+ return resp.data;
188
+ },
189
+ leaveCompetition: async competition_player => {
190
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/player/leave`, {
191
+ competition_player
192
+ });
193
+ return resp.data;
194
+ },
195
+ rejectCompetition: async competition_player => {
196
+ const resp = await axios.post(`${TP_SVC_API}/v1/competitions/player/leave`, {
197
+ competition_player
198
+ });
199
+ return resp.data.competition_player;
200
+ }
201
+ };
202
+ const PlayerPicksApi = {
203
+ getPlayerPicksByCompetition: async (competition_id, player_id, offset) => {
204
+ const resp = await axios.get(`${TP_SVC_API}/v1/picks/competition/${competition_id}?player_id=${player_id}&offset=${offset}`);
205
+ return resp.data.player_picks;
206
+ },
207
+ createPlayerPick: async player_pick => {
208
+ const resp = await axios.post(`${TP_SVC_API}/v1/picks/pick/create`, {
209
+ player_pick
210
+ });
211
+ return resp.data;
212
+ },
213
+ removePlayerPick: async player_pick_id => {
214
+ const resp = await axios.post(`${TP_SVC_API}/v1/picks/pick/remove`, {
215
+ player_pick_id
216
+ });
217
+ return resp.data;
218
+ }
219
+ };
220
+ const CompetitionResultApi = {
221
+ getResultsByCompetition: async (competition_id, offset, player_id_override) => {
222
+ const resp = await axios.get(`${TP_SVC_API}/v1/results/competition/${competition_id}?offset=${offset}&player_id=${player_id_override}`);
223
+ return resp.data;
224
+ }
225
+ };
226
+ export const FINALIZED_STATUSES = ['closed', 'complete', 'cancelled', 'unnecessary', 'postponed', 'suspended'];
227
+ export const IN_PROGRESS_STATUSES = ['inprogress', 'halftime', 'intermission'];
228
+ const CompetitionHelpers = {
229
+ getReferralDescription: promo => {
230
+ switch (promo.type) {
231
+ case 'promo_code':
232
+ return `Get ${promo.amount} promo bucks after you verify your account`;
233
+ case 'promo_sweepstakes':
234
+ return `Have a chance at UP TO 500 promo bucks after you verify your account`;
235
+ case 'referral_code':
236
+ return `Get ${promo.amount} promo bucks after you verify your account. Your referrer will get the same after you make your first deposit`;
237
+ case 'referral_sweepstakes':
238
+ return `Have a chance at UP TO 500 promo bucks after you verify your account. Your referrer will get the same after you make your first deposit`;
239
+ default:
240
+ return '';
241
+ }
242
+ },
243
+ getEmptyCompetitionSeason: () => {
244
+ return {
245
+ competition_season_id: '',
246
+ season_name: '',
247
+ season_description: '',
248
+ image: {
249
+ url: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1635988385/be_notify_icon_nqplfc.png'
250
+ },
251
+ payout_allocation: 0,
252
+ payout_amt: 0,
253
+ allow_late_buy_in: false,
254
+ single_buy_in: true,
255
+ competition_result_type_id: '1',
256
+ admin_id: '',
257
+ status: 'active',
258
+ scheduled_datetime: moment().add(10, 'days'),
259
+ create_datetime: '',
260
+ last_update_datetime: '',
261
+ market_type: 'FOR_MONEY'
262
+ };
263
+ },
264
+ formatPlace: place => {
265
+ switch (place) {
266
+ case 1:
267
+ return '1st';
268
+ case 2:
269
+ return '2nd';
270
+ case 3:
271
+ return '3rd';
272
+ case 4:
273
+ return '4th';
274
+ case 5:
275
+ return '5th';
276
+ case 6:
277
+ return '6th';
278
+ case 7:
279
+ return '7th';
280
+ case 8:
281
+ return '8th';
282
+ case 9:
283
+ return '9th';
284
+ default:
285
+ return `${place}`;
286
+ }
287
+ },
288
+ isSeasonValid: s => {
289
+ if (!s.season_name) {
290
+ return false;
291
+ }
292
+ if (!s.season_description) {
293
+ return false;
294
+ }
295
+ if (!s.competition_result_type_id) {
296
+ return false;
297
+ }
298
+ return true;
299
+ },
300
+ getEmptyCompetition: () => {
301
+ return {
302
+ competition_id: '',
303
+ auth_strategy_id: '',
304
+ competition_name: '',
305
+ competition_description: '',
306
+ buy_in: 0,
307
+ admin_id: '',
308
+ image: {
309
+ url: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1635988385/be_notify_icon_nqplfc.png'
310
+ },
311
+ ticket_revenue: 0,
312
+ tickets_sold: 0,
313
+ available_tickets: 10,
314
+ market_ids: [],
315
+ market_type: 'FOR_MONEY',
316
+ status: 'scheduled',
317
+ create_datetime: '',
318
+ last_update_datetime: '',
319
+ competition_type_id: '1',
320
+ competition_result_type_id: '1',
321
+ scheduled_datetime: '',
322
+ entered: false,
323
+ max_pick_count: 0,
324
+ leagues: [],
325
+ invite_only: false,
326
+ length_type: 'event',
327
+ competition_code: '',
328
+ initial_balance: 1000,
329
+ end_datetime: moment().add(1, 'week')
330
+ };
331
+ },
332
+ getClosestDay: schedule_range => {
333
+ if (schedule_range.length == 0) {
334
+ return moment().format('YYYY/MM/DD');
335
+ }
336
+ let closest;
337
+ let exact_day = schedule_range.find(d => d == moment().format('YYYY/MM/DD'));
338
+ if (exact_day) {
339
+ return exact_day;
340
+ }
341
+ schedule_range.map(d => {
342
+ if (!closest) {
343
+ closest = moment(d);
344
+ }
345
+ if (moment(d).isBefore(moment())) {
346
+ return;
347
+ } //Day is in the past
348
+ let new_range = moment(d).diff(moment(), 'days');
349
+ let closest_range = closest.diff(moment(), 'days');
350
+ if (Math.abs(new_range) < Math.abs(closest_range)) {
351
+ closest = moment(d);
352
+ }
353
+ });
354
+ return closest.format('YYYY/MM/DD');
355
+ },
356
+ getEventCompMatchFromEvent: (event_id, event_type) => {
357
+ return {
358
+ competition_id: '',
359
+ competition_match_id: '',
360
+ event_id,
361
+ event_type,
362
+ status: 'inprogress',
363
+ create_datetime: '',
364
+ last_update_datetime: '',
365
+ match_type: 'event'
366
+ };
367
+ },
368
+ getMatchMarketsFromEventAndTrades: (event_id, trades, markets) => {
369
+ let cmm = [];
370
+ markets.map(m => {
371
+ let tst = trades.find(t => t.market_id == m.market_id && t.side == m.trade_side);
372
+ let ntst = trades.find(t => t.market_id == m.market_id && t.side != m.trade_side);
373
+ if (!tst || !ntst) {
374
+ return;
375
+ }
376
+ let tscmm = {
377
+ competition_match_id: '',
378
+ competition_match_market_id: '',
379
+ var_1: tst.var_1,
380
+ odds: tst.odds,
381
+ event_id,
382
+ event_type: 'team',
383
+ probability: tst.probability,
384
+ side: tst.side,
385
+ side_id: tst.side_id,
386
+ market_id: tst.market_id,
387
+ status: 'active',
388
+ create_datetime: '',
389
+ last_update_datetime: ''
390
+ };
391
+ cmm.push(tscmm);
392
+ let ntscmm = {
393
+ competition_match_id: '',
394
+ competition_match_market_id: '',
395
+ var_1: ntst.var_1,
396
+ odds: ntst.odds,
397
+ event_id,
398
+ event_type: 'team',
399
+ probability: ntst.probability,
400
+ side: ntst.side,
401
+ side_id: ntst.side_id,
402
+ market_id: ntst.market_id,
403
+ status: 'active',
404
+ create_datetime: '',
405
+ last_update_datetime: ''
406
+ };
407
+ cmm.push(ntscmm);
408
+ });
409
+ return cmm;
410
+ },
411
+ getStartTimeOptions: (draft_competition, events) => {
412
+ if (events.length == 0) {
413
+ return [];
414
+ }
415
+ let available_picks = draft_competition.competition_match_markets.length / 2 + draft_competition.additional_markets.length;
416
+ let included_events = events.filter(e => draft_competition.competition_matches.map(cm => cm.event_id.toString()).includes(e.event_id.toString()));
417
+ let additional_market_events = events.filter(e => draft_competition.additional_markets.map(m => m.event_id.toString()).includes(e.event_id.toString()));
418
+ included_events = included_events.concat(additional_market_events).sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix());
419
+ let start_time_options = [];
420
+ let earliest_event = included_events[0];
421
+ if (!earliest_event) {
422
+ return [];
423
+ }
424
+ start_time_options.push({
425
+ start_time: earliest_event.scheduled_datetime,
426
+ label: `Start time of the earliest game`
427
+ });
428
+ if (available_picks === draft_competition.competition.max_pick_count) {
429
+ return start_time_options;
430
+ }
431
+ let diff = available_picks - draft_competition.competition.max_pick_count;
432
+ let picks_per_event = available_picks / included_events.length;
433
+ let event_to_back = diff / picks_per_event;
434
+ earliest_event = included_events[Math.ceil(event_to_back)];
435
+ if (!earliest_event) {
436
+ return start_time_options;
437
+ }
438
+ start_time_options.push({
439
+ label: 'Latest start time possible based on max picks',
440
+ start_time: earliest_event.scheduled_datetime
441
+ });
442
+ return start_time_options;
443
+ },
444
+ getEmptyCreateCompetition: () => {
445
+ return {
446
+ competition: {
447
+ competition_id: '',
448
+ auth_strategy_id: '',
449
+ competition_name: '',
450
+ competition_description: '',
451
+ buy_in: 0,
452
+ admin_id: '',
453
+ ticket_revenue: 0,
454
+ tickets_sold: 0,
455
+ available_tickets: 10,
456
+ market_ids: [],
457
+ market_type: 'FOR_MONEY',
458
+ status: 'scheduled',
459
+ create_datetime: '',
460
+ last_update_datetime: '',
461
+ competition_type_id: '',
462
+ competition_result_type_id: '',
463
+ scheduled_datetime: '',
464
+ entered: false,
465
+ max_pick_count: 0,
466
+ leagues: [],
467
+ invite_only: false,
468
+ length_type: 'event',
469
+ competition_code: '',
470
+ initial_balance: 1000,
471
+ end_datetime: ''
472
+ },
473
+ competition_match_markets: [],
474
+ competition_matches: [],
475
+ competition_players: [],
476
+ additional_markets: []
477
+ };
478
+ },
479
+ getCompColors: competition_type => {
480
+ switch (competition_type) {
481
+ case 'pick':
482
+ return {
483
+ backgroundColor: 'rgba(26,205,106,0.1)',
484
+ borderColor: Colors.highlights.highlight400
485
+ };
486
+ case 'wager':
487
+ return {
488
+ backgroundColor: 'rgba(59,26,205,0.1)',
489
+ borderColor: Colors.highlights.highlight100
490
+ };
491
+ default:
492
+ return {
493
+ backgroundColor: Colors.brand.slate,
494
+ borderColor: Colors.shades.black
495
+ };
496
+ }
497
+ },
498
+ getOddsLabel: odds => {
499
+ if (odds > 0) {
500
+ return `+${odds.toFixed()}`;
501
+ }
502
+ return odds.toFixed();
503
+ },
504
+ getVar1Label: (var_1, market) => {
505
+ if (market.type == 'Spread') {
506
+ if (var_1 > 0) {
507
+ return `+${var_1}`;
508
+ }
509
+ }
510
+ return var_1.toString();
511
+ },
512
+ getUniqueDivisions: events => {
513
+ let away_divisions = events.map(e => e.away?.division ? e.away.division : '');
514
+ let home_divisions = events.map(e => e.home?.division ? e.home.division : '');
515
+ if (!away_divisions || !home_divisions) {
516
+ return [];
517
+ }
518
+ let divisions = away_divisions.concat(home_divisions);
519
+ let options = [...new Set(divisions.map(d => d))].sort((a, b) => a > b ? 1 : -1);
520
+ let ranks = events.find(e => e.away?.rank || e.home?.rank);
521
+ if (ranks) {
522
+ options = ['Top25'].concat(options);
523
+ }
524
+ return options;
525
+ },
526
+ getUniqueSubDivisions: events => {
527
+ let away_divisions = events.map(e => e.away?.sub_division ? e.away.sub_division : '');
528
+ let home_divisions = events.map(e => e.home?.sub_division ? e.home.sub_division : '');
529
+ return [...new Set(away_divisions.concat(home_divisions).map(d => d))].sort((a, b) => a > b ? 1 : -1);
530
+ },
531
+ createPickFromMatchMarket: (competition_id, mm) => {
532
+ return {
533
+ player_id: '',
534
+ player_pick_id: '',
535
+ side: mm.side,
536
+ side_id: mm.side_id,
537
+ status: 'inprogress',
538
+ competition_id,
539
+ competition_match_id: mm.competition_match_id,
540
+ market_id: mm.market_id,
541
+ odds: mm.odds,
542
+ var_1: mm.var_1,
543
+ probability: mm.probability,
544
+ create_datetime: '',
545
+ last_update_datetime: '',
546
+ stake: 0,
547
+ potential_winnings: 0,
548
+ winnings: 0,
549
+ pick_title: ''
550
+ };
551
+ },
552
+ getCompetitionPlayer: competition_id => {
553
+ return {
554
+ competition_id,
555
+ competition_player_id: '',
556
+ status: 'active',
557
+ create_datetime: '',
558
+ last_update_datetime: '',
559
+ player_id: '',
560
+ wager_based_balance: 1000,
561
+ accepted_ind: false
562
+ };
563
+ },
564
+ getCompTypeColor: competition_type => {
565
+ switch (competition_type?.type) {
566
+ case 'pick':
567
+ return Colors.highlights.highlight400;
568
+ case 'wager':
569
+ return Colors.highlights.highlight100;
570
+ default:
571
+ return Colors.brand.midnight;
572
+ }
573
+ },
574
+ calcPotentialWinnings: (amt, odds) => {
575
+ if (odds > 0) {
576
+ var earningsMultiplyer = odds / 100 + 1;
577
+ return earningsMultiplyer * amt;
578
+ } else {
579
+ var earningsMultiplyer = 100 / Math.abs(odds) + 1;
580
+ return earningsMultiplyer * amt;
581
+ }
582
+ },
583
+ getPickTitleForTeamEvent: (pick, market, event, athlete) => {
584
+ let market_side = market.side_options.find(o => o.side == pick.side);
585
+ if (!market_side) {
586
+ return pick.side;
587
+ }
588
+ var re = /({.*?})/;
589
+ let parsed_text = market_side.parseable_title.split(re);
590
+ let new_title = '';
591
+ parsed_text.map(t => {
592
+ if (t === '') {
593
+ return;
594
+ }
595
+ if (t[0] !== '{') {
596
+ return new_title += t;
597
+ }
598
+ let variable = t.slice(1);
599
+ variable = variable.slice(0, variable.length - 1);
600
+ switch (variable) {
601
+ case 'team':
602
+ let team = event[pick.side];
603
+ return new_title += team.market_name;
604
+ case 'var_1':
605
+ return new_title += CompetitionHelpers.getVar1Label(pick.var_1, market);
606
+ case 'athlete':
607
+ return new_title += `${athlete?.first_name} ${athlete?.last_name}`;
608
+ case 'stat':
609
+ return new_title += market.stat_label ?? market.stat;
610
+ default:
611
+ return;
612
+ }
613
+ });
614
+ return new_title;
615
+ },
616
+ getPickTitleForMatch: (pick, market, athlete, team) => {
617
+ let market_side = market.side_options.find(o => o.side == pick.side);
618
+ if (!market_side) {
619
+ return pick.side;
620
+ }
621
+ var re = /({.*?})/;
622
+ let parsed_text = market_side.parseable_title.split(re);
623
+ let new_title = '';
624
+ parsed_text.map(t => {
625
+ if (t === '') {
626
+ return;
627
+ }
628
+ if (t[0] !== '{') {
629
+ return new_title += t;
630
+ }
631
+ let variable = t.slice(1);
632
+ variable = variable.slice(0, variable.length - 1);
633
+ switch (variable) {
634
+ case 'team':
635
+ return new_title += `${team?.market_name} ${team?.name}`;
636
+ case 'var_1':
637
+ return new_title += CompetitionHelpers.getVar1Label(pick.var_1, market);
638
+ case 'athlete':
639
+ return new_title += athlete?.abbr_name;
640
+ case 'stat':
641
+ return new_title += market.stat;
642
+ default:
643
+ return;
644
+ }
645
+ });
646
+ return new_title;
647
+ }
648
+ };
649
+ //# sourceMappingURL=index.js.map