@rpg-engine/long-bow 0.3.94 → 0.3.96
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/LICENSE +20 -20
- package/README.md +181 -181
- package/dist/components/CraftBook/CraftBook.d.ts +4 -1
- package/dist/components/CraftBook/CraftingRecipe.d.ts +15 -0
- package/dist/components/InputRadio.d.ts +10 -0
- package/dist/libs/itemCounter.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +1549 -1409
- 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 +1553 -1413
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +100 -100
- package/src/components/Abstractions/ModalPortal.tsx +22 -22
- package/src/components/Abstractions/SlotsContainer.tsx +62 -62
- package/src/components/Arrow/SelectArrow.tsx +69 -69
- package/src/components/Arrow/img/arrow01-left-clicked.png +0 -0
- package/src/components/Arrow/img/arrow01-left.png +0 -0
- package/src/components/Arrow/img/arrow01-right-clicked.png +0 -0
- package/src/components/Arrow/img/arrow01-right.png +0 -0
- package/src/components/Arrow/img/arrow02-left-clicked.png +0 -0
- package/src/components/Arrow/img/arrow02-left.png +0 -0
- package/src/components/Arrow/img/arrow02-right-clicked.png +0 -0
- package/src/components/Arrow/img/arrow02-right.png +0 -0
- package/src/components/Button.tsx +40 -40
- package/src/components/Character/CharacterSelection.tsx +98 -98
- package/src/components/CharacterStatus/CharacterStatus.tsx +120 -120
- package/src/components/Chat/Chat.tsx +196 -196
- package/src/components/Chatdeprecated/ChatDeprecated.tsx +198 -198
- package/src/components/CheckButton.tsx +65 -65
- package/src/components/CircularController/CircularController.tsx +249 -249
- package/src/components/CraftBook/CraftBook.tsx +286 -260
- package/src/components/CraftBook/CraftingRecipe.tsx +161 -0
- package/src/components/CraftBook/MockItems.ts +101 -89
- package/src/components/DraggableContainer.tsx +180 -180
- package/src/components/DropdownSelectorContainer.tsx +42 -42
- package/src/components/Equipment/EquipmentSet.tsx +199 -199
- package/src/components/HistoryDialog.tsx +104 -104
- package/src/components/Input.tsx +15 -15
- package/src/components/InputRadio.tsx +41 -0
- package/src/components/Item/Cards/ItemInfo.tsx +288 -252
- package/src/components/Item/Cards/ItemInfoDisplay.tsx +135 -128
- package/src/components/Item/Cards/ItemInfoWrapper.tsx +62 -62
- package/src/components/Item/Cards/ItemTooltip.tsx +83 -83
- package/src/components/Item/Cards/MobileItemTooltip.tsx +149 -149
- package/src/components/Item/Inventory/ErrorBoundary.tsx +42 -42
- package/src/components/Item/Inventory/ItemContainer.tsx +231 -231
- package/src/components/Item/Inventory/ItemContainerTypes.ts +6 -6
- package/src/components/Item/Inventory/ItemQuantitySelector.tsx +138 -138
- package/src/components/Item/Inventory/ItemSlot.tsx +580 -580
- package/src/components/Item/Inventory/itemContainerHelper.ts +175 -175
- package/src/components/ListMenu.tsx +63 -63
- package/src/components/Marketplace/Marketplace.tsx +132 -132
- package/src/components/Marketplace/MarketplaceRows.tsx +171 -171
- package/src/components/Marketplace/__mocks__/index.tsx +65 -65
- package/src/components/Multitab/Tab.tsx +66 -66
- package/src/components/Multitab/TabBody.tsx +13 -13
- package/src/components/Multitab/TabsContainer.tsx +97 -97
- package/src/components/NPCDialog/NPCDialog.tsx +121 -121
- package/src/components/NPCDialog/NPCDialogText.tsx +113 -113
- package/src/components/NPCDialog/NPCMultiDialog.tsx +159 -159
- package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +237 -237
- package/src/components/ProgressBar.tsx +92 -92
- package/src/components/PropertySelect/PropertySelect.tsx +106 -106
- package/src/components/QuestInfo/QuestInfo.tsx +233 -233
- package/src/components/QuestList.tsx +135 -135
- package/src/components/RPGUIContainer.tsx +47 -47
- package/src/components/RPGUIForceRenderStart.tsx +45 -45
- package/src/components/RPGUIRoot.tsx +14 -14
- package/src/components/RadioButton.tsx +53 -53
- package/src/components/RadioInput/RadioButton.tsx +96 -96
- package/src/components/RadioInput/RadioInput.tsx +102 -102
- package/src/components/RadioInput/instruments.ts +15 -15
- package/src/components/RangeSlider.tsx +78 -78
- package/src/components/RelativeListMenu.tsx +90 -90
- package/src/components/ScrollList.tsx +79 -79
- package/src/components/Shortcuts/Shortcuts.tsx +153 -152
- package/src/components/Shortcuts/ShortcutsSetter.tsx +139 -139
- package/src/components/Shortcuts/SingleShortcut.ts +62 -62
- package/src/components/SimpleProgressBar.tsx +62 -62
- package/src/components/SkillProgressBar.tsx +133 -133
- package/src/components/SkillsContainer.tsx +206 -206
- package/src/components/Spellbook/Spell.tsx +201 -201
- package/src/components/Spellbook/Spellbook.tsx +153 -153
- package/src/components/Spellbook/constants.ts +8 -8
- package/src/components/Spellbook/mockSpells.ts +60 -60
- package/src/components/StaticBook/StaticBook.tsx +103 -103
- package/src/components/TextArea.tsx +11 -11
- package/src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx +35 -35
- package/src/components/TimeWidget/TimeWidget.tsx +65 -65
- package/src/components/TradingMenu/TradingItemRow.tsx +199 -199
- package/src/components/TradingMenu/TradingMenu.tsx +219 -219
- package/src/components/TradingMenu/items.mock.ts +48 -48
- package/src/components/Truncate.tsx +25 -25
- package/src/components/itemSelector/ItemSelector.tsx +136 -136
- package/src/components/shared/Column.tsx +16 -16
- package/src/components/shared/Ellipsis.tsx +68 -68
- package/src/components/shared/SpriteFromAtlas.tsx +104 -104
- package/src/components/typography/DynamicText.tsx +49 -49
- package/src/constants/uiColors.ts +20 -20
- package/src/constants/uiDevices.ts +3 -3
- package/src/constants/uiFonts.ts +12 -12
- package/src/hooks/useEventListener.ts +21 -21
- package/src/hooks/useOutsideAlerter.ts +25 -25
- package/src/index.tsx +42 -42
- package/src/libs/StringHelpers.ts +3 -3
- package/src/libs/itemCounter.ts +22 -0
- package/src/mocks/atlas/entities/entities.json +20215 -20215
- package/src/mocks/atlas/icons/icons.json +735 -735
- package/src/mocks/atlas/items/items.json +12086 -12086
- package/src/mocks/equipmentSet.mocks.ts +391 -391
- package/src/mocks/itemContainer.mocks.ts +605 -563
- package/src/mocks/skills.mocks.ts +128 -128
- package/src/stories/Arrow.stories.tsx +26 -26
- package/src/stories/Button.stories.tsx +36 -36
- package/src/stories/CharacterSelection.stories.tsx +44 -44
- package/src/stories/CharacterStatus.stories.tsx +29 -29
- package/src/stories/Chat.stories.tsx +187 -187
- package/src/stories/ChatDeprecated.stories.tsx +170 -170
- package/src/stories/CheckButton.stories.tsx +48 -48
- package/src/stories/CircullarController.stories.tsx +37 -37
- package/src/stories/CraftBook.stories.tsx +42 -42
- package/src/stories/DayNightPeriod.stories.tsx +27 -27
- package/src/stories/DraggableContainer.stories.tsx +28 -28
- package/src/stories/Dropdown.stories.tsx +46 -46
- package/src/stories/DropdownSelectorContainer.stories.tsx +41 -41
- package/src/stories/EquipmentSet.stories.tsx +65 -65
- package/src/stories/HistoryDialog.stories.tsx +61 -61
- package/src/stories/ItemContainer.stories.tsx +201 -201
- package/src/stories/ItemInfoDisplay.stories.tsx +33 -33
- package/src/stories/ItemQuantitySelector.stories.tsx +26 -26
- package/src/stories/ItemSelector.stories.tsx +77 -77
- package/src/stories/ItemTradingComponent.stories.tsx +35 -35
- package/src/stories/ListMenu.stories.tsx +56 -56
- package/src/stories/Marketplace.stories.tsx +42 -42
- package/src/stories/MarketplaceRows.stories.tsx +28 -28
- package/src/stories/Multitab.stories.tsx +51 -51
- package/src/stories/NPCDialog.stories.tsx +130 -130
- package/src/stories/NPCMultiDialog.stories.tsx +71 -71
- package/src/stories/ProgressBar.stories.tsx +23 -23
- package/src/stories/PropertySelect.stories.tsx +40 -40
- package/src/stories/QuestInfo.stories.tsx +107 -107
- package/src/stories/QuestList.stories.tsx +82 -82
- package/src/stories/RPGUIContainers.stories.tsx +42 -42
- package/src/stories/RadioButton.stories.tsx +49 -49
- package/src/stories/RadioInput.stories.tsx +34 -34
- package/src/stories/RangeSlider.stories.tsx +64 -64
- package/src/stories/ScrollList.stories.tsx +85 -85
- package/src/stories/Shortcuts.stories.tsx +39 -39
- package/src/stories/SimpleProgressBar.stories.tsx +22 -22
- package/src/stories/SkillProgressBar.stories.tsx +34 -34
- package/src/stories/SkillsContainer.stories.tsx +35 -35
- package/src/stories/Spellbook.stories.tsx +104 -104
- package/src/stories/StaticBook.stories.tsx +32 -32
- package/src/stories/Text.stories.tsx +42 -42
- package/src/stories/TimeWidget.stories.tsx +27 -27
- package/src/stories/TradingMenu.stories.tsx +47 -47
- package/src/types/eventTypes.ts +4 -4
- package/src/types/index.d.ts +2 -2
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { Component, useState, useEffect, useRef, useMemo, Fragment } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSubType, ItemSlotType,
|
|
3
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSubType, ItemSlotType, getSPForLevel, PeriodOfDay, isMobileOrTablet } from '@rpg-engine/shared';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
6
6
|
import { RxPaperPlane } from 'react-icons/rx';
|
|
7
7
|
import Draggable from 'react-draggable';
|
|
8
|
-
import { v4 } from 'uuid';
|
|
9
8
|
import ReactDOM from 'react-dom';
|
|
10
9
|
import { camelCase } from 'lodash-es';
|
|
11
10
|
import { observer } from 'mobx-react-lite';
|
|
11
|
+
import { v4 } from 'uuid';
|
|
12
12
|
import 'rpgui/rpgui.min.css';
|
|
13
13
|
import 'rpgui/rpgui.min.js';
|
|
14
14
|
import capitalize from 'lodash-es/capitalize';
|
|
@@ -12628,7 +12628,7 @@ var Button$1 = /*#__PURE__*/styled.button.withConfig({
|
|
|
12628
12628
|
});
|
|
12629
12629
|
|
|
12630
12630
|
var uiColors = {
|
|
12631
|
-
lightGray: '#
|
|
12631
|
+
lightGray: '#888',
|
|
12632
12632
|
gray: '#4E4A4E',
|
|
12633
12633
|
darkGray: '#3e3e3e',
|
|
12634
12634
|
darkYellow: '#FFC857',
|
|
@@ -12644,7 +12644,7 @@ var uiColors = {
|
|
|
12644
12644
|
blue: '#597DCE',
|
|
12645
12645
|
darkBlue: '#30346D',
|
|
12646
12646
|
brown: '#854C30',
|
|
12647
|
-
lightGreen: '#
|
|
12647
|
+
lightGreen: '#66cd1c',
|
|
12648
12648
|
brownGreen: '#346524'
|
|
12649
12649
|
};
|
|
12650
12650
|
|
|
@@ -13099,96 +13099,54 @@ var Icon = /*#__PURE__*/styled.img.withConfig({
|
|
|
13099
13099
|
return props.width;
|
|
13100
13100
|
});
|
|
13101
13101
|
|
|
13102
|
-
var
|
|
13103
|
-
var
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
}
|
|
13134
|
-
}, [options]);
|
|
13135
|
-
useEffect(function () {
|
|
13136
|
-
if (selectedValue) {
|
|
13137
|
-
onChange(selectedValue);
|
|
13138
|
-
}
|
|
13139
|
-
}, [selectedValue]);
|
|
13140
|
-
return React.createElement(Container$7, {
|
|
13141
|
-
onMouseLeave: function onMouseLeave() {
|
|
13142
|
-
return setOpened(false);
|
|
13143
|
-
},
|
|
13144
|
-
width: width
|
|
13145
|
-
}, React.createElement(DropdownSelect, {
|
|
13146
|
-
id: "dropdown-" + dropdownId,
|
|
13147
|
-
className: "rpgui-dropdown-imp rpgui-dropdown-imp-header",
|
|
13148
|
-
onPointerDown: function onPointerDown() {
|
|
13149
|
-
return setOpened(function (prev) {
|
|
13150
|
-
return !prev;
|
|
13151
|
-
});
|
|
13152
|
-
}
|
|
13153
|
-
}, React.createElement("label", null, "\u25BC"), " ", selectedOption), React.createElement(DropdownOptions, {
|
|
13154
|
-
className: "rpgui-dropdown-imp",
|
|
13155
|
-
opened: opened
|
|
13156
|
-
}, options.map(function (option) {
|
|
13157
|
-
return React.createElement("li", {
|
|
13158
|
-
key: option.id,
|
|
13159
|
-
onPointerDown: function onPointerDown() {
|
|
13160
|
-
setSelectedValue(option.value);
|
|
13161
|
-
setSelectedOption(option.option);
|
|
13162
|
-
setOpened(false);
|
|
13102
|
+
var InputRadio = function InputRadio(_ref) {
|
|
13103
|
+
var label = _ref.label,
|
|
13104
|
+
name = _ref.name,
|
|
13105
|
+
value = _ref.value,
|
|
13106
|
+
isChecked = _ref.isChecked,
|
|
13107
|
+
onRadioSelect = _ref.onRadioSelect;
|
|
13108
|
+
var onRadioClick = function onRadioClick() {
|
|
13109
|
+
onRadioSelect(value);
|
|
13110
|
+
};
|
|
13111
|
+
return React.createElement("div", {
|
|
13112
|
+
onPointerUp: onRadioClick
|
|
13113
|
+
}, React.createElement("input", {
|
|
13114
|
+
className: "rpgui-radio",
|
|
13115
|
+
name: name,
|
|
13116
|
+
value: value,
|
|
13117
|
+
type: "radio",
|
|
13118
|
+
"data-rpguitype": "radio",
|
|
13119
|
+
checked: isChecked,
|
|
13120
|
+
// rpgui breaks onChange on this input (doesn't work). That's why I had to wrap it with a div and a onClick listener.
|
|
13121
|
+
readOnly: true
|
|
13122
|
+
}), React.createElement("label", null, label));
|
|
13123
|
+
};
|
|
13124
|
+
|
|
13125
|
+
var countItemFromInventory = function countItemFromInventory(itemKey, inventory) {
|
|
13126
|
+
var itemsFromInventory = [];
|
|
13127
|
+
if (inventory) {
|
|
13128
|
+
Object.keys(inventory.slots).forEach(function (i) {
|
|
13129
|
+
var _inventory$slots$inde;
|
|
13130
|
+
var index = parseInt(i);
|
|
13131
|
+
if (((_inventory$slots$inde = inventory.slots[index]) == null ? void 0 : _inventory$slots$inde.key) === itemKey) {
|
|
13132
|
+
itemsFromInventory.push(inventory.slots[index]);
|
|
13163
13133
|
}
|
|
13164
|
-
}
|
|
13165
|
-
}
|
|
13134
|
+
});
|
|
13135
|
+
}
|
|
13136
|
+
var totalQty = itemsFromInventory.reduce(function (acc, item) {
|
|
13137
|
+
return acc + ((item == null ? void 0 : item.stackQty) || 1);
|
|
13138
|
+
}, 0);
|
|
13139
|
+
return totalQty;
|
|
13166
13140
|
};
|
|
13167
|
-
var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
13168
|
-
displayName: "Dropdown__Container",
|
|
13169
|
-
componentId: "sc-8arn65-0"
|
|
13170
|
-
})(["position:relative;width:", ";"], function (props) {
|
|
13171
|
-
return props.width || '100%';
|
|
13172
|
-
});
|
|
13173
|
-
var DropdownSelect = /*#__PURE__*/styled.p.withConfig({
|
|
13174
|
-
displayName: "Dropdown__DropdownSelect",
|
|
13175
|
-
componentId: "sc-8arn65-1"
|
|
13176
|
-
})(["width:100%;box-sizing:border-box;"]);
|
|
13177
|
-
var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
13178
|
-
displayName: "Dropdown__DropdownOptions",
|
|
13179
|
-
componentId: "sc-8arn65-2"
|
|
13180
|
-
})(["position:absolute;width:100%;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
13181
|
-
return props.opened ? 'block' : 'none';
|
|
13182
|
-
});
|
|
13183
13141
|
|
|
13184
13142
|
var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
|
|
13185
13143
|
var ModalPortal = function ModalPortal(_ref) {
|
|
13186
13144
|
var children = _ref.children;
|
|
13187
|
-
return ReactDOM.createPortal(React.createElement(Container$
|
|
13145
|
+
return ReactDOM.createPortal(React.createElement(Container$7, {
|
|
13188
13146
|
className: "rpgui-content"
|
|
13189
13147
|
}, children), modalRoot);
|
|
13190
13148
|
};
|
|
13191
|
-
var Container$
|
|
13149
|
+
var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
13192
13150
|
displayName: "ModalPortal__Container",
|
|
13193
13151
|
componentId: "sc-dgmp04-0"
|
|
13194
13152
|
})(["position:static !important;"]);
|
|
@@ -13215,7 +13173,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
13215
13173
|
document.removeEventListener('clickOutside', function (_e) {});
|
|
13216
13174
|
};
|
|
13217
13175
|
}, []);
|
|
13218
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
13176
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$8, Object.assign({
|
|
13219
13177
|
fontSize: fontSize,
|
|
13220
13178
|
ref: ref
|
|
13221
13179
|
}, pos), React.createElement("ul", {
|
|
@@ -13232,7 +13190,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
13232
13190
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
13233
13191
|
}))));
|
|
13234
13192
|
};
|
|
13235
|
-
var Container$
|
|
13193
|
+
var Container$8 = /*#__PURE__*/styled.div.withConfig({
|
|
13236
13194
|
displayName: "RelativeListMenu__Container",
|
|
13237
13195
|
componentId: "sc-7hohf-0"
|
|
13238
13196
|
})(["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) {
|
|
@@ -13262,7 +13220,7 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
13262
13220
|
var _ref$current;
|
|
13263
13221
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
13264
13222
|
};
|
|
13265
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
13223
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$9, {
|
|
13266
13224
|
ref: ref,
|
|
13267
13225
|
onTouchEnd: function onTouchEnd() {
|
|
13268
13226
|
handleFadeOut();
|
|
@@ -13290,18 +13248,18 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
13290
13248
|
}, option.text);
|
|
13291
13249
|
}))));
|
|
13292
13250
|
};
|
|
13293
|
-
var Container$
|
|
13251
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
13294
13252
|
displayName: "MobileItemTooltip__Container",
|
|
13295
13253
|
componentId: "sc-ku4p1j-0"
|
|
13296
|
-
})(["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:
|
|
13254
|
+
})(["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;}"]);
|
|
13297
13255
|
var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
13298
13256
|
displayName: "MobileItemTooltip__OptionsContainer",
|
|
13299
13257
|
componentId: "sc-ku4p1j-1"
|
|
13300
|
-
})(["display:flex;flex-direction:column;gap:0.5rem;flex-wrap:wrap;@media (max-width:
|
|
13258
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;flex-wrap:wrap;@media (max-width:640px){flex-direction:row;justify-content:center;}"]);
|
|
13301
13259
|
var Option = /*#__PURE__*/styled.button.withConfig({
|
|
13302
13260
|
displayName: "MobileItemTooltip__Option",
|
|
13303
13261
|
componentId: "sc-ku4p1j-2"
|
|
13304
|
-
})(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.1s;&:hover{background-color:#555;}@media (max-width:
|
|
13262
|
+
})(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.1s;&:hover{background-color:#555;}@media (max-width:640px){padding:1rem 0.5rem;}"]);
|
|
13305
13263
|
|
|
13306
13264
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
13307
13265
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
@@ -13615,7 +13573,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13615
13573
|
onDragEnd(quantity);
|
|
13616
13574
|
}
|
|
13617
13575
|
};
|
|
13618
|
-
return React.createElement(Container$
|
|
13576
|
+
return React.createElement(Container$a, {
|
|
13619
13577
|
item: item,
|
|
13620
13578
|
className: "rpgui-icon empty-slot",
|
|
13621
13579
|
onMouseUp: function onMouseUp() {
|
|
@@ -13783,7 +13741,7 @@ var rarityColor = function rarityColor(item) {
|
|
|
13783
13741
|
return null;
|
|
13784
13742
|
}
|
|
13785
13743
|
};
|
|
13786
|
-
var Container$
|
|
13744
|
+
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
13787
13745
|
displayName: "ItemSlot__Container",
|
|
13788
13746
|
componentId: "sc-l2j5ef-0"
|
|
13789
13747
|
})(["margin:0.1rem;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;&::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) {
|
|
@@ -13875,6 +13833,15 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
13875
13833
|
}
|
|
13876
13834
|
return statistics;
|
|
13877
13835
|
};
|
|
13836
|
+
var renderEntityEffects = function renderEntityEffects() {
|
|
13837
|
+
if (!item.entityEffects || !item.entityEffectChance) return null;
|
|
13838
|
+
return item.entityEffects.map(function (effect, index) {
|
|
13839
|
+
return React.createElement(Statistic, {
|
|
13840
|
+
key: index,
|
|
13841
|
+
"$isSpecial": true
|
|
13842
|
+
}, effect[0].toUpperCase() + effect.slice(1), " (", item.entityEffectChance, "%)");
|
|
13843
|
+
});
|
|
13844
|
+
};
|
|
13878
13845
|
var renderAvaibleSlots = function renderAvaibleSlots() {
|
|
13879
13846
|
if (!item.allowedEquipSlotType) return null;
|
|
13880
13847
|
return item.allowedEquipSlotType.map(function (slotType, index) {
|
|
@@ -13894,16 +13861,22 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
13894
13861
|
}));
|
|
13895
13862
|
});
|
|
13896
13863
|
};
|
|
13897
|
-
return React.createElement(Container$
|
|
13864
|
+
return React.createElement(Container$b, {
|
|
13898
13865
|
item: item
|
|
13899
13866
|
}, React.createElement(Header, null, React.createElement("div", null, React.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React.createElement(Rarity, {
|
|
13900
13867
|
item: item
|
|
13901
|
-
}, item.rarity), React.createElement(Type, null, item.subType)), React.createElement(AllowedSlots, null, renderAvaibleSlots())),
|
|
13868
|
+
}, item.rarity), React.createElement(Type, null, item.subType)), React.createElement(AllowedSlots, null, renderAvaibleSlots())), item.minRequirements && React.createElement(LevelRequirement, null, React.createElement("div", null, "Level: ", item.minRequirements.level), React.createElement("div", null, item.minRequirements.skill.name[0].toUpperCase() + item.minRequirements.skill.name.slice(1), ": ", item.minRequirements.skill.level)), renderStatistics(), renderEntityEffects(), item.usableEffectDescription && React.createElement(Statistic, {
|
|
13869
|
+
"$isSpecial": true
|
|
13870
|
+
}, item.usableEffectDescription), item.equippedBuffDescription && React.createElement(Statistic, {
|
|
13871
|
+
"$isSpecial": true
|
|
13872
|
+
}, item.equippedBuffDescription), item.isTwoHanded && React.createElement(Statistic, {
|
|
13873
|
+
"$isSpecial": true
|
|
13874
|
+
}, "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()));
|
|
13902
13875
|
};
|
|
13903
|
-
var Container$
|
|
13876
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
13904
13877
|
displayName: "ItemInfo__Container",
|
|
13905
13878
|
componentId: "sc-1xm4q8k-0"
|
|
13906
|
-
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:
|
|
13879
|
+
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:18rem;@media (max-width:640px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
|
|
13907
13880
|
var _rarityColor;
|
|
13908
13881
|
var item = _ref2.item;
|
|
13909
13882
|
return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
|
|
@@ -13923,29 +13896,36 @@ var Type = /*#__PURE__*/styled.div.withConfig({
|
|
|
13923
13896
|
displayName: "ItemInfo__Type",
|
|
13924
13897
|
componentId: "sc-1xm4q8k-3"
|
|
13925
13898
|
})(["font-size:", ";margin-top:0.2rem;color:", ";"], uiFonts.size.small, uiColors.lightGray);
|
|
13899
|
+
var LevelRequirement = /*#__PURE__*/styled.div.withConfig({
|
|
13900
|
+
displayName: "ItemInfo__LevelRequirement",
|
|
13901
|
+
componentId: "sc-1xm4q8k-4"
|
|
13902
|
+
})(["font-size:", ";margin-top:0.2rem;margin-bottom:1rem;color:", ";"], uiFonts.size.small, uiColors.orange);
|
|
13926
13903
|
var Statistic = /*#__PURE__*/styled.div.withConfig({
|
|
13927
13904
|
displayName: "ItemInfo__Statistic",
|
|
13928
|
-
componentId: "sc-1xm4q8k-
|
|
13929
|
-
})(["margin-bottom:0.4rem;width:
|
|
13905
|
+
componentId: "sc-1xm4q8k-5"
|
|
13906
|
+
})(["margin-bottom:0.4rem;width:100%;color:", ";.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], function (_ref4) {
|
|
13907
|
+
var $isSpecial = _ref4.$isSpecial;
|
|
13908
|
+
return $isSpecial ? uiColors.darkYellow : 'inherit';
|
|
13909
|
+
}, uiColors.lightGreen, uiColors.cardinal);
|
|
13930
13910
|
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
13931
13911
|
displayName: "ItemInfo__Description",
|
|
13932
|
-
componentId: "sc-1xm4q8k-
|
|
13912
|
+
componentId: "sc-1xm4q8k-6"
|
|
13933
13913
|
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
13934
13914
|
var Header = /*#__PURE__*/styled.div.withConfig({
|
|
13935
13915
|
displayName: "ItemInfo__Header",
|
|
13936
|
-
componentId: "sc-1xm4q8k-
|
|
13916
|
+
componentId: "sc-1xm4q8k-7"
|
|
13937
13917
|
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
13938
13918
|
var AllowedSlots = /*#__PURE__*/styled.div.withConfig({
|
|
13939
13919
|
displayName: "ItemInfo__AllowedSlots",
|
|
13940
|
-
componentId: "sc-1xm4q8k-
|
|
13920
|
+
componentId: "sc-1xm4q8k-8"
|
|
13941
13921
|
})(["display:flex;align-items:center;justify-content:center;gap:0.5rem;margin-left:auto;align-self:flex-start;"]);
|
|
13942
13922
|
var StackInfo = /*#__PURE__*/styled.div.withConfig({
|
|
13943
13923
|
displayName: "ItemInfo__StackInfo",
|
|
13944
|
-
componentId: "sc-1xm4q8k-
|
|
13924
|
+
componentId: "sc-1xm4q8k-9"
|
|
13945
13925
|
})(["width:100%;text-align:right;font-size:", ";color:", ";margin-top:1rem;"], uiFonts.size.small, uiColors.orange);
|
|
13946
13926
|
var MissingStatistics = /*#__PURE__*/styled.div.withConfig({
|
|
13947
13927
|
displayName: "ItemInfo__MissingStatistics",
|
|
13948
|
-
componentId: "sc-1xm4q8k-
|
|
13928
|
+
componentId: "sc-1xm4q8k-10"
|
|
13949
13929
|
})(["margin-top:1rem;color:", ";"], uiColors.cardinal);
|
|
13950
13930
|
|
|
13951
13931
|
var itemSlotTypes = ['head', 'neck', 'leftHand', 'rightHand', 'ring', 'legs', 'boot', 'accessory', 'armor', 'inventory'];
|
|
@@ -13967,7 +13947,11 @@ var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
|
|
|
13967
13947
|
var allowedSlotTypeCamelCase = camelCase(item.allowedEquipSlotType[0]);
|
|
13968
13948
|
var itemSubTypeCamelCase = camelCase(item.subType);
|
|
13969
13949
|
var slotType = getSlotType(itemSlotTypes, allowedSlotTypeCamelCase, itemSubTypeCamelCase);
|
|
13970
|
-
var
|
|
13950
|
+
var itemSubTypeFromEquipment = Object.values(equipmentSet).find(function (item) {
|
|
13951
|
+
var _item$subType;
|
|
13952
|
+
return camelCase((_item$subType = item == null ? void 0 : item.subType) != null ? _item$subType : '') === itemSubTypeCamelCase;
|
|
13953
|
+
});
|
|
13954
|
+
var itemFromEquipment = itemSubTypeFromEquipment ? itemSubTypeFromEquipment : equipmentSet[slotType];
|
|
13971
13955
|
if (itemFromEquipment && (!item._id || itemFromEquipment._id !== item._id)) {
|
|
13972
13956
|
return itemFromEquipment;
|
|
13973
13957
|
}
|
|
@@ -13991,7 +13975,7 @@ var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
|
|
|
13991
13975
|
var Flex = /*#__PURE__*/styled.div.withConfig({
|
|
13992
13976
|
displayName: "ItemInfoDisplay__Flex",
|
|
13993
13977
|
componentId: "sc-1lftdo8-0"
|
|
13994
|
-
})(["display:flex;gap:0.5rem;flex-direction:", ";@media (max-width:
|
|
13978
|
+
})(["display:flex;gap:0.5rem;flex-direction:", ";align-items:center;@media (max-width:640px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
|
|
13995
13979
|
var $isMobile = _ref2.$isMobile;
|
|
13996
13980
|
return $isMobile ? 'row-reverse' : 'row';
|
|
13997
13981
|
});
|
|
@@ -14035,7 +14019,7 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
14035
14019
|
}
|
|
14036
14020
|
return;
|
|
14037
14021
|
}, []);
|
|
14038
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
14022
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$c, {
|
|
14039
14023
|
ref: ref
|
|
14040
14024
|
}, React.createElement(ItemInfoDisplay, {
|
|
14041
14025
|
item: item,
|
|
@@ -14044,7 +14028,7 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
14044
14028
|
equipmentSet: equipmentSet
|
|
14045
14029
|
})));
|
|
14046
14030
|
};
|
|
14047
|
-
var Container$
|
|
14031
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
14048
14032
|
displayName: "ItemTooltip__Container",
|
|
14049
14033
|
componentId: "sc-11d9r7x-0"
|
|
14050
14034
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -14089,41 +14073,17 @@ var ItemInfoWrapper = function ItemInfoWrapper(_ref) {
|
|
|
14089
14073
|
}));
|
|
14090
14074
|
};
|
|
14091
14075
|
|
|
14092
|
-
var
|
|
14076
|
+
var CraftingRecipe = function CraftingRecipe(_ref) {
|
|
14077
|
+
var _skills$level, _skills, _recipe$minCraftingRe, _recipe$minCraftingRe2, _recipe$levelIsOk, _recipe$minCraftingRe3, _recipe$minCraftingRe4, _recipe$minCraftingRe5, _recipe$minCraftingRe6;
|
|
14093
14078
|
var atlasIMG = _ref.atlasIMG,
|
|
14094
14079
|
atlasJSON = _ref.atlasJSON,
|
|
14095
|
-
onClose = _ref.onClose,
|
|
14096
|
-
onSelect = _ref.onSelect,
|
|
14097
|
-
onCraftItem = _ref.onCraftItem,
|
|
14098
|
-
craftablesItems = _ref.craftablesItems,
|
|
14099
14080
|
equipmentSet = _ref.equipmentSet,
|
|
14100
|
-
|
|
14101
|
-
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14106
|
-
isShown = _useState[0],
|
|
14107
|
-
setIsShown = _useState[1];
|
|
14108
|
-
var _useState2 = useState(),
|
|
14109
|
-
craftItem = _useState2[0],
|
|
14110
|
-
setCraftItem = _useState2[1];
|
|
14111
|
-
var getDropdownOptions = function getDropdownOptions() {
|
|
14112
|
-
var options = [];
|
|
14113
|
-
Object.keys(ItemSubType).forEach(function (key) {
|
|
14114
|
-
if (key === 'DeadBody') {
|
|
14115
|
-
return; // we can't craft crafting resouces...
|
|
14116
|
-
}
|
|
14117
|
-
|
|
14118
|
-
options.push({
|
|
14119
|
-
id: optionsId,
|
|
14120
|
-
value: key,
|
|
14121
|
-
option: key
|
|
14122
|
-
});
|
|
14123
|
-
optionsId += 1;
|
|
14124
|
-
});
|
|
14125
|
-
return options;
|
|
14126
|
-
};
|
|
14081
|
+
recipe = _ref.recipe,
|
|
14082
|
+
scale = _ref.scale,
|
|
14083
|
+
handleRecipeSelect = _ref.handleRecipeSelect,
|
|
14084
|
+
selectedCraftItemKey = _ref.selectedCraftItemKey,
|
|
14085
|
+
inventory = _ref.inventory,
|
|
14086
|
+
skills = _ref.skills;
|
|
14127
14087
|
var modifyString = function modifyString(str) {
|
|
14128
14088
|
// Split the string by "/" and "."
|
|
14129
14089
|
var parts = str.split('/');
|
|
@@ -14139,12 +14099,180 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
14139
14099
|
name = modifiedWords.join(' ');
|
|
14140
14100
|
return name;
|
|
14141
14101
|
};
|
|
14142
|
-
var
|
|
14143
|
-
|
|
14102
|
+
var levelInSkill = (_skills$level = skills == null ? void 0 : (_skills = skills[(_recipe$minCraftingRe = recipe == null ? void 0 : (_recipe$minCraftingRe2 = recipe.minCraftingRequirements) == null ? void 0 : _recipe$minCraftingRe2[0]) != null ? _recipe$minCraftingRe : '']) == null ? void 0 : _skills.level) != null ? _skills$level : 1;
|
|
14103
|
+
return React.createElement(RadioOptionsWrapper, null, React.createElement(SpriteAtlasWrapper, null, React.createElement(ItemInfoWrapper, {
|
|
14104
|
+
item: recipe,
|
|
14105
|
+
atlasIMG: atlasIMG,
|
|
14106
|
+
atlasJSON: atlasJSON,
|
|
14107
|
+
equipmentSet: equipmentSet,
|
|
14108
|
+
scale: scale
|
|
14109
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
14110
|
+
atlasIMG: atlasIMG,
|
|
14111
|
+
atlasJSON: atlasJSON,
|
|
14112
|
+
spriteKey: recipe.texturePath,
|
|
14113
|
+
imgScale: 3,
|
|
14114
|
+
grayScale: !recipe.canCraft
|
|
14115
|
+
}))), React.createElement("div", null, React.createElement("div", {
|
|
14116
|
+
onPointerUp: recipe.canCraft ? handleRecipeSelect : undefined
|
|
14117
|
+
}, React.createElement("input", {
|
|
14118
|
+
className: "rpgui-radio",
|
|
14119
|
+
type: "radio",
|
|
14120
|
+
value: recipe.name,
|
|
14121
|
+
name: "test",
|
|
14122
|
+
disabled: !recipe.canCraft,
|
|
14123
|
+
checked: selectedCraftItemKey === recipe.key,
|
|
14124
|
+
onChange: handleRecipeSelect
|
|
14125
|
+
}), React.createElement("label", {
|
|
14126
|
+
style: {
|
|
14127
|
+
display: 'flex',
|
|
14128
|
+
alignItems: 'center'
|
|
14129
|
+
}
|
|
14130
|
+
}, modifyString(recipe.name))), React.createElement(MinCraftingRequirementsText, {
|
|
14131
|
+
levelIsOk: (_recipe$levelIsOk = recipe == null ? void 0 : recipe.levelIsOk) != null ? _recipe$levelIsOk : false
|
|
14132
|
+
}, modifyString("" + ((_recipe$minCraftingRe3 = recipe == null ? void 0 : (_recipe$minCraftingRe4 = recipe.minCraftingRequirements) == null ? void 0 : _recipe$minCraftingRe4[0]) != null ? _recipe$minCraftingRe3 : '')), " lvl", ' ', (_recipe$minCraftingRe5 = recipe == null ? void 0 : (_recipe$minCraftingRe6 = recipe.minCraftingRequirements) == null ? void 0 : _recipe$minCraftingRe6[1]) != null ? _recipe$minCraftingRe5 : 0, " (", levelInSkill, ")"), recipe.ingredients.map(function (ingredient, index) {
|
|
14133
|
+
var itemQtyInInventory = !inventory ? 0 : countItemFromInventory(ingredient.key, inventory);
|
|
14134
|
+
return React.createElement(Recipe, {
|
|
14135
|
+
key: index
|
|
14136
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
14137
|
+
atlasIMG: atlasIMG,
|
|
14138
|
+
atlasJSON: atlasJSON,
|
|
14139
|
+
spriteKey: ingredient.texturePath,
|
|
14140
|
+
imgScale: 1.2
|
|
14141
|
+
}), React.createElement(Ingredient, {
|
|
14142
|
+
isQuantityOk: ingredient.qty <= itemQtyInInventory
|
|
14143
|
+
}, modifyString(ingredient.key), " x", ingredient.qty, " (", itemQtyInInventory, ")"));
|
|
14144
|
+
})));
|
|
14145
|
+
};
|
|
14146
|
+
var Ingredient = /*#__PURE__*/styled.p.withConfig({
|
|
14147
|
+
displayName: "CraftingRecipe__Ingredient",
|
|
14148
|
+
componentId: "sc-1fe04wz-0"
|
|
14149
|
+
})(["margin:0;margin-left:14px;color:", " !important;"], function (_ref2) {
|
|
14150
|
+
var isQuantityOk = _ref2.isQuantityOk;
|
|
14151
|
+
return isQuantityOk ? uiColors.lightGreen : uiColors.lightGray;
|
|
14152
|
+
});
|
|
14153
|
+
var Recipe = /*#__PURE__*/styled.div.withConfig({
|
|
14154
|
+
displayName: "CraftingRecipe__Recipe",
|
|
14155
|
+
componentId: "sc-1fe04wz-1"
|
|
14156
|
+
})(["font-size:0.6rem;margin-bottom:3px;display:flex;align-items:center;margin-left:4px;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
14157
|
+
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
14158
|
+
displayName: "CraftingRecipe__SpriteAtlasWrapper",
|
|
14159
|
+
componentId: "sc-1fe04wz-2"
|
|
14160
|
+
})(["margin-right:40px;"]);
|
|
14161
|
+
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
14162
|
+
displayName: "CraftingRecipe__RadioOptionsWrapper",
|
|
14163
|
+
componentId: "sc-1fe04wz-3"
|
|
14164
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
14165
|
+
var MinCraftingRequirementsText = /*#__PURE__*/styled.p.withConfig({
|
|
14166
|
+
displayName: "CraftingRecipe__MinCraftingRequirementsText",
|
|
14167
|
+
componentId: "sc-1fe04wz-4"
|
|
14168
|
+
})(["font-size:0.6rem !important;margin:0 5px 0 35px;color:", " !important;"], function (_ref3) {
|
|
14169
|
+
var levelIsOk = _ref3.levelIsOk;
|
|
14170
|
+
return levelIsOk ? uiColors.lightGreen : uiColors.lightGray;
|
|
14171
|
+
});
|
|
14172
|
+
|
|
14173
|
+
var desktop = {
|
|
14174
|
+
width: 'min(900px, 80%)',
|
|
14175
|
+
height: 'min(700px, 80%)'
|
|
14176
|
+
};
|
|
14177
|
+
var mobileLanscape = {
|
|
14178
|
+
width: '800px',
|
|
14179
|
+
height: '500px'
|
|
14180
|
+
};
|
|
14181
|
+
var mobilePortrait = {
|
|
14182
|
+
width: '500px',
|
|
14183
|
+
height: '700px'
|
|
14184
|
+
};
|
|
14185
|
+
var CraftBook = function CraftBook(_ref) {
|
|
14186
|
+
var atlasIMG = _ref.atlasIMG,
|
|
14187
|
+
atlasJSON = _ref.atlasJSON,
|
|
14188
|
+
onClose = _ref.onClose,
|
|
14189
|
+
onSelect = _ref.onSelect,
|
|
14190
|
+
onCraftItem = _ref.onCraftItem,
|
|
14191
|
+
craftablesItems = _ref.craftablesItems,
|
|
14192
|
+
equipmentSet = _ref.equipmentSet,
|
|
14193
|
+
scale = _ref.scale,
|
|
14194
|
+
inventory = _ref.inventory,
|
|
14195
|
+
skills = _ref.skills,
|
|
14196
|
+
savedSelectedType = _ref.savedSelectedType;
|
|
14197
|
+
var _useState = useState(),
|
|
14198
|
+
craftItemKey = _useState[0],
|
|
14199
|
+
setCraftItemKey = _useState[1];
|
|
14200
|
+
var _useState2 = useState(savedSelectedType != null ? savedSelectedType : Object.keys(ItemSubType)[0]),
|
|
14201
|
+
selectedType = _useState2[0],
|
|
14202
|
+
setSelectedType = _useState2[1];
|
|
14203
|
+
var _useState3 = useState(),
|
|
14204
|
+
size = _useState3[0],
|
|
14205
|
+
setSize = _useState3[1];
|
|
14206
|
+
useEffect(function () {
|
|
14207
|
+
var handleResize = function handleResize() {
|
|
14208
|
+
if (window.innerWidth < 500 && (size == null ? void 0 : size.width) !== mobilePortrait.width && (!scale || scale < 1)) {
|
|
14209
|
+
setSize(mobilePortrait);
|
|
14210
|
+
} else if ((!scale || scale < 1) && (size == null ? void 0 : size.width) !== mobileLanscape.width) {
|
|
14211
|
+
setSize(mobileLanscape);
|
|
14212
|
+
} else if ((size == null ? void 0 : size.width) !== desktop.width) {
|
|
14213
|
+
setSize(desktop);
|
|
14214
|
+
}
|
|
14215
|
+
};
|
|
14216
|
+
handleResize();
|
|
14217
|
+
window.addEventListener('resize', handleResize);
|
|
14218
|
+
return function () {
|
|
14219
|
+
return window.removeEventListener('resize', handleResize);
|
|
14220
|
+
};
|
|
14221
|
+
}, [scale]);
|
|
14222
|
+
var renderItemTypes = function renderItemTypes() {
|
|
14223
|
+
var itemTypes = ['Suggested'].concat(Object.keys(ItemSubType)).filter(function (type) {
|
|
14224
|
+
return type !== 'DeadBody';
|
|
14225
|
+
}).sort(function (a, b) {
|
|
14226
|
+
if (a === 'Suggested') return -1;
|
|
14227
|
+
if (b === 'Suggested') return 1;
|
|
14228
|
+
return a.localeCompare(b);
|
|
14229
|
+
});
|
|
14230
|
+
if (window.innerWidth > parseInt(mobilePortrait.width)) {
|
|
14231
|
+
return itemTypes.map(function (type) {
|
|
14232
|
+
return React.createElement(InputRadio, {
|
|
14233
|
+
key: type,
|
|
14234
|
+
value: type,
|
|
14235
|
+
label: type,
|
|
14236
|
+
name: type,
|
|
14237
|
+
isChecked: selectedType === type,
|
|
14238
|
+
onRadioSelect: function onRadioSelect(value) {
|
|
14239
|
+
setSelectedType(value);
|
|
14240
|
+
onSelect(value);
|
|
14241
|
+
}
|
|
14242
|
+
});
|
|
14243
|
+
});
|
|
14244
|
+
}
|
|
14245
|
+
var rows = [[], []];
|
|
14246
|
+
itemTypes.forEach(function (type, index) {
|
|
14247
|
+
var row = 0;
|
|
14248
|
+
if (index % 2 === 1) row = 1;
|
|
14249
|
+
rows[row].push(React.createElement(InputRadio, {
|
|
14250
|
+
key: type,
|
|
14251
|
+
value: type,
|
|
14252
|
+
label: type,
|
|
14253
|
+
name: type,
|
|
14254
|
+
isChecked: selectedType === type,
|
|
14255
|
+
onRadioSelect: function onRadioSelect(value) {
|
|
14256
|
+
setSelectedType(value);
|
|
14257
|
+
onSelect(value);
|
|
14258
|
+
}
|
|
14259
|
+
}));
|
|
14260
|
+
});
|
|
14261
|
+
return rows.map(function (row, index) {
|
|
14262
|
+
return React.createElement("div", {
|
|
14263
|
+
key: index,
|
|
14264
|
+
style: {
|
|
14265
|
+
display: 'flex',
|
|
14266
|
+
gap: '10px'
|
|
14267
|
+
}
|
|
14268
|
+
}, row);
|
|
14269
|
+
});
|
|
14144
14270
|
};
|
|
14271
|
+
if (!size) return null;
|
|
14145
14272
|
return React.createElement(DraggableContainer, {
|
|
14146
14273
|
type: RPGUIContainerTypes.Framed,
|
|
14147
|
-
width:
|
|
14274
|
+
width: size.width,
|
|
14275
|
+
height: size.height,
|
|
14148
14276
|
cancelDrag: ".inputRadioCraftBook",
|
|
14149
14277
|
onCloseButton: function onCloseButton() {
|
|
14150
14278
|
if (onClose) {
|
|
@@ -14152,153 +14280,167 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
14152
14280
|
}
|
|
14153
14281
|
},
|
|
14154
14282
|
scale: scale
|
|
14155
|
-
}, React.createElement("div", {
|
|
14283
|
+
}, React.createElement(Wrapper, null, React.createElement("div", {
|
|
14156
14284
|
style: {
|
|
14157
14285
|
width: '100%'
|
|
14158
14286
|
}
|
|
14159
14287
|
}, React.createElement(Title$2, null, "Craftbook"), React.createElement(Subtitle, null, "Select an item to craft"), React.createElement("hr", {
|
|
14160
14288
|
className: "golden"
|
|
14161
|
-
})), React.createElement(
|
|
14162
|
-
options: getDropdownOptions(),
|
|
14163
|
-
onChange: function onChange(value) {
|
|
14164
|
-
return onSelect(value);
|
|
14165
|
-
}
|
|
14166
|
-
}), React.createElement(RadioInputScroller, {
|
|
14289
|
+
})), React.createElement(ContentContainer, null, React.createElement(ItemTypes, {
|
|
14167
14290
|
className: "inputRadioCraftBook"
|
|
14168
|
-
},
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
item: option,
|
|
14291
|
+
}, renderItemTypes()), React.createElement(RadioInputScroller, {
|
|
14292
|
+
className: "inputRadioCraftBook"
|
|
14293
|
+
}, craftablesItems == null ? void 0 : craftablesItems.map(function (item) {
|
|
14294
|
+
return React.createElement(CraftingRecipe, {
|
|
14295
|
+
key: item.key,
|
|
14174
14296
|
atlasIMG: atlasIMG,
|
|
14175
14297
|
atlasJSON: atlasJSON,
|
|
14176
14298
|
equipmentSet: equipmentSet,
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
onPointerDown: function onPointerDown() {
|
|
14186
|
-
return handleClick(option.key);
|
|
14187
|
-
}
|
|
14188
|
-
}, React.createElement("input", {
|
|
14189
|
-
className: "rpgui-radio",
|
|
14190
|
-
type: "radio",
|
|
14191
|
-
value: option.name,
|
|
14192
|
-
name: "test",
|
|
14193
|
-
disabled: !option.canCraft,
|
|
14194
|
-
checked: craftItem === option.key,
|
|
14195
|
-
onChange: function onChange() {
|
|
14196
|
-
return handleClick(option.key);
|
|
14197
|
-
}
|
|
14198
|
-
}), React.createElement("label", {
|
|
14199
|
-
onPointerDown: function onPointerDown() {
|
|
14200
|
-
handleClick(option.key);
|
|
14201
|
-
},
|
|
14202
|
-
onTouchEnd: function onTouchEnd() {
|
|
14203
|
-
setIsShown({
|
|
14204
|
-
show: true,
|
|
14205
|
-
index: index
|
|
14206
|
-
});
|
|
14207
|
-
},
|
|
14208
|
-
style: {
|
|
14209
|
-
display: 'flex',
|
|
14210
|
-
alignItems: 'center'
|
|
14211
|
-
},
|
|
14212
|
-
onMouseEnter: function onMouseEnter() {
|
|
14213
|
-
return setIsShown({
|
|
14214
|
-
show: true,
|
|
14215
|
-
index: index
|
|
14216
|
-
});
|
|
14217
|
-
},
|
|
14218
|
-
onMouseLeave: function onMouseLeave() {
|
|
14219
|
-
return setIsShown({
|
|
14220
|
-
show: false,
|
|
14221
|
-
index: index
|
|
14222
|
-
});
|
|
14223
|
-
}
|
|
14224
|
-
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
14225
|
-
return React.createElement(Recipes, {
|
|
14226
|
-
key: index
|
|
14227
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
14228
|
-
atlasIMG: atlasIMG,
|
|
14229
|
-
atlasJSON: atlasJSON,
|
|
14230
|
-
spriteKey: option.texturePath,
|
|
14231
|
-
imgScale: 1
|
|
14232
|
-
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
14233
|
-
}), isShown && isShown.index === index && React.createElement(MinCraftingRequirementsText, {
|
|
14234
|
-
levelIsOk: (_option$levelIsOk = option == null ? void 0 : option.levelIsOk) != null ? _option$levelIsOk : false
|
|
14235
|
-
}, modifyString(((_option$minCraftingRe = option == null ? void 0 : (_option$minCraftingRe2 = option.minCraftingRequirements) == null ? void 0 : _option$minCraftingRe2[0]) != null ? _option$minCraftingRe : '') + " " + ((_option$minCraftingRe3 = option == null ? void 0 : (_option$minCraftingRe4 = option.minCraftingRequirements) == null ? void 0 : _option$minCraftingRe4[1]) != null ? _option$minCraftingRe3 : '')))));
|
|
14236
|
-
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
14299
|
+
recipe: item,
|
|
14300
|
+
scale: scale,
|
|
14301
|
+
handleRecipeSelect: setCraftItemKey.bind(null, item.key),
|
|
14302
|
+
selectedCraftItemKey: craftItemKey,
|
|
14303
|
+
inventory: inventory,
|
|
14304
|
+
skills: skills
|
|
14305
|
+
});
|
|
14306
|
+
}))), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
14237
14307
|
buttonType: ButtonTypes.RPGUIButton,
|
|
14238
14308
|
onPointerDown: onClose
|
|
14239
14309
|
}, "Cancel"), React.createElement(Button, {
|
|
14310
|
+
disabled: !craftItemKey,
|
|
14240
14311
|
buttonType: ButtonTypes.RPGUIButton,
|
|
14241
14312
|
onPointerDown: function onPointerDown() {
|
|
14242
|
-
return onCraftItem(
|
|
14313
|
+
return onCraftItem(craftItemKey);
|
|
14243
14314
|
}
|
|
14244
|
-
}, "Craft")));
|
|
14315
|
+
}, "Craft"))));
|
|
14245
14316
|
};
|
|
14246
|
-
var
|
|
14247
|
-
displayName: "
|
|
14317
|
+
var Wrapper = /*#__PURE__*/styled.div.withConfig({
|
|
14318
|
+
displayName: "CraftBook__Wrapper",
|
|
14248
14319
|
componentId: "sc-19q95ue-0"
|
|
14249
|
-
})(["
|
|
14250
|
-
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
14251
|
-
displayName: "CraftBook__Recipes",
|
|
14252
|
-
componentId: "sc-19q95ue-1"
|
|
14253
|
-
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
14320
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;"]);
|
|
14254
14321
|
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
14255
14322
|
displayName: "CraftBook__Title",
|
|
14256
|
-
componentId: "sc-19q95ue-
|
|
14257
|
-
})(["font-size:0.6rem;color:
|
|
14323
|
+
componentId: "sc-19q95ue-1"
|
|
14324
|
+
})(["font-size:0.6rem;color:", " !important;"], uiColors.yellow);
|
|
14258
14325
|
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
14259
14326
|
displayName: "CraftBook__Subtitle",
|
|
14260
|
-
componentId: "sc-19q95ue-
|
|
14261
|
-
})(["font-size:0.4rem;color:
|
|
14327
|
+
componentId: "sc-19q95ue-2"
|
|
14328
|
+
})(["font-size:0.4rem;color:", " !important;"], uiColors.yellow);
|
|
14262
14329
|
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
14263
14330
|
displayName: "CraftBook__RadioInputScroller",
|
|
14331
|
+
componentId: "sc-19q95ue-3"
|
|
14332
|
+
})(["padding-left:15px;padding-top:10px;margin-top:1rem;align-items:center;align-items:flex-start;overflow-y:scroll;min-height:0;flex:1;margin-left:10px;-webkit-overflow-scrolling:touch;@media (max-width:", "){margin-left:0;}"], mobilePortrait.width);
|
|
14333
|
+
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
14334
|
+
displayName: "CraftBook__ButtonWrapper",
|
|
14264
14335
|
componentId: "sc-19q95ue-4"
|
|
14265
|
-
})(["
|
|
14266
|
-
var
|
|
14267
|
-
displayName: "
|
|
14336
|
+
})(["display:flex;justify-content:flex-end;margin-top:10px;width:100%;button{padding:0px 50px;margin:5px;}@media (max-width:", "){justify-content:center;}"], mobilePortrait.width);
|
|
14337
|
+
var ContentContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14338
|
+
displayName: "CraftBook__ContentContainer",
|
|
14268
14339
|
componentId: "sc-19q95ue-5"
|
|
14269
|
-
})(["
|
|
14270
|
-
var
|
|
14271
|
-
displayName: "
|
|
14340
|
+
})(["display:flex;width:100%;min-height:0;flex:1;@media (max-width:", "){flex-direction:column;}"], mobilePortrait.width);
|
|
14341
|
+
var ItemTypes = /*#__PURE__*/styled.div.withConfig({
|
|
14342
|
+
displayName: "CraftBook__ItemTypes",
|
|
14272
14343
|
componentId: "sc-19q95ue-6"
|
|
14273
|
-
})(["display:flex;
|
|
14274
|
-
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
14275
|
-
displayName: "CraftBook__ButtonWrapper",
|
|
14276
|
-
componentId: "sc-19q95ue-7"
|
|
14277
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;button{padding:0px 50px;}"]);
|
|
14278
|
-
var MinCraftingRequirementsText = /*#__PURE__*/styled.div.withConfig({
|
|
14279
|
-
displayName: "CraftBook__MinCraftingRequirementsText",
|
|
14280
|
-
componentId: "sc-19q95ue-8"
|
|
14281
|
-
})(["font-size:0.6rem;font-weight:bold;color:", ";"], function (_ref2) {
|
|
14282
|
-
var levelIsOk = _ref2.levelIsOk;
|
|
14283
|
-
return levelIsOk ? '#72f100' : 'gray';
|
|
14284
|
-
});
|
|
14344
|
+
})(["display:flex;overflow-y:scroll;overflow-x:hidden;width:max-content;flex-direction:column;padding-right:5px;@media (max-width:", "){overflow-x:scroll;overflow-y:hidden;padding-right:0;width:100%;}"], mobilePortrait.width);
|
|
14285
14345
|
|
|
14286
|
-
var
|
|
14287
|
-
var
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14346
|
+
var Dropdown = function Dropdown(_ref) {
|
|
14347
|
+
var options = _ref.options,
|
|
14348
|
+
width = _ref.width,
|
|
14349
|
+
onChange = _ref.onChange;
|
|
14350
|
+
var dropdownId = v4();
|
|
14351
|
+
var _useState = useState(''),
|
|
14352
|
+
selectedValue = _useState[0],
|
|
14353
|
+
setSelectedValue = _useState[1];
|
|
14354
|
+
var _useState2 = useState(''),
|
|
14355
|
+
selectedOption = _useState2[0],
|
|
14356
|
+
setSelectedOption = _useState2[1];
|
|
14357
|
+
var _useState3 = useState(false),
|
|
14358
|
+
opened = _useState3[0],
|
|
14359
|
+
setOpened = _useState3[1];
|
|
14360
|
+
useEffect(function () {
|
|
14361
|
+
var firstOption = options[0];
|
|
14362
|
+
if (firstOption) {
|
|
14363
|
+
var change = !selectedValue;
|
|
14364
|
+
if (!change) {
|
|
14365
|
+
change = options.filter(function (o) {
|
|
14366
|
+
return o.value === selectedValue;
|
|
14367
|
+
}).length < 1;
|
|
14368
|
+
}
|
|
14369
|
+
/**
|
|
14370
|
+
* make a selection if there is no selected value already present
|
|
14371
|
+
* or if there is a selected value but its not in new options
|
|
14372
|
+
*/
|
|
14373
|
+
if (change) {
|
|
14374
|
+
setSelectedValue(firstOption.value);
|
|
14375
|
+
setSelectedOption(firstOption.option);
|
|
14376
|
+
}
|
|
14377
|
+
}
|
|
14378
|
+
}, [options]);
|
|
14379
|
+
useEffect(function () {
|
|
14380
|
+
if (selectedValue) {
|
|
14381
|
+
onChange(selectedValue);
|
|
14382
|
+
}
|
|
14383
|
+
}, [selectedValue]);
|
|
14384
|
+
return React.createElement(Container$d, {
|
|
14385
|
+
onMouseLeave: function onMouseLeave() {
|
|
14386
|
+
return setOpened(false);
|
|
14387
|
+
},
|
|
14388
|
+
width: width
|
|
14389
|
+
}, React.createElement(DropdownSelect, {
|
|
14390
|
+
id: "dropdown-" + dropdownId,
|
|
14391
|
+
className: "rpgui-dropdown-imp rpgui-dropdown-imp-header",
|
|
14392
|
+
onPointerDown: function onPointerDown() {
|
|
14393
|
+
return setOpened(function (prev) {
|
|
14394
|
+
return !prev;
|
|
14395
|
+
});
|
|
14396
|
+
}
|
|
14397
|
+
}, React.createElement("label", null, "\u25BC"), " ", selectedOption), React.createElement(DropdownOptions, {
|
|
14398
|
+
className: "rpgui-dropdown-imp",
|
|
14399
|
+
opened: opened
|
|
14400
|
+
}, options.map(function (option) {
|
|
14401
|
+
return React.createElement("li", {
|
|
14402
|
+
key: option.id,
|
|
14403
|
+
onPointerDown: function onPointerDown() {
|
|
14404
|
+
setSelectedValue(option.value);
|
|
14405
|
+
setSelectedOption(option.option);
|
|
14406
|
+
setOpened(false);
|
|
14407
|
+
}
|
|
14408
|
+
}, option.option);
|
|
14409
|
+
})));
|
|
14410
|
+
};
|
|
14411
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
14412
|
+
displayName: "Dropdown__Container",
|
|
14413
|
+
componentId: "sc-8arn65-0"
|
|
14414
|
+
})(["position:relative;width:", ";"], function (props) {
|
|
14415
|
+
return props.width || '100%';
|
|
14416
|
+
});
|
|
14417
|
+
var DropdownSelect = /*#__PURE__*/styled.p.withConfig({
|
|
14418
|
+
displayName: "Dropdown__DropdownSelect",
|
|
14419
|
+
componentId: "sc-8arn65-1"
|
|
14420
|
+
})(["width:100%;box-sizing:border-box;"]);
|
|
14421
|
+
var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
14422
|
+
displayName: "Dropdown__DropdownOptions",
|
|
14423
|
+
componentId: "sc-8arn65-2"
|
|
14424
|
+
})(["position:absolute;width:100%;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
14425
|
+
return props.opened ? 'block' : 'none';
|
|
14426
|
+
});
|
|
14427
|
+
|
|
14428
|
+
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
14429
|
+
var title = _ref.title,
|
|
14430
|
+
onChange = _ref.onChange,
|
|
14431
|
+
options = _ref.options,
|
|
14432
|
+
details = _ref.details;
|
|
14433
|
+
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
14434
|
+
options: options.map(function (option, index) {
|
|
14435
|
+
return {
|
|
14436
|
+
option: option.name,
|
|
14437
|
+
value: option.id,
|
|
14438
|
+
id: index
|
|
14439
|
+
};
|
|
14440
|
+
}),
|
|
14441
|
+
onChange: onChange
|
|
14442
|
+
}), React.createElement(Details, null, details));
|
|
14443
|
+
};
|
|
14302
14444
|
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
14303
14445
|
displayName: "DropdownSelectorContainer__Details",
|
|
14304
14446
|
componentId: "sc-kaa0h9-0"
|
|
@@ -14405,1184 +14547,644 @@ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
|
14405
14547
|
componentId: "sc-1wuddg2-1"
|
|
14406
14548
|
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
14407
14549
|
|
|
14408
|
-
var
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
// on every interval, show one more character
|
|
14425
|
-
if (i === 0) {
|
|
14426
|
-
if (onStart) {
|
|
14427
|
-
onStart();
|
|
14428
|
-
}
|
|
14550
|
+
var SlotsContainer = function SlotsContainer(_ref) {
|
|
14551
|
+
var children = _ref.children,
|
|
14552
|
+
title = _ref.title,
|
|
14553
|
+
onClose = _ref.onClose,
|
|
14554
|
+
_onPositionChange = _ref.onPositionChange,
|
|
14555
|
+
_onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
14556
|
+
_onPositionChangeStart = _ref.onPositionChangeStart,
|
|
14557
|
+
onOutsideClick = _ref.onOutsideClick,
|
|
14558
|
+
initialPosition = _ref.initialPosition,
|
|
14559
|
+
scale = _ref.scale;
|
|
14560
|
+
return React.createElement(DraggableContainer, {
|
|
14561
|
+
title: title,
|
|
14562
|
+
type: RPGUIContainerTypes.Framed,
|
|
14563
|
+
onCloseButton: function onCloseButton() {
|
|
14564
|
+
if (onClose) {
|
|
14565
|
+
onClose();
|
|
14429
14566
|
}
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14567
|
+
},
|
|
14568
|
+
width: "400px",
|
|
14569
|
+
cancelDrag: ".item-container-body, #shortcuts_list",
|
|
14570
|
+
onPositionChange: function onPositionChange(_ref2) {
|
|
14571
|
+
var x = _ref2.x,
|
|
14572
|
+
y = _ref2.y;
|
|
14573
|
+
if (_onPositionChange) {
|
|
14574
|
+
_onPositionChange({
|
|
14575
|
+
x: x,
|
|
14576
|
+
y: y
|
|
14577
|
+
});
|
|
14438
14578
|
}
|
|
14439
|
-
},
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14579
|
+
},
|
|
14580
|
+
onPositionChangeEnd: function onPositionChangeEnd(_ref3) {
|
|
14581
|
+
var x = _ref3.x,
|
|
14582
|
+
y = _ref3.y;
|
|
14583
|
+
if (_onPositionChangeEnd) {
|
|
14584
|
+
_onPositionChangeEnd({
|
|
14585
|
+
x: x,
|
|
14586
|
+
y: y
|
|
14587
|
+
});
|
|
14588
|
+
}
|
|
14589
|
+
},
|
|
14590
|
+
onPositionChangeStart: function onPositionChangeStart(_ref4) {
|
|
14591
|
+
var x = _ref4.x,
|
|
14592
|
+
y = _ref4.y;
|
|
14593
|
+
if (_onPositionChangeStart) {
|
|
14594
|
+
_onPositionChangeStart({
|
|
14595
|
+
x: x,
|
|
14596
|
+
y: y
|
|
14597
|
+
});
|
|
14598
|
+
}
|
|
14599
|
+
},
|
|
14600
|
+
onOutsideClick: onOutsideClick,
|
|
14601
|
+
initialPosition: initialPosition,
|
|
14602
|
+
scale: scale
|
|
14603
|
+
}, children);
|
|
14445
14604
|
};
|
|
14446
|
-
var TextContainer = /*#__PURE__*/styled.p.withConfig({
|
|
14447
|
-
displayName: "DynamicText__TextContainer",
|
|
14448
|
-
componentId: "sc-1ggl9nd-0"
|
|
14449
|
-
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
14450
|
-
|
|
14451
|
-
var img$5 = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAIzhI+py90Bg4OjDrjCELxfFQhQx0mIJkaeaYRp5LJADMdnqXbyOJLYTdKBejjZoRaZJBMFACH/C0ltYWdlTWFnaWNrDWdhbW1hPTAuNDU0NTUAIfkEARQAAAAsAAAAABAAEAAAAjKEj6nL7Y+CDE6OO+QKQ/ifKYEgfR4VddPohQe7lmR0xidNTib65uacYP2AQWGuMlEUAAA7';
|
|
14452
|
-
|
|
14453
|
-
var img$6 = 'data:image/gif;base64,R0lGODlhQAAgAPIAAAAAAA0NDRERESIiIigoKFlZWf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD/wi63P4wykmrvTjrzbv/YAgIZGmeaKquakQWcCzPdG3fNukIeO//PQGDBywafcIF8chswpKKZcxApTqvNOiIZi0YsODncFaFlcNOrdTbJVff0/c3Lp/Xs2N37cy2ndt6ZnhKXHdsc4d7VnwyfIxqPWWOXXWLgHSGYoSNbZKVZp2WiJyjg1GFcaClqaqJhasyUAFrh3Cur3KqubWXBQIBAAEDtDeMaEEDAcLEx2gCycvN0jHPysPT09XR2M3a19zH3gTM4EYCBNDD4yzs7e4r48nB6gT19vf4+fr7/P3P8sKGvRtIkMUAeQoCHlzIsKHDhxAjSoTWQJnFixgzatzIsQWjRQYJAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD8Ai63P4wykmrvTjrzbv/YCiOlGCeaKqubMtGZiHPdG3feI6bjqD/wOBPwPAJj0ggcWFMOp+ypaI5M1it0KxNCqDKsAWDdhwt1q5fMPnJ9aJt17g4HafJ3/et+Tzn99V+aThqfTNtcHlhhIBVWG+BdDSHOmiPeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
14454
14605
|
|
|
14455
|
-
var
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
var
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
// Calculate the maximum number of characters that can fit in the div
|
|
14470
|
-
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
14471
|
-
// Return the maximum number of characters
|
|
14472
|
-
return Math.round(maxCharacters / 5);
|
|
14473
|
-
}
|
|
14474
|
-
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
14606
|
+
var RangeSliderType;
|
|
14607
|
+
(function (RangeSliderType) {
|
|
14608
|
+
RangeSliderType["Slider"] = "rpgui-slider";
|
|
14609
|
+
RangeSliderType["GoldSlider"] = "rpgui-slider golden";
|
|
14610
|
+
})(RangeSliderType || (RangeSliderType = {}));
|
|
14611
|
+
var RangeSlider = function RangeSlider(_ref) {
|
|
14612
|
+
var type = _ref.type,
|
|
14613
|
+
valueMin = _ref.valueMin,
|
|
14614
|
+
valueMax = _ref.valueMax,
|
|
14615
|
+
width = _ref.width,
|
|
14616
|
+
_onChange = _ref.onChange,
|
|
14617
|
+
value = _ref.value;
|
|
14618
|
+
var sliderId = v4();
|
|
14619
|
+
var containerRef = useRef(null);
|
|
14475
14620
|
var _useState = useState(0),
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
14479
|
-
if (event.code === 'Space') {
|
|
14480
|
-
goToNextStep();
|
|
14481
|
-
}
|
|
14482
|
-
};
|
|
14483
|
-
var goToNextStep = function goToNextStep() {
|
|
14484
|
-
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
14485
|
-
if (hasNextChunk) {
|
|
14486
|
-
setChunkIndex(function (prev) {
|
|
14487
|
-
return prev + 1;
|
|
14488
|
-
});
|
|
14489
|
-
} else {
|
|
14490
|
-
// if there's no more text chunks, close the dialog
|
|
14491
|
-
onClose();
|
|
14492
|
-
}
|
|
14493
|
-
};
|
|
14621
|
+
left = _useState[0],
|
|
14622
|
+
setLeft = _useState[1];
|
|
14494
14623
|
useEffect(function () {
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
onStartStep && onStartStep();
|
|
14624
|
+
var _containerRef$current;
|
|
14625
|
+
var calculatedWidth = ((_containerRef$current = containerRef.current) == null ? void 0 : _containerRef$current.clientWidth) || 0;
|
|
14626
|
+
setLeft(Math.max((value - valueMin) / (valueMax - valueMin) * (calculatedWidth - 35) + 10));
|
|
14627
|
+
}, [value, valueMin, valueMax]);
|
|
14628
|
+
var typeClass = type === RangeSliderType.GoldSlider ? 'golden' : '';
|
|
14629
|
+
return React.createElement("div", {
|
|
14630
|
+
style: {
|
|
14631
|
+
width: width,
|
|
14632
|
+
position: 'relative'
|
|
14633
|
+
},
|
|
14634
|
+
className: "rpgui-slider-container " + typeClass,
|
|
14635
|
+
id: "rpgui-slider-" + sliderId,
|
|
14636
|
+
ref: containerRef
|
|
14637
|
+
}, React.createElement("div", {
|
|
14638
|
+
style: {
|
|
14639
|
+
pointerEvents: 'none'
|
|
14512
14640
|
}
|
|
14513
|
-
}
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14641
|
+
}, React.createElement("div", {
|
|
14642
|
+
className: "rpgui-slider-track " + typeClass
|
|
14643
|
+
}), React.createElement("div", {
|
|
14644
|
+
className: "rpgui-slider-left-edge " + typeClass
|
|
14645
|
+
}), React.createElement("div", {
|
|
14646
|
+
className: "rpgui-slider-right-edge " + typeClass
|
|
14647
|
+
}), React.createElement("div", {
|
|
14648
|
+
className: "rpgui-slider-thumb " + typeClass,
|
|
14649
|
+
style: {
|
|
14650
|
+
left: left
|
|
14518
14651
|
}
|
|
14652
|
+
})), React.createElement(Input$1, {
|
|
14653
|
+
type: "range",
|
|
14654
|
+
style: {
|
|
14655
|
+
width: width
|
|
14656
|
+
},
|
|
14657
|
+
min: valueMin,
|
|
14658
|
+
max: valueMax,
|
|
14659
|
+
onChange: function onChange(e) {
|
|
14660
|
+
return _onChange(Number(e.target.value));
|
|
14661
|
+
},
|
|
14662
|
+
value: value,
|
|
14663
|
+
className: "rpgui-cursor-point"
|
|
14519
14664
|
}));
|
|
14520
14665
|
};
|
|
14521
|
-
var
|
|
14522
|
-
displayName: "
|
|
14523
|
-
componentId: "sc-
|
|
14524
|
-
})([""]);
|
|
14525
|
-
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
14526
|
-
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
14527
|
-
componentId: "sc-1cxkdh9-1"
|
|
14528
|
-
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
14529
|
-
var right = _ref2.right;
|
|
14530
|
-
return right;
|
|
14531
|
-
});
|
|
14532
|
-
|
|
14533
|
-
//@ts-ignore
|
|
14534
|
-
var useEventListener = function useEventListener(type, handler, el) {
|
|
14535
|
-
if (el === void 0) {
|
|
14536
|
-
el = window;
|
|
14537
|
-
}
|
|
14538
|
-
var savedHandler = React.useRef();
|
|
14539
|
-
React.useEffect(function () {
|
|
14540
|
-
savedHandler.current = handler;
|
|
14541
|
-
}, [handler]);
|
|
14542
|
-
React.useEffect(function () {
|
|
14543
|
-
//@ts-ignore
|
|
14544
|
-
var listener = function listener(e) {
|
|
14545
|
-
return savedHandler.current(e);
|
|
14546
|
-
};
|
|
14547
|
-
el.addEventListener(type, listener);
|
|
14548
|
-
return function () {
|
|
14549
|
-
el.removeEventListener(type, listener);
|
|
14550
|
-
};
|
|
14551
|
-
}, [type, el]);
|
|
14552
|
-
};
|
|
14666
|
+
var Input$1 = /*#__PURE__*/styled.input.withConfig({
|
|
14667
|
+
displayName: "RangeSlider__Input",
|
|
14668
|
+
componentId: "sc-v8mte9-0"
|
|
14669
|
+
})(["opacity:0;position:absolute;width:100%;height:100%;top:0;left:0;margin-top:-5px;"]);
|
|
14553
14670
|
|
|
14554
|
-
var
|
|
14555
|
-
var
|
|
14556
|
-
|
|
14671
|
+
var ItemQuantitySelector = function ItemQuantitySelector(_ref) {
|
|
14672
|
+
var quantity = _ref.quantity,
|
|
14673
|
+
onConfirm = _ref.onConfirm,
|
|
14557
14674
|
onClose = _ref.onClose;
|
|
14558
|
-
var _useState = useState(
|
|
14559
|
-
|
|
14560
|
-
|
|
14561
|
-
var
|
|
14562
|
-
canShowAnswers = _useState2[0],
|
|
14563
|
-
setCanShowAnswers = _useState2[1];
|
|
14564
|
-
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
14565
|
-
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
14566
|
-
return null;
|
|
14567
|
-
}
|
|
14568
|
-
var firstAnswerId = currentQuestion.answerIds[0];
|
|
14569
|
-
return answers.find(function (answer) {
|
|
14570
|
-
return answer.id === firstAnswerId;
|
|
14571
|
-
});
|
|
14572
|
-
};
|
|
14573
|
-
var _useState3 = useState(onGetFirstAnswer()),
|
|
14574
|
-
currentAnswer = _useState3[0],
|
|
14575
|
-
setCurrentAnswer = _useState3[1];
|
|
14675
|
+
var _useState = useState(quantity),
|
|
14676
|
+
value = _useState[0],
|
|
14677
|
+
setValue = _useState[1];
|
|
14678
|
+
var inputRef = useRef(null);
|
|
14576
14679
|
useEffect(function () {
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
return answer.id === answerId;
|
|
14583
|
-
});
|
|
14584
|
-
});
|
|
14585
|
-
};
|
|
14586
|
-
var onKeyPress = function onKeyPress(e) {
|
|
14587
|
-
switch (e.key) {
|
|
14588
|
-
case 'ArrowDown':
|
|
14589
|
-
// select next answer, if any.
|
|
14590
|
-
// if no next answer, select first answer
|
|
14591
|
-
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
14592
|
-
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
14593
|
-
// );
|
|
14594
|
-
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
14595
|
-
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
14596
|
-
});
|
|
14597
|
-
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
14598
|
-
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
14599
|
-
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
14600
|
-
});
|
|
14601
|
-
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
14602
|
-
break;
|
|
14603
|
-
case 'ArrowUp':
|
|
14604
|
-
// select previous answer, if any.
|
|
14605
|
-
// if no previous answer, select last answer
|
|
14606
|
-
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
14607
|
-
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
14608
|
-
});
|
|
14609
|
-
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
14610
|
-
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
14611
|
-
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
14612
|
-
});
|
|
14613
|
-
if (previousAnswer) {
|
|
14614
|
-
setCurrentAnswer(previousAnswer);
|
|
14615
|
-
} else {
|
|
14616
|
-
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
14617
|
-
}
|
|
14618
|
-
break;
|
|
14619
|
-
case 'Enter':
|
|
14620
|
-
setCanShowAnswers(false);
|
|
14621
|
-
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
14680
|
+
if (inputRef.current) {
|
|
14681
|
+
inputRef.current.focus();
|
|
14682
|
+
inputRef.current.select();
|
|
14683
|
+
var closeSelector = function closeSelector(e) {
|
|
14684
|
+
if (e.key === 'Escape') {
|
|
14622
14685
|
onClose();
|
|
14623
|
-
return;
|
|
14624
|
-
} else {
|
|
14625
|
-
setCurrentQuestion(questions.find(function (question) {
|
|
14626
|
-
return question.id === currentAnswer.nextQuestionId;
|
|
14627
|
-
}));
|
|
14628
14686
|
}
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
setCanShowAnswers(false);
|
|
14635
|
-
if (answer.nextQuestionId) {
|
|
14636
|
-
// if there is a next question, go to it
|
|
14637
|
-
setCurrentQuestion(questions.find(function (question) {
|
|
14638
|
-
return question.id === answer.nextQuestionId;
|
|
14639
|
-
}));
|
|
14640
|
-
} else {
|
|
14641
|
-
// else, finish dialog!
|
|
14642
|
-
onClose();
|
|
14643
|
-
}
|
|
14644
|
-
};
|
|
14645
|
-
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
14646
|
-
var answerIds = currentQuestion.answerIds;
|
|
14647
|
-
if (!answerIds) {
|
|
14648
|
-
return null;
|
|
14649
|
-
}
|
|
14650
|
-
var answers = onGetAnswers(answerIds);
|
|
14651
|
-
if (!answers) {
|
|
14652
|
-
return null;
|
|
14687
|
+
};
|
|
14688
|
+
document.addEventListener('keydown', closeSelector);
|
|
14689
|
+
return function () {
|
|
14690
|
+
document.removeEventListener('keydown', closeSelector);
|
|
14691
|
+
};
|
|
14653
14692
|
}
|
|
14654
|
-
return
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14693
|
+
return function () {};
|
|
14694
|
+
}, []);
|
|
14695
|
+
return React.createElement(StyledContainer, {
|
|
14696
|
+
type: RPGUIContainerTypes.Framed,
|
|
14697
|
+
width: "25rem"
|
|
14698
|
+
}, React.createElement(CloseButton$2, {
|
|
14699
|
+
className: "container-close",
|
|
14700
|
+
onPointerDown: onClose
|
|
14701
|
+
}, "X"), React.createElement("h2", null, "Select quantity to move"), React.createElement(StyledForm, {
|
|
14702
|
+
style: {
|
|
14703
|
+
width: '100%'
|
|
14704
|
+
},
|
|
14705
|
+
onSubmit: function onSubmit(e) {
|
|
14706
|
+
e.preventDefault();
|
|
14707
|
+
var numberValue = Number(value);
|
|
14708
|
+
if (Number.isNaN(numberValue)) {
|
|
14709
|
+
return;
|
|
14669
14710
|
}
|
|
14670
|
-
|
|
14671
|
-
});
|
|
14672
|
-
};
|
|
14673
|
-
return React.createElement(Container$f, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
14674
|
-
text: currentQuestion.text,
|
|
14675
|
-
onStart: function onStart() {
|
|
14676
|
-
return setCanShowAnswers(false);
|
|
14711
|
+
onConfirm(Math.max(1, Math.min(quantity, numberValue)));
|
|
14677
14712
|
},
|
|
14678
|
-
|
|
14679
|
-
|
|
14713
|
+
noValidate: true
|
|
14714
|
+
}, React.createElement(StyledInput, {
|
|
14715
|
+
innerRef: inputRef,
|
|
14716
|
+
placeholder: "Enter quantity",
|
|
14717
|
+
type: "number",
|
|
14718
|
+
min: 1,
|
|
14719
|
+
max: quantity,
|
|
14720
|
+
value: value,
|
|
14721
|
+
onChange: function onChange(e) {
|
|
14722
|
+
if (Number(e.target.value) >= quantity) {
|
|
14723
|
+
setValue(quantity);
|
|
14724
|
+
return;
|
|
14725
|
+
}
|
|
14726
|
+
setValue(e.target.value);
|
|
14727
|
+
},
|
|
14728
|
+
onBlur: function onBlur(e) {
|
|
14729
|
+
var newValue = Math.max(1, Math.min(quantity, Number(e.target.value)));
|
|
14730
|
+
setValue(newValue);
|
|
14680
14731
|
}
|
|
14681
|
-
})
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
});
|
|
14701
|
-
var
|
|
14702
|
-
displayName: "
|
|
14703
|
-
componentId: "sc-
|
|
14704
|
-
})(["
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
componentId: "sc-bxc5u0-5"
|
|
14710
|
-
})(["display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:0.5rem;height:22px;p{line-height:unset;margin-top:0;margin-bottom:0rem;}"]);
|
|
14711
|
-
|
|
14712
|
-
var img$7 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
|
|
14732
|
+
}), React.createElement(RangeSlider, {
|
|
14733
|
+
type: RangeSliderType.Slider,
|
|
14734
|
+
valueMin: 1,
|
|
14735
|
+
valueMax: quantity,
|
|
14736
|
+
width: "100%",
|
|
14737
|
+
onChange: setValue,
|
|
14738
|
+
value: value
|
|
14739
|
+
}), React.createElement(Button, {
|
|
14740
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
14741
|
+
type: "submit"
|
|
14742
|
+
}, "Confirm")));
|
|
14743
|
+
};
|
|
14744
|
+
var StyledContainer = /*#__PURE__*/styled(RPGUIContainer).withConfig({
|
|
14745
|
+
displayName: "ItemQuantitySelector__StyledContainer",
|
|
14746
|
+
componentId: "sc-yfdtpn-0"
|
|
14747
|
+
})(["display:flex;flex-direction:column;align-items:center;"]);
|
|
14748
|
+
var StyledForm = /*#__PURE__*/styled.form.withConfig({
|
|
14749
|
+
displayName: "ItemQuantitySelector__StyledForm",
|
|
14750
|
+
componentId: "sc-yfdtpn-1"
|
|
14751
|
+
})(["display:flex;flex-direction:column;align-items:center;width:100%;"]);
|
|
14752
|
+
var StyledInput = /*#__PURE__*/styled(Input).withConfig({
|
|
14753
|
+
displayName: "ItemQuantitySelector__StyledInput",
|
|
14754
|
+
componentId: "sc-yfdtpn-2"
|
|
14755
|
+
})(["text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}"]);
|
|
14756
|
+
var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
14757
|
+
displayName: "ItemQuantitySelector__CloseButton",
|
|
14758
|
+
componentId: "sc-yfdtpn-3"
|
|
14759
|
+
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
|
|
14713
14760
|
|
|
14714
|
-
var
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
src: imagePath || img$7
|
|
14744
|
-
}))) : React.createElement(React.Fragment, null, React.createElement(Container$g, null, React.createElement(TextContainer$1, {
|
|
14745
|
-
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
14746
|
-
}, React.createElement(NPCDialogText, {
|
|
14747
|
-
type: type,
|
|
14748
|
-
text: text || 'No text provided.',
|
|
14749
|
-
onClose: function onClose() {
|
|
14750
|
-
if (_onClose) {
|
|
14751
|
-
_onClose();
|
|
14752
|
-
}
|
|
14761
|
+
var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
14762
|
+
var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
|
|
14763
|
+
settingShortcutIndex = _ref.settingShortcutIndex,
|
|
14764
|
+
shortcuts = _ref.shortcuts,
|
|
14765
|
+
removeShortcut = _ref.removeShortcut,
|
|
14766
|
+
atlasJSON = _ref.atlasJSON,
|
|
14767
|
+
atlasIMG = _ref.atlasIMG;
|
|
14768
|
+
var getContent = function getContent(index) {
|
|
14769
|
+
var _shortcuts$index, _shortcuts$index3;
|
|
14770
|
+
if (((_shortcuts$index = shortcuts[index]) == null ? void 0 : _shortcuts$index.type) === ShortcutType.Item) {
|
|
14771
|
+
var _shortcuts$index2;
|
|
14772
|
+
var _payload = (_shortcuts$index2 = shortcuts[index]) == null ? void 0 : _shortcuts$index2.payload;
|
|
14773
|
+
if (!_payload) return null;
|
|
14774
|
+
return React.createElement(SpriteFromAtlas, {
|
|
14775
|
+
atlasIMG: atlasIMG,
|
|
14776
|
+
atlasJSON: atlasJSON,
|
|
14777
|
+
spriteKey: getItemTextureKeyPath({
|
|
14778
|
+
key: _payload.texturePath,
|
|
14779
|
+
texturePath: _payload.texturePath,
|
|
14780
|
+
stackQty: _payload.stackQty || 1,
|
|
14781
|
+
isStackable: _payload.isStackable
|
|
14782
|
+
}, atlasJSON),
|
|
14783
|
+
width: 32,
|
|
14784
|
+
height: 32,
|
|
14785
|
+
imgScale: 1.6,
|
|
14786
|
+
imgStyle: {
|
|
14787
|
+
left: '5px'
|
|
14788
|
+
}
|
|
14789
|
+
});
|
|
14753
14790
|
}
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14791
|
+
var payload = (_shortcuts$index3 = shortcuts[index]) == null ? void 0 : _shortcuts$index3.payload;
|
|
14792
|
+
return React.createElement("span", null, payload == null ? void 0 : payload.magicWords.split(' ').map(function (word) {
|
|
14793
|
+
return word[0];
|
|
14794
|
+
}));
|
|
14795
|
+
};
|
|
14796
|
+
return React.createElement(Container$e, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
14797
|
+
id: "shortcuts_list"
|
|
14798
|
+
}, Array.from({
|
|
14799
|
+
length: 6
|
|
14800
|
+
}).map(function (_, i) {
|
|
14801
|
+
return React.createElement(Shortcut, {
|
|
14802
|
+
key: i,
|
|
14803
|
+
onPointerDown: function onPointerDown() {
|
|
14804
|
+
if (settingShortcutIndex !== -1) setSettingShortcutIndex(-1);
|
|
14805
|
+
removeShortcut(i);
|
|
14806
|
+
if (settingShortcutIndex === -1 && (!shortcuts[i] || shortcuts[i].type === ShortcutType.None)) setSettingShortcutIndex(i);
|
|
14807
|
+
},
|
|
14808
|
+
disabled: settingShortcutIndex !== -1 && settingShortcutIndex !== i,
|
|
14809
|
+
isBeingSet: settingShortcutIndex === i,
|
|
14810
|
+
id: "shortcutSetter_" + i
|
|
14811
|
+
}, getContent(i));
|
|
14812
|
+
})));
|
|
14757
14813
|
};
|
|
14758
|
-
var Container$
|
|
14759
|
-
displayName: "
|
|
14760
|
-
componentId: "sc-
|
|
14761
|
-
})(["
|
|
14762
|
-
var
|
|
14763
|
-
displayName: "
|
|
14764
|
-
componentId: "sc-
|
|
14765
|
-
})(["
|
|
14766
|
-
var
|
|
14767
|
-
return
|
|
14768
|
-
});
|
|
14769
|
-
var
|
|
14770
|
-
displayName: "
|
|
14771
|
-
componentId: "sc-
|
|
14772
|
-
})(["flex:
|
|
14773
|
-
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
14774
|
-
displayName: "NPCDialog__NPCThumbnail",
|
|
14775
|
-
componentId: "sc-1b4aw74-3"
|
|
14776
|
-
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
14814
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
14815
|
+
displayName: "ShortcutsSetter__Container",
|
|
14816
|
+
componentId: "sc-xuouuf-0"
|
|
14817
|
+
})(["p{margin:0;margin-left:0.5rem;}"]);
|
|
14818
|
+
var Shortcut = /*#__PURE__*/styled.button.withConfig({
|
|
14819
|
+
displayName: "ShortcutsSetter__Shortcut",
|
|
14820
|
+
componentId: "sc-xuouuf-1"
|
|
14821
|
+
})(["width:2.6rem;height:2.6rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;span{margin-top:4px;}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, function (_ref2) {
|
|
14822
|
+
var isBeingSet = _ref2.isBeingSet;
|
|
14823
|
+
return isBeingSet ? uiColors.yellow : uiColors.darkGray;
|
|
14824
|
+
}, uiColors.darkGray, uiColors.gray);
|
|
14825
|
+
var List = /*#__PURE__*/styled.div.withConfig({
|
|
14826
|
+
displayName: "ShortcutsSetter__List",
|
|
14827
|
+
componentId: "sc-xuouuf-2"
|
|
14828
|
+
})(["width:100%;display:flex;align-items:center;gap:0.5rem;padding-bottom:0.5rem;padding-left:0.5rem;box-sizing:border-box;margin:0 !important;"]);
|
|
14777
14829
|
|
|
14778
|
-
var
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14830
|
+
var ItemContainer$1 = function ItemContainer(_ref) {
|
|
14831
|
+
var itemContainer = _ref.itemContainer,
|
|
14832
|
+
onClose = _ref.onClose,
|
|
14833
|
+
_onMouseOver = _ref.onMouseOver,
|
|
14834
|
+
_onSelected = _ref.onSelected,
|
|
14835
|
+
onItemClick = _ref.onItemClick,
|
|
14836
|
+
type = _ref.type,
|
|
14837
|
+
atlasJSON = _ref.atlasJSON,
|
|
14838
|
+
atlasIMG = _ref.atlasIMG,
|
|
14839
|
+
_ref$disableContextMe = _ref.disableContextMenu,
|
|
14840
|
+
disableContextMenu = _ref$disableContextMe === void 0 ? false : _ref$disableContextMe,
|
|
14841
|
+
onItemDragEnd = _ref.onItemDragEnd,
|
|
14842
|
+
onItemDragStart = _ref.onItemDragStart,
|
|
14843
|
+
onItemPlaceDrop = _ref.onItemPlaceDrop,
|
|
14844
|
+
_onOutsideDrop = _ref.onOutsideDrop,
|
|
14845
|
+
checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
|
|
14846
|
+
initialPosition = _ref.initialPosition,
|
|
14847
|
+
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
14848
|
+
scale = _ref.scale,
|
|
14849
|
+
shortcuts = _ref.shortcuts,
|
|
14850
|
+
setItemShortcut = _ref.setItemShortcut,
|
|
14851
|
+
removeShortcut = _ref.removeShortcut,
|
|
14852
|
+
equipmentSet = _ref.equipmentSet,
|
|
14853
|
+
isDepotSystem = _ref.isDepotSystem,
|
|
14854
|
+
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
14855
|
+
onPositionChangeStart = _ref.onPositionChangeStart;
|
|
14856
|
+
var _useState = useState({
|
|
14857
|
+
isOpen: false,
|
|
14858
|
+
maxQuantity: 1,
|
|
14859
|
+
callback: function callback(_quantity) {}
|
|
14860
|
+
}),
|
|
14861
|
+
quantitySelect = _useState[0],
|
|
14862
|
+
setQuantitySelect = _useState[1];
|
|
14863
|
+
var _useState2 = useState(-1),
|
|
14864
|
+
settingShortcutIndex = _useState2[0],
|
|
14865
|
+
setSettingShortcutIndex = _useState2[1];
|
|
14866
|
+
var handleSetShortcut = function handleSetShortcut(item, index) {
|
|
14867
|
+
if (item.type === ItemType.Consumable || item.type === ItemType.Tool) {
|
|
14868
|
+
setItemShortcut == null ? void 0 : setItemShortcut(item.key, index);
|
|
14803
14869
|
}
|
|
14804
14870
|
};
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
|
|
14814
|
-
|
|
14815
|
-
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14871
|
+
var onRenderSlots = function onRenderSlots() {
|
|
14872
|
+
var slots = [];
|
|
14873
|
+
for (var i = 0; i < itemContainer.slotQty; i++) {
|
|
14874
|
+
var _itemContainer$slots;
|
|
14875
|
+
slots.push(React.createElement(ItemSlot, {
|
|
14876
|
+
isContextMenuDisabled: disableContextMenu,
|
|
14877
|
+
key: i,
|
|
14878
|
+
slotIndex: i,
|
|
14879
|
+
item: ((_itemContainer$slots = itemContainer.slots) == null ? void 0 : _itemContainer$slots[i]) || null,
|
|
14880
|
+
itemContainerType: type,
|
|
14881
|
+
onMouseOver: function onMouseOver(event, slotIndex, item) {
|
|
14882
|
+
if (_onMouseOver) _onMouseOver(event, slotIndex, item);
|
|
14883
|
+
},
|
|
14884
|
+
onPointerDown: function onPointerDown(itemType, containerType, item) {
|
|
14885
|
+
if (settingShortcutIndex !== -1) {
|
|
14886
|
+
setSettingShortcutIndex(-1);
|
|
14887
|
+
handleSetShortcut(item, settingShortcutIndex);
|
|
14888
|
+
} else if (onItemClick) onItemClick(item, itemType, containerType);
|
|
14889
|
+
},
|
|
14890
|
+
onSelected: function onSelected(optionId, item) {
|
|
14891
|
+
if (_onSelected) _onSelected(optionId, item);
|
|
14892
|
+
},
|
|
14893
|
+
onDragStart: function onDragStart(item, slotIndex, itemContainerType) {
|
|
14894
|
+
if (onItemDragStart) onItemDragStart(item, slotIndex, itemContainerType);
|
|
14895
|
+
},
|
|
14896
|
+
onDragEnd: function onDragEnd(quantity) {
|
|
14897
|
+
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
14898
|
+
},
|
|
14899
|
+
dragScale: scale,
|
|
14900
|
+
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
14901
|
+
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
14902
|
+
openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {
|
|
14903
|
+
setQuantitySelect({
|
|
14904
|
+
isOpen: true,
|
|
14905
|
+
maxQuantity: maxQuantity,
|
|
14906
|
+
callback: callback
|
|
14907
|
+
});
|
|
14908
|
+
},
|
|
14909
|
+
onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
|
|
14910
|
+
if (onItemPlaceDrop) onItemPlaceDrop(item, slotIndex, itemContainerType);
|
|
14911
|
+
},
|
|
14912
|
+
onOutsideDrop: function onOutsideDrop(item, position) {
|
|
14913
|
+
if (_onOutsideDrop) _onOutsideDrop(item, position);
|
|
14914
|
+
},
|
|
14915
|
+
atlasIMG: atlasIMG,
|
|
14916
|
+
atlasJSON: atlasJSON,
|
|
14917
|
+
isSelectingShortcut: settingShortcutIndex !== -1,
|
|
14918
|
+
equipmentSet: equipmentSet,
|
|
14919
|
+
setItemShortcut: type === ItemContainerType.Inventory ? handleSetShortcut : undefined,
|
|
14920
|
+
isDepotSystem: isDepotSystem
|
|
14921
|
+
}));
|
|
14829
14922
|
}
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
}, React.createElement(
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14923
|
+
return slots;
|
|
14924
|
+
};
|
|
14925
|
+
return React.createElement(React.Fragment, null, React.createElement(SlotsContainer, {
|
|
14926
|
+
title: itemContainer.name || 'Container',
|
|
14927
|
+
onClose: onClose,
|
|
14928
|
+
initialPosition: initialPosition,
|
|
14929
|
+
scale: scale,
|
|
14930
|
+
onPositionChangeEnd: onPositionChangeEnd,
|
|
14931
|
+
onPositionChangeStart: onPositionChangeStart
|
|
14932
|
+
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
14933
|
+
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
14934
|
+
settingShortcutIndex: settingShortcutIndex,
|
|
14935
|
+
shortcuts: shortcuts,
|
|
14936
|
+
removeShortcut: removeShortcut,
|
|
14937
|
+
atlasIMG: atlasIMG,
|
|
14938
|
+
atlasJSON: atlasJSON
|
|
14939
|
+
}), React.createElement(ItemsContainer, {
|
|
14940
|
+
className: "item-container-body"
|
|
14941
|
+
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(ModalPortal, null, React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
14942
|
+
quantity: quantitySelect.maxQuantity,
|
|
14943
|
+
onConfirm: function onConfirm(quantity) {
|
|
14944
|
+
quantitySelect.callback(quantity);
|
|
14945
|
+
setQuantitySelect({
|
|
14946
|
+
isOpen: false,
|
|
14947
|
+
maxQuantity: 1,
|
|
14948
|
+
callback: function callback() {}
|
|
14949
|
+
});
|
|
14845
14950
|
},
|
|
14846
|
-
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
14847
14951
|
onClose: function onClose() {
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
14952
|
+
quantitySelect.callback(-1);
|
|
14953
|
+
setQuantitySelect({
|
|
14954
|
+
isOpen: false,
|
|
14955
|
+
maxQuantity: 1,
|
|
14956
|
+
callback: function callback() {}
|
|
14957
|
+
});
|
|
14851
14958
|
}
|
|
14852
|
-
}))
|
|
14853
|
-
right: '1rem',
|
|
14854
|
-
src: img$6
|
|
14855
|
-
}))), ")"));
|
|
14959
|
+
}))));
|
|
14856
14960
|
};
|
|
14857
|
-
var
|
|
14858
|
-
displayName: "
|
|
14859
|
-
componentId: "sc-
|
|
14860
|
-
})(["display:flex;
|
|
14861
|
-
var
|
|
14862
|
-
displayName: "
|
|
14863
|
-
componentId: "sc-
|
|
14864
|
-
})(["
|
|
14865
|
-
var flex = _ref2.flex;
|
|
14866
|
-
return flex;
|
|
14867
|
-
});
|
|
14868
|
-
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
14869
|
-
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
14870
|
-
componentId: "sc-rvu5wg-2"
|
|
14871
|
-
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
14872
|
-
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
14873
|
-
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
14874
|
-
componentId: "sc-rvu5wg-3"
|
|
14875
|
-
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
14876
|
-
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
14877
|
-
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
14878
|
-
componentId: "sc-rvu5wg-4"
|
|
14879
|
-
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
14880
|
-
var right = _ref3.right;
|
|
14881
|
-
return right;
|
|
14882
|
-
});
|
|
14961
|
+
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14962
|
+
displayName: "ItemContainer__ItemsContainer",
|
|
14963
|
+
componentId: "sc-15y5p9l-0"
|
|
14964
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
14965
|
+
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14966
|
+
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
14967
|
+
componentId: "sc-15y5p9l-1"
|
|
14968
|
+
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
14883
14969
|
|
|
14884
|
-
var
|
|
14885
|
-
var
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
var
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
if (event.code === 'Space') {
|
|
14898
|
-
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
14899
|
-
setImage(function (prev) {
|
|
14900
|
-
return prev + 1;
|
|
14901
|
-
});
|
|
14902
|
-
} else {
|
|
14903
|
-
// if there's no more text chunks, close the dialog
|
|
14904
|
-
onClose();
|
|
14905
|
-
}
|
|
14906
|
-
}
|
|
14970
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
14971
|
+
var atlasIMG = _ref.atlasIMG,
|
|
14972
|
+
atlasJSON = _ref.atlasJSON,
|
|
14973
|
+
options = _ref.options,
|
|
14974
|
+
onClose = _ref.onClose,
|
|
14975
|
+
onSelect = _ref.onSelect;
|
|
14976
|
+
var _useState = useState(),
|
|
14977
|
+
selectedValue = _useState[0],
|
|
14978
|
+
setSelectedValue = _useState[1];
|
|
14979
|
+
var handleClick = function handleClick() {
|
|
14980
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
14981
|
+
var elementValue = element.value;
|
|
14982
|
+
setSelectedValue(elementValue);
|
|
14907
14983
|
};
|
|
14908
14984
|
useEffect(function () {
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
}, [backgroundImgPath]);
|
|
14914
|
-
return React.createElement(BackgroundContainer, {
|
|
14915
|
-
imgPath: backgroundImgPath[img],
|
|
14916
|
-
fullImg: fullCoverBackground
|
|
14917
|
-
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
14918
|
-
textAndTypeArray: textAndTypeArray,
|
|
14919
|
-
onClose: onClose
|
|
14920
|
-
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
14921
|
-
questions: questions,
|
|
14922
|
-
answers: answers,
|
|
14923
|
-
onClose: onClose
|
|
14924
|
-
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
14925
|
-
text: text,
|
|
14926
|
-
imagePath: imagePath,
|
|
14927
|
-
onClose: onClose,
|
|
14928
|
-
type: NPCDialogType.TextAndThumbnail
|
|
14929
|
-
}) : React.createElement(NPCDialog, {
|
|
14930
|
-
text: text,
|
|
14931
|
-
onClose: onClose,
|
|
14932
|
-
type: NPCDialogType.TextOnly
|
|
14933
|
-
})));
|
|
14934
|
-
};
|
|
14935
|
-
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14936
|
-
displayName: "HistoryDialog__BackgroundContainer",
|
|
14937
|
-
componentId: "sc-u6oe75-0"
|
|
14938
|
-
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
14939
|
-
return props.imgPath;
|
|
14940
|
-
}, function (props) {
|
|
14941
|
-
return props.imgPath ? 'cover' : 'auto';
|
|
14942
|
-
});
|
|
14943
|
-
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14944
|
-
displayName: "HistoryDialog__DialogContainer",
|
|
14945
|
-
componentId: "sc-u6oe75-1"
|
|
14946
|
-
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
14947
|
-
|
|
14948
|
-
var SlotsContainer = function SlotsContainer(_ref) {
|
|
14949
|
-
var children = _ref.children,
|
|
14950
|
-
title = _ref.title,
|
|
14951
|
-
onClose = _ref.onClose,
|
|
14952
|
-
_onPositionChange = _ref.onPositionChange,
|
|
14953
|
-
_onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
14954
|
-
_onPositionChangeStart = _ref.onPositionChangeStart,
|
|
14955
|
-
onOutsideClick = _ref.onOutsideClick,
|
|
14956
|
-
initialPosition = _ref.initialPosition,
|
|
14957
|
-
scale = _ref.scale;
|
|
14985
|
+
if (selectedValue) {
|
|
14986
|
+
onSelect(selectedValue);
|
|
14987
|
+
}
|
|
14988
|
+
}, [selectedValue]);
|
|
14958
14989
|
return React.createElement(DraggableContainer, {
|
|
14959
|
-
title: title,
|
|
14960
14990
|
type: RPGUIContainerTypes.Framed,
|
|
14991
|
+
width: "500px",
|
|
14992
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
14961
14993
|
onCloseButton: function onCloseButton() {
|
|
14962
14994
|
if (onClose) {
|
|
14963
14995
|
onClose();
|
|
14964
14996
|
}
|
|
14965
|
-
},
|
|
14966
|
-
width: "400px",
|
|
14967
|
-
cancelDrag: ".item-container-body, #shortcuts_list",
|
|
14968
|
-
onPositionChange: function onPositionChange(_ref2) {
|
|
14969
|
-
var x = _ref2.x,
|
|
14970
|
-
y = _ref2.y;
|
|
14971
|
-
if (_onPositionChange) {
|
|
14972
|
-
_onPositionChange({
|
|
14973
|
-
x: x,
|
|
14974
|
-
y: y
|
|
14975
|
-
});
|
|
14976
|
-
}
|
|
14977
|
-
},
|
|
14978
|
-
onPositionChangeEnd: function onPositionChangeEnd(_ref3) {
|
|
14979
|
-
var x = _ref3.x,
|
|
14980
|
-
y = _ref3.y;
|
|
14981
|
-
if (_onPositionChangeEnd) {
|
|
14982
|
-
_onPositionChangeEnd({
|
|
14983
|
-
x: x,
|
|
14984
|
-
y: y
|
|
14985
|
-
});
|
|
14986
|
-
}
|
|
14987
|
-
},
|
|
14988
|
-
onPositionChangeStart: function onPositionChangeStart(_ref4) {
|
|
14989
|
-
var x = _ref4.x,
|
|
14990
|
-
y = _ref4.y;
|
|
14991
|
-
if (_onPositionChangeStart) {
|
|
14992
|
-
_onPositionChangeStart({
|
|
14993
|
-
x: x,
|
|
14994
|
-
y: y
|
|
14995
|
-
});
|
|
14996
|
-
}
|
|
14997
|
-
},
|
|
14998
|
-
onOutsideClick: onOutsideClick,
|
|
14999
|
-
initialPosition: initialPosition,
|
|
15000
|
-
scale: scale
|
|
15001
|
-
}, children);
|
|
15002
|
-
};
|
|
15003
|
-
|
|
15004
|
-
var RangeSliderType;
|
|
15005
|
-
(function (RangeSliderType) {
|
|
15006
|
-
RangeSliderType["Slider"] = "rpgui-slider";
|
|
15007
|
-
RangeSliderType["GoldSlider"] = "rpgui-slider golden";
|
|
15008
|
-
})(RangeSliderType || (RangeSliderType = {}));
|
|
15009
|
-
var RangeSlider = function RangeSlider(_ref) {
|
|
15010
|
-
var type = _ref.type,
|
|
15011
|
-
valueMin = _ref.valueMin,
|
|
15012
|
-
valueMax = _ref.valueMax,
|
|
15013
|
-
width = _ref.width,
|
|
15014
|
-
_onChange = _ref.onChange,
|
|
15015
|
-
value = _ref.value;
|
|
15016
|
-
var sliderId = v4();
|
|
15017
|
-
var containerRef = useRef(null);
|
|
15018
|
-
var _useState = useState(0),
|
|
15019
|
-
left = _useState[0],
|
|
15020
|
-
setLeft = _useState[1];
|
|
15021
|
-
useEffect(function () {
|
|
15022
|
-
var _containerRef$current;
|
|
15023
|
-
var calculatedWidth = ((_containerRef$current = containerRef.current) == null ? void 0 : _containerRef$current.clientWidth) || 0;
|
|
15024
|
-
setLeft(Math.max((value - valueMin) / (valueMax - valueMin) * (calculatedWidth - 35) + 10));
|
|
15025
|
-
}, [value, valueMin, valueMax]);
|
|
15026
|
-
var typeClass = type === RangeSliderType.GoldSlider ? 'golden' : '';
|
|
15027
|
-
return React.createElement("div", {
|
|
15028
|
-
style: {
|
|
15029
|
-
width: width,
|
|
15030
|
-
position: 'relative'
|
|
15031
|
-
},
|
|
15032
|
-
className: "rpgui-slider-container " + typeClass,
|
|
15033
|
-
id: "rpgui-slider-" + sliderId,
|
|
15034
|
-
ref: containerRef
|
|
15035
|
-
}, React.createElement("div", {
|
|
15036
|
-
style: {
|
|
15037
|
-
pointerEvents: 'none'
|
|
15038
14997
|
}
|
|
15039
14998
|
}, React.createElement("div", {
|
|
15040
|
-
className: "rpgui-slider-track " + typeClass
|
|
15041
|
-
}), React.createElement("div", {
|
|
15042
|
-
className: "rpgui-slider-left-edge " + typeClass
|
|
15043
|
-
}), React.createElement("div", {
|
|
15044
|
-
className: "rpgui-slider-right-edge " + typeClass
|
|
15045
|
-
}), React.createElement("div", {
|
|
15046
|
-
className: "rpgui-slider-thumb " + typeClass,
|
|
15047
14999
|
style: {
|
|
15048
|
-
|
|
15000
|
+
width: '100%'
|
|
15049
15001
|
}
|
|
15050
|
-
})
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15002
|
+
}, React.createElement(Title$3, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
15003
|
+
className: "golden"
|
|
15004
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
15005
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
15006
|
+
key: index
|
|
15007
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
15008
|
+
atlasIMG: atlasIMG,
|
|
15009
|
+
atlasJSON: atlasJSON,
|
|
15010
|
+
spriteKey: option.imageKey,
|
|
15011
|
+
imgScale: 3
|
|
15012
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
15013
|
+
className: "rpgui-radio",
|
|
15014
|
+
type: "radio",
|
|
15015
|
+
value: option.name,
|
|
15016
|
+
name: "test"
|
|
15017
|
+
}), React.createElement("label", {
|
|
15018
|
+
onPointerDown: handleClick,
|
|
15019
|
+
style: {
|
|
15020
|
+
display: 'flex',
|
|
15021
|
+
alignItems: 'center'
|
|
15022
|
+
}
|
|
15023
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
15024
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
15025
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15026
|
+
onPointerDown: onClose
|
|
15027
|
+
}, "Cancel"), React.createElement(Button, {
|
|
15028
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
15029
|
+
}, "Select")));
|
|
15063
15030
|
};
|
|
15064
|
-
var
|
|
15065
|
-
displayName: "
|
|
15066
|
-
componentId: "sc-
|
|
15067
|
-
})(["
|
|
15031
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
15032
|
+
displayName: "ItemSelector__Title",
|
|
15033
|
+
componentId: "sc-gptoxp-0"
|
|
15034
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
15035
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
15036
|
+
displayName: "ItemSelector__Subtitle",
|
|
15037
|
+
componentId: "sc-gptoxp-1"
|
|
15038
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
15039
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15040
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
15041
|
+
componentId: "sc-gptoxp-2"
|
|
15042
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
15043
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15044
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
15045
|
+
componentId: "sc-gptoxp-3"
|
|
15046
|
+
})(["margin-right:40px;"]);
|
|
15047
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15048
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
15049
|
+
componentId: "sc-gptoxp-4"
|
|
15050
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
15051
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15052
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
15053
|
+
componentId: "sc-gptoxp-5"
|
|
15054
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
15068
15055
|
|
|
15069
|
-
var
|
|
15070
|
-
var
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
inputRef.current.focus();
|
|
15080
|
-
inputRef.current.select();
|
|
15081
|
-
var closeSelector = function closeSelector(e) {
|
|
15082
|
-
if (e.key === 'Escape') {
|
|
15083
|
-
onClose();
|
|
15084
|
-
}
|
|
15085
|
-
};
|
|
15086
|
-
document.addEventListener('keydown', closeSelector);
|
|
15087
|
-
return function () {
|
|
15088
|
-
document.removeEventListener('keydown', closeSelector);
|
|
15089
|
-
};
|
|
15090
|
-
}
|
|
15091
|
-
return function () {};
|
|
15092
|
-
}, []);
|
|
15093
|
-
return React.createElement(StyledContainer, {
|
|
15094
|
-
type: RPGUIContainerTypes.Framed,
|
|
15095
|
-
width: "25rem"
|
|
15096
|
-
}, React.createElement(CloseButton$2, {
|
|
15097
|
-
className: "container-close",
|
|
15098
|
-
onPointerDown: onClose
|
|
15099
|
-
}, "X"), React.createElement("h2", null, "Select quantity to move"), React.createElement(StyledForm, {
|
|
15056
|
+
var ListMenu = function ListMenu(_ref) {
|
|
15057
|
+
var options = _ref.options,
|
|
15058
|
+
onSelected = _ref.onSelected,
|
|
15059
|
+
x = _ref.x,
|
|
15060
|
+
y = _ref.y;
|
|
15061
|
+
return React.createElement(Container$f, {
|
|
15062
|
+
x: x,
|
|
15063
|
+
y: y
|
|
15064
|
+
}, React.createElement("ul", {
|
|
15065
|
+
className: "rpgui-list-imp",
|
|
15100
15066
|
style: {
|
|
15101
|
-
|
|
15102
|
-
},
|
|
15103
|
-
onSubmit: function onSubmit(e) {
|
|
15104
|
-
e.preventDefault();
|
|
15105
|
-
var numberValue = Number(value);
|
|
15106
|
-
if (Number.isNaN(numberValue)) {
|
|
15107
|
-
return;
|
|
15108
|
-
}
|
|
15109
|
-
onConfirm(Math.max(1, Math.min(quantity, numberValue)));
|
|
15110
|
-
},
|
|
15111
|
-
noValidate: true
|
|
15112
|
-
}, React.createElement(StyledInput, {
|
|
15113
|
-
innerRef: inputRef,
|
|
15114
|
-
placeholder: "Enter quantity",
|
|
15115
|
-
type: "number",
|
|
15116
|
-
min: 1,
|
|
15117
|
-
max: quantity,
|
|
15118
|
-
value: value,
|
|
15119
|
-
onChange: function onChange(e) {
|
|
15120
|
-
if (Number(e.target.value) >= quantity) {
|
|
15121
|
-
setValue(quantity);
|
|
15122
|
-
return;
|
|
15123
|
-
}
|
|
15124
|
-
setValue(e.target.value);
|
|
15125
|
-
},
|
|
15126
|
-
onBlur: function onBlur(e) {
|
|
15127
|
-
var newValue = Math.max(1, Math.min(quantity, Number(e.target.value)));
|
|
15128
|
-
setValue(newValue);
|
|
15067
|
+
overflow: 'hidden'
|
|
15129
15068
|
}
|
|
15130
|
-
}
|
|
15131
|
-
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15135
|
-
|
|
15136
|
-
|
|
15137
|
-
})
|
|
15138
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
15139
|
-
type: "submit"
|
|
15140
|
-
}, "Confirm")));
|
|
15069
|
+
}, options.map(function (params, index) {
|
|
15070
|
+
return React.createElement(ListElement$1, {
|
|
15071
|
+
key: (params == null ? void 0 : params.id) || index,
|
|
15072
|
+
onPointerDown: function onPointerDown() {
|
|
15073
|
+
onSelected(params == null ? void 0 : params.id);
|
|
15074
|
+
}
|
|
15075
|
+
}, (params == null ? void 0 : params.text) || 'No text');
|
|
15076
|
+
})));
|
|
15141
15077
|
};
|
|
15142
|
-
var
|
|
15143
|
-
displayName: "
|
|
15144
|
-
componentId: "sc-
|
|
15145
|
-
})(["display:flex;flex-direction:column;align-items:
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
})
|
|
15150
|
-
var
|
|
15151
|
-
displayName: "
|
|
15152
|
-
componentId: "sc-
|
|
15153
|
-
})(["
|
|
15154
|
-
var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
15155
|
-
displayName: "ItemQuantitySelector__CloseButton",
|
|
15156
|
-
componentId: "sc-yfdtpn-3"
|
|
15157
|
-
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
|
|
15078
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
15079
|
+
displayName: "ListMenu__Container",
|
|
15080
|
+
componentId: "sc-i9097t-0"
|
|
15081
|
+
})(["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) {
|
|
15082
|
+
return props.y || 0;
|
|
15083
|
+
}, function (props) {
|
|
15084
|
+
return props.x || 0;
|
|
15085
|
+
}, uiFonts.size.xsmall);
|
|
15086
|
+
var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
15087
|
+
displayName: "ListMenu__ListElement",
|
|
15088
|
+
componentId: "sc-i9097t-1"
|
|
15089
|
+
})(["margin-right:0.5rem;"]);
|
|
15158
15090
|
|
|
15159
|
-
var
|
|
15160
|
-
var
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15167
|
-
|
|
15168
|
-
|
|
15169
|
-
|
|
15170
|
-
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
|
|
15178
|
-
|
|
15179
|
-
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
|
|
15185
|
-
|
|
15186
|
-
|
|
15187
|
-
|
|
15091
|
+
var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
15092
|
+
var atlasJSON = _ref.atlasJSON,
|
|
15093
|
+
atlasIMG = _ref.atlasIMG,
|
|
15094
|
+
item = _ref.item,
|
|
15095
|
+
itemPrice = _ref.itemPrice,
|
|
15096
|
+
equipmentSet = _ref.equipmentSet,
|
|
15097
|
+
scale = _ref.scale,
|
|
15098
|
+
onHandleClick = _ref.onHandleClick;
|
|
15099
|
+
return React.createElement(MarketPlaceWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(ItemInfoWrapper, {
|
|
15100
|
+
item: item,
|
|
15101
|
+
atlasIMG: atlasIMG,
|
|
15102
|
+
atlasJSON: atlasJSON,
|
|
15103
|
+
equipmentSet: equipmentSet,
|
|
15104
|
+
scale: scale
|
|
15105
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
15106
|
+
atlasIMG: atlasIMG,
|
|
15107
|
+
atlasJSON: atlasJSON,
|
|
15108
|
+
spriteKey: getItemTextureKeyPath({
|
|
15109
|
+
key: item.key,
|
|
15110
|
+
stackQty: item.stackQty || 1,
|
|
15111
|
+
texturePath: item.texturePath,
|
|
15112
|
+
isStackable: item.isStackable
|
|
15113
|
+
}, atlasJSON),
|
|
15114
|
+
imgScale: 2
|
|
15115
|
+
}))), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15116
|
+
maxLines: 1,
|
|
15117
|
+
maxWidth: "150px",
|
|
15118
|
+
fontSize: "10px"
|
|
15119
|
+
}, item.name)))), React.createElement(QuantityContainer, null, React.createElement(QuantityDisplay, null, React.createElement(TextOverlay$1, null, React.createElement(Item$1, null, React.createElement(Ellipsis, {
|
|
15120
|
+
maxLines: 1,
|
|
15121
|
+
maxWidth: "150px",
|
|
15122
|
+
fontSize: "10px"
|
|
15123
|
+
}, item.rarity))))), React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
|
|
15124
|
+
atlasIMG: atlasIMG,
|
|
15125
|
+
atlasJSON: atlasJSON,
|
|
15126
|
+
spriteKey: 'others/gold-coin-qty-4.png',
|
|
15127
|
+
imgScale: 2
|
|
15128
|
+
})), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15129
|
+
maxLines: 1,
|
|
15130
|
+
maxWidth: "150px",
|
|
15131
|
+
fontSize: "10px"
|
|
15132
|
+
}, "$", itemPrice)))), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
|
|
15133
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
15134
|
+
onClick: function onClick() {
|
|
15135
|
+
return onHandleClick(item.name);
|
|
15188
15136
|
}
|
|
15189
|
-
|
|
15190
|
-
return React.createElement("span", null, payload == null ? void 0 : payload.magicWords.split(' ').map(function (word) {
|
|
15191
|
-
return word[0];
|
|
15192
|
-
}));
|
|
15193
|
-
};
|
|
15194
|
-
return React.createElement(Container$i, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
15195
|
-
id: "shortcuts_list"
|
|
15196
|
-
}, Array.from({
|
|
15197
|
-
length: 6
|
|
15198
|
-
}).map(function (_, i) {
|
|
15199
|
-
return React.createElement(Shortcut, {
|
|
15200
|
-
key: i,
|
|
15201
|
-
onPointerDown: function onPointerDown() {
|
|
15202
|
-
if (settingShortcutIndex !== -1) setSettingShortcutIndex(-1);
|
|
15203
|
-
removeShortcut(i);
|
|
15204
|
-
if (settingShortcutIndex === -1 && (!shortcuts[i] || shortcuts[i].type === ShortcutType.None)) setSettingShortcutIndex(i);
|
|
15205
|
-
},
|
|
15206
|
-
disabled: settingShortcutIndex !== -1 && settingShortcutIndex !== i,
|
|
15207
|
-
isBeingSet: settingShortcutIndex === i,
|
|
15208
|
-
id: "shortcutSetter_" + i
|
|
15209
|
-
}, getContent(i));
|
|
15210
|
-
})));
|
|
15137
|
+
}, "Buy")));
|
|
15211
15138
|
};
|
|
15212
|
-
var
|
|
15213
|
-
displayName: "
|
|
15214
|
-
componentId: "sc-
|
|
15215
|
-
})(["
|
|
15216
|
-
var
|
|
15217
|
-
displayName: "
|
|
15218
|
-
componentId: "sc-
|
|
15219
|
-
})(["
|
|
15220
|
-
|
|
15221
|
-
|
|
15222
|
-
|
|
15223
|
-
|
|
15224
|
-
|
|
15225
|
-
|
|
15226
|
-
|
|
15139
|
+
var MarketPlaceWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15140
|
+
displayName: "MarketplaceRows__MarketPlaceWrapper",
|
|
15141
|
+
componentId: "sc-wmpr1o-0"
|
|
15142
|
+
})(["margin:auto;display:grid;grid-template-columns:35% 20% 20% 25%;&:hover{background-color:", ";}padding:0.5rem;p{font-size:0.8rem;}"], uiColors.darkGray);
|
|
15143
|
+
var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15144
|
+
displayName: "MarketplaceRows__ItemIconContainer",
|
|
15145
|
+
componentId: "sc-wmpr1o-1"
|
|
15146
|
+
})(["display:flex;justify-content:flex-start;align-items:center;"]);
|
|
15147
|
+
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15148
|
+
displayName: "MarketplaceRows__SpriteContainer",
|
|
15149
|
+
componentId: "sc-wmpr1o-2"
|
|
15150
|
+
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
15151
|
+
var Item$1 = /*#__PURE__*/styled.span.withConfig({
|
|
15152
|
+
displayName: "MarketplaceRows__Item",
|
|
15153
|
+
componentId: "sc-wmpr1o-3"
|
|
15154
|
+
})(["color:white;text-align:center;z-index:1;width:100%;"]);
|
|
15155
|
+
var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15156
|
+
displayName: "MarketplaceRows__TextOverlay",
|
|
15157
|
+
componentId: "sc-wmpr1o-4"
|
|
15158
|
+
})(["width:100%;position:relative;"]);
|
|
15159
|
+
var QuantityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15160
|
+
displayName: "MarketplaceRows__QuantityContainer",
|
|
15161
|
+
componentId: "sc-wmpr1o-5"
|
|
15162
|
+
})(["position:relative;display:flex;min-width:100px;justify-content:center;align-items:center;"]);
|
|
15163
|
+
var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
|
|
15164
|
+
displayName: "MarketplaceRows__QuantityDisplay",
|
|
15165
|
+
componentId: "sc-wmpr1o-6"
|
|
15166
|
+
})(["font-size:", ";"], uiFonts.size.small);
|
|
15167
|
+
var PriceValue = /*#__PURE__*/styled.div.withConfig({
|
|
15168
|
+
displayName: "MarketplaceRows__PriceValue",
|
|
15169
|
+
componentId: "sc-wmpr1o-7"
|
|
15170
|
+
})(["margin-left:40px;"]);
|
|
15171
|
+
var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15172
|
+
displayName: "MarketplaceRows__ButtonContainer",
|
|
15173
|
+
componentId: "sc-wmpr1o-8"
|
|
15174
|
+
})(["margin:auto;"]);
|
|
15227
15175
|
|
|
15228
|
-
var
|
|
15229
|
-
var
|
|
15230
|
-
onClose = _ref.onClose,
|
|
15231
|
-
_onMouseOver = _ref.onMouseOver,
|
|
15232
|
-
_onSelected = _ref.onSelected,
|
|
15233
|
-
onItemClick = _ref.onItemClick,
|
|
15234
|
-
type = _ref.type,
|
|
15235
|
-
atlasJSON = _ref.atlasJSON,
|
|
15176
|
+
var Marketplace = function Marketplace(_ref) {
|
|
15177
|
+
var items = _ref.items,
|
|
15236
15178
|
atlasIMG = _ref.atlasIMG,
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
scale = _ref.scale,
|
|
15247
|
-
shortcuts = _ref.shortcuts,
|
|
15248
|
-
setItemShortcut = _ref.setItemShortcut,
|
|
15249
|
-
removeShortcut = _ref.removeShortcut,
|
|
15250
|
-
equipmentSet = _ref.equipmentSet,
|
|
15251
|
-
isDepotSystem = _ref.isDepotSystem,
|
|
15252
|
-
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
15253
|
-
onPositionChangeStart = _ref.onPositionChangeStart;
|
|
15254
|
-
var _useState = useState({
|
|
15255
|
-
isOpen: false,
|
|
15256
|
-
maxQuantity: 1,
|
|
15257
|
-
callback: function callback(_quantity) {}
|
|
15258
|
-
}),
|
|
15259
|
-
quantitySelect = _useState[0],
|
|
15260
|
-
setQuantitySelect = _useState[1];
|
|
15261
|
-
var _useState2 = useState(-1),
|
|
15262
|
-
settingShortcutIndex = _useState2[0],
|
|
15263
|
-
setSettingShortcutIndex = _useState2[1];
|
|
15264
|
-
var handleSetShortcut = function handleSetShortcut(item, index) {
|
|
15265
|
-
if (item.type === ItemType.Consumable || item.type === ItemType.Tool) {
|
|
15266
|
-
setItemShortcut == null ? void 0 : setItemShortcut(item.key, index);
|
|
15267
|
-
}
|
|
15268
|
-
};
|
|
15269
|
-
var onRenderSlots = function onRenderSlots() {
|
|
15270
|
-
var slots = [];
|
|
15271
|
-
for (var i = 0; i < itemContainer.slotQty; i++) {
|
|
15272
|
-
var _itemContainer$slots;
|
|
15273
|
-
slots.push(React.createElement(ItemSlot, {
|
|
15274
|
-
isContextMenuDisabled: disableContextMenu,
|
|
15275
|
-
key: i,
|
|
15276
|
-
slotIndex: i,
|
|
15277
|
-
item: ((_itemContainer$slots = itemContainer.slots) == null ? void 0 : _itemContainer$slots[i]) || null,
|
|
15278
|
-
itemContainerType: type,
|
|
15279
|
-
onMouseOver: function onMouseOver(event, slotIndex, item) {
|
|
15280
|
-
if (_onMouseOver) _onMouseOver(event, slotIndex, item);
|
|
15281
|
-
},
|
|
15282
|
-
onPointerDown: function onPointerDown(itemType, containerType, item) {
|
|
15283
|
-
if (settingShortcutIndex !== -1) {
|
|
15284
|
-
setSettingShortcutIndex(-1);
|
|
15285
|
-
handleSetShortcut(item, settingShortcutIndex);
|
|
15286
|
-
} else if (onItemClick) onItemClick(item, itemType, containerType);
|
|
15287
|
-
},
|
|
15288
|
-
onSelected: function onSelected(optionId, item) {
|
|
15289
|
-
if (_onSelected) _onSelected(optionId, item);
|
|
15290
|
-
},
|
|
15291
|
-
onDragStart: function onDragStart(item, slotIndex, itemContainerType) {
|
|
15292
|
-
if (onItemDragStart) onItemDragStart(item, slotIndex, itemContainerType);
|
|
15293
|
-
},
|
|
15294
|
-
onDragEnd: function onDragEnd(quantity) {
|
|
15295
|
-
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
15296
|
-
},
|
|
15297
|
-
dragScale: scale,
|
|
15298
|
-
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
15299
|
-
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
15300
|
-
openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {
|
|
15301
|
-
setQuantitySelect({
|
|
15302
|
-
isOpen: true,
|
|
15303
|
-
maxQuantity: maxQuantity,
|
|
15304
|
-
callback: callback
|
|
15305
|
-
});
|
|
15306
|
-
},
|
|
15307
|
-
onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
|
|
15308
|
-
if (onItemPlaceDrop) onItemPlaceDrop(item, slotIndex, itemContainerType);
|
|
15309
|
-
},
|
|
15310
|
-
onOutsideDrop: function onOutsideDrop(item, position) {
|
|
15311
|
-
if (_onOutsideDrop) _onOutsideDrop(item, position);
|
|
15312
|
-
},
|
|
15313
|
-
atlasIMG: atlasIMG,
|
|
15314
|
-
atlasJSON: atlasJSON,
|
|
15315
|
-
isSelectingShortcut: settingShortcutIndex !== -1,
|
|
15316
|
-
equipmentSet: equipmentSet,
|
|
15317
|
-
setItemShortcut: type === ItemContainerType.Inventory ? handleSetShortcut : undefined,
|
|
15318
|
-
isDepotSystem: isDepotSystem
|
|
15319
|
-
}));
|
|
15320
|
-
}
|
|
15321
|
-
return slots;
|
|
15322
|
-
};
|
|
15323
|
-
return React.createElement(React.Fragment, null, React.createElement(SlotsContainer, {
|
|
15324
|
-
title: itemContainer.name || 'Container',
|
|
15325
|
-
onClose: onClose,
|
|
15326
|
-
initialPosition: initialPosition,
|
|
15327
|
-
scale: scale,
|
|
15328
|
-
onPositionChangeEnd: onPositionChangeEnd,
|
|
15329
|
-
onPositionChangeStart: onPositionChangeStart
|
|
15330
|
-
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
15331
|
-
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
15332
|
-
settingShortcutIndex: settingShortcutIndex,
|
|
15333
|
-
shortcuts: shortcuts,
|
|
15334
|
-
removeShortcut: removeShortcut,
|
|
15335
|
-
atlasIMG: atlasIMG,
|
|
15336
|
-
atlasJSON: atlasJSON
|
|
15337
|
-
}), React.createElement(ItemsContainer, {
|
|
15338
|
-
className: "item-container-body"
|
|
15339
|
-
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(ModalPortal, null, React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
15340
|
-
quantity: quantitySelect.maxQuantity,
|
|
15341
|
-
onConfirm: function onConfirm(quantity) {
|
|
15342
|
-
quantitySelect.callback(quantity);
|
|
15343
|
-
setQuantitySelect({
|
|
15344
|
-
isOpen: false,
|
|
15345
|
-
maxQuantity: 1,
|
|
15346
|
-
callback: function callback() {}
|
|
15347
|
-
});
|
|
15348
|
-
},
|
|
15349
|
-
onClose: function onClose() {
|
|
15350
|
-
quantitySelect.callback(-1);
|
|
15351
|
-
setQuantitySelect({
|
|
15352
|
-
isOpen: false,
|
|
15353
|
-
maxQuantity: 1,
|
|
15354
|
-
callback: function callback() {}
|
|
15355
|
-
});
|
|
15356
|
-
}
|
|
15357
|
-
}))));
|
|
15358
|
-
};
|
|
15359
|
-
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15360
|
-
displayName: "ItemContainer__ItemsContainer",
|
|
15361
|
-
componentId: "sc-15y5p9l-0"
|
|
15362
|
-
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
15363
|
-
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15364
|
-
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
15365
|
-
componentId: "sc-15y5p9l-1"
|
|
15366
|
-
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
15367
|
-
|
|
15368
|
-
var ItemSelector = function ItemSelector(_ref) {
|
|
15369
|
-
var atlasIMG = _ref.atlasIMG,
|
|
15370
|
-
atlasJSON = _ref.atlasJSON,
|
|
15371
|
-
options = _ref.options,
|
|
15372
|
-
onClose = _ref.onClose,
|
|
15373
|
-
onSelect = _ref.onSelect;
|
|
15374
|
-
var _useState = useState(),
|
|
15375
|
-
selectedValue = _useState[0],
|
|
15376
|
-
setSelectedValue = _useState[1];
|
|
15377
|
-
var handleClick = function handleClick() {
|
|
15378
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
15379
|
-
var elementValue = element.value;
|
|
15380
|
-
setSelectedValue(elementValue);
|
|
15381
|
-
};
|
|
15382
|
-
useEffect(function () {
|
|
15383
|
-
if (selectedValue) {
|
|
15384
|
-
onSelect(selectedValue);
|
|
15385
|
-
}
|
|
15386
|
-
}, [selectedValue]);
|
|
15387
|
-
return React.createElement(DraggableContainer, {
|
|
15388
|
-
type: RPGUIContainerTypes.Framed,
|
|
15389
|
-
width: "500px",
|
|
15390
|
-
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
15391
|
-
onCloseButton: function onCloseButton() {
|
|
15392
|
-
if (onClose) {
|
|
15393
|
-
onClose();
|
|
15394
|
-
}
|
|
15395
|
-
}
|
|
15396
|
-
}, React.createElement("div", {
|
|
15397
|
-
style: {
|
|
15398
|
-
width: '100%'
|
|
15399
|
-
}
|
|
15400
|
-
}, React.createElement(Title$3, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
15401
|
-
className: "golden"
|
|
15402
|
-
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
15403
|
-
return React.createElement(RadioOptionsWrapper$1, {
|
|
15404
|
-
key: index
|
|
15405
|
-
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
15406
|
-
atlasIMG: atlasIMG,
|
|
15407
|
-
atlasJSON: atlasJSON,
|
|
15408
|
-
spriteKey: option.imageKey,
|
|
15409
|
-
imgScale: 3
|
|
15410
|
-
})), React.createElement("div", null, React.createElement("input", {
|
|
15411
|
-
className: "rpgui-radio",
|
|
15412
|
-
type: "radio",
|
|
15413
|
-
value: option.name,
|
|
15414
|
-
name: "test"
|
|
15415
|
-
}), React.createElement("label", {
|
|
15416
|
-
onPointerDown: handleClick,
|
|
15417
|
-
style: {
|
|
15418
|
-
display: 'flex',
|
|
15419
|
-
alignItems: 'center'
|
|
15420
|
-
}
|
|
15421
|
-
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
15422
|
-
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
15423
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
15424
|
-
onPointerDown: onClose
|
|
15425
|
-
}, "Cancel"), React.createElement(Button, {
|
|
15426
|
-
buttonType: ButtonTypes.RPGUIButton
|
|
15427
|
-
}, "Select")));
|
|
15428
|
-
};
|
|
15429
|
-
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
15430
|
-
displayName: "ItemSelector__Title",
|
|
15431
|
-
componentId: "sc-gptoxp-0"
|
|
15432
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
15433
|
-
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
15434
|
-
displayName: "ItemSelector__Subtitle",
|
|
15435
|
-
componentId: "sc-gptoxp-1"
|
|
15436
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
15437
|
-
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15438
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
15439
|
-
componentId: "sc-gptoxp-2"
|
|
15440
|
-
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
15441
|
-
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15442
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
15443
|
-
componentId: "sc-gptoxp-3"
|
|
15444
|
-
})(["margin-right:40px;"]);
|
|
15445
|
-
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15446
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
15447
|
-
componentId: "sc-gptoxp-4"
|
|
15448
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
15449
|
-
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15450
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
15451
|
-
componentId: "sc-gptoxp-5"
|
|
15452
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
15453
|
-
|
|
15454
|
-
var ListMenu = function ListMenu(_ref) {
|
|
15455
|
-
var options = _ref.options,
|
|
15456
|
-
onSelected = _ref.onSelected,
|
|
15457
|
-
x = _ref.x,
|
|
15458
|
-
y = _ref.y;
|
|
15459
|
-
return React.createElement(Container$j, {
|
|
15460
|
-
x: x,
|
|
15461
|
-
y: y
|
|
15462
|
-
}, React.createElement("ul", {
|
|
15463
|
-
className: "rpgui-list-imp",
|
|
15464
|
-
style: {
|
|
15465
|
-
overflow: 'hidden'
|
|
15466
|
-
}
|
|
15467
|
-
}, options.map(function (params, index) {
|
|
15468
|
-
return React.createElement(ListElement$1, {
|
|
15469
|
-
key: (params == null ? void 0 : params.id) || index,
|
|
15470
|
-
onPointerDown: function onPointerDown() {
|
|
15471
|
-
onSelected(params == null ? void 0 : params.id);
|
|
15472
|
-
}
|
|
15473
|
-
}, (params == null ? void 0 : params.text) || 'No text');
|
|
15474
|
-
})));
|
|
15475
|
-
};
|
|
15476
|
-
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
15477
|
-
displayName: "ListMenu__Container",
|
|
15478
|
-
componentId: "sc-i9097t-0"
|
|
15479
|
-
})(["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) {
|
|
15480
|
-
return props.y || 0;
|
|
15481
|
-
}, function (props) {
|
|
15482
|
-
return props.x || 0;
|
|
15483
|
-
}, uiFonts.size.xsmall);
|
|
15484
|
-
var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
15485
|
-
displayName: "ListMenu__ListElement",
|
|
15486
|
-
componentId: "sc-i9097t-1"
|
|
15487
|
-
})(["margin-right:0.5rem;"]);
|
|
15488
|
-
|
|
15489
|
-
var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
15490
|
-
var atlasJSON = _ref.atlasJSON,
|
|
15491
|
-
atlasIMG = _ref.atlasIMG,
|
|
15492
|
-
item = _ref.item,
|
|
15493
|
-
itemPrice = _ref.itemPrice,
|
|
15494
|
-
equipmentSet = _ref.equipmentSet,
|
|
15495
|
-
scale = _ref.scale,
|
|
15496
|
-
onHandleClick = _ref.onHandleClick;
|
|
15497
|
-
return React.createElement(MarketPlaceWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(ItemInfoWrapper, {
|
|
15498
|
-
item: item,
|
|
15499
|
-
atlasIMG: atlasIMG,
|
|
15500
|
-
atlasJSON: atlasJSON,
|
|
15501
|
-
equipmentSet: equipmentSet,
|
|
15502
|
-
scale: scale
|
|
15503
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
15504
|
-
atlasIMG: atlasIMG,
|
|
15505
|
-
atlasJSON: atlasJSON,
|
|
15506
|
-
spriteKey: getItemTextureKeyPath({
|
|
15507
|
-
key: item.key,
|
|
15508
|
-
stackQty: item.stackQty || 1,
|
|
15509
|
-
texturePath: item.texturePath,
|
|
15510
|
-
isStackable: item.isStackable
|
|
15511
|
-
}, atlasJSON),
|
|
15512
|
-
imgScale: 2
|
|
15513
|
-
}))), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15514
|
-
maxLines: 1,
|
|
15515
|
-
maxWidth: "150px",
|
|
15516
|
-
fontSize: "10px"
|
|
15517
|
-
}, item.name)))), React.createElement(QuantityContainer, null, React.createElement(QuantityDisplay, null, React.createElement(TextOverlay$1, null, React.createElement(Item$1, null, React.createElement(Ellipsis, {
|
|
15518
|
-
maxLines: 1,
|
|
15519
|
-
maxWidth: "150px",
|
|
15520
|
-
fontSize: "10px"
|
|
15521
|
-
}, item.rarity))))), React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
|
|
15522
|
-
atlasIMG: atlasIMG,
|
|
15523
|
-
atlasJSON: atlasJSON,
|
|
15524
|
-
spriteKey: 'others/gold-coin-qty-4.png',
|
|
15525
|
-
imgScale: 2
|
|
15526
|
-
})), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
15527
|
-
maxLines: 1,
|
|
15528
|
-
maxWidth: "150px",
|
|
15529
|
-
fontSize: "10px"
|
|
15530
|
-
}, "$", itemPrice)))), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
|
|
15531
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
15532
|
-
onClick: function onClick() {
|
|
15533
|
-
return onHandleClick(item.name);
|
|
15534
|
-
}
|
|
15535
|
-
}, "Buy")));
|
|
15536
|
-
};
|
|
15537
|
-
var MarketPlaceWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
15538
|
-
displayName: "MarketplaceRows__MarketPlaceWrapper",
|
|
15539
|
-
componentId: "sc-wmpr1o-0"
|
|
15540
|
-
})(["margin:auto;display:grid;grid-template-columns:35% 20% 20% 25%;&:hover{background-color:", ";}padding:0.5rem;p{font-size:0.8rem;}"], uiColors.darkGray);
|
|
15541
|
-
var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15542
|
-
displayName: "MarketplaceRows__ItemIconContainer",
|
|
15543
|
-
componentId: "sc-wmpr1o-1"
|
|
15544
|
-
})(["display:flex;justify-content:flex-start;align-items:center;"]);
|
|
15545
|
-
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15546
|
-
displayName: "MarketplaceRows__SpriteContainer",
|
|
15547
|
-
componentId: "sc-wmpr1o-2"
|
|
15548
|
-
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
15549
|
-
var Item$1 = /*#__PURE__*/styled.span.withConfig({
|
|
15550
|
-
displayName: "MarketplaceRows__Item",
|
|
15551
|
-
componentId: "sc-wmpr1o-3"
|
|
15552
|
-
})(["color:white;text-align:center;z-index:1;width:100%;"]);
|
|
15553
|
-
var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15554
|
-
displayName: "MarketplaceRows__TextOverlay",
|
|
15555
|
-
componentId: "sc-wmpr1o-4"
|
|
15556
|
-
})(["width:100%;position:relative;"]);
|
|
15557
|
-
var QuantityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15558
|
-
displayName: "MarketplaceRows__QuantityContainer",
|
|
15559
|
-
componentId: "sc-wmpr1o-5"
|
|
15560
|
-
})(["position:relative;display:flex;min-width:100px;justify-content:center;align-items:center;"]);
|
|
15561
|
-
var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
|
|
15562
|
-
displayName: "MarketplaceRows__QuantityDisplay",
|
|
15563
|
-
componentId: "sc-wmpr1o-6"
|
|
15564
|
-
})(["font-size:", ";"], uiFonts.size.small);
|
|
15565
|
-
var PriceValue = /*#__PURE__*/styled.div.withConfig({
|
|
15566
|
-
displayName: "MarketplaceRows__PriceValue",
|
|
15567
|
-
componentId: "sc-wmpr1o-7"
|
|
15568
|
-
})(["margin-left:40px;"]);
|
|
15569
|
-
var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
15570
|
-
displayName: "MarketplaceRows__ButtonContainer",
|
|
15571
|
-
componentId: "sc-wmpr1o-8"
|
|
15572
|
-
})(["margin:auto;"]);
|
|
15573
|
-
|
|
15574
|
-
var Marketplace = function Marketplace(_ref) {
|
|
15575
|
-
var items = _ref.items,
|
|
15576
|
-
atlasIMG = _ref.atlasIMG,
|
|
15577
|
-
atlasJSON = _ref.atlasJSON,
|
|
15578
|
-
onClose = _ref.onClose,
|
|
15579
|
-
optionsType = _ref.optionsType,
|
|
15580
|
-
optionsRarity = _ref.optionsRarity,
|
|
15581
|
-
optionsPrice = _ref.optionsPrice,
|
|
15582
|
-
onChangeType = _ref.onChangeType,
|
|
15583
|
-
onChangeRarity = _ref.onChangeRarity,
|
|
15584
|
-
onChangeOrder = _ref.onChangeOrder,
|
|
15585
|
-
onChangeNameInput = _ref.onChangeNameInput,
|
|
15179
|
+
atlasJSON = _ref.atlasJSON,
|
|
15180
|
+
onClose = _ref.onClose,
|
|
15181
|
+
optionsType = _ref.optionsType,
|
|
15182
|
+
optionsRarity = _ref.optionsRarity,
|
|
15183
|
+
optionsPrice = _ref.optionsPrice,
|
|
15184
|
+
onChangeType = _ref.onChangeType,
|
|
15185
|
+
onChangeRarity = _ref.onChangeRarity,
|
|
15186
|
+
onChangeOrder = _ref.onChangeOrder,
|
|
15187
|
+
onChangeNameInput = _ref.onChangeNameInput,
|
|
15586
15188
|
scale = _ref.scale,
|
|
15587
15189
|
equipmentSet = _ref.equipmentSet,
|
|
15588
15190
|
onHandleClick = _ref.onHandleClick;
|
|
@@ -15640,6 +15242,332 @@ var StyledDropdown = /*#__PURE__*/styled(Dropdown).withConfig({
|
|
|
15640
15242
|
componentId: "sc-h904b1-3"
|
|
15641
15243
|
})(["margin:3px !important;width:170px !important;"]);
|
|
15642
15244
|
|
|
15245
|
+
var img$5 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjc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
var ImgSide;
|
|
15250
|
+
(function (ImgSide) {
|
|
15251
|
+
ImgSide["right"] = "right";
|
|
15252
|
+
ImgSide["left"] = "left";
|
|
15253
|
+
})(ImgSide || (ImgSide = {}));
|
|
15254
|
+
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
15255
|
+
var _textAndTypeArray$sli;
|
|
15256
|
+
var _onClose = _ref.onClose,
|
|
15257
|
+
textAndTypeArray = _ref.textAndTypeArray;
|
|
15258
|
+
var _useState = useState(false),
|
|
15259
|
+
showGoNextIndicator = _useState[0],
|
|
15260
|
+
setShowGoNextIndicator = _useState[1];
|
|
15261
|
+
var _useState2 = useState(0),
|
|
15262
|
+
slide = _useState2[0],
|
|
15263
|
+
setSlide = _useState2[1];
|
|
15264
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
15265
|
+
if (event.code === 'Space') {
|
|
15266
|
+
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
15267
|
+
setSlide(function (prev) {
|
|
15268
|
+
return prev + 1;
|
|
15269
|
+
});
|
|
15270
|
+
} else {
|
|
15271
|
+
// if there's no more text chunks, close the dialog
|
|
15272
|
+
_onClose();
|
|
15273
|
+
}
|
|
15274
|
+
}
|
|
15275
|
+
};
|
|
15276
|
+
useEffect(function () {
|
|
15277
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
15278
|
+
return function () {
|
|
15279
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
15280
|
+
};
|
|
15281
|
+
}, [slide]);
|
|
15282
|
+
return React.createElement(RPGUIContainer, {
|
|
15283
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
15284
|
+
width: '50%',
|
|
15285
|
+
height: '180px'
|
|
15286
|
+
}, React.createElement(React.Fragment, null, React.createElement(Container$g, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer, {
|
|
15287
|
+
flex: '70%'
|
|
15288
|
+
}, React.createElement(NPCDialogText, {
|
|
15289
|
+
onStartStep: function onStartStep() {
|
|
15290
|
+
return setShowGoNextIndicator(false);
|
|
15291
|
+
},
|
|
15292
|
+
onEndStep: function onEndStep() {
|
|
15293
|
+
return setShowGoNextIndicator(true);
|
|
15294
|
+
},
|
|
15295
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
15296
|
+
onClose: function onClose() {
|
|
15297
|
+
if (_onClose) {
|
|
15298
|
+
_onClose();
|
|
15299
|
+
}
|
|
15300
|
+
}
|
|
15301
|
+
})), React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
15302
|
+
src: textAndTypeArray[slide].imagePath || img$5
|
|
15303
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
15304
|
+
right: '10.5rem',
|
|
15305
|
+
src: img$6
|
|
15306
|
+
})), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
15307
|
+
src: textAndTypeArray[slide].imagePath || img$5
|
|
15308
|
+
})), React.createElement(TextContainer, {
|
|
15309
|
+
flex: '70%'
|
|
15310
|
+
}, React.createElement(NPCDialogText, {
|
|
15311
|
+
onStartStep: function onStartStep() {
|
|
15312
|
+
return setShowGoNextIndicator(false);
|
|
15313
|
+
},
|
|
15314
|
+
onEndStep: function onEndStep() {
|
|
15315
|
+
return setShowGoNextIndicator(true);
|
|
15316
|
+
},
|
|
15317
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
15318
|
+
onClose: function onClose() {
|
|
15319
|
+
if (_onClose) {
|
|
15320
|
+
_onClose();
|
|
15321
|
+
}
|
|
15322
|
+
}
|
|
15323
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
15324
|
+
right: '1rem',
|
|
15325
|
+
src: img$6
|
|
15326
|
+
}))), ")"));
|
|
15327
|
+
};
|
|
15328
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
15329
|
+
displayName: "NPCMultiDialog__Container",
|
|
15330
|
+
componentId: "sc-rvu5wg-0"
|
|
15331
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
15332
|
+
var TextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15333
|
+
displayName: "NPCMultiDialog__TextContainer",
|
|
15334
|
+
componentId: "sc-rvu5wg-1"
|
|
15335
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
15336
|
+
var flex = _ref2.flex;
|
|
15337
|
+
return flex;
|
|
15338
|
+
});
|
|
15339
|
+
var ThumbnailContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15340
|
+
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
15341
|
+
componentId: "sc-rvu5wg-2"
|
|
15342
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
15343
|
+
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
15344
|
+
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
15345
|
+
componentId: "sc-rvu5wg-3"
|
|
15346
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
15347
|
+
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
15348
|
+
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
15349
|
+
componentId: "sc-rvu5wg-4"
|
|
15350
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
15351
|
+
var right = _ref3.right;
|
|
15352
|
+
return right;
|
|
15353
|
+
});
|
|
15354
|
+
|
|
15355
|
+
//@ts-ignore
|
|
15356
|
+
var useEventListener = function useEventListener(type, handler, el) {
|
|
15357
|
+
if (el === void 0) {
|
|
15358
|
+
el = window;
|
|
15359
|
+
}
|
|
15360
|
+
var savedHandler = React.useRef();
|
|
15361
|
+
React.useEffect(function () {
|
|
15362
|
+
savedHandler.current = handler;
|
|
15363
|
+
}, [handler]);
|
|
15364
|
+
React.useEffect(function () {
|
|
15365
|
+
//@ts-ignore
|
|
15366
|
+
var listener = function listener(e) {
|
|
15367
|
+
return savedHandler.current(e);
|
|
15368
|
+
};
|
|
15369
|
+
el.addEventListener(type, listener);
|
|
15370
|
+
return function () {
|
|
15371
|
+
el.removeEventListener(type, listener);
|
|
15372
|
+
};
|
|
15373
|
+
}, [type, el]);
|
|
15374
|
+
};
|
|
15375
|
+
|
|
15376
|
+
var DynamicText = function DynamicText(_ref) {
|
|
15377
|
+
var text = _ref.text,
|
|
15378
|
+
onFinish = _ref.onFinish,
|
|
15379
|
+
onStart = _ref.onStart;
|
|
15380
|
+
var _useState = useState(''),
|
|
15381
|
+
textState = _useState[0],
|
|
15382
|
+
setTextState = _useState[1];
|
|
15383
|
+
useEffect(function () {
|
|
15384
|
+
var i = 0;
|
|
15385
|
+
var interval = setInterval(function () {
|
|
15386
|
+
// on every interval, show one more character
|
|
15387
|
+
if (i === 0) {
|
|
15388
|
+
if (onStart) {
|
|
15389
|
+
onStart();
|
|
15390
|
+
}
|
|
15391
|
+
}
|
|
15392
|
+
if (i < text.length) {
|
|
15393
|
+
setTextState(text.substring(0, i + 1));
|
|
15394
|
+
i++;
|
|
15395
|
+
} else {
|
|
15396
|
+
clearInterval(interval);
|
|
15397
|
+
if (onFinish) {
|
|
15398
|
+
onFinish();
|
|
15399
|
+
}
|
|
15400
|
+
}
|
|
15401
|
+
}, 50);
|
|
15402
|
+
return function () {
|
|
15403
|
+
clearInterval(interval);
|
|
15404
|
+
};
|
|
15405
|
+
}, [text]);
|
|
15406
|
+
return React.createElement(TextContainer$1, null, textState);
|
|
15407
|
+
};
|
|
15408
|
+
var TextContainer$1 = /*#__PURE__*/styled.p.withConfig({
|
|
15409
|
+
displayName: "DynamicText__TextContainer",
|
|
15410
|
+
componentId: "sc-1ggl9nd-0"
|
|
15411
|
+
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
15412
|
+
|
|
15413
|
+
var QuestionDialog = function QuestionDialog(_ref) {
|
|
15414
|
+
var questions = _ref.questions,
|
|
15415
|
+
answers = _ref.answers,
|
|
15416
|
+
onClose = _ref.onClose;
|
|
15417
|
+
var _useState = useState(questions[0]),
|
|
15418
|
+
currentQuestion = _useState[0],
|
|
15419
|
+
setCurrentQuestion = _useState[1];
|
|
15420
|
+
var _useState2 = useState(false),
|
|
15421
|
+
canShowAnswers = _useState2[0],
|
|
15422
|
+
setCanShowAnswers = _useState2[1];
|
|
15423
|
+
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
15424
|
+
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
15425
|
+
return null;
|
|
15426
|
+
}
|
|
15427
|
+
var firstAnswerId = currentQuestion.answerIds[0];
|
|
15428
|
+
return answers.find(function (answer) {
|
|
15429
|
+
return answer.id === firstAnswerId;
|
|
15430
|
+
});
|
|
15431
|
+
};
|
|
15432
|
+
var _useState3 = useState(onGetFirstAnswer()),
|
|
15433
|
+
currentAnswer = _useState3[0],
|
|
15434
|
+
setCurrentAnswer = _useState3[1];
|
|
15435
|
+
useEffect(function () {
|
|
15436
|
+
setCurrentAnswer(onGetFirstAnswer());
|
|
15437
|
+
}, [currentQuestion]);
|
|
15438
|
+
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
15439
|
+
return answerIds.map(function (answerId) {
|
|
15440
|
+
return answers.find(function (answer) {
|
|
15441
|
+
return answer.id === answerId;
|
|
15442
|
+
});
|
|
15443
|
+
});
|
|
15444
|
+
};
|
|
15445
|
+
var onKeyPress = function onKeyPress(e) {
|
|
15446
|
+
switch (e.key) {
|
|
15447
|
+
case 'ArrowDown':
|
|
15448
|
+
// select next answer, if any.
|
|
15449
|
+
// if no next answer, select first answer
|
|
15450
|
+
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
15451
|
+
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
15452
|
+
// );
|
|
15453
|
+
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
15454
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
15455
|
+
});
|
|
15456
|
+
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
15457
|
+
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
15458
|
+
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
15459
|
+
});
|
|
15460
|
+
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
15461
|
+
break;
|
|
15462
|
+
case 'ArrowUp':
|
|
15463
|
+
// select previous answer, if any.
|
|
15464
|
+
// if no previous answer, select last answer
|
|
15465
|
+
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
15466
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
15467
|
+
});
|
|
15468
|
+
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
15469
|
+
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
15470
|
+
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
15471
|
+
});
|
|
15472
|
+
if (previousAnswer) {
|
|
15473
|
+
setCurrentAnswer(previousAnswer);
|
|
15474
|
+
} else {
|
|
15475
|
+
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
15476
|
+
}
|
|
15477
|
+
break;
|
|
15478
|
+
case 'Enter':
|
|
15479
|
+
setCanShowAnswers(false);
|
|
15480
|
+
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
15481
|
+
onClose();
|
|
15482
|
+
return;
|
|
15483
|
+
} else {
|
|
15484
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
15485
|
+
return question.id === currentAnswer.nextQuestionId;
|
|
15486
|
+
}));
|
|
15487
|
+
}
|
|
15488
|
+
break;
|
|
15489
|
+
}
|
|
15490
|
+
};
|
|
15491
|
+
useEventListener('keydown', onKeyPress);
|
|
15492
|
+
var onAnswerClick = function onAnswerClick(answer) {
|
|
15493
|
+
setCanShowAnswers(false);
|
|
15494
|
+
if (answer.nextQuestionId) {
|
|
15495
|
+
// if there is a next question, go to it
|
|
15496
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
15497
|
+
return question.id === answer.nextQuestionId;
|
|
15498
|
+
}));
|
|
15499
|
+
} else {
|
|
15500
|
+
// else, finish dialog!
|
|
15501
|
+
onClose();
|
|
15502
|
+
}
|
|
15503
|
+
};
|
|
15504
|
+
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
15505
|
+
var answerIds = currentQuestion.answerIds;
|
|
15506
|
+
if (!answerIds) {
|
|
15507
|
+
return null;
|
|
15508
|
+
}
|
|
15509
|
+
var answers = onGetAnswers(answerIds);
|
|
15510
|
+
if (!answers) {
|
|
15511
|
+
return null;
|
|
15512
|
+
}
|
|
15513
|
+
return answers.map(function (answer) {
|
|
15514
|
+
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
15515
|
+
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
15516
|
+
if (answer) {
|
|
15517
|
+
return React.createElement(AnswerRow, {
|
|
15518
|
+
key: "answer_" + answer.id
|
|
15519
|
+
}, React.createElement(AnswerSelectedIcon, {
|
|
15520
|
+
color: selectedColor
|
|
15521
|
+
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
15522
|
+
key: answer.id,
|
|
15523
|
+
onPointerDown: function onPointerDown() {
|
|
15524
|
+
return onAnswerClick(answer);
|
|
15525
|
+
},
|
|
15526
|
+
color: selectedColor
|
|
15527
|
+
}, answer.text));
|
|
15528
|
+
}
|
|
15529
|
+
return null;
|
|
15530
|
+
});
|
|
15531
|
+
};
|
|
15532
|
+
return React.createElement(Container$h, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
15533
|
+
text: currentQuestion.text,
|
|
15534
|
+
onStart: function onStart() {
|
|
15535
|
+
return setCanShowAnswers(false);
|
|
15536
|
+
},
|
|
15537
|
+
onFinish: function onFinish() {
|
|
15538
|
+
return setCanShowAnswers(true);
|
|
15539
|
+
}
|
|
15540
|
+
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
15541
|
+
};
|
|
15542
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
15543
|
+
displayName: "QuestionDialog__Container",
|
|
15544
|
+
componentId: "sc-bxc5u0-0"
|
|
15545
|
+
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
15546
|
+
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15547
|
+
displayName: "QuestionDialog__QuestionContainer",
|
|
15548
|
+
componentId: "sc-bxc5u0-1"
|
|
15549
|
+
})(["flex:100%;width:100%;"]);
|
|
15550
|
+
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15551
|
+
displayName: "QuestionDialog__AnswersContainer",
|
|
15552
|
+
componentId: "sc-bxc5u0-2"
|
|
15553
|
+
})(["flex:100%;"]);
|
|
15554
|
+
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
15555
|
+
displayName: "QuestionDialog__Answer",
|
|
15556
|
+
componentId: "sc-bxc5u0-3"
|
|
15557
|
+
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
15558
|
+
return props.color;
|
|
15559
|
+
});
|
|
15560
|
+
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
15561
|
+
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
15562
|
+
componentId: "sc-bxc5u0-4"
|
|
15563
|
+
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
15564
|
+
return props.color;
|
|
15565
|
+
});
|
|
15566
|
+
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
15567
|
+
displayName: "QuestionDialog__AnswerRow",
|
|
15568
|
+
componentId: "sc-bxc5u0-5"
|
|
15569
|
+
})(["display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:0.5rem;height:22px;p{line-height:unset;margin-top:0;margin-bottom:0rem;}"]);
|
|
15570
|
+
|
|
15643
15571
|
var ProgressBar = function ProgressBar(_ref) {
|
|
15644
15572
|
var max = _ref.max,
|
|
15645
15573
|
value = _ref.value,
|
|
@@ -15657,7 +15585,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
15657
15585
|
}
|
|
15658
15586
|
return value * 100 / max;
|
|
15659
15587
|
};
|
|
15660
|
-
return React.createElement(Container$
|
|
15588
|
+
return React.createElement(Container$i, {
|
|
15661
15589
|
className: "rpgui-progress",
|
|
15662
15590
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
15663
15591
|
"data-rpguitype": "progress",
|
|
@@ -15686,7 +15614,7 @@ var TextOverlay$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
15686
15614
|
displayName: "ProgressBar__TextOverlay",
|
|
15687
15615
|
componentId: "sc-qa6fzh-1"
|
|
15688
15616
|
})(["width:100%;position:relative;"]);
|
|
15689
|
-
var Container$
|
|
15617
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
15690
15618
|
displayName: "ProgressBar__Container",
|
|
15691
15619
|
componentId: "sc-qa6fzh-2"
|
|
15692
15620
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
|
|
@@ -15697,7 +15625,7 @@ var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
|
15697
15625
|
return props.style;
|
|
15698
15626
|
});
|
|
15699
15627
|
|
|
15700
|
-
var img$
|
|
15628
|
+
var img$7 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6Rwv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
|
|
15701
15629
|
|
|
15702
15630
|
var QuestInfo = function QuestInfo(_ref) {
|
|
15703
15631
|
var quests = _ref.quests,
|
|
@@ -15741,7 +15669,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
15741
15669
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
15742
15670
|
className: "drag-handler"
|
|
15743
15671
|
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
15744
|
-
src: quests[currentIndex].thumbnail || img$
|
|
15672
|
+
src: quests[currentIndex].thumbnail || img$7
|
|
15745
15673
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
15746
15674
|
className: "golden"
|
|
15747
15675
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[currentIndex].description)), React.createElement(QuestColumn, {
|
|
@@ -15760,7 +15688,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
15760
15688
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
15761
15689
|
className: "drag-handler"
|
|
15762
15690
|
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
15763
|
-
src: quests[0].thumbnail || img$
|
|
15691
|
+
src: quests[0].thumbnail || img$7
|
|
15764
15692
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
15765
15693
|
className: "golden"
|
|
15766
15694
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[0].description)), React.createElement(QuestColumn, {
|
|
@@ -15864,7 +15792,7 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
15864
15792
|
componentId: "sc-1a2vx6q-3"
|
|
15865
15793
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
15866
15794
|
|
|
15867
|
-
var InputRadio = function InputRadio(_ref) {
|
|
15795
|
+
var InputRadio$1 = function InputRadio(_ref) {
|
|
15868
15796
|
var name = _ref.name,
|
|
15869
15797
|
items = _ref.items,
|
|
15870
15798
|
onChange = _ref.onChange;
|
|
@@ -15951,9 +15879,7 @@ var Shortcuts = function Shortcuts(_ref) {
|
|
|
15951
15879
|
}
|
|
15952
15880
|
});
|
|
15953
15881
|
}
|
|
15954
|
-
var totalQty =
|
|
15955
|
-
return acc + ((item == null ? void 0 : item.stackQty) || 1);
|
|
15956
|
-
}, 0);
|
|
15882
|
+
var totalQty = _payload && inventory ? countItemFromInventory(_payload.key, inventory) : 0;
|
|
15957
15883
|
return React.createElement(StyledShortcut$1, {
|
|
15958
15884
|
key: i,
|
|
15959
15885
|
onPointerDown: onShortcutCast.bind(null, i),
|
|
@@ -16012,7 +15938,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
16012
15938
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
16013
15939
|
_ref$margin = _ref.margin,
|
|
16014
15940
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
16015
|
-
return React.createElement(Container$
|
|
15941
|
+
return React.createElement(Container$j, {
|
|
16016
15942
|
className: "simple-progress-bar"
|
|
16017
15943
|
}, React.createElement(ProgressBarContainer, {
|
|
16018
15944
|
margin: margin
|
|
@@ -16021,7 +15947,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
16021
15947
|
bgColor: bgColor
|
|
16022
15948
|
}))));
|
|
16023
15949
|
};
|
|
16024
|
-
var Container$
|
|
15950
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
16025
15951
|
displayName: "SimpleProgressBar__Container",
|
|
16026
15952
|
componentId: "sc-mbeil3-0"
|
|
16027
15953
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -16252,7 +16178,7 @@ var Spell = function Spell(_ref) {
|
|
|
16252
16178
|
isSettingShortcut = _ref.isSettingShortcut,
|
|
16253
16179
|
minMagicLevelRequired = _ref.minMagicLevelRequired;
|
|
16254
16180
|
var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
|
|
16255
|
-
return React.createElement(Container$
|
|
16181
|
+
return React.createElement(Container$k, {
|
|
16256
16182
|
disabled: disabled,
|
|
16257
16183
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
16258
16184
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
@@ -16265,7 +16191,7 @@ var Spell = function Spell(_ref) {
|
|
|
16265
16191
|
className: "mana"
|
|
16266
16192
|
}, manaCost)));
|
|
16267
16193
|
};
|
|
16268
|
-
var Container$
|
|
16194
|
+
var Container$k = /*#__PURE__*/styled.button.withConfig({
|
|
16269
16195
|
displayName: "Spell__Container",
|
|
16270
16196
|
componentId: "sc-j96fa2-0"
|
|
16271
16197
|
})(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;height:5rem;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) {
|
|
@@ -16352,7 +16278,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
16352
16278
|
height: "inherit",
|
|
16353
16279
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
16354
16280
|
scale: scale
|
|
16355
|
-
}, React.createElement(Container$
|
|
16281
|
+
}, React.createElement(Container$l, null, React.createElement(Title$7, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
16356
16282
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16357
16283
|
settingShortcutIndex: settingShortcutIndex,
|
|
16358
16284
|
shortcuts: shortcuts,
|
|
@@ -16384,7 +16310,7 @@ var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
|
16384
16310
|
displayName: "Spellbook__Title",
|
|
16385
16311
|
componentId: "sc-r02nfq-0"
|
|
16386
16312
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
16387
|
-
var Container$
|
|
16313
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
16388
16314
|
displayName: "Spellbook__Container",
|
|
16389
16315
|
componentId: "sc-r02nfq-1"
|
|
16390
16316
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -16398,16 +16324,16 @@ var TextArea = function TextArea(_ref) {
|
|
|
16398
16324
|
return React.createElement("textarea", Object.assign({}, props));
|
|
16399
16325
|
};
|
|
16400
16326
|
|
|
16401
|
-
var img$
|
|
16327
|
+
var img$8 = 'data:image/gif;base64,R0lGODlhTgBNAPMAAAAAALcIL7ObdNGqnf3vnP/wl93Goerfx/Xx3vr6+vn49QAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAAIf4gQ3JlYXRlZCB3aXRoIGV6Z2lmLmNvbSBHSUYgbWFrZXIALAAAAABOAE0AAAT/EMhJq7046827/2AojmRpnmiqrmzrvnAsz2tg37hNq7jg/0AfbjeyAQ3IpBIJ1BE5N99ySmUKbk9M4FftUn+BLMXoLXev4exWYG5/r8+te/5Nz+T0vBIu2w7+gIGCg4SFgXwvfoaLjIyILIqNkpOAjymRlAMFm5ybmZV2KHh0naWcepYlo22mradzqUUClK61nJSxIJiMrgm+v664oSKrXqa/yMmmbrkexVXHydK+y2bNULON0dPTppLXGs9UpdzlCaVt4FpsZuTm5ejWwx3iU53v753p89jtnPj49JVRZ2ELgoMHoP0DaE6gF4JjBByciCChEncMucV7yC+DQYoI/y8uzAjvFUddEkGGRHKPZMlN8lCqXGmgpctuJs90XDdzpc2bynJWgSjh40yLP4ECE1pHZs8DB5MqPcd0ClEARlVCjTpy6kadTrWC7KpU4NaDVndeyNqTa4GpSzedBblHbcGUbSmSddlprsokV7HizYtAKsO+hBEYCCw48UTD+RAnZsw2L0aApfy2pTw48eWGczX3ZNzYs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qP+/Pv48+vfz7+///8FAAbIXwIAOw==';
|
|
16406
16332
|
|
|
16407
16333
|
var DayNightPeriod = function DayNightPeriod(_ref) {
|
|
16408
16334
|
var _periodOfDaySrcFiles;
|
|
16409
16335
|
var periodOfDay = _ref.periodOfDay;
|
|
16410
|
-
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$
|
|
16336
|
+
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$9, _periodOfDaySrcFiles[PeriodOfDay.Afternoon] = img$8, _periodOfDaySrcFiles[PeriodOfDay.Night] = img$a, _periodOfDaySrcFiles);
|
|
16411
16337
|
return React.createElement(GifContainer, null, React.createElement("img", {
|
|
16412
16338
|
src: periodOfDaySrcFiles[periodOfDay]
|
|
16413
16339
|
}));
|
|
@@ -16417,7 +16343,7 @@ var GifContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
16417
16343
|
componentId: "sc-10t97fw-0"
|
|
16418
16344
|
})(["width:100%;img{width:67%;}"]);
|
|
16419
16345
|
|
|
16420
|
-
var img$
|
|
16346
|
+
var img$b = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAABHCAYAAAA0qHhdAAAAAXNSR0IArs4c6QAABGRJREFUeJztnb9PGzEUx7+JMjC0Uge6tVsVdTghQP0D2qgjzGz8D8woE2LO/5CNOcwlU9WJRCgDYmWJRAYkFgak6wDv5HPsO9/P8J79WUhicr7nzz3bOV8uHbRPXOXN2x++1LUfYnh4uu8AQK+FulLy7hbHxn96vrh22tjW0b7xPVtH+87bkMbnj1/jh6f7TqfBOmKgurwy6MJ10VRuKqNylwMl7wBy3U5WuetBOhg9om6ZSRaqEtvImJ2zRfL4/GA3eXy494LJzNwBmcpc//9w7wUAMJn1ktdt5bbnaj228qw6VeqWGbctUEXNxn40Fj+2/jn5lHpel8xUd+oqcedsUajum2HkNHEiqf1oDAD4/e1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ztljt2l/vRALNBl2q+y2Kj92pjTYaIDXWVZVruPree4nEJhqi6ppokGfhP6xr60VVr5O+AAAAAElFTkSuQmCC';
|
|
16421
16347
|
|
|
16422
16348
|
var TimeWidget = function TimeWidget(_ref) {
|
|
16423
16349
|
var onClose = _ref.onClose,
|
|
@@ -16435,7 +16361,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
16435
16361
|
var WidgetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16436
16362
|
displayName: "TimeWidget__WidgetContainer",
|
|
16437
16363
|
componentId: "sc-1ja236h-0"
|
|
16438
|
-
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$
|
|
16364
|
+
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$b);
|
|
16439
16365
|
var Time = /*#__PURE__*/styled.div.withConfig({
|
|
16440
16366
|
displayName: "TimeWidget__Time",
|
|
16441
16367
|
componentId: "sc-1ja236h-1"
|
|
@@ -16685,16 +16611,230 @@ var Truncate = function Truncate(_ref) {
|
|
|
16685
16611
|
var _ref$maxLines = _ref.maxLines,
|
|
16686
16612
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
16687
16613
|
children = _ref.children;
|
|
16688
|
-
return React.createElement(Container$
|
|
16614
|
+
return React.createElement(Container$m, {
|
|
16689
16615
|
maxLines: maxLines
|
|
16690
16616
|
}, children);
|
|
16691
16617
|
};
|
|
16692
|
-
var Container$
|
|
16618
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
16693
16619
|
displayName: "Truncate__Container",
|
|
16694
16620
|
componentId: "sc-6x00qb-0"
|
|
16695
16621
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
16696
16622
|
return props.maxLines;
|
|
16697
16623
|
});
|
|
16698
16624
|
|
|
16699
|
-
|
|
16625
|
+
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
16626
|
+
|
|
16627
|
+
var chunkString = function chunkString(str, length) {
|
|
16628
|
+
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
16629
|
+
};
|
|
16630
|
+
|
|
16631
|
+
var img$c = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAIzhI+py90Bg4OjDrjCELxfFQhQx0mIJkaeaYRp5LJADMdnqXbyOJLYTdKBejjZoRaZJBMFACH/C0ltYWdlTWFnaWNrDWdhbW1hPTAuNDU0NTUAIfkEARQAAAAsAAAAABAAEAAAAjKEj6nL7Y+CDE6OO+QKQ/ifKYEgfR4VddPohQe7lmR0xidNTib65uacYP2AQWGuMlEUAAA7';
|
|
16632
|
+
|
|
16633
|
+
var NPCDialogText = function NPCDialogText(_ref) {
|
|
16634
|
+
var text = _ref.text,
|
|
16635
|
+
onClose = _ref.onClose,
|
|
16636
|
+
onEndStep = _ref.onEndStep,
|
|
16637
|
+
onStartStep = _ref.onStartStep,
|
|
16638
|
+
type = _ref.type;
|
|
16639
|
+
var windowSize = useRef([window.innerWidth, window.innerHeight]);
|
|
16640
|
+
function maxCharacters(width) {
|
|
16641
|
+
// Set the font size to 16 pixels
|
|
16642
|
+
var fontSize = 11.2;
|
|
16643
|
+
// Calculate the number of characters that can fit in one line
|
|
16644
|
+
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
16645
|
+
// Calculate the number of lines that can fit in the div
|
|
16646
|
+
var linesPerDiv = Math.floor(180 / fontSize);
|
|
16647
|
+
// Calculate the maximum number of characters that can fit in the div
|
|
16648
|
+
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
16649
|
+
// Return the maximum number of characters
|
|
16650
|
+
return Math.round(maxCharacters / 5);
|
|
16651
|
+
}
|
|
16652
|
+
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
16653
|
+
var _useState = useState(0),
|
|
16654
|
+
chunkIndex = _useState[0],
|
|
16655
|
+
setChunkIndex = _useState[1];
|
|
16656
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
16657
|
+
if (event.code === 'Space') {
|
|
16658
|
+
goToNextStep();
|
|
16659
|
+
}
|
|
16660
|
+
};
|
|
16661
|
+
var goToNextStep = function goToNextStep() {
|
|
16662
|
+
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
16663
|
+
if (hasNextChunk) {
|
|
16664
|
+
setChunkIndex(function (prev) {
|
|
16665
|
+
return prev + 1;
|
|
16666
|
+
});
|
|
16667
|
+
} else {
|
|
16668
|
+
// if there's no more text chunks, close the dialog
|
|
16669
|
+
onClose();
|
|
16670
|
+
}
|
|
16671
|
+
};
|
|
16672
|
+
useEffect(function () {
|
|
16673
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
16674
|
+
return function () {
|
|
16675
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
16676
|
+
};
|
|
16677
|
+
}, [chunkIndex]);
|
|
16678
|
+
var _useState2 = useState(false),
|
|
16679
|
+
showGoNextIndicator = _useState2[0],
|
|
16680
|
+
setShowGoNextIndicator = _useState2[1];
|
|
16681
|
+
return React.createElement(Container$n, null, React.createElement(DynamicText, {
|
|
16682
|
+
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
16683
|
+
onFinish: function onFinish() {
|
|
16684
|
+
setShowGoNextIndicator(true);
|
|
16685
|
+
onEndStep && onEndStep();
|
|
16686
|
+
},
|
|
16687
|
+
onStart: function onStart() {
|
|
16688
|
+
setShowGoNextIndicator(false);
|
|
16689
|
+
onStartStep && onStartStep();
|
|
16690
|
+
}
|
|
16691
|
+
}), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
16692
|
+
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
16693
|
+
src: IS_MOBILE_OR_TABLET ? img$c : img$6,
|
|
16694
|
+
onPointerDown: function onPointerDown() {
|
|
16695
|
+
goToNextStep();
|
|
16696
|
+
}
|
|
16697
|
+
}));
|
|
16698
|
+
};
|
|
16699
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
16700
|
+
displayName: "NPCDialogText__Container",
|
|
16701
|
+
componentId: "sc-1cxkdh9-0"
|
|
16702
|
+
})([""]);
|
|
16703
|
+
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
16704
|
+
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
16705
|
+
componentId: "sc-1cxkdh9-1"
|
|
16706
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
16707
|
+
var right = _ref2.right;
|
|
16708
|
+
return right;
|
|
16709
|
+
});
|
|
16710
|
+
|
|
16711
|
+
var NPCDialogType;
|
|
16712
|
+
(function (NPCDialogType) {
|
|
16713
|
+
NPCDialogType["TextOnly"] = "TextOnly";
|
|
16714
|
+
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
16715
|
+
})(NPCDialogType || (NPCDialogType = {}));
|
|
16716
|
+
var NPCDialog = function NPCDialog(_ref) {
|
|
16717
|
+
var text = _ref.text,
|
|
16718
|
+
type = _ref.type,
|
|
16719
|
+
_onClose = _ref.onClose,
|
|
16720
|
+
imagePath = _ref.imagePath,
|
|
16721
|
+
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
16722
|
+
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
16723
|
+
questions = _ref.questions,
|
|
16724
|
+
answers = _ref.answers;
|
|
16725
|
+
return React.createElement(RPGUIContainer, {
|
|
16726
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
16727
|
+
width: isQuestionDialog ? '600px' : '80%',
|
|
16728
|
+
height: '180px'
|
|
16729
|
+
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
16730
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
16731
|
+
}, React.createElement(QuestionDialog, {
|
|
16732
|
+
questions: questions,
|
|
16733
|
+
answers: answers,
|
|
16734
|
+
onClose: function onClose() {
|
|
16735
|
+
if (_onClose) {
|
|
16736
|
+
_onClose();
|
|
16737
|
+
}
|
|
16738
|
+
}
|
|
16739
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
16740
|
+
src: imagePath || img$5
|
|
16741
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$o, null, React.createElement(TextContainer$2, {
|
|
16742
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
16743
|
+
}, React.createElement(NPCDialogText, {
|
|
16744
|
+
type: type,
|
|
16745
|
+
text: text || 'No text provided.',
|
|
16746
|
+
onClose: function onClose() {
|
|
16747
|
+
if (_onClose) {
|
|
16748
|
+
_onClose();
|
|
16749
|
+
}
|
|
16750
|
+
}
|
|
16751
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
16752
|
+
src: imagePath || img$5
|
|
16753
|
+
})))));
|
|
16754
|
+
};
|
|
16755
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
16756
|
+
displayName: "NPCDialog__Container",
|
|
16757
|
+
componentId: "sc-1b4aw74-0"
|
|
16758
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
16759
|
+
var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
16760
|
+
displayName: "NPCDialog__TextContainer",
|
|
16761
|
+
componentId: "sc-1b4aw74-1"
|
|
16762
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
16763
|
+
var flex = _ref2.flex;
|
|
16764
|
+
return flex;
|
|
16765
|
+
});
|
|
16766
|
+
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
16767
|
+
displayName: "NPCDialog__ThumbnailContainer",
|
|
16768
|
+
componentId: "sc-1b4aw74-2"
|
|
16769
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
16770
|
+
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
16771
|
+
displayName: "NPCDialog__NPCThumbnail",
|
|
16772
|
+
componentId: "sc-1b4aw74-3"
|
|
16773
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
16774
|
+
|
|
16775
|
+
var HistoryDialog = function HistoryDialog(_ref) {
|
|
16776
|
+
var backgroundImgPath = _ref.backgroundImgPath,
|
|
16777
|
+
fullCoverBackground = _ref.fullCoverBackground,
|
|
16778
|
+
questions = _ref.questions,
|
|
16779
|
+
answers = _ref.answers,
|
|
16780
|
+
text = _ref.text,
|
|
16781
|
+
imagePath = _ref.imagePath,
|
|
16782
|
+
textAndTypeArray = _ref.textAndTypeArray,
|
|
16783
|
+
onClose = _ref.onClose;
|
|
16784
|
+
var _useState = useState(0),
|
|
16785
|
+
img = _useState[0],
|
|
16786
|
+
setImage = _useState[1];
|
|
16787
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
16788
|
+
if (event.code === 'Space') {
|
|
16789
|
+
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
16790
|
+
setImage(function (prev) {
|
|
16791
|
+
return prev + 1;
|
|
16792
|
+
});
|
|
16793
|
+
} else {
|
|
16794
|
+
// if there's no more text chunks, close the dialog
|
|
16795
|
+
onClose();
|
|
16796
|
+
}
|
|
16797
|
+
}
|
|
16798
|
+
};
|
|
16799
|
+
useEffect(function () {
|
|
16800
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
16801
|
+
return function () {
|
|
16802
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
16803
|
+
};
|
|
16804
|
+
}, [backgroundImgPath]);
|
|
16805
|
+
return React.createElement(BackgroundContainer, {
|
|
16806
|
+
imgPath: backgroundImgPath[img],
|
|
16807
|
+
fullImg: fullCoverBackground
|
|
16808
|
+
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
16809
|
+
textAndTypeArray: textAndTypeArray,
|
|
16810
|
+
onClose: onClose
|
|
16811
|
+
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
16812
|
+
questions: questions,
|
|
16813
|
+
answers: answers,
|
|
16814
|
+
onClose: onClose
|
|
16815
|
+
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
16816
|
+
text: text,
|
|
16817
|
+
imagePath: imagePath,
|
|
16818
|
+
onClose: onClose,
|
|
16819
|
+
type: NPCDialogType.TextAndThumbnail
|
|
16820
|
+
}) : React.createElement(NPCDialog, {
|
|
16821
|
+
text: text,
|
|
16822
|
+
onClose: onClose,
|
|
16823
|
+
type: NPCDialogType.TextOnly
|
|
16824
|
+
})));
|
|
16825
|
+
};
|
|
16826
|
+
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16827
|
+
displayName: "HistoryDialog__BackgroundContainer",
|
|
16828
|
+
componentId: "sc-u6oe75-0"
|
|
16829
|
+
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
16830
|
+
return props.imgPath;
|
|
16831
|
+
}, function (props) {
|
|
16832
|
+
return props.imgPath ? 'cover' : 'auto';
|
|
16833
|
+
});
|
|
16834
|
+
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16835
|
+
displayName: "HistoryDialog__DialogContainer",
|
|
16836
|
+
componentId: "sc-u6oe75-1"
|
|
16837
|
+
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
16838
|
+
|
|
16839
|
+
export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, rarityColor, useEventListener };
|
|
16700
16840
|
//# sourceMappingURL=long-bow.esm.js.map
|