@everymatrix/casino-tournament-banner 1.27.10 → 1.28.4
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-tournament-banner/casino-tournament-banner.esm.js +1 -1
- package/dist/casino-tournament-banner/p-83ad6942.entry.js +9 -0
- package/dist/casino-tournament-banner/p-f4660955.js +1 -0
- package/dist/cjs/casino-tournament-banner.cjs.js +2 -2
- package/dist/cjs/casino-tournament-banner_2.cjs.entry.js +41 -25
- package/dist/cjs/{index-743ee8f8.js → index-01ad4732.js} +2 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/casino-tournament-banner/casino-tournament-banner.js +20 -13
- package/dist/components/casino-tournament-banner.js +19 -12
- package/dist/components/casino-tournament-buttons2.js +21 -14
- package/dist/esm/casino-tournament-banner.js +2 -2
- package/dist/esm/casino-tournament-banner_2.entry.js +41 -25
- package/dist/esm/{index-c76b1548.js → index-0d4c091f.js} +2 -14
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-tournament-banner/.stencil/packages/casino-tournament-banner/stencil.config.d.ts +2 -0
- package/dist/types/components/casino-tournament-banner/casino-tournament-banner.d.ts +1 -1
- package/package.json +1 -1
- package/dist/casino-tournament-banner/p-465ac284.js +0 -1
- package/dist/casino-tournament-banner/p-d91df716.entry.js +0 -9
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/casino-tournament-banner/.stencil/packages/casino-tournament-banner/stencil.config.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, h, Listen, State } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, h, Listen, State, Element } from '@stencil/core';
|
|
2
2
|
import { translate } from '../../utils/locale.utils';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import '@everymatrix/casino-tournament-buttons';
|
|
@@ -97,7 +97,7 @@ export class CasinoTournamentBanner {
|
|
|
97
97
|
return text;
|
|
98
98
|
}
|
|
99
99
|
componentDidRender() {
|
|
100
|
-
if (!this.limitStylingAppends && this.
|
|
100
|
+
if (!this.limitStylingAppends && this.host) {
|
|
101
101
|
if (this.clientStyling)
|
|
102
102
|
this.setClientStyling();
|
|
103
103
|
if (this.clientStylingUrl)
|
|
@@ -106,16 +106,23 @@ export class CasinoTournamentBanner {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
setClientStyling() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this.
|
|
109
|
+
const sheet = new CSSStyleSheet();
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
sheet.replace(this.clientStyling);
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
112
114
|
}
|
|
113
115
|
setClientStylingURL() {
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
let url = new URL(this.clientStylingUrl);
|
|
117
|
+
fetch(url.href)
|
|
118
|
+
.then((res) => res.text())
|
|
119
|
+
.then((data) => {
|
|
120
|
+
const sheet = new CSSStyleSheet();
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
sheet.replace(data);
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
125
|
+
});
|
|
119
126
|
}
|
|
120
127
|
formatDate() {
|
|
121
128
|
const dateOptions = { month: 'long' };
|
|
@@ -168,7 +175,7 @@ export class CasinoTournamentBanner {
|
|
|
168
175
|
window.postMessage({ type: 'TournamentTermsConditions', tournamentId: tournamentId }, window.location.href);
|
|
169
176
|
}
|
|
170
177
|
render() {
|
|
171
|
-
return h("div", {
|
|
178
|
+
return h("div", { class: "TournamentBannerWrap" }, this.thumbnail && h("div", { class: "TournamentBanner", part: "TournamentBanner" },
|
|
172
179
|
h("img", { src: this.thumbnail, alt: "", class: `TournamentBannerBg ${this.cardMode && this.state ? this.state : ''}` }),
|
|
173
180
|
!this.cardMode &&
|
|
174
181
|
h("div", { class: "TournamentBannerInfo", part: "TournamentBannerInfo" },
|
|
@@ -215,7 +222,7 @@ export class CasinoTournamentBanner {
|
|
|
215
222
|
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })),
|
|
216
223
|
this.startdate)),
|
|
217
224
|
h("div", { class: "ThumbButtons" },
|
|
218
|
-
h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore })),
|
|
225
|
+
h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl })),
|
|
219
226
|
h("div", { class: "ThumbTC" },
|
|
220
227
|
h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate('terms', this.language))))));
|
|
221
228
|
}
|
|
@@ -699,12 +706,12 @@ export class CasinoTournamentBanner {
|
|
|
699
706
|
static get states() { return {
|
|
700
707
|
"stateText": {},
|
|
701
708
|
"limitStylingAppends": {},
|
|
702
|
-
"stylingContainer": {},
|
|
703
709
|
"startdate": {},
|
|
704
710
|
"tournamentLeftDays": {},
|
|
705
711
|
"showRemain": {},
|
|
706
712
|
"durationInterval": {}
|
|
707
713
|
}; }
|
|
714
|
+
static get elementRef() { return "host"; }
|
|
708
715
|
static get listeners() { return [{
|
|
709
716
|
"name": "getTournamentInfoCompleted",
|
|
710
717
|
"method": "infoCompletedHandler",
|
|
@@ -6169,7 +6169,7 @@ const CasinoTournamentBanner$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
6169
6169
|
return text;
|
|
6170
6170
|
}
|
|
6171
6171
|
componentDidRender() {
|
|
6172
|
-
if (!this.limitStylingAppends && this.
|
|
6172
|
+
if (!this.limitStylingAppends && this.host) {
|
|
6173
6173
|
if (this.clientStyling)
|
|
6174
6174
|
this.setClientStyling();
|
|
6175
6175
|
if (this.clientStylingUrl)
|
|
@@ -6178,16 +6178,23 @@ const CasinoTournamentBanner$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
6178
6178
|
}
|
|
6179
6179
|
}
|
|
6180
6180
|
setClientStyling() {
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
this.
|
|
6181
|
+
const sheet = new CSSStyleSheet();
|
|
6182
|
+
// @ts-ignore
|
|
6183
|
+
sheet.replace(this.clientStyling);
|
|
6184
|
+
// @ts-ignore
|
|
6185
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
6184
6186
|
}
|
|
6185
6187
|
setClientStylingURL() {
|
|
6186
|
-
let
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6188
|
+
let url = new URL(this.clientStylingUrl);
|
|
6189
|
+
fetch(url.href)
|
|
6190
|
+
.then((res) => res.text())
|
|
6191
|
+
.then((data) => {
|
|
6192
|
+
const sheet = new CSSStyleSheet();
|
|
6193
|
+
// @ts-ignore
|
|
6194
|
+
sheet.replace(data);
|
|
6195
|
+
// @ts-ignore
|
|
6196
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
6197
|
+
});
|
|
6191
6198
|
}
|
|
6192
6199
|
formatDate() {
|
|
6193
6200
|
const dateOptions = { month: 'long' };
|
|
@@ -6240,7 +6247,7 @@ const CasinoTournamentBanner$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
6240
6247
|
window.postMessage({ type: 'TournamentTermsConditions', tournamentId: tournamentId }, window.location.href);
|
|
6241
6248
|
}
|
|
6242
6249
|
render() {
|
|
6243
|
-
return h("div", {
|
|
6250
|
+
return h("div", { class: "TournamentBannerWrap" }, this.thumbnail && h("div", { class: "TournamentBanner", part: "TournamentBanner" }, h("img", { src: this.thumbnail, alt: "", class: `TournamentBannerBg ${this.cardMode && this.state ? this.state : ''}` }), !this.cardMode &&
|
|
6244
6251
|
h("div", { class: "TournamentBannerInfo", part: "TournamentBannerInfo" }, h("div", { class: "BannerInfo", part: "BannerInfo" }, h("span", { class: `Tag State ${this.state}` }, this.stateText)), h("div", { class: "BannerInfo", part: "BannerInfo" }, this.showDate &&
|
|
6245
6252
|
h("span", { class: "Tag Date" }, this.showCalendar &&
|
|
6246
6253
|
h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), h("div", { class: "BannerInfo", part: "BannerInfo" }, this.enrolled &&
|
|
@@ -6252,8 +6259,9 @@ const CasinoTournamentBanner$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
6252
6259
|
h("span", { class: "Tag Join" }, h("svg", { class: "JoinPlus", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "13", viewBox: "0 0 12 13", fill: "none" }, h("path", { d: "M9.5 6.8335H6.5V9.8335H5.5V6.8335H2.5V5.8335H5.5V2.8335H6.5V5.8335H9.5V6.8335Z", fill: "white" })), translate('join', this.language)), this.state == 'Running' && h("span", { class: `Tag State ${this.state}` }, this.stateText, this.showRunningDate &&
|
|
6253
6260
|
h("span", { class: "TagRemain" }, this.showRemain, " ", translate('left', this.language))), (this.state == 'Unstarted' || this.state == 'Upcoming' || this.state == 'Closed') &&
|
|
6254
6261
|
h("span", { class: `Tag Date ${this.state}` }, this.showCalendar &&
|
|
6255
|
-
h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), h("div", { class: "ThumbButtons" }, h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore })), h("div", { class: "ThumbTC" }, h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate('terms', this.language))))));
|
|
6262
|
+
h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), h("div", { class: "ThumbButtons" }, h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl })), h("div", { class: "ThumbTC" }, h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate('terms', this.language))))));
|
|
6256
6263
|
}
|
|
6264
|
+
get host() { return this; }
|
|
6257
6265
|
static get style() { return casinoTournamentBannerCss; }
|
|
6258
6266
|
}, [1, "casino-tournament-banner", {
|
|
6259
6267
|
"useEvent": [1, "use-event"],
|
|
@@ -6285,7 +6293,6 @@ const CasinoTournamentBanner$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
6285
6293
|
"clientStylingUrl": [1, "client-styling-url"],
|
|
6286
6294
|
"stateText": [32],
|
|
6287
6295
|
"limitStylingAppends": [32],
|
|
6288
|
-
"stylingContainer": [32],
|
|
6289
6296
|
"startdate": [32],
|
|
6290
6297
|
"tournamentLeftDays": [32],
|
|
6291
6298
|
"showRemain": [32],
|
|
@@ -397,7 +397,7 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
397
397
|
this.errorJoinConcurrently = false;
|
|
398
398
|
}
|
|
399
399
|
componentDidRender() {
|
|
400
|
-
if (!this.limitStylingAppends && this.
|
|
400
|
+
if (!this.limitStylingAppends && this.host) {
|
|
401
401
|
if (this.clientStyling)
|
|
402
402
|
this.setClientStyling();
|
|
403
403
|
if (this.clientStylingUrl)
|
|
@@ -406,16 +406,23 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
setClientStyling() {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
this.
|
|
409
|
+
const sheet = new CSSStyleSheet();
|
|
410
|
+
// @ts-ignore
|
|
411
|
+
sheet.replace(this.clientStyling);
|
|
412
|
+
// @ts-ignore
|
|
413
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
412
414
|
}
|
|
413
415
|
setClientStylingURL() {
|
|
414
|
-
let
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
let url = new URL(this.clientStylingUrl);
|
|
417
|
+
fetch(url.href)
|
|
418
|
+
.then((res) => res.text())
|
|
419
|
+
.then((data) => {
|
|
420
|
+
const sheet = new CSSStyleSheet();
|
|
421
|
+
// @ts-ignore
|
|
422
|
+
sheet.replace(data);
|
|
423
|
+
// @ts-ignore
|
|
424
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
425
|
+
});
|
|
419
426
|
}
|
|
420
427
|
loginAction() {
|
|
421
428
|
if (this.loginEvent) {
|
|
@@ -453,7 +460,7 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
453
460
|
this.errorJoinConcurrently = false;
|
|
454
461
|
window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
|
|
455
462
|
this.joinButtonLoading = true;
|
|
456
|
-
let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
|
|
463
|
+
let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
|
|
457
464
|
let reqHeaders = new Headers();
|
|
458
465
|
let body = {};
|
|
459
466
|
joinUrl.searchParams.append('language', this.language);
|
|
@@ -484,7 +491,7 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
484
491
|
const fetcher = async () => {
|
|
485
492
|
let result;
|
|
486
493
|
try {
|
|
487
|
-
result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
494
|
+
result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
488
495
|
result = await result.json();
|
|
489
496
|
}
|
|
490
497
|
catch (e) {
|
|
@@ -501,7 +508,7 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
501
508
|
else {
|
|
502
509
|
if (data.errorMessage.match("VersionMismatchException")) {
|
|
503
510
|
let resultDoubleCheck;
|
|
504
|
-
resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
|
|
511
|
+
resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
|
|
505
512
|
headers: {
|
|
506
513
|
'X-SessionID': this.session
|
|
507
514
|
}
|
|
@@ -528,13 +535,14 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
528
535
|
window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
|
|
529
536
|
}
|
|
530
537
|
render() {
|
|
531
|
-
return h("div", {
|
|
538
|
+
return h("div", { class: "TournamentButtons" }, !this.session &&
|
|
532
539
|
h("div", { class: "ButtonGroup" }, h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
|
|
533
540
|
h("div", null, !this.enrolled &&
|
|
534
541
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more")), this.enrolled &&
|
|
535
542
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more"))), (this.errorJoin || this.errorJoinConcurrently) &&
|
|
536
543
|
h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
|
|
537
544
|
}
|
|
545
|
+
get host() { return this; }
|
|
538
546
|
static get style() { return casinoTournamentButtonsCss; }
|
|
539
547
|
}, [1, "casino-tournament-buttons", {
|
|
540
548
|
"language": [1],
|
|
@@ -552,7 +560,6 @@ const CasinoTournamentButtons = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
552
560
|
"clientStyling": [1, "client-styling"],
|
|
553
561
|
"clientStylingUrl": [1, "client-styling-url"],
|
|
554
562
|
"limitStylingAppends": [32],
|
|
555
|
-
"stylingContainer": [32],
|
|
556
563
|
"joinButtonLoading": [32],
|
|
557
564
|
"errorJoin": [32],
|
|
558
565
|
"errorJoinConcurrently": [32]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-0d4c091f.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-tournament-banner_2",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"
|
|
16
|
+
return bootstrapLazy([["casino-tournament-banner_2",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"startdate":[32],"tournamentLeftDays":[32],"showRemain":[32],"durationInterval":[32]},[[8,"getTournamentInfoCompleted","infoCompletedHandler"]]],[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-0d4c091f.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt', 'hr'];
|
|
@@ -6166,7 +6166,7 @@ const CasinoTournamentBanner = class {
|
|
|
6166
6166
|
return text;
|
|
6167
6167
|
}
|
|
6168
6168
|
componentDidRender() {
|
|
6169
|
-
if (!this.limitStylingAppends && this.
|
|
6169
|
+
if (!this.limitStylingAppends && this.host) {
|
|
6170
6170
|
if (this.clientStyling)
|
|
6171
6171
|
this.setClientStyling();
|
|
6172
6172
|
if (this.clientStylingUrl)
|
|
@@ -6175,16 +6175,23 @@ const CasinoTournamentBanner = class {
|
|
|
6175
6175
|
}
|
|
6176
6176
|
}
|
|
6177
6177
|
setClientStyling() {
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
this.
|
|
6178
|
+
const sheet = new CSSStyleSheet();
|
|
6179
|
+
// @ts-ignore
|
|
6180
|
+
sheet.replace(this.clientStyling);
|
|
6181
|
+
// @ts-ignore
|
|
6182
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
6181
6183
|
}
|
|
6182
6184
|
setClientStylingURL() {
|
|
6183
|
-
let
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6185
|
+
let url = new URL(this.clientStylingUrl);
|
|
6186
|
+
fetch(url.href)
|
|
6187
|
+
.then((res) => res.text())
|
|
6188
|
+
.then((data) => {
|
|
6189
|
+
const sheet = new CSSStyleSheet();
|
|
6190
|
+
// @ts-ignore
|
|
6191
|
+
sheet.replace(data);
|
|
6192
|
+
// @ts-ignore
|
|
6193
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
6194
|
+
});
|
|
6188
6195
|
}
|
|
6189
6196
|
formatDate() {
|
|
6190
6197
|
const dateOptions = { month: 'long' };
|
|
@@ -6237,7 +6244,7 @@ const CasinoTournamentBanner = class {
|
|
|
6237
6244
|
window.postMessage({ type: 'TournamentTermsConditions', tournamentId: tournamentId }, window.location.href);
|
|
6238
6245
|
}
|
|
6239
6246
|
render() {
|
|
6240
|
-
return h("div", {
|
|
6247
|
+
return h("div", { class: "TournamentBannerWrap" }, this.thumbnail && h("div", { class: "TournamentBanner", part: "TournamentBanner" }, h("img", { src: this.thumbnail, alt: "", class: `TournamentBannerBg ${this.cardMode && this.state ? this.state : ''}` }), !this.cardMode &&
|
|
6241
6248
|
h("div", { class: "TournamentBannerInfo", part: "TournamentBannerInfo" }, h("div", { class: "BannerInfo", part: "BannerInfo" }, h("span", { class: `Tag State ${this.state}` }, this.stateText)), h("div", { class: "BannerInfo", part: "BannerInfo" }, this.showDate &&
|
|
6242
6249
|
h("span", { class: "Tag Date" }, this.showCalendar &&
|
|
6243
6250
|
h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), h("div", { class: "BannerInfo", part: "BannerInfo" }, this.enrolled &&
|
|
@@ -6249,8 +6256,9 @@ const CasinoTournamentBanner = class {
|
|
|
6249
6256
|
h("span", { class: "Tag Join" }, h("svg", { class: "JoinPlus", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "13", viewBox: "0 0 12 13", fill: "none" }, h("path", { d: "M9.5 6.8335H6.5V9.8335H5.5V6.8335H2.5V5.8335H5.5V2.8335H6.5V5.8335H9.5V6.8335Z", fill: "white" })), translate$1('join', this.language)), this.state == 'Running' && h("span", { class: `Tag State ${this.state}` }, this.stateText, this.showRunningDate &&
|
|
6250
6257
|
h("span", { class: "TagRemain" }, this.showRemain, " ", translate$1('left', this.language))), (this.state == 'Unstarted' || this.state == 'Upcoming' || this.state == 'Closed') &&
|
|
6251
6258
|
h("span", { class: `Tag Date ${this.state}` }, this.showCalendar &&
|
|
6252
|
-
h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), h("div", { class: "ThumbButtons" }, h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore })), h("div", { class: "ThumbTC" }, h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate$1('terms', this.language))))));
|
|
6259
|
+
h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), h("div", { class: "ThumbButtons" }, h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl })), h("div", { class: "ThumbTC" }, h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate$1('terms', this.language))))));
|
|
6253
6260
|
}
|
|
6261
|
+
get host() { return getElement(this); }
|
|
6254
6262
|
};
|
|
6255
6263
|
CasinoTournamentBanner.style = casinoTournamentBannerCss;
|
|
6256
6264
|
|
|
@@ -6649,7 +6657,7 @@ const CasinoTournamentButtons = class {
|
|
|
6649
6657
|
this.errorJoinConcurrently = false;
|
|
6650
6658
|
}
|
|
6651
6659
|
componentDidRender() {
|
|
6652
|
-
if (!this.limitStylingAppends && this.
|
|
6660
|
+
if (!this.limitStylingAppends && this.host) {
|
|
6653
6661
|
if (this.clientStyling)
|
|
6654
6662
|
this.setClientStyling();
|
|
6655
6663
|
if (this.clientStylingUrl)
|
|
@@ -6658,16 +6666,23 @@ const CasinoTournamentButtons = class {
|
|
|
6658
6666
|
}
|
|
6659
6667
|
}
|
|
6660
6668
|
setClientStyling() {
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
this.
|
|
6669
|
+
const sheet = new CSSStyleSheet();
|
|
6670
|
+
// @ts-ignore
|
|
6671
|
+
sheet.replace(this.clientStyling);
|
|
6672
|
+
// @ts-ignore
|
|
6673
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
6664
6674
|
}
|
|
6665
6675
|
setClientStylingURL() {
|
|
6666
|
-
let
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6676
|
+
let url = new URL(this.clientStylingUrl);
|
|
6677
|
+
fetch(url.href)
|
|
6678
|
+
.then((res) => res.text())
|
|
6679
|
+
.then((data) => {
|
|
6680
|
+
const sheet = new CSSStyleSheet();
|
|
6681
|
+
// @ts-ignore
|
|
6682
|
+
sheet.replace(data);
|
|
6683
|
+
// @ts-ignore
|
|
6684
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
6685
|
+
});
|
|
6671
6686
|
}
|
|
6672
6687
|
loginAction() {
|
|
6673
6688
|
if (this.loginEvent) {
|
|
@@ -6705,7 +6720,7 @@ const CasinoTournamentButtons = class {
|
|
|
6705
6720
|
this.errorJoinConcurrently = false;
|
|
6706
6721
|
window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
|
|
6707
6722
|
this.joinButtonLoading = true;
|
|
6708
|
-
let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
|
|
6723
|
+
let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
|
|
6709
6724
|
let reqHeaders = new Headers();
|
|
6710
6725
|
let body = {};
|
|
6711
6726
|
joinUrl.searchParams.append('language', this.language);
|
|
@@ -6736,7 +6751,7 @@ const CasinoTournamentButtons = class {
|
|
|
6736
6751
|
const fetcher = async () => {
|
|
6737
6752
|
let result;
|
|
6738
6753
|
try {
|
|
6739
|
-
result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
6754
|
+
result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
|
|
6740
6755
|
result = await result.json();
|
|
6741
6756
|
}
|
|
6742
6757
|
catch (e) {
|
|
@@ -6753,7 +6768,7 @@ const CasinoTournamentButtons = class {
|
|
|
6753
6768
|
else {
|
|
6754
6769
|
if (data.errorMessage.match("VersionMismatchException")) {
|
|
6755
6770
|
let resultDoubleCheck;
|
|
6756
|
-
resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
|
|
6771
|
+
resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
|
|
6757
6772
|
headers: {
|
|
6758
6773
|
'X-SessionID': this.session
|
|
6759
6774
|
}
|
|
@@ -6780,13 +6795,14 @@ const CasinoTournamentButtons = class {
|
|
|
6780
6795
|
window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
|
|
6781
6796
|
}
|
|
6782
6797
|
render() {
|
|
6783
|
-
return h("div", {
|
|
6798
|
+
return h("div", { class: "TournamentButtons" }, !this.session &&
|
|
6784
6799
|
h("div", { class: "ButtonGroup" }, h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
|
|
6785
6800
|
h("div", null, !this.enrolled &&
|
|
6786
6801
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more")), this.enrolled &&
|
|
6787
6802
|
h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more"))), (this.errorJoin || this.errorJoinConcurrently) &&
|
|
6788
6803
|
h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
|
|
6789
6804
|
}
|
|
6805
|
+
get host() { return getElement(this); }
|
|
6790
6806
|
};
|
|
6791
6807
|
CasinoTournamentButtons.style = casinoTournamentButtonsCss;
|
|
6792
6808
|
|
|
@@ -251,12 +251,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
251
251
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
252
252
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
253
253
|
}
|
|
254
|
-
else if (memberName === 'ref') {
|
|
255
|
-
// minifier will clean this up
|
|
256
|
-
if (newValue) {
|
|
257
|
-
newValue(elm);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
254
|
else if ((!isProp ) &&
|
|
261
255
|
memberName[0] === 'o' &&
|
|
262
256
|
memberName[1] === 'n') {
|
|
@@ -430,7 +424,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
430
424
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
431
425
|
if ((vnode = vnodes[startIdx])) {
|
|
432
426
|
elm = vnode.$elm$;
|
|
433
|
-
callNodeRefs(vnode);
|
|
434
427
|
// remove the vnode's element from the dom
|
|
435
428
|
elm.remove();
|
|
436
429
|
}
|
|
@@ -558,12 +551,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
558
551
|
elm.data = text;
|
|
559
552
|
}
|
|
560
553
|
};
|
|
561
|
-
const callNodeRefs = (vNode) => {
|
|
562
|
-
{
|
|
563
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
564
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
554
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
568
555
|
const hostElm = hostRef.$hostElement$;
|
|
569
556
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -579,6 +566,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
579
566
|
// synchronous patch
|
|
580
567
|
patch(oldVNode, rootVnode);
|
|
581
568
|
};
|
|
569
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
582
570
|
/**
|
|
583
571
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
584
572
|
* @param elm the target of the Event
|
|
@@ -1217,4 +1205,4 @@ const flush = () => {
|
|
|
1217
1205
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1218
1206
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1219
1207
|
|
|
1220
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1208
|
+
export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-0d4c091f.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-tournament-banner_2",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"
|
|
13
|
+
return bootstrapLazy([["casino-tournament-banner_2",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"startdate":[32],"tournamentLeftDays":[32],"showRemain":[32],"durationInterval":[32]},[[8,"getTournamentInfoCompleted","infoCompletedHandler"]]],[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -110,11 +110,11 @@ export declare class CasinoTournamentBanner {
|
|
|
110
110
|
clientStylingUrl?: string;
|
|
111
111
|
stateText: string;
|
|
112
112
|
limitStylingAppends: boolean;
|
|
113
|
-
stylingContainer: HTMLElement;
|
|
114
113
|
startdate: string;
|
|
115
114
|
tournamentLeftDays: number;
|
|
116
115
|
showRemain: string;
|
|
117
116
|
durationInterval: number;
|
|
117
|
+
host: HTMLElement;
|
|
118
118
|
getDateTimeDiff(dateString1: Date, dateString2: string): number;
|
|
119
119
|
getTextByDiff(diff: number): any;
|
|
120
120
|
getDuration(): void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),i=a(t,s),c=h(n);r.ael(o,l,i,c),(t.o=t.o||[]).push((()=>r.rel(o,l,i,c)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){I(e)}},f=(e,t)=>8&t?s:e,h=e=>0!=(2&e),$=new WeakMap,d=e=>"sc-"+e.h,m={},p=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!p(l))&&(l+=""),s&&o?r[r.length-1].$+=l:r.push(s?w(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=w(e,null);return c.m=t,r.length>0&&(c.p=r),c},w=(e,t)=>({t:0,g:e,$:t,v:null,p:null,m:null}),b={},g=(e,t,n,l,o,i)=>{if(n!==l){let c=G(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=S(n),o=S(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=p(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):G(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},v=/\s/,S=e=>e?e.split(v):[],j=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.m||m,r=t.m||m;for(l in o)l in r||g(s,l,o[l],void 0,n,t.t);for(l in r)g(s,l,o[l],r[l],n,t.t)},O=(t,l,s)=>{let r,i,c=l.p[s],u=0;if(null!==c.$)r=c.v=o.createTextNode(c.$);else{if(n||(n="svg"===c.g),r=c.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.g),n&&"foreignObject"===c.g&&(n=!1),j(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.p)for(u=0;u<c.p.length;++u)i=O(t,c,u),i&&r.appendChild(i);"svg"===c.g?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},M=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=O(null,l,o),i&&(s[o].v=i,c.insertBefore(i,n)))},k=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.v,P(l),s.remove())},C=(e,t)=>e.g===t.g,x=(e,t)=>{const l=t.v=e.v,s=e.p,o=t.p,r=t.g,i=t.$;null===i?(n="svg"===r||"foreignObject"!==r&&n,j(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:C(c,f)?(x(c,f),c=t[++o],f=l[++r]):C(u,h)?(x(u,h),u=t[--i],h=l[--a]):C(c,h)?(x(c,h),e.insertBefore(c.v,u.v.nextSibling),c=t[++o],h=l[--a]):C(u,f)?(x(u,f),e.insertBefore(u.v,c.v),u=t[--i],f=l[++r]):(s=O(t&&t[r],n,r),f=l[++r],s&&c.v.parentNode.insertBefore(s,c.v));o>i?M(e,null==l[a+1]?null:l[a+1].v,n,l,r,a):r>a&&k(t,o,i)})(l,s,t,o):null!==o?(null!==e.$&&(l.textContent=""),M(l,null,t,o,0,o.length-1)):null!==s&&k(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.$!==i&&(l.data=i)},P=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(P)},E=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},L=(e,t)=>{if(e.t|=16,!(4&e.t))return E(e,e.j),le((()=>N(e,t)));e.t|=512},N=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>U(n,e,t))),e.u=null),l=U(n,"componentWillLoad")),q(l,(()=>R(e,n,t)))},R=async(e,t,n)=>{const l=e.O,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.O,l=t.t,s=((e,t)=>{let n=d(t),l=Q.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=$.get(e=e.head||e);s||$.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);T(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>W(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},T=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.O,o=n.k||w(null,null),r=(e=>e&&e.g===b)(l)?l:y(null,null,l);t=s.tagName,r.g=null,r.t|=4,n.k=r,r.v=o.v=s.shadowRoot||s,e=s["s-sc"],x(o,r)})(n,l)}catch(e){I(e,n.O)}return null},W=e=>{const t=e.O,n=e.j;U(e.i,"componentDidRender"),64&e.t||(e.t|=64,D(t),e.C(t),n||A()),e.S&&(e.S(),e.S=void 0),512&e.t&&ne((()=>L(e,!1))),e.t&=-517},A=()=>{D(o.documentElement),ne((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"casino-tournament-banner"}});return e.dispatchEvent(t),t})(s)))},U=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){I(e)}},q=(e,t)=>e&&e.then?e.then(t):t(),D=e=>e.classList.add("hydrated"),F=(e,t,n)=>{if(t.P){const l=Object.entries(t.P),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>_(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=_(e),o=s.L.get(t),r=s.t,i=s.i;n=((e,t)=>null==e||p(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.P[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.L.set(t,n),i&&2==(18&r)&&L(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){r.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},H=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let m,p=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],P:t[2],N:t[3]};s.P=t[2],s.N=t[3];const o=s.h,a=class extends HTMLElement{constructor(e){super(e),B(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),p?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=_(e),n=t.M,l=()=>{};if(1&t.t)u(e,t,n.N);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){E(t,t.j=n);break}}n.P&&Object.entries(n.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=K(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(F(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){I(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=d(n);if(!Q.has(t)){const l=()=>{};((e,t,n)=>{let l=Q.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,Q.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.j,r=()=>L(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{if(0==(1&r.t)){const e=_(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return _(this).R}};s.T=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,F(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),p=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>m=setTimeout(A,30)))},V=new WeakMap,_=e=>V.get(e),z=(e,t)=>V.set(t.i=e,t),B=(e,t)=>{const n={t:0,O:e,M:t,L:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],u(e,n,t.N),V.set(e,n)},G=(e,t)=>t in e,I=(e,t)=>(0,console.error)(e,t),J=new Map,K=e=>{const t=e.h.replace(/-/g,"_"),n=e.T,l=J.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(J.set(n,e),e[t])),I)},Q=new Map,X=[],Y=[],Z=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?ne(te):r.raf(te))},ee=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){I(e)}e.length=0},te=()=>{ee(X),ee(Y),(l=X.length>0)&&r.raf(te)},ne=e=>i().then(e),le=Z(Y,!0);export{H as b,y as h,i as p,z as r}
|