react-native-monflowts 0.0.0-stage → 0.5.0

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 (479) hide show
  1. package/LICENSE +20 -0
  2. package/Monflowts.podspec +22 -0
  3. package/README.md +229 -2
  4. package/android/build.gradle +58 -0
  5. package/android/src/main/AndroidManifest.xml +8 -0
  6. package/android/src/main/java/com/monflowts/MonflowtsAssetsModule.kt +219 -0
  7. package/android/src/main/java/com/monflowts/MonflowtsCrashFeedModule.kt +175 -0
  8. package/android/src/main/java/com/monflowts/MonflowtsHapticModule.kt +170 -0
  9. package/android/src/main/java/com/monflowts/MonflowtsLottieView.kt +96 -0
  10. package/android/src/main/java/com/monflowts/MonflowtsLottieViewManager.kt +53 -0
  11. package/android/src/main/java/com/monflowts/MonflowtsPackage.kt +70 -0
  12. package/android/src/main/java/com/monflowts/MonflowtsSoundModule.kt +132 -0
  13. package/android/src/main/java/com/monflowts/MonflowtsSpeechModule.kt +81 -0
  14. package/android/src/main/java/com/monflowts/MonflowtsSvgView.kt +355 -0
  15. package/android/src/main/java/com/monflowts/MonflowtsSvgViewManager.kt +59 -0
  16. package/android/src/main/java/com/monflowts/MonflowtsWebView.kt +86 -0
  17. package/android/src/main/java/com/monflowts/MonflowtsWebViewManager.kt +33 -0
  18. package/android/src/main/java/com/monflowts/MonflowtsWheelView.kt +98 -0
  19. package/android/src/main/java/com/monflowts/MonflowtsWheelViewManager.kt +46 -0
  20. package/ios/Monflowts-Bridging-Header.h +5 -0
  21. package/ios/MonflowtsAssetsBridge.m +14 -0
  22. package/ios/MonflowtsAssetsModule.swift +217 -0
  23. package/ios/MonflowtsCrashFeedBridge.m +9 -0
  24. package/ios/MonflowtsCrashFeedModule.swift +88 -0
  25. package/ios/MonflowtsHTTP1EventSource.swift +296 -0
  26. package/ios/MonflowtsHapticBridge.m +8 -0
  27. package/ios/MonflowtsHapticModule.swift +55 -0
  28. package/ios/MonflowtsLottieBridge.m +12 -0
  29. package/ios/MonflowtsLottieUIView.swift +95 -0
  30. package/ios/MonflowtsLottieViewManager.swift +13 -0
  31. package/ios/MonflowtsSSEParser.swift +58 -0
  32. package/ios/MonflowtsSoundBridge.m +8 -0
  33. package/ios/MonflowtsSoundModule.swift +100 -0
  34. package/ios/MonflowtsSpeechBridge.m +9 -0
  35. package/ios/MonflowtsSpeechModule.swift +61 -0
  36. package/ios/MonflowtsSvgBridge.m +11 -0
  37. package/ios/MonflowtsSvgUIView.swift +431 -0
  38. package/ios/MonflowtsSvgViewManager.swift +13 -0
  39. package/ios/MonflowtsWebBridge.m +8 -0
  40. package/ios/MonflowtsWebUIView.swift +92 -0
  41. package/ios/MonflowtsWebViewManager.swift +14 -0
  42. package/ios/MonflowtsWheelBridge.m +7 -0
  43. package/ios/MonflowtsWheelUIView.swift +126 -0
  44. package/ios/MonflowtsWheelViewManager.swift +14 -0
  45. package/lib/module/HapticsManager.js +93 -0
  46. package/lib/module/HapticsManager.js.map +1 -0
  47. package/lib/module/HubContent.js +642 -0
  48. package/lib/module/HubContent.js.map +1 -0
  49. package/lib/module/Icons.js +64 -0
  50. package/lib/module/Icons.js.map +1 -0
  51. package/lib/module/MonflowtsHub.js +233 -0
  52. package/lib/module/MonflowtsHub.js.map +1 -0
  53. package/lib/module/NativeLottieView.js +6 -0
  54. package/lib/module/NativeLottieView.js.map +1 -0
  55. package/lib/module/NativeSvgView.js +6 -0
  56. package/lib/module/NativeSvgView.js.map +1 -0
  57. package/lib/module/NativeWebView.js +14 -0
  58. package/lib/module/NativeWebView.js.map +1 -0
  59. package/lib/module/NativeWheelView.js +6 -0
  60. package/lib/module/NativeWheelView.js.map +1 -0
  61. package/lib/module/SoundManager.js +120 -0
  62. package/lib/module/SoundManager.js.map +1 -0
  63. package/lib/module/SpeechManager.js +40 -0
  64. package/lib/module/SpeechManager.js.map +1 -0
  65. package/lib/module/api/client.js +109 -0
  66. package/lib/module/api/client.js.map +1 -0
  67. package/lib/module/api/gameTypes.js +2 -0
  68. package/lib/module/api/gameTypes.js.map +1 -0
  69. package/lib/module/api/http.js +252 -0
  70. package/lib/module/api/http.js.map +1 -0
  71. package/lib/module/api/mutations.js +359 -0
  72. package/lib/module/api/mutations.js.map +1 -0
  73. package/lib/module/api/playerTypes.js +2 -0
  74. package/lib/module/api/playerTypes.js.map +1 -0
  75. package/lib/module/api/queries.js +403 -0
  76. package/lib/module/api/queries.js.map +1 -0
  77. package/lib/module/api/sdkTypes.js +2 -0
  78. package/lib/module/api/sdkTypes.js.map +1 -0
  79. package/lib/module/assets/assetKeys.js +4 -0
  80. package/lib/module/assets/assetKeys.js.map +1 -0
  81. package/lib/module/assets/assetSync.js +61 -0
  82. package/lib/module/assets/assetSync.js.map +1 -0
  83. package/lib/module/assets/nativeAssets.js +25 -0
  84. package/lib/module/assets/nativeAssets.js.map +1 -0
  85. package/lib/module/assets/remote.js +47 -0
  86. package/lib/module/assets/remote.js.map +1 -0
  87. package/lib/module/components/AbandonPolicyNotice.js +200 -0
  88. package/lib/module/components/AbandonPolicyNotice.js.map +1 -0
  89. package/lib/module/components/AnimatedAmount.js +39 -0
  90. package/lib/module/components/AnimatedAmount.js.map +1 -0
  91. package/lib/module/components/CoinFlyOverlay.js +157 -0
  92. package/lib/module/components/CoinFlyOverlay.js.map +1 -0
  93. package/lib/module/components/GameCharacter.js +45 -0
  94. package/lib/module/components/GameCharacter.js.map +1 -0
  95. package/lib/module/components/GameRulesModal.js +279 -0
  96. package/lib/module/components/GameRulesModal.js.map +1 -0
  97. package/lib/module/components/HypeCallout.js +103 -0
  98. package/lib/module/components/HypeCallout.js.map +1 -0
  99. package/lib/module/components/InsufficientFundsOverlay.js +285 -0
  100. package/lib/module/components/InsufficientFundsOverlay.js.map +1 -0
  101. package/lib/module/components/JackpotNearMiss.js +89 -0
  102. package/lib/module/components/JackpotNearMiss.js.map +1 -0
  103. package/lib/module/components/JackpotTeaser.js +341 -0
  104. package/lib/module/components/JackpotTeaser.js.map +1 -0
  105. package/lib/module/components/MonflowtsButton.js +129 -0
  106. package/lib/module/components/MonflowtsButton.js.map +1 -0
  107. package/lib/module/components/MonflowtsChipGroup.js +40 -0
  108. package/lib/module/components/MonflowtsChipGroup.js.map +1 -0
  109. package/lib/module/components/MonflowtsPressable.js +42 -0
  110. package/lib/module/components/MonflowtsPressable.js.map +1 -0
  111. package/lib/module/components/QuitConfirmModal.js +180 -0
  112. package/lib/module/components/QuitConfirmModal.js.map +1 -0
  113. package/lib/module/components/SessionTimer.js +77 -0
  114. package/lib/module/components/SessionTimer.js.map +1 -0
  115. package/lib/module/components/SideDemoTab.js +110 -0
  116. package/lib/module/components/SideDemoTab.js.map +1 -0
  117. package/lib/module/components/StakeInput.js +138 -0
  118. package/lib/module/components/StakeInput.js.map +1 -0
  119. package/lib/module/constants.js +50 -0
  120. package/lib/module/constants.js.map +1 -0
  121. package/lib/module/content.js +21 -0
  122. package/lib/module/content.js.map +1 -0
  123. package/lib/module/effects/EffectBurst.js +56 -0
  124. package/lib/module/effects/EffectBurst.js.map +1 -0
  125. package/lib/module/effects/beaverStates.js +11 -0
  126. package/lib/module/effects/beaverStates.js.map +1 -0
  127. package/lib/module/effects/hypePhrases.js +67 -0
  128. package/lib/module/effects/hypePhrases.js.map +1 -0
  129. package/lib/module/effects/particleAnims.js +17 -0
  130. package/lib/module/effects/particleAnims.js.map +1 -0
  131. package/lib/module/hooks/useAvailableGames.js +29 -0
  132. package/lib/module/hooks/useAvailableGames.js.map +1 -0
  133. package/lib/module/hooks/useCrash.js +137 -0
  134. package/lib/module/hooks/useCrash.js.map +1 -0
  135. package/lib/module/hooks/useCrashFeed.js +49 -0
  136. package/lib/module/hooks/useCrashFeed.js.map +1 -0
  137. package/lib/module/hooks/useCurrency.js +13 -0
  138. package/lib/module/hooks/useCurrency.js.map +1 -0
  139. package/lib/module/hooks/useFairSeed.js +55 -0
  140. package/lib/module/hooks/useFairSeed.js.map +1 -0
  141. package/lib/module/hooks/useGameEvents.js +186 -0
  142. package/lib/module/hooks/useGameEvents.js.map +1 -0
  143. package/lib/module/hooks/useGameHistory.js +55 -0
  144. package/lib/module/hooks/useGameHistory.js.map +1 -0
  145. package/lib/module/hooks/useLeaderboard.js +83 -0
  146. package/lib/module/hooks/useLeaderboard.js.map +1 -0
  147. package/lib/module/hooks/useMines.js +166 -0
  148. package/lib/module/hooks/useMines.js.map +1 -0
  149. package/lib/module/hooks/useNotifications.js +66 -0
  150. package/lib/module/hooks/useNotifications.js.map +1 -0
  151. package/lib/module/hooks/usePlayGame.js +408 -0
  152. package/lib/module/hooks/usePlayGame.js.map +1 -0
  153. package/lib/module/hooks/usePlinko.js +75 -0
  154. package/lib/module/hooks/usePlinko.js.map +1 -0
  155. package/lib/module/hooks/useRaffleDrawState.js +57 -0
  156. package/lib/module/hooks/useRaffleDrawState.js.map +1 -0
  157. package/lib/module/hooks/useRefreshWallet.js +24 -0
  158. package/lib/module/hooks/useRefreshWallet.js.map +1 -0
  159. package/lib/module/hooks/useResponsive.js +16 -0
  160. package/lib/module/hooks/useResponsive.js.map +1 -0
  161. package/lib/module/hooks/useRevealWin.js +120 -0
  162. package/lib/module/hooks/useRevealWin.js.map +1 -0
  163. package/lib/module/hooks/useScreenShake.js +32 -0
  164. package/lib/module/hooks/useScreenShake.js.map +1 -0
  165. package/lib/module/hooks/useWallet.js +77 -0
  166. package/lib/module/hooks/useWallet.js.map +1 -0
  167. package/lib/module/i18n.js +104 -0
  168. package/lib/module/i18n.js.map +1 -0
  169. package/lib/module/index.js +22 -0
  170. package/lib/module/index.js.map +1 -0
  171. package/lib/module/lottieAnimations.js +15 -0
  172. package/lib/module/lottieAnimations.js.map +1 -0
  173. package/lib/module/package.json +1 -0
  174. package/lib/module/stores/assetStore.js +140 -0
  175. package/lib/module/stores/assetStore.js.map +1 -0
  176. package/lib/module/stores/authStore.js +47 -0
  177. package/lib/module/stores/authStore.js.map +1 -0
  178. package/lib/module/stores/gameStore.js +23 -0
  179. package/lib/module/stores/gameStore.js.map +1 -0
  180. package/lib/module/stores/sdkInitStore.js +155 -0
  181. package/lib/module/stores/sdkInitStore.js.map +1 -0
  182. package/lib/module/stores/settingsStore.js +40 -0
  183. package/lib/module/stores/settingsStore.js.map +1 -0
  184. package/lib/module/theme.js +160 -0
  185. package/lib/module/theme.js.map +1 -0
  186. package/lib/module/types.js +4 -0
  187. package/lib/module/types.js.map +1 -0
  188. package/lib/module/utils/apolloError.js +69 -0
  189. package/lib/module/utils/apolloError.js.map +1 -0
  190. package/lib/module/utils/crashMultiplier.js +8 -0
  191. package/lib/module/utils/crashMultiplier.js.map +1 -0
  192. package/lib/module/utils/crashMultiplier.test.js +34 -0
  193. package/lib/module/utils/crashMultiplier.test.js.map +1 -0
  194. package/lib/module/utils/deviceAnalytics.js +51 -0
  195. package/lib/module/utils/deviceAnalytics.js.map +1 -0
  196. package/lib/module/utils/idempotency.js +66 -0
  197. package/lib/module/utils/idempotency.js.map +1 -0
  198. package/lib/module/utils/layout.js +14 -0
  199. package/lib/module/utils/layout.js.map +1 -0
  200. package/lib/module/utils/safeInlineScript.js +12 -0
  201. package/lib/module/utils/safeInlineScript.js.map +1 -0
  202. package/lib/module/utils/sseClient.js +40 -0
  203. package/lib/module/utils/sseClient.js.map +1 -0
  204. package/lib/module/views/DepositSelect.js +275 -0
  205. package/lib/module/views/DepositSelect.js.map +1 -0
  206. package/lib/module/views/Dice.js +111 -0
  207. package/lib/module/views/Dice.js.map +1 -0
  208. package/lib/module/views/DiceBattle.js +815 -0
  209. package/lib/module/views/DiceBattle.js.map +1 -0
  210. package/lib/module/views/DiceLobby.js +577 -0
  211. package/lib/module/views/DiceLobby.js.map +1 -0
  212. package/lib/module/views/FortuneWheel.js +892 -0
  213. package/lib/module/views/FortuneWheel.js.map +1 -0
  214. package/lib/module/views/Freefall.js +808 -0
  215. package/lib/module/views/Freefall.js.map +1 -0
  216. package/lib/module/views/History.js +366 -0
  217. package/lib/module/views/History.js.map +1 -0
  218. package/lib/module/views/Home.js +554 -0
  219. package/lib/module/views/Home.js.map +1 -0
  220. package/lib/module/views/Jetstream.js +889 -0
  221. package/lib/module/views/Jetstream.js.map +1 -0
  222. package/lib/module/views/Leaderboard.js +1206 -0
  223. package/lib/module/views/Leaderboard.js.map +1 -0
  224. package/lib/module/views/MillionaireHunter.js +1697 -0
  225. package/lib/module/views/MillionaireHunter.js.map +1 -0
  226. package/lib/module/views/Minefield.js +826 -0
  227. package/lib/module/views/Minefield.js.map +1 -0
  228. package/lib/module/views/PaymentWebView.js +546 -0
  229. package/lib/module/views/PaymentWebView.js.map +1 -0
  230. package/lib/module/views/PlayerCard.js +184 -0
  231. package/lib/module/views/PlayerCard.js.map +1 -0
  232. package/lib/module/views/Profile.js +531 -0
  233. package/lib/module/views/Profile.js.map +1 -0
  234. package/lib/module/views/RaffleDraw.js +1242 -0
  235. package/lib/module/views/RaffleDraw.js.map +1 -0
  236. package/lib/module/views/RevealWin.js +1267 -0
  237. package/lib/module/views/RevealWin.js.map +1 -0
  238. package/lib/module/views/Splash.js +363 -0
  239. package/lib/module/views/Splash.js.map +1 -0
  240. package/lib/module/views/Success.js +363 -0
  241. package/lib/module/views/Success.js.map +1 -0
  242. package/lib/module/views/TicketShop.js +372 -0
  243. package/lib/module/views/TicketShop.js.map +1 -0
  244. package/lib/module/views/TriviaLobby.js +582 -0
  245. package/lib/module/views/TriviaLobby.js.map +1 -0
  246. package/lib/module/views/TriviaMaster.js +884 -0
  247. package/lib/module/views/TriviaMaster.js.map +1 -0
  248. package/lib/module/views/Wallet.js +622 -0
  249. package/lib/module/views/Wallet.js.map +1 -0
  250. package/lib/module/views/WithdrawFlow.js +445 -0
  251. package/lib/module/views/WithdrawFlow.js.map +1 -0
  252. package/lib/module/views/gridGeometry.js +26 -0
  253. package/lib/module/views/gridGeometry.js.map +1 -0
  254. package/lib/module/views/revealWinHelpers.js +29 -0
  255. package/lib/module/views/revealWinHelpers.js.map +1 -0
  256. package/lib/module/views/ticketBundlePresets.js +29 -0
  257. package/lib/module/views/ticketBundlePresets.js.map +1 -0
  258. package/lib/module/views/triviaHelpers.js +78 -0
  259. package/lib/module/views/triviaHelpers.js.map +1 -0
  260. package/lib/module/voiceClips.js +16 -0
  261. package/lib/module/voiceClips.js.map +1 -0
  262. package/lib/typescript/package.json +1 -0
  263. package/lib/typescript/src/HapticsManager.d.ts +28 -0
  264. package/lib/typescript/src/HapticsManager.d.ts.map +1 -0
  265. package/lib/typescript/src/HubContent.d.ts +7 -0
  266. package/lib/typescript/src/HubContent.d.ts.map +1 -0
  267. package/lib/typescript/src/Icons.d.ts +14 -0
  268. package/lib/typescript/src/Icons.d.ts.map +1 -0
  269. package/lib/typescript/src/MonflowtsHub.d.ts +5 -0
  270. package/lib/typescript/src/MonflowtsHub.d.ts.map +1 -0
  271. package/lib/typescript/src/NativeLottieView.d.ts +13 -0
  272. package/lib/typescript/src/NativeLottieView.d.ts.map +1 -0
  273. package/lib/typescript/src/NativeSvgView.d.ts +12 -0
  274. package/lib/typescript/src/NativeSvgView.d.ts.map +1 -0
  275. package/lib/typescript/src/NativeWebView.d.ts +22 -0
  276. package/lib/typescript/src/NativeWebView.d.ts.map +1 -0
  277. package/lib/typescript/src/NativeWheelView.d.ts +9 -0
  278. package/lib/typescript/src/NativeWheelView.d.ts.map +1 -0
  279. package/lib/typescript/src/SoundManager.d.ts +29 -0
  280. package/lib/typescript/src/SoundManager.d.ts.map +1 -0
  281. package/lib/typescript/src/SpeechManager.d.ts +10 -0
  282. package/lib/typescript/src/SpeechManager.d.ts.map +1 -0
  283. package/lib/typescript/src/api/client.d.ts +7 -0
  284. package/lib/typescript/src/api/client.d.ts.map +1 -0
  285. package/lib/typescript/src/api/gameTypes.d.ts +326 -0
  286. package/lib/typescript/src/api/gameTypes.d.ts.map +1 -0
  287. package/lib/typescript/src/api/http.d.ts +61 -0
  288. package/lib/typescript/src/api/http.d.ts.map +1 -0
  289. package/lib/typescript/src/api/mutations.d.ts +22 -0
  290. package/lib/typescript/src/api/mutations.d.ts.map +1 -0
  291. package/lib/typescript/src/api/playerTypes.d.ts +53 -0
  292. package/lib/typescript/src/api/playerTypes.d.ts.map +1 -0
  293. package/lib/typescript/src/api/queries.d.ts +21 -0
  294. package/lib/typescript/src/api/queries.d.ts.map +1 -0
  295. package/lib/typescript/src/api/sdkTypes.d.ts +87 -0
  296. package/lib/typescript/src/api/sdkTypes.d.ts.map +1 -0
  297. package/lib/typescript/src/assets/assetKeys.d.ts +3 -0
  298. package/lib/typescript/src/assets/assetKeys.d.ts.map +1 -0
  299. package/lib/typescript/src/assets/assetSync.d.ts +41 -0
  300. package/lib/typescript/src/assets/assetSync.d.ts.map +1 -0
  301. package/lib/typescript/src/assets/nativeAssets.d.ts +30 -0
  302. package/lib/typescript/src/assets/nativeAssets.d.ts.map +1 -0
  303. package/lib/typescript/src/assets/remote.d.ts +8 -0
  304. package/lib/typescript/src/assets/remote.d.ts.map +1 -0
  305. package/lib/typescript/src/components/AbandonPolicyNotice.d.ts +16 -0
  306. package/lib/typescript/src/components/AbandonPolicyNotice.d.ts.map +1 -0
  307. package/lib/typescript/src/components/AnimatedAmount.d.ts +12 -0
  308. package/lib/typescript/src/components/AnimatedAmount.d.ts.map +1 -0
  309. package/lib/typescript/src/components/CoinFlyOverlay.d.ts +17 -0
  310. package/lib/typescript/src/components/CoinFlyOverlay.d.ts.map +1 -0
  311. package/lib/typescript/src/components/GameCharacter.d.ts +14 -0
  312. package/lib/typescript/src/components/GameCharacter.d.ts.map +1 -0
  313. package/lib/typescript/src/components/GameRulesModal.d.ts +10 -0
  314. package/lib/typescript/src/components/GameRulesModal.d.ts.map +1 -0
  315. package/lib/typescript/src/components/HypeCallout.d.ts +11 -0
  316. package/lib/typescript/src/components/HypeCallout.d.ts.map +1 -0
  317. package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts +12 -0
  318. package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts.map +1 -0
  319. package/lib/typescript/src/components/JackpotNearMiss.d.ts +8 -0
  320. package/lib/typescript/src/components/JackpotNearMiss.d.ts.map +1 -0
  321. package/lib/typescript/src/components/JackpotTeaser.d.ts +13 -0
  322. package/lib/typescript/src/components/JackpotTeaser.d.ts.map +1 -0
  323. package/lib/typescript/src/components/MonflowtsButton.d.ts +21 -0
  324. package/lib/typescript/src/components/MonflowtsButton.d.ts.map +1 -0
  325. package/lib/typescript/src/components/MonflowtsChipGroup.d.ts +18 -0
  326. package/lib/typescript/src/components/MonflowtsChipGroup.d.ts.map +1 -0
  327. package/lib/typescript/src/components/MonflowtsPressable.d.ts +39 -0
  328. package/lib/typescript/src/components/MonflowtsPressable.d.ts.map +1 -0
  329. package/lib/typescript/src/components/QuitConfirmModal.d.ts +11 -0
  330. package/lib/typescript/src/components/QuitConfirmModal.d.ts.map +1 -0
  331. package/lib/typescript/src/components/SessionTimer.d.ts +14 -0
  332. package/lib/typescript/src/components/SessionTimer.d.ts.map +1 -0
  333. package/lib/typescript/src/components/SideDemoTab.d.ts +18 -0
  334. package/lib/typescript/src/components/SideDemoTab.d.ts.map +1 -0
  335. package/lib/typescript/src/components/StakeInput.d.ts +16 -0
  336. package/lib/typescript/src/components/StakeInput.d.ts.map +1 -0
  337. package/lib/typescript/src/constants.d.ts +21 -0
  338. package/lib/typescript/src/constants.d.ts.map +1 -0
  339. package/lib/typescript/src/content.d.ts +53 -0
  340. package/lib/typescript/src/content.d.ts.map +1 -0
  341. package/lib/typescript/src/effects/EffectBurst.d.ts +20 -0
  342. package/lib/typescript/src/effects/EffectBurst.d.ts.map +1 -0
  343. package/lib/typescript/src/effects/beaverStates.d.ts +4 -0
  344. package/lib/typescript/src/effects/beaverStates.d.ts.map +1 -0
  345. package/lib/typescript/src/effects/hypePhrases.d.ts +11 -0
  346. package/lib/typescript/src/effects/hypePhrases.d.ts.map +1 -0
  347. package/lib/typescript/src/effects/particleAnims.d.ts +9 -0
  348. package/lib/typescript/src/effects/particleAnims.d.ts.map +1 -0
  349. package/lib/typescript/src/hooks/useAvailableGames.d.ts +14 -0
  350. package/lib/typescript/src/hooks/useAvailableGames.d.ts.map +1 -0
  351. package/lib/typescript/src/hooks/useCrash.d.ts +13 -0
  352. package/lib/typescript/src/hooks/useCrash.d.ts.map +1 -0
  353. package/lib/typescript/src/hooks/useCrashFeed.d.ts +22 -0
  354. package/lib/typescript/src/hooks/useCrashFeed.d.ts.map +1 -0
  355. package/lib/typescript/src/hooks/useCurrency.d.ts +6 -0
  356. package/lib/typescript/src/hooks/useCurrency.d.ts.map +1 -0
  357. package/lib/typescript/src/hooks/useFairSeed.d.ts +8 -0
  358. package/lib/typescript/src/hooks/useFairSeed.d.ts.map +1 -0
  359. package/lib/typescript/src/hooks/useGameEvents.d.ts +50 -0
  360. package/lib/typescript/src/hooks/useGameEvents.d.ts.map +1 -0
  361. package/lib/typescript/src/hooks/useGameHistory.d.ts +14 -0
  362. package/lib/typescript/src/hooks/useGameHistory.d.ts.map +1 -0
  363. package/lib/typescript/src/hooks/useLeaderboard.d.ts +71 -0
  364. package/lib/typescript/src/hooks/useLeaderboard.d.ts.map +1 -0
  365. package/lib/typescript/src/hooks/useMines.d.ts +11 -0
  366. package/lib/typescript/src/hooks/useMines.d.ts.map +1 -0
  367. package/lib/typescript/src/hooks/useNotifications.d.ts +26 -0
  368. package/lib/typescript/src/hooks/useNotifications.d.ts.map +1 -0
  369. package/lib/typescript/src/hooks/usePlayGame.d.ts +62 -0
  370. package/lib/typescript/src/hooks/usePlayGame.d.ts.map +1 -0
  371. package/lib/typescript/src/hooks/usePlinko.d.ts +8 -0
  372. package/lib/typescript/src/hooks/usePlinko.d.ts.map +1 -0
  373. package/lib/typescript/src/hooks/useRaffleDrawState.d.ts +50 -0
  374. package/lib/typescript/src/hooks/useRaffleDrawState.d.ts.map +1 -0
  375. package/lib/typescript/src/hooks/useRefreshWallet.d.ts +8 -0
  376. package/lib/typescript/src/hooks/useRefreshWallet.d.ts.map +1 -0
  377. package/lib/typescript/src/hooks/useResponsive.d.ts +8 -0
  378. package/lib/typescript/src/hooks/useResponsive.d.ts.map +1 -0
  379. package/lib/typescript/src/hooks/useRevealWin.d.ts +10 -0
  380. package/lib/typescript/src/hooks/useRevealWin.d.ts.map +1 -0
  381. package/lib/typescript/src/hooks/useScreenShake.d.ts +14 -0
  382. package/lib/typescript/src/hooks/useScreenShake.d.ts.map +1 -0
  383. package/lib/typescript/src/hooks/useWallet.d.ts +23 -0
  384. package/lib/typescript/src/hooks/useWallet.d.ts.map +1 -0
  385. package/lib/typescript/src/i18n.d.ts +29 -0
  386. package/lib/typescript/src/i18n.d.ts.map +1 -0
  387. package/lib/typescript/src/index.d.ts +12 -0
  388. package/lib/typescript/src/index.d.ts.map +1 -0
  389. package/lib/typescript/src/lottieAnimations.d.ts +2 -0
  390. package/lib/typescript/src/lottieAnimations.d.ts.map +1 -0
  391. package/lib/typescript/src/stores/assetStore.d.ts +17 -0
  392. package/lib/typescript/src/stores/assetStore.d.ts.map +1 -0
  393. package/lib/typescript/src/stores/authStore.d.ts +25 -0
  394. package/lib/typescript/src/stores/authStore.d.ts.map +1 -0
  395. package/lib/typescript/src/stores/gameStore.d.ts +14 -0
  396. package/lib/typescript/src/stores/gameStore.d.ts.map +1 -0
  397. package/lib/typescript/src/stores/sdkInitStore.d.ts +38 -0
  398. package/lib/typescript/src/stores/sdkInitStore.d.ts.map +1 -0
  399. package/lib/typescript/src/stores/settingsStore.d.ts +23 -0
  400. package/lib/typescript/src/stores/settingsStore.d.ts.map +1 -0
  401. package/lib/typescript/src/theme.d.ts +149 -0
  402. package/lib/typescript/src/theme.d.ts.map +1 -0
  403. package/lib/typescript/src/types.d.ts +49 -0
  404. package/lib/typescript/src/types.d.ts.map +1 -0
  405. package/lib/typescript/src/utils/apolloError.d.ts +12 -0
  406. package/lib/typescript/src/utils/apolloError.d.ts.map +1 -0
  407. package/lib/typescript/src/utils/crashMultiplier.d.ts +2 -0
  408. package/lib/typescript/src/utils/crashMultiplier.d.ts.map +1 -0
  409. package/lib/typescript/src/utils/crashMultiplier.test.d.ts +2 -0
  410. package/lib/typescript/src/utils/crashMultiplier.test.d.ts.map +1 -0
  411. package/lib/typescript/src/utils/deviceAnalytics.d.ts +3 -0
  412. package/lib/typescript/src/utils/deviceAnalytics.d.ts.map +1 -0
  413. package/lib/typescript/src/utils/idempotency.d.ts +14 -0
  414. package/lib/typescript/src/utils/idempotency.d.ts.map +1 -0
  415. package/lib/typescript/src/utils/layout.d.ts +10 -0
  416. package/lib/typescript/src/utils/layout.d.ts.map +1 -0
  417. package/lib/typescript/src/utils/safeInlineScript.d.ts +5 -0
  418. package/lib/typescript/src/utils/safeInlineScript.d.ts.map +1 -0
  419. package/lib/typescript/src/utils/sseClient.d.ts +5 -0
  420. package/lib/typescript/src/utils/sseClient.d.ts.map +1 -0
  421. package/lib/typescript/src/views/DepositSelect.d.ts +9 -0
  422. package/lib/typescript/src/views/DepositSelect.d.ts.map +1 -0
  423. package/lib/typescript/src/views/Dice.d.ts +10 -0
  424. package/lib/typescript/src/views/Dice.d.ts.map +1 -0
  425. package/lib/typescript/src/views/DiceBattle.d.ts +15 -0
  426. package/lib/typescript/src/views/DiceBattle.d.ts.map +1 -0
  427. package/lib/typescript/src/views/DiceLobby.d.ts +12 -0
  428. package/lib/typescript/src/views/DiceLobby.d.ts.map +1 -0
  429. package/lib/typescript/src/views/FortuneWheel.d.ts +13 -0
  430. package/lib/typescript/src/views/FortuneWheel.d.ts.map +1 -0
  431. package/lib/typescript/src/views/Freefall.d.ts +13 -0
  432. package/lib/typescript/src/views/Freefall.d.ts.map +1 -0
  433. package/lib/typescript/src/views/History.d.ts +7 -0
  434. package/lib/typescript/src/views/History.d.ts.map +1 -0
  435. package/lib/typescript/src/views/Home.d.ts +13 -0
  436. package/lib/typescript/src/views/Home.d.ts.map +1 -0
  437. package/lib/typescript/src/views/Jetstream.d.ts +14 -0
  438. package/lib/typescript/src/views/Jetstream.d.ts.map +1 -0
  439. package/lib/typescript/src/views/Leaderboard.d.ts +8 -0
  440. package/lib/typescript/src/views/Leaderboard.d.ts.map +1 -0
  441. package/lib/typescript/src/views/MillionaireHunter.d.ts +13 -0
  442. package/lib/typescript/src/views/MillionaireHunter.d.ts.map +1 -0
  443. package/lib/typescript/src/views/Minefield.d.ts +13 -0
  444. package/lib/typescript/src/views/Minefield.d.ts.map +1 -0
  445. package/lib/typescript/src/views/PaymentWebView.d.ts +29 -0
  446. package/lib/typescript/src/views/PaymentWebView.d.ts.map +1 -0
  447. package/lib/typescript/src/views/PlayerCard.d.ts +15 -0
  448. package/lib/typescript/src/views/PlayerCard.d.ts.map +1 -0
  449. package/lib/typescript/src/views/Profile.d.ts +9 -0
  450. package/lib/typescript/src/views/Profile.d.ts.map +1 -0
  451. package/lib/typescript/src/views/RaffleDraw.d.ts +12 -0
  452. package/lib/typescript/src/views/RaffleDraw.d.ts.map +1 -0
  453. package/lib/typescript/src/views/RevealWin.d.ts +13 -0
  454. package/lib/typescript/src/views/RevealWin.d.ts.map +1 -0
  455. package/lib/typescript/src/views/Splash.d.ts +10 -0
  456. package/lib/typescript/src/views/Splash.d.ts.map +1 -0
  457. package/lib/typescript/src/views/Success.d.ts +12 -0
  458. package/lib/typescript/src/views/Success.d.ts.map +1 -0
  459. package/lib/typescript/src/views/TicketShop.d.ts +15 -0
  460. package/lib/typescript/src/views/TicketShop.d.ts.map +1 -0
  461. package/lib/typescript/src/views/TriviaLobby.d.ts +12 -0
  462. package/lib/typescript/src/views/TriviaLobby.d.ts.map +1 -0
  463. package/lib/typescript/src/views/TriviaMaster.d.ts +16 -0
  464. package/lib/typescript/src/views/TriviaMaster.d.ts.map +1 -0
  465. package/lib/typescript/src/views/Wallet.d.ts +10 -0
  466. package/lib/typescript/src/views/Wallet.d.ts.map +1 -0
  467. package/lib/typescript/src/views/WithdrawFlow.d.ts +9 -0
  468. package/lib/typescript/src/views/WithdrawFlow.d.ts.map +1 -0
  469. package/lib/typescript/src/views/gridGeometry.d.ts +19 -0
  470. package/lib/typescript/src/views/gridGeometry.d.ts.map +1 -0
  471. package/lib/typescript/src/views/revealWinHelpers.d.ts +15 -0
  472. package/lib/typescript/src/views/revealWinHelpers.d.ts.map +1 -0
  473. package/lib/typescript/src/views/ticketBundlePresets.d.ts +18 -0
  474. package/lib/typescript/src/views/ticketBundlePresets.d.ts.map +1 -0
  475. package/lib/typescript/src/views/triviaHelpers.d.ts +31 -0
  476. package/lib/typescript/src/views/triviaHelpers.d.ts.map +1 -0
  477. package/lib/typescript/src/voiceClips.d.ts +4 -0
  478. package/lib/typescript/src/voiceClips.d.ts.map +1 -0
  479. package/package.json +160 -4
