@eveshipfit/ui-ingame 1.15.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -5
- package/dist/index.mjs +656 -534
- package/dist/style.css +6 -0
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import './style.css';
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { Activity, Fragment, createContext, useContext, useDeferredValue, useEffect, useEffectEvent, useId, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { UNIFORM, canSaveFits, formatAttribute, formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useBoosters, useBrowse, useCanFit, useCharacters, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDamageProfiles, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitSaving, useFitStore, useHardpoints, useHasRoom, useHullRefuses, useHullTree, useImages, useImplantSearch, useImplantTree, useImplants, useInfo, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, useMutate, usePersonalFits, usePlacement, usePreview, useRackUsage, useRefusal, useSde, useShowInfo, useShownSnapshot, useSlots, useSnapshot, useStats, useType, useTypeBonuses, useTypePrice } from "@eveshipfit/react-hooks";
|
|
5
|
+
import { UNIFORM, canSaveFits, formatAttribute, formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useBoosters, useBrowse, useCanFit, useCharacters, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDamageProfiles, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitSaving, useFitStore, useHardpoints, useHasFit, useHasRoom, useHullRefuses, useHullTree, useImages, useImplantSearch, useImplantTree, useImplants, useInfo, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, useMutate, usePersonalFits, usePlacement, usePreview, useRackUsage, useRefusal, useSde, useShowInfo, useShownSnapshot, useSlots, useSnapshot, useSnapshotIfAny, useStats, useType, useTypeBonuses, useTypePrice } from "@eveshipfit/react-hooks";
|
|
6
6
|
import { baseValue, canMutate, clampToRange, mutaplasmidsOf, mutatedDronesOf, mutationRanges, mutationRollOf, parseItemLink, parseMutationText, rollFits, rollMutation, squadronSize, tubeTakes, withMutaplasmid } from "@eveshipfit/fitting";
|
|
7
7
|
// src/primitives/Dialog/Dialog.module.css
|
|
8
8
|
var Dialog_module_default = {
|
|
@@ -6763,8 +6763,8 @@ function Variations(t0) {
|
|
|
6763
6763
|
$[5] = t5;
|
|
6764
6764
|
} else t5 = $[5];
|
|
6765
6765
|
useEffect(t4, t5);
|
|
6766
|
-
const fit =
|
|
6767
|
-
const module = typeof ref === "number" ? fit
|
|
6766
|
+
const fit = useSnapshotIfAny()?.fit;
|
|
6767
|
+
const module = typeof ref === "number" ? fit?.items[ref] : void 0;
|
|
6768
6768
|
const charges = useCharges(fitted?.charge ? module?.type_id : void 0);
|
|
6769
6769
|
let t6;
|
|
6770
6770
|
if ($[6] !== anchor || $[7] !== charges || $[8] !== fitted || $[9] !== hold || $[10] !== preview || $[11] !== ref || $[12] !== refuse || $[13] !== refuses || $[14] !== release || $[15] !== show || $[16] !== store) {
|
|
@@ -10003,8 +10003,9 @@ const oneDecimal = new Intl.NumberFormat("en-US", {
|
|
|
10003
10003
|
/** EVE draws eight, those the structure does not have as a faint outline. */
|
|
10004
10004
|
const SERVICE_SLOTS = 8;
|
|
10005
10005
|
/** EVE's fitting window around the `FittingWheel`. */
|
|
10006
|
-
function FittingWindow({ label = "Fitting Window", browser, statistics: givenStatistics, preview = false, placeholder }) {
|
|
10007
|
-
const
|
|
10006
|
+
function FittingWindow({ label = "Fitting Window", browser, statistics: givenStatistics, preview = false, placeholder = "Pick a hull to start." }) {
|
|
10007
|
+
const hasFit = useHasFit();
|
|
10008
|
+
const statistics = hasFit ? givenStatistics : void 0;
|
|
10008
10009
|
const [browserOpen, setBrowserOpen] = useState(true);
|
|
10009
10010
|
const { request } = useBrowse();
|
|
10010
10011
|
const [browsed, setBrowsed] = useState(request);
|
|
@@ -10017,131 +10018,250 @@ function FittingWindow({ label = "Fitting Window", browser, statistics: givenSta
|
|
|
10017
10018
|
const statisticsId = useId();
|
|
10018
10019
|
const browserShown = browser !== void 0 && browserOpen;
|
|
10019
10020
|
const statisticsShown = statistics !== void 0 && statisticsOpen;
|
|
10020
|
-
const { stats } = useShownSnapshot();
|
|
10021
|
-
const { structure } = stats;
|
|
10022
|
-
const fighters = structure || stats.fighterBay.total > 0;
|
|
10023
10021
|
const fighterBay = useId();
|
|
10024
|
-
return /* @__PURE__ */
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
browser
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
children:
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
/* @__PURE__ */ jsx(
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
children: /* @__PURE__ */ jsx(
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
onClick: () => setBrowserOpen(!browserShown),
|
|
10069
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "hardware" })
|
|
10070
|
-
})
|
|
10071
|
-
})
|
|
10072
|
-
}),
|
|
10073
|
-
!preview && statistics !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
10074
|
-
className: FittingWindow_module_default.panels,
|
|
10075
|
-
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
10076
|
-
label: "Statistics",
|
|
10077
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
10078
|
-
type: "button",
|
|
10079
|
-
className: FittingWindow_module_default.tool,
|
|
10080
|
-
"aria-label": "Statistics",
|
|
10081
|
-
"aria-expanded": statisticsShown,
|
|
10082
|
-
"aria-controls": statisticsId,
|
|
10083
|
-
onClick: () => setStatisticsOpen(!statisticsShown),
|
|
10084
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "statistics" })
|
|
10085
|
-
})
|
|
10022
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
10023
|
+
className: FittingWindow_module_default.window,
|
|
10024
|
+
"aria-label": label,
|
|
10025
|
+
"data-browser": browserShown || void 0,
|
|
10026
|
+
"data-statistics": statisticsShown || void 0,
|
|
10027
|
+
children: [
|
|
10028
|
+
!preview && /* @__PURE__ */ jsx(ItemInfo, {}),
|
|
10029
|
+
!preview && /* @__PURE__ */ jsx(Mutate, {}),
|
|
10030
|
+
browser !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
10031
|
+
id: browserId,
|
|
10032
|
+
className: FittingWindow_module_default.browser,
|
|
10033
|
+
inert: !browserShown,
|
|
10034
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10035
|
+
className: FittingWindow_module_default.slide,
|
|
10036
|
+
children: browser
|
|
10037
|
+
})
|
|
10038
|
+
}),
|
|
10039
|
+
/* @__PURE__ */ jsxs("div", {
|
|
10040
|
+
className: FittingWindow_module_default.frame,
|
|
10041
|
+
children: [
|
|
10042
|
+
/* @__PURE__ */ jsx("div", {
|
|
10043
|
+
className: FittingWindow_module_default.wheel,
|
|
10044
|
+
children: hasFit ? /* @__PURE__ */ jsx(FittingWheel, {
|
|
10045
|
+
readOnly: preview,
|
|
10046
|
+
credit: preview
|
|
10047
|
+
}) : /* @__PURE__ */ jsx(Wheel, {
|
|
10048
|
+
label: "Fitting",
|
|
10049
|
+
children: /* @__PURE__ */ jsx(Placeholder, { text: placeholder })
|
|
10050
|
+
})
|
|
10051
|
+
}),
|
|
10052
|
+
hasFit && preview && /* @__PURE__ */ jsx(PreviewName, {}),
|
|
10053
|
+
hasFit && !preview && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FitName, {}), /* @__PURE__ */ jsx(Violations, {})] }),
|
|
10054
|
+
!preview && browser !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
10055
|
+
className: FittingWindow_module_default.tools,
|
|
10056
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
10057
|
+
label: "Item Browser",
|
|
10058
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
10059
|
+
type: "button",
|
|
10060
|
+
className: FittingWindow_module_default.tool,
|
|
10061
|
+
"aria-label": "Item Browser",
|
|
10062
|
+
"aria-expanded": browserShown,
|
|
10063
|
+
"aria-controls": browserId,
|
|
10064
|
+
onClick: () => setBrowserOpen(!browserShown),
|
|
10065
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "hardware" })
|
|
10086
10066
|
})
|
|
10087
|
-
})
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
readOnly: preview
|
|
10102
|
-
}), fighters ? /* @__PURE__ */ jsx(Bay, {
|
|
10103
|
-
id: fighterBay,
|
|
10104
|
-
bay: "fighterBay",
|
|
10105
|
-
icon: "fighter-bay",
|
|
10106
|
-
label: "Fighter Bay",
|
|
10107
|
-
readOnly: preview
|
|
10108
|
-
}) : /* @__PURE__ */ jsx(Bay, {
|
|
10109
|
-
bay: "droneBay",
|
|
10110
|
-
icon: "drone-bay",
|
|
10111
|
-
label: "Drone Bay",
|
|
10112
|
-
readOnly: preview
|
|
10113
|
-
})]
|
|
10114
|
-
}),
|
|
10115
|
-
structure && /* @__PURE__ */ jsx(ServiceRack, { readOnly: preview }),
|
|
10116
|
-
!preview && /* @__PURE__ */ jsx("div", {
|
|
10117
|
-
className: FittingWindow_module_default.history,
|
|
10118
|
-
children: /* @__PURE__ */ jsx(SimulationHistory, {})
|
|
10119
|
-
}),
|
|
10120
|
-
/* @__PURE__ */ jsxs("div", {
|
|
10121
|
-
className: FittingWindow_module_default.resources,
|
|
10122
|
-
children: [/* @__PURE__ */ jsx(Resource, {
|
|
10123
|
-
title: "CPU",
|
|
10124
|
-
free: "cpuFree",
|
|
10125
|
-
output: "cpuOutput"
|
|
10126
|
-
}), /* @__PURE__ */ jsx(Resource, {
|
|
10127
|
-
title: "Power Grid",
|
|
10128
|
-
free: "powerFree",
|
|
10129
|
-
output: "powerOutput"
|
|
10130
|
-
})]
|
|
10067
|
+
})
|
|
10068
|
+
}),
|
|
10069
|
+
!preview && statistics !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
10070
|
+
className: FittingWindow_module_default.panels,
|
|
10071
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
10072
|
+
label: "Statistics",
|
|
10073
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
10074
|
+
type: "button",
|
|
10075
|
+
className: FittingWindow_module_default.tool,
|
|
10076
|
+
"aria-label": "Statistics",
|
|
10077
|
+
"aria-expanded": statisticsShown,
|
|
10078
|
+
"aria-controls": statisticsId,
|
|
10079
|
+
onClick: () => setStatisticsOpen(!statisticsShown),
|
|
10080
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "statistics" })
|
|
10131
10081
|
})
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10082
|
+
})
|
|
10083
|
+
}),
|
|
10084
|
+
hasFit && /* @__PURE__ */ jsx(FitBays, {
|
|
10085
|
+
fighterBay,
|
|
10086
|
+
readOnly: preview
|
|
10087
|
+
})
|
|
10088
|
+
]
|
|
10089
|
+
}),
|
|
10090
|
+
statistics !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
10091
|
+
id: statisticsId,
|
|
10092
|
+
className: FittingWindow_module_default.statistics,
|
|
10093
|
+
inert: !statisticsShown,
|
|
10094
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10095
|
+
className: FittingWindow_module_default.slide,
|
|
10096
|
+
children: /* @__PURE__ */ jsx(ManageFighters, {
|
|
10097
|
+
fighterBay,
|
|
10098
|
+
readOnly: preview,
|
|
10141
10099
|
children: statistics
|
|
10142
10100
|
})
|
|
10143
10101
|
})
|
|
10144
|
-
|
|
10102
|
+
})
|
|
10103
|
+
]
|
|
10104
|
+
});
|
|
10105
|
+
}
|
|
10106
|
+
function useFighters() {
|
|
10107
|
+
const $ = c(3);
|
|
10108
|
+
const { stats } = useShownSnapshot();
|
|
10109
|
+
const t0 = stats.structure || stats.fighterBay.total > 0;
|
|
10110
|
+
let t1;
|
|
10111
|
+
if ($[0] !== stats.structure || $[1] !== t0) {
|
|
10112
|
+
t1 = {
|
|
10113
|
+
structure: stats.structure,
|
|
10114
|
+
fighters: t0
|
|
10115
|
+
};
|
|
10116
|
+
$[0] = stats.structure;
|
|
10117
|
+
$[1] = t0;
|
|
10118
|
+
$[2] = t1;
|
|
10119
|
+
} else t1 = $[2];
|
|
10120
|
+
return t1;
|
|
10121
|
+
}
|
|
10122
|
+
function ManageFighters(t0) {
|
|
10123
|
+
const $ = c(7);
|
|
10124
|
+
const { fighterBay, readOnly, children } = t0;
|
|
10125
|
+
const { fighters } = useFighters();
|
|
10126
|
+
let t1;
|
|
10127
|
+
if ($[0] !== fighterBay || $[1] !== fighters || $[2] !== readOnly) {
|
|
10128
|
+
t1 = fighters && !readOnly ? () => popover(fighterBay)?.showPopover() : void 0;
|
|
10129
|
+
$[0] = fighterBay;
|
|
10130
|
+
$[1] = fighters;
|
|
10131
|
+
$[2] = readOnly;
|
|
10132
|
+
$[3] = t1;
|
|
10133
|
+
} else t1 = $[3];
|
|
10134
|
+
const manage = t1;
|
|
10135
|
+
let t2;
|
|
10136
|
+
if ($[4] !== children || $[5] !== manage) {
|
|
10137
|
+
t2 = /* @__PURE__ */ jsx(ManageFightersContext, {
|
|
10138
|
+
value: manage,
|
|
10139
|
+
children
|
|
10140
|
+
});
|
|
10141
|
+
$[4] = children;
|
|
10142
|
+
$[5] = manage;
|
|
10143
|
+
$[6] = t2;
|
|
10144
|
+
} else t2 = $[6];
|
|
10145
|
+
return t2;
|
|
10146
|
+
}
|
|
10147
|
+
function FitBays(t0) {
|
|
10148
|
+
const $ = c(20);
|
|
10149
|
+
const { fighterBay, readOnly } = t0;
|
|
10150
|
+
const { structure, fighters } = useFighters();
|
|
10151
|
+
let t1;
|
|
10152
|
+
if ($[0] !== readOnly || $[1] !== structure) {
|
|
10153
|
+
t1 = structure ? /* @__PURE__ */ jsx(Bay, {
|
|
10154
|
+
bay: "cargo",
|
|
10155
|
+
icon: "ammo-hold",
|
|
10156
|
+
label: "Ammo Hold",
|
|
10157
|
+
unlimited: true,
|
|
10158
|
+
readOnly
|
|
10159
|
+
}) : /* @__PURE__ */ jsx(Bay, {
|
|
10160
|
+
bay: "cargo",
|
|
10161
|
+
icon: "cargo",
|
|
10162
|
+
label: "Cargo Hold",
|
|
10163
|
+
readOnly
|
|
10164
|
+
});
|
|
10165
|
+
$[0] = readOnly;
|
|
10166
|
+
$[1] = structure;
|
|
10167
|
+
$[2] = t1;
|
|
10168
|
+
} else t1 = $[2];
|
|
10169
|
+
let t2;
|
|
10170
|
+
if ($[3] !== fighterBay || $[4] !== fighters || $[5] !== readOnly) {
|
|
10171
|
+
t2 = fighters ? /* @__PURE__ */ jsx(Bay, {
|
|
10172
|
+
id: fighterBay,
|
|
10173
|
+
bay: "fighterBay",
|
|
10174
|
+
icon: "fighter-bay",
|
|
10175
|
+
label: "Fighter Bay",
|
|
10176
|
+
readOnly
|
|
10177
|
+
}) : /* @__PURE__ */ jsx(Bay, {
|
|
10178
|
+
bay: "droneBay",
|
|
10179
|
+
icon: "drone-bay",
|
|
10180
|
+
label: "Drone Bay",
|
|
10181
|
+
readOnly
|
|
10182
|
+
});
|
|
10183
|
+
$[3] = fighterBay;
|
|
10184
|
+
$[4] = fighters;
|
|
10185
|
+
$[5] = readOnly;
|
|
10186
|
+
$[6] = t2;
|
|
10187
|
+
} else t2 = $[6];
|
|
10188
|
+
let t3;
|
|
10189
|
+
if ($[7] !== t1 || $[8] !== t2) {
|
|
10190
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
10191
|
+
className: FittingWindow_module_default.bays,
|
|
10192
|
+
children: [t1, t2]
|
|
10193
|
+
});
|
|
10194
|
+
$[7] = t1;
|
|
10195
|
+
$[8] = t2;
|
|
10196
|
+
$[9] = t3;
|
|
10197
|
+
} else t3 = $[9];
|
|
10198
|
+
let t4;
|
|
10199
|
+
if ($[10] !== readOnly || $[11] !== structure) {
|
|
10200
|
+
t4 = structure && /* @__PURE__ */ jsx(ServiceRack, { readOnly });
|
|
10201
|
+
$[10] = readOnly;
|
|
10202
|
+
$[11] = structure;
|
|
10203
|
+
$[12] = t4;
|
|
10204
|
+
} else t4 = $[12];
|
|
10205
|
+
let t5;
|
|
10206
|
+
if ($[13] !== readOnly) {
|
|
10207
|
+
t5 = !readOnly && /* @__PURE__ */ jsx("div", {
|
|
10208
|
+
className: FittingWindow_module_default.history,
|
|
10209
|
+
children: /* @__PURE__ */ jsx(SimulationHistory, {})
|
|
10210
|
+
});
|
|
10211
|
+
$[13] = readOnly;
|
|
10212
|
+
$[14] = t5;
|
|
10213
|
+
} else t5 = $[14];
|
|
10214
|
+
let t6;
|
|
10215
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10216
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
10217
|
+
className: FittingWindow_module_default.resources,
|
|
10218
|
+
children: [/* @__PURE__ */ jsx(Resource, {
|
|
10219
|
+
title: "CPU",
|
|
10220
|
+
free: "cpuFree",
|
|
10221
|
+
output: "cpuOutput"
|
|
10222
|
+
}), /* @__PURE__ */ jsx(Resource, {
|
|
10223
|
+
title: "Power Grid",
|
|
10224
|
+
free: "powerFree",
|
|
10225
|
+
output: "powerOutput"
|
|
10226
|
+
})]
|
|
10227
|
+
});
|
|
10228
|
+
$[15] = t6;
|
|
10229
|
+
} else t6 = $[15];
|
|
10230
|
+
let t7;
|
|
10231
|
+
if ($[16] !== t3 || $[17] !== t4 || $[18] !== t5) {
|
|
10232
|
+
t7 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10233
|
+
t3,
|
|
10234
|
+
t4,
|
|
10235
|
+
t5,
|
|
10236
|
+
t6
|
|
10237
|
+
] });
|
|
10238
|
+
$[16] = t3;
|
|
10239
|
+
$[17] = t4;
|
|
10240
|
+
$[18] = t5;
|
|
10241
|
+
$[19] = t7;
|
|
10242
|
+
} else t7 = $[19];
|
|
10243
|
+
return t7;
|
|
10244
|
+
}
|
|
10245
|
+
/** An empty `FittingWindow` while the fit loads; it needs only images. */
|
|
10246
|
+
function FittingWindowLoading({ label = "Fitting Window", text, browser = false, statistics = false }) {
|
|
10247
|
+
return /* @__PURE__ */ jsx("section", {
|
|
10248
|
+
className: FittingWindow_module_default.window,
|
|
10249
|
+
"aria-label": label,
|
|
10250
|
+
"aria-busy": true,
|
|
10251
|
+
"data-browser": browser || void 0,
|
|
10252
|
+
"data-statistics": statistics || void 0,
|
|
10253
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10254
|
+
className: FittingWindow_module_default.frame,
|
|
10255
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10256
|
+
className: FittingWindow_module_default.wheel,
|
|
10257
|
+
children: /* @__PURE__ */ jsx(Wheel, {
|
|
10258
|
+
label: "Fitting",
|
|
10259
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10260
|
+
className: FittingWindow_module_default.placeholder,
|
|
10261
|
+
children: /* @__PURE__ */ jsx("p", { children: text })
|
|
10262
|
+
})
|
|
10263
|
+
})
|
|
10264
|
+
})
|
|
10145
10265
|
})
|
|
10146
10266
|
});
|
|
10147
10267
|
}
|
|
@@ -11063,9 +11183,10 @@ const folders = {
|
|
|
11063
11183
|
}
|
|
11064
11184
|
};
|
|
11065
11185
|
/** Previews a type on hover, fits it on double click, drags it to the wheel, shows its info and its menu; render `overlays` once. */
|
|
11066
|
-
function useTypeActions(
|
|
11186
|
+
function useTypeActions() {
|
|
11067
11187
|
const $ = c(57);
|
|
11068
11188
|
const store = useFitStore();
|
|
11189
|
+
const noHullSelected = !useHasFit();
|
|
11069
11190
|
const sde = useSde();
|
|
11070
11191
|
const refuses = useHullRefuses();
|
|
11071
11192
|
const hasRoom = useHasRoom();
|
|
@@ -11532,124 +11653,123 @@ function SearchResults(t0) {
|
|
|
11532
11653
|
}
|
|
11533
11654
|
// src/components/ItemBrowser/Charges.tsx
|
|
11534
11655
|
/** The Charges tab of the `ItemBrowser`: every charge by market group, or only those a fitted module loads. */
|
|
11535
|
-
function Charges(
|
|
11656
|
+
function Charges() {
|
|
11536
11657
|
const $ = c(48);
|
|
11537
|
-
const { noHullSelected } = t0;
|
|
11538
11658
|
const sde = useSde();
|
|
11539
|
-
const { actions, clear, overlays } = useTypeActions(
|
|
11659
|
+
const { actions, clear, overlays } = useTypeActions();
|
|
11540
11660
|
const modules = useChargedModules();
|
|
11541
11661
|
const [picked, setPicked] = useState();
|
|
11542
11662
|
const [search, setSearch] = useState("");
|
|
11543
11663
|
const [collapses, setCollapses] = useState(0);
|
|
11544
|
-
let
|
|
11664
|
+
let t0;
|
|
11545
11665
|
if ($[0] !== modules || $[1] !== picked) {
|
|
11546
|
-
|
|
11666
|
+
t0 = modules.some((module) => module.id === picked) ? picked : void 0;
|
|
11547
11667
|
$[0] = modules;
|
|
11548
11668
|
$[1] = picked;
|
|
11549
|
-
$[2] =
|
|
11550
|
-
} else
|
|
11551
|
-
const selected =
|
|
11552
|
-
let
|
|
11669
|
+
$[2] = t0;
|
|
11670
|
+
} else t0 = $[2];
|
|
11671
|
+
const selected = t0;
|
|
11672
|
+
let t1;
|
|
11553
11673
|
if ($[3] !== search) {
|
|
11554
|
-
|
|
11674
|
+
t1 = search.trim().toLowerCase();
|
|
11555
11675
|
$[3] = search;
|
|
11556
|
-
$[4] =
|
|
11557
|
-
} else
|
|
11558
|
-
const query =
|
|
11559
|
-
let
|
|
11676
|
+
$[4] = t1;
|
|
11677
|
+
} else t1 = $[4];
|
|
11678
|
+
const query = t1;
|
|
11679
|
+
let t2;
|
|
11560
11680
|
if ($[5] !== query || $[6] !== selected) {
|
|
11561
|
-
|
|
11681
|
+
t2 = selected === void 0 && query !== "" ? (type) => type.name.toLowerCase().includes(query) : void 0;
|
|
11562
11682
|
$[5] = query;
|
|
11563
11683
|
$[6] = selected;
|
|
11564
|
-
$[7] =
|
|
11565
|
-
} else
|
|
11566
|
-
const matches =
|
|
11684
|
+
$[7] = t2;
|
|
11685
|
+
} else t2 = $[7];
|
|
11686
|
+
const matches = t2;
|
|
11567
11687
|
const groups = useChargeTree();
|
|
11568
11688
|
const found = useChargeSearch(matches);
|
|
11569
11689
|
const charges = useCharges(selected);
|
|
11570
|
-
let
|
|
11690
|
+
let t3;
|
|
11571
11691
|
if ($[8] !== charges || $[9] !== query || $[10] !== sde) {
|
|
11572
|
-
let
|
|
11692
|
+
let t4;
|
|
11573
11693
|
if ($[12] !== query) {
|
|
11574
|
-
|
|
11694
|
+
t4 = (type_0) => type_0.name.toLowerCase().includes(query);
|
|
11575
11695
|
$[12] = query;
|
|
11576
|
-
$[13] =
|
|
11577
|
-
} else
|
|
11578
|
-
|
|
11696
|
+
$[13] = t4;
|
|
11697
|
+
} else t4 = $[13];
|
|
11698
|
+
t3 = sde.sortByMeta(charges.filter(t4));
|
|
11579
11699
|
$[8] = charges;
|
|
11580
11700
|
$[9] = query;
|
|
11581
11701
|
$[10] = sde;
|
|
11582
|
-
$[11] =
|
|
11583
|
-
} else
|
|
11584
|
-
const loadable =
|
|
11585
|
-
let
|
|
11702
|
+
$[11] = t3;
|
|
11703
|
+
} else t3 = $[11];
|
|
11704
|
+
const loadable = t3;
|
|
11705
|
+
let t4;
|
|
11586
11706
|
if ($[14] !== found || $[15] !== loadable || $[16] !== matches || $[17] !== selected) {
|
|
11587
|
-
|
|
11707
|
+
t4 = selected === void 0 ? matches !== void 0 && found.length === 0 : countLeaves(loadable) === 0;
|
|
11588
11708
|
$[14] = found;
|
|
11589
11709
|
$[15] = loadable;
|
|
11590
11710
|
$[16] = matches;
|
|
11591
11711
|
$[17] = selected;
|
|
11592
|
-
$[18] =
|
|
11593
|
-
} else
|
|
11594
|
-
const empty =
|
|
11595
|
-
let
|
|
11712
|
+
$[18] = t4;
|
|
11713
|
+
} else t4 = $[18];
|
|
11714
|
+
const empty = t4;
|
|
11715
|
+
let t5;
|
|
11596
11716
|
if ($[19] !== clear) {
|
|
11597
|
-
|
|
11717
|
+
t5 = (value) => {
|
|
11598
11718
|
clear();
|
|
11599
11719
|
setSearch(value);
|
|
11600
11720
|
};
|
|
11601
11721
|
$[19] = clear;
|
|
11602
|
-
$[20] =
|
|
11603
|
-
} else
|
|
11604
|
-
let
|
|
11722
|
+
$[20] = t5;
|
|
11723
|
+
} else t5 = $[20];
|
|
11724
|
+
let t6;
|
|
11605
11725
|
if ($[21] !== collapses) {
|
|
11606
|
-
|
|
11726
|
+
t6 = () => setCollapses(collapses + 1);
|
|
11607
11727
|
$[21] = collapses;
|
|
11608
|
-
$[22] =
|
|
11609
|
-
} else
|
|
11610
|
-
let
|
|
11611
|
-
if ($[23] !== search || $[24] !==
|
|
11612
|
-
|
|
11728
|
+
$[22] = t6;
|
|
11729
|
+
} else t6 = $[22];
|
|
11730
|
+
let t7;
|
|
11731
|
+
if ($[23] !== search || $[24] !== t5 || $[25] !== t6) {
|
|
11732
|
+
t7 = /* @__PURE__ */ jsx(Search, {
|
|
11613
11733
|
value: search,
|
|
11614
|
-
onChange:
|
|
11615
|
-
onCollapse:
|
|
11734
|
+
onChange: t5,
|
|
11735
|
+
onCollapse: t6
|
|
11616
11736
|
});
|
|
11617
11737
|
$[23] = search;
|
|
11618
|
-
$[24] =
|
|
11619
|
-
$[25] =
|
|
11620
|
-
$[26] =
|
|
11621
|
-
} else
|
|
11622
|
-
let
|
|
11738
|
+
$[24] = t5;
|
|
11739
|
+
$[25] = t6;
|
|
11740
|
+
$[26] = t7;
|
|
11741
|
+
} else t7 = $[26];
|
|
11742
|
+
let t8;
|
|
11623
11743
|
if ($[27] !== modules || $[28] !== selected) {
|
|
11624
|
-
let
|
|
11744
|
+
let t9;
|
|
11625
11745
|
if ($[30] !== selected) {
|
|
11626
|
-
|
|
11746
|
+
t9 = (module_0) => /* @__PURE__ */ jsx(FilterToggle, {
|
|
11627
11747
|
typeId: module_0.id,
|
|
11628
11748
|
label: module_0.name,
|
|
11629
11749
|
pressed: selected === module_0.id,
|
|
11630
11750
|
onPressedChange: (pressed) => setPicked(pressed ? module_0.id : void 0)
|
|
11631
11751
|
}, module_0.id);
|
|
11632
11752
|
$[30] = selected;
|
|
11633
|
-
$[31] =
|
|
11634
|
-
} else
|
|
11635
|
-
|
|
11753
|
+
$[31] = t9;
|
|
11754
|
+
} else t9 = $[31];
|
|
11755
|
+
t8 = modules.map(t9);
|
|
11636
11756
|
$[27] = modules;
|
|
11637
11757
|
$[28] = selected;
|
|
11638
|
-
$[29] =
|
|
11639
|
-
} else
|
|
11640
|
-
let
|
|
11641
|
-
if ($[32] !==
|
|
11642
|
-
|
|
11758
|
+
$[29] = t8;
|
|
11759
|
+
} else t8 = $[29];
|
|
11760
|
+
let t9;
|
|
11761
|
+
if ($[32] !== t8) {
|
|
11762
|
+
t9 = /* @__PURE__ */ jsx("fieldset", {
|
|
11643
11763
|
className: ItemBrowser_module_default.filters,
|
|
11644
11764
|
"aria-label": "Filters",
|
|
11645
|
-
children:
|
|
11765
|
+
children: t8
|
|
11646
11766
|
});
|
|
11647
|
-
$[32] =
|
|
11648
|
-
$[33] =
|
|
11649
|
-
} else
|
|
11650
|
-
let
|
|
11767
|
+
$[32] = t8;
|
|
11768
|
+
$[33] = t9;
|
|
11769
|
+
} else t9 = $[33];
|
|
11770
|
+
let t10;
|
|
11651
11771
|
if ($[34] !== actions || $[35] !== collapses || $[36] !== empty || $[37] !== found || $[38] !== groups || $[39] !== loadable || $[40] !== matches || $[41] !== selected) {
|
|
11652
|
-
|
|
11772
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
11653
11773
|
className: ItemBrowser_module_default.tree,
|
|
11654
11774
|
children: empty ? /* @__PURE__ */ jsx("p", {
|
|
11655
11775
|
className: ItemBrowser_module_default.empty,
|
|
@@ -11677,23 +11797,23 @@ function Charges(t0) {
|
|
|
11677
11797
|
$[39] = loadable;
|
|
11678
11798
|
$[40] = matches;
|
|
11679
11799
|
$[41] = selected;
|
|
11680
|
-
$[42] =
|
|
11681
|
-
} else
|
|
11682
|
-
let
|
|
11683
|
-
if ($[43] !== overlays || $[44] !== t10 || $[45] !==
|
|
11684
|
-
|
|
11685
|
-
|
|
11800
|
+
$[42] = t10;
|
|
11801
|
+
} else t10 = $[42];
|
|
11802
|
+
let t11;
|
|
11803
|
+
if ($[43] !== overlays || $[44] !== t10 || $[45] !== t7 || $[46] !== t9) {
|
|
11804
|
+
t11 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
11805
|
+
t7,
|
|
11806
|
+
t9,
|
|
11686
11807
|
t10,
|
|
11687
|
-
t11,
|
|
11688
11808
|
overlays
|
|
11689
11809
|
] });
|
|
11690
11810
|
$[43] = overlays;
|
|
11691
11811
|
$[44] = t10;
|
|
11692
|
-
$[45] =
|
|
11693
|
-
$[46] =
|
|
11694
|
-
$[47] =
|
|
11695
|
-
} else
|
|
11696
|
-
return
|
|
11812
|
+
$[45] = t7;
|
|
11813
|
+
$[46] = t9;
|
|
11814
|
+
$[47] = t11;
|
|
11815
|
+
} else t11 = $[47];
|
|
11816
|
+
return t11;
|
|
11697
11817
|
}
|
|
11698
11818
|
// src/components/ItemBrowser/saveFit.tsx
|
|
11699
11819
|
const MAX_ESI_NAME = 50;
|
|
@@ -12197,11 +12317,11 @@ function _temp2$4(event_0) {
|
|
|
12197
12317
|
// src/components/ItemBrowser/FitActions.tsx
|
|
12198
12318
|
/** The buttons under the `ItemBrowser`: save the fit in the browser, import one, or copy it out. */
|
|
12199
12319
|
function FitActions(t0) {
|
|
12200
|
-
const $ = c(
|
|
12201
|
-
const {
|
|
12320
|
+
const $ = c(55);
|
|
12321
|
+
const { pasteToOpen } = t0;
|
|
12202
12322
|
const engine = useEngine();
|
|
12203
|
-
const fit = useFit();
|
|
12204
12323
|
const store = useFitStore();
|
|
12324
|
+
const noHullSelected = !useHasFit();
|
|
12205
12325
|
const menu = useId();
|
|
12206
12326
|
const [saved, flashSaved] = useFlash();
|
|
12207
12327
|
const [copied, flashCopied] = useFlash();
|
|
@@ -12210,10 +12330,10 @@ function FitActions(t0) {
|
|
|
12210
12330
|
const saver = useSaveFit();
|
|
12211
12331
|
const [savedTo, setSavedTo] = useState("");
|
|
12212
12332
|
let t1;
|
|
12213
|
-
if ($[0] !==
|
|
12333
|
+
if ($[0] !== flashSaved || $[1] !== saver || $[2] !== store) {
|
|
12214
12334
|
t1 = () => {
|
|
12215
12335
|
const where = saver.target?.name ?? "browser";
|
|
12216
|
-
saver.save(fit, {
|
|
12336
|
+
saver.save(store.getSnapshot().fit, {
|
|
12217
12337
|
onStart: (named) => store.setName(named.name ?? ""),
|
|
12218
12338
|
onSaved: () => {
|
|
12219
12339
|
setSavedTo(where);
|
|
@@ -12221,16 +12341,15 @@ function FitActions(t0) {
|
|
|
12221
12341
|
}
|
|
12222
12342
|
});
|
|
12223
12343
|
};
|
|
12224
|
-
$[0] =
|
|
12225
|
-
$[1] =
|
|
12226
|
-
$[2] =
|
|
12227
|
-
$[3] =
|
|
12228
|
-
|
|
12229
|
-
} else t1 = $[4];
|
|
12344
|
+
$[0] = flashSaved;
|
|
12345
|
+
$[1] = saver;
|
|
12346
|
+
$[2] = store;
|
|
12347
|
+
$[3] = t1;
|
|
12348
|
+
} else t1 = $[3];
|
|
12230
12349
|
const saveCurrent = t1;
|
|
12231
12350
|
let t2;
|
|
12232
12351
|
let t3;
|
|
12233
|
-
if ($[
|
|
12352
|
+
if ($[4] !== engine || $[5] !== noHullSelected || $[6] !== pasteToOpen || $[7] !== store) {
|
|
12234
12353
|
t2 = () => {
|
|
12235
12354
|
if (!pasteToOpen) return;
|
|
12236
12355
|
const onPaste = (event) => {
|
|
@@ -12276,32 +12395,32 @@ function FitActions(t0) {
|
|
|
12276
12395
|
pasteToOpen,
|
|
12277
12396
|
noHullSelected
|
|
12278
12397
|
];
|
|
12279
|
-
$[
|
|
12280
|
-
$[
|
|
12281
|
-
$[
|
|
12282
|
-
$[
|
|
12283
|
-
$[
|
|
12284
|
-
$[
|
|
12398
|
+
$[4] = engine;
|
|
12399
|
+
$[5] = noHullSelected;
|
|
12400
|
+
$[6] = pasteToOpen;
|
|
12401
|
+
$[7] = store;
|
|
12402
|
+
$[8] = t2;
|
|
12403
|
+
$[9] = t3;
|
|
12285
12404
|
} else {
|
|
12286
|
-
t2 = $[
|
|
12287
|
-
t3 = $[
|
|
12405
|
+
t2 = $[8];
|
|
12406
|
+
t3 = $[9];
|
|
12288
12407
|
}
|
|
12289
12408
|
useEffect(t2, t3);
|
|
12290
12409
|
let t4;
|
|
12291
|
-
if ($[
|
|
12410
|
+
if ($[10] !== copyFit || $[11] !== flashCopied || $[12] !== menu || $[13] !== store) {
|
|
12292
12411
|
t4 = (format) => {
|
|
12293
12412
|
document.getElementById(menu)?.hidePopover();
|
|
12294
|
-
copyFit(fit, format, flashCopied);
|
|
12413
|
+
copyFit(store.getSnapshot().fit, format, flashCopied);
|
|
12295
12414
|
};
|
|
12296
|
-
$[
|
|
12297
|
-
$[
|
|
12298
|
-
$[
|
|
12299
|
-
$[
|
|
12300
|
-
$[
|
|
12301
|
-
} else t4 = $[
|
|
12415
|
+
$[10] = copyFit;
|
|
12416
|
+
$[11] = flashCopied;
|
|
12417
|
+
$[12] = menu;
|
|
12418
|
+
$[13] = store;
|
|
12419
|
+
$[14] = t4;
|
|
12420
|
+
} else t4 = $[14];
|
|
12302
12421
|
const copy = t4;
|
|
12303
12422
|
let t5;
|
|
12304
|
-
if ($[
|
|
12423
|
+
if ($[15] !== noHullSelected || $[16] !== saveCurrent || $[17] !== saved || $[18] !== savedTo || $[19] !== saver) {
|
|
12305
12424
|
t5 = saver.characters === void 0 ? /* @__PURE__ */ jsx("button", {
|
|
12306
12425
|
type: "button",
|
|
12307
12426
|
className: ItemBrowser_module_default.action,
|
|
@@ -12314,33 +12433,33 @@ function FitActions(t0) {
|
|
|
12314
12433
|
disabled: noHullSelected,
|
|
12315
12434
|
onSave: saveCurrent
|
|
12316
12435
|
});
|
|
12317
|
-
$[
|
|
12318
|
-
$[
|
|
12319
|
-
$[
|
|
12320
|
-
$[
|
|
12321
|
-
$[
|
|
12322
|
-
$[
|
|
12323
|
-
} else t5 = $[
|
|
12436
|
+
$[15] = noHullSelected;
|
|
12437
|
+
$[16] = saveCurrent;
|
|
12438
|
+
$[17] = saved;
|
|
12439
|
+
$[18] = savedTo;
|
|
12440
|
+
$[19] = saver;
|
|
12441
|
+
$[20] = t5;
|
|
12442
|
+
} else t5 = $[20];
|
|
12324
12443
|
let t6;
|
|
12325
|
-
if ($[
|
|
12444
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12326
12445
|
t6 = /* @__PURE__ */ jsx("button", {
|
|
12327
12446
|
type: "button",
|
|
12328
12447
|
className: ItemBrowser_module_default.action,
|
|
12329
12448
|
onClick: () => setImporting({ text: "" }),
|
|
12330
12449
|
children: "Import…"
|
|
12331
12450
|
});
|
|
12332
|
-
$[
|
|
12333
|
-
} else t6 = $[
|
|
12451
|
+
$[21] = t6;
|
|
12452
|
+
} else t6 = $[21];
|
|
12334
12453
|
const t7 = copied ? "Copied" : "Copy";
|
|
12335
12454
|
const t8 = copied ? "checkmark" : "export";
|
|
12336
12455
|
let t9;
|
|
12337
|
-
if ($[
|
|
12456
|
+
if ($[22] !== t8) {
|
|
12338
12457
|
t9 = /* @__PURE__ */ jsx(Icon, { name: t8 });
|
|
12339
|
-
$[
|
|
12340
|
-
$[
|
|
12341
|
-
} else t9 = $[
|
|
12458
|
+
$[22] = t8;
|
|
12459
|
+
$[23] = t9;
|
|
12460
|
+
} else t9 = $[23];
|
|
12342
12461
|
let t10;
|
|
12343
|
-
if ($[
|
|
12462
|
+
if ($[24] !== menu || $[25] !== noHullSelected || $[26] !== t9) {
|
|
12344
12463
|
t10 = /* @__PURE__ */ jsx("button", {
|
|
12345
12464
|
type: "button",
|
|
12346
12465
|
className: `${ItemBrowser_module_default.action} ${ItemBrowser_module_default.copy}`,
|
|
@@ -12349,13 +12468,13 @@ function FitActions(t0) {
|
|
|
12349
12468
|
disabled: noHullSelected,
|
|
12350
12469
|
children: t9
|
|
12351
12470
|
});
|
|
12352
|
-
$[
|
|
12353
|
-
$[
|
|
12354
|
-
$[
|
|
12355
|
-
$[
|
|
12356
|
-
} else t10 = $[
|
|
12471
|
+
$[24] = menu;
|
|
12472
|
+
$[25] = noHullSelected;
|
|
12473
|
+
$[26] = t9;
|
|
12474
|
+
$[27] = t10;
|
|
12475
|
+
} else t10 = $[27];
|
|
12357
12476
|
let t11;
|
|
12358
|
-
if ($[
|
|
12477
|
+
if ($[28] !== t10 || $[29] !== t7) {
|
|
12359
12478
|
t11 = /* @__PURE__ */ jsx("span", {
|
|
12360
12479
|
className: ItemBrowser_module_default.copyAnchor,
|
|
12361
12480
|
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
@@ -12363,34 +12482,34 @@ function FitActions(t0) {
|
|
|
12363
12482
|
children: t10
|
|
12364
12483
|
})
|
|
12365
12484
|
});
|
|
12366
|
-
$[
|
|
12367
|
-
$[
|
|
12368
|
-
$[
|
|
12369
|
-
} else t11 = $[
|
|
12485
|
+
$[28] = t10;
|
|
12486
|
+
$[29] = t7;
|
|
12487
|
+
$[30] = t11;
|
|
12488
|
+
} else t11 = $[30];
|
|
12370
12489
|
let t12;
|
|
12371
|
-
if ($[
|
|
12490
|
+
if ($[31] !== copy) {
|
|
12372
12491
|
t12 = /* @__PURE__ */ jsx("button", {
|
|
12373
12492
|
type: "button",
|
|
12374
12493
|
role: "menuitem",
|
|
12375
12494
|
onClick: () => copy("eft"),
|
|
12376
12495
|
children: "Copy as EFT"
|
|
12377
12496
|
});
|
|
12378
|
-
$[
|
|
12379
|
-
$[
|
|
12380
|
-
} else t12 = $[
|
|
12497
|
+
$[31] = copy;
|
|
12498
|
+
$[32] = t12;
|
|
12499
|
+
} else t12 = $[32];
|
|
12381
12500
|
let t13;
|
|
12382
|
-
if ($[
|
|
12501
|
+
if ($[33] !== copy) {
|
|
12383
12502
|
t13 = /* @__PURE__ */ jsx("button", {
|
|
12384
12503
|
type: "button",
|
|
12385
12504
|
role: "menuitem",
|
|
12386
12505
|
onClick: () => copy("esf"),
|
|
12387
12506
|
children: "Copy as esf/1"
|
|
12388
12507
|
});
|
|
12389
|
-
$[
|
|
12390
|
-
$[
|
|
12391
|
-
} else t13 = $[
|
|
12508
|
+
$[33] = copy;
|
|
12509
|
+
$[34] = t13;
|
|
12510
|
+
} else t13 = $[34];
|
|
12392
12511
|
let t14;
|
|
12393
|
-
if ($[
|
|
12512
|
+
if ($[35] !== menu || $[36] !== t12 || $[37] !== t13) {
|
|
12394
12513
|
t14 = /* @__PURE__ */ jsxs("div", {
|
|
12395
12514
|
id: menu,
|
|
12396
12515
|
className: ItemBrowser_module_default.menu,
|
|
@@ -12398,51 +12517,51 @@ function FitActions(t0) {
|
|
|
12398
12517
|
role: "menu",
|
|
12399
12518
|
children: [t12, t13]
|
|
12400
12519
|
});
|
|
12401
|
-
$[
|
|
12402
|
-
$[
|
|
12403
|
-
$[
|
|
12404
|
-
$[
|
|
12405
|
-
} else t14 = $[
|
|
12520
|
+
$[35] = menu;
|
|
12521
|
+
$[36] = t12;
|
|
12522
|
+
$[37] = t13;
|
|
12523
|
+
$[38] = t14;
|
|
12524
|
+
} else t14 = $[38];
|
|
12406
12525
|
const t15 = importing !== void 0;
|
|
12407
12526
|
let t16;
|
|
12408
|
-
if ($[
|
|
12527
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12409
12528
|
t16 = () => setImporting(void 0);
|
|
12410
|
-
$[
|
|
12411
|
-
} else t16 = $[
|
|
12529
|
+
$[39] = t16;
|
|
12530
|
+
} else t16 = $[39];
|
|
12412
12531
|
let t17;
|
|
12413
|
-
if ($[
|
|
12532
|
+
if ($[40] !== importing) {
|
|
12414
12533
|
t17 = importing ?? { text: "" };
|
|
12415
|
-
$[
|
|
12416
|
-
$[
|
|
12417
|
-
} else t17 = $[
|
|
12534
|
+
$[40] = importing;
|
|
12535
|
+
$[41] = t17;
|
|
12536
|
+
} else t17 = $[41];
|
|
12418
12537
|
let t18;
|
|
12419
|
-
if ($[
|
|
12538
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12420
12539
|
t18 = () => setImporting(void 0);
|
|
12421
|
-
$[
|
|
12422
|
-
} else t18 = $[
|
|
12540
|
+
$[42] = t18;
|
|
12541
|
+
} else t18 = $[42];
|
|
12423
12542
|
let t19;
|
|
12424
|
-
if ($[
|
|
12543
|
+
if ($[43] !== t17) {
|
|
12425
12544
|
t19 = /* @__PURE__ */ jsx(ImportForm, {
|
|
12426
12545
|
draft: t17,
|
|
12427
12546
|
onDone: t18
|
|
12428
12547
|
});
|
|
12429
|
-
$[
|
|
12430
|
-
$[
|
|
12431
|
-
} else t19 = $[
|
|
12548
|
+
$[43] = t17;
|
|
12549
|
+
$[44] = t19;
|
|
12550
|
+
} else t19 = $[44];
|
|
12432
12551
|
let t20;
|
|
12433
|
-
if ($[
|
|
12552
|
+
if ($[45] !== t15 || $[46] !== t19) {
|
|
12434
12553
|
t20 = /* @__PURE__ */ jsx(Dialog, {
|
|
12435
12554
|
open: t15,
|
|
12436
12555
|
title: "Import Fit",
|
|
12437
12556
|
onClose: t16,
|
|
12438
12557
|
children: t19
|
|
12439
12558
|
});
|
|
12440
|
-
$[
|
|
12441
|
-
$[
|
|
12442
|
-
$[
|
|
12443
|
-
} else t20 = $[
|
|
12559
|
+
$[45] = t15;
|
|
12560
|
+
$[46] = t19;
|
|
12561
|
+
$[47] = t20;
|
|
12562
|
+
} else t20 = $[47];
|
|
12444
12563
|
let t21;
|
|
12445
|
-
if ($[
|
|
12564
|
+
if ($[48] !== copyDialog || $[49] !== saver.dialog || $[50] !== t11 || $[51] !== t14 || $[52] !== t20 || $[53] !== t5) {
|
|
12446
12565
|
t21 = /* @__PURE__ */ jsxs("div", {
|
|
12447
12566
|
className: ItemBrowser_module_default.actions,
|
|
12448
12567
|
children: [
|
|
@@ -12455,14 +12574,14 @@ function FitActions(t0) {
|
|
|
12455
12574
|
saver.dialog
|
|
12456
12575
|
]
|
|
12457
12576
|
});
|
|
12458
|
-
$[
|
|
12459
|
-
$[
|
|
12460
|
-
$[
|
|
12461
|
-
$[
|
|
12462
|
-
$[
|
|
12463
|
-
$[
|
|
12464
|
-
$[
|
|
12465
|
-
} else t21 = $[
|
|
12577
|
+
$[48] = copyDialog;
|
|
12578
|
+
$[49] = saver.dialog;
|
|
12579
|
+
$[50] = t11;
|
|
12580
|
+
$[51] = t14;
|
|
12581
|
+
$[52] = t20;
|
|
12582
|
+
$[53] = t5;
|
|
12583
|
+
$[54] = t21;
|
|
12584
|
+
} else t21 = $[54];
|
|
12466
12585
|
return t21;
|
|
12467
12586
|
}
|
|
12468
12587
|
function SaveSplit(t0) {
|
|
@@ -12856,10 +12975,10 @@ async function fitMutated(engine, store, typeId, itemId) {
|
|
|
12856
12975
|
const noFits = [];
|
|
12857
12976
|
const SHIPS_MARKET_GROUP_ID = 4;
|
|
12858
12977
|
/** The Hulls & Fits tab of the `ItemBrowser`: EVE's hulls by group and race, with the fits saved for each. */
|
|
12859
|
-
function HullsAndFits(
|
|
12978
|
+
function HullsAndFits() {
|
|
12860
12979
|
const $ = c(115);
|
|
12861
|
-
const
|
|
12862
|
-
const
|
|
12980
|
+
const fitShipId = useSnapshotIfAny()?.fit.ship.type_id;
|
|
12981
|
+
const noHullSelected = fitShipId === void 0;
|
|
12863
12982
|
const images = useImages();
|
|
12864
12983
|
const store = useFitStore();
|
|
12865
12984
|
const missingSkills = useMissingSkills();
|
|
@@ -12878,56 +12997,56 @@ function HullsAndFits(t0) {
|
|
|
12878
12997
|
const [currentHull, setCurrentHull] = useState(false);
|
|
12879
12998
|
const [flyable, setFlyable] = useState(false);
|
|
12880
12999
|
const [collapses, setCollapses] = useState(0);
|
|
12881
|
-
let
|
|
13000
|
+
let t0;
|
|
12882
13001
|
if ($[0] !== search) {
|
|
12883
|
-
|
|
13002
|
+
t0 = search.trim().toLowerCase();
|
|
12884
13003
|
$[0] = search;
|
|
12885
|
-
$[1] =
|
|
12886
|
-
} else
|
|
12887
|
-
const query =
|
|
13004
|
+
$[1] = t0;
|
|
13005
|
+
} else t0 = $[1];
|
|
13006
|
+
const query = t0;
|
|
12888
13007
|
const anySource = browserFits || personalFits;
|
|
12889
13008
|
const currentShipId = currentHull && !noHullSelected ? fitShipId : void 0;
|
|
12890
|
-
let
|
|
13009
|
+
let t1;
|
|
12891
13010
|
if ($[2] !== query) {
|
|
12892
|
-
|
|
13011
|
+
t1 = (name) => (name ?? "").toLowerCase().includes(query);
|
|
12893
13012
|
$[2] = query;
|
|
12894
|
-
$[3] =
|
|
12895
|
-
} else
|
|
12896
|
-
const matches =
|
|
12897
|
-
let
|
|
13013
|
+
$[3] = t1;
|
|
13014
|
+
} else t1 = $[3];
|
|
13015
|
+
const matches = t1;
|
|
13016
|
+
let t2;
|
|
12898
13017
|
if ($[4] !== anySource || $[5] !== browserFits || $[6] !== fits || $[7] !== personal.fits || $[8] !== personalFits) {
|
|
12899
13018
|
const listed = [...!anySource || browserFits ? fits.map(_temp$4) : [], ...!anySource || personalFits ? personal.fits.map(_temp2$2) : []].toSorted(_temp3);
|
|
12900
|
-
|
|
13019
|
+
t2 = Map.groupBy(listed, _temp4);
|
|
12901
13020
|
$[4] = anySource;
|
|
12902
13021
|
$[5] = browserFits;
|
|
12903
13022
|
$[6] = fits;
|
|
12904
13023
|
$[7] = personal.fits;
|
|
12905
13024
|
$[8] = personalFits;
|
|
12906
|
-
$[9] =
|
|
12907
|
-
} else
|
|
12908
|
-
const fitsByHull =
|
|
12909
|
-
let
|
|
13025
|
+
$[9] = t2;
|
|
13026
|
+
} else t2 = $[9];
|
|
13027
|
+
const fitsByHull = t2;
|
|
13028
|
+
let t3;
|
|
12910
13029
|
if ($[10] !== fits) {
|
|
12911
|
-
|
|
13030
|
+
t3 = Map.groupBy(fits, _temp5);
|
|
12912
13031
|
$[10] = fits;
|
|
12913
|
-
$[11] =
|
|
12914
|
-
} else
|
|
12915
|
-
let
|
|
13032
|
+
$[11] = t3;
|
|
13033
|
+
} else t3 = $[11];
|
|
13034
|
+
let t4;
|
|
12916
13035
|
if ($[12] !== personal.fits) {
|
|
12917
|
-
|
|
13036
|
+
t4 = Map.groupBy(personal.fits, _temp6);
|
|
12918
13037
|
$[12] = personal.fits;
|
|
12919
|
-
$[13] =
|
|
12920
|
-
} else
|
|
12921
|
-
let
|
|
13038
|
+
$[13] = t4;
|
|
13039
|
+
} else t4 = $[13];
|
|
13040
|
+
let t5;
|
|
12922
13041
|
if ($[14] !== fitsByHull || $[15] !== flyable || $[16] !== matches || $[17] !== missingSkills) {
|
|
12923
|
-
|
|
13042
|
+
t5 = (ship) => {
|
|
12924
13043
|
const saved = fitsByHull.get(ship.id) ?? noFits;
|
|
12925
|
-
const kept = flyable ? saved.filter((
|
|
12926
|
-
const { fit: fit_4 } =
|
|
13044
|
+
const kept = flyable ? saved.filter((t6) => {
|
|
13045
|
+
const { fit: fit_4 } = t6;
|
|
12927
13046
|
return missingSkills(fit_4).length === 0;
|
|
12928
13047
|
}) : saved;
|
|
12929
|
-
return matches(ship.name) ? kept : kept.filter((
|
|
12930
|
-
const { fit: fit_5 } =
|
|
13048
|
+
return matches(ship.name) ? kept : kept.filter((t7) => {
|
|
13049
|
+
const { fit: fit_5 } = t7;
|
|
12931
13050
|
return matches(fit_5.name);
|
|
12932
13051
|
});
|
|
12933
13052
|
};
|
|
@@ -12935,30 +13054,30 @@ function HullsAndFits(t0) {
|
|
|
12935
13054
|
$[15] = flyable;
|
|
12936
13055
|
$[16] = matches;
|
|
12937
13056
|
$[17] = missingSkills;
|
|
12938
|
-
$[18] =
|
|
12939
|
-
} else
|
|
12940
|
-
let
|
|
12941
|
-
if ($[19] !==
|
|
12942
|
-
|
|
12943
|
-
browserByHull:
|
|
12944
|
-
personalByHull:
|
|
12945
|
-
shownFits:
|
|
13057
|
+
$[18] = t5;
|
|
13058
|
+
} else t5 = $[18];
|
|
13059
|
+
let t6;
|
|
13060
|
+
if ($[19] !== t3 || $[20] !== t4 || $[21] !== t5) {
|
|
13061
|
+
t6 = {
|
|
13062
|
+
browserByHull: t3,
|
|
13063
|
+
personalByHull: t4,
|
|
13064
|
+
shownFits: t5
|
|
12946
13065
|
};
|
|
12947
|
-
$[19] =
|
|
12948
|
-
$[20] =
|
|
12949
|
-
$[21] =
|
|
12950
|
-
$[22] =
|
|
12951
|
-
} else
|
|
12952
|
-
const { browserByHull, personalByHull, shownFits } =
|
|
12953
|
-
let
|
|
13066
|
+
$[19] = t3;
|
|
13067
|
+
$[20] = t4;
|
|
13068
|
+
$[21] = t5;
|
|
13069
|
+
$[22] = t6;
|
|
13070
|
+
} else t6 = $[22];
|
|
13071
|
+
const { browserByHull, personalByHull, shownFits } = t6;
|
|
13072
|
+
let t7;
|
|
12954
13073
|
bb0: {
|
|
12955
13074
|
if (query === "" && !currentHull && !anySource && !flyable) {
|
|
12956
|
-
|
|
13075
|
+
t7 = void 0;
|
|
12957
13076
|
break bb0;
|
|
12958
13077
|
}
|
|
12959
|
-
let
|
|
13078
|
+
let t8;
|
|
12960
13079
|
if ($[23] !== anySource || $[24] !== currentHull || $[25] !== currentShipId || $[26] !== flyable || $[27] !== missingSkills || $[28] !== query || $[29] !== shownFits) {
|
|
12961
|
-
|
|
13080
|
+
t8 = (ship_0) => {
|
|
12962
13081
|
if (currentShipId !== void 0 && ship_0.id !== currentShipId) return false;
|
|
12963
13082
|
if (flyable && missingSkills([ship_0.id]).length > 0) return false;
|
|
12964
13083
|
const shown = shownFits(ship_0);
|
|
@@ -12972,24 +13091,24 @@ function HullsAndFits(t0) {
|
|
|
12972
13091
|
$[27] = missingSkills;
|
|
12973
13092
|
$[28] = query;
|
|
12974
13093
|
$[29] = shownFits;
|
|
12975
|
-
$[30] =
|
|
12976
|
-
} else
|
|
12977
|
-
|
|
13094
|
+
$[30] = t8;
|
|
13095
|
+
} else t8 = $[30];
|
|
13096
|
+
t7 = t8;
|
|
12978
13097
|
}
|
|
12979
|
-
const groups = useHullTree(
|
|
12980
|
-
let
|
|
13098
|
+
const groups = useHullTree(t7);
|
|
13099
|
+
let t8;
|
|
12981
13100
|
if ($[31] !== store) {
|
|
12982
|
-
|
|
13101
|
+
t8 = (shipTypeId) => store.replace({
|
|
12983
13102
|
ship: { type_id: shipTypeId },
|
|
12984
13103
|
items: []
|
|
12985
13104
|
});
|
|
12986
13105
|
$[31] = store;
|
|
12987
|
-
$[32] =
|
|
12988
|
-
} else
|
|
12989
|
-
const simulate =
|
|
12990
|
-
let
|
|
13106
|
+
$[32] = t8;
|
|
13107
|
+
} else t8 = $[32];
|
|
13108
|
+
const simulate = t8;
|
|
13109
|
+
let t9;
|
|
12991
13110
|
if ($[33] !== open || $[34] !== showInfo || $[35] !== simulate) {
|
|
12992
|
-
|
|
13111
|
+
t9 = (event, ship_1) => {
|
|
12993
13112
|
const anchor = event.currentTarget;
|
|
12994
13113
|
open(event, [
|
|
12995
13114
|
{
|
|
@@ -13010,13 +13129,13 @@ function HullsAndFits(t0) {
|
|
|
13010
13129
|
$[33] = open;
|
|
13011
13130
|
$[34] = showInfo;
|
|
13012
13131
|
$[35] = simulate;
|
|
13013
|
-
$[36] =
|
|
13014
|
-
} else
|
|
13015
|
-
const hullMenu =
|
|
13016
|
-
let
|
|
13132
|
+
$[36] = t9;
|
|
13133
|
+
} else t9 = $[36];
|
|
13134
|
+
const hullMenu = t9;
|
|
13135
|
+
let t10;
|
|
13017
13136
|
if ($[37] !== copy || $[38] !== open || $[39] !== personal.remove || $[40] !== saveFit || $[41] !== saveTarget || $[42] !== store) {
|
|
13018
|
-
|
|
13019
|
-
const { fit: fit_6, kind } =
|
|
13137
|
+
t10 = (event_0, t11) => {
|
|
13138
|
+
const { fit: fit_6, kind } = t11;
|
|
13020
13139
|
open(event_0, [
|
|
13021
13140
|
{
|
|
13022
13141
|
label: "Simulate Fitting",
|
|
@@ -13051,75 +13170,75 @@ function HullsAndFits(t0) {
|
|
|
13051
13170
|
$[40] = saveFit;
|
|
13052
13171
|
$[41] = saveTarget;
|
|
13053
13172
|
$[42] = store;
|
|
13054
|
-
$[43] =
|
|
13055
|
-
} else
|
|
13056
|
-
const fitMenu =
|
|
13057
|
-
let
|
|
13173
|
+
$[43] = t10;
|
|
13174
|
+
} else t10 = $[43];
|
|
13175
|
+
const fitMenu = t10;
|
|
13176
|
+
let t11;
|
|
13058
13177
|
if ($[44] !== collapses) {
|
|
13059
|
-
|
|
13178
|
+
t11 = () => setCollapses(collapses + 1);
|
|
13060
13179
|
$[44] = collapses;
|
|
13061
|
-
$[45] =
|
|
13062
|
-
} else
|
|
13063
|
-
let
|
|
13064
|
-
if ($[46] !== search || $[47] !==
|
|
13065
|
-
|
|
13180
|
+
$[45] = t11;
|
|
13181
|
+
} else t11 = $[45];
|
|
13182
|
+
let t12;
|
|
13183
|
+
if ($[46] !== search || $[47] !== t11) {
|
|
13184
|
+
t12 = /* @__PURE__ */ jsx(Search, {
|
|
13066
13185
|
value: search,
|
|
13067
13186
|
onChange: setSearch,
|
|
13068
|
-
onCollapse:
|
|
13187
|
+
onCollapse: t11
|
|
13069
13188
|
});
|
|
13070
13189
|
$[46] = search;
|
|
13071
|
-
$[47] =
|
|
13072
|
-
$[48] =
|
|
13073
|
-
} else
|
|
13074
|
-
let
|
|
13190
|
+
$[47] = t11;
|
|
13191
|
+
$[48] = t12;
|
|
13192
|
+
} else t12 = $[48];
|
|
13193
|
+
let t13;
|
|
13075
13194
|
if ($[49] !== browserFits) {
|
|
13076
|
-
|
|
13195
|
+
t13 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13077
13196
|
icon: "fits-browser",
|
|
13078
13197
|
label: "Browser Fittings",
|
|
13079
13198
|
pressed: browserFits,
|
|
13080
13199
|
onPressedChange: setBrowserFits
|
|
13081
13200
|
});
|
|
13082
13201
|
$[49] = browserFits;
|
|
13083
|
-
$[50] =
|
|
13084
|
-
} else
|
|
13085
|
-
let
|
|
13202
|
+
$[50] = t13;
|
|
13203
|
+
} else t13 = $[50];
|
|
13204
|
+
let t14;
|
|
13086
13205
|
if ($[51] !== personalFits) {
|
|
13087
|
-
|
|
13206
|
+
t14 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13088
13207
|
icon: "fits-personal",
|
|
13089
13208
|
label: "Personal Fittings",
|
|
13090
13209
|
pressed: personalFits,
|
|
13091
13210
|
onPressedChange: setPersonalFits
|
|
13092
13211
|
});
|
|
13093
13212
|
$[51] = personalFits;
|
|
13094
|
-
$[52] =
|
|
13095
|
-
} else
|
|
13213
|
+
$[52] = t14;
|
|
13214
|
+
} else t14 = $[52];
|
|
13215
|
+
let t15;
|
|
13096
13216
|
let t16;
|
|
13097
13217
|
let t17;
|
|
13098
|
-
let t18;
|
|
13099
13218
|
if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13100
|
-
|
|
13219
|
+
t15 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13101
13220
|
icon: "fits-corporation",
|
|
13102
13221
|
label: "Corporation Fittings"
|
|
13103
13222
|
});
|
|
13104
|
-
|
|
13223
|
+
t16 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13105
13224
|
icon: "fits-alliance",
|
|
13106
13225
|
label: "Alliance Fittings"
|
|
13107
13226
|
});
|
|
13108
|
-
|
|
13227
|
+
t17 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13109
13228
|
icon: "fits-community",
|
|
13110
13229
|
label: "Community Fittings"
|
|
13111
13230
|
});
|
|
13112
|
-
$[53] =
|
|
13113
|
-
$[54] =
|
|
13114
|
-
$[55] =
|
|
13231
|
+
$[53] = t15;
|
|
13232
|
+
$[54] = t16;
|
|
13233
|
+
$[55] = t17;
|
|
13115
13234
|
} else {
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13235
|
+
t15 = $[53];
|
|
13236
|
+
t16 = $[54];
|
|
13237
|
+
t17 = $[55];
|
|
13119
13238
|
}
|
|
13120
|
-
let
|
|
13239
|
+
let t18;
|
|
13121
13240
|
if ($[56] !== currentHull || $[57] !== noHullSelected) {
|
|
13122
|
-
|
|
13241
|
+
t18 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13123
13242
|
icon: "current-hull",
|
|
13124
13243
|
label: "Current Hull",
|
|
13125
13244
|
pressed: currentHull,
|
|
@@ -13128,43 +13247,43 @@ function HullsAndFits(t0) {
|
|
|
13128
13247
|
});
|
|
13129
13248
|
$[56] = currentHull;
|
|
13130
13249
|
$[57] = noHullSelected;
|
|
13131
|
-
$[58] =
|
|
13132
|
-
} else
|
|
13133
|
-
let
|
|
13250
|
+
$[58] = t18;
|
|
13251
|
+
} else t18 = $[58];
|
|
13252
|
+
let t19;
|
|
13134
13253
|
if ($[59] !== flyable) {
|
|
13135
|
-
|
|
13254
|
+
t19 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13136
13255
|
icon: "skills",
|
|
13137
13256
|
label: "Skills",
|
|
13138
13257
|
pressed: flyable,
|
|
13139
13258
|
onPressedChange: setFlyable
|
|
13140
13259
|
});
|
|
13141
13260
|
$[59] = flyable;
|
|
13142
|
-
$[60] =
|
|
13143
|
-
} else
|
|
13144
|
-
let
|
|
13145
|
-
if ($[61] !==
|
|
13146
|
-
|
|
13261
|
+
$[60] = t19;
|
|
13262
|
+
} else t19 = $[60];
|
|
13263
|
+
let t20;
|
|
13264
|
+
if ($[61] !== t13 || $[62] !== t14 || $[63] !== t18 || $[64] !== t19) {
|
|
13265
|
+
t20 = /* @__PURE__ */ jsxs("fieldset", {
|
|
13147
13266
|
className: ItemBrowser_module_default.filters,
|
|
13148
13267
|
"aria-label": "Filters",
|
|
13149
13268
|
children: [
|
|
13269
|
+
t13,
|
|
13150
13270
|
t14,
|
|
13151
13271
|
t15,
|
|
13152
13272
|
t16,
|
|
13153
13273
|
t17,
|
|
13154
13274
|
t18,
|
|
13155
|
-
t19
|
|
13156
|
-
t20
|
|
13275
|
+
t19
|
|
13157
13276
|
]
|
|
13158
13277
|
});
|
|
13159
|
-
$[61] =
|
|
13160
|
-
$[62] =
|
|
13161
|
-
$[63] =
|
|
13162
|
-
$[64] =
|
|
13163
|
-
$[65] =
|
|
13164
|
-
} else
|
|
13165
|
-
let
|
|
13278
|
+
$[61] = t13;
|
|
13279
|
+
$[62] = t14;
|
|
13280
|
+
$[63] = t18;
|
|
13281
|
+
$[64] = t19;
|
|
13282
|
+
$[65] = t20;
|
|
13283
|
+
} else t20 = $[65];
|
|
13284
|
+
let t21;
|
|
13166
13285
|
if ($[66] !== groups.length || $[67] !== personal.character || $[68] !== personalFits) {
|
|
13167
|
-
|
|
13286
|
+
t21 = personalFits && personal.character?.canReadFits !== true ? /* @__PURE__ */ jsx("p", {
|
|
13168
13287
|
className: ItemBrowser_module_default.empty,
|
|
13169
13288
|
children: personal.character === void 0 ? "Log in or pick a character with the Character button" : "Log in again with the Character button to see fittings"
|
|
13170
13289
|
}) : groups.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
@@ -13174,18 +13293,18 @@ function HullsAndFits(t0) {
|
|
|
13174
13293
|
$[66] = groups.length;
|
|
13175
13294
|
$[67] = personal.character;
|
|
13176
13295
|
$[68] = personalFits;
|
|
13177
|
-
$[69] =
|
|
13178
|
-
} else
|
|
13179
|
-
let
|
|
13296
|
+
$[69] = t21;
|
|
13297
|
+
} else t21 = $[69];
|
|
13298
|
+
let t22;
|
|
13180
13299
|
if ($[70] !== browserByHull || $[71] !== collapses || $[72] !== end || $[73] !== fitMenu || $[74] !== groups || $[75] !== hullMenu || $[76] !== images || $[77] !== personalByHull || $[78] !== shownFits || $[79] !== simulate || $[80] !== start || $[81] !== store) {
|
|
13181
|
-
|
|
13300
|
+
t22 = groups.length > 0 && /* @__PURE__ */ jsx(TreeList, {
|
|
13182
13301
|
label: "Hulls",
|
|
13183
|
-
children: groups.map((
|
|
13184
|
-
const { group, races } =
|
|
13302
|
+
children: groups.map((t23) => {
|
|
13303
|
+
const { group, races } = t23;
|
|
13185
13304
|
return /* @__PURE__ */ jsx(TreeGroup, {
|
|
13186
13305
|
label: group.name,
|
|
13187
|
-
children: () => races.map((
|
|
13188
|
-
const { race, factionId, ships } =
|
|
13306
|
+
children: () => races.map((t24) => {
|
|
13307
|
+
const { race, factionId, ships } = t24;
|
|
13189
13308
|
return /* @__PURE__ */ jsx(TreeGroup, {
|
|
13190
13309
|
label: `${raceName(race)} [${ships.length}]`,
|
|
13191
13310
|
icon: factionId === void 0 ? images.marketGroupIcon(SHIPS_MARKET_GROUP_ID) : images.factionIcon(factionId),
|
|
@@ -13255,55 +13374,55 @@ function HullsAndFits(t0) {
|
|
|
13255
13374
|
$[79] = simulate;
|
|
13256
13375
|
$[80] = start;
|
|
13257
13376
|
$[81] = store;
|
|
13258
|
-
$[82] =
|
|
13259
|
-
} else
|
|
13260
|
-
let
|
|
13261
|
-
if ($[83] !==
|
|
13262
|
-
|
|
13377
|
+
$[82] = t22;
|
|
13378
|
+
} else t22 = $[82];
|
|
13379
|
+
let t23;
|
|
13380
|
+
if ($[83] !== t21 || $[84] !== t22) {
|
|
13381
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
13263
13382
|
className: ItemBrowser_module_default.tree,
|
|
13264
|
-
children: [
|
|
13383
|
+
children: [t21, t22]
|
|
13265
13384
|
});
|
|
13266
|
-
$[83] =
|
|
13267
|
-
$[84] =
|
|
13268
|
-
$[85] =
|
|
13269
|
-
} else
|
|
13270
|
-
const
|
|
13271
|
-
let
|
|
13385
|
+
$[83] = t21;
|
|
13386
|
+
$[84] = t22;
|
|
13387
|
+
$[85] = t23;
|
|
13388
|
+
} else t23 = $[85];
|
|
13389
|
+
const t24 = deleting !== void 0;
|
|
13390
|
+
let t25;
|
|
13272
13391
|
if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13273
|
-
|
|
13274
|
-
$[86] =
|
|
13275
|
-
} else
|
|
13276
|
-
const
|
|
13277
|
-
const
|
|
13278
|
-
let
|
|
13279
|
-
if ($[87] !==
|
|
13280
|
-
|
|
13392
|
+
t25 = () => setDeleting(void 0);
|
|
13393
|
+
$[86] = t25;
|
|
13394
|
+
} else t25 = $[86];
|
|
13395
|
+
const t26 = deleting?.fit.name || "Unnamed";
|
|
13396
|
+
const t27 = deleting?.kind === "fits-personal" ? `${personal.character?.name} in EVE` : "this browser";
|
|
13397
|
+
let t28;
|
|
13398
|
+
if ($[87] !== t26 || $[88] !== t27) {
|
|
13399
|
+
t28 = /* @__PURE__ */ jsxs("p", { children: [
|
|
13281
13400
|
"Delete the fit \"",
|
|
13282
|
-
|
|
13401
|
+
t26,
|
|
13283
13402
|
"\" from",
|
|
13284
13403
|
" ",
|
|
13285
|
-
|
|
13404
|
+
t27,
|
|
13286
13405
|
"?"
|
|
13287
13406
|
] });
|
|
13288
|
-
$[87] =
|
|
13289
|
-
$[88] =
|
|
13290
|
-
$[89] =
|
|
13291
|
-
} else
|
|
13292
|
-
let
|
|
13407
|
+
$[87] = t26;
|
|
13408
|
+
$[88] = t27;
|
|
13409
|
+
$[89] = t28;
|
|
13410
|
+
} else t28 = $[89];
|
|
13411
|
+
let t29;
|
|
13293
13412
|
if ($[90] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13294
|
-
|
|
13413
|
+
t29 = /* @__PURE__ */ jsx("button", {
|
|
13295
13414
|
type: "button",
|
|
13296
13415
|
className: ItemBrowser_module_default.action,
|
|
13297
13416
|
onClick: () => setDeleting(void 0),
|
|
13298
13417
|
children: "Cancel"
|
|
13299
13418
|
});
|
|
13300
|
-
$[90] =
|
|
13301
|
-
} else
|
|
13302
|
-
let
|
|
13419
|
+
$[90] = t29;
|
|
13420
|
+
} else t29 = $[90];
|
|
13421
|
+
let t30;
|
|
13303
13422
|
if ($[91] !== deleting || $[92] !== personal || $[93] !== remove) {
|
|
13304
|
-
|
|
13423
|
+
t30 = /* @__PURE__ */ jsxs("div", {
|
|
13305
13424
|
className: ItemBrowser_module_default.dialogButtons,
|
|
13306
|
-
children: [
|
|
13425
|
+
children: [t29, /* @__PURE__ */ jsx("button", {
|
|
13307
13426
|
type: "button",
|
|
13308
13427
|
className: ItemBrowser_module_default.action,
|
|
13309
13428
|
onClick: () => {
|
|
@@ -13320,45 +13439,45 @@ function HullsAndFits(t0) {
|
|
|
13320
13439
|
$[91] = deleting;
|
|
13321
13440
|
$[92] = personal;
|
|
13322
13441
|
$[93] = remove;
|
|
13323
|
-
$[94] =
|
|
13324
|
-
} else
|
|
13325
|
-
let
|
|
13326
|
-
if ($[95] !==
|
|
13327
|
-
|
|
13442
|
+
$[94] = t30;
|
|
13443
|
+
} else t30 = $[94];
|
|
13444
|
+
let t31;
|
|
13445
|
+
if ($[95] !== t28 || $[96] !== t30) {
|
|
13446
|
+
t31 = /* @__PURE__ */ jsxs("div", {
|
|
13328
13447
|
className: ItemBrowser_module_default.confirm,
|
|
13329
|
-
children: [
|
|
13448
|
+
children: [t28, t30]
|
|
13330
13449
|
});
|
|
13331
|
-
$[95] =
|
|
13332
|
-
$[96] =
|
|
13333
|
-
$[97] =
|
|
13334
|
-
} else
|
|
13335
|
-
let
|
|
13336
|
-
if ($[98] !==
|
|
13337
|
-
|
|
13338
|
-
open:
|
|
13450
|
+
$[95] = t28;
|
|
13451
|
+
$[96] = t30;
|
|
13452
|
+
$[97] = t31;
|
|
13453
|
+
} else t31 = $[97];
|
|
13454
|
+
let t32;
|
|
13455
|
+
if ($[98] !== t24 || $[99] !== t31) {
|
|
13456
|
+
t32 = /* @__PURE__ */ jsx(Dialog, {
|
|
13457
|
+
open: t24,
|
|
13339
13458
|
title: "Delete Fitting?",
|
|
13340
|
-
onClose:
|
|
13341
|
-
children:
|
|
13459
|
+
onClose: t25,
|
|
13460
|
+
children: t31
|
|
13342
13461
|
});
|
|
13343
|
-
$[98] =
|
|
13344
|
-
$[99] =
|
|
13345
|
-
$[100] =
|
|
13346
|
-
} else
|
|
13347
|
-
let
|
|
13462
|
+
$[98] = t24;
|
|
13463
|
+
$[99] = t31;
|
|
13464
|
+
$[100] = t32;
|
|
13465
|
+
} else t32 = $[100];
|
|
13466
|
+
let t33;
|
|
13348
13467
|
if ($[101] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13349
|
-
|
|
13350
|
-
$[101] =
|
|
13351
|
-
} else
|
|
13352
|
-
let
|
|
13468
|
+
t33 = () => setDeleteFailed(false);
|
|
13469
|
+
$[101] = t33;
|
|
13470
|
+
} else t33 = $[101];
|
|
13471
|
+
let t34;
|
|
13353
13472
|
if ($[102] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13354
|
-
|
|
13355
|
-
$[102] =
|
|
13356
|
-
} else
|
|
13357
|
-
let
|
|
13473
|
+
t34 = /* @__PURE__ */ jsx("p", { children: "EVE did not delete this fit. Please try again." });
|
|
13474
|
+
$[102] = t34;
|
|
13475
|
+
} else t34 = $[102];
|
|
13476
|
+
let t35;
|
|
13358
13477
|
if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13359
|
-
|
|
13478
|
+
t35 = /* @__PURE__ */ jsxs("div", {
|
|
13360
13479
|
className: ItemBrowser_module_default.confirm,
|
|
13361
|
-
children: [
|
|
13480
|
+
children: [t34, /* @__PURE__ */ jsx("div", {
|
|
13362
13481
|
className: ItemBrowser_module_default.dialogButtons,
|
|
13363
13482
|
children: /* @__PURE__ */ jsx("button", {
|
|
13364
13483
|
type: "button",
|
|
@@ -13368,42 +13487,42 @@ function HullsAndFits(t0) {
|
|
|
13368
13487
|
})
|
|
13369
13488
|
})]
|
|
13370
13489
|
});
|
|
13371
|
-
$[103] =
|
|
13372
|
-
} else
|
|
13373
|
-
let
|
|
13490
|
+
$[103] = t35;
|
|
13491
|
+
} else t35 = $[103];
|
|
13492
|
+
let t36;
|
|
13374
13493
|
if ($[104] !== deleteFailed) {
|
|
13375
|
-
|
|
13494
|
+
t36 = /* @__PURE__ */ jsx(Dialog, {
|
|
13376
13495
|
open: deleteFailed,
|
|
13377
13496
|
title: "Delete Fitting",
|
|
13378
|
-
onClose:
|
|
13379
|
-
children:
|
|
13497
|
+
onClose: t33,
|
|
13498
|
+
children: t35
|
|
13380
13499
|
});
|
|
13381
13500
|
$[104] = deleteFailed;
|
|
13382
|
-
$[105] =
|
|
13383
|
-
} else
|
|
13384
|
-
let
|
|
13385
|
-
if ($[106] !== copyDialog || $[107] !== menu || $[108] !== saveDialog || $[109] !==
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13501
|
+
$[105] = t36;
|
|
13502
|
+
} else t36 = $[105];
|
|
13503
|
+
let t37;
|
|
13504
|
+
if ($[106] !== copyDialog || $[107] !== menu || $[108] !== saveDialog || $[109] !== t12 || $[110] !== t20 || $[111] !== t23 || $[112] !== t32 || $[113] !== t36) {
|
|
13505
|
+
t37 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
13506
|
+
t12,
|
|
13507
|
+
t20,
|
|
13508
|
+
t23,
|
|
13390
13509
|
menu,
|
|
13391
13510
|
copyDialog,
|
|
13392
13511
|
saveDialog,
|
|
13393
|
-
|
|
13394
|
-
|
|
13512
|
+
t32,
|
|
13513
|
+
t36
|
|
13395
13514
|
] });
|
|
13396
13515
|
$[106] = copyDialog;
|
|
13397
13516
|
$[107] = menu;
|
|
13398
13517
|
$[108] = saveDialog;
|
|
13399
|
-
$[109] =
|
|
13400
|
-
$[110] =
|
|
13401
|
-
$[111] =
|
|
13402
|
-
$[112] =
|
|
13403
|
-
$[113] =
|
|
13404
|
-
$[114] =
|
|
13405
|
-
} else
|
|
13406
|
-
return
|
|
13518
|
+
$[109] = t12;
|
|
13519
|
+
$[110] = t20;
|
|
13520
|
+
$[111] = t23;
|
|
13521
|
+
$[112] = t32;
|
|
13522
|
+
$[113] = t36;
|
|
13523
|
+
$[114] = t37;
|
|
13524
|
+
} else t37 = $[114];
|
|
13525
|
+
return t37;
|
|
13407
13526
|
}
|
|
13408
13527
|
function _temp6(fit_3) {
|
|
13409
13528
|
return fit_3.ship.type_id;
|
|
@@ -13602,8 +13721,8 @@ const kindLabels = {
|
|
|
13602
13721
|
/** The Implants tab of the `ItemBrowser`: implants and boosters by market group or by slot. */
|
|
13603
13722
|
function Implants(t0) {
|
|
13604
13723
|
const $ = c(61);
|
|
13605
|
-
const {
|
|
13606
|
-
const { actions, clear, overlays } = useTypeActions(
|
|
13724
|
+
const { handled } = t0;
|
|
13725
|
+
const { actions, clear, overlays } = useTypeActions();
|
|
13607
13726
|
const placement = usePlacement();
|
|
13608
13727
|
const missingSkills = useMissingSkills();
|
|
13609
13728
|
const [search, setSearch] = useState("");
|
|
@@ -13613,7 +13732,7 @@ function Implants(t0) {
|
|
|
13613
13732
|
const [collapses, setCollapses] = useState(0);
|
|
13614
13733
|
const [opened, setOpened] = useState();
|
|
13615
13734
|
const { request } = useBrowse();
|
|
13616
|
-
const [browsed, setBrowsed] = useState(
|
|
13735
|
+
const [browsed, setBrowsed] = useState(handled);
|
|
13617
13736
|
if (request !== browsed) {
|
|
13618
13737
|
setBrowsed(request);
|
|
13619
13738
|
const target = request?.target;
|
|
@@ -14012,12 +14131,14 @@ const slotFilters = [
|
|
|
14012
14131
|
/** The Modules tab of the `ItemBrowser`: what goes on a ship, by market group. */
|
|
14013
14132
|
function Modules(t0) {
|
|
14014
14133
|
const $ = c(52);
|
|
14015
|
-
const {
|
|
14016
|
-
const { actions, clear, overlays } = useTypeActions(
|
|
14134
|
+
const { handled } = t0;
|
|
14135
|
+
const { actions, clear, overlays } = useTypeActions();
|
|
14017
14136
|
const placement = usePlacement();
|
|
14018
14137
|
const canFit = useCanFit();
|
|
14019
14138
|
const missingSkills = useMissingSkills();
|
|
14020
|
-
const
|
|
14139
|
+
const snapshot = useSnapshotIfAny();
|
|
14140
|
+
const noHullSelected = snapshot === void 0;
|
|
14141
|
+
const services = (snapshot?.stats.slots.service.total ?? 0) > 0;
|
|
14021
14142
|
let t1;
|
|
14022
14143
|
if ($[0] !== services) {
|
|
14023
14144
|
t1 = (t2) => {
|
|
@@ -14034,7 +14155,7 @@ function Modules(t0) {
|
|
|
14034
14155
|
const [flyable, setFlyable] = useState(false);
|
|
14035
14156
|
const [collapses, setCollapses] = useState(0);
|
|
14036
14157
|
const { request } = useBrowse();
|
|
14037
|
-
const [browsed, setBrowsed] = useState(
|
|
14158
|
+
const [browsed, setBrowsed] = useState(handled);
|
|
14038
14159
|
if (request !== browsed) {
|
|
14039
14160
|
setBrowsed(request);
|
|
14040
14161
|
const target = request?.target;
|
|
@@ -14254,37 +14375,41 @@ function _temp$2() {
|
|
|
14254
14375
|
return /* @__PURE__ */ new Set();
|
|
14255
14376
|
}
|
|
14256
14377
|
// src/components/ItemBrowser/ItemBrowser.tsx
|
|
14378
|
+
const NO_TABS = /* @__PURE__ */ new Set();
|
|
14257
14379
|
/** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
|
|
14258
|
-
function ItemBrowser({ label = "Item Browser",
|
|
14380
|
+
function ItemBrowser({ label = "Item Browser", pasteToOpen = false }) {
|
|
14259
14381
|
const [tab, setTab] = useState("hulls");
|
|
14382
|
+
const [opened, setOpened] = useState(() => /* @__PURE__ */ new Set([tab]));
|
|
14383
|
+
if (!opened.has(tab)) setOpened(/* @__PURE__ */ new Set([...opened, tab]));
|
|
14384
|
+
const rendered = useDeferredValue(opened, NO_TABS);
|
|
14260
14385
|
const { request } = useBrowse();
|
|
14261
14386
|
const [browsed, setBrowsed] = useState(request);
|
|
14387
|
+
const [handled] = useState(request);
|
|
14262
14388
|
if (request !== browsed) {
|
|
14263
14389
|
setBrowsed(request);
|
|
14264
14390
|
if (request !== void 0) setTab(typeof request.target === "string" ? "modules" : "implants");
|
|
14265
14391
|
}
|
|
14266
14392
|
const id = useId();
|
|
14267
|
-
const ready = useDeferredValue(true, false);
|
|
14268
14393
|
const tabs = [
|
|
14269
14394
|
{
|
|
14270
14395
|
tab: "hulls",
|
|
14271
14396
|
label: "Hulls & Fits",
|
|
14272
|
-
panel: /* @__PURE__ */ jsx(HullsAndFits, {
|
|
14397
|
+
panel: /* @__PURE__ */ jsx(HullsAndFits, {})
|
|
14273
14398
|
},
|
|
14274
14399
|
{
|
|
14275
14400
|
tab: "modules",
|
|
14276
14401
|
label: "Modules",
|
|
14277
|
-
panel: /* @__PURE__ */ jsx(Modules, {
|
|
14402
|
+
panel: /* @__PURE__ */ jsx(Modules, { handled })
|
|
14278
14403
|
},
|
|
14279
14404
|
{
|
|
14280
14405
|
tab: "charges",
|
|
14281
14406
|
label: "Charges",
|
|
14282
|
-
panel: /* @__PURE__ */ jsx(Charges, {
|
|
14407
|
+
panel: /* @__PURE__ */ jsx(Charges, {})
|
|
14283
14408
|
},
|
|
14284
14409
|
{
|
|
14285
14410
|
tab: "implants",
|
|
14286
14411
|
label: "Implants",
|
|
14287
|
-
panel: /* @__PURE__ */ jsx(Implants, {
|
|
14412
|
+
panel: /* @__PURE__ */ jsx(Implants, { handled })
|
|
14288
14413
|
}
|
|
14289
14414
|
];
|
|
14290
14415
|
return /* @__PURE__ */ jsxs("section", {
|
|
@@ -14325,7 +14450,7 @@ function ItemBrowser({ label = "Item Browser", noHullSelected = false, pasteToOp
|
|
|
14325
14450
|
search.focus();
|
|
14326
14451
|
}
|
|
14327
14452
|
},
|
|
14328
|
-
children:
|
|
14453
|
+
children: rendered.has(each_0.tab) ? /* @__PURE__ */ jsx(Activity, {
|
|
14329
14454
|
mode: tab === each_0.tab ? "visible" : "hidden",
|
|
14330
14455
|
children: each_0.panel
|
|
14331
14456
|
}) : /* @__PURE__ */ jsx("p", {
|
|
@@ -14333,10 +14458,7 @@ function ItemBrowser({ label = "Item Browser", noHullSelected = false, pasteToOp
|
|
|
14333
14458
|
children: "Loading…"
|
|
14334
14459
|
})
|
|
14335
14460
|
}, each_0.tab)),
|
|
14336
|
-
/* @__PURE__ */ jsx(FitActions, {
|
|
14337
|
-
noHullSelected,
|
|
14338
|
-
pasteToOpen
|
|
14339
|
-
})
|
|
14461
|
+
/* @__PURE__ */ jsx(FitActions, { pasteToOpen })
|
|
14340
14462
|
]
|
|
14341
14463
|
});
|
|
14342
14464
|
}
|
|
@@ -16288,4 +16410,4 @@ function ShipStatistics({ label = "Statistics" }) {
|
|
|
16288
16410
|
})]
|
|
16289
16411
|
});
|
|
16290
16412
|
}
|
|
16291
|
-
export { CapacitorRing, CapacitorStats, DefenseStats, Dialog, DroneStats, FilterToggle, FitPrice, FittingWheel, FittingWindow, HistoryBar, Icon, ItemBrowser, NavigationStats, OffenseStats, RepairRate, ResistanceBar, Resistances, ShipStatistics, Stat, StatsSection, TargetingStats, Tooltip, TooltipText, TreeGroup, TreeLeaf, TreeList, TypeIcon, Wheel, WheelGauge, WheelHardpoints, WheelHull, WheelLink, WheelRackMarker, WheelSlot, iconNames, rackSize, slotAngle };
|
|
16413
|
+
export { CapacitorRing, CapacitorStats, DefenseStats, Dialog, DroneStats, FilterToggle, FitPrice, FittingWheel, FittingWindow, FittingWindowLoading, HistoryBar, Icon, ItemBrowser, NavigationStats, OffenseStats, RepairRate, ResistanceBar, Resistances, ShipStatistics, Stat, StatsSection, TargetingStats, Tooltip, TooltipText, TreeGroup, TreeLeaf, TreeList, TypeIcon, Wheel, WheelGauge, WheelHardpoints, WheelHull, WheelLink, WheelRackMarker, WheelSlot, iconNames, rackSize, slotAngle };
|