@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
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, g as getAssetPath, a as getElement } from './index-a57b04e7.js';
2
- import { r as requiredArgs, t as toDate, a as toInteger, s as setClientStyling, b as setClientStylingURL, c as setStreamStyling, f as formatDate$2, d as translate$8, i as isMobile$1, g as getDayWithSuffixLocal, e as format, p as parseISO } from './lottery-tipping-entrance-9e7c2d9a.js';
3
- export { L as lottery_tipping_entrance } from './lottery-tipping-entrance-9e7c2d9a.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getAssetPath, a as getElement, H as Host } from './index-c22bb7d4.js';
2
+ import { r as requiredArgs, t as toDate, a as toInteger, s as setClientStyling, b as setClientStylingURL, c as setStreamStyling, f as formatDate$2, d as translate$8, i as isMobile$1, g as getDayWithSuffixLocal, e as format, p as parseISO } from './lottery-tipping-entrance-9d9230ea.js';
3
+ export { L as lottery_tipping_entrance } from './lottery-tipping-entrance-9d9230ea.js';
4
4
 
5
5
  /**
6
6
  * @name addDays
@@ -506,7 +506,7 @@ const resolveTranslationUrl$3 = async (translationUrl) => {
506
506
  }
507
507
  };
508
508
 
509
- 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}}";
509
+ 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}}";
510
510
  const LotteryButtonStyle0 = lotteryButtonCss;
511
511
 
512
512
  const LotteryButton = class {
@@ -535,6 +535,7 @@ const LotteryButton = class {
535
535
  };
536
536
  this.variant = 'primary';
537
537
  this.size = 'medium';
538
+ this.color = undefined;
538
539
  this.disabled = false;
539
540
  this.loading = false;
540
541
  this.text = undefined;
@@ -579,14 +580,43 @@ const LotteryButton = class {
579
580
  }
580
581
  }
581
582
  render() {
582
- const { variant, disabled, size } = this;
583
+ const { variant, disabled, size, color } = this;
583
584
  const isDisabled = disabled || this.loading;
584
- return (h("button", { key: '19094b8ffd0d13c7e3cdc7139d559214803f0e73', class: {
585
+ // Calculate styles based on variant and color
586
+ const buttonStyles = {};
587
+ if (color) {
588
+ switch (variant) {
589
+ case 'primary':
590
+ Object.assign(buttonStyles, {
591
+ backgroundColor: color,
592
+ borderColor: color
593
+ });
594
+ break;
595
+ case 'outline':
596
+ case 'dashed':
597
+ Object.assign(buttonStyles, {
598
+ color: color,
599
+ borderColor: color
600
+ });
601
+ break;
602
+ case 'text':
603
+ Object.assign(buttonStyles, {
604
+ color: color
605
+ });
606
+ break;
607
+ default:
608
+ Object.assign(buttonStyles, {
609
+ backgroundColor: color,
610
+ borderColor: color
611
+ });
612
+ }
613
+ }
614
+ return (h("button", { key: 'aa74ad98c90e7548228557bf8a8d26b125d4a83a', class: {
585
615
  btn: true,
586
616
  [`btn--${variant}`]: true,
587
617
  [`btn--${size}`]: true,
588
618
  'btn--loading': this.loading
589
- }, disabled: isDisabled, onClick: this.handleClick }, this.loading ? (h("div", { class: "loading-container" }, h("span", { class: "content" }, this.text || translate$7('loading', this.language)), h("span", { class: "spinner" }))) : (h("span", { class: "content" }, this.text)), h("div", { key: 'e7e7542f0b79c5bf8e41969e23dd77d9fdec4462', class: "ripple-container" }, this.ripples.map((ripple, index) => (h("span", { key: index, class: "ripple", style: {
619
+ }, style: color ? buttonStyles : undefined, disabled: isDisabled, onClick: this.handleClick, ref: (el) => (this.stylingContainer = el) }, this.loading ? (h("div", { class: "loading-container" }, h("span", { class: "content" }, this.text || translate$7('loading', this.language)), h("span", { class: "spinner" }))) : (h("span", { class: "content" }, h("slot", { name: "icon-left" }), this.text || h("slot", null), h("slot", { name: "icon-right" }))), h("div", { key: '302ea02be395bb24989d4abc040a513e23fa029a', class: "ripple-container" }, this.ripples.map((ripple, index) => (h("span", { key: index, class: "ripple", style: {
590
620
  top: `${ripple.top}px`,
591
621
  left: `${ripple.left}px`,
592
622
  width: `${ripple.size}px`,
@@ -912,7 +942,7 @@ const getTranslations$5 = (data) => {
912
942
  });
913
943
  };
914
944
 
915
- 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)}";
945
+ 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)}";
916
946
  const LotteryTippingCalendarStyle0 = lotteryTippingCalendarCss;
917
947
 
918
948
  const calendarIcon = renderIconDefinitionToSVGElement(CalendarOutlined$1, {
@@ -1091,9 +1121,9 @@ const LotteryTippingCalendar = class {
1091
1121
  }
1092
1122
  render() {
1093
1123
  const calendarClass = ['calendar', this.showCalendar ? 'calendar-visible' : 'calendar-leave'];
1094
- return (h("div", { key: '40cec47319dc0ad95980e710c074c5a28c2ab456', class: "lottery-tipping-calendar", ref: (el) => (this.calendarRef = el) }, h("div", { key: '87b1ea72a5c28c69290b613ffa7af8696ffcaab3', class: "calling-input", onClick: () => {
1124
+ return (h("div", { key: 'eda2c6b211647dfd9c26f5dd53dd8f18a2205be2', class: "lottery-tipping-calendar", ref: (el) => (this.calendarRef = el) }, h("div", { key: 'b8a516ae17b8de7aaa4a72284848295546239937', class: "calling-input", onClick: () => {
1095
1125
  this.showCalendar = true;
1096
- } }, h("div", { key: '8014304a1c19467598f7d324f013e36da10807a1', class: "calling-input-text" }, this.showFormatedDate(this.curDate)), h("div", { key: '4bb3276c543343b971f3ae983a8666435ff0c05f', class: "calling-input-icon", innerHTML: calendarIcon })), h("div", { key: 'e9caf41eecd8989189c2badfc087828ffdf37bb5', class: calendarClass.join(' ') }, h("div", { key: '1c19085aae79e7678065ef7023d4a3ef27cac70b', class: "calendar-header" }, h("div", { key: 'caffe869fc67dc21299bfcd034b057f931258c84', class: "date-controller year-minus", onClick: this.onYearMinus }, "<"), h("div", { key: '6e553067cbaf25c692fa7e081dd437db48588516', class: "date-controller month-minus", onClick: this.onMonthMinus }, "<"), h("div", { key: '45b29397f39b4d440c4e2a5f73dd9e1c3aae462d', class: "date-picker" }, h("div", { key: 'bdd6b7aca5884d08ce0c2703c36e714c88b99487', class: "date-picker-year" }, 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) })), h("div", { key: 'd040dec3f9ca8f31ee7fe7bb7f6535132e00b5f9', class: "date-picker-delimiter" }, "-"), h("div", { key: 'f62dae4dfb9e5709b0b27eaa2046107220520a6a', class: "date-picker-month" }, 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) })), h("div", { key: '8c3e63306a284c3a4026789a0f0e9f3677498747', class: "date-picker-delimiter" }, "-"), h("div", { key: '93d1716b68a80943193dc4f82442ae91ec769c46', class: "date-picker-day" }, this.alterDate.day)), h("div", { key: 'b14ba540468c8e152ace46f113e233a7a52c64e2', class: "date-controller month-plus", onClick: this.onMonthPlus }, ">"), h("div", { key: '3ace715a066c50a65f8dfc6c45f82d992c0be7f1', class: "date-controller year-plus", onClick: this.onYearPlus }, ">")), h("div", { key: '698402dcef3d815561e00077c6fa6c70e9d229ff', class: "calendar-content" }, h("div", { key: '37c9d09bade72010f4ad9daf7bdc669fea42f678', class: "calendar-content-week" }, this.weeks.map((week) => (h("div", { class: "week-item" }, week)))), h("div", { key: '13029ff486fb7acbb9f43ab29b7ea5204fcb2a43', class: "calendar-content-day" }, this.days.map((item) => (h("div", { class: {
1126
+ } }, h("div", { key: '4e384c0e1989f76b995bbc3df572eeab8ae120f6', class: "calling-input-text" }, this.showFormatedDate(this.curDate)), h("div", { key: 'a489600f9b90e4ea865606dddd4997ad9cf1558a', class: "calling-input-icon", innerHTML: calendarIcon })), h("div", { key: '7c17232151a8ae775e4a35000e7992695ce1f9dd', class: calendarClass.join(' ') }, h("div", { key: '6951e3aa3fedb236514b57d6cdf830b074deb928', class: "calendar-header" }, h("div", { key: '7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8', class: "date-controller year-minus", onClick: this.onYearMinus }, "<"), h("div", { key: 'e0f3e6958187120e4441c4c4961fda4a74294cca', class: "date-controller month-minus", onClick: this.onMonthMinus }, "<"), h("div", { key: 'e1840f3d0f9e4860a03467bbc782a6306c591ad4', class: "date-picker" }, h("div", { key: '44d3b63aebcadaa42682e77f9d84c9ae155ec546', class: "date-picker-year" }, 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) })), h("div", { key: '0a405edb23487297ab91e0a6ce304e907d7cfa62', class: "date-picker-delimiter" }, "-"), h("div", { key: 'cc81efef542d370f4e03a7d7fa138a36b900d801', class: "date-picker-month" }, 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) })), h("div", { key: 'f862d5d3d665c97bc74f7eda209822cc5ceb558e', class: "date-picker-delimiter" }, "-"), h("div", { key: '9b2dca353b3708ad561af1bebb24c93dd1194384', class: "date-picker-day" }, this.alterDate.day)), h("div", { key: '4e2d6c599a6c03aa1852b65c86f2db50cea02d6d', class: "date-controller month-plus", onClick: this.onMonthPlus }, ">"), h("div", { key: '18e4e92486507065a5e0771ffde5050f4ffff3f1', class: "date-controller year-plus", onClick: this.onYearPlus }, ">")), h("div", { key: 'ef1115ce79c83cf4689779e55f046a70f733bc6c', class: "calendar-content" }, h("div", { key: '0a6fe5ec8ee10f03a2547f942207f6ceaaa99618', class: "calendar-content-week" }, this.weeks.map((week) => (h("div", { class: "week-item" }, week)))), h("div", { key: '971bc904f76e33c6503be7d223759f2ab7cb0ad6', class: "calendar-content-day" }, this.days.map((item) => (h("div", { class: {
1097
1127
  'day-item': true,
1098
1128
  isCurDay: this.tellIsCurDay(item.date, item.month, item.year),
1099
1129
  isHighLight: this.tellIsHighLight(item.date, item.month, item.year)
@@ -1156,7 +1186,7 @@ const resolveTranslationUrl$2 = async (translationUrl) => {
1156
1186
  }
1157
1187
  };
1158
1188
 
1159
- 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)}}";
1189
+ 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)}}";
1160
1190
  const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
1161
1191
 
1162
1192
  const LotteryTippingDialog = class {
@@ -1578,32 +1608,29 @@ const bulletMap$1 = {
1578
1608
  '2': '2'
1579
1609
  };
1580
1610
  function parseBulletNumber$1(numberArr) {
1581
- const bulletArr = [];
1582
- Object.keys(bulletMap$1).forEach((key) => {
1583
- bulletArr.push({
1584
- isSelected: numberArr.includes(Number(key)),
1585
- value: bulletMap$1[key]
1586
- });
1587
- });
1588
- return bulletArr;
1611
+ return numberArr.map((v, index) => ({
1612
+ isSelected: v === 1,
1613
+ value: bulletMap$1[index]
1614
+ }));
1589
1615
  }
1590
- function parseEachLineNumber$1(numbers) {
1591
- const result = [];
1592
- const matchRes = [];
1593
- for (let i = 0; i < numbers.length; i += 2) {
1594
- const [resultNumber, matchNumber] = [numbers[i], numbers[i + 1]];
1595
- if (!matchRes[matchNumber]) {
1596
- matchRes[matchNumber] = [resultNumber];
1597
- }
1598
- else {
1599
- matchRes[matchNumber].push(resultNumber);
1600
- }
1601
- }
1602
- matchRes.forEach((matchArr) => {
1603
- result.push(parseBulletNumber$1(matchArr));
1616
+ const outcomeIndexMap = {
1617
+ H: 0,
1618
+ D: 1,
1619
+ A: 2
1620
+ };
1621
+ const parseEachLineNumber$1 = (outcomes) => {
1622
+ const res = outcomes.map((matchOutcomes) => {
1623
+ const selected = matchOutcomes[0];
1624
+ const result = [0, 0, 0];
1625
+ selected.forEach((outcome) => {
1626
+ const idx = outcomeIndexMap[outcome];
1627
+ if (idx !== undefined)
1628
+ result[idx] = 1;
1629
+ });
1630
+ return parseBulletNumber$1(result);
1604
1631
  });
1605
- return result;
1606
- }
1632
+ return res;
1633
+ };
1607
1634
  function thousandSeperator$1(value) {
1608
1635
  if (value === 0) {
1609
1636
  return '0';
@@ -1633,7 +1660,17 @@ async function fetchGameInfo(endpoint, gameId) {
1633
1660
  }
1634
1661
  }
1635
1662
 
1636
- 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}";
1663
+ async function fetchSaleStatistics$1({ endpoint, gameId, drawId }) {
1664
+ try {
1665
+ const res = await fetchRequest$2(`${endpoint}/games/${gameId}/draws/${drawId}/saleStatistics`);
1666
+ return res;
1667
+ }
1668
+ catch (error) {
1669
+ return Promise.reject(error);
1670
+ }
1671
+ }
1672
+
1673
+ 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}";
1637
1674
  const LotteryTippingLatestResultStyle0 = lotteryTippingLatestResultCss;
1638
1675
 
1639
1676
  const leftArrowIcon = renderIconDefinitionToSVGElement(LeftOutlined$1, {
@@ -1651,7 +1688,6 @@ const LotteryTippingLatestResult = class {
1651
1688
  this.translationUrl = '';
1652
1689
  this.language = 'en';
1653
1690
  this.endpoint = undefined;
1654
- this.endpointTicket = undefined;
1655
1691
  this.gameId = undefined;
1656
1692
  this.playerId = undefined;
1657
1693
  this.sessionId = undefined;
@@ -1666,10 +1702,11 @@ const LotteryTippingLatestResult = class {
1666
1702
  this.curPrizes = undefined;
1667
1703
  this.curPrizeMap = {};
1668
1704
  this.curTurnOver = 0;
1669
- this.isLoading = false;
1705
+ this.isLoading = true;
1670
1706
  this.playTypes = null;
1671
1707
  this.bettingTypes = undefined;
1672
1708
  this.vendorGameId = undefined;
1709
+ this.isLoadingTurnover = false;
1673
1710
  }
1674
1711
  handleClientStylingChange(newValue, oldValue) {
1675
1712
  if (newValue != oldValue) {
@@ -1690,8 +1727,20 @@ const LotteryTippingLatestResult = class {
1690
1727
  if (this.translationUrl) {
1691
1728
  getTranslations$5(JSON.parse(this.translationUrl));
1692
1729
  }
1693
- this.getGameById();
1694
- this.fetDrawList();
1730
+ this.initData();
1731
+ }
1732
+ async initData() {
1733
+ try {
1734
+ this.isLoading = true;
1735
+ await Promise.all([this.getGameById(), this.fetDrawList()]);
1736
+ this.getTurnOver();
1737
+ }
1738
+ catch (e) {
1739
+ console.error(e);
1740
+ }
1741
+ finally {
1742
+ this.isLoading = false;
1743
+ }
1695
1744
  }
1696
1745
  componentDidLoad() {
1697
1746
  if (this.stylingContainer) {
@@ -1709,7 +1758,6 @@ const LotteryTippingLatestResult = class {
1709
1758
  async getGameById() {
1710
1759
  var _a, _b, _c, _d;
1711
1760
  try {
1712
- this.isLoading = true;
1713
1761
  const gameInfo = await fetchGameInfo(this.endpoint, this.gameId);
1714
1762
  this.vendorGameId = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.type;
1715
1763
  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;
@@ -1718,9 +1766,6 @@ const LotteryTippingLatestResult = class {
1718
1766
  catch (e) {
1719
1767
  console.log(e);
1720
1768
  }
1721
- finally {
1722
- this.isLoading = false;
1723
- }
1724
1769
  }
1725
1770
  findLatestDateIdx(dateArr) {
1726
1771
  const currentDate = new Date();
@@ -1738,7 +1783,6 @@ const LotteryTippingLatestResult = class {
1738
1783
  }
1739
1784
  async fetDrawList() {
1740
1785
  try {
1741
- this.isLoading = true;
1742
1786
  const GAME_DRAW_LIMIT = 9999;
1743
1787
  const filterData = { status: 'PAYABLE', limit: GAME_DRAW_LIMIT };
1744
1788
  const { items } = await fetchRequest$2(`${this.endpoint}/games/${this.gameId}/draws${toQueryParams$1(filterData)}`, 'GET');
@@ -1754,7 +1798,7 @@ const LotteryTippingLatestResult = class {
1754
1798
  this.curDrawItem = filteredItems[this.curDrawItemIdx];
1755
1799
  this.curDrawSelectionBettingType = filteredItems[this.curDrawItemIdx].winningNumbers[0].winning_type;
1756
1800
  this.curDrawItem.winningNumbers.forEach((item) => {
1757
- this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.numbers)];
1801
+ this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.poolGameOutcomes)];
1758
1802
  });
1759
1803
  this.curDrawItem.prizes.forEach((prize) => {
1760
1804
  const winningType = prize.winningType;
@@ -1768,14 +1812,10 @@ const LotteryTippingLatestResult = class {
1768
1812
  });
1769
1813
  this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
1770
1814
  this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
1771
- this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
1772
1815
  }
1773
1816
  catch (e) {
1774
1817
  console.log(e);
1775
1818
  }
1776
- finally {
1777
- this.isLoading = false;
1778
- }
1779
1819
  }
1780
1820
  get displayedPrizes() {
1781
1821
  const correctItems = this.curPrizes
@@ -1794,7 +1834,7 @@ const LotteryTippingLatestResult = class {
1794
1834
  this.curDrawItem = this.drawList[idx];
1795
1835
  this.curDrawSelectionBettingType = this.curDrawItem.winningNumbers[0].winning_type;
1796
1836
  this.curDrawItem.winningNumbers.forEach((item) => {
1797
- this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.numbers)];
1837
+ this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber$1(item.poolGameOutcomes)];
1798
1838
  });
1799
1839
  this.curPrizeMap = {};
1800
1840
  this.curDrawItem.prizes.forEach((prize) => {
@@ -1809,7 +1849,7 @@ const LotteryTippingLatestResult = class {
1809
1849
  });
1810
1850
  this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
1811
1851
  this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
1812
- this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
1852
+ this.getTurnOver();
1813
1853
  }
1814
1854
  handleChangeDate(e) {
1815
1855
  const idx = e.detail;
@@ -1825,12 +1865,31 @@ const LotteryTippingLatestResult = class {
1825
1865
  this.changeCurDateItem(++this.curDrawItemIdx);
1826
1866
  }
1827
1867
  }
1868
+ async getTurnOver() {
1869
+ var _a, _b, _c;
1870
+ if (!((_a = this.curDrawItem) === null || _a === void 0 ? void 0 : _a.id))
1871
+ return;
1872
+ try {
1873
+ this.isLoadingTurnover = true;
1874
+ const res = await fetchSaleStatistics$1({
1875
+ endpoint: this.endpoint,
1876
+ gameId: this.vendorGameId,
1877
+ drawId: this.curDrawItem.id
1878
+ });
1879
+ 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;
1880
+ }
1881
+ catch (e) {
1882
+ console.error(e);
1883
+ }
1884
+ finally {
1885
+ this.isLoadingTurnover = false;
1886
+ }
1887
+ }
1828
1888
  handleDrawBettingTypeChange(bettingType) {
1829
1889
  this.curDrawSelectionBettingType = bettingType;
1830
1890
  this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
1831
1891
  this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
1832
- console.log('this.curPrizes', this.curPrizes);
1833
- this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
1892
+ this.getTurnOver();
1834
1893
  }
1835
1894
  getBettingTypeName(bettingType) {
1836
1895
  var _a, _b;
@@ -1838,10 +1897,10 @@ const LotteryTippingLatestResult = class {
1838
1897
  return name !== null && name !== void 0 ? name : bettingType;
1839
1898
  }
1840
1899
  render() {
1841
- return (h("div", { key: '7007ddb59aed34fc20fecdf06d0d53452313e787', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: '59a729ba714503d5b536133e80b68ad6fa3d97a2', class: "result-wrapper" }, h("div", { key: '54e9234aaa863b63c7560ea3bba43b78501046d3', class: "date-selection" }, h("div", { key: 'aed56b08b9f7fe29c58ba5e55353397b906ac686', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '56a8536a2e6b81947adffad3f865d605c3b9c32e', class: "date-selection-calendar" }, 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 })), h("div", { key: '6f2380ab5945ba0fb53a0fc69541312723306202', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: '74771044a8391de4ae6caad07b3c4c39a3e1a1e1', class: "winning-result" }, h("div", { key: '999094cbf4db0b96479ceadfb58e39393438ae30', class: "betting-type" }, h("div", { key: '38af0c363d784156fb5835f59775e29c620800ac', class: "betting-type-title" }, translate$6('bettingType', this.language)), h("div", { key: '496a1eebcd1cc0f8d4a5ece6c0e472e0d2595b8e', class: "betting-type-text" }, h("div", { key: 'e2d7bf643dcea0909228ec15b27c3bd8223a037d', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
1900
+ return (h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, 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 })), h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate$6('bettingType', this.language)), h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
1842
1901
  LotteryTippingTicketController__segment: true,
1843
1902
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
1844
- }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), 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 })), h("div", { key: '1b1203abf46c48ce37301ad964995548488fab13', class: "prize-result" }, h("div", { key: '6ca0a57e88e2f104f7cd9b9c8b656259c4f85c48', class: "prize-result-title" }, translate$6('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { key: 'eb5c63f5cf063bf3d58e5f67a934d4aa646e5d2a', class: "prize-result-table" }, h("div", { key: 'f4aa7aa010af6b7cc7461029cd3b6d0cd5f1fa17', class: "prize-result-table-header" }, h("div", { key: 'ce5afb5067aaa10d2b8aed55eb9bf2e456640a22', class: "prize-result-table-row" }, h("div", { key: 'a25246d5ed02922cdc424e3ba995219e248298cc', class: "prize-result-table-column" }, translate$6('prizes', this.language)), h("div", { key: '701aed9ffb565e7530d96afa946f630b27cb6bc4', class: "prize-result-table-column" }, translate$6('numberOfWinners', this.language)), h("div", { key: 'c8dcd3e3c5315a29a76d641898b569667a32c6a3', class: "prize-result-table-column" }, translate$6('prizeMoney', this.language)))), h("div", { key: 'a1fe82d196b3db775a8e671b107b0b8aa835b2c4', class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator$1(prize.totalAmount.value)))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '84d70585471cffd14e2e0c0db37966b54f4150ac' }, translate$6('noLatestResult', this.language))), this.isLoading && h("div", { key: 'b8988afe78bf47497f09743cf5841014e8611a05', class: "loading-wrap" }, translate$6('loading', this.language))));
1903
+ }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), 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 ? (h("div", { class: "loading-wrap" }, h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (h("div", { class: "prize-result" }, h("div", { class: "prize-result-title" }, translate$6('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { class: "prize-result-table" }, h("div", { class: "prize-result-table-header" }, h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, translate$6('prizes', this.language)), h("div", { class: "prize-result-table-column" }, translate$6('numberOfWinners', this.language)), h("div", { class: "prize-result-table-column" }, translate$6('prizeMoney', this.language)))), h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator$1(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate$6('noLatestResult', this.language))), this.isLoading && h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate$6('loading', this.language))));
1845
1904
  }
1846
1905
  static get watchers() { return {
1847
1906
  "clientStyling": ["handleClientStylingChange"],
@@ -1928,8 +1987,6 @@ const LotteryTippingPage = class {
1928
1987
  this.translationUrl = '';
1929
1988
  this.language = 'en';
1930
1989
  this.endpoint = undefined;
1931
- this.endpointTicket = undefined;
1932
- this.endpointLotteryBe = undefined;
1933
1990
  this.gameId = undefined;
1934
1991
  this.playerId = undefined;
1935
1992
  this.sessionId = undefined;
@@ -1981,15 +2038,15 @@ const LotteryTippingPage = class {
1981
2038
  }
1982
2039
  renderContent() {
1983
2040
  if (this.activeTab === Tab.BuyTickets) {
1984
- return (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 }));
2041
+ return (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 }));
1985
2042
  }
1986
2043
  if (this.activeTab === Tab.MyTickets) {
1987
- return (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 }));
2044
+ return (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 }));
1988
2045
  }
1989
2046
  return null;
1990
2047
  }
1991
2048
  render() {
1992
- return (h("div", { key: 'be4093871beefe4952d084d39741636aed4d7142', class: "lottery-tipping-page", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'b5474516d39cdb4f91d69ae5fc1eb61b09f39497', class: "lottery-tipping-page-header" }, h("slot", { key: 'd250e3ac32fb3aa422a90abc7a053aff5f79efd8', name: "backBtn" }), this.renderTabs(), h("div", { key: '0e166025dec63f28eb60a3bbd2c8fdd444bc0398', class: "lottery-tipping-page-header-operation" }, h("slot", { key: 'acb092a029939d5b7da51b19b67037b78abb702b', name: "themeBtn" }), h("slot", { key: '6a57fa8c4c8e4f2a97cce90eefa2e65d245ad9b6', name: "logoutBtn" }))), h("div", { key: 'efe72105b6a4fadf6a970e8226568caa495e4ce7', class: "lottery-tipping-content" }, this.renderContent())));
2049
+ return (h("div", { key: '410b13d8772d8a22ea4a2795230b5ea17975b3c3', class: "lottery-tipping-page", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'f468ef27a6a720aa92fe6eda9729e9faf682c110', class: "lottery-tipping-page-header" }, h("slot", { key: 'd0485663265b73a313f9749ec0a4be14162c0203', name: "backBtn" }), this.renderTabs(), h("div", { key: '3fb36223d652e0702884102173f43920c9d684b1', class: "lottery-tipping-page-header-operation" }, h("slot", { key: 'd7d4b03c828c1b1a0f26eba9594093c8352bafbb', name: "themeBtn" }), h("slot", { key: '2a59bcae7c9e360bc4d6b35a441340f32f8d4f77', name: "logoutBtn" }))), h("div", { key: 'f290300abafc8c31d23651fe7a9195a1f9e09e05', class: "lottery-tipping-content" }, this.renderContent())));
1993
2050
  }
1994
2051
  static get watchers() { return {
1995
2052
  "clientStyling": ["handleClientStylingChange"],
@@ -2535,24 +2592,51 @@ const thousandSeparator = (value) => {
2535
2592
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
2536
2593
  return parts.join('.');
2537
2594
  };
2538
- // format results to winning numbers
2595
+ const HomeDrawAwayArr = ['H', 'D', 'A'];
2596
+ // Utility to format raw results into winning numbers (H/D/A)
2539
2597
  const formatResultsToWinningNumbers = (rawResults) => {
2540
- const formatMatchCheckRes = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
2541
- const resultsForTotalLines = rawResults.map((lineRes) => lineRes.map(formatMatchCheckRes));
2542
- const result = [];
2543
- for (let i = 0; i < resultsForTotalLines.length; i++) {
2544
- const resultsInLine = resultsForTotalLines[i];
2545
- for (let j = 0; j < resultsInLine.length; j++) {
2546
- const matchResult = resultsInLine[j];
2547
- for (let k = 0; k < matchResult.length; k++) {
2548
- if (!result[i])
2549
- result[i] = [];
2550
- if (matchResult[k])
2551
- result[i].push(k, j);
2552
- }
2553
- }
2554
- }
2555
- return result;
2598
+ // Convert each bullet item into binary (1 if selected, 0 otherwise)
2599
+ const toBinarySelection = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
2600
+ // Step 1: Convert rawResults into arrays of 0/1 flags
2601
+ const binaryResults = rawResults.map((lineRes) => lineRes.map(toBinarySelection));
2602
+ const resultLinesArr = [];
2603
+ // Step 2: Iterate through each line of results
2604
+ binaryResults.forEach((line, lineIdx) => {
2605
+ const formattedLine = [];
2606
+ // Step 3: Iterate through each match in a line
2607
+ line.forEach((match, matchIdx) => {
2608
+ // Step 4: Collect the winning outcomes (H/D/A) based on binary flags
2609
+ const outcomes = match.map((isSelected, idx) => (isSelected ? HomeDrawAwayArr[idx] : null)).filter(Boolean);
2610
+ // Wrap outcomes into the expected structure [[matchRes]]
2611
+ formattedLine[matchIdx] = [outcomes];
2612
+ });
2613
+ resultLinesArr[lineIdx] = formattedLine;
2614
+ });
2615
+ return resultLinesArr;
2616
+ };
2617
+ const buildSubmitParam = ({ playerId, rawResults, gameId, rawData, amount, currentStake, betTypeId, betType }) => {
2618
+ var _a;
2619
+ const body = { playerId, tickets: [] };
2620
+ const selections = formatResultsToWinningNumbers(rawResults);
2621
+ const stake = currentStake || {};
2622
+ body.tickets.push({
2623
+ startingDrawId: (_a = rawData === null || rawData === void 0 ? void 0 : rawData.currentDraw) === null || _a === void 0 ? void 0 : _a.id,
2624
+ amount,
2625
+ gameId: gameId,
2626
+ gameName: rawData.name,
2627
+ currency: stake.currency,
2628
+ selection: selections.map((i) => ({
2629
+ betType: betTypeId,
2630
+ stake: +stake.value,
2631
+ poolGameSelections: i,
2632
+ quickPick: false,
2633
+ betName: betType.name
2634
+ })),
2635
+ multiplier: false,
2636
+ drawCount: 1,
2637
+ quickPick: false
2638
+ });
2639
+ return body;
2556
2640
  };
2557
2641
  // BettingTypes, playModes and playTypes
2558
2642
  const getEnableOptions = (raw = []) => raw.filter((i) => i.enabled);
@@ -2926,7 +3010,6 @@ const LotteryTippingTicketBet = class {
2926
3010
  }
2927
3011
  }
2928
3012
  componentDidLoad() {
2929
- console.log(111, this.stylingContainer);
2930
3013
  if (this.stylingContainer) {
2931
3014
  if (this.mbSource)
2932
3015
  setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
@@ -2969,7 +3052,7 @@ const LotteryTippingTicketBet = class {
2969
3052
  }
2970
3053
  fetchMatchData() {
2971
3054
  // get match
2972
- let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}/findDrawEvents`);
3055
+ let url = new URL(`${this.endpoint}/poolgames/${this.gameId}/draws/${this.drawId}/matchConfig`);
2973
3056
  if (!this.gameId || !this.drawId)
2974
3057
  return;
2975
3058
  this.isLoading = true;
@@ -3207,7 +3290,7 @@ const doSubmitTicket = ({ body, sessionId, url }) => {
3207
3290
  };
3208
3291
  async function fetchSaleStatistics({ endpoint, gameId, drawId }) {
3209
3292
  try {
3210
- const res = await fetchRequest(`${endpoint}/api/v1/lottery/core/widget/games/${gameId}/draws/${drawId}/saleStatistics`);
3293
+ const res = await fetchRequest(`${endpoint}/games/${gameId}/draws/${drawId}/saleStatistics`);
3211
3294
  return res;
3212
3295
  }
3213
3296
  catch (error) {
@@ -3233,8 +3316,6 @@ const LotteryTippingTicketController = class {
3233
3316
  this.language = 'en';
3234
3317
  this.logoUrl = undefined;
3235
3318
  this.endpoint = '';
3236
- this.endpointLotteryBe = '';
3237
- this.endpointTicket = undefined;
3238
3319
  this.sessionId = undefined;
3239
3320
  this.gameId = undefined;
3240
3321
  this.playerId = '';
@@ -3470,7 +3551,7 @@ const LotteryTippingTicketController = class {
3470
3551
  updateSaleStatistics() {
3471
3552
  var _a;
3472
3553
  return fetchSaleStatistics({
3473
- endpoint: this.endpointLotteryBe,
3554
+ endpoint: this.endpoint,
3474
3555
  gameId: (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.type,
3475
3556
  drawId: this.drawId
3476
3557
  }).then((res) => {
@@ -3484,35 +3565,17 @@ const LotteryTippingTicketController = class {
3484
3565
  selectedBettingType: this.selectedBettingType,
3485
3566
  selectedPlayingMode: this.selectedPlayingMode
3486
3567
  });
3487
- const buildSubmitParam = () => {
3488
- var _a, _b;
3489
- const body = {
3490
- playerId: this.playerId,
3491
- tickets: []
3492
- };
3493
- const selections = formatResultsToWinningNumbers(rawResults);
3494
- const stake = (this.currentStake || {});
3495
- body.tickets.push({
3496
- startingDrawId: (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.id,
3497
- amount: this.calculateTotalAmount().toString(),
3498
- gameId: this.gameId,
3499
- gameName: this.rawData.name,
3500
- currency: stake.currency,
3501
- selection: selections.map((i) => ({
3502
- betType: betTypeId,
3503
- stake: +stake.value,
3504
- selections: i,
3505
- quickPick: false,
3506
- betName: betType.name
3507
- })),
3508
- multiplier: false,
3509
- drawCount: 1,
3510
- quickPick: false
3511
- });
3512
- return body;
3513
- };
3514
- const url = new URL(`${this.endpointTicket}/tickets`);
3515
- const body = buildSubmitParam();
3568
+ const url = new URL(`${this.endpoint}/tickets`);
3569
+ const body = buildSubmitParam({
3570
+ playerId: this.playerId,
3571
+ rawResults,
3572
+ gameId: this.gameId,
3573
+ rawData: this.rawData,
3574
+ amount: this.calculateTotalAmount().toString(),
3575
+ currentStake: this.currentStake,
3576
+ betTypeId,
3577
+ betType
3578
+ });
3516
3579
  this.submitLoading = true;
3517
3580
  doSubmitTicket({ body, sessionId: this.sessionId, url: url.href })
3518
3581
  .then(() => {
@@ -3540,7 +3603,7 @@ const LotteryTippingTicketController = class {
3540
3603
  return _ + ' ' + unit;
3541
3604
  }
3542
3605
  renderBettingControls() {
3543
- var _a;
3606
+ var _a, _b;
3544
3607
  const renderSkeleton = () => (h("div", { class: "skeleton-content" }, h("div", { class: "skeleton-item skeleton-animated" })));
3545
3608
  const renderBettingTypeOptions = () => (h("div", { class: "LotteryTippingTicketController__segmented-control" }, this.bettingTypeOptions.map((item) => (h("button", { class: {
3546
3609
  LotteryTippingTicketController__segment: true,
@@ -3554,15 +3617,15 @@ const LotteryTippingTicketController = class {
3554
3617
  var _a;
3555
3618
  return (h("div", null, 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 })));
3556
3619
  };
3557
- return (h("div", { class: "LotteryTippingTicketController__top" }, h("div", { class: "LotteryTippingTicketController__row" }, h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate$2('bettingType', this.language)), !!this.bettingTypeOptions.length ? renderBettingTypeOptions() : renderSkeleton()), h("div", { class: "LotteryTippingTicketController__section" }, 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 && (h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate$2('stakePerLine', this.language)), renderingStakeOptions())))));
3620
+ return (h("div", { class: "LotteryTippingTicketController__top" }, h("div", { class: "LotteryTippingTicketController__row" }, h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate$2('bettingType', this.language)), !!this.bettingTypeOptions.length ? renderBettingTypeOptions() : renderSkeleton()), h("div", { class: "LotteryTippingTicketController__section" }, 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 && (h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate$2('stakePerLine', this.language)), renderingStakeOptions())), ((_b = this.stakeOptions) === null || _b === void 0 ? void 0 : _b.length) > 1 && (h("div", { class: "LotteryTippingTicketController__section" }, h("span", { class: "LotteryTippingTicketController__label" }, translate$2('stakePerLine', this.language)), renderingStakeOptions())))));
3558
3621
  }
3559
3622
  renderOrderSummary() {
3560
3623
  var _a;
3561
3624
  return (h("div", { class: "LotteryTippingTicketController__main--right order-summary" }, h("h3", { class: "order-summary__title" }, translate$2('orderSummaryTitle', this.language)), h("div", { class: "order-summary__ticket-info" }, h("div", { class: "order-summary__ticket" }, translate$2('orderSummaryTickets', this.language), ":"), h("div", { class: "order-summary__details" }, h("span", { class: "order-summary__line-count" }, this.lineCountRender), h("div", null, this.currentStake && h("span", { class: "order-summary__multiplier" }, "x"), h("span", { class: "order-summary__stake" }, this.currentStakeFormatted)), this.isBothBettingType && (h("div", null, h("span", { class: "order-summary__multiplier" }, "x"), h("span", { class: "order-summary__stake" }, this.bothBettingTypeMultiplier))))), h("hr", { class: "order-summary__divider" }), h("div", { class: "order-summary__ticket-info" }, h("div", { class: "order-summary__ticket" }, translate$2('orderSummaryTotal', this.language), ":"), h("span", { class: "order-summary__details" }, this.totalAmountFormatted)), h("div", { class: "order-summary__button-wrapper" }, 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) }))));
3562
3625
  }
3563
3626
  get formattedTurnover() {
3564
- var _a, _b;
3565
- const turnover = (_b = (_a = this.saleStatisticsInfo) === null || _a === void 0 ? void 0 : _a.wagerSegment) === null || _b === void 0 ? void 0 : _b.totalSalesCrossDraw;
3627
+ var _a, _b, _c;
3628
+ 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;
3566
3629
  if (turnover === null || turnover === undefined)
3567
3630
  return '';
3568
3631
  const unit = '€';
@@ -3570,7 +3633,7 @@ const LotteryTippingTicketController = class {
3570
3633
  }
3571
3634
  render() {
3572
3635
  var _a, _b, _c, _d, _e, _f, _g;
3573
- return (h("div", { key: 'bc9858c6923707b9d5e4fca7b57e272143f895aa', class: "lottery-tipping-ticket-controller__container", ref: (el) => (this.stylingContainer = el) }, 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(), h("div", { key: '9d548c6d3d01ee4ed2e68481a00f4667e50a418b', class: "flex flex-wrap LotteryTippingTicketController__main" }, h("div", { key: '647ff830980982139f270f12a5286eb80a2f7b9e', class: "LotteryTippingTicketController__main--left" }, 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 && (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))));
3636
+ return (h("div", { key: '353f56111a3dc6f6e7365d563163a38c850f2e88', class: "lottery-tipping-ticket-controller__container", ref: (el) => (this.stylingContainer = el) }, 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(), h("div", { key: '9d0a9391ccf79351959cc280e3c15efc657a966f', class: "flex flex-wrap LotteryTippingTicketController__main" }, h("div", { key: 'c61fdb41d41694227971478e193cc5162bff30c3', class: "LotteryTippingTicketController__main--left" }, 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 && (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))));
3574
3637
  }
3575
3638
  static get assetsDirs() { return ["../static"]; }
3576
3639
  static get watchers() { return {
@@ -3627,7 +3690,6 @@ const LotteryTippingTicketHistory = class {
3627
3690
  return resultArr;
3628
3691
  };
3629
3692
  this.endpoint = undefined;
3630
- this.endpointTicket = undefined;
3631
3693
  this.gameId = undefined;
3632
3694
  this.playerId = undefined;
3633
3695
  this.sessionId = '';
@@ -3738,7 +3800,7 @@ const LotteryTippingTicketHistory = class {
3738
3800
  async fetchTicketList() {
3739
3801
  this.isLoading = true;
3740
3802
  try {
3741
- const { items, total } = await fetchRequest$1(`${this.endpointTicket}/tickets${toQueryParams(this.filterData)}`, 'GET', null, {
3803
+ const { items, total } = await fetchRequest$1(`${this.endpoint}/tickets${toQueryParams(this.filterData)}`, 'GET', null, {
3742
3804
  Authorization: `Bearer ${this.sessionId}`
3743
3805
  });
3744
3806
  this.ticketHistory = items;
@@ -3920,15 +3982,15 @@ const LotteryTippingTicketHistory = class {
3920
3982
  return name !== null && name !== void 0 ? name : bettingType;
3921
3983
  }
3922
3984
  render() {
3923
- return (h("div", { key: '482c0231847e34c4778109388a4119311f967a23', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '23ca773d34a5519bed5a46bdddeb631b7cf1a860', class: "ticket-history-title" }, translate$4('ticketsHistory', this.language)), h("div", { key: '490645a92e95d8f9372de8da178d68192dbd9833', class: "filter-wrap" }, h("div", { key: 'e6148ecca58e013dbb3cf14c63a775ac7b7bf1e1', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: 'a4b4a6bf6bf4ee1f6ac96d070e166a9c3d9d8685', class: "filter-operation" }, h("lottery-tipping-filter", { key: '4840846470dd119ddf612596b5384cacfeaf3712', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: '889098ccaa01cc2ac09a7137877d539cbe3d065e', class: "loading-wrap" }, h("section", { key: '8e2dbde5a065631809ce58351970455087ad15f2', class: "dots-container" }, h("div", { key: '57091e88a4d804978c82fc7539c8176ed6749c36', class: "dot" }), h("div", { key: '5ebfda4acf1a2313a320cebbf50997ea61591aac', class: "dot" }), h("div", { key: 'b8bcf4f0c3d56daeb0905fcc30ad2ddd2486d163', class: "dot" }), h("div", { key: '66b9f178213463bb7b52942a3ff3e46a179564fc', class: "dot" }), h("div", { key: 'a37e51ff17057fc722e45004de2b0af121f7caf4', class: "dot" })))), !this.isLoading && this.paginationInfo.total > 0 && (h("div", { key: 'b79011a6606fec6865b9444b6b72a4ee8e6e6eea', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate$4('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
3924
- item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate$4('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), !this.isLoading && this.paginationInfo.total === 0 && (h("div", { key: 'ee7a1052955280e5a6ada4c0efc30b9fd0d98fd9', class: "empty-wrap" }, translate$4('noData', this.language))), 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: () => {
3985
+ return (h("div", { key: 'e2bdf93193821b73ab85c98bbaeb20a9ddffd4a7', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '795fb954de08c6c3d125ef386906c10ebb9df5dc', class: "ticket-history-title" }, translate$4('ticketsHistory', this.language)), h("div", { key: 'a73aca010e47e8f29f7df93fe0240fa772e717f1', class: "filter-wrap" }, h("div", { key: '49d6f18bb302811d4616a7d1e9cbc3155abbd71c', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: '9d17d4e3f67cd68fe1dc6c748c682d3ebd7673d4', class: "filter-operation" }, h("lottery-tipping-filter", { key: '1403ac73aa834f0f8ad8428923887e331470184f', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: 'af70782819d38af17770e0b28ef13da5a1ad5096', class: "loading-wrap" }, h("section", { key: '9f384d693af08125c321dc08c42cd2d32dd44fb1', class: "dots-container" }, h("div", { key: '82e89a8645383c6f537d7ad0906642fdb3a78cb6', class: "dot" }), h("div", { key: '574610642a60089eef6ccd6f26a1e18ed856bee3', class: "dot" }), h("div", { key: 'e90eff2b5330571da92fe14ec0afeaa3256730c3', class: "dot" }), h("div", { key: '9c9579c96c98af756fc9d0125039337b069cabc9', class: "dot" }), h("div", { key: 'a5d651350e459b867ce0f3125bffb3ae13e99415', class: "dot" })))), !this.isLoading && this.paginationInfo.total > 0 && (h("div", { key: '62ca1b0fa1f5a6538d3bfecbceeb675e9da83ff0', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate$4('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$4('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
3986
+ item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate$4('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$4('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), !this.isLoading && this.paginationInfo.total === 0 && (h("div", { key: 'f4e82cafb79a5766b2bca251c1171905fdbefe02', class: "empty-wrap" }, translate$4('noData', this.language))), 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: () => {
3925
3987
  this.showCurrentTicketLine = false;
3926
- }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && this.showCurrentTicketLine && (h("div", { key: 'fe67de05d41d4e49d1fd50dbf6ce92c599a37ea7' }, h("div", { key: 'c367ac116ad9ea927291881f5ff136840ccb4081', class: "betting-type" }, h("div", { key: '021e57f03a8c96a78dbcb5843186170fe1d0a53d', class: "betting-type-title" }, translate$4('bettingType', this.language)), h("div", { key: 'ea1fec0f472ab8187f09db90fc164ec0fa0c294d', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), 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 })))), 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: () => {
3988
+ }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && this.showCurrentTicketLine && (h("div", { key: '5345d592ac9f0130f971cfacb58ca8ddebae4399' }, h("div", { key: '3d3b4011822202dd2f4c23483226e329333710cd', class: "betting-type" }, h("div", { key: 'c04048d3a580a8b36de76a3bf1ec7ad40edaf91b', class: "betting-type-title" }, translate$4('bettingType', this.language)), h("div", { key: '1614ff0010fc627e36da87361b7a8cd1e17f251e', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), 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 })))), 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: () => {
3927
3989
  this.showCurrentDrawResult = false;
3928
- }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && this.showCurrentDrawResult && (h("div", { key: 'c0c43e4d4aa54c55b2f69fa254d78b02ebbf3d58' }, h("div", { key: 'f6f7971515335c61aa3ef179aafc4936a3445b72', class: "betting-type" }, h("div", { key: 'ed535b79ad7db63ca771b063eb30c5d2b89942e5', class: "betting-type-title" }, translate$4('bettingType', this.language)), h("div", { key: 'f017fe599cf209fa9a55e691b5943188e6a708ec', class: "betting-type-text" }, h("div", { key: 'cc9db96d2def2c0de5aa9b1e8b2075adbf40f728', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
3990
+ }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && this.showCurrentDrawResult && (h("div", { key: '000d5fda83c1d4496428fc5570576c1a33d16366' }, h("div", { key: '896d3e013f27f8971ee4220f0d3853e696f69c4c', class: "betting-type" }, h("div", { key: 'ea6eae9c86f6cbfbaf2644a17bf009a78b50bdae', class: "betting-type-title" }, translate$4('bettingType', this.language)), h("div", { key: 'fa22c6c07946f12d6a52d498dbc5339b1e4eb795', class: "betting-type-text" }, h("div", { key: 'cc6199976821e84b112b5091fa617b40e09a62dc', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
3929
3991
  LotteryTippingTicketController__segment: true,
3930
3992
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
3931
- }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), 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 })))), h("div", { key: 'a64d5819bf8db8e46e419cf88ac92eaef61288b5', class: "pagination-wrap" }, 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 }))));
3993
+ }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), 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 })))), h("div", { key: '2a4e1557bb2644e9c41820d77fa77fb53212c263', class: "pagination-wrap" }, 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 }))));
3932
3994
  }
3933
3995
  static get watchers() { return {
3934
3996
  "clientStyling": ["handleClientStylingChange"],
@@ -3936,11 +3998,184 @@ const LotteryTippingTicketHistory = class {
3936
3998
  "mbSource": ["handleMbSourceChange"],
3937
3999
  "gameId": ["handleGameInfoChange"],
3938
4000
  "endpoint": ["handleGameInfoChange"],
3939
- "endpointTicket": ["handleTicketInfoChange"],
3940
4001
  "playerId": ["handleTicketInfoChange"],
3941
4002
  "sessionId": ["handleTicketInfoChange"]
3942
4003
  }; }
3943
4004
  };
3944
4005
  LotteryTippingTicketHistory.style = LotteryTippingTicketHistoryStyle0;
3945
4006
 
3946
- export { DrawSelection as draw_selection, GeneralMultiSelect as general_multi_select, GeneralTooltip as general_tooltip, LotteryButton as lottery_button, LotteryTippingBullet as lottery_tipping_bullet, LotteryTippingBulletGroup as lottery_tipping_bullet_group, LotteryTippingCalendar as lottery_tipping_calendar, LotteryTippingDialog as lottery_tipping_dialog, LotteryTippingFilter as lottery_tipping_filter, LotteryTippingLatestResult as lottery_tipping_latest_result, LotteryTippingPage as lottery_tipping_page, LotteryTippingPagination as lottery_tipping_pagination, lotteryTippingPanel as lottery_tipping_panel, LotteryTippingTicketBanner as lottery_tipping_ticket_banner, LotteryTippingTicketBet as lottery_tipping_ticket_bet, LotteryTippingTicketController as lottery_tipping_ticket_controller, LotteryTippingTicketHistory as lottery_tipping_ticket_history };
4007
+ 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)}}";
4008
+ const UiSkeletonStyle0 = uiSkeletonCss;
4009
+
4010
+ const UiSkeleton = class {
4011
+ constructor(hostRef) {
4012
+ registerInstance(this, hostRef);
4013
+ this.stylingValue = {
4014
+ width: this.handleStylingProps(this.width),
4015
+ height: this.handleStylingProps(this.height),
4016
+ borderRadius: this.handleStylingProps(this.borderRadius),
4017
+ marginBottom: this.handleStylingProps(this.marginBottom),
4018
+ marginTop: this.handleStylingProps(this.marginTop),
4019
+ marginLeft: this.handleStylingProps(this.marginLeft),
4020
+ marginRight: this.handleStylingProps(this.marginRight),
4021
+ size: this.handleStylingProps(this.size),
4022
+ };
4023
+ this.structure = undefined;
4024
+ this.width = 'unset';
4025
+ this.height = 'unset';
4026
+ this.borderRadius = 'unset';
4027
+ this.marginBottom = 'unset';
4028
+ this.marginTop = 'unset';
4029
+ this.marginLeft = 'unset';
4030
+ this.marginRight = 'unset';
4031
+ this.animation = true;
4032
+ this.rows = 0;
4033
+ this.size = '100%';
4034
+ }
4035
+ handleStructureChange(newValue, oldValue) {
4036
+ if (oldValue !== newValue) {
4037
+ this.handleStructure(newValue);
4038
+ }
4039
+ }
4040
+ handleStylingProps(value) {
4041
+ switch (typeof value) {
4042
+ case 'number':
4043
+ return value === 0 ? 0 : `${value}px`;
4044
+ case 'undefined':
4045
+ return 'unset';
4046
+ case 'string':
4047
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
4048
+ value.endsWith('px') ||
4049
+ value.endsWith('%')) {
4050
+ return value;
4051
+ }
4052
+ else {
4053
+ return 'unset';
4054
+ }
4055
+ default:
4056
+ return 'unset';
4057
+ }
4058
+ }
4059
+ handleStructure(structure) {
4060
+ switch (structure) {
4061
+ case 'logo':
4062
+ return this.renderLogo();
4063
+ case 'image':
4064
+ return this.renderImage();
4065
+ case 'title':
4066
+ return this.renderTitle();
4067
+ case 'text':
4068
+ return this.renderText();
4069
+ case 'rectangle':
4070
+ return this.renderRectangle();
4071
+ case 'circle':
4072
+ return this.renderCircle();
4073
+ default:
4074
+ return null;
4075
+ }
4076
+ }
4077
+ renderLogo() {
4078
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
4079
+ }
4080
+ renderImage() {
4081
+ return h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
4082
+ }
4083
+ renderTitle() {
4084
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
4085
+ }
4086
+ renderText() {
4087
+ return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
4088
+ }
4089
+ renderRectangle() {
4090
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
4091
+ }
4092
+ renderCircle() {
4093
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
4094
+ }
4095
+ render() {
4096
+ let styleBlock = '';
4097
+ switch (this.structure) {
4098
+ case 'logo':
4099
+ styleBlock = `
4100
+ :host {
4101
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
4102
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
4103
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
4104
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
4105
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
4106
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
4107
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
4108
+ }
4109
+ `;
4110
+ break;
4111
+ case 'image':
4112
+ styleBlock = `
4113
+ :host {
4114
+ --emw-skeleton-image-width: ${this.stylingValue.width};
4115
+ --emw-skeleton-image-height: ${this.stylingValue.height};
4116
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
4117
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
4118
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
4119
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
4120
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
4121
+ }
4122
+ `;
4123
+ break;
4124
+ case 'title':
4125
+ styleBlock = `
4126
+ :host {
4127
+ --emw-skeleton-title-width: ${this.stylingValue.width};
4128
+ --emw-skeleton-title-height: ${this.stylingValue.height};
4129
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
4130
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
4131
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
4132
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
4133
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
4134
+ }
4135
+ `;
4136
+ break;
4137
+ case 'text':
4138
+ styleBlock = `
4139
+ :host {
4140
+ --emw-skeleton-text-width: ${this.stylingValue.width};
4141
+ --emw-skeleton-text-height: ${this.stylingValue.height};
4142
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
4143
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
4144
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
4145
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
4146
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
4147
+ }
4148
+ `;
4149
+ break;
4150
+ case 'rectangle':
4151
+ styleBlock = `
4152
+ :host {
4153
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
4154
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
4155
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
4156
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
4157
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
4158
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
4159
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
4160
+ }
4161
+ `;
4162
+ break;
4163
+ case 'circle':
4164
+ styleBlock = `
4165
+ :host {
4166
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
4167
+ }
4168
+ `;
4169
+ break;
4170
+ default:
4171
+ styleBlock = '';
4172
+ }
4173
+ return (h(Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
4174
+ }
4175
+ static get watchers() { return {
4176
+ "structure": ["handleStructureChange"]
4177
+ }; }
4178
+ };
4179
+ UiSkeleton.style = UiSkeletonStyle0;
4180
+
4181
+ export { DrawSelection as draw_selection, GeneralMultiSelect as general_multi_select, GeneralTooltip as general_tooltip, LotteryButton as lottery_button, LotteryTippingBullet as lottery_tipping_bullet, LotteryTippingBulletGroup as lottery_tipping_bullet_group, LotteryTippingCalendar as lottery_tipping_calendar, LotteryTippingDialog as lottery_tipping_dialog, LotteryTippingFilter as lottery_tipping_filter, LotteryTippingLatestResult as lottery_tipping_latest_result, LotteryTippingPage as lottery_tipping_page, LotteryTippingPagination as lottery_tipping_pagination, lotteryTippingPanel as lottery_tipping_panel, LotteryTippingTicketBanner as lottery_tipping_ticket_banner, LotteryTippingTicketBet as lottery_tipping_ticket_bet, LotteryTippingTicketController as lottery_tipping_ticket_controller, LotteryTippingTicketHistory as lottery_tipping_ticket_history, UiSkeleton as ui_skeleton };