@everymatrix/player-elevate-points-history 1.43.4 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/bonus-pagination-limits_6.cjs.entry.js +769 -931
  3. package/dist/cjs/index-c769d3e9.js +1651 -0
  4. package/dist/cjs/loader.cjs.js +7 -13
  5. package/dist/cjs/{player-elevate-card-items-574f7423.js → player-elevate-card-items-e7f7d092.js} +171 -285
  6. package/dist/cjs/player-elevate-card.cjs.entry.js +59 -70
  7. package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +66 -77
  8. package/dist/cjs/player-elevate-points-history.cjs.js +17 -11
  9. package/dist/collection/collection-manifest.json +3 -3
  10. package/dist/collection/components/player-elevate-points-history/index.js +1 -0
  11. package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.css +4 -4
  12. package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.js +389 -396
  13. package/dist/collection/renders/renderTabs.js +7 -9
  14. package/dist/collection/renders/renderTopBar.js +4 -12
  15. package/dist/collection/renders/renderWallets.js +27 -38
  16. package/dist/collection/utils/business.js +12 -12
  17. package/dist/collection/utils/fetch.js +13 -13
  18. package/dist/collection/utils/translation.js +32 -32
  19. package/dist/collection/utils/types.js +3 -3
  20. package/dist/collection/utils/util.js +12 -12
  21. package/dist/collection/utils/utils.js +3 -0
  22. package/dist/esm/app-globals-0f993ce5.js +3 -0
  23. package/dist/esm/bonus-pagination-limits_6.entry.js +769 -931
  24. package/dist/esm/index-e7bde614.js +1621 -0
  25. package/dist/esm/loader.js +7 -13
  26. package/dist/esm/{player-elevate-card-items-2bf82f60.js → player-elevate-card-items-4cabbcc6.js} +172 -285
  27. package/dist/esm/player-elevate-card.entry.js +59 -70
  28. package/dist/esm/player-elevate-loyaltycard.entry.js +66 -77
  29. package/dist/esm/player-elevate-points-history.js +14 -11
  30. package/dist/player-elevate-points-history/p-0f3449ca.entry.js +1 -0
  31. package/dist/player-elevate-points-history/p-212a0bb7.entry.js +1 -0
  32. package/dist/player-elevate-points-history/p-409b8855.entry.js +1 -0
  33. package/dist/player-elevate-points-history/p-8a361039.js +1 -0
  34. package/dist/player-elevate-points-history/p-e1255160.js +1 -0
  35. package/dist/player-elevate-points-history/p-f547f5dc.js +2 -0
  36. package/dist/player-elevate-points-history/player-elevate-points-history.esm.js +1 -1
  37. package/dist/stencil.config.dev.js +17 -0
  38. package/dist/stencil.config.js +12 -26
  39. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.d.ts +2 -0
  40. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.dev.d.ts +2 -0
  41. package/dist/types/components/player-elevate-points-history/index.d.ts +1 -0
  42. package/dist/types/components/player-elevate-points-history/player-elevate-points-history.d.ts +63 -63
  43. package/dist/types/components.d.ts +16 -1
  44. package/dist/types/stencil-public-runtime.d.ts +142 -33
  45. package/dist/types/utils/translation.d.ts +33 -33
  46. package/dist/types/utils/types.d.ts +32 -32
  47. package/dist/types/utils/utils.d.ts +1 -0
  48. package/loader/cdn.js +1 -3
  49. package/loader/index.cjs.js +1 -3
  50. package/loader/index.d.ts +13 -1
  51. package/loader/index.es2017.js +1 -3
  52. package/loader/index.js +1 -3
  53. package/loader/package.json +1 -0
  54. package/package.json +14 -13
  55. package/dist/assets/back.svg +0 -3
  56. package/dist/assets/menu.svg +0 -5
  57. package/dist/cjs/index-974f5239.js +0 -1686
  58. package/dist/components/bonus-pagination-limits.js +0 -6
  59. package/dist/components/bonus-pagination-limits2.js +0 -111
  60. package/dist/components/bonus-pagination-nav.js +0 -6
  61. package/dist/components/bonus-pagination-nav2.js +0 -219
  62. package/dist/components/general-styling-wrapper.js +0 -6
  63. package/dist/components/general-styling-wrapper2.js +0 -104
  64. package/dist/components/index.d.ts +0 -26
  65. package/dist/components/index.js +0 -1
  66. package/dist/components/player-elevate-card-data.js +0 -6
  67. package/dist/components/player-elevate-card-data2.js +0 -636
  68. package/dist/components/player-elevate-card-items.js +0 -2250
  69. package/dist/components/player-elevate-card.js +0 -127
  70. package/dist/components/player-elevate-loyaltycard.js +0 -133
  71. package/dist/components/player-elevate-pointcard.js +0 -6
  72. package/dist/components/player-elevate-pointcard2.js +0 -133
  73. package/dist/components/player-elevate-points-history.d.ts +0 -11
  74. package/dist/components/player-elevate-points-history.js +0 -471
  75. package/dist/esm/index-18159ab2.js +0 -1657
  76. package/dist/esm/polyfills/core-js.js +0 -11
  77. package/dist/esm/polyfills/css-shim.js +0 -1
  78. package/dist/esm/polyfills/dom.js +0 -79
  79. package/dist/esm/polyfills/es5-html-element.js +0 -1
  80. package/dist/esm/polyfills/index.js +0 -34
  81. package/dist/esm/polyfills/system.js +0 -6
  82. package/dist/player-elevate-points-history/p-2639efd0.js +0 -1
  83. package/dist/player-elevate-points-history/p-2d512640.entry.js +0 -1
  84. package/dist/player-elevate-points-history/p-3073cebd.js +0 -1
  85. package/dist/player-elevate-points-history/p-309d0acb.entry.js +0 -1
  86. package/dist/player-elevate-points-history/p-977d72c7.entry.js +0 -1
  87. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-elevate-points-history/.stencil/packages/player-elevate-points-history/stencil.config.d.ts +0 -2
@@ -2,351 +2,312 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-974f5239.js');
6
- const playerElevateCardItems = require('./player-elevate-card-items-574f7423.js');
5
+ const index = require('./index-c769d3e9.js');
6
+ const playerElevateCardItems = require('./player-elevate-card-items-e7f7d092.js');
7
7
 
8
8
  const DEFAULT_LANGUAGE$1 = 'en';
9
9
  const SUPPORTED_LANGUAGES$1 = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
10
10
  const TRANSLATIONS$1 = {
11
- en: {
12
- "pageLimitLabel": 'Show',
13
- },
14
- hu: {
15
- "pageLimitLabel": 'Show',
16
- },
17
- hr: {
18
- "pageLimitLabel": 'Show',
19
- },
20
- "pt-br": {
21
- "pageLimitLabel": 'Show',
22
- },
23
- "es-mx": {
24
- "pageLimitLabel": 'Show',
25
- }
11
+ en: {
12
+ "pageLimitLabel": 'Show',
13
+ },
14
+ hu: {
15
+ "pageLimitLabel": 'Show',
16
+ },
17
+ hr: {
18
+ "pageLimitLabel": 'Show',
19
+ },
20
+ "pt-br": {
21
+ "pageLimitLabel": 'Show',
22
+ },
23
+ "es-mx": {
24
+ "pageLimitLabel": 'Show',
25
+ }
26
26
  };
27
27
  const translate$1 = (key, customLang) => {
28
- const lang = customLang;
29
- return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
28
+ const lang = customLang;
29
+ return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
30
30
  };
31
31
 
32
32
  const bonusPaginationLimitsCss = ":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";
33
+ const BonusPaginationLimitsStyle0 = bonusPaginationLimitsCss;
33
34
 
34
35
  const BonusPaginationLimits = class {
35
- constructor(hostRef) {
36
- index.registerInstance(this, hostRef);
37
- this.pageLimitChanged = index.createEvent(this, "pageLimitChanged", 7);
38
- /**
39
- * Language of the widget
40
- */
41
- this.language = 'en';
42
- /**
43
- * Translation via url
44
- */
45
- this.translationUrl = '';
46
- /**
47
- * Default limit for per page, default: 10
48
- */
49
- this.limit = 10;
50
- this.pageLimits = [10, 25, 50];
51
- }
52
- onPageLimitClicked(pageLimit) {
53
- this.limit = pageLimit;
54
- this.pageLimitChanged.emit({ limit: this.limit });
55
- }
56
- componentWillLoad() {
57
- if (!this.pageLimitOptions) {
58
- return;
36
+ constructor(hostRef) {
37
+ index.registerInstance(this, hostRef);
38
+ this.pageLimitChanged = index.createEvent(this, "pageLimitChanged", 7);
39
+ this.language = 'en';
40
+ this.translationUrl = '';
41
+ this.pageLimitOptions = undefined;
42
+ this.limit = 10;
43
+ this.pageLimits = [10, 25, 50];
59
44
  }
60
- try {
61
- this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
62
- return parseInt(item);
63
- });
64
- // if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
65
- // and the value for the custom set limit (e.g. 8) isn't part of the provided array,
66
- // then ignore the set the custom set limit and make the limit equal to the first value of the array
67
- // (as part of the example so far, this would be 5)
68
- if (!this.pageLimits.includes(this.limit)) {
69
- this.limit = this.pageLimits[0];
70
- }
45
+ onPageLimitClicked(pageLimit) {
46
+ this.limit = pageLimit;
47
+ this.pageLimitChanged.emit({ limit: this.limit });
71
48
  }
72
- catch (e) {
73
- console.error('Error when parse PageLimitOptions', e);
49
+ componentWillLoad() {
50
+ if (!this.pageLimitOptions) {
51
+ return;
52
+ }
53
+ try {
54
+ this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
55
+ return parseInt(item);
56
+ });
57
+ // if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
58
+ // and the value for the custom set limit (e.g. 8) isn't part of the provided array,
59
+ // then ignore the set the custom set limit and make the limit equal to the first value of the array
60
+ // (as part of the example so far, this would be 5)
61
+ if (!this.pageLimits.includes(this.limit)) {
62
+ this.limit = this.pageLimits[0];
63
+ }
64
+ }
65
+ catch (e) {
66
+ console.error('Error when parse PageLimitOptions', e);
67
+ }
68
+ }
69
+ renderStylingWrapper() {
70
+ return index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl });
71
+ }
72
+ render() {
73
+ return index.h("div", { key: '57f5e61ee287f72d0427a2e4f646e37c6b9358b9', class: 'PaginationWrapper' }, index.h("span", { key: '5f82b19fcf269086659b3faa475d9967b2af57fa', class: 'NoOfItemsToDisplayMessage' }, translate$1('pageLimitLabel', this.language)), index.h("ul", { key: '559c2d5378a352691583567579a8e681d092ddd3', class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
74
+ return (index.h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
75
+ this.onPageLimitClicked(pageLimit);
76
+ } }, pageLimit));
77
+ })), index.h("general-styling-wrapper", { key: 'a8b9632e7421318e330f33b9c1cc9eb7121e35e9', targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl }), this.renderStylingWrapper());
74
78
  }
