@everymatrix/lottery-hakuna-ticket-history 0.0.12 → 0.0.14

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 (22) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/lottery-button_8.cjs.entry.js +108 -27
  4. package/dist/cjs/{lottery-hakuna-ticket-history-155db5ed.js → lottery-hakuna-ticket-history-ec8bf5d5.js} +1 -1
  5. package/dist/cjs/lottery-hakuna-ticket-history.cjs.js +1 -1
  6. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.js +1 -1
  7. package/dist/collection/components/lottery-infinite-scroll/locale.utils.js +43 -0
  8. package/dist/collection/components/lottery-infinite-scroll/lottery-infinite-scroll.js +136 -4
  9. package/dist/esm/index.js +1 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/lottery-button_8.entry.js +109 -28
  12. package/dist/esm/{lottery-hakuna-ticket-history-4cb107bf.js → lottery-hakuna-ticket-history-35d86d50.js} +1 -1
  13. package/dist/esm/lottery-hakuna-ticket-history.js +1 -1
  14. package/dist/lottery-hakuna-ticket-history/index.esm.js +1 -1
  15. package/dist/lottery-hakuna-ticket-history/lottery-button_8.entry.js +1 -1
  16. package/dist/lottery-hakuna-ticket-history/{lottery-hakuna-ticket-history-4cb107bf.js → lottery-hakuna-ticket-history-35d86d50.js} +1 -1
  17. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.esm.js +1 -1
  18. package/dist/types/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.d.ts +2 -2
  19. package/dist/types/components/lottery-infinite-scroll/locale.utils.d.ts +3 -0
  20. package/dist/types/components/lottery-infinite-scroll/lottery-infinite-scroll.d.ts +25 -0
  21. package/dist/types/components.d.ts +40 -0
  22. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryHakunaTicketHistory = require('./lottery-hakuna-ticket-history-155db5ed.js');
5
+ const lotteryHakunaTicketHistory = require('./lottery-hakuna-ticket-history-ec8bf5d5.js');
6
6
  require('./index-dc95b9af.js');
7
7
 
