@everymatrix/lottery-hakuna-ticket 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-14ac4886.js +1356 -0
  3. package/dist/cjs/index.cjs.js +10 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/lottery-button_6.cjs.entry.js +967 -0
  6. package/dist/cjs/lottery-hakuna-ticket-a4c6f2d2.js +384 -0
  7. package/dist/cjs/lottery-hakuna-ticket.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +43 -0
  9. package/dist/collection/components/lottery-hakuna-ticket/index.js +1 -0
  10. package/dist/collection/components/lottery-hakuna-ticket/lottery-hakuna-ticket.css +113 -0
  11. package/dist/collection/components/lottery-hakuna-ticket/lottery-hakuna-ticket.js +622 -0
  12. package/dist/collection/components/lottery-hakuna-ticket/lottery-hakuna-ticket.types.js +5 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +85 -0
  15. package/dist/collection/utils/utils.js +3 -0
  16. package/dist/esm/app-globals-0f993ce5.js +3 -0
  17. package/dist/esm/index-032d8575.js +1328 -0
  18. package/dist/esm/index.js +2 -0
  19. package/dist/esm/loader.js +11 -0
  20. package/dist/esm/lottery-button_6.entry.js +959 -0
  21. package/dist/esm/lottery-hakuna-ticket-2019142e.js +379 -0
  22. package/dist/esm/lottery-hakuna-ticket.js +20 -0
  23. package/dist/index.cjs.js +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/lottery-hakuna-ticket/app-globals-0f993ce5.js +1 -0
  26. package/dist/lottery-hakuna-ticket/index-032d8575.js +2 -0
  27. package/dist/lottery-hakuna-ticket/index.esm.js +1 -0
  28. package/dist/lottery-hakuna-ticket/lottery-button_6.entry.js +1 -0
  29. package/dist/lottery-hakuna-ticket/lottery-hakuna-ticket-2019142e.js +1 -0
  30. package/dist/lottery-hakuna-ticket/lottery-hakuna-ticket.esm.js +1 -0
  31. package/dist/stencil.config.dev.js +19 -0
  32. package/dist/stencil.config.js +19 -0
  33. package/dist/storybook/main.js +43 -0
  34. package/dist/storybook/preview.js +9 -0
  35. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  36. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/packages/stencil/lottery-hakuna-ticket/stencil.config.d.ts +2 -0
  37. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/packages/stencil/lottery-hakuna-ticket/stencil.config.dev.d.ts +2 -0
  38. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/packages/stencil/lottery-hakuna-ticket/storybook/main.d.ts +3 -0
  39. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/packages/stencil/lottery-hakuna-ticket/storybook/preview.d.ts +70 -0
  40. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/tools/plugins/index.d.ts +4 -0
  41. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  42. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  43. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  44. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  45. package/dist/types/components/lottery-hakuna-ticket/index.d.ts +1 -0
  46. package/dist/types/components/lottery-hakuna-ticket/lottery-hakuna-ticket.d.ts +110 -0
  47. package/dist/types/components/lottery-hakuna-ticket/lottery-hakuna-ticket.types.d.ts +97 -0
  48. package/dist/types/components.d.ts +190 -0
  49. package/dist/types/index.d.ts +1 -0
  50. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  51. package/dist/types/utils/locale.utils.d.ts +3 -0
  52. package/dist/types/utils/utils.d.ts +1 -0
  53. package/loader/cdn.js +1 -0
  54. package/loader/index.cjs.js +1 -0
  55. package/loader/index.d.ts +24 -0
  56. package/loader/index.es2017.js +1 -0
  57. package/loader/index.js +2 -0
  58. package/loader/package.json +11 -0
  59. package/package.json +27 -0