@@ -0,0 +1,889 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useMemo, useRef, useState, useCallback } from 'react';
4
+ import { lottie } from "../assets/remote.js";
5
+ import { View, Text, StyleSheet, ScrollView, Animated, BackHandler } from 'react-native';
6
+ import { COLORS } from "../constants.js";
7
+ import { sounds } from "../SoundManager.js";
8
+ import { haptics } from "../HapticsManager.js";
9
+ import QuitConfirmModal from "../components/QuitConfirmModal.js";
10
+ import MonflowtsButton from "../components/MonflowtsButton.js";
11
+ import MonflowtsPressable from "../components/MonflowtsPressable.js";
12
+ import SideDemoTab from "../components/SideDemoTab.js";
13
+ import AnimatedAmount from "../components/AnimatedAmount.js";
14
+ import CoinFlyOverlay from "../components/CoinFlyOverlay.js";
15
+ import MonflowtsSvgView from "../NativeSvgView.js";
16
+ import MonflowtsLottieView from "../NativeLottieView.js";
17
+ import { BurstLayer } from "../effects/EffectBurst.js";
18
+ import { coinBurstAnim } from "../effects/particleAnims.js";
19
+ import HypeCallout from "../components/HypeCallout.js";
20
+ import { HYPE_PHRASES, pickPhrase } from "../effects/hypePhrases.js";
21
+ import { openSse } from "../utils/sseClient.js";
22
+ import { useScreenShake } from "../hooks/useScreenShake.js";
23
+ import { useCrash } from "../hooks/useCrash.js";
24
+ import { useCrashFeed } from "../hooks/useCrashFeed.js";
25
+ import { useCurrency } from "../hooks/useCurrency.js";
26
+ import { useGameStore } from "../stores/gameStore.js";
27
+ import { animationContent, gameRules } from "../content.js";
28
+ import { t, formatNumber } from "../i18n.js";
29
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
+ const STAGE_HEIGHT = 240;
31
+ const CURVE_PAD = 18;
32
+ const CURVE_X_SECONDS = 8;
33
+ const JET_SIZE = 56;
34
+ const JET_W = 96;
35
+ const JET_H = 50;
36
+ function curveNorm(m) {
37
+ return Math.min(1, Math.log(Math.max(1, m)) / Math.log(20));
38
+ }
39
+ function originOf(url) {
40
+ if (!url) return undefined;
41
+ const m = url.match(/^https?:\/\/[^/]+/);
42
+ return m ? m[0] : undefined;
43
+ }
44
+ const Jetstream = ({
45
+ onBack,
46
+ onWin,
47
+ onLose,
48
+ balance,
49
+ game,
50
+ serverUrl
51
+ }) => {
52
+ const currency = useCurrency();
53
+ const {
54
+ bet,
55
+ cashout,
56
+ checkRound,
57
+ multiplierAt,
58
+ isBusy,
59
+ errorRef
60
+ } = useCrash();
61
+ const feed = useCrashFeed({
62
+ serverUrl: originOf(serverUrl),
63
+ maxItems: 8
64
+ });
65
+ const demoMode = useGameStore(s => s.demoMode);
66
+ const demoBalance = useGameStore(s => s.demoBalance);
67
+ const displayBalance = demoMode ? demoBalance : balance;
68
+ const {
69
+ shake,
70
+ shakeStyle
71
+ } = useScreenShake();
72
+ const rules = game?.gameplayRules ?? {};
73
+ const fallbackRules = gameRules('CRASH');
74
+ const stakeOptionsKobo = rules.stakeOptions ?? fallbackRules.stakeOptions ?? [];
75
+ const stakeOptions = useMemo(() => stakeOptionsKobo.map(s => Math.max(1, Math.round(s / 100))), [stakeOptionsKobo]);
76
+ const maxMult = rules.maxMultiplier ?? fallbackRules.maxMultiplier ?? Infinity;
77
+ const [stake, setStake] = useState(stakeOptions[Math.floor(stakeOptions.length / 2)] ?? 100);
78
+ const [lastResults, setLastResults] = useState([]);
79
+ const [round, setRound] = useState(null);
80
+ const [displayMult, setDisplayMult] = useState(1);
81
+ const [bursts, setBursts] = useState([]);
82
+ const [stageW, setStageW] = useState(0);
83
+ const [flight, setFlight] = useState(null);
84
+ const [flightPath, setFlightPath] = useState('');
85
+ const burstId = useRef(0);
86
+ const coinFlyRef = useRef(null);
87
+ const hypeRef = useRef(null);
88
+ const boostHypedRef = useRef(false);
89
+ const balancePillRef = useRef(null);
90
+ const roundRef = useRef(null);
91
+ const timerRef = useRef(null);
92
+ const cashingRef = useRef(false);
93
+ const lastHumRef = useRef(0);
94
+ const sseRef = useRef(null);
95
+ const pollAtRef = useRef(0);
96
+ const pollBusyRef = useRef(false);
97
+ const pointsRef = useRef([]);
98
+ const stageWRef = useRef(0);
99
+ const resultScale = useRef(new Animated.Value(1)).current;
100
+ const running = round?.status === 'RUNNING';
101
+ const [quitVisible, setQuitVisible] = useState(false);
102
+ const handleBack = useCallback(() => {
103
+ if (!running) {
104
+ onBack();
105
+ return;
106
+ }
107
+ setQuitVisible(true);
108
+ }, [running, onBack]);
109
+ useEffect(() => {
110
+ const sub = BackHandler.addEventListener('hardwareBackPress', () => {
111
+ handleBack();
112
+ return true;
113
+ });
114
+ return () => sub.remove();
115
+ }, [handleBack]);
116
+ const boost = running && displayMult >= 3;
117
+ const jetState = round?.status === 'BUSTED' ? 'exploding' : round?.status === 'WON' ? 'winning' : 'flying';
118
+ const jetLottieKey = animationContent().jet?.[jetState];
119
+ const spawnBurst = useCallback((make, x, y, size = 200) => {
120
+ const id = ++burstId.current;
121
+ setBursts(prev => [...prev, {
122
+ id,
123
+ make,
124
+ x,
125
+ y,
126
+ size
127
+ }]);
128
+ }, []);
129
+ const removeBurst = useCallback(id => {
130
+ setBursts(prev => prev.filter(b => b.id !== id));
131
+ }, []);
132
+ const stopLoop = useCallback(() => {
133
+ sseRef.current?.close();
134
+ sseRef.current = null;
135
+ if (timerRef.current) {
136
+ clearInterval(timerRef.current);
137
+ timerRef.current = null;
138
+ }
139
+ }, []);
140
+ const settle = useCallback(async claimed => {
141
+ const active = roundRef.current;
142
+ if (!active || active.status !== 'RUNNING' || cashingRef.current) return;
143
+ cashingRef.current = true;
144
+ stopLoop();
145
+ const r = await cashout(active.gamePlayId, claimed);
146
+ cashingRef.current = false;
147
+ if (!r) return;
148
+ roundRef.current = r;
149
+ setRound(r);
150
+ setLastResults(prev => [r.bustMultiplier ?? r.multiplier ?? 1, ...prev].slice(0, 6));
151
+ Animated.sequence([Animated.timing(resultScale, {
152
+ toValue: 0.85,
153
+ duration: 80,
154
+ useNativeDriver: true
155
+ }), Animated.spring(resultScale, {
156
+ toValue: 1,
157
+ friction: 4,
158
+ useNativeDriver: true
159
+ })]).start();
160
+ if (r.status === 'WON' && r.amountWonKobo > 0) {
161
+ spawnBurst(coinBurstAnim, 0, 0, 280);
162
+ shake(0.8);
163
+ sounds.playWinChime();
164
+ haptics.success();
165
+ coinFlyRef.current?.measureTarget();
166
+ coinFlyRef.current?.fly(200, 430);
167
+ const wonMult = r.multiplier ?? 1;
168
+ hypeRef.current?.show(pickPhrase(wonMult >= 10 ? HYPE_PHRASES.crash.bigWin : HYPE_PHRASES.crash.win), wonMult >= 10 ? 'boost' : 'win');
169
+ if (wonMult >= 10) sounds.playBigWin();
170
+ onWin(Math.round(r.amountWonKobo / 100));
171
+ } else {
172
+ shake(1);
173
+ sounds.playPoof();
174
+ haptics.warning();
175
+ hypeRef.current?.show(pickPhrase(HYPE_PHRASES.crash.loss), 'loss');
176
+ setTimeout(() => sounds.playNearMiss(), 450);
177
+ onLose?.();
178
+ }
179
+ }, [cashout, stopLoop, onWin, onLose, spawnBurst, shake, resultScale]);
180
+ const isLiveRound = gamePlayId => roundRef.current?.status === 'RUNNING' && roundRef.current.gamePlayId === gamePlayId;
181
+ const applyBust = useCallback(r => {
182
+ stopLoop();
183
+ roundRef.current = r;
184
+ setRound(r);
185
+ setLastResults(prev => [r.bustMultiplier ?? 1, ...prev].slice(0, 6));
186
+ shake(1);
187
+ sounds.playPoof();
188
+ haptics.warning();
189
+ hypeRef.current?.show(pickPhrase(HYPE_PHRASES.crash.loss), 'loss');
190
+ setTimeout(() => sounds.playNearMiss(), 450);
191
+ onLose?.();
192
+ }, [stopLoop, shake, onLose]);
193
+ const onBet = useCallback(async () => {
194
+ if (isBusy || running) return;
195
+ sounds.playWhoosh();
196
+ haptics.selection();
197
+ const r = await bet(stake * 100);
198
+ if (!r) return;
199
+ roundRef.current = r;
200
+ cashingRef.current = false;
201
+ boostHypedRef.current = false;
202
+ setRound(r);
203
+ setDisplayMult(1);
204
+ pointsRef.current = [];
205
+ setFlightPath('');
206
+ setFlight(null);
207
+ stopLoop();
208
+ const origin = originOf(serverUrl);
209
+ if (origin) {
210
+ sseRef.current = openSse(`${origin}/service/crash/round/stream?gamePlayId=${r.gamePlayId}`, (event, data) => {
211
+ if (event !== 'crash.settled') return;
212
+ try {
213
+ const v = JSON.parse(data);
214
+ if (v.status === 'BUSTED' && !cashingRef.current && isLiveRound(v.gamePlayId)) {
215
+ applyBust(v);
216
+ }
217
+ } catch {}
218
+ });
219
+ }
220
+ const startedAt = Date.now();
221
+ timerRef.current = setInterval(() => {
222
+ const active = roundRef.current;
223
+ if (!active || active.status !== 'RUNNING') return;
224
+ const now = Date.now();
225
+ if (now - pollAtRef.current >= 1500 && !pollBusyRef.current && !cashingRef.current) {
226
+ pollAtRef.current = now;
227
+ pollBusyRef.current = true;
228
+ checkRound(active.gamePlayId).then(res => {
229
+ if (res?.status === 'BUSTED' && !cashingRef.current && isLiveRound(res.gamePlayId)) {
230
+ applyBust(res);
231
+ }
232
+ }).finally(() => {
233
+ pollBusyRef.current = false;
234
+ });
235
+ }
236
+ const m = Math.min(multiplierAt(active.startAtMs, active.growthRatePerSecond, now), maxMult);
237
+ setDisplayMult(m);
238
+ if (m >= 3 && !boostHypedRef.current) {
239
+ boostHypedRef.current = true;
240
+ hypeRef.current?.show(pickPhrase(HYPE_PHRASES.crash.streak), 'boost');
241
+ sounds.playEncourage();
242
+ }
243
+ const norm = curveNorm(m);
244
+ const w = stageWRef.current;
245
+ if (w > 0) {
246
+ const usableW = w - CURVE_PAD * 2 - JET_SIZE * 0.6;
247
+ const usableH = STAGE_HEIGHT - CURVE_PAD * 2 - JET_SIZE * 0.5;
248
+ const tx = Math.min(1, (now - startedAt) / (CURVE_X_SECONDS * 1000));
249
+ const x = CURVE_PAD + tx * usableW;
250
+ const y = STAGE_HEIGHT - CURVE_PAD - norm * usableH;
251
+ const pts = pointsRef.current;
252
+ const last = pts[pts.length - 1];
253
+ if (!last || Math.abs(x - last.x) > 2 || Math.abs(y - last.y) > 1.5) {
254
+ pts.push({
255
+ x,
256
+ y
257
+ });
258
+ if (pts.length > 240) pts.splice(0, pts.length - 240);
259
+ setFlightPath(pts.map((p, i) => `${i === 0 ? 'M' : 'L'} ${p.x.toFixed(1)} ${p.y.toFixed(1)}`).join(' '));
260
+ }
261
+ setFlight({
262
+ x,
263
+ y
264
+ });
265
+ }
266
+ if (now - lastHumRef.current > 340) {
267
+ lastHumRef.current = now;
268
+ sounds.playEngineHum(norm);
269
+ }
270
+ if (m >= maxMult) {
271
+ void settle(maxMult);
272
+ }
273
+ }, 60);
274
+ }, [isBusy, running, bet, stake, multiplierAt, maxMult, stopLoop, settle, checkRound, applyBust, serverUrl]);
275
+ const onCashout = useCallback(() => {
276
+ void settle(displayMult);
277
+ }, [settle, displayMult]);
278
+ const reset = useCallback(() => {
279
+ stopLoop();
280
+ roundRef.current = null;
281
+ setRound(null);
282
+ setDisplayMult(1);
283
+ pointsRef.current = [];
284
+ setFlightPath('');
285
+ setFlight(null);
286
+ }, [stopLoop]);
287
+ useEffect(() => stopLoop, [stopLoop]);
288
+ useEffect(() => {
289
+ sounds.playGameTheme('crash');
290
+ }, []);
291
+ const shownMult = running ? displayMult : round ? round.multiplier || round.bustMultiplier || displayMult : displayMult;
292
+ const curveStroke = round?.status === 'BUSTED' ? COLORS.lossRed : boost ? COLORS.gold : COLORS.blue;
293
+ const curveFill = round?.status === 'BUSTED' ? 'rgba(239,68,68,0.14)' : boost ? 'rgba(255,215,0,0.13)' : 'rgba(0,242,255,0.10)';
294
+ const fillPath = flightPath && flight ? `${flightPath} L ${flight.x.toFixed(1)} ${STAGE_HEIGHT - CURVE_PAD} L ${CURVE_PAD} ${STAGE_HEIGHT - CURVE_PAD} Z` : '';
295
+ return /*#__PURE__*/_jsxs(View, {
296
+ style: styles.container,
297
+ children: [/*#__PURE__*/_jsxs(View, {
298
+ style: styles.header,
299
+ children: [/*#__PURE__*/_jsx(QuitConfirmModal, {
300
+ visible: quitVisible,
301
+ message: t('crash.quit.message'),
302
+ onKeepPlaying: () => setQuitVisible(false),
303
+ onQuit: () => {
304
+ setQuitVisible(false);
305
+ onBack();
306
+ }
307
+ }), /*#__PURE__*/_jsx(MonflowtsPressable, {
308
+ style: styles.circleBtn,
309
+ onPress: handleBack,
310
+ children: /*#__PURE__*/_jsx(Text, {
311
+ style: styles.circleBtnText,
312
+ children: '‹'
313
+ })
314
+ }), /*#__PURE__*/_jsxs(View, {
315
+ style: styles.titleWrap,
316
+ children: [/*#__PURE__*/_jsx(Text, {
317
+ style: styles.title,
318
+ children: t('crash.title')
319
+ }), /*#__PURE__*/_jsx(Text, {
320
+ style: [styles.modeBadge, demoMode ? styles.modeDemo : styles.modeLive],
321
+ children: demoMode ? t('crash.mode.demo') : t('crash.mode.live')
322
+ })]
323
+ }), /*#__PURE__*/_jsx(View, {
324
+ ref: balancePillRef,
325
+ onLayout: () => coinFlyRef.current?.measureTarget(),
326
+ style: styles.balancePill,
327
+ children: /*#__PURE__*/_jsx(AnimatedAmount, {
328
+ value: displayBalance,
329
+ prefix: `${currency} `,
330
+ style: styles.balanceText
331
+ })
332
+ })]
333
+ }), !round && /*#__PURE__*/_jsx(SideDemoTab, {
334
+ enabled: !!game?.demoConfig?.enabled
335
+ }), /*#__PURE__*/_jsxs(ScrollView, {
336
+ contentContainerStyle: styles.scroll,
337
+ children: [lastResults.length > 0 && /*#__PURE__*/_jsx(ScrollView, {
338
+ horizontal: true,
339
+ showsHorizontalScrollIndicator: false,
340
+ style: styles.histScroll,
341
+ contentContainerStyle: styles.histRow,
342
+ children: lastResults.map((m, i) => /*#__PURE__*/_jsx(View, {
343
+ style: [styles.histChip, m >= 10 && styles.histChipGold, m >= 2 && m < 10 && styles.histChipGreen],
344
+ children: /*#__PURE__*/_jsx(Text, {
345
+ style: [styles.histText, m >= 10 && styles.histTextGold, m >= 2 && m < 10 && styles.histTextGreen],
346
+ children: m >= 10 ? `${Math.round(m * 10) / 10}x` : `${m}x`
347
+ })
348
+ }, i))
349
+ }), /*#__PURE__*/_jsx(Animated.View, {
350
+ style: [styles.stageWrap, shakeStyle],
351
+ children: /*#__PURE__*/_jsxs(Animated.View, {
352
+ onLayout: e => {
353
+ stageWRef.current = e.nativeEvent.layout.width;
354
+ setStageW(e.nativeEvent.layout.width);
355
+ },
356
+ style: [styles.multStage, round?.status === 'WON' && styles.stageWin, round?.status === 'BUSTED' && styles.stageBust],
357
+ children: [[0.24, 0.48, 0.72].map(f => /*#__PURE__*/_jsx(View, {
358
+ style: [styles.gridLine, {
359
+ top: STAGE_HEIGHT * f
360
+ }]
361
+ }, f)), stageW > 0 && fillPath !== '' && /*#__PURE__*/_jsx(MonflowtsSvgView, {
362
+ d: fillPath,
363
+ fill: curveFill,
364
+ svgViewBox: `0 0 ${stageW} ${STAGE_HEIGHT}`,
365
+ style: styles.curveLayer
366
+ }), stageW > 0 && flightPath !== '' && /*#__PURE__*/_jsx(MonflowtsSvgView, {
367
+ d: flightPath,
368
+ fill: "transparent",
369
+ stroke: curveStroke,
370
+ strokeWidth: 3,
371
+ svgViewBox: `0 0 ${stageW} ${STAGE_HEIGHT}`,
372
+ style: styles.curveLayer
373
+ }), /*#__PURE__*/_jsx(View, {
374
+ pointerEvents: "none",
375
+ style: [styles.jetTip, flight ? {
376
+ left: flight.x - JET_W * 0.42,
377
+ top: flight.y - JET_H * 0.6
378
+ } : {
379
+ left: CURVE_PAD,
380
+ top: STAGE_HEIGHT - CURVE_PAD - JET_H * 0.8
381
+ }],
382
+ children: /*#__PURE__*/_jsx(MonflowtsLottieView, {
383
+ sourceJson: jetLottieKey ? lottie(jetLottieKey) : '',
384
+ autoPlay: true,
385
+ loop: jetState === 'flying',
386
+ style: {
387
+ width: JET_W,
388
+ height: JET_H
389
+ }
390
+ }, jetState)
391
+ }), /*#__PURE__*/_jsxs(Animated.View, {
392
+ style: [styles.readout, {
393
+ transform: [{
394
+ scale: resultScale
395
+ }]
396
+ }],
397
+ children: [/*#__PURE__*/_jsxs(Text, {
398
+ style: [styles.multText, boost && styles.multTextBoost, round?.status === 'WON' && {
399
+ color: COLORS.winGreen
400
+ }, round?.status === 'BUSTED' && {
401
+ color: COLORS.lossRed
402
+ }],
403
+ children: [shownMult.toFixed(2), "x"]
404
+ }), round?.status === 'WON' && /*#__PURE__*/_jsx(AnimatedAmount, {
405
+ value: Math.round(round.amountWonKobo / 100),
406
+ prefix: `+${currency} `,
407
+ style: styles.stageAmount
408
+ }), round?.status === 'BUSTED' && /*#__PURE__*/_jsx(Text, {
409
+ style: styles.stageBustLabel,
410
+ children: t('crash.flewAway', {
411
+ multiplier: round.bustMultiplier ?? ''
412
+ })
413
+ }), running && /*#__PURE__*/_jsxs(Text, {
414
+ style: styles.stageHint,
415
+ children: [t('crash.yourBet', {
416
+ amount: formatNumber(stake)
417
+ }), " ", /*#__PURE__*/_jsx(Text, {
418
+ style: styles.stagePayout,
419
+ children: formatNumber(Math.round(stake * displayMult))
420
+ })]
421
+ }), round && round.status !== 'RUNNING' && /*#__PURE__*/_jsx(Text, {
422
+ style: styles.fairText,
423
+ children: t('crash.fair', {
424
+ hash: round.serverSeedHash.slice(0, 16),
425
+ nonce: round.nonce
426
+ })
427
+ })]
428
+ }), /*#__PURE__*/_jsx(View, {
429
+ pointerEvents: "none",
430
+ style: styles.stageBurstAnchor,
431
+ children: /*#__PURE__*/_jsx(BurstLayer, {
432
+ bursts: bursts,
433
+ onDone: removeBurst
434
+ })
435
+ }), /*#__PURE__*/_jsx(HypeCallout, {
436
+ ref: hypeRef,
437
+ style: styles.hype
438
+ })]
439
+ })
440
+ }), feed.events.length > 0 && /*#__PURE__*/_jsxs(View, {
441
+ style: styles.feed,
442
+ children: [/*#__PURE__*/_jsx(View, {
443
+ style: styles.feedHeader,
444
+ children: /*#__PURE__*/_jsx(Text, {
445
+ style: styles.feedTitle,
446
+ children: t('crash.liveCashouts')
447
+ })
448
+ }), feed.events.slice(0, 4).map((e, i) => /*#__PURE__*/_jsxs(View, {
449
+ style: styles.feedRow,
450
+ children: [/*#__PURE__*/_jsx(Text, {
451
+ style: styles.feedName,
452
+ children: e.displayName
453
+ }), /*#__PURE__*/_jsxs(Text, {
454
+ style: [styles.feedMult, {
455
+ color: e.multiplier >= 2 ? COLORS.winGreen : COLORS.slateLight
456
+ }],
457
+ children: [e.multiplier.toFixed(2), "x"]
458
+ }), /*#__PURE__*/_jsxs(Text, {
459
+ style: styles.feedAmount,
460
+ children: ["+", formatNumber(Math.round(e.amountWonKobo / 100))]
461
+ })]
462
+ }, i))]
463
+ }), /*#__PURE__*/_jsxs(View, {
464
+ style: styles.betCard,
465
+ children: [/*#__PURE__*/_jsxs(View, {
466
+ children: [/*#__PURE__*/_jsx(Text, {
467
+ style: styles.betLabel,
468
+ children: t('crash.bet')
469
+ }), /*#__PURE__*/_jsxs(View, {
470
+ style: styles.stepperRow,
471
+ children: [/*#__PURE__*/_jsx(MonflowtsPressable, {
472
+ style: styles.stepBtn,
473
+ disabled: running,
474
+ onPress: () => {
475
+ const i = stakeOptions.indexOf(stake);
476
+ if (i > 0) setStake(stakeOptions[i - 1]);
477
+ haptics.selection();
478
+ },
479
+ children: /*#__PURE__*/_jsx(Text, {
480
+ style: styles.stepBtnText,
481
+ children: "\u2212"
482
+ })
483
+ }), /*#__PURE__*/_jsx(Text, {
484
+ style: styles.betValue,
485
+ children: formatNumber(stake)
486
+ }), /*#__PURE__*/_jsx(MonflowtsPressable, {
487
+ style: styles.stepBtn,
488
+ disabled: running,
489
+ onPress: () => {
490
+ const i = stakeOptions.indexOf(stake);
491
+ if (i >= 0 && i < stakeOptions.length - 1) setStake(stakeOptions[i + 1]);
492
+ haptics.selection();
493
+ },
494
+ children: /*#__PURE__*/_jsx(Text, {
495
+ style: styles.stepBtnText,
496
+ children: "+"
497
+ })
498
+ })]
499
+ })]
500
+ }), /*#__PURE__*/_jsxs(View, {
501
+ style: styles.betRight,
502
+ children: [/*#__PURE__*/_jsx(Text, {
503
+ style: styles.betLabel,
504
+ children: t('crash.maxWin')
505
+ }), /*#__PURE__*/_jsx(Text, {
506
+ style: styles.maxWinText,
507
+ children: formatNumber(Math.floor(stake * maxMult))
508
+ })]
509
+ })]
510
+ }), errorRef.current && !running && /*#__PURE__*/_jsx(Text, {
511
+ style: styles.error,
512
+ children: errorRef.current
513
+ })]
514
+ }), /*#__PURE__*/_jsx(CoinFlyOverlay, {
515
+ ref: coinFlyRef,
516
+ targetRef: balancePillRef
517
+ }), /*#__PURE__*/_jsxs(View, {
518
+ style: styles.footer,
519
+ children: [!round && /*#__PURE__*/_jsx(MonflowtsButton, {
520
+ title: t('crash.placeBet', {
521
+ currency,
522
+ amount: stake
523
+ }),
524
+ onPress: onBet,
525
+ pulse: true,
526
+ loading: isBusy,
527
+ disabled: isBusy || stake > displayBalance,
528
+ variant: "shine"
529
+ }), running && /*#__PURE__*/_jsx(MonflowtsPressable, {
530
+ style: styles.cashoutBtn,
531
+ onPress: onCashout,
532
+ children: /*#__PURE__*/_jsx(Text, {
533
+ style: styles.cashoutText,
534
+ children: t('crash.cashOut', {
535
+ amount: formatNumber(Math.round(stake * displayMult))
536
+ })
537
+ })
538
+ }), round && round.status !== 'RUNNING' && /*#__PURE__*/_jsx(MonflowtsButton, {
539
+ title: t('crash.playAgain'),
540
+ onPress: reset
541
+ })]
542
+ })]
543
+ });
544
+ };
545
+ const styles = StyleSheet.create({
546
+ container: {
547
+ flex: 1,
548
+ backgroundColor: COLORS.backgroundDark
549
+ },
550
+ header: {
551
+ flexDirection: 'row',
552
+ alignItems: 'center',
553
+ justifyContent: 'space-between',
554
+ paddingHorizontal: 16,
555
+ paddingTop: 52,
556
+ paddingBottom: 12
557
+ },
558
+ circleBtn: {
559
+ width: 40,
560
+ height: 40,
561
+ borderRadius: 20,
562
+ backgroundColor: COLORS.white10,
563
+ alignItems: 'center',
564
+ justifyContent: 'center'
565
+ },
566
+ circleBtnText: {
567
+ color: '#fff',
568
+ fontSize: 24,
569
+ marginTop: -2
570
+ },
571
+ titleWrap: {
572
+ flexDirection: 'row',
573
+ alignItems: 'center',
574
+ gap: 8
575
+ },
576
+ title: {
577
+ color: '#fff',
578
+ fontSize: 20,
579
+ fontWeight: '800'
580
+ },
581
+ modeBadge: {
582
+ fontSize: 10,
583
+ fontWeight: '800',
584
+ paddingHorizontal: 6,
585
+ paddingVertical: 2,
586
+ borderRadius: 6,
587
+ overflow: 'hidden'
588
+ },
589
+ modeDemo: {
590
+ backgroundColor: COLORS.gold,
591
+ color: '#000'
592
+ },
593
+ modeLive: {
594
+ backgroundColor: COLORS.winGreen,
595
+ color: '#fff'
596
+ },
597
+ balancePill: {
598
+ backgroundColor: COLORS.white10,
599
+ paddingHorizontal: 12,
600
+ paddingVertical: 6,
601
+ borderRadius: 16
602
+ },
603
+ balanceText: {
604
+ color: COLORS.gold,
605
+ fontWeight: '700',
606
+ fontSize: 13
607
+ },
608
+ scroll: {
609
+ alignItems: 'center',
610
+ paddingBottom: 24
611
+ },
612
+ stageWrap: {
613
+ width: '90%'
614
+ },
615
+ multStage: {
616
+ width: '100%',
617
+ height: STAGE_HEIGHT,
618
+ borderRadius: 22,
619
+ alignItems: 'center',
620
+ justifyContent: 'center',
621
+ marginTop: 6,
622
+ borderWidth: 1,
623
+ borderColor: COLORS.white05,
624
+ overflow: 'hidden',
625
+ backgroundColor: '#0d1220'
626
+ },
627
+ gridLine: {
628
+ position: 'absolute',
629
+ left: 14,
630
+ right: 14,
631
+ height: 1,
632
+ backgroundColor: 'rgba(148,163,184,0.10)'
633
+ },
634
+ histScroll: {
635
+ maxHeight: 40,
636
+ marginTop: 2
637
+ },
638
+ histRow: {
639
+ flexDirection: 'row',
640
+ gap: 8,
641
+ paddingHorizontal: 20,
642
+ alignItems: 'center'
643
+ },
644
+ histChip: {
645
+ paddingHorizontal: 12,
646
+ paddingVertical: 6,
647
+ borderRadius: 12,
648
+ backgroundColor: COLORS.cardDark
649
+ },
650
+ histChipGreen: {
651
+ backgroundColor: 'rgba(34,197,94,0.14)'
652
+ },
653
+ histChipGold: {
654
+ backgroundColor: 'rgba(255,215,0,0.16)'
655
+ },
656
+ histText: {
657
+ color: COLORS.slateLight,
658
+ fontSize: 12,
659
+ fontWeight: '800'
660
+ },
661
+ histTextGreen: {
662
+ color: COLORS.winGreen
663
+ },
664
+ histTextGold: {
665
+ color: COLORS.gold
666
+ },
667
+ stagePayout: {
668
+ color: COLORS.winGreen,
669
+ fontWeight: '800'
670
+ },
671
+ feedHeader: {
672
+ flexDirection: 'row',
673
+ justifyContent: 'space-between',
674
+ alignItems: 'center',
675
+ marginBottom: 8
676
+ },
677
+ betCard: {
678
+ flexDirection: 'row',
679
+ alignItems: 'center',
680
+ justifyContent: 'space-between',
681
+ alignSelf: 'center',
682
+ width: '90%',
683
+ marginTop: 16,
684
+ paddingVertical: 14,
685
+ paddingHorizontal: 18,
686
+ borderRadius: 18,
687
+ backgroundColor: COLORS.cardDark,
688
+ borderWidth: 1,
689
+ borderColor: COLORS.white05
690
+ },
691
+ betLabel: {
692
+ color: COLORS.slateLight,
693
+ fontSize: 11,
694
+ fontWeight: '700',
695
+ textTransform: 'uppercase',
696
+ letterSpacing: 0.5
697
+ },
698
+ stepperRow: {
699
+ flexDirection: 'row',
700
+ alignItems: 'center',
701
+ gap: 12,
702
+ marginTop: 8
703
+ },
704
+ stepBtn: {
705
+ width: 36,
706
+ height: 36,
707
+ borderRadius: 11,
708
+ backgroundColor: COLORS.white10,
709
+ alignItems: 'center',
710
+ justifyContent: 'center'
711
+ },
712
+ stepBtnText: {
713
+ color: '#fff',
714
+ fontSize: 20,
715
+ fontWeight: '800',
716
+ marginTop: -2
717
+ },
718
+ betValue: {
719
+ color: COLORS.gold,
720
+ fontSize: 20,
721
+ fontWeight: '900',
722
+ minWidth: 64,
723
+ textAlign: 'center'
724
+ },
725
+ betRight: {
726
+ alignItems: 'flex-end'
727
+ },
728
+ maxWinText: {
729
+ color: COLORS.winGreen,
730
+ fontSize: 20,
731
+ fontWeight: '900',
732
+ marginTop: 8
733
+ },
734
+ cashoutBtn: {
735
+ backgroundColor: '#3FA26A',
736
+ borderRadius: 26,
737
+ paddingVertical: 17,
738
+ alignItems: 'center'
739
+ },
740
+ cashoutText: {
741
+ color: '#fff',
742
+ fontSize: 19,
743
+ fontWeight: '800'
744
+ },
745
+ stageWin: {
746
+ borderColor: COLORS.winGreen
747
+ },
748
+ stageBust: {
749
+ borderColor: COLORS.lossRed
750
+ },
751
+ cloudTrack: {
752
+ position: 'absolute',
753
+ left: 0,
754
+ flexDirection: 'row',
755
+ width: 1600
756
+ },
757
+ cloud: {
758
+ borderRadius: 60,
759
+ backgroundColor: '#ffffff'
760
+ },
761
+ speedLine: {
762
+ position: 'absolute',
763
+ height: 2,
764
+ borderRadius: 1,
765
+ backgroundColor: 'rgba(0,242,255,0.45)'
766
+ },
767
+ curveLayer: {
768
+ ...StyleSheet.absoluteFill
769
+ },
770
+ jetTip: {
771
+ position: 'absolute',
772
+ width: JET_W,
773
+ height: JET_H,
774
+ zIndex: 5,
775
+ elevation: 5
776
+ },
777
+ hype: {
778
+ top: 92
779
+ },
780
+ readout: {
781
+ position: 'absolute',
782
+ top: 14,
783
+ left: 0,
784
+ right: 0,
785
+ alignItems: 'center'
786
+ },
787
+ multText: {
788
+ color: COLORS.blue,
789
+ fontSize: 44,
790
+ fontWeight: '900'
791
+ },
792
+ multTextBoost: {
793
+ color: COLORS.gold
794
+ },
795
+ stageAmount: {
796
+ color: COLORS.gold,
797
+ fontSize: 18,
798
+ fontWeight: '800',
799
+ marginTop: 4
800
+ },
801
+ stageBustLabel: {
802
+ color: COLORS.lossRed,
803
+ fontSize: 15,
804
+ fontWeight: '700',
805
+ marginTop: 4
806
+ },
807
+ stageHint: {
808
+ color: 'rgba(255,255,255,0.55)',
809
+ fontSize: 12,
810
+ marginTop: 6
811
+ },
812
+ fairText: {
813
+ color: COLORS.slateLight,
814
+ fontSize: 10,
815
+ marginTop: 8
816
+ },
817
+ stageBurstAnchor: {
818
+ position: 'absolute',
819
+ left: '50%',
820
+ top: '50%'
821
+ },
822
+ feed: {
823
+ width: '90%',
824
+ backgroundColor: COLORS.cardDark,
825
+ borderRadius: 16,
826
+ padding: 12,
827
+ marginTop: 16,
828
+ borderWidth: 1,
829
+ borderColor: COLORS.white05
830
+ },
831
+ feedTitle: {
832
+ color: COLORS.slateLight,
833
+ fontSize: 11,
834
+ fontWeight: '700',
835
+ textTransform: 'uppercase',
836
+ marginBottom: 8
837
+ },
838
+ feedRow: {
839
+ flexDirection: 'row',
840
+ alignItems: 'center',
841
+ justifyContent: 'space-between',
842
+ paddingVertical: 4
843
+ },
844
+ feedName: {
845
+ color: '#fff',
846
+ fontSize: 13,
847
+ flex: 1
848
+ },
849
+ feedMult: {
850
+ fontSize: 13,
851
+ fontWeight: '800',
852
+ width: 64,
853
+ textAlign: 'right'
854
+ },
855
+ feedAmount: {
856
+ color: COLORS.slateLight,
857
+ fontSize: 12,
858
+ width: 96,
859
+ textAlign: 'right'
860
+ },
861
+ selectorLabel: {
862
+ color: COLORS.slateLight,
863
+ alignSelf: 'flex-start',
864
+ marginLeft: 24,
865
+ marginTop: 16,
866
+ marginBottom: 6,
867
+ fontSize: 12,
868
+ fontWeight: '700',
869
+ textTransform: 'uppercase'
870
+ },
871
+ chipRow: {
872
+ flexDirection: 'row',
873
+ flexWrap: 'wrap',
874
+ paddingHorizontal: 18,
875
+ gap: 8
876
+ },
877
+ error: {
878
+ color: COLORS.lossRed,
879
+ marginTop: 12,
880
+ paddingHorizontal: 24,
881
+ textAlign: 'center'
882
+ },
883
+ footer: {
884
+ padding: 16,
885
+ paddingBottom: 28
886
+ }
887
+ });
888
+ export default Jetstream;
889
+ //# sourceMappingURL=Jetstream.js.map