@everymatrix/mini-games-hub 0.1.13 → 0.1.15

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 (270) hide show
  1. package/components/BackButton-BMWvZ9Lb.js +39 -0
  2. package/components/BackButton-BNp3jVLa.js +39 -0
  3. package/components/BackButton-Bi1zFTns.js +38 -0
  4. package/components/BackButton-BvRNh4nJ.js +39 -0
  5. package/components/BackButton-C2-HXI2m.cjs +1 -0
  6. package/components/BackButton-C_v3b0Ky.cjs +1 -0
  7. package/components/BackButton-D5gfQ3NI.cjs +1 -0
  8. package/components/BackButton-DOW_OP-H.cjs +1 -0
  9. package/components/BackButton-DznJk3U4.js +38 -0
  10. package/components/BackButton-gIVGAf6v.js +38 -0
  11. package/components/BackButton-s0YqvufR.cjs +1 -0
  12. package/components/CoinFlip-5qt33VpA.js +399 -0
  13. package/components/CoinFlip-9-7FNYAn.js +364 -0
  14. package/components/CoinFlip-B0Q-xZDI.cjs +1 -0
  15. package/components/CoinFlip-BWNJK7aS.js +402 -0
  16. package/components/CoinFlip-BaNNMAYb.cjs +1 -0
  17. package/components/CoinFlip-BgRZmhbg.js +367 -0
  18. package/components/CoinFlip-COwy7cq1.cjs +1 -0
  19. package/components/CoinFlip-CSel9VZR.js +398 -0
  20. package/components/CoinFlip-CfHvSwpV.cjs +1 -0
  21. package/components/CoinFlip-ClRh6gz2.js +363 -0
  22. package/components/CoinFlip-D7Bwnl8W.cjs +1 -0
  23. package/components/CoinFlip-D8OLaQiA.js +367 -0
  24. package/components/CoinFlip-Dg2ZA_B2.cjs +1 -0
  25. package/components/CoinFlip-DoASIhfX.cjs +1 -0
  26. package/components/CoinFlip-pvtcTO4f.cjs +1 -0
  27. package/components/CoinFlip-vrZpkrnS.js +402 -0
  28. package/components/CoinRoyale-4Oe-x5-J.cjs +734 -0
  29. package/components/CoinRoyale-9nHMXODj.js +1017 -0
  30. package/components/CoinRoyale-B3bu5S4n.cjs +734 -0
  31. package/components/CoinRoyale-B4dKiGgG.cjs +736 -0
  32. package/components/CoinRoyale-BNxFDqe1.js +999 -0
  33. package/components/CoinRoyale-BwNvG3QI.js +1009 -0
  34. package/components/CoinRoyale-Bza84vCL.cjs +738 -0
  35. package/components/CoinRoyale-C-x6uDgh.js +989 -0
  36. package/components/CoinRoyale-CAI2JCvG.js +1020 -0
  37. package/components/CoinRoyale-CGHKZ-kc.js +997 -0
  38. package/components/CoinRoyale-CbqmmMPg.cjs +736 -0
  39. package/components/CoinRoyale-ChWsctqo.cjs +759 -0
  40. package/components/CoinRoyale-Cw8ImDP5.js +1040 -0
  41. package/components/CoinRoyale-CxIBSKFK.js +1017 -0
  42. package/components/CoinRoyale-D-rF6BV4.js +1019 -0
  43. package/components/CoinRoyale-DH-tQHtT.cjs +736 -0
  44. package/components/CoinRoyale-DmcgvBwG.js +997 -0
  45. package/components/CoinRoyale-d2utu3E3.cjs +759 -0
  46. package/components/CoinRoyale-xAkf1dm_.cjs +738 -0
  47. package/components/DrawResult-BHZeM1oX.cjs +1 -0
  48. package/components/DrawResult-BVtwLs-z.js +373 -0
  49. package/components/DrawResult-CG5KTjF7.cjs +1 -0
  50. package/components/DrawResult-COyPm6Cv.cjs +1 -0
  51. package/components/DrawResult-CbLPtjvZ.js +343 -0
  52. package/components/DrawResult-Cul15bW0.cjs +1 -0
  53. package/components/DrawResult-DMRODSxk.cjs +1 -0
  54. package/components/DrawResult-DTJJfQkP.js +373 -0
  55. package/components/DrawResult-DdL4fFZM.js +343 -0
  56. package/components/DrawResult-DxG4CaKK.cjs +1 -0
  57. package/components/DrawResult-SyzKXHgd.js +343 -0
  58. package/components/DrawResult-ZEAa0flC.js +373 -0
  59. package/components/GameCard-8k9KvRun.cjs +3 -0
  60. package/components/GameCard-A3k7RxF5.js +63 -0
  61. package/components/GameCard-B2td6J8K.js +62 -0
  62. package/components/{GameCard-BIn8BJ4U.cjs → GameCard-Bku9nP58.cjs} +3 -3
  63. package/components/GameCard-CBGi9i6m.cjs +3 -0
  64. package/components/GameCard-CHZmVd6n.cjs +3 -0
  65. package/components/GameCard-Cj4zAE8_.js +59 -0
  66. package/components/GameCard-CrKoQU1B.js +59 -0
  67. package/components/GameCard-DFVjSdtd.cjs +3 -0
  68. package/components/GameCard-DHetS96-.js +66 -0
  69. package/components/GameCard-DcWpuwMl.cjs +3 -0
  70. package/components/GameCard-jIcB63Tt.js +62 -0
  71. package/components/GameHistory-9Mf_u0La.js +231 -0
  72. package/components/GameHistory-BktmYuDa.js +231 -0
  73. package/components/GameHistory-CGAhNQKk.js +231 -0
  74. package/components/GameHistory-ChYjWDsa.cjs +12 -0
  75. package/components/GameHistory-CmiIChL-.cjs +12 -0
  76. package/components/GameHistory-CrrlOaAg.js +231 -0
  77. package/components/GameHistory-DVsHn3lx.cjs +12 -0
  78. package/components/GameHistory-_jU0BiqI.js +231 -0
  79. package/components/GameHistory-aQf3vf9u.cjs +12 -0
  80. package/components/GameHistory-lyXo0tYb.cjs +12 -0
  81. package/components/GameHistory-uzrT81kU.js +231 -0
  82. package/components/GameHistory-v6cI-TIF.cjs +12 -0
  83. package/components/GamePlaceholder-4oI8uJ-1.cjs +1 -0
  84. package/components/GamePlaceholder-Bp4nTJeL.js +84 -0
  85. package/components/GamePlaceholder-COiYGwNi.cjs +15 -0
  86. package/components/GamePlaceholder-CfJ4hx9w.js +70 -0
  87. package/components/GamePlaceholder-D9JEXsAk.js +84 -0
  88. package/components/GamePlaceholder-DGnB06iW.js +71 -0
  89. package/components/GamePlaceholder-DS5evGU6.js +85 -0
  90. package/components/GamePlaceholder-DmiU1G7G.cjs +15 -0
  91. package/components/GamePlaceholder-Dwo_YAUQ.cjs +1 -0
  92. package/components/GamePlaceholder-Uni3xW09.cjs +15 -0
  93. package/components/GamePlaceholder-fVPk29f9.cjs +15 -0
  94. package/components/GamePlaceholder-vUYYV2Ps.js +85 -0
  95. package/components/GameRules-41OkRwZu.js +115 -0
  96. package/components/GameRules-BwLJBo6z.cjs +3 -0
  97. package/components/GameRules-CRiycUU8.js +115 -0
  98. package/components/GameRules-CTKyBDZO.cjs +3 -0
  99. package/components/GameRules-CV9sxZYz.js +126 -0
  100. package/components/GameRules-CuuoMoqN.cjs +3 -0
  101. package/components/GameRules-Cy7jwBok.js +126 -0
  102. package/components/GameRules-DUD8OKC0.js +115 -0
  103. package/components/GameRules-Dkl0qVzr.js +126 -0
  104. package/components/GameRules-DpGqZdSj.cjs +3 -0
  105. package/components/GameRules-DrBYjWA6.cjs +3 -0
  106. package/components/GameRules-DrZ6w0LM.cjs +3 -0
  107. package/components/MiniGamesHub-BWPRLpyq.cjs +16 -0
  108. package/components/MiniGamesHub-BXcQ_faH.js +1022 -0
  109. package/components/MiniGamesHub-BjME_rom.cjs +16 -0
  110. package/components/{MiniGamesHub-D3BazHMT.js → MiniGamesHub-Bn-xvO1e.js} +419 -743
  111. package/components/MiniGamesHub-BpjzFxHO.cjs +16 -0
  112. package/components/MiniGamesHub-BtC6TmtK.cjs +16 -0
  113. package/components/MiniGamesHub-C-9Nf-x7.js +1029 -0
  114. package/components/MiniGamesHub-C0ESIt9P.cjs +16 -0
  115. package/components/MiniGamesHub-CfIFEVOU.js +1022 -0
  116. package/components/MiniGamesHub-Cj_6ebsL.cjs +16 -0
  117. package/components/MiniGamesHub-CktxKKTj.cjs +16 -0
  118. package/components/MiniGamesHub-CrPltGGl.js +1042 -0
  119. package/components/MiniGamesHub-D2Eet3pe.js +1048 -0
  120. package/components/{MiniGamesHub-Cu8_8yFl.js → MiniGamesHub-DCCeYwnc.js} +416 -760
  121. package/components/MiniGamesHub-DuyWceLB.cjs +16 -0
  122. package/components/MiniGamesHub-Dz8Ltp98.js +1048 -0
  123. package/components/MiniGamesHub-_uRBhzYg.js +1029 -0
  124. package/components/MiniGamesHub-kIXoGqbZ.cjs +16 -0
  125. package/components/MiniGamesHub-v8PPHifq.js +1072 -0
  126. package/components/MysteryChest-B4h9tqVR.js +1301 -0
  127. package/components/MysteryChest-BJCFkn02.cjs +737 -0
  128. package/components/MysteryChest-BXPAdruk.js +1290 -0
  129. package/components/MysteryChest-BuB9PD57.js +1240 -0
  130. package/components/MysteryChest-C40hwiCW.cjs +745 -0
  131. package/components/MysteryChest-CKPELFiF.cjs +737 -0
  132. package/components/MysteryChest-CRJtPhlo.cjs +743 -0
  133. package/components/MysteryChest-CScyc3Jw.cjs +745 -0
  134. package/components/MysteryChest-CheF_Rh5.cjs +739 -0
  135. package/components/MysteryChest-CrL8IXga.js +1309 -0
  136. package/components/MysteryChest-CrXzepqD.js +1296 -0
  137. package/components/MysteryChest-D6eks4QE.js +1254 -0
  138. package/components/MysteryChest-DJuhkpSa.cjs +743 -0
  139. package/components/MysteryChest-DOTlHt7A.js +1248 -0
  140. package/components/MysteryChest-DfggF659.js +1262 -0
  141. package/components/MysteryChest-Di-dVQnd.cjs +745 -0
  142. package/components/MysteryChest-DnstXEZJ.js +1298 -0
  143. package/components/MysteryChest-IcRh-Dcp.js +1247 -0
  144. package/components/MysteryChest-dyhqTxMg.cjs +739 -0
  145. package/components/WheelOfFortune--1feiOUD.js +950 -0
  146. package/components/WheelOfFortune-B0g1znMo.cjs +627 -0
  147. package/components/{WheelOfFortune-BlHeZ0q7.cjs → WheelOfFortune-BC0wwnC-.cjs} +8 -23
  148. package/components/{WheelOfFortune-CnaDpfpq.js → WheelOfFortune-BYxOqBjA.js} +151 -177
  149. package/components/WheelOfFortune-BgUB1tnc.js +942 -0
  150. package/components/WheelOfFortune-Bh2XAbs4.cjs +619 -0
  151. package/components/WheelOfFortune-BwmCnHru.js +926 -0
  152. package/components/WheelOfFortune-CHgHhi9q.cjs +619 -0
  153. package/components/WheelOfFortune-CRgnumXh.cjs +627 -0
  154. package/components/WheelOfFortune-CZ2cERqz.cjs +619 -0
  155. package/components/WheelOfFortune-CpYsfi8D.js +934 -0
  156. package/components/WheelOfFortune-Cy64rFDw.js +942 -0
  157. package/components/WheelOfFortune-DZ7fGpS9.cjs +619 -0
  158. package/components/WheelOfFortune-DZg0i79U.js +949 -0
  159. package/components/{WheelOfFortune-Lfc_l9kc.js → WheelOfFortune-DawF7WTd.js} +180 -231
  160. package/components/WheelOfFortune-DjdKhLGF.cjs +617 -0
  161. package/components/WheelOfFortune-M5VMIsnw.cjs +619 -0
  162. package/components/WheelOfFortune-kXjxp6t7.js +926 -0
  163. package/components/WheelOfFortune-pBG33-QJ.js +933 -0
  164. package/components/WheelOfFortuneWheel-7PqVvd_8.cjs +3 -0
  165. package/components/WheelOfFortuneWheel-B4fe-idJ.cjs +3 -0
  166. package/components/WheelOfFortuneWheel-BABzaEBd.js +1812 -0
  167. package/components/WheelOfFortuneWheel-BQFaJ7ZB.cjs +3 -0
  168. package/components/WheelOfFortuneWheel-BYEHNHdI.js +1807 -0
  169. package/components/WheelOfFortuneWheel-BoZ9evN7.cjs +3 -0
  170. package/components/WheelOfFortuneWheel-BuBjvGRI.cjs +3 -0
  171. package/components/{WheelOfFortuneWheel-BAR98ByP.js → WheelOfFortuneWheel-CQCLWOFi.js} +310 -302
  172. package/components/WheelOfFortuneWheel-CsOjhUcv.cjs +3 -0
  173. package/components/WheelOfFortuneWheel-DUE4gyGP.js +1741 -0
  174. package/components/{WheelOfFortuneWheel-DxFn6jjg.js → WheelOfFortuneWheel-DXhwrWpD.js} +548 -539
  175. package/components/WheelOfFortuneWheel-DgVQP4GA.js +1735 -0
  176. package/components/bg-scene-Bz42V1FW.cjs +1 -0
  177. package/components/bg-scene-DpHgKCHj.js +4 -0
  178. package/components/coin-heads-BuJOLpyg.cjs +1 -0
  179. package/components/coin-heads-loqcEtH2.js +4 -0
  180. package/components/coin-tails-20vJmhwv.cjs +1 -0
  181. package/components/coin-tails-BTbsTwkz.js +4 -0
  182. package/components/confetti-CIk02Iw8.cjs +1 -0
  183. package/components/confetti-QNsE8ssC.js +14 -0
  184. package/components/constants-BDMySuIA.cjs +1 -0
  185. package/components/constants-DNSPUges.cjs +1 -0
  186. package/components/{constants-BYsDpbRv.js → constants-DdcZGwlM.js} +28 -19
  187. package/components/constants-DgCBmV7S.js +29 -0
  188. package/components/constants-Ds7J0meH.cjs +1 -0
  189. package/components/constants-Q_kcdbM6.js +29 -0
  190. package/components/countdown-2m_26DZf.js +157 -0
  191. package/components/countdown-BhZfvy-p.cjs +1 -0
  192. package/components/countdown-Bp3yWidJ.cjs +1 -0
  193. package/components/countdown-CH5h-cVr.js +146 -0
  194. package/components/countdown-CnUPVFlE.cjs +1 -0
  195. package/components/countdown-DmWNNDzv.js +168 -0
  196. package/components/countdown-YmZm4DrD.js +146 -0
  197. package/components/countdown-o9wqo7P7.cjs +1 -0
  198. package/components/key-CFhvp9Ju.cjs +1 -0
  199. package/components/key-D1g9LqMU.js +4 -0
  200. package/components/mystery-chest-bg-CGT-JTBW.js +4 -0
  201. package/components/mystery-chest-bg-vrQMNafs.cjs +1 -0
  202. package/components/mystery-chest-empty-CSY7-Vbl.cjs +1 -0
  203. package/components/mystery-chest-empty-D7bbrCHH.js +4 -0
  204. package/components/mystery-chest-locked-CIxpYU3v.js +4 -0
  205. package/components/mystery-chest-locked-DiyrvNm3.cjs +1 -0
  206. package/components/mystery-chest-win-D1NYItcd.js +4 -0
  207. package/components/mystery-chest-win-OxXZtQQd.cjs +1 -0
  208. package/components/remaining-times-Dexper1E.js +52 -0
  209. package/components/remaining-times-DiYnfuZB.js +23 -0
  210. package/components/remaining-times-Eqo69UfM.cjs +1 -0
  211. package/components/remaining-times-Gt6ytHaa.cjs +1 -0
  212. package/components/sparkles-B2kHtb3R.js +14 -0
  213. package/components/sparkles-BBLT1jhq.js +14 -0
  214. package/components/sparkles-BIl7-lvq.cjs +1 -0
  215. package/components/sparkles-BRrL2C0i.cjs +1 -0
  216. package/components/sparkles-BXFe6GK6.js +18 -0
  217. package/components/sparkles-C2rT-gN_.cjs +1 -0
  218. package/components/sparkles-Cfa1xTlQ.js +14 -0
  219. package/components/sparkles-Cot5wZXx.cjs +1 -0
  220. package/components/sparkles-D1RTsqBU.js +18 -0
  221. package/components/sparkles-DKbGLSaY.cjs +1 -0
  222. package/components/sparkles-DmL-n8od.cjs +1 -0
  223. package/components/sparkles-WqrZ-iXs.js +18 -0
  224. package/components/spin-controller-3wmy9F5-.cjs +1 -0
  225. package/components/{spin-controller-CIshWmlA.cjs → spin-controller-BF6ymCY4.cjs} +1 -1
  226. package/components/spin-controller-Bc8nQATS.cjs +1 -0
  227. package/components/{spin-controller-BuBkKrNR.js → spin-controller-BcBfHUn9.js} +7 -7
  228. package/components/{spin-controller-REPdRwaB.js → spin-controller-CC3QZvWl.js} +8 -8
  229. package/components/spin-controller-CEIahkSh.cjs +1 -0
  230. package/components/spin-controller-CUb1rpPl.js +177 -0
  231. package/components/spin-controller-CVXfvzb7.cjs +1 -0
  232. package/components/spin-controller-DBglqs7W.js +175 -0
  233. package/components/spin-controller-Db-fwR9V.cjs +1 -0
  234. package/components/spin-controller-DkSQ07IL.js +177 -0
  235. package/components/spin-controller-Dxxx3-ya.js +175 -0
  236. package/components/utils-8EFTHKcu.cjs +3 -0
  237. package/components/utils-AGVOgUGK.cjs +3 -0
  238. package/components/{utils-C7uxZXaZ.js → utils-B3aNdyMX.js} +968 -958
  239. package/components/utils-BJHloM10.js +6055 -0
  240. package/components/utils-C1uNHR_J.cjs +3 -0
  241. package/components/{utils-d-JrZBJu.js → utils-DEov6Qk_.js} +902 -892
  242. package/components/utils-DQ220WK3.js +6016 -0
  243. package/components/utils-DwrHy7a0.js +6007 -0
  244. package/components/utils-Dwz-wUFC.cjs +3 -0
  245. package/components/utils-Rda5erjI.cjs +3 -0
  246. package/components/utils-fG_nzyoc.cjs +3 -0
  247. package/components/utils-qUyu-MNU.js +6064 -0
  248. package/es2015/mini-games-hub.cjs +1 -1
  249. package/es2015/mini-games-hub.js +1 -1
  250. package/esnext/mini-games-hub.cjs +1 -0
  251. package/esnext/mini-games-hub.js +1 -1
  252. package/package.json +12 -13
  253. package/components/GameCard-D3knomma.js +0 -56
  254. package/components/GameCard-Ds0FcnPp.js +0 -56
  255. package/components/MiniGamesHub-SjsgF4e2.cjs +0 -94
  256. package/components/WheelOfFortuneDrawResults-1lzyxrks.cjs +0 -1
  257. package/components/WheelOfFortuneDrawResults-DQweghnp.js +0 -301
  258. package/components/WheelOfFortuneDrawResults-dOeQDVub.js +0 -276
  259. package/components/WheelOfFortuneHistory-CQZ9QtVt.js +0 -232
  260. package/components/WheelOfFortuneHistory-DZNPM57t.cjs +0 -13
  261. package/components/WheelOfFortuneHistory-DygZEtcR.js +0 -232
  262. package/components/WheelOfFortuneRules-D3N1c8PX.js +0 -117
  263. package/components/WheelOfFortuneRules-DuiCet95.js +0 -128
  264. package/components/WheelOfFortuneRules-VAMAiK0m.cjs +0 -5
  265. package/components/WheelOfFortuneWheel-hSjxThyU.cjs +0 -3
  266. package/components/constants-DM6Vdc6Z.cjs +0 -1
  267. package/components/sparkles-BnriHiyw.cjs +0 -1
  268. package/components/sparkles-CSfeD2Zu.js +0 -25
  269. package/components/sparkles-CTrQ372y.js +0 -29
  270. package/components/utils-DQIHJIDu.cjs +0 -3
