@everymatrix/casino-bonuses-controller 1.22.5

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.
@@ -0,0 +1,1154 @@
1
+ <svelte:options tag={null} />
2
+ <script lang="ts">
3
+ import {onMount} from 'svelte';
4
+ import moment from 'moment';
5
+ import './CasinoBonusProgress.svelte';
6
+ import {BonusControllerTranslations} from '../translation';
7
+ import { _, addNewMessages, setLocale } from '../i18n';
8
+ import { getCurrencySymbol } from '../base';
9
+ export let rawbonus: string = '';
10
+ export let lang: string ='en';
11
+ export let status: string = '';
12
+ export let clientstyling: string = '';
13
+ export let clientstylingurl: string = '';
14
+ export let cmsendpoint: string = '';
15
+ export let translationurl: srting = '';
16
+
17
+ let bonus: any;
18
+ let levels = [];
19
+ let levelCount: number;
20
+ let showDataSection: boolean = true;
21
+ let showActionSection: boolean = false;
22
+ let showAdditionalSection: boolean = false;
23
+ let showAdditionalSectionContent: boolean = false;
24
+ let showTermsSectionContent: boolean = false;
25
+ let isButtonClickable: boolean = true;
26
+ let showTerms: boolean = false;
27
+ let claimBonusError: boolean = false;
28
+ let bonusDescription: object = {};
29
+ let currencySymbol: string;
30
+ let expiryTime: string;
31
+ let endTime: string = '';
32
+ let timeForInterval: number = 1000 * 30;
33
+ let customStylingContainer: HTMLElement;
34
+ let tcurl: string = '';
35
+ let isMounted: boolean = false;
36
+ let hover: boolean = false;
37
+ let hoverIndex: number;
38
+ let games: Array<any> = [];
39
+ let sliderOffset: number = 0;
40
+
41
+ const setTranslationUrl = (): void => {
42
+ let url:string = translationurl;
43
+
44
+ fetch(url).then((res:any) => res.json())
45
+ .then((res) => {
46
+ Object.keys(res).forEach((item:any):void => {
47
+ addNewMessages(item, res[item]);
48
+ });
49
+ }).catch((err:any) => {
50
+ console.log(err);
51
+ });
52
+ }
53
+ Object.keys(BonusControllerTranslations).forEach((item:any) => {
54
+ addNewMessages(item, BonusControllerTranslations[item]);
55
+ });
56
+ $:{
57
+ if(status === 'claimable' ){
58
+ showActionSection = true;
59
+ }
60
+ if(status === 'active'){
61
+ showActionSection = true;
62
+ }
63
+ }
64
+ onMount(() => {
65
+ window.addEventListener('message', messageHandler, false);
66
+ isMounted = true;
67
+ return () => {
68
+ window.removeEventListener('message', messageHandler);
69
+ isMounted = false;
70
+ }
71
+ })
72
+ const init = (): void =>{
73
+ try {
74
+ bonus = JSON.parse(rawbonus);
75
+ } catch (e){
76
+ }
77
+
78
+ if(!bonus) return;
79
+ if(bonus.type === 'wagering'){
80
+ showAdditionalSection = true;
81
+ }
82
+
83
+ currencySymbol = getCurrencySymbol(bonus.currency);
84
+ levels = getLevels(bonus.levels);
85
+ if(bonus.type === 'freeRound'){
86
+ games = getGames(bonus.freeSpin);
87
+ }
88
+ setIntervalTime()
89
+ }
90
+ const getGames = (freeSpin: any): void =>{
91
+ if(!freeSpin || !freeSpin.vendorGamesDetail) return [];
92
+ let array = [];
93
+ if(Object.keys(freeSpin.vendorGamesDetail).length > 0){
94
+ Object.keys(freeSpin.vendorGamesDetail).forEach((vendor)=>{
95
+ array = freeSpin.vendorGamesDetail[vendor];
96
+ });
97
+ }
98
+ return array;
99
+ }
100
+ const getLevels = (sourceLevels : Array<any>): Array<any> => {
101
+ if(!sourceLevels) return [];
102
+ const levels = []
103
+ let infiniteFlag = false;
104
+ sourceLevels.map((l,i)=> {
105
+ const { maxRepeats, completedTime, ...rest } = l;
106
+ if(maxRepeats === 0){
107
+ infiniteFlag = true;
108
+ }
109
+ for(let i = 0; i < maxRepeats; i++) {
110
+ levels.push({
111
+ ...rest,
112
+ })
113
+ }
114
+ });
115
+ if(infiniteFlag) {
116
+ levelCount = 0
117
+ }else{
118
+ levelCount = levels.length;
119
+ }
120
+ return levels
121
+ }
122
+
123
+ const eventClaimBonus = (): void =>{
124
+ isButtonClickable = false;
125
+ claimBonusError = false;
126
+ window.postMessage({type:'OnBonusClaimed',bonusCode:bonus.code});
127
+ }
128
+
129
+ const eventForfeitBonus = (): void =>{
130
+ isButtonClickable = false;
131
+ window.postMessage({type:'OnBonusForfeit',bonus:bonus});
132
+ }
133
+
134
+ const messageHandler = (e:any): void =>{
135
+ switch (e.data.type) {
136
+ case 'OnBonusClaimedDone':
137
+ isButtonClickable = true;
138
+ break;
139
+ case 'OnBonusForfeitedDone':
140
+ isButtonClickable = true;
141
+ case 'OnBonusClaimError':
142
+ if(e.data.bonusCode === bonus.code){
143
+ claimBonusError = true;
144
+ }
145
+ break;
146
+ default:
147
+ break;
148
+ }
149
+ }
150
+ const getModAndRemainder = (n: number, m: number): any => ({
151
+ remainder: n % m,
152
+ quotient: Math.floor(n/m)
153
+ })
154
+
155
+ const diffRawFromNow = (rawtime: number | string | Date): number => {
156
+
157
+ const timeNow = new Date();
158
+ const time = new Date(rawtime);
159
+
160
+ const diff = (time.getTime() - timeNow.getTime());
161
+
162
+ return diff;
163
+ }
164
+
165
+ const getTextFormated = (rawtime: number | string | Date): string => {
166
+
167
+ const diff = diffRawFromNow(rawtime) / (1000 * 60);
168
+
169
+ const { quotient: day, remainder: diffInDay } = getModAndRemainder(diff, 1440);
170
+ const { quotient: hour, remainder: diffInHour } = getModAndRemainder(diffInDay, 60);
171
+ const minute = Math.floor(diffInHour);
172
+
173
+ const grace = (value) => Math.abs(value) < 10 ? `0${value}` : value;
174
+
175
+ const units = [
176
+ {
177
+ value: day,
178
+ symbol: 'd'
179
+ },
180
+ {
181
+ value: hour,
182
+ symbol: 'h'
183
+ },
184
+ {
185
+ value: minute,
186
+ symbol: 'm'
187
+ },
188
+ ];
189
+
190
+ return units
191
+ .map(unit => grace(unit.value) + unit.symbol)
192
+ .join(' ');
193
+
194
+ }
195
+ const timeIntervalSetter = (time: Date, timeForInterval: number, setterExpired: () => void, setter: (text: string) => void) => {
196
+ const timeRaw = diffRawFromNow(time);
197
+ if(timeRaw < 0){
198
+ setterExpired();
199
+ }else{
200
+ setter(getTextFormated(time));
201
+ // check if bonus will expire
202
+ if(timeRaw < timeForInterval){
203
+ setTimeout(() => {
204
+ window.postMessage({ type: 'OnWageringBonusExpired' });
205
+ }, timeRaw);
206
+ }
207
+ }
208
+ }
209
+ const setIntervalTime = (): void => {
210
+ if(!bonus) return;
211
+ if(bonus.endTime || bonus.trigger && bonus.trigger.endTime){
212
+ timeIntervalSetter(bonus.endTime || bonus.trigger.endTime, timeForInterval,() => endTime = 'Expired',(text: string) => endTime = text);
213
+ }
214
+ if(bonus.expiryDate){
215
+ timeIntervalSetter(bonus.expiryDate, timeForInterval,() => expiryTime = 'Expired',(text: string) => expiryTime = text);
216
+ }
217
+ }
218
+
219
+ const getWagered = (bonus: any): number=>{
220
+ let wagered = (bonus.initialWagerRequirementAmount * 10 - bonus.remainingWagerRequirementAmount * 10) / 10;
221
+ if(bonus.status === 'released'){
222
+ wagered += bonus.remainingAmount;
223
+ }
224
+ return wagered;
225
+ }
226
+
227
+ const getWageringWagered = (bonus: any): number => {
228
+ return((bonus.wageringProgress?.currentLevelIncrement * 10 - bonus.wageringProgress?.gap * 10) / 10).toFixed(1);
229
+ }
230
+
231
+ const getProgressValue = (bonus: any): number => {
232
+ let wageredAmount;
233
+ let denominator;
234
+ if(bonus.type === 'wagering' && bonus.status === 'active' && bonus.wageringType === 'money'){
235
+ denominator = bonus.wageringProgress?.currentLevelIncrement;
236
+ if(denominator != 0){
237
+ wageredAmount = (((bonus.wageringProgress?.currentLevelIncrement - bonus.wageringProgress?.gap) / denominator) * 100).toFixed(1);
238
+ }
239
+ }else if(bonus.status == 'released'){
240
+ wageredAmount = 100;
241
+ }else{
242
+ denominator = bonus.initialWagerRequirementAmount;
243
+ if(denominator != 0){
244
+ wageredAmount = (((bonus.initialWagerRequirementAmount - bonus.remainingWagerRequirementAmount) / denominator) * 100).toFixed(1);
245
+ }
246
+ }
247
+ return Number(wageredAmount);
248
+ }
249
+
250
+ const getTimeFormat = (time: string): string=> {
251
+ return moment(time).format('YYYY-MM-DD hh:mm:ss');
252
+ }
253
+
254
+ const getValidity = (bonus: any): string=>{
255
+ if(!bonus.wallet) return;
256
+ let validity = bonus.wallet.validityMinutes;
257
+ return validity === 0 ? 'infinite' : Math.round(validity / 1440) + ' days';
258
+ }
259
+
260
+ const getProduct = (bonus: any): string=>{
261
+ if(bonus.products){
262
+ return bonus.products;
263
+ }else{
264
+ let result = [];
265
+ if(bonus.wallet){
266
+ if(bonus.wallet.casino){
267
+ result.push('Casino');
268
+ }
269
+
270
+ if(bonus.wallet.sports){
271
+ result.push('Sports');
272
+ }
273
+ }
274
+ return result;
275
+ }
276
+
277
+ }
278
+
279
+ const levelBonusMapperCommon = (_level: any, levelBonus): string => {
280
+ let text: string
281
+ text = $_(`bonusType.${levelBonus.type}`);
282
+
283
+ const currencyShown: string = getCurrencySymbol(Object.keys(_level.increment)[0])
284
+
285
+ if(levelBonus.mode === 'percentage'){
286
+ return `${levelBonus.bonusAmount * 100}% up to ${currencyShown}${levelBonus.capAmount} ${text}`
287
+ }
288
+
289
+ if(levelBonus.mode === 'fixed'){
290
+ return `${currencyShown}${levelBonus.bonusAmount} ${text}`
291
+ }
292
+ }
293
+
294
+ const levelBonusMapper = (_level: any, levelBonus): string => {
295
+ switch(levelBonus.type){
296
+ case 'standard':
297
+ case 'freeBet':
298
+ return levelBonusMapperCommon(_level, levelBonus);
299
+
300
+ case 'freeRound':
301
+ return `${levelBonus.freespinNumber} Free Spins`;
302
+
303
+ case 'tournamentTicket':
304
+ return `Enroll to Tournament Ticket`;
305
+ case 'oddsBoost':
306
+ return `Enroll to Odds Boost`;
307
+ case 'cashBack':
308
+ return `Enroll to Cash Back`;
309
+ case 'stakeBack':
310
+ return `Enroll to Stake Back`;
311
+ }
312
+ }
313
+
314
+ type Reward = {
315
+ label: string;
316
+ desc: string;
317
+ }
318
+
319
+ const getRewards = (bonus, levels): Reward[] => {
320
+
321
+ const index = bonus.wageringProgress?.currentLevel - 1
322
+
323
+ const lastIndex = levels.length - 1
324
+
325
+ const renderx = (arr): Reward[] => arr
326
+ .filter(line => line.index >= 0 && line.index <= lastIndex)
327
+ .map(line => {
328
+ const _level = levels[line.index]
329
+ return {
330
+ label: line.label,
331
+ desc: _level.bonuses.map(levelBonus => levelBonusMapper(_level,levelBonus))
332
+ }
333
+ });
334
+
335
+ if(bonus.status === 'active'){
336
+ return renderx([
337
+ {
338
+ label: 'current',
339
+ index: index,
340
+ },{
341
+ label: 'next',
342
+ index: index + 1
343
+ }]
344
+ )
345
+
346
+ }else if(!bonus.status){
347
+ return renderx([
348
+ {
349
+ label: 'first',
350
+ index: 0,
351
+ },
352
+ {
353
+ label: 'next',
354
+ index: 1,
355
+ }
356
+ ])
357
+ }else{
358
+ return renderx([
359
+ {
360
+ label: 'last',
361
+ index: lastIndex,
362
+ },
363
+ {
364
+ label: 'previous',
365
+ index: lastIndex - 1
366
+ }
367
+ ])
368
+ }
369
+ }
370
+ const getBonusUrl = (bonus: any): void =>{
371
+ tcurl = bonus.url ? bonus.url : bonus.presentation?.url?.content;
372
+ }
373
+
374
+ const classWithPart = (partAndClass: any, extraClass: string = ''): void => ({
375
+ part: partAndClass,
376
+ class: [partAndClass, extraClass].join(' '),
377
+ });
378
+ const gameClicked = (game:any): void => {
379
+ window.postMessage({ type: 'BonusGameAction', gameId: game.id, name: game.name, gameLaunchUrl: game.href }, window.location.href);
380
+ }
381
+ const enter = (index: number): void => {
382
+ hover = true;
383
+ hoverIndex = index;
384
+ }
385
+
386
+ const leave = (): void => {
387
+ hover = false;
388
+ hoverIndex = -1;
389
+ }
390
+ const getDataFromCMS = (bonusID: string): void => {
391
+ fetch(`${cmsendpoint}/${lang}/bonuses-information/${bonusID}`)
392
+ .then((res: any) => res.json())
393
+ .then((data: any) => {
394
+ if(data && data[bonusID]){
395
+ showTerms = true;
396
+ bonusDescription = data[bonusID];
397
+ }
398
+ });
399
+ }
400
+ const setContent = (element: HTMLElement, content: any): void => {
401
+ let htmlContent = document.createElement("div");
402
+ htmlContent.innerHTML = content;
403
+ element.append(htmlContent);
404
+ }
405
+ const setClientStyling = (): void => {
406
+ let sheet = document.createElement('style');
407
+ sheet.innerHTML = clientstyling;
408
+ customStylingContainer.appendChild(sheet);
409
+ }
410
+
411
+ const setClientStylingURL = (): void => {
412
+ let url:URL = new URL(clientstylingurl);
413
+ let cssFile:HTMLElement = document.createElement('style');
414
+
415
+ fetch(url.href)
416
+ .then((res:any) => res.text())
417
+ .then((data:any) => {
418
+ cssFile.innerHTML = data
419
+
420
+ setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
421
+ });
422
+ }
423
+ $: initialLoad = rawbonus && lang && status;
424
+ $: initialLoad && init();
425
+ $: {
426
+ if(initialLoad && bonus){
427
+ if(lang){
428
+ setLocale(lang);
429
+ }
430
+ if(cmsendpoint){
431
+ getDataFromCMS(bonus.id);
432
+ }else{
433
+ getBonusUrl(bonus);
434
+ }
435
+ }
436
+ }
437
+ $: clientstyling && customStylingContainer && setClientStyling();
438
+ $: clientstylingurl && customStylingContainer && setClientStylingURL();
439
+ $: translationurl && setTranslationUrl();
440
+ </script>
441
+
442
+ {#if bonus}
443
+ <div {...classWithPart('BonusCard')} bind:this={customStylingContainer}>
444
+ <div {...classWithPart('BonusCardInfo')}>
445
+ <div {...classWithPart('BonusCardHeader')}>
446
+ <p {...classWithPart('BonusCardRowTitle')}>
447
+ <span {...classWithPart('TitleIcon')}>
448
+ {#if getProduct(bonus).indexOf('Casino') > -1}
449
+ <svg {...classWithPart('CasinoIcon')} viewBox="0 0 41 41">
450
+ <path d="M21.2942 0V5.23421C24.916 5.42484 28.1964 6.86246 30.7301 9.14994L34.4393 5.44072C30.9525 2.22394 26.3616 0.190624 21.2942 0Z" fill="black"/>
451
+ <path d="M30.7301 31.8501C28.2043 34.1296 24.916 35.5752 21.2942 35.7658V41C26.3616 40.8094 30.9525 38.7761 34.4313 35.5593L30.7221 31.8501H30.7301Z" fill="black"/>
452
+ <path d="M35.7658 21.2943C35.5752 24.9162 34.1376 28.1965 31.8501 30.7302L35.5593 34.4394C38.7761 30.9605 40.8094 26.3697 41 21.3023H35.7658V21.2943Z" fill="black"/>
453
+ <path d="M19.7056 35.7658C16.0838 35.5752 12.8035 34.1376 10.2698 31.8501L6.56055 35.5593C10.0394 38.7761 14.6382 40.8094 19.6977 41V35.7658H19.7056Z" fill="black"/>
454
+ <path d="M31.8501 10.2698C34.1296 12.7955 35.5752 16.0838 35.7658 19.7056H41C40.8094 14.6382 38.7761 10.0474 35.5593 6.56848L31.8501 10.2777V10.2698Z" fill="black"/>
455
+ <path d="M19.7058 0C14.6383 0.190624 10.0395 2.22394 6.5686 5.44072L10.2778 9.14994C12.8036 6.8704 16.0918 5.42484 19.7137 5.23421V0H19.7058Z" fill="black"/>
456
+ <path d="M9.14994 30.7302C6.8704 28.2044 5.42484 24.9162 5.23421 21.2943H0C0.190624 26.3617 2.22394 30.9526 5.44072 34.4315L9.14994 30.7222V30.7302Z" fill="black"/>
457
+ <path d="M5.23421 19.7058C5.42484 16.0839 6.86246 12.8036 9.14994 10.2699L5.44072 6.56067C2.22394 10.0475 0.190624 14.6384 0 19.7058H5.23421Z" fill="black"/>
458
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.5 31.825C26.7547 31.825 31.825 26.7547 31.825 20.5C31.825 14.2454 26.7547 9.17505 20.5 9.17505C14.2454 9.17505 9.17505 14.2454 9.17505 20.5C9.17505 26.7547 14.2454 31.825 20.5 31.825ZM20.5 33.825C27.8592 33.825 33.825 27.8592 33.825 20.5C33.825 13.1409 27.8592 7.17505 20.5 7.17505C13.1409 7.17505 7.17505 13.1409 7.17505 20.5C7.17505 27.8592 13.1409 33.825 20.5 33.825Z" fill="black"/>
459
+ <path d="M21.6173 27.6413V28.7H19.3741V27.6413C17.3997 27.3092 16.3999 26.0428 16.3999 24.0707V23.0742H18.996V24.216C18.996 25.254 19.5421 25.6276 20.4159 25.6276C21.2897 25.6276 21.8358 25.254 21.8358 24.216C21.8442 21.2266 16.4755 21.0813 16.4755 16.9294C16.4755 14.978 17.4501 13.7325 19.3741 13.3795V12.3H21.6173V13.3795C23.5665 13.7117 24.5663 14.9573 24.5663 16.9294V17.3861H21.9702V16.7841C21.9702 15.7461 21.4745 15.3517 20.6007 15.3517C19.727 15.3517 19.2313 15.7461 19.2313 16.7841C19.2313 19.7735 24.5999 19.9188 24.5999 24.0707C24.5999 26.0428 23.5749 27.3092 21.6257 27.6413H21.6173Z" fill="black"/>
460
+ <circle cx="28.1874" cy="21.0125" r="1.5375" fill="black"/>
461
+ <circle cx="12.8124" cy="21.0125" r="1.5375" fill="black"/>
462
+ </svg>
463
+ {/if}
464
+ {#if getProduct(bonus).indexOf('Sports') > -1}
465
+
466
+ <svg {...classWithPart('SportsIcon')} viewBox="0 0 43 40">
467
+ <path d="M23 0C11.9555 0 3 8.95539 3 20C3 31.0446 11.9555 40 23 40C34.0454 40 43 31.0444 43 20C43 8.95558 34.0452 0 23 0ZM26.9568 37.9018C25.6574 38.1573 24.0408 38.3044 22.7261 38.3297C21.4806 38.3119 20.2402 38.1672 19.0241 37.8977C18.8058 37.8415 18.5877 37.7846 18.3698 37.7268L16.022 31.435L17.911 27.6923H28.0892L28.144 27.7958L30.0037 31.5315L27.7327 37.7125C27.4755 37.7813 27.2168 37.8444 26.9568 37.9018ZM16.6133 2.81538L22.1346 6.59385V12.1849L15.308 17.9606L10.5577 15.7962L10.157 15.6136L8.00971 9.45788C10.126 6.4575 13.1191 4.11827 16.6133 2.81538ZM37.9581 9.42952L35.8012 15.6298L30.6096 17.9748L23.7692 12.1849V6.59385L29.3073 2.80394C32.8037 4.10039 35.8366 6.43394 37.9581 9.42952ZM4.74462 21.6744L9.91346 17.2015L14.6768 19.3745L14.7306 19.399L16.6265 26.8305L14.6618 30.5352L7.94452 30.4472C6.18029 27.9126 5.03933 24.9139 4.74462 21.6744ZM31.3384 30.5351L29.3736 26.8304L31.2728 19.3865L36.0802 17.1961L41.2554 21.6744C40.9607 24.9139 39.8196 27.9126 38.0557 30.4471L31.3384 30.5351Z" fill="black"/>
468
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M23 39C23 39.5523 22.5523 40 22 40L6 40C5.44772 40 5 39.5523 5 39C5 38.4477 5.44772 38 6 38L22 38C22.5523 38 23 38.4477 23 39Z" fill="black"/>
469
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 36C9 36.5523 8.55228 37 8 37L1 37C0.447715 37 -3.91405e-08 36.5523 -8.74228e-08 36C-1.35705e-07 35.4477 0.447715 35 1 35L8 35C8.55228 35 9 35.4477 9 36Z" fill="black"/>
470
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M3 39C3 39.5523 2.55228 40 2 40L1 40C0.447715 40 3.91405e-08 39.5523 8.74228e-08 39C1.35705e-07 38.4477 0.447715 38 1 38L2 38C2.55228 38 3 38.4477 3 39Z" fill="black"/>
471
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M23 38C32.9411 38 41 29.9411 41 20C41 10.0589 32.9411 2 23 2C13.0589 2 5 10.0589 5 20C5 29.9411 13.0589 38 23 38ZM23 40C34.0457 40 43 31.0457 43 20C43 8.9543 34.0457 0 23 0C11.9543 0 3 8.9543 3 20C3 31.0457 11.9543 40 23 40Z" fill="black"/>
472
+ </svg>
473
+
474
+ {/if}
475
+ </span>
476
+ {bonus.name || bonus.presentation?.name.content}
477
+
478
+ </p>
479
+ {#if status === 'active'}
480
+ <span {...classWithPart('BonusCardTitleSub')}>
481
+ <svg width="24" height="28" viewBox="0 0 24 28" fill="none" xmlns="http://www.w3.org/2000/svg">
482
+ <path d="M16 0H8V2.66667H16V0ZM10.6667 17.3333H13.3333V9.33333H10.6667V17.3333ZM21.3667 8.51333L23.2667 6.61333C22.6933 5.92667 22.0667 5.3 21.38 4.72667L19.48 6.62667C17.3568 4.92342 14.7153 3.99668 11.9933 4C5.36 4 0 9.37333 0 16C0 22.6267 5.36 28 11.9933 28C18.6267 28 24 22.6267 24 16C24 13.1667 23.0133 10.5667 21.3667 8.51333ZM12 25.3333C6.84667 25.3333 2.66667 21.1533 2.66667 16C2.66667 10.8467 6.84667 6.66667 12 6.66667C17.1533 6.66667 21.3333 10.8467 21.3333 16C21.3333 21.1533 17.1533 25.3333 12 25.3333Z" fill="#6D6D6D"/>
483
+ </svg>
484
+ {expiryTime}
485
+ </span>
486
+ {:else if status === 'completed'}
487
+ <p {...classWithPart('BonusCardTitleSub')}>{bonus.status}</p>
488
+ {/if}
489
+ </div>
490
+ {#if showDataSection}
491
+ <div {...classWithPart('BonusCardData')}>
492
+ <div {...classWithPart('BonusCardDataContent')}>
493
+ {#if status === 'claimable'}
494
+ <p {...classWithPart('BonusCardRow')}>
495
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.bonusType`)}:</span>
496
+ <span {...classWithPart('BonusCardRowText','Type')}>{$_(`bonusType.${bonus.type}`)} </span>
497
+ </p>
498
+
499
+ {#if bonus.type === 'wagering'}
500
+ <p {...classWithPart('BonusCardRow')}>
501
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.levels`)}:</span>
502
+ <span {...classWithPart('BonusCardRowText')}>
503
+ {#if levelCount > 0}
504
+ {levelCount}
505
+ {:else}
506
+ &#8734
507
+ {/if}
508
+ </span>
509
+ </p>
510
+ {/if}
511
+
512
+ <p {...classWithPart('BonusCardRow')}>
513
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.validity`)}:</span>
514
+ <span {...classWithPart('BonusCardRowText')}>{getValidity(bonus)}</span>
515
+ </p>
516
+ {:else}
517
+ <p {...classWithPart('BonusCardRow')}>
518
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.bonusStatus`)}:</span>
519
+ <span {...classWithPart('BonusCardRowText')}
520
+ class:StatusActive={status === 'active'}
521
+ class:StatusCompleted={status === 'completed'}
522
+ class:StatusClaimable={status === 'claimable'}>
523
+ {#if status === 'active'}
524
+ {status}
525
+ {:else}
526
+ {bonus.status}
527
+ {/if}
528
+ </span>
529
+ </p>
530
+ <p {...classWithPart('BonusCardRow')}>
531
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.bonusType`)}:</span>
532
+ <span {...classWithPart('BonusCardRowText','Type')}>{$_(`bonusType.${bonus.type}`)} </span>
533
+ </p>
534
+ {#if bonus.type === 'standard'}
535
+ <p {...classWithPart('BonusCardRow')}>
536
+ <span {...classWithPart('BonusCardLabel')} >{$_(`bonusCard.bonusAmount`)}:</span>
537
+ <span {...classWithPart('BonusCardRowText')}>
538
+ <span class:BonusAmount={status==='active'}>{bonus.remainingAmount}{currencySymbol}</span> /
539
+ <span class:Amount={status==='active'}>{bonus.amount}{currencySymbol}</span>
540
+ </span>
541
+ </p>
542
+ <p {...classWithPart('BonusCardRow')}>
543
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.wageredAmount`)}:</span>
544
+ <span {...classWithPart('BonusCardRowText')}>
545
+ {getWagered(bonus) + currencySymbol} /
546
+ {#if bonus.initialWagerRequirementAmount >= 2147483647}
547
+ &#8734
548
+ {:else}
549
+ {bonus.initialWagerRequirementAmount + currencySymbol}
550
+ {/if}
551
+ </span>
552
+ </p>
553
+ {/if}
554
+ {#if bonus.type === 'freeBet'}
555
+ <p {...classWithPart('BonusCardRow')}>
556
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.bonusAmount`)}:</span>
557
+ <span {...classWithPart('BonusCardRowText')}>
558
+ <span class:BonusAmount={status==='active'}>{bonus.remainingAmount}{currencySymbol}</span>
559
+ </span>
560
+ </p>
561
+ {/if}
562
+ {#if bonus.type === 'freeRound'}
563
+ {#if bonus.status === 'active'}
564
+ <p {...classWithPart('BonusCardRow')}>
565
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.roundNumber`)}:</span>
566
+ <span {...classWithPart('BonusCardRowText')}>{bonus.numberOfFreeSpin}</span>
567
+ </p>
568
+
569
+ <div {...classWithPart('BonusCardRow')}>
570
+ <div {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.game`)}:</div>
571
+ <div {...classWithPart('BonusCardRowText')}>
572
+ <div class="BonusGamesSlider">
573
+ <button class="SliderNavButton" part="SliderNavButton" class:Hide={games.length <= 3} disabled={sliderOffset==0} on:click="{() => sliderOffset += 300}">
574
+ <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
575
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>
576
+ </svg>
577
+ </button>
578
+ <div class="Main">
579
+ <span class="Games" style="transform: translateX({sliderOffset}px);">
580
+ {#each games as game, i}
581
+ <span class="Game" part="Game" on:click={() => gameClicked(game)} on:mouseenter={() => enter(i)} on:mouseleave={() => leave()}>
582
+ <span class="PlayNowButton {hover && hoverIndex == i ? 'ItemHover' : ''}" part="PlayNowButton {hover && hoverIndex == i ? 'itemHover' : ''}">{$_('bonusCard.playNow')}</span>
583
+ <img src={game.thumbnail} width="100px" height="75px" alt={game.name} title={game.name}/>
584
+ </span>
585
+ {/each}
586
+ </span>
587
+ </div>
588
+ <button class="SliderNavButton" part="SliderNavButton" class:Hide={games.length <= 3} disabled={sliderOffset <= -(games.length-3) * 100} on:click="{() => sliderOffset -= 300}">
589
+ <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
590
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
591
+ </svg>
592
+ </button>
593
+ </div>
594
+ </div>
595
+ </div>
596
+ {/if}
597
+
598
+ {/if}
599
+ {#if bonus.type === 'wagering'}
600
+ <p {...classWithPart('BonusCardRow')}>
601
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.wageringType`)}:</span>
602
+ <span {...classWithPart('BonusCardRowText')}>{$_(`bonusCard.${bonus.wageringType}`)}</span>
603
+ </p>
604
+ <p {...classWithPart('BonusCardRow')}>
605
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.wagered`)}:</span>
606
+ <span {...classWithPart('BonusCardRowText')}>
607
+
608
+ {#if bonus.wageringType === 'money'}
609
+ {#if status === 'active'}
610
+ {getWageringWagered(bonus)} {currencySymbol} /
611
+ {bonus.wageringProgress?.currentLevelIncrement} {currencySymbol}
612
+ {:else}
613
+ {getWagered(bonus) + currencySymbol} /
614
+ {#if bonus.initialWagerRequirementAmount >= 2147483647}
615
+ &#8734
616
+ {:else}
617
+ {bonus.initialWagerRequirementAmount + currencySymbol}
618
+ {/if}
619
+ {/if}
620
+ {:else}
621
+
622
+ {/if}
623
+
624
+ </span>
625
+ </p>
626
+ {/if}
627
+ {#if bonus.endTime && status === 'active' && bonus.type !== 'wagering'}
628
+ <p {...classWithPart('BonusCardRow')}>
629
+ <span {...classWithPart('BonusCardLabel')}>{$_(`bonusCard.validUntil`)}:</span>
630
+ <span {...classWithPart('BonusCardRowText')}>{getTimeFormat(bonus.endTime)}</span>
631
+ </p>
632
+ {/if}
633
+ {/if}
634
+ </div>
635
+ {#if status === 'active' || status === 'completed'}
636
+ {#if bonus.type === 'standard'}
637
+ <div {...classWithPart('BonusCardProgress')}>
638
+ <casino-bonus-progress {...classWithPart('CircularProgress')} value={getProgressValue(bonus)} status={status} clientstyling={clientstyling} clientstylingurl={clientstylingurl}/>
639
+ </div>
640
+ {/if}
641
+
642
+ {#if bonus.type === 'wagering'}
643
+ <div {...classWithPart('BonusCardProgress')}>
644
+ <casino-bonus-progress {...classWithPart('CircularProgress')} value={getProgressValue(bonus)} status={status} clientstyling={clientstyling} clientstylingurl={clientstylingurl}/>
645
+ <div {...classWithPart('CircularProgressText')}>{$_(`bonusCard.level`)}: {bonus.wageringProgress?.currentLevel || 1} /
646
+ {#if levelCount > 0}
647
+ {levelCount}
648
+ {:else}
649
+ &#8734
650
+ {/if}
651
+ </div>
652
+ </div>
653
+ {/if}
654
+ {/if}
655
+ </div>
656
+ {/if}
657
+ <div {...classWithPart('BonusCardFooter')} class:Active={showAdditionalSectionContent || showTermsSectionContent}>
658
+ {#if showAdditionalSection}
659
+ <div {...classWithPart('BonusCardAdditional')} >
660
+ <div {...classWithPart('BonusCardAdditionalHeader')} class:Active={showAdditionalSectionContent} on:click={() => {showAdditionalSectionContent = !showAdditionalSectionContent}}>
661
+ <span {...classWithPart('BonusCardAdditionalTitle')}>
662
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
663
+ <path d="M18 5.97075H14.885C15.3396 5.74285 15.7565 5.44638 16.121 5.09175C16.6824 4.52865 16.9977 3.76592 16.9977 2.97075C16.9977 2.17558 16.6824 1.41285 16.121 0.84975C14.987 -0.28325 13.013 -0.28325 11.879 0.84975C10.243 2.48675 10.02 5.56775 10 5.91375C9.98 5.56775 9.757 2.48675 8.121 0.85075C6.987 -0.28225 5.011 -0.28125 3.879 0.85075C3.312 1.41675 3 2.16975 3 2.97075C3 3.77175 3.312 4.52575 3.878 5.09175C4.24311 5.4461 4.66027 5.74253 5.115 5.97075H2C0.897 5.97075 0 6.86875 0 7.97075V10.9707C0 11.236 0.105357 11.4903 0.292893 11.6779C0.48043 11.8654 0.734784 11.9707 1 11.9707V17.9708C1 19.0738 1.897 19.9708 3 19.9708H17C18.103 19.9708 19 19.0738 19 17.9708V11.9707C19.2652 11.9707 19.5196 11.8654 19.7071 11.6779C19.8946 11.4903 20 11.236 20 10.9707V7.97075C20 6.86875 19.103 5.97075 18 5.97075ZM6 17.9708H3V11.9707H6V17.9708ZM6 9.97075H2V7.97075H6V9.97075ZM5.293 3.67775C5.19982 3.58514 5.12595 3.47497 5.07565 3.35361C5.02536 3.23225 4.99964 3.10212 5 2.97075C4.99947 2.83933 5.02498 2.7091 5.07506 2.58759C5.12514 2.46608 5.1988 2.3557 5.29177 2.26281C5.38475 2.16993 5.49521 2.09639 5.61677 2.04643C5.73833 1.99647 5.86858 1.97109 6 1.97175C6.268 1.97175 6.519 2.07575 6.708 2.26475C7.298 2.85375 7.642 3.91275 7.826 4.79475C6.945 4.60975 5.88 4.26475 5.293 3.67775ZM12 17.9708H8V11.9707H12V17.9708ZM12 9.97075H8V7.97075H12V9.97075ZM13.293 2.26475C13.482 2.07575 13.733 1.97175 14 1.97175C14.267 1.97175 14.518 2.07575 14.707 2.26375C14.8945 2.45128 14.9998 2.70559 14.9998 2.97075C14.9998 3.23591 14.8945 3.49022 14.707 3.67775C14.117 4.26975 13.058 4.61375 12.175 4.79875C12.358 3.91375 12.703 2.85475 13.293 2.26475ZM17 17.9708H14V11.9707H17V17.9708ZM18 9.97075H14V7.97075H18V9.97075Z" fill="black"/>
664
+ </svg>
665
+ {$_(`bonusCard.rewards`)}</span>
666
+ <span {...classWithPart('BonusCardAdditionalButton')}>
667
+ {#if !showAdditionalSectionContent}
668
+ <svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg">
669
+ <path d="M2 2.07104L9.07107 9.14211L16.1421 2.07104" stroke="black" stroke-width="3" stroke-linecap="round"/>
670
+ </svg>
671
+ {:else}
672
+ <svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg">
673
+ <path d="M16.1422 10.071L9.07108 2.99998L2.00002 10.071" stroke="black" stroke-width="3" stroke-linecap="round"/>
674
+ </svg>
675
+ {/if}
676
+ </span>
677
+ </div>
678
+ {#if showAdditionalSectionContent}
679
+ <div {...classWithPart('BonusCardAdditionalContent')} >
680
+ {#if bonus.type === 'wagering'}
681
+ {#if bonus.status}
682
+ {#each (getRewards(bonus, levels)) as item }
683
+ <p {...classWithPart("BonusRewardsLevelsItem")}>
684
+ <span {...classWithPart("BonusRewardsLevelsItemPosition")}>
685
+ {$_(`bonusCard.${item.label}`)} {$_(`bonusCard.level`)}:
686
+ </span>
687
+ <span>
688
+ {#each item.desc as description}
689
+ {description}
690
+ {/each}
691
+ </span>
692
+ </p>
693
+ {/each}
694
+ {:else}
695
+ {#each bonus.levels as level, index}
696
+ <p {...classWithPart("BonusRewardsLevelsItem")}>
697
+
698
+ <span {...classWithPart("BonusRewardsLevelsItemPosition")}>
699
+ {$_(`bonusCard.level`)}
700
+ {level.maxRepeats > 1 ? `${index + 1}-${index + 1 + level.maxRepeats - 1}` : index + 1}:
701
+ </span>
702
+ <span>
703
+ {#each level.bonuses as levelBonus}
704
+ {levelBonusMapper(level, levelBonus)}
705
+ {/each}
706
+ </span>
707
+ </p>
708
+ {/each}
709
+ {/if}
710
+ <a {...classWithPart("BonusAllRewardsLink")} href={"javascript:void(0)"} on:click={() => window.postMessage({type: 'OnWageringBonusAllRewardsClick', bonusWalletID: bonus.id})}>
711
+ {$_(`bonusCard.allRewards`)}
712
+ </a>
713
+ {/if}
714
+ </div>
715
+ {/if}
716
+ </div>
717
+ {/if}
718
+ {#if showTerms}
719
+ <div {...classWithPart('BonusCardTerms')} >
720
+ <div {...classWithPart('BonusCardTermsHeader')} class:Active={showTermsSectionContent} on:click={() => {showTermsSectionContent = !showTermsSectionContent}}>
721
+ <span {...classWithPart('BonusCardTermsTitle')}>
722
+ <svg width="19" height="21" viewBox="0 0 19 21" fill="none" xmlns="http://www.w3.org/2000/svg">
723
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 3.675C0.5 1.64535 2.14535 0 4.175 0H14.675C16.7046 0 18.35 1.64535 18.35 3.675V13.4312C18.35 14.4319 17.9419 15.3893 17.2201 16.0823L13.164 19.9761C12.4796 20.6331 11.5676 21 10.6189 21H4.175C2.14536 21 0.5 19.3546 0.5 17.325V3.675ZM4.175 2.1C3.30515 2.1 2.6 2.80515 2.6 3.675V17.325C2.6 18.1948 3.30515 18.9 4.175 18.9H10.6189C11.0255 18.9 11.4164 18.7428 11.7097 18.4612L15.7657 14.5674C16.0751 14.2704 16.25 13.86 16.25 13.4312V3.675C16.25 2.80515 15.5448 2.1 14.675 2.1H4.175Z" fill="black"/>
724
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16.775 14.9625L12.575 14.9625C12.1401 14.9625 11.7875 15.3151 11.7875 15.75L11.7875 19.95L10.2125 19.95L10.2125 15.75C10.2125 14.4452 11.2703 13.3875 12.575 13.3875L16.775 13.3875L16.775 14.9625Z" fill="black"/>
725
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M6.27502 4.9875C6.27502 4.55258 6.6276 4.2 7.06252 4.2H11.7875C12.2224 4.2 12.575 4.55258 12.575 4.9875C12.575 5.42242 12.2224 5.775 11.7875 5.775H7.06252C6.6276 5.775 6.27502 5.42242 6.27502 4.9875Z" fill="black"/>
726
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.70001 8.1375C4.70001 7.70258 5.05259 7.35 5.48751 7.35H13.3625C13.7974 7.35 14.15 7.70258 14.15 8.1375C14.15 8.57242 13.7974 8.925 13.3625 8.925H5.48751C5.05259 8.925 4.70001 8.57242 4.70001 8.1375Z" fill="black"/>
727
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.70001 11.8125C4.70001 11.3776 5.05259 11.025 5.48751 11.025H13.3625C13.7974 11.025 14.15 11.3776 14.15 11.8125C14.15 12.2474 13.7974 12.6 13.3625 12.6H5.48751C5.05259 12.6 4.70001 12.2474 4.70001 11.8125Z" fill="black"/>
728
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.70001 15.4875C4.70001 15.0526 5.05259 14.7 5.48751 14.7H8.11251C8.54744 14.7 8.90001 15.0526 8.90001 15.4875C8.90001 15.9224 8.54744 16.275 8.11251 16.275H5.48751C5.05259 16.275 4.70001 15.9224 4.70001 15.4875Z" fill="black"/>
729
+ </svg>
730
+
731
+ {$_(`bonusCard.terms`)}
732
+ </span>
733
+ <span {...classWithPart('BonusCardTermsButton')}>
734
+ {#if !showTermsSectionContent}
735
+ <svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg">
736
+ <path d="M2 2.07104L9.07107 9.14211L16.1421 2.07104" stroke="black" stroke-width="3" stroke-linecap="round"/>
737
+ </svg>
738
+ {:else}
739
+ <svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg">
740
+ <path d="M16.1422 10.071L9.07108 2.99998L2.00002 10.071" stroke="black" stroke-width="3" stroke-linecap="round"/>
741
+ </svg>
742
+ {/if}
743
+ </span>
744
+ </div>
745
+ {#if showTermsSectionContent}
746
+ <div {...classWithPart('BonusCardTermsContent')} use:setContent={bonusDescription.terms_and_conditions}>
747
+ </div>
748
+ {/if}
749
+ </div>
750
+ {:else}
751
+ <div {...classWithPart('BonusCardTerms')}>
752
+
753
+ <a {...classWithPart('BonusCardTermsLink')} href={tcurl} target="__blank">
754
+ <svg width="19" height="21" viewBox="0 0 19 21" fill="none" xmlns="http://www.w3.org/2000/svg">
755
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0.5 3.675C0.5 1.64535 2.14535 0 4.175 0H14.675C16.7046 0 18.35 1.64535 18.35 3.675V13.4312C18.35 14.4319 17.9419 15.3893 17.2201 16.0823L13.164 19.9761C12.4796 20.6331 11.5676 21 10.6189 21H4.175C2.14536 21 0.5 19.3546 0.5 17.325V3.675ZM4.175 2.1C3.30515 2.1 2.6 2.80515 2.6 3.675V17.325C2.6 18.1948 3.30515 18.9 4.175 18.9H10.6189C11.0255 18.9 11.4164 18.7428 11.7097 18.4612L15.7657 14.5674C16.0751 14.2704 16.25 13.86 16.25 13.4312V3.675C16.25 2.80515 15.5448 2.1 14.675 2.1H4.175Z" fill="black"/>
756
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16.775 14.9625L12.575 14.9625C12.1401 14.9625 11.7875 15.3151 11.7875 15.75L11.7875 19.95L10.2125 19.95L10.2125 15.75C10.2125 14.4452 11.2703 13.3875 12.575 13.3875L16.775 13.3875L16.775 14.9625Z" fill="black"/>
757
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M6.27502 4.9875C6.27502 4.55258 6.6276 4.2 7.06252 4.2H11.7875C12.2224 4.2 12.575 4.55258 12.575 4.9875C12.575 5.42242 12.2224 5.775 11.7875 5.775H7.06252C6.6276 5.775 6.27502 5.42242 6.27502 4.9875Z" fill="black"/>
758
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.70001 8.1375C4.70001 7.70258 5.05259 7.35 5.48751 7.35H13.3625C13.7974 7.35 14.15 7.70258 14.15 8.1375C14.15 8.57242 13.7974 8.925 13.3625 8.925H5.48751C5.05259 8.925 4.70001 8.57242 4.70001 8.1375Z" fill="black"/>
759
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.70001 11.8125C4.70001 11.3776 5.05259 11.025 5.48751 11.025H13.3625C13.7974 11.025 14.15 11.3776 14.15 11.8125C14.15 12.2474 13.7974 12.6 13.3625 12.6H5.48751C5.05259 12.6 4.70001 12.2474 4.70001 11.8125Z" fill="black"/>
760
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.70001 15.4875C4.70001 15.0526 5.05259 14.7 5.48751 14.7H8.11251C8.54744 14.7 8.90001 15.0526 8.90001 15.4875C8.90001 15.9224 8.54744 16.275 8.11251 16.275H5.48751C5.05259 16.275 4.70001 15.9224 4.70001 15.4875Z" fill="black"/>
761
+ </svg>
762
+ {$_(`bonusCard.terms`)}
763
+ </a>
764
+ </div>
765
+ {/if}
766
+ </div>
767
+ </div>
768
+ {#if showActionSection}
769
+ <div {...classWithPart('BonusCardAction')} >
770
+ <div {...classWithPart('BonusCardActionContent')} >
771
+ {#if status === 'claimable'}
772
+ <div {...classWithPart('BonusCardJoinWrapper')}>
773
+ {#if claimBonusError === true}
774
+ <span {...classWithPart('BonusCardJoinError')}>{$_(`bonusCard.error`)}</span>
775
+ {/if}
776
+ <span {...classWithPart('BonusCardJoinCountdown')}>
777
+ <svg width="24" height="28" viewBox="0 0 24 28" fill="none" xmlns="http://www.w3.org/2000/svg">
778
+ <path d="M16 0H8V2.66667H16V0ZM10.6667 17.3333H13.3333V9.33333H10.6667V17.3333ZM21.3667 8.51333L23.2667 6.61333C22.6933 5.92667 22.0667 5.3 21.38 4.72667L19.48 6.62667C17.3568 4.92342 14.7153 3.99668 11.9933 4C5.36 4 0 9.37333 0 16C0 22.6267 5.36 28 11.9933 28C18.6267 28 24 22.6267 24 16C24 13.1667 23.0133 10.5667 21.3667 8.51333ZM12 25.3333C6.84667 25.3333 2.66667 21.1533 2.66667 16C2.66667 10.8467 6.84667 6.66667 12 6.66667C17.1533 6.66667 21.3333 10.8467 21.3333 16C21.3333 21.1533 17.1533 25.3333 12 25.3333Z" fill="#6D6D6D"/>
779
+ </svg>
780
+ {endTime}
781
+ </span>
782
+ <button {...classWithPart('BonusJoinButton')} type="button" on:click={eventClaimBonus} disabled={!isButtonClickable}>
783
+ {$_(`bonusCard.join`)}
784
+ </button>
785
+ </div>
786
+ {/if}
787
+ {#if status === 'active' && bonus.status === 'active'}
788
+ <button {...classWithPart('BonusForfeitButton')} type="button" on:click={eventForfeitBonus} disabled={!isButtonClickable}>
789
+ {$_(`bonusCard.forfeit`)}
790
+ </button>
791
+ {/if}
792
+ </div>
793
+ </div>
794
+ {/if}
795
+
796
+
797
+ </div>
798
+ {/if}
799
+
800
+ <style lang="scss">
801
+ :host {
802
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
803
+ }
804
+ .BonusCard {
805
+ background-color: #F4F4F4;
806
+ padding: 10px 20px 20px;
807
+ border-radius: 5px;
808
+ font-size: 18px;
809
+ font-weight: 500;
810
+ color: var(--emfe-w-bonus-card-text,var(--emfe-w-color-gray-300, #6D6D6D));
811
+ }
812
+
813
+ .BonusCardHeader {
814
+ display: flex;
815
+ justify-content: space-between;
816
+ align-items: center;
817
+ border-bottom: 1px solid #D1D1D1;
818
+
819
+ &:nth-child(even) {
820
+ background-color: var(--emfe-w-bonus-card-bg,var(--emfe-w-color-gray-50, #F9F8F8));
821
+ }
822
+ }
823
+ .BonusCardRow {
824
+ display: flex;
825
+ padding: 11px 0;
826
+ margin: 0;
827
+ align-items: center;
828
+ }
829
+ .BonusCardLabel {
830
+ flex: 3;
831
+ }
832
+ .BonusCardRowTitle {
833
+ color: var(--emfe-w-bonus-card-black,var(--emfe-w-color-black, #000000));
834
+ font-weight: 700;
835
+ font-size: 18px;
836
+ display: flex;
837
+ align-items: center;
838
+ text-indent: 10px;
839
+ span {
840
+ font-weight: 400;
841
+ color: var(--emfe-w-bonus-card-span,var(--emfe-w-color-primary, #00AEEF));
842
+ }
843
+ }
844
+ .BonusCardTitleSub {
845
+ display: flex;
846
+ font-size: 16px;
847
+ text-indent: 10px;
848
+ align-items: center;
849
+ font-weight: 400;
850
+ }
851
+ .BonusCardRowText {
852
+ flex:2;
853
+ color: #9C9C9C;
854
+ text-transform: capitalize;
855
+ &.BonusCardStatus {
856
+ font-weight: 700;
857
+ color: var(--emfe-w-bonus-card-title,var(--emfe-w-color-black, #000000));
858
+ }
859
+ &.StatusActive {
860
+ color: var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, #53B65A));
861
+ }
862
+ &.Type {
863
+ color: var(--emfe-w-bonus-card-black,var(--emfe-w-color-black, #000000));
864
+ }
865
+ &.StatusExpired {
866
+ color: var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, #FD2839));
867
+ }
868
+ &.StatusCompleted {
869
+ color: var(--emfe-w-bonus-card-yellow,var(--emfe-w-color-yellow, #F39C12));
870
+ }
871
+ &.TextCapitalize {
872
+ text-transform: capitalize;
873
+ }
874
+
875
+ .BonusAmount {
876
+ color: var(--emfe-w-bonus-card-black,var(--emfe-w-color-black, #000000));
877
+ }
878
+ .Amount {
879
+ color: var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, #53B65A));
880
+ }
881
+ }
882
+ .BonusCardAction{
883
+ margin: 20px 0 0;
884
+ padding: 10px 5px 0 0;
885
+ display: flex;
886
+ justify-content: end;
887
+ }
888
+ .BonusCardAdditional ,.BonusCardTerms {
889
+ border: 1px solid var(--emfe-w-bonus-card-border,var(--emfe-w-color-gray-100, #E6E6E6));
890
+ background: var(--emfe-w-bonus-card-white,var(--emfe-w-color-white, #FFFFFF));
891
+ color: var(--emfe-w-bonus-card-black,var(--emfe-w-color-black, #000000));
892
+ padding: 12px;
893
+ border-radius: 4px;
894
+ position: relative;
895
+ margin-top:10px;
896
+ font-size: 16px;
897
+ transition: height 0.3s ease;
898
+ will-change: height;
899
+ &.active{
900
+ transition: height 0.3s ease;
901
+ }
902
+ }
903
+ .BonusCardAdditionalTitle, .BonusCardTermsTitle {
904
+ display: flex;
905
+ align-items: center;
906
+ text-indent: 10px;
907
+ }
908
+ .BonusCardAdditionalButton {
909
+ font-weight: 700;
910
+ font-size: 30px;
911
+ position: absolute;
912
+ top: 0;
913
+ right: 10px;
914
+ cursor: pointer;
915
+ }
916
+ .BonusCardTermsButton {
917
+ font-weight: 700;
918
+ font-size: 30px;
919
+ position: absolute;
920
+ top: 0;
921
+ right: 10px;
922
+ cursor: pointer;
923
+ }
924
+ .BonusCardTermsLink {
925
+ display: flex;
926
+ align-items: center;
927
+ color: #000;
928
+ text-indent: 10px;
929
+ cursor: pointer;
930
+ }
931
+ .BonusCardJoinError {
932
+ color: var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, #FF0000));
933
+ align-self: center;
934
+ }
935
+ .BonusCardJoinCountdown {
936
+ display: flex;
937
+ align-items: center;
938
+ text-indent: 10px;
939
+ font-size: 16px;
940
+ font-weight: 400;
941
+ }
942
+ .BonusCardJoinWrapper {
943
+ display: flex;
944
+ gap: 30px;
945
+ }
946
+ .BonusJoinButton {
947
+ background: var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, #53B65A));
948
+ outline: 5px solid var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, rgba(83, 182, 90, 0.3)));
949
+ border-radius: 9px;
950
+ border: 0;
951
+ width: 180px;
952
+ height: 38px;
953
+ font-size: 18px;
954
+ font-weight: 400;
955
+ text-align: center;
956
+ transition-duration: 0.5s;
957
+ box-sizing: border-box;
958
+ cursor: pointer;
959
+ color: var(--emfe-w-bonus-card-white,var(--emfe-w-color-white, #FFFFFF));
960
+ &[disabled] {
961
+ opacity: 0.3;
962
+ cursor: not-allowed;
963
+ }
964
+ &.ClaimBonusButtonMobile {
965
+ width: 100%;
966
+ }
967
+ &:hover {
968
+ background: var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, #25982D));
969
+ outline: 0;
970
+ }
971
+ &:active {
972
+ background: var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, #25982D));
973
+ outline-color: rgba(83, 182, 90, 0.6);
974
+ }
975
+ }
976
+ .BonusForfeitButton {
977
+ background: var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, #F32013));
978
+ outline: 5px solid var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, rgba(243, 32, 19, 0.3)));
979
+ border-radius: 9px;
980
+ border: 0;
981
+ width: 180px;
982
+ height: 38px;
983
+ font-size: 18px;
984
+ font-weight: 400;
985
+ text-align: center;
986
+ transition-duration: 0.5s;
987
+ box-sizing: border-box;
988
+ cursor: pointer;
989
+ color: var(--emfe-w-color-white, #FFFFFF);
990
+ &[disabled] {
991
+ opacity: 0.3;
992
+ cursor: not-allowed;
993
+ }
994
+ &.ClaimBonusButtonMobile {
995
+ width: 100%;
996
+ }
997
+ &:hover {
998
+ background: var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, #C70C00));
999
+ outline: 0;
1000
+ }
1001
+ &:active {
1002
+ background: var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, #C70C00));
1003
+ outline-color: var(--emfe-w-bonus-card-red,var(--emfe-w-color-red, rgba(243, 32, 19, 0.6)));
1004
+ }
1005
+ }
1006
+ .BonusCardActionCountdown {
1007
+ margin-bottom: 5px;
1008
+ }
1009
+ .BonusCardData {
1010
+ display: flex;
1011
+ }
1012
+ .BonusCardDataContent{
1013
+ flex:3;
1014
+ height: 260px;
1015
+ }
1016
+ .BonusCardFooter {
1017
+ height: 100px;
1018
+ &.Active {
1019
+ height: auto;
1020
+ }
1021
+ }
1022
+ .BonusCardProgress {
1023
+ flex: 1;
1024
+ max-width: 147px;
1025
+ .CircularProgress {
1026
+ display: flex;
1027
+ margin: 15px;
1028
+ position: relative;
1029
+ }
1030
+ .CircularProgressText {
1031
+ text-align: center;
1032
+ }
1033
+ --progress-track-color: var(--emfe-w-bonus-card-blue,var(--emfe-w-color-blue, #00AEEF));
1034
+ }
1035
+ .BonusActionWagering {
1036
+ display: flex;
1037
+ height: 100px;
1038
+ }
1039
+ .BonusWageringInfo {
1040
+ flex: 60%;
1041
+ }
1042
+ .BonusWageringButton {
1043
+ flex: 40%;
1044
+ }
1045
+ .TitleIcon {
1046
+ display: flex;
1047
+ max-width: 83px;
1048
+ min-width: 43px;
1049
+ height: 41px;
1050
+ }
1051
+ .CasinoIcon,.SportsIcon { fill: none;}
1052
+ .BonusGamesSlider {
1053
+ display: flex;
1054
+ }
1055
+ .SliderNavButton {
1056
+ border: 0px;
1057
+ width: 25px;
1058
+ display: flex;
1059
+ align-items: center;
1060
+ justify-content: center;
1061
+ svg{
1062
+ width: 20px;
1063
+ }
1064
+ &.Hide {
1065
+ display: none;
1066
+ }
1067
+ }
1068
+ .Main {
1069
+ max-width: 300px;
1070
+ overflow: hidden;
1071
+ }
1072
+ .Games {
1073
+ display: flex;
1074
+ transition: transform 0.4s ease-in-out;
1075
+ transform: translateX(0px);
1076
+ }
1077
+ .Game {
1078
+ min-width: 100px;
1079
+ height: 75px;
1080
+ margin: 0;
1081
+ color: var(--emfe-w-bonus-card-white,var(--emfe-w-color-white, #FFFFFF));
1082
+ display: flex;
1083
+ justify-content: center;
1084
+ align-items: center;
1085
+ font-weight: bold;
1086
+ font-size: 10rem;
1087
+ user-select: none;
1088
+ overflow: hidden;
1089
+ }
1090
+
1091
+ .PlayNowButton {
1092
+ position: absolute;
1093
+ background: var(--emfe-w-bonus-card-green,var(--emfe-w-color-green, #48952a));
1094
+ display: block;
1095
+ box-sizing: border-box;
1096
+ padding: 0.8rem .5rem;
1097
+ color: var(--emfe-w-bonus-card-white,var(--emfe-w-color-white, #FFFFFF));
1098
+ text-transform: uppercase;
1099
+ text-align: center;
1100
+ font-weight: 600;
1101
+ font-size: 0.7rem;
1102
+ cursor: pointer;
1103
+ transition: opacity .4s linear;
1104
+ opacity: 0;
1105
+ text-overflow: ellipsis;
1106
+ white-space: nowrap;
1107
+ overflow: hidden;
1108
+ }
1109
+
1110
+ .ItemHover {
1111
+ opacity: 1;
1112
+ }
1113
+ @media only screen and (max-width: 728px) {
1114
+ .BonusCard{
1115
+ font-size: 12px;
1116
+ }
1117
+ .BonusCardRowTitle {
1118
+ font-size: 14px;
1119
+ }
1120
+ .BonusCardTitleSub {
1121
+ font-size: 12px;
1122
+ }
1123
+ .BonusCardAction,.BonusCardActionContent, .BonusForfeitButton, .BonusJoinButton {
1124
+ width: 100%;
1125
+ }
1126
+ .BonusCardAction {
1127
+ margin-top: 10px;
1128
+ }
1129
+ .TitleIcon {
1130
+ max-width: 60px;
1131
+ min-width: 30px;
1132
+ height: 30px;
1133
+ }
1134
+ .BonusCardAdditional, .BonusCardTerms {
1135
+ font-size: 14px;
1136
+ }
1137
+ .BonusCardProgress .CircularProgress {
1138
+ margin: 10px 0;
1139
+ }
1140
+ .BonusCardFooter {
1141
+ height: auto;
1142
+ }
1143
+ .BonusCardDataContent {
1144
+ height: auto;
1145
+ }
1146
+ .BonusCardJoinWrapper {
1147
+ flex-direction: column;
1148
+ gap: 15px;
1149
+ }
1150
+ .BonusCardJoinCountdown {
1151
+ font-size: 12px;
1152
+ }
1153
+ }
1154
+ </style>