@everymatrix/lottery-game-page 1.44.0 → 1.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{helper-filters_2.cjs.entry.js → helper-accordion_13.cjs.entry.js} +3329 -1000
- package/dist/cjs/helper-pagination.cjs.entry.js +195 -226
- package/dist/cjs/index-f3851683.js +1345 -0
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +7 -15
- package/dist/cjs/lottery-game-page.cjs.js +16 -12
- package/dist/collection/collection-manifest.json +4 -10
- package/dist/collection/components/lottery-game-page/index.js +1 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +1 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +580 -646
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/locale.utils.js +117 -118
- package/dist/collection/utils/utils.js +4 -5
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/{helper-filters_2.entry.js → helper-accordion_13.entry.js} +3319 -1001
- package/dist/esm/helper-pagination.entry.js +195 -226
- package/dist/esm/index-8248702b.js +1316 -0
- package/dist/esm/index.js +0 -2
- package/dist/esm/loader.js +8 -16
- package/dist/esm/lottery-game-page.js +14 -13
- package/dist/lottery-game-page/index.esm.js +0 -2
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -2
- package/dist/lottery-game-page/p-4254ae78.entry.js +3567 -0
- package/dist/lottery-game-page/p-89956c67.entry.js +1 -0
- package/dist/lottery-game-page/p-8f2c63c7.js +2 -0
- package/dist/lottery-game-page/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -45
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/lottery-game-page/index.d.ts +1 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +98 -98
- package/dist/types/components.d.ts +18 -2
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- 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 +13 -7
- package/dist/assets/chrono_desktop.png +0 -0
- package/dist/assets/chrono_lottery_mobile.png +0 -0
- package/dist/cjs/helper-accordion.cjs.entry.js +0 -134
- package/dist/cjs/helper-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-modal.cjs.entry.js +0 -78
- package/dist/cjs/helper-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-pagination.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-tab.cjs.entry.js +0 -70
- package/dist/cjs/helper-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-tabs.cjs.entry.js +0 -76
- package/dist/cjs/helper-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/index-cd44e726.js +0 -1326
- package/dist/cjs/index-cd44e726.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -281
- package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -240
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-details.cjs.entry.js +0 -53
- package/dist/cjs/lottery-game-details.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +0 -456
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-page.cjs.js.map +0 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -132
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -233
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +0 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/locale.utils.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/helper-accordion.js +0 -8
- package/dist/components/helper-accordion.js.map +0 -1
- package/dist/components/helper-accordion2.js +0 -161
- package/dist/components/helper-accordion2.js.map +0 -1
- package/dist/components/helper-filters.js +0 -8
- package/dist/components/helper-filters.js.map +0 -1
- package/dist/components/helper-filters2.js +0 -23566
- package/dist/components/helper-filters2.js.map +0 -1
- package/dist/components/helper-modal.js +0 -8
- package/dist/components/helper-modal.js.map +0 -1
- package/dist/components/helper-modal2.js +0 -96
- package/dist/components/helper-modal2.js.map +0 -1
- package/dist/components/helper-pagination.js +0 -293
- package/dist/components/helper-pagination.js.map +0 -1
- package/dist/components/helper-tab.js +0 -8
- package/dist/components/helper-tab.js.map +0 -1
- package/dist/components/helper-tab2.js +0 -89
- package/dist/components/helper-tab2.js.map +0 -1
- package/dist/components/helper-tabs.js +0 -8
- package/dist/components/helper-tabs.js.map +0 -1
- package/dist/components/helper-tabs2.js +0 -105
- package/dist/components/helper-tabs2.js.map +0 -1
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -3
- package/dist/components/index.js.map +0 -1
- package/dist/components/lottery-bullet.js +0 -8
- package/dist/components/lottery-bullet.js.map +0 -1
- package/dist/components/lottery-bullet2.js +0 -94
- package/dist/components/lottery-bullet2.js.map +0 -1
- package/dist/components/lottery-draw-results-history.js +0 -8
- package/dist/components/lottery-draw-results-history.js.map +0 -1
- package/dist/components/lottery-draw-results-history2.js +0 -298
- package/dist/components/lottery-draw-results-history2.js.map +0 -1
- package/dist/components/lottery-draw-results.js +0 -8
- package/dist/components/lottery-draw-results.js.map +0 -1
- package/dist/components/lottery-draw-results2.js +0 -346
- package/dist/components/lottery-draw-results2.js.map +0 -1
- package/dist/components/lottery-game-details.js +0 -8
- package/dist/components/lottery-game-details.js.map +0 -1
- package/dist/components/lottery-game-details2.js +0 -87
- package/dist/components/lottery-game-details2.js.map +0 -1
- package/dist/components/lottery-game-page.d.ts +0 -11
- package/dist/components/lottery-game-page.js +0 -572
- package/dist/components/lottery-game-page.js.map +0 -1
- package/dist/components/lottery-grid.js +0 -8
- package/dist/components/lottery-grid.js.map +0 -1
- package/dist/components/lottery-grid2.js +0 -248
- package/dist/components/lottery-grid2.js.map +0 -1
- package/dist/components/lottery-ticket-controller.js +0 -8
- package/dist/components/lottery-ticket-controller.js.map +0 -1
- package/dist/components/lottery-ticket-controller2.js +0 -185
- package/dist/components/lottery-ticket-controller2.js.map +0 -1
- package/dist/components/lottery-ticket.js +0 -8
- package/dist/components/lottery-ticket.js.map +0 -1
- package/dist/components/lottery-ticket2.js +0 -276
- package/dist/components/lottery-ticket2.js.map +0 -1
- package/dist/esm/helper-accordion.entry.js +0 -130
- package/dist/esm/helper-accordion.entry.js.map +0 -1
- package/dist/esm/helper-filters_2.entry.js.map +0 -1
- package/dist/esm/helper-modal.entry.js +0 -74
- package/dist/esm/helper-modal.entry.js.map +0 -1
- package/dist/esm/helper-pagination.entry.js.map +0 -1
- package/dist/esm/helper-tab.entry.js +0 -66
- package/dist/esm/helper-tab.entry.js.map +0 -1
- package/dist/esm/helper-tabs.entry.js +0 -72
- package/dist/esm/helper-tabs.entry.js.map +0 -1
- package/dist/esm/index-d1baacd4.js +0 -1298
- package/dist/esm/index-d1baacd4.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/lottery-bullet_2.entry.js +0 -276
- package/dist/esm/lottery-bullet_2.entry.js.map +0 -1
- package/dist/esm/lottery-draw-results-history.entry.js +0 -236
- package/dist/esm/lottery-draw-results-history.entry.js.map +0 -1
- package/dist/esm/lottery-game-details.entry.js +0 -49
- package/dist/esm/lottery-game-details.entry.js.map +0 -1
- package/dist/esm/lottery-game-page.entry.js +0 -452
- package/dist/esm/lottery-game-page.entry.js.map +0 -1
- package/dist/esm/lottery-game-page.js.map +0 -1
- package/dist/esm/lottery-ticket-controller.entry.js +0 -128
- package/dist/esm/lottery-ticket-controller.entry.js.map +0 -1
- package/dist/esm/lottery-ticket.entry.js +0 -229
- package/dist/esm/lottery-ticket.entry.js.map +0 -1
- 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/lottery-game-page/index.esm.js.map +0 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js.map +0 -1
- package/dist/lottery-game-page/p-12340c50.entry.js +0 -2921
- package/dist/lottery-game-page/p-12340c50.entry.js.map +0 -1
- package/dist/lottery-game-page/p-15309f9a.entry.js +0 -2
- package/dist/lottery-game-page/p-15309f9a.entry.js.map +0 -1
- package/dist/lottery-game-page/p-167c9dbe.entry.js +0 -2
- package/dist/lottery-game-page/p-167c9dbe.entry.js.map +0 -1
- package/dist/lottery-game-page/p-20e0c81c.entry.js +0 -2
- package/dist/lottery-game-page/p-20e0c81c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-59a96854.entry.js +0 -2
- package/dist/lottery-game-page/p-59a96854.entry.js.map +0 -1
- package/dist/lottery-game-page/p-662d9dac.entry.js +0 -2
- package/dist/lottery-game-page/p-662d9dac.entry.js.map +0 -1
- package/dist/lottery-game-page/p-66729e9c.entry.js +0 -2
- package/dist/lottery-game-page/p-66729e9c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-721345a7.entry.js +0 -2
- package/dist/lottery-game-page/p-721345a7.entry.js.map +0 -1
- package/dist/lottery-game-page/p-76c280ec.entry.js +0 -2
- package/dist/lottery-game-page/p-76c280ec.entry.js.map +0 -1
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js +0 -2
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js.map +0 -1
- package/dist/lottery-game-page/p-e765c7d9.js +0 -2
- package/dist/lottery-game-page/p-e765c7d9.js.map +0 -1
- package/dist/lottery-game-page/p-e86e2389.entry.js +0 -2
- package/dist/lottery-game-page/p-e86e2389.entry.js.map +0 -1
- package/dist/lottery-game-page/p-f399eef1.entry.js +0 -2
- package/dist/lottery-game-page/p-f399eef1.entry.js.map +0 -1
- package/dist/stencil.config.js.map +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -1,658 +1,592 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { translate } from
|
|
1
|
+
import { h, getAssetPath } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../utils/locale.utils";
|
|
3
3
|
import { isMobile } from "../../utils/utils";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import "../../../../../lottery-ticket-controller/dist/types/index";
|
|
5
|
+
import "../../../../../helper-modal/dist/types/index";
|
|
6
|
+
import "../../../../../lottery-game-details/dist/types/index";
|
|
7
|
+
import "../../../../../lottery-draw-results-history/dist/types/index";
|
|
8
|
+
import "../../../../../lottery-draw-results/dist/types/index";
|
|
9
9
|
export class LotteryGamePage {
|
|
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
|
-
|
|
42
|
-
|
|
10
|
+
constructor() {
|
|
11
|
+
// @TODO fix any type
|
|
12
|
+
this.userAgent = window.navigator.userAgent;
|
|
13
|
+
this.multiplier = false;
|
|
14
|
+
this.quickPick = false;
|
|
15
|
+
this.isMobile = isMobile(this.userAgent);
|
|
16
|
+
this.setClientStyling = () => {
|
|
17
|
+
let sheet = document.createElement('style');
|
|
18
|
+
sheet.innerHTML = this.clientStyling;
|
|
19
|
+
this.stylingContainer.prepend(sheet);
|
|
20
|
+
};
|
|
21
|
+
this.setClientStylingURL = () => {
|
|
22
|
+
let url = new URL(this.clientStylingurl);
|
|
23
|
+
let cssFile = document.createElement('style');
|
|
24
|
+
fetch(url.href)
|
|
25
|
+
.then((res) => res.text())
|
|
26
|
+
.then((data) => {
|
|
27
|
+
this.clientStylingUrlContent = data;
|
|
28
|
+
cssFile.innerHTML = data;
|
|
29
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
30
|
+
})
|
|
31
|
+
.catch((err) => {
|
|
32
|
+
console.log('error ', err);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
this.endpoint = undefined;
|
|
36
|
+
this.gameId = undefined;
|
|
37
|
+
this.playerId = undefined;
|
|
38
|
+
this.sessionId = undefined;
|
|
39
|
+
this.language = 'en';
|
|
40
|
+
this.backgroundUrl = undefined;
|
|
41
|
+
this.autoPick = false;
|
|
42
|
+
this.resetButton = false;
|
|
43
|
+
this.clientStyling = '';
|
|
44
|
+
this.clientStylingurl = '';
|
|
45
|
+
this.clientStylingUrlContent = '';
|
|
46
|
+
this.tickets = [];
|
|
47
|
+
this.tabIndex = 0;
|
|
48
|
+
this.hasErrors = false;
|
|
49
|
+
this.totalAmount = 0;
|
|
50
|
+
this.successVisible = false;
|
|
51
|
+
this.deleteVisible = false;
|
|
52
|
+
this.deleteEventData = undefined;
|
|
53
|
+
this.daysRemaining = undefined;
|
|
54
|
+
this.hoursRemaining = undefined;
|
|
55
|
+
this.minutesRemaining = undefined;
|
|
56
|
+
this.secondsRemaining = undefined;
|
|
57
|
+
this.latestDraw = {};
|
|
58
|
+
this.totalWinningsAmount = 0;
|
|
59
|
+
this.nextDate = undefined;
|
|
60
|
+
this.isLoggedIn = false;
|
|
61
|
+
this.loginModalVisible = false;
|
|
62
|
+
this.limitStylingAppends = false;
|
|
63
|
+
}
|
|
64
|
+
// @TODO fix `any` type later, I'm lazy now
|
|
65
|
+
connectedCallback() {
|
|
66
|
+
this.getGameDetails();
|
|
67
|
+
this.getDraws();
|
|
68
|
+
if (this.sessionId) {
|
|
69
|
+
this.isLoggedIn = true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
componentDidRender() {
|
|
73
|
+
// start custom styling area
|
|
74
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
75
|
+
if (this.clientStyling)
|
|
76
|
+
this.setClientStyling();
|
|
77
|
+
if (this.clientStylingurl)
|
|
78
|
+
this.setClientStylingURL();
|
|
79
|
+
this.limitStylingAppends = true;
|
|
80
|
+
}
|
|
81
|
+
// end custom styling area
|
|
82
|
+
}
|
|
83
|
+
countdownLogic(date) {
|
|
84
|
+
this.interval = setInterval(() => {
|
|
85
|
+
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
86
|
+
this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
|
|
87
|
+
this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
|
|
88
|
+
this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
|
|
89
|
+
}, 1000);
|
|
90
|
+
}
|
|
91
|
+
disconnectedCallback() {
|
|
92
|
+
clearInterval(this.interval);
|
|
93
|
+
}
|
|
94
|
+
getGameDetails() {
|
|
95
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
96
|
+
fetch(url.href)
|
|
97
|
+
.then((res) => {
|
|
98
|
+
if (res.status >= 300) {
|
|
99
|
+
this.hasErrors = true;
|
|
100
|
+
throw new Error('There was an error while fetching the data');
|
|
101
|
+
}
|
|
102
|
+
return res.json();
|
|
103
|
+
})
|
|
104
|
+
.then((data) => {
|
|
105
|
+
this.gameData = data;
|
|
106
|
+
this.basicStake = this.gameData.type.stakes[0].amount;
|
|
107
|
+
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
108
|
+
draws.length > 0 && (this.nextDraw = draws[0].id);
|
|
109
|
+
this.createNewTicket();
|
|
110
|
+
})
|
|
111
|
+
.catch((err) => {
|
|
112
|
+
this.hasErrors = true;
|
|
113
|
+
console.log('Error', err);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
calculateTotalAmount() {
|
|
117
|
+
const { currency } = this.gameData.type.stakes[0];
|
|
118
|
+
this.totalAmount = 0;
|
|
119
|
+
this.tickets.forEach((item) => {
|
|
120
|
+
if (item.completed) {
|
|
121
|
+
this.totalAmount += item.amount * item.stake;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
this.currency = currency;
|
|
125
|
+
}
|
|
126
|
+
// @TODO CustomEvent type
|
|
127
|
+
gridFilledHandler(event) {
|
|
128
|
+
// @TODO item ts
|
|
129
|
+
this.tickets = this.tickets.map((item) => {
|
|
130
|
+
if (item.ticketId == event.detail.id) {
|
|
131
|
+
let arr = item.selectedNumbers || [];
|
|
132
|
+
arr[event.detail.index] = event.detail.selectedNumbers.map((item) => parseInt(item, 10));
|
|
133
|
+
return {
|
|
134
|
+
gameId: item.gameId,
|
|
135
|
+
ticketId: item.ticketId,
|
|
136
|
+
completed: true,
|
|
137
|
+
amount: event.detail.draws,
|
|
138
|
+
stake: item.stake,
|
|
139
|
+
selectedNumbers: arr
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return item;
|
|
143
|
+
});
|
|
144
|
+
this.calculateTotalAmount();
|
|
145
|
+
}
|
|
146
|
+
// @TODO fix any type
|
|
147
|
+
gridDirtyHandler(event) {
|
|
148
|
+
// @TODO item ts
|
|
149
|
+
this.tickets = this.tickets.map((item) => {
|
|
150
|
+
if (item.gameId == event.detail.id) {
|
|
151
|
+
return {
|
|
152
|
+
gameId: item.gameId,
|
|
153
|
+
ticketId: item.ticketId,
|
|
154
|
+
completed: false,
|
|
155
|
+
amount: item.amount,
|
|
156
|
+
stake: item.stake,
|
|
157
|
+
grids: []
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return item;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
// @TODO CustomEvent type
|
|
164
|
+
deleteTicketHandler(event) {
|
|
165
|
+
this.deleteVisible = true;
|
|
166
|
+
this.deleteEventData = event;
|
|
167
|
+
}
|
|
168
|
+
modalCloseEvent() {
|
|
169
|
+
this.deleteVisible = false;
|
|
170
|
+
this.loginModalVisible = false;
|
|
171
|
+
}
|
|
172
|
+
stakeChangeHandler(event) {
|
|
173
|
+
const { ticketId, stake } = event.detail;
|
|
174
|
+
this.tickets[ticketId - 1].stake = stake;
|
|
175
|
+
this.calculateTotalAmount();
|
|
176
|
+
}
|
|
177
|
+
multiplierChangeHandler(event) {
|
|
178
|
+
this.multiplier = event.detail;
|
|
179
|
+
}
|
|
180
|
+
getDraws() {
|
|
181
|
+
// append from query param with the current date value in order to get the next draw
|
|
182
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
|
|
183
|
+
let drawOptions = {
|
|
184
|
+
method: "GET",
|
|
185
|
+
headers: {
|
|
186
|
+
'Content-Type': "application/json",
|
|
187
|
+
'Accept': 'application/json',
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
fetch(url.href, drawOptions)
|
|
191
|
+
.then((response) => {
|
|
192
|
+
return response.json();
|
|
193
|
+
})
|
|
194
|
+
.then((data) => {
|
|
195
|
+
var _a;
|
|
196
|
+
let upcoming = data.items.filter((item) => {
|
|
197
|
+
if (Date.parse(item.date) > new Date().getTime()) {
|
|
198
|
+
return !item.winningNumbers;
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
let past = data.items.filter((item) => item.winningNumbers);
|
|
202
|
+
if (!upcoming[0])
|
|
203
|
+
return;
|
|
204
|
+
this.latestDraw = upcoming[0];
|
|
205
|
+
this.nextDate = this.latestDraw.date;
|
|
206
|
+
this.countdownLogic(this.nextDate);
|
|
207
|
+
this.lastDrawId = past[past.length - 1].id;
|
|
208
|
+
// calculate total winnings
|
|
209
|
+
// @TODO fix any type
|
|
210
|
+
(_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
|
|
211
|
+
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
212
|
+
});
|
|
213
|
+
})
|
|
214
|
+
.catch((err) => {
|
|
215
|
+
console.log('error ', err);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
;
|
|
43
219
|
// @TODO fix any type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
220
|
+
confirmDeleteTicketHandler(event) {
|
|
221
|
+
// @TODO fix any type
|
|
222
|
+
this.tickets = this.tickets.filter((item) => {
|
|
223
|
+
if (item.ticketId == event.detail.ticketId) {
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
});
|
|
228
|
+
this.calculateTotalAmount();
|
|
229
|
+
this.deleteVisible = false;
|
|
230
|
+
}
|
|
231
|
+
createNewTicket() {
|
|
232
|
+
this.tickets = [
|
|
233
|
+
...this.tickets,
|
|
234
|
+
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
showLoginModal() {
|
|
238
|
+
this.loginModalVisible = true;
|
|
239
|
+
}
|
|
240
|
+
submitTickets() {
|
|
241
|
+
let url = new URL(`${this.endpoint}/tickets`);
|
|
242
|
+
// @TODO Body TS type
|
|
243
|
+
let body = {
|
|
244
|
+
gameId: this.gameId,
|
|
245
|
+
tickets: []
|
|
246
|
+
};
|
|
247
|
+
this.tickets.forEach((item) => {
|
|
248
|
+
body.tickets.push({
|
|
249
|
+
startingDrawId: this.nextDraw,
|
|
250
|
+
amount: item.stake,
|
|
251
|
+
gameId: this.gameId,
|
|
252
|
+
currency: this.currency,
|
|
253
|
+
selection: item.selectedNumbers,
|
|
254
|
+
multiplier: this.multiplier,
|
|
255
|
+
drawCount: item.amount,
|
|
256
|
+
quickPick: this.quickPick,
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
// @TODO Options TS type
|
|
260
|
+
let options = {
|
|
261
|
+
method: 'POST',
|
|
262
|
+
headers: {
|
|
263
|
+
'Content-Type': 'application/json',
|
|
264
|
+
'Accept': 'application/json',
|
|
265
|
+
'Authorization': `Bearer ${this.sessionId}`
|
|
266
|
+
},
|
|
267
|
+
body: JSON.stringify(body)
|
|
268
|
+
};
|
|
269
|
+
fetch(url.href, options)
|
|
270
|
+
.then((res) => {
|
|
271
|
+
if (res.status > 300) {
|
|
272
|
+
throw new Error('err');
|
|
273
|
+
}
|
|
274
|
+
return res.json();
|
|
275
|
+
})
|
|
276
|
+
.then((data) => {
|
|
277
|
+
// should we treat this res?
|
|
278
|
+
console.log('data', data);
|
|
279
|
+
})
|
|
280
|
+
.catch((err) => {
|
|
281
|
+
console.log('error ', err);
|
|
282
|
+
});
|
|
283
|
+
this.successVisible = true;
|
|
284
|
+
}
|
|
285
|
+
goBack() {
|
|
286
|
+
this.goBackEvent.emit();
|
|
74
287
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// start custom styling area
|
|
78
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
79
|
-
if (this.clientStyling)
|
|
80
|
-
this.setClientStyling();
|
|
81
|
-
if (this.clientStylingurl)
|
|
82
|
-
this.setClientStylingURL();
|
|
83
|
-
this.limitStylingAppends = true;
|
|
288
|
+
goToLobby() {
|
|
289
|
+
this.goToLobbyEvent.emit();
|
|
84
290
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (res.status >= 300) {
|
|
103
|
-
this.hasErrors = true;
|
|
104
|
-
throw new Error('There was an error while fetching the data');
|
|
105
|
-
}
|
|
106
|
-
return res.json();
|
|
107
|
-
})
|
|
108
|
-
.then((data) => {
|
|
109
|
-
this.gameData = data;
|
|
110
|
-
this.basicStake = this.gameData.type.stakes[0].amount;
|
|
111
|
-
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
112
|
-
draws.length > 0 && (this.nextDraw = draws[0].id);
|
|
113
|
-
this.createNewTicket();
|
|
114
|
-
})
|
|
115
|
-
.catch((err) => {
|
|
116
|
-
this.hasErrors = true;
|
|
117
|
-
console.log('Error', err);
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
calculateTotalAmount() {
|
|
121
|
-
const { currency } = this.gameData.type.stakes[0];
|
|
122
|
-
this.totalAmount = 0;
|
|
123
|
-
this.tickets.forEach((item) => {
|
|
124
|
-
if (item.completed) {
|
|
125
|
-
this.totalAmount += item.amount * item.stake;
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
this.currency = currency;
|
|
129
|
-
}
|
|
130
|
-
// @TODO CustomEvent type
|
|
131
|
-
gridFilledHandler(event) {
|
|
132
|
-
// @TODO item ts
|
|
133
|
-
this.tickets = this.tickets.map((item) => {
|
|
134
|
-
if (item.ticketId == event.detail.id) {
|
|
135
|
-
let arr = item.selectedNumbers || [];
|
|
136
|
-
arr[event.detail.index] = event.detail.selectedNumbers.map((item) => parseInt(item, 10));
|
|
291
|
+
render() {
|
|
292
|
+
//Get path for background image
|
|
293
|
+
const backgroundImagePath = getAssetPath(this.isMobile ? '/assets/chrono_lottery_mobile.png' : '/assets/chrono_desktop.png');
|
|
294
|
+
if (this.hasErrors) {
|
|
295
|
+
return (h("div", { class: "GamePage" }, h("div", { class: "Title" }, translate('error', this.language))));
|
|
296
|
+
}
|
|
297
|
+
return (
|
|
298
|
+
/* Game details */
|
|
299
|
+
h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, h("div", { class: "GridBanner", style: { 'background': `url(${this.backgroundUrl ? this.backgroundUrl : backgroundImagePath})`, 'background-size': 'contain', 'background-repeat': 'no-repeat', 'background-position': 'center' } }, h("div", { class: "BannerButtonsWrapper" }, h("button", { class: "BannerBackButton", onClick: this.goBack.bind(this) }, h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), h("button", { class: "BannerLobbyButton", onClick: this.goToLobby.bind(this) }, translate('lobbyButton', this.language))), h("div", { class: "Tabs" }, h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), h("div", { class: "NextDrawWrapper" }, h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), h("div", { class: "NextDraw" }, h("p", { class: "BannerText" }, translate('nextDraw', this.language)), h("div", { class: "BannerCountdown" }, h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
300
|
+
h("div", { class: "GamePageContent" }, h("div", { class: "GameDetails" }, h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton, "total-controllers": this.tickets.length, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("div", { class: "CreateNewTicket" }, h("button", { onClick: () => this.createNewTicket() }, "+"), h("span", null, translate('createTicket', this.language)))), h("div", { class: "OrderSummary" }, h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", h("span", null, this.tickets.length)), h("hr", null), h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", h("span", null, this.totalAmount, " ", this.currency)), h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
301
|
+
h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
302
|
+
h("div", null, h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)), h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
303
|
+
h("div", null, h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)), h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }), h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("helper-modal", { "title-modal": "Success", visible: this.successVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))), h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "DeleteTicketModalWrapper" }, h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)), h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)), h("div", { class: "DeleteTicketModalButtons" }, h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate('deleteTicketModalCancel', this.language)), h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate('deleteTicketModalConfirm', this.language)))))));
|
|
304
|
+
}
|
|
305
|
+
static get is() { return "lottery-game-page"; }
|
|
306
|
+
static get encapsulation() { return "shadow"; }
|
|
307
|
+
static get originalStyleUrls() {
|
|
137
308
|
return {
|
|
138
|
-
|
|
139
|
-
ticketId: item.ticketId,
|
|
140
|
-
completed: true,
|
|
141
|
-
amount: event.detail.draws,
|
|
142
|
-
stake: item.stake,
|
|
143
|
-
selectedNumbers: arr
|
|
309
|
+
"$": ["lottery-game-page.scss"]
|
|
144
310
|
};
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
});
|
|
148
|
-
this.calculateTotalAmount();
|
|
149
|
-
}
|
|
150
|
-
// @TODO fix any type
|
|
151
|
-
gridDirtyHandler(event) {
|
|
152
|
-
// @TODO item ts
|
|
153
|
-
this.tickets = this.tickets.map((item) => {
|
|
154
|
-
if (item.gameId == event.detail.id) {
|
|
311
|
+
}
|
|
312
|
+
static get styleUrls() {
|
|
155
313
|
return {
|
|
156
|
-
|
|
157
|
-
ticketId: item.ticketId,
|
|
158
|
-
completed: false,
|
|
159
|
-
amount: item.amount,
|
|
160
|
-
stake: item.stake,
|
|
161
|
-
grids: []
|
|
314
|
+
"$": ["lottery-game-page.css"]
|
|
162
315
|
};
|
|
163
|
-
}
|
|
164
|
-
return item;
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
// @TODO CustomEvent type
|
|
168
|
-
deleteTicketHandler(event) {
|
|
169
|
-
this.deleteVisible = true;
|
|
170
|
-
this.deleteEventData = event;
|
|
171
|
-
}
|
|
172
|
-
modalCloseEvent() {
|
|
173
|
-
this.deleteVisible = false;
|
|
174
|
-
this.loginModalVisible = false;
|
|
175
|
-
}
|
|
176
|
-
stakeChangeHandler(event) {
|
|
177
|
-
const { ticketId, stake } = event.detail;
|
|
178
|
-
this.tickets[ticketId - 1].stake = stake;
|
|
179
|
-
this.calculateTotalAmount();
|
|
180
|
-
}
|
|
181
|
-
multiplierChangeHandler(event) {
|
|
182
|
-
this.multiplier = event.detail;
|
|
183
|
-
}
|
|
184
|
-
getDraws() {
|
|
185
|
-
// append from query param with the current date value in order to get the next draw
|
|
186
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
|
|
187
|
-
let drawOptions = {
|
|
188
|
-
method: "GET",
|
|
189
|
-
headers: {
|
|
190
|
-
'Content-Type': "application/json",
|
|
191
|
-
'Accept': 'application/json',
|
|
192
|
-
},
|
|
193
|
-
};
|
|
194
|
-
fetch(url.href, drawOptions)
|
|
195
|
-
.then((response) => {
|
|
196
|
-
return response.json();
|
|
197
|
-
})
|
|
198
|
-
.then((data) => {
|
|
199
|
-
var _a;
|
|
200
|
-
let upcoming = data.items.filter((item) => {
|
|
201
|
-
if (Date.parse(item.date) > new Date().getTime()) {
|
|
202
|
-
return !item.winningNumbers;
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
let past = data.items.filter((item) => item.winningNumbers);
|
|
206
|
-
if (!upcoming[0])
|
|
207
|
-
return;
|
|
208
|
-
this.latestDraw = upcoming[0];
|
|
209
|
-
this.nextDate = this.latestDraw.date;
|
|
210
|
-
this.countdownLogic(this.nextDate);
|
|
211
|
-
this.lastDrawId = past[past.length - 1].id;
|
|
212
|
-
// calculate total winnings
|
|
213
|
-
// @TODO fix any type
|
|
214
|
-
(_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
|
|
215
|
-
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
216
|
-
});
|
|
217
|
-
})
|
|
218
|
-
.catch((err) => {
|
|
219
|
-
console.log('error ', err);
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
;
|
|
223
|
-
// @TODO fix any type
|
|
224
|
-
confirmDeleteTicketHandler(event) {
|
|
225
|
-
// @TODO fix any type
|
|
226
|
-
this.tickets = this.tickets.filter((item) => {
|
|
227
|
-
if (item.ticketId == event.detail.ticketId) {
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
return true;
|
|
231
|
-
});
|
|
232
|
-
this.calculateTotalAmount();
|
|
233
|
-
this.deleteVisible = false;
|
|
234
|
-
}
|
|
235
|
-
createNewTicket() {
|
|
236
|
-
this.tickets = [
|
|
237
|
-
...this.tickets,
|
|
238
|
-
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
239
|
-
];
|
|
240
|
-
}
|
|
241
|
-
showLoginModal() {
|
|
242
|
-
this.loginModalVisible = true;
|
|
243
|
-
}
|
|
244
|
-
submitTickets() {
|
|
245
|
-
let url = new URL(`${this.endpoint}/tickets`);
|
|
246
|
-
// @TODO Body TS type
|
|
247
|
-
let body = {
|
|
248
|
-
gameId: this.gameId,
|
|
249
|
-
tickets: []
|
|
250
|
-
};
|
|
251
|
-
this.tickets.forEach((item) => {
|
|
252
|
-
body.tickets.push({
|
|
253
|
-
startingDrawId: this.nextDraw,
|
|
254
|
-
amount: item.stake,
|
|
255
|
-
gameId: this.gameId,
|
|
256
|
-
currency: this.currency,
|
|
257
|
-
selection: item.selectedNumbers,
|
|
258
|
-
multiplier: this.multiplier,
|
|
259
|
-
drawCount: item.amount,
|
|
260
|
-
quickPick: this.quickPick,
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
// @TODO Options TS type
|
|
264
|
-
let options = {
|
|
265
|
-
method: 'POST',
|
|
266
|
-
headers: {
|
|
267
|
-
'Content-Type': 'application/json',
|
|
268
|
-
'Accept': 'application/json',
|
|
269
|
-
'Authorization': `Bearer ${this.sessionId}`
|
|
270
|
-
},
|
|
271
|
-
body: JSON.stringify(body)
|
|
272
|
-
};
|
|
273
|
-
fetch(url.href, options)
|
|
274
|
-
.then((res) => {
|
|
275
|
-
if (res.status > 300) {
|
|
276
|
-
throw new Error('err');
|
|
277
|
-
}
|
|
278
|
-
return res.json();
|
|
279
|
-
})
|
|
280
|
-
.then((data) => {
|
|
281
|
-
// should we treat this res?
|
|
282
|
-
console.log('data', data);
|
|
283
|
-
})
|
|
284
|
-
.catch((err) => {
|
|
285
|
-
console.log('error ', err);
|
|
286
|
-
});
|
|
287
|
-
this.successVisible = true;
|
|
288
|
-
}
|
|
289
|
-
goBack() {
|
|
290
|
-
this.goBackEvent.emit();
|
|
291
|
-
}
|
|
292
|
-
goToLobby() {
|
|
293
|
-
this.goToLobbyEvent.emit();
|
|
294
|
-
}
|
|
295
|
-
render() {
|
|
296
|
-
//Get path for background image
|
|
297
|
-
const backgroundImagePath = getAssetPath(this.isMobile ? '/assets/chrono_lottery_mobile.png' : '/assets/chrono_desktop.png');
|
|
298
|
-
if (this.hasErrors) {
|
|
299
|
-
return (h("div", { class: "GamePage" },
|
|
300
|
-
h("div", { class: "Title" }, translate('error', this.language))));
|
|
301
316
|
}
|
|
302
|
-
return
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
" ",
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
317
|
+
static get assetsDirs() { return ["static"]; }
|
|
318
|
+
static get properties() {
|
|
319
|
+
return {
|
|
320
|
+
"endpoint": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"mutable": false,
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "string",
|
|
325
|
+
"resolved": "string",
|
|
326
|
+
"references": {}
|
|
327
|
+
},
|
|
328
|
+
"required": false,
|
|
329
|
+
"optional": false,
|
|
330
|
+
"docs": {
|
|
331
|
+
"tags": [],
|
|
332
|
+
"text": "Endpoint URL for the source of data"
|
|
333
|
+
},
|
|
334
|
+
"attribute": "endpoint",
|
|
335
|
+
"reflect": true
|
|
336
|
+
},
|
|
337
|
+
"gameId": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"mutable": false,
|
|
340
|
+
"complexType": {
|
|
341
|
+
"original": "string",
|
|
342
|
+
"resolved": "string",
|
|
343
|
+
"references": {}
|
|
344
|
+
},
|
|
345
|
+
"required": false,
|
|
346
|
+
"optional": false,
|
|
347
|
+
"docs": {
|
|
348
|
+
"tags": [],
|
|
349
|
+
"text": "GameID of the lottery game"
|
|
350
|
+
},
|
|
351
|
+
"attribute": "game-id",
|
|
352
|
+
"reflect": true
|
|
353
|
+
},
|
|
354
|
+
"playerId": {
|
|
355
|
+
"type": "number",
|
|
356
|
+
"mutable": false,
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "number",
|
|
359
|
+
"resolved": "number",
|
|
360
|
+
"references": {}
|
|
361
|
+
},
|
|
362
|
+
"required": false,
|
|
363
|
+
"optional": false,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": "Player ID"
|
|
367
|
+
},
|
|
368
|
+
"attribute": "player-id",
|
|
369
|
+
"reflect": true
|
|
370
|
+
},
|
|
371
|
+
"sessionId": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"mutable": false,
|
|
374
|
+
"complexType": {
|
|
375
|
+
"original": "string",
|
|
376
|
+
"resolved": "string",
|
|
377
|
+
"references": {}
|
|
378
|
+
},
|
|
379
|
+
"required": false,
|
|
380
|
+
"optional": false,
|
|
381
|
+
"docs": {
|
|
382
|
+
"tags": [],
|
|
383
|
+
"text": "GIC Session"
|
|
384
|
+
},
|
|
385
|
+
"attribute": "session-id",
|
|
386
|
+
"reflect": true
|
|
387
|
+
},
|
|
388
|
+
"language": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"mutable": false,
|
|
391
|
+
"complexType": {
|
|
392
|
+
"original": "string",
|
|
393
|
+
"resolved": "string",
|
|
394
|
+
"references": {}
|
|
395
|
+
},
|
|
396
|
+
"required": false,
|
|
397
|
+
"optional": false,
|
|
398
|
+
"docs": {
|
|
399
|
+
"tags": [],
|
|
400
|
+
"text": "Language of the widget"
|
|
401
|
+
},
|
|
402
|
+
"attribute": "language",
|
|
403
|
+
"reflect": true,
|
|
404
|
+
"defaultValue": "'en'"
|
|
405
|
+
},
|
|
406
|
+
"backgroundUrl": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"mutable": false,
|
|
409
|
+
"complexType": {
|
|
410
|
+
"original": "string",
|
|
411
|
+
"resolved": "string",
|
|
412
|
+
"references": {}
|
|
413
|
+
},
|
|
414
|
+
"required": false,
|
|
415
|
+
"optional": false,
|
|
416
|
+
"docs": {
|
|
417
|
+
"tags": [],
|
|
418
|
+
"text": "Url for banner's custom background image"
|
|
419
|
+
},
|
|
420
|
+
"attribute": "background-url",
|
|
421
|
+
"reflect": true
|
|
422
|
+
},
|
|
423
|
+
"autoPick": {
|
|
424
|
+
"type": "boolean",
|
|
425
|
+
"mutable": false,
|
|
426
|
+
"complexType": {
|
|
427
|
+
"original": "boolean",
|
|
428
|
+
"resolved": "boolean",
|
|
429
|
+
"references": {}
|
|
430
|
+
},
|
|
431
|
+
"required": false,
|
|
432
|
+
"optional": false,
|
|
433
|
+
"docs": {
|
|
434
|
+
"tags": [],
|
|
435
|
+
"text": "Shows the auto-pick button"
|
|
436
|
+
},
|
|
437
|
+
"attribute": "auto-pick",
|
|
438
|
+
"reflect": true,
|
|
439
|
+
"defaultValue": "false"
|
|
440
|
+
},
|
|
441
|
+
"resetButton": {
|
|
442
|
+
"type": "boolean",
|
|
443
|
+
"mutable": false,
|
|
444
|
+
"complexType": {
|
|
445
|
+
"original": "boolean",
|
|
446
|
+
"resolved": "boolean",
|
|
447
|
+
"references": {}
|
|
448
|
+
},
|
|
449
|
+
"required": false,
|
|
450
|
+
"optional": false,
|
|
451
|
+
"docs": {
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": "Shows the reset button"
|
|
454
|
+
},
|
|
455
|
+
"attribute": "reset-button",
|
|
456
|
+
"reflect": true,
|
|
457
|
+
"defaultValue": "false"
|
|
458
|
+
},
|
|
459
|
+
"clientStyling": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"mutable": false,
|
|
462
|
+
"complexType": {
|
|
463
|
+
"original": "string",
|
|
464
|
+
"resolved": "string",
|
|
465
|
+
"references": {}
|
|
466
|
+
},
|
|
467
|
+
"required": false,
|
|
468
|
+
"optional": false,
|
|
469
|
+
"docs": {
|
|
470
|
+
"tags": [],
|
|
471
|
+
"text": "Client custom styling via string"
|
|
472
|
+
},
|
|
473
|
+
"attribute": "client-styling",
|
|
474
|
+
"reflect": true,
|
|
475
|
+
"defaultValue": "''"
|
|
476
|
+
},
|
|
477
|
+
"clientStylingurl": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"mutable": false,
|
|
480
|
+
"complexType": {
|
|
481
|
+
"original": "string",
|
|
482
|
+
"resolved": "string",
|
|
483
|
+
"references": {}
|
|
484
|
+
},
|
|
485
|
+
"required": false,
|
|
486
|
+
"optional": false,
|
|
487
|
+
"docs": {
|
|
488
|
+
"tags": [],
|
|
489
|
+
"text": "Client custom styling via url"
|
|
490
|
+
},
|
|
491
|
+
"attribute": "client-stylingurl",
|
|
492
|
+
"reflect": true,
|
|
493
|
+
"defaultValue": "''"
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
static get states() {
|
|
498
|
+
return {
|
|
499
|
+
"clientStylingUrlContent": {},
|
|
500
|
+
"tickets": {},
|
|
501
|
+
"tabIndex": {},
|
|
502
|
+
"hasErrors": {},
|
|
503
|
+
"totalAmount": {},
|
|
504
|
+
"successVisible": {},
|
|
505
|
+
"deleteVisible": {},
|
|
506
|
+
"deleteEventData": {},
|
|
507
|
+
"daysRemaining": {},
|
|
508
|
+
"hoursRemaining": {},
|
|
509
|
+
"minutesRemaining": {},
|
|
510
|
+
"secondsRemaining": {},
|
|
511
|
+
"latestDraw": {},
|
|
512
|
+
"totalWinningsAmount": {},
|
|
513
|
+
"nextDate": {},
|
|
514
|
+
"isLoggedIn": {},
|
|
515
|
+
"loginModalVisible": {},
|
|
516
|
+
"limitStylingAppends": {}
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
static get events() {
|
|
520
|
+
return [{
|
|
521
|
+
"method": "goBackEvent",
|
|
522
|
+
"name": "goBackEvent",
|
|
523
|
+
"bubbles": true,
|
|
524
|
+
"cancelable": true,
|
|
525
|
+
"composed": true,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": ""
|
|
529
|
+
},
|
|
530
|
+
"complexType": {
|
|
531
|
+
"original": "string",
|
|
532
|
+
"resolved": "string",
|
|
533
|
+
"references": {}
|
|
534
|
+
}
|
|
535
|
+
}, {
|
|
536
|
+
"method": "goToLobbyEvent",
|
|
537
|
+
"name": "goToLobbyEvent",
|
|
538
|
+
"bubbles": true,
|
|
539
|
+
"cancelable": true,
|
|
540
|
+
"composed": true,
|
|
541
|
+
"docs": {
|
|
542
|
+
"tags": [],
|
|
543
|
+
"text": ""
|
|
544
|
+
},
|
|
545
|
+
"complexType": {
|
|
546
|
+
"original": "string",
|
|
547
|
+
"resolved": "string",
|
|
548
|
+
"references": {}
|
|
549
|
+
}
|
|
550
|
+
}];
|
|
551
|
+
}
|
|
552
|
+
static get elementRef() { return "element"; }
|
|
553
|
+
static get listeners() {
|
|
554
|
+
return [{
|
|
555
|
+
"name": "ticketCompleted",
|
|
556
|
+
"method": "gridFilledHandler",
|
|
557
|
+
"target": undefined,
|
|
558
|
+
"capture": false,
|
|
559
|
+
"passive": false
|
|
560
|
+
}, {
|
|
561
|
+
"name": "gridDirty",
|
|
562
|
+
"method": "gridDirtyHandler",
|
|
563
|
+
"target": undefined,
|
|
564
|
+
"capture": false,
|
|
565
|
+
"passive": false
|
|
566
|
+
}, {
|
|
567
|
+
"name": "deleteTicket",
|
|
568
|
+
"method": "deleteTicketHandler",
|
|
569
|
+
"target": undefined,
|
|
570
|
+
"capture": false,
|
|
571
|
+
"passive": false
|
|
572
|
+
}, {
|
|
573
|
+
"name": "modalCloseEvent",
|
|
574
|
+
"method": "modalCloseEvent",
|
|
575
|
+
"target": undefined,
|
|
576
|
+
"capture": false,
|
|
577
|
+
"passive": false
|
|
578
|
+
}, {
|
|
579
|
+
"name": "stakeChange",
|
|
580
|
+
"method": "stakeChangeHandler",
|
|
581
|
+
"target": undefined,
|
|
582
|
+
"capture": false,
|
|
583
|
+
"passive": false
|
|
584
|
+
}, {
|
|
585
|
+
"name": "multiplierChange",
|
|
586
|
+
"method": "multiplierChangeHandler",
|
|
587
|
+
"target": undefined,
|
|
588
|
+
"capture": false,
|
|
589
|
+
"passive": false
|
|
590
|
+
}];
|
|
566
591
|
}
|
|
567
|
-
}; }
|
|
568
|
-
static get states() { return {
|
|
569
|
-
"clientStylingUrlContent": {},
|
|
570
|
-
"tickets": {},
|
|
571
|
-
"tabIndex": {},
|
|
572
|
-
"hasErrors": {},
|
|
573
|
-
"totalAmount": {},
|
|
574
|
-
"successVisible": {},
|
|
575
|
-
"deleteVisible": {},
|
|
576
|
-
"deleteEventData": {},
|
|
577
|
-
"daysRemaining": {},
|
|
578
|
-
"hoursRemaining": {},
|
|
579
|
-
"minutesRemaining": {},
|
|
580
|
-
"secondsRemaining": {},
|
|
581
|
-
"latestDraw": {},
|
|
582
|
-
"totalWinningsAmount": {},
|
|
583
|
-
"nextDate": {},
|
|
584
|
-
"isLoggedIn": {},
|
|
585
|
-
"loginModalVisible": {},
|
|
586
|
-
"limitStylingAppends": {}
|
|
587
|
-
}; }
|
|
588
|
-
static get events() { return [{
|
|
589
|
-
"method": "goBackEvent",
|
|
590
|
-
"name": "goBackEvent",
|
|
591
|
-
"bubbles": true,
|
|
592
|
-
"cancelable": true,
|
|
593
|
-
"composed": true,
|
|
594
|
-
"docs": {
|
|
595
|
-
"tags": [],
|
|
596
|
-
"text": ""
|
|
597
|
-
},
|
|
598
|
-
"complexType": {
|
|
599
|
-
"original": "string",
|
|
600
|
-
"resolved": "string",
|
|
601
|
-
"references": {}
|
|
602
|
-
}
|
|
603
|
-
}, {
|
|
604
|
-
"method": "goToLobbyEvent",
|
|
605
|
-
"name": "goToLobbyEvent",
|
|
606
|
-
"bubbles": true,
|
|
607
|
-
"cancelable": true,
|
|
608
|
-
"composed": true,
|
|
609
|
-
"docs": {
|
|
610
|
-
"tags": [],
|
|
611
|
-
"text": ""
|
|
612
|
-
},
|
|
613
|
-
"complexType": {
|
|
614
|
-
"original": "string",
|
|
615
|
-
"resolved": "string",
|
|
616
|
-
"references": {}
|
|
617
|
-
}
|
|
618
|
-
}]; }
|
|
619
|
-
static get elementRef() { return "element"; }
|
|
620
|
-
static get listeners() { return [{
|
|
621
|
-
"name": "ticketCompleted",
|
|
622
|
-
"method": "gridFilledHandler",
|
|
623
|
-
"target": undefined,
|
|
624
|
-
"capture": false,
|
|
625
|
-
"passive": false
|
|
626
|
-
}, {
|
|
627
|
-
"name": "gridDirty",
|
|
628
|
-
"method": "gridDirtyHandler",
|
|
629
|
-
"target": undefined,
|
|
630
|
-
"capture": false,
|
|
631
|
-
"passive": false
|
|
632
|
-
}, {
|
|
633
|
-
"name": "deleteTicket",
|
|
634
|
-
"method": "deleteTicketHandler",
|
|
635
|
-
"target": undefined,
|
|
636
|
-
"capture": false,
|
|
637
|
-
"passive": false
|
|
638
|
-
}, {
|
|
639
|
-
"name": "modalCloseEvent",
|
|
640
|
-
"method": "modalCloseEvent",
|
|
641
|
-
"target": undefined,
|
|
642
|
-
"capture": false,
|
|
643
|
-
"passive": false
|
|
644
|
-
}, {
|
|
645
|
-
"name": "stakeChange",
|
|
646
|
-
"method": "stakeChangeHandler",
|
|
647
|
-
"target": undefined,
|
|
648
|
-
"capture": false,
|
|
649
|
-
"passive": false
|
|
650
|
-
}, {
|
|
651
|
-
"name": "multiplierChange",
|
|
652
|
-
"method": "multiplierChangeHandler",
|
|
653
|
-
"target": undefined,
|
|
654
|
-
"capture": false,
|
|
655
|
-
"passive": false
|
|
656
|
-
}]; }
|
|
657
592
|
}
|
|
658
|
-
//# sourceMappingURL=lottery-game-page.js.map
|