@everymatrix/lottery-oddsbom-ticket-result 0.7.25 → 0.7.27

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryOddsbomTicketResult = require('./lottery-oddsbom-ticket-result-c45be7fd.js');
5
+ const lotteryOddsbomTicketResult = require('./lottery-oddsbom-ticket-result-6e816eae.js');
6
6
  require('./index-2be14604.js');
7
7
 
8
8
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2be14604.js');
6
- const lotteryOddsbomTicketResult = require('./lottery-oddsbom-ticket-result-c45be7fd.js');
6
+ const lotteryOddsbomTicketResult = require('./lottery-oddsbom-ticket-result-6e816eae.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var DeleteFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z" } }] }, "name": "delete", "theme": "filled" };
@@ -91,13 +91,13 @@ const LotteryOddsbomBullet = class {
91
91
  }
92
92
  handleMbSourceChange(newValue, oldValue) {
93
93
  if (newValue != oldValue) {
94
- lotteryOddsbomTicketResult.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
94
+ lotteryOddsbomTicketResult.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
95
95
  }
96
96
  }
97
97
  componentDidLoad() {
98
98
  if (this.stylingContainer) {
99
99
  if (this.mbSource)
100
- lotteryOddsbomTicketResult.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
100
+ lotteryOddsbomTicketResult.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
101
101
  if (this.clientStyling)
102
102
  lotteryOddsbomTicketResult.setClientStyling(this.stylingContainer, this.clientStyling);
103
103
  if (this.clientStylingUrl)
@@ -2,6 +2,8 @@
2
2
 
3
3
  const index = require('./index-2be14604.js');
4
4
 
5
+ const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
6
+
5
7
  /**
6
8
  * @name setClientStyling
7
9
  * @description Method used to create and append to the passed element of the widget a style element with the content received
@@ -47,18 +49,75 @@ function setClientStylingURL(stylingContainer, clientStylingUrl) {
47
49
  * @param {HTMLElement} stylingContainer The highest element of the widget
48
50
  * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
49
51
  * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
52
+ * @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
50
53
  */
51
- function setStreamStyling(stylingContainer, domain, subscription) {
52
- if (window.emMessageBus) {
53
- const sheet = document.createElement('style');
54
+ function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
55
+ if (!window.emMessageBus) return;
54
56
 
55
- window.emMessageBus.subscribe(domain, (data) => {
56
- sheet.innerHTML = data;
57
- if (stylingContainer) {
58
- stylingContainer.appendChild(sheet);
59
- }
60
- });
57
+ const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
58
+
59
+ if (!supportAdoptStyle || !useAdoptedStyleSheets) {
60
+ subscription = getStyleTagSubscription(stylingContainer, domain);
61
+
62
+ return subscription;
63
+ }
64
+
65
+ if (!window[StyleCacheKey]) {
66
+ window[StyleCacheKey] = {};
61
67
  }
68
+ subscription = getAdoptStyleSubscription(stylingContainer, domain);
69
+
70
+ const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
71
+ const wrappedUnsubscribe = () => {
72
+ if (window[StyleCacheKey][domain]) {
73
+ const cachedObject = window[StyleCacheKey][domain];
74
+ cachedObject.refCount > 1
75
+ ? (cachedObject.refCount = cachedObject.refCount - 1)
76
+ : delete window[StyleCacheKey][domain];
77
+ }
78
+
79
+ originalUnsubscribe();
80
+ };
81
+ subscription.unsubscribe = wrappedUnsubscribe;
82
+
83
+ return subscription;
84
+ }
85
+
86
+ function getStyleTagSubscription(stylingContainer, domain) {
87
+ const sheet = document.createElement('style');
88
+
89
+ return window.emMessageBus.subscribe(domain, (data) => {
90
+ if (stylingContainer) {
91
+ sheet.innerHTML = data;
92
+ stylingContainer.appendChild(sheet);
93
+ }
94
+ });
95
+ }
96
+
97
+ function getAdoptStyleSubscription(stylingContainer, domain) {
98
+ return window.emMessageBus.subscribe(domain, (data) => {
99
+ if (!stylingContainer) return;
100
+
101
+ const shadowRoot = stylingContainer.getRootNode();
102
+ const cacheStyleObject = window[StyleCacheKey];
103
+ let cachedStyle = cacheStyleObject[domain]?.sheet;
104
+
105
+ if (!cachedStyle) {
106
+ cachedStyle = new CSSStyleSheet();
107
+ cachedStyle.replaceSync(data);
108
+ cacheStyleObject[domain] = {
109
+ sheet: cachedStyle,
110
+ refCount: 1
111
+ };
112
+ } else {
113
+ cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
114
+ }
115
+
116
+ const currentSheets = shadowRoot.adoptedStyleSheets || [];
117
+ if (!currentSheets.includes(cachedStyle)) {
118
+ shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
119
+ }
120
+ });
62
121
  }
63
122
 
64
123
  function _typeof(o) {
@@ -2807,13 +2866,13 @@ const LotteryOddsbomTicketResult = class {
2807
2866
  }
2808
2867
  handleMbSourceChange(newValue, oldValue) {
2809
2868
  if (newValue !== oldValue) {
2810
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
2869
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
2811
2870
  }
2812
2871
  }
2813
2872
  componentDidLoad() {
2814
2873
  if (this.stylingContainer) {
2815
2874
  if (this.mbSource)
2816
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
2875
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
2817
2876
  if (this.clientStyling)
2818
2877
  setClientStyling(this.stylingContainer, this.clientStyling);
2819
2878
  if (this.clientStylingUrl)
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryOddsbomTicketResult } from './lottery-oddsbom-ticket-result-f2597018.js';
1
+ export { L as LotteryOddsbomTicketResult } from './lottery-oddsbom-ticket-result-fc033b1b.js';
2
2
  import './index-3d5460b3.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-3d5460b3.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-ticket-result-f2597018.js';
3
- export { L as lottery_oddsbom_ticket_result } from './lottery-oddsbom-ticket-result-f2597018.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-ticket-result-fc033b1b.js';
3
+ export { L as lottery_oddsbom_ticket_result } from './lottery-oddsbom-ticket-result-fc033b1b.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var DeleteFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z" } }] }, "name": "delete", "theme": "filled" };
@@ -88,13 +88,13 @@ const LotteryOddsbomBullet = class {
88
88
  }
89
89
  handleMbSourceChange(newValue, oldValue) {
90
90
  if (newValue != oldValue) {
91
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
91
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
92
92
  }
93
93
  }
94
94
  componentDidLoad() {
95
95
  if (this.stylingContainer) {
96
96
  if (this.mbSource)
97
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
97
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
98
98
  if (this.clientStyling)
99
99
  setClientStyling(this.stylingContainer, this.clientStyling);
100
100
  if (this.clientStylingUrl)
@@ -1,5 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-3d5460b3.js';
2
2
 
3
+ const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
4
+
3
5
  /**
4
6
  * @name setClientStyling
5
7
  * @description Method used to create and append to the passed element of the widget a style element with the content received
@@ -45,18 +47,75 @@ function setClientStylingURL(stylingContainer, clientStylingUrl) {
45
47
  * @param {HTMLElement} stylingContainer The highest element of the widget
46
48
  * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
47
49
  * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
50
+ * @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
48
51
  */
49
- function setStreamStyling(stylingContainer, domain, subscription) {
50
- if (window.emMessageBus) {
51
- const sheet = document.createElement('style');
52
+ function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
53
+ if (!window.emMessageBus) return;
52
54
 
53
- window.emMessageBus.subscribe(domain, (data) => {
54
- sheet.innerHTML = data;
55
- if (stylingContainer) {
56
- stylingContainer.appendChild(sheet);
57
- }
58
- });
55
+ const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
56
+
57
+ if (!supportAdoptStyle || !useAdoptedStyleSheets) {
58
+ subscription = getStyleTagSubscription(stylingContainer, domain);
59
+
60
+ return subscription;
61
+ }
62
+
63
+ if (!window[StyleCacheKey]) {
64
+ window[StyleCacheKey] = {};
59
65
  }
66
+ subscription = getAdoptStyleSubscription(stylingContainer, domain);
67
+
68
+ const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
69
+ const wrappedUnsubscribe = () => {
70
+ if (window[StyleCacheKey][domain]) {
71
+ const cachedObject = window[StyleCacheKey][domain];
72
+ cachedObject.refCount > 1
73
+ ? (cachedObject.refCount = cachedObject.refCount - 1)
74
+ : delete window[StyleCacheKey][domain];
75
+ }
76
+
77
+ originalUnsubscribe();
78
+ };
79
+ subscription.unsubscribe = wrappedUnsubscribe;
80
+
81
+ return subscription;
82
+ }
83
+
84
+ function getStyleTagSubscription(stylingContainer, domain) {
85
+ const sheet = document.createElement('style');
86
+
87
+ return window.emMessageBus.subscribe(domain, (data) => {
88
+ if (stylingContainer) {
89
+ sheet.innerHTML = data;
90
+ stylingContainer.appendChild(sheet);
91
+ }
92
+ });
93
+ }
94
+
95
+ function getAdoptStyleSubscription(stylingContainer, domain) {
96
+ return window.emMessageBus.subscribe(domain, (data) => {
97
+ if (!stylingContainer) return;
98
+
99
+ const shadowRoot = stylingContainer.getRootNode();
100
+ const cacheStyleObject = window[StyleCacheKey];
101
+ let cachedStyle = cacheStyleObject[domain]?.sheet;
102
+
103
+ if (!cachedStyle) {
104
+ cachedStyle = new CSSStyleSheet();
105
+ cachedStyle.replaceSync(data);
106
+ cacheStyleObject[domain] = {
107
+ sheet: cachedStyle,
108
+ refCount: 1
109
+ };
110
+ } else {
111
+ cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
112
+ }
113
+
114
+ const currentSheets = shadowRoot.adoptedStyleSheets || [];
115
+ if (!currentSheets.includes(cachedStyle)) {
116
+ shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
117
+ }
118
+ });
60
119
  }
61
120
 
62
121
  function _typeof(o) {
@@ -2805,13 +2864,13 @@ const LotteryOddsbomTicketResult = class {
2805
2864
  }
2806
2865
  handleMbSourceChange(newValue, oldValue) {
2807
2866
  if (newValue !== oldValue) {
2808
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
2867
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
2809
2868
  }
2810
2869
  }
2811
2870
  componentDidLoad() {
2812
2871
  if (this.stylingContainer) {
2813
2872
  if (this.mbSource)
2814
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
2873
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
2815
2874
  if (this.clientStyling)
2816
2875
  setClientStyling(this.stylingContainer, this.clientStyling);
2817
2876
  if (this.clientStylingUrl)
@@ -1 +1 @@
1
- export{L as LotteryOddsbomTicketResult}from"./lottery-oddsbom-ticket-result-f2597018.js";import"./index-3d5460b3.js";
1
+ export{L as LotteryOddsbomTicketResult}from"./lottery-oddsbom-ticket-result-fc033b1b.js";import"./index-3d5460b3.js";
@@ -1 +1 @@
1
- import{r as t,c as e,h as o}from"./index-3d5460b3.js";import{s as l,a as s,b as d}from"./lottery-oddsbom-ticket-result-f2597018.js";export{L as lottery_oddsbom_ticket_result}from"./lottery-oddsbom-ticket-result-f2597018.js";var r=function(){return r=Object.assign||function(t){for(var e,o=1,l=arguments.length;o<l;o++)for(var s in e=arguments[o])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},r.apply(this,arguments)},i={primaryColor:"#333",secondaryColor:"#E6E6E6"};function n(t,e){var o="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,l=Object.keys(o).reduce((function(t,e){var l=o[e],s="".concat(e,'="').concat(l,'"');return t.push(s),t}),[]),s=l.length?" "+l.join(" "):"",d=(t.children||[]).map((function(t){return n(t,e)})).join("");return d&&d.length?"<".concat(t.tag).concat(s,">").concat(d,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const a=function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||i;return n(t.icon(o.primaryColor,o.secondaryColor),e)}return n(t.icon,e)}({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),h=class{constructor(o){t(this,o),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return o("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},o("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},o("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:a}),o("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";export{h as lottery_oddsbom_bullet}
1
+ import{r as t,c as e,h as o}from"./index-3d5460b3.js";import{s as l,a as s,b as d}from"./lottery-oddsbom-ticket-result-fc033b1b.js";export{L as lottery_oddsbom_ticket_result}from"./lottery-oddsbom-ticket-result-fc033b1b.js";var r=function(){return r=Object.assign||function(t){for(var e,o=1,l=arguments.length;o<l;o++)for(var s in e=arguments[o])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},r.apply(this,arguments)},i={primaryColor:"#333",secondaryColor:"#E6E6E6"};function n(t,e){var o="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,l=Object.keys(o).reduce((function(t,e){var l=o[e],s="".concat(e,'="').concat(l,'"');return t.push(s),t}),[]),s=l.length?" "+l.join(" "):"",d=(t.children||[]).map((function(t){return n(t,e)})).join("");return d&&d.length?"<".concat(t.tag).concat(s,">").concat(d,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const a=function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||i;return n(t.icon(o.primaryColor,o.secondaryColor),e)}return n(t.icon,e)}({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),h=class{constructor(o){t(this,o),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return o("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},o("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},o("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:a}),o("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";export{h as lottery_oddsbom_bullet}
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./index-3d5460b3.js";const n="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function i(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e,r,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return r=function(t,e){const n=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(n.innerHTML=e,t.appendChild(n))}))}(t,e),r;window[n]||(window[n]={}),r=function(t,e){return window.emMessageBus.subscribe(e,(r=>{if(!t)return;const i=t.getRootNode(),a=window[n];let o=a[e]?.sheet;o?a[e].refCount=a[e].refCount+1:(o=new CSSStyleSheet,o.replaceSync(r),a[e]={sheet:o,refCount:1});const u=i.adoptedStyleSheets||[];u.includes(o)||(i.adoptedStyleSheets=[...u,o])}))}(t,e);const a=r.unsubscribe.bind(r);return r.unsubscribe=()=>{if(window[n][e]){const t=window[n][e];t.refCount>1?t.refCount=t.refCount-1:delete window[n][e]}a()},r}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function u(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function d(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function s(t){d(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===o(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var c={};function l(){return c}var h=36e5;function m(t){d(1,arguments);var e=s(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function f(t){d(1,arguments);var e=s(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=m(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=m(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function w(t,e){var n,r,i,a,o,c,h,m;d(1,arguments);var f=l(),w=u(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(c=o.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==i?i:f.weekStartsOn)&&void 0!==r?r:null===(h=f.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.weekStartsOn)&&void 0!==n?n:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=s(t),g=v.getUTCDay(),p=(g<w?7:0)+g-w;return v.setUTCDate(v.getUTCDate()-p),v.setUTCHours(0,0,0,0),v}function v(t,e){var n,r,i,a,o,c,h,m;d(1,arguments);var f=s(t),v=f.getUTCFullYear(),g=l(),p=u(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(c=o.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:g.firstWeekContainsDate)&&void 0!==r?r:null===(h=g.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(v+1,0,p),y.setUTCHours(0,0,0,0);var b=w(y,e),x=new Date(0);x.setUTCFullYear(v,0,p),x.setUTCHours(0,0,0,0);var D=w(x,e);return f.getTime()>=b.getTime()?v+1:f.getTime()>=D.getTime()?v:v-1}function g(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}const p=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return g("yy"===e?r%100:r,e.length)},y=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):g(n+1,2)},b=function(t,e){return g(t.getUTCDate(),e.length)},x=function(t,e){return g(t.getUTCHours()%12||12,e.length)},D=function(t,e){return g(t.getUTCHours(),e.length)},k=function(t,e){return g(t.getUTCMinutes(),e.length)},M=function(t,e){return g(t.getUTCSeconds(),e.length)},T=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return g(Math.floor(r*Math.pow(10,n-3)),e.length)};var S={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return p(t,e)},Y:function(t,e,n,r){var i=v(t,r),a=i>0?i:1-i;return"YY"===e?g(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):g(a,e.length)},R:function(t,e){return g(f(t),e.length)},u:function(t,e){return g(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return g(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return g(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return y(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return g(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){d(1,arguments);var n=s(t),r=w(n,e).getTime()-function(t,e){var n,r,i,a,o,s,c,h;d(1,arguments);var m=l(),f=u(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:m.firstWeekContainsDate)&&void 0!==r?r:null===(c=m.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1),g=v(t,e),p=new Date(0);return p.setUTCFullYear(g,0,f),p.setUTCHours(0,0,0,0),w(p,e)}(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):g(i,e.length)},I:function(t,e,n){var r=function(t){d(1,arguments);var e=s(t),n=m(e).getTime()-function(t){d(1,arguments);var e=f(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),m(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):g(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):b(t,e)},D:function(t,e,n){var r=function(t){d(1,arguments);var e=s(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((n-r)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):g(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return g(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return g(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return g(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return x(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):D(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):g(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):g(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):M(t,e)},S:function(t,e){return T(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return E(i);case"XXXX":case"XX":return I(i);default:return I(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return E(i);case"xxxx":case"xx":return I(i);default:return I(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+N(i,":");default:return"GMT"+I(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+N(i,":");default:return"GMT"+I(i,":")}},t:function(t,e,n,r){return g(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return g((r._originalDate||t).getTime(),e.length)}};function N(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+g(a,2)}function E(t,e){return t%60==0?(t>0?"-":"+")+g(Math.abs(t)/60,2):I(t,e)}function I(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+g(Math.floor(i/60),2)+n+g(i%60,2)}const P=S;var j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},R=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},_={p:R,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return j(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",j(i,e)).replace("{{time}}",R(a,e))}};const C=_;var z=["D","DD"],A=["YY","YYYY"];function L(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function W(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var B,Y={date:W({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:W({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:W({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function H(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=t.formattingValues[a]||t.formattingValues[i]}else{var o=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function G(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var a,o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(u)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(u):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(u);return a=t.valueCallback?t.valueCallback(d):d,{value:a=n.valueCallback?n.valueCallback(a):a,rest:e.slice(o.length)}}}const Q={code:"en-US",formatDistance:function(t,e,n){var r,i=O[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Y,formatRelative:function(t){return q[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:H({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:H({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:H({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:H({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:H({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(B={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(B.matchPattern);if(!n)return null;var r=n[0],i=t.match(B.parsePattern);if(!i)return null;var a=B.valueCallback?B.valueCallback(i[0]):i[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(r.length)}}),era:G({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:G({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:G({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:G({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:G({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,F=/^'([^]*?)'?$/,U=/''/g,J=/[a-zA-Z]/;function V(t,e,n){var r,i,a,c,h,m,f,w,v,g,p,y,b,x,D,k,M,T;d(2,arguments);var S=String(e),N=l(),E=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:N.locale)&&void 0!==r?r:Q,I=u(null!==(a=null!==(c=null!==(h=null!==(m=null==n?void 0:n.firstWeekContainsDate)&&void 0!==m?m:null==n||null===(f=n.locale)||void 0===f||null===(w=f.options)||void 0===w?void 0:w.firstWeekContainsDate)&&void 0!==h?h:N.firstWeekContainsDate)&&void 0!==c?c:null===(v=N.locale)||void 0===v||null===(g=v.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==a?a:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=u(null!==(p=null!==(y=null!==(b=null!==(x=null==n?void 0:n.weekStartsOn)&&void 0!==x?x:null==n||null===(D=n.locale)||void 0===D||null===(k=D.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==b?b:N.weekStartsOn)&&void 0!==y?y:null===(M=N.locale)||void 0===M||null===(T=M.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==p?p:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var R=s(t);if(!function(t){if(d(1,arguments),!function(t){return d(1,arguments),t instanceof Date||"object"===o(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=s(t);return!isNaN(Number(e))}(R))throw new RangeError("Invalid time value");var _=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(R),O=function(t,e){return d(2,arguments),function(t,e){d(2,arguments);var n=s(t).getTime(),r=u(e);return new Date(n+r)}(t,-u(e))}(R,_),W={firstWeekContainsDate:I,weekStartsOn:j,locale:E,_originalDate:R};return S.match($).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,C[e])(t,E.formatLong):t})).join("").match(X).map((function(r){if("''"===r)return"'";var i,a,o=r[0];if("'"===o)return(a=(i=r).match(F))?a[1].replace(U,"'"):i;var u=P[o];if(u)return null!=n&&n.useAdditionalWeekYearTokens||-1===A.indexOf(r)||L(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==z.indexOf(r))||L(r,e,String(t)),u(O,r,E.localize,W);if(o.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}var Z={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},K=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,et=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nt(t){return t?parseInt(t):1}function rt(t){return t&&parseFloat(t.replace(",","."))||0}var it=[31,null,31,30,31,30,31,31,30,31,30,31];function at(t){return t%400==0||t%4==0&&t%100!=0}async function ot({endpoint:t,gameId:e,drawId:n,results:r,splitView:i=!1}){const a=await async function({endpoint:t,gameId:e,drawId:n}){try{return await function(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o=Object.assign({"Content-Type":"application/json"},r),u={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?u.body=JSON.stringify(n):delete u.body,fetch(t,u).then((t=>t.ok?t.json():t.json().then((e=>{a({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>a({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>i(t)),(t=>a(t)))}))}(`${t}/poolgames/${e}/draws/${n}/matchConfig`)||[]}catch(t){console.log(t)}}({endpoint:t,gameId:e,drawId:n});return i?a.reduce(((t,e,n)=>{const[i,a]=(o=e.eventName)?o.split("vs").map((t=>t.trim())):"";var o;const[u,d]=function(t){const e=new Set,n=new Set;for(const r of t){const[t,i]=r.split(":");e.has(t)||e.add(t),n.has(t)||n.add(i)}return[Array.from(e),Array.from(n)]}(r[n]||[]);return null==t||t.push({index:n+1,teamName:i,startTime:e.startTime,results:u}),null==t||t.push({index:n+1,teamName:a,startTime:e.startTime,results:d}),t}),[])||[]:a.map(((t,e)=>({index:e+1,eventName:t.eventName,startTime:t.startTime,results:r[e]||[]})))}const ut=["ro","en","fr","ar","hr"],dt={en:{filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{ticketsHistory:"Istoric bilete",settled:"Decontat",purchased:"Achiziționat",canceled:"Anulat",noData:"Nu sunt date disponibile.",ticketId:"ID bilet:",ticketType:"Tip bilet:",ticketAmount:"Suma biletului:",lineDetail:"Detaliu linie:",seeDetails:"Vezi detalii",numberOfDraw:"Număr de extrageri:",ticketResult:"Rezultat bilet:",drawId:"ID extragere:",drawDate:"Data extragerii:",result:"Rezultat:",prize:"Premiu:",bettingType:"Tip de pariu:"},fr:{ticketsHistory:"Historique des billets",settled:"Réglé",purchased:"Acheté",canceled:"Annulé",noData:"Aucune donnée disponible.",ticketId:"ID du billet:",ticketType:"Type de billet:",ticketAmount:"Montant du billet:",lineDetail:"Détail de la ligne:",seeDetails:"Voir les détails",numberOfDraw:"Nombre de tirages:",ticketResult:"Résultat du billet:",drawId:"ID du tirage:",drawDate:"Date du tirage:",result:"Résultat:",prize:"Prix:",bettingType:"Type de pari:"},ar:{ticketsHistory:"سجل التذاكر",settled:"تمت التسوية",purchased:"تم شراؤها",canceled:"تم الإلغاء",noData:"لا توجد بيانات متاحة.",ticketId:"معرف التذكرة:",ticketType:"نوع التذكرة:",ticketAmount:"مبلغ التذكرة:",lineDetail:"تفاصيل الخط:",seeDetails:"انظر التفاصيل",numberOfDraw:"عدد السحوبات:",ticketResult:"نتيجة التذكرة:",drawId:"معرف السحب:",drawDate:"تاريخ السحب:",result:"النتيجة:",prize:"الجائزة:",bettingType:"نوع الرهان:"},hr:{ticketsHistory:"Povijest listića",settled:"Riješeno",purchased:"Kupljeno",canceled:"Otkazano",noData:"Nema dostupnih podataka.",ticketId:"ID listića:",ticketType:"Vrsta listića:",ticketAmount:"Iznos listića:",lineDetail:"Detalji linije:",seeDetails:"Vidi detalje",numberOfDraw:"Broj izvlačenja:",ticketResult:"Rezultat listića:",drawId:"ID izvlačenja:",drawDate:"Datum izvlačenja:",result:"Rezultat:",prize:"Nagrada:",bettingType:"Vrsta oklade:"}},st=class{constructor(e){t(this,e),this.latestRequestId=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.defaultResults=void 0,this.splitView=!1,this.allResults=void 0,this.ticketBetDataSource=[],this.isLoading=!1}handleClientStylingChange(t,e){t!==e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&i(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])dt[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.fetchMatchData()}async fetchMatchData(){const t=++this.latestRequestId;if(this.gameId&&this.drawId)try{this.defaultResults&&(this.allResults=JSON.parse(this.defaultResults)),this.isLoading=!0;const e=await ot({endpoint:this.endpoint,gameId:this.gameId,drawId:this.drawId,results:this.allResults||[[]],splitView:this.splitView});t===this.latestRequestId&&(this.ticketBetDataSource=e)}finally{t===this.latestRequestId&&(this.isLoading=!1)}}get columns(){const t=(t,e)=>(({date:t,type:e="date",format:n})=>{try{const r=function(t,e){var n;d(1,arguments);var r=u(null!==(n=null==e?void 0:e.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var i,a=function(t){var e,n={},r=t.split(Z.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?e=r[0]:(n.date=r[0],e=r[1],Z.timeZoneDelimiter.test(n.date)&&(n.date=t.split(Z.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var i=Z.timezone.exec(e);i?(n.time=e.replace(i[1],""),n.timezone=i[1]):n.time=e}return n}(t);if(a.date){var o=function(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(a.date,r);i=function(t,e){if(null===e)return new Date(NaN);var n=t.match(K);if(!n)return new Date(NaN);var r=!!n[4],i=nt(n[1]),a=nt(n[2])-1,o=nt(n[3]),u=nt(n[4]),d=nt(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,u,d)?function(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=7*(e-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(e,u,d):new Date(NaN);var s=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(it[e]||(at(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(at(t)?366:365)}(e,i)?(s.setUTCFullYear(e,a,Math.max(i,o)),s):new Date(NaN)}(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s,c=i.getTime(),l=0;if(a.time&&(l=function(t){var e=t.match(tt);if(!e)return NaN;var n=rt(e[1]),r=rt(e[2]),i=rt(e[3]);return function(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,i)?n*h+6e4*r+1e3*i:NaN}(a.time),isNaN(l)))return new Date(NaN);if(!a.timezone){var m=new Date(c+l),f=new Date(0);return f.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),f.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),f}return s=function(t){if("Z"===t)return 0;var e=t.match(et);if(!e)return 0;var n="+"===e[1]?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,i)?n*(r*h+6e4*i):NaN}(a.timezone),isNaN(s)?new Date(NaN):new Date(c+l+s)}(t);if(isNaN(r.getTime()))throw new Error(`Invalid date: ${t}`);if(n)return V(r,n);let i="dd/MM/yyyy";return"time"===e?i="dd/MM/yyyy HH:mm:ss":"week"===e&&(i="ccc dd/MM/yyyy HH:mm:ss"),V(r,i)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc dd/MM HH:mm"});return this.splitView?[{title:"No.",value:"index",width:5,rowSpan:2},{title:"Date",value:"startTime",width:25,rowSpan:2,nowrap:!0,render:t},{title:"Team",value:"teamName",width:30},{title:"Scores",value:"results",width:45,render:(t,n)=>e("div",{class:"flex gap-1"},n.map((t=>e("lottery-oddsbom-bullet",{text:t,"is-reading":!0,"is-selected":!0}))))}]:[{title:"Match",value:"eventName",width:50,render:(t,n)=>e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},n))},{title:"Date",value:"startTime",width:25,nowrap:!0,render:t},{title:"Match Result",value:"results",width:25,render:(t,n)=>e("div",null,null==n?void 0:n[0])}]}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}renderEmpty(){return e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,(()=>{const t=this.language;let e=dt[void 0!==t&&ut.includes(t)?t:"en"].noData;return e})()))}renderTable({columns:t,dataSource:n,hideHead:r=!1,grid:i=!0,bordered:a=!0}){const o={};return e("table",{class:{bordered:a,grid:i,"my-table-component":!0}},!r&&e("thead",null,e("tr",null,t.map((t=>{var n;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(n=t.title)||void 0===n?void 0:n.call(t))})))),e("tbody",null,n.map(((n,r)=>e("tr",{key:r},t.map((t=>{if(o[t.value]&&o[t.value]>0)return o[t.value]--,null;const i=t.rowSpan;return i&&i>1&&(o[t.value]=i-1),e("td",{key:t.value,rowSpan:i,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(n,n[t.value],r):n[t.value])})))))))}renderContent(){return this.isLoading?this.renderLoading():this.ticketBetDataSource&&0!==this.ticketBetDataSource.length?e("div",{class:"flex align-center LotteryTippingTicketBet__main"},this.renderTable({columns:this.columns,dataSource:this.ticketBetDataSource||[],hideHead:!1,grid:!1,bordered:!1})):this.renderEmpty()}render(){return e("div",{key:"9932926b2958b13636d617cc20a0c77a76a36ebe",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},this.renderContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],drawId:["fetchMatchData"],defaultResults:["fetchMatchData"]}}};st.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";export{st as L,i as a,a as b,r as s}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-oddsbom-ticket-result",
3
- "version": "0.7.25",
3
+ "version": "0.7.27",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./index-3d5460b3.js";function n(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function r(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{n.innerHTML=e,t&&t.appendChild(n)}))}}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function u(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function d(t){u(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===i(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var s={};function c(){return s}var l=36e5;function h(t){u(1,arguments);var e=d(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function m(t){u(1,arguments);var e=d(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=h(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var o=h(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function f(t,e){var n,r,a,i,s,l,h,m;u(1,arguments);var f=c(),w=o(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.weekStartsOn)&&void 0!==i?i:null==e||null===(s=e.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==a?a:f.weekStartsOn)&&void 0!==r?r:null===(h=f.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.weekStartsOn)&&void 0!==n?n:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=d(t),g=v.getUTCDay(),p=(g<w?7:0)+g-w;return v.setUTCDate(v.getUTCDate()-p),v.setUTCHours(0,0,0,0),v}function w(t,e){var n,r,a,i,s,l,h,m;u(1,arguments);var w=d(t),v=w.getUTCFullYear(),g=c(),p=o(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(s=e.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==a?a:g.firstWeekContainsDate)&&void 0!==r?r:null===(h=g.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(v+1,0,p),y.setUTCHours(0,0,0,0);var b=f(y,e),x=new Date(0);x.setUTCFullYear(v,0,p),x.setUTCHours(0,0,0,0);var D=f(x,e);return w.getTime()>=b.getTime()?v+1:w.getTime()>=D.getTime()?v:v-1}function v(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}const g=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return v("yy"===e?r%100:r,e.length)},p=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):v(n+1,2)},y=function(t,e){return v(t.getUTCDate(),e.length)},b=function(t,e){return v(t.getUTCHours()%12||12,e.length)},x=function(t,e){return v(t.getUTCHours(),e.length)},D=function(t,e){return v(t.getUTCMinutes(),e.length)},k=function(t,e){return v(t.getUTCSeconds(),e.length)},M=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return v(Math.floor(r*Math.pow(10,n-3)),e.length)};var T={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return g(t,e)},Y:function(t,e,n,r){var a=w(t,r),i=a>0?a:1-a;return"YY"===e?v(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):v(i,e.length)},R:function(t,e){return v(m(t),e.length)},u:function(t,e){return v(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return v(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return v(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return p(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return v(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=function(t,e){u(1,arguments);var n=d(t),r=f(n,e).getTime()-function(t,e){var n,r,a,i,d,s,l,h;u(1,arguments);var m=c(),v=o(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(d=e.locale)||void 0===d||null===(s=d.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:m.firstWeekContainsDate)&&void 0!==r?r:null===(l=m.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1),g=w(t,e),p=new Date(0);return p.setUTCFullYear(g,0,v),p.setUTCHours(0,0,0,0),f(p,e)}(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):v(a,e.length)},I:function(t,e,n){var r=function(t){u(1,arguments);var e=d(t),n=h(e).getTime()-function(t){u(1,arguments);var e=m(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),h(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):v(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):y(t,e)},D:function(t,e,n){var r=function(t){u(1,arguments);var e=d(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((n-r)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):v(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return v(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return v(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return v(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return b(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):x(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):v(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):v(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):D(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):k(t,e)},S:function(t,e){return M(t,e)},X:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return N(a);case"XXXX":case"XX":return E(a);default:return E(a,":")}},x:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return N(a);case"xxxx":case"xx":return E(a);default:return E(a,":")}},O:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+S(a,":");default:return"GMT"+E(a,":")}},z:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+S(a,":");default:return"GMT"+E(a,":")}},t:function(t,e,n,r){return v(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return v((r._originalDate||t).getTime(),e.length)}};function S(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=e||"";return n+String(a)+o+v(i,2)}function N(t,e){return t%60==0?(t>0?"-":"+")+v(Math.abs(t)/60,2):E(t,e)}function E(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t);return r+v(Math.floor(a/60),2)+n+v(a%60,2)}const P=T;var I=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},j=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},R={p:j,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return I(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",I(a,e)).replace("{{time}}",j(i,e))}};const z=R;var _=["D","DD"],A=["YY","YYYY"];function C(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function W(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var L,B={date:W({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:W({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:W({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Y={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function q(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,i=null!=n&&n.width?String(n.width):a;r=t.formattingValues[i]||t.formattingValues[a]}else{var o=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function H(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!a)return null;var i,o=a[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(u)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(u):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(u);return i=t.valueCallback?t.valueCallback(d):d,{value:i=n.valueCallback?n.valueCallback(i):i,rest:e.slice(o.length)}}}const G={code:"en-US",formatDistance:function(t,e,n){var r,a=O[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:B,formatRelative:function(t){return Y[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:q({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:q({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:q({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:q({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:q({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(L={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(L.matchPattern);if(!n)return null;var r=n[0],a=t.match(L.parsePattern);if(!a)return null;var i=L.valueCallback?L.valueCallback(a[0]):a[0];return{value:i=e.valueCallback?e.valueCallback(i):i,rest:t.slice(r.length)}}),era:H({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:H({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:H({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:H({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:H({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,X=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$=/^'([^]*?)'?$/,F=/''/g,U=/[a-zA-Z]/;function J(t,e,n){var r,a,s,l,h,m,f,w,v,g,p,y,b,x,D,k,M,T;u(2,arguments);var S=String(e),N=c(),E=null!==(r=null!==(a=null==n?void 0:n.locale)&&void 0!==a?a:N.locale)&&void 0!==r?r:G,I=o(null!==(s=null!==(l=null!==(h=null!==(m=null==n?void 0:n.firstWeekContainsDate)&&void 0!==m?m:null==n||null===(f=n.locale)||void 0===f||null===(w=f.options)||void 0===w?void 0:w.firstWeekContainsDate)&&void 0!==h?h:N.firstWeekContainsDate)&&void 0!==l?l:null===(v=N.locale)||void 0===v||null===(g=v.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==s?s:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=o(null!==(p=null!==(y=null!==(b=null!==(x=null==n?void 0:n.weekStartsOn)&&void 0!==x?x:null==n||null===(D=n.locale)||void 0===D||null===(k=D.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==b?b:N.weekStartsOn)&&void 0!==y?y:null===(M=N.locale)||void 0===M||null===(T=M.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==p?p:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var R=d(t);if(!function(t){if(u(1,arguments),!function(t){return u(1,arguments),t instanceof Date||"object"===i(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=d(t);return!isNaN(Number(e))}(R))throw new RangeError("Invalid time value");var O=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(R),W=function(t,e){return u(2,arguments),function(t,e){u(2,arguments);var n=d(t).getTime(),r=o(e);return new Date(n+r)}(t,-o(e))}(R,O),L={firstWeekContainsDate:I,weekStartsOn:j,locale:E,_originalDate:R};return S.match(X).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,z[e])(t,E.formatLong):t})).join("").match(Q).map((function(r){if("''"===r)return"'";var a,i,o=r[0];if("'"===o)return(i=(a=r).match($))?i[1].replace(F,"'"):a;var u=P[o];if(u)return null!=n&&n.useAdditionalWeekYearTokens||-1===A.indexOf(r)||C(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==_.indexOf(r))||C(r,e,String(t)),u(W,r,E.localize,L);if(o.match(U))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}var V={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Z=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,K=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,tt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function et(t){return t?parseInt(t):1}function nt(t){return t&&parseFloat(t.replace(",","."))||0}var rt=[31,null,31,30,31,30,31,31,30,31,30,31];function at(t){return t%400==0||t%4==0&&t%100!=0}async function it({endpoint:t,gameId:e,drawId:n,results:r,splitView:a=!1}){const i=await async function({endpoint:t,gameId:e,drawId:n}){try{return await function(t,e="GET",n=null,r={}){return new Promise(((a,i)=>{const o=Object.assign({"Content-Type":"application/json"},r),u={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?u.body=JSON.stringify(n):delete u.body,fetch(t,u).then((t=>t.ok?t.json():t.json().then((e=>{i({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>i({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>a(t)),(t=>i(t)))}))}(`${t}/poolgames/${e}/draws/${n}/matchConfig`)||[]}catch(t){console.log(t)}}({endpoint:t,gameId:e,drawId:n});return a?i.reduce(((t,e,n)=>{const[a,i]=(o=e.eventName)?o.split("vs").map((t=>t.trim())):"";var o;const[u,d]=function(t){const e=new Set,n=new Set;for(const r of t){const[t,a]=r.split(":");e.has(t)||e.add(t),n.has(t)||n.add(a)}return[Array.from(e),Array.from(n)]}(r[n]||[]);return null==t||t.push({index:n+1,teamName:a,startTime:e.startTime,results:u}),null==t||t.push({index:n+1,teamName:i,startTime:e.startTime,results:d}),t}),[])||[]:i.map(((t,e)=>({index:e+1,eventName:t.eventName,startTime:t.startTime,results:r[e]||[]})))}const ot=["ro","en","fr","ar","hr"],ut={en:{filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{ticketsHistory:"Istoric bilete",settled:"Decontat",purchased:"Achiziționat",canceled:"Anulat",noData:"Nu sunt date disponibile.",ticketId:"ID bilet:",ticketType:"Tip bilet:",ticketAmount:"Suma biletului:",lineDetail:"Detaliu linie:",seeDetails:"Vezi detalii",numberOfDraw:"Număr de extrageri:",ticketResult:"Rezultat bilet:",drawId:"ID extragere:",drawDate:"Data extragerii:",result:"Rezultat:",prize:"Premiu:",bettingType:"Tip de pariu:"},fr:{ticketsHistory:"Historique des billets",settled:"Réglé",purchased:"Acheté",canceled:"Annulé",noData:"Aucune donnée disponible.",ticketId:"ID du billet:",ticketType:"Type de billet:",ticketAmount:"Montant du billet:",lineDetail:"Détail de la ligne:",seeDetails:"Voir les détails",numberOfDraw:"Nombre de tirages:",ticketResult:"Résultat du billet:",drawId:"ID du tirage:",drawDate:"Date du tirage:",result:"Résultat:",prize:"Prix:",bettingType:"Type de pari:"},ar:{ticketsHistory:"سجل التذاكر",settled:"تمت التسوية",purchased:"تم شراؤها",canceled:"تم الإلغاء",noData:"لا توجد بيانات متاحة.",ticketId:"معرف التذكرة:",ticketType:"نوع التذكرة:",ticketAmount:"مبلغ التذكرة:",lineDetail:"تفاصيل الخط:",seeDetails:"انظر التفاصيل",numberOfDraw:"عدد السحوبات:",ticketResult:"نتيجة التذكرة:",drawId:"معرف السحب:",drawDate:"تاريخ السحب:",result:"النتيجة:",prize:"الجائزة:",bettingType:"نوع الرهان:"},hr:{ticketsHistory:"Povijest listića",settled:"Riješeno",purchased:"Kupljeno",canceled:"Otkazano",noData:"Nema dostupnih podataka.",ticketId:"ID listića:",ticketType:"Vrsta listića:",ticketAmount:"Iznos listića:",lineDetail:"Detalji linije:",seeDetails:"Vidi detalje",numberOfDraw:"Broj izvlačenja:",ticketResult:"Rezultat listića:",drawId:"ID izvlačenja:",drawDate:"Datum izvlačenja:",result:"Rezultat:",prize:"Nagrada:",bettingType:"Vrsta oklade:"}},dt=class{constructor(e){t(this,e),this.latestRequestId=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.defaultResults=void 0,this.splitView=!1,this.allResults=void 0,this.ticketBetDataSource=[],this.isLoading=!1}handleClientStylingChange(t,e){t!==e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])ut[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.fetchMatchData()}async fetchMatchData(){const t=++this.latestRequestId;if(this.gameId&&this.drawId)try{this.defaultResults&&(this.allResults=JSON.parse(this.defaultResults)),this.isLoading=!0;const e=await it({endpoint:this.endpoint,gameId:this.gameId,drawId:this.drawId,results:this.allResults||[[]],splitView:this.splitView});t===this.latestRequestId&&(this.ticketBetDataSource=e)}finally{t===this.latestRequestId&&(this.isLoading=!1)}}get columns(){const t=(t,e)=>(({date:t,type:e="date",format:n})=>{try{const r=function(t,e){var n;u(1,arguments);var r=o(null!==(n=null==e?void 0:e.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var a,i=function(t){var e,n={},r=t.split(V.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?e=r[0]:(n.date=r[0],e=r[1],V.timeZoneDelimiter.test(n.date)&&(n.date=t.split(V.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var a=V.timezone.exec(e);a?(n.time=e.replace(a[1],""),n.timezone=a[1]):n.time=e}return n}(t);if(i.date){var d=function(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:null===i?a:100*i,restDateString:t.slice((r[1]||r[2]).length)}}(i.date,r);a=function(t,e){if(null===e)return new Date(NaN);var n=t.match(Z);if(!n)return new Date(NaN);var r=!!n[4],a=et(n[1]),i=et(n[2])-1,o=et(n[3]),u=et(n[4]),d=et(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,u,d)?function(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var a=7*(e-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+a),r}(e,u,d):new Date(NaN);var s=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(rt[e]||(at(t)?29:28))}(e,i,o)&&function(t,e){return e>=1&&e<=(at(t)?366:365)}(e,a)?(s.setUTCFullYear(e,i,Math.max(a,o)),s):new Date(NaN)}(d.restDateString,d.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s,c=a.getTime(),h=0;if(i.time&&(h=function(t){var e=t.match(K);if(!e)return NaN;var n=nt(e[1]),r=nt(e[2]),a=nt(e[3]);return function(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,a)?n*l+6e4*r+1e3*a:NaN}(i.time),isNaN(h)))return new Date(NaN);if(!i.timezone){var m=new Date(c+h),f=new Date(0);return f.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),f.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),f}return s=function(t){if("Z"===t)return 0;var e=t.match(tt);if(!e)return 0;var n="+"===e[1]?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,a)?n*(r*l+6e4*a):NaN}(i.timezone),isNaN(s)?new Date(NaN):new Date(c+h+s)}(t);if(isNaN(r.getTime()))throw new Error(`Invalid date: ${t}`);if(n)return J(r,n);let a="dd/MM/yyyy";return"time"===e?a="dd/MM/yyyy HH:mm:ss":"week"===e&&(a="ccc dd/MM/yyyy HH:mm:ss"),J(r,a)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc dd/MM HH:mm"});return this.splitView?[{title:"No.",value:"index",width:5,rowSpan:2},{title:"Date",value:"startTime",width:25,rowSpan:2,nowrap:!0,render:t},{title:"Team",value:"teamName",width:30},{title:"Scores",value:"results",width:45,render:(t,n)=>e("div",{class:"flex gap-1"},n.map((t=>e("lottery-oddsbom-bullet",{text:t,"is-reading":!0,"is-selected":!0}))))}]:[{title:"Match",value:"eventName",width:50,render:(t,n)=>e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},n))},{title:"Date",value:"startTime",width:25,nowrap:!0,render:t},{title:"Match Result",value:"results",width:25,render:(t,n)=>e("div",null,null==n?void 0:n[0])}]}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}renderEmpty(){return e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,(()=>{const t=this.language;let e=ut[void 0!==t&&ot.includes(t)?t:"en"].noData;return e})()))}renderTable({columns:t,dataSource:n,hideHead:r=!1,grid:a=!0,bordered:i=!0}){const o={};return e("table",{class:{bordered:i,grid:a,"my-table-component":!0}},!r&&e("thead",null,e("tr",null,t.map((t=>{var n;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(n=t.title)||void 0===n?void 0:n.call(t))})))),e("tbody",null,n.map(((n,r)=>e("tr",{key:r},t.map((t=>{if(o[t.value]&&o[t.value]>0)return o[t.value]--,null;const a=t.rowSpan;return a&&a>1&&(o[t.value]=a-1),e("td",{key:t.value,rowSpan:a,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(n,n[t.value],r):n[t.value])})))))))}renderContent(){return this.isLoading?this.renderLoading():this.ticketBetDataSource&&0!==this.ticketBetDataSource.length?e("div",{class:"flex align-center LotteryTippingTicketBet__main"},this.renderTable({columns:this.columns,dataSource:this.ticketBetDataSource||[],hideHead:!1,grid:!1,bordered:!1})):this.renderEmpty()}render(){return e("div",{key:"9932926b2958b13636d617cc20a0c77a76a36ebe",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},this.renderContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],drawId:["fetchMatchData"],defaultResults:["fetchMatchData"]}}};dt.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";export{dt as L,r as a,a as b,n as s}