@everymatrix/mini-games-hub 0.2.7 → 0.2.8
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/CoinFlip-BOrc1Sgy.cjs +1 -0
- package/components/CoinFlip-DgM6tDy5.js +390 -0
- package/components/CoinFlip-DiCOvx3Q.cjs +1 -0
- package/components/CoinFlip-uc2aguuz.js +355 -0
- package/components/CoinRoyale-BH73ZSrU.cjs +734 -0
- package/components/CoinRoyale-Bkr3Rd-u.cjs +734 -0
- package/components/CoinRoyale-DLL1bCAy.js +1032 -0
- package/components/CoinRoyale-fp-xfwl2.js +994 -0
- package/components/{GameCard-C-zSlvo1.cjs → GameCard-BiO9Cay-.cjs} +2 -2
- package/components/{GameCard-BQ6hFy67.js → GameCard-D78hDMaL.js} +24 -21
- package/components/{GameCard-vgoswSWl.cjs → GameCard-Qh_fk15-.cjs} +2 -2
- package/components/{GameCard-B3YKo9k6.js → GameCard-jCZ6S2Wu.js} +23 -23
- package/components/MiniGamesHub-5tuj6CDm.cjs +16 -0
- package/components/{MiniGamesHub-C0q9vZFD.js → MiniGamesHub-Bf2Cd1bB.js} +269 -202
- package/components/{MiniGamesHub-D5Y5OYt-.js → MiniGamesHub-KqAdBJEX.js} +231 -167
- package/components/MiniGamesHub-SxucWl3S.cjs +16 -0
- package/components/{WheelOfFortune-DC57_QGF.js → WheelOfFortune-8HCl7aHv.js} +186 -175
- package/components/{WheelOfFortune-u6v6YLc5.js → WheelOfFortune-CBYo6vCg.js} +146 -138
- package/components/{WheelOfFortune-2WKhJAdZ.cjs → WheelOfFortune-CDTzbAjp.cjs} +2 -2
- package/components/{WheelOfFortune-BJ9iMr53.cjs → WheelOfFortune-XfmUFV3-.cjs} +2 -2
- package/components/{WheelOfFortuneDrawResults-BKkTmsVC.cjs → WheelOfFortuneDrawResults-CASEqNiM.cjs} +1 -1
- package/components/{WheelOfFortuneDrawResults-D3rgrYi_.js → WheelOfFortuneDrawResults-DqgsImHB.js} +3 -3
- package/components/{WheelOfFortuneDrawResults-gx2xkUtF.js → WheelOfFortuneDrawResults-DsfJ3803.js} +3 -3
- package/components/{WheelOfFortuneDrawResults-DTufAeXD.cjs → WheelOfFortuneDrawResults-l8iWZa_e.cjs} +1 -1
- package/components/WheelOfFortuneHistory-CF8B0i5m.js +213 -0
- package/components/WheelOfFortuneHistory-Cnk8otCw.js +213 -0
- package/components/WheelOfFortuneHistory-DARohsMs.cjs +12 -0
- package/components/WheelOfFortuneHistory-ld2sGzjI.cjs +12 -0
- package/components/{WheelOfFortuneRules-DkQOlpqR.js → WheelOfFortuneRules-BZqR4cT9.js} +27 -27
- package/components/WheelOfFortuneRules-Bv-d_VAp.cjs +3 -0
- package/components/{WheelOfFortuneRules-BM75DT61.js → WheelOfFortuneRules-CRGG3J0S.js} +23 -23
- package/components/WheelOfFortuneRules-DLj96pqu.cjs +3 -0
- package/components/{WheelOfFortuneWheel-DmTRvIN6.js → WheelOfFortuneWheel-CiyQZNAd.js} +673 -664
- package/components/WheelOfFortuneWheel-CrRAYCB1.cjs +3 -0
- package/components/WheelOfFortuneWheel-DGD-zfeE.cjs +3 -0
- package/components/{WheelOfFortuneWheel-D_tfW-rK.js → WheelOfFortuneWheel-F62aU_CL.js} +186 -178
- 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/{constants-BYsDpbRv.js → constants-BDSd8ptj.js} +25 -15
- package/components/constants-CoPH35Re.cjs +1 -0
- package/components/{sparkles-BnriHiyw.cjs → sparkles-9YGw1xiU.cjs} +1 -1
- package/components/{sparkles-DplvhrIm.cjs → sparkles-B3XdFovy.cjs} +1 -1
- package/components/{sparkles-CSfeD2Zu.js → sparkles-BWGIWWDc.js} +1 -1
- package/components/{sparkles-CTrQ372y.js → sparkles-uxV1OTbN.js} +1 -1
- package/components/{spin-controller-CIshWmlA.cjs → spin-controller-BXcblJt7.cjs} +1 -1
- package/components/{spin-controller-HS3m99tB.cjs → spin-controller-BzO5YNSN.cjs} +1 -1
- package/components/{spin-controller-BuBkKrNR.js → spin-controller-CZWa2gmm.js} +2 -2
- package/components/{spin-controller-REPdRwaB.js → spin-controller-D3hdDnQ0.js} +2 -2
- package/components/{utils-B86dsoC-.js → utils-3LNftCeZ.js} +976 -958
- package/components/utils-BxNmJ6YA.cjs +3 -0
- package/components/{utils-BtFS7k_l.js → utils-DGrEJJ_K.js} +1063 -1045
- package/components/utils-DyVEmMSf.cjs +3 -0
- package/es2015/mini-games-hub.cjs +1 -1
- package/es2015/mini-games-hub.js +1 -1
- package/esnext/mini-games-hub.cjs +1 -1
- package/esnext/mini-games-hub.js +1 -1
- package/package.json +1 -1
- package/components/MiniGamesHub-CfiDjCz7.cjs +0 -16
- package/components/MiniGamesHub-DYwmUNTy.cjs +0 -16
- package/components/WheelOfFortuneHistory-B-Yadw5p.js +0 -213
- package/components/WheelOfFortuneHistory-DdXxYW6M.cjs +0 -12
- package/components/WheelOfFortuneHistory-DhFZUmGd.cjs +0 -12
- package/components/WheelOfFortuneHistory-IM5H-der.js +0 -213
- package/components/WheelOfFortuneRules-D-xnWFIU.cjs +0 -3
- package/components/WheelOfFortuneRules-_a2c-LEy.cjs +0 -3
- package/components/WheelOfFortuneWheel-CUs0nOjA.cjs +0 -3
- package/components/WheelOfFortuneWheel-D9nXwM0H.cjs +0 -3
- package/components/constants-DM6Vdc6Z.cjs +0 -1
- package/components/utils-By_D2O28.cjs +0 -3
- package/components/utils-CSIl6eA7.cjs +0 -3
package/components/{WheelOfFortuneDrawResults-BKkTmsVC.cjs → WheelOfFortuneDrawResults-CASEqNiM.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./WheelOfFortuneWheel-
|
|
1
|
+
"use strict";const t=require("./WheelOfFortuneWheel-CrRAYCB1.cjs"),e=require("./utils-DyVEmMSf.cjs"),ce=require("./error-YyYl7p6_.cjs"),de=require("./sparkles-B3XdFovy.cjs");var E=t.from_html('<span class="button-spinner"></span>'),_e=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),L=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),pe=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),ue=t.from_html('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),me=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ve=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function U(J,w){e.push(w,!0);const r=()=>t.store_get(e.$format,"$_",H),[H,K]=t.setup_stores(),x=t.prop(w,"result",7),M=t.prop(w,"endpoint",7),F=t.prop(w,"session",7),P=t.prop(w,"liteMode",7,!1),T=t.prop(w,"onFetchRemainingTimes",7,()=>{}),D=e.user_derived(()=>x()?.success!==!0),A=e.user_derived(()=>x()?.type),O=e.user_derived(()=>e.get(A)==="noprize"),X=new Set(["loyalty"]),Y={bonus:r()("prizeBonus"),role:r()("prizeRole"),tournament:r()("prizeTournament"),ticket:r()("prizeTicket"),loyalty:r()("prizeLoyalty"),challenge:r()("prizeChallenge"),custom:r()("prizeCustom")},Z=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let R=e.state(void 0),m=e.state("initial"),d=e.state(null);e.user_effect(()=>{e.get(R)&&e.get(m)==="claimSuccess"&&!P()&&de.burstSuccessConfetti(e.get(R))}),e.user_effect(()=>{(e.get(O)||e.get(D))&&e.untrack(()=>T()())});const q=s=>{const a=new URL(`${M()}/v1/wof/draw/${x().lotteryProgramID}`),i=new Headers;F()&&i.append("X-SessionId",F()),i.append("Content-Type","application/json");const c={action:s,guid:x().guid};return fetch(a,{method:"PUT",headers:i,body:JSON.stringify(c)}).then(o=>o.json())},B=async()=>{e.set(d,"claim");try{const s=await q(0),a=e.normalizeDrawResult(s,"draw"),i=a?.state==="fulfilled"&&a?.completed,c=a?.state==="drawn"&&!a?.completed;i?e.set(m,"claimSuccess"):e.set(m,"claimFailed")}catch(s){console.log(s),e.set(m,"claimFailed")}finally{e.set(d,null),T()()}},Q=async()=>{e.set(d,"reject"),e.set(m,"initial");const s=T();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),await q(2),s?.()}catch(a){console.log(a)}finally{e.set(d,null)}},V=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},W=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var $={get result(){return x()},set result(s){x(s),e.flushSync()},get endpoint(){return M()},set endpoint(s){M(s),e.flushSync()},get session(){return F()},set session(s){F(s),e.flushSync()},get liteMode(){return P()},set liteMode(s=!1){P(s),e.flushSync()},get onFetchRemainingTimes(){return T()},set onFetchRemainingTimes(s=()=>{}){T(s),e.flushSync()}},C=ve(),G=e.child(C);t.bind_this(G,s=>e.set(R,s),()=>e.get(R));var I=e.sibling(G,2);{var ee=s=>{var a=_e(),i=e.child(a),c=e.only_child(i,!0),o=e.sibling(i,2);t.html(o,()=>r()("rejectWarningText"),!0),e.reset(o);var _=e.sibling(o,2),n=e.child(_),l=e.child(n);let p;var u=e.only_child(l,!0),g=e.sibling(l,2);{var h=y=>{var S=E();t.append(y,S)};t.if_block(g,y=>{e.get(d)==="claim"&&y(h)})}e.reset(n);var k=e.sibling(n,2),b=e.child(k);let j;var f=e.only_child(b,!0),v=e.sibling(b,2);{var z=y=>{var S=E();t.append(y,S)};t.if_block(v,y=>{e.get(d)==="reject"&&y(z)})}e.reset(k),e.reset(_),e.reset(a),e.template_effect((y,S,oe)=>{t.set_text(c,y),n.disabled=!!e.get(d),p=t.set_style(l,"",p,{opacity:e.get(d)==="claim"?0:1}),t.set_text(u,S),k.disabled=!!e.get(d),j=t.set_style(b,"",j,{opacity:e.get(d)==="reject"?0:1}),t.set_text(f,oe)},[()=>r()("areYouSure"),()=>r()("keepPrize"),()=>r()("rejectPrize")]),t.delegated("click",n,B),t.delegated("click",k,Q),t.append(s,a)};t.if_block(I,s=>{e.get(m)==="rejectModal"&&s(ee)})}var N=e.sibling(I,2),te=e.child(N);{var se=s=>{var a=L(),i=e.first_child(a),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,g,h)=>{t.set_text(c,u),t.set_text(_,g),t.set_text(p,h)},[()=>r()("prizeAssignedTitle"),()=>r()("prizeAssigned"),()=>r()("backToGame")]),t.delegated("click",l,V),t.append(s,a)},ae=s=>{var a=L(),i=e.first_child(a),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,g,h)=>{t.set_text(c,u),t.set_text(_,g),t.set_text(p,h)},[()=>r()("drawFailedTitle"),()=>r()("drawFailed"),()=>r()("backToGame")]),t.delegated("click",l,W),t.append(s,a)},re=s=>{var a=L(),i=e.first_child(a),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,g,h)=>{t.set_text(c,u),t.set_text(_,g),l.disabled=!!e.get(d),t.set_text(p,h)},[()=>r()("noPrizeTitle"),()=>r()("noPrize"),()=>r()("spinAgain")]),t.delegated("click",l,W),t.append(s,a)},ie=s=>{var a=ue(),i=e.first_child(a),c=e.child(i),o=e.sibling(c);t.each(o,17,()=>Z,t.index,(f,v)=>{var z=pe();e.template_effect(()=>t.set_style(z,`top:${e.get(v).t??""};left:${e.get(v).l??""};font-size:${e.get(v).s??""};animation-delay:${e.get(v).d??""}`)),t.append(f,z)}),e.reset(i);var _=e.sibling(i,2);t.html(_,()=>r()("success",{values:{prize:Y[e.get(A)],form:X.has(e.get(A))?"plural":"singular"}}),!0),e.reset(_);var n=e.sibling(_,2),l=e.child(n),p=e.child(l);let u;var g=e.only_child(p,!0),h=e.sibling(p,2);{var k=f=>{var v=E();t.append(f,v)};t.if_block(h,f=>{e.get(d)==="claim"&&f(k)})}e.reset(l);var b=e.sibling(l,2),j=e.only_child(b,!0);e.reset(n),e.template_effect((f,v,z)=>{t.set_text(c,`${f??""} `),l.disabled=!!e.get(d),u=t.set_style(p,"",u,{opacity:e.get(d)==="claim"?0:1}),t.set_text(g,v),b.disabled=!!e.get(d),t.set_text(j,z)},[()=>r()("congratulations"),()=>r()("claimReward"),()=>r()("reject")]),t.delegated("click",l,B),t.delegated("click",b,()=>e.set(m,"rejectModal")),t.append(s,a)},le=s=>{var a=me(),i=e.first_child(a),c=e.sibling(i,2),o=e.only_child(c,!0),_=e.sibling(c,2),n=e.child(_),l=e.only_child(n,!0);e.reset(_),e.template_effect((p,u)=>{t.set_attribute(i,"src",ce.Error),t.set_text(o,p),t.set_text(l,u)},[()=>r()("errorJSON"),()=>r()("backToGame")]),t.delegated("click",n,W),t.append(s,a)};t.if_block(te,s=>{e.get(m)==="claimSuccess"?s(se):e.get(m)==="claimFailed"?s(ae,1):e.get(O)?s(re,2):e.get(D)?s(le,-1):s(ie,3)})}e.reset(N),e.reset(C),t.append(J,C);var ne=e.pop($);return K(),ne}t.delegate(["click"]);t.create_custom_element(U,{result:{},endpoint:{},session:{},liteMode:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.WheelOfFortuneDrawResults=U;
|
package/components/{WheelOfFortuneDrawResults-D3rgrYi_.js → WheelOfFortuneDrawResults-DqgsImHB.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as Re, c as Se, p as W, r as Fe, i as B, b as h, s as je, f as j, e as Me, t as ne,
|
|
2
|
-
import { a5 as Le, ad as oe, L as t, ae as Ce, a9 as We, b3 as Be, b1 as Y,
|
|
1
|
+
import { d as Re, c as Se, p as W, r as Fe, i as B, b as h, s as je, f as j, e as Me, t as ne, k as d, u as N, q as R, h as Pe, j as Ae, g as Ee } from "./WheelOfFortuneWheel-F62aU_CL.js";
|
|
2
|
+
import { a5 as Le, ad as oe, L as t, ae as Ce, a9 as We, b3 as Be, b1 as Y, bc as Z, aU as D, b6 as f, b5 as o, ba as p, aJ as g, b7 as v, ar as F, b2 as G, b9 as De } from "./utils-3LNftCeZ.js";
|
|
3
3
|
import { E as Ge } from "./error-DJgbe-Bh.js";
|
|
4
|
-
import { a as Ue } from "./sparkles-
|
|
4
|
+
import { a as Ue } from "./sparkles-BWGIWWDc.js";
|
|
5
5
|
var Q = j('<span class="button-spinner"></span>'), Ie = j('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'), V = j('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), Je = j('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'), Ne = j('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>', 1), Oe = j('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), qe = j('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');
|
|
6
6
|
function He(le, M) {
|
|
7
7
|
Le(M, !0);
|
package/components/{WheelOfFortuneDrawResults-gx2xkUtF.js → WheelOfFortuneDrawResults-DsfJ3803.js}
RENAMED
|
@@ -14,10 +14,10 @@ var $ = (Y, R, a) => new Promise((Z, O) => {
|
|
|
14
14
|
}, M = (g) => g.done ? Z(g.value) : Promise.resolve(g.value).then(j, G);
|
|
15
15
|
M((a = a.apply(Y, R)).next());
|
|
16
16
|
});
|
|
17
|
-
import { d as Re, c as je, p as U, r as Me, i as I, b as y, s as Pe, f as C, e as Ae, t as ue, j as d, u as X,
|
|
18
|
-
import { a5 as We, ad as pe, L as s, ae as Be, a9 as Ge, b4 as Ue, b1 as ee, bb as te, b3 as o, b6 as f, aU as J, aJ as k,
|
|
17
|
+
import { d as Re, c as je, p as U, r as Me, i as I, b as y, s as Pe, f as C, e as Ae, t as ue, j as d, u as X, q as A, g as Ee, h as Le, l as Ce } from "./WheelOfFortuneWheel-CiyQZNAd.js";
|
|
18
|
+
import { a5 as We, ad as pe, L as s, ae as Be, a9 as Ge, b4 as Ue, b1 as ee, bb as te, b3 as o, b6 as f, aU as J, aJ as k, b7 as v, ba as m, ar as L, b2 as N, b9 as Ie } from "./utils-DGrEJJ_K.js";
|
|
19
19
|
import { E as Je } from "./error-DJgbe-Bh.js";
|
|
20
|
-
import { a as Ne } from "./sparkles-
|
|
20
|
+
import { a as Ne } from "./sparkles-uxV1OTbN.js";
|
|
21
21
|
var ae = C('<span class="button-spinner"></span>'), Oe = C('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'), se = C('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), qe = C('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'), He = C('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>', 1), Ke = C('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), Xe = C('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');
|
|
22
22
|
function Ye(Y, R) {
|
|
23
23
|
We(R, !0);
|
package/components/{WheelOfFortuneDrawResults-DTufAeXD.cjs → WheelOfFortuneDrawResults-l8iWZa_e.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=(C,x,a)=>new Promise((E,M)=>{var k=m=>{try{S(a.next(m))}catch(y){M(y)}},j=m=>{try{S(a.throw(m))}catch(y){M(y)}},S=m=>m.done?E(m.value):Promise.resolve(m.value).then(k,j);S((a=a.apply(C,x)).next())});const t=require("./WheelOfFortuneWheel-
|
|
1
|
+
"use strict";var B=(C,x,a)=>new Promise((E,M)=>{var k=m=>{try{S(a.next(m))}catch(y){M(y)}},j=m=>{try{S(a.throw(m))}catch(y){M(y)}},S=m=>m.done?E(m.value):Promise.resolve(m.value).then(k,j);S((a=a.apply(C,x)).next())});const t=require("./WheelOfFortuneWheel-DGD-zfeE.cjs"),e=require("./utils-BxNmJ6YA.cjs"),_e=require("./error-YyYl7p6_.cjs"),pe=require("./sparkles-9YGw1xiU.cjs");var G=t.from_html('<span class="button-spinner"></span>'),ue=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),I=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ve=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),me=t.from_html('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),ge=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),he=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function Q(C,x){e.push(x,!0);const a=()=>t.store_get(e.$format,"$_",E),[E,M]=t.setup_stores(),k=t.prop(x,"result",7),j=t.prop(x,"endpoint",7),S=t.prop(x,"session",7),m=t.prop(x,"liteMode",7,!1),y=t.prop(x,"onFetchRemainingTimes",7,()=>{}),N=e.user_derived(()=>{var s;return((s=k())==null?void 0:s.success)!==!0}),L=e.user_derived(()=>{var s;return(s=k())==null?void 0:s.type}),U=e.user_derived(()=>e.get(L)==="noprize"),V=new Set(["loyalty"]),D={bonus:a()("prizeBonus"),role:a()("prizeRole"),tournament:a()("prizeTournament"),ticket:a()("prizeTicket"),loyalty:a()("prizeLoyalty"),challenge:a()("prizeChallenge"),custom:a()("prizeCustom")},$=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let P=e.state(void 0),h=e.state("initial"),d=e.state(null);e.user_effect(()=>{e.get(P)&&e.get(h)==="claimSuccess"&&!m()&&pe.burstSuccessConfetti(e.get(P))}),e.user_effect(()=>{(e.get(U)||e.get(N))&&e.untrack(()=>y()())});const J=s=>{const r=new URL(`${j()}/v1/wof/draw/${k().lotteryProgramID}`),i=new Headers;S()&&i.append("X-SessionId",S()),i.append("Content-Type","application/json");const c={action:s,guid:k().guid};return fetch(r,{method:"PUT",headers:i,body:JSON.stringify(c)}).then(o=>o.json())},H=()=>B(this,null,function*(){e.set(d,"claim");try{const s=yield J(0),r=e.normalizeDrawResult(s,"draw"),i=(r==null?void 0:r.state)==="fulfilled"&&(r==null?void 0:r.completed),c=(r==null?void 0:r.state)==="drawn"&&!(r!=null&&r.completed);i?e.set(h,"claimSuccess"):e.set(h,"claimFailed")}catch(s){console.log(s),e.set(h,"claimFailed")}finally{e.set(d,null),y()()}}),ee=()=>B(this,null,function*(){e.set(d,"reject"),e.set(h,"initial");const s=y();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),yield J(2),s==null||s()}catch(r){console.log(r)}finally{e.set(d,null)}}),te=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},O=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var se={get result(){return k()},set result(s){k(s),e.flushSync()},get endpoint(){return j()},set endpoint(s){j(s),e.flushSync()},get session(){return S()},set session(s){S(s),e.flushSync()},get liteMode(){return m()},set liteMode(s=!1){m(s),e.flushSync()},get onFetchRemainingTimes(){return y()},set onFetchRemainingTimes(s=()=>{}){y(s),e.flushSync()}},q=he(),K=e.child(q);t.bind_this(K,s=>e.set(P,s),()=>e.get(P));var X=e.sibling(K,2);{var re=s=>{var r=ue(),i=e.child(r),c=e.only_child(i,!0),o=e.sibling(i,2);t.html(o,()=>a()("rejectWarningText"),!0),e.reset(o);var _=e.sibling(o,2),n=e.child(_),l=e.child(n);let p;var u=e.only_child(l,!0),b=e.sibling(l,2);{var w=v=>{var T=G();t.append(v,T)};t.if_block(b,v=>{e.get(d)==="claim"&&v(w)})}e.reset(n);var R=e.sibling(n,2),F=e.child(R);let A;var g=e.only_child(F,!0),f=e.sibling(F,2);{var z=v=>{var T=G();t.append(v,T)};t.if_block(f,v=>{e.get(d)==="reject"&&v(z)})}e.reset(R),e.reset(_),e.reset(r),e.template_effect((v,T,W)=>{t.set_text(c,v),n.disabled=!!e.get(d),p=t.set_style(l,"",p,{opacity:e.get(d)==="claim"?0:1}),t.set_text(u,T),R.disabled=!!e.get(d),A=t.set_style(F,"",A,{opacity:e.get(d)==="reject"?0:1}),t.set_text(g,W)},[()=>a()("areYouSure"),()=>a()("keepPrize"),()=>a()("rejectPrize")]),t.delegated("click",n,H),t.delegated("click",R,ee),t.append(s,r)};t.if_block(X,s=>{e.get(h)==="rejectModal"&&s(re)})}var Y=e.sibling(X,2),ae=e.child(Y);{var ie=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),t.set_text(p,w)},[()=>a()("prizeAssignedTitle"),()=>a()("prizeAssigned"),()=>a()("backToGame")]),t.delegated("click",l,te),t.append(s,r)},le=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),t.set_text(p,w)},[()=>a()("drawFailedTitle"),()=>a()("drawFailed"),()=>a()("backToGame")]),t.delegated("click",l,O),t.append(s,r)},ne=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),l.disabled=!!e.get(d),t.set_text(p,w)},[()=>a()("noPrizeTitle"),()=>a()("noPrize"),()=>a()("spinAgain")]),t.delegated("click",l,O),t.append(s,r)},oe=s=>{var r=me(),i=e.first_child(r),c=e.child(i),o=e.sibling(c);t.each(o,17,()=>$,t.index,(g,f)=>{var z=ve();e.template_effect(()=>{var v,T,W,Z;return t.set_style(z,`top:${(v=e.get(f).t)!=null?v:""};left:${(T=e.get(f).l)!=null?T:""};font-size:${(W=e.get(f).s)!=null?W:""};animation-delay:${(Z=e.get(f).d)!=null?Z:""}`)}),t.append(g,z)}),e.reset(i);var _=e.sibling(i,2);t.html(_,()=>a()("success",{values:{prize:D[e.get(L)],form:V.has(e.get(L))?"plural":"singular"}}),!0),e.reset(_);var n=e.sibling(_,2),l=e.child(n),p=e.child(l);let u;var b=e.only_child(p,!0),w=e.sibling(p,2);{var R=g=>{var f=G();t.append(g,f)};t.if_block(w,g=>{e.get(d)==="claim"&&g(R)})}e.reset(l);var F=e.sibling(l,2),A=e.only_child(F,!0);e.reset(n),e.template_effect((g,f,z)=>{t.set_text(c,`${g!=null?g:""} `),l.disabled=!!e.get(d),u=t.set_style(p,"",u,{opacity:e.get(d)==="claim"?0:1}),t.set_text(b,f),F.disabled=!!e.get(d),t.set_text(A,z)},[()=>a()("congratulations"),()=>a()("claimReward"),()=>a()("reject")]),t.delegated("click",l,H),t.delegated("click",F,()=>e.set(h,"rejectModal")),t.append(s,r)},ce=s=>{var r=ge(),i=e.first_child(r),c=e.sibling(i,2),o=e.only_child(c,!0),_=e.sibling(c,2),n=e.child(_),l=e.only_child(n,!0);e.reset(_),e.template_effect((p,u)=>{t.set_attribute(i,"src",_e.Error),t.set_text(o,p),t.set_text(l,u)},[()=>a()("errorJSON"),()=>a()("backToGame")]),t.delegated("click",n,O),t.append(s,r)};t.if_block(ae,s=>{e.get(h)==="claimSuccess"?s(ie):e.get(h)==="claimFailed"?s(le,1):e.get(U)?s(ne,2):e.get(N)?s(ce,-1):s(oe,3)})}e.reset(Y),e.reset(q),t.append(C,q);var de=e.pop(se);return M(),de}t.delegate(["click"]);t.create_custom_element(Q,{result:{},endpoint:{},session:{},liteMode:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.WheelOfFortuneDrawResults=Q;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { d as Aa, c as Fa, a as Oa, p as ia, o as Za, i as B, b as l, s as Da, f as m, e as Ga, g as na, h as pa, j as p, k as fa, l as va, m as _a, n as Ua, q as ca } from "./WheelOfFortuneWheel-CiyQZNAd.js";
|
|
2
|
+
import { a5 as qa, b1 as N, aQ as Ja, L as a, ar as M, a9 as Qa, aJ as H, b9 as Xa, b6 as u, aU as da, b4 as $a, b2 as V, b3 as s, b7 as v, ba as g, O as Ka, bh as xa, bb as ha } from "./utils-DGrEJJ_K.js";
|
|
3
|
+
var Na = m('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'), Va = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>', 1), ya = _a('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'), ba = _a('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'), Ya = m('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'), ae = m('<span class="pagination-ellipsis svelte-4la0az">…</span>'), ee = m("<button> </button>"), te = m('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'), se = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>', 1), re = m('<h2 class="no-history svelte-4la0az"> </h2>'), oe = m('<div class="history-list svelte-4la0az"><!></div>');
|
|
4
|
+
const le = {
|
|
5
|
+
hash: "svelte-4la0az",
|
|
6
|
+
code: ` *,
|
|
7
|
+
*::before,
|
|
8
|
+
*::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;} .history-list {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;} .history-grid {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;} .date-time-cell {display:flex;flex-direction:column;gap:2px;} .date-time-cell span:last-child {opacity:0.6;font-size:10px;} .lucky-wheel-history-item {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;} .lucky-wheel-history-header {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;} .history-icon {display:flex;align-items:center;justify-content:center;} .no-history {width:100%;font-size:14px;font-weight:400;margin-top:12px;} .lucky-wheel-pagination {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;} .pagination-pages {display:flex;align-items:center;gap:4px;} .pagination-ellipsis {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;} .pagination-button {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;} .pagination-button:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));} .pagination-button:disabled {opacity:0.4;cursor:not-allowed;} .pagination-page {min-width:32px;text-align:center;padding:6px 8px;} .pagination-nav {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;} .pagination-page.active {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
9
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
10
|
+
0%, 100% {
|
|
11
|
+
opacity: 0.3;
|
|
12
|
+
}
|
|
13
|
+
50% {
|
|
14
|
+
opacity: 0.6;
|
|
15
|
+
}
|
|
16
|
+
} .history-skeleton-row {pointer-events:none;
|
|
17
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;} .history-skeleton-bar {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;} .history-skeleton-bar--name {width:70%;} .history-skeleton-bar--icon {width:12px;height:12px;}`
|
|
18
|
+
};
|
|
19
|
+
function ie(ga, O) {
|
|
20
|
+
qa(O, !0), Oa(ga, le);
|
|
21
|
+
const t = () => Da($a, "$_", ma), [ma, za] = Ga(), Y = ia(O, "programId", 7), aa = ia(O, "endpoint", 7), Z = ia(O, "session", 7);
|
|
22
|
+
let D = N(!0), f = N(Ja([])), wa = N(!1);
|
|
23
|
+
const S = 10;
|
|
24
|
+
let d = N(1);
|
|
25
|
+
const G = ha(() => a(f) && a(f).length > 0 ? Math.ceil(a(f).length / S) : 1), ka = ha(() => a(f) && a(f).length > 0 ? a(f).slice((a(d) - 1) * S, a(d) * S) : []), Ca = {
|
|
26
|
+
bonus: t()("prizeBonus"),
|
|
27
|
+
role: t()("prizeRole"),
|
|
28
|
+
tournament: t()("prizeTournament"),
|
|
29
|
+
ticket: t()("prizeTicket"),
|
|
30
|
+
loyalty: t()("prizeLoyalty"),
|
|
31
|
+
challenge: t()("prizeChallenge"),
|
|
32
|
+
noprize: t()("noWin"),
|
|
33
|
+
custom: t()("prizeCustom")
|
|
34
|
+
}, La = ha(() => {
|
|
35
|
+
const e = a(G);
|
|
36
|
+
if (e <= 5)
|
|
37
|
+
return Array.from({ length: e }, (n, x) => x + 1);
|
|
38
|
+
const r = [], h = a(d);
|
|
39
|
+
r.push(1), h > 3 && r.push("...");
|
|
40
|
+
const i = Math.max(2, h - 1), L = Math.min(e - 1, h + 1);
|
|
41
|
+
for (let n = i; n <= L; n++)
|
|
42
|
+
r.push(n);
|
|
43
|
+
return h < e - 2 && r.push("..."), e > 1 && r.push(e), r;
|
|
44
|
+
}), ea = (e) => {
|
|
45
|
+
e < 1 || e > a(G) || (H(d, e, !0), window.scrollTo({ top: 0, behavior: "smooth" }));
|
|
46
|
+
}, Ia = () => {
|
|
47
|
+
H(D, !0);
|
|
48
|
+
const e = new URL(`${aa()}/v1/wof/outcome/${Y()}`), r = new Headers();
|
|
49
|
+
Z() && r.append("X-SessionId", Z()), fetch(e, { method: "GET", headers: r, cache: "no-store" }).then((i) => i.json()).then((i) => {
|
|
50
|
+
H(f, i == null ? void 0 : i.items.map((L) => Xa(L, "history")), !0), H(d, 1);
|
|
51
|
+
}).catch((i) => {
|
|
52
|
+
console.log(i), H(wa, !0);
|
|
53
|
+
}).finally(() => H(D, !1));
|
|
54
|
+
};
|
|
55
|
+
Za(() => {
|
|
56
|
+
Ia();
|
|
57
|
+
});
|
|
58
|
+
var Ma = {
|
|
59
|
+
get programId() {
|
|
60
|
+
return Y();
|
|
61
|
+
},
|
|
62
|
+
set programId(e) {
|
|
63
|
+
Y(e), da();
|
|
64
|
+
},
|
|
65
|
+
get endpoint() {
|
|
66
|
+
return aa();
|
|
67
|
+
},
|
|
68
|
+
set endpoint(e) {
|
|
69
|
+
aa(e), da();
|
|
70
|
+
},
|
|
71
|
+
get session() {
|
|
72
|
+
return Z();
|
|
73
|
+
},
|
|
74
|
+
set session(e) {
|
|
75
|
+
Z(e), da();
|
|
76
|
+
}
|
|
77
|
+
}, U = oe(), Ea = u(U);
|
|
78
|
+
{
|
|
79
|
+
var Ta = (e) => {
|
|
80
|
+
var r = Va(), h = V(r), i = s(u(h), 2), L = v(i, !0), n = s(i, 2), x = v(n, !0), z = s(n, 2), E = v(z, !0), ta = s(z, 2), q = v(ta, !0);
|
|
81
|
+
g(h);
|
|
82
|
+
var sa = s(h, 2);
|
|
83
|
+
na(sa, 17, () => Array(S), pa, (T, J, W, Q) => {
|
|
84
|
+
var P = Na(), X = u(P), ra = u(X);
|
|
85
|
+
ra.textContent = `${W + 1}.`, g(X), Ka(8), g(P), l(T, P);
|
|
86
|
+
}), M(
|
|
87
|
+
(T, J, W, Q) => {
|
|
88
|
+
p(L, T), p(x, J), p(E, W), p(q, Q);
|
|
89
|
+
},
|
|
90
|
+
[
|
|
91
|
+
() => t()("name"),
|
|
92
|
+
() => t()("date"),
|
|
93
|
+
() => t()("spin"),
|
|
94
|
+
() => t()("assigned")
|
|
95
|
+
]
|
|
96
|
+
), l(e, r);
|
|
97
|
+
}, Pa = (e) => {
|
|
98
|
+
var r = fa(), h = V(r);
|
|
99
|
+
{
|
|
100
|
+
var i = (n) => {
|
|
101
|
+
var x = se(), z = V(x), E = s(u(z), 2), ta = v(E, !0), q = s(E, 2), sa = v(q, !0), T = s(q, 2), J = v(T, !0), W = s(T, 2), Q = v(W, !0);
|
|
102
|
+
g(z);
|
|
103
|
+
var P = s(z, 2);
|
|
104
|
+
na(P, 17, () => a(ka), pa, (I, c, w) => {
|
|
105
|
+
var y = Ya(), R = u(y), A = v(R), b = s(R, 2), $ = v(b, !0), F = s(b, 2), K = u(F), oa = v(K, !0), k = s(K, 2), C = v(k, !0);
|
|
106
|
+
g(F);
|
|
107
|
+
var j = s(F, 2), la = u(j);
|
|
108
|
+
{
|
|
109
|
+
var ja = (o) => {
|
|
110
|
+
var _ = ya();
|
|
111
|
+
l(o, _);
|
|
112
|
+
}, Ba = (o) => {
|
|
113
|
+
var _ = ba();
|
|
114
|
+
l(o, _);
|
|
115
|
+
};
|
|
116
|
+
B(la, (o) => {
|
|
117
|
+
a(c).state === "drawn" || a(c).state === "fulfilled" ? o(ja) : o(Ba, -1);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
g(j);
|
|
121
|
+
var ua = s(j, 2), Ha = u(ua);
|
|
122
|
+
{
|
|
123
|
+
var Sa = (o) => {
|
|
124
|
+
var _ = ya();
|
|
125
|
+
l(o, _);
|
|
126
|
+
}, Wa = (o) => {
|
|
127
|
+
var _ = ba();
|
|
128
|
+
l(o, _);
|
|
129
|
+
};
|
|
130
|
+
B(Ha, (o) => {
|
|
131
|
+
a(c).completed && a(c).state === "fulfilled" ? o(Sa) : o(Wa, -1);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
g(ua), g(y), M(
|
|
135
|
+
(o, _) => {
|
|
136
|
+
p(A, `${(a(d) - 1) * S + w + 1}.`), p($, Ca[a(c).type] || "-"), p(oa, o), p(C, _);
|
|
137
|
+
},
|
|
138
|
+
[
|
|
139
|
+
() => xa(a(c).time).date,
|
|
140
|
+
() => xa(a(c).time).time
|
|
141
|
+
]
|
|
142
|
+
), l(I, y);
|
|
143
|
+
});
|
|
144
|
+
var X = s(P, 2);
|
|
145
|
+
{
|
|
146
|
+
var ra = (I) => {
|
|
147
|
+
var c = te(), w = u(c), y = s(w, 2);
|
|
148
|
+
na(y, 21, () => a(La), pa, (A, b) => {
|
|
149
|
+
var $ = fa(), F = V($);
|
|
150
|
+
{
|
|
151
|
+
var K = (k) => {
|
|
152
|
+
var C = ae();
|
|
153
|
+
l(k, C);
|
|
154
|
+
}, oa = (k) => {
|
|
155
|
+
var C = ee();
|
|
156
|
+
let j;
|
|
157
|
+
var la = v(C, !0);
|
|
158
|
+
M(() => {
|
|
159
|
+
j = Ua(C, 1, "pagination-button pagination-page svelte-4la0az", null, j, { active: a(d) === a(b) }), p(la, a(b));
|
|
160
|
+
}), ca("click", C, () => ea(a(b))), l(k, C);
|
|
161
|
+
};
|
|
162
|
+
B(F, (k) => {
|
|
163
|
+
a(b) === "..." ? k(K) : k(oa, -1);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
l(A, $);
|
|
167
|
+
}), g(y);
|
|
168
|
+
var R = s(y, 2);
|
|
169
|
+
g(c), M(
|
|
170
|
+
(A, b) => {
|
|
171
|
+
w.disabled = a(d) === 1, va(w, "aria-label", A), R.disabled = a(d) === a(G), va(R, "aria-label", b);
|
|
172
|
+
},
|
|
173
|
+
[() => t()("previous"), () => t()("next")]
|
|
174
|
+
), ca("click", w, () => ea(a(d) - 1)), ca("click", R, () => ea(a(d) + 1)), l(I, c);
|
|
175
|
+
};
|
|
176
|
+
B(X, (I) => {
|
|
177
|
+
a(G) > 1 && I(ra);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
M(
|
|
181
|
+
(I, c, w, y) => {
|
|
182
|
+
p(ta, I), p(sa, c), p(J, w), p(Q, y);
|
|
183
|
+
},
|
|
184
|
+
[
|
|
185
|
+
() => t()("name"),
|
|
186
|
+
() => t()("date"),
|
|
187
|
+
() => t()("spin"),
|
|
188
|
+
() => t()("assigned")
|
|
189
|
+
]
|
|
190
|
+
), l(n, x);
|
|
191
|
+
}, L = (n) => {
|
|
192
|
+
var x = re(), z = v(x, !0);
|
|
193
|
+
M((E) => p(z, E), [() => t()("noHistory")]), l(n, x);
|
|
194
|
+
};
|
|
195
|
+
B(h, (n) => {
|
|
196
|
+
a(f) && a(f).length > 0 ? n(i) : n(L, -1);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
l(e, r);
|
|
200
|
+
};
|
|
201
|
+
B(Ea, (e) => {
|
|
202
|
+
a(D) ? e(Ta) : e(Pa, -1);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
g(U), M(() => va(U, "aria-busy", a(D))), l(ga, U);
|
|
206
|
+
var Ra = Qa(Ma);
|
|
207
|
+
return za(), Ra;
|
|
208
|
+
}
|
|
209
|
+
Aa(["click"]);
|
|
210
|
+
Fa(ie, { programId: {}, endpoint: {}, session: {} }, [], [], { mode: "open" });
|
|
211
|
+
export {
|
|
212
|
+
ie as W
|
|
213
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { d as Aa, c as Fa, a as Oa, p as ia, o as Za, i as B, b as l, s as Da, f as m, e as Ga, g as na, h as pa, j as va, k as n, l as fa, m as _a, n as Ua, q as ca } from "./WheelOfFortuneWheel-F62aU_CL.js";
|
|
2
|
+
import { b1 as N, aQ as qa, ar as M, a9 as Ja, aU as da, a5 as Qa, b3 as Xa, b6 as u, L as a, ba as g, aJ as H, b9 as $a, b2 as V, b5 as s, b7 as p, O as Ka, bh as xa, bc as ha } from "./utils-3LNftCeZ.js";
|
|
3
|
+
var Na = m('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'), Va = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>', 1), ya = _a('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'), ba = _a('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'), Ya = m('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'), ae = m('<span class="pagination-ellipsis svelte-4la0az">…</span>'), ee = m("<button> </button>"), te = m('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'), se = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>', 1), re = m('<h2 class="no-history svelte-4la0az"> </h2>'), oe = m('<div class="history-list svelte-4la0az"><!></div>');
|
|
4
|
+
const le = {
|
|
5
|
+
hash: "svelte-4la0az",
|
|
6
|
+
code: ` *,
|
|
7
|
+
*::before,
|
|
8
|
+
*::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;} .history-list {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;} .history-grid {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;} .date-time-cell {display:flex;flex-direction:column;gap:2px;} .date-time-cell span:last-child {opacity:0.6;font-size:10px;} .lucky-wheel-history-item {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;} .lucky-wheel-history-header {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;} .history-icon {display:flex;align-items:center;justify-content:center;} .no-history {width:100%;font-size:14px;font-weight:400;margin-top:12px;} .lucky-wheel-pagination {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;} .pagination-pages {display:flex;align-items:center;gap:4px;} .pagination-ellipsis {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;} .pagination-button {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;} .pagination-button:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));} .pagination-button:disabled {opacity:0.4;cursor:not-allowed;} .pagination-page {min-width:32px;text-align:center;padding:6px 8px;} .pagination-nav {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;} .pagination-page.active {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
9
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
10
|
+
0%, 100% {
|
|
11
|
+
opacity: 0.3;
|
|
12
|
+
}
|
|
13
|
+
50% {
|
|
14
|
+
opacity: 0.6;
|
|
15
|
+
}
|
|
16
|
+
} .history-skeleton-row {pointer-events:none;
|
|
17
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;} .history-skeleton-bar {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;} .history-skeleton-bar--name {width:70%;} .history-skeleton-bar--icon {width:12px;height:12px;}`
|
|
18
|
+
};
|
|
19
|
+
function ie(ga, O) {
|
|
20
|
+
Qa(O, !0), Oa(ga, le);
|
|
21
|
+
const t = () => Da(Xa, "$_", ma), [ma, za] = Ga(), Y = ia(O, "programId", 7), aa = ia(O, "endpoint", 7), Z = ia(O, "session", 7);
|
|
22
|
+
let D = N(!0), f = N(qa([])), wa = N(!1);
|
|
23
|
+
const S = 10;
|
|
24
|
+
let d = N(1);
|
|
25
|
+
const G = ha(() => a(f) && a(f).length > 0 ? Math.ceil(a(f).length / S) : 1), ka = ha(() => a(f) && a(f).length > 0 ? a(f).slice((a(d) - 1) * S, a(d) * S) : []), Ca = {
|
|
26
|
+
bonus: t()("prizeBonus"),
|
|
27
|
+
role: t()("prizeRole"),
|
|
28
|
+
tournament: t()("prizeTournament"),
|
|
29
|
+
ticket: t()("prizeTicket"),
|
|
30
|
+
loyalty: t()("prizeLoyalty"),
|
|
31
|
+
challenge: t()("prizeChallenge"),
|
|
32
|
+
noprize: t()("noWin"),
|
|
33
|
+
custom: t()("prizeCustom")
|
|
34
|
+
}, La = ha(() => {
|
|
35
|
+
const e = a(G);
|
|
36
|
+
if (e <= 5)
|
|
37
|
+
return Array.from({ length: e }, (i, x) => x + 1);
|
|
38
|
+
const r = [], h = a(d);
|
|
39
|
+
r.push(1), h > 3 && r.push("...");
|
|
40
|
+
const c = Math.max(2, h - 1), L = Math.min(e - 1, h + 1);
|
|
41
|
+
for (let i = c; i <= L; i++)
|
|
42
|
+
r.push(i);
|
|
43
|
+
return h < e - 2 && r.push("..."), e > 1 && r.push(e), r;
|
|
44
|
+
}), ea = (e) => {
|
|
45
|
+
e < 1 || e > a(G) || (H(d, e, !0), window.scrollTo({ top: 0, behavior: "smooth" }));
|
|
46
|
+
}, Ia = () => {
|
|
47
|
+
H(D, !0);
|
|
48
|
+
const e = new URL(`${aa()}/v1/wof/outcome/${Y()}`), r = new Headers();
|
|
49
|
+
Z() && r.append("X-SessionId", Z()), fetch(e, { method: "GET", headers: r, cache: "no-store" }).then((c) => c.json()).then((c) => {
|
|
50
|
+
H(f, c?.items.map((L) => $a(L, "history")), !0), H(d, 1);
|
|
51
|
+
}).catch((c) => {
|
|
52
|
+
console.log(c), H(wa, !0);
|
|
53
|
+
}).finally(() => H(D, !1));
|
|
54
|
+
};
|
|
55
|
+
Za(() => {
|
|
56
|
+
Ia();
|
|
57
|
+
});
|
|
58
|
+
var Ma = {
|
|
59
|
+
get programId() {
|
|
60
|
+
return Y();
|
|
61
|
+
},
|
|
62
|
+
set programId(e) {
|
|
63
|
+
Y(e), da();
|
|
64
|
+
},
|
|
65
|
+
get endpoint() {
|
|
66
|
+
return aa();
|
|
67
|
+
},
|
|
68
|
+
set endpoint(e) {
|
|
69
|
+
aa(e), da();
|
|
70
|
+
},
|
|
71
|
+
get session() {
|
|
72
|
+
return Z();
|
|
73
|
+
},
|
|
74
|
+
set session(e) {
|
|
75
|
+
Z(e), da();
|
|
76
|
+
}
|
|
77
|
+
}, U = oe(), Ea = u(U);
|
|
78
|
+
{
|
|
79
|
+
var Ta = (e) => {
|
|
80
|
+
var r = Va(), h = V(r), c = s(u(h), 2), L = p(c, !0), i = s(c, 2), x = p(i, !0), z = s(i, 2), E = p(z, !0), ta = s(z, 2), q = p(ta, !0);
|
|
81
|
+
g(h);
|
|
82
|
+
var sa = s(h, 2);
|
|
83
|
+
pa(sa, 17, () => Array(S), va, (T, J, W, Q) => {
|
|
84
|
+
var P = Na(), X = u(P), ra = u(X);
|
|
85
|
+
ra.textContent = `${W + 1}.`, g(X), Ka(8), g(P), l(T, P);
|
|
86
|
+
}), M(
|
|
87
|
+
(T, J, W, Q) => {
|
|
88
|
+
n(L, T), n(x, J), n(E, W), n(q, Q);
|
|
89
|
+
},
|
|
90
|
+
[
|
|
91
|
+
() => t()("name"),
|
|
92
|
+
() => t()("date"),
|
|
93
|
+
() => t()("spin"),
|
|
94
|
+
() => t()("assigned")
|
|
95
|
+
]
|
|
96
|
+
), l(e, r);
|
|
97
|
+
}, Pa = (e) => {
|
|
98
|
+
var r = fa(), h = V(r);
|
|
99
|
+
{
|
|
100
|
+
var c = (i) => {
|
|
101
|
+
var x = se(), z = V(x), E = s(u(z), 2), ta = p(E, !0), q = s(E, 2), sa = p(q, !0), T = s(q, 2), J = p(T, !0), W = s(T, 2), Q = p(W, !0);
|
|
102
|
+
g(z);
|
|
103
|
+
var P = s(z, 2);
|
|
104
|
+
pa(P, 17, () => a(ka), va, (I, v, w) => {
|
|
105
|
+
var y = Ya(), R = u(y), A = p(R), b = s(R, 2), $ = p(b, !0), F = s(b, 2), K = u(F), oa = p(K, !0), k = s(K, 2), C = p(k, !0);
|
|
106
|
+
g(F);
|
|
107
|
+
var j = s(F, 2), la = u(j);
|
|
108
|
+
{
|
|
109
|
+
var ja = (o) => {
|
|
110
|
+
var _ = ya();
|
|
111
|
+
l(o, _);
|
|
112
|
+
}, Ba = (o) => {
|
|
113
|
+
var _ = ba();
|
|
114
|
+
l(o, _);
|
|
115
|
+
};
|
|
116
|
+
B(la, (o) => {
|
|
117
|
+
a(v).state === "drawn" || a(v).state === "fulfilled" ? o(ja) : o(Ba, -1);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
g(j);
|
|
121
|
+
var ua = s(j, 2), Ha = u(ua);
|
|
122
|
+
{
|
|
123
|
+
var Sa = (o) => {
|
|
124
|
+
var _ = ya();
|
|
125
|
+
l(o, _);
|
|
126
|
+
}, Wa = (o) => {
|
|
127
|
+
var _ = ba();
|
|
128
|
+
l(o, _);
|
|
129
|
+
};
|
|
130
|
+
B(Ha, (o) => {
|
|
131
|
+
a(v).completed && a(v).state === "fulfilled" ? o(Sa) : o(Wa, -1);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
g(ua), g(y), M(
|
|
135
|
+
(o, _) => {
|
|
136
|
+
n(A, `${(a(d) - 1) * S + w + 1}.`), n($, Ca[a(v).type] || "-"), n(oa, o), n(C, _);
|
|
137
|
+
},
|
|
138
|
+
[
|
|
139
|
+
() => xa(a(v).time).date,
|
|
140
|
+
() => xa(a(v).time).time
|
|
141
|
+
]
|
|
142
|
+
), l(I, y);
|
|
143
|
+
});
|
|
144
|
+
var X = s(P, 2);
|
|
145
|
+
{
|
|
146
|
+
var ra = (I) => {
|
|
147
|
+
var v = te(), w = u(v), y = s(w, 2);
|
|
148
|
+
pa(y, 21, () => a(La), va, (A, b) => {
|
|
149
|
+
var $ = fa(), F = V($);
|
|
150
|
+
{
|
|
151
|
+
var K = (k) => {
|
|
152
|
+
var C = ae();
|
|
153
|
+
l(k, C);
|
|
154
|
+
}, oa = (k) => {
|
|
155
|
+
var C = ee();
|
|
156
|
+
let j;
|
|
157
|
+
var la = p(C, !0);
|
|
158
|
+
M(() => {
|
|
159
|
+
j = Ua(C, 1, "pagination-button pagination-page svelte-4la0az", null, j, { active: a(d) === a(b) }), n(la, a(b));
|
|
160
|
+
}), ca("click", C, () => ea(a(b))), l(k, C);
|
|
161
|
+
};
|
|
162
|
+
B(F, (k) => {
|
|
163
|
+
a(b) === "..." ? k(K) : k(oa, -1);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
l(A, $);
|
|
167
|
+
}), g(y);
|
|
168
|
+
var R = s(y, 2);
|
|
169
|
+
g(v), M(
|
|
170
|
+
(A, b) => {
|
|
171
|
+
w.disabled = a(d) === 1, na(w, "aria-label", A), R.disabled = a(d) === a(G), na(R, "aria-label", b);
|
|
172
|
+
},
|
|
173
|
+
[() => t()("previous"), () => t()("next")]
|
|
174
|
+
), ca("click", w, () => ea(a(d) - 1)), ca("click", R, () => ea(a(d) + 1)), l(I, v);
|
|
175
|
+
};
|
|
176
|
+
B(X, (I) => {
|
|
177
|
+
a(G) > 1 && I(ra);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
M(
|
|
181
|
+
(I, v, w, y) => {
|
|
182
|
+
n(ta, I), n(sa, v), n(J, w), n(Q, y);
|
|
183
|
+
},
|
|
184
|
+
[
|
|
185
|
+
() => t()("name"),
|
|
186
|
+
() => t()("date"),
|
|
187
|
+
() => t()("spin"),
|
|
188
|
+
() => t()("assigned")
|
|
189
|
+
]
|
|
190
|
+
), l(i, x);
|
|
191
|
+
}, L = (i) => {
|
|
192
|
+
var x = re(), z = p(x, !0);
|
|
193
|
+
M((E) => n(z, E), [() => t()("noHistory")]), l(i, x);
|
|
194
|
+
};
|
|
195
|
+
B(h, (i) => {
|
|
196
|
+
a(f) && a(f).length > 0 ? i(c) : i(L, -1);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
l(e, r);
|
|
200
|
+
};
|
|
201
|
+
B(Ea, (e) => {
|
|
202
|
+
a(D) ? e(Ta) : e(Pa, -1);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
g(U), M(() => na(U, "aria-busy", a(D))), l(ga, U);
|
|
206
|
+
var Ra = Ja(Ma);
|
|
207
|
+
return za(), Ra;
|
|
208
|
+
}
|
|
209
|
+
Aa(["click"]);
|
|
210
|
+
Fa(ie, { programId: {}, endpoint: {}, session: {} }, [], [], { mode: "open" });
|
|
211
|
+
export {
|
|
212
|
+
ie as W
|
|
213
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";const t=require("./WheelOfFortuneWheel-CrRAYCB1.cjs"),e=require("./utils-DyVEmMSf.cjs");var me=t.from_html('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'),xe=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>',1),V=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'),Y=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'),ye=t.from_html('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'),be=t.from_html('<span class="pagination-ellipsis svelte-4la0az">…</span>'),ze=t.from_html("<button> </button>"),ke=t.from_html('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'),we=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>',1),Ce=t.from_html('<h2 class="no-history svelte-4la0az"> </h2>'),Le=t.from_html('<div class="history-list svelte-4la0az"><!></div>');const Ie={hash:"svelte-4la0az",code:` *,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;} .history-list {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;} .history-grid {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;} .date-time-cell {display:flex;flex-direction:column;gap:2px;} .date-time-cell span:last-child {opacity:0.6;font-size:10px;} .lucky-wheel-history-item {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;} .lucky-wheel-history-header {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;} .history-icon {display:flex;align-items:center;justify-content:center;} .no-history {width:100%;font-size:14px;font-weight:400;margin-top:12px;} .lucky-wheel-pagination {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;} .pagination-pages {display:flex;align-items:center;gap:4px;} .pagination-ellipsis {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;} .pagination-button {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;} .pagination-button:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));} .pagination-button:disabled {opacity:0.4;cursor:not-allowed;} .pagination-page {min-width:32px;text-align:center;padding:6px 8px;} .pagination-nav {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;} .pagination-page.active {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
4
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
5
|
+
0%, 100% {
|
|
6
|
+
opacity: 0.3;
|
|
7
|
+
}
|
|
8
|
+
50% {
|
|
9
|
+
opacity: 0.6;
|
|
10
|
+
}
|
|
11
|
+
} .history-skeleton-row {pointer-events:none;
|
|
12
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;} .history-skeleton-bar {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;} .history-skeleton-bar--name {width:70%;} .history-skeleton-bar--icon {width:12px;height:12px;}`};function ee(N,F){e.push(F,!0),t.append_styles(N,Ie);const s=()=>t.store_get(e.$format,"$_",te),[te,ae]=t.setup_stores(),Z=t.prop(F,"programId",7),q=t.prop(F,"endpoint",7),H=t.prop(F,"session",7);let S=e.state(!0),d=e.state(e.proxy([])),se=e.state(!1);const I=10;let p=e.state(1);const W=e.user_derived(()=>e.get(d)&&e.get(d).length>0?Math.ceil(e.get(d).length/I):1),le=e.user_derived(()=>e.get(d)&&e.get(d).length>0?e.get(d).slice((e.get(p)-1)*I,e.get(p)*I):[]),ie={bonus:s()("prizeBonus"),role:s()("prizeRole"),tournament:s()("prizeTournament"),ticket:s()("prizeTicket"),loyalty:s()("prizeLoyalty"),challenge:s()("prizeChallenge"),noprize:s()("noWin"),custom:s()("prizeCustom")},re=e.user_derived(()=>{const a=e.get(W);if(a<=5)return Array.from({length:a},(r,v)=>v+1);const l=[],c=e.get(p);l.push(1),c>3&&l.push("...");const n=Math.max(2,c-1),y=Math.min(a-1,c+1);for(let r=n;r<=y;r++)l.push(r);return c<a-2&&l.push("..."),a>1&&l.push(a),l}),G=a=>{a<1||a>e.get(W)||(e.set(p,a,!0),window.scrollTo({top:0,behavior:"smooth"}))},oe=()=>{e.set(S,!0);const a=new URL(`${q()}/v1/wof/outcome/${Z()}`),l=new Headers;H()&&l.append("X-SessionId",H()),fetch(a,{method:"GET",headers:l,cache:"no-store"}).then(n=>n.json()).then(n=>{e.set(d,n?.items.map(y=>e.normalizeDrawResult(y,"history")),!0),e.set(p,1)}).catch(n=>{console.log(n),e.set(se,!0)}).finally(()=>e.set(S,!1))};t.onMount(()=>{oe()});var ne={get programId(){return Z()},set programId(a){Z(a),e.flushSync()},get endpoint(){return q()},set endpoint(a){q(a),e.flushSync()},get session(){return H()},set session(a){H(a),e.flushSync()}},P=Le(),pe=e.child(P);{var ce=a=>{var l=xe(),c=e.first_child(l),n=e.sibling(e.child(c),2),y=e.only_child(n,!0),r=e.sibling(n,2),v=e.only_child(r,!0),_=e.sibling(r,2),z=e.only_child(_,!0),U=e.sibling(_,2),R=e.only_child(U,!0);e.reset(c);var X=e.sibling(c,2);t.each(X,17,()=>Array(I),t.index,(k,B,M,O)=>{var w=me(),j=e.child(w),$=e.child(j);$.textContent=`${M+1}.`,e.reset(j),e.next(8),e.reset(w),t.append(k,w)}),e.template_effect((k,B,M,O)=>{t.set_text(y,k),t.set_text(v,B),t.set_text(z,M),t.set_text(R,O)},[()=>s()("name"),()=>s()("date"),()=>s()("spin"),()=>s()("assigned")]),t.append(a,l)},de=a=>{var l=t.comment(),c=e.first_child(l);{var n=r=>{var v=we(),_=e.first_child(v),z=e.sibling(e.child(_),2),U=e.only_child(z,!0),R=e.sibling(z,2),X=e.only_child(R,!0),k=e.sibling(R,2),B=e.only_child(k,!0),M=e.sibling(k,2),O=e.only_child(M,!0);e.reset(_);var w=e.sibling(_,2);t.each(w,17,()=>e.get(le),t.index,(b,o,u)=>{var g=ye(),C=e.child(g),T=e.only_child(C),h=e.sibling(C,2),A=e.only_child(h,!0),E=e.sibling(h,2),D=e.child(E),J=e.only_child(D,!0),m=e.sibling(D,2),x=e.only_child(m,!0);e.reset(E);var L=e.sibling(E,2),K=e.child(L);{var ge=i=>{var f=V();t.append(i,f)},he=i=>{var f=Y();t.append(i,f)};t.if_block(K,i=>{e.get(o).state==="drawn"||e.get(o).state==="fulfilled"?i(ge):i(he,-1)})}e.reset(L);var Q=e.sibling(L,2),fe=e.child(Q);{var _e=i=>{var f=V();t.append(i,f)},ue=i=>{var f=Y();t.append(i,f)};t.if_block(fe,i=>{e.get(o).completed&&e.get(o).state==="fulfilled"?i(_e):i(ue,-1)})}e.reset(Q),e.reset(g),e.template_effect((i,f)=>{t.set_text(T,`${(e.get(p)-1)*I+u+1}.`),t.set_text(A,ie[e.get(o).type]||"-"),t.set_text(J,i),t.set_text(x,f)},[()=>e.formatDateTimeForHistory(e.get(o).time).date,()=>e.formatDateTimeForHistory(e.get(o).time).time]),t.append(b,g)});var j=e.sibling(w,2);{var $=b=>{var o=ke(),u=e.child(o),g=e.sibling(u,2);t.each(g,21,()=>e.get(re),t.index,(T,h)=>{var A=t.comment(),E=e.first_child(A);{var D=m=>{var x=be();t.append(m,x)},J=m=>{var x=ze();let L;var K=e.only_child(x,!0);e.template_effect(()=>{L=t.set_class(x,1,"pagination-button pagination-page svelte-4la0az",null,L,{active:e.get(p)===e.get(h)}),t.set_text(K,e.get(h))}),t.delegated("click",x,()=>G(e.get(h))),t.append(m,x)};t.if_block(E,m=>{e.get(h)==="..."?m(D):m(J,-1)})}t.append(T,A)}),e.reset(g);var C=e.sibling(g,2);e.reset(o),e.template_effect((T,h)=>{u.disabled=e.get(p)===1,t.set_attribute(u,"aria-label",T),C.disabled=e.get(p)===e.get(W),t.set_attribute(C,"aria-label",h)},[()=>s()("previous"),()=>s()("next")]),t.delegated("click",u,()=>G(e.get(p)-1)),t.delegated("click",C,()=>G(e.get(p)+1)),t.append(b,o)};t.if_block(j,b=>{e.get(W)>1&&b($)})}e.template_effect((b,o,u,g)=>{t.set_text(U,b),t.set_text(X,o),t.set_text(B,u),t.set_text(O,g)},[()=>s()("name"),()=>s()("date"),()=>s()("spin"),()=>s()("assigned")]),t.append(r,v)},y=r=>{var v=Ce(),_=e.only_child(v,!0);e.template_effect(z=>t.set_text(_,z),[()=>s()("noHistory")]),t.append(r,v)};t.if_block(c,r=>{e.get(d)&&e.get(d).length>0?r(n):r(y,-1)})}t.append(a,l)};t.if_block(pe,a=>{e.get(S)?a(ce):a(de,-1)})}e.reset(P),e.template_effect(()=>t.set_attribute(P,"aria-busy",e.get(S))),t.append(N,P);var ve=e.pop(ne);return ae(),ve}t.delegate(["click"]);t.create_custom_element(ee,{programId:{},endpoint:{},session:{}},[],[],{mode:"open"});exports.WheelOfFortuneHistory=ee;
|