@everymatrix/lottery-hakuna-ticket-history 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 (64) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-dc95b9af.js +1336 -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_8.cjs.entry.js +1427 -0
  6. package/dist/cjs/lottery-hakuna-ticket-history-84d9a41b.js +2697 -0
  7. package/dist/cjs/lottery-hakuna-ticket-history.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +50 -0
  9. package/dist/collection/components/lottery-hakuna-ticket-history/index.js +1 -0
  10. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.css +74 -0
  11. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.js +589 -0
  12. package/dist/collection/components/lottery-infinite-scroll/lottery-infinite-scroll.css +69 -0
  13. package/dist/collection/components/lottery-infinite-scroll/lottery-infinite-scroll.js +556 -0
  14. package/dist/collection/index.js +1 -0
  15. package/dist/collection/models/index.js +21 -0
  16. package/dist/collection/utils/api.js +149 -0
  17. package/dist/collection/utils/locale.utils.js +42 -0
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/esm/app-globals-0f993ce5.js +3 -0
  20. package/dist/esm/index-50addd47.js +1307 -0
  21. package/dist/esm/index.js +2 -0
  22. package/dist/esm/loader.js +11 -0
  23. package/dist/esm/lottery-button_8.entry.js +1417 -0
  24. package/dist/esm/lottery-hakuna-ticket-history-cdab50d9.js +2691 -0
  25. package/dist/esm/lottery-hakuna-ticket-history.js +20 -0
  26. package/dist/index.cjs.js +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/lottery-hakuna-ticket-history/app-globals-0f993ce5.js +1 -0
  29. package/dist/lottery-hakuna-ticket-history/index-50addd47.js +2 -0
  30. package/dist/lottery-hakuna-ticket-history/index.esm.js +1 -0
  31. package/dist/lottery-hakuna-ticket-history/lottery-button_8.entry.js +1 -0
  32. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history-cdab50d9.js +1 -0
  33. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.esm.js +1 -0
  34. package/dist/stencil.config.dev.js +19 -0
  35. package/dist/stencil.config.js +19 -0
  36. package/dist/storybook/main.js +43 -0
  37. package/dist/storybook/preview.js +9 -0
  38. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  39. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/stencil.config.d.ts +2 -0
  40. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/stencil.config.dev.d.ts +2 -0
  41. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/storybook/main.d.ts +3 -0
  42. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/packages/stencil/lottery-hakuna-ticket-history/storybook/preview.d.ts +70 -0
  43. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/index.d.ts +4 -0
  44. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  45. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  46. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  47. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  48. package/dist/types/components/lottery-hakuna-ticket-history/index.d.ts +1 -0
  49. package/dist/types/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.d.ts +131 -0
  50. package/dist/types/components/lottery-infinite-scroll/lottery-infinite-scroll.d.ts +106 -0
  51. package/dist/types/components.d.ts +362 -0
  52. package/dist/types/index.d.ts +1 -0
  53. package/dist/types/models/index.d.ts +199 -0
  54. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  55. package/dist/types/utils/api.d.ts +8 -0
  56. package/dist/types/utils/locale.utils.d.ts +3 -0
  57. package/dist/types/utils/utils.d.ts +1 -0
  58. package/loader/cdn.js +1 -0
  59. package/loader/index.cjs.js +1 -0
  60. package/loader/index.d.ts +24 -0
  61. package/loader/index.es2017.js +1 -0
  62. package/loader/index.js +2 -0
  63. package/loader/package.json +11 -0
  64. package/package.json +27 -0