@@ -0,0 +1,379 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-032d8575.js';
2
+
3
+ var CurSelectionBtnType;
4
+ (function (CurSelectionBtnType) {
5
+ CurSelectionBtnType["UNSELECTED"] = "unselected";
6
+ CurSelectionBtnType["SELECTED"] = "selected";
7
+ })(CurSelectionBtnType || (CurSelectionBtnType = {}));
8
+
9
+ /**
10
+ * @name setClientStyling
11
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
12
+ * @param {HTMLElement} stylingContainer The reference element of the widget
13
+ * @param {string} clientStyling The style content
14
+ */
15
+ function setClientStyling(stylingContainer, clientStyling) {
16
+ if (stylingContainer) {
17
+ const sheet = document.createElement('style');
18
+ sheet.innerHTML = clientStyling;
19
+ stylingContainer.appendChild(sheet);
20
+ }
21
+ }
22
+
23
+ /**
24
+ * @name setClientStylingURL
25
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
26
+ * @param {HTMLElement} stylingContainer The reference element of the widget
27
+ * @param {string} clientStylingUrl The URL of the style content
28
+ */
29
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
30
+ if (!stylingContainer || !clientStylingUrl) return;
31
+
32
+ const url = new URL(clientStylingUrl);
33
+
34
+ fetch(url.href)
35
+ .then((res) => res.text())
36
+ .then((data) => {
37
+ const cssFile = document.createElement('style');
38
+ cssFile.innerHTML = data;
39
+ if (stylingContainer) {
40
+ stylingContainer.appendChild(cssFile);
41
+ }
42
+ })
43
+ .catch((err) => {
44
+ console.error('There was an error while trying to load client styling from URL', err);
45
+ });
46
+ }
47
+
48
+ /**
49
+ * @name setStreamLibrary
50
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
51
+ * @param {HTMLElement} stylingContainer The highest element of the widget
52
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
53
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
54
+ */
55
+ function setStreamStyling(stylingContainer, domain, subscription) {
56
+ if (window.emMessageBus) {
57
+ const sheet = document.createElement('style');
58
+
59
+ window.emMessageBus.subscribe(domain, (data) => {
60
+ sheet.innerHTML = data;
61
+ if (stylingContainer) {
62
+ stylingContainer.appendChild(sheet);
63
+ }
64
+ });
65
+ }
66
+ }
67
+
68
+ const DEFAULT_LANGUAGE = 'en';
69
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
70
+ const TRANSLATIONS = {
71
+ en: {
72
+ ticket: 'Ticket',
73
+ loading: 'Loading, please wait ...',
74
+ error: 'It was an error while trying to fetch the data',
75
+ quickPick: 'Quick Pick',
76
+ submit: 'SUBMIT'
77
+ },
78
+ ro: {
79
+ loading: 'Se incarca, va rugam asteptati ...',
80
+ error: 'A fost o eroare in timp ce asteptam datele',
81
+ multiplier: 'Multiplicator',
82
+ numberOfDraws: 'Numarul de extrageri',
83
+ wagerPerDraw: 'Pariul per extragere',
84
+ resetButton: 'Reseteaza',
85
+ autoButton: 'quick pick',
86
+ lines: 'Select how many lines you want to buy',
87
+ lineName: 'Line',
88
+ playType: 'Select one play type you want to buy'
89
+ },
90
+ fr: {
91
+ loading: 'Loading, please wait ...',
92
+ error: 'It was an error while trying to fetch the data',
93
+ multiplier: 'Multiplier',
94
+ numberOfDraws: 'Number of Draws',
95
+ wagerPerDraw: 'Wager per Draw',
96
+ resetButton: 'Reset',
97
+ autoButton: 'quick pick',
98
+ lines: 'Select how many lines you want to buy',
99
+ lineName: 'Line',
100
+ playType: 'Select one play type you want to buy'
101
+ },
102
+ ar: {
103
+ loading: 'Loading, please wait ...',
104
+ error: 'It was an error while trying to fetch the data',
105
+ multiplier: 'Multiplier',
106
+ numberOfDraws: 'Number of Draws',
107
+ wagerPerDraw: 'Wager per Draw',
108
+ resetButton: 'Reset',
109
+ autoButton: 'quick pick',
110
+ lines: 'Select how many lines you want to buy',
111
+ lineName: 'Line',
112
+ playType: 'Select one play type you want to buy'
113
+ },
114
+ hr: {
115
+ loading: 'Učitavanje, molimo pričekajte ...',
116
+ error: 'Došlo je do pogreške prilikom pokušaja dohvaćanja podataka',
117
+ multiplier: 'Multiplikator',
118
+ numberOfDraws: 'Broj izvlačenja',
119
+ wagerPerDraw: 'Ulog po izvlačenju',
120
+ resetButton: 'Resetiraj',
121
+ autoButton: 'quick pick',
122
+ lines: 'Select how many lines you want to buy',
123
+ lineName: 'Line',
124
+ playType: 'Select one play type you want to buy'
125
+ }
126
+ };
127
+ const translate = (key, customLang) => {
128
+ const lang = customLang;
129
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
130
+ };
131
+ const getTranslations = (data) => {
132
+ Object.keys(data).forEach((item) => {
133
+ for (let key in data[item]) {
134
+ TRANSLATIONS[item][key] = data[item][key];
135
+ }
136
+ });
137
+ };
138
+ const resolveTranslationUrl = async (translationUrl) => {
139
+ if (translationUrl) {
140
+ try {
141
+ const response = await fetch(translationUrl);
142
+ if (!response.ok) {
143
+ throw new Error(`HTTP error! status: ${response.status}`);
144
+ }
145
+ const translations = await response.json();
146
+ getTranslations(translations);
147
+ }
148
+ catch (error) {
149
+ console.error('Failed to fetch or parse translations from URL:', error);
150
+ }
151
+ }
152
+ };
153
+
154
+ const lotteryHakunaTicketCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{--emw--color-background-secondary:var(--emw-hakuna-bg-secondary, #120505);--emw--color-primary:var(--emw-hakuna-color-primary, #c52217);--emw--color-background:var(--emw-hakuna-bg-primary, #2c2525);--emw--color-background-tertiary:var(--emw-hakuna-bg-tertiary, #4f2421);--lottery-button-outline-active-bg:var(--emw-hakuna-bg-tertiary, #4f2421);--lottery-selection-background:var(--emw-hakuna-bg-primary, #2c2525);--lottery-selection-color:var(--emw-hakuna-text-secondary, #b4a5a5);--lottery-selection-group-bullets-gap:10px;--lottery-selection-disabled-background:#392f2f;--lottery-selection-disabled-color:var(--emw-hakuna-bg-secondary, #120505);--lottery-selection-border-radius:6px;--lottery-selection-hover-background:var(--emw-hakuna-bg-tertiary, #4f2421);--lottery-selection-hover-color:var(--emw-hakuna-text-secondary, #b4a5a5)}.hakuna-ticket .icon-btn{display:flex;align-items:center;justify-content:center;height:32px;cursor:pointer;color:var(--emw-hakuna-text-secondary, #b4a5a5);transition:color 0.2s ease, opacity 0.2s ease}.hakuna-ticket .icon-btn.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}.hakuna-ticket-content-selection{display:flex;align-items:center;gap:12px}.hakuna-ticket-content-selection-text{color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:12px;font-style:normal;font-weight:500;line-height:normal}.hakuna-ticket-content-selection-dots{display:flex;align-items:center;justify-content:center;gap:4px}.hakuna-ticket-content-selection-dots-item{width:10px;height:10px;border-radius:50%;background-color:var(--emw-hakuna-bg-tertiary, #4f2421);transition:background-color 0.3s ease, transform 0.3s ease;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.15)}.hakuna-ticket-content-selection-dots-item.active{background-color:var(--emw-hakuna-color-primary, #c52217);transform:scale(1.06)}.hakuna-ticket-content-bullets{margin:20px 0}.hakuna-ticket-content-bullets.disabled{pointer-events:none;cursor:not-allowed}.hakuna-ticket-content-operation{display:flex;justify-content:space-between}.hakuna-ticket-content-operation--right{display:flex;gap:8px;align-items:center}.hakuna-ticket .cur-selection-btn{display:flex;width:32px;height:32px;justify-content:center;align-items:center;border-radius:6px;background:var(--emw-hakuna-bg-primary, #2c2525);box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.15);font-size:14px;font-weight:500;color:var(--emw-hakuna-text-secondary, #b4a5a5)}.hakuna-ticket .cur-selection-btn.active{color:var(--emw-hakuna-text-primary, #ffffff);font-weight:700;font-size:16px;background:linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%), var(--emw-hakuna-color-primary, #c52217);box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.15)}.hakuna-ticket-summary-item{display:flex;justify-content:space-between;align-items:center}.hakuna-ticket-summary-selection{display:flex;gap:6px;align-items:center}.hakuna-ticket-summary-operation{display:flex;align-items:center;gap:10px;margin-left:20px}";
155
+ const LotteryHakunaTicketStyle0 = lotteryHakunaTicketCss;
156
+
157
+ const LotteryHakunaTicket = class {
158
+ constructor(hostRef) {
159
+ registerInstance(this, hostRef);
160
+ this.ticketUpdateEvent = createEvent(this, "ticketUpdate", 7);
161
+ this.deleteTicket = createEvent(this, "deleteTicket", 7);
162
+ this.editTicket = createEvent(this, "editTicket", 7);
163
+ this.saveTicket = createEvent(this, "saveTicket", 7);
164
+ this.MAIN_SELECTION_NAME = 'mainSelection';
165
+ this.gameName = 'South Africa';
166
+ this.allowQuickPick = true;
167
+ this.highNumber = 6;
168
+ this.lowNumber = 6;
169
+ this.maximumAllowed = 6;
170
+ this.minimumAllowed = 2;
171
+ this.numberRange = [6];
172
+ this.useCollapse = true;
173
+ this.isSubmitted = false;
174
+ this.ticketId = 1;
175
+ this.language = 'en';
176
+ this.clientStyling = '';
177
+ this.clientStylingUrl = '';
178
+ this.mbSource = undefined;
179
+ this.translationUrl = undefined;
180
+ this.disableDelete = false;
181
+ this.grids = [];
182
+ this.ticketDone = [];
183
+ this.quickPicks = [];
184
+ }
185
+ handleClientStylingChange(newValue, oldValue) {
186
+ if (newValue != oldValue) {
187
+ setClientStyling(this.stylingContainer, this.clientStyling);
188
+ }
189
+ }
190
+ handleClientStylingUrlChange(newValue, oldValue) {
191
+ if (newValue != oldValue) {
192
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
193
+ }
194
+ }
195
+ handleMbSourceChange(newValue, oldValue) {
196
+ if (newValue != oldValue) {
197
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
198
+ }
199
+ }
200
+ componentWillLoad() {
201
+ if (this.translationUrl) {
202
+ resolveTranslationUrl(this.translationUrl);
203
+ }
204
+ }
205
+ componentDidLoad() {
206
+ if (this.stylingContainer) {
207
+ if (this.mbSource)
208
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
209
+ if (this.clientStyling)
210
+ setClientStyling(this.stylingContainer, this.clientStyling);
211
+ if (this.clientStylingUrl)
212
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
213
+ }
214
+ this.fillInGrids(1);
215
+ }
216
+ toggleAutoSelection(index) {
217
+ this.ticketDone = [...this.ticketDone.slice(0, index), true, ...this.ticketDone.slice(index + 1)];
218
+ this.quickPicks[index] = true;
219
+ this.clearSingleGrid(index);
220
+ this.quickPickSelection(index);
221
+ }
222
+ toggleResetSelection(index) {
223
+ this.ticketDone = [...this.ticketDone.slice(0, index), false, ...this.ticketDone.slice(index + 1)];
224
+ const newQuickPicks = [...this.quickPicks];
225
+ newQuickPicks[index] = false;
226
+ this.quickPicks = newQuickPicks;
227
+ this.clearSingleGrid(index);
228
+ }
229
+ clearAllGrid() {
230
+ this.grids.forEach((_, index) => {
231
+ this.toggleResetSelection(index);
232
+ });
233
+ }
234
+ toggleResetAllSelection() {
235
+ this.fillInGrids(1);
236
+ this.ticketDone = [false];
237
+ this.quickPicks = [false];
238
+ this.updateGridStatus([], this.MAIN_SELECTION_NAME, 0);
239
+ this.editTicket.emit({ ticketId: this.ticketId });
240
+ }
241
+ updateGridStatus(arr, selectionType, gridIdx) {
242
+ const ticket = {
243
+ selectionType,
244
+ id: this.ticketId,
245
+ index: gridIdx,
246
+ selectedNumbers: arr,
247
+ quickPicks: this.quickPicks
248
+ };
249
+ this.ticketUpdateEvent.emit(ticket);
250
+ }
251
+ bulletGroupUpdateSelectionHandler(event) {
252
+ var _a;
253
+ event.stopPropagation();
254
+ const { newSelectedBulletTexts, selectionGroupId } = event.detail;
255
+ if (!selectionGroupId) {
256
+ console.error('Miss selectionGroupId');
257
+ return;
258
+ }
259
+ const selectionGroupIdArray = selectionGroupId.split('-');
260
+ const gridIdx = Number(selectionGroupIdArray[0]);
261
+ const groupType = selectionGroupIdArray[1];
262
+ const newSelectedBulletTextsArray = newSelectedBulletTexts
263
+ ? (_a = newSelectedBulletTexts.split(',')) === null || _a === void 0 ? void 0 : _a.sort((a, b) => Number(a) - Number(b))
264
+ : [];
265
+ this.grids = this.grids.map((grid, index) => {
266
+ if (index === gridIdx) {
267
+ if (groupType === this.MAIN_SELECTION_NAME) {
268
+ return Object.assign(Object.assign({}, grid), { selection: newSelectedBulletTexts });
269
+ }
270
+ }
271
+ return grid;
272
+ });
273
+ if (this.numberRange.includes(newSelectedBulletTextsArray.length)) {
274
+ this.ticketDone = [...this.ticketDone.slice(0, gridIdx), true, ...this.ticketDone.slice(gridIdx + 1)];
275
+ }
276
+ else {
277
+ this.ticketDone = [...this.ticketDone.slice(0, gridIdx), false, ...this.ticketDone.slice(gridIdx + 1)];
278
+ }
279
+ this.quickPicks = [...this.quickPicks.slice(0, gridIdx), false, ...this.quickPicks.slice(gridIdx + 1)];
280
+ this.updateGridStatus(newSelectedBulletTextsArray, groupType, gridIdx);
281
+ }
282
+ shuffleArray(array) {
283
+ const result = [];
284
+ while (array.length > 0) {
285
+ const randomIndex = Math.floor(Math.random() * array.length);
286
+ result.push(array.splice(randomIndex, 1)[0]);
287
+ }
288
+ return result;
289
+ }
290
+ quickPickSelection(gridIdx) {
291
+ const { highNumber, lowNumber } = this;
292
+ const curAllowedSelectionNum = this.numberRange[0];
293
+ let array = Array.from({ length: highNumber - lowNumber + 1 }, (_, index) => lowNumber + index);
294
+ array = this.shuffleArray(array);
295
+ array = array.slice(0, curAllowedSelectionNum);
296
+ array.sort((a, b) => a - b);
297
+ this.grids = this.grids.map((grid, index) => {
298
+ if (index === gridIdx) {
299
+ return Object.assign(Object.assign({}, grid), { selection: array.join(',') });
300
+ }
301
+ return grid;
302
+ });
303
+ // qucikpick is only available for the main selection?
304
+ this.updateGridStatus(array.map((item) => item.toString()), this.MAIN_SELECTION_NAME, gridIdx);
305
+ }
306
+ clearSingleGrid(gridIdx) {
307
+ this.grids = this.grids.map((grid, index) => {
308
+ if (index === gridIdx) {
309
+ return Object.assign(Object.assign({}, grid), { selection: '' });
310
+ }
311
+ return grid;
312
+ });
313
+ this.updateGridStatus([], this.MAIN_SELECTION_NAME, gridIdx);
314
+ }
315
+ fillInGrids(numberOfGrids) {
316
+ const { highNumber, lowNumber } = this;
317
+ this.grids = Array.from({ length: numberOfGrids }, (_, index) => ({
318
+ selection: '',
319
+ bulletTexts: Array.from({ length: highNumber - lowNumber + 1 }, (_, i) => lowNumber + i).join(','),
320
+ groupIdx: index,
321
+ isSubmitted: false
322
+ }));
323
+ }
324
+ renderMainPlaceBet() {
325
+ const curAllowedSelectionNum = this.numberRange[0];
326
+ return (h("div", { class: "hakuna-ticket-content" }, this.grids.map((item, index) => {
327
+ const isGridEmpty = !item.selection;
328
+ const selectedCount = item.selection ? item.selection.split(',').filter(Boolean).length : 0;
329
+ return (h("div", null, h("div", { class: "hakuna-ticket-content-selection" }, h("div", { class: "hakuna-ticket-content-selection-text" }, "Pick ", curAllowedSelectionNum, " numbers"), h("div", { class: "hakuna-ticket-content-selection-dots" }, Array.from({ length: curAllowedSelectionNum }, (_, i) => i + 1).map((dotIndex) => (h("div", { key: dotIndex, class: {
330
+ 'hakuna-ticket-content-selection-dots-item': true,
331
+ active: dotIndex <= selectedCount
332
+ } }))))), h("div", { class: { 'hakuna-ticket-content-bullets': true, disabled: this.isSubmitted } }, h("lottery-selection-group", { type: "bet", hasBorder: false, bulletTexts: item.bulletTexts, selectionGroupId: `${item.groupIdx}-${this.MAIN_SELECTION_NAME}`, "selected-bullet-texts": item.selection, maxSelectedCount: curAllowedSelectionNum, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource })), h("div", { class: "hakuna-ticket-content-operation", style: { display: 'flex', alignItems: 'center' } }, h("div", { class: "hakuna-ticket-content-operation--left" }, h("div", { class: { 'icon-btn': true, disabled: isGridEmpty || this.isSubmitted }, onClick: () => !isGridEmpty && this.toggleResetSelection(index) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0.833374 9.99996C0.833374 5.39759 4.56433 1.66663 9.16671 1.66663C11.4687 1.66663 13.554 2.60112 15.0613 4.10944C15.5943 4.64284 16.1651 5.30202 16.6667 5.91199V3.33329C16.6667 2.87306 17.0398 2.49996 17.5 2.49996C17.9603 2.49996 18.3334 2.87306 18.3334 3.33329V8.33329C18.3334 8.79353 17.9603 9.16663 17.5 9.16663H12.5C12.0398 9.16663 11.6667 8.79353 11.6667 8.33329C11.6667 7.87306 12.0398 7.49996 12.5 7.49996H15.8077C15.2309 6.77602 14.5138 5.91942 13.8824 5.28755C12.6749 4.07924 11.0087 3.33329 9.16671 3.33329C5.48481 3.33329 2.50004 6.31806 2.50004 9.99996C2.50004 13.6819 5.48481 16.6666 9.16671 16.6666C12.2048 16.6666 14.7703 14.6337 15.5729 11.8523C15.7005 11.4101 16.1624 11.155 16.6046 11.2826C17.0468 11.4102 17.3018 11.8721 17.1742 12.3143C16.1713 15.79 12.9671 18.3333 9.16671 18.3333C4.56433 18.3333 0.833374 14.6023 0.833374 9.99996Z", fill: "currentColor" })))), h("div", { class: "hakuna-ticket-content-operation--right" }, this.allowQuickPick && (h("lottery-button", { variant: "outline", color: "var(--emw-hakuna-color-primary, #C52217)", size: "small", onClick: this.toggleAutoSelection.bind(this, index), disabled: this.isSubmitted }, h("span", { slot: "icon-left" }, h("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.81557 0.631525C8.05311 0.734641 8.19424 0.982014 8.16212 1.23897L7.66075 5.24995L11.2745 5.24995C11.4151 5.24992 11.5575 5.2499 11.6738 5.26043C11.7838 5.27039 11.9945 5.29674 12.1772 5.44439C12.3864 5.61342 12.5062 5.86924 12.5021 6.13814C12.4986 6.37303 12.384 6.55174 12.3212 6.64264C12.2548 6.73875 12.1636 6.84811 12.0736 6.95609L6.86476 13.2067C6.69898 13.4057 6.42189 13.4715 6.18435 13.3684C5.94681 13.2653 5.80568 13.0179 5.8378 12.7609L6.33917 8.74995L2.72543 8.74995C2.58485 8.74998 2.44246 8.75001 2.32613 8.73947C2.21611 8.72951 2.00543 8.70316 1.82272 8.55551C1.61355 8.38648 1.49373 8.13066 1.49778 7.86176C1.50132 7.62688 1.61595 7.44816 1.67873 7.35726C1.74512 7.26115 1.8363 7.15177 1.92632 7.04379C1.93078 7.03844 1.93523 7.0331 1.93968 7.02776L7.13516 0.793177C7.30094 0.59424 7.57803 0.52841 7.81557 0.631525ZM2.9954 7.58328H6.99996C7.16728 7.58328 7.32654 7.65513 7.43727 7.78057C7.548 7.906 7.59954 8.07295 7.57879 8.23897L7.24224 10.9314L11.0045 6.41662H6.99996C6.83264 6.41662 6.67338 6.34477 6.56265 6.21934C6.45192 6.0939 6.40038 5.92696 6.42113 5.76093L6.75768 3.06855L2.9954 7.58328Z", fill: "white" }))), h("span", { style: { color: '#fff' } }, translate('quickPick', this.language)))), h("lottery-button", { variant: "primary", color: "var(--emw-hakuna-color-primary, #C52217)", size: "small", text: translate('submit', this.language), disabled: !this.ticketDone[index] || this.isSubmitted, onClick: this.handleSaveTicket.bind(this) })))));
333
+ })));
334
+ }
335
+ renderCurSelectionButton(status, text) {
336
+ if (status === CurSelectionBtnType.UNSELECTED) {
337
+ return h("div", { class: "cur-selection-btn unselected" }, "?");
338
+ }
339
+ else {
340
+ return h("div", { class: "cur-selection-btn active" }, " ", text);
341
+ }
342
+ }
343
+ handleEditTicket() {
344
+ var _a;
345
+ const { ticketId } = this;
346
+ this.editTicket.emit({ ticketId });
347
+ (_a = this.collapseComponent) === null || _a === void 0 ? void 0 : _a.toggle();
348
+ }
349
+ handleDelTicket() {
350
+ const { ticketId } = this;
351
+ this.deleteTicket.emit({ ticketId });
352
+ }
353
+ handleSaveTicket() {
354
+ var _a;
355
+ this.saveTicket.emit({ ticketId: this.ticketId });
356
+ (_a = this.collapseComponent) === null || _a === void 0 ? void 0 : _a.toggle();
357
+ }
358
+ renderCurSelection() {
359
+ const curAllowedSelectionNum = this.numberRange[0];
360
+ return (h("div", { class: "hakuna-ticket-summary" }, this.grids.map((item, gridIndex) => {
361
+ const selectionArr = item.selection ? item.selection.split(',').filter(Boolean) : [];
362
+ selectionArr.sort((a, b) => Number(a) - Number(b));
363
+ return (h("div", { key: gridIndex, class: "hakuna-ticket-summary-item" }, h("div", { class: "hakuna-ticket-summary-selection" }, Array.from({ length: curAllowedSelectionNum }).map((_, idx) => this.renderCurSelectionButton(idx < selectionArr.length && this.isSubmitted
364
+ ? CurSelectionBtnType.SELECTED
365
+ : CurSelectionBtnType.UNSELECTED, selectionArr[idx]))), h("div", { class: "hakuna-ticket-summary-operation" }, h("div", { class: { 'icon-btn': true, disabled: !this.isSubmitted }, onClick: () => this.isSubmitted && this.handleEditTicket() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "19", height: "19", viewBox: "0 0 19 19", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.9173 0.757664C14.9276 -0.252556 16.5654 -0.252554 17.5757 0.757667C18.5859 1.76789 18.5859 3.40578 17.5757 4.41601L9.65042 12.3413C9.63402 12.3577 9.61776 12.3739 9.60164 12.3901C9.36341 12.6288 9.15337 12.8392 8.90014 12.9944C8.67769 13.1307 8.43517 13.2312 8.18147 13.2921C7.89269 13.3614 7.59538 13.3611 7.25815 13.3608C7.23533 13.3608 7.21232 13.3608 7.18912 13.3608H5.80132C5.34361 13.3608 4.97256 12.9897 4.97256 12.532V11.1442C4.97256 11.121 4.97254 11.098 4.97251 11.0752C4.9722 10.738 4.97192 10.4406 5.04125 10.1519C5.10216 9.89817 5.20262 9.65564 5.33894 9.43319C5.49411 9.17997 5.70454 8.96993 5.94322 8.7317C5.95937 8.71557 5.97566 8.69932 5.99206 8.68291L13.9173 0.757664ZM16.4036 1.92971C16.0407 1.5668 15.4523 1.5668 15.0894 1.92971L7.16411 9.85496C6.84954 10.1695 6.79154 10.2351 6.75221 10.2992C6.70677 10.3734 6.67328 10.4542 6.65298 10.5388C6.63541 10.612 6.63008 10.6994 6.63008 11.1442V11.7032H7.18912C7.63398 11.7032 7.72134 11.6979 7.79453 11.6803C7.8791 11.66 7.95994 11.6265 8.03409 11.5811C8.09827 11.5418 8.16381 11.4838 8.47837 11.1692L16.4036 3.24396C16.7665 2.88104 16.7665 2.29263 16.4036 1.92971ZM4.7726 1.75807L8.28763 1.75807C8.74535 1.75807 9.11639 2.12912 9.11639 2.58684C9.11639 3.04455 8.74535 3.4156 8.28763 3.4156H4.80683C4.09693 3.4156 3.61434 3.41624 3.24132 3.44672C2.87798 3.47641 2.69217 3.53021 2.56255 3.59626C2.25067 3.75517 1.9971 4.00874 1.83819 4.32062C1.77214 4.45024 1.71833 4.63605 1.68865 4.9994C1.65817 5.37241 1.65753 5.855 1.65753 6.5649V13.5265C1.65753 14.2364 1.65817 14.719 1.68865 15.092C1.71833 15.4554 1.77214 15.6412 1.83819 15.7708C1.9971 16.0827 2.25067 16.3362 2.56255 16.4951C2.69217 16.5612 2.87798 16.615 3.24132 16.6447C3.61434 16.6752 4.09692 16.6758 4.80683 16.6758H11.7684C12.4783 16.6758 12.9609 16.6752 13.3339 16.6447C13.6973 16.615 13.8831 16.5612 14.0127 16.4951C14.3246 16.3362 14.5782 16.0827 14.7371 15.7708C14.8031 15.6412 14.8569 15.4554 14.8866 15.092C14.9171 14.719 14.9177 14.2364 14.9177 13.5265V10.0457C14.9177 9.58799 15.2888 9.21694 15.7465 9.21694C16.2042 9.21694 16.5753 9.58799 16.5753 10.0457V13.5608C16.5753 14.2279 16.5753 14.7785 16.5386 15.227C16.5006 15.6928 16.4189 16.1211 16.2139 16.5233C15.8961 17.1471 15.389 17.6542 14.7652 17.972C14.363 18.177 13.9348 18.2586 13.4689 18.2967C13.0204 18.3334 12.4698 18.3333 11.8027 18.3333H4.77258C4.10546 18.3333 3.55487 18.3334 3.10635 18.2967C2.6405 18.2586 2.21228 18.177 1.81005 17.972C1.18628 17.6542 0.679145 17.1471 0.36132 16.5233C0.156374 16.1211 0.0746879 15.6928 0.0366268 15.227C-1.89071e-05 14.7785 -1.02138e-05 14.2279 3.57439e-07 13.5607V6.53067C-1.02138e-05 5.86354 -1.89071e-05 5.31294 0.0366268 4.86442C0.0746879 4.39858 0.156374 3.97035 0.36132 3.56812C0.679145 2.94436 1.18628 2.43722 1.81005 2.11939C2.21228 1.91445 2.6405 1.83276 3.10635 1.7947C3.55487 1.75805 4.10547 1.75806 4.7726 1.75807Z", fill: "currentColor" }))), h("div", { class: { 'icon-btn': true, disabled: this.disableDelete }, onClick: () => !this.disableDelete && this.handleDelTicket() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.30123 0.833253H10.6988C11.1381 0.833238 11.5171 0.833225 11.8292 0.858728C12.1587 0.885646 12.4863 0.945075 12.8017 1.10574C13.2721 1.34542 13.6545 1.72787 13.8942 2.19828C14.0549 2.51359 14.1143 2.84128 14.1412 3.17073C14.1641 3.45054 14.1664 3.78406 14.1667 4.16659H17.5C17.9603 4.16659 18.3334 4.53968 18.3334 4.99992C18.3334 5.46016 17.9603 5.83325 17.5 5.83325H16.6667V14.3677C16.6667 15.0385 16.6667 15.5921 16.6299 16.0431C16.5916 16.5115 16.5095 16.9421 16.3034 17.3466C15.9838 17.9738 15.4739 18.4837 14.8467 18.8033C14.4422 19.0094 14.0116 19.0915 13.5432 19.1298C13.0922 19.1666 12.5386 19.1666 11.8678 19.1666H8.13225C7.46145 19.1666 6.90782 19.1666 6.45683 19.1298C5.98842 19.0915 5.55783 19.0094 5.15339 18.8033C4.52618 18.4837 4.01624 17.9738 3.69667 17.3466C3.49059 16.9421 3.40845 16.5115 3.37018 16.0431C3.33333 15.5921 3.33334 15.0385 3.33335 14.3677L3.33335 5.83325H2.50002C2.03978 5.83325 1.66669 5.46016 1.66669 4.99992C1.66669 4.53968 2.03978 4.16659 2.50002 4.16659H5.83338C5.83361 3.78406 5.83597 3.45054 5.85883 3.17073C5.88575 2.84128 5.94518 2.51359 6.10584 2.19828C6.34552 1.72787 6.72797 1.34542 7.19838 1.10574C7.51369 0.945075 7.84138 0.885646 8.17083 0.858728C8.48297 0.833225 8.86194 0.833238 9.30123 0.833253ZM5.00002 5.83325V14.3333C5.00002 15.0471 5.00067 15.5323 5.03131 15.9074C5.06116 16.2727 5.11527 16.4596 5.18168 16.5899C5.34146 16.9035 5.59643 17.1585 5.91004 17.3183C6.04037 17.3847 6.22721 17.4388 6.59255 17.4686C6.96763 17.4993 7.45287 17.4999 8.16669 17.4999H11.8334C12.5472 17.4999 13.0324 17.4993 13.4075 17.4686C13.7728 17.4388 13.9597 17.3847 14.09 17.3183C14.4036 17.1585 14.6586 16.9035 14.8184 16.5899C14.8848 16.4596 14.9389 16.2727 14.9687 15.9074C14.9994 15.5323 15 15.0471 15 14.3333V5.83325H5.00002ZM12.5 4.16659H7.50008C7.50045 3.779 7.503 3.51407 7.51996 3.30645C7.53846 3.08006 7.56985 2.99613 7.59085 2.95493C7.67074 2.79813 7.79823 2.67064 7.95503 2.59075C7.99623 2.56975 8.08016 2.53836 8.30655 2.51986C8.54266 2.50057 8.85289 2.49992 9.33335 2.49992H10.6667C11.1471 2.49992 11.4574 2.50057 11.6935 2.51986C11.9199 2.53836 12.0038 2.56975 12.045 2.59075C12.2018 2.67064 12.3293 2.79813 12.4092 2.95493C12.4302 2.99613 12.4616 3.08006 12.4801 3.30645C12.497 3.51407 12.4996 3.779 12.5 4.16659ZM8.33335 8.74992C8.79359 8.74992 9.16669 9.12302 9.16669 9.58325V13.7499C9.16669 14.2102 8.79359 14.5833 8.33335 14.5833C7.87312 14.5833 7.50002 14.2102 7.50002 13.7499V9.58325C7.50002 9.12302 7.87312 8.74992 8.33335 8.74992ZM11.6667 8.74992C12.1269 8.74992 12.5 9.12302 12.5 9.58325V13.7499C12.5 14.2102 12.1269 14.5833 11.6667 14.5833C11.2064 14.5833 10.8334 14.2102 10.8334 13.7499V9.58325C10.8334 9.12302 11.2064 8.74992 11.6667 8.74992Z", fill: "currentColor" }))))));
366
+ })));
367
+ }
368
+ render() {
369
+ return (h("div", { key: 'ec4162e1484e14c2ae0ac18961288319ef4bda2b', class: "hakuna-ticket", ref: (el) => (this.stylingContainer = el) }, h("lottery-hakuna-collapse", { key: 'f8ab5f8595947e840fdeb549dca5582eb5d54f0a', ref: (el) => (this.collapseComponent = el), "header-title": `${this.gameName} #${this.ticketId}`, footer: true, collapsed: false, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource }, this.renderMainPlaceBet(), h("div", { key: 'e68dd5bd71f166d26d75b73d747bc3749bd8edd2', slot: "summary" }, this.renderCurSelection()))));
370
+ }
371
+ static get watchers() { return {
372
+ "clientStyling": ["handleClientStylingChange"],
373
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
374
+ "mbSource": ["handleMbSourceChange"]
375
+ }; }
376
+ };
377
+ LotteryHakunaTicket.style = LotteryHakunaTicketStyle0;
378
+
379
+ export { LotteryHakunaTicket as L, setClientStylingURL as a, setStreamStyling as b, setClientStyling as s };
@@ -0,0 +1,20 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-032d8575.js';
2
+ export { s as setNonce } from './index-032d8575.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
15
+ };
16
+
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["lottery-button_6",[[1,"lottery-hakuna-ticket",{"gameName":[513,"game-name"],"allowQuickPick":[516,"allow-quick-pick"],"highNumber":[514,"high-number"],"lowNumber":[514,"low-number"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"numberRange":[16],"useCollapse":[516,"use-collapse"],"isSubmitted":[516,"is-submitted"],"ticketId":[514,"ticket-id"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[520,"translation-url"],"disableDelete":[516,"disable-delete"],"grids":[32],"ticketDone":[32],"quickPicks":[32]},[[4,"resetAllTicketSelection","toggleResetAllSelection"],[0,"bulletGroupUpdateSelection","bulletGroupUpdateSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-selection-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"splitToken":[513,"split-token"],"selectionGroupId":[513,"selection-group-id"],"selectionGroupLabel":[513,"selection-group-label"],"type":[513],"selectedBulletTexts":[513,"selected-bullet-texts"],"maxSelectedCount":[514,"max-selected-count"],"maxDisplayBulletsCount":[514,"max-display-bullets-count"],"bulletTexts":[513,"bullet-texts"],"maxIntegerBulletText":[514,"max-integer-bullet-text"],"minIntegerBulletText":[514,"min-integer-bullet-text"],"bulletTextType":[513,"bullet-text-type"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"dialogTitle":[513,"dialog-title"],"dialogInputPlaceholder":[513,"dialog-input-placeholder"],"dialogConfig":[32],"inputInfo":[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-collapse",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"headerTitle":[513,"header-title"],"collapsed":[516],"isOpen":[32],"hasSummary":[32],"toggle":[64]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-button",{"variant":[513],"size":[513],"color":[513],"disabled":[516],"loading":[516],"text":[513],"mbSource":[513,"mb-source"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"ripples":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-selection",{"value":[520],"text":[513],"idx":[514],"type":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"deleteIconSvg":[513,"delete-icon-svg"],"deleteIconWidth":[513,"delete-icon-width"],"deleteIconHeight":[513,"delete-icon-height"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"visible":[516],"dialogTitle":[1,"dialog-title"],"width":[1],"closable":[4],"mask":[4],"maskClosable":[4,"mask-closable"],"animationDuration":[2,"animation-duration"],"fullscreen":[4],"showFooter":[4,"show-footer"],"showCancelBtn":[4,"show-cancel-btn"],"language":[513],"translationUrl":[520,"translation-url"],"dialogClass":[1,"dialog-class"],"dialogStyle":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
+ });
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",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)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?$(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(m),w(v),(p=m.length>0)&&f.raf(b)},$=e=>h().then(e),g=y(v,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},W=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?L(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=L(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},L=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),T={},U=e=>n(e).$hostElement$,A=(e,t,n)=>{const l=U(e);return{emit:e=>F(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},F=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},N=new WeakMap,D=e=>"sc-"+e.$,H=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=G(n),s=G(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(V);t=t.replace(_,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},q=/\s/,G=e=>e?e.split(q):[],V="Capture",_=RegExp(V+"$"),z=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||S,s=t.u||S;for(const e of B(Object.keys(o)))e in s||H(l,e,o[e],void 0,n,t.l);for(const e of B(Object.keys(s)))H(l,e,o[e],s[e],n,t.l)};function B(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var I=!1,J=!1,K=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else{if(J||(J="svg"===l.m),o=l.v=a.createElementNS(J?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),J&&"foreignObject"===l.m&&(J=!1),z(null,l,J),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=K(e,l,r),s&&o.appendChild(s);"svg"===l.m?J=!1:"foreignObject"===o.tagName&&(J=!0)}return o["s-hn"]=x,o},Q=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=K(null,n,o),r&&(l[o].v=r,te(i,r,t)))},X=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;ee(t),e&&e.remove()}}},Y=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Z=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(J="svg"===r||"foreignObject"!==r&&J,("slot"!==r||I)&&z(e,t,J),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],v=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==v)v=l[--p];else if(Y(h,m,o))Z(h,m,o),h=t[++i],m=l[++c];else if(Y(d,v,o))Z(d,v,o),d=t[--f],v=l[--p];else if(Y(h,v,o))Z(h,v,o),te(e,h.v,d.v.nextSibling),h=t[++i],v=l[--p];else if(Y(d,m,o))Z(d,m,o),te(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=K(t&&t[c],n,u):(Z(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=K(t&&t[c],n,c),m=l[++c]),s&&te(h.v.parentNode,s,h.v)}i>f?Q(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&X(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),Q(l,null,t,s,0,s.length-1)):null!==o&&X(o,0,o.length-1),J&&"svg"===r&&(J=!1)):e.i!==i&&(l.data=i)},ee=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(ee)},te=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ne=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},le=(e,t)=>{if(e.l|=16,!(4&e.l))return ne(e,e.j),g((()=>oe(e,t)));e.l|=512},oe=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t?(e.l|=256,e.k&&(e.k.map((([e,t])=>fe(n,e,t))),e.k=void 0),l=fe(n,"componentWillLoad")):l=fe(n,"componentWillUpdate"),l=se(l,(()=>fe(n,"componentWillRender"))),se(l,(()=>ie(e,n,t)))},se=(e,t)=>re(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),re=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ie=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=D(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.C)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ce(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ue(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ce=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||L(null,null),r=(e=>e&&e.m===T)(t)?t:W(null,null,t);if(x=l.tagName,o.P&&(r.u=r.u||{},o.P.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.v=s.v=l.shadowRoot||l,M=l["s-sc"],I=!!(1&o.l),Z(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ue=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,he(t),fe(n,"componentDidLoad"),e.R(t),l||ae()),e.W(t),e.S&&(e.S(),e.S=void 0),512&e.l&&$((()=>le(e,!1))),e.l&=-517},ae=()=>{he(a.documentElement),$((()=>F(u,"appload",{detail:{namespace:"lottery-hakuna-ticket"}})))},fe=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},he=e=>e.classList.add("hydrated"),de=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.T||e.watchers){e.watchers&&!t.T&&(t.T=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{31&o||2&l&&32&o?Object.defineProperty(i,e,{get(){return((e,t)=>n(this).U.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.U.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.U.set(t,l),a)){if(o.T&&128&u){const e=o.T[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&le(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&o&&Object.defineProperty(i,e,{value(...t){var l;const o=n(this);return null==(l=null==o?void 0:o.A)?void 0:l.then((()=>{var n;return null==(n=o.t)?void 0:n[e](...t)}))}})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.T)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.T)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},pe=e=>{fe(e,"disconnectedCallback")},me=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let $,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],L:l[2],F:l[3]};4&c.l&&(S=!0),c.L=l[2],c.F=l[3],c.P=[],c.T=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,U:new Map};l.A=new Promise((e=>l.W=e)),l.N=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ve(this,e,c.F)),$&&(clearTimeout($),$=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)ve(e,t,l.F),(null==t?void 0:t.t)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ne(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.D){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.D;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);l.isProxied||(n.T=l.watchers,de(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=D(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>le(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.q&&(e.q.map((e=>e())),e.q=void 0),(null==e?void 0:e.t)?pe(e.t):(null==e?void 0:e.N)&&e.N.then((()=>pe(e.t)))}})()))}componentOnReady(){return n(this).N}};c.D=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,de(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(a);null!=e&&w.setAttribute("nonce",e),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>$=setTimeout(ae,30)))},ve=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=we(e,n),r=ye(t,o),i=be(n);f.ael(s,l,r,i),(t.q=t.q||[]).push((()=>f.rel(s,l,r,i)))}))},ye=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},we=(e,t)=>4&t?a:e,be=e=>({passive:!!(1&e),capture:!!(2&e)}),$e=e=>f.C=e;export{me as b,A as c,U as g,W as h,h as p,l as r,$e as s}
@@ -0,0 +1 @@
1
+ export{L as LotteryHakunaTicket}from"./lottery-hakuna-ticket-2019142e.js";import"./index-032d8575.js";
@@ -0,0 +1 @@
1
+ import{r as t,h as e,g as o,c as r}from"./index-032d8575.js";import{s as i,a as n,b as l}from"./lottery-hakuna-ticket-2019142e.js";export{L as lottery_hakuna_ticket}from"./lottery-hakuna-ticket-2019142e.js";const a=["ro","en","fr","ar","hr","zh"],s={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},c=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const o=e.getBoundingClientRect(),r=Math.max(o.width,o.height),i={top:t.clientY-o.top-r/2,left:t.clientX-o.left-r/2,size:r};this.ripples=[...this.ripples,i],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==i))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const o=await fetch(t);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const r=await o.json();e=r,Object.keys(e).forEach((t=>{for(let o in e[t])s[t][o]=e[t][o]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:o,size:r,color:i}=this,n=o||this.loading,l={};if(i)switch(t){case"primary":default:Object.assign(l,{backgroundColor:i,borderColor:i});break;case"outline":case"dashed":Object.assign(l,{color:i,borderColor:i});break;case"text":Object.assign(l,{color:i})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${r}`]:!0,"btn--loading":this.loading},style:i?l:void 0,disabled:n,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=s[void 0!==t&&a.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},e("slot",{name:"icon-left"}),this.text||e("slot",null),e("slot",{name:"icon-right"})),e("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,o)=>e("span",{key:o,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const d=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.headerTitle="",this.collapsed=!0,this.isOpen=!1,this.hasSummary=!1}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.isOpen=!this.collapsed}componentWillRender(){this.hasSummary=!!this.el.querySelector('[slot="summary"]')}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async toggle(){this.isOpen=!this.isOpen}render(){const t=this.isOpen||this.hasSummary;return e("div",{key:"5e28ba28bf46f6a22f749bbd878aef8972bb7eeb",ref:t=>this.stylingContainer=t,class:"lottery-hakuna-collapse"},e("div",{key:"ec42a23932c7e0652476743c1cafcfe7e411c2aa",class:"header",onClick:()=>this.toggle()},e("div",{key:"152e98bb7fc69274d61ffff0d6de9f76a1df90f8",class:"header-content"},this.headerTitle&&e("span",{key:"0acc51d711ca12fa1a666dbe1678071a37fa0aff",class:"title"},this.headerTitle)),e("span",{key:"ad31e6e3a249a9dca394e725e805422297811f85",class:{icon:!0,"is-open":this.isOpen}},e("svg",{key:"14bc41acc77204fcb1966f8966dc6feb49730518",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},e("path",{key:"bac152fc477b275a1792264a35dba2765cf2687f","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.96967 6.21967C4.26256 5.92678 4.73744 5.92678 5.03033 6.21967L9 10.1893L12.9697 6.21967C13.2626 5.92678 13.7374 5.92678 14.0303 6.21967C14.3232 6.51256 14.3232 6.98744 14.0303 7.28033L9.53033 11.7803C9.23744 12.0732 8.76256 12.0732 8.46967 11.7803L3.96967 7.28033C3.67678 6.98744 3.67678 6.51256 3.96967 6.21967Z",fill:"currentColor"})))),t&&e("div",{key:"0358ec8ccc21286a31f6ffcb770efa6c1bcc36ea",class:"content"},e("slot",this.isOpen?null:{name:"summary"})))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style=":host{display:block;width:100%;box-sizing:border-box}.lottery-hakuna-collapse{border:var(--lottery-hakuna-collapse-border-width, 1px) solid transparent;border-radius:var(--lottery-hakuna-collapse-border-radius, 12px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--lottery-hakuna-collapse-bg, #120505), var(--lottery-hakuna-collapse-bg, #120505)), linear-gradient(to top left, var(--lottery-hakuna-collapse-border-gradient-start, #c52217) var(--lottery-hakuna-collapse-border-gradient-start-stop, 32%), var(--lottery-hakuna-collapse-border-gradient-end, #2c2525) var(--lottery-hakuna-collapse-border-gradient-end-stop, 68%));overflow:hidden;margin-bottom:var(--lottery-hakuna-collapse-margin-bottom, 10px)}.lottery-hakuna-collapse .header{display:flex;justify-content:space-between;align-items:center;padding:var(--lottery-hakuna-collapse-header-padding, 20px);cursor:pointer;user-select:none}.lottery-hakuna-collapse .header .header-content{display:flex;align-items:center;flex:1;gap:var(--lottery-hakuna-collapse-header-gap, 8px)}.lottery-hakuna-collapse .header .title{font-size:var(--lottery-hakuna-collapse-title-size, 16px);font-weight:var(--lottery-hakuna-collapse-title-weight, 600);color:var(--lottery-hakuna-collapse-title-color, #fff)}.lottery-hakuna-collapse .header .icon{color:var(--lottery-hakuna-collapse-icon-color, #fff);font-size:var(--lottery-hakuna-collapse-icon-size, 12px);transition:transform 0.3s ease}.lottery-hakuna-collapse .header .icon.is-open{transform:rotate(180deg)}.lottery-hakuna-collapse .content{padding:var(--lottery-hakuna-collapse-content-padding, 0 20px 20px 20px);color:var(--lottery-hakuna-collapse-content-color, #fff);font-size:var(--lottery-hakuna-collapse-content-size, 14px);line-height:var(--lottery-hakuna-collapse-content-line-height, 1.5)}";const h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"};var b=function(){return b=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},b.apply(this,arguments)},u={primaryColor:"#333",secondaryColor:"#E6E6E6"};function g(t,e){var o="svg"===t.tag?b(b({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(o).reduce((function(t,e){var r=o[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",n=(t.children||[]).map((function(t){return g(t,e)})).join("");return n&&n.length?"<".concat(t.tag).concat(i,">").concat(n,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const p=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=r(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||u;return g(t.icon(o.primaryColor,o.secondaryColor),e)}return g(t.icon,e)}(h,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),e("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},e("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&e("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),e("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};p.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";const y=["ro","en","fr","ar","hr","zh"],f={en:{noTicketBoard:"No ticket board available.",selectionCleared:"Your selection has been cleared.",clearAll:"Clear All",stopAt:"Stop at",turnover:"Turnover: ",pleaseFillIn:"Please fill in all the selection input!",fillIn:"Fill in",noBets:"Sorry. No bets have been placed so far. Check back later!",search:"Search",clear:"Clear",oddsChart:"Odds Chart",ticketSuccess:"Ticket purchased successfully.",stakePerLine:"Stake per Line:",lowestOdds:"Lowest Odds:",highestOdds:"Highest Odds:",orderSummary:"ORDER SUMMARY",ticket:"Ticket",lines:"Lines",total:"Total",submit:"Submit",loading:"Loading",enterValidNumber:"Please enter a valid number.",enterNumberBetween:"Please enter a number between {min} and {max}.",numberAlreadySelected:"This number has already been selected.",enterScoreUpTo:"Please enter the score (Up to {maxScore})",enterValue:"Please enter a value",myChoices:"My Choices",teams:"Teams",scores:"Scores",euro:"Euro",cancel:"Cancel",confirm:"Confirm"},ro:{},fr:{},ar:{},hr:{}},v=(t,e,o)=>{const r=e;let i=f[void 0!==r&&y.includes(r)?r:"en"][t];return o&&Object.keys(o).forEach((t=>{i=i.replace(`{${t}}`,o[t])})),i};function m(t,e){return new Set(t?t.split(e):[])}function x(t,e){return e.filter((e=>e!==t))}function k(t,e){return e.concat([t])}const w=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=r(this,"bulletGroupUpdateSelection",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.splitToken=",",this.selectionGroupId=void 0,this.selectionGroupLabel=void 0,this.type="bet",this.selectedBulletTexts=null,this.maxSelectedCount=null,this.maxDisplayBulletsCount=11,this.bulletTexts=null,this.maxIntegerBulletText=null,this.minIntegerBulletText=0,this.bulletTextType="integer",this.hasBorder=!0,this.hasBackground=!0,this.dialogTitle=void 0,this.dialogInputPlaceholder=void 0,this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let o in t[e])f[e][o]=t[e][o]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryBulletClickHandler(t){if(t.stopPropagation(),"input"!==t.detail.type)if(["delete","toggle"].includes(t.detail.type))this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:(e=t.detail,o=Array.from(this.selectedSet),r=this.maxSelectedCount,"delete"===e.type?x(e.text,o):"toggle"===e.type?o.includes(e.text)?x(e.text,o):o.length>=r?function(t,e,o){return e.slice(e.length-(o-1)).concat([t])}(e.text,o,r):k(e.text,o):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,o,r;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return m(this.selectedBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?m(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?m(Array.from({length:Number(this.lastDisplayBulletText)-this.minIntegerBulletText+1},((t,e)=>this.minIntegerBulletText+e)).join(this.splitToken),this.splitToken):new Set}get lastDisplayBulletText(){if("integer"===this.bulletTextType)return null!=this.maxIntegerBulletText?Math.min(this.maxIntegerBulletText,this.minIntegerBulletText+this.maxDisplayBulletsCount-1):this.minIntegerBulletText+this.maxDisplayBulletsCount-1;if(this.bulletTextsSet.size>0){const t=Array.from(this.bulletTextsSet);return t.length>=this.maxDisplayBulletsCount?t[this.maxDisplayBulletsCount-1]:t[t.length-1]}return null}get isSingleSelectionMode(){return 1===this.maxSelectedCount}getBulletToRender(){const t=Array.from(this.bulletTextsSet);let e=t,o=!1;return"text"===this.bulletTextType?t.length>this.maxDisplayBulletsCount?(o=!0,e=t.slice(0,this.maxDisplayBulletsCount-1)):e=t:(o=null!=this.maxIntegerBulletText&&this.maxIntegerBulletText>Number(this.lastDisplayBulletText),e=t),{bulletsToRender:e,showInputButton:o}}renderBulletGroup(){let t=[];if("bet"===this.type){const e=null!==this.maxSelectedCount&&this.selectedSet.size>=this.maxSelectedCount,{bulletsToRender:o,showInputButton:r}=this.getBulletToRender();if(o.forEach(((o,r)=>{let i="toggle";this.selectedSet.has(String(o))||!e||this.isSingleSelectionMode||(i="disabled"),t.push({value:this.selectedSet.has(String(o))?1:0,text:String(o),idx:r,type:i})})),r){let o="input";e&&!this.isSingleSelectionMode&&(o="disabled");const r="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,i="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:r,idx:i,type:o})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,o)=>{let r="toggle";"preview"===this.type?r="readonly":this.selectedSet.has(String(e))&&(r="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:o,type:r})}))}return e("div",{class:"lottery-selection-group__item--right"},t.map((t=>e("lottery-selection",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,text:t.text,idx:t.idx,value:t.value,type:t.type,hasBorder:this.hasBorder,hasBackground:this.hasBackground}))))}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.inputInfo={value:"",errorMessage:"",valid:!0}}handleInputChange(t){const e=t.target.value;this.inputInfo=Object.assign(Object.assign({},this.inputInfo),{value:e}),this.inputInfo=function({value:t,selectedSet:e,maxValue:o,minValue:r,language:i,type:n="integer"}){const l=t.trim();if("integer"===n){if(!/^-?\d+$/.test(l))return{valid:!1,errorMessage:v("enterValidNumber",i),value:t};const n=Number(l);if(isNaN(n))return{valid:!1,errorMessage:v("enterValidNumber",i),value:t};if(void 0!==r&&n<r||void 0!==o&&n>o)return{valid:!1,errorMessage:v("enterNumberBetween",i,{min:r,max:o}),value:t};const a=String(n);if(e.has(a))return{valid:!1,errorMessage:v("numberAlreadySelected",i),value:t}}else if(e.has(l))return{valid:!1,errorMessage:v("numberAlreadySelected",i),value:t};return{valid:!0,errorMessage:"",value:t}}({value:e,selectedSet:this.selectedSet,maxValue:this.maxIntegerBulletText,minValue:"integer"===this.bulletTextType?Number(this.lastDisplayBulletText)+1:void 0,language:this.language,type:this.bulletTextType})}handleFillInAddMore(){if(this.inputInfo.valid){const{value:t}=this.inputInfo;let e,o=t;o="integer"===this.bulletTextType?String(Number(t)):t.trim(),e=this.isSingleSelectionMode?o:k(o,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"66b8e9c63d948eb2f7eb37adb80892dbedd7df9a",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"6562fdcad0f352b5e2d03edcc980a9aeab32277e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"43c2132e4904a2b69b970d9b2074f120ed4d0986",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"cb693d10e6b499628909571021d8508cdebbe29a",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"dd312634574bbe1b4d3de7e82a9c58f58f846c1a",class:"addSelectionDialog"},e("div",{key:"b371b1090598f0219a7c652bab51e9d349703c34",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?v("enterValue",this.language):v("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"b5f1bb74999246dac8dc20f04e3af893deae6654",type:"text",class:{"dialog-input":!0,invalid:!this.inputInfo.valid},value:this.inputInfo.value,onInput:this.handleInputChange.bind(this),placeholder:this.dialogInputPlaceholder}),e("div",{key:"f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"4c580dae14b38aff03e17067b2c0b72d01aa4f42",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"874aa0ffde8fe2d0b08efea0cf951f101ab8dad0",onClick:this.dialogConfig.onCancel,text:v("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"63a556eb5f9ad1cdd357c017756be274d40ef235",onClick:this.dialogConfig.onConfirm,text:v("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};w.style=":host {\n width: 100%;\n}\n\n.lottery-selection-group {\n container-type: inline-size;\n padding: var(--lottery-selection-group-padding, 0);\n background: var(--lottery-selection-group-background, transparent);\n border: var(--lottery-selection-group-border, none);\n border-radius: var(--lottery-selection-group-border-radius, 0);\n}\n.lottery-selection-group__item {\n display: flex;\n flex-direction: var(--lottery-selection-group-flex-direction, row);\n align-items: var(--lottery-selection-group-item-align, center);\n justify-content: var(--lottery-selection-group-item-justify, flex-start);\n gap: var(--lottery-selection-group-item-gap, 16px);\n width: 100%;\n}\n.lottery-selection-group__item--left {\n width: var(--lottery-selection-group-label-width, 130px);\n min-width: var(--lottery-selection-group-label-min-width, auto);\n max-width: var(--lottery-selection-group-label-max-width, none);\n color: var(--lottery-selection-group-label-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-label-font-size, 1em);\n font-weight: var(--lottery-selection-group-label-font-weight, bold);\n text-align: var(--lottery-selection-group-label-align, left);\n white-space: var(--lottery-selection-group-label-white-space, normal);\n}\n.lottery-selection-group__item--right {\n flex: 1;\n display: flex;\n flex-wrap: var(--lottery-selection-group-bullets-wrap, wrap); /* Allow items to wrap */\n gap: var(--lottery-selection-group-bullets-gap, 8px); /* Gap between bullets */\n align-items: var(--lottery-selection-group-bullets-align, center);\n justify-content: var(--lottery-selection-group-bullets-justify, flex-start); /* Align bullets to start */\n}\n@container (max-width: 320px) {\n .lottery-selection-group__item--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: var(--lottery-selection-group-input-padding, 8px);\n border: var(--lottery-selection-group-input-border-width, 1px) var(--lottery-selection-group-input-border-style, solid) var(--lottery-selection-group-input-border-color, var(--emw--color-gray-100, #e6e6e6));\n border-radius: var(--lottery-selection-group-input-radius, 4px);\n background-color: var(--lottery-selection-group-input-bg, #fff);\n color: var(--lottery-selection-group-input-color, #000);\n box-sizing: border-box;\n margin-top: var(--lottery-selection-group-input-margin-top, 10px);\n font-size: var(--lottery-selection-group-input-font-size, 1em);\n}\n.dialog-input::placeholder {\n color: var(--lottery-selection-group-input-placeholder-color, #999);\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--lottery-selection-group-error-color, var(--emw--color-error, #ff3d00));\n font-size: var(--lottery-selection-group-error-font-size, 12px);\n font-weight: var(--lottery-selection-group-error-font-weight, normal);\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--lottery-selection-group-dialog-title-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-dialog-title-font-size, 1.2em);\n font-weight: var(--lottery-selection-group-dialog-title-font-weight, bold);\n margin-bottom: var(--lottery-selection-group-dialog-title-margin-bottom, 0);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: var(--lottery-selection-group-dialog-footer-justify, flex-end);\n gap: var(--lottery-selection-group-dialog-footer-gap, 18px);\n margin-top: var(--lottery-selection-group-dialog-footer-margin-top, 0);\n}";const C=["ro","en","fr","ar","hr"],S={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},_=(t,e)=>{const o=e;return S[void 0!==o&&C.includes(o)?o:"en"][t]},z=class{constructor(e){t(this,e),this.open=r(this,"open",7),this.close=r(this,"close",7),this.confirm=r(this,"confirm",7),this.cancel=r(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const o=await fetch(t);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const r=await o.json();e=r,Object.keys(e).forEach((t=>{for(let o in e[t])S[t][o]=e[t][o]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),o=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],r=["mask",this.visible?"mask-enter":"mask-leave"],i=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:o.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:r.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:i,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},e("div",{key:"30ca33b925ff2525ead8aae83e72031258367b40",class:"dialog-header"},e("h2",{key:"492c3e864ac1547da58b0a47e4cc8d45470bde54",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"8ae4b872d18ce82d33292dc794e8a1f714a96ba9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"d661c78b333f78b9dee92e0975f8b136ef5a3071",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82"})),this.showFooter&&e("div",{key:"40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7",class:"dialog-footer"},e("slot",{key:"91539def47d118a69735ec229e7a6b36fc1db40b",name:"footer"},this.showCancelBtn&&e("button",{key:"f3b3add23f150c660159a906c2ef23b5fbe3b4c5",class:"cancel-btn",onClick:this.handleClose.bind(this)},_("cancel",this.language)),e("button",{key:"5fc33e89b6c55ac9e2162302e128bce0e79c5f89",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},_("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};z.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{c as lottery_button,d as lottery_hakuna_collapse,p as lottery_selection,w as lottery_selection_group,z as lottery_tipping_dialog}