8
8
 
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["lottery-button_8.cjs",[[1,"lottery-hakuna-ticket-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"scrollThreshold":[1,"scroll-threshold"],"scrollContainerHeight":[2,"scroll-container-height"],"ticketHistoryTitle":[1,"ticket-history-title"],"ticketHistoryItemImageSrc":[1,"ticket-history-item-image-src"],"ticketHistoryItemName":[1,"ticket-history-item-name"],"ticketHistoryItemCurrency":[1,"ticket-history-item-currency"],"listLoadingText":[1,"list-loading-text"],"listRefreshingText":[1,"list-refreshing-text"],"listEndText":[1,"list-end-text"],"limit":[2],"minItemWidth":[2,"min-item-width"],"showSkeleton":[4,"show-skeleton"],"visibleTickets":[32],"hasMore":[32],"isLoading":[32],"isRefreshing":[32],"errorMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"historyItemName":[1,"history-item-name"],"historyItemImageSrc":[1,"history-item-image-src"],"ticketId":[8,"ticket-id"],"totalAmount":[1,"total-amount"],"date":[1],"time":[1],"selectedNumbers":[1,"selected-numbers"],"showSkeleton":[4,"show-skeleton"],"selectedNumbersCount":[2,"selected-numbers-count"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{"items":[16],"hasMore":[4,"has-more"],"isLoading":[4,"is-loading"],"isRefreshing":[4,"is-refreshing"],"threshold":[1],"containerHeight":[1,"container-height"],"renderItem":[16],"renderSkeleton":[16],"skeletonCount":[2,"skeleton-count"],"pullTriggerDistance":[2,"pull-trigger-distance"],"minItemWidth":[2,"min-item-width"],"gridGap":[2,"grid-gap"],"pullDistance":[32]},null,{"isRefreshing":["handleRefreshingChange"]}],[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"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[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);
11
+ return index.bootstrapLazy([["lottery-button_8.cjs",[[1,"lottery-hakuna-ticket-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"scrollThreshold":[1,"scroll-threshold"],"scrollContainerHeight":[2,"scroll-container-height"],"ticketHistoryTitle":[1,"ticket-history-title"],"ticketHistoryItemImageSrc":[1,"ticket-history-item-image-src"],"ticketHistoryItemName":[1,"ticket-history-item-name"],"ticketHistoryItemCurrency":[1,"ticket-history-item-currency"],"listLoadingText":[1,"list-loading-text"],"listRefreshingText":[1,"list-refreshing-text"],"listEndText":[1,"list-end-text"],"limit":[2],"minItemWidth":[2,"min-item-width"],"showSkeleton":[4,"show-skeleton"],"visibleTickets":[32],"hasMore":[32],"isLoading":[32],"isRefreshing":[32],"errorMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"historyItemName":[1,"history-item-name"],"historyItemImageSrc":[1,"history-item-image-src"],"ticketId":[8,"ticket-id"],"totalAmount":[1,"total-amount"],"date":[1],"time":[1],"selectedNumbers":[1,"selected-numbers"],"showSkeleton":[4,"show-skeleton"],"selectedNumbersCount":[2,"selected-numbers-count"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"items":[16],"hasMore":[4,"has-more"],"isLoading":[4,"is-loading"],"isRefreshing":[4,"is-refreshing"],"threshold":[1],"containerHeight":[1,"container-height"],"renderItem":[16],"renderSkeleton":[16],"skeletonCount":[2,"skeleton-count"],"pullTriggerDistance":[2,"pull-trigger-distance"],"minItemWidth":[2,"min-item-width"],"gridGap":[2,"grid-gap"],"pullDistance":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"isRefreshing":["handleRefreshingChange"]}],[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"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[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);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-dc95b9af.js');
6
- const lotteryHakunaTicketHistory = require('./lottery-hakuna-ticket-history-155db5ed.js');
6
+ const lotteryHakunaTicketHistory = require('./lottery-hakuna-ticket-history-ec8bf5d5.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  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" };
10
10
  const DeleteFilled$1 = DeleteFilled;
11
11
 
12
- const DEFAULT_LANGUAGE$3 = 'en';
13
- const SUPPORTED_LANGUAGES$3 = ['ro', 'en', 'fr', 'ar', 'hr', 'zh'];
14
- const TRANSLATIONS$3 = {
12
+ const DEFAULT_LANGUAGE$4 = 'en';
13
+ const SUPPORTED_LANGUAGES$4 = ['ro', 'en', 'fr', 'ar', 'hr', 'zh'];
14
+ const TRANSLATIONS$4 = {
15
15
  en: {
16
16
  loading: 'Loading'
17
17
  },
@@ -20,9 +20,9 @@ const TRANSLATIONS$3 = {
20
20
  ar: {},
21
21
  hr: {}
22
22
  };
23
- const translate$3 = (key, customLang, replacements) => {
23
+ const translate$4 = (key, customLang, replacements) => {
24
24
  const lang = customLang;
25
- let translation = TRANSLATIONS$3[lang !== undefined && SUPPORTED_LANGUAGES$3.includes(lang) ? lang : DEFAULT_LANGUAGE$3][key];
25
+ let translation = TRANSLATIONS$4[lang !== undefined && SUPPORTED_LANGUAGES$4.includes(lang) ? lang : DEFAULT_LANGUAGE$4][key];
26
26
  if (replacements) {
27
27
  Object.keys(replacements).forEach((placeholder) => {
28
28
  translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
@@ -30,14 +30,14 @@ const translate$3 = (key, customLang, replacements) => {
30
30
  }
31
31
  return translation;
32
32
  };
33
- const getTranslations$3 = (data) => {
33
+ const getTranslations$4 = (data) => {
34
34
  Object.keys(data).forEach((item) => {
35
35
  for (let key in data[item]) {
36
- TRANSLATIONS$3[item][key] = data[item][key];
36
+ TRANSLATIONS$4[item][key] = data[item][key];
37
37
  }
38
38
  });
39
39
  };
40
- const resolveTranslationUrl$2 = async (translationUrl) => {
40
+ const resolveTranslationUrl$3 = async (translationUrl) => {
41
41
  if (translationUrl) {
42
42
  try {
43
43
  const response = await fetch(translationUrl);
@@ -45,7 +45,7 @@ const resolveTranslationUrl$2 = async (translationUrl) => {
45
45
  throw new Error(`HTTP error! status: ${response.status}`);
46
46
  }
47
47
  const translations = await response.json();
48
- getTranslations$3(translations);
48
+ getTranslations$4(translations);
49
49
  }
50
50
  catch (error) {
51
51
  console.error('Failed to fetch or parse translations from URL:', error);
@@ -123,7 +123,7 @@ const LotteryButton = class {
123
123
  }
124
124
  componentWillLoad() {
125
125
  if (this.translationUrl) {
126
- resolveTranslationUrl$2(this.translationUrl);
126
+ resolveTranslationUrl$3(this.translationUrl);
127
127
  }
128
128
  }
129
129
  render() {
@@ -163,7 +163,7 @@ const LotteryButton = class {
163
163
  [`btn--${variant}`]: true,
164
164
  [`btn--${size}`]: true,
165
165
  'btn--loading': this.loading
166
- }, style: color ? buttonStyles : undefined, disabled: isDisabled, onClick: this.handleClick, ref: (el) => (this.stylingContainer = el) }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("span", { class: "content" }, this.text || translate$3('loading', this.language)), index.h("span", { class: "spinner" }))) : (index.h("span", { class: "content" }, index.h("slot", { name: "icon-left" }), this.text || index.h("slot", null), index.h("slot", { name: "icon-right" }))), index.h("div", { key: '302ea02be395bb24989d4abc040a513e23fa029a', class: "ripple-container" }, this.ripples.map((ripple, index$1) => (index.h("span", { key: index$1, class: "ripple", style: {
166
+ }, style: color ? buttonStyles : undefined, disabled: isDisabled, onClick: this.handleClick, ref: (el) => (this.stylingContainer = el) }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("span", { class: "content" }, this.text || translate$4('loading', this.language)), index.h("span", { class: "spinner" }))) : (index.h("span", { class: "content" }, index.h("slot", { name: "icon-left" }), this.text || index.h("slot", null), index.h("slot", { name: "icon-right" }))), index.h("div", { key: '302ea02be395bb24989d4abc040a513e23fa029a', class: "ripple-container" }, this.ripples.map((ripple, index$1) => (index.h("span", { key: index$1, class: "ripple", style: {
167
167
  top: `${ripple.top}px`,
168
168
  left: `${ripple.left}px`,
169
169
  width: `${ripple.size}px`,
@@ -179,16 +179,16 @@ const LotteryButton = class {
179
179
  };
180
180
  LotteryButton.style = LotteryButtonStyle0;
181
181
 
182
- const DEFAULT_LANGUAGE$2 = 'en';
183
- const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
184
- const TRANSLATIONS$2 = {
182
+ const DEFAULT_LANGUAGE$3 = 'en';
183
+ const SUPPORTED_LANGUAGES$3 = ['ro', 'en', 'fr', 'ar', 'hr'];
184
+ const TRANSLATIONS$3 = {
185
185
  en: {
186
186
  total: 'Total:',
187
187
  },
188
188
  };
189
- const translate$2 = (key, customLang, replacements) => {
189
+ const translate$3 = (key, customLang, replacements) => {
190
190
  const lang = customLang;
191
- let translation = TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
191
+ let translation = TRANSLATIONS$3[lang !== undefined && SUPPORTED_LANGUAGES$3.includes(lang) ? lang : DEFAULT_LANGUAGE$3][key];
192
192
  if (replacements) {
193
193
  Object.keys(replacements).forEach((placeholder) => {
194
194
  translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
@@ -196,14 +196,14 @@ const translate$2 = (key, customLang, replacements) => {
196
196
  }
197
197
  return translation;
198
198
  };
199
- const getTranslations$2 = (data) => {
199
+ const getTranslations$3 = (data) => {
200
200
  Object.keys(data).forEach((item) => {
201
201
  for (let key in data[item]) {
202
- TRANSLATIONS$2[item][key] = data[item][key];
202
+ TRANSLATIONS$3[item][key] = data[item][key];
203
203
  }
204
204
  });
205
205
  };
206
- const resolveTranslationUrl$1 = async (translationUrl) => {
206
+ const resolveTranslationUrl$2 = async (translationUrl) => {
207
207
  if (translationUrl) {
208
208
  try {
209
209
  const response = await fetch(translationUrl);
@@ -211,7 +211,7 @@ const resolveTranslationUrl$1 = async (translationUrl) => {
211
211
  throw new Error(`HTTP error! status: ${response.status}`);
212
212
  }
213
213
  const translations = await response.json();
214
- getTranslations$2(translations);
214
+ getTranslations$3(translations);
215
215
  }
216
216
  catch (error) {
217
217
  console.error('Failed to fetch or parse translations from URL:', error);
@@ -256,7 +256,7 @@ const LotteryHakunaTicketHistoryItem = class {
256
256
  return (index.h("div", { class: "lottery-hakuna-ticket-history-item__container" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__top" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__country-wrapper" }, index.h("ui-skeleton", { structure: "image", width: "30px", height: "20px" }), index.h("ui-skeleton", { structure: "title", width: "86px", height: "17px", marginBottom: 0 })), index.h("div", { class: "lottery-hakuna-ticket-history-item__details" }, index.h("ui-skeleton", { structure: "text", width: "60%", height: "20px" }))), index.h("div", { class: "lottery-hakuna-ticket-history-item__bottom" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__numbers-wrapper" }, new Array(this.selectedNumbersCount).fill(index.h("ui-skeleton", { borderRadius: "8px", structure: "rectangle", width: "24px", height: "24px" }))), index.h("div", { class: "lottery-hakuna-ticket-history-item__date-wrapper" }, index.h("ui-skeleton", { structure: "text", width: "180px", height: "14px" })))));
257
257
  };
258
258
  this.renderMain = () => {
259
- return (index.h("div", { class: "lottery-hakuna-ticket-history-item__container" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__top" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__country-wrapper" }, this.historyItemImageSrc && (index.h("img", { src: this.historyItemImageSrc, alt: this.historyItemName, class: "lottery-hakuna-ticket-history-item__country-flag" })), index.h("span", { class: "lottery-hakuna-ticket-history-item__country-name" }, this.historyItemName)), index.h("div", { class: "lottery-hakuna-ticket-history-item__details" }, index.h("span", { class: "lottery-hakuna-ticket-history-item__meta" }, translate$2('total', this.language), index.h("span", { class: "lottery-hakuna-ticket-history-item__meta-value" }, this.totalAmount)))), index.h("div", { class: "lottery-hakuna-ticket-history-item__bottom" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__numbers-wrapper" }, this.selectedNumbers && (index.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 }))), index.h("div", { class: "lottery-hakuna-ticket-history-item__date-wrapper" }, this.date && index.h("div", null, this.date), this.time && index.h("div", null, this.time)))));
259
+ return (index.h("div", { class: "lottery-hakuna-ticket-history-item__container" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__top" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__country-wrapper" }, this.historyItemImageSrc && (index.h("img", { src: this.historyItemImageSrc, alt: this.historyItemName, class: "lottery-hakuna-ticket-history-item__country-flag" })), index.h("span", { class: "lottery-hakuna-ticket-history-item__country-name" }, this.historyItemName)), index.h("div", { class: "lottery-hakuna-ticket-history-item__details" }, index.h("span", { class: "lottery-hakuna-ticket-history-item__meta" }, translate$3('total', this.language), index.h("span", { class: "lottery-hakuna-ticket-history-item__meta-value" }, this.totalAmount)))), index.h("div", { class: "lottery-hakuna-ticket-history-item__bottom" }, index.h("div", { class: "lottery-hakuna-ticket-history-item__numbers-wrapper" }, this.selectedNumbers && (index.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 }))), index.h("div", { class: "lottery-hakuna-ticket-history-item__date-wrapper" }, this.date && index.h("div", null, this.date), this.time && index.h("div", null, this.time)))));
260
260
  };
261
261
  this.mbSource = undefined;
262
262
  this.clientStyling = undefined;
@@ -289,7 +289,7 @@ const LotteryHakunaTicketHistoryItem = class {
289
289
  }
290
290
  }
291
291
  async componentWillLoad() {
292
- resolveTranslationUrl$1(this.translationUrl);
292
+ resolveTranslationUrl$2(this.translationUrl);
293
293
  }
294
294
  componentDidLoad() {
295
295
  if (this.stylingContainer) {
@@ -315,6 +315,50 @@ const LotteryHakunaTicketHistoryItem = class {
315
315
  };
316
316
  LotteryHakunaTicketHistoryItem.style = LotteryHakunaTicketHistoryItemStyle0;
317
317
 
318
+ const DEFAULT_LANGUAGE$2 = 'en';
319
+ const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
320
+ const TRANSLATIONS$2 = {
321
+ en: {
322
+ noMoreData: 'No more data',
323
+ loading: 'Loading...',
324
+ release: 'Release',
325
+ refreshing: 'Refreshing...',
326
+ pull: 'Pull'
327
+ }
328
+ };
329
+ const translate$2 = (key, customLang, replacements) => {
330
+ const lang = customLang;
331
+ let translation = TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
332
+ if (replacements) {
333
+ Object.keys(replacements).forEach((placeholder) => {
334
+ translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
335
+ });
336
+ }
337
+ return translation;
338
+ };
339
+ const getTranslations$2 = (data) => {
340
+ Object.keys(data).forEach((item) => {
341
+ for (let key in data[item]) {
342
+ TRANSLATIONS$2[item][key] = data[item][key];
343
+ }
344
+ });
345
+ };
346
+ const resolveTranslationUrl$1 = async (translationUrl) => {
347
+ if (translationUrl) {
348
+ try {
349
+ const response = await fetch(translationUrl);
350
+ if (!response.ok) {
351
+ throw new Error(`HTTP error! status: ${response.status}`);
352
+ }
353
+ const translations = await response.json();
354
+ getTranslations$2(translations);
355
+ }
356
+ catch (error) {
357
+ console.error('Failed to fetch or parse translations from URL:', error);
358
+ }
359
+ }
360
+ };
361
+
318
362
  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;}";
319
363
  const LotteryInfiniteScrollStyle0 = lotteryInfiniteScrollCss;
320
364
 
@@ -365,6 +409,11 @@ const LotteryInfiniteScroll = class {
365
409
  this.pullDistance = 0;
366
410
  }
367
411
  };
412
+ this.mbSource = undefined;
413
+ this.clientStyling = undefined;
414
+ this.clientStylingUrl = undefined;
415
+ this.language = 'en';
416
+ this.translationUrl = '';
368
417
  this.items = [];
369
418
  this.hasMore = false;
370
419
  this.isLoading = false;
@@ -381,6 +430,32 @@ const LotteryInfiniteScroll = class {
381
430
  }
382
431
  componentDidLoad() {
383
432
  this.initObserver();
433
+ if (this.scrollContainer) {
434
+ if (this.mbSource)
435
+ lotteryHakunaTicketHistory.setStreamStyling(this.scrollContainer, `${this.mbSource}.Style`);
436
+ if (this.clientStyling)
437
+ lotteryHakunaTicketHistory.setClientStyling(this.scrollContainer, this.clientStyling);
438
+ if (this.clientStylingUrl)
439
+ lotteryHakunaTicketHistory.setClientStylingURL(this.scrollContainer, this.clientStylingUrl);
440
+ }
441
+ }
442
+ handleClientStylingChange(newValue, oldValue) {
443
+ if (newValue != oldValue) {
444
+ lotteryHakunaTicketHistory.setClientStyling(this.scrollContainer, this.clientStyling);
445
+ }
446
+ }
447
+ handleClientStylingUrlChange(newValue, oldValue) {
448
+ if (newValue != oldValue) {
449
+ lotteryHakunaTicketHistory.setClientStylingURL(this.scrollContainer, this.clientStylingUrl);
450
+ }
451
+ }
452
+ handleMbSourceChange(newValue, oldValue) {
453
+ if (newValue != oldValue) {
454
+ lotteryHakunaTicketHistory.setStreamStyling(this.scrollContainer, `${this.mbSource}.Style`);
455
+ }
456
+ }
457
+ componentWillLoad() {
458
+ resolveTranslationUrl$1(this.translationUrl);
384
459
  }
385
460
  componentDidUpdate() {
386
461
  if (this.hasMore && !this.isLoading) {
@@ -389,6 +464,7 @@ const LotteryInfiniteScroll = class {
389
464
  }
390
465
  disconnectedCallback() {
391
466
  this.disconnectObserver();
467
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
392
468
  }
393
469
  handleRefreshingChange(newValue) {
394
470
  if (!newValue) {
@@ -431,19 +507,24 @@ const LotteryInfiniteScroll = class {
431
507
  gap: `${gridGap}px`,
432
508
  boxSizing: 'border-box'
433
509
  };
434
- return (index.h("div", { key: 'eab20294c6af2caafbf03ddefb58947398b5c6e1', class: "lottery-infinite-scroll__container", style: {
510
+ return (index.h("div", { key: '5f9372a0c2d0cdf00685cbedf062fb333d1e5348', class: "lottery-infinite-scroll__container", style: {
435
511
  height: this.containerHeight,
436
512
  overflowY: 'auto',
437
513
  position: 'relative'
438
- }, ref: (el) => (this.scrollContainer = el), onTouchStart: this.handleTouchStart, onTouchMove: this.handleTouchMove, onTouchEnd: this.handleTouchEnd }, index.h("div", { key: 'd2bf17db3948ef45cf9d77c663d7a6b6075e8125', 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 ? (index.h("slot", { name: "refresh-loading" }, "Refreshing...")) : (index.h("slot", { name: "pull-hint" }, this.pullDistance > this.pullTriggerDistance ? 'Release' : 'Pull'))), index.h("div", { key: '48e8997513bf547a0aa8eac7d036ce29f294fff0', class: "scroll-content-wrapper", style: contentTransform }, index.h("div", { key: '31c4de5010e1357239ccef2c9c009f7e2cfb5287', class: "list-content", style: listStyle }, listToRender.map((item, index$1) => (index.h("div", { key: index$1, class: "list-item-wrapper" }, showSkeleton ? this.renderSkeleton(index$1) : this.renderItem(item, index$1))))), index.h("div", { key: '6b0235f48d4c909c2edd400c3eb1d7efd030458e', class: "lottery-infinite-scroll__sentinel", ref: (el) => (this.sentinel = el), style: {
514
+ }, ref: (el) => (this.scrollContainer = el), onTouchStart: this.handleTouchStart, onTouchMove: this.handleTouchMove, onTouchEnd: this.handleTouchEnd }, index.h("div", { key: 'c43a2673188fbb50c93637f766f1926301ba08e9', 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 ? (index.h("slot", { name: "refresh-loading" }, translate$2('refreshing', this.language))) : (index.h("slot", { name: "pull-hint" }, this.pullDistance > this.pullTriggerDistance
515
+ ? translate$2('release', this.language)
516
+ : translate$2('pull', this.language)))), index.h("div", { key: 'b6a6334401bb3c0ea8d776e028f57836ee0d36ac', class: "scroll-content-wrapper", style: contentTransform }, index.h("div", { key: '16f58f44ce104fbdc4eacb2c3dfa9d3c7c7e6bdb', class: "list-content", style: listStyle }, listToRender.map((item, index$1) => (index.h("div", { key: index$1, class: "list-item-wrapper" }, showSkeleton ? this.renderSkeleton(index$1) : this.renderItem(item, index$1))))), index.h("div", { key: '1ed8b2ce72d85a68a48e9330ad2b9b9194346dfb', class: "lottery-infinite-scroll__sentinel", ref: (el) => (this.sentinel = el), style: {
439
517
  height: '20px',
440
518
  display: 'flex',
441
519
  justifyContent: 'center',
442
- visibility: (this.hasMore || (this.isLoading && !showSkeleton)) ? 'visible' : 'hidden'
443
- } }, this.isLoading ? index.h("slot", { name: "loading-more" }, "Loading...") : null), !this.hasMore && !this.isLoading && items.length > 0 && (index.h("div", { key: '24406925b5f96f2e9be9d06a2d87166e94d2bdad', class: "end-message", style: { textAlign: 'center', padding: '10px' } }, index.h("slot", { key: '189fe2d6f00551cac97267f2047fd76402b862bb', name: "end-message" }, "No more data"))))));
520
+ visibility: this.hasMore || (this.isLoading && !showSkeleton) ? 'visible' : 'hidden'
521
+ } }, this.isLoading ? index.h("slot", { name: "loading-more" }, translate$2('loading', this.language)) : null), !this.hasMore && !this.isLoading && items.length > 0 && (index.h("div", { key: '3b8207a9dc1451c683eb1920b798574be4fbd975', class: "end-message", style: { textAlign: 'center', padding: '10px' } }, index.h("slot", { key: '157e109d933e5613cf882c5dd01212647bfeba79', name: "end-message" }, translate$2('noMoreData', this.language)))))));
444
522
  }
445
523
  get el() { return index.getElement(this); }
446
524
  static get watchers() { return {
525
+ "clientStyling": ["handleClientStylingChange"],
526
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
527
+ "mbSource": ["handleMbSourceChange"],
447
528
  "isRefreshing": ["handleRefreshingChange"]
448
529
  }; }
449
530
  };
@@ -2679,7 +2679,7 @@ const LotteryHakunaTicketHistory = class {
2679
2679
  return (index.h("svg", { width: "45", height: "45", viewBox: "0 0 45 45", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z" })));
2680
2680
  }
2681
2681
  render() {
2682
- return (index.h("div", { key: 'f670a3429de4b967f7ea6de648e91201f08611c3', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'e1f7c9acdfccf3b059af66f6be956027fe9157a9', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (index.h("div", { key: 'db36df4b9e6277883149a7dfd905b458656c6956', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), index.h("span", { key: 'bf55f6af11f8760b75b76c3866714ca311671ef4' }, this.errorMessage))), index.h("lottery-infinite-scroll", { key: '33d57ff5205e065ce989d88a5f4ab22ed8ce8520', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, hasMore: this.hasMore, items: [...this.visibleTickets], minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, index.h("div", { key: '3c64ee5287ec0e1be431890c2a2a1e9011fb41f0', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, index.h("span", { key: '23f990cea7385a6de85cc246d2e9c8d942d9838d', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), index.h("div", { key: '74a90a269101258ac8e8e642773c57fe1aef7971', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), index.h("div", { key: 'ffa6650f925314df9ea067422ce60f38bee01f0e', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
2682
+ return (index.h("div", { key: '53855de1d22947533c4573d78309a9b00f0f21af', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '6b8183876d82fa7ee1283be91642dbc6d75ece8b', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (index.h("div", { key: '96d7bd606994bb7a9518c559a485aa475e082177', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), index.h("span", { key: '8ab84918a1a4db13e9de321b223553cf1ad05fd4' }, this.errorMessage))), index.h("lottery-infinite-scroll", { key: '0fb1e884533627ebf5b9563e2628d823f39f8ff7', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, translationUrl: this.translationUrl, language: this.language, hasMore: this.hasMore, items: [...this.visibleTickets], minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, index.h("div", { key: '8091dce7a4322f4918b2087ebbf6813a1b5f3a6b', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, index.h("span", { key: '44fdefc0599b3c52db7ae9b4e9e8b73193dc315c', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), index.h("div", { key: '657b6539e005df3dad4b478533e6724445394ce8', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), index.h("div", { key: '8b857eee10585f0fc31f26bf0a3ef2d0b28b16b6', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
2683
2683
  }
2684
2684
  static get watchers() { return {
2685
2685
  "clientStyling": ["handleClientStylingChange"],
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["lottery-button_8.cjs",[[1,"lottery-hakuna-ticket-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"scrollThreshold":[1,"scroll-threshold"],"scrollContainerHeight":[2,"scroll-container-height"],"ticketHistoryTitle":[1,"ticket-history-title"],"ticketHistoryItemImageSrc":[1,"ticket-history-item-image-src"],"ticketHistoryItemName":[1,"ticket-history-item-name"],"ticketHistoryItemCurrency":[1,"ticket-history-item-currency"],"listLoadingText":[1,"list-loading-text"],"listRefreshingText":[1,"list-refreshing-text"],"listEndText":[1,"list-end-text"],"limit":[2],"minItemWidth":[2,"min-item-width"],"showSkeleton":[4,"show-skeleton"],"visibleTickets":[32],"hasMore":[32],"isLoading":[32],"isRefreshing":[32],"errorMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"historyItemName":[1,"history-item-name"],"historyItemImageSrc":[1,"history-item-image-src"],"ticketId":[8,"ticket-id"],"totalAmount":[1,"total-amount"],"date":[1],"time":[1],"selectedNumbers":[1,"selected-numbers"],"showSkeleton":[4,"show-skeleton"],"selectedNumbersCount":[2,"selected-numbers-count"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{"items":[16],"hasMore":[4,"has-more"],"isLoading":[4,"is-loading"],"isRefreshing":[4,"is-refreshing"],"threshold":[1],"containerHeight":[1,"container-height"],"renderItem":[16],"renderSkeleton":[16],"skeletonCount":[2,"skeleton-count"],"pullTriggerDistance":[2,"pull-trigger-distance"],"minItemWidth":[2,"min-item-width"],"gridGap":[2,"grid-gap"],"pullDistance":[32]},null,{"isRefreshing":["handleRefreshingChange"]}],[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"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[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);
22
+ return index.bootstrapLazy([["lottery-button_8.cjs",[[1,"lottery-hakuna-ticket-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"scrollThreshold":[1,"scroll-threshold"],"scrollContainerHeight":[2,"scroll-container-height"],"ticketHistoryTitle":[1,"ticket-history-title"],"ticketHistoryItemImageSrc":[1,"ticket-history-item-image-src"],"ticketHistoryItemName":[1,"ticket-history-item-name"],"ticketHistoryItemCurrency":[1,"ticket-history-item-currency"],"listLoadingText":[1,"list-loading-text"],"listRefreshingText":[1,"list-refreshing-text"],"listEndText":[1,"list-end-text"],"limit":[2],"minItemWidth":[2,"min-item-width"],"showSkeleton":[4,"show-skeleton"],"visibleTickets":[32],"hasMore":[32],"isLoading":[32],"isRefreshing":[32],"errorMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"historyItemName":[1,"history-item-name"],"historyItemImageSrc":[1,"history-item-image-src"],"ticketId":[8,"ticket-id"],"totalAmount":[1,"total-amount"],"date":[1],"time":[1],"selectedNumbers":[1,"selected-numbers"],"showSkeleton":[4,"show-skeleton"],"selectedNumbersCount":[2,"selected-numbers-count"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"items":[16],"hasMore":[4,"has-more"],"isLoading":[4,"is-loading"],"isRefreshing":[4,"is-refreshing"],"threshold":[1],"containerHeight":[1,"container-height"],"renderItem":[16],"renderSkeleton":[16],"skeletonCount":[2,"skeleton-count"],"pullTriggerDistance":[2,"pull-trigger-distance"],"minItemWidth":[2,"min-item-width"],"gridGap":[2,"grid-gap"],"pullDistance":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"isRefreshing":["handleRefreshingChange"]}],[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"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[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);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -161,7 +161,7 @@ export class LotteryHakunaTicketHistory {
161
161
  return (h("svg", { width: "45", height: "45", viewBox: "0 0 45 45", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z" })));
162
162
  }
163
163
  render() {
164
- return (h("div", { key: 'f670a3429de4b967f7ea6de648e91201f08611c3', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'e1f7c9acdfccf3b059af66f6be956027fe9157a9', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (h("div", { key: 'db36df4b9e6277883149a7dfd905b458656c6956', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), h("span", { key: 'bf55f6af11f8760b75b76c3866714ca311671ef4' }, this.errorMessage))), h("lottery-infinite-scroll", { key: '33d57ff5205e065ce989d88a5f4ab22ed8ce8520', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, hasMore: this.hasMore, items: [...this.visibleTickets], minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, h("div", { key: '3c64ee5287ec0e1be431890c2a2a1e9011fb41f0', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, h("span", { key: '23f990cea7385a6de85cc246d2e9c8d942d9838d', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), h("div", { key: '74a90a269101258ac8e8e642773c57fe1aef7971', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), h("div", { key: 'ffa6650f925314df9ea067422ce60f38bee01f0e', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
164
+ return (h("div", { key: '53855de1d22947533c4573d78309a9b00f0f21af', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '6b8183876d82fa7ee1283be91642dbc6d75ece8b', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (h("div", { key: '96d7bd606994bb7a9518c559a485aa475e082177', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), h("span", { key: '8ab84918a1a4db13e9de321b223553cf1ad05fd4' }, this.errorMessage))), h("lottery-infinite-scroll", { key: '0fb1e884533627ebf5b9563e2628d823f39f8ff7', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, translationUrl: this.translationUrl, language: this.language, hasMore: this.hasMore, items: [...this.visibleTickets], minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, h("div", { key: '8091dce7a4322f4918b2087ebbf6813a1b5f3a6b', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, h("span", { key: '44fdefc0599b3c52db7ae9b4e9e8b73193dc315c', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), h("div", { key: '657b6539e005df3dad4b478533e6724445394ce8', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), h("div", { key: '8b857eee10585f0fc31f26bf0a3ef2d0b28b16b6', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
165
165
  }
166
166
  static get is() { return "lottery-hakuna-ticket-history"; }
167
167
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,43 @@
1
+ const DEFAULT_LANGUAGE = 'en';
2
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
3
+ const TRANSLATIONS = {
4
+ en: {
5
+ noMoreData: 'No more data',
6
+ loading: 'Loading...',
7
+ release: 'Release',
8
+ refreshing: 'Refreshing...',
9
+ pull: 'Pull'
10
+ }
11
+ };
12
+ export const translate = (key, customLang, replacements) => {
13
+ const lang = customLang;
14
+ let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
15
+ if (replacements) {
16
+ Object.keys(replacements).forEach((placeholder) => {
17
+ translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
18
+ });
19
+ }
20
+ return translation;
21
+ };
22
+ export const getTranslations = (data) => {
23
+ Object.keys(data).forEach((item) => {
24
+ for (let key in data[item]) {
25
+ TRANSLATIONS[item][key] = data[item][key];
26
+ }
27
+ });
28
+ };
29
+ export const resolveTranslationUrl = async (translationUrl) => {
30
+ if (translationUrl) {
31
+ try {
32
+ const response = await fetch(translationUrl);
33
+ if (!response.ok) {
34
+ throw new Error(`HTTP error! status: ${response.status}`);
35
+ }
36
+ const translations = await response.json();
37
+ getTranslations(translations);
38
+ }
39
+ catch (error) {
40
+ console.error('Failed to fetch or parse translations from URL:', error);
41
+ }
42
+ }
43
+ };