@@ -0,0 +1,1417 @@
1
+ import { r as registerInstance, h, g as getElement, c as createEvent, H as Host } from './index-50addd47.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, r as renderIconDefinitionToSVGElement } from './lottery-hakuna-ticket-history-cdab50d9.js';
3
+ export { L as lottery_hakuna_ticket_history } from './lottery-hakuna-ticket-history-cdab50d9.js';
4
+
5
+ // This icon file is generated automatically.
6
+ var DeleteFilled = { "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" };
7
+ const DeleteFilled$1 = DeleteFilled;
8
+
9
+ const DEFAULT_LANGUAGE$3 = 'en';
10
+ const SUPPORTED_LANGUAGES$3 = ['ro', 'en', 'fr', 'ar', 'hr', 'zh'];
11
+ const TRANSLATIONS$3 = {
12
+ en: {
13
+ loading: 'Loading'
14
+ },
15
+ ro: {},
16
+ fr: {},
17
+ ar: {},
18
+ hr: {}
19
+ };
20
+ const translate$3 = (key, customLang, replacements) => {
21
+ const lang = customLang;
22
+ let translation = TRANSLATIONS$3[lang !== undefined && SUPPORTED_LANGUAGES$3.includes(lang) ? lang : DEFAULT_LANGUAGE$3][key];
23
+ if (replacements) {
24
+ Object.keys(replacements).forEach((placeholder) => {
25
+ translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
26
+ });
27
+ }
28
+ return translation;
29
+ };
30
+ const getTranslations$3 = (data) => {
31
+ Object.keys(data).forEach((item) => {
32
+ for (let key in data[item]) {
33
+ TRANSLATIONS$3[item][key] = data[item][key];
34
+ }
35
+ });
36
+ };
37
+ const resolveTranslationUrl$2 = async (translationUrl) => {
38
+ if (translationUrl) {
39
+ try {
40
+ const response = await fetch(translationUrl);
41
+ if (!response.ok) {
42
+ throw new Error(`HTTP error! status: ${response.status}`);
43
+ }
44
+ const translations = await response.json();
45
+ getTranslations$3(translations);
46
+ }
47
+ catch (error) {
48
+ console.error('Failed to fetch or parse translations from URL:', error);
49
+ }
50
+ }
51
+ };
52
+
53
+ const lotteryButtonCss = ":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}}";
54
+ const LotteryButtonStyle0 = lotteryButtonCss;
55
+
56
+ const LotteryButton = class {
57
+ constructor(hostRef) {
58
+ registerInstance(this, hostRef);
59
+ this.handleClick = (event) => {
60
+ if (this.disabled) {
61
+ return;
62
+ }
63
+ // Get the button element from the shadow root
64
+ const button = this.host.shadowRoot.querySelector('.btn');
65
+ if (!button)
66
+ return;
67
+ const rect = button.getBoundingClientRect();
68
+ const size = Math.max(rect.width, rect.height);
69
+ const top = event.clientY - rect.top - size / 2;
70
+ const left = event.clientX - rect.left - size / 2;
71
+ // Add the new ripple to the state, triggering a re-render
72
+ const newRipple = { top, left, size };
73
+ this.ripples = [...this.ripples, newRipple];
74
+ // Set a timeout to clean up the ripple from the state after the animation ends
75
+ // This prevents the DOM from filling up with old ripple elements
76
+ setTimeout(() => {
77
+ this.ripples = this.ripples.filter((r) => r !== newRipple);
78
+ }, 600); // This duration should match the CSS animation duration
79
+ };
80
+ this.variant = 'primary';
81
+ this.size = 'medium';
82
+ this.color = undefined;
83
+ this.disabled = false;
84
+ this.loading = false;
85
+ this.text = undefined;
86
+ this.mbSource = undefined;
87
+ this.language = 'en';
88
+ this.clientStyling = undefined;
89
+ this.clientStylingUrl = undefined;
90
+ this.translationUrl = '';
91
+ this.ripples = [];
92
+ }
93
+ handleClientStylingChange(newValue, oldValue) {
94
+ if (newValue != oldValue) {
95
+ setClientStyling(this.stylingContainer, this.clientStyling);
96
+ }
97
+ }
98
+ handleClientStylingUrlChange(newValue, oldValue) {
99
+ if (newValue != oldValue) {
100
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
101
+ }
102
+ }
103
+ handleMbSourceChange(newValue, oldValue) {
104
+ if (newValue != oldValue) {
105
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
106
+ }
107
+ }
108
+ disconnectedCallback() {
109
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
110
+ }
111
+ componentDidLoad() {
112
+ if (this.stylingContainer) {
113
+ if (this.mbSource)
114
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
115
+ if (this.clientStyling)
116
+ setClientStyling(this.stylingContainer, this.clientStyling);
117
+ if (this.clientStylingUrl)
118
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
119
+ }
120
+ }
121
+ componentWillLoad() {
122
+ if (this.translationUrl) {
123
+ resolveTranslationUrl$2(this.translationUrl);
124
+ }
125
+ }
126
+ render() {
127
+ const { variant, disabled, size, color } = this;
128
+ const isDisabled = disabled || this.loading;
129
+ // Calculate styles based on variant and color
130
+ const buttonStyles = {};
131
+ if (color) {
132
+ switch (variant) {
133
+ case 'primary':
134
+ Object.assign(buttonStyles, {
135
+ backgroundColor: color,
136
+ borderColor: color
137
+ });
138
+ break;
139
+ case 'outline':
140
+ case 'dashed':
141
+ Object.assign(buttonStyles, {
142
+ color: color,
143
+ borderColor: color
144
+ });
145
+ break;
146
+ case 'text':
147
+ Object.assign(buttonStyles, {
148
+ color: color
149
+ });
150
+ break;
151
+ default:
152
+ Object.assign(buttonStyles, {
153
+ backgroundColor: color,
154
+ borderColor: color
155
+ });
156
+ }
157
+ }
158
+ return (h("button", { key: 'aa74ad98c90e7548228557bf8a8d26b125d4a83a', class: {
159
+ btn: true,
160
+ [`btn--${variant}`]: true,
161
+ [`btn--${size}`]: true,
162
+ 'btn--loading': this.loading
163
+ }, style: color ? buttonStyles : undefined, disabled: isDisabled, onClick: this.handleClick, ref: (el) => (this.stylingContainer = el) }, this.loading ? (h("div", { class: "loading-container" }, h("span", { class: "content" }, this.text || translate$3('loading', this.language)), h("span", { class: "spinner" }))) : (h("span", { class: "content" }, h("slot", { name: "icon-left" }), this.text || h("slot", null), h("slot", { name: "icon-right" }))), h("div", { key: '302ea02be395bb24989d4abc040a513e23fa029a', class: "ripple-container" }, this.ripples.map((ripple, index) => (h("span", { key: index, class: "ripple", style: {
164
+ top: `${ripple.top}px`,
165
+ left: `${ripple.left}px`,
166
+ width: `${ripple.size}px`,
167
+ height: `${ripple.size}px`
168
+ } }))))));
169
+ }
170
+ get host() { return getElement(this); }
171
+ static get watchers() { return {
172
+ "clientStyling": ["handleClientStylingChange"],
173
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
174
+ "mbSource": ["handleMbSourceChange"]
175
+ }; }
176
+ };
177
+ LotteryButton.style = LotteryButtonStyle0;
178
+
179
+ const DEFAULT_LANGUAGE$2 = 'en';
180
+ const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
181
+ const TRANSLATIONS$2 = {
182
+ en: {
183
+ total: 'Total:',
184
+ },
185
+ };
186
+ const translate$2 = (key, customLang, replacements) => {
187
+ const lang = customLang;
188
+ let translation = TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
189
+ if (replacements) {
190
+ Object.keys(replacements).forEach((placeholder) => {
191
+ translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
192
+ });
193
+ }
194
+ return translation;
195
+ };
196
+ const getTranslations$2 = (data) => {
197
+ Object.keys(data).forEach((item) => {
198
+ for (let key in data[item]) {
199
+ TRANSLATIONS$2[item][key] = data[item][key];
200
+ }
201
+ });
202
+ };
203
+ const resolveTranslationUrl$1 = async (translationUrl) => {
204
+ if (translationUrl) {
205
+ try {
206
+ const response = await fetch(translationUrl);
207
+ if (!response.ok) {
208
+ throw new Error(`HTTP error! status: ${response.status}`);
209
+ }
210
+ const translations = await response.json();
211
+ getTranslations$2(translations);
212
+ }
213
+ catch (error) {
214
+ console.error('Failed to fetch or parse translations from URL:', error);
215
+ }
216
+ }
217
+ };
218
+
219
+ const lotteryHakunaTicketHistoryItemCss = ".lottery-hakuna-ticket-history-item__container{display:flex;padding:var(--lottery-hakuna-ticket-history-item-container-padding, 20px);flex-direction:column;justify-content:center;gap:var(--lottery-hakuna-ticket-history-item-container-gap, 16px);border-radius:var(--lottery-hakuna-ticket-history-item-container-border-radius, 12px);border:1px solid transparent;min-width:var(--lottery-hakuna-ticket-history-item-container-min-width, 200px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--emw-hakuna-bg-secondary, #120505), var(--emw-hakuna-bg-secondary, #120505)), linear-gradient(to top left, var(--emw-hakuna-color-primary, #c52217) var(--lottery-hakuna-ticket-history-item-border-gradient-start-stop, 22%), var(--emw-hakuna-bg-primary, #2c2525) var(--lottery-hakuna-ticket-history-item-border-gradient-end-stop, 68%))}.lottery-hakuna-ticket-history-item__top{display:flex;justify-content:space-between;align-items:center}.lottery-hakuna-ticket-history-item__country-wrapper{display:flex;align-items:center;gap:10px}.lottery-hakuna-ticket-history-item__country-flag{width:var(--lottery-hakuna-ticket-history-item-country-flag-width, 30px);object-fit:cover;aspect-ratio:var(--lottery-hakuna-ticket-history-item-country-flag-aspect-ratio, 3/2)}.lottery-hakuna-ticket-history-item__country-name{color:var(--lottery-hakuna-ticket-history-item-country-name-color, #fff);font-size:var(--lottery-hakuna-ticket-history-item-country-name-font-size, 14px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-country-name-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-country-name-line-height, normal)}.lottery-hakuna-ticket-history-item__details{display:flex;gap:var(--lottery-hakuna-ticket-history-item-details-gap, 13px);color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:var(--lottery-hakuna-ticket-history-item-details-font-size, 10px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-details-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-details-line-height, normal)}.lottery-hakuna-ticket-history-item__meta{display:flex;gap:var(--lottery-hakuna-ticket-history-item-meta-gap, 10px)}.lottery-hakuna-ticket-history-item__meta-value{color:var(--lottery-hakuna-ticket-history-item-meta-value-color, inherit)}.lottery-hakuna-ticket-history-item__bottom{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.lottery-hakuna-ticket-history-item__numbers-wrapper{flex:1;display:flex;align-items:flex-start;gap:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-gap, 8px);box-shadow:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-box-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.25))}.lottery-hakuna-ticket-history-item__date-wrapper{color:var(--lottery-hakuna-ticket-history-item-date-wrapper-color, #fffefe);text-align:var(--lottery-hakuna-ticket-history-item-date-wrapper-text-align, right);font-size:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-size, 8px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-weight, 400);line-height:var(--lottery-hakuna-ticket-history-item-date-wrapper-line-height, 125%);min-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-min-width, 70px);max-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-max-width, 100px)}lottery-selection-group{width:100%}ui-skeleton{--emw-skeleton-primary-color:#414141;--emw-skeleton-secondary-color:#2f2929}";
220
+ const LotteryHakunaTicketHistoryItemStyle0 = lotteryHakunaTicketHistoryItemCss;
221
+
222
+ const LotteryHakunaTicketHistoryItem = class {
223
+ constructor(hostRef) {
224
+ registerInstance(this, hostRef);
225
+ this.selectionGroupStyle = `
226
+ :host{
227
+ --lottery-selection-width: 24px;
228
+ --lottery-selection-height: 24px;
229
+ --lottery-selection-padding: 10px;
230
+ --lottery-selection-border-radius: 6px;
231
+ --lottery-selection-border-width: 1px;
232
+ --lottery-selection-border-color: var(--emw-hakuna-color-primary, #c52217);
233
+
234
+ --lottery-selection-color: var(--emw-hakuna-text-primary, #ffffff);
235
+ --lottery-selection-font-size: 14px;
236
+ --lottery-selection-font-weight: 500;
237
+
238
+ --lottery-selection-hover-background: transparent;
239
+ --lottery-selection-hover-border-color: var(--emw-hakuna-color-primary, #c52217);
240
+ --lottery-selection-hover-color: var(--emw-hakuna-text-primary, #ffffff);
241
+
242
+ .lottery-selection__button{
243
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
244
+ line-height: normal;
245
+ }
246
+ .lottery-selection__button:hover{
247
+ cursor: default;
248
+ }
249
+ --lottery-selection-group-item-gap:6px;
250
+ }
251
+ `;
252
+ this.renderSkeleton = () => {
253
+ return (h("div", { class: "lottery-hakuna-ticket-history-item__container" }, h("div", { class: "lottery-hakuna-ticket-history-item__top" }, h("div", { class: "lottery-hakuna-ticket-history-item__country-wrapper" }, h("ui-skeleton", { structure: "image", width: "30px", height: "20px" }), h("ui-skeleton", { structure: "title", width: "86px", height: "17px", marginBottom: 0 })), h("div", { class: "lottery-hakuna-ticket-history-item__details" }, h("ui-skeleton", { structure: "text", width: "60%", height: "20px" }))), h("div", { class: "lottery-hakuna-ticket-history-item__bottom" }, h("div", { class: "lottery-hakuna-ticket-history-item__numbers-wrapper" }, new Array(this.selectedNumbersCount).fill(h("ui-skeleton", { borderRadius: "8px", structure: "rectangle", width: "24px", height: "24px" }))), h("div", { class: "lottery-hakuna-ticket-history-item__date-wrapper" }, h("ui-skeleton", { structure: "text", width: "180px", height: "14px" })))));
254
+ };
255
+ this.renderMain = () => {
256
+ return (h("div", { class: "lottery-hakuna-ticket-history-item__container" }, h("div", { class: "lottery-hakuna-ticket-history-item__top" }, h("div", { class: "lottery-hakuna-ticket-history-item__country-wrapper" }, this.historyItemImageSrc && (h("img", { src: this.historyItemImageSrc, alt: this.historyItemName, class: "lottery-hakuna-ticket-history-item__country-flag" })), h("span", { class: "lottery-hakuna-ticket-history-item__country-name" }, this.historyItemName)), h("div", { class: "lottery-hakuna-ticket-history-item__details" }, h("span", { class: "lottery-hakuna-ticket-history-item__meta" }, translate$2('total', this.language), h("span", { class: "lottery-hakuna-ticket-history-item__meta-value" }, this.totalAmount)))), h("div", { class: "lottery-hakuna-ticket-history-item__bottom" }, h("div", { class: "lottery-hakuna-ticket-history-item__numbers-wrapper" }, this.selectedNumbers && (h("lottery-selection-group", { type: "preview", bulletTexts: this.selectedNumbers, clientStyling: this.selectionGroupStyle + (this.clientStyling || ''), clientStylingUrl: this.clientStylingUrl, mbSource: this.mbSource, hasBorder: true, hasBackground: false, selectionGroupId: this.ticketId ? this.ticketId.toString() : undefined }))), h("div", { class: "lottery-hakuna-ticket-history-item__date-wrapper" }, this.date && h("div", null, this.date), this.time && h("div", null, this.time)))));
257
+ };
258
+ this.mbSource = undefined;
259
+ this.clientStyling = undefined;
260
+ this.clientStylingUrl = undefined;
261
+ this.language = 'en';
262
+ this.translationUrl = '';
263
+ this.historyItemName = undefined;
264
+ this.historyItemImageSrc = undefined;
265
+ this.ticketId = undefined;
266
+ this.totalAmount = undefined;
267
+ this.date = undefined;
268
+ this.time = undefined;
269
+ this.selectedNumbers = undefined;
270
+ this.showSkeleton = false;
271
+ this.selectedNumbersCount = 6;
272
+ }
273
+ handleClientStylingChange(newValue, oldValue) {
274
+ if (newValue != oldValue) {
275
+ setClientStyling(this.stylingContainer, this.clientStyling);
276
+ }
277
+ }
278
+ handleClientStylingUrlChange(newValue, oldValue) {
279
+ if (newValue != oldValue) {
280
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
281
+ }
282
+ }
283
+ handleMbSourceChange(newValue, oldValue) {
284
+ if (newValue != oldValue) {
285
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
286
+ }
287
+ }
288
+ async componentWillLoad() {
289
+ resolveTranslationUrl$1(this.translationUrl);
290
+ }
291
+ componentDidLoad() {
292
+ if (this.stylingContainer) {
293
+ if (this.mbSource)
294
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
295
+ if (this.clientStyling)
296
+ setClientStyling(this.stylingContainer, this.clientStyling);
297
+ if (this.clientStylingUrl)
298
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
299
+ }
300
+ }
301
+ disconnectedCallback() {
302
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
303
+ }
304
+ render() {
305
+ return (h("div", { key: 'd22e301e9824aa3539e0c11ed52a1bddc5e1fb9c', ref: (el) => (this.stylingContainer = el), class: "lottery-hakuna-ticket-history-item__container-wrapper" }, this.showSkeleton ? this.renderSkeleton() : this.renderMain()));
306
+ }
307
+ static get watchers() { return {
308
+ "clientStyling": ["handleClientStylingChange"],
309
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
310
+ "mbSource": ["handleMbSourceChange"]
311
+ }; }
312
+ };
313
+ LotteryHakunaTicketHistoryItem.style = LotteryHakunaTicketHistoryItemStyle0;
314
+
315
+ const lotteryInfiniteScrollCss = ":host{display:block;width:100%}.lottery-infinite-scroll__container{display:block;width:100%;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:10px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--emw-hakuna-bg-secondary, #120505) var(--lottery-infinite-scroll-scrollbar-track-background, transparent);}.lottery-infinite-scroll__container::-webkit-scrollbar{width:var(--lottery-infinite-scroll-scrollbar-width, 2px)}.lottery-infinite-scroll__container::-webkit-scrollbar-track{background:var(--lottery-infinite-scroll-scrollbar-track-background, transparent)}.lottery-infinite-scroll__container::-webkit-scrollbar-thumb{background:var(--emw-hakuna-bg-secondary, #120505);border-radius:var(--lottery-infinite-scroll-scrollbar-thumb-border-radius, 2px)}.lottery-infinite-scroll__sentinel{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__sentinel.virtual-scroll-sentinel{height:1px;pointer-events:none;opacity:0;position:absolute;width:100%}.lottery-infinite-scroll__sentinel:not(.virtual-scroll-sentinel){height:1px;}.lottery-infinite-scroll__end-message{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__end-message.virtual-scroll-end-message{position:absolute;width:100%}.ptr-indicator{height:var(--pull-trigger-distance, 60px);margin-top:calc(-1 * var(--pull-trigger-distance, 60px));display:flex;align-items:center;justify-content:center;position:absolute;top:0;width:100%;z-index:10;font-size:14px;color:#666;}";
316
+ const LotteryInfiniteScrollStyle0 = lotteryInfiniteScrollCss;
317
+
318
+ const LotteryInfiniteScroll = class {
319
+ constructor(hostRef) {
320
+ registerInstance(this, hostRef);
321
+ this.loadMore = createEvent(this, "loadMore", 7);
322
+ this.refresh = createEvent(this, "refresh", 7);
323
+ /** Y-coordinate of the touch start event. */
324
+ this.startY = 0;
325
+ /** Indicates if a touch event is currently active for pull-to-refresh. */
326
+ this.isTouching = false;
327
+ // --- Virtual Scroll Core Logic ---
328
+ this.onScroll = () => {
329
+ if (this.enableVirtualScroll) {
330
+ if (this.rafId)
331
+ cancelAnimationFrame(this.rafId);
332
+ this.rafId = requestAnimationFrame(() => this.calculateVisibleRange());
333
+ }
334
+ };
335
+ // --- Pull to Refresh Logic (Touch handling) ---
336
+ this.handleTouchStart = (e) => {
337
+ // Only allow pull-down when scrollbar is at the top
338
+ if (this.scrollContainer.scrollTop <= 0) {
339
+ this.startY = e.touches[0].clientY;
340
+ this.isTouching = true;
341
+ }
342
+ };
343
+ this.handleTouchMove = (e) => {
344
+ if (!this.isTouching || this.isRefreshing)
345
+ return;
346
+ const currentY = e.touches[0].clientY;
347
+ const distance = currentY - this.startY;
348
+ // Only process pull-down and when scrollbar is at the top
349
+ if (distance > 0 && this.scrollContainer.scrollTop <= 0) {
350
+ // Prevent default scroll behavior (prevents entire page from being dragged)
351
+ if (e.cancelable)
352
+ e.preventDefault();
353
+ // Add damping effect (harder to pull further)
354
+ this.pullDistance = Math.pow(distance, 0.8);
355
+ }
356
+ else {
357
+ // If user pushes up, or already scrolled, reset
358
+ this.isTouching = false;
359
+ this.pullDistance = 0;
360
+ }
361
+ };
362
+ this.handleTouchEnd = () => {
363
+ this.isTouching = false;
364
+ if (this.pullDistance >= this.pullTriggerDistance) {
365
+ // Trigger refresh
366
+ this.pullDistance = this.pullTriggerDistance; // Stay in loading area
367
+ this.refresh.emit();
368
+ }
369
+ else {
370
+ // Not reached threshold, bounce back
371
+ this.pullDistance = 0;
372
+ }
373
+ };
374
+ this.items = [];
375
+ this.hasMore = false;
376
+ this.isLoading = false;
377
+ this.isRefreshing = false;
378
+ this.threshold = '0px 0px 200px 0px';
379
+ this.estimatedItemHeight = 200;
380
+ this.containerHeight = '100%';
381
+ this.enableVirtualScroll = false;
382
+ this.renderItem = undefined;
383
+ this.renderSkeleton = undefined;
384
+ this.skeletonCount = 6;
385
+ this.pullTriggerDistance = 60;
386
+ this.minItemWidth = 340;
387
+ this.gridGap = 10;
388
+ this.visibleStartIndex = 0;
389
+ this.visibleEndIndex = 10;
390
+ this.pullDistance = 0;
391
+ this.columns = 1;
392
+ }
393
+ componentDidLoad() {
394
+ if (this.enableVirtualScroll) {
395
+ // Listen for container size changes, recalculate columns
396
+ this.initResizeObserver();
397
+ // Initial calculation
398
+ this.calculateMetrics();
399
+ }
400
+ // Initialize observer on component load
401
+ this.initObserver();
402
+ }
403
+ componentDidUpdate() {
404
+ if (this.hasMore && !this.isLoading) {
405
+ this.initObserver();
406
+ }
407
+ }
408
+ disconnectedCallback() {
409
+ this.disconnectObserver();
410
+ if (this.resizeObserver)
411
+ this.resizeObserver.disconnect();
412
+ if (this.rafId)
413
+ cancelAnimationFrame(this.rafId);
414
+ }
415
+ initResizeObserver() {
416
+ if (!window.ResizeObserver || !this.scrollContainer)
417
+ return;
418
+ this.resizeObserver = new ResizeObserver((entries) => {
419
+ for (let entry of entries) {
420
+ // When width changes, recalculate the number of columns
421
+ const width = entry.contentRect.width;
422
+ this.recalcColumns(width);
423
+ this.calculateVisibleRange();
424
+ }
425
+ });
426
+ this.resizeObserver.observe(this.scrollContainer);
427
+ }
428
+ recalcColumns(containerWidth) {
429
+ if (!this.enableVirtualScroll)
430
+ return;
431
+ // Calculation logic must be consistent with CSS grid-template-columns: repeat(auto-fill, ...)
432
+ // Considering the gap
433
+ const effectiveWidth = containerWidth + this.gridGap;
434
+ const itemOccupancy = this.minItemWidth + this.gridGap;
435
+ // At least 1 column
436
+ const newColumns = Math.max(1, Math.floor(effectiveWidth / itemOccupancy));
437
+ if (this.columns !== newColumns) {
438
+ this.columns = newColumns;
439
+ }
440
+ }
441
+ // --- Watchers ---
442
+ handleItemsChange() {
443
+ if (this.enableVirtualScroll) {
444
+ this.calculateVisibleRange();
445
+ }
446
+ }
447
+ handleRefreshingChange(newValue) {
448
+ if (!newValue) {
449
+ this.pullDistance = 0;
450
+ }
451
+ }
452
+ // --- Observer Logic ---
453
+ disconnectObserver() {
454
+ if (this.observer) {
455
+ this.observer.disconnect();
456
+ this.observer = null;
457
+ }
458
+ }
459
+ initObserver() {
460
+ this.disconnectObserver();
461
+ if (!this.hasMore || this.isLoading || !this.sentinel)
462
+ return;
463
+ const options = {
464
+ root: this.scrollContainer === this.el.shadowRoot.querySelector('.lottery-infinite-scroll__container')
465
+ ? this.scrollContainer
466
+ : null,
467
+ rootMargin: this.threshold,
468
+ threshold: 0.1
469
+ };
470
+ this.observer = new IntersectionObserver((entries) => {
471
+ // When scrolled to bottom and not currently loading
472
+ if (entries[0].isIntersecting && this.hasMore && !this.isLoading) {
473
+ this.loadMore.emit();
474
+ }
475
+ }, options);
476
+ this.observer.observe(this.sentinel);
477
+ }
478
+ calculateMetrics() {
479
+ if (!this.scrollContainer)
480
+ return;
481
+ this.recalcColumns(this.scrollContainer.clientWidth);
482
+ this.calculateVisibleRange();
483
+ }
484
+ calculateVisibleRange() {
485
+ if (!this.scrollContainer || !this.enableVirtualScroll)
486
+ return;
487
+ const scrollTop = this.scrollContainer.scrollTop;
488
+ const viewportHeight = this.scrollContainer.clientHeight;
489
+ // 1. Calculate the current "Row" index
490
+ // We assume each row has a height of estimatedItemHeight (although it may differ in reality, this is sufficient for visible window calculation)
491
+ const startRow = Math.floor(scrollTop / this.estimatedItemHeight);
492
+ // 2. Buffer row count
493
+ const bufferRows = 3;
494
+ // 3. Calculate visible rows
495
+ const visibleRows = Math.ceil(viewportHeight / this.estimatedItemHeight);
496
+ // 4. Calculate start and end rows for rendering
497
+ const renderStartRow = Math.max(0, startRow - bufferRows);
498
+ const renderEndRow = startRow + visibleRows + bufferRows;
499
+ // 5. Convert to Item indices (Row * Columns)
500
+ const startIndex = renderStartRow * this.columns;
501
+ const endIndex = Math.min(this.items.length, renderEndRow * this.columns);
502
+ if (this.visibleStartIndex !== startIndex || this.visibleEndIndex !== endIndex) {
503
+ this.visibleStartIndex = startIndex;
504
+ this.visibleEndIndex = endIndex;
505
+ }
506
+ }
507
+ render() {
508
+ const { items, visibleStartIndex, visibleEndIndex, estimatedItemHeight, columns, gridGap, minItemWidth } = this;
509
+ // Check if we should show skeleton: items are empty, loading is true, and renderSkeleton is provided
510
+ const showSkeleton = items.length === 0 && !!this.renderSkeleton && this.isLoading;
511
+ // Virtual Scroll Calculations for Spacer
512
+ let paddingTop = 0;
513
+ let paddingBottom = 0;
514
+ let visibleItems = [];
515
+ if (this.enableVirtualScroll && !showSkeleton) {
516
+ const totalRows = Math.ceil(items.length / columns);
517
+ const startRow = Math.floor(visibleStartIndex / columns);
518
+ // Note: Here we calculate how many rows are actually rendered based on the number of slices, for calculating bottom padding.
519
+ const renderedCount = visibleEndIndex - visibleStartIndex;
520
+ const renderedRows = Math.ceil(renderedCount / columns);
521
+ // Top Spacer: Number of rows hidden at the top * Estimated height
522
+ paddingTop = startRow * estimatedItemHeight;
523
+ // Bottom Spacer: Total rows - (Top rows + Rendered rows) * Estimated height
524
+ // Ensure the total scroll height is roughly correct
525
+ paddingBottom = Math.max(0, (totalRows - startRow - renderedRows) * estimatedItemHeight);
526
+ visibleItems = items.slice(visibleStartIndex, visibleEndIndex);
527
+ }
528
+ else {
529
+ visibleItems = showSkeleton ? new Array(this.skeletonCount).fill(null) : items;
530
+ }
531
+ // Styles
532
+ const contentTransform = {
533
+ transform: `translateY(${this.pullDistance}px)`,
534
+ transition: this.isTouching ? 'none' : 'transform 0.3s ease-out'
535
+ };
536
+ // Grid Layout Style
537
+ const listStyle = {
538
+ display: 'grid',
539
+ // Responsive column width
540
+ gridTemplateColumns: `repeat(auto-fill, minmax(${minItemWidth}px, 1fr))`,
541
+ gap: `${gridGap}px`,
542
+ // Even with Flex/Grid, we don't need absolute positioning, use margin/padding for spacing
543
+ paddingTop: `${paddingTop}px`,
544
+ paddingBottom: `${paddingBottom}px`,
545
+ boxSizing: 'border-box'
546
+ };
547
+ return (h("div", { key: '366232c373082c1a825da935fd02039c3cef5653', class: "lottery-infinite-scroll__container", style: {
548
+ height: this.containerHeight,
549
+ overflowY: 'auto',
550
+ position: 'relative',
551
+ contain: 'strict' // Performance optimization
552
+ }, ref: (el) => (this.scrollContainer = el), onScroll: this.onScroll, onTouchStart: this.handleTouchStart, onTouchMove: this.handleTouchMove, onTouchEnd: this.handleTouchEnd }, h("div", { key: '1dbe68c185299f989101ad2489319ebab82c44da', class: "ptr-indicator", style: Object.assign(Object.assign({}, contentTransform), { position: 'absolute', top: '0', left: '0', width: '100%', height: `${this.pullTriggerDistance}px`, display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop: `-${this.pullTriggerDistance}px`, pointerEvents: 'none' }) }, this.isRefreshing ? (h("slot", { name: "refresh-loading" }, "Refreshing...")) : (h("slot", { name: "pull-hint" }, this.pullDistance > this.pullTriggerDistance ? 'Release' : 'Pull'))), h("div", { key: 'd058018d407dd0e003571e0c1259f837deb093be', class: "scroll-content-wrapper", style: contentTransform }, h("div", { key: '1041eb5548bc79c2a507477013e3e34f35e25c22', class: "list-content", style: listStyle }, visibleItems.map((item, i) => {
553
+ /* Pass the real index to renderItem */
554
+ const realIndex = this.enableVirtualScroll && !showSkeleton ? visibleStartIndex + i : i;
555
+ return (h("div", { key: realIndex, class: "list-item-wrapper" }, showSkeleton
556
+ ? this.renderSkeleton
557
+ ? this.renderSkeleton(realIndex)
558
+ : null
559
+ : this.renderItem
560
+ ? this.renderItem(item, realIndex)
561
+ : null));
562
+ })), (this.hasMore || (this.isLoading && !showSkeleton)) && (h("div", { key: '0af2a85096fc16e9071ec0363a4eb58753324247', class: "lottery-infinite-scroll__sentinel", ref: (el) => (this.sentinel = el), style: { height: '20px', display: 'flex', justifyContent: 'center' } }, this.isLoading ? h("slot", { name: "loading-more" }, "Loading...") : null)), !this.hasMore && !this.isLoading && items.length > 0 && (h("div", { key: 'e6e814a96727e2442137412c25ec09908b2f9015', class: "end-message", style: { textAlign: 'center', padding: '10px' } }, h("slot", { key: '02831150b863992dabd59ab01f7bbb23066877bf', name: "end-message" }, "No more data"))))));
563
+ }
564
+ get el() { return getElement(this); }
565
+ static get watchers() { return {
566
+ "items": ["handleItemsChange"],
567
+ "isRefreshing": ["handleRefreshingChange"]
568
+ }; }
569
+ };
570
+ LotteryInfiniteScroll.style = LotteryInfiniteScrollStyle0;
571
+
572
+ // Basic sanitization method for SVG content
573
+ // This is NOT a complete XSS prevention for SVG, but prevents common attacks.
574
+ function sanitizeSvg(svgString) {
575
+ let sanitized = svgString.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); // Remove <script> tags
576
+ sanitized = sanitized.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi, ''); // Remove on* attributes
577
+ sanitized = sanitized.replace(/javascript:/gi, ''); // Remove javascript: URLs
578
+ return sanitized;
579
+ }
580
+
581
+ const lotterySelectionCss = ":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}";
582
+ const LotterySelectionStyle0 = lotterySelectionCss;
583
+
584
+ const LotterySelection = class {
585
+ constructor(hostRef) {
586
+ registerInstance(this, hostRef);
587
+ this.lotteryBulletClickHandler = createEvent(this, "lotteryBulletClick", 7);
588
+ this.value = 0;
589
+ this.text = undefined;
590
+ this.idx = undefined;
591
+ this.type = 'toggle';
592
+ this.mbSource = undefined;
593
+ this.clientStyling = undefined;
594
+ this.clientStylingUrl = undefined;
595
+ this.hasBorder = true;
596
+ this.hasBackground = true;
597
+ this.deleteIconSvg = '';
598
+ this.deleteIconWidth = '16px';
599
+ this.deleteIconHeight = '16px';
600
+ }
601
+ handleClientStylingChange(newValue, oldValue) {
602
+ if (newValue !== oldValue) {
603
+ setClientStyling(this.stylingContainer, this.clientStyling);
604
+ }
605
+ }
606
+ handleClientStylingUrlChange(newValue, oldValue) {
607
+ if (newValue !== oldValue) {
608
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
609
+ }
610
+ }
611
+ handleMbSourceChange(newValue, oldValue) {
612
+ if (newValue !== oldValue) {
613
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
614
+ }
615
+ }
616
+ componentDidLoad() {
617
+ if (this.stylingContainer) {
618
+ if (this.mbSource)
619
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
620
+ if (this.clientStyling)
621
+ setClientStyling(this.stylingContainer, this.clientStyling);
622
+ if (this.clientStylingUrl)
623
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
624
+ }
625
+ }
626
+ disconnectedCallback() {
627
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
628
+ }
629
+ handleClick() {
630
+ if (this.type === 'disabled' || this.type === 'readonly') {
631
+ return;
632
+ }
633
+ console.log('bullet clicked', this.type, this.idx, this.text, this.value);
634
+ this.lotteryBulletClickHandler.emit({
635
+ type: this.type,
636
+ idx: this.idx,
637
+ text: this.text,
638
+ value: this.value
639
+ });
640
+ }
641
+ render() {
642
+ let iconToRender;
643
+ if (this.deleteIconSvg) {
644
+ iconToRender = sanitizeSvg(this.deleteIconSvg);
645
+ }
646
+ else {
647
+ iconToRender = renderIconDefinitionToSVGElement(DeleteFilled$1, {
648
+ extraSVGAttrs: {
649
+ width: this.deleteIconWidth,
650
+ height: this.deleteIconHeight,
651
+ fill: 'currentColor'
652
+ }
653
+ });
654
+ }
655
+ return (h("div", { key: '0d1e8aaa80a907a7467410f6b27b4b6175e82299', class: "lottery-selection", ref: (el) => (this.stylingContainer = el) }, h("button", { key: '11a2402abbc290dc877ad95f3433092c3a0d8419', class: {
656
+ 'lottery-selection__button': true,
657
+ 'lottery-selection__button--selected': this.value == 1,
658
+ 'lottery-selection__button--disabled': this.type === 'disabled',
659
+ 'lottery-selection__button--no-border': !this.hasBorder,
660
+ 'lottery-selection__button--no-background': !this.hasBackground,
661
+ isDeleteByIcon: this.type === 'delete',
662
+ isCallDialogBtn: this.type === 'input' || this.type === 'readonly'
663
+ }, onClick: this.handleClick.bind(this), disabled: this.type === 'disabled' }, this.type === 'delete' && h("span", { key: 'f99001d936a8f7bdf8adc5c46e82caf730a9442a', class: "lottery-selection__delete-icon", innerHTML: iconToRender }), h("span", { key: '55775e2492a1fe45cc8a457ac0a0d206744461ab', class: "lottery-selection__text" }, this.text))));
664
+ }
665
+ static get watchers() { return {
666
+ "clientStyling": ["handleClientStylingChange"],
667
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
668
+ "mbSource": ["handleMbSourceChange"]
669
+ }; }
670
+ };
671
+ LotterySelection.style = LotterySelectionStyle0;
672
+
673
+ const DEFAULT_LANGUAGE$1 = 'en';
674
+ const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'fr', 'ar', 'hr', 'zh'];
675
+ const TRANSLATIONS$1 = {
676
+ en: {
677
+ noTicketBoard: 'No ticket board available.',
678
+ selectionCleared: 'Your selection has been cleared.',
679
+ clearAll: 'Clear All',
680
+ stopAt: 'Stop at',
681
+ turnover: 'Turnover: ',
682
+ pleaseFillIn: 'Please fill in all the selection input!',
683
+ fillIn: 'Fill in',
684
+ noBets: 'Sorry. No bets have been placed so far. Check back later!',
685
+ search: 'Search',
686
+ clear: 'Clear',
687
+ oddsChart: 'Odds Chart',
688
+ ticketSuccess: 'Ticket purchased successfully.',
689
+ stakePerLine: 'Stake per Line:',
690
+ lowestOdds: 'Lowest Odds:',
691
+ highestOdds: 'Highest Odds:',
692
+ orderSummary: 'ORDER SUMMARY',
693
+ ticket: 'Ticket',
694
+ lines: 'Lines',
695
+ total: 'Total',
696
+ submit: 'Submit',
697
+ loading: 'Loading',
698
+ enterValidNumber: 'Please enter a valid number.',
699
+ enterNumberBetween: 'Please enter a number between {min} and {max}.',
700
+ numberAlreadySelected: 'This number has already been selected.',
701
+ enterScoreUpTo: 'Please enter the score (Up to {maxScore})',
702
+ enterValue: 'Please enter a value',
703
+ myChoices: 'My Choices',
704
+ teams: 'Teams',
705
+ scores: 'Scores',
706
+ euro: 'Euro',
707
+ cancel: 'Cancel',
708
+ confirm: 'Confirm'
709
+ },
710
+ ro: {},
711
+ fr: {},
712
+ ar: {},
713
+ hr: {}
714
+ };
715
+ const translate$1 = (key, customLang, replacements) => {
716
+ const lang = customLang;
717
+ let translation = TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
718
+ if (replacements) {
719
+ Object.keys(replacements).forEach((placeholder) => {
720
+ translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
721
+ });
722
+ }
723
+ return translation;
724
+ };
725
+ const getTranslations$1 = (data) => {
726
+ Object.keys(data).forEach((item) => {
727
+ for (let key in data[item]) {
728
+ TRANSLATIONS$1[item][key] = data[item][key];
729
+ }
730
+ });
731
+ };
732
+
733
+ function getBulletTextsSet(bulletTexts, splitToken) {
734
+ return new Set(bulletTexts ? bulletTexts.split(splitToken) : []);
735
+ }
736
+ function validateInput({ value, selectedSet, maxValue, minValue, language, type = 'integer' }) {
737
+ const trimmedValue = value.trim();
738
+ if (type === 'integer') {
739
+ // Strict integer check
740
+ if (!/^-?\d+$/.test(trimmedValue)) {
741
+ return {
742
+ valid: false,
743
+ errorMessage: translate$1('enterValidNumber', language),
744
+ value
745
+ };
746
+ }
747
+ const numValue = Number(trimmedValue);
748
+ if (isNaN(numValue)) {
749
+ return {
750
+ valid: false,
751
+ errorMessage: translate$1('enterValidNumber', language),
752
+ value
753
+ };
754
+ }
755
+ if ((minValue !== undefined && numValue < minValue) || (maxValue !== undefined && numValue > maxValue)) {
756
+ return {
757
+ valid: false,
758
+ errorMessage: translate$1('enterNumberBetween', language, {
759
+ min: minValue,
760
+ max: maxValue
761
+ }),
762
+ value
763
+ };
764
+ }
765
+ // Normalize value (e.g. "05" -> "5") for set check
766
+ const normalizedValue = String(numValue);
767
+ if (selectedSet.has(normalizedValue)) {
768
+ return {
769
+ valid: false,
770
+ errorMessage: translate$1('numberAlreadySelected', language),
771
+ value
772
+ };
773
+ }
774
+ }
775
+ else {
776
+ // Text mode validation
777
+ if (selectedSet.has(trimmedValue)) {
778
+ return {
779
+ valid: false,
780
+ errorMessage: translate$1('numberAlreadySelected', language), // Or generic 'alreadySelected' if available, but reusing key for now
781
+ value
782
+ };
783
+ }
784
+ }
785
+ return {
786
+ valid: true,
787
+ errorMessage: '',
788
+ value
789
+ };
790
+ }
791
+ function removeBulletTexts(text, selectedArr) {
792
+ return selectedArr.filter((s) => s !== text);
793
+ }
794
+ function addSelectedBulletTexts(text, selectedArr) {
795
+ return selectedArr.concat([text]);
796
+ }
797
+ function removeAndAddSelectedBulletTexts(text, selectedArr, maxSelectedCount) {
798
+ return selectedArr.slice(selectedArr.length - (maxSelectedCount - 1)).concat([text]);
799
+ }
800
+ function buildSelectedBulletTextsArr(item, selectedArr, maxSelectedCount) {
801
+ if (item.type === 'delete') {
802
+ return removeBulletTexts(item.text, selectedArr);
803
+ }
804
+ if (item.type === 'toggle') {
805
+ if (selectedArr.includes(item.text)) {
806
+ return removeBulletTexts(item.text, selectedArr);
807
+ }
808
+ if (selectedArr.length >= maxSelectedCount) {
809
+ return removeAndAddSelectedBulletTexts(item.text, selectedArr, maxSelectedCount);
810
+ }
811
+ return addSelectedBulletTexts(item.text, selectedArr);
812
+ }
813
+ return [];
814
+ }
815
+
816
+ const lotterySelectionGroupCss = ":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}";
817
+ const LotterySelectionGroupStyle0 = lotterySelectionGroupCss;
818
+
819
+ const LotterySelectionGroup = class {
820
+ constructor(hostRef) {
821
+ registerInstance(this, hostRef);
822
+ this.bulletGroupUpdateSelectedBulletTexts = createEvent(this, "bulletGroupUpdateSelection", 7);
823
+ this.mbSource = undefined;
824
+ this.clientStyling = undefined;
825
+ this.clientStylingUrl = undefined;
826
+ this.language = 'en';
827
+ this.translationUrl = '';
828
+ this.splitToken = ',';
829
+ this.selectionGroupId = undefined;
830
+ this.selectionGroupLabel = undefined;
831
+ this.type = 'bet';
832
+ this.selectedBulletTexts = null;
833
+ this.maxSelectedCount = null;
834
+ this.maxDisplayBulletsCount = 11;
835
+ this.bulletTexts = null;
836
+ this.maxIntegerBulletText = null;
837
+ this.minIntegerBulletText = 0;
838
+ this.bulletTextType = 'integer';
839
+ this.hasBorder = true;
840
+ this.hasBackground = true;
841
+ this.dialogTitle = undefined;
842
+ this.dialogInputPlaceholder = undefined;
843
+ this.dialogConfig = {
844
+ width: '400px',
845
+ visible: false,
846
+ onConfirm: () => this.handleFillInAddMore(),
847
+ onCancel: () => this.handleCloseAddMoreDialog()
848
+ };
849
+ this.inputInfo = { valid: true, errorMessage: '', value: '' };
850
+ }
851
+ handleClientStylingChange(newValue, oldValue) {
852
+ if (newValue != oldValue) {
853
+ setClientStyling(this.stylingContainer, this.clientStyling);
854
+ }
855
+ }
856
+ handleClientStylingUrlChange(newValue, oldValue) {
857
+ if (newValue != oldValue) {
858
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
859
+ }
860
+ }
861
+ handleMbSourceChange(newValue, oldValue) {
862
+ if (newValue != oldValue) {
863
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
864
+ }
865
+ }
866
+ componentWillLoad() {
867
+ if (this.translationUrl) {
868
+ getTranslations$1(JSON.parse(this.translationUrl));
869
+ }
870
+ }
871
+ componentDidLoad() {
872
+ if (this.stylingContainer) {
873
+ if (this.mbSource)
874
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
875
+ if (this.clientStyling)
876
+ setClientStyling(this.stylingContainer, this.clientStyling);
877
+ if (this.clientStylingUrl)
878
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
879
+ }
880
+ }
881
+ disconnectedCallback() {
882
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
883
+ }
884
+ lotteryBulletClickHandler(event) {
885
+ event.stopPropagation();
886
+ // if it's input type, open the dialog
887
+ if (event.detail.type === 'input') {
888
+ this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: true });
889
+ return;
890
+ }
891
+ if (['delete', 'toggle'].includes(event.detail.type)) {
892
+ this.bulletGroupUpdateSelectedBulletTexts.emit({
893
+ newSelectedBulletTexts: buildSelectedBulletTextsArr(event.detail, Array.from(this.selectedSet), this.maxSelectedCount).join(this.splitToken),
894
+ selectionGroupId: this.selectionGroupId
895
+ });
896
+ return;
897
+ }
898
+ }
899
+ get selectedSet() {
900
+ return getBulletTextsSet(this.selectedBulletTexts, this.splitToken);
901
+ }
902
+ get bulletTextsSet() {
903
+ if (this.bulletTexts)
904
+ return getBulletTextsSet(this.bulletTexts, this.splitToken);
905
+ if (this.bulletTextType === 'integer' &&
906
+ this.maxIntegerBulletText !== null &&
907
+ this.maxIntegerBulletText !== undefined) {
908
+ return getBulletTextsSet(Array.from({ length: Number(this.lastDisplayBulletText) - this.minIntegerBulletText + 1 }, (_, index) => this.minIntegerBulletText + index).join(this.splitToken), this.splitToken);
909
+ }
910
+ // If neither bulletTexts nor maxIntegerBulletText are provided,
911
+ return new Set();
912
+ }
913
+ // the last bullet text
914
+ get lastDisplayBulletText() {
915
+ if (this.bulletTextType === 'integer') {
916
+ if (this.maxIntegerBulletText !== null && this.maxIntegerBulletText !== undefined) {
917
+ return Math.min(this.maxIntegerBulletText, this.minIntegerBulletText + this.maxDisplayBulletsCount - 1);
918
+ }
919
+ return this.minIntegerBulletText + this.maxDisplayBulletsCount - 1;
920
+ }
921
+ // Text mode: return the text at the max display index if available
922
+ if (this.bulletTextsSet.size > 0) {
923
+ const texts = Array.from(this.bulletTextsSet);
924
+ if (texts.length >= this.maxDisplayBulletsCount) {
925
+ return texts[this.maxDisplayBulletsCount - 1];
926
+ }
927
+ return texts[texts.length - 1]; // If fewer than maxDisplayBulletsCount, return the last one
928
+ }
929
+ return null;
930
+ }
931
+ get isSingleSelectionMode() {
932
+ return this.maxSelectedCount === 1;
933
+ }
934
+ getBulletToRender() {
935
+ const allBulletTexts = Array.from(this.bulletTextsSet);
936
+ // Determine which bullets to display based on type and limit
937
+ let bulletsToRender = allBulletTexts;
938
+ let showInputButton = false;
939
+ if (this.bulletTextType === 'text') {
940
+ // For text, if we have more items than the limit, we need an input button.
941
+ // The input button takes one slot, so we show (limit - 1) items.
942
+ if (allBulletTexts.length > this.maxDisplayBulletsCount) {
943
+ showInputButton = true;
944
+ bulletsToRender = allBulletTexts.slice(0, this.maxDisplayBulletsCount - 1);
945
+ }
946
+ else {
947
+ bulletsToRender = allBulletTexts;
948
+ }
949
+ }
950
+ else {
951
+ // For integer, logic is based on maxIntegerBulletText vs displayed range
952
+ showInputButton =
953
+ this.maxIntegerBulletText !== null &&
954
+ this.maxIntegerBulletText !== undefined &&
955
+ this.maxIntegerBulletText > Number(this.lastDisplayBulletText);
956
+ // Integer bullets generation already respects the count, no slicing needed on the raw set
957
+ bulletsToRender = allBulletTexts;
958
+ }
959
+ return {
960
+ bulletsToRender,
961
+ showInputButton
962
+ };
963
+ }
964
+ renderBulletGroup() {
965
+ let items = [];
966
+ if (this.type === 'bet') {
967
+ const isMaxSelected = this.maxSelectedCount !== null && this.selectedSet.size >= this.maxSelectedCount;
968
+ const { bulletsToRender, showInputButton } = this.getBulletToRender();
969
+ bulletsToRender.forEach((text, idx) => {
970
+ let bulletType = 'toggle';
971
+ if (!this.selectedSet.has(String(text)) && isMaxSelected && !this.isSingleSelectionMode) {
972
+ bulletType = 'disabled';
973
+ }
974
+ items.push({
975
+ value: this.selectedSet.has(String(text)) ? 1 : 0,
976
+ text: String(text),
977
+ idx,
978
+ type: bulletType
979
+ });
980
+ });
981
+ if (showInputButton) {
982
+ let inputBulletType = 'input';
983
+ if (isMaxSelected && !this.isSingleSelectionMode) {
984
+ inputBulletType = 'disabled';
985
+ }
986
+ const inputButtonText = this.bulletTextType === 'text' ? '...' : `${this.lastDisplayBulletText}+`;
987
+ const inputButtonIdx = this.bulletTextType === 'text' ? -1 : Number(this.lastDisplayBulletText) + 1;
988
+ // Special handling for integer mode:
989
+ // If the generated set is "full" (size == maxDisplayBulletsCount),
990
+ // we need to remove the last item to make room for the "N+" button
991
+ // so the total visual count remains consistent.
992
+ if (this.bulletTextType === 'integer' && items.length >= this.maxDisplayBulletsCount) {
993
+ items.pop();
994
+ }
995
+ items.push({
996
+ value: 0,
997
+ text: inputButtonText,
998
+ idx: inputButtonIdx,
999
+ type: inputBulletType
1000
+ });
1001
+ }
1002
+ }
1003
+ else if (['choice', 'preview'].includes(this.type)) {
1004
+ // For choice/preview, also respect the visual limit for text mode
1005
+ const { bulletsToRender } = this.getBulletToRender();
1006
+ bulletsToRender.forEach((text, idx) => {
1007
+ let bulletType = 'toggle';
1008
+ if (this.type === 'preview') {
1009
+ bulletType = 'readonly';
1010
+ }
1011
+ else if (this.selectedSet.has(String(text))) {
1012
+ bulletType = 'delete';
1013
+ }
1014
+ items.push({
1015
+ value: this.selectedSet.has(String(text)) ? 1 : 0,
1016
+ text,
1017
+ idx,
1018
+ type: bulletType
1019
+ });
1020
+ });
1021
+ }
1022
+ return (h("div", { class: "lottery-selection-group__item--right" }, items.map((item) => {
1023
+ return (h("lottery-selection", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, mbSource: this.mbSource, text: item.text, idx: item.idx, value: item.value, type: item.type, hasBorder: this.hasBorder, hasBackground: this.hasBackground }));
1024
+ })));
1025
+ }
1026
+ handleCloseAddMoreDialog() {
1027
+ this.dialogConfig = Object.assign(Object.assign({}, this.dialogConfig), { visible: false });
1028
+ this.inputInfo = { value: '', errorMessage: '', valid: true };
1029
+ }
1030
+ handleInputChange(e) {
1031
+ const inputElement = e.target;
1032
+ const value = inputElement.value;
1033
+ this.inputInfo = Object.assign(Object.assign({}, this.inputInfo), { value: value });
1034
+ this.inputInfo = validateInput({
1035
+ value,
1036
+ selectedSet: this.selectedSet,
1037
+ maxValue: this.maxIntegerBulletText,
1038
+ minValue: this.bulletTextType === 'integer' ? Number(this.lastDisplayBulletText) + 1 : undefined,
1039
+ language: this.language,
1040
+ type: this.bulletTextType
1041
+ });
1042
+ }
1043
+ handleFillInAddMore() {
1044
+ if (this.inputInfo.valid) {
1045
+ const { value } = this.inputInfo;
1046
+ // Normalize the value (e.g., "05" -> "5") to match validation logic
1047
+ let normalizedValue = value;
1048
+ if (this.bulletTextType === 'integer') {
1049
+ normalizedValue = String(Number(value));
1050
+ }
1051
+ else {
1052
+ normalizedValue = value.trim();
1053
+ }
1054
+ let newSelectedBulletTexts;
1055
+ if (this.isSingleSelectionMode) {
1056
+ newSelectedBulletTexts = normalizedValue;
1057
+ }
1058
+ else {
1059
+ newSelectedBulletTexts = addSelectedBulletTexts(normalizedValue, Array.from(this.selectedSet)).join(this.splitToken);
1060
+ }
1061
+ this.bulletGroupUpdateSelectedBulletTexts.emit({
1062
+ newSelectedBulletTexts,
1063
+ selectionGroupId: this.selectionGroupId
1064
+ });
1065
+ this.handleCloseAddMoreDialog();
1066
+ }
1067
+ }
1068
+ render() {
1069
+ return (h("div", { key: '66b8e9c63d948eb2f7eb37adb80892dbedd7df9a', class: "lottery-selection-group", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '6562fdcad0f352b5e2d03edcc980a9aeab32277e', class: "lottery-selection-group__item" }, this.selectionGroupLabel && (h("div", { key: '43c2132e4904a2b69b970d9b2074f120ed4d0986', class: "lottery-selection-group__item--left" }, this.selectionGroupLabel)), this.renderBulletGroup()), h("lottery-tipping-dialog", { key: 'cb693d10e6b499628909571021d8508cdebbe29a', visible: this.dialogConfig.visible, width: this.dialogConfig.width, onCancel: this.dialogConfig.onCancel }, h("div", { key: 'dd312634574bbe1b4d3de7e82a9c58f58f846c1a', class: "addSelectionDialog" }, h("div", { key: 'b371b1090598f0219a7c652bab51e9d349703c34', class: "addSelectionDialog-title" }, this.dialogTitle || (this.bulletTextType === 'text'
1070
+ ? translate$1('enterValue', this.language)
1071
+ : translate$1('enterScoreUpTo', this.language, {
1072
+ maxScore: this.maxIntegerBulletText
1073
+ }))), h("input", { key: 'b5f1bb74999246dac8dc20f04e3af893deae6654', type: "text", class: {
1074
+ 'dialog-input': true,
1075
+ invalid: !this.inputInfo.valid
1076
+ }, value: this.inputInfo.value, onInput: this.handleInputChange.bind(this), placeholder: this.dialogInputPlaceholder }), h("div", { key: 'f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6', class: "error-message" }, this.inputInfo.errorMessage)), h("div", { key: '4c580dae14b38aff03e17067b2c0b72d01aa4f42', slot: "footer", class: "addSelectionDialog-footer" }, h("lottery-button", { key: '874aa0ffde8fe2d0b08efea0cf951f101ab8dad0', onClick: this.dialogConfig.onCancel, text: translate$1('cancel', this.language), variant: "outline" }), h("lottery-button", { key: '63a556eb5f9ad1cdd357c017756be274d40ef235', onClick: this.dialogConfig.onConfirm, text: translate$1('confirm', this.language), variant: "primary", disabled: !this.inputInfo.valid || !this.inputInfo.value })))));
1077
+ }
1078
+ static get watchers() { return {
1079
+ "clientStyling": ["handleClientStylingChange"],
1080
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
1081
+ "mbSource": ["handleMbSourceChange"]
1082
+ }; }
1083
+ };
1084
+ LotterySelectionGroup.style = LotterySelectionGroupStyle0;
1085
+
1086
+ const DEFAULT_LANGUAGE = 'en';
1087
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
1088
+ const TRANSLATIONS = {
1089
+ en: {
1090
+ cancel: 'Cancel',
1091
+ confirm: 'Confirm'
1092
+ },
1093
+ ro: {
1094
+ cancel: 'Anulează',
1095
+ confirm: 'Confirmă'
1096
+ },
1097
+ fr: {
1098
+ cancel: 'Annuler',
1099
+ confirm: 'Confirmer'
1100
+ },
1101
+ ar: {
1102
+ cancel: 'إلغاء',
1103
+ confirm: 'تأكيد'
1104
+ },
1105
+ hr: {
1106
+ cancel: 'Odustani',
1107
+ confirm: 'Potvrdi'
1108
+ }
1109
+ };
1110
+ const translate = (key, customLang) => {
1111
+ const lang = customLang;
1112
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
1113
+ };
1114
+ const getTranslations = (data) => {
1115
+ Object.keys(data).forEach((item) => {
1116
+ for (let key in data[item]) {
1117
+ TRANSLATIONS[item][key] = data[item][key];
1118
+ }
1119
+ });
1120
+ };
1121
+ const resolveTranslationUrl = async (translationUrl) => {
1122
+ if (translationUrl) {
1123
+ try {
1124
+ const response = await fetch(translationUrl);
1125
+ if (!response.ok) {
1126
+ throw new Error(`HTTP error! status: ${response.status}`);
1127
+ }
1128
+ const translations = await response.json();
1129
+ getTranslations(translations);
1130
+ }
1131
+ catch (error) {
1132
+ console.error('Failed to fetch or parse translations from URL:', error);
1133
+ }
1134
+ }
1135
+ };
1136
+
1137
+ const lotteryTippingDialogCss = ".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)}}";
1138
+ const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
1139
+
1140
+ const LotteryTippingDialog = class {
1141
+ constructor(hostRef) {
1142
+ registerInstance(this, hostRef);
1143
+ this.open = createEvent(this, "open", 7);
1144
+ this.close = createEvent(this, "close", 7);
1145
+ this.confirm = createEvent(this, "confirm", 7);
1146
+ this.cancel = createEvent(this, "cancel", 7);
1147
+ this.wasVisible = false;
1148
+ this.mbSource = undefined;
1149
+ this.clientStyling = '';
1150
+ this.clientStylingUrl = '';
1151
+ this.visible = undefined;
1152
+ this.dialogTitle = '';
1153
+ this.width = '520px';
1154
+ this.closable = true;
1155
+ this.mask = true;
1156
+ this.maskClosable = true;
1157
+ this.animationDuration = 300;
1158
+ this.fullscreen = false;
1159
+ this.showFooter = true;
1160
+ this.showCancelBtn = true;
1161
+ this.language = 'en';
1162
+ this.translationUrl = undefined;
1163
+ this.dialogClass = undefined;
1164
+ this.dialogStyle = undefined;
1165
+ }
1166
+ handleClientStylingChange(newValue, oldValue) {
1167
+ if (newValue != oldValue) {
1168
+ setClientStyling(this.stylingContainer, this.clientStyling);
1169
+ }
1170
+ }
1171
+ handleClientStylingUrlChange(newValue, oldValue) {
1172
+ if (newValue != oldValue) {
1173
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
1174
+ }
1175
+ }
1176
+ handleMbSourceChange(newValue, oldValue) {
1177
+ if (newValue != oldValue) {
1178
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
1179
+ }
1180
+ }
1181
+ componentWillLoad() {
1182
+ if (this.translationUrl) {
1183
+ resolveTranslationUrl(this.translationUrl);
1184
+ }
1185
+ }
1186
+ componentWillUpdate() {
1187
+ if (this.visible && !this.wasVisible) {
1188
+ this.disableBodyScroll();
1189
+ }
1190
+ else if (!this.visible && this.wasVisible) {
1191
+ this.enableBodyScroll();
1192
+ }
1193
+ this.wasVisible = this.visible;
1194
+ }
1195
+ disconnectedCallback() {
1196
+ this.enableBodyScroll();
1197
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
1198
+ }
1199
+ disableBodyScroll() {
1200
+ document.body.style.overflow = 'hidden';
1201
+ }
1202
+ enableBodyScroll() {
1203
+ document.body.style.overflow = '';
1204
+ }
1205
+ handleClose() {
1206
+ this.cancel.emit();
1207
+ }
1208
+ handleMaskClick() {
1209
+ if (this.maskClosable) {
1210
+ this.cancel.emit();
1211
+ }
1212
+ }
1213
+ handleConfirm() {
1214
+ this.confirm.emit();
1215
+ }
1216
+ render() {
1217
+ const computedDialogStyle = Object.assign({ width: typeof this.width === 'number' ? `${this.width}px` : this.width, '--duration': `${this.animationDuration}ms` }, (this.dialogStyle || {}));
1218
+ const dialogWrapperClass = ['dialog-wrapper', this.visible ? 'dialog-wrapper-visible' : ''];
1219
+ const maskClass = ['mask', this.visible ? 'mask-enter' : 'mask-leave'];
1220
+ const computedDialogClass = [
1221
+ 'dialog',
1222
+ this.visible ? 'dialog-enter' : 'dialog-leave',
1223
+ this.fullscreen ? 'fullscreen' : '',
1224
+ this.dialogClass
1225
+ ]
1226
+ .filter(Boolean)
1227
+ .join(' ');
1228
+ const contentStyle = {
1229
+ maxHeight: 'calc(100vh - 62px)',
1230
+ overflowY: 'auto'
1231
+ };
1232
+ return (h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, h("div", { key: '30ca33b925ff2525ead8aae83e72031258367b40', class: "dialog-header" }, h("h2", { key: '492c3e864ac1547da58b0a47e4cc8d45470bde54', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: '8ae4b872d18ce82d33292dc794e8a1f714a96ba9', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), h("div", { key: 'd661c78b333f78b9dee92e0975f8b136ef5a3071', class: "dialog-content", style: contentStyle }, h("slot", { key: 'f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82' })), this.showFooter && (h("div", { key: '40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7', class: "dialog-footer" }, h("slot", { key: '91539def47d118a69735ec229e7a6b36fc1db40b', name: "footer" }, this.showCancelBtn && (h("button", { key: 'f3b3add23f150c660159a906c2ef23b5fbe3b4c5', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), h("button", { key: '5fc33e89b6c55ac9e2162302e128bce0e79c5f89', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
1233
+ }
1234
+ get el() { return getElement(this); }
1235
+ static get watchers() { return {
1236
+ "clientStyling": ["handleClientStylingChange"],
1237
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
1238
+ "mbSource": ["handleMbSourceChange"]
1239
+ }; }
1240
+ };
1241
+ LotteryTippingDialog.style = LotteryTippingDialogStyle0;
1242
+
1243
+ const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
1244
+ const UiSkeletonStyle0 = uiSkeletonCss;
1245
+
1246
+ const UiSkeleton = class {
1247
+ constructor(hostRef) {
1248
+ registerInstance(this, hostRef);
1249
+ this.stylingValue = {
1250
+ width: this.handleStylingProps(this.width),
1251
+ height: this.handleStylingProps(this.height),
1252
+ borderRadius: this.handleStylingProps(this.borderRadius),
1253
+ marginBottom: this.handleStylingProps(this.marginBottom),
1254
+ marginTop: this.handleStylingProps(this.marginTop),
1255
+ marginLeft: this.handleStylingProps(this.marginLeft),
1256
+ marginRight: this.handleStylingProps(this.marginRight),
1257
+ size: this.handleStylingProps(this.size),
1258
+ };
1259
+ this.structure = undefined;
1260
+ this.width = 'unset';
1261
+ this.height = 'unset';
1262
+ this.borderRadius = 'unset';
1263
+ this.marginBottom = 'unset';
1264
+ this.marginTop = 'unset';
1265
+ this.marginLeft = 'unset';
1266
+ this.marginRight = 'unset';
1267
+ this.animation = true;
1268
+ this.rows = 0;
1269
+ this.size = '100%';
1270
+ }
1271
+ handleStructureChange(newValue, oldValue) {
1272
+ if (oldValue !== newValue) {
1273
+ this.handleStructure(newValue);
1274
+ }
1275
+ }
1276
+ handleStylingProps(value) {
1277
+ switch (typeof value) {
1278
+ case 'number':
1279
+ return value === 0 ? 0 : `${value}px`;
1280
+ case 'undefined':
1281
+ return 'unset';
1282
+ case 'string':
1283
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
1284
+ value.endsWith('px') ||
1285
+ value.endsWith('%')) {
1286
+ return value;
1287
+ }
1288
+ else {
1289
+ return 'unset';
1290
+ }
1291
+ default:
1292
+ return 'unset';
1293
+ }
1294
+ }
1295
+ handleStructure(structure) {
1296
+ switch (structure) {
1297
+ case 'logo':
1298
+ return this.renderLogo();
1299
+ case 'image':
1300
+ return this.renderImage();
1301
+ case 'title':
1302
+ return this.renderTitle();
1303
+ case 'text':
1304
+ return this.renderText();
1305
+ case 'rectangle':
1306
+ return this.renderRectangle();
1307
+ case 'circle':
1308
+ return this.renderCircle();
1309
+ default:
1310
+ return null;
1311
+ }
1312
+ }
1313
+ renderLogo() {
1314
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
1315
+ }
1316
+ renderImage() {
1317
+ return h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
1318
+ }
1319
+ renderTitle() {
1320
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
1321
+ }
1322
+ renderText() {
1323
+ return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
1324
+ }
1325
+ renderRectangle() {
1326
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
1327
+ }
1328
+ renderCircle() {
1329
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
1330
+ }
1331
+ render() {
1332
+ let styleBlock = '';
1333
+ switch (this.structure) {
1334
+ case 'logo':
1335
+ styleBlock = `
1336
+ :host {
1337
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
1338
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
1339
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
1340
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
1341
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
1342
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
1343
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
1344
+ }
1345
+ `;
1346
+ break;
1347
+ case 'image':
1348
+ styleBlock = `
1349
+ :host {
1350
+ --emw-skeleton-image-width: ${this.stylingValue.width};
1351
+ --emw-skeleton-image-height: ${this.stylingValue.height};
1352
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
1353
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
1354
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
1355
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
1356
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
1357
+ }
1358
+ `;
1359
+ break;
1360
+ case 'title':
1361
+ styleBlock = `
1362
+ :host {
1363
+ --emw-skeleton-title-width: ${this.stylingValue.width};
1364
+ --emw-skeleton-title-height: ${this.stylingValue.height};
1365
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
1366
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
1367
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
1368
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
1369
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
1370
+ }
1371
+ `;
1372
+ break;
1373
+ case 'text':
1374
+ styleBlock = `
1375
+ :host {
1376
+ --emw-skeleton-text-width: ${this.stylingValue.width};
1377
+ --emw-skeleton-text-height: ${this.stylingValue.height};
1378
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
1379
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
1380
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
1381
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
1382
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
1383
+ }
1384
+ `;
1385
+ break;
1386
+ case 'rectangle':
1387
+ styleBlock = `
1388
+ :host {
1389
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
1390
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
1391
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
1392
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
1393
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
1394
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
1395
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
1396
+ }
1397
+ `;
1398
+ break;
1399
+ case 'circle':
1400
+ styleBlock = `
1401
+ :host {
1402
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
1403
+ }
1404
+ `;
1405
+ break;
1406
+ default:
1407
+ styleBlock = '';
1408
+ }
1409
+ return (h(Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
1410
+ }
1411
+ static get watchers() { return {
1412
+ "structure": ["handleStructureChange"]
1413
+ }; }
1414
+ };
1415
+ UiSkeleton.style = UiSkeletonStyle0;
1416
+
1417
+ export { LotteryButton as lottery_button, LotteryHakunaTicketHistoryItem as lottery_hakuna_ticket_history_item, LotteryInfiniteScroll as lottery_infinite_scroll, LotterySelection as lottery_selection, LotterySelectionGroup as lottery_selection_group, LotteryTippingDialog as lottery_tipping_dialog, UiSkeleton as ui_skeleton };