@everymatrix/lottery-tipping-page 0.1.5 → 0.1.7
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.
- package/dist/cjs/{general-tooltip_7.cjs.entry.js → general-multi-select_13.cjs.entry.js} +2651 -1315
- package/dist/cjs/{index-335e7b86.js → index-eb012321.js} +7 -3
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{lottery-tipping-page-6e72415a.js → lottery-tipping-page-80f111ca.js} +5 -2
- package/dist/cjs/lottery-tipping-page.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +21 -0
- package/dist/collection/components/lottery-tipping-page/lottery-tipping-page.js +5 -1
- package/dist/esm/{general-tooltip_7.entry.js → general-multi-select_13.entry.js} +2647 -1317
- package/dist/esm/{index-8ab53757.js → index-25e8d5c3.js} +8 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{lottery-tipping-page-5f471e39.js → lottery-tipping-page-ab82834a.js} +5 -2
- package/dist/esm/lottery-tipping-page.js +3 -3
- package/dist/lottery-tipping-page/{general-tooltip_7.entry.js → general-multi-select_13.entry.js} +315 -315
- package/dist/lottery-tipping-page/index-25e8d5c3.js +2 -0
- package/dist/lottery-tipping-page/index.esm.js +1 -1
- package/dist/lottery-tipping-page/lottery-tipping-page-ab82834a.js +1 -0
- package/dist/lottery-tipping-page/lottery-tipping-page.esm.js +1 -1
- package/dist/static/dropdown.svg +2 -0
- package/dist/static/dropup.svg +1 -0
- package/dist/types/components/lottery-tipping-page/lottery-tipping-page.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lottery-tipping-page/index-8ab53757.js +0 -2
- package/dist/lottery-tipping-page/lottery-tipping-page-5f471e39.js +0 -1
|
@@ -2,8 +2,154 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const lotteryTippingPage = require('./lottery-tipping-page-
|
|
5
|
+
const index = require('./index-eb012321.js');
|
|
6
|
+
const lotteryTippingPage = require('./lottery-tipping-page-80f111ca.js');
|
|
7
|
+
|
|
8
|
+
const generalMultiSelectCss = ".multi-select-container{position:relative;font-family:\"Inter\", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-typography, #555);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-gray-100, #f4f5f7)}.dropdown-item.selected{background:var(--emw--color-primary-variant, #bae7ff);color:var(--emw--color-primary, #0050b3);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}";
|
|
9
|
+
const GeneralMultiSelectStyle0 = generalMultiSelectCss;
|
|
10
|
+
|
|
11
|
+
const GeneralMultiSelect = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.change = index.createEvent(this, "change", 7);
|
|
15
|
+
this.handleOutsideClick = (e) => {
|
|
16
|
+
// If click happens outside our component root, close both panels
|
|
17
|
+
const path = e.composedPath();
|
|
18
|
+
if (!path.includes(this.el)) {
|
|
19
|
+
this.dropdownOpen = false;
|
|
20
|
+
this.overflowOpen = false;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.toggleDropdown = (e) => {
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
this.dropdownOpen = !this.dropdownOpen;
|
|
26
|
+
this.overflowOpen = false; // close overflow if open
|
|
27
|
+
};
|
|
28
|
+
this.isSelected = (value) => this.selectedValues.includes(value);
|
|
29
|
+
this.selectItem = (item) => {
|
|
30
|
+
if (!this.isSelected(item.value)) {
|
|
31
|
+
this.selectedValues = [...this.selectedValues, item.value];
|
|
32
|
+
this.change.emit(this.selectedValues);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.toggleItem = (item) => {
|
|
36
|
+
if (this.isSelected(item.value)) {
|
|
37
|
+
this.removeItem(item.value);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.selectItem(item);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this.removeItem = (value, e) => {
|
|
44
|
+
e && e.stopPropagation();
|
|
45
|
+
this.selectedValues = this.selectedValues.filter((v) => v !== value);
|
|
46
|
+
this.change.emit(this.selectedValues);
|
|
47
|
+
};
|
|
48
|
+
this.downIcon = index.getAssetPath('../static/dropdown.svg');
|
|
49
|
+
this.upIcon = index.getAssetPath('../static/dropup.svg');
|
|
50
|
+
/** Touch-capable device? */
|
|
51
|
+
this.isTouch = 'ontouchstart' in window;
|
|
52
|
+
/** Open overflow popover */
|
|
53
|
+
this.openOverflow = () => {
|
|
54
|
+
if (!this.isTouch) {
|
|
55
|
+
// hover only on non-touch
|
|
56
|
+
this.computePopoverPosition();
|
|
57
|
+
this.overflowOpen = true;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
/** Close overflow popover */
|
|
61
|
+
this.closeOverflow = () => {
|
|
62
|
+
if (!this.isTouch) {
|
|
63
|
+
this.overflowOpen = false;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
this.toggleOverflow = (e) => {
|
|
67
|
+
e.stopPropagation();
|
|
68
|
+
this.computePopoverPosition();
|
|
69
|
+
this.overflowOpen = !this.overflowOpen;
|
|
70
|
+
};
|
|
71
|
+
this.mbSource = undefined;
|
|
72
|
+
this.clientStyling = undefined;
|
|
73
|
+
this.clientStylingUrl = undefined;
|
|
74
|
+
this.options = [];
|
|
75
|
+
this.maxVisibleChips = 2;
|
|
76
|
+
this.placeholder = '';
|
|
77
|
+
this.selectedValues = [];
|
|
78
|
+
this.dropdownOpen = false;
|
|
79
|
+
this.overflowOpen = false;
|
|
80
|
+
this.popoverStyle = { top: '0px', left: '0px' };
|
|
81
|
+
}
|
|
82
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
83
|
+
if (newValue != oldValue) {
|
|
84
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
88
|
+
if (newValue != oldValue) {
|
|
89
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
93
|
+
if (newValue != oldValue) {
|
|
94
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
componentDidLoad() {
|
|
98
|
+
if (this.stylingContainer) {
|
|
99
|
+
if (this.mbSource)
|
|
100
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
101
|
+
if (this.clientStyling)
|
|
102
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
103
|
+
if (this.clientStylingUrl)
|
|
104
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async clear() {
|
|
108
|
+
this.selectedValues = [];
|
|
109
|
+
this.change.emit(this.selectedValues);
|
|
110
|
+
}
|
|
111
|
+
componentWillLoad() {
|
|
112
|
+
// Listen for clicks anywhere to close panels on outside click
|
|
113
|
+
document.addEventListener('click', this.handleOutsideClick);
|
|
114
|
+
}
|
|
115
|
+
disconnectedCallback() {
|
|
116
|
+
document.removeEventListener('click', this.handleOutsideClick);
|
|
117
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
118
|
+
}
|
|
119
|
+
get selectedOptions() {
|
|
120
|
+
return this.options.filter((o) => this.isSelected(o.value));
|
|
121
|
+
}
|
|
122
|
+
get visibleChips() {
|
|
123
|
+
return this.selectedOptions.slice(0, this.maxVisibleChips);
|
|
124
|
+
}
|
|
125
|
+
get hiddenChips() {
|
|
126
|
+
return this.selectedOptions.slice(this.maxVisibleChips);
|
|
127
|
+
}
|
|
128
|
+
computePopoverPosition() {
|
|
129
|
+
if (this.overflowChipEl && this.el) {
|
|
130
|
+
const { left: overflowChipElLeft } = this.overflowChipEl.getBoundingClientRect();
|
|
131
|
+
const { left: elLeft, height } = this.el.getBoundingClientRect();
|
|
132
|
+
this.popoverStyle = {
|
|
133
|
+
top: `${height - 10}px`,
|
|
134
|
+
left: `${overflowChipElLeft - elLeft}px`
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
render() {
|
|
139
|
+
var _a;
|
|
140
|
+
return (index.h("div", { key: '50b48397be3ede1907ab2c2abcd1cf2f43f69c13', class: "general-multi-select-container", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '696a1bb1f221f8f5cf290fac040af10e2e5a115e', class: "multi-select-container", ref: (el) => (this.el = el) }, index.h("div", { key: '9ea92f01787b26d43054573a11896cf65065b073', class: "flex-row", onClick: this.toggleDropdown }, index.h("div", { key: 'f79720ca3ec383ee7f95b09483698ee18119c79a', class: "control" }, this.visibleChips.map((opt) => (index.h("span", { class: "chip" }, index.h("div", { class: "chip-text", title: opt.text }, opt.text), index.h("div", { class: "remove-btn", onClick: (e) => this.removeItem(opt.value, e) }, "\u00D7")))), this.hiddenChips.length > 0 && (index.h("span", { key: '25e9e527c33dd7a315dacb10cc51084fe69b9b7e', class: "chip overflow-chip", ref: (el) => (this.overflowChipEl = el), onMouseEnter: this.openOverflow, onMouseLeave: this.closeOverflow, onClick: this.toggleOverflow }, "\u2022\u2022\u2022")), this.selectedValues.length === 0 && index.h("span", { key: 'b061de660a55f7a0d41ce9aa650108d3f38a9dc0', class: "placeholder" }, this.placeholder)), index.h("div", { key: 'f83b6517e88b3976cdc18590f8f1233cb2515230', class: "arrow" }, index.h("img", { key: '1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba', class: "info-icon", src: this.dropdownOpen ? this.upIcon : this.downIcon, style: { width: '18px' } }))), this.dropdownOpen && (index.h("div", { key: 'e5b081007bcbdd251ce5ac235c1f19f17852c420', class: "dropdown" }, this.options.map((opt) => (index.h("div", { class: {
|
|
141
|
+
'dropdown-item': true,
|
|
142
|
+
selected: this.isSelected(opt.value)
|
|
143
|
+
}, onClick: () => this.toggleItem(opt) }, opt.text))))), this.overflowOpen && !!((_a = this.hiddenChips) === null || _a === void 0 ? void 0 : _a.length) && (index.h("div", { key: 'f8e3289042c69c569bebcd0a40d90f31261c6c12', class: "overflow-popover", style: { top: this.popoverStyle.top, left: this.popoverStyle.left }, onMouseEnter: this.openOverflow, onMouseLeave: this.closeOverflow }, this.hiddenChips.map((opt) => (index.h("span", { class: "chip" }, index.h("span", { class: "chip-text", title: opt.text }, opt.text), index.h("span", { class: "remove-btn", onClick: (e) => this.removeItem(opt.value, e) }, "\u00D7")))))))));
|
|
144
|
+
}
|
|
145
|
+
static get assetsDirs() { return ["../static"]; }
|
|
146
|
+
static get watchers() { return {
|
|
147
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
148
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
149
|
+
"mbSource": ["handleMbSourceChange"]
|
|
150
|
+
}; }
|
|
151
|
+
};
|
|
152
|
+
GeneralMultiSelect.style = GeneralMultiSelectStyle0;
|
|
7
153
|
|
|
8
154
|
const generalTooltipCss = ".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;background-color:var(--emw--color-gray-300, #333);color:var(--emw--color-background, #fff);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";
|
|
9
155
|
const GeneralTooltipStyle0 = generalTooltipCss;
|
|
@@ -258,6 +404,148 @@ const LotteryTippingBulletGroup = class {
|
|
|
258
404
|
};
|
|
259
405
|
LotteryTippingBulletGroup.style = LotteryTippingBulletGroupStyle0;
|
|
260
406
|
|
|
407
|
+
const DEFAULT_LANGUAGE$4 = 'en';
|
|
408
|
+
const SUPPORTED_LANGUAGES$4 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
409
|
+
const TRANSLATIONS$4 = {
|
|
410
|
+
en: {
|
|
411
|
+
cancel: 'Cancel',
|
|
412
|
+
confirm: 'Confirm'
|
|
413
|
+
},
|
|
414
|
+
ro: {
|
|
415
|
+
cancel: 'Anulează',
|
|
416
|
+
confirm: 'Confirmă'
|
|
417
|
+
},
|
|
418
|
+
fr: {
|
|
419
|
+
cancel: 'Annuler',
|
|
420
|
+
confirm: 'Confirmer'
|
|
421
|
+
},
|
|
422
|
+
ar: {
|
|
423
|
+
cancel: 'إلغاء',
|
|
424
|
+
confirm: 'تأكيد'
|
|
425
|
+
},
|
|
426
|
+
hr: {
|
|
427
|
+
cancel: 'Odustani',
|
|
428
|
+
confirm: 'Potvrdi'
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
const translate$4 = (key, customLang) => {
|
|
432
|
+
const lang = customLang;
|
|
433
|
+
return TRANSLATIONS$4[lang !== undefined && SUPPORTED_LANGUAGES$4.includes(lang) ? lang : DEFAULT_LANGUAGE$4][key];
|
|
434
|
+
};
|
|
435
|
+
const getTranslations$3 = (data) => {
|
|
436
|
+
Object.keys(data).forEach((item) => {
|
|
437
|
+
for (let key in data[item]) {
|
|
438
|
+
TRANSLATIONS$4[item][key] = data[item][key];
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
const lotteryTippingDialogCss = ".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;min-height:200px;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-gray-300, #333)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-gray-300, #333);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-gray-300, #333);background:var(--emw--color-background, #fff)}.dialog-footer .cancel-btn:hover{border-color:var(--emw--color-gray-100, #e6e6e6)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-background, #fff);background:var(--emw-pool-game-acition-normal, #4a90e2);box-shadow:0 2px 4px rgba(74, 144, 226, 0.2)}.dialog-footer .confirm-btn:hover{background:var(--emw-pool-game-action-hover, #357abd)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}";
|
|
444
|
+
const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
|
|
445
|
+
|
|
446
|
+
const LotteryTippingDialog = class {
|
|
447
|
+
constructor(hostRef) {
|
|
448
|
+
index.registerInstance(this, hostRef);
|
|
449
|
+
this.open = index.createEvent(this, "open", 7);
|
|
450
|
+
this.close = index.createEvent(this, "close", 7);
|
|
451
|
+
this.confirm = index.createEvent(this, "confirm", 7);
|
|
452
|
+
this.cancel = index.createEvent(this, "cancel", 7);
|
|
453
|
+
this.wasVisible = false;
|
|
454
|
+
this.mbSource = undefined;
|
|
455
|
+
this.clientStyling = '';
|
|
456
|
+
this.clientStylingUrl = '';
|
|
457
|
+
this.visible = undefined;
|
|
458
|
+
this.dialogTitle = '';
|
|
459
|
+
this.width = '520px';
|
|
460
|
+
this.closable = true;
|
|
461
|
+
this.mask = true;
|
|
462
|
+
this.maskClosable = true;
|
|
463
|
+
this.animationDuration = 300;
|
|
464
|
+
this.fullscreen = false;
|
|
465
|
+
this.showFooter = true;
|
|
466
|
+
this.showCancelBtn = true;
|
|
467
|
+
this.language = 'en';
|
|
468
|
+
this.translationUrl = undefined;
|
|
469
|
+
}
|
|
470
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
471
|
+
if (newValue != oldValue) {
|
|
472
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
476
|
+
if (newValue != oldValue) {
|
|
477
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
481
|
+
if (newValue != oldValue) {
|
|
482
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
componentWillLoad() {
|
|
486
|
+
if (this.translationUrl) {
|
|
487
|
+
getTranslations$3(JSON.parse(this.translationUrl));
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
componentWillUpdate() {
|
|
491
|
+
if (this.visible && !this.wasVisible) {
|
|
492
|
+
this.disableBodyScroll();
|
|
493
|
+
}
|
|
494
|
+
else if (!this.visible && this.wasVisible) {
|
|
495
|
+
this.enableBodyScroll();
|
|
496
|
+
}
|
|
497
|
+
this.wasVisible = this.visible;
|
|
498
|
+
}
|
|
499
|
+
disconnectedCallback() {
|
|
500
|
+
this.enableBodyScroll();
|
|
501
|
+
}
|
|
502
|
+
disableBodyScroll() {
|
|
503
|
+
document.body.style.overflow = 'hidden';
|
|
504
|
+
}
|
|
505
|
+
enableBodyScroll() {
|
|
506
|
+
document.body.style.overflow = '';
|
|
507
|
+
}
|
|
508
|
+
handleClose() {
|
|
509
|
+
this.visible = false;
|
|
510
|
+
this.cancel.emit();
|
|
511
|
+
}
|
|
512
|
+
handleMaskClick(e) {
|
|
513
|
+
if (this.maskClosable && e.target === this.el.querySelector('.mask')) {
|
|
514
|
+
this.visible = false;
|
|
515
|
+
this.cancel.emit();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
handleConfirm() {
|
|
519
|
+
this.visible = false;
|
|
520
|
+
this.confirm.emit();
|
|
521
|
+
}
|
|
522
|
+
render() {
|
|
523
|
+
const dialogStyle = {
|
|
524
|
+
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
525
|
+
'--duration': `${this.animationDuration}ms`
|
|
526
|
+
};
|
|
527
|
+
const dialogWrapperClass = ['dialog-wrapper', this.visible ? 'dialog-wrapper-visible' : ''];
|
|
528
|
+
const maskClass = ['mask', this.visible ? 'mask-enter' : 'mask-leave'];
|
|
529
|
+
const dialogClass = [
|
|
530
|
+
'dialog',
|
|
531
|
+
this.visible ? 'dialog-enter' : 'dialog-leave',
|
|
532
|
+
this.fullscreen ? 'fullscreen' : ''
|
|
533
|
+
].join(' ');
|
|
534
|
+
const contentStyle = {
|
|
535
|
+
maxHeight: 'calc(100vh - 62px)',
|
|
536
|
+
overflowY: 'auto'
|
|
537
|
+
};
|
|
538
|
+
return (index.h("div", { key: 'cf311658c951f1d8af6d015f02b30e5cfd14e972', class: dialogWrapperClass.join(' ') }, index.h("div", { key: 'bec49cd133029ca0db51462db39a6b1957d285c7', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), index.h("div", { key: '7d9b2faf2fee0d483acfc00e4820d0aac82a718a', class: dialogClass, style: dialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, index.h("div", { key: '9d4c2471258cab88ad9ed6a05e513815d96f13a9', class: "dialog-header" }, index.h("h2", { key: '8bd30b19c31eb9fddebe8d19c6af454a89f5d234', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (index.h("button", { key: 'f8e4dfebc9506a6aa79e1c68abdd42686a7bbc2f', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), index.h("div", { key: 'b21127dfcb5912d35d41260798d82c15b59335ef', class: "dialog-content", style: contentStyle }, index.h("slot", { key: 'ca0dedda350d3aef9e54202f8e7add236d0a8795' })), this.showFooter && (index.h("div", { key: '2d7ccaf4414d509f30db1909948452efaf74aec1', class: "dialog-footer" }, index.h("slot", { key: '1f6d67f646936756abe1edf768dd37418683815f', name: "footer" }, this.showCancelBtn && (index.h("button", { key: '92055092b2978c41eabed218b73e242cafe4accc', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate$4('cancel', this.language))), index.h("button", { key: 'c950eefc68feb4546665105a0e2d0f2300183d8f', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate$4('confirm', this.language))))))));
|
|
539
|
+
}
|
|
540
|
+
get el() { return index.getElement(this); }
|
|
541
|
+
static get watchers() { return {
|
|
542
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
543
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
544
|
+
"mbSource": ["handleMbSourceChange"]
|
|
545
|
+
}; }
|
|
546
|
+
};
|
|
547
|
+
LotteryTippingDialog.style = LotteryTippingDialogStyle0;
|
|
548
|
+
|
|
261
549
|
function _typeof(o) {
|
|
262
550
|
"@babel/helpers - typeof";
|
|
263
551
|
|
|
@@ -2795,482 +3083,6 @@ function validateTimezone(_hours, minutes) {
|
|
|
2795
3083
|
return minutes >= 0 && minutes <= 59;
|
|
2796
3084
|
}
|
|
2797
3085
|
|
|
2798
|
-
const formatDate$1 = ({ date, type = 'date', format: format$1 }) => {
|
|
2799
|
-
try {
|
|
2800
|
-
const parsedDate = parseISO(date);
|
|
2801
|
-
if (isNaN(parsedDate.getTime())) {
|
|
2802
|
-
throw new Error(`Invalid date: ${date}`);
|
|
2803
|
-
}
|
|
2804
|
-
if (format$1)
|
|
2805
|
-
return format(parsedDate, format$1);
|
|
2806
|
-
let formatStr = 'dd/MM/yyyy';
|
|
2807
|
-
if (type === 'time') {
|
|
2808
|
-
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
2809
|
-
}
|
|
2810
|
-
else if (type === 'week') {
|
|
2811
|
-
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
2812
|
-
}
|
|
2813
|
-
return format(parsedDate, formatStr);
|
|
2814
|
-
}
|
|
2815
|
-
catch (error) {
|
|
2816
|
-
console.error('Error formatting date:', error.message);
|
|
2817
|
-
return '';
|
|
2818
|
-
}
|
|
2819
|
-
};
|
|
2820
|
-
const fetcher$1 = (url) => fetch(url, {
|
|
2821
|
-
method: 'GET',
|
|
2822
|
-
headers: {
|
|
2823
|
-
'x-scheme': 'application/json',
|
|
2824
|
-
Accept: 'application/json'
|
|
2825
|
-
}
|
|
2826
|
-
}).then((r) => r.json());
|
|
2827
|
-
const showNotification$1 = ({ message, theme = 'success' }) => {
|
|
2828
|
-
window.postMessage({
|
|
2829
|
-
type: 'ShowNotificationToast',
|
|
2830
|
-
message,
|
|
2831
|
-
theme
|
|
2832
|
-
});
|
|
2833
|
-
};
|
|
2834
|
-
const thousandSeparator = (value) => {
|
|
2835
|
-
if (value === 0) {
|
|
2836
|
-
return '0';
|
|
2837
|
-
}
|
|
2838
|
-
if (!value) {
|
|
2839
|
-
return '';
|
|
2840
|
-
}
|
|
2841
|
-
value = value.toString();
|
|
2842
|
-
const parts = value.split('.');
|
|
2843
|
-
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
2844
|
-
return parts.join('.');
|
|
2845
|
-
};
|
|
2846
|
-
const generateUUID = () => {
|
|
2847
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
2848
|
-
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
2849
|
-
return v.toString(16);
|
|
2850
|
-
});
|
|
2851
|
-
};
|
|
2852
|
-
const TICKET_INVALID_TOKEN = 'TICKET_INVALID_TOKEN';
|
|
2853
|
-
// format results to winning numbers
|
|
2854
|
-
const formatResultsToWinningNumbers = (rawResults) => {
|
|
2855
|
-
const formatMatchCheckRes = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
|
|
2856
|
-
const resultsForTotalLines = rawResults.map((lineRes) => lineRes.map(formatMatchCheckRes));
|
|
2857
|
-
const result = [];
|
|
2858
|
-
for (let i = 0; i < resultsForTotalLines.length; i++) {
|
|
2859
|
-
const resultsInLine = resultsForTotalLines[i];
|
|
2860
|
-
for (let j = 0; j < resultsInLine.length; j++) {
|
|
2861
|
-
const matchResult = resultsInLine[j];
|
|
2862
|
-
for (let k = 0; k < matchResult.length; k++) {
|
|
2863
|
-
if (!result[i])
|
|
2864
|
-
result[i] = [];
|
|
2865
|
-
if (matchResult[k])
|
|
2866
|
-
result[i].push(k, j);
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
return result;
|
|
2871
|
-
};
|
|
2872
|
-
const doSubmitTicket = ({ body, sessionId, url }) => {
|
|
2873
|
-
const options = {
|
|
2874
|
-
method: 'POST',
|
|
2875
|
-
headers: {
|
|
2876
|
-
'Content-Type': 'application/json',
|
|
2877
|
-
Accept: 'application/json',
|
|
2878
|
-
Authorization: `Bearer ${sessionId}`,
|
|
2879
|
-
'X-Idempotency-Key': generateUUID()
|
|
2880
|
-
},
|
|
2881
|
-
body: JSON.stringify(body)
|
|
2882
|
-
};
|
|
2883
|
-
return fetch(url, options).then((res) => {
|
|
2884
|
-
if (res.status === 401) {
|
|
2885
|
-
throw new Error(TICKET_INVALID_TOKEN);
|
|
2886
|
-
}
|
|
2887
|
-
if (res.status > 300) {
|
|
2888
|
-
throw new Error(res.statusText);
|
|
2889
|
-
}
|
|
2890
|
-
return res.json();
|
|
2891
|
-
});
|
|
2892
|
-
};
|
|
2893
|
-
// BettingTypes, playModes and playTypes
|
|
2894
|
-
const getEnableOptions = (raw = []) => raw.filter((i) => i.enabled);
|
|
2895
|
-
// the first one in bet type config that enabled = true, will be default choice
|
|
2896
|
-
const getDefaultType = ({ playTypeConfig = [], betTypeConfig = [], enabledBettingTypeOptions = [], enabledPlayingModeOptions = [] }) => {
|
|
2897
|
-
const enabledBetTypeConfig = betTypeConfig.filter((i) => i.enabled);
|
|
2898
|
-
for (const item of enabledBetTypeConfig) {
|
|
2899
|
-
const { bettingType, playMode } = playTypeConfig === null || playTypeConfig === void 0 ? void 0 : playTypeConfig.find((i) => i.betTypeId === item.id);
|
|
2900
|
-
if (enabledBettingTypeOptions.map((i) => i.code).includes(bettingType) &&
|
|
2901
|
-
enabledPlayingModeOptions.map((i) => i.code).includes(playMode))
|
|
2902
|
-
return { bettingType, playMode };
|
|
2903
|
-
}
|
|
2904
|
-
return {};
|
|
2905
|
-
};
|
|
2906
|
-
const calculatePlayingModeOptions = ({ bettingType, playTypeConfig, betTypeConfig, enabledPlayingModeOptions }) => {
|
|
2907
|
-
const enabledBetTypeIdConfig = betTypeConfig.filter((i) => i.enabled).map((i) => i.id);
|
|
2908
|
-
const filteredPlayTypesConfig = playTypeConfig.filter((i) => enabledBetTypeIdConfig.includes(i.betTypeId));
|
|
2909
|
-
const selectedBettingTypeFilteredPlayTypesConfig = filteredPlayTypesConfig.filter((i) => i.bettingType === bettingType);
|
|
2910
|
-
const _ = selectedBettingTypeFilteredPlayTypesConfig.map((i) => i.playMode);
|
|
2911
|
-
return enabledPlayingModeOptions.filter((i) => _.includes(i.code));
|
|
2912
|
-
};
|
|
2913
|
-
const getCheckedCountForEachLineAndEachMatch = ({ rawResults }) => {
|
|
2914
|
-
const getMatchCheckRes = (matchRes) => matchRes.filter((bulletItem) => bulletItem.isSelected).length;
|
|
2915
|
-
const checkedCountForEachLineAndEachMatch = rawResults.map((lineRes) => lineRes.length > 0 ? lineRes.map(getMatchCheckRes) : [0]);
|
|
2916
|
-
return checkedCountForEachLineAndEachMatch;
|
|
2917
|
-
};
|
|
2918
|
-
const getPlayTypeConfig = ({ rawData, selectedBettingType, selectedPlayingMode }) => {
|
|
2919
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2920
|
-
const betTypeId = (_d = (_c = (_b = (_a = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes) === null || _c === void 0 ? void 0 : _c.find((i) => i.bettingType === selectedBettingType && i.playMode === selectedPlayingMode)) === null || _d === void 0 ? void 0 : _d.betTypeId;
|
|
2921
|
-
const betType = (_f = (_e = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _e === void 0 ? void 0 : _e.betTypes) === null || _f === void 0 ? void 0 : _f.find((i) => i.id === betTypeId);
|
|
2922
|
-
return { betTypeId, betType };
|
|
2923
|
-
};
|
|
2924
|
-
|
|
2925
|
-
const DEFAULT_LANGUAGE$2 = 'en';
|
|
2926
|
-
const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
2927
|
-
const TRANSLATIONS$2 = {
|
|
2928
|
-
en: {
|
|
2929
|
-
stop: 'Stop',
|
|
2930
|
-
at: 'at'
|
|
2931
|
-
},
|
|
2932
|
-
ro: {
|
|
2933
|
-
stop: 'Oprește',
|
|
2934
|
-
at: 'la'
|
|
2935
|
-
},
|
|
2936
|
-
fr: {
|
|
2937
|
-
stop: 'Arrêtez',
|
|
2938
|
-
at: 'à'
|
|
2939
|
-
},
|
|
2940
|
-
ar: {
|
|
2941
|
-
stop: 'توقف',
|
|
2942
|
-
at: 'في'
|
|
2943
|
-
},
|
|
2944
|
-
hr: {
|
|
2945
|
-
stop: 'Stop',
|
|
2946
|
-
at: 'u'
|
|
2947
|
-
}
|
|
2948
|
-
};
|
|
2949
|
-
const translate$2 = (key, customLang) => {
|
|
2950
|
-
const lang = customLang;
|
|
2951
|
-
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
2952
|
-
};
|
|
2953
|
-
|
|
2954
|
-
const DEFAULT_LANGUAGE$1 = 'en';
|
|
2955
|
-
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
2956
|
-
const TRANSLATIONS$1 = {
|
|
2957
|
-
en: {
|
|
2958
|
-
selectionCleared: 'Your selection will be cleared.',
|
|
2959
|
-
ticketSubmitted: 'Ticket submitted successfully.',
|
|
2960
|
-
ticketFailed: 'Failed to purchase the ticket. Please try again.',
|
|
2961
|
-
lines: 'Lines',
|
|
2962
|
-
line: 'Line',
|
|
2963
|
-
bettingType: 'Betting Type',
|
|
2964
|
-
playingMode: 'Playing Mode',
|
|
2965
|
-
orderSummaryTitle: 'Order Summary',
|
|
2966
|
-
orderSummaryTickets: 'Tickets',
|
|
2967
|
-
orderSummaryTotal: 'Total',
|
|
2968
|
-
orderSummarySubmit: 'Submit',
|
|
2969
|
-
cancel: 'Cancel',
|
|
2970
|
-
confirm: 'Confirm'
|
|
2971
|
-
},
|
|
2972
|
-
ro: {
|
|
2973
|
-
selectionCleared: 'Selecția dvs. va fi ștearsă.',
|
|
2974
|
-
ticketSubmitted: 'Bilet trimis cu succes.',
|
|
2975
|
-
ticketFailed: 'Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.',
|
|
2976
|
-
lines: 'Linii',
|
|
2977
|
-
line: 'Linie',
|
|
2978
|
-
bettingType: 'Tip de pariu',
|
|
2979
|
-
playingMode: 'Mod de joc',
|
|
2980
|
-
orderSummaryTitle: 'Sumar comandă',
|
|
2981
|
-
orderSummaryTickets: 'Bilete',
|
|
2982
|
-
orderSummaryTotal: 'Total',
|
|
2983
|
-
orderSummarySubmit: 'Trimite',
|
|
2984
|
-
cancel: 'Anulează',
|
|
2985
|
-
confirm: 'Confirmă'
|
|
2986
|
-
},
|
|
2987
|
-
fr: {
|
|
2988
|
-
selectionCleared: 'Votre sélection sera effacée.',
|
|
2989
|
-
ticketSubmitted: 'Billet soumis avec succès.',
|
|
2990
|
-
ticketFailed: "Échec de l'achat du billet. Veuillez réessayer.",
|
|
2991
|
-
lines: 'Lignes',
|
|
2992
|
-
line: 'Ligne',
|
|
2993
|
-
bettingType: 'Type de pari',
|
|
2994
|
-
playingMode: 'Mode de jeu',
|
|
2995
|
-
orderSummaryTitle: 'Résumé de la commande',
|
|
2996
|
-
orderSummaryTickets: 'Billets',
|
|
2997
|
-
orderSummaryTotal: 'Total',
|
|
2998
|
-
orderSummarySubmit: 'Soumettre',
|
|
2999
|
-
cancel: 'Annuler',
|
|
3000
|
-
confirm: 'Confirmer'
|
|
3001
|
-
},
|
|
3002
|
-
ar: {
|
|
3003
|
-
selectionCleared: 'سيتم مسح اختيارك.',
|
|
3004
|
-
ticketSubmitted: 'تم إرسال التذكرة بنجاح.',
|
|
3005
|
-
ticketFailed: 'فشل شراء التذكرة. يرجى المحاولة مرة أخرى.',
|
|
3006
|
-
lines: 'خطوط',
|
|
3007
|
-
line: 'خط',
|
|
3008
|
-
bettingType: 'نوع الرهان',
|
|
3009
|
-
playingMode: 'وضع اللعب',
|
|
3010
|
-
orderSummaryTitle: 'ملخص الطلب',
|
|
3011
|
-
orderSummaryTickets: 'التذاكر',
|
|
3012
|
-
orderSummaryTotal: 'المجموع',
|
|
3013
|
-
orderSummarySubmit: 'إرسال',
|
|
3014
|
-
cancel: 'إلغاء',
|
|
3015
|
-
confirm: 'تأكيد'
|
|
3016
|
-
},
|
|
3017
|
-
hr: {
|
|
3018
|
-
selectionCleared: 'Vaš odabir bit će obrisan.',
|
|
3019
|
-
ticketSubmitted: 'Listić je uspješno predan.',
|
|
3020
|
-
ticketFailed: 'Kupnja listića nije uspjela. Molimo pokušajte ponovo.',
|
|
3021
|
-
lines: 'Linije',
|
|
3022
|
-
line: 'Linija',
|
|
3023
|
-
bettingType: 'Vrsta oklade',
|
|
3024
|
-
playingMode: 'Način igranja',
|
|
3025
|
-
orderSummaryTitle: 'Sažetak narudžbe',
|
|
3026
|
-
orderSummaryTickets: 'Listići',
|
|
3027
|
-
orderSummaryTotal: 'Ukupno',
|
|
3028
|
-
orderSummarySubmit: 'Pošalji',
|
|
3029
|
-
cancel: 'Odustani',
|
|
3030
|
-
confirm: 'Potvrdi'
|
|
3031
|
-
}
|
|
3032
|
-
};
|
|
3033
|
-
const translate$1 = (key, customLang) => {
|
|
3034
|
-
const lang = customLang;
|
|
3035
|
-
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
3036
|
-
};
|
|
3037
|
-
const getTranslations$1 = (data) => {
|
|
3038
|
-
Object.keys(data).forEach((item) => {
|
|
3039
|
-
for (let key in data[item]) {
|
|
3040
|
-
TRANSLATIONS$1[item][key] = data[item][key];
|
|
3041
|
-
}
|
|
3042
|
-
});
|
|
3043
|
-
};
|
|
3044
|
-
const resolveTranslationUrl = async (translationUrl) => {
|
|
3045
|
-
if (translationUrl) {
|
|
3046
|
-
try {
|
|
3047
|
-
const response = await fetch(translationUrl);
|
|
3048
|
-
if (!response.ok) {
|
|
3049
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
3050
|
-
}
|
|
3051
|
-
const translations = await response.json();
|
|
3052
|
-
getTranslations$1(translations);
|
|
3053
|
-
}
|
|
3054
|
-
catch (error) {
|
|
3055
|
-
console.error('Failed to fetch or parse translations from URL:', error);
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
};
|
|
3059
|
-
|
|
3060
|
-
const lotteryTippingTicketBannerCss = ".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary-variant, #ffe66f);\n border-bottom: 2px solid var(--emw--color-primary-variant, #ffe66f);\n gap: 0.5rem;\n white-space: nowrap;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-gray-400, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-gray-400, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n border: 2px solid var(--emw--color-gray-150, #6f6f6f);\n border-radius: 0.4rem;\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-300, #333);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";
|
|
3061
|
-
const LotteryTippingTicketBannerStyle0 = lotteryTippingTicketBannerCss;
|
|
3062
|
-
|
|
3063
|
-
const LotteryTippingTicketBanner = class {
|
|
3064
|
-
constructor(hostRef) {
|
|
3065
|
-
index.registerInstance(this, hostRef);
|
|
3066
|
-
this.mbSource = undefined;
|
|
3067
|
-
this.clientStyling = undefined;
|
|
3068
|
-
this.clientStylingUrl = undefined;
|
|
3069
|
-
this.language = 'en';
|
|
3070
|
-
this.translationUrl = '';
|
|
3071
|
-
this.stopTime = '';
|
|
3072
|
-
this.period = undefined;
|
|
3073
|
-
}
|
|
3074
|
-
get formattedStopTime() {
|
|
3075
|
-
let _temp = '';
|
|
3076
|
-
if (!this.stopTime) {
|
|
3077
|
-
return _temp;
|
|
3078
|
-
}
|
|
3079
|
-
_temp = formatDate$1({ date: this.stopTime, format: 'dd/MM/yyyy HH:mm' });
|
|
3080
|
-
if (isToday(new Date(this.stopTime))) {
|
|
3081
|
-
_temp = formatDate$1({ date: this.stopTime, format: 'HH:mm' });
|
|
3082
|
-
}
|
|
3083
|
-
return _temp;
|
|
3084
|
-
}
|
|
3085
|
-
get formattedPeriod() {
|
|
3086
|
-
let _temp = '';
|
|
3087
|
-
_temp = formatDate$1({ date: this.period, format: 'EEEE' });
|
|
3088
|
-
if (_temp.toLowerCase() === 'wednesday') {
|
|
3089
|
-
_temp = 'MIDWEEK';
|
|
3090
|
-
}
|
|
3091
|
-
return _temp.toUpperCase();
|
|
3092
|
-
}
|
|
3093
|
-
handleClientStylingChange(newValue, oldValue) {
|
|
3094
|
-
if (newValue != oldValue) {
|
|
3095
|
-
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
|
-
handleClientStylingUrlChange(newValue, oldValue) {
|
|
3099
|
-
if (newValue != oldValue) {
|
|
3100
|
-
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
handleMbSourceChange(newValue, oldValue) {
|
|
3104
|
-
if (newValue != oldValue) {
|
|
3105
|
-
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
async componentWillLoad() {
|
|
3109
|
-
if (this.translationUrl) {
|
|
3110
|
-
resolveTranslationUrl(this.translationUrl);
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
componentDidLoad() {
|
|
3114
|
-
if (this.stylingContainer) {
|
|
3115
|
-
if (this.mbSource)
|
|
3116
|
-
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
3117
|
-
if (this.clientStyling)
|
|
3118
|
-
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
3119
|
-
if (this.clientStylingUrl)
|
|
3120
|
-
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
|
-
disconnectedCallback() {
|
|
3124
|
-
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
3125
|
-
}
|
|
3126
|
-
render() {
|
|
3127
|
-
const backgroundImagePath = index.getAssetPath('../static/tipping-full-color.svg');
|
|
3128
|
-
return (index.h("div", { key: 'eb93e7946631d234963d841df9e8b753b651c795', ref: (el) => (this.stylingContainer = el), class: "lottery-tipping-ticket-banner__container" }, index.h("section", { key: '0133e845df14caa912b18e1734ad16c584b7359f', class: "banner" }, index.h("div", { key: '23bc3b34011dc5533bf70397f974936e238f04fe', class: "left" }, index.h("img", { key: '52110de0807e79c02d7934ec8a37c1322b73fe84', alt: "Betting", src: backgroundImagePath, class: "logo" })), index.h("div", { key: 'b5deae59d09b870777c913c5ebfca43886c3cf95', class: "mid period" }, this.formattedPeriod), index.h("div", { key: 'b404e474850233e2d5e139077fd774f178bc40fa', class: "right" }, index.h("span", { key: '3b9072c2165a033d17c9572c7cafe2a2c699447b', class: "pill" }, index.h("strong", { key: 'c560c2c27dc930a963b992c07e02745b18d0002f' }, translate$2('stop', this.language)), "\u00A0", translate$2('at', this.language), "\u00A0", this.formattedStopTime)))));
|
|
3129
|
-
}
|
|
3130
|
-
static get assetsDirs() { return ["../static"]; }
|
|
3131
|
-
static get watchers() { return {
|
|
3132
|
-
"clientStyling": ["handleClientStylingChange"],
|
|
3133
|
-
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
3134
|
-
"mbSource": ["handleMbSourceChange"]
|
|
3135
|
-
}; }
|
|
3136
|
-
};
|
|
3137
|
-
LotteryTippingTicketBanner.style = LotteryTippingTicketBannerStyle0;
|
|
3138
|
-
|
|
3139
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
3140
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
3141
|
-
const TRANSLATIONS = {
|
|
3142
|
-
en: {
|
|
3143
|
-
homeTeam: 'Home team:',
|
|
3144
|
-
awayTeam: 'Away team:',
|
|
3145
|
-
selectionCleared: 'Your selection has been cleared.',
|
|
3146
|
-
selectionOnLineCleared: 'Your selection on this line will be cleared.',
|
|
3147
|
-
loading: 'Loading...',
|
|
3148
|
-
error: 'Error!',
|
|
3149
|
-
noData: 'No data available.',
|
|
3150
|
-
lineInfo: 'Line {currentPage} of {totalPages}',
|
|
3151
|
-
clearAll: 'Clear All',
|
|
3152
|
-
cancel: 'Cancel',
|
|
3153
|
-
confirm: 'Confirm'
|
|
3154
|
-
},
|
|
3155
|
-
ro: {
|
|
3156
|
-
homeTeam: 'Echipa gazdă:',
|
|
3157
|
-
awayTeam: 'Echipa oaspete:',
|
|
3158
|
-
selectionCleared: 'Selecția dvs. a fost ștearsă.',
|
|
3159
|
-
selectionOnLineCleared: 'Selecția dvs. de pe această linie va fi ștearsă.',
|
|
3160
|
-
loading: `Se încarcă...',n error: 'Eroare!`,
|
|
3161
|
-
noData: 'Nu sunt date disponibile.',
|
|
3162
|
-
lineInfo: 'Linia {currentPage} din {totalPages}',
|
|
3163
|
-
clearAll: 'Șterge tot',
|
|
3164
|
-
cancel: 'Anulează',
|
|
3165
|
-
confirm: 'Confirmă'
|
|
3166
|
-
},
|
|
3167
|
-
fr: {
|
|
3168
|
-
homeTeam: 'Équipe à domicile:',
|
|
3169
|
-
awayTeam: `Équipe à l'extérieur:`,
|
|
3170
|
-
selectionCleared: 'Votre sélection a été effacée.',
|
|
3171
|
-
selectionOnLineCleared: 'Votre sélection sur cette ligne sera effacée.',
|
|
3172
|
-
loading: `Chargement...',n error: 'Erreur!`,
|
|
3173
|
-
noData: 'Aucune donnée disponible.',
|
|
3174
|
-
lineInfo: 'Ligne {currentPage} sur {totalPages}',
|
|
3175
|
-
clearAll: 'Tout effacer',
|
|
3176
|
-
cancel: 'Annuler',
|
|
3177
|
-
confirm: 'Confirmer'
|
|
3178
|
-
},
|
|
3179
|
-
ar: {
|
|
3180
|
-
homeTeam: 'الفريق المضيف:',
|
|
3181
|
-
awayTeam: 'الفريق الضيف:',
|
|
3182
|
-
selectionCleared: 'تم مسح اختيارك.',
|
|
3183
|
-
selectionOnLineCleared: 'سيتم مسح اختيارك في هذا السطر.',
|
|
3184
|
-
loading: `جار التحميل...',n error: 'خطأ!`,
|
|
3185
|
-
noData: 'لا توجد بيانات متاحة.',
|
|
3186
|
-
lineInfo: 'السطر {currentPage} من {totalPages}',
|
|
3187
|
-
clearAll: 'مسح الكل',
|
|
3188
|
-
cancel: 'إلغاء',
|
|
3189
|
-
confirm: 'تأكيد'
|
|
3190
|
-
},
|
|
3191
|
-
hr: {
|
|
3192
|
-
homeTeam: 'Domaći tim:',
|
|
3193
|
-
awayTeam: 'Gostujući tim:',
|
|
3194
|
-
selectionCleared: 'Vaš odabir je obrisan.',
|
|
3195
|
-
selectionOnLineCleared: 'Vaš odabir na ovoj liniji bit će obrisan.',
|
|
3196
|
-
loading: `Učitavanje...',n error: 'Greška!`,
|
|
3197
|
-
noData: 'Nema dostupnih podataka.',
|
|
3198
|
-
lineInfo: 'Linija {currentPage} od {totalPages}',
|
|
3199
|
-
clearAll: 'Očisti sve',
|
|
3200
|
-
cancel: 'Odustani',
|
|
3201
|
-
confirm: 'Potvrdi'
|
|
3202
|
-
}
|
|
3203
|
-
};
|
|
3204
|
-
const translate = (key, customLang, replacements) => {
|
|
3205
|
-
const lang = customLang;
|
|
3206
|
-
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
3207
|
-
if (replacements) {
|
|
3208
|
-
Object.keys(replacements).forEach((placeholder) => {
|
|
3209
|
-
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
3210
|
-
});
|
|
3211
|
-
}
|
|
3212
|
-
return translation;
|
|
3213
|
-
};
|
|
3214
|
-
const getTranslations = (data) => {
|
|
3215
|
-
Object.keys(data).forEach((item) => {
|
|
3216
|
-
for (let key in data[item]) {
|
|
3217
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
3218
|
-
}
|
|
3219
|
-
});
|
|
3220
|
-
};
|
|
3221
|
-
|
|
3222
|
-
const formatDate = ({ date, type = 'date', format: format$1 }) => {
|
|
3223
|
-
try {
|
|
3224
|
-
const parsedDate = parseISO(date);
|
|
3225
|
-
if (isNaN(parsedDate.getTime())) {
|
|
3226
|
-
throw new Error(`Invalid date: ${date}`);
|
|
3227
|
-
}
|
|
3228
|
-
if (format$1)
|
|
3229
|
-
return format(parsedDate, format$1);
|
|
3230
|
-
let formatStr = 'dd/MM/yyyy';
|
|
3231
|
-
if (type === 'time') {
|
|
3232
|
-
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
3233
|
-
}
|
|
3234
|
-
else if (type === 'week') {
|
|
3235
|
-
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
3236
|
-
}
|
|
3237
|
-
return format(parsedDate, formatStr);
|
|
3238
|
-
}
|
|
3239
|
-
catch (error) {
|
|
3240
|
-
console.error('Error formatting date:', error.message);
|
|
3241
|
-
return '';
|
|
3242
|
-
}
|
|
3243
|
-
};
|
|
3244
|
-
const fetcher = (url) => fetch(url).then((r) => r.json());
|
|
3245
|
-
const DEFAULT_BULLET_CONFIG = [
|
|
3246
|
-
{
|
|
3247
|
-
value: '1'
|
|
3248
|
-
},
|
|
3249
|
-
{
|
|
3250
|
-
value: 'X'
|
|
3251
|
-
},
|
|
3252
|
-
{
|
|
3253
|
-
value: '2'
|
|
3254
|
-
}
|
|
3255
|
-
];
|
|
3256
|
-
const SPLIT_TOKEN = '-';
|
|
3257
|
-
const showNotification = ({ message, theme = 'success', position = 'top-end', duration = 3000 }) => {
|
|
3258
|
-
if (!customElements.get('vaadin-notification')) {
|
|
3259
|
-
console.warn('vaadin-notification is not registered. Please ensure it is imported.');
|
|
3260
|
-
}
|
|
3261
|
-
const notification = document.createElement('vaadin-notification');
|
|
3262
|
-
notification.renderer = (root) => {
|
|
3263
|
-
root.textContent = message;
|
|
3264
|
-
};
|
|
3265
|
-
notification.duration = duration;
|
|
3266
|
-
if (theme) {
|
|
3267
|
-
notification.setAttribute('theme', theme);
|
|
3268
|
-
}
|
|
3269
|
-
notification.setAttribute('position', position);
|
|
3270
|
-
document.body.appendChild(notification);
|
|
3271
|
-
notification.opened = true;
|
|
3272
|
-
};
|
|
3273
|
-
|
|
3274
3086
|
var ka=Object.defineProperty,Ta=Object.defineProperties;var Pa=Object.getOwnPropertyDescriptors;var mo=Object.getOwnPropertySymbols;var Oa=Object.prototype.hasOwnProperty,Da=Object.prototype.propertyIsEnumerable;var ri=(s,t,e)=>t in s?ka(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,U=(s,t)=>{for(var e in t||(t={}))Oa.call(t,e)&&ri(s,e,t[e]);if(mo)for(var e of mo(t))Da.call(t,e)&&ri(s,e,t[e]);return s},Me=(s,t)=>Ta(s,Pa(t));var b=(s,t,e)=>(ri(s,typeof t!="symbol"?t+"":t,e),e);var Ne=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
|
|
3275
3087
|
* @license
|
|
3276
3088
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -10256,986 +10068,2159 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10256
10068
|
}
|
|
10257
10069
|
}
|
|
10258
10070
|
|
|
10259
|
-
:host([slot='middle'][opening]) {
|
|
10260
|
-
animation: lumo-notification-enter-fade-in 300ms;
|
|
10261
|
-
}
|
|
10071
|
+
:host([slot='middle'][opening]) {
|
|
10072
|
+
animation: lumo-notification-enter-fade-in 300ms;
|
|
10073
|
+
}
|
|
10074
|
+
|
|
10075
|
+
:host([slot='middle'][closing]) {
|
|
10076
|
+
animation: lumo-notification-exit-fade-out 300ms;
|
|
10077
|
+
}
|
|
10078
|
+
|
|
10079
|
+
:host([slot^='top'][opening]) {
|
|
10080
|
+
animation: lumo-notification-enter-slide-down 300ms;
|
|
10081
|
+
}
|
|
10082
|
+
|
|
10083
|
+
:host([slot^='top'][closing]) {
|
|
10084
|
+
animation: lumo-notification-exit-slide-up 300ms;
|
|
10085
|
+
}
|
|
10086
|
+
|
|
10087
|
+
:host([slot^='bottom'][opening]) {
|
|
10088
|
+
animation: lumo-notification-enter-slide-up 300ms;
|
|
10089
|
+
}
|
|
10090
|
+
|
|
10091
|
+
:host([slot^='bottom'][closing]) {
|
|
10092
|
+
animation: lumo-notification-exit-slide-down 300ms;
|
|
10093
|
+
}
|
|
10094
|
+
|
|
10095
|
+
:host([theme='success']) {
|
|
10096
|
+
--_focus-ring-gap-color: var(--lumo-success-color);
|
|
10097
|
+
--vaadin-focus-ring-color: var(--lumo-success-contrast-color);
|
|
10098
|
+
}
|
|
10099
|
+
|
|
10100
|
+
:host([theme='warning']) {
|
|
10101
|
+
--_focus-ring-gap-color: var(--lumo-warning-color);
|
|
10102
|
+
--vaadin-focus-ring-color: var(--lumo-warning-contrast-color);
|
|
10103
|
+
}
|
|
10104
|
+
|
|
10105
|
+
:host([theme='error']) {
|
|
10106
|
+
--_focus-ring-gap-color: var(--lumo-error-color);
|
|
10107
|
+
--vaadin-focus-ring-color: var(--lumo-error-contrast-color);
|
|
10108
|
+
}
|
|
10109
|
+
|
|
10110
|
+
:host([theme='primary']) {
|
|
10111
|
+
--_focus-ring-gap-color: var(--lumo-primary-color);
|
|
10112
|
+
--vaadin-focus-ring-color: var(--lumo-primary-contrast-color);
|
|
10113
|
+
}
|
|
10114
|
+
|
|
10115
|
+
:host([theme~='primary']) [part='overlay'] {
|
|
10116
|
+
background: var(--lumo-primary-color);
|
|
10117
|
+
color: var(--lumo-primary-contrast-color);
|
|
10118
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10119
|
+
}
|
|
10120
|
+
|
|
10121
|
+
:host([theme~='primary']) {
|
|
10122
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10123
|
+
--vaadin-button-text-color: var(--lumo-primary-contrast-color);
|
|
10124
|
+
--vaadin-button-primary-background: var(--lumo-primary-contrast-color);
|
|
10125
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-text-color);
|
|
10126
|
+
}
|
|
10127
|
+
|
|
10128
|
+
:host([theme~='contrast']) [part='overlay'] {
|
|
10129
|
+
background: var(--lumo-contrast);
|
|
10130
|
+
color: var(--lumo-base-color);
|
|
10131
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10132
|
+
}
|
|
10133
|
+
|
|
10134
|
+
:host([theme~='contrast']) {
|
|
10135
|
+
--vaadin-button-background: var(--lumo-contrast-20pct);
|
|
10136
|
+
--vaadin-button-text-color: var(--lumo-base-color);
|
|
10137
|
+
--vaadin-button-primary-background: var(--lumo-base-color);
|
|
10138
|
+
--vaadin-button-primary-text-color: var(--lumo-contrast);
|
|
10139
|
+
}
|
|
10140
|
+
|
|
10141
|
+
:host([theme~='success']) [part='overlay'] {
|
|
10142
|
+
background: var(--lumo-success-color);
|
|
10143
|
+
color: var(--lumo-success-contrast-color);
|
|
10144
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10145
|
+
}
|
|
10146
|
+
|
|
10147
|
+
:host([theme~='success']) {
|
|
10148
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10149
|
+
--vaadin-button-text-color: var(--lumo-success-contrast-color);
|
|
10150
|
+
--vaadin-button-primary-background: var(--lumo-success-contrast-color);
|
|
10151
|
+
--vaadin-button-primary-text-color: var(--lumo-success-text-color);
|
|
10152
|
+
}
|
|
10153
|
+
|
|
10154
|
+
:host([theme~='error']) [part='overlay'] {
|
|
10155
|
+
background: var(--lumo-error-color);
|
|
10156
|
+
color: var(--lumo-error-contrast-color);
|
|
10157
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10158
|
+
}
|
|
10159
|
+
|
|
10160
|
+
:host([theme~='error']) {
|
|
10161
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10162
|
+
--vaadin-button-text-color: var(--lumo-error-contrast-color);
|
|
10163
|
+
--vaadin-button-primary-background: var(--lumo-error-contrast-color);
|
|
10164
|
+
--vaadin-button-primary-text-color: var(--lumo-error-text-color);
|
|
10165
|
+
}
|
|
10166
|
+
|
|
10167
|
+
:host([theme~='warning']) [part='overlay'] {
|
|
10168
|
+
background: var(--lumo-warning-color);
|
|
10169
|
+
color: var(--lumo-warning-contrast-color);
|
|
10170
|
+
box-shadow:
|
|
10171
|
+
inset 0 0 0 1px var(--lumo-contrast-20pct),
|
|
10172
|
+
var(--lumo-box-shadow-l);
|
|
10173
|
+
}
|
|
10174
|
+
|
|
10175
|
+
:host([theme~='warning']) {
|
|
10176
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10177
|
+
--vaadin-button-text-color: var(--lumo-warning-contrast-color);
|
|
10178
|
+
--vaadin-button-primary-background: var(--lumo-shade-50pct);
|
|
10179
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
10180
|
+
}
|
|
10181
|
+
`,{moduleId:"lumo-notification-card"});/**
|
|
10182
|
+
* @license
|
|
10183
|
+
* Copyright 2020 Google LLC
|
|
10184
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
10185
|
+
*/const S_=(s,t)=>(s==null?void 0:s._$litType$)!==void 0;/**
|
|
10186
|
+
* @license
|
|
10187
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10188
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10189
|
+
*/class k_ extends On(I(q(g))){static get template(){return v`
|
|
10190
|
+
<style>
|
|
10191
|
+
:host {
|
|
10192
|
+
position: fixed;
|
|
10193
|
+
z-index: 1000;
|
|
10194
|
+
top: 0;
|
|
10195
|
+
left: 0;
|
|
10196
|
+
bottom: 0;
|
|
10197
|
+
right: 0;
|
|
10198
|
+
box-sizing: border-box;
|
|
10199
|
+
|
|
10200
|
+
display: flex;
|
|
10201
|
+
flex-direction: column;
|
|
10202
|
+
align-items: stretch;
|
|
10203
|
+
pointer-events: none;
|
|
10204
|
+
}
|
|
10205
|
+
|
|
10206
|
+
[region-group] {
|
|
10207
|
+
flex: 1 1 0%;
|
|
10208
|
+
display: flex;
|
|
10209
|
+
}
|
|
10210
|
+
|
|
10211
|
+
[region-group='top'] {
|
|
10212
|
+
align-items: flex-start;
|
|
10213
|
+
}
|
|
10214
|
+
|
|
10215
|
+
[region-group='bottom'] {
|
|
10216
|
+
align-items: flex-end;
|
|
10217
|
+
}
|
|
10218
|
+
|
|
10219
|
+
[region-group] > [region] {
|
|
10220
|
+
flex: 1 1 0%;
|
|
10221
|
+
}
|
|
10222
|
+
|
|
10223
|
+
@media (max-width: 420px) {
|
|
10224
|
+
[region-group] {
|
|
10225
|
+
flex-direction: column;
|
|
10226
|
+
align-items: stretch;
|
|
10227
|
+
}
|
|
10228
|
+
|
|
10229
|
+
[region-group='top'] {
|
|
10230
|
+
justify-content: flex-start;
|
|
10231
|
+
}
|
|
10232
|
+
|
|
10233
|
+
[region-group='bottom'] {
|
|
10234
|
+
justify-content: flex-end;
|
|
10235
|
+
}
|
|
10236
|
+
|
|
10237
|
+
[region-group] > [region] {
|
|
10238
|
+
flex: initial;
|
|
10239
|
+
}
|
|
10240
|
+
}
|
|
10241
|
+
</style>
|
|
10242
|
+
|
|
10243
|
+
<div region="top-stretch"><slot name="top-stretch"></slot></div>
|
|
10244
|
+
<div region-group="top">
|
|
10245
|
+
<div region="top-start"><slot name="top-start"></slot></div>
|
|
10246
|
+
<div region="top-center"><slot name="top-center"></slot></div>
|
|
10247
|
+
<div region="top-end"><slot name="top-end"></slot></div>
|
|
10248
|
+
</div>
|
|
10249
|
+
<div region="middle"><slot name="middle"></slot></div>
|
|
10250
|
+
<div region-group="bottom">
|
|
10251
|
+
<div region="bottom-start"><slot name="bottom-start"></slot></div>
|
|
10252
|
+
<div region="bottom-center"><slot name="bottom-center"></slot></div>
|
|
10253
|
+
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
10254
|
+
</div>
|
|
10255
|
+
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
10256
|
+
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),qs&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class T_ extends I(g){static get template(){return v`
|
|
10257
|
+
<style>
|
|
10258
|
+
:host {
|
|
10259
|
+
display: block;
|
|
10260
|
+
}
|
|
10261
|
+
|
|
10262
|
+
[part='overlay'] {
|
|
10263
|
+
pointer-events: auto;
|
|
10264
|
+
}
|
|
10265
|
+
|
|
10266
|
+
@media (forced-colors: active) {
|
|
10267
|
+
[part='overlay'] {
|
|
10268
|
+
outline: 3px solid;
|
|
10269
|
+
}
|
|
10270
|
+
}
|
|
10271
|
+
</style>
|
|
10272
|
+
|
|
10273
|
+
<div part="overlay">
|
|
10274
|
+
<div part="content">
|
|
10275
|
+
<slot></slot>
|
|
10276
|
+
</div>
|
|
10277
|
+
</div>
|
|
10278
|
+
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class K extends ct($t(q(g))){static get template(){return v`
|
|
10279
|
+
<style>
|
|
10280
|
+
:host {
|
|
10281
|
+
display: none !important;
|
|
10282
|
+
}
|
|
10283
|
+
</style>
|
|
10284
|
+
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
10285
|
+
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return S_(t)?K._createAndShowNotification(i=>{Sr(t,i);},e):K._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(K.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return K._container||(K._container=document.createElement("vaadin-notification-container"),document.body.appendChild(K._container)),K._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),to(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard();}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener);}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1;}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card);}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"));}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard();}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(k_);x(T_);x(K);const Ea=p`
|
|
10286
|
+
:host {
|
|
10287
|
+
-webkit-tap-highlight-color: transparent;
|
|
10288
|
+
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
10289
|
+
}
|
|
10290
|
+
|
|
10291
|
+
/* Dividers */
|
|
10292
|
+
[part='items'] ::slotted(hr) {
|
|
10293
|
+
height: 1px;
|
|
10294
|
+
border: 0;
|
|
10295
|
+
padding: 0;
|
|
10296
|
+
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
10297
|
+
background-color: var(--lumo-contrast-10pct);
|
|
10298
|
+
}
|
|
10299
|
+
`;f("vaadin-list-box",Ea,{moduleId:"lumo-list-box"});/**
|
|
10300
|
+
* @license
|
|
10301
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10302
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10303
|
+
*/f("vaadin-select-item",eo,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",Ea,{moduleId:"lumo-select-list-box"});const P_=p`
|
|
10304
|
+
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
10305
|
+
text-align: start;
|
|
10306
|
+
}
|
|
10307
|
+
|
|
10308
|
+
[part='input-field'] {
|
|
10309
|
+
cursor: var(--lumo-clickable-cursor);
|
|
10310
|
+
}
|
|
10311
|
+
|
|
10312
|
+
[part='input-field'] ::slotted([slot='value']) {
|
|
10313
|
+
font-weight: var(--vaadin-input-field-value-font-weight, 500);
|
|
10314
|
+
}
|
|
10315
|
+
|
|
10316
|
+
[part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
10317
|
+
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
10318
|
+
}
|
|
10319
|
+
|
|
10320
|
+
:host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
10321
|
+
color: var(--lumo-secondary-text-color);
|
|
10322
|
+
}
|
|
10323
|
+
|
|
10324
|
+
/* placeholder styles */
|
|
10325
|
+
[part='input-field'] ::slotted([slot='value'][placeholder]) {
|
|
10326
|
+
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
10327
|
+
}
|
|
10328
|
+
|
|
10329
|
+
:host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
|
|
10330
|
+
opacity: 0;
|
|
10331
|
+
}
|
|
10262
10332
|
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10333
|
+
[part='toggle-button']::before {
|
|
10334
|
+
content: var(--lumo-icons-dropdown);
|
|
10335
|
+
}
|
|
10266
10336
|
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10337
|
+
/* Highlight the toggle button when hovering over the entire component */
|
|
10338
|
+
:host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
|
|
10339
|
+
color: var(--lumo-contrast-80pct);
|
|
10340
|
+
}
|
|
10270
10341
|
|
|
10271
|
-
|
|
10272
|
-
|
|
10342
|
+
:host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
|
|
10343
|
+
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
10344
|
+
--_lumo-selected-item-padding: 0;
|
|
10345
|
+
}
|
|
10346
|
+
`;f("vaadin-select",[Oe,P_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
10347
|
+
:host {
|
|
10348
|
+
font-family: var(--lumo-font-family);
|
|
10349
|
+
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
10350
|
+
padding: 0 0.25em;
|
|
10351
|
+
--_lumo-selected-item-height: var(--lumo-size-m);
|
|
10352
|
+
--_lumo-selected-item-padding: 0.5em;
|
|
10273
10353
|
}
|
|
10274
10354
|
|
|
10275
|
-
|
|
10276
|
-
|
|
10355
|
+
::slotted(*) {
|
|
10356
|
+
min-height: var(--_lumo-selected-item-height);
|
|
10357
|
+
padding-top: var(--_lumo-selected-item-padding);
|
|
10358
|
+
padding-bottom: var(--_lumo-selected-item-padding);
|
|
10359
|
+
font-size: inherit;
|
|
10277
10360
|
}
|
|
10278
10361
|
|
|
10279
|
-
|
|
10280
|
-
|
|
10362
|
+
::slotted(*:hover) {
|
|
10363
|
+
background-color: transparent;
|
|
10281
10364
|
}
|
|
10365
|
+
`,{moduleId:"lumo-select-value-button"});const O_=p`
|
|
10366
|
+
:host {
|
|
10367
|
+
--_lumo-item-selected-icon-display: block;
|
|
10368
|
+
}
|
|
10282
10369
|
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10370
|
+
/* Small viewport adjustment */
|
|
10371
|
+
:host([phone]) {
|
|
10372
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
10373
|
+
top: 0 !important;
|
|
10374
|
+
right: 0 !important;
|
|
10375
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
10376
|
+
left: 0 !important;
|
|
10377
|
+
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
10378
|
+
align-items: stretch;
|
|
10379
|
+
justify-content: flex-end;
|
|
10380
|
+
}
|
|
10287
10381
|
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
}
|
|
10382
|
+
:host([no-vertical-overlap][top-aligned]) [part='overlay'] {
|
|
10383
|
+
margin-block-start: var(--lumo-space-xs);
|
|
10384
|
+
}
|
|
10292
10385
|
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
}
|
|
10386
|
+
:host([no-vertical-overlap][bottom-aligned]) [part='overlay'] {
|
|
10387
|
+
margin-block-end: var(--lumo-space-xs);
|
|
10388
|
+
}
|
|
10297
10389
|
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
}
|
|
10390
|
+
:host([theme~='align-left']) {
|
|
10391
|
+
text-align: left;
|
|
10392
|
+
}
|
|
10302
10393
|
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
10307
|
-
}
|
|
10394
|
+
:host([theme~='align-right']) {
|
|
10395
|
+
text-align: right;
|
|
10396
|
+
}
|
|
10308
10397
|
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10398
|
+
:host([theme~='align-center']) {
|
|
10399
|
+
text-align: center;
|
|
10400
|
+
}
|
|
10401
|
+
`;f("vaadin-select-overlay",[Hs,O_],{moduleId:"lumo-select-overlay"});/**
|
|
10402
|
+
* @license
|
|
10403
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10404
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10405
|
+
*/const D_=s=>class extends Ds(fe(s)){static get properties(){return {_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return ["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e;}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e);}focus(){this.disabled||(super.focus(),this._setFocused(!0));}_shouldSetActive(e){return !this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e);}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur());}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click());}};/**
|
|
10406
|
+
* @license
|
|
10407
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10408
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10409
|
+
*/class z_ extends D_(I(R(g))){static get is(){return "vaadin-select-item"}static get template(){return v`
|
|
10410
|
+
<style>
|
|
10411
|
+
:host {
|
|
10412
|
+
display: inline-block;
|
|
10413
|
+
}
|
|
10315
10414
|
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10415
|
+
:host([hidden]) {
|
|
10416
|
+
display: none !important;
|
|
10417
|
+
}
|
|
10418
|
+
</style>
|
|
10419
|
+
<span part="checkmark" aria-hidden="true"></span>
|
|
10420
|
+
<div part="content">
|
|
10421
|
+
<slot></slot>
|
|
10422
|
+
</div>
|
|
10423
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}x(z_);/**
|
|
10424
|
+
* @license
|
|
10425
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10426
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10427
|
+
*/function M_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function N_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
10428
|
+
* @license
|
|
10429
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
10430
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10431
|
+
*/const L_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Ns)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Ki(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Ki(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
10432
|
+
* @license
|
|
10433
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10434
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10435
|
+
*/const V_=s=>class extends L_(s){static get properties(){return {disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return ["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return !this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Ki(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Ss(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=M.debounce(this._searchReset,ie.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=M_(this._scrollerElement,i)+e;N_(this._scrollerElement,i,o);}}};/**
|
|
10436
|
+
* @license
|
|
10437
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10438
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10439
|
+
*/class B_ extends V_(I(R(J(g)))){static get is(){return "vaadin-select-list-box"}static get template(){return v`
|
|
10440
|
+
<style>
|
|
10441
|
+
:host {
|
|
10442
|
+
display: flex;
|
|
10443
|
+
}
|
|
10321
10444
|
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
--vaadin-button-primary-background: var(--lumo-base-color);
|
|
10326
|
-
--vaadin-button-primary-text-color: var(--lumo-contrast);
|
|
10327
|
-
}
|
|
10445
|
+
:host([hidden]) {
|
|
10446
|
+
display: none !important;
|
|
10447
|
+
}
|
|
10328
10448
|
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10449
|
+
[part='items'] {
|
|
10450
|
+
height: 100%;
|
|
10451
|
+
width: 100%;
|
|
10452
|
+
overflow-y: auto;
|
|
10453
|
+
-webkit-overflow-scrolling: touch;
|
|
10454
|
+
}
|
|
10455
|
+
</style>
|
|
10456
|
+
<div part="items">
|
|
10457
|
+
<slot></slot>
|
|
10458
|
+
</div>
|
|
10459
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(B_);/**
|
|
10460
|
+
* @license
|
|
10461
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10462
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10463
|
+
*/const F_=s=>class extends Us(Jt(R(s))){static get observers(){return ["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0;}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
10464
|
+
* @license
|
|
10465
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10466
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10467
|
+
*/const R_=p`
|
|
10468
|
+
:host {
|
|
10469
|
+
align-items: flex-start;
|
|
10470
|
+
justify-content: flex-start;
|
|
10471
|
+
}
|
|
10334
10472
|
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
--vaadin-button-primary-background: var(--lumo-success-contrast-color);
|
|
10339
|
-
--vaadin-button-primary-text-color: var(--lumo-success-text-color);
|
|
10340
|
-
}
|
|
10473
|
+
:host(:not([phone])) [part='overlay'] {
|
|
10474
|
+
min-width: var(--vaadin-select-overlay-width, var(--vaadin-select-text-field-width));
|
|
10475
|
+
}
|
|
10341
10476
|
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
10477
|
+
@media (forced-colors: active) {
|
|
10478
|
+
[part='overlay'] {
|
|
10479
|
+
outline: 3px solid;
|
|
10346
10480
|
}
|
|
10481
|
+
}
|
|
10482
|
+
`;f("vaadin-select-overlay",[Kt,R_],{moduleId:"vaadin-select-overlay-styles"});class $_ extends F_(I(g)){static get is(){return "vaadin-select-overlay"}static get template(){return v`
|
|
10483
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
10484
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
10485
|
+
<div part="content" id="content">
|
|
10486
|
+
<slot></slot>
|
|
10487
|
+
</div>
|
|
10488
|
+
</div>
|
|
10489
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x($_);/**
|
|
10490
|
+
* @license
|
|
10491
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10492
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10493
|
+
*/const H_=p`
|
|
10494
|
+
:host {
|
|
10495
|
+
display: inline-block;
|
|
10496
|
+
position: relative;
|
|
10497
|
+
outline: none;
|
|
10498
|
+
white-space: nowrap;
|
|
10499
|
+
-webkit-user-select: none;
|
|
10500
|
+
-moz-user-select: none;
|
|
10501
|
+
user-select: none;
|
|
10502
|
+
min-width: 0;
|
|
10503
|
+
width: 0;
|
|
10504
|
+
}
|
|
10347
10505
|
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
}
|
|
10506
|
+
::slotted(*) {
|
|
10507
|
+
padding-left: 0;
|
|
10508
|
+
padding-right: 0;
|
|
10509
|
+
flex: auto;
|
|
10510
|
+
}
|
|
10354
10511
|
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10512
|
+
/* placeholder styles */
|
|
10513
|
+
::slotted(*:not([selected])) {
|
|
10514
|
+
line-height: 1;
|
|
10515
|
+
}
|
|
10516
|
+
|
|
10517
|
+
.vaadin-button-container {
|
|
10518
|
+
display: inline-flex;
|
|
10519
|
+
align-items: center;
|
|
10520
|
+
justify-content: center;
|
|
10521
|
+
text-align: inherit;
|
|
10522
|
+
width: 100%;
|
|
10523
|
+
height: 100%;
|
|
10524
|
+
min-height: inherit;
|
|
10525
|
+
text-shadow: inherit;
|
|
10526
|
+
}
|
|
10362
10527
|
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10528
|
+
[part='label'] {
|
|
10529
|
+
white-space: nowrap;
|
|
10530
|
+
overflow: hidden;
|
|
10531
|
+
text-overflow: ellipsis;
|
|
10532
|
+
width: 100%;
|
|
10533
|
+
line-height: inherit;
|
|
10534
|
+
}
|
|
10535
|
+
`;/**
|
|
10370
10536
|
* @license
|
|
10371
|
-
* Copyright
|
|
10372
|
-
*
|
|
10373
|
-
*/
|
|
10537
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10538
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10539
|
+
*/f("vaadin-select-value-button",H_,{moduleId:"vaadin-select-value-button-styles"});class q_ extends Ws(I(g)){static get is(){return "vaadin-select-value-button"}static get template(){return v`
|
|
10540
|
+
<div class="vaadin-button-container">
|
|
10541
|
+
<span part="label">
|
|
10542
|
+
<slot></slot>
|
|
10543
|
+
</span>
|
|
10544
|
+
</div>
|
|
10545
|
+
`}}x(q_);/**
|
|
10546
|
+
* @license
|
|
10547
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10548
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10549
|
+
*/const U_=p`
|
|
10550
|
+
.sr-only {
|
|
10551
|
+
border: 0 !important;
|
|
10552
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
10553
|
+
-webkit-clip-path: inset(50%) !important;
|
|
10554
|
+
clip-path: inset(50%) !important;
|
|
10555
|
+
height: 1px !important;
|
|
10556
|
+
margin: -1px !important;
|
|
10557
|
+
overflow: hidden !important;
|
|
10558
|
+
padding: 0 !important;
|
|
10559
|
+
position: absolute !important;
|
|
10560
|
+
width: 1px !important;
|
|
10561
|
+
white-space: nowrap !important;
|
|
10562
|
+
}
|
|
10563
|
+
`;/**
|
|
10564
|
+
* @license
|
|
10565
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
10566
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10567
|
+
*/class W_ extends D{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(e,i)=>{i._setFocusElement(e),i.ariaTarget=e,i.stateTarget=e,e.setAttribute("aria-haspopup","listbox");}});}}/**
|
|
10374
10568
|
* @license
|
|
10375
10569
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10376
10570
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10377
|
-
*/class
|
|
10571
|
+
*/const j_=s=>class extends ct(Wt(Ls(me(jt(s))))){static get properties(){return {items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return [...super.delegateAttrs,"invalid"]}static get observers(){return ["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${lt()}`,this._srLabelController=new Cn(this),this._srLabelController.slotName="sr-label";}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new W_(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Xs(this._phoneMediaQuery,e=>{this._phone=e;})),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController);}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items));}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}__itemsChanged(e,i){(e||i)&&this.requestContentUpdate();}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e);}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",i=>this._onKeyDownInside(i),!0),e.addEventListener("click",i=>{const o=i.composedPath().find(r=>r._hasVaadinItemMixin);this.__dispatchChangePending=!!(o&&o.value!==void 0&&o.value!==this.value),this.opened=!1;},!0),this.__lastMenuElement=e);}__initMenuItems(e){e.items&&(this._items=e.items);}_valueChanged(e,i){this.toggleAttribute("has-value",!!e),i!==void 0&&!this.__dispatchChangePending&&this.validate();}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly);}_onToggleMouseDown(e){e.preventDefault();}_onKeyDown(e){if(e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&e.key.length===1){const i=this._menuElement.selected,o=i!==void 0?i:-1,r=this._menuElement._searchKey(o,e.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r);}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1);}_openedChanged(e,i,o){if(!(!i||!o)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),i.style.setProperty("--vaadin-select-text-field-width",`${o.offsetWidth}px`);const r=this.hasAttribute("focus-ring");this._openedWithFocusRing=r,r&&this.removeAttribute("focus-ring");}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e;}}_updateAriaExpanded(e,i){i&&i.setAttribute("aria-expanded",e?"true":"false");}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"));}__attachSelectedItem(e){let i;const o=e.getAttribute("label");o?i=this.__createItemElement({label:o}):i=e.cloneNode(!0),i._sourceItem=e,this.__appendValueItemElement(i,this.focusElement),i.selected=!0;}__createItemElement(e){const i=document.createElement(e.component||"vaadin-select-item");return e.label&&(i.textContent=e.label),e.value&&(i.value=e.value),e.disabled&&(i.disabled=e.disabled),e.className&&(i.className=e.className),i}__appendValueItemElement(e,i){i.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId);}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null);}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e);}_setCustomAriaLabelledBy(e){const i=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(i,!0);}_getLabelIdWithItemId(e){const o=(this._items?this._items[this._menuElement.selected]:!1)||this.placeholder?this._itemId:"";return e?`${e} ${o}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const i=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){const r=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(r,e),e.setAttribute("placeholder","");}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const o=i||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};we(e,"aria-labelledby",o),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId);}_hasContent(e){if(!e)return !1;const i=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),o=e.childElementCount>0;return i||o}_updateSelectedItem(e,i){if(i){const o=e==null?e:e.toString();this._menuElement.selected=i.reduce((r,n,a)=>r===void 0&&n.value===o?a:r,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging);}}_shouldRemoveFocus(){return !this.opened}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}checkValidity(){return !this.required||this.readonly||!!this.value}__defaultRenderer(e,i){if(!this.items||this.items.length===0){e.textContent="";return}let o=e.firstElementChild;o||(o=document.createElement("vaadin-select-list-box"),e.appendChild(o)),o.textContent="",this.items.forEach(r=>{o.appendChild(this.__createItemElement(r));});}__dispatchChange(){return Ne(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1;})}};/**
|
|
10572
|
+
* @license
|
|
10573
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10574
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10575
|
+
*/f("vaadin-select",[$n,Hn,U_],{moduleId:"vaadin-select-styles"});class Y_ extends j_(q(I(g))){static get is(){return "vaadin-select"}static get template(){return v`
|
|
10378
10576
|
<style>
|
|
10379
10577
|
:host {
|
|
10380
|
-
position:
|
|
10381
|
-
z-index: 1000;
|
|
10382
|
-
top: 0;
|
|
10383
|
-
left: 0;
|
|
10384
|
-
bottom: 0;
|
|
10385
|
-
right: 0;
|
|
10386
|
-
box-sizing: border-box;
|
|
10387
|
-
|
|
10388
|
-
display: flex;
|
|
10389
|
-
flex-direction: column;
|
|
10390
|
-
align-items: stretch;
|
|
10391
|
-
pointer-events: none;
|
|
10578
|
+
position: relative;
|
|
10392
10579
|
}
|
|
10393
10580
|
|
|
10394
|
-
[
|
|
10395
|
-
flex: 1
|
|
10396
|
-
display: flex;
|
|
10581
|
+
::slotted([slot='value']) {
|
|
10582
|
+
flex-grow: 1;
|
|
10397
10583
|
}
|
|
10584
|
+
</style>
|
|
10398
10585
|
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10586
|
+
<div class="vaadin-select-container">
|
|
10587
|
+
<div part="label" on-click="_onClick">
|
|
10588
|
+
<slot name="label"></slot>
|
|
10589
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
10590
|
+
</div>
|
|
10402
10591
|
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10592
|
+
<vaadin-input-container
|
|
10593
|
+
part="input-field"
|
|
10594
|
+
readonly="[[readonly]]"
|
|
10595
|
+
disabled="[[disabled]]"
|
|
10596
|
+
invalid="[[invalid]]"
|
|
10597
|
+
theme$="[[_theme]]"
|
|
10598
|
+
on-click="_onClick"
|
|
10599
|
+
>
|
|
10600
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
10601
|
+
<slot name="value"></slot>
|
|
10602
|
+
<div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
|
|
10603
|
+
</vaadin-input-container>
|
|
10406
10604
|
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10605
|
+
<div part="helper-text">
|
|
10606
|
+
<slot name="helper"></slot>
|
|
10607
|
+
</div>
|
|
10410
10608
|
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
}
|
|
10609
|
+
<div part="error-message">
|
|
10610
|
+
<slot name="error-message"></slot>
|
|
10611
|
+
</div>
|
|
10612
|
+
</div>
|
|
10416
10613
|
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10614
|
+
<vaadin-select-overlay
|
|
10615
|
+
position-target="[[_inputContainer]]"
|
|
10616
|
+
opened="{{opened}}"
|
|
10617
|
+
with-backdrop="[[_phone]]"
|
|
10618
|
+
phone$="[[_phone]]"
|
|
10619
|
+
theme$="[[_theme]]"
|
|
10620
|
+
no-vertical-overlap$="[[noVerticalOverlap]]"
|
|
10621
|
+
on-vaadin-overlay-open="_onOverlayOpen"
|
|
10622
|
+
></vaadin-select-overlay>
|
|
10420
10623
|
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10624
|
+
<slot name="tooltip"></slot>
|
|
10625
|
+
<div class="sr-only">
|
|
10626
|
+
<slot name="sr-label"></slot>
|
|
10627
|
+
</div>
|
|
10628
|
+
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),to(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}x(Y_);const Sa=p`
|
|
10629
|
+
/* Optical centering */
|
|
10630
|
+
:host::before,
|
|
10631
|
+
:host::after {
|
|
10632
|
+
content: '';
|
|
10633
|
+
flex-basis: 0;
|
|
10634
|
+
flex-grow: 1;
|
|
10635
|
+
}
|
|
10424
10636
|
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
}
|
|
10429
|
-
</style>
|
|
10637
|
+
:host::after {
|
|
10638
|
+
flex-grow: 1.1;
|
|
10639
|
+
}
|
|
10430
10640
|
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
<div region="bottom-center"><slot name="bottom-center"></slot></div>
|
|
10441
|
-
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
10442
|
-
</div>
|
|
10443
|
-
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
10444
|
-
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),qs&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class T_ extends I(g){static get template(){return v`
|
|
10445
|
-
<style>
|
|
10446
|
-
:host {
|
|
10447
|
-
display: block;
|
|
10448
|
-
}
|
|
10641
|
+
[part='overlay'] {
|
|
10642
|
+
border-radius: var(--lumo-border-radius-l);
|
|
10643
|
+
box-shadow:
|
|
10644
|
+
0 0 0 1px var(--lumo-shade-5pct),
|
|
10645
|
+
var(--lumo-box-shadow-xl);
|
|
10646
|
+
background-image: none;
|
|
10647
|
+
outline: none;
|
|
10648
|
+
-webkit-tap-highlight-color: transparent;
|
|
10649
|
+
}
|
|
10449
10650
|
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10651
|
+
[part='content'] {
|
|
10652
|
+
padding: var(--lumo-space-l);
|
|
10653
|
+
}
|
|
10453
10654
|
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
}
|
|
10458
|
-
}
|
|
10459
|
-
</style>
|
|
10655
|
+
:host(:is([has-header], [has-title])) [part='header'] + [part='content'] {
|
|
10656
|
+
padding-top: 0;
|
|
10657
|
+
}
|
|
10460
10658
|
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class K extends ct($t(q(g))){static get template(){return v`
|
|
10467
|
-
<style>
|
|
10468
|
-
:host {
|
|
10469
|
-
display: none !important;
|
|
10470
|
-
}
|
|
10471
|
-
</style>
|
|
10472
|
-
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
10473
|
-
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return S_(t)?K._createAndShowNotification(i=>{Sr(t,i);},e):K._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(K.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return K._container||(K._container=document.createElement("vaadin-notification-container"),document.body.appendChild(K._container)),K._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),to(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard();}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener);}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1;}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card);}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"));}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard();}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(k_);x(T_);x(K);const Ea=p`
|
|
10474
|
-
:host {
|
|
10475
|
-
-webkit-tap-highlight-color: transparent;
|
|
10476
|
-
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
10659
|
+
[part='header'],
|
|
10660
|
+
[part='header-content'],
|
|
10661
|
+
[part='footer'] {
|
|
10662
|
+
gap: var(--lumo-space-xs) var(--lumo-space-s);
|
|
10663
|
+
line-height: var(--lumo-line-height-s);
|
|
10477
10664
|
}
|
|
10478
10665
|
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
border: 0;
|
|
10483
|
-
padding: 0;
|
|
10484
|
-
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
10485
|
-
background-color: var(--lumo-contrast-10pct);
|
|
10666
|
+
[part='header'] {
|
|
10667
|
+
padding: var(--lumo-space-m);
|
|
10668
|
+
background-color: var(--lumo-base-color);
|
|
10669
|
+
border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */
|
|
10486
10670
|
}
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10671
|
+
|
|
10672
|
+
[part='footer'] {
|
|
10673
|
+
padding: var(--lumo-space-s) var(--lumo-space-m);
|
|
10674
|
+
background-color: var(--lumo-contrast-5pct);
|
|
10675
|
+
border-radius: 0 0 var(--lumo-border-radius-l) var(--lumo-border-radius-l); /* Needed for Safari */
|
|
10676
|
+
}
|
|
10677
|
+
|
|
10678
|
+
[part='title'] {
|
|
10679
|
+
font-size: var(--lumo-font-size-xl);
|
|
10680
|
+
font-weight: 600;
|
|
10681
|
+
color: var(--lumo-header-text-color);
|
|
10682
|
+
margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
|
|
10683
|
+
}
|
|
10684
|
+
|
|
10685
|
+
/* No padding */
|
|
10686
|
+
:host([theme~='no-padding']) [part='content'] {
|
|
10687
|
+
padding: 0 !important;
|
|
10688
|
+
}
|
|
10689
|
+
|
|
10690
|
+
@media (min-height: 320px) {
|
|
10691
|
+
:host([overflow~='top']) [part='header'] {
|
|
10692
|
+
box-shadow: 0 1px 0 0 var(--lumo-contrast-10pct);
|
|
10693
|
+
}
|
|
10494
10694
|
}
|
|
10495
10695
|
|
|
10496
|
-
|
|
10497
|
-
|
|
10696
|
+
/* Animations */
|
|
10697
|
+
|
|
10698
|
+
:host([opening]),
|
|
10699
|
+
:host([closing]) {
|
|
10700
|
+
animation: 0.25s lumo-overlay-dummy-animation;
|
|
10498
10701
|
}
|
|
10499
10702
|
|
|
10500
|
-
[
|
|
10501
|
-
|
|
10703
|
+
:host([opening]) [part='overlay'] {
|
|
10704
|
+
animation: 0.12s 0.05s vaadin-dialog-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
10502
10705
|
}
|
|
10503
10706
|
|
|
10504
|
-
|
|
10505
|
-
|
|
10707
|
+
@keyframes vaadin-dialog-enter {
|
|
10708
|
+
0% {
|
|
10709
|
+
opacity: 0;
|
|
10710
|
+
transform: scale(0.95);
|
|
10711
|
+
}
|
|
10506
10712
|
}
|
|
10507
10713
|
|
|
10508
|
-
:host([
|
|
10509
|
-
|
|
10714
|
+
:host([closing]) [part='overlay'] {
|
|
10715
|
+
animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
10510
10716
|
}
|
|
10511
10717
|
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
10718
|
+
:host([closing]) [part='backdrop'] {
|
|
10719
|
+
animation-delay: 0.05s;
|
|
10515
10720
|
}
|
|
10516
10721
|
|
|
10517
|
-
|
|
10518
|
-
|
|
10722
|
+
@keyframes vaadin-dialog-exit {
|
|
10723
|
+
100% {
|
|
10724
|
+
opacity: 0;
|
|
10725
|
+
transform: scale(1.02);
|
|
10726
|
+
}
|
|
10519
10727
|
}
|
|
10728
|
+
`;f("vaadin-dialog-overlay",[ht,Sa],{moduleId:"lumo-dialog"});f("vaadin-confirm-dialog-overlay",[ht,Sa,p`
|
|
10729
|
+
[part='header'] ::slotted(h3) {
|
|
10730
|
+
margin-top: 0 !important;
|
|
10731
|
+
margin-bottom: 0 !important;
|
|
10732
|
+
margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
|
|
10733
|
+
}
|
|
10520
10734
|
|
|
10521
|
-
|
|
10522
|
-
|
|
10735
|
+
[part='message'] {
|
|
10736
|
+
width: 25em;
|
|
10737
|
+
min-width: 100%;
|
|
10738
|
+
max-width: 100%;
|
|
10739
|
+
}
|
|
10740
|
+
|
|
10741
|
+
::slotted([slot$='button'][theme~='tertiary']) {
|
|
10742
|
+
padding-left: var(--lumo-space-s);
|
|
10743
|
+
padding-right: var(--lumo-space-s);
|
|
10744
|
+
}
|
|
10745
|
+
|
|
10746
|
+
[part='cancel-button'] {
|
|
10747
|
+
flex-grow: 1;
|
|
10748
|
+
}
|
|
10749
|
+
|
|
10750
|
+
@media (max-width: 360px) {
|
|
10751
|
+
[part='footer'] {
|
|
10752
|
+
flex-direction: column-reverse;
|
|
10753
|
+
align-items: stretch;
|
|
10754
|
+
padding: var(--lumo-space-s) var(--lumo-space-l);
|
|
10755
|
+
gap: var(--lumo-space-s);
|
|
10756
|
+
}
|
|
10757
|
+
|
|
10758
|
+
::slotted([slot$='button']) {
|
|
10759
|
+
width: 100%;
|
|
10760
|
+
margin: 0;
|
|
10761
|
+
}
|
|
10762
|
+
}
|
|
10763
|
+
`],{moduleId:"lumo-confirm-dialog-overlay"});/**
|
|
10764
|
+
* @license
|
|
10765
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10766
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10767
|
+
*/const G_=s=>class extends s{static get properties(){return {opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e;}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"));}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0);}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1);});}_onOverlayOpened(e){e.detail.value===!1&&(this.opened=!1);}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault();}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault();}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront();}};/**
|
|
10768
|
+
* @license
|
|
10769
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10770
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10771
|
+
*/const K_=p`
|
|
10772
|
+
[part='header'],
|
|
10773
|
+
[part='header-content'],
|
|
10774
|
+
[part='footer'] {
|
|
10775
|
+
display: flex;
|
|
10776
|
+
align-items: center;
|
|
10777
|
+
flex-wrap: wrap;
|
|
10778
|
+
flex: none;
|
|
10779
|
+
pointer-events: none;
|
|
10780
|
+
z-index: 1;
|
|
10523
10781
|
}
|
|
10524
10782
|
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
color: var(--lumo-contrast-80pct);
|
|
10783
|
+
[part='header'] {
|
|
10784
|
+
flex-wrap: nowrap;
|
|
10528
10785
|
}
|
|
10529
10786
|
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10787
|
+
::slotted([slot='header-content']),
|
|
10788
|
+
::slotted([slot='title']),
|
|
10789
|
+
::slotted([slot='footer']) {
|
|
10790
|
+
display: contents;
|
|
10791
|
+
pointer-events: auto;
|
|
10533
10792
|
}
|
|
10534
|
-
`;f("vaadin-select",[Oe,P_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
10535
|
-
:host {
|
|
10536
|
-
font-family: var(--lumo-font-family);
|
|
10537
|
-
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
10538
|
-
padding: 0 0.25em;
|
|
10539
|
-
--_lumo-selected-item-height: var(--lumo-size-m);
|
|
10540
|
-
--_lumo-selected-item-padding: 0.5em;
|
|
10541
|
-
}
|
|
10542
10793
|
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
font-size: inherit;
|
|
10548
|
-
}
|
|
10794
|
+
::slotted([slot='title']) {
|
|
10795
|
+
font: inherit !important;
|
|
10796
|
+
overflow-wrap: anywhere;
|
|
10797
|
+
}
|
|
10549
10798
|
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
}
|
|
10553
|
-
`,{moduleId:"lumo-select-value-button"});const O_=p`
|
|
10554
|
-
:host {
|
|
10555
|
-
--_lumo-item-selected-icon-display: block;
|
|
10799
|
+
[part='header-content'] {
|
|
10800
|
+
flex: 1;
|
|
10556
10801
|
}
|
|
10557
10802
|
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
10561
|
-
top: 0 !important;
|
|
10562
|
-
right: 0 !important;
|
|
10563
|
-
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
10564
|
-
left: 0 !important;
|
|
10565
|
-
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
10566
|
-
align-items: stretch;
|
|
10803
|
+
:host([has-title]) [part='header-content'],
|
|
10804
|
+
[part='footer'] {
|
|
10567
10805
|
justify-content: flex-end;
|
|
10568
10806
|
}
|
|
10569
10807
|
|
|
10570
|
-
:host([
|
|
10571
|
-
|
|
10808
|
+
:host(:not([has-title]):not([has-header])) [part='header'],
|
|
10809
|
+
:host(:not([has-header])) [part='header-content'],
|
|
10810
|
+
:host(:not([has-title])) [part='title'],
|
|
10811
|
+
:host(:not([has-footer])) [part='footer'] {
|
|
10812
|
+
display: none !important;
|
|
10572
10813
|
}
|
|
10573
10814
|
|
|
10574
|
-
:host([
|
|
10575
|
-
|
|
10815
|
+
:host(:is([has-title], [has-header], [has-footer])) [part='content'] {
|
|
10816
|
+
height: auto;
|
|
10576
10817
|
}
|
|
10577
10818
|
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10819
|
+
@media (min-height: 320px) {
|
|
10820
|
+
:host(:is([has-title], [has-header], [has-footer])) .resizer-container {
|
|
10821
|
+
overflow: hidden;
|
|
10822
|
+
display: flex;
|
|
10823
|
+
flex-direction: column;
|
|
10824
|
+
}
|
|
10581
10825
|
|
|
10582
|
-
|
|
10583
|
-
|
|
10826
|
+
:host(:is([has-title], [has-header], [has-footer])) [part='content'] {
|
|
10827
|
+
flex: 1;
|
|
10828
|
+
overflow: auto;
|
|
10829
|
+
}
|
|
10584
10830
|
}
|
|
10585
10831
|
|
|
10586
|
-
|
|
10587
|
-
|
|
10832
|
+
/*
|
|
10833
|
+
NOTE(platosha): Make some min-width to prevent collapsing of the content
|
|
10834
|
+
taking the parent width, e. g., <vaadin-grid> and such.
|
|
10835
|
+
*/
|
|
10836
|
+
[part='content'] {
|
|
10837
|
+
min-width: 12em; /* matches the default <vaadin-text-field> width */
|
|
10588
10838
|
}
|
|
10589
|
-
`;f("vaadin-select-overlay",[Hs,O_],{moduleId:"lumo-select-overlay"});/**
|
|
10590
|
-
* @license
|
|
10591
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10592
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10593
|
-
*/const D_=s=>class extends Ds(fe(s)){static get properties(){return {_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return ["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e;}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e);}focus(){this.disabled||(super.focus(),this._setFocused(!0));}_shouldSetActive(e){return !this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e);}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur());}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click());}};/**
|
|
10594
|
-
* @license
|
|
10595
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10596
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10597
|
-
*/class z_ extends D_(I(R(g))){static get is(){return "vaadin-select-item"}static get template(){return v`
|
|
10598
|
-
<style>
|
|
10599
|
-
:host {
|
|
10600
|
-
display: inline-block;
|
|
10601
|
-
}
|
|
10602
10839
|
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
</style>
|
|
10607
|
-
<span part="checkmark" aria-hidden="true"></span>
|
|
10608
|
-
<div part="content">
|
|
10609
|
-
<slot></slot>
|
|
10610
|
-
</div>
|
|
10611
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}x(z_);/**
|
|
10612
|
-
* @license
|
|
10613
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10614
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10615
|
-
*/function M_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function N_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
10616
|
-
* @license
|
|
10617
|
-
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
10618
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10619
|
-
*/const L_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Ns)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Ki(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Ki(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
10620
|
-
* @license
|
|
10621
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10622
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10623
|
-
*/const V_=s=>class extends L_(s){static get properties(){return {disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return ["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return !this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Ki(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Ss(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=M.debounce(this._searchReset,ie.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=M_(this._scrollerElement,i)+e;N_(this._scrollerElement,i,o);}}};/**
|
|
10624
|
-
* @license
|
|
10625
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10626
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10627
|
-
*/class B_ extends V_(I(R(J(g)))){static get is(){return "vaadin-select-list-box"}static get template(){return v`
|
|
10628
|
-
<style>
|
|
10629
|
-
:host {
|
|
10630
|
-
display: flex;
|
|
10631
|
-
}
|
|
10840
|
+
:host([has-bounds-set]) [part='overlay'] {
|
|
10841
|
+
max-width: none;
|
|
10842
|
+
}
|
|
10632
10843
|
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10844
|
+
@media (forced-colors: active) {
|
|
10845
|
+
[part='overlay'] {
|
|
10846
|
+
outline: 3px solid !important;
|
|
10847
|
+
}
|
|
10848
|
+
}
|
|
10849
|
+
`;p`
|
|
10850
|
+
[part='overlay'] {
|
|
10851
|
+
position: relative;
|
|
10852
|
+
overflow: visible;
|
|
10853
|
+
max-height: 100%;
|
|
10854
|
+
display: flex;
|
|
10855
|
+
}
|
|
10636
10856
|
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
overflow-y: auto;
|
|
10641
|
-
-webkit-overflow-scrolling: touch;
|
|
10642
|
-
}
|
|
10643
|
-
</style>
|
|
10644
|
-
<div part="items">
|
|
10645
|
-
<slot></slot>
|
|
10646
|
-
</div>
|
|
10647
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(B_);/**
|
|
10648
|
-
* @license
|
|
10649
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10650
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10651
|
-
*/const F_=s=>class extends Us(Jt(R(s))){static get observers(){return ["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0;}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
10652
|
-
* @license
|
|
10653
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10654
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10655
|
-
*/const R_=p`
|
|
10656
|
-
:host {
|
|
10657
|
-
align-items: flex-start;
|
|
10658
|
-
justify-content: flex-start;
|
|
10857
|
+
[part='content'] {
|
|
10858
|
+
box-sizing: border-box;
|
|
10859
|
+
height: 100%;
|
|
10659
10860
|
}
|
|
10660
10861
|
|
|
10661
|
-
|
|
10662
|
-
|
|
10862
|
+
.resizer-container {
|
|
10863
|
+
overflow: auto;
|
|
10864
|
+
flex-grow: 1;
|
|
10865
|
+
border-radius: inherit; /* prevent child elements being drawn outside part=overlay */
|
|
10663
10866
|
}
|
|
10664
10867
|
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
}
|
|
10868
|
+
[part='overlay'][style] .resizer-container {
|
|
10869
|
+
min-height: 100%;
|
|
10870
|
+
width: 100%;
|
|
10669
10871
|
}
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x($_);/**
|
|
10678
|
-
* @license
|
|
10679
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10680
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10681
|
-
*/const H_=p`
|
|
10682
|
-
:host {
|
|
10683
|
-
display: inline-block;
|
|
10684
|
-
position: relative;
|
|
10685
|
-
outline: none;
|
|
10686
|
-
white-space: nowrap;
|
|
10872
|
+
|
|
10873
|
+
:host(:not([resizable])) .resizer {
|
|
10874
|
+
display: none;
|
|
10875
|
+
}
|
|
10876
|
+
|
|
10877
|
+
:host([resizable]) [part='title'] {
|
|
10878
|
+
cursor: move;
|
|
10687
10879
|
-webkit-user-select: none;
|
|
10688
|
-
-moz-user-select: none;
|
|
10689
10880
|
user-select: none;
|
|
10690
|
-
min-width: 0;
|
|
10691
|
-
width: 0;
|
|
10692
10881
|
}
|
|
10693
10882
|
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10883
|
+
.resizer {
|
|
10884
|
+
position: absolute;
|
|
10885
|
+
height: 16px;
|
|
10886
|
+
width: 16px;
|
|
10698
10887
|
}
|
|
10699
10888
|
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10889
|
+
.resizer.edge {
|
|
10890
|
+
height: 8px;
|
|
10891
|
+
width: 8px;
|
|
10892
|
+
inset: -4px;
|
|
10703
10893
|
}
|
|
10704
10894
|
|
|
10705
|
-
.
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
text-align: inherit;
|
|
10710
|
-
width: 100%;
|
|
10711
|
-
height: 100%;
|
|
10712
|
-
min-height: inherit;
|
|
10713
|
-
text-shadow: inherit;
|
|
10895
|
+
.resizer.edge.n {
|
|
10896
|
+
width: auto;
|
|
10897
|
+
bottom: auto;
|
|
10898
|
+
cursor: ns-resize;
|
|
10714
10899
|
}
|
|
10715
10900
|
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10901
|
+
.resizer.ne {
|
|
10902
|
+
top: -4px;
|
|
10903
|
+
right: -4px;
|
|
10904
|
+
cursor: nesw-resize;
|
|
10905
|
+
}
|
|
10906
|
+
|
|
10907
|
+
.resizer.edge.e {
|
|
10908
|
+
height: auto;
|
|
10909
|
+
left: auto;
|
|
10910
|
+
cursor: ew-resize;
|
|
10911
|
+
}
|
|
10912
|
+
|
|
10913
|
+
.resizer.se {
|
|
10914
|
+
bottom: -4px;
|
|
10915
|
+
right: -4px;
|
|
10916
|
+
cursor: nwse-resize;
|
|
10917
|
+
}
|
|
10918
|
+
|
|
10919
|
+
.resizer.edge.s {
|
|
10920
|
+
width: auto;
|
|
10921
|
+
top: auto;
|
|
10922
|
+
cursor: ns-resize;
|
|
10923
|
+
}
|
|
10924
|
+
|
|
10925
|
+
.resizer.sw {
|
|
10926
|
+
bottom: -4px;
|
|
10927
|
+
left: -4px;
|
|
10928
|
+
cursor: nesw-resize;
|
|
10929
|
+
}
|
|
10930
|
+
|
|
10931
|
+
.resizer.edge.w {
|
|
10932
|
+
height: auto;
|
|
10933
|
+
right: auto;
|
|
10934
|
+
cursor: ew-resize;
|
|
10935
|
+
}
|
|
10936
|
+
|
|
10937
|
+
.resizer.nw {
|
|
10938
|
+
top: -4px;
|
|
10939
|
+
left: -4px;
|
|
10940
|
+
cursor: nwse-resize;
|
|
10722
10941
|
}
|
|
10723
10942
|
`;/**
|
|
10724
10943
|
* @license
|
|
10725
|
-
* Copyright (c)
|
|
10944
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10726
10945
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10727
|
-
*/
|
|
10728
|
-
<div class="vaadin-button-container">
|
|
10729
|
-
<span part="label">
|
|
10730
|
-
<slot></slot>
|
|
10731
|
-
</span>
|
|
10732
|
-
</div>
|
|
10733
|
-
`}}x(q_);/**
|
|
10946
|
+
*/const X_=s=>class extends s{static get properties(){return {ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return ["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(e,i,o){const r=`--_vaadin-confirm-dialog-content-${i}`;o?e.style.setProperty(r,o):e.style.removeProperty(r);}__updateContentHeight(e,i){i&&this.__updateDimension(i,"height",e);}__updateContentWidth(e,i){i&&this.__updateDimension(i,"width",e);}};/**
|
|
10734
10947
|
* @license
|
|
10735
|
-
* Copyright (c)
|
|
10948
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10736
10949
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10737
|
-
*/const
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10950
|
+
*/const J_=p`
|
|
10951
|
+
:host {
|
|
10952
|
+
--_vaadin-confirm-dialog-content-width: auto;
|
|
10953
|
+
--_vaadin-confirm-dialog-content-height: auto;
|
|
10954
|
+
}
|
|
10955
|
+
|
|
10956
|
+
[part='overlay'] {
|
|
10957
|
+
width: var(--_vaadin-confirm-dialog-content-width);
|
|
10958
|
+
height: var(--_vaadin-confirm-dialog-content-height);
|
|
10959
|
+
}
|
|
10960
|
+
|
|
10961
|
+
::slotted([slot='header']) {
|
|
10962
|
+
pointer-events: auto;
|
|
10963
|
+
}
|
|
10964
|
+
|
|
10965
|
+
/* Make buttons clickable */
|
|
10966
|
+
[part='footer'] > * {
|
|
10967
|
+
pointer-events: all;
|
|
10750
10968
|
}
|
|
10751
10969
|
`;/**
|
|
10752
10970
|
* @license
|
|
10753
|
-
* Copyright (c)
|
|
10971
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10754
10972
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10755
|
-
*/
|
|
10973
|
+
*/f("vaadin-confirm-dialog-overlay",[Kt,K_,J_],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class Q_ extends Jt(R(I(g))){static get is(){return "vaadin-confirm-dialog-overlay"}static get template(){return v`
|
|
10974
|
+
<div part="backdrop" id="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
10975
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
10976
|
+
<section id="resizerContainer" class="resizer-container">
|
|
10977
|
+
<header part="header"><slot name="header"></slot></header>
|
|
10978
|
+
<div part="content" id="content">
|
|
10979
|
+
<div part="message"><slot></slot></div>
|
|
10980
|
+
</div>
|
|
10981
|
+
<footer part="footer" role="toolbar">
|
|
10982
|
+
<div part="cancel-button">
|
|
10983
|
+
<slot name="cancel-button"></slot>
|
|
10984
|
+
</div>
|
|
10985
|
+
<div part="reject-button">
|
|
10986
|
+
<slot name="reject-button"></slot>
|
|
10987
|
+
</div>
|
|
10988
|
+
<div part="confirm-button">
|
|
10989
|
+
<slot name="confirm-button"></slot>
|
|
10990
|
+
</div>
|
|
10991
|
+
</footer>
|
|
10992
|
+
</section>
|
|
10993
|
+
</div>
|
|
10994
|
+
`}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","");}}x(Q_);class Z_ extends X_(G_(ct($t(g)))){static get is(){return "vaadin-confirm-dialog-dialog"}static get template(){return v`
|
|
10995
|
+
<style>
|
|
10996
|
+
:host {
|
|
10997
|
+
display: none;
|
|
10998
|
+
}
|
|
10999
|
+
</style>
|
|
11000
|
+
|
|
11001
|
+
<vaadin-confirm-dialog-overlay
|
|
11002
|
+
id="overlay"
|
|
11003
|
+
opened="[[opened]]"
|
|
11004
|
+
on-opened-changed="_onOverlayOpened"
|
|
11005
|
+
on-mousedown="_bringOverlayToFront"
|
|
11006
|
+
on-touchstart="_bringOverlayToFront"
|
|
11007
|
+
theme$="[[_theme]]"
|
|
11008
|
+
modeless="[[modeless]]"
|
|
11009
|
+
with-backdrop="[[!modeless]]"
|
|
11010
|
+
resizable$="[[resizable]]"
|
|
11011
|
+
aria-label$="[[ariaLabel]]"
|
|
11012
|
+
restore-focus-on-close
|
|
11013
|
+
focus-trap
|
|
11014
|
+
></vaadin-confirm-dialog-overlay>
|
|
11015
|
+
`}}x(Z_);/**
|
|
10756
11016
|
* @license
|
|
10757
|
-
* Copyright (c)
|
|
11017
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10758
11018
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10759
|
-
*/const
|
|
11019
|
+
*/const em=s=>class extends s{static get properties(){return {accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return ["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this);}get __slottedNodes(){return [this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new D(this,"header","h3",{initializer:e=>{this._headerNode=e;}}),this.addController(this._headerController),this._messageController=new D(this,"","div",{multiple:!0,observe:!1,initializer:e=>{const i=document.createElement("div");i.style.display="contents";const o=`confirm-dialog-message-${lt()}`;i.id=o,this.appendChild(i),i.appendChild(e),this._messageNodes=[...this._messageNodes,i];}}),this.addController(this._messageController),this._cancelController=new D(this,"cancel-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("cancel",e);}}),this.addController(this._cancelController),this._rejectController=new D(this,"reject-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("reject",e);}}),this.addController(this._rejectController),this._confirmController=new D(this,"confirm-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("confirm",e);}}),this.addController(this._confirmController);}_initOverlay(e){e.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),e.addEventListener("vaadin-overlay-open",()=>this.__onDialogOpened()),e.addEventListener("vaadin-overlay-closed",()=>this.__onDialogClosed()),e.setAttribute("role","alertdialog");}__onDialogOpened(){const e=this._overlayElement;this.__slottedNodes.forEach(o=>{e.appendChild(o);});const i=e.querySelector('[slot="confirm-button"]');i&&i.focus();}__onDialogClosed(){this.__slottedNodes.forEach(e=>{this.appendChild(e);}),this.dispatchEvent(new CustomEvent("closed"));}__accessibleDescriptionRefChanged(e,i,o){!e||!i||(o!==void 0?we(e,"aria-describedby",{newId:o,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):i.forEach(r=>{we(e,"aria-describedby",{newId:r.id});}),this.__oldAccessibleDescriptionRef=o);}__setupSlottedButton(e,i){const o=`_${e}Button`,r=`__${e}`;this[o]&&this[o]!==i&&this[o].remove(),i.addEventListener("click",this[r]),this[o]=i;}__updateCancelButton(e,i,o,r){e&&(e===this._cancelController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}__updateConfirmButton(e,i,o){e&&e===this._confirmController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o));}__updateHeaderNode(e,i){e&&e===this._headerController.defaultNode&&(e.textContent=i);}__updateMessageNodes(e,i){if(e&&e.length>0){const o=e.find(r=>this._messageController.defaultNode&&r===this._messageController.defaultNode.parentElement);o&&(o.firstChild.textContent=i);}}__updateRejectButton(e,i,o,r){e&&(e===this._rejectController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}_escPressed(e){e.defaultPrevented||this.__cancel();}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1;}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1;}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1;}_getAriaLabel(e){return e||"confirmation"}};/**
|
|
10760
11020
|
* @license
|
|
10761
|
-
* Copyright (c)
|
|
11021
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10762
11022
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10763
|
-
*/
|
|
11023
|
+
*/class tm extends em(q($t(J(g)))){static get template(){return v`
|
|
10764
11024
|
<style>
|
|
10765
|
-
:host
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
::slotted([slot='value']) {
|
|
10770
|
-
flex-grow: 1;
|
|
11025
|
+
:host,
|
|
11026
|
+
[hidden] {
|
|
11027
|
+
display: none !important;
|
|
10771
11028
|
}
|
|
10772
11029
|
</style>
|
|
10773
11030
|
|
|
10774
|
-
<
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
<vaadin-input-container
|
|
10781
|
-
part="input-field"
|
|
10782
|
-
readonly="[[readonly]]"
|
|
10783
|
-
disabled="[[disabled]]"
|
|
10784
|
-
invalid="[[invalid]]"
|
|
10785
|
-
theme$="[[_theme]]"
|
|
10786
|
-
on-click="_onClick"
|
|
10787
|
-
>
|
|
10788
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
10789
|
-
<slot name="value"></slot>
|
|
10790
|
-
<div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
|
|
10791
|
-
</vaadin-input-container>
|
|
10792
|
-
|
|
10793
|
-
<div part="helper-text">
|
|
10794
|
-
<slot name="helper"></slot>
|
|
10795
|
-
</div>
|
|
10796
|
-
|
|
10797
|
-
<div part="error-message">
|
|
10798
|
-
<slot name="error-message"></slot>
|
|
10799
|
-
</div>
|
|
10800
|
-
</div>
|
|
10801
|
-
|
|
10802
|
-
<vaadin-select-overlay
|
|
10803
|
-
position-target="[[_inputContainer]]"
|
|
10804
|
-
opened="{{opened}}"
|
|
10805
|
-
with-backdrop="[[_phone]]"
|
|
10806
|
-
phone$="[[_phone]]"
|
|
11031
|
+
<vaadin-confirm-dialog-dialog
|
|
11032
|
+
id="dialog"
|
|
11033
|
+
opened="{{opened}}"
|
|
11034
|
+
overlay-class="[[overlayClass]]"
|
|
11035
|
+
aria-label="[[_getAriaLabel(header)]]"
|
|
10807
11036
|
theme$="[[_theme]]"
|
|
10808
|
-
no-
|
|
10809
|
-
|
|
10810
|
-
|
|
11037
|
+
no-close-on-outside-click
|
|
11038
|
+
no-close-on-esc="[[noCloseOnEsc]]"
|
|
11039
|
+
content-height="[[_contentHeight]]"
|
|
11040
|
+
content-width="[[_contentWidth]]"
|
|
11041
|
+
></vaadin-confirm-dialog-dialog>
|
|
10811
11042
|
|
|
10812
|
-
<
|
|
10813
|
-
|
|
10814
|
-
<slot
|
|
11043
|
+
<div hidden>
|
|
11044
|
+
<slot name="header"></slot>
|
|
11045
|
+
<slot></slot>
|
|
11046
|
+
<slot name="cancel-button"></slot>
|
|
11047
|
+
<slot name="reject-button"></slot>
|
|
11048
|
+
<slot name="confirm-button"></slot>
|
|
10815
11049
|
</div>
|
|
10816
|
-
`}static get
|
|
10817
|
-
/* Optical centering */
|
|
10818
|
-
:host::before,
|
|
10819
|
-
:host::after {
|
|
10820
|
-
content: '';
|
|
10821
|
-
flex-basis: 0;
|
|
10822
|
-
flex-grow: 1;
|
|
10823
|
-
}
|
|
11050
|
+
`}static get is(){return "vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement);}}x(tm);
|
|
10824
11051
|
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
11052
|
+
const DEFAULT_LANGUAGE$3 = 'en';
|
|
11053
|
+
const SUPPORTED_LANGUAGES$3 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
11054
|
+
const TRANSLATIONS$3 = {
|
|
11055
|
+
en: {
|
|
11056
|
+
filter: 'Filter',
|
|
11057
|
+
clear: 'Clear',
|
|
11058
|
+
searchByTicketId: 'Search by Ticket ID',
|
|
11059
|
+
enterTicketId: 'Enter Ticket ID',
|
|
11060
|
+
searchByTicketType: 'Search by Ticket Type',
|
|
11061
|
+
selectTicketType: 'Select Ticket Type',
|
|
11062
|
+
searchByDate: 'Search by Date',
|
|
11063
|
+
from: 'From',
|
|
11064
|
+
to: 'To',
|
|
11065
|
+
normal: 'Normal',
|
|
11066
|
+
subscription: 'Subscription',
|
|
11067
|
+
ticketsHistory: 'Tickets History',
|
|
11068
|
+
settled: 'Settled',
|
|
11069
|
+
purchased: 'Purchased',
|
|
11070
|
+
canceled: 'Canceled',
|
|
11071
|
+
noData: 'No data Avaliable.',
|
|
11072
|
+
ticketId: 'Ticket ID:',
|
|
11073
|
+
ticketType: 'Ticket Type:',
|
|
11074
|
+
ticketAmount: 'Ticket Amount:',
|
|
11075
|
+
lineDetail: 'Line Detail:',
|
|
11076
|
+
seeDetails: 'See Details',
|
|
11077
|
+
numberOfDraw: 'Number of Draw:',
|
|
11078
|
+
ticketResult: 'Ticket Result:',
|
|
11079
|
+
drawId: 'Draw ID:',
|
|
11080
|
+
drawDate: 'Draw Date:',
|
|
11081
|
+
result: 'Result:',
|
|
11082
|
+
prize: 'Prize:',
|
|
11083
|
+
bettingType: 'Betting Type:'
|
|
11084
|
+
},
|
|
11085
|
+
ro: {
|
|
11086
|
+
ticketsHistory: 'Istoric bilete',
|
|
11087
|
+
settled: 'Decontat',
|
|
11088
|
+
purchased: 'Achiziționat',
|
|
11089
|
+
canceled: 'Anulat',
|
|
11090
|
+
noData: 'Nu sunt date disponibile.',
|
|
11091
|
+
ticketId: 'ID bilet:',
|
|
11092
|
+
ticketType: 'Tip bilet:',
|
|
11093
|
+
ticketAmount: 'Suma biletului:',
|
|
11094
|
+
lineDetail: 'Detaliu linie:',
|
|
11095
|
+
seeDetails: 'Vezi detalii',
|
|
11096
|
+
numberOfDraw: 'Număr de extrageri:',
|
|
11097
|
+
ticketResult: 'Rezultat bilet:',
|
|
11098
|
+
drawId: 'ID extragere:',
|
|
11099
|
+
drawDate: 'Data extragerii:',
|
|
11100
|
+
result: 'Rezultat:',
|
|
11101
|
+
prize: 'Premiu:',
|
|
11102
|
+
bettingType: 'Tip de pariu:'
|
|
11103
|
+
},
|
|
11104
|
+
fr: {
|
|
11105
|
+
ticketsHistory: 'Historique des billets',
|
|
11106
|
+
settled: 'Réglé',
|
|
11107
|
+
purchased: 'Acheté',
|
|
11108
|
+
canceled: 'Annulé',
|
|
11109
|
+
noData: 'Aucune donnée disponible.',
|
|
11110
|
+
ticketId: 'ID du billet:',
|
|
11111
|
+
ticketType: 'Type de billet:',
|
|
11112
|
+
ticketAmount: 'Montant du billet:',
|
|
11113
|
+
lineDetail: 'Détail de la ligne:',
|
|
11114
|
+
seeDetails: 'Voir les détails',
|
|
11115
|
+
numberOfDraw: 'Nombre de tirages:',
|
|
11116
|
+
ticketResult: 'Résultat du billet:',
|
|
11117
|
+
drawId: 'ID du tirage:',
|
|
11118
|
+
drawDate: 'Date du tirage:',
|
|
11119
|
+
result: 'Résultat:',
|
|
11120
|
+
prize: 'Prix:',
|
|
11121
|
+
bettingType: 'Type de pari:'
|
|
11122
|
+
},
|
|
11123
|
+
ar: {
|
|
11124
|
+
ticketsHistory: 'سجل التذاكر',
|
|
11125
|
+
settled: 'تمت التسوية',
|
|
11126
|
+
purchased: 'تم شراؤها',
|
|
11127
|
+
canceled: 'تم الإلغاء',
|
|
11128
|
+
noData: 'لا توجد بيانات متاحة.',
|
|
11129
|
+
ticketId: 'معرف التذكرة:',
|
|
11130
|
+
ticketType: 'نوع التذكرة:',
|
|
11131
|
+
ticketAmount: 'مبلغ التذكرة:',
|
|
11132
|
+
lineDetail: 'تفاصيل الخط:',
|
|
11133
|
+
seeDetails: 'انظر التفاصيل',
|
|
11134
|
+
numberOfDraw: 'عدد السحوبات:',
|
|
11135
|
+
ticketResult: 'نتيجة التذكرة:',
|
|
11136
|
+
drawId: 'معرف السحب:',
|
|
11137
|
+
drawDate: 'تاريخ السحب:',
|
|
11138
|
+
result: 'النتيجة:',
|
|
11139
|
+
prize: 'الجائزة:',
|
|
11140
|
+
bettingType: 'نوع الرهان:'
|
|
11141
|
+
},
|
|
11142
|
+
hr: {
|
|
11143
|
+
ticketsHistory: 'Povijest listića',
|
|
11144
|
+
settled: 'Riješeno',
|
|
11145
|
+
purchased: 'Kupljeno',
|
|
11146
|
+
canceled: 'Otkazano',
|
|
11147
|
+
noData: 'Nema dostupnih podataka.',
|
|
11148
|
+
ticketId: 'ID listića:',
|
|
11149
|
+
ticketType: 'Vrsta listića:',
|
|
11150
|
+
ticketAmount: 'Iznos listića:',
|
|
11151
|
+
lineDetail: 'Detalji linije:',
|
|
11152
|
+
seeDetails: 'Vidi detalje',
|
|
11153
|
+
numberOfDraw: 'Broj izvlačenja:',
|
|
11154
|
+
ticketResult: 'Rezultat listića:',
|
|
11155
|
+
drawId: 'ID izvlačenja:',
|
|
11156
|
+
drawDate: 'Datum izvlačenja:',
|
|
11157
|
+
result: 'Rezultat:',
|
|
11158
|
+
prize: 'Nagrada:',
|
|
11159
|
+
bettingType: 'Vrsta oklade:'
|
|
11160
|
+
}
|
|
11161
|
+
};
|
|
11162
|
+
const translate$3 = (key, customLang, replacements) => {
|
|
11163
|
+
const lang = customLang;
|
|
11164
|
+
let translation = TRANSLATIONS$3[lang !== undefined && SUPPORTED_LANGUAGES$3.includes(lang) ? lang : DEFAULT_LANGUAGE$3][key];
|
|
11165
|
+
if (replacements) {
|
|
11166
|
+
Object.keys(replacements).forEach((placeholder) => {
|
|
11167
|
+
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
11168
|
+
});
|
|
11169
|
+
}
|
|
11170
|
+
return translation;
|
|
11171
|
+
};
|
|
11172
|
+
const getTranslations$2 = (data) => {
|
|
11173
|
+
Object.keys(data).forEach((item) => {
|
|
11174
|
+
for (let key in data[item]) {
|
|
11175
|
+
TRANSLATIONS$3[item][key] = data[item][key];
|
|
11176
|
+
}
|
|
11177
|
+
});
|
|
11178
|
+
};
|
|
10828
11179
|
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
box-shadow:
|
|
10832
|
-
0 0 0 1px var(--lumo-shade-5pct),
|
|
10833
|
-
var(--lumo-box-shadow-xl);
|
|
10834
|
-
background-image: none;
|
|
10835
|
-
outline: none;
|
|
10836
|
-
-webkit-tap-highlight-color: transparent;
|
|
10837
|
-
}
|
|
11180
|
+
const lotteryTippingFilterCss = ".lottery-tipping-filter .operate-btns{display:flex;gap:10px}.lottery-tipping-filter .operate-btns .operate-btn{background:var(--emw--color-primary, #fed275);border:1px solid var(--emw--color-primary, #fed275);border-radius:16px;padding:8px 10px;font-size:14px;color:rgb(51, 51, 51);font-weight:600;cursor:pointer;transition:0.2s linear}.dialog-content{display:flex;flex-direction:column;align-items:center}.dialog-content .filter-item{margin-bottom:12px}.dialog-content .filter-item-label{text-align:center}.dialog-content .filter-item-val{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}@media screen and (max-width: 480px){.lottery-tipping-filter .operate-btns{gap:4px}}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}";
|
|
11181
|
+
const LotteryTippingFilterStyle0 = lotteryTippingFilterCss;
|
|
10838
11182
|
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
11183
|
+
const LotteryTippingFilter = class {
|
|
11184
|
+
constructor(hostRef) {
|
|
11185
|
+
index.registerInstance(this, hostRef);
|
|
11186
|
+
this.filterChange = index.createEvent(this, "filterChange", 7);
|
|
11187
|
+
this.filterClear = index.createEvent(this, "filterClear", 7);
|
|
11188
|
+
this.handleTicketType = (event) => {
|
|
11189
|
+
if (event.detail && event.detail.length) {
|
|
11190
|
+
this.filterData.ticketType = event.detail;
|
|
11191
|
+
}
|
|
11192
|
+
};
|
|
11193
|
+
this.handleFilterFrom = (event) => {
|
|
11194
|
+
const inputElement = event.target;
|
|
11195
|
+
let dateArray = inputElement.value.split('-');
|
|
11196
|
+
if (dateArray.length === 3) {
|
|
11197
|
+
this.filterData = Object.assign(Object.assign({}, this.filterData), { filterFromCalendar: `${dateArray[2]}/${dateArray[1]}/${dateArray[0]}` });
|
|
11198
|
+
}
|
|
11199
|
+
};
|
|
11200
|
+
this.handleFilterTo = (event) => {
|
|
11201
|
+
const inputElement = event.target;
|
|
11202
|
+
let dateArray = inputElement.value.split('-');
|
|
11203
|
+
if (dateArray.length === 3) {
|
|
11204
|
+
this.filterData = Object.assign(Object.assign({}, this.filterData), { filterToCalendar: `${dateArray[2]}/${dateArray[1]}/${dateArray[0]}` });
|
|
11205
|
+
}
|
|
11206
|
+
};
|
|
11207
|
+
this.quickFiltersActive = false;
|
|
11208
|
+
this.mbSource = undefined;
|
|
11209
|
+
this.clientStyling = undefined;
|
|
11210
|
+
this.clientStylingUrl = undefined;
|
|
11211
|
+
this.language = 'en';
|
|
11212
|
+
this.translationUrl = undefined;
|
|
11213
|
+
this.isOpen = false;
|
|
11214
|
+
this.filterData = {
|
|
11215
|
+
filterFromCalendar: '',
|
|
11216
|
+
filterToCalendar: '',
|
|
11217
|
+
ticketId: '',
|
|
11218
|
+
ticketType: []
|
|
11219
|
+
};
|
|
11220
|
+
this.ticketTypeList = undefined;
|
|
11221
|
+
this.showClearButton = false;
|
|
11222
|
+
}
|
|
11223
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
11224
|
+
if (newValue != oldValue) {
|
|
11225
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11226
|
+
}
|
|
11227
|
+
}
|
|
11228
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
11229
|
+
if (newValue != oldValue) {
|
|
11230
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11231
|
+
}
|
|
11232
|
+
}
|
|
11233
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
11234
|
+
if (newValue != oldValue) {
|
|
11235
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11236
|
+
}
|
|
11237
|
+
}
|
|
11238
|
+
componentWillLoad() {
|
|
11239
|
+
if (this.translationUrl) {
|
|
11240
|
+
getTranslations$2(JSON.parse(this.translationUrl));
|
|
11241
|
+
}
|
|
11242
|
+
this.ticketTypeList = [
|
|
11243
|
+
{ label: translate$3('normal', this.language), value: 'NORMAL' },
|
|
11244
|
+
{ label: translate$3('subscription', this.language), value: 'SUBSCRIPTION' }
|
|
11245
|
+
];
|
|
11246
|
+
}
|
|
11247
|
+
componentDidLoad() {
|
|
11248
|
+
if (this.stylingContainer) {
|
|
11249
|
+
if (this.mbSource)
|
|
11250
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11251
|
+
if (this.clientStyling)
|
|
11252
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11253
|
+
if (this.clientStylingUrl)
|
|
11254
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11255
|
+
}
|
|
11256
|
+
}
|
|
11257
|
+
disconnectedCallback() {
|
|
11258
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
11259
|
+
}
|
|
11260
|
+
handleModalClose() {
|
|
11261
|
+
this.isOpen = false;
|
|
11262
|
+
}
|
|
11263
|
+
changeFormate(str) {
|
|
11264
|
+
const [day, month, year] = str.split('/');
|
|
11265
|
+
return `${year}-${month}-${day}`;
|
|
11266
|
+
}
|
|
11267
|
+
formateDate(dateParts) {
|
|
11268
|
+
const { year, month, day } = dateParts;
|
|
11269
|
+
const date = new Date(year, month, day);
|
|
11270
|
+
return format(date, 'dd/MM/yyyy');
|
|
11271
|
+
}
|
|
11272
|
+
parseDate(inputValue) {
|
|
11273
|
+
const [day, month, year] = inputValue.split('/');
|
|
11274
|
+
return { year, month: parseInt(month) - 1, day };
|
|
11275
|
+
}
|
|
11276
|
+
setDateFormate(dom) {
|
|
11277
|
+
dom.i18n = Object.assign(Object.assign({}, dom.i18n), { formatDate: this.formateDate, parseDate: this.parseDate });
|
|
11278
|
+
}
|
|
11279
|
+
clearSelection() {
|
|
11280
|
+
this.comboBox.clear();
|
|
11281
|
+
}
|
|
11282
|
+
resetSearch() {
|
|
11283
|
+
this.showClearButton = false;
|
|
11284
|
+
this.clearSelection();
|
|
11285
|
+
this.filterData = {
|
|
11286
|
+
filterFromCalendar: '',
|
|
11287
|
+
filterToCalendar: '',
|
|
11288
|
+
ticketId: '',
|
|
11289
|
+
ticketType: []
|
|
11290
|
+
};
|
|
11291
|
+
this.filterClear.emit();
|
|
11292
|
+
}
|
|
11293
|
+
handleDialogConfirm() {
|
|
11294
|
+
if (this.filterData.filterFromCalendar && this.filterData.filterToCalendar) {
|
|
11295
|
+
let dateArray = this.filterData.filterFromCalendar.split('/');
|
|
11296
|
+
let dateArrayTo = this.filterData.filterToCalendar.split('/');
|
|
11297
|
+
const transferData = {
|
|
11298
|
+
filterFromCalendar: new Date(Date.UTC(Number(dateArray[2]), Number(dateArray[1]) - 1, Number(dateArray[0]), 0, 0, 0)).toISOString(),
|
|
11299
|
+
filterToCalendar: new Date(Date.UTC(Number(dateArrayTo[2]), Number(dateArrayTo[1]) - 1, Number(dateArrayTo[0]), 23, 59, 59)).toISOString()
|
|
11300
|
+
};
|
|
11301
|
+
this.filterData = Object.assign(Object.assign({}, this.filterData), transferData);
|
|
11302
|
+
}
|
|
11303
|
+
this.filterChange.emit(this.filterData);
|
|
11304
|
+
this.isOpen = false;
|
|
11305
|
+
this.showClearButton = true;
|
|
11306
|
+
}
|
|
11307
|
+
render() {
|
|
11308
|
+
return (index.h("div", { key: '74aa590f6f92b9df971fd17cb3f573cc6a0a68e9', class: "lottery-tipping-filter", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'ebf385371627466c5eb06a5ef75a14a467b1badd', class: "operate-btns" }, !this.showClearButton && (index.h("div", { key: '55c709034e124b51e8b9057980f5a3c3b8c6d5ce', class: "operate-btn", onClick: () => {
|
|
11309
|
+
this.isOpen = true;
|
|
11310
|
+
} }, translate$3('filter', this.language))), (this.showClearButton || this.quickFiltersActive) && (index.h("div", { key: 'aa747af2461e72fbacc16decd7fc75cd6f640c47', class: "operate-btn", onClick: () => this.resetSearch() }, translate$3('clear', this.language)))), index.h("lottery-tipping-dialog", { key: 'f8f41b7ff5114a48a840063b5f063e28cc61e31c', "dialog-title": translate$3('ticketResult', this.language), visible: this.isOpen, onCancel: () => {
|
|
11311
|
+
this.isOpen = false;
|
|
11312
|
+
}, onConfirm: this.handleDialogConfirm(), animationDuration: 300, language: this.language, "translation-url": this.translationUrl }, index.h("div", { key: 'a7510ed9b89b568d6829777bfbbc33bc3fdbb9b4', class: "dialog-content" }, index.h("div", { key: '25f1a6e8e4f389cc6157468338eb4bac9996a5cd', class: "filter-item" }, index.h("div", { key: 'a49fded71e3ddc45dc26c7bb47f29132907bcf5f', class: "filter-item-label" }, translate$3('searchByTicketId', this.language)), index.h("div", { key: '281d3ebd48ab27fbd82328a684fcf3e11bd68176', class: "filter-item-val" }, index.h("vaadin-text-field", { key: '3ca7edba908e9ff1d6ab16c5c60e5a1cdb06d9c9', placeholder: translate$3('enterTicketId', this.language), value: this.filterData.ticketId, onInput: (event) => {
|
|
11313
|
+
this.filterData.ticketId = event.target.value;
|
|
11314
|
+
} }))), index.h("div", { key: '9bee76f675ef9934db69a1f06e5b40c4e2e94bf2', class: "filter-item" }, index.h("div", { key: 'd9251a523137fab3410c0ce8597a70ba7cffaf73', class: "filter-item-label" }, translate$3('searchByTicketType', this.language)), index.h("div", { key: 'ddc4c4a1c436d874f9c13d4612690d6360815633', class: "general-multi-select-container" }, index.h("general-multi-select", { key: 'b08fc68491d530937356d519f37362b2e3bf13c8', ref: (el) => (this.comboBox = el), placeholder: translate$3('selectTicketType', this.language), "max-visible-chips": "2", options: this.ticketTypeList.map((item) => ({
|
|
11315
|
+
text: item.label,
|
|
11316
|
+
value: item.value
|
|
11317
|
+
})), onChange: this.handleTicketType, "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl, "mb-source": this.mbSource }))), index.h("div", { key: '516fd4574674db32d3e8c9994a8c8cfb3b972364', class: "filter-item" }, index.h("div", { key: 'ce608f365c0297ff7b3aa1cbe64a51505e441f2c', class: "filter-item-label" }, translate$3('searchByDate', this.language)), index.h("div", { key: '9456716fb9e3a392cbb5c16f706b3dc144b0ccbe', class: "filter-item-val" }, index.h("vaadin-date-picker", { key: 'fb574b38a9e9143bf47fecd16638d50e2b9605a5', value: this.filterData.filterFromCalendar, max: this.filterData.filterToCalendar === undefined
|
|
11318
|
+
? undefined
|
|
11319
|
+
: this.changeFormate(this.filterData.filterToCalendar), onChange: this.handleFilterFrom, placeholder: translate$3('from', this.language), ref: (el) => this.setDateFormate(el), class: "VaadinDatePicker" }), index.h("vaadin-date-picker", { key: '3fc353dd8b7919219731934cf76c75ea13c38e35', value: this.filterData.filterToCalendar, min: this.filterData.filterFromCalendar === undefined
|
|
11320
|
+
? undefined
|
|
11321
|
+
: this.changeFormate(this.filterData.filterFromCalendar), onChange: this.handleFilterTo, placeholder: translate$3('to', this.language), ref: (el) => this.setDateFormate(el), class: "VaadinDatePicker" })))))));
|
|
11322
|
+
}
|
|
11323
|
+
static get watchers() { return {
|
|
11324
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
11325
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
11326
|
+
"mbSource": ["handleMbSourceChange"]
|
|
11327
|
+
}; }
|
|
11328
|
+
};
|
|
11329
|
+
LotteryTippingFilter.style = LotteryTippingFilterStyle0;
|
|
10842
11330
|
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
11331
|
+
const generateUUID$1 = () => {
|
|
11332
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
11333
|
+
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
11334
|
+
return v.toString(16);
|
|
11335
|
+
});
|
|
11336
|
+
};
|
|
11337
|
+
function fetchRequest(url, method = 'GET', body = null, headers = {}) {
|
|
11338
|
+
return new Promise((resolve, reject) => {
|
|
11339
|
+
const uuid = generateUUID$1();
|
|
11340
|
+
const headersOrigin = Object.assign({ 'Content-Type': 'application/json' }, headers);
|
|
11341
|
+
if (method !== 'GET' && method !== 'HEAD') {
|
|
11342
|
+
headersOrigin['X-Idempotency-Key'] = uuid;
|
|
11343
|
+
}
|
|
11344
|
+
const options = {
|
|
11345
|
+
method,
|
|
11346
|
+
headers: headersOrigin,
|
|
11347
|
+
body: null
|
|
11348
|
+
};
|
|
11349
|
+
if (body && method !== 'GET' && method !== 'HEAD') {
|
|
11350
|
+
options.body = JSON.stringify(body);
|
|
11351
|
+
}
|
|
11352
|
+
else {
|
|
11353
|
+
delete options.body;
|
|
11354
|
+
}
|
|
11355
|
+
fetch(url, options)
|
|
11356
|
+
.then((response) => {
|
|
11357
|
+
if (!response.ok) {
|
|
11358
|
+
return response.json().then((errorData) => {
|
|
11359
|
+
const error = {
|
|
11360
|
+
status: response.status,
|
|
11361
|
+
statusText: response.statusText,
|
|
11362
|
+
code: errorData.code || 'UNKNOWN_ERROR',
|
|
11363
|
+
message: errorData.message || 'An unknown error occurred',
|
|
11364
|
+
data: errorData.data || null
|
|
11365
|
+
};
|
|
11366
|
+
reject(error);
|
|
11367
|
+
}, () => reject({
|
|
11368
|
+
status: response.status,
|
|
11369
|
+
statusText: response.statusText,
|
|
11370
|
+
code: 'PARSE_ERROR',
|
|
11371
|
+
message: 'Failed to parse error response'
|
|
11372
|
+
}));
|
|
11373
|
+
}
|
|
11374
|
+
else {
|
|
11375
|
+
return response.json();
|
|
11376
|
+
}
|
|
11377
|
+
})
|
|
11378
|
+
.then((data) => resolve(data), (error) => reject(error));
|
|
11379
|
+
});
|
|
11380
|
+
}
|
|
11381
|
+
const fetcher$2 = (url) => fetch(url, {
|
|
11382
|
+
method: 'GET',
|
|
11383
|
+
headers: {
|
|
11384
|
+
'x-scheme': 'application/json',
|
|
11385
|
+
Accept: 'application/json'
|
|
11386
|
+
}
|
|
11387
|
+
}).then((r) => r.json());
|
|
11388
|
+
function isEmptyValueOfArray(arr) {
|
|
11389
|
+
if (arr.length === 0) {
|
|
11390
|
+
return true;
|
|
11391
|
+
}
|
|
11392
|
+
const len = arr.length;
|
|
11393
|
+
let count = 0;
|
|
11394
|
+
for (let i = 0; i < len; i++) {
|
|
11395
|
+
if (isEmptyValue(arr[i])) {
|
|
11396
|
+
count++;
|
|
11397
|
+
}
|
|
11398
|
+
else {
|
|
11399
|
+
return false;
|
|
11400
|
+
}
|
|
11401
|
+
}
|
|
11402
|
+
if (count === len) {
|
|
11403
|
+
return true;
|
|
11404
|
+
}
|
|
11405
|
+
return false;
|
|
11406
|
+
}
|
|
11407
|
+
function isEmptyValueOfObject(obj) {
|
|
11408
|
+
if (Object.keys(obj).length === 0) {
|
|
11409
|
+
return true;
|
|
11410
|
+
}
|
|
11411
|
+
const len = Object.keys(obj).length;
|
|
11412
|
+
let count = 0;
|
|
11413
|
+
for (const val of Object.values(obj)) {
|
|
11414
|
+
if (isEmptyValue(val)) {
|
|
11415
|
+
count++;
|
|
11416
|
+
}
|
|
11417
|
+
else {
|
|
11418
|
+
return false;
|
|
11419
|
+
}
|
|
11420
|
+
}
|
|
11421
|
+
if (count === len) {
|
|
11422
|
+
return true;
|
|
11423
|
+
}
|
|
11424
|
+
return false;
|
|
11425
|
+
}
|
|
11426
|
+
function isEmptyValue(value, allowZero) {
|
|
11427
|
+
if (value === null || value === undefined || value === '') {
|
|
11428
|
+
return true;
|
|
11429
|
+
}
|
|
11430
|
+
else if (value === 0 && allowZero) {
|
|
11431
|
+
return false;
|
|
11432
|
+
}
|
|
11433
|
+
else if (Array.isArray(value)) {
|
|
11434
|
+
return isEmptyValueOfArray(value);
|
|
11435
|
+
}
|
|
11436
|
+
else if (Object.prototype.toString.call(value) === '[object Object]') {
|
|
11437
|
+
return isEmptyValueOfObject(value);
|
|
11438
|
+
}
|
|
11439
|
+
else {
|
|
11440
|
+
return !value;
|
|
11441
|
+
}
|
|
11442
|
+
}
|
|
11443
|
+
function toQueryParams(params) {
|
|
11444
|
+
const finalParams = {};
|
|
11445
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
11446
|
+
if (!isEmptyValue(value, true)) {
|
|
11447
|
+
finalParams[key] = value;
|
|
11448
|
+
}
|
|
11449
|
+
});
|
|
11450
|
+
const queryString = Object.entries(finalParams)
|
|
11451
|
+
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
|
11452
|
+
.join('&');
|
|
11453
|
+
return queryString ? `?${queryString}` : '';
|
|
11454
|
+
}
|
|
11455
|
+
const bulletMap = {
|
|
11456
|
+
'0': '1',
|
|
11457
|
+
'1': 'X',
|
|
11458
|
+
'2': '2'
|
|
11459
|
+
};
|
|
11460
|
+
function parseBulletNumber(numberArr) {
|
|
11461
|
+
const bulletArr = [];
|
|
11462
|
+
Object.keys(bulletMap).forEach((key) => {
|
|
11463
|
+
bulletArr.push({
|
|
11464
|
+
isSelected: numberArr.includes(Number(key)),
|
|
11465
|
+
value: bulletMap[key]
|
|
11466
|
+
});
|
|
11467
|
+
});
|
|
11468
|
+
return bulletArr;
|
|
11469
|
+
}
|
|
11470
|
+
function parseEachLineNumber(numbers) {
|
|
11471
|
+
const result = [];
|
|
11472
|
+
const matchRes = [];
|
|
11473
|
+
for (let i = 0; i < numbers.length; i += 2) {
|
|
11474
|
+
const [resultNumber, matchNumber] = [numbers[i], numbers[i + 1]];
|
|
11475
|
+
if (!matchRes[matchNumber]) {
|
|
11476
|
+
matchRes[matchNumber] = [resultNumber];
|
|
11477
|
+
}
|
|
11478
|
+
else {
|
|
11479
|
+
matchRes[matchNumber].push(resultNumber);
|
|
11480
|
+
}
|
|
11481
|
+
}
|
|
11482
|
+
matchRes.forEach((matchArr) => {
|
|
11483
|
+
result.push(parseBulletNumber(matchArr));
|
|
11484
|
+
});
|
|
11485
|
+
return result;
|
|
11486
|
+
}
|
|
11487
|
+
function thousandSeperator(value) {
|
|
11488
|
+
if (value === 0) {
|
|
11489
|
+
return '0';
|
|
11490
|
+
}
|
|
11491
|
+
if (!value) {
|
|
11492
|
+
return '';
|
|
11493
|
+
}
|
|
11494
|
+
value = value.toString();
|
|
11495
|
+
const parts = value.split('.');
|
|
11496
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
11497
|
+
return parts.join('.');
|
|
11498
|
+
}
|
|
11499
|
+
const isMobile = (userAgent) => {
|
|
11500
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
11501
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
11502
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
11503
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
11504
|
+
};
|
|
10846
11505
|
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
11506
|
+
const lotteryTippingPaginationCss = ".paginator{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}button{padding:4px 8px;font-size:14px;background:var(--emw--color-background, #fff);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);cursor:pointer;min-width:28px;transition:all 0.2s ease}button.active{color:#333;background:var(--emw--color-primary, #fed275);border-color:var(--emw--color-primary, #fed275);font-weight:bold}button:not(.arrow-btn):hover{background:var(--emw--color-secondary, #fff3b9);border-color:var(--emw--color-secondary, #fff3b9)}button:disabled{cursor:not-allowed;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));user-select:none}.ellipsis{font-weight:bold;color:var(--emw--color-gray-400, #000);border:none}select{padding:4px 8px;border-radius:4px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));font-size:14px}.jump-box{display:flex;align-items:center;gap:4px;margin-left:8px}.jump-box input{width:50px;padding:2px 6px;font-size:14px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:4px;text-align:center}.total-num{user-select:none;font-size:14px;color:var(--emw--color-gray-300, #333)}";
|
|
11507
|
+
const LotteryTippingPaginationStyle0 = lotteryTippingPaginationCss;
|
|
11508
|
+
|
|
11509
|
+
const LotteryTippingPagination = class {
|
|
11510
|
+
constructor(hostRef) {
|
|
11511
|
+
index.registerInstance(this, hostRef);
|
|
11512
|
+
this.pageChange = index.createEvent(this, "pageChange", 7);
|
|
11513
|
+
this.pageSizeChange = index.createEvent(this, "pageSizeChange", 7);
|
|
11514
|
+
this.userAgent = window.navigator.userAgent;
|
|
11515
|
+
this.total = 0;
|
|
11516
|
+
this.pageSizeOptions = [10, 20, 50];
|
|
11517
|
+
this.mbSource = undefined;
|
|
11518
|
+
this.clientStyling = undefined;
|
|
11519
|
+
this.clientStylingUrl = undefined;
|
|
11520
|
+
this.language = 'en';
|
|
11521
|
+
this.translationUrl = undefined;
|
|
11522
|
+
this.current = 1;
|
|
11523
|
+
this.pageSize = 10;
|
|
11524
|
+
this.totalPages = 1;
|
|
11525
|
+
}
|
|
11526
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
11527
|
+
if (newValue != oldValue) {
|
|
11528
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11529
|
+
}
|
|
11530
|
+
}
|
|
11531
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
11532
|
+
if (newValue != oldValue) {
|
|
11533
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11534
|
+
}
|
|
11535
|
+
}
|
|
11536
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
11537
|
+
if (newValue != oldValue) {
|
|
11538
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11539
|
+
}
|
|
11540
|
+
}
|
|
11541
|
+
componentDidLoad() {
|
|
11542
|
+
if (this.stylingContainer) {
|
|
11543
|
+
if (this.mbSource)
|
|
11544
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11545
|
+
if (this.clientStyling)
|
|
11546
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11547
|
+
if (this.clientStylingUrl)
|
|
11548
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11549
|
+
}
|
|
11550
|
+
}
|
|
11551
|
+
componentWillLoad() {
|
|
11552
|
+
if (this.translationUrl) {
|
|
11553
|
+
getTranslations$2(JSON.parse(this.translationUrl));
|
|
11554
|
+
}
|
|
11555
|
+
this.pageSize = this.pageSizeOptions[0];
|
|
11556
|
+
this.updateTotalPages();
|
|
11557
|
+
}
|
|
11558
|
+
updateTotalPages() {
|
|
11559
|
+
this.totalPages = Math.max(Math.ceil(this.total / this.pageSize), 1);
|
|
11560
|
+
if (this.current > this.totalPages) {
|
|
11561
|
+
this.current = this.totalPages;
|
|
11562
|
+
this.pageChange.emit(this.current);
|
|
11563
|
+
}
|
|
11564
|
+
}
|
|
11565
|
+
goToPage(page) {
|
|
11566
|
+
if (page < 1 || page > this.totalPages || page === this.current)
|
|
11567
|
+
return;
|
|
11568
|
+
this.current = page;
|
|
11569
|
+
this.pageChange.emit(page);
|
|
11570
|
+
}
|
|
11571
|
+
changePageSize(newSize) {
|
|
11572
|
+
this.pageSize = newSize;
|
|
11573
|
+
this.pageSizeChange.emit(newSize);
|
|
11574
|
+
this.updateTotalPages();
|
|
11575
|
+
this.goToPage(1);
|
|
11576
|
+
}
|
|
11577
|
+
getPagesToShow() {
|
|
11578
|
+
const result = [];
|
|
11579
|
+
const range = isMobile(this.userAgent) ? 1 : 2;
|
|
11580
|
+
const { totalPages, current } = this;
|
|
11581
|
+
if (totalPages <= 7) {
|
|
11582
|
+
for (let i = 1; i <= totalPages; i++)
|
|
11583
|
+
result.push({ type: 'page', value: i });
|
|
11584
|
+
}
|
|
11585
|
+
else {
|
|
11586
|
+
result.push({ type: 'page', value: 1 });
|
|
11587
|
+
if (current > range + 2)
|
|
11588
|
+
result.push({ type: 'jump', direction: 'prev' });
|
|
11589
|
+
const start = Math.max(2, current - range);
|
|
11590
|
+
const end = Math.min(totalPages - 1, current + range);
|
|
11591
|
+
for (let i = start; i <= end; i++)
|
|
11592
|
+
result.push({ type: 'page', value: i });
|
|
11593
|
+
if (current < totalPages - range - 1)
|
|
11594
|
+
result.push({ type: 'jump', direction: 'next' });
|
|
11595
|
+
result.push({ type: 'page', value: totalPages });
|
|
11596
|
+
}
|
|
11597
|
+
return result;
|
|
11598
|
+
}
|
|
11599
|
+
jumpTo(direction) {
|
|
11600
|
+
const delta = 5;
|
|
11601
|
+
if (direction === 'prev')
|
|
11602
|
+
this.goToPage(Math.max(1, this.current - delta));
|
|
11603
|
+
else
|
|
11604
|
+
this.goToPage(Math.min(this.totalPages, this.current + delta));
|
|
11605
|
+
}
|
|
11606
|
+
render() {
|
|
11607
|
+
const pages = this.getPagesToShow();
|
|
11608
|
+
return (index.h("div", { key: '056fe5c9fddd61fafba809746de794a8db9c92a9', class: "paginator", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'a4ceefa8aaeb5a5038e9f15d58f8b7b74f5e6726', class: "total-num" }, translate$3('totalItems', this.language, { total: this.total })), index.h("button", { key: '08a1c3a20cc576781c97e6dae6ba8db5bba1e0c2', class: "arrow-btn", disabled: this.current <= 1, onClick: () => this.goToPage(this.current - 1) }, "<"), pages.map((item) => {
|
|
11609
|
+
if (item.type === 'page') {
|
|
11610
|
+
return (index.h("button", { class: { page: true, active: this.current === item.value }, onClick: () => this.goToPage(item.value) }, item.value));
|
|
11611
|
+
}
|
|
11612
|
+
else {
|
|
11613
|
+
return (index.h("button", { class: "ellipsis", onClick: () => this.jumpTo(item.direction) }, "..."));
|
|
11614
|
+
}
|
|
11615
|
+
}), index.h("button", { key: '893023765c2a3b55a725c32ab5edb86e14225766', class: "arrow-btn", disabled: this.current >= this.totalPages, onClick: () => this.goToPage(this.current + 1) }, ">"), index.h("select", { key: 'c3fd4ada29da74ff3e0a5d41efeb3d6eb341bd79', onInput: (e) => this.changePageSize(parseInt(e.target.value)) }, this.pageSizeOptions.map((size) => (index.h("option", { value: size }, translate$3('perPage', this.language, { size: size }))))), index.h("div", { key: 'df8b7ad7e45fc12dc25b50cb687d008b546bba5b', class: "jump-box" }, translate$3('goTo', this.language), index.h("input", { key: 'f12b2591b6cfb79e0163dcbd5631618c69140539', type: "number", min: "1", max: this.totalPages, value: this.current, onKeyDown: (e) => {
|
|
11616
|
+
if (e.key === 'Enter') {
|
|
11617
|
+
const input = e.target;
|
|
11618
|
+
const page = parseInt(input.value);
|
|
11619
|
+
if (!isNaN(page))
|
|
11620
|
+
this.goToPage(page);
|
|
11621
|
+
}
|
|
11622
|
+
}, onInput: (e) => {
|
|
11623
|
+
const input = e.target;
|
|
11624
|
+
if (parseInt(input.value) > this.totalPages) {
|
|
11625
|
+
input.value = this.totalPages.toString();
|
|
11626
|
+
}
|
|
11627
|
+
if (parseInt(input.value) < 1) {
|
|
11628
|
+
input.value = '1';
|
|
11629
|
+
}
|
|
11630
|
+
} }))));
|
|
11631
|
+
}
|
|
11632
|
+
static get watchers() { return {
|
|
11633
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
11634
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
11635
|
+
"mbSource": ["handleMbSourceChange"],
|
|
11636
|
+
"total": ["updateTotalPages"],
|
|
11637
|
+
"pageSize": ["updateTotalPages"]
|
|
11638
|
+
}; }
|
|
11639
|
+
};
|
|
11640
|
+
LotteryTippingPagination.style = LotteryTippingPaginationStyle0;
|
|
11641
|
+
|
|
11642
|
+
// This icon file is generated automatically.
|
|
11643
|
+
var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
11644
|
+
const DownOutlined$1 = DownOutlined;
|
|
11645
|
+
|
|
11646
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
11647
|
+
__assign = Object.assign || function(t) {
|
|
11648
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11649
|
+
s = arguments[i];
|
|
11650
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11651
|
+
t[p] = s[p];
|
|
11652
|
+
}
|
|
11653
|
+
return t;
|
|
11654
|
+
};
|
|
11655
|
+
return __assign.apply(this, arguments);
|
|
11656
|
+
};
|
|
11657
|
+
var defaultColors = {
|
|
11658
|
+
primaryColor: '#333',
|
|
11659
|
+
secondaryColor: '#E6E6E6'
|
|
11660
|
+
};
|
|
11661
|
+
function renderIconDefinitionToSVGElement(icond, options) {
|
|
11662
|
+
if (options === void 0) { options = {}; }
|
|
11663
|
+
if (typeof icond.icon === 'function') {
|
|
11664
|
+
// two-tone
|
|
11665
|
+
var placeholders = options.placeholders || defaultColors;
|
|
11666
|
+
return renderAbstractNodeToSVGElement(icond.icon(placeholders.primaryColor, placeholders.secondaryColor), options);
|
|
11667
|
+
}
|
|
11668
|
+
// fill, outline
|
|
11669
|
+
return renderAbstractNodeToSVGElement(icond.icon, options);
|
|
11670
|
+
}
|
|
11671
|
+
function renderAbstractNodeToSVGElement(node, options) {
|
|
11672
|
+
var targetAttrs = node.tag === 'svg'
|
|
11673
|
+
? __assign(__assign({}, node.attrs), (options.extraSVGAttrs || {})) : node.attrs;
|
|
11674
|
+
var attrs = Object.keys(targetAttrs).reduce(function (acc, nextKey) {
|
|
11675
|
+
var key = nextKey;
|
|
11676
|
+
var value = targetAttrs[key];
|
|
11677
|
+
var token = "".concat(key, "=\"").concat(value, "\"");
|
|
11678
|
+
acc.push(token);
|
|
11679
|
+
return acc;
|
|
11680
|
+
}, []);
|
|
11681
|
+
var attrsToken = attrs.length ? ' ' + attrs.join(' ') : '';
|
|
11682
|
+
var children = (node.children || [])
|
|
11683
|
+
.map(function (child) { return renderAbstractNodeToSVGElement(child, options); })
|
|
11684
|
+
.join('');
|
|
11685
|
+
if (children && children.length) {
|
|
11686
|
+
return "<".concat(node.tag).concat(attrsToken, ">").concat(children, "</").concat(node.tag, ">");
|
|
11687
|
+
}
|
|
11688
|
+
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
11689
|
+
}
|
|
10853
11690
|
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
background-color: var(--lumo-base-color);
|
|
10857
|
-
border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */
|
|
10858
|
-
}
|
|
11691
|
+
const lotteryTippingPanelCss = ".panel-container{border:2px solid var(--emw--color-gray-300, #333);border-radius:8px;overflow:hidden;font-family:sans-serif;width:calc(100% - 4px)}.panel-header{background-color:var(--emw--color-background, #fff);padding:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px}.panel-header:hover{background-color:var(--emw--color-primary, #fed275)}.panel-header.active{background-color:var(--emw--color-primary, #fed275)}.header-content{white-space:nowrap;user-select:none}.arrow{transition:transform 0.3s ease;font-size:16px;display:inline-flex}.arrow.expanded{transform:rotate(180deg)}.panel-body{overflow:hidden;max-height:0;transition:max-height 0.3s ease, padding 0.3s ease;background-color:var(--emw--color-background, #fff);padding:0 12px;font-size:14px}.panel-body.open{max-height:500px;padding:10px 12px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";
|
|
11692
|
+
const LotteryTippingPanelStyle0 = lotteryTippingPanelCss;
|
|
10859
11693
|
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
11694
|
+
const downIcon = renderIconDefinitionToSVGElement(DownOutlined$1, {
|
|
11695
|
+
extraSVGAttrs: { width: '16px', height: '16px', fill: '' }
|
|
11696
|
+
});
|
|
11697
|
+
const lotteryTippingPanel = class {
|
|
11698
|
+
constructor(hostRef) {
|
|
11699
|
+
index.registerInstance(this, hostRef);
|
|
11700
|
+
this.togglePanel = () => {
|
|
11701
|
+
this.expanded = !this.expanded;
|
|
11702
|
+
};
|
|
11703
|
+
this.mbSource = undefined;
|
|
11704
|
+
this.clientStyling = undefined;
|
|
11705
|
+
this.clientStylingUrl = undefined;
|
|
11706
|
+
this.headerTitle = undefined;
|
|
11707
|
+
this.expanded = false;
|
|
11708
|
+
}
|
|
11709
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
11710
|
+
if (newValue != oldValue) {
|
|
11711
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11712
|
+
}
|
|
11713
|
+
}
|
|
11714
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
11715
|
+
if (newValue != oldValue) {
|
|
11716
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11717
|
+
}
|
|
11718
|
+
}
|
|
11719
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
11720
|
+
if (newValue != oldValue) {
|
|
11721
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11722
|
+
}
|
|
11723
|
+
}
|
|
11724
|
+
componentDidLoad() {
|
|
11725
|
+
if (this.stylingContainer) {
|
|
11726
|
+
if (this.mbSource)
|
|
11727
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11728
|
+
if (this.clientStyling)
|
|
11729
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11730
|
+
if (this.clientStylingUrl)
|
|
11731
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11732
|
+
}
|
|
11733
|
+
}
|
|
11734
|
+
disconnectedCallback() {
|
|
11735
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
11736
|
+
}
|
|
11737
|
+
render() {
|
|
11738
|
+
return (index.h("div", { key: 'aad4bd39648c6e9df1191429caa1f8b35424d31c', class: "panel-container", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '685317142a2fe2d110bbec41c6561446f1229b5b', class: { 'panel-header': true, active: this.expanded }, onClick: this.togglePanel }, index.h("div", { key: 'bf42af64a3eac7e8998cb9fe75c465eeaf44b7ba', class: "header-content" }, index.h("slot", { key: '181469c7a4cbe6030f64d4a08eb3e11390a4f569', name: "header" }, index.h("span", { key: '25db3b952ba81bff3a17d67ab9c960365abb6852' }, this.headerTitle))), index.h("span", { key: 'fc10e5fe178aa9b6bbae680b6fe58ca66c3a7df3', class: `arrow ${this.expanded ? 'expanded' : ''}`, innerHTML: downIcon })), index.h("div", { key: '8ae6e1a6b51eb398625d11d0b94fdbebf3cbcbc1', class: `panel-body ${this.expanded ? 'open' : 'closed'}` }, index.h("slot", { key: '9fdf6862787be818e8e9655f151630fd2913c4fd', name: "content" }))));
|
|
11739
|
+
}
|
|
11740
|
+
get el() { return index.getElement(this); }
|
|
11741
|
+
static get watchers() { return {
|
|
11742
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
11743
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
11744
|
+
"mbSource": ["handleMbSourceChange"]
|
|
11745
|
+
}; }
|
|
11746
|
+
};
|
|
11747
|
+
lotteryTippingPanel.style = LotteryTippingPanelStyle0;
|
|
10865
11748
|
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
11749
|
+
const formatDate$1 = ({ date, type = 'date', format: format$1 }) => {
|
|
11750
|
+
try {
|
|
11751
|
+
const parsedDate = parseISO(date);
|
|
11752
|
+
if (isNaN(parsedDate.getTime())) {
|
|
11753
|
+
throw new Error(`Invalid date: ${date}`);
|
|
11754
|
+
}
|
|
11755
|
+
if (format$1)
|
|
11756
|
+
return format(parsedDate, format$1);
|
|
11757
|
+
let formatStr = 'dd/MM/yyyy';
|
|
11758
|
+
if (type === 'time') {
|
|
11759
|
+
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
11760
|
+
}
|
|
11761
|
+
else if (type === 'week') {
|
|
11762
|
+
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
11763
|
+
}
|
|
11764
|
+
return format(parsedDate, formatStr);
|
|
11765
|
+
}
|
|
11766
|
+
catch (error) {
|
|
11767
|
+
console.error('Error formatting date:', error.message);
|
|
11768
|
+
return '';
|
|
11769
|
+
}
|
|
11770
|
+
};
|
|
11771
|
+
const fetcher$1 = (url) => fetch(url, {
|
|
11772
|
+
method: 'GET',
|
|
11773
|
+
headers: {
|
|
11774
|
+
'x-scheme': 'application/json',
|
|
11775
|
+
Accept: 'application/json'
|
|
11776
|
+
}
|
|
11777
|
+
}).then((r) => r.json());
|
|
11778
|
+
const showNotification$1 = ({ message, theme = 'success' }) => {
|
|
11779
|
+
window.postMessage({
|
|
11780
|
+
type: 'ShowNotificationToast',
|
|
11781
|
+
message,
|
|
11782
|
+
theme
|
|
11783
|
+
});
|
|
11784
|
+
};
|
|
11785
|
+
const thousandSeparator = (value) => {
|
|
11786
|
+
if (value === 0) {
|
|
11787
|
+
return '0';
|
|
11788
|
+
}
|
|
11789
|
+
if (!value) {
|
|
11790
|
+
return '';
|
|
11791
|
+
}
|
|
11792
|
+
value = value.toString();
|
|
11793
|
+
const parts = value.split('.');
|
|
11794
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
11795
|
+
return parts.join('.');
|
|
11796
|
+
};
|
|
11797
|
+
const generateUUID = () => {
|
|
11798
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
11799
|
+
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
11800
|
+
return v.toString(16);
|
|
11801
|
+
});
|
|
11802
|
+
};
|
|
11803
|
+
const TICKET_INVALID_TOKEN = 'TICKET_INVALID_TOKEN';
|
|
11804
|
+
// format results to winning numbers
|
|
11805
|
+
const formatResultsToWinningNumbers = (rawResults) => {
|
|
11806
|
+
const formatMatchCheckRes = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
|
|
11807
|
+
const resultsForTotalLines = rawResults.map((lineRes) => lineRes.map(formatMatchCheckRes));
|
|
11808
|
+
const result = [];
|
|
11809
|
+
for (let i = 0; i < resultsForTotalLines.length; i++) {
|
|
11810
|
+
const resultsInLine = resultsForTotalLines[i];
|
|
11811
|
+
for (let j = 0; j < resultsInLine.length; j++) {
|
|
11812
|
+
const matchResult = resultsInLine[j];
|
|
11813
|
+
for (let k = 0; k < matchResult.length; k++) {
|
|
11814
|
+
if (!result[i])
|
|
11815
|
+
result[i] = [];
|
|
11816
|
+
if (matchResult[k])
|
|
11817
|
+
result[i].push(k, j);
|
|
11818
|
+
}
|
|
11819
|
+
}
|
|
11820
|
+
}
|
|
11821
|
+
return result;
|
|
11822
|
+
};
|
|
11823
|
+
const doSubmitTicket = ({ body, sessionId, url }) => {
|
|
11824
|
+
const options = {
|
|
11825
|
+
method: 'POST',
|
|
11826
|
+
headers: {
|
|
11827
|
+
'Content-Type': 'application/json',
|
|
11828
|
+
Accept: 'application/json',
|
|
11829
|
+
Authorization: `Bearer ${sessionId}`,
|
|
11830
|
+
'X-Idempotency-Key': generateUUID()
|
|
11831
|
+
},
|
|
11832
|
+
body: JSON.stringify(body)
|
|
11833
|
+
};
|
|
11834
|
+
return fetch(url, options).then((res) => {
|
|
11835
|
+
if (res.status === 401) {
|
|
11836
|
+
throw new Error(TICKET_INVALID_TOKEN);
|
|
11837
|
+
}
|
|
11838
|
+
if (res.status > 300) {
|
|
11839
|
+
throw new Error(res.statusText);
|
|
11840
|
+
}
|
|
11841
|
+
return res.json();
|
|
11842
|
+
});
|
|
11843
|
+
};
|
|
11844
|
+
// BettingTypes, playModes and playTypes
|
|
11845
|
+
const getEnableOptions = (raw = []) => raw.filter((i) => i.enabled);
|
|
11846
|
+
// the first one in bet type config that enabled = true, will be default choice
|
|
11847
|
+
const getDefaultType = ({ playTypeConfig = [], betTypeConfig = [], enabledBettingTypeOptions = [], enabledPlayingModeOptions = [] }) => {
|
|
11848
|
+
const enabledBetTypeConfig = betTypeConfig.filter((i) => i.enabled);
|
|
11849
|
+
for (const item of enabledBetTypeConfig) {
|
|
11850
|
+
const { bettingType, playMode } = playTypeConfig === null || playTypeConfig === void 0 ? void 0 : playTypeConfig.find((i) => i.betTypeId === item.id);
|
|
11851
|
+
if (enabledBettingTypeOptions.map((i) => i.code).includes(bettingType) &&
|
|
11852
|
+
enabledPlayingModeOptions.map((i) => i.code).includes(playMode))
|
|
11853
|
+
return { bettingType, playMode };
|
|
11854
|
+
}
|
|
11855
|
+
return {};
|
|
11856
|
+
};
|
|
11857
|
+
const calculatePlayingModeOptions = ({ bettingType, playTypeConfig, betTypeConfig, enabledPlayingModeOptions }) => {
|
|
11858
|
+
const enabledBetTypeIdConfig = betTypeConfig.filter((i) => i.enabled).map((i) => i.id);
|
|
11859
|
+
const filteredPlayTypesConfig = playTypeConfig.filter((i) => enabledBetTypeIdConfig.includes(i.betTypeId));
|
|
11860
|
+
const selectedBettingTypeFilteredPlayTypesConfig = filteredPlayTypesConfig.filter((i) => i.bettingType === bettingType);
|
|
11861
|
+
const _ = selectedBettingTypeFilteredPlayTypesConfig.map((i) => i.playMode);
|
|
11862
|
+
return enabledPlayingModeOptions.filter((i) => _.includes(i.code));
|
|
11863
|
+
};
|
|
11864
|
+
const getCheckedCountForEachLineAndEachMatch = ({ rawResults }) => {
|
|
11865
|
+
const getMatchCheckRes = (matchRes) => matchRes.filter((bulletItem) => bulletItem.isSelected).length;
|
|
11866
|
+
const checkedCountForEachLineAndEachMatch = rawResults.map((lineRes) => lineRes.length > 0 ? lineRes.map(getMatchCheckRes) : [0]);
|
|
11867
|
+
return checkedCountForEachLineAndEachMatch;
|
|
11868
|
+
};
|
|
11869
|
+
const getPlayTypeConfig = ({ rawData, selectedBettingType, selectedPlayingMode }) => {
|
|
11870
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11871
|
+
const betTypeId = (_d = (_c = (_b = (_a = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes) === null || _c === void 0 ? void 0 : _c.find((i) => i.bettingType === selectedBettingType && i.playMode === selectedPlayingMode)) === null || _d === void 0 ? void 0 : _d.betTypeId;
|
|
11872
|
+
const betType = (_f = (_e = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _e === void 0 ? void 0 : _e.betTypes) === null || _f === void 0 ? void 0 : _f.find((i) => i.id === betTypeId);
|
|
11873
|
+
return { betTypeId, betType };
|
|
11874
|
+
};
|
|
10872
11875
|
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
11876
|
+
const DEFAULT_LANGUAGE$2 = 'en';
|
|
11877
|
+
const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
11878
|
+
const TRANSLATIONS$2 = {
|
|
11879
|
+
en: {
|
|
11880
|
+
stop: 'Stop',
|
|
11881
|
+
at: 'at'
|
|
11882
|
+
},
|
|
11883
|
+
ro: {
|
|
11884
|
+
stop: 'Oprește',
|
|
11885
|
+
at: 'la'
|
|
11886
|
+
},
|
|
11887
|
+
fr: {
|
|
11888
|
+
stop: 'Arrêtez',
|
|
11889
|
+
at: 'à'
|
|
11890
|
+
},
|
|
11891
|
+
ar: {
|
|
11892
|
+
stop: 'توقف',
|
|
11893
|
+
at: 'في'
|
|
11894
|
+
},
|
|
11895
|
+
hr: {
|
|
11896
|
+
stop: 'Stop',
|
|
11897
|
+
at: 'u'
|
|
11898
|
+
}
|
|
11899
|
+
};
|
|
11900
|
+
const translate$2 = (key, customLang) => {
|
|
11901
|
+
const lang = customLang;
|
|
11902
|
+
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
11903
|
+
};
|
|
10877
11904
|
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
11905
|
+
const DEFAULT_LANGUAGE$1 = 'en';
|
|
11906
|
+
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
11907
|
+
const TRANSLATIONS$1 = {
|
|
11908
|
+
en: {
|
|
11909
|
+
selectionCleared: 'Your selection will be cleared.',
|
|
11910
|
+
ticketSubmitted: 'Ticket submitted successfully.',
|
|
11911
|
+
ticketFailed: 'Failed to purchase the ticket. Please try again.',
|
|
11912
|
+
lines: 'Lines',
|
|
11913
|
+
line: 'Line',
|
|
11914
|
+
bettingType: 'Betting Type',
|
|
11915
|
+
playingMode: 'Playing Mode',
|
|
11916
|
+
orderSummaryTitle: 'Order Summary',
|
|
11917
|
+
orderSummaryTickets: 'Tickets',
|
|
11918
|
+
orderSummaryTotal: 'Total',
|
|
11919
|
+
orderSummarySubmit: 'Submit',
|
|
11920
|
+
cancel: 'Cancel',
|
|
11921
|
+
confirm: 'Confirm'
|
|
11922
|
+
},
|
|
11923
|
+
ro: {
|
|
11924
|
+
selectionCleared: 'Selecția dvs. va fi ștearsă.',
|
|
11925
|
+
ticketSubmitted: 'Bilet trimis cu succes.',
|
|
11926
|
+
ticketFailed: 'Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.',
|
|
11927
|
+
lines: 'Linii',
|
|
11928
|
+
line: 'Linie',
|
|
11929
|
+
bettingType: 'Tip de pariu',
|
|
11930
|
+
playingMode: 'Mod de joc',
|
|
11931
|
+
orderSummaryTitle: 'Sumar comandă',
|
|
11932
|
+
orderSummaryTickets: 'Bilete',
|
|
11933
|
+
orderSummaryTotal: 'Total',
|
|
11934
|
+
orderSummarySubmit: 'Trimite',
|
|
11935
|
+
cancel: 'Anulează',
|
|
11936
|
+
confirm: 'Confirmă'
|
|
11937
|
+
},
|
|
11938
|
+
fr: {
|
|
11939
|
+
selectionCleared: 'Votre sélection sera effacée.',
|
|
11940
|
+
ticketSubmitted: 'Billet soumis avec succès.',
|
|
11941
|
+
ticketFailed: "Échec de l'achat du billet. Veuillez réessayer.",
|
|
11942
|
+
lines: 'Lignes',
|
|
11943
|
+
line: 'Ligne',
|
|
11944
|
+
bettingType: 'Type de pari',
|
|
11945
|
+
playingMode: 'Mode de jeu',
|
|
11946
|
+
orderSummaryTitle: 'Résumé de la commande',
|
|
11947
|
+
orderSummaryTickets: 'Billets',
|
|
11948
|
+
orderSummaryTotal: 'Total',
|
|
11949
|
+
orderSummarySubmit: 'Soumettre',
|
|
11950
|
+
cancel: 'Annuler',
|
|
11951
|
+
confirm: 'Confirmer'
|
|
11952
|
+
},
|
|
11953
|
+
ar: {
|
|
11954
|
+
selectionCleared: 'سيتم مسح اختيارك.',
|
|
11955
|
+
ticketSubmitted: 'تم إرسال التذكرة بنجاح.',
|
|
11956
|
+
ticketFailed: 'فشل شراء التذكرة. يرجى المحاولة مرة أخرى.',
|
|
11957
|
+
lines: 'خطوط',
|
|
11958
|
+
line: 'خط',
|
|
11959
|
+
bettingType: 'نوع الرهان',
|
|
11960
|
+
playingMode: 'وضع اللعب',
|
|
11961
|
+
orderSummaryTitle: 'ملخص الطلب',
|
|
11962
|
+
orderSummaryTickets: 'التذاكر',
|
|
11963
|
+
orderSummaryTotal: 'المجموع',
|
|
11964
|
+
orderSummarySubmit: 'إرسال',
|
|
11965
|
+
cancel: 'إلغاء',
|
|
11966
|
+
confirm: 'تأكيد'
|
|
11967
|
+
},
|
|
11968
|
+
hr: {
|
|
11969
|
+
selectionCleared: 'Vaš odabir bit će obrisan.',
|
|
11970
|
+
ticketSubmitted: 'Listić je uspješno predan.',
|
|
11971
|
+
ticketFailed: 'Kupnja listića nije uspjela. Molimo pokušajte ponovo.',
|
|
11972
|
+
lines: 'Linije',
|
|
11973
|
+
line: 'Linija',
|
|
11974
|
+
bettingType: 'Vrsta oklade',
|
|
11975
|
+
playingMode: 'Način igranja',
|
|
11976
|
+
orderSummaryTitle: 'Sažetak narudžbe',
|
|
11977
|
+
orderSummaryTickets: 'Listići',
|
|
11978
|
+
orderSummaryTotal: 'Ukupno',
|
|
11979
|
+
orderSummarySubmit: 'Pošalji',
|
|
11980
|
+
cancel: 'Odustani',
|
|
11981
|
+
confirm: 'Potvrdi'
|
|
10881
11982
|
}
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
11983
|
+
};
|
|
11984
|
+
const translate$1 = (key, customLang) => {
|
|
11985
|
+
const lang = customLang;
|
|
11986
|
+
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
11987
|
+
};
|
|
11988
|
+
const getTranslations$1 = (data) => {
|
|
11989
|
+
Object.keys(data).forEach((item) => {
|
|
11990
|
+
for (let key in data[item]) {
|
|
11991
|
+
TRANSLATIONS$1[item][key] = data[item][key];
|
|
11992
|
+
}
|
|
11993
|
+
});
|
|
11994
|
+
};
|
|
11995
|
+
const resolveTranslationUrl = async (translationUrl) => {
|
|
11996
|
+
if (translationUrl) {
|
|
11997
|
+
try {
|
|
11998
|
+
const response = await fetch(translationUrl);
|
|
11999
|
+
if (!response.ok) {
|
|
12000
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
12001
|
+
}
|
|
12002
|
+
const translations = await response.json();
|
|
12003
|
+
getTranslations$1(translations);
|
|
12004
|
+
}
|
|
12005
|
+
catch (error) {
|
|
12006
|
+
console.error('Failed to fetch or parse translations from URL:', error);
|
|
12007
|
+
}
|
|
10899
12008
|
}
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
:host([closing]) [part='overlay'] {
|
|
10903
|
-
animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
10904
|
-
}
|
|
12009
|
+
};
|
|
10905
12010
|
|
|
10906
|
-
:
|
|
10907
|
-
|
|
10908
|
-
}
|
|
12011
|
+
const lotteryTippingTicketBannerCss = ".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary-variant, #ffe66f);\n border-bottom: 2px solid var(--emw--color-primary-variant, #ffe66f);\n gap: 0.5rem;\n white-space: nowrap;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-gray-400, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-gray-400, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n border: 2px solid var(--emw--color-gray-150, #6f6f6f);\n border-radius: 0.4rem;\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-300, #333);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";
|
|
12012
|
+
const LotteryTippingTicketBannerStyle0 = lotteryTippingTicketBannerCss;
|
|
10909
12013
|
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
12014
|
+
const LotteryTippingTicketBanner = class {
|
|
12015
|
+
constructor(hostRef) {
|
|
12016
|
+
index.registerInstance(this, hostRef);
|
|
12017
|
+
this.mbSource = undefined;
|
|
12018
|
+
this.clientStyling = undefined;
|
|
12019
|
+
this.clientStylingUrl = undefined;
|
|
12020
|
+
this.language = 'en';
|
|
12021
|
+
this.translationUrl = '';
|
|
12022
|
+
this.stopTime = '';
|
|
12023
|
+
this.period = undefined;
|
|
10914
12024
|
}
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
margin-bottom: 0 !important;
|
|
10920
|
-
margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
|
|
10921
|
-
}
|
|
10922
|
-
|
|
10923
|
-
[part='message'] {
|
|
10924
|
-
width: 25em;
|
|
10925
|
-
min-width: 100%;
|
|
10926
|
-
max-width: 100%;
|
|
10927
|
-
}
|
|
10928
|
-
|
|
10929
|
-
::slotted([slot$='button'][theme~='tertiary']) {
|
|
10930
|
-
padding-left: var(--lumo-space-s);
|
|
10931
|
-
padding-right: var(--lumo-space-s);
|
|
10932
|
-
}
|
|
10933
|
-
|
|
10934
|
-
[part='cancel-button'] {
|
|
10935
|
-
flex-grow: 1;
|
|
10936
|
-
}
|
|
10937
|
-
|
|
10938
|
-
@media (max-width: 360px) {
|
|
10939
|
-
[part='footer'] {
|
|
10940
|
-
flex-direction: column-reverse;
|
|
10941
|
-
align-items: stretch;
|
|
10942
|
-
padding: var(--lumo-space-s) var(--lumo-space-l);
|
|
10943
|
-
gap: var(--lumo-space-s);
|
|
12025
|
+
get formattedStopTime() {
|
|
12026
|
+
let _temp = '';
|
|
12027
|
+
if (!this.stopTime) {
|
|
12028
|
+
return _temp;
|
|
10944
12029
|
}
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
12030
|
+
_temp = formatDate$1({ date: this.stopTime, format: 'dd/MM/yyyy HH:mm' });
|
|
12031
|
+
if (isToday(new Date(this.stopTime))) {
|
|
12032
|
+
_temp = formatDate$1({ date: this.stopTime, format: 'HH:mm' });
|
|
12033
|
+
}
|
|
12034
|
+
return _temp;
|
|
12035
|
+
}
|
|
12036
|
+
get formattedPeriod() {
|
|
12037
|
+
let _temp = '';
|
|
12038
|
+
_temp = formatDate$1({ date: this.period, format: 'EEEE' });
|
|
12039
|
+
if (_temp.toLowerCase() === 'wednesday') {
|
|
12040
|
+
_temp = 'MIDWEEK';
|
|
12041
|
+
}
|
|
12042
|
+
return _temp.toUpperCase();
|
|
12043
|
+
}
|
|
12044
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
12045
|
+
if (newValue != oldValue) {
|
|
12046
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12047
|
+
}
|
|
12048
|
+
}
|
|
12049
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
12050
|
+
if (newValue != oldValue) {
|
|
12051
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12052
|
+
}
|
|
12053
|
+
}
|
|
12054
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
12055
|
+
if (newValue != oldValue) {
|
|
12056
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
10949
12057
|
}
|
|
10950
|
-
}
|
|
10951
|
-
`],{moduleId:"lumo-confirm-dialog-overlay"});/**
|
|
10952
|
-
* @license
|
|
10953
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10954
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10955
|
-
*/const G_=s=>class extends s{static get properties(){return {opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e;}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"));}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0);}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1);});}_onOverlayOpened(e){e.detail.value===!1&&(this.opened=!1);}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault();}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault();}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront();}};/**
|
|
10956
|
-
* @license
|
|
10957
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10958
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10959
|
-
*/const K_=p`
|
|
10960
|
-
[part='header'],
|
|
10961
|
-
[part='header-content'],
|
|
10962
|
-
[part='footer'] {
|
|
10963
|
-
display: flex;
|
|
10964
|
-
align-items: center;
|
|
10965
|
-
flex-wrap: wrap;
|
|
10966
|
-
flex: none;
|
|
10967
|
-
pointer-events: none;
|
|
10968
|
-
z-index: 1;
|
|
10969
|
-
}
|
|
10970
|
-
|
|
10971
|
-
[part='header'] {
|
|
10972
|
-
flex-wrap: nowrap;
|
|
10973
|
-
}
|
|
10974
|
-
|
|
10975
|
-
::slotted([slot='header-content']),
|
|
10976
|
-
::slotted([slot='title']),
|
|
10977
|
-
::slotted([slot='footer']) {
|
|
10978
|
-
display: contents;
|
|
10979
|
-
pointer-events: auto;
|
|
10980
|
-
}
|
|
10981
|
-
|
|
10982
|
-
::slotted([slot='title']) {
|
|
10983
|
-
font: inherit !important;
|
|
10984
|
-
overflow-wrap: anywhere;
|
|
10985
|
-
}
|
|
10986
|
-
|
|
10987
|
-
[part='header-content'] {
|
|
10988
|
-
flex: 1;
|
|
10989
|
-
}
|
|
10990
|
-
|
|
10991
|
-
:host([has-title]) [part='header-content'],
|
|
10992
|
-
[part='footer'] {
|
|
10993
|
-
justify-content: flex-end;
|
|
10994
|
-
}
|
|
10995
|
-
|
|
10996
|
-
:host(:not([has-title]):not([has-header])) [part='header'],
|
|
10997
|
-
:host(:not([has-header])) [part='header-content'],
|
|
10998
|
-
:host(:not([has-title])) [part='title'],
|
|
10999
|
-
:host(:not([has-footer])) [part='footer'] {
|
|
11000
|
-
display: none !important;
|
|
11001
|
-
}
|
|
11002
|
-
|
|
11003
|
-
:host(:is([has-title], [has-header], [has-footer])) [part='content'] {
|
|
11004
|
-
height: auto;
|
|
11005
|
-
}
|
|
11006
|
-
|
|
11007
|
-
@media (min-height: 320px) {
|
|
11008
|
-
:host(:is([has-title], [has-header], [has-footer])) .resizer-container {
|
|
11009
|
-
overflow: hidden;
|
|
11010
|
-
display: flex;
|
|
11011
|
-
flex-direction: column;
|
|
11012
12058
|
}
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
12059
|
+
async componentWillLoad() {
|
|
12060
|
+
if (this.translationUrl) {
|
|
12061
|
+
resolveTranslationUrl(this.translationUrl);
|
|
12062
|
+
}
|
|
11017
12063
|
}
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
:host([has-bounds-set]) [part='overlay'] {
|
|
11029
|
-
max-width: none;
|
|
11030
|
-
}
|
|
11031
|
-
|
|
11032
|
-
@media (forced-colors: active) {
|
|
11033
|
-
[part='overlay'] {
|
|
11034
|
-
outline: 3px solid !important;
|
|
12064
|
+
componentDidLoad() {
|
|
12065
|
+
if (this.stylingContainer) {
|
|
12066
|
+
if (this.mbSource)
|
|
12067
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
12068
|
+
if (this.clientStyling)
|
|
12069
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12070
|
+
if (this.clientStylingUrl)
|
|
12071
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12072
|
+
}
|
|
11035
12073
|
}
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
overflow: auto;
|
|
11052
|
-
flex-grow: 1;
|
|
11053
|
-
border-radius: inherit; /* prevent child elements being drawn outside part=overlay */
|
|
11054
|
-
}
|
|
11055
|
-
|
|
11056
|
-
[part='overlay'][style] .resizer-container {
|
|
11057
|
-
min-height: 100%;
|
|
11058
|
-
width: 100%;
|
|
11059
|
-
}
|
|
11060
|
-
|
|
11061
|
-
:host(:not([resizable])) .resizer {
|
|
11062
|
-
display: none;
|
|
11063
|
-
}
|
|
11064
|
-
|
|
11065
|
-
:host([resizable]) [part='title'] {
|
|
11066
|
-
cursor: move;
|
|
11067
|
-
-webkit-user-select: none;
|
|
11068
|
-
user-select: none;
|
|
11069
|
-
}
|
|
11070
|
-
|
|
11071
|
-
.resizer {
|
|
11072
|
-
position: absolute;
|
|
11073
|
-
height: 16px;
|
|
11074
|
-
width: 16px;
|
|
11075
|
-
}
|
|
11076
|
-
|
|
11077
|
-
.resizer.edge {
|
|
11078
|
-
height: 8px;
|
|
11079
|
-
width: 8px;
|
|
11080
|
-
inset: -4px;
|
|
11081
|
-
}
|
|
11082
|
-
|
|
11083
|
-
.resizer.edge.n {
|
|
11084
|
-
width: auto;
|
|
11085
|
-
bottom: auto;
|
|
11086
|
-
cursor: ns-resize;
|
|
11087
|
-
}
|
|
11088
|
-
|
|
11089
|
-
.resizer.ne {
|
|
11090
|
-
top: -4px;
|
|
11091
|
-
right: -4px;
|
|
11092
|
-
cursor: nesw-resize;
|
|
11093
|
-
}
|
|
11094
|
-
|
|
11095
|
-
.resizer.edge.e {
|
|
11096
|
-
height: auto;
|
|
11097
|
-
left: auto;
|
|
11098
|
-
cursor: ew-resize;
|
|
11099
|
-
}
|
|
11100
|
-
|
|
11101
|
-
.resizer.se {
|
|
11102
|
-
bottom: -4px;
|
|
11103
|
-
right: -4px;
|
|
11104
|
-
cursor: nwse-resize;
|
|
11105
|
-
}
|
|
11106
|
-
|
|
11107
|
-
.resizer.edge.s {
|
|
11108
|
-
width: auto;
|
|
11109
|
-
top: auto;
|
|
11110
|
-
cursor: ns-resize;
|
|
11111
|
-
}
|
|
11112
|
-
|
|
11113
|
-
.resizer.sw {
|
|
11114
|
-
bottom: -4px;
|
|
11115
|
-
left: -4px;
|
|
11116
|
-
cursor: nesw-resize;
|
|
11117
|
-
}
|
|
11118
|
-
|
|
11119
|
-
.resizer.edge.w {
|
|
11120
|
-
height: auto;
|
|
11121
|
-
right: auto;
|
|
11122
|
-
cursor: ew-resize;
|
|
11123
|
-
}
|
|
11124
|
-
|
|
11125
|
-
.resizer.nw {
|
|
11126
|
-
top: -4px;
|
|
11127
|
-
left: -4px;
|
|
11128
|
-
cursor: nwse-resize;
|
|
11129
|
-
}
|
|
11130
|
-
`;/**
|
|
11131
|
-
* @license
|
|
11132
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11133
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11134
|
-
*/const X_=s=>class extends s{static get properties(){return {ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return ["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(e,i,o){const r=`--_vaadin-confirm-dialog-content-${i}`;o?e.style.setProperty(r,o):e.style.removeProperty(r);}__updateContentHeight(e,i){i&&this.__updateDimension(i,"height",e);}__updateContentWidth(e,i){i&&this.__updateDimension(i,"width",e);}};/**
|
|
11135
|
-
* @license
|
|
11136
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11137
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11138
|
-
*/const J_=p`
|
|
11139
|
-
:host {
|
|
11140
|
-
--_vaadin-confirm-dialog-content-width: auto;
|
|
11141
|
-
--_vaadin-confirm-dialog-content-height: auto;
|
|
11142
|
-
}
|
|
11143
|
-
|
|
11144
|
-
[part='overlay'] {
|
|
11145
|
-
width: var(--_vaadin-confirm-dialog-content-width);
|
|
11146
|
-
height: var(--_vaadin-confirm-dialog-content-height);
|
|
11147
|
-
}
|
|
11148
|
-
|
|
11149
|
-
::slotted([slot='header']) {
|
|
11150
|
-
pointer-events: auto;
|
|
11151
|
-
}
|
|
12074
|
+
disconnectedCallback() {
|
|
12075
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
12076
|
+
}
|
|
12077
|
+
render() {
|
|
12078
|
+
const backgroundImagePath = index.getAssetPath('../static/tipping-full-color.svg');
|
|
12079
|
+
return (index.h("div", { key: 'eb93e7946631d234963d841df9e8b753b651c795', ref: (el) => (this.stylingContainer = el), class: "lottery-tipping-ticket-banner__container" }, index.h("section", { key: '0133e845df14caa912b18e1734ad16c584b7359f', class: "banner" }, index.h("div", { key: '23bc3b34011dc5533bf70397f974936e238f04fe', class: "left" }, index.h("img", { key: '52110de0807e79c02d7934ec8a37c1322b73fe84', alt: "Betting", src: backgroundImagePath, class: "logo" })), index.h("div", { key: 'b5deae59d09b870777c913c5ebfca43886c3cf95', class: "mid period" }, this.formattedPeriod), index.h("div", { key: 'b404e474850233e2d5e139077fd774f178bc40fa', class: "right" }, index.h("span", { key: '3b9072c2165a033d17c9572c7cafe2a2c699447b', class: "pill" }, index.h("strong", { key: 'c560c2c27dc930a963b992c07e02745b18d0002f' }, translate$2('stop', this.language)), "\u00A0", translate$2('at', this.language), "\u00A0", this.formattedStopTime)))));
|
|
12080
|
+
}
|
|
12081
|
+
static get assetsDirs() { return ["../static"]; }
|
|
12082
|
+
static get watchers() { return {
|
|
12083
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
12084
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
12085
|
+
"mbSource": ["handleMbSourceChange"]
|
|
12086
|
+
}; }
|
|
12087
|
+
};
|
|
12088
|
+
LotteryTippingTicketBanner.style = LotteryTippingTicketBannerStyle0;
|
|
11152
12089
|
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
:
|
|
11185
|
-
|
|
12090
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
12091
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
12092
|
+
const TRANSLATIONS = {
|
|
12093
|
+
en: {
|
|
12094
|
+
homeTeam: 'Home team:',
|
|
12095
|
+
awayTeam: 'Away team:',
|
|
12096
|
+
selectionCleared: 'Your selection has been cleared.',
|
|
12097
|
+
selectionOnLineCleared: 'Your selection on this line will be cleared.',
|
|
12098
|
+
loading: 'Loading...',
|
|
12099
|
+
error: 'Error!',
|
|
12100
|
+
noData: 'No data available.',
|
|
12101
|
+
lineInfo: 'Line {currentPage} of {totalPages}',
|
|
12102
|
+
clearAll: 'Clear All',
|
|
12103
|
+
cancel: 'Cancel',
|
|
12104
|
+
confirm: 'Confirm'
|
|
12105
|
+
},
|
|
12106
|
+
ro: {
|
|
12107
|
+
homeTeam: 'Echipa gazdă:',
|
|
12108
|
+
awayTeam: 'Echipa oaspete:',
|
|
12109
|
+
selectionCleared: 'Selecția dvs. a fost ștearsă.',
|
|
12110
|
+
selectionOnLineCleared: 'Selecția dvs. de pe această linie va fi ștearsă.',
|
|
12111
|
+
loading: `Se încarcă...',n error: 'Eroare!`,
|
|
12112
|
+
noData: 'Nu sunt date disponibile.',
|
|
12113
|
+
lineInfo: 'Linia {currentPage} din {totalPages}',
|
|
12114
|
+
clearAll: 'Șterge tot',
|
|
12115
|
+
cancel: 'Anulează',
|
|
12116
|
+
confirm: 'Confirmă'
|
|
12117
|
+
},
|
|
12118
|
+
fr: {
|
|
12119
|
+
homeTeam: 'Équipe à domicile:',
|
|
12120
|
+
awayTeam: `Équipe à l'extérieur:`,
|
|
12121
|
+
selectionCleared: 'Votre sélection a été effacée.',
|
|
12122
|
+
selectionOnLineCleared: 'Votre sélection sur cette ligne sera effacée.',
|
|
12123
|
+
loading: `Chargement...',n error: 'Erreur!`,
|
|
12124
|
+
noData: 'Aucune donnée disponible.',
|
|
12125
|
+
lineInfo: 'Ligne {currentPage} sur {totalPages}',
|
|
12126
|
+
clearAll: 'Tout effacer',
|
|
12127
|
+
cancel: 'Annuler',
|
|
12128
|
+
confirm: 'Confirmer'
|
|
12129
|
+
},
|
|
12130
|
+
ar: {
|
|
12131
|
+
homeTeam: 'الفريق المضيف:',
|
|
12132
|
+
awayTeam: 'الفريق الضيف:',
|
|
12133
|
+
selectionCleared: 'تم مسح اختيارك.',
|
|
12134
|
+
selectionOnLineCleared: 'سيتم مسح اختيارك في هذا السطر.',
|
|
12135
|
+
loading: `جار التحميل...',n error: 'خطأ!`,
|
|
12136
|
+
noData: 'لا توجد بيانات متاحة.',
|
|
12137
|
+
lineInfo: 'السطر {currentPage} من {totalPages}',
|
|
12138
|
+
clearAll: 'مسح الكل',
|
|
12139
|
+
cancel: 'إلغاء',
|
|
12140
|
+
confirm: 'تأكيد'
|
|
12141
|
+
},
|
|
12142
|
+
hr: {
|
|
12143
|
+
homeTeam: 'Domaći tim:',
|
|
12144
|
+
awayTeam: 'Gostujući tim:',
|
|
12145
|
+
selectionCleared: 'Vaš odabir je obrisan.',
|
|
12146
|
+
selectionOnLineCleared: 'Vaš odabir na ovoj liniji bit će obrisan.',
|
|
12147
|
+
loading: `Učitavanje...',n error: 'Greška!`,
|
|
12148
|
+
noData: 'Nema dostupnih podataka.',
|
|
12149
|
+
lineInfo: 'Linija {currentPage} od {totalPages}',
|
|
12150
|
+
clearAll: 'Očisti sve',
|
|
12151
|
+
cancel: 'Odustani',
|
|
12152
|
+
confirm: 'Potvrdi'
|
|
12153
|
+
}
|
|
12154
|
+
};
|
|
12155
|
+
const translate = (key, customLang, replacements) => {
|
|
12156
|
+
const lang = customLang;
|
|
12157
|
+
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
12158
|
+
if (replacements) {
|
|
12159
|
+
Object.keys(replacements).forEach((placeholder) => {
|
|
12160
|
+
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
12161
|
+
});
|
|
12162
|
+
}
|
|
12163
|
+
return translation;
|
|
12164
|
+
};
|
|
12165
|
+
const getTranslations = (data) => {
|
|
12166
|
+
Object.keys(data).forEach((item) => {
|
|
12167
|
+
for (let key in data[item]) {
|
|
12168
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
11186
12169
|
}
|
|
11187
|
-
|
|
12170
|
+
});
|
|
12171
|
+
};
|
|
11188
12172
|
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
on-touchstart="_bringOverlayToFront"
|
|
11195
|
-
theme$="[[_theme]]"
|
|
11196
|
-
modeless="[[modeless]]"
|
|
11197
|
-
with-backdrop="[[!modeless]]"
|
|
11198
|
-
resizable$="[[resizable]]"
|
|
11199
|
-
aria-label$="[[ariaLabel]]"
|
|
11200
|
-
restore-focus-on-close
|
|
11201
|
-
focus-trap
|
|
11202
|
-
></vaadin-confirm-dialog-overlay>
|
|
11203
|
-
`}}x(Z_);/**
|
|
11204
|
-
* @license
|
|
11205
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11206
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11207
|
-
*/const em=s=>class extends s{static get properties(){return {accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return ["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this);}get __slottedNodes(){return [this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new D(this,"header","h3",{initializer:e=>{this._headerNode=e;}}),this.addController(this._headerController),this._messageController=new D(this,"","div",{multiple:!0,observe:!1,initializer:e=>{const i=document.createElement("div");i.style.display="contents";const o=`confirm-dialog-message-${lt()}`;i.id=o,this.appendChild(i),i.appendChild(e),this._messageNodes=[...this._messageNodes,i];}}),this.addController(this._messageController),this._cancelController=new D(this,"cancel-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("cancel",e);}}),this.addController(this._cancelController),this._rejectController=new D(this,"reject-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("reject",e);}}),this.addController(this._rejectController),this._confirmController=new D(this,"confirm-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("confirm",e);}}),this.addController(this._confirmController);}_initOverlay(e){e.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),e.addEventListener("vaadin-overlay-open",()=>this.__onDialogOpened()),e.addEventListener("vaadin-overlay-closed",()=>this.__onDialogClosed()),e.setAttribute("role","alertdialog");}__onDialogOpened(){const e=this._overlayElement;this.__slottedNodes.forEach(o=>{e.appendChild(o);});const i=e.querySelector('[slot="confirm-button"]');i&&i.focus();}__onDialogClosed(){this.__slottedNodes.forEach(e=>{this.appendChild(e);}),this.dispatchEvent(new CustomEvent("closed"));}__accessibleDescriptionRefChanged(e,i,o){!e||!i||(o!==void 0?we(e,"aria-describedby",{newId:o,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):i.forEach(r=>{we(e,"aria-describedby",{newId:r.id});}),this.__oldAccessibleDescriptionRef=o);}__setupSlottedButton(e,i){const o=`_${e}Button`,r=`__${e}`;this[o]&&this[o]!==i&&this[o].remove(),i.addEventListener("click",this[r]),this[o]=i;}__updateCancelButton(e,i,o,r){e&&(e===this._cancelController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}__updateConfirmButton(e,i,o){e&&e===this._confirmController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o));}__updateHeaderNode(e,i){e&&e===this._headerController.defaultNode&&(e.textContent=i);}__updateMessageNodes(e,i){if(e&&e.length>0){const o=e.find(r=>this._messageController.defaultNode&&r===this._messageController.defaultNode.parentElement);o&&(o.firstChild.textContent=i);}}__updateRejectButton(e,i,o,r){e&&(e===this._rejectController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}_escPressed(e){e.defaultPrevented||this.__cancel();}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1;}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1;}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1;}_getAriaLabel(e){return e||"confirmation"}};/**
|
|
11208
|
-
* @license
|
|
11209
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11210
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11211
|
-
*/class tm extends em(q($t(J(g)))){static get template(){return v`
|
|
11212
|
-
<style>
|
|
11213
|
-
:host,
|
|
11214
|
-
[hidden] {
|
|
11215
|
-
display: none !important;
|
|
12173
|
+
const formatDate = ({ date, type = 'date', format: format$1 }) => {
|
|
12174
|
+
try {
|
|
12175
|
+
const parsedDate = parseISO(date);
|
|
12176
|
+
if (isNaN(parsedDate.getTime())) {
|
|
12177
|
+
throw new Error(`Invalid date: ${date}`);
|
|
11216
12178
|
}
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
12179
|
+
if (format$1)
|
|
12180
|
+
return format(parsedDate, format$1);
|
|
12181
|
+
let formatStr = 'dd/MM/yyyy';
|
|
12182
|
+
if (type === 'time') {
|
|
12183
|
+
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
12184
|
+
}
|
|
12185
|
+
else if (type === 'week') {
|
|
12186
|
+
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
12187
|
+
}
|
|
12188
|
+
return format(parsedDate, formatStr);
|
|
12189
|
+
}
|
|
12190
|
+
catch (error) {
|
|
12191
|
+
console.error('Error formatting date:', error.message);
|
|
12192
|
+
return '';
|
|
12193
|
+
}
|
|
12194
|
+
};
|
|
12195
|
+
const fetcher = (url) => fetch(url).then((r) => r.json());
|
|
12196
|
+
const DEFAULT_BULLET_CONFIG = [
|
|
12197
|
+
{
|
|
12198
|
+
value: '1'
|
|
12199
|
+
},
|
|
12200
|
+
{
|
|
12201
|
+
value: 'X'
|
|
12202
|
+
},
|
|
12203
|
+
{
|
|
12204
|
+
value: '2'
|
|
12205
|
+
}
|
|
12206
|
+
];
|
|
12207
|
+
const SPLIT_TOKEN = '-';
|
|
12208
|
+
const showNotification = ({ message, theme = 'success', position = 'top-end', duration = 3000 }) => {
|
|
12209
|
+
if (!customElements.get('vaadin-notification')) {
|
|
12210
|
+
console.warn('vaadin-notification is not registered. Please ensure it is imported.');
|
|
12211
|
+
}
|
|
12212
|
+
const notification = document.createElement('vaadin-notification');
|
|
12213
|
+
notification.renderer = (root) => {
|
|
12214
|
+
root.textContent = message;
|
|
12215
|
+
};
|
|
12216
|
+
notification.duration = duration;
|
|
12217
|
+
if (theme) {
|
|
12218
|
+
notification.setAttribute('theme', theme);
|
|
12219
|
+
}
|
|
12220
|
+
notification.setAttribute('position', position);
|
|
12221
|
+
document.body.appendChild(notification);
|
|
12222
|
+
notification.opened = true;
|
|
12223
|
+
};
|
|
11239
12224
|
|
|
11240
12225
|
const lotteryTippingTicketBetCss = ".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-gray-400, #000);\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.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\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-color: var(--emw--color-gray-50, #f5f5f5);\n color: var(--emw--color-gray-400, #000);\n font-weight: 500;\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-gray-400, #000);\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-gray-50, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-gray-50, #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.btn {\n background: transparent;\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background, #fff);\n border-radius: 8px;\n box-shadow: 0 1px 4px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n background-color: var(--emw--color-gray-50, #f5f5f5);\n box-shadow: 0 2px 6px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));\n transform: scale(1.05);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item img {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover img {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-gray-100, #e6e6e6);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-gray-300, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n color: white;\n transition: all 0.3s ease;\n cursor: pointer;\n box-shadow: 0 4px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));\n opacity: 0.9;\n}\n\n.my-pagination .btn img {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background: var(--emw--color-gray-100, #e6e6e6);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\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}\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 .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}";
|
|
11241
12226
|
const LotteryTippingTicketBetStyle0 = lotteryTippingTicketBetCss;
|
|
@@ -11890,10 +12875,361 @@ const LotteryTippingTicketController = class {
|
|
|
11890
12875
|
};
|
|
11891
12876
|
LotteryTippingTicketController.style = LotteryTippingTicketControllerStyle0;
|
|
11892
12877
|
|
|
12878
|
+
var DrawResult;
|
|
12879
|
+
(function (DrawResult) {
|
|
12880
|
+
DrawResult["WON"] = "Won";
|
|
12881
|
+
DrawResult["LOST"] = "Lost";
|
|
12882
|
+
})(DrawResult || (DrawResult = {}));
|
|
12883
|
+
|
|
12884
|
+
const lotteryTippingTicketHistoryCss = "@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #555);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-gray-300, #333);border:2px solid var(--emw--color-gray-300, #333)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-gray-100, #e6e6e6);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-gray-400, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}";
|
|
12885
|
+
const LotteryTippingTicketHistoryStyle0 = lotteryTippingTicketHistoryCss;
|
|
12886
|
+
|
|
12887
|
+
const LotteryTippingTicketHistory = class {
|
|
12888
|
+
constructor(hostRef) {
|
|
12889
|
+
index.registerInstance(this, hostRef);
|
|
12890
|
+
this.logout = index.createEvent(this, "logout", 7);
|
|
12891
|
+
this.ticketTypeMap = {
|
|
12892
|
+
NORMAL: 'Normal',
|
|
12893
|
+
SYNDICATE: 'Syndicate',
|
|
12894
|
+
SUBSCRIPTION: 'Subscription'
|
|
12895
|
+
};
|
|
12896
|
+
this.resultMap = { [DrawResult.WON]: 'Win', [DrawResult.LOST]: 'Lose' };
|
|
12897
|
+
this.displayPrizeCategory = (details) => {
|
|
12898
|
+
const prizeMap = new Map();
|
|
12899
|
+
details.forEach((detail) => {
|
|
12900
|
+
let prizeName = detail.divisionDisplayName;
|
|
12901
|
+
let amount = detail.amount;
|
|
12902
|
+
let currency = detail.currency;
|
|
12903
|
+
if (prizeName && prizeName != 'None') {
|
|
12904
|
+
if (prizeMap.has(prizeName)) {
|
|
12905
|
+
prizeMap.set(prizeName, {
|
|
12906
|
+
amount: prizeMap.get(prizeName)['amount'] + amount,
|
|
12907
|
+
currency,
|
|
12908
|
+
times: prizeMap.get(prizeName)['times'] + 1
|
|
12909
|
+
});
|
|
12910
|
+
}
|
|
12911
|
+
else {
|
|
12912
|
+
prizeMap.set(prizeName, { amount, currency, times: 1 });
|
|
12913
|
+
}
|
|
12914
|
+
}
|
|
12915
|
+
});
|
|
12916
|
+
const resultArr = [];
|
|
12917
|
+
for (let [key, val] of prizeMap.entries()) {
|
|
12918
|
+
resultArr.push({ prizeName: key, amount: val['amount'], currency: val['currency'], times: val['times'] });
|
|
12919
|
+
}
|
|
12920
|
+
resultArr.sort((p1, p2) => p2.prizeName.localeCompare(p1.prizeName));
|
|
12921
|
+
return resultArr;
|
|
12922
|
+
};
|
|
12923
|
+
this.endpoint = undefined;
|
|
12924
|
+
this.endpointTicket = undefined;
|
|
12925
|
+
this.gameId = undefined;
|
|
12926
|
+
this.playerId = undefined;
|
|
12927
|
+
this.sessionId = '';
|
|
12928
|
+
this.drawId = undefined;
|
|
12929
|
+
this.mbSource = undefined;
|
|
12930
|
+
this.clientStyling = undefined;
|
|
12931
|
+
this.clientStylingUrl = undefined;
|
|
12932
|
+
this.language = 'en';
|
|
12933
|
+
this.translationUrl = '';
|
|
12934
|
+
this.ticketHistory = [];
|
|
12935
|
+
this.activeStatus = '';
|
|
12936
|
+
this.statusOptions = undefined;
|
|
12937
|
+
this.isLoading = false;
|
|
12938
|
+
this.rawData = {};
|
|
12939
|
+
this.filterData = {
|
|
12940
|
+
offset: 0,
|
|
12941
|
+
limit: 10,
|
|
12942
|
+
state: '',
|
|
12943
|
+
from: '',
|
|
12944
|
+
to: '',
|
|
12945
|
+
wagerType: '',
|
|
12946
|
+
vendorGameType: 'PoolGame',
|
|
12947
|
+
id: ''
|
|
12948
|
+
};
|
|
12949
|
+
this.paginationInfo = {
|
|
12950
|
+
current: 1,
|
|
12951
|
+
total: 0,
|
|
12952
|
+
pageSize: 10
|
|
12953
|
+
};
|
|
12954
|
+
this.quickFiltersActive = false;
|
|
12955
|
+
this.showCurrentTicketLine = false;
|
|
12956
|
+
this.curTicketItem = undefined;
|
|
12957
|
+
this.curSelection = [];
|
|
12958
|
+
this.curSelectionIdx = 0;
|
|
12959
|
+
this.showCurrentDrawResult = false;
|
|
12960
|
+
this.curDrawItem = undefined;
|
|
12961
|
+
this.curDrawSelection = [];
|
|
12962
|
+
this.curDrawSelectionBettingType = undefined;
|
|
12963
|
+
this.curDrawSelectionMap = {};
|
|
12964
|
+
}
|
|
12965
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
12966
|
+
if (newValue != oldValue) {
|
|
12967
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12968
|
+
}
|
|
12969
|
+
}
|
|
12970
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
12971
|
+
if (newValue != oldValue) {
|
|
12972
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12973
|
+
}
|
|
12974
|
+
}
|
|
12975
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
12976
|
+
if (newValue != oldValue) {
|
|
12977
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
12978
|
+
}
|
|
12979
|
+
}
|
|
12980
|
+
componentDidLoad() {
|
|
12981
|
+
if (this.stylingContainer) {
|
|
12982
|
+
if (this.mbSource)
|
|
12983
|
+
lotteryTippingPage.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
12984
|
+
if (this.clientStyling)
|
|
12985
|
+
lotteryTippingPage.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12986
|
+
if (this.clientStylingUrl)
|
|
12987
|
+
lotteryTippingPage.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12988
|
+
}
|
|
12989
|
+
}
|
|
12990
|
+
connectedCallback() {
|
|
12991
|
+
const fetchData = () => {
|
|
12992
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
12993
|
+
this.isLoading = true;
|
|
12994
|
+
fetcher$2(url.href)
|
|
12995
|
+
.then((res) => {
|
|
12996
|
+
this.rawData = res;
|
|
12997
|
+
})
|
|
12998
|
+
.finally(() => {
|
|
12999
|
+
this.isLoading = false;
|
|
13000
|
+
});
|
|
13001
|
+
};
|
|
13002
|
+
fetchData();
|
|
13003
|
+
}
|
|
13004
|
+
disconnectedCallback() {
|
|
13005
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
13006
|
+
}
|
|
13007
|
+
async fetchTicketList() {
|
|
13008
|
+
this.isLoading = true;
|
|
13009
|
+
try {
|
|
13010
|
+
const { items, total } = await fetchRequest(`${this.endpointTicket}/tickets${toQueryParams(this.filterData)}`, 'GET', null, {
|
|
13011
|
+
Authorization: `Bearer ${this.sessionId}`
|
|
13012
|
+
});
|
|
13013
|
+
this.ticketHistory = items;
|
|
13014
|
+
this.paginationInfo.total = total;
|
|
13015
|
+
this.isLoading = false;
|
|
13016
|
+
if (items.length > 0) {
|
|
13017
|
+
this.getDrawResult();
|
|
13018
|
+
}
|
|
13019
|
+
}
|
|
13020
|
+
catch (e) {
|
|
13021
|
+
console.log('in fetchTicketList error is: ', e);
|
|
13022
|
+
if (e.status === 401) {
|
|
13023
|
+
this.showNotification(e.message, 'error');
|
|
13024
|
+
this.logout.emit();
|
|
13025
|
+
}
|
|
13026
|
+
}
|
|
13027
|
+
finally {
|
|
13028
|
+
this.isLoading = false;
|
|
13029
|
+
}
|
|
13030
|
+
}
|
|
13031
|
+
async fetchDrwaResult(gameId, drawId) {
|
|
13032
|
+
try {
|
|
13033
|
+
const res = await fetchRequest(`${this.endpoint}/games/${gameId}/draws/${drawId}`, 'GET', {});
|
|
13034
|
+
return res;
|
|
13035
|
+
}
|
|
13036
|
+
catch (e) {
|
|
13037
|
+
console.log(e);
|
|
13038
|
+
}
|
|
13039
|
+
}
|
|
13040
|
+
showNotification(message, theme = '', position = 'top-end') {
|
|
13041
|
+
const notification = document.createElement('vaadin-notification');
|
|
13042
|
+
notification.renderer = (root) => {
|
|
13043
|
+
root.textContent = message;
|
|
13044
|
+
};
|
|
13045
|
+
notification.duration = 5000;
|
|
13046
|
+
if (theme) {
|
|
13047
|
+
notification.setAttribute('theme', theme);
|
|
13048
|
+
}
|
|
13049
|
+
notification.setAttribute('position', position);
|
|
13050
|
+
document.body.appendChild(notification);
|
|
13051
|
+
notification.opened = true;
|
|
13052
|
+
}
|
|
13053
|
+
getDivision(detail, drawData) {
|
|
13054
|
+
var _a;
|
|
13055
|
+
let division = detail.division;
|
|
13056
|
+
let prize = (_a = drawData.prizes) === null || _a === void 0 ? void 0 : _a.filter((prize) => prize.order === division);
|
|
13057
|
+
if (prize && prize.length) {
|
|
13058
|
+
return prize[0].division;
|
|
13059
|
+
}
|
|
13060
|
+
else {
|
|
13061
|
+
return null;
|
|
13062
|
+
}
|
|
13063
|
+
}
|
|
13064
|
+
async getDrawResult() {
|
|
13065
|
+
const idMapper = new Map();
|
|
13066
|
+
this.ticketHistory.forEach((item, ticketIndex) => {
|
|
13067
|
+
item.drawResults.forEach((drawResult, drawIndex) => {
|
|
13068
|
+
const id = `${drawResult.drawId}-${item.gameId}`;
|
|
13069
|
+
if (!idMapper.has(id)) {
|
|
13070
|
+
idMapper.set(id, {
|
|
13071
|
+
drawId: drawResult.drawId,
|
|
13072
|
+
gameId: item.gameId,
|
|
13073
|
+
indices: [{ ticketIndex, drawIndex }]
|
|
13074
|
+
});
|
|
13075
|
+
}
|
|
13076
|
+
else {
|
|
13077
|
+
idMapper.get(id).indices.push({ ticketIndex, drawIndex });
|
|
13078
|
+
}
|
|
13079
|
+
});
|
|
13080
|
+
});
|
|
13081
|
+
let updatedTicketHistory = [...this.ticketHistory];
|
|
13082
|
+
await Promise.all(Array.from(idMapper.values()).map(async ({ gameId, drawId, indices }) => {
|
|
13083
|
+
try {
|
|
13084
|
+
const drawData = await this.fetchDrwaResult(gameId, drawId);
|
|
13085
|
+
if (drawData) {
|
|
13086
|
+
indices.forEach(({ ticketIndex, drawIndex }) => {
|
|
13087
|
+
const updatedDrawResult = Object.assign(Object.assign({}, updatedTicketHistory[ticketIndex].drawResults[drawIndex]), { tempDrawData: Object.assign(Object.assign({}, drawData), { vendorGameId: updatedTicketHistory[ticketIndex].vendorGameId }), prizeDetails: this.displayPrizeCategory(updatedTicketHistory[ticketIndex].drawResults[drawIndex].details) });
|
|
13088
|
+
const updatedDrawResults = [...updatedTicketHistory[ticketIndex].drawResults];
|
|
13089
|
+
updatedDrawResults[drawIndex] = updatedDrawResult;
|
|
13090
|
+
updatedTicketHistory[ticketIndex] = Object.assign(Object.assign({}, updatedTicketHistory[ticketIndex]), { drawResults: updatedDrawResults });
|
|
13091
|
+
});
|
|
13092
|
+
}
|
|
13093
|
+
}
|
|
13094
|
+
catch (error) {
|
|
13095
|
+
console.error(`failed to fetch draw result (gameId: ${gameId}, drawId: ${drawId}):`, error);
|
|
13096
|
+
}
|
|
13097
|
+
}));
|
|
13098
|
+
this.ticketHistory = updatedTicketHistory;
|
|
13099
|
+
}
|
|
13100
|
+
componentWillLoad() {
|
|
13101
|
+
if (this.translationUrl) {
|
|
13102
|
+
getTranslations$2(JSON.parse(this.translationUrl));
|
|
13103
|
+
}
|
|
13104
|
+
this.statusOptions = [
|
|
13105
|
+
{
|
|
13106
|
+
label: translate$3('settled', this.language),
|
|
13107
|
+
value: 'Settled'
|
|
13108
|
+
},
|
|
13109
|
+
{
|
|
13110
|
+
label: translate$3('purchased', this.language),
|
|
13111
|
+
value: 'Purchased'
|
|
13112
|
+
},
|
|
13113
|
+
{
|
|
13114
|
+
label: translate$3('canceled', this.language),
|
|
13115
|
+
value: 'Canceled'
|
|
13116
|
+
}
|
|
13117
|
+
];
|
|
13118
|
+
this.fetchTicketList();
|
|
13119
|
+
}
|
|
13120
|
+
changeStatus(status) {
|
|
13121
|
+
this.activeStatus = status;
|
|
13122
|
+
this.filterData.state = status;
|
|
13123
|
+
this.quickFiltersActive = true;
|
|
13124
|
+
this.fetchTicketList();
|
|
13125
|
+
}
|
|
13126
|
+
handlePageSizeChange(event) {
|
|
13127
|
+
this.filterData.limit = event.detail;
|
|
13128
|
+
this.fetchTicketList();
|
|
13129
|
+
}
|
|
13130
|
+
handlePageChange(event) {
|
|
13131
|
+
this.filterData.offset = (event.detail - 1) * this.filterData.limit;
|
|
13132
|
+
this.fetchTicketList();
|
|
13133
|
+
}
|
|
13134
|
+
handleShowTicketLineDetial(item) {
|
|
13135
|
+
this.curSelectionIdx = 0;
|
|
13136
|
+
this.showCurrentTicketLine = true;
|
|
13137
|
+
this.curTicketItem = item;
|
|
13138
|
+
this.curSelection = this.parseSelection();
|
|
13139
|
+
}
|
|
13140
|
+
handleShowCurrentDraw(item) {
|
|
13141
|
+
this.showCurrentDrawResult = true;
|
|
13142
|
+
this.curDrawItem = item;
|
|
13143
|
+
this.curDrawSelectionBettingType = item.winningNumbers[0].winning_type;
|
|
13144
|
+
this.curDrawItem.winningNumbers.forEach((item) => {
|
|
13145
|
+
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.numbers)];
|
|
13146
|
+
});
|
|
13147
|
+
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
13148
|
+
}
|
|
13149
|
+
parseSelection() {
|
|
13150
|
+
const result = [];
|
|
13151
|
+
this.curTicketItem.selection.forEach((selection, index) => {
|
|
13152
|
+
result[index] = parseEachLineNumber(selection.selections);
|
|
13153
|
+
});
|
|
13154
|
+
return result;
|
|
13155
|
+
}
|
|
13156
|
+
handleFilterChange(e) {
|
|
13157
|
+
const filterData = e.detail;
|
|
13158
|
+
this.filterData.from = filterData.filterFromCalendar;
|
|
13159
|
+
this.filterData.to = filterData.filterToCalendar;
|
|
13160
|
+
this.filterData.id = filterData.ticketId;
|
|
13161
|
+
this.filterData.wagerType = filterData.ticketType;
|
|
13162
|
+
this.fetchTicketList();
|
|
13163
|
+
}
|
|
13164
|
+
handleFilterClear() {
|
|
13165
|
+
this.activeStatus = '';
|
|
13166
|
+
this.quickFiltersActive = false;
|
|
13167
|
+
this.filterData = {
|
|
13168
|
+
offset: 0,
|
|
13169
|
+
limit: 10,
|
|
13170
|
+
state: '',
|
|
13171
|
+
from: '',
|
|
13172
|
+
to: '',
|
|
13173
|
+
wagerType: '',
|
|
13174
|
+
vendorGameType: 'PoolGame',
|
|
13175
|
+
id: ''
|
|
13176
|
+
};
|
|
13177
|
+
this.fetchTicketList();
|
|
13178
|
+
}
|
|
13179
|
+
get playTypeConfig() {
|
|
13180
|
+
var _a, _b, _c;
|
|
13181
|
+
return (_c = (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.poolGame) === null || _c === void 0 ? void 0 : _c.playTypes;
|
|
13182
|
+
}
|
|
13183
|
+
get bettingTypeConfig() {
|
|
13184
|
+
var _a, _b, _c;
|
|
13185
|
+
return (_c = (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.poolGame) === null || _c === void 0 ? void 0 : _c.bettingTypes;
|
|
13186
|
+
}
|
|
13187
|
+
getBettingType(betTypeId) {
|
|
13188
|
+
var _a;
|
|
13189
|
+
return (_a = this.playTypeConfig.find((item) => item.betTypeId === betTypeId)['bettingType']) !== null && _a !== void 0 ? _a : '';
|
|
13190
|
+
}
|
|
13191
|
+
handlePoolGameCurrentPageChange(e) {
|
|
13192
|
+
const { currentPage } = e.detail;
|
|
13193
|
+
this.curSelectionIdx = currentPage - 1;
|
|
13194
|
+
}
|
|
13195
|
+
handleDrawBettingTypeChange(bettingType) {
|
|
13196
|
+
this.curDrawSelectionBettingType = bettingType;
|
|
13197
|
+
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
13198
|
+
}
|
|
13199
|
+
getBettingTypeName(bettingType) {
|
|
13200
|
+
var _a, _b;
|
|
13201
|
+
const name = (_b = (_a = this.bettingTypeConfig) === null || _a === void 0 ? void 0 : _a.find((item) => item.code === bettingType)) === null || _b === void 0 ? void 0 : _b.name;
|
|
13202
|
+
return name !== null && name !== void 0 ? name : bettingType;
|
|
13203
|
+
}
|
|
13204
|
+
render() {
|
|
13205
|
+
return (index.h("div", { key: '27d7945395c1bd5cf8c50fabcf9358dd10a2f379', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '29bf61bc1b7a2f34bf24814c5d256bc84b703fa9', class: "ticket-history-title" }, translate$3('ticketsHistory', this.language)), index.h("div", { key: 'aabcc336535e36248c07afac1b3777c8e00e6d36', class: "filter-wrap" }, index.h("div", { key: '6a2ce1224363104c27d63026e3d246f70db12516', class: "filter-status" }, this.statusOptions.map((status) => (index.h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), index.h("div", { key: '740826baea69e1adf534bcf9a2bb4d5083fa9d90', class: "filter-operation" }, index.h("lottery-tipping-filter", { key: '395ebb8b2c040804adb4e0a87daff0d01a0598cf', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (index.h("div", { key: 'c27852dcd7902ac43a1ff7408476e5f8667c1010', class: "loading-wrap" }, index.h("section", { key: '9ab2fea4cafdefe3accbc0e49be19ec16158cd14', class: "dots-container" }, index.h("div", { key: 'c5d6c3227c51c462eb4bcca926b7ab70e3676dfd', class: "dot" }), index.h("div", { key: '9ac68a72b257614a1c048a870f18753fe85967db', class: "dot" }), index.h("div", { key: '6c5d426f926a5726a3d88ad509fc6e38f715c10d', class: "dot" }), index.h("div", { key: '90959f4befb4d2308a1cf1651dd76f7be71b3e34', class: "dot" }), index.h("div", { key: '1e8dda2f5e4e460cb0f4aa7897b19fad23d98834', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (index.h("div", { key: '452303d3d8221e2c3905b1d0d2e81651f1e62038', class: "empty-wrap" }, translate$3('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (index.h("div", { key: 'e7c5d75d70077d6b65a006fa6169ff9d2edca2ea', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (index.h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, index.h("div", { class: "panel-content", slot: "content" }, index.h("div", { class: "ticket-info" }, index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$3('ticketId', this.language)), index.h("div", { class: "ticket-info-val" }, item.id, " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$3('ticketType', this.language)), index.h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$3('ticketAmount', this.language)), index.h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$3('lineDetail', this.language)), index.h("div", { class: "ticket-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate$3('seeDetails', this.language)))), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate$3('numberOfDraw', this.language)), index.h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
|
|
13206
|
+
item.drawResults.map((drawResultItem) => (index.h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (index.h("div", { class: "draw-info" }, index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$3('ticketResult', this.language)), index.h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$3('drawId', this.language)), index.h("div", { class: "draw-info-val" }, drawResultItem.drawId)), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$3('drawDate', this.language)), index.h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$3('result', this.language)), index.h("div", { class: "draw-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate$3('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate$3('prize', this.language)), index.h("div", { class: "draw-info-val1" }, index.h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (index.h("span", null, index.h("div", null, index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), index.h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (index.h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (index.h("div", { class: "skeleton-line" })))))))))))))), index.h("lottery-tipping-dialog", { key: '913a521d05ae95b088fba515d951bc79b1433938', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
|
|
13207
|
+
this.showCurrentTicketLine = false;
|
|
13208
|
+
}, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (index.h("div", { key: '6608c983a4bc781f4beac6488b0857abfb59ca48' }, index.h("div", { key: '77690236f6e654e8f178bdb6fb76f49826b02a60', class: "betting-type" }, index.h("div", { key: '30d239aa23d01edb20049b5fbbbbc094c6742f75', class: "betting-type-title" }, translate$3('bettingType', this.language)), index.h("div", { key: '93770717ac08bbacc84d9de8b16133073e36d4c9', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), index.h("lottery-tipping-ticket-bet", { key: '11641a37abe2ca65ecb706f94ce8a911f9e849d9', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("lottery-tipping-dialog", { key: 'fdac976410e6b1b1e1ea20072d5c4caa474f4130', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
|
|
13209
|
+
this.showCurrentDrawResult = false;
|
|
13210
|
+
}, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (index.h("div", { key: 'b495d8bb01c4bb18edf951889850d56700564d8b' }, index.h("div", { key: '77443b43ee363dd2051da4a8c6cb004f2acab410', class: "betting-type" }, index.h("div", { key: 'ada4a3803b9073e78c248790f24de86900e5776f', class: "betting-type-title" }, translate$3('bettingType', this.language)), index.h("div", { key: '20826ed1192db8acfb25310c31252cb7f5a75f2a', class: "betting-type-text" }, index.h("div", { key: '7721c04879283138870833b3ce0b881cd84aec6c', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
|
|
13211
|
+
LotteryTippingTicketController__segment: true,
|
|
13212
|
+
'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
|
|
13213
|
+
}, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: 'b8b29a1a6e6bda2ce5004765e219e58d8e12bb2f', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("div", { key: 'a84c658d87e936cbf20731a64bc753f13c099024', class: "pagination-wrap" }, index.h("lottery-tipping-pagination", { key: 'fdf7443bd153e90c131e4ba937f08d611706a56d', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
|
|
13214
|
+
}
|
|
13215
|
+
static get watchers() { return {
|
|
13216
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
13217
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
13218
|
+
"mbSource": ["handleMbSourceChange"]
|
|
13219
|
+
}; }
|
|
13220
|
+
};
|
|
13221
|
+
LotteryTippingTicketHistory.style = LotteryTippingTicketHistoryStyle0;
|
|
13222
|
+
|
|
11893
13223
|
exports.lottery_tipping_page = lotteryTippingPage.LotteryTippingPage;
|
|
13224
|
+
exports.general_multi_select = GeneralMultiSelect;
|
|
11894
13225
|
exports.general_tooltip = GeneralTooltip;
|
|
11895
13226
|
exports.lottery_tipping_bullet = LotteryTippingBullet;
|
|
11896
13227
|
exports.lottery_tipping_bullet_group = LotteryTippingBulletGroup;
|
|
13228
|
+
exports.lottery_tipping_dialog = LotteryTippingDialog;
|
|
13229
|
+
exports.lottery_tipping_filter = LotteryTippingFilter;
|
|
13230
|
+
exports.lottery_tipping_pagination = LotteryTippingPagination;
|
|
13231
|
+
exports.lottery_tipping_panel = lotteryTippingPanel;
|
|
11897
13232
|
exports.lottery_tipping_ticket_banner = LotteryTippingTicketBanner;
|
|
11898
13233
|
exports.lottery_tipping_ticket_bet = LotteryTippingTicketBet;
|
|
11899
13234
|
exports.lottery_tipping_ticket_controller = LotteryTippingTicketController;
|
|
13235
|
+
exports.lottery_tipping_ticket_history = LotteryTippingTicketHistory;
|