75
- }
76
- renderStylingWrapper() {
77
- return index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl });
78
- }
79
- render() {
80
- return index.h("div", { class: 'PaginationWrapper' }, index.h("span", { class: 'NoOfItemsToDisplayMessage' }, translate$1('pageLimitLabel', this.language)), index.h("ul", { class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
81
- return (index.h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
82
- this.onPageLimitClicked(pageLimit);
83
- } }, pageLimit));
84
- })), index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl }), this.renderStylingWrapper());
85
- }
86
79
  };
87
- BonusPaginationLimits.style = bonusPaginationLimitsCss;
80
+ BonusPaginationLimits.style = BonusPaginationLimitsStyle0;
88
81
 
89
82
  const DEFAULT_LANGUAGE = 'en';
90
83
  const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
91
84
  const TRANSLATIONS = {
92
- "en": {
93
- "firstPage": '|<',
94
- "lastPage": '>|',
95
- "prePage": '<',
96
- "nextPage": '>',
97
- "pageOfTotal": '{start}-{end} of {total}',
98
- },
99
- "hu": {
100
- "firstPage": 'First',
101
- "lastPage": 'Last',
102
- "prePage": '<',
103
- "nextPage": '>',
104
- "pageOfTotal": '{start}-{end} of {total}',
105
- },
106
- "hr": {
107
- "firstPage": 'First',
108
- "lastPage": 'Last',
109
- "prePage": '<',
110
- "nextPage": '>',
111
- "pageOfTotal": '{start}-{end} of {total}',
112
- },
113
- "pt-br": {
114
- "firstPage": 'First',
115
- "lastPage": 'Last',
116
- "prePage": '<',
117
- "nextPage": '>',
118
- "pageOfTotal": '{start}-{end} of {total}',
119
- },
120
- "es-mx": {
121
- "firstPage": 'First',
122
- "lastPage": 'Last',
123
- "prePage": '<',
124
- "nextPage": '>',
125
- "pageOfTotal": '{start}-{end} of {total}',
126
- }
85
+ "en": {
86
+ "firstPage": '|<',
87
+ "lastPage": '>|',
88
+ "prePage": '<',
89
+ "nextPage": '>',
90
+ "pageOfTotal": '{start}-{end} of {total}',
91
+ },
92
+ "hu": {
93
+ "firstPage": 'First',
94
+ "lastPage": 'Last',
95
+ "prePage": '<',
96
+ "nextPage": '>',
97
+ "pageOfTotal": '{start}-{end} of {total}',
98
+ },
99
+ "hr": {
100
+ "firstPage": 'First',
101
+ "lastPage": 'Last',
102
+ "prePage": '<',
103
+ "nextPage": '>',
104
+ "pageOfTotal": '{start}-{end} of {total}',
105
+ },
106
+ "pt-br": {
107
+ "firstPage": 'First',
108
+ "lastPage": 'Last',
109
+ "prePage": '<',
110
+ "nextPage": '>',
111
+ "pageOfTotal": '{start}-{end} of {total}',
112
+ },
113
+ "es-mx": {
114
+ "firstPage": 'First',
115
+ "lastPage": 'Last',
116
+ "prePage": '<',
117
+ "nextPage": '>',
118
+ "pageOfTotal": '{start}-{end} of {total}',
119
+ }
127
120
  };
