@rpg-engine/long-bow 0.8.66 → 0.8.68
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/Character/SkinSelectionGrid.d.ts +11 -0
- package/dist/components/Store/CartView.d.ts +1 -0
- package/dist/components/Store/MetadataCollector.d.ts +9 -0
- package/dist/components/Store/Store.d.ts +13 -1
- package/dist/components/Store/StoreCharacterSkinRow.d.ts +11 -0
- package/dist/components/Store/StoreItemRow.d.ts +1 -1
- package/dist/components/Store/hooks/useStoreCart.d.ts +6 -2
- package/dist/components/Store/hooks/useStoreMetadata.d.ts +15 -0
- package/dist/components/Store/sections/StoreItemsSection.d.ts +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/long-bow.cjs.development.js +1581 -193
- 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 +1549 -165
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/Character/SkinSelectionGrid.stories.d.ts +1 -0
- package/dist/stories/Character/character/CharacterSkinSelectionModal.stories.d.ts +1 -5
- package/dist/stories/Features/store/MetadataCollector.stories.d.ts +1 -0
- package/package.json +2 -2
- package/src/components/Character/CharacterSkinSelectionModal.tsx +18 -71
- package/src/components/Character/SkinSelectionGrid.tsx +179 -0
- package/src/components/Store/CartView.tsx +66 -7
- package/src/components/Store/MetadataCollector.tsx +48 -0
- package/src/components/Store/Store.tsx +69 -7
- package/src/components/Store/StoreCharacterSkinRow.tsx +286 -0
- package/src/components/Store/StoreItemRow.tsx +1 -1
- package/src/components/Store/__test__/MetadataCollector.spec.tsx +228 -0
- package/src/components/Store/__test__/useStoreMetadata.spec.tsx +181 -0
- package/src/components/Store/hooks/useStoreCart.ts +89 -44
- package/src/components/Store/hooks/useStoreMetadata.ts +55 -0
- package/src/components/Store/sections/StoreItemsSection.tsx +30 -11
- package/src/index.tsx +6 -3
- package/src/stories/Character/SkinSelectionGrid.stories.tsx +106 -0
- package/src/stories/Character/character/CharacterSkinSelectionModal.stories.tsx +86 -25
- package/src/stories/Features/store/MetadataCollector.stories.tsx +94 -0
- package/src/stories/Features/store/Store.stories.tsx +103 -3
package/dist/long-bow.esm.js
CHANGED
|
@@ -2,10 +2,10 @@ import React, { useState, useEffect, Component, useRef, useCallback, useContext,
|
|
|
2
2
|
import styled, { css, keyframes, createGlobalStyle } from 'styled-components';
|
|
3
3
|
import { BeatLoader } from 'react-spinners';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, RewardType, isMobileOrTablet, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel,
|
|
5
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, RewardType, isMobileOrTablet, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel, MetadataType, PurchaseType, UserAccountTypes, PeriodOfDay } from '@rpg-engine/shared';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
8
|
-
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaChevronUp, FaChevronDown, FaReddit } from 'react-icons/fa';
|
|
8
|
+
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaShoppingCart } from 'react-icons/fa';
|
|
9
9
|
import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
|
|
10
10
|
import { IoMdContract, IoMdExpand } from 'react-icons/io';
|
|
11
11
|
import Draggable from 'react-draggable';
|
|
@@ -26111,6 +26111,104 @@ var Container$4 = /*#__PURE__*/styled.div.withConfig({
|
|
|
26111
26111
|
componentId: "sc-b34498-0"
|
|
26112
26112
|
})(["display:flex;flex-direction:column;align-items:center;image-rendering:pixelated;"]);
|
|
26113
26113
|
|
|
26114
|
+
var SkinSelectionGrid = function SkinSelectionGrid(_ref) {
|
|
26115
|
+
var availableCharacters = _ref.availableCharacters,
|
|
26116
|
+
_ref$initialSelectedS = _ref.initialSelectedSkin,
|
|
26117
|
+
initialSelectedSkin = _ref$initialSelectedS === void 0 ? '' : _ref$initialSelectedS,
|
|
26118
|
+
onChange = _ref.onChange,
|
|
26119
|
+
atlasJSON = _ref.atlasJSON,
|
|
26120
|
+
atlasIMG = _ref.atlasIMG;
|
|
26121
|
+
var _useState = useState(0),
|
|
26122
|
+
currentIndex = _useState[0],
|
|
26123
|
+
setCurrentIndex = _useState[1];
|
|
26124
|
+
// Find the initial index based on initialSelectedSkin
|
|
26125
|
+
useEffect(function () {
|
|
26126
|
+
if (initialSelectedSkin && availableCharacters.length > 0) {
|
|
26127
|
+
var initialIndex = availableCharacters.findIndex(function (character) {
|
|
26128
|
+
return character.textureKey === initialSelectedSkin;
|
|
26129
|
+
});
|
|
26130
|
+
if (initialIndex !== -1) {
|
|
26131
|
+
setCurrentIndex(initialIndex);
|
|
26132
|
+
}
|
|
26133
|
+
}
|
|
26134
|
+
}, [initialSelectedSkin, availableCharacters]);
|
|
26135
|
+
// Update the selected skin when currentIndex changes
|
|
26136
|
+
useEffect(function () {
|
|
26137
|
+
if (availableCharacters.length > 0) {
|
|
26138
|
+
var selectedCharacter = availableCharacters[currentIndex];
|
|
26139
|
+
onChange(selectedCharacter.textureKey);
|
|
26140
|
+
}
|
|
26141
|
+
}, [currentIndex, availableCharacters, onChange]);
|
|
26142
|
+
var handlePrevious = function handlePrevious() {
|
|
26143
|
+
setCurrentIndex(function (prevIndex) {
|
|
26144
|
+
return prevIndex === 0 ? availableCharacters.length - 1 : prevIndex - 1;
|
|
26145
|
+
});
|
|
26146
|
+
};
|
|
26147
|
+
var handleNext = function handleNext() {
|
|
26148
|
+
setCurrentIndex(function (prevIndex) {
|
|
26149
|
+
return prevIndex === availableCharacters.length - 1 ? 0 : prevIndex + 1;
|
|
26150
|
+
});
|
|
26151
|
+
};
|
|
26152
|
+
var getSpriteKey = function getSpriteKey(textureKey) {
|
|
26153
|
+
return textureKey + '/down/standing/0.png';
|
|
26154
|
+
};
|
|
26155
|
+
if (availableCharacters.length === 0) {
|
|
26156
|
+
return React.createElement(Container$5, null, "No skins available");
|
|
26157
|
+
}
|
|
26158
|
+
var currentCharacter = availableCharacters[currentIndex];
|
|
26159
|
+
return React.createElement(Container$5, null, React.createElement(Header, null, "Select Your Character Skin"), React.createElement(CarouselContainer, null, React.createElement(NavButtonWrapper, null, React.createElement(SelectArrow, {
|
|
26160
|
+
direction: "left",
|
|
26161
|
+
onPointerDown: handlePrevious
|
|
26162
|
+
})), React.createElement(SkinPreview, null, currentCharacter && React.createElement(React.Fragment, null, React.createElement(ErrorBoundary, null, React.createElement(SpriteFromAtlas, {
|
|
26163
|
+
spriteKey: getSpriteKey(currentCharacter.textureKey),
|
|
26164
|
+
atlasIMG: atlasIMG,
|
|
26165
|
+
atlasJSON: atlasJSON,
|
|
26166
|
+
imgScale: 4,
|
|
26167
|
+
height: 80,
|
|
26168
|
+
width: 64,
|
|
26169
|
+
containerStyle: {
|
|
26170
|
+
display: 'flex',
|
|
26171
|
+
alignItems: 'center',
|
|
26172
|
+
justifyContent: 'center'
|
|
26173
|
+
},
|
|
26174
|
+
imgStyle: {
|
|
26175
|
+
position: 'relative',
|
|
26176
|
+
left: 0
|
|
26177
|
+
}
|
|
26178
|
+
})), React.createElement(SkinName, null, currentCharacter.name))), React.createElement(NavButtonWrapper, null, React.createElement(SelectArrow, {
|
|
26179
|
+
direction: "right",
|
|
26180
|
+
onPointerDown: handleNext
|
|
26181
|
+
}))), React.createElement(CounterIndicator, null, currentIndex + 1, " / ", availableCharacters.length));
|
|
26182
|
+
};
|
|
26183
|
+
var Container$5 = /*#__PURE__*/styled.div.withConfig({
|
|
26184
|
+
displayName: "SkinSelectionGrid__Container",
|
|
26185
|
+
componentId: "sc-1b8uucy-0"
|
|
26186
|
+
})(["display:flex;flex-direction:column;align-items:center;width:100%;margin-top:1rem;image-rendering:pixelated;"]);
|
|
26187
|
+
var Header = /*#__PURE__*/styled.h3.withConfig({
|
|
26188
|
+
displayName: "SkinSelectionGrid__Header",
|
|
26189
|
+
componentId: "sc-1b8uucy-1"
|
|
26190
|
+
})(["margin:0 0 1rem 0;color:white;text-align:center;font-size:1.1rem;"]);
|
|
26191
|
+
var CarouselContainer = /*#__PURE__*/styled.div.withConfig({
|
|
26192
|
+
displayName: "SkinSelectionGrid__CarouselContainer",
|
|
26193
|
+
componentId: "sc-1b8uucy-2"
|
|
26194
|
+
})(["display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:0.5rem;position:relative;"]);
|
|
26195
|
+
var SkinPreview = /*#__PURE__*/styled.div.withConfig({
|
|
26196
|
+
displayName: "SkinSelectionGrid__SkinPreview",
|
|
26197
|
+
componentId: "sc-1b8uucy-3"
|
|
26198
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1rem;background-color:rgba(245,158,11,0.1);border:2px solid #f59e0b;border-radius:8px;width:140px;height:150px;margin:0 1.5rem;"]);
|
|
26199
|
+
var SkinName = /*#__PURE__*/styled.span.withConfig({
|
|
26200
|
+
displayName: "SkinSelectionGrid__SkinName",
|
|
26201
|
+
componentId: "sc-1b8uucy-4"
|
|
26202
|
+
})(["color:white;font-size:1rem;margin-top:0.8rem;text-align:center;font-weight:bold;"]);
|
|
26203
|
+
var NavButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
26204
|
+
displayName: "SkinSelectionGrid__NavButtonWrapper",
|
|
26205
|
+
componentId: "sc-1b8uucy-5"
|
|
26206
|
+
})(["width:40px;height:42px;position:relative;"]);
|
|
26207
|
+
var CounterIndicator = /*#__PURE__*/styled.div.withConfig({
|
|
26208
|
+
displayName: "SkinSelectionGrid__CounterIndicator",
|
|
26209
|
+
componentId: "sc-1b8uucy-6"
|
|
26210
|
+
})(["color:white;font-size:0.8rem;margin-top:0.5rem;"]);
|
|
26211
|
+
|
|
26114
26212
|
var CharacterSkinSelectionModal = function CharacterSkinSelectionModal(_ref) {
|
|
26115
26213
|
var isOpen = _ref.isOpen,
|
|
26116
26214
|
onClose = _ref.onClose,
|
|
@@ -26120,48 +26218,21 @@ var CharacterSkinSelectionModal = function CharacterSkinSelectionModal(_ref) {
|
|
|
26120
26218
|
atlasIMG = _ref.atlasIMG,
|
|
26121
26219
|
_ref$initialSelectedS = _ref.initialSelectedSkin,
|
|
26122
26220
|
initialSelectedSkin = _ref$initialSelectedS === void 0 ? '' : _ref$initialSelectedS;
|
|
26123
|
-
|
|
26124
|
-
|
|
26125
|
-
|
|
26126
|
-
|
|
26127
|
-
name: item.name
|
|
26128
|
-
};
|
|
26129
|
-
});
|
|
26130
|
-
// State to store the selected skin and the sprite key
|
|
26131
|
-
var _useState = useState(),
|
|
26132
|
-
selectedValue = _useState[0],
|
|
26133
|
-
setSelectedValue = _useState[1];
|
|
26134
|
-
var _useState2 = useState(''),
|
|
26135
|
-
selectedSpriteKey = _useState2[0],
|
|
26136
|
-
setSelectedSpriteKey = _useState2[1];
|
|
26137
|
-
// Update sprite when the selected value changes
|
|
26138
|
-
var updateSelectedSpriteKey = function updateSelectedSpriteKey() {
|
|
26139
|
-
var textureKey = selectedValue ? selectedValue.id : '';
|
|
26140
|
-
var spriteKey = textureKey ? textureKey + '/down/standing/0.png' : '';
|
|
26141
|
-
if (spriteKey === selectedSpriteKey) {
|
|
26142
|
-
return;
|
|
26143
|
-
}
|
|
26144
|
-
setSelectedSpriteKey(spriteKey);
|
|
26145
|
-
};
|
|
26146
|
-
// Update sprite when selectedValue changes
|
|
26147
|
-
useEffect(function () {
|
|
26148
|
-
updateSelectedSpriteKey();
|
|
26149
|
-
}, [selectedValue]);
|
|
26150
|
-
// Initialize selectedValue
|
|
26221
|
+
var _useState = useState(initialSelectedSkin),
|
|
26222
|
+
selectedSkin = _useState[0],
|
|
26223
|
+
setSelectedSkin = _useState[1];
|
|
26224
|
+
// Initialize selected skin
|
|
26151
26225
|
useEffect(function () {
|
|
26152
26226
|
if (initialSelectedSkin) {
|
|
26153
|
-
|
|
26154
|
-
|
|
26155
|
-
|
|
26156
|
-
setSelectedValue(initialProperty || propertySelectValues[0]);
|
|
26157
|
-
} else if (propertySelectValues.length > 0) {
|
|
26158
|
-
setSelectedValue(propertySelectValues[0]);
|
|
26227
|
+
setSelectedSkin(initialSelectedSkin);
|
|
26228
|
+
} else if (availableCharacters.length > 0) {
|
|
26229
|
+
setSelectedSkin(availableCharacters[0].textureKey);
|
|
26159
26230
|
}
|
|
26160
26231
|
}, [initialSelectedSkin, availableCharacters]);
|
|
26161
26232
|
// Functions to handle confirmation and cancellation
|
|
26162
26233
|
var handleConfirm = function handleConfirm() {
|
|
26163
|
-
if (
|
|
26164
|
-
onConfirm(
|
|
26234
|
+
if (selectedSkin) {
|
|
26235
|
+
onConfirm(selectedSkin);
|
|
26165
26236
|
onClose();
|
|
26166
26237
|
}
|
|
26167
26238
|
};
|
|
@@ -26169,44 +26240,30 @@ var CharacterSkinSelectionModal = function CharacterSkinSelectionModal(_ref) {
|
|
|
26169
26240
|
onClose();
|
|
26170
26241
|
};
|
|
26171
26242
|
if (!isOpen) return null;
|
|
26172
|
-
return React.createElement(Container$
|
|
26173
|
-
|
|
26174
|
-
|
|
26243
|
+
return React.createElement(Container$6, null, React.createElement(SkinSelectionGrid, {
|
|
26244
|
+
availableCharacters: availableCharacters,
|
|
26245
|
+
initialSelectedSkin: selectedSkin,
|
|
26246
|
+
onChange: setSelectedSkin,
|
|
26175
26247
|
atlasJSON: atlasJSON,
|
|
26176
|
-
|
|
26177
|
-
height: 80,
|
|
26178
|
-
width: 64,
|
|
26179
|
-
containerStyle: {
|
|
26180
|
-
display: 'flex',
|
|
26181
|
-
alignItems: 'center',
|
|
26182
|
-
paddingBottom: '15px'
|
|
26183
|
-
},
|
|
26184
|
-
imgStyle: {
|
|
26185
|
-
left: '22px'
|
|
26186
|
-
}
|
|
26187
|
-
})), React.createElement(PropertySelect, {
|
|
26188
|
-
availableProperties: propertySelectValues,
|
|
26189
|
-
onChange: function onChange(value) {
|
|
26190
|
-
setSelectedValue(value);
|
|
26191
|
-
}
|
|
26248
|
+
atlasIMG: atlasIMG
|
|
26192
26249
|
}), React.createElement(ButtonsContainer, null, React.createElement(Button, {
|
|
26193
26250
|
buttonType: ButtonTypes.RPGUIButton,
|
|
26194
26251
|
onClick: handleCancel
|
|
26195
26252
|
}, "Cancel"), React.createElement(Button, {
|
|
26196
26253
|
buttonType: ButtonTypes.RPGUIButton,
|
|
26197
26254
|
onClick: handleConfirm,
|
|
26198
|
-
disabled: !
|
|
26255
|
+
disabled: !selectedSkin
|
|
26199
26256
|
}, "Confirm")));
|
|
26200
26257
|
};
|
|
26201
26258
|
// Styled components
|
|
26202
|
-
var Container$
|
|
26259
|
+
var Container$6 = /*#__PURE__*/styled.div.withConfig({
|
|
26203
26260
|
displayName: "CharacterSkinSelectionModal__Container",
|
|
26204
26261
|
componentId: "sc-qsroao-0"
|
|
26205
|
-
})(["display:flex;flex-direction:column;align-items:center;image-rendering:pixelated;"]);
|
|
26262
|
+
})(["display:flex;flex-direction:column;align-items:center;width:400px;max-width:100%;image-rendering:pixelated;"]);
|
|
26206
26263
|
var ButtonsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
26207
26264
|
displayName: "CharacterSkinSelectionModal__ButtonsContainer",
|
|
26208
26265
|
componentId: "sc-qsroao-1"
|
|
26209
|
-
})(["display:flex;justify-content:center;gap:0.8rem;width:100%;margin:
|
|
26266
|
+
})(["display:flex;justify-content:center;gap:0.8rem;width:100%;margin:2rem 0 0.75rem;button{min-width:95px;font-size:0.9rem;}"]);
|
|
26210
26267
|
|
|
26211
26268
|
var Chat = function Chat(_ref) {
|
|
26212
26269
|
var chatMessages = _ref.chatMessages,
|
|
@@ -26353,13 +26410,13 @@ var RPGUIContainer = function RPGUIContainer(_ref) {
|
|
|
26353
26410
|
width = _ref$width === void 0 ? '50%' : _ref$width,
|
|
26354
26411
|
height = _ref.height,
|
|
26355
26412
|
className = _ref.className;
|
|
26356
|
-
return React.createElement(Container$
|
|
26413
|
+
return React.createElement(Container$7, {
|
|
26357
26414
|
width: width,
|
|
26358
26415
|
height: height || 'auto',
|
|
26359
26416
|
className: "rpgui-container " + type + " " + className
|
|
26360
26417
|
}, children);
|
|
26361
26418
|
};
|
|
26362
|
-
var Container$
|
|
26419
|
+
var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
26363
26420
|
displayName: "RPGUIContainer__Container",
|
|
26364
26421
|
componentId: "sc-a7heha-0"
|
|
26365
26422
|
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;"], function (props) {
|
|
@@ -26431,7 +26488,7 @@ var ChatDeprecated = function ChatDeprecated(_ref) {
|
|
|
26431
26488
|
}, onRenderMessageLines(emitter, createdAt, message));
|
|
26432
26489
|
}) : React.createElement(MessageText, null, "No messages available.");
|
|
26433
26490
|
};
|
|
26434
|
-
return React.createElement(Container$
|
|
26491
|
+
return React.createElement(Container$8, null, React.createElement(CustomContainer, {
|
|
26435
26492
|
type: RPGUIContainerTypes.FramedGrey,
|
|
26436
26493
|
width: width,
|
|
26437
26494
|
height: height,
|
|
@@ -26469,7 +26526,7 @@ var ChatDeprecated = function ChatDeprecated(_ref) {
|
|
|
26469
26526
|
id: "chat-send-button"
|
|
26470
26527
|
}, "Send"))))));
|
|
26471
26528
|
};
|
|
26472
|
-
var Container$
|
|
26529
|
+
var Container$8 = /*#__PURE__*/styled.div.withConfig({
|
|
26473
26530
|
displayName: "ChatDeprecated__Container",
|
|
26474
26531
|
componentId: "sc-fuuod3-0"
|
|
26475
26532
|
})(["position:relative;"]);
|
|
@@ -27436,7 +27493,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
27436
27493
|
},
|
|
27437
27494
|
defaultPosition: initialPosition,
|
|
27438
27495
|
scale: scale
|
|
27439
|
-
}, React.createElement(Container$
|
|
27496
|
+
}, React.createElement(Container$9, {
|
|
27440
27497
|
ref: draggableRef,
|
|
27441
27498
|
width: width,
|
|
27442
27499
|
height: height || 'auto',
|
|
@@ -27455,7 +27512,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
27455
27512
|
onPointerDown: onCloseButton
|
|
27456
27513
|
}, "X"), children));
|
|
27457
27514
|
};
|
|
27458
|
-
var Container$
|
|
27515
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
27459
27516
|
displayName: "DraggableContainer__Container",
|
|
27460
27517
|
componentId: "sc-184mpyl-0"
|
|
27461
27518
|
})(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
@@ -27532,7 +27589,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
27532
27589
|
onChange(selectedValue);
|
|
27533
27590
|
}
|
|
27534
27591
|
}, [selectedValue]);
|
|
27535
|
-
return React.createElement(Container$
|
|
27592
|
+
return React.createElement(Container$a, {
|
|
27536
27593
|
onMouseLeave: function onMouseLeave() {
|
|
27537
27594
|
return setOpened(false);
|
|
27538
27595
|
},
|
|
@@ -27560,7 +27617,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
27560
27617
|
}, option.option);
|
|
27561
27618
|
})));
|
|
27562
27619
|
};
|
|
27563
|
-
var Container$
|
|
27620
|
+
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
27564
27621
|
displayName: "Dropdown__Container",
|
|
27565
27622
|
componentId: "sc-8arn65-0"
|
|
27566
27623
|
})(["position:relative;width:", ";"], function (props) {
|
|
@@ -27584,11 +27641,11 @@ var DropdownOptions$1 = /*#__PURE__*/styled.ul.withConfig({
|
|
|
27584
27641
|
var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
|
|
27585
27642
|
var ModalPortal = function ModalPortal(_ref) {
|
|
27586
27643
|
var children = _ref.children;
|
|
27587
|
-
return ReactDOM.createPortal(React.createElement(Container$
|
|
27644
|
+
return ReactDOM.createPortal(React.createElement(Container$b, {
|
|
27588
27645
|
className: "rpgui-content"
|
|
27589
27646
|
}, children), modalRoot);
|
|
27590
27647
|
};
|
|
27591
|
-
var Container$
|
|
27648
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
27592
27649
|
displayName: "ModalPortal__Container",
|
|
27593
27650
|
componentId: "sc-dgmp04-0"
|
|
27594
27651
|
})(["position:static !important;"]);
|
|
@@ -28308,7 +28365,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
28308
28365
|
});
|
|
28309
28366
|
}
|
|
28310
28367
|
};
|
|
28311
|
-
return React.createElement(Container$
|
|
28368
|
+
return React.createElement(Container$c, {
|
|
28312
28369
|
isDraggingItem: !!draggingState.item,
|
|
28313
28370
|
item: item,
|
|
28314
28371
|
className: "rpgui-icon empty-slot",
|
|
@@ -28372,7 +28429,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
28372
28429
|
containerType: containerType
|
|
28373
28430
|
}))));
|
|
28374
28431
|
});
|
|
28375
|
-
var Container$
|
|
28432
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
28376
28433
|
displayName: "ItemSlot__Container",
|
|
28377
28434
|
componentId: "sc-l2j5ef-0"
|
|
28378
28435
|
})(["margin:0.1rem;.react-draggable-dragging{opacity:", ";}position:relative;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}.quality-star{position:absolute;top:0.5rem;left:0.5rem;font-size:1.2rem;z-index:2;text-shadow:0 0 3px black;pointer-events:none;color:", ";}&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
|
|
@@ -28491,9 +28548,9 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
28491
28548
|
});
|
|
28492
28549
|
};
|
|
28493
28550
|
var skillName = (_item$minRequirements = item.minRequirements) == null ? void 0 : (_item$minRequirements2 = _item$minRequirements.skill) == null ? void 0 : _item$minRequirements2.name;
|
|
28494
|
-
return React.createElement(Container$
|
|
28551
|
+
return React.createElement(Container$d, {
|
|
28495
28552
|
item: item
|
|
28496
|
-
}, React.createElement(Header, null, React.createElement("div", null, React.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React.createElement(Rarity, {
|
|
28553
|
+
}, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React.createElement(Rarity, {
|
|
28497
28554
|
item: item
|
|
28498
28555
|
}, item.rarity), React.createElement(Type, null, item.subType)), React.createElement(AllowedSlots, null, renderAvaibleSlots())), item.minRequirements && React.createElement(LevelRequirement, null, React.createElement("div", {
|
|
28499
28556
|
className: "title"
|
|
@@ -28505,7 +28562,7 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
28505
28562
|
"$isSpecial": true
|
|
28506
28563
|
}, "Two handed"), React.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React.createElement(StackInfo, null, "x", Math.round(((_item$stackQty = item.stackQty) != null ? _item$stackQty : 1) * 100) / 100, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React.createElement(MissingStatistics, null, React.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
|
|
28507
28564
|
};
|
|
28508
|
-
var Container$
|
|
28565
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
28509
28566
|
displayName: "ItemInfo__Container",
|
|
28510
28567
|
componentId: "sc-1xm4q8k-0"
|
|
28511
28568
|
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";box-shadow:", ";height:max-content;width:18rem;position:relative;@media (max-width:640px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
|
|
@@ -28546,7 +28603,7 @@ var Description = /*#__PURE__*/styled.div.withConfig({
|
|
|
28546
28603
|
displayName: "ItemInfo__Description",
|
|
28547
28604
|
componentId: "sc-1xm4q8k-6"
|
|
28548
28605
|
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
28549
|
-
var Header = /*#__PURE__*/styled.div.withConfig({
|
|
28606
|
+
var Header$1 = /*#__PURE__*/styled.div.withConfig({
|
|
28550
28607
|
displayName: "ItemInfo__Header",
|
|
28551
28608
|
componentId: "sc-1xm4q8k-7"
|
|
28552
28609
|
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
@@ -28654,7 +28711,7 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
28654
28711
|
}
|
|
28655
28712
|
return;
|
|
28656
28713
|
}, []);
|
|
28657
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
28714
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$e, {
|
|
28658
28715
|
ref: ref
|
|
28659
28716
|
}, React.createElement(ItemInfoDisplay, {
|
|
28660
28717
|
item: item,
|
|
@@ -28663,7 +28720,7 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
28663
28720
|
equipmentSet: equipmentSet
|
|
28664
28721
|
})));
|
|
28665
28722
|
};
|
|
28666
|
-
var Container$
|
|
28723
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
28667
28724
|
displayName: "ItemTooltip__Container",
|
|
28668
28725
|
componentId: "sc-11d9r7x-0"
|
|
28669
28726
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -28683,7 +28740,7 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
28683
28740
|
var _ref$current;
|
|
28684
28741
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
28685
28742
|
};
|
|
28686
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
28743
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$f, {
|
|
28687
28744
|
ref: ref,
|
|
28688
28745
|
onTouchEnd: function onTouchEnd() {
|
|
28689
28746
|
handleFadeOut();
|
|
@@ -28711,7 +28768,7 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
28711
28768
|
}, option.text);
|
|
28712
28769
|
}))));
|
|
28713
28770
|
};
|
|
28714
|
-
var Container$
|
|
28771
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
28715
28772
|
displayName: "MobileItemTooltip__Container",
|
|
28716
28773
|
componentId: "sc-ku4p1j-0"
|
|
28717
28774
|
})(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:640px){flex-direction:column;}"]);
|
|
@@ -29463,7 +29520,7 @@ var ReadOnlyCheckItem = function ReadOnlyCheckItem(_ref) {
|
|
|
29463
29520
|
var labelLeft = _ref.labelLeft,
|
|
29464
29521
|
labelRight = _ref.labelRight,
|
|
29465
29522
|
checked = _ref.checked;
|
|
29466
|
-
return React.createElement(Container$
|
|
29523
|
+
return React.createElement(Container$g, null, labelLeft && React.createElement(Label, null, labelLeft), React.createElement("div", {
|
|
29467
29524
|
className: "rpgui-checkbox-container"
|
|
29468
29525
|
}, React.createElement(CheckBox, {
|
|
29469
29526
|
className: "rpgui-checkbox",
|
|
@@ -29474,7 +29531,7 @@ var ReadOnlyCheckItem = function ReadOnlyCheckItem(_ref) {
|
|
|
29474
29531
|
isRight: true
|
|
29475
29532
|
}, labelRight));
|
|
29476
29533
|
};
|
|
29477
|
-
var Container$
|
|
29534
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
29478
29535
|
displayName: "ReadOnlyCheckItem__Container",
|
|
29479
29536
|
componentId: "sc-1peplf9-0"
|
|
29480
29537
|
})(["display:flex;align-items:center;width:100%;height:20px;"]);
|
|
@@ -29797,7 +29854,7 @@ var DailyTasks = function DailyTasks(_ref) {
|
|
|
29797
29854
|
scale: scale,
|
|
29798
29855
|
width: size.width,
|
|
29799
29856
|
height: size.height
|
|
29800
|
-
}, React.createElement(TaskTitle$1, null, "Daily Tasks"), React.createElement(Container$
|
|
29857
|
+
}, React.createElement(TaskTitle$1, null, "Daily Tasks"), React.createElement(Container$h, null, React.createElement(TasksList, {
|
|
29801
29858
|
className: "tasks-container"
|
|
29802
29859
|
}, React.createElement(GlobalDailyProgress, {
|
|
29803
29860
|
tasks: localTasks,
|
|
@@ -29821,7 +29878,7 @@ var TasksContainer = /*#__PURE__*/styled(DraggableContainer).withConfig({
|
|
|
29821
29878
|
displayName: "DailyTasks__TasksContainer",
|
|
29822
29879
|
componentId: "sc-ittn77-0"
|
|
29823
29880
|
})(["min-width:450px;max-width:550px;margin:0 auto;.rpgui-container-title{width:100%;display:flex;justify-content:center;align-items:center;text-align:center;}.rpgui-container{padding:0 !important;overflow:hidden !important;background-color:rgba(30,30,30,0.9) !important;}"]);
|
|
29824
|
-
var Container$
|
|
29881
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
29825
29882
|
displayName: "DailyTasks__Container",
|
|
29826
29883
|
componentId: "sc-ittn77-1"
|
|
29827
29884
|
})(["width:100%;max-width:100%;margin:0 auto;padding:0.125rem;overflow-y:auto;box-sizing:border-box;@media (min-width:320px){padding:0.25rem;}@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:0.75rem;}"]);
|
|
@@ -30193,7 +30250,7 @@ var DraggedItem = function DraggedItem(_ref) {
|
|
|
30193
30250
|
var centeredX = x - OFFSET$1;
|
|
30194
30251
|
var centeredY = y - OFFSET$1;
|
|
30195
30252
|
var stackInfo = onRenderStackInfo((_item$_id = item == null ? void 0 : item._id) != null ? _item$_id : '', (_item$stackQty = item == null ? void 0 : item.stackQty) != null ? _item$stackQty : 0);
|
|
30196
|
-
return React.createElement(Container$
|
|
30253
|
+
return React.createElement(Container$i, null, React.createElement(SpriteContainer, {
|
|
30197
30254
|
x: centeredX,
|
|
30198
30255
|
y: centeredY
|
|
30199
30256
|
}, React.createElement(SpriteFromAtlas, {
|
|
@@ -30211,7 +30268,7 @@ var DraggedItem = function DraggedItem(_ref) {
|
|
|
30211
30268
|
}), stackInfo));
|
|
30212
30269
|
};
|
|
30213
30270
|
var pulse = "\n @keyframes pulse {\n 0%, 100% {\n transform: scale(1) rotate(-3deg);\n }\n 50% {\n transform: scale(0.95) rotate(-3deg);\n }\n }\n";
|
|
30214
|
-
var Container$
|
|
30271
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
30215
30272
|
displayName: "DraggedItem__Container",
|
|
30216
30273
|
componentId: "sc-mlzzcp-0"
|
|
30217
30274
|
})(["position:relative;"]);
|
|
@@ -30249,7 +30306,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
30249
30306
|
document.removeEventListener('clickOutside', function (_e) {});
|
|
30250
30307
|
};
|
|
30251
30308
|
}, []);
|
|
30252
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
30309
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$j, Object.assign({
|
|
30253
30310
|
fontSize: fontSize,
|
|
30254
30311
|
ref: ref
|
|
30255
30312
|
}, pos), React.createElement("ul", {
|
|
@@ -30266,7 +30323,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
30266
30323
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
30267
30324
|
}))));
|
|
30268
30325
|
};
|
|
30269
|
-
var Container$
|
|
30326
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
30270
30327
|
displayName: "RelativeListMenu__Container",
|
|
30271
30328
|
componentId: "sc-7hohf-0"
|
|
30272
30329
|
})(["position:absolute;top:", "px;left:", "px;display:flex;flex-direction:column;width:max-content;justify-content:start;align-items:flex-start;li{font-size:", "em;}"], function (props) {
|
|
@@ -30540,7 +30597,7 @@ var SearchFriend = function SearchFriend(_ref) {
|
|
|
30540
30597
|
title: "Requests (" + friendRequests.length + ")",
|
|
30541
30598
|
content: requestsTabContent
|
|
30542
30599
|
}];
|
|
30543
|
-
return React.createElement(Container$
|
|
30600
|
+
return React.createElement(Container$k, null, React.createElement(InternalTabs, {
|
|
30544
30601
|
tabs: tabs,
|
|
30545
30602
|
activeTextColor: "#000",
|
|
30546
30603
|
inactiveColor: "#777",
|
|
@@ -30582,7 +30639,7 @@ var FriendRequestSection = function FriendRequestSection(_ref3) {
|
|
|
30582
30639
|
}, "Reject")));
|
|
30583
30640
|
})));
|
|
30584
30641
|
};
|
|
30585
|
-
var Container$
|
|
30642
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
30586
30643
|
displayName: "SearchFriend__Container",
|
|
30587
30644
|
componentId: "sc-1lt1ols-0"
|
|
30588
30645
|
})(["display:flex;flex-direction:column;gap:1rem;"]);
|
|
@@ -30785,7 +30842,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
30785
30842
|
var _useState2 = useState(false),
|
|
30786
30843
|
showGoNextIndicator = _useState2[0],
|
|
30787
30844
|
setShowGoNextIndicator = _useState2[1];
|
|
30788
|
-
return React.createElement(Container$
|
|
30845
|
+
return React.createElement(Container$l, null, React.createElement(DynamicText, {
|
|
30789
30846
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
30790
30847
|
onFinish: function onFinish() {
|
|
30791
30848
|
setShowGoNextIndicator(true);
|
|
@@ -30803,7 +30860,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
30803
30860
|
}
|
|
30804
30861
|
}));
|
|
30805
30862
|
};
|
|
30806
|
-
var Container$
|
|
30863
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
30807
30864
|
displayName: "NPCDialogText__Container",
|
|
30808
30865
|
componentId: "sc-1cxkdh9-0"
|
|
30809
30866
|
})([""]);
|
|
@@ -30955,7 +31012,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
30955
31012
|
return null;
|
|
30956
31013
|
});
|
|
30957
31014
|
};
|
|
30958
|
-
return React.createElement(Container$
|
|
31015
|
+
return React.createElement(Container$m, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
30959
31016
|
text: currentQuestion.text,
|
|
30960
31017
|
onStart: function onStart() {
|
|
30961
31018
|
return setCanShowAnswers(false);
|
|
@@ -30965,7 +31022,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
30965
31022
|
}
|
|
30966
31023
|
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
30967
31024
|
};
|
|
30968
|
-
var Container$
|
|
31025
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
30969
31026
|
displayName: "QuestionDialog__Container",
|
|
30970
31027
|
componentId: "sc-bxc5u0-0"
|
|
30971
31028
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -31026,7 +31083,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
31026
31083
|
}
|
|
31027
31084
|
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
31028
31085
|
src: imagePath || img$7
|
|
31029
|
-
}))) : React.createElement(React.Fragment, null, React.createElement(Container$
|
|
31086
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$n, null, React.createElement(CloseIcon, {
|
|
31030
31087
|
onPointerDown: _onClose
|
|
31031
31088
|
}, "X"), React.createElement(TextContainer$1, {
|
|
31032
31089
|
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
@@ -31042,7 +31099,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
31042
31099
|
src: imagePath || img$7
|
|
31043
31100
|
})))));
|
|
31044
31101
|
};
|
|
31045
|
-
var Container$
|
|
31102
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
31046
31103
|
displayName: "NPCDialog__Container",
|
|
31047
31104
|
componentId: "sc-1b4aw74-0"
|
|
31048
31105
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -31103,7 +31160,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
31103
31160
|
type: RPGUIContainerTypes.FramedGold,
|
|
31104
31161
|
width: '50%',
|
|
31105
31162
|
height: '180px'
|
|
31106
|
-
}, React.createElement(React.Fragment, null, React.createElement(Container$
|
|
31163
|
+
}, React.createElement(React.Fragment, null, React.createElement(Container$o, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
31107
31164
|
flex: '70%'
|
|
31108
31165
|
}, React.createElement(NPCDialogText, {
|
|
31109
31166
|
onStartStep: function onStartStep() {
|
|
@@ -31145,7 +31202,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
31145
31202
|
src: img$6
|
|
31146
31203
|
}))), ")"));
|
|
31147
31204
|
};
|
|
31148
|
-
var Container$
|
|
31205
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
31149
31206
|
displayName: "NPCMultiDialog__Container",
|
|
31150
31207
|
componentId: "sc-rvu5wg-0"
|
|
31151
31208
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -31577,7 +31634,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
31577
31634
|
totalPages = _ref.totalPages,
|
|
31578
31635
|
onPageChange = _ref.onPageChange,
|
|
31579
31636
|
className = _ref.className;
|
|
31580
|
-
return React.createElement(Container$
|
|
31637
|
+
return React.createElement(Container$p, {
|
|
31581
31638
|
className: className
|
|
31582
31639
|
}, React.createElement(PaginationButton$1, {
|
|
31583
31640
|
onClick: function onClick() {
|
|
@@ -31595,7 +31652,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
31595
31652
|
size: 12
|
|
31596
31653
|
})));
|
|
31597
31654
|
};
|
|
31598
|
-
var Container$
|
|
31655
|
+
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
31599
31656
|
displayName: "Pagination__Container",
|
|
31600
31657
|
componentId: "sc-3k4m4u-0"
|
|
31601
31658
|
})(["display:flex;align-items:center;justify-content:center;gap:16px;padding:8px;"]);
|
|
@@ -31621,7 +31678,7 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
31621
31678
|
className = _ref.className,
|
|
31622
31679
|
rightElement = _ref.rightElement;
|
|
31623
31680
|
var hasRightElement = Boolean(rightElement);
|
|
31624
|
-
return React.createElement(Container$
|
|
31681
|
+
return React.createElement(Container$q, {
|
|
31625
31682
|
className: className
|
|
31626
31683
|
}, React.createElement(Input$1, {
|
|
31627
31684
|
type: "text",
|
|
@@ -31634,7 +31691,7 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
31634
31691
|
"$hasRightElement": hasRightElement
|
|
31635
31692
|
}), React.createElement(IconContainer, null, React.createElement(SearchIcon, null), rightElement));
|
|
31636
31693
|
};
|
|
31637
|
-
var Container$
|
|
31694
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
31638
31695
|
displayName: "SearchBar__Container",
|
|
31639
31696
|
componentId: "sc-13n8z02-0"
|
|
31640
31697
|
})(["position:relative;width:100%;"]);
|
|
@@ -31742,7 +31799,7 @@ var PaginatedContent = function PaginatedContent(_ref) {
|
|
|
31742
31799
|
setCurrentPage = _usePagination.setCurrentPage,
|
|
31743
31800
|
paginatedItems = _usePagination.paginatedItems,
|
|
31744
31801
|
totalPages = _usePagination.totalPages;
|
|
31745
|
-
return React.createElement(Container$
|
|
31802
|
+
return React.createElement(Container$r, {
|
|
31746
31803
|
className: className
|
|
31747
31804
|
}, (searchOptions || filterOptions) && React.createElement(SearchHeader, {
|
|
31748
31805
|
searchOptions: searchOptions,
|
|
@@ -31764,7 +31821,7 @@ var PaginatedContent = function PaginatedContent(_ref) {
|
|
|
31764
31821
|
onPageChange: setCurrentPage
|
|
31765
31822
|
}))));
|
|
31766
31823
|
};
|
|
31767
|
-
var Container$
|
|
31824
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
31768
31825
|
displayName: "PaginatedContent__Container",
|
|
31769
31826
|
componentId: "sc-lzp9hn-0"
|
|
31770
31827
|
})(["display:flex;flex-direction:column;gap:0.5rem;min-height:400px;width:100%;"]);
|
|
@@ -31886,11 +31943,11 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
|
31886
31943
|
atlasIMG = _ref.atlasIMG,
|
|
31887
31944
|
onBack = _ref.onBack,
|
|
31888
31945
|
children = _ref.children;
|
|
31889
|
-
return React.createElement(Container$
|
|
31946
|
+
return React.createElement(Container$s, null, React.createElement(Overlay, {
|
|
31890
31947
|
onClick: onBack
|
|
31891
31948
|
}), React.createElement(Modal, null, React.createElement(CloseButton$5, {
|
|
31892
31949
|
onClick: onBack
|
|
31893
|
-
}, React.createElement(FaTimes, null)), React.createElement(Header$
|
|
31950
|
+
}, React.createElement(FaTimes, null)), React.createElement(Header$2, null, React.createElement(SpriteContainer$2, null, React.createElement(SpriteFromAtlas, {
|
|
31894
31951
|
atlasJSON: atlasJSON,
|
|
31895
31952
|
atlasIMG: atlasIMG,
|
|
31896
31953
|
spriteKey: spriteKey,
|
|
@@ -31899,7 +31956,7 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
|
31899
31956
|
imgScale: 1
|
|
31900
31957
|
})), React.createElement(Title$3, null, name)), React.createElement(Content$1, null, children)));
|
|
31901
31958
|
};
|
|
31902
|
-
var Container$
|
|
31959
|
+
var Container$s = /*#__PURE__*/styled.div.withConfig({
|
|
31903
31960
|
displayName: "BaseInformationDetails__Container",
|
|
31904
31961
|
componentId: "sc-1vguuz8-0"
|
|
31905
31962
|
})(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
|
|
@@ -31915,7 +31972,7 @@ var CloseButton$5 = /*#__PURE__*/styled.button.withConfig({
|
|
|
31915
31972
|
displayName: "BaseInformationDetails__CloseButton",
|
|
31916
31973
|
componentId: "sc-1vguuz8-3"
|
|
31917
31974
|
})(["position:absolute;top:20px;right:20px;background:none;border:none;color:", ";font-size:1.2rem;cursor:pointer;padding:0;z-index:1;transition:transform 0.2s ease;&:hover{transform:scale(1.1);}"], uiColors.yellow);
|
|
31918
|
-
var Header$
|
|
31975
|
+
var Header$2 = /*#__PURE__*/styled.div.withConfig({
|
|
31919
31976
|
displayName: "BaseInformationDetails__Header",
|
|
31920
31977
|
componentId: "sc-1vguuz8-4"
|
|
31921
31978
|
})(["display:flex;align-items:center;gap:16px;margin-bottom:24px;"]);
|
|
@@ -31941,19 +31998,19 @@ var Collapsible = function Collapsible(_ref) {
|
|
|
31941
31998
|
var _useState = useState(defaultOpen),
|
|
31942
31999
|
isOpen = _useState[0],
|
|
31943
32000
|
setIsOpen = _useState[1];
|
|
31944
|
-
return React.createElement(Container$
|
|
32001
|
+
return React.createElement(Container$t, {
|
|
31945
32002
|
className: className
|
|
31946
|
-
}, React.createElement(Header$
|
|
32003
|
+
}, React.createElement(Header$3, {
|
|
31947
32004
|
onClick: function onClick() {
|
|
31948
32005
|
return setIsOpen(!isOpen);
|
|
31949
32006
|
}
|
|
31950
32007
|
}, React.createElement(Title$4, null, title), React.createElement(Icon$1, null, isOpen ? React.createElement(FaChevronUp, null) : React.createElement(FaChevronDown, null))), isOpen && React.createElement(Content$2, null, children));
|
|
31951
32008
|
};
|
|
31952
|
-
var Container$
|
|
32009
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
31953
32010
|
displayName: "Collapsible__Container",
|
|
31954
32011
|
componentId: "sc-s4h8ey-0"
|
|
31955
32012
|
})(["background:rgba(0,0,0,0.3);border-radius:4px;overflow:hidden;border:1px solid ", ";"], uiColors.darkGray);
|
|
31956
|
-
var Header$
|
|
32013
|
+
var Header$3 = /*#__PURE__*/styled.div.withConfig({
|
|
31957
32014
|
displayName: "Collapsible__Header",
|
|
31958
32015
|
componentId: "sc-s4h8ey-1"
|
|
31959
32016
|
})(["padding:10px 12px;background:rgba(0,0,0,0.2);display:flex;align-items:center;justify-content:space-between;cursor:pointer;transition:background-color 0.2s ease;&:hover{background:rgba(0,0,0,0.4);}"]);
|
|
@@ -32279,7 +32336,7 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
32279
32336
|
onClose();
|
|
32280
32337
|
}
|
|
32281
32338
|
};
|
|
32282
|
-
return React.createElement(Container$
|
|
32339
|
+
return React.createElement(Container$u, null, React.createElement(FilterButton, {
|
|
32283
32340
|
onClick: onToggle,
|
|
32284
32341
|
"$hasActiveFilters": hasActiveFilters,
|
|
32285
32342
|
ref: buttonRef
|
|
@@ -32310,7 +32367,7 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
32310
32367
|
onClick: onClearAll
|
|
32311
32368
|
}, "Clear All Filters"))));
|
|
32312
32369
|
};
|
|
32313
|
-
var Container$
|
|
32370
|
+
var Container$u = /*#__PURE__*/styled.div.withConfig({
|
|
32314
32371
|
displayName: "AdvancedFilters__Container",
|
|
32315
32372
|
componentId: "sc-1xj6ldr-0"
|
|
32316
32373
|
})(["position:relative;margin-left:0.5rem;"]);
|
|
@@ -33404,7 +33461,7 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
33404
33461
|
minWidth: "300px",
|
|
33405
33462
|
cancelDrag: ".PaginatedContent-content",
|
|
33406
33463
|
onCloseButton: onClose
|
|
33407
|
-
}, React.createElement(Container$
|
|
33464
|
+
}, React.createElement(Container$v, null, React.createElement(InternalTabs, {
|
|
33408
33465
|
tabs: tabs,
|
|
33409
33466
|
activeTextColor: "#000000",
|
|
33410
33467
|
activeTab: activeTab,
|
|
@@ -33415,7 +33472,7 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
33415
33472
|
hoverColor: "#fef3c7"
|
|
33416
33473
|
})));
|
|
33417
33474
|
};
|
|
33418
|
-
var Container$
|
|
33475
|
+
var Container$v = /*#__PURE__*/styled.div.withConfig({
|
|
33419
33476
|
displayName: "InformationCenter__Container",
|
|
33420
33477
|
componentId: "sc-1ttl62e-0"
|
|
33421
33478
|
})(["width:100%;max-width:100%;margin:0 auto;padding:0.125rem;overflow:hidden;box-sizing:border-box;@media (min-width:320px){padding:0.25rem;}@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:0.75rem;}"]);
|
|
@@ -33586,7 +33643,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
33586
33643
|
}
|
|
33587
33644
|
return null;
|
|
33588
33645
|
};
|
|
33589
|
-
return React.createElement(Container$
|
|
33646
|
+
return React.createElement(Container$w, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
33590
33647
|
id: "shortcuts_list"
|
|
33591
33648
|
}, Array.from({
|
|
33592
33649
|
length: 12
|
|
@@ -33604,7 +33661,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
33604
33661
|
}, getContent(i));
|
|
33605
33662
|
})));
|
|
33606
33663
|
};
|
|
33607
|
-
var Container$
|
|
33664
|
+
var Container$w = /*#__PURE__*/styled.div.withConfig({
|
|
33608
33665
|
displayName: "ShortcutsSetter__Container",
|
|
33609
33666
|
componentId: "sc-xuouuf-0"
|
|
33610
33667
|
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;"]);
|
|
@@ -34148,7 +34205,7 @@ var ColorSelector = function ColorSelector(_ref) {
|
|
|
34148
34205
|
cancelDrag: ".react-colorful",
|
|
34149
34206
|
width: "25rem",
|
|
34150
34207
|
onCloseButton: onClose
|
|
34151
|
-
}, React.createElement(Container$
|
|
34208
|
+
}, React.createElement(Container$x, null, React.createElement(Header$4, null, "Select Color"), React.createElement(ColorPickerWrapper, null, React.createElement(HexColorPicker, {
|
|
34152
34209
|
color: currentColor,
|
|
34153
34210
|
onChange: function onChange(color) {
|
|
34154
34211
|
setCurrentColor(color);
|
|
@@ -34164,11 +34221,11 @@ var ColorSelector = function ColorSelector(_ref) {
|
|
|
34164
34221
|
onClose: handleClose
|
|
34165
34222
|
}));
|
|
34166
34223
|
};
|
|
34167
|
-
var Container$
|
|
34224
|
+
var Container$x = /*#__PURE__*/styled.div.withConfig({
|
|
34168
34225
|
displayName: "ItemPropertyColorSelector__Container",
|
|
34169
34226
|
componentId: "sc-me1r4z-0"
|
|
34170
34227
|
})(["text-align:center;background:inherit;display:flex;flex-direction:column;gap:1.5rem;align-items:center;width:100%;max-width:24rem;margin:0 auto;"]);
|
|
34171
|
-
var Header$
|
|
34228
|
+
var Header$4 = /*#__PURE__*/styled.h2.withConfig({
|
|
34172
34229
|
displayName: "ItemPropertyColorSelector__Header",
|
|
34173
34230
|
componentId: "sc-me1r4z-1"
|
|
34174
34231
|
})(["color:white;font-size:1rem;margin:0;width:100%;text-align:center;"]);
|
|
@@ -34239,7 +34296,7 @@ var GemSelector = function GemSelector(_ref) {
|
|
|
34239
34296
|
scale: scale,
|
|
34240
34297
|
cancelDrag: ".gem-selector-container",
|
|
34241
34298
|
onCloseButton: onClose
|
|
34242
|
-
}, React.createElement(ContentWrapper$1, null, React.createElement(Header$
|
|
34299
|
+
}, React.createElement(ContentWrapper$1, null, React.createElement(Header$5, null, React.createElement(Title$5, null, "GEM SELECTION"), React.createElement(Subtitle, null, "Select gems to detach")), React.createElement(GemGrid, null, (_item$attachedGems = item.attachedGems) == null ? void 0 : _item$attachedGems.map(function (gem, index) {
|
|
34243
34300
|
return React.createElement(GemItem, {
|
|
34244
34301
|
key: gem.key + "-" + index
|
|
34245
34302
|
}, React.createElement(CheckItemWrapper$1, null, React.createElement(CheckItem, {
|
|
@@ -34278,7 +34335,7 @@ var Subtitle = /*#__PURE__*/styled.h2.withConfig({
|
|
|
34278
34335
|
displayName: "GemSelector__Subtitle",
|
|
34279
34336
|
componentId: "sc-gbt8g4-1"
|
|
34280
34337
|
})(["font-size:0.6rem;color:", ";margin:0;"], uiColors.white);
|
|
34281
|
-
var Header$
|
|
34338
|
+
var Header$5 = /*#__PURE__*/styled.div.withConfig({
|
|
34282
34339
|
displayName: "GemSelector__Header",
|
|
34283
34340
|
componentId: "sc-gbt8g4-2"
|
|
34284
34341
|
})(["text-align:center;padding:5px;border-bottom:2px solid #444;"]);
|
|
@@ -34520,7 +34577,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
34520
34577
|
onSelected = _ref.onSelected,
|
|
34521
34578
|
x = _ref.x,
|
|
34522
34579
|
y = _ref.y;
|
|
34523
|
-
return React.createElement(Container$
|
|
34580
|
+
return React.createElement(Container$y, {
|
|
34524
34581
|
x: x,
|
|
34525
34582
|
y: y
|
|
34526
34583
|
}, React.createElement("ul", {
|
|
@@ -34537,7 +34594,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
34537
34594
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
34538
34595
|
})));
|
|
34539
34596
|
};
|
|
34540
|
-
var Container$
|
|
34597
|
+
var Container$y = /*#__PURE__*/styled.div.withConfig({
|
|
34541
34598
|
displayName: "ListMenu__Container",
|
|
34542
34599
|
componentId: "sc-i9097t-0"
|
|
34543
34600
|
})(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", ";}"], function (props) {
|
|
@@ -34556,7 +34613,7 @@ var Pager = function Pager(_ref) {
|
|
|
34556
34613
|
itemsPerPage = _ref.itemsPerPage,
|
|
34557
34614
|
onPageChange = _ref.onPageChange;
|
|
34558
34615
|
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
34559
|
-
return React.createElement(Container$
|
|
34616
|
+
return React.createElement(Container$z, null, React.createElement("p", null, "Total items: ", totalItems), React.createElement(PagerContainer, null, React.createElement("button", {
|
|
34560
34617
|
disabled: currentPage === 1,
|
|
34561
34618
|
onPointerDown: function onPointerDown() {
|
|
34562
34619
|
return onPageChange(Math.max(currentPage - 1, 1));
|
|
@@ -34570,7 +34627,7 @@ var Pager = function Pager(_ref) {
|
|
|
34570
34627
|
}
|
|
34571
34628
|
}, '>')));
|
|
34572
34629
|
};
|
|
34573
|
-
var Container$
|
|
34630
|
+
var Container$z = /*#__PURE__*/styled.div.withConfig({
|
|
34574
34631
|
displayName: "Pager__Container",
|
|
34575
34632
|
componentId: "sc-1ekmf50-0"
|
|
34576
34633
|
})(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
|
|
@@ -35091,13 +35148,13 @@ var TabBody = function TabBody(_ref) {
|
|
|
35091
35148
|
children = _ref.children,
|
|
35092
35149
|
styles = _ref.styles,
|
|
35093
35150
|
centerContent = _ref.centerContent;
|
|
35094
|
-
return React.createElement(Container$
|
|
35151
|
+
return React.createElement(Container$A, {
|
|
35095
35152
|
styles: styles,
|
|
35096
35153
|
"data-tab-id": id,
|
|
35097
35154
|
centerContent: centerContent
|
|
35098
35155
|
}, children);
|
|
35099
35156
|
};
|
|
35100
|
-
var Container$
|
|
35157
|
+
var Container$A = /*#__PURE__*/styled.div.withConfig({
|
|
35101
35158
|
displayName: "TabBody__Container",
|
|
35102
35159
|
componentId: "sc-196oof2-0"
|
|
35103
35160
|
})(["width:", ";height:", ";overflow-y:auto;display:", ";justify-content:", ";align-items:", ";"], function (props) {
|
|
@@ -35750,7 +35807,7 @@ var ProgressBar$1 = function ProgressBar(_ref) {
|
|
|
35750
35807
|
}
|
|
35751
35808
|
return value * 100 / max;
|
|
35752
35809
|
};
|
|
35753
|
-
return React.createElement(Container$
|
|
35810
|
+
return React.createElement(Container$B, {
|
|
35754
35811
|
className: "rpgui-progress",
|
|
35755
35812
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
35756
35813
|
"data-rpguitype": "progress",
|
|
@@ -35780,7 +35837,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35780
35837
|
displayName: "ProgressBar__TextOverlay",
|
|
35781
35838
|
componentId: "sc-qa6fzh-1"
|
|
35782
35839
|
})(["width:100%;position:relative;"]);
|
|
35783
|
-
var Container$
|
|
35840
|
+
var Container$B = /*#__PURE__*/styled.div.withConfig({
|
|
35784
35841
|
displayName: "ProgressBar__Container",
|
|
35785
35842
|
componentId: "sc-qa6fzh-2"
|
|
35786
35843
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -36021,9 +36078,9 @@ var InputRadio = function InputRadio(_ref) {
|
|
|
36021
36078
|
|
|
36022
36079
|
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
36023
36080
|
var children = _ref.children;
|
|
36024
|
-
return React.createElement(Container$
|
|
36081
|
+
return React.createElement(Container$C, null, children);
|
|
36025
36082
|
};
|
|
36026
|
-
var Container$
|
|
36083
|
+
var Container$C = /*#__PURE__*/styled.div.withConfig({
|
|
36027
36084
|
displayName: "RPGUIScrollbar__Container",
|
|
36028
36085
|
componentId: "sc-p3msmb-0"
|
|
36029
36086
|
})([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
|
|
@@ -36179,7 +36236,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
36179
36236
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
36180
36237
|
// Ensure the width is at least 1% if value is greater than 0
|
|
36181
36238
|
var width = value > 0 ? Math.max(1, Math.min(100, value)) : 0;
|
|
36182
|
-
return React.createElement(Container$
|
|
36239
|
+
return React.createElement(Container$D, {
|
|
36183
36240
|
className: "simple-progress-bar"
|
|
36184
36241
|
}, React.createElement(ProgressBarContainer, {
|
|
36185
36242
|
margin: margin
|
|
@@ -36188,7 +36245,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
36188
36245
|
bgColor: bgColor
|
|
36189
36246
|
}))));
|
|
36190
36247
|
};
|
|
36191
|
-
var Container$
|
|
36248
|
+
var Container$D = /*#__PURE__*/styled.div.withConfig({
|
|
36192
36249
|
displayName: "SimpleProgressBar__Container",
|
|
36193
36250
|
componentId: "sc-mbeil3-0"
|
|
36194
36251
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -36521,7 +36578,7 @@ var SocialModal = function SocialModal(_ref) {
|
|
|
36521
36578
|
title: "Social Channels",
|
|
36522
36579
|
width: "500px",
|
|
36523
36580
|
onCloseButton: onClose
|
|
36524
|
-
}, React.createElement(Container$
|
|
36581
|
+
}, React.createElement(Container$E, null, React.createElement(HeaderImage, {
|
|
36525
36582
|
src: img$9,
|
|
36526
36583
|
alt: ""
|
|
36527
36584
|
}), React.createElement(ButtonsContainer$3, null, React.createElement(MainButtons, null, React.createElement(SocialButton$1, {
|
|
@@ -36539,7 +36596,7 @@ var SocialModal = function SocialModal(_ref) {
|
|
|
36539
36596
|
onClick: handleWhatsAppClick
|
|
36540
36597
|
}, React.createElement(FaWhatsapp, null), " Join WhatsApp")))));
|
|
36541
36598
|
};
|
|
36542
|
-
var Container$
|
|
36599
|
+
var Container$E = /*#__PURE__*/styled.div.withConfig({
|
|
36543
36600
|
displayName: "SocialModal__Container",
|
|
36544
36601
|
componentId: "sc-tbjhp9-0"
|
|
36545
36602
|
})(["width:100%;display:flex;flex-direction:column;gap:16px;background-color:#5c4132;position:relative;border-radius:8px;overflow:hidden;&:before,&:after{content:'';position:absolute;left:0;right:0;height:3px;}&:before{bottom:0;background:linear-gradient( to right,#5c4132 0%,#2b1810 2%,#2b1810 98%,#5c4132 100% );}"]);
|
|
@@ -36585,7 +36642,7 @@ var SpellInfo$1 = function SpellInfo(_ref) {
|
|
|
36585
36642
|
castingType = spell.castingType,
|
|
36586
36643
|
cooldown = spell.cooldown,
|
|
36587
36644
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
36588
|
-
return React.createElement(Container$
|
|
36645
|
+
return React.createElement(Container$F, null, React.createElement(Header$6, null, React.createElement("div", null, React.createElement(Title$b, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
|
|
36589
36646
|
className: "label"
|
|
36590
36647
|
}, "Casting Type:"), React.createElement("div", {
|
|
36591
36648
|
className: "value"
|
|
@@ -36611,7 +36668,7 @@ var SpellInfo$1 = function SpellInfo(_ref) {
|
|
|
36611
36668
|
className: "value"
|
|
36612
36669
|
}, requiredItem))), React.createElement(Description$4, null, description));
|
|
36613
36670
|
};
|
|
36614
|
-
var Container$
|
|
36671
|
+
var Container$F = /*#__PURE__*/styled.div.withConfig({
|
|
36615
36672
|
displayName: "SpellInfo__Container",
|
|
36616
36673
|
componentId: "sc-4hbw3q-0"
|
|
36617
36674
|
})(["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);
|
|
@@ -36627,7 +36684,7 @@ var Description$4 = /*#__PURE__*/styled.div.withConfig({
|
|
|
36627
36684
|
displayName: "SpellInfo__Description",
|
|
36628
36685
|
componentId: "sc-4hbw3q-3"
|
|
36629
36686
|
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
36630
|
-
var Header$
|
|
36687
|
+
var Header$6 = /*#__PURE__*/styled.div.withConfig({
|
|
36631
36688
|
displayName: "SpellInfo__Header",
|
|
36632
36689
|
componentId: "sc-4hbw3q-4"
|
|
36633
36690
|
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
@@ -36665,7 +36722,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
36665
36722
|
var _ref$current;
|
|
36666
36723
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
36667
36724
|
};
|
|
36668
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
36725
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$G, {
|
|
36669
36726
|
ref: ref,
|
|
36670
36727
|
onTouchEnd: function onTouchEnd() {
|
|
36671
36728
|
handleFadeOut();
|
|
@@ -36690,7 +36747,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
36690
36747
|
}, option.text);
|
|
36691
36748
|
}))));
|
|
36692
36749
|
};
|
|
36693
|
-
var Container$
|
|
36750
|
+
var Container$G = /*#__PURE__*/styled.div.withConfig({
|
|
36694
36751
|
displayName: "MobileSpellTooltip__Container",
|
|
36695
36752
|
componentId: "sc-6p7uvr-0"
|
|
36696
36753
|
})(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
|
|
@@ -36731,13 +36788,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
36731
36788
|
}
|
|
36732
36789
|
return;
|
|
36733
36790
|
}, []);
|
|
36734
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
36791
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$H, {
|
|
36735
36792
|
ref: ref
|
|
36736
36793
|
}, React.createElement(SpellInfoDisplay, {
|
|
36737
36794
|
spell: spell
|
|
36738
36795
|
})));
|
|
36739
36796
|
};
|
|
36740
|
-
var Container$
|
|
36797
|
+
var Container$H = /*#__PURE__*/styled.div.withConfig({
|
|
36741
36798
|
displayName: "SpellTooltip__Container",
|
|
36742
36799
|
componentId: "sc-1go0gwg-0"
|
|
36743
36800
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -36810,7 +36867,7 @@ var Spell = function Spell(_ref) {
|
|
|
36810
36867
|
var IMAGE_SCALE = 2;
|
|
36811
36868
|
return React.createElement(SpellInfoWrapper, {
|
|
36812
36869
|
spell: spell
|
|
36813
|
-
}, React.createElement(Container$
|
|
36870
|
+
}, React.createElement(Container$I, {
|
|
36814
36871
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
36815
36872
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
36816
36873
|
className: "spell"
|
|
@@ -36829,7 +36886,7 @@ var Spell = function Spell(_ref) {
|
|
|
36829
36886
|
className: "mana"
|
|
36830
36887
|
}, manaCost))));
|
|
36831
36888
|
};
|
|
36832
|
-
var Container$
|
|
36889
|
+
var Container$I = /*#__PURE__*/styled.button.withConfig({
|
|
36833
36890
|
displayName: "Spell__Container",
|
|
36834
36891
|
componentId: "sc-j96fa2-0"
|
|
36835
36892
|
})(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
|
|
@@ -36908,7 +36965,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
36908
36965
|
height: "inherit",
|
|
36909
36966
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
36910
36967
|
scale: scale
|
|
36911
|
-
}, React.createElement(Container$
|
|
36968
|
+
}, React.createElement(Container$J, null, React.createElement(Title$d, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
36912
36969
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
36913
36970
|
settingShortcutIndex: settingShortcutIndex,
|
|
36914
36971
|
shortcuts: shortcuts,
|
|
@@ -36944,7 +37001,7 @@ var Title$d = /*#__PURE__*/styled.h1.withConfig({
|
|
|
36944
37001
|
displayName: "Spellbook__Title",
|
|
36945
37002
|
componentId: "sc-r02nfq-0"
|
|
36946
37003
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
36947
|
-
var Container$
|
|
37004
|
+
var Container$J = /*#__PURE__*/styled.div.withConfig({
|
|
36948
37005
|
displayName: "Spellbook__Container",
|
|
36949
37006
|
componentId: "sc-r02nfq-1"
|
|
36950
37007
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -37096,6 +37153,1333 @@ var ProgressIndicator = /*#__PURE__*/styled.div.withConfig({
|
|
|
37096
37153
|
return isActive ? '0 0 0 1px black, 1px 1px 0 1px black, 2px 2px 0 1px black, -1px -1px 0 1px black' : '0 0 0 1px black, 1px 1px 0 1px gray, 2px 2px 0 1px gray, -1px -1px 0 1px gray';
|
|
37097
37154
|
});
|
|
37098
37155
|
|
|
37156
|
+
var CTAButton = function CTAButton(_ref) {
|
|
37157
|
+
var icon = _ref.icon,
|
|
37158
|
+
label = _ref.label,
|
|
37159
|
+
onClick = _ref.onClick,
|
|
37160
|
+
className = _ref.className,
|
|
37161
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
37162
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
37163
|
+
_ref$textColor = _ref.textColor,
|
|
37164
|
+
textColor = _ref$textColor === void 0 ? '#ffffff' : _ref$textColor,
|
|
37165
|
+
_ref$iconColor = _ref.iconColor,
|
|
37166
|
+
iconColor = _ref$iconColor === void 0 ? '#f59e0b' : _ref$iconColor,
|
|
37167
|
+
_ref$disabled = _ref.disabled,
|
|
37168
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
37169
|
+
return React.createElement(ButtonContainer$5, {
|
|
37170
|
+
className: className,
|
|
37171
|
+
onPointerDown: disabled ? undefined : onClick,
|
|
37172
|
+
"$fullWidth": fullWidth,
|
|
37173
|
+
"$disabled": disabled,
|
|
37174
|
+
"$color": textColor
|
|
37175
|
+
}, React.createElement(ButtonContent, null, React.createElement(IconWrapper, {
|
|
37176
|
+
"$color": iconColor,
|
|
37177
|
+
"$disabled": disabled
|
|
37178
|
+
}, icon), label && React.createElement(ButtonLabel, {
|
|
37179
|
+
"$color": textColor,
|
|
37180
|
+
"$disabled": disabled
|
|
37181
|
+
}, label)));
|
|
37182
|
+
};
|
|
37183
|
+
var ButtonContainer$5 = /*#__PURE__*/styled.div.withConfig({
|
|
37184
|
+
displayName: "CTAButton__ButtonContainer",
|
|
37185
|
+
componentId: "sc-1azvwn5-0"
|
|
37186
|
+
})(["display:inline-flex;align-items:center;padding:0.75rem 1.25rem;background:rgba(0,0,0,0.3);border:2px solid #f59e0b;box-shadow:0 0 10px rgba(245,158,11,0.3);border-radius:4px;cursor:", ";transition:all 0.2s;position:relative;opacity:", ";color:", ";", " &:hover{background:", ";box-shadow:", ";transform:", ";}&:active{transform:", ";box-shadow:", ";}&:before{content:'';position:absolute;inset:-1px;border-radius:5px;padding:1px;background:linear-gradient(45deg,#f59e0b,#fbbf24,#f59e0b);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:destination-out;}"], function (props) {
|
|
37187
|
+
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
37188
|
+
}, function (props) {
|
|
37189
|
+
return props.$disabled ? 0.5 : 1;
|
|
37190
|
+
}, function (props) {
|
|
37191
|
+
return props.$disabled ? '#6b7280' : props.$color;
|
|
37192
|
+
}, function (props) {
|
|
37193
|
+
return props.$fullWidth && css(["display:flex;justify-content:center;"]);
|
|
37194
|
+
}, function (props) {
|
|
37195
|
+
return props.$disabled ? 'rgba(0, 0, 0, 0.3)' : 'rgba(0, 0, 0, 0.4)';
|
|
37196
|
+
}, function (props) {
|
|
37197
|
+
return props.$disabled ? '0 0 10px rgba(245, 158, 11, 0.3)' : '0 0 15px rgba(245, 158, 11, 0.4)';
|
|
37198
|
+
}, function (props) {
|
|
37199
|
+
return props.$disabled ? 'none' : 'translateY(-1px)';
|
|
37200
|
+
}, function (props) {
|
|
37201
|
+
return props.$disabled ? 'none' : 'translateY(1px)';
|
|
37202
|
+
}, function (props) {
|
|
37203
|
+
return props.$disabled ? '0 0 10px rgba(245, 158, 11, 0.3)' : '0 0 5px rgba(245, 158, 11, 0.2)';
|
|
37204
|
+
});
|
|
37205
|
+
var ButtonContent = /*#__PURE__*/styled.div.withConfig({
|
|
37206
|
+
displayName: "CTAButton__ButtonContent",
|
|
37207
|
+
componentId: "sc-1azvwn5-1"
|
|
37208
|
+
})(["display:flex;align-items:center;gap:0.75rem;"]);
|
|
37209
|
+
var IconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
37210
|
+
displayName: "CTAButton__IconWrapper",
|
|
37211
|
+
componentId: "sc-1azvwn5-2"
|
|
37212
|
+
})(["svg{font-size:1.25rem;color:", ";filter:drop-shadow(0 0 2px rgba(245,158,11,0.5));opacity:", ";}"], function (props) {
|
|
37213
|
+
return props.$color;
|
|
37214
|
+
}, function (props) {
|
|
37215
|
+
return props.$disabled ? 0.5 : 1;
|
|
37216
|
+
});
|
|
37217
|
+
var ButtonLabel = /*#__PURE__*/styled.span.withConfig({
|
|
37218
|
+
displayName: "CTAButton__ButtonLabel",
|
|
37219
|
+
componentId: "sc-1azvwn5-3"
|
|
37220
|
+
})(["color:", ";font-family:'Press Start 2P',cursive;font-size:0.875rem;text-shadow:0 0 4px rgba(245,158,11,0.5);opacity:", ";"], function (props) {
|
|
37221
|
+
return props.$color;
|
|
37222
|
+
}, function (props) {
|
|
37223
|
+
return props.$disabled ? 0.5 : 1;
|
|
37224
|
+
});
|
|
37225
|
+
|
|
37226
|
+
var MetadataDisplay = function MetadataDisplay(_ref) {
|
|
37227
|
+
var _metadata$selectedSki;
|
|
37228
|
+
var type = _ref.type,
|
|
37229
|
+
metadata = _ref.metadata;
|
|
37230
|
+
switch (type) {
|
|
37231
|
+
case MetadataType.CharacterSkin:
|
|
37232
|
+
return React.createElement(MetadataInfo, null, React.createElement(MetadataLabel, null, React.createElement(FaInfoCircle, null), React.createElement("span", null, "Skin:")), React.createElement(MetadataValue, null, ((_metadata$selectedSki = metadata.selectedSkin) == null ? void 0 : _metadata$selectedSki.name) || 'Custom skin'));
|
|
37233
|
+
default:
|
|
37234
|
+
return null;
|
|
37235
|
+
}
|
|
37236
|
+
};
|
|
37237
|
+
var CartView = function CartView(_ref2) {
|
|
37238
|
+
var cartItems = _ref2.cartItems,
|
|
37239
|
+
onRemoveFromCart = _ref2.onRemoveFromCart,
|
|
37240
|
+
onClose = _ref2.onClose,
|
|
37241
|
+
onPurchase = _ref2.onPurchase,
|
|
37242
|
+
atlasJSON = _ref2.atlasJSON,
|
|
37243
|
+
atlasIMG = _ref2.atlasIMG;
|
|
37244
|
+
var _useState = useState(false),
|
|
37245
|
+
isLoading = _useState[0],
|
|
37246
|
+
setIsLoading = _useState[1];
|
|
37247
|
+
var _useState2 = useState(null),
|
|
37248
|
+
error = _useState2[0],
|
|
37249
|
+
setError = _useState2[1];
|
|
37250
|
+
var total = cartItems.reduce(function (sum, cartItem) {
|
|
37251
|
+
return sum + cartItem.item.price * cartItem.quantity;
|
|
37252
|
+
}, 0);
|
|
37253
|
+
var formatPrice = function formatPrice(price) {
|
|
37254
|
+
return price.toFixed(2);
|
|
37255
|
+
};
|
|
37256
|
+
var handlePurchase = /*#__PURE__*/function () {
|
|
37257
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
37258
|
+
var success;
|
|
37259
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
37260
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37261
|
+
case 0:
|
|
37262
|
+
_context.prev = 0;
|
|
37263
|
+
setIsLoading(true);
|
|
37264
|
+
setError(null);
|
|
37265
|
+
_context.next = 5;
|
|
37266
|
+
return onPurchase();
|
|
37267
|
+
case 5:
|
|
37268
|
+
success = _context.sent;
|
|
37269
|
+
if (!success) {
|
|
37270
|
+
setError('Purchase failed. Please try again.');
|
|
37271
|
+
}
|
|
37272
|
+
_context.next = 13;
|
|
37273
|
+
break;
|
|
37274
|
+
case 9:
|
|
37275
|
+
_context.prev = 9;
|
|
37276
|
+
_context.t0 = _context["catch"](0);
|
|
37277
|
+
setError('An error occurred during purchase. Please try again.');
|
|
37278
|
+
console.error('Purchase error:', _context.t0);
|
|
37279
|
+
case 13:
|
|
37280
|
+
_context.prev = 13;
|
|
37281
|
+
setIsLoading(false);
|
|
37282
|
+
return _context.finish(13);
|
|
37283
|
+
case 16:
|
|
37284
|
+
case "end":
|
|
37285
|
+
return _context.stop();
|
|
37286
|
+
}
|
|
37287
|
+
}, _callee, null, [[0, 9, 13, 16]]);
|
|
37288
|
+
}));
|
|
37289
|
+
return function handlePurchase() {
|
|
37290
|
+
return _ref3.apply(this, arguments);
|
|
37291
|
+
};
|
|
37292
|
+
}();
|
|
37293
|
+
return React.createElement(Container$K, null, React.createElement(Header$7, null, React.createElement(Title$e, null, "Shopping Cart"), React.createElement(CloseButton$9, {
|
|
37294
|
+
onPointerDown: onClose
|
|
37295
|
+
}, React.createElement(FaTimes, null))), React.createElement(CartItems, null, cartItems.length === 0 ? React.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
|
|
37296
|
+
return React.createElement(CartItemRow, {
|
|
37297
|
+
key: cartItem.item.key
|
|
37298
|
+
}, React.createElement(ItemIconContainer$1, null, React.createElement(SpriteFromAtlas, {
|
|
37299
|
+
atlasJSON: atlasJSON,
|
|
37300
|
+
atlasIMG: atlasIMG,
|
|
37301
|
+
spriteKey: cartItem.item.texturePath,
|
|
37302
|
+
width: 32,
|
|
37303
|
+
height: 32,
|
|
37304
|
+
imgScale: 2,
|
|
37305
|
+
centered: true
|
|
37306
|
+
})), React.createElement(ItemDetails, null, React.createElement(ItemName, null, cartItem.item.name), React.createElement(ItemInfo$1, null, React.createElement("span", null, "$", formatPrice(cartItem.item.price)), React.createElement("span", null, "\xD7"), React.createElement("span", null, cartItem.quantity), React.createElement("span", null, "="), React.createElement("span", null, "$", formatPrice(cartItem.item.price * cartItem.quantity))), cartItem.metadata && cartItem.item.metadataType && React.createElement(MetadataDisplay, {
|
|
37307
|
+
type: cartItem.item.metadataType,
|
|
37308
|
+
metadata: cartItem.metadata
|
|
37309
|
+
})), React.createElement(CTAButton, {
|
|
37310
|
+
icon: React.createElement(FaTrash, null),
|
|
37311
|
+
onClick: function onClick(e) {
|
|
37312
|
+
e.stopPropagation();
|
|
37313
|
+
onRemoveFromCart(cartItem.item.key);
|
|
37314
|
+
}
|
|
37315
|
+
}));
|
|
37316
|
+
})), React.createElement(Footer$1, null, React.createElement(TotalInfo, null, React.createElement(TotalRow, null, React.createElement("span", null, "Total:"), React.createElement("span", null, "$", formatPrice(total))), error && React.createElement(ErrorMessage$1, null, error)), React.createElement(CTAButton, {
|
|
37317
|
+
icon: React.createElement(FaShoppingBag, null),
|
|
37318
|
+
label: isLoading ? 'Processing...' : 'Complete Purchase',
|
|
37319
|
+
onClick: handlePurchase,
|
|
37320
|
+
fullWidth: true,
|
|
37321
|
+
disabled: cartItems.length === 0 || isLoading
|
|
37322
|
+
})));
|
|
37323
|
+
};
|
|
37324
|
+
var Container$K = /*#__PURE__*/styled.div.withConfig({
|
|
37325
|
+
displayName: "CartView__Container",
|
|
37326
|
+
componentId: "sc-ydtyl1-0"
|
|
37327
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;gap:1.5rem;padding:1.5rem;"]);
|
|
37328
|
+
var Header$7 = /*#__PURE__*/styled.div.withConfig({
|
|
37329
|
+
displayName: "CartView__Header",
|
|
37330
|
+
componentId: "sc-ydtyl1-1"
|
|
37331
|
+
})(["display:flex;justify-content:space-between;align-items:center;"]);
|
|
37332
|
+
var Title$e = /*#__PURE__*/styled.h2.withConfig({
|
|
37333
|
+
displayName: "CartView__Title",
|
|
37334
|
+
componentId: "sc-ydtyl1-2"
|
|
37335
|
+
})(["font-family:'Press Start 2P',cursive;font-size:1rem;color:#ffffff;margin:0;"]);
|
|
37336
|
+
var CloseButton$9 = /*#__PURE__*/styled.div.withConfig({
|
|
37337
|
+
displayName: "CartView__CloseButton",
|
|
37338
|
+
componentId: "sc-ydtyl1-3"
|
|
37339
|
+
})(["padding:0.5rem;min-width:unset;width:42px;height:42px;display:flex;font-size:1.5rem;align-items:center;color:white;justify-content:center;"]);
|
|
37340
|
+
var CartItems = /*#__PURE__*/styled.div.withConfig({
|
|
37341
|
+
displayName: "CartView__CartItems",
|
|
37342
|
+
componentId: "sc-ydtyl1-4"
|
|
37343
|
+
})(["display:flex;flex-direction:column;gap:1rem;overflow-y:auto;flex:1;min-height:200px;padding-right:0.5rem;&::-webkit-scrollbar{width:8px;background-color:rgba(0,0,0,0.2);border-radius:4px;}&::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2);border-radius:4px;&:hover{background-color:rgba(255,255,255,0.3);}}scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.2) rgba(0,0,0,0.2);"]);
|
|
37344
|
+
var EmptyCart = /*#__PURE__*/styled.div.withConfig({
|
|
37345
|
+
displayName: "CartView__EmptyCart",
|
|
37346
|
+
componentId: "sc-ydtyl1-5"
|
|
37347
|
+
})(["display:flex;align-items:center;justify-content:center;height:100%;color:#ffffff;font-family:'Press Start 2P',cursive;font-size:0.875rem;opacity:0.7;"]);
|
|
37348
|
+
var CartItemRow = /*#__PURE__*/styled.div.withConfig({
|
|
37349
|
+
displayName: "CartView__CartItemRow",
|
|
37350
|
+
componentId: "sc-ydtyl1-6"
|
|
37351
|
+
})(["display:flex;align-items:center;gap:1rem;padding:1rem;background:rgba(0,0,0,0.2);border-radius:4px;"]);
|
|
37352
|
+
var ItemIconContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37353
|
+
displayName: "CartView__ItemIconContainer",
|
|
37354
|
+
componentId: "sc-ydtyl1-7"
|
|
37355
|
+
})(["width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px;"]);
|
|
37356
|
+
var ItemDetails = /*#__PURE__*/styled.div.withConfig({
|
|
37357
|
+
displayName: "CartView__ItemDetails",
|
|
37358
|
+
componentId: "sc-ydtyl1-8"
|
|
37359
|
+
})(["flex:1;display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
37360
|
+
var ItemName = /*#__PURE__*/styled.div.withConfig({
|
|
37361
|
+
displayName: "CartView__ItemName",
|
|
37362
|
+
componentId: "sc-ydtyl1-9"
|
|
37363
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.875rem;color:#ffffff;"]);
|
|
37364
|
+
var ItemInfo$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37365
|
+
displayName: "CartView__ItemInfo",
|
|
37366
|
+
componentId: "sc-ydtyl1-10"
|
|
37367
|
+
})(["display:flex;align-items:center;gap:0.5rem;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#fef08a;"]);
|
|
37368
|
+
var Footer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37369
|
+
displayName: "CartView__Footer",
|
|
37370
|
+
componentId: "sc-ydtyl1-11"
|
|
37371
|
+
})(["display:flex;flex-direction:column;gap:1.5rem;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,0.1);flex-shrink:0;"]);
|
|
37372
|
+
var TotalInfo = /*#__PURE__*/styled.div.withConfig({
|
|
37373
|
+
displayName: "CartView__TotalInfo",
|
|
37374
|
+
componentId: "sc-ydtyl1-12"
|
|
37375
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
37376
|
+
var TotalRow = /*#__PURE__*/styled.div.withConfig({
|
|
37377
|
+
displayName: "CartView__TotalRow",
|
|
37378
|
+
componentId: "sc-ydtyl1-13"
|
|
37379
|
+
})(["display:flex;align-items:center;justify-content:space-between;gap:1rem;font-family:'Press Start 2P',cursive;font-size:1rem;color:#ffffff;span:last-child{color:#fef08a;}"]);
|
|
37380
|
+
var ErrorMessage$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37381
|
+
displayName: "CartView__ErrorMessage",
|
|
37382
|
+
componentId: "sc-ydtyl1-14"
|
|
37383
|
+
})(["color:#ef4444;font-size:0.875rem;font-family:'Press Start 2P',cursive;text-align:center;"]);
|
|
37384
|
+
var MetadataInfo = /*#__PURE__*/styled.div.withConfig({
|
|
37385
|
+
displayName: "CartView__MetadataInfo",
|
|
37386
|
+
componentId: "sc-ydtyl1-15"
|
|
37387
|
+
})(["display:flex;align-items:center;margin-top:0.5rem;gap:0.5rem;font-size:0.75rem;color:#a3e635;background:rgba(163,230,53,0.1);padding:0.25rem 0.5rem;border-radius:4px;"]);
|
|
37388
|
+
var MetadataLabel = /*#__PURE__*/styled.div.withConfig({
|
|
37389
|
+
displayName: "CartView__MetadataLabel",
|
|
37390
|
+
componentId: "sc-ydtyl1-16"
|
|
37391
|
+
})(["display:flex;align-items:center;gap:0.25rem;font-weight:bold;color:#d9f99d;"]);
|
|
37392
|
+
var MetadataValue = /*#__PURE__*/styled.div.withConfig({
|
|
37393
|
+
displayName: "CartView__MetadataValue",
|
|
37394
|
+
componentId: "sc-ydtyl1-17"
|
|
37395
|
+
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
37396
|
+
|
|
37397
|
+
var useStoreMetadata = function useStoreMetadata() {
|
|
37398
|
+
var _useState = useState(false),
|
|
37399
|
+
isCollectingMetadata = _useState[0],
|
|
37400
|
+
setIsCollectingMetadata = _useState[1];
|
|
37401
|
+
var collectMetadata = /*#__PURE__*/function () {
|
|
37402
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item) {
|
|
37403
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
37404
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37405
|
+
case 0:
|
|
37406
|
+
if (!(!item.metadataType || item.metadataType === MetadataType.None)) {
|
|
37407
|
+
_context.next = 2;
|
|
37408
|
+
break;
|
|
37409
|
+
}
|
|
37410
|
+
return _context.abrupt("return", null);
|
|
37411
|
+
case 2:
|
|
37412
|
+
setIsCollectingMetadata(true);
|
|
37413
|
+
_context.prev = 3;
|
|
37414
|
+
_context.next = 6;
|
|
37415
|
+
return new Promise(function (_resolve) {
|
|
37416
|
+
// We'll store the resolver functions in a global context
|
|
37417
|
+
// that will be accessible to the MetadataCollector component
|
|
37418
|
+
window.__metadataResolvers = {
|
|
37419
|
+
resolve: function resolve(metadata) {
|
|
37420
|
+
_resolve(metadata);
|
|
37421
|
+
},
|
|
37422
|
+
item: item
|
|
37423
|
+
};
|
|
37424
|
+
});
|
|
37425
|
+
case 6:
|
|
37426
|
+
return _context.abrupt("return", _context.sent);
|
|
37427
|
+
case 7:
|
|
37428
|
+
_context.prev = 7;
|
|
37429
|
+
setIsCollectingMetadata(false);
|
|
37430
|
+
// Clean up the resolvers
|
|
37431
|
+
if (window.__metadataResolvers) {
|
|
37432
|
+
delete window.__metadataResolvers;
|
|
37433
|
+
}
|
|
37434
|
+
return _context.finish(7);
|
|
37435
|
+
case 11:
|
|
37436
|
+
case "end":
|
|
37437
|
+
return _context.stop();
|
|
37438
|
+
}
|
|
37439
|
+
}, _callee, null, [[3,, 7, 11]]);
|
|
37440
|
+
}));
|
|
37441
|
+
return function collectMetadata(_x) {
|
|
37442
|
+
return _ref.apply(this, arguments);
|
|
37443
|
+
};
|
|
37444
|
+
}();
|
|
37445
|
+
return {
|
|
37446
|
+
collectMetadata: collectMetadata,
|
|
37447
|
+
isCollectingMetadata: isCollectingMetadata
|
|
37448
|
+
};
|
|
37449
|
+
};
|
|
37450
|
+
|
|
37451
|
+
var useStoreCart = function useStoreCart() {
|
|
37452
|
+
var _useState = useState([]),
|
|
37453
|
+
cartItems = _useState[0],
|
|
37454
|
+
setCartItems = _useState[1];
|
|
37455
|
+
var _useState2 = useState(false),
|
|
37456
|
+
isCartOpen = _useState2[0],
|
|
37457
|
+
setIsCartOpen = _useState2[1];
|
|
37458
|
+
var isMounted = useRef(true);
|
|
37459
|
+
useEffect(function () {
|
|
37460
|
+
return function () {
|
|
37461
|
+
isMounted.current = false;
|
|
37462
|
+
};
|
|
37463
|
+
}, []);
|
|
37464
|
+
var _useStoreMetadata = useStoreMetadata(),
|
|
37465
|
+
collectMetadata = _useStoreMetadata.collectMetadata,
|
|
37466
|
+
isCollectingMetadata = _useStoreMetadata.isCollectingMetadata;
|
|
37467
|
+
var handleAddToCart = /*#__PURE__*/function () {
|
|
37468
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item, quantity, preselectedMetadata) {
|
|
37469
|
+
var metadata;
|
|
37470
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
37471
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37472
|
+
case 0:
|
|
37473
|
+
if (!preselectedMetadata) {
|
|
37474
|
+
_context.next = 3;
|
|
37475
|
+
break;
|
|
37476
|
+
}
|
|
37477
|
+
setCartItems(function (prevItems) {
|
|
37478
|
+
return [].concat(prevItems, [{
|
|
37479
|
+
item: item,
|
|
37480
|
+
quantity: quantity,
|
|
37481
|
+
metadata: preselectedMetadata
|
|
37482
|
+
}]);
|
|
37483
|
+
});
|
|
37484
|
+
return _context.abrupt("return");
|
|
37485
|
+
case 3:
|
|
37486
|
+
if (!(item.metadataType && item.metadataType !== MetadataType.None)) {
|
|
37487
|
+
_context.next = 12;
|
|
37488
|
+
break;
|
|
37489
|
+
}
|
|
37490
|
+
_context.next = 6;
|
|
37491
|
+
return collectMetadata(item);
|
|
37492
|
+
case 6:
|
|
37493
|
+
metadata = _context.sent;
|
|
37494
|
+
if (metadata) {
|
|
37495
|
+
_context.next = 9;
|
|
37496
|
+
break;
|
|
37497
|
+
}
|
|
37498
|
+
return _context.abrupt("return");
|
|
37499
|
+
case 9:
|
|
37500
|
+
// User cancelled
|
|
37501
|
+
// Add item with metadata
|
|
37502
|
+
setCartItems(function (prevItems) {
|
|
37503
|
+
// Create new cart item with metadata
|
|
37504
|
+
return [].concat(prevItems, [{
|
|
37505
|
+
item: item,
|
|
37506
|
+
quantity: quantity,
|
|
37507
|
+
metadata: metadata
|
|
37508
|
+
}]);
|
|
37509
|
+
});
|
|
37510
|
+
_context.next = 13;
|
|
37511
|
+
break;
|
|
37512
|
+
case 12:
|
|
37513
|
+
// Existing add to cart logic for items without metadata
|
|
37514
|
+
setCartItems(function (prevItems) {
|
|
37515
|
+
var existingItem = prevItems.find(function (cartItem) {
|
|
37516
|
+
return cartItem.item.key === item.key;
|
|
37517
|
+
});
|
|
37518
|
+
if (existingItem) {
|
|
37519
|
+
return prevItems.map(function (cartItem) {
|
|
37520
|
+
return cartItem.item.key === item.key ? _extends({}, cartItem, {
|
|
37521
|
+
quantity: Math.min(cartItem.quantity + quantity, 99)
|
|
37522
|
+
}) : cartItem;
|
|
37523
|
+
});
|
|
37524
|
+
}
|
|
37525
|
+
return [].concat(prevItems, [{
|
|
37526
|
+
item: item,
|
|
37527
|
+
quantity: quantity
|
|
37528
|
+
}]);
|
|
37529
|
+
});
|
|
37530
|
+
case 13:
|
|
37531
|
+
case "end":
|
|
37532
|
+
return _context.stop();
|
|
37533
|
+
}
|
|
37534
|
+
}, _callee);
|
|
37535
|
+
}));
|
|
37536
|
+
return function handleAddToCart(_x, _x2, _x3) {
|
|
37537
|
+
return _ref.apply(this, arguments);
|
|
37538
|
+
};
|
|
37539
|
+
}();
|
|
37540
|
+
var handleRemoveFromCart = function handleRemoveFromCart(itemKey) {
|
|
37541
|
+
setCartItems(function (prevItems) {
|
|
37542
|
+
return prevItems.filter(function (cartItem) {
|
|
37543
|
+
return cartItem.item.key !== itemKey;
|
|
37544
|
+
});
|
|
37545
|
+
});
|
|
37546
|
+
};
|
|
37547
|
+
var handlePurchase = function handlePurchase(onPurchase) {
|
|
37548
|
+
var purchaseUnits = cartItems.map(function (cartItem) {
|
|
37549
|
+
return {
|
|
37550
|
+
purchaseKey: cartItem.item.key,
|
|
37551
|
+
qty: cartItem.quantity,
|
|
37552
|
+
type: getPurchaseType(cartItem.item),
|
|
37553
|
+
name: cartItem.item.name,
|
|
37554
|
+
metadata: cartItem.metadata || cartItem.item.metadataConfig
|
|
37555
|
+
};
|
|
37556
|
+
});
|
|
37557
|
+
var purchase = {
|
|
37558
|
+
_id: uuidv4(),
|
|
37559
|
+
userId: '1',
|
|
37560
|
+
status: 'pending',
|
|
37561
|
+
createdAt: new Date().toISOString(),
|
|
37562
|
+
updatedAt: new Date().toISOString(),
|
|
37563
|
+
purchases: purchaseUnits
|
|
37564
|
+
};
|
|
37565
|
+
onPurchase(purchase);
|
|
37566
|
+
if (isMounted.current) {
|
|
37567
|
+
setCartItems([]);
|
|
37568
|
+
setIsCartOpen(false);
|
|
37569
|
+
}
|
|
37570
|
+
};
|
|
37571
|
+
var openCart = function openCart() {
|
|
37572
|
+
return setIsCartOpen(true);
|
|
37573
|
+
};
|
|
37574
|
+
var closeCart = function closeCart() {
|
|
37575
|
+
return setIsCartOpen(false);
|
|
37576
|
+
};
|
|
37577
|
+
var getTotalItems = function getTotalItems() {
|
|
37578
|
+
return cartItems.reduce(function (sum, item) {
|
|
37579
|
+
return sum + item.quantity;
|
|
37580
|
+
}, 0);
|
|
37581
|
+
};
|
|
37582
|
+
var getTotalPrice = function getTotalPrice() {
|
|
37583
|
+
return Number(cartItems.reduce(function (sum, item) {
|
|
37584
|
+
return sum + item.item.price * item.quantity;
|
|
37585
|
+
}, 0).toFixed(2));
|
|
37586
|
+
};
|
|
37587
|
+
return {
|
|
37588
|
+
cartItems: cartItems,
|
|
37589
|
+
isCartOpen: isCartOpen,
|
|
37590
|
+
handleAddToCart: handleAddToCart,
|
|
37591
|
+
handleRemoveFromCart: handleRemoveFromCart,
|
|
37592
|
+
handlePurchase: handlePurchase,
|
|
37593
|
+
openCart: openCart,
|
|
37594
|
+
closeCart: closeCart,
|
|
37595
|
+
getTotalItems: getTotalItems,
|
|
37596
|
+
getTotalPrice: getTotalPrice,
|
|
37597
|
+
isCollectingMetadata: isCollectingMetadata
|
|
37598
|
+
};
|
|
37599
|
+
};
|
|
37600
|
+
// Helper functions
|
|
37601
|
+
function getPurchaseType(item) {
|
|
37602
|
+
// Check if the item comes from a pack based on naming convention or other property
|
|
37603
|
+
if (item.key.startsWith('pack_')) {
|
|
37604
|
+
return PurchaseType.Pack;
|
|
37605
|
+
} else {
|
|
37606
|
+
return PurchaseType.Item;
|
|
37607
|
+
}
|
|
37608
|
+
}
|
|
37609
|
+
function uuidv4() {
|
|
37610
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
37611
|
+
var r = Math.random() * 16 | 0,
|
|
37612
|
+
v = c === 'x' ? r : r & 0x3 | 0x8;
|
|
37613
|
+
return v.toString(16);
|
|
37614
|
+
});
|
|
37615
|
+
}
|
|
37616
|
+
|
|
37617
|
+
var MetadataCollector = function MetadataCollector(_ref) {
|
|
37618
|
+
var metadataType = _ref.metadataType,
|
|
37619
|
+
config = _ref.config,
|
|
37620
|
+
onCollect = _ref.onCollect,
|
|
37621
|
+
onCancel = _ref.onCancel;
|
|
37622
|
+
// Make sure we clean up if unmounted without collecting
|
|
37623
|
+
useEffect(function () {
|
|
37624
|
+
return function () {
|
|
37625
|
+
// If we're unmounting without explicitly collecting or canceling,
|
|
37626
|
+
// make sure to call onCancel to prevent any hanging promises
|
|
37627
|
+
if (window.__metadataResolvers) {
|
|
37628
|
+
onCancel();
|
|
37629
|
+
}
|
|
37630
|
+
};
|
|
37631
|
+
}, [onCancel]);
|
|
37632
|
+
// Use string comparison instead of direct property access
|
|
37633
|
+
if (metadataType === 'CharacterSkin') {
|
|
37634
|
+
return React.createElement(CharacterSkinSelectionModal, {
|
|
37635
|
+
isOpen: true,
|
|
37636
|
+
onClose: onCancel,
|
|
37637
|
+
onConfirm: function onConfirm(selectedSkin) {
|
|
37638
|
+
return onCollect({
|
|
37639
|
+
selectedSkin: selectedSkin
|
|
37640
|
+
});
|
|
37641
|
+
},
|
|
37642
|
+
availableCharacters: config.availableCharacters || [],
|
|
37643
|
+
atlasJSON: config.atlasJSON,
|
|
37644
|
+
atlasIMG: config.atlasIMG,
|
|
37645
|
+
initialSelectedSkin: config.initialSelectedSkin
|
|
37646
|
+
});
|
|
37647
|
+
} else {
|
|
37648
|
+
console.warn("No collector implemented for metadata type: " + metadataType);
|
|
37649
|
+
// Auto-cancel for unhandled types to prevent hanging promises
|
|
37650
|
+
setTimeout(onCancel, 0);
|
|
37651
|
+
return null;
|
|
37652
|
+
}
|
|
37653
|
+
};
|
|
37654
|
+
|
|
37655
|
+
var ScrollableContent = function ScrollableContent(_ref) {
|
|
37656
|
+
var items = _ref.items,
|
|
37657
|
+
renderItem = _ref.renderItem,
|
|
37658
|
+
_ref$emptyMessage = _ref.emptyMessage,
|
|
37659
|
+
emptyMessage = _ref$emptyMessage === void 0 ? 'No items found' : _ref$emptyMessage,
|
|
37660
|
+
className = _ref.className,
|
|
37661
|
+
filterOptions = _ref.filterOptions,
|
|
37662
|
+
searchOptions = _ref.searchOptions,
|
|
37663
|
+
_ref$layout = _ref.layout,
|
|
37664
|
+
layout = _ref$layout === void 0 ? 'list' : _ref$layout,
|
|
37665
|
+
_ref$gridColumns = _ref.gridColumns,
|
|
37666
|
+
gridColumns = _ref$gridColumns === void 0 ? 4 : _ref$gridColumns,
|
|
37667
|
+
_ref$maxHeight = _ref.maxHeight,
|
|
37668
|
+
maxHeight = _ref$maxHeight === void 0 ? '500px' : _ref$maxHeight;
|
|
37669
|
+
if (items.length === 0) {
|
|
37670
|
+
return React.createElement(EmptyMessage$1, null, emptyMessage);
|
|
37671
|
+
}
|
|
37672
|
+
return React.createElement(Container$L, {
|
|
37673
|
+
className: className
|
|
37674
|
+
}, (searchOptions || filterOptions) && React.createElement(HeaderContainer$3, null, React.createElement(HeaderContent$1, null, searchOptions && React.createElement(SearchContainer$3, null, React.createElement(StyledSearchBar$2, {
|
|
37675
|
+
value: searchOptions.value,
|
|
37676
|
+
onChange: searchOptions.onChange,
|
|
37677
|
+
placeholder: searchOptions.placeholder || 'Search...'
|
|
37678
|
+
})), filterOptions && React.createElement(FilterContainer$1, null, React.createElement(StyledDropdown$3, {
|
|
37679
|
+
options: filterOptions.options,
|
|
37680
|
+
onChange: filterOptions.onOptionChange,
|
|
37681
|
+
width: "200px"
|
|
37682
|
+
})))), React.createElement(Content$4, {
|
|
37683
|
+
className: "ScrollableContent-content " + layout,
|
|
37684
|
+
"$gridColumns": gridColumns,
|
|
37685
|
+
"$maxHeight": maxHeight
|
|
37686
|
+
}, items.map(function (item, index) {
|
|
37687
|
+
return React.createElement("div", {
|
|
37688
|
+
key: index,
|
|
37689
|
+
className: "ScrollableContent-item"
|
|
37690
|
+
}, renderItem(item));
|
|
37691
|
+
})));
|
|
37692
|
+
};
|
|
37693
|
+
var Container$L = /*#__PURE__*/styled.div.withConfig({
|
|
37694
|
+
displayName: "ScrollableContent__Container",
|
|
37695
|
+
componentId: "sc-xhh2um-0"
|
|
37696
|
+
})(["display:flex;flex-direction:column;gap:1rem;width:100%;"]);
|
|
37697
|
+
var HeaderContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
37698
|
+
displayName: "ScrollableContent__HeaderContainer",
|
|
37699
|
+
componentId: "sc-xhh2um-1"
|
|
37700
|
+
})(["flex-shrink:0;"]);
|
|
37701
|
+
var HeaderContent$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37702
|
+
displayName: "ScrollableContent__HeaderContent",
|
|
37703
|
+
componentId: "sc-xhh2um-2"
|
|
37704
|
+
})(["display:flex;justify-content:space-between;align-items:center;gap:1rem;background:rgba(0,0,0,0.2);padding:1rem;border-radius:4px;"]);
|
|
37705
|
+
var SearchContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
37706
|
+
displayName: "ScrollableContent__SearchContainer",
|
|
37707
|
+
componentId: "sc-xhh2um-3"
|
|
37708
|
+
})(["flex:1;"]);
|
|
37709
|
+
var FilterContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37710
|
+
displayName: "ScrollableContent__FilterContainer",
|
|
37711
|
+
componentId: "sc-xhh2um-4"
|
|
37712
|
+
})(["display:flex;justify-content:flex-end;"]);
|
|
37713
|
+
var StyledSearchBar$2 = /*#__PURE__*/styled(SearchBar).withConfig({
|
|
37714
|
+
displayName: "ScrollableContent__StyledSearchBar",
|
|
37715
|
+
componentId: "sc-xhh2um-5"
|
|
37716
|
+
})(["width:100%;"]);
|
|
37717
|
+
var StyledDropdown$3 = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
37718
|
+
displayName: "ScrollableContent__StyledDropdown",
|
|
37719
|
+
componentId: "sc-xhh2um-6"
|
|
37720
|
+
})(["min-width:150px;"]);
|
|
37721
|
+
var Content$4 = /*#__PURE__*/styled.div.withConfig({
|
|
37722
|
+
displayName: "ScrollableContent__Content",
|
|
37723
|
+
componentId: "sc-xhh2um-7"
|
|
37724
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;flex:1;padding:1rem;max-height:", ";overflow-y:auto;overflow-x:hidden;&.grid{display:grid;grid-template-columns:repeat( ", ",minmax(0,1fr) );gap:1rem;align-items:start;.ScrollableContent-item{display:flex;align-items:flex-start;}}&.list{display:flex;flex-direction:column;gap:0.5rem;}"], function (props) {
|
|
37725
|
+
return props.$maxHeight;
|
|
37726
|
+
}, function (props) {
|
|
37727
|
+
return props.$gridColumns;
|
|
37728
|
+
});
|
|
37729
|
+
var EmptyMessage$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37730
|
+
displayName: "ScrollableContent__EmptyMessage",
|
|
37731
|
+
componentId: "sc-xhh2um-8"
|
|
37732
|
+
})(["text-align:center;color:#9ca3af;padding:2rem;flex:1;display:flex;align-items:center;justify-content:center;"]);
|
|
37733
|
+
|
|
37734
|
+
var StoreCharacterSkinRow = function StoreCharacterSkinRow(_ref) {
|
|
37735
|
+
var _item$metadataConfig, _item$metadataConfig2, _item$metadataConfig3, _item$requiredAccount;
|
|
37736
|
+
var item = _ref.item,
|
|
37737
|
+
atlasJSON = _ref.atlasJSON,
|
|
37738
|
+
atlasIMG = _ref.atlasIMG,
|
|
37739
|
+
onAddToCart = _ref.onAddToCart,
|
|
37740
|
+
userAccountType = _ref.userAccountType;
|
|
37741
|
+
var _useState = useState(1),
|
|
37742
|
+
quantity = _useState[0],
|
|
37743
|
+
setQuantity = _useState[1];
|
|
37744
|
+
var _useState2 = useState(0),
|
|
37745
|
+
currentIndex = _useState2[0],
|
|
37746
|
+
setCurrentIndex = _useState2[1];
|
|
37747
|
+
// Get available characters from metadata
|
|
37748
|
+
var availableCharacters = item.metadataType === MetadataType.CharacterSkin && ((_item$metadataConfig = item.metadataConfig) == null ? void 0 : _item$metadataConfig.availableCharacters) || [];
|
|
37749
|
+
// Get the active character entity atlas info
|
|
37750
|
+
var entityAtlasJSON = (_item$metadataConfig2 = item.metadataConfig) == null ? void 0 : _item$metadataConfig2.atlasJSON;
|
|
37751
|
+
var entityAtlasIMG = (_item$metadataConfig3 = item.metadataConfig) == null ? void 0 : _item$metadataConfig3.atlasIMG;
|
|
37752
|
+
// Effect to reset currentIndex when switching items
|
|
37753
|
+
useEffect(function () {
|
|
37754
|
+
setCurrentIndex(0);
|
|
37755
|
+
}, [item._id]);
|
|
37756
|
+
var handleQuantityChange = function handleQuantityChange(e) {
|
|
37757
|
+
var value = parseInt(e.target.value) || 1;
|
|
37758
|
+
setQuantity(Math.min(Math.max(1, value), 99));
|
|
37759
|
+
};
|
|
37760
|
+
var handleBlur = function handleBlur() {
|
|
37761
|
+
if (quantity < 1) setQuantity(1);
|
|
37762
|
+
if (quantity > 99) setQuantity(99);
|
|
37763
|
+
};
|
|
37764
|
+
var incrementQuantity = function incrementQuantity() {
|
|
37765
|
+
setQuantity(function (prev) {
|
|
37766
|
+
return Math.min(prev + 1, 99);
|
|
37767
|
+
});
|
|
37768
|
+
};
|
|
37769
|
+
var decrementQuantity = function decrementQuantity() {
|
|
37770
|
+
setQuantity(function (prev) {
|
|
37771
|
+
return Math.max(1, prev - 1);
|
|
37772
|
+
});
|
|
37773
|
+
};
|
|
37774
|
+
var handlePreviousSkin = function handlePreviousSkin() {
|
|
37775
|
+
setCurrentIndex(function (prevIndex) {
|
|
37776
|
+
return prevIndex === 0 ? availableCharacters.length - 1 : prevIndex - 1;
|
|
37777
|
+
});
|
|
37778
|
+
};
|
|
37779
|
+
var handleNextSkin = function handleNextSkin() {
|
|
37780
|
+
setCurrentIndex(function (prevIndex) {
|
|
37781
|
+
return prevIndex === availableCharacters.length - 1 ? 0 : prevIndex + 1;
|
|
37782
|
+
});
|
|
37783
|
+
};
|
|
37784
|
+
var hasRequiredAccount = !((_item$requiredAccount = item.requiredAccountType) != null && _item$requiredAccount.length) || item.requiredAccountType.includes(userAccountType);
|
|
37785
|
+
var handleAddToCart = function handleAddToCart() {
|
|
37786
|
+
if (!hasRequiredAccount) return;
|
|
37787
|
+
// If we have character skins, add the selected skin to the purchase
|
|
37788
|
+
if (availableCharacters.length > 0) {
|
|
37789
|
+
var selectedCharacter = availableCharacters[currentIndex];
|
|
37790
|
+
onAddToCart(item, quantity, {
|
|
37791
|
+
selectedSkin: selectedCharacter.textureKey
|
|
37792
|
+
});
|
|
37793
|
+
} else {
|
|
37794
|
+
onAddToCart(item, quantity);
|
|
37795
|
+
}
|
|
37796
|
+
setQuantity(1); // Reset quantity after adding to cart
|
|
37797
|
+
};
|
|
37798
|
+
var getSpriteKey = function getSpriteKey(textureKey) {
|
|
37799
|
+
return textureKey + '/down/standing/0.png';
|
|
37800
|
+
};
|
|
37801
|
+
var currentCharacter = availableCharacters[currentIndex];
|
|
37802
|
+
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer$2, null, availableCharacters.length > 0 && currentCharacter && entityAtlasJSON && entityAtlasIMG ? React.createElement(CharacterSkinPreviewContainer, null, React.createElement(NavArrow, {
|
|
37803
|
+
direction: "left",
|
|
37804
|
+
onPointerDown: handlePreviousSkin,
|
|
37805
|
+
size: 24
|
|
37806
|
+
}), React.createElement(SpriteContainer$5, null, React.createElement(ErrorBoundary, null, React.createElement(SpriteFromAtlas, {
|
|
37807
|
+
atlasJSON: entityAtlasJSON,
|
|
37808
|
+
atlasIMG: entityAtlasIMG,
|
|
37809
|
+
spriteKey: getSpriteKey(currentCharacter.textureKey),
|
|
37810
|
+
width: 32,
|
|
37811
|
+
height: 32,
|
|
37812
|
+
imgScale: 2,
|
|
37813
|
+
centered: true
|
|
37814
|
+
}))), React.createElement(NavArrow, {
|
|
37815
|
+
direction: "right",
|
|
37816
|
+
onPointerDown: handleNextSkin,
|
|
37817
|
+
size: 24
|
|
37818
|
+
})) : React.createElement(SpriteFromAtlas, {
|
|
37819
|
+
atlasJSON: atlasJSON,
|
|
37820
|
+
atlasIMG: atlasIMG,
|
|
37821
|
+
spriteKey: item.texturePath,
|
|
37822
|
+
width: 32,
|
|
37823
|
+
height: 32,
|
|
37824
|
+
imgScale: 2,
|
|
37825
|
+
centered: true
|
|
37826
|
+
})), React.createElement(ItemDetails$1, null, React.createElement(ItemName$1, null, item.name), availableCharacters.length > 0 && currentCharacter && React.createElement(SelectedSkin, null, "Selected: ", currentCharacter.name), React.createElement(ItemPrice, null, "$", item.price)), React.createElement(Controls, null, React.createElement(ArrowsContainer, null, React.createElement(SelectArrow, {
|
|
37827
|
+
direction: "left",
|
|
37828
|
+
onPointerDown: decrementQuantity,
|
|
37829
|
+
size: 24
|
|
37830
|
+
}), React.createElement(QuantityInput, {
|
|
37831
|
+
type: "number",
|
|
37832
|
+
value: quantity,
|
|
37833
|
+
onChange: handleQuantityChange,
|
|
37834
|
+
onBlur: handleBlur,
|
|
37835
|
+
min: 1,
|
|
37836
|
+
max: 99,
|
|
37837
|
+
className: "rpgui-input"
|
|
37838
|
+
}), React.createElement(SelectArrow, {
|
|
37839
|
+
direction: "right",
|
|
37840
|
+
onPointerDown: incrementQuantity,
|
|
37841
|
+
size: 24
|
|
37842
|
+
})), React.createElement(CTAButton, {
|
|
37843
|
+
icon: React.createElement(FaCartPlus, null),
|
|
37844
|
+
label: "Add",
|
|
37845
|
+
onClick: handleAddToCart,
|
|
37846
|
+
disabled: !hasRequiredAccount
|
|
37847
|
+
})));
|
|
37848
|
+
};
|
|
37849
|
+
var ItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
37850
|
+
displayName: "StoreCharacterSkinRow__ItemWrapper",
|
|
37851
|
+
componentId: "sc-81xqsx-0"
|
|
37852
|
+
})(["display:flex;align-items:center;gap:1rem;padding:1rem;border-bottom:1px solid rgba(255,255,255,0.1);&:last-child{border-bottom:none;}"]);
|
|
37853
|
+
var ItemIconContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
37854
|
+
displayName: "StoreCharacterSkinRow__ItemIconContainer",
|
|
37855
|
+
componentId: "sc-81xqsx-1"
|
|
37856
|
+
})(["min-width:140px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px;"]);
|
|
37857
|
+
var CharacterSkinPreviewContainer = /*#__PURE__*/styled.div.withConfig({
|
|
37858
|
+
displayName: "StoreCharacterSkinRow__CharacterSkinPreviewContainer",
|
|
37859
|
+
componentId: "sc-81xqsx-2"
|
|
37860
|
+
})(["position:relative;display:flex;align-items:center;width:140px;height:42px;justify-content:space-between;"]);
|
|
37861
|
+
var SpriteContainer$5 = /*#__PURE__*/styled.div.withConfig({
|
|
37862
|
+
displayName: "StoreCharacterSkinRow__SpriteContainer",
|
|
37863
|
+
componentId: "sc-81xqsx-3"
|
|
37864
|
+
})(["display:flex;align-items:center;justify-content:center;position:absolute;left:50%;transform:translateX(-50%);"]);
|
|
37865
|
+
var NavArrow = /*#__PURE__*/styled(SelectArrow).withConfig({
|
|
37866
|
+
displayName: "StoreCharacterSkinRow__NavArrow",
|
|
37867
|
+
componentId: "sc-81xqsx-4"
|
|
37868
|
+
})(["z-index:2;"]);
|
|
37869
|
+
var ItemDetails$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37870
|
+
displayName: "StoreCharacterSkinRow__ItemDetails",
|
|
37871
|
+
componentId: "sc-81xqsx-5"
|
|
37872
|
+
})(["flex:1;display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
37873
|
+
var ItemName$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37874
|
+
displayName: "StoreCharacterSkinRow__ItemName",
|
|
37875
|
+
componentId: "sc-81xqsx-6"
|
|
37876
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.875rem;color:#ffffff;"]);
|
|
37877
|
+
var SelectedSkin = /*#__PURE__*/styled.div.withConfig({
|
|
37878
|
+
displayName: "StoreCharacterSkinRow__SelectedSkin",
|
|
37879
|
+
componentId: "sc-81xqsx-7"
|
|
37880
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#fef08a;"]);
|
|
37881
|
+
var ItemPrice = /*#__PURE__*/styled.div.withConfig({
|
|
37882
|
+
displayName: "StoreCharacterSkinRow__ItemPrice",
|
|
37883
|
+
componentId: "sc-81xqsx-8"
|
|
37884
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#fef08a;"]);
|
|
37885
|
+
var Controls = /*#__PURE__*/styled.div.withConfig({
|
|
37886
|
+
displayName: "StoreCharacterSkinRow__Controls",
|
|
37887
|
+
componentId: "sc-81xqsx-9"
|
|
37888
|
+
})(["display:flex;align-items:center;gap:1rem;min-width:fit-content;"]);
|
|
37889
|
+
var ArrowsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
37890
|
+
displayName: "StoreCharacterSkinRow__ArrowsContainer",
|
|
37891
|
+
componentId: "sc-81xqsx-10"
|
|
37892
|
+
})(["position:relative;display:flex;align-items:center;width:120px;height:42px;justify-content:space-between;"]);
|
|
37893
|
+
var QuantityInput = /*#__PURE__*/styled.input.withConfig({
|
|
37894
|
+
displayName: "StoreCharacterSkinRow__QuantityInput",
|
|
37895
|
+
componentId: "sc-81xqsx-11"
|
|
37896
|
+
})(["width:40px;text-align:center;margin:0 auto;font-size:0.875rem;background:rgba(0,0,0,0.2);color:#ffffff;border:none;padding:0.25rem;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}"]);
|
|
37897
|
+
|
|
37898
|
+
var StoreItemRow = function StoreItemRow(_ref) {
|
|
37899
|
+
var _item$requiredAccount;
|
|
37900
|
+
var item = _ref.item,
|
|
37901
|
+
atlasJSON = _ref.atlasJSON,
|
|
37902
|
+
atlasIMG = _ref.atlasIMG,
|
|
37903
|
+
onAddToCart = _ref.onAddToCart,
|
|
37904
|
+
userAccountType = _ref.userAccountType;
|
|
37905
|
+
var _useState = useState(1),
|
|
37906
|
+
quantity = _useState[0],
|
|
37907
|
+
setQuantity = _useState[1];
|
|
37908
|
+
var handleQuantityChange = function handleQuantityChange(e) {
|
|
37909
|
+
var value = parseInt(e.target.value) || 1;
|
|
37910
|
+
setQuantity(Math.min(Math.max(1, value), 99));
|
|
37911
|
+
};
|
|
37912
|
+
var handleBlur = function handleBlur() {
|
|
37913
|
+
if (quantity < 1) setQuantity(1);
|
|
37914
|
+
if (quantity > 99) setQuantity(99);
|
|
37915
|
+
};
|
|
37916
|
+
var incrementQuantity = function incrementQuantity() {
|
|
37917
|
+
setQuantity(function (prev) {
|
|
37918
|
+
return Math.min(prev + 1, 99);
|
|
37919
|
+
});
|
|
37920
|
+
};
|
|
37921
|
+
var decrementQuantity = function decrementQuantity() {
|
|
37922
|
+
setQuantity(function (prev) {
|
|
37923
|
+
return Math.max(1, prev - 1);
|
|
37924
|
+
});
|
|
37925
|
+
};
|
|
37926
|
+
var hasRequiredAccount = !((_item$requiredAccount = item.requiredAccountType) != null && _item$requiredAccount.length) || item.requiredAccountType.includes(userAccountType);
|
|
37927
|
+
var handleAddToCart = function handleAddToCart() {
|
|
37928
|
+
if (!hasRequiredAccount) return;
|
|
37929
|
+
onAddToCart(item, quantity);
|
|
37930
|
+
setQuantity(1); // Reset quantity after adding to cart
|
|
37931
|
+
};
|
|
37932
|
+
return React.createElement(ItemWrapper$1, null, React.createElement(ItemIconContainer$3, null, React.createElement(SpriteFromAtlas, {
|
|
37933
|
+
atlasJSON: atlasJSON,
|
|
37934
|
+
atlasIMG: atlasIMG,
|
|
37935
|
+
spriteKey: item.texturePath,
|
|
37936
|
+
width: 32,
|
|
37937
|
+
height: 32,
|
|
37938
|
+
imgScale: 2,
|
|
37939
|
+
centered: true
|
|
37940
|
+
})), React.createElement(ItemDetails$2, null, React.createElement(ItemName$2, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price)), React.createElement(Controls$1, null, React.createElement(ArrowsContainer$1, null, React.createElement(SelectArrow, {
|
|
37941
|
+
direction: "left",
|
|
37942
|
+
onPointerDown: decrementQuantity,
|
|
37943
|
+
size: 24
|
|
37944
|
+
}), React.createElement(QuantityInput$1, {
|
|
37945
|
+
type: "number",
|
|
37946
|
+
value: quantity,
|
|
37947
|
+
onChange: handleQuantityChange,
|
|
37948
|
+
onBlur: handleBlur,
|
|
37949
|
+
min: 1,
|
|
37950
|
+
max: 99,
|
|
37951
|
+
className: "rpgui-input"
|
|
37952
|
+
}), React.createElement(SelectArrow, {
|
|
37953
|
+
direction: "right",
|
|
37954
|
+
onPointerDown: incrementQuantity,
|
|
37955
|
+
size: 24
|
|
37956
|
+
})), React.createElement(CTAButton, {
|
|
37957
|
+
icon: React.createElement(FaCartPlus, null),
|
|
37958
|
+
label: "Add",
|
|
37959
|
+
onClick: handleAddToCart,
|
|
37960
|
+
disabled: !hasRequiredAccount
|
|
37961
|
+
})));
|
|
37962
|
+
};
|
|
37963
|
+
var ItemWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37964
|
+
displayName: "StoreItemRow__ItemWrapper",
|
|
37965
|
+
componentId: "sc-ptotuo-0"
|
|
37966
|
+
})(["display:flex;align-items:center;gap:1rem;padding:1rem;border-bottom:1px solid rgba(255,255,255,0.1);&:last-child{border-bottom:none;}"]);
|
|
37967
|
+
var ItemIconContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
37968
|
+
displayName: "StoreItemRow__ItemIconContainer",
|
|
37969
|
+
componentId: "sc-ptotuo-1"
|
|
37970
|
+
})(["width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px;"]);
|
|
37971
|
+
var ItemDetails$2 = /*#__PURE__*/styled.div.withConfig({
|
|
37972
|
+
displayName: "StoreItemRow__ItemDetails",
|
|
37973
|
+
componentId: "sc-ptotuo-2"
|
|
37974
|
+
})(["flex:1;display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
37975
|
+
var ItemName$2 = /*#__PURE__*/styled.div.withConfig({
|
|
37976
|
+
displayName: "StoreItemRow__ItemName",
|
|
37977
|
+
componentId: "sc-ptotuo-3"
|
|
37978
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.875rem;color:#ffffff;"]);
|
|
37979
|
+
var ItemPrice$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37980
|
+
displayName: "StoreItemRow__ItemPrice",
|
|
37981
|
+
componentId: "sc-ptotuo-4"
|
|
37982
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#fef08a;"]);
|
|
37983
|
+
var Controls$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37984
|
+
displayName: "StoreItemRow__Controls",
|
|
37985
|
+
componentId: "sc-ptotuo-5"
|
|
37986
|
+
})(["display:flex;align-items:center;gap:1rem;min-width:fit-content;"]);
|
|
37987
|
+
var ArrowsContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
37988
|
+
displayName: "StoreItemRow__ArrowsContainer",
|
|
37989
|
+
componentId: "sc-ptotuo-6"
|
|
37990
|
+
})(["position:relative;display:flex;align-items:center;width:120px;height:42px;justify-content:space-between;"]);
|
|
37991
|
+
var QuantityInput$1 = /*#__PURE__*/styled.input.withConfig({
|
|
37992
|
+
displayName: "StoreItemRow__QuantityInput",
|
|
37993
|
+
componentId: "sc-ptotuo-7"
|
|
37994
|
+
})(["width:40px;text-align:center;margin:0 auto;font-size:0.875rem;background:rgba(0,0,0,0.2);color:#ffffff;border:none;padding:0.25rem;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}"]);
|
|
37995
|
+
|
|
37996
|
+
var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
37997
|
+
var items = _ref.items,
|
|
37998
|
+
onAddToCart = _ref.onAddToCart,
|
|
37999
|
+
atlasJSON = _ref.atlasJSON,
|
|
38000
|
+
atlasIMG = _ref.atlasIMG,
|
|
38001
|
+
userAccountType = _ref.userAccountType;
|
|
38002
|
+
var _useState = useState(''),
|
|
38003
|
+
searchQuery = _useState[0],
|
|
38004
|
+
setSearchQuery = _useState[1];
|
|
38005
|
+
var filteredItems = items.filter(function (item) {
|
|
38006
|
+
return item.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
38007
|
+
});
|
|
38008
|
+
var renderStoreItem = function renderStoreItem(item) {
|
|
38009
|
+
// Use the specialized character skin row for items with character skin metadata
|
|
38010
|
+
if (item.metadataType === MetadataType.CharacterSkin) {
|
|
38011
|
+
return React.createElement(StoreCharacterSkinRow, {
|
|
38012
|
+
key: item._id,
|
|
38013
|
+
item: item,
|
|
38014
|
+
atlasJSON: atlasJSON,
|
|
38015
|
+
atlasIMG: atlasIMG,
|
|
38016
|
+
onAddToCart: onAddToCart,
|
|
38017
|
+
userAccountType: userAccountType || UserAccountTypes.Free
|
|
38018
|
+
});
|
|
38019
|
+
}
|
|
38020
|
+
// Use the standard item row for all other items
|
|
38021
|
+
return React.createElement(StoreItemRow, {
|
|
38022
|
+
key: item._id,
|
|
38023
|
+
item: item,
|
|
38024
|
+
atlasJSON: atlasJSON,
|
|
38025
|
+
atlasIMG: atlasIMG,
|
|
38026
|
+
onAddToCart: onAddToCart,
|
|
38027
|
+
userAccountType: userAccountType || UserAccountTypes.Free
|
|
38028
|
+
});
|
|
38029
|
+
};
|
|
38030
|
+
return React.createElement(ScrollableContent, {
|
|
38031
|
+
items: filteredItems,
|
|
38032
|
+
renderItem: renderStoreItem,
|
|
38033
|
+
emptyMessage: "No items available.",
|
|
38034
|
+
searchOptions: {
|
|
38035
|
+
value: searchQuery,
|
|
38036
|
+
onChange: setSearchQuery,
|
|
38037
|
+
placeholder: 'Search items...'
|
|
38038
|
+
},
|
|
38039
|
+
layout: "list",
|
|
38040
|
+
maxHeight: "400px"
|
|
38041
|
+
});
|
|
38042
|
+
};
|
|
38043
|
+
|
|
38044
|
+
var ShoppingCardHorizontal = function ShoppingCardHorizontal(_ref) {
|
|
38045
|
+
var title = _ref.title,
|
|
38046
|
+
description = _ref.description,
|
|
38047
|
+
imageUrl = _ref.imageUrl,
|
|
38048
|
+
onClick = _ref.onClick,
|
|
38049
|
+
footer = _ref.footer,
|
|
38050
|
+
className = _ref.className;
|
|
38051
|
+
var getImageSrc = function getImageSrc() {
|
|
38052
|
+
if (!imageUrl) return '/placeholder-thumbnail.png';
|
|
38053
|
+
if (typeof imageUrl === 'string') return imageUrl;
|
|
38054
|
+
return imageUrl["default"] || imageUrl.src;
|
|
38055
|
+
};
|
|
38056
|
+
return React.createElement(CardContainer, {
|
|
38057
|
+
onClick: onClick,
|
|
38058
|
+
className: className
|
|
38059
|
+
}, React.createElement(LeftSection, null, imageUrl && React.createElement(CardThumbnail, null, React.createElement("img", {
|
|
38060
|
+
src: getImageSrc(),
|
|
38061
|
+
alt: title
|
|
38062
|
+
}))), React.createElement(RightSection, null, React.createElement(CardTitle, null, React.createElement(Ellipsis, {
|
|
38063
|
+
maxLines: 1,
|
|
38064
|
+
maxWidth: "100%"
|
|
38065
|
+
}, title)), React.createElement(CardDescription, null, React.createElement(Ellipsis, {
|
|
38066
|
+
maxLines: 3,
|
|
38067
|
+
maxWidth: "100%"
|
|
38068
|
+
}, description)), footer && React.createElement(CardFooter, {
|
|
38069
|
+
onClick: function onClick(e) {
|
|
38070
|
+
return e.stopPropagation();
|
|
38071
|
+
}
|
|
38072
|
+
}, footer)));
|
|
38073
|
+
};
|
|
38074
|
+
var CardContainer = /*#__PURE__*/styled.div.withConfig({
|
|
38075
|
+
displayName: "CartCardHorizontal__CardContainer",
|
|
38076
|
+
componentId: "sc-ngkh06-0"
|
|
38077
|
+
})(["display:flex;background:rgba(0,0,0,0.3);border-radius:4px;border:1px solid ", ";cursor:", ";transition:transform 0.2s ease;&:hover{transform:", ";}max-width:380px;"], uiColors.darkGray, function (props) {
|
|
38078
|
+
return props.onClick ? 'pointer' : 'default';
|
|
38079
|
+
}, function (props) {
|
|
38080
|
+
return props.onClick ? 'translateY(-2px)' : 'none';
|
|
38081
|
+
});
|
|
38082
|
+
var LeftSection = /*#__PURE__*/styled.div.withConfig({
|
|
38083
|
+
displayName: "CartCardHorizontal__LeftSection",
|
|
38084
|
+
componentId: "sc-ngkh06-1"
|
|
38085
|
+
})(["width:120px;flex-shrink:0;"]);
|
|
38086
|
+
var RightSection = /*#__PURE__*/styled.div.withConfig({
|
|
38087
|
+
displayName: "CartCardHorizontal__RightSection",
|
|
38088
|
+
componentId: "sc-ngkh06-2"
|
|
38089
|
+
})(["flex:1;display:flex;flex-direction:column;padding:12px;min-width:0;max-width:100%;"]);
|
|
38090
|
+
var CardThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
38091
|
+
displayName: "CartCardHorizontal__CardThumbnail",
|
|
38092
|
+
componentId: "sc-ngkh06-3"
|
|
38093
|
+
})(["width:100%;height:100%;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}"]);
|
|
38094
|
+
var CardTitle = /*#__PURE__*/styled.h3.withConfig({
|
|
38095
|
+
displayName: "CartCardHorizontal__CardTitle",
|
|
38096
|
+
componentId: "sc-ngkh06-4"
|
|
38097
|
+
})(["margin:0;font-size:0.6rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:8px;"], uiColors.yellow);
|
|
38098
|
+
var CardDescription = /*#__PURE__*/styled.p.withConfig({
|
|
38099
|
+
displayName: "CartCardHorizontal__CardDescription",
|
|
38100
|
+
componentId: "sc-ngkh06-5"
|
|
38101
|
+
})(["margin:0;font-size:0.55rem;color:", ";font-family:'Press Start 2P',cursive;line-height:1.4;margin-bottom:8px;"], uiColors.lightGray);
|
|
38102
|
+
var CardFooter = /*#__PURE__*/styled.div.withConfig({
|
|
38103
|
+
displayName: "CartCardHorizontal__CardFooter",
|
|
38104
|
+
componentId: "sc-ngkh06-6"
|
|
38105
|
+
})(["margin-top:auto;padding-top:8px;border-top:1px solid rgba(255,255,255,0.1);"]);
|
|
38106
|
+
|
|
38107
|
+
var StorePacksSection = function StorePacksSection(_ref) {
|
|
38108
|
+
var packs = _ref.packs,
|
|
38109
|
+
onAddToCart = _ref.onAddToCart,
|
|
38110
|
+
onSelectPack = _ref.onSelectPack;
|
|
38111
|
+
var _useState = useState(''),
|
|
38112
|
+
searchQuery = _useState[0],
|
|
38113
|
+
setSearchQuery = _useState[1];
|
|
38114
|
+
var renderPackFooter = useCallback(function (pack) {
|
|
38115
|
+
return React.createElement(FooterContainer, null, React.createElement(Price, null, "$", pack.priceUSD), React.createElement(CTAButton, {
|
|
38116
|
+
icon: React.createElement(FaCartPlus, null),
|
|
38117
|
+
label: "Add",
|
|
38118
|
+
onClick: function onClick(e) {
|
|
38119
|
+
e.stopPropagation();
|
|
38120
|
+
onAddToCart(pack);
|
|
38121
|
+
}
|
|
38122
|
+
}));
|
|
38123
|
+
}, [onAddToCart]);
|
|
38124
|
+
var renderPack = useCallback(function (pack) {
|
|
38125
|
+
return React.createElement(ShoppingCardHorizontal, {
|
|
38126
|
+
key: pack.key,
|
|
38127
|
+
title: pack.title,
|
|
38128
|
+
description: pack.description,
|
|
38129
|
+
imageUrl: pack.image,
|
|
38130
|
+
footer: renderPackFooter(pack),
|
|
38131
|
+
onClick: function onClick() {
|
|
38132
|
+
return onSelectPack == null ? void 0 : onSelectPack(pack);
|
|
38133
|
+
}
|
|
38134
|
+
});
|
|
38135
|
+
}, [onSelectPack, renderPackFooter]);
|
|
38136
|
+
var filteredPacks = useMemo(function () {
|
|
38137
|
+
return packs.filter(function (pack) {
|
|
38138
|
+
return pack.title.toLowerCase().includes(searchQuery.toLowerCase());
|
|
38139
|
+
});
|
|
38140
|
+
}, [packs, searchQuery]);
|
|
38141
|
+
return React.createElement(ScrollableContent, {
|
|
38142
|
+
items: filteredPacks,
|
|
38143
|
+
renderItem: renderPack,
|
|
38144
|
+
emptyMessage: "No packs available.",
|
|
38145
|
+
searchOptions: {
|
|
38146
|
+
value: searchQuery,
|
|
38147
|
+
onChange: setSearchQuery,
|
|
38148
|
+
placeholder: 'Search packs...'
|
|
38149
|
+
},
|
|
38150
|
+
layout: "grid",
|
|
38151
|
+
gridColumns: 2,
|
|
38152
|
+
maxHeight: "420px"
|
|
38153
|
+
});
|
|
38154
|
+
};
|
|
38155
|
+
var FooterContainer = /*#__PURE__*/styled.div.withConfig({
|
|
38156
|
+
displayName: "StorePacksSection__FooterContainer",
|
|
38157
|
+
componentId: "sc-ulazq3-0"
|
|
38158
|
+
})(["display:flex;align-items:center;justify-content:space-between;gap:8px;"]);
|
|
38159
|
+
var Price = /*#__PURE__*/styled.span.withConfig({
|
|
38160
|
+
displayName: "StorePacksSection__Price",
|
|
38161
|
+
componentId: "sc-ulazq3-1"
|
|
38162
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.6rem;color:#fef08a;"]);
|
|
38163
|
+
|
|
38164
|
+
var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
38165
|
+
var item = _ref.item,
|
|
38166
|
+
onBack = _ref.onBack,
|
|
38167
|
+
onAddToCart = _ref.onAddToCart,
|
|
38168
|
+
imageUrl = _ref.imageUrl;
|
|
38169
|
+
var getImageSrc = function getImageSrc() {
|
|
38170
|
+
if (!imageUrl) return '/placeholder-thumbnail.png';
|
|
38171
|
+
if (typeof imageUrl === 'string') return imageUrl;
|
|
38172
|
+
return imageUrl["default"] || imageUrl.src;
|
|
38173
|
+
};
|
|
38174
|
+
return React.createElement(Container$M, null, React.createElement(Header$8, null, React.createElement(BackButton, {
|
|
38175
|
+
onClick: onBack
|
|
38176
|
+
}, React.createElement(FaArrowLeft, null), React.createElement("span", null, "Back"))), React.createElement(Content$5, null, React.createElement(DetailsGrid, null, React.createElement(ItemIcon, null, React.createElement("img", {
|
|
38177
|
+
src: getImageSrc(),
|
|
38178
|
+
alt: item.name
|
|
38179
|
+
})), React.createElement(ItemInfo$2, null, React.createElement(ItemName$3, null, item.name), React.createElement(ItemPrice$2, null, "$", 'priceUSD' in item ? item.priceUSD : item.price), React.createElement(Description$6, null, item.description))), React.createElement(Actions, null, React.createElement(CTAButton, {
|
|
38180
|
+
icon: React.createElement(FaCartPlus, null),
|
|
38181
|
+
label: "Add to Cart",
|
|
38182
|
+
onClick: function onClick() {
|
|
38183
|
+
return onAddToCart(item);
|
|
38184
|
+
},
|
|
38185
|
+
fullWidth: true
|
|
38186
|
+
}))));
|
|
38187
|
+
};
|
|
38188
|
+
var Container$M = /*#__PURE__*/styled.div.withConfig({
|
|
38189
|
+
displayName: "StoreItemDetails__Container",
|
|
38190
|
+
componentId: "sc-k3ho5z-0"
|
|
38191
|
+
})(["display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;height:100%;"]);
|
|
38192
|
+
var Header$8 = /*#__PURE__*/styled.div.withConfig({
|
|
38193
|
+
displayName: "StoreItemDetails__Header",
|
|
38194
|
+
componentId: "sc-k3ho5z-1"
|
|
38195
|
+
})(["display:flex;align-items:center;gap:1rem;"]);
|
|
38196
|
+
var BackButton = /*#__PURE__*/styled.button.withConfig({
|
|
38197
|
+
displayName: "StoreItemDetails__BackButton",
|
|
38198
|
+
componentId: "sc-k3ho5z-2"
|
|
38199
|
+
})(["display:flex;align-items:center;gap:0.5rem;background:none;border:none;color:#ffffff;font-family:'Press Start 2P',cursive;font-size:0.875rem;cursor:pointer;padding:0.5rem;transition:opacity 0.2s;&:hover{opacity:0.8;}"]);
|
|
38200
|
+
var Content$5 = /*#__PURE__*/styled.div.withConfig({
|
|
38201
|
+
displayName: "StoreItemDetails__Content",
|
|
38202
|
+
componentId: "sc-k3ho5z-3"
|
|
38203
|
+
})(["flex:1;display:flex;flex-direction:column;gap:2rem;overflow-y:auto;"]);
|
|
38204
|
+
var DetailsGrid = /*#__PURE__*/styled.div.withConfig({
|
|
38205
|
+
displayName: "StoreItemDetails__DetailsGrid",
|
|
38206
|
+
componentId: "sc-k3ho5z-4"
|
|
38207
|
+
})(["display:grid;grid-template-columns:280px 1fr;gap:2rem;align-items:start;@media (max-width:768px){grid-template-columns:1fr;}"]);
|
|
38208
|
+
var ItemIcon = /*#__PURE__*/styled.div.withConfig({
|
|
38209
|
+
displayName: "StoreItemDetails__ItemIcon",
|
|
38210
|
+
componentId: "sc-k3ho5z-5"
|
|
38211
|
+
})(["width:100%;aspect-ratio:1;background:rgba(0,0,0,0.2);overflow:hidden;border-radius:4px;img{width:100%;height:100%;object-fit:cover;}"]);
|
|
38212
|
+
var ItemInfo$2 = /*#__PURE__*/styled.div.withConfig({
|
|
38213
|
+
displayName: "StoreItemDetails__ItemInfo",
|
|
38214
|
+
componentId: "sc-k3ho5z-6"
|
|
38215
|
+
})(["display:flex;flex-direction:column;gap:1rem;"]);
|
|
38216
|
+
var ItemName$3 = /*#__PURE__*/styled.h2.withConfig({
|
|
38217
|
+
displayName: "StoreItemDetails__ItemName",
|
|
38218
|
+
componentId: "sc-k3ho5z-7"
|
|
38219
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:1.25rem;color:#fef08a;"]);
|
|
38220
|
+
var ItemPrice$2 = /*#__PURE__*/styled.div.withConfig({
|
|
38221
|
+
displayName: "StoreItemDetails__ItemPrice",
|
|
38222
|
+
componentId: "sc-k3ho5z-8"
|
|
38223
|
+
})(["font-family:'Press Start 2P',cursive;font-size:1rem;color:#fef08a;"]);
|
|
38224
|
+
var Description$6 = /*#__PURE__*/styled.p.withConfig({
|
|
38225
|
+
displayName: "StoreItemDetails__Description",
|
|
38226
|
+
componentId: "sc-k3ho5z-9"
|
|
38227
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.875rem;line-height:1.6;color:#ffffff;"]);
|
|
38228
|
+
var Actions = /*#__PURE__*/styled.div.withConfig({
|
|
38229
|
+
displayName: "StoreItemDetails__Actions",
|
|
38230
|
+
componentId: "sc-k3ho5z-10"
|
|
38231
|
+
})(["margin-top:auto;padding-top:1rem;border-top:1px solid rgba(255,255,255,0.1);"]);
|
|
38232
|
+
|
|
38233
|
+
var Store = function Store(_ref) {
|
|
38234
|
+
var items = _ref.items,
|
|
38235
|
+
_ref$packs = _ref.packs,
|
|
38236
|
+
packs = _ref$packs === void 0 ? [] : _ref$packs,
|
|
38237
|
+
atlasJSON = _ref.atlasJSON,
|
|
38238
|
+
atlasIMG = _ref.atlasIMG,
|
|
38239
|
+
_onPurchase = _ref.onPurchase,
|
|
38240
|
+
onShowHistory = _ref.onShowHistory,
|
|
38241
|
+
userAccountType = _ref.userAccountType,
|
|
38242
|
+
_ref$loading = _ref.loading,
|
|
38243
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
38244
|
+
error = _ref.error,
|
|
38245
|
+
onClose = _ref.onClose;
|
|
38246
|
+
var _useState = useState(null),
|
|
38247
|
+
selectedPack = _useState[0],
|
|
38248
|
+
setSelectedPack = _useState[1];
|
|
38249
|
+
var _useState2 = useState('premium'),
|
|
38250
|
+
activeTab = _useState2[0],
|
|
38251
|
+
setActiveTab = _useState2[1];
|
|
38252
|
+
var _useStoreCart = useStoreCart(),
|
|
38253
|
+
cartItems = _useStoreCart.cartItems,
|
|
38254
|
+
handleAddToCart = _useStoreCart.handleAddToCart,
|
|
38255
|
+
handleRemoveFromCart = _useStoreCart.handleRemoveFromCart,
|
|
38256
|
+
handleCartPurchase = _useStoreCart.handlePurchase,
|
|
38257
|
+
openCart = _useStoreCart.openCart,
|
|
38258
|
+
closeCart = _useStoreCart.closeCart,
|
|
38259
|
+
getTotalItems = _useStoreCart.getTotalItems,
|
|
38260
|
+
getTotalPrice = _useStoreCart.getTotalPrice,
|
|
38261
|
+
isCartOpen = _useStoreCart.isCartOpen;
|
|
38262
|
+
var _useState3 = useState(false),
|
|
38263
|
+
isCollectingMetadata = _useState3[0],
|
|
38264
|
+
setIsCollectingMetadata = _useState3[1];
|
|
38265
|
+
var _useState4 = useState(null),
|
|
38266
|
+
currentMetadataItem = _useState4[0],
|
|
38267
|
+
setCurrentMetadataItem = _useState4[1];
|
|
38268
|
+
var handleAddPackToCart = function handleAddPackToCart(pack) {
|
|
38269
|
+
var packItem = {
|
|
38270
|
+
_id: pack.key,
|
|
38271
|
+
key: pack.key,
|
|
38272
|
+
name: pack.title,
|
|
38273
|
+
price: pack.priceUSD,
|
|
38274
|
+
texturePath: pack.image["default"] || pack.image.src,
|
|
38275
|
+
textureKey: pack.image["default"] || pack.image.src,
|
|
38276
|
+
type: ItemType.Consumable,
|
|
38277
|
+
subType: ItemSubType.Other,
|
|
38278
|
+
description: pack.description || '',
|
|
38279
|
+
fullDescription: pack.description || '',
|
|
38280
|
+
textureAtlas: 'items',
|
|
38281
|
+
weight: 0,
|
|
38282
|
+
rarity: ItemRarities.Common,
|
|
38283
|
+
allowedEquipSlotType: [],
|
|
38284
|
+
isEquipable: false,
|
|
38285
|
+
isStackable: false,
|
|
38286
|
+
isTwoHanded: false,
|
|
38287
|
+
hasUseWith: false,
|
|
38288
|
+
maxStackSize: 1,
|
|
38289
|
+
isUsable: false,
|
|
38290
|
+
isStorable: true,
|
|
38291
|
+
isSolid: false,
|
|
38292
|
+
isItemContainer: false
|
|
38293
|
+
};
|
|
38294
|
+
handleAddToCart(packItem, 1);
|
|
38295
|
+
};
|
|
38296
|
+
var filterItems = function filterItems(itemsToFilter, type) {
|
|
38297
|
+
return itemsToFilter.filter(function (item) {
|
|
38298
|
+
if (type === 'premium') {
|
|
38299
|
+
var _item$requiredAccount, _item$requiredAccount2;
|
|
38300
|
+
return (_item$requiredAccount = (_item$requiredAccount2 = item.requiredAccountType) == null ? void 0 : _item$requiredAccount2.length) != null ? _item$requiredAccount : 0 > 0;
|
|
38301
|
+
}
|
|
38302
|
+
return true;
|
|
38303
|
+
});
|
|
38304
|
+
};
|
|
38305
|
+
var filteredItems = useMemo(function () {
|
|
38306
|
+
return {
|
|
38307
|
+
items: filterItems(items, 'items'),
|
|
38308
|
+
premium: filterItems(items, 'premium')
|
|
38309
|
+
};
|
|
38310
|
+
}, [items]);
|
|
38311
|
+
var handleMetadataCollected = function handleMetadataCollected(metadata) {
|
|
38312
|
+
if (currentMetadataItem && window.__metadataResolvers) {
|
|
38313
|
+
// Resolve the promise in the useStoreMetadata hook
|
|
38314
|
+
window.__metadataResolvers.resolve(metadata);
|
|
38315
|
+
// Reset the metadata collection state
|
|
38316
|
+
setCurrentMetadataItem(null);
|
|
38317
|
+
// Removed unused setPendingMetadataQuantity call
|
|
38318
|
+
}
|
|
38319
|
+
};
|
|
38320
|
+
var handleMetadataCancel = function handleMetadataCancel() {
|
|
38321
|
+
if (window.__metadataResolvers) {
|
|
38322
|
+
// Resolve with null to indicate cancellation
|
|
38323
|
+
window.__metadataResolvers.resolve(null);
|
|
38324
|
+
}
|
|
38325
|
+
// Reset the metadata collection state
|
|
38326
|
+
setCurrentMetadataItem(null);
|
|
38327
|
+
// Removed unused setPendingMetadataQuantity call
|
|
38328
|
+
setIsCollectingMetadata(false);
|
|
38329
|
+
};
|
|
38330
|
+
if (loading) {
|
|
38331
|
+
return React.createElement(LoadingMessage$1, null, "Loading...");
|
|
38332
|
+
}
|
|
38333
|
+
if (error) {
|
|
38334
|
+
return React.createElement(ErrorMessage$2, null, error);
|
|
38335
|
+
}
|
|
38336
|
+
var tabs = [{
|
|
38337
|
+
id: 'premium',
|
|
38338
|
+
title: 'Premium',
|
|
38339
|
+
content: React.createElement(StorePacksSection, {
|
|
38340
|
+
packs: packs.filter(function (pack) {
|
|
38341
|
+
return pack.priceUSD >= 9.99;
|
|
38342
|
+
}),
|
|
38343
|
+
onAddToCart: handleAddPackToCart,
|
|
38344
|
+
onSelectPack: setSelectedPack
|
|
38345
|
+
})
|
|
38346
|
+
}, {
|
|
38347
|
+
id: 'packs',
|
|
38348
|
+
title: 'Packs',
|
|
38349
|
+
content: React.createElement(StorePacksSection, {
|
|
38350
|
+
packs: packs.filter(function (pack) {
|
|
38351
|
+
return pack.priceUSD < 9.99;
|
|
38352
|
+
}),
|
|
38353
|
+
onAddToCart: handleAddPackToCart,
|
|
38354
|
+
onSelectPack: setSelectedPack
|
|
38355
|
+
})
|
|
38356
|
+
}, {
|
|
38357
|
+
id: 'items',
|
|
38358
|
+
title: 'Items',
|
|
38359
|
+
content: React.createElement(StoreItemsSection, {
|
|
38360
|
+
items: filteredItems.items,
|
|
38361
|
+
onAddToCart: handleAddToCart,
|
|
38362
|
+
atlasJSON: atlasJSON,
|
|
38363
|
+
atlasIMG: atlasIMG,
|
|
38364
|
+
userAccountType: userAccountType
|
|
38365
|
+
})
|
|
38366
|
+
}];
|
|
38367
|
+
return React.createElement(DraggableContainer, {
|
|
38368
|
+
title: "Store",
|
|
38369
|
+
onCloseButton: onClose,
|
|
38370
|
+
width: "850px",
|
|
38371
|
+
minWidth: "600px",
|
|
38372
|
+
height: "auto",
|
|
38373
|
+
type: RPGUIContainerTypes.Framed,
|
|
38374
|
+
cancelDrag: "[class*='Store__Container'], [class*='CartView'], [class*='StoreItemDetails'], .close-button"
|
|
38375
|
+
}, isCollectingMetadata && currentMetadataItem && currentMetadataItem.metadataType ? React.createElement(MetadataCollector, {
|
|
38376
|
+
metadataType: currentMetadataItem.metadataType,
|
|
38377
|
+
config: currentMetadataItem.metadataConfig || {},
|
|
38378
|
+
onCollect: handleMetadataCollected,
|
|
38379
|
+
onCancel: handleMetadataCancel
|
|
38380
|
+
}) : isCartOpen ? React.createElement(CartView, {
|
|
38381
|
+
cartItems: cartItems,
|
|
38382
|
+
onRemoveFromCart: handleRemoveFromCart,
|
|
38383
|
+
onClose: closeCart,
|
|
38384
|
+
onPurchase: function () {
|
|
38385
|
+
var _onPurchase2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
38386
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38387
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38388
|
+
case 0:
|
|
38389
|
+
_context.next = 2;
|
|
38390
|
+
return handleCartPurchase(_onPurchase);
|
|
38391
|
+
case 2:
|
|
38392
|
+
return _context.abrupt("return", true);
|
|
38393
|
+
case 3:
|
|
38394
|
+
case "end":
|
|
38395
|
+
return _context.stop();
|
|
38396
|
+
}
|
|
38397
|
+
}, _callee);
|
|
38398
|
+
}));
|
|
38399
|
+
function onPurchase() {
|
|
38400
|
+
return _onPurchase2.apply(this, arguments);
|
|
38401
|
+
}
|
|
38402
|
+
return onPurchase;
|
|
38403
|
+
}(),
|
|
38404
|
+
atlasJSON: atlasJSON,
|
|
38405
|
+
atlasIMG: atlasIMG
|
|
38406
|
+
}) : selectedPack ? React.createElement(StoreItemDetails, {
|
|
38407
|
+
item: _extends({}, selectedPack, {
|
|
38408
|
+
name: selectedPack.title,
|
|
38409
|
+
texturePath: selectedPack.image["default"] || selectedPack.image.src
|
|
38410
|
+
}),
|
|
38411
|
+
imageUrl: selectedPack.image,
|
|
38412
|
+
onBack: function onBack() {
|
|
38413
|
+
return setSelectedPack(null);
|
|
38414
|
+
},
|
|
38415
|
+
onAddToCart: function onAddToCart() {
|
|
38416
|
+
return handleAddPackToCart(selectedPack);
|
|
38417
|
+
}
|
|
38418
|
+
}) : React.createElement(Container$N, null, React.createElement(TopBar$1, null, React.createElement(HistoryButton, null, onShowHistory && React.createElement(CTAButton, {
|
|
38419
|
+
icon: React.createElement(FaHistory, null),
|
|
38420
|
+
label: "History",
|
|
38421
|
+
onClick: onShowHistory
|
|
38422
|
+
})), React.createElement(CartButton, null, React.createElement(CTAButton, {
|
|
38423
|
+
icon: React.createElement(FaShoppingCart, null),
|
|
38424
|
+
label: getTotalItems() + " items ($" + getTotalPrice().toFixed(2) + ")",
|
|
38425
|
+
onClick: openCart
|
|
38426
|
+
}))), React.createElement(MainContent$1, null, React.createElement(InternalTabs, {
|
|
38427
|
+
tabs: tabs,
|
|
38428
|
+
activeTextColor: "#000000",
|
|
38429
|
+
activeColor: "#fef08a",
|
|
38430
|
+
inactiveColor: "#6b7280",
|
|
38431
|
+
borderColor: "#f59e0b",
|
|
38432
|
+
hoverColor: "#fef3c7",
|
|
38433
|
+
activeTab: activeTab,
|
|
38434
|
+
onTabChange: setActiveTab
|
|
38435
|
+
})), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, "$", getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
|
|
38436
|
+
icon: React.createElement(FaShoppingCart, null),
|
|
38437
|
+
label: "Proceed to Checkout ($" + getTotalPrice().toFixed(2) + ")",
|
|
38438
|
+
onClick: openCart,
|
|
38439
|
+
fullWidth: true
|
|
38440
|
+
}))));
|
|
38441
|
+
};
|
|
38442
|
+
var Container$N = /*#__PURE__*/styled.div.withConfig({
|
|
38443
|
+
displayName: "Store__Container",
|
|
38444
|
+
componentId: "sc-64dj00-0"
|
|
38445
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;gap:1rem;position:relative;"]);
|
|
38446
|
+
var TopBar$1 = /*#__PURE__*/styled.div.withConfig({
|
|
38447
|
+
displayName: "Store__TopBar",
|
|
38448
|
+
componentId: "sc-64dj00-1"
|
|
38449
|
+
})(["display:flex;align-items:center;justify-content:flex-end;gap:1rem;padding:0 1rem;flex-shrink:0;margin-top:0.5rem;"]);
|
|
38450
|
+
var HistoryButton = /*#__PURE__*/styled.div.withConfig({
|
|
38451
|
+
displayName: "Store__HistoryButton",
|
|
38452
|
+
componentId: "sc-64dj00-2"
|
|
38453
|
+
})(["min-width:fit-content;margin-right:auto;"]);
|
|
38454
|
+
var CartButton = /*#__PURE__*/styled.div.withConfig({
|
|
38455
|
+
displayName: "Store__CartButton",
|
|
38456
|
+
componentId: "sc-64dj00-3"
|
|
38457
|
+
})(["min-width:fit-content;"]);
|
|
38458
|
+
var MainContent$1 = /*#__PURE__*/styled.div.withConfig({
|
|
38459
|
+
displayName: "Store__MainContent",
|
|
38460
|
+
componentId: "sc-64dj00-4"
|
|
38461
|
+
})(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;.rpgui-tabs-content{flex:1;overflow-y:auto;padding-right:0.5rem;}"]);
|
|
38462
|
+
var Footer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
38463
|
+
displayName: "Store__Footer",
|
|
38464
|
+
componentId: "sc-64dj00-5"
|
|
38465
|
+
})(["display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:2px solid #f59e0b;background:rgba(0,0,0,0.2);flex-shrink:0;"]);
|
|
38466
|
+
var CartSummary = /*#__PURE__*/styled.div.withConfig({
|
|
38467
|
+
displayName: "Store__CartSummary",
|
|
38468
|
+
componentId: "sc-64dj00-6"
|
|
38469
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
38470
|
+
var CartInfo = /*#__PURE__*/styled.div.withConfig({
|
|
38471
|
+
displayName: "Store__CartInfo",
|
|
38472
|
+
componentId: "sc-64dj00-7"
|
|
38473
|
+
})(["display:flex;align-items:center;gap:0.75rem;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;span:last-child{color:#fef08a;}"]);
|
|
38474
|
+
var LoadingMessage$1 = /*#__PURE__*/styled.div.withConfig({
|
|
38475
|
+
displayName: "Store__LoadingMessage",
|
|
38476
|
+
componentId: "sc-64dj00-8"
|
|
38477
|
+
})(["text-align:center;color:", ";padding:2rem;"], uiColors.white);
|
|
38478
|
+
var ErrorMessage$2 = /*#__PURE__*/styled.div.withConfig({
|
|
38479
|
+
displayName: "Store__ErrorMessage",
|
|
38480
|
+
componentId: "sc-64dj00-9"
|
|
38481
|
+
})(["text-align:center;color:", ";padding:2rem;"], uiColors.red);
|
|
38482
|
+
|
|
37099
38483
|
var TextArea = function TextArea(_ref) {
|
|
37100
38484
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
37101
38485
|
return React.createElement("textarea", Object.assign({}, props));
|
|
@@ -37130,7 +38514,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
37130
38514
|
return React.createElement(Draggable, {
|
|
37131
38515
|
scale: scale,
|
|
37132
38516
|
cancel: ".time-widget-close,.time-widget-container,.time-widget-container *"
|
|
37133
|
-
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$
|
|
38517
|
+
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$a, {
|
|
37134
38518
|
onPointerDown: onClose,
|
|
37135
38519
|
className: "time-widget-close"
|
|
37136
38520
|
}, "X"), React.createElement(DayNightContainer, {
|
|
@@ -37147,7 +38531,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
|
|
|
37147
38531
|
displayName: "TimeWidget__Time",
|
|
37148
38532
|
componentId: "sc-1ja236h-1"
|
|
37149
38533
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
37150
|
-
var CloseButton$
|
|
38534
|
+
var CloseButton$a = /*#__PURE__*/styled.p.withConfig({
|
|
37151
38535
|
displayName: "TimeWidget__CloseButton",
|
|
37152
38536
|
componentId: "sc-1ja236h-2"
|
|
37153
38537
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|
|
@@ -37256,7 +38640,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
37256
38640
|
}
|
|
37257
38641
|
return null;
|
|
37258
38642
|
};
|
|
37259
|
-
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer$
|
|
38643
|
+
return React.createElement(ItemWrapper$2, null, React.createElement(ItemIconContainer$4, null, React.createElement(SpriteContainer$6, null, React.createElement(ItemInfoWrapper, {
|
|
37260
38644
|
atlasIMG: atlasIMG,
|
|
37261
38645
|
atlasJSON: atlasJSON,
|
|
37262
38646
|
equipmentSet: equipmentSet,
|
|
@@ -37290,7 +38674,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
37290
38674
|
onPointerDown: function onPointerDown() {
|
|
37291
38675
|
return onLeftClick();
|
|
37292
38676
|
}
|
|
37293
|
-
}), React.createElement(QuantityInput, {
|
|
38677
|
+
}), React.createElement(QuantityInput$2, {
|
|
37294
38678
|
type: "text",
|
|
37295
38679
|
value: inputQty,
|
|
37296
38680
|
onChange: handleQuantityChange,
|
|
@@ -37316,7 +38700,7 @@ var StyledArrow = /*#__PURE__*/styled(SelectArrow).withConfig({
|
|
|
37316
38700
|
displayName: "TradingItemRow__StyledArrow",
|
|
37317
38701
|
componentId: "sc-mja0b5-0"
|
|
37318
38702
|
})(["margin:0 1.5rem;"]);
|
|
37319
|
-
var ItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
38703
|
+
var ItemWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
37320
38704
|
displayName: "TradingItemRow__ItemWrapper",
|
|
37321
38705
|
componentId: "sc-mja0b5-1"
|
|
37322
38706
|
})(["width:100%;display:flex;justify-content:space-between;margin-bottom:0.5rem;padding:0.25rem;&:hover{background-color:", ";}"], uiColors.darkGray);
|
|
@@ -37324,11 +38708,11 @@ var ItemNameContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
37324
38708
|
displayName: "TradingItemRow__ItemNameContainer",
|
|
37325
38709
|
componentId: "sc-mja0b5-2"
|
|
37326
38710
|
})(["flex:60%;display:flex;align-items:center;"]);
|
|
37327
|
-
var ItemIconContainer$
|
|
38711
|
+
var ItemIconContainer$4 = /*#__PURE__*/styled.div.withConfig({
|
|
37328
38712
|
displayName: "TradingItemRow__ItemIconContainer",
|
|
37329
38713
|
componentId: "sc-mja0b5-3"
|
|
37330
38714
|
})(["display:flex;justify-content:flex-start;align-items:center;flex:0 0 40px;"]);
|
|
37331
|
-
var SpriteContainer$
|
|
38715
|
+
var SpriteContainer$6 = /*#__PURE__*/styled.div.withConfig({
|
|
37332
38716
|
displayName: "TradingItemRow__SpriteContainer",
|
|
37333
38717
|
componentId: "sc-mja0b5-4"
|
|
37334
38718
|
})(["position:relative;top:-0.5rem;left:0;"]);
|
|
@@ -37340,7 +38724,7 @@ var QuantityContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
37340
38724
|
displayName: "TradingItemRow__QuantityContainer",
|
|
37341
38725
|
componentId: "sc-mja0b5-6"
|
|
37342
38726
|
})(["display:flex;min-width:90px;width:40%;justify-content:flex-end;align-items:center;flex:30%;gap:2px;position:relative;"]);
|
|
37343
|
-
var QuantityInput = /*#__PURE__*/styled.input.withConfig({
|
|
38727
|
+
var QuantityInput$2 = /*#__PURE__*/styled.input.withConfig({
|
|
37344
38728
|
displayName: "TradingItemRow__QuantityInput",
|
|
37345
38729
|
componentId: "sc-mja0b5-7"
|
|
37346
38730
|
})(["width:30px;text-align:center;background-color:", ";color:white;border:none;padding:1px;font-size:", ";position:relative;right:4px;"], uiColors.darkGray, uiFonts.size.small);
|
|
@@ -37426,7 +38810,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
37426
38810
|
width: "500px",
|
|
37427
38811
|
cancelDrag: "#TraderContainer",
|
|
37428
38812
|
scale: scale
|
|
37429
|
-
}, React.createElement(Container$
|
|
38813
|
+
}, React.createElement(Container$O, null, React.createElement(Title$f, null, type.charAt(0).toUpperCase() + type.slice(1), " Menu"), React.createElement("hr", {
|
|
37430
38814
|
className: "golden"
|
|
37431
38815
|
}), React.createElement(ScrollWrapper, {
|
|
37432
38816
|
id: "TraderContainer"
|
|
@@ -37454,11 +38838,11 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
37454
38838
|
onPointerDown: onClose
|
|
37455
38839
|
}, "Cancel"))));
|
|
37456
38840
|
};
|
|
37457
|
-
var Container$
|
|
38841
|
+
var Container$O = /*#__PURE__*/styled.div.withConfig({
|
|
37458
38842
|
displayName: "TradingMenu__Container",
|
|
37459
38843
|
componentId: "sc-1wjsz1l-0"
|
|
37460
38844
|
})(["width:100%;"]);
|
|
37461
|
-
var Title$
|
|
38845
|
+
var Title$f = /*#__PURE__*/styled.h1.withConfig({
|
|
37462
38846
|
displayName: "TradingMenu__Title",
|
|
37463
38847
|
componentId: "sc-1wjsz1l-1"
|
|
37464
38848
|
})(["font-size:0.7rem !important;color:yellow !important;text-align:center;"]);
|
|
@@ -37488,11 +38872,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
37488
38872
|
var _ref$maxLines = _ref.maxLines,
|
|
37489
38873
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
37490
38874
|
children = _ref.children;
|
|
37491
|
-
return React.createElement(Container$
|
|
38875
|
+
return React.createElement(Container$P, {
|
|
37492
38876
|
maxLines: maxLines
|
|
37493
38877
|
}, children);
|
|
37494
38878
|
};
|
|
37495
|
-
var Container$
|
|
38879
|
+
var Container$P = /*#__PURE__*/styled.div.withConfig({
|
|
37496
38880
|
displayName: "Truncate__Container",
|
|
37497
38881
|
componentId: "sc-6x00qb-0"
|
|
37498
38882
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
@@ -37600,7 +38984,7 @@ var TutorialStepper = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
37600
38984
|
};
|
|
37601
38985
|
});
|
|
37602
38986
|
}, [lessons, imageStyle]);
|
|
37603
|
-
return React.createElement(Container$
|
|
38987
|
+
return React.createElement(Container$Q, null, React.createElement(Stepper, {
|
|
37604
38988
|
steps: generateLessons,
|
|
37605
38989
|
finalCTAButton: {
|
|
37606
38990
|
label: 'Close',
|
|
@@ -37617,7 +39001,7 @@ var LessonBody = /*#__PURE__*/styled.div.withConfig({
|
|
|
37617
39001
|
displayName: "TutorialStepper__LessonBody",
|
|
37618
39002
|
componentId: "sc-7tgzv2-1"
|
|
37619
39003
|
})([""]);
|
|
37620
|
-
var Container$
|
|
39004
|
+
var Container$Q = /*#__PURE__*/styled.div.withConfig({
|
|
37621
39005
|
displayName: "TutorialStepper__Container",
|
|
37622
39006
|
componentId: "sc-7tgzv2-2"
|
|
37623
39007
|
})(["width:80%;max-width:600px;@media (max-width:600px){width:95%;}"]);
|
|
@@ -37638,5 +39022,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
37638
39022
|
componentId: "sc-7tgzv2-6"
|
|
37639
39023
|
})(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
|
|
37640
39024
|
|
|
37641
|
-
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, HistoryDialog, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
39025
|
+
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, HistoryDialog, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
|
|
37642
39026
|
//# sourceMappingURL=long-bow.esm.js.map
|