@eveshipfit/ui-ingame 1.2.0 → 1.4.0
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/README.md +1 -1
- package/dist/index.d.mts +22 -5
- package/dist/index.mjs +2656 -1248
- package/dist/style.css +402 -32
- package/dist/theme.css +3 -0
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './style.css';
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useCanFit, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDrag, useDroneRoom, useFit, useFitHistory, useFitStore, useHardpoints, useHullTree, useImages, useLocalFits, useMissingSkills, useModuleSearch, useModuleTree, usePlacement, usePreview, useRackUsage, useSde, useSlots, useSnapshot,
|
|
5
|
+
import { formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useCanFit, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDrag, useDroneRoom, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitStore, useHardpoints, useHullTree, useImages, useLocalFits, useMissingSkills, useModuleSearch, useModuleTree, usePlacement, usePreview, useRackUsage, useSde, useShownSnapshot, useSlots, useSnapshot, useStats, useType } from "@eveshipfit/react-hooks";
|
|
6
6
|
//#region src/primitives/Dialog/Dialog.module.css
|
|
7
7
|
var Dialog_module_default = {
|
|
8
8
|
"close": "kwi1cG_close",
|
|
@@ -226,20 +226,21 @@ function TreeList(t0) {
|
|
|
226
226
|
return t1;
|
|
227
227
|
}
|
|
228
228
|
function TreeGroup(t0) {
|
|
229
|
-
const $ = c(
|
|
230
|
-
const { label, typeId, icon, description, defaultOpen: t1, after, children } = t0;
|
|
229
|
+
const $ = c(34);
|
|
230
|
+
const { label, typeId, icon, description, defaultOpen: t1, after, onDragStart, onDragEnd, children } = t0;
|
|
231
231
|
const [open, setOpen] = useState(t1 === void 0 ? false : t1);
|
|
232
232
|
const descriptionId = useId();
|
|
233
233
|
const t2 = description !== void 0 ? descriptionId : void 0;
|
|
234
|
-
|
|
234
|
+
const t3 = onDragStart !== void 0 || void 0;
|
|
235
|
+
let t4;
|
|
235
236
|
if ($[0] !== open) {
|
|
236
|
-
|
|
237
|
+
t4 = () => setOpen(!open);
|
|
237
238
|
$[0] = open;
|
|
238
|
-
$[1] =
|
|
239
|
-
} else
|
|
240
|
-
let
|
|
239
|
+
$[1] = t4;
|
|
240
|
+
} else t4 = $[1];
|
|
241
|
+
let t5;
|
|
241
242
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
242
|
-
|
|
243
|
+
t5 = /* @__PURE__ */ jsx("svg", {
|
|
243
244
|
className: TreeList_module_default.chevron,
|
|
244
245
|
viewBox: "0 0 12 12",
|
|
245
246
|
"aria-hidden": true,
|
|
@@ -248,37 +249,37 @@ function TreeGroup(t0) {
|
|
|
248
249
|
fill: "currentColor"
|
|
249
250
|
})
|
|
250
251
|
});
|
|
251
|
-
$[2] =
|
|
252
|
-
} else
|
|
253
|
-
let
|
|
252
|
+
$[2] = t5;
|
|
253
|
+
} else t5 = $[2];
|
|
254
|
+
let t6;
|
|
254
255
|
if ($[3] !== typeId) {
|
|
255
|
-
|
|
256
|
+
t6 = typeId !== void 0 && /* @__PURE__ */ jsx(RowIcon, { typeId });
|
|
256
257
|
$[3] = typeId;
|
|
257
|
-
$[4] =
|
|
258
|
-
} else
|
|
259
|
-
let
|
|
258
|
+
$[4] = t6;
|
|
259
|
+
} else t6 = $[4];
|
|
260
|
+
let t7;
|
|
260
261
|
if ($[5] !== icon) {
|
|
261
|
-
|
|
262
|
+
t7 = icon !== void 0 && /* @__PURE__ */ jsx("img", {
|
|
262
263
|
className: TreeList_module_default.smallIcon,
|
|
263
264
|
src: icon,
|
|
264
265
|
alt: "",
|
|
265
266
|
draggable: false
|
|
266
267
|
});
|
|
267
268
|
$[5] = icon;
|
|
268
|
-
$[6] =
|
|
269
|
-
} else
|
|
270
|
-
let
|
|
269
|
+
$[6] = t7;
|
|
270
|
+
} else t7 = $[6];
|
|
271
|
+
let t8;
|
|
271
272
|
if ($[7] !== label) {
|
|
272
|
-
|
|
273
|
+
t8 = /* @__PURE__ */ jsx("span", {
|
|
273
274
|
className: TreeList_module_default.label,
|
|
274
275
|
children: label
|
|
275
276
|
});
|
|
276
277
|
$[7] = label;
|
|
277
|
-
$[8] =
|
|
278
|
-
} else
|
|
279
|
-
let
|
|
278
|
+
$[8] = t8;
|
|
279
|
+
} else t8 = $[8];
|
|
280
|
+
let t9;
|
|
280
281
|
if ($[9] !== description || $[10] !== descriptionId) {
|
|
281
|
-
|
|
282
|
+
t9 = description !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
282
283
|
id: descriptionId,
|
|
283
284
|
className: TreeList_module_default.label,
|
|
284
285
|
"aria-hidden": true,
|
|
@@ -286,69 +287,75 @@ function TreeGroup(t0) {
|
|
|
286
287
|
});
|
|
287
288
|
$[9] = description;
|
|
288
289
|
$[10] = descriptionId;
|
|
289
|
-
$[11] =
|
|
290
|
-
} else
|
|
291
|
-
let
|
|
292
|
-
if ($[12] !==
|
|
293
|
-
|
|
290
|
+
$[11] = t9;
|
|
291
|
+
} else t9 = $[11];
|
|
292
|
+
let t10;
|
|
293
|
+
if ($[12] !== t8 || $[13] !== t9) {
|
|
294
|
+
t10 = /* @__PURE__ */ jsxs("span", {
|
|
294
295
|
className: TreeList_module_default.text,
|
|
295
|
-
children: [
|
|
296
|
+
children: [t8, t9]
|
|
296
297
|
});
|
|
297
|
-
$[12] =
|
|
298
|
-
$[13] =
|
|
299
|
-
$[14] =
|
|
300
|
-
} else
|
|
301
|
-
let
|
|
302
|
-
if ($[15] !==
|
|
303
|
-
|
|
298
|
+
$[12] = t8;
|
|
299
|
+
$[13] = t9;
|
|
300
|
+
$[14] = t10;
|
|
301
|
+
} else t10 = $[14];
|
|
302
|
+
let t11;
|
|
303
|
+
if ($[15] !== onDragEnd || $[16] !== onDragStart || $[17] !== open || $[18] !== t10 || $[19] !== t2 || $[20] !== t3 || $[21] !== t4 || $[22] !== t6 || $[23] !== t7) {
|
|
304
|
+
t11 = /* @__PURE__ */ jsxs("button", {
|
|
304
305
|
type: "button",
|
|
305
306
|
className: TreeList_module_default.row,
|
|
306
307
|
"aria-expanded": open,
|
|
307
308
|
"aria-describedby": t2,
|
|
308
|
-
|
|
309
|
+
draggable: t3,
|
|
310
|
+
onClick: t4,
|
|
311
|
+
onDragStart,
|
|
312
|
+
onDragEnd,
|
|
309
313
|
children: [
|
|
310
|
-
t4,
|
|
311
314
|
t5,
|
|
312
315
|
t6,
|
|
313
|
-
|
|
316
|
+
t7,
|
|
317
|
+
t10
|
|
314
318
|
]
|
|
315
319
|
});
|
|
316
|
-
$[15] =
|
|
317
|
-
$[16] =
|
|
318
|
-
$[17] =
|
|
319
|
-
$[18] =
|
|
320
|
-
$[19] =
|
|
321
|
-
$[20] =
|
|
322
|
-
$[21] =
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
if ($[22] !== after || $[23] !== t10) {
|
|
326
|
-
t11 = /* @__PURE__ */ jsxs("div", {
|
|
327
|
-
className: TreeList_module_default.head,
|
|
328
|
-
children: [t10, after]
|
|
329
|
-
});
|
|
330
|
-
$[22] = after;
|
|
331
|
-
$[23] = t10;
|
|
320
|
+
$[15] = onDragEnd;
|
|
321
|
+
$[16] = onDragStart;
|
|
322
|
+
$[17] = open;
|
|
323
|
+
$[18] = t10;
|
|
324
|
+
$[19] = t2;
|
|
325
|
+
$[20] = t3;
|
|
326
|
+
$[21] = t4;
|
|
327
|
+
$[22] = t6;
|
|
328
|
+
$[23] = t7;
|
|
332
329
|
$[24] = t11;
|
|
333
330
|
} else t11 = $[24];
|
|
334
331
|
let t12;
|
|
335
|
-
if ($[25] !==
|
|
336
|
-
t12 =
|
|
337
|
-
className: TreeList_module_default.
|
|
338
|
-
children:
|
|
332
|
+
if ($[25] !== after || $[26] !== t11) {
|
|
333
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
334
|
+
className: TreeList_module_default.head,
|
|
335
|
+
children: [t11, after]
|
|
339
336
|
});
|
|
340
|
-
$[25] =
|
|
341
|
-
$[26] =
|
|
337
|
+
$[25] = after;
|
|
338
|
+
$[26] = t11;
|
|
342
339
|
$[27] = t12;
|
|
343
340
|
} else t12 = $[27];
|
|
344
341
|
let t13;
|
|
345
|
-
if ($[28] !==
|
|
346
|
-
t13 = /* @__PURE__ */
|
|
347
|
-
|
|
348
|
-
|
|
342
|
+
if ($[28] !== children || $[29] !== open) {
|
|
343
|
+
t13 = open && /* @__PURE__ */ jsx("ul", {
|
|
344
|
+
className: TreeList_module_default.group,
|
|
345
|
+
children: children()
|
|
346
|
+
});
|
|
347
|
+
$[28] = children;
|
|
348
|
+
$[29] = open;
|
|
349
349
|
$[30] = t13;
|
|
350
350
|
} else t13 = $[30];
|
|
351
|
-
|
|
351
|
+
let t14;
|
|
352
|
+
if ($[31] !== t12 || $[32] !== t13) {
|
|
353
|
+
t14 = /* @__PURE__ */ jsxs("li", { children: [t12, t13] });
|
|
354
|
+
$[31] = t12;
|
|
355
|
+
$[32] = t13;
|
|
356
|
+
$[33] = t14;
|
|
357
|
+
} else t14 = $[33];
|
|
358
|
+
return t14;
|
|
352
359
|
}
|
|
353
360
|
/** Activates on double click, as EVE's own lists do; single clicks are for selecting text and dragging. */
|
|
354
361
|
function TreeLeaf(t0) {
|
|
@@ -457,6 +464,7 @@ const textures = {
|
|
|
457
464
|
"slot-low": "classes/fitting/filtericonlowslot",
|
|
458
465
|
"slot-rig": "classes/fitting/filtericonrigslot",
|
|
459
466
|
"slot-subsystem": "windowicons/subsystems",
|
|
467
|
+
"slot-service": "classes/fitting/stationserviceslot",
|
|
460
468
|
"module-unfit": "icons/38_16_200",
|
|
461
469
|
"module-power": "icons/38_16_207",
|
|
462
470
|
"module-info": "icons/38_16_208",
|
|
@@ -487,6 +495,16 @@ const textures = {
|
|
|
487
495
|
statistics: "eveicon/system_icons/list_view_16px",
|
|
488
496
|
cargo: "windowicons/ships",
|
|
489
497
|
"drone-bay": "windowicons/dronebay",
|
|
498
|
+
"fighter-bay": "classes/shipui/fighters/iconfighterbay",
|
|
499
|
+
"fighter-light": "classes/carrierbay/iconfighterlight",
|
|
500
|
+
"fighter-support": "classes/carrierbay/iconfightermedium",
|
|
501
|
+
"fighter-heavy": "classes/carrierbay/iconfighterheavy",
|
|
502
|
+
"fighter-role-interceptor": "classes/shipui/fighters/roleicon_interceptor",
|
|
503
|
+
"fighter-role-attack": "classes/shipui/fighters/roleicon_general",
|
|
504
|
+
"fighter-role-support": "classes/shipui/fighters/roleicon_support",
|
|
505
|
+
"fighter-role-heavy-attack": "classes/shipui/fighters/roleicon_anticapital",
|
|
506
|
+
"fighter-role-bomber": "classes/shipui/fighters/roleicon_bomber",
|
|
507
|
+
"ammo-hold": "windowicons/itemhangar",
|
|
490
508
|
"arrow-left": "shared/triangleleft",
|
|
491
509
|
"arrow-right": "shared/triangleright",
|
|
492
510
|
"arrow-down": "shared/triangledown",
|
|
@@ -517,7 +535,8 @@ const textures = {
|
|
|
517
535
|
"stat-warp-speed": "classes/fitting/statsicons/warpspeed",
|
|
518
536
|
"stat-align-time": "classes/fitting/statsicons/aligntime",
|
|
519
537
|
"stat-drone-bandwidth": "classes/fitting/statsicons/bandwidth",
|
|
520
|
-
"stat-drone-control-range": "classes/fitting/statsicons/controlrange"
|
|
538
|
+
"stat-drone-control-range": "classes/fitting/statsicons/controlrange",
|
|
539
|
+
"stat-fuel": "classes/fitting/statsicons/fuel"
|
|
521
540
|
};
|
|
522
541
|
const iconNames = Object.keys(textures);
|
|
523
542
|
function Icon(t0) {
|
|
@@ -794,51 +813,53 @@ var HistoryBar_module_default = {
|
|
|
794
813
|
//#region src/primitives/HistoryBar/HistoryBar.tsx
|
|
795
814
|
/** EVE's Simulation History. */
|
|
796
815
|
function HistoryBar(t0) {
|
|
797
|
-
const $ = c(
|
|
798
|
-
const { label, length, position, onGoTo } = t0;
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
816
|
+
const $ = c(33);
|
|
817
|
+
const { label, length, position, onGoTo, tooltipTitle: t1 } = t0;
|
|
818
|
+
const tooltipTitle = t1 === void 0 ? false : t1;
|
|
819
|
+
let t2;
|
|
820
|
+
if ($[0] !== label || $[1] !== tooltipTitle) {
|
|
821
|
+
t2 = !tooltipTitle && /* @__PURE__ */ jsx("span", {
|
|
802
822
|
className: HistoryBar_module_default.title,
|
|
803
823
|
"aria-hidden": true,
|
|
804
824
|
children: label
|
|
805
825
|
});
|
|
806
826
|
$[0] = label;
|
|
807
|
-
$[1] =
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
if ($[2] !== onGoTo || $[3] !== position) {
|
|
812
|
-
t3 = () => onGoTo(position - 1);
|
|
813
|
-
$[2] = onGoTo;
|
|
814
|
-
$[3] = position;
|
|
815
|
-
$[4] = t3;
|
|
816
|
-
} else t3 = $[4];
|
|
827
|
+
$[1] = tooltipTitle;
|
|
828
|
+
$[2] = t2;
|
|
829
|
+
} else t2 = $[2];
|
|
830
|
+
const t3 = position <= 0;
|
|
817
831
|
let t4;
|
|
818
|
-
if ($[
|
|
819
|
-
t4 =
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
});
|
|
832
|
+
if ($[3] !== onGoTo || $[4] !== position) {
|
|
833
|
+
t4 = () => onGoTo(position - 1);
|
|
834
|
+
$[3] = onGoTo;
|
|
835
|
+
$[4] = position;
|
|
823
836
|
$[5] = t4;
|
|
824
837
|
} else t4 = $[5];
|
|
825
838
|
let t5;
|
|
826
|
-
if ($[6]
|
|
827
|
-
t5 = /* @__PURE__ */ jsx(
|
|
839
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
840
|
+
t5 = /* @__PURE__ */ jsx(Icon, {
|
|
841
|
+
name: "arrow-left",
|
|
842
|
+
size: 10
|
|
843
|
+
});
|
|
844
|
+
$[6] = t5;
|
|
845
|
+
} else t5 = $[6];
|
|
846
|
+
let t6;
|
|
847
|
+
if ($[7] !== t3 || $[8] !== t4) {
|
|
848
|
+
t6 = /* @__PURE__ */ jsx("button", {
|
|
828
849
|
type: "button",
|
|
829
850
|
className: HistoryBar_module_default.arrow,
|
|
830
851
|
"aria-label": "Back",
|
|
831
|
-
disabled:
|
|
832
|
-
onClick:
|
|
833
|
-
children:
|
|
852
|
+
disabled: t3,
|
|
853
|
+
onClick: t4,
|
|
854
|
+
children: t5
|
|
834
855
|
});
|
|
835
|
-
$[6] = t2;
|
|
836
856
|
$[7] = t3;
|
|
837
|
-
$[8] =
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
857
|
+
$[8] = t4;
|
|
858
|
+
$[9] = t6;
|
|
859
|
+
} else t6 = $[9];
|
|
860
|
+
let t7;
|
|
861
|
+
if ($[10] !== length || $[11] !== onGoTo || $[12] !== position) {
|
|
862
|
+
t7 = /* @__PURE__ */ jsx("div", {
|
|
842
863
|
className: HistoryBar_module_default.entries,
|
|
843
864
|
children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx("button", {
|
|
844
865
|
type: "button",
|
|
@@ -848,69 +869,81 @@ function HistoryBar(t0) {
|
|
|
848
869
|
onClick: () => onGoTo(index)
|
|
849
870
|
}, index))
|
|
850
871
|
});
|
|
851
|
-
$[
|
|
852
|
-
$[
|
|
853
|
-
$[
|
|
854
|
-
$[
|
|
855
|
-
} else
|
|
856
|
-
const
|
|
857
|
-
let t8;
|
|
858
|
-
if ($[13] !== onGoTo || $[14] !== position) {
|
|
859
|
-
t8 = () => onGoTo(position + 1);
|
|
860
|
-
$[13] = onGoTo;
|
|
861
|
-
$[14] = position;
|
|
862
|
-
$[15] = t8;
|
|
863
|
-
} else t8 = $[15];
|
|
872
|
+
$[10] = length;
|
|
873
|
+
$[11] = onGoTo;
|
|
874
|
+
$[12] = position;
|
|
875
|
+
$[13] = t7;
|
|
876
|
+
} else t7 = $[13];
|
|
877
|
+
const t8 = position >= length - 1;
|
|
864
878
|
let t9;
|
|
865
|
-
if ($[
|
|
866
|
-
t9 =
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
});
|
|
879
|
+
if ($[14] !== onGoTo || $[15] !== position) {
|
|
880
|
+
t9 = () => onGoTo(position + 1);
|
|
881
|
+
$[14] = onGoTo;
|
|
882
|
+
$[15] = position;
|
|
870
883
|
$[16] = t9;
|
|
871
884
|
} else t9 = $[16];
|
|
872
885
|
let t10;
|
|
873
|
-
if ($[17]
|
|
874
|
-
t10 = /* @__PURE__ */ jsx(
|
|
886
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
887
|
+
t10 = /* @__PURE__ */ jsx(Icon, {
|
|
888
|
+
name: "arrow-right",
|
|
889
|
+
size: 10
|
|
890
|
+
});
|
|
891
|
+
$[17] = t10;
|
|
892
|
+
} else t10 = $[17];
|
|
893
|
+
let t11;
|
|
894
|
+
if ($[18] !== t8 || $[19] !== t9) {
|
|
895
|
+
t11 = /* @__PURE__ */ jsx("button", {
|
|
875
896
|
type: "button",
|
|
876
897
|
className: HistoryBar_module_default.arrow,
|
|
877
898
|
"aria-label": "Forward",
|
|
878
|
-
disabled:
|
|
879
|
-
onClick:
|
|
880
|
-
children:
|
|
899
|
+
disabled: t8,
|
|
900
|
+
onClick: t9,
|
|
901
|
+
children: t10
|
|
881
902
|
});
|
|
882
|
-
$[17] = t7;
|
|
883
903
|
$[18] = t8;
|
|
884
|
-
$[19] =
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
904
|
+
$[19] = t9;
|
|
905
|
+
$[20] = t11;
|
|
906
|
+
} else t11 = $[20];
|
|
907
|
+
let t12;
|
|
908
|
+
if ($[21] !== t11 || $[22] !== t6 || $[23] !== t7) {
|
|
909
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
889
910
|
className: HistoryBar_module_default.row,
|
|
890
911
|
children: [
|
|
891
|
-
t5,
|
|
892
912
|
t6,
|
|
893
|
-
|
|
913
|
+
t7,
|
|
914
|
+
t11
|
|
894
915
|
]
|
|
895
916
|
});
|
|
896
|
-
$[
|
|
897
|
-
$[21] = t5;
|
|
917
|
+
$[21] = t11;
|
|
898
918
|
$[22] = t6;
|
|
899
|
-
$[23] =
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
919
|
+
$[23] = t7;
|
|
920
|
+
$[24] = t12;
|
|
921
|
+
} else t12 = $[24];
|
|
922
|
+
let t13;
|
|
923
|
+
if ($[25] !== label || $[26] !== t12 || $[27] !== t2) {
|
|
924
|
+
t13 = /* @__PURE__ */ jsxs("fieldset", {
|
|
904
925
|
className: HistoryBar_module_default.history,
|
|
905
926
|
"aria-label": label,
|
|
906
|
-
children: [
|
|
927
|
+
children: [t2, t12]
|
|
907
928
|
});
|
|
908
|
-
$[
|
|
909
|
-
$[
|
|
910
|
-
$[
|
|
911
|
-
$[
|
|
912
|
-
} else
|
|
913
|
-
|
|
929
|
+
$[25] = label;
|
|
930
|
+
$[26] = t12;
|
|
931
|
+
$[27] = t2;
|
|
932
|
+
$[28] = t13;
|
|
933
|
+
} else t13 = $[28];
|
|
934
|
+
const bar = t13;
|
|
935
|
+
let t14;
|
|
936
|
+
if ($[29] !== bar || $[30] !== label || $[31] !== tooltipTitle) {
|
|
937
|
+
t14 = tooltipTitle ? /* @__PURE__ */ jsx(Tooltip, {
|
|
938
|
+
label,
|
|
939
|
+
children: bar
|
|
940
|
+
}) : bar;
|
|
941
|
+
$[29] = bar;
|
|
942
|
+
$[30] = label;
|
|
943
|
+
$[31] = tooltipTitle;
|
|
944
|
+
$[32] = t14;
|
|
945
|
+
} else t14 = $[32];
|
|
946
|
+
return t14;
|
|
914
947
|
}
|
|
915
948
|
//#endregion
|
|
916
949
|
//#region src/primitives/Wheel/layout.ts
|
|
@@ -1092,6 +1125,94 @@ function WheelRackMarker(t0) {
|
|
|
1092
1125
|
return t3;
|
|
1093
1126
|
}
|
|
1094
1127
|
//#endregion
|
|
1128
|
+
//#region src/primitives/SlotAction/SlotAction.module.css
|
|
1129
|
+
var SlotAction_module_default = { "button": "ld11eq_button" };
|
|
1130
|
+
//#endregion
|
|
1131
|
+
//#region src/primitives/SlotAction/SlotAction.tsx
|
|
1132
|
+
/** One of the buttons EVE shows over a hovered slot. */
|
|
1133
|
+
function SlotAction(t0) {
|
|
1134
|
+
const $ = c(9);
|
|
1135
|
+
const { icon, label, onPress } = t0;
|
|
1136
|
+
let t1;
|
|
1137
|
+
if ($[0] !== icon) {
|
|
1138
|
+
t1 = /* @__PURE__ */ jsx(Icon, { name: icon });
|
|
1139
|
+
$[0] = icon;
|
|
1140
|
+
$[1] = t1;
|
|
1141
|
+
} else t1 = $[1];
|
|
1142
|
+
let t2;
|
|
1143
|
+
if ($[2] !== label || $[3] !== onPress || $[4] !== t1) {
|
|
1144
|
+
t2 = /* @__PURE__ */ jsx("button", {
|
|
1145
|
+
type: "button",
|
|
1146
|
+
className: SlotAction_module_default.button,
|
|
1147
|
+
"aria-label": label,
|
|
1148
|
+
onClick: onPress,
|
|
1149
|
+
children: t1
|
|
1150
|
+
});
|
|
1151
|
+
$[2] = label;
|
|
1152
|
+
$[3] = onPress;
|
|
1153
|
+
$[4] = t1;
|
|
1154
|
+
$[5] = t2;
|
|
1155
|
+
} else t2 = $[5];
|
|
1156
|
+
let t3;
|
|
1157
|
+
if ($[6] !== label || $[7] !== t2) {
|
|
1158
|
+
t3 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1159
|
+
label,
|
|
1160
|
+
children: t2
|
|
1161
|
+
});
|
|
1162
|
+
$[6] = label;
|
|
1163
|
+
$[7] = t2;
|
|
1164
|
+
$[8] = t3;
|
|
1165
|
+
} else t3 = $[8];
|
|
1166
|
+
return t3;
|
|
1167
|
+
}
|
|
1168
|
+
function SlotInfo() {
|
|
1169
|
+
const $ = c(1);
|
|
1170
|
+
let t0;
|
|
1171
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1172
|
+
t0 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1173
|
+
label: "Show Info (not implemented yet)",
|
|
1174
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1175
|
+
type: "button",
|
|
1176
|
+
className: SlotAction_module_default.button,
|
|
1177
|
+
"aria-label": "Show Info",
|
|
1178
|
+
"aria-disabled": true,
|
|
1179
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "module-info" })
|
|
1180
|
+
})
|
|
1181
|
+
});
|
|
1182
|
+
$[0] = t0;
|
|
1183
|
+
} else t0 = $[0];
|
|
1184
|
+
return t0;
|
|
1185
|
+
}
|
|
1186
|
+
/** Makes the whole slot a button, named `label`. */
|
|
1187
|
+
function SlotPress(t0) {
|
|
1188
|
+
const $ = c(4);
|
|
1189
|
+
const { className, label, onPress } = t0;
|
|
1190
|
+
let t1;
|
|
1191
|
+
if ($[0] !== className || $[1] !== label || $[2] !== onPress) {
|
|
1192
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
1193
|
+
role: "button",
|
|
1194
|
+
tabIndex: 0,
|
|
1195
|
+
className,
|
|
1196
|
+
"aria-label": label,
|
|
1197
|
+
onClick: onPress,
|
|
1198
|
+
onKeyDown: _temp$8
|
|
1199
|
+
});
|
|
1200
|
+
$[0] = className;
|
|
1201
|
+
$[1] = label;
|
|
1202
|
+
$[2] = onPress;
|
|
1203
|
+
$[3] = t1;
|
|
1204
|
+
} else t1 = $[3];
|
|
1205
|
+
return t1;
|
|
1206
|
+
}
|
|
1207
|
+
function _temp$8(event) {
|
|
1208
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
1209
|
+
event.preventDefault();
|
|
1210
|
+
event.currentTarget.dispatchEvent(new MouseEvent("click", {
|
|
1211
|
+
bubbles: true,
|
|
1212
|
+
shiftKey: event.shiftKey
|
|
1213
|
+
}));
|
|
1214
|
+
}
|
|
1215
|
+
//#endregion
|
|
1095
1216
|
//#region src/primitives/Wheel/WheelSlot.module.css
|
|
1096
1217
|
var WheelSlot_module_default = {
|
|
1097
1218
|
"action": "T6VD6G_action",
|
|
@@ -1099,7 +1220,6 @@ var WheelSlot_module_default = {
|
|
|
1099
1220
|
"ammo": "T6VD6G_ammo",
|
|
1100
1221
|
"body": "T6VD6G_body",
|
|
1101
1222
|
"bridge": "T6VD6G_bridge",
|
|
1102
|
-
"button": "T6VD6G_button",
|
|
1103
1223
|
"empty": "T6VD6G_empty",
|
|
1104
1224
|
"fill": "T6VD6G_fill",
|
|
1105
1225
|
"frame": "T6VD6G_frame",
|
|
@@ -1219,7 +1339,7 @@ function WheelSlot(t0) {
|
|
|
1219
1339
|
if (chargeTypeId !== void 0) {
|
|
1220
1340
|
row.push(onRemoveCharge && {
|
|
1221
1341
|
key: "charge",
|
|
1222
|
-
node: /* @__PURE__ */ jsx(
|
|
1342
|
+
node: /* @__PURE__ */ jsx(SlotAction, {
|
|
1223
1343
|
icon: "module-unfit",
|
|
1224
1344
|
label: "Remove Charge",
|
|
1225
1345
|
onPress: onRemoveCharge
|
|
@@ -1227,7 +1347,7 @@ function WheelSlot(t0) {
|
|
|
1227
1347
|
});
|
|
1228
1348
|
let t8;
|
|
1229
1349
|
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1230
|
-
t8 = /* @__PURE__ */ jsx(
|
|
1350
|
+
t8 = /* @__PURE__ */ jsx(SlotInfo, {});
|
|
1231
1351
|
$[34] = t8;
|
|
1232
1352
|
} else t8 = $[34];
|
|
1233
1353
|
row.push({
|
|
@@ -1251,7 +1371,7 @@ function WheelSlot(t0) {
|
|
|
1251
1371
|
}
|
|
1252
1372
|
row.push(onUnfit && {
|
|
1253
1373
|
key: "unfit",
|
|
1254
|
-
node: /* @__PURE__ */ jsx(
|
|
1374
|
+
node: /* @__PURE__ */ jsx(SlotAction, {
|
|
1255
1375
|
icon: "module-unfit",
|
|
1256
1376
|
label: "Unfit Module",
|
|
1257
1377
|
onPress: onUnfit
|
|
@@ -1259,7 +1379,7 @@ function WheelSlot(t0) {
|
|
|
1259
1379
|
});
|
|
1260
1380
|
let t8;
|
|
1261
1381
|
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1262
|
-
t8 = /* @__PURE__ */ jsx(
|
|
1382
|
+
t8 = /* @__PURE__ */ jsx(SlotInfo, {});
|
|
1263
1383
|
$[35] = t8;
|
|
1264
1384
|
} else t8 = $[35];
|
|
1265
1385
|
row.push({
|
|
@@ -1269,14 +1389,14 @@ function WheelSlot(t0) {
|
|
|
1269
1389
|
const power = state === "offline" ? "Put Online" : "Put Offline";
|
|
1270
1390
|
row.push(onTogglePower && {
|
|
1271
1391
|
key: "power",
|
|
1272
|
-
node: /* @__PURE__ */ jsx(
|
|
1392
|
+
node: /* @__PURE__ */ jsx(SlotAction, {
|
|
1273
1393
|
icon: "module-power",
|
|
1274
1394
|
label: power,
|
|
1275
1395
|
onPress: onTogglePower
|
|
1276
1396
|
})
|
|
1277
1397
|
});
|
|
1278
1398
|
}
|
|
1279
|
-
t7 = row.findLastIndex(_temp$
|
|
1399
|
+
t7 = row.findLastIndex(_temp$7);
|
|
1280
1400
|
$[23] = chargeTypeId;
|
|
1281
1401
|
$[24] = fitted;
|
|
1282
1402
|
$[25] = onRemoveCharge;
|
|
@@ -1373,13 +1493,10 @@ function WheelSlot(t0) {
|
|
|
1373
1493
|
} else t19 = $[57];
|
|
1374
1494
|
let t20;
|
|
1375
1495
|
if ($[58] !== label || $[59] !== onPress) {
|
|
1376
|
-
t20 = onPress && /* @__PURE__ */ jsx(
|
|
1377
|
-
role: "button",
|
|
1378
|
-
tabIndex: 0,
|
|
1496
|
+
t20 = onPress && /* @__PURE__ */ jsx(SlotPress, {
|
|
1379
1497
|
className: WheelSlot_module_default.press,
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
onKeyDown: _temp2$2
|
|
1498
|
+
label,
|
|
1499
|
+
onPress
|
|
1383
1500
|
});
|
|
1384
1501
|
$[58] = label;
|
|
1385
1502
|
$[59] = onPress;
|
|
@@ -1453,70 +1570,9 @@ function WheelSlot(t0) {
|
|
|
1453
1570
|
} else t23 = $[83];
|
|
1454
1571
|
return t23;
|
|
1455
1572
|
}
|
|
1456
|
-
function
|
|
1457
|
-
if (event.key !== "Enter" && event.key !== " ") return;
|
|
1458
|
-
event.preventDefault();
|
|
1459
|
-
event.currentTarget.dispatchEvent(new MouseEvent("click", {
|
|
1460
|
-
bubbles: true,
|
|
1461
|
-
shiftKey: event.shiftKey
|
|
1462
|
-
}));
|
|
1463
|
-
}
|
|
1464
|
-
function _temp$6(action) {
|
|
1573
|
+
function _temp$7(action) {
|
|
1465
1574
|
return action !== void 0;
|
|
1466
1575
|
}
|
|
1467
|
-
function Action(t0) {
|
|
1468
|
-
const $ = c(9);
|
|
1469
|
-
const { icon, label, onPress } = t0;
|
|
1470
|
-
let t1;
|
|
1471
|
-
if ($[0] !== icon) {
|
|
1472
|
-
t1 = /* @__PURE__ */ jsx(Icon, { name: icon });
|
|
1473
|
-
$[0] = icon;
|
|
1474
|
-
$[1] = t1;
|
|
1475
|
-
} else t1 = $[1];
|
|
1476
|
-
let t2;
|
|
1477
|
-
if ($[2] !== label || $[3] !== onPress || $[4] !== t1) {
|
|
1478
|
-
t2 = /* @__PURE__ */ jsx("button", {
|
|
1479
|
-
type: "button",
|
|
1480
|
-
className: WheelSlot_module_default.button,
|
|
1481
|
-
"aria-label": label,
|
|
1482
|
-
onClick: onPress,
|
|
1483
|
-
children: t1
|
|
1484
|
-
});
|
|
1485
|
-
$[2] = label;
|
|
1486
|
-
$[3] = onPress;
|
|
1487
|
-
$[4] = t1;
|
|
1488
|
-
$[5] = t2;
|
|
1489
|
-
} else t2 = $[5];
|
|
1490
|
-
let t3;
|
|
1491
|
-
if ($[6] !== label || $[7] !== t2) {
|
|
1492
|
-
t3 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1493
|
-
label,
|
|
1494
|
-
children: t2
|
|
1495
|
-
});
|
|
1496
|
-
$[6] = label;
|
|
1497
|
-
$[7] = t2;
|
|
1498
|
-
$[8] = t3;
|
|
1499
|
-
} else t3 = $[8];
|
|
1500
|
-
return t3;
|
|
1501
|
-
}
|
|
1502
|
-
function ShowInfo() {
|
|
1503
|
-
const $ = c(1);
|
|
1504
|
-
let t0;
|
|
1505
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1506
|
-
t0 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1507
|
-
label: "Show Info (not implemented yet)",
|
|
1508
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
1509
|
-
type: "button",
|
|
1510
|
-
className: WheelSlot_module_default.button,
|
|
1511
|
-
"aria-label": "Show Info",
|
|
1512
|
-
"aria-disabled": true,
|
|
1513
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "module-info" })
|
|
1514
|
-
})
|
|
1515
|
-
});
|
|
1516
|
-
$[0] = t0;
|
|
1517
|
-
} else t0 = $[0];
|
|
1518
|
-
return t0;
|
|
1519
|
-
}
|
|
1520
1576
|
function frameTexture(fitted, preview, state, activatable) {
|
|
1521
1577
|
if (!fitted) return "classes/fitting/moduleframe";
|
|
1522
1578
|
if (preview) return "classes/fitting/moduleframedots";
|
|
@@ -2064,9 +2120,6 @@ function CapacitorRing(t0) {
|
|
|
2064
2120
|
return t8;
|
|
2065
2121
|
}
|
|
2066
2122
|
//#endregion
|
|
2067
|
-
//#region src/components/FittingWheel/FittingWheel.module.css
|
|
2068
|
-
var FittingWheel_module_default = { "centre": "GK_wGG_centre" };
|
|
2069
|
-
//#endregion
|
|
2070
2123
|
//#region src/components/FittingWheel/states.ts
|
|
2071
2124
|
const states = [
|
|
2072
2125
|
"offline",
|
|
@@ -2081,281 +2134,42 @@ function nextState(state, max, back = false) {
|
|
|
2081
2134
|
return allowed[(allowed.indexOf(state) + step) % allowed.length];
|
|
2082
2135
|
}
|
|
2083
2136
|
//#endregion
|
|
2084
|
-
//#region src/components/FittingWheel/
|
|
2085
|
-
const markedRacks = [
|
|
2086
|
-
"high",
|
|
2087
|
-
"medium",
|
|
2088
|
-
"low"
|
|
2089
|
-
];
|
|
2090
|
-
const racks = [
|
|
2091
|
-
"high",
|
|
2092
|
-
"medium",
|
|
2093
|
-
"low",
|
|
2094
|
-
"rig",
|
|
2095
|
-
"subsystem"
|
|
2096
|
-
];
|
|
2137
|
+
//#region src/components/FittingWheel/fittingSlot.ts
|
|
2097
2138
|
/** EVE does not let rigs and subsystems be put offline. */
|
|
2098
2139
|
const switchedRacks = [
|
|
2099
2140
|
"high",
|
|
2100
2141
|
"medium",
|
|
2101
|
-
"low"
|
|
2142
|
+
"low",
|
|
2143
|
+
"service"
|
|
2102
2144
|
];
|
|
2103
|
-
/**
|
|
2104
|
-
function
|
|
2105
|
-
const $ = c(
|
|
2106
|
-
const { label: t1 } = t0;
|
|
2107
|
-
const label = t1 === void 0 ? "Fitting" : t1;
|
|
2108
|
-
const ship = useFit().ship.type_id;
|
|
2109
|
-
const { turret, launcher } = useHardpoints();
|
|
2110
|
-
const { show, clear } = usePreview();
|
|
2111
|
-
let t2;
|
|
2112
|
-
if ($[0] !== show) {
|
|
2113
|
-
t2 = (target, edit) => show(edit, target);
|
|
2114
|
-
$[0] = show;
|
|
2115
|
-
$[1] = t2;
|
|
2116
|
-
} else t2 = $[1];
|
|
2117
|
-
let t3;
|
|
2118
|
-
if ($[2] !== clear) {
|
|
2119
|
-
t3 = (target_0) => clear(target_0);
|
|
2120
|
-
$[2] = clear;
|
|
2121
|
-
$[3] = t3;
|
|
2122
|
-
} else t3 = $[3];
|
|
2123
|
-
let t4;
|
|
2124
|
-
if ($[4] !== t2 || $[5] !== t3) {
|
|
2125
|
-
t4 = {
|
|
2126
|
-
show: t2,
|
|
2127
|
-
hide: t3
|
|
2128
|
-
};
|
|
2129
|
-
$[4] = t2;
|
|
2130
|
-
$[5] = t3;
|
|
2131
|
-
$[6] = t4;
|
|
2132
|
-
} else t4 = $[6];
|
|
2133
|
-
const dropPreview = t4;
|
|
2134
|
-
let t5;
|
|
2135
|
-
if ($[7] !== ship) {
|
|
2136
|
-
t5 = /* @__PURE__ */ jsx(WheelHull, { typeId: ship });
|
|
2137
|
-
$[7] = ship;
|
|
2138
|
-
$[8] = t5;
|
|
2139
|
-
} else t5 = $[8];
|
|
2140
|
-
let t6;
|
|
2141
|
-
if ($[9] !== dropPreview) {
|
|
2142
|
-
t6 = /* @__PURE__ */ jsx(FittingCentre, { dropPreview });
|
|
2143
|
-
$[9] = dropPreview;
|
|
2144
|
-
$[10] = t6;
|
|
2145
|
-
} else t6 = $[10];
|
|
2146
|
-
let t7;
|
|
2147
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2148
|
-
t7 = markedRacks.map(_temp$5);
|
|
2149
|
-
$[11] = t7;
|
|
2150
|
-
} else t7 = $[11];
|
|
2151
|
-
let t8;
|
|
2152
|
-
if ($[12] !== dropPreview) {
|
|
2153
|
-
t8 = racks.map((rack_0) => /* @__PURE__ */ jsx(FittingRack, {
|
|
2154
|
-
rack: rack_0,
|
|
2155
|
-
dropPreview
|
|
2156
|
-
}, rack_0));
|
|
2157
|
-
$[12] = dropPreview;
|
|
2158
|
-
$[13] = t8;
|
|
2159
|
-
} else t8 = $[13];
|
|
2160
|
-
let t9;
|
|
2161
|
-
if ($[14] !== launcher || $[15] !== turret) {
|
|
2162
|
-
t9 = /* @__PURE__ */ jsx(WheelHardpoints, {
|
|
2163
|
-
turrets: turret,
|
|
2164
|
-
launchers: launcher
|
|
2165
|
-
});
|
|
2166
|
-
$[14] = launcher;
|
|
2167
|
-
$[15] = turret;
|
|
2168
|
-
$[16] = t9;
|
|
2169
|
-
} else t9 = $[16];
|
|
2170
|
-
let t10;
|
|
2171
|
-
let t11;
|
|
2172
|
-
let t12;
|
|
2173
|
-
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2174
|
-
t10 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2175
|
-
resource: "cpu",
|
|
2176
|
-
load: "cpuLoad",
|
|
2177
|
-
output: "cpuOutput"
|
|
2178
|
-
});
|
|
2179
|
-
t11 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2180
|
-
resource: "powergrid",
|
|
2181
|
-
load: "powerLoad",
|
|
2182
|
-
output: "powerOutput"
|
|
2183
|
-
});
|
|
2184
|
-
t12 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2185
|
-
resource: "calibration",
|
|
2186
|
-
load: "upgradeLoad",
|
|
2187
|
-
output: "upgradeCapacity"
|
|
2188
|
-
});
|
|
2189
|
-
$[17] = t10;
|
|
2190
|
-
$[18] = t11;
|
|
2191
|
-
$[19] = t12;
|
|
2192
|
-
} else {
|
|
2193
|
-
t10 = $[17];
|
|
2194
|
-
t11 = $[18];
|
|
2195
|
-
t12 = $[19];
|
|
2196
|
-
}
|
|
2197
|
-
let t13;
|
|
2198
|
-
if ($[20] !== label || $[21] !== t5 || $[22] !== t6 || $[23] !== t8 || $[24] !== t9) {
|
|
2199
|
-
t13 = /* @__PURE__ */ jsxs(Wheel, {
|
|
2200
|
-
label,
|
|
2201
|
-
children: [
|
|
2202
|
-
t5,
|
|
2203
|
-
t6,
|
|
2204
|
-
t7,
|
|
2205
|
-
t8,
|
|
2206
|
-
t9,
|
|
2207
|
-
t10,
|
|
2208
|
-
t11,
|
|
2209
|
-
t12
|
|
2210
|
-
]
|
|
2211
|
-
});
|
|
2212
|
-
$[20] = label;
|
|
2213
|
-
$[21] = t5;
|
|
2214
|
-
$[22] = t6;
|
|
2215
|
-
$[23] = t8;
|
|
2216
|
-
$[24] = t9;
|
|
2217
|
-
$[25] = t13;
|
|
2218
|
-
} else t13 = $[25];
|
|
2219
|
-
return t13;
|
|
2220
|
-
}
|
|
2221
|
-
/** What a drop would do, shown while dragging over a target. */
|
|
2222
|
-
function _temp$5(rack) {
|
|
2223
|
-
return /* @__PURE__ */ jsx(WheelRackMarker, { rack }, rack);
|
|
2224
|
-
}
|
|
2225
|
-
function FittingRack(t0) {
|
|
2226
|
-
const $ = c(5);
|
|
2227
|
-
const { rack, dropPreview } = t0;
|
|
2228
|
-
const slots = useSlots(rack);
|
|
2229
|
-
const { total } = useRackUsage(rack);
|
|
2230
|
-
let t1;
|
|
2231
|
-
if ($[0] !== dropPreview || $[1] !== rack || $[2] !== slots || $[3] !== total) {
|
|
2232
|
-
const shown = markedRacks.includes(rack) ? rackSize(rack) : Math.min(slots.length, rackSize(rack));
|
|
2233
|
-
t1 = Array.from({ length: shown }, (_, index) => /* @__PURE__ */ jsx(FittingSlot, {
|
|
2234
|
-
rack,
|
|
2235
|
-
index,
|
|
2236
|
-
content: slots[index],
|
|
2237
|
-
available: index < total,
|
|
2238
|
-
dropPreview
|
|
2239
|
-
}, index));
|
|
2240
|
-
$[0] = dropPreview;
|
|
2241
|
-
$[1] = rack;
|
|
2242
|
-
$[2] = slots;
|
|
2243
|
-
$[3] = total;
|
|
2244
|
-
$[4] = t1;
|
|
2245
|
-
} else t1 = $[4];
|
|
2246
|
-
return t1;
|
|
2247
|
-
}
|
|
2248
|
-
/** Fits a type dropped in the middle of the wheel, and unfits a fitted item. */
|
|
2249
|
-
function FittingCentre(t0) {
|
|
2250
|
-
const $ = c(25);
|
|
2251
|
-
const { dropPreview } = t0;
|
|
2252
|
-
const store = useFitStore();
|
|
2253
|
-
const fit = useFit();
|
|
2254
|
-
const { dragging, end } = useDrag();
|
|
2255
|
-
let t1;
|
|
2256
|
-
if ($[0] !== dragging || $[1] !== store) {
|
|
2257
|
-
t1 = dragging?.type === "type" && placesSomewhere(store, dragging.typeId);
|
|
2258
|
-
$[0] = dragging;
|
|
2259
|
-
$[1] = store;
|
|
2260
|
-
$[2] = t1;
|
|
2261
|
-
} else t1 = $[2];
|
|
2262
|
-
const fits = t1;
|
|
2263
|
-
let t2;
|
|
2264
|
-
if ($[3] !== fit || $[4] !== fits) {
|
|
2265
|
-
t2 = (item) => item !== void 0 && (item.type === "type" ? fits : fit.items[item.ref] !== void 0);
|
|
2266
|
-
$[3] = fit;
|
|
2267
|
-
$[4] = fits;
|
|
2268
|
-
$[5] = t2;
|
|
2269
|
-
} else t2 = $[5];
|
|
2270
|
-
const takes = t2;
|
|
2271
|
-
let t3;
|
|
2272
|
-
if ($[6] !== dragging || $[7] !== dropPreview) {
|
|
2273
|
-
t3 = () => {
|
|
2274
|
-
if (dragging?.type !== "type") return;
|
|
2275
|
-
const { typeId } = dragging;
|
|
2276
|
-
dropPreview.show("centre", (draft) => void draft.fit(typeId));
|
|
2277
|
-
};
|
|
2278
|
-
$[6] = dragging;
|
|
2279
|
-
$[7] = dropPreview;
|
|
2280
|
-
$[8] = t3;
|
|
2281
|
-
} else t3 = $[8];
|
|
2282
|
-
let t4;
|
|
2283
|
-
if ($[9] !== dropPreview) {
|
|
2284
|
-
t4 = () => dropPreview.hide("centre");
|
|
2285
|
-
$[9] = dropPreview;
|
|
2286
|
-
$[10] = t4;
|
|
2287
|
-
} else t4 = $[10];
|
|
2288
|
-
let t5;
|
|
2289
|
-
if ($[11] !== dragging || $[12] !== takes) {
|
|
2290
|
-
t5 = (event) => {
|
|
2291
|
-
if (takes(dragging)) allowDrop(event, dragging);
|
|
2292
|
-
};
|
|
2293
|
-
$[11] = dragging;
|
|
2294
|
-
$[12] = takes;
|
|
2295
|
-
$[13] = t5;
|
|
2296
|
-
} else t5 = $[13];
|
|
2297
|
-
let t6;
|
|
2298
|
-
if ($[14] !== dragging || $[15] !== dropPreview || $[16] !== end || $[17] !== store || $[18] !== takes) {
|
|
2299
|
-
t6 = (event_0) => {
|
|
2300
|
-
if (!takes(dragging)) return;
|
|
2301
|
-
event_0.preventDefault();
|
|
2302
|
-
dropPreview.hide("centre");
|
|
2303
|
-
if (dragging.type === "type") store.fit(dragging.typeId);
|
|
2304
|
-
else store.remove(dragging.ref);
|
|
2305
|
-
end();
|
|
2306
|
-
};
|
|
2307
|
-
$[14] = dragging;
|
|
2308
|
-
$[15] = dropPreview;
|
|
2309
|
-
$[16] = end;
|
|
2310
|
-
$[17] = store;
|
|
2311
|
-
$[18] = takes;
|
|
2312
|
-
$[19] = t6;
|
|
2313
|
-
} else t6 = $[19];
|
|
2314
|
-
let t7;
|
|
2315
|
-
if ($[20] !== t3 || $[21] !== t4 || $[22] !== t5 || $[23] !== t6) {
|
|
2316
|
-
t7 = /* @__PURE__ */ jsx("div", {
|
|
2317
|
-
className: FittingWheel_module_default.centre,
|
|
2318
|
-
"data-centre": true,
|
|
2319
|
-
onDragEnter: t3,
|
|
2320
|
-
onDragLeave: t4,
|
|
2321
|
-
onDragOver: t5,
|
|
2322
|
-
onDrop: t6
|
|
2323
|
-
});
|
|
2324
|
-
$[20] = t3;
|
|
2325
|
-
$[21] = t4;
|
|
2326
|
-
$[22] = t5;
|
|
2327
|
-
$[23] = t6;
|
|
2328
|
-
$[24] = t7;
|
|
2329
|
-
} else t7 = $[24];
|
|
2330
|
-
return t7;
|
|
2331
|
-
}
|
|
2332
|
-
function FittingSlot(t0) {
|
|
2333
|
-
const $ = c(80);
|
|
2334
|
-
const { rack, index, content, available, dropPreview } = t0;
|
|
2145
|
+
/** What a slot of the fit shows, and what clicking, dragging and dropping on it does. */
|
|
2146
|
+
function useFittingSlot(rack, index, content, available) {
|
|
2147
|
+
const $ = c(75);
|
|
2335
2148
|
const store = useFitStore();
|
|
2336
2149
|
const sde = useSde();
|
|
2337
2150
|
const fit = useFit();
|
|
2338
2151
|
const placement = usePlacement();
|
|
2152
|
+
const { show, clear } = usePreview();
|
|
2339
2153
|
const { dragging, start, end } = useDrag();
|
|
2340
2154
|
const item = content?.item;
|
|
2341
2155
|
const stats = content?.stats;
|
|
2342
2156
|
const type = useType(item?.type_id);
|
|
2343
2157
|
const charges = useCharges(item?.type_id);
|
|
2344
2158
|
const ref = content?.ref;
|
|
2345
|
-
let
|
|
2159
|
+
let t0;
|
|
2346
2160
|
if ($[0] !== rack || $[1] !== ref || $[2] !== stats) {
|
|
2347
|
-
|
|
2161
|
+
t0 = ref !== void 0 && stats !== void 0 && switchedRacks.includes(rack);
|
|
2348
2162
|
$[0] = rack;
|
|
2349
2163
|
$[1] = ref;
|
|
2350
2164
|
$[2] = stats;
|
|
2351
|
-
$[3] =
|
|
2352
|
-
} else
|
|
2353
|
-
const switchable =
|
|
2165
|
+
$[3] = t0;
|
|
2166
|
+
} else t0 = $[3];
|
|
2167
|
+
const switchable = t0;
|
|
2354
2168
|
const target = `${rack}-${index}`;
|
|
2355
|
-
let
|
|
2169
|
+
let t1;
|
|
2356
2170
|
if ($[4] !== available || $[5] !== charges || $[6] !== fit || $[7] !== index || $[8] !== placement || $[9] !== rack || $[10] !== ref || $[11] !== sde) {
|
|
2357
|
-
|
|
2358
|
-
if (!available || drop === void 0) return false;
|
|
2171
|
+
t1 = (drop) => {
|
|
2172
|
+
if (!available || drop === void 0 || drop.type === "hull") return false;
|
|
2359
2173
|
if (drop.type === "item") return movesTo(fit, drop.ref, rack, index);
|
|
2360
2174
|
const dropped = sde.type(drop.typeId);
|
|
2361
2175
|
if (dropped === void 0) return false;
|
|
@@ -2371,37 +2185,29 @@ function FittingSlot(t0) {
|
|
|
2371
2185
|
$[9] = rack;
|
|
2372
2186
|
$[10] = ref;
|
|
2373
2187
|
$[11] = sde;
|
|
2374
|
-
$[12] =
|
|
2375
|
-
} else
|
|
2376
|
-
const takes =
|
|
2377
|
-
|
|
2188
|
+
$[12] = t1;
|
|
2189
|
+
} else t1 = $[12];
|
|
2190
|
+
const takes = t1;
|
|
2191
|
+
const t2 = content?.preview;
|
|
2192
|
+
const t3 = item?.type_id;
|
|
2193
|
+
const t4 = type?.name;
|
|
2194
|
+
const t5 = item?.charge?.type_id;
|
|
2195
|
+
const t6 = charges.length > 0;
|
|
2196
|
+
const t7 = stats?.state;
|
|
2197
|
+
const t8 = stats?.maxState === "active" || stats?.maxState === "overload";
|
|
2198
|
+
const t9 = type && stats && `${type.name}, ${stats.state}`;
|
|
2199
|
+
let t10;
|
|
2378
2200
|
if ($[13] !== ref || $[14] !== stats || $[15] !== store || $[16] !== switchable) {
|
|
2379
|
-
|
|
2201
|
+
t10 = switchable ? (event) => store.setState(ref, nextState(stats.state, stats.maxState, event.shiftKey)) : void 0;
|
|
2380
2202
|
$[13] = ref;
|
|
2381
2203
|
$[14] = stats;
|
|
2382
2204
|
$[15] = store;
|
|
2383
2205
|
$[16] = switchable;
|
|
2384
|
-
$[17] =
|
|
2385
|
-
} else
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
t4 = slotAngle(rack, index);
|
|
2390
|
-
$[18] = index;
|
|
2391
|
-
$[19] = rack;
|
|
2392
|
-
$[20] = t4;
|
|
2393
|
-
} else t4 = $[20];
|
|
2394
|
-
const t5 = content?.preview;
|
|
2395
|
-
const t6 = item?.type_id;
|
|
2396
|
-
const t7 = type?.name;
|
|
2397
|
-
const t8 = item?.charge?.type_id;
|
|
2398
|
-
const t9 = charges.length > 0;
|
|
2399
|
-
const t10 = stats?.state;
|
|
2400
|
-
const t11 = stats?.maxState === "active" || stats?.maxState === "overload";
|
|
2401
|
-
const t12 = type && stats && `${type.name}, ${stats.state}`;
|
|
2402
|
-
let t13;
|
|
2403
|
-
if ($[21] !== ref || $[22] !== start || $[23] !== type?.name) {
|
|
2404
|
-
t13 = ref === void 0 ? void 0 : (event_0) => {
|
|
2206
|
+
$[17] = t10;
|
|
2207
|
+
} else t10 = $[17];
|
|
2208
|
+
let t11;
|
|
2209
|
+
if ($[18] !== ref || $[19] !== start || $[20] !== type?.name) {
|
|
2210
|
+
t11 = ref === void 0 ? void 0 : (event_0) => {
|
|
2405
2211
|
event_0.dataTransfer.effectAllowed = "move";
|
|
2406
2212
|
event_0.dataTransfer.setData("text/plain", type?.name ?? "");
|
|
2407
2213
|
start({
|
|
@@ -2409,14 +2215,14 @@ function FittingSlot(t0) {
|
|
|
2409
2215
|
ref
|
|
2410
2216
|
});
|
|
2411
2217
|
};
|
|
2412
|
-
$[
|
|
2413
|
-
$[
|
|
2414
|
-
$[
|
|
2415
|
-
$[
|
|
2416
|
-
} else
|
|
2417
|
-
let
|
|
2418
|
-
if ($[
|
|
2419
|
-
|
|
2218
|
+
$[18] = ref;
|
|
2219
|
+
$[19] = start;
|
|
2220
|
+
$[20] = type?.name;
|
|
2221
|
+
$[21] = t11;
|
|
2222
|
+
} else t11 = $[21];
|
|
2223
|
+
let t12;
|
|
2224
|
+
if ($[22] !== dragging || $[23] !== index || $[24] !== rack || $[25] !== show || $[26] !== takes || $[27] !== target) {
|
|
2225
|
+
t12 = () => {
|
|
2420
2226
|
if (!takes(dragging)) return;
|
|
2421
2227
|
const slot = {
|
|
2422
2228
|
type: rack,
|
|
@@ -2424,45 +2230,45 @@ function FittingSlot(t0) {
|
|
|
2424
2230
|
};
|
|
2425
2231
|
if (dragging.type === "type") {
|
|
2426
2232
|
const { typeId } = dragging;
|
|
2427
|
-
|
|
2233
|
+
show((draft) => void draft.fit(typeId, slot), target);
|
|
2428
2234
|
} else {
|
|
2429
2235
|
const { ref: moved } = dragging;
|
|
2430
|
-
|
|
2236
|
+
show((draft_0) => draft_0.move(moved, slot), target);
|
|
2431
2237
|
}
|
|
2432
2238
|
};
|
|
2433
|
-
$[
|
|
2434
|
-
$[
|
|
2435
|
-
$[
|
|
2436
|
-
$[
|
|
2437
|
-
$[
|
|
2438
|
-
$[
|
|
2439
|
-
$[
|
|
2440
|
-
} else
|
|
2441
|
-
let
|
|
2442
|
-
if ($[
|
|
2443
|
-
|
|
2239
|
+
$[22] = dragging;
|
|
2240
|
+
$[23] = index;
|
|
2241
|
+
$[24] = rack;
|
|
2242
|
+
$[25] = show;
|
|
2243
|
+
$[26] = takes;
|
|
2244
|
+
$[27] = target;
|
|
2245
|
+
$[28] = t12;
|
|
2246
|
+
} else t12 = $[28];
|
|
2247
|
+
let t13;
|
|
2248
|
+
if ($[29] !== clear || $[30] !== target) {
|
|
2249
|
+
t13 = (event_1) => {
|
|
2444
2250
|
if (event_1.currentTarget.contains(event_1.relatedTarget)) return;
|
|
2445
|
-
|
|
2251
|
+
clear(target);
|
|
2446
2252
|
};
|
|
2447
|
-
$[
|
|
2448
|
-
$[
|
|
2449
|
-
$[
|
|
2450
|
-
} else
|
|
2451
|
-
let
|
|
2452
|
-
if ($[
|
|
2453
|
-
|
|
2253
|
+
$[29] = clear;
|
|
2254
|
+
$[30] = target;
|
|
2255
|
+
$[31] = t13;
|
|
2256
|
+
} else t13 = $[31];
|
|
2257
|
+
let t14;
|
|
2258
|
+
if ($[32] !== dragging || $[33] !== takes) {
|
|
2259
|
+
t14 = (event_2) => {
|
|
2454
2260
|
if (takes(dragging)) allowDrop(event_2, dragging);
|
|
2455
2261
|
};
|
|
2456
|
-
$[
|
|
2457
|
-
$[
|
|
2458
|
-
$[
|
|
2459
|
-
} else
|
|
2460
|
-
let
|
|
2461
|
-
if ($[
|
|
2462
|
-
|
|
2262
|
+
$[32] = dragging;
|
|
2263
|
+
$[33] = takes;
|
|
2264
|
+
$[34] = t14;
|
|
2265
|
+
} else t14 = $[34];
|
|
2266
|
+
let t15;
|
|
2267
|
+
if ($[35] !== clear || $[36] !== dragging || $[37] !== end || $[38] !== index || $[39] !== rack || $[40] !== store || $[41] !== takes || $[42] !== target) {
|
|
2268
|
+
t15 = (event_3) => {
|
|
2463
2269
|
if (!takes(dragging)) return;
|
|
2464
2270
|
event_3.preventDefault();
|
|
2465
|
-
|
|
2271
|
+
clear(target);
|
|
2466
2272
|
if (dragging.type === "type") store.fit(dragging.typeId, {
|
|
2467
2273
|
type: rack,
|
|
2468
2274
|
index
|
|
@@ -2473,88 +2279,88 @@ function FittingSlot(t0) {
|
|
|
2473
2279
|
});
|
|
2474
2280
|
end();
|
|
2475
2281
|
};
|
|
2476
|
-
$[
|
|
2477
|
-
$[
|
|
2478
|
-
$[
|
|
2479
|
-
$[
|
|
2480
|
-
$[
|
|
2481
|
-
$[
|
|
2482
|
-
$[
|
|
2483
|
-
$[
|
|
2484
|
-
$[
|
|
2485
|
-
} else
|
|
2486
|
-
let
|
|
2282
|
+
$[35] = clear;
|
|
2283
|
+
$[36] = dragging;
|
|
2284
|
+
$[37] = end;
|
|
2285
|
+
$[38] = index;
|
|
2286
|
+
$[39] = rack;
|
|
2287
|
+
$[40] = store;
|
|
2288
|
+
$[41] = takes;
|
|
2289
|
+
$[42] = target;
|
|
2290
|
+
$[43] = t15;
|
|
2291
|
+
} else t15 = $[43];
|
|
2292
|
+
let t16;
|
|
2293
|
+
if ($[44] !== ref || $[45] !== store) {
|
|
2294
|
+
t16 = ref === void 0 ? void 0 : () => store.remove(ref);
|
|
2295
|
+
$[44] = ref;
|
|
2296
|
+
$[45] = store;
|
|
2297
|
+
$[46] = t16;
|
|
2298
|
+
} else t16 = $[46];
|
|
2299
|
+
let t17;
|
|
2487
2300
|
if ($[47] !== ref || $[48] !== store) {
|
|
2488
|
-
|
|
2301
|
+
t17 = ref === void 0 ? void 0 : () => store.setCharge(ref, void 0);
|
|
2489
2302
|
$[47] = ref;
|
|
2490
2303
|
$[48] = store;
|
|
2491
|
-
$[49] =
|
|
2492
|
-
} else
|
|
2493
|
-
let
|
|
2494
|
-
if ($[50] !== ref || $[51] !== store) {
|
|
2495
|
-
|
|
2304
|
+
$[49] = t17;
|
|
2305
|
+
} else t17 = $[49];
|
|
2306
|
+
let t18;
|
|
2307
|
+
if ($[50] !== ref || $[51] !== stats || $[52] !== store || $[53] !== switchable) {
|
|
2308
|
+
t18 = switchable && stats.maxState !== "offline" ? () => store.setState(ref, stats.state === "offline" ? "online" : "offline") : void 0;
|
|
2496
2309
|
$[50] = ref;
|
|
2497
|
-
$[51] =
|
|
2498
|
-
$[52] =
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
$[55] = store;
|
|
2506
|
-
$[56] = switchable;
|
|
2507
|
-
$[57] = t20;
|
|
2508
|
-
} else t20 = $[57];
|
|
2509
|
-
let t21;
|
|
2510
|
-
if ($[58] !== available || $[59] !== end || $[60] !== onPress || $[61] !== rack || $[62] !== t10 || $[63] !== t11 || $[64] !== t12 || $[65] !== t13 || $[66] !== t14 || $[67] !== t15 || $[68] !== t16 || $[69] !== t17 || $[70] !== t18 || $[71] !== t19 || $[72] !== t20 || $[73] !== t4 || $[74] !== t5 || $[75] !== t6 || $[76] !== t7 || $[77] !== t8 || $[78] !== t9) {
|
|
2511
|
-
t21 = /* @__PURE__ */ jsx(WheelSlot, {
|
|
2512
|
-
rack,
|
|
2513
|
-
angle: t4,
|
|
2310
|
+
$[51] = stats;
|
|
2311
|
+
$[52] = store;
|
|
2312
|
+
$[53] = switchable;
|
|
2313
|
+
$[54] = t18;
|
|
2314
|
+
} else t18 = $[54];
|
|
2315
|
+
let t19;
|
|
2316
|
+
if ($[55] !== available || $[56] !== end || $[57] !== t10 || $[58] !== t11 || $[59] !== t12 || $[60] !== t13 || $[61] !== t14 || $[62] !== t15 || $[63] !== t16 || $[64] !== t17 || $[65] !== t18 || $[66] !== t2 || $[67] !== t3 || $[68] !== t4 || $[69] !== t5 || $[70] !== t6 || $[71] !== t7 || $[72] !== t8 || $[73] !== t9) {
|
|
2317
|
+
t19 = {
|
|
2514
2318
|
available,
|
|
2515
|
-
preview:
|
|
2516
|
-
typeId:
|
|
2517
|
-
typeName:
|
|
2518
|
-
chargeTypeId:
|
|
2519
|
-
chargeable:
|
|
2520
|
-
state:
|
|
2521
|
-
activatable:
|
|
2522
|
-
label:
|
|
2523
|
-
onPress,
|
|
2524
|
-
onDragStart:
|
|
2319
|
+
preview: t2,
|
|
2320
|
+
typeId: t3,
|
|
2321
|
+
typeName: t4,
|
|
2322
|
+
chargeTypeId: t5,
|
|
2323
|
+
chargeable: t6,
|
|
2324
|
+
state: t7,
|
|
2325
|
+
activatable: t8,
|
|
2326
|
+
label: t9,
|
|
2327
|
+
onPress: t10,
|
|
2328
|
+
onDragStart: t11,
|
|
2525
2329
|
onDragEnd: end,
|
|
2526
|
-
onDragEnter:
|
|
2527
|
-
onDragLeave:
|
|
2528
|
-
onDragOver:
|
|
2529
|
-
onDrop:
|
|
2530
|
-
onUnfit:
|
|
2531
|
-
onRemoveCharge:
|
|
2532
|
-
onTogglePower:
|
|
2533
|
-
}
|
|
2534
|
-
$[
|
|
2535
|
-
$[
|
|
2536
|
-
$[
|
|
2537
|
-
$[
|
|
2538
|
-
$[
|
|
2539
|
-
$[
|
|
2540
|
-
$[
|
|
2541
|
-
$[
|
|
2542
|
-
$[
|
|
2543
|
-
$[
|
|
2544
|
-
$[
|
|
2545
|
-
$[
|
|
2546
|
-
$[
|
|
2547
|
-
$[
|
|
2548
|
-
$[
|
|
2549
|
-
$[
|
|
2550
|
-
$[
|
|
2551
|
-
$[
|
|
2552
|
-
$[
|
|
2553
|
-
$[
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2330
|
+
onDragEnter: t12,
|
|
2331
|
+
onDragLeave: t13,
|
|
2332
|
+
onDragOver: t14,
|
|
2333
|
+
onDrop: t15,
|
|
2334
|
+
onUnfit: t16,
|
|
2335
|
+
onRemoveCharge: t17,
|
|
2336
|
+
onTogglePower: t18
|
|
2337
|
+
};
|
|
2338
|
+
$[55] = available;
|
|
2339
|
+
$[56] = end;
|
|
2340
|
+
$[57] = t10;
|
|
2341
|
+
$[58] = t11;
|
|
2342
|
+
$[59] = t12;
|
|
2343
|
+
$[60] = t13;
|
|
2344
|
+
$[61] = t14;
|
|
2345
|
+
$[62] = t15;
|
|
2346
|
+
$[63] = t16;
|
|
2347
|
+
$[64] = t17;
|
|
2348
|
+
$[65] = t18;
|
|
2349
|
+
$[66] = t2;
|
|
2350
|
+
$[67] = t3;
|
|
2351
|
+
$[68] = t4;
|
|
2352
|
+
$[69] = t5;
|
|
2353
|
+
$[70] = t6;
|
|
2354
|
+
$[71] = t7;
|
|
2355
|
+
$[72] = t8;
|
|
2356
|
+
$[73] = t9;
|
|
2357
|
+
$[74] = t19;
|
|
2358
|
+
} else t19 = $[74];
|
|
2359
|
+
return t19;
|
|
2360
|
+
}
|
|
2361
|
+
function allowDrop(event, dragging) {
|
|
2362
|
+
event.preventDefault();
|
|
2363
|
+
event.dataTransfer.dropEffect = dragging.type === "item" ? "move" : "copy";
|
|
2558
2364
|
}
|
|
2559
2365
|
/** Whether a fitted item can move to this slot. */
|
|
2560
2366
|
function movesTo(fit, ref, rack, index) {
|
|
@@ -2562,6 +2368,254 @@ function movesTo(fit, ref, rack, index) {
|
|
|
2562
2368
|
if (item === void 0 || rack === "subsystem" || item.slot.type !== rack) return false;
|
|
2563
2369
|
return "index" in item.slot && item.slot.index !== index;
|
|
2564
2370
|
}
|
|
2371
|
+
//#endregion
|
|
2372
|
+
//#region src/components/FittingWheel/FittingWheel.module.css
|
|
2373
|
+
var FittingWheel_module_default = { "centre": "GK_wGG_centre" };
|
|
2374
|
+
//#endregion
|
|
2375
|
+
//#region src/components/FittingWheel/FittingWheel.tsx
|
|
2376
|
+
const markedRacks = [
|
|
2377
|
+
"high",
|
|
2378
|
+
"medium",
|
|
2379
|
+
"low"
|
|
2380
|
+
];
|
|
2381
|
+
const racks = [
|
|
2382
|
+
"high",
|
|
2383
|
+
"medium",
|
|
2384
|
+
"low",
|
|
2385
|
+
"rig",
|
|
2386
|
+
"subsystem"
|
|
2387
|
+
];
|
|
2388
|
+
/** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
|
|
2389
|
+
function FittingWheel(t0) {
|
|
2390
|
+
const $ = c(15);
|
|
2391
|
+
const { label: t1 } = t0;
|
|
2392
|
+
const label = t1 === void 0 ? "Fitting" : t1;
|
|
2393
|
+
const ship = useFit().ship.type_id;
|
|
2394
|
+
const { turret, launcher } = useHardpoints();
|
|
2395
|
+
let t2;
|
|
2396
|
+
if ($[0] !== ship) {
|
|
2397
|
+
t2 = /* @__PURE__ */ jsx(WheelHull, { typeId: ship });
|
|
2398
|
+
$[0] = ship;
|
|
2399
|
+
$[1] = t2;
|
|
2400
|
+
} else t2 = $[1];
|
|
2401
|
+
let t3;
|
|
2402
|
+
let t4;
|
|
2403
|
+
let t5;
|
|
2404
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2405
|
+
t3 = /* @__PURE__ */ jsx(FittingCentre, {});
|
|
2406
|
+
t4 = markedRacks.map(_temp$6);
|
|
2407
|
+
t5 = racks.map(_temp2$4);
|
|
2408
|
+
$[2] = t3;
|
|
2409
|
+
$[3] = t4;
|
|
2410
|
+
$[4] = t5;
|
|
2411
|
+
} else {
|
|
2412
|
+
t3 = $[2];
|
|
2413
|
+
t4 = $[3];
|
|
2414
|
+
t5 = $[4];
|
|
2415
|
+
}
|
|
2416
|
+
let t6;
|
|
2417
|
+
if ($[5] !== launcher || $[6] !== turret) {
|
|
2418
|
+
t6 = /* @__PURE__ */ jsx(WheelHardpoints, {
|
|
2419
|
+
turrets: turret,
|
|
2420
|
+
launchers: launcher
|
|
2421
|
+
});
|
|
2422
|
+
$[5] = launcher;
|
|
2423
|
+
$[6] = turret;
|
|
2424
|
+
$[7] = t6;
|
|
2425
|
+
} else t6 = $[7];
|
|
2426
|
+
let t7;
|
|
2427
|
+
let t8;
|
|
2428
|
+
let t9;
|
|
2429
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2430
|
+
t7 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2431
|
+
resource: "cpu",
|
|
2432
|
+
load: "cpuLoad",
|
|
2433
|
+
output: "cpuOutput"
|
|
2434
|
+
});
|
|
2435
|
+
t8 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2436
|
+
resource: "powergrid",
|
|
2437
|
+
load: "powerLoad",
|
|
2438
|
+
output: "powerOutput"
|
|
2439
|
+
});
|
|
2440
|
+
t9 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2441
|
+
resource: "calibration",
|
|
2442
|
+
load: "upgradeLoad",
|
|
2443
|
+
output: "upgradeCapacity"
|
|
2444
|
+
});
|
|
2445
|
+
$[8] = t7;
|
|
2446
|
+
$[9] = t8;
|
|
2447
|
+
$[10] = t9;
|
|
2448
|
+
} else {
|
|
2449
|
+
t7 = $[8];
|
|
2450
|
+
t8 = $[9];
|
|
2451
|
+
t9 = $[10];
|
|
2452
|
+
}
|
|
2453
|
+
let t10;
|
|
2454
|
+
if ($[11] !== label || $[12] !== t2 || $[13] !== t6) {
|
|
2455
|
+
t10 = /* @__PURE__ */ jsxs(Wheel, {
|
|
2456
|
+
label,
|
|
2457
|
+
children: [
|
|
2458
|
+
t2,
|
|
2459
|
+
t3,
|
|
2460
|
+
t4,
|
|
2461
|
+
t5,
|
|
2462
|
+
t6,
|
|
2463
|
+
t7,
|
|
2464
|
+
t8,
|
|
2465
|
+
t9
|
|
2466
|
+
]
|
|
2467
|
+
});
|
|
2468
|
+
$[11] = label;
|
|
2469
|
+
$[12] = t2;
|
|
2470
|
+
$[13] = t6;
|
|
2471
|
+
$[14] = t10;
|
|
2472
|
+
} else t10 = $[14];
|
|
2473
|
+
return t10;
|
|
2474
|
+
}
|
|
2475
|
+
function _temp2$4(rack_0) {
|
|
2476
|
+
return /* @__PURE__ */ jsx(FittingRack, { rack: rack_0 }, rack_0);
|
|
2477
|
+
}
|
|
2478
|
+
function _temp$6(rack) {
|
|
2479
|
+
return /* @__PURE__ */ jsx(WheelRackMarker, { rack }, rack);
|
|
2480
|
+
}
|
|
2481
|
+
function FittingRack(t0) {
|
|
2482
|
+
const $ = c(4);
|
|
2483
|
+
const { rack } = t0;
|
|
2484
|
+
const slots = useSlots(rack);
|
|
2485
|
+
const { total } = useRackUsage(rack);
|
|
2486
|
+
let t1;
|
|
2487
|
+
if ($[0] !== rack || $[1] !== slots || $[2] !== total) {
|
|
2488
|
+
const shown = markedRacks.includes(rack) ? rackSize(rack) : Math.min(slots.length, rackSize(rack));
|
|
2489
|
+
t1 = Array.from({ length: shown }, (_, index) => /* @__PURE__ */ jsx(FittingSlot, {
|
|
2490
|
+
rack,
|
|
2491
|
+
index,
|
|
2492
|
+
content: slots[index],
|
|
2493
|
+
available: index < total
|
|
2494
|
+
}, index));
|
|
2495
|
+
$[0] = rack;
|
|
2496
|
+
$[1] = slots;
|
|
2497
|
+
$[2] = total;
|
|
2498
|
+
$[3] = t1;
|
|
2499
|
+
} else t1 = $[3];
|
|
2500
|
+
return t1;
|
|
2501
|
+
}
|
|
2502
|
+
/** Fits a type dropped in the middle of the wheel, and unfits a fitted item. */
|
|
2503
|
+
function FittingCentre() {
|
|
2504
|
+
const $ = c(25);
|
|
2505
|
+
const store = useFitStore();
|
|
2506
|
+
const fit = useFit();
|
|
2507
|
+
const { show, clear } = usePreview();
|
|
2508
|
+
const { dragging, end } = useDrag();
|
|
2509
|
+
let t0;
|
|
2510
|
+
if ($[0] !== dragging || $[1] !== store) {
|
|
2511
|
+
t0 = dragging?.type === "type" && placesSomewhere(store, dragging.typeId);
|
|
2512
|
+
$[0] = dragging;
|
|
2513
|
+
$[1] = store;
|
|
2514
|
+
$[2] = t0;
|
|
2515
|
+
} else t0 = $[2];
|
|
2516
|
+
const fits = t0;
|
|
2517
|
+
let t1;
|
|
2518
|
+
if ($[3] !== fit || $[4] !== fits) {
|
|
2519
|
+
t1 = (item) => {
|
|
2520
|
+
if (item === void 0) return false;
|
|
2521
|
+
if (item.type === "item") return fit.items[item.ref] !== void 0;
|
|
2522
|
+
return item.type === "hull" || fits;
|
|
2523
|
+
};
|
|
2524
|
+
$[3] = fit;
|
|
2525
|
+
$[4] = fits;
|
|
2526
|
+
$[5] = t1;
|
|
2527
|
+
} else t1 = $[5];
|
|
2528
|
+
const takes = t1;
|
|
2529
|
+
let t2;
|
|
2530
|
+
if ($[6] !== dragging || $[7] !== show) {
|
|
2531
|
+
t2 = () => {
|
|
2532
|
+
if (dragging?.type !== "type") return;
|
|
2533
|
+
const { typeId } = dragging;
|
|
2534
|
+
show((draft) => void draft.fit(typeId), "centre");
|
|
2535
|
+
};
|
|
2536
|
+
$[6] = dragging;
|
|
2537
|
+
$[7] = show;
|
|
2538
|
+
$[8] = t2;
|
|
2539
|
+
} else t2 = $[8];
|
|
2540
|
+
let t3;
|
|
2541
|
+
if ($[9] !== clear) {
|
|
2542
|
+
t3 = () => clear("centre");
|
|
2543
|
+
$[9] = clear;
|
|
2544
|
+
$[10] = t3;
|
|
2545
|
+
} else t3 = $[10];
|
|
2546
|
+
let t4;
|
|
2547
|
+
if ($[11] !== dragging || $[12] !== takes) {
|
|
2548
|
+
t4 = (event) => {
|
|
2549
|
+
if (takes(dragging)) allowDrop(event, dragging);
|
|
2550
|
+
};
|
|
2551
|
+
$[11] = dragging;
|
|
2552
|
+
$[12] = takes;
|
|
2553
|
+
$[13] = t4;
|
|
2554
|
+
} else t4 = $[13];
|
|
2555
|
+
let t5;
|
|
2556
|
+
if ($[14] !== clear || $[15] !== dragging || $[16] !== end || $[17] !== store || $[18] !== takes) {
|
|
2557
|
+
t5 = (event_0) => {
|
|
2558
|
+
if (!takes(dragging)) return;
|
|
2559
|
+
event_0.preventDefault();
|
|
2560
|
+
clear("centre");
|
|
2561
|
+
if (dragging.type === "type") store.fit(dragging.typeId);
|
|
2562
|
+
else if (dragging.type === "hull") store.replace({
|
|
2563
|
+
ship: { type_id: dragging.typeId },
|
|
2564
|
+
items: []
|
|
2565
|
+
});
|
|
2566
|
+
else store.remove(dragging.ref);
|
|
2567
|
+
end();
|
|
2568
|
+
};
|
|
2569
|
+
$[14] = clear;
|
|
2570
|
+
$[15] = dragging;
|
|
2571
|
+
$[16] = end;
|
|
2572
|
+
$[17] = store;
|
|
2573
|
+
$[18] = takes;
|
|
2574
|
+
$[19] = t5;
|
|
2575
|
+
} else t5 = $[19];
|
|
2576
|
+
let t6;
|
|
2577
|
+
if ($[20] !== t2 || $[21] !== t3 || $[22] !== t4 || $[23] !== t5) {
|
|
2578
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
2579
|
+
className: FittingWheel_module_default.centre,
|
|
2580
|
+
"data-centre": true,
|
|
2581
|
+
onDragEnter: t2,
|
|
2582
|
+
onDragLeave: t3,
|
|
2583
|
+
onDragOver: t4,
|
|
2584
|
+
onDrop: t5
|
|
2585
|
+
});
|
|
2586
|
+
$[20] = t2;
|
|
2587
|
+
$[21] = t3;
|
|
2588
|
+
$[22] = t4;
|
|
2589
|
+
$[23] = t5;
|
|
2590
|
+
$[24] = t6;
|
|
2591
|
+
} else t6 = $[24];
|
|
2592
|
+
return t6;
|
|
2593
|
+
}
|
|
2594
|
+
function FittingSlot(t0) {
|
|
2595
|
+
const $ = c(7);
|
|
2596
|
+
const { rack, index, content, available } = t0;
|
|
2597
|
+
const slot = useFittingSlot(rack, index, content, available);
|
|
2598
|
+
let t1;
|
|
2599
|
+
if ($[0] !== index || $[1] !== rack) {
|
|
2600
|
+
t1 = slotAngle(rack, index);
|
|
2601
|
+
$[0] = index;
|
|
2602
|
+
$[1] = rack;
|
|
2603
|
+
$[2] = t1;
|
|
2604
|
+
} else t1 = $[2];
|
|
2605
|
+
let t2;
|
|
2606
|
+
if ($[3] !== rack || $[4] !== slot || $[5] !== t1) {
|
|
2607
|
+
t2 = /* @__PURE__ */ jsx(WheelSlot, {
|
|
2608
|
+
rack,
|
|
2609
|
+
angle: t1,
|
|
2610
|
+
...slot
|
|
2611
|
+
});
|
|
2612
|
+
$[3] = rack;
|
|
2613
|
+
$[4] = slot;
|
|
2614
|
+
$[5] = t1;
|
|
2615
|
+
$[6] = t2;
|
|
2616
|
+
} else t2 = $[6];
|
|
2617
|
+
return t2;
|
|
2618
|
+
}
|
|
2565
2619
|
function placesSomewhere(store, typeId) {
|
|
2566
2620
|
let placed = false;
|
|
2567
2621
|
store.preview((draft) => {
|
|
@@ -2569,10 +2623,6 @@ function placesSomewhere(store, typeId) {
|
|
|
2569
2623
|
});
|
|
2570
2624
|
return placed;
|
|
2571
2625
|
}
|
|
2572
|
-
function allowDrop(event, dragging) {
|
|
2573
|
-
event.preventDefault();
|
|
2574
|
-
event.dataTransfer.dropEffect = dragging.type === "type" ? "copy" : "move";
|
|
2575
|
-
}
|
|
2576
2626
|
function FittingGauge(t0) {
|
|
2577
2627
|
const $ = c(7);
|
|
2578
2628
|
const { resource, load, output } = t0;
|
|
@@ -2603,6 +2653,199 @@ function FittingGauge(t0) {
|
|
|
2603
2653
|
return t4;
|
|
2604
2654
|
}
|
|
2605
2655
|
//#endregion
|
|
2656
|
+
//#region src/primitives/ServiceSlot/ServiceSlot.module.css
|
|
2657
|
+
var ServiceSlot_module_default = {
|
|
2658
|
+
"action": "R9jwpW_action",
|
|
2659
|
+
"actions": "R9jwpW_actions",
|
|
2660
|
+
"body": "R9jwpW_body",
|
|
2661
|
+
"empty": "R9jwpW_empty",
|
|
2662
|
+
"icon": "R9jwpW_icon",
|
|
2663
|
+
"press": "R9jwpW_press",
|
|
2664
|
+
"slot": "R9jwpW_slot"
|
|
2665
|
+
};
|
|
2666
|
+
//#endregion
|
|
2667
|
+
//#region src/primitives/ServiceSlot/ServiceSlot.tsx
|
|
2668
|
+
/** EVE's square slot of a structure service module, below the wheel. */
|
|
2669
|
+
function ServiceSlot(t0) {
|
|
2670
|
+
const $ = c(48);
|
|
2671
|
+
let className;
|
|
2672
|
+
let label;
|
|
2673
|
+
let onDragEnd;
|
|
2674
|
+
let onDragStart;
|
|
2675
|
+
let onPress;
|
|
2676
|
+
let onTogglePower;
|
|
2677
|
+
let onUnfit;
|
|
2678
|
+
let props;
|
|
2679
|
+
let t1;
|
|
2680
|
+
let t2;
|
|
2681
|
+
let t3;
|
|
2682
|
+
let typeId;
|
|
2683
|
+
let typeName;
|
|
2684
|
+
if ($[0] !== t0) {
|
|
2685
|
+
({typeId, typeName, state: t1, available: t2, preview: t3, onPress, onDragStart, onDragEnd, label, onUnfit, onTogglePower, className, ...props} = t0);
|
|
2686
|
+
$[0] = t0;
|
|
2687
|
+
$[1] = className;
|
|
2688
|
+
$[2] = label;
|
|
2689
|
+
$[3] = onDragEnd;
|
|
2690
|
+
$[4] = onDragStart;
|
|
2691
|
+
$[5] = onPress;
|
|
2692
|
+
$[6] = onTogglePower;
|
|
2693
|
+
$[7] = onUnfit;
|
|
2694
|
+
$[8] = props;
|
|
2695
|
+
$[9] = t1;
|
|
2696
|
+
$[10] = t2;
|
|
2697
|
+
$[11] = t3;
|
|
2698
|
+
$[12] = typeId;
|
|
2699
|
+
$[13] = typeName;
|
|
2700
|
+
} else {
|
|
2701
|
+
className = $[1];
|
|
2702
|
+
label = $[2];
|
|
2703
|
+
onDragEnd = $[3];
|
|
2704
|
+
onDragStart = $[4];
|
|
2705
|
+
onPress = $[5];
|
|
2706
|
+
onTogglePower = $[6];
|
|
2707
|
+
onUnfit = $[7];
|
|
2708
|
+
props = $[8];
|
|
2709
|
+
t1 = $[9];
|
|
2710
|
+
t2 = $[10];
|
|
2711
|
+
t3 = $[11];
|
|
2712
|
+
typeId = $[12];
|
|
2713
|
+
typeName = $[13];
|
|
2714
|
+
}
|
|
2715
|
+
const state = t1 === void 0 ? "online" : t1;
|
|
2716
|
+
const available = t2 === void 0 ? true : t2;
|
|
2717
|
+
const preview = t3 === void 0 ? false : t3;
|
|
2718
|
+
const images = useImages();
|
|
2719
|
+
const fitted = typeId !== void 0;
|
|
2720
|
+
const frame = fitted && !preview ? "classes/fitting/slotpassive_structure" : "classes/fitting/stationserviceslotframe";
|
|
2721
|
+
const actions = fitted && !preview;
|
|
2722
|
+
let t4;
|
|
2723
|
+
if ($[14] !== className) {
|
|
2724
|
+
t4 = [ServiceSlot_module_default.slot, className].filter(Boolean);
|
|
2725
|
+
$[14] = className;
|
|
2726
|
+
$[15] = t4;
|
|
2727
|
+
} else t4 = $[15];
|
|
2728
|
+
const t5 = t4.join(" ");
|
|
2729
|
+
const t6 = fitted ? state : available ? "empty" : "unavailable";
|
|
2730
|
+
const t7 = preview || void 0;
|
|
2731
|
+
let t8;
|
|
2732
|
+
if ($[16] !== frame || $[17] !== images) {
|
|
2733
|
+
t8 = images.uiTexture(frame);
|
|
2734
|
+
$[16] = frame;
|
|
2735
|
+
$[17] = images;
|
|
2736
|
+
$[18] = t8;
|
|
2737
|
+
} else t8 = $[18];
|
|
2738
|
+
const t9 = `url(${t8})`;
|
|
2739
|
+
let t10;
|
|
2740
|
+
if ($[19] !== t9) {
|
|
2741
|
+
t10 = { "--texture": t9 };
|
|
2742
|
+
$[19] = t9;
|
|
2743
|
+
$[20] = t10;
|
|
2744
|
+
} else t10 = $[20];
|
|
2745
|
+
const t11 = t10;
|
|
2746
|
+
const t12 = onDragStart !== void 0 || void 0;
|
|
2747
|
+
let t13;
|
|
2748
|
+
if ($[21] !== available || $[22] !== fitted || $[23] !== typeId) {
|
|
2749
|
+
t13 = fitted ? /* @__PURE__ */ jsx("span", {
|
|
2750
|
+
className: ServiceSlot_module_default.icon,
|
|
2751
|
+
children: /* @__PURE__ */ jsx(TypeIcon, {
|
|
2752
|
+
typeId,
|
|
2753
|
+
size: 64,
|
|
2754
|
+
marker: false
|
|
2755
|
+
})
|
|
2756
|
+
}) : available && /* @__PURE__ */ jsx("span", {
|
|
2757
|
+
className: ServiceSlot_module_default.empty,
|
|
2758
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "slot-service" })
|
|
2759
|
+
});
|
|
2760
|
+
$[21] = available;
|
|
2761
|
+
$[22] = fitted;
|
|
2762
|
+
$[23] = typeId;
|
|
2763
|
+
$[24] = t13;
|
|
2764
|
+
} else t13 = $[24];
|
|
2765
|
+
let t14;
|
|
2766
|
+
if ($[25] !== label || $[26] !== onPress) {
|
|
2767
|
+
t14 = onPress && /* @__PURE__ */ jsx(SlotPress, {
|
|
2768
|
+
className: ServiceSlot_module_default.press,
|
|
2769
|
+
label,
|
|
2770
|
+
onPress
|
|
2771
|
+
});
|
|
2772
|
+
$[25] = label;
|
|
2773
|
+
$[26] = onPress;
|
|
2774
|
+
$[27] = t14;
|
|
2775
|
+
} else t14 = $[27];
|
|
2776
|
+
let t15;
|
|
2777
|
+
if ($[28] !== onDragEnd || $[29] !== onDragStart || $[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t14) {
|
|
2778
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
2779
|
+
className: ServiceSlot_module_default.body,
|
|
2780
|
+
style: t11,
|
|
2781
|
+
draggable: t12,
|
|
2782
|
+
onDragStart,
|
|
2783
|
+
onDragEnd,
|
|
2784
|
+
children: [t13, t14]
|
|
2785
|
+
});
|
|
2786
|
+
$[28] = onDragEnd;
|
|
2787
|
+
$[29] = onDragStart;
|
|
2788
|
+
$[30] = t11;
|
|
2789
|
+
$[31] = t12;
|
|
2790
|
+
$[32] = t13;
|
|
2791
|
+
$[33] = t14;
|
|
2792
|
+
$[34] = t15;
|
|
2793
|
+
} else t15 = $[34];
|
|
2794
|
+
let t16;
|
|
2795
|
+
if ($[35] !== actions || $[36] !== onTogglePower || $[37] !== onUnfit || $[38] !== state || $[39] !== typeName) {
|
|
2796
|
+
t16 = actions && /* @__PURE__ */ jsxs("fieldset", {
|
|
2797
|
+
className: ServiceSlot_module_default.actions,
|
|
2798
|
+
"aria-label": typeName,
|
|
2799
|
+
children: [
|
|
2800
|
+
/* @__PURE__ */ jsx("span", {
|
|
2801
|
+
className: ServiceSlot_module_default.action,
|
|
2802
|
+
children: onUnfit && /* @__PURE__ */ jsx(SlotAction, {
|
|
2803
|
+
icon: "module-unfit",
|
|
2804
|
+
label: "Unfit Module",
|
|
2805
|
+
onPress: onUnfit
|
|
2806
|
+
})
|
|
2807
|
+
}),
|
|
2808
|
+
/* @__PURE__ */ jsx("span", {
|
|
2809
|
+
className: ServiceSlot_module_default.action,
|
|
2810
|
+
children: /* @__PURE__ */ jsx(SlotInfo, {})
|
|
2811
|
+
}),
|
|
2812
|
+
onTogglePower && /* @__PURE__ */ jsx("span", {
|
|
2813
|
+
className: ServiceSlot_module_default.action,
|
|
2814
|
+
children: /* @__PURE__ */ jsx(SlotAction, {
|
|
2815
|
+
icon: "module-power",
|
|
2816
|
+
label: state === "offline" ? "Put Online" : "Put Offline",
|
|
2817
|
+
onPress: onTogglePower
|
|
2818
|
+
})
|
|
2819
|
+
})
|
|
2820
|
+
]
|
|
2821
|
+
});
|
|
2822
|
+
$[35] = actions;
|
|
2823
|
+
$[36] = onTogglePower;
|
|
2824
|
+
$[37] = onUnfit;
|
|
2825
|
+
$[38] = state;
|
|
2826
|
+
$[39] = typeName;
|
|
2827
|
+
$[40] = t16;
|
|
2828
|
+
} else t16 = $[40];
|
|
2829
|
+
let t17;
|
|
2830
|
+
if ($[41] !== props || $[42] !== t15 || $[43] !== t16 || $[44] !== t5 || $[45] !== t6 || $[46] !== t7) {
|
|
2831
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
2832
|
+
...props,
|
|
2833
|
+
className: t5,
|
|
2834
|
+
"data-state": t6,
|
|
2835
|
+
"data-preview": t7,
|
|
2836
|
+
children: [t15, t16]
|
|
2837
|
+
});
|
|
2838
|
+
$[41] = props;
|
|
2839
|
+
$[42] = t15;
|
|
2840
|
+
$[43] = t16;
|
|
2841
|
+
$[44] = t5;
|
|
2842
|
+
$[45] = t6;
|
|
2843
|
+
$[46] = t7;
|
|
2844
|
+
$[47] = t17;
|
|
2845
|
+
} else t17 = $[47];
|
|
2846
|
+
return t17;
|
|
2847
|
+
}
|
|
2848
|
+
//#endregion
|
|
2606
2849
|
//#region src/components/ShipStatistics/AttributeTooltip.tsx
|
|
2607
2850
|
/** What EVE shows when hovering the attribute; its name, for one without. */
|
|
2608
2851
|
function AttributeTooltip(t0) {
|
|
@@ -2611,61 +2854,650 @@ function AttributeTooltip(t0) {
|
|
|
2611
2854
|
const sde = useSde();
|
|
2612
2855
|
const tooltip = useAttributeTooltip(attribute);
|
|
2613
2856
|
let t1;
|
|
2614
|
-
if ($[0] !== attribute || $[1] !== sde || $[2] !== tooltip?.title) {
|
|
2615
|
-
t1 = tooltip?.title ?? sde.attribute(sde.attributeId(attribute) ?? 0)?.displayName ?? attribute;
|
|
2616
|
-
$[0] = attribute;
|
|
2617
|
-
$[1] = sde;
|
|
2618
|
-
$[2] = tooltip?.title;
|
|
2857
|
+
if ($[0] !== attribute || $[1] !== sde || $[2] !== tooltip?.title) {
|
|
2858
|
+
t1 = tooltip?.title ?? sde.attribute(sde.attributeId(attribute) ?? 0)?.displayName ?? attribute;
|
|
2859
|
+
$[0] = attribute;
|
|
2860
|
+
$[1] = sde;
|
|
2861
|
+
$[2] = tooltip?.title;
|
|
2862
|
+
$[3] = t1;
|
|
2863
|
+
} else t1 = $[3];
|
|
2864
|
+
const title = t1;
|
|
2865
|
+
const t2 = tooltip?.description;
|
|
2866
|
+
let t3;
|
|
2867
|
+
if ($[4] !== t2 || $[5] !== title) {
|
|
2868
|
+
t3 = /* @__PURE__ */ jsx(TooltipText, {
|
|
2869
|
+
title,
|
|
2870
|
+
description: t2
|
|
2871
|
+
});
|
|
2872
|
+
$[4] = t2;
|
|
2873
|
+
$[5] = title;
|
|
2874
|
+
$[6] = t3;
|
|
2875
|
+
} else t3 = $[6];
|
|
2876
|
+
return t3;
|
|
2877
|
+
}
|
|
2878
|
+
//#endregion
|
|
2879
|
+
//#region src/components/FittingWindow/BayContents.module.css
|
|
2880
|
+
var BayContents_module_default = {
|
|
2881
|
+
"activeDrones": "gVdevq_activeDrones",
|
|
2882
|
+
"box": "gVdevq_box",
|
|
2883
|
+
"count": "gVdevq_count",
|
|
2884
|
+
"icon": "gVdevq_icon",
|
|
2885
|
+
"kind": "gVdevq_kind",
|
|
2886
|
+
"kinds": "gVdevq_kinds",
|
|
2887
|
+
"list": "gVdevq_list",
|
|
2888
|
+
"middle": "gVdevq_middle",
|
|
2889
|
+
"name": "gVdevq_name",
|
|
2890
|
+
"none": "gVdevq_none",
|
|
2891
|
+
"panel": "gVdevq_panel",
|
|
2892
|
+
"quantity": "gVdevq_quantity",
|
|
2893
|
+
"remove": "gVdevq_remove",
|
|
2894
|
+
"removeAll": "gVdevq_removeAll",
|
|
2895
|
+
"row": "gVdevq_row",
|
|
2896
|
+
"selection": "gVdevq_selection",
|
|
2897
|
+
"steps": "gVdevq_steps",
|
|
2898
|
+
"times": "gVdevq_times",
|
|
2899
|
+
"tubes": "gVdevq_tubes"
|
|
2900
|
+
};
|
|
2901
|
+
//#endregion
|
|
2902
|
+
//#region ../fitting/src/rules/attributes.ts
|
|
2903
|
+
/** A type's value for an attribute as the SDE has it, before any effect applies. */
|
|
2904
|
+
function baseValue(sde, type, name) {
|
|
2905
|
+
const id = sde.attributeId(name);
|
|
2906
|
+
return id === void 0 ? void 0 : type.attributes.get(id);
|
|
2907
|
+
}
|
|
2908
|
+
//#endregion
|
|
2909
|
+
//#region ../fitting/src/rules/fighters.ts
|
|
2910
|
+
const fighterKinds = [
|
|
2911
|
+
"light",
|
|
2912
|
+
"support",
|
|
2913
|
+
"heavy"
|
|
2914
|
+
];
|
|
2915
|
+
const kindAttributes = {
|
|
2916
|
+
light: {
|
|
2917
|
+
ship: "fighterSquadronIsLight",
|
|
2918
|
+
structure: "fighterSquadronIsStandupLight"
|
|
2919
|
+
},
|
|
2920
|
+
support: {
|
|
2921
|
+
ship: "fighterSquadronIsSupport",
|
|
2922
|
+
structure: "fighterSquadronIsStandupSupport"
|
|
2923
|
+
},
|
|
2924
|
+
heavy: {
|
|
2925
|
+
ship: "fighterSquadronIsHeavy",
|
|
2926
|
+
structure: "fighterSquadronIsStandupHeavy"
|
|
2927
|
+
}
|
|
2928
|
+
};
|
|
2929
|
+
/** Which tubes a fighter squadron takes; `undefined` for what is not a fighter. */
|
|
2930
|
+
function fighterKind(sde, type) {
|
|
2931
|
+
return fighterKinds.find((kind) => baseValue(sde, type, kindAttributes[kind].ship) || baseValue(sde, type, kindAttributes[kind].structure));
|
|
2932
|
+
}
|
|
2933
|
+
/** Whether a fighter is launched from a structure. */
|
|
2934
|
+
function isStandupFighter(sde, type) {
|
|
2935
|
+
return fighterKinds.some((kind) => Boolean(baseValue(sde, type, kindAttributes[kind].structure)));
|
|
2936
|
+
}
|
|
2937
|
+
/** How many fighters make a full squadron. */
|
|
2938
|
+
function squadronSize(sde, type) {
|
|
2939
|
+
return baseValue(sde, type, "fighterSquadronMaxSize") ?? 1;
|
|
2940
|
+
}
|
|
2941
|
+
/** Whether a squadron of `type` can be launched from tube `index`, in place of what is there. */
|
|
2942
|
+
function tubeTakes(sde, fit, stats, type, index) {
|
|
2943
|
+
const kind = fighterKind(sde, type);
|
|
2944
|
+
if (kind === void 0 || isStandupFighter(sde, type) !== stats.structure) return false;
|
|
2945
|
+
if (index < 0 || index >= stats.fighterTubes.all.total) return false;
|
|
2946
|
+
const replaced = tubeRef(fit, index);
|
|
2947
|
+
const replacedType = replaced === void 0 ? void 0 : sde.type(fit.items[replaced].type_id);
|
|
2948
|
+
const freed = replacedType !== void 0 && fighterKind(sde, replacedType) === kind ? 1 : 0;
|
|
2949
|
+
const { used, total } = stats.fighterTubes[kind];
|
|
2950
|
+
return used - freed < total;
|
|
2951
|
+
}
|
|
2952
|
+
function tubeRef(fit, index) {
|
|
2953
|
+
const ref = fit.items.findIndex((item) => item.slot.type === "fighter_tube" && item.slot.index === index);
|
|
2954
|
+
return ref === -1 ? void 0 : ref;
|
|
2955
|
+
}
|
|
2956
|
+
//#endregion
|
|
2957
|
+
//#region src/primitives/FighterTube/FighterTube.module.css
|
|
2958
|
+
var FighterTube_module_default = {
|
|
2959
|
+
"empty": "Wlg6ma_empty",
|
|
2960
|
+
"label": "Wlg6ma_label",
|
|
2961
|
+
"number": "Wlg6ma_number",
|
|
2962
|
+
"picture": "Wlg6ma_picture",
|
|
2963
|
+
"remove": "Wlg6ma_remove",
|
|
2964
|
+
"resize": "Wlg6ma_resize",
|
|
2965
|
+
"ring": "Wlg6ma_ring",
|
|
2966
|
+
"role": "Wlg6ma_role",
|
|
2967
|
+
"squadron": "Wlg6ma_squadron",
|
|
2968
|
+
"tube": "Wlg6ma_tube"
|
|
2969
|
+
};
|
|
2970
|
+
//#endregion
|
|
2971
|
+
//#region src/primitives/FighterTube/FighterTube.tsx
|
|
2972
|
+
/** EVE's tube of the fighter bay, empty or with a squadron in it. */
|
|
2973
|
+
function FighterTube(t0) {
|
|
2974
|
+
const $ = c(54);
|
|
2975
|
+
let className;
|
|
2976
|
+
let index;
|
|
2977
|
+
let onRemove;
|
|
2978
|
+
let onResize;
|
|
2979
|
+
let props;
|
|
2980
|
+
let role;
|
|
2981
|
+
let t1;
|
|
2982
|
+
let t2;
|
|
2983
|
+
let t3;
|
|
2984
|
+
let t4;
|
|
2985
|
+
let typeId;
|
|
2986
|
+
let typeName;
|
|
2987
|
+
if ($[0] !== t0) {
|
|
2988
|
+
({index, typeId, typeName, quantity: t1, size: t2, role, available: t3, preview: t4, onRemove, onResize, className, ...props} = t0);
|
|
2989
|
+
$[0] = t0;
|
|
2990
|
+
$[1] = className;
|
|
2991
|
+
$[2] = index;
|
|
2992
|
+
$[3] = onRemove;
|
|
2993
|
+
$[4] = onResize;
|
|
2994
|
+
$[5] = props;
|
|
2995
|
+
$[6] = role;
|
|
2996
|
+
$[7] = t1;
|
|
2997
|
+
$[8] = t2;
|
|
2998
|
+
$[9] = t3;
|
|
2999
|
+
$[10] = t4;
|
|
3000
|
+
$[11] = typeId;
|
|
3001
|
+
$[12] = typeName;
|
|
3002
|
+
} else {
|
|
3003
|
+
className = $[1];
|
|
3004
|
+
index = $[2];
|
|
3005
|
+
onRemove = $[3];
|
|
3006
|
+
onResize = $[4];
|
|
3007
|
+
props = $[5];
|
|
3008
|
+
role = $[6];
|
|
3009
|
+
t1 = $[7];
|
|
3010
|
+
t2 = $[8];
|
|
3011
|
+
t3 = $[9];
|
|
3012
|
+
t4 = $[10];
|
|
3013
|
+
typeId = $[11];
|
|
3014
|
+
typeName = $[12];
|
|
3015
|
+
}
|
|
3016
|
+
const quantity = t1 === void 0 ? 0 : t1;
|
|
3017
|
+
const size = t2 === void 0 ? 0 : t2;
|
|
3018
|
+
const available = t3 === void 0 ? true : t3;
|
|
3019
|
+
const preview = t4 === void 0 ? false : t4;
|
|
3020
|
+
const images = useImages();
|
|
3021
|
+
const launched = typeId !== void 0;
|
|
3022
|
+
const actions = launched && !preview;
|
|
3023
|
+
let t5;
|
|
3024
|
+
if ($[13] !== images) {
|
|
3025
|
+
t5 = (name) => `url(${images.uiTexture(name)})`;
|
|
3026
|
+
$[13] = images;
|
|
3027
|
+
$[14] = t5;
|
|
3028
|
+
} else t5 = $[14];
|
|
3029
|
+
const texture = t5;
|
|
3030
|
+
let t6;
|
|
3031
|
+
if ($[15] !== className) {
|
|
3032
|
+
t6 = [FighterTube_module_default.tube, className].filter(Boolean);
|
|
3033
|
+
$[15] = className;
|
|
3034
|
+
$[16] = t6;
|
|
3035
|
+
} else t6 = $[16];
|
|
3036
|
+
const t7 = t6.join(" ");
|
|
3037
|
+
const t8 = texture("classes/carrierbay/simulatetube3");
|
|
3038
|
+
const t9 = texture("classes/shipui/fighters/squadnumberflag");
|
|
3039
|
+
let t10;
|
|
3040
|
+
if ($[17] !== t8 || $[18] !== t9) {
|
|
3041
|
+
t10 = {
|
|
3042
|
+
"--tube": t8,
|
|
3043
|
+
"--flag": t9
|
|
3044
|
+
};
|
|
3045
|
+
$[17] = t8;
|
|
3046
|
+
$[18] = t9;
|
|
3047
|
+
$[19] = t10;
|
|
3048
|
+
} else t10 = $[19];
|
|
3049
|
+
const t11 = t10;
|
|
3050
|
+
const t12 = `Tube ${index + 1}${typeName === void 0 ? "" : `, ${typeName}`}`;
|
|
3051
|
+
const t13 = launched ? "launched" : available ? "open" : "unavailable";
|
|
3052
|
+
const t14 = preview || void 0;
|
|
3053
|
+
const t15 = index + 1;
|
|
3054
|
+
let t16;
|
|
3055
|
+
if ($[20] !== t15) {
|
|
3056
|
+
t16 = /* @__PURE__ */ jsx("span", {
|
|
3057
|
+
className: FighterTube_module_default.number,
|
|
3058
|
+
children: t15
|
|
3059
|
+
});
|
|
3060
|
+
$[20] = t15;
|
|
3061
|
+
$[21] = t16;
|
|
3062
|
+
} else t16 = $[21];
|
|
3063
|
+
let t17;
|
|
3064
|
+
if ($[22] !== launched || $[23] !== quantity || $[24] !== role || $[25] !== size || $[26] !== texture || $[27] !== typeId) {
|
|
3065
|
+
t17 = launched ? /* @__PURE__ */ jsxs("span", {
|
|
3066
|
+
className: FighterTube_module_default.squadron,
|
|
3067
|
+
style: {
|
|
3068
|
+
"--underlay": texture("classes/shipui/fighters/fighteritemunderlay"),
|
|
3069
|
+
"--overlay": texture("classes/shipui/fighters/fighteritemoverlay")
|
|
3070
|
+
},
|
|
3071
|
+
children: [
|
|
3072
|
+
/* @__PURE__ */ jsx("span", {
|
|
3073
|
+
className: FighterTube_module_default.picture,
|
|
3074
|
+
children: /* @__PURE__ */ jsx(TypeIcon, {
|
|
3075
|
+
typeId,
|
|
3076
|
+
size: 64,
|
|
3077
|
+
marker: false
|
|
3078
|
+
})
|
|
3079
|
+
}),
|
|
3080
|
+
/* @__PURE__ */ jsx(SquadronRing, {
|
|
3081
|
+
quantity,
|
|
3082
|
+
size
|
|
3083
|
+
}),
|
|
3084
|
+
role && /* @__PURE__ */ jsx("span", {
|
|
3085
|
+
className: FighterTube_module_default.role,
|
|
3086
|
+
children: /* @__PURE__ */ jsx(Icon, { name: role })
|
|
3087
|
+
})
|
|
3088
|
+
]
|
|
3089
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
3090
|
+
className: FighterTube_module_default.empty,
|
|
3091
|
+
style: { "--texture": texture("classes/shipui/fighters/fighteritemempty_up") }
|
|
3092
|
+
});
|
|
3093
|
+
$[22] = launched;
|
|
3094
|
+
$[23] = quantity;
|
|
3095
|
+
$[24] = role;
|
|
3096
|
+
$[25] = size;
|
|
3097
|
+
$[26] = texture;
|
|
3098
|
+
$[27] = typeId;
|
|
3099
|
+
$[28] = t17;
|
|
3100
|
+
} else t17 = $[28];
|
|
3101
|
+
let t18;
|
|
3102
|
+
if ($[29] !== available || $[30] !== launched) {
|
|
3103
|
+
t18 = available && /* @__PURE__ */ jsx("span", {
|
|
3104
|
+
className: FighterTube_module_default.label,
|
|
3105
|
+
children: launched ? "Simulated" : "Open"
|
|
3106
|
+
});
|
|
3107
|
+
$[29] = available;
|
|
3108
|
+
$[30] = launched;
|
|
3109
|
+
$[31] = t18;
|
|
3110
|
+
} else t18 = $[31];
|
|
3111
|
+
let t19;
|
|
3112
|
+
if ($[32] !== actions || $[33] !== onResize || $[34] !== quantity || $[35] !== size || $[36] !== typeName) {
|
|
3113
|
+
t19 = actions && onResize && /* @__PURE__ */ jsxs("span", {
|
|
3114
|
+
className: FighterTube_module_default.resize,
|
|
3115
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
3116
|
+
type: "button",
|
|
3117
|
+
"aria-label": `One fewer ${typeName}`,
|
|
3118
|
+
onClick: () => onResize(quantity - 1),
|
|
3119
|
+
children: "−"
|
|
3120
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
3121
|
+
type: "button",
|
|
3122
|
+
"aria-label": `One more ${typeName}`,
|
|
3123
|
+
disabled: quantity >= size,
|
|
3124
|
+
onClick: () => onResize(quantity + 1),
|
|
3125
|
+
children: "+"
|
|
3126
|
+
})]
|
|
3127
|
+
});
|
|
3128
|
+
$[32] = actions;
|
|
3129
|
+
$[33] = onResize;
|
|
3130
|
+
$[34] = quantity;
|
|
3131
|
+
$[35] = size;
|
|
3132
|
+
$[36] = typeName;
|
|
3133
|
+
$[37] = t19;
|
|
3134
|
+
} else t19 = $[37];
|
|
3135
|
+
let t20;
|
|
3136
|
+
if ($[38] !== actions || $[39] !== onRemove || $[40] !== typeName) {
|
|
3137
|
+
t20 = actions && onRemove && /* @__PURE__ */ jsx("button", {
|
|
3138
|
+
type: "button",
|
|
3139
|
+
className: FighterTube_module_default.remove,
|
|
3140
|
+
"aria-label": `Remove ${typeName}`,
|
|
3141
|
+
onClick: onRemove,
|
|
3142
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "close" })
|
|
3143
|
+
});
|
|
3144
|
+
$[38] = actions;
|
|
3145
|
+
$[39] = onRemove;
|
|
3146
|
+
$[40] = typeName;
|
|
3147
|
+
$[41] = t20;
|
|
3148
|
+
} else t20 = $[41];
|
|
3149
|
+
let t21;
|
|
3150
|
+
if ($[42] !== props || $[43] !== t11 || $[44] !== t12 || $[45] !== t13 || $[46] !== t14 || $[47] !== t16 || $[48] !== t17 || $[49] !== t18 || $[50] !== t19 || $[51] !== t20 || $[52] !== t7) {
|
|
3151
|
+
t21 = /* @__PURE__ */ jsxs("div", {
|
|
3152
|
+
...props,
|
|
3153
|
+
className: t7,
|
|
3154
|
+
style: t11,
|
|
3155
|
+
role: "group",
|
|
3156
|
+
"aria-label": t12,
|
|
3157
|
+
"data-state": t13,
|
|
3158
|
+
"data-preview": t14,
|
|
3159
|
+
children: [
|
|
3160
|
+
t16,
|
|
3161
|
+
t17,
|
|
3162
|
+
t18,
|
|
3163
|
+
t19,
|
|
3164
|
+
t20
|
|
3165
|
+
]
|
|
3166
|
+
});
|
|
3167
|
+
$[42] = props;
|
|
3168
|
+
$[43] = t11;
|
|
3169
|
+
$[44] = t12;
|
|
3170
|
+
$[45] = t13;
|
|
3171
|
+
$[46] = t14;
|
|
3172
|
+
$[47] = t16;
|
|
3173
|
+
$[48] = t17;
|
|
3174
|
+
$[49] = t18;
|
|
3175
|
+
$[50] = t19;
|
|
3176
|
+
$[51] = t20;
|
|
3177
|
+
$[52] = t7;
|
|
3178
|
+
$[53] = t21;
|
|
3179
|
+
} else t21 = $[53];
|
|
3180
|
+
return t21;
|
|
3181
|
+
}
|
|
3182
|
+
const RING_RADIUS = 30.5;
|
|
3183
|
+
const RING_FROM = 225;
|
|
3184
|
+
const RING_SWEEP = 270;
|
|
3185
|
+
const RING_GAP = 4;
|
|
3186
|
+
/** One arc per fighter of a full squadron, lit for those in it. */
|
|
3187
|
+
function SquadronRing(t0) {
|
|
3188
|
+
const $ = c(12);
|
|
3189
|
+
const { quantity, size } = t0;
|
|
3190
|
+
const step = RING_SWEEP / Math.max(size, 1);
|
|
3191
|
+
const t1 = `${quantity} of ${size}`;
|
|
3192
|
+
let t2;
|
|
3193
|
+
if ($[0] !== quantity || $[1] !== size || $[2] !== step) {
|
|
3194
|
+
let t3;
|
|
3195
|
+
if ($[4] !== quantity || $[5] !== step) {
|
|
3196
|
+
t3 = (_, index) => {
|
|
3197
|
+
const from = RING_FROM - index * step - RING_GAP / 2;
|
|
3198
|
+
const to = from - step + RING_GAP;
|
|
3199
|
+
return /* @__PURE__ */ jsx("path", {
|
|
3200
|
+
d: arc(from, to),
|
|
3201
|
+
"data-lit": index < quantity || void 0
|
|
3202
|
+
}, index);
|
|
3203
|
+
};
|
|
3204
|
+
$[4] = quantity;
|
|
3205
|
+
$[5] = step;
|
|
3206
|
+
$[6] = t3;
|
|
3207
|
+
} else t3 = $[6];
|
|
3208
|
+
t2 = Array.from({ length: size }, t3);
|
|
3209
|
+
$[0] = quantity;
|
|
3210
|
+
$[1] = size;
|
|
3211
|
+
$[2] = step;
|
|
3212
|
+
$[3] = t2;
|
|
3213
|
+
} else t2 = $[3];
|
|
3214
|
+
let t3;
|
|
3215
|
+
if ($[7] !== quantity || $[8] !== size || $[9] !== t1 || $[10] !== t2) {
|
|
3216
|
+
t3 = /* @__PURE__ */ jsx("svg", {
|
|
3217
|
+
className: FighterTube_module_default.ring,
|
|
3218
|
+
viewBox: "-43 -43 86 86",
|
|
3219
|
+
role: "meter",
|
|
3220
|
+
"aria-label": "Fighters",
|
|
3221
|
+
"aria-valuemin": 0,
|
|
3222
|
+
"aria-valuemax": size,
|
|
3223
|
+
"aria-valuenow": quantity,
|
|
3224
|
+
"aria-valuetext": t1,
|
|
3225
|
+
children: t2
|
|
3226
|
+
});
|
|
3227
|
+
$[7] = quantity;
|
|
3228
|
+
$[8] = size;
|
|
3229
|
+
$[9] = t1;
|
|
3230
|
+
$[10] = t2;
|
|
3231
|
+
$[11] = t3;
|
|
3232
|
+
} else t3 = $[11];
|
|
3233
|
+
return t3;
|
|
3234
|
+
}
|
|
3235
|
+
/** Clockwise from `from` to `to`, in degrees counter-clockwise from the right. */
|
|
3236
|
+
function arc(from, to) {
|
|
3237
|
+
const point = (angle) => {
|
|
3238
|
+
const radians = angle * Math.PI / 180;
|
|
3239
|
+
return `${(RING_RADIUS * Math.cos(radians)).toFixed(2)} ${(-30.5 * Math.sin(radians)).toFixed(2)}`;
|
|
3240
|
+
};
|
|
3241
|
+
return `M ${point(from)} A ${RING_RADIUS} ${RING_RADIUS} 0 0 1 ${point(to)}`;
|
|
3242
|
+
}
|
|
3243
|
+
//#endregion
|
|
3244
|
+
//#region src/components/FittingWindow/FighterTubes.tsx
|
|
3245
|
+
/** EVE draws five, those the ship does not have faded. */
|
|
3246
|
+
const FIGHTER_TUBES = 5;
|
|
3247
|
+
const kinds = [
|
|
3248
|
+
{
|
|
3249
|
+
kind: "light",
|
|
3250
|
+
icon: "fighter-light",
|
|
3251
|
+
label: "Light Fighters"
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
kind: "support",
|
|
3255
|
+
icon: "fighter-support",
|
|
3256
|
+
label: "Support Fighters"
|
|
3257
|
+
},
|
|
3258
|
+
{
|
|
3259
|
+
kind: "heavy",
|
|
3260
|
+
icon: "fighter-heavy",
|
|
3261
|
+
label: "Heavy Fighters"
|
|
3262
|
+
}
|
|
3263
|
+
];
|
|
3264
|
+
/** By `fighterSquadronRole`. */
|
|
3265
|
+
const roles = {
|
|
3266
|
+
1: "fighter-role-interceptor",
|
|
3267
|
+
2: "fighter-role-attack",
|
|
3268
|
+
3: "fighter-role-support",
|
|
3269
|
+
4: "fighter-role-heavy-attack",
|
|
3270
|
+
5: "fighter-role-bomber"
|
|
3271
|
+
};
|
|
3272
|
+
/** The squadrons launched by kind, and EVE's row of fighter tubes. */
|
|
3273
|
+
function FighterTubes() {
|
|
3274
|
+
const $ = c(10);
|
|
3275
|
+
const tubes = useFighterTubes();
|
|
3276
|
+
const usage = useFighterTubeUsage();
|
|
3277
|
+
let t0;
|
|
3278
|
+
if ($[0] !== usage) {
|
|
3279
|
+
t0 = kinds.filter((t1) => {
|
|
3280
|
+
const { kind } = t1;
|
|
3281
|
+
return usage[kind].total > 0;
|
|
3282
|
+
}).map((t2) => {
|
|
3283
|
+
const { kind: kind_0, icon, label } = t2;
|
|
3284
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
3285
|
+
label,
|
|
3286
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
3287
|
+
className: BayContents_module_default.kind,
|
|
3288
|
+
"aria-label": `${label}: ${usage[kind_0].used} of ${usage[kind_0].total}`,
|
|
3289
|
+
children: [
|
|
3290
|
+
/* @__PURE__ */ jsx(Icon, { name: icon }),
|
|
3291
|
+
":",
|
|
3292
|
+
usage[kind_0].used,
|
|
3293
|
+
"/",
|
|
3294
|
+
usage[kind_0].total
|
|
3295
|
+
]
|
|
3296
|
+
})
|
|
3297
|
+
}, kind_0);
|
|
3298
|
+
});
|
|
3299
|
+
$[0] = usage;
|
|
3300
|
+
$[1] = t0;
|
|
3301
|
+
} else t0 = $[1];
|
|
3302
|
+
let t1;
|
|
3303
|
+
if ($[2] !== t0) {
|
|
3304
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
3305
|
+
className: BayContents_module_default.kinds,
|
|
3306
|
+
children: t0
|
|
3307
|
+
});
|
|
3308
|
+
$[2] = t0;
|
|
2619
3309
|
$[3] = t1;
|
|
2620
3310
|
} else t1 = $[3];
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
3311
|
+
let t2;
|
|
3312
|
+
if ($[4] !== tubes || $[5] !== usage) {
|
|
3313
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
3314
|
+
className: BayContents_module_default.tubes,
|
|
3315
|
+
role: "group",
|
|
3316
|
+
"aria-label": "Fighter Tubes",
|
|
3317
|
+
children: Array.from({ length: Math.max(FIGHTER_TUBES, tubes.length) }, (_, index) => /* @__PURE__ */ jsx(LaunchTube, {
|
|
3318
|
+
index,
|
|
3319
|
+
content: tubes[index],
|
|
3320
|
+
available: index < usage.all.total
|
|
3321
|
+
}, index))
|
|
2628
3322
|
});
|
|
2629
|
-
$[4] =
|
|
2630
|
-
$[5] =
|
|
2631
|
-
$[6] =
|
|
2632
|
-
} else
|
|
3323
|
+
$[4] = tubes;
|
|
3324
|
+
$[5] = usage;
|
|
3325
|
+
$[6] = t2;
|
|
3326
|
+
} else t2 = $[6];
|
|
3327
|
+
let t3;
|
|
3328
|
+
if ($[7] !== t1 || $[8] !== t2) {
|
|
3329
|
+
t3 = /* @__PURE__ */ jsxs(Fragment, { children: [t1, t2] });
|
|
3330
|
+
$[7] = t1;
|
|
3331
|
+
$[8] = t2;
|
|
3332
|
+
$[9] = t3;
|
|
3333
|
+
} else t3 = $[9];
|
|
2633
3334
|
return t3;
|
|
2634
3335
|
}
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
3336
|
+
function LaunchTube(t0) {
|
|
3337
|
+
const $ = c(51);
|
|
3338
|
+
const { index, content, available } = t0;
|
|
3339
|
+
const store = useFitStore();
|
|
3340
|
+
const sde = useSde();
|
|
3341
|
+
const { fit, stats } = useSnapshot();
|
|
3342
|
+
const canFit = useCanFit();
|
|
3343
|
+
const { dragging, end } = useDrag();
|
|
3344
|
+
const { show, clear } = usePreview();
|
|
3345
|
+
const item = content?.item;
|
|
3346
|
+
const type = useType(item?.type_id);
|
|
3347
|
+
const ref = content?.ref;
|
|
3348
|
+
let t1;
|
|
3349
|
+
if ($[0] !== available || $[1] !== canFit || $[2] !== dragging || $[3] !== fit || $[4] !== index || $[5] !== sde || $[6] !== stats) {
|
|
3350
|
+
const dropped = dragging?.type === "type" ? sde.type(dragging.typeId) : void 0;
|
|
3351
|
+
t1 = available && dropped !== void 0 && canFit(dropped) && tubeTakes(sde, fit, stats, dropped, index) ? dropped : void 0;
|
|
3352
|
+
$[0] = available;
|
|
3353
|
+
$[1] = canFit;
|
|
3354
|
+
$[2] = dragging;
|
|
3355
|
+
$[3] = fit;
|
|
3356
|
+
$[4] = index;
|
|
3357
|
+
$[5] = sde;
|
|
3358
|
+
$[6] = stats;
|
|
3359
|
+
$[7] = t1;
|
|
3360
|
+
} else t1 = $[7];
|
|
3361
|
+
const taken = t1;
|
|
3362
|
+
let t2;
|
|
3363
|
+
if ($[8] !== index) {
|
|
3364
|
+
t2 = {
|
|
3365
|
+
type: "fighter_tube",
|
|
3366
|
+
index
|
|
3367
|
+
};
|
|
3368
|
+
$[8] = index;
|
|
3369
|
+
$[9] = t2;
|
|
3370
|
+
} else t2 = $[9];
|
|
3371
|
+
const slot = t2;
|
|
3372
|
+
const target = `fighter-tube-${index}`;
|
|
3373
|
+
const role = type && baseValue(sde, type, "fighterSquadronRole");
|
|
3374
|
+
const t3 = content?.preview;
|
|
3375
|
+
const t4 = item?.type_id;
|
|
3376
|
+
const t5 = type?.name;
|
|
3377
|
+
const t6 = item?.quantity ?? 1;
|
|
3378
|
+
let t7;
|
|
3379
|
+
if ($[10] !== sde || $[11] !== type) {
|
|
3380
|
+
t7 = type && squadronSize(sde, type);
|
|
3381
|
+
$[10] = sde;
|
|
3382
|
+
$[11] = type;
|
|
3383
|
+
$[12] = t7;
|
|
3384
|
+
} else t7 = $[12];
|
|
3385
|
+
const t8 = role === void 0 ? void 0 : roles[role];
|
|
3386
|
+
let t9;
|
|
3387
|
+
if ($[13] !== ref || $[14] !== store) {
|
|
3388
|
+
t9 = ref === void 0 ? void 0 : () => store.remove(ref);
|
|
3389
|
+
$[13] = ref;
|
|
3390
|
+
$[14] = store;
|
|
3391
|
+
$[15] = t9;
|
|
3392
|
+
} else t9 = $[15];
|
|
3393
|
+
let t10;
|
|
3394
|
+
if ($[16] !== ref || $[17] !== store) {
|
|
3395
|
+
t10 = ref === void 0 ? void 0 : (quantity) => store.setSquadronSize(ref, quantity);
|
|
3396
|
+
$[16] = ref;
|
|
3397
|
+
$[17] = store;
|
|
3398
|
+
$[18] = t10;
|
|
3399
|
+
} else t10 = $[18];
|
|
3400
|
+
let t11;
|
|
3401
|
+
if ($[19] !== show || $[20] !== slot || $[21] !== taken || $[22] !== target) {
|
|
3402
|
+
t11 = () => {
|
|
3403
|
+
if (taken) show((draft) => void draft.fit(taken.id, slot), target);
|
|
3404
|
+
};
|
|
3405
|
+
$[19] = show;
|
|
3406
|
+
$[20] = slot;
|
|
3407
|
+
$[21] = taken;
|
|
3408
|
+
$[22] = target;
|
|
3409
|
+
$[23] = t11;
|
|
3410
|
+
} else t11 = $[23];
|
|
3411
|
+
let t12;
|
|
3412
|
+
if ($[24] !== clear || $[25] !== target) {
|
|
3413
|
+
t12 = (event) => {
|
|
3414
|
+
if (event.currentTarget.contains(event.relatedTarget)) return;
|
|
3415
|
+
clear(target);
|
|
3416
|
+
};
|
|
3417
|
+
$[24] = clear;
|
|
3418
|
+
$[25] = target;
|
|
3419
|
+
$[26] = t12;
|
|
3420
|
+
} else t12 = $[26];
|
|
3421
|
+
let t13;
|
|
3422
|
+
if ($[27] !== taken) {
|
|
3423
|
+
t13 = (event_0) => {
|
|
3424
|
+
if (!taken) return;
|
|
3425
|
+
event_0.preventDefault();
|
|
3426
|
+
event_0.dataTransfer.dropEffect = "copy";
|
|
3427
|
+
};
|
|
3428
|
+
$[27] = taken;
|
|
3429
|
+
$[28] = t13;
|
|
3430
|
+
} else t13 = $[28];
|
|
3431
|
+
let t14;
|
|
3432
|
+
if ($[29] !== clear || $[30] !== end || $[31] !== slot || $[32] !== store || $[33] !== taken || $[34] !== target) {
|
|
3433
|
+
t14 = (event_1) => {
|
|
3434
|
+
if (!taken) return;
|
|
3435
|
+
event_1.preventDefault();
|
|
3436
|
+
clear(target);
|
|
3437
|
+
store.fit(taken.id, slot);
|
|
3438
|
+
end();
|
|
3439
|
+
};
|
|
3440
|
+
$[29] = clear;
|
|
3441
|
+
$[30] = end;
|
|
3442
|
+
$[31] = slot;
|
|
3443
|
+
$[32] = store;
|
|
3444
|
+
$[33] = taken;
|
|
3445
|
+
$[34] = target;
|
|
3446
|
+
$[35] = t14;
|
|
3447
|
+
} else t14 = $[35];
|
|
3448
|
+
let t15;
|
|
3449
|
+
if ($[36] !== available || $[37] !== index || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 || $[43] !== t3 || $[44] !== t4 || $[45] !== t5 || $[46] !== t6 || $[47] !== t7 || $[48] !== t8 || $[49] !== t9) {
|
|
3450
|
+
t15 = /* @__PURE__ */ jsx(FighterTube, {
|
|
3451
|
+
index,
|
|
3452
|
+
available,
|
|
3453
|
+
preview: t3,
|
|
3454
|
+
typeId: t4,
|
|
3455
|
+
typeName: t5,
|
|
3456
|
+
quantity: t6,
|
|
3457
|
+
size: t7,
|
|
3458
|
+
role: t8,
|
|
3459
|
+
onRemove: t9,
|
|
3460
|
+
onResize: t10,
|
|
3461
|
+
onDragEnter: t11,
|
|
3462
|
+
onDragLeave: t12,
|
|
3463
|
+
onDragOver: t13,
|
|
3464
|
+
onDrop: t14
|
|
3465
|
+
});
|
|
3466
|
+
$[36] = available;
|
|
3467
|
+
$[37] = index;
|
|
3468
|
+
$[38] = t10;
|
|
3469
|
+
$[39] = t11;
|
|
3470
|
+
$[40] = t12;
|
|
3471
|
+
$[41] = t13;
|
|
3472
|
+
$[42] = t14;
|
|
3473
|
+
$[43] = t3;
|
|
3474
|
+
$[44] = t4;
|
|
3475
|
+
$[45] = t5;
|
|
3476
|
+
$[46] = t6;
|
|
3477
|
+
$[47] = t7;
|
|
3478
|
+
$[48] = t8;
|
|
3479
|
+
$[49] = t9;
|
|
3480
|
+
$[50] = t15;
|
|
3481
|
+
} else t15 = $[50];
|
|
3482
|
+
return t15;
|
|
3483
|
+
}
|
|
2654
3484
|
//#endregion
|
|
2655
3485
|
//#region src/components/FittingWindow/BayContents.tsx
|
|
2656
3486
|
const emptyText = {
|
|
2657
3487
|
cargo: "No Cargo Items Simulated",
|
|
2658
|
-
droneBay: "No Drones Simulated"
|
|
3488
|
+
droneBay: "No Drones Simulated",
|
|
3489
|
+
fighterBay: "No Fighters Simulated in Fighter Bay"
|
|
2659
3490
|
};
|
|
2660
|
-
/** EVE's list of what is in a bay, as a popover anchored to `--bay-anchor
|
|
3491
|
+
/** EVE's list of what is in a bay, as a popover anchored to `--bay-anchor`; the fighter bay's has its tubes above. */
|
|
2661
3492
|
function BayContents(t0) {
|
|
2662
|
-
const $ = c(
|
|
3493
|
+
const $ = c(39);
|
|
2663
3494
|
const { id, bay, label } = t0;
|
|
2664
3495
|
const store = useFitStore();
|
|
2665
3496
|
const contents = useBayContents(bay);
|
|
2666
3497
|
const panel = useRef(null);
|
|
2667
3498
|
const drones = bay === "droneBay";
|
|
2668
|
-
const
|
|
3499
|
+
const fighters = bay === "fighterBay";
|
|
3500
|
+
const { fit, stats } = useSnapshot();
|
|
2669
3501
|
let t1;
|
|
2670
3502
|
if ($[0] !== stats.character) {
|
|
2671
3503
|
t1 = stats.character.get("maxActiveDrones") ?? 0;
|
|
@@ -2673,27 +3505,51 @@ function BayContents(t0) {
|
|
|
2673
3505
|
$[1] = t1;
|
|
2674
3506
|
} else t1 = $[1];
|
|
2675
3507
|
const maxActive = t1;
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
3508
|
+
let t2;
|
|
3509
|
+
if ($[2] !== contents || $[3] !== fighters || $[4] !== fit) {
|
|
3510
|
+
const launched = fighters ? fit.items.flatMap(_temp$5) : [];
|
|
3511
|
+
t2 = [...contents.flatMap(_temp2$3), ...launched];
|
|
3512
|
+
$[2] = contents;
|
|
3513
|
+
$[3] = fighters;
|
|
3514
|
+
$[4] = fit;
|
|
3515
|
+
$[5] = t2;
|
|
3516
|
+
} else t2 = $[5];
|
|
3517
|
+
const all = t2;
|
|
3518
|
+
if (!fighters && contents.length === 0) {
|
|
3519
|
+
const t3 = emptyText[bay];
|
|
3520
|
+
let t4;
|
|
3521
|
+
if ($[6] !== id || $[7] !== t3) {
|
|
3522
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
2681
3523
|
id,
|
|
2682
3524
|
className: BayContents_module_default.panel,
|
|
2683
3525
|
popover: "auto",
|
|
2684
3526
|
"data-empty": true,
|
|
2685
|
-
children:
|
|
3527
|
+
children: t3
|
|
2686
3528
|
});
|
|
2687
|
-
$[
|
|
2688
|
-
$[
|
|
2689
|
-
$[
|
|
2690
|
-
} else
|
|
2691
|
-
return
|
|
3529
|
+
$[6] = id;
|
|
3530
|
+
$[7] = t3;
|
|
3531
|
+
$[8] = t4;
|
|
3532
|
+
} else t4 = $[8];
|
|
3533
|
+
return t4;
|
|
2692
3534
|
}
|
|
2693
|
-
const t2 = drones || void 0;
|
|
2694
3535
|
let t3;
|
|
2695
|
-
if ($[
|
|
2696
|
-
t3 =
|
|
3536
|
+
if ($[9] !== drones || $[10] !== fighters || $[11] !== store) {
|
|
3537
|
+
t3 = (typeId, quantity) => {
|
|
3538
|
+
if (drones) store.setDroneQuantity(typeId, quantity);
|
|
3539
|
+
else if (fighters) store.setFighterBayQuantity(typeId, quantity);
|
|
3540
|
+
else store.setCargoQuantity(typeId, quantity);
|
|
3541
|
+
};
|
|
3542
|
+
$[9] = drones;
|
|
3543
|
+
$[10] = fighters;
|
|
3544
|
+
$[11] = store;
|
|
3545
|
+
$[12] = t3;
|
|
3546
|
+
} else t3 = $[12];
|
|
3547
|
+
const setQuantity = t3;
|
|
3548
|
+
const t4 = drones || void 0;
|
|
3549
|
+
const t5 = fighters || void 0;
|
|
3550
|
+
let t6;
|
|
3551
|
+
if ($[13] !== drones || $[14] !== maxActive || $[15] !== stats.ship) {
|
|
3552
|
+
t6 = drones && /* @__PURE__ */ jsxs("div", {
|
|
2697
3553
|
className: BayContents_module_default.activeDrones,
|
|
2698
3554
|
children: [
|
|
2699
3555
|
"Active drones: ",
|
|
@@ -2702,112 +3558,125 @@ function BayContents(t0) {
|
|
|
2702
3558
|
maxActive
|
|
2703
3559
|
]
|
|
2704
3560
|
});
|
|
2705
|
-
$[
|
|
2706
|
-
$[
|
|
2707
|
-
$[
|
|
2708
|
-
$[
|
|
2709
|
-
} else
|
|
2710
|
-
let
|
|
2711
|
-
if ($[
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
/* @__PURE__ */ jsx("span", {
|
|
2723
|
-
className: BayContents_module_default.icon,
|
|
2724
|
-
children: /* @__PURE__ */ jsx(TypeIcon, { typeId: type.id })
|
|
2725
|
-
}),
|
|
2726
|
-
/* @__PURE__ */ jsxs("span", {
|
|
2727
|
-
className: BayContents_module_default.middle,
|
|
2728
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
2729
|
-
className: BayContents_module_default.name,
|
|
2730
|
-
children: type.name
|
|
2731
|
-
}), drones && /* @__PURE__ */ jsx(DroneSelection, {
|
|
2732
|
-
content,
|
|
2733
|
-
max: maxActive
|
|
2734
|
-
})]
|
|
2735
|
-
}),
|
|
2736
|
-
/* @__PURE__ */ jsx("button", {
|
|
2737
|
-
type: "button",
|
|
2738
|
-
className: BayContents_module_default.remove,
|
|
2739
|
-
"aria-label": `Remove ${type.name}`,
|
|
2740
|
-
onClick: (event) => {
|
|
2741
|
-
const row = event.currentTarget.closest("li");
|
|
2742
|
-
const next = row.nextElementSibling ?? row.previousElementSibling;
|
|
2743
|
-
store.remove(...refs);
|
|
2744
|
-
if (next === null) panel.current?.hidePopover();
|
|
2745
|
-
else next.querySelector(`.${BayContents_module_default.remove}`)?.focus();
|
|
2746
|
-
},
|
|
2747
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "close" })
|
|
2748
|
-
})
|
|
2749
|
-
]
|
|
2750
|
-
}, type.id);
|
|
2751
|
-
});
|
|
2752
|
-
$[9] = contents;
|
|
2753
|
-
$[10] = drones;
|
|
2754
|
-
$[11] = maxActive;
|
|
2755
|
-
$[12] = store;
|
|
2756
|
-
$[13] = t4;
|
|
2757
|
-
} else t4 = $[13];
|
|
2758
|
-
let t5;
|
|
2759
|
-
if ($[14] !== label || $[15] !== t4) {
|
|
2760
|
-
t5 = /* @__PURE__ */ jsx("ul", {
|
|
3561
|
+
$[13] = drones;
|
|
3562
|
+
$[14] = maxActive;
|
|
3563
|
+
$[15] = stats.ship;
|
|
3564
|
+
$[16] = t6;
|
|
3565
|
+
} else t6 = $[16];
|
|
3566
|
+
let t7;
|
|
3567
|
+
if ($[17] !== fighters) {
|
|
3568
|
+
t7 = fighters && /* @__PURE__ */ jsx(FighterTubes, {});
|
|
3569
|
+
$[17] = fighters;
|
|
3570
|
+
$[18] = t7;
|
|
3571
|
+
} else t7 = $[18];
|
|
3572
|
+
let t8;
|
|
3573
|
+
if ($[19] !== bay || $[20] !== contents || $[21] !== drones || $[22] !== fighters || $[23] !== label || $[24] !== maxActive || $[25] !== setQuantity || $[26] !== store) {
|
|
3574
|
+
t8 = contents.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
3575
|
+
className: BayContents_module_default.none,
|
|
3576
|
+
children: emptyText[bay]
|
|
3577
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
2761
3578
|
className: BayContents_module_default.list,
|
|
2762
3579
|
"aria-label": label,
|
|
2763
|
-
children:
|
|
3580
|
+
children: contents.map((content) => {
|
|
3581
|
+
const { type, quantity: quantity_0, refs: refs_0 } = content;
|
|
3582
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
3583
|
+
className: BayContents_module_default.row,
|
|
3584
|
+
children: [
|
|
3585
|
+
/* @__PURE__ */ jsx(Quantity, {
|
|
3586
|
+
name: type.name,
|
|
3587
|
+
value: quantity_0,
|
|
3588
|
+
onChange: (value) => setQuantity(type.id, value)
|
|
3589
|
+
}),
|
|
3590
|
+
/* @__PURE__ */ jsx("span", {
|
|
3591
|
+
className: BayContents_module_default.icon,
|
|
3592
|
+
children: /* @__PURE__ */ jsx(TypeIcon, { typeId: type.id })
|
|
3593
|
+
}),
|
|
3594
|
+
/* @__PURE__ */ jsxs("span", {
|
|
3595
|
+
className: BayContents_module_default.middle,
|
|
3596
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
3597
|
+
className: BayContents_module_default.name,
|
|
3598
|
+
children: type.name
|
|
3599
|
+
}), drones && /* @__PURE__ */ jsx(DroneSelection, {
|
|
3600
|
+
content,
|
|
3601
|
+
max: maxActive
|
|
3602
|
+
})]
|
|
3603
|
+
}),
|
|
3604
|
+
/* @__PURE__ */ jsx("button", {
|
|
3605
|
+
type: "button",
|
|
3606
|
+
className: BayContents_module_default.remove,
|
|
3607
|
+
"aria-label": `Remove ${type.name}`,
|
|
3608
|
+
onClick: (event) => {
|
|
3609
|
+
const row = event.currentTarget.closest("li");
|
|
3610
|
+
const next = row.nextElementSibling ?? row.previousElementSibling;
|
|
3611
|
+
store.remove(...refs_0);
|
|
3612
|
+
if (next !== null) next.querySelector(`.${BayContents_module_default.remove}`)?.focus();
|
|
3613
|
+
else if (!fighters) panel.current?.hidePopover();
|
|
3614
|
+
},
|
|
3615
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "close" })
|
|
3616
|
+
})
|
|
3617
|
+
]
|
|
3618
|
+
}, type.id);
|
|
3619
|
+
})
|
|
2764
3620
|
});
|
|
2765
|
-
$[
|
|
2766
|
-
$[
|
|
2767
|
-
$[
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
3621
|
+
$[19] = bay;
|
|
3622
|
+
$[20] = contents;
|
|
3623
|
+
$[21] = drones;
|
|
3624
|
+
$[22] = fighters;
|
|
3625
|
+
$[23] = label;
|
|
3626
|
+
$[24] = maxActive;
|
|
3627
|
+
$[25] = setQuantity;
|
|
3628
|
+
$[26] = store;
|
|
3629
|
+
$[27] = t8;
|
|
3630
|
+
} else t8 = $[27];
|
|
3631
|
+
let t9;
|
|
3632
|
+
if ($[28] !== all || $[29] !== store) {
|
|
3633
|
+
t9 = all.length > 0 && /* @__PURE__ */ jsx("button", {
|
|
2772
3634
|
type: "button",
|
|
2773
3635
|
className: BayContents_module_default.removeAll,
|
|
2774
3636
|
onClick: () => {
|
|
2775
|
-
store.remove(...
|
|
3637
|
+
store.remove(...all);
|
|
2776
3638
|
panel.current?.hidePopover();
|
|
2777
3639
|
},
|
|
2778
3640
|
children: "Remove All"
|
|
2779
3641
|
});
|
|
2780
|
-
$[
|
|
2781
|
-
$[
|
|
2782
|
-
$[
|
|
2783
|
-
} else
|
|
2784
|
-
let
|
|
2785
|
-
if ($[
|
|
2786
|
-
|
|
3642
|
+
$[28] = all;
|
|
3643
|
+
$[29] = store;
|
|
3644
|
+
$[30] = t9;
|
|
3645
|
+
} else t9 = $[30];
|
|
3646
|
+
let t10;
|
|
3647
|
+
if ($[31] !== id || $[32] !== t4 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8 || $[37] !== t9) {
|
|
3648
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
2787
3649
|
ref: panel,
|
|
2788
3650
|
id,
|
|
2789
3651
|
className: BayContents_module_default.panel,
|
|
2790
3652
|
popover: "auto",
|
|
2791
|
-
"data-drones":
|
|
3653
|
+
"data-drones": t4,
|
|
3654
|
+
"data-fighters": t5,
|
|
2792
3655
|
children: [
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
3656
|
+
t6,
|
|
3657
|
+
t7,
|
|
3658
|
+
t8,
|
|
3659
|
+
t9
|
|
2796
3660
|
]
|
|
2797
3661
|
});
|
|
2798
|
-
$[
|
|
2799
|
-
$[
|
|
2800
|
-
$[
|
|
2801
|
-
$[
|
|
2802
|
-
$[
|
|
2803
|
-
$[
|
|
2804
|
-
|
|
2805
|
-
|
|
3662
|
+
$[31] = id;
|
|
3663
|
+
$[32] = t4;
|
|
3664
|
+
$[33] = t5;
|
|
3665
|
+
$[34] = t6;
|
|
3666
|
+
$[35] = t7;
|
|
3667
|
+
$[36] = t8;
|
|
3668
|
+
$[37] = t9;
|
|
3669
|
+
$[38] = t10;
|
|
3670
|
+
} else t10 = $[38];
|
|
3671
|
+
return t10;
|
|
2806
3672
|
}
|
|
2807
3673
|
/** One box per drone the character can launch. */
|
|
2808
|
-
function
|
|
2809
|
-
const { refs
|
|
2810
|
-
return
|
|
3674
|
+
function _temp2$3(t0) {
|
|
3675
|
+
const { refs } = t0;
|
|
3676
|
+
return refs;
|
|
3677
|
+
}
|
|
3678
|
+
function _temp$5(item, ref) {
|
|
3679
|
+
return item.slot.type === "fighter_tube" ? [ref] : [];
|
|
2811
3680
|
}
|
|
2812
3681
|
function DroneSelection(t0) {
|
|
2813
3682
|
const $ = c(16);
|
|
@@ -3044,6 +3913,9 @@ function Quantity(t0) {
|
|
|
3044
3913
|
//#endregion
|
|
3045
3914
|
//#region src/components/FittingWindow/FittingWindow.module.css
|
|
3046
3915
|
var FittingWindow_module_default = {
|
|
3916
|
+
"alert": "L9t91q_alert",
|
|
3917
|
+
"alertLine": "L9t91q_alertLine",
|
|
3918
|
+
"alertTitle": "L9t91q_alertTitle",
|
|
3047
3919
|
"bay": "L9t91q_bay",
|
|
3048
3920
|
"bayAnchor": "L9t91q_bayAnchor",
|
|
3049
3921
|
"bays": "L9t91q_bays",
|
|
@@ -3058,6 +3930,7 @@ var FittingWindow_module_default = {
|
|
|
3058
3930
|
"panels": "L9t91q_panels",
|
|
3059
3931
|
"resource": "L9t91q_resource",
|
|
3060
3932
|
"resources": "L9t91q_resources",
|
|
3933
|
+
"services": "L9t91q_services",
|
|
3061
3934
|
"slash": "L9t91q_slash",
|
|
3062
3935
|
"slide": "L9t91q_slide",
|
|
3063
3936
|
"statistics": "L9t91q_statistics",
|
|
@@ -3073,6 +3946,13 @@ var FittingWindow_module_default = {
|
|
|
3073
3946
|
"window": "L9t91q_window"
|
|
3074
3947
|
};
|
|
3075
3948
|
//#endregion
|
|
3949
|
+
//#region src/components/FittingWindow/manageFighters.ts
|
|
3950
|
+
/** Opens the fighter bay of the `FittingWindow` around it. */
|
|
3951
|
+
const ManageFightersContext = createContext(void 0);
|
|
3952
|
+
function useManageFighters() {
|
|
3953
|
+
return useContext(ManageFightersContext);
|
|
3954
|
+
}
|
|
3955
|
+
//#endregion
|
|
3076
3956
|
//#region src/components/FittingWindow/violations.ts
|
|
3077
3957
|
const byRule = {
|
|
3078
3958
|
skill: "skill",
|
|
@@ -3122,15 +4002,89 @@ function countViolations(violations) {
|
|
|
3122
4002
|
counts.skill = skills.size;
|
|
3123
4003
|
return counts;
|
|
3124
4004
|
}
|
|
4005
|
+
const resourceTexts = {
|
|
4006
|
+
cpu: "CPU overloaded",
|
|
4007
|
+
powergrid: "Powergrid overloaded",
|
|
4008
|
+
calibration: "Calibration overloaded",
|
|
4009
|
+
cargo_bay: "Cargo hold overloaded",
|
|
4010
|
+
drone_bay: "Drone bay overloaded",
|
|
4011
|
+
drone_bandwidth: "Drone bandwidth overloaded",
|
|
4012
|
+
fighter_bay: "Fighter bay overloaded",
|
|
4013
|
+
launched_drones: "Too many drones launched",
|
|
4014
|
+
fighter_tubes: "Too many fighters launched",
|
|
4015
|
+
light_fighter_tubes: "Too many light fighters launched",
|
|
4016
|
+
support_fighter_tubes: "Too many support fighters launched",
|
|
4017
|
+
heavy_fighter_tubes: "Too many heavy fighters launched"
|
|
4018
|
+
};
|
|
4019
|
+
const rackItems = {
|
|
4020
|
+
high: "high slot modules",
|
|
4021
|
+
medium: "medium slot modules",
|
|
4022
|
+
low: "low slot modules",
|
|
4023
|
+
rig: "rigs",
|
|
4024
|
+
subsystem: "subsystems",
|
|
4025
|
+
service: "service modules",
|
|
4026
|
+
turret: "turrets",
|
|
4027
|
+
launcher: "launchers"
|
|
4028
|
+
};
|
|
4029
|
+
const slotNames = {
|
|
4030
|
+
high: "a high slot",
|
|
4031
|
+
medium: "a medium slot",
|
|
4032
|
+
low: "a low slot",
|
|
4033
|
+
rig: "a rig slot",
|
|
4034
|
+
subsystem: "a subsystem slot",
|
|
4035
|
+
service: "a service slot",
|
|
4036
|
+
turret: "a turret hardpoint",
|
|
4037
|
+
launcher: "a launcher hardpoint"
|
|
4038
|
+
};
|
|
4039
|
+
const romanLevels = [
|
|
4040
|
+
"I",
|
|
4041
|
+
"II",
|
|
4042
|
+
"III",
|
|
4043
|
+
"IV",
|
|
4044
|
+
"V"
|
|
4045
|
+
];
|
|
4046
|
+
/** What is wrong, or the skill that is missing. */
|
|
4047
|
+
function violationText({ target, rule }, fit, names) {
|
|
4048
|
+
const item = target.type === "ship" ? void 0 : fit.items[target.index];
|
|
4049
|
+
const module = item ? names.type(item.type_id) : "";
|
|
4050
|
+
const charge = item?.charge ? names.type(item.charge.type_id) : "";
|
|
4051
|
+
const subject = target.type === "charge" ? charge : module;
|
|
4052
|
+
switch (rule.type) {
|
|
4053
|
+
case "resource": return rule.resource === "charge_capacity" ? `${charge}: too big for ${module}` : resourceTexts[rule.resource];
|
|
4054
|
+
case "slots": return `Too many ${rackItems[rule.slot]}`;
|
|
4055
|
+
case "skill": return `${names.type(rule.type_id)} ${romanLevels[rule.required - 1]}`;
|
|
4056
|
+
case "wrong_slot": return `${subject}: goes in ${slotNames[rule.expected]}`;
|
|
4057
|
+
case "slot_taken": return `${subject}: slot already taken`;
|
|
4058
|
+
case "wrong_slot_index": return `${subject}: goes in ${item?.slot.type} slot ${rule.expected}`;
|
|
4059
|
+
case "subsystem_taken": return `${subject}: another subsystem covers the same part of the ship`;
|
|
4060
|
+
case "rig_size": return `${subject}: rig size does not match the ship`;
|
|
4061
|
+
case "ship_restricted": return `${subject}: cannot be fitted to this ship`;
|
|
4062
|
+
case "capital_item": return `${subject}: needs a capital ship`;
|
|
4063
|
+
case "structure_item": return `${subject}: only fits on a structure`;
|
|
4064
|
+
case "ship_item": return `${subject}: does not fit on a structure`;
|
|
4065
|
+
case "max_group": return `${subject}: only ${rule.allowed} ${names.group(rule.group_id)} can be ${rule.limit}`;
|
|
4066
|
+
case "max_type": return `${subject}: only ${rule.allowed} can be fitted`;
|
|
4067
|
+
case "charge_group": return `${charge}: cannot be loaded in ${module}`;
|
|
4068
|
+
case "charge_size": return `${charge}: wrong size for ${module}`;
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
/** Each missing skill once, at the highest level asked for. */
|
|
4072
|
+
function missingSkills(violations) {
|
|
4073
|
+
const skills = /* @__PURE__ */ new Map();
|
|
4074
|
+
for (const { rule } of violations) if (rule.type === "skill" && rule.required > (skills.get(rule.type_id)?.required ?? 0)) skills.set(rule.type_id, rule);
|
|
4075
|
+
return [...skills.values()];
|
|
4076
|
+
}
|
|
3125
4077
|
//#endregion
|
|
3126
4078
|
//#region src/components/FittingWindow/FittingWindow.tsx
|
|
3127
4079
|
const oneDecimal = new Intl.NumberFormat("en-US", {
|
|
3128
4080
|
minimumFractionDigits: 1,
|
|
3129
4081
|
maximumFractionDigits: 1
|
|
3130
4082
|
});
|
|
4083
|
+
/** EVE draws eight, those the structure does not have as a faint outline. */
|
|
4084
|
+
const SERVICE_SLOTS = 8;
|
|
3131
4085
|
/** EVE's fitting window around the `FittingWheel`. */
|
|
3132
4086
|
function FittingWindow(t0) {
|
|
3133
|
-
const $ = c(
|
|
4087
|
+
const $ = c(51);
|
|
3134
4088
|
const { label: t1, browser, statistics } = t0;
|
|
3135
4089
|
const label = t1 === void 0 ? "Fitting Window" : t1;
|
|
3136
4090
|
const [browserOpen, setBrowserOpen] = useState(true);
|
|
@@ -3139,11 +4093,22 @@ function FittingWindow(t0) {
|
|
|
3139
4093
|
const statisticsId = useId();
|
|
3140
4094
|
const browserShown = browser !== void 0 && browserOpen;
|
|
3141
4095
|
const statisticsShown = statistics !== void 0 && statisticsOpen;
|
|
3142
|
-
const
|
|
3143
|
-
const
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
4096
|
+
const { stats } = useSnapshot();
|
|
4097
|
+
const { structure } = stats;
|
|
4098
|
+
const fighters = structure || stats.fighterBay.total > 0;
|
|
4099
|
+
const fighterBay = useId();
|
|
4100
|
+
let t2;
|
|
4101
|
+
if ($[0] !== fighterBay || $[1] !== fighters) {
|
|
4102
|
+
t2 = fighters ? () => popover(fighterBay)?.showPopover() : void 0;
|
|
4103
|
+
$[0] = fighterBay;
|
|
4104
|
+
$[1] = fighters;
|
|
4105
|
+
$[2] = t2;
|
|
4106
|
+
} else t2 = $[2];
|
|
4107
|
+
const t3 = browserShown || void 0;
|
|
4108
|
+
const t4 = statisticsShown || void 0;
|
|
4109
|
+
let t5;
|
|
4110
|
+
if ($[3] !== browser || $[4] !== browserId || $[5] !== browserShown) {
|
|
4111
|
+
t5 = browser !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
3147
4112
|
id: browserId,
|
|
3148
4113
|
className: FittingWindow_module_default.browser,
|
|
3149
4114
|
inert: !browserShown,
|
|
@@ -3152,32 +4117,32 @@ function FittingWindow(t0) {
|
|
|
3152
4117
|
children: browser
|
|
3153
4118
|
})
|
|
3154
4119
|
});
|
|
3155
|
-
$[
|
|
3156
|
-
$[
|
|
3157
|
-
$[
|
|
3158
|
-
$[
|
|
3159
|
-
} else
|
|
3160
|
-
let t5;
|
|
4120
|
+
$[3] = browser;
|
|
4121
|
+
$[4] = browserId;
|
|
4122
|
+
$[5] = browserShown;
|
|
4123
|
+
$[6] = t5;
|
|
4124
|
+
} else t5 = $[6];
|
|
3161
4125
|
let t6;
|
|
3162
4126
|
let t7;
|
|
3163
|
-
|
|
3164
|
-
|
|
4127
|
+
let t8;
|
|
4128
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4129
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
3165
4130
|
className: FittingWindow_module_default.wheel,
|
|
3166
4131
|
children: /* @__PURE__ */ jsx(FittingWheel, {})
|
|
3167
4132
|
});
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
$[
|
|
3171
|
-
$[
|
|
3172
|
-
$[
|
|
4133
|
+
t7 = /* @__PURE__ */ jsx(FitName, {});
|
|
4134
|
+
t8 = /* @__PURE__ */ jsx(Violations, {});
|
|
4135
|
+
$[7] = t6;
|
|
4136
|
+
$[8] = t7;
|
|
4137
|
+
$[9] = t8;
|
|
3173
4138
|
} else {
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
4139
|
+
t6 = $[7];
|
|
4140
|
+
t7 = $[8];
|
|
4141
|
+
t8 = $[9];
|
|
3177
4142
|
}
|
|
3178
|
-
let
|
|
3179
|
-
if ($[
|
|
3180
|
-
|
|
4143
|
+
let t9;
|
|
4144
|
+
if ($[10] !== browser || $[11] !== browserId || $[12] !== browserShown) {
|
|
4145
|
+
t9 = browser !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
3181
4146
|
className: FittingWindow_module_default.tools,
|
|
3182
4147
|
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
3183
4148
|
label: "Item Browser",
|
|
@@ -3192,14 +4157,14 @@ function FittingWindow(t0) {
|
|
|
3192
4157
|
})
|
|
3193
4158
|
})
|
|
3194
4159
|
});
|
|
3195
|
-
$[
|
|
3196
|
-
$[
|
|
3197
|
-
$[
|
|
3198
|
-
$[
|
|
3199
|
-
} else
|
|
3200
|
-
let
|
|
3201
|
-
if ($[
|
|
3202
|
-
|
|
4160
|
+
$[10] = browser;
|
|
4161
|
+
$[11] = browserId;
|
|
4162
|
+
$[12] = browserShown;
|
|
4163
|
+
$[13] = t9;
|
|
4164
|
+
} else t9 = $[13];
|
|
4165
|
+
let t10;
|
|
4166
|
+
if ($[14] !== statistics || $[15] !== statisticsId || $[16] !== statisticsShown) {
|
|
4167
|
+
t10 = statistics !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
3203
4168
|
className: FittingWindow_module_default.panels,
|
|
3204
4169
|
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
3205
4170
|
label: "Statistics",
|
|
@@ -3214,38 +4179,70 @@ function FittingWindow(t0) {
|
|
|
3214
4179
|
})
|
|
3215
4180
|
})
|
|
3216
4181
|
});
|
|
3217
|
-
$[
|
|
3218
|
-
$[
|
|
3219
|
-
$[
|
|
3220
|
-
$[
|
|
3221
|
-
} else
|
|
3222
|
-
let
|
|
3223
|
-
if ($[
|
|
3224
|
-
|
|
4182
|
+
$[14] = statistics;
|
|
4183
|
+
$[15] = statisticsId;
|
|
4184
|
+
$[16] = statisticsShown;
|
|
4185
|
+
$[17] = t10;
|
|
4186
|
+
} else t10 = $[17];
|
|
4187
|
+
let t11;
|
|
4188
|
+
if ($[18] !== structure) {
|
|
4189
|
+
t11 = structure ? /* @__PURE__ */ jsx(Bay, {
|
|
4190
|
+
bay: "cargo",
|
|
4191
|
+
icon: "ammo-hold",
|
|
4192
|
+
label: "Ammo Hold",
|
|
4193
|
+
unlimited: true
|
|
4194
|
+
}) : /* @__PURE__ */ jsx(Bay, {
|
|
4195
|
+
bay: "cargo",
|
|
4196
|
+
icon: "cargo",
|
|
4197
|
+
label: "Cargo Hold"
|
|
4198
|
+
});
|
|
4199
|
+
$[18] = structure;
|
|
4200
|
+
$[19] = t11;
|
|
4201
|
+
} else t11 = $[19];
|
|
4202
|
+
let t12;
|
|
4203
|
+
if ($[20] !== fighterBay || $[21] !== fighters) {
|
|
4204
|
+
t12 = fighters ? /* @__PURE__ */ jsx(Bay, {
|
|
4205
|
+
id: fighterBay,
|
|
4206
|
+
bay: "fighterBay",
|
|
4207
|
+
icon: "fighter-bay",
|
|
4208
|
+
label: "Fighter Bay"
|
|
4209
|
+
}) : /* @__PURE__ */ jsx(Bay, {
|
|
4210
|
+
bay: "droneBay",
|
|
4211
|
+
icon: "drone-bay",
|
|
4212
|
+
label: "Drone Bay"
|
|
4213
|
+
});
|
|
4214
|
+
$[20] = fighterBay;
|
|
4215
|
+
$[21] = fighters;
|
|
4216
|
+
$[22] = t12;
|
|
4217
|
+
} else t12 = $[22];
|
|
4218
|
+
let t13;
|
|
4219
|
+
if ($[23] !== t11 || $[24] !== t12) {
|
|
4220
|
+
t13 = /* @__PURE__ */ jsxs("div", {
|
|
3225
4221
|
className: FittingWindow_module_default.bays,
|
|
3226
|
-
children: [
|
|
3227
|
-
bay: "cargo",
|
|
3228
|
-
icon: "cargo",
|
|
3229
|
-
label: "Cargo Hold"
|
|
3230
|
-
}), /* @__PURE__ */ jsx(Bay, {
|
|
3231
|
-
bay: "droneBay",
|
|
3232
|
-
icon: "drone-bay",
|
|
3233
|
-
label: "Drone Bay"
|
|
3234
|
-
})]
|
|
4222
|
+
children: [t11, t12]
|
|
3235
4223
|
});
|
|
3236
|
-
$[
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
4224
|
+
$[23] = t11;
|
|
4225
|
+
$[24] = t12;
|
|
4226
|
+
$[25] = t13;
|
|
4227
|
+
} else t13 = $[25];
|
|
4228
|
+
let t14;
|
|
4229
|
+
if ($[26] !== structure) {
|
|
4230
|
+
t14 = structure && /* @__PURE__ */ jsx(ServiceRack, {});
|
|
4231
|
+
$[26] = structure;
|
|
4232
|
+
$[27] = t14;
|
|
4233
|
+
} else t14 = $[27];
|
|
4234
|
+
let t15;
|
|
4235
|
+
if ($[28] !== structure) {
|
|
4236
|
+
t15 = /* @__PURE__ */ jsx("div", {
|
|
3241
4237
|
className: FittingWindow_module_default.history,
|
|
3242
|
-
children: /* @__PURE__ */ jsx(SimulationHistory, {})
|
|
4238
|
+
children: /* @__PURE__ */ jsx(SimulationHistory, { tooltipTitle: structure })
|
|
3243
4239
|
});
|
|
3244
|
-
$[
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
4240
|
+
$[28] = structure;
|
|
4241
|
+
$[29] = t15;
|
|
4242
|
+
} else t15 = $[29];
|
|
4243
|
+
let t16;
|
|
4244
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4245
|
+
t16 = /* @__PURE__ */ jsxs("div", {
|
|
3249
4246
|
className: FittingWindow_module_default.resources,
|
|
3250
4247
|
children: [/* @__PURE__ */ jsx(Resource, {
|
|
3251
4248
|
title: "CPU",
|
|
@@ -3257,30 +4254,34 @@ function FittingWindow(t0) {
|
|
|
3257
4254
|
output: "powerOutput"
|
|
3258
4255
|
})]
|
|
3259
4256
|
});
|
|
3260
|
-
$[
|
|
3261
|
-
} else
|
|
3262
|
-
let
|
|
3263
|
-
if ($[
|
|
3264
|
-
|
|
4257
|
+
$[30] = t16;
|
|
4258
|
+
} else t16 = $[30];
|
|
4259
|
+
let t17;
|
|
4260
|
+
if ($[31] !== t10 || $[32] !== t13 || $[33] !== t14 || $[34] !== t15 || $[35] !== t9) {
|
|
4261
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
3265
4262
|
className: FittingWindow_module_default.frame,
|
|
3266
4263
|
children: [
|
|
3267
|
-
t5,
|
|
3268
4264
|
t6,
|
|
3269
4265
|
t7,
|
|
3270
4266
|
t8,
|
|
3271
4267
|
t9,
|
|
3272
4268
|
t10,
|
|
3273
|
-
|
|
3274
|
-
|
|
4269
|
+
t13,
|
|
4270
|
+
t14,
|
|
4271
|
+
t15,
|
|
4272
|
+
t16
|
|
3275
4273
|
]
|
|
3276
4274
|
});
|
|
3277
|
-
$[
|
|
3278
|
-
$[
|
|
3279
|
-
$[
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
4275
|
+
$[31] = t10;
|
|
4276
|
+
$[32] = t13;
|
|
4277
|
+
$[33] = t14;
|
|
4278
|
+
$[34] = t15;
|
|
4279
|
+
$[35] = t9;
|
|
4280
|
+
$[36] = t17;
|
|
4281
|
+
} else t17 = $[36];
|
|
4282
|
+
let t18;
|
|
4283
|
+
if ($[37] !== statistics || $[38] !== statisticsId || $[39] !== statisticsShown) {
|
|
4284
|
+
t18 = statistics !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
3284
4285
|
id: statisticsId,
|
|
3285
4286
|
className: FittingWindow_module_default.statistics,
|
|
3286
4287
|
inert: !statisticsShown,
|
|
@@ -3289,33 +4290,47 @@ function FittingWindow(t0) {
|
|
|
3289
4290
|
children: statistics
|
|
3290
4291
|
})
|
|
3291
4292
|
});
|
|
3292
|
-
$[
|
|
3293
|
-
$[
|
|
3294
|
-
$[
|
|
3295
|
-
$[
|
|
3296
|
-
} else
|
|
3297
|
-
let
|
|
3298
|
-
if ($[
|
|
3299
|
-
|
|
4293
|
+
$[37] = statistics;
|
|
4294
|
+
$[38] = statisticsId;
|
|
4295
|
+
$[39] = statisticsShown;
|
|
4296
|
+
$[40] = t18;
|
|
4297
|
+
} else t18 = $[40];
|
|
4298
|
+
let t19;
|
|
4299
|
+
if ($[41] !== label || $[42] !== t17 || $[43] !== t18 || $[44] !== t3 || $[45] !== t4 || $[46] !== t5) {
|
|
4300
|
+
t19 = /* @__PURE__ */ jsxs("section", {
|
|
3300
4301
|
className: FittingWindow_module_default.window,
|
|
3301
4302
|
"aria-label": label,
|
|
3302
|
-
"data-browser":
|
|
3303
|
-
"data-statistics":
|
|
4303
|
+
"data-browser": t3,
|
|
4304
|
+
"data-statistics": t4,
|
|
3304
4305
|
children: [
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
4306
|
+
t5,
|
|
4307
|
+
t17,
|
|
4308
|
+
t18
|
|
3308
4309
|
]
|
|
3309
4310
|
});
|
|
3310
|
-
$[
|
|
3311
|
-
$[
|
|
3312
|
-
$[
|
|
3313
|
-
$[
|
|
3314
|
-
$[
|
|
3315
|
-
$[
|
|
3316
|
-
$[
|
|
3317
|
-
} else
|
|
3318
|
-
|
|
4311
|
+
$[41] = label;
|
|
4312
|
+
$[42] = t17;
|
|
4313
|
+
$[43] = t18;
|
|
4314
|
+
$[44] = t3;
|
|
4315
|
+
$[45] = t4;
|
|
4316
|
+
$[46] = t5;
|
|
4317
|
+
$[47] = t19;
|
|
4318
|
+
} else t19 = $[47];
|
|
4319
|
+
let t20;
|
|
4320
|
+
if ($[48] !== t19 || $[49] !== t2) {
|
|
4321
|
+
t20 = /* @__PURE__ */ jsx(ManageFightersContext, {
|
|
4322
|
+
value: t2,
|
|
4323
|
+
children: t19
|
|
4324
|
+
});
|
|
4325
|
+
$[48] = t19;
|
|
4326
|
+
$[49] = t2;
|
|
4327
|
+
$[50] = t20;
|
|
4328
|
+
} else t20 = $[50];
|
|
4329
|
+
return t20;
|
|
4330
|
+
}
|
|
4331
|
+
function popover(id) {
|
|
4332
|
+
const element = document.getElementById(id);
|
|
4333
|
+
return element?.matches(":popover-open") ? null : element;
|
|
3319
4334
|
}
|
|
3320
4335
|
function FitName() {
|
|
3321
4336
|
const $ = c(4);
|
|
@@ -3362,64 +4377,133 @@ function FitName() {
|
|
|
3362
4377
|
const violationKinds = [
|
|
3363
4378
|
{
|
|
3364
4379
|
kind: "error",
|
|
3365
|
-
label: "Fitting Errors"
|
|
4380
|
+
label: "Fitting Errors",
|
|
4381
|
+
title: "Fitting Alert"
|
|
3366
4382
|
},
|
|
3367
4383
|
{
|
|
3368
4384
|
kind: "skill",
|
|
3369
|
-
label: "Missing Skills"
|
|
4385
|
+
label: "Missing Skills",
|
|
4386
|
+
title: "Missing Skills"
|
|
3370
4387
|
},
|
|
3371
4388
|
{
|
|
3372
4389
|
kind: "notice",
|
|
3373
|
-
label: "Fitting Warnings"
|
|
4390
|
+
label: "Fitting Warnings",
|
|
4391
|
+
title: "Fitting Warning"
|
|
3374
4392
|
}
|
|
3375
4393
|
];
|
|
3376
4394
|
function Violations() {
|
|
3377
|
-
const $ = c(
|
|
4395
|
+
const $ = c(17);
|
|
3378
4396
|
const images = useImages();
|
|
3379
|
-
const
|
|
4397
|
+
const sde = useSde();
|
|
4398
|
+
const { fit, stats } = useShownSnapshot();
|
|
4399
|
+
let t0;
|
|
4400
|
+
if ($[0] !== stats.violations) {
|
|
4401
|
+
t0 = countViolations(stats.violations);
|
|
4402
|
+
$[0] = stats.violations;
|
|
4403
|
+
$[1] = t0;
|
|
4404
|
+
} else t0 = $[1];
|
|
4405
|
+
const counts = t0;
|
|
4406
|
+
const descriptionId = useId();
|
|
3380
4407
|
let t1;
|
|
3381
|
-
if ($[0] !== t0) {
|
|
3382
|
-
t1 = countViolations(t0);
|
|
3383
|
-
$[0] = t0;
|
|
3384
|
-
$[1] = t1;
|
|
3385
|
-
} else t1 = $[1];
|
|
3386
|
-
const counts = t1;
|
|
3387
4408
|
let t2;
|
|
3388
|
-
if ($[2] !==
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
4409
|
+
if ($[2] !== sde) {
|
|
4410
|
+
t1 = (id) => sde.type(id)?.name ?? `#${id}`;
|
|
4411
|
+
t2 = (id_0) => sde.group(id_0)?.name ?? `#${id_0}`;
|
|
4412
|
+
$[2] = sde;
|
|
4413
|
+
$[3] = t1;
|
|
4414
|
+
$[4] = t2;
|
|
4415
|
+
} else {
|
|
4416
|
+
t1 = $[3];
|
|
4417
|
+
t2 = $[4];
|
|
4418
|
+
}
|
|
4419
|
+
let t3;
|
|
4420
|
+
let t4;
|
|
4421
|
+
if ($[5] !== counts || $[6] !== descriptionId || $[7] !== fit || $[8] !== images || $[9] !== stats.violations || $[10] !== t1 || $[11] !== t2) {
|
|
4422
|
+
const names = {
|
|
4423
|
+
type: t1,
|
|
4424
|
+
group: t2
|
|
4425
|
+
};
|
|
4426
|
+
const linesOf = (kind) => {
|
|
4427
|
+
const violations = kind === "skill" ? missingSkills(stats.violations).map(_temp$4) : stats.violations.filter((t5) => {
|
|
4428
|
+
const { rule: rule_0 } = t5;
|
|
4429
|
+
return violationKind(rule_0) === kind;
|
|
4430
|
+
});
|
|
4431
|
+
return [...new Set(violations.map((violation) => violationText(violation, fit, names)))];
|
|
4432
|
+
};
|
|
4433
|
+
t3 = FittingWindow_module_default.violations;
|
|
4434
|
+
t4 = violationKinds.map((t6) => {
|
|
4435
|
+
const { kind: kind_0, label, title } = t6;
|
|
4436
|
+
const shown = counts[kind_0];
|
|
3392
4437
|
if (shown === 0) return null;
|
|
3393
|
-
const
|
|
4438
|
+
const lines = linesOf(kind_0);
|
|
4439
|
+
const textureStyle = { "--texture": `url(${images.uiTexture(kind_0 === "skill" ? "classes/fitting/warningskills" : "classes/fitting/warninggroup")})` };
|
|
3394
4440
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
3395
|
-
label:
|
|
3396
|
-
|
|
4441
|
+
label: /* @__PURE__ */ jsx("span", {
|
|
4442
|
+
className: FittingWindow_module_default.alert,
|
|
4443
|
+
"data-kind": kind_0,
|
|
4444
|
+
style: textureStyle,
|
|
4445
|
+
children: /* @__PURE__ */ jsx(TooltipText, {
|
|
4446
|
+
title: /* @__PURE__ */ jsx("span", {
|
|
4447
|
+
className: FittingWindow_module_default.alertTitle,
|
|
4448
|
+
children: title
|
|
4449
|
+
}),
|
|
4450
|
+
description: lines.map(_temp2$2)
|
|
4451
|
+
})
|
|
4452
|
+
}),
|
|
4453
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
3397
4454
|
className: FittingWindow_module_default.violation,
|
|
3398
4455
|
role: "img",
|
|
3399
4456
|
"aria-label": `${label}: ${shown}`,
|
|
3400
|
-
"
|
|
3401
|
-
|
|
3402
|
-
|
|
4457
|
+
"aria-describedby": `${descriptionId}-${kind_0}`,
|
|
4458
|
+
"data-kind": kind_0,
|
|
4459
|
+
style: textureStyle,
|
|
4460
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
3403
4461
|
className: FittingWindow_module_default.count,
|
|
3404
4462
|
children: shown
|
|
3405
|
-
})
|
|
4463
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
4464
|
+
id: `${descriptionId}-${kind_0}`,
|
|
4465
|
+
hidden: true,
|
|
4466
|
+
children: lines.join(", ")
|
|
4467
|
+
})]
|
|
3406
4468
|
})
|
|
3407
|
-
},
|
|
3408
|
-
});
|
|
3409
|
-
$[
|
|
3410
|
-
$[
|
|
3411
|
-
$[
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
4469
|
+
}, kind_0);
|
|
4470
|
+
});
|
|
4471
|
+
$[5] = counts;
|
|
4472
|
+
$[6] = descriptionId;
|
|
4473
|
+
$[7] = fit;
|
|
4474
|
+
$[8] = images;
|
|
4475
|
+
$[9] = stats.violations;
|
|
4476
|
+
$[10] = t1;
|
|
4477
|
+
$[11] = t2;
|
|
4478
|
+
$[12] = t3;
|
|
4479
|
+
$[13] = t4;
|
|
4480
|
+
} else {
|
|
4481
|
+
t3 = $[12];
|
|
4482
|
+
t4 = $[13];
|
|
4483
|
+
}
|
|
4484
|
+
let t5;
|
|
4485
|
+
if ($[14] !== t3 || $[15] !== t4) {
|
|
4486
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
4487
|
+
className: t3,
|
|
4488
|
+
children: t4
|
|
3418
4489
|
});
|
|
3419
|
-
$[
|
|
3420
|
-
$[
|
|
3421
|
-
|
|
3422
|
-
|
|
4490
|
+
$[14] = t3;
|
|
4491
|
+
$[15] = t4;
|
|
4492
|
+
$[16] = t5;
|
|
4493
|
+
} else t5 = $[16];
|
|
4494
|
+
return t5;
|
|
4495
|
+
}
|
|
4496
|
+
function _temp2$2(line) {
|
|
4497
|
+
return /* @__PURE__ */ jsx("span", {
|
|
4498
|
+
className: FittingWindow_module_default.alertLine,
|
|
4499
|
+
children: line
|
|
4500
|
+
}, line);
|
|
4501
|
+
}
|
|
4502
|
+
function _temp$4(rule) {
|
|
4503
|
+
return {
|
|
4504
|
+
target: { type: "ship" },
|
|
4505
|
+
rule
|
|
4506
|
+
};
|
|
3423
4507
|
}
|
|
3424
4508
|
function NotImplementedButton(t0) {
|
|
3425
4509
|
const $ = c(9);
|
|
@@ -3458,152 +4542,199 @@ function NotImplementedButton(t0) {
|
|
|
3458
4542
|
return t4;
|
|
3459
4543
|
}
|
|
3460
4544
|
function Bay(t0) {
|
|
3461
|
-
const $ = c(
|
|
3462
|
-
const { bay, icon, label } = t0;
|
|
4545
|
+
const $ = c(26);
|
|
4546
|
+
const { bay, icon, label, unlimited: t1, id: givenId } = t0;
|
|
4547
|
+
const unlimited = t1 === void 0 ? false : t1;
|
|
3463
4548
|
const { used, total } = useBayUsage(bay);
|
|
3464
|
-
const
|
|
3465
|
-
const
|
|
3466
|
-
let
|
|
4549
|
+
const ownId = useId();
|
|
4550
|
+
const id = givenId ?? ownId;
|
|
4551
|
+
let t2;
|
|
3467
4552
|
if ($[0] !== id) {
|
|
3468
|
-
|
|
3469
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3470
|
-
t2 = /[^\w-]/g;
|
|
3471
|
-
$[2] = t2;
|
|
3472
|
-
} else t2 = $[2];
|
|
3473
|
-
t1 = id.replace(t2, "");
|
|
4553
|
+
t2 = () => popover(id)?.showPopover();
|
|
3474
4554
|
$[0] = id;
|
|
3475
|
-
$[1] =
|
|
3476
|
-
} else
|
|
3477
|
-
const
|
|
4555
|
+
$[1] = t2;
|
|
4556
|
+
} else t2 = $[1];
|
|
4557
|
+
const drop = useBayDrop(bay, t2);
|
|
3478
4558
|
let t3;
|
|
3479
|
-
if ($[
|
|
3480
|
-
|
|
3481
|
-
$[
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
4559
|
+
if ($[2] !== id) {
|
|
4560
|
+
let t4;
|
|
4561
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4562
|
+
t4 = /[^\w-]/g;
|
|
4563
|
+
$[4] = t4;
|
|
4564
|
+
} else t4 = $[4];
|
|
4565
|
+
t3 = id.replace(t4, "");
|
|
4566
|
+
$[2] = id;
|
|
4567
|
+
$[3] = t3;
|
|
4568
|
+
} else t3 = $[3];
|
|
4569
|
+
const t4 = `--bay-${t3}`;
|
|
4570
|
+
let t5;
|
|
4571
|
+
if ($[5] !== t4) {
|
|
4572
|
+
t5 = { "--bay-anchor": t4 };
|
|
4573
|
+
$[5] = t4;
|
|
4574
|
+
$[6] = t5;
|
|
4575
|
+
} else t5 = $[6];
|
|
4576
|
+
const t6 = t5;
|
|
4577
|
+
const t7 = !unlimited && used > total || void 0;
|
|
4578
|
+
let t8;
|
|
4579
|
+
if ($[7] !== drop || $[8] !== icon || $[9] !== id || $[10] !== label || $[11] !== t7 || $[12] !== total || $[13] !== used) {
|
|
4580
|
+
t8 = /* @__PURE__ */ jsx(BayButton, {
|
|
4581
|
+
icon,
|
|
4582
|
+
used,
|
|
4583
|
+
total,
|
|
4584
|
+
"aria-label": label,
|
|
4585
|
+
popoverTarget: id,
|
|
4586
|
+
"data-over": t7,
|
|
4587
|
+
...drop
|
|
4588
|
+
});
|
|
4589
|
+
$[7] = drop;
|
|
4590
|
+
$[8] = icon;
|
|
4591
|
+
$[9] = id;
|
|
4592
|
+
$[10] = label;
|
|
4593
|
+
$[11] = t7;
|
|
4594
|
+
$[12] = total;
|
|
4595
|
+
$[13] = used;
|
|
4596
|
+
$[14] = t8;
|
|
4597
|
+
} else t8 = $[14];
|
|
4598
|
+
let t9;
|
|
4599
|
+
if ($[15] !== label || $[16] !== t8) {
|
|
4600
|
+
t9 = /* @__PURE__ */ jsx(Tooltip, {
|
|
4601
|
+
label,
|
|
4602
|
+
children: t8
|
|
4603
|
+
});
|
|
4604
|
+
$[15] = label;
|
|
4605
|
+
$[16] = t8;
|
|
4606
|
+
$[17] = t9;
|
|
4607
|
+
} else t9 = $[17];
|
|
4608
|
+
let t10;
|
|
4609
|
+
if ($[18] !== bay || $[19] !== id || $[20] !== label) {
|
|
4610
|
+
t10 = /* @__PURE__ */ jsx(BayContents, {
|
|
4611
|
+
id,
|
|
4612
|
+
bay,
|
|
4613
|
+
label
|
|
4614
|
+
});
|
|
4615
|
+
$[18] = bay;
|
|
4616
|
+
$[19] = id;
|
|
4617
|
+
$[20] = label;
|
|
4618
|
+
$[21] = t10;
|
|
4619
|
+
} else t10 = $[21];
|
|
4620
|
+
let t11;
|
|
4621
|
+
if ($[22] !== t10 || $[23] !== t6 || $[24] !== t9) {
|
|
4622
|
+
t11 = /* @__PURE__ */ jsxs("div", {
|
|
4623
|
+
className: FittingWindow_module_default.bayAnchor,
|
|
4624
|
+
style: t6,
|
|
4625
|
+
children: [t9, t10]
|
|
4626
|
+
});
|
|
4627
|
+
$[22] = t10;
|
|
4628
|
+
$[23] = t6;
|
|
4629
|
+
$[24] = t9;
|
|
4630
|
+
$[25] = t11;
|
|
4631
|
+
} else t11 = $[25];
|
|
4632
|
+
return t11;
|
|
4633
|
+
}
|
|
4634
|
+
function BayButton(t0) {
|
|
4635
|
+
const $ = c(22);
|
|
4636
|
+
let icon;
|
|
4637
|
+
let props;
|
|
4638
|
+
let total;
|
|
4639
|
+
let used;
|
|
4640
|
+
if ($[0] !== t0) {
|
|
4641
|
+
({icon, used, total, ...props} = t0);
|
|
4642
|
+
$[0] = t0;
|
|
4643
|
+
$[1] = icon;
|
|
4644
|
+
$[2] = props;
|
|
4645
|
+
$[3] = total;
|
|
4646
|
+
$[4] = used;
|
|
4647
|
+
} else {
|
|
4648
|
+
icon = $[1];
|
|
4649
|
+
props = $[2];
|
|
4650
|
+
total = $[3];
|
|
4651
|
+
used = $[4];
|
|
4652
|
+
}
|
|
4653
|
+
let t1;
|
|
3487
4654
|
if ($[5] !== icon) {
|
|
3488
|
-
|
|
4655
|
+
t1 = /* @__PURE__ */ jsx(Icon, { name: icon });
|
|
3489
4656
|
$[5] = icon;
|
|
3490
|
-
$[6] =
|
|
3491
|
-
} else
|
|
3492
|
-
let
|
|
4657
|
+
$[6] = t1;
|
|
4658
|
+
} else t1 = $[6];
|
|
4659
|
+
let t2;
|
|
3493
4660
|
if ($[7] !== used) {
|
|
3494
|
-
|
|
4661
|
+
t2 = oneDecimal.format(used);
|
|
3495
4662
|
$[7] = used;
|
|
3496
|
-
$[8] =
|
|
3497
|
-
} else
|
|
3498
|
-
let
|
|
3499
|
-
if ($[9] !==
|
|
3500
|
-
|
|
4663
|
+
$[8] = t2;
|
|
4664
|
+
} else t2 = $[8];
|
|
4665
|
+
let t3;
|
|
4666
|
+
if ($[9] !== t2) {
|
|
4667
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
3501
4668
|
className: FittingWindow_module_default.used,
|
|
3502
|
-
children:
|
|
4669
|
+
children: t2
|
|
3503
4670
|
});
|
|
3504
|
-
$[9] =
|
|
3505
|
-
$[10] =
|
|
3506
|
-
} else
|
|
3507
|
-
let
|
|
4671
|
+
$[9] = t2;
|
|
4672
|
+
$[10] = t3;
|
|
4673
|
+
} else t3 = $[10];
|
|
4674
|
+
let t4;
|
|
3508
4675
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3509
|
-
|
|
4676
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
3510
4677
|
className: FittingWindow_module_default.slash,
|
|
3511
4678
|
children: "/"
|
|
3512
4679
|
});
|
|
3513
|
-
$[11] =
|
|
3514
|
-
} else
|
|
3515
|
-
let
|
|
4680
|
+
$[11] = t4;
|
|
4681
|
+
} else t4 = $[11];
|
|
4682
|
+
let t5;
|
|
3516
4683
|
if ($[12] !== total) {
|
|
3517
|
-
|
|
4684
|
+
t5 = oneDecimal.format(total);
|
|
3518
4685
|
$[12] = total;
|
|
3519
|
-
$[13] =
|
|
3520
|
-
} else
|
|
3521
|
-
let
|
|
3522
|
-
if ($[14] !==
|
|
3523
|
-
|
|
4686
|
+
$[13] = t5;
|
|
4687
|
+
} else t5 = $[13];
|
|
4688
|
+
let t6;
|
|
4689
|
+
if ($[14] !== t5) {
|
|
4690
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
3524
4691
|
className: FittingWindow_module_default.total,
|
|
3525
|
-
children:
|
|
4692
|
+
children: t5
|
|
3526
4693
|
});
|
|
3527
|
-
$[14] =
|
|
3528
|
-
$[15] =
|
|
3529
|
-
} else
|
|
3530
|
-
let
|
|
4694
|
+
$[14] = t5;
|
|
4695
|
+
$[15] = t6;
|
|
4696
|
+
} else t6 = $[15];
|
|
4697
|
+
let t7;
|
|
3531
4698
|
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3532
|
-
|
|
4699
|
+
t7 = /* @__PURE__ */ jsx("span", {
|
|
3533
4700
|
className: FittingWindow_module_default.unit,
|
|
3534
4701
|
children: "m3"
|
|
3535
4702
|
});
|
|
3536
|
-
$[16] =
|
|
3537
|
-
} else
|
|
3538
|
-
let
|
|
3539
|
-
if ($[17] !==
|
|
3540
|
-
|
|
4703
|
+
$[16] = t7;
|
|
4704
|
+
} else t7 = $[16];
|
|
4705
|
+
let t8;
|
|
4706
|
+
if ($[17] !== props || $[18] !== t1 || $[19] !== t3 || $[20] !== t6) {
|
|
4707
|
+
t8 = /* @__PURE__ */ jsxs("button", {
|
|
3541
4708
|
type: "button",
|
|
3542
4709
|
className: FittingWindow_module_default.bay,
|
|
3543
|
-
|
|
3544
|
-
popoverTarget: id,
|
|
3545
|
-
"data-over": t5,
|
|
3546
|
-
...drop,
|
|
4710
|
+
...props,
|
|
3547
4711
|
children: [
|
|
4712
|
+
t1,
|
|
4713
|
+
t3,
|
|
4714
|
+
t4,
|
|
3548
4715
|
t6,
|
|
3549
|
-
|
|
3550
|
-
t9,
|
|
3551
|
-
t11,
|
|
3552
|
-
t12
|
|
4716
|
+
t7
|
|
3553
4717
|
]
|
|
3554
4718
|
});
|
|
3555
|
-
$[17] =
|
|
3556
|
-
$[18] =
|
|
3557
|
-
$[19] =
|
|
3558
|
-
$[20] =
|
|
3559
|
-
$[21] =
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
$[24] = t13;
|
|
3563
|
-
} else t13 = $[24];
|
|
3564
|
-
let t14;
|
|
3565
|
-
if ($[25] !== label || $[26] !== t13) {
|
|
3566
|
-
t14 = /* @__PURE__ */ jsx(Tooltip, {
|
|
3567
|
-
label,
|
|
3568
|
-
children: t13
|
|
3569
|
-
});
|
|
3570
|
-
$[25] = label;
|
|
3571
|
-
$[26] = t13;
|
|
3572
|
-
$[27] = t14;
|
|
3573
|
-
} else t14 = $[27];
|
|
3574
|
-
let t15;
|
|
3575
|
-
if ($[28] !== bay || $[29] !== id || $[30] !== label) {
|
|
3576
|
-
t15 = /* @__PURE__ */ jsx(BayContents, {
|
|
3577
|
-
id,
|
|
3578
|
-
bay,
|
|
3579
|
-
label
|
|
3580
|
-
});
|
|
3581
|
-
$[28] = bay;
|
|
3582
|
-
$[29] = id;
|
|
3583
|
-
$[30] = label;
|
|
3584
|
-
$[31] = t15;
|
|
3585
|
-
} else t15 = $[31];
|
|
3586
|
-
let t16;
|
|
3587
|
-
if ($[32] !== t14 || $[33] !== t15 || $[34] !== t4) {
|
|
3588
|
-
t16 = /* @__PURE__ */ jsxs("div", {
|
|
3589
|
-
className: FittingWindow_module_default.bayAnchor,
|
|
3590
|
-
style: t4,
|
|
3591
|
-
children: [t14, t15]
|
|
3592
|
-
});
|
|
3593
|
-
$[32] = t14;
|
|
3594
|
-
$[33] = t15;
|
|
3595
|
-
$[34] = t4;
|
|
3596
|
-
$[35] = t16;
|
|
3597
|
-
} else t16 = $[35];
|
|
3598
|
-
return t16;
|
|
4719
|
+
$[17] = props;
|
|
4720
|
+
$[18] = t1;
|
|
4721
|
+
$[19] = t3;
|
|
4722
|
+
$[20] = t6;
|
|
4723
|
+
$[21] = t8;
|
|
4724
|
+
} else t8 = $[21];
|
|
4725
|
+
return t8;
|
|
3599
4726
|
}
|
|
3600
4727
|
const baySlots = {
|
|
3601
4728
|
cargo: { type: "cargo" },
|
|
3602
|
-
droneBay: { type: "drone_bay" }
|
|
4729
|
+
droneBay: { type: "drone_bay" },
|
|
4730
|
+
fighterBay: { type: "fighter_bay" }
|
|
3603
4731
|
};
|
|
3604
|
-
/**
|
|
3605
|
-
|
|
3606
|
-
|
|
4732
|
+
/**
|
|
4733
|
+
* Puts a type dragged onto a bay in it: anything in the cargo, drones in the
|
|
4734
|
+
* drone bay, fighters in the fighter bay; `open` shows the fighter tubes to drop on.
|
|
4735
|
+
*/
|
|
4736
|
+
function useBayDrop(bay, open) {
|
|
4737
|
+
const $ = c(32);
|
|
3607
4738
|
const store = useFitStore();
|
|
3608
4739
|
const sde = useSde();
|
|
3609
4740
|
const placement = usePlacement();
|
|
@@ -3613,52 +4744,57 @@ function useBayDrop(bay) {
|
|
|
3613
4744
|
const slot = baySlots[bay];
|
|
3614
4745
|
let t0;
|
|
3615
4746
|
let type;
|
|
3616
|
-
if ($[0] !== bay || $[1] !== canFit || $[2] !== dragging || $[3] !== placement || $[4] !== sde) {
|
|
4747
|
+
if ($[0] !== bay || $[1] !== canFit || $[2] !== dragging || $[3] !== placement || $[4] !== sde || $[5] !== slot) {
|
|
3617
4748
|
type = dragging?.type === "type" ? sde.type(dragging.typeId) : void 0;
|
|
3618
|
-
t0 = type !== void 0 && (bay === "cargo" ? placement(type) !== void 0 : placement(type)?.type ===
|
|
4749
|
+
t0 = type !== void 0 && (bay === "cargo" ? placement(type) !== void 0 : placement(type)?.type === slot.type && canFit(type));
|
|
3619
4750
|
$[0] = bay;
|
|
3620
4751
|
$[1] = canFit;
|
|
3621
4752
|
$[2] = dragging;
|
|
3622
4753
|
$[3] = placement;
|
|
3623
4754
|
$[4] = sde;
|
|
3624
|
-
$[5] =
|
|
3625
|
-
$[6] =
|
|
4755
|
+
$[5] = slot;
|
|
4756
|
+
$[6] = t0;
|
|
4757
|
+
$[7] = type;
|
|
3626
4758
|
} else {
|
|
3627
|
-
t0 = $[
|
|
3628
|
-
type = $[
|
|
4759
|
+
t0 = $[6];
|
|
4760
|
+
type = $[7];
|
|
3629
4761
|
}
|
|
3630
4762
|
const taken = t0 ? type : void 0;
|
|
3631
4763
|
const target = `bay-${bay}`;
|
|
3632
4764
|
let t1;
|
|
3633
|
-
if ($[
|
|
4765
|
+
if ($[8] !== bay || $[9] !== open || $[10] !== show || $[11] !== slot || $[12] !== taken || $[13] !== target) {
|
|
3634
4766
|
t1 = () => {
|
|
3635
|
-
if (taken)
|
|
4767
|
+
if (!taken) return;
|
|
4768
|
+
show((draft) => void draft.fit(taken.id, slot), target);
|
|
4769
|
+
if (bay === "fighterBay") open();
|
|
3636
4770
|
};
|
|
3637
|
-
$[
|
|
3638
|
-
$[
|
|
3639
|
-
$[
|
|
3640
|
-
$[
|
|
3641
|
-
$[
|
|
3642
|
-
|
|
4771
|
+
$[8] = bay;
|
|
4772
|
+
$[9] = open;
|
|
4773
|
+
$[10] = show;
|
|
4774
|
+
$[11] = slot;
|
|
4775
|
+
$[12] = taken;
|
|
4776
|
+
$[13] = target;
|
|
4777
|
+
$[14] = t1;
|
|
4778
|
+
} else t1 = $[14];
|
|
3643
4779
|
let t2;
|
|
3644
|
-
if ($[
|
|
4780
|
+
if ($[15] !== clear || $[16] !== target) {
|
|
3645
4781
|
t2 = () => clear(target);
|
|
3646
|
-
$[
|
|
3647
|
-
$[
|
|
3648
|
-
$[
|
|
3649
|
-
} else t2 = $[
|
|
4782
|
+
$[15] = clear;
|
|
4783
|
+
$[16] = target;
|
|
4784
|
+
$[17] = t2;
|
|
4785
|
+
} else t2 = $[17];
|
|
3650
4786
|
let t3;
|
|
3651
|
-
if ($[
|
|
4787
|
+
if ($[18] !== taken) {
|
|
3652
4788
|
t3 = (event) => {
|
|
3653
4789
|
if (!taken) return;
|
|
3654
4790
|
event.preventDefault();
|
|
3655
4791
|
event.dataTransfer.dropEffect = "copy";
|
|
3656
4792
|
};
|
|
3657
|
-
$[
|
|
3658
|
-
$[
|
|
3659
|
-
} else t3 = $[
|
|
4793
|
+
$[18] = taken;
|
|
4794
|
+
$[19] = t3;
|
|
4795
|
+
} else t3 = $[19];
|
|
3660
4796
|
let t4;
|
|
3661
|
-
if ($[
|
|
4797
|
+
if ($[20] !== clear || $[21] !== end || $[22] !== slot || $[23] !== store || $[24] !== taken || $[25] !== target) {
|
|
3662
4798
|
t4 = (event_0) => {
|
|
3663
4799
|
if (!taken) return;
|
|
3664
4800
|
event_0.preventDefault();
|
|
@@ -3666,28 +4802,28 @@ function useBayDrop(bay) {
|
|
|
3666
4802
|
store.fit(taken.id, slot);
|
|
3667
4803
|
end();
|
|
3668
4804
|
};
|
|
3669
|
-
$[
|
|
3670
|
-
$[
|
|
3671
|
-
$[
|
|
3672
|
-
$[
|
|
3673
|
-
$[
|
|
3674
|
-
$[
|
|
3675
|
-
$[
|
|
3676
|
-
} else t4 = $[
|
|
4805
|
+
$[20] = clear;
|
|
4806
|
+
$[21] = end;
|
|
4807
|
+
$[22] = slot;
|
|
4808
|
+
$[23] = store;
|
|
4809
|
+
$[24] = taken;
|
|
4810
|
+
$[25] = target;
|
|
4811
|
+
$[26] = t4;
|
|
4812
|
+
} else t4 = $[26];
|
|
3677
4813
|
let t5;
|
|
3678
|
-
if ($[
|
|
4814
|
+
if ($[27] !== t1 || $[28] !== t2 || $[29] !== t3 || $[30] !== t4) {
|
|
3679
4815
|
t5 = {
|
|
3680
4816
|
onDragEnter: t1,
|
|
3681
4817
|
onDragLeave: t2,
|
|
3682
4818
|
onDragOver: t3,
|
|
3683
4819
|
onDrop: t4
|
|
3684
4820
|
};
|
|
3685
|
-
$[
|
|
3686
|
-
$[
|
|
3687
|
-
$[
|
|
3688
|
-
$[
|
|
3689
|
-
$[
|
|
3690
|
-
} else t5 = $[
|
|
4821
|
+
$[27] = t1;
|
|
4822
|
+
$[28] = t2;
|
|
4823
|
+
$[29] = t3;
|
|
4824
|
+
$[30] = t4;
|
|
4825
|
+
$[31] = t5;
|
|
4826
|
+
} else t5 = $[31];
|
|
3691
4827
|
return t5;
|
|
3692
4828
|
}
|
|
3693
4829
|
function Resource(t0) {
|
|
@@ -3771,23 +4907,67 @@ function Resource(t0) {
|
|
|
3771
4907
|
} else t10 = $[20];
|
|
3772
4908
|
return t10;
|
|
3773
4909
|
}
|
|
3774
|
-
function
|
|
4910
|
+
function ServiceRack() {
|
|
4911
|
+
const $ = c(3);
|
|
4912
|
+
const slots = useSlots("service");
|
|
4913
|
+
const { total } = useRackUsage("service");
|
|
4914
|
+
let t0;
|
|
4915
|
+
if ($[0] !== slots || $[1] !== total) {
|
|
4916
|
+
t0 = /* @__PURE__ */ jsx("div", {
|
|
4917
|
+
className: FittingWindow_module_default.services,
|
|
4918
|
+
role: "group",
|
|
4919
|
+
"aria-label": "Structure Services",
|
|
4920
|
+
children: Array.from({ length: SERVICE_SLOTS }, (_, index) => /* @__PURE__ */ jsx(FittingServiceSlot, {
|
|
4921
|
+
index,
|
|
4922
|
+
available: index < total,
|
|
4923
|
+
content: slots[index]
|
|
4924
|
+
}, index))
|
|
4925
|
+
});
|
|
4926
|
+
$[0] = slots;
|
|
4927
|
+
$[1] = total;
|
|
4928
|
+
$[2] = t0;
|
|
4929
|
+
} else t0 = $[2];
|
|
4930
|
+
return t0;
|
|
4931
|
+
}
|
|
4932
|
+
function FittingServiceSlot(t0) {
|
|
3775
4933
|
const $ = c(4);
|
|
4934
|
+
const { index, available, content } = t0;
|
|
4935
|
+
const t1 = useFittingSlot("service", index, content, available);
|
|
4936
|
+
let slot;
|
|
4937
|
+
if ($[0] !== t1) {
|
|
4938
|
+
const { chargeTypeId, chargeable, activatable, onRemoveCharge, ...t2 } = t1;
|
|
4939
|
+
slot = t2;
|
|
4940
|
+
$[0] = t1;
|
|
4941
|
+
$[1] = slot;
|
|
4942
|
+
} else slot = $[1];
|
|
4943
|
+
let t2;
|
|
4944
|
+
if ($[2] !== slot) {
|
|
4945
|
+
t2 = /* @__PURE__ */ jsx(ServiceSlot, { ...slot });
|
|
4946
|
+
$[2] = slot;
|
|
4947
|
+
$[3] = t2;
|
|
4948
|
+
} else t2 = $[3];
|
|
4949
|
+
return t2;
|
|
4950
|
+
}
|
|
4951
|
+
function SimulationHistory(t0) {
|
|
4952
|
+
const $ = c(5);
|
|
4953
|
+
const { tooltipTitle } = t0;
|
|
3776
4954
|
const history = useFitHistory();
|
|
3777
|
-
let
|
|
3778
|
-
if ($[0] !== history.goTo || $[1] !== history.length || $[2] !== history.position) {
|
|
3779
|
-
|
|
4955
|
+
let t1;
|
|
4956
|
+
if ($[0] !== history.goTo || $[1] !== history.length || $[2] !== history.position || $[3] !== tooltipTitle) {
|
|
4957
|
+
t1 = /* @__PURE__ */ jsx(HistoryBar, {
|
|
3780
4958
|
label: "Simulation History",
|
|
3781
4959
|
length: history.length,
|
|
3782
4960
|
position: history.position,
|
|
3783
|
-
onGoTo: history.goTo
|
|
4961
|
+
onGoTo: history.goTo,
|
|
4962
|
+
tooltipTitle
|
|
3784
4963
|
});
|
|
3785
4964
|
$[0] = history.goTo;
|
|
3786
4965
|
$[1] = history.length;
|
|
3787
4966
|
$[2] = history.position;
|
|
3788
|
-
$[3] =
|
|
3789
|
-
|
|
3790
|
-
|
|
4967
|
+
$[3] = tooltipTitle;
|
|
4968
|
+
$[4] = t1;
|
|
4969
|
+
} else t1 = $[4];
|
|
4970
|
+
return t1;
|
|
3791
4971
|
}
|
|
3792
4972
|
//#endregion
|
|
3793
4973
|
//#region src/components/ItemBrowser/ItemBrowser.module.css
|
|
@@ -4424,12 +5604,13 @@ const noFits = [];
|
|
|
4424
5604
|
const SHIPS_MARKET_GROUP_ID = 4;
|
|
4425
5605
|
/** The Hulls & Fits tab of the `ItemBrowser`: EVE's hulls by group and race, with the fits saved for each. */
|
|
4426
5606
|
function HullsAndFits() {
|
|
4427
|
-
const $ = c(
|
|
5607
|
+
const $ = c(65);
|
|
4428
5608
|
const currentShipId = useFit().ship.type_id;
|
|
4429
5609
|
const images = useImages();
|
|
4430
5610
|
const store = useFitStore();
|
|
4431
5611
|
const missingSkills = useMissingSkills();
|
|
4432
5612
|
const { fits } = useLocalFits();
|
|
5613
|
+
const { start, end } = useDrag();
|
|
4433
5614
|
const [search, setSearch] = useState("");
|
|
4434
5615
|
const [browserFits, setBrowserFits] = useState(false);
|
|
4435
5616
|
const [currentHull, setCurrentHull] = useState(false);
|
|
@@ -4602,9 +5783,9 @@ function HullsAndFits() {
|
|
|
4602
5783
|
$[40] = t15;
|
|
4603
5784
|
} else t15 = $[40];
|
|
4604
5785
|
let t16;
|
|
4605
|
-
if ($[41] !==
|
|
5786
|
+
if ($[41] !== end || $[42] !== fitsByHull || $[43] !== groups || $[44] !== images || $[45] !== shownFits || $[46] !== simulate || $[47] !== start || $[48] !== store) {
|
|
4606
5787
|
let t17;
|
|
4607
|
-
if ($[
|
|
5788
|
+
if ($[50] !== end || $[51] !== fitsByHull || $[52] !== images || $[53] !== shownFits || $[54] !== simulate || $[55] !== start || $[56] !== store) {
|
|
4608
5789
|
t17 = (t18) => {
|
|
4609
5790
|
const { group, races } = t18;
|
|
4610
5791
|
return /* @__PURE__ */ jsx(TreeGroup, {
|
|
@@ -4634,6 +5815,15 @@ function HullsAndFits() {
|
|
|
4634
5815
|
description: shown_0.length > 0 ? /* @__PURE__ */ jsx(Counts, { browserFits: fitsByHull.get(ship_1.id)?.length ?? 0 }) : void 0,
|
|
4635
5816
|
typeId: ship_1.id,
|
|
4636
5817
|
after: simulateShip,
|
|
5818
|
+
onDragStart: (event) => {
|
|
5819
|
+
event.dataTransfer.effectAllowed = "copy";
|
|
5820
|
+
event.dataTransfer.setData("text/plain", ship_1.name);
|
|
5821
|
+
start({
|
|
5822
|
+
type: "hull",
|
|
5823
|
+
typeId: ship_1.id
|
|
5824
|
+
});
|
|
5825
|
+
},
|
|
5826
|
+
onDragEnd: end,
|
|
4637
5827
|
children: () => shown_0.length === 0 ? /* @__PURE__ */ jsx(TreeLeaf, { label: "No Item" }) : shown_0.map((saved_1) => /* @__PURE__ */ jsx(TreeLeaf, {
|
|
4638
5828
|
label: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
4639
5829
|
className: ItemBrowser_module_default.kind,
|
|
@@ -4648,24 +5838,28 @@ function HullsAndFits() {
|
|
|
4648
5838
|
})
|
|
4649
5839
|
}, group.id);
|
|
4650
5840
|
};
|
|
4651
|
-
$[
|
|
4652
|
-
$[
|
|
4653
|
-
$[
|
|
4654
|
-
$[
|
|
4655
|
-
$[
|
|
4656
|
-
$[
|
|
4657
|
-
|
|
5841
|
+
$[50] = end;
|
|
5842
|
+
$[51] = fitsByHull;
|
|
5843
|
+
$[52] = images;
|
|
5844
|
+
$[53] = shownFits;
|
|
5845
|
+
$[54] = simulate;
|
|
5846
|
+
$[55] = start;
|
|
5847
|
+
$[56] = store;
|
|
5848
|
+
$[57] = t17;
|
|
5849
|
+
} else t17 = $[57];
|
|
4658
5850
|
t16 = groups.map(t17);
|
|
4659
|
-
$[41] =
|
|
4660
|
-
$[42] =
|
|
4661
|
-
$[43] =
|
|
4662
|
-
$[44] =
|
|
4663
|
-
$[45] =
|
|
4664
|
-
$[46] =
|
|
4665
|
-
$[47] =
|
|
4666
|
-
|
|
5851
|
+
$[41] = end;
|
|
5852
|
+
$[42] = fitsByHull;
|
|
5853
|
+
$[43] = groups;
|
|
5854
|
+
$[44] = images;
|
|
5855
|
+
$[45] = shownFits;
|
|
5856
|
+
$[46] = simulate;
|
|
5857
|
+
$[47] = start;
|
|
5858
|
+
$[48] = store;
|
|
5859
|
+
$[49] = t16;
|
|
5860
|
+
} else t16 = $[49];
|
|
4667
5861
|
let t17;
|
|
4668
|
-
if ($[
|
|
5862
|
+
if ($[58] !== collapses || $[59] !== t16) {
|
|
4669
5863
|
t17 = /* @__PURE__ */ jsx("div", {
|
|
4670
5864
|
className: ItemBrowser_module_default.tree,
|
|
4671
5865
|
children: /* @__PURE__ */ jsx(TreeList, {
|
|
@@ -4673,22 +5867,22 @@ function HullsAndFits() {
|
|
|
4673
5867
|
children: t16
|
|
4674
5868
|
}, collapses)
|
|
4675
5869
|
});
|
|
4676
|
-
$[
|
|
4677
|
-
$[
|
|
4678
|
-
$[
|
|
4679
|
-
} else t17 = $[
|
|
5870
|
+
$[58] = collapses;
|
|
5871
|
+
$[59] = t16;
|
|
5872
|
+
$[60] = t17;
|
|
5873
|
+
} else t17 = $[60];
|
|
4680
5874
|
let t18;
|
|
4681
|
-
if ($[
|
|
5875
|
+
if ($[61] !== t15 || $[62] !== t17 || $[63] !== t7) {
|
|
4682
5876
|
t18 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4683
5877
|
t7,
|
|
4684
5878
|
t15,
|
|
4685
5879
|
t17
|
|
4686
5880
|
] });
|
|
4687
|
-
$[
|
|
4688
|
-
$[
|
|
4689
|
-
$[
|
|
4690
|
-
$[
|
|
4691
|
-
} else t18 = $[
|
|
5881
|
+
$[61] = t15;
|
|
5882
|
+
$[62] = t17;
|
|
5883
|
+
$[63] = t7;
|
|
5884
|
+
$[64] = t18;
|
|
5885
|
+
} else t18 = $[64];
|
|
4692
5886
|
return t18;
|
|
4693
5887
|
}
|
|
4694
5888
|
function _temp$3(saved) {
|
|
@@ -5166,8 +6360,10 @@ var ShipStatistics_module_default = {
|
|
|
5166
6360
|
"bad": "lebA7G_bad",
|
|
5167
6361
|
"capacitor": "lebA7G_capacitor",
|
|
5168
6362
|
"defense": "lebA7G_defense",
|
|
6363
|
+
"fighters": "lebA7G_fighters",
|
|
5169
6364
|
"good": "lebA7G_good",
|
|
5170
6365
|
"lines": "lebA7G_lines",
|
|
6366
|
+
"manage": "lebA7G_manage",
|
|
5171
6367
|
"menu": "lebA7G_menu",
|
|
5172
6368
|
"picker": "lebA7G_picker",
|
|
5173
6369
|
"price": "lebA7G_price",
|
|
@@ -5199,13 +6395,28 @@ function AttributeText(t0) {
|
|
|
5199
6395
|
function unit(suffix, divisor = 1) {
|
|
5200
6396
|
return (value, format) => `${formatNumber(value / divisor, format)}${suffix}`;
|
|
5201
6397
|
}
|
|
6398
|
+
/** Like EVE's "0.11B hp": in billions above 100 million, in millions above 100 thousand. */
|
|
6399
|
+
function hitpoints(value, format) {
|
|
6400
|
+
const short = {
|
|
6401
|
+
...format,
|
|
6402
|
+
decimals: 2,
|
|
6403
|
+
fixed: true,
|
|
6404
|
+
rounding: "nearest"
|
|
6405
|
+
};
|
|
6406
|
+
if (value > 1e8) return unit("B hp", 1e9)(value, short);
|
|
6407
|
+
if (value > 1e5) return unit("M hp", 1e6)(value, short);
|
|
6408
|
+
return unit(" hp")(value, format);
|
|
6409
|
+
}
|
|
5202
6410
|
//#endregion
|
|
5203
6411
|
//#region src/components/ShipStatistics/CapacitorStats.tsx
|
|
5204
6412
|
function CapacitorStats() {
|
|
5205
6413
|
const $ = c(37);
|
|
5206
6414
|
let t0;
|
|
5207
6415
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5208
|
-
t0 = {
|
|
6416
|
+
t0 = {
|
|
6417
|
+
rounding: "down",
|
|
6418
|
+
format: _temp$1
|
|
6419
|
+
};
|
|
5209
6420
|
$[0] = t0;
|
|
5210
6421
|
} else t0 = $[0];
|
|
5211
6422
|
const depletesIn = useAttribute("capacitorDepletesIn", t0);
|
|
@@ -5215,6 +6426,7 @@ function CapacitorStats() {
|
|
|
5215
6426
|
decimals: 1,
|
|
5216
6427
|
fixed: true,
|
|
5217
6428
|
grouping: false,
|
|
6429
|
+
rounding: "down",
|
|
5218
6430
|
format: unit(" GJ")
|
|
5219
6431
|
};
|
|
5220
6432
|
$[1] = t1;
|
|
@@ -5222,7 +6434,10 @@ function CapacitorStats() {
|
|
|
5222
6434
|
const capacity = useAttribute("capacitorCapacity", t1);
|
|
5223
6435
|
let t2;
|
|
5224
6436
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5225
|
-
t2 = {
|
|
6437
|
+
t2 = {
|
|
6438
|
+
rounding: "down",
|
|
6439
|
+
format: _temp2
|
|
6440
|
+
};
|
|
5226
6441
|
$[2] = t2;
|
|
5227
6442
|
} else t2 = $[2];
|
|
5228
6443
|
const rechargeTime = useAttribute("rechargeRate", t2);
|
|
@@ -5420,6 +6635,7 @@ function RepairRate() {
|
|
|
5420
6635
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5421
6636
|
t0 = {
|
|
5422
6637
|
decimals: 0,
|
|
6638
|
+
rounding: "down",
|
|
5423
6639
|
format: unit(" hp/s")
|
|
5424
6640
|
};
|
|
5425
6641
|
$[0] = t0;
|
|
@@ -5572,7 +6788,10 @@ function Resistance(t0) {
|
|
|
5572
6788
|
const { layer, damage } = t0;
|
|
5573
6789
|
let t1;
|
|
5574
6790
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5575
|
-
t1 = {
|
|
6791
|
+
t1 = {
|
|
6792
|
+
decimals: 0,
|
|
6793
|
+
rounding: "up"
|
|
6794
|
+
};
|
|
5576
6795
|
$[0] = t1;
|
|
5577
6796
|
} else t1 = $[0];
|
|
5578
6797
|
const resonance = useAttribute(resonances[layer][damage], t1);
|
|
@@ -5602,158 +6821,208 @@ function Resistance(t0) {
|
|
|
5602
6821
|
}
|
|
5603
6822
|
//#endregion
|
|
5604
6823
|
//#region src/components/ShipStatistics/DefenseStats.tsx
|
|
5605
|
-
const hitpoints = {
|
|
5606
|
-
decimals: 0,
|
|
5607
|
-
format: unit(" hp")
|
|
5608
|
-
};
|
|
5609
6824
|
function DefenseStats() {
|
|
5610
|
-
const $ = c(
|
|
6825
|
+
const $ = c(42);
|
|
5611
6826
|
let t0;
|
|
5612
6827
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5613
6828
|
t0 = {
|
|
5614
6829
|
decimals: 0,
|
|
6830
|
+
rounding: "down",
|
|
5615
6831
|
format: unit(" ehp")
|
|
5616
6832
|
};
|
|
5617
6833
|
$[0] = t0;
|
|
5618
6834
|
} else t0 = $[0];
|
|
5619
6835
|
const ehp = useAttribute("ehp", t0);
|
|
5620
|
-
const shield = useAttribute("shieldCapacity", hitpoints);
|
|
5621
6836
|
let t1;
|
|
5622
6837
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5623
|
-
t1 = {
|
|
6838
|
+
t1 = {
|
|
6839
|
+
decimals: 0,
|
|
6840
|
+
rounding: "down",
|
|
6841
|
+
format: hitpoints
|
|
6842
|
+
};
|
|
5624
6843
|
$[1] = t1;
|
|
5625
6844
|
} else t1 = $[1];
|
|
5626
|
-
const
|
|
5627
|
-
const armor = useAttribute("armorHP", hitpoints);
|
|
5628
|
-
const structure = useAttribute("hp", hitpoints);
|
|
6845
|
+
const shield = useAttribute("shieldCapacity", t1);
|
|
5629
6846
|
let t2;
|
|
5630
|
-
if ($[2]
|
|
5631
|
-
t2 =
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
6847
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6848
|
+
t2 = {
|
|
6849
|
+
decimals: 0,
|
|
6850
|
+
rounding: "down"
|
|
6851
|
+
};
|
|
6852
|
+
$[2] = t2;
|
|
6853
|
+
} else t2 = $[2];
|
|
6854
|
+
const shieldRecharge = useAttribute("shieldRechargeRate", t2);
|
|
5635
6855
|
let t3;
|
|
6856
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6857
|
+
t3 = {
|
|
6858
|
+
decimals: 0,
|
|
6859
|
+
rounding: "down",
|
|
6860
|
+
format: hitpoints
|
|
6861
|
+
};
|
|
6862
|
+
$[3] = t3;
|
|
6863
|
+
} else t3 = $[3];
|
|
6864
|
+
const armor = useAttribute("armorHP", t3);
|
|
5636
6865
|
let t4;
|
|
5637
6866
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
6867
|
+
t4 = {
|
|
6868
|
+
decimals: 0,
|
|
6869
|
+
rounding: "down",
|
|
6870
|
+
format: hitpoints
|
|
6871
|
+
};
|
|
6872
|
+
$[4] = t4;
|
|
6873
|
+
} else t4 = $[4];
|
|
6874
|
+
const structure = useAttribute("hp", t4);
|
|
6875
|
+
const recharges = !useSnapshot().stats.structure;
|
|
5646
6876
|
let t5;
|
|
5647
|
-
if ($[
|
|
5648
|
-
t5 = /* @__PURE__ */
|
|
6877
|
+
if ($[5] !== ehp) {
|
|
6878
|
+
t5 = /* @__PURE__ */ jsx(AttributeText, { value: ehp });
|
|
6879
|
+
$[5] = ehp;
|
|
5649
6880
|
$[6] = t5;
|
|
5650
6881
|
} else t5 = $[6];
|
|
5651
6882
|
let t6;
|
|
5652
|
-
if ($[7] !== shield) {
|
|
5653
|
-
t6 = /* @__PURE__ */ jsx(AttributeText, { value: shield });
|
|
5654
|
-
$[7] = shield;
|
|
5655
|
-
$[8] = t6;
|
|
5656
|
-
} else t6 = $[8];
|
|
5657
6883
|
let t7;
|
|
5658
|
-
if ($[
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
$[
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
tooltip: t5,
|
|
5669
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
5670
|
-
className: ShipStatistics_module_default.lines,
|
|
5671
|
-
children: [t6, t7]
|
|
5672
|
-
})
|
|
5673
|
-
});
|
|
5674
|
-
$[11] = t6;
|
|
5675
|
-
$[12] = t7;
|
|
5676
|
-
$[13] = t8;
|
|
5677
|
-
} else t8 = $[13];
|
|
6884
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6885
|
+
t6 = /* @__PURE__ */ jsx(RepairRate, {});
|
|
6886
|
+
t7 = damageTypes.map(_temp);
|
|
6887
|
+
$[7] = t6;
|
|
6888
|
+
$[8] = t7;
|
|
6889
|
+
} else {
|
|
6890
|
+
t6 = $[7];
|
|
6891
|
+
t7 = $[8];
|
|
6892
|
+
}
|
|
6893
|
+
const t8 = recharges ? "Shield Hitpoints / Recharge Time" : "Shield Hitpoints";
|
|
5678
6894
|
let t9;
|
|
5679
|
-
if ($[
|
|
5680
|
-
t9 = /* @__PURE__ */ jsx(
|
|
5681
|
-
$[
|
|
5682
|
-
} else t9 = $[
|
|
6895
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6896
|
+
t9 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "shieldCapacity" });
|
|
6897
|
+
$[9] = t9;
|
|
6898
|
+
} else t9 = $[9];
|
|
5683
6899
|
let t10;
|
|
5684
|
-
if ($[
|
|
5685
|
-
t10 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "
|
|
5686
|
-
$[
|
|
5687
|
-
|
|
6900
|
+
if ($[10] !== recharges) {
|
|
6901
|
+
t10 = recharges && /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "shieldRechargeRate" });
|
|
6902
|
+
$[10] = recharges;
|
|
6903
|
+
$[11] = t10;
|
|
6904
|
+
} else t10 = $[11];
|
|
5688
6905
|
let t11;
|
|
5689
|
-
if ($[
|
|
5690
|
-
t11 = /* @__PURE__ */
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
children: /* @__PURE__ */ jsx(AttributeText, { value: armor })
|
|
5695
|
-
});
|
|
5696
|
-
$[16] = armor;
|
|
5697
|
-
$[17] = t11;
|
|
5698
|
-
} else t11 = $[17];
|
|
6906
|
+
if ($[12] !== t10) {
|
|
6907
|
+
t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t9, t10] });
|
|
6908
|
+
$[12] = t10;
|
|
6909
|
+
$[13] = t11;
|
|
6910
|
+
} else t11 = $[13];
|
|
5699
6911
|
let t12;
|
|
5700
|
-
if ($[
|
|
5701
|
-
t12 = /* @__PURE__ */ jsx(
|
|
5702
|
-
$[
|
|
5703
|
-
|
|
6912
|
+
if ($[14] !== shield) {
|
|
6913
|
+
t12 = /* @__PURE__ */ jsx(AttributeText, { value: shield });
|
|
6914
|
+
$[14] = shield;
|
|
6915
|
+
$[15] = t12;
|
|
6916
|
+
} else t12 = $[15];
|
|
5704
6917
|
let t13;
|
|
5705
|
-
if ($[
|
|
5706
|
-
t13 = /* @__PURE__ */ jsx(
|
|
5707
|
-
$[
|
|
5708
|
-
|
|
6918
|
+
if ($[16] !== recharges || $[17] !== shieldRecharge) {
|
|
6919
|
+
t13 = recharges && /* @__PURE__ */ jsx(AttributeText, { value: shieldRecharge });
|
|
6920
|
+
$[16] = recharges;
|
|
6921
|
+
$[17] = shieldRecharge;
|
|
6922
|
+
$[18] = t13;
|
|
6923
|
+
} else t13 = $[18];
|
|
5709
6924
|
let t14;
|
|
5710
|
-
if ($[20] !==
|
|
5711
|
-
t14 = /* @__PURE__ */
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
tooltip: t13,
|
|
5715
|
-
children: /* @__PURE__ */ jsx(AttributeText, { value: structure })
|
|
6925
|
+
if ($[19] !== t12 || $[20] !== t13) {
|
|
6926
|
+
t14 = /* @__PURE__ */ jsxs("span", {
|
|
6927
|
+
className: ShipStatistics_module_default.lines,
|
|
6928
|
+
children: [t12, t13]
|
|
5716
6929
|
});
|
|
5717
|
-
$[
|
|
6930
|
+
$[19] = t12;
|
|
6931
|
+
$[20] = t13;
|
|
5718
6932
|
$[21] = t14;
|
|
5719
6933
|
} else t14 = $[21];
|
|
5720
6934
|
let t15;
|
|
5721
|
-
if ($[22]
|
|
5722
|
-
t15 = /* @__PURE__ */ jsx(
|
|
5723
|
-
|
|
5724
|
-
|
|
6935
|
+
if ($[22] !== t11 || $[23] !== t14 || $[24] !== t8) {
|
|
6936
|
+
t15 = /* @__PURE__ */ jsx(Stat, {
|
|
6937
|
+
icon: "stat-shield-hp",
|
|
6938
|
+
label: t8,
|
|
6939
|
+
tooltip: t11,
|
|
6940
|
+
children: t14
|
|
6941
|
+
});
|
|
6942
|
+
$[22] = t11;
|
|
6943
|
+
$[23] = t14;
|
|
6944
|
+
$[24] = t8;
|
|
6945
|
+
$[25] = t15;
|
|
6946
|
+
} else t15 = $[25];
|
|
5725
6947
|
let t16;
|
|
5726
|
-
if ($[
|
|
5727
|
-
t16 = /* @__PURE__ */
|
|
6948
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6949
|
+
t16 = /* @__PURE__ */ jsx(Resistances, { layer: "shield" });
|
|
6950
|
+
$[26] = t16;
|
|
6951
|
+
} else t16 = $[26];
|
|
6952
|
+
let t17;
|
|
6953
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6954
|
+
t17 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "armorHP" });
|
|
6955
|
+
$[27] = t17;
|
|
6956
|
+
} else t17 = $[27];
|
|
6957
|
+
let t18;
|
|
6958
|
+
if ($[28] !== armor) {
|
|
6959
|
+
t18 = /* @__PURE__ */ jsx(Stat, {
|
|
6960
|
+
icon: "stat-armor-hp",
|
|
6961
|
+
label: "Armor Hitpoints",
|
|
6962
|
+
tooltip: t17,
|
|
6963
|
+
children: /* @__PURE__ */ jsx(AttributeText, { value: armor })
|
|
6964
|
+
});
|
|
6965
|
+
$[28] = armor;
|
|
6966
|
+
$[29] = t18;
|
|
6967
|
+
} else t18 = $[29];
|
|
6968
|
+
let t19;
|
|
6969
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6970
|
+
t19 = /* @__PURE__ */ jsx(Resistances, { layer: "armor" });
|
|
6971
|
+
$[30] = t19;
|
|
6972
|
+
} else t19 = $[30];
|
|
6973
|
+
let t20;
|
|
6974
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6975
|
+
t20 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "hp" });
|
|
6976
|
+
$[31] = t20;
|
|
6977
|
+
} else t20 = $[31];
|
|
6978
|
+
let t21;
|
|
6979
|
+
if ($[32] !== structure) {
|
|
6980
|
+
t21 = /* @__PURE__ */ jsx(Stat, {
|
|
6981
|
+
icon: "stat-structure-hp",
|
|
6982
|
+
label: "Structure Hitpoints",
|
|
6983
|
+
tooltip: t20,
|
|
6984
|
+
children: /* @__PURE__ */ jsx(AttributeText, { value: structure })
|
|
6985
|
+
});
|
|
6986
|
+
$[32] = structure;
|
|
6987
|
+
$[33] = t21;
|
|
6988
|
+
} else t21 = $[33];
|
|
6989
|
+
let t22;
|
|
6990
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6991
|
+
t22 = /* @__PURE__ */ jsx(Resistances, { layer: "structure" });
|
|
6992
|
+
$[34] = t22;
|
|
6993
|
+
} else t22 = $[34];
|
|
6994
|
+
let t23;
|
|
6995
|
+
if ($[35] !== t15 || $[36] !== t18 || $[37] !== t21) {
|
|
6996
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
5728
6997
|
className: ShipStatistics_module_default.defense,
|
|
5729
6998
|
children: [
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
6999
|
+
t6,
|
|
7000
|
+
t7,
|
|
7001
|
+
t15,
|
|
7002
|
+
t16,
|
|
7003
|
+
t18,
|
|
7004
|
+
t19,
|
|
7005
|
+
t21,
|
|
7006
|
+
t22
|
|
5738
7007
|
]
|
|
5739
7008
|
});
|
|
5740
|
-
$[
|
|
5741
|
-
$[
|
|
5742
|
-
$[
|
|
5743
|
-
$[
|
|
5744
|
-
} else
|
|
5745
|
-
let
|
|
5746
|
-
if ($[
|
|
5747
|
-
|
|
7009
|
+
$[35] = t15;
|
|
7010
|
+
$[36] = t18;
|
|
7011
|
+
$[37] = t21;
|
|
7012
|
+
$[38] = t23;
|
|
7013
|
+
} else t23 = $[38];
|
|
7014
|
+
let t24;
|
|
7015
|
+
if ($[39] !== t23 || $[40] !== t5) {
|
|
7016
|
+
t24 = /* @__PURE__ */ jsx(StatsSection, {
|
|
5748
7017
|
title: "Defense",
|
|
5749
|
-
summary:
|
|
5750
|
-
children:
|
|
7018
|
+
summary: t5,
|
|
7019
|
+
children: t23
|
|
5751
7020
|
});
|
|
5752
|
-
$[
|
|
5753
|
-
$[
|
|
5754
|
-
$[
|
|
5755
|
-
} else
|
|
5756
|
-
return
|
|
7021
|
+
$[39] = t23;
|
|
7022
|
+
$[40] = t5;
|
|
7023
|
+
$[41] = t24;
|
|
7024
|
+
} else t24 = $[41];
|
|
7025
|
+
return t24;
|
|
5757
7026
|
}
|
|
5758
7027
|
function _temp(damage) {
|
|
5759
7028
|
return /* @__PURE__ */ jsx(Icon, { name: `stat-${damage}-resistance` }, damage);
|
|
@@ -5892,40 +7161,149 @@ function DroneStats() {
|
|
|
5892
7161
|
return t12;
|
|
5893
7162
|
}
|
|
5894
7163
|
//#endregion
|
|
5895
|
-
//#region src/components/ShipStatistics/
|
|
5896
|
-
function
|
|
5897
|
-
const $ = c(
|
|
5898
|
-
const
|
|
5899
|
-
const
|
|
7164
|
+
//#region src/components/ShipStatistics/FighterStats.tsx
|
|
7165
|
+
function FighterStats() {
|
|
7166
|
+
const $ = c(12);
|
|
7167
|
+
const sde = useSde();
|
|
7168
|
+
const { fit } = useShownSnapshot();
|
|
7169
|
+
const manage = useManageFighters();
|
|
7170
|
+
let full = 0;
|
|
7171
|
+
let partial = 0;
|
|
7172
|
+
for (const item of fit.items) {
|
|
7173
|
+
const type = item.slot.type === "fighter_tube" ? sde.type(item.type_id) : void 0;
|
|
7174
|
+
if (type === void 0) continue;
|
|
7175
|
+
if ((item.quantity ?? 1) >= squadronSize(sde, type)) full = full + 1;
|
|
7176
|
+
else partial = partial + 1;
|
|
7177
|
+
}
|
|
7178
|
+
let t0;
|
|
7179
|
+
if ($[0] !== full) {
|
|
7180
|
+
t0 = /* @__PURE__ */ jsxs("span", { children: [full, " Full Squadrons"] });
|
|
7181
|
+
$[0] = full;
|
|
7182
|
+
$[1] = t0;
|
|
7183
|
+
} else t0 = $[1];
|
|
7184
|
+
let t1;
|
|
7185
|
+
if ($[2] !== partial) {
|
|
7186
|
+
t1 = /* @__PURE__ */ jsxs("span", { children: [partial, " Partial Squadrons"] });
|
|
7187
|
+
$[2] = partial;
|
|
7188
|
+
$[3] = t1;
|
|
7189
|
+
} else t1 = $[3];
|
|
5900
7190
|
let t2;
|
|
5901
|
-
if ($[
|
|
5902
|
-
t2 =
|
|
5903
|
-
|
|
5904
|
-
|
|
7191
|
+
if ($[4] !== t0 || $[5] !== t1) {
|
|
7192
|
+
t2 = /* @__PURE__ */ jsxs("span", {
|
|
7193
|
+
className: ShipStatistics_module_default.lines,
|
|
7194
|
+
children: [t0, t1]
|
|
5905
7195
|
});
|
|
5906
|
-
$[
|
|
5907
|
-
$[
|
|
5908
|
-
|
|
7196
|
+
$[4] = t0;
|
|
7197
|
+
$[5] = t1;
|
|
7198
|
+
$[6] = t2;
|
|
7199
|
+
} else t2 = $[6];
|
|
5909
7200
|
let t3;
|
|
5910
|
-
if ($[
|
|
5911
|
-
t3 = /* @__PURE__ */ jsx(
|
|
5912
|
-
|
|
5913
|
-
|
|
7201
|
+
if ($[7] !== manage) {
|
|
7202
|
+
t3 = manage ? /* @__PURE__ */ jsx("button", {
|
|
7203
|
+
type: "button",
|
|
7204
|
+
className: ShipStatistics_module_default.manage,
|
|
7205
|
+
onClick: manage,
|
|
7206
|
+
children: "Manage"
|
|
7207
|
+
}) : /* @__PURE__ */ jsx(Tooltip, {
|
|
7208
|
+
label: "Manage (only in the fitting window)",
|
|
7209
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
7210
|
+
type: "button",
|
|
7211
|
+
className: ShipStatistics_module_default.manage,
|
|
7212
|
+
"aria-disabled": true,
|
|
7213
|
+
children: "Manage"
|
|
7214
|
+
})
|
|
7215
|
+
});
|
|
7216
|
+
$[7] = manage;
|
|
7217
|
+
$[8] = t3;
|
|
7218
|
+
} else t3 = $[8];
|
|
5914
7219
|
let t4;
|
|
5915
|
-
if ($[
|
|
5916
|
-
t4 = /* @__PURE__ */
|
|
7220
|
+
if ($[9] !== t2 || $[10] !== t3) {
|
|
7221
|
+
t4 = /* @__PURE__ */ jsx(StatsSection, {
|
|
7222
|
+
title: "Fighters",
|
|
7223
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
7224
|
+
className: ShipStatistics_module_default.fighters,
|
|
7225
|
+
children: [t2, t3]
|
|
7226
|
+
})
|
|
7227
|
+
});
|
|
7228
|
+
$[9] = t2;
|
|
7229
|
+
$[10] = t3;
|
|
7230
|
+
$[11] = t4;
|
|
7231
|
+
} else t4 = $[11];
|
|
7232
|
+
return t4;
|
|
7233
|
+
}
|
|
7234
|
+
//#endregion
|
|
7235
|
+
//#region src/components/ShipStatistics/FitPrice.tsx
|
|
7236
|
+
function FitPrice(t0) {
|
|
7237
|
+
const $ = c(5);
|
|
7238
|
+
const { price, change } = t0;
|
|
7239
|
+
let t1;
|
|
7240
|
+
if ($[0] !== price) {
|
|
7241
|
+
t1 = price !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7242
|
+
formatNumber(price / 1e6, {
|
|
7243
|
+
decimals: 1,
|
|
7244
|
+
fixed: true
|
|
7245
|
+
}),
|
|
7246
|
+
"M ISK",
|
|
7247
|
+
/* @__PURE__ */ jsx(Icon, { name: "price" })
|
|
7248
|
+
] });
|
|
7249
|
+
$[0] = price;
|
|
7250
|
+
$[1] = t1;
|
|
7251
|
+
} else t1 = $[1];
|
|
7252
|
+
let t2;
|
|
7253
|
+
if ($[2] !== change || $[3] !== t1) {
|
|
7254
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
5917
7255
|
className: ShipStatistics_module_default.price,
|
|
7256
|
+
"data-change": change,
|
|
5918
7257
|
role: "group",
|
|
5919
7258
|
"aria-label": "Estimated Price",
|
|
5920
|
-
children:
|
|
5921
|
-
t2,
|
|
5922
|
-
"M ISK",
|
|
5923
|
-
t3
|
|
5924
|
-
]
|
|
7259
|
+
children: t1
|
|
5925
7260
|
});
|
|
5926
|
-
$[
|
|
5927
|
-
$[
|
|
5928
|
-
|
|
7261
|
+
$[2] = change;
|
|
7262
|
+
$[3] = t1;
|
|
7263
|
+
$[4] = t2;
|
|
7264
|
+
} else t2 = $[4];
|
|
7265
|
+
return t2;
|
|
7266
|
+
}
|
|
7267
|
+
//#endregion
|
|
7268
|
+
//#region src/components/ShipStatistics/FuelStats.tsx
|
|
7269
|
+
function FuelStats() {
|
|
7270
|
+
const $ = c(8);
|
|
7271
|
+
const perDay = useStats().fuel * 24;
|
|
7272
|
+
const before = useSnapshot().stats.fuel * 24;
|
|
7273
|
+
let t0;
|
|
7274
|
+
if ($[0] !== perDay) {
|
|
7275
|
+
t0 = formatNumber(perDay, { decimals: 0 });
|
|
7276
|
+
$[0] = perDay;
|
|
7277
|
+
$[1] = t0;
|
|
7278
|
+
} else t0 = $[1];
|
|
7279
|
+
const t1 = `${t0} units/day`;
|
|
7280
|
+
const t2 = perDay === before ? void 0 : perDay < before ? "better" : "worse";
|
|
7281
|
+
let t3;
|
|
7282
|
+
if ($[2] !== perDay || $[3] !== t1 || $[4] !== t2) {
|
|
7283
|
+
t3 = {
|
|
7284
|
+
value: perDay,
|
|
7285
|
+
text: t1,
|
|
7286
|
+
change: t2
|
|
7287
|
+
};
|
|
7288
|
+
$[2] = perDay;
|
|
7289
|
+
$[3] = t1;
|
|
7290
|
+
$[4] = t2;
|
|
7291
|
+
$[5] = t3;
|
|
7292
|
+
} else t3 = $[5];
|
|
7293
|
+
const fuel = t3;
|
|
7294
|
+
let t4;
|
|
7295
|
+
if ($[6] !== fuel) {
|
|
7296
|
+
t4 = /* @__PURE__ */ jsx(StatsSection, {
|
|
7297
|
+
title: "Fuel",
|
|
7298
|
+
children: /* @__PURE__ */ jsx(Stat, {
|
|
7299
|
+
icon: "stat-fuel",
|
|
7300
|
+
label: "Fuel Usage",
|
|
7301
|
+
children: /* @__PURE__ */ jsx(AttributeText, { value: fuel })
|
|
7302
|
+
})
|
|
7303
|
+
});
|
|
7304
|
+
$[6] = fuel;
|
|
7305
|
+
$[7] = t4;
|
|
7306
|
+
} else t4 = $[7];
|
|
5929
7307
|
return t4;
|
|
5930
7308
|
}
|
|
5931
7309
|
//#endregion
|
|
@@ -6192,6 +7570,7 @@ function TargetingStats() {
|
|
|
6192
7570
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6193
7571
|
t1 = {
|
|
6194
7572
|
decimals: 0,
|
|
7573
|
+
rounding: "down",
|
|
6195
7574
|
format: unit(" mm")
|
|
6196
7575
|
};
|
|
6197
7576
|
$[1] = t1;
|
|
@@ -6210,6 +7589,7 @@ function TargetingStats() {
|
|
|
6210
7589
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6211
7590
|
t3 = {
|
|
6212
7591
|
decimals: 0,
|
|
7592
|
+
rounding: "up",
|
|
6213
7593
|
format: unit("x")
|
|
6214
7594
|
};
|
|
6215
7595
|
$[3] = t3;
|
|
@@ -6324,41 +7704,69 @@ function TargetingStats() {
|
|
|
6324
7704
|
//#region src/components/ShipStatistics/ShipStatistics.tsx
|
|
6325
7705
|
/** EVE's statistics of the fit, as its fitting window shows them. */
|
|
6326
7706
|
function ShipStatistics(t0) {
|
|
6327
|
-
const $ = c(
|
|
7707
|
+
const $ = c(14);
|
|
6328
7708
|
const { label: t1 } = t0;
|
|
6329
7709
|
const label = t1 === void 0 ? "Statistics" : t1;
|
|
7710
|
+
const { stats } = useSnapshot();
|
|
7711
|
+
const price = useFitPrice();
|
|
6330
7712
|
let t2;
|
|
6331
7713
|
let t3;
|
|
7714
|
+
let t4;
|
|
7715
|
+
let t5;
|
|
6332
7716
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6333
|
-
t2 = /* @__PURE__ */
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
/* @__PURE__ */ jsx(OffenseStats, {}),
|
|
6338
|
-
/* @__PURE__ */ jsx(DefenseStats, {}),
|
|
6339
|
-
/* @__PURE__ */ jsx(TargetingStats, {}),
|
|
6340
|
-
/* @__PURE__ */ jsx(NavigationStats, {}),
|
|
6341
|
-
/* @__PURE__ */ jsx(DroneStats, {})
|
|
6342
|
-
]
|
|
6343
|
-
});
|
|
6344
|
-
t3 = /* @__PURE__ */ jsx(FitPrice, { price: 0 });
|
|
7717
|
+
t2 = /* @__PURE__ */ jsx(CapacitorStats, {});
|
|
7718
|
+
t3 = /* @__PURE__ */ jsx(OffenseStats, {});
|
|
7719
|
+
t4 = /* @__PURE__ */ jsx(DefenseStats, {});
|
|
7720
|
+
t5 = /* @__PURE__ */ jsx(TargetingStats, {});
|
|
6345
7721
|
$[0] = t2;
|
|
6346
7722
|
$[1] = t3;
|
|
7723
|
+
$[2] = t4;
|
|
7724
|
+
$[3] = t5;
|
|
6347
7725
|
} else {
|
|
6348
7726
|
t2 = $[0];
|
|
6349
7727
|
t3 = $[1];
|
|
7728
|
+
t4 = $[2];
|
|
7729
|
+
t5 = $[3];
|
|
6350
7730
|
}
|
|
6351
|
-
let
|
|
6352
|
-
if ($[
|
|
6353
|
-
|
|
7731
|
+
let t6;
|
|
7732
|
+
if ($[4] !== stats.fighterBay || $[5] !== stats.structure) {
|
|
7733
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
7734
|
+
className: ShipStatistics_module_default.sections,
|
|
7735
|
+
children: [
|
|
7736
|
+
t2,
|
|
7737
|
+
t3,
|
|
7738
|
+
t4,
|
|
7739
|
+
t5,
|
|
7740
|
+
stats.structure ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FighterStats, {}), /* @__PURE__ */ jsx(FuelStats, {})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(NavigationStats, {}), stats.fighterBay.total > 0 ? /* @__PURE__ */ jsx(FighterStats, {}) : /* @__PURE__ */ jsx(DroneStats, {})] })
|
|
7741
|
+
]
|
|
7742
|
+
});
|
|
7743
|
+
$[4] = stats.fighterBay;
|
|
7744
|
+
$[5] = stats.structure;
|
|
7745
|
+
$[6] = t6;
|
|
7746
|
+
} else t6 = $[6];
|
|
7747
|
+
let t7;
|
|
7748
|
+
if ($[7] !== price.change || $[8] !== price.value) {
|
|
7749
|
+
t7 = /* @__PURE__ */ jsx(FitPrice, {
|
|
7750
|
+
price: price.value,
|
|
7751
|
+
change: price.change
|
|
7752
|
+
});
|
|
7753
|
+
$[7] = price.change;
|
|
7754
|
+
$[8] = price.value;
|
|
7755
|
+
$[9] = t7;
|
|
7756
|
+
} else t7 = $[9];
|
|
7757
|
+
let t8;
|
|
7758
|
+
if ($[10] !== label || $[11] !== t6 || $[12] !== t7) {
|
|
7759
|
+
t8 = /* @__PURE__ */ jsxs("section", {
|
|
6354
7760
|
className: ShipStatistics_module_default.statistics,
|
|
6355
7761
|
"aria-label": label,
|
|
6356
|
-
children: [
|
|
7762
|
+
children: [t6, t7]
|
|
6357
7763
|
});
|
|
6358
|
-
$[
|
|
6359
|
-
$[
|
|
6360
|
-
|
|
6361
|
-
|
|
7764
|
+
$[10] = label;
|
|
7765
|
+
$[11] = t6;
|
|
7766
|
+
$[12] = t7;
|
|
7767
|
+
$[13] = t8;
|
|
7768
|
+
} else t8 = $[13];
|
|
7769
|
+
return t8;
|
|
6362
7770
|
}
|
|
6363
7771
|
//#endregion
|
|
6364
7772
|
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, WheelRackMarker, WheelSlot, iconNames, rackSize, slotAngle };
|