@rpg-engine/long-bow 0.8.21 → 0.8.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/components/InformationCenter/InformationCenter.d.ts +16 -13
  2. package/dist/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.d.ts +1 -1
  3. package/dist/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.d.ts +2 -1
  4. package/dist/components/InformationCenter/sections/bestiary/InformationCenterNPCTooltip.d.ts +1 -1
  5. package/dist/components/InformationCenter/sections/faq/InformationCenterFaqSection.d.ts +1 -1
  6. package/dist/components/InformationCenter/sections/items/InformationCenterItemDetails.d.ts +1 -1
  7. package/dist/components/InformationCenter/sections/items/InformationCenterItemTooltip.d.ts +1 -1
  8. package/dist/components/InformationCenter/sections/items/InformationCenterItemsSection.d.ts +2 -1
  9. package/dist/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.d.ts +1 -1
  10. package/dist/long-bow.cjs.development.js +788 -687
  11. package/dist/long-bow.cjs.development.js.map +1 -1
  12. package/dist/long-bow.cjs.production.min.js +1 -1
  13. package/dist/long-bow.cjs.production.min.js.map +1 -1
  14. package/dist/long-bow.esm.js +789 -688
  15. package/dist/long-bow.esm.js.map +1 -1
  16. package/dist/mocks/informationCenter.mocks.d.ts +1 -2
  17. package/package.json +2 -2
  18. package/src/components/CraftBook/CraftBook.tsx +1 -1
  19. package/src/components/Dropdown.tsx +25 -3
  20. package/src/components/InformationCenter/InformationCenter.tsx +125 -124
  21. package/src/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.tsx +52 -7
  22. package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.tsx +201 -207
  23. package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCTooltip.tsx +7 -6
  24. package/src/components/InformationCenter/sections/faq/InformationCenterFaqSection.tsx +1 -1
  25. package/src/components/InformationCenter/sections/items/InformationCenterItemDetails.tsx +8 -6
  26. package/src/components/InformationCenter/sections/items/InformationCenterItemTooltip.tsx +1 -1
  27. package/src/components/InformationCenter/sections/items/InformationCenterItemsSection.tsx +36 -10
  28. package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx +133 -34
  29. package/src/mocks/informationCenter.mocks.ts +158 -47
  30. package/src/stories/UI/info/InformationCenter.stories.tsx +1 -1
  31. package/dist/components/InformationCenter/InformationCenterTypes.d.ts +0 -96
  32. package/src/components/InformationCenter/InformationCenterTypes.ts +0 -105
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Component, useRef, useCallback, useContext,
2
2
  import styled, { css, keyframes } from 'styled-components';
3
3
  import { BeatLoader } from 'react-spinners';
4
4
  import { v4 } from 'uuid';
5
- import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, isMobile, ItemSlotType, isMobileOrTablet, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
5
+ import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, isMobile, ItemSlotType, isMobileOrTablet, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
6
6
  import dayjs from 'dayjs';
7
7
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
8
8
  import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaChevronUp, FaChevronDown, FaReddit } from 'react-icons/fa';
@@ -27398,6 +27398,9 @@ var Icon = /*#__PURE__*/styled.img.withConfig({
27398
27398
  return width;
27399
27399
  });
27400
27400
 
27401
+ var ITEM_HEIGHT = 35;
27402
+ var MAX_ITEMS_VISIBLE = 10;
27403
+ var MAX_HEIGHT = MAX_ITEMS_VISIBLE * ITEM_HEIGHT;
27401
27404
  var Dropdown = function Dropdown(_ref) {
27402
27405
  var options = _ref.options,
27403
27406
  width = _ref.width,
@@ -27450,7 +27453,8 @@ var Dropdown = function Dropdown(_ref) {
27450
27453
  }, React.createElement("label", null, "\u25BC"), " ", selectedOption), React.createElement(DropdownOptions$1, {
27451
27454
  className: "rpgui-dropdown-imp",
27452
27455
  opened: opened,
27453
- opensUp: opensUp
27456
+ opensUp: opensUp,
27457
+ optionsCount: options.length
27454
27458
  }, options.map(function (option) {
27455
27459
  return React.createElement("li", {
27456
27460
  key: option.id,
@@ -27465,23 +27469,25 @@ var Dropdown = function Dropdown(_ref) {
27465
27469
  var Container$8 = /*#__PURE__*/styled.div.withConfig({
27466
27470
  displayName: "Dropdown__Container",
27467
27471
  componentId: "sc-8arn65-0"
27468
- })(["position:relative;width:", ";"], function (props) {
27472
+ })(["position:relative;width:", ";max-height:", "px;"], function (props) {
27469
27473
  return props.width || '100%';
27470
- });
27474
+ }, MAX_HEIGHT);
27471
27475
  var DropdownSelect$1 = /*#__PURE__*/styled.p.withConfig({
27472
27476
  displayName: "Dropdown__DropdownSelect",
27473
27477
  componentId: "sc-8arn65-1"
27474
- })(["width:100%;box-sizing:border-box;label{display:inline-block;transform:translateY(-2px);}"]);
27478
+ })(["width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:", "px;label{display:inline-block;transform:translateY(-2px);}"], ITEM_HEIGHT);
27475
27479
  var DropdownOptions$1 = /*#__PURE__*/styled.ul.withConfig({
27476
27480
  displayName: "Dropdown__DropdownOptions",
27477
27481
  componentId: "sc-8arn65-2"
27478
- })(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;bottom:", ";top:", ";margin:0;padding:0;@media (max-width:768px){padding:8px 0;}"], function (props) {
27482
+ })(["position:absolute;width:100%;max-height:", ";overflow-y:auto;display:", ";box-sizing:border-box;bottom:", ";top:", ";margin:0;padding:0;li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px 12px;min-height:", "px;max-height:", "px;box-sizing:border-box;line-height:1.2;}"], function (props) {
27483
+ return props.opened ? Math.min(props.optionsCount * ITEM_HEIGHT, MAX_HEIGHT) + "px" : '0';
27484
+ }, function (props) {
27479
27485
  return props.opened ? 'block' : 'none';
27480
27486
  }, function (props) {
27481
27487
  return props.opensUp ? '100%' : 'auto';
27482
27488
  }, function (props) {
27483
27489
  return props.opensUp ? 'auto' : '100%';
27484
- });
27490
+ }, ITEM_HEIGHT, ITEM_HEIGHT);
27485
27491
 
27486
27492
  var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
