@everymatrix/casino-engagement-suite-tournament 1.59.2 → 1.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/index.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/{p-1cdbfb3e.entry.js → p-10e1f844.entry.js} +1 -1
- package/dist/casino-engagement-suite-tournament/p-94a5935e.js +15 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +1 -1
- package/dist/cjs/{casino-engagement-suite-tournament-21274e02.js → casino-engagement-suite-tournament-9276045b.js} +113 -81
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +87 -10
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +4 -3
- package/dist/collection/shared/renders.page.js +20 -16
- package/dist/collection/shared/renders.tab.js +15 -8
- package/dist/collection/shared/renders.util.js +14 -15
- package/dist/collection/utils/message.js +1 -1
- package/dist/collection/utils/translations.js +1 -1
- package/dist/collection/utils/util.date.js +7 -0
- package/dist/collection/utils/utils.js +28 -0
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +1 -1
- package/dist/esm/{casino-engagement-suite-tournament-75dbe0da.js → casino-engagement-suite-tournament-e9186545.js} +113 -81
- package/dist/esm/index.js +1 -1
- package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +2 -0
- package/dist/types/shared/renders.page.d.ts +1 -1
- package/dist/types/shared/renders.tab.d.ts +2 -2
- package/dist/types/shared/renders.util.d.ts +2 -2
- package/dist/types/utils/api.apdater.d.ts +1 -0
- package/dist/types/utils/bussiness.d.ts +1 -0
- package/dist/types/utils/translations.d.ts +2 -0
- package/dist/types/utils/types.d.ts +3 -2
- package/dist/types/utils/util.date.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +8 -0
- package/package.json +1 -1
- package/dist/casino-engagement-suite-tournament/p-376260a6.js +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as n}from"./p-7dd52ef4.js";export{s as setNonce}from"./p-7dd52ef4.js";import{g as e}from"./p-e1255160.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((async t=>(await e(),n([["p-
|
|
1
|
+
import{p as t,b as n}from"./p-7dd52ef4.js";export{s as setNonce}from"./p-7dd52ef4.js";import{g as e}from"./p-e1255160.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((async t=>(await e(),n([["p-10e1f844",[[1,"casino-engagement-suite-tournament",{language:[1],show:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],device:[1],leaderboardsInit:[16],tab:[32],locale:[32],tournamentItem:[32],tournamentList:[32],leaderboards:[32],isActionJoinPending:[32],isDialogOpen:[32],isShowInfo:[32],page:[32],tournamentInDialog:[32],dialog:[32],time:[32],newIdList:[32]},[[8,"message","handleEvent"]],{newIdList:["checkNewIdList"],tournamentList:["syncBarState"],show:["showPropWatcher"]}],[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],t))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoEngagementSuiteTournament}from"./p-
|
|
1
|
+
export{C as CasinoEngagementSuiteTournament}from"./p-94a5935e.js";import"./p-7dd52ef4.js";import"@everymatrix/general-animation-loading/dist";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,g as r}from"./p-7dd52ef4.js";export{C as casino_engagement_suite_tournament}from"./p-
|
|
1
|
+
import{r as e,h as t,g as r}from"./p-7dd52ef4.js";export{C as casino_engagement_suite_tournament}from"./p-94a5935e.js";import"@everymatrix/general-animation-loading/dist";const s=class{constructor(t){e(this,t),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent||this.indeterminate}}getProgressBarLineTemplate(){return t("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return t("div",{key:"ecce3a26a92d2e090c1db84bdc1bdbeb505080ed",class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{key:"649fe1103d222200f2a1ad3b5967e37da1f1ab3d",class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{key:"49dc180eedd823f0027f75099813fb9d91bcd938",name:"Title"},t("div",{key:"e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5"})),t("slot",{key:"3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e",name:"Percent"},t("div",{key:"6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad",class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{key:"141106e77caad7b04bb199f911e87c0c6f0adc2d",class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return r(this)}};s.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";const i=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(t=this.translationUrl,r=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{r[e]=r[e]?r[e]:{};for(let s in t[e])r[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,r;return await Promise.all(e)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r(this)}};i.style=":host{display:block}";export{s as casino_engagement_suite_progress_bar,i as general_styling_wrapper}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{h as e,H as t,r as i,c as r}from"./p-7dd52ef4.js";import"@everymatrix/general-animation-loading/dist";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */function a(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(i[r[a]]=e[r[a]])}return i}var n,o;!function(e){e.info="info",e.leaderboard="leaderboard",e.games="games"}(n||(n={})),function(e){e.Starts="Starts",e.Ends="Ends"}(o||(o={}));const s=(e,t)=>(Object.keys(t).map((i=>{e=e.replace(`{${i}}`,t[i])})),e),d=Object.assign(Object.assign(Object.assign({Join:"Join",Unjoin:"Unjoin"},n),o),{TC:"Terms & Conditions",ScoreCriteria:"Score Criteria",MinimumBetCriteria:"Minimum bet criteria",Place:"place",Prizes:"Rewards",LeaderboardDetails:"Leaderboard Details",UnjoinDialog:{Title:"Quit Leaderboard?",Description:"Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?",ButtonYes:"Yes, I want to quit leaderboard",ButtonNo:"No, Stay on the leaderboard"},WinDialog:{Tile:"Congratulations!",Description:"You won <span>{tournamentName}</span>!",ButtonContinue:"Continue"},NoLeaderboards:"No Leaderboards yet",NoLeaderboardsTip:"Try winning tickets to Leaderboards as rewards or launching other booster games",Leaderboards:"Leaderboards",TipPrize:"You took <span>{place}</span> place and win <span>{prize}</span>",Tip:"Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.",TournamentNotStarted:"The leaderboard is not started yet. <br> It will start in {startTime}.",BeOne:"No winners for the time being. Be one of them!"}),l=(...e)=>{let t=[];return e.map((e=>{switch(typeof e){case"string":t.push(e);break;case"object":Object.keys(e).map((i=>{e[i]&&t.push(i)}))}})),t.join(" ")};var c,p,g;!function(e){e.list="list",e.item="item"}(c||(c={})),function(e){e.Running="Running",e.Unstarted="Unstarted",e.Closed="Closed",e.Closing="Closing"}(p||(p={})),function(e){e.unjoin="unjoin",e.tip="tip",e.gift="gift"}(g||(g={}));const m=e=>[p.Closed,p.Closing].includes(e.state),b=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),u=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg"}),h=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),x=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),v=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg"}),f=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg"}),w=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg"}),y=t=>{var{statedClasses:i,innerHTML:r}=t,n=a(t,["statedClasses","innerHTML"]);const{isHollow:o,isPending:s}=i;return e("button",Object.assign({class:l("GradientRoundedButton","GradientRounded",{Hollow:o||!1,Pending:s||!1})},n),e("span",null,r))};var C;!function(e){e.normal="normal",e.unjoinYes="unjoinYes",e.unjoinNo="unjoinNo"}(C||(C={}));const L=(e,t)=>{const{locale:i}=e,r={normal:{innerHTML:i.WinDialog.ButtonContinue},unjoinYes:{onClick:()=>e.actionJoin(e.dialog.data),innerHTML:i.UnjoinDialog.ButtonYes},unjoinNo:{statedClasses:{isHollow:!0},innerHTML:i.UnjoinDialog.ButtonNo}}[t];return y({statedClasses:Object.assign({isPending:e.isActionJoinPending},r.statedClasses),onClick:()=>{var t;null===(t=r.onClick)||void 0===t||t.call(),e.closeDialog()},innerHTML:r.innerHTML})},T={gift(t){const{name:i}=t.gifts[0],{locale:r}=t;return e("div",{class:"PageConfirmContainer"},e("div",{class:"PageConfirm"},e("div",null,w),e("div",{class:"Title"},r.WinDialog.Tile),e("div",{class:"Description",innerHTML:s(r.WinDialog.Description,{tournamentName:i})}),e("div",{class:"PageConfirmButtonsGroup"},L(t,C.normal))))},unjoin(t){const{locale:i}=t;return e("div",{class:"DialogContentUnjoin"},e("div",{class:"DialogContentUnjoinTitle"},i.UnjoinDialog.Title),e("div",{class:"DialogContentUnjoinDescription",innerHTML:i.UnjoinDialog.Description}),L(t,C.unjoinYes),L(t,C.unjoinNo))}},k=e=>{const t=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],i={};return Object.keys(e).map((r=>{const a=e[r];i[r]="games"===r?a.items:t.includes(r)?new Date(a):a})),i},F=e=>{let{item:t,items:i}=e;return t?i.map((e=>t&&t.userID===e.userID?Object.assign(Object.assign({},e),{isMe:!0}):e)):i},z=t=>{const{left:i,middle:r,right:a}=t,n={left:i,middle:r,right:a};return e("div",{class:"WrapperBar"},Object.keys(n).map((t=>{return e("div",{class:"WrapperBar"+(i=t,i.split("").map(((e,t)=>0===t?e.toUpperCase():e)).join(""))},n[t]||"");var i})))};function j(e){return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(" at",",")}function P(e,t){return(100*((new Date).getTime()-e.getTime())/(t.getTime()-e.getTime())).toFixed(0)}function R(e,t){const i=Math.abs(t.getTime()-e.getTime()),r=Math.floor(i/864e5),a=Math.floor(i%864e5/36e5),n=Math.floor(i%36e5/6e4);return`${String(r).padStart(2,"0")}d:${String(a).padStart(2,"0")}h:${String(n).padStart(2,"0")}m`}const U=t=>e("section",{class:"TimeContainer"},e("div",{class:"Time"},"Running"===t.state?[e("div",null,R(new Date,t.endTime)),e("div",null,y({statedClasses:{isHollow:!0,isPendding:!1},innerHTML:`${P(t.startTime,t.endTime)}%`}))]:[e("div",null,j(t.startTime)),e("div",null,j(t.endTime))]),e("casino-engagement-suite-progress-bar",{value:Number(P(t.startTime,t.endTime)),"hide-percent":!0})),M=e=>window.postMessage({type:"UpdateLeaderboardState",labels:e}),I=e=>window.postMessage({type:"UpdateTournamentsItemReq",id:e.id}),O=(e,t)=>window.postMessage({type:"UpdateLeaderboardsReq",id:e.id,query:t}),H=(e,t)=>{const{success:i}=t;if(i)switch(e.tournamentItem=Object.assign(Object.assign({},e.tournamentItem),{isPlayerAcknowledged:!e.tournamentItem.isPlayerAcknowledged}),e.page){case c.item:break;case c.list:B(e,e.tournamentItem)}e.nextPage&&(e.setPage(e.nextPage),e.nextPage=void 0),e.isActionJoinPending=!1},B=(e,t)=>{e.tournamentList=e.tournamentList.map((e=>e.id===t.id?k(t):e))},S=(e,t)=>{e.tournamentList=e.tournamentList.filter((e=>e.id!==t.id))},D=(e,t)=>{const i=e.tournamentList.findIndex((e=>e.id===t.id));-1!==i?e.tournamentList[i]=k(t):e.tournamentList=e.tournamentList.concat(k(t))},W={list(t){var i;if(!t.tournamentList)return t.tournamentList=null===(i=t.leaderboardsInit)||void 0===i?void 0:i.map((e=>k(e))),e("general-animation-loading",null);const{locale:r}=t;if(t.tournamentList.length){const i=e=>{t.setPage(c.item,{tournament:e}),t.newIdList=t.newIdList.filter((t=>t!==e.id))};return G(t,e("div",{class:"Leaderboards Row"},t.tournamentList.map((r=>e("div",{class:l("LeaderboardsItem",r.isPlayerAcknowledged?" GradientRounded Hollow":""),onClick:()=>i(r)},e("div",{class:"LeaderboardsItemContainer"},N(t,r),U(r)),e("div",{class:"LeaderboardLabels"},t.newIdList.includes(r.id)&&e("div",{class:"LeaderboardLabel"},e("span",null,"new"))))))))}return G(t,e("div",{class:"NoLeaderboards Row"},e("div",null,r.NoLeaderboards),e("div",null,r.NoLeaderboardsTip)))},item:t=>t.tournamentItem?G(t,[N(t,t.tournamentItem),(()=>{const{locale:i,tab:r}=t;return e("div",{class:"TabsContainer"},e("div",{class:"Tabs"},Object.keys(n).map((a=>e("div",{class:l({active:r===a}),onClick:()=>(e=>{switch(t.tab=e,e){case n.leaderboard:t.leaderboards=void 0,O(t.tournamentItem);break;case n.games:I(t.tournamentItem)}})(a)},i[a])))))})(),t.renders.tab[t.tab]()]):e("general-animation-loading",null)},N=(t,i)=>{const{locale:r}=t;return e("div",{class:"TitleContainer"},e("div",{class:"Title"},i.nameOrTitle),i.state!==p.Closed&&e("div",null,y({statedClasses:{isHollow:i.isPlayerAcknowledged,isPending:t.isActionJoinPending},onClick:e=>{e.stopPropagation(),t.isActionJoinPending||(e=>{e.isPlayerAcknowledged?t.openDialog(g.unjoin,e):(t.actionJoin(e),t.tournamentItem=e)})(i)},innerHTML:i.isPlayerAcknowledged?r.Unjoin:r.Join})))},G=(t,i)=>{const{dialog:{isOpen:r}}=t,a=z({right:e("span",{onClick:()=>t.closeDialog()},b)});return e("div",{class:`Wrapper ${t.device}`},e("div",{class:l("WrapperContent",{faded:r})},(()=>{const{left:i,middle:r}=(()=>{const{page:i,locale:r}=t;switch(i){case c.list:return{left:e("span",{onClick:()=>t.openDialog(g.tip)},u),middle:r.Leaderboards};case c.item:return{left:e("span",{onClick:()=>t.setPage(c.list)},v),middle:r.Leaderboards}}})();return z({left:i,middle:r,right:e("span",{onClick:()=>t.close.emit()},b)})})(),e("div",{class:"Root"},e("div",{class:"Main"},i))),e("div",{class:"WrapperUtil"},e("dialog",{open:r},e("div",{class:"GradientRounded Hollow"},a,r&&(()=>{switch(t.dialog.type){case g.unjoin:return t.renders.dialog.unjoin();case g.tip:return e("div",{class:"Tip"},t.locale.Tip);case g.gift:return t.renders.dialog.gift()}})()))))},E={info(t){var i,r;const{locale:a,tournamentItem:n,isShowInfo:o}=t;return e("div",{class:"InfoContainer"},U(n),e("section",{class:"ShowInfo",onClick:()=>t.isShowInfo=!t.isShowInfo},e("p",null,e("span",null,o?x:h),e("span",null,a.LeaderboardDetails))),e("div",{class:"ContentScrollContainer "+(o?"expanded":"")},o&&e("section",{class:"Info"},e("div",null,n.description),e("div",{class:"Criterias"},e("div",null,a.ScoreCriteria,": ",e("span",null,n.scoreCriteria)),e("div",null,a.MinimumBetCriteria,": ",e("span",null,n.minBetCount))),!!n.termsUrl&&e("div",{class:"TC"},e("a",{href:n.termsUrl,target:"_blank"},a.TC))),m(t.tournamentItem)&&(null===(i=t.leaderboards)||void 0===i?void 0:i.find((e=>e.isMe)))&&e("section",{class:"ResultPrize",innerHTML:s(a.TipPrize,q(null===(r=t.leaderboards)||void 0===r?void 0:r.find((e=>e.isMe))))}),e("section",{class:"PrizesContainer"},e("div",{class:"PrizesHeader"},f,e("span",{class:"PrizesText"},a.Prizes)),e("div",{class:"Prizes"},n.prizes.map(((t,i)=>e("div",{class:"Prize"},i+1," ",a.Place,": ",e("span",{class:"PrizeText"},t.name))))))))},leaderboard(t){const{locale:i,tournamentItem:r}=t;if("Unstarted"===(null==r?void 0:r.state)){const t=R(null==r?void 0:r.startTime,new Date);return e("div",{class:"LeaderboardUnstarted",innerHTML:s(i.TournamentNotStarted,{startTime:t})})}return t.leaderboards?t.leaderboards.length?e("table",{class:"Leaderboards"},t.leaderboards.map((t=>e("tr",{class:l({isMe:t.isMe})},e("td",{class:"LeaderboardRank"},e("span",null,t.rank)),e("td",{class:"LeaderboardName"},t.shortName),e("td",{class:"LeaderboardScore"},((e,t,i=!1)=>{const r=Number(e);if(isNaN(r))throw new Error("Input must be a valid number or string that can be converted to number");if(i&&!r.toString().includes("."))return e;if(0===t)return Math.floor(r);const a=Math.pow(10,t);return(Math.floor(r*a)/a).toFixed(t)})(t.score,2,!0)),e("td",{class:"LeaderboardPrize"},t.prizeName))))):e("div",{class:"LeaderboardUnstarted"},i.BeOne):e("general-animation-loading",null)},games(t){var i;return e("div",{class:"Games"},null===(i=t.tournamentItem.games)||void 0===i?void 0:i.map((t=>e("div",null,e("img",{src:t.defaultThumbnail,alt:""})))))}},q=e=>({prize:e.prizeName,place:e.rank}),$={dialog:T,page:W,tab:E},Y=class{handleEvent(e){var t,i;const r=e.data,{type:n}=r,o=a(r,["type"]);var s;null===(i=null===(s=this,t={UpdateLeaderboardsPlayerRes:e=>{const t=(e=>{let t;return e.map((e=>{var i;const r=null===(i=e.leaderBoard)||void 0===i?void 0:i.rank;r&&(t?r<t.leaderBoard.rank&&(t=e):t=e)})),t?`${t.leaderBoard.rank} / ${t.endRank}`:"-"})(e.data.items);window.postMessage({type:"UpdateLeaderboardState",rank:t})},UpdateLeaderboardStateReq:()=>{window.postMessage({type:"UpdateLeaderboardState",labels:["win","new"]})},UpdateTournamentsItemRes:e=>{const t=k(e.data.item);s.tournamentItem=t,B(s,t)},UpdateLeaderboardsRes:e=>{s.leaderboards=F(e.data)},JoinTournamentRes:e=>H(s,e),UnjoinTournamentRes:e=>H(s,e),LeaderboardLiveEvent:e=>{((e,t)=>{const{messageType:i,item:r}=t;switch(i){case"TournamentUpdate":case"PlayerLeaderBoardUpdate":D(e,r);break;case"TournamentRemove":S(e,r);break;case"LeaderBoardUpdate":e.leaderboards=F(t)}})(s,e)}})||void 0===t?void 0:t[n])||void 0===i||i.call(null,o)}checkNewIdList(){this.newIdList.length>0?this.addLabel("new"):this.removeLabel("new")}syncBarState(e,t){if(t){const a=(i=t,r=(e,t)=>e.id===t.id,e.filter((e=>!i.some((t=>r(e,t))))));this.newIdList=[...this.newIdList,...a.map((e=>e.id))]}else this.checkNewIdList(),this.gifts.length&&this.addLabel("win");var i,r}showPropWatcher(e,t){0==t&&1==e&&(this.checkGift(),this.page=c.list)}addLabel(e){this.labels.includes(e)||this.labels.push(e),M(this.labels)}removeLabel(e){this.labels=this.labels.filter((t=>t!=e)),M(this.labels)}setTimeInterval(){this.timeHolder=setInterval((()=>{this.time=this.tournamentList||this.tournamentItem?this.time+1:0}),1e3)}checkGift(){this.gifts.length?this.openDialog(g.gift,this.gifts[0],(()=>{this.dialog.type===g.gift&&(this.gifts=this.gifts.slice(1),setTimeout((()=>{this.checkGift()}),300))})):this.removeLabel("win")}connectedCallback(){this.setTimeInterval(),window.postMessage({type:"UpdateLeaderboardsPlayerReq"})}disconnectedCallback(){clearInterval(this.timeHolder)}actionJoin(e){if(!this.isActionJoinPending){this.isActionJoinPending=!0;try{e.isPlayerAcknowledged?(e=>{window.postMessage({type:"UnjoinTournamentReq",id:e.id})})(e):(e=>{var t,i;window.postMessage({type:"JoinTournamentReq",bonusCode:null===(i=null===(t=e.wallets)||void 0===t?void 0:t[0])||void 0===i?void 0:i.code})})(e)}catch(e){return void console.log("error",e)}}}setPage(e,t){e==c.item&&(this.tournamentItem=t.tournament,this.tournamentItem||I(t.tournament),m(this.tournamentItem)&&O(this.tournamentItem)),this.tab=n.info,this.page=e}render(){return e(t,{key:"b070d8a83bcd801d5daeb4edfe87ad0159da4e7c"},e("general-styling-wrapper",{key:"7454fdab7ee55ab95a39adb3c8b51aed0b78f534",clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:d,translationUrl:this.translationUrl}),this.renders.page[this.page]())}openDialog(e,t,i){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,onClose:i,type:e,data:t})}closeDialog(){var e;null===(e=this.dialog.onClose)||void 0===e||e.call(this),this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1,onClose:void 0})}constructor(e){i(this,e),this.close=r(this,"close",7),this.gifts=[],this.labels=[],this.language="en",this.show=!1,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.device="Mobile",this.leaderboardsInit=void 0,this.tab=n.info,this.locale=d,this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isActionJoinPending=!1,this.isDialogOpen=!1,this.isShowInfo=!1,this.page=c.list,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0,onClose:void 0},this.time=0,this.newIdList=[],this.renders={},Object.keys($).forEach((e=>{this.renders[e]={},Object.keys($[e]).forEach((t=>{this.renders[e][t]=$[e][t].bind(this,this)}))}))}static get watchers(){return{newIdList:["checkNewIdList"],tournamentList:["syncBarState"],show:["showPropWatcher"]}}};Y.style='.Wrapper{height:100%;position:relative;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px;overflow-y:auto}.Wrapper.Mobile{border-radius:16px}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%)}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px;margin-bottom:8px}.WrapperBar{display:flex;width:100%;padding:32px 20px 20px;margin-bottom:20px}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 12px);font-family:Inter}.Row{margin:24px 0;padding:0 20px}.Row:first-child{margin:0}.LeaderboardsItem{position:relative;margin:10px 0;border:1px solid rgb(64, 57, 86);border-radius:16px}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.Info{margin:24px 0;padding:0 20px}.TimeContainer{margin:24px 0;padding:0 20px}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 12px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 12px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.ShowInfo{margin:24px 0;padding:0 20px;cursor:pointer;color:rgb(102, 97, 120)}.ShowInfo p{display:flex;gap:4px}.TitleContainer{display:flex;justify-content:space-between;margin:24px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:24px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 12px);margin-bottom:-1px}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:12px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:12px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:24px 0;padding:0 20px}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.ContentScrollContainer{flex:1;display:flex;flex-direction:column;overflow-y:auto;position:relative;height:auto}.ContentScrollContainer.expanded{height:100%;max-height:100%}.PrizesContainer{flex:1;display:flex;flex-direction:column;min-height:100px;max-height:calc(100% - 20px)}.PrizesHeader{align-items:center;display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));padding:5px 0;z-index:1;margin:0 20px}.PrizesHeader img{width:12px}.PrizesHeader .PrizesText{margin-left:3px;font-weight:600}.Prizes{margin:24px 0;padding:0 20px;flex:1;overflow-y:auto;margin-bottom:0;padding-right:10px;max-height:300px;margin-top:10px}.Prizes::-webkit-scrollbar{width:4px}.Prizes::-webkit-scrollbar-track{background:rgba(0, 0, 0, 0.1);border-radius:2px}.Prizes::-webkit-scrollbar-thumb{background:var(--emw--color-primary, rgb(255, 214, 47));border-radius:2px}.Prizes .Prize{margin:8px 0}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer section.Info{margin-bottom:12px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards td{opacity:0.6;padding:20px 5px}.Leaderboards td:first-child{padding-left:20px}.Leaderboards td:last-child{padding-right:20px}.Leaderboards .LeaderboardName{color:var(--emw--color-typography, #FFF);opacity:1}.Leaderboards tr.isMe{background:rgba(0, 0, 0, 0.2)}.Leaderboards tr.isMe .LeaderboardRank span{padding:0px 3px;opacity:1;border:1px solid var(--emw--color-primary, rgb(255, 214, 47));border-radius:11px}.Leaderboards tr.isMe td{color:#FFD029;font-weight:var(--emw--font-weight-semibold, 500)}.LeaderboardLabels{position:absolute;top:-6px;right:18px;display:flex;gap:4px}.LeaderboardLabel{width:30px;height:15px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-3x-small, 7px);line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.LeaderboardUnstarted{margin:24px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:24px 0;padding:0 20px;display:flex;flex-wrap:wrap;justify-content:space-evenly;gap:4px 7.25px}.Games img{width:60px}dialog{position:absolute;top:30px;width:100%;height:100%;background:transparent;border:0;padding:0;color:var(--emw--color-typography, #FFFFFF)}dialog>div{margin:32px;border-radius:8px;background:var(--emw--color-background, hsl(254, 44%, 15%));border:1px solid hsl(254, 20%, 28%);align-items:center}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;flex-direction:column}.DialogContentUnjoinTitle{font-family:Montserrat;font-size:var(--emw--font-size-large, 20px);font-weight:600;line-height:24.38px;text-align:center}.DialogContentUnjoinDescription{color:var(--emw--color-secondary, rgb(187, 185, 195));margin-bottom:30px}.Tip{padding:32px;padding-top:10px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.PageConfirmContainer{text-align:center;width:80%;margin:0 auto}.PageConfirm{padding:40px 32px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 20px);text-align:center}.PageConfirm .Description{color:var(--emw--color-secondary, rgb(187, 185, 195));font-weight:400}.PageConfirm .Description span{color:var(--emw--color-typography, #FFF);font-weight:600}.PageConfirmButtonsGroup{width:150px;margin:0 auto;display:flex;flex-direction:column;gap:10px}.GradientRounded{display:block;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:rgb(30, 22, 56);position:relative;border-radius:16px}.GradientRounded.Hollow{background:rgb(30, 22, 56);color:#FFFFFF}.GradientRounded.Hollow::before{content:"";position:absolute;inset:0;border-radius:15px;border:1px solid transparent;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;-webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude}.GradientRoundedButton{border:none;padding:7px;height:32px;width:100%;font-size:var(--emw--font-size-small, 14px);font-weight:700;line-height:17.07px;text-align:center;transition:0.5s opacity;cursor:pointer}.GradientRoundedButton.Pending{cursor:not-allowed;opacity:0.3}.GradientRoundedButton.Hollow span{background:-webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.WrapperUtil .GradientRounded .WrapperBar{margin-bottom:0;padding-bottom:0}.WrapperUtil .GradientRounded .Tip{padding-top:0;padding-bottom:40px}.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer{margin-bottom:16px}';export{Y as C}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9b5a5304.js');
|
|
6
|
-
const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-
|
|
6
|
+
const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-9276045b.js');
|
|
7
7
|
require('@everymatrix/general-animation-loading/dist');
|
|
8
8
|
|
|
9
9
|
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
@@ -56,7 +56,7 @@ const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'Join', U
|
|
|
56
56
|
Tile: 'Congratulations!',
|
|
57
57
|
Description: 'You won <span>{tournamentName}</span>!',
|
|
58
58
|
ButtonContinue: 'Continue'
|
|
59
|
-
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.' });
|
|
59
|
+
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.', TournamentNotStarted: 'The leaderboard is not started yet. <br> It will start in {startTime}.', BeOne: 'No winners for the time being. Be one of them!' });
|
|
60
60
|
|
|
61
61
|
const classnames = (...args) => {
|
|
62
62
|
let classnameArray = [];
|
|
@@ -80,6 +80,34 @@ const getNewItems = (newList, oldList, getCondition) => {
|
|
|
80
80
|
const newItems = newList.filter((newItem) => !oldList.some((oldItem) => getCondition(newItem, oldItem)));
|
|
81
81
|
return newItems;
|
|
82
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Truncate number to specified decimal places (without rounding)
|
|
85
|
+
* @param {number|string} value - The number to be truncated, can be number or string
|
|
86
|
+
* @param {number} decimals - Number of decimal places to truncate to
|
|
87
|
+
* @returns {string|number} - Truncated value, returns string to preserve trailing zeros if has decimals, otherwise returns number
|
|
88
|
+
* @param {boolean} isInteger - Whether to force return integer
|
|
89
|
+
*/
|
|
90
|
+
const truncateNumber = (value, decimals, isInteger = false) => {
|
|
91
|
+
// Try to convert input to number
|
|
92
|
+
const numValue = Number(value);
|
|
93
|
+
// Check if valid number
|
|
94
|
+
if (isNaN(numValue)) {
|
|
95
|
+
throw new Error('Input must be a valid number or string that can be converted to number');
|
|
96
|
+
}
|
|
97
|
+
if (isInteger && !numValue.toString().includes('.')) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
// When decimals is 0, return integer part directly
|
|
101
|
+
if (decimals === 0) {
|
|
102
|
+
return Math.floor(numValue);
|
|
103
|
+
}
|
|
104
|
+
// Calculate factor for given decimal places
|
|
105
|
+
const factor = Math.pow(10, decimals);
|
|
106
|
+
// Multiply by factor, truncate integer part, then divide by factor
|
|
107
|
+
const truncated = Math.floor(numValue * factor) / factor;
|
|
108
|
+
// Return string representation with fixed decimals to preserve trailing zeros
|
|
109
|
+
return truncated.toFixed(decimals);
|
|
110
|
+
};
|
|
83
111
|
|
|
84
112
|
var LeaderboardPage;
|
|
85
113
|
(function (LeaderboardPage) {
|
|
@@ -262,39 +290,31 @@ function formatDate(date) {
|
|
|
262
290
|
};
|
|
263
291
|
return date.toLocaleDateString('en-US', options).replace(' at', ',');
|
|
264
292
|
}
|
|
265
|
-
function
|
|
266
|
-
|
|
267
|
-
result.setSeconds(result.getSeconds() + seconds);
|
|
268
|
-
return result;
|
|
293
|
+
function getProgress(startDate, endDate) {
|
|
294
|
+
return ((100 * (new Date().getTime() - startDate.getTime())) / (endDate.getTime() - startDate.getTime())).toFixed(0);
|
|
269
295
|
}
|
|
270
|
-
function
|
|
296
|
+
function getTimeDifference(startDate, endDate) {
|
|
271
297
|
const diffMs = Math.abs(endDate.getTime() - startDate.getTime()); // Difference in milliseconds
|
|
272
298
|
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24)); // Difference in days
|
|
273
299
|
const diffHours = Math.floor((diffMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); // Remaining hours
|
|
274
300
|
const diffMinutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60)); // Remaining minutes
|
|
275
|
-
|
|
276
|
-
const formattedDiff = `${String(diffDays).padStart(2, '0')}d:${String(diffHours).padStart(2, '0')}h:${String(diffMinutes).padStart(2, '0')}m`;
|
|
277
|
-
return formattedDiff;
|
|
278
|
-
}
|
|
279
|
-
function getProgress(startDate, endDate) {
|
|
280
|
-
return ((100 * (new Date().getTime() - startDate.getTime())) / (endDate.getTime() - startDate.getTime())).toFixed(0);
|
|
301
|
+
return `${String(diffDays).padStart(2, '0')}d:${String(diffHours).padStart(2, '0')}h:${String(diffMinutes).padStart(2, '0')}m`;
|
|
281
302
|
}
|
|
282
303
|
|
|
283
|
-
const renderTimeBar = (
|
|
304
|
+
const renderTimeBar = (tournament) => {
|
|
284
305
|
return (index.h("section", { class: "TimeContainer" },
|
|
285
|
-
index.h("div", { class:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
index.h("div", null, formatDate(tournament.endTime))
|
|
297
|
-
])),
|
|
306
|
+
index.h("div", { class: "Time" }, tournament.state === 'Running'
|
|
307
|
+
? [
|
|
308
|
+
index.h("div", null, getTimeDifference(new Date(), tournament.endTime)),
|
|
309
|
+
index.h("div", null, renderGradientRoundedButton({
|
|
310
|
+
statedClasses: {
|
|
311
|
+
isHollow: true,
|
|
312
|
+
isPendding: false
|
|
313
|
+
},
|
|
314
|
+
innerHTML: `${getProgress(tournament.startTime, tournament.endTime)}%`
|
|
315
|
+
}))
|
|
316
|
+
]
|
|
317
|
+
: [index.h("div", null, formatDate(tournament.startTime)), index.h("div", null, formatDate(tournament.endTime))]),
|
|
298
318
|
index.h("casino-engagement-suite-progress-bar", { value: Number(getProgress(tournament.startTime, tournament.endTime)), "hide-percent": true })));
|
|
299
319
|
};
|
|
300
320
|
|
|
@@ -409,7 +429,7 @@ const handleLeaderboardLiveEvent = (instance, rest) => {
|
|
|
409
429
|
const commonJoinRes = (instance, rest) => {
|
|
410
430
|
const { success } = rest;
|
|
411
431
|
if (success) {
|
|
412
|
-
instance.tournamentItem = Object.assign(Object.assign({}, instance.tournamentItem), {
|
|
432
|
+
instance.tournamentItem = Object.assign(Object.assign({}, instance.tournamentItem), { isPlayerAcknowledged: !!!instance.tournamentItem.isPlayerAcknowledged });
|
|
413
433
|
switch (instance.page) {
|
|
414
434
|
case LeaderboardPage.item: {
|
|
415
435
|
break;
|
|
@@ -453,19 +473,19 @@ const page = {
|
|
|
453
473
|
list(instance) {
|
|
454
474
|
var _a;
|
|
455
475
|
if (!instance.tournamentList) {
|
|
456
|
-
instance.tournamentList = (_a = instance.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map(item => tournamentAdapter(item));
|
|
476
|
+
instance.tournamentList = (_a = instance.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map((item) => tournamentAdapter(item));
|
|
457
477
|
return index.h("general-animation-loading", null);
|
|
458
478
|
}
|
|
459
479
|
const { locale } = instance;
|
|
460
480
|
if (instance.tournamentList.length) {
|
|
461
481
|
const onClickListItemChangePage = (tournament) => {
|
|
462
482
|
instance.setPage(LeaderboardPage.item, { tournament });
|
|
463
|
-
instance.newIdList = instance.newIdList.filter(id => id !== tournament.id);
|
|
483
|
+
instance.newIdList = instance.newIdList.filter((id) => id !== tournament.id);
|
|
464
484
|
};
|
|
465
|
-
return renderLeaderboardContainer(instance, index.h("div", { class: "Leaderboards Row" }, instance.tournamentList.map(_tournament => (index.h("div", { class: classnames(
|
|
485
|
+
return renderLeaderboardContainer(instance, index.h("div", { class: "Leaderboards Row" }, instance.tournamentList.map((_tournament) => (index.h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : ''), onClick: () => onClickListItemChangePage(_tournament) },
|
|
466
486
|
index.h("div", { class: "LeaderboardsItemContainer" },
|
|
467
487
|
renderTitleContainer(instance, _tournament),
|
|
468
|
-
renderTimeBar(
|
|
488
|
+
renderTimeBar(_tournament)),
|
|
469
489
|
index.h("div", { class: "LeaderboardLabels" }, instance.newIdList.includes(_tournament.id) && (index.h("div", { class: "LeaderboardLabel" },
|
|
470
490
|
index.h("span", null, "new")))))))));
|
|
471
491
|
}
|
|
@@ -501,12 +521,12 @@ const page = {
|
|
|
501
521
|
renderTabs(),
|
|
502
522
|
instance.renders.tab[instance.tab]()
|
|
503
523
|
]);
|
|
504
|
-
}
|
|
524
|
+
}
|
|
505
525
|
};
|
|
506
526
|
const renderTitleContainer = (instance, tournament) => {
|
|
507
527
|
const { locale } = instance;
|
|
508
528
|
const onClickItemJoin = (tournament) => {
|
|
509
|
-
if (tournament.
|
|
529
|
+
if (tournament.isPlayerAcknowledged) {
|
|
510
530
|
instance.openDialog(DialogType.unjoin, tournament);
|
|
511
531
|
}
|
|
512
532
|
else {
|
|
@@ -518,27 +538,29 @@ const renderTitleContainer = (instance, tournament) => {
|
|
|
518
538
|
index.h("div", { class: "Title" }, tournament.nameOrTitle),
|
|
519
539
|
tournament.state !== TournamentState.Closed && (index.h("div", null, renderGradientRoundedButton({
|
|
520
540
|
statedClasses: {
|
|
521
|
-
isHollow: tournament.
|
|
522
|
-
isPending: instance.isActionJoinPending
|
|
541
|
+
isHollow: tournament.isPlayerAcknowledged,
|
|
542
|
+
isPending: instance.isActionJoinPending
|
|
523
543
|
},
|
|
524
544
|
onClick: (e) => {
|
|
525
545
|
e.stopPropagation();
|
|
526
|
-
|
|
546
|
+
if (!instance.isActionJoinPending) {
|
|
547
|
+
onClickItemJoin(tournament);
|
|
548
|
+
}
|
|
527
549
|
},
|
|
528
|
-
innerHTML: tournament.
|
|
550
|
+
innerHTML: tournament.isPlayerAcknowledged ? locale.Unjoin : locale.Join
|
|
529
551
|
})))));
|
|
530
552
|
};
|
|
531
553
|
const renderLeaderboardContainer = (instance, render) => {
|
|
532
554
|
const { dialog: { isOpen } } = instance;
|
|
533
555
|
const renderBar = renderCloseBar({
|
|
534
|
-
right:
|
|
556
|
+
right: index.h("span", { onClick: () => instance.closeDialog() }, iconClose)
|
|
535
557
|
});
|
|
536
558
|
const renderDialogContent = () => {
|
|
537
559
|
switch (instance.dialog.type) {
|
|
538
560
|
case DialogType.unjoin:
|
|
539
561
|
return instance.renders.dialog.unjoin(); //renderDialogContentUnjoin()
|
|
540
562
|
case DialogType.tip:
|
|
541
|
-
return
|
|
563
|
+
return index.h("div", { class: "Tip" }, instance.locale.Tip);
|
|
542
564
|
case DialogType.gift:
|
|
543
565
|
return instance.renders.dialog.gift();
|
|
544
566
|
}
|
|
@@ -553,19 +575,21 @@ const renderLeaderboardContainer = (instance, render) => {
|
|
|
553
575
|
};
|
|
554
576
|
case LeaderboardPage.item:
|
|
555
577
|
return {
|
|
556
|
-
left:
|
|
557
|
-
middle:
|
|
578
|
+
left: index.h("span", { onClick: () => instance.setPage(LeaderboardPage.list) }, iconBack),
|
|
579
|
+
middle: locale.Leaderboards
|
|
558
580
|
};
|
|
559
581
|
}
|
|
560
582
|
};
|
|
561
583
|
const renderCloseBarInLayout = () => {
|
|
562
584
|
const { left, middle } = getWrapperBarData();
|
|
563
|
-
return renderCloseBar({
|
|
564
|
-
|
|
585
|
+
return renderCloseBar({
|
|
586
|
+
left,
|
|
587
|
+
middle,
|
|
588
|
+
right: index.h("span", { onClick: () => instance.close.emit() }, iconClose)
|
|
565
589
|
});
|
|
566
590
|
};
|
|
567
591
|
return (index.h("div", { class: `Wrapper ${instance.device}` },
|
|
568
|
-
index.h("div", { class: classnames(
|
|
592
|
+
index.h("div", { class: classnames('WrapperContent', { faded: isOpen }) },
|
|
569
593
|
renderCloseBarInLayout(),
|
|
570
594
|
index.h("div", { class: "Root" },
|
|
571
595
|
index.h("div", { class: "Main" }, render))),
|
|
@@ -581,58 +605,65 @@ const tab = {
|
|
|
581
605
|
var _a, _b;
|
|
582
606
|
const { locale, tournamentItem: tournament, isShowInfo } = instance;
|
|
583
607
|
return (index.h("div", { class: "InfoContainer" },
|
|
584
|
-
renderTimeBar(
|
|
585
|
-
|
|
608
|
+
renderTimeBar(tournament),
|
|
609
|
+
index.h("section", { class: "ShowInfo", onClick: () => (instance.isShowInfo = !instance.isShowInfo) },
|
|
586
610
|
index.h("p", null,
|
|
587
611
|
index.h("span", null, isShowInfo ? iconEyeClose : iconEyeOpen),
|
|
588
|
-
index.h("span", null, locale.LeaderboardDetails)))
|
|
589
|
-
|
|
590
|
-
index.h("
|
|
591
|
-
|
|
592
|
-
index.h("div",
|
|
593
|
-
|
|
612
|
+
index.h("span", null, locale.LeaderboardDetails))),
|
|
613
|
+
index.h("div", { class: `ContentScrollContainer ${isShowInfo ? 'expanded' : ''}` },
|
|
614
|
+
isShowInfo && (index.h("section", { class: "Info" },
|
|
615
|
+
index.h("div", null, tournament.description),
|
|
616
|
+
index.h("div", { class: "Criterias" },
|
|
617
|
+
index.h("div", null,
|
|
618
|
+
locale.ScoreCriteria,
|
|
619
|
+
": ",
|
|
620
|
+
index.h("span", null, tournament.scoreCriteria)),
|
|
621
|
+
index.h("div", null,
|
|
622
|
+
locale.MinimumBetCriteria,
|
|
623
|
+
": ",
|
|
624
|
+
index.h("span", null, tournament.minBetCount))),
|
|
625
|
+
!!tournament.termsUrl && (index.h("div", { class: "TC" },
|
|
626
|
+
index.h("a", { href: tournament.termsUrl, target: "_blank" }, locale.TC))))),
|
|
627
|
+
isTournamentClosed(instance.tournamentItem) && ((_a = instance.leaderboards) === null || _a === void 0 ? void 0 : _a.find((l) => l.isMe)) && (index.h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, getResultPrize((_b = instance.leaderboards) === null || _b === void 0 ? void 0 : _b.find((l) => l.isMe))) })),
|
|
628
|
+
index.h("section", { class: "PrizesContainer" },
|
|
629
|
+
index.h("div", { class: "PrizesHeader" },
|
|
630
|
+
iconReward,
|
|
631
|
+
index.h("span", { class: "PrizesText" }, locale.Prizes)),
|
|
632
|
+
index.h("div", { class: "Prizes" }, tournament.prizes.map((prize, index$1) => (index.h("div", { class: "Prize" },
|
|
633
|
+
index$1 + 1,
|
|
634
|
+
" ",
|
|
635
|
+
locale.Place,
|
|
594
636
|
": ",
|
|
595
|
-
index.h("span",
|
|
596
|
-
index.h("div", null,
|
|
597
|
-
locale.MinimumBetCriteria,
|
|
598
|
-
": ",
|
|
599
|
-
index.h("span", null, tournament.minBetCount))),
|
|
600
|
-
index.h("div", { class: "TC" },
|
|
601
|
-
index.h("a", { href: tournament.termsUrl, target: '_blank' }, locale.TC)))),
|
|
602
|
-
isTournamentClosed(instance.tournamentItem) && ((_a = instance.leaderboards) === null || _a === void 0 ? void 0 : _a.find(l => l.isMe)) && (index.h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, getResultPrize((_b = instance.leaderboards) === null || _b === void 0 ? void 0 : _b.find(l => l.isMe))) })),
|
|
603
|
-
index.h("section", { class: "Prizes" },
|
|
604
|
-
index.h("div", { class: "PrizesHeader" },
|
|
605
|
-
iconReward,
|
|
606
|
-
index.h("span", { class: "PrizesText" }, locale.Prizes)),
|
|
607
|
-
tournament.prizes.map((prize, index$1) => (index.h("div", { class: "Prize" },
|
|
608
|
-
index$1 + 1,
|
|
609
|
-
" ",
|
|
610
|
-
locale.Place,
|
|
611
|
-
": ",
|
|
612
|
-
index.h("span", { class: "PrizeText" }, prize.name)))))));
|
|
637
|
+
index.h("span", { class: "PrizeText" }, prize.name)))))))));
|
|
613
638
|
},
|
|
614
639
|
leaderboard(instance) {
|
|
640
|
+
const { locale, tournamentItem } = instance;
|
|
641
|
+
if ((tournamentItem === null || tournamentItem === void 0 ? void 0 : tournamentItem.state) === 'Unstarted') {
|
|
642
|
+
const startTime = getTimeDifference(tournamentItem === null || tournamentItem === void 0 ? void 0 : tournamentItem.startTime, new Date());
|
|
643
|
+
return (index.h("div", { class: "LeaderboardUnstarted", innerHTML: localePostprocess(locale.TournamentNotStarted, { startTime }) }));
|
|
644
|
+
}
|
|
615
645
|
if (!instance.leaderboards)
|
|
616
646
|
return index.h("general-animation-loading", null);
|
|
617
|
-
if (!instance.leaderboards.length)
|
|
618
|
-
return
|
|
619
|
-
|
|
647
|
+
if (!instance.leaderboards.length) {
|
|
648
|
+
return index.h("div", { class: "LeaderboardUnstarted" }, locale.BeOne);
|
|
649
|
+
}
|
|
650
|
+
return (index.h("table", { class: "Leaderboards" }, instance.leaderboards.map((leaderboard) => (index.h("tr", { class: classnames({ isMe: leaderboard.isMe }) },
|
|
620
651
|
index.h("td", { class: "LeaderboardRank" },
|
|
621
652
|
index.h("span", null, leaderboard.rank)),
|
|
622
653
|
index.h("td", { class: "LeaderboardName" }, leaderboard.shortName),
|
|
623
|
-
index.h("td", { class: "LeaderboardScore" }, leaderboard.score),
|
|
654
|
+
index.h("td", { class: "LeaderboardScore" }, truncateNumber(leaderboard.score, 2, true)),
|
|
624
655
|
index.h("td", { class: "LeaderboardPrize" }, leaderboard.prizeName))))));
|
|
625
656
|
},
|
|
626
657
|
games(instance) {
|
|
627
658
|
var _a;
|
|
628
|
-
return (index.h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map(game => (index.h("div", null,
|
|
659
|
+
return (index.h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (index.h("div", null,
|
|
629
660
|
index.h("img", { src: game.defaultThumbnail, alt: "" }))))));
|
|
630
|
-
}
|
|
661
|
+
}
|
|
631
662
|
};
|
|
632
663
|
const getResultPrize = (leaderboard) => {
|
|
633
664
|
return {
|
|
634
665
|
prize: leaderboard.prizeName,
|
|
635
|
-
place: leaderboard.rank
|
|
666
|
+
place: leaderboard.rank
|
|
636
667
|
};
|
|
637
668
|
};
|
|
638
669
|
|
|
@@ -642,7 +673,7 @@ const renders = {
|
|
|
642
673
|
tab
|
|
643
674
|
};
|
|
644
675
|
|
|
645
|
-
const casinoEngagementSuiteTournamentCss = ".Wrapper{height:100%;position:relative;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px;overflow-y:auto}.Wrapper.Mobile{border-radius:16px}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%)}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px;margin-bottom:8px}.WrapperBar{display:flex;width:100%;padding:32px 20px 20px;margin-bottom:20px}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 12px);font-family:Inter}.Row{margin:24px 0;padding:0 20px}.Row:first-child{margin:0}.LeaderboardsItem{position:relative;margin:10px 0;border:1px solid rgb(64, 57, 86);border-radius:16px}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.Info{margin:24px 0;padding:0 20px}.TimeContainer{margin:24px 0;padding:0 20px}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 12px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 12px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.ShowInfo{margin:24px 0;padding:0 20px;cursor:pointer;color:rgb(102, 97, 120)}.ShowInfo p{display:flex;gap:4px}.TitleContainer{display:flex;justify-content:space-between;margin:24px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:24px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 12px);margin-bottom:-1px}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:12px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:12px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:24px 0;padding:0 20px}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.
|
|
676
|
+
const casinoEngagementSuiteTournamentCss = ".Wrapper{height:100%;position:relative;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px;overflow-y:auto}.Wrapper.Mobile{border-radius:16px}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%)}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px;margin-bottom:8px}.WrapperBar{display:flex;width:100%;padding:32px 20px 20px;margin-bottom:20px}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 12px);font-family:Inter}.Row{margin:24px 0;padding:0 20px}.Row:first-child{margin:0}.LeaderboardsItem{position:relative;margin:10px 0;border:1px solid rgb(64, 57, 86);border-radius:16px}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.Info{margin:24px 0;padding:0 20px}.TimeContainer{margin:24px 0;padding:0 20px}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 12px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 12px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.ShowInfo{margin:24px 0;padding:0 20px;cursor:pointer;color:rgb(102, 97, 120)}.ShowInfo p{display:flex;gap:4px}.TitleContainer{display:flex;justify-content:space-between;margin:24px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:24px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 12px);margin-bottom:-1px}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:12px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:12px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:24px 0;padding:0 20px}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.ContentScrollContainer{flex:1;display:flex;flex-direction:column;overflow-y:auto;position:relative;height:auto}.ContentScrollContainer.expanded{height:100%;max-height:100%}.PrizesContainer{flex:1;display:flex;flex-direction:column;min-height:100px;max-height:calc(100% - 20px)}.PrizesHeader{align-items:center;display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));padding:5px 0;z-index:1;margin:0 20px}.PrizesHeader img{width:12px}.PrizesHeader .PrizesText{margin-left:3px;font-weight:600}.Prizes{margin:24px 0;padding:0 20px;flex:1;overflow-y:auto;margin-bottom:0;padding-right:10px;max-height:300px;margin-top:10px}.Prizes::-webkit-scrollbar{width:4px}.Prizes::-webkit-scrollbar-track{background:rgba(0, 0, 0, 0.1);border-radius:2px}.Prizes::-webkit-scrollbar-thumb{background:var(--emw--color-primary, rgb(255, 214, 47));border-radius:2px}.Prizes .Prize{margin:8px 0}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer section.Info{margin-bottom:12px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards td{opacity:0.6;padding:20px 5px}.Leaderboards td:first-child{padding-left:20px}.Leaderboards td:last-child{padding-right:20px}.Leaderboards .LeaderboardName{color:var(--emw--color-typography, #FFF);opacity:1}.Leaderboards tr.isMe{background:rgba(0, 0, 0, 0.2)}.Leaderboards tr.isMe .LeaderboardRank span{padding:0px 3px;opacity:1;border:1px solid var(--emw--color-primary, rgb(255, 214, 47));border-radius:11px}.Leaderboards tr.isMe td{color:#FFD029;font-weight:var(--emw--font-weight-semibold, 500)}.LeaderboardLabels{position:absolute;top:-6px;right:18px;display:flex;gap:4px}.LeaderboardLabel{width:30px;height:15px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-3x-small, 7px);line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.LeaderboardUnstarted{margin:24px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:24px 0;padding:0 20px;display:flex;flex-wrap:wrap;justify-content:space-evenly;gap:4px 7.25px}.Games img{width:60px}dialog{position:absolute;top:30px;width:100%;height:100%;background:transparent;border:0;padding:0;color:var(--emw--color-typography, #FFFFFF)}dialog>div{margin:32px;border-radius:8px;background:var(--emw--color-background, hsl(254, 44%, 15%));border:1px solid hsl(254, 20%, 28%);align-items:center}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;flex-direction:column}.DialogContentUnjoinTitle{font-family:Montserrat;font-size:var(--emw--font-size-large, 20px);font-weight:600;line-height:24.38px;text-align:center}.DialogContentUnjoinDescription{color:var(--emw--color-secondary, rgb(187, 185, 195));margin-bottom:30px}.Tip{padding:32px;padding-top:10px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.PageConfirmContainer{text-align:center;width:80%;margin:0 auto}.PageConfirm{padding:40px 32px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 20px);text-align:center}.PageConfirm .Description{color:var(--emw--color-secondary, rgb(187, 185, 195));font-weight:400}.PageConfirm .Description span{color:var(--emw--color-typography, #FFF);font-weight:600}.PageConfirmButtonsGroup{width:150px;margin:0 auto;display:flex;flex-direction:column;gap:10px}.GradientRounded{display:block;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:rgb(30, 22, 56);position:relative;border-radius:16px}.GradientRounded.Hollow{background:rgb(30, 22, 56);color:#FFFFFF}.GradientRounded.Hollow::before{content:\"\";position:absolute;inset:0;border-radius:15px;border:1px solid transparent;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;-webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude}.GradientRoundedButton{border:none;padding:7px;height:32px;width:100%;font-size:var(--emw--font-size-small, 14px);font-weight:700;line-height:17.07px;text-align:center;transition:0.5s opacity;cursor:pointer}.GradientRoundedButton.Pending{cursor:not-allowed;opacity:0.3}.GradientRoundedButton.Hollow span{background:-webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.WrapperUtil .GradientRounded .WrapperBar{margin-bottom:0;padding-bottom:0}.WrapperUtil .GradientRounded .Tip{padding-top:0;padding-bottom:40px}.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer{margin-bottom:16px}";
|
|
646
677
|
const CasinoEngagementSuiteTournamentStyle0 = casinoEngagementSuiteTournamentCss;
|
|
647
678
|
|
|
648
679
|
const CasinoEngagementSuiteTournament = class {
|
|
@@ -675,6 +706,7 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
675
706
|
showPropWatcher(newValue, oldValue) {
|
|
676
707
|
if (oldValue == false && newValue == true) {
|
|
677
708
|
this.checkGift();
|
|
709
|
+
this.page = LeaderboardPage.list;
|
|
678
710
|
}
|
|
679
711
|
}
|
|
680
712
|
addLabel(tag) {
|
|
@@ -689,7 +721,7 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
689
721
|
}
|
|
690
722
|
setTimeInterval() {
|
|
691
723
|
this.timeHolder = setInterval(() => {
|
|
692
|
-
this.time =
|
|
724
|
+
this.time = this.tournamentList || this.tournamentItem ? this.time + 1 : 0;
|
|
693
725
|
}, 1000);
|
|
694
726
|
}
|
|
695
727
|
checkGift() {
|
|
@@ -721,7 +753,7 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
721
753
|
return;
|
|
722
754
|
this.isActionJoinPending = true;
|
|
723
755
|
try {
|
|
724
|
-
if (tournament.
|
|
756
|
+
if (tournament.isPlayerAcknowledged) {
|
|
725
757
|
messageSender.UnjoinTournamentReq(tournament);
|
|
726
758
|
}
|
|
727
759
|
else {
|
|
@@ -747,7 +779,7 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
747
779
|
this.page = page;
|
|
748
780
|
}
|
|
749
781
|
render() {
|
|
750
|
-
return (index.h(index.Host, { key: '
|
|
782
|
+
return (index.h(index.Host, { key: 'b070d8a83bcd801d5daeb4edfe87ad0159da4e7c' }, index.h("general-styling-wrapper", { key: '7454fdab7ee55ab95a39adb3c8b51aed0b78f534', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
|
|
751
783
|
// @ts-ignore
|
|
752
784
|
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renders.page[this.page]()));
|
|
753
785
|
}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-
|
|
5
|
+
const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-9276045b.js');
|
|
6
6
|
require('./index-9b5a5304.js');
|
|
7
7
|
require('@everymatrix/general-animation-loading/dist');
|
|
8
8
|
|