@everymatrix/casino-engagement-suite-challenges-list 1.44.0 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.esm.js +1 -1
  2. package/dist/casino-engagement-suite-challenges-list/p-7fd72b22.js +2 -0
  3. package/dist/casino-engagement-suite-challenges-list/p-dd67e263.entry.js +1 -0
  4. package/dist/casino-engagement-suite-challenges-list/p-e1255160.js +1 -0
  5. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  6. package/dist/cjs/casino-engagement-suite-challenges-list.cjs.js +17 -11
  7. package/dist/cjs/casino-engagement-suite-challenges-list_2.cjs.entry.js +444 -466
  8. package/dist/cjs/index-97488095.js +1316 -0
  9. package/dist/cjs/loader.cjs.js +7 -13
  10. package/dist/collection/collection-manifest.json +3 -3
  11. package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.css +112 -111
  12. package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.js +480 -524
  13. package/dist/collection/components/casino-engagement-suite-challenges-list/index.js +1 -0
  14. package/dist/collection/models/challenge.js +18 -18
  15. package/dist/collection/renders/ChallengesHistory.js +31 -47
  16. package/dist/collection/utils/locale.utils.js +26 -26
  17. package/dist/collection/utils/utils.js +3 -0
  18. package/dist/esm/app-globals-0f993ce5.js +3 -0
  19. package/dist/esm/casino-engagement-suite-challenges-list.js +14 -11
  20. package/dist/esm/casino-engagement-suite-challenges-list_2.entry.js +444 -466
  21. package/dist/esm/index-00eb432b.js +1288 -0
  22. package/dist/esm/loader.js +7 -13
  23. package/dist/stencil.config.dev.js +17 -0
  24. package/dist/stencil.config.js +14 -19
  25. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-list/.stencil/packages/stencil/casino-engagement-suite-challenges-list/stencil.config.d.ts +2 -0
  26. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-list/.stencil/packages/stencil/casino-engagement-suite-challenges-list/stencil.config.dev.d.ts +2 -0
  27. package/dist/types/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.d.ts +81 -81
  28. package/dist/types/components/casino-engagement-suite-challenges-list/index.d.ts +1 -0
  29. package/dist/types/components.d.ts +19 -2
  30. package/dist/types/models/challenge.d.ts +65 -65
  31. package/dist/types/stencil-public-runtime.d.ts +142 -33
  32. package/dist/types/utils/utils.d.ts +1 -0
  33. package/loader/cdn.js +1 -3
  34. package/loader/index.cjs.js +1 -3
  35. package/loader/index.d.ts +13 -1
  36. package/loader/index.es2017.js +1 -3
  37. package/loader/index.js +1 -3
  38. package/loader/package.json +1 -0
  39. package/package.json +12 -2
  40. package/dist/casino-engagement-suite-challenges-list/p-2061b71e.entry.js +0 -1
  41. package/dist/casino-engagement-suite-challenges-list/p-fad4589e.js +0 -1
  42. package/dist/cjs/index-0a011384.js +0 -1336
  43. package/dist/components/casino-engagement-suite-challenges-list.d.ts +0 -11
  44. package/dist/components/casino-engagement-suite-challenges-list.js +0 -2650
  45. package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
  46. package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
  47. package/dist/components/index.d.ts +0 -26
  48. package/dist/components/index.js +0 -1
  49. package/dist/esm/index-ddf7e990.js +0 -1309
  50. package/dist/esm/polyfills/core-js.js +0 -11
  51. package/dist/esm/polyfills/css-shim.js +0 -1
  52. package/dist/esm/polyfills/dom.js +0 -79
  53. package/dist/esm/polyfills/es5-html-element.js +0 -1
  54. package/dist/esm/polyfills/index.js +0 -34
  55. package/dist/esm/polyfills/system.js +0 -6
  56. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-challenges-list/.stencil/packages/casino-engagement-suite-challenges-list/stencil.config.d.ts +0 -2
@@ -2,70 +2,70 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0a011384.js');
5
+ const index = require('./index-97488095.js');
6
6
 
7
7
  var ChallengeRewardType;
