@everymatrix/casino-challenges-overlay 0.22.18 → 0.22.19

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.
@@ -1 +1 @@
1
- export{C as CasinoChallengesOverlay}from"./casino-challenges-overlay-fc86db96.js";import"./index-58f943ea.js";
1
+ export{C as CasinoChallengesOverlay}from"./casino-challenges-overlay-8a765607.js";import"./index-58f943ea.js";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-98384ab0.js');
6
- const casinoChallengesOverlay = require('./casino-challenges-overlay-e699eea9.js');
6
+ const casinoChallengesOverlay = require('./casino-challenges-overlay-c00e3b15.js');
7
7
 
8
8
  const DEFAULT_LANGUAGE$3 = 'en';
9
9
  const TRANSLATIONS$3 = {
@@ -217,6 +217,7 @@ var EChallengeProgressStatus$2;
217
217
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
218
218
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
219
219
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
220
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
220
221
  })(EChallengeProgressStatus$2 || (EChallengeProgressStatus$2 = {}));
221
222
  var EChallengeStatus$2;
222
223
  (function (EChallengeStatus) {
@@ -234,7 +235,8 @@ const ChallengeStatusDictionary$1 = [
234
235
  'expired',
235
236
  'forfeited',
236
237
  'awaiting',
237
- 'paused'
238
+ 'paused',
239
+ 'unavailable'
238
240
  ];
239
241
  var EChallengeTriggerType$1;
240
242
  (function (EChallengeTriggerType) {
@@ -412,25 +414,27 @@ const CasinoChallengeDetailsLevels = class {
412
414
  render() {
413
415
  var _a, _b;
414
416
  return (index.h(index.Host, { key: '6fb977a939b727af9277cd332ff105be64cb7f00' }, index.h("div", { key: '99dbdaadc719c8b4b6fd52586bd76ee19a9ae5c3', class: { Mobile: this.isMobile, 'levels-tab tab': true, visible: this.open }, ref: (el) => (this.scrollContainerRef = el) }, (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses) === null || _b === void 0 ? void 0 : _b.map((level, index$1) => {
415
- var _a, _b, _c, _d, _e, _f;
417
+ var _a, _b, _c, _d, _e, _f, _g, _h;
416
418
  const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
417
419
  const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$2.Forfeited ||
420
+ ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Unavailable ||
418
421
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
419
422
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
420
423
  this.isOptedOut;
421
424
  const isActiveMatch = level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress;
422
425
  return (index.h("div", { class: {
423
426
  level: true,
424
- forfeited: ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Forfeited ||
427
+ forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Forfeited ||
428
+ ((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$2.Unavailable ||
425
429
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
426
430
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
427
431
  this.isOptedOut,
428
- suspended: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Paused,
432
+ suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$2.Paused,
429
433
  active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress,
430
434
  completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.Completed
431
435
  }, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, index.h("div", { class: {
432
436
  level__title: true
433
- } }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status, level, activeChallenge, this.language, true)), level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && (index.h("div", { class: "level__progress" }, index.h("casino-challenge-level-progress-bar", { height: "8px", value: level.ProgressPercentage, active: activeChallenge }))), index.h("casino-challenge-expandable-paragraph", { "max-height": "42", active: level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && activeChallenge, style: { width: '100%' } }, index.h("div", { class: {
437
+ } }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language, true)), level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && (index.h("div", { class: "level__progress" }, index.h("casino-challenge-level-progress-bar", { height: "8px", value: level.ProgressPercentage, active: activeChallenge }))), index.h("casino-challenge-expandable-paragraph", { "max-height": "42", active: level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && activeChallenge, style: { width: '100%' } }, index.h("div", { class: {
434
438
  level__bonus: true
435
439
  } }, index.h("span", { class: "level__icon" }, index.h("img", { class: {
436
440
  grayed: isGrayed
@@ -442,7 +446,7 @@ const CasinoChallengeDetailsLevels = class {
442
446
  grayed: isGrayed
443
447
  }, src: targetSvg, alt: "target-icon", title: "target-icon" })), index.h("span", { class: {
444
448
  level__value: true
445
- } }, getTarget(level, (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.CurrencySymbol, this.language))))));
449
+ } }, getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language))))));
446
450
  }))));
447
451
  }
448
452
  };
