@everymatrix/bonus-powerups-ingame-list 0.0.25 → 0.0.26

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 (37) hide show
  1. package/dist/bonus-powerups-ingame-list/active-confirm-modal_3.entry.js +1 -0
  2. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-01fff0bc.js +3 -0
  3. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list.esm.js +1 -1
  4. package/dist/bonus-powerups-ingame-list/index-e015b33d.js +2 -0
  5. package/dist/bonus-powerups-ingame-list/index.esm.js +1 -1
  6. package/dist/cjs/active-confirm-modal_3.cjs.entry.js +121 -0
  7. package/dist/cjs/{bonus-powerups-ingame-list-c9172936.js → bonus-powerups-ingame-list-db296f5c.js} +100 -28
  8. package/dist/cjs/bonus-powerups-ingame-list.cjs.js +2 -2
  9. package/dist/cjs/{index-f60c43c6.js → index-1c45277e.js} +9 -3
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/active-confirm-modal/active-confirm-modal.component.js +105 -0
  14. package/dist/collection/components/active-confirm-modal/active-confirm-modal.css +50 -0
  15. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.css +45 -4
  16. package/dist/collection/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.js +89 -23
  17. package/dist/collection/components/time-count/time-count.js +73 -5
  18. package/dist/collection/utils/locale.utils.js +9 -3
  19. package/dist/collection/utils/utils.js +10 -2
  20. package/dist/esm/active-confirm-modal_3.entry.js +116 -0
  21. package/dist/esm/{bonus-powerups-ingame-list-a8638981.js → bonus-powerups-ingame-list-01fff0bc.js} +98 -27
  22. package/dist/esm/bonus-powerups-ingame-list.js +3 -3
  23. package/dist/esm/{index-20f17dc8.js → index-e015b33d.js} +9 -3
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/loader.js +3 -3
  26. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-powerups-ingame-list/.stencil/libs/common/src/types/casino/powerups.d.ts +1 -0
  27. package/dist/types/components/active-confirm-modal/active-confirm-modal.component.d.ts +10 -0
  28. package/dist/types/components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.d.ts +13 -0
  29. package/dist/types/components/time-count/time-count.d.ts +3 -0
  30. package/dist/types/components.d.ts +41 -0
  31. package/dist/types/utils/utils.d.ts +1 -0
  32. package/package.json +1 -1
  33. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list-a8638981.js +0 -3
  34. package/dist/bonus-powerups-ingame-list/bonus-powerups-ingame-list_2.entry.js +0 -1
  35. package/dist/bonus-powerups-ingame-list/index-20f17dc8.js +0 -2
  36. package/dist/cjs/bonus-powerups-ingame-list_2.cjs.entry.js +0 -82
  37. package/dist/esm/bonus-powerups-ingame-list_2.entry.js +0 -78
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f60c43c6.js');
3
+ const index = require('./index-1c45277e.js');
4
4
 
5
5
  const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
6
6
 
@@ -126,14 +126,20 @@ const TRANSLATIONS = {
126
126
  powerups: 'Power-ups',
127
127
  activate: 'Activate',
128
128
  expiresIn: 'Expires in - ',
129
- xp: 'Points',
129
+ inProgress: 'In Progress',
130
+ endsIn: 'Ends in - ',
131
+ xp: 'XP',
130
132
  coins: 'Coins',
131
133
  minutes: 'min',
132
- rounds: 'rounds',
134
+ rounds: 'Rounds',
133
135
  days: 'Days',
134
136
  nothingHere: 'Nothing here -- yet!',
135
137
  noPowerUps: 'No power-ups have been used at the moment.',
136
- poweringTooltip: 'Power-ups are currently unavailable as you have already activated one power-up. Only one power-up can be active at a time.'
138
+ poweringTooltip: 'Power-ups are currently unavailable as you have already activated one power-up. Only one power-up can be active at a time.',
139
+ later: 'Later',
140
+ activateNow: 'Activate Now',
141
+ activeTitle: 'Activate power-up?',
142
+ activeContent: 'In case of activation the countdown starts immediately.\n Are you sure you want to activate?'
137
143
  }
138
144
  };
139
145
  const getTranslations = (url) => {
@@ -170,11 +176,11 @@ var MultiplierMode;
170
176
  MultiplierMode["COINS"] = "coins";
171
177
  MultiplierMode["XP"] = "xp";
172
178
  })(MultiplierMode || (MultiplierMode = {}));
173
- var BoostingPeriodMode;
179
+ exports.BoostingPeriodMode = void 0;
174
180
  (function (BoostingPeriodMode) {
175
181
  BoostingPeriodMode["TIME_PERIOD"] = "timePeriod";
176
182
  BoostingPeriodMode["NUMBER_OF_ROUNDS"] = "numberOfRounds";
177
- })(BoostingPeriodMode || (BoostingPeriodMode = {}));
183
+ })(exports.BoostingPeriodMode || (exports.BoostingPeriodMode = {}));
178
184
  var PowerUpStatus;
