@everymatrix/casino-challenges-list 1.77.15 → 1.77.16

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 (26) hide show
  1. package/dist/casino-challenges-list/casino-challenges-list-faf39d72.js +1 -0
  2. package/dist/casino-challenges-list/casino-challenges-list.esm.js +1 -1
  3. package/dist/casino-challenges-list/casino-challenges-list_2.entry.js +1 -0
  4. package/dist/casino-challenges-list/index-ce64c965.js +2 -0
  5. package/dist/casino-challenges-list/index.esm.js +1 -1
  6. package/dist/cjs/{casino-challenges-list-d537e984.js → casino-challenges-list-d6873cbb.js} +2 -4
  7. package/dist/cjs/casino-challenges-list.cjs.js +2 -2
  8. package/dist/cjs/casino-challenges-list_2.cjs.entry.js +184 -0
  9. package/dist/cjs/{index-6a66c51c.js → index-4ab9ba12.js} +5 -37
  10. package/dist/cjs/index.cjs.js +3 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/collection-manifest.json +0 -6
  13. package/dist/collection/components/casino-challenges-list/casino-challenges-list.js +1 -1
  14. package/dist/esm/{casino-challenges-list-7271fe8a.js → casino-challenges-list-faf39d72.js} +3 -2
  15. package/dist/esm/casino-challenges-list.js +3 -3
  16. package/dist/esm/casino-challenges-list_2.entry.js +179 -0
  17. package/dist/esm/{index-d84ca385.js → index-ce64c965.js} +5 -37
  18. package/dist/esm/index.js +3 -2
  19. package/dist/esm/loader.js +3 -3
  20. package/dist/types/components/casino-challenges-list/casino-challenges-list.d.ts +1 -1
  21. package/package.json +1 -1
  22. package/dist/casino-challenges-list/casino-challenge-card_3.entry.js +0 -1
  23. package/dist/casino-challenges-list/casino-challenges-list-7271fe8a.js +0 -1
  24. package/dist/casino-challenges-list/index-d84ca385.js +0 -2
  25. package/dist/cjs/casino-challenge-card_3.cjs.entry.js +0 -627
  26. package/dist/esm/casino-challenge-card_3.entry.js +0 -622
