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