@everymatrix/casino-engagement-suite-tournament 1.63.3 → 1.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
  2. package/dist/casino-engagement-suite-tournament/index.esm.js +1 -1
  3. package/dist/casino-engagement-suite-tournament/p-edcd56d0.js +15 -0
  4. package/dist/casino-engagement-suite-tournament/{p-d24f1017.entry.js → p-fcfced34.entry.js} +1 -1
  5. package/dist/cjs/casino-engagement-suite-progress-bar_6.cjs.entry.js +11 -10
  6. package/dist/cjs/{casino-engagement-suite-tournament-785dd5cc.js → casino-engagement-suite-tournament-95aedc10.js} +244 -67
  7. package/dist/cjs/casino-engagement-suite-tournament.cjs.js +1 -1
  8. package/dist/cjs/index.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/assets/back.svg +3 -0
  11. package/dist/collection/assets/iconTrophy.svg +12 -0
  12. package/dist/collection/assets/iconWarn.svg +15 -0
  13. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +123 -26
  14. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +71 -14
  15. package/dist/collection/shared/TournamentDurationTimer.js +9 -9
  16. package/dist/collection/shared/TournamentItem.js +20 -2
  17. package/dist/collection/shared/TournamentItemTitle.js +3 -3
  18. package/dist/collection/shared/icons.js +6 -2
  19. package/dist/collection/shared/renders.dialog.js +10 -3
  20. package/dist/collection/shared/renders.page.js +3 -1
  21. package/dist/collection/shared/renders.tab.js +10 -3
  22. package/dist/collection/utils/api.apdater.js +14 -0
  23. package/dist/collection/utils/bussiness.js +28 -2
  24. package/dist/collection/utils/message.js +104 -27
  25. package/dist/collection/utils/translations.js +8 -5
  26. package/dist/collection/utils/types.js +8 -0
  27. package/dist/collection/utils/util.date.js +4 -3
  28. package/dist/collection/utils/utils.js +5 -2
  29. package/dist/esm/casino-engagement-suite-progress-bar_6.entry.js +12 -11
  30. package/dist/esm/{casino-engagement-suite-tournament-3be75bd2.js → casino-engagement-suite-tournament-61d378cd.js} +244 -67
  31. package/dist/esm/casino-engagement-suite-tournament.js +1 -1
  32. package/dist/esm/index.js +1 -1
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +20 -3
  35. package/dist/types/components.d.ts +18 -0
  36. package/dist/types/shared/TournamentItem.d.ts +7 -1
  37. package/dist/types/shared/TournamentItemTitle.d.ts +6 -1
  38. package/dist/types/shared/icons.d.ts +1 -0
  39. package/dist/types/utils/api.apdater.d.ts +3 -0
  40. package/dist/types/utils/bussiness.d.ts +10 -1
  41. package/dist/types/utils/message.d.ts +3 -0
  42. package/dist/types/utils/translations.d.ts +6 -1
  43. package/dist/types/utils/types.d.ts +9 -0
  44. package/dist/types/utils/util.date.d.ts +2 -2
  45. package/dist/types/utils/utils.d.ts +1 -0
  46. package/package.json +1 -1
  47. package/dist/casino-engagement-suite-tournament/p-f478f260.js +0 -15
@@ -44,16 +44,19 @@ const localePostprocess = (translationText, props) => {
44
44
  });
45
45
  return translationText;
46
46
  };
47
- const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'Join', Unjoin: 'Unjoin' }, Tab), Time), { TC: 'Terms & Conditions', ScoreCriteria: 'Score Criteria', MinimumBetCriteria: 'Minimum bet criteria', Place: 'place', Prizes: 'Rewards', LeaderboardDetails: 'Leaderboard Details', UnjoinDialog: {
47
+ const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'Join', Unjoin: 'Unjoin' }, Tab), Time), { TC: 'Terms & Conditions', ScoreCriteria: 'Score Criteria', MinimumBetCriteria: 'Minimum bet criteria', Place: 'place', Places: 'places', Prizes: 'Rewards', LeaderboardDetails: 'Leaderboard Details', UnjoinDialog: {
48
48
  Title: 'Quit Leaderboard?',
49
49
  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?',
50
50
  ButtonYes: 'Yes, I want to quit leaderboard',
51
51
  ButtonNo: 'No, Stay on the leaderboard'
52
52
  }, WinDialog: {
53
- Tile: 'Congratulations!',
54
- Description: 'You won <span>{tournamentName}</span>!',
55
- ButtonContinue: 'Continue'
56
- }, 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!', FailedToJoin: 'Oops! some unexpected error happened, please try it again.', FailedToUnjoin: 'Oops! some unexpected error happened, please try it again.' });
53
+ Title: 'Congratulations!',
54
+ Description: 'You won <span>{rewards}</span>!',
55
+ ButtonContinue: 'Continue',
56
+ FailedTitle: 'Reward cannot be issued',
57
+ FailedDescription: 'Please contact support.',
58
+ FailedButtonContinue: 'Ok, 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>', TipPrizeWithoutReward: 'You took <span>{place}</span> place</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!', FailedToJoin: 'Oops! some unexpected error happened, please try it again.', FailedToUnjoin: 'Oops! some unexpected error happened, please try it again.' });
57
60
 