@@ -483,7 +487,9 @@ const CasinoChallengeDetailsProgressBar = class {
483
487
  progress: true,
484
488
  Mobile: this.isMobile,
485
489
  paused: Status === EChallengeProgressStatus$2.Paused,
486
- grayed: Status === EChallengeProgressStatus$2.Forfeited || ChallengeStatus === EChallengeStatus$2.Paused
490
+ grayed: Status === EChallengeProgressStatus$2.Forfeited ||
491
+ Status === EChallengeProgressStatus$2.Unavailable ||
492
+ ChallengeStatus === EChallengeStatus$2.Paused
487
493
  } }, index.h("div", { class: {
488
494
  progress__point: true,
489
495
  start: true,
@@ -495,7 +501,7 @@ const CasinoChallengeDetailsProgressBar = class {
495
501
  } }, secondImgSrc ? index.h("img", { class: "progress__icon", src: secondImgSrc }) : currLevel.OrderNumber + 2)));
496
502
  }
497
503
  render() {
498
- return index.h(index.Host, { key: 'cd7634d793a583b4202b1f40b01473b467647d9a' }, this.challengeProgress);
504
+ return index.h(index.Host, { key: '8f3de4c26bad9f23b9873469d004ae7cff048302' }, this.challengeProgress);
499
505
  }
500
506
  };
501
507
  CasinoChallengeDetailsProgressBar.style = CasinoChallengeDetailsProgressBarStyle0;
@@ -763,6 +769,7 @@ var EChallengeProgressStatus$1;
763
769
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
764
770
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
765
771
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
772
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
766
773
  })(EChallengeProgressStatus$1 || (EChallengeProgressStatus$1 = {}));
767
774
  var EChallengeStatus$1;
