@everymatrix/casino-engagement-suite-jackpot-details 1.44.0 → 1.45.0

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 (58) hide show
  1. package/dist/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.esm.js +1 -1
  2. package/dist/casino-engagement-suite-jackpot-details/p-5a599b1a.entry.js +1 -0
  3. package/dist/casino-engagement-suite-jackpot-details/p-be66309f.entry.js +1 -0
  4. package/dist/casino-engagement-suite-jackpot-details/p-c7ee604a.js +2 -0
  5. package/dist/casino-engagement-suite-jackpot-details/p-e1255160.js +1 -0
  6. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  7. package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.entry.js +274 -284
  8. package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.js +17 -11
  9. package/dist/cjs/casino-engagement-suite-progress-bar.cjs.entry.js +58 -75
  10. package/dist/cjs/index-d83151b6.js +1331 -0
  11. package/dist/cjs/loader.cjs.js +7 -13
  12. package/dist/collection/collection-manifest.json +3 -3
  13. package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.css +95 -104
  14. package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.js +466 -526
  15. package/dist/collection/components/casino-engagement-suite-jackpot-details/index.js +1 -0
  16. package/dist/collection/utils/index.js +3 -3
  17. package/dist/collection/utils/locale.utils.js +22 -22
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/esm/app-globals-0f993ce5.js +3 -0
  20. package/dist/esm/casino-engagement-suite-jackpot-details.entry.js +274 -284
  21. package/dist/esm/casino-engagement-suite-jackpot-details.js +14 -11
  22. package/dist/esm/casino-engagement-suite-progress-bar.entry.js +58 -75
  23. package/dist/esm/index-0237d1e2.js +1303 -0
  24. package/dist/esm/loader.js +7 -13
  25. package/dist/stencil.config.dev.js +17 -0
  26. package/dist/stencil.config.js +14 -19
  27. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.d.ts +2 -0
  28. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.dev.d.ts +2 -0
  29. package/dist/types/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.d.ts +88 -88
  30. package/dist/types/components/casino-engagement-suite-jackpot-details/index.d.ts +1 -0
  31. package/dist/types/components.d.ts +19 -2
  32. package/dist/types/models/index.d.ts +37 -37
  33. package/dist/types/stencil-public-runtime.d.ts +142 -33
  34. package/dist/types/utils/utils.d.ts +1 -0
  35. package/loader/cdn.js +1 -3
  36. package/loader/index.cjs.js +1 -3
  37. package/loader/index.d.ts +13 -1
  38. package/loader/index.es2017.js +1 -3
  39. package/loader/index.js +1 -3
  40. package/loader/package.json +1 -0
  41. package/package.json +12 -2
  42. package/dist/casino-engagement-suite-jackpot-details/p-0135e830.js +0 -1
  43. package/dist/casino-engagement-suite-jackpot-details/p-8fee813c.entry.js +0 -1
  44. package/dist/casino-engagement-suite-jackpot-details/p-b361748c.entry.js +0 -1
  45. package/dist/cjs/index-84a14c86.js +0 -1349
  46. package/dist/components/casino-engagement-suite-jackpot-details.d.ts +0 -11
  47. package/dist/components/casino-engagement-suite-jackpot-details.js +0 -439
  48. package/dist/components/casino-engagement-suite-progress-bar.js +0 -110
  49. package/dist/components/index.d.ts +0 -26
  50. package/dist/components/index.js +0 -1
  51. package/dist/esm/index-5707e619.js +0 -1322
  52. package/dist/esm/polyfills/core-js.js +0 -11
  53. package/dist/esm/polyfills/css-shim.js +0 -1
  54. package/dist/esm/polyfills/dom.js +0 -79
  55. package/dist/esm/polyfills/es5-html-element.js +0 -1
  56. package/dist/esm/polyfills/index.js +0 -34
  57. package/dist/esm/polyfills/system.js +0 -6
  58. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-jackpot-details/.stencil/packages/casino-engagement-suite-jackpot-details/stencil.config.d.ts +0 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-84a14c86.js');
5
+ const index = require('./index-d83151b6.js');
6
6
 
