@rpg-engine/long-bow 0.8.136 → 0.8.138
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/components/DCWallet/DCTransferPanel.d.ts +6 -0
- package/dist/components/DCWallet/DCWalletModal.d.ts +4 -0
- package/dist/components/Marketplace/BuyPanel.d.ts +4 -1
- package/dist/components/Marketplace/Marketplace.d.ts +4 -1
- package/dist/components/Marketplace/MarketplaceBuyModal.d.ts +10 -0
- package/dist/components/Marketplace/MarketplaceRows.d.ts +1 -0
- package/dist/components/Store/sections/StorePacksSection.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +427 -140
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +428 -142
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DCWallet/DCHistoryPanel.tsx +130 -68
- package/src/components/DCWallet/DCTransferPanel.tsx +102 -10
- package/src/components/DCWallet/DCWalletModal.tsx +46 -7
- package/src/components/Marketplace/BuyPanel.tsx +29 -2
- package/src/components/Marketplace/Marketplace.tsx +4 -1
- package/src/components/Marketplace/MarketplaceBuyModal.tsx +230 -0
- package/src/components/Marketplace/MarketplaceRows.tsx +41 -16
- package/src/components/Store/Store.tsx +5 -1
- package/src/components/Store/sections/StorePacksSection.tsx +17 -1
- package/src/index.tsx +1 -0
|
@@ -30309,49 +30309,50 @@ var PageInfo$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30309
30309
|
var TRANSACTION_TYPE_LABELS = {
|
|
30310
30310
|
Purchase: 'Purchase',
|
|
30311
30311
|
Transfer: 'Transfer',
|
|
30312
|
-
MarketplaceSale: '
|
|
30313
|
-
MarketplacePurchase: '
|
|
30314
|
-
StorePurchase: 'Store
|
|
30312
|
+
MarketplaceSale: 'Mkt Sale',
|
|
30313
|
+
MarketplacePurchase: 'Mkt Buy',
|
|
30314
|
+
StorePurchase: 'Store',
|
|
30315
30315
|
Fee: 'Fee',
|
|
30316
30316
|
Refund: 'Refund',
|
|
30317
|
-
AdminAdjustment: 'Admin
|
|
30317
|
+
AdminAdjustment: 'Admin'
|
|
30318
|
+
};
|
|
30319
|
+
var TRANSACTION_TYPE_COLORS = {
|
|
30320
|
+
Purchase: '#22c55e',
|
|
30321
|
+
Transfer: '#60a5fa',
|
|
30322
|
+
MarketplaceSale: '#fbbf24',
|
|
30323
|
+
MarketplacePurchase: '#f97316',
|
|
30324
|
+
StorePurchase: '#a78bfa',
|
|
30325
|
+
Fee: '#ef4444',
|
|
30326
|
+
Refund: '#06b6d4',
|
|
30327
|
+
AdminAdjustment: '#9ca3af'
|
|
30318
30328
|
};
|
|
30319
30329
|
var TRANSACTION_TYPE_OPTIONS = [{
|
|
30320
|
-
id: 0,
|
|
30321
30330
|
value: '',
|
|
30322
|
-
|
|
30331
|
+
label: 'All Types'
|
|
30323
30332
|
}, {
|
|
30324
|
-
id: 1,
|
|
30325
30333
|
value: 'Purchase',
|
|
30326
|
-
|
|
30334
|
+
label: 'Purchase'
|
|
30327
30335
|
}, {
|
|
30328
|
-
id: 2,
|
|
30329
30336
|
value: 'Transfer',
|
|
30330
|
-
|
|
30337
|
+
label: 'Transfer'
|
|
30331
30338
|
}, {
|
|
30332
|
-
id: 3,
|
|
30333
30339
|
value: 'MarketplaceSale',
|
|
30334
|
-
|
|
30340
|
+
label: 'Marketplace Sale'
|
|
30335
30341
|
}, {
|
|
30336
|
-
id: 4,
|
|
30337
30342
|
value: 'MarketplacePurchase',
|
|
30338
|
-
|
|
30343
|
+
label: 'Marketplace Buy'
|
|
30339
30344
|
}, {
|
|
30340
|
-
id: 5,
|
|
30341
30345
|
value: 'StorePurchase',
|
|
30342
|
-
|
|
30346
|
+
label: 'Store Purchase'
|
|
30343
30347
|
}, {
|
|
30344
|
-
id: 6,
|
|
30345
30348
|
value: 'Fee',
|
|
30346
|
-
|
|
30349
|
+
label: 'Fee'
|
|
30347
30350
|
}, {
|
|
30348
|
-
id: 7,
|
|
30349
30351
|
value: 'Refund',
|
|
30350
|
-
|
|
30352
|
+
label: 'Refund'
|
|
30351
30353
|
}, {
|
|
30352
|
-
id: 8,
|
|
30353
30354
|
value: 'AdminAdjustment',
|
|
30354
|
-
|
|
30355
|
+
label: 'Admin Adjustment'
|
|
30355
30356
|
}];
|
|
30356
30357
|
var DCHistoryPanel = function DCHistoryPanel(_ref) {
|
|
30357
30358
|
var transactions = _ref.transactions,
|
|
@@ -30362,7 +30363,13 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
|
|
|
30362
30363
|
var _React$useState = React__default.useState(''),
|
|
30363
30364
|
selectedType = _React$useState[0],
|
|
30364
30365
|
setSelectedType = _React$useState[1];
|
|
30365
|
-
|
|
30366
|
+
// Auto-load on first mount (when History tab is opened)
|
|
30367
|
+
React__default.useEffect(function () {
|
|
30368
|
+
onRequestHistory(1);
|
|
30369
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30370
|
+
}, []);
|
|
30371
|
+
var handleTypeChange = function handleTypeChange(e) {
|
|
30372
|
+
var value = e.target.value;
|
|
30366
30373
|
setSelectedType(value);
|
|
30367
30374
|
onRequestHistory(1, value || undefined);
|
|
30368
30375
|
};
|
|
@@ -30371,22 +30378,29 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
|
|
|
30371
30378
|
};
|
|
30372
30379
|
var formatDate = function formatDate(dateStr) {
|
|
30373
30380
|
var d = new Date(dateStr);
|
|
30374
|
-
|
|
30375
|
-
return months[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
|
|
30381
|
+
return d.getMonth() + 1 + "/" + d.getDate() + "/" + String(d.getFullYear()).slice(-2);
|
|
30376
30382
|
};
|
|
30377
|
-
return React__default.createElement(PanelContainer, null, React__default.createElement(FilterRow, null, React__default.createElement(FilterLabel, null, "Filter:"), React__default.createElement(
|
|
30378
|
-
|
|
30379
|
-
onChange: handleTypeChange
|
|
30380
|
-
|
|
30381
|
-
|
|
30382
|
-
|
|
30383
|
+
return React__default.createElement(PanelContainer, null, React__default.createElement(FilterRow, null, React__default.createElement(FilterLabel, null, "Filter:"), React__default.createElement(TypeSelect, {
|
|
30384
|
+
value: selectedType,
|
|
30385
|
+
onChange: handleTypeChange
|
|
30386
|
+
}, TRANSACTION_TYPE_OPTIONS.map(function (opt) {
|
|
30387
|
+
return React__default.createElement("option", {
|
|
30388
|
+
key: opt.value,
|
|
30389
|
+
value: opt.value
|
|
30390
|
+
}, opt.label);
|
|
30391
|
+
}))), loading && React__default.createElement(LoadingRow, null, React__default.createElement(Spinner, null), React__default.createElement("span", null, "Loading...")), !loading && transactions.length === 0 && React__default.createElement(EmptyMessage, null, "No transactions found."), !loading && transactions.length > 0 && React__default.createElement(TransactionList, null, transactions.map(function (tx) {
|
|
30392
|
+
var _TRANSACTION_TYPE_LAB, _TRANSACTION_TYPE_COL, _tx$note;
|
|
30383
30393
|
var isCredit = tx.amount > 0;
|
|
30384
30394
|
var label = (_TRANSACTION_TYPE_LAB = TRANSACTION_TYPE_LABELS[tx.type]) != null ? _TRANSACTION_TYPE_LAB : tx.type;
|
|
30395
|
+
var color = (_TRANSACTION_TYPE_COL = TRANSACTION_TYPE_COLORS[tx.type]) != null ? _TRANSACTION_TYPE_COL : '#f59e0b';
|
|
30396
|
+
var subtitle = (_tx$note = tx.note) != null ? _tx$note : tx.relatedCharacterName ? tx.relatedCharacterName : '';
|
|
30385
30397
|
return React__default.createElement(TransactionRow, {
|
|
30386
30398
|
key: tx._id
|
|
30387
|
-
}, React__default.createElement(
|
|
30399
|
+
}, React__default.createElement(TxLeft, null, React__default.createElement(TxType, {
|
|
30400
|
+
"$color": color
|
|
30401
|
+
}, label), subtitle ? React__default.createElement(TxNote, null, subtitle) : null), React__default.createElement(TxRight, null, React__default.createElement(TxAmount, {
|
|
30388
30402
|
"$credit": isCredit
|
|
30389
|
-
}, isCredit ? '+' : '', tx.amount, " DC"), React__default.createElement(
|
|
30403
|
+
}, isCredit ? '+' : '', tx.amount, " DC"), React__default.createElement(TxDate, null, formatDate(tx.createdAt))));
|
|
30390
30404
|
})), totalPages > 1 && React__default.createElement(Pagination, {
|
|
30391
30405
|
currentPage: currentPage,
|
|
30392
30406
|
totalPages: totalPages,
|
|
@@ -30400,54 +30414,65 @@ var PanelContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30400
30414
|
var FilterRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
30401
30415
|
displayName: "DCHistoryPanel__FilterRow",
|
|
30402
30416
|
componentId: "sc-debjdj-1"
|
|
30403
|
-
})(["display:flex;align-items:center;gap:8px;margin-bottom:
|
|
30417
|
+
})(["display:flex;align-items:center;gap:8px;margin-bottom:2px;"]);
|
|
30404
30418
|
var FilterLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
30405
30419
|
displayName: "DCHistoryPanel__FilterLabel",
|
|
30406
30420
|
componentId: "sc-debjdj-2"
|
|
30407
|
-
})(["font-size:
|
|
30421
|
+
})(["font-size:7px;color:#f59e0b;font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
|
|
30422
|
+
var TypeSelect = /*#__PURE__*/styled__default.select.withConfig({
|
|
30423
|
+
displayName: "DCHistoryPanel__TypeSelect",
|
|
30424
|
+
componentId: "sc-debjdj-3"
|
|
30425
|
+
})(["background:rgba(0,0,0,0.7);border:1px solid rgba(245,158,11,0.4);border-radius:3px;color:#f59e0b;font-size:7px;font-family:'Press Start 2P',cursive;padding:3px 5px;cursor:pointer;outline:none;flex:1;option{background:#1a1a2e;color:#f59e0b;}&:hover{border-color:#f59e0b;}&:focus{border-color:#f59e0b;box-shadow:0 0 0 1px rgba(245,158,11,0.3);}"]);
|
|
30408
30426
|
var TransactionList = /*#__PURE__*/styled__default.div.withConfig({
|
|
30409
30427
|
displayName: "DCHistoryPanel__TransactionList",
|
|
30410
|
-
componentId: "sc-debjdj-
|
|
30411
|
-
})(["display:flex;flex-direction:column;gap:
|
|
30428
|
+
componentId: "sc-debjdj-4"
|
|
30429
|
+
})(["display:flex;flex-direction:column;gap:3px;max-height:260px;overflow-y:auto;&::-webkit-scrollbar{width:4px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.3);}&::-webkit-scrollbar-thumb{background:rgba(245,158,11,0.4);border-radius:2px;}"]);
|
|
30412
30430
|
var TransactionRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
30413
30431
|
displayName: "DCHistoryPanel__TransactionRow",
|
|
30414
|
-
componentId: "sc-debjdj-
|
|
30415
|
-
})(["background:rgba(0,0,0,0.
|
|
30432
|
+
componentId: "sc-debjdj-5"
|
|
30433
|
+
})(["background:rgba(0,0,0,0.35);border:1px solid rgba(245,158,11,0.15);border-radius:2px;padding:5px 7px;display:flex;align-items:center;gap:8px;"]);
|
|
30434
|
+
var TxLeft = /*#__PURE__*/styled__default.div.withConfig({
|
|
30435
|
+
displayName: "DCHistoryPanel__TxLeft",
|
|
30436
|
+
componentId: "sc-debjdj-6"
|
|
30437
|
+
})(["flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;"]);
|
|
30438
|
+
var TxRight = /*#__PURE__*/styled__default.div.withConfig({
|
|
30439
|
+
displayName: "DCHistoryPanel__TxRight",
|
|
30440
|
+
componentId: "sc-debjdj-7"
|
|
30441
|
+
})(["display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex-shrink:0;"]);
|
|
30416
30442
|
var TxType = /*#__PURE__*/styled__default.span.withConfig({
|
|
30417
30443
|
displayName: "DCHistoryPanel__TxType",
|
|
30418
|
-
componentId: "sc-debjdj-
|
|
30419
|
-
})(["font-size:
|
|
30444
|
+
componentId: "sc-debjdj-8"
|
|
30445
|
+
})(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;"], function (_ref2) {
|
|
30446
|
+
var $color = _ref2.$color;
|
|
30447
|
+
return $color;
|
|
30448
|
+
});
|
|
30420
30449
|
var TxAmount = /*#__PURE__*/styled__default.span.withConfig({
|
|
30421
30450
|
displayName: "DCHistoryPanel__TxAmount",
|
|
30422
|
-
componentId: "sc-debjdj-
|
|
30423
|
-
})(["font-size:
|
|
30424
|
-
var $credit =
|
|
30451
|
+
componentId: "sc-debjdj-9"
|
|
30452
|
+
})(["font-size:8px;font-family:'Press Start 2P',cursive;color:", ";white-space:nowrap;"], function (_ref3) {
|
|
30453
|
+
var $credit = _ref3.$credit;
|
|
30425
30454
|
return $credit ? uiColors.green : uiColors.red;
|
|
30426
30455
|
});
|
|
30427
30456
|
var TxNote = /*#__PURE__*/styled__default.span.withConfig({
|
|
30428
30457
|
displayName: "DCHistoryPanel__TxNote",
|
|
30429
|
-
componentId: "sc-debjdj-
|
|
30430
|
-
})(["font-size:
|
|
30458
|
+
componentId: "sc-debjdj-10"
|
|
30459
|
+
})(["font-size:6px;color:", ";font-family:'Press Start 2P',cursive;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], uiColors.lightGray);
|
|
30431
30460
|
var TxDate = /*#__PURE__*/styled__default.span.withConfig({
|
|
30432
30461
|
displayName: "DCHistoryPanel__TxDate",
|
|
30433
|
-
componentId: "sc-debjdj-
|
|
30434
|
-
})(["font-size:
|
|
30435
|
-
var TxBalance = /*#__PURE__*/styled__default.span.withConfig({
|
|
30436
|
-
displayName: "DCHistoryPanel__TxBalance",
|
|
30437
|
-
componentId: "sc-debjdj-9"
|
|
30438
|
-
})(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:1 / 3;grid-row:3;opacity:0.7;"], uiColors.white);
|
|
30462
|
+
componentId: "sc-debjdj-11"
|
|
30463
|
+
})(["font-size:6px;color:rgba(255,255,255,0.4);font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
|
|
30439
30464
|
var LoadingRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
30440
30465
|
displayName: "DCHistoryPanel__LoadingRow",
|
|
30441
|
-
componentId: "sc-debjdj-
|
|
30466
|
+
componentId: "sc-debjdj-12"
|
|
30442
30467
|
})(["display:flex;align-items:center;gap:8px;justify-content:center;padding:16px;color:", ";font-size:9px;font-family:'Press Start 2P',cursive;"], uiColors.white);
|
|
30443
30468
|
var Spinner = /*#__PURE__*/styled__default.div.withConfig({
|
|
30444
30469
|
displayName: "DCHistoryPanel__Spinner",
|
|
30445
|
-
componentId: "sc-debjdj-
|
|
30446
|
-
})(["border:3px solid rgba(255,255,255,0.2);border-radius:50%;border-top:3px solid #f59e0b;width:
|
|
30470
|
+
componentId: "sc-debjdj-13"
|
|
30471
|
+
})(["border:3px solid rgba(255,255,255,0.2);border-radius:50%;border-top:3px solid #f59e0b;width:16px;height:16px;animation:spin 0.8s linear infinite;@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}"]);
|
|
30447
30472
|
var EmptyMessage = /*#__PURE__*/styled__default.div.withConfig({
|
|
30448
30473
|
displayName: "DCHistoryPanel__EmptyMessage",
|
|
30449
|
-
componentId: "sc-debjdj-
|
|
30450
|
-
})(["font-size:
|
|
30474
|
+
componentId: "sc-debjdj-14"
|
|
30475
|
+
})(["font-size:8px;color:", ";font-family:'Press Start 2P',cursive;text-align:center;padding:20px;"], uiColors.lightGray);
|
|
30451
30476
|
|
|
30452
30477
|
// Global style to prevent body scrolling when modal is open
|
|
30453
30478
|
var GlobalStyle = /*#__PURE__*/styled.createGlobalStyle(["body{overflow:hidden;width:100%;height:100%;}"]);
|
|
@@ -30599,7 +30624,9 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
30599
30624
|
onClearTransferResult = _ref.onClearTransferResult,
|
|
30600
30625
|
characterName = _ref.characterName,
|
|
30601
30626
|
onInputFocus = _ref.onInputFocus,
|
|
30602
|
-
onInputBlur = _ref.onInputBlur
|
|
30627
|
+
onInputBlur = _ref.onInputBlur,
|
|
30628
|
+
onSearchCharacter = _ref.onSearchCharacter,
|
|
30629
|
+
searchResults = _ref.searchResults;
|
|
30603
30630
|
var _useState = React.useState(''),
|
|
30604
30631
|
recipientName = _useState[0],
|
|
30605
30632
|
setRecipientName = _useState[1];
|
|
@@ -30612,7 +30639,23 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
30612
30639
|
var _useState4 = React.useState(false),
|
|
30613
30640
|
showConfirm = _useState4[0],
|
|
30614
30641
|
setShowConfirm = _useState4[1];
|
|
30642
|
+
var _useState5 = React.useState(false),
|
|
30643
|
+
showDropdown = _useState5[0],
|
|
30644
|
+
setShowDropdown = _useState5[1];
|
|
30645
|
+
var dropdownRef = React.useRef(null);
|
|
30615
30646
|
var clearResultTimerRef = React.useRef(null);
|
|
30647
|
+
var debouncedSearch = React.useMemo(function () {
|
|
30648
|
+
return lodash.debounce(function (name) {
|
|
30649
|
+
if (name.trim().length >= 2) {
|
|
30650
|
+
onSearchCharacter == null ? void 0 : onSearchCharacter(name.trim());
|
|
30651
|
+
}
|
|
30652
|
+
}, 300);
|
|
30653
|
+
}, [onSearchCharacter]);
|
|
30654
|
+
React.useEffect(function () {
|
|
30655
|
+
return function () {
|
|
30656
|
+
debouncedSearch.cancel();
|
|
30657
|
+
};
|
|
30658
|
+
}, [debouncedSearch]);
|
|
30616
30659
|
React.useEffect(function () {
|
|
30617
30660
|
if (transferResult) {
|
|
30618
30661
|
if (clearResultTimerRef.current) {
|
|
@@ -30660,17 +30703,41 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
|
|
|
30660
30703
|
setRecipientName('');
|
|
30661
30704
|
setAmount('');
|
|
30662
30705
|
}, [recipientName, amount, onSendTransfer]);
|
|
30663
|
-
return React__default.createElement(PanelContainer$1, null, React__default.createElement(FieldLabel, null, "Recipient Character Name"), React__default.createElement(
|
|
30706
|
+
return React__default.createElement(PanelContainer$1, null, React__default.createElement(FieldLabel, null, "Recipient Character Name"), React__default.createElement(AutocompleteWrapper, {
|
|
30707
|
+
ref: dropdownRef
|
|
30708
|
+
}, React__default.createElement(StyledInput, {
|
|
30664
30709
|
type: "text",
|
|
30665
30710
|
value: recipientName,
|
|
30666
30711
|
onChange: function onChange(e) {
|
|
30667
|
-
|
|
30712
|
+
setRecipientName(e.target.value);
|
|
30713
|
+
debouncedSearch(e.target.value);
|
|
30714
|
+
setShowDropdown(true);
|
|
30715
|
+
},
|
|
30716
|
+
onFocus: function onFocus() {
|
|
30717
|
+
onInputFocus == null ? void 0 : onInputFocus();
|
|
30718
|
+
if (recipientName.trim().length >= 2 && searchResults && searchResults.length > 0) {
|
|
30719
|
+
setShowDropdown(true);
|
|
30720
|
+
}
|
|
30721
|
+
},
|
|
30722
|
+
onBlur: function onBlur() {
|
|
30723
|
+
// Delay to allow dropdown click to register
|
|
30724
|
+
setTimeout(function () {
|
|
30725
|
+
return setShowDropdown(false);
|
|
30726
|
+
}, 150);
|
|
30727
|
+
onInputBlur == null ? void 0 : onInputBlur();
|
|
30668
30728
|
},
|
|
30669
|
-
onFocus: onInputFocus,
|
|
30670
|
-
onBlur: onInputBlur,
|
|
30671
30729
|
placeholder: "Enter character name",
|
|
30672
|
-
disabled: transferLoading
|
|
30673
|
-
|
|
30730
|
+
disabled: transferLoading,
|
|
30731
|
+
autoComplete: "off"
|
|
30732
|
+
}), showDropdown && searchResults && searchResults.length > 0 && React__default.createElement(DropdownList, null, searchResults.map(function (_char) {
|
|
30733
|
+
return React__default.createElement(DropdownItem, {
|
|
30734
|
+
key: _char._id,
|
|
30735
|
+
onPointerDown: function onPointerDown() {
|
|
30736
|
+
setRecipientName(_char.name);
|
|
30737
|
+
setShowDropdown(false);
|
|
30738
|
+
}
|
|
30739
|
+
}, _char.name);
|
|
30740
|
+
}))), React__default.createElement(FieldLabel, null, "Amount (DC)"), React__default.createElement(StyledInput, {
|
|
30674
30741
|
type: "number",
|
|
30675
30742
|
min: 1,
|
|
30676
30743
|
value: amount,
|
|
@@ -30731,6 +30798,18 @@ var ErrorMessage = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30731
30798
|
displayName: "DCTransferPanel__ErrorMessage",
|
|
30732
30799
|
componentId: "sc-k1vvb1-6"
|
|
30733
30800
|
})(["font-size:9px;color:", ";font-family:'Press Start 2P',cursive;"], uiColors.red);
|
|
30801
|
+
var AutocompleteWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
30802
|
+
displayName: "DCTransferPanel__AutocompleteWrapper",
|
|
30803
|
+
componentId: "sc-k1vvb1-7"
|
|
30804
|
+
})(["position:relative;width:100%;"]);
|
|
30805
|
+
var DropdownList = /*#__PURE__*/styled__default.ul.withConfig({
|
|
30806
|
+
displayName: "DCTransferPanel__DropdownList",
|
|
30807
|
+
componentId: "sc-k1vvb1-8"
|
|
30808
|
+
})(["position:absolute;top:100%;left:0;right:0;background:rgba(10,10,30,0.95);border:1px solid #f59e0b;border-top:none;list-style:none;padding:0;margin:0;max-height:120px;overflow-y:auto;z-index:10;"]);
|
|
30809
|
+
var DropdownItem = /*#__PURE__*/styled__default.li.withConfig({
|
|
30810
|
+
displayName: "DCTransferPanel__DropdownItem",
|
|
30811
|
+
componentId: "sc-k1vvb1-9"
|
|
30812
|
+
})(["padding:6px 8px;font-size:11px;font-family:'Press Start 2P',cursive;color:", ";cursor:pointer;&:hover{background:rgba(245,158,11,0.3);}"], uiColors.white);
|
|
30734
30813
|
|
|
30735
30814
|
var DCWalletModal = function DCWalletModal(_ref) {
|
|
30736
30815
|
var _historyData$transact, _historyData$totalPag, _historyData$currentP;
|
|
@@ -30745,7 +30824,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
|
|
|
30745
30824
|
onClearTransferResult = _ref.onClearTransferResult,
|
|
30746
30825
|
characterName = _ref.characterName,
|
|
30747
30826
|
onInputFocus = _ref.onInputFocus,
|
|
30748
|
-
onInputBlur = _ref.onInputBlur
|
|
30827
|
+
onInputBlur = _ref.onInputBlur,
|
|
30828
|
+
onBuyDC = _ref.onBuyDC,
|
|
30829
|
+
onSearchCharacter = _ref.onSearchCharacter,
|
|
30830
|
+
searchResults = _ref.searchResults;
|
|
30749
30831
|
var _useState = React.useState('balance'),
|
|
30750
30832
|
activeTab = _useState[0],
|
|
30751
30833
|
setActiveTab = _useState[1];
|
|
@@ -30755,7 +30837,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
|
|
|
30755
30837
|
var tabs = [{
|
|
30756
30838
|
id: 'balance',
|
|
30757
30839
|
title: 'Balance',
|
|
30758
|
-
content: React__default.createElement(BalanceContent, null, React__default.createElement(BalanceLabel, null, "Your DC Balance"), React__default.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), React__default.createElement(
|
|
30840
|
+
content: React__default.createElement(BalanceContent, null, React__default.createElement(BalanceLabel, null, "Your DC Balance"), React__default.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), onBuyDC && React__default.createElement(BuyButton, {
|
|
30841
|
+
onPointerDown: onBuyDC,
|
|
30842
|
+
title: "Buy Definya Coins"
|
|
30843
|
+
}, React__default.createElement(fa.FaShoppingCart, null), React__default.createElement(BuyButtonLabel, null, "Buy DC")))
|
|
30759
30844
|
}, {
|
|
30760
30845
|
id: 'transfer',
|
|
30761
30846
|
title: 'Transfer',
|
|
@@ -30767,7 +30852,9 @@ var DCWalletModal = function DCWalletModal(_ref) {
|
|
|
30767
30852
|
onClearTransferResult: onClearTransferResult,
|
|
30768
30853
|
characterName: characterName,
|
|
30769
30854
|
onInputFocus: onInputFocus,
|
|
30770
|
-
onInputBlur: onInputBlur
|
|
30855
|
+
onInputBlur: onInputBlur,
|
|
30856
|
+
onSearchCharacter: onSearchCharacter,
|
|
30857
|
+
searchResults: searchResults
|
|
30771
30858
|
})
|
|
30772
30859
|
}, {
|
|
30773
30860
|
id: 'history',
|
|
@@ -30793,7 +30880,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
|
|
|
30793
30880
|
tabs: tabs,
|
|
30794
30881
|
activeTab: activeTab,
|
|
30795
30882
|
onTabChange: function onTabChange(tabId) {
|
|
30796
|
-
|
|
30883
|
+
setActiveTab(tabId);
|
|
30884
|
+
if (tabId === 'history') {
|
|
30885
|
+
onRequestHistory(1);
|
|
30886
|
+
}
|
|
30797
30887
|
},
|
|
30798
30888
|
activeTextColor: "#000000",
|
|
30799
30889
|
activeColor: "#fef08a",
|
|
@@ -30842,10 +30932,14 @@ var BalanceAmount = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30842
30932
|
displayName: "DCWalletModal__BalanceAmount",
|
|
30843
30933
|
componentId: "sc-12xy88y-9"
|
|
30844
30934
|
})(["font-family:'Press Start 2P',cursive;font-size:28px;color:#fef08a;text-shadow:2px 2px 0 #000;letter-spacing:2px;"]);
|
|
30845
|
-
var
|
|
30846
|
-
displayName: "
|
|
30935
|
+
var BuyButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
30936
|
+
displayName: "DCWalletModal__BuyButton",
|
|
30847
30937
|
componentId: "sc-12xy88y-10"
|
|
30848
|
-
})(["
|
|
30938
|
+
})(["display:flex;align-items:center;gap:8px;margin-top:8px;padding:10px 20px;background:#f59e0b;border:none;border-radius:6px;color:#000;cursor:pointer;font-size:1rem;&:hover{background:#fbbf24;}&:active{background:#d97706;}"]);
|
|
30939
|
+
var BuyButtonLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
30940
|
+
displayName: "DCWalletModal__BuyButtonLabel",
|
|
30941
|
+
componentId: "sc-12xy88y-11"
|
|
30942
|
+
})(["font-family:'Press Start 2P',cursive;font-size:8px;"]);
|
|
30849
30943
|
|
|
30850
30944
|
var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
30851
30945
|
var value = _ref.value,
|
|
@@ -35509,11 +35603,145 @@ var PagerContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
35509
35603
|
componentId: "sc-1ekmf50-1"
|
|
35510
35604
|
})(["display:flex;justify-content:center;align-items:center;gap:5px;p{margin:0;}div{color:white;}button{width:40px;height:40px;background-color:", ";border:none;border-radius:5px;color:white;:hover{background-color:", ";}:disabled{opacity:0.5;}&.active{background-color:", ";font-weight:bold;color:black;}}"], uiColors.darkGray, uiColors.lightGray, uiColors.orange);
|
|
35511
35605
|
|
|
35606
|
+
var MarketplaceBuyModal = function MarketplaceBuyModal(_ref) {
|
|
35607
|
+
var goldPrice = _ref.goldPrice,
|
|
35608
|
+
dcEquivalentPrice = _ref.dcEquivalentPrice,
|
|
35609
|
+
dcBalance = _ref.dcBalance,
|
|
35610
|
+
onConfirm = _ref.onConfirm,
|
|
35611
|
+
onClose = _ref.onClose;
|
|
35612
|
+
var _useState = React.useState('gold'),
|
|
35613
|
+
selected = _useState[0],
|
|
35614
|
+
setSelected = _useState[1];
|
|
35615
|
+
var hasSufficientDC = dcBalance >= dcEquivalentPrice;
|
|
35616
|
+
var stopPropagation = React.useCallback(function (e) {
|
|
35617
|
+
e.stopPropagation();
|
|
35618
|
+
}, []);
|
|
35619
|
+
var handleConfirm = React.useCallback(function () {
|
|
35620
|
+
onConfirm(selected);
|
|
35621
|
+
}, [selected, onConfirm]);
|
|
35622
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Overlay$4, {
|
|
35623
|
+
onPointerDown: onClose
|
|
35624
|
+
}), React__default.createElement(ModalContainer$2, null, React__default.createElement(ModalContent$2, {
|
|
35625
|
+
onClick: stopPropagation,
|
|
35626
|
+
onTouchStart: stopPropagation,
|
|
35627
|
+
onPointerDown: stopPropagation
|
|
35628
|
+
}, React__default.createElement(Header$7, null, React__default.createElement(Title$8, null, "Confirm Purchase"), React__default.createElement(CloseButton$9, {
|
|
35629
|
+
onPointerDown: onClose,
|
|
35630
|
+
"aria-label": "Close"
|
|
35631
|
+
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(Options, null, React__default.createElement(RadioOption, {
|
|
35632
|
+
"$selected": selected === 'gold',
|
|
35633
|
+
onPointerDown: function onPointerDown() {
|
|
35634
|
+
return setSelected('gold');
|
|
35635
|
+
}
|
|
35636
|
+
}, React__default.createElement(RadioCircle, {
|
|
35637
|
+
"$selected": selected === 'gold'
|
|
35638
|
+
}), React__default.createElement(OptionText, null, React__default.createElement(OptionLabel, null, "Gold"), React__default.createElement(OptionSub, null, goldPrice.toLocaleString(), " gold"))), React__default.createElement(RadioOption, {
|
|
35639
|
+
"$selected": selected === 'dc',
|
|
35640
|
+
"$disabled": !hasSufficientDC,
|
|
35641
|
+
onPointerDown: function onPointerDown() {
|
|
35642
|
+
return hasSufficientDC && setSelected('dc');
|
|
35643
|
+
}
|
|
35644
|
+
}, React__default.createElement(RadioCircle, {
|
|
35645
|
+
"$selected": selected === 'dc'
|
|
35646
|
+
}), React__default.createElement(OptionText, null, React__default.createElement(OptionLabel, {
|
|
35647
|
+
"$disabled": !hasSufficientDC
|
|
35648
|
+
}, "Definya Coin"), React__default.createElement(OptionSub, null, dcEquivalentPrice.toLocaleString(), " DC", ' ', React__default.createElement(BalanceHint, {
|
|
35649
|
+
"$insufficient": !hasSufficientDC
|
|
35650
|
+
}, "(", dcBalance.toLocaleString(), " available)"))))), React__default.createElement(ConfirmRow, null, React__default.createElement(Button, {
|
|
35651
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35652
|
+
onPointerDown: handleConfirm
|
|
35653
|
+
}, "Confirm")))));
|
|
35654
|
+
};
|
|
35655
|
+
var Overlay$4 = /*#__PURE__*/styled__default.div.withConfig({
|
|
35656
|
+
displayName: "MarketplaceBuyModal__Overlay",
|
|
35657
|
+
componentId: "sc-86ottl-0"
|
|
35658
|
+
})(["position:fixed;inset:0;background:rgba(0,0,0,0.65);z-index:1000;"]);
|
|
35659
|
+
var ModalContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
35660
|
+
displayName: "MarketplaceBuyModal__ModalContainer",
|
|
35661
|
+
componentId: "sc-86ottl-1"
|
|
35662
|
+
})(["position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1001;pointer-events:none;"]);
|
|
35663
|
+
var ModalContent$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
35664
|
+
displayName: "MarketplaceBuyModal__ModalContent",
|
|
35665
|
+
componentId: "sc-86ottl-2"
|
|
35666
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 24px;min-width:300px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:scaleIn 0.15s ease-out;@keyframes scaleIn{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}"]);
|
|
35667
|
+
var Header$7 = /*#__PURE__*/styled__default.div.withConfig({
|
|
35668
|
+
displayName: "MarketplaceBuyModal__Header",
|
|
35669
|
+
componentId: "sc-86ottl-3"
|
|
35670
|
+
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
35671
|
+
var Title$8 = /*#__PURE__*/styled__default.h3.withConfig({
|
|
35672
|
+
displayName: "MarketplaceBuyModal__Title",
|
|
35673
|
+
componentId: "sc-86ottl-4"
|
|
35674
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
35675
|
+
var CloseButton$9 = /*#__PURE__*/styled__default.button.withConfig({
|
|
35676
|
+
displayName: "MarketplaceBuyModal__CloseButton",
|
|
35677
|
+
componentId: "sc-86ottl-5"
|
|
35678
|
+
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;&:hover{color:#ffffff;}"]);
|
|
35679
|
+
var Options = /*#__PURE__*/styled__default.div.withConfig({
|
|
35680
|
+
displayName: "MarketplaceBuyModal__Options",
|
|
35681
|
+
componentId: "sc-86ottl-6"
|
|
35682
|
+
})(["display:flex;flex-direction:column;gap:8px;"]);
|
|
35683
|
+
var RadioOption = /*#__PURE__*/styled__default.div.withConfig({
|
|
35684
|
+
displayName: "MarketplaceBuyModal__RadioOption",
|
|
35685
|
+
componentId: "sc-86ottl-7"
|
|
35686
|
+
})(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:", ";opacity:", ";transition:border-color 0.15s,background 0.15s;&:hover{border-color:", ";}"], function (_ref2) {
|
|
35687
|
+
var $selected = _ref2.$selected;
|
|
35688
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
35689
|
+
}, function (_ref3) {
|
|
35690
|
+
var $selected = _ref3.$selected;
|
|
35691
|
+
return $selected ? 'rgba(245,158,11,0.1)' : 'transparent';
|
|
35692
|
+
}, function (_ref4) {
|
|
35693
|
+
var $disabled = _ref4.$disabled;
|
|
35694
|
+
return $disabled ? 'not-allowed' : 'pointer';
|
|
35695
|
+
}, function (_ref5) {
|
|
35696
|
+
var $disabled = _ref5.$disabled;
|
|
35697
|
+
return $disabled ? 0.5 : 1;
|
|
35698
|
+
}, function (_ref6) {
|
|
35699
|
+
var $disabled = _ref6.$disabled;
|
|
35700
|
+
return $disabled ? 'rgba(255,255,255,0.15)' : '#f59e0b';
|
|
35701
|
+
});
|
|
35702
|
+
var RadioCircle = /*#__PURE__*/styled__default.div.withConfig({
|
|
35703
|
+
displayName: "MarketplaceBuyModal__RadioCircle",
|
|
35704
|
+
componentId: "sc-86ottl-8"
|
|
35705
|
+
})(["width:16px;height:16px;border-radius:50%;border:2px solid ", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;&::after{content:'';width:8px;height:8px;border-radius:50%;background:#f59e0b;opacity:", ";transition:opacity 0.15s;}"], function (_ref7) {
|
|
35706
|
+
var $selected = _ref7.$selected;
|
|
35707
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
|
|
35708
|
+
}, function (_ref8) {
|
|
35709
|
+
var $selected = _ref8.$selected;
|
|
35710
|
+
return $selected ? 1 : 0;
|
|
35711
|
+
});
|
|
35712
|
+
var OptionText = /*#__PURE__*/styled__default.div.withConfig({
|
|
35713
|
+
displayName: "MarketplaceBuyModal__OptionText",
|
|
35714
|
+
componentId: "sc-86ottl-9"
|
|
35715
|
+
})(["display:flex;flex-direction:column;gap:3px;"]);
|
|
35716
|
+
var OptionLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
35717
|
+
displayName: "MarketplaceBuyModal__OptionLabel",
|
|
35718
|
+
componentId: "sc-86ottl-10"
|
|
35719
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:", ";"], function (_ref9) {
|
|
35720
|
+
var $disabled = _ref9.$disabled;
|
|
35721
|
+
return $disabled ? 'rgba(255,255,255,0.4)' : '#ffffff';
|
|
35722
|
+
});
|
|
35723
|
+
var OptionSub = /*#__PURE__*/styled__default.span.withConfig({
|
|
35724
|
+
displayName: "MarketplaceBuyModal__OptionSub",
|
|
35725
|
+
componentId: "sc-86ottl-11"
|
|
35726
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.55);"]);
|
|
35727
|
+
var BalanceHint = /*#__PURE__*/styled__default.span.withConfig({
|
|
35728
|
+
displayName: "MarketplaceBuyModal__BalanceHint",
|
|
35729
|
+
componentId: "sc-86ottl-12"
|
|
35730
|
+
})(["color:", ";"], function (_ref10) {
|
|
35731
|
+
var $insufficient = _ref10.$insufficient;
|
|
35732
|
+
return $insufficient ? '#ef4444' : 'rgba(255, 255, 255, 0.4)';
|
|
35733
|
+
});
|
|
35734
|
+
var ConfirmRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
35735
|
+
displayName: "MarketplaceBuyModal__ConfirmRow",
|
|
35736
|
+
componentId: "sc-86ottl-13"
|
|
35737
|
+
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
35738
|
+
|
|
35512
35739
|
var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
35513
35740
|
var atlasJSON = _ref.atlasJSON,
|
|
35514
35741
|
atlasIMG = _ref.atlasIMG,
|
|
35515
35742
|
item = _ref.item,
|
|
35516
35743
|
itemPrice = _ref.itemPrice,
|
|
35744
|
+
dcEquivalentPrice = _ref.dcEquivalentPrice,
|
|
35517
35745
|
equipmentSet = _ref.equipmentSet,
|
|
35518
35746
|
scale = _ref.scale,
|
|
35519
35747
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
@@ -35545,16 +35773,20 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
35545
35773
|
maxLines: 1,
|
|
35546
35774
|
maxWidth: "200px",
|
|
35547
35775
|
fontSize: "10px"
|
|
35548
|
-
}, item.name)))), React__default.createElement(Flex$1, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(GoldContainer, null, React__default.createElement(SpriteFromAtlas, {
|
|
35776
|
+
}, item.name)))), React__default.createElement(Flex$1, null, React__default.createElement(PriceContainer, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(GoldContainer, null, React__default.createElement(SpriteFromAtlas, {
|
|
35549
35777
|
atlasIMG: atlasIMG,
|
|
35550
35778
|
atlasJSON: atlasJSON,
|
|
35551
35779
|
spriteKey: "others/gold-coin-qty-5.png",
|
|
35552
35780
|
imgScale: 2
|
|
35553
35781
|
})), React__default.createElement(PriceValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
|
|
35554
35782
|
maxLines: 1,
|
|
35555
|
-
maxWidth: "
|
|
35783
|
+
maxWidth: "120px",
|
|
35556
35784
|
fontSize: "10px"
|
|
35557
|
-
}, "$", itemPrice)))), React__default.createElement(
|
|
35785
|
+
}, "$", itemPrice)))), dcEquivalentPrice !== undefined && React__default.createElement(DCPriceLabel, null, React__default.createElement(Ellipsis, {
|
|
35786
|
+
maxLines: 1,
|
|
35787
|
+
maxWidth: "80px",
|
|
35788
|
+
fontSize: "9px"
|
|
35789
|
+
}, dcEquivalentPrice, " DC"))), React__default.createElement(ButtonContainer$3, null, React__default.createElement(Button, {
|
|
35558
35790
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
35559
35791
|
disabled: disabled,
|
|
35560
35792
|
onPointerDown: function onPointerDown() {
|
|
@@ -35592,17 +35824,25 @@ var SpriteContainer$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
35592
35824
|
displayName: "MarketplaceRows__SpriteContainer",
|
|
35593
35825
|
componentId: "sc-wmpr1o-6"
|
|
35594
35826
|
})(["position:relative;left:0.5rem;"]);
|
|
35827
|
+
var PriceContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
35828
|
+
displayName: "MarketplaceRows__PriceContainer",
|
|
35829
|
+
componentId: "sc-wmpr1o-7"
|
|
35830
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;gap:2px;"]);
|
|
35831
|
+
var DCPriceLabel = /*#__PURE__*/styled__default.p.withConfig({
|
|
35832
|
+
displayName: "MarketplaceRows__DCPriceLabel",
|
|
35833
|
+
componentId: "sc-wmpr1o-8"
|
|
35834
|
+
})(["margin:0;margin-left:40px;color:#fef08a;font-size:0.7rem;"]);
|
|
35595
35835
|
var PriceValue = /*#__PURE__*/styled__default.div.withConfig({
|
|
35596
35836
|
displayName: "MarketplaceRows__PriceValue",
|
|
35597
|
-
componentId: "sc-wmpr1o-
|
|
35837
|
+
componentId: "sc-wmpr1o-9"
|
|
35598
35838
|
})(["margin-left:40px;"]);
|
|
35599
35839
|
var ButtonContainer$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
35600
35840
|
displayName: "MarketplaceRows__ButtonContainer",
|
|
35601
|
-
componentId: "sc-wmpr1o-
|
|
35841
|
+
componentId: "sc-wmpr1o-10"
|
|
35602
35842
|
})(["margin:auto;"]);
|
|
35603
35843
|
var RarityContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
35604
35844
|
displayName: "MarketplaceRows__RarityContainer",
|
|
35605
|
-
componentId: "sc-wmpr1o-
|
|
35845
|
+
componentId: "sc-wmpr1o-11"
|
|
35606
35846
|
})(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref2) {
|
|
35607
35847
|
var item = _ref2.item;
|
|
35608
35848
|
return rarityColor(item);
|
|
@@ -35673,7 +35913,11 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
35673
35913
|
characterId = _ref.characterId,
|
|
35674
35914
|
enableHotkeys = _ref.enableHotkeys,
|
|
35675
35915
|
disableHotkeys = _ref.disableHotkeys,
|
|
35676
|
-
currentPage = _ref.currentPage
|
|
35916
|
+
currentPage = _ref.currentPage,
|
|
35917
|
+
_ref$dcBalance = _ref.dcBalance,
|
|
35918
|
+
dcBalance = _ref$dcBalance === void 0 ? 0 : _ref$dcBalance,
|
|
35919
|
+
_ref$dcToGoldSwapRate = _ref.dcToGoldSwapRate,
|
|
35920
|
+
dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate;
|
|
35677
35921
|
var _useState = React.useState(''),
|
|
35678
35922
|
name = _useState[0],
|
|
35679
35923
|
setName = _useState[1];
|
|
@@ -35694,7 +35938,26 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
35694
35938
|
var _itemsContainer$curre;
|
|
35695
35939
|
(_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
|
|
35696
35940
|
}, [currentPage]);
|
|
35697
|
-
|
|
35941
|
+
var buyingItem = buyingItemId ? items.find(function (i) {
|
|
35942
|
+
return i._id === buyingItemId;
|
|
35943
|
+
}) : null;
|
|
35944
|
+
var hasDCBalance = dcBalance > 0 && dcToGoldSwapRate > 0;
|
|
35945
|
+
var getDCEquivalentPrice = function getDCEquivalentPrice(goldPrice) {
|
|
35946
|
+
return dcToGoldSwapRate > 0 ? Math.ceil(goldPrice / dcToGoldSwapRate) : 0;
|
|
35947
|
+
};
|
|
35948
|
+
return React__default.createElement(React__default.Fragment, null, buyingItemId && buyingItem && hasDCBalance && React__default.createElement(MarketplaceBuyModal, {
|
|
35949
|
+
goldPrice: buyingItem.price,
|
|
35950
|
+
dcEquivalentPrice: getDCEquivalentPrice(buyingItem.price),
|
|
35951
|
+
dcBalance: dcBalance,
|
|
35952
|
+
onClose: function onClose() {
|
|
35953
|
+
return setBuyingItemId(null);
|
|
35954
|
+
},
|
|
35955
|
+
onConfirm: function onConfirm(paymentMethod) {
|
|
35956
|
+
onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy(buyingItemId, paymentMethod);
|
|
35957
|
+
setBuyingItemId(null);
|
|
35958
|
+
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
35959
|
+
}
|
|
35960
|
+
}), buyingItemId && !hasDCBalance && React__default.createElement(ConfirmModal, {
|
|
35698
35961
|
onClose: setBuyingItemId.bind(null, null),
|
|
35699
35962
|
onConfirm: function onConfirm() {
|
|
35700
35963
|
onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy(buyingItemId);
|
|
@@ -35799,6 +36062,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
35799
36062
|
atlasJSON: atlasJSON,
|
|
35800
36063
|
item: item,
|
|
35801
36064
|
itemPrice: price,
|
|
36065
|
+
dcEquivalentPrice: dcToGoldSwapRate > 0 ? getDCEquivalentPrice(price) : undefined,
|
|
35802
36066
|
equipmentSet: equipmentSet,
|
|
35803
36067
|
onMarketPlaceItemBuy: setBuyingItemId.bind(null, _id),
|
|
35804
36068
|
disabled: owner === characterId
|
|
@@ -36172,7 +36436,7 @@ var PartyCreate = function PartyCreate(_ref) {
|
|
|
36172
36436
|
style: {
|
|
36173
36437
|
width: '100%'
|
|
36174
36438
|
}
|
|
36175
|
-
}, React__default.createElement(Title$
|
|
36439
|
+
}, React__default.createElement(Title$9, null, "Create Party"), React__default.createElement("hr", {
|
|
36176
36440
|
className: "golden"
|
|
36177
36441
|
}))), React__default.createElement("h1", null, "Type your party name"), React__default.createElement(Input, {
|
|
36178
36442
|
placeholder: "Type party name",
|
|
@@ -36195,7 +36459,7 @@ var Wrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
36195
36459
|
displayName: "PartyCreate__Wrapper",
|
|
36196
36460
|
componentId: "sc-13brop0-0"
|
|
36197
36461
|
})(["display:flex;flex-direction:column;width:100%;"]);
|
|
36198
|
-
var Title$
|
|
36462
|
+
var Title$9 = /*#__PURE__*/styled__default.h1.withConfig({
|
|
36199
36463
|
displayName: "PartyCreate__Title",
|
|
36200
36464
|
componentId: "sc-13brop0-1"
|
|
36201
36465
|
})(["font-size:0.6rem;color:", " !important;"], uiColors.yellow);
|
|
@@ -36244,7 +36508,7 @@ var PartyDashboard = function PartyDashboard(_ref) {
|
|
|
36244
36508
|
style: {
|
|
36245
36509
|
width: '100%'
|
|
36246
36510
|
}
|
|
36247
|
-
}, React__default.createElement(Title$
|
|
36511
|
+
}, React__default.createElement(Title$a, null, "Party Dashboard"), React__default.createElement(Button, {
|
|
36248
36512
|
buttonType: exports.ButtonTypes.RPGUIButton
|
|
36249
36513
|
}, "Create"), React__default.createElement("hr", {
|
|
36250
36514
|
className: "golden"
|
|
@@ -36271,7 +36535,7 @@ var RowsWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
36271
36535
|
displayName: "PartyDashboard__RowsWrapper",
|
|
36272
36536
|
componentId: "sc-16cm41r-1"
|
|
36273
36537
|
})(["overflow-y:scroll;-webkit-overflow-scrolling:touch;width:100%;height:200px;"]);
|
|
36274
|
-
var Title$
|
|
36538
|
+
var Title$a = /*#__PURE__*/styled__default.h1.withConfig({
|
|
36275
36539
|
displayName: "PartyDashboard__Title",
|
|
36276
36540
|
componentId: "sc-16cm41r-2"
|
|
36277
36541
|
})(["font-size:0.6rem;color:", " !important;"], uiColors.yellow);
|
|
@@ -36308,7 +36572,7 @@ var PartyInvite = function PartyInvite(_ref) {
|
|
|
36308
36572
|
style: {
|
|
36309
36573
|
width: '100%'
|
|
36310
36574
|
}
|
|
36311
|
-
}, React__default.createElement(Title$
|
|
36575
|
+
}, React__default.createElement(Title$b, null, "Invite for Party"), React__default.createElement("hr", {
|
|
36312
36576
|
className: "golden"
|
|
36313
36577
|
}))), React__default.createElement(RowsWrapper$1, {
|
|
36314
36578
|
className: "playersRows"
|
|
@@ -36327,7 +36591,7 @@ var Wrapper$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
36327
36591
|
displayName: "PartyInvite__Wrapper",
|
|
36328
36592
|
componentId: "sc-eu8ggt-0"
|
|
36329
36593
|
})(["display:flex;flex-direction:column;width:100%;"]);
|
|
36330
|
-
var Title$
|
|
36594
|
+
var Title$b = /*#__PURE__*/styled__default.h1.withConfig({
|
|
36331
36595
|
displayName: "PartyInvite__Title",
|
|
36332
36596
|
componentId: "sc-eu8ggt-1"
|
|
36333
36597
|
})(["font-size:0.6rem;color:", " !important;"], uiColors.yellow);
|
|
@@ -36769,7 +37033,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
36769
37033
|
onPointerDown: onRightClick
|
|
36770
37034
|
}), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
36771
37035
|
className: "drag-handler"
|
|
36772
|
-
}, React__default.createElement(Title$
|
|
37036
|
+
}, React__default.createElement(Title$c, null, React__default.createElement(Thumbnail, {
|
|
36773
37037
|
src: quests[currentIndex].thumbnail || img$8
|
|
36774
37038
|
}), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
36775
37039
|
className: "golden"
|
|
@@ -36788,7 +37052,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
36788
37052
|
}, button.title);
|
|
36789
37053
|
})))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
36790
37054
|
className: "drag-handler"
|
|
36791
|
-
}, React__default.createElement(Title$
|
|
37055
|
+
}, React__default.createElement(Title$c, null, React__default.createElement(Thumbnail, {
|
|
36792
37056
|
src: quests[0].thumbnail || img$8
|
|
36793
37057
|
}), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
36794
37058
|
className: "golden"
|
|
@@ -36835,7 +37099,7 @@ var TitleContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
36835
37099
|
displayName: "QuestInfo__TitleContainer",
|
|
36836
37100
|
componentId: "sc-1wccpiy-6"
|
|
36837
37101
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
36838
|
-
var Title$
|
|
37102
|
+
var Title$c = /*#__PURE__*/styled__default.h1.withConfig({
|
|
36839
37103
|
displayName: "QuestInfo__Title",
|
|
36840
37104
|
componentId: "sc-1wccpiy-7"
|
|
36841
37105
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -37363,7 +37627,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
37363
37627
|
cancelDrag: "#skillsDiv",
|
|
37364
37628
|
scale: scale,
|
|
37365
37629
|
width: "100%"
|
|
37366
|
-
}, onCloseButton && React__default.createElement(CloseButton$
|
|
37630
|
+
}, onCloseButton && React__default.createElement(CloseButton$a, {
|
|
37367
37631
|
onPointerDown: onCloseButton
|
|
37368
37632
|
}, "X"), React__default.createElement(SkillsContainerDiv, {
|
|
37369
37633
|
id: "skillsDiv"
|
|
@@ -37398,7 +37662,7 @@ var SkillSplitDiv = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
37398
37662
|
displayName: "SkillsContainer__SkillSplitDiv",
|
|
37399
37663
|
componentId: "sc-1g0c67q-2"
|
|
37400
37664
|
})(["width:100%;font-size:11px;hr{margin:0;margin-bottom:1rem;padding:0px;}p{margin-bottom:0px;}"]);
|
|
37401
|
-
var CloseButton$
|
|
37665
|
+
var CloseButton$a = /*#__PURE__*/styled__default.div.withConfig({
|
|
37402
37666
|
displayName: "SkillsContainer__CloseButton",
|
|
37403
37667
|
componentId: "sc-1g0c67q-3"
|
|
37404
37668
|
})(["position:absolute;top:2px;right:2px;color:white;z-index:22;font-size:1.1rem;"]);
|
|
@@ -37534,7 +37798,7 @@ var SpellInfo$1 = function SpellInfo(_ref) {
|
|
|
37534
37798
|
castingType = spell.castingType,
|
|
37535
37799
|
cooldown = spell.cooldown,
|
|
37536
37800
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
37537
|
-
return React__default.createElement(Container$F, null, React__default.createElement(Header$
|
|
37801
|
+
return React__default.createElement(Container$F, null, React__default.createElement(Header$8, null, React__default.createElement("div", null, React__default.createElement(Title$d, null, name), React__default.createElement(Type$1, null, magicWords))), React__default.createElement(Statistic$1, null, React__default.createElement("div", {
|
|
37538
37802
|
className: "label"
|
|
37539
37803
|
}, "Casting Type:"), React__default.createElement("div", {
|
|
37540
37804
|
className: "value"
|
|
@@ -37564,7 +37828,7 @@ var Container$F = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
37564
37828
|
displayName: "SpellInfo__Container",
|
|
37565
37829
|
componentId: "sc-4hbw3q-0"
|
|
37566
37830
|
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:30rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, uiColors.lightGray);
|
|
37567
|
-
var Title$
|
|
37831
|
+
var Title$d = /*#__PURE__*/styled__default.div.withConfig({
|
|
37568
37832
|
displayName: "SpellInfo__Title",
|
|
37569
37833
|
componentId: "sc-4hbw3q-1"
|
|
37570
37834
|
})(["font-size:", ";font-weight:bold;margin-bottom:0.5rem;display:flex;align-items:center;margin:0;"], uiFonts.size.medium);
|
|
@@ -37576,7 +37840,7 @@ var Description$4 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
37576
37840
|
displayName: "SpellInfo__Description",
|
|
37577
37841
|
componentId: "sc-4hbw3q-3"
|
|
37578
37842
|
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
37579
|
-
var Header$
|
|
37843
|
+
var Header$8 = /*#__PURE__*/styled__default.div.withConfig({
|
|
37580
37844
|
displayName: "SpellInfo__Header",
|
|
37581
37845
|
componentId: "sc-4hbw3q-4"
|
|
37582
37846
|
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
@@ -37792,7 +38056,7 @@ var Spell = function Spell(_ref) {
|
|
|
37792
38056
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
37793
38057
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
37794
38058
|
className: "spell"
|
|
37795
|
-
}, disabled && React__default.createElement(Overlay$
|
|
38059
|
+
}, disabled && React__default.createElement(Overlay$5, null, characterSkillLevel < requiredLevel ? "Low " + getSkillName(attribute || 'magic level') + " level" : manaCost > charMana && 'No mana'), React__default.createElement(SpellImage, null, activeCooldown && activeCooldown > 0 ? React__default.createElement("span", {
|
|
37796
38060
|
className: "cooldown"
|
|
37797
38061
|
}, activeCooldown.toFixed(activeCooldown > 10 ? 0 : 1)) : null, React__default.createElement(SpriteFromAtlas, {
|
|
37798
38062
|
atlasIMG: atlasIMG,
|
|
@@ -37801,7 +38065,7 @@ var Spell = function Spell(_ref) {
|
|
|
37801
38065
|
imgScale: IMAGE_SCALE,
|
|
37802
38066
|
containerStyle: CONTAINER_STYLE,
|
|
37803
38067
|
centered: true
|
|
37804
|
-
})), React__default.createElement(Info, null, React__default.createElement(Title$
|
|
38068
|
+
})), React__default.createElement(Info, null, React__default.createElement(Title$e, null, React__default.createElement("span", null, name), React__default.createElement("span", {
|
|
37805
38069
|
className: "spell"
|
|
37806
38070
|
}, "(", magicWords, ")")), React__default.createElement(Description$5, null, description)), React__default.createElement(Divider$1, null), React__default.createElement(Cost, null, React__default.createElement("span", null, "Mana cost:"), React__default.createElement("span", {
|
|
37807
38071
|
className: "mana"
|
|
@@ -37822,7 +38086,7 @@ var Info = /*#__PURE__*/styled__default.span.withConfig({
|
|
|
37822
38086
|
displayName: "Spell__Info",
|
|
37823
38087
|
componentId: "sc-j96fa2-2"
|
|
37824
38088
|
})(["width:0;flex:1;@media (orientation:portrait){display:none;}"]);
|
|
37825
|
-
var Title$
|
|
38089
|
+
var Title$e = /*#__PURE__*/styled__default.p.withConfig({
|
|
37826
38090
|
displayName: "Spell__Title",
|
|
37827
38091
|
componentId: "sc-j96fa2-3"
|
|
37828
38092
|
})(["display:flex;flex-wrap:wrap;align-items:center;margin-bottom:5px;margin:0;span{font-size:", " !important;font-weight:bold !important;color:", " !important;margin-right:0.5rem;}.spell{font-size:", " !important;font-weight:normal !important;color:", " !important;}"], uiFonts.size.medium, uiColors.yellow, uiFonts.size.small, uiColors.lightGray);
|
|
@@ -37838,7 +38102,7 @@ var Cost = /*#__PURE__*/styled__default.p.withConfig({
|
|
|
37838
38102
|
displayName: "Spell__Cost",
|
|
37839
38103
|
componentId: "sc-j96fa2-6"
|
|
37840
38104
|
})(["display:flex;align-items:center;flex-direction:column;gap:0.5rem;div{z-index:1;}.mana{position:relative;font-size:", ";font-weight:bold;z-index:1;&::after{position:absolute;content:'';top:0;left:0;background-color:", ";width:100%;height:100%;border-radius:50%;transform:scale(1.8);filter:blur(10px);z-index:-1;}}"], uiFonts.size.medium, uiColors.blue);
|
|
37841
|
-
var Overlay$
|
|
38105
|
+
var Overlay$5 = /*#__PURE__*/styled__default.p.withConfig({
|
|
37842
38106
|
displayName: "Spell__Overlay",
|
|
37843
38107
|
componentId: "sc-j96fa2-7"
|
|
37844
38108
|
})(["margin:0 !important;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:1rem;display:flex;justify-content:center;align-items:center;color:", ";font-size:", " !important;font-weight:bold;z-index:10;background-color:rgba(0 0 0 / 0.2);"], uiColors.yellow, uiFonts.size.large);
|
|
@@ -37887,7 +38151,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
37887
38151
|
height: "inherit",
|
|
37888
38152
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
37889
38153
|
scale: scale
|
|
37890
|
-
}, React__default.createElement(Container$J, null, React__default.createElement(Title$
|
|
38154
|
+
}, React__default.createElement(Container$J, null, React__default.createElement(Title$f, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
|
|
37891
38155
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
37892
38156
|
settingShortcutIndex: settingShortcutIndex,
|
|
37893
38157
|
shortcuts: shortcuts,
|
|
@@ -37920,7 +38184,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
37920
38184
|
}, spell)));
|
|
37921
38185
|
}))));
|
|
37922
38186
|
};
|
|
37923
|
-
var Title$
|
|
38187
|
+
var Title$f = /*#__PURE__*/styled__default.h1.withConfig({
|
|
37924
38188
|
displayName: "Spellbook__Title",
|
|
37925
38189
|
componentId: "sc-r02nfq-0"
|
|
37926
38190
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
@@ -58362,7 +58626,7 @@ var CartView = function CartView(_ref2) {
|
|
|
58362
58626
|
return _ref3.apply(this, arguments);
|
|
58363
58627
|
};
|
|
58364
58628
|
}();
|
|
58365
|
-
return React__default.createElement(Container$K, null, React__default.createElement(Header$
|
|
58629
|
+
return React__default.createElement(Container$K, null, React__default.createElement(Header$9, null, React__default.createElement(Title$g, null, "Shopping Cart"), React__default.createElement(CloseButton$b, {
|
|
58366
58630
|
onPointerDown: onClose
|
|
58367
58631
|
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(CartItems, null, cartItems.length === 0 ? React__default.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
|
|
58368
58632
|
var _cartItem$metadata, _cartItem$metadata2;
|
|
@@ -58402,15 +58666,15 @@ var Container$K = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
58402
58666
|
displayName: "CartView__Container",
|
|
58403
58667
|
componentId: "sc-ydtyl1-0"
|
|
58404
58668
|
})(["display:flex;flex-direction:column;width:100%;height:100%;gap:1.5rem;padding:1.5rem;"]);
|
|
58405
|
-
var Header$
|
|
58669
|
+
var Header$9 = /*#__PURE__*/styled__default.div.withConfig({
|
|
58406
58670
|
displayName: "CartView__Header",
|
|
58407
58671
|
componentId: "sc-ydtyl1-1"
|
|
58408
58672
|
})(["display:flex;justify-content:space-between;align-items:center;"]);
|
|
58409
|
-
var Title$
|
|
58673
|
+
var Title$g = /*#__PURE__*/styled__default.h2.withConfig({
|
|
58410
58674
|
displayName: "CartView__Title",
|
|
58411
58675
|
componentId: "sc-ydtyl1-2"
|
|
58412
58676
|
})(["font-family:'Press Start 2P',cursive;font-size:1rem;color:#ffffff;margin:0;"]);
|
|
58413
|
-
var CloseButton$
|
|
58677
|
+
var CloseButton$b = /*#__PURE__*/styled__default.div.withConfig({
|
|
58414
58678
|
displayName: "CartView__CloseButton",
|
|
58415
58679
|
componentId: "sc-ydtyl1-3"
|
|
58416
58680
|
})(["padding:0.5rem;min-width:unset;width:42px;height:42px;display:flex;font-size:1.5rem;align-items:center;color:white;justify-content:center;"]);
|
|
@@ -58892,7 +59156,7 @@ var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
|
58892
59156
|
height: 32,
|
|
58893
59157
|
imgScale: 2,
|
|
58894
59158
|
centered: true
|
|
58895
|
-
}) : React__default.createElement(DefaultIcon, null, "\uD83D\uDC64")), React__default.createElement(ItemDetails$1, null, React__default.createElement(Header$
|
|
59159
|
+
}) : React__default.createElement(DefaultIcon, null, "\uD83D\uDC64")), React__default.createElement(ItemDetails$1, null, React__default.createElement(Header$a, null, React__default.createElement(ItemName$1, null, item.name)), availableCharacters.length > 0 && currentCharacter && React__default.createElement(SelectedSkinNav, null, React__default.createElement(SelectedSkin, null, "Selected:"), React__default.createElement(SkinNavArrow, {
|
|
58896
59160
|
direction: "left",
|
|
58897
59161
|
onPointerDown: handlePreviousSkin,
|
|
58898
59162
|
size: 24
|
|
@@ -58944,7 +59208,7 @@ var SkinNavArrow = /*#__PURE__*/styled__default(SelectArrow).withConfig({
|
|
|
58944
59208
|
displayName: "StoreCharacterSkinRow__SkinNavArrow",
|
|
58945
59209
|
componentId: "sc-81xqsx-7"
|
|
58946
59210
|
})(["position:static;"]);
|
|
58947
|
-
var Header$
|
|
59211
|
+
var Header$a = /*#__PURE__*/styled__default.div.withConfig({
|
|
58948
59212
|
displayName: "StoreCharacterSkinRow__Header",
|
|
58949
59213
|
componentId: "sc-81xqsx-8"
|
|
58950
59214
|
})(["display:flex;align-items:center;gap:0.5rem;"]);
|
|
@@ -59268,7 +59532,9 @@ var usePackFiltering = function usePackFiltering(packs) {
|
|
|
59268
59532
|
var StorePacksSection = function StorePacksSection(_ref) {
|
|
59269
59533
|
var packs = _ref.packs,
|
|
59270
59534
|
onAddToCart = _ref.onAddToCart,
|
|
59271
|
-
onSelectPack = _ref.onSelectPack
|
|
59535
|
+
onSelectPack = _ref.onSelectPack,
|
|
59536
|
+
atlasJSON = _ref.atlasJSON,
|
|
59537
|
+
atlasIMG = _ref.atlasIMG;
|
|
59272
59538
|
var _usePackFiltering = usePackFiltering(packs),
|
|
59273
59539
|
searchQuery = _usePackFiltering.searchQuery,
|
|
59274
59540
|
setSearchQuery = _usePackFiltering.setSearchQuery,
|
|
@@ -59277,16 +59543,32 @@ var StorePacksSection = function StorePacksSection(_ref) {
|
|
|
59277
59543
|
if (typeof imageUrl === 'string') return imageUrl;
|
|
59278
59544
|
return imageUrl["default"] || imageUrl.src;
|
|
59279
59545
|
};
|
|
59546
|
+
var renderPackIcon = React.useCallback(function (pack) {
|
|
59547
|
+
var _atlasJSON$frames;
|
|
59548
|
+
var imgSrc = getImageSrc(pack.image);
|
|
59549
|
+
if (atlasJSON && atlasIMG && imgSrc && atlasJSON != null && (_atlasJSON$frames = atlasJSON.frames) != null && _atlasJSON$frames[imgSrc]) {
|
|
59550
|
+
return React__default.createElement(SpriteFromAtlas, {
|
|
59551
|
+
atlasJSON: atlasJSON,
|
|
59552
|
+
atlasIMG: atlasIMG,
|
|
59553
|
+
spriteKey: imgSrc,
|
|
59554
|
+
width: 40,
|
|
59555
|
+
height: 40,
|
|
59556
|
+
imgScale: 1.2,
|
|
59557
|
+
centered: true
|
|
59558
|
+
});
|
|
59559
|
+
}
|
|
59560
|
+
return React__default.createElement("img", {
|
|
59561
|
+
src: imgSrc,
|
|
59562
|
+
alt: pack.title
|
|
59563
|
+
});
|
|
59564
|
+
}, [atlasJSON, atlasIMG]);
|
|
59280
59565
|
var renderPack = React.useCallback(function (pack) {
|
|
59281
59566
|
return React__default.createElement(PackRow, {
|
|
59282
59567
|
key: pack.key,
|
|
59283
59568
|
onClick: function onClick() {
|
|
59284
59569
|
return onSelectPack == null ? void 0 : onSelectPack(pack);
|
|
59285
59570
|
}
|
|
59286
|
-
}, React__default.createElement(PackIconContainer, null, React__default.createElement("
|
|
59287
|
-
src: getImageSrc(pack.image),
|
|
59288
|
-
alt: pack.title
|
|
59289
|
-
})), React__default.createElement(PackDetails, null, React__default.createElement(PackName, null, pack.title), React__default.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React__default.createElement(PackDescription, null, pack.description)), React__default.createElement(Controls$2, null, React__default.createElement(CTAButton, {
|
|
59571
|
+
}, React__default.createElement(PackIconContainer, null, renderPackIcon(pack)), React__default.createElement(PackDetails, null, React__default.createElement(PackName, null, pack.title), React__default.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React__default.createElement(PackDescription, null, pack.description)), React__default.createElement(Controls$2, null, React__default.createElement(CTAButton, {
|
|
59290
59572
|
icon: React__default.createElement(fa.FaCartPlus, null),
|
|
59291
59573
|
label: "Add",
|
|
59292
59574
|
onClick: function onClick(e) {
|
|
@@ -59347,7 +59629,7 @@ var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
|
59347
59629
|
if (typeof imageUrl === 'string') return imageUrl;
|
|
59348
59630
|
return imageUrl["default"] || imageUrl.src;
|
|
59349
59631
|
};
|
|
59350
|
-
return React__default.createElement(Container$M, null, React__default.createElement(Header$
|
|
59632
|
+
return React__default.createElement(Container$M, null, React__default.createElement(Header$b, null, React__default.createElement(BackButton, {
|
|
59351
59633
|
onClick: onBack
|
|
59352
59634
|
}, React__default.createElement(fa.FaArrowLeft, null), React__default.createElement("span", null, "Back"))), React__default.createElement(Content$5, null, React__default.createElement(DetailsGrid, null, React__default.createElement(ItemIcon, null, React__default.createElement("img", {
|
|
59353
59635
|
src: getImageSrc(),
|
|
@@ -59365,7 +59647,7 @@ var Container$M = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
59365
59647
|
displayName: "StoreItemDetails__Container",
|
|
59366
59648
|
componentId: "sc-k3ho5z-0"
|
|
59367
59649
|
})(["display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;height:100%;"]);
|
|
59368
|
-
var Header$
|
|
59650
|
+
var Header$b = /*#__PURE__*/styled__default.div.withConfig({
|
|
59369
59651
|
displayName: "StoreItemDetails__Header",
|
|
59370
59652
|
componentId: "sc-k3ho5z-1"
|
|
59371
59653
|
})(["display:flex;align-items:center;gap:1rem;"]);
|
|
@@ -59549,18 +59831,22 @@ var Store = function Store(_ref) {
|
|
|
59549
59831
|
return pack.priceUSD >= 9.99;
|
|
59550
59832
|
}),
|
|
59551
59833
|
onAddToCart: handleAddPackToCart,
|
|
59552
|
-
onSelectPack: setSelectedPack
|
|
59834
|
+
onSelectPack: setSelectedPack,
|
|
59835
|
+
atlasJSON: atlasJSON,
|
|
59836
|
+
atlasIMG: atlasIMG
|
|
59553
59837
|
})
|
|
59554
59838
|
},
|
|
59555
59839
|
packs: {
|
|
59556
59840
|
id: 'packs',
|
|
59557
59841
|
title: packsTabLabel,
|
|
59558
59842
|
content: customPacksContent != null ? customPacksContent : React__default.createElement(StorePacksSection, {
|
|
59559
|
-
packs: packs.filter(function (pack) {
|
|
59843
|
+
packs: hidePremiumTab ? packs : packs.filter(function (pack) {
|
|
59560
59844
|
return pack.priceUSD < 9.99;
|
|
59561
59845
|
}),
|
|
59562
59846
|
onAddToCart: handleAddPackToCart,
|
|
59563
|
-
onSelectPack: setSelectedPack
|
|
59847
|
+
onSelectPack: setSelectedPack,
|
|
59848
|
+
atlasJSON: atlasJSON,
|
|
59849
|
+
atlasIMG: atlasIMG
|
|
59564
59850
|
})
|
|
59565
59851
|
},
|
|
59566
59852
|
items: {
|
|
@@ -59724,63 +60010,63 @@ var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
|
59724
60010
|
onPayWithCard();
|
|
59725
60011
|
}
|
|
59726
60012
|
}, [selected, onPayWithDC, onPayWithCard]);
|
|
59727
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Overlay$
|
|
60013
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Overlay$6, {
|
|
59728
60014
|
onPointerDown: onClose
|
|
59729
|
-
}), React__default.createElement(ModalContainer$
|
|
60015
|
+
}), React__default.createElement(ModalContainer$3, null, React__default.createElement(ModalContent$3, {
|
|
59730
60016
|
onClick: stopPropagation,
|
|
59731
60017
|
onTouchStart: stopPropagation,
|
|
59732
60018
|
onPointerDown: stopPropagation
|
|
59733
|
-
}, React__default.createElement(Header$
|
|
60019
|
+
}, React__default.createElement(Header$c, null, React__default.createElement(Title$h, null, "How would you like to pay?"), React__default.createElement(CloseButton$c, {
|
|
59734
60020
|
onPointerDown: onClose,
|
|
59735
60021
|
"aria-label": "Close"
|
|
59736
|
-
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(Options, null, React__default.createElement(RadioOption, {
|
|
60022
|
+
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(Options$1, null, React__default.createElement(RadioOption$1, {
|
|
59737
60023
|
"$selected": selected === 'card',
|
|
59738
60024
|
onPointerDown: function onPointerDown() {
|
|
59739
60025
|
return setSelected('card');
|
|
59740
60026
|
}
|
|
59741
|
-
}, React__default.createElement(RadioCircle, {
|
|
60027
|
+
}, React__default.createElement(RadioCircle$1, {
|
|
59742
60028
|
"$selected": selected === 'card'
|
|
59743
|
-
}), React__default.createElement(OptionText, null, React__default.createElement(OptionLabel, null, "Credit Card"), React__default.createElement(OptionSub, null, "Stripe secure checkout"))), React__default.createElement(RadioOption, {
|
|
60029
|
+
}), React__default.createElement(OptionText$1, null, React__default.createElement(OptionLabel$1, null, "Credit Card"), React__default.createElement(OptionSub$1, null, "Stripe secure checkout"))), React__default.createElement(RadioOption$1, {
|
|
59744
60030
|
"$selected": selected === 'dc',
|
|
59745
60031
|
onPointerDown: function onPointerDown() {
|
|
59746
60032
|
return setSelected('dc');
|
|
59747
60033
|
}
|
|
59748
|
-
}, React__default.createElement(RadioCircle, {
|
|
60034
|
+
}, React__default.createElement(RadioCircle$1, {
|
|
59749
60035
|
"$selected": selected === 'dc'
|
|
59750
|
-
}), React__default.createElement(OptionText, null, React__default.createElement(OptionLabel, null, "Definya Coin"), React__default.createElement(OptionSub, null, dcBalance.toLocaleString(), " DC available")))), React__default.createElement(ConfirmRow, null, React__default.createElement(Button, {
|
|
60036
|
+
}), React__default.createElement(OptionText$1, null, React__default.createElement(OptionLabel$1, null, "Definya Coin"), React__default.createElement(OptionSub$1, null, dcBalance.toLocaleString(), " DC available")))), React__default.createElement(ConfirmRow$1, null, React__default.createElement(Button, {
|
|
59751
60037
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
59752
60038
|
onPointerDown: handleConfirm
|
|
59753
60039
|
}, "Confirm")))));
|
|
59754
60040
|
};
|
|
59755
|
-
var Overlay$
|
|
60041
|
+
var Overlay$6 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59756
60042
|
displayName: "PaymentMethodModal__Overlay",
|
|
59757
60043
|
componentId: "sc-1dxy6lr-0"
|
|
59758
60044
|
})(["position:fixed;inset:0;background:rgba(0,0,0,0.65);z-index:1000;"]);
|
|
59759
|
-
var ModalContainer$
|
|
60045
|
+
var ModalContainer$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59760
60046
|
displayName: "PaymentMethodModal__ModalContainer",
|
|
59761
60047
|
componentId: "sc-1dxy6lr-1"
|
|
59762
60048
|
})(["position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1001;pointer-events:none;"]);
|
|
59763
|
-
var ModalContent$
|
|
60049
|
+
var ModalContent$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59764
60050
|
displayName: "PaymentMethodModal__ModalContent",
|
|
59765
60051
|
componentId: "sc-1dxy6lr-2"
|
|
59766
60052
|
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 24px;min-width:300px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:scaleIn 0.15s ease-out;@keyframes scaleIn{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}"]);
|
|
59767
|
-
var Header$
|
|
60053
|
+
var Header$c = /*#__PURE__*/styled__default.div.withConfig({
|
|
59768
60054
|
displayName: "PaymentMethodModal__Header",
|
|
59769
60055
|
componentId: "sc-1dxy6lr-3"
|
|
59770
60056
|
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
59771
|
-
var Title$
|
|
60057
|
+
var Title$h = /*#__PURE__*/styled__default.h3.withConfig({
|
|
59772
60058
|
displayName: "PaymentMethodModal__Title",
|
|
59773
60059
|
componentId: "sc-1dxy6lr-4"
|
|
59774
60060
|
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
59775
|
-
var CloseButton$
|
|
60061
|
+
var CloseButton$c = /*#__PURE__*/styled__default.button.withConfig({
|
|
59776
60062
|
displayName: "PaymentMethodModal__CloseButton",
|
|
59777
60063
|
componentId: "sc-1dxy6lr-5"
|
|
59778
60064
|
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;&:hover{color:#ffffff;}"]);
|
|
59779
|
-
var Options = /*#__PURE__*/styled__default.div.withConfig({
|
|
60065
|
+
var Options$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59780
60066
|
displayName: "PaymentMethodModal__Options",
|
|
59781
60067
|
componentId: "sc-1dxy6lr-6"
|
|
59782
60068
|
})(["display:flex;flex-direction:column;gap:8px;"]);
|
|
59783
|
-
var RadioOption = /*#__PURE__*/styled__default.div.withConfig({
|
|
60069
|
+
var RadioOption$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59784
60070
|
displayName: "PaymentMethodModal__RadioOption",
|
|
59785
60071
|
componentId: "sc-1dxy6lr-7"
|
|
59786
60072
|
})(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:pointer;transition:border-color 0.15s,background 0.15s;&:hover{border-color:#f59e0b;}"], function (_ref2) {
|
|
@@ -59790,7 +60076,7 @@ var RadioOption = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
59790
60076
|
var $selected = _ref3.$selected;
|
|
59791
60077
|
return $selected ? 'rgba(245,158,11,0.1)' : 'transparent';
|
|
59792
60078
|
});
|
|
59793
|
-
var RadioCircle = /*#__PURE__*/styled__default.div.withConfig({
|
|
60079
|
+
var RadioCircle$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59794
60080
|
displayName: "PaymentMethodModal__RadioCircle",
|
|
59795
60081
|
componentId: "sc-1dxy6lr-8"
|
|
59796
60082
|
})(["width:16px;height:16px;border-radius:50%;border:2px solid ", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;&::after{content:'';width:8px;height:8px;border-radius:50%;background:#f59e0b;opacity:", ";transition:opacity 0.15s;}"], function (_ref4) {
|
|
@@ -59800,19 +60086,19 @@ var RadioCircle = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
59800
60086
|
var $selected = _ref5.$selected;
|
|
59801
60087
|
return $selected ? 1 : 0;
|
|
59802
60088
|
});
|
|
59803
|
-
var OptionText = /*#__PURE__*/styled__default.div.withConfig({
|
|
60089
|
+
var OptionText$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59804
60090
|
displayName: "PaymentMethodModal__OptionText",
|
|
59805
60091
|
componentId: "sc-1dxy6lr-9"
|
|
59806
60092
|
})(["display:flex;flex-direction:column;gap:3px;"]);
|
|
59807
|
-
var OptionLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
60093
|
+
var OptionLabel$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
59808
60094
|
displayName: "PaymentMethodModal__OptionLabel",
|
|
59809
60095
|
componentId: "sc-1dxy6lr-10"
|
|
59810
60096
|
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
|
|
59811
|
-
var OptionSub = /*#__PURE__*/styled__default.span.withConfig({
|
|
60097
|
+
var OptionSub$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
59812
60098
|
displayName: "PaymentMethodModal__OptionSub",
|
|
59813
60099
|
componentId: "sc-1dxy6lr-11"
|
|
59814
60100
|
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.55);"]);
|
|
59815
|
-
var ConfirmRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
60101
|
+
var ConfirmRow$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59816
60102
|
displayName: "PaymentMethodModal__ConfirmRow",
|
|
59817
60103
|
componentId: "sc-1dxy6lr-12"
|
|
59818
60104
|
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
@@ -59851,7 +60137,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
59851
60137
|
return React__default.createElement(Draggable, {
|
|
59852
60138
|
scale: scale,
|
|
59853
60139
|
cancel: ".time-widget-close,.time-widget-container,.time-widget-container *"
|
|
59854
|
-
}, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$
|
|
60140
|
+
}, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$d, {
|
|
59855
60141
|
onPointerDown: onClose,
|
|
59856
60142
|
className: "time-widget-close"
|
|
59857
60143
|
}, "X"), React__default.createElement(DayNightContainer, {
|
|
@@ -59868,7 +60154,7 @@ var Time = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
59868
60154
|
displayName: "TimeWidget__Time",
|
|
59869
60155
|
componentId: "sc-1ja236h-1"
|
|
59870
60156
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
59871
|
-
var CloseButton$
|
|
60157
|
+
var CloseButton$d = /*#__PURE__*/styled__default.p.withConfig({
|
|
59872
60158
|
displayName: "TimeWidget__CloseButton",
|
|
59873
60159
|
componentId: "sc-1ja236h-2"
|
|
59874
60160
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|
|
@@ -60147,7 +60433,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
60147
60433
|
width: "500px",
|
|
60148
60434
|
cancelDrag: "#TraderContainer",
|
|
60149
60435
|
scale: scale
|
|
60150
|
-
}, React__default.createElement(Container$O, null, React__default.createElement(Title$
|
|
60436
|
+
}, React__default.createElement(Container$O, null, React__default.createElement(Title$i, null, type.charAt(0).toUpperCase() + type.slice(1), " Menu"), React__default.createElement("hr", {
|
|
60151
60437
|
className: "golden"
|
|
60152
60438
|
}), React__default.createElement(ScrollWrapper, {
|
|
60153
60439
|
id: "TraderContainer"
|
|
@@ -60179,7 +60465,7 @@ var Container$O = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
60179
60465
|
displayName: "TradingMenu__Container",
|
|
60180
60466
|
componentId: "sc-1wjsz1l-0"
|
|
60181
60467
|
})(["width:100%;"]);
|
|
60182
|
-
var Title$
|
|
60468
|
+
var Title$i = /*#__PURE__*/styled__default.h1.withConfig({
|
|
60183
60469
|
displayName: "TradingMenu__Title",
|
|
60184
60470
|
componentId: "sc-1wjsz1l-1"
|
|
60185
60471
|
})(["font-size:0.7rem !important;color:yellow !important;text-align:center;"]);
|
|
@@ -60400,6 +60686,7 @@ exports.Leaderboard = Leaderboard;
|
|
|
60400
60686
|
exports.ListMenu = ListMenu;
|
|
60401
60687
|
exports.LoginStreakPanel = LoginStreakPanel;
|
|
60402
60688
|
exports.Marketplace = Marketplace;
|
|
60689
|
+
exports.MarketplaceBuyModal = MarketplaceBuyModal;
|
|
60403
60690
|
exports.MarketplaceRows = MarketplaceRows;
|
|
60404
60691
|
exports.MetadataCollector = MetadataCollector;
|
|
60405
60692
|
exports.NPCDialog = NPCDialog;
|