27487
27493
  var ModalPortal = function ModalPortal(_ref) {
@@ -29131,7 +29137,7 @@ var SearchContainer$1 = /*#__PURE__*/styled.div.withConfig({
29131
29137
  var ContentContainer = /*#__PURE__*/styled.div.withConfig({
29132
29138
  displayName: "CraftBook__ContentContainer",
29133
29139
  componentId: "sc-19q95ue-7"
29134
- })(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:250px;overflow:hidden;"]);
29140
+ })(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:300px;overflow:hidden;"]);
29135
29141
  var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
29136
29142
  displayName: "CraftBook__RadioInputScroller",
29137
29143
  componentId: "sc-19q95ue-8"
@@ -31180,226 +31186,157 @@ var SpriteContainer$2 = /*#__PURE__*/styled.div.withConfig({
31180
31186
  componentId: "sc-1vguuz8-7"
31181
31187
  })(["width:64px;height:64px;background:rgba(0,0,0,0.3);border-radius:4px;display:flex;justify-content:center;align-items:center;position:relative;.sprite-from-atlas-img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(2);transform-origin:center;}"]);
31182
31188
 
31183
- var ITEMS_PER_PAGE$1 = 5;
31184
- var formatItemName = function formatItemName(itemPath) {
31185
- var _itemPath$split$pop;
31186
- var cleanText = ((_itemPath$split$pop = itemPath.split('/').pop()) == null ? void 0 : _itemPath$split$pop.split('.').shift()) || '';
31187
- return cleanText.split('-').map(function (word) {
31188
- return word.charAt(0).toUpperCase() + word.slice(1);
31189
- }).join(' ');
31190
- };
31191
- var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31192
- var _npc$loots, _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
31193
- var npc = _ref.npc,
31189
+ var InformationCenterItemDetails = function InformationCenterItemDetails(_ref) {
31190
+ var item = _ref.item,
31194
31191
  itemsAtlasJSON = _ref.itemsAtlasJSON,
31195
31192
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31196
- entitiesAtlasJSON = _ref.entitiesAtlasJSON,
31197
- entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31198
- iconAtlasIMG = _ref.iconAtlasIMG,
31199
- iconAtlasJSON = _ref.iconAtlasJSON,
31193
+ droppedBy = _ref.droppedBy,
31200
31194
  onBack = _ref.onBack;
31201
31195
  var isMobile = isMobileOrTablet();
31202
- var _useState = useState(''),
31203
- lootSearchQuery = _useState[0],
31204
- setLootSearchQuery = _useState[1];
31205
- var _useState2 = useState(1),
31206
- currentLootPage = _useState2[0],
31207
- setCurrentLootPage = _useState2[1];
31208
- var formatText = function formatText(text) {
31209
- if (typeof text === 'number') {
31210
- return text.toString();
31211
- }
31212
- return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ');
31196
+ var renderAllowedSlots = function renderAllowedSlots() {
31197
+ var _item$allowedEquipSlo;
31198
+ if (!((_item$allowedEquipSlo = item.allowedEquipSlotType) != null && _item$allowedEquipSlo.length)) return null;
31199
+ return React.createElement(InfoItem, null, React.createElement(Label, null, "Equip Slots:"), React.createElement(Value, null, item.allowedEquipSlotType.join(', ')));
31213
31200
  };
31214
- var formatRarity = function formatRarity(rarity) {
31215
- switch (rarity) {
31216
- case 0.5:
31217
- return 'Very Rare';
31218
- case 1:
31219
- return 'Rare';
31220
- case 10:
31221
- return 'Uncommon';
31222
- case 15:
31223
- return 'Semi Common';
31224
- case 20:
31225
- return 'Common';
31226
- case 35:
31227
- return 'Very Common';
31228
- default:
31229
- return 'Unknown';
31230
- }
31201
+ var renderRequirements = function renderRequirements() {
31202
+ if (!item.minRequirements) return null;
31203
+ return React.createElement(StyledCollapsible, {
31204
+ title: "Requirements",
31205
+ defaultOpen: !isMobile
31206
+ }, React.createElement(RequirementsGrid, null, item.minRequirements.level && React.createElement(RequirementItem, null, React.createElement(Label, null, "Level:"), React.createElement(Value, null, item.minRequirements.level)), item.minRequirements.skill && React.createElement(RequirementItem, null, React.createElement(Label, null, item.minRequirements.skill.name, ":"), React.createElement(Value, null, item.minRequirements.skill.level))));
31231
31207
  };
31232
- var filteredLoots = ((_npc$loots = npc.loots) == null ? void 0 : _npc$loots.filter(function (loot) {
31233
- return formatItemName(loot.itemBlueprintKey).toLowerCase().includes(lootSearchQuery.toLowerCase());
31234
- })) || [];
31235
- var totalLootPages = Math.ceil(filteredLoots.length / ITEMS_PER_PAGE$1);
31236
- var paginatedLoots = filteredLoots.slice((currentLootPage - 1) * ITEMS_PER_PAGE$1, currentLootPage * ITEMS_PER_PAGE$1);
31237
31208
  return React.createElement(BaseInformationDetails, {
31238
- name: npc.name,
31239
- spriteKey: npc.key,
31240
- atlasJSON: entitiesAtlasJSON,
31241
- atlasIMG: entitiesAtlasIMG,
31209
+ name: item.name,
31210
+ spriteKey: item.texturePath,
31211
+ atlasJSON: itemsAtlasJSON,
31212
+ atlasIMG: itemsAtlasIMG,
31242
31213
  onBack: onBack
31243
- }, React.createElement(InfoSection, null, React.createElement(InfoItem, null, React.createElement(Label, null, "Type:"), React.createElement(Value, null, formatText(npc.subType))), React.createElement(InfoItem, null, React.createElement(Label, null, "Alignment:"), React.createElement(Value, null, formatText(npc.alignment))), React.createElement(InfoItem, null, React.createElement(Label, null, "Attack Type:"), React.createElement(Value, null, formatText(npc.attackType))), React.createElement(InfoItem, null, React.createElement(Label, null, "Range:"), React.createElement(Value, null, formatText(npc.maxRangeAttack))), React.createElement(InfoItem, null, React.createElement(Label, null, "Speed:"), React.createElement(Value, null, formatText(npc.speed)))), React.createElement(StyledCollapsible, {
31244
- title: "Stats",
31214
+ }, React.createElement(InfoSection, null, React.createElement(InfoItem, null, React.createElement(Label, null, "Type:"), React.createElement(Value, null, item.type)), React.createElement(InfoItem, null, React.createElement(Label, null, "Subtype:"), React.createElement(Value, null, item.subType)), React.createElement(InfoItem, null, React.createElement(Label, null, "Tier:"), React.createElement(Value, null, item.tier)), React.createElement(InfoItem, null, React.createElement(Label, null, "Rarity:"), React.createElement(Value, null, item.rarity)), renderAllowedSlots()), React.createElement(StyledCollapsible, {
31215
+ title: "Description",
31245
31216
  defaultOpen: !isMobile
31246
- }, React.createElement(StatGrid, null, React.createElement(StatItem, null, "HP: ", npc.baseHealth), React.createElement(StatItem, null, "Level: ", npc.skills.level), ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) && React.createElement(StatItem, null, "Strength: ", npc.skills.strength.level), ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) && React.createElement(StatItem, null, "Dexterity: ", npc.skills.dexterity.level), ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) && React.createElement(StatItem, null, "Resistance: ", npc.skills.resistance.level))), npc.loots && npc.loots.length > 0 && React.createElement(StyledCollapsible, {
31247
- title: "Loot",
31217
+ }, React.createElement(Description$2, null, item.description || 'No description available.')), React.createElement(StyledCollapsible, {
31218
+ title: "Stats",
31248
31219
  defaultOpen: !isMobile
31249
- }, React.createElement(LootSearchContainer, null, React.createElement(StyledSearchBar$1, {
31250
- value: lootSearchQuery,
31251
- onChange: setLootSearchQuery,
31252
- placeholder: "Search loot..."
31253
- })), React.createElement(LootGrid, null, paginatedLoots.map(function (loot, index) {
31254
- return React.createElement(LootItem, {
31255
- key: index
31256
- }, React.createElement(SpriteFromAtlas, {
31257
- atlasJSON: itemsAtlasJSON,
31258
- atlasIMG: itemsAtlasIMG,
31259
- spriteKey: loot.itemBlueprintKey,
31260
- width: 24,
31261
- height: 24,
31262
- imgScale: 1
31263
- }), React.createElement(LootDetails, null, React.createElement(LootName, null, formatItemName(loot.itemBlueprintKey)), React.createElement(LootInfo, null, React.createElement(LootChance, null, formatRarity(loot.chance)), loot.quantityRange && React.createElement(LootQuantity, null, "x", loot.quantityRange[0], "-", loot.quantityRange[1]))));
31264
- })), filteredLoots.length > ITEMS_PER_PAGE$1 && React.createElement(PaginationContainer$2, null, React.createElement(StyledPagination, {
31265
- currentPage: currentLootPage,
31266
- totalPages: totalLootPages,
31267
- onPageChange: setCurrentLootPage
31268
- }))), npc.entityEffects && npc.entityEffects.length > 0 && React.createElement(StyledCollapsible, {
31220
+ }, React.createElement(StatGrid, null, React.createElement(StatItem, null, "Weight: ", item.weight), React.createElement(StatItem, null, "Stack Size: ", item.maxStackSize), item.rangeType && React.createElement(StatItem, null, "Range Type: ", item.rangeType), item.basePrice > 0 && React.createElement(StatItem, null, "Base Price: ", item.basePrice))), renderRequirements(), item.entityEffects && item.entityEffects.length > 0 && React.createElement(StyledCollapsible, {
31269
31221
  title: "Effects",
31270
31222
  defaultOpen: !isMobile
31271
- }, React.createElement(EffectsList, null, npc.entityEffects.map(function (effect, index) {
31223
+ }, React.createElement(EffectsList, null, item.entityEffects.map(function (effect, index) {
31272
31224
  return React.createElement(EffectItem, {
31273
31225
  key: index
31274
- }, formatText(effect));
31275
- }))), npc.areaSpells && npc.areaSpells.length > 0 && React.createElement(StyledCollapsible, {
31276
- title: "Spells",
31226
+ }, effect, item.entityEffectChance && React.createElement(EffectChance, null, "(", item.entityEffectChance, "%)"));
31227
+ })), item.usableEffectDescription && React.createElement(EffectDescription, null, item.usableEffectDescription)), item.equippedBuff && item.equippedBuff.length > 0 && React.createElement(StyledCollapsible, {
31228
+ title: "Equipped Buffs",
31277
31229
  defaultOpen: !isMobile
31278
- }, React.createElement(SpellsList, null, npc.areaSpells.map(function (spell, index) {
31279
- return React.createElement(SpellItem, {
31230
+ }, React.createElement(BuffsList, null, item.equippedBuff.map(function (buff, index) {
31231
+ return React.createElement(BuffItem, {
31280
31232
  key: index
31281
- }, React.createElement(SpellIconContainer, null, React.createElement(SpriteFromAtlas, {
31282
- atlasJSON: iconAtlasJSON,
31283
- atlasIMG: iconAtlasIMG,
31284
- spriteKey: spell.texturePath || spell.spellKey,
31285
- width: 24,
31286
- height: 24,
31287
- imgScale: 1
31288
- })), React.createElement(SpellContent, null, React.createElement(SpellName, null, formatText(spell.spellKey)), React.createElement(SpellDetails, null, "Power:", ' ', React.createElement(SpellValue, null, formatText(spell.power)), React.createElement(Separator, null, "\u2022"), "Chance: ", React.createElement(SpellValue, null, spell.probability, "%"))));
31233
+ }, React.createElement(BuffName, null, buff.trait.replace(/^\w/, function (c) {
31234
+ return c.toUpperCase();
31235
+ })), React.createElement(BuffValue, null, "+", buff.buffPercentage, "%"));
31236
+ })), item.equippedBuffDescription && React.createElement(BuffDescription, null, item.equippedBuffDescription)), droppedBy.length > 0 && React.createElement(StyledCollapsible, {
31237
+ title: "Dropped By",
31238
+ defaultOpen: !isMobile
31239
+ }, React.createElement(DropList, null, droppedBy.map(function (npc) {
31240
+ var loot = npc.loots.find(function (l) {
31241
+ return l.itemBlueprintKey === item.key;
31242
+ });
31243
+ return React.createElement(DropItem, {
31244
+ key: npc.id
31245
+ }, React.createElement(NPCName, null, npc.name), React.createElement(DropRate, null, loot == null ? void 0 : loot.chance, "%"));
31289
31246
  }))));
31290
31247
  };
31291
31248
  var InfoSection = /*#__PURE__*/styled.div.withConfig({
31292
- displayName: "InformationCenterNPCDetails__InfoSection",
31293
- componentId: "sc-fdu3xl-0"
31249
+ displayName: "InformationCenterItemDetails__InfoSection",
31250
+ componentId: "sc-zwf6pb-0"
31294
31251
  })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;background:rgba(255,255,255,0.05);padding:12px;border-radius:4px;"]);
31295
31252
  var InfoItem = /*#__PURE__*/styled.div.withConfig({
31296
- displayName: "InformationCenterNPCDetails__InfoItem",
31297
- componentId: "sc-fdu3xl-1"
31253
+ displayName: "InformationCenterItemDetails__InfoItem",
31254
+ componentId: "sc-zwf6pb-1"
31298
31255
  })(["display:flex;align-items:center;gap:8px;"]);
31299
31256
  var Label = /*#__PURE__*/styled.span.withConfig({
31300
- displayName: "InformationCenterNPCDetails__Label",
31301
- componentId: "sc-fdu3xl-2"
31257
+ displayName: "InformationCenterItemDetails__Label",
31258
+ componentId: "sc-zwf6pb-2"
31302
31259
  })(["color:", ";font-size:0.5rem;opacity:0.8;"], uiColors.yellow);
31303
31260
  var Value = /*#__PURE__*/styled.span.withConfig({
31304
- displayName: "InformationCenterNPCDetails__Value",
31305
- componentId: "sc-fdu3xl-3"
31261
+ displayName: "InformationCenterItemDetails__Value",
31262
+ componentId: "sc-zwf6pb-3"
31306
31263
  })(["color:", ";font-size:0.5rem;"], uiColors.white);
31307
31264
  var StyledCollapsible = /*#__PURE__*/styled(Collapsible).withConfig({
31308
- displayName: "InformationCenterNPCDetails__StyledCollapsible",
31309
- componentId: "sc-fdu3xl-4"
31265
+ displayName: "InformationCenterItemDetails__StyledCollapsible",
31266
+ componentId: "sc-zwf6pb-4"
31310
31267
  })(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:hidden;"]);
31268
+ var Description$2 = /*#__PURE__*/styled.p.withConfig({
31269
+ displayName: "InformationCenterItemDetails__Description",
31270
+ componentId: "sc-zwf6pb-5"
31271
+ })(["color:", ";font-size:0.5rem;margin:0;padding:12px;line-height:1.5;"], uiColors.white);
31311
31272
  var StatGrid = /*#__PURE__*/styled.div.withConfig({
31312
- displayName: "InformationCenterNPCDetails__StatGrid",
31313
- componentId: "sc-fdu3xl-5"
31273
+ displayName: "InformationCenterItemDetails__StatGrid",
31274
+ componentId: "sc-zwf6pb-6"
31314
31275
  })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
31315
31276
  var StatItem = /*#__PURE__*/styled.div.withConfig({
31316
- displayName: "InformationCenterNPCDetails__StatItem",
31317
- componentId: "sc-fdu3xl-6"
31277
+ displayName: "InformationCenterItemDetails__StatItem",
31278
+ componentId: "sc-zwf6pb-7"
31318
31279
  })(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"], uiColors.white);
31319
31280
  var EffectsList = /*#__PURE__*/styled.div.withConfig({
31320
- displayName: "InformationCenterNPCDetails__EffectsList",
31321
- componentId: "sc-fdu3xl-7"
31281
+ displayName: "InformationCenterItemDetails__EffectsList",
31282
+ componentId: "sc-zwf6pb-8"
31322
31283
  })(["display:flex;flex-wrap:wrap;gap:8px;padding:12px;"]);
31323
31284
  var EffectItem = /*#__PURE__*/styled.div.withConfig({
31324
- displayName: "InformationCenterNPCDetails__EffectItem",
31325
- componentId: "sc-fdu3xl-8"
31326
- })(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
31327
- var SpellsList = /*#__PURE__*/styled.div.withConfig({
31328
- displayName: "InformationCenterNPCDetails__SpellsList",
31329
- componentId: "sc-fdu3xl-9"
31285
+ displayName: "InformationCenterItemDetails__EffectItem",
31286
+ componentId: "sc-zwf6pb-9"
31287
+ })(["display:flex;align-items:center;gap:4px;color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
31288
+ var EffectChance = /*#__PURE__*/styled.span.withConfig({
31289
+ displayName: "InformationCenterItemDetails__EffectChance",
31290
+ componentId: "sc-zwf6pb-10"
31291
+ })(["color:", ";opacity:0.8;"], uiColors.yellow);
31292
+ var BuffsList = /*#__PURE__*/styled.div.withConfig({
31293
+ displayName: "InformationCenterItemDetails__BuffsList",
31294
+ componentId: "sc-zwf6pb-11"
31330
31295
  })(["display:flex;flex-direction:column;gap:8px;padding:12px;"]);
31331
- var SpellIconContainer = /*#__PURE__*/styled.div.withConfig({
31332
- displayName: "InformationCenterNPCDetails__SpellIconContainer",
31333
- componentId: "sc-fdu3xl-10"
31334
- })(["display:flex;padding-right:30px;padding-bottom:30px;"]);
31335
- var SpellContent = /*#__PURE__*/styled.div.withConfig({
31336
- displayName: "InformationCenterNPCDetails__SpellContent",
31337
- componentId: "sc-fdu3xl-11"
31338
- })(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
31339
- var SpellItem = /*#__PURE__*/styled.div.withConfig({
31340
- displayName: "InformationCenterNPCDetails__SpellItem",
31341
- componentId: "sc-fdu3xl-12"
31342
- })(["display:flex;gap:8px;background:rgba(255,255,255,0.05);padding:8px;padding-left:10px;border-radius:4px;align-items:center;"]);
31343
- var SpellName = /*#__PURE__*/styled.div.withConfig({
31344
- displayName: "InformationCenterNPCDetails__SpellName",
31345
- componentId: "sc-fdu3xl-13"
31296
+ var BuffItem = /*#__PURE__*/styled.div.withConfig({
31297
+ displayName: "InformationCenterItemDetails__BuffItem",
31298
+ componentId: "sc-zwf6pb-12"
31299
+ })(["display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31300
+ var BuffName = /*#__PURE__*/styled.span.withConfig({
31301
+ displayName: "InformationCenterItemDetails__BuffName",
31302
+ componentId: "sc-zwf6pb-13"
31303
+ })(["color:", ";font-size:0.5rem;"], uiColors.white);
31304
+ var BuffValue = /*#__PURE__*/styled.span.withConfig({
31305
+ displayName: "InformationCenterItemDetails__BuffValue",
31306
+ componentId: "sc-zwf6pb-14"
31346
31307
  })(["color:", ";font-size:0.5rem;"], uiColors.yellow);
31347
- var SpellDetails = /*#__PURE__*/styled.div.withConfig({
31348
- displayName: "InformationCenterNPCDetails__SpellDetails",
31349
- componentId: "sc-fdu3xl-14"
31350
- })(["display:flex;align-items:center;gap:8px;color:", ";font-size:0.45rem;opacity:0.8;"], uiColors.white);
31351
- var SpellValue = /*#__PURE__*/styled.span.withConfig({
31352
- displayName: "InformationCenterNPCDetails__SpellValue",
31353
- componentId: "sc-fdu3xl-15"
31354
- })(["color:", ";"], uiColors.yellow);
31355
- var Separator = /*#__PURE__*/styled.span.withConfig({
31356
- displayName: "InformationCenterNPCDetails__Separator",
31357
- componentId: "sc-fdu3xl-16"
31358
- })(["color:", ";opacity:0.5;"], uiColors.yellow);
31359
- var LootSearchContainer = /*#__PURE__*/styled.div.withConfig({
31360
- displayName: "InformationCenterNPCDetails__LootSearchContainer",
31361
- componentId: "sc-fdu3xl-17"
31362
- })(["padding:12px 12px 0;"]);
31363
- var StyledSearchBar$1 = /*#__PURE__*/styled(SearchBar).withConfig({
31364
- displayName: "InformationCenterNPCDetails__StyledSearchBar",
31365
- componentId: "sc-fdu3xl-18"
31366
- })(["width:100%;"]);
31367
- var LootGrid = /*#__PURE__*/styled.div.withConfig({
31368
- displayName: "InformationCenterNPCDetails__LootGrid",
31369
- componentId: "sc-fdu3xl-19"
31370
- })(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
31371
- var LootItem = /*#__PURE__*/styled.div.withConfig({
31372
- displayName: "InformationCenterNPCDetails__LootItem",
31373
- componentId: "sc-fdu3xl-20"
31374
- })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31375
- var LootDetails = /*#__PURE__*/styled.div.withConfig({
31376
- displayName: "InformationCenterNPCDetails__LootDetails",
31377
- componentId: "sc-fdu3xl-21"
31378
- })(["flex:1;display:flex;flex-direction:column;gap:4px;"]);
31379
- var LootName = /*#__PURE__*/styled.div.withConfig({
31380
- displayName: "InformationCenterNPCDetails__LootName",
31381
- componentId: "sc-fdu3xl-22"
31308
+ var BuffDescription = /*#__PURE__*/styled.p.withConfig({
31309
+ displayName: "InformationCenterItemDetails__BuffDescription",
31310
+ componentId: "sc-zwf6pb-15"
31311
+ })(["color:", ";font-size:0.45rem;margin:0;padding:0 12px 12px;font-style:italic;"], uiColors.lightGray);
31312
+ var DropList = /*#__PURE__*/styled.div.withConfig({
31313
+ displayName: "InformationCenterItemDetails__DropList",
31314
+ componentId: "sc-zwf6pb-16"
31315
+ })(["display:flex;flex-direction:column;gap:0.5rem;padding:12px;"]);
31316
+ var DropItem = /*#__PURE__*/styled.div.withConfig({
31317
+ displayName: "InformationCenterItemDetails__DropItem",
31318
+ componentId: "sc-zwf6pb-17"
31319
+ })(["display:flex;justify-content:space-between;align-items:center;padding:0.5rem;background:rgba(255,255,255,0.05);border-radius:4px;"]);
31320
+ var NPCName = /*#__PURE__*/styled.span.withConfig({
31321
+ displayName: "InformationCenterItemDetails__NPCName",
31322
+ componentId: "sc-zwf6pb-18"
31382
31323
  })(["color:", ";font-size:0.5rem;"], uiColors.white);
31383
- var LootInfo = /*#__PURE__*/styled.div.withConfig({
31384
- displayName: "InformationCenterNPCDetails__LootInfo",
31385
- componentId: "sc-fdu3xl-23"
31386
- })(["display:flex;align-items:center;gap:8px;"]);
31387
- var LootChance = /*#__PURE__*/styled.span.withConfig({
31388
- displayName: "InformationCenterNPCDetails__LootChance",
31389
- componentId: "sc-fdu3xl-24"
31390
- })(["color:", ";font-size:0.45rem;"], uiColors.yellow);
31391
- var LootQuantity = /*#__PURE__*/styled.span.withConfig({
31392
- displayName: "InformationCenterNPCDetails__LootQuantity",
31393
- componentId: "sc-fdu3xl-25"
31394
- })(["color:", ";font-size:0.45rem;"], uiColors.lightGray);
31395
- var PaginationContainer$2 = /*#__PURE__*/styled.div.withConfig({
31396
- displayName: "InformationCenterNPCDetails__PaginationContainer",
31397
- componentId: "sc-fdu3xl-26"
31398
- })(["display:flex;justify-content:center;padding:12px;"]);
31399
- var StyledPagination = /*#__PURE__*/styled(Pagination).withConfig({
31400
- displayName: "InformationCenterNPCDetails__StyledPagination",
31401
- componentId: "sc-fdu3xl-27"
31402
- })(["font-size:0.6rem;"]);
31324
+ var DropRate = /*#__PURE__*/styled.span.withConfig({
31325
+ displayName: "InformationCenterItemDetails__DropRate",
31326
+ componentId: "sc-zwf6pb-19"
31327
+ })(["color:", ";font-size:0.5rem;"], uiColors.yellow);
31328
+ var RequirementsGrid = /*#__PURE__*/styled.div.withConfig({
31329
+ displayName: "InformationCenterItemDetails__RequirementsGrid",
31330
+ componentId: "sc-zwf6pb-20"
31331
+ })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
31332
+ var RequirementItem = /*#__PURE__*/styled.div.withConfig({
31333
+ displayName: "InformationCenterItemDetails__RequirementItem",
31334
+ componentId: "sc-zwf6pb-21"
31335
+ })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31336
+ var EffectDescription = /*#__PURE__*/styled.p.withConfig({
31337
+ displayName: "InformationCenterItemDetails__EffectDescription",
31338
+ componentId: "sc-zwf6pb-22"
31339
+ })(["color:", ";font-size:0.45rem;margin:8px 0 0;padding:0 12px;font-style:italic;"], uiColors.lightGray);
31403
31340
 
31404
31341
  var TooltipContainer$1 = /*#__PURE__*/styled.div.withConfig({
31405
31342
  displayName: "BaseTooltip__TooltipContainer",
@@ -31435,599 +31372,728 @@ var BaseTooltip = function BaseTooltip(_ref) {
31435
31372
  }, children);
31436
31373
  };
31437
31374
 
31438
- var EffectsList$1 = /*#__PURE__*/styled.div.withConfig({
31439
- displayName: "InformationCenterNPCTooltip__EffectsList",
31440
- componentId: "sc-j2o39s-0"
31441
- })(["display:flex;gap:8px;flex-wrap:wrap;"]);
31442
- var EffectItem$1 = /*#__PURE__*/styled.span.withConfig({
31443
- displayName: "InformationCenterNPCTooltip__EffectItem",
31444
- componentId: "sc-j2o39s-1"
31445
- })(["font-size:0.5rem;color:", ";background:rgba(255,255,255,0.1);padding:2px 6px;border-radius:4px;"], uiColors.white);
31446
- var SpellList = /*#__PURE__*/styled.div.withConfig({
31447
- displayName: "InformationCenterNPCTooltip__SpellList",
31448
- componentId: "sc-j2o39s-2"
31449
- })(["display:flex;flex-direction:column;gap:2px;"]);
31450
- var SpellItem$1 = /*#__PURE__*/styled.div.withConfig({
31451
- displayName: "InformationCenterNPCTooltip__SpellItem",
31452
- componentId: "sc-j2o39s-3"
31453
- })(["display:flex;align-items:center;justify-content:space-between;font-size:0.5rem;color:", ";background:rgba(255,255,255,0.05);padding:2px 6px;border-radius:4px;"], uiColors.white);
31454
- var SpellInfo = /*#__PURE__*/styled.span.withConfig({
31455
- displayName: "InformationCenterNPCTooltip__SpellInfo",
31456
- componentId: "sc-j2o39s-4"
31457
- })(["color:", ";margin-left:8px;opacity:0.8;"], uiColors.yellow);
31458
- var LootList = /*#__PURE__*/styled.div.withConfig({
31459
- displayName: "InformationCenterNPCTooltip__LootList",
31460
- componentId: "sc-j2o39s-5"
31461
- })(["display:flex;flex-direction:column;gap:2px;"]);
31462
- var LootItem$1 = /*#__PURE__*/styled.div.withConfig({
31463
- displayName: "InformationCenterNPCTooltip__LootItem",
31464
- componentId: "sc-j2o39s-6"
31465
- })(["display:flex;align-items:center;gap:4px;font-size:0.5rem;background:rgba(255,255,255,0.05);padding:4px 6px;border-radius:4px;.sprite-from-atlas-img{top:0px;left:0px;}"]);
31466
- var LootName$1 = /*#__PURE__*/styled.span.withConfig({
31467
- displayName: "InformationCenterNPCTooltip__LootName",
31468
- componentId: "sc-j2o39s-7"
31469
- })(["color:", ";flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:4px;"], uiColors.white);
31470
- var LootChance$1 = /*#__PURE__*/styled.span.withConfig({
31471
- displayName: "InformationCenterNPCTooltip__LootChance",
31472
- componentId: "sc-j2o39s-8"
31473
- })(["color:", ";font-size:0.45rem;text-transform:lowercase;opacity:0.8;"], uiColors.yellow);
31474
- var MoreIndicator = /*#__PURE__*/styled.div.withConfig({
31475
- displayName: "InformationCenterNPCTooltip__MoreIndicator",
31476
- componentId: "sc-j2o39s-9"
31477
- })(["color:", ";font-size:0.45rem;text-align:center;margin-top:2px;opacity:0.7;"], uiColors.yellow);
31478
- var formatText = function formatText(text) {
31479
- if (typeof text === 'number') {
31480
- return text.toString();
31481
- }
31482
- return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ');
31483
- };
31484
- var formatRarity = function formatRarity(rarity) {
31485
- switch (rarity) {
31486
- case 0.5:
31487
- return 'Very Rare';
31488
- case 1:
31489
- return 'Rare';
31490
- case 10:
31491
- return 'Uncommon';
31492
- case 15:
31493
- return 'Semi Common';
31494
- case 20:
31495
- return 'Common';
31496
- case 35:
31497
- return 'Very Common';
31375
+ var ItemHeader$1 = /*#__PURE__*/styled.div.withConfig({
31376
+ displayName: "InformationCenterItemTooltip__ItemHeader",
31377
+ componentId: "sc-1ecf9mj-0"
31378
+ })(["display:flex;align-items:center;gap:8px;"]);
31379
+ var Description$3 = /*#__PURE__*/styled.div.withConfig({
31380
+ displayName: "InformationCenterItemTooltip__Description",
31381
+ componentId: "sc-1ecf9mj-1"
31382
+ })(["color:", ";font-size:0.5rem;line-height:1.4;margin-top:8px;opacity:0.8;"], uiColors.white);
31383
+ var RarityText = /*#__PURE__*/styled.span.withConfig({
31384
+ displayName: "InformationCenterItemTooltip__RarityText",
31385
+ componentId: "sc-1ecf9mj-2"
31386
+ })(["color:", ";font-size:0.5rem;"], function (props) {
31387
+ switch (props.rarity.toLowerCase()) {
31388
+ case 'legendary':
31389
+ return '#ff8c00';
31390
+ case 'rare':
31391
+ return '#0070dd';
31392
+ case 'uncommon':
31393
+ return '#1eff00';
31498
31394
  default:
31499
- return 'Unknown';
31395
+ return '#ffffff';
31500
31396
  }
31501
- };
31502
- var InformationCenterNPCTooltip = function InformationCenterNPCTooltip(_ref) {
31503
- var _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
31504
- var npc = _ref.npc,
31505
- itemsAtlasJSON = _ref.itemsAtlasJSON,
31506
- itemsAtlasIMG = _ref.itemsAtlasIMG;
31507
- return React.createElement(BaseTooltip, null, React.createElement(TooltipTitle$1, null, npc.name), React.createElement(StatsContainer, null, React.createElement(StatItem$1, null, "HP: ", npc.baseHealth), React.createElement(StatItem$1, null, "LVL: ", npc.skills.level), React.createElement(StatItem$1, null, "STR: ", ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) || '-'), React.createElement(StatItem$1, null, "DEX: ", ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) || '-'), React.createElement(StatItem$1, null, "RES: ", ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) || '-'), React.createElement(StatItem$1, null, "SPD: ", formatText(npc.speed))), npc.entityEffects && npc.entityEffects.length > 0 && React.createElement(Section, null, React.createElement(SectionTitle, null, "Effects"), React.createElement(EffectsList$1, null, npc.entityEffects.map(function (effect) {
31508
- return React.createElement(EffectItem$1, {
31509
- key: effect
31510
- }, formatText(effect));
31511
- }))), npc.areaSpells && npc.areaSpells.length > 0 && React.createElement(Section, null, React.createElement(SectionTitle, null, "Spells"), React.createElement(SpellList, null, npc.areaSpells.map(function (spell) {
31512
- return React.createElement(SpellItem$1, {
31513
- key: spell.spellKey
31514
- }, formatText(spell.spellKey), React.createElement(SpellInfo, null, formatText(spell.power), ", ", spell.probability, "%"));
31515
- }))), npc.loots && npc.loots.length > 0 && React.createElement(Section, null, React.createElement(SectionTitle, null, "Possible Loot"), React.createElement(LootList, null, npc.loots.slice(0, 4).map(function (loot) {
31516
- return React.createElement(LootItem$1, {
31517
- key: loot.itemBlueprintKey
31518
- }, React.createElement(SpriteFromAtlas, {
31519
- atlasIMG: itemsAtlasIMG,
31520
- atlasJSON: itemsAtlasJSON,
31521
- spriteKey: loot.itemBlueprintKey,
31522
- imgScale: 1
31523
- }), React.createElement(LootName$1, null, formatText(loot.itemBlueprintKey)), React.createElement(LootChance$1, null, formatRarity(loot.chance)));
31524
- }), npc.loots.length > 4 && React.createElement(MoreIndicator, null, "..."))));
31397
+ });
31398
+ var InformationCenterItemTooltip = function InformationCenterItemTooltip(_ref) {
31399
+ var item = _ref.item;
31400
+ return React.createElement(BaseTooltip, null, React.createElement(ItemHeader$1, null, React.createElement(TooltipTitle$1, null, item.name)), React.createElement(Description$3, null, item.description), React.createElement(Section, null, React.createElement(SectionTitle, null, "Details"), React.createElement(StatsContainer, null, React.createElement(StatItem$1, null, "Type: ", item.type), React.createElement(StatItem$1, null, "Weight: ", item.weight), item.attack !== undefined && React.createElement(StatItem$1, null, "Attack: ", item.attack), item.defense !== undefined && React.createElement(StatItem$1, null, "Defense: ", item.defense), item.tier !== undefined && React.createElement(StatItem$1, null, "Tier: ", item.tier), item.rangeType && React.createElement(StatItem$1, null, "Range: ", item.rangeType))), React.createElement(Section, null, React.createElement(SectionTitle, null, "Market"), React.createElement(StatsContainer, null, React.createElement(StatItem$1, null, "Price: ", item.basePrice), item.rarity && React.createElement(StatItem$1, null, "Rarity:", ' ', React.createElement(RarityText, {
31401
+ rarity: item.rarity
31402
+ }, item.rarity)))));
31525
31403
  };
31526
31404
 
31527
- var InformationCenterBestiarySection = function InformationCenterBestiarySection(_ref) {
31528
- var bestiaryItems = _ref.bestiaryItems,
31405
+ var TOOLTIP_OFFSET = 200;
31406
+ var formatItemType = function formatItemType(type) {
31407
+ var words = type.split(/(?=[A-Z])/);
31408
+ if (words.length === 1) {
31409
+ return words[0];
31410
+ }
31411
+ return words.map(function (word, index) {
31412
+ if (index === 0) {
31413
+ return word.charAt(0) + '.';
31414
+ }
31415
+ return word;
31416
+ }).join(' ');
31417
+ };
31418
+ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref) {
31419
+ var items = _ref.items,
31420
+ bestiaryItems = _ref.bestiaryItems,
31529
31421
  itemsAtlasJSON = _ref.itemsAtlasJSON,
31530
31422
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31531
- iconsAtlasIMG = _ref.iconsAtlasIMG,
31532
- iconsAtlasJSON = _ref.iconsAtlasJSON,
31533
- entitiesAtlasJSON = _ref.entitiesAtlasJSON,
31534
- entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31535
31423
  initialSearchQuery = _ref.initialSearchQuery,
31536
31424
  tabId = _ref.tabId;
31537
31425
  var _useState = useState(initialSearchQuery),
31538
31426
  searchQuery = _useState[0],
31539
31427
  setSearchQuery = _useState[1];
31540
- var _useState2 = useState(null),
31541
- tooltipData = _useState2[0],
31542
- setTooltipData = _useState2[1];
31428
+ var _useState2 = useState('all'),
31429
+ selectedItemCategory = _useState2[0],
31430
+ setSelectedItemCategory = _useState2[1];
31543
31431
  var _useState3 = useState(null),
31544
- selectedMonster = _useState3[0],
31545
- setSelectedMonster = _useState3[1];
31546
- var _useState4 = useState('ontouchstart' in window),
31547
- isTouchDevice = _useState4[0];
31548
- var handleMouseEnter = function handleMouseEnter(monster, event) {
31549
- if (!isTouchDevice && !selectedMonster) {
31550
- setTooltipData({
31551
- npc: monster,
31552
- position: {
31553
- x: event.clientX,
31554
- y: event.clientY
31555
- }
31432
+ hoveredItem = _useState3[0],
31433
+ setHoveredItem = _useState3[1];
31434
+ var _useState4 = useState({
31435
+ x: 0,
31436
+ y: 0
31437
+ }),
31438
+ tooltipPosition = _useState4[0],
31439
+ setTooltipPosition = _useState4[1];
31440
+ var _useState5 = useState(null),
31441
+ selectedItem = _useState5[0],
31442
+ setSelectedItem = _useState5[1];
31443
+ var itemCategoryOptions = [{
31444
+ id: 0,
31445
+ value: 'all',
31446
+ option: 'All Items'
31447
+ }].concat(Object.values(ItemType).map(function (type, index) {
31448
+ return {
31449
+ id: index + 1,
31450
+ value: type,
31451
+ option: formatItemType(type)
31452
+ };
31453
+ }));
31454
+ var filteredItems = items.filter(function (item) {
31455
+ return (selectedItemCategory === 'all' || item.type === selectedItemCategory) && item.name.toLowerCase().includes(searchQuery.toLowerCase());
31456
+ });
31457
+ var getDroppedByNPCs = function getDroppedByNPCs(itemId, npcs) {
31458
+ return npcs.filter(function (npc) {
31459
+ var _npc$loots;
31460
+ return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
31461
+ return loot.itemBlueprintKey === itemId;
31462
+ });
31463
+ }) || [];
31464
+ };
31465
+ var handleMouseEnter = function handleMouseEnter(e, item) {
31466
+ setTooltipPosition({
31467
+ x: e.clientX + TOOLTIP_OFFSET,
31468
+ y: e.clientY
31469
+ });
31470
+ setHoveredItem(item);
31471
+ };
31472
+ var handleMouseMove = function handleMouseMove(e) {
31473
+ if (hoveredItem) {
31474
+ setTooltipPosition({
31475
+ x: e.clientX + TOOLTIP_OFFSET,
31476
+ y: e.clientY
31556
31477
  });
31557
31478
  }
31558
31479
  };
31559
31480
  var handleMouseLeave = function handleMouseLeave() {
31560
- if (!isTouchDevice) {
31561
- setTooltipData(null);
31562
- }
31481
+ setHoveredItem(null);
31563
31482
  };
31564
- var handleMouseMove = function handleMouseMove(event) {
31565
- if (!isTouchDevice && tooltipData) {
31566
- setTooltipData(_extends({}, tooltipData, {
31567
- position: {
31568
- x: event.clientX,
31569
- y: event.clientY
31570
- }
31571
- }));
31572
- }
31483
+ var handleTouchStart = function handleTouchStart(e, item) {
31484
+ var touch = e.touches[0];
31485
+ setTooltipPosition({
31486
+ x: touch.clientX + TOOLTIP_OFFSET,
31487
+ y: touch.clientY
31488
+ });
31489
+ setHoveredItem(item);
31573
31490
  };
31574
- var handleTouchStart = function handleTouchStart(monster, event) {
31575
- if (isTouchDevice) {
31576
- event.preventDefault();
31577
- var touch = event.touches[0];
31578
- if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
31579
- setTooltipData(null);
31580
- } else {
31581
- setTooltipData({
31582
- npc: monster,
31583
- position: {
31584
- x: touch.clientX,
31585
- y: touch.clientY
31586
- }
31587
- });
31588
- }
31589
- }
31491
+ var handleItemClick = function handleItemClick(item) {
31492
+ setSelectedItem(item);
31493
+ setHoveredItem(null);
31590
31494
  };
31591
- var handleMonsterClick = function handleMonsterClick(monster) {
31592
- setSelectedMonster(monster);
31593
- setTooltipData(null);
31495
+ var handleSearchChange = function handleSearchChange(newQuery) {
31496
+ setSearchQuery(newQuery);
31497
+ if (newQuery && selectedItemCategory !== 'all') {
31498
+ setSelectedItemCategory('all');
31499
+ }
31594
31500
  };
31595
31501
  var renderItem = function renderItem(item) {
31596
31502
  return React.createElement(InformationCenterCell, {
31597
- key: item.id,
31503
+ key: item.key,
31598
31504
  name: item.name,
31599
- spriteKey: item.key,
31600
- atlasJSON: entitiesAtlasJSON,
31601
- atlasIMG: entitiesAtlasIMG,
31602
- onClick: function onClick() {
31603
- return handleMonsterClick(item);
31604
- },
31505
+ spriteKey: item.texturePath,
31506
+ atlasJSON: itemsAtlasJSON,
31507
+ atlasIMG: itemsAtlasIMG,
31605
31508
  onMouseEnter: function onMouseEnter(e) {
31606
- return handleMouseEnter(item, e);
31509
+ return handleMouseEnter(e, item);
31607
31510
  },
31608
- onMouseLeave: handleMouseLeave,
31609
31511
  onMouseMove: handleMouseMove,
31512
+ onMouseLeave: handleMouseLeave,
31610
31513
  onTouchStart: function onTouchStart(e) {
31611
- return handleTouchStart(item, e);
31514
+ return handleTouchStart(e, item);
31515
+ },
31516
+ onClick: function onClick() {
31517
+ return handleItemClick(item);
31612
31518
  }
31613
31519
  });
31614
31520
  };
31615
- var filteredItems = bestiaryItems.filter(function (item) {
31616
- return item.name.toLowerCase().includes(searchQuery.toLowerCase());
31617
- });
31618
31521
  return React.createElement(React.Fragment, null, React.createElement(PaginatedContent, {
31619
31522
  items: filteredItems,
31620
31523
  renderItem: renderItem,
31621
- emptyMessage: "No monsters found",
31622
- tabId: tabId,
31623
- layout: "grid",
31524
+ emptyMessage: "No items found",
31525
+ filterOptions: {
31526
+ options: itemCategoryOptions,
31527
+ selectedOption: selectedItemCategory,
31528
+ onOptionChange: setSelectedItemCategory
31529
+ },
31624
31530
  searchOptions: {
31625
31531
  value: searchQuery,
31626
- onChange: setSearchQuery,
31627
- placeholder: 'Search monsters...'
31532
+ onChange: handleSearchChange,
31533
+ placeholder: 'Search items...'
31628
31534
  },
31535
+ dependencies: [selectedItemCategory],
31536
+ tabId: tabId,
31537
+ layout: "grid",
31629
31538
  itemHeight: "180px"
31630
- }), tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper, {
31539
+ }), hoveredItem && React.createElement(TooltipWrapper, {
31631
31540
  style: {
31632
- position: 'fixed',
31633
- left: tooltipData.position.x + 10,
31634
- top: tooltipData.position.y + 10
31541
+ top: tooltipPosition.y,
31542
+ left: tooltipPosition.x
31635
31543
  }
31636
- }, React.createElement(InformationCenterNPCTooltip, {
31637
- npc: tooltipData.npc,
31638
- itemsAtlasJSON: itemsAtlasJSON,
31639
- itemsAtlasIMG: itemsAtlasIMG
31640
- }))), selectedMonster && React.createElement(InformationCenterNPCDetails, {
31641
- npc: selectedMonster,
31544
+ }, React.createElement(InformationCenterItemTooltip, {
31545
+ item: hoveredItem
31546
+ })), selectedItem && React.createElement(InformationCenterItemDetails, {
31547
+ item: selectedItem,
31642
31548
  itemsAtlasJSON: itemsAtlasJSON,
31643
31549
  itemsAtlasIMG: itemsAtlasIMG,
31644
- iconAtlasIMG: iconsAtlasIMG,
31645
- iconAtlasJSON: iconsAtlasJSON,
31646
- entitiesAtlasJSON: entitiesAtlasJSON,
31647
- entitiesAtlasIMG: entitiesAtlasIMG,
31550
+ droppedBy: getDroppedByNPCs(selectedItem.key, bestiaryItems),
31648
31551
  onBack: function onBack() {
31649
- return setSelectedMonster(null);
31552
+ return setSelectedItem(null);
31650
31553
  }
31651
31554
  }));
31652
31555
  };
31653
31556
  var TooltipWrapper = /*#__PURE__*/styled.div.withConfig({
31654
- displayName: "InformationCenterBestiarySection__TooltipWrapper",
31655
- componentId: "sc-e3h0p2-0"
31656
- })(["position:fixed;z-index:1000;pointer-events:none;width:300px;"]);
31557
+ displayName: "InformationCenterItemsSection__TooltipWrapper",
31558
+ componentId: "sc-1wmpapt-0"
31559
+ })(["position:fixed;z-index:1000;pointer-events:none;transition:transform 0.1s ease;"]);
31657
31560
 
31658
- var InformationCenterFAQSection = function InformationCenterFAQSection(_ref) {
31659
- var faqItems = _ref.faqItems,
31660
- initialSearchQuery = _ref.initialSearchQuery,
31661
- tabId = _ref.tabId;
31662
- var _useState = useState(initialSearchQuery),
31663
- searchQuery = _useState[0],
31664
- setSearchQuery = _useState[1];
31665
- useEffect(function () {
31666
- setSearchQuery(initialSearchQuery);
31667
- }, [initialSearchQuery]);
31668
- var filteredFaqs = useMemo(function () {
31669
- if (!searchQuery) return faqItems;
31670
- return faqItems.filter(function (faq) {
31671
- return faq.question.toLowerCase().includes(searchQuery.toLowerCase()) || faq.answer.toLowerCase().includes(searchQuery.toLowerCase());
31672
- });
31673
- }, [searchQuery, faqItems]);
31674
- var renderItem = function renderItem(item) {
31675
- return React.createElement(StyledCollapsible$1, {
31676
- title: item.question
31677
- }, React.createElement(Answer$1, null, item.answer));
31678
- };
31679
- return React.createElement(Container$q, null, React.createElement(SearchHeader, {
31680
- searchOptions: {
31681
- value: searchQuery,
31682
- onChange: setSearchQuery,
31683
- placeholder: 'Search FAQs...'
31684
- }
31685
- }), React.createElement(PaginatedContent, {
31686
- items: filteredFaqs,
31687
- renderItem: renderItem,
31688
- emptyMessage: "No FAQ items found",
31689
- tabId: tabId,
31690
- layout: "list",
31691
- itemsPerPage: 10
31692
- }));
31561
+ var ITEMS_PER_PAGE$1 = 5;
31562
+ var formatItemName = function formatItemName(itemPath) {
31563
+ var _itemPath$split$pop;
31564
+ var cleanText = ((_itemPath$split$pop = itemPath.split('/').pop()) == null ? void 0 : _itemPath$split$pop.split('.').shift()) || '';
31565
+ return cleanText.split('-').map(function (word) {
31566
+ return word.charAt(0).toUpperCase() + word.slice(1);
31567
+ }).join(' ');
31693
31568
  };
31694
- var Container$q = /*#__PURE__*/styled.div.withConfig({
31695
- displayName: "InformationCenterFaqSection__Container",
31696
- componentId: "sc-ofmaa9-0"
31697
- })(["display:flex;flex-direction:column;gap:1rem;width:100%;"]);
31698
- var StyledCollapsible$1 = /*#__PURE__*/styled(Collapsible).withConfig({
31699
- displayName: "InformationCenterFaqSection__StyledCollapsible",
31700
- componentId: "sc-ofmaa9-1"
31701
- })(["margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]);
31702
- var Answer$1 = /*#__PURE__*/styled.p.withConfig({
31703
- displayName: "InformationCenterFaqSection__Answer",
31704
- componentId: "sc-ofmaa9-2"
31705
- })(["font-size:0.9rem;color:#ffffff;margin:0;line-height:1.5;"]);
31706
-
31707
- var InformationCenterItemDetails = function InformationCenterItemDetails(_ref) {
31708
- var item = _ref.item,
31569
+ var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31570
+ var _npc$loots, _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
31571
+ var npc = _ref.npc,
31709
31572
  itemsAtlasJSON = _ref.itemsAtlasJSON,
31710
31573
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31711
- droppedBy = _ref.droppedBy,
31574
+ entitiesAtlasJSON = _ref.entitiesAtlasJSON,
31575
+ entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31576
+ iconAtlasIMG = _ref.iconAtlasIMG,
31577
+ iconAtlasJSON = _ref.iconAtlasJSON,
31712
31578
  onBack = _ref.onBack;
31713
31579
  var isMobile = isMobileOrTablet();
31714
- var renderAllowedSlots = function renderAllowedSlots() {
31715
- var _item$allowedEquipSlo;
31716
- if (!((_item$allowedEquipSlo = item.allowedEquipSlotType) != null && _item$allowedEquipSlo.length)) return null;
31717
- return React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Equip Slots:"), React.createElement(Value$1, null, item.allowedEquipSlotType.join(', ')));
31580
+ var _useState = useState(''),
31581
+ lootSearchQuery = _useState[0],
31582
+ setLootSearchQuery = _useState[1];
31583
+ var _useState2 = useState(1),
31584
+ currentLootPage = _useState2[0],
31585
+ setCurrentLootPage = _useState2[1];
31586
+ var formatText = function formatText(text) {
31587
+ if (typeof text === 'number') {
31588
+ return text.toString();
31589
+ }
31590
+ return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ').replace(/^\w/, function (c) {
31591
+ return c.toUpperCase();
31592
+ });
31718
31593
  };
31719
- var renderRequirements = function renderRequirements() {
31720
- if (!item.minRequirements) return null;
31721
- return React.createElement(StyledCollapsible$2, {
31722
- title: "Requirements",
31723
- defaultOpen: !isMobile
31724
- }, React.createElement(RequirementsGrid, null, item.minRequirements.level && React.createElement(RequirementItem, null, React.createElement(Label$1, null, "Level:"), React.createElement(Value$1, null, item.minRequirements.level)), item.minRequirements.skill && React.createElement(RequirementItem, null, React.createElement(Label$1, null, item.minRequirements.skill.name, ":"), React.createElement(Value$1, null, item.minRequirements.skill.level))));
31594
+ var formatRarity = function formatRarity(rarity) {
31595
+ switch (rarity) {
31596
+ case 0.5:
31597
+ return 'Very Rare';
31598
+ case 1:
31599
+ return 'Rare';
31600
+ case 10:
31601
+ return 'Uncommon';
31602
+ case 15:
31603
+ return 'Semi Common';
31604
+ case 20:
31605
+ return 'Common';
31606
+ case 35:
31607
+ return 'Very Common';
31608
+ default:
31609
+ return 'Unknown';
31610
+ }
31725
31611
  };
31612
+ var filteredLoots = ((_npc$loots = npc.loots) == null ? void 0 : _npc$loots.filter(function (loot) {
31613
+ return formatItemName(loot.itemBlueprintKey).toLowerCase().includes(lootSearchQuery.toLowerCase());
31614
+ })) || [];
31615
+ var totalLootPages = Math.ceil(filteredLoots.length / ITEMS_PER_PAGE$1);
31616
+ var paginatedLoots = filteredLoots.slice((currentLootPage - 1) * ITEMS_PER_PAGE$1, currentLootPage * ITEMS_PER_PAGE$1);
31726
31617
  return React.createElement(BaseInformationDetails, {
31727
- name: item.name,
31728
- spriteKey: item.texturePath,
31729
- atlasJSON: itemsAtlasJSON,
31730
- atlasIMG: itemsAtlasIMG,
31618
+ name: npc.name,
31619
+ spriteKey: npc.key,
31620
+ atlasJSON: entitiesAtlasJSON,
31621
+ atlasIMG: entitiesAtlasIMG,
31731
31622
  onBack: onBack
31732
- }, React.createElement(InfoSection$1, null, React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Type:"), React.createElement(Value$1, null, item.type)), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Subtype:"), React.createElement(Value$1, null, item.subType)), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Tier:"), React.createElement(Value$1, null, item.tier)), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Rarity:"), React.createElement(Value$1, null, item.rarity)), renderAllowedSlots()), React.createElement(StyledCollapsible$2, {
31733
- title: "Description",
31734
- defaultOpen: !isMobile
31735
- }, React.createElement(Description$2, null, item.description || 'No description available.')), React.createElement(StyledCollapsible$2, {
31623
+ }, React.createElement(InfoSection$1, null, React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Type:"), React.createElement(Value$1, null, formatText(npc.subType))), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Alignment:"), React.createElement(Value$1, null, formatText(npc.alignment))), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Attack Type:"), React.createElement(Value$1, null, formatText(npc.attackType))), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Range:"), React.createElement(Value$1, null, formatText(npc.maxRangeAttack))), React.createElement(InfoItem$1, null, React.createElement(Label$1, null, "Speed:"), React.createElement(Value$1, null, formatText(npc.speed)))), React.createElement(StyledCollapsible$1, {
31736
31624
  title: "Stats",
31737
31625
  defaultOpen: !isMobile
31738
- }, React.createElement(StatGrid$1, null, React.createElement(StatItem$2, null, "Weight: ", item.weight), React.createElement(StatItem$2, null, "Stack Size: ", item.maxStackSize), item.rangeType && React.createElement(StatItem$2, null, "Range Type: ", item.rangeType), item.basePrice > 0 && React.createElement(StatItem$2, null, "Base Price: ", item.basePrice))), renderRequirements(), item.entityEffects && item.entityEffects.length > 0 && React.createElement(StyledCollapsible$2, {
31739
- title: "Effects",
31626
+ }, React.createElement(StatGrid$1, null, React.createElement(StatItem$2, null, "HP: ", npc.baseHealth), React.createElement(StatItem$2, null, "Level: ", npc.skills.level), ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) && React.createElement(StatItem$2, null, "Strength: ", npc.skills.strength.level), ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) && React.createElement(StatItem$2, null, "Dexterity: ", npc.skills.dexterity.level), ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) && React.createElement(StatItem$2, null, "Resistance: ", npc.skills.resistance.level))), npc.loots && npc.loots.length > 0 && React.createElement(StyledCollapsible$1, {
31627
+ title: "Loot",
31740
31628
  defaultOpen: !isMobile
31741
- }, React.createElement(EffectsList$2, null, item.entityEffects.map(function (effect, index) {
31742
- return React.createElement(EffectItem$2, {
31629
+ }, React.createElement(LootSearchContainer, null, React.createElement(StyledSearchBar$1, {
31630
+ value: lootSearchQuery,
31631
+ onChange: setLootSearchQuery,
31632
+ placeholder: "Search loot..."
31633
+ })), React.createElement(LootGrid, null, paginatedLoots.map(function (loot, index) {
31634
+ return React.createElement(LootItem, {
31743
31635
  key: index
31744
- }, effect, item.entityEffectChance && React.createElement(EffectChance, null, "(", item.entityEffectChance, "%)"));
31745
- })), item.usableEffectDescription && React.createElement(EffectDescription, null, item.usableEffectDescription)), item.equippedBuff && item.equippedBuff.length > 0 && React.createElement(StyledCollapsible$2, {
31746
- title: "Equipped Buffs",
31636
+ }, React.createElement(SpriteFromAtlas, {
31637
+ atlasJSON: itemsAtlasJSON,
31638
+ atlasIMG: itemsAtlasIMG,
31639
+ spriteKey: loot.itemBlueprintKey,
31640
+ width: 24,
31641
+ height: 24,
31642
+ imgScale: 1
31643
+ }), React.createElement(LootDetails, null, React.createElement(LootName, null, formatItemName(loot.itemBlueprintKey)), React.createElement(LootInfo, null, React.createElement(LootChance, null, formatRarity(loot.chance)), loot.quantityRange && React.createElement(LootQuantity, null, "x", loot.quantityRange[0], "-", loot.quantityRange[1]))));
31644
+ })), filteredLoots.length > ITEMS_PER_PAGE$1 && React.createElement(PaginationContainer$2, null, React.createElement(StyledPagination, {
31645
+ currentPage: currentLootPage,
31646
+ totalPages: totalLootPages,
31647
+ onPageChange: setCurrentLootPage
31648
+ }))), npc.entityEffects && npc.entityEffects.length > 0 && React.createElement(StyledCollapsible$1, {
31649
+ title: "Effects",
31747
31650
  defaultOpen: !isMobile
31748
- }, React.createElement(BuffsList, null, item.equippedBuff.map(function (buff, index) {
31749
- return React.createElement(BuffItem, {
31651
+ }, React.createElement(EffectsList$1, null, npc.entityEffects.map(function (effect, index) {
31652
+ return React.createElement(EffectItem$1, {
31750
31653
  key: index
31751
- }, React.createElement(BuffName, null, buff.trait), React.createElement(BuffValue, null, "+", buff.buffPercentage, "%"));
31752
- })), item.equippedBuffDescription && React.createElement(BuffDescription, null, item.equippedBuffDescription)), droppedBy.length > 0 && React.createElement(StyledCollapsible$2, {
31753
- title: "Dropped By",
31654
+ }, formatText(effect));
31655
+ }))), npc.areaSpells && npc.areaSpells.length > 0 && React.createElement(StyledCollapsible$1, {
31656
+ title: "Spells",
31754
31657
  defaultOpen: !isMobile
31755
- }, React.createElement(DropList, null, droppedBy.map(function (npc) {
31756
- var loot = npc.loots.find(function (l) {
31757
- return l.itemBlueprintKey === item.key;
31758
- });
31759
- return React.createElement(DropItem, {
31760
- key: npc.id
31761
- }, React.createElement(NPCName, null, npc.name), React.createElement(DropRate, null, loot == null ? void 0 : loot.chance, "%"));
31658
+ }, React.createElement(SpellsList, null, npc.areaSpells.map(function (spell, index) {
31659
+ return React.createElement(SpellItem, {
31660
+ key: index
31661
+ }, React.createElement(SpellIconContainer, null, React.createElement(SpriteFromAtlas, {
31662
+ atlasJSON: iconAtlasJSON,
31663
+ atlasIMG: iconAtlasIMG,
31664
+ spriteKey: spell.texturePath || spell.spellKey,
31665
+ width: 24,
31666
+ height: 24,
31667
+ imgScale: 1
31668
+ })), React.createElement(SpellContent, null, React.createElement(SpellName, null, formatText(spell.spellKey)), React.createElement(SpellDetails, null, "Power: ", React.createElement(SpellValue, null, formatText(spell.power)), React.createElement(Separator, null, "\u2022"), "Chance: ", React.createElement(SpellValue, null, spell.probability, "%"))));
31762
31669
  }))));
31763
31670
  };
31764
31671
  var InfoSection$1 = /*#__PURE__*/styled.div.withConfig({
31765
- displayName: "InformationCenterItemDetails__InfoSection",
31766
- componentId: "sc-zwf6pb-0"
31672
+ displayName: "InformationCenterNPCDetails__InfoSection",
31673
+ componentId: "sc-fdu3xl-0"
31767
31674
  })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;background:rgba(255,255,255,0.05);padding:12px;border-radius:4px;"]);
31768
31675
  var InfoItem$1 = /*#__PURE__*/styled.div.withConfig({
31769
- displayName: "InformationCenterItemDetails__InfoItem",
31770
- componentId: "sc-zwf6pb-1"
31676
+ displayName: "InformationCenterNPCDetails__InfoItem",
31677
+ componentId: "sc-fdu3xl-1"
31771
31678
  })(["display:flex;align-items:center;gap:8px;"]);
31772
31679
  var Label$1 = /*#__PURE__*/styled.span.withConfig({
31773
- displayName: "InformationCenterItemDetails__Label",
31774
- componentId: "sc-zwf6pb-2"
31680
+ displayName: "InformationCenterNPCDetails__Label",
31681
+ componentId: "sc-fdu3xl-2"
31775
31682
  })(["color:", ";font-size:0.5rem;opacity:0.8;"], uiColors.yellow);
31776
31683
  var Value$1 = /*#__PURE__*/styled.span.withConfig({
31777
- displayName: "InformationCenterItemDetails__Value",
31778
- componentId: "sc-zwf6pb-3"
31684
+ displayName: "InformationCenterNPCDetails__Value",
31685
+ componentId: "sc-fdu3xl-3"
31779
31686
  })(["color:", ";font-size:0.5rem;"], uiColors.white);
31780
- var StyledCollapsible$2 = /*#__PURE__*/styled(Collapsible).withConfig({
31781
- displayName: "InformationCenterItemDetails__StyledCollapsible",
31782
- componentId: "sc-zwf6pb-4"
31687
+ var StyledCollapsible$1 = /*#__PURE__*/styled(Collapsible).withConfig({
31688
+ displayName: "InformationCenterNPCDetails__StyledCollapsible",
31689
+ componentId: "sc-fdu3xl-4"
31783
31690
  })(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:hidden;"]);
31784
- var Description$2 = /*#__PURE__*/styled.p.withConfig({
31785
- displayName: "InformationCenterItemDetails__Description",
31786
- componentId: "sc-zwf6pb-5"
31787
- })(["color:", ";font-size:0.5rem;margin:0;padding:12px;line-height:1.5;"], uiColors.white);
31788
31691
  var StatGrid$1 = /*#__PURE__*/styled.div.withConfig({
31789
- displayName: "InformationCenterItemDetails__StatGrid",
31790
- componentId: "sc-zwf6pb-6"
31692
+ displayName: "InformationCenterNPCDetails__StatGrid",
31693
+ componentId: "sc-fdu3xl-5"
31791
31694
  })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
31792
31695
  var StatItem$2 = /*#__PURE__*/styled.div.withConfig({
31793
- displayName: "InformationCenterItemDetails__StatItem",
31794
- componentId: "sc-zwf6pb-7"
31696
+ displayName: "InformationCenterNPCDetails__StatItem",
31697
+ componentId: "sc-fdu3xl-6"
31795
31698
  })(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"], uiColors.white);
31796
- var EffectsList$2 = /*#__PURE__*/styled.div.withConfig({
31797
- displayName: "InformationCenterItemDetails__EffectsList",
31798
- componentId: "sc-zwf6pb-8"
31699
+ var EffectsList$1 = /*#__PURE__*/styled.div.withConfig({
31700
+ displayName: "InformationCenterNPCDetails__EffectsList",
31701
+ componentId: "sc-fdu3xl-7"
31799
31702
  })(["display:flex;flex-wrap:wrap;gap:8px;padding:12px;"]);
31800
- var EffectItem$2 = /*#__PURE__*/styled.div.withConfig({
31801
- displayName: "InformationCenterItemDetails__EffectItem",
31802
- componentId: "sc-zwf6pb-9"
31803
- })(["display:flex;align-items:center;gap:4px;color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
31804
- var EffectChance = /*#__PURE__*/styled.span.withConfig({
31805
- displayName: "InformationCenterItemDetails__EffectChance",
31806
- componentId: "sc-zwf6pb-10"
31807
- })(["color:", ";opacity:0.8;"], uiColors.yellow);
31808
- var BuffsList = /*#__PURE__*/styled.div.withConfig({
31809
- displayName: "InformationCenterItemDetails__BuffsList",
31810
- componentId: "sc-zwf6pb-11"
31703
+ var EffectItem$1 = /*#__PURE__*/styled.div.withConfig({
31704
+ displayName: "InformationCenterNPCDetails__EffectItem",
31705
+ componentId: "sc-fdu3xl-8"
31706
+ })(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
31707
+ var SpellsList = /*#__PURE__*/styled.div.withConfig({
31708
+ displayName: "InformationCenterNPCDetails__SpellsList",
31709
+ componentId: "sc-fdu3xl-9"
31811
31710
  })(["display:flex;flex-direction:column;gap:8px;padding:12px;"]);
31812
- var BuffItem = /*#__PURE__*/styled.div.withConfig({
31813
- displayName: "InformationCenterItemDetails__BuffItem",
31814
- componentId: "sc-zwf6pb-12"
31815
- })(["display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31816
- var BuffName = /*#__PURE__*/styled.span.withConfig({
31817
- displayName: "InformationCenterItemDetails__BuffName",
31818
- componentId: "sc-zwf6pb-13"
31819
- })(["color:", ";font-size:0.5rem;"], uiColors.white);
31820
- var BuffValue = /*#__PURE__*/styled.span.withConfig({
31821
- displayName: "InformationCenterItemDetails__BuffValue",
31822
- componentId: "sc-zwf6pb-14"
31823
- })(["color:", ";font-size:0.5rem;"], uiColors.yellow);
31824
- var BuffDescription = /*#__PURE__*/styled.p.withConfig({
31825
- displayName: "InformationCenterItemDetails__BuffDescription",
31826
- componentId: "sc-zwf6pb-15"
31827
- })(["color:", ";font-size:0.45rem;margin:0;padding:0 12px 12px;font-style:italic;"], uiColors.lightGray);
31828
- var DropList = /*#__PURE__*/styled.div.withConfig({
31829
- displayName: "InformationCenterItemDetails__DropList",
31830
- componentId: "sc-zwf6pb-16"
31831
- })(["display:flex;flex-direction:column;gap:0.5rem;padding:12px;"]);
31832
- var DropItem = /*#__PURE__*/styled.div.withConfig({
31833
- displayName: "InformationCenterItemDetails__DropItem",
31834
- componentId: "sc-zwf6pb-17"
31835
- })(["display:flex;justify-content:space-between;align-items:center;padding:0.5rem;background:rgba(255,255,255,0.05);border-radius:4px;"]);
31836
- var NPCName = /*#__PURE__*/styled.span.withConfig({
31837
- displayName: "InformationCenterItemDetails__NPCName",
31838
- componentId: "sc-zwf6pb-18"
31839
- })(["color:", ";font-size:0.5rem;"], uiColors.white);
31840
- var DropRate = /*#__PURE__*/styled.span.withConfig({
31841
- displayName: "InformationCenterItemDetails__DropRate",
31842
- componentId: "sc-zwf6pb-19"
31711
+ var SpellIconContainer = /*#__PURE__*/styled.div.withConfig({
31712
+ displayName: "InformationCenterNPCDetails__SpellIconContainer",
31713
+ componentId: "sc-fdu3xl-10"
31714
+ })(["display:flex;padding-right:30px;padding-bottom:30px;"]);
31715
+ var SpellContent = /*#__PURE__*/styled.div.withConfig({
31716
+ displayName: "InformationCenterNPCDetails__SpellContent",
31717
+ componentId: "sc-fdu3xl-11"
31718
+ })(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
31719
+ var SpellItem = /*#__PURE__*/styled.div.withConfig({
31720
+ displayName: "InformationCenterNPCDetails__SpellItem",
31721
+ componentId: "sc-fdu3xl-12"
31722
+ })(["display:flex;gap:8px;background:rgba(255,255,255,0.05);padding:8px;padding-left:10px;border-radius:4px;align-items:center;"]);
31723
+ var SpellName = /*#__PURE__*/styled.div.withConfig({
31724
+ displayName: "InformationCenterNPCDetails__SpellName",
31725
+ componentId: "sc-fdu3xl-13"
31843
31726
  })(["color:", ";font-size:0.5rem;"], uiColors.yellow);
31844
- var RequirementsGrid = /*#__PURE__*/styled.div.withConfig({
31845
- displayName: "InformationCenterItemDetails__RequirementsGrid",
31846
- componentId: "sc-zwf6pb-20"
31847
- })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
31848
- var RequirementItem = /*#__PURE__*/styled.div.withConfig({
31849
- displayName: "InformationCenterItemDetails__RequirementItem",
31850
- componentId: "sc-zwf6pb-21"
31727
+ var SpellDetails = /*#__PURE__*/styled.div.withConfig({
31728
+ displayName: "InformationCenterNPCDetails__SpellDetails",
31729
+ componentId: "sc-fdu3xl-14"
31730
+ })(["display:flex;align-items:center;gap:8px;color:", ";font-size:0.45rem;opacity:0.8;"], uiColors.white);
31731
+ var SpellValue = /*#__PURE__*/styled.span.withConfig({
31732
+ displayName: "InformationCenterNPCDetails__SpellValue",
31733
+ componentId: "sc-fdu3xl-15"
31734
+ })(["color:", ";"], uiColors.yellow);
31735
+ var Separator = /*#__PURE__*/styled.span.withConfig({
31736
+ displayName: "InformationCenterNPCDetails__Separator",
31737
+ componentId: "sc-fdu3xl-16"
31738
+ })(["color:", ";opacity:0.5;"], uiColors.yellow);
31739
+ var LootSearchContainer = /*#__PURE__*/styled.div.withConfig({
31740
+ displayName: "InformationCenterNPCDetails__LootSearchContainer",
31741
+ componentId: "sc-fdu3xl-17"
31742
+ })(["padding:12px 12px 0;"]);
31743
+ var StyledSearchBar$1 = /*#__PURE__*/styled(SearchBar).withConfig({
31744
+ displayName: "InformationCenterNPCDetails__StyledSearchBar",
31745
+ componentId: "sc-fdu3xl-18"
31746
+ })(["width:100%;"]);
31747
+ var LootGrid = /*#__PURE__*/styled.div.withConfig({
31748
+ displayName: "InformationCenterNPCDetails__LootGrid",
31749
+ componentId: "sc-fdu3xl-19"
31750
+ })(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
31751
+ var LootItem = /*#__PURE__*/styled.div.withConfig({
31752
+ displayName: "InformationCenterNPCDetails__LootItem",
31753
+ componentId: "sc-fdu3xl-20"
31851
31754
  })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31852
- var EffectDescription = /*#__PURE__*/styled.p.withConfig({
31853
- displayName: "InformationCenterItemDetails__EffectDescription",
31854
- componentId: "sc-zwf6pb-22"
31855
- })(["color:", ";font-size:0.45rem;margin:8px 0 0;padding:0 12px;font-style:italic;"], uiColors.lightGray);
31856
-
31857
- var ItemHeader$1 = /*#__PURE__*/styled.div.withConfig({
31858
- displayName: "InformationCenterItemTooltip__ItemHeader",
31859
- componentId: "sc-1ecf9mj-0"
31755
+ var LootDetails = /*#__PURE__*/styled.div.withConfig({
31756
+ displayName: "InformationCenterNPCDetails__LootDetails",
31757
+ componentId: "sc-fdu3xl-21"
31758
+ })(["flex:1;display:flex;flex-direction:column;gap:4px;"]);
31759
+ var LootName = /*#__PURE__*/styled.div.withConfig({
31760
+ displayName: "InformationCenterNPCDetails__LootName",
31761
+ componentId: "sc-fdu3xl-22"
31762
+ })(["color:", ";font-size:0.5rem;"], uiColors.white);
31763
+ var LootInfo = /*#__PURE__*/styled.div.withConfig({
31764
+ displayName: "InformationCenterNPCDetails__LootInfo",
31765
+ componentId: "sc-fdu3xl-23"
31860
31766
  })(["display:flex;align-items:center;gap:8px;"]);
31861
- var Description$3 = /*#__PURE__*/styled.div.withConfig({
31862
- displayName: "InformationCenterItemTooltip__Description",
31863
- componentId: "sc-1ecf9mj-1"
31864
- })(["color:", ";font-size:0.5rem;line-height:1.4;margin-top:8px;opacity:0.8;"], uiColors.white);
31865
- var RarityText = /*#__PURE__*/styled.span.withConfig({
31866
- displayName: "InformationCenterItemTooltip__RarityText",
31867
- componentId: "sc-1ecf9mj-2"
31868
- })(["color:", ";font-size:0.5rem;"], function (props) {
31869
- switch (props.rarity.toLowerCase()) {
31870
- case 'legendary':
31871
- return '#ff8c00';
31872
- case 'rare':
31873
- return '#0070dd';
31874
- case 'uncommon':
31875
- return '#1eff00';
31767
+ var LootChance = /*#__PURE__*/styled.span.withConfig({
31768
+ displayName: "InformationCenterNPCDetails__LootChance",
31769
+ componentId: "sc-fdu3xl-24"
31770
+ })(["color:", ";font-size:0.45rem;"], uiColors.yellow);
31771
+ var LootQuantity = /*#__PURE__*/styled.span.withConfig({
31772
+ displayName: "InformationCenterNPCDetails__LootQuantity",
31773
+ componentId: "sc-fdu3xl-25"
31774
+ })(["color:", ";font-size:0.45rem;"], uiColors.lightGray);
31775
+ var PaginationContainer$2 = /*#__PURE__*/styled.div.withConfig({
31776
+ displayName: "InformationCenterNPCDetails__PaginationContainer",
31777
+ componentId: "sc-fdu3xl-26"
31778
+ })(["display:flex;justify-content:center;padding:12px;"]);
31779
+ var StyledPagination = /*#__PURE__*/styled(Pagination).withConfig({
31780
+ displayName: "InformationCenterNPCDetails__StyledPagination",
31781
+ componentId: "sc-fdu3xl-27"
31782
+ })(["font-size:0.6rem;"]);
31783
+
31784
+ var EffectsList$2 = /*#__PURE__*/styled.div.withConfig({
31785
+ displayName: "InformationCenterNPCTooltip__EffectsList",
31786
+ componentId: "sc-j2o39s-0"
31787
+ })(["display:flex;gap:8px;flex-wrap:wrap;"]);
31788
+ var EffectItem$2 = /*#__PURE__*/styled.span.withConfig({
31789
+ displayName: "InformationCenterNPCTooltip__EffectItem",
31790
+ componentId: "sc-j2o39s-1"
31791
+ })(["font-size:0.5rem;color:", ";background:rgba(255,255,255,0.1);padding:2px 6px;border-radius:4px;"], uiColors.white);
31792
+ var SpellList = /*#__PURE__*/styled.div.withConfig({
31793
+ displayName: "InformationCenterNPCTooltip__SpellList",
31794
+ componentId: "sc-j2o39s-2"
31795
+ })(["display:flex;flex-direction:column;gap:2px;"]);
31796
+ var SpellItem$1 = /*#__PURE__*/styled.div.withConfig({
31797
+ displayName: "InformationCenterNPCTooltip__SpellItem",
31798
+ componentId: "sc-j2o39s-3"
31799
+ })(["display:flex;align-items:center;justify-content:space-between;font-size:0.5rem;color:", ";background:rgba(255,255,255,0.05);padding:2px 6px;border-radius:4px;"], uiColors.white);
31800
+ var SpellInfo = /*#__PURE__*/styled.span.withConfig({
31801
+ displayName: "InformationCenterNPCTooltip__SpellInfo",
31802
+ componentId: "sc-j2o39s-4"
31803
+ })(["color:", ";margin-left:8px;opacity:0.8;"], uiColors.yellow);
31804
+ var LootList = /*#__PURE__*/styled.div.withConfig({
31805
+ displayName: "InformationCenterNPCTooltip__LootList",
31806
+ componentId: "sc-j2o39s-5"
31807
+ })(["display:flex;flex-direction:column;gap:2px;"]);
31808
+ var LootItem$1 = /*#__PURE__*/styled.div.withConfig({
31809
+ displayName: "InformationCenterNPCTooltip__LootItem",
31810
+ componentId: "sc-j2o39s-6"
31811
+ })(["display:flex;align-items:center;gap:4px;font-size:0.5rem;background:rgba(255,255,255,0.05);padding:4px 6px;border-radius:4px;.sprite-from-atlas-img{top:0px;left:0px;}"]);
31812
+ var LootName$1 = /*#__PURE__*/styled.span.withConfig({
31813
+ displayName: "InformationCenterNPCTooltip__LootName",
31814
+ componentId: "sc-j2o39s-7"
31815
+ })(["color:", ";flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:4px;"], uiColors.white);
31816
+ var LootChance$1 = /*#__PURE__*/styled.span.withConfig({
31817
+ displayName: "InformationCenterNPCTooltip__LootChance",
31818
+ componentId: "sc-j2o39s-8"
31819
+ })(["color:", ";font-size:0.45rem;text-transform:lowercase;opacity:0.8;"], uiColors.yellow);
31820
+ var MoreIndicator = /*#__PURE__*/styled.div.withConfig({
31821
+ displayName: "InformationCenterNPCTooltip__MoreIndicator",
31822
+ componentId: "sc-j2o39s-9"
31823
+ })(["color:", ";font-size:0.45rem;text-align:center;margin-top:2px;opacity:0.7;"], uiColors.yellow);
31824
+ var formatText = function formatText(text) {
31825
+ if (typeof text === 'number') {
31826
+ return text.toString();
31827
+ }
31828
+ return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ');
31829
+ };
31830
+ var formatRarity = function formatRarity(rarity) {
31831
+ switch (rarity) {
31832
+ case 0.5:
31833
+ return 'Very Rare';
31834
+ case 1:
31835
+ return 'Rare';
31836
+ case 10:
31837
+ return 'Uncommon';
31838
+ case 15:
31839
+ return 'Semi Common';
31840
+ case 20:
31841
+ return 'Common';
31842
+ case 35:
31843
+ return 'Very Common';
31876
31844
  default:
31877
- return '#ffffff';
31845
+ return 'Unknown';
31878
31846
  }
31879
- });
31880
- var InformationCenterItemTooltip = function InformationCenterItemTooltip(_ref) {
31881
- var item = _ref.item;
31882
- return React.createElement(BaseTooltip, null, React.createElement(ItemHeader$1, null, React.createElement(TooltipTitle$1, null, item.name)), React.createElement(Description$3, null, item.description), React.createElement(Section, null, React.createElement(SectionTitle, null, "Details"), React.createElement(StatsContainer, null, React.createElement(StatItem$1, null, "Type: ", item.type), React.createElement(StatItem$1, null, "Weight: ", item.weight), item.attack !== undefined && React.createElement(StatItem$1, null, "Attack: ", item.attack), item.defense !== undefined && React.createElement(StatItem$1, null, "Defense: ", item.defense), item.tier !== undefined && React.createElement(StatItem$1, null, "Tier: ", item.tier), item.rangeType && React.createElement(StatItem$1, null, "Range: ", item.rangeType))), React.createElement(Section, null, React.createElement(SectionTitle, null, "Market"), React.createElement(StatsContainer, null, React.createElement(StatItem$1, null, "Price: ", item.basePrice), item.rarity && React.createElement(StatItem$1, null, "Rarity:", ' ', React.createElement(RarityText, {
31883
- rarity: item.rarity
31884
- }, item.rarity)))));
31847
+ };
31848
+ var InformationCenterNPCTooltip = function InformationCenterNPCTooltip(_ref) {
31849
+ var _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
31850
+ var npc = _ref.npc,
31851
+ itemsAtlasJSON = _ref.itemsAtlasJSON,
31852
+ itemsAtlasIMG = _ref.itemsAtlasIMG;
31853
+ return React.createElement(BaseTooltip, null, React.createElement(TooltipTitle$1, null, npc.name), React.createElement(StatsContainer, null, React.createElement(StatItem$1, null, "HP: ", npc.baseHealth), React.createElement(StatItem$1, null, "LVL: ", npc.skills.level), React.createElement(StatItem$1, null, "STR: ", ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) || '-'), React.createElement(StatItem$1, null, "DEX: ", ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) || '-'), React.createElement(StatItem$1, null, "RES: ", ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) || '-'), React.createElement(StatItem$1, null, "SPD: ", formatText(npc.speed))), npc.entityEffects && npc.entityEffects.length > 0 && React.createElement(Section, null, React.createElement(SectionTitle, null, "Effects"), React.createElement(EffectsList$2, null, npc.entityEffects.map(function (effect) {
31854
+ return React.createElement(EffectItem$2, {
31855
+ key: effect
31856
+ }, formatText(effect));
31857
+ }))), npc.areaSpells && npc.areaSpells.length > 0 && React.createElement(Section, null, React.createElement(SectionTitle, null, "Spells"), React.createElement(SpellList, null, npc.areaSpells.map(function (spell) {
31858
+ return React.createElement(SpellItem$1, {
31859
+ key: spell.spellKey
31860
+ }, formatText(spell.spellKey), React.createElement(SpellInfo, null, formatText(spell.power), ", ", spell.probability, "%"));
31861
+ }))), npc.loots && npc.loots.length > 0 && React.createElement(Section, null, React.createElement(SectionTitle, null, "Possible Loot"), React.createElement(LootList, null, npc.loots.slice(0, 4).map(function (loot) {
31862
+ return React.createElement(LootItem$1, {
31863
+ key: loot.itemBlueprintKey
31864
+ }, React.createElement(SpriteFromAtlas, {
31865
+ atlasIMG: itemsAtlasIMG,
31866
+ atlasJSON: itemsAtlasJSON,
31867
+ spriteKey: loot.itemBlueprintKey,
31868
+ imgScale: 1
31869
+ }), React.createElement(LootName$1, null, formatItemName(loot.itemBlueprintKey)), React.createElement(LootChance$1, null, formatRarity(loot.chance)));
31870
+ }), npc.loots.length > 4 && React.createElement(MoreIndicator, null, "..."))));
31885
31871
  };
31886
31872
 
31887
- var TOOLTIP_OFFSET = 20;
31888
- var InformationCenterItemsSection = function InformationCenterItemsSection(_ref) {
31889
- var items = _ref.items,
31890
- bestiaryItems = _ref.bestiaryItems,
31873
+ var InformationCenterBestiarySection = function InformationCenterBestiarySection(_ref) {
31874
+ var bestiaryItems = _ref.bestiaryItems,
31891
31875
  itemsAtlasJSON = _ref.itemsAtlasJSON,
31892
31876
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31877
+ iconsAtlasIMG = _ref.iconsAtlasIMG,
31878
+ iconsAtlasJSON = _ref.iconsAtlasJSON,
31879
+ entitiesAtlasJSON = _ref.entitiesAtlasJSON,
31880
+ entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31893
31881
  initialSearchQuery = _ref.initialSearchQuery,
31894
31882
  tabId = _ref.tabId;
31895
31883
  var _useState = useState(initialSearchQuery),
31896
31884
  searchQuery = _useState[0],
31897
31885
  setSearchQuery = _useState[1];
31898
- var _useState2 = useState('all'),
31899
- selectedItemCategory = _useState2[0],
31900
- setSelectedItemCategory = _useState2[1];
31886
+ var _useState2 = useState(null),
31887
+ tooltipData = _useState2[0],
31888
+ setTooltipData = _useState2[1];
31901
31889
  var _useState3 = useState(null),
31902
- hoveredItem = _useState3[0],
31903
- setHoveredItem = _useState3[1];
31904
- var _useState4 = useState({
31905
- x: 0,
31906
- y: 0
31907
- }),
31908
- tooltipPosition = _useState4[0],
31909
- setTooltipPosition = _useState4[1];
31910
- var _useState5 = useState(null),
31911
- selectedItem = _useState5[0],
31912
- setSelectedItem = _useState5[1];
31913
- var itemCategoryOptions = [{
31914
- id: 0,
31915
- value: 'all',
31916
- option: 'All Items'
31917
- }, {
31918
- id: 1,
31919
- value: ItemType.Consumable,
31920
- option: 'Consumables'
31921
- }, {
31922
- id: 2,
31923
- value: ItemType.Weapon,
31924
- option: 'Weapons'
31925
- }, {
31926
- id: 3,
31927
- value: ItemType.Armor,
31928
- option: 'Armor'
31929
- }];
31930
- var filteredItems = items.filter(function (item) {
31931
- return (selectedItemCategory === 'all' || item.type === selectedItemCategory) && item.name.toLowerCase().includes(searchQuery.toLowerCase());
31932
- });
31933
- var getDroppedByNPCs = function getDroppedByNPCs(itemId, npcs) {
31934
- return npcs.filter(function (npc) {
31935
- var _npc$loots;
31936
- return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
31937
- return loot.itemBlueprintKey === itemId;
31938
- });
31939
- }) || [];
31940
- };
31941
- var handleMouseEnter = function handleMouseEnter(e, item) {
31942
- setTooltipPosition({
31943
- x: e.clientX + TOOLTIP_OFFSET,
31944
- y: e.clientY
31945
- });
31946
- setHoveredItem(item);
31947
- };
31948
- var handleMouseMove = function handleMouseMove(e) {
31949
- if (hoveredItem) {
31950
- setTooltipPosition({
31951
- x: e.clientX + TOOLTIP_OFFSET,
31952
- y: e.clientY
31890
+ selectedMonster = _useState3[0],
31891
+ setSelectedMonster = _useState3[1];
31892
+ var _useState4 = useState('ontouchstart' in window),
31893
+ isTouchDevice = _useState4[0];
31894
+ var handleMouseEnter = function handleMouseEnter(monster, event) {
31895
+ if (!isTouchDevice && !selectedMonster) {
31896
+ setTooltipData({
31897
+ npc: monster,
31898
+ position: {
31899
+ x: event.clientX,
31900
+ y: event.clientY
31901
+ }
31953
31902
  });
31954
31903
  }
31955
31904
  };
31956
31905
  var handleMouseLeave = function handleMouseLeave() {
31957
- setHoveredItem(null);
31906
+ if (!isTouchDevice) {
31907
+ setTooltipData(null);
31908
+ }
31958
31909
  };
31959
- var handleTouchStart = function handleTouchStart(e, item) {
31960
- var touch = e.touches[0];
31961
- setTooltipPosition({
31962
- x: touch.clientX + TOOLTIP_OFFSET,
31963
- y: touch.clientY
31964
- });
31965
- setHoveredItem(item);
31910
+ var handleMouseMove = function handleMouseMove(event) {
31911
+ if (!isTouchDevice && tooltipData) {
31912
+ setTooltipData(_extends({}, tooltipData, {
31913
+ position: {
31914
+ x: event.clientX,
31915
+ y: event.clientY
31916
+ }
31917
+ }));
31918
+ }
31966
31919
  };
31967
- var handleItemClick = function handleItemClick(item) {
31968
- setSelectedItem(item);
31969
- setHoveredItem(null);
31920
+ var handleTouchStart = function handleTouchStart(monster, event) {
31921
+ if (isTouchDevice) {
31922
+ event.preventDefault();
31923
+ var touch = event.touches[0];
31924
+ if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
31925
+ setTooltipData(null);
31926
+ } else {
31927
+ setTooltipData({
31928
+ npc: monster,
31929
+ position: {
31930
+ x: touch.clientX,
31931
+ y: touch.clientY
31932
+ }
31933
+ });
31934
+ }
31935
+ }
31936
+ };
31937
+ var handleMonsterClick = function handleMonsterClick(monster) {
31938
+ setSelectedMonster(monster);
31939
+ setTooltipData(null);
31970
31940
  };
31941
+ var _useState5 = useState('all'),
31942
+ selectedBestiaryCategory = _useState5[0],
31943
+ setSelectedBestiaryCategory = _useState5[1];
31944
+ var bestiaryCategoryOptions = [{
31945
+ id: 0,
31946
+ value: 'all',
31947
+ option: 'All Monsters'
31948
+ }, {
31949
+ id: 1,
31950
+ value: 'bosses',
31951
+ option: 'Bosses'
31952
+ }].concat(Object.entries(NPCAlignment).map(function (_ref2, index) {
31953
+ var value = _ref2[1];
31954
+ return {
31955
+ id: index + 1,
31956
+ value: value,
31957
+ option: formatItemType(value)
31958
+ };
31959
+ }));
31971
31960
  var renderItem = function renderItem(item) {
31972
31961
  return React.createElement(InformationCenterCell, {
31973
- key: item.key,
31962
+ key: item.id,
31974
31963
  name: item.name,
31975
- spriteKey: item.texturePath,
31976
- atlasJSON: itemsAtlasJSON,
31977
- atlasIMG: itemsAtlasIMG,
31964
+ spriteKey: item.key,
31965
+ atlasJSON: entitiesAtlasJSON,
31966
+ atlasIMG: entitiesAtlasIMG,
31967
+ onClick: function onClick() {
31968
+ return handleMonsterClick(item);
31969
+ },
31978
31970
  onMouseEnter: function onMouseEnter(e) {
31979
- return handleMouseEnter(e, item);
31971
+ return handleMouseEnter(item, e);
31980
31972
  },
31981
- onMouseMove: handleMouseMove,
31982
31973
  onMouseLeave: handleMouseLeave,
31974
+ onMouseMove: handleMouseMove,
31983
31975
  onTouchStart: function onTouchStart(e) {
31984
- return handleTouchStart(e, item);
31985
- },
31986
- onClick: function onClick() {
31987
- return handleItemClick(item);
31976
+ return handleTouchStart(item, e);
31977
+ }
31978
+ });
31979
+ };
31980
+ var filteredItems = useMemo(function () {
31981
+ return bestiaryItems.filter(function (item) {
31982
+ var matchesSearch = item.name.toLowerCase().includes(searchQuery.toLowerCase());
31983
+ var matchesCategory = true;
31984
+ if (selectedBestiaryCategory === 'bosses') {
31985
+ matchesCategory = item.isBoss === true;
31986
+ } else if (selectedBestiaryCategory === NPCAlignment.Hostile) {
31987
+ matchesCategory = item.alignment === NPCAlignment.Hostile && !item.isBoss;
31988
+ } else if (selectedBestiaryCategory !== 'all') {
31989
+ matchesCategory = item.alignment === selectedBestiaryCategory;
31988
31990
  }
31991
+ return matchesSearch && matchesCategory;
31989
31992
  });
31993
+ }, [bestiaryItems, searchQuery, selectedBestiaryCategory]);
31994
+ var handleSearchChange = function handleSearchChange(newQuery) {
31995
+ setSearchQuery(newQuery);
31996
+ if (newQuery && selectedBestiaryCategory !== 'all') {
31997
+ setSelectedBestiaryCategory('all');
31998
+ }
31990
31999
  };
31991
32000
  return React.createElement(React.Fragment, null, React.createElement(PaginatedContent, {
31992
32001
  items: filteredItems,
31993
32002
  renderItem: renderItem,
31994
- emptyMessage: "No items found",
32003
+ emptyMessage: "No monsters found",
32004
+ tabId: tabId,
32005
+ layout: "grid",
31995
32006
  filterOptions: {
31996
- options: itemCategoryOptions,
31997
- selectedOption: selectedItemCategory,
31998
- onOptionChange: setSelectedItemCategory
32007
+ options: bestiaryCategoryOptions,
32008
+ selectedOption: selectedBestiaryCategory,
32009
+ onOptionChange: setSelectedBestiaryCategory
31999
32010
  },
32000
32011
  searchOptions: {
32001
32012
  value: searchQuery,
32002
- onChange: setSearchQuery,
32003
- placeholder: 'Search items...'
32013
+ onChange: handleSearchChange,
32014
+ placeholder: 'Search monsters...'
32004
32015
  },
32005
- dependencies: [selectedItemCategory],
32006
- tabId: tabId,
32007
- layout: "grid",
32016
+ dependencies: [selectedBestiaryCategory],
32008
32017
  itemHeight: "180px"
32009
- }), hoveredItem && React.createElement(TooltipWrapper$1, {
32018
+ }), tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
32010
32019
  style: {
32011
- top: tooltipPosition.y,
32012
- left: tooltipPosition.x
32020
+ position: 'fixed',
32021
+ left: tooltipData.position.x + 10,
32022
+ top: tooltipData.position.y + 10
32013
32023
  }
32014
- }, React.createElement(InformationCenterItemTooltip, {
32015
- item: hoveredItem
32016
- })), selectedItem && React.createElement(InformationCenterItemDetails, {
32017
- item: selectedItem,
32024
+ }, React.createElement(InformationCenterNPCTooltip, {
32025
+ npc: tooltipData.npc,
32026
+ itemsAtlasJSON: itemsAtlasJSON,
32027
+ itemsAtlasIMG: itemsAtlasIMG
32028
+ }))), selectedMonster && React.createElement(InformationCenterNPCDetails, {
32029
+ npc: selectedMonster,
32018
32030
  itemsAtlasJSON: itemsAtlasJSON,
32019
32031
  itemsAtlasIMG: itemsAtlasIMG,
32020
- droppedBy: getDroppedByNPCs(selectedItem.key, bestiaryItems),
32032
+ iconAtlasIMG: iconsAtlasIMG,
32033
+ iconAtlasJSON: iconsAtlasJSON,
32034
+ entitiesAtlasJSON: entitiesAtlasJSON,
32035
+ entitiesAtlasIMG: entitiesAtlasIMG,
32021
32036
  onBack: function onBack() {
32022
- return setSelectedItem(null);
32037
+ return setSelectedMonster(null);
32023
32038
  }
32024
32039
  }));
32025
32040
  };
32026
32041
  var TooltipWrapper$1 = /*#__PURE__*/styled.div.withConfig({
32027
- displayName: "InformationCenterItemsSection__TooltipWrapper",
32028
- componentId: "sc-1wmpapt-0"
32029
- })(["position:fixed;z-index:1000;pointer-events:none;transition:transform 0.1s ease;"]);
32042
+ displayName: "InformationCenterBestiarySection__TooltipWrapper",
32043
+ componentId: "sc-e3h0p2-0"
32044
+ })(["position:fixed;z-index:1000;pointer-events:none;width:300px;"]);
32045
+
32046
+ var InformationCenterFAQSection = function InformationCenterFAQSection(_ref) {
32047
+ var faqItems = _ref.faqItems,
32048
+ initialSearchQuery = _ref.initialSearchQuery,
32049
+ tabId = _ref.tabId;
32050
+ var _useState = useState(initialSearchQuery),
32051
+ searchQuery = _useState[0],
32052
+ setSearchQuery = _useState[1];
32053
+ useEffect(function () {
32054
+ setSearchQuery(initialSearchQuery);
32055
+ }, [initialSearchQuery]);
32056
+ var filteredFaqs = useMemo(function () {
32057
+ if (!searchQuery) return faqItems;
32058
+ return faqItems.filter(function (faq) {
32059
+ return faq.question.toLowerCase().includes(searchQuery.toLowerCase()) || faq.answer.toLowerCase().includes(searchQuery.toLowerCase());
32060
+ });
32061
+ }, [searchQuery, faqItems]);
32062
+ var renderItem = function renderItem(item) {
32063
+ return React.createElement(StyledCollapsible$2, {
32064
+ title: item.question
32065
+ }, React.createElement(Answer$1, null, item.answer));
32066
+ };
32067
+ return React.createElement(Container$q, null, React.createElement(SearchHeader, {
32068
+ searchOptions: {
32069
+ value: searchQuery,
32070
+ onChange: setSearchQuery,
32071
+ placeholder: 'Search FAQs...'
32072
+ }
32073
+ }), React.createElement(PaginatedContent, {
32074
+ items: filteredFaqs,
32075
+ renderItem: renderItem,
32076
+ emptyMessage: "No FAQ items found",
32077
+ tabId: tabId,
32078
+ layout: "list",
32079
+ itemsPerPage: 10
32080
+ }));
32081
+ };
32082
+ var Container$q = /*#__PURE__*/styled.div.withConfig({
32083
+ displayName: "InformationCenterFaqSection__Container",
32084
+ componentId: "sc-ofmaa9-0"
32085
+ })(["display:flex;flex-direction:column;gap:1rem;width:100%;"]);
32086
+ var StyledCollapsible$2 = /*#__PURE__*/styled(Collapsible).withConfig({
32087
+ displayName: "InformationCenterFaqSection__StyledCollapsible",
32088
+ componentId: "sc-ofmaa9-1"
32089
+ })(["margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]);
32090
+ var Answer$1 = /*#__PURE__*/styled.p.withConfig({
32091
+ displayName: "InformationCenterFaqSection__Answer",
32092
+ componentId: "sc-ofmaa9-2"
32093
+ })(["font-size:0.9rem;color:#ffffff;margin:0;line-height:1.5;"]);
32030
32094
 
32095
+ var ITEMS_PER_PAGE$2 = 3;
32096
+ var GRID_COLUMNS = 3;
32031
32097
  var InformationCenterTutorialsSection = function InformationCenterTutorialsSection(_ref) {
32032
32098
  var videoGuides = _ref.videoGuides,
32033
32099
  initialSearchQuery = _ref.initialSearchQuery,
@@ -32038,84 +32104,119 @@ var InformationCenterTutorialsSection = function InformationCenterTutorialsSecti
32038
32104
  var _useState2 = useState('all'),
32039
32105
  selectedCategory = _useState2[0],
32040
32106
  setSelectedCategory = _useState2[1];
32107
+ var _useState3 = useState(1),
32108
+ setCurrentPage = _useState3[1];
32109
+ var getYouTubeThumbnail = function getYouTubeThumbnail(videoUrl) {
32110
+ var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/;
32111
+ var match = videoUrl.match(regExp);
32112
+ var videoId = match && match[2].length === 11 ? match[2] : null;
32113
+ return videoId ? "https://img.youtube.com/vi/" + videoId + "/hqdefault.jpg" : '/placeholder-thumbnail.png';
32114
+ };
32041
32115
  var categoryOptions = [{
32042
32116
  id: 0,
32043
32117
  value: 'all',
32044
- option: 'All'
32045
- }, {
32046
- id: 1,
32047
- value: 'Combat',
32048
- option: 'Combat'
32049
- }, {
32050
- id: 2,
32051
- value: 'Crafting',
32052
- option: 'Crafting'
32053
- }, {
32054
- id: 3,
32055
- value: 'Exploration',
32056
- option: 'Exploration'
32057
- }, {
32058
- id: 4,
32059
- value: 'General',
32060
- option: 'General'
32061
- }];
32118
+ option: 'All Categories'
32119
+ }].concat(VideoGuideCategory ? Object.entries(VideoGuideCategory).map(function (_ref2, index) {
32120
+ var value = _ref2[1];
32121
+ return {
32122
+ id: index + 1,
32123
+ value: value,
32124
+ option: formatItemType(value)
32125
+ };
32126
+ }) : [], VideoGuideLanguage ? Object.entries(VideoGuideLanguage).map(function (_ref3, index) {
32127
+ var value = _ref3[1];
32128
+ return {
32129
+ id: index + (VideoGuideCategory ? Object.entries(VideoGuideCategory).length : 0) + 1,
32130
+ value: value,
32131
+ option: formatItemType(value)
32132
+ };
32133
+ }) : []);
32134
+ var handleVideoClick = function handleVideoClick(videoUrl) {
32135
+ window.open(videoUrl, '_blank', 'noopener,noreferrer');
32136
+ };
32062
32137
  var renderItem = function renderItem(guide) {
32063
32138
  return React.createElement(GuideItem, {
32064
- key: guide.id
32139
+ key: guide.id,
32140
+ onClick: function onClick() {
32141
+ return handleVideoClick(guide.videoUrl);
32142
+ }
32065
32143
  }, React.createElement(GuideThumbnail, null, React.createElement("img", {
32066
- src: guide.thumbnailUrl || '/placeholder-thumbnail.png',
32144
+ src: guide.localImage || getYouTubeThumbnail(guide.videoUrl),
32067
32145
  alt: guide.title
32068
- })), React.createElement(GuideContent, null, React.createElement(GuideTitle, null, guide.title), React.createElement(GuideDescription, null, guide.description), React.createElement(GuideCategory, null, guide.category)));
32146
+ })), React.createElement(GuideContent, null, React.createElement(GuideTitle, null, guide.title), React.createElement(GuideDescription, null, guide.description), React.createElement(GuideLabelsContainer, null, React.createElement(GuideCategory, null, guide.category), React.createElement(GuideLanguage, null, guide.language))));
32147
+ };
32148
+ var filteredGuides = useMemo(function () {
32149
+ return videoGuides.filter(function (guide) {
32150
+ var matchesSearch = guide.title.toLowerCase().includes(searchQuery.toLowerCase()) || guide.description.toLowerCase().includes(searchQuery.toLowerCase());
32151
+ var matchesCategory = selectedCategory === 'all' || Object.values(VideoGuideCategory).includes(selectedCategory) && guide.category === selectedCategory || Object.values(VideoGuideLanguage).includes(selectedCategory) && guide.language === selectedCategory;
32152
+ return matchesSearch && matchesCategory;
32153
+ });
32154
+ }, [videoGuides, searchQuery, selectedCategory]);
32155
+ var handleSearchChange = function handleSearchChange(newQuery) {
32156
+ setSearchQuery(newQuery);
32157
+ setCurrentPage(1);
32158
+ if (newQuery && selectedCategory !== 'all') {
32159
+ setSelectedCategory('all');
32160
+ }
32161
+ };
32162
+ var handleCategoryChange = function handleCategoryChange(category) {
32163
+ setSelectedCategory(category);
32164
+ setCurrentPage(1);
32069
32165
  };
32070
- var filteredGuides = videoGuides.filter(function (guide) {
32071
- return (selectedCategory === 'all' || guide.category === selectedCategory) && (guide.title.toLowerCase().includes(searchQuery.toLowerCase()) || guide.description.toLowerCase().includes(searchQuery.toLowerCase()));
32072
- });
32073
32166
  return React.createElement(PaginatedContent, {
32074
32167
  items: filteredGuides,
32075
32168
  renderItem: renderItem,
32076
32169
  emptyMessage: "No guides found",
32077
32170
  searchOptions: {
32078
32171
  value: searchQuery,
32079
- onChange: setSearchQuery,
32172
+ onChange: handleSearchChange,
32080
32173
  placeholder: 'Search guides...'
32081
32174
  },
32082
32175
  filterOptions: {
32083
32176
  options: categoryOptions,
32084
32177
  selectedOption: selectedCategory,
32085
- onOptionChange: setSelectedCategory
32178
+ onOptionChange: handleCategoryChange
32086
32179
  },
32087
32180
  dependencies: [selectedCategory],
32088
32181
  tabId: tabId,
32089
32182
  layout: "grid",
32090
- gridColumns: 3,
32091
- itemsPerPage: 3,
32092
- itemHeight: "400px"
32183
+ gridColumns: GRID_COLUMNS,
32184
+ itemsPerPage: ITEMS_PER_PAGE$2,
32185
+ itemHeight: "320px"
32093
32186
  });
32094
32187
  };
32095
32188
  var GuideItem = /*#__PURE__*/styled.div.withConfig({
32096
32189
  displayName: "InformationCenterTutorialsSection__GuideItem",
32097
32190
  componentId: "sc-1gk05vk-0"
32098
- })(["background:rgba(0,0,0,0.3);border-radius:4px;overflow:hidden;border:1px solid ", ";cursor:pointer;transition:transform 0.2s ease;height:100%;&:hover{transform:translateY(-2px);}"], uiColors.darkGray);
32191
+ })(["background:rgba(0,0,0,0.3);border-radius:4px;overflow:hidden;border:1px solid ", ";cursor:pointer;transition:transform 0.2s ease;display:flex;flex-direction:column;height:100%;padding:0;&:hover{transform:translateY(-2px);}"], uiColors.darkGray);
32099
32192
  var GuideThumbnail = /*#__PURE__*/styled.div.withConfig({
32100
32193
  displayName: "InformationCenterTutorialsSection__GuideThumbnail",
32101
32194
  componentId: "sc-1gk05vk-1"
32102
- })(["width:100%;height:168px;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}font-size:0.8rem;line-height:1.8;"]);
32195
+ })(["width:100%;height:168px;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}"]);
32103
32196
  var GuideContent = /*#__PURE__*/styled.div.withConfig({
32104
32197
  displayName: "InformationCenterTutorialsSection__GuideContent",
32105
32198
  componentId: "sc-1gk05vk-2"
32106
- })(["padding:12px;"]);
32199
+ })(["padding:0 12px 12px;flex:1;display:flex;flex-direction:column;"]);
32107
32200
  var GuideTitle = /*#__PURE__*/styled.h3.withConfig({
32108
32201
  displayName: "InformationCenterTutorialsSection__GuideTitle",
32109
32202
  componentId: "sc-1gk05vk-3"
32110
- })(["margin:0;font-size:0.6rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:8px;"], uiColors.yellow);
32203
+ })(["margin:0;font-size:0.6rem !important;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:5px;"], uiColors.yellow);
32111
32204
  var GuideDescription = /*#__PURE__*/styled.p.withConfig({
32112
32205
  displayName: "InformationCenterTutorialsSection__GuideDescription",
32113
32206
  componentId: "sc-1gk05vk-4"
32114
- })(["margin:0;font-size:0.55rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:8px;line-height:1.4;"], uiColors.lightGray);
32115
- var GuideCategory = /*#__PURE__*/styled.span.withConfig({
32207
+ })(["margin:0;font-size:0.5rem !important;color:", ";text-align:center;font-family:'Press Start 2P',cursive;margin-bottom:8px;line-height:1.4;"], uiColors.lightGray);
32208
+ var GuideCategory = /*#__PURE__*/styled.label.withConfig({
32116
32209
  displayName: "InformationCenterTutorialsSection__GuideCategory",
32117
32210
  componentId: "sc-1gk05vk-5"
32118
- })(["font-size:0.5rem;color:", ";font-family:'Press Start 2P',cursive;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.yellow);
32211
+ })(["font-size:0.5rem !important;font-family:'Press Start 2P',cursive;color:", " !important;line-height:1.4;&::before{content:'\uD83C\uDFF7\uFE0F';padding-right:6px;font-size:0.7rem;transform:translateY(-2px);display:inline-block;}"], uiColors.yellow);
32212
+ var GuideLanguage = /*#__PURE__*/styled.label.withConfig({
32213
+ displayName: "InformationCenterTutorialsSection__GuideLanguage",
32214
+ componentId: "sc-1gk05vk-6"
32215
+ })(["font-size:0.5rem !important;font-family:'Press Start 2P',cursive;color:", " !important;line-height:1.4;&::before{content:'\uD83C\uDF10';padding-right:6px;font-size:0.6rem;transform:translateY(-2px);display:inline-block;}"], uiColors.blue);
32216
+ var GuideLabelsContainer = /*#__PURE__*/styled.div.withConfig({
32217
+ displayName: "InformationCenterTutorialsSection__GuideLabelsContainer",
32218
+ componentId: "sc-1gk05vk-7"
32219
+ })(["display:flex;justify-content:space-between;padding:0 6px 6px;"]);
32119
32220
 
32120
32221
  var InformationCenter = function InformationCenter(_ref) {
32121
32222
  var itemsAtlasJSON = _ref.itemsAtlasJSON,