@@ -1,627 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-6a66c51c.js');
6
- const casinoChallengesList = require('./casino-challenges-list-d537e984.js');
7
-
8
- const DEFAULT_LANGUAGE = 'en';
9
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
10
- const TRANSLATIONS = {
11
- en: {
12
- totalLevels: 'Total levels:',
13
- level1: 'Level 1:',
14
- get: 'Get:',
15
- endsIn: 'Ends In',
16
- expired: 'Expired',
17
- viewDetails: 'View details',
18
- placeBetsOf: 'Place bets of',
19
- place: 'Place',
20
- bet: 'bet',
21
- bets: 'bets',
22
- minBet: 'min bet',
23
- forfeited: 'Forfeited',
24
- finished: 'Finished',
25
- suspended: 'Suspended',
26
- start: 'Start',
27
- resume: 'Resume',
28
- pause: 'Pause'
29
- },
30
- ro: {
31
- totalLevels: 'Niveluri totale:',
32
- level1: 'Nivel 1:',
33
- get: 'Obține:',
34
- endsIn: 'Se termină în',
35
- expired: 'Expirat',
36
- viewDetails: 'Vezi detalii',
37
- placeBetsOf: 'Plasează pariuri de',
38
- place: 'Plasare',
39
- bet: 'pariu',
40
- bets: 'pariuri',
41
- minBet: 'pariu minim',
42
- forfeited: 'Pierdut',
43
- finished: 'Terminat',
44
- suspended: 'Suspendat',
45
- start: 'Start',
46
- resume: 'Reia',
47
- pause: 'Pauză'
48
- },
49
- fr: {
50
- totalLevels: 'Niveaux totaux :',
51
- level1: 'Niveau 1 :',
52
- get: 'Obtenir :',
53
- endsIn: 'Se termine dans',
54
- expired: 'Expiré',
55
- viewDetails: 'Voir les détails',
56
- placeBetsOf: 'Placez des paris de',
57
- place: 'Placer',
58
- bet: 'pari',
59
- bets: 'paris',
60
- minBet: 'mise minimale',
61
- forfeited: 'Forfait',
62
- finished: 'Terminé',
63
- suspended: 'Suspendu',
64
- start: 'Démarrer',
65
- resume: 'Reprendre',
66
- pause: 'Pause'
67
- },
68
- ar: {
69
- totalLevels: 'إجمالي المستويات:',
70
- level1: 'المستوى 1:',
71
- get: 'احصل على:',
72
- endsIn: 'ينتهي في',
73
- expired: 'منتهي الصلاحية',
74
- viewDetails: 'عرض التفاصيل',
75
- placeBetsOf: 'قم بوضع رهانات بقيمة',
76
- place: 'ضع',
77
- bet: 'رهان',
78
- bets: 'رهانات',
79
- minBet: 'الحد الأدنى للرهان',
80
- forfeited: 'خاسر',
81
- finished: 'منتهي',
82
- suspended: 'معلق',
83
- start: 'ابدأ',
84
- resume: 'استئناف',
85
- pause: 'إيقاف مؤقت'
86
- },
87
- hr: {
88
- totalLevels: 'Ukupno razina:',
89
- level1: 'Razina 1:',
90
- get: 'Dobiti:',
91
- endsIn: 'Završava za',
92
- expired: 'Isteklo',
93
- viewDetails: 'Pogledaj detalje',
94
- placeBetsOf: 'Postavite oklade od',
95
- place: 'Postavi',
96
- bet: 'kladnja',
97
- bets: 'kladnje',
98
- minBet: 'minimalna oklada',
99
- forfeited: 'Oduzeto',
100
- finished: 'Završeno',
101
- suspended: 'Suspendirano',
102
- start: 'Počni',
103
- resume: 'Nastavi',
104
- pause: 'Pauza'
105
- }
106
- };
107
- const translate = (key, customLang) => {
108
- const lang = customLang;
109
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
110
- };
111
- const getTranslations = (data) => {
112
- Object.keys(data).forEach((item) => {
113
- for (let key in data[item]) {
114
- TRANSLATIONS[item][key] = data[item][key];
115
- }
116
- });
117
- };
118
- const resolveTranslationUrl = async (translationUrl) => {
119
- if (translationUrl) {
120
- try {
121
- const response = await fetch(translationUrl);
122
- if (!response.ok) {
123
- throw new Error(`HTTP error! status: ${response.status}`);
124
- }
125
- const translations = await response.json();
126
- getTranslations(translations);
127
- }
128
- catch (error) {
129
- console.error('Failed to fetch or parse translations from URL:', error);
130
- }
131
- }
132
- };
133
-
134
- var EChallengeLevelTargetType;
135
- (function (EChallengeLevelTargetType) {
136
- EChallengeLevelTargetType[EChallengeLevelTargetType["Accumulative"] = 0] = "Accumulative";
137
- EChallengeLevelTargetType[EChallengeLevelTargetType["SingleBet"] = 1] = "SingleBet";
138
- EChallengeLevelTargetType[EChallengeLevelTargetType["MultipleOneBetSize"] = 2] = "MultipleOneBetSize";
139
- })(EChallengeLevelTargetType || (EChallengeLevelTargetType = {}));
140
- var EChallengeRecurrenceType;
141
- (function (EChallengeRecurrenceType) {
142
- EChallengeRecurrenceType[EChallengeRecurrenceType["Single"] = 0] = "Single";
143
- EChallengeRecurrenceType[EChallengeRecurrenceType["Daily"] = 1] = "Daily";
144
- EChallengeRecurrenceType[EChallengeRecurrenceType["Weekly"] = 2] = "Weekly";
145
- EChallengeRecurrenceType[EChallengeRecurrenceType["Monthly"] = 3] = "Monthly";
146
- })(EChallengeRecurrenceType || (EChallengeRecurrenceType = {}));
147
- var EChallengeRewardType;
148
- (function (EChallengeRewardType) {
149
- EChallengeRewardType[EChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
150
- EChallengeRewardType[EChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
151
- EChallengeRewardType[EChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
152
- EChallengeRewardType[EChallengeRewardType["Challenge"] = 3] = "Challenge";
153
- EChallengeRewardType[EChallengeRewardType["Custom"] = 4] = "Custom";
154
- })(EChallengeRewardType || (EChallengeRewardType = {}));
155
- var EChallengeProgressStatus;
156
- (function (EChallengeProgressStatus) {
157
- EChallengeProgressStatus[EChallengeProgressStatus["Closed"] = 0] = "Closed";
158
- EChallengeProgressStatus[EChallengeProgressStatus["InProgress"] = 1] = "InProgress";
159
- EChallengeProgressStatus[EChallengeProgressStatus["Fillup"] = 2] = "Fillup";
160
- EChallengeProgressStatus[EChallengeProgressStatus["Completed"] = 3] = "Completed";
161
- })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
162
- var EChallengeStatus;
163
- (function (EChallengeStatus) {
164
- EChallengeStatus[EChallengeStatus["Started"] = 0] = "Started";
165
- EChallengeStatus[EChallengeStatus["InProgress"] = 1] = "InProgress";
166
- EChallengeStatus[EChallengeStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
167
- EChallengeStatus[EChallengeStatus["Completed"] = 3] = "Completed";
168
- EChallengeStatus[EChallengeStatus["Expired"] = 4] = "Expired";
169
- EChallengeStatus[EChallengeStatus["Forfeited"] = 5] = "Forfeited";
170
- EChallengeStatus[EChallengeStatus["Awaiting"] = 6] = "Awaiting";
171
- EChallengeStatus[EChallengeStatus["Paused"] = 7] = "Paused";
172
- })(EChallengeStatus || (EChallengeStatus = {}));
173
- const ChallengeStatusDictionary = [
174
- 'started',
175
- 'inProgress',
176
- 'pendingLevelReward',
177
- 'completed',
178
- 'expired',
179
- 'forfeited',
180
- 'awaiting',
181
- 'paused'
182
- ];
183
- var EChallengeTriggerType;
184
- (function (EChallengeTriggerType) {
185
- EChallengeTriggerType[EChallengeTriggerType["GameLaunch"] = 0] = "GameLaunch";
186
- EChallengeTriggerType[EChallengeTriggerType["Reward"] = 1] = "Reward";
187
- EChallengeTriggerType[EChallengeTriggerType["Manual"] = 2] = "Manual";
188
- })(EChallengeTriggerType || (EChallengeTriggerType = {}));
189
- var EChallengeValidityType;
190
- (function (EChallengeValidityType) {
191
- EChallengeValidityType[EChallengeValidityType["Period"] = 0] = "Period";
192
- EChallengeValidityType[EChallengeValidityType["Date"] = 1] = "Date";
193
- })(EChallengeValidityType || (EChallengeValidityType = {}));
194
-
195
- function getTimeLeft(endTime) {
196
- const now = new Date();
197
- const end = new Date(endTime);
198
- let diff = end.getTime() - now.getTime();
199
- if (diff <= 0) {
200
- return;
201
- }
202
- const days = Math.floor(diff / (1000 * 60 * 60 * 24));
203
- diff -= days * (1000 * 60 * 60 * 24);
204
- const hours = Math.floor(diff / (1000 * 60 * 60));
205
- diff -= hours * (1000 * 60 * 60);
206
- const minutes = Math.floor(diff / (1000 * 60));
207
- diff -= minutes * (1000 * 60);
208
- const seconds = Math.floor(diff / 1000);
209
- const pad = (n) => n.toString().padStart(2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AxODU0IDQuOTUwNzUgNi43Njg2NiA1LjEzMjMxIDYuNTgyOTQgNC45OTczN0w2LjEzOTM5IDQuNjc1MTFDNi4wNTYzMyA0LjYxNDc3IDUuOTQzODcgNC42MTQ3NyA1Ljg2MDgxIDQuNjc1MTFMNS40MTcyNiA0Ljk5NzM3QzUuMjMxNTQgNS4xMzIzMSA0Ljk4MTY1IDQuOTUwNzUgNS4wNTI1OSA0LjczMjQzTDUuMjIyMDEgNC4yMTFDNS4yNTM3NCA0LjExMzM2IDUuMjE4OTggNC4wMDY0IDUuMTM1OTMgMy45NDYwNkw0LjY5MjM4IDMuNjIzOEM0LjUwNjY2IDMuNDg4ODYgNC42MDIxIDMuMTk1MTEgNC44MzE2NyAzLjE5NTExSDUuMzc5OTNDNS40ODI1OSAzLjE5NTExIDUuNTczNTggMy4xMjkgNS42MDUzIDMuMDMxMzZMNS43NzQ3MiAyLjUwOTk0QzUuODQ1NjYgMi4yOTE2MSA2LjE1NDU0IDIuMjkxNjEgNi4yMjU0OCAyLjUwOTk0WiIgZmlsbD0iI0ZGRURDQyIvPgo8L3N2Zz4K';
216
-
217
- const casinoChallengeCardCss = ".card {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenges-container (max-width: 576px) {\n .card {\n width: 100%;\n }\n}\n.card:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.card__image {\n width: 100%;\n height: 200px;\n border-radius: 16px 16px 0 0;\n}\n@container challenges-container (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__image.grayed {\n opacity: 0.6;\n}\n.card__title {\n color: var(--emw--color-white, #FFFFFF);\n font-size: var(--emw--font-size-medium, 16px);\n margin: 0 0 10px;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n margin-top: 20px;\n width: 100%;\n height: 34px;\n background: transparent;\n text-transform: uppercase;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-secondary, #e9931e);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button.filled {\n background-color: var(--emw--button-background-primary-color, #18CE51);\n color: var(--emw--color-white, #FFFFFF);\n border-color: var(--emw--color-gray-300, #083B17);\n}\n.card__button.filled:hover {\n color: var(--emw--color-gray-300, #083B17);\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n}\n.card__button.grayed {\n color: var(--emw--color-gray-50, #E2E2E2);\n}\n.card__button.grayed:hover {\n color: var(--emw--color-white, #FFFFFF);\n border-color: var(--emw--button-primary-border, #24B24E);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button:disabled, .card__button:disabled:hover {\n color: var(--emw--color-gray-50, #E2E2E2);\n cursor: not-allowed;\n border: 2px solid var(--emw--button-border-color, #727672);\n opacity: 0.7;\n}\n.card__badge {\n position: absolute;\n background: var(--emw--color-white, #FFFFFF);\n top: 6px;\n right: 6px;\n border-radius: 30px;\n padding: 2px 12px;\n line-height: 22px;\n font-weight: var(--emw--font-weight-medium, 500);\n font-size: var(--emw--font-size-x-small, 12px);\n box-shadow: 0 4px 4px 0 var(--emw--button-box-shadow-color, rgba(0, 0, 0, 0.25));\n backdrop-filter: blur(20px);\n box-sizing: border-box;\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.card__badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292C29);\n font-weight: 700;\n}\n.card__badge.completed {\n background: var(--emw--background-success-color, #C9F0D7);\n border: 1px solid var(--emw--border-success-color, #00B74F);\n color: var(--emw--color-gray-300, #083B17);\n font-weight: 700;\n}\n.card__badge.forfeited {\n background: var(--emw--background-errored-color, #FFE1DF);\n border: 1px solid var(--emw--border-errored-color, #D6421E);\n color: var(--emw--errored-color, #850606);\n font-weight: 700;\n}\n.card__badge.paused {\n background: var(--emw--background-warning-color, #F8E4AD);\n border: 1px solid var(--emw--border-warning-color, #EA9018);\n color: var(--emw--warning-color, #6D460A);\n font-weight: 700;\n}\n\n.info-item {\n line-height: 24px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-primary, #1dbf51);\n}\n@container challenges-container (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item.grayed {\n color: var(--emw--disabled-color, #727672);\n}\n.info-item__label {\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n color: var(--emw--color-gray-150, #C8D6CE);\n}\n.info-item__tooltip {\n position: absolute;\n line-height: 22px;\n padding: 8px 12px;\n border-radius: 8px;\n opacity: 1;\n z-index: 200;\n white-space: nowrap;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-white, #FFFFFF);\n background-color: var(--emw--color-background-secondary, #1B1C2B);\n}\n.info-item__tooltip::before {\n content: \"\";\n position: absolute;\n top: -5px;\n left: 50%;\n transform: translateX(-50%);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid var(--emw--color-background-secondary, #1B1C2B);\n width: 0;\n height: 0;\n z-index: 201;\n}\n\n.progress {\n background-color: var(--emw--progress-background, rgba(188, 252, 177, 0.1019607843));\n border-radius: 100px;\n height: 20px;\n margin-bottom: 10px;\n position: relative;\n align-content: center;\n padding: 0 2px;\n box-sizing: border-box;\n}\n.progress.paused {\n opacity: 0.5;\n}\n.progress.grayed {\n mix-blend-mode: luminosity;\n}\n.progress__placeholder {\n height: 20px;\n}\n.progress__icon {\n padding-top: 4px;\n}\n.progress__point {\n position: absolute;\n text-align: center;\n font-size: 12px;\n color: var(--emw--color-gray-150, #C8D6CE);\n font-weight: 700;\n line-height: 19px;\n top: 0;\n height: 19px;\n width: 19px;\n border-radius: 50%;\n}\n.progress__point.start {\n left: 0;\n border: 2px solid var(--emw--button-background-primary-color, #18CE51);\n background: linear-gradient(90deg, var(--emw--progress-active-level, #24AA4D) 0%, var(--emw--progress-active-level-secondary, #113F21) 100%);\n}\n.progress__point.end {\n right: 0;\n border: 2px solid var(--emw--dark-green, #1C8D56);\n background: var(--emw--color-gray-300, #083B17);\n opacity: 0.7;\n}\n.progress__point.finished {\n opacity: 1;\n}\n.progress__point.hidden {\n opacity: 0;\n}\n.progress__bar {\n border-radius: 73px;\n height: 16px;\n background: linear-gradient(90deg, var(--emw--secondary-green, #1E654F) 0%, var(--emw--dark-green, #1C8D56) 100%);\n text-align: end;\n color: var(--emw--color-gray-50, #E2E2E2);\n font-size: 11px;\n font-weight: 700;\n line-height: 16px;\n padding-right: 6px;\n box-sizing: border-box;\n}\n.progress__bar.finished {\n text-align: center;\n}";
218
- const CasinoChallengeCardStyle0 = casinoChallengeCardCss;
219
-
220
- const CasinoChallengeCard = class {
221
- constructor(hostRef) {
222
- index.registerInstance(this, hostRef);
223
- this.timerExpired = index.createEvent(this, "timerExpired", 7);
224
- this.calculateTargetValue = (level, currencySymbol) => {
225
- var _a;
226
- if (!level)
227
- return '';
228
- const minbet = ((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet)
229
- ? `, ${translate('minBet', this.language)} ${currencySymbol + level.BetRange.MinBet}`
230
- : '';
231
- switch (level.LevelTargetType) {
232
- case EChallengeLevelTargetType.Accumulative:
233
- return `${translate('placeBetsOf', this.language)} ${currencySymbol + level.DisplayCurrencyTargetTurnover + minbet}`;
234
- case EChallengeLevelTargetType.SingleBet:
235
- return `${translate('place', this.language)} ${currencySymbol + level.TargetTurnover} ${translate('bet', this.language)}`;
236
- case EChallengeLevelTargetType.MultipleOneBetSize:
237
- return `${translate('place', this.language)} ${level.TargetBetCount} ${translate('bets', this.language) + minbet}`;
238
- }
239
- };
240
- this.onMouseEnterHandler = (index, el) => {
241
- if (el.scrollWidth > el.clientWidth) {
242
- this.tooltipIndex = index;
243
- }
244
- };
245
- this.onMouseLeaveHandler = () => {
246
- this.tooltipIndex = null;
247
- };
248
- this.getBadgeContent = () => {
249
- switch (this.challenge.Status) {
250
- case EChallengeStatus.Expired:
251
- return translate('expired', this.language);
252
- case EChallengeStatus.Forfeited:
253
- return translate('forfeited', this.language);
254
- case EChallengeStatus.Completed:
255
- return translate('finished', this.language);
256
- case EChallengeStatus.Paused:
257
- return translate('suspended', this.language);
258
- default:
259
- return this.timeLeft
260
- ? [translate('endsIn', this.language), ' - ', index.h("span", null, this.timeLeft)]
261
- : translate('expired', this.language);
262
- }
263
- };
264
- this.checkAttrs = () => {
265
- if (!this.endpoint) {
266
- this.error = 'Endpoint is missing! Please provide a valid endpointURL.';
267
- this.hasError = true;
268
- console.error(this.error);
269
- }
270
- return this.hasError;
271
- };
272
- this.mbSource = undefined;
273
- this.clientStyling = undefined;
274
- this.clientStylingUrl = undefined;
275
- this.translationUrl = '';
276
- this.language = 'en';
277
- this.endpoint = '';
278
- this.domain = '';
279
- this.session = '';
280
- this.challenge = undefined;
281
- this.isUserAuthorized = true;
282
- this.tooltipIndex = null;
283
- this.timeLeft = undefined;
284
- this.error = '';
285
- this.hasError = false;
286
- this.actionLoading = false;
287
- }
288
- get infoItems() {
289
- var _a, _b, _c, _d, _e;
290
- const level = this.isUserAuthorized
291
- ? (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses.find((x) => x.ProgressStatus === EChallengeProgressStatus.InProgress)
292
- : (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.LevelProgresses.find((x) => x.OrderNumber === 0);
293
- if (level) {
294
- const rewardValue = (_c = level.Rewards) === null || _c === void 0 ? void 0 : _c.slice(0, 2).map((r) => r.RewardDescription).join(' + ');
295
- return [
296
- {
297
- lable: translate('totalLevels', this.language),
298
- value: (_d = this.challenge.LevelProgresses) === null || _d === void 0 ? void 0 : _d.length
299
- },
300
- {
301
- lable: translate('level1', this.language),
302
- value: this.calculateTargetValue(level, (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.CurrencySymbol)
303
- },
304
- {
305
- lable: translate('get', this.language),
306
- value: rewardValue
307
- }
308
- ];
309
- }
310
- return [];
311
- }
312
- handleClientStylingChange(newValue, oldValue) {
313
- if (newValue != oldValue) {
314
- casinoChallengesList.setClientStyling(this.stylingContainer, this.clientStyling);
315
- }
316
- }
317
- handleClientStylingUrlChange(newValue, oldValue) {
318
- if (newValue != oldValue) {
319
- casinoChallengesList.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
320
- }
321
- }
322
- handleMbSourceChange(newValue, oldValue) {
323
- if (newValue != oldValue) {
324
- casinoChallengesList.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
325
- }
326
- }
327
- connectedCallback() {
328
- this.timerId = setInterval(() => {
329
- this.updateTime();
330
- }, 1000);
331
- }
332
- componentWillLoad() {
333
- if (this.translationUrl) {
334
- resolveTranslationUrl(this.translationUrl);
335
- }
336
- this.updateTime();
337
- }
338
- componentDidLoad() {
339
- if (this.stylingContainer) {
340
- if (this.mbSource)
341
- casinoChallengesList.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
342
- if (this.clientStyling)
343
- casinoChallengesList.setClientStyling(this.stylingContainer, this.clientStyling);
344
- if (this.clientStylingUrl)
345
- casinoChallengesList.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
346
- }
347
- }
348
- disconnectedCallback() {
349
- if (this.stylingSubscription) {
350
- this.stylingSubscription.unsubscribe();
351
- }
352
- clearInterval(this.timerId);
353
- }
354
- updateTime() {
355
- var _a;
356
- this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ExpirationTime);
357
- if (!this.timeLeft && this.timerExpired) {
358
- clearInterval(this.timerId);
359
- this.timerExpired.emit(this.challenge.Id);
360
- }
361
- }
362
- renderInfoItem(item, index$1) {
363
- return (index.h("div", { class: `info-item ${this.isChallengeGrayed}`, onMouseEnter: (e) => this.onMouseEnterHandler(index$1, e.currentTarget), onMouseLeave: this.onMouseLeaveHandler }, index.h("span", { class: "info-item__label" }, item.lable), item.value, this.tooltipIndex === index$1 && index.h("div", { class: "info-item__tooltip" }, item.value)));
364
- }
365
- get getCardBadge() {
366
- return (index.h("div", { class: `card__badge ${ChallengeStatusDictionary[this.challenge.Status]}` }, this.getBadgeContent()));
367
- }
368
- get isChallengeGrayed() {
369
- return [EChallengeStatus.Expired, EChallengeStatus.Forfeited, EChallengeStatus.Completed].includes(this.challenge.Status)
370
- ? 'grayed'
371
- : '';
372
- }
373
- get getChallengeProgress() {
374
- var _a;
375
- const currLevel = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses.find((x) => x.ProgressStatus === EChallengeProgressStatus.InProgress);
376
- if (!this.isUserAuthorized || !currLevel)
377
- return null;
378
- const { Status, LevelProgresses } = this.challenge;
379
- if (Status === EChallengeStatus.Expired || Status === EChallengeStatus.Started) {
380
- return index.h("div", { class: "progress__placeholder" });
381
- }
382
- const barValue = Status === EChallengeStatus.Paused
383
- ? translate('suspended', this.language)
384
- : Status === EChallengeStatus.Completed
385
- ? translate('finished', this.language)
386
- : `${currLevel.ProgressPercentage}%`;
387
- const isLastLevel = !LevelProgresses.some((x) => x.OrderNumber > currLevel.OrderNumber);
388
- const secondImgSrc = Status === EChallengeStatus.Completed ? trophySvg : isLastLevel ? finishSvg : '';
389
- return (index.h("div", { class: {
390
- progress: true,
391
- paused: Status === EChallengeStatus.Paused,
392
- grayed: Status === EChallengeStatus.Forfeited
393
- } }, index.h("div", { class: {
394
- progress__point: true,
395
- start: true,
396
- hidden: Status === EChallengeStatus.Completed
397
- } }, currLevel.OrderNumber + 1), index.h("div", { class: {
398
- progress__bar: true,
399
- finished: Status === EChallengeStatus.Completed
400
- }, style: { width: `${currLevel.ProgressPercentage}%` } }, barValue), index.h("div", { class: {
401
- progress__point: true,
402
- end: true,
403
- finished: Status === EChallengeStatus.Completed
404
- } }, secondImgSrc ? index.h("img", { class: "progress__icon", src: secondImgSrc }) : currLevel.OrderNumber + 2)));
405
- }
406
- get getCardButton() {
407
- if (this.isUserAuthorized) {
408
- if (this.challenge.Status === EChallengeStatus.Started) {
409
- return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(true) }, translate('start', this.language)));
410
- }
411
- if (this.challenge.Status === EChallengeStatus.Paused) {
412
- return (index.h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(true) }, translate('resume', this.language)));
413
- }
414
- if (this.challenge.Status === EChallengeStatus.InProgress ||
415
- this.challenge.Status === EChallengeStatus.PendingLevelReward) {
416
- return (index.h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(false) }, translate('pause', this.language)));
417
- }
418
- }
419
- return index.h("button", { class: "card__button" }, translate('viewDetails', this.language));
420
- }
421
- async joinUnjoinProgress(join) {
422
- var _a;
423
- const progress = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses.find((x) => x.ProgressStatus === EChallengeProgressStatus.InProgress);
424
- if (!this.checkAttrs()) {
425
- const url = `${this.endpoint}/challenge/ChangeProgressStatus`;
426
- const body = Object.assign(Object.assign({ DomainId: this.domain }, (this.session && { PlayerSessionId: this.session })), (join ? { ProgressToActivate: progress.LevelId } : { ProgressToDeactivate: progress.LevelId }));
427
- this.actionLoading = true;
428
- return fetch(url, {
429
- method: 'POST',
430
- headers: {
431
- 'Content-Type': 'application/json'
432
- },
433
- body: JSON.stringify(body)
434
- })
435
- .then((res) => res.json())
436
- .finally(() => (this.actionLoading = false));
437
- }
438
- }
439
- render() {
440
- var _a, _b, _c, _d;
441
- return (index.h("div", { key: '3405a652d64b5a9d1bc2f43ff226abfefb359158', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'a84228899e4845a36fa94b11b4e8d5b1fcbc0ae7', class: "card" }, index.h("img", { key: 'a4b6b6f8161f1184442b1e12c510254323b91e1a', class: `card__image ${this.isChallengeGrayed}`, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.Url }), this.getCardBadge, index.h("div", { key: '7d24cf5cdec35ab541989308811c12d1d665c891', class: "card__content" }, index.h("h1", { key: 'b9e045fd05580d001be012903938102dbbc64128', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.PresentationName), this.getChallengeProgress, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getCardButton))));
442
- }
443
- static get watchers() { return {
444
- "clientStyling": ["handleClientStylingChange"],
445
- "clientStylingUrl": ["handleClientStylingUrlChange"],
446
- "mbSource": ["handleMbSourceChange"]
447
- }; }
448
- };
449
- CasinoChallengeCard.style = CasinoChallengeCardStyle0;
450
-
451
- const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
452
- const UiSkeletonStyle0 = uiSkeletonCss;
453
-
454
- const UiSkeleton = class {
455
- constructor(hostRef) {
456
- index.registerInstance(this, hostRef);
457
- this.stylingValue = {
458
- width: this.handleStylingProps(this.width),
459
- height: this.handleStylingProps(this.height),
460
- borderRadius: this.handleStylingProps(this.borderRadius),
461
- marginBottom: this.handleStylingProps(this.marginBottom),
462
- marginTop: this.handleStylingProps(this.marginTop),
463
- marginLeft: this.handleStylingProps(this.marginLeft),
464
- marginRight: this.handleStylingProps(this.marginRight),
465
- size: this.handleStylingProps(this.size)
466
- };
467
- this.structure = undefined;
468
- this.width = 'unset';
469
- this.height = 'unset';
470
- this.borderRadius = 'unset';
471
- this.marginBottom = 'unset';
472
- this.marginTop = 'unset';
473
- this.marginLeft = 'unset';
474
- this.marginRight = 'unset';
475
- this.animation = true;
476
- this.rows = 0;
477
- this.size = '100%';
478
- }
479
- handleStructureChange(newValue, oldValue) {
480
- if (oldValue !== newValue) {
481
- this.handleStructure(newValue);
482
- }
483
- }
484
- handleStylingProps(value) {
485
- switch (typeof value) {
486
- case 'number':
487
- return value === 0 ? 0 : `${value}px`;
488
- case 'undefined':
489
- return 'unset';
490
- case 'string':
491
- if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
492
- value.endsWith('px') ||
493
- value.endsWith('%')) {
494
- return value;
495
- }
496
- else {
497
- return 'unset';
498
- }
499
- default:
500
- return 'unset';
501
- }
502
- }
503
- handleStructure(structure) {
504
- switch (structure) {
505
- case 'logo':
506
- return this.renderLogo();
507
- case 'image':
508
- return this.renderImage();
509
- case 'title':
510
- return this.renderTitle();
511
- case 'text':
512
- return this.renderText();
513
- case 'rectangle':
514
- return this.renderRectangle();
515
- case 'circle':
516
- return this.renderCircle();
517
- default:
518
- return null;
519
- }
520
- }
521
- renderLogo() {
522
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
523
- }
524
- renderImage() {
525
- return index.h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
526
- }
527
- renderTitle() {
528
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
529
- }
530
- renderText() {
531
- return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
532
- }
533
- renderRectangle() {
534
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
535
- }
536
- renderCircle() {
537
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
538
- }
539
- render() {
540
- let styleBlock = '';
541
- switch (this.structure) {
542
- case 'logo':
543
- styleBlock = `
544
- :host {
545
- --emw-skeleton-logo-width: ${this.stylingValue.width};
546
- --emw-skeleton-logo-height: ${this.stylingValue.height};
547
- --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
548
- --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
549
- --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
550
- --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
551
- --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
552
- }
553
- `;
554
- break;
555
- case 'image':
556
- styleBlock = `
557
- :host {
558
- --emw-skeleton-image-width: ${this.stylingValue.width};
559
- --emw-skeleton-image-height: ${this.stylingValue.height};
560
- --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
561
- --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
562
- --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
563
- --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
564
- --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
565
- }
566
- `;
567
- break;
568
- case 'title':
569
- styleBlock = `
570
- :host {
571
- --emw-skeleton-title-width: ${this.stylingValue.width};
572
- --emw-skeleton-title-height: ${this.stylingValue.height};
573
- --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
574
- --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
575
- --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
576
- --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
577
- --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
578
- }
579
- `;
580
- break;
581
- case 'text':
582
- styleBlock = `
583
- :host {
584
- --emw-skeleton-text-width: ${this.stylingValue.width};
585
- --emw-skeleton-text-height: ${this.stylingValue.height};
586
- --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
587
- --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
588
- --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
589
- --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
590
- --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
591
- }
592
- `;
593
- break;
594
- case 'rectangle':
595
- styleBlock = `
596
- :host {
597
- --emw-skeleton-rectangle-width: ${this.stylingValue.width};
598
- --emw-skeleton-rectangle-height: ${this.stylingValue.height};
599
- --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
600
- --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
601
- --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
602
- --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
603
- --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
604
- }
605
- `;
606
- break;
607
- case 'circle':
608
- styleBlock = `
609
- :host {
610
- --emw-skeleton-circle-size: ${this.stylingValue.size};
611
- }
612
- `;
613
- break;
614
- default:
615
- styleBlock = '';
616
- }
617
- return (index.h(index.Host, { key: 'e6b885bfd985ce7663d990756fe9101e25eb97f0' }, index.h("style", { key: '06ae24c7bb74f4dacfc12ae58085333f9dc89da5' }, styleBlock), this.handleStructure(this.structure)));
618
- }
619
- static get watchers() { return {
620
- "structure": ["handleStructureChange"]
621
- }; }
622
- };
623
- UiSkeleton.style = UiSkeletonStyle0;
624
-
625
- exports.casino_challenges_list = casinoChallengesList.CasinoChallengeList;
626
- exports.casino_challenge_card = CasinoChallengeCard;
627
- exports.ui_skeleton = UiSkeleton;