@everymatrix/casino-challenges-container 0.13.17 → 0.13.18

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.
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32],"sseConnection":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
22
+ return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"sseConnection":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoChallengesContainer = require('./casino-challenges-container-56802166.js');
5
+ const casinoChallengesContainer = require('./casino-challenges-container-eea36ec5.js');
6
6
  require('./index-d5f8d1ee.js');
7
7
 
8
8
 
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32],"sseConnection":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
11
+ return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"sseConnection":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -13,8 +13,6 @@ import { updateInState, updateInStateByChallengeId } from "../../utils/utils";
13
13
  import { EventSourcePolyfill } from "event-source-polyfill";
14
14
  export class CasinoChallengesContainer {
15
15
  constructor() {
16
- this.activeProgressTabIndex = EChallengesTabs.Active;
17
- this.pendingProgressTabIndex = EChallengesTabs.Pending;
18
16
  this.onOpenNotification = (event) => {
19
17
  this.notification = event.detail;
20
18
  setTimeout(() => (this.notification = null), 10000);
@@ -34,19 +32,22 @@ export class CasinoChallengesContainer {
34
32
  this.onLoadMore = () => {
35
33
  this.pageNumber += 1;
36
34
  this.getChallenges(this.activeTabIndex).then((res) => {
37
- this.total = res.TotalCount;
38
35
  switch (this.activeTabIndex) {
39
36
  case EChallengesTabs.Promo:
40
37
  this.promoChallenges = [...this.promoChallenges, ...res.Data];
38
+ this.hasMore = this.promoChallenges.length < res.TotalCount;
41
39
  break;
42
40
  case EChallengesTabs.Active:
43
41
  this.activeChallenges = [...this.activeChallenges, ...res.Data];
42
+ this.hasMore = this.activeChallenges.length < res.TotalCount;
44
43
  break;
45
44
  case EChallengesTabs.Pending:
46
45
  this.pendingChallenges = [...this.pendingChallenges, ...res.Data];
46
+ this.hasMore = this.pendingChallenges.length < res.TotalCount;
47
47
  break;
48
48
  case EChallengesTabs.Finished:
49
49
  this.playerHistory = [...this.playerHistory, ...res.Data];
50
+ this.hasMore = this.playerHistory.length < res.TotalItem;
50
51
  break;
51
52
  }
52
53
  });
@@ -56,8 +57,10 @@ export class CasinoChallengesContainer {
56
57
  this.notification = null;
57
58
  this.activeTabIndex = index;
58
59
  this.pageNumber = 0;
59
- this.total = 0;
60
- this.loadData(index);
60
+ this.hasMore = true;
61
+ if (index !== EChallengesTabs.Code) {
62
+ this.loadData(index);
63
+ }
61
64
  }
62
65
  };
63
66
  this.renderNotification = () => {
@@ -100,7 +103,7 @@ export class CasinoChallengesContainer {
100
103
  this.playerHistory = [];
101
104
  this.loading = false;
102
105
  this.pageNumber = 0;
103
- this.total = 0;
106
+ this.hasMore = false;
104
107
  this.pageSize = 20;
105
108
  this.notification = null;
106
109
  this.sseConnection = undefined;
@@ -223,7 +226,7 @@ export class CasinoChallengesContainer {
223
226
  if (!this.checkAttrs()) {
224
227
  const path = tabIndex === EChallengesTabs.Finished ? 'PlayerHistory' : 'GetChallengesInfo';
225
228
  const url = `${this.endpoint}/challenge/${path}`;
226
- const body = Object.assign(Object.assign(Object.assign({ DomainId: this.domain, PlayerLanguage: this.language, PageNumber: this.pageNumber, PageSize: this.pageSize }, (this.session && { PlayerSession: this.session })), (this.userId && tabIndex === EChallengesTabs.Finished && { UserId: this.userId })), (this.session && { IsFutureAvailable: tabIndex === EChallengesTabs.Active ? false : true }));
229
+ const body = Object.assign(Object.assign(Object.assign({ DomainId: this.domain, PlayerLanguage: this.language, PageNumber: this.pageNumber, PageSize: this.pageSize }, (this.session && { PlayerSession: this.session })), (this.userId && tabIndex === EChallengesTabs.Finished && { UserId: this.userId })), (this.session && { IsFutureAvailable: tabIndex !== EChallengesTabs.Active }));
227
230
  this.loading = true;
228
231
  return fetch(url, {
229
232
  method: 'POST',
@@ -240,19 +243,22 @@ export class CasinoChallengesContainer {
240
243
  this.getChallenges(tabIndex).then((res) => {
241
244
  if (res === null || res === void 0 ? void 0 : res.Success) {
242
245
  this.pageNumber = res.PageNumber;
243
- this.total = res.TotalCount;
244
246
  switch (tabIndex) {
245
247
  case EChallengesTabs.Promo:
246
248
  this.promoChallenges = res.Data;
249
+ this.hasMore = this.promoChallenges.length < res.TotalCount;
247
250
  break;
248
251
  case EChallengesTabs.Active:
249
252
  this.activeChallenges = res.Data;
253
+ this.hasMore = this.activeChallenges.length < res.TotalCount;
250
254
  break;
251
255
  case EChallengesTabs.Pending:
252
256
  this.pendingChallenges = res.Data;
257
+ this.hasMore = this.pendingChallenges.length < res.TotalCount;
253
258
  break;
254
259
  case EChallengesTabs.Finished:
255
260
  this.playerHistory = res.Data;
261
+ this.hasMore = this.playerHistory.length < res.TotalItem;
256
262
  break;
257
263
  }
258
264
  }
@@ -267,8 +273,8 @@ export class CasinoChallengesContainer {
267
273
  if (this.clientStylingUrl)
268
274
  setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
269
275
  }
270
- this.loadData(this.activeProgressTabIndex);
271
- this.loadData(this.pendingProgressTabIndex);
276
+ this.loadData(EChallengesTabs.Active);
277
+ this.loadData(EChallengesTabs.Pending);
272
278
  }
273
279
  disconnectedCallback() {
274
280
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
@@ -281,22 +287,21 @@ export class CasinoChallengesContainer {
281
287
  this.connectGameToLiveLobby();
282
288
  }
283
289
  renderChallengesContent() {
284
- var _a, _b, _c, _d;
285
290
  switch (this.activeTabIndex) {
286
291
  case EChallengesTabs.Promo:
287
- return (h("casino-challenges-list", { challenges: this.promoChallenges, onLoadMore: this.onLoadMore, loading: this.loading, hasMore: ((_a = this.promoChallenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
292
+ return (h("casino-challenges-list", { challenges: this.promoChallenges, onLoadMore: this.onLoadMore, loading: this.loading, hasMore: this.hasMore, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
288
293
  case EChallengesTabs.Active:
289
- return (h("casino-challenges-list", { challenges: this.activeChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: ((_b = this.activeChallenges) === null || _b === void 0 ? void 0 : _b.length) < this.total, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
294
+ return (h("casino-challenges-list", { challenges: this.activeChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: this.hasMore, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
290
295
  case EChallengesTabs.Pending:
291
- return (h("casino-challenges-list", { challenges: this.pendingChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: ((_c = this.pendingChallenges) === null || _c === void 0 ? void 0 : _c.length) < this.total, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
296
+ return (h("casino-challenges-list", { challenges: this.pendingChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: this.hasMore, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
292
297
  case EChallengesTabs.Finished:
293
- return (h("casino-challenges-player-history", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_d = this.playerHistory) === null || _d === void 0 ? void 0 : _d.length) < this.total }));
298
+ return (h("casino-challenges-player-history", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: this.hasMore }));
294
299
  case EChallengesTabs.Code:
295
300
  return (h("casino-challenges-claim-code", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification }));
296
301
  }
297
302
  }
298
303
  render() {
299
- return (h("div", { key: '47e72f3c0219689d0d8e17a152f9738de106d347', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'f6e150aa38dacfe0bea7fa12e1a45c00e7c76010', class: "challenges" }, h("div", { key: '3832b0971f6533af2f71be300c6cd4396e7e7dc7', class: "challenges__header" }, h("h1", { key: '1e9042e38fc0fa19363cfe9702147739cc339e7a', class: "challenges__title" }, h("img", { key: '919ac7789096afa6e63d085f80592bab52cc679b', src: titleIcon, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '46c3c6e862b922d06ee62d7021f206d11f19f474', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
304
+ return (h("div", { key: '03a7623f9cf348307d5030ced7a880868c2b06de', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'a91e6a5f3622523c7a857bdf29c31fe4e34590d5', class: "challenges" }, h("div", { key: '119677b5ef89f229848bc151ab04b97367ca7760', class: "challenges__header" }, h("h1", { key: '16d7a2c6bd3817542d9c9abc0c9228af5dc668f6', class: "challenges__title" }, h("img", { key: 'aafc5be41e382027b85651239671eb5b4acaa6fb', src: titleIcon, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '53ce6e0def0dab0e59ea3e8aa30f50a006667589', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
300
305
  if (tab.label === EChallengesTabs[0])
301
306
  return;
302
307
  return (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, tab.label, (tab === null || tab === void 0 ? void 0 : tab.showNotification) && h("img", { src: notificationIcon })));
@@ -488,7 +493,7 @@ export class CasinoChallengesContainer {
488
493
  "playerHistory": {},
489
494
  "loading": {},
490
495
  "pageNumber": {},
491
- "total": {},
496
+ "hasMore": {},
492
497
  "pageSize": {},
493
498
  "notification": {},
494
499
  "sseConnection": {}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-7720ad93.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-77162f28.js';
3
- export { C as casino_challenges_container } from './casino-challenges-container-77162f28.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-0c0c6b32.js';
3
+ export { C as casino_challenges_container } from './casino-challenges-container-0c0c6b32.js';
4
4
 
5
5
  const DEFAULT_LANGUAGE$3 = 'en';
6
6
  const TRANSLATIONS$3 = {
@@ -20,7 +20,7 @@ const TRANSLATIONS$3 = {
20
20
  finished: 'Finished',
21
21
  suspended: 'Suspended',
22
22
  unavailable: 'Unavailable',
23
- start: 'Start',
23
+ optIn: 'Opt In',
24
24
  resume: 'Resume',
25
25
  pause: 'Pause',
26
26
  new: 'New',
@@ -213,7 +213,7 @@ const slotMachineSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD
213
213
 
214
214
  const MIN_DEPOSIT_AMOUNT = '0';
215
215
 
216
- const casinoChallengeCardCss = ".card {\n background-color: var(--emw--color-card-background, #141515);\n border: 2px solid var(--emw--card-border-color, rgba(221, 255, 207, 0.1019607843));\n border-radius: 16px;\n box-sizing: border-box;\n color: var(--emw--color-black, #000000);\n position: relative;\n width: 308px;\n height: 476px;\n display: flex;\n flex-direction: column;\n}\n@container challenges-container (max-width: 670px) {\n .card {\n width: 100%;\n height: auto;\n padding-bottom: 52px;\n }\n}\n.card:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.card__image {\n border-radius: 16px 16px 0 0;\n height: 200px;\n object-fit: cover;\n width: 100%;\n}\n@container challenges-container (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__image.grayed {\n opacity: 0.6;\n}\n.card__title {\n -webkit-box-orient: vertical;\n color: var(--emw--color-white, #ffffff);\n display: -webkit-box;\n font-size: var(--emw--font-size-medium, 16px);\n max-height: 39px;\n min-height: 22px;\n -webkit-line-clamp: 2;\n margin: 0 0 8px;\n overflow: hidden;\n padding-right: 32px;\n position: relative;\n text-overflow: ellipsis;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n background: transparent;\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n border-radius: var(--emw--button-border-radius, 99px);\n color: var(--emw--color-secondary, #e9931e);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n height: 34px;\n text-transform: uppercase;\n position: absolute;\n bottom: 20px;\n left: 20px;\n width: calc(100% - 40px);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button.filled {\n background-color: var(--emw--button-background-primary-color, #18ce51);\n border-color: var(--emw--color-gray-300, #083b17);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button.filled:hover {\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n color: var(--emw--color-gray-300, #083b17);\n}\n.card__button.grayed {\n color: var(--emw--color-gray-50, #e2e2e2);\n}\n.card__button.grayed:hover {\n border-color: var(--emw--button-primary-border, #24b24e);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button:disabled, .card__button:disabled:hover {\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n color: var(--emw--color-gray-50, #e2e2e2);\n cursor: not-allowed;\n opacity: 0.7;\n}\n.card__badge {\n backdrop-filter: blur(20px);\n background: var(--emw--color-white, #ffffff);\n border-radius: 30px;\n box-shadow: 0 4px 4px 0 var(--emw--button-box-shadow-color, rgba(0, 0, 0, 0.25));\n box-sizing: border-box;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n padding: 2px 12px;\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.card__badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292c29);\n font-weight: 700;\n}\n.card__badge.completed {\n background: var(--emw--background-success-color, #c9f0d7);\n border: 1px solid var(--emw--border-success-color, #00b74f);\n color: var(--emw--color-gray-300, #083b17);\n font-weight: 700;\n}\n.card__badge.forfeited {\n background: var(--emw--background-errored-color, #ffe1df);\n border: 1px solid var(--emw--border-errored-color, #d6421e);\n color: var(--emw--errored-color, #850606);\n font-weight: 700;\n}\n.card__badge.paused {\n background: var(--emw--background-warning-color, #f8e4ad);\n border: 1px solid var(--emw--border-warning-color, #ea9018);\n color: var(--emw--warning-color, #6d460a);\n font-weight: 700;\n}\n.card__icon--casino {\n height: 24px;\n position: absolute;\n right: 0;\n top: 0;\n width: 24px;\n}\n.card__icon--sportsbook {\n height: 22px;\n position: absolute;\n right: 0;\n top: 0;\n width: 22px;\n}\n\n.additional-info-trigger-info {\n background: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n margin: 0px;\n}\n\n.info-item {\n color: var(--emw--color-primary, #1dbf51);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n}\n@container challenges-container (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item.grayed {\n color: var(--emw--button-border-color-gray, #727672);\n}\n.info-item__label {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n}\n.info-item__tooltip {\n background-color: var(--emw--color-card-background-secondary, #1b1c2b);\n border-radius: 8px;\n color: var(--emw--color-white, #ffffff);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n opacity: 1;\n padding: 8px 12px;\n position: absolute;\n white-space: normal;\n z-index: 200;\n}\n.info-item__tooltip::before {\n border-bottom: 6px solid var(--emw--color-card-background-secondary, #1b1c2b);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n content: \"\";\n height: 0;\n left: 50%;\n position: absolute;\n top: -5px;\n transform: translateX(-50%);\n width: 0;\n z-index: 201;\n}\n\n.progress {\n align-content: center;\n background-color: var(--emw--progress-background, rgba(188, 252, 177, 0.1019607843));\n border-radius: 100px;\n box-sizing: border-box;\n height: 22px;\n margin-bottom: 8px;\n padding: 0 2px;\n position: relative;\n}\n.progress.paused {\n opacity: 0.5;\n}\n.progress.grayed {\n mix-blend-mode: luminosity;\n}\n.progress__placeholder {\n height: 28px;\n}\n.progress__icon {\n width: 11px;\n}\n.progress__point {\n align-items: center;\n border-radius: 50%;\n color: var(--emw--color-gray-150, #c8d6ce);\n display: flex;\n font-size: 12px;\n font-weight: 700;\n height: 19px;\n justify-content: center;\n line-height: 19px;\n position: absolute;\n text-align: center;\n top: 0;\n width: 19px;\n}\n.progress__point.start {\n background: linear-gradient(90deg, var(--emw--progress-active-level, #24aa4d) 0%, var(--emw--progress-active-level-secondary, #113f21) 100%);\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n left: 0;\n}\n.progress__point.end {\n background: var(--emw--color-gray-300, #083b17);\n border: 2px solid var(--emw--dark-green, #1c8d56);\n opacity: 0.7;\n right: 0;\n}\n.progress__point.finished {\n background: linear-gradient(90deg, var(--emw--progress-active-level, #24aa4d) 0%, var(--emw--progress-active-level-secondary, #113f21) 100%);\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n opacity: 1;\n}\n.progress__point.hidden {\n opacity: 0;\n}\n.progress__bar {\n background: linear-gradient(90deg, var(--emw--secondary-green, #1e654f) 0%, var(--emw--dark-green, #1c8d56) 100%);\n border-radius: 73px;\n box-sizing: border-box;\n height: 16px;\n padding-right: 6px;\n}\n.progress__text {\n color: var(--emw--color-gray-50, #e2e2e2);\n font-size: 11px;\n font-weight: 700;\n left: 50%;\n line-height: 16px;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.new-label {\n align-items: center;\n background: linear-gradient(0deg, var(--emw--new-badge-background-color, #ff3d3d) 0%, var(--emw--new-badge-background-color-2, #a80000) 100%);\n clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 100%, 0% 70%);\n display: flex;\n height: 28px;\n justify-content: center;\n position: absolute;\n right: 16px;\n top: 32px;\n width: 37px;\n}\n.new-label span {\n background: linear-gradient(to bottom right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom right/50% 50% no-repeat, linear-gradient(to bottom left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom left/50% 50% no-repeat, linear-gradient(to top left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top left/50% 50% no-repeat, linear-gradient(to top right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top right/50% 50% no-repeat;\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n font-size: var(--emw--font-size-medium, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n padding-bottom: 3px;\n}\n\n.significant-condition {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-family: var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif), serif;\n font-size: 12px;\n font-weight: 500;\n line-height: 14px;\n margin: 6px 0 0 0;\n}";
216
+ const casinoChallengeCardCss = ".card {\n background-color: var(--emw--color-card-background, #141515);\n border: 2px solid var(--emw--card-border-color, rgba(221, 255, 207, 0.1019607843));\n border-radius: 16px;\n box-sizing: border-box;\n color: var(--emw--color-black, #000000);\n position: relative;\n width: 308px;\n height: 476px;\n display: flex;\n flex-direction: column;\n}\n@container challenges-container (max-width: 670px) {\n .card {\n width: 100%;\n height: auto;\n padding-bottom: 52px;\n }\n}\n.card:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.card__image {\n border-radius: 16px 16px 0 0;\n height: 200px;\n object-fit: cover;\n width: 100%;\n}\n@container challenges-container (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__image.grayed {\n opacity: 0.6;\n}\n.card__title {\n -webkit-box-orient: vertical;\n color: var(--emw--color-white, #ffffff);\n display: -webkit-box;\n font-size: var(--emw--font-size-medium, 16px);\n max-height: 39px;\n min-height: 22px;\n -webkit-line-clamp: 2;\n margin: 0 0 8px;\n overflow: hidden;\n padding-right: 32px;\n position: relative;\n text-overflow: ellipsis;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n background: transparent;\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n border-radius: var(--emw--button-border-radius, 99px);\n color: var(--emw--color-secondary, #e9931e);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n height: 34px;\n text-transform: uppercase;\n position: absolute;\n bottom: 20px;\n left: 20px;\n width: calc(100% - 40px);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button.filled {\n background-color: var(--emw--button-background-primary-color, #18ce51);\n border-color: var(--emw--color-gray-300, #083b17);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button.filled:hover {\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n color: var(--emw--color-gray-300, #083b17);\n}\n.card__button.grayed {\n color: var(--emw--color-gray-50, #e2e2e2);\n}\n.card__button.grayed:hover {\n border-color: var(--emw--button-primary-border, #24b24e);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button:disabled, .card__button:disabled:hover {\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n color: var(--emw--color-gray-50, #e2e2e2);\n cursor: not-allowed;\n opacity: 0.7;\n}\n.card__badge {\n backdrop-filter: blur(20px);\n background: var(--emw--color-white, #ffffff);\n border-radius: 30px;\n box-shadow: 0 4px 4px 0 var(--emw--button-box-shadow-color, rgba(0, 0, 0, 0.25));\n box-sizing: border-box;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n padding: 2px 12px;\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.card__badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292c29);\n font-weight: 700;\n}\n.card__badge.completed {\n background: var(--emw--background-success-color, #c9f0d7);\n border: 1px solid var(--emw--border-success-color, #00b74f);\n color: var(--emw--color-gray-300, #083b17);\n font-weight: 700;\n}\n.card__badge.forfeited {\n background: var(--emw--background-errored-color, #ffe1df);\n border: 1px solid var(--emw--border-errored-color, #d6421e);\n color: var(--emw--errored-color, #850606);\n font-weight: 700;\n}\n.card__badge.paused {\n background: var(--emw--background-warning-color, #f8e4ad);\n border: 1px solid var(--emw--border-warning-color, #ea9018);\n color: var(--emw--warning-color, #6d460a);\n font-weight: 700;\n}\n.card__icon--casino {\n height: 24px;\n position: absolute;\n right: 0;\n top: 0;\n width: 24px;\n}\n.card__icon--sportsbook {\n height: 22px;\n position: absolute;\n right: 0;\n top: 0;\n width: 22px;\n}\n\n.additional-info-trigger-info {\n background: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n margin: 0px;\n}\n\n.info-item {\n color: var(--emw--color-primary, #1dbf51);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n}\n@container challenges-container (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item.grayed {\n color: var(--emw--button-border-color-gray, #727672);\n}\n.info-item__label {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n}\n.info-item__tooltip {\n background-color: var(--emw--color-card-background-secondary, #1b1c2b);\n border-radius: 8px;\n color: var(--emw--color-white, #ffffff);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n opacity: 1;\n padding: 8px 12px;\n position: absolute;\n white-space: normal;\n z-index: 200;\n}\n.info-item__tooltip::before {\n border-bottom: 6px solid var(--emw--color-card-background-secondary, #1b1c2b);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n content: \"\";\n height: 0;\n left: 50%;\n position: absolute;\n top: -5px;\n transform: translateX(-50%);\n width: 0;\n z-index: 201;\n}\n\n.progress {\n align-content: center;\n background-color: var(--emw--progress-background, rgba(188, 252, 177, 0.1019607843));\n border-radius: 100px;\n box-sizing: border-box;\n height: 22px;\n margin-bottom: 8px;\n padding: 0 2px;\n position: relative;\n}\n.progress.paused {\n opacity: 0.5;\n}\n.progress.grayed {\n mix-blend-mode: luminosity;\n}\n.progress__placeholder {\n height: 28px;\n}\n.progress__icon {\n width: 11px;\n}\n.progress__point {\n align-items: center;\n border-radius: 50%;\n color: var(--emw--color-gray-150, #c8d6ce);\n display: flex;\n font-size: 12px;\n font-weight: 700;\n height: 19px;\n justify-content: center;\n line-height: 19px;\n position: absolute;\n text-align: center;\n top: 0;\n width: 19px;\n}\n.progress__point.start {\n background: linear-gradient(90deg, var(--emw--progress-active-level, #24aa4d) 0%, var(--emw--progress-active-level-secondary, #113f21) 100%);\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n left: 0;\n}\n.progress__point.end {\n background: var(--emw--color-gray-300, #083b17);\n border: 2px solid var(--emw--dark-green, #1c8d56);\n opacity: 0.7;\n right: 0;\n}\n.progress__point.finished {\n background: linear-gradient(90deg, var(--emw--progress-active-level, #24aa4d) 0%, var(--emw--progress-active-level-secondary, #113f21) 100%);\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n opacity: 1;\n}\n.progress__point.hidden {\n opacity: 0;\n}\n.progress__bar {\n background: linear-gradient(90deg, var(--emw--secondary-green, #1e654f) 0%, var(--emw--dark-green, #1c8d56) 100%);\n border-radius: 73px;\n box-sizing: border-box;\n height: 16px;\n padding-right: 6px;\n}\n.progress__text {\n color: var(--emw--color-gray-50, #e2e2e2);\n font-size: 11px;\n font-weight: 700;\n left: 50%;\n line-height: 16px;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.new-label {\n align-items: center;\n background: linear-gradient(0deg, var(--emw--new-badge-background-color, #ff3d3d) 0%, var(--emw--new-badge-background-color-2, #a80000) 100%);\n clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 100%, 0% 70%);\n display: flex;\n height: 28px;\n justify-content: center;\n position: absolute;\n right: 16px;\n top: 32px;\n width: 37px;\n}\n.new-label span {\n background: linear-gradient(to bottom right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom right/50% 50% no-repeat, linear-gradient(to bottom left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom left/50% 50% no-repeat, linear-gradient(to top left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top left/50% 50% no-repeat, linear-gradient(to top right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top right/50% 50% no-repeat;\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n font-size: var(--emw--font-size-medium, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n padding-bottom: 3px;\n}\n\n.significant-condition {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-family: var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif), serif;\n font-size: 12px;\n font-weight: 500;\n line-height: 14px;\n margin: 6px 0 0 0;\n word-break: break-all;\n}";
217
217
  const CasinoChallengeCardStyle0 = casinoChallengeCardCss;
218
218
 
219
219
  const CasinoChallengeCard = class {
@@ -483,7 +483,7 @@ const CasinoChallengeCard = class {
483
483
  }
484
484
  else if (this.isUserAuthorized && !this.isChallengePaused) {
485
485
  if (this.challenge.Status === EChallengeProgressStatus.Started) {
486
- return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('start', this.language)));
486
+ return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('optIn', this.language)));
487
487
  }
488
488
  if (this.challenge.Status === EChallengeProgressStatus.Paused) {
489
489
  return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('resume', this.language)));
@@ -540,10 +540,10 @@ const CasinoChallengeCard = class {
540
540
  }
541
541
  render() {
542
542
  var _a, _b, _c, _d;
543
- return (h("div", { key: '7c15ca0a539fc5e9b78d0f29a9494e755e5da55f', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'd0e5f67a366e90fda33c81de72241b583c0ed9fb', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Levels) }, h("img", { key: '2de1aa58933381928a3e83213627e54fbe9606a8', class: {
543
+ return (h("div", { key: '7c15ca0a539fc5e9b78d0f29a9494e755e5da55f', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '89e90331acc6f8c0496780c184ca2be903fa1f16', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: '7bac0acf7ee2b43a07fd9917c20d5c3f4f244bb7', class: {
544
544
  card__image: true,
545
545
  grayed: !!this.isChallengeGrayed || this.challenge.Status === EChallengeProgressStatus.Awaiting
546
- }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: '72bbf6ff3e2cedaa11da1e49ffc041efcfc4e610', class: "card__content" }, h("h1", { key: '5e425918eccf929d9b43046c0a789999accdff07', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
546
+ }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: '13c6a37d17b3f10b5bbe876b928222e585796cfa', class: "card__content" }, h("h1", { key: 'c197825b346c0fc04d80d9c53904ec8f21a73288', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
547
547
  _d.PresentationName, this.renderCardIcon()), this.getChallengeProgress, this.additionalInfo, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getSignificantConditions(), this.getCardButton))));
548
548
  }
549
549
  static get watchers() { return {
@@ -716,7 +716,7 @@ const translate$1 = (key, customLang) => {
716
716
  return TRANSLATIONS$1[lang !== undefined && lang in TRANSLATIONS$1 ? lang : DEFAULT_LANGUAGE$1][key];
717
717
  };
718
718
 
719
- const casinoChallengesListCss = ".empty {\n color: var(--emw--color-gray-50, #E2E2E2);\n padding: 80px 0 0;\n display: flex;\n gap: 12px;\n flex-direction: column;\n align-items: center;\n line-height: 24px;\n font-size: var(--emw--font-size-medium, 16px);\n text-align: center;\n}\n.empty img {\n height: 38px;\n margin-bottom: 18px;\n}\n\n.challenges-list {\n display: flex;\n flex-wrap: wrap;\n gap: 30px;\n width: 100%;\n}\n@container challenges-container (max-width: 670px) {\n .challenges-list .list-item {\n width: 100%;\n }\n}\n\n.loader {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color-dark, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenges-container (max-width: 576px) {\n .loader {\n width: 100%;\n }\n}\n.loader:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.loader .SkeletonRows .SkeletonContainer {\n padding: 0 20px 0 20px;\n}\n.loader .SkeletonButton .Skeleton.SkeletonText {\n margin: 0;\n height: 28px;\n margin: 0 20px 20px 20px;\n border-radius: var(--emw--button-border-radius, 99px);\n width: auto;\n}\n.loader .Skeleton.SkeletonImage {\n border-radius: 16px 16px 0 0;\n}\n.loader .Skeleton.SkeletonText {\n margin: 20px 0;\n}";
719
+ const casinoChallengesListCss = ".empty {\n color: var(--emw--color-gray-50, #e2e2e2);\n padding: 80px 0 0;\n display: flex;\n gap: 12px;\n flex-direction: column;\n align-items: center;\n line-height: 24px;\n font-size: var(--emw--font-size-medium, 16px);\n text-align: center;\n}\n.empty img {\n height: 38px;\n margin-bottom: 18px;\n}\n\n.challenges-list {\n display: flex;\n flex-wrap: wrap;\n gap: 30px;\n width: 100%;\n}\n@container challenges-container (max-width: 1386px) and (min-width: 1049px) {\n .challenges-list {\n width: 988px;\n }\n}\n@container challenges-container (max-width: 1048px) {\n .challenges-list {\n width: 648px;\n }\n}\n@container challenges-container (max-width: 670px) {\n .challenges-list {\n width: 100%;\n }\n .challenges-list .list-item {\n width: 100%;\n }\n}\n\n.loader {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color-dark, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenges-container (max-width: 576px) {\n .loader {\n width: 100%;\n }\n}\n.loader:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.loader .SkeletonRows .SkeletonContainer {\n padding: 0 20px 0 20px;\n}\n.loader .SkeletonButton .Skeleton.SkeletonText {\n margin: 0;\n height: 28px;\n margin: 0 20px 20px 20px;\n border-radius: var(--emw--button-border-radius, 99px);\n width: auto;\n}\n.loader .Skeleton.SkeletonImage {\n border-radius: 16px 16px 0 0;\n}\n.loader .Skeleton.SkeletonText {\n margin: 20px 0;\n}";
720
720
  const CasinoChallengesListStyle0 = casinoChallengesListCss;
721
721
 
722
722
  const skeletons$1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
@@ -727,11 +727,13 @@ const CasinoChallengeList = class {
727
727
  this.timerExpired = createEvent(this, "timerExpired", 7);
728
728
  this.itemViewed = createEvent(this, "itemViewed", 7);
729
729
  this.setLastItemRef = (el) => {
730
+ if (!el)
731
+ return;
730
732
  if (this.lastItemRef && this.observer) {
731
733
  this.observer.unobserve(this.lastItemRef);
732
734
  }
733
735
  this.lastItemRef = el;
734
- if (el && this.observer && !this.loading) {
736
+ if (this.observer && !this.loading) {
735
737
  this.observer.observe(el);
736
738
  }
737
739
  };
@@ -765,19 +767,31 @@ const CasinoChallengeList = class {
765
767
  setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
766
768
  }
767
769
  }
770
+ handleChallengesChange() {
771
+ var _a;
772
+ if (this.observer) {
773
+ this.observer.disconnect();
774
+ }
775
+ if (this.lastItemRef && !this.loading) {
776
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.observe(this.lastItemRef);
777
+ }
778
+ }
768
779
  setupObserver() {
769
780
  if (!this.lastItemRef || this.loading || !this.hasMore)
770
781
  return;
771
782
  if (!this.observer) {
772
783
  this.observer = new IntersectionObserver(([entry]) => {
773
- if (entry.isIntersecting && !this.loading && this.hasMore) {
774
- this.observer.unobserve(entry.target);
784
+ var _a;
785
+ if (!entry.isIntersecting)
786
+ return;
787
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.unobserve(entry.target);
788
+ if (!this.loading && this.hasMore) {
775
789
  this.loadMore.emit();
776
790
  }
777
791
  }, {
778
792
  root: null,
779
- rootMargin: '0px',
780
- threshold: 0.1
793
+ rootMargin: '150px 0px',
794
+ threshold: 0
781
795
  });
782
796
  }
783
797
  this.observer.disconnect();
@@ -818,13 +832,14 @@ const CasinoChallengeList = class {
818
832
  return (h("div", { class: "empty" }, h("img", { src: emptyStateSvg$1 }), h("b", null, translate$1('listEmptyTitle', this.language)), h("span", null, translate$1('listEmptyDescription', this.language))));
819
833
  }
820
834
  render() {
821
- return (h("div", { key: '508ab7e1697f2f10497955d69404a7ad82f55a92', ref: (el) => (this.stylingContainer = el) }, this.challenges.length === 0 && !this.loading && this.renderEmptyState(), h("div", { key: '3984898e7da382a6bf65d0f9ad9abd2c784d2674', class: "challenges-list" }, this.challenges.map((challenge, index) => (h("div", { key: challenge.Id, ref: index === this.challenges.length - 1 ? this.setLastItemRef : null, class: "list-item" }, h("casino-challenge-card", { challenge: challenge, language: this.language, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, activeChallengesTabIndex: this.activeChallengesTabIndex, isUserAuthorized: this.isUserAuthorized, userId: this.userId, endpoint: this.endpoint, session: this.session, domain: this.domain })))), this.loading && this.renderSkeletons())));
835
+ return (h("div", { key: '62670fcf35ff5548edaac3677fe29f1c233601cc', ref: (el) => (this.stylingContainer = el), style: { justifyItems: 'center' } }, this.challenges.length === 0 && !this.loading && this.renderEmptyState(), h("div", { key: 'd0dd125137385864b4b24efff594346703396c4d', class: "challenges-list" }, this.challenges.map((challenge, index) => (h("div", { key: challenge.Id, ref: index === this.challenges.length - 1 ? this.setLastItemRef : null, class: "list-item" }, h("casino-challenge-card", { challenge: challenge, language: this.language, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, activeChallengesTabIndex: this.activeChallengesTabIndex, isUserAuthorized: this.isUserAuthorized, userId: this.userId, endpoint: this.endpoint, session: this.session, domain: this.domain })))), this.loading && this.renderSkeletons())));
822
836
  }
823
837
  get el() { return getElement(this); }
824
838
  static get watchers() { return {
825
839
  "clientStyling": ["handleClientStylingChange"],
826
840
  "clientStylingUrl": ["handleClientStylingUrlChange"],
827
- "mbSource": ["handleMbSourceChange"]
841
+ "mbSource": ["handleMbSourceChange"],
842
+ "challenges": ["handleChallengesChange"]
828
843
  }; }
829
844
  };
830
845
  CasinoChallengeList.style = CasinoChallengesListStyle0;
@@ -3090,11 +3105,13 @@ const CasinoChallengesPlayerHistory = class {
3090
3105
  registerInstance(this, hostRef);
3091
3106
  this.loadMore = createEvent(this, "loadMore", 7);
3092
3107
  this.setLastItemRef = (el) => {
3108
+ if (!el)
3109
+ return;
3093
3110
  if (this.lastItemRef && this.observer) {
3094
3111
  this.observer.unobserve(this.lastItemRef);
3095
3112
  }
3096
3113
  this.lastItemRef = el;
3097
- if (el && this.observer && !this.loading) {
3114
+ if (this.observer && !this.loading) {
3098
3115
  this.observer.observe(el);
3099
3116
  }
3100
3117
  };
@@ -3124,6 +3141,13 @@ const CasinoChallengesPlayerHistory = class {
3124
3141
  }
3125
3142
  }
3126
3143
  handlePlayerHistoryChange() {
3144
+ var _a;
3145
+ if (this.observer) {
3146
+ this.observer.disconnect();
3147
+ }
3148
+ if (this.lastItemRef && !this.loading) {
3149
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.observe(this.lastItemRef);
3150
+ }
3127
3151
  this.openItems = this.playerHistory.map(() => false);
3128
3152
  }
3129
3153
  setupObserver() {
@@ -3131,14 +3155,17 @@ const CasinoChallengesPlayerHistory = class {
3131
3155
  return;
3132
3156
  if (!this.observer) {
3133
3157
  this.observer = new IntersectionObserver(([entry]) => {
3134
- if (entry.isIntersecting && !this.loading && this.hasMore) {
3135
- this.observer.unobserve(entry.target);
3158
+ var _a;
3159
+ if (!entry.isIntersecting)
3160
+ return;
3161
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.unobserve(entry.target);
3162
+ if (!this.loading && this.hasMore) {
3136
3163
  this.loadMore.emit();
3137
3164
  }
3138
3165
  }, {
3139
3166
  root: null,
3140
- rootMargin: '0px',
3141
- threshold: 0.1
3167
+ rootMargin: '150px 0px',
3168
+ threshold: 0
3142
3169
  });
3143
3170
  }
3144
3171
  this.observer.disconnect();
@@ -3181,7 +3208,7 @@ const CasinoChallengesPlayerHistory = class {
3181
3208
  return (h("div", { class: "empty" }, h("img", { src: emptyStateSvg }), h("b", null, translate('playerHistoryEmptyTitle', this.language)), h("span", null, translate('playerHistoryEmptyDescription', this.language))));
3182
3209
  }
3183
3210
  render() {
3184
- return (h("div", { key: 'db8489f80dde691f596fe757d4eb635b53b87cf0', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'ffb1ebaacbff9418ed8a5cf62b1cf97c66f07bb9', class: "history" }, this.playerHistory.map((item, index) => (h("div", { class: "item", ref: index === this.playerHistory.length - 1 ? this.setLastItemRef : null }, h("button", { class: "header", onClick: () => this.toggle(index) }, h("span", null, item.Name), h("img", { src: this.openItems[index] ? arrowUpSvg : arrowDownSvg })), h("div", { class: `content ${this.openItems[index] ? 'open' : ''}` }, h("div", { class: "row list-header" }, h("span", { class: "col-1" }, translate('level', this.language)), h("span", { class: "col-2" }, translate('status', this.language)), h("span", { class: "col-2" }, translate('time', this.language))), item.Levels.map((level) => this.renderLevel(level)))))), this.loading && this.renderSkeletons(), !this.playerHistory.length && !this.loading && this.renderEmptyState())));
3211
+ return (h("div", { key: '82527a572241d085950c1bec7b0e54264b3a6e8e', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'cd6da6cce028f84e596b9cf4d24cb6b0a9b2afb4', class: "history" }, this.playerHistory.map((item, index) => (h("div", { class: "item", ref: index === this.playerHistory.length - 1 ? this.setLastItemRef : null }, h("button", { class: "header", onClick: () => this.toggle(index) }, h("span", null, item.Name), h("img", { src: this.openItems[index] ? arrowUpSvg : arrowDownSvg })), h("div", { class: `content ${this.openItems[index] ? 'open' : ''}` }, h("div", { class: "row list-header" }, h("span", { class: "col-1" }, translate('level', this.language)), h("span", { class: "col-2" }, translate('status', this.language)), h("span", { class: "col-2" }, translate('time', this.language))), item.Levels.map((level) => this.renderLevel(level)))))), this.loading && this.renderSkeletons(), !this.playerHistory.length && !this.loading && this.renderEmptyState())));
3185
3212
  }
3186
3213
  static get watchers() { return {
3187
3214
  "clientStyling": ["handleClientStylingChange"],
@@ -1298,8 +1298,6 @@ const CasinoChallengesContainerStyle0 = casinoChallengesContainerCss;
1298
1298
  const CasinoChallengesContainer = class {
1299
1299
  constructor(hostRef) {
1300
1300
  registerInstance(this, hostRef);
1301
- this.activeProgressTabIndex = EChallengesTabs.Active;
1302
- this.pendingProgressTabIndex = EChallengesTabs.Pending;
1303
1301
  this.onOpenNotification = (event) => {
1304
1302
  this.notification = event.detail;
1305
1303
  setTimeout(() => (this.notification = null), 10000);
@@ -1319,19 +1317,22 @@ const CasinoChallengesContainer = class {
1319
1317
  this.onLoadMore = () => {
1320
1318
  this.pageNumber += 1;
1321
1319
  this.getChallenges(this.activeTabIndex).then((res) => {
1322
- this.total = res.TotalCount;
1323
1320
  switch (this.activeTabIndex) {
1324
1321
  case EChallengesTabs.Promo:
1325
1322
  this.promoChallenges = [...this.promoChallenges, ...res.Data];
1323
+ this.hasMore = this.promoChallenges.length < res.TotalCount;
1326
1324
  break;
1327
1325
  case EChallengesTabs.Active:
1328
1326
  this.activeChallenges = [...this.activeChallenges, ...res.Data];
1327
+ this.hasMore = this.activeChallenges.length < res.TotalCount;
1329
1328
  break;
1330
1329
  case EChallengesTabs.Pending:
1331
1330
  this.pendingChallenges = [...this.pendingChallenges, ...res.Data];
1331
+ this.hasMore = this.pendingChallenges.length < res.TotalCount;
1332
1332
  break;
1333
1333
  case EChallengesTabs.Finished:
1334
1334
  this.playerHistory = [...this.playerHistory, ...res.Data];
1335
+ this.hasMore = this.playerHistory.length < res.TotalItem;
1335
1336
  break;
1336
1337
  }
1337
1338
  });
@@ -1341,8 +1342,10 @@ const CasinoChallengesContainer = class {
1341
1342
  this.notification = null;
1342
1343
  this.activeTabIndex = index;
1343
1344
  this.pageNumber = 0;
1344
- this.total = 0;
1345
- this.loadData(index);
1345
+ this.hasMore = true;
1346
+ if (index !== EChallengesTabs.Code) {
1347
+ this.loadData(index);
1348
+ }
1346
1349
  }
1347
1350
  };
1348
1351
  this.renderNotification = () => {
@@ -1385,7 +1388,7 @@ const CasinoChallengesContainer = class {
1385
1388
  this.playerHistory = [];
1386
1389
  this.loading = false;
1387
1390
  this.pageNumber = 0;
1388
- this.total = 0;
1391
+ this.hasMore = false;
1389
1392
  this.pageSize = 20;
1390
1393
  this.notification = null;
1391
1394
  this.sseConnection = undefined;
@@ -1508,7 +1511,7 @@ const CasinoChallengesContainer = class {
1508
1511
  if (!this.checkAttrs()) {
1509
1512
  const path = tabIndex === EChallengesTabs.Finished ? 'PlayerHistory' : 'GetChallengesInfo';
1510
1513
  const url = `${this.endpoint}/challenge/${path}`;
1511
- const body = Object.assign(Object.assign(Object.assign({ DomainId: this.domain, PlayerLanguage: this.language, PageNumber: this.pageNumber, PageSize: this.pageSize }, (this.session && { PlayerSession: this.session })), (this.userId && tabIndex === EChallengesTabs.Finished && { UserId: this.userId })), (this.session && { IsFutureAvailable: tabIndex === EChallengesTabs.Active ? false : true }));
1514
+ const body = Object.assign(Object.assign(Object.assign({ DomainId: this.domain, PlayerLanguage: this.language, PageNumber: this.pageNumber, PageSize: this.pageSize }, (this.session && { PlayerSession: this.session })), (this.userId && tabIndex === EChallengesTabs.Finished && { UserId: this.userId })), (this.session && { IsFutureAvailable: tabIndex !== EChallengesTabs.Active }));
1512
1515
  this.loading = true;
1513
1516
  return fetch(url, {
1514
1517
  method: 'POST',
@@ -1525,19 +1528,22 @@ const CasinoChallengesContainer = class {
1525
1528
  this.getChallenges(tabIndex).then((res) => {
1526
1529
  if (res === null || res === void 0 ? void 0 : res.Success) {
1527
1530
  this.pageNumber = res.PageNumber;
1528
- this.total = res.TotalCount;
1529
1531
  switch (tabIndex) {
1530
1532
  case EChallengesTabs.Promo:
1531
1533
  this.promoChallenges = res.Data;
1534
+ this.hasMore = this.promoChallenges.length < res.TotalCount;
1532
1535
  break;
1533
1536
  case EChallengesTabs.Active:
1534
1537
  this.activeChallenges = res.Data;
1538
+ this.hasMore = this.activeChallenges.length < res.TotalCount;
1535
1539
  break;
1536
1540
  case EChallengesTabs.Pending:
1537
1541
  this.pendingChallenges = res.Data;
1542
+ this.hasMore = this.pendingChallenges.length < res.TotalCount;
1538
1543
  break;
1539
1544
  case EChallengesTabs.Finished:
1540
1545
  this.playerHistory = res.Data;
1546
+ this.hasMore = this.playerHistory.length < res.TotalItem;
1541
1547
  break;
1542
1548
  }
1543
1549
  }
@@ -1552,8 +1558,8 @@ const CasinoChallengesContainer = class {
1552
1558
  if (this.clientStylingUrl)
1553
1559
  setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
1554
1560
  }
1555
- this.loadData(this.activeProgressTabIndex);
1556
- this.loadData(this.pendingProgressTabIndex);
1561
+ this.loadData(EChallengesTabs.Active);
1562
+ this.loadData(EChallengesTabs.Pending);
1557
1563
  }
1558
1564
  disconnectedCallback() {
1559
1565
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
@@ -1566,22 +1572,21 @@ const CasinoChallengesContainer = class {
1566
1572
  this.connectGameToLiveLobby();
1567
1573
  }
1568
1574
  renderChallengesContent() {
1569
- var _a, _b, _c, _d;
1570
1575
  switch (this.activeTabIndex) {
1571
1576
  case EChallengesTabs.Promo:
1572
- return (h("casino-challenges-list", { challenges: this.promoChallenges, onLoadMore: this.onLoadMore, loading: this.loading, hasMore: ((_a = this.promoChallenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
1577
+ return (h("casino-challenges-list", { challenges: this.promoChallenges, onLoadMore: this.onLoadMore, loading: this.loading, hasMore: this.hasMore, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
1573
1578
  case EChallengesTabs.Active:
1574
- return (h("casino-challenges-list", { challenges: this.activeChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: ((_b = this.activeChallenges) === null || _b === void 0 ? void 0 : _b.length) < this.total, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
1579
+ return (h("casino-challenges-list", { challenges: this.activeChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: this.hasMore, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
1575
1580
  case EChallengesTabs.Pending:
1576
- return (h("casino-challenges-list", { challenges: this.pendingChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: ((_c = this.pendingChallenges) === null || _c === void 0 ? void 0 : _c.length) < this.total, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
1581
+ return (h("casino-challenges-list", { challenges: this.pendingChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: this.hasMore, language: this.language, activeChallengesTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
1577
1582
  case EChallengesTabs.Finished:
1578
- return (h("casino-challenges-player-history", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_d = this.playerHistory) === null || _d === void 0 ? void 0 : _d.length) < this.total }));
1583
+ return (h("casino-challenges-player-history", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: this.hasMore }));
1579
1584
  case EChallengesTabs.Code:
1580
1585
  return (h("casino-challenges-claim-code", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification }));
1581
1586
  }
1582
1587
  }
1583
1588
  render() {
1584
- return (h("div", { key: '47e72f3c0219689d0d8e17a152f9738de106d347', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'f6e150aa38dacfe0bea7fa12e1a45c00e7c76010', class: "challenges" }, h("div", { key: '3832b0971f6533af2f71be300c6cd4396e7e7dc7', class: "challenges__header" }, h("h1", { key: '1e9042e38fc0fa19363cfe9702147739cc339e7a', class: "challenges__title" }, h("img", { key: '919ac7789096afa6e63d085f80592bab52cc679b', src: titleIconSvg, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '46c3c6e862b922d06ee62d7021f206d11f19f474', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
1589
+ return (h("div", { key: '03a7623f9cf348307d5030ced7a880868c2b06de', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'a91e6a5f3622523c7a857bdf29c31fe4e34590d5', class: "challenges" }, h("div", { key: '119677b5ef89f229848bc151ab04b97367ca7760', class: "challenges__header" }, h("h1", { key: '16d7a2c6bd3817542d9c9abc0c9228af5dc668f6', class: "challenges__title" }, h("img", { key: 'aafc5be41e382027b85651239671eb5b4acaa6fb', src: titleIconSvg, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '53ce6e0def0dab0e59ea3e8aa30f50a006667589', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
1585
1590
  if (tab.label === EChallengesTabs[0])
1586
1591
  return;
1587
1592
  return (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, tab.label, (tab === null || tab === void 0 ? void 0 : tab.showNotification) && h("img", { src: notificationSvg })));
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32],"sseConnection":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
19
+ return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"sseConnection":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
20
20
  });