8
8
  (function (ChallengeRewardType) {
9
- ChallengeRewardType[ChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
10
- ChallengeRewardType[ChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
11
- ChallengeRewardType[ChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
12
- ChallengeRewardType[ChallengeRewardType["Challenge"] = 3] = "Challenge";
13
- ChallengeRewardType[ChallengeRewardType["Custom"] = 4] = "Custom";
9
+ ChallengeRewardType[ChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
10
+ ChallengeRewardType[ChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
11
+ ChallengeRewardType[ChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
12
+ ChallengeRewardType[ChallengeRewardType["Challenge"] = 3] = "Challenge";
13
+ ChallengeRewardType[ChallengeRewardType["Custom"] = 4] = "Custom";
14
14
  })(ChallengeRewardType || (ChallengeRewardType = {}));
15
15
  var ChallengeHistoryLevelStatus;
16
16
  (function (ChallengeHistoryLevelStatus) {
17
- ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Completed"] = 0] = "Completed";
18
- ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Expired"] = 1] = "Expired";
19
- ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Forfeited"] = 2] = "Forfeited";
17
+ ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Completed"] = 0] = "Completed";
18
+ ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Expired"] = 1] = "Expired";
19
+ ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Forfeited"] = 2] = "Forfeited";
20
20
  })(ChallengeHistoryLevelStatus || (ChallengeHistoryLevelStatus = {}));
21
21
  var ChallengeLevelProgressStatus;
22
22
  (function (ChallengeLevelProgressStatus) {
23
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
24
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
25
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
26
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
23
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
24
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
25
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
26
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
27
27
  })(ChallengeLevelProgressStatus || (ChallengeLevelProgressStatus = {}));
28
28
  var ChallengeProgressStatus;
29
29
  (function (ChallengeProgressStatus) {
30
- ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
31
- ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
32
- ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
33
- ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
34
- ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
35
- ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
30
+ ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
31
+ ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
32
+ ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
33
+ ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
34
+ ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
35
+ ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
36
36
  })(ChallengeProgressStatus || (ChallengeProgressStatus = {}));
37
37
 
38
38
  const DEFAULT_LANGUAGE = 'en';
39
39
  const SUPPORTED_LANGUAGES = ['en'];
40
40
  const TRANSLATIONS = {
41
- en: {
42
- missions: 'Missions',
43
- join: 'Join',
44
- unjoin: 'Unjoin',
45
- new: 'new',
46
- noMissions: 'No Missions yet',
47
- tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
48
- tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
49
- history: 'History',
50
- level: 'Level',
51
- status: 'Status',
52
- time: 'Time',
53
- loading: 'Loading...',
54
- completed: 'Completed',
55
- expired: 'Expired',
56
- forfeited: 'Forfeited',
57
- noHistory: 'No missions’ history available (last 30 days)',
58
- freeSpins: 'Free Spins',
59
- luckyWheel: 'Lucky Wheel',
60
- leaderboard: 'Leaderboard',
61
- mission: 'Mission',
62
- missionHasBeenForfeited: 'The mission has been canceled.',
63
- support: 'Please, contact support.'
64
- }
41
+ en: {
42
+ missions: 'Missions',
43
+ join: 'Join',
44
+ unjoin: 'Unjoin',
45
+ new: 'new',
46
+ noMissions: 'No Missions yet',
47
+ tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
48
+ tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
49
+ history: 'History',
50
+ level: 'Level',
51
+ status: 'Status',
52
+ time: 'Time',
53
+ loading: 'Loading...',
54
+ completed: 'Completed',
55
+ expired: 'Expired',
56
+ forfeited: 'Forfeited',
57
+ noHistory: 'No missions’ history available (last 30 days)',
58
+ freeSpins: 'Free Spins',
59
+ luckyWheel: 'Lucky Wheel',
60
+ leaderboard: 'Leaderboard',
61
+ mission: 'Mission',
62
+ missionHasBeenForfeited: 'The mission has been canceled.',
63
+ support: 'Please, contact support.'
64
+ }
65
65
  };
66
66
  const translate = (key, customLang) => {
67
- const lang = customLang;
68
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
67
+ const lang = customLang;
68
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
69
69
  };
70
70
 
71
71
  function _typeof(o) {
@@ -453,7 +453,7 @@ function addLeadingZeros(number, targetLength) {
453
453
  *
454
454
  * Letters marked by * are not implemented but reserved by Unicode standard.
455
455
  */
456
- var formatters$1 = {
456
+ var formatters$2 = {
457
457
  // Year
458
458
  y: function y(date, token) {
459
459
  // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
@@ -519,6 +519,7 @@ var formatters$1 = {
519
519
  return addLeadingZeros(fractionalSeconds, token.length);
520
520
  }
521
521
  };
522
+ const formatters$3 = formatters$2;
522
523
 
523
524
  var dayPeriodEnum = {
524
525
  am: 'am',
@@ -612,7 +613,7 @@ var formatters = {
612
613
  unit: 'year'
613
614
  });
614
615
  }
615
- return formatters$1.y(date, token);
616
+ return formatters$3.y(date, token);
616
617
  },
617
618
  // Local week-numbering year
618
619
  Y: function Y(date, token, localize, options) {
@@ -734,7 +735,7 @@ var formatters = {
734
735
  switch (token) {
735
736
  case 'M':
736
737
  case 'MM':
737
- return formatters$1.M(date, token);
738
+ return formatters$3.M(date, token);
738
739
  // 1st, 2nd, ..., 12th
739
740
  case 'Mo':
740
741
  return localize.ordinalNumber(month + 1, {
@@ -824,7 +825,7 @@ var formatters = {
824
825
  unit: 'date'
825
826
  });
826
827
  }
827
- return formatters$1.d(date, token);
828
+ return formatters$3.d(date, token);
828
829
  },
829
830
  // Day of year
830
831
  D: function D(date, token, localize) {
@@ -1104,7 +1105,7 @@ var formatters = {
1104
1105
  unit: 'hour'
1105
1106
  });
1106
1107
  }
1107
- return formatters$1.h(date, token);
1108
+ return formatters$3.h(date, token);
1108
1109
  },
1109
1110
  // Hour [0-23]
1110
1111
  H: function H(date, token, localize) {
@@ -1113,7 +1114,7 @@ var formatters = {
1113
1114
  unit: 'hour'
1114
1115
  });
1115
1116
  }
1116
- return formatters$1.H(date, token);
1117
+ return formatters$3.H(date, token);
1117
1118
  },
1118
1119
  // Hour [0-11]
1119
1120
  K: function K(date, token, localize) {
@@ -1143,7 +1144,7 @@ var formatters = {
1143
1144
  unit: 'minute'
1144
1145
  });
1145
1146
  }
1146
- return formatters$1.m(date, token);
1147
+ return formatters$3.m(date, token);
1147
1148
  },
1148
1149
  // Second
1149
1150
  s: function s(date, token, localize) {
@@ -1152,11 +1153,11 @@ var formatters = {
1152
1153
  unit: 'second'
1153
1154
  });
1154
1155
  }
1155
- return formatters$1.s(date, token);
1156
+ return formatters$3.s(date, token);
1156
1157
  },
1157
1158
  // Fraction of second
1158
1159
  S: function S(date, token) {
1159
- return formatters$1.S(date, token);
1160
+ return formatters$3.S(date, token);
1160
1161
  },
1161
1162
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1162
1163
  X: function X(date, token, _localize, options) {
@@ -1284,6 +1285,7 @@ function formatTimezone(offset, dirtyDelimiter) {
1284
1285
  var minutes = addLeadingZeros(absOffset % 60, 2);
1285
1286
  return sign + hours + delimiter + minutes;
1286
1287
  }
1288
+ const formatters$1 = formatters;
1287
1289
 
1288
1290
  var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
1289
1291
  switch (pattern) {
@@ -1364,6 +1366,7 @@ var longFormatters = {
1364
1366
  p: timeLongFormatter,
1365
1367
  P: dateTimeLongFormatter
1366
1368
  };
1369
+ const longFormatters$1 = longFormatters;
1367
1370
 
1368
1371
  var protectedDayOfYearTokens = ['D', 'DD'];
1369
1372
  var protectedWeekYearTokens = ['YY', 'YYYY'];
@@ -1467,6 +1470,7 @@ var formatDistance = function formatDistance(token, count, options) {
1467
1470
  }
1468
1471
  return result;
1469
1472
  };
1473
+ const formatDistance$1 = formatDistance;
1470
1474
 
1471
1475
  function buildFormatLongFn(args) {
1472
1476
  return function () {
@@ -1510,6 +1514,7 @@ var formatLong = {
1510
1514
  defaultWidth: 'full'
1511
1515
  })
1512
1516
  };
1517
+ const formatLong$1 = formatLong;
1513
1518
 
1514
1519
  var formatRelativeLocale = {
1515
1520
  lastWeek: "'last' eeee 'at' p",
@@ -1522,6 +1527,7 @@ var formatRelativeLocale = {
1522
1527
  var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
1523
1528
  return formatRelativeLocale[token];
1524
1529
  };
1530
+ const formatRelative$1 = formatRelative;
1525
1531
 
1526
1532
  function buildLocalizeFn(args) {
1527
1533
  return function (dirtyIndex, options) {
@@ -1683,6 +1689,7 @@ var localize = {
1683
1689
  defaultFormattingWidth: 'wide'
1684
1690
  })
1685
1691
  };
1692
+ const localize$1 = localize;
1686
1693
 
1687
1694
  function buildMatchFn(args) {
1688
1695
  return function (string) {
@@ -1840,6 +1847,7 @@ var match = {
1840
1847
  defaultParseWidth: 'any'
1841
1848
  })
1842
1849
  };
1850
+ const match$1 = match;
1843
1851
 
1844
1852
  /**
1845
1853
  * @type {Locale}
@@ -1852,16 +1860,17 @@ var match = {
1852
1860
  */
1853
1861
  var locale = {
1854
1862
  code: 'en-US',
1855
- formatDistance: formatDistance,
1856
- formatLong: formatLong,
1857
- formatRelative: formatRelative,
1858
- localize: localize,
1859
- match: match,
1863
+ formatDistance: formatDistance$1,
1864
+ formatLong: formatLong$1,
1865
+ formatRelative: formatRelative$1,
1866
+ localize: localize$1,
1867
+ match: match$1,
1860
1868
  options: {
1861
1869
  weekStartsOn: 0 /* Sunday */,
1862
1870
  firstWeekContainsDate: 1
1863
1871
  }
1864
1872
  };
1873
+ const defaultLocale = locale;
1865
1874
 
1866
1875
  // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
1867
1876
  // (one of the certain letters followed by `o`)
@@ -2179,7 +2188,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
2179
2188
  requiredArgs(2, arguments);
2180
2189
  var formatStr = String(dirtyFormatStr);
2181
2190
  var defaultOptions = getDefaultOptions();
2182
- var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
2191
+ var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
2183
2192
  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
2184
2193
 
2185
2194
  // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
@@ -2192,10 +2201,10 @@ function format(dirtyDate, dirtyFormatStr, options) {
2192
2201
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
2193
2202
  throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
2194
2203
  }
2195
- if (!locale$1.localize) {
2204
+ if (!locale.localize) {
2196
2205
  throw new RangeError('locale must contain localize property');
2197
2206
  }
2198
- if (!locale$1.formatLong) {
2207
+ if (!locale.formatLong) {
2199
2208
  throw new RangeError('locale must contain formatLong property');
2200
2209
  }
2201
2210
  var originalDate = toDate(dirtyDate);
@@ -2211,14 +2220,14 @@ function format(dirtyDate, dirtyFormatStr, options) {
2211
2220
  var formatterOptions = {
2212
2221
  firstWeekContainsDate: firstWeekContainsDate,
2213
2222
  weekStartsOn: weekStartsOn,
2214
- locale: locale$1,
2223
+ locale: locale,
2215
2224
  _originalDate: originalDate
2216
2225
  };
2217
2226
  var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
2218
2227
  var firstCharacter = substring[0];
2219
2228
  if (firstCharacter === 'p' || firstCharacter === 'P') {
2220
- var longFormatter = longFormatters[firstCharacter];
2221
- return longFormatter(substring, locale$1.formatLong);
2229
+ var longFormatter = longFormatters$1[firstCharacter];
2230
+ return longFormatter(substring, locale.formatLong);
2222
2231
  }
2223
2232
  return substring;
2224
2233
  }).join('').match(formattingTokensRegExp).map(function (substring) {
@@ -2230,7 +2239,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
2230
2239
  if (firstCharacter === "'") {
2231
2240
  return cleanEscapedString(substring);
2232
2241
  }
2233
- var formatter = formatters[firstCharacter];
2242
+ var formatter = formatters$1[firstCharacter];
2234
2243
  if (formatter) {
2235
2244
  if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
2236
2245
  throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
@@ -2238,7 +2247,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
2238
2247
  if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
2239
2248
  throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2240
2249
  }
2241
- return formatter(utcDate, substring, locale$1.localize, formatterOptions);
2250
+ return formatter(utcDate, substring, locale.localize, formatterOptions);
2242
2251
  }
2243
2252
  if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
2244
2253
  throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
@@ -2256,441 +2265,410 @@ function cleanEscapedString(input) {
2256
2265
  }
2257
2266
 
2258
2267
  const getHistoryLoaderTemplate = (lang) => {
2259
- return index.h("div", { class: "HistoryLoader" },
2260
- index.h("casino-engagement-suite-progress-bar", { indeterminate: true }),
2261
- index.h("span", null, translate('loading', lang)));
2268
+ return index.h("div", { class: "HistoryLoader" },
2269
+ index.h("casino-engagement-suite-progress-bar", { indeterminate: true }),
2270
+ index.h("span", null, translate('loading', lang)));
2262
2271
  };
2263
2272
  const getRewardNameByType = (type, lang) => {
2264
- switch (type) {
2265
- case 0: return translate('freeSpins', lang);
2266
- case 1: return translate('luckyWheel', lang);
2267
- case 2: return translate('leaderboard', lang);
2268
- case 3: return translate('mission', lang);
2269
- }
2273
+ switch (type) {
2274
+ case 0: return translate('freeSpins', lang);
2275
+ case 1: return translate('luckyWheel', lang);
2276
+ case 2: return translate('leaderboard', lang);
2277
+ case 3: return translate('mission', lang);
2278
+ }
2270
2279
  };
2271
2280
  const getLevelStatusString = (status, lang) => {
2272
- switch (status) {
2273
- case ChallengeHistoryLevelStatus.Completed: return translate('completed', lang);
2274
- case ChallengeHistoryLevelStatus.Expired: return translate('expired', lang);
2275
- case ChallengeHistoryLevelStatus.Forfeited: return translate('forfeited', lang);
2276
- default: return status;
2277
- }
2281
+ switch (status) {
2282
+ case ChallengeHistoryLevelStatus.Completed: return translate('completed', lang);
2283
+ case ChallengeHistoryLevelStatus.Expired: return translate('expired', lang);
2284
+ case ChallengeHistoryLevelStatus.Forfeited: return translate('forfeited', lang);
2285
+ default: return status;
2286
+ }
2278
2287
  };
2279
2288
  const showRewards = (level) => {
2280
- return !!level.Rewards && level.Status === ChallengeHistoryLevelStatus.Completed;
2289
+ return !!level.Rewards && level.Status === ChallengeHistoryLevelStatus.Completed;
2281
2290
  };
2282
2291
  const getRewardTemplate = (reward, lang) => {
2283
- const isCustom = reward.Type === ChallengeRewardType.Custom;
2284
- const rewardName = isCustom ? reward.RewardDescription : getRewardNameByType(reward.Type, lang);
2285
- const isRewarded = isCustom || reward.IsRewarded;
2286
- return index.h("div", { class: `HistoryRewardsItem ${isRewarded || isCustom ? 'IsRewarded' : 'IsNotRewarded'}` },
2287
- index.h("span", { class: "HistoryRewardsItemName" }, rewardName),
2288
- !isCustom && index.h("div", { class: "HistoryRewardStatusIcon" }));
2292
+ const isCustom = reward.Type === ChallengeRewardType.Custom;
2293
+ const rewardName = isCustom ? reward.RewardDescription : getRewardNameByType(reward.Type, lang);
2294
+ const isRewarded = isCustom || reward.IsRewarded;
2295
+ return index.h("div", { class: `HistoryRewardsItem ${isRewarded || isCustom ? 'IsRewarded' : 'IsNotRewarded'}` },
2296
+ index.h("span", { class: "HistoryRewardsItemName" }, rewardName),
2297
+ !isCustom && index.h("div", { class: `EngagementSuiteIconButton ${isRewarded ? 'Check' : 'Close'}` }));
2289
2298
  };
2290
2299
  const getHistoryLevelRewardsTemplate = (level, lang) => {
2291
- return index.h("div", { class: "HistoryRewardsList" },
2292
- index.h("img", { class: "HistoryRewardsIcon", src: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg", alt: "Reward" }),
2293
- Object.values(level.Rewards).map(reward => getRewardTemplate(reward, lang)));
2300
+ return index.h("div", { class: "HistoryRewardsList" },
2301
+ index.h("div", { class: "EngagementSuiteIconButton CupRewardList" }),
2302
+ Object.values(level.Rewards).map(reward => getRewardTemplate(reward, lang)));
2294
2303
  };
2295
2304
  const getHistoryLevelTemplate = (level, index$1, lang) => {
2296
- return index.h("div", { class: "HistoryLevelInfo" },
2297
- index.h("span", { class: "Level" }, `${translate('level', lang)} ${index$1 + 1}`),
2298
- index.h("span", { class: "Status" }, getLevelStatusString(level.Status, lang)),
2299
- index.h("span", { class: "Time" }, format(new Date(level.Time), 'LLL d, yyyy HH:mm:ss')));
2305
+ return index.h("div", { class: "HistoryLevelInfo" },
2306
+ index.h("span", { class: "Level" }, `${translate('level', lang)} ${index$1 + 1}`),
2307
+ index.h("span", { class: "Status" }, getLevelStatusString(level.Status, lang)),
2308
+ index.h("span", { class: "Time" }, format(new Date(level.Time), 'LLL d, yyyy HH:mm:ss')));
2300
2309
  };
2301
2310
  const getChallengesHistoryTemplate = (histories, openedHistoryIds, toggleChallengeHistory, lang) => {
2302
- if (histories.length === 0) {
2303
- return index.h("p", { class: "HistoryEmptyMessage" }, translate('noHistory', lang));
2304
- }
2305
- return index.h("div", { class: "HistoryList" }, histories.map((history) => {
2306
- return index.h("div", { key: history.ProgressId, class: `HistoryListItem ${openedHistoryIds.includes(history.ProgressId) ? 'Opened' : 'Closed'}` },
2307
- index.h("header", { class: "HistoryListItemHeader", "data-id": history.ProgressId, onClick: toggleChallengeHistory },
2308
- history.Name,
2309
- index.h("button", { class: "HistoryListItemButton" })),
2310
- index.h("div", { class: "HistoryListItemBody" },
2311
- index.h("div", null, history.Levels.map((level, index$1) => {
2312
- return index.h("div", { class: "HistoryListItemLevelCard" },
2313
- getHistoryLevelTemplate(level, index$1, lang),
2314
- showRewards(level) && getHistoryLevelRewardsTemplate(level, lang));
2315
- }))));
2316
- }));
2311
+ if (histories.length === 0) {
2312
+ return index.h("p", { class: "HistoryEmptyMessage" }, translate('noHistory', lang));
2313
+ }
2314
+ return index.h("div", { class: "HistoryList" }, histories.map((history) => {
2315
+ return index.h("div", { key: history.ProgressId, class: `HistoryListItem ${openedHistoryIds.includes(history.ProgressId) ? 'Opened' : 'Closed'}` },
2316
+ index.h("header", { class: "HistoryListItemHeader", "data-id": history.ProgressId, onClick: toggleChallengeHistory },
2317
+ history.Name,
2318
+ index.h("button", { class: "EngagementSuiteIconButton ArrowDown" })),
2319
+ index.h("div", { class: "HistoryListItemBody" },
2320
+ index.h("div", null, history.Levels.map((level, index$1) => {
2321
+ return index.h("div", { class: "HistoryListItemLevelCard" },
2322
+ getHistoryLevelTemplate(level, index$1, lang),
2323
+ showRewards(level) && getHistoryLevelRewardsTemplate(level, lang));
2324
+ }))));
2325
+ }));
2317
2326
  };
2318
2327
 
2319
- const casinoEngagementSuiteChallengesListCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesIconButton{width:16px;height:16px;cursor:pointer}.ChallengesIconButton img{width:100%;height:100%}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.ChallengeJoinButton.Joined::before,.ChallengeCard.InProgress::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-primary, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:20px;line-height:24px;font-family:\"Montserrat\", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:10px;line-height:10px;font-weight:700;font-family:\"Montserrat\", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengesTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.ChallengesTooltipBackdrop .ChallengesTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.ChallengesTooltipBackdrop .ChallengesTooltip .ChallengesIconButton{top:12px;right:6px;position:absolute}.Tabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.TabsWrapper{padding:0 20px;margin:8px 0}.TabsWrapper .Tabs{display:flex;position:relative}.TabsWrapper .Tabs .Tab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.TabsWrapper .Tabs .Tab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-x-small, 14px);color:var(--emw--color-gray-100, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-100, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-primary, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemButton{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .HistoryListItemButton{transition:transform 0.3s ease-out;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-100, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardStatusIcon,.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem .HistoryRewardStatusIcon{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-background, #666178)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded .HistoryRewardStatusIcon{background-image:url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:16px;line-height:16px}.ChallengesListPopup.Tablet .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--size-large, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:22px}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .ChallengeJoinButton,.ChallengesListPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:14px;line-height:14px}.ChallengesListPopup.Tablet .ChallengesTooltipBackdrop,.ChallengesListPopup.Desktop .ChallengesTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .ChallengesTooltip,.ChallengesListPopup.Desktop .ChallengesTooltip{padding:60px 65px;font-size:16px;line-height:20px}.ChallengesListPopup.Tablet .ChallengesTooltip .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesTooltip .ChallengesIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .TabsWrapper,.ChallengesListPopup.Desktop .TabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .TabsWrapper .Tabs .Tab,.ChallengesListPopup.Desktop .TabsWrapper .Tabs .Tab{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemButton,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemButton{width:24px;height:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-small, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsIcon{height:24px;flex-basis:24px}";
2328
+ const casinoEngagementSuiteChallengesListCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.CupRewardList{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg) no-repeat}.EngagementSuiteIconButton.Check{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesListPopupHeader .EngagementSuiteIconButton{cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.ChallengeCard.InProgress::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-gray-150, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.EngagementSuiteTabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.EngagementSuiteTabsWrapper{padding:0 20px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-150, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-gray-300, #666178)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Tablet .ChallengesListPopupHeader .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .ChallengesListPopupHeader .EngagementSuiteIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--font-size-large-plus, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteButton,.ChallengesListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengesListPopup.Tablet .EngagementSuiteTooltipBackdrop,.ChallengesListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .EngagementSuiteTooltip,.ChallengesListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList{height:24px;flex-basis:24px}";
2329
+ const CasinoEngagementSuiteChallengesListStyle0 = casinoEngagementSuiteChallengesListCss;
2320
2330
 
2321
2331
  const CasinoEngagementSuiteChallengesList = class {
2322
- constructor(hostRef) {
2323
- index.registerInstance(this, hostRef);
2324
- this.close = index.createEvent(this, "close", 7);
2325
- this.resetNewChallengeLabel = index.createEvent(this, "resetNewChallengeLabel", 7);
2326
- /**
2327
- * Client custom styling via string
2328
- */
2329
- this.clientStyling = '';
2330
- /**
2331
- * Client custom styling via url
2332
- */
2333
- this.clientStylingUrl = '';
2334
- /**
2335
- * Language of the widget
2336
- */
2337
- this.language = 'en';
2338
- /**
2339
- * User's device type
2340
- */
2341
- this.device = 'Mobile';
2342
- /**
2343
- * List of challenges
2344
- */
2345
- this.challenges = [];
2346
- /**
2347
- *Paused Challenge Ids
2348
- */
2349
- this.pausedChallengeIds = [];
2350
- this.tooltip = false;
2351
- this.timers = {};
2352
- this.limitStylingAppends = false;
2353
- this.activeTab = 1;
2354
- this.historyLoading = false;
2355
- this.openedHistoryIds = [];
2356
- this.setClientStyling = () => {
2357
- let sheet = document.createElement('style');
2358
- sheet.innerHTML = this.clientStyling;
2359
- this.host.prepend(sheet);
2360
- };
2361
- this.setClientStylingURL = () => {
2362
- let url = new URL(this.clientStylingUrl);
2363
- let cssFile = document.createElement('style');
2364
- fetch(url.href)
2365
- .then((res) => res.text())
2366
- .then((data) => {
2367
- cssFile.innerHTML = data;
2368
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
2369
- })
2370
- .catch((err) => {
2371
- console.log('Error ', err);
2372
- });
2373
- };
2374
- this.handleTabChange = (e) => {
2375
- this.activeTab = +(e.target.getAttribute('data-index'));
2376
- if (this.activeTab === 2) {
2377
- this.sendHistoryRequest();
2378
- }
2379
- };
2380
- this.toggleChallengeHistory = (ev) => {
2381
- const id = ev.currentTarget.getAttribute('data-id');
2382
- const index = this.openedHistoryIds.findIndex(historyId => historyId === id);
2383
- if (index > -1) {
2384
- this.openedHistoryIds.splice(index, 1);
2385
- }
2386
- else {
2387
- this.openedHistoryIds.push(id);
2388
- }
2389
- this.openedHistoryIds = [...this.openedHistoryIds];
2390
- };
2391
- this.handleCloseClick = () => {
2392
- this.close.emit();
2393
- this.tooltip = false;
2394
- this.resetNewChallengeLabel.emit('list');
2395
- };
2396
- this.handleChallengeClick = (ev) => {
2397
- const id = ev.currentTarget.getAttribute('data-id');
2398
- window.postMessage({ type: 'ChallengeClick', id });
2399
- };
2400
- this.showTooltip = () => {
2401
- this.tooltip = true;
2402
- };
2403
- this.hideTooltip = () => {
2404
- this.tooltip = false;
2405
- };
2406
- this.changeChallengeStatus = (e) => {
2407
- var _a, _b;
2408
- e.stopPropagation();
2409
- const id = e.currentTarget.getAttribute('data-id');
2410
- if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
2411
- window.postMessage({
2412
- type: 'ShowConfirmationModal',
2413
- ProgressToDeactivate: id,
2414
- });
2415
- return;
2416
- }
2417
- if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
2332
+ constructor(hostRef) {
2333
+ index.registerInstance(this, hostRef);
2334
+ this.close = index.createEvent(this, "close", 7);
2335
+ this.resetNewChallengeLabel = index.createEvent(this, "resetNewChallengeLabel", 7);
2336
+ this.setClientStyling = () => {
2337
+ let sheet = document.createElement('style');
2338
+ sheet.innerHTML = this.clientStyling;
2339
+ this.host.prepend(sheet);
2340
+ };
2341
+ this.setClientStylingURL = () => {
2342
+ let url = new URL(this.clientStylingUrl);
2343
+ let cssFile = document.createElement('style');
2344
+ fetch(url.href)
2345
+ .then((res) => res.text())
2346
+ .then((data) => {
2347
+ cssFile.innerHTML = data;
2348
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
2349
+ })
2350
+ .catch((err) => {
2351
+ console.log('Error ', err);
2352
+ });
2353
+ };
2354
+ this.handleTabChange = (e) => {
2355
+ this.activeTab = +(e.target.getAttribute('data-index'));
2356
+ if (this.activeTab === 2) {
2357
+ this.sendHistoryRequest();
2358
+ }
2359
+ };
2360
+ this.toggleChallengeHistory = (ev) => {
2361
+ const id = ev.currentTarget.getAttribute('data-id');
2362
+ const index = this.openedHistoryIds.findIndex(historyId => historyId === id);
2363
+ if (index > -1) {
2364
+ this.openedHistoryIds.splice(index, 1);
2365
+ }
2366
+ else {
2367
+ this.openedHistoryIds.push(id);
2368
+ }
2369
+ this.openedHistoryIds = [...this.openedHistoryIds];
2370
+ };
2371
+ this.handleCloseClick = () => {
2372
+ this.close.emit();
2373
+ this.tooltip = false;
2374
+ this.resetNewChallengeLabel.emit('list');
2375
+ };
2376
+ this.handleChallengeClick = (ev) => {
2377
+ const id = ev.currentTarget.getAttribute('data-id');
2378
+ window.postMessage({ type: 'ChallengeClick', id });
2379
+ };
2380
+ this.showTooltip = () => {
2381
+ this.tooltip = true;
2382
+ };
2383
+ this.hideTooltip = () => {
2384
+ this.tooltip = false;
2385
+ };
2386
+ this.changeChallengeStatus = (e) => {
2387
+ var _a, _b;
2388
+ e.stopPropagation();
2389
+ const id = e.currentTarget.getAttribute('data-id');
2390
+ if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
2391
+ window.postMessage({
2392
+ type: 'ShowConfirmationModal',
2393
+ ProgressToDeactivate: id,
2394
+ });
2395
+ return;
2396
+ }
2397
+ if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
2398
+ window.postMessage({
2399
+ type: 'ShowConfirmationModal',
2400
+ ProgressToActivate: id,
2401
+ ProgressToDeactivate: this.inProgressChallenges[0],
2402
+ });
2403
+ return;
2404
+ }
2405
+ window.postMessage({
2406
+ type: 'ChallengeJoinRequest',
2407
+ data: {
2408
+ ProgressToActivate: id,
2409
+ },
2410
+ });
2411
+ };
2412
+ this.clientStyling = '';
2413
+ this.clientStylingUrl = '';
2414
+ this.language = 'en';
2415
+ this.device = 'Mobile';
2416
+ this.challenges = [];
2417
+ this.isJoiningToChallenge = undefined;
2418
+ this.inProgressChallenges = undefined;
2419
+ this.pausedChallengeIds = [];
2420
+ this.tooltip = false;
2421
+ this.timers = {};
2422
+ this.limitStylingAppends = false;
2423
+ this.activeTab = 1;
2424
+ this.historyLoading = false;
2425
+ this.challengesHistory = undefined;
2426
+ this.openedHistoryIds = [];
2427
+ }
2428
+ handleEvent(e) {
2429
+ const { type } = e === null || e === void 0 ? void 0 : e.data;
2430
+ if (type === 'ChallengesHistoryResponse') {
2431
+ this.openedHistoryIds = [];
2432
+ this.challengesHistory = e.data.data || [];
2433
+ this.historyLoading = false;
2434
+ }
2435
+ if (type === 'BarChallengesClick') {
2436
+ this.activeTab = 1;
2437
+ this.openedHistoryIds = [];
2438
+ }
2439
+ }
2440
+ challengesPropHandler(value) {
2441
+ if (!this.interval && value.length) {
2442
+ this.updateTimers();
2443
+ this.startCountdown();
2444
+ }
2445
+ if (this.interval && !value.length) {
2446
+ clearInterval(this.interval);
2447
+ }
2448
+ }
2449
+ componentWillLoad() {
2450
+ this.challengesPropHandler(this.challenges);
2451
+ }
2452
+ componentDidRender() {
2453
+ if (!this.limitStylingAppends && this.host) {
2454
+ if (this.clientStyling)
2455
+ this.setClientStyling();
2456
+ if (this.clientStylingUrl)
2457
+ this.setClientStylingURL();
2458
+ this.limitStylingAppends = true;
2459
+ }
2460
+ }
2461
+ disconnectedCallback() {
2462
+ this.interval && clearInterval(this.interval);
2463
+ }
2464
+ sendHistoryRequest() {
2465
+ this.historyLoading = true;
2418
2466
  window.postMessage({
2419
- type: 'ShowConfirmationModal',
2420
- ProgressToActivate: id,
2421
- ProgressToDeactivate: this.inProgressChallenges[0],
2467
+ type: 'ChallengesHistoryRequest'
2422
2468
  });
2423
- return;
2424
- }
2425
- window.postMessage({
2426
- type: 'ChallengeJoinRequest',
2427
- data: {
2428
- ProgressToActivate: id,
2429
- },
2430
- });
2431
- };
2432
- }
2433
- handleEvent(e) {
2434
- const { type } = e === null || e === void 0 ? void 0 : e.data;
2435
- if (type === 'ChallengesHistoryResponse') {
2436
- this.openedHistoryIds = [];
2437
- this.challengesHistory = e.data.data || [];
2438
- this.historyLoading = false;
2439
- }
2440
- if (type === 'BarChallengesClick') {
2441
- this.activeTab = 1;
2442
- this.openedHistoryIds = [];
2443
2469
  }
2444
- }
2445
- challengesPropHandler(value) {
2446
- if (!this.interval && value.length) {
2447
- this.updateTimers();
2448
- this.startCountdown();
2470
+ startCountdown() {
2471
+ this.interval = setInterval(() => {
2472
+ this.updateTimers();
2473
+ }, 1000);
2449
2474
  }
2450
- if (this.interval && !value.length) {
2451
- clearInterval(this.interval);
2475
+ updateTimers() {
2476
+ const now = new Date().getTime();
2477
+ this.timers = this.challenges.filter(challenge => challenge.Status !== ChallengeProgressStatus.Expired).reduce((acc, challenge) => {
2478
+ const expirationDate = new Date(challenge.ExpirationTime).getTime();
2479
+ const diff = expirationDate - now;
2480
+ let countdown = '00h:00m:00s';
2481
+ if (diff < 1) {
2482
+ this.removeChallenge(challenge.Id);
2483
+ }
2484
+ else {
2485
+ const { days, hours, minutes, seconds } = {
2486
+ days: String(Math.floor(diff / (1000 * 60 * 60 * 24))).padStart(2, '0'),
2487
+ hours: String(Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
2488
+ minutes: String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
2489
+ seconds: String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, '0')
2490
+ };
2491
+ countdown = days === '00'
2492
+ ? `${hours}h:${minutes}m:${seconds}s`
2493
+ : `${days}d:${hours}h:${minutes}m`;
2494
+ }
2495
+ return Object.assign(Object.assign({}, acc), { [challenge.Id]: countdown });
2496
+ }, {});
2452
2497
  }
2453
- }
2454
- componentWillLoad() {
2455
- this.challengesPropHandler(this.challenges);
2456
- }
2457
- componentDidRender() {
2458
- if (!this.limitStylingAppends && this.host) {
2459
- if (this.clientStyling)
2460
- this.setClientStyling();
2461
- if (this.clientStylingUrl)
2462
- this.setClientStylingURL();
2463
- this.limitStylingAppends = true;
2498
+ removeChallenge(id) {
2499
+ const index = this.challenges.findIndex(challenge => challenge.Id === id);
2500
+ if (index > -1) {
2501
+ this.challenges.splice(index, 1);
2502
+ window.postMessage({ type: 'ChallengeHasExpired', id });
2503
+ }
2464
2504
  }
2465
- }
2466
- disconnectedCallback() {
2467
- this.interval && clearInterval(this.interval);
2468
- }
2469
- sendHistoryRequest() {
2470
- this.historyLoading = true;
2471
- window.postMessage({
2472
- type: 'ChallengesHistoryRequest'
2473
- });
2474
- }
2475
- startCountdown() {
2476
- this.interval = setInterval(() => {
2477
- this.updateTimers();
2478
- }, 1000);
2479
- }
2480
- updateTimers() {
2481
- const now = new Date().getTime();
2482
- this.timers = this.challenges.filter(challenge => challenge.Status !== ChallengeProgressStatus.Expired).reduce((acc, challenge) => {
2483
- const expirationDate = new Date(challenge.ExpirationTime).getTime();
2484
- const diff = expirationDate - now;
2485
- let countdown = '00h:00m:00s';
2486
- if (diff < 1) {
2487
- this.removeChallenge(challenge.Id);
2488
- }
2489
- else {
2490
- const { days, hours, minutes, seconds } = {
2491
- days: String(Math.floor(diff / (1000 * 60 * 60 * 24))).padStart(2, '0'),
2492
- hours: String(Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
2493
- minutes: String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
2494
- seconds: String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, '0')
2505
+ getChallengeClasses(challenge) {
2506
+ return {
2507
+ ChallengeCard: true,
2508
+ InProgress: challenge.Status === ChallengeProgressStatus.InProgress
2509
+ && !this.pausedChallengeIds.includes(challenge.ChallengeId),
2510
+ Completed: this.isChallengeCompleted(challenge),
2511
+ Paused: this.isChallengePaused(challenge)
2495
2512
  };
2496
- countdown = days === '00'
2497
- ? `${hours}h:${minutes}m:${seconds}s`
2498
- : `${days}d:${hours}h:${minutes}m`;
2499
- }
2500
- return Object.assign(Object.assign({}, acc), { [challenge.Id]: countdown });
2501
- }, {});
2502
- }
2503
- removeChallenge(id) {
2504
- const index = this.challenges.findIndex(challenge => challenge.Id === id);
2505
- if (index > -1) {
2506
- this.challenges.splice(index, 1);
2507
- window.postMessage({ type: 'ChallengeHasExpired', id });
2508
2513
  }
2509
- }
2510
- getChallengeClasses(challenge) {
2511
- return {
2512
- ChallengeCard: true,
2513
- InProgress: challenge.Status === ChallengeProgressStatus.InProgress
2514
- && !this.pausedChallengeIds.includes(challenge.ChallengeId),
2515
- Completed: this.isChallengeCompleted(challenge),
2516
- Paused: this.isChallengePaused(challenge)
2517
- };
2518
- }
2519
- isChallengePaused(challenge) {
2520
- return (challenge.Status === ChallengeProgressStatus.Started
2521
- && challenge.LevelProgresses[0].ProgressPercentage > 0)
2522
- || this.pausedChallengeIds.includes(challenge.ChallengeId);
2523
- }
2524
- isChallengeCompleted(challenge) {
2525
- return challenge.Status === ChallengeProgressStatus.Completed
2526
- || (challenge.Status === ChallengeProgressStatus.PendingLevelReward
2527
- && challenge.LevelProgresses.every(progress => progress.ProgressPercentage === 100));
2528
- }
2529
- getChallengeProgress(challenge) {
2530
- if (challenge.Status === ChallengeProgressStatus.Completed) {
2531
- return 100;
2532
- }
2533
- if (this.isChallengePaused(challenge)
2534
- || challenge.Status === ChallengeProgressStatus.PendingLevelReward
2535
- || challenge.Status === ChallengeProgressStatus.InProgress) {
2536
- const activeLevel = challenge.LevelProgresses
2537
- .find(level => level.ProgressStatus === ChallengeLevelProgressStatus.InProgress);
2538
- const completedLevel = challenge.LevelProgresses
2539
- .filter(level => level.ProgressStatus === ChallengeLevelProgressStatus.Fillup ||
2540
- level.ProgressStatus === ChallengeLevelProgressStatus.Completed).slice(-1)[0];
2541
- /**
2542
- * It is possible that Paused/InProgress challenge
2543
- * doesn't have InProgress, Fillup or Completed level
2544
- * because level becomes InProgress after user's bet.
2545
- * In this case should be displayed progress of the next level (0%)
2546
- */
2547
- return activeLevel ? activeLevel.ProgressPercentage
2548
- : (completedLevel ? completedLevel.ProgressPercentage : 0);
2549
- }
2550
- return -1;
2551
- }
2552
- getChallengeHeaderTemplate(challenge) {
2553
- const { Id } = challenge;
2554
- const inProgressChallenge = challenge.Status === ChallengeProgressStatus.InProgress
2555
- || challenge.Status === ChallengeProgressStatus.PendingLevelReward;
2556
- return index.h("div", { class: "ChallengeCardHeader" }, index.h("div", { class: "ChallengeName" }, challenge.ChallengePresentation.PresentationName), challenge.Status !== ChallengeProgressStatus.Completed ? (index.h("button", { class: `${inProgressChallenge ?
2557
- 'ChallengeJoinButton Joined' : 'ChallengeJoinButton'} ${this.isJoiningToChallenge ||
2558
- this.pausedChallengeIds.includes(challenge.ChallengeId) ?
2559
- 'Disabled' : ''}`, onClick: this.changeChallengeStatus, "data-id": Id }, inProgressChallenge
2560
- ? translate('unjoin', this.language)
2561
- : translate('join', this.language))) : null);
2562
- }
2563
- getChallengeTemplate(challenge) {
2564
- const isForfeitedChallenge = challenge.Status === ChallengeProgressStatus.Forfeited;
2565
- const challengeProgress = this.getChallengeProgress(challenge);
2566
- const countdown = this.timers[challenge.Id];
2567
- const progressTemplate = challengeProgress > -1
2568
- ? index.h("casino-engagement-suite-progress-bar", { class: this.device, value: challengeProgress, disabled: this.isChallengePaused(challenge) }, index.h("span", { slot: "Title", class: "ChallengeCountdown" }, countdown))
2569
- : index.h("span", { class: "ChallengeCountdown" }, countdown);
2570
- return isForfeitedChallenge ? (this.getForfeitedChallengeTemplate(challenge)) : (index.h("div", { class: this.getChallengeClasses(challenge), onClick: this.handleChallengeClick, key: challenge.Id, "data-id": challenge.Id }, this.getChallengeHeaderTemplate(challenge), progressTemplate, index.h("div", { class: `ChallengeLabel ${challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, index.h("span", null, translate('new', this.language)))));
2571
- }
2572
- getForfeitedChallengeTemplate(challenge) {
2573
- return index.h("div", { class: "ChallengeCard ForfeitedChallengeCard" }, index.h("div", { class: "ForfeitedChallengeName" }, challenge.ChallengePresentation.PresentationName), index.h("div", { class: "ForfeitedChallengeInfo" }, index.h("div", null, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg", alt: "Forfeited" })), index.h("div", { class: "ForfeitedChallengeMessage" }, index.h("div", null, translate('missionHasBeenForfeited', this.language)), index.h("div", null, translate('support', this.language)))));
2574
- }
2575
- getHeaderTemplate() {
2576
- return index.h("header", { class: "ChallengesListPopupHeader" }, index.h("button", { onClick: this.showTooltip, class: "ChallengesIconButton" }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })), index.h("div", { class: "ChallengesListPopupHeaderName" }, translate('missions', this.language)), index.h("button", { class: "ChallengesIconButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close missions list" })));
2577
- }
2578
- getListTabTemplate() {
2579
- if (this.challenges.length) {
2580
- return index.h("div", { class: "ChallengesListWrapper" }, index.h("div", { class: "ChallengesList" }, [...this.challenges]
2581
- .sort(challenge => challenge.Status === ChallengeProgressStatus.InProgress ? -1 : 0)
2582
- .map(challenge => this.getChallengeTemplate(challenge))));
2514
+ isChallengePaused(challenge) {
2515
+ return (challenge.Status === ChallengeProgressStatus.Started
2516
+ && challenge.LevelProgresses[0].ProgressPercentage > 0)
2517
+ || this.pausedChallengeIds.includes(challenge.ChallengeId);
2583
2518
  }
2584
- else {
2585
- return index.h("div", { class: "ChallengesListEmpty" }, index.h("h2", null, translate('noMissions', this.language)), index.h("p", null, translate('tryOtherGames', this.language)));
2519
+ isChallengeCompleted(challenge) {
2520
+ return challenge.Status === ChallengeProgressStatus.Completed
2521
+ || (challenge.Status === ChallengeProgressStatus.PendingLevelReward
2522
+ && challenge.LevelProgresses.every(progress => progress.ProgressPercentage === 100));
2586
2523
  }
2587
- }
2588
- getTooltipTemplate() {
2589
- return index.h("div", { class: "ChallengesTooltipBackdrop" }, index.h("div", { class: "ChallengesTooltip" }, index.h("button", { class: "ChallengesIconButton", onClick: this.hideTooltip }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('tooltip', this.language)));
2590
- }
2591
- getHistoryTabTemplate() {
2592
- return index.h("div", { class: "HistoryWrapper" }, index.h("div", { class: "HistoryCols" }, index.h("div", { class: "HistoryColName Level" }, translate('level', this.language)), index.h("div", { class: "HistoryColName Status" }, translate('status', this.language)), index.h("div", { class: "HistoryColName Time" }, translate('time', this.language))), this.historyLoading
2593
- ? getHistoryLoaderTemplate(this.language)
2594
- : getChallengesHistoryTemplate(this.challengesHistory, this.openedHistoryIds, this.toggleChallengeHistory, this.language));
2595
- }
2596
- getTabsTemplate() {
2597
- return index.h("div", { class: "TabsWrapper" }, index.h("div", { class: "Tabs" }, index.h("div", { "data-index": "1", onClick: this.handleTabChange, class: `Tab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('missions', this.language)), index.h("div", { "data-index": "2", onClick: this.handleTabChange, class: `Tab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('history', this.language))));
2598
- }
2599
- getTabsContentTemplate() {
2600
- return this.activeTab === 1
2601
- ? this.getListTabTemplate()
2602
- : this.getHistoryTabTemplate();
2603
- }
2604
- render() {
2605
- return index.h("div", { class: `ChallengesListPopup ${this.device}` }, this.getHeaderTemplate(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate());
2606
- }
2607
- get host() { return index.getElement(this); }
2608
- static get watchers() { return {
2609
- "challenges": ["challengesPropHandler"]
2610
- }; }
2524
+ getChallengeProgress(challenge) {
2525
+ if (challenge.Status === ChallengeProgressStatus.Completed) {
2526
+ return 100;
2527
+ }
2528
+ if (this.isChallengePaused(challenge)
2529
+ || challenge.Status === ChallengeProgressStatus.PendingLevelReward
2530
+ || challenge.Status === ChallengeProgressStatus.InProgress) {
2531
+ const activeLevel = challenge.LevelProgresses
2532
+ .find(level => level.ProgressStatus === ChallengeLevelProgressStatus.InProgress);
2533
+ const completedLevel = challenge.LevelProgresses
2534
+ .filter(level => level.ProgressStatus === ChallengeLevelProgressStatus.Fillup ||
2535
+ level.ProgressStatus === ChallengeLevelProgressStatus.Completed).slice(-1)[0];
2536
+ /**
2537
+ * It is possible that Paused/InProgress challenge
2538
+ * doesn't have InProgress, Fillup or Completed level
2539
+ * because level becomes InProgress after user's bet.
2540
+ * In this case should be displayed progress of the next level (0%)
2541
+ */
2542
+ return activeLevel ? activeLevel.ProgressPercentage
2543
+ : (completedLevel ? completedLevel.ProgressPercentage : 0);
2544
+ }
2545
+ return -1;
2546
+ }
2547
+ getChallengeHeaderTemplate(challenge) {
2548
+ const { Id } = challenge;
2549
+ const inProgressChallenge = challenge.Status === ChallengeProgressStatus.InProgress
2550
+ || challenge.Status === ChallengeProgressStatus.PendingLevelReward;
2551
+ return index.h("div", { class: "ChallengeCardHeader" }, index.h("div", { class: "ChallengeName" }, challenge.ChallengePresentation.PresentationName), challenge.Status !== ChallengeProgressStatus.Completed ? (index.h("button", { class: `${inProgressChallenge ?
2552
+ 'EngagementSuiteButton Active' : 'EngagementSuiteButton'} ${this.isJoiningToChallenge ||
2553
+ this.pausedChallengeIds.includes(challenge.ChallengeId) ?
2554
+ 'Disabled' : ''}`, onClick: this.changeChallengeStatus, "data-id": Id }, inProgressChallenge
2555
+ ? translate('unjoin', this.language)
2556
+ : translate('join', this.language))) : null);
2557
+ }
2558
+ getChallengeTemplate(challenge) {
2559
+ const isForfeitedChallenge = challenge.Status === ChallengeProgressStatus.Forfeited;
2560
+ const challengeProgress = this.getChallengeProgress(challenge);
2561
+ const countdown = this.timers[challenge.Id];
2562
+ const progressTemplate = challengeProgress > -1
2563
+ ? index.h("casino-engagement-suite-progress-bar", { clientStylingUrl: this.clientStylingUrl, class: this.device, value: challengeProgress, disabled: this.isChallengePaused(challenge) }, index.h("span", { slot: "Title", class: "ChallengeCountdown" }, countdown))
2564
+ : index.h("span", { class: "ChallengeCountdown" }, countdown);
2565
+ return isForfeitedChallenge ? (this.getForfeitedChallengeTemplate(challenge)) : (index.h("div", { class: this.getChallengeClasses(challenge), onClick: this.handleChallengeClick, key: challenge.Id, "data-id": challenge.Id }, this.getChallengeHeaderTemplate(challenge), progressTemplate, index.h("div", { class: `ChallengeLabel ${challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, index.h("span", null, translate('new', this.language)))));
2566
+ }
2567
+ getForfeitedChallengeTemplate(challenge) {
2568
+ return index.h("div", { class: "ChallengeCard ForfeitedChallengeCard" }, index.h("div", { class: "ForfeitedChallengeName" }, challenge.ChallengePresentation.PresentationName), index.h("div", { class: "ForfeitedChallengeInfo" }, index.h("div", null, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg", alt: "Forfeited" })), index.h("div", { class: "ForfeitedChallengeMessage" }, index.h("div", null, translate('missionHasBeenForfeited', this.language)), index.h("div", null, translate('support', this.language)))));
2569
+ }
2570
+ getHeaderTemplate() {
2571
+ return index.h("header", { class: "ChallengesListPopupHeader" }, index.h("button", { onClick: this.showTooltip, class: "EngagementSuiteIconButton Help" }), index.h("div", { class: "ChallengesListPopupHeaderName" }, translate('missions', this.language)), index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick }));
2572
+ }
2573
+ getListTabTemplate() {
2574
+ if (this.challenges.length) {
2575
+ return index.h("div", { class: "ChallengesListWrapper" }, index.h("div", { class: "ChallengesList" }, [...this.challenges]
2576
+ .sort(challenge => challenge.Status === ChallengeProgressStatus.InProgress ? -1 : 0)
2577
+ .map(challenge => this.getChallengeTemplate(challenge))));
2578
+ }
2579
+ else {
2580
+ return index.h("div", { class: "ChallengesListEmpty" }, index.h("h2", null, translate('noMissions', this.language)), index.h("p", null, translate('tryOtherGames', this.language)));
2581
+ }
2582
+ }
2583
+ getTooltipTemplate() {
2584
+ return index.h("div", { class: "EngagementSuiteTooltipBackdrop" }, index.h("div", { class: "EngagementSuiteTooltip" }, index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.hideTooltip }), translate('tooltip', this.language)));
2585
+ }
2586
+ getHistoryTabTemplate() {
2587
+ return index.h("div", { class: "HistoryWrapper" }, index.h("div", { class: "HistoryCols" }, index.h("div", { class: "HistoryColName Level" }, translate('level', this.language)), index.h("div", { class: "HistoryColName Status" }, translate('status', this.language)), index.h("div", { class: "HistoryColName Time" }, translate('time', this.language))), this.historyLoading
2588
+ ? getHistoryLoaderTemplate(this.language)
2589
+ : getChallengesHistoryTemplate(this.challengesHistory, this.openedHistoryIds, this.toggleChallengeHistory, this.language));
2590
+ }
2591
+ getTabsTemplate() {
2592
+ return index.h("div", { class: "EngagementSuiteTabsWrapper" }, index.h("div", { class: "EngagementSuiteTabs" }, index.h("div", { "data-index": "1", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('missions', this.language)), index.h("div", { "data-index": "2", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('history', this.language))));
2593
+ }
2594
+ getTabsContentTemplate() {
2595
+ return this.activeTab === 1
2596
+ ? this.getListTabTemplate()
2597
+ : this.getHistoryTabTemplate();
2598
+ }
2599
+ render() {
2600
+ return index.h("div", { key: '50b676f6394d813aa946ed1fd85e9612ba04a7a1', class: `ChallengesListPopup ${this.device}` }, this.getHeaderTemplate(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate());
2601
+ }
2602
+ get host() { return index.getElement(this); }
2603
+ static get watchers() { return {
2604
+ "challenges": ["challengesPropHandler"]
2605
+ }; }
2611
2606
  };
2612
- CasinoEngagementSuiteChallengesList.style = casinoEngagementSuiteChallengesListCss;
2607
+ CasinoEngagementSuiteChallengesList.style = CasinoEngagementSuiteChallengesListStyle0;
2613
2608
 
2614
- const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
2609
+ const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
2610
+ const CasinoEngagementSuiteProgressBarStyle0 = casinoEngagementSuiteProgressBarCss;
2615
2611
 
2616
2612
  const CasinoEngagementSuiteProgressBar = class {
2617
- constructor(hostRef) {
2618
- index.registerInstance(this, hostRef);
2619
- /**
2620
- * Value for the widget
2621
- */
2622
- this.value = 0;
2623
- /**
2624
- * Shows disabled styles
2625
- */
2626
- this.disabled = false;
2627
- /**
2628
- * Hide percent value
2629
- */
2630
- this.hidePercent = false;
2631
- /**
2632
- * Constantly animates
2633
- */
2634
- this.indeterminate = false;
2635
- /**
2636
- * Client custom styling via string
2637
- */
2638
- this.clientStyling = '';
2639
- /**
2640
- * Client custom styling via url
2641
- */
2642
- this.clientStylingUrl = '';
2643
- this.limitStylingAppends = false;
2644
- this.setClientStyling = () => {
2645
- let sheet = document.createElement('style');
2646
- sheet.innerHTML = this.clientStyling;
2647
- this.host.prepend(sheet);
2648
- };
2649
- this.setClientStylingURL = () => {
2650
- let url = new URL(this.clientStylingUrl);
2651
- let cssFile = document.createElement('style');
2652
- fetch(url.href)
2653
- .then((res) => res.text())
2654
- .then((data) => {
2655
- cssFile.innerHTML = data;
2656
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
2657
- })
2658
- .catch((err) => {
2659
- console.log('Error ', err);
2660
- });
2661
- };
2662
- }
2663
- componentDidRender() {
2664
- if (!this.limitStylingAppends && this.host) {
2665
- if (this.clientStyling)
2666
- this.setClientStyling();
2667
- if (this.clientStylingUrl)
2668
- this.setClientStylingURL();
2669
- this.limitStylingAppends = true;
2613
+ constructor(hostRef) {
2614
+ index.registerInstance(this, hostRef);
2615
+ this.setClientStyling = () => {
2616
+ let sheet = document.createElement('style');
2617
+ sheet.innerHTML = this.clientStyling;
2618
+ this.host.prepend(sheet);
2619
+ };
2620
+ this.setClientStylingURL = () => {
2621
+ let url = new URL(this.clientStylingUrl);
2622
+ let cssFile = document.createElement('style');
2623
+ fetch(url.href)
2624
+ .then((res) => res.text())
2625
+ .then((data) => {
2626
+ cssFile.innerHTML = data;
2627
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
2628
+ })
2629
+ .catch((err) => {
2630
+ console.log('Error ', err);
2631
+ });
2632
+ };
2633
+ this.value = 0;
2634
+ this.disabled = false;
2635
+ this.hidePercent = false;
2636
+ this.indeterminate = false;
2637
+ this.clientStyling = '';
2638
+ this.clientStylingUrl = '';
2639
+ this.limitStylingAppends = false;
2670
2640
  }
2671
- }
2672
- getProgressBarClasses() {
2673
- return {
2674
- ProgressBar: true,
2675
- Completed: this.value === 100,
2676
- Disabled: this.disabled,
2677
- HidePercent: this.hidePercent || this.indeterminate
2678
- };
2679
- }
2680
- getProgressBarLineTemplate() {
2681
- if (this.indeterminate) {
2682
- return index.h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
2641
+ componentDidRender() {
2642
+ if (!this.limitStylingAppends && this.host) {
2643
+ if (this.clientStyling)
2644
+ this.setClientStyling();
2645
+ if (this.clientStylingUrl)
2646
+ this.setClientStylingURL();
2647
+ this.limitStylingAppends = true;
2648
+ }
2683
2649
  }
2684
- else {
2685
- return index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
2650
+ getProgressBarClasses() {
2651
+ return {
2652
+ ProgressBar: true,
2653
+ Completed: this.value === 100,
2654
+ Disabled: this.disabled,
2655
+ HidePercent: this.hidePercent || this.indeterminate
2656
+ };
2686
2657
  }
2687
- }
2688
- render() {
2689
- return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
2690
- }
2691
- get host() { return index.getElement(this); }
2658
+ getProgressBarLineTemplate() {
2659
+ if (this.indeterminate) {
2660
+ return index.h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
2661
+ }
2662
+ else {
2663
+ return index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
2664
+ }
2665
+ }
2666
+ render() {
2667
+ return index.h("div", { key: 'ecce3a26a92d2e090c1db84bdc1bdbeb505080ed', class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { key: '649fe1103d222200f2a1ad3b5967e37da1f1ab3d', class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { key: '49dc180eedd823f0027f75099813fb9d91bcd938', name: "Title" }, index.h("div", { key: 'e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5' })), index.h("slot", { key: '3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e', name: "Percent" }, index.h("div", { key: '6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad', class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { key: '141106e77caad7b04bb199f911e87c0c6f0adc2d', class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
2668
+ }
2669
+ get host() { return index.getElement(this); }
2692
2670
  };
2693
- CasinoEngagementSuiteProgressBar.style = casinoEngagementSuiteProgressBarCss;
2671
+ CasinoEngagementSuiteProgressBar.style = CasinoEngagementSuiteProgressBarStyle0;
2694
2672
 
2695
2673
  exports.casino_engagement_suite_challenges_list = CasinoEngagementSuiteChallengesList;
2696
2674
  exports.casino_engagement_suite_progress_bar = CasinoEngagementSuiteProgressBar;