7
7
  function _typeof(o) {
8
8
  "@babel/helpers - typeof";
@@ -99,308 +99,298 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
99
99
  const DEFAULT_LANGUAGE = 'en';
100
100
  const SUPPORTED_LANGUAGES = ['en'];
101
101
  const TRANSLATIONS = {
102
- en: {
103
- jackpots: 'Jackpots',
104
- join: 'Join',
105
- unjoin: 'Unjoin',
106
- info: 'Info',
107
- games: 'Games',
108
- operatorContribution: 'Operator Contribution',
109
- betContribution: 'Bet Contribution',
110
- type: 'Type',
111
- winningProbability: 'Winning Probability',
112
- tc: 'Terms & Conditions',
113
- jackpotIsWon: 'Jackpot is won!',
114
- loadMore: 'Load More',
115
- jackpotDetails: 'Jackpot Details',
116
- minBet: 'Min Bet',
117
- maxBet: 'Max Bet',
118
- Suspended: 'Suspended',
119
- Closed: 'Closed',
120
- contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
121
- }
102
+ en: {
103
+ jackpots: 'Jackpots',
104
+ join: 'Join',
105
+ unjoin: 'Unjoin',
106
+ info: 'Info',
107
+ games: 'Games',
108
+ operatorContribution: 'Operator Contribution',
109
+ betContribution: 'Bet Contribution',
110
+ type: 'Type',
111
+ winningProbability: 'Winning Probability',
112
+ tc: 'Terms & Conditions',
113
+ jackpotIsWon: 'Jackpot is won!',
114
+ loadMore: 'Load More',
115
+ jackpotDetails: 'Jackpot Details',
116
+ minBet: 'Min Bet',
117
+ maxBet: 'Max Bet',
118
+ Suspended: 'Suspended',
119
+ Closed: 'Closed',
120
+ contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
121
+ }
122
122
  };
123
123
  const translate = (key, customLang) => {
124
- const lang = customLang;
125
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
124
+ const lang = customLang;
125
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
126
126
  };
127
127
 
128
128
  function formatBalance(amount, currency, maxAmount = 99999999) {
129
- amount = Math.min(amount, maxAmount);
130
- return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
131
- .format(amount)}`;
129
+ amount = Math.min(amount, maxAmount);
130
+ return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
131
+ .format(amount)}`;
132
132
  }
133
133
 