768
775
  (function (EChallengeStatus) {
@@ -3436,6 +3443,7 @@ var EChallengeProgressStatus;
3436
3443
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
3437
3444
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
3438
3445
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
3446
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
3439
3447
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
3440
3448
  var EChallengeLevelTargetType;
3441
3449
  (function (EChallengeLevelTargetType) {
@@ -3451,7 +3459,8 @@ const ChallengeStatusDictionary = [
3451
3459
  'expired',
3452
3460
  'forfeited',
3453
3461
  'awaiting',
3454
- 'paused'
3462
+ 'paused',
3463
+ 'unavailable'
3455
3464
  ];
3456
3465
 
3457
3466
  const DEFAULT_LANGUAGE$1 = 'en';
@@ -3534,6 +3543,8 @@ const CasinoChallengesOverlaySlider$1 = class {
3534
3543
  return index.h("span", { class: "status" }, translate$1('unavailable', this.language));
3535
3544
  }
3536
3545
  switch (this.challenge.Status) {
3546
+ case EChallengeProgressStatus.Unavailable:
3547
+ return index.h("span", { class: "status" }, translate$1('unavailable', this.language));
3537
3548
  case EChallengeProgressStatus.Expired:
3538
3549
  return index.h("span", { class: "status" }, translate$1('expired', this.language));
3539
3550
  case EChallengeProgressStatus.Forfeited:
@@ -3585,20 +3596,21 @@ const CasinoChallengesOverlaySlider$1 = class {
3585
3596
  render() {
3586
3597
  var _a, _b, _c, _d, _e, _f, _g, _h;
3587
3598
  const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
3588
- return (index.h(index.Host, { key: '5491e59a4439d23a7cd68d0e28af1a7b5d650925' }, index.h("div", { class: {
3599
+ return (index.h(index.Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, index.h("div", { class: {
3589
3600
  challenges__slide: true,
3590
3601
  active: this.isItemActive(),
3591
3602
  grayed: [
3592
3603
  EChallengeProgressStatus.Expired,
3593
3604
  EChallengeProgressStatus.Forfeited,
3594
- EChallengeProgressStatus.Completed
3605
+ EChallengeProgressStatus.Completed,
3606
+ EChallengeProgressStatus.Unavailable
3595
3607
  ].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
3596
3608
  isChallengePaused ||
3597
3609
  this.isOptedOut
3598
- }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '8c10ad8fc780c314af68443c5c81057d3e88668b', class: "challenges__slide__image-wrapper", style: {
3610
+ }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
3599
3611
  width: `${this.slideWidth}px`,
3600
3612
  height: `${this.slideHeight}px`
3601
- } }, index.h("img", { key: '3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), index.h("h1", { key: 'e03556b748fda30202b3b80c2c84cf9dc3471168', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), index.h("div", { key: '9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
3613
+ } }, index.h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), index.h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), index.h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
3602
3614
  ? ChallengeStatusDictionary[this.challenge.Status]
3603
3615
  : 'unavailable'}` }, this.getBadgeContent()))));
3604
3616
  }
@@ -4229,6 +4241,7 @@ const actionButtonIsVisible = (challenge, isPromo, isOptedOut) => {
4229
4241
  !(isOptedOut ||
4230
4242
  (challenge === null || challenge === void 0 ? void 0 : challenge.ChallengeStatus) === EChallengeStatus$2.Paused ||
4231
4243
  (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Forfeited ||
4244
+ (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Unavailable ||
4232
4245
  (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Completed ||
4233
4246
  (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Expired)));
4234
4247
  };
@@ -4305,6 +4318,8 @@ const getBadgeContent = (challenge, language, timeLeft) => {
4305
4318
  return index.h("span", { class: "status" }, translate$3('unavailable', language));
4306
4319
  }
4307
4320
  switch (challenge === null || challenge === void 0 ? void 0 : challenge.Status) {
4321
+ case EChallengeProgressStatus$2.Unavailable:
4322
+ return index.h("span", { class: "status" }, translate$3('unavailable', language));
4308
4323
  case EChallengeProgressStatus$2.Expired:
4309
4324
  return index.h("span", { class: "status" }, translate$3('expired', language));
4310
4325
  case EChallengeProgressStatus$2.Forfeited:
@@ -4602,7 +4617,8 @@ const CasinoChallengesOverlayDrawerDetails = class {
4602
4617
  grayed: [
4603
4618
  EChallengeProgressStatus$2.Expired,
4604
4619
  EChallengeProgressStatus$2.Forfeited,
4605
- EChallengeProgressStatus$2.Completed
4620
+ EChallengeProgressStatus$2.Completed,
4621
+ EChallengeProgressStatus$2.Unavailable
4606
4622
  ].includes((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status) ||
4607
4623
  this.isChallengePaused ||
4608
4624
  this.isOptedOut
@@ -4636,9 +4652,10 @@ const CasinoChallengesOverlayDrawerDetails = class {
4636
4652
  var _a, _b, _c;
4637
4653
  return (index.h("div", { class: { 'challenge-block': true, 'challenge-levels': true } }, index.h("div", { class: "challenge-block-header" }, index.h("div", { class: "total-levels" }, index.h("h3", null, translate$3('levels', this.language)), index.h("span", null, "(", (_a = this.challenge) === null || _a === void 0 ? void 0 :
4638
4654
  _a.LevelProgresses.length, ")")), index.h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs$1.Levels }) }, index.h("p", null, translate$3('seeAll', this.language)), index.h("div", { class: "chevron-button" }, index.h("img", { src: chevronSvg })))), index.h("div", { class: 'row levels-row', ref: (el) => (this.scrollContainerRef = el) }, (_c = (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.LevelProgresses) === null || _c === void 0 ? void 0 : _c.map((level, index$1) => {
4639
- var _a, _b, _c, _d, _e, _f;
4655
+ var _a, _b, _c, _d, _e, _f, _g, _h;
4640
4656
  const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
4641
4657
  const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$2.Forfeited ||
4658
+ ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Unavailable ||
4642
4659
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
4643
4660
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
4644
4661
  this.isOptedOut;
@@ -4646,17 +4663,18 @@ const CasinoChallengesOverlayDrawerDetails = class {
4646
4663
  return (index.h("div", { class: {
4647
4664
  'challenge-level': true,
4648
4665
  level: true,
4649
- forfeited: ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Forfeited ||
4666
+ forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Forfeited ||
4667
+ ((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$2.Unavailable ||
4650
4668
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
4651
4669
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
4652
4670
  this.isOptedOut,
4653
- suspended: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Paused,
4671
+ suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$2.Paused,
4654
4672
  active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress,
4655
4673
  completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.Completed
4656
4674
  }, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, index.h("div", { class: {
4657
4675
  level__title: true,
4658
4676
  grayed: isGrayed
4659
- } }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status, level, activeChallenge, this.language)), index.h("div", { class: {
4677
+ } }, index.h("span", null, "Level ", index$1 + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language)), index.h("div", { class: {
4660
4678
  level__bonus: true
4661
4679
  } }, index.h("span", { class: "level__icon" }, index.h("img", { class: {
4662
4680
  grayed: isGrayed
@@ -4672,7 +4690,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
4672
4690
  level__value: true,
4673
4691
  description: true,
4674
4692
  ellipsed: true
4675
- } }, this.challenge && getTarget(level, (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.CurrencySymbol, this.language)))));
4693
+ } }, this.challenge && getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language)))));
4676
4694
  }))));
4677
4695
  }
4678
4696
  renderEvents() {
@@ -4737,7 +4755,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
4737
4755
  var _a, _b;
4738
4756
  const fullScreen = (this.swipping && this.progress > 0) || ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open);
4739
4757
  const footerIsVisible = !this.isMobile || (this.isMobile && fullScreen);
4740
- return (index.h("div", { key: 'b6b5dfc2777b5a4b1e1557166e1dca5aa2aa4f37', class: {
4758
+ return (index.h("div", { key: 'a973e58403665544dbe1068760e63ff2e41b0c8a', class: {
4741
4759
  Mobile: this.isMobile,
4742
4760
  swipped: (this.isMobile && this.swipping && this.progress > 0) || !this.isMobile,
4743
4761
  moved: this.progress > 0,
@@ -668,6 +668,7 @@ var EChallengeProgressStatus;
668
668
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
669
669
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
670
670
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
671
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
671
672
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
672
673
  var EChallengesTabs;
673
674
  (function (EChallengesTabs) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoChallengesOverlay = require('./casino-challenges-overlay-e699eea9.js');
5
+ const casinoChallengesOverlay = require('./casino-challenges-overlay-c00e3b15.js');
6
6
  require('./index-98384ab0.js');
7
7
 
8
8
 
@@ -40,6 +40,7 @@ export var EChallengeProgressStatus;
40
40
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
41
41
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
42
42
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
43
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
43
44
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
44
45
  export var EChallengesTabs;
45
46
  (function (EChallengesTabs) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-58f943ea.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-overlay-fc86db96.js';
3
- export { C as casino_challenges_overlay } from './casino-challenges-overlay-fc86db96.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-overlay-8a765607.js';
3
+ export { C as casino_challenges_overlay } from './casino-challenges-overlay-8a765607.js';
4
4
 
5
5
  const DEFAULT_LANGUAGE$3 = 'en';
6
6
  const TRANSLATIONS$3 = {
@@ -214,6 +214,7 @@ var EChallengeProgressStatus$2;
214
214
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
215
215
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
216
216
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
217
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
217
218
  })(EChallengeProgressStatus$2 || (EChallengeProgressStatus$2 = {}));
218
219
  var EChallengeStatus$2;
219
220
  (function (EChallengeStatus) {
@@ -231,7 +232,8 @@ const ChallengeStatusDictionary$1 = [
231
232
  'expired',
232
233
  'forfeited',
233
234
  'awaiting',
234
- 'paused'
235
+ 'paused',
236
+ 'unavailable'
235
237
  ];
236
238
  var EChallengeTriggerType$1;
237
239
  (function (EChallengeTriggerType) {
@@ -409,25 +411,27 @@ const CasinoChallengeDetailsLevels = class {
409
411
  render() {
410
412
  var _a, _b;
411
413
  return (h(Host, { key: '6fb977a939b727af9277cd332ff105be64cb7f00' }, h("div", { key: '99dbdaadc719c8b4b6fd52586bd76ee19a9ae5c3', class: { Mobile: this.isMobile, 'levels-tab tab': true, visible: this.open }, ref: (el) => (this.scrollContainerRef = el) }, (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses) === null || _b === void 0 ? void 0 : _b.map((level, index) => {
412
- var _a, _b, _c, _d, _e, _f;
414
+ var _a, _b, _c, _d, _e, _f, _g, _h;
413
415
  const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
414
416
  const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$2.Forfeited ||
417
+ ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Unavailable ||
415
418
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
416
419
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
417
420
  this.isOptedOut;
418
421
  const isActiveMatch = level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress;
419
422
  return (h("div", { class: {
420
423
  level: true,
421
- forfeited: ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Forfeited ||
424
+ forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Forfeited ||
425
+ ((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$2.Unavailable ||
422
426
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
423
427
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
424
428
  this.isOptedOut,
425
- suspended: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Paused,
429
+ suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$2.Paused,
426
430
  active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress,
427
431
  completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.Completed
428
432
  }, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, h("div", { class: {
429
433
  level__title: true
430
- } }, h("span", null, "Level ", index + 1), getLevelStatus((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status, level, activeChallenge, this.language, true)), level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && (h("div", { class: "level__progress" }, h("casino-challenge-level-progress-bar", { height: "8px", value: level.ProgressPercentage, active: activeChallenge }))), h("casino-challenge-expandable-paragraph", { "max-height": "42", active: level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && activeChallenge, style: { width: '100%' } }, h("div", { class: {
434
+ } }, h("span", null, "Level ", index + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language, true)), level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && (h("div", { class: "level__progress" }, h("casino-challenge-level-progress-bar", { height: "8px", value: level.ProgressPercentage, active: activeChallenge }))), h("casino-challenge-expandable-paragraph", { "max-height": "42", active: level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress && activeChallenge, style: { width: '100%' } }, h("div", { class: {
431
435
  level__bonus: true
432
436
  } }, h("span", { class: "level__icon" }, h("img", { class: {
433
437
  grayed: isGrayed
@@ -439,7 +443,7 @@ const CasinoChallengeDetailsLevels = class {
439
443
  grayed: isGrayed
440
444
  }, src: targetSvg, alt: "target-icon", title: "target-icon" })), h("span", { class: {
441
445
  level__value: true
442
- } }, getTarget(level, (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.CurrencySymbol, this.language))))));
446
+ } }, getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language))))));
443
447
  }))));
444
448
  }
445
449
  };
@@ -480,7 +484,9 @@ const CasinoChallengeDetailsProgressBar = class {
480
484
  progress: true,
481
485
  Mobile: this.isMobile,
482
486
  paused: Status === EChallengeProgressStatus$2.Paused,
483
- grayed: Status === EChallengeProgressStatus$2.Forfeited || ChallengeStatus === EChallengeStatus$2.Paused
487
+ grayed: Status === EChallengeProgressStatus$2.Forfeited ||
488
+ Status === EChallengeProgressStatus$2.Unavailable ||
489
+ ChallengeStatus === EChallengeStatus$2.Paused
484
490
  } }, h("div", { class: {
485
491
  progress__point: true,
486
492
  start: true,
@@ -492,7 +498,7 @@ const CasinoChallengeDetailsProgressBar = class {
492
498
  } }, secondImgSrc ? h("img", { class: "progress__icon", src: secondImgSrc }) : currLevel.OrderNumber + 2)));
493
499
  }
494
500
  render() {
495
- return h(Host, { key: 'cd7634d793a583b4202b1f40b01473b467647d9a' }, this.challengeProgress);
501
+ return h(Host, { key: '8f3de4c26bad9f23b9873469d004ae7cff048302' }, this.challengeProgress);
496
502
  }
497
503
  };
498
504
  CasinoChallengeDetailsProgressBar.style = CasinoChallengeDetailsProgressBarStyle0;
@@ -760,6 +766,7 @@ var EChallengeProgressStatus$1;
760
766
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
761
767
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
762
768
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
769
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
763
770
  })(EChallengeProgressStatus$1 || (EChallengeProgressStatus$1 = {}));
764
771
  var EChallengeStatus$1;
765
772
  (function (EChallengeStatus) {
@@ -3433,6 +3440,7 @@ var EChallengeProgressStatus;
3433
3440
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
3434
3441
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
3435
3442
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
3443
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
3436
3444
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
3437
3445
  var EChallengeLevelTargetType;
3438
3446
  (function (EChallengeLevelTargetType) {
@@ -3448,7 +3456,8 @@ const ChallengeStatusDictionary = [
3448
3456
  'expired',
3449
3457
  'forfeited',
3450
3458
  'awaiting',
3451
- 'paused'
3459
+ 'paused',
3460
+ 'unavailable'
3452
3461
  ];
3453
3462
 
3454
3463
  const DEFAULT_LANGUAGE$1 = 'en';
@@ -3531,6 +3540,8 @@ const CasinoChallengesOverlaySlider$1 = class {
3531
3540
  return h("span", { class: "status" }, translate$1('unavailable', this.language));
3532
3541
  }
3533
3542
  switch (this.challenge.Status) {
3543
+ case EChallengeProgressStatus.Unavailable:
3544
+ return h("span", { class: "status" }, translate$1('unavailable', this.language));
3534
3545
  case EChallengeProgressStatus.Expired:
3535
3546
  return h("span", { class: "status" }, translate$1('expired', this.language));
3536
3547
  case EChallengeProgressStatus.Forfeited:
@@ -3582,20 +3593,21 @@ const CasinoChallengesOverlaySlider$1 = class {
3582
3593
  render() {
3583
3594
  var _a, _b, _c, _d, _e, _f, _g, _h;
3584
3595
  const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
3585
- return (h(Host, { key: '5491e59a4439d23a7cd68d0e28af1a7b5d650925' }, h("div", { class: {
3596
+ return (h(Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, h("div", { class: {
3586
3597
  challenges__slide: true,
3587
3598
  active: this.isItemActive(),
3588
3599
  grayed: [
3589
3600
  EChallengeProgressStatus.Expired,
3590
3601
  EChallengeProgressStatus.Forfeited,
3591
- EChallengeProgressStatus.Completed
3602
+ EChallengeProgressStatus.Completed,
3603
+ EChallengeProgressStatus.Unavailable
3592
3604
  ].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
3593
3605
  isChallengePaused ||
3594
3606
  this.isOptedOut
3595
- }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '8c10ad8fc780c314af68443c5c81057d3e88668b', class: "challenges__slide__image-wrapper", style: {
3607
+ }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
3596
3608
  width: `${this.slideWidth}px`,
3597
3609
  height: `${this.slideHeight}px`
3598
- } }, h("img", { key: '3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'e03556b748fda30202b3b80c2c84cf9dc3471168', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: '9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
3610
+ } }, h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
3599
3611
  ? ChallengeStatusDictionary[this.challenge.Status]
3600
3612
  : 'unavailable'}` }, this.getBadgeContent()))));
3601
3613
  }
@@ -4226,6 +4238,7 @@ const actionButtonIsVisible = (challenge, isPromo, isOptedOut) => {
4226
4238
  !(isOptedOut ||
4227
4239
  (challenge === null || challenge === void 0 ? void 0 : challenge.ChallengeStatus) === EChallengeStatus$2.Paused ||
4228
4240
  (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Forfeited ||
4241
+ (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Unavailable ||
4229
4242
  (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Completed ||
4230
4243
  (challenge === null || challenge === void 0 ? void 0 : challenge.Status) === EChallengeProgressStatus$2.Expired)));
4231
4244
  };
@@ -4302,6 +4315,8 @@ const getBadgeContent = (challenge, language, timeLeft) => {
4302
4315
  return h("span", { class: "status" }, translate$3('unavailable', language));
4303
4316
  }
4304
4317
  switch (challenge === null || challenge === void 0 ? void 0 : challenge.Status) {
4318
+ case EChallengeProgressStatus$2.Unavailable:
4319
+ return h("span", { class: "status" }, translate$3('unavailable', language));
4305
4320
  case EChallengeProgressStatus$2.Expired:
4306
4321
  return h("span", { class: "status" }, translate$3('expired', language));
4307
4322
  case EChallengeProgressStatus$2.Forfeited:
@@ -4599,7 +4614,8 @@ const CasinoChallengesOverlayDrawerDetails = class {
4599
4614
  grayed: [
4600
4615
  EChallengeProgressStatus$2.Expired,
4601
4616
  EChallengeProgressStatus$2.Forfeited,
4602
- EChallengeProgressStatus$2.Completed
4617
+ EChallengeProgressStatus$2.Completed,
4618
+ EChallengeProgressStatus$2.Unavailable
4603
4619
  ].includes((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status) ||
4604
4620
  this.isChallengePaused ||
4605
4621
  this.isOptedOut
@@ -4633,9 +4649,10 @@ const CasinoChallengesOverlayDrawerDetails = class {
4633
4649
  var _a, _b, _c;
4634
4650
  return (h("div", { class: { 'challenge-block': true, 'challenge-levels': true } }, h("div", { class: "challenge-block-header" }, h("div", { class: "total-levels" }, h("h3", null, translate$3('levels', this.language)), h("span", null, "(", (_a = this.challenge) === null || _a === void 0 ? void 0 :
4635
4651
  _a.LevelProgresses.length, ")")), h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs$1.Levels }) }, h("p", null, translate$3('seeAll', this.language)), h("div", { class: "chevron-button" }, h("img", { src: chevronSvg })))), h("div", { class: 'row levels-row', ref: (el) => (this.scrollContainerRef = el) }, (_c = (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.LevelProgresses) === null || _c === void 0 ? void 0 : _c.map((level, index) => {
4636
- var _a, _b, _c, _d, _e, _f;
4652
+ var _a, _b, _c, _d, _e, _f, _g, _h;
4637
4653
  const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
4638
4654
  const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus$2.Forfeited ||
4655
+ ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Unavailable ||
4639
4656
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
4640
4657
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
4641
4658
  this.isOptedOut;
@@ -4643,17 +4660,18 @@ const CasinoChallengesOverlayDrawerDetails = class {
4643
4660
  return (h("div", { class: {
4644
4661
  'challenge-level': true,
4645
4662
  level: true,
4646
- forfeited: ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus$2.Forfeited ||
4663
+ forfeited: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Forfeited ||
4664
+ ((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus$2.Unavailable ||
4647
4665
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Closed ||
4648
4666
  level.ProgressStatus === EChallengeProgressLevelStatus$2.Fillup ||
4649
4667
  this.isOptedOut,
4650
- suspended: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus$2.Paused,
4668
+ suspended: ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus$2.Paused,
4651
4669
  active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.InProgress,
4652
4670
  completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus$2.Completed
4653
4671
  }, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, h("div", { class: {
4654
4672
  level__title: true,
4655
4673
  grayed: isGrayed
4656
- } }, h("span", null, "Level ", index + 1), getLevelStatus((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status, level, activeChallenge, this.language)), h("div", { class: {
4674
+ } }, h("span", null, "Level ", index + 1), getLevelStatus((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status, level, activeChallenge, this.language)), h("div", { class: {
4657
4675
  level__bonus: true
4658
4676
  } }, h("span", { class: "level__icon" }, h("img", { class: {
4659
4677
  grayed: isGrayed
@@ -4669,7 +4687,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
4669
4687
  level__value: true,
4670
4688
  description: true,
4671
4689
  ellipsed: true
4672
- } }, this.challenge && getTarget(level, (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.CurrencySymbol, this.language)))));
4690
+ } }, this.challenge && getTarget(level, (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.CurrencySymbol, this.language)))));
4673
4691
  }))));
4674
4692
  }
4675
4693
  renderEvents() {
@@ -4734,7 +4752,7 @@ const CasinoChallengesOverlayDrawerDetails = class {
4734
4752
  var _a, _b;
4735
4753
  const fullScreen = (this.swipping && this.progress > 0) || ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open);
4736
4754
  const footerIsVisible = !this.isMobile || (this.isMobile && fullScreen);
4737
- return (h("div", { key: 'b6b5dfc2777b5a4b1e1557166e1dca5aa2aa4f37', class: {
4755
+ return (h("div", { key: 'a973e58403665544dbe1068760e63ff2e41b0c8a', class: {
4738
4756
  Mobile: this.isMobile,
4739
4757
  swipped: (this.isMobile && this.swipping && this.progress > 0) || !this.isMobile,
4740
4758
  moved: this.progress > 0,
@@ -666,6 +666,7 @@ var EChallengeProgressStatus;
666
666
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
667
667
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
668
668
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
669
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
669
670
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
670
671
  var EChallengesTabs;
671
672
  (function (EChallengesTabs) {
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesOverlay } from './casino-challenges-overlay-fc86db96.js';
1
+ export { C as CasinoChallengesOverlay } from './casino-challenges-overlay-8a765607.js';
2
2
  import './index-58f943ea.js';
@@ -42,7 +42,8 @@ export declare enum EChallengeProgressStatus {
42
42
  Expired = 4,
43
43
  Forfeited = 5,
44
44
  Awaiting = 6,
45
- Paused = 7
45
+ Paused = 7,
46
+ Unavailable = 8
46
47
  }
47
48
  export declare enum EChallengesTabs {
48
49
  Promo = 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-overlay",
3
- "version": "0.22.18",
3
+ "version": "0.22.19",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",