@everymatrix/lottery-oddsbom-entrance 0.7.9 → 0.7.15

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4e91c0c2.js');
6
- const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-e975241e.js');
6
+ const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-492c9f11.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -361,6 +361,17 @@ var Bomb;
361
361
  Bomb["IceHockey"] = "IceHockey";
362
362
  Bomb["Mixed"] = "Mixed";
363
363
  })(Bomb || (Bomb = {}));
364
+ var GameTypeEnum;
365
+ (function (GameTypeEnum) {
366
+ GameTypeEnum["Lottery"] = "Lottery";
367
+ GameTypeEnum["PoolGame"] = "PoolGame";
368
+ })(GameTypeEnum || (GameTypeEnum = {}));
369
+ var BettingOjectEnum;
370
+ (function (BettingOjectEnum) {
371
+ BettingOjectEnum["CorrectScore"] = "CorrectScore";
372
+ BettingOjectEnum["HomeDrawAway"] = "HomeDrawAway";
373
+ BettingOjectEnum["Mix"] = "Mix";
374
+ })(BettingOjectEnum || (BettingOjectEnum = {}));
364
375
 
365
376
  function _typeof(o) {
366
377
  "@babel/helpers - typeof";
@@ -3183,6 +3194,26 @@ async function getTurnoverForAll({ endpoint, configs }) {
3183
3194
  const results = await Promise.allSettled(promises);
3184
3195
  return results.map((r) => (r.status === 'fulfilled' ? r.value : fallback));
3185
3196
  }
3197
+ async function fetchGameInfo$1(endpoint, gameId) {
3198
+ try {
3199
+ const response = await fetchRequest$3(`${endpoint}/games/${gameId}`, 'GET', {});
3200
+ return response;
3201
+ }
3202
+ catch (error) {
3203
+ console.error('Failed to fetch game info:', error);
3204
+ throw new Error('The game is currently not available. Please try again later.');
3205
+ }
3206
+ }
3207
+ async function fetchTicketMatch$1({ endpoint, gameId, drawId }) {
3208
+ try {
3209
+ const res = await fetchRequest$3(`${endpoint}/poolgames/${gameId}/draws/${drawId}/matchConfig`);
3210
+ return res || [];
3211
+ }
3212
+ catch (e) {
3213
+ console.error('Failed to fetch ticket match:', e);
3214
+ return [];
3215
+ }
3216
+ }
3186
3217
  function formattedTurnover(turnover, unit = '€') {
3187
3218
  if (turnover === null)
3188
3219
  return '';
@@ -3249,7 +3280,7 @@ const translate$2 = (key, customLang) => {
3249
3280
  return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
3250
3281
  };
3251
3282
 
3252
- const lotteryOddsbomBombCss = "/* --- Component: Bomb Card Grid --- */\n.lottery-oddsbom-bomb-wrapper {\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n height: 100%;\n}\n\n.bomb-grid-container {\n width: 100%;\n display: flex;\n justify-content: center;\n container-type: inline-size;\n container-name: bomb-grid;\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n /* --- Component: Bomb Card --- */\n}\n.bomb-grid-container .bomb-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0.75rem;\n place-items: center;\n}\n.bomb-grid-container .bomb-card-wrapper {\n width: 100%;\n max-width: 30rem;\n height: 100%;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 1rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.bomb-grid-container .bomb-card {\n height: 100%;\n min-width: 24rem;\n transition: transform 0.3s;\n}\n.bomb-grid-container .bomb-card:hover {\n transform: scale(1.02);\n cursor: pointer;\n}\n.bomb-grid-container .card-header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 0.8rem;\n}\n.bomb-grid-container .card-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bomb-grid-container .card-icon svg {\n width: 28px;\n height: 28px;\n}\n.bomb-grid-container .card-title {\n flex-grow: 1;\n word-break: break-all;\n}\n.bomb-grid-container .card-title h2 {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-title p {\n margin: 0;\n color: var(--emw--color-typography-secondary, #333);\n font-size: 0.9rem;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-info {\n display: flex;\n gap: 0.75rem;\n margin-bottom: 0.8rem;\n flex-wrap: wrap;\n}\n.bomb-grid-container .card-tag {\n background-color: var(--emw--color-tertiary, #e3f2fd);\n padding: 0.3rem 0.75rem;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n max-width: 120px;\n}\n.bomb-grid-container .card-matches {\n max-height: 6.8rem;\n overflow-y: auto;\n}\n.bomb-grid-container .card-matches ol {\n margin: 0;\n padding-left: 1.25rem;\n font-size: 0.85rem;\n line-height: 1.6;\n}\n.bomb-grid-container .card-matches li {\n padding-left: 0.2rem;\n word-wrap: break-word;\n}\n\n/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */\n@container bomb-grid (max-width: 768px) {\n .bomb-grid-container .bomb-grid {\n /* On smaller containers, switch to a single column */\n grid-template-columns: 1fr;\n }\n .bomb-card-wrapper .bomb-card {\n min-width: 200px;\n }\n}\n/* --- Component: Filter Controls --- */\n.OddsbomEntranceController__section {\n margin: 1.5rem 0;\n display: flex;\n gap: 12px;\n color: var(--emw--color-typography, #000);\n container-type: inline-size;\n container-name: controller;\n justify-content: center;\n}\n.OddsbomEntranceController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n line-height: 2.2rem;\n}\n.OddsbomEntranceController__segmented-control {\n display: inline-flex;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.OddsbomEntranceController__segment {\n height: 2.2rem;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n white-space: nowrap;\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n}\n.OddsbomEntranceController__segment--active {\n background-color: var(--emw--color-primary-variant, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n font-weight: 600;\n}\n.OddsbomEntranceController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}\n@container controller (max-width: 500px) {\n .OddsbomEntranceController__segmented-control {\n gap: 0rem;\n }\n .OddsbomEntranceController__segment {\n padding: 0.2rem 0.6rem;\n }\n .OddsbomEntranceController__label,\n .OddsbomEntranceController____segment {\n line-height: 1.8rem;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.empty-draw-wrap {\n padding-top: 100px;\n}\n.empty-draw-wrap .empty-draw {\n width: 240px;\n height: 160px;\n padding: 18px 12px 12px 12px;\n background: var(--emw--color-secondary-variant, #e3f2fd);\n position: relative;\n margin: 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n border-radius: 12px;\n}\n.empty-draw-wrap .empty-draw img {\n position: absolute;\n top: -64%;\n left: 50%;\n transform: translateX(-50%);\n width: 200px;\n}\n.empty-draw-wrap .empty-draw-content {\n display: flex;\n gap: 4px;\n}\n.empty-draw-wrap .empty-draw-text {\n font-size: 14px;\n font-weight: bold;\n line-height: 20px;\n}";
3283
+ const lotteryOddsbomBombCss = "/* --- Component: Bomb Card Grid --- */\n.lottery-oddsbom-bomb-wrapper {\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n height: 100%;\n}\n\n.bomb-grid-container {\n margin-top: 20px;\n width: 100%;\n display: flex;\n justify-content: center;\n container-type: inline-size;\n container-name: bomb-grid;\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n /* --- Component: Bomb Card --- */\n}\n.bomb-grid-container .bomb-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0.75rem;\n place-items: center;\n}\n.bomb-grid-container .bomb-card-wrapper {\n width: 100%;\n max-width: 30rem;\n height: 100%;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 1rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.bomb-grid-container .bomb-card {\n height: 100%;\n min-width: 24rem;\n transition: transform 0.3s;\n}\n.bomb-grid-container .bomb-card:hover {\n transform: scale(1.02);\n cursor: pointer;\n}\n.bomb-grid-container .card-header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 0.8rem;\n}\n.bomb-grid-container .card-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bomb-grid-container .card-icon svg {\n width: 28px;\n height: 28px;\n}\n.bomb-grid-container .card-title {\n flex-grow: 1;\n word-break: break-all;\n}\n.bomb-grid-container .card-title h2 {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-title p {\n margin: 0;\n color: var(--emw--color-typography-secondary, #333);\n font-size: 0.9rem;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-info {\n display: flex;\n gap: 0.75rem;\n margin-bottom: 0.8rem;\n flex-wrap: wrap;\n}\n.bomb-grid-container .card-tag {\n background-color: var(--emw--color-tertiary, #e3f2fd);\n padding: 0.3rem 0.75rem;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n max-width: 120px;\n}\n.bomb-grid-container .card-matches {\n max-height: 6.8rem;\n overflow-y: auto;\n}\n.bomb-grid-container .card-matches ol {\n margin: 0;\n padding-left: 1.25rem;\n font-size: 0.85rem;\n line-height: 1.6;\n}\n.bomb-grid-container .card-matches li {\n padding-left: 0.2rem;\n word-wrap: break-word;\n}\n\n/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */\n@container bomb-grid (max-width: 768px) {\n .bomb-grid-container .bomb-grid {\n /* On smaller containers, switch to a single column */\n grid-template-columns: 1fr;\n }\n .bomb-card-wrapper .bomb-card {\n min-width: 200px;\n }\n}\n/* --- Component: Filter Controls --- */\n.OddsbomEntranceController__section {\n margin-top: 1.5rem;\n display: flex;\n gap: 12px;\n color: var(--emw--color-typography, #000);\n container-type: inline-size;\n container-name: controller;\n justify-content: center;\n}\n.OddsbomEntranceController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n line-height: 2.2rem;\n}\n.OddsbomEntranceController__segmented-control {\n display: inline-flex;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.OddsbomEntranceController__segment {\n height: 2.2rem;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n white-space: nowrap;\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n}\n.OddsbomEntranceController__segment--active {\n background-color: var(--emw--color-primary-variant, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n font-weight: 600;\n}\n.OddsbomEntranceController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}\n@container controller (max-width: 500px) {\n .OddsbomEntranceController__segmented-control {\n gap: 0rem;\n }\n .OddsbomEntranceController__segment {\n padding: 0.2rem 0.6rem;\n }\n .OddsbomEntranceController__label,\n .OddsbomEntranceController____segment {\n line-height: 1.8rem;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.empty-draw-wrap {\n padding-top: 100px;\n}\n.empty-draw-wrap .empty-draw {\n width: 240px;\n height: 160px;\n padding: 18px 12px 12px 12px;\n background: var(--emw--color-secondary-variant, #e3f2fd);\n position: relative;\n margin: 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n border-radius: 12px;\n}\n.empty-draw-wrap .empty-draw img {\n position: absolute;\n top: -64%;\n left: 50%;\n transform: translateX(-50%);\n width: 200px;\n}\n.empty-draw-wrap .empty-draw-content {\n display: flex;\n gap: 4px;\n}\n.empty-draw-wrap .empty-draw-text {\n font-size: 14px;\n font-weight: bold;\n line-height: 20px;\n}";
3253
3284
  const LotteryOddsbomBombStyle0 = lotteryOddsbomBombCss;
3254
3285
 
3255
3286
  const BombIcons$1 = {
@@ -3266,11 +3297,16 @@ const LotteryOddsbomBomb = class {
3266
3297
  this.language = 'en';
3267
3298
  this.endpoint = undefined;
3268
3299
  this.groupId = undefined;
3300
+ this.gameId = undefined;
3269
3301
  this.activeBomb = 'All';
3270
3302
  this.bombList = [];
3271
3303
  this.gameList = [];
3272
3304
  this.liveDrawsInfoByGroupId = {};
3273
3305
  this.isLoading = false;
3306
+ this.isGameAvailable = true;
3307
+ }
3308
+ get isSingleGameMode() {
3309
+ return !!this.gameId;
3274
3310
  }
3275
3311
  handleClientStylingChange(newValue, oldValue) {
3276
3312
  if (newValue != oldValue) {
@@ -3306,20 +3342,57 @@ const LotteryOddsbomBomb = class {
3306
3342
  async doFetchData(params = {}) {
3307
3343
  try {
3308
3344
  this.isLoading = true;
3309
- this.liveDrawsInfoByGroupId = await fetchData$1({
3310
- endpoint: this.endpoint,
3311
- groupId: this.groupId,
3312
- params
3313
- });
3314
- this.gameList = this.liveDrawsInfoByGroupId.liveDraws;
3315
- this.bombList = [DEFAULT_ALL_BOMB, ...this.liveDrawsInfoByGroupId.sportTags];
3316
- this.isLoading = false;
3317
- this.updateTurnoverForAll();
3345
+ if (this.isSingleGameMode) {
3346
+ await this.fetchSingleGameData();
3347
+ }
3348
+ else {
3349
+ await this.fetchGroupData(params);
3350
+ }
3351
+ if (this.gameList.length > 0) {
3352
+ this.updateTurnoverForAll();
3353
+ }
3318
3354
  }
3319
3355
  finally {
3320
3356
  this.isLoading = false;
3321
3357
  }
3322
3358
  }
3359
+ async fetchSingleGameData() {
3360
+ var _a, _b, _c;
3361
+ const { endpoint, gameId } = this;
3362
+ const gameInfo = await fetchGameInfo$1(endpoint, gameId);
3363
+ const wagerCloseTime = (_a = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.currentDraw) === null || _a === void 0 ? void 0 : _a.wagerCloseTime;
3364
+ const drawId = (_b = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.currentDraw) === null || _b === void 0 ? void 0 : _b.id;
3365
+ if (!wagerCloseTime || new Date() >= new Date(wagerCloseTime)) {
3366
+ this.isGameAvailable = false;
3367
+ this.gameList = [];
3368
+ }
3369
+ else {
3370
+ this.isGameAvailable = true;
3371
+ const matchInfo = await fetchTicketMatch$1({ endpoint, gameId: gameInfo.type, drawId });
3372
+ this.gameList = [
3373
+ {
3374
+ drawId,
3375
+ title: gameInfo.name,
3376
+ subTitle: ((_c = matchInfo === null || matchInfo === void 0 ? void 0 : matchInfo[0]) === null || _c === void 0 ? void 0 : _c.sportName) || '',
3377
+ icon: Bomb.Football,
3378
+ date: formattedTime(gameInfo.currentDraw.date),
3379
+ turnover: '0',
3380
+ matchList: (matchInfo || []).map((i) => i.eventName).slice(0, 3),
3381
+ gameId: gameInfo.type
3382
+ }
3383
+ ];
3384
+ }
3385
+ this.bombList = [];
3386
+ }
3387
+ async fetchGroupData(params) {
3388
+ this.liveDrawsInfoByGroupId = await fetchData$1({
3389
+ endpoint: this.endpoint,
3390
+ groupId: this.groupId,
3391
+ params
3392
+ });
3393
+ this.gameList = this.liveDrawsInfoByGroupId.liveDraws;
3394
+ this.bombList = [DEFAULT_ALL_BOMB, ...this.liveDrawsInfoByGroupId.sportTags];
3395
+ }
3323
3396
  async updateTurnoverForAll() {
3324
3397
  const turnovers = getTurnoverForAll({
3325
3398
  endpoint: this.endpoint,
@@ -3344,9 +3417,12 @@ const LotteryOddsbomBomb = class {
3344
3417
  }
3345
3418
  renderEmpty() {
3346
3419
  const infoImagePath = index.getAssetPath('../static/empty-info.svg');
3347
- return (index.h("div", { class: "empty-draw-wrap" }, index.h("div", { class: "empty-draw" }, index.h("img", { src: infoImagePath, class: "empty-draw-logo" }), index.h("div", { class: "empty-draw-content" }, index.h("div", { class: "empty-draw-text" }, "\u24D8 Sorry. The game is not available now.")))));
3420
+ const message = translate$2('gameNotAvailable', this.language);
3421
+ return (index.h("div", { class: "empty-draw-wrap" }, index.h("div", { class: "empty-draw" }, index.h("img", { src: infoImagePath, class: "empty-draw-logo" }), index.h("div", { class: "empty-draw-content" }, index.h("div", { class: "empty-draw-text" }, "\u24D8 ", message)))));
3348
3422
  }
3349
3423
  renderFilter() {
3424
+ if (this.isSingleGameMode || !this.gameList.length)
3425
+ return null;
3350
3426
  return (index.h("div", { class: "OddsbomEntranceController__section" }, index.h("span", { class: "OddsbomEntranceController__label" }, "Select Bomb:"), !!this.bombList.length ? (index.h("div", { class: "OddsbomEntranceController__segmented-control" }, this.bombList.map(({ name, code }) => (index.h("button", { class: {
3351
3427
  OddsbomEntranceController__segment: true,
3352
3428
  'OddsbomEntranceController__segment--active': this.activeBomb === code
@@ -3360,7 +3436,7 @@ const LotteryOddsbomBomb = class {
3360
3436
  } }, index.h("div", { class: "card-header" }, BombIcons$1[icon] && index.h("div", { class: "card-icon football" }, BombIcons$1[icon]), index.h("div", { class: "card-title" }, index.h("h2", null, title), index.h("p", null, subTitle)), index.h("div", { class: "card-jackpot" })), index.h("div", { class: "card-info" }, index.h("span", { class: "card-tag" }, date), index.h("span", { class: "card-tag" }, translate$2('turnover', this.language) + turnover)), index.h("div", { class: "card-matches" }, index.h("ol", null, matchList.map((item) => (index.h("li", null, item)))))))))));
3361
3437
  }
3362
3438
  render() {
3363
- return (index.h("div", { key: 'ae8252d8cb1374af9bb8189bcd9edac313c7bc6a', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-bomb-wrapper" }, this.renderFilter(), index.h("div", { key: '3f673f335248057370e7e57076cc387a86dc4099', class: "bomb-grid-container" }, this.isLoading ? this.renderLoading() : this.renderMain())));
3439
+ return (index.h("div", { key: '4a2641a511f0837649cfedeb4807069ce4051731', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-bomb-wrapper" }, this.renderFilter(), index.h("div", { key: '15f8dbeace39a87f87e4639b8082719023d6bed5', class: "bomb-grid-container" }, this.isLoading ? this.renderLoading() : this.renderMain())));
3364
3440
  }
3365
3441
  static get assetsDirs() { return ["../static"]; }
3366
3442
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-e975241e.js');
5
+ const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-492c9f11.js');
6
6
  require('./index-4e91c0c2.js');
7
7
 
8
8
 
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["helper-date-navigator_8.cjs",[[1,"lottery-oddsbom-entrance",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameIds":[513,"game-ids"],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"activeTab":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"gameIds":[513,"game-ids"],"gameIdArr":[32],"drawDatesOptions":[32],"curDate":[32],"isLoading":[32],"drawResultsObj":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameIds":["handleGameIdStringChange"]}],[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[513,"game-id"],"curDate":[513,"cur-date"],"showLoading":[516,"show-loading"],"hideWrapperEmpty":[516,"hide-wrapper-empty"],"isPassingData":[516,"is-passing-data"],"drawResults":[513,"draw-results"],"isEmpty":[32],"_curDate":[32],"drawResultsList":[32],"curDrawItem":[32],"curTurnOver":[32],"isLoadingTurnover":[32],"vendorGameId":[32],"gameName":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"curDate":["handleDateChange"],"drawResults":["handleDrawResultsChange"]}],[1,"helper-date-navigator",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"date":[1],"defaultHighlightDates":[1,"default-highlight-dates"],"highlightDates":[32],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"defaultHighlightDates":["handleGameIdStringChange"],"date":["handleDateChange"]}],[1,"lottery-oddsbom-ticket-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"defaultResults":[513,"default-results"],"splitView":[516,"split-view"],"allResults":[32],"ticketBetDataSource":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultResults":["fetchMatchData"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-oddsbom-bullet",{"isSelected":[516,"is-selected"],"disabled":[516],"text":[513],"idx":[514],"isReading":[516,"is-reading"],"isDeleteByIcon":[516,"is-delete-by-icon"],"isCallDialogBtn":[516,"is-call-dialog-btn"],"isAddedByMoreBtn":[516,"is-added-by-more-btn"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
11
+ return index.bootstrapLazy([["helper-date-navigator_8.cjs",[[1,"lottery-oddsbom-entrance",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameId":[513,"game-id"],"gameIds":[513,"game-ids"],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"activeTab":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"gameIds":[513,"game-ids"],"gameIdArr":[32],"drawDatesOptions":[32],"curDate":[32],"isLoading":[32],"drawResultsObj":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameIds":["handleGameIdStringChange"]}],[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameId":[513,"game-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32],"isGameAvailable":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[513,"game-id"],"curDate":[513,"cur-date"],"showLoading":[516,"show-loading"],"hideWrapperEmpty":[516,"hide-wrapper-empty"],"isPassingData":[516,"is-passing-data"],"drawResults":[513,"draw-results"],"isEmpty":[32],"_curDate":[32],"drawResultsList":[32],"curDrawItem":[32],"curTurnOver":[32],"isLoadingTurnover":[32],"vendorGameId":[32],"gameName":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"curDate":["handleDateChange"],"drawResults":["handleDrawResultsChange"]}],[1,"helper-date-navigator",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"date":[1],"defaultHighlightDates":[1,"default-highlight-dates"],"highlightDates":[32],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"defaultHighlightDates":["handleGameIdStringChange"],"date":["handleDateChange"]}],[1,"lottery-oddsbom-ticket-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"defaultResults":[513,"default-results"],"splitView":[516,"split-view"],"allResults":[32],"ticketBetDataSource":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultResults":["fetchMatchData"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-oddsbom-bullet",{"isSelected":[516,"is-selected"],"disabled":[516],"text":[513],"idx":[514],"isReading":[516,"is-reading"],"isDeleteByIcon":[516,"is-delete-by-icon"],"isCallDialogBtn":[516,"is-call-dialog-btn"],"isAddedByMoreBtn":[516,"is-added-by-more-btn"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -6859,6 +6859,7 @@ const LotteryOddsbomEntrance = class {
6859
6859
  this.language = 'en';
6860
6860
  this.endpoint = undefined;
6861
6861
  this.groupId = undefined;
6862
+ this.gameId = undefined;
6862
6863
  this.gameIds = undefined;
6863
6864
  this.sessionId = undefined;
6864
6865
  this.playerId = '';
@@ -6915,9 +6916,9 @@ const LotteryOddsbomEntrance = class {
6915
6916
  renderContent() {
6916
6917
  if (this.activeTab === Tab.DRAWS) {
6917
6918
  // FIXME:
6918
- if (!this.groupId)
6919
- return index.h("div", null, "Error: Require Group ID");
6920
- return (index.h("lottery-oddsbom-bomb", { endpoint: this.endpoint, "group-id": this.groupId, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "session-id": this.sessionId, "player-id": this.playerId }));
6919
+ if (!this.groupId && !this.gameId)
6920
+ return index.h("div", null, "Error: Require Group ID or Game ID");
6921
+ return (index.h("lottery-oddsbom-bomb", { endpoint: this.endpoint, "group-id": this.groupId, "game-id": this.gameId, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "session-id": this.sessionId, "player-id": this.playerId }));
6921
6922
  }
6922
6923
  if (this.activeTab === Tab.LATEST_RESULTS) {
6923
6924
  return (index.h("lottery-oddsbom-latest-result-group", { endpoint: this.endpoint, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "session-id": this.sessionId, "player-id": this.playerId, "game-ids": this.gameIds, "group-id": this.groupId }));
@@ -6928,7 +6929,7 @@ const LotteryOddsbomEntrance = class {
6928
6929
  return null;
6929
6930
  }
6930
6931
  render() {
6931
- return (index.h("div", { key: 'a062a337155738bbee43d2b73ba9f219f1dad887', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-entrance__wrapper" }, index.h("div", { key: '17d1c3fa142bd80d7fd1ec40fb913f0ff4845ea4', class: "lottery-oddsbom-entrance__container" }, this.renderTabs(), index.h("main", { key: '7871da438b8cea7b098b62c15c1034531605ed38', class: "main-content" }, this.renderContent()))));
6932
+ return (index.h("div", { key: 'f047c1308f34ab0e1f09c6b537f6df3b9d1fc042', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-entrance__wrapper" }, index.h("div", { key: '891e5fd6d5cbeebc82d43664b2d61f7ca7e2544e', class: "lottery-oddsbom-entrance__container" }, this.renderTabs(), index.h("main", { key: 'deb0eb322997a8bab2bac9f59be109062825c75c', class: "main-content" }, this.renderContent()))));
6932
6933
  }
6933
6934
  static get assetsDirs() { return ["../static"]; }
6934
6935
  static get watchers() { return {
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["helper-date-navigator_8.cjs",[[1,"lottery-oddsbom-entrance",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameIds":[513,"game-ids"],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"activeTab":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"gameIds":[513,"game-ids"],"gameIdArr":[32],"drawDatesOptions":[32],"curDate":[32],"isLoading":[32],"drawResultsObj":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameIds":["handleGameIdStringChange"]}],[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[513,"game-id"],"curDate":[513,"cur-date"],"showLoading":[516,"show-loading"],"hideWrapperEmpty":[516,"hide-wrapper-empty"],"isPassingData":[516,"is-passing-data"],"drawResults":[513,"draw-results"],"isEmpty":[32],"_curDate":[32],"drawResultsList":[32],"curDrawItem":[32],"curTurnOver":[32],"isLoadingTurnover":[32],"vendorGameId":[32],"gameName":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"curDate":["handleDateChange"],"drawResults":["handleDrawResultsChange"]}],[1,"helper-date-navigator",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"date":[1],"defaultHighlightDates":[1,"default-highlight-dates"],"highlightDates":[32],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"defaultHighlightDates":["handleGameIdStringChange"],"date":["handleDateChange"]}],[1,"lottery-oddsbom-ticket-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"defaultResults":[513,"default-results"],"splitView":[516,"split-view"],"allResults":[32],"ticketBetDataSource":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultResults":["fetchMatchData"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-oddsbom-bullet",{"isSelected":[516,"is-selected"],"disabled":[516],"text":[513],"idx":[514],"isReading":[516,"is-reading"],"isDeleteByIcon":[516,"is-delete-by-icon"],"isCallDialogBtn":[516,"is-call-dialog-btn"],"isAddedByMoreBtn":[516,"is-added-by-more-btn"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
22
+ return index.bootstrapLazy([["helper-date-navigator_8.cjs",[[1,"lottery-oddsbom-entrance",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameId":[513,"game-id"],"gameIds":[513,"game-ids"],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"activeTab":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"gameIds":[513,"game-ids"],"gameIdArr":[32],"drawDatesOptions":[32],"curDate":[32],"isLoading":[32],"drawResultsObj":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameIds":["handleGameIdStringChange"]}],[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameId":[513,"game-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32],"isGameAvailable":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[513,"game-id"],"curDate":[513,"cur-date"],"showLoading":[516,"show-loading"],"hideWrapperEmpty":[516,"hide-wrapper-empty"],"isPassingData":[516,"is-passing-data"],"drawResults":[513,"draw-results"],"isEmpty":[32],"_curDate":[32],"drawResultsList":[32],"curDrawItem":[32],"curTurnOver":[32],"isLoadingTurnover":[32],"vendorGameId":[32],"gameName":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"curDate":["handleDateChange"],"drawResults":["handleDrawResultsChange"]}],[1,"helper-date-navigator",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"date":[1],"defaultHighlightDates":[1,"default-highlight-dates"],"highlightDates":[32],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"defaultHighlightDates":["handleGameIdStringChange"],"date":["handleDateChange"]}],[1,"lottery-oddsbom-ticket-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"defaultResults":[513,"default-results"],"splitView":[516,"split-view"],"allResults":[32],"ticketBetDataSource":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultResults":["fetchMatchData"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-oddsbom-bullet",{"isSelected":[516,"is-selected"],"disabled":[516],"text":[513],"idx":[514],"isReading":[516,"is-reading"],"isDeleteByIcon":[516,"is-delete-by-icon"],"isCallDialogBtn":[516,"is-call-dialog-btn"],"isAddedByMoreBtn":[516,"is-added-by-more-btn"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -14,6 +14,7 @@ export class LotteryOddsbomEntrance {
14
14
  this.language = 'en';
15
15
  this.endpoint = undefined;
16
16
  this.groupId = undefined;
17
+ this.gameId = undefined;
17
18
  this.gameIds = undefined;
18
19
  this.sessionId = undefined;
19
20
  this.playerId = '';
@@ -70,9 +71,9 @@ export class LotteryOddsbomEntrance {
70
71
  renderContent() {
71
72
  if (this.activeTab === Tab.DRAWS) {
72
73
  // FIXME:
73
- if (!this.groupId)
74
- return h("div", null, "Error: Require Group ID");
75
- return (h("lottery-oddsbom-bomb", { endpoint: this.endpoint, "group-id": this.groupId, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "session-id": this.sessionId, "player-id": this.playerId }));
74
+ if (!this.groupId && !this.gameId)
75
+ return h("div", null, "Error: Require Group ID or Game ID");
76
+ return (h("lottery-oddsbom-bomb", { endpoint: this.endpoint, "group-id": this.groupId, "game-id": this.gameId, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "session-id": this.sessionId, "player-id": this.playerId }));
76
77
  }
77
78
  if (this.activeTab === Tab.LATEST_RESULTS) {
78
79
  return (h("lottery-oddsbom-latest-result-group", { endpoint: this.endpoint, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "session-id": this.sessionId, "player-id": this.playerId, "game-ids": this.gameIds, "group-id": this.groupId }));
@@ -83,7 +84,7 @@ export class LotteryOddsbomEntrance {
83
84
  return null;
84
85
  }
85
86
  render() {
86
- return (h("div", { key: 'a062a337155738bbee43d2b73ba9f219f1dad887', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-entrance__wrapper" }, h("div", { key: '17d1c3fa142bd80d7fd1ec40fb913f0ff4845ea4', class: "lottery-oddsbom-entrance__container" }, this.renderTabs(), h("main", { key: '7871da438b8cea7b098b62c15c1034531605ed38', class: "main-content" }, this.renderContent()))));
87
+ return (h("div", { key: 'f047c1308f34ab0e1f09c6b537f6df3b9d1fc042', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-entrance__wrapper" }, h("div", { key: '891e5fd6d5cbeebc82d43664b2d61f7ca7e2544e', class: "lottery-oddsbom-entrance__container" }, this.renderTabs(), h("main", { key: 'deb0eb322997a8bab2bac9f59be109062825c75c', class: "main-content" }, this.renderContent()))));
87
88
  }
88
89
  static get is() { return "lottery-oddsbom-entrance"; }
89
90
  static get encapsulation() { return "shadow"; }
@@ -221,6 +222,23 @@ export class LotteryOddsbomEntrance {
221
222
  "attribute": "group-id",
222
223
  "reflect": true
223
224
  },
225
+ "gameId": {
226
+ "type": "string",
227
+ "mutable": false,
228
+ "complexType": {
229
+ "original": "string",
230
+ "resolved": "string",
231
+ "references": {}
232
+ },
233
+ "required": false,
234
+ "optional": false,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": "GameID of the lottery game"
238
+ },
239
+ "attribute": "game-id",
240
+ "reflect": true
241
+ },
224
242
  "gameIds": {
225
243
  "type": "string",
226
244
  "mutable": false,
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getAssetPath, H as Host } from './index-068e610e.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-entrance-e32c97fb.js';
3
- export { L as lottery_oddsbom_entrance } from './lottery-oddsbom-entrance-e32c97fb.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-entrance-e1fe7c9f.js';
3
+ export { L as lottery_oddsbom_entrance } from './lottery-oddsbom-entrance-e1fe7c9f.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -358,6 +358,17 @@ var Bomb;
358
358
  Bomb["IceHockey"] = "IceHockey";
359
359
  Bomb["Mixed"] = "Mixed";
360
360
  })(Bomb || (Bomb = {}));
361
+ var GameTypeEnum;
362
+ (function (GameTypeEnum) {
363
+ GameTypeEnum["Lottery"] = "Lottery";
364
+ GameTypeEnum["PoolGame"] = "PoolGame";
365
+ })(GameTypeEnum || (GameTypeEnum = {}));
366
+ var BettingOjectEnum;
367
+ (function (BettingOjectEnum) {
368
+ BettingOjectEnum["CorrectScore"] = "CorrectScore";
369
+ BettingOjectEnum["HomeDrawAway"] = "HomeDrawAway";
370
+ BettingOjectEnum["Mix"] = "Mix";
371
+ })(BettingOjectEnum || (BettingOjectEnum = {}));
361
372
 
362
373
  function _typeof(o) {
363
374
  "@babel/helpers - typeof";
@@ -3180,6 +3191,26 @@ async function getTurnoverForAll({ endpoint, configs }) {
3180
3191
  const results = await Promise.allSettled(promises);
3181
3192
  return results.map((r) => (r.status === 'fulfilled' ? r.value : fallback));
3182
3193
  }
3194
+ async function fetchGameInfo$1(endpoint, gameId) {
3195
+ try {
3196
+ const response = await fetchRequest$3(`${endpoint}/games/${gameId}`, 'GET', {});
3197
+ return response;
3198
+ }
3199
+ catch (error) {
3200
+ console.error('Failed to fetch game info:', error);
3201
+ throw new Error('The game is currently not available. Please try again later.');
3202
+ }
3203
+ }
3204
+ async function fetchTicketMatch$1({ endpoint, gameId, drawId }) {
3205
+ try {
3206
+ const res = await fetchRequest$3(`${endpoint}/poolgames/${gameId}/draws/${drawId}/matchConfig`);
3207
+ return res || [];
3208
+ }
3209
+ catch (e) {
3210
+ console.error('Failed to fetch ticket match:', e);
3211
+ return [];
3212
+ }
3213
+ }
3183
3214
  function formattedTurnover(turnover, unit = '€') {
3184
3215
  if (turnover === null)
3185
3216
  return '';
@@ -3246,7 +3277,7 @@ const translate$2 = (key, customLang) => {
3246
3277
  return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
3247
3278
  };
3248
3279
 
3249
- const lotteryOddsbomBombCss = "/* --- Component: Bomb Card Grid --- */\n.lottery-oddsbom-bomb-wrapper {\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n height: 100%;\n}\n\n.bomb-grid-container {\n width: 100%;\n display: flex;\n justify-content: center;\n container-type: inline-size;\n container-name: bomb-grid;\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n /* --- Component: Bomb Card --- */\n}\n.bomb-grid-container .bomb-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0.75rem;\n place-items: center;\n}\n.bomb-grid-container .bomb-card-wrapper {\n width: 100%;\n max-width: 30rem;\n height: 100%;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 1rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.bomb-grid-container .bomb-card {\n height: 100%;\n min-width: 24rem;\n transition: transform 0.3s;\n}\n.bomb-grid-container .bomb-card:hover {\n transform: scale(1.02);\n cursor: pointer;\n}\n.bomb-grid-container .card-header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 0.8rem;\n}\n.bomb-grid-container .card-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bomb-grid-container .card-icon svg {\n width: 28px;\n height: 28px;\n}\n.bomb-grid-container .card-title {\n flex-grow: 1;\n word-break: break-all;\n}\n.bomb-grid-container .card-title h2 {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-title p {\n margin: 0;\n color: var(--emw--color-typography-secondary, #333);\n font-size: 0.9rem;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-info {\n display: flex;\n gap: 0.75rem;\n margin-bottom: 0.8rem;\n flex-wrap: wrap;\n}\n.bomb-grid-container .card-tag {\n background-color: var(--emw--color-tertiary, #e3f2fd);\n padding: 0.3rem 0.75rem;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n max-width: 120px;\n}\n.bomb-grid-container .card-matches {\n max-height: 6.8rem;\n overflow-y: auto;\n}\n.bomb-grid-container .card-matches ol {\n margin: 0;\n padding-left: 1.25rem;\n font-size: 0.85rem;\n line-height: 1.6;\n}\n.bomb-grid-container .card-matches li {\n padding-left: 0.2rem;\n word-wrap: break-word;\n}\n\n/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */\n@container bomb-grid (max-width: 768px) {\n .bomb-grid-container .bomb-grid {\n /* On smaller containers, switch to a single column */\n grid-template-columns: 1fr;\n }\n .bomb-card-wrapper .bomb-card {\n min-width: 200px;\n }\n}\n/* --- Component: Filter Controls --- */\n.OddsbomEntranceController__section {\n margin: 1.5rem 0;\n display: flex;\n gap: 12px;\n color: var(--emw--color-typography, #000);\n container-type: inline-size;\n container-name: controller;\n justify-content: center;\n}\n.OddsbomEntranceController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n line-height: 2.2rem;\n}\n.OddsbomEntranceController__segmented-control {\n display: inline-flex;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.OddsbomEntranceController__segment {\n height: 2.2rem;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n white-space: nowrap;\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n}\n.OddsbomEntranceController__segment--active {\n background-color: var(--emw--color-primary-variant, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n font-weight: 600;\n}\n.OddsbomEntranceController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}\n@container controller (max-width: 500px) {\n .OddsbomEntranceController__segmented-control {\n gap: 0rem;\n }\n .OddsbomEntranceController__segment {\n padding: 0.2rem 0.6rem;\n }\n .OddsbomEntranceController__label,\n .OddsbomEntranceController____segment {\n line-height: 1.8rem;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.empty-draw-wrap {\n padding-top: 100px;\n}\n.empty-draw-wrap .empty-draw {\n width: 240px;\n height: 160px;\n padding: 18px 12px 12px 12px;\n background: var(--emw--color-secondary-variant, #e3f2fd);\n position: relative;\n margin: 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n border-radius: 12px;\n}\n.empty-draw-wrap .empty-draw img {\n position: absolute;\n top: -64%;\n left: 50%;\n transform: translateX(-50%);\n width: 200px;\n}\n.empty-draw-wrap .empty-draw-content {\n display: flex;\n gap: 4px;\n}\n.empty-draw-wrap .empty-draw-text {\n font-size: 14px;\n font-weight: bold;\n line-height: 20px;\n}";
3280
+ const lotteryOddsbomBombCss = "/* --- Component: Bomb Card Grid --- */\n.lottery-oddsbom-bomb-wrapper {\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n height: 100%;\n}\n\n.bomb-grid-container {\n margin-top: 20px;\n width: 100%;\n display: flex;\n justify-content: center;\n container-type: inline-size;\n container-name: bomb-grid;\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n /* --- Component: Bomb Card --- */\n}\n.bomb-grid-container .bomb-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0.75rem;\n place-items: center;\n}\n.bomb-grid-container .bomb-card-wrapper {\n width: 100%;\n max-width: 30rem;\n height: 100%;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 1rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.bomb-grid-container .bomb-card {\n height: 100%;\n min-width: 24rem;\n transition: transform 0.3s;\n}\n.bomb-grid-container .bomb-card:hover {\n transform: scale(1.02);\n cursor: pointer;\n}\n.bomb-grid-container .card-header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 0.8rem;\n}\n.bomb-grid-container .card-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bomb-grid-container .card-icon svg {\n width: 28px;\n height: 28px;\n}\n.bomb-grid-container .card-title {\n flex-grow: 1;\n word-break: break-all;\n}\n.bomb-grid-container .card-title h2 {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-title p {\n margin: 0;\n color: var(--emw--color-typography-secondary, #333);\n font-size: 0.9rem;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-info {\n display: flex;\n gap: 0.75rem;\n margin-bottom: 0.8rem;\n flex-wrap: wrap;\n}\n.bomb-grid-container .card-tag {\n background-color: var(--emw--color-tertiary, #e3f2fd);\n padding: 0.3rem 0.75rem;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n max-width: 120px;\n}\n.bomb-grid-container .card-matches {\n max-height: 6.8rem;\n overflow-y: auto;\n}\n.bomb-grid-container .card-matches ol {\n margin: 0;\n padding-left: 1.25rem;\n font-size: 0.85rem;\n line-height: 1.6;\n}\n.bomb-grid-container .card-matches li {\n padding-left: 0.2rem;\n word-wrap: break-word;\n}\n\n/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */\n@container bomb-grid (max-width: 768px) {\n .bomb-grid-container .bomb-grid {\n /* On smaller containers, switch to a single column */\n grid-template-columns: 1fr;\n }\n .bomb-card-wrapper .bomb-card {\n min-width: 200px;\n }\n}\n/* --- Component: Filter Controls --- */\n.OddsbomEntranceController__section {\n margin-top: 1.5rem;\n display: flex;\n gap: 12px;\n color: var(--emw--color-typography, #000);\n container-type: inline-size;\n container-name: controller;\n justify-content: center;\n}\n.OddsbomEntranceController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n line-height: 2.2rem;\n}\n.OddsbomEntranceController__segmented-control {\n display: inline-flex;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.OddsbomEntranceController__segment {\n height: 2.2rem;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n white-space: nowrap;\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n}\n.OddsbomEntranceController__segment--active {\n background-color: var(--emw--color-primary-variant, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n font-weight: 600;\n}\n.OddsbomEntranceController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}\n@container controller (max-width: 500px) {\n .OddsbomEntranceController__segmented-control {\n gap: 0rem;\n }\n .OddsbomEntranceController__segment {\n padding: 0.2rem 0.6rem;\n }\n .OddsbomEntranceController__label,\n .OddsbomEntranceController____segment {\n line-height: 1.8rem;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.empty-draw-wrap {\n padding-top: 100px;\n}\n.empty-draw-wrap .empty-draw {\n width: 240px;\n height: 160px;\n padding: 18px 12px 12px 12px;\n background: var(--emw--color-secondary-variant, #e3f2fd);\n position: relative;\n margin: 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n border-radius: 12px;\n}\n.empty-draw-wrap .empty-draw img {\n position: absolute;\n top: -64%;\n left: 50%;\n transform: translateX(-50%);\n width: 200px;\n}\n.empty-draw-wrap .empty-draw-content {\n display: flex;\n gap: 4px;\n}\n.empty-draw-wrap .empty-draw-text {\n font-size: 14px;\n font-weight: bold;\n line-height: 20px;\n}";
3250
3281
  const LotteryOddsbomBombStyle0 = lotteryOddsbomBombCss;
3251
3282
 
3252
3283
  const BombIcons$1 = {
@@ -3263,11 +3294,16 @@ const LotteryOddsbomBomb = class {
3263
3294
  this.language = 'en';
3264
3295
  this.endpoint = undefined;
3265
3296
  this.groupId = undefined;
3297
+ this.gameId = undefined;
3266
3298
  this.activeBomb = 'All';
3267
3299
  this.bombList = [];
3268
3300
  this.gameList = [];
3269
3301
  this.liveDrawsInfoByGroupId = {};
3270
3302
  this.isLoading = false;
3303
+ this.isGameAvailable = true;
3304
+ }
3305
+ get isSingleGameMode() {
3306
+ return !!this.gameId;
3271
3307
  }
3272
3308
  handleClientStylingChange(newValue, oldValue) {
3273
3309
  if (newValue != oldValue) {
@@ -3303,20 +3339,57 @@ const LotteryOddsbomBomb = class {
3303
3339
  async doFetchData(params = {}) {
3304
3340
  try {
3305
3341
  this.isLoading = true;
3306
- this.liveDrawsInfoByGroupId = await fetchData$1({
3307
- endpoint: this.endpoint,
3308
- groupId: this.groupId,
3309
- params
3310
- });
3311
- this.gameList = this.liveDrawsInfoByGroupId.liveDraws;
3312
- this.bombList = [DEFAULT_ALL_BOMB, ...this.liveDrawsInfoByGroupId.sportTags];
3313
- this.isLoading = false;
3314
- this.updateTurnoverForAll();
3342
+ if (this.isSingleGameMode) {
3343
+ await this.fetchSingleGameData();
3344
+ }
3345
+ else {
3346
+ await this.fetchGroupData(params);
3347
+ }
3348
+ if (this.gameList.length > 0) {
3349
+ this.updateTurnoverForAll();
3350
+ }
3315
3351
  }
3316
3352
  finally {
3317
3353
  this.isLoading = false;
3318
3354
  }
3319
3355
  }
3356
+ async fetchSingleGameData() {
3357
+ var _a, _b, _c;
3358
+ const { endpoint, gameId } = this;
3359
+ const gameInfo = await fetchGameInfo$1(endpoint, gameId);
3360
+ const wagerCloseTime = (_a = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.currentDraw) === null || _a === void 0 ? void 0 : _a.wagerCloseTime;
3361
+ const drawId = (_b = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.currentDraw) === null || _b === void 0 ? void 0 : _b.id;
3362
+ if (!wagerCloseTime || new Date() >= new Date(wagerCloseTime)) {
3363
+ this.isGameAvailable = false;
3364
+ this.gameList = [];
3365
+ }
3366
+ else {
3367
+ this.isGameAvailable = true;
3368
+ const matchInfo = await fetchTicketMatch$1({ endpoint, gameId: gameInfo.type, drawId });
3369
+ this.gameList = [
3370
+ {
3371
+ drawId,
3372
+ title: gameInfo.name,
3373
+ subTitle: ((_c = matchInfo === null || matchInfo === void 0 ? void 0 : matchInfo[0]) === null || _c === void 0 ? void 0 : _c.sportName) || '',
3374
+ icon: Bomb.Football,
3375
+ date: formattedTime(gameInfo.currentDraw.date),
3376
+ turnover: '0',
3377
+ matchList: (matchInfo || []).map((i) => i.eventName).slice(0, 3),
3378
+ gameId: gameInfo.type
3379
+ }
3380
+ ];
3381
+ }
3382
+ this.bombList = [];
3383
+ }
3384
+ async fetchGroupData(params) {
3385
+ this.liveDrawsInfoByGroupId = await fetchData$1({
3386
+ endpoint: this.endpoint,
3387
+ groupId: this.groupId,
3388
+ params
3389
+ });
3390
+ this.gameList = this.liveDrawsInfoByGroupId.liveDraws;
3391
+ this.bombList = [DEFAULT_ALL_BOMB, ...this.liveDrawsInfoByGroupId.sportTags];
3392
+ }
3320
3393
  async updateTurnoverForAll() {
3321
3394
  const turnovers = getTurnoverForAll({
3322
3395
  endpoint: this.endpoint,
@@ -3341,9 +3414,12 @@ const LotteryOddsbomBomb = class {
3341
3414
  }
3342
3415
  renderEmpty() {
3343
3416
  const infoImagePath = getAssetPath('../static/empty-info.svg');
3344
- return (h("div", { class: "empty-draw-wrap" }, h("div", { class: "empty-draw" }, h("img", { src: infoImagePath, class: "empty-draw-logo" }), h("div", { class: "empty-draw-content" }, h("div", { class: "empty-draw-text" }, "\u24D8 Sorry. The game is not available now.")))));
3417
+ const message = translate$2('gameNotAvailable', this.language);
3418
+ return (h("div", { class: "empty-draw-wrap" }, h("div", { class: "empty-draw" }, h("img", { src: infoImagePath, class: "empty-draw-logo" }), h("div", { class: "empty-draw-content" }, h("div", { class: "empty-draw-text" }, "\u24D8 ", message)))));
3345
3419
  }
3346
3420
  renderFilter() {
3421
+ if (this.isSingleGameMode || !this.gameList.length)
3422
+ return null;
3347
3423
  return (h("div", { class: "OddsbomEntranceController__section" }, h("span", { class: "OddsbomEntranceController__label" }, "Select Bomb:"), !!this.bombList.length ? (h("div", { class: "OddsbomEntranceController__segmented-control" }, this.bombList.map(({ name, code }) => (h("button", { class: {
3348
3424
  OddsbomEntranceController__segment: true,
3349
3425
  'OddsbomEntranceController__segment--active': this.activeBomb === code
@@ -3357,7 +3433,7 @@ const LotteryOddsbomBomb = class {
3357
3433
  } }, h("div", { class: "card-header" }, BombIcons$1[icon] && h("div", { class: "card-icon football" }, BombIcons$1[icon]), h("div", { class: "card-title" }, h("h2", null, title), h("p", null, subTitle)), h("div", { class: "card-jackpot" })), h("div", { class: "card-info" }, h("span", { class: "card-tag" }, date), h("span", { class: "card-tag" }, translate$2('turnover', this.language) + turnover)), h("div", { class: "card-matches" }, h("ol", null, matchList.map((item) => (h("li", null, item)))))))))));
3358
3434
  }
3359
3435
  render() {
3360
- return (h("div", { key: 'ae8252d8cb1374af9bb8189bcd9edac313c7bc6a', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-bomb-wrapper" }, this.renderFilter(), h("div", { key: '3f673f335248057370e7e57076cc387a86dc4099', class: "bomb-grid-container" }, this.isLoading ? this.renderLoading() : this.renderMain())));
3436
+ return (h("div", { key: '4a2641a511f0837649cfedeb4807069ce4051731', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-bomb-wrapper" }, this.renderFilter(), h("div", { key: '15f8dbeace39a87f87e4639b8082719023d6bed5', class: "bomb-grid-container" }, this.isLoading ? this.renderLoading() : this.renderMain())));
3361
3437
  }
3362
3438
  static get assetsDirs() { return ["../static"]; }
3363
3439
  static get watchers() { return {
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryOddsbomEntrance } from './lottery-oddsbom-entrance-e32c97fb.js';
1
+ export { L as LotteryOddsbomEntrance } from './lottery-oddsbom-entrance-e1fe7c9f.js';
2
2
  import './index-068e610e.js';
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["helper-date-navigator_8",[[1,"lottery-oddsbom-entrance",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameIds":[513,"game-ids"],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"activeTab":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"gameIds":[513,"game-ids"],"gameIdArr":[32],"drawDatesOptions":[32],"curDate":[32],"isLoading":[32],"drawResultsObj":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameIds":["handleGameIdStringChange"]}],[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[513,"game-id"],"curDate":[513,"cur-date"],"showLoading":[516,"show-loading"],"hideWrapperEmpty":[516,"hide-wrapper-empty"],"isPassingData":[516,"is-passing-data"],"drawResults":[513,"draw-results"],"isEmpty":[32],"_curDate":[32],"drawResultsList":[32],"curDrawItem":[32],"curTurnOver":[32],"isLoadingTurnover":[32],"vendorGameId":[32],"gameName":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"curDate":["handleDateChange"],"drawResults":["handleDrawResultsChange"]}],[1,"helper-date-navigator",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"date":[1],"defaultHighlightDates":[1,"default-highlight-dates"],"highlightDates":[32],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"defaultHighlightDates":["handleGameIdStringChange"],"date":["handleDateChange"]}],[1,"lottery-oddsbom-ticket-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"defaultResults":[513,"default-results"],"splitView":[516,"split-view"],"allResults":[32],"ticketBetDataSource":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultResults":["fetchMatchData"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-oddsbom-bullet",{"isSelected":[516,"is-selected"],"disabled":[516],"text":[513],"idx":[514],"isReading":[516,"is-reading"],"isDeleteByIcon":[516,"is-delete-by-icon"],"isCallDialogBtn":[516,"is-call-dialog-btn"],"isAddedByMoreBtn":[516,"is-added-by-more-btn"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
8
+ return bootstrapLazy([["helper-date-navigator_8",[[1,"lottery-oddsbom-entrance",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameId":[513,"game-id"],"gameIds":[513,"game-ids"],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"activeTab":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"sessionId":[513,"session-id"],"playerId":[513,"player-id"],"gameIds":[513,"game-ids"],"gameIdArr":[32],"drawDatesOptions":[32],"curDate":[32],"isLoading":[32],"drawResultsObj":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameIds":["handleGameIdStringChange"]}],[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"gameId":[513,"game-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32],"isGameAvailable":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-oddsbom-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[513,"game-id"],"curDate":[513,"cur-date"],"showLoading":[516,"show-loading"],"hideWrapperEmpty":[516,"hide-wrapper-empty"],"isPassingData":[516,"is-passing-data"],"drawResults":[513,"draw-results"],"isEmpty":[32],"_curDate":[32],"drawResultsList":[32],"curDrawItem":[32],"curTurnOver":[32],"isLoadingTurnover":[32],"vendorGameId":[32],"gameName":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"curDate":["handleDateChange"],"drawResults":["handleDrawResultsChange"]}],[1,"helper-date-navigator",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"date":[1],"defaultHighlightDates":[1,"default-highlight-dates"],"highlightDates":[32],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"defaultHighlightDates":["handleGameIdStringChange"],"date":["handleDateChange"]}],[1,"lottery-oddsbom-ticket-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"defaultResults":[513,"default-results"],"splitView":[516,"split-view"],"allResults":[32],"ticketBetDataSource":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultResults":["fetchMatchData"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-oddsbom-bullet",{"isSelected":[516,"is-selected"],"disabled":[516],"text":[513],"idx":[514],"isReading":[516,"is-reading"],"isDeleteByIcon":[516,"is-delete-by-icon"],"isCallDialogBtn":[516,"is-call-dialog-btn"],"isAddedByMoreBtn":[516,"is-added-by-more-btn"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };