@everymatrix/lottery-tipping-entrance 1.86.27 → 1.86.29

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 (24) hide show
  1. package/dist/cjs/{draw-selection_18.cjs.entry.js → draw-selection_19.cjs.entry.js} +361 -125
  2. package/dist/cjs/{index-440d090f.js → index-2a5f420f.js} +3 -2
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/{lottery-tipping-entrance-59f7f53d.js → lottery-tipping-entrance-8eabb31c.js} +258 -258
  6. package/dist/cjs/lottery-tipping-entrance.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +6 -0
  8. package/dist/collection/components/lottery-tipping-entrance/lottery-tipping-entrance.js +9 -43
  9. package/dist/collection/utils/api.js +1 -1
  10. package/dist/esm/{draw-selection_18.entry.js → draw-selection_19.entry.js} +362 -127
  11. package/dist/esm/{index-a57b04e7.js → index-c22bb7d4.js} +3 -3
  12. package/dist/esm/index.js +2 -2
  13. package/dist/esm/loader.js +3 -3
  14. package/dist/esm/{lottery-tipping-entrance-9e7c2d9a.js → lottery-tipping-entrance-9d9230ea.js} +258 -258
  15. package/dist/esm/lottery-tipping-entrance.js +3 -3
  16. package/dist/lottery-tipping-entrance/draw-selection_19.entry.js +1 -0
  17. package/dist/lottery-tipping-entrance/{index-a57b04e7.js → index-c22bb7d4.js} +2 -2
  18. package/dist/lottery-tipping-entrance/index.esm.js +1 -1
  19. package/dist/lottery-tipping-entrance/{lottery-tipping-entrance-9e7c2d9a.js → lottery-tipping-entrance-9d9230ea.js} +5 -5
  20. package/dist/lottery-tipping-entrance/lottery-tipping-entrance.esm.js +1 -1
  21. package/dist/types/components/lottery-tipping-entrance/lottery-tipping-entrance.d.ts +0 -5
  22. package/dist/types/components.d.ts +0 -10
  23. package/package.json +1 -1
  24. package/dist/lottery-tipping-entrance/draw-selection_18.entry.js +0 -1
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-440d090f.js');
6
- const lotteryTippingEntrance = require('./lottery-tipping-entrance-59f7f53d.js');
5
+ const index = require('./index-2a5f420f.js');
6
+ const lotteryTippingEntrance = require('./lottery-tipping-entrance-8eabb31c.js');
7
7
 
8
8
  /**
9
9
  * @name addDays
@@ -509,7 +509,7 @@ const resolveTranslationUrl$3 = async (translationUrl) => {
509
509
  }
510
510
  };
511
511
 
512
- const lotteryButtonCss = ":host{display:inline-block;font-family:\"PingFang SC\", \"Microsoft YaHei\", \"Helvetica Neue\", Helvetica, Arial, sans-serif}.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;font-weight:500;cursor:pointer;outline:none;overflow:hidden;transition:background-color 0.2s, border-color 0.2s, color 0.2s;user-select:none;-webkit-tap-highlight-color:transparent}.btn .content{position:relative}.btn:disabled{cursor:not-allowed;opacity:0.5}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:2px solid rgba(255, 255, 255, 0.3);border-radius:50%;border-top-color:white;animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:#08104a}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:rgba(0, 0, 0, 0.2)}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:#dcdcdc;color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:#a6a6a6}.btn--outline:active:not(:disabled){background-color:#e6e6e6}.btn--dashed{background-color:transparent;border-style:dashed;border-color:#dcdcdc;color:#333}.btn--dashed:hover:not(:disabled){border-color:#a6a6a6;color:#0052d9}.btn--text{background-color:transparent;color:#0052d9;border-color:transparent}.btn--text:hover:not(:disabled){background-color:#f2f2f2}.btn--text:active:not(:disabled){background-color:#e6e6e6}.btn--small{height:28px;font-size:12px;padding:0 12px}.btn--medium{height:34px;font-size:14px;padding:0 18px}.btn--large{height:40px;font-size:16px;padding:0 24px}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:rgba(255, 255, 255, 0.3);transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:rgba(0, 0, 0, 0.1)}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";
512
+ const lotteryButtonCss = ":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";
513
513
  const LotteryButtonStyle0 = lotteryButtonCss;
514
514
 
515
515
  const LotteryButton = class {
@@ -538,6 +538,7 @@ const LotteryButton = class {
538
538
  };
539
539
  this.variant = 'primary';
540
540
  this.size = 'medium';
541
+ this.color = undefined;
541
542
  this.disabled = false;
542
543
  this.loading = false;
543
544
  this.text = undefined;
@@ -582,14 +583,43 @@ const LotteryButton = class {
582
583
  }
583
584
  }
584
585
  render() {
585
- const { variant, disabled, size } = this;
586
+ const { variant, disabled, size, color } = this;
586
587
  const isDisabled = disabled || this.loading;
587
- return (index.h("button", { key: '19094b8ffd0d13c7e3cdc7139d559214803f0e73', class: {
588
+ // Calculate styles based on variant and color
589
+ const buttonStyles = {};
590
+ if (color) {
591
+ switch (variant) {
592
+ case 'primary':
593
+ Object.assign(buttonStyles, {
594
+ backgroundColor: color,
595
+ borderColor: color
596
+ });
597
+ break;
598
+ case 'outline':
599
+ case 'dashed':
600
+ Object.assign(buttonStyles, {
601
+ color: color,
602
+ borderColor: color
603
+ });
604
+ break;
605
+ case 'text':
606
+ Object.assign(buttonStyles, {
607
+ color: color
608
+ });
609
+ break;
610
+ default:
611
+ Object.assign(buttonStyles, {
612
+ backgroundColor: color,
613
+ borderColor: color
614
+ });
615
+ }
616
+ }
617
+ return (index.h("button", { key: 'aa74ad98c90e7548228557bf8a8d26b125d4a83a', class: {
588
618
  btn: true,
589
619
  [`btn--${variant}`]: true,
590
620
  [`btn--${size}`]: true,
591
621
  'btn--loading': this.loading
592
- }, disabled: isDisabled, onClick: this.handleClick }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("span", { class: "content" }, this.text || translate$7('loading', this.language)), index.h("span", { class: "spinner" }))) : (index.h("span", { class: "content" }, this.text)), index.h("div", { key: 'e7e7542f0b79c5bf8e41969e23dd77d9fdec4462', class: "ripple-container" }, this.ripples.map((ripple, index$1) => (index.h("span", { key: index$1, class: "ripple", style: {
622
+ }, style: color ? buttonStyles : undefined, disabled: isDisabled, onClick: this.handleClick, ref: (el) => (this.stylingContainer = el) }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("span", { class: "content" }, this.text || translate$7('loading', this.language)), index.h("span", { class: "spinner" }))) : (index.h("span", { class: "content" }, index.h("slot", { name: "icon-left" }), this.text || index.h("slot", null), index.h("slot", { name: "icon-right" }))), index.h("div", { key: '302ea02be395bb24989d4abc040a513e23fa029a', class: "ripple-container" }, this.ripples.map((ripple, index$1) => (index.h("span", { key: index$1, class: "ripple", style: {
593
623
  top: `${ripple.top}px`,
594
624
  left: `${ripple.left}px`,
595
625
  width: `${ripple.size}px`,
@@ -915,7 +945,7 @@ const getTranslations$5 = (data) => {
915
945
  });
916
946
  };
917
947
 
918
- const lotteryTippingCalendarCss = ".lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fix-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:\"\";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.calling-input-icon svg{fill:var(--emw--color-secondary, #fff3b9)}";
948
+ const lotteryTippingCalendarCss = ".lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:\"\";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.calling-input-icon svg{fill:var(--emw--color-secondary, #fff3b9)}";
919
949
  const LotteryTippingCalendarStyle0 = lotteryTippingCalendarCss;
920
950
 
921
951
  const calendarIcon = renderIconDefinitionToSVGElement(CalendarOutlined$1, {
@@ -1094,9 +1124,9 @@ const LotteryTippingCalendar = class {
1094
1124
  }
1095
1125
  render() {
1096
1126
  const calendarClass = ['calendar', this.showCalendar ? 'calendar-visible' : 'calendar-leave'];
1097
- return (index.h("div", { key: '40cec47319dc0ad95980e710c074c5a28c2ab456', class: "lottery-tipping-calendar", ref: (el) => (this.calendarRef = el) }, index.h("div", { key: '87b1ea72a5c28c69290b613ffa7af8696ffcaab3', class: "calling-input", onClick: () => {
1127
+ return (index.h("div", { key: 'eda2c6b211647dfd9c26f5dd53dd8f18a2205be2', class: "lottery-tipping-calendar", ref: (el) => (this.calendarRef = el) }, index.h("div", { key: 'b8a516ae17b8de7aaa4a72284848295546239937', class: "calling-input", onClick: () => {
1098
1128
  this.showCalendar = true;
1099
- } }, index.h("div", { key: '8014304a1c19467598f7d324f013e36da10807a1', class: "calling-input-text" }, this.showFormatedDate(this.curDate)), index.h("div", { key: '4bb3276c543343b971f3ae983a8666435ff0c05f', class: "calling-input-icon", innerHTML: calendarIcon })), index.h("div", { key: 'e9caf41eecd8989189c2badfc087828ffdf37bb5', class: calendarClass.join(' ') }, index.h("div", { key: '1c19085aae79e7678065ef7023d4a3ef27cac70b', class: "calendar-header" }, index.h("div", { key: 'caffe869fc67dc21299bfcd034b057f931258c84', class: "date-controller year-minus", onClick: this.onYearMinus }, "<"), index.h("div", { key: '6e553067cbaf25c692fa7e081dd437db48588516', class: "date-controller month-minus", onClick: this.onMonthMinus }, "<"), index.h("div", { key: '45b29397f39b4d440c4e2a5f73dd9e1c3aae462d', class: "date-picker" }, index.h("div", { key: 'bdd6b7aca5884d08ce0c2703c36e714c88b99487', class: "date-picker-year" }, index.h("vaadin-select", { key: '0239f1a1f0304d8e8db341286a71cf921a524d2c', items: this.yearOptions, value: this.alterDate.year, style: { '--vaadin-field-default-width': '90px' }, "on-value-changed": this.onYearChange.bind(this) })), index.h("div", { key: 'd040dec3f9ca8f31ee7fe7bb7f6535132e00b5f9', class: "date-picker-delimiter" }, "-"), index.h("div", { key: 'f62dae4dfb9e5709b0b27eaa2046107220520a6a', class: "date-picker-month" }, index.h("vaadin-select", { key: 'c3ce598b7ba19059fa0b97e495db46a26798a6af', items: this.monthOptions, value: this.alterDate.month + 1, style: { '--vaadin-field-default-width': '64px' }, "on-value-changed": this.onMonthChange.bind(this) })), index.h("div", { key: '8c3e63306a284c3a4026789a0f0e9f3677498747', class: "date-picker-delimiter" }, "-"), index.h("div", { key: '93d1716b68a80943193dc4f82442ae91ec769c46', class: "date-picker-day" }, this.alterDate.day)), index.h("div", { key: 'b14ba540468c8e152ace46f113e233a7a52c64e2', class: "date-controller month-plus", onClick: this.onMonthPlus }, ">"), index.h("div", { key: '3ace715a066c50a65f8dfc6c45f82d992c0be7f1', class: "date-controller year-plus", onClick: this.onYearPlus }, ">")), index.h("div", { key: '698402dcef3d815561e00077c6fa6c70e9d229ff', class: "calendar-content" }, index.h("div", { key: '37c9d09bade72010f4ad9daf7bdc669fea42f678', class: "calendar-content-week" }, this.weeks.map((week) => (index.h("div", { class: "week-item" }, week)))), index.h("div", { key: '13029ff486fb7acbb9f43ab29b7ea5204fcb2a43', class: "calendar-content-day" }, this.days.map((item) => (index.h("div", { class: {
1129
+ } }, index.h("div", { key: '4e384c0e1989f76b995bbc3df572eeab8ae120f6', class: "calling-input-text" }, this.showFormatedDate(this.curDate)), index.h("div", { key: 'a489600f9b90e4ea865606dddd4997ad9cf1558a', class: "calling-input-icon", innerHTML: calendarIcon })), index.h("div", { key: '7c17232151a8ae775e4a35000e7992695ce1f9dd', class: calendarClass.join(' ') }, index.h("div", { key: '6951e3aa3fedb236514b57d6cdf830b074deb928', class: "calendar-header" }, index.h("div", { key: '7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8', class: "date-controller year-minus", onClick: this.onYearMinus }, "<"), index.h("div", { key: 'e0f3e6958187120e4441c4c4961fda4a74294cca', class: "date-controller month-minus", onClick: this.onMonthMinus }, "<"), index.h("div", { key: 'e1840f3d0f9e4860a03467bbc782a6306c591ad4', class: "date-picker" }, index.h("div", { key: '44d3b63aebcadaa42682e77f9d84c9ae155ec546', class: "date-picker-year" }, index.h("vaadin-select", { key: 'd462e0c076b1da5cdfa4a2ce47c5c3cb0d6e86bd', items: this.yearOptions, value: this.alterDate.year, style: { '--vaadin-field-default-width': '90px' }, "on-value-changed": this.onYearChange.bind(this) })), index.h("div", { key: '0a405edb23487297ab91e0a6ce304e907d7cfa62', class: "date-picker-delimiter" }, "-"), index.h("div", { key: 'cc81efef542d370f4e03a7d7fa138a36b900d801', class: "date-picker-month" }, index.h("vaadin-select", { key: 'd7a9636262121dd8008588eef61aacd092ec07c8', items: this.monthOptions, value: this.alterDate.month + 1, style: { '--vaadin-field-default-width': '64px' }, "on-value-changed": this.onMonthChange.bind(this) })), index.h("div", { key: 'f862d5d3d665c97bc74f7eda209822cc5ceb558e', class: "date-picker-delimiter" }, "-"), index.h("div", { key: '9b2dca353b3708ad561af1bebb24c93dd1194384', class: "date-picker-day" }, this.alterDate.day)), index.h("div", { key: '4e2d6c599a6c03aa1852b65c86f2db50cea02d6d', class: "date-controller month-plus", onClick: this.onMonthPlus }, ">"), index.h("div", { key: '18e4e92486507065a5e0771ffde5050f4ffff3f1', class: "date-controller year-plus", onClick: this.onYearPlus }, ">")), index.h("div", { key: 'ef1115ce79c83cf4689779e55f046a70f733bc6c', class: "calendar-content" }, index.h("div", { key: '0a6fe5ec8ee10f03a2547f942207f6ceaaa99618', class: "calendar-content-week" }, this.weeks.map((week) => (index.h("div", { class: "week-item" }, week)))), index.h("div", { key: '971bc904f76e33c6503be7d223759f2ab7cb0ad6', class: "calendar-content-day" }, this.days.map((item) => (index.h("div", { class: {
1100
1130
  'day-item': true,
1101
1131
  isCurDay: this.tellIsCurDay(item.date, item.month, item.year),
1102
1132
  isHighLight: this.tellIsHighLight(item.date, item.month, item.year)
@@ -1159,7 +1189,7 @@ const resolveTranslationUrl$2 = async (translationUrl) => {
1159
1189
  }
1160
1190
  };
1161
1191
 
1162
- const lotteryTippingDialogCss = ".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";
1192
+ const lotteryTippingDialogCss = ".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";
1163
1193
  const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
1164
1194
 
1165
1195
  const LotteryTippingDialog = class {
@@ -1581,32 +1611,29 @@ const bulletMap$1 = {
1581
1611
  '2': '2'
1582
1612
  };
1583
1613
  function parseBulletNumber$1(numberArr) {
1584
- const bulletArr = [];
1585
- Object.keys(bulletMap$1).forEach((key) => {
1586
- bulletArr.push({
1587
- isSelected: numberArr.includes(Number(key)),
1588
- value: bulletMap$1[key]
1589
- });
1590
- });
1591
- return bulletArr;
1614
+ return numberArr.map((v, index) => ({
1615
+ isSelected: v === 1,
1616
+ value: bulletMap$1[index]
1617
+ }));
1592
1618
  }
1593
- function parseEachLineNumber$1(numbers) {
1594
- const result = [];
1595
- const matchRes = [];
1596
- for (let i = 0; i < numbers.length; i += 2) {
1597
- const [resultNumber, matchNumber] = [numbers[i], numbers[i + 1]];
1598
- if (!matchRes[matchNumber]) {
1599
- matchRes[matchNumber] = [resultNumber];
1600
- }
1601
- else {
1602
- matchRes[matchNumber].push(resultNumber);
1603
- }
1604
- }
1605
- matchRes.forEach((matchArr) => {
1606
- result.push(parseBulletNumber$1(matchArr));
1619
+ const outcomeIndexMap = {
1620
+ H: 0,
1621
+ D: 1,
1622
+ A: 2
1623
+ };
1624
+ const parseEachLineNumber$1 = (outcomes) => {
1625
+ const res = outcomes.map((matchOutcomes) => {
1626
+ const selected = matchOutcomes[0];
1627
+ const result = [0, 0, 0];
1628
+ selected.forEach((outcome) => {
1629
+ const idx = outcomeIndexMap[outcome];
1630
+ if (idx !== undefined)
1631
+ result[idx] = 1;
1632
+ });
1633
+ return parseBulletNumber$1(result);
1607
1634
  });
1608
- return result;
1609
- }
1635
+ return res;
1636
+ };
1610
1637
  function thousandSeperator$1(value) {
1611
1638
  if (value === 0) {
1612
1639
  return '0';
@@ -1636,7 +1663,17 @@ async function fetchGameInfo(endpoint, gameId) {
1636
1663
  }
1637
1664
  }
1638
1665
 
1639
- const lotteryTippingLatestResultCss = ".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";
1666
+ async function fetchSaleStatistics$1({ endpoint, gameId, drawId }) {
1667
+ try {
1668
+ const res = await fetchRequest$2(`${endpoint}/games/${gameId}/draws/${drawId}/saleStatistics`);
1669
+ return res;
1670
+ }
1671
+ catch (error) {
1672
+ return Promise.reject(error);
1673
+ }
1674
+ }
1675
+
1676
+ const lotteryTippingLatestResultCss = ".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";
1640
1677
  const LotteryTippingLatestResultStyle0 = lotteryTippingLatestResultCss;
1641
1678
 
1642
1679
  const leftArrowIcon = renderIconDefinitionToSVGElement(LeftOutlined$1, {
@@ -1654,7 +1691,6 @@ const LotteryTippingLatestResult = class {
1654
1691
  this.translationUrl = '';
1655
1692
  this.language = 'en';
1656
1693
  this.endpoint = undefined;
1657
- this.endpointTicket = undefined;
1658
1694
  this.gameId = undefined;
1659
1695
  this.playerId = undefined;
1660
1696
  this.sessionId = undefined;
@@ -1669,10 +1705,11 @@ const LotteryTippingLatestResult = class {
1669
1705
  this.curPrizes = undefined;
1670
1706
  this.curPrizeMap = {};
1671
1707
  this.curTurnOver = 0;
1672
- this.isLoading = false;
1708
+ this.isLoading = true;
1673
1709
  this.playTypes = null;
1674
1710
  this.bettingTypes = undefined;
1675
1711
  this.vendorGameId = undefined;
1712
+ this.isLoadingTurnover = false;
1676
1713
  }
1677
1714
  handleClientStylingChange(newValue, oldValue) {
1678
1715
  if (newValue != oldValue) {
@@ -1693,8 +1730,20 @@ const LotteryTippingLatestResult = class {
1693
1730
  if (this.translationUrl) {
1694
1731
  getTranslations$5(JSON.parse(this.translationUrl));
1695
1732
  }
1696
- this.getGameById();
1697
- this.fetDrawList();
1733
+ this.initData();
1734
+ }
1735
+ async initData() {
1736
+ try {
1737
+ this.isLoading = true;
1738
+ await Promise.all([this.getGameById(), this.fetDrawList()]);
1739
+ this.getTurnOver();
1740
+ }
1741
+ catch (e) {
1742
+ console.error(e);
1743
+ }
1744
+ finally {
1745
+ this.isLoading = false;
1746
+ }
1698
1747
  }
1699
1748
  componentDidLoad() {
1700
1749
  if (this.stylingContainer) {
@@ -1712,7 +1761,6 @@ const LotteryTippingLatestResult = class {
1712
1761
  async getGameById() {
1713
1762
  var _a, _b, _c, _d;
1714
1763
  try {
1715
- this.isLoading = true;
1716
1764
  const gameInfo = await fetchGameInfo(this.endpoint, this.gameId);
1717
1765
  this.vendorGameId = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.type;
1718
1766
  this.playTypes = (_b = (_a = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes;
@@ -1721,9 +1769,6 @@ const LotteryTippingLatestResult = class {
1721
1769
  catch (e) {
1722
1770
  console.log(e);
1723
1771
  }
1724
- finally {
1725
- this.isLoading = false;
1726
- }
1727
1772
  }
1728
1773
  findLatestDateIdx(dateArr) {
1729
1774
  const currentDate = new Date();
@@ -1741,7 +1786,6 @@ const LotteryTippingLatestResult = class {
1741
1786
  }
1742
1787
  async fetDrawList() {
1743
1788
  try {
1744
- this.isLoading = true;
1745
1789
  const GAME_DRAW_LIMIT = 9999;
1746
1790
  const filterData = { status: 'PAYABLE', limit: GAME_DRAW_LIMIT };
1747
1791
  const { items } = await fetchRequest$2(`${this.endpoint}/games/${this.gameId}/draws${toQueryParams$1(filterData)}`, 'GET');
@@ -1757,7 +1801,7 @@ const LotteryTippingLatestResult = class {
1757
1801
  this.curDrawItem = filteredItems[this.curDrawItemIdx];
1758
1802
  this.curDrawSelectionBettingType = filteredItems[this.curDrawItemIdx].winningNumbers[0].winning_type;
1759
1803
  this.curDrawItem.winningNumbers.forEach((item) => {
1760
- this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.numbers)];
1804
+ this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.poolGameOutcomes)];
1761
1805
  });
1762
1806
  this.curDrawItem.prizes.forEach((prize) => {
1763
1807
  const winningType = prize.winningType;
@@ -1771,14 +1815,10 @@ const LotteryTippingLatestResult = class {
1771
1815
  });
1772
1816
  this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
1773
1817
  this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
1774
- this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
1775
1818
  }
1776
1819
  catch (e) {
1777
1820
  console.log(e);
1778
1821
  }
1779
- finally {
1780
- this.isLoading = false;
1781
- }
1782
1822
  }
1783
1823
  get displayedPrizes() {
1784
1824
  const correctItems = this.curPrizes
@@ -1797,7 +1837,7 @@ const LotteryTippingLatestResult = class {
1797
1837
  this.curDrawItem = this.drawList[idx];
1798
1838
  this.curDrawSelectionBettingType = this.curDrawItem.winningNumbers[0].winning_type;
1799
1839
  this.curDrawItem.winningNumbers.forEach((item) => {
1800
- this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.numbers)];
1840
+ this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.poolGameOutcomes)];
1801
1841
  });
1802
1842
  this.curPrizeMap = {};
1803
1843
  this.curDrawItem.prizes.forEach((prize) => {
@@ -1812,7 +1852,7 @@ const LotteryTippingLatestResult = class {
1812
1852
  });
1813
1853
  this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
1814
1854
  this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
1815
- this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
1855
+ this.getTurnOver();
1816
1856
  }
1817
1857
  handleChangeDate(e) {
1818
1858
  const idx = e.detail;
@@ -1828,12 +1868,31 @@ const LotteryTippingLatestResult = class {
1828
1868
  this.changeCurDateItem(++this.curDrawItemIdx);
1829
1869
  }
1830
1870
  }
1871
+ async getTurnOver() {
1872
+ var _a, _b, _c;
1873
+ if (!((_a = this.curDrawItem) === null || _a === void 0 ? void 0 : _a.id))
1874
+ return;
1875
+ try {
1876
+ this.isLoadingTurnover = true;
1877
+ const res = await fetchSaleStatistics$1({
1878
+ endpoint: this.endpoint,
1879
+ gameId: this.vendorGameId,
1880
+ drawId: this.curDrawItem.id
1881
+ });
1882
+ this.curTurnOver = (_c = (_b = res === null || res === void 0 ? void 0 : res.wagerSegment) === null || _b === void 0 ? void 0 : _b.totalSalesCrossDraw) !== null && _c !== void 0 ? _c : 0;
1883
+ }
1884
+ catch (e) {
1885
+ console.error(e);
1886
+ }
1887
+ finally {
1888
+ this.isLoadingTurnover = false;
1889
+ }
1890
+ }
1831
1891
  handleDrawBettingTypeChange(bettingType) {
1832
1892
  this.curDrawSelectionBettingType = bettingType;
1833
1893
  this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
1834
1894
  this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
1835
- console.log('this.curPrizes', this.curPrizes);
1836
- this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
1895
+ this.getTurnOver();
1837
1896
  }
1838
1897
  getBettingTypeName(bettingType) {
1839
1898
  var _a, _b;
@@ -1841,10 +1900,10 @@ const LotteryTippingLatestResult = class {
1841
1900
  return name !== null && name !== void 0 ? name : bettingType;
1842
1901
  }
1843
1902
  render() {
1844
- return (index.h("div", { key: '7007ddb59aed34fc20fecdf06d0d53452313e787', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (index.h("div", { key: '59a729ba714503d5b536133e80b68ad6fa3d97a2', class: "result-wrapper" }, index.h("div", { key: '54e9234aaa863b63c7560ea3bba43b78501046d3', class: "date-selection" }, index.h("div", { key: 'aed56b08b9f7fe29c58ba5e55353397b906ac686', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), index.h("div", { key: '56a8536a2e6b81947adffad3f865d605c3b9c32e', class: "date-selection-calendar" }, index.h("lottery-tipping-calendar", { key: 'e6f6498838ec7d2ca56db9f85bd888b2b7d6511f', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), index.h("div", { key: '6f2380ab5945ba0fb53a0fc69541312723306202', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), index.h("div", { key: '74771044a8391de4ae6caad07b3c4c39a3e1a1e1', class: "winning-result" }, index.h("div", { key: '999094cbf4db0b96479ceadfb58e39393438ae30', class: "betting-type" }, index.h("div", { key: '38af0c363d784156fb5835f59775e29c620800ac', class: "betting-type-title" }, translate$6('bettingType', this.language)), index.h("div", { key: '496a1eebcd1cc0f8d4a5ece6c0e472e0d2595b8e', class: "betting-type-text" }, index.h("div", { key: 'e2d7bf643dcea0909228ec15b27c3bd8223a037d', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
1903
+ return (index.h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (index.h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, index.h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, index.h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), index.h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, index.h("lottery-tipping-calendar", { key: 'c8048c6977b3740b8d2e0e7eff3292c329cdc4be', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), index.h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), index.h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, index.h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, index.h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate$6('bettingType', this.language)), index.h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, index.h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
1845
1904
  LotteryTippingTicketController__segment: true,
1846
1905
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
1847
- }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '0075d96aa6f5a3278be09a9859d09de127d1d4a1', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), index.h("div", { key: '1b1203abf46c48ce37301ad964995548488fab13', class: "prize-result" }, index.h("div", { key: '6ca0a57e88e2f104f7cd9b9c8b656259c4f85c48', class: "prize-result-title" }, translate$6('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), index.h("div", { key: 'eb5c63f5cf063bf3d58e5f67a934d4aa646e5d2a', class: "prize-result-table" }, index.h("div", { key: 'f4aa7aa010af6b7cc7461029cd3b6d0cd5f1fa17', class: "prize-result-table-header" }, index.h("div", { key: 'ce5afb5067aaa10d2b8aed55eb9bf2e456640a22', class: "prize-result-table-row" }, index.h("div", { key: 'a25246d5ed02922cdc424e3ba995219e248298cc', class: "prize-result-table-column" }, translate$6('prizes', this.language)), index.h("div", { key: '701aed9ffb565e7530d96afa946f630b27cb6bc4', class: "prize-result-table-column" }, translate$6('numberOfWinners', this.language)), index.h("div", { key: 'c8dcd3e3c5315a29a76d641898b569667a32c6a3', class: "prize-result-table-column" }, translate$6('prizeMoney', this.language)))), index.h("div", { key: 'a1fe82d196b3db775a8e671b107b0b8aa835b2c4', class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), index.h("div", { class: "prize-result-table-column" }, prize.players), index.h("div", { class: "prize-result-table-column" }, thousandSeperator$1(prize.totalAmount.value)))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (index.h("div", { key: '84d70585471cffd14e2e0c0db37966b54f4150ac' }, translate$6('noLatestResult', this.language))), this.isLoading && index.h("div", { key: 'b8988afe78bf47497f09743cf5841014e8611a05', class: "loading-wrap" }, translate$6('loading', this.language))));
1906
+ }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '06293a063a9ac5f0f59ab8ec9033df764eadd511', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (index.h("div", { class: "loading-wrap" }, index.h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (index.h("div", { class: "prize-result" }, index.h("div", { class: "prize-result-title" }, translate$6('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), index.h("div", { class: "prize-result-table" }, index.h("div", { class: "prize-result-table-header" }, index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, translate$6('prizes', this.language)), index.h("div", { class: "prize-result-table-column" }, translate$6('numberOfWinners', this.language)), index.h("div", { class: "prize-result-table-column" }, translate$6('prizeMoney', this.language)))), index.h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), index.h("div", { class: "prize-result-table-column" }, prize.players), index.h("div", { class: "prize-result-table-column" }, thousandSeperator$1(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (index.h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate$6('noLatestResult', this.language))), this.isLoading && index.h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate$6('loading', this.language))));
1848
1907
  }
1849
1908
  static get watchers() { return {
1850
1909
  "clientStyling": ["handleClientStylingChange"],
@@ -1931,8 +1990,6 @@ const LotteryTippingPage = class {
1931
1990
  this.translationUrl = '';
1932
1991
  this.language = 'en';
1933
1992
  this.endpoint = undefined;
1934
- this.endpointTicket = undefined;
1935
- this.endpointLotteryBe = undefined;
1936
1993
  this.gameId = undefined;
1937
1994
  this.playerId = undefined;
1938
1995
  this.sessionId = undefined;
@@ -1984,15 +2041,15 @@ const LotteryTippingPage = class {
1984
2041
  }
1985
2042
  renderContent() {
1986
2043
  if (this.activeTab === Tab.BuyTickets) {
1987
- return (index.h("lottery-tipping-ticket-controller", { endpoint: this.endpoint, endpointTicket: this.endpointTicket, "endpoint-lottery-be": this.endpointLotteryBe, gameId: this.gameId, playerId: this.playerId, sessionId: this.sessionId, drawId: this.drawId, language: this.language, "mb-source": this.mbSource, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl, "logo-url": this.logoUrl }));
2044
+ return (index.h("lottery-tipping-ticket-controller", { endpoint: this.endpoint, gameId: this.gameId, playerId: this.playerId, sessionId: this.sessionId, drawId: this.drawId, language: this.language, "mb-source": this.mbSource, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl, "logo-url": this.logoUrl }));
1988
2045
  }
1989
2046
  if (this.activeTab === Tab.MyTickets) {
1990
- return (index.h("lottery-tipping-ticket-history", { endpoint: this.endpoint, endpointTicket: this.endpointTicket, gameId: this.gameId, playerId: this.playerId, sessionId: this.sessionId, drawId: this.drawId, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "translation-url": this.translationUrl }));
2047
+ return (index.h("lottery-tipping-ticket-history", { endpoint: this.endpoint, gameId: this.gameId, playerId: this.playerId, sessionId: this.sessionId, drawId: this.drawId, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "translation-url": this.translationUrl }));
1991
2048
  }
1992
2049
  return null;
1993
2050
  }
1994
2051
  render() {
1995
- return (index.h("div", { key: 'be4093871beefe4952d084d39741636aed4d7142', class: "lottery-tipping-page", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'b5474516d39cdb4f91d69ae5fc1eb61b09f39497', class: "lottery-tipping-page-header" }, index.h("slot", { key: 'd250e3ac32fb3aa422a90abc7a053aff5f79efd8', name: "backBtn" }), this.renderTabs(), index.h("div", { key: '0e166025dec63f28eb60a3bbd2c8fdd444bc0398', class: "lottery-tipping-page-header-operation" }, index.h("slot", { key: 'acb092a029939d5b7da51b19b67037b78abb702b', name: "themeBtn" }), index.h("slot", { key: '6a57fa8c4c8e4f2a97cce90eefa2e65d245ad9b6', name: "logoutBtn" }))), index.h("div", { key: 'efe72105b6a4fadf6a970e8226568caa495e4ce7', class: "lottery-tipping-content" }, this.renderContent())));
2052
+ return (index.h("div", { key: '410b13d8772d8a22ea4a2795230b5ea17975b3c3', class: "lottery-tipping-page", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'f468ef27a6a720aa92fe6eda9729e9faf682c110', class: "lottery-tipping-page-header" }, index.h("slot", { key: 'd0485663265b73a313f9749ec0a4be14162c0203', name: "backBtn" }), this.renderTabs(), index.h("div", { key: '3fb36223d652e0702884102173f43920c9d684b1', class: "lottery-tipping-page-header-operation" }, index.h("slot", { key: 'd7d4b03c828c1b1a0f26eba9594093c8352bafbb', name: "themeBtn" }), index.h("slot", { key: '2a59bcae7c9e360bc4d6b35a441340f32f8d4f77', name: "logoutBtn" }))), index.h("div", { key: 'f290300abafc8c31d23651fe7a9195a1f9e09e05', class: "lottery-tipping-content" }, this.renderContent())));
1996
2053
  }
1997
2054
  static get watchers() { return {
1998
2055
  "clientStyling": ["handleClientStylingChange"],
@@ -2538,24 +2595,51 @@ const thousandSeparator = (value) => {
2538
2595
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
2539
2596
  return parts.join('.');
2540
2597
  };
2541
- // format results to winning numbers
2598
+ const HomeDrawAwayArr = ['H', 'D', 'A'];
2599
+ // Utility to format raw results into winning numbers (H/D/A)
2542
2600
  const formatResultsToWinningNumbers = (rawResults) => {
2543
- const formatMatchCheckRes = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
2544
- const resultsForTotalLines = rawResults.map((lineRes) => lineRes.map(formatMatchCheckRes));
2545
- const result = [];
2546
- for (let i = 0; i < resultsForTotalLines.length; i++) {
2547
- const resultsInLine = resultsForTotalLines[i];
2548
- for (let j = 0; j < resultsInLine.length; j++) {
2549
- const matchResult = resultsInLine[j];
2550
- for (let k = 0; k < matchResult.length; k++) {
2551
- if (!result[i])
2552
- result[i] = [];
2553
- if (matchResult[k])
2554
- result[i].push(k, j);
2555
- }
2556
- }
2557
- }
2558
- return result;
2601
+ // Convert each bullet item into binary (1 if selected, 0 otherwise)
2602
+ const toBinarySelection = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
2603
+ // Step 1: Convert rawResults into arrays of 0/1 flags
2604
+ const binaryResults = rawResults.map((lineRes) => lineRes.map(toBinarySelection));
2605
+ const resultLinesArr = [];
2606
+ // Step 2: Iterate through each line of results
2607
+ binaryResults.forEach((line, lineIdx) => {
2608
+ const formattedLine = [];
2609
+ // Step 3: Iterate through each match in a line
2610
+ line.forEach((match, matchIdx) => {
2611
+ // Step 4: Collect the winning outcomes (H/D/A) based on binary flags
2612
+ const outcomes = match.map((isSelected, idx) => (isSelected ? HomeDrawAwayArr[idx] : null)).filter(Boolean);
2613
+ // Wrap outcomes into the expected structure [[matchRes]]
2614
+ formattedLine[matchIdx] = [outcomes];
2615
+ });
2616
+ resultLinesArr[lineIdx] = formattedLine;
2617
+ });
2618
+ return resultLinesArr;
2619
+ };
2620
+ const buildSubmitParam = ({ playerId, rawResults, gameId, rawData, amount, currentStake, betTypeId, betType }) => {
2621
+ var _a;
2622
+ const body = { playerId, tickets: [] };
2623
+ const selections = formatResultsToWinningNumbers(rawResults);
2624
+ const stake = currentStake || {};
2625
+ body.tickets.push({
2626
+ startingDrawId: (_a = rawData === null || rawData === void 0 ? void 0 : rawData.currentDraw) === null || _a === void 0 ? void 0 : _a.id,
2627
+ amount,
2628
+ gameId: gameId,
2629
+ gameName: rawData.name,
2630
+ currency: stake.currency,
2631
+ selection: selections.map((i) => ({
2632
+ betType: betTypeId,
2633
+ stake: +stake.value,
2634
+ poolGameSelections: i,
2635
+ quickPick: false,
2636
+ betName: betType.name
2637
+ })),
2638
+ multiplier: false,
2639
+ drawCount: 1,
2640
+ quickPick: false
2641
+ });
2642
+ return body;
2559
2643
  };
2560
2644
  // BettingTypes, playModes and playTypes
2561
2645
  const getEnableOptions = (raw = []) => raw.filter((i) => i.enabled);
@@ -2929,7 +3013,6 @@ const LotteryTippingTicketBet = class {
2929
3013
  }
2930
3014
  }
2931
3015
  componentDidLoad() {
2932
- console.log(111, this.stylingContainer);
2933
3016
  if (this.stylingContainer) {
2934
3017
  if (this.mbSource)
2935
3018
  lotteryTippingEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
@@ -2972,7 +3055,7 @@ const LotteryTippingTicketBet = class {
2972
3055
  }
2973
3056
  fetchMatchData() {
2974
3057
  // get match
2975
- let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}/findDrawEvents`);
3058
+ let url = new URL(`${this.endpoint}/poolgames/${this.gameId}/draws/${this.drawId}/matchConfig`);
2976
3059
  if (!this.gameId || !this.drawId)
2977
3060
  return;
2978
3061
  this.isLoading = true;
@@ -3210,7 +3293,7 @@ const doSubmitTicket = ({ body, sessionId, url }) => {
3210
3293
  };
3211
3294
  async function fetchSaleStatistics({ endpoint, gameId, drawId }) {
3212
3295
  try {
3213
- const res = await fetchRequest(`${endpoint}/api/v1/lottery/core/widget/games/${gameId}/draws/${drawId}/saleStatistics`);
3296
+ const res = await fetchRequest(`${endpoint}/games/${gameId}/draws/${drawId}/saleStatistics`);
3214
3297
  return res;
3215
3298
  }
3216
3299
  catch (error) {
@@ -3236,8 +3319,6 @@ const LotteryTippingTicketController = class {
3236
3319
  this.language = 'en';
3237
3320
  this.logoUrl = undefined;
3238
3321
  this.endpoint = '';
3239
- this.endpointLotteryBe = '';
3240
- this.endpointTicket = undefined;
3241
3322
  this.sessionId = undefined;
3242
3323
  this.gameId = undefined;
3243
3324
  this.playerId = '';
@@ -3473,7 +3554,7 @@ const LotteryTippingTicketController = class {
3473
3554
  updateSaleStatistics() {
3474
3555
  var _a;
3475
3556
  return fetchSaleStatistics({
3476
- endpoint: this.endpointLotteryBe,
3557
+ endpoint: this.endpoint,
3477
3558
  gameId: (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.type,
3478
3559
  drawId: this.drawId
3479
3560
  }).then((res) => {
@@ -3487,35 +3568,17 @@ const LotteryTippingTicketController = class {
3487
3568
  selectedBettingType: this.selectedBettingType,
3488
3569
  selectedPlayingMode: this.selectedPlayingMode
3489
3570
  });
3490
- const buildSubmitParam = () => {
3491
- var _a, _b;
3492
- const body = {
3493
- playerId: this.playerId,
3494
- tickets: []
3495
- };
3496
- const selections = formatResultsToWinningNumbers(rawResults);
3497
- const stake = (this.currentStake || {});
3498
- body.tickets.push({
3499
- startingDrawId: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.id,
3500
- amount: this.calculateTotalAmount().toString(),
3501
- gameId: this.gameId,
3502
- gameName: this.rawData.name,
3503
- currency: stake.currency,
3504
- selection: selections.map((i) => ({
3505
- betType: betTypeId,
3506
- stake: +stake.value,
3507
- selections: i,
3508
- quickPick: false,
3509
- betName: betType.name
3510
- })),
3511
- multiplier: false,
3512
- drawCount: 1,
3513
- quickPick: false
3514
- });
3515
- return body;
3516
- };
3517
- const url = new URL(`${this.endpointTicket}/tickets`);
3518
- const body = buildSubmitParam();
3571
+ const url = new URL(`${this.endpoint}/tickets`);
3572
+ const body = buildSubmitParam({
3573
+ playerId: this.playerId,
3574
+ rawResults,
3575
+ gameId: this.gameId,
3576
+ rawData: this.rawData,
3577
+ amount: this.calculateTotalAmount().toString(),
3578
+ currentStake: this.currentStake,
3579
+ betTypeId,
3580
+ betType
3581
+ });
3519
3582
  this.submitLoading = true;
3520
3583
  doSubmitTicket({ body, sessionId: this.sessionId, url: url.href })
3521
3584
  .then(() => {
@@ -3543,7 +3606,7 @@ const LotteryTippingTicketController = class {
3543
3606
  return _ + ' ' + unit;
3544
3607
  }
3545
3608
  renderBettingControls() {
3546
- var _a;
3609
+ var _a, _b;
3547
3610
  const renderSkeleton = () => (index.h("div", { class: "skeleton-content" }, index.h("div", { class: "skeleton-item skeleton-animated" })));
3548
3611
  const renderBettingTypeOptions = () => (index.h("div", { class: "LotteryTippingTicketController__segmented-control" }, this.bettingTypeOptions.map((item) => (index.h("button", { class: {
3549
3612
  LotteryTippingTicketController__segment: true,
@@ -3557,15 +3620,15 @@ const LotteryTippingTicketController = class {
3557
3620
  var _a;
3558
3621
  return (index.h("div", null, index.h("vaadin-select", { items: this.stakeOptions || [], value: ((_a = this.currentStake) === null || _a === void 0 ? void 0 : _a.value) || '', "on-value-changed": this.onStakeChange.bind(this), "no-vertical-overlap": true })));
3559
3622
  };
3560
- return (index.h("div", { class: "LotteryTippingTicketController__top" }, index.h("div", { class: "LotteryTippingTicketController__row" }, index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('bettingType', this.language)), !!this.bettingTypeOptions.length ? renderBettingTypeOptions() : renderSkeleton()), index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('playingMode', this.language)), !!this.playingModeOptions.length ? renderPlayingModeOptions() : renderSkeleton()), ((_a = this.stakeOptions) === null || _a === void 0 ? void 0 : _a.length) > 1 && (index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('stakePerLine', this.language)), renderingStakeOptions())))));
3623
+ return (index.h("div", { class: "LotteryTippingTicketController__top" }, index.h("div", { class: "LotteryTippingTicketController__row" }, index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('bettingType', this.language)), !!this.bettingTypeOptions.length ? renderBettingTypeOptions() : renderSkeleton()), index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('playingMode', this.language)), !!this.playingModeOptions.length ? renderPlayingModeOptions() : renderSkeleton()), ((_a = this.stakeOptions) === null || _a === void 0 ? void 0 : _a.length) > 1 && (index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('stakePerLine', this.language)), renderingStakeOptions())), ((_b = this.stakeOptions) === null || _b === void 0 ? void 0 : _b.length) > 1 && (index.h("div", { class: "LotteryTippingTicketController__section" }, index.h("span", { class: "LotteryTippingTicketController__label" }, translate$2('stakePerLine', this.language)), renderingStakeOptions())))));
3561
3624
  }
3562
3625
  renderOrderSummary() {
3563
3626
  var _a;
3564
3627
  return (index.h("div", { class: "LotteryTippingTicketController__main--right order-summary" }, index.h("h3", { class: "order-summary__title" }, translate$2('orderSummaryTitle', this.language)), index.h("div", { class: "order-summary__ticket-info" }, index.h("div", { class: "order-summary__ticket" }, translate$2('orderSummaryTickets', this.language), ":"), index.h("div", { class: "order-summary__details" }, index.h("span", { class: "order-summary__line-count" }, this.lineCountRender), index.h("div", null, this.currentStake && index.h("span", { class: "order-summary__multiplier" }, "x"), index.h("span", { class: "order-summary__stake" }, this.currentStakeFormatted)), this.isBothBettingType && (index.h("div", null, index.h("span", { class: "order-summary__multiplier" }, "x"), index.h("span", { class: "order-summary__stake" }, this.bothBettingTypeMultiplier))))), index.h("hr", { class: "order-summary__divider" }), index.h("div", { class: "order-summary__ticket-info" }, index.h("div", { class: "order-summary__ticket" }, translate$2('orderSummaryTotal', this.language), ":"), index.h("span", { class: "order-summary__details" }, this.totalAmountFormatted)), index.h("div", { class: "order-summary__button-wrapper" }, index.h("lottery-button", { onClick: this.handleSubmit.bind(this), loading: this.submitLoading, disabled: !this.hasSelectAllBullet || this.submitLoading || ((_a = this.currentStake) === null || _a === void 0 ? void 0 : _a.value) === undefined, text: translate$2('orderSummarySubmit', this.language) }))));
3565
3628
  }
3566
3629
  get formattedTurnover() {
3567
- var _a, _b;
3568
- const turnover = (_b = (_a = this.saleStatisticsInfo) === null || _a === void 0 ? void 0 : _a.wagerSegment) === null || _b === void 0 ? void 0 : _b.totalSalesCrossDraw;
3630
+ var _a, _b, _c;
3631
+ const turnover = (_c = (_b = (_a = this.saleStatisticsInfo) === null || _a === void 0 ? void 0 : _a.wagerSegment) === null || _b === void 0 ? void 0 : _b.totalSalesCrossDraw) !== null && _c !== void 0 ? _c : 0;
3569
3632
  if (turnover === null || turnover === undefined)
3570
3633
  return '';
3571
3634
  const unit = '€';
@@ -3573,7 +3636,7 @@ const LotteryTippingTicketController = class {
3573
3636
  }
3574
3637
  render() {
3575
3638
  var _a, _b, _c, _d, _e, _f, _g;
3576
- return (index.h("div", { key: 'bc9858c6923707b9d5e4fca7b57e272143f895aa', class: "lottery-tipping-ticket-controller__container", ref: (el) => (this.stylingContainer = el) }, index.h("lottery-tipping-ticket-banner", { key: '2a220d90a4ab73f220d9d47db47e10749cb33cdd', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl, stopTime: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.wagerCloseTime, period: (_d = (_c = this.rawData) === null || _c === void 0 ? void 0 : _c.currentDraw) === null || _d === void 0 ? void 0 : _d.date, "formatted-turnover": this.formattedTurnover, language: this.language, "translation-url": this.translationUrl, "logo-url": this.logoUrl }), this.renderBettingControls(), index.h("div", { key: '9d548c6d3d01ee4ed2e68481a00f4667e50a418b', class: "flex flex-wrap LotteryTippingTicketController__main" }, index.h("div", { key: '647ff830980982139f270f12a5286eb80a2f7b9e', class: "LotteryTippingTicketController__main--left" }, index.h("lottery-tipping-ticket-bet", { key: '0151d3830fcec76574016a97a953a12817450280', ref: (el) => (this.childRef = el), endpoint: this.endpoint, "session-id": this.sessionId, "game-id": (_e = this.rawData) === null || _e === void 0 ? void 0 : _e.type, "draw-id": this.drawId, language: this.language, "translation-url": this.translationUrl, "max-total-pages": this.lineNumberRange.maxLineNumber, "min-total-pages": this.lineNumberRange.minLineNumber, "total-pages": this.lineNumberRange.defaultBoards, mode: this.selectedPlayingMode === PlayModeEnum.SingleBet ? 'single' : 'multi', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl })), this.renderOrderSummary()), this.dialogConfig.visible && (index.h("vaadin-confirm-dialog", { key: '5153f04448556bca403aeadfca6b573e0dc9b832', rejectButtonVisible: true, rejectText: translate$2('cancel', this.language), confirmText: translate$2('confirm', this.language), opened: (_f = this.dialogConfig) === null || _f === void 0 ? void 0 : _f.visible, onConfirm: this.dialogConfig.onConfirm, onReject: this.dialogConfig.onCancel }, (_g = this.dialogConfig) === null || _g === void 0 ? void 0 : _g.content))));
3639
+ return (index.h("div", { key: '353f56111a3dc6f6e7365d563163a38c850f2e88', class: "lottery-tipping-ticket-controller__container", ref: (el) => (this.stylingContainer = el) }, index.h("lottery-tipping-ticket-banner", { key: '3a2472f0bf9195547f5e4c6c2c0a2362c790aa27', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl, stopTime: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.wagerCloseTime, period: (_d = (_c = this.rawData) === null || _c === void 0 ? void 0 : _c.currentDraw) === null || _d === void 0 ? void 0 : _d.date, "formatted-turnover": this.formattedTurnover, language: this.language, "translation-url": this.translationUrl, "logo-url": this.logoUrl }), this.renderBettingControls(), index.h("div", { key: '9d0a9391ccf79351959cc280e3c15efc657a966f', class: "flex flex-wrap LotteryTippingTicketController__main" }, index.h("div", { key: 'c61fdb41d41694227971478e193cc5162bff30c3', class: "LotteryTippingTicketController__main--left" }, index.h("lottery-tipping-ticket-bet", { key: '56964177a4366a366279b2ebfff2ee52d1e27de0', ref: (el) => (this.childRef = el), endpoint: this.endpoint, "session-id": this.sessionId, "game-id": (_e = this.rawData) === null || _e === void 0 ? void 0 : _e.type, "draw-id": this.drawId, language: this.language, "translation-url": this.translationUrl, "max-total-pages": this.lineNumberRange.maxLineNumber, "min-total-pages": this.lineNumberRange.minLineNumber, "total-pages": this.lineNumberRange.defaultBoards, mode: this.selectedPlayingMode === PlayModeEnum.SingleBet ? 'single' : 'multi', "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl })), this.renderOrderSummary()), this.dialogConfig.visible && (index.h("vaadin-confirm-dialog", { key: 'fe8eb6d26eecee3c6e10b20c4f2ad968f707d51c', rejectButtonVisible: true, rejectText: translate$2('cancel', this.language), confirmText: translate$2('confirm', this.language), opened: (_f = this.dialogConfig) === null || _f === void 0 ? void 0 : _f.visible, onConfirm: this.dialogConfig.onConfirm, onReject: this.dialogConfig.onCancel }, (_g = this.dialogConfig) === null || _g === void 0 ? void 0 : _g.content))));
3577
3640
  }
3578
3641
  static get assetsDirs() { return ["../static"]; }
3579
3642
  static get watchers() { return {
@@ -3630,7 +3693,6 @@ const LotteryTippingTicketHistory = class {
3630
3693
  return resultArr;
3631
3694
  };
3632
3695
  this.endpoint = undefined;
3633
- this.endpointTicket = undefined;
3634
3696
  this.gameId = undefined;
3635
3697
  this.playerId = undefined;
3636
3698
  this.sessionId = '';
@@ -3741,7 +3803,7 @@ const LotteryTippingTicketHistory = class {
3741
3803
  async fetchTicketList() {
3742
3804
  this.isLoading = true;
3743
3805
  try {
3744
- const { items, total } = await fetchRequest$1(`${this.endpointTicket}/tickets${toQueryParams(this.filterData)}`, 'GET', null, {
3806
+ const { items, total } = await fetchRequest$1(`${this.endpoint}/tickets${toQueryParams(this.filterData)}`, 'GET', null, {
3745
3807
  Authorization: `Bearer ${this.sessionId}`
3746
3808
  });
3747
3809
  this.ticketHistory = items;
@@ -3923,15 +3985,15 @@ const LotteryTippingTicketHistory = class {
3923
3985
  return name !== null && name !== void 0 ? name : bettingType;
3924
3986
  }
3925
3987
  render() {
3926
- return (index.h("div", { key: '482c0231847e34c4778109388a4119311f967a23', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '23ca773d34a5519bed5a46bdddeb631b7cf1a860', class: "ticket-history-title" }, translate$4('ticketsHistory', this.language)), index.h("div", { key: '490645a92e95d8f9372de8da178d68192dbd9833', class: "filter-wrap" }, index.h("div", { key: 'e6148ecca58e013dbb3cf14c63a775ac7b7bf1e1', class: "filter-status" }, this.statusOptions.map((status) => (index.h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), index.h("div", { key: 'a4b4a6bf6bf4ee1f6ac96d070e166a9c3d9d8685', class: "filter-operation" }, index.h("lottery-tipping-filter", { key: '4840846470dd119ddf612596b5384cacfeaf3712', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (index.h("div", { key: '889098ccaa01cc2ac09a7137877d539cbe3d065e', class: "loading-wrap" }, index.h("section", { key: '8e2dbde5a065631809ce58351970455087ad15f2', class: "dots-container" }, index.h("div", { key: '57091e88a4d804978c82fc7539c8176ed6749c36', class: "dot" }), index.h("div", { key: '5ebfda4acf1a2313a320cebbf50997ea61591aac', class: "dot" }), index.h("div", { key: 'b8bcf4f0c3d56daeb0905fcc30ad2ddd2486d163', class: "dot" }), index.h("div", { key: '66b9f178213463bb7b52942a3ff3e46a179564fc', class: "dot" }), index.h("div", { key: 'a37e51ff17057fc722e45004de2b0af121f7caf4', class: "dot" })))), !this.isLoading && this.paginationInfo.total > 0 && (index.h("div", { key: 'b79011a6606fec6865b9444b6b72a4ee8e6e6eea', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (index.h("lottery-tipping-panel", { "header-title": lotteryTippingEntrance.format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, index.h("div", { class: "panel-content", slot: "content" }, index.h("div", { class: "ticket-info" }, index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('ticketId', this.language)), index.h("div", { class: "ticket-info-val" }, item.id, " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('ticketType', this.language)), index.h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('ticketAmount', this.language)), index.h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('lineDetail', this.language)), index.h("div", { class: "ticket-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate$4('seeDetails', this.language)))), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('numberOfDraw', this.language)), index.h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
3927
- item.drawResults.map((drawResultItem) => (index.h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (index.h("div", { class: "draw-info" }, index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('ticketResult', this.language)), index.h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('drawId', this.language)), index.h("div", { class: "draw-info-val" }, drawResultItem.drawId)), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('drawDate', this.language)), index.h("div", { class: "draw-info-val" }, lotteryTippingEntrance.format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('result', this.language)), index.h("div", { class: "draw-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate$4('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('prize', this.language)), index.h("div", { class: "draw-info-val1" }, index.h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (index.h("span", null, index.h("div", null, index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), index.h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (index.h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (index.h("div", { class: "skeleton-line" })))))))))))))), !this.isLoading && this.paginationInfo.total === 0 && (index.h("div", { key: 'ee7a1052955280e5a6ada4c0efc30b9fd0d98fd9', class: "empty-wrap" }, translate$4('noData', this.language))), index.h("lottery-tipping-dialog", { key: 'd9e0305ee9099100ab185744e2aaac73307a7c1e', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
3988
+ return (index.h("div", { key: 'e2bdf93193821b73ab85c98bbaeb20a9ddffd4a7', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '795fb954de08c6c3d125ef386906c10ebb9df5dc', class: "ticket-history-title" }, translate$4('ticketsHistory', this.language)), index.h("div", { key: 'a73aca010e47e8f29f7df93fe0240fa772e717f1', class: "filter-wrap" }, index.h("div", { key: '49d6f18bb302811d4616a7d1e9cbc3155abbd71c', class: "filter-status" }, this.statusOptions.map((status) => (index.h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), index.h("div", { key: '9d17d4e3f67cd68fe1dc6c748c682d3ebd7673d4', class: "filter-operation" }, index.h("lottery-tipping-filter", { key: '1403ac73aa834f0f8ad8428923887e331470184f', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (index.h("div", { key: 'af70782819d38af17770e0b28ef13da5a1ad5096', class: "loading-wrap" }, index.h("section", { key: '9f384d693af08125c321dc08c42cd2d32dd44fb1', class: "dots-container" }, index.h("div", { key: '82e89a8645383c6f537d7ad0906642fdb3a78cb6', class: "dot" }), index.h("div", { key: '574610642a60089eef6ccd6f26a1e18ed856bee3', class: "dot" }), index.h("div", { key: 'e90eff2b5330571da92fe14ec0afeaa3256730c3', class: "dot" }), index.h("div", { key: '9c9579c96c98af756fc9d0125039337b069cabc9', class: "dot" }), index.h("div", { key: 'a5d651350e459b867ce0f3125bffb3ae13e99415', class: "dot" })))), !this.isLoading && this.paginationInfo.total > 0 && (index.h("div", { key: '62ca1b0fa1f5a6538d3bfecbceeb675e9da83ff0', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (index.h("lottery-tipping-panel", { "header-title": lotteryTippingEntrance.format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, index.h("div", { class: "panel-content", slot: "content" }, index.h("div", { class: "ticket-info" }, index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('ticketId', this.language)), index.h("div", { class: "ticket-info-val" }, item.id, " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('ticketType', this.language)), index.h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('ticketAmount', this.language)), index.h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('lineDetail', this.language)), index.h("div", { class: "ticket-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate$4('seeDetails', this.language)))), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$4('numberOfDraw', this.language)), index.h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
3989
+ item.drawResults.map((drawResultItem) => (index.h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (index.h("div", { class: "draw-info" }, index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('ticketResult', this.language)), index.h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('drawId', this.language)), index.h("div", { class: "draw-info-val" }, drawResultItem.drawId)), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('drawDate', this.language)), index.h("div", { class: "draw-info-val" }, lotteryTippingEntrance.format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('result', this.language)), index.h("div", { class: "draw-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate$4('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$4('prize', this.language)), index.h("div", { class: "draw-info-val1" }, index.h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (index.h("span", null, index.h("div", null, index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), index.h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (index.h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (index.h("div", { class: "skeleton-line" })))))))))))))), !this.isLoading && this.paginationInfo.total === 0 && (index.h("div", { key: 'f4e82cafb79a5766b2bca251c1171905fdbefe02', class: "empty-wrap" }, translate$4('noData', this.language))), index.h("lottery-tipping-dialog", { key: '89ff90664a6ae0cfdd739c202010602c1b037062', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
3928
3990
  this.showCurrentTicketLine = false;
3929
- }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && this.showCurrentTicketLine && (index.h("div", { key: 'fe67de05d41d4e49d1fd50dbf6ce92c599a37ea7' }, index.h("div", { key: 'c367ac116ad9ea927291881f5ff136840ccb4081', class: "betting-type" }, index.h("div", { key: '021e57f03a8c96a78dbcb5843186170fe1d0a53d', class: "betting-type-title" }, translate$4('bettingType', this.language)), index.h("div", { key: 'ea1fec0f472ab8187f09db90fc164ec0fa0c294d', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), index.h("lottery-tipping-ticket-bet", { key: '8ee7e277f0a31c6d2e7e3206eef4ecb00563117f', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("lottery-tipping-dialog", { key: 'b35fe7a03de9f0613f40a6728fb9b517ee7720ff', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
3991
+ }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && this.showCurrentTicketLine && (index.h("div", { key: '5345d592ac9f0130f971cfacb58ca8ddebae4399' }, index.h("div", { key: '3d3b4011822202dd2f4c23483226e329333710cd', class: "betting-type" }, index.h("div", { key: 'c04048d3a580a8b36de76a3bf1ec7ad40edaf91b', class: "betting-type-title" }, translate$4('bettingType', this.language)), index.h("div", { key: '1614ff0010fc627e36da87361b7a8cd1e17f251e', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), index.h("lottery-tipping-ticket-bet", { key: 'b5747189176752774d02e0dd74e795d445b6246a', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("lottery-tipping-dialog", { key: '94c1c58c2443895e1e5205fc3301a89a9b064e4f', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
3930
3992
  this.showCurrentDrawResult = false;
3931
- }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && this.showCurrentDrawResult && (index.h("div", { key: 'c0c43e4d4aa54c55b2f69fa254d78b02ebbf3d58' }, index.h("div", { key: 'f6f7971515335c61aa3ef179aafc4936a3445b72', class: "betting-type" }, index.h("div", { key: 'ed535b79ad7db63ca771b063eb30c5d2b89942e5', class: "betting-type-title" }, translate$4('bettingType', this.language)), index.h("div", { key: 'f017fe599cf209fa9a55e691b5943188e6a708ec', class: "betting-type-text" }, index.h("div", { key: 'cc9db96d2def2c0de5aa9b1e8b2075adbf40f728', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
3993
+ }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && this.showCurrentDrawResult && (index.h("div", { key: '000d5fda83c1d4496428fc5570576c1a33d16366' }, index.h("div", { key: '896d3e013f27f8971ee4220f0d3853e696f69c4c', class: "betting-type" }, index.h("div", { key: 'ea6eae9c86f6cbfbaf2644a17bf009a78b50bdae', class: "betting-type-title" }, translate$4('bettingType', this.language)), index.h("div", { key: 'fa22c6c07946f12d6a52d498dbc5339b1e4eb795', class: "betting-type-text" }, index.h("div", { key: 'cc6199976821e84b112b5091fa617b40e09a62dc', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
3932
3994
  LotteryTippingTicketController__segment: true,
3933
3995
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
3934
- }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: 'da2bd7b45abeb7c610c712c459ecacebafe7aa03', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("div", { key: 'a64d5819bf8db8e46e419cf88ac92eaef61288b5', class: "pagination-wrap" }, index.h("lottery-tipping-pagination", { key: 'e2dbfdf08c0b0f356bda2134c3dd349315232dad', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
3996
+ }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '82873092dfa36aa666aebbf90330af309be60df6', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("div", { key: '2a4e1557bb2644e9c41820d77fa77fb53212c263', class: "pagination-wrap" }, index.h("lottery-tipping-pagination", { key: '515ad839d8104fe3ecdb50ba6d6b915fd6842781', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
3935
3997
  }
3936
3998
  static get watchers() { return {
3937
3999
  "clientStyling": ["handleClientStylingChange"],
@@ -3939,13 +4001,186 @@ const LotteryTippingTicketHistory = class {
3939
4001
  "mbSource": ["handleMbSourceChange"],
3940
4002
  "gameId": ["handleGameInfoChange"],
3941
4003
  "endpoint": ["handleGameInfoChange"],
3942
- "endpointTicket": ["handleTicketInfoChange"],
3943
4004
  "playerId": ["handleTicketInfoChange"],
3944
4005
  "sessionId": ["handleTicketInfoChange"]
3945
4006
  }; }
3946
4007
  };
3947
4008
  LotteryTippingTicketHistory.style = LotteryTippingTicketHistoryStyle0;
3948
4009
 
4010
+ const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
4011
+ const UiSkeletonStyle0 = uiSkeletonCss;
4012
+
4013
+ const UiSkeleton = class {
4014
+ constructor(hostRef) {
4015
+ index.registerInstance(this, hostRef);
4016
+ this.stylingValue = {
4017
+ width: this.handleStylingProps(this.width),
4018
+ height: this.handleStylingProps(this.height),
4019
+ borderRadius: this.handleStylingProps(this.borderRadius),
4020
+ marginBottom: this.handleStylingProps(this.marginBottom),
4021
+ marginTop: this.handleStylingProps(this.marginTop),
4022
+ marginLeft: this.handleStylingProps(this.marginLeft),
4023
+ marginRight: this.handleStylingProps(this.marginRight),
4024
+ size: this.handleStylingProps(this.size),
4025
+ };
4026
+ this.structure = undefined;
4027
+ this.width = 'unset';
4028
+ this.height = 'unset';
4029
+ this.borderRadius = 'unset';
4030
+ this.marginBottom = 'unset';
4031
+ this.marginTop = 'unset';
4032
+ this.marginLeft = 'unset';
4033
+ this.marginRight = 'unset';
4034
+ this.animation = true;
4035
+ this.rows = 0;
4036
+ this.size = '100%';
4037
+ }
4038
+ handleStructureChange(newValue, oldValue) {
4039
+ if (oldValue !== newValue) {
4040
+ this.handleStructure(newValue);
4041
+ }
4042
+ }
4043
+ handleStylingProps(value) {
4044
+ switch (typeof value) {
4045
+ case 'number':
4046
+ return value === 0 ? 0 : `${value}px`;
4047
+ case 'undefined':
4048
+ return 'unset';
4049
+ case 'string':
4050
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
4051
+ value.endsWith('px') ||
4052
+ value.endsWith('%')) {
4053
+ return value;
4054
+ }
4055
+ else {
4056
+ return 'unset';
4057
+ }
4058
+ default:
4059
+ return 'unset';
4060
+ }
4061
+ }
4062
+ handleStructure(structure) {
4063
+ switch (structure) {
4064
+ case 'logo':
4065
+ return this.renderLogo();
4066
+ case 'image':
4067
+ return this.renderImage();
4068
+ case 'title':
4069
+ return this.renderTitle();
4070
+ case 'text':
4071
+ return this.renderText();
4072
+ case 'rectangle':
4073
+ return this.renderRectangle();
4074
+ case 'circle':
4075
+ return this.renderCircle();
4076
+ default:
4077
+ return null;
4078
+ }
4079
+ }
4080
+ renderLogo() {
4081
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
4082
+ }
4083
+ renderImage() {
4084
+ return index.h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
4085
+ }
4086
+ renderTitle() {
4087
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
4088
+ }
4089
+ renderText() {
4090
+ return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
4091
+ }
4092
+ renderRectangle() {
4093
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
4094
+ }
4095
+ renderCircle() {
4096
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
4097
+ }
4098
+ render() {
4099
+ let styleBlock = '';
4100
+ switch (this.structure) {
4101
+ case 'logo':
4102
+ styleBlock = `
4103
+ :host {
4104
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
4105
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
4106
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
4107
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
4108
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
4109
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
4110
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
4111
+ }
4112
+ `;
4113
+ break;
4114
+ case 'image':
4115
+ styleBlock = `
4116
+ :host {
4117
+ --emw-skeleton-image-width: ${this.stylingValue.width};
4118
+ --emw-skeleton-image-height: ${this.stylingValue.height};
4119
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
4120
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
4121
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
4122
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
4123
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
4124
+ }
4125
+ `;
4126
+ break;
4127
+ case 'title':
4128
+ styleBlock = `
4129
+ :host {
4130
+ --emw-skeleton-title-width: ${this.stylingValue.width};
4131
+ --emw-skeleton-title-height: ${this.stylingValue.height};
4132
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
4133
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
4134
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
4135
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
4136
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
4137
+ }
4138
+ `;
4139
+ break;
4140
+ case 'text':
4141
+ styleBlock = `
4142
+ :host {
4143
+ --emw-skeleton-text-width: ${this.stylingValue.width};
4144
+ --emw-skeleton-text-height: ${this.stylingValue.height};
4145
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
4146
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
4147
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
4148
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
4149
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
4150
+ }
4151
+ `;
4152
+ break;
4153
+ case 'rectangle':
4154
+ styleBlock = `
4155
+ :host {
4156
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
4157
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
4158
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
4159
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
4160
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
4161
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
4162
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
4163
+ }
4164
+ `;
4165
+ break;
4166
+ case 'circle':
4167
+ styleBlock = `
4168
+ :host {
4169
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
4170
+ }
4171
+ `;
4172
+ break;
4173
+ default:
4174
+ styleBlock = '';
4175
+ }
4176
+ return (index.h(index.Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, index.h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
4177
+ }
4178
+ static get watchers() { return {
4179
+ "structure": ["handleStructureChange"]
4180
+ }; }
4181
+ };
4182
+ UiSkeleton.style = UiSkeletonStyle0;
4183
+
3949
4184
  exports.lottery_tipping_entrance = lotteryTippingEntrance.LotteryTippingEntrance;
3950
4185
  exports.draw_selection = DrawSelection;
3951
4186
  exports.general_multi_select = GeneralMultiSelect;
@@ -3964,3 +4199,4 @@ exports.lottery_tipping_ticket_banner = LotteryTippingTicketBanner;
3964
4199
  exports.lottery_tipping_ticket_bet = LotteryTippingTicketBet;
3965
4200
  exports.lottery_tipping_ticket_controller = LotteryTippingTicketController;
3966
4201
  exports.lottery_tipping_ticket_history = LotteryTippingTicketHistory;
4202
+ exports.ui_skeleton = UiSkeleton;