58
61
  const classnames = (...args) => {
59
62
  let classnameArray = ['Tab'];
@@ -74,8 +77,7 @@ const classnames = (...args) => {
74
77
  return classnameArray.join(' ');
75
78
  };
76
79
  const getNewItems = (newList, oldList, getCondition) => {
77
- const newItems = newList.filter((newItem) => !oldList.some((oldItem) => getCondition(newItem, oldItem)));
78
- return newItems;
80
+ return newList.filter(newItem => !oldList.some(oldItem => getCondition(newItem, oldItem)));
79
81
  };
80
82
  /**
81
83
  * Truncate number to specified decimal places (without rounding)
@@ -118,6 +120,14 @@ var TournamentState;
118
120
  TournamentState["Closed"] = "Closed";
119
121
  TournamentState["Closing"] = "Closing";
120
122
  })(TournamentState || (TournamentState = {}));
123
+ var RewardType;
124
+ (function (RewardType) {
125
+ RewardType["FreeSpin"] = "FreeSpin";
126
+ RewardType["Mission"] = "Challenge";
127
+ RewardType["Leaderboard"] = "TournamentTicket";
128
+ RewardType["Custom"] = "Custom";
129
+ RewardType["LuckyWheel"] = "PrizeEngine";
130
+ })(RewardType || (RewardType = {}));
121
131
  var DialogType;
122
132
  (function (DialogType) {
123
133
  DialogType["unjoin"] = "unjoin";
@@ -126,6 +136,7 @@ var DialogType;
126
136
  DialogType["error"] = "error";
127
137
  })(DialogType || (DialogType = {}));
128
138
 
139
+ const DEFAULT_PAGE_SIZE = 12;
129
140
  const getMaxRankStr = (playerLeaderboards) => {
130
141
  let bestRank = null;
131
142
  (playerLeaderboards || []).map((playerLeaderboard) => {
@@ -136,23 +147,55 @@ const getMaxRankStr = (playerLeaderboards) => {
136
147
  }
137
148
  bestRank = !bestRank || ((_a = bestRank.leaderBoard) === null || _a === void 0 ? void 0 : _a.rank) > rank ? playerLeaderboard : bestRank;
138
149
  });
139
- return bestRank ? `${bestRank.leaderBoard.rank} / ${bestRank.endRank}` : '-';
150
+ return {
151
+ rank: bestRank ? `${bestRank.leaderBoard.rank} / ${bestRank.endRank}` : '-',
152
+ detail: bestRank ? {
153
+ playerRank: bestRank.leaderBoard.rank,
154
+ total: bestRank.endRank
155
+ } : null
156
+ };
140
157
  };
141
158
  const isTournamentClosed = (tournament) => {
159
+ return [TournamentState.Closed].includes(tournament.state);
160
+ };
161
+ const isTournamentEnded = (tournament) => {
142
162
  return [TournamentState.Closed, TournamentState.Closing].includes(tournament.state);
143
163
  };
164
+ const getRewardNameByType = (reward) => {
165
+ switch (reward.type) {
166
+ case RewardType.FreeSpin:
167
+ return reward.campaignName;
168
+ case RewardType.Mission:
169
+ return reward.challengeName;
170
+ case RewardType.Leaderboard:
171
+ return reward.ticketProgramName;
172
+ case RewardType.LuckyWheel:
173
+ return reward.prizeEngineProgramName;
174
+ case RewardType.Custom:
175
+ return reward.value;
176
+ default:
177
+ return reward.name;
178
+ }
179
+ };
144
180
 
145
181
  const rewardSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIxMTVfMzA2KSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNC45MDI5MiAwLjY2NjQ5NkM0LjkyMzM5IDAuNjY2NTc5IDQuOTQzNCAwLjY2NjY2IDQuOTYyODYgMC42NjY2NkgxMS4wMzY5QzExLjA1NjQgMC42NjY2NiAxMS4wNzY0IDAuNjY2NTc5IDExLjA5NjkgMC42NjY0OTZDMTEuMzA1NiAwLjY2NTY1MyAxMS41NjI3IDAuNjY0NjEzIDExLjc4OTMgMC43NDcwN0MxMi4xNTk2IDAuODgxODY4IDEyLjQ1MTQgMS4xNzM2MSAxMi41ODYyIDEuNTQzOTdDMTIuNjM5NCAxLjY5MDMxIDEyLjY1NzggMS44NDk0MiAxMi42NjQgMS45OTk5OUwxMy42ODQyIDEuOTk5OTlDMTMuODI0MiAxLjk5OTk4IDEzLjk2MDcgMS45OTk5NiAxNC4wNzY3IDIuMDA3ODhDMTQuMjAzNiAyLjAxNjU0IDE0LjM1NDEgMi4wMzY4NiAxNC41MT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ICAgICAgPC9jbGlwUGF0aD4KICAgIDwvZGVmcz4KPHNjcmlwdCB4bWxucz0iIi8+PC9zdmc+Cg==';
148
188
 
189
+ const backSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC40NzEzIDMuNTI4NTlDMTAuNzMxNyAzLjc4ODk0IDEwLjczMTcgNC4yMTEwNSAxMC40NzEzIDQuNDcxNEw2Ljk0MjczIDhMMTAuNDcxMyAxMS41Mjg2QzEwLjczMTcgMTEuNzg4OSAxMC43MzE3IDEyLjIxMTEgMTAuNDcxMyAxMi40NzE0QzEwLjIxMSAxMi43MzE3IDkuNzg4ODYgMTIuNzMxNyA5LjUyODUxIDEyLjQ3MTRMNS41Mjg1MSA4LjQ3MTRDNS4yNjgxNiA4LjIxMTA1IDUuMjY4MTYgNy43ODg5NCA1LjUyODUxIDcuNTI4NTlMOS41Mjg1MSAzLjUyODU5QzkuNzg4ODYgMy4yNjgyNCAxMC4yMTEgMy4yNjgyNCAxMC40NzEzIDMuNTI4NTlaIiBmaWxsPSIjNjY2MTc4Ii8+Cjwvc3ZnPgo=';
190
+
149
191
  const iconClose = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg" });
150
192
  const iconQuestion = h("img", { src: helpSvg, alt: "question", class: "Question" });
151
193
  const iconEyeOpen = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg" });
152
194
  const iconEyeClose = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg" });
153
- const iconBack = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg" });
195
+ const iconBack = h("img", { src: backSvg, alt: "Back", class: "Back" });
154
196
  const iconReward = h("img", { src: rewardSvg, alt: "reward", class: "Reward" });
155
- const iconTrophy = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg" });
197
+ const iconTrophy = h("img", { src: iconTrophySvg, alt: "iconTrophy", class: "Trophy" });
198
+ const iconWarn = h("img", { src: iconWarnSvg, alt: "Reward Assign Failed", class: "Warn" });
156
199
 
157
200
  const renderGradientRoundedButton = (_a) => {
158
201
  var { statedClasses, innerHTML } = _a, props = __rest(_a, ["statedClasses", "innerHTML"]);
@@ -167,6 +210,7 @@ const renderGradientRoundedButton = (_a) => {
167
210
  var GradientButton;
168
211
  (function (GradientButton) {
169
212
  GradientButton["normal"] = "normal";
213
+ GradientButton["okContinue"] = "okContinue";
170
214
  GradientButton["unjoinYes"] = "unjoinYes";
171
215
  GradientButton["unjoinNo"] = "unjoinNo";
172
216
  })(GradientButton || (GradientButton = {}));
@@ -176,6 +220,9 @@ const renderButton = (instance, buttonType, isActionJoinPending = false) => {
176
220
  normal: {
177
221
  innerHTML: locale.WinDialog.ButtonContinue
178
222
  },
223
+ okContinue: {
224
+ innerHTML: locale.WinDialog.FailedButtonContinue
225
+ },
179
226
  unjoinYes: {
180
227
  onClick: () => instance.actionJoin(instance.dialog.data),
181
228
  innerHTML: locale.UnjoinDialog.ButtonYes
@@ -200,14 +247,20 @@ const renderButton = (instance, buttonType, isActionJoinPending = false) => {
200
247
  };
201
248
  const dialog = {
202
249
  gift(instance) {
203
- const { name: tournamentName } = instance.gifts[0];
250
+ const { name: rewards, failedRewards } = instance.gifts[0];
204
251
  const { locale } = instance;
205
- return (h("div", { class: "PageConfirmContainer" },
206
- h("div", { class: "PageConfirm" },
252
+ return (h("div", { class: "PageConfirmContainer" }, !!rewards ?
253
+ h("div", { class: "PageConfirm Gift" },
207
254
  h("div", null, iconTrophy),
208
- h("div", { class: "Title" }, locale.WinDialog.Tile),
209
- h("div", { class: "Description", innerHTML: localePostprocess(locale.WinDialog.Description, { tournamentName }) }),
210
- h("div", { class: "PageConfirmButtonsGroup" }, renderButton(instance, GradientButton.normal)))));
255
+ h("div", { class: "Title" }, locale.WinDialog.Title),
256
+ h("div", { class: "Description", innerHTML: localePostprocess(locale.WinDialog.Description, { rewards }) }),
257
+ h("div", { class: "PageConfirmButtonsGroup" }, renderButton(instance, GradientButton.normal)))
258
+ :
259
+ h("div", { class: "PageConfirm Gift" },
260
+ h("div", null, iconWarn),
261
+ h("div", { class: "Title", innerHTML: localePostprocess(locale.WinDialog.FailedTitle, { failedRewards }) }),
262
+ h("div", { class: "Description" }, locale.WinDialog.FailedDescription),
263
+ h("div", { class: "PageConfirmButtonsGroup" }, renderButton(instance, GradientButton.okContinue)))));
211
264
  },
212
265
  unjoin(instance) {
213
266
  const { locale } = instance;
@@ -240,6 +293,20 @@ const tournamentAdapter = (tournamentApi) => {
240
293
  });
241
294
  return tournament;
242
295
  };
296
+ const updateTournament = (target, source) => {
297
+ const keysTime = [
298
+ 'startTime',
299
+ 'endTime',
300
+ 'closeTime',
301
+ 'exhibitionStartTime',
302
+ 'exhibitionEndTime', 'state',
303
+ 'prizes', 'minBetCount', 'scoreCriteria', 'termsUrl'
304
+ ];
305
+ keysTime.forEach((key) => {
306
+ target[key] = source[key];
307
+ });
308
+ return Object.assign({}, target);
309
+ };
243
310
  const leaderboardsAdapter = (leaderboardRes) => {
244
311
  let { item, items: leaderboards } = leaderboardRes;
245
312
  if (!item) {
@@ -278,28 +345,35 @@ const messageSender = {
278
345
  GameClickReq: (game) => window.postMessage({ type: 'EngagementSuiteGameRedirect', data: { Slug: game.slug } }),
279
346
  };
280
347
  const messageReceiver = (instance) => {
281
- const receiver = {
348
+ return {
282
349
  UpdateLeaderboardsPlayerRes: (rest) => {
283
- window.postMessage({ type: 'UpdateLeaderboardState', rank: getMaxRankStr(rest.data.items) });
350
+ const { rank, detail } = (getMaxRankStr(rest.data.items));
351
+ window.postMessage({ type: 'UpdateLeaderboardState', rank, detail });
284
352
  },
285
353
  UpdateLeaderboardStateReq: () => {
286
354
  window.postMessage({ type: 'UpdateLeaderboardState', labels: ['win', 'new'] });
287
355
  },
356
+ /*
357
+ * Update tournament games list when switch to game tab in detail page
358
+ */
288
359
  UpdateTournamentsItemRes: (rest) => {
289
360
  const tournamentNew = tournamentAdapter(rest.data.item);
290
361
  instance.tournamentItem = tournamentNew;
291
362
  updateTournamentListByItem(instance, tournamentNew);
292
363
  },
293
- UpdateLeaderboardsRes: (rest) => processLeaderboardTableData(instance, rest),
294
- JoinTournamentRes: (rest) => commonJoinRes(instance, rest),
295
- UnjoinTournamentRes: (rest) => commonJoinRes(instance, rest),
364
+ UpdateLeaderboardsRes: (rest) => initPlayerLeaderboard(instance, rest),
365
+ //Parse the join tournament response
366
+ JoinTournamentRes: (rest) => commonJoinRes(instance, rest, true),
367
+ //Parse the unjoin tournament response
368
+ UnjoinTournamentRes: (rest) => commonJoinRes(instance, rest, false),
369
+ //Parse recieved init message when widget is loaded
296
370
  TournamentsPageIsReadyRes: (rest) => instance.currentGameId = '' + rest.data.GameId,
297
371
  // listen to LeaderboardLiveEvent event, handle update
298
- LeaderboardLiveEvent: (rest) => {
299
- handleLeaderboardLiveEvent(instance, rest);
300
- },
372
+ LeaderboardLiveEvent: (rest) => handleLeaderboardLiveEvent(instance, rest),
373
+ LiveLeaderboardUpdate: (rest) => updateLeaderboardInfo(instance, Object.assign(Object.assign({}, rest), { messageType: 'LeaderboardUpdate' })),
374
+ LiveTournamentUpdate: (rest) => updateTournamentInfo(instance, Object.assign(Object.assign({}, rest), { messageType: 'TournamentUpdate' })),
375
+ LiveLeaderboardFinalizeUpdate: (rest) => updatePlayerRewardInfo(instance, Object.assign(Object.assign({}, rest), { messageType: 'PlayerFinalizeUpdate' })),
301
376
  };
302
- return receiver;
303
377
  };
304
378
  /**
305
379
  * Handle LeaderboardLiveEvent update event
@@ -375,33 +449,45 @@ const handleLeaderboardLiveEvent = (instance, rest) => {
375
449
  }
376
450
  }
377
451
  };
378
- const showErrorMessage = (instance, type) => {
379
- instance.dialog = Object.assign(Object.assign({}, instance.dialog), { isOpen: true, type });
452
+ const clearUnjoinedTournament = (instance, unjoinedTournamentId) => {
453
+ const clearId = setTimeout(() => {
454
+ instance.tournamentList = instance.tournamentList.filter((tournament) => {
455
+ return tournament.id !== unjoinedTournamentId;
456
+ });
457
+ clearTimeout(clearId);
458
+ }, 100);
380
459
  };
381
- const commonJoinRes = (instance, rest) => {
460
+ const commonJoinRes = (instance, rest, isJoinRes) => {
382
461
  const { success, data } = rest;
383
462
  let tournamentIdx = instance.tournamentList.findIndex((tournament) => tournament.id === (data.tournamentId || data.id || data.bonusCode)), current = instance.tournamentList[tournamentIdx];
384
463
  if (tournamentIdx == -1) {
385
464
  return;
386
465
  }
387
- current = Object.assign(Object.assign({}, current), { isActionJoinPending: false });
466
+ current.isActionJoinPending = false;
388
467
  instance.pendingChangeEvent.emit(current);
389
468
  if (!success) {
390
469
  instance.tournamentList[tournamentIdx] = current;
391
470
  instance.tournamentList = [...instance.tournamentList];
392
- showErrorMessage(instance, DialogType.error);
471
+ instance.openDialog(DialogType.error);
393
472
  return;
394
473
  }
395
- current = Object.assign(Object.assign({}, current), { isUnjoined: current.isPlayerAcknowledged ? true : false, isPlayerAcknowledged: !!!current.isPlayerAcknowledged });
396
- instance.tournamentList[tournamentIdx] = current;
474
+ if (isJoinRes) {
475
+ current.isPlayerAcknowledged = true;
476
+ current.order = instance.minOrder--;
477
+ }
478
+ else {
479
+ current.isUnjoined = true;
480
+ clearUnjoinedTournament(instance, data.tournamentId);
481
+ }
482
+ instance.tournamentList[tournamentIdx] = Object.assign({}, current);
397
483
  instance.tournamentList = [...instance.tournamentList];
398
484
  if (instance.page === LeaderboardPage.item) {
399
- if (current.isUnjoined) {
400
- instance.setPage(LeaderboardPage.list);
401
- return;
485
+ if (isJoinRes) {
486
+ instance.tournamentItem = Object.assign({}, current);
402
487
  }
403
488
  else {
404
- instance.tournamentItem = Object.assign({}, current);
489
+ instance.setPage(LeaderboardPage.list);
490
+ return;
405
491
  }
406
492
  }
407
493
  if (instance.nextPage) {
@@ -409,17 +495,21 @@ const commonJoinRes = (instance, rest) => {
409
495
  instance.nextPage = undefined;
410
496
  }
411
497
  };
412
- const processLeaderboardTableData = (instance, rest) => {
498
+ const initPlayerLeaderboard = (instance, rest) => {
413
499
  instance.leaderboards = leaderboardsAdapter(rest.data);
414
- instance.currentPlyerRank = rest.data.item ? rest.data.item.rank : -1;
500
+ instance.currentPlayerRank = rest.data.item ? rest.data.item.rank : -1;
415
501
  };
416
502
  /*
417
503
  * update tournament info, include status, name or duration change
418
504
  */