179
185
  (function (PowerUpStatus) {
180
186
  PowerUpStatus[PowerUpStatus["ACTIVE"] = 0] = "ACTIVE";
@@ -5863,7 +5869,7 @@ hooks.HTML5_FMT = {
5863
5869
  };
5864
5870
 
5865
5871
  const powerUpWithoutGamesSearchConditions = {
5866
- fields: "id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,activatedAt",
5872
+ fields: "id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,usedNumberOfRounds,currentTime,expireTime,activatedAt",
5867
5873
  status: `${PowerUpStatus.ACTIVE},${PowerUpStatus.ACTIVATED}`
5868
5874
  };
5869
5875
  const getActivedExpireTime = (powerUp) => {
@@ -5872,6 +5878,14 @@ const getActivedExpireTime = (powerUp) => {
5872
5878
  }
5873
5879
  return hooks(powerUp.activatedAt).add(powerUp.boostingPeriod.minutes, 'minute').format('YYYY-MM-DDTHH:mm:ssZ');
5874
5880
  };
5881
+ function debounce(func, wait) {
5882
+ let timeout;
5883
+ return function (...args) {
5884
+ const context = this;
5885
+ clearTimeout(timeout);
5886
+ timeout = setTimeout(() => func.apply(context, args), wait);
5887
+ };
5888
+ }
5875
5889
 
5876
5890
  const CloseSvg = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
5877
5891
  <path d="M1.75 12.2505L12.25 1.75049" stroke="white" stroke-width="0.952264" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
@@ -5918,7 +5932,7 @@ const InfoSvg = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xml
5918
5932
  </svg>
5919
5933
  `;
5920
5934
 
5921
- const bonusPowerupsIngameListCss = "@charset \"UTF-8\";.FlexRow{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:5px}.IngamePowerUpsContainer{display:block;height:100%;padding:var(--emw--ingame-power-container-padding, 8px);}.IngamePowerUpsContainer .IconBtn{width:26px;height:26px}.IngamePowerUpsContainer .CircleLinearBorder{position:relative;border-radius:20px;background:none;overflow:hidden;border:1.5px solid transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.IngamePowerUpsContainer .CircleLinearBorder svg{border-radius:20px;padding:4.5px;background:var(--emw--ingame-color-powerup-bg, rgba(9, 9, 9, 0.8980392157));z-index:1}.IngamePowerUpsContainer .CircleLinearBorder::before{content:\"\";position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;z-index:0;border-radius:21.5px;background:linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667))), linear-gradient(35.22deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.5490196078)) 89.19%)}.IngamePowerUpsContainer .TopBar{display:flex;justify-content:space-between;align-items:center;padding:15px}.IngamePowerUpsContainer .TopBar .BarTitle{width:calc(100% - 20px);font-weight:600;font-size:1.2rem;text-align:center;vertical-align:middle}.IngamePowerUpsContainer .Cards{width:100%;height:calc(100% - 70px);gap:16px;opacity:1;padding:1px;overflow:auto;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpsContainer .Cards .Card{background-color:var(--emw--ingame-color-powerup-bg, rgba(27, 27, 27, 0.8901960784));border:1px solid var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843));height:99px;gap:12px;opacity:1;border-radius:18px;border-width:1px;padding:14px;align-items:center}.IngamePowerUpsContainer .Cards .Card.PoweringDesc{align-items:flex-start;height:auto;transition:all 0.3s ease-in-out}.IngamePowerUpsContainer .Cards .Card .LeftOfRow{display:flex;flex-direction:row;gap:10px}.IngamePowerUpsContainer .Cards .Card .PowerupTitle,.IngamePowerUpsContainer .Cards .Card .ExpireTime,.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{display:flex;flex-direction:row;align-items:center}.IngamePowerUpsContainer .Cards .Card .PowerupTitle{font-weight:bold}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{align-items:flex-end;height:37.6px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .MultiplierIcon{height:12px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow{color:var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.4980392157));font-size:0.8rem;gap:3px;align-items:center}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow .MultiplierMode{margin-right:15px}.IngamePowerUpsContainer .Cards .Card .Status{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;font-size:0.8rem;width:max-content;height:25px;backdrop-filter:blur(4.6px);flex:none;order:1;flex-grow:0;border:0px solid;opacity:1;padding:1px}.IngamePowerUpsContainer .Cards .Card .Status::before{background:linear-gradient(97.6deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)) 11.03%, var(--emw--ingame-color-white00, rgba(255, 255, 255, 0)) 95.17%), linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)))}.IngamePowerUpsContainer .Cards .Card .Status time-count{background-color:var(--emw--ingame-color-black-middle, #020308);width:calc(100% - 4px);height:calc(100% - 4px);border-radius:20px;text-align:center;align-items:center;display:flex;justify-content:center;padding:2.2px;z-index:1;min-width:172px}.IngamePowerUpsContainer .Cards .Card .ActiveButton.Activating{background-color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843));color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843))}.IngamePowerUpsContainer .Cards .Card time-count .Label{margin-right:5px}.IngamePowerUpsContainer .Cards .Card time-count .TimeCountDown{letter-spacing:1.5px;font-weight:bold}.IngamePowerUpsContainer .ActiveBtn{color:var(--emw--ingame-color-black, #090909);position:relative;background:none;overflow:hidden;min-width:88px;height:36px;font-weight:bold;gap:10px;border-radius:20px;animation-duration:0ms}.IngamePowerUpsContainer .ActiveBtn.Disabled .content{background-color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2));color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2))}.IngamePowerUpsContainer .ActiveBtn.Disabled:hover,.IngamePowerUpsContainer .ActiveBtn.Disabled:before{box-shadow:none;background:none}.IngamePowerUpsContainer .ActiveBtn:hover{box-shadow:0px 0px 3px 5px var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843))}.IngamePowerUpsContainer .ActiveBtn::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;z-index:1;border-radius:18px;background:linear-gradient(218deg, var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.568627451)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843))), linear-gradient(93deg, var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.6588235294)) 33.61%, var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.5411764706)) 89.19%)}.IngamePowerUpsContainer .ActiveBtn .content{line-height:1.6;background:var(--emw--ingame-color-powerup-brightgreen, #00FA5A);border-radius:18px;padding:1px;height:calc(100% - 4px);width:calc(100% - 4px);text-align:center;align-items:center;display:flex;justify-content:center;z-index:1}";
5935
+ const bonusPowerupsIngameListCss = "@charset \"UTF-8\";.FlexRow{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:5px}.IngamePowerUpsContainer{display:block;transition:opacity 200ms ease-in-out;height:100%;padding:var(--emw--ingame-power-container-padding, 8px);}.IngamePowerUpsContainer .IconBtn{width:26px;height:26px}.IngamePowerUpsContainer .Hidden{opacity:0 !important;display:none}.IngamePowerUpsContainer .CircleLinearBorder{position:relative;border-radius:20px;background:none;overflow:hidden;border:1.5px solid transparent;display:flex;align-items:center;justify-content:center;cursor:pointer}.IngamePowerUpsContainer .CircleLinearBorder svg{border-radius:20px;padding:4.5px;background:var(--emw--ingame-color-powerup-bg, rgba(9, 9, 9, 0.8980392157));z-index:1}.IngamePowerUpsContainer .CircleLinearBorder::before{content:\"\";position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;z-index:0;border-radius:21.5px;background:linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0666666667))), linear-gradient(35.22deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0)), var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.5490196078)) 89.19%)}.IngamePowerUpsContainer .TopBar{opacity:1;transition:all 0.5s ease-in-out;display:flex;justify-content:space-between;align-items:center;padding:15px}.IngamePowerUpsContainer .TopBar .BarTitle{width:calc(100% - 20px);font-weight:600;font-size:1.2rem;text-align:center;vertical-align:middle}.IngamePowerUpsContainer .Cards{opacity:1;transition:all 0.5s ease-in-out;width:100%;height:calc(100% - 70px);gap:16px;opacity:1;padding:1px;overflow:auto;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.IngamePowerUpsContainer .Cards .Card{background-color:var(--emw--ingame-color-powerup-bg, rgba(27, 27, 27, 0.8901960784));border:1px solid var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843));height:99px;gap:12px;opacity:1;border-radius:18px;border-width:1px;padding:14px;align-items:center}.IngamePowerUpsContainer .Cards .Card.PoweringDesc{align-items:flex-start;height:auto;transition:all 0.3s ease-in-out}.IngamePowerUpsContainer .Cards .Card .LeftOfRow{display:flex;flex-direction:row;gap:10px}.IngamePowerUpsContainer .Cards .Card .PowerupTitle,.IngamePowerUpsContainer .Cards .Card .ExpireTime,.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{display:flex;flex-direction:row;align-items:center}.IngamePowerUpsContainer .Cards .Card .PowerupTitle{font-weight:bold}.IngamePowerUpsContainer .Cards .Card .PowerupTitle .LeftOfRow{width:calc(100% - 40px)}.IngamePowerUpsContainer .Cards .Card .PowerupTitle .Name{width:calc(100% - 40px);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo{align-items:flex-end;height:37.6px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .MultiplierIcon{height:12px}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow{color:var(--emw--ingame-color-white60, rgba(255, 255, 255, 0.4980392157));font-size:0.8rem;gap:3px;align-items:center}.IngamePowerUpsContainer .Cards .Card .MultiplierInfo .LeftOfRow .MultiplierMode{margin-right:15px}.IngamePowerUpsContainer .Cards .Card .Status{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;font-size:0.8rem;width:max-content;height:25px;backdrop-filter:blur(4.6px);flex-grow:0;border:0px solid;opacity:1;padding:1px}.IngamePowerUpsContainer .Cards .Card .Status::before{background:linear-gradient(97.6deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)) 11.03%, var(--emw--ingame-color-white00, rgba(255, 255, 255, 0)) 95.17%), linear-gradient(0deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)), var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.2)))}.IngamePowerUpsContainer .Cards .Card .Status .InprogressLabel{width:fit-content;min-width:100px}.IngamePowerUpsContainer .Cards .Card .Status time-count{min-width:172px}.IngamePowerUpsContainer .Cards .Card .Status time-count{background-color:var(--emw--ingame-color-black-middle, #020308);width:calc(100% - 4px);height:calc(100% - 4px);border-radius:20px;text-align:center;align-items:center;display:flex;justify-content:center;padding:2.2px;z-index:1;padding-right:10px}.IngamePowerUpsContainer .Cards .Card .ActiveButton.Activating{background-color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843));color:var(--emw--ingame-color-white30, rgba(255, 255, 255, 0.3019607843))}.IngamePowerUpsContainer .Cards .Card time-count .Label{margin-right:5px}.IngamePowerUpsContainer .Cards .Card time-count .InprogressLabel{text-align:left;width:fit-content;padding:0 5px;border-radius:18px;border:1px solid rgba(175, 165, 165, 0.5098039216);line-height:21px;margin-right:10px}.IngamePowerUpsContainer .Cards .Card time-count .InprogressLabel .Icon{height:5px;width:5px;background-color:var(--New-Indicator-Yellow, #FFB801);border-radius:3px;display:inline-block;margin-right:5px}.IngamePowerUpsContainer .Cards .Card time-count .TimeCountDown{letter-spacing:1.5px;font-weight:bold;text-transform:capitalize}.IngamePowerUpsContainer .ActiveBtn{color:var(--emw--ingame-color-black, #090909);position:relative;background:none;overflow:hidden;min-width:88px;height:36px;font-weight:bold;gap:10px;border-radius:20px;animation-duration:0ms}.IngamePowerUpsContainer .ActiveBtn.Disabled .content{background-color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2));color:var(--emw--ingame-color-white20, rgba(255, 255, 255, 0.2))}.IngamePowerUpsContainer .ActiveBtn.Disabled:hover,.IngamePowerUpsContainer .ActiveBtn.Disabled:before{box-shadow:none;background:none}.IngamePowerUpsContainer .ActiveBtn:hover{box-shadow:0px 0px 3px 5px var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843))}.IngamePowerUpsContainer .ActiveBtn::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;z-index:1;border-radius:18px;background:linear-gradient(to top right, var(--emw--ingame-color-powerup-brightgreen, #00FA5A), var(--emw--ingame-color-powerup-brightblue, rgba(50, 237, 221, 0.8901960784)))}.IngamePowerUpsContainer .ActiveBtn .content{line-height:1.6;background:var(--emw--ingame-color-powerup-brightgreen, #00FA5A);border-radius:18px;padding:1px;height:calc(100% - 4px);width:calc(100% - 4px);text-align:center;align-items:center;display:flex;justify-content:center;z-index:1}";
5922
5936
  const BonusPowerupsIngameListStyle0 = bonusPowerupsIngameListCss;
5923
5937
 
5924
5938
  const BonusPowerupsIngameList = class {
@@ -5934,23 +5948,41 @@ const BonusPowerupsIngameList = class {
5934
5948
  this.language = 'en';
5935
5949
  this.endpoint = undefined;
5936
5950
  this.session = undefined;
5937
- this.limit = 10;
5938
- this.isLoading = true;
5951
+ this.limit = 30;
5952
+ this.isLoading = false;
5939
5953
  this.isActivating = false;
5940
5954
  this.powerups = [];
5955
+ this.total = 0;
5941
5956
  this.isPowering = false;
5957
+ this.showConfirmModal = false;
5958
+ this.currentPowerup = undefined;
5959
+ this.debouncedReload = debounce(this.reloadPowerups, 100);
5942
5960
  }
5943
5961
  reloadPowerupsHandler() {
5944
- this.loadData();
5962
+ this.reloadPowerups();
5963
+ }
5964
+ activePowerupHandler(e) {
5965
+ if (e.detail.id === this.currentPowerup.id) {
5966
+ this.activePowerUp(this.currentPowerup);
5967
+ }
5968
+ this.showConfirmModal = false;
5945
5969
  }
5946
5970
  powerupTimeCountDownHandler(e) {
5947
5971
  if (e.detail.timeLeft <= 0) {
5948
- this.loadData();
5972
+ this.reloadPowerups();
5949
5973
  return;
5950
5974
  }
5951
5975
  }
5976
+ reloadPowerups() {
5977
+ this.powerups = [];
5978
+ this.total = 0;
5979
+ this.loadData();
5980
+ }
5981
+ handleConfigChange() {
5982
+ this.debouncedReload();
5983
+ }
5952
5984
  async loadData() {
5953
- if (!this.endpoint || !this.session) {
5985
+ if (this.isLoading || (this.total > 0 && this.powerups.length >= this.total)) {
5954
5986
  return;
5955
5987
  }
5956
5988
  this.isLoading = true;
@@ -5959,7 +5991,8 @@ const BonusPowerupsIngameList = class {
5959
5991
  }
5960
5992
  this.abortController = new AbortController();
5961
5993
  try {
5962
- const url = new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=0,limit=${this.limit}`);
5994
+ const offset = this.powerups.length;
5995
+ const url = new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${offset},limit=${this.limit}`);
5963
5996
  const options = {
5964
5997
  headers: {
5965
5998
  'Content-Type': 'application/json',
@@ -5977,10 +6010,11 @@ const BonusPowerupsIngameList = class {
5977
6010
  window.postMessage({ type: 'errorWhenLoadPowerups', status: response.status });
5978
6011
  throw new Error(`HTTP error! status: ${response.status}`);
5979
6012
  }
5980
- const { data } = await response.json();
5981
- this.powerups = data;
6013
+ const { data, total } = await response.json();
6014
+ this.powerups = [...this.powerups, ...data];
6015
+ this.total = total;
5982
6016
  this.isPowering = this.powerups.filter(e => e.status === PowerUpStatus.ACTIVATED).length > 0;
5983
- this.powerupsLoadEvent.emit({ powerups: this.powerups });
6017
+ this.powerupsLoadEvent.emit({ powerups: this.powerups, total });
5984
6018
  }
5985
6019
  catch (error) {
5986
6020
  if (error.name !== 'AbortError') {
@@ -5993,6 +6027,21 @@ const BonusPowerupsIngameList = class {
5993
6027
  }
5994
6028
  }
5995
6029
  }
6030
+ initializeObserver() {
6031
+ if (this.loadMoreObserver) {
6032
+ this.loadMoreObserver.disconnect();
6033
+ }
6034
+ this.loadMoreObserver = new IntersectionObserver((entries) => {
6035
+ entries.forEach((entry) => {
6036
+ if (entry.isIntersecting) {
6037
+ this.loadData().catch(console.error);
6038
+ }
6039
+ });
6040
+ });
6041
+ if (this.lastItemElement) {
6042
+ this.loadMoreObserver.observe(this.lastItemElement);
6043
+ }
6044
+ }
5996
6045
  async activePowerUp(powerUp) {
5997
6046
  if (!this.endpoint || !this.session || this.isActivating || this.isPowering) {
5998
6047
  return;
@@ -6029,6 +6078,7 @@ const BonusPowerupsIngameList = class {
6029
6078
  this.powerups[activedIdx] = Object.assign({}, powerUp);
6030
6079
  this.powerups = [...this.powerups];
6031
6080
  this.isPowering = true;
6081
+ this.reloadPowerups();
6032
6082
  }
6033
6083
  }
6034
6084
  catch (e) {
@@ -6046,14 +6096,32 @@ const BonusPowerupsIngameList = class {
6046
6096
  showDetail(id) {
6047
6097
  this.showDetailsEvent.emit({ id });
6048
6098
  }
6099
+ onActiveBtnClick(powerup) {
6100
+ if (this.isPowering || this.isActivating) {
6101
+ return;
6102
+ }
6103
+ this.currentPowerup = powerup;
6104
+ this.showConfirmModal = true;
6105
+ }
6106
+ componentDidUpdate() {
6107
+ if (this.powerups.length < this.total) {
6108
+ this.initializeObserver();
6109
+ }
6110
+ }
6049
6111
  render() {
6050
- return (index.h("div", { key: 'eedb6e5b3bfca30d017bb077e4bf41001f1e07d7', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'bfd1a61b883761d084057f4d2fee8473198b6cea', class: 'TopBar' }, index.h("span", { key: 'a3a0b4a6d4249d331cf9d4dc36ef07253d820758', class: 'BarTitle' }, translate('powerups', this.language)), index.h("div", { key: '0be0d805aaaaa5982e8243c227d3f49d4371fb33', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading
6112
+ var _a;
6113
+ return (index.h("div", { key: '755e95625116000407991e3349c2f896335515a0', class: 'IngamePowerUpsContainer', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'c0bf175b4af979d505014ef1d92ff6f9c2bf7b3f', class: `TopBar ${this.showConfirmModal ? 'Hidden' : ''}` }, index.h("span", { key: 'e46b6e4f52170d857bedf55837b60fb471b61e0d', class: 'BarTitle' }, translate('powerups', this.language)), index.h("div", { key: 'c69769c036192c91410363a14c70648625cabbe8', class: 'IconBtn CircleLinearBorder', onClick: this.onClose.bind(this), innerHTML: CloseSvg })), this.isLoading && this.powerups.length === 0
6051
6114
  ? index.h("smart-loader", null)
6052
- : index.h("div", { class: 'Cards' }, this.isPowering &&
6053
- index.h("div", { class: 'Card PoweringDesc' }, index.h("div", { class: 'FlexRow' }, index.h("div", { class: 'Icon', innerHTML: InfoSvg }), index.h("div", { class: 'Text' }, translate('poweringTooltip', this.language)))), this.powerups.map(powerup => index.h("div", { class: 'Card' }, index.h("div", { class: 'PowerupTitle FlexRow' }, index.h("div", { class: 'LeftOfRow' }, index.h("div", { class: 'EnergyIcon', innerHTML: EnergySvg }), index.h("div", { class: 'Name' }, powerup.powerUpName)), index.h("div", { class: 'DetailIcon', onClick: this.showDetail.bind(this, powerup.id) }, index.h("div", { class: 'IconBtn CircleLinearBorder', innerHTML: DetailArrow }))), index.h("div", { class: 'ExpireTime Status CircleLinearBorder' }, powerup.status === PowerUpStatus.ACTIVATED
6054
- ? index.h("time-count", { language: this.language, "expire-time": getActivedExpireTime(powerup) })
6055
- : index.h("time-count", { language: this.language, "expire-time": powerup.expireTime })), index.h("div", { class: 'MultiplierInfo FlexRow' }, index.h("div", { class: 'LeftOfRow' }, index.h("div", { class: 'MultiplierIcon', innerHTML: FireSvg }), index.h("div", { class: 'MultiplierValue' }, powerup.multiplier.coefficient, "x "), index.h("div", { class: 'MultiplierMode' }, powerup.multiplier.mode === MultiplierMode.COINS ? translate('coins', this.language) : translate('xp', this.language)), index.h("div", { class: 'MultiplierIcon', innerHTML: ClockSvg }), index.h("div", { class: 'MultiplierValue' }, powerup.boostingPeriod[powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? 'numberOfRounds' : 'minutes']), index.h("div", { class: 'MultiplierMode' }, powerup.boostingPeriod.mode === BoostingPeriodMode.NUMBER_OF_ROUNDS ? translate('rounds', this.language) : translate('minutes', this.language))), (powerup.status === PowerUpStatus.ACTIVE || powerup.status === PowerUpStatus.ACTIVATING) &&
6056
- index.h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: this.activePowerUp.bind(this, powerup) }, index.h("div", { class: 'content' }, " ", translate('activate', this.language)))))))));
6115
+ : index.h("div", { class: `Cards ${this.showConfirmModal ? 'Hidden' : ''}` }, this.isPowering &&
6116
+ index.h("div", { class: 'Card PoweringDesc' }, index.h("div", { class: 'FlexRow' }, index.h("div", { class: 'Icon', innerHTML: InfoSvg }), index.h("div", { class: 'Text' }, translate('poweringTooltip', this.language)))), this.powerups.map((powerup, index$1) => {
6117
+ const isLastItem = index$1 === this.powerups.length - 1;
6118
+ return (index.h("div", { class: `Card ${powerup.status === PowerUpStatus.ACTIVATED ? 'Actived' : ''}`, ref: isLastItem ? (el) => (this.lastItemElement = el) : null }, index.h("div", { class: 'PowerupTitle FlexRow' }, index.h("div", { class: 'LeftOfRow' }, index.h("div", { class: 'EnergyIcon', innerHTML: EnergySvg }), index.h("div", { class: 'Name' }, powerup.powerUpName)), index.h("div", { class: 'DetailIcon', onClick: this.showDetail.bind(this, powerup.id) }, index.h("div", { class: 'IconBtn CircleLinearBorder', innerHTML: DetailArrow }))), index.h("div", { class: `ExpireTime Status CircleLinearBorder` }, powerup.status === PowerUpStatus.ACTIVATED
6119
+ ?
6120
+ index.h("time-count", { "in-progress": true, mode: powerup.boostingPeriod.mode, "left-rounds": (powerup.boostingPeriod.numberOfRounds || 0) - (powerup.usedNumberOfRounds || 0), language: this.language, "expire-time": getActivedExpireTime(powerup) })
6121
+ :
6122
+ index.h("time-count", { language: this.language, mode: powerup.boostingPeriod.mode, "expire-time": powerup.expireTime })), index.h("div", { class: 'MultiplierInfo FlexRow' }, index.h("div", { class: 'LeftOfRow' }, index.h("div", { class: 'MultiplierIcon', innerHTML: FireSvg }), index.h("div", { class: 'MultiplierValue' }, powerup.multiplier.coefficient, "x "), index.h("div", { class: 'MultiplierMode' }, powerup.multiplier.mode === MultiplierMode.COINS ? translate('coins', this.language) : translate('xp', this.language)), index.h("div", { class: 'MultiplierIcon', innerHTML: ClockSvg }), index.h("div", { class: 'MultiplierValue' }, powerup.boostingPeriod[powerup.boostingPeriod.mode === exports.BoostingPeriodMode.NUMBER_OF_ROUNDS ? 'numberOfRounds' : 'minutes']), index.h("div", { class: 'MultiplierMode' }, powerup.boostingPeriod.mode === exports.BoostingPeriodMode.NUMBER_OF_ROUNDS ? translate('rounds', this.language) : translate('minutes', this.language))), (powerup.status === PowerUpStatus.ACTIVE || powerup.status === PowerUpStatus.ACTIVATING) &&
6123
+ index.h("div", { class: `ActiveBtn CircleLinearBorder ${this.isPowering ? 'Disabled' : ''} ${this.isActivating ? 'Activating' : ''}`, onClick: () => this.onActiveBtnClick(powerup) }, index.h("div", { class: 'content' }, " ", translate('activate', this.language))))));
6124
+ }), this.isLoading && this.powerups.length > 0 && index.h("smart-loader", null)), index.h("active-confirm-modal", { key: '4c94dfcd5865ee4fb41791a4e69b33dfc1dd7be0', "is-open": this.showConfirmModal, "powerup-id": (_a = this.currentPowerup) === null || _a === void 0 ? void 0 : _a.id, language: this.language })));
6057
6125
  }
6058
6126
  handleClientStylingChange(newValue, oldValue) {
6059
6127
  if (newValue != oldValue) {
@@ -6077,7 +6145,7 @@ const BonusPowerupsIngameList = class {
6077
6145
  if (this.translationUrl) {
6078
6146
  await getTranslations(this.translationUrl);
6079
6147
  }
6080
- this.loadData();
6148
+ this.handleConfigChange();
6081
6149
  }
6082
6150
  componentDidLoad() {
6083
6151
  if (this.stylingContainer) {
@@ -6093,14 +6161,17 @@ const BonusPowerupsIngameList = class {
6093
6161
  if (this.abortController) {
6094
6162
  this.abortController.abort();
6095
6163
  }
6164
+ if (this.loadMoreObserver) {
6165
+ this.loadMoreObserver.disconnect();
6166
+ }
6096
6167
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
6097
6168
  }
6098
6169
  static get assetsDirs() { return ["../assets"]; }
6099
6170
  static get watchers() { return {
6100
- "session": ["loadData"],
6101
- "endpoint": ["loadData"],
6102
- "limit": ["loadData"],
6103
- "language": ["loadData"],
6171
+ "session": ["handleConfigChange"],
6172
+ "endpoint": ["handleConfigChange"],
6173
+ "limit": ["handleConfigChange"],
6174
+ "language": ["handleConfigChange"],
6104
6175
  "clientStyling": ["handleClientStylingChange"],
6105
6176
  "clientStylingUrl": ["handleClientStylingUrlChange"],
6106
6177
  "mbSource": ["handleMbSourceChange"],
@@ -6110,5 +6181,6 @@ const BonusPowerupsIngameList = class {
6110
6181
  BonusPowerupsIngameList.style = BonusPowerupsIngameListStyle0;
6111
6182
 
6112
6183
  exports.BonusPowerupsIngameList = BonusPowerupsIngameList;
6184
+ exports.CloseSvg = CloseSvg;
6113
6185
  exports.hooks = hooks;
6114
6186
  exports.translate = translate;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f60c43c6.js');
5
+ const index = require('./index-1c45277e.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["bonus-powerups-ingame-list_2.cjs",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"isPowering":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["loadData"],"endpoint":["loadData"],"limit":["loadData"],"language":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"time-count",{"expireTime":[1,"expire-time"],"language":[1],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
22
+ return index.bootstrapLazy([["active-confirm-modal_3.cjs",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"total":[32],"isPowering":[32],"showConfirmModal":[32],"currentPowerup":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[16,"activePowerupEvent","activePowerupHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["handleConfigChange"],"endpoint":["handleConfigChange"],"limit":["handleConfigChange"],"language":["handleConfigChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"active-confirm-modal",{"powerupId":[1538,"powerup-id"],"language":[1537],"isOpen":[1540,"is-open"]}],[0,"time-count",{"expireTime":[513,"expire-time"],"language":[513],"mode":[513],"inProgress":[516,"in-progress"],"leftRounds":[514,"left-rounds"],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'bonus-powerups-ingame-list';
24
- const BUILD = /* bonus-powerups-ingame-list */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* bonus-powerups-ingame-list */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
71
71
  }
72
72
  switch(bundleId) {
73
73
 
74
- case 'bonus-powerups-ingame-list_2.cjs':
74
+ case 'active-confirm-modal_3.cjs':
75
75
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
76
76
  /* webpackMode: "lazy" */
77
- './bonus-powerups-ingame-list_2.cjs.entry.js')); }).then(processMod, consoleError);
77
+ './active-confirm-modal_3.cjs.entry.js')); }).then(processMod, consoleError);
78
78
  }
79
79
  }
80
80
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
@@ -311,6 +311,9 @@ var Host = {};
311
311
  var isHost = (node) => node && node.$tag$ === Host;
312
312
  var parsePropertyValue = (propValue, propType) => {
313
313
  if (propValue != null && !isComplexType(propValue)) {
314
+ if (propType & 4 /* Boolean */) {
315
+ return propValue === "false" ? false : propValue === "" || !!propValue;
316
+ }
314
317
  if (propType & 2 /* Number */) {
315
318
  return parseFloat(propValue);
316
319
  }
@@ -844,6 +847,9 @@ var postUpdateComponent = (hostRef) => {
844
847
  }
845
848
  }
846
849
  } else {
850
+ {
851
+ safeCall(instance, "componentDidUpdate");
852
+ }
847
853
  endPostUpdate();
848
854
  }
849
855
  {
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const bonusPowerupsIngameList = require('./bonus-powerups-ingame-list-c9172936.js');
6
- require('./index-f60c43c6.js');
5
+ const bonusPowerupsIngameList = require('./bonus-powerups-ingame-list-db296f5c.js');
6
+ require('./index-1c45277e.js');
7
7
 
8
8
 
9
9
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f60c43c6.js');
5
+ const index = require('./index-1c45277e.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["bonus-powerups-ingame-list_2.cjs",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"isPowering":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["loadData"],"endpoint":["loadData"],"limit":["loadData"],"language":["loadData"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"time-count",{"expireTime":[1,"expire-time"],"language":[1],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
11
+ return index.bootstrapLazy([["active-confirm-modal_3.cjs",[[1,"bonus-powerups-ingame-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"session":[513],"limit":[514],"isLoading":[32],"isActivating":[32],"powerups":[32],"total":[32],"isPowering":[32],"showConfirmModal":[32],"currentPowerup":[32]},[[16,"reloadPowerups","reloadPowerupsHandler"],[16,"activePowerupEvent","activePowerupHandler"],[0,"powerupTimeCountDown","powerupTimeCountDownHandler"]],{"session":["handleConfigChange"],"endpoint":["handleConfigChange"],"limit":["handleConfigChange"],"language":["handleConfigChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}],[0,"active-confirm-modal",{"powerupId":[1538,"powerup-id"],"language":[1537],"isOpen":[1540,"is-open"]}],[0,"time-count",{"expireTime":[513,"expire-time"],"language":[513],"mode":[513],"inProgress":[516,"in-progress"],"leftRounds":[514,"left-rounds"],"displayTime":[32],"isExpireInDay1":[32],"timeLeft":[32]},null,{"timeLeft":["timeLeftChanged"],"expireTime":["startTimeChanged"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "entries": [
3
3
  "components/bonus-powerups-ingame-list/bonus-powerups-ingame-list.js",
4
+ "components/active-confirm-modal/active-confirm-modal.component.js",
4
5
  "components/time-count/time-count.js"
5
6
  ],
6
7
  "compiler": {
@@ -0,0 +1,105 @@
1
+ import { h } from "@stencil/core";
2
+ import { translate } from "../../utils/locale.utils";
3
+ import CloseSvg from "../assets/close.svg";
4
+ export class ActiveConfirmModal {
5
+ constructor() {
6
+ this.powerupId = undefined;
7
+ this.language = 'en';
8
+ this.isOpen = undefined;
9
+ }
10
+ activeNow() {
11
+ this.closeModal(this.powerupId);
12
+ }
13
+ closeModal(id) {
14
+ this.isOpen = false;
15
+ this.activePowerupEvent.emit({ id });
16
+ }
17
+ render() {
18
+ return h("div", { key: '68efb916139aa66bb559ece109864e2241f096c5', class: `ModalContainer ${this.isOpen ? 'Shown' : 'Hidden'}` }, h("div", { key: '55f46fa812d04c10cb35807aeaa9dd6701b9b6d9', class: 'TopBar' }, h("div", { key: '7daafa1b57f421052aecc6c64cadc8b4d439646a', class: 'IconBtn CircleLinearBorder', onClick: () => this.closeModal(), innerHTML: CloseSvg })), h("div", { key: 'cbb64eff123333949155bccf6856e674b93f412e', class: 'Title' }, translate('activeTitle', this.language)), h("div", { key: '69b64ab2f9809d0ca222e29d4157f76bd11cb9f4', class: 'ActivePowerupContent' }, translate("activeContent", this.language)), h("div", { key: 'fb2b80ab2ffbf16446de273744094e0e3c38ba69', class: 'Btns' }, h("div", { key: '6f421ad422d76ef2a6a8ec3b8096c32f001ace44', class: 'LaterBtn PowupBtn', onClick: () => this.closeModal() }, " ", translate('later', this.language), " "), h("div", { key: '22ac06fefcc50356616b5c16817833e2973ab3bb', class: 'Active PowupBtn', onClick: () => this.activeNow() }, " ", translate('activateNow', this.language), " ")));
19
+ }
20
+ static get is() { return "active-confirm-modal"; }
21
+ static get originalStyleUrls() {
22
+ return {
23
+ "$": ["active-confirm-modal.scss"]
24
+ };
25
+ }
26
+ static get styleUrls() {
27
+ return {
28
+ "$": ["active-confirm-modal.css"]
29
+ };
30
+ }
31
+ static get properties() {
32
+ return {
33
+ "powerupId": {
34
+ "type": "number",
35
+ "mutable": true,
36
+ "complexType": {
37
+ "original": "number",
38
+ "resolved": "number",
39
+ "references": {}
40
+ },
41
+ "required": false,
42
+ "optional": false,
43
+ "docs": {
44
+ "tags": [],
45
+ "text": ""
46
+ },
47
+ "attribute": "powerup-id",
48
+ "reflect": true
49
+ },
50
+ "language": {
51
+ "type": "string",
52
+ "mutable": true,
53
+ "complexType": {
54
+ "original": "string",
55
+ "resolved": "string",
56
+ "references": {}
57
+ },
58
+ "required": false,
59
+ "optional": false,
60
+ "docs": {
61
+ "tags": [],
62
+ "text": ""
63
+ },
64
+ "attribute": "language",
65
+ "reflect": true,
66
+ "defaultValue": "'en'"
67
+ },
68
+ "isOpen": {
69
+ "type": "boolean",
70
+ "mutable": true,
71
+ "complexType": {
72
+ "original": "boolean",
73
+ "resolved": "boolean",
74
+ "references": {}
75
+ },
76
+ "required": false,
77
+ "optional": false,
78
+ "docs": {
79
+ "tags": [],
80
+ "text": ""
81
+ },
82
+ "attribute": "is-open",
83
+ "reflect": true
84
+ }
85
+ };
86
+ }
87
+ static get events() {
88
+ return [{
89
+ "method": "activePowerupEvent",
90
+ "name": "activePowerupEvent",
91
+ "bubbles": true,
92
+ "cancelable": true,
93
+ "composed": true,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": ""
97
+ },
98
+ "complexType": {
99
+ "original": "any",
100
+ "resolved": "any",
101
+ "references": {}
102
+ }
103
+ }];
104
+ }
105
+ }
@@ -0,0 +1,50 @@
1
+ .ModalContainer {
2
+ position: absolute;
3
+ top: calc(50% - 200px);
4
+ left: 0;
5
+ width: calc(100% - 120px);
6
+ margin: 40px;
7
+ max-width: 400px;
8
+ height: 260px;
9
+ text-align: center;
10
+ padding: 20px;
11
+ display: flex;
12
+ gap: 30px;
13
+ flex-direction: column;
14
+ border: 1px solid var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.0784313725));
15
+ transition: opacity 200ms ease-in-out;
16
+ opacity: 1;
17
+ background: var(--emw--ingame-color-black40, rgba(9, 9, 9, 0.5019607843));
18
+ border-radius: 20px;
19
+ backdrop-filter: blur(22.9411773682px);
20
+ justify-content: flex-start;
21
+ }
22
+ .ModalContainer.Hidden {
23
+ opacity: 0 !important;
24
+ }
25
+ .ModalContainer.Shown .TopBar {
26
+ justify-content: flex-end;
27
+ padding: 0px;
28
+ }
29
+ .ModalContainer .Title {
30
+ font-weight: bold;
31
+ font-size: 1.2rem;
32
+ }
33
+ .ModalContainer .Btns {
34
+ display: flex;
35
+ justify-content: space-evenly;
36
+ }
37
+ .ModalContainer .PowupBtn {
38
+ background: linear-gradient(49deg, var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843)) 33.61%, var(--emw--ingame-color-white50, rgba(255, 255, 255, 0.1019607843)) 89.19%);
39
+ border: 1px solid rgba(70, 69, 69, 0.5);
40
+ border-radius: 10px;
41
+ padding: 5px 15px;
42
+ color: var(--emw--color-powup-light-green, #00FA5A);
43
+ font-weight: bold;
44
+ cursor: pointer;
45
+ }
46
+ .ModalContainer .PowupBtn.Active {
47
+ background: var(--emw--color-powup-light-green, #00FA5A);
48
+ box-shadow: 0px 0px 6px 10px var(--emw--ingame-color-white10, rgba(255, 255, 255, 0.1019607843));
49
+ color: #0A0A17;
50
+ }