@everymatrix/player-elevate-points-history 1.94.96 → 1.94.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bonus-pagination-limits_7.cjs.entry.js +28 -13
- package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.css +27 -0
- package/dist/collection/renders/renderWallets.js +11 -2
- package/dist/esm/bonus-pagination-limits_7.entry.js +28 -13
- package/dist/player-elevate-points-history/bonus-pagination-limits_7.entry.js +2 -2
- package/dist/types/utils/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -151,7 +151,7 @@ const BonusPaginationNav = class {
|
|
|
151
151
|
this.secondaryArrowsActive = true;
|
|
152
152
|
this.displayPageNumbers = true;
|
|
153
153
|
this.displayRangeOfTotal = undefined;
|
|
154
|
-
this.navItemAccount =
|
|
154
|
+
this.navItemAccount = 7;
|
|
155
155
|
this.endPageIndex = 0;
|
|
156
156
|
this.pagesArray = undefined;
|
|
157
157
|
this.currentPage = 1;
|
|
@@ -210,20 +210,26 @@ const BonusPaginationNav = class {
|
|
|
210
210
|
//Nav show as ( 1, 2, 3, ..., 8, 9, 10)
|
|
211
211
|
pageArray = Array.from({ length: halfOfMaxPageCount }, (_, i) => i + 1);
|
|
212
212
|
pageArray.push('...');
|
|
213
|
-
|
|
213
|
+
for (let i = (lastPageNo - (maxNavItemsCount - pageArray.length - 1)); i <= lastPageNo; i++) {
|
|
214
|
+
pageArray.push(i);
|
|
215
|
+
}
|
|
214
216
|
}
|
|
215
217
|
else if (this.currentPage == halfOfMaxPageCount) {
|
|
216
218
|
//current page: 3 (=halfOfMaxPageCount)
|
|
217
219
|
//Nav show as ( 1, 2, 3, 4, ..., 9,10)
|
|
218
220
|
pageArray = Array.from({ length: halfOfMaxPageCount + 1 }, (_, i) => i + 1);
|
|
219
221
|
pageArray.push('...');
|
|
220
|
-
|
|
222
|
+
for (let i = (lastPageNo - (maxNavItemsCount - pageArray.length - 1)); i <= lastPageNo; i++) {
|
|
223
|
+
pageArray.push(i);
|
|
224
|
+
}
|
|
221
225
|
}
|
|
222
226
|
else if (this.currentPage == (lastPageNo - halfOfMaxPageCount + 1)) {
|
|
223
227
|
//current page: 8, (the page index after this.total - halfOfMaxPageCount ) Nav show as ( 1, 2, ... ,7, 8,9,10)
|
|
224
228
|
pageArray = Array.from({ length: halfOfMaxPageCount - 1 }, (_, i) => i + 1);
|
|
225
229
|
pageArray.push('...');
|
|
226
|
-
|
|
230
|
+
for (let i = (lastPageNo - (maxNavItemsCount - pageArray.length - 1)); i <= lastPageNo; i++) {
|
|
231
|
+
pageArray.push(i);
|
|
232
|
+
}
|
|
227
233
|
}
|
|
228
234
|
else {
|
|
229
235
|
//current page: > 3 and < 7, let's say is 5 Nav show as ( 1, ..., 4, 5, 6, ... ,10)
|
|
@@ -261,23 +267,23 @@ const BonusPaginationNav = class {
|
|
|
261
267
|
render() {
|
|
262
268
|
const startOffset = (this.currentPage - 1) * this.limit + 1;
|
|
263
269
|
const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
|
|
264
|
-
return index.h("div", { key: '
|
|
270
|
+
return index.h("div", { key: 'a6d3cd6cd1e5ff8d927486806d26c6eb61e57833', class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && index.h("span", { key: '56f81e329deb0d5160d4d4e020571d1cc402dcc1', class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
|
|
265
271
|
values: {
|
|
266
272
|
start: startOffset,
|
|
267
273
|
end: endOffset,
|
|
268
274
|
total: this.total
|
|
269
275
|
}
|
|
270
|
-
})), index.h("div", { key: '
|
|
271
|
-
index.h("div", { key: '
|
|
276
|
+
})), index.h("div", { key: 'eaf964e00190b690564d57af6da91aed717e1690', class: 'PageNavigation' }, this.arrowsActive &&
|
|
277
|
+
index.h("div", { key: '2be57e1c4d3d6fb80db83c6b5c60710573da5f5e', class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
272
278
|
this.goTo(1);
|
|
273
279
|
} }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
|
|
274
|
-
index.h("span", { key: '
|
|
280
|
+
index.h("span", { key: 'd240849c9ba6b9c14d4ebed6c346d7cc629a1a59', class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
275
281
|
this.goTo(this.currentPage - 1);
|
|
276
282
|
} }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
|
|
277
|
-
index.h("span", { key: '
|
|
283
|
+
index.h("span", { key: '90cb6da1e51256e86f8678e0520d4b221b99957d', class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
|
|
278
284
|
this.goTo(this.currentPage + 1);
|
|
279
285
|
} }, translate('nextPage', this.language)), this.arrowsActive &&
|
|
280
|
-
index.h("div", { key: '
|
|
286
|
+
index.h("div", { key: 'c74711a45bbbf822ca56e6f2fe70ee541ae91cfa', class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
281
287
|
this.goTo(this.endPageIndex + 1);
|
|
282
288
|
} }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
|
|
283
289
|
}
|
|
@@ -1249,7 +1255,7 @@ const WalletItem = ({ locale, wallet, walletType, isRakeback }) => {
|
|
|
1249
1255
|
isRakeback && index.h("span", null,
|
|
1250
1256
|
" ",
|
|
1251
1257
|
wallet.currency))),
|
|
1252
|
-
index.h("div", { class: "Row" },
|
|
1258
|
+
index.h("div", { class: "Row WalletNotes" },
|
|
1253
1259
|
index.h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified))),
|
|
1254
1260
|
((_a = wallet.extension) === null || _a === void 0 ? void 0 : _a.powerUpID) &&
|
|
1255
1261
|
index.h("div", { class: 'PowerUpInfo' },
|
|
@@ -1260,7 +1266,7 @@ const WalletItem = ({ locale, wallet, walletType, isRakeback }) => {
|
|
|
1260
1266
|
index.h("span", { class: 'Value' },
|
|
1261
1267
|
wallet.extension.powerUpName,
|
|
1262
1268
|
", ")),
|
|
1263
|
-
index.h("div", { class:
|
|
1269
|
+
index.h("div", { class: `PowerUpID ${wallet.isShowAll ? '' : 'MobEllipsis'}`, onClick: (e) => { toggleIsShowAll(e, wallet); } },
|
|
1264
1270
|
index.h("span", { class: 'Label' }, "ID: "),
|
|
1265
1271
|
index.h("span", { class: 'Value' },
|
|
1266
1272
|
wallet.extension.powerUpID,
|
|
@@ -1280,6 +1286,15 @@ const renderWallets = (locale, wallets, pageSetting, isLoading = false) => {
|
|
|
1280
1286
|
index.h("div", { class: "PaginationContainer" },
|
|
1281
1287
|
index.h("bonus-pagination-nav", { offset: pageSetting.offset, limit: pageSetting.limit, tableId: pageSetting.tableId, secondaryArrowsActive: pageSetting.secondaryArrowsActive, total: pageSetting.total }))));
|
|
1282
1288
|
};
|
|
1289
|
+
const toggleIsShowAll = (e, wallet) => {
|
|
1290
|
+
wallet.isShowAll = !wallet.isShowAll;
|
|
1291
|
+
if (wallet.isShowAll) {
|
|
1292
|
+
e.currentTarget.classList.remove("MobEllipsis");
|
|
1293
|
+
}
|
|
1294
|
+
else {
|
|
1295
|
+
e.currentTarget.classList.add("MobEllipsis");
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1283
1298
|
const renderSkeletons = (rows = 3) => {
|
|
1284
1299
|
return index.h("div", { class: "Records" }, Array.from({ length: rows }).map(() => (index.h("div", { class: "RecordContainer" },
|
|
1285
1300
|
index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "70px", "border-radius": "5px" })))));
|
|
@@ -6288,7 +6303,7 @@ var decimal = {exports: {}};
|
|
|
6288
6303
|
|
|
6289
6304
|
const Decimal = decimal.exports;
|
|
6290
6305
|
|
|
6291
|
-
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 .HistoryPoints{text-transform:lowercase}.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 .PowerUpInfo{background:linear-gradient(180deg, #EA9018 0%, #E0A84E 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:0.85rem;display:flex;flex-direction:row;gap:5px}.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(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
6306
|
+
const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}@media screen and (max-width: 500px){.RecordContainer{padding:5px 0px}.RecordContainer .Row.WalletNotes{flex-direction:column;align-items:flex-start}.RecordContainer .Row.WalletNotes .PowerUpInfo{flex-direction:row;align-items:flex-start;flex-wrap:wrap;font-size:0.79rem}.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis{display:inline-flex;width:55px;cursor:pointer}.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis .Value{text-overflow:ellipsis;display:flow;overflow:hidden;white-space:nowrap;width:80px}}.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 .HistoryPoints{text-transform:lowercase}.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 .PowerUpInfo{background:linear-gradient(180deg, #EA9018 0%, #E0A84E 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:0.85rem;display:flex;flex-direction:row;gap:5px}.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(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
6292
6307
|
const PlayerElevatePointsHistoryStyle0 = playerElevatePointsHistoryCss;
|
|
6293
6308
|
|
|
6294
6309
|
const PlayerElevatePointsHistory = class {
|
package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.css
CHANGED
|
@@ -10,6 +10,33 @@ main player-elevate-pointcard {
|
|
|
10
10
|
height: 220px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
@media screen and (max-width: 500px) {
|
|
14
|
+
.RecordContainer {
|
|
15
|
+
padding: 5px 0px;
|
|
16
|
+
}
|
|
17
|
+
.RecordContainer .Row.WalletNotes {
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
}
|
|
21
|
+
.RecordContainer .Row.WalletNotes .PowerUpInfo {
|
|
22
|
+
flex-direction: row;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
font-size: 0.79rem;
|
|
26
|
+
}
|
|
27
|
+
.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
width: 55px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis .Value {
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
display: flow;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
width: 80px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
13
40
|
.PlayerElevatePointsDetaisContainer {
|
|
14
41
|
background: #FFFFFF;
|
|
15
42
|
padding: 20px 10px 0;
|
|
@@ -8,8 +8,8 @@ export const WalletItem = ({ locale, wallet, walletType, isRakeback }) => {
|
|
|
8
8
|
h("div", { class: `Amount ${getAmountConfig(wallet.points).class}` }, h("span", { class: "HistoryPoints" }, Math.abs(wallet.points), " ", locale.coins))), h("div", { class: "Row" }, h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified)))));
|
|
9
9
|
}
|
|
10
10
|
else {
|
|
11
|
-
return (h("div", { class: "RecordContainer" }, h("div", { class: `Row ${wallet.pointType}` }, h("div", { class: "Title" }, (isRakeback ? locale.rakebackPointType[wallet.pointType] : locale.pointType[wallet.pointType]) || wallet.pointType), h("div", { class: `Amount ${getAmountConfig(wallet.points).class}` }, h("span", { class: "Points" }, getAmountConfig(wallet.points).symbol, " ", isRakeback ? wallet.pointAsString : wallet.points, " "), isRakeback && h("span", null, " ", wallet.currency))), h("div", { class: "Row" }, h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified))), ((_a = wallet.extension) === null || _a === void 0 ? void 0 : _a.powerUpID) &&
|
|
12
|
-
h("div", { class: 'PowerUpInfo' }, h("div", { class: 'PowerUpName' }, h("span", { class: 'Label' }, locale.powerUp, ": "), h("span", { class: 'Value' }, wallet.extension.powerUpName, ", ")), h("div", { class:
|
|
11
|
+
return (h("div", { class: "RecordContainer" }, h("div", { class: `Row ${wallet.pointType}` }, h("div", { class: "Title" }, (isRakeback ? locale.rakebackPointType[wallet.pointType] : locale.pointType[wallet.pointType]) || wallet.pointType), h("div", { class: `Amount ${getAmountConfig(wallet.points).class}` }, h("span", { class: "Points" }, getAmountConfig(wallet.points).symbol, " ", isRakeback ? wallet.pointAsString : wallet.points, " "), isRakeback && h("span", null, " ", wallet.currency))), h("div", { class: "Row WalletNotes" }, h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified))), ((_a = wallet.extension) === null || _a === void 0 ? void 0 : _a.powerUpID) &&
|
|
12
|
+
h("div", { class: 'PowerUpInfo' }, h("div", { class: 'PowerUpName' }, h("span", { class: 'Label' }, locale.powerUp, ": "), h("span", { class: 'Value' }, wallet.extension.powerUpName, ", ")), h("div", { class: `PowerUpID ${wallet.isShowAll ? '' : 'MobEllipsis'}`, onClick: (e) => { toggleIsShowAll(e, wallet); } }, h("span", { class: 'Label' }, "ID: "), h("span", { class: 'Value' }, wallet.extension.powerUpID, ", ")), h("div", { class: 'PowerUpMultiplier' }, h("span", { class: 'Label' }, locale.multiplierRate, ": "), h("span", { class: 'Value' }, wallet.extension.powerUpCoefficient))))));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
export const renderWallets = (locale, wallets, pageSetting, isLoading = false) => {
|
|
@@ -17,6 +17,15 @@ export const renderWallets = (locale, wallets, pageSetting, isLoading = false) =
|
|
|
17
17
|
return renderSkeletons();
|
|
18
18
|
return wallets && (h(Fragment, null, h("div", { class: "Records" }, wallets.map(wallet => h(WalletItem, { locale: locale, wallet: wallet, walletType: pageSetting.tableId, isRakeback: pageSetting.tableId === WalletType.rakeback }))), h("div", { class: "PaginationContainer" }, h("bonus-pagination-nav", { offset: pageSetting.offset, limit: pageSetting.limit, tableId: pageSetting.tableId, secondaryArrowsActive: pageSetting.secondaryArrowsActive, total: pageSetting.total }))));
|
|
19
19
|
};
|
|
20
|
+
const toggleIsShowAll = (e, wallet) => {
|
|
21
|
+
wallet.isShowAll = !wallet.isShowAll;
|
|
22
|
+
if (wallet.isShowAll) {
|
|
23
|
+
e.currentTarget.classList.remove("MobEllipsis");
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
e.currentTarget.classList.add("MobEllipsis");
|
|
27
|
+
}
|
|
28
|
+
};
|
|
20
29
|
export const renderSkeletons = (rows = 3) => {
|
|
21
30
|
return h("div", { class: "Records" }, Array.from({ length: rows }).map(() => (h("div", { class: "RecordContainer" }, h("ui-skeleton", { structure: "rectangle", width: "100%", height: "70px", "border-radius": "5px" })))));
|
|
22
31
|
};
|
|
@@ -147,7 +147,7 @@ const BonusPaginationNav = class {
|
|
|
147
147
|
this.secondaryArrowsActive = true;
|
|
148
148
|
this.displayPageNumbers = true;
|
|
149
149
|
this.displayRangeOfTotal = undefined;
|
|
150
|
-
this.navItemAccount =
|
|
150
|
+
this.navItemAccount = 7;
|
|
151
151
|
this.endPageIndex = 0;
|
|
152
152
|
this.pagesArray = undefined;
|
|
153
153
|
this.currentPage = 1;
|
|
@@ -206,20 +206,26 @@ const BonusPaginationNav = class {
|
|
|
206
206
|
//Nav show as ( 1, 2, 3, ..., 8, 9, 10)
|
|
207
207
|
pageArray = Array.from({ length: halfOfMaxPageCount }, (_, i) => i + 1);
|
|
208
208
|
pageArray.push('...');
|
|
209
|
-
|
|
209
|
+
for (let i = (lastPageNo - (maxNavItemsCount - pageArray.length - 1)); i <= lastPageNo; i++) {
|
|
210
|
+
pageArray.push(i);
|
|
211
|
+
}
|
|
210
212
|
}
|
|
211
213
|
else if (this.currentPage == halfOfMaxPageCount) {
|
|
212
214
|
//current page: 3 (=halfOfMaxPageCount)
|
|
213
215
|
//Nav show as ( 1, 2, 3, 4, ..., 9,10)
|
|
214
216
|
pageArray = Array.from({ length: halfOfMaxPageCount + 1 }, (_, i) => i + 1);
|
|
215
217
|
pageArray.push('...');
|
|
216
|
-
|
|
218
|
+
for (let i = (lastPageNo - (maxNavItemsCount - pageArray.length - 1)); i <= lastPageNo; i++) {
|
|
219
|
+
pageArray.push(i);
|
|
220
|
+
}
|
|
217
221
|
}
|
|
218
222
|
else if (this.currentPage == (lastPageNo - halfOfMaxPageCount + 1)) {
|
|
219
223
|
//current page: 8, (the page index after this.total - halfOfMaxPageCount ) Nav show as ( 1, 2, ... ,7, 8,9,10)
|
|
220
224
|
pageArray = Array.from({ length: halfOfMaxPageCount - 1 }, (_, i) => i + 1);
|
|
221
225
|
pageArray.push('...');
|
|
222
|
-
|
|
226
|
+
for (let i = (lastPageNo - (maxNavItemsCount - pageArray.length - 1)); i <= lastPageNo; i++) {
|
|
227
|
+
pageArray.push(i);
|
|
228
|
+
}
|
|
223
229
|
}
|
|
224
230
|
else {
|
|
225
231
|
//current page: > 3 and < 7, let's say is 5 Nav show as ( 1, ..., 4, 5, 6, ... ,10)
|
|
@@ -257,23 +263,23 @@ const BonusPaginationNav = class {
|
|
|
257
263
|
render() {
|
|
258
264
|
const startOffset = (this.currentPage - 1) * this.limit + 1;
|
|
259
265
|
const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
|
|
260
|
-
return h("div", { key: '
|
|
266
|
+
return h("div", { key: 'a6d3cd6cd1e5ff8d927486806d26c6eb61e57833', class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && h("span", { key: '56f81e329deb0d5160d4d4e020571d1cc402dcc1', class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
|
|
261
267
|
values: {
|
|
262
268
|
start: startOffset,
|
|
263
269
|
end: endOffset,
|
|
264
270
|
total: this.total
|
|
265
271
|
}
|
|
266
|
-
})), h("div", { key: '
|
|
267
|
-
h("div", { key: '
|
|
272
|
+
})), h("div", { key: 'eaf964e00190b690564d57af6da91aed717e1690', class: 'PageNavigation' }, this.arrowsActive &&
|
|
273
|
+
h("div", { key: '2be57e1c4d3d6fb80db83c6b5c60710573da5f5e', class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
268
274
|
this.goTo(1);
|
|
269
275
|
} }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
|
|
270
|
-
h("span", { key: '
|
|
276
|
+
h("span", { key: 'd240849c9ba6b9c14d4ebed6c346d7cc629a1a59', class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
271
277
|
this.goTo(this.currentPage - 1);
|
|
272
278
|
} }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
|
|
273
|
-
h("span", { key: '
|
|
279
|
+
h("span", { key: '90cb6da1e51256e86f8678e0520d4b221b99957d', class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
|
|
274
280
|
this.goTo(this.currentPage + 1);
|
|
275
281
|
} }, translate('nextPage', this.language)), this.arrowsActive &&
|
|
276
|
-
h("div", { key: '
|
|
282
|
+
h("div", { key: 'c74711a45bbbf822ca56e6f2fe70ee541ae91cfa', class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
277
283
|
this.goTo(this.endPageIndex + 1);
|
|
278
284
|
} }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
|
|
279
285
|
}
|
|
@@ -1245,7 +1251,7 @@ const WalletItem = ({ locale, wallet, walletType, isRakeback }) => {
|
|
|
1245
1251
|
isRakeback && h("span", null,
|
|
1246
1252
|
" ",
|
|
1247
1253
|
wallet.currency))),
|
|
1248
|
-
h("div", { class: "Row" },
|
|
1254
|
+
h("div", { class: "Row WalletNotes" },
|
|
1249
1255
|
h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified))),
|
|
1250
1256
|
((_a = wallet.extension) === null || _a === void 0 ? void 0 : _a.powerUpID) &&
|
|
1251
1257
|
h("div", { class: 'PowerUpInfo' },
|
|
@@ -1256,7 +1262,7 @@ const WalletItem = ({ locale, wallet, walletType, isRakeback }) => {
|
|
|
1256
1262
|
h("span", { class: 'Value' },
|
|
1257
1263
|
wallet.extension.powerUpName,
|
|
1258
1264
|
", ")),
|
|
1259
|
-
h("div", { class:
|
|
1265
|
+
h("div", { class: `PowerUpID ${wallet.isShowAll ? '' : 'MobEllipsis'}`, onClick: (e) => { toggleIsShowAll(e, wallet); } },
|
|
1260
1266
|
h("span", { class: 'Label' }, "ID: "),
|
|
1261
1267
|
h("span", { class: 'Value' },
|
|
1262
1268
|
wallet.extension.powerUpID,
|
|
@@ -1276,6 +1282,15 @@ const renderWallets = (locale, wallets, pageSetting, isLoading = false) => {
|
|
|
1276
1282
|
h("div", { class: "PaginationContainer" },
|
|
1277
1283
|
h("bonus-pagination-nav", { offset: pageSetting.offset, limit: pageSetting.limit, tableId: pageSetting.tableId, secondaryArrowsActive: pageSetting.secondaryArrowsActive, total: pageSetting.total }))));
|
|
1278
1284
|
};
|
|
1285
|
+
const toggleIsShowAll = (e, wallet) => {
|
|
1286
|
+
wallet.isShowAll = !wallet.isShowAll;
|
|
1287
|
+
if (wallet.isShowAll) {
|
|
1288
|
+
e.currentTarget.classList.remove("MobEllipsis");
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
e.currentTarget.classList.add("MobEllipsis");
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1279
1294
|
const renderSkeletons = (rows = 3) => {
|
|
1280
1295
|
return h("div", { class: "Records" }, Array.from({ length: rows }).map(() => (h("div", { class: "RecordContainer" },
|
|
1281
1296
|
h("ui-skeleton", { structure: "rectangle", width: "100%", height: "70px", "border-radius": "5px" })))));
|
|
@@ -6284,7 +6299,7 @@ var decimal = {exports: {}};
|
|
|
6284
6299
|
|
|
6285
6300
|
const Decimal = decimal.exports;
|
|
6286
6301
|
|
|
6287
|
-
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 .HistoryPoints{text-transform:lowercase}.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 .PowerUpInfo{background:linear-gradient(180deg, #EA9018 0%, #E0A84E 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:0.85rem;display:flex;flex-direction:row;gap:5px}.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(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
6302
|
+
const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}@media screen and (max-width: 500px){.RecordContainer{padding:5px 0px}.RecordContainer .Row.WalletNotes{flex-direction:column;align-items:flex-start}.RecordContainer .Row.WalletNotes .PowerUpInfo{flex-direction:row;align-items:flex-start;flex-wrap:wrap;font-size:0.79rem}.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis{display:inline-flex;width:55px;cursor:pointer}.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis .Value{text-overflow:ellipsis;display:flow;overflow:hidden;white-space:nowrap;width:80px}}.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 .HistoryPoints{text-transform:lowercase}.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 .PowerUpInfo{background:linear-gradient(180deg, #EA9018 0%, #E0A84E 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:0.85rem;display:flex;flex-direction:row;gap:5px}.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(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
6288
6303
|
const PlayerElevatePointsHistoryStyle0 = playerElevatePointsHistoryCss;
|
|
6289
6304
|
|
|
6290
6305
|
const PlayerElevatePointsHistory = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,c as t,h as n,g as i,a as r,F as a,H as o}from"./index-717e7bf3.js";import{t as s,T as l,a as h}from"./locale.utils-10bf5b6c.js";import{r as c,t as d,g as u,P as f,a as g}from"./player-elevate-card-items-f1914b1a.js";const p=["pt-br","en","es-mx","hu","hr","tr"],w={en:{pageLimitLabel:"Show"},tr:{pageLimitLabel:"Göster"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},v=class{constructor(n){e(this,n),this.pageLimitChanged=t(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.pageLimitOptions=void 0,this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(e){this.limit=e,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((e=>parseInt(e))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(e){console.error("Error when parse PageLimitOptions",e)}}renderStylingWrapper(){return n("general-styling-wrapper",{targetTranslations:w,translationUrl:this.translationUrl})}render(){return n("div",{key:"57f5e61ee287f72d0427a2e4f646e37c6b9358b9",class:"PaginationWrapper"},n("span",{key:"5f82b19fcf269086659b3faa475d9967b2af57fa",class:"NoOfItemsToDisplayMessage"},(()=>{const e=this.language;return w[void 0!==e&&p.includes(e)?e:"en"].pageLimitLabel})()),n("ul",{key:"559c2d5378a352691583567579a8e681d092ddd3",class:"PaginationArea"},this.pageLimits.map((e=>n("li",{class:(this.limit==e?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(e)}},e)))),n("general-styling-wrapper",{key:"a8b9632e7421318e330f33b9c1cc9eb7121e35e9",targetTranslations:w,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};v.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emw--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(--emw--color-primary, #eaefea);background-color:var(--emw--color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emw--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}";const m=["pt-br","en","es-mx","hu","hr"],b={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},y=(e,t,n)=>{const i=t;let r=b[void 0!==i&&m.includes(i)?i:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");r=r.replace(n,t)}return r},x=class{constructor(n){e(this,n),this.reloadPageEmitter=t(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return n("ul",{class:"PaginationArea"},this.pagesArray.map((e=>n("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return n("general-styling-wrapper",{targetTranslations:b,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let n=[],i=Math.floor(e/2);const r=this.endPageIndex+1;return t?this.currentPage<i||this.currentPage>r-i+1?(n=Array.from({length:i},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i},((e,t)=>this.endPageIndex-1+t)))):this.currentPage==i?(n=Array.from({length:i+1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i-1},((e,t)=>this.endPageIndex+t)))):this.currentPage==r-i+1?(n=Array.from({length:i-1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i+1},((e,t)=>this.endPageIndex-2+t)))):(n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",r])):this.currentPage<=e-i?(n=Array.from({length:e-1},((e,t)=>t+1)),n.push("...")):this.currentPage>r-(e-i)?(n=Array.from({length:e-1},((t,n)=>r-(e-2)+n)),n.unshift("...")):(n=Array.from({length:e-2},((e,t)=>this.currentPage+t-i+1)),n.push("..."),n.unshift("...")),n}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return n("div",{key:"77610598f3ce40796b8d486fd27725fc68b61878",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&n("span",{key:"879bd2f268a18ea3c9cb2bb706d23c8db0634592",class:"PageOfMessage"},y("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),n("div",{key:"590af1c2fcb70d782b318c505deb507a8376e13b",class:"PageNavigation"},this.arrowsActive&&n("div",{key:"2d4746e889a43d6199ad7f305676d79bdbaa4f04",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},y("firstPage",this.language)),this.secondaryArrowsActive&&n("span",{key:"89b588abdf7b77e3cdc00f44bbad27c432146f97",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},y("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&n("span",{key:"097710df72de15cd1b0c03dfb2ac7870c99e12c0",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},y("nextPage",this.language)),this.arrowsActive&&n("div",{key:"a61296f3e627bc012545618c0fda239a1356da1f",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",y("lastPage",this.language)," "),this.renderStylingWrapper()))}};x.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--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(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const k="__WIDGET_GLOBAL_STYLE_CACHE__";function P(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function C(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function B(e,t,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(n.innerHTML=t,e.appendChild(n))}))}(e,t),n;window[k]||(window[k]={}),n=function(e,t){return window.emMessageBus.subscribe(t,(n=>{if(!e)return;const i=e.getRootNode(),r=window[k];let a=r[t]&&r[t].sheet;a?r[t].refCount=r[t].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),r[t]={sheet:a,refCount:1});const o=i.adoptedStyleSheets||[];o.includes(a)||(i.adoptedStyleSheets=[...o,a])}))}(e,t);const r=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[k][t]){const e=window[k][t];e.refCount>1?e.refCount=e.refCount-1:delete window[k][t]}r()},n}const R=class{constructor(t){e(this,t),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(this.mbSource&&B(this.el,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&P(this.el,this.clientStyling),this.clientStylingUrl&&C(this.el,this.clientStylingUrl),this.stylingAppends=!0)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleMbSourceChange(e,t){e!=t&&B(this.el,`${this.mbSource}.Style`,this.stylingSubscription)}handleClientStylingChange(e,t){e!=t&&P(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&C(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&P(this.el,this.clientStyling),this.clientStylingUrl&&C(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]||{},Object.keys(t[e]).forEach((i=>{if(!n.en[i])return;const r=n.en[i];"object"==typeof t[e][i]?(n[e][i]=n[e][i]||Object.assign({},r),Object.keys(t[e][i]).forEach((r=>{n[e][i][r]=t[e][i][r]}))):n[e][i]=t[e][i]||Object.assign({},r)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return n("div",{key:"e660ceb69f5e848c788c3924fc814c0fa7a777a2",class:"StyleShell"},n("slot",{key:"35014b6c0c32532af11e6a629ba9b13942504d21",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{mbSource:["handleMbSourceChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function M(e){c(1,arguments);var t=d(e);return t.setHours(0,0,0,0),t}function S(e,t){return c(2,arguments),d(e).getTime()-d(t).getTime()}R.style=":host{display:block}";var E={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function T(e){return e?E[e]:E.trunc}const I=class{constructor(n){e(this,n),this.playerElevateLeveLoaded=t(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e,t){let n="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return n;e.aboutToExpire.sort(((e,t)=>function(e,t){c(2,arguments);var n=d(e),i=d(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const i=e.aboutToExpire[0],r=function(e,t){c(2,arguments);var n=M(e),i=M(t),r=n.getTime()-u(n),a=i.getTime()-u(i);return Math.round((r-a)/864e5)}(new Date(i.expireTime),new Date);let a=0,o=0,l=0===r?`${t}Day`:t;return r<=0&&(a=function(e,t,n){c(2,arguments);var i=S(e,t)/36e5;return T(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=a>1?`${t}Hours`:`${t}Hour`,a<=0&&(o=function(e,t,n){c(2,arguments);var i=S(e,t)/6e4;return T(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),n=s(l,{expirationPoints:i.points,expireDay:Math.max(r,a,o),lang:this.params.language}),n}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,r,a,o,s;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);window.postMessage({type:"UpdateGamificationXp",points:null===(r=null===(i=e.data)||void 0===i?void 0:i.level)||void 0===r?void 0:r.loyaltyPoints},window.location.href);let l=e.data;this.playerElevateLevel=l.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(a=l.spendableWallet)||void 0===a?void 0:a.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const h=null===(o=e.data.spendableWallet)||void 0===o?void 0:o.total,c=null===(s=e.data.loyaltyWallet)||void 0===s?void 0:s.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:h,loyaltyWalletTotal:c});let d=this.calcuatePointsToBeExpired(h,"coinsToBeExpired"),u=this.calcuatePointsToBeExpired(c,"pointsToBeExpired");(d||u)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:u}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,r=t>1?1:t,a=r*i-17<0?0:r*i-17,o=e.querySelector("#current_level"),s=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${a} 28`),o.setAttribute("width",`${a}`),l.setAttribute("cx",`${a<6.5?6.5:a}`),s.setAttribute("x",""+(a-8));const h=e.querySelector("#lock"),c=e.querySelector("#filter_heart_ball"),d=e.querySelector("#filter_ball"),u=e.querySelector("#filter_heart"),f=e.querySelector("#filter_lock"),g=e.querySelector("#paint0_linear_ball"),p=e.querySelector("#paint1_linear_lock"),w=e.querySelector("#lock_box"),v=e.querySelector("#heart_box"),m=i-10;h.setAttribute("cx",`${m}`),p.setAttribute("x1",`${m}`),p.setAttribute("x2",`${m}`),g.setAttribute("x1",""+(m-6)),g.setAttribute("x2",""+(m-6+11.2)),f.setAttribute("x",""+(m-6)),u.setAttribute("x",""+(m-6-2)),d.setAttribute("x",""+(m-6-2-2)),c.setAttribute("x",""+(m-6-2-2-4)),w.setAttribute("x",""+(m-6)),v.setAttribute("x",""+(m-6)),n.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.style=':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(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--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(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--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(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--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(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--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(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--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(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--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(--emw--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: var(--emw--border-radius-medium, 10px);\n background: var(--emw--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(--emw--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(--emw--color-red, #9e595f);\n}';const N=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.mbSource=void 0,this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=r("../static/card-ground.svg"),t=r("../static/card-ground-over.svg");return n("div",{key:"45aa5be359b46d5503a8310daa4db2029a8c59b8",class:`ElevateCardWrapper ${this.theme}`},n("div",{key:"0d1773bd9eb0913ede4eeedfc93f22967aa133d6",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},n("general-styling-wrapper",{key:"cfb35c5220633e39e25b11f0be5b6fc5cc73df5c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:l,translationUrl:this.translationUrl,mbSource:this.mbSource}),n("player-elevate-card-data",{key:"25206c4deb6e51e3ea60259d4fee3452df8253d6",params:this.paramProxy}),n("div",{key:"c14ee3498a1a584b7f484fe2ef6a204c337d2b27",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},n("div",{key:"dd7e0528034013d889f1f9bfbacf7928d2b4d1e9",class:"Content Row"},this.playerElevateLevel&&n(a,{key:"20b36f112f735446a6219b61e012e4568f199717"},n("div",{key:"3705136c1ee509484f43b7268b23cfbe273f727c",class:"PlayerImg"},n(f,{key:"b81cbcff0528acd3253a676e0a64141c6414fc2a",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),n("div",{key:"311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58",class:`LevelInfo ${this.playerElevateLevel.name}`},n("div",{key:"ba1744b3b9cee03a424093df96454ff68d04aec1",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:h("spendablePoints",this.language)),n("div",{key:"6b554d17a0f74684e23549365fb06f6079ba7239",class:"PointsTxt SPPoints"},n(g,{key:"a4c479500b38337c51a451aa3f482f195a2c827f",spendablePoints:this.playerElevateLevel.spendablePoints<=0?0:this.playerElevateLevel.spendablePoints,language:this.language}),n("a",{key:"896780fe3b4556d7eccbaac6eb5c1a715952bab0",class:"TC",onClick:()=>{this.onDetailsClick()}},h("termAndConditions",this.language))),this.pointExpireString&&n("div",{key:"e8556ee3033e9a1365fc8912321ae2b42f200bbe",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var L;N.style=":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(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--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}",function(e){e.spendable="spendable",e.loyalty="loyalty",e.history="history",e.rakeback="rakeback"}(L||(L={}));const A={en:{tabTitle:{spendable:"Coins",loyalty:"XP",history:"Shop Purchases",rakeback:"Rakeback"},barTitle:{spendable:"Coins History",loyalty:"Experience Points History",history:"Shop Purchases",rakeback:"Rakebake History"},bonus:"Bonus",coins:"Coins",noContent:"No Content",loading:"Loading",redeem:"Redeem",reload:"Reload",reloadMsgWhenError:"Network Problem, please ",powerUp:"Power-up",multiplierRate:"Multiplier Rate",rakebackPointType:{wageringByRealMoney:"Rakeback Casino Real Wager",bonus:"Rakeback Claim",vendor2User:"Rakeback Claim",cancelledWageringByRealMoney:"Cancelled Rakeback Casino Real Wager"},pointType:{registration:"Registration",cancelledRegistration:"Cancelled Registration",expiredRegistration:"Expired Registration",manual:"Manual",cancelledManual:"Cancelled Manual",expiredManual:"Expired Manual",wageringByRealMoney:"Casino Real Wager",wageringByBonusMoney:"Casino Bonus Wager",wageringBySportsBonusMoney:"Sports Bonus Wager",wageringBySportsRealMoney:"Sports Real Wager",cancelledWageringByRealMoney:"Cancelled Casino Real Wager",cancelledWageringByBonusMoney:"Cancelled Casino Bonus Wager",cancelledWageringBySportsRealMoney:"Cancelled Sports Real Wager",cancelledWageringBySportsBonusMoney:"Cancelled Sports Bonus Wager",expiredWageringByRealMoney:"Expired Casino Real Wager",expiredWageringByBonusMoney:"Expired Casino Bonus Wager",expiredWageringBySportsRealMoney:"Expired Sports Real Wager",expiredWageringBySportsBonusMoney:"Expired Sports Bonus Wager",levelExpired:"Level Expiration",bonus:"Bonus Redeem",powerUp:"PowerUp Redeem",manualByTournament:"Reward from Tournaments",manualByPrizeEngine:"Reward from PrizeEngine",manualByMission:"Reward from Mission",manualByChallenge:"Reward from Challenge",cancelledManualByTournament:"Cancelled Reward from Tournaments",cancelledManualByMission:"Cancelled Reward from Mission",cancelledManualByChallenge:"Cancelled Reward from Challenge",expiredManualByTournament:"Expired Reward from Tournaments",expiredManualByMission:"Expired Reward from Mission",expiredManualByChallenge:"Expired Reward from Challenge",cancelledManualByPrizeEngine:"Cancelled Reward from PrizeEngine",expiredManualByPrizeEngine:"Expired Reward from PrizeEngine",prizeEngine:"PrizeEngine Redeem",tournamentTicket:"Tournament Ticket Redeem",physicalItem:"Custom Reward Redeem",role:"Role Assignment Redeem"}},tr:{tabTitle:{spendable:"Coin",loyalty:"XP",history:"Mağaza Alımları",rakeback:"Rakeback"},barTitle:{spendable:"Coin Geçmişi",loyalty:"Deneyim Puanı Geçmişi",history:"Mağaza Alımları",rakeback:"Rakeback Geçmişi"},bonus:"Bonus",coins:"Coin",noContent:"İçerik Yok",loading:"Yükleniyor",redeem:"Kullan",reload:"Yenile",reloadMsgWhenError:"Ağ Sorunu, lütfen ",rakebackPointType:{wageringByRealMoney:"Rakeback Casino Gerçek Bahis",bonus:"Rakeback Talebi",vendor2User:"Rakeback Talebi",cancelledWageringByRealMoney:"İptal Edilen Rakeback Casino Gerçek Bahis"},pointType:{registration:"Kayıt",cancelledRegistration:"İptal Edilen Kayıt",expiredRegistration:"Süresi Dolan Kayıt",manual:"Manuel",cancelledManual:"İptal Edilen Manuel",expiredManual:"Süresi Dolan Manuel",wageringBySportsBonusMoney:"Spor Bonus Para Bahsi",wageringBySportsRealMoney:"Spor Gerçek Para Bahsi",wageringByRealMoney:"Gerçek Para Bahsi",wageringByBonusMoney:"Bonus Para Bahsi",cancelledWageringByRealMoney:"İptal Edilen Gerçek Para Bahsi",cancelledWageringByBonusMoney:"İptal Edilen Bonus Para Bahsi",cancelledWageringBySportsRealMoney:"İptal Edilen Spor Gerçek Bahis",cancelledWageringBySportsBonusMoney:"İptal Edilen Spor Bonus Bahsi",expiredWageringByRealMoney:"Süresi Dolan Gerçek Para Bahsi",expiredWageringByBonusMoney:"Süresi Dolan Bonus Para Bahsi",expiredWageringBySportsRealMoney:"Süresi Dolmuş Spor Gerçek Bahis",expiredWageringBySportsBonusMoney:"Süresi Dolmuş Spor Bonus Bahsi",levelExpired:"Seviye Süresi Doldu",bonus:"Bonus Kullanımı",manualByTournament:"Turnuvadan Ödül",manualByPrizeEngine:"PrizeEngine'den Ödül",manualByMission:"Görevden Ödül",manualByChallenge:"Meydan Okumadan Ödül",cancelledManualByTournament:"İptal Edilen Turnuva Ödülü",cancelledManualByMission:"İptal Edilen Görev Ödülü",cancelledManualByChallenge:"İptal Edilen Meydan Okuma Ödülü",expiredManualByTournament:"Süresi Dolan Turnuva Ödülü",expiredManualByMission:"Süresi Dolan Görev Ödülü",expiredManualByChallenge:"Süresi Dolan Meydan Okuma Ödülü",cancelledManualByPrizeEngine:"İptal Edilen PrizeEngine Ödülü",expiredManualByPrizeEngine:"Süresi Dolan PrizeEngine Ödülü",prizeEngine:"PrizeEngine Kullanımı",tournamentTicket:"Turnuva Bileti Kullanımı",physicalItem:"Özel Ödül Kullanımı",role:"Rol Ataması Kullanımı"}}},$=e=>"/v1/elevate/"+(e==L.history?"redeemHistory":"pointsHistory"),D=({locale:e,wallet:t,walletType:i,isRakeback:r})=>{var a;return i===L.history?n("div",{class:"RecordContainer"},t.payload&&n("div",{class:"Row"},n("div",{class:"Title"},t.payload.displayName),n("div",{class:`Amount ${O(t.points).class}`},n("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),n("div",{class:"Row"},n("div",{class:t.payload?"PointType":"Title"},e.pointType[t.pointType]||t.pointType),!t.payload&&n("div",{class:`Amount ${O(t.points).class}`},n("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),n("div",{class:"Row"},n("div",{class:"DateTime"},U(new Date(t.modified))))):n("div",{class:"RecordContainer"},n("div",{class:`Row ${t.pointType}`},n("div",{class:"Title"},(r?e.rakebackPointType[t.pointType]:e.pointType[t.pointType])||t.pointType),n("div",{class:`Amount ${O(t.points).class}`},n("span",{class:"Points"},O(t.points).symbol," ",r?t.pointAsString:t.points," "),r&&n("span",null," ",t.currency))),n("div",{class:"Row"},n("div",{class:"DateTime"},U(new Date(t.modified))),(null===(a=t.extension)||void 0===a?void 0:a.powerUpID)&&n("div",{class:"PowerUpInfo"},n("div",{class:"PowerUpName"},n("span",{class:"Label"},e.powerUp,": "),n("span",{class:"Value"},t.extension.powerUpName,", ")),n("div",{class:"PowerUpID"},n("span",{class:"Label"},"ID: "),n("span",{class:"Value"},t.extension.powerUpID,", ")),n("div",{class:"PowerUpMultiplier"},n("span",{class:"Label"},e.multiplierRate,": "),n("span",{class:"Value"},t.extension.powerUpCoefficient)))))},W=(e,t,i,r=!1)=>r?z():t&&n(a,null,n("div",{class:"Records"},t.map((t=>n(D,{locale:e,wallet:t,walletType:i.tableId,isRakeback:i.tableId===L.rakeback})))),n("div",{class:"PaginationContainer"},n("bonus-pagination-nav",{offset:i.offset,limit:i.limit,tableId:i.tableId,secondaryArrowsActive:i.secondaryArrowsActive,total:i.total}))),z=(e=3)=>n("div",{class:"Records"},Array.from({length:e}).map((()=>n("div",{class:"RecordContainer"},n("ui-skeleton",{structure:"rectangle",width:"100%",height:"70px","border-radius":"5px"}))))),O=e=>e>0?{class:"Positive",symbol:"+"}:{class:"Negative",symbol:""},_=e=>e.toString().padStart(2,"0"),U=e=>[e.getFullYear(),_(e.getMonth()+1),_(e.getDate())].join("-")+" "+[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),j=(e,t,i,r="en")=>n("div",{class:"TopBarContainer"},n("div",{class:"BackImageContainer"},n("span",{class:"BackImage",innerHTML:'<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'})),n("div",{class:"TitleContainer"},n("div",{class:"Title",title:e.barTitle[t]},e.barTitle[t]),n("div",{class:"Limits"},n("bonus-pagination-limits",{pageLimitOptions:i.pageLimitOptions,limit:i.limit,language:r}))),n("div",null,n("span",{class:"MenuImage",innerHTML:'<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="4" cy="4" r="4" fill="black"/>\n<circle cx="15" cy="4" r="4" fill="black"/>\n<circle cx="26" cy="4" r="4" fill="black"/>\n</svg>\n'})));var F,H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},G={exports:{}};F=G,function(e){
|
|
1
|
+
import{r as e,c as t,h as n,g as i,a as r,F as a,H as o}from"./index-717e7bf3.js";import{t as s,T as l,a as h}from"./locale.utils-10bf5b6c.js";import{r as c,t as d,g as u,P as f,a as g}from"./player-elevate-card-items-f1914b1a.js";const p=["pt-br","en","es-mx","hu","hr","tr"],w={en:{pageLimitLabel:"Show"},tr:{pageLimitLabel:"Göster"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},v=class{constructor(n){e(this,n),this.pageLimitChanged=t(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.pageLimitOptions=void 0,this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(e){this.limit=e,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((e=>parseInt(e))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(e){console.error("Error when parse PageLimitOptions",e)}}renderStylingWrapper(){return n("general-styling-wrapper",{targetTranslations:w,translationUrl:this.translationUrl})}render(){return n("div",{key:"57f5e61ee287f72d0427a2e4f646e37c6b9358b9",class:"PaginationWrapper"},n("span",{key:"5f82b19fcf269086659b3faa475d9967b2af57fa",class:"NoOfItemsToDisplayMessage"},(()=>{const e=this.language;return w[void 0!==e&&p.includes(e)?e:"en"].pageLimitLabel})()),n("ul",{key:"559c2d5378a352691583567579a8e681d092ddd3",class:"PaginationArea"},this.pageLimits.map((e=>n("li",{class:(this.limit==e?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(e)}},e)))),n("general-styling-wrapper",{key:"a8b9632e7421318e330f33b9c1cc9eb7121e35e9",targetTranslations:w,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};v.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emw--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(--emw--color-primary, #eaefea);background-color:var(--emw--color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emw--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}";const m=["pt-br","en","es-mx","hu","hr"],b={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},x=(e,t,n)=>{const i=t;let r=b[void 0!==i&&m.includes(i)?i:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");r=r.replace(n,t)}return r},y=class{constructor(n){e(this,n),this.reloadPageEmitter=t(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=7,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return n("ul",{class:"PaginationArea"},this.pagesArray.map((e=>n("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return n("general-styling-wrapper",{targetTranslations:b,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let n=[],i=Math.floor(e/2);const r=this.endPageIndex+1;if(t)if(this.currentPage<i||this.currentPage>r-i+1){n=Array.from({length:i},((e,t)=>t+1)),n.push("...");for(let t=r-(e-n.length-1);t<=r;t++)n.push(t)}else if(this.currentPage==i){n=Array.from({length:i+1},((e,t)=>t+1)),n.push("...");for(let t=r-(e-n.length-1);t<=r;t++)n.push(t)}else if(this.currentPage==r-i+1){n=Array.from({length:i-1},((e,t)=>t+1)),n.push("...");for(let t=r-(e-n.length-1);t<=r;t++)n.push(t)}else n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",r]);else this.currentPage<=e-i?(n=Array.from({length:e-1},((e,t)=>t+1)),n.push("...")):this.currentPage>r-(e-i)?(n=Array.from({length:e-1},((t,n)=>r-(e-2)+n)),n.unshift("...")):(n=Array.from({length:e-2},((e,t)=>this.currentPage+t-i+1)),n.push("..."),n.unshift("..."));return n}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return n("div",{key:"a6d3cd6cd1e5ff8d927486806d26c6eb61e57833",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&n("span",{key:"56f81e329deb0d5160d4d4e020571d1cc402dcc1",class:"PageOfMessage"},x("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),n("div",{key:"eaf964e00190b690564d57af6da91aed717e1690",class:"PageNavigation"},this.arrowsActive&&n("div",{key:"2be57e1c4d3d6fb80db83c6b5c60710573da5f5e",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},x("firstPage",this.language)),this.secondaryArrowsActive&&n("span",{key:"d240849c9ba6b9c14d4ebed6c346d7cc629a1a59",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},x("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&n("span",{key:"90cb6da1e51256e86f8678e0520d4b221b99957d",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},x("nextPage",this.language)),this.arrowsActive&&n("div",{key:"c74711a45bbbf822ca56e6f2fe70ee541ae91cfa",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",x("lastPage",this.language)," "),this.renderStylingWrapper()))}};y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--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(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const k="__WIDGET_GLOBAL_STYLE_CACHE__";function P(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function C(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function R(e,t,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(n.innerHTML=t,e.appendChild(n))}))}(e,t),n;window[k]||(window[k]={}),n=function(e,t){return window.emMessageBus.subscribe(t,(n=>{if(!e)return;const i=e.getRootNode(),r=window[k];let a=r[t]&&r[t].sheet;a?r[t].refCount=r[t].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),r[t]={sheet:a,refCount:1});const o=i.adoptedStyleSheets||[];o.includes(a)||(i.adoptedStyleSheets=[...o,a])}))}(e,t);const r=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[k][t]){const e=window[k][t];e.refCount>1?e.refCount=e.refCount-1:delete window[k][t]}r()},n}const M=class{constructor(t){e(this,t),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(this.mbSource&&R(this.el,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&P(this.el,this.clientStyling),this.clientStylingUrl&&C(this.el,this.clientStylingUrl),this.stylingAppends=!0)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleMbSourceChange(e,t){e!=t&&R(this.el,`${this.mbSource}.Style`,this.stylingSubscription)}handleClientStylingChange(e,t){e!=t&&P(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&C(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&P(this.el,this.clientStyling),this.clientStylingUrl&&C(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]||{},Object.keys(t[e]).forEach((i=>{if(!n.en[i])return;const r=n.en[i];"object"==typeof t[e][i]?(n[e][i]=n[e][i]||Object.assign({},r),Object.keys(t[e][i]).forEach((r=>{n[e][i][r]=t[e][i][r]}))):n[e][i]=t[e][i]||Object.assign({},r)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return n("div",{key:"e660ceb69f5e848c788c3924fc814c0fa7a777a2",class:"StyleShell"},n("slot",{key:"35014b6c0c32532af11e6a629ba9b13942504d21",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{mbSource:["handleMbSourceChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function B(e){c(1,arguments);var t=d(e);return t.setHours(0,0,0,0),t}function E(e,t){return c(2,arguments),d(e).getTime()-d(t).getTime()}M.style=":host{display:block}";var S={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function T(e){return e?S[e]:S.trunc}const I=class{constructor(n){e(this,n),this.playerElevateLeveLoaded=t(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e,t){let n="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return n;e.aboutToExpire.sort(((e,t)=>function(e,t){c(2,arguments);var n=d(e),i=d(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const i=e.aboutToExpire[0],r=function(e,t){c(2,arguments);var n=B(e),i=B(t),r=n.getTime()-u(n),a=i.getTime()-u(i);return Math.round((r-a)/864e5)}(new Date(i.expireTime),new Date);let a=0,o=0,l=0===r?`${t}Day`:t;return r<=0&&(a=function(e,t,n){c(2,arguments);var i=E(e,t)/36e5;return T(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=a>1?`${t}Hours`:`${t}Hour`,a<=0&&(o=function(e,t,n){c(2,arguments);var i=E(e,t)/6e4;return T(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),n=s(l,{expirationPoints:i.points,expireDay:Math.max(r,a,o),lang:this.params.language}),n}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,r,a,o,s;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);window.postMessage({type:"UpdateGamificationXp",points:null===(r=null===(i=e.data)||void 0===i?void 0:i.level)||void 0===r?void 0:r.loyaltyPoints},window.location.href);let l=e.data;this.playerElevateLevel=l.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(a=l.spendableWallet)||void 0===a?void 0:a.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const h=null===(o=e.data.spendableWallet)||void 0===o?void 0:o.total,c=null===(s=e.data.loyaltyWallet)||void 0===s?void 0:s.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:h,loyaltyWalletTotal:c});let d=this.calcuatePointsToBeExpired(h,"coinsToBeExpired"),u=this.calcuatePointsToBeExpired(c,"pointsToBeExpired");(d||u)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:u}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,r=t>1?1:t,a=r*i-17<0?0:r*i-17,o=e.querySelector("#current_level"),s=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${a} 28`),o.setAttribute("width",`${a}`),l.setAttribute("cx",`${a<6.5?6.5:a}`),s.setAttribute("x",""+(a-8));const h=e.querySelector("#lock"),c=e.querySelector("#filter_heart_ball"),d=e.querySelector("#filter_ball"),u=e.querySelector("#filter_heart"),f=e.querySelector("#filter_lock"),g=e.querySelector("#paint0_linear_ball"),p=e.querySelector("#paint1_linear_lock"),w=e.querySelector("#lock_box"),v=e.querySelector("#heart_box"),m=i-10;h.setAttribute("cx",`${m}`),p.setAttribute("x1",`${m}`),p.setAttribute("x2",`${m}`),g.setAttribute("x1",""+(m-6)),g.setAttribute("x2",""+(m-6+11.2)),f.setAttribute("x",""+(m-6)),u.setAttribute("x",""+(m-6-2)),d.setAttribute("x",""+(m-6-2-2)),c.setAttribute("x",""+(m-6-2-2-4)),w.setAttribute("x",""+(m-6)),v.setAttribute("x",""+(m-6)),n.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.style=':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(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--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(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--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(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--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(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--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(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--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(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--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(--emw--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: var(--emw--border-radius-medium, 10px);\n background: var(--emw--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(--emw--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(--emw--color-red, #9e595f);\n}';const N=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.mbSource=void 0,this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=r("../static/card-ground.svg"),t=r("../static/card-ground-over.svg");return n("div",{key:"45aa5be359b46d5503a8310daa4db2029a8c59b8",class:`ElevateCardWrapper ${this.theme}`},n("div",{key:"0d1773bd9eb0913ede4eeedfc93f22967aa133d6",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},n("general-styling-wrapper",{key:"cfb35c5220633e39e25b11f0be5b6fc5cc73df5c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:l,translationUrl:this.translationUrl,mbSource:this.mbSource}),n("player-elevate-card-data",{key:"25206c4deb6e51e3ea60259d4fee3452df8253d6",params:this.paramProxy}),n("div",{key:"c14ee3498a1a584b7f484fe2ef6a204c337d2b27",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},n("div",{key:"dd7e0528034013d889f1f9bfbacf7928d2b4d1e9",class:"Content Row"},this.playerElevateLevel&&n(a,{key:"20b36f112f735446a6219b61e012e4568f199717"},n("div",{key:"3705136c1ee509484f43b7268b23cfbe273f727c",class:"PlayerImg"},n(f,{key:"b81cbcff0528acd3253a676e0a64141c6414fc2a",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),n("div",{key:"311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58",class:`LevelInfo ${this.playerElevateLevel.name}`},n("div",{key:"ba1744b3b9cee03a424093df96454ff68d04aec1",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:h("spendablePoints",this.language)),n("div",{key:"6b554d17a0f74684e23549365fb06f6079ba7239",class:"PointsTxt SPPoints"},n(g,{key:"a4c479500b38337c51a451aa3f482f195a2c827f",spendablePoints:this.playerElevateLevel.spendablePoints<=0?0:this.playerElevateLevel.spendablePoints,language:this.language}),n("a",{key:"896780fe3b4556d7eccbaac6eb5c1a715952bab0",class:"TC",onClick:()=>{this.onDetailsClick()}},h("termAndConditions",this.language))),this.pointExpireString&&n("div",{key:"e8556ee3033e9a1365fc8912321ae2b42f200bbe",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var L;N.style=":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(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--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}",function(e){e.spendable="spendable",e.loyalty="loyalty",e.history="history",e.rakeback="rakeback"}(L||(L={}));const $={en:{tabTitle:{spendable:"Coins",loyalty:"XP",history:"Shop Purchases",rakeback:"Rakeback"},barTitle:{spendable:"Coins History",loyalty:"Experience Points History",history:"Shop Purchases",rakeback:"Rakebake History"},bonus:"Bonus",coins:"Coins",noContent:"No Content",loading:"Loading",redeem:"Redeem",reload:"Reload",reloadMsgWhenError:"Network Problem, please ",powerUp:"Power-up",multiplierRate:"Multiplier Rate",rakebackPointType:{wageringByRealMoney:"Rakeback Casino Real Wager",bonus:"Rakeback Claim",vendor2User:"Rakeback Claim",cancelledWageringByRealMoney:"Cancelled Rakeback Casino Real Wager"},pointType:{registration:"Registration",cancelledRegistration:"Cancelled Registration",expiredRegistration:"Expired Registration",manual:"Manual",cancelledManual:"Cancelled Manual",expiredManual:"Expired Manual",wageringByRealMoney:"Casino Real Wager",wageringByBonusMoney:"Casino Bonus Wager",wageringBySportsBonusMoney:"Sports Bonus Wager",wageringBySportsRealMoney:"Sports Real Wager",cancelledWageringByRealMoney:"Cancelled Casino Real Wager",cancelledWageringByBonusMoney:"Cancelled Casino Bonus Wager",cancelledWageringBySportsRealMoney:"Cancelled Sports Real Wager",cancelledWageringBySportsBonusMoney:"Cancelled Sports Bonus Wager",expiredWageringByRealMoney:"Expired Casino Real Wager",expiredWageringByBonusMoney:"Expired Casino Bonus Wager",expiredWageringBySportsRealMoney:"Expired Sports Real Wager",expiredWageringBySportsBonusMoney:"Expired Sports Bonus Wager",levelExpired:"Level Expiration",bonus:"Bonus Redeem",powerUp:"PowerUp Redeem",manualByTournament:"Reward from Tournaments",manualByPrizeEngine:"Reward from PrizeEngine",manualByMission:"Reward from Mission",manualByChallenge:"Reward from Challenge",cancelledManualByTournament:"Cancelled Reward from Tournaments",cancelledManualByMission:"Cancelled Reward from Mission",cancelledManualByChallenge:"Cancelled Reward from Challenge",expiredManualByTournament:"Expired Reward from Tournaments",expiredManualByMission:"Expired Reward from Mission",expiredManualByChallenge:"Expired Reward from Challenge",cancelledManualByPrizeEngine:"Cancelled Reward from PrizeEngine",expiredManualByPrizeEngine:"Expired Reward from PrizeEngine",prizeEngine:"PrizeEngine Redeem",tournamentTicket:"Tournament Ticket Redeem",physicalItem:"Custom Reward Redeem",role:"Role Assignment Redeem"}},tr:{tabTitle:{spendable:"Coin",loyalty:"XP",history:"Mağaza Alımları",rakeback:"Rakeback"},barTitle:{spendable:"Coin Geçmişi",loyalty:"Deneyim Puanı Geçmişi",history:"Mağaza Alımları",rakeback:"Rakeback Geçmişi"},bonus:"Bonus",coins:"Coin",noContent:"İçerik Yok",loading:"Yükleniyor",redeem:"Kullan",reload:"Yenile",reloadMsgWhenError:"Ağ Sorunu, lütfen ",rakebackPointType:{wageringByRealMoney:"Rakeback Casino Gerçek Bahis",bonus:"Rakeback Talebi",vendor2User:"Rakeback Talebi",cancelledWageringByRealMoney:"İptal Edilen Rakeback Casino Gerçek Bahis"},pointType:{registration:"Kayıt",cancelledRegistration:"İptal Edilen Kayıt",expiredRegistration:"Süresi Dolan Kayıt",manual:"Manuel",cancelledManual:"İptal Edilen Manuel",expiredManual:"Süresi Dolan Manuel",wageringBySportsBonusMoney:"Spor Bonus Para Bahsi",wageringBySportsRealMoney:"Spor Gerçek Para Bahsi",wageringByRealMoney:"Gerçek Para Bahsi",wageringByBonusMoney:"Bonus Para Bahsi",cancelledWageringByRealMoney:"İptal Edilen Gerçek Para Bahsi",cancelledWageringByBonusMoney:"İptal Edilen Bonus Para Bahsi",cancelledWageringBySportsRealMoney:"İptal Edilen Spor Gerçek Bahis",cancelledWageringBySportsBonusMoney:"İptal Edilen Spor Bonus Bahsi",expiredWageringByRealMoney:"Süresi Dolan Gerçek Para Bahsi",expiredWageringByBonusMoney:"Süresi Dolan Bonus Para Bahsi",expiredWageringBySportsRealMoney:"Süresi Dolmuş Spor Gerçek Bahis",expiredWageringBySportsBonusMoney:"Süresi Dolmuş Spor Bonus Bahsi",levelExpired:"Seviye Süresi Doldu",bonus:"Bonus Kullanımı",manualByTournament:"Turnuvadan Ödül",manualByPrizeEngine:"PrizeEngine'den Ödül",manualByMission:"Görevden Ödül",manualByChallenge:"Meydan Okumadan Ödül",cancelledManualByTournament:"İptal Edilen Turnuva Ödülü",cancelledManualByMission:"İptal Edilen Görev Ödülü",cancelledManualByChallenge:"İptal Edilen Meydan Okuma Ödülü",expiredManualByTournament:"Süresi Dolan Turnuva Ödülü",expiredManualByMission:"Süresi Dolan Görev Ödülü",expiredManualByChallenge:"Süresi Dolan Meydan Okuma Ödülü",cancelledManualByPrizeEngine:"İptal Edilen PrizeEngine Ödülü",expiredManualByPrizeEngine:"Süresi Dolan PrizeEngine Ödülü",prizeEngine:"PrizeEngine Kullanımı",tournamentTicket:"Turnuva Bileti Kullanımı",physicalItem:"Özel Ödül Kullanımı",role:"Rol Ataması Kullanımı"}}},A=e=>"/v1/elevate/"+(e==L.history?"redeemHistory":"pointsHistory"),D=({locale:e,wallet:t,walletType:i,isRakeback:r})=>{var a;return i===L.history?n("div",{class:"RecordContainer"},t.payload&&n("div",{class:"Row"},n("div",{class:"Title"},t.payload.displayName),n("div",{class:`Amount ${_(t.points).class}`},n("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),n("div",{class:"Row"},n("div",{class:t.payload?"PointType":"Title"},e.pointType[t.pointType]||t.pointType),!t.payload&&n("div",{class:`Amount ${_(t.points).class}`},n("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),n("div",{class:"Row"},n("div",{class:"DateTime"},j(new Date(t.modified))))):n("div",{class:"RecordContainer"},n("div",{class:`Row ${t.pointType}`},n("div",{class:"Title"},(r?e.rakebackPointType[t.pointType]:e.pointType[t.pointType])||t.pointType),n("div",{class:`Amount ${_(t.points).class}`},n("span",{class:"Points"},_(t.points).symbol," ",r?t.pointAsString:t.points," "),r&&n("span",null," ",t.currency))),n("div",{class:"Row WalletNotes"},n("div",{class:"DateTime"},j(new Date(t.modified))),(null===(a=t.extension)||void 0===a?void 0:a.powerUpID)&&n("div",{class:"PowerUpInfo"},n("div",{class:"PowerUpName"},n("span",{class:"Label"},e.powerUp,": "),n("span",{class:"Value"},t.extension.powerUpName,", ")),n("div",{class:"PowerUpID "+(t.isShowAll?"":"MobEllipsis"),onClick:e=>{z(e,t)}},n("span",{class:"Label"},"ID: "),n("span",{class:"Value"},t.extension.powerUpID,", ")),n("div",{class:"PowerUpMultiplier"},n("span",{class:"Label"},e.multiplierRate,": "),n("span",{class:"Value"},t.extension.powerUpCoefficient)))))},W=(e,t,i,r=!1)=>r?O():t&&n(a,null,n("div",{class:"Records"},t.map((t=>n(D,{locale:e,wallet:t,walletType:i.tableId,isRakeback:i.tableId===L.rakeback})))),n("div",{class:"PaginationContainer"},n("bonus-pagination-nav",{offset:i.offset,limit:i.limit,tableId:i.tableId,secondaryArrowsActive:i.secondaryArrowsActive,total:i.total}))),z=(e,t)=>{t.isShowAll=!t.isShowAll,t.isShowAll?e.currentTarget.classList.remove("MobEllipsis"):e.currentTarget.classList.add("MobEllipsis")},O=(e=3)=>n("div",{class:"Records"},Array.from({length:e}).map((()=>n("div",{class:"RecordContainer"},n("ui-skeleton",{structure:"rectangle",width:"100%",height:"70px","border-radius":"5px"}))))),_=e=>e>0?{class:"Positive",symbol:"+"}:{class:"Negative",symbol:""},U=e=>e.toString().padStart(2,"0"),j=e=>[e.getFullYear(),U(e.getMonth()+1),U(e.getDate())].join("-")+" "+[U(e.getHours()),U(e.getMinutes()),U(e.getSeconds())].join(":"),F=(e,t,i,r="en")=>n("div",{class:"TopBarContainer"},n("div",{class:"BackImageContainer"},n("span",{class:"BackImage",innerHTML:'<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'})),n("div",{class:"TitleContainer"},n("div",{class:"Title",title:e.barTitle[t]},e.barTitle[t]),n("div",{class:"Limits"},n("bonus-pagination-limits",{pageLimitOptions:i.pageLimitOptions,limit:i.limit,language:r}))),n("div",null,n("span",{class:"MenuImage",innerHTML:'<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="4" cy="4" r="4" fill="black"/>\n<circle cx="15" cy="4" r="4" fill="black"/>\n<circle cx="26" cy="4" r="4" fill="black"/>\n</svg>\n'})));var H,G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K={exports:{}};H=K,function(e){
|
|
2
2
|
/*!
|
|
3
3
|
* decimal.js v10.6.0
|
|
4
4
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
@@ -6,4 +6,4 @@ import{r as e,c as t,h as n,g as i,a as r,F as a,H as o}from"./index-717e7bf3.js
|
|
|
6
6
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
7
7
|
* MIT Licence
|
|
8
8
|
*/
|
|
9
|
-
var t,n,i,r,a=9e15,o=1e9,s="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",h="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-a,maxE:a,crypto:!1},d=!0,u="[DecimalError] ",f=u+"Invalid argument: ",g=u+"Precision limit exceeded",p=u+"crypto unavailable",w="[object Decimal]",v=Math.floor,m=Math.pow,b=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,y=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,x=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,k=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,P=1e7,C=7,B=l.length-1,R=h.length-1,M={toStringTag:w};function S(e){var t,n,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,t=1;t<r;t++)(n=C-(i=e[t]+"").length)&&(a+=O(n)),a+=i;(n=C-(i=(o=e[t])+"").length)&&(a+=O(n))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}function E(e,t,n){if(e!==~~e||e<t||e>n)throw Error(f+e)}function T(e,t,n,i){var r,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=C,r=0):(r=Math.ceil((t+1)/C),t%=C),a=m(10,C-t),s=e[r]%a|0,null==i?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):o=(n<4&&s+1==a||n>3&&s+1==a/2)&&(e[r+1]/a/100|0)==m(10,t-2)-1||(s==a/2||0==s)&&!(e[r+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(i||n<4)&&9999==s||!i&&n>3&&4999==s):o=((i||n<4)&&s+1==a||!i&&n>3&&s+1==a/2)&&(e[r+1]/a/1e3|0)==m(10,t-3)-1,o}function I(e,t,n){for(var i,r,a=[0],o=0,l=e.length;o<l;){for(r=a.length;r--;)a[r]*=t;for(a[0]+=s.indexOf(e.charAt(o++)),i=0;i<a.length;i++)a[i]>n-1&&(void 0===a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}M.absoluteValue=M.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),L(e)},M.ceil=function(){return L(new this.constructor(this),this.e+1,2)},M.clampedTo=M.clamp=function(e,t){var n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(f+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new i(n)},M.comparedTo=M.cmp=function(e){var t,n,i,r,a=this,o=a.d,s=(e=new a.constructor(e)).d,l=a.s,h=e.s;if(!o||!s)return l&&h?l!==h?l:o===s?0:!o^l<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?l:s[0]?-h:0;if(l!==h)return l;if(a.e!==e.e)return a.e>e.e^l<0?1:-1;for(t=0,n=(i=o.length)<(r=s.length)?i:r;t<n;++t)if(o[t]!==s[t])return o[t]>s[t]^l<0?1:-1;return i===r?0:i>r^l<0?1:-1},M.cosine=M.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(t=i.rounding,i.precision=(e=i.precision)+Math.max(n.e,n.sd())+C,i.rounding=1,n=function(e,t){var n,i,r;if(t.isZero())return t;(i=t.d.length)<32?r=(1/J(4,n=Math.ceil(i/3))).toString():(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=V(e,1,t.times(r),new e(1));for(var a=n;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}(i,q(i,n)),i.precision=e,i.rounding=t,L(2==r||3==r?n.neg():n,e,t,!0)):new i(1):new i(NaN)},M.cubeRoot=M.cbrt=function(){var e,t,n,i,r,a,o,s,l,h,c=this,u=c.constructor;if(!c.isFinite()||c.isZero())return new u(c);for(d=!1,(a=c.s*m(c.s*c,1/3))&&Math.abs(a)!=1/0?i=new u(a.toString()):(n=S(c.d),(a=((e=c.e)-n.length+1)%3)&&(n+=1==a||-2==a?"0":"00"),a=m(n,1/3),e=v((e+1)/3)-(e%3==(e<0?-1:2)),(i=new u(n=a==1/0?"5e"+e:(n=a.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=c.s),o=(e=u.precision)+3;;)if(h=(l=(s=i).times(s).times(s)).plus(c),i=N(h.plus(c).times(s),h.plus(l),o+2,1),S(s.d).slice(0,o)===(n=S(i.d)).slice(0,o)){if("9999"!=(n=n.slice(o-3,o+1))&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(L(i,e+1,1),t=!i.times(i).times(i).eq(c));break}if(!r&&(L(s,e+1,0),s.times(s).times(s).eq(c))){i=s;break}o+=4,r=1}return d=!0,L(i,e,u.rounding,t)},M.decimalPlaces=M.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-v(this.e/C))*C,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},M.dividedBy=M.div=function(e){return N(this,new this.constructor(e))},M.dividedToIntegerBy=M.divToInt=function(e){var t=this.constructor;return L(N(this,new t(e),0,1,1),t.precision,t.rounding)},M.equals=M.eq=function(e){return 0===this.cmp(e)},M.floor=function(){return L(new this.constructor(this),this.e+1,3)},M.greaterThan=M.gt=function(e){return this.cmp(e)>0},M.greaterThanOrEqualTo=M.gte=function(e){var t=this.cmp(e);return 1==t||0===t},M.hyperbolicCosine=M.cosh=function(){var e,t,n,i,r,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;i=o.rounding,o.precision=(n=o.precision)+Math.max(a.e,a.sd())+4,o.rounding=1,(r=a.d.length)<32?t=(1/J(4,e=Math.ceil(r/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=V(o,1,a.times(t),new o(1),!0);for(var l,h=e,c=new o(8);h--;)l=a.times(a),a=s.minus(l.times(c.minus(l.times(c))));return L(a,o.precision=n,o.rounding=i,!0)},M.hyperbolicSine=M.sinh=function(){var e,t,n,i,r=this,a=r.constructor;if(!r.isFinite()||r.isZero())return new a(r);if(n=a.rounding,a.precision=(t=a.precision)+Math.max(r.e,r.sd())+4,a.rounding=1,(i=r.d.length)<3)r=V(a,2,r,r,!0);else{e=1.4*Math.sqrt(i),r=V(a,2,r=r.times(1/J(5,e=e>16?16:0|e)),r,!0);for(var o,s=new a(5),l=new a(16),h=new a(20);e--;)o=r.times(r),r=r.times(s.plus(o.times(l.times(o).plus(h))))}return a.precision=t,a.rounding=n,L(r,t,n,!0)},M.hyperbolicTangent=M.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+7,i.rounding=1,N(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},M.inverseCosine=M.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),i=t.precision,r=t.rounding;return-1!==n?0===n?e.isNeg()?W(t,i,r):new t(0):new t(NaN):e.isZero()?W(t,i+4,r).times(.5):(t.precision=i+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=i,t.rounding=r,e.times(2))},M.inverseHyperbolicCosine=M.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(t=i.rounding,i.precision=(e=i.precision)+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,d=!1,n=n.times(n).minus(1).sqrt().plus(n),d=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},M.inverseHyperbolicSine=M.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,d=!1,n=n.times(n).plus(1).sqrt().plus(n),d=!0,i.precision=e,i.rounding=t,n.ln())},M.inverseHyperbolicTangent=M.atanh=function(){var e,t,n,i,r=this,a=r.constructor;return r.isFinite()?r.e>=0?new a(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=a.precision,t=a.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?L(new a(r),e,t,!0):(a.precision=n=i-r.e,r=N(r.plus(1),new a(1).minus(r),n+e,1),a.precision=e+4,a.rounding=1,r=r.ln(),a.precision=e,a.rounding=t,r.times(.5))):new a(NaN)},M.inverseSine=M.asin=function(){var e,t,n,i,r=this,a=r.constructor;return r.isZero()?new a(r):(t=r.abs().cmp(1),n=a.precision,i=a.rounding,-1!==t?0===t?((e=W(a,n+4,i).times(.5)).s=r.s,e):new a(NaN):(a.precision=n+6,a.rounding=1,r=r.div(new a(1).minus(r.times(r)).sqrt().plus(1)).atan(),a.precision=n,a.rounding=i,r.times(2)))},M.inverseTangent=M.atan=function(){var e,t,n,i,r,a,o,s,l,h=this,c=h.constructor,u=c.precision,f=c.rounding;if(h.isFinite()){if(h.isZero())return new c(h);if(h.abs().eq(1)&&u+4<=R)return(o=W(c,u+4,f).times(.25)).s=h.s,o}else{if(!h.s)return new c(NaN);if(u+4<=R)return(o=W(c,u+4,f).times(.5)).s=h.s,o}for(c.precision=s=u+10,c.rounding=1,e=n=Math.min(28,s/C+2|0);e;--e)h=h.div(h.times(h).plus(1).sqrt().plus(1));for(d=!1,t=Math.ceil(s/C),i=1,l=h.times(h),o=new c(h),r=h;-1!==e;)if(r=r.times(l),a=o.minus(r.div(i+=2)),r=r.times(l),void 0!==(o=a.plus(r.div(i+=2))).d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),d=!0,L(o,c.precision=u,c.rounding=f,!0)},M.isFinite=function(){return!!this.d},M.isInteger=M.isInt=function(){return!!this.d&&v(this.e/C)>this.d.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isPositive=M.isPos=function(){return this.s>0},M.isZero=function(){return!!this.d&&0===this.d[0]},M.lessThan=M.lt=function(e){return this.cmp(e)<0},M.lessThanOrEqualTo=M.lte=function(e){return this.cmp(e)<1},M.logarithm=M.log=function(e){var t,n,i,r,a,o,s,l,h=this,c=h.constructor,u=c.precision,f=c.rounding;if(null==e)e=new c(10),t=!0;else{if(n=(e=new c(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(n=h.d,h.s<0||!n||!n[0]||h.eq(1))return new c(n&&!n[0]?-1/0:1!=h.s?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(r=n[0];r%10==0;)r/=10;a=1!==r}if(d=!1,o=G(h,s=u+5),i=t?D(c,s+10):G(e,s),T((l=N(o,i,s,1)).d,r=u,f))do{if(o=G(h,s+=10),i=t?D(c,s+10):G(e,s),l=N(o,i,s,1),!a){+S(l.d).slice(r+1,r+15)+1==1e14&&(l=L(l,u+1,0));break}}while(T(l.d,r+=10,f));return d=!0,L(l,u,f)},M.minus=M.sub=function(e){var t,n,i,r,a,o,s,l,h,c,u,f,g=this,p=g.constructor;if(e=new p(e),!g.d||!e.d)return g.s&&e.s?g.d?e.s=-e.s:e=new p(e.d||g.s!==e.s?g:NaN):e=new p(NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=e.d,s=p.precision,l=p.rounding,!(h=g.d)[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!h[0])return new p(3===l?-0:0);e=new p(g)}return d?L(e,s,l):e}if(n=v(e.e/C),c=v(g.e/C),h=h.slice(),a=c-n){for((u=a<0)?(t=h,a=-a,o=f.length):(t=f,n=c,o=h.length),a>(i=Math.max(Math.ceil(s/C),o)+2)&&(a=i,t.length=1),t.reverse(),i=a;i--;)t.push(0);t.reverse()}else{for((u=(i=h.length)<(o=f.length))&&(o=i),i=0;i<o;i++)if(h[i]!=f[i]){u=h[i]<f[i];break}a=0}for(u&&(t=h,h=f,f=t,e.s=-e.s),i=f.length-(o=h.length);i>0;--i)h[o++]=0;for(i=f.length;i>a;){if(h[--i]<f[i]){for(r=i;r&&0===h[--r];)h[r]=P-1;--h[r],h[i]+=P}h[i]-=f[i]}for(;0===h[--o];)h.pop();for(;0===h[0];h.shift())--n;return h[0]?(e.d=h,e.e=$(h,n),d?L(e,s,l):e):new p(3===l?-0:0)},M.modulo=M.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?L(new i(n),i.precision,i.rounding):(d=!1,9==i.modulo?(t=N(n,e.abs(),0,3,1)).s*=e.s:t=N(n,e,0,i.modulo,1),t=t.times(e),d=!0,n.minus(t))},M.naturalExponential=M.exp=function(){return H(this)},M.naturalLogarithm=M.ln=function(){return G(this)},M.negated=M.neg=function(){var e=new this.constructor(this);return e.s=-e.s,L(e)},M.plus=M.add=function(e){var t,n,i,r,a,o,s,l,h,c,u=this,f=u.constructor;if(e=new f(e),!u.d||!e.d)return u.s&&e.s?u.d||(e=new f(e.d||u.s===e.s?u:NaN)):e=new f(NaN),e;if(u.s!=e.s)return e.s=-e.s,u.minus(e);if(c=e.d,s=f.precision,l=f.rounding,!(h=u.d)[0]||!c[0])return c[0]||(e=new f(u)),d?L(e,s,l):e;if(a=v(u.e/C),i=v(e.e/C),h=h.slice(),r=a-i){for(r<0?(n=h,r=-r,o=c.length):(n=c,i=a,o=h.length),r>(o=(a=Math.ceil(s/C))>o?a+1:o+1)&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for((o=h.length)-(r=c.length)<0&&(r=o,n=c,c=h,h=n),t=0;r;)t=(h[--r]=h[r]+c[r]+t)/P|0,h[r]%=P;for(t&&(h.unshift(t),++i),o=h.length;0==h[--o];)h.pop();return e.d=h,e.e=$(h,i),d?L(e,s,l):e},M.precision=M.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(f+e);return n.d?(t=z(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},M.round=function(){var e=this,t=e.constructor;return L(new t(e),e.e+1,t.rounding)},M.sine=M.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+Math.max(n.e,n.sd())+C,i.rounding=1,n=function(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:V(e,2,t,t);n=1.4*Math.sqrt(i),t=V(e,2,t=t.times(1/J(5,n=n>16?16:0|n)),t);for(var r,a=new e(5),o=new e(16),s=new e(20);n--;)r=t.times(t),t=t.times(a.plus(r.times(o.times(r).minus(s))));return t}(i,q(i,n)),i.precision=e,i.rounding=t,L(r>2?n.neg():n,e,t,!0)):new i(NaN)},M.squareRoot=M.sqrt=function(){var e,t,n,i,r,a,o=this,s=o.d,l=o.e,h=o.s,c=o.constructor;if(1!==h||!s||!s[0])return new c(!h||h<0&&(!s||s[0])?NaN:s?o:1/0);for(d=!1,0==(h=Math.sqrt(+o))||h==1/0?(((t=S(s)).length+l)%2==0&&(t+="0"),h=Math.sqrt(t),l=v((l+1)/2)-(l<0||l%2),i=new c(t=h==1/0?"5e"+l:(t=h.toExponential()).slice(0,t.indexOf("e")+1)+l)):i=new c(h.toString()),n=(l=c.precision)+3;;)if(i=(a=i).plus(N(o,a,n+2,1)).times(.5),S(a.d).slice(0,n)===(t=S(i.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(L(i,l+1,1),e=!i.times(i).eq(o));break}if(!r&&(L(a,l+1,0),a.times(a).eq(o))){i=a;break}n+=4,r=1}return d=!0,L(i,l,c.rounding,e)},M.tangent=M.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+10,i.rounding=1,(n=n.sin()).s=1,n=N(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,L(2==r||4==r?n.neg():n,e,t,!0)):new i(NaN)},M.times=M.mul=function(e){var t,n,i,r,a,o,s,l,h,c=this,u=c.constructor,f=c.d,g=(e=new u(e)).d;if(e.s*=c.s,!(f&&f[0]&&g&&g[0]))return new u(!e.s||f&&!f[0]&&!g||g&&!g[0]&&!f?NaN:f&&g?0*e.s:e.s/0);for(n=v(c.e/C)+v(e.e/C),(l=f.length)<(h=g.length)&&(a=f,f=g,g=a,o=l,l=h,h=o),a=[],i=o=l+h;i--;)a.push(0);for(i=h;--i>=0;){for(t=0,r=l+i;r>i;)s=a[r]+g[i]*f[r-i-1]+t,a[r--]=s%P|0,t=s/P|0;a[r]=(a[r]+t)%P|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=$(a,n),d?L(e,u.precision,u.rounding):e},M.toBinary=function(e,t){return Q(this,2,e,t)},M.toDecimalPlaces=M.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),void 0===e?n:(E(e,0,o),void 0===t?t=i.rounding:E(t,0,8),L(n,e+n.e+1,t))},M.toExponential=function(e,t){var n,i=this,r=i.constructor;return void 0===e?n=A(i,!0):(E(e,0,o),void 0===t?t=r.rounding:E(t,0,8),n=A(i=L(new r(i),e+1,t),!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},M.toFixed=function(e,t){var n,i,r=this,a=r.constructor;return void 0===e?n=A(r):(E(e,0,o),void 0===t?t=a.rounding:E(t,0,8),n=A(i=L(new a(r),e+r.e+1,t),!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},M.toFraction=function(e){var t,n,i,r,a,o,s,l,h,c,u,g,p=this,w=p.d,v=p.constructor;if(!w)return new v(p);if(h=n=new v(1),i=l=new v(0),a=(t=new v(i)).e=z(w)-p.e-1,t.d[0]=m(10,(o=a%C)<0?C+o:o),null==e)e=a>0?t:h;else{if(!(s=new v(e)).isInt()||s.lt(h))throw Error(f+s);e=s.gt(t)?a>0?t:h:s}for(d=!1,s=new v(S(w)),c=v.precision,v.precision=a=w.length*C*2;u=N(s,t,0,1,1),1!=(r=n.plus(u.times(i))).cmp(e);)n=i,i=r,h=l.plus(u.times(r=h)),l=r,t=s.minus(u.times(r=t)),s=r;return r=N(e.minus(n),i,0,1,1),l=l.plus(r.times(h)),n=n.plus(r.times(i)),l.s=h.s=p.s,g=N(h,i,a,1).minus(p).abs().cmp(N(l,n,a,1).minus(p).abs())<1?[h,i]:[l,n],v.precision=c,d=!0,g},M.toHexadecimal=M.toHex=function(e,t){return Q(this,16,e,t)},M.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),null==e){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),void 0===t?t=i.rounding:E(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(d=!1,n=N(n,e,0,t,1).times(e),d=!0,L(n)):(e.s=n.s,n=e),n},M.toNumber=function(){return+this},M.toOctal=function(e,t){return Q(this,8,e,t)},M.toPower=M.pow=function(e){var t,n,i,r,a,o,s=this,l=s.constructor,h=+(e=new l(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new l(m(+s,h));if((s=new l(s)).eq(1))return s;if(i=l.precision,a=l.rounding,e.eq(1))return L(s,i,a);if((t=v(e.e/C))>=e.d.length-1&&(n=h<0?-h:h)<=9007199254740991)return r=_(l,s,n,i),e.s<0?new l(1).div(r):L(r,i,a);if((o=s.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(t=0!=(n=m(+s,h))&&isFinite(n)?new l(n+"").e:v(h*(Math.log("0."+S(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?o/0:0):(d=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(r=H(e.times(G(s,i+n)),i)).d&&T((r=L(r,i+5,1)).d,i,a)&&+S((r=L(H(e.times(G(s,(t=i+10)+n)),t),t+5,1)).d).slice(i+1,i+15)+1==1e14&&(r=L(r,i+1,0)),r.s=o,d=!0,l.rounding=a,L(r,i,a))},M.toPrecision=function(e,t){var n,i=this,r=i.constructor;return void 0===e?n=A(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(E(e,1,o),void 0===t?t=r.rounding:E(t,0,8),n=A(i=L(new r(i),e,t),e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},M.toSignificantDigits=M.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(E(e,1,o),void 0===t?t=n.rounding:E(t,0,8)),L(new n(this),e,t)},M.toString=function(){var e=this,t=e.constructor,n=A(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},M.truncated=M.trunc=function(){return L(new this.constructor(this),this.e+1,1)},M.valueOf=M.toJSON=function(){var e=this,t=e.constructor,n=A(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var N=function(){function e(e,t,n){var i,r=0,a=e.length;for(e=e.slice();a--;)e[a]=(i=e[a]*t+r)%n|0,r=i/n|0;return r&&e.unshift(r),e}function t(e,t,n,i){var r,a;if(n!=i)a=n>i?1:-1;else for(r=a=0;r<n;r++)if(e[r]!=t[r]){a=e[r]>t[r]?1:-1;break}return a}function i(e,t,n,i){for(var r=0;n--;)e[n]-=r,e[n]=(r=e[n]<t[n]?1:0)*i+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,a,o,s,l,h){var c,d,u,f,g,p,w,m,b,y,x,k,B,R,M,S,E,T,I,N,A=r.constructor,$=r.s==a.s?1:-1,D=r.d,W=a.d;if(!(D&&D[0]&&W&&W[0]))return new A(r.s&&a.s&&(D?!W||D[0]!=W[0]:W)?D&&0==D[0]||!W?0*$:$/0:NaN);for(h?(g=1,d=r.e-a.e):(h=P,d=v(r.e/(g=C))-v(a.e/g)),I=W.length,E=D.length,y=(b=new A($)).d=[],u=0;W[u]==(D[u]||0);u++);if(W[u]>(D[u]||0)&&d--,null==o?(R=o=A.precision,s=A.rounding):R=l?o+(r.e-a.e)+1:o,R<0)y.push(1),p=!0;else{if(R=R/g+2|0,u=0,1==I){for(f=0,W=W[0],R++;(u<E||f)&&R--;u++)y[u]=(M=f*h+(D[u]||0))/W|0,f=M%W|0;p=f||u<E}else{for((f=h/(W[0]+1)|0)>1&&(W=e(W,f,h),D=e(D,f,h),I=W.length,E=D.length),S=I,k=(x=D.slice(0,I)).length;k<I;)x[k++]=0;(N=W.slice()).unshift(0),T=W[0],W[1]>=h/2&&++T;do{f=0,(c=t(W,x,I,k))<0?(B=x[0],I!=k&&(B=B*h+(x[1]||0)),(f=B/T|0)>1?(f>=h&&(f=h-1),1==(c=t(w=e(W,f,h),x,m=w.length,k=x.length))&&(f--,i(w,I<m?N:W,m,h))):(0==f&&(c=f=1),w=W.slice()),(m=w.length)<k&&w.unshift(0),i(x,w,k,h),-1==c&&(c=t(W,x,I,k=x.length))<1&&(f++,i(x,I<k?N:W,k,h)),k=x.length):0===c&&(f++,x=[0]),y[u++]=f,c&&x[0]?x[k++]=D[S]||0:(x=[D[S]],k=1)}while((S++<E||void 0!==x[0])&&R--);p=void 0!==x[0]}y[0]||y.shift()}if(1==g)b.e=d,n=p;else{for(u=1,f=y[0];f>=10;f/=10)u++;b.e=u+d*g-1,L(b,l?o+b.e+1:o,s,p)}return b}}();function L(e,t,n,i){var r,a,o,s,l,h,c,u,f,g=e.constructor;e:if(null!=t){if(!(u=e.d))return e;for(r=1,s=u[0];s>=10;s/=10)r++;if((a=t-r)<0)a+=C,l=(c=u[f=0])/m(10,r-(o=t)-1)%10|0;else if((f=Math.ceil((a+1)/C))>=(s=u.length)){if(!i)break e;for(;s++<=f;)u.push(0);c=l=0,r=1,o=(a%=C)-C+1}else{for(c=s=u[f],r=1;s>=10;s/=10)r++;l=(o=(a%=C)-C+r)<0?0:c/m(10,r-o-1)%10|0}if(i=i||t<0||void 0!==u[f+1]||(o<0?c:c%m(10,r-o-1)),h=n<4?(l||i)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||i||6==n&&(a>0?o>0?c/m(10,r-o):0:u[f-1])%10&1||n==(e.s<0?8:7)),t<1||!u[0])return u.length=0,h?(u[0]=m(10,(C-(t-=e.e+1)%C)%C),e.e=-t||0):u[0]=e.e=0,e;if(0==a?(u.length=f,s=1,f--):(u.length=f+1,s=m(10,C-a),u[f]=o>0?(c/m(10,r-o)%m(10,o)|0)*s:0),h)for(;;){if(0==f){for(a=1,o=u[0];o>=10;o/=10)a++;for(o=u[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,u[0]==P&&(u[0]=1));break}if(u[f]+=s,u[f]!=P)break;u[f--]=0,s=1}for(a=u.length;0===u[--a];)u.pop()}return d&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e<g.minE&&(e.e=0,e.d=[0])),e}function A(e,t,n){if(!e.isFinite())return K(e);var i,r=e.e,a=S(e.d),o=a.length;return t?(n&&(i=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+O(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):r<0?(a="0."+O(-r-1)+a,n&&(i=n-o)>0&&(a+=O(i))):r>=o?(a+=O(r+1-o),n&&(i=n-r-1)>0&&(a=a+"."+O(i))):((i=r+1)<o&&(a=a.slice(0,i)+"."+a.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(a+="."),a+=O(i))),a}function $(e,t){var n=e[0];for(t*=C;n>=10;n/=10)t++;return t}function D(e,t,n){if(t>B)throw d=!0,n&&(e.precision=n),Error(g);return L(new e(l),t,1,!0)}function W(e,t,n){if(t>R)throw Error(g);return L(new e(h),t,n,!0)}function z(e){var t=e.length-1,n=t*C+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function O(e){for(var t="";e--;)t+="0";return t}function _(e,t,n,i){var r,a=new e(1),o=Math.ceil(i/C+4);for(d=!1;;){if(n%2&&Z((a=a.times(t)).d,o)&&(r=!0),0===(n=v(n/2))){n=a.d.length-1,r&&0===a.d[n]&&++a.d[n];break}Z((t=t.times(t)).d,o)}return d=!0,a}function U(e){return 1&e.d[e.d.length-1]}function j(e,t,n){for(var i,r,a=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){a=r;break}((i=a.cmp(r))===n||0===i&&a.s===n)&&(a=r)}return a}function H(e,t){var n,i,r,a,o,s,l,h=0,c=0,u=0,f=e.constructor,g=f.rounding,p=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(d=!1,l=p):l=t,s=new f(.03125);e.e>-2;)e=e.times(s),u+=5;for(l+=i=Math.log(m(2,u))/Math.LN10*2+5|0,n=a=o=new f(1),f.precision=l;;){if(a=L(a.times(e),l,1),n=n.times(++c),S((s=o.plus(N(a,n,l,1))).d).slice(0,l)===S(o.d).slice(0,l)){for(r=u;r--;)o=L(o.times(o),l,1);if(null!=t)return f.precision=p,o;if(!(h<3&&T(o.d,l-i,g,h)))return L(o,f.precision=p,g,d=!0);f.precision=l+=10,n=a=s=new f(1),c=0,h++}o=s}}function G(e,t){var n,i,r,a,o,s,l,h,c,u,f,g=1,p=e,w=p.d,v=p.constructor,m=v.rounding,b=v.precision;if(p.s<0||!w||!w[0]||!p.e&&1==w[0]&&1==w.length)return new v(w&&!w[0]?-1/0:1!=p.s?NaN:w?0:p);if(null==t?(d=!1,c=b):c=t,v.precision=c+=10,i=(n=S(w)).charAt(0),!(Math.abs(a=p.e)<15e14))return h=D(v,c+2,b).times(a+""),p=G(new v(i+"."+n.slice(1)),c-10).plus(h),v.precision=b,null==t?L(p,b,m,d=!0):p;for(;i<7&&1!=i||1==i&&n.charAt(1)>3;)i=(n=S((p=p.times(e)).d)).charAt(0),g++;for(a=p.e,i>1?(p=new v("0."+n),a++):p=new v(i+"."+n.slice(1)),u=p,l=o=p=N(p.minus(1),p.plus(1),c,1),f=L(p.times(p),c,1),r=3;;){if(o=L(o.times(f),c,1),S((h=l.plus(N(o,new v(r),c,1))).d).slice(0,c)===S(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(D(v,c+2,b).times(a+""))),l=N(l,new v(g),c,1),null!=t)return v.precision=b,l;if(!T(l.d,c-10,m,s))return L(l,v.precision=b,m,d=!0);v.precision=c+=10,h=o=p=N(u.minus(1),u.plus(1),c,1),f=L(p.times(p),c,1),r=s=1}l=h,r+=2}}function K(e){return String(e.s*e.s/0)}function X(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;48===t.charCodeAt(i);i++);for(r=t.length;48===t.charCodeAt(r-1);--r);if(t=t.slice(i,r)){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%C,n<0&&(i+=C),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=C;i<r;)e.d.push(+t.slice(i,i+=C));t=t.slice(i),i=C-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),d&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Y(e,n){var i,r,a,o,s,l,h,c,u;if(n.indexOf("_")>-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),k.test(n))return X(e,n)}else if("Infinity"===n||"NaN"===n)return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(y.test(n))i=16,n=n.toLowerCase();else if(b.test(n))i=2;else{if(!x.test(n))throw Error(f+n);i=8}for((o=n.search(/p/i))>0?(h=+n.slice(o+1),n=n.substring(2,o)):n=n.slice(2),o=n.indexOf("."),r=e.constructor,(s=o>=0)&&(o=(l=(n=n.replace(".","")).length)-o,a=_(r,new r(i),o,2*o)),o=u=(c=I(n,i,P)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=$(c,u),e.d=c,d=!1,s&&(e=N(e,a,4*l)),h&&(e=e.times(Math.abs(h)<54?m(2,h):t.pow(2,h))),d=!0,e)}function V(e,t,n,i,r){var a,o,s,l,h=e.precision,c=Math.ceil(h/C);for(d=!1,l=n.times(n),s=new e(i);;){if(o=N(s.times(l),new e(t++*t++),h,1),s=r?i.plus(o):i.minus(o),i=N(o.times(l),new e(t++*t++),h,1),void 0!==(o=s.plus(i)).d[c]){for(a=c;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=i,i=o,o=a}return d=!0,o.d.length=c+1,o}function J(e,t){for(var n=e;--t;)n*=e;return n}function q(e,t){var n,i=t.s<0,a=W(e,e.precision,1),o=a.times(.5);if((t=t.abs()).lte(o))return r=i?4:1,t;if((n=t.divToInt(a)).isZero())r=i?3:2;else{if((t=t.minus(n.times(a))).lte(o))return r=U(n)?i?2:3:i?4:1,t;r=U(n)?i?1:4:i?3:2}return t.minus(a).abs()}function Q(e,t,i,r){var a,l,h,c,d,u,f,g,p,w=e.constructor,v=void 0!==i;if(v?(E(i,1,o),void 0===r?r=w.rounding:E(r,0,8)):(i=w.precision,r=w.rounding),e.isFinite()){for(v?(a=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):a=t,(h=(f=A(e)).indexOf("."))>=0&&(f=f.replace(".",""),(p=new w(1)).e=f.length-h,p.d=I(A(p),10,a),p.e=p.d.length),l=d=(g=I(f,10,a)).length;0==g[--d];)g.pop();if(g[0]){if(h<0?l--:((e=new w(e)).d=g,e.e=l,g=(e=N(e,p,i,r,0,a)).d,l=e.e,u=n),h=g[i],c=a/2,u=u||void 0!==g[i+1],u=r<4?(void 0!==h||u)&&(0===r||r===(e.s<0?3:2)):h>c||h===c&&(4===r||u||6===r&&1&g[i-1]||r===(e.s<0?8:7)),g.length=i,u)for(;++g[--i]>a-1;)g[i]=0,i||(++l,g.unshift(1));for(d=g.length;!g[d-1];--d);for(h=0,f="";h<d;h++)f+=s.charAt(g[h]);if(v){if(d>1)if(16==t||8==t){for(h=16==t?4:3,--d;d%h;d++)f+="0";for(d=(g=I(f,a,t)).length;!g[d-1];--d);for(h=1,f="1.";h<d;h++)f+=s.charAt(g[h])}else f=f.charAt(0)+"."+f.slice(1);f=f+(l<0?"p":"p+")+l}else if(l<0){for(;++l;)f="0"+f;f="0."+f}else if(++l>d)for(l-=d;l--;)f+="0";else l<d&&(f=f.slice(0,l)+"."+f.slice(l))}else f=v?"0p+0":"0";f=(16==t?"0x":2==t?"0b":8==t?"0o":"")+f}else f=K(e);return e.s<0?"-"+f:f}function Z(e,t){if(e.length>t)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function ne(e){return new this(e).acosh()}function ie(e,t){return new this(e).plus(t)}function re(e){return new this(e).asin()}function ae(e){return new this(e).asinh()}function oe(e){return new this(e).atan()}function se(e){return new this(e).atanh()}function le(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,a=i+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?W(this,i,r):new this(0)).s=e.s:!e.d||t.isZero()?(n=W(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,n=this.atan(N(e,t,a,1)),t=W(this,a,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(N(e,t,a,1)):(n=W(this,a,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function he(e){return new this(e).cbrt()}function ce(e){return L(e=new this(e),e.e+1,2)}function de(e,t,n){return new this(e).clamp(t,n)}function ue(e){if(!e||"object"!=typeof e)throw Error(u+"Object expected");var t,n,i,r=!0===e.defaults,s=["precision",1,o,"rounding",0,8,"toExpNeg",-a,0,"toExpPos",0,a,"maxE",0,a,"minE",-a,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=c[n]),void 0!==(i=e[n])){if(!(v(i)===i&&i>=s[t+1]&&i<=s[t+2]))throw Error(f+n+": "+i);this[n]=i}if(n="crypto",r&&(this[n]=c[n]),void 0!==(i=e[n])){if(!0!==i&&!1!==i&&0!==i&&1!==i)throw Error(f+n+": "+i);if(i){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(p);this[n]=!0}else this[n]=!1}return this}function fe(e){return new this(e).cos()}function ge(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function we(e){return new this(e).exp()}function ve(e){return L(e=new this(e),e.e+1,3)}function me(){var e,t,n=new this(0);for(d=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return d=!0,new this(1/0);n=t}return d=!0,n.sqrt()}function be(e){return e instanceof t||e&&e.toStringTag===w||!1}function ye(e){return new this(e).ln()}function xe(e,t){return new this(e).log(t)}function ke(e){return new this(e).log(2)}function Pe(e){return new this(e).log(10)}function Ce(){return j(this,arguments,-1)}function Be(){return j(this,arguments,1)}function Re(e,t){return new this(e).mod(t)}function Me(e,t){return new this(e).mul(t)}function Se(e,t){return new this(e).pow(t)}function Ee(e){var t,n,i,r,a=0,s=new this(1),l=[];if(void 0===e?e=this.precision:E(e,1,o),i=Math.ceil(e/C),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));a<i;)(r=t[a])>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=r%1e7;else{if(!crypto.randomBytes)throw Error(p);for(t=crypto.randomBytes(i*=4);a<i;)(r=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((127&t[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,a):(l.push(r%1e7),a+=4);a=i/4}else for(;a<i;)l[a++]=1e7*Math.random()|0;for(i=l[--a],e%=C,i&&e&&(r=m(10,C-e),l[a]=(i/r|0)*r);0===l[a];a--)l.pop();if(a<0)n=0,l=[0];else{for(n=-1;0===l[0];n-=C)l.shift();for(i=1,r=l[0];r>=10;r/=10)i++;i<C&&(n-=C-i)}return s.e=n,s.d=l,s}function Te(e){return L(e=new this(e),e.e+1,this.rounding)}function Ie(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ne(e){return new this(e).sin()}function Le(e){return new this(e).sinh()}function Ae(e){return new this(e).sqrt()}function $e(e,t){return new this(e).sub(t)}function De(){var e=0,t=arguments,n=new this(t[e]);for(d=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return d=!0,L(n,this.precision,this.rounding)}function We(e){return new this(e).tan()}function ze(e){return new this(e).tanh()}function Oe(e){return L(e=new this(e),e.e+1,1)}(t=function e(t){var n,i,r;function a(e){var t,n,i,r=this;if(!(r instanceof a))return new a(e);if(r.constructor=a,be(e))return r.s=e.s,void(d?!e.d||e.e>a.maxE?(r.e=NaN,r.d=null):e.e<a.minE?(r.e=0,r.d=[0]):(r.e=e.e,r.d=e.d.slice()):(r.e=e.e,r.d=e.d?e.d.slice():e.d));if("number"==(i=typeof e)){if(0===e)return r.s=1/e<0?-1:1,r.e=0,void(r.d=[0]);if(e<0?(e=-e,r.s=-1):r.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(d?t>a.maxE?(r.e=NaN,r.d=null):t<a.minE?(r.e=0,r.d=[0]):(r.e=t,r.d=[e]):(r.e=t,r.d=[e]))}return 0*e!=0?(e||(r.s=NaN),r.e=NaN,void(r.d=null)):X(r,e.toString())}if("string"===i)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),r.s=-1):(43===n&&(e=e.slice(1)),r.s=1),k.test(e)?X(r,e):Y(r,e);if("bigint"===i)return e<0?(e=-e,r.s=-1):r.s=1,X(r,e.toString());throw Error(f+e)}if(a.prototype=M,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=ue,a.clone=e,a.isDecimal=be,a.abs=ee,a.acos=te,a.acosh=ne,a.add=ie,a.asin=re,a.asinh=ae,a.atan=oe,a.atanh=se,a.atan2=le,a.cbrt=he,a.ceil=ce,a.clamp=de,a.cos=fe,a.cosh=ge,a.div=pe,a.exp=we,a.floor=ve,a.hypot=me,a.ln=ye,a.log=xe,a.log10=Pe,a.log2=ke,a.max=Ce,a.min=Be,a.mod=Re,a.mul=Me,a.pow=Se,a.random=Ee,a.round=Te,a.sign=Ie,a.sin=Ne,a.sinh=Le,a.sqrt=Ae,a.sub=$e,a.sum=De,a.tan=We,a.tanh=ze,a.trunc=Oe,void 0===t&&(t={}),t&&!0!==t.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<r.length;)t.hasOwnProperty(i=r[n++])||(t[i]=this[i]);return a.config(t),a}(c)).prototype.constructor=t,t.default=t.Decimal=t,l=new t(l),h=new t(h),F.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(M[Symbol.for("nodejs.util.inspect.custom")]=M.toString,M[Symbol.toStringTag]="Decimal"),F.exports=t):(e||(e="undefined"!=typeof self&&self&&self.self==self?self:window),i=e.Decimal,t.noConflict=function(){return e.Decimal=i,t},e.Decimal=t)}(H);const K=G.exports,X=class{constructor(n){e(this,n),this.paginationReset=t(this,"paginationReset",7),this.playerAvatarUrl=void 0,this.session=void 0,this.endpoint=void 0,this.limit=void 0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!1,this.pageLimitOptions="10,25,50",this.currencyPrecision=2,this.enableRakeback=!0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.locale=A.en,this.type=L.spendable,this.pageSetting=void 0,this.pointsWallets={},this.validWallets=[],this.isLoading=!1}switchTab(e){var t,n;this.type=e,window.postMessage({type:"PlayerElevatePointsHistorySwitchTab"},window.location.href),this.pointsWallets[e]&&!(null===(t=this.pointsWallets[e])||void 0===t?void 0:t.isLoadFailed)||this.paginationReset.emit({limit:(null===(n=this.pointsWallets[e])||void 0===n?void 0:n.pageSetting.limit)||this.limit,tableId:this.type})}getPageSettingByType(e){return this.pointsWallets[e]?this.pointsWallets[e].pageSetting:{limit:this.limit,total:0,offset:0,tableId:e,secondaryArrowsActive:this.secondaryArrowsActive,displayPageNumbers:this.displayPageNumbers,pageLimitOptions:this.pageLimitOptions||void 0}}loadWallets(e){return!this.pointsWallets[this.type]||this.pointsWallets[this.type].isLoading?z():0===this.pointsWallets[this.type].wallets.length?n("div",{class:"NoContent"},this.locale.noContent):e()}componentWillRender(){this.locale=Object.assign(Object.assign({},A.en),A[this.language])}render(){var e,t;const i=this.getPageSettingByType(this.type);return n("main",{key:"31bc0e0fec29354fa1941e7dbeb078955155092a"},n("general-styling-wrapper",{key:"ca42c2addde3b5741858eda057f162daf32daffc",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:A,translationUrl:this.translationUrl,mbSource:this.mbSource}),n("player-elevate-pointcard",{key:"aaacea16dee050ea42960b5f78ce821ae0bfcaf2",playerAvatarUrl:this.playerAvatarUrl,endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),n("div",{key:"a41847eb39948f9ebc8b511d1c0de3ac6d2fc4fa",class:"PlayerElevatePointsDetaisContainer"},[j(this.locale,this.type,i,this.language),n("div",{key:"c3987866c5039e1f94c07a3dfe5705ceaf6acf5a",class:"Tabs Row"},(this.validWallets||[]).map((e=>n("div",{class:"tab"},n("div",{class:"TabText "+(e===this.type?"active":""),onClick:this.switchTab.bind(this,e)},this.locale.tabTitle[e]),n("div",{class:"TabBorderBottom "+(e===this.type?"active":"")}))))),(null===(e=this.pointsWallets[this.type])||void 0===e?void 0:e.isLoadFailed)?n("div",{class:"ReloadMsg"},this.locale.reloadMsgWhenError,n("a",{class:"Reload",onClick:this.updateWallets},this.locale.reload)):this.loadWallets(W.bind(this,this.locale,(null===(t=this.pointsWallets[this.type])||void 0===t?void 0:t.wallets)||[],i,this.isLoading))]))}walletTypeChangedHandler(){this.pointsWallets[this.type]||this.updateWallets()}async updateWallets(){if(!this.endpoint||!this.session||"undefined"===this.session)return;this.isLoading=!0,this.setLimit(),window.postMessage({type:"PlayerElevatePointsHistoryUpdate"},window.location.href);let e=this.pointsWallets[this.type]?this.pointsWallets[this.type].pageSetting:this.getPageSettingByType(this.type);try{const t=await(async(e,t,n,i,r)=>{const a={type:n,language:t,pagination:`offset=${r.offset},limit=${r.limit}`},o=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(e+$(a.type),a);return await(async(e,t={})=>{let n;n=await fetch(e,t),n=await n.text();try{n=JSON.parse(n)}catch(e){throw console.error(e),e}return n})(o,{headers:{"x-SessionId":i}})})(this.endpoint,this.language,this.type,this.session,e),n=t.data||[];t.success?(e.total=t.total,this.type===L.rakeback&&this.formatRakebackWalletPoints(n),this.pointsWallets[this.type]=Object.assign(Object.assign({},this.pointsWallets[this.type]),{wallets:n,pageSetting:e}),this.pointsWallets=Object.assign({},this.pointsWallets)):(console.error(t),this.pointsWallets[this.type].isLoadFailed=!0)}catch(e){console.error(e),this.pointsWallets[this.type].isLoadFailed=!0}this.isLoading=!1}formatRakebackWalletPoints(e){e.forEach((e=>{const t=new K(e.points||0);e.pointAsString=t.toFixed(this.currencyPrecision,t.greaterThan(0)?K.ROUND_DOWN:K.ROUND_CEIL)}))}reloadPageByTypeHandler(e){if(e.detail.tableId==this.type){if(null!=e.detail.limit&&this.limit!=e.detail.limit)this.pointsWallets={},this.limit=e.detail.limit;else{let t=this.pointsWallets[this.type].pageSetting||this.getPageSettingByType(this.type);t.offset=e.detail.offset,this.pointsWallets[this.type].pageSetting=t}this.updateWallets()}}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}async componentWillLoad(){this.setLimit(),this.updateWallets(),this.validWallets=[L.spendable,L.loyalty,L.history],this.enableRakeback&&this.validWallets.push(L.rakeback)}static get assetsDirs(){return["static"]}static get watchers(){return{type:["walletTypeChangedHandler"],endpoint:["updateWallets"],language:["updateWallets"],session:["updateWallets"]}}};X.style=":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 .HistoryPoints{text-transform:lowercase}.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 .PowerUpInfo{background:linear-gradient(180deg, #EA9018 0%, #E0A84E 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:0.85rem;display:flex;flex-direction:row;gap:5px}.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(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const Y=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return n("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return n("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,t)=>n("div",{key:t,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return n(o,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},n("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};Y.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{v as bonus_pagination_limits,x as bonus_pagination_nav,R as general_styling_wrapper,I as player_elevate_card_data,N as player_elevate_pointcard,X as player_elevate_points_history,Y as ui_skeleton}
|
|
9
|
+
var t,n,i,r,a=9e15,o=1e9,s="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",h="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-a,maxE:a,crypto:!1},d=!0,u="[DecimalError] ",f=u+"Invalid argument: ",g=u+"Precision limit exceeded",p=u+"crypto unavailable",w="[object Decimal]",v=Math.floor,m=Math.pow,b=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,x=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,y=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,k=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,P=1e7,C=7,R=l.length-1,M=h.length-1,B={toStringTag:w};function E(e){var t,n,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,t=1;t<r;t++)(n=C-(i=e[t]+"").length)&&(a+=O(n)),a+=i;(n=C-(i=(o=e[t])+"").length)&&(a+=O(n))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}function S(e,t,n){if(e!==~~e||e<t||e>n)throw Error(f+e)}function T(e,t,n,i){var r,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=C,r=0):(r=Math.ceil((t+1)/C),t%=C),a=m(10,C-t),s=e[r]%a|0,null==i?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):o=(n<4&&s+1==a||n>3&&s+1==a/2)&&(e[r+1]/a/100|0)==m(10,t-2)-1||(s==a/2||0==s)&&!(e[r+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(i||n<4)&&9999==s||!i&&n>3&&4999==s):o=((i||n<4)&&s+1==a||!i&&n>3&&s+1==a/2)&&(e[r+1]/a/1e3|0)==m(10,t-3)-1,o}function I(e,t,n){for(var i,r,a=[0],o=0,l=e.length;o<l;){for(r=a.length;r--;)a[r]*=t;for(a[0]+=s.indexOf(e.charAt(o++)),i=0;i<a.length;i++)a[i]>n-1&&(void 0===a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),L(e)},B.ceil=function(){return L(new this.constructor(this),this.e+1,2)},B.clampedTo=B.clamp=function(e,t){var n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(f+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new i(n)},B.comparedTo=B.cmp=function(e){var t,n,i,r,a=this,o=a.d,s=(e=new a.constructor(e)).d,l=a.s,h=e.s;if(!o||!s)return l&&h?l!==h?l:o===s?0:!o^l<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?l:s[0]?-h:0;if(l!==h)return l;if(a.e!==e.e)return a.e>e.e^l<0?1:-1;for(t=0,n=(i=o.length)<(r=s.length)?i:r;t<n;++t)if(o[t]!==s[t])return o[t]>s[t]^l<0?1:-1;return i===r?0:i>r^l<0?1:-1},B.cosine=B.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(t=i.rounding,i.precision=(e=i.precision)+Math.max(n.e,n.sd())+C,i.rounding=1,n=function(e,t){var n,i,r;if(t.isZero())return t;(i=t.d.length)<32?r=(1/J(4,n=Math.ceil(i/3))).toString():(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=Y(e,1,t.times(r),new e(1));for(var a=n;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}(i,q(i,n)),i.precision=e,i.rounding=t,L(2==r||3==r?n.neg():n,e,t,!0)):new i(1):new i(NaN)},B.cubeRoot=B.cbrt=function(){var e,t,n,i,r,a,o,s,l,h,c=this,u=c.constructor;if(!c.isFinite()||c.isZero())return new u(c);for(d=!1,(a=c.s*m(c.s*c,1/3))&&Math.abs(a)!=1/0?i=new u(a.toString()):(n=E(c.d),(a=((e=c.e)-n.length+1)%3)&&(n+=1==a||-2==a?"0":"00"),a=m(n,1/3),e=v((e+1)/3)-(e%3==(e<0?-1:2)),(i=new u(n=a==1/0?"5e"+e:(n=a.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=c.s),o=(e=u.precision)+3;;)if(h=(l=(s=i).times(s).times(s)).plus(c),i=N(h.plus(c).times(s),h.plus(l),o+2,1),E(s.d).slice(0,o)===(n=E(i.d)).slice(0,o)){if("9999"!=(n=n.slice(o-3,o+1))&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(L(i,e+1,1),t=!i.times(i).times(i).eq(c));break}if(!r&&(L(s,e+1,0),s.times(s).times(s).eq(c))){i=s;break}o+=4,r=1}return d=!0,L(i,e,u.rounding,t)},B.decimalPlaces=B.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-v(this.e/C))*C,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},B.dividedBy=B.div=function(e){return N(this,new this.constructor(e))},B.dividedToIntegerBy=B.divToInt=function(e){var t=this.constructor;return L(N(this,new t(e),0,1,1),t.precision,t.rounding)},B.equals=B.eq=function(e){return 0===this.cmp(e)},B.floor=function(){return L(new this.constructor(this),this.e+1,3)},B.greaterThan=B.gt=function(e){return this.cmp(e)>0},B.greaterThanOrEqualTo=B.gte=function(e){var t=this.cmp(e);return 1==t||0===t},B.hyperbolicCosine=B.cosh=function(){var e,t,n,i,r,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;i=o.rounding,o.precision=(n=o.precision)+Math.max(a.e,a.sd())+4,o.rounding=1,(r=a.d.length)<32?t=(1/J(4,e=Math.ceil(r/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=Y(o,1,a.times(t),new o(1),!0);for(var l,h=e,c=new o(8);h--;)l=a.times(a),a=s.minus(l.times(c.minus(l.times(c))));return L(a,o.precision=n,o.rounding=i,!0)},B.hyperbolicSine=B.sinh=function(){var e,t,n,i,r=this,a=r.constructor;if(!r.isFinite()||r.isZero())return new a(r);if(n=a.rounding,a.precision=(t=a.precision)+Math.max(r.e,r.sd())+4,a.rounding=1,(i=r.d.length)<3)r=Y(a,2,r,r,!0);else{e=1.4*Math.sqrt(i),r=Y(a,2,r=r.times(1/J(5,e=e>16?16:0|e)),r,!0);for(var o,s=new a(5),l=new a(16),h=new a(20);e--;)o=r.times(r),r=r.times(s.plus(o.times(l.times(o).plus(h))))}return a.precision=t,a.rounding=n,L(r,t,n,!0)},B.hyperbolicTangent=B.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+7,i.rounding=1,N(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},B.inverseCosine=B.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),i=t.precision,r=t.rounding;return-1!==n?0===n?e.isNeg()?W(t,i,r):new t(0):new t(NaN):e.isZero()?W(t,i+4,r).times(.5):(t.precision=i+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=i,t.rounding=r,e.times(2))},B.inverseHyperbolicCosine=B.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(t=i.rounding,i.precision=(e=i.precision)+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,d=!1,n=n.times(n).minus(1).sqrt().plus(n),d=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},B.inverseHyperbolicSine=B.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,d=!1,n=n.times(n).plus(1).sqrt().plus(n),d=!0,i.precision=e,i.rounding=t,n.ln())},B.inverseHyperbolicTangent=B.atanh=function(){var e,t,n,i,r=this,a=r.constructor;return r.isFinite()?r.e>=0?new a(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=a.precision,t=a.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?L(new a(r),e,t,!0):(a.precision=n=i-r.e,r=N(r.plus(1),new a(1).minus(r),n+e,1),a.precision=e+4,a.rounding=1,r=r.ln(),a.precision=e,a.rounding=t,r.times(.5))):new a(NaN)},B.inverseSine=B.asin=function(){var e,t,n,i,r=this,a=r.constructor;return r.isZero()?new a(r):(t=r.abs().cmp(1),n=a.precision,i=a.rounding,-1!==t?0===t?((e=W(a,n+4,i).times(.5)).s=r.s,e):new a(NaN):(a.precision=n+6,a.rounding=1,r=r.div(new a(1).minus(r.times(r)).sqrt().plus(1)).atan(),a.precision=n,a.rounding=i,r.times(2)))},B.inverseTangent=B.atan=function(){var e,t,n,i,r,a,o,s,l,h=this,c=h.constructor,u=c.precision,f=c.rounding;if(h.isFinite()){if(h.isZero())return new c(h);if(h.abs().eq(1)&&u+4<=M)return(o=W(c,u+4,f).times(.25)).s=h.s,o}else{if(!h.s)return new c(NaN);if(u+4<=M)return(o=W(c,u+4,f).times(.5)).s=h.s,o}for(c.precision=s=u+10,c.rounding=1,e=n=Math.min(28,s/C+2|0);e;--e)h=h.div(h.times(h).plus(1).sqrt().plus(1));for(d=!1,t=Math.ceil(s/C),i=1,l=h.times(h),o=new c(h),r=h;-1!==e;)if(r=r.times(l),a=o.minus(r.div(i+=2)),r=r.times(l),void 0!==(o=a.plus(r.div(i+=2))).d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),d=!0,L(o,c.precision=u,c.rounding=f,!0)},B.isFinite=function(){return!!this.d},B.isInteger=B.isInt=function(){return!!this.d&&v(this.e/C)>this.d.length-2},B.isNaN=function(){return!this.s},B.isNegative=B.isNeg=function(){return this.s<0},B.isPositive=B.isPos=function(){return this.s>0},B.isZero=function(){return!!this.d&&0===this.d[0]},B.lessThan=B.lt=function(e){return this.cmp(e)<0},B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1},B.logarithm=B.log=function(e){var t,n,i,r,a,o,s,l,h=this,c=h.constructor,u=c.precision,f=c.rounding;if(null==e)e=new c(10),t=!0;else{if(n=(e=new c(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(n=h.d,h.s<0||!n||!n[0]||h.eq(1))return new c(n&&!n[0]?-1/0:1!=h.s?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(r=n[0];r%10==0;)r/=10;a=1!==r}if(d=!1,o=G(h,s=u+5),i=t?D(c,s+10):G(e,s),T((l=N(o,i,s,1)).d,r=u,f))do{if(o=G(h,s+=10),i=t?D(c,s+10):G(e,s),l=N(o,i,s,1),!a){+E(l.d).slice(r+1,r+15)+1==1e14&&(l=L(l,u+1,0));break}}while(T(l.d,r+=10,f));return d=!0,L(l,u,f)},B.minus=B.sub=function(e){var t,n,i,r,a,o,s,l,h,c,u,f,g=this,p=g.constructor;if(e=new p(e),!g.d||!e.d)return g.s&&e.s?g.d?e.s=-e.s:e=new p(e.d||g.s!==e.s?g:NaN):e=new p(NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=e.d,s=p.precision,l=p.rounding,!(h=g.d)[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!h[0])return new p(3===l?-0:0);e=new p(g)}return d?L(e,s,l):e}if(n=v(e.e/C),c=v(g.e/C),h=h.slice(),a=c-n){for((u=a<0)?(t=h,a=-a,o=f.length):(t=f,n=c,o=h.length),a>(i=Math.max(Math.ceil(s/C),o)+2)&&(a=i,t.length=1),t.reverse(),i=a;i--;)t.push(0);t.reverse()}else{for((u=(i=h.length)<(o=f.length))&&(o=i),i=0;i<o;i++)if(h[i]!=f[i]){u=h[i]<f[i];break}a=0}for(u&&(t=h,h=f,f=t,e.s=-e.s),i=f.length-(o=h.length);i>0;--i)h[o++]=0;for(i=f.length;i>a;){if(h[--i]<f[i]){for(r=i;r&&0===h[--r];)h[r]=P-1;--h[r],h[i]+=P}h[i]-=f[i]}for(;0===h[--o];)h.pop();for(;0===h[0];h.shift())--n;return h[0]?(e.d=h,e.e=A(h,n),d?L(e,s,l):e):new p(3===l?-0:0)},B.modulo=B.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?L(new i(n),i.precision,i.rounding):(d=!1,9==i.modulo?(t=N(n,e.abs(),0,3,1)).s*=e.s:t=N(n,e,0,i.modulo,1),t=t.times(e),d=!0,n.minus(t))},B.naturalExponential=B.exp=function(){return F(this)},B.naturalLogarithm=B.ln=function(){return G(this)},B.negated=B.neg=function(){var e=new this.constructor(this);return e.s=-e.s,L(e)},B.plus=B.add=function(e){var t,n,i,r,a,o,s,l,h,c,u=this,f=u.constructor;if(e=new f(e),!u.d||!e.d)return u.s&&e.s?u.d||(e=new f(e.d||u.s===e.s?u:NaN)):e=new f(NaN),e;if(u.s!=e.s)return e.s=-e.s,u.minus(e);if(c=e.d,s=f.precision,l=f.rounding,!(h=u.d)[0]||!c[0])return c[0]||(e=new f(u)),d?L(e,s,l):e;if(a=v(u.e/C),i=v(e.e/C),h=h.slice(),r=a-i){for(r<0?(n=h,r=-r,o=c.length):(n=c,i=a,o=h.length),r>(o=(a=Math.ceil(s/C))>o?a+1:o+1)&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for((o=h.length)-(r=c.length)<0&&(r=o,n=c,c=h,h=n),t=0;r;)t=(h[--r]=h[r]+c[r]+t)/P|0,h[r]%=P;for(t&&(h.unshift(t),++i),o=h.length;0==h[--o];)h.pop();return e.d=h,e.e=A(h,i),d?L(e,s,l):e},B.precision=B.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(f+e);return n.d?(t=z(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},B.round=function(){var e=this,t=e.constructor;return L(new t(e),e.e+1,t.rounding)},B.sine=B.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+Math.max(n.e,n.sd())+C,i.rounding=1,n=function(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:Y(e,2,t,t);n=1.4*Math.sqrt(i),t=Y(e,2,t=t.times(1/J(5,n=n>16?16:0|n)),t);for(var r,a=new e(5),o=new e(16),s=new e(20);n--;)r=t.times(t),t=t.times(a.plus(r.times(o.times(r).minus(s))));return t}(i,q(i,n)),i.precision=e,i.rounding=t,L(r>2?n.neg():n,e,t,!0)):new i(NaN)},B.squareRoot=B.sqrt=function(){var e,t,n,i,r,a,o=this,s=o.d,l=o.e,h=o.s,c=o.constructor;if(1!==h||!s||!s[0])return new c(!h||h<0&&(!s||s[0])?NaN:s?o:1/0);for(d=!1,0==(h=Math.sqrt(+o))||h==1/0?(((t=E(s)).length+l)%2==0&&(t+="0"),h=Math.sqrt(t),l=v((l+1)/2)-(l<0||l%2),i=new c(t=h==1/0?"5e"+l:(t=h.toExponential()).slice(0,t.indexOf("e")+1)+l)):i=new c(h.toString()),n=(l=c.precision)+3;;)if(i=(a=i).plus(N(o,a,n+2,1)).times(.5),E(a.d).slice(0,n)===(t=E(i.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(L(i,l+1,1),e=!i.times(i).eq(o));break}if(!r&&(L(a,l+1,0),a.times(a).eq(o))){i=a;break}n+=4,r=1}return d=!0,L(i,l,c.rounding,e)},B.tangent=B.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.rounding,i.precision=(e=i.precision)+10,i.rounding=1,(n=n.sin()).s=1,n=N(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,L(2==r||4==r?n.neg():n,e,t,!0)):new i(NaN)},B.times=B.mul=function(e){var t,n,i,r,a,o,s,l,h,c=this,u=c.constructor,f=c.d,g=(e=new u(e)).d;if(e.s*=c.s,!(f&&f[0]&&g&&g[0]))return new u(!e.s||f&&!f[0]&&!g||g&&!g[0]&&!f?NaN:f&&g?0*e.s:e.s/0);for(n=v(c.e/C)+v(e.e/C),(l=f.length)<(h=g.length)&&(a=f,f=g,g=a,o=l,l=h,h=o),a=[],i=o=l+h;i--;)a.push(0);for(i=h;--i>=0;){for(t=0,r=l+i;r>i;)s=a[r]+g[i]*f[r-i-1]+t,a[r--]=s%P|0,t=s/P|0;a[r]=(a[r]+t)%P|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=A(a,n),d?L(e,u.precision,u.rounding):e},B.toBinary=function(e,t){return Q(this,2,e,t)},B.toDecimalPlaces=B.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),void 0===e?n:(S(e,0,o),void 0===t?t=i.rounding:S(t,0,8),L(n,e+n.e+1,t))},B.toExponential=function(e,t){var n,i=this,r=i.constructor;return void 0===e?n=$(i,!0):(S(e,0,o),void 0===t?t=r.rounding:S(t,0,8),n=$(i=L(new r(i),e+1,t),!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},B.toFixed=function(e,t){var n,i,r=this,a=r.constructor;return void 0===e?n=$(r):(S(e,0,o),void 0===t?t=a.rounding:S(t,0,8),n=$(i=L(new a(r),e+r.e+1,t),!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},B.toFraction=function(e){var t,n,i,r,a,o,s,l,h,c,u,g,p=this,w=p.d,v=p.constructor;if(!w)return new v(p);if(h=n=new v(1),i=l=new v(0),a=(t=new v(i)).e=z(w)-p.e-1,t.d[0]=m(10,(o=a%C)<0?C+o:o),null==e)e=a>0?t:h;else{if(!(s=new v(e)).isInt()||s.lt(h))throw Error(f+s);e=s.gt(t)?a>0?t:h:s}for(d=!1,s=new v(E(w)),c=v.precision,v.precision=a=w.length*C*2;u=N(s,t,0,1,1),1!=(r=n.plus(u.times(i))).cmp(e);)n=i,i=r,h=l.plus(u.times(r=h)),l=r,t=s.minus(u.times(r=t)),s=r;return r=N(e.minus(n),i,0,1,1),l=l.plus(r.times(h)),n=n.plus(r.times(i)),l.s=h.s=p.s,g=N(h,i,a,1).minus(p).abs().cmp(N(l,n,a,1).minus(p).abs())<1?[h,i]:[l,n],v.precision=c,d=!0,g},B.toHexadecimal=B.toHex=function(e,t){return Q(this,16,e,t)},B.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),null==e){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),void 0===t?t=i.rounding:S(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(d=!1,n=N(n,e,0,t,1).times(e),d=!0,L(n)):(e.s=n.s,n=e),n},B.toNumber=function(){return+this},B.toOctal=function(e,t){return Q(this,8,e,t)},B.toPower=B.pow=function(e){var t,n,i,r,a,o,s=this,l=s.constructor,h=+(e=new l(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new l(m(+s,h));if((s=new l(s)).eq(1))return s;if(i=l.precision,a=l.rounding,e.eq(1))return L(s,i,a);if((t=v(e.e/C))>=e.d.length-1&&(n=h<0?-h:h)<=9007199254740991)return r=_(l,s,n,i),e.s<0?new l(1).div(r):L(r,i,a);if((o=s.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(t=0!=(n=m(+s,h))&&isFinite(n)?new l(n+"").e:v(h*(Math.log("0."+E(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?o/0:0):(d=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(r=F(e.times(G(s,i+n)),i)).d&&T((r=L(r,i+5,1)).d,i,a)&&+E((r=L(F(e.times(G(s,(t=i+10)+n)),t),t+5,1)).d).slice(i+1,i+15)+1==1e14&&(r=L(r,i+1,0)),r.s=o,d=!0,l.rounding=a,L(r,i,a))},B.toPrecision=function(e,t){var n,i=this,r=i.constructor;return void 0===e?n=$(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(S(e,1,o),void 0===t?t=r.rounding:S(t,0,8),n=$(i=L(new r(i),e,t),e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},B.toSignificantDigits=B.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(S(e,1,o),void 0===t?t=n.rounding:S(t,0,8)),L(new n(this),e,t)},B.toString=function(){var e=this,t=e.constructor,n=$(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},B.truncated=B.trunc=function(){return L(new this.constructor(this),this.e+1,1)},B.valueOf=B.toJSON=function(){var e=this,t=e.constructor,n=$(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var N=function(){function e(e,t,n){var i,r=0,a=e.length;for(e=e.slice();a--;)e[a]=(i=e[a]*t+r)%n|0,r=i/n|0;return r&&e.unshift(r),e}function t(e,t,n,i){var r,a;if(n!=i)a=n>i?1:-1;else for(r=a=0;r<n;r++)if(e[r]!=t[r]){a=e[r]>t[r]?1:-1;break}return a}function i(e,t,n,i){for(var r=0;n--;)e[n]-=r,e[n]=(r=e[n]<t[n]?1:0)*i+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,a,o,s,l,h){var c,d,u,f,g,p,w,m,b,x,y,k,R,M,B,E,S,T,I,N,$=r.constructor,A=r.s==a.s?1:-1,D=r.d,W=a.d;if(!(D&&D[0]&&W&&W[0]))return new $(r.s&&a.s&&(D?!W||D[0]!=W[0]:W)?D&&0==D[0]||!W?0*A:A/0:NaN);for(h?(g=1,d=r.e-a.e):(h=P,d=v(r.e/(g=C))-v(a.e/g)),I=W.length,S=D.length,x=(b=new $(A)).d=[],u=0;W[u]==(D[u]||0);u++);if(W[u]>(D[u]||0)&&d--,null==o?(M=o=$.precision,s=$.rounding):M=l?o+(r.e-a.e)+1:o,M<0)x.push(1),p=!0;else{if(M=M/g+2|0,u=0,1==I){for(f=0,W=W[0],M++;(u<S||f)&&M--;u++)x[u]=(B=f*h+(D[u]||0))/W|0,f=B%W|0;p=f||u<S}else{for((f=h/(W[0]+1)|0)>1&&(W=e(W,f,h),D=e(D,f,h),I=W.length,S=D.length),E=I,k=(y=D.slice(0,I)).length;k<I;)y[k++]=0;(N=W.slice()).unshift(0),T=W[0],W[1]>=h/2&&++T;do{f=0,(c=t(W,y,I,k))<0?(R=y[0],I!=k&&(R=R*h+(y[1]||0)),(f=R/T|0)>1?(f>=h&&(f=h-1),1==(c=t(w=e(W,f,h),y,m=w.length,k=y.length))&&(f--,i(w,I<m?N:W,m,h))):(0==f&&(c=f=1),w=W.slice()),(m=w.length)<k&&w.unshift(0),i(y,w,k,h),-1==c&&(c=t(W,y,I,k=y.length))<1&&(f++,i(y,I<k?N:W,k,h)),k=y.length):0===c&&(f++,y=[0]),x[u++]=f,c&&y[0]?y[k++]=D[E]||0:(y=[D[E]],k=1)}while((E++<S||void 0!==y[0])&&M--);p=void 0!==y[0]}x[0]||x.shift()}if(1==g)b.e=d,n=p;else{for(u=1,f=x[0];f>=10;f/=10)u++;b.e=u+d*g-1,L(b,l?o+b.e+1:o,s,p)}return b}}();function L(e,t,n,i){var r,a,o,s,l,h,c,u,f,g=e.constructor;e:if(null!=t){if(!(u=e.d))return e;for(r=1,s=u[0];s>=10;s/=10)r++;if((a=t-r)<0)a+=C,l=(c=u[f=0])/m(10,r-(o=t)-1)%10|0;else if((f=Math.ceil((a+1)/C))>=(s=u.length)){if(!i)break e;for(;s++<=f;)u.push(0);c=l=0,r=1,o=(a%=C)-C+1}else{for(c=s=u[f],r=1;s>=10;s/=10)r++;l=(o=(a%=C)-C+r)<0?0:c/m(10,r-o-1)%10|0}if(i=i||t<0||void 0!==u[f+1]||(o<0?c:c%m(10,r-o-1)),h=n<4?(l||i)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||i||6==n&&(a>0?o>0?c/m(10,r-o):0:u[f-1])%10&1||n==(e.s<0?8:7)),t<1||!u[0])return u.length=0,h?(u[0]=m(10,(C-(t-=e.e+1)%C)%C),e.e=-t||0):u[0]=e.e=0,e;if(0==a?(u.length=f,s=1,f--):(u.length=f+1,s=m(10,C-a),u[f]=o>0?(c/m(10,r-o)%m(10,o)|0)*s:0),h)for(;;){if(0==f){for(a=1,o=u[0];o>=10;o/=10)a++;for(o=u[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,u[0]==P&&(u[0]=1));break}if(u[f]+=s,u[f]!=P)break;u[f--]=0,s=1}for(a=u.length;0===u[--a];)u.pop()}return d&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e<g.minE&&(e.e=0,e.d=[0])),e}function $(e,t,n){if(!e.isFinite())return K(e);var i,r=e.e,a=E(e.d),o=a.length;return t?(n&&(i=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+O(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):r<0?(a="0."+O(-r-1)+a,n&&(i=n-o)>0&&(a+=O(i))):r>=o?(a+=O(r+1-o),n&&(i=n-r-1)>0&&(a=a+"."+O(i))):((i=r+1)<o&&(a=a.slice(0,i)+"."+a.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(a+="."),a+=O(i))),a}function A(e,t){var n=e[0];for(t*=C;n>=10;n/=10)t++;return t}function D(e,t,n){if(t>R)throw d=!0,n&&(e.precision=n),Error(g);return L(new e(l),t,1,!0)}function W(e,t,n){if(t>M)throw Error(g);return L(new e(h),t,n,!0)}function z(e){var t=e.length-1,n=t*C+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function O(e){for(var t="";e--;)t+="0";return t}function _(e,t,n,i){var r,a=new e(1),o=Math.ceil(i/C+4);for(d=!1;;){if(n%2&&Z((a=a.times(t)).d,o)&&(r=!0),0===(n=v(n/2))){n=a.d.length-1,r&&0===a.d[n]&&++a.d[n];break}Z((t=t.times(t)).d,o)}return d=!0,a}function U(e){return 1&e.d[e.d.length-1]}function j(e,t,n){for(var i,r,a=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){a=r;break}((i=a.cmp(r))===n||0===i&&a.s===n)&&(a=r)}return a}function F(e,t){var n,i,r,a,o,s,l,h=0,c=0,u=0,f=e.constructor,g=f.rounding,p=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(d=!1,l=p):l=t,s=new f(.03125);e.e>-2;)e=e.times(s),u+=5;for(l+=i=Math.log(m(2,u))/Math.LN10*2+5|0,n=a=o=new f(1),f.precision=l;;){if(a=L(a.times(e),l,1),n=n.times(++c),E((s=o.plus(N(a,n,l,1))).d).slice(0,l)===E(o.d).slice(0,l)){for(r=u;r--;)o=L(o.times(o),l,1);if(null!=t)return f.precision=p,o;if(!(h<3&&T(o.d,l-i,g,h)))return L(o,f.precision=p,g,d=!0);f.precision=l+=10,n=a=s=new f(1),c=0,h++}o=s}}function G(e,t){var n,i,r,a,o,s,l,h,c,u,f,g=1,p=e,w=p.d,v=p.constructor,m=v.rounding,b=v.precision;if(p.s<0||!w||!w[0]||!p.e&&1==w[0]&&1==w.length)return new v(w&&!w[0]?-1/0:1!=p.s?NaN:w?0:p);if(null==t?(d=!1,c=b):c=t,v.precision=c+=10,i=(n=E(w)).charAt(0),!(Math.abs(a=p.e)<15e14))return h=D(v,c+2,b).times(a+""),p=G(new v(i+"."+n.slice(1)),c-10).plus(h),v.precision=b,null==t?L(p,b,m,d=!0):p;for(;i<7&&1!=i||1==i&&n.charAt(1)>3;)i=(n=E((p=p.times(e)).d)).charAt(0),g++;for(a=p.e,i>1?(p=new v("0."+n),a++):p=new v(i+"."+n.slice(1)),u=p,l=o=p=N(p.minus(1),p.plus(1),c,1),f=L(p.times(p),c,1),r=3;;){if(o=L(o.times(f),c,1),E((h=l.plus(N(o,new v(r),c,1))).d).slice(0,c)===E(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(D(v,c+2,b).times(a+""))),l=N(l,new v(g),c,1),null!=t)return v.precision=b,l;if(!T(l.d,c-10,m,s))return L(l,v.precision=b,m,d=!0);v.precision=c+=10,h=o=p=N(u.minus(1),u.plus(1),c,1),f=L(p.times(p),c,1),r=s=1}l=h,r+=2}}function K(e){return String(e.s*e.s/0)}function X(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;48===t.charCodeAt(i);i++);for(r=t.length;48===t.charCodeAt(r-1);--r);if(t=t.slice(i,r)){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%C,n<0&&(i+=C),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=C;i<r;)e.d.push(+t.slice(i,i+=C));t=t.slice(i),i=C-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),d&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function V(e,n){var i,r,a,o,s,l,h,c,u;if(n.indexOf("_")>-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),k.test(n))return X(e,n)}else if("Infinity"===n||"NaN"===n)return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(x.test(n))i=16,n=n.toLowerCase();else if(b.test(n))i=2;else{if(!y.test(n))throw Error(f+n);i=8}for((o=n.search(/p/i))>0?(h=+n.slice(o+1),n=n.substring(2,o)):n=n.slice(2),o=n.indexOf("."),r=e.constructor,(s=o>=0)&&(o=(l=(n=n.replace(".","")).length)-o,a=_(r,new r(i),o,2*o)),o=u=(c=I(n,i,P)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=A(c,u),e.d=c,d=!1,s&&(e=N(e,a,4*l)),h&&(e=e.times(Math.abs(h)<54?m(2,h):t.pow(2,h))),d=!0,e)}function Y(e,t,n,i,r){var a,o,s,l,h=e.precision,c=Math.ceil(h/C);for(d=!1,l=n.times(n),s=new e(i);;){if(o=N(s.times(l),new e(t++*t++),h,1),s=r?i.plus(o):i.minus(o),i=N(o.times(l),new e(t++*t++),h,1),void 0!==(o=s.plus(i)).d[c]){for(a=c;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=i,i=o,o=a}return d=!0,o.d.length=c+1,o}function J(e,t){for(var n=e;--t;)n*=e;return n}function q(e,t){var n,i=t.s<0,a=W(e,e.precision,1),o=a.times(.5);if((t=t.abs()).lte(o))return r=i?4:1,t;if((n=t.divToInt(a)).isZero())r=i?3:2;else{if((t=t.minus(n.times(a))).lte(o))return r=U(n)?i?2:3:i?4:1,t;r=U(n)?i?1:4:i?3:2}return t.minus(a).abs()}function Q(e,t,i,r){var a,l,h,c,d,u,f,g,p,w=e.constructor,v=void 0!==i;if(v?(S(i,1,o),void 0===r?r=w.rounding:S(r,0,8)):(i=w.precision,r=w.rounding),e.isFinite()){for(v?(a=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):a=t,(h=(f=$(e)).indexOf("."))>=0&&(f=f.replace(".",""),(p=new w(1)).e=f.length-h,p.d=I($(p),10,a),p.e=p.d.length),l=d=(g=I(f,10,a)).length;0==g[--d];)g.pop();if(g[0]){if(h<0?l--:((e=new w(e)).d=g,e.e=l,g=(e=N(e,p,i,r,0,a)).d,l=e.e,u=n),h=g[i],c=a/2,u=u||void 0!==g[i+1],u=r<4?(void 0!==h||u)&&(0===r||r===(e.s<0?3:2)):h>c||h===c&&(4===r||u||6===r&&1&g[i-1]||r===(e.s<0?8:7)),g.length=i,u)for(;++g[--i]>a-1;)g[i]=0,i||(++l,g.unshift(1));for(d=g.length;!g[d-1];--d);for(h=0,f="";h<d;h++)f+=s.charAt(g[h]);if(v){if(d>1)if(16==t||8==t){for(h=16==t?4:3,--d;d%h;d++)f+="0";for(d=(g=I(f,a,t)).length;!g[d-1];--d);for(h=1,f="1.";h<d;h++)f+=s.charAt(g[h])}else f=f.charAt(0)+"."+f.slice(1);f=f+(l<0?"p":"p+")+l}else if(l<0){for(;++l;)f="0"+f;f="0."+f}else if(++l>d)for(l-=d;l--;)f+="0";else l<d&&(f=f.slice(0,l)+"."+f.slice(l))}else f=v?"0p+0":"0";f=(16==t?"0x":2==t?"0b":8==t?"0o":"")+f}else f=K(e);return e.s<0?"-"+f:f}function Z(e,t){if(e.length>t)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function ne(e){return new this(e).acosh()}function ie(e,t){return new this(e).plus(t)}function re(e){return new this(e).asin()}function ae(e){return new this(e).asinh()}function oe(e){return new this(e).atan()}function se(e){return new this(e).atanh()}function le(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,a=i+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?W(this,i,r):new this(0)).s=e.s:!e.d||t.isZero()?(n=W(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,n=this.atan(N(e,t,a,1)),t=W(this,a,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(N(e,t,a,1)):(n=W(this,a,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function he(e){return new this(e).cbrt()}function ce(e){return L(e=new this(e),e.e+1,2)}function de(e,t,n){return new this(e).clamp(t,n)}function ue(e){if(!e||"object"!=typeof e)throw Error(u+"Object expected");var t,n,i,r=!0===e.defaults,s=["precision",1,o,"rounding",0,8,"toExpNeg",-a,0,"toExpPos",0,a,"maxE",0,a,"minE",-a,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=c[n]),void 0!==(i=e[n])){if(!(v(i)===i&&i>=s[t+1]&&i<=s[t+2]))throw Error(f+n+": "+i);this[n]=i}if(n="crypto",r&&(this[n]=c[n]),void 0!==(i=e[n])){if(!0!==i&&!1!==i&&0!==i&&1!==i)throw Error(f+n+": "+i);if(i){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(p);this[n]=!0}else this[n]=!1}return this}function fe(e){return new this(e).cos()}function ge(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function we(e){return new this(e).exp()}function ve(e){return L(e=new this(e),e.e+1,3)}function me(){var e,t,n=new this(0);for(d=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return d=!0,new this(1/0);n=t}return d=!0,n.sqrt()}function be(e){return e instanceof t||e&&e.toStringTag===w||!1}function xe(e){return new this(e).ln()}function ye(e,t){return new this(e).log(t)}function ke(e){return new this(e).log(2)}function Pe(e){return new this(e).log(10)}function Ce(){return j(this,arguments,-1)}function Re(){return j(this,arguments,1)}function Me(e,t){return new this(e).mod(t)}function Be(e,t){return new this(e).mul(t)}function Ee(e,t){return new this(e).pow(t)}function Se(e){var t,n,i,r,a=0,s=new this(1),l=[];if(void 0===e?e=this.precision:S(e,1,o),i=Math.ceil(e/C),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));a<i;)(r=t[a])>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=r%1e7;else{if(!crypto.randomBytes)throw Error(p);for(t=crypto.randomBytes(i*=4);a<i;)(r=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((127&t[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,a):(l.push(r%1e7),a+=4);a=i/4}else for(;a<i;)l[a++]=1e7*Math.random()|0;for(i=l[--a],e%=C,i&&e&&(r=m(10,C-e),l[a]=(i/r|0)*r);0===l[a];a--)l.pop();if(a<0)n=0,l=[0];else{for(n=-1;0===l[0];n-=C)l.shift();for(i=1,r=l[0];r>=10;r/=10)i++;i<C&&(n-=C-i)}return s.e=n,s.d=l,s}function Te(e){return L(e=new this(e),e.e+1,this.rounding)}function Ie(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ne(e){return new this(e).sin()}function Le(e){return new this(e).sinh()}function $e(e){return new this(e).sqrt()}function Ae(e,t){return new this(e).sub(t)}function De(){var e=0,t=arguments,n=new this(t[e]);for(d=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return d=!0,L(n,this.precision,this.rounding)}function We(e){return new this(e).tan()}function ze(e){return new this(e).tanh()}function Oe(e){return L(e=new this(e),e.e+1,1)}(t=function e(t){var n,i,r;function a(e){var t,n,i,r=this;if(!(r instanceof a))return new a(e);if(r.constructor=a,be(e))return r.s=e.s,void(d?!e.d||e.e>a.maxE?(r.e=NaN,r.d=null):e.e<a.minE?(r.e=0,r.d=[0]):(r.e=e.e,r.d=e.d.slice()):(r.e=e.e,r.d=e.d?e.d.slice():e.d));if("number"==(i=typeof e)){if(0===e)return r.s=1/e<0?-1:1,r.e=0,void(r.d=[0]);if(e<0?(e=-e,r.s=-1):r.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(d?t>a.maxE?(r.e=NaN,r.d=null):t<a.minE?(r.e=0,r.d=[0]):(r.e=t,r.d=[e]):(r.e=t,r.d=[e]))}return 0*e!=0?(e||(r.s=NaN),r.e=NaN,void(r.d=null)):X(r,e.toString())}if("string"===i)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),r.s=-1):(43===n&&(e=e.slice(1)),r.s=1),k.test(e)?X(r,e):V(r,e);if("bigint"===i)return e<0?(e=-e,r.s=-1):r.s=1,X(r,e.toString());throw Error(f+e)}if(a.prototype=B,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=ue,a.clone=e,a.isDecimal=be,a.abs=ee,a.acos=te,a.acosh=ne,a.add=ie,a.asin=re,a.asinh=ae,a.atan=oe,a.atanh=se,a.atan2=le,a.cbrt=he,a.ceil=ce,a.clamp=de,a.cos=fe,a.cosh=ge,a.div=pe,a.exp=we,a.floor=ve,a.hypot=me,a.ln=xe,a.log=ye,a.log10=Pe,a.log2=ke,a.max=Ce,a.min=Re,a.mod=Me,a.mul=Be,a.pow=Ee,a.random=Se,a.round=Te,a.sign=Ie,a.sin=Ne,a.sinh=Le,a.sqrt=$e,a.sub=Ae,a.sum=De,a.tan=We,a.tanh=ze,a.trunc=Oe,void 0===t&&(t={}),t&&!0!==t.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<r.length;)t.hasOwnProperty(i=r[n++])||(t[i]=this[i]);return a.config(t),a}(c)).prototype.constructor=t,t.default=t.Decimal=t,l=new t(l),h=new t(h),H.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(B[Symbol.for("nodejs.util.inspect.custom")]=B.toString,B[Symbol.toStringTag]="Decimal"),H.exports=t):(e||(e="undefined"!=typeof self&&self&&self.self==self?self:window),i=e.Decimal,t.noConflict=function(){return e.Decimal=i,t},e.Decimal=t)}(G);const X=K.exports,V=class{constructor(n){e(this,n),this.paginationReset=t(this,"paginationReset",7),this.playerAvatarUrl=void 0,this.session=void 0,this.endpoint=void 0,this.limit=void 0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!1,this.pageLimitOptions="10,25,50",this.currencyPrecision=2,this.enableRakeback=!0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.locale=$.en,this.type=L.spendable,this.pageSetting=void 0,this.pointsWallets={},this.validWallets=[],this.isLoading=!1}switchTab(e){var t,n;this.type=e,window.postMessage({type:"PlayerElevatePointsHistorySwitchTab"},window.location.href),this.pointsWallets[e]&&!(null===(t=this.pointsWallets[e])||void 0===t?void 0:t.isLoadFailed)||this.paginationReset.emit({limit:(null===(n=this.pointsWallets[e])||void 0===n?void 0:n.pageSetting.limit)||this.limit,tableId:this.type})}getPageSettingByType(e){return this.pointsWallets[e]?this.pointsWallets[e].pageSetting:{limit:this.limit,total:0,offset:0,tableId:e,secondaryArrowsActive:this.secondaryArrowsActive,displayPageNumbers:this.displayPageNumbers,pageLimitOptions:this.pageLimitOptions||void 0}}loadWallets(e){return!this.pointsWallets[this.type]||this.pointsWallets[this.type].isLoading?O():0===this.pointsWallets[this.type].wallets.length?n("div",{class:"NoContent"},this.locale.noContent):e()}componentWillRender(){this.locale=Object.assign(Object.assign({},$.en),$[this.language])}render(){var e,t;const i=this.getPageSettingByType(this.type);return n("main",{key:"31bc0e0fec29354fa1941e7dbeb078955155092a"},n("general-styling-wrapper",{key:"ca42c2addde3b5741858eda057f162daf32daffc",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:$,translationUrl:this.translationUrl,mbSource:this.mbSource}),n("player-elevate-pointcard",{key:"aaacea16dee050ea42960b5f78ce821ae0bfcaf2",playerAvatarUrl:this.playerAvatarUrl,endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),n("div",{key:"a41847eb39948f9ebc8b511d1c0de3ac6d2fc4fa",class:"PlayerElevatePointsDetaisContainer"},[F(this.locale,this.type,i,this.language),n("div",{key:"c3987866c5039e1f94c07a3dfe5705ceaf6acf5a",class:"Tabs Row"},(this.validWallets||[]).map((e=>n("div",{class:"tab"},n("div",{class:"TabText "+(e===this.type?"active":""),onClick:this.switchTab.bind(this,e)},this.locale.tabTitle[e]),n("div",{class:"TabBorderBottom "+(e===this.type?"active":"")}))))),(null===(e=this.pointsWallets[this.type])||void 0===e?void 0:e.isLoadFailed)?n("div",{class:"ReloadMsg"},this.locale.reloadMsgWhenError,n("a",{class:"Reload",onClick:this.updateWallets},this.locale.reload)):this.loadWallets(W.bind(this,this.locale,(null===(t=this.pointsWallets[this.type])||void 0===t?void 0:t.wallets)||[],i,this.isLoading))]))}walletTypeChangedHandler(){this.pointsWallets[this.type]||this.updateWallets()}async updateWallets(){if(!this.endpoint||!this.session||"undefined"===this.session)return;this.isLoading=!0,this.setLimit(),window.postMessage({type:"PlayerElevatePointsHistoryUpdate"},window.location.href);let e=this.pointsWallets[this.type]?this.pointsWallets[this.type].pageSetting:this.getPageSettingByType(this.type);try{const t=await(async(e,t,n,i,r)=>{const a={type:n,language:t,pagination:`offset=${r.offset},limit=${r.limit}`},o=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(e+A(a.type),a);return await(async(e,t={})=>{let n;n=await fetch(e,t),n=await n.text();try{n=JSON.parse(n)}catch(e){throw console.error(e),e}return n})(o,{headers:{"x-SessionId":i}})})(this.endpoint,this.language,this.type,this.session,e),n=t.data||[];t.success?(e.total=t.total,this.type===L.rakeback&&this.formatRakebackWalletPoints(n),this.pointsWallets[this.type]=Object.assign(Object.assign({},this.pointsWallets[this.type]),{wallets:n,pageSetting:e}),this.pointsWallets=Object.assign({},this.pointsWallets)):(console.error(t),this.pointsWallets[this.type].isLoadFailed=!0)}catch(e){console.error(e),this.pointsWallets[this.type].isLoadFailed=!0}this.isLoading=!1}formatRakebackWalletPoints(e){e.forEach((e=>{const t=new X(e.points||0);e.pointAsString=t.toFixed(this.currencyPrecision,t.greaterThan(0)?X.ROUND_DOWN:X.ROUND_CEIL)}))}reloadPageByTypeHandler(e){if(e.detail.tableId==this.type){if(null!=e.detail.limit&&this.limit!=e.detail.limit)this.pointsWallets={},this.limit=e.detail.limit;else{let t=this.pointsWallets[this.type].pageSetting||this.getPageSettingByType(this.type);t.offset=e.detail.offset,this.pointsWallets[this.type].pageSetting=t}this.updateWallets()}}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}async componentWillLoad(){this.setLimit(),this.updateWallets(),this.validWallets=[L.spendable,L.loyalty,L.history],this.enableRakeback&&this.validWallets.push(L.rakeback)}static get assetsDirs(){return["static"]}static get watchers(){return{type:["walletTypeChangedHandler"],endpoint:["updateWallets"],language:["updateWallets"],session:["updateWallets"]}}};V.style=":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}@media screen and (max-width: 500px){.RecordContainer{padding:5px 0px}.RecordContainer .Row.WalletNotes{flex-direction:column;align-items:flex-start}.RecordContainer .Row.WalletNotes .PowerUpInfo{flex-direction:row;align-items:flex-start;flex-wrap:wrap;font-size:0.79rem}.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis{display:inline-flex;width:55px;cursor:pointer}.RecordContainer .Row.WalletNotes .PowerUpInfo .PowerUpID.MobEllipsis .Value{text-overflow:ellipsis;display:flow;overflow:hidden;white-space:nowrap;width:80px}}.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 .HistoryPoints{text-transform:lowercase}.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 .PowerUpInfo{background:linear-gradient(180deg, #EA9018 0%, #E0A84E 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:0.85rem;display:flex;flex-direction:row;gap:5px}.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(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const Y=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return n("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return n("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,t)=>n("div",{key:t,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return n(o,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},n("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};Y.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{v as bonus_pagination_limits,y as bonus_pagination_nav,M as general_styling_wrapper,I as player_elevate_card_data,N as player_elevate_pointcard,V as player_elevate_points_history,Y as ui_skeleton}
|