134
- const casinoEngagementSuiteJackpotDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.PopupButton{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:14px;font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.PopupButton.Active{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.PopupButton.Active::before{content:\"\";position:absolute;inset:0;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .JackpotDetailsTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-primary, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotIconButton{width:16px;height:16px;cursor:pointer;display:flex;justify-content:center;align-items:center}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:\"Montserrat\", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:Montserrat, sans-serif;font-size:18px;font-weight:var(--emw--font-weight-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:Montserrat, sans-serif;font-weight:var(--emw--font-weight-bold, 700);font-size:12px;line-height:15px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotGamesLoadMore::before,.JackpotJoinButton.Joined::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emfe-w-color-white, #FFF);text-transform:capitalize}.JackpotDetailsTabsWrapper{display:flex;flex-direction:column}.JackpotDetailsTabs{margin-top:20px;display:flex;position:relative}.JackpotDetailsTabs .JackpotDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.JackpotDetailsTabs .JackpotDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.JackpotDetailsTabs::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:14px;line-height:17px;display:flex;align-items:center}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotGamesListWrapper{overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\")}.JackpotDetailsButton .Open{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-primary, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotDetailsPopup.Tablet .JackpotsTooltipBackdrop,.JackpotDetailsPopup.Desktop .JackpotsTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .JackpotsTooltip,.JackpotDetailsPopup.Desktop .JackpotsTooltip{padding:60px 65px;font-size:var(--emw--font-size-small, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotsTooltip .JackpotsIconButton,.JackpotDetailsPopup.Desktop .JackpotsTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .JackpotContributionTooltipButton,.JackpotDetailsPopup.Tablet .JackpotIconButton,.JackpotDetailsPopup.Desktop .JackpotContributionTooltipButton,.JackpotDetailsPopup.Desktop .JackpotIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:22px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .PopupButton,.JackpotDetailsPopup.Desktop .PopupButton{min-height:36px;font-size:16px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:16px;line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:14px;line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .JackpotDetailsTabs .JackpotDetailsTab,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs .JackpotDetailsTab{font-size:16px;line-height:20px}";
134
+ const casinoEngagementSuiteJackpotDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:\"\";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.EngagementSuiteButton.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF);text-transform:capitalize}.EngagementSuiteTabs{margin-top:20px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px;display:flex;align-items:center}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .EngagementSuiteIconButton.Help{margin-left:5px}.JackpotGamesListWrapper{margin-top:12px;overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\")}.JackpotDetailsButton .Open{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-contrast, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton{min-width:98px;min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton.JackpotGamesButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton.JackpotGamesButton{min-width:140px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.JackpotDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotGamesListWrapper,.JackpotDetailsPopup.Desktop .JackpotGamesListWrapper{margin-top:20px}";
135
+ const CasinoEngagementSuiteJackpotDetailsStyle0 = casinoEngagementSuiteJackpotDetailsCss;
135
136
 
136
137
  const CasinoEngagementSuiteJackpotDetails = class {
137
- constructor(hostRef) {
138
- index.registerInstance(this, hostRef);
139
- this.close = index.createEvent(this, "close", 7);
140
- this.back = index.createEvent(this, "back", 7);
141
- /**
142
- * Client custom styling via string
143
- */
144
- this.clientStyling = '';
145
- /**
146
- * Client custom styling via url
147
- */
148
- this.clientStylingUrl = '';
149
- /**
150
- * Language of the widget
151
- */
152
- this.language = 'en';
153
- /**
154
- * Current game slug
155
- */
156
- this.gameSlug = '';
157
- /**
158
- * User's device type
159
- */
160
- this.device = 'Mobile';
161
- this.limitStylingAppends = false;
162
- this.timer = '';
163
- this.disabledStatus = '';
164
- this.activeTab = 1;
165
- this.visibleGames = [];
166
- this.enabled = false;
167
- this.showDetails = false;
168
- this.jackpotEndTime = '';
169
- this.showTooltip = false;
170
- this.maxVisibleGames = 0;
171
- this.handleTabChange = (e) => {
172
- this.activeTab = +(e.target.getAttribute('data-index'));
173
- this.visibleGames = [];
174
- this.maxVisibleGames = 0;
175
- };
176
- this.handleLoadMore = () => {
177
- this.visibleGames = this.jackpot.GamesInfo.slice(0, this.visibleGames.length + this.maxVisibleGames);
178
- };
179
- this.toggleShowDetails = () => {
180
- this.showDetails = !this.showDetails;
181
- };
182
- this.toggleTooltip = () => {
183
- this.showTooltip = !this.showTooltip;
184
- };
185
- this.setClientStyling = () => {
186
- let sheet = document.createElement('style');
187
- sheet.innerHTML = this.clientStyling;
188
- this.host.prepend(sheet);
189
- };
190
- this.setClientStylingURL = () => {
191
- let url = new URL(this.clientStylingUrl);
192
- let cssFile = document.createElement('style');
193
- fetch(url.href)
194
- .then((res) => res.text())
195
- .then((data) => {
196
- cssFile.innerHTML = data;
197
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
198
- })
199
- .catch((err) => {
200
- console.log('Error ', err);
201
- });
202
- };
203
- this.handleCloseClick = () => {
204
- this.close.emit();
205
- };
206
- this.handleBackClick = () => {
207
- this.back.emit();
208
- };
209
- this.onGameClick = (ev) => {
210
- const slug = ev.currentTarget.getAttribute('data-slug');
211
- if (slug) {
212
- window.postMessage({
213
- type: 'EngagementSuiteGameRedirect',
214
- data: {
215
- Slug: slug
216
- }
217
- });
218
- }
219
- };
220
- }
221
- handleEvent(e) {
222
- const { type, data } = e === null || e === void 0 ? void 0 : e.data;
223
- switch (type) {
224
- case 'UpdateJackpotStatus': {
225
- const data = e.data.data;
226
- if (this.jackpot.JackpotId === data.JackpotId) {
227
- this.updateJackpotStatus(e.data.data);
138
+ constructor(hostRef) {
139
+ index.registerInstance(this, hostRef);
140
+ this.close = index.createEvent(this, "close", 7);
141
+ this.back = index.createEvent(this, "back", 7);
142
+ this.maxVisibleGames = 0;
143
+ this.handleTabChange = (e) => {
144
+ this.activeTab = +(e.target.getAttribute('data-index'));
145
+ this.visibleGames = [];
146
+ this.maxVisibleGames = 0;
147
+ };
148
+ this.handleLoadMore = () => {
149
+ this.visibleGames = this.jackpot.GamesInfo.slice(0, this.visibleGames.length + this.maxVisibleGames);
150
+ };
151
+ this.toggleShowDetails = () => {
152
+ this.showDetails = !this.showDetails;
153
+ };
154
+ this.toggleTooltip = () => {
155
+ this.showTooltip = !this.showTooltip;
156
+ };
157
+ this.setClientStyling = () => {
158
+ let sheet = document.createElement('style');
159
+ sheet.innerHTML = this.clientStyling;
160
+ this.host.prepend(sheet);
161
+ };
162
+ this.setClientStylingURL = () => {
163
+ let url = new URL(this.clientStylingUrl);
164
+ let cssFile = document.createElement('style');
165
+ fetch(url.href)
166
+ .then((res) => res.text())
167
+ .then((data) => {
168
+ cssFile.innerHTML = data;
169
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
170
+ })
171
+ .catch((err) => {
172
+ console.log('Error ', err);
173
+ });
174
+ };
175
+ this.handleCloseClick = () => {
176
+ this.close.emit();
177
+ };
178
+ this.handleBackClick = () => {
179
+ this.back.emit();
180
+ };
181
+ this.onGameClick = (ev) => {
182
+ const slug = ev.currentTarget.getAttribute('data-slug');
183
+ if (slug) {
184
+ window.postMessage({
185
+ type: 'EngagementSuiteGameRedirect',
186
+ data: {
187
+ Slug: slug
188
+ }
189
+ });
190
+ }
191
+ };
192
+ this.clientStyling = '';
193
+ this.clientStylingUrl = '';
194
+ this.jackpot = undefined;
195
+ this.jackpotChangeStatusRequest = undefined;
196
+ this.language = 'en';
197
+ this.gameSlug = '';
198
+ this.device = 'Mobile';
199
+ this.limitStylingAppends = false;
200
+ this.timer = '';
201
+ this.disabledStatus = '';
202
+ this.activeTab = 1;
203
+ this.visibleGames = [];
204
+ this.enabled = false;
205
+ this.balance = undefined;
206
+ this.winBalance = undefined;
207
+ this.showDetails = false;
208
+ this.jackpotEndTime = '';
209
+ this.showTooltip = false;
210
+ }
211
+ handleEvent(e) {
212
+ const { type, data } = e === null || e === void 0 ? void 0 : e.data;
213
+ switch (type) {
214
+ case 'UpdateJackpotStatus': {
215
+ const data = e.data.data;
216
+ if (this.jackpot.JackpotId === data.JackpotId) {
217
+ this.updateJackpotStatus(e.data.data);
218
+ }
219
+ break;
220
+ }
221
+ case 'JoinJackpotResult': {
222
+ const res = data;
223
+ if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
224
+ this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
225
+ }
226
+ break;
227
+ }
228
+ }
229
+ }
230
+ handleJackpotUpdate() {
231
+ this.balance = this.jackpot.Balance;
232
+ this.winBalance = this.jackpot.WinBalance;
233
+ }
234
+ handleResize() {
235
+ this.activeTab === 2 && this.setVisibleGames();
236
+ this.showTooltip = false;
237
+ }
238
+ componentWillLoad() {
239
+ this.enabled = this.jackpot.Enabled;
240
+ this.balance = this.jackpot.Balance;
241
+ this.winBalance = this.jackpot.WinBalance;
242
+ this.jackpotEndTime = this.jackpot.JackpotEndTime;
243
+ this.disabledStatus = this.jackpot.Reason || '';
244
+ this.startCountdown();
245
+ }
246
+ componentDidRender() {
247
+ if (!this.limitStylingAppends && this.host) {
248
+ if (this.clientStyling)
249
+ this.setClientStyling();
250
+ if (this.clientStylingUrl)
251
+ this.setClientStylingURL();
252
+ this.limitStylingAppends = true;
228
253
  }
229
- break;
230
- }
231
- case 'JoinJackpotResult': {
232
- const res = data;
233
- if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
234
- this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
254
+ if (this.activeTab === 2 && !this.maxVisibleGames) {
255
+ this.setVisibleGames();
235
256
  }
236
- break;
237
- }
238
257
  }
239
- }
240
- handleJackpotUpdate() {
241
- this.balance = this.jackpot.Balance;
242
- this.winBalance = this.jackpot.WinBalance;
243
- }
244
- handleResize() {
245
- this.activeTab === 2 && this.setVisibleGames();
246
- this.showTooltip = false;
247
- }
248
- componentWillLoad() {
249
- this.enabled = this.jackpot.Enabled;
250
- this.balance = this.jackpot.Balance;
251
- this.winBalance = this.jackpot.WinBalance;
252
- this.jackpotEndTime = this.jackpot.JackpotEndTime;
253
- this.disabledStatus = this.jackpot.Reason || '';
254
- this.startCountdown();
255
- }
256
- componentDidRender() {
257
- if (!this.limitStylingAppends && this.host) {
258
- if (this.clientStyling)
259
- this.setClientStyling();
260
- if (this.clientStylingUrl)
261
- this.setClientStylingURL();
262
- this.limitStylingAppends = true;
258
+ disconnectedCallback() {
259
+ this.clearInterval();
263
260
  }
264
- if (this.activeTab === 2 && !this.maxVisibleGames) {
265
- this.setVisibleGames();
261
+ clearInterval() {
262
+ if (this.interval) {
263
+ clearInterval(this.interval);
264
+ this.interval = null;
265
+ }
266
266
  }
267
- }
268
- disconnectedCallback() {
269
- this.clearInterval();
270
- }
271
- clearInterval() {
272
- if (this.interval) {
273
- clearInterval(this.interval);
274
- this.interval = null;
267
+ setVisibleGames() {
268
+ const gap = this.device === 'Mobile' ? 10 : 12;
269
+ const gamesPerRow = this.device === 'Mobile' ? 4 : 5;
270
+ const availableWidth = this.gamesListWrapperEl.offsetWidth - (gap * (gamesPerRow - 1));
271
+ const gameElWidth = availableWidth / gamesPerRow;
272
+ const gameElHeight = (gameElWidth / 74 * 40) + gap;
273
+ this.maxVisibleGames = Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight / gameElHeight) * gamesPerRow, gamesPerRow);
274
+ this.visibleGames = this.jackpot.GamesInfo.slice(0, this.maxVisibleGames);
275
275
  }
276
- }
277
- setVisibleGames() {
278
- const gap = this.device === 'Mobile' ? 10 : 12;
279
- const gamesPerRow = this.device === 'Mobile' ? 4 : 5;
280
- const availableWidth = this.gamesListWrapperEl.offsetWidth - (gap * (gamesPerRow - 1));
281
- const gameElWidth = availableWidth / gamesPerRow;
282
- const gameElHeight = (gameElWidth / 74 * 40) + gap;
283
- this.maxVisibleGames = Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight / gameElHeight) * gamesPerRow, gamesPerRow);
284
- this.visibleGames = this.jackpot.GamesInfo.slice(0, this.maxVisibleGames);
285
- }
286
- updateJackpotStatus(event) {
287
- if (event.IsClosed) {
288
- this.clearInterval();
289
- this.disabledStatus = event.Reason;
290
- this.activeTab = 1;
276
+ updateJackpotStatus(event) {
277
+ if (event.IsClosed) {
278
+ this.clearInterval();
279
+ this.disabledStatus = event.Reason;
280
+ this.activeTab = 1;
281
+ }
282
+ else {
283
+ this.disabledStatus = '';
284
+ this.jackpotEndTime = event.JackpotEndTime;
285
+ this.startCountdown();
286
+ }
291
287
  }
292
- else {
293
- this.disabledStatus = '';
294
- this.jackpotEndTime = event.JackpotEndTime;
295
- this.startCountdown();
288
+ getTopNavigationTemplate() {
289
+ return (index.h("div", { class: "JackpotDetailsNavigation" }, index.h("button", { class: "EngagementSuiteIconButton Back", onClick: this.handleBackClick }), index.h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
296
290
  }
297
- }
298
- getTopNavigationTemplate() {
299
- return (index.h("div", { class: "JackpotDetailsNavigation" }, index.h("button", { class: "JackpotIconButton", onClick: this.handleBackClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg", alt: "back" })), index.h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), index.h("button", { class: "JackpotIconButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "close" }))));
300
- }
301
- getJackpotBalance() {
302
- return formatBalance(this.balance, this.jackpot.Currency);
303
- }
304
- getJoinButtonClasses() {
305
- return {
306
- PopupButton: true,
307
- Active: this.enabled,
308
- Loading: this.jackpot.Pending
309
- };
310
- }
311
- getJackpotDetailsHeaderTemplate() {
312
- const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
313
- return (index.h("div", { class: "JackpotDetailsHeader" }, index.h("div", null, index.h("div", { class: "JackpotType" }, this.jackpot.Type), index.h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), index.h("div", { class: "JackpotDetailsHeaderSecondCol" }, index.h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
314
- ? translate('unjoin', this.language)
315
- : translate('join', this.language)), !!this.winBalance && index.h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
316
- }
317
- getTabsTemplate() {
318
- return index.h("div", { class: "JackpotDetailsTabs" }, index.h("div", { "data-index": "1", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), index.h("div", { "data-index": "2", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
319
- }
320
- getTabsContentTemplate() {
321
- return this.activeTab === 1
322
- ? this.getJackpotInfoTemplate()
323
- : this.getGamesTemplate();
324
- }
325
- getJackpotDetailsTemplate() {
326
- return index.h("div", null, index.h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, index.h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), index.h("span", null, translate('jackpotDetails', this.language))), this.showDetails && index.h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && index.h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && index.h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
327
- }
328
- getBetLimitsRange() {
329
- var _a, _b, _c, _d;
330
- if (this.jackpot.BetLimits) {
331
- const playerCurrency = this.jackpot.Currency;
332
- const betCurrencies = Object.keys(this.jackpot.BetLimits);
333
- const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
334
- const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
335
- const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
336
- const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
337
- const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
338
- const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
339
- return index.h("div", null, showMinBet && index.h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", index.h("span", null, formattedMinBet)), showMaxBet && index.h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", index.h("span", null, formattedMaxBet)));
291
+ getJackpotBalance() {
292
+ return formatBalance(this.balance, this.jackpot.Currency);
340
293
  }
341
- }
342
- getJackpotInfoTemplate() {
343
- const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
344
- return index.h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), index.h("div", { class: "JackpotInfo" }, index.h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.ContributionPercent, "%")), index.h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", index.h("span", null, this.jackpot.JackpotTypePresentation)), index.h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", index.h("span", null, "1:", this.jackpot.Probability)), index.h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.OperatorContributionPercent, "%"), index.h("button", { class: "JackpotContributionTooltipButton", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
345
- }
346
- getGamesTemplate() {
347
- const list = this.visibleGames.map((game) => {
348
- return index.h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
349
- });
350
- return [
351
- index.h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, index.h("div", { class: "JackpotGamesList" }, list)),
352
- this.visibleGames.length < this.jackpot.GamesInfo.length
353
- ? index.h("button", { class: "PopupButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
354
- : ''
355
- ];
356
- }
357
- getJackpotCountdown() {
358
- const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
359
- return (index.h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
360
- }
361
- startCountdown() {
362
- this.updateTimer();
363
- this.interval = setInterval(() => {
364
- this.updateTimer();
365
- }, 1000);
366
- }
367
- updateTimer() {
368
- const expirationTime = new Date(this.jackpotEndTime).getTime();
369
- const now = new Date().getTime();
370
- const distance = expirationTime - now;
371
- if (distance < 1) {
372
- this.clearInterval();
373
- return;
294
+ getJoinButtonClasses() {
295
+ return {
296
+ EngagementSuiteButton: true,
297
+ Active: this.enabled,
298
+ Loading: this.jackpot.Pending
299
+ };
374
300
  }
375
- const { days, hours, minutes, seconds } = {
376
- days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
377
- hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
378
- minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
379
- seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
380
- };
381
- this.timer = days === '00'
382
- ? `${hours}h:${minutes}m:${seconds}s`
383
- : `${days}d:${hours}h:${minutes}m`;
384
- }
385
- getPopupClasses() {
386
- return {
387
- JackpotDetailsPopup: true,
388
- Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
389
- [this.device]: true,
390
- [this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
391
- };
392
- }
393
- getTooltipTemplate() {
394
- return (index.h("div", { class: "JackpotsTooltipBackdrop" }, index.h("div", { class: "JackpotsTooltip" }, index.h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('contributionTooltip', this.language))));
395
- }
396
- render() {
397
- return index.h("div", { class: this.getPopupClasses() }, this.getTopNavigationTemplate(), index.h("div", { class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
398
- }
399
- get host() { return index.getElement(this); }
400
- static get watchers() { return {
401
- "jackpot": ["handleJackpotUpdate"]
402
- }; }
301
+ getJackpotDetailsHeaderTemplate() {
302
+ const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
303
+ return (index.h("div", { class: "JackpotDetailsHeader" }, index.h("div", null, index.h("div", { class: "JackpotType" }, this.jackpot.Type), index.h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), index.h("div", { class: "JackpotDetailsHeaderSecondCol" }, index.h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
304
+ ? translate('unjoin', this.language)
305
+ : translate('join', this.language)), !!this.winBalance && index.h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
306
+ }
307
+ getTabsTemplate() {
308
+ return index.h("div", { class: "EngagementSuiteTabs" }, index.h("div", { "data-index": "1", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), index.h("div", { "data-index": "2", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
309
+ }
310
+ getTabsContentTemplate() {
311
+ return this.activeTab === 1
312
+ ? this.getJackpotInfoTemplate()
313
+ : this.getGamesTemplate();
314
+ }
315
+ getJackpotDetailsTemplate() {
316
+ return index.h("div", null, index.h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, index.h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), index.h("span", null, translate('jackpotDetails', this.language))), this.showDetails && index.h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && index.h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && index.h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
317
+ }
318
+ getBetLimitsRange() {
319
+ var _a, _b, _c, _d;
320
+ if (this.jackpot.BetLimits) {
321
+ const playerCurrency = this.jackpot.Currency;
322
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
323
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
324
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
325
+ const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
326
+ const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
327
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
328
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
329
+ return index.h("div", null, showMinBet && index.h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", index.h("span", null, formattedMinBet)), showMaxBet && index.h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", index.h("span", null, formattedMaxBet)));
330
+ }
331
+ }
332
+ getJackpotInfoTemplate() {
333
+ const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
334
+ return index.h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), index.h("div", { class: "JackpotInfo" }, index.h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.ContributionPercent, "%")), index.h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", index.h("span", null, this.jackpot.JackpotTypePresentation)), index.h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", index.h("span", null, "1:", this.jackpot.Probability)), index.h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.OperatorContributionPercent, "%"), index.h("button", { class: "EngagementSuiteIconButton Help", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
335
+ }
336
+ getGamesTemplate() {
337
+ const list = this.visibleGames.map((game) => {
338
+ return index.h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
339
+ });
340
+ return [
341
+ index.h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, index.h("div", { class: "JackpotGamesList" }, list)),
342
+ this.visibleGames.length < this.jackpot.GamesInfo.length
343
+ ? index.h("button", { class: "EngagementSuiteButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
344
+ : ''
345
+ ];
346
+ }
347
+ getJackpotCountdown() {
348
+ const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
349
+ return (index.h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
350
+ }
351
+ startCountdown() {
352
+ this.updateTimer();
353
+ this.interval = setInterval(() => {
354
+ this.updateTimer();
355
+ }, 1000);
356
+ }
357
+ updateTimer() {
358
+ const expirationTime = new Date(this.jackpotEndTime).getTime();
359
+ const now = new Date().getTime();
360
+ const distance = expirationTime - now;
361
+ if (distance < 1) {
362
+ this.clearInterval();
363
+ return;
364
+ }
365
+ const { days, hours, minutes, seconds } = {
366
+ days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
367
+ hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
368
+ minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
369
+ seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
370
+ };
371
+ this.timer = days === '00'
372
+ ? `${hours}h:${minutes}m:${seconds}s`
373
+ : `${days}d:${hours}h:${minutes}m`;
374
+ }
375
+ getPopupClasses() {
376
+ return {
377
+ JackpotDetailsPopup: true,
378
+ Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
379
+ [this.device]: true,
380
+ [this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
381
+ };
382
+ }
383
+ getTooltipTemplate() {
384
+ return (index.h("div", { class: "EngagementSuiteTooltipBackdrop" }, index.h("div", { class: "EngagementSuiteTooltip" }, index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), translate('contributionTooltip', this.language))));
385
+ }
386
+ render() {
387
+ return index.h("div", { key: '96e68ef1594d185301719b8c8f4c6cb0c32307e9', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), index.h("div", { key: '8eb282874b1efc99a05dfcf479b8b1be51402caa', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
388
+ }
389
+ get host() { return index.getElement(this); }
390
+ static get watchers() { return {
391
+ "jackpot": ["handleJackpotUpdate"]
392
+ }; }
403
393
  };
404
- CasinoEngagementSuiteJackpotDetails.style = casinoEngagementSuiteJackpotDetailsCss;
394
+ CasinoEngagementSuiteJackpotDetails.style = CasinoEngagementSuiteJackpotDetailsStyle0;
405
395
 
406
396
  exports.casino_engagement_suite_jackpot_details = CasinoEngagementSuiteJackpotDetails;