@everymatrix/casino-engagement-suite-tournament 1.44.0 → 1.45.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.
- package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/index.esm.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-0f4e94ab.entry.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-1bf11325.js +2 -0
- package/dist/casino-engagement-suite-tournament/p-5df3ac81.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +119 -807
- package/dist/cjs/casino-engagement-suite-tournament-1b738bb2.js +560 -0
- package/dist/cjs/casino-engagement-suite-tournament.cjs.js +16 -10
- package/dist/cjs/index-16d5d7c3.js +1642 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +17 -17
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +492 -582
- package/dist/collection/components/casino-engagement-suite-tournament/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/shared/GradientRoundedButton.js +6 -7
- package/dist/collection/shared/renderBar.js +11 -11
- package/dist/collection/utils/api.apdater.js +30 -30
- package/dist/collection/utils/translations.js +19 -19
- package/dist/collection/utils/types.js +9 -9
- package/dist/collection/utils/util.date.js +26 -26
- package/dist/collection/utils/utils.js +16 -16
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +119 -807
- package/dist/esm/casino-engagement-suite-tournament-d8471680.js +558 -0
- package/dist/esm/casino-engagement-suite-tournament.js +13 -10
- package/dist/esm/index-3962add4.js +1612 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +6 -12
- package/dist/stencil.config.dev.js +14 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +120 -123
- package/dist/types/components/casino-engagement-suite-tournament/index.d.ts +1 -0
- package/dist/types/components.d.ts +17 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/GradientRoundedButton.d.ts +3 -3
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/api.apdater.d.ts +2 -30
- package/dist/types/utils/translations.d.ts +35 -35
- package/dist/types/utils/types.d.ts +77 -77
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/casino-engagement-suite-tournament/p-023f3dc7.entry.js +0 -1
- package/dist/casino-engagement-suite-tournament/p-86ce7485.js +0 -1
- package/dist/cjs/index-e778ddd2.js +0 -1733
- package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
- package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
- package/dist/components/casino-engagement-suite-tournament.d.ts +0 -11
- package/dist/components/casino-engagement-suite-tournament.js +0 -716
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-4e611d33.js +0 -1704
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-tournament/.stencil/packages/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
|
@@ -1,830 +1,142 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-3962add4.js';
|
|
2
|
+
export { C as casino_engagement_suite_tournament } from './casino-engagement-suite-tournament-d8471680.js';
|
|
2
3
|
|
|
3
|
-
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-
|
|
4
|
+
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)}";
|
|
5
|
+
const CasinoEngagementSuiteProgressBarStyle0 = casinoEngagementSuiteProgressBarCss;
|
|
4
6
|
|
|
5
7
|
const CasinoEngagementSuiteProgressBar = class {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
fetch(url.href)
|
|
42
|
-
.then((res) => res.text())
|
|
43
|
-
.then((data) => {
|
|
44
|
-
cssFile.innerHTML = data;
|
|
45
|
-
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
46
|
-
})
|
|
47
|
-
.catch((err) => {
|
|
48
|
-
console.log('Error ', err);
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
componentDidRender() {
|
|
53
|
-
if (!this.limitStylingAppends && this.host) {
|
|
54
|
-
if (this.clientStyling)
|
|
55
|
-
this.setClientStyling();
|
|
56
|
-
if (this.clientStylingUrl)
|
|
57
|
-
this.setClientStylingURL();
|
|
58
|
-
this.limitStylingAppends = true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
getProgressBarClasses() {
|
|
62
|
-
return {
|
|
63
|
-
ProgressBar: true,
|
|
64
|
-
Completed: this.value === 100,
|
|
65
|
-
Disabled: this.disabled,
|
|
66
|
-
HidePercent: this.hidePercent || this.indeterminate
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
getProgressBarLineTemplate() {
|
|
70
|
-
if (this.indeterminate) {
|
|
71
|
-
return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
render() {
|
|
78
|
-
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
|
|
79
|
-
}
|
|
80
|
-
get host() { return getElement(this); }
|
|
81
|
-
};
|
|
82
|
-
CasinoEngagementSuiteProgressBar.style = casinoEngagementSuiteProgressBarCss;
|
|
83
|
-
|
|
84
|
-
/******************************************************************************
|
|
85
|
-
Copyright (c) Microsoft Corporation.
|
|
86
|
-
|
|
87
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
88
|
-
purpose with or without fee is hereby granted.
|
|
89
|
-
|
|
90
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
91
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
92
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
93
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
94
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
95
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
96
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
97
|
-
***************************************************************************** */
|
|
98
|
-
|
|
99
|
-
function __rest(s, e) {
|
|
100
|
-
var t = {};
|
|
101
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
102
|
-
t[p] = s[p];
|
|
103
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
104
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
105
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
106
|
-
t[p[i]] = s[p[i]];
|
|
107
|
-
}
|
|
108
|
-
return t;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
112
|
-
var e = new Error(message);
|
|
113
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
var Tab;
|
|
117
|
-
(function (Tab) {
|
|
118
|
-
Tab["Info"] = "Info";
|
|
119
|
-
Tab["Leaderboard"] = "Leaderboard";
|
|
120
|
-
Tab["Games"] = "Games";
|
|
121
|
-
})(Tab || (Tab = {}));
|
|
122
|
-
var Time;
|
|
123
|
-
(function (Time) {
|
|
124
|
-
Time["Starts"] = "Starts";
|
|
125
|
-
Time["Ends"] = "Ends";
|
|
126
|
-
})(Time || (Time = {}));
|
|
127
|
-
const localePostprocess = (translationText, props) => {
|
|
128
|
-
Object.keys(props).map(key => {
|
|
129
|
-
translationText = translationText.replace(`{${key}}`, props[key]);
|
|
130
|
-
});
|
|
131
|
-
return translationText;
|
|
132
|
-
};
|
|
133
|
-
const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'Join', Unjoin: 'Unjoin' }, Tab), Time), { TC: 'Terms & Conditions', ScoreCriteria: 'Score Criteria', MinimumBetCriteria: 'Minimum bet criteria', Place: 'place', Prizes: 'Rewards', LeaderboardDetails: 'Leaderboard Details', UnjoinDialog: {
|
|
134
|
-
Title: 'Quit Leaderboard?',
|
|
135
|
-
Description: 'Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?',
|
|
136
|
-
ButtonYes: 'Yes, I want to quit leaderboard',
|
|
137
|
-
ButtonNo: 'No, Stay on the leaderboard',
|
|
138
|
-
}, JoinDialog: {
|
|
139
|
-
Tile: 'Congratulations!',
|
|
140
|
-
Description: 'You have unlocked <span>{tournamentName}</span>! <br />Would you like to join?',
|
|
141
|
-
ButtonYes: 'Join',
|
|
142
|
-
ButtonNo: 'Not interested',
|
|
143
|
-
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.' });
|
|
144
|
-
|
|
145
|
-
const classnames = (...args) => {
|
|
146
|
-
let classnameArray = [];
|
|
147
|
-
args.map(arg => {
|
|
148
|
-
switch (typeof arg) {
|
|
149
|
-
case 'string':
|
|
150
|
-
classnameArray.push(arg);
|
|
151
|
-
break;
|
|
152
|
-
case 'object':
|
|
153
|
-
Object.keys(arg).map(k => {
|
|
154
|
-
if (arg[k]) {
|
|
155
|
-
classnameArray.push(k);
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
return classnameArray.join(' ');
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
var LeaderboardPage;
|
|
165
|
-
(function (LeaderboardPage) {
|
|
166
|
-
LeaderboardPage["Confirm"] = "Confirm";
|
|
167
|
-
LeaderboardPage["List"] = "List";
|
|
168
|
-
LeaderboardPage["Item"] = "Item";
|
|
169
|
-
})(LeaderboardPage || (LeaderboardPage = {}));
|
|
170
|
-
var TournamentState;
|
|
171
|
-
(function (TournamentState) {
|
|
172
|
-
TournamentState["Running"] = "Running";
|
|
173
|
-
TournamentState["Unstarted"] = "Unstarted";
|
|
174
|
-
TournamentState["Closed"] = "Closed";
|
|
175
|
-
TournamentState["Closing"] = "Closing";
|
|
176
|
-
})(TournamentState || (TournamentState = {}));
|
|
177
|
-
var DialogType;
|
|
178
|
-
(function (DialogType) {
|
|
179
|
-
DialogType["Unjoin"] = "Unjoin";
|
|
180
|
-
DialogType["Tip"] = "Tip";
|
|
181
|
-
})(DialogType || (DialogType = {}));
|
|
182
|
-
|
|
183
|
-
const GradientRoundedButton = (_a) => {
|
|
184
|
-
var { statedClasses, innerHTML } = _a, props = __rest(_a, ["statedClasses", "innerHTML"]);
|
|
185
|
-
const { isHollow, isPending } = statedClasses;
|
|
186
|
-
return (h("button", Object.assign({}, Object.assign({ class: classnames('GradientRoundedButton', 'GradientRounded', {
|
|
187
|
-
Hollow: isHollow || false,
|
|
188
|
-
Pending: isPending || false,
|
|
189
|
-
}) }, props)),
|
|
190
|
-
h("span", null, innerHTML)));
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
const iconClose = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg" });
|
|
194
|
-
const iconQuestion = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg" });
|
|
195
|
-
const iconEyeOpen = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg" });
|
|
196
|
-
const iconEyeClose = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg" });
|
|
197
|
-
const iconBack = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg" });
|
|
198
|
-
const iconReward = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/reward.svg" });
|
|
199
|
-
const iconTrophy = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg" });
|
|
200
|
-
|
|
201
|
-
const CloseBar = (props) => {
|
|
202
|
-
const { left, middle, right } = props;
|
|
203
|
-
const slots = {
|
|
204
|
-
left,
|
|
205
|
-
middle,
|
|
206
|
-
right,
|
|
207
|
-
};
|
|
208
|
-
const getFirstLetterUppercase = (str) => str
|
|
209
|
-
.split('')
|
|
210
|
-
.map((letter, index) => index === 0 ? letter.toUpperCase() : letter)
|
|
211
|
-
.join('');
|
|
212
|
-
return (h("div", { class: "WrapperBar" }, Object.keys(slots).map(slotKey => (h("div", { class: "WrapperBar" + getFirstLetterUppercase(slotKey) }, slots[slotKey] || '')))));
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
function formatDate(date) {
|
|
216
|
-
const options = {
|
|
217
|
-
year: 'numeric',
|
|
218
|
-
month: 'long',
|
|
219
|
-
day: 'numeric',
|
|
220
|
-
hour: '2-digit',
|
|
221
|
-
minute: '2-digit',
|
|
222
|
-
hour12: false
|
|
223
|
-
};
|
|
224
|
-
return date.toLocaleDateString('en-US', options).replace(' at', ',');
|
|
225
|
-
}
|
|
226
|
-
function addSeconds(date, seconds) {
|
|
227
|
-
const result = new Date(date);
|
|
228
|
-
result.setSeconds(result.getSeconds() + seconds);
|
|
229
|
-
return result;
|
|
230
|
-
}
|
|
231
|
-
function getDifference(startDate, endDate) {
|
|
232
|
-
const diffMs = Math.abs(endDate.getTime() - startDate.getTime()); // Difference in milliseconds
|
|
233
|
-
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24)); // Difference in days
|
|
234
|
-
const diffHours = Math.floor((diffMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); // Remaining hours
|
|
235
|
-
const diffMinutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60)); // Remaining minutes
|
|
236
|
-
// Format the output
|
|
237
|
-
const formattedDiff = `${String(diffDays).padStart(2, '0')}d:${String(diffHours).padStart(2, '0')}h:${String(diffMinutes).padStart(2, '0')}m`;
|
|
238
|
-
return formattedDiff;
|
|
239
|
-
}
|
|
240
|
-
function getProgress(startDate, endDate) {
|
|
241
|
-
return (100 * (new Date().getTime() - startDate.getTime()) / (endDate.getTime() - startDate.getTime())).toFixed(0);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
const tournamentAdapter = (tournamentApi) => {
|
|
245
|
-
const keysTime = [
|
|
246
|
-
'startTime',
|
|
247
|
-
'endTime',
|
|
248
|
-
'closeTime',
|
|
249
|
-
'exhibitionStartTime',
|
|
250
|
-
'exhibitionEndTime',
|
|
251
|
-
];
|
|
252
|
-
const tournament = {};
|
|
253
|
-
Object.keys(tournamentApi).map((key) => {
|
|
254
|
-
const value = tournamentApi[key];
|
|
255
|
-
switch (key) {
|
|
256
|
-
case 'games':
|
|
257
|
-
tournament[key] = value.items;
|
|
258
|
-
break;
|
|
259
|
-
default:
|
|
260
|
-
tournament[key] = keysTime.includes(key) ? new Date(value) : value;
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
return tournament;
|
|
264
|
-
};
|
|
265
|
-
const leaderboardsAdapter = (leaderboardRes) => {
|
|
266
|
-
let { item, items: leaderboards } = leaderboardRes;
|
|
267
|
-
if (!item) {
|
|
268
|
-
return leaderboards;
|
|
269
|
-
}
|
|
270
|
-
return leaderboards.map(leaderboard => {
|
|
271
|
-
if (item && item.userID === leaderboard.userID) {
|
|
272
|
-
return Object.assign(Object.assign({}, leaderboard), { isMe: true });
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
return leaderboard;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
281
|
-
|
|
282
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
283
|
-
return module = {
|
|
284
|
-
path: basedir,
|
|
285
|
-
exports: {},
|
|
286
|
-
require: function (path, base) {
|
|
287
|
-
return commonjsRequire();
|
|
288
|
-
}
|
|
289
|
-
}, fn(module, module.exports), module.exports;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function commonjsRequire () {
|
|
293
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
createCommonjsModule(function (module, exports) {
|
|
297
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e);}function s(t){return "function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e,n){t.insertBefore(e,n||null);}function r(t){t.parentNode&&t.parentNode.removeChild(t);}function c(t){const e={};for(const n of t)e[n.name]=n.value;return e}let a;function d(t){a=t;}const u=[],f=[];let p=[];const h=[],$=Promise.resolve();let m=!1;function g(t){p.push(t);}
|
|
298
|
-
// flush() calls callbacks in this order:
|
|
299
|
-
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
300
|
-
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
301
|
-
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
302
|
-
// for afterUpdates called during the initial onMount, which are called in
|
|
303
|
-
// reverse order: children before parents.
|
|
304
|
-
// Since callbacks might update component values, which could trigger another
|
|
305
|
-
// call to flush(), the following steps guard against this:
|
|
306
|
-
// 1. During beforeUpdate, any updated components will be added to the
|
|
307
|
-
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
308
|
-
// the flush index is kept outside the function, the reentrant call will pick
|
|
309
|
-
// up where the earlier call left off and go through all dirty components. The
|
|
310
|
-
// current_component value is saved and restored so that the reentrant call will
|
|
311
|
-
// not interfere with the "parent" flush() call.
|
|
312
|
-
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
313
|
-
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
314
|
-
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
315
|
-
// function, guarantees this behavior.
|
|
316
|
-
const y=new Set;let b=0;// Do *not* move this inside the flush() function
|
|
317
|
-
function x(){
|
|
318
|
-
// Do not reenter flush while dirty components are updated, as this can
|
|
319
|
-
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
320
|
-
// Reentrancy is ok afterwards for bindings etc.
|
|
321
|
-
if(0!==b)return;const t=a;do{
|
|
322
|
-
// first, call beforeUpdate functions
|
|
323
|
-
// and update components
|
|
324
|
-
try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
|
|
325
|
-
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
326
|
-
throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
|
|
327
|
-
// then, once components are updated, call
|
|
328
|
-
// afterUpdate functions. This may cause
|
|
329
|
-
// subsequent updates...
|
|
330
|
-
for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
|
|
331
|
-
// ...so guard against infinite loops
|
|
332
|
-
y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
|
|
333
|
-
/**
|
|
334
|
-
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
335
|
-
*/const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
336
|
-
// TODO null out other refs, including component.$$ (but need to
|
|
337
|
-
// preserve final state?)
|
|
338
|
-
n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
|
|
339
|
-
// state
|
|
340
|
-
props:p,update:t,not_equal:f,bound:n(),
|
|
341
|
-
// lifecycle
|
|
342
|
-
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
|
|
343
|
-
// everything else
|
|
344
|
-
callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
|
|
345
|
-
// `false` as a special case of no DOM component
|
|
346
|
-
y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
|
|
347
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
348
|
-
y.fragment&&y.fragment.l(t),t.forEach(r);}else
|
|
349
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
350
|
-
y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
|
|
351
|
-
// onMount happens before the initial afterUpdate
|
|
352
|
-
g((()=>{const n=t.$$.on_mount.map(e).filter(s);
|
|
353
|
-
// if the component was destroyed immediately
|
|
354
|
-
// it will update the `$$.on_destroy` reference to `null`.
|
|
355
|
-
// the destructured on_destroy may still reference to the old array
|
|
356
|
-
t.$$.on_destroy?t.$$.on_destroy.push(...n):
|
|
357
|
-
// Edge case - component was destroyed immediately,
|
|
358
|
-
// most likely as a result of a binding initialising
|
|
359
|
-
i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
|
|
360
|
-
/* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
|
|
361
|
-
function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
|
|
362
|
-
/*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
|
|
363
|
-
/*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
|
|
364
|
-
// @ts-ignore todo: improve typings
|
|
365
|
-
for(const t in this.$$.slotted)
|
|
366
|
-
// @ts-ignore todo: improve typings
|
|
367
|
-
this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
|
|
368
|
-
// TODO should this delegate to addEventListener?
|
|
369
|
-
if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
|
|
370
|
-
//# sourceMappingURL=general-animation-loading.js.map
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
const casinoEngagementSuiteTournamentCss = ".GradientRounded {\n display: block;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);\n color: rgba(30, 22, 56, 1);\n \n position: relative;\n border-radius: 16px;\n\n &.Hollow {\n background: rgba(30, 22, 56, 1);\n color: #FFFFFF;\n &::before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: 15px;\n border: 1px solid transparent;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;\n -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: destination-out;\n mask-composite: exclude;\n }\n\n }\n}\n\n.GradientRoundedButton {\n border: none;\n padding: 7px;\n \n height: 32px;\n width: 100%;\n \n font-size: 14px;\n font-weight: 700;\n line-height: 17.07px;\n text-align: center;\n \n transition: .5s opacity;\n\n cursor: pointer;\n &.Pending {\n cursor: not-allowed;\n opacity: .3;\n }\n\n &.Hollow {\n \n span {\n background: -webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n }\n}\n.Wrapper {\n height: 100%;\n position: relative;\n color: var(--emw--color-typography, #FFFFFF);\n display: flex;\n background-color: var(--emw--color-background, #1d1537);\n flex-direction: column;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.WrapperContent {\n padding-bottom: 20px;\n transition: 0.5s filter;\n}\n.WrapperContent.faded {\n filter: brightness(53.3333333333%);\n}\n\n.WrapperBar {\n display: flex;\n width: 100%;\n padding: 12px 8px 8px;\n}\n\n.WrapperBarLeft, .WrapperBarRight {\n cursor: pointer;\n}\n\n.WrapperBarMiddle {\n flex-grow: 1;\n text-align: center;\n font-size: 16px;\n line-height: 16px;\n font-weight: 500;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n\n:host {\n display: block;\n font-size: 12px;\n font-family: Inter;\n}\n\n.Row {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.LeaderboardsItem {\n margin: 10px 0;\n border: 1px solid #403956;\n border-radius: 16px;\n}\n.LeaderboardsItem.Hollow {\n border-color: transparent;\n}\n\n.LeaderboardsItemContainer {\n padding-top: 16px;\n}\n\n.Info {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.TimeContainer {\n margin: 24px 0;\n padding: 0 20px;\n}\n.TimeContainer .Time {\n display: flex;\n justify-content: space-between;\n font-size: 11px;\n align-items: center;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n.TimeContainer .Time button {\n font-size: 12px;\n height: 20px;\n padding: 0;\n}\n.TimeContainer .Time button::before {\n inset: inherit;\n border: 0;\n}\n\n.ShowInfo {\n margin: 24px 0;\n padding: 0 20px;\n cursor: pointer;\n color: #666178;\n}\n.ShowInfo p {\n display: flex;\n gap: 4px;\n}\n\n.TitleContainer {\n display: flex;\n justify-content: space-between;\n margin: 24px 0;\n padding: 0 20px;\n margin-top: 0;\n gap: 10px;\n font-family: Montserrat;\n}\n.TitleContainer .GradientRoundedButton {\n width: 120px;\n}\n\n.TabsContainer {\n margin: 24px 0;\n padding: 0 20px;\n margin: 0 20px;\n padding: 0;\n border-bottom: 1px solid #575757;\n}\n\n.Tabs {\n display: flex;\n justify-content: space-between;\n justify-content: start;\n font-size: 12px;\n margin-bottom: -1px;\n}\n.Tabs > div {\n padding: 10px;\n color: #666178;\n cursor: pointer;\n}\n.Tabs > div.active {\n color: var(--emw--color-typography, #FFF);\n border-bottom: 2px solid var(--emw--color-typography, #FFF);\n}\n\n.Title {\n font-size: 16px;\n font-weight: 700;\n line-height: 19.5px;\n text-align: left;\n word-break: break-word;\n}\n\n.TC {\n margin-top: 12px;\n}\n.TC a {\n color: #59d1ff;\n}\n\n.Criterias {\n margin: 12px 0;\n}\n.Criterias span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.ResultPrize {\n margin: 24px 0;\n padding: 0 20px;\n}\n.ResultPrize span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.Prizes {\n margin: 24px 0;\n padding: 0 20px;\n}\n.Prizes .PrizesText {\n margin-left: 3px;\n font-weight: 600;\n}\n.Prizes .PrizesHeader {\n align-items: center;\n display: flex;\n}\n.Prizes .PrizesHeader img {\n width: 12px;\n}\n.Prizes .Prize {\n margin: 8px 0;\n}\n.Prizes .Prize .PrizeText {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.Leaderboards {\n width: 100%;\n text-align: center;\n border-collapse: collapse;\n}\n.Leaderboards td {\n opacity: 0.6;\n padding: 20px 5px;\n}\n.Leaderboards td:first-child {\n padding-left: 20px;\n}\n.Leaderboards td:last-child {\n padding-right: 20px;\n}\n.Leaderboards .LeaderboardName {\n color: var(--emw--color-typography, #FFF);\n opacity: 1;\n}\n.Leaderboards tr.isMe {\n background: rgba(0, 0, 0, 0.2);\n}\n.Leaderboards tr.isMe .LeaderboardRank span {\n padding: 0px 3px;\n opacity: 1;\n border: 1px solid var(--emw--color-primary, #ffd62f);\n border-radius: 11px;\n}\n.Leaderboards tr.isMe td {\n color: var(--emw--color-primary, #ffd62f);\n}\n\n.Games {\n margin: 24px 0;\n padding: 0 20px;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-evenly;\n gap: 4px 7.25px;\n}\n.Games img {\n width: 60px;\n}\n\ndialog {\n position: absolute;\n top: 30px;\n width: 100%;\n height: 100%;\n background: transparent;\n border: 0;\n padding: 0;\n color: var(--emw--color-typography, #FFFFFF);\n}\ndialog > div {\n margin: 32px;\n border-radius: 8px;\n background: var(--emw--color-background, #1d1537);\n border: 1px solid #403956;\n align-items: center;\n}\n\n.DialogContentUnjoin {\n padding: 32px;\n padding-top: 10px;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.DialogContentUnjoinTitle {\n font-family: Montserrat;\n font-size: 20px;\n font-weight: 600;\n line-height: 24.38px;\n text-align: center;\n}\n\n.DialogContentUnjoinDescription {\n color: var(--emw--color-secondary, #bbb9c3);\n margin-bottom: 30px;\n}\n\n.Tip {\n padding: 32px;\n padding-top: 10px;\n color: var(--emw--color-secondary, #bbb9c3);\n font-size: 14px;\n}\n\n.PageConfirmContainer {\n text-align: center;\n width: 80%;\n margin: 0 auto;\n}\n\n.PageConfirm {\n padding: 40px 32px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.PageConfirm .Title {\n font-size: 20px;\n text-align: center;\n}\n.PageConfirm .Description {\n color: var(--emw--color-secondary, #bbb9c3);\n font-weight: 400;\n}\n.PageConfirm .Description span {\n color: var(--emw--color-typography, #FFF);\n font-weight: 600;\n}\n\n.PageConfirmButtonsGroup {\n width: 150px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}";
|
|
374
|
-
|
|
375
|
-
const CasinoEngagementSuiteTournament = class {
|
|
376
|
-
constructor(hostRef) {
|
|
377
|
-
registerInstance(this, hostRef);
|
|
378
|
-
this.close = createEvent(this, "close", 7);
|
|
379
|
-
/**
|
|
380
|
-
* Language
|
|
381
|
-
*/
|
|
382
|
-
this.language = 'en';
|
|
383
|
-
/**
|
|
384
|
-
* Client custom styling via string
|
|
385
|
-
*/
|
|
386
|
-
this.clientStyling = '';
|
|
387
|
-
/**
|
|
388
|
-
* Client custom styling via url
|
|
389
|
-
*/
|
|
390
|
-
this.clientStylingUrl = '';
|
|
391
|
-
/**
|
|
392
|
-
* Translation via url
|
|
393
|
-
*/
|
|
394
|
-
this.translationUrl = '';
|
|
395
|
-
this.tab = Tab.Info;
|
|
396
|
-
this.locale = TRANSLATIONS;
|
|
397
|
-
this.tournamentItem = undefined;
|
|
398
|
-
this.tournamentList = undefined;
|
|
399
|
-
this.leaderboards = [];
|
|
400
|
-
this.isActionJoinPending = false;
|
|
401
|
-
this.isDialogOpen = false;
|
|
402
|
-
this.isShowInfo = false;
|
|
403
|
-
this.page = LeaderboardPage.List;
|
|
404
|
-
this.tournamentInDialog = undefined;
|
|
405
|
-
this.dialog = {
|
|
406
|
-
isOpen: false,
|
|
407
|
-
type: undefined,
|
|
408
|
-
data: undefined,
|
|
409
|
-
};
|
|
410
|
-
this.time = 0;
|
|
411
|
-
this.onClickConfirmJoin = () => {
|
|
412
|
-
this.actionJoin(this.tournamentItem);
|
|
413
|
-
this.nextPage = LeaderboardPage.List;
|
|
414
|
-
};
|
|
415
|
-
this.onClickConfirmUnjoin = () => {
|
|
416
|
-
this.close.emit();
|
|
417
|
-
};
|
|
418
|
-
this.onClickDialogUnjoin = () => {
|
|
419
|
-
this.actionJoin(this.dialog.data);
|
|
420
|
-
this.closeDialog();
|
|
421
|
-
};
|
|
422
|
-
this.onClickDialogJoin = () => {
|
|
423
|
-
this.closeDialog();
|
|
424
|
-
};
|
|
425
|
-
this.onClickBarInLayout = () => {
|
|
426
|
-
this.close.emit();
|
|
427
|
-
};
|
|
428
|
-
this.onClickBarInLayoutDialog = () => {
|
|
429
|
-
this.closeDialog();
|
|
430
|
-
};
|
|
431
|
-
this.onClickShowInfo = () => {
|
|
432
|
-
this.isShowInfo = !this.isShowInfo;
|
|
433
|
-
};
|
|
434
|
-
this.onClickBarTip = () => {
|
|
435
|
-
this.openDialog(DialogType.Tip);
|
|
436
|
-
};
|
|
437
|
-
this.onClickBarBack = () => {
|
|
438
|
-
this.setPage(LeaderboardPage.List);
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
setTimeInterval() {
|
|
442
|
-
this.timeHolder = setInterval(() => {
|
|
443
|
-
if (this.tournamentList || this.tournamentItem) {
|
|
444
|
-
this.time += 1;
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
this.time = 0;
|
|
448
|
-
}
|
|
449
|
-
}, 1000);
|
|
450
|
-
}
|
|
451
|
-
updateTournamentListByItem(tournament) {
|
|
452
|
-
this.tournamentList = this.tournamentList.map((_tournament) => {
|
|
453
|
-
if (_tournament.id === tournament.id) {
|
|
454
|
-
return tournamentAdapter(tournament);
|
|
455
|
-
}
|
|
456
|
-
else {
|
|
457
|
-
return _tournament;
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
handleEvent(e) {
|
|
462
|
-
const _a = e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
463
|
-
switch (type) {
|
|
464
|
-
case 'ShowLeaderboardRewardModal': {
|
|
465
|
-
const { tournament } = rest;
|
|
466
|
-
this.setPage(LeaderboardPage.Confirm, { tournament: tournamentAdapter(tournament) });
|
|
467
|
-
postMessage({ type: 'BarLeaderboardsClick' });
|
|
468
|
-
break;
|
|
469
|
-
}
|
|
470
|
-
case 'UpdateTournamentsItemRes': {
|
|
471
|
-
const tournamentNew = tournamentAdapter(rest.data.item);
|
|
472
|
-
this.tournamentItem = tournamentNew;
|
|
473
|
-
this.updateTournamentListByItem(tournamentNew);
|
|
474
|
-
break;
|
|
475
|
-
}
|
|
476
|
-
case 'UpdateLeaderboardsRes': {
|
|
477
|
-
this.leaderboards = leaderboardsAdapter(rest.data);
|
|
478
|
-
break;
|
|
479
|
-
}
|
|
480
|
-
case 'JoinTournamentRes':
|
|
481
|
-
case 'UnjoinTournamentRes':
|
|
482
|
-
const { success } = rest;
|
|
483
|
-
if (success) {
|
|
484
|
-
this.tournamentItem = Object.assign(Object.assign({}, this.tournamentItem), { playerEnrolled: !!!this.tournamentItem.playerEnrolled });
|
|
485
|
-
switch (this.page) {
|
|
486
|
-
case LeaderboardPage.Item: {
|
|
487
|
-
break;
|
|
488
|
-
}
|
|
489
|
-
case LeaderboardPage.List: {
|
|
490
|
-
this.updateTournamentListByItem(this.tournamentItem);
|
|
491
|
-
break;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
if (this.nextPage) {
|
|
496
|
-
this.setPage(this.nextPage);
|
|
497
|
-
this.nextPage = undefined;
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.setClientStyling = () => {
|
|
11
|
+
let sheet = document.createElement('style');
|
|
12
|
+
sheet.innerHTML = this.clientStyling;
|
|
13
|
+
this.host.prepend(sheet);
|
|
14
|
+
};
|
|
15
|
+
this.setClientStylingURL = () => {
|
|
16
|
+
let url = new URL(this.clientStylingUrl);
|
|
17
|
+
let cssFile = document.createElement('style');
|
|
18
|
+
fetch(url.href)
|
|
19
|
+
.then((res) => res.text())
|
|
20
|
+
.then((data) => {
|
|
21
|
+
cssFile.innerHTML = data;
|
|
22
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
23
|
+
})
|
|
24
|
+
.catch((err) => {
|
|
25
|
+
console.log('Error ', err);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
this.value = 0;
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
this.hidePercent = false;
|
|
31
|
+
this.indeterminate = false;
|
|
32
|
+
this.clientStyling = '';
|
|
33
|
+
this.clientStylingUrl = '';
|
|
34
|
+
this.limitStylingAppends = false;
|
|
35
|
+
}
|
|
36
|
+
componentDidRender() {
|
|
37
|
+
if (!this.limitStylingAppends && this.host) {
|
|
38
|
+
if (this.clientStyling)
|
|
39
|
+
this.setClientStyling();
|
|
40
|
+
if (this.clientStylingUrl)
|
|
41
|
+
this.setClientStylingURL();
|
|
42
|
+
this.limitStylingAppends = true;
|
|
498
43
|
}
|
|
499
|
-
this.isActionJoinPending = false;
|
|
500
|
-
break;
|
|
501
44
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
connectedCallback() {
|
|
512
|
-
this.setTimeInterval();
|
|
513
|
-
}
|
|
514
|
-
disconnectedCallback() {
|
|
515
|
-
clearInterval(this.timeHolder);
|
|
516
|
-
}
|
|
517
|
-
actionJoin(tournament) {
|
|
518
|
-
if (this.isActionJoinPending)
|
|
519
|
-
return;
|
|
520
|
-
this.isActionJoinPending = true;
|
|
521
|
-
try {
|
|
522
|
-
if (tournament.playerEnrolled) {
|
|
523
|
-
this.messageSender.UnjoinTournamentReq(tournament);
|
|
524
|
-
}
|
|
525
|
-
else {
|
|
526
|
-
this.messageSender.JoinTournamentReq(tournament);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
catch (e) {
|
|
530
|
-
console.log('error', e);
|
|
531
|
-
return;
|
|
45
|
+
getProgressBarClasses() {
|
|
46
|
+
return {
|
|
47
|
+
ProgressBar: true,
|
|
48
|
+
Completed: this.value === 100,
|
|
49
|
+
Disabled: this.disabled,
|
|
50
|
+
HidePercent: this.hidePercent || this.indeterminate
|
|
51
|
+
};
|
|
532
52
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
TournamentState.Closed,
|
|
537
|
-
TournamentState.Closing
|
|
538
|
-
].includes(tournament.state);
|
|
539
|
-
}
|
|
540
|
-
setPage(page, metaData) {
|
|
541
|
-
switch (page) {
|
|
542
|
-
case LeaderboardPage.Confirm:
|
|
543
|
-
case LeaderboardPage.Item:
|
|
544
|
-
this.tournamentItem = metaData.tournament;
|
|
545
|
-
if (!this.tournamentItem) {
|
|
546
|
-
this.messageSender.UpdateTournamentsItemReq(metaData.tournament);
|
|
53
|
+
getProgressBarLineTemplate() {
|
|
54
|
+
if (this.indeterminate) {
|
|
55
|
+
return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
547
56
|
}
|
|
548
|
-
|
|
549
|
-
|
|
57
|
+
else {
|
|
58
|
+
return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
|
|
550
59
|
}
|
|
551
|
-
break;
|
|
552
|
-
}
|
|
553
|
-
this.tab = Tab.Info;
|
|
554
|
-
this.page = page;
|
|
555
|
-
}
|
|
556
|
-
renderPage() {
|
|
557
|
-
switch (this.page) {
|
|
558
|
-
case LeaderboardPage.Confirm: return this.renderPageConfirm();
|
|
559
|
-
case LeaderboardPage.Item: return this.renderPageLeaderboardItem();
|
|
560
|
-
case LeaderboardPage.List: return this.renderPageLeaderboardList();
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
render() {
|
|
564
|
-
return (h(Host, null, h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
|
|
565
|
-
// @ts-ignore
|
|
566
|
-
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderPage()));
|
|
567
|
-
}
|
|
568
|
-
onClickListItemChangePage(tournament) {
|
|
569
|
-
this.setPage(LeaderboardPage.Item, { tournament });
|
|
570
|
-
}
|
|
571
|
-
onClickItemJoin(tournament, e) {
|
|
572
|
-
e.stopPropagation();
|
|
573
|
-
if (tournament.playerEnrolled) {
|
|
574
|
-
this.openDialog(DialogType.Unjoin, tournament);
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
this.actionJoin(tournament);
|
|
578
|
-
this.tournamentItem = tournament;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
onClickTab(tab) {
|
|
582
|
-
this.tab = tab;
|
|
583
|
-
switch (tab) {
|
|
584
|
-
case Tab.Leaderboard:
|
|
585
|
-
this.leaderboards = undefined;
|
|
586
|
-
this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);
|
|
587
|
-
break;
|
|
588
|
-
case Tab.Games:
|
|
589
|
-
this.messageSender.UpdateTournamentsItemReq(this.tournamentItem);
|
|
590
|
-
break;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
renderPageLeaderboardList() {
|
|
594
|
-
var _a;
|
|
595
|
-
if (!this.tournamentList) {
|
|
596
|
-
this.tournamentList = (_a = this.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map(item => tournamentAdapter(item));
|
|
597
|
-
return h("general-animation-loading", null);
|
|
598
|
-
}
|
|
599
|
-
const { locale } = this;
|
|
600
|
-
if (this.tournamentList.length) {
|
|
601
|
-
return this.renderLeaderboardContainer(h(Fragment, null, h("div", { class: "Leaderboards Row" }, this.tournamentList.map(_tournament => (h("div", { class: classnames("LeaderboardsItem", _tournament.playerEnrolled ? ' GradientRounded Hollow' : ''), onClick: this.onClickListItemChangePage.bind(this, _tournament) }, h("div", { class: "LeaderboardsItemContainer" }, this.renderTitleContainer(_tournament), this.renderTimeBar(_tournament))))))));
|
|
602
60
|
}
|
|
603
|
-
|
|
604
|
-
|
|
61
|
+
render() {
|
|
62
|
+
return h("div", { key: 'ecce3a26a92d2e090c1db84bdc1bdbeb505080ed', class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { key: '649fe1103d222200f2a1ad3b5967e37da1f1ab3d', class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { key: '49dc180eedd823f0027f75099813fb9d91bcd938', name: "Title" }, h("div", { key: 'e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5' })), h("slot", { key: '3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e', name: "Percent" }, h("div", { key: '6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad', class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { key: '141106e77caad7b04bb199f911e87c0c6f0adc2d', class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
|
|
605
63
|
}
|
|
606
|
-
|
|
607
|
-
renderPageConfirm() {
|
|
608
|
-
if (!this.tournamentItem)
|
|
609
|
-
return h("general-animation-loading", null);
|
|
610
|
-
const tournamentName = this.tournamentItem.nameOrTitle;
|
|
611
|
-
const { locale } = this;
|
|
612
|
-
return (h("div", { class: "PageConfirmContainer" }, h("div", { class: "GradientRounded Hollow PageConfirm" }, h("div", null, iconTrophy), h("div", { class: "Title" }, locale.JoinDialog.Tile), h("div", { class: "Description", innerHTML: localePostprocess(locale.JoinDialog.Description, { tournamentName }) }), h("div", { class: "PageConfirmButtonsGroup" }, h(GradientRoundedButton, Object.assign({}, {
|
|
613
|
-
statedClasses: {
|
|
614
|
-
isPending: this.isActionJoinPending,
|
|
615
|
-
},
|
|
616
|
-
onClick: this.onClickConfirmJoin,
|
|
617
|
-
innerHTML: locale.JoinDialog.ButtonYes,
|
|
618
|
-
})), h(GradientRoundedButton, Object.assign({}, {
|
|
619
|
-
statedClasses: {
|
|
620
|
-
isPending: this.isActionJoinPending,
|
|
621
|
-
isHollow: true,
|
|
622
|
-
},
|
|
623
|
-
onClick: this.onClickConfirmUnjoin,
|
|
624
|
-
innerHTML: locale.JoinDialog.ButtonNo,
|
|
625
|
-
}))))));
|
|
626
|
-
}
|
|
627
|
-
renderPageLeaderboardItem() {
|
|
628
|
-
if (!this.tournamentItem)
|
|
629
|
-
return h("general-animation-loading", null);
|
|
630
|
-
return this.renderLeaderboardContainer(h(Fragment, null, this.renderTitleContainer(this.tournamentItem), this.renderTabs(), this.renderTabbedContent()));
|
|
631
|
-
}
|
|
632
|
-
renderDialogContent() {
|
|
633
|
-
switch (this.dialog.type) {
|
|
634
|
-
case DialogType.Unjoin:
|
|
635
|
-
return this.renderDialogContentUnjoin();
|
|
636
|
-
case DialogType.Tip:
|
|
637
|
-
return (h("div", { class: "Tip" }, this.locale.Tip));
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
renderDialogContentUnjoin() {
|
|
641
|
-
const { locale } = this;
|
|
642
|
-
return (h("div", { class: "DialogContentUnjoin" }, h("div", { class: "DialogContentUnjoinTitle" }, locale.UnjoinDialog.Title), h("div", { class: "DialogContentUnjoinDescription", innerHTML: locale.UnjoinDialog.Description }), h(GradientRoundedButton, Object.assign({}, {
|
|
643
|
-
statedClasses: {
|
|
644
|
-
isPending: this.isActionJoinPending,
|
|
645
|
-
},
|
|
646
|
-
onClick: this.onClickDialogUnjoin,
|
|
647
|
-
innerHTML: locale.UnjoinDialog.ButtonYes,
|
|
648
|
-
})), h(GradientRoundedButton, Object.assign({}, {
|
|
649
|
-
statedClasses: {
|
|
650
|
-
isHollow: true,
|
|
651
|
-
isPending: this.isActionJoinPending,
|
|
652
|
-
},
|
|
653
|
-
onClick: this.onClickDialogJoin,
|
|
654
|
-
innerHTML: locale.UnjoinDialog.ButtonNo,
|
|
655
|
-
}))));
|
|
656
|
-
}
|
|
657
|
-
renderTitleContainer(tournament) {
|
|
658
|
-
const { locale } = this;
|
|
659
|
-
return (h("div", { class: "TitleContainer" }, h("div", { class: "Title" }, tournament.nameOrTitle), tournament.state !== TournamentState.Closed && (h("div", null, h(GradientRoundedButton, Object.assign({}, {
|
|
660
|
-
statedClasses: {
|
|
661
|
-
isHollow: tournament.playerEnrolled,
|
|
662
|
-
isPending: this.isActionJoinPending,
|
|
663
|
-
},
|
|
664
|
-
onClick: this.onClickItemJoin.bind(this, tournament),
|
|
665
|
-
innerHTML: tournament.playerEnrolled ? locale.Unjoin : locale.Join,
|
|
666
|
-
}))))));
|
|
667
|
-
}
|
|
668
|
-
renderTabbedContent() {
|
|
669
|
-
switch (this.tab) {
|
|
670
|
-
case Tab.Info: return this.renderInfo();
|
|
671
|
-
case Tab.Leaderboard: return this.renderLeaderboard();
|
|
672
|
-
case Tab.Games: return this.renderGames();
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
renderGames() {
|
|
676
|
-
var _a;
|
|
677
|
-
return (h("div", { class: "Games" }, (_a = this.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map(game => (h("div", null, h("img", { src: game.defaultThumbnail, alt: "" }))))));
|
|
678
|
-
}
|
|
679
|
-
renderLeaderboard() {
|
|
680
|
-
if (!this.leaderboards)
|
|
681
|
-
return h("general-animation-loading", null);
|
|
682
|
-
if (!this.leaderboards.length)
|
|
683
|
-
return '';
|
|
684
|
-
return (h("table", { class: "Leaderboards" }, this.leaderboards.map(leaderboard => (h("tr", { class: classnames({ isMe: leaderboard.isMe }) }, h("td", { class: "LeaderboardRank" }, h("span", null, leaderboard.rank)), h("td", { class: "LeaderboardName" }, leaderboard.shortName), h("td", { class: "LeaderboardScore" }, leaderboard.score), h("td", { class: "LeaderboardPrize" }, leaderboard.prizeName))))));
|
|
685
|
-
}
|
|
686
|
-
renderTabs() {
|
|
687
|
-
const { locale, tab } = this;
|
|
688
|
-
return (h("div", { class: "TabsContainer" }, h("div", { class: "Tabs" }, Object.keys(Tab).map((_tab) => (h("div", Object.assign({}, {
|
|
689
|
-
class: classnames({ active: tab === _tab }),
|
|
690
|
-
onClick: this.onClickTab.bind(this, _tab)
|
|
691
|
-
}), locale[_tab]))))));
|
|
692
|
-
}
|
|
693
|
-
renderTimeBar(tournament) {
|
|
694
|
-
return (h("section", { class: "TimeContainer" }, h("div", { class: 'Time' }, tournament.playerEnrolled ? (h(Fragment, null, h("div", null, getDifference(addSeconds(tournament.startTime, this.time), tournament.endTime)), h("div", null, h(GradientRoundedButton, { statedClasses: {
|
|
695
|
-
isHollow: true,
|
|
696
|
-
isPendding: false,
|
|
697
|
-
}, innerHTML: `${getProgress(tournament.startTime, tournament.endTime)}%` })))) : (h(Fragment, null, h("div", null, formatDate(tournament.startTime)), h("div", null, formatDate(tournament.endTime))))), h("casino-engagement-suite-progress-bar", { value: Number(getProgress(tournament.startTime, tournament.endTime)), "hide-percent": true })));
|
|
698
|
-
}
|
|
699
|
-
renderInfo() {
|
|
700
|
-
var _a, _b;
|
|
701
|
-
const { locale, tournamentItem: tournament, isShowInfo } = this;
|
|
702
|
-
return (h("div", { class: "InfoContainer" }, this.renderTimeBar(tournament), (h("section", { class: "ShowInfo", onClick: this.onClickShowInfo }, h("p", null, h("span", null, isShowInfo ? iconEyeClose : iconEyeOpen), h("span", null, locale.LeaderboardDetails)))), isShowInfo && (h("section", { class: "Info" }, h("div", null, tournament.description), h("div", { class: "Criterias" }, h("div", null, locale.ScoreCriteria, ": ", h("span", null, tournament.scoreCriteria)), h("div", null, locale.MinimumBetCriteria, ": ", h("span", null, tournament.minBetCount))), h("div", { class: "TC" }, h("a", { href: tournament.termsUrl, target: '_blank' }, locale.TC)))), this.isTournamentClosed(this.tournamentItem) && ((_a = this.leaderboards) === null || _a === void 0 ? void 0 : _a.find(l => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, this.getResultPrize((_b = this.leaderboards) === null || _b === void 0 ? void 0 : _b.find(l => l.isMe))) })), h("section", { class: "Prizes" }, h("div", { class: "PrizesHeader" }, iconReward, h("span", { class: "PrizesText" }, locale.Prizes)), tournament.prizes.map((prize, index) => (h("div", { class: "Prize" }, index + 1, " ", locale.Place, ": ", h("span", { class: "PrizeText" }, prize.name)))))));
|
|
703
|
-
}
|
|
704
|
-
getResultPrize(leaderboard) {
|
|
705
|
-
return {
|
|
706
|
-
prize: leaderboard.prizeName,
|
|
707
|
-
place: leaderboard.rank,
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
|
-
renderCloseBarInLayout() {
|
|
711
|
-
const { left, middle } = this.getWrapperBarData();
|
|
712
|
-
return (h(CloseBar, Object.assign({}, { left, middle,
|
|
713
|
-
right: (h("span", Object.assign({}, { onClick: this.onClickBarInLayout }), iconClose))
|
|
714
|
-
})));
|
|
715
|
-
}
|
|
716
|
-
renderCloseBarInLayoutDialog() {
|
|
717
|
-
return (h(CloseBar, Object.assign({}, {
|
|
718
|
-
right: (h("span", Object.assign({}, { onClick: this.onClickBarInLayoutDialog }), iconClose))
|
|
719
|
-
})));
|
|
720
|
-
}
|
|
721
|
-
renderLeaderboardContainer(render) {
|
|
722
|
-
const { dialog: { isOpen } } = this;
|
|
723
|
-
return (h("div", { class: "Wrapper" }, h("div", { class: classnames("WrapperContent", { faded: isOpen }) }, this.renderCloseBarInLayout(), h("div", { class: "Root" }, h("div", { class: "Main" }, render))), h("div", { class: "WrapperUtil" }, h("dialog", { open: isOpen }, h("div", null, this.renderCloseBarInLayoutDialog(), isOpen && this.renderDialogContent())))));
|
|
724
|
-
}
|
|
725
|
-
getWrapperBarData() {
|
|
726
|
-
const { page, locale } = this;
|
|
727
|
-
switch (page) {
|
|
728
|
-
case LeaderboardPage.List:
|
|
729
|
-
return {
|
|
730
|
-
left: h("span", { onClick: this.onClickBarTip }, iconQuestion),
|
|
731
|
-
middle: locale.Leaderboards
|
|
732
|
-
};
|
|
733
|
-
case LeaderboardPage.Item:
|
|
734
|
-
return {
|
|
735
|
-
left: (h("span", { onClick: this.onClickBarBack }, iconBack)),
|
|
736
|
-
middle: '',
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
openDialog(type, data = undefined) {
|
|
741
|
-
this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, type, data });
|
|
742
|
-
}
|
|
743
|
-
closeDialog() {
|
|
744
|
-
this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: false });
|
|
745
|
-
}
|
|
64
|
+
get host() { return getElement(this); }
|
|
746
65
|
};
|
|
747
|
-
|
|
66
|
+
CasinoEngagementSuiteProgressBar.style = CasinoEngagementSuiteProgressBarStyle0;
|
|
748
67
|
|
|
749
68
|
const mergeTranslations = (url, target) => {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
69
|
+
return new Promise((resolve) => {
|
|
70
|
+
fetch(url)
|
|
71
|
+
.then((res) => res.json())
|
|
72
|
+
.then((data) => {
|
|
73
|
+
Object.keys(data).forEach((item) => {
|
|
74
|
+
target[item] = target[item] ? target[item] : {};
|
|
75
|
+
for (let key in data[item]) {
|
|
76
|
+
target[item][key] = data[item][key];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
resolve(true);
|
|
80
|
+
});
|
|
761
81
|
});
|
|
762
|
-
});
|
|
763
82
|
};
|
|
764
83
|
|
|
765
84
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
85
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
766
86
|
|
|
767
87
|
const GeneralStylingWrapper = class {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
.
|
|
793
|
-
.
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
88
|
+
constructor(hostRef) {
|
|
89
|
+
registerInstance(this, hostRef);
|
|
90
|
+
this.stylingAppends = false;
|
|
91
|
+
this.setClientStyling = () => {
|
|
92
|
+
let sheet = document.createElement('style');
|
|
93
|
+
sheet.innerHTML = this.clientStyling;
|
|
94
|
+
this.el.prepend(sheet);
|
|
95
|
+
};
|
|
96
|
+
this.setClientStylingURL = () => {
|
|
97
|
+
let url = new URL(this.clientStylingUrl);
|
|
98
|
+
let cssFile = document.createElement('style');
|
|
99
|
+
fetch(url.href)
|
|
100
|
+
.then((res) => res.text())
|
|
101
|
+
.then((data) => {
|
|
102
|
+
cssFile.innerHTML = data;
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
this.el.prepend(cssFile);
|
|
105
|
+
}, 1);
|
|
106
|
+
})
|
|
107
|
+
.catch((err) => {
|
|
108
|
+
console.log('error ', err);
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
this.clientStyling = '';
|
|
112
|
+
this.clientStylingUrl = '';
|
|
113
|
+
this.translationUrl = '';
|
|
114
|
+
this.targetTranslations = undefined;
|
|
115
|
+
}
|
|
116
|
+
componentDidRender() {
|
|
117
|
+
// start custom styling area
|
|
118
|
+
if (!this.stylingAppends) {
|
|
119
|
+
if (this.clientStyling)
|
|
120
|
+
this.setClientStyling();
|
|
121
|
+
if (this.clientStylingUrl)
|
|
122
|
+
this.setClientStylingURL();
|
|
123
|
+
this.stylingAppends = true;
|
|
124
|
+
}
|
|
125
|
+
// end custom styling area
|
|
126
|
+
}
|
|
127
|
+
async componentWillLoad() {
|
|
128
|
+
const promises = [];
|
|
129
|
+
if (this.translationUrl) {
|
|
130
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
131
|
+
promises.push(translationPromise);
|
|
132
|
+
}
|
|
133
|
+
return await Promise.all(promises);
|
|
812
134
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
async componentWillLoad() {
|
|
816
|
-
const promises = [];
|
|
817
|
-
if (this.translationUrl) {
|
|
818
|
-
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
819
|
-
promises.push(translationPromise);
|
|
135
|
+
render() {
|
|
136
|
+
return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
820
137
|
}
|
|
821
|
-
return
|
|
822
|
-
}
|
|
823
|
-
render() {
|
|
824
|
-
return (h("div", { class: "StyleShell" }, h("slot", { name: "mainContent" })));
|
|
825
|
-
}
|
|
826
|
-
get el() { return getElement(this); }
|
|
138
|
+
get el() { return getElement(this); }
|
|
827
139
|
};
|
|
828
|
-
GeneralStylingWrapper.style =
|
|
140
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
829
141
|
|
|
830
|
-
export { CasinoEngagementSuiteProgressBar as casino_engagement_suite_progress_bar,
|
|
142
|
+
export { CasinoEngagementSuiteProgressBar as casino_engagement_suite_progress_bar, GeneralStylingWrapper as general_styling_wrapper };
|