@@ -0,0 +1,367 @@
1
+ import { d as vt, c as ft, p as P, o as pt, n as oe, i as le, l as he, s as U, h as S, m as J, b as I, f as V, u as mt } from "./WheelOfFortuneWheel-DgVQP4GA.js";
2
+ import { G as gt, aM as k, aC as yt, W as we, au as y, a0 as t, aN as Ue, aS as u, aT as o, ah as H, L as ht, aO as wt, aP as bt, aY as Tt, aU as xt, aV as Et, aG as F, aQ as Mt, aW as l, b0 as St } from "./utils-DwrHy7a0.js";
3
+ import { E as be, R as Rt, T as At, k as Ct, j as Pt, l as Te, m as Ft, n as He, o as Ve, p as It } from "./constants-DgCBmV7S.js";
4
+ import { f as kt } from "./countdown-CH5h-cVr.js";
5
+ import { c as $e } from "./coin-heads-loqcEtH2.js";
6
+ import { c as Lt } from "./coin-tails-BTbsTwkz.js";
7
+ var Dt = V('<div><span class="coin-royale__chev">︿</span> <span class="coin-royale__hint-text"> </span> <span class="coin-royale__chev coin-royale__chev--down">﹀</span></div> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11h.5V7.5a1.5 1.5 0 0 1 3 0V11h.5V9a1.5 1.5 0 0 1 3 0v6.5c0 3-2 5.5-5.5 5.5H12c-2 0-3.2-.8-4.2-2.3l-2.4-3.6a1.5 1.5 0 0 1 2.3-1.9L9 15.5V11Z"></path></svg>', 1), Yt = V('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-countdown"> </p></div>'), Ot = V('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-body"> </p> <button class="coin-royale__badge-close" type="button"> </button></div>'), zt = V('<span class="coin-royale__flips-loader"></span>'), Nt = V('<p class="coin-royale__flips"> <span class="coin-royale__flips-count"><img class="coin-royale__flips-icon" alt="" aria-hidden="true"/> <!></span></p>'), Ut = V('<div class="coin-royale__play"><div class="coin-royale__stage"><div role="button"><div class="coin-royale__coin-shadow"></div> <div class="coin-royale__coin"><div class="coin-royale__coin-drop-shadow" aria-hidden="true"></div> <div class="coin-royale__coin-edge" aria-hidden="true"></div> <div class="coin-royale__face coin-royale__face--front"><img alt="" draggable="false"/></div> <div class="coin-royale__face coin-royale__face--back"><img alt="" draggable="false"/></div></div> <!></div> <!></div></div> <!> <button class="coin-royale__cta" type="button"> </button>', 1);
8
+ function Ht(Ge, h) {
9
+ gt(h, !0);
10
+ const w = () => wt(bt, "$_", Xe), [Xe, We] = Mt();
11
+ let R = P(h, "program", 7, null), K = P(h, "endpoint", 7, null), Q = P(h, "session", 7, null), f = P(h, "isAvailable", 7, !1), ce = P(h, "spinResults", 15, null), p = P(h, "spinActive", 15, !1), ee = P(h, "remainingTimesLoading", 7, !1), de = P(h, "onFlip", 7, () => {
12
+ }), $ = k(yt({}));
13
+ we(() => {
14
+ if (!f() && R()) {
15
+ const e = () => y($, kt(R()?.next?.startTime), !0);
16
+ e();
17
+ const a = setInterval(e, 1e3);
18
+ return () => clearInterval(a);
19
+ }
20
+ });
21
+ let G = k(!1);
22
+ we(() => {
23
+ if (f()) {
24
+ const e = setTimeout(() => y(G, !0), 2e3);
25
+ return () => clearTimeout(e);
26
+ }
27
+ });
28
+ let X = k(!1), A = k(void 0), i = k(void 0), L = k(void 0), C = k(void 0);
29
+ const ue = Tt(() => f() && !p() && !t(X) && !ee());
30
+ let D = 0, Y = !1, W = !1, _e = 0, j = 0, ve = 0, _ = null, te = null, xe, Z = !1;
31
+ const O = (e, a = 1, n = 0) => {
32
+ t(i) && (t(i).style.transform = `translateY(${n}px) rotateX(${e}deg) scale(${a})`);
33
+ };
34
+ we(() => {
35
+ if (!t(A) || !t(i) || !t(L)) return;
36
+ Ee(), O(D);
37
+ const e = new ResizeObserver(() => Ee());
38
+ return e.observe(t(A)), () => e.disconnect();
39
+ });
40
+ const Ee = () => {
41
+ if (!t(A) || !t(i) || !t(L)) return;
42
+ const e = t(A).clientWidth;
43
+ if (!e) return;
44
+ const a = e / 2 * Rt, n = Math.max(14, e * At), r = 2 * a * Math.tan(Math.PI / be) + 0.6;
45
+ t(i).style.setProperty("--half-t", `${(n / 2).toFixed(2)}px`), t(L).replaceChildren();
46
+ for (let s = 0; s < be; s++) {
47
+ const d = document.createElement("div");
48
+ d.className = `coin-royale__edge-seg coin-royale__edge-seg--${s % 2 === 0 ? "a" : "b"}`, d.style.width = `${r.toFixed(2)}px`, d.style.height = `${n.toFixed(2)}px`, d.style.transform = `translate(-50%,-50%) rotateZ(${s * 360 / be}deg) translateY(${(-a).toFixed(2)}px) rotateX(90deg)`, t(L).appendChild(d);
49
+ }
50
+ }, Me = (e) => {
51
+ D = e, _?.cancel(), _ = null, O(e, 1), t(i) && (t(i).style.animation = ""), t(C) && (t(C).style.opacity = "", t(C).style.width = "");
52
+ }, je = (e, a) => new Promise((n) => {
53
+ if (!t(i)) return n();
54
+ _?.cancel(), _ = t(i).animate(e, { fill: "forwards", ...a }), _.onfinish = () => n(), _.oncancel = () => n();
55
+ }), Ze = async (e, a) => {
56
+ const n = new Headers({ "Content-Type": "application/json" });
57
+ Q() && n.append("X-SessionId", Q());
58
+ const r = await fetch(new URL(`${K()}/v1/wof/draw/${R()?.id}`), {
59
+ method: "PUT",
60
+ headers: n,
61
+ cache: "no-store",
62
+ body: JSON.stringify({ action: 1, guid: e }),
63
+ signal: a
64
+ });
65
+ if (!r.ok) throw new Error(`draw request failed: ${r.status}`);
66
+ return r.json();
67
+ }, ae = async (e) => {
68
+ if (!t(ue) || !t(i) || !t(A) || !K()) return;
69
+ de()();
70
+ const a = typeof e == "number" ? e : D;
71
+ p(!0), y(G, !0), y(X, !1), _?.cancel();
72
+ const n = -(t(A).clientHeight * Ct);
73
+ t(C) && (t(C).style.opacity = "0.3", t(C).style.width = "34%");
74
+ const r = () => new Promise((x, E) => requestAnimationFrame((me) => Z ? E(new Error("destroyed")) : x(me)));
75
+ let s = !1, d = !1, v;
76
+ const g = xt(), c = new AbortController();
77
+ te = c;
78
+ const b = Promise.race([
79
+ Ze(g, c.signal),
80
+ new Promise((x, E) => {
81
+ v = setTimeout(
82
+ () => {
83
+ d = !0, c.abort(), E(new Error("draw timed out"));
84
+ },
85
+ Pt
86
+ );
87
+ })
88
+ ]);
89
+ b.then(() => s = !0, () => s = !0);
90
+ let T = a;
91
+ try {
92
+ let x = await r();
93
+ const E = x;
94
+ for (; !s || x - E < Te; ) {
95
+ const M = await r(), z = Math.min(M - x, 50) / 1e3;
96
+ x = M;
97
+ const q = M - E, N = Math.min(q / Ft, 1);
98
+ T += He * N * N * (3 - 2 * N) * z;
99
+ const B = Math.min(q / Te, 1), re = 1 - (1 - B) ** 3, Ne = B >= 1 ? Math.sin((q - Te) / 380) * 0.015 : 0;
100
+ O(T, 1 + Ve * (re + Ne), n * (re + Ne));
101
+ }
102
+ const me = await b;
103
+ clearTimeout(v);
104
+ const ie = Et(me, "draw");
105
+ if (ie.success !== !0) throw new Error("draw failed");
106
+ const ct = {
107
+ ...ie,
108
+ guid: g,
109
+ lotteryProgramID: ie.lotteryProgramID ?? R()?.id
110
+ }, dt = ie.type === "noprize" ? 180 : 0, Oe = 360, ge = Oe + (dt - ((T + Oe) % 360 + 360) % 360 + 360) % 360, ut = T + ge, ze = 2 * ge / He * 1e3, _t = T, ye = await r();
111
+ for (let M = ye; M - ye < ze; M = await r()) {
112
+ const z = (M - ye) / ze, q = 1 - (1 - z) ** 2, N = Math.min(z / 0.78, 1), B = 1 - N * N, re = z > 0.78 ? Math.sin((z - 0.78) / 0.22 * Math.PI) * 5 : 0;
113
+ O(_t + ge * q, 1 + Ve * B, n * B + re);
114
+ }
115
+ if (Me(ut), await new Promise((M) => xe = setTimeout(M, 550)), Z) return;
116
+ ce(ct), p(!1);
117
+ } catch (x) {
118
+ if (clearTimeout(v), Z) return;
119
+ console.log(x);
120
+ const E = T + ((a - T) % 360 + 360) % 360;
121
+ if (t(i) && await je(
122
+ [
123
+ { transform: t(i).style.transform },
124
+ { transform: `translateY(0px) rotateX(${E}deg) scale(1)` }
125
+ ],
126
+ { duration: 420, easing: "cubic-bezier(.55,0,.75,.4)" }
127
+ ), Z) return;
128
+ Me(E), d && y(X, !0), p(!1);
129
+ } finally {
130
+ te === c && (te = null);
131
+ }
132
+ }, qe = () => {
133
+ y(X, !1), p(!1);
134
+ }, Se = (e) => {
135
+ t(i) && (_?.cancel(), _ = t(i).animate(
136
+ [
137
+ { transform: `translateY(0px) rotateX(${e}deg) scale(1)` },
138
+ {
139
+ transform: `translateY(0px) rotateX(${D}deg) scale(1)`
140
+ }
141
+ ],
142
+ {
143
+ duration: 320,
144
+ easing: "cubic-bezier(.22,.61,.32,1)",
145
+ fill: "forwards"
146
+ }
147
+ ), _.onfinish = () => {
148
+ _?.cancel(), _ = null, O(D, 1), t(i) && (t(i).style.animation = "");
149
+ });
150
+ }, Be = (e) => {
151
+ t(ue) && (Y = !0, W = !1, _e = e.clientY, ve = 0, j = D, _?.cancel(), t(i) && (t(i).style.animation = "none"), y(G, !0));
152
+ }, Re = (e) => {
153
+ if (!Y || p()) return;
154
+ const a = _e - e.clientY;
155
+ ve = a, Math.abs(a) > 4 && (W = !0), O(j + a * 1.1, 1 + Math.min(Math.abs(a) / 400, 0.12));
156
+ }, Ae = (e) => {
157
+ if (!Y) return;
158
+ Y = !1;
159
+ const a = _e - e.clientY;
160
+ if (Math.abs(a) > It) {
161
+ ae(j + a * 1.1);
162
+ return;
163
+ }
164
+ Se(j + a * 1.1);
165
+ }, Ce = () => {
166
+ Y && (Y = !1, W = !1, Se(j + ve * 1.1));
167
+ }, Je = () => {
168
+ if (W) {
169
+ W = !1;
170
+ return;
171
+ }
172
+ ae();
173
+ };
174
+ pt(() => (window.addEventListener("pointermove", Re), window.addEventListener("pointerup", Ae), window.addEventListener("pointercancel", Ce), () => {
175
+ Z = !0, te?.abort(), clearTimeout(xe), window.removeEventListener("pointermove", Re), window.removeEventListener("pointerup", Ae), window.removeEventListener("pointercancel", Ce), _?.cancel();
176
+ }));
177
+ var Ke = {
178
+ get program() {
179
+ return R();
180
+ },
181
+ set program(e = null) {
182
+ R(e), F();
183
+ },
184
+ get endpoint() {
185
+ return K();
186
+ },
187
+ set endpoint(e = null) {
188
+ K(e), F();
189
+ },
190
+ get session() {
191
+ return Q();
192
+ },
193
+ set session(e = null) {
194
+ Q(e), F();
195
+ },
196
+ get isAvailable() {
197
+ return f();
198
+ },
199
+ set isAvailable(e = !1) {
200
+ f(e), F();
201
+ },
202
+ get spinResults() {
203
+ return ce();
204
+ },
205
+ set spinResults(e = null) {
206
+ ce(e), F();
207
+ },
208
+ get spinActive() {
209
+ return p();
210
+ },
211
+ set spinActive(e = !1) {
212
+ p(e), F();
213
+ },
214
+ get remainingTimesLoading() {
215
+ return ee();
216
+ },
217
+ set remainingTimesLoading(e = !1) {
218
+ ee(e), F();
219
+ },
220
+ get onFlip() {
221
+ return de();
222
+ },
223
+ set onFlip(e = () => {
224
+ }) {
225
+ de(e), F();
226
+ }
227
+ }, Pe = Ut(), fe = Ue(Pe), Fe = o(fe), m = o(Fe);
228
+ let Ie;
229
+ var ke = o(m);
230
+ oe(ke, (e) => y(C, e), () => t(C));
231
+ var ne = u(ke, 2), Le = u(o(ne), 2);
232
+ oe(Le, (e) => y(L, e), () => t(L));
233
+ var pe = u(Le, 2), Qe = o(pe);
234
+ l(pe);
235
+ var De = u(pe, 2), et = o(De);
236
+ l(De), l(ne), oe(ne, (e) => y(i, e), () => t(i));
237
+ var tt = u(ne, 2);
238
+ {
239
+ var at = (e) => {
240
+ var a = Dt(), n = Ue(a);
241
+ let r;
242
+ var s = u(o(n), 2), d = o(s, !0);
243
+ l(s), St(2), l(n);
244
+ var v = u(n, 2);
245
+ let g;
246
+ H(
247
+ (c) => {
248
+ r = he(n, 1, "coin-royale__drag-hint", null, r, {
249
+ "coin-royale__drag-hint--hidden": t(G) || p()
250
+ }), S(d, c), g = he(v, 0, "coin-royale__finger-cue", null, g, {
251
+ "coin-royale__finger-cue--hidden": t(G) || p()
252
+ });
253
+ },
254
+ [() => w()("dragToFlip")]
255
+ ), I(e, a);
256
+ };
257
+ le(tt, (e) => {
258
+ f() && e(at);
259
+ });
260
+ }
261
+ l(m), oe(m, (e) => y(A, e), () => t(A));
262
+ var nt = u(m, 2);
263
+ {
264
+ var st = (e) => {
265
+ var a = Yt(), n = o(a), r = o(n, !0);
266
+ l(n);
267
+ var s = u(n, 2), d = o(s, !0);
268
+ l(s), l(a), H(
269
+ (v, g) => {
270
+ S(r, v), S(d, g);
271
+ },
272
+ [
273
+ () => w()("nextAvailable"),
274
+ () => w()("countdown", {
275
+ values: {
276
+ days: t($).days,
277
+ hours: t($).hours,
278
+ minutes: t($).minutes,
279
+ seconds: t($).seconds
280
+ }
281
+ })
282
+ ]
283
+ ), I(e, a);
284
+ }, it = (e) => {
285
+ var a = Ot(), n = o(a), r = o(n, !0);
286
+ l(n);
287
+ var s = u(n, 2), d = o(s, !0);
288
+ l(s);
289
+ var v = u(s, 2), g = o(v, !0);
290
+ l(v), l(a), H(
291
+ (c, b, T) => {
292
+ S(r, c), S(d, b), S(g, T);
293
+ },
294
+ [
295
+ () => w()("timeoutTitle"),
296
+ () => w()("timeoutDescription"),
297
+ () => w()("close")
298
+ ]
299
+ ), J("click", v, qe), I(e, a);
300
+ };
301
+ le(nt, (e) => {
302
+ f() ? t(X) && e(it, 1) : e(st);
303
+ });
304
+ }
305
+ l(Fe), l(fe);
306
+ var Ye = u(fe, 2);
307
+ {
308
+ var rt = (e) => {
309
+ var a = Nt(), n = o(a), r = u(n), s = o(r), d = u(s, 2);
310
+ {
311
+ var v = (c) => {
312
+ var b = zt();
313
+ I(c, b);
314
+ }, g = (c) => {
315
+ var b = mt();
316
+ H(() => S(b, R()?.current?.remainingTimes ?? R()?.remainingTimes)), I(c, b);
317
+ };
318
+ le(d, (c) => {
319
+ ee() ? c(v) : c(g, -1);
320
+ });
321
+ }
322
+ l(r), l(a), H(
323
+ (c) => {
324
+ S(n, `${c ?? ""} `), U(s, "src", $e);
325
+ },
326
+ [() => w()("remainingFlips")]
327
+ ), I(e, a);
328
+ };
329
+ le(Ye, (e) => {
330
+ f() && e(rt);
331
+ });
332
+ }
333
+ var se = u(Ye, 2), ot = o(se, !0);
334
+ l(se), H(
335
+ (e, a) => {
336
+ Ie = he(m, 1, "coin-royale__flip-zone", null, Ie, {
337
+ "coin-royale__flip-zone--disabled": !f(),
338
+ "coin-royale__flip-zone--settling": p()
339
+ }), U(m, "tabindex", f() ? 0 : -1), U(m, "aria-label", e), U(m, "aria-disabled", !t(ue)), U(Qe, "src", $e), U(et, "src", Lt), se.disabled = !f(), S(ot, a);
340
+ },
341
+ [() => w()("flipCoin"), () => w()("flipCoin")]
342
+ ), J("pointerdown", m, Be), J("click", m, Je), J("keydown", m, (e) => {
343
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ae());
344
+ }), J("click", se, () => ae()), I(Ge, Pe);
345
+ var lt = ht(Ke);
346
+ return We(), lt;
347
+ }
348
+ vt(["pointerdown", "click", "keydown"]);
349
+ ft(
350
+ Ht,
351
+ {
352
+ program: {},
353
+ endpoint: {},
354
+ session: {},
355
+ isAvailable: {},
356
+ spinResults: {},
357
+ spinActive: {},
358
+ remainingTimesLoading: {},
359
+ onFlip: {}
360
+ },
361
+ [],
362
+ [],
363
+ { mode: "open" }
364
+ );
365
+ export {
366
+ Ht as C
367
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./WheelOfFortuneWheel-BQFaJ7ZB.cjs"),e=require("./utils-fG_nzyoc.cjs"),d=require("./constants-DNSPUges.cjs"),Be=require("./countdown-CnUPVFlE.cjs"),Se=require("./coin-heads-BuJOLpyg.cjs"),Je=require("./coin-tails-20vJmhwv.cjs");var Ke=n.from_html('<div><span class="coin-royale__chev">︿</span> <span class="coin-royale__hint-text"> </span> <span class="coin-royale__chev coin-royale__chev--down">﹀</span></div> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11h.5V7.5a1.5 1.5 0 0 1 3 0V11h.5V9a1.5 1.5 0 0 1 3 0v6.5c0 3-2 5.5-5.5 5.5H12c-2 0-3.2-.8-4.2-2.3l-2.4-3.6a1.5 1.5 0 0 1 2.3-1.9L9 15.5V11Z"></path></svg>',1),Qe=n.from_html('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-countdown"> </p></div>'),et=n.from_html('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-body"> </p> <button class="coin-royale__badge-close" type="button"> </button></div>'),tt=n.from_html('<span class="coin-royale__flips-loader"></span>'),nt=n.from_html('<p class="coin-royale__flips"> <span class="coin-royale__flips-count"><img class="coin-royale__flips-icon" alt="" aria-hidden="true"/> <!></span></p>'),it=n.from_html('<div class="coin-royale__play"><div class="coin-royale__stage"><div role="button"><div class="coin-royale__coin-shadow"></div> <div class="coin-royale__coin"><div class="coin-royale__coin-drop-shadow" aria-hidden="true"></div> <div class="coin-royale__coin-edge" aria-hidden="true"></div> <div class="coin-royale__face coin-royale__face--front"><img alt="" draggable="false"/></div> <div class="coin-royale__face coin-royale__face--back"><img alt="" draggable="false"/></div></div> <!></div> <!></div></div> <!> <button class="coin-royale__cta" type="button"> </button>',1);function Te(Me,m){e.push(m,!0);const h=()=>e.store_get(e.$format,"$_",Ie),[Ie,Ae]=e.setup_stores();let S=n.prop(m,"program",7,null),G=n.prop(m,"endpoint",7,null),q=n.prop(m,"session",7,null),v=n.prop(m,"isAvailable",7,!1),B=n.prop(m,"spinResults",15,null),u=n.prop(m,"spinActive",15,!1),U=n.prop(m,"remainingTimesLoading",7,!1),J=n.prop(m,"onFlip",7,()=>{}),L=e.state(e.proxy({}));e.user_effect(()=>{if(!v()&&S()){const t=()=>e.set(L,Be.formatTimeRemaining(S()?.next?.startTime),!0);t();const i=setInterval(t,1e3);return()=>clearInterval(i)}});let I=e.state(!1),K;const Re=()=>{clearTimeout(K),K=setTimeout(()=>e.set(I,!1),400)};let N=e.state(!1),T=e.state(void 0),r=e.state(void 0),A=e.state(void 0),M=e.state(void 0);const Q=e.user_derived(()=>v()&&!u()&&!e.get(N)&&!U());let R=0,F=!1,Y=!1,ee=0,H=0,te=0,_=null,$=null,oe,P=!1;const C=(t,i=1,s=0)=>{e.get(r)&&(e.get(r).style.transform=`translateY(${s}px) rotateX(${t}deg) scale(${i})`)};e.user_effect(()=>{if(!e.get(T)||!e.get(r)||!e.get(A))return;le(),C(R);const t=new ResizeObserver(()=>le());return t.observe(e.get(T)),()=>t.disconnect()});const le=()=>{if(!e.get(T)||!e.get(r)||!e.get(A))return;const t=e.get(T).clientWidth;if(!t)return;const i=t/2*d.RIM_FACTOR,s=Math.max(14,t*d.THICKNESS_FACTOR),o=2*i*Math.tan(Math.PI/d.EDGE_SEGMENTS)+.6;e.get(r).style.setProperty("--half-t",`${(s/2).toFixed(2)}px`),e.get(A).replaceChildren();for(let a=0;a<d.EDGE_SEGMENTS;a++){const c=document.createElement("div");c.className=`coin-royale__edge-seg coin-royale__edge-seg--${a%2===0?"a":"b"}`,c.style.width=`${o.toFixed(2)}px`,c.style.height=`${s.toFixed(2)}px`,c.style.transform=`translate(-50%,-50%) rotateZ(${a*360/d.EDGE_SEGMENTS}deg) translateY(${(-i).toFixed(2)}px) rotateX(90deg)`,e.get(A).appendChild(c)}},ce=t=>{R=t,_?.cancel(),_=null,C(t,1),e.get(r)&&(e.get(r).style.animation=""),e.get(M)&&(e.get(M).style.opacity="",e.get(M).style.width="")},Fe=(t,i)=>new Promise(s=>{if(!e.get(r))return s();_?.cancel(),_=e.get(r).animate(t,{fill:"forwards",...i}),_.onfinish=()=>s(),_.oncancel=()=>s()}),Pe=async(t,i)=>{const s=new Headers({"Content-Type":"application/json"});q()&&s.append("X-SessionId",q());const o=await fetch(new URL(`${G()}/v1/wof/draw/${S()?.id}`),{method:"PUT",headers:s,cache:"no-store",body:JSON.stringify({action:1,guid:t}),signal:i});if(!o.ok)throw new Error(`draw request failed: ${o.status}`);return o.json()},V=async t=>{if(!e.get(Q)||!e.get(r)||!e.get(T)||!G())return;J()();const i=typeof t=="number"?t:R;u(!0),e.set(I,!0),e.set(N,!1),_?.cancel();const s=-(e.get(T).clientHeight*d.RISE_FACTOR);e.get(M)&&(e.get(M).style.opacity="0.3",e.get(M).style.width="34%");const o=()=>new Promise((w,E)=>requestAnimationFrame(se=>P?E(new Error("destroyed")):w(se)));let a=!1,c=!1,g;const p=e.generateUUID(),l=new AbortController;$=l;const y=Promise.race([Pe(p,l.signal),new Promise((w,E)=>{g=setTimeout(()=>{c=!0,l.abort(),E(new Error("draw timed out"))},d.SPIN_TIMEOUT_MS)})]);y.then(()=>a=!0,()=>a=!0);let b=i;try{let w=await o();const E=w;for(;!a||w-E<d.RISE_MS;){const x=await o(),k=Math.min(x-w,50)/1e3;w=x;const O=x-E,D=Math.min(O/d.SPIN_UP_MS,1);b+=d.SPIN_SPEED*D*D*(3-2*D)*k;const z=Math.min(O/d.RISE_MS,1),j=1-(1-z)**3,xe=z>=1?Math.sin((O-d.RISE_MS)/380)*.015:0;C(b,1+d.SCALE_GAIN*(j+xe),s*(j+xe))}const se=await y;clearTimeout(g);const Z=e.normalizeDrawResult(se,"draw");if(Z.success!==!0)throw new Error("draw failed");const Xe={...Z,guid:p,lotteryProgramID:Z.lotteryProgramID??S()?.id},We=Z.type==="noprize"?180:0,we=360,ae=we+(We-((b+we)%360+360)%360+360)%360,Ze=b+ae,Ee=2*ae/d.SPIN_SPEED*1e3,je=b,re=await o();for(let x=re;x-re<Ee;x=await o()){const k=(x-re)/Ee,O=1-(1-k)**2,D=Math.min(k/.78,1),z=1-D*D,j=k>.78?Math.sin((k-.78)/.22*Math.PI)*5:0;C(je+ae*O,1+d.SCALE_GAIN*z,s*z+j)}if(ce(Ze),await new Promise(x=>oe=setTimeout(x,550)),P)return;B(Xe),u(!1)}catch(w){if(clearTimeout(g),P)return;console.log(w);const E=b+((i-b)%360+360)%360;if(e.get(r)&&await Fe([{transform:e.get(r).style.transform},{transform:`translateY(0px) rotateX(${E}deg) scale(1)`}],{duration:420,easing:"cubic-bezier(.55,0,.75,.4)"}),P)return;ce(E),c&&e.set(N,!0),u(!1)}finally{$===l&&($=null),P||Re()}},Ce=()=>{e.set(N,!1),u(!1)},de=t=>{e.get(r)&&(_?.cancel(),_=e.get(r).animate([{transform:`translateY(0px) rotateX(${t}deg) scale(1)`},{transform:`translateY(0px) rotateX(${R}deg) scale(1)`}],{duration:320,easing:"cubic-bezier(.22,.61,.32,1)",fill:"forwards"}),_.onfinish=()=>{_?.cancel(),_=null,C(R,1),e.get(r)&&(e.get(r).style.animation=""),e.set(I,!1)})},ke=t=>{e.get(Q)&&(F=!0,Y=!1,ee=t.clientY,te=0,H=R,_?.cancel(),e.get(r)&&(e.get(r).style.animation="none"),e.set(I,!0))},_e=t=>{if(!F||u())return;const i=ee-t.clientY;te=i,Math.abs(i)>4&&(Y=!0),C(H+i*1.1,1+Math.min(Math.abs(i)/400,.12))},ge=t=>{if(!F)return;F=!1;const i=ee-t.clientY;if(Math.abs(i)>d.DRAG_THRESHOLD){V(H+i*1.1);return}de(H+i*1.1)},ue=()=>{F&&(F=!1,Y=!1,de(H+te*1.1))},De=()=>{if(Y){Y=!1;return}V()};n.onMount(()=>(window.addEventListener("pointermove",_e),window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ue),()=>{P=!0,$?.abort(),clearTimeout(oe),clearTimeout(K),window.removeEventListener("pointermove",_e),window.removeEventListener("pointerup",ge),window.removeEventListener("pointercancel",ue),_?.cancel()}));var Le={get program(){return S()},set program(t=null){S(t),e.flushSync()},get endpoint(){return G()},set endpoint(t=null){G(t),e.flushSync()},get session(){return q()},set session(t=null){q(t),e.flushSync()},get isAvailable(){return v()},set isAvailable(t=!1){v(t),e.flushSync()},get spinResults(){return B()},set spinResults(t=null){B(t),e.flushSync()},get spinActive(){return u()},set spinActive(t=!1){u(t),e.flushSync()},get remainingTimesLoading(){return U()},set remainingTimesLoading(t=!1){U(t),e.flushSync()},get onFlip(){return J()},set onFlip(t=()=>{}){J(t),e.flushSync()}},fe=it(),ne=e.first_child(fe),pe=e.child(ne),f=e.child(pe);let ve;var me=e.child(f);n.bind_this(me,t=>e.set(M,t),()=>e.get(M));var X=e.sibling(me,2),he=e.sibling(e.child(X),2);n.bind_this(he,t=>e.set(A,t),()=>e.get(A));var ie=e.sibling(he,2),Ne=e.child(ie);e.reset(ie);var ye=e.sibling(ie,2),Ye=e.child(ye);e.reset(ye),e.reset(X),n.bind_this(X,t=>e.set(r,t),()=>e.get(r));var He=e.sibling(X,2);{var Oe=t=>{var i=Ke(),s=e.first_child(i);let o;var a=e.sibling(e.child(s),2),c=e.child(a,!0);e.reset(a),e.next(2),e.reset(s);var g=e.sibling(s,2);let p;e.template_effect(l=>{o=n.set_class(s,1,"coin-royale__drag-hint",null,o,{"coin-royale__drag-hint--hidden":e.get(I)||u()}),n.set_text(c,l),p=n.set_class(g,0,"coin-royale__finger-cue",null,p,{"coin-royale__finger-cue--hidden":e.get(I)||u()})},[()=>h()("dragToFlip")]),n.append(t,i)};n.if_block(He,t=>{v()&&t(Oe)})}e.reset(f),n.bind_this(f,t=>e.set(T,t),()=>e.get(T));var ze=e.sibling(f,2);{var Ge=t=>{var i=Qe(),s=e.child(i),o=e.child(s,!0);e.reset(s);var a=e.sibling(s,2),c=e.child(a,!0);e.reset(a),e.reset(i),e.template_effect((g,p)=>{n.set_text(o,g),n.set_text(c,p)},[()=>h()("nextAvailable"),()=>h()("countdown",{values:{days:e.get(L).days,hours:e.get(L).hours,minutes:e.get(L).minutes,seconds:e.get(L).seconds}})]),n.append(t,i)},qe=t=>{var i=et(),s=e.child(i),o=e.child(s,!0);e.reset(s);var a=e.sibling(s,2),c=e.child(a,!0);e.reset(a);var g=e.sibling(a,2),p=e.child(g,!0);e.reset(g),e.reset(i),e.template_effect((l,y,b)=>{n.set_text(o,l),n.set_text(c,y),n.set_text(p,b)},[()=>h()("timeoutTitle"),()=>h()("timeoutDescription"),()=>h()("close")]),n.delegated("click",g,Ce),n.append(t,i)};n.if_block(ze,t=>{v()?e.get(N)&&t(qe,1):t(Ge)})}e.reset(pe),e.reset(ne);var be=e.sibling(ne,2);{var Ue=t=>{var i=nt(),s=e.child(i),o=e.sibling(s),a=e.child(o),c=e.sibling(a,2);{var g=l=>{var y=tt();n.append(l,y)},p=l=>{var y=n.text();e.template_effect(()=>n.set_text(y,S()?.current?.remainingTimes??S()?.remainingTimes)),n.append(l,y)};n.if_block(c,l=>{U()?l(g):l(p,-1)})}e.reset(o),e.reset(i),e.template_effect(l=>{n.set_text(s,`${l??""} `),n.set_attribute(a,"src",Se.coinHeads)},[()=>h()("remainingFlips")]),n.append(t,i)};n.if_block(be,t=>{v()&&t(Ue)})}var W=e.sibling(be,2),$e=e.child(W,!0);e.reset(W),e.template_effect((t,i)=>{ve=n.set_class(f,1,"coin-royale__flip-zone",null,ve,{"coin-royale__flip-zone--disabled":!v(),"coin-royale__flip-zone--settling":u()}),n.set_attribute(f,"tabindex",v()?0:-1),n.set_attribute(f,"aria-label",t),n.set_attribute(f,"aria-disabled",!e.get(Q)),n.set_attribute(Ne,"src",Se.coinHeads),n.set_attribute(Ye,"src",Je.coinTails),W.disabled=!v(),n.set_text($e,i)},[()=>h()("flipCoin"),()=>h()("flipCoin")]),n.delegated("pointerdown",f,ke),n.delegated("click",f,De),n.delegated("keydown",f,t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),V())}),n.delegated("click",W,()=>V()),n.append(Me,fe);var Ve=e.pop(Le);return Ae(),Ve}n.delegate(["pointerdown","click","keydown"]);n.create_custom_element(Te,{program:{},endpoint:{},session:{},isAvailable:{},spinResults:{},spinActive:{},remainingTimesLoading:{},onFlip:{}},[],[],{mode:"open"});exports.CoinFlip=Te;