419
505
  const updateTournamentListByItem = (instance, tournament) => {
506
+ const newTournament = tournamentAdapter(tournament);
507
+ if (instance.tournamentItem.id === tournament.id) {
508
+ instance.tournamentItem = Object.assign({}, updateTournament(instance.tournamentItem, newTournament));
509
+ }
420
510
  instance.tournamentList = instance.tournamentList.map((_tournament) => {
421
511
  if (_tournament.id === tournament.id) {
422
- return tournamentAdapter(tournament);
512
+ return Object.assign({}, updateTournament(_tournament, newTournament));
423
513
  }
424
514
  else {
425
515
  return _tournament;
@@ -430,8 +520,8 @@ const removeTournament = (instance, tournament) => {
430
520
  instance.tournamentList = instance.tournamentList.filter((_tournament) => _tournament.id !== tournament.id);
431
521
  };
432
522
  const updateOrAddTournamentToList = (instance, tournament) => {
433
- const index = instance.tournamentList.findIndex((_tournament) => _tournament.id === tournament.id);
434
- if (index === -1) {
523
+ const index = instance.tournamentList.findIndex(_tournament => _tournament.id === tournament.id);
524
+ if (index === -1) { //not found in list, handle it as new tournament
435
525
  instance.tournamentList = [
436
526
  tournamentAdapter(tournament),
437
527
  ...instance.tournamentList
@@ -442,6 +532,60 @@ const updateOrAddTournamentToList = (instance, tournament) => {
442
532
  instance.tournamentList = [...instance.tournamentList];
443
533
  }
444
534
  };
535
+ const updateTournamentInfo = (instance, rest) => {
536
+ try {
537
+ const updateMessageObj = JSON.parse(rest.data.Message);
538
+ updateTournamentListByItem(instance, updateMessageObj);
539
+ }
540
+ catch (e) {
541
+ console.error('Exception when parse Player Tournament Info', e);
542
+ }
543
+ };
544
+ const updatePlayerRewardInfo = (instance, rest) => {
545
+ try {
546
+ const updateMessageObj = JSON.parse(rest.data.Message);
547
+ const assignFailedRewards = updateMessageObj.rewards.filter(item => item.status && item.status !== 'success')
548
+ .map(reward => getRewardNameByType(reward)).join(',');
549
+ const assignedRewards = updateMessageObj.rewards.filter(item => !!item.assigned && item.status === 'success')
550
+ .map(reward => getRewardNameByType(reward)).join(',');
551
+ if (assignFailedRewards.length) {
552
+ instance.gifts = [{ name: null, failedRewards: assignFailedRewards }, ...instance.gifts];
553
+ }
554
+ if (assignedRewards.length) {
555
+ instance.gifts = [{ name: assignedRewards }, ...instance.gifts];
556
+ }
557
+ instance.checkGift();
558
+ }
559
+ catch (e) {
560
+ console.error('Exception when parse Player LeaderboardFinalize info', e);
561
+ }
562
+ };
563
+ const updateLeaderboardInfo = (instance, rest) => {
564
+ var _a;
565
+ try {
566
+ const updateMessageObj = JSON.parse(rest.data.Message);
567
+ const { PlayerLeaderBoard, TournamentId, TournamentLeaderBoardDto } = updateMessageObj;
568
+ //update user rank in UI-bar by parsing PlayerLeaderboard
569
+ if (PlayerLeaderBoard) {
570
+ window.postMessage({ type: 'UpdateLeaderboardState',
571
+ rank: `${PlayerLeaderBoard.rank} / ${TournamentLeaderBoardDto.totalRecords}`,
572
+ detail: {
573
+ playerRank: PlayerLeaderBoard.rank,
574
+ total: TournamentLeaderBoardDto.totalRecords
575
+ }
576
+ });
577
+ }
578
+ if (((_a = instance.tournamentItem) === null || _a === void 0 ? void 0 : _a.id) == TournamentId) {
579
+ initPlayerLeaderboard(instance, { data: {
580
+ item: Object.assign({}, PlayerLeaderBoard),
581
+ items: [...TournamentLeaderBoardDto.players]
582
+ } });
583
+ }
584
+ }
585
+ catch (err) {
586
+ console.error('Exception when parse live update info, ', err);
587
+ }
588
+ };
445
589
 
446
590
  const page = {
447
591
  list(instance) {
@@ -452,7 +596,9 @@ const page = {
452
596
  }
453
597
  const { locale } = instance;
454
598
  if (instance.tournamentList.length) {
455
- return renderWrapperByPageType(h("div", { class: "Leaderboards ScrollBar Row" }, instance.tournamentList.map((_tournament) => (h("tournament-item", { tournament: _tournament, isNew: instance.newIdList.includes(_tournament.id) })))));
599
+ return renderWrapperByPageType(h("div", { class: "Leaderboards ScrollBar Row" }, instance.tournamentList.map((_tournament, idx) => (
600
+ // @ts-ignore
601
+ h("tournament-item", { tid: _tournament.id, key: _tournament.id, tournament: _tournament, style: { 'order': `${_tournament.order || idx}` }, isNew: instance.newIdList.includes(_tournament.id) })))));
456
602
  }
457
603
  else {
458
604
  return renderWrapperByPageType(h("div", { class: "NoLeaderboards ScrollBar Row" },
@@ -508,20 +654,25 @@ function getProgress(startDate, endDate) {
508
654
  if (new Date().getTime() >= endDate.getTime()) {
509
655
  return 100;
510
656
  }
511
- return ((100 * (new Date().getTime() - startDate.getTime())) / (endDate.getTime() - startDate.getTime())).toFixed(0);
657
+ return Math.floor((100 * (new Date().getTime() - startDate.getTime())) / (endDate.getTime() - startDate.getTime()));
512
658
  }
513
- function getTimeDifference(startDate, endDate) {
659
+ function getTimeDifference(startDate, endDate, progress = 0) {
514
660
  const diffMs = Math.abs(endDate.getTime() - startDate.getTime()); // Difference in milliseconds
515
661
  const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24)); // Difference in days
516
662
  const diffHours = Math.floor((diffMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); // Remaining hours
517
663
  const diffMinutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60)); // Remaining minutes
518
- return `${String(diffDays).padStart(2, '0')}d:${String(diffHours).padStart(2, '0')}h:${String(diffMinutes).padStart(2, '0')}m`;
664
+ const min = progress === 100 ? 0 : diffMinutes === 0 ? 1 : diffMinutes;
665
+ return `${String(diffDays).padStart(2, '0')}d:${String(diffHours).padStart(2, '0')}h:${String(min).padStart(2, '0')}m`;
519
666
  }
520
667
 
521
668
  const tab = {
522
669
  info(instance) {
523
670
  var _a, _b;
524
671
  const { locale, tournamentItem: tournament, isShowInfo } = instance;
672
+ const playerRank = getResultPrize((_a = instance.leaderboards) === null || _a === void 0 ? void 0 : _a.find((l) => l.isMe));
673
+ const rewardInfo = !(playerRank === null || playerRank === void 0 ? void 0 : playerRank.place) || (playerRank === null || playerRank === void 0 ? void 0 : playerRank.unqualified)
674
+ ? ''
675
+ : localePostprocess(((playerRank === null || playerRank === void 0 ? void 0 : playerRank.prize) ? locale.TipPrize : locale.TipPrizeWithoutReward), playerRank);
525
676
  return (h("div", { class: "InfoContainer" },
526
677
  h("tournament-timer", { "is-detail": true, tournament: tournament }),
527
678
  h("section", { class: "ShowInfo", onClick: () => (instance.isShowInfo = !instance.isShowInfo) },
@@ -542,15 +693,17 @@ const tab = {
542
693
  h("span", null, tournament.minBetCount))),
543
694
  !!tournament.termsUrl && (h("div", { class: "TC" },
544
695
  h("a", { href: tournament.termsUrl, target: "_blank" }, locale.TC))))),
545
- isTournamentClosed(instance.tournamentItem) && ((_a = instance.leaderboards) === null || _a === void 0 ? void 0 : _a.find((l) => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, getResultPrize((_b = instance.leaderboards) === null || _b === void 0 ? void 0 : _b.find((l) => l.isMe))) })),
696
+ isTournamentClosed(instance.tournamentItem) && ((_b = instance.leaderboards) === null || _b === void 0 ? void 0 : _b.find((l) => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: rewardInfo })),
546
697
  h("section", { class: "PrizesContainer" },
547
698
  h("div", { class: "PrizesHeader" },
548
699
  iconReward,
549
700
  h("span", { class: "PrizesText" }, locale.Prizes)),
550
- h("div", { class: "Prizes" }, tournament.prizes.map((prize, index) => (h("div", { class: "Prize" },
551
- index + 1,
552
- " ",
553
- locale.Place,
701
+ h("div", { class: "Prizes" }, tournament.prizes.map((prize) => (h("div", { class: "Prize" },
702
+ h("span", { class: 'Rank' },
703
+ prize.rank,
704
+ " ",
705
+ prize.count === 1 ? '' : ` - ${(prize.rank + prize.count - 1)}`),
706
+ prize.count === 1 ? locale.Place : locale.Places,
554
707
  ": ",
555
708
  h("span", { class: "PrizeText" }, prize.name)))))))));
556
709
  },
@@ -574,6 +727,8 @@ const tab = {
574
727
  },
575
728
  games(instance) {
576
729
  var _a;
730
+ if (!instance.tournamentItem.games || !instance.tournamentItem.games.length)
731
+ return h("general-animation-loading", null);
577
732
  return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div", { class: `Game ${instance.currentGameId == game.id ? 'Current' : ''}`, onClick: () => {
578
733
  instance.onGameClick(game);
579
734
  } },
@@ -582,8 +737,9 @@ const tab = {
582
737
  };
583
738
  const getResultPrize = (leaderboard) => {
584
739
  return {
585
- prize: leaderboard.prizeName,
586
- place: leaderboard.rank
740
+ prize: leaderboard === null || leaderboard === void 0 ? void 0 : leaderboard.prizeName,
741
+ place: leaderboard === null || leaderboard === void 0 ? void 0 : leaderboard.rank,
742
+ unqualified: leaderboard === null || leaderboard === void 0 ? void 0 : leaderboard.unqualified,
587
743
  };
588
744
  };
589
745
 
@@ -615,7 +771,7 @@ const renderCloseBar = (attr) => {
615
771
  return (h("div", { class: "WrapperBar" }, Object.keys(slots).map(slotKey => (h("div", { class: 'WrapperBar' + getFirstLetterUppercase(slotKey) }, slots[slotKey] || '')))));
616
772
  };
617
773
 
618
- const casinoEngagementSuiteTournamentCss = ".Leaderboards{height:100%;overflow-y:auto;transition:0.5s ease;transition-property:all, transform}.Leaderboards.list,.Leaderboards.item{opacity:0}.Leaderboards.list.Active,.Leaderboards.item.Active{opacity:1}.Leaderboards.list.Hidden,.Leaderboards.item.Hidden{display:none}.Leaderboards .question__tooltip{position:absolute;top:0;left:20px;width:320px;text-align:left;background-color:var(--emw--color-typography, rgba(255, 255, 255, 0.6));border:1px solid var(--emw--color-typography, rgba(255, 255, 255, 0.8));color:var(var(--emw--color-primary, rgb(255, 214, 47)), rgb(255, 214, 47));padding:10px;border-radius:5px;opacity:0;fill-opacity:0.5;transition:opacity 0.3s ease-in-out;z-index:10}.Leaderboards .question__tooltip.visible{opacity:0.8}table.leaderboards{height:auto}.Wrapper{position:relative;min-height:100%;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px}.Wrapper .TableContentWrapper{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Wrapper .WrapperContent .TableContentWrapper{height:calc(100vh - 278px);overflow-y:auto}.Wrapper .WrapperContent .Main{height:calc(100vh - 188px)}.Wrapper.Mobile{border-radius:16px}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%);pointer-events:none}.WrapperContent .NoLeaderboards h3.Title{text-align:center}.WrapperContent .NoLeaderboards div.message{color:var(--emw--color-secondary, rgb(187, 185, 195));text-align:left}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px;margin-bottom:8px}.WrapperBar{display:flex;width:100%;padding:32px 20px 20px;margin-bottom:20px}.WrapperBar .WrapperBarLeft span{position:relative}.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}.ScrollBar{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Row{margin:10px 0;padding:0 20px}.Row:first-child{margin:0;padding-top:5px}.LeaderboardsItem{opacity:1;transition:1s opacity ease;position:relative;margin:10px 0;border:1px solid rgb(64, 57, 86);border-radius:16px}.LeaderboardsItem.Unjoined{opacity:0;margin:0;border:0 none;animation:slideOut 1s forwards}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.ShowInfo{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer{margin:10px 0;padding:0 20px;transition:0.5s all ease}.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 .Running{width:100%;display:flex;flex-direction:row;justify-content:space-between}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 12px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.TitleContainer{display:flex;justify-content:space-between;margin:10px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:10px 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 .Tab{text-transform:capitalize}.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:10px 0;padding:0 20px;padding-left:30px;text-align:left}.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,.DetailHeader{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,.DetailHeader img{width:12px}.PrizesHeader .PrizesText,.DetailHeader .PrizesText{margin-left:3px;font-weight:600}.DetailHeader{margin:0}.Prizes{margin:10px 0;padding:0 20px;padding-left:30px;text-align:left;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;text-align:left;padding-left:15px}.InfoContainer section.Info .Criterias,.InfoContainer section.Info .Description{padding-left:15px;margin-top:10px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards td{opacity:0.6;padding:12px 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);border:1px solid var(--emw--color-primary, rgb(255, 214, 47))}.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:var(--emw--color-primary, rgb(255, 214, 47));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:10px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:10px 0;padding:0 20px;padding:0 20px;display:flex;flex-wrap:wrap;justify-content:start;margin:20px auto}.Games .Game{cursor:pointer;width:25%;display:flex;padding:5px}.Games .Game.Current{cursor:auto;filter:grayscale(10)}.Games .Game:hover{filter:brightness(var(--emw--hover-brightness, 1.25))}.Games .Game.Current:hover{cursor:auto;filter:grayscale(10)}.Games img{width:100%;height:fit-content}dialog{position:absolute;top:calc(50vh - 280px);width:100%;height:max-content;background:transparent;border:0;padding:0;color:var(--emw--color-typography, #FFFFFF);transition:all 0.2s;transition-timing-function:ease-in-out}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)}.Tip.Error{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-weight:var(--emw--font-weight-normal, 500)}.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}@keyframes slideOut{0%{display:block;opacity:1;height:max-content}50%{display:block;opacity:0.5}80%{display:none;opacity:0}100%{display:none;opacity:0;height:0}}";
774
+ const casinoEngagementSuiteTournamentCss = ".Leaderboards{height:100%;overflow-y:auto;transition:0.5s ease;transition-property:all, transform}.Leaderboards.list,.Leaderboards.item{margin-top:5px;opacity:0}.Leaderboards.list.Active,.Leaderboards.item.Active{opacity:1}.Leaderboards.list.Hidden,.Leaderboards.item.Hidden{display:none}.Leaderboards .question__tooltip{position:absolute;top:0;left:20px;width:320px;text-align:left;background-color:var(--emw--color-typography, rgba(255, 255, 255, 0.6));border:1px solid var(--emw--color-typography, rgba(255, 255, 255, 0.8));color:var(var(--emw--color-primary, rgb(255, 214, 47)), rgb(255, 214, 47));padding:10px;border-radius:5px;opacity:0;fill-opacity:0.5;transition:opacity 0.3s ease-in-out;z-index:10}.Leaderboards .question__tooltip.visible{opacity:0.8}table.Leaderboards{height:auto}table.Leaderboards td.LeaderboardName{max-width:180px}table.Leaderboards td.LeaderboardPrize{min-width:220px;text-align:left}.Wrapper{position:relative;min-height:100%;line-height:20px;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px}.Wrapper .TableContentWrapper{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Wrapper .WrapperContent .TableContentWrapper{height:calc(100vh - 298px);overflow-y:auto}.Wrapper .WrapperContent .Main{height:calc(100vh - 188px)}.Wrapper .WrapperContent .Main .Leaderboards.ScrollBar.Row{display:flex;flex-direction:column}.Wrapper .WrapperContent .Main .Leaderboards.ScrollBar.Row tournament-item{transition:2s ease-in-out;transform:translate(0) scale(1, 1);opacity:0.99}.Wrapper.Mobile{border-radius:16px}.Wrapper.Mobile .PageConfirmContainer,.Wrapper.Mobile .DialogContentUnjoin{min-width:80%}.Wrapper.Mobile dialog.tip{padding:120px 10px}.Wrapper.Mobile dialog.unjoin .Hollow{margin:5px}.Wrapper.Mobile .GradientRoundedButton{font-size:var(--emw--font-size-medium, 14px)}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%);pointer-events:none}.WrapperContent .NoLeaderboards h3.Title{text-align:center}.WrapperContent .NoLeaderboards div.message{color:var(--emw--color-secondary, rgb(187, 185, 195));text-align:left}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px;margin-bottom:8px}.Wrapper.Mobile .Tip{padding:0px 30px 32px}.Wrapper.Mobile .TitleContainer .GradientRoundedButton{width:100px}.WrapperBar{display:flex;width:100%;padding:20px 20px}.WrapperBar .WrapperBarLeft span{position:relative}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarLeft span.EngagementSuiteIcon img,.WrapperBarRight span.EngagementSuiteIcon img{width:24px;height:24px}.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, 14px)}.ScrollBar{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Row{margin:10px 0;padding:0 20px}.Row:first-child{margin:0;padding-top:5px}.LeaderboardsItem{opacity:1;transition:1s opacity ease;position:relative;margin:20px 0;border:1px solid rgb(64, 57, 86);border-radius:6px;padding:12px 0}.LeaderboardsItem.Unjoined{opacity:0;margin:0;border:0 none;animation:slideOut 1s forwards}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.ShowInfo{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 14px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time .Running{width:100%;display:flex;flex-direction:row;justify-content:space-between}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 14px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.TitleContainer{display:flex;justify-content:space-between;margin:10px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:10px 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, 14px);margin-bottom:-1px}.Tabs .Tab{text-transform:capitalize}.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-large, 20px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:14px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:14px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:10px 0;padding:0 20px;padding-left:30px;text-align:left}.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,.DetailHeader{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,.DetailHeader img{width:14px}.PrizesHeader .PrizesText,.DetailHeader .PrizesText{margin-left:3px;font-weight:600}.DetailHeader{margin:0}.Prizes{margin:10px 0;padding:0 20px;padding-left:30px;text-align:left;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 .Rank{margin-right:5px}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer section.Info{margin-bottom:12px;text-align:left;padding-left:15px}.InfoContainer section.Info .Criterias,.InfoContainer section.Info .Description{padding-left:15px;margin-top:10px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards td{opacity:0.6;padding:12px 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);border:1px solid var(--emw--color-primary, rgb(255, 214, 47))}.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:var(--emw--color-primary, rgb(255, 214, 47));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:10px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:10px 0;padding:0 20px;padding:0 20px;display:flex;flex-wrap:wrap;justify-content:start;margin:20px auto}.Games .Game{cursor:pointer;width:25%;display:flex;padding:5px}.Games .Game.Current{cursor:auto;filter:grayscale(10)}.Games .Game:hover{filter:brightness(var(--emw--hover-brightness, 1.25))}.Games .Game.Current:hover{cursor:auto;filter:grayscale(10)}.Games img{width:100%;height:fit-content}dialog.tip{position:absolute;align-items:start;padding:120px 90px;line-height:20px;font-size:var(--emw--font-size-small, 16px)}dialog.tip>div{margin:0px}dialog{display:none;position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1;color:var(--emw--color-typography, #FFFFFF);transition:all 0.2s;transition-timing-function:ease-in-out}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}dialog div.Hollow .WrapperBar{padding:12px}dialog div.Hollow .WrapperBar .WrapperBarRight img{width:20px}dialog div.Hollow .Tip{line-height:20px;padding:0px 60px 32px;font-size:var(--emw--font-size-small, 16px)}dialog[open]{display:flex}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;max-width:510px;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:0px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.Tip.Error{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-weight:var(--emw--font-weight-normal, 500)}.PageConfirmContainer{text-align:center;width:80%;min-width:450px;max-width:510px;margin:0 auto}.PageConfirm{padding:0px 32px 60px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 26px);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}.PageConfirm.Gift{padding:22px 32px 60px}.PageConfirm.Gift .Title{font-size:var(--emw--font-size-large, 30px)}.PageConfirm.Gift .Description{font-size:var(--emw--font-size-medium, 20px)}.PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton{font-size:var(--emw--font-size-medium, 20px);padding:12px;height:auto}.PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton.GradientRounded{border-radius:20px}.PageConfirmButtonsGroup{width:150px;margin:20px 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-medium, 16px);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}.LeaderboardsItem.GradientRounded.Hollow::before{border-radius:7px}.WrapperUtil .GradientRounded .WrapperBar{margin-bottom:0;padding-bottom:0}.WrapperUtil .GradientRounded .Tip{padding-top:0;padding-bottom:40px}.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer{margin-bottom:16px}@keyframes slideOut{0%{display:block;opacity:1;height:max-content}50%{display:block;opacity:0.5}80%{display:none;opacity:0}100%{display:none;opacity:0;height:0}}";
619
775
  const CasinoEngagementSuiteTournamentStyle0 = casinoEngagementSuiteTournamentCss;
620
776
 
621
777
  const CasinoEngagementSuiteTournament = class {
@@ -686,7 +842,14 @@ const CasinoEngagementSuiteTournament = class {
686
842
  }, 300);
687
843
  }
688
844
  };
689
- this.openDialog(DialogType.gift, this.gifts[0], onClose);
845
+ if (this.show) {
846
+ this.openDialog(DialogType.gift, this.gifts[0], onClose);
847
+ }
848
+ else {
849
+ //Show 'Win' Label on the left ui-bar,
850
+ this.labels.push('win');
851
+ messageSender.UpdateSuiteBarState(this.labels);
852
+ }
690
853
  }
691
854
  else {
692
855
  this.removeLabel('win');
@@ -703,9 +866,6 @@ const CasinoEngagementSuiteTournament = class {
703
866
  this.showTooltip = false;
704
867
  }
705
868
  componentDidLoad() {
706
- this.pageElement.addEventListener('scroll', (event) => {
707
- this.containerScrollTop = event.target.scrollTop + event.target.clientHeight / 2 - 250;
708
- });
709
869
  messageSender.UpdateTournamentsPageIsReady();
710
870
  }
711
871
  renderTooltip() {
@@ -726,7 +886,7 @@ const CasinoEngagementSuiteTournament = class {
726
886
  }
727
887
  componentDidRender() {
728
888
  if (this.page === LeaderboardPage.item && this.tab === Tab.leaderboard) {
729
- if (this.currentPlyerRank > this.maxPlyerRank && !this.scrolledToMyLine) {
889
+ if (this.currentPlayerRank > this.defaultPageSize && !this.scrolledToMyLine) {
730
890
  this.scrollToMyRankLine();
731
891
  }
732
892
  }
@@ -744,6 +904,11 @@ const CasinoEngagementSuiteTournament = class {
744
904
  if (tournament.isActionJoinPending)
745
905
  return;
746
906
  tournament.isActionJoinPending = true;
907
+ //Disable the unjoin button when action in detail page
908
+ if (this.page === LeaderboardPage.item) {
909
+ this.tournamentItem.isActionJoinPending = true;
910
+ this.tournamentItem = Object.assign({}, this.tournamentItem);
911
+ }
747
912
  this.pendingChangeEvent.emit(tournament);
748
913
  try {
749
914
  if (tournament.isPlayerAcknowledged) {
@@ -765,7 +930,7 @@ const CasinoEngagementSuiteTournament = class {
765
930
  if (!this.tournamentItem) {
766
931
  messageSender.UpdateTournamentsItemReq(metaData.tournament);
767
932
  }
768
- if (isTournamentClosed(this.tournamentItem)) {
933
+ if (isTournamentEnded(this.tournamentItem)) {
769
934
  messageSender.UpdateLeaderboardsReq(this.tournamentItem);
770
935
  }
771
936
  this.tab = Tab.info;
@@ -787,21 +952,27 @@ const CasinoEngagementSuiteTournament = class {
787
952
  };
788
953
  return (h(Host, null, h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
789
954
  // @ts-ignore
790
- targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: `Wrapper ${this.device}` }, h("div", { class: classnames('WrapperContent', { faded: this.dialog.isOpen }) }, renderCloseBar({
955
+ targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: `Wrapper ${this.device} ${this.orientation}` }, h("div", { class: classnames('WrapperContent', { faded: this.dialog.isOpen, page: this.page }) }, this.page && renderCloseBar({
791
956
  left: this.page === LeaderboardPage.list
792
- ? h("span", { onClick: this.openDialog.bind(this, DialogType.tip) }, iconQuestion)
793
- : h("span", { onClick: this.setPage.bind(this, LeaderboardPage.list) }, iconBack),
957
+ ? h("span", { class: 'EngagementSuiteIcon', onClick: this.openDialog.bind(this, DialogType.tip) }, iconQuestion)
958
+ : h("span", { class: 'EngagementSuiteIcon', onClick: this.setPage.bind(this, LeaderboardPage.list) }, iconBack),
794
959
  middle: this.locale.Leaderboards,
795
- right: h("span", { onClick: () => this.close.emit() }, iconClose)
960
+ right: h("span", { class: 'EngagementSuiteIcon', onClick: () => this.close.emit() }, iconClose)
796
961
  }), h("div", { class: `Leaderboards ${this.page} ${this.page === 'list' ? 'Active' : 'Hidden'}`, ref: el => this.pageElement = el }, this.renders.page.list()), this.page === LeaderboardPage.item &&
797
- h("div", { class: `Leaderboards ${this.page} ${this.page === 'item' ? 'Active' : 'Hidden'} `, ref: el => this.detailElement = el }, this.renders.page.item())), h("div", { class: "WrapperUtil" }, h("dialog", { open: this.dialog.isOpen, style: { 'top': this.getContainerScrollTop() + 'px' } }, h("div", { class: "Hollow" }, renderCloseBar({
798
- right: h("span", { onClick: () => this.closeDialog() }, iconClose)
962
+ h("div", { class: `Leaderboards ${this.page} ${this.page === 'item' ? 'Active' : 'Hidden'} `, ref: el => this.detailElement = el }, this.renders.page.item())), h("div", { class: "WrapperUtil" }, h("dialog", { class: `${this.dialog.type}`, open: this.dialog.isOpen }, h("div", { class: `Hollow ${this.dialog.type === 'gift' ? 'GradientRounded' : ''}` }, renderCloseBar({
963
+ right: h("span", { class: 'EngagementSuiteIcon', onClick: () => this.closeDialog() }, iconClose)
799
964
  }), this.dialog.isOpen && renderDialogContent()))))));
800
965
  }
801
966
  openDialog(type, data = undefined, onClose = undefined) {
802
967
  this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, onClose,
803
968
  type,
804
969
  data });
970
+ if (type === DialogType.error || type === DialogType.tip) {
971
+ const timerId = setTimeout(() => {
972
+ this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: false });
973
+ clearInterval(timerId);
974
+ }, this.tipsHideDelay);
975
+ }
805
976
  }
806
977
  closeDialog() {
807
978
  var _a;
@@ -813,10 +984,14 @@ const CasinoEngagementSuiteTournament = class {
813
984
  this.close = createEvent(this, "close", 7);
814
985
  this.tournamentTimer = createEvent(this, "tournamentTimer", 7);
815
986
  this.pendingChangeEvent = createEvent(this, "pendingChangeEvent", 7);
987
+ /**
988
+ * Use to move the new acknowleged tournament to top
989
+ */
990
+ this.minOrder = -1;
816
991
  this.gifts = [];
817
992
  this.labels = [];
818
993
  this.showTooltip = false;
819
- this.maxPlyerRank = 30;
994
+ this.defaultPageSize = DEFAULT_PAGE_SIZE;
820
995
  this.scrolledToMyLine = false;
821
996
  this.language = 'en';
822
997
  this.show = false;
@@ -824,7 +999,9 @@ const CasinoEngagementSuiteTournament = class {
824
999
  this.clientStylingUrl = '';
825
1000
  this.translationUrl = '';
826
1001
  this.device = 'Mobile';
1002
+ this.orientation = 'Landscape';
827
1003
  this.leaderboardsInit = undefined;
1004
+ this.tipsHideDelay = 3 * 1000;
828
1005
  this.tab = Tab.info;
829
1006
  this.locale = TRANSLATIONS;
830
1007
  this.tournamentItem = undefined;
@@ -858,4 +1035,4 @@ const CasinoEngagementSuiteTournament = class {
858
1035
  };
859
1036
  CasinoEngagementSuiteTournament.style = CasinoEngagementSuiteTournamentStyle0;
860
1037
 
861
- export { CasinoEngagementSuiteTournament as C, DialogType as D, LeaderboardPage as L, TRANSLATIONS as T, getProgress as a, classnames as c, formatDate as f, getTimeDifference as g, isTournamentClosed as i, renderGradientRoundedButton as r };
1038
+ export { CasinoEngagementSuiteTournament as C, DialogType as D, LeaderboardPage as L, TRANSLATIONS as T, getTimeDifference as a, classnames as c, formatDate as f, getProgress as g, isTournamentEnded as i, renderGradientRoundedButton as r };