128
121
  const translate = (key, customLang, values) => {
129
- const lang = customLang;
130
- let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
131
- if (values !== undefined) {
132
- for (const [key, value] of Object.entries(values.values)) {
133
- const regex = new RegExp(`{${key}}`, 'g');
134
- translation = translation.replace(regex, value);
122
+ const lang = customLang;
123
+ let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
124
+ if (values !== undefined) {
125
+ for (const [key, value] of Object.entries(values.values)) {
126
+ const regex = new RegExp(`{${key}}`, 'g');
127
+ translation = translation.replace(regex, value);
128
+ }
135
129
  }
136
- }
137
- return translation;
130
+ return translation;
138
131
  };
139
132
 
140
133
  const bonusPaginationNavCss = ":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";
134
+ const BonusPaginationNavStyle0 = bonusPaginationNavCss;
141
135
 
142
136
  const BonusPaginationNav = class {
143
- constructor(hostRef) {
144
- index.registerInstance(this, hostRef);
145
- this.reloadPageEmitter = index.createEvent(this, "reloadPageByType", 7);
146
- /**
147
- * The received length of dataset
148
- */
149
- this.total = 1;
150
- /**
151
- * The received limit for the number of pages
152
- */
153
- this.limit = 10;
154
- /**
155
- * The offset of dataset
156
- */
157
- this.offset = 0;
158
- /**
159
- * The table id, use to identify which table listen the page change message
160
- * when there is more than 1 table on same page
161
- */
162
- this.tableId = 'default';
163
- /**
164
- * Language
165
- */
166
- this.language = 'en';
167
- /**
168
- * Translation via url
169
- */
170
- this.translationUrl = '';
171
- /**
172
- * Customize pagination: Activate pagination arrows
173
- */
174
- this.arrowsActive = true;
175
- /**
176
- * Customize pagination: Activate pagination secondary arrows
177
- */
178
- this.secondaryArrowsActive = true;
179
- /**
180
- * Customize pagination: Activate pagination numbered navigation
181
- */
182
- this.displayPageNumbers = true;
183
- this.endPageIndex = 0;
184
- this.currentPage = 1;
185
- }
186
- pageLimitChangedHandler(event) {
187
- this.limit = event.detail.limit ? event.detail.limit : this.limit;
188
- //reset offset = 0, this.currentPage = 1 when page limit changed
189
- this.currentPage = 1;
190
- this.offset = 0;
191
- this.updatePageStatus();
192
- if (event.type == 'pageLimitChanged') {
193
- this.reloadPageEmitter.emit({ offset: 0, limit: this.limit, tableId: this.tableId });
137
+ constructor(hostRef) {
138
+ index.registerInstance(this, hostRef);
139
+ this.reloadPageEmitter = index.createEvent(this, "reloadPageByType", 7);
140
+ this.total = 1;
141
+ this.limit = 10;
142
+ this.offset = 0;
143
+ this.tableId = 'default';
144
+ this.language = 'en';
145
+ this.translationUrl = '';
146
+ this.arrowsActive = true;
147
+ this.secondaryArrowsActive = true;
148
+ this.displayPageNumbers = true;
149
+ this.displayRangeOfTotal = undefined;
150
+ this.endPageIndex = 0;
151
+ this.pagesArray = undefined;
152
+ this.currentPage = 1;
194
153
  }
195
- }
196
- goTo(step) {
197
- if (step == '...' || step == 0 || step > this.endPageIndex + 1) {
198
- return;
154
+ pageLimitChangedHandler(event) {
155
+ this.limit = event.detail.limit ? event.detail.limit : this.limit;
156
+ //reset offset = 0, this.currentPage = 1 when page limit changed
157
+ this.currentPage = 1;
158
+ this.offset = 0;
159
+ this.updatePageStatus();
160
+ if (event.type == 'pageLimitChanged') {
161
+ this.reloadPageEmitter.emit({ offset: 0, limit: this.limit, tableId: this.tableId });
162
+ }
199
163
  }
200
- this.currentPage = step;
201
- let offset = (this.currentPage - 1) * this.limit;
202
- this.reloadPageEmitter.emit({ offset, limit: this.limit, tableId: this.tableId });
203
- }
204
- renderPageList() {
205
- return index.h("ul", { class: 'PaginationArea' }, this.pagesArray.map((page) => {
206
- return (index.h("li", { class: `PageItem ${this.currentPage == page ? 'Active' : ''}`, onClick: () => {
207
- this.goTo(page);
208
- } }, page));
209
- }));
210
- }
211
- renderStylingWrapper() {
212
- return index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
213
- }
214
- updatePageStatus() {
215
- this.endPageIndex = (Math.ceil(this.total / this.limit) - 1);
216
- this.endPageIndex = this.endPageIndex < 0 ? this.endPageIndex = 0 : this.endPageIndex;
217
- this.pagesArray = [];
218
- if (this.endPageIndex < 5) {
219
- this.pagesArray = Array.from({ length: this.endPageIndex + 1 }, (_, i) => i + 1);
164
+ goTo(step) {
165
+ if (step == '...' || step == 0 || parseInt(step.toString(), 10) > (this.endPageIndex + 1)) {
166
+ return;
167
+ }
168
+ this.currentPage = step;
169
+ let offset = (this.currentPage - 1) * this.limit;
170
+ this.reloadPageEmitter.emit({ offset, limit: this.limit, tableId: this.tableId });
220
171
  }
221
- else {
222
- /**
223
- * Construct numbered navigation area based on current page position
224
- */
225
- if (this.currentPage == 1 || this.currentPage == 2) {
226
- this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
227
- this.pagesArray.push('...');
228
- }
229
- else if (this.currentPage >= 3 && ((this.endPageIndex - this.currentPage) >= 2)) {
230
- this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
231
- this.pagesArray.push('...');
232
- this.pagesArray.unshift('...');
233
- }
234
- else if ((this.endPageIndex - this.currentPage) < 3) {
235
- this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endPageIndex - 2 + i);
236
- this.pagesArray.unshift('...');
237
- }
172
+ renderPageList() {
173
+ return index.h("ul", { class: 'PaginationArea' }, this.pagesArray.map((page) => {
174
+ return (index.h("li", { class: `PageItem ${this.currentPage == page ? 'Active' : ''}`, onClick: () => {
175
+ this.goTo(page);
176
+ } }, page));
177
+ }));
178
+ }
179
+ renderStylingWrapper() {
180
+ return index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
181
+ }
182
+ updatePageStatus() {
183
+ this.endPageIndex = (Math.ceil(this.total / this.limit) - 1);
184
+ this.endPageIndex = this.endPageIndex < 0 ? this.endPageIndex = 0 : this.endPageIndex;
185
+ this.pagesArray = [];
186
+ if (this.endPageIndex < 5) {
187
+ this.pagesArray = Array.from({ length: this.endPageIndex + 1 }, (_, i) => i + 1);
188
+ }
189
+ else {
190
+ /**
191
+ * Construct numbered navigation area based on current page position
192
+ */
193
+ if (this.currentPage == 1 || this.currentPage == 2) {
194
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
195
+ this.pagesArray.push('...');
196
+ }
197
+ else if (this.currentPage >= 3 && ((this.endPageIndex - this.currentPage) >= 2)) {
198
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
199
+ this.pagesArray.push('...');
200
+ this.pagesArray.unshift('...');
201
+ }
202
+ else if ((this.endPageIndex - this.currentPage) < 3) {
203
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endPageIndex - 2 + i);
204
+ this.pagesArray.unshift('...');
205
+ }
206
+ }
207
+ }
208
+ componentWillRender() {
209
+ this.currentPage = Math.floor(this.offset / this.limit) + 1;
210
+ this.updatePageStatus();
211
+ }
212
+ render() {
213
+ const startOffset = (this.currentPage - 1) * this.limit + 1;
214
+ const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
215
+ return index.h("div", { key: 'a6817c12f1e1e9960f8e91cfd5c5e2fa1ea72f7f', class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && index.h("span", { key: '8f7a16c5835147e2a83808f882a66a2463e3998e', class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
216
+ values: {
217
+ start: startOffset,
218
+ end: endOffset,
219
+ total: this.total
220
+ }
221
+ })), index.h("div", { key: 'ddc20a86777c2fde667ad8b75ab86f3bc72ccfdb', class: 'PageNavigation' }, this.arrowsActive &&
222
+ index.h("div", { key: 'ce2a45b8c0d6e32cfa3f1c5cc8b3c9ac58acc409', class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
223
+ this.goTo(1);
224
+ } }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
225
+ index.h("span", { key: '82dce028e4283dcac511b3b62823e87f2085f4b5', class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
226
+ this.goTo(this.currentPage - 1);
227
+ } }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
228
+ index.h("span", { key: 'a6ed748ce3e2555ac3d9d4bae174ad5bad0fabec', class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
229
+ this.goTo(this.currentPage + 1);
230
+ } }, translate('nextPage', this.language)), this.arrowsActive &&
231
+ index.h("div", { key: '60a81a86f11e2bb07ee93b61d6f367a11b0e2b6c', class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
232
+ this.goTo(this.endPageIndex + 1);
233
+ } }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
238
234
  }
239
- }
240
- componentWillRender() {
241
- this.currentPage = Math.floor(this.offset / this.limit) + 1;
242
- this.updatePageStatus();
243
- }
244
- render() {
245
- const startOffset = (this.currentPage - 1) * this.limit + 1;
246
- const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
247
- return index.h("div", { class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && index.h("span", { class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
248
- values: {
249
- start: startOffset,
250
- end: endOffset,
251
- total: this.total
252
- }
253
- })), index.h("div", { class: 'PageNavigation' }, this.arrowsActive &&
254
- index.h("div", { class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
255
- this.goTo(1);
256
- } }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
257
- index.h("span", { class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
258
- this.goTo(this.currentPage - 1);
259
- } }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
260
- index.h("span", { class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
261
- this.goTo(this.currentPage + 1);
262
- } }, translate('nextPage', this.language)), this.arrowsActive &&
263
- index.h("div", { class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
264
- this.goTo(this.endPageIndex + 1);
265
- } }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
266
- }
267
235
  };
268
- BonusPaginationNav.style = bonusPaginationNavCss;
236
+ BonusPaginationNav.style = BonusPaginationNavStyle0;
269
237
 
270
238
  const mergeTranslations = (url, target) => {
271
- return new Promise((resolve) => {
272
- fetch(url)
273
- .then((res) => res.json())
274
- .then((data) => {
275
- Object.keys(data).forEach((item) => {
276
- target[item] = target[item] ? target[item] : {};
277
- for (let key in data[item]) {
278
- target[item][key] = data[item][key];
279
- }
280
- });
281
- resolve(true);
239
+ return new Promise((resolve) => {
240
+ fetch(url)
241
+ .then((res) => res.json())
242
+ .then((data) => {
243
+ Object.keys(data).forEach((item) => {
244
+ target[item] = target[item] ? target[item] : {};
245
+ for (let key in data[item]) {
246
+ target[item][key] = data[item][key];
247
+ }
248
+ });
249
+ resolve(true);
250
+ });
282
251
  });
283
- });
284
252
  };
285
253
 
286
254
  const generalStylingWrapperCss = ":host{display:block}";
255
+ const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
287
256
 
288
257
  const GeneralStylingWrapper = class {
289
- constructor(hostRef) {
290
- index.registerInstance(this, hostRef);
291
- /**
292
- * Client custom styling via inline styles
293
- */
294
- this.clientStyling = '';
295
- /**
296
- * Client custom styling via url
297
- */
298
- this.clientStylingUrl = '';
299
- /**
300
- * Translation via url
301
- */
302
- this.translationUrl = '';
303
- this.stylingAppends = false;
304
- this.setClientStyling = () => {
305
- let sheet = document.createElement('style');
306
- sheet.innerHTML = this.clientStyling;
307
- this.el.prepend(sheet);
308
- };
309
- this.setClientStylingURL = () => {
310
- let url = new URL(this.clientStylingUrl);
311
- let cssFile = document.createElement('style');
312
- fetch(url.href)
313
- .then((res) => res.text())
314
- .then((data) => {
315
- cssFile.innerHTML = data;
316
- setTimeout(() => {
317
- this.el.prepend(cssFile);
318
- }, 1);
319
- })
320
- .catch((err) => {
321
- console.log('error ', err);
322
- });
323
- };
324
- }
325
- componentDidRender() {
326
- // start custom styling area
327
- if (!this.stylingAppends) {
328
- if (this.clientStyling)
329
- this.setClientStyling();
330
- if (this.clientStylingUrl)
331
- this.setClientStylingURL();
332
- this.stylingAppends = true;
258
+ constructor(hostRef) {
259
+ index.registerInstance(this, hostRef);
260
+ this.stylingAppends = false;
261
+ this.setClientStyling = () => {
262
+ let sheet = document.createElement('style');
263
+ sheet.innerHTML = this.clientStyling;
264
+ this.el.prepend(sheet);
265
+ };
266
+ this.setClientStylingURL = () => {
267
+ let url = new URL(this.clientStylingUrl);
268
+ let cssFile = document.createElement('style');
269
+ fetch(url.href)
270
+ .then((res) => res.text())
271
+ .then((data) => {
272
+ cssFile.innerHTML = data;
273
+ setTimeout(() => {
274
+ this.el.prepend(cssFile);
275
+ }, 1);
276
+ })
277
+ .catch((err) => {
278
+ console.log('error ', err);
279
+ });
280
+ };
281
+ this.clientStyling = '';
282
+ this.clientStylingUrl = '';
283
+ this.translationUrl = '';
284
+ this.targetTranslations = undefined;
333
285
  }
334
- // end custom styling area
335
- }
336
- async componentWillLoad() {
337
- const promises = [];
338
- if (this.translationUrl) {
339
- const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
340
- promises.push(translationPromise);
286
+ componentDidRender() {
287
+ // start custom styling area
288
+ if (!this.stylingAppends) {
289
+ if (this.clientStyling)
290
+ this.setClientStyling();
291
+ if (this.clientStylingUrl)
292
+ this.setClientStylingURL();
293
+ this.stylingAppends = true;
294
+ }
295
+ // end custom styling area
341
296
  }
342
- return await Promise.all(promises);
343
- }
344
- render() {
345
- return (index.h("div", { class: "StyleShell" }, index.h("slot", { name: "mainContent" })));
346
- }
347
- get el() { return index.getElement(this); }
297
+ async componentWillLoad() {
298
+ const promises = [];
299
+ if (this.translationUrl) {
300
+ const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
301
+ promises.push(translationPromise);
302
+ }
303
+ return await Promise.all(promises);
304
+ }
305
+ render() {
306
+ return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
307
+ }
308
+ get el() { return index.getElement(this); }
348
309
  };
349
- GeneralStylingWrapper.style = generalStylingWrapperCss;
310
+ GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
350
311
 
351
312
  /**
352
313
  * @name startOfDay
@@ -533,706 +494,583 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
533
494
  }
534
495
 
535
496
  function updateProgressSvg(progressElementRef, percent) {
536
- const svgElement = progressElementRef.querySelector('#total_level');
537
- const endLockWidth = 17, pointR = 6.5;
538
- //Total Widget of the progress
539
- const barWidth = svgElement.getBBox().width;
540
- //The filled width according to current progress
541
- const levelPercent = percent > 1 ? 1 : percent;
542
- const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
543
- //update bar's width, widthOnBar
544
- const levelBar = progressElementRef.querySelector('#current_level');
545
- //update filters, x = widthOnBar
546
- const levelFilter = progressElementRef.querySelector('#filter_current_level');
547
- //update circle, widthOnBar+10
548
- const levelCircle = progressElementRef.querySelector('#circle_current_level');
549
- svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
550
- levelBar.setAttribute('width', `${widthOnBar}`);
551
- levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
552
- levelFilter.setAttribute('x', `${widthOnBar - 8}`);
553
- //update lock location
554
- const endLockElement = progressElementRef.querySelector('#lock');
555
- // wrapper of endLock, include ball and heatfilter1_d_305_23
556
- const filter1 = progressElementRef.querySelector('#filter_heart_ball');
557
- // ball in endlockfilter2_i_305_23
558
- const filter2 = progressElementRef.querySelector('#filter_ball');
559
- // heart in endlockfilter3_d_305_23
560
- const filter3 = progressElementRef.querySelector('#filter_heart');
561
- //wrapper of lockfilter4_d_305_23
562
- const filterLock = progressElementRef.querySelector('#filter_lock');
563
- // shadow of ball paint0_linear_305_23
564
- const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
565
- //paint in lockpaint1_linear_305_23
566
- const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
567
- // box of lock and heart, for move position dynamically
568
- const lockBox = progressElementRef.querySelector('#lock_box');
569
- const heartBox = progressElementRef.querySelector('#heart_box');
570
- const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
571
- //set cx of lockElement
572
- endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
573
- //set cx of sub Elements
574
- paint1.setAttribute('x1', `${cxOfEndLockEle}`);
575
- paint1.setAttribute('x2', `${cxOfEndLockEle}`);
576
- paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
577
- paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
578
- filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
579
- filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
580
- filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
581
- filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
582
- lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
583
- heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
584
- svgElement.parentElement.style.opacity = '1';
497
+ const svgElement = progressElementRef.querySelector('#total_level');
498
+ const endLockWidth = 17, pointR = 6.5;
499
+ //Total Widget of the progress
500
+ const barWidth = svgElement.getBBox().width;
501
+ //The filled width according to current progress
502
+ const levelPercent = percent > 1 ? 1 : percent;
503
+ const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
504
+ //update bar's width, widthOnBar
505
+ const levelBar = progressElementRef.querySelector('#current_level');
506
+ //update filters, x = widthOnBar
507
+ const levelFilter = progressElementRef.querySelector('#filter_current_level');
508
+ //update circle, widthOnBar+10
509
+ const levelCircle = progressElementRef.querySelector('#circle_current_level');
510
+ svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
511
+ levelBar.setAttribute('width', `${widthOnBar}`);
512
+ levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
513
+ levelFilter.setAttribute('x', `${widthOnBar - 8}`);
514
+ //update lock location
515
+ const endLockElement = progressElementRef.querySelector('#lock');
516
+ // wrapper of endLock, include ball and heatfilter1_d_305_23
517
+ const filter1 = progressElementRef.querySelector('#filter_heart_ball');
518
+ // ball in endlockfilter2_i_305_23
519
+ const filter2 = progressElementRef.querySelector('#filter_ball');
520
+ // heart in endlockfilter3_d_305_23
521
+ const filter3 = progressElementRef.querySelector('#filter_heart');
522
+ //wrapper of lockfilter4_d_305_23
523
+ const filterLock = progressElementRef.querySelector('#filter_lock');
524
+ // shadow of ball paint0_linear_305_23
525
+ const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
526
+ //paint in lockpaint1_linear_305_23
527
+ const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
528
+ // box of lock and heart, for move position dynamically
529
+ const lockBox = progressElementRef.querySelector('#lock_box');
530
+ const heartBox = progressElementRef.querySelector('#heart_box');
531
+ const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
532
+ //set cx of lockElement
533
+ endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
534
+ //set cx of sub Elements
535
+ paint1.setAttribute('x1', `${cxOfEndLockEle}`);
536
+ paint1.setAttribute('x2', `${cxOfEndLockEle}`);
537
+ paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
538
+ paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
539
+ filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
540
+ filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
541
+ filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
542
+ filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
543
+ lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
544
+ heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
545
+ svgElement.parentElement.style.opacity = '1';
585
546
  }
586
547
 
587
- const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
548
+ const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
549
+ const PlayerElevateCardDataStyle0 = playerElevateCardDataCss;
588
550
 
589
551
  const PlayerElevateCardData = class {
590
- constructor(hostRef) {
591
- index.registerInstance(this, hostRef);
592
- this.playerElevateLeveLoaded = index.createEvent(this, "playerElevateLeveLoaded", 7);
593
- }
594
- handleWindowResizs() {
595
- this.initLevelProgressbar();
596
- }
597
- onParamsChanged() {
598
- this.loadElevateInfo();
599
- }
600
- redeemGiftButtonHandler() {
601
- this.loadElevateInfo();
602
- }
603
- onRedeemClick() {
604
- window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
605
- }
606
- loadLevels() {
607
- let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
608
- return new Promise((resolve, reject) => {
609
- return fetch(url.href, {
610
- method: 'GET',
611
- })
612
- .then((res) => res.json())
613
- .then((res) => {
614
- this.levels = res.data;
615
- resolve(true);
616
- })
617
- .catch((err) => {
618
- reject(err);
619
- });
620
- });
621
- }
622
- calcuatePointsToBeExpired(walletTotalInfo) {
623
- let pointExpireInfoAsString = '';
624
- if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
625
- walletTotalInfo.aboutToExpire.length == 0 ||
626
- walletTotalInfo.aboutToExpire[0].points <= 0) {
627
- return pointExpireInfoAsString;
552
+ constructor(hostRef) {
553
+ index.registerInstance(this, hostRef);
554
+ this.playerElevateLeveLoaded = index.createEvent(this, "playerElevateLeveLoaded", 7);
555
+ this.params = undefined;
556
+ this.playerElevateLevel = undefined;
557
+ this.pointExpireString = undefined;
628
558
  }
629
- walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
630
- return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
631
- ? -1
632
- : 1;
633
- });
634
- const aboutToExpire = walletTotalInfo.aboutToExpire[0];
635
- const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
636
- let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
637
- if (daysToExpried == 0) {
638
- hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
639
- expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
559
+ handleWindowResizs() {
560
+ this.initLevelProgressbar();
640
561
  }
641
- pointExpireInfoAsString = playerElevateCardItems.translateWithParams(expiredTranslationKey, {
642
- expirationPoints: aboutToExpire.points,
643
- expireDay: daysToExpried,
644
- });
645
- return pointExpireInfoAsString;
646
- }
647
- loadPlayerLevelInfo() {
648
- let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
649
- return new Promise((resolve, reject) => {
650
- return fetch(url.href, {
651
- method: 'GET',
652
- headers: {
653
- 'X-Sessionid': this.params.session,
654
- 'Content-Type': 'application/json',
655
- },
656
- })
657
- .then((res) => res.json())
658
- .then((res) => {
659
- var _a, _b, _c;
660
- if (!res.success) {
661
- console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
662
- reject(true);
663
- return;
562
+ onParamsChanged() {
563
+ this.loadElevateInfo();
564
+ }
565
+ onRedeemClick() {
566
+ window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
567
+ }
568
+ loadLevels() {
569
+ let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
570
+ return new Promise((resolve, reject) => {
571
+ return fetch(url.href, {
572
+ method: 'GET',
573
+ })
574
+ .then((res) => res.json())
575
+ .then((res) => {
576
+ this.levels = res.data;
577
+ resolve(true);
578
+ })
579
+ .catch((err) => {
580
+ reject(err);
581
+ });
582
+ });
583
+ }
584
+ calcuatePointsToBeExpired(walletTotalInfo) {
585
+ let pointExpireInfoAsString = '';
586
+ if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
587
+ walletTotalInfo.aboutToExpire.length == 0 ||
588
+ walletTotalInfo.aboutToExpire[0].points <= 0) {
589
+ return pointExpireInfoAsString;
664
590
  }
665
- let playerElevateInfo = res.data;
666
- this.playerElevateLevel = playerElevateInfo.level;
667
- this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
668
- this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
669
- this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
670
- const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
671
- const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
672
- this.playerElevateLeveLoaded.emit({
673
- elevateLevelWalletTotal: spendableTotal,
674
- loyaltyWalletTotal
591
+ walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
592
+ return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
593
+ ? -1
594
+ : 1;
675
595
  });
676
- let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
677
- let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
678
- if (spExpireInfoAsString || xpExpireInfoAsString) {
679
- this.playerElevateLeveLoaded.emit({
680
- pointExpireString: spExpireInfoAsString,
681
- xpExpireString: xpExpireInfoAsString
682
- });
596
+ const aboutToExpire = walletTotalInfo.aboutToExpire[0];
597
+ const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
598
+ let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
599
+ if (daysToExpried == 0) {
600
+ hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
601
+ expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
683
602
  }
684
- resolve(this.playerElevateLevel);
685
- })
686
- .catch((err) => {
687
- console.log('error ', err);
688
- reject(true);
689
- });
690
- });
691
- }
692
- setLoyaltyProgress(percent) {
693
- updateProgressSvg(this.loyaltyProgressEle, percent);
694
- }
695
- initLevelProgressbar() {
696
- setTimeout(() => {
697
- this.loyaltyProgressEle =
698
- this.elevateCardRef.parentElement.querySelector('#LevelProgress');
699
- if (!this.loyaltyProgressEle) {
700
- return;
701
- }
702
- this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
703
- ? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
704
- this.params['playerElevateLevel'] = this.playerElevateLevel;
705
- }, 80);
706
- }
707
- componentDidRender() {
708
- this.initLevelProgressbar();
709
- }
710
- loadElevateInfo() {
711
- if (!this.params.endpoint || !this.params.session) {
712
- return;
603
+ pointExpireInfoAsString = playerElevateCardItems.translateWithParams(expiredTranslationKey, {
604
+ expirationPoints: aboutToExpire.points,
605
+ expireDay: daysToExpried,
606
+ });
607
+ return pointExpireInfoAsString;
713
608
  }
714
- const promises = [];
715
- promises.push(this.loadPlayerLevelInfo());
716
- if (this.params.calculateLevelFlag) {
717
- promises.push(this.loadLevels());
609
+ loadPlayerLevelInfo() {
610
+ let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
611
+ return new Promise((resolve, reject) => {
612
+ return fetch(url.href, {
613
+ method: 'GET',
614
+ headers: {
615
+ 'X-Sessionid': this.params.session,
616
+ 'Content-Type': 'application/json',
617
+ },
618
+ })
619
+ .then((res) => res.json())
620
+ .then((res) => {
621
+ var _a, _b, _c;
622
+ if (!res.success) {
623
+ console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
624
+ reject(true);
625
+ return;
626
+ }
627
+ let playerElevateInfo = res.data;
628
+ this.playerElevateLevel = playerElevateInfo.level;
629
+ this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
630
+ this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
631
+ this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
632
+ const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
633
+ const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
634
+ this.playerElevateLeveLoaded.emit({
635
+ elevateLevelWalletTotal: spendableTotal,
636
+ loyaltyWalletTotal
637
+ });
638
+ let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
639
+ let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
640
+ if (spExpireInfoAsString || xpExpireInfoAsString) {
641
+ this.playerElevateLeveLoaded.emit({
642
+ pointExpireString: spExpireInfoAsString,
643
+ xpExpireString: xpExpireInfoAsString
644
+ });
645
+ }
646
+ resolve(this.playerElevateLevel);
647
+ })
648
+ .catch((err) => {
649
+ console.log('error ', err);
650
+ reject(true);
651
+ });
652
+ });
653
+ }
654
+ setLoyaltyProgress(percent) {
655
+ updateProgressSvg(this.loyaltyProgressEle, percent);
656
+ }
657
+ initLevelProgressbar() {
658
+ setTimeout(() => {
659
+ this.loyaltyProgressEle =
660
+ this.elevateCardRef.parentElement.querySelector('#LevelProgress');
661
+ if (!this.loyaltyProgressEle) {
662
+ return;
663
+ }
664
+ this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
665
+ ? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
666
+ this.params['playerElevateLevel'] = this.playerElevateLevel;
667
+ }, 80);
668
+ }
669
+ componentDidRender() {
670
+ this.initLevelProgressbar();
718
671
  }
719
- Promise.all(promises).then((res) => {
720
- console.log('elevate-init', res);
721
- this.initLevelProgressbar();
722
- if (!this.levels) {
723
- return;
724
- }
725
- this.levels.sort((level1, level2) => {
726
- return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
727
- });
728
- const playerPoints = this.playerElevateLevel.loyaltyPoints;
729
- let playerLevelNumber = 0;
730
- this.levels.forEach((elevateLevel, idx) => {
731
- if (playerPoints > elevateLevel.firstEntryPoints) {
732
- playerLevelNumber = idx;
672
+ loadElevateInfo() {
673
+ if (!this.params.endpoint || !this.params.session) {
674
+ return;
733
675
  }
734
- });
735
- this.playerElevateLeveLoaded.emit({
736
- calculatedLevelFlag: playerLevelNumber,
737
- });
738
- });
739
- }
740
- componentWillLoad() {
741
- this.loadElevateInfo();
742
- }
743
- get elevateCardRef() { return index.getElement(this); }
744
- static get watchers() { return {
745
- "params": ["onParamsChanged"]
746
- }; }
676
+ const promises = [];
677
+ promises.push(this.loadPlayerLevelInfo());
678
+ if (this.params.calculateLevelFlag) {
679
+ promises.push(this.loadLevels());
680
+ }
681
+ Promise.all(promises).then((res) => {
682
+ console.log('elevate-init', res);
683
+ this.initLevelProgressbar();
684
+ if (!this.levels) {
685
+ return;
686
+ }
687
+ this.levels.sort((level1, level2) => {
688
+ return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
689
+ });
690
+ const playerPoints = this.playerElevateLevel.loyaltyPoints;
691
+ let playerLevelNumber = 0;
692
+ this.levels.forEach((elevateLevel, idx) => {
693
+ if (playerPoints > elevateLevel.firstEntryPoints) {
694
+ playerLevelNumber = idx;
695
+ }
696
+ });
697
+ this.playerElevateLeveLoaded.emit({
698
+ calculatedLevelFlag: playerLevelNumber,
699
+ });
700
+ });
701
+ }
702
+ componentWillLoad() {
703
+ this.loadElevateInfo();
704
+ }
705
+ get elevateCardRef() { return index.getElement(this); }
706
+ static get watchers() { return {
707
+ "params": ["onParamsChanged"]
708
+ }; }
747
709
  };
748
- PlayerElevateCardData.style = playerElevateCardDataCss;
710
+ PlayerElevateCardData.style = PlayerElevateCardDataStyle0;
749
711
 
750
712
  const playerElevatePointcardCss = ":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";
713
+ const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
751
714
 
752
715
  const PlayerElevatePointcard = class {
753
- constructor(hostRef) {
754
- index.registerInstance(this, hostRef);
755
- /**
756
- * The style that widget shows,available value: Dark, Light
757
- * Default: Dark
758
- */
759
- this.theme = 'Dark';
760
- /**
761
- * Widget Language to show
762
- */
763
- this.language = 'en';
764
- /**
765
- * Check if the card used in points details widget, default: 'earningRule'
766
- * value: 'details'/'earningRule'
767
- * It effected the button in card
768
- * 'earningRule': button text, 'earning rules', post 'BEEPointRulesClicked' when clicked
769
- * 'details': button text, 'details', post 'BEEDetailsClicked' when clicked
770
- */
771
- this.buttonType = 'earningRule';
772
- /**
773
- * datePattern
774
- */
775
- this.dateFormat = 'yyyy-MM-dd';
776
- /**
777
- * Client custom styling via inline styles
778
- */
779
- this.clientStyling = '';
780
- /**
781
- * Client custom styling via url
782
- */
783
- this.clientStylingUrl = '';
784
- /**
785
- * Translation via url
786
- */
787
- this.translationUrl = '';
788
- this.isPointDetailCard = this.buttonType === 'earningRule';
789
- }
790
- onSessionOrEndpointChange() {
791
- this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
792
- }
793
- playerElevateLeveLoadedHandler(event) {
794
- if (!event.detail) {
795
- return;
716
+ constructor(hostRef) {
717
+ index.registerInstance(this, hostRef);
718
+ this.isPointDetailCard = this.buttonType === 'earningRule';
719
+ this.endpoint = undefined;
720
+ this.theme = 'Dark';
721
+ this.session = undefined;
722
+ this.playerAvatarUrl = undefined;
723
+ this.language = 'en';
724
+ this.playerName = undefined;
725
+ this.cardTitle = undefined;
726
+ this.buttonType = 'earningRule';
727
+ this.dateFormat = 'yyyy-MM-dd';
728
+ this.clientStyling = '';
729
+ this.clientStylingUrl = '';
730
+ this.translationUrl = '';
731
+ this.pointExpireString = undefined;
732
+ this.playerElevateLevel = undefined;
733
+ this.elevateWalletTotal = undefined;
734
+ this.elevateSPTotal = undefined;
735
+ }
736
+ onSessionOrEndpointChange() {
737
+ this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
738
+ }
739
+ playerElevateLeveLoadedHandler(event) {
740
+ if (!event.detail) {
741
+ return;
742
+ }
743
+ if (event.detail['elevateLevelWalletTotal']) {
744
+ this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
745
+ this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
746
+ }
747
+ if (event.detail['elevateLevel']) {
748
+ this.playerElevateLevel = event.detail['elevateLevel'];
749
+ }
750
+ if (event.detail['pointExpireString']) {
751
+ this.pointExpireString = event.detail.pointExpireString;
752
+ }
796
753
  }
797
- if (event.detail['elevateLevelWalletTotal']) {
798
- this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
799
- this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
754
+ onDetailsClick() {
755
+ window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
756
+ path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
800
757
  }
801
- if (event.detail['elevateLevel']) {
802
- this.playerElevateLevel = event.detail['elevateLevel'];
758
+ componentWillLoad() {
759
+ this.paramProxy = {
760
+ endpoint: this.endpoint,
761
+ session: this.session,
762
+ language: this.language,
763
+ };
803
764
  }
804
- if (event.detail['pointExpireString']) {
805
- this.pointExpireString = event.detail.pointExpireString;
765
+ render() {
766
+ const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
767
+ const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
768
+ return (index.h("div", { key: '13461fc9cf8b777337a539c15da4bb2781f5a837', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '526e72c0ada871f74ba4a07f0a125bc25840c09c', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '95e358ceb8fa3c247660f7ca15a4684b132874be', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: playerElevateCardItems.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '24c765d743446ac597a9dcc9cd22515e7e39e6db', params: this.paramProxy }), index.h("div", { key: '309db4bbfc244a7fb97827774d9d4383109ca0d7', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '9d5614ded2f73b505e60900675a7d95b3cfbcbc6', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '9a17e809083e61aad19f7ffef5d5ee5885ae8b4d' }, index.h("div", { key: '47068df3c0070ee2785b0d0201b08766fe0d71e8', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '40115f8b190d871c85f9531fbf0bafb8fbd739e2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '278cd70c23ecb48655e90810af570ce5366d13d5', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: 'ce682ff881c5b12ed0b736ffcc67ad07b3713999', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : playerElevateCardItems.translate('spendablePoints')), index.h("div", { key: 'eeebc5c468cf6e3d566f708fd47a19956ad9defe', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: 'ad58990b7fa789cf2d5c524191447196e97c8a16', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: '0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c', class: "TC", onClick: () => {
769
+ this.onDetailsClick();
770
+ } }, playerElevateCardItems.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '45c3267d390995fabe34974913adf97b112cf8c2', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
806
771
  }
807
- }
808
- onDetailsClick() {
809
- window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
810
- path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
811
- }
812
- componentWillLoad() {
813
- this.paramProxy = {
814
- endpoint: this.endpoint,
815
- session: this.session,
816
- language: this.language,
817
- };
818
- }
819
- render() {
820
- const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
821
- const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
822
- return (index.h("div", { class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: playerElevateCardItems.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { params: this.paramProxy }), index.h("div", { class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, null, index.h("div", { class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : playerElevateCardItems.translate('spendablePoints')), index.h("div", { class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { class: "TC", onClick: () => {
823
- this.onDetailsClick();
824
- } }, playerElevateCardItems.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
825
- }
826
- static get watchers() { return {
827
- "session": ["onSessionOrEndpointChange"],
828
- "endpoint": ["onSessionOrEndpointChange"],
829
- "language": ["onSessionOrEndpointChange"]
830
- }; }
772
+ static get watchers() { return {
773
+ "session": ["onSessionOrEndpointChange"],
774
+ "endpoint": ["onSessionOrEndpointChange"],
775
+ "language": ["onSessionOrEndpointChange"]
776
+ }; }
831
777
  };
832
- PlayerElevatePointcard.style = playerElevatePointcardCss;
778
+ PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
833
779
 
834
780
  var WalletType;
835
781
  (function (WalletType) {
836
- WalletType["spendable"] = "spendable";
837
- WalletType["loyalty"] = "loyalty";
838
- WalletType["history"] = "history";
782
+ WalletType["spendable"] = "spendable";
783
+ WalletType["loyalty"] = "loyalty";
784
+ WalletType["history"] = "history";
839
785
  })(WalletType || (WalletType = {}));
840
786
 
841
787
  const translation = {
842
- en: {
843
- tabTitle: {
844
- [WalletType.spendable]: 'Coins',
845
- [WalletType.loyalty]: 'XP',
846
- [WalletType.history]: 'Conversion History'
847
- },
848
- barTitle: {
849
- [WalletType.spendable]: 'Coins History',
850
- [WalletType.loyalty]: 'Experience Points History',
851
- [WalletType.history]: 'Conversion History'
852
- },
853
- bonus: 'Bonus',
854
- noContent: 'No Content',
855
- redeem: 'Redeem',
856
- reload: 'Reload',
857
- reloadMsgWhenError: 'Network Problem, please ',
858
- pointType: {
859
- registration: 'Registration',
860
- cancelledRegistration: 'Cancelled Registration',
861
- expiredRegistration: 'Expired Registration',
862
- manual: 'Manual',
863
- cancelledManual: 'Cancelled Manual',
864
- expiredManual: 'Expired Manual',
865
- wageringByRealMoney: 'Real Money Wager',
866
- wageringByBonusMoney: 'Bonus Money Wager',
867
- cancelledWageringByRealMoney: 'Cancelled Real Money Wager',
868
- cancelledWageringByBonusMoney: 'Cancelled Bonus Money Wager',
869
- expiredWageringByRealMoney: 'Expired Real Money Wager',
870
- expiredWageringByBonusMoney: 'Expired Bonus Money Wager',
871
- levelExpired: 'Level Expiration',
872
- bonus: 'Bonus Redeem',
788
+ en: {
789
+ tabTitle: {
790
+ [WalletType.spendable]: 'Coins',
791
+ [WalletType.loyalty]: 'XP',
792
+ [WalletType.history]: 'Conversion History'
793
+ },
794
+ barTitle: {
795
+ [WalletType.spendable]: 'Coins History',
796
+ [WalletType.loyalty]: 'Experience Points History',
797
+ [WalletType.history]: 'Conversion History'
798
+ },
799
+ bonus: 'Bonus',
800
+ noContent: 'No Content',
801
+ redeem: 'Redeem',
802
+ reload: 'Reload',
803
+ reloadMsgWhenError: 'Network Problem, please ',
804
+ pointType: {
805
+ registration: 'Registration',
806
+ cancelledRegistration: 'Cancelled Registration',
807
+ expiredRegistration: 'Expired Registration',
808
+ manual: 'Manual',
809
+ cancelledManual: 'Cancelled Manual',
810
+ expiredManual: 'Expired Manual',
811
+ wageringByRealMoney: 'Real Money Wager',
812
+ wageringByBonusMoney: 'Bonus Money Wager',
813
+ cancelledWageringByRealMoney: 'Cancelled Real Money Wager',
814
+ cancelledWageringByBonusMoney: 'Cancelled Bonus Money Wager',
815
+ expiredWageringByRealMoney: 'Expired Real Money Wager',
816
+ expiredWageringByBonusMoney: 'Expired Bonus Money Wager',
817
+ levelExpired: 'Level Expiration',
818
+ bonus: 'Bonus Redeem',
819
+ }
873
820
  }
874
- }
875
821
  };
876
822
 
877
823
  const getUrl = (path, params = {}) => {
878
- return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
824
+ return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
879
825
  };
880
826
  const fetcher = async (input, init = {}) => {
881
- let res;
882
- // @ts-ignore
883
- res = await fetch(input, init);
884
- res = await res.text();
885
- try {
886
- res = JSON.parse(res);
887
- }
888
- catch (e) {
889
- console.error(e);
890
- throw e;
891
- }
892
- return res;
827
+ let res;
828
+ // @ts-ignore
829
+ res = await fetch(input, init);
830
+ res = await res.text();
831
+ try {
832
+ res = JSON.parse(res);
833
+ }
834
+ catch (e) {
835
+ console.error(e);
836
+ throw e;
837
+ }
838
+ return res;
893
839
  };
894
840
 
895
841
  const getWallets = async (endpoint, language, type, session, pageSetting) => {
896
- const params = {
897
- type,
898
- language,
899
- pagination: `offset=${pageSetting.offset},limit=${pageSetting.limit}`
900
- };
901
- const url = getUrl(endpoint + getUriByWalletType(params.type), params);
902
- const res = await fetcher(url, {
903
- headers: {
904
- 'x-SessionId': session
905
- }
906
- });
907
- return res;
842
+ const params = {
843
+ type,
844
+ language,
845
+ pagination: `offset=${pageSetting.offset},limit=${pageSetting.limit}`
846
+ };
847
+ const url = getUrl(endpoint + getUriByWalletType(params.type), params);
848
+ const res = await fetcher(url, {
849
+ headers: {
850
+ 'x-SessionId': session
851
+ }
852
+ });
853
+ return res;
908
854
  };
909
855
  const getUriByWalletType = (type) => `/v1/elevate/${type == WalletType.history ? 'redeemHistory' : 'pointsHistory'}`;
910
856
 
911
857
  const renderWallets = (locale, wallets, pageSetting) => wallets && (index.h(index.Fragment, null,
912
- index.h("div", { class: "Records" }, wallets.map(wallet => (index.h("div", { class: "RecordContainer" },
913
- index.h("div", { class: "Row" },
914
- index.h("div", { class: "Title" }, locale.pointType[wallet.pointType] || wallet.pointType),
915
- index.h("div", { class: `Amount ${getAmountConfig(wallet.points).class}` },
916
- getAmountConfig(wallet.points).symbol,
917
- wallet.points)),
918
- wallet.payload && wallet.payload.displayName &&
919
- index.h("div", { class: "Row Desc", innerHTML: wallet.payload.displayName['*'] }),
920
- index.h("div", { class: "Row" },
921
- index.h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified)))))))),
922
- index.h("div", { class: "PaginationContainer" },
923
- index.h("bonus-pagination-nav", { offset: pageSetting.offset, limit: pageSetting.limit, displayPageNumbers: pageSetting.displayPageNumbers, tableId: pageSetting.tableId, secondaryArrowsActive: pageSetting.secondaryArrowsActive, total: pageSetting.total }))));
858
+ index.h("div", { class: "Records" }, wallets.map(wallet => (index.h("div", { class: "RecordContainer" },
859
+ index.h("div", { class: "Row" },
860
+ index.h("div", { class: "Title" }, locale.pointType[wallet.pointType] || wallet.pointType),
861
+ index.h("div", { class: `Amount ${getAmountConfig(wallet.points).class}` },
862
+ getAmountConfig(wallet.points).symbol,
863
+ wallet.points)),
864
+ wallet.payload && wallet.payload.displayName &&
865
+ index.h("div", { class: "Row Desc", innerHTML: wallet.payload.displayName['*'] }),
866
+ index.h("div", { class: "Row" },
867
+ index.h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified)))))))),
868
+ index.h("div", { class: "PaginationContainer" },
869
+ index.h("bonus-pagination-nav", { offset: pageSetting.offset, limit: pageSetting.limit, displayPageNumbers: pageSetting.displayPageNumbers, tableId: pageSetting.tableId, secondaryArrowsActive: pageSetting.secondaryArrowsActive, total: pageSetting.total }))));
924
870
  const getAmountConfig = (amount) => {
925
- if (amount > 0) {
926
- return {
927
- class: 'Positive',
928
- symbol: '+'
929
- };
930
- }
931
- else {
932
- return {
933
- class: 'Negative',
934
- symbol: ''
935
- };
936
- }
871
+ if (amount > 0) {
872
+ return {
873
+ class: 'Positive',
874
+ symbol: '+'
875
+ };
876
+ }
877
+ else {
878
+ return {
879
+ class: 'Negative',
880
+ symbol: ''
881
+ };
882
+ }
937
883
  };
938
884
  const padTo2Digits = (num) => {
939
- return num.toString().padStart(2, '0');
885
+ return num.toString().padStart(2, '0');
940
886
  };
941
887
  const formatDate = (date) => {
942
- return ([
943
- date.getFullYear(),
944
- padTo2Digits(date.getMonth() + 1),
945
- padTo2Digits(date.getDate()),
946
- ].join('-') +
947
- ' ' +
948
- [
949
- padTo2Digits(date.getHours()),
950
- padTo2Digits(date.getMinutes()),
951
- padTo2Digits(date.getSeconds()),
952
- ].join(':'));
888
+ return ([
889
+ date.getFullYear(),
890
+ padTo2Digits(date.getMonth() + 1),
891
+ padTo2Digits(date.getDate()),
892
+ ].join('-') +
893
+ ' ' +
894
+ [
895
+ padTo2Digits(date.getHours()),
896
+ padTo2Digits(date.getMinutes()),
897
+ padTo2Digits(date.getSeconds()),
898
+ ].join(':'));
953
899
  };
954
900
 
955
- const backSvg = `<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">
956
- <path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
957
- </svg>
958
- `;
901
+ const backSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDkgMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik03Ljc1IDFMMS4yNSA3LjVMNy43NSAxNCIgc3Ryb2tlPSIjMjQyNDI0IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
959
902
 
960
- const menuSvg = `<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">
961
- <circle cx="4" cy="4" r="4" fill="black"/>
962
- <circle cx="15" cy="4" r="4" fill="black"/>
963
- <circle cx="26" cy="4" r="4" fill="black"/>
964
- </svg>
965
- `;
903
+ const menuSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDMwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjQiIGN5PSI0IiByPSI0IiBmaWxsPSJibGFjayIvPgo8Y2lyY2xlIGN4PSIxNSIgY3k9IjQiIHI9IjQiIGZpbGw9ImJsYWNrIi8+CjxjaXJjbGUgY3g9IjI2IiBjeT0iNCIgcj0iNCIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==';
966
904
 
967
905
  const renderTopBar = (locale, type, pageSetting) => index.h("div", { class: "TopBarContainer" },
968
- index.h("div", { class: "BackImageContainer" },
969
- index.h("span", { class: "BackImage", innerHTML: backSvg })),
970
- index.h("div", { class: "TitleContainer" },
971
- index.h("div", { class: "Title", title: locale.barTitle[type] }, locale.barTitle[type]),
972
- index.h("div", { class: 'Limits' },
973
- index.h("bonus-pagination-limits", { pageLimitOptions: pageSetting.pageLimitOptions, limit: pageSetting.limit }))),
974
- index.h("div", null,
975
- index.h("span", { class: "MenuImage", innerHTML: menuSvg })));
906
+ index.h("div", { class: "BackImageContainer" },
907
+ index.h("span", { class: "BackImage", innerHTML: backSvg })),
908
+ index.h("div", { class: "TitleContainer" },
909
+ index.h("div", { class: "Title", title: locale.barTitle[type] }, locale.barTitle[type]),
910
+ index.h("div", { class: 'Limits' },
911
+ index.h("bonus-pagination-limits", { pageLimitOptions: pageSetting.pageLimitOptions, limit: pageSetting.limit }))),
912
+ index.h("div", null,
913
+ index.h("span", { class: "MenuImage", innerHTML: menuSvg })));
976
914
 
977
915
  const renderTabs = (locale, type, onChangeTab) => index.h("div", { class: "Tabs Row" }, Object.keys(WalletType).map(key => {
978
- const isActive = key === type;
979
- const cssActive = isActive ? 'active' : '';
980
- return (index.h("div", null,
981
- index.h("div", { class: `TabText ${cssActive}`, onClick: () => {
982
- onChangeTab(key);
983
- } }, locale.tabTitle[key]),
984
- index.h("div", { class: `TabBorderBottom ${cssActive}` })));
916
+ const isActive = key === type;
917
+ const cssActive = isActive ? 'active' : '';
918
+ return (index.h("div", null,
919
+ index.h("div", { class: `TabText ${cssActive}`, onClick: () => {
920
+ onChangeTab(key);
921
+ } }, locale.tabTitle[key]),
922
+ index.h("div", { class: `TabBorderBottom ${cssActive}` })));
985
923
  }));
986
924
 
987
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
925
+ var GeneralAnimationLoadingVIKkNY2X = {};
988
926
 
989
- function createCommonjsModule(fn, basedir, module) {
990
- return module = {
991
- path: basedir,
992
- exports: {},
993
- require: function (path, base) {
994
- return commonjsRequire();
995
- }
996
- }, fn(module, module.exports), module.exports;
997
- }
927
+ (function (exports) {
928
+ var V=Object.defineProperty,z=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var v=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))G.call(t,n)&&v(e,n,t[n]);if(N)for(var n of N(t))q.call(t,n)&&v(e,n,t[n]);return e},M=(e,t)=>z(e,F(t));var $=(e,t,n)=>v(e,typeof t!="symbol"?t+"":t,n);var T=(e,t,n)=>new Promise((i,l)=>{var s=o=>{try{u(n.next(o));}catch(r){l(r);}},c=o=>{try{u(n.throw(o));}catch(r){l(r);}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,c);u((n=n.apply(e,t)).next());});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(){}function H(e){return e()}function B(){return Object.create(null)}function b(e){e.forEach(H);}function I(e){return typeof e=="function"}function K(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Q(e){return Object.keys(e).length===0}function W(e,t){e.appendChild(t);}function X(e,t,n){const i=Y(e);if(!i.getElementById(t)){const l=L("style");l.id=t,l.textContent=n,Z(i,l);}}function Y(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Z(e,t){return W(e.head||e,t),t.sheet}function U(e,t,n){e.insertBefore(t,n||null);}function C(e){e.parentNode&&e.parentNode.removeChild(e);}function L(e){return document.createElement(e)}function tt(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n);}function et(e){return Array.from(e.childNodes)}function nt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0;}),t}let j;function _(e){j=e;}const h=[],w=[];let m=[];const R=[],st=Promise.resolve();let k=!1;function it(){k||(k=!0,st.then(y));}function E(e){m.push(e);}const x=new Set;let a=0;function y(){if(a!==0)return;const e=j;do{try{for(;a<h.length;){const t=h[a];a++,_(t),rt(t.$$);}}catch(t){throw h.length=0,a=0,t}for(_(null),h.length=0,a=0;w.length;)w.pop()();for(let t=0;t<m.length;t+=1){const n=m[t];x.has(n)||(x.add(n),n());}m.length=0;}while(h.length);for(;R.length;)R.pop()();k=!1,x.clear(),_(e);}function rt(e){if(e.fragment!==null){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(E);}}function lt(e){const t=[],n=[];m.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),m=t;}const ct=new Set;function ot(e,t){e&&e.i&&(ct.delete(e),e.i(t));}function ut(e,t,n){const{fragment:i,after_update:l}=e.$$;i&&i.m(t,n),E(()=>{const s=e.$$.on_mount.map(H).filter(I);e.$$.on_destroy?e.$$.on_destroy.push(...s):b(s),e.$$.on_mount=[];}),l.forEach(E);}function dt(e,t){const n=e.$$;n.fragment!==null&&(lt(n.after_update),b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[]);}function $t(e,t){e.$$.dirty[0]===-1&&(h.push(e),it(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31;}function ft(e,t,n,i,l,s,c=null,u=[-1]){const o=j;_(e);const r=e.$$={fragment:null,ctx:[],props:s,update:g,not_equal:l,bound:B(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(o?o.$$.context:[])),callbacks:B(),dirty:u,skip_bound:!1,root:t.target||o.$$.root};c&&c(r.root);let f=!1;if(r.ctx=n?n(e,t.props||{},(d,O,...S)=>{const A=S.length?S[0]:O;return r.ctx&&l(r.ctx[d],r.ctx[d]=A)&&(!r.skip_bound&&r.bound[d]&&r.bound[d](A),f&&$t(e,d)),O}):[],r.update(),f=!0,b(r.before_update),r.fragment=i?i(r.ctx):!1,t.target){if(t.hydrate){const d=et(t.target);r.fragment&&r.fragment.l(d),d.forEach(C);}else r.fragment&&r.fragment.c();t.intro&&ot(e.$$.fragment),ut(e,t.target,t.anchor),y();}_(o);}let D;typeof HTMLElement=="function"&&(D=class extends HTMLElement{constructor(t,n,i){super();$(this,"$$ctor");$(this,"$$s");$(this,"$$c");$(this,"$$cn",!1);$(this,"$$d",{});$(this,"$$r",!1);$(this,"$$p_d",{});$(this,"$$l",{});$(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"});}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const l=this.$$c.$on(t,n);this.$$l_u.set(n,l);}super.addEventListener(t,n,i);}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n));}}connectedCallback(){return T(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(s){return ()=>{let c;return {c:function(){c=L("slot"),s!=="default"&&tt(c,"name",s);},m:function(r,f){U(r,c,f);},d:function(r){r&&C(c);}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=nt(this);for(const s of this.$$s)s in i&&(n[s]=[t(s)]);for(const s of this.attributes){const c=this.$$g_p(s.name);c in this.$$d||(this.$$d[c]=p(c,s.value,this.$$p_d,"toProp"));}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:M(P({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const l=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const c=p(s,this.$$d[s],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,c);}this.$$r=!1;};this.$$c.$$.after_update.push(l),l();for(const s in this.$$l)for(const c of this.$$l[s]){const u=this.$$c.$on(s,c);this.$$l_u.set(c,u);}this.$$l={};}})}attributeChangedCallback(t,n,i){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=p(t,i,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[t]:this.$$d[t]}));}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0);});}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function p(e,t,n,i){var s;const l=(s=n[e])==null?void 0:s.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(l){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function at(e,t,n,i,l,s){let c=class extends D{constructor(){super(e,n,l),this.$$p_d=t;}static get observedAttributes(){return Object.keys(t).map(u=>(t[u].attribute||u).toLowerCase())}};return Object.keys(t).forEach(u=>{Object.defineProperty(c.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(o){var r;o=p(u,o,t),this.$$d[u]=o,(r=this.$$c)==null||r.$set({[u]:o});}});}),i.forEach(u=>{Object.defineProperty(c.prototype,u,{get(){var o;return (o=this.$$c)==null?void 0:o[u]}});}),e.element=c,c}class ht{constructor(){$(this,"$$");$(this,"$$set");}$destroy(){dt(this,1),this.$destroy=g;}$on(t,n){if(!I(n))return g;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1);}}$set(t){this.$$set&&!Q(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}}const gt="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gt);function mt(e){X(e,"svelte-g6m3er",".LoaderContainer.svelte-g6m3er.svelte-g6m3er{display:flex;justify-content:center}.lds-ellipsis.svelte-g6m3er.svelte-g6m3er{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis.svelte-g6m3er div.svelte-g6m3er{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis.svelte-g6m3er div.svelte-g6m3er:nth-child(1){left:8px;animation:svelte-g6m3er-lds-ellipsis1 0.6s infinite}.lds-ellipsis.svelte-g6m3er div.svelte-g6m3er:nth-child(2){left:8px;animation:svelte-g6m3er-lds-ellipsis2 0.6s infinite}.lds-ellipsis.svelte-g6m3er div.svelte-g6m3er:nth-child(3){left:32px;animation:svelte-g6m3er-lds-ellipsis2 0.6s infinite}.lds-ellipsis.svelte-g6m3er div.svelte-g6m3er:nth-child(4){left:56px;animation:svelte-g6m3er-lds-ellipsis3 0.6s infinite}@keyframes svelte-g6m3er-lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes svelte-g6m3er-lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes svelte-g6m3er-lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}");}function _t(e){let t;return {c(){t=L("div"),t.innerHTML='<section class="LoaderContainer svelte-g6m3er" part="LoaderContainer"><div class="lds-ellipsis svelte-g6m3er"><div class="svelte-g6m3er"></div><div class="svelte-g6m3er"></div><div class="svelte-g6m3er"></div><div class="svelte-g6m3er"></div></div></section>';},m(n,i){U(n,t,i),e[3](t);},p:g,i:g,o:g,d(n){n&&C(t),e[3](null);}}}function pt(e,t,n){let{clientstyling:i=""}=t,{clientstylingurl:l=""}=t,s;const c=()=>{let r=document.createElement("style");r.innerHTML=i,s.appendChild(r);},u=()=>{let r=new URL(l),f=document.createElement("style");fetch(r.href).then(d=>d.text()).then(d=>{f.innerHTML=d,setTimeout(()=>{s.appendChild(f);},1),setTimeout(()=>{},500);});};function o(r){w[r?"unshift":"push"](()=>{s=r,n(0,s);});}return e.$$set=r=>{"clientstyling"in r&&n(1,i=r.clientstyling),"clientstylingurl"in r&&n(2,l=r.clientstylingurl);},e.$$.update=()=>{e.$$.dirty&3&&i&&s&&c(),e.$$.dirty&5&&l&&s&&u();},[s,i,l,o]}class J extends ht{constructor(t){super(),ft(this,t,pt,_t,K,{clientstyling:1,clientstylingurl:2},mt);}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),y();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),y();}}at(J,{clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=J;
929
+ }(GeneralAnimationLoadingVIKkNY2X));
998
930
 
999
- function commonjsRequire () {
1000
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
1001
- }
1002
-
1003
- createCommonjsModule(function (module, exports) {
1004
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e);}function s(t){return "function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e,n){t.insertBefore(e,n||null);}function r(t){t.parentNode&&t.parentNode.removeChild(t);}function c(t){const e={};for(const n of t)e[n.name]=n.value;return e}let a;function d(t){a=t;}const u=[],f=[];let p=[];const h=[],$=Promise.resolve();let m=!1;function g(t){p.push(t);}
1005
- // flush() calls callbacks in this order:
1006
- // 1. All beforeUpdate callbacks, in order: parents before children
1007
- // 2. All bind:this callbacks, in reverse order: children before parents.
1008
- // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
1009
- // for afterUpdates called during the initial onMount, which are called in
1010
- // reverse order: children before parents.
1011
- // Since callbacks might update component values, which could trigger another
1012
- // call to flush(), the following steps guard against this:
1013
- // 1. During beforeUpdate, any updated components will be added to the
1014
- // dirty_components array and will cause a reentrant call to flush(). Because
1015
- // the flush index is kept outside the function, the reentrant call will pick
1016
- // up where the earlier call left off and go through all dirty components. The
1017
- // current_component value is saved and restored so that the reentrant call will
1018
- // not interfere with the "parent" flush() call.
1019
- // 2. bind:this callbacks cannot trigger new flush() calls.
1020
- // 3. During afterUpdate, any updated components will NOT have their afterUpdate
1021
- // callback called a second time; the seen_callbacks set, outside the flush()
1022
- // function, guarantees this behavior.
1023
- const y=new Set;let b=0;// Do *not* move this inside the flush() function
1024
- function x(){
1025
- // Do not reenter flush while dirty components are updated, as this can
1026
- // result in an infinite loop. Instead, let the inner flush handle it.
1027
- // Reentrancy is ok afterwards for bindings etc.
1028
- if(0!==b)return;const t=a;do{
1029
- // first, call beforeUpdate functions
1030
- // and update components
1031
- try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
1032
- // reset dirty state to not end up in a deadlocked state and then rethrow
1033
- throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
1034
- // then, once components are updated, call
1035
- // afterUpdate functions. This may cause
1036
- // subsequent updates...
1037
- for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
1038
- // ...so guard against infinite loops
1039
- y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
1040
- /**
1041
- * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
1042
- */const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
1043
- // TODO null out other refs, including component.$$ (but need to
1044
- // preserve final state?)
1045
- n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
1046
- // state
1047
- props:p,update:t,not_equal:f,bound:n(),
1048
- // lifecycle
1049
- on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
1050
- // everything else
1051
- callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
1052
- // `false` as a special case of no DOM component
1053
- y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
1054
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1055
- y.fragment&&y.fragment.l(t),t.forEach(r);}else
1056
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1057
- y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
1058
- // onMount happens before the initial afterUpdate
1059
- g((()=>{const n=t.$$.on_mount.map(e).filter(s);
1060
- // if the component was destroyed immediately
1061
- // it will update the `$$.on_destroy` reference to `null`.
1062
- // the destructured on_destroy may still reference to the old array
1063
- t.$$.on_destroy?t.$$.on_destroy.push(...n):
1064
- // Edge case - component was destroyed immediately,
1065
- // most likely as a result of a binding initialising
1066
- i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
1067
- /* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
1068
- function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
1069
- /*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
1070
- /*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
1071
- // @ts-ignore todo: improve typings
1072
- for(const t in this.$$.slotted)
1073
- // @ts-ignore todo: improve typings
1074
- this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
1075
- // TODO should this delegate to addEventListener?
1076
- if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
1077
- //# sourceMappingURL=general-animation-loading.js.map
1078
- });
931
+ if(typeof window!="undefined"){let n=function(t){return function(...i){try{return t.apply(this,i)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return !1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>GeneralAnimationLoadingVIKkNY2X).then(({default:t})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",t.element);});}
1079
932
 
1080
- const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px #00000040;border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px #8A959E33;display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px #0000001A;border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px #00000040}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
933
+ const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.2509803922);border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px rgba(0, 0, 0, 0.1019607843);border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px rgba(0, 0, 0, 0.2509803922)}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
934
+ const PlayerElevatePointsHistoryStyle0 = playerElevatePointsHistoryCss;
1081
935
 
1082
936
  const PlayerElevatePointsHistory = class {
1083
- constructor(hostRef) {
1084
- index.registerInstance(this, hostRef);
1085
- this.paginationReset = index.createEvent(this, "paginationReset", 7);
1086
- /**
1087
- * Customize pagination: Activate pagination secondary arrows
1088
- */
1089
- this.secondaryArrowsActive = true;
1090
- /**
1091
- * Customize pagination: Activate pagination numbered navigation
1092
- */
1093
- this.displayPageNumbers = false;
1094
- /**
1095
- * Customize page list options, default: 10,25,50
1096
- */
1097
- this.pageLimitOptions = '10,25,50';
1098
- /**
1099
- * Language of the widget
1100
- */
1101
- this.language = 'en';
1102
- /**
1103
- * Client custom styling via string
1104
- */
1105
- this.clientStyling = '';
1106
- /**
1107
- * Client custom styling via url
1108
- */
1109
- this.clientStylingUrl = '';
1110
- /**
1111
- * translation via url
1112
- */
1113
- this.translationUrl = '';
1114
- this.locale = translation['en'];
1115
- this.type = WalletType.spendable;
1116
- this.pointsWallets = {};
1117
- }
1118
- switchTab(type) {
1119
- var _a, _b;
1120
- this.type = type;
1121
- if (this.pointsWallets[type] || !((_a = this.pointsWallets[type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)) {
1122
- return;
937
+ constructor(hostRef) {
938
+ index.registerInstance(this, hostRef);
939
+ this.paginationReset = index.createEvent(this, "paginationReset", 7);
940
+ this.playerAvatarUrl = undefined;
941
+ this.session = undefined;
942
+ this.endpoint = undefined;
943
+ this.limit = undefined;
944
+ this.secondaryArrowsActive = true;
945
+ this.displayPageNumbers = false;
946
+ this.pageLimitOptions = '10,25,50';
947
+ this.language = 'en';
948
+ this.clientStyling = '';
949
+ this.clientStylingUrl = '';
950
+ this.translationUrl = '';
951
+ this.locale = translation['en'];
952
+ this.type = WalletType.spendable;
953
+ this.pageSetting = undefined;
954
+ this.pointsWallets = {};
1123
955
  }
1124
- this.paginationReset.emit({ limit: ((_b = this.pointsWallets[type]) === null || _b === void 0 ? void 0 : _b.pageSetting.limit) || this.limit, tableId: this.type });
1125
- }
1126
- getPageSettingByType(type) {
1127
- return this.pointsWallets[type] ? this.pointsWallets[type].pageSetting : {
1128
- limit: this.limit, total: 0, offset: 0, tableId: type,
1129
- secondaryArrowsActive: this.secondaryArrowsActive,
1130
- displayPageNumbers: this.displayPageNumbers,
1131
- pageLimitOptions: this.pageLimitOptions || undefined
1132
- };
1133
- }
1134
- loadWallets(renderer) {
1135
- if (!this.pointsWallets[this.type] || this.pointsWallets[this.type].isLoading) {
1136
- return index.h("general-animation-loading", null);
1137
- }
1138
- else {
1139
- if (this.pointsWallets[this.type].wallets.length === 0) {
1140
- return (index.h("div", { class: "NoContent" }, this.locale.noContent));
1141
- }
1142
- else {
1143
- return renderer();
1144
- }
956
+ switchTab(type) {
957
+ var _a, _b;
958
+ this.type = type;
959
+ if (this.pointsWallets[type] || !((_a = this.pointsWallets[type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)) {
960
+ return;
961
+ }
962
+ this.paginationReset.emit({ limit: ((_b = this.pointsWallets[type]) === null || _b === void 0 ? void 0 : _b.pageSetting.limit) || this.limit, tableId: this.type });
1145
963
  }
1146
- }
1147
- render() {
1148
- var _a, _b;
1149
- const pageSetting = this.getPageSettingByType(this.type);
1150
- return (index.h("main", null, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl,
1151
- // @ts-ignore
1152
- targetTranslations: translation, translationUrl: this.translationUrl }), index.h("player-elevate-pointcard", { playerAvatarUrl: this.playerAvatarUrl, endpoint: this.endpoint, session: this.session, language: this.language, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), index.h("div", { class: "PlayerElevatePointsDetaisContainer" }, [
1153
- renderTopBar(this.locale, this.type, pageSetting),
1154
- renderTabs(this.locale, this.type, (type) => this.switchTab(type)),
1155
- ((_a = this.pointsWallets[this.type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)
1156
- ? index.h("div", { class: 'ReloadMsg' }, this.locale['reloadMsgWhenError'], index.h("a", { class: 'Reload', onClick: () => { this.updateWallets(); } }, this.locale['reload']))
1157
- : this.loadWallets(renderWallets.bind(this, this.locale, ((_b = this.pointsWallets[this.type]) === null || _b === void 0 ? void 0 : _b.wallets) || [], pageSetting))
1158
- ])));
1159
- }
1160
- walletTypeChangedHandler() {
1161
- //do not reload when loaded tab switched back
1162
- if (this.pointsWallets[this.type]) {
1163
- return;
964
+ getPageSettingByType(type) {
965
+ return this.pointsWallets[type] ? this.pointsWallets[type].pageSetting : {
966
+ limit: this.limit, total: 0, offset: 0, tableId: type,
967
+ secondaryArrowsActive: this.secondaryArrowsActive,
968
+ displayPageNumbers: this.displayPageNumbers,
969
+ pageLimitOptions: this.pageLimitOptions || undefined
970
+ };
1164
971
  }
1165
- this.updateWallets();
1166
- }
1167
- async updateWallets() {
1168
- let pageSetting = this.pointsWallets[this.type]
1169
- ? this.pointsWallets[this.type].pageSetting
1170
- : this.getPageSettingByType(this.type);
1171
- try {
1172
- const walletsDetail = await getWallets(this.endpoint, this.language, this.type, this.session, pageSetting);
1173
- const wallets = walletsDetail.data || [];
1174
- if (walletsDetail.success) {
1175
- pageSetting.total = walletsDetail.total;
1176
- this.pointsWallets[this.type] = Object.assign(Object.assign({}, this.pointsWallets[this.type]), { wallets,
1177
- pageSetting });
1178
- this.pointsWallets = Object.assign({}, this.pointsWallets);
1179
- }
1180
- else {
1181
- console.error(walletsDetail);
1182
- this.pointsWallets[this.type].isLoadFailed = true;
1183
- //pageSetting.total = 0;
1184
- }
972
+ loadWallets(renderer) {
973
+ if (!this.pointsWallets[this.type] || this.pointsWallets[this.type].isLoading) {
974
+ return index.h("general-animation-loading", null);
975
+ }
976
+ else {
977
+ if (this.pointsWallets[this.type].wallets.length === 0) {
978
+ return (index.h("div", { class: "NoContent" }, this.locale.noContent));
979
+ }
980
+ else {
981
+ return renderer();
982
+ }
983
+ }
1185
984
  }
1186
- catch (e) {
1187
- console.error(e);
1188
- this.pointsWallets[this.type].isLoadFailed = true;
985
+ render() {
986
+ var _a, _b;
987
+ const pageSetting = this.getPageSettingByType(this.type);
988
+ return (index.h("main", { key: 'a92c0b154fec4d3ce8b8e919b9af5ebd80f1d125' }, index.h("general-styling-wrapper", { key: '5095ab265d71f9e74f6f049b7b0b212ae11bc4da', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl,
989
+ // @ts-ignore
990
+ targetTranslations: translation, translationUrl: this.translationUrl }), index.h("player-elevate-pointcard", { key: 'c471ddeccbe8e18e15935c9d106bf8c52c80a6fb', playerAvatarUrl: this.playerAvatarUrl, endpoint: this.endpoint, session: this.session, language: this.language, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), index.h("div", { key: '5fa700aaa6e0cffe6d3d9dd8366bf9a95bba3a14', class: "PlayerElevatePointsDetaisContainer" }, [
991
+ renderTopBar(this.locale, this.type, pageSetting),
992
+ renderTabs(this.locale, this.type, (type) => this.switchTab(type)),
993
+ ((_a = this.pointsWallets[this.type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)
994
+ ? index.h("div", { class: 'ReloadMsg' }, this.locale['reloadMsgWhenError'], index.h("a", { class: 'Reload', onClick: () => { this.updateWallets(); } }, this.locale['reload']))
995
+ : this.loadWallets(renderWallets.bind(this, this.locale, ((_b = this.pointsWallets[this.type]) === null || _b === void 0 ? void 0 : _b.wallets) || [], pageSetting))
996
+ ])));
1189
997
  }
1190
- }
1191
- reloadPageByTypeHandler(event) {
1192
- if (event.detail.tableId != this.type) {
1193
- return;
998
+ walletTypeChangedHandler() {
999
+ //do not reload when loaded tab switched back
1000
+ if (this.pointsWallets[this.type]) {
1001
+ return;
1002
+ }
1003
+ this.updateWallets();
1194
1004
  }
1195
- //reset all wallets when limit changed
1196
- //otherwise fetch new data with new offset when offset changed
1197
- if (this.limit != event.detail.limit) {
1198
- this.pointsWallets = {};
1199
- this.limit = event.detail.limit;
1005
+ async updateWallets() {
1006
+ let pageSetting = this.pointsWallets[this.type]
1007
+ ? this.pointsWallets[this.type].pageSetting
1008
+ : this.getPageSettingByType(this.type);
1009
+ try {
1010
+ const walletsDetail = await getWallets(this.endpoint, this.language, this.type, this.session, pageSetting);
1011
+ const wallets = walletsDetail.data || [];
1012
+ if (walletsDetail.success) {
1013
+ pageSetting.total = walletsDetail.total;
1014
+ this.pointsWallets[this.type] = Object.assign(Object.assign({}, this.pointsWallets[this.type]), { wallets,
1015
+ pageSetting });
1016
+ this.pointsWallets = Object.assign({}, this.pointsWallets);
1017
+ }
1018
+ else {
1019
+ console.error(walletsDetail);
1020
+ this.pointsWallets[this.type].isLoadFailed = true;
1021
+ //pageSetting.total = 0;
1022
+ }
1023
+ }
1024
+ catch (e) {
1025
+ console.error(e);
1026
+ this.pointsWallets[this.type].isLoadFailed = true;
1027
+ }
1200
1028
  }
1201
- else {
1202
- let pageSetting = this.pointsWallets[this.type].pageSetting || this.getPageSettingByType(this.type);
1203
- pageSetting.offset = event.detail.offset;
1204
- this.pointsWallets[this.type].pageSetting = pageSetting;
1029
+ reloadPageByTypeHandler(event) {
1030
+ if (event.detail.tableId != this.type) {
1031
+ return;
1032
+ }
1033
+ //reset all wallets when limit changed
1034
+ //otherwise fetch new data with new offset when offset changed
1035
+ if (this.limit != event.detail.limit) {
1036
+ this.pointsWallets = {};
1037
+ this.limit = event.detail.limit;
1038
+ }
1039
+ else {
1040
+ let pageSetting = this.pointsWallets[this.type].pageSetting || this.getPageSettingByType(this.type);
1041
+ pageSetting.offset = event.detail.offset;
1042
+ this.pointsWallets[this.type].pageSetting = pageSetting;
1043
+ }
1044
+ this.updateWallets();
1205
1045
  }
1206
- this.updateWallets();
1207
- }
1208
- setLimit() {
1209
- try {
1210
- const pageLimits = this.pageLimitOptions.split(',').map((item) => {
1211
- return parseInt(item);
1212
- });
1213
- if (pageLimits.includes(this.limit)) ;
1214
- else {
1215
- this.limit = pageLimits[0];
1216
- }
1046
+ setLimit() {
1047
+ try {
1048
+ const pageLimits = this.pageLimitOptions.split(',').map((item) => {
1049
+ return parseInt(item);
1050
+ });
1051
+ if (pageLimits.includes(this.limit)) ;
1052
+ else {
1053
+ this.limit = pageLimits[0];
1054
+ }
1055
+ }
1056
+ catch (e) {
1057
+ console.error('Error when parse PageLimitOptions', e);
1058
+ this.limit = 10;
1059
+ }
1217
1060
  }
1218
- catch (e) {
1219
- console.error('Error when parse PageLimitOptions', e);
1220
- this.limit = 10;
1061
+ async componentWillLoad() {
1062
+ this.setLimit();
1063
+ this.updateWallets();
1221
1064
  }
1222
- }
1223
- async componentWillLoad() {
1224
- this.setLimit();
1225
- this.updateWallets();
1226
- }
1227
- static get assetsDirs() { return ["static"]; }
1228
- static get watchers() { return {
1229
- "type": ["walletTypeChangedHandler"],
1230
- "endpoint": ["updateWallets"],
1231
- "language": ["updateWallets"],
1232
- "session": ["updateWallets"]
1233
- }; }
1065
+ static get assetsDirs() { return ["static"]; }
1066
+ static get watchers() { return {
1067
+ "type": ["walletTypeChangedHandler"],
1068
+ "endpoint": ["updateWallets"],
1069
+ "language": ["updateWallets"],
1070
+ "session": ["updateWallets"]
1071
+ }; }
1234
1072
  };
1235
- PlayerElevatePointsHistory.style = playerElevatePointsHistoryCss;
1073
+ PlayerElevatePointsHistory.style = PlayerElevatePointsHistoryStyle0;
1236
1074
 
1237
1075
  exports.bonus_pagination_limits = BonusPaginationLimits;
1238
1076
  exports.bonus_pagination_nav = BonusPaginationNav;