@eveshipfit/ui-ingame 1.2.0 → 1.3.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/dist/index.d.mts +6 -1
- package/dist/index.mjs +1572 -895
- package/dist/style.css +185 -30
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import './style.css';
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { 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, useFit, useFitHistory, 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",
|
|
@@ -457,6 +457,7 @@ const textures = {
|
|
|
457
457
|
"slot-low": "classes/fitting/filtericonlowslot",
|
|
458
458
|
"slot-rig": "classes/fitting/filtericonrigslot",
|
|
459
459
|
"slot-subsystem": "windowicons/subsystems",
|
|
460
|
+
"slot-service": "classes/fitting/stationserviceslot",
|
|
460
461
|
"module-unfit": "icons/38_16_200",
|
|
461
462
|
"module-power": "icons/38_16_207",
|
|
462
463
|
"module-info": "icons/38_16_208",
|
|
@@ -487,6 +488,7 @@ const textures = {
|
|
|
487
488
|
statistics: "eveicon/system_icons/list_view_16px",
|
|
488
489
|
cargo: "windowicons/ships",
|
|
489
490
|
"drone-bay": "windowicons/dronebay",
|
|
491
|
+
"ammo-hold": "windowicons/itemhangar",
|
|
490
492
|
"arrow-left": "shared/triangleleft",
|
|
491
493
|
"arrow-right": "shared/triangleright",
|
|
492
494
|
"arrow-down": "shared/triangledown",
|
|
@@ -517,7 +519,8 @@ const textures = {
|
|
|
517
519
|
"stat-warp-speed": "classes/fitting/statsicons/warpspeed",
|
|
518
520
|
"stat-align-time": "classes/fitting/statsicons/aligntime",
|
|
519
521
|
"stat-drone-bandwidth": "classes/fitting/statsicons/bandwidth",
|
|
520
|
-
"stat-drone-control-range": "classes/fitting/statsicons/controlrange"
|
|
522
|
+
"stat-drone-control-range": "classes/fitting/statsicons/controlrange",
|
|
523
|
+
"stat-fuel": "classes/fitting/statsicons/fuel"
|
|
521
524
|
};
|
|
522
525
|
const iconNames = Object.keys(textures);
|
|
523
526
|
function Icon(t0) {
|
|
@@ -794,51 +797,53 @@ var HistoryBar_module_default = {
|
|
|
794
797
|
//#region src/primitives/HistoryBar/HistoryBar.tsx
|
|
795
798
|
/** EVE's Simulation History. */
|
|
796
799
|
function HistoryBar(t0) {
|
|
797
|
-
const $ = c(
|
|
798
|
-
const { label, length, position, onGoTo } = t0;
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
800
|
+
const $ = c(33);
|
|
801
|
+
const { label, length, position, onGoTo, tooltipTitle: t1 } = t0;
|
|
802
|
+
const tooltipTitle = t1 === void 0 ? false : t1;
|
|
803
|
+
let t2;
|
|
804
|
+
if ($[0] !== label || $[1] !== tooltipTitle) {
|
|
805
|
+
t2 = !tooltipTitle && /* @__PURE__ */ jsx("span", {
|
|
802
806
|
className: HistoryBar_module_default.title,
|
|
803
807
|
"aria-hidden": true,
|
|
804
808
|
children: label
|
|
805
809
|
});
|
|
806
810
|
$[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];
|
|
811
|
+
$[1] = tooltipTitle;
|
|
812
|
+
$[2] = t2;
|
|
813
|
+
} else t2 = $[2];
|
|
814
|
+
const t3 = position <= 0;
|
|
817
815
|
let t4;
|
|
818
|
-
if ($[
|
|
819
|
-
t4 =
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
});
|
|
816
|
+
if ($[3] !== onGoTo || $[4] !== position) {
|
|
817
|
+
t4 = () => onGoTo(position - 1);
|
|
818
|
+
$[3] = onGoTo;
|
|
819
|
+
$[4] = position;
|
|
823
820
|
$[5] = t4;
|
|
824
821
|
} else t4 = $[5];
|
|
825
822
|
let t5;
|
|
826
|
-
if ($[6]
|
|
827
|
-
t5 = /* @__PURE__ */ jsx(
|
|
823
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
824
|
+
t5 = /* @__PURE__ */ jsx(Icon, {
|
|
825
|
+
name: "arrow-left",
|
|
826
|
+
size: 10
|
|
827
|
+
});
|
|
828
|
+
$[6] = t5;
|
|
829
|
+
} else t5 = $[6];
|
|
830
|
+
let t6;
|
|
831
|
+
if ($[7] !== t3 || $[8] !== t4) {
|
|
832
|
+
t6 = /* @__PURE__ */ jsx("button", {
|
|
828
833
|
type: "button",
|
|
829
834
|
className: HistoryBar_module_default.arrow,
|
|
830
835
|
"aria-label": "Back",
|
|
831
|
-
disabled:
|
|
832
|
-
onClick:
|
|
833
|
-
children:
|
|
836
|
+
disabled: t3,
|
|
837
|
+
onClick: t4,
|
|
838
|
+
children: t5
|
|
834
839
|
});
|
|
835
|
-
$[6] = t2;
|
|
836
840
|
$[7] = t3;
|
|
837
|
-
$[8] =
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
841
|
+
$[8] = t4;
|
|
842
|
+
$[9] = t6;
|
|
843
|
+
} else t6 = $[9];
|
|
844
|
+
let t7;
|
|
845
|
+
if ($[10] !== length || $[11] !== onGoTo || $[12] !== position) {
|
|
846
|
+
t7 = /* @__PURE__ */ jsx("div", {
|
|
842
847
|
className: HistoryBar_module_default.entries,
|
|
843
848
|
children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx("button", {
|
|
844
849
|
type: "button",
|
|
@@ -848,69 +853,81 @@ function HistoryBar(t0) {
|
|
|
848
853
|
onClick: () => onGoTo(index)
|
|
849
854
|
}, index))
|
|
850
855
|
});
|
|
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];
|
|
856
|
+
$[10] = length;
|
|
857
|
+
$[11] = onGoTo;
|
|
858
|
+
$[12] = position;
|
|
859
|
+
$[13] = t7;
|
|
860
|
+
} else t7 = $[13];
|
|
861
|
+
const t8 = position >= length - 1;
|
|
864
862
|
let t9;
|
|
865
|
-
if ($[
|
|
866
|
-
t9 =
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
});
|
|
863
|
+
if ($[14] !== onGoTo || $[15] !== position) {
|
|
864
|
+
t9 = () => onGoTo(position + 1);
|
|
865
|
+
$[14] = onGoTo;
|
|
866
|
+
$[15] = position;
|
|
870
867
|
$[16] = t9;
|
|
871
868
|
} else t9 = $[16];
|
|
872
869
|
let t10;
|
|
873
|
-
if ($[17]
|
|
874
|
-
t10 = /* @__PURE__ */ jsx(
|
|
870
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
871
|
+
t10 = /* @__PURE__ */ jsx(Icon, {
|
|
872
|
+
name: "arrow-right",
|
|
873
|
+
size: 10
|
|
874
|
+
});
|
|
875
|
+
$[17] = t10;
|
|
876
|
+
} else t10 = $[17];
|
|
877
|
+
let t11;
|
|
878
|
+
if ($[18] !== t8 || $[19] !== t9) {
|
|
879
|
+
t11 = /* @__PURE__ */ jsx("button", {
|
|
875
880
|
type: "button",
|
|
876
881
|
className: HistoryBar_module_default.arrow,
|
|
877
882
|
"aria-label": "Forward",
|
|
878
|
-
disabled:
|
|
879
|
-
onClick:
|
|
880
|
-
children:
|
|
883
|
+
disabled: t8,
|
|
884
|
+
onClick: t9,
|
|
885
|
+
children: t10
|
|
881
886
|
});
|
|
882
|
-
$[17] = t7;
|
|
883
887
|
$[18] = t8;
|
|
884
|
-
$[19] =
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
888
|
+
$[19] = t9;
|
|
889
|
+
$[20] = t11;
|
|
890
|
+
} else t11 = $[20];
|
|
891
|
+
let t12;
|
|
892
|
+
if ($[21] !== t11 || $[22] !== t6 || $[23] !== t7) {
|
|
893
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
889
894
|
className: HistoryBar_module_default.row,
|
|
890
895
|
children: [
|
|
891
|
-
t5,
|
|
892
896
|
t6,
|
|
893
|
-
|
|
897
|
+
t7,
|
|
898
|
+
t11
|
|
894
899
|
]
|
|
895
900
|
});
|
|
896
|
-
$[
|
|
897
|
-
$[21] = t5;
|
|
901
|
+
$[21] = t11;
|
|
898
902
|
$[22] = t6;
|
|
899
|
-
$[23] =
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
903
|
+
$[23] = t7;
|
|
904
|
+
$[24] = t12;
|
|
905
|
+
} else t12 = $[24];
|
|
906
|
+
let t13;
|
|
907
|
+
if ($[25] !== label || $[26] !== t12 || $[27] !== t2) {
|
|
908
|
+
t13 = /* @__PURE__ */ jsxs("fieldset", {
|
|
904
909
|
className: HistoryBar_module_default.history,
|
|
905
910
|
"aria-label": label,
|
|
906
|
-
children: [
|
|
911
|
+
children: [t2, t12]
|
|
907
912
|
});
|
|
908
|
-
$[
|
|
909
|
-
$[
|
|
910
|
-
$[
|
|
911
|
-
$[
|
|
912
|
-
} else
|
|
913
|
-
|
|
913
|
+
$[25] = label;
|
|
914
|
+
$[26] = t12;
|
|
915
|
+
$[27] = t2;
|
|
916
|
+
$[28] = t13;
|
|
917
|
+
} else t13 = $[28];
|
|
918
|
+
const bar = t13;
|
|
919
|
+
let t14;
|
|
920
|
+
if ($[29] !== bar || $[30] !== label || $[31] !== tooltipTitle) {
|
|
921
|
+
t14 = tooltipTitle ? /* @__PURE__ */ jsx(Tooltip, {
|
|
922
|
+
label,
|
|
923
|
+
children: bar
|
|
924
|
+
}) : bar;
|
|
925
|
+
$[29] = bar;
|
|
926
|
+
$[30] = label;
|
|
927
|
+
$[31] = tooltipTitle;
|
|
928
|
+
$[32] = t14;
|
|
929
|
+
} else t14 = $[32];
|
|
930
|
+
return t14;
|
|
914
931
|
}
|
|
915
932
|
//#endregion
|
|
916
933
|
//#region src/primitives/Wheel/layout.ts
|
|
@@ -1092,6 +1109,94 @@ function WheelRackMarker(t0) {
|
|
|
1092
1109
|
return t3;
|
|
1093
1110
|
}
|
|
1094
1111
|
//#endregion
|
|
1112
|
+
//#region src/primitives/SlotAction/SlotAction.module.css
|
|
1113
|
+
var SlotAction_module_default = { "button": "ld11eq_button" };
|
|
1114
|
+
//#endregion
|
|
1115
|
+
//#region src/primitives/SlotAction/SlotAction.tsx
|
|
1116
|
+
/** One of the buttons EVE shows over a hovered slot. */
|
|
1117
|
+
function SlotAction(t0) {
|
|
1118
|
+
const $ = c(9);
|
|
1119
|
+
const { icon, label, onPress } = t0;
|
|
1120
|
+
let t1;
|
|
1121
|
+
if ($[0] !== icon) {
|
|
1122
|
+
t1 = /* @__PURE__ */ jsx(Icon, { name: icon });
|
|
1123
|
+
$[0] = icon;
|
|
1124
|
+
$[1] = t1;
|
|
1125
|
+
} else t1 = $[1];
|
|
1126
|
+
let t2;
|
|
1127
|
+
if ($[2] !== label || $[3] !== onPress || $[4] !== t1) {
|
|
1128
|
+
t2 = /* @__PURE__ */ jsx("button", {
|
|
1129
|
+
type: "button",
|
|
1130
|
+
className: SlotAction_module_default.button,
|
|
1131
|
+
"aria-label": label,
|
|
1132
|
+
onClick: onPress,
|
|
1133
|
+
children: t1
|
|
1134
|
+
});
|
|
1135
|
+
$[2] = label;
|
|
1136
|
+
$[3] = onPress;
|
|
1137
|
+
$[4] = t1;
|
|
1138
|
+
$[5] = t2;
|
|
1139
|
+
} else t2 = $[5];
|
|
1140
|
+
let t3;
|
|
1141
|
+
if ($[6] !== label || $[7] !== t2) {
|
|
1142
|
+
t3 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1143
|
+
label,
|
|
1144
|
+
children: t2
|
|
1145
|
+
});
|
|
1146
|
+
$[6] = label;
|
|
1147
|
+
$[7] = t2;
|
|
1148
|
+
$[8] = t3;
|
|
1149
|
+
} else t3 = $[8];
|
|
1150
|
+
return t3;
|
|
1151
|
+
}
|
|
1152
|
+
function SlotInfo() {
|
|
1153
|
+
const $ = c(1);
|
|
1154
|
+
let t0;
|
|
1155
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1156
|
+
t0 = /* @__PURE__ */ jsx(Tooltip, {
|
|
1157
|
+
label: "Show Info (not implemented yet)",
|
|
1158
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1159
|
+
type: "button",
|
|
1160
|
+
className: SlotAction_module_default.button,
|
|
1161
|
+
"aria-label": "Show Info",
|
|
1162
|
+
"aria-disabled": true,
|
|
1163
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "module-info" })
|
|
1164
|
+
})
|
|
1165
|
+
});
|
|
1166
|
+
$[0] = t0;
|
|
1167
|
+
} else t0 = $[0];
|
|
1168
|
+
return t0;
|
|
1169
|
+
}
|
|
1170
|
+
/** Makes the whole slot a button, named `label`. */
|
|
1171
|
+
function SlotPress(t0) {
|
|
1172
|
+
const $ = c(4);
|
|
1173
|
+
const { className, label, onPress } = t0;
|
|
1174
|
+
let t1;
|
|
1175
|
+
if ($[0] !== className || $[1] !== label || $[2] !== onPress) {
|
|
1176
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
1177
|
+
role: "button",
|
|
1178
|
+
tabIndex: 0,
|
|
1179
|
+
className,
|
|
1180
|
+
"aria-label": label,
|
|
1181
|
+
onClick: onPress,
|
|
1182
|
+
onKeyDown: _temp$8
|
|
1183
|
+
});
|
|
1184
|
+
$[0] = className;
|
|
1185
|
+
$[1] = label;
|
|
1186
|
+
$[2] = onPress;
|
|
1187
|
+
$[3] = t1;
|
|
1188
|
+
} else t1 = $[3];
|
|
1189
|
+
return t1;
|
|
1190
|
+
}
|
|
1191
|
+
function _temp$8(event) {
|
|
1192
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
1193
|
+
event.preventDefault();
|
|
1194
|
+
event.currentTarget.dispatchEvent(new MouseEvent("click", {
|
|
1195
|
+
bubbles: true,
|
|
1196
|
+
shiftKey: event.shiftKey
|
|
1197
|
+
}));
|
|
1198
|
+
}
|
|
1199
|
+
//#endregion
|
|
1095
1200
|
//#region src/primitives/Wheel/WheelSlot.module.css
|
|
1096
1201
|
var WheelSlot_module_default = {
|
|
1097
1202
|
"action": "T6VD6G_action",
|
|
@@ -1099,7 +1204,6 @@ var WheelSlot_module_default = {
|
|
|
1099
1204
|
"ammo": "T6VD6G_ammo",
|
|
1100
1205
|
"body": "T6VD6G_body",
|
|
1101
1206
|
"bridge": "T6VD6G_bridge",
|
|
1102
|
-
"button": "T6VD6G_button",
|
|
1103
1207
|
"empty": "T6VD6G_empty",
|
|
1104
1208
|
"fill": "T6VD6G_fill",
|
|
1105
1209
|
"frame": "T6VD6G_frame",
|
|
@@ -1219,7 +1323,7 @@ function WheelSlot(t0) {
|
|
|
1219
1323
|
if (chargeTypeId !== void 0) {
|
|
1220
1324
|
row.push(onRemoveCharge && {
|
|
1221
1325
|
key: "charge",
|
|
1222
|
-
node: /* @__PURE__ */ jsx(
|
|
1326
|
+
node: /* @__PURE__ */ jsx(SlotAction, {
|
|
1223
1327
|
icon: "module-unfit",
|
|
1224
1328
|
label: "Remove Charge",
|
|
1225
1329
|
onPress: onRemoveCharge
|
|
@@ -1227,7 +1331,7 @@ function WheelSlot(t0) {
|
|
|
1227
1331
|
});
|
|
1228
1332
|
let t8;
|
|
1229
1333
|
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1230
|
-
t8 = /* @__PURE__ */ jsx(
|
|
1334
|
+
t8 = /* @__PURE__ */ jsx(SlotInfo, {});
|
|
1231
1335
|
$[34] = t8;
|
|
1232
1336
|
} else t8 = $[34];
|
|
1233
1337
|
row.push({
|
|
@@ -1251,7 +1355,7 @@ function WheelSlot(t0) {
|
|
|
1251
1355
|
}
|
|
1252
1356
|
row.push(onUnfit && {
|
|
1253
1357
|
key: "unfit",
|
|
1254
|
-
node: /* @__PURE__ */ jsx(
|
|
1358
|
+
node: /* @__PURE__ */ jsx(SlotAction, {
|
|
1255
1359
|
icon: "module-unfit",
|
|
1256
1360
|
label: "Unfit Module",
|
|
1257
1361
|
onPress: onUnfit
|
|
@@ -1259,7 +1363,7 @@ function WheelSlot(t0) {
|
|
|
1259
1363
|
});
|
|
1260
1364
|
let t8;
|
|
1261
1365
|
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1262
|
-
t8 = /* @__PURE__ */ jsx(
|
|
1366
|
+
t8 = /* @__PURE__ */ jsx(SlotInfo, {});
|
|
1263
1367
|
$[35] = t8;
|
|
1264
1368
|
} else t8 = $[35];
|
|
1265
1369
|
row.push({
|
|
@@ -1269,14 +1373,14 @@ function WheelSlot(t0) {
|
|
|
1269
1373
|
const power = state === "offline" ? "Put Online" : "Put Offline";
|
|
1270
1374
|
row.push(onTogglePower && {
|
|
1271
1375
|
key: "power",
|
|
1272
|
-
node: /* @__PURE__ */ jsx(
|
|
1376
|
+
node: /* @__PURE__ */ jsx(SlotAction, {
|
|
1273
1377
|
icon: "module-power",
|
|
1274
1378
|
label: power,
|
|
1275
1379
|
onPress: onTogglePower
|
|
1276
1380
|
})
|
|
1277
1381
|
});
|
|
1278
1382
|
}
|
|
1279
|
-
t7 = row.findLastIndex(_temp$
|
|
1383
|
+
t7 = row.findLastIndex(_temp$7);
|
|
1280
1384
|
$[23] = chargeTypeId;
|
|
1281
1385
|
$[24] = fitted;
|
|
1282
1386
|
$[25] = onRemoveCharge;
|
|
@@ -1373,13 +1477,10 @@ function WheelSlot(t0) {
|
|
|
1373
1477
|
} else t19 = $[57];
|
|
1374
1478
|
let t20;
|
|
1375
1479
|
if ($[58] !== label || $[59] !== onPress) {
|
|
1376
|
-
t20 = onPress && /* @__PURE__ */ jsx(
|
|
1377
|
-
role: "button",
|
|
1378
|
-
tabIndex: 0,
|
|
1480
|
+
t20 = onPress && /* @__PURE__ */ jsx(SlotPress, {
|
|
1379
1481
|
className: WheelSlot_module_default.press,
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
onKeyDown: _temp2$2
|
|
1482
|
+
label,
|
|
1483
|
+
onPress
|
|
1383
1484
|
});
|
|
1384
1485
|
$[58] = label;
|
|
1385
1486
|
$[59] = onPress;
|
|
@@ -1453,70 +1554,9 @@ function WheelSlot(t0) {
|
|
|
1453
1554
|
} else t23 = $[83];
|
|
1454
1555
|
return t23;
|
|
1455
1556
|
}
|
|
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) {
|
|
1557
|
+
function _temp$7(action) {
|
|
1465
1558
|
return action !== void 0;
|
|
1466
1559
|
}
|
|
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
1560
|
function frameTexture(fitted, preview, state, activatable) {
|
|
1521
1561
|
if (!fitted) return "classes/fitting/moduleframe";
|
|
1522
1562
|
if (preview) return "classes/fitting/moduleframedots";
|
|
@@ -2064,9 +2104,6 @@ function CapacitorRing(t0) {
|
|
|
2064
2104
|
return t8;
|
|
2065
2105
|
}
|
|
2066
2106
|
//#endregion
|
|
2067
|
-
//#region src/components/FittingWheel/FittingWheel.module.css
|
|
2068
|
-
var FittingWheel_module_default = { "centre": "GK_wGG_centre" };
|
|
2069
|
-
//#endregion
|
|
2070
2107
|
//#region src/components/FittingWheel/states.ts
|
|
2071
2108
|
const states = [
|
|
2072
2109
|
"offline",
|
|
@@ -2081,280 +2118,41 @@ function nextState(state, max, back = false) {
|
|
|
2081
2118
|
return allowed[(allowed.indexOf(state) + step) % allowed.length];
|
|
2082
2119
|
}
|
|
2083
2120
|
//#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
|
-
];
|
|
2121
|
+
//#region src/components/FittingWheel/fittingSlot.ts
|
|
2097
2122
|
/** EVE does not let rigs and subsystems be put offline. */
|
|
2098
2123
|
const switchedRacks = [
|
|
2099
2124
|
"high",
|
|
2100
2125
|
"medium",
|
|
2101
|
-
"low"
|
|
2126
|
+
"low",
|
|
2127
|
+
"service"
|
|
2102
2128
|
];
|
|
2103
|
-
/**
|
|
2104
|
-
function
|
|
2105
|
-
const $ = c(
|
|
2106
|
-
const
|
|
2107
|
-
const
|
|
2108
|
-
const
|
|
2109
|
-
const
|
|
2129
|
+
/** What a slot of the fit shows, and what clicking, dragging and dropping on it does. */
|
|
2130
|
+
function useFittingSlot(rack, index, content, available) {
|
|
2131
|
+
const $ = c(75);
|
|
2132
|
+
const store = useFitStore();
|
|
2133
|
+
const sde = useSde();
|
|
2134
|
+
const fit = useFit();
|
|
2135
|
+
const placement = usePlacement();
|
|
2110
2136
|
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;
|
|
2335
|
-
const store = useFitStore();
|
|
2336
|
-
const sde = useSde();
|
|
2337
|
-
const fit = useFit();
|
|
2338
|
-
const placement = usePlacement();
|
|
2339
2137
|
const { dragging, start, end } = useDrag();
|
|
2340
2138
|
const item = content?.item;
|
|
2341
2139
|
const stats = content?.stats;
|
|
2342
2140
|
const type = useType(item?.type_id);
|
|
2343
2141
|
const charges = useCharges(item?.type_id);
|
|
2344
2142
|
const ref = content?.ref;
|
|
2345
|
-
let
|
|
2143
|
+
let t0;
|
|
2346
2144
|
if ($[0] !== rack || $[1] !== ref || $[2] !== stats) {
|
|
2347
|
-
|
|
2145
|
+
t0 = ref !== void 0 && stats !== void 0 && switchedRacks.includes(rack);
|
|
2348
2146
|
$[0] = rack;
|
|
2349
2147
|
$[1] = ref;
|
|
2350
2148
|
$[2] = stats;
|
|
2351
|
-
$[3] =
|
|
2352
|
-
} else
|
|
2353
|
-
const switchable =
|
|
2149
|
+
$[3] = t0;
|
|
2150
|
+
} else t0 = $[3];
|
|
2151
|
+
const switchable = t0;
|
|
2354
2152
|
const target = `${rack}-${index}`;
|
|
2355
|
-
let
|
|
2153
|
+
let t1;
|
|
2356
2154
|
if ($[4] !== available || $[5] !== charges || $[6] !== fit || $[7] !== index || $[8] !== placement || $[9] !== rack || $[10] !== ref || $[11] !== sde) {
|
|
2357
|
-
|
|
2155
|
+
t1 = (drop) => {
|
|
2358
2156
|
if (!available || drop === void 0) return false;
|
|
2359
2157
|
if (drop.type === "item") return movesTo(fit, drop.ref, rack, index);
|
|
2360
2158
|
const dropped = sde.type(drop.typeId);
|
|
@@ -2371,37 +2169,29 @@ function FittingSlot(t0) {
|
|
|
2371
2169
|
$[9] = rack;
|
|
2372
2170
|
$[10] = ref;
|
|
2373
2171
|
$[11] = sde;
|
|
2374
|
-
$[12] =
|
|
2375
|
-
} else
|
|
2376
|
-
const takes =
|
|
2377
|
-
|
|
2172
|
+
$[12] = t1;
|
|
2173
|
+
} else t1 = $[12];
|
|
2174
|
+
const takes = t1;
|
|
2175
|
+
const t2 = content?.preview;
|
|
2176
|
+
const t3 = item?.type_id;
|
|
2177
|
+
const t4 = type?.name;
|
|
2178
|
+
const t5 = item?.charge?.type_id;
|
|
2179
|
+
const t6 = charges.length > 0;
|
|
2180
|
+
const t7 = stats?.state;
|
|
2181
|
+
const t8 = stats?.maxState === "active" || stats?.maxState === "overload";
|
|
2182
|
+
const t9 = type && stats && `${type.name}, ${stats.state}`;
|
|
2183
|
+
let t10;
|
|
2378
2184
|
if ($[13] !== ref || $[14] !== stats || $[15] !== store || $[16] !== switchable) {
|
|
2379
|
-
|
|
2185
|
+
t10 = switchable ? (event) => store.setState(ref, nextState(stats.state, stats.maxState, event.shiftKey)) : void 0;
|
|
2380
2186
|
$[13] = ref;
|
|
2381
2187
|
$[14] = stats;
|
|
2382
2188
|
$[15] = store;
|
|
2383
2189
|
$[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) => {
|
|
2190
|
+
$[17] = t10;
|
|
2191
|
+
} else t10 = $[17];
|
|
2192
|
+
let t11;
|
|
2193
|
+
if ($[18] !== ref || $[19] !== start || $[20] !== type?.name) {
|
|
2194
|
+
t11 = ref === void 0 ? void 0 : (event_0) => {
|
|
2405
2195
|
event_0.dataTransfer.effectAllowed = "move";
|
|
2406
2196
|
event_0.dataTransfer.setData("text/plain", type?.name ?? "");
|
|
2407
2197
|
start({
|
|
@@ -2409,14 +2199,14 @@ function FittingSlot(t0) {
|
|
|
2409
2199
|
ref
|
|
2410
2200
|
});
|
|
2411
2201
|
};
|
|
2412
|
-
$[
|
|
2413
|
-
$[
|
|
2414
|
-
$[
|
|
2415
|
-
$[
|
|
2416
|
-
} else
|
|
2417
|
-
let
|
|
2418
|
-
if ($[
|
|
2419
|
-
|
|
2202
|
+
$[18] = ref;
|
|
2203
|
+
$[19] = start;
|
|
2204
|
+
$[20] = type?.name;
|
|
2205
|
+
$[21] = t11;
|
|
2206
|
+
} else t11 = $[21];
|
|
2207
|
+
let t12;
|
|
2208
|
+
if ($[22] !== dragging || $[23] !== index || $[24] !== rack || $[25] !== show || $[26] !== takes || $[27] !== target) {
|
|
2209
|
+
t12 = () => {
|
|
2420
2210
|
if (!takes(dragging)) return;
|
|
2421
2211
|
const slot = {
|
|
2422
2212
|
type: rack,
|
|
@@ -2424,45 +2214,45 @@ function FittingSlot(t0) {
|
|
|
2424
2214
|
};
|
|
2425
2215
|
if (dragging.type === "type") {
|
|
2426
2216
|
const { typeId } = dragging;
|
|
2427
|
-
|
|
2217
|
+
show((draft) => void draft.fit(typeId, slot), target);
|
|
2428
2218
|
} else {
|
|
2429
2219
|
const { ref: moved } = dragging;
|
|
2430
|
-
|
|
2220
|
+
show((draft_0) => draft_0.move(moved, slot), target);
|
|
2431
2221
|
}
|
|
2432
2222
|
};
|
|
2433
|
-
$[
|
|
2434
|
-
$[
|
|
2435
|
-
$[
|
|
2436
|
-
$[
|
|
2437
|
-
$[
|
|
2438
|
-
$[
|
|
2439
|
-
$[
|
|
2440
|
-
} else
|
|
2441
|
-
let
|
|
2442
|
-
if ($[
|
|
2443
|
-
|
|
2223
|
+
$[22] = dragging;
|
|
2224
|
+
$[23] = index;
|
|
2225
|
+
$[24] = rack;
|
|
2226
|
+
$[25] = show;
|
|
2227
|
+
$[26] = takes;
|
|
2228
|
+
$[27] = target;
|
|
2229
|
+
$[28] = t12;
|
|
2230
|
+
} else t12 = $[28];
|
|
2231
|
+
let t13;
|
|
2232
|
+
if ($[29] !== clear || $[30] !== target) {
|
|
2233
|
+
t13 = (event_1) => {
|
|
2444
2234
|
if (event_1.currentTarget.contains(event_1.relatedTarget)) return;
|
|
2445
|
-
|
|
2235
|
+
clear(target);
|
|
2446
2236
|
};
|
|
2447
|
-
$[
|
|
2448
|
-
$[
|
|
2449
|
-
$[
|
|
2450
|
-
} else
|
|
2451
|
-
let
|
|
2452
|
-
if ($[
|
|
2453
|
-
|
|
2237
|
+
$[29] = clear;
|
|
2238
|
+
$[30] = target;
|
|
2239
|
+
$[31] = t13;
|
|
2240
|
+
} else t13 = $[31];
|
|
2241
|
+
let t14;
|
|
2242
|
+
if ($[32] !== dragging || $[33] !== takes) {
|
|
2243
|
+
t14 = (event_2) => {
|
|
2454
2244
|
if (takes(dragging)) allowDrop(event_2, dragging);
|
|
2455
2245
|
};
|
|
2456
|
-
$[
|
|
2457
|
-
$[
|
|
2458
|
-
$[
|
|
2459
|
-
} else
|
|
2460
|
-
let
|
|
2461
|
-
if ($[
|
|
2462
|
-
|
|
2246
|
+
$[32] = dragging;
|
|
2247
|
+
$[33] = takes;
|
|
2248
|
+
$[34] = t14;
|
|
2249
|
+
} else t14 = $[34];
|
|
2250
|
+
let t15;
|
|
2251
|
+
if ($[35] !== clear || $[36] !== dragging || $[37] !== end || $[38] !== index || $[39] !== rack || $[40] !== store || $[41] !== takes || $[42] !== target) {
|
|
2252
|
+
t15 = (event_3) => {
|
|
2463
2253
|
if (!takes(dragging)) return;
|
|
2464
2254
|
event_3.preventDefault();
|
|
2465
|
-
|
|
2255
|
+
clear(target);
|
|
2466
2256
|
if (dragging.type === "type") store.fit(dragging.typeId, {
|
|
2467
2257
|
type: rack,
|
|
2468
2258
|
index
|
|
@@ -2473,88 +2263,88 @@ function FittingSlot(t0) {
|
|
|
2473
2263
|
});
|
|
2474
2264
|
end();
|
|
2475
2265
|
};
|
|
2476
|
-
$[
|
|
2477
|
-
$[
|
|
2478
|
-
$[
|
|
2479
|
-
$[
|
|
2480
|
-
$[
|
|
2481
|
-
$[
|
|
2482
|
-
$[
|
|
2483
|
-
$[
|
|
2484
|
-
$[
|
|
2485
|
-
} else
|
|
2486
|
-
let
|
|
2266
|
+
$[35] = clear;
|
|
2267
|
+
$[36] = dragging;
|
|
2268
|
+
$[37] = end;
|
|
2269
|
+
$[38] = index;
|
|
2270
|
+
$[39] = rack;
|
|
2271
|
+
$[40] = store;
|
|
2272
|
+
$[41] = takes;
|
|
2273
|
+
$[42] = target;
|
|
2274
|
+
$[43] = t15;
|
|
2275
|
+
} else t15 = $[43];
|
|
2276
|
+
let t16;
|
|
2277
|
+
if ($[44] !== ref || $[45] !== store) {
|
|
2278
|
+
t16 = ref === void 0 ? void 0 : () => store.remove(ref);
|
|
2279
|
+
$[44] = ref;
|
|
2280
|
+
$[45] = store;
|
|
2281
|
+
$[46] = t16;
|
|
2282
|
+
} else t16 = $[46];
|
|
2283
|
+
let t17;
|
|
2487
2284
|
if ($[47] !== ref || $[48] !== store) {
|
|
2488
|
-
|
|
2285
|
+
t17 = ref === void 0 ? void 0 : () => store.setCharge(ref, void 0);
|
|
2489
2286
|
$[47] = ref;
|
|
2490
2287
|
$[48] = store;
|
|
2491
|
-
$[49] =
|
|
2492
|
-
} else
|
|
2493
|
-
let
|
|
2494
|
-
if ($[50] !== ref || $[51] !== store) {
|
|
2495
|
-
|
|
2288
|
+
$[49] = t17;
|
|
2289
|
+
} else t17 = $[49];
|
|
2290
|
+
let t18;
|
|
2291
|
+
if ($[50] !== ref || $[51] !== stats || $[52] !== store || $[53] !== switchable) {
|
|
2292
|
+
t18 = switchable && stats.maxState !== "offline" ? () => store.setState(ref, stats.state === "offline" ? "online" : "offline") : void 0;
|
|
2496
2293
|
$[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,
|
|
2294
|
+
$[51] = stats;
|
|
2295
|
+
$[52] = store;
|
|
2296
|
+
$[53] = switchable;
|
|
2297
|
+
$[54] = t18;
|
|
2298
|
+
} else t18 = $[54];
|
|
2299
|
+
let t19;
|
|
2300
|
+
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) {
|
|
2301
|
+
t19 = {
|
|
2514
2302
|
available,
|
|
2515
|
-
preview:
|
|
2516
|
-
typeId:
|
|
2517
|
-
typeName:
|
|
2518
|
-
chargeTypeId:
|
|
2519
|
-
chargeable:
|
|
2520
|
-
state:
|
|
2521
|
-
activatable:
|
|
2522
|
-
label:
|
|
2523
|
-
onPress,
|
|
2524
|
-
onDragStart:
|
|
2303
|
+
preview: t2,
|
|
2304
|
+
typeId: t3,
|
|
2305
|
+
typeName: t4,
|
|
2306
|
+
chargeTypeId: t5,
|
|
2307
|
+
chargeable: t6,
|
|
2308
|
+
state: t7,
|
|
2309
|
+
activatable: t8,
|
|
2310
|
+
label: t9,
|
|
2311
|
+
onPress: t10,
|
|
2312
|
+
onDragStart: t11,
|
|
2525
2313
|
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
|
-
|
|
2314
|
+
onDragEnter: t12,
|
|
2315
|
+
onDragLeave: t13,
|
|
2316
|
+
onDragOver: t14,
|
|
2317
|
+
onDrop: t15,
|
|
2318
|
+
onUnfit: t16,
|
|
2319
|
+
onRemoveCharge: t17,
|
|
2320
|
+
onTogglePower: t18
|
|
2321
|
+
};
|
|
2322
|
+
$[55] = available;
|
|
2323
|
+
$[56] = end;
|
|
2324
|
+
$[57] = t10;
|
|
2325
|
+
$[58] = t11;
|
|
2326
|
+
$[59] = t12;
|
|
2327
|
+
$[60] = t13;
|
|
2328
|
+
$[61] = t14;
|
|
2329
|
+
$[62] = t15;
|
|
2330
|
+
$[63] = t16;
|
|
2331
|
+
$[64] = t17;
|
|
2332
|
+
$[65] = t18;
|
|
2333
|
+
$[66] = t2;
|
|
2334
|
+
$[67] = t3;
|
|
2335
|
+
$[68] = t4;
|
|
2336
|
+
$[69] = t5;
|
|
2337
|
+
$[70] = t6;
|
|
2338
|
+
$[71] = t7;
|
|
2339
|
+
$[72] = t8;
|
|
2340
|
+
$[73] = t9;
|
|
2341
|
+
$[74] = t19;
|
|
2342
|
+
} else t19 = $[74];
|
|
2343
|
+
return t19;
|
|
2344
|
+
}
|
|
2345
|
+
function allowDrop(event, dragging) {
|
|
2346
|
+
event.preventDefault();
|
|
2347
|
+
event.dataTransfer.dropEffect = dragging.type === "type" ? "copy" : "move";
|
|
2558
2348
|
}
|
|
2559
2349
|
/** Whether a fitted item can move to this slot. */
|
|
2560
2350
|
function movesTo(fit, ref, rack, index) {
|
|
@@ -2562,6 +2352,246 @@ function movesTo(fit, ref, rack, index) {
|
|
|
2562
2352
|
if (item === void 0 || rack === "subsystem" || item.slot.type !== rack) return false;
|
|
2563
2353
|
return "index" in item.slot && item.slot.index !== index;
|
|
2564
2354
|
}
|
|
2355
|
+
//#endregion
|
|
2356
|
+
//#region src/components/FittingWheel/FittingWheel.module.css
|
|
2357
|
+
var FittingWheel_module_default = { "centre": "GK_wGG_centre" };
|
|
2358
|
+
//#endregion
|
|
2359
|
+
//#region src/components/FittingWheel/FittingWheel.tsx
|
|
2360
|
+
const markedRacks = [
|
|
2361
|
+
"high",
|
|
2362
|
+
"medium",
|
|
2363
|
+
"low"
|
|
2364
|
+
];
|
|
2365
|
+
const racks = [
|
|
2366
|
+
"high",
|
|
2367
|
+
"medium",
|
|
2368
|
+
"low",
|
|
2369
|
+
"rig",
|
|
2370
|
+
"subsystem"
|
|
2371
|
+
];
|
|
2372
|
+
/** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
|
|
2373
|
+
function FittingWheel(t0) {
|
|
2374
|
+
const $ = c(15);
|
|
2375
|
+
const { label: t1 } = t0;
|
|
2376
|
+
const label = t1 === void 0 ? "Fitting" : t1;
|
|
2377
|
+
const ship = useFit().ship.type_id;
|
|
2378
|
+
const { turret, launcher } = useHardpoints();
|
|
2379
|
+
let t2;
|
|
2380
|
+
if ($[0] !== ship) {
|
|
2381
|
+
t2 = /* @__PURE__ */ jsx(WheelHull, { typeId: ship });
|
|
2382
|
+
$[0] = ship;
|
|
2383
|
+
$[1] = t2;
|
|
2384
|
+
} else t2 = $[1];
|
|
2385
|
+
let t3;
|
|
2386
|
+
let t4;
|
|
2387
|
+
let t5;
|
|
2388
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2389
|
+
t3 = /* @__PURE__ */ jsx(FittingCentre, {});
|
|
2390
|
+
t4 = markedRacks.map(_temp$6);
|
|
2391
|
+
t5 = racks.map(_temp2$3);
|
|
2392
|
+
$[2] = t3;
|
|
2393
|
+
$[3] = t4;
|
|
2394
|
+
$[4] = t5;
|
|
2395
|
+
} else {
|
|
2396
|
+
t3 = $[2];
|
|
2397
|
+
t4 = $[3];
|
|
2398
|
+
t5 = $[4];
|
|
2399
|
+
}
|
|
2400
|
+
let t6;
|
|
2401
|
+
if ($[5] !== launcher || $[6] !== turret) {
|
|
2402
|
+
t6 = /* @__PURE__ */ jsx(WheelHardpoints, {
|
|
2403
|
+
turrets: turret,
|
|
2404
|
+
launchers: launcher
|
|
2405
|
+
});
|
|
2406
|
+
$[5] = launcher;
|
|
2407
|
+
$[6] = turret;
|
|
2408
|
+
$[7] = t6;
|
|
2409
|
+
} else t6 = $[7];
|
|
2410
|
+
let t7;
|
|
2411
|
+
let t8;
|
|
2412
|
+
let t9;
|
|
2413
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2414
|
+
t7 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2415
|
+
resource: "cpu",
|
|
2416
|
+
load: "cpuLoad",
|
|
2417
|
+
output: "cpuOutput"
|
|
2418
|
+
});
|
|
2419
|
+
t8 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2420
|
+
resource: "powergrid",
|
|
2421
|
+
load: "powerLoad",
|
|
2422
|
+
output: "powerOutput"
|
|
2423
|
+
});
|
|
2424
|
+
t9 = /* @__PURE__ */ jsx(FittingGauge, {
|
|
2425
|
+
resource: "calibration",
|
|
2426
|
+
load: "upgradeLoad",
|
|
2427
|
+
output: "upgradeCapacity"
|
|
2428
|
+
});
|
|
2429
|
+
$[8] = t7;
|
|
2430
|
+
$[9] = t8;
|
|
2431
|
+
$[10] = t9;
|
|
2432
|
+
} else {
|
|
2433
|
+
t7 = $[8];
|
|
2434
|
+
t8 = $[9];
|
|
2435
|
+
t9 = $[10];
|
|
2436
|
+
}
|
|
2437
|
+
let t10;
|
|
2438
|
+
if ($[11] !== label || $[12] !== t2 || $[13] !== t6) {
|
|
2439
|
+
t10 = /* @__PURE__ */ jsxs(Wheel, {
|
|
2440
|
+
label,
|
|
2441
|
+
children: [
|
|
2442
|
+
t2,
|
|
2443
|
+
t3,
|
|
2444
|
+
t4,
|
|
2445
|
+
t5,
|
|
2446
|
+
t6,
|
|
2447
|
+
t7,
|
|
2448
|
+
t8,
|
|
2449
|
+
t9
|
|
2450
|
+
]
|
|
2451
|
+
});
|
|
2452
|
+
$[11] = label;
|
|
2453
|
+
$[12] = t2;
|
|
2454
|
+
$[13] = t6;
|
|
2455
|
+
$[14] = t10;
|
|
2456
|
+
} else t10 = $[14];
|
|
2457
|
+
return t10;
|
|
2458
|
+
}
|
|
2459
|
+
function _temp2$3(rack_0) {
|
|
2460
|
+
return /* @__PURE__ */ jsx(FittingRack, { rack: rack_0 }, rack_0);
|
|
2461
|
+
}
|
|
2462
|
+
function _temp$6(rack) {
|
|
2463
|
+
return /* @__PURE__ */ jsx(WheelRackMarker, { rack }, rack);
|
|
2464
|
+
}
|
|
2465
|
+
function FittingRack(t0) {
|
|
2466
|
+
const $ = c(4);
|
|
2467
|
+
const { rack } = t0;
|
|
2468
|
+
const slots = useSlots(rack);
|
|
2469
|
+
const { total } = useRackUsage(rack);
|
|
2470
|
+
let t1;
|
|
2471
|
+
if ($[0] !== rack || $[1] !== slots || $[2] !== total) {
|
|
2472
|
+
const shown = markedRacks.includes(rack) ? rackSize(rack) : Math.min(slots.length, rackSize(rack));
|
|
2473
|
+
t1 = Array.from({ length: shown }, (_, index) => /* @__PURE__ */ jsx(FittingSlot, {
|
|
2474
|
+
rack,
|
|
2475
|
+
index,
|
|
2476
|
+
content: slots[index],
|
|
2477
|
+
available: index < total
|
|
2478
|
+
}, index));
|
|
2479
|
+
$[0] = rack;
|
|
2480
|
+
$[1] = slots;
|
|
2481
|
+
$[2] = total;
|
|
2482
|
+
$[3] = t1;
|
|
2483
|
+
} else t1 = $[3];
|
|
2484
|
+
return t1;
|
|
2485
|
+
}
|
|
2486
|
+
/** Fits a type dropped in the middle of the wheel, and unfits a fitted item. */
|
|
2487
|
+
function FittingCentre() {
|
|
2488
|
+
const $ = c(25);
|
|
2489
|
+
const store = useFitStore();
|
|
2490
|
+
const fit = useFit();
|
|
2491
|
+
const { show, clear } = usePreview();
|
|
2492
|
+
const { dragging, end } = useDrag();
|
|
2493
|
+
let t0;
|
|
2494
|
+
if ($[0] !== dragging || $[1] !== store) {
|
|
2495
|
+
t0 = dragging?.type === "type" && placesSomewhere(store, dragging.typeId);
|
|
2496
|
+
$[0] = dragging;
|
|
2497
|
+
$[1] = store;
|
|
2498
|
+
$[2] = t0;
|
|
2499
|
+
} else t0 = $[2];
|
|
2500
|
+
const fits = t0;
|
|
2501
|
+
let t1;
|
|
2502
|
+
if ($[3] !== fit || $[4] !== fits) {
|
|
2503
|
+
t1 = (item) => item !== void 0 && (item.type === "type" ? fits : fit.items[item.ref] !== void 0);
|
|
2504
|
+
$[3] = fit;
|
|
2505
|
+
$[4] = fits;
|
|
2506
|
+
$[5] = t1;
|
|
2507
|
+
} else t1 = $[5];
|
|
2508
|
+
const takes = t1;
|
|
2509
|
+
let t2;
|
|
2510
|
+
if ($[6] !== dragging || $[7] !== show) {
|
|
2511
|
+
t2 = () => {
|
|
2512
|
+
if (dragging?.type !== "type") return;
|
|
2513
|
+
const { typeId } = dragging;
|
|
2514
|
+
show((draft) => void draft.fit(typeId), "centre");
|
|
2515
|
+
};
|
|
2516
|
+
$[6] = dragging;
|
|
2517
|
+
$[7] = show;
|
|
2518
|
+
$[8] = t2;
|
|
2519
|
+
} else t2 = $[8];
|
|
2520
|
+
let t3;
|
|
2521
|
+
if ($[9] !== clear) {
|
|
2522
|
+
t3 = () => clear("centre");
|
|
2523
|
+
$[9] = clear;
|
|
2524
|
+
$[10] = t3;
|
|
2525
|
+
} else t3 = $[10];
|
|
2526
|
+
let t4;
|
|
2527
|
+
if ($[11] !== dragging || $[12] !== takes) {
|
|
2528
|
+
t4 = (event) => {
|
|
2529
|
+
if (takes(dragging)) allowDrop(event, dragging);
|
|
2530
|
+
};
|
|
2531
|
+
$[11] = dragging;
|
|
2532
|
+
$[12] = takes;
|
|
2533
|
+
$[13] = t4;
|
|
2534
|
+
} else t4 = $[13];
|
|
2535
|
+
let t5;
|
|
2536
|
+
if ($[14] !== clear || $[15] !== dragging || $[16] !== end || $[17] !== store || $[18] !== takes) {
|
|
2537
|
+
t5 = (event_0) => {
|
|
2538
|
+
if (!takes(dragging)) return;
|
|
2539
|
+
event_0.preventDefault();
|
|
2540
|
+
clear("centre");
|
|
2541
|
+
if (dragging.type === "type") store.fit(dragging.typeId);
|
|
2542
|
+
else store.remove(dragging.ref);
|
|
2543
|
+
end();
|
|
2544
|
+
};
|
|
2545
|
+
$[14] = clear;
|
|
2546
|
+
$[15] = dragging;
|
|
2547
|
+
$[16] = end;
|
|
2548
|
+
$[17] = store;
|
|
2549
|
+
$[18] = takes;
|
|
2550
|
+
$[19] = t5;
|
|
2551
|
+
} else t5 = $[19];
|
|
2552
|
+
let t6;
|
|
2553
|
+
if ($[20] !== t2 || $[21] !== t3 || $[22] !== t4 || $[23] !== t5) {
|
|
2554
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
2555
|
+
className: FittingWheel_module_default.centre,
|
|
2556
|
+
"data-centre": true,
|
|
2557
|
+
onDragEnter: t2,
|
|
2558
|
+
onDragLeave: t3,
|
|
2559
|
+
onDragOver: t4,
|
|
2560
|
+
onDrop: t5
|
|
2561
|
+
});
|
|
2562
|
+
$[20] = t2;
|
|
2563
|
+
$[21] = t3;
|
|
2564
|
+
$[22] = t4;
|
|
2565
|
+
$[23] = t5;
|
|
2566
|
+
$[24] = t6;
|
|
2567
|
+
} else t6 = $[24];
|
|
2568
|
+
return t6;
|
|
2569
|
+
}
|
|
2570
|
+
function FittingSlot(t0) {
|
|
2571
|
+
const $ = c(7);
|
|
2572
|
+
const { rack, index, content, available } = t0;
|
|
2573
|
+
const slot = useFittingSlot(rack, index, content, available);
|
|
2574
|
+
let t1;
|
|
2575
|
+
if ($[0] !== index || $[1] !== rack) {
|
|
2576
|
+
t1 = slotAngle(rack, index);
|
|
2577
|
+
$[0] = index;
|
|
2578
|
+
$[1] = rack;
|
|
2579
|
+
$[2] = t1;
|
|
2580
|
+
} else t1 = $[2];
|
|
2581
|
+
let t2;
|
|
2582
|
+
if ($[3] !== rack || $[4] !== slot || $[5] !== t1) {
|
|
2583
|
+
t2 = /* @__PURE__ */ jsx(WheelSlot, {
|
|
2584
|
+
rack,
|
|
2585
|
+
angle: t1,
|
|
2586
|
+
...slot
|
|
2587
|
+
});
|
|
2588
|
+
$[3] = rack;
|
|
2589
|
+
$[4] = slot;
|
|
2590
|
+
$[5] = t1;
|
|
2591
|
+
$[6] = t2;
|
|
2592
|
+
} else t2 = $[6];
|
|
2593
|
+
return t2;
|
|
2594
|
+
}
|
|
2565
2595
|
function placesSomewhere(store, typeId) {
|
|
2566
2596
|
let placed = false;
|
|
2567
2597
|
store.preview((draft) => {
|
|
@@ -2569,10 +2599,6 @@ function placesSomewhere(store, typeId) {
|
|
|
2569
2599
|
});
|
|
2570
2600
|
return placed;
|
|
2571
2601
|
}
|
|
2572
|
-
function allowDrop(event, dragging) {
|
|
2573
|
-
event.preventDefault();
|
|
2574
|
-
event.dataTransfer.dropEffect = dragging.type === "type" ? "copy" : "move";
|
|
2575
|
-
}
|
|
2576
2602
|
function FittingGauge(t0) {
|
|
2577
2603
|
const $ = c(7);
|
|
2578
2604
|
const { resource, load, output } = t0;
|
|
@@ -2603,6 +2629,199 @@ function FittingGauge(t0) {
|
|
|
2603
2629
|
return t4;
|
|
2604
2630
|
}
|
|
2605
2631
|
//#endregion
|
|
2632
|
+
//#region src/primitives/ServiceSlot/ServiceSlot.module.css
|
|
2633
|
+
var ServiceSlot_module_default = {
|
|
2634
|
+
"action": "R9jwpW_action",
|
|
2635
|
+
"actions": "R9jwpW_actions",
|
|
2636
|
+
"body": "R9jwpW_body",
|
|
2637
|
+
"empty": "R9jwpW_empty",
|
|
2638
|
+
"icon": "R9jwpW_icon",
|
|
2639
|
+
"press": "R9jwpW_press",
|
|
2640
|
+
"slot": "R9jwpW_slot"
|
|
2641
|
+
};
|
|
2642
|
+
//#endregion
|
|
2643
|
+
//#region src/primitives/ServiceSlot/ServiceSlot.tsx
|
|
2644
|
+
/** EVE's square slot of a structure service module, below the wheel. */
|
|
2645
|
+
function ServiceSlot(t0) {
|
|
2646
|
+
const $ = c(48);
|
|
2647
|
+
let className;
|
|
2648
|
+
let label;
|
|
2649
|
+
let onDragEnd;
|
|
2650
|
+
let onDragStart;
|
|
2651
|
+
let onPress;
|
|
2652
|
+
let onTogglePower;
|
|
2653
|
+
let onUnfit;
|
|
2654
|
+
let props;
|
|
2655
|
+
let t1;
|
|
2656
|
+
let t2;
|
|
2657
|
+
let t3;
|
|
2658
|
+
let typeId;
|
|
2659
|
+
let typeName;
|
|
2660
|
+
if ($[0] !== t0) {
|
|
2661
|
+
({typeId, typeName, state: t1, available: t2, preview: t3, onPress, onDragStart, onDragEnd, label, onUnfit, onTogglePower, className, ...props} = t0);
|
|
2662
|
+
$[0] = t0;
|
|
2663
|
+
$[1] = className;
|
|
2664
|
+
$[2] = label;
|
|
2665
|
+
$[3] = onDragEnd;
|
|
2666
|
+
$[4] = onDragStart;
|
|
2667
|
+
$[5] = onPress;
|
|
2668
|
+
$[6] = onTogglePower;
|
|
2669
|
+
$[7] = onUnfit;
|
|
2670
|
+
$[8] = props;
|
|
2671
|
+
$[9] = t1;
|
|
2672
|
+
$[10] = t2;
|
|
2673
|
+
$[11] = t3;
|
|
2674
|
+
$[12] = typeId;
|
|
2675
|
+
$[13] = typeName;
|
|
2676
|
+
} else {
|
|
2677
|
+
className = $[1];
|
|
2678
|
+
label = $[2];
|
|
2679
|
+
onDragEnd = $[3];
|
|
2680
|
+
onDragStart = $[4];
|
|
2681
|
+
onPress = $[5];
|
|
2682
|
+
onTogglePower = $[6];
|
|
2683
|
+
onUnfit = $[7];
|
|
2684
|
+
props = $[8];
|
|
2685
|
+
t1 = $[9];
|
|
2686
|
+
t2 = $[10];
|
|
2687
|
+
t3 = $[11];
|
|
2688
|
+
typeId = $[12];
|
|
2689
|
+
typeName = $[13];
|
|
2690
|
+
}
|
|
2691
|
+
const state = t1 === void 0 ? "online" : t1;
|
|
2692
|
+
const available = t2 === void 0 ? true : t2;
|
|
2693
|
+
const preview = t3 === void 0 ? false : t3;
|
|
2694
|
+
const images = useImages();
|
|
2695
|
+
const fitted = typeId !== void 0;
|
|
2696
|
+
const frame = fitted && !preview ? "classes/fitting/slotpassive_structure" : "classes/fitting/stationserviceslotframe";
|
|
2697
|
+
const actions = fitted && !preview;
|
|
2698
|
+
let t4;
|
|
2699
|
+
if ($[14] !== className) {
|
|
2700
|
+
t4 = [ServiceSlot_module_default.slot, className].filter(Boolean);
|
|
2701
|
+
$[14] = className;
|
|
2702
|
+
$[15] = t4;
|
|
2703
|
+
} else t4 = $[15];
|
|
2704
|
+
const t5 = t4.join(" ");
|
|
2705
|
+
const t6 = fitted ? state : available ? "empty" : "unavailable";
|
|
2706
|
+
const t7 = preview || void 0;
|
|
2707
|
+
let t8;
|
|
2708
|
+
if ($[16] !== frame || $[17] !== images) {
|
|
2709
|
+
t8 = images.uiTexture(frame);
|
|
2710
|
+
$[16] = frame;
|
|
2711
|
+
$[17] = images;
|
|
2712
|
+
$[18] = t8;
|
|
2713
|
+
} else t8 = $[18];
|
|
2714
|
+
const t9 = `url(${t8})`;
|
|
2715
|
+
let t10;
|
|
2716
|
+
if ($[19] !== t9) {
|
|
2717
|
+
t10 = { "--texture": t9 };
|
|
2718
|
+
$[19] = t9;
|
|
2719
|
+
$[20] = t10;
|
|
2720
|
+
} else t10 = $[20];
|
|
2721
|
+
const t11 = t10;
|
|
2722
|
+
const t12 = onDragStart !== void 0 || void 0;
|
|
2723
|
+
let t13;
|
|
2724
|
+
if ($[21] !== available || $[22] !== fitted || $[23] !== typeId) {
|
|
2725
|
+
t13 = fitted ? /* @__PURE__ */ jsx("span", {
|
|
2726
|
+
className: ServiceSlot_module_default.icon,
|
|
2727
|
+
children: /* @__PURE__ */ jsx(TypeIcon, {
|
|
2728
|
+
typeId,
|
|
2729
|
+
size: 64,
|
|
2730
|
+
marker: false
|
|
2731
|
+
})
|
|
2732
|
+
}) : available && /* @__PURE__ */ jsx("span", {
|
|
2733
|
+
className: ServiceSlot_module_default.empty,
|
|
2734
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "slot-service" })
|
|
2735
|
+
});
|
|
2736
|
+
$[21] = available;
|
|
2737
|
+
$[22] = fitted;
|
|
2738
|
+
$[23] = typeId;
|
|
2739
|
+
$[24] = t13;
|
|
2740
|
+
} else t13 = $[24];
|
|
2741
|
+
let t14;
|
|
2742
|
+
if ($[25] !== label || $[26] !== onPress) {
|
|
2743
|
+
t14 = onPress && /* @__PURE__ */ jsx(SlotPress, {
|
|
2744
|
+
className: ServiceSlot_module_default.press,
|
|
2745
|
+
label,
|
|
2746
|
+
onPress
|
|
2747
|
+
});
|
|
2748
|
+
$[25] = label;
|
|
2749
|
+
$[26] = onPress;
|
|
2750
|
+
$[27] = t14;
|
|
2751
|
+
} else t14 = $[27];
|
|
2752
|
+
let t15;
|
|
2753
|
+
if ($[28] !== onDragEnd || $[29] !== onDragStart || $[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t14) {
|
|
2754
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
2755
|
+
className: ServiceSlot_module_default.body,
|
|
2756
|
+
style: t11,
|
|
2757
|
+
draggable: t12,
|
|
2758
|
+
onDragStart,
|
|
2759
|
+
onDragEnd,
|
|
2760
|
+
children: [t13, t14]
|
|
2761
|
+
});
|
|
2762
|
+
$[28] = onDragEnd;
|
|
2763
|
+
$[29] = onDragStart;
|
|
2764
|
+
$[30] = t11;
|
|
2765
|
+
$[31] = t12;
|
|
2766
|
+
$[32] = t13;
|
|
2767
|
+
$[33] = t14;
|
|
2768
|
+
$[34] = t15;
|
|
2769
|
+
} else t15 = $[34];
|
|
2770
|
+
let t16;
|
|
2771
|
+
if ($[35] !== actions || $[36] !== onTogglePower || $[37] !== onUnfit || $[38] !== state || $[39] !== typeName) {
|
|
2772
|
+
t16 = actions && /* @__PURE__ */ jsxs("fieldset", {
|
|
2773
|
+
className: ServiceSlot_module_default.actions,
|
|
2774
|
+
"aria-label": typeName,
|
|
2775
|
+
children: [
|
|
2776
|
+
/* @__PURE__ */ jsx("span", {
|
|
2777
|
+
className: ServiceSlot_module_default.action,
|
|
2778
|
+
children: onUnfit && /* @__PURE__ */ jsx(SlotAction, {
|
|
2779
|
+
icon: "module-unfit",
|
|
2780
|
+
label: "Unfit Module",
|
|
2781
|
+
onPress: onUnfit
|
|
2782
|
+
})
|
|
2783
|
+
}),
|
|
2784
|
+
/* @__PURE__ */ jsx("span", {
|
|
2785
|
+
className: ServiceSlot_module_default.action,
|
|
2786
|
+
children: /* @__PURE__ */ jsx(SlotInfo, {})
|
|
2787
|
+
}),
|
|
2788
|
+
onTogglePower && /* @__PURE__ */ jsx("span", {
|
|
2789
|
+
className: ServiceSlot_module_default.action,
|
|
2790
|
+
children: /* @__PURE__ */ jsx(SlotAction, {
|
|
2791
|
+
icon: "module-power",
|
|
2792
|
+
label: state === "offline" ? "Put Online" : "Put Offline",
|
|
2793
|
+
onPress: onTogglePower
|
|
2794
|
+
})
|
|
2795
|
+
})
|
|
2796
|
+
]
|
|
2797
|
+
});
|
|
2798
|
+
$[35] = actions;
|
|
2799
|
+
$[36] = onTogglePower;
|
|
2800
|
+
$[37] = onUnfit;
|
|
2801
|
+
$[38] = state;
|
|
2802
|
+
$[39] = typeName;
|
|
2803
|
+
$[40] = t16;
|
|
2804
|
+
} else t16 = $[40];
|
|
2805
|
+
let t17;
|
|
2806
|
+
if ($[41] !== props || $[42] !== t15 || $[43] !== t16 || $[44] !== t5 || $[45] !== t6 || $[46] !== t7) {
|
|
2807
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
2808
|
+
...props,
|
|
2809
|
+
className: t5,
|
|
2810
|
+
"data-state": t6,
|
|
2811
|
+
"data-preview": t7,
|
|
2812
|
+
children: [t15, t16]
|
|
2813
|
+
});
|
|
2814
|
+
$[41] = props;
|
|
2815
|
+
$[42] = t15;
|
|
2816
|
+
$[43] = t16;
|
|
2817
|
+
$[44] = t5;
|
|
2818
|
+
$[45] = t6;
|
|
2819
|
+
$[46] = t7;
|
|
2820
|
+
$[47] = t17;
|
|
2821
|
+
} else t17 = $[47];
|
|
2822
|
+
return t17;
|
|
2823
|
+
}
|
|
2824
|
+
//#endregion
|
|
2606
2825
|
//#region src/components/ShipStatistics/AttributeTooltip.tsx
|
|
2607
2826
|
/** What EVE shows when hovering the attribute; its name, for one without. */
|
|
2608
2827
|
function AttributeTooltip(t0) {
|
|
@@ -2772,7 +2991,7 @@ function BayContents(t0) {
|
|
|
2772
2991
|
type: "button",
|
|
2773
2992
|
className: BayContents_module_default.removeAll,
|
|
2774
2993
|
onClick: () => {
|
|
2775
|
-
store.remove(...contents.flatMap(_temp$
|
|
2994
|
+
store.remove(...contents.flatMap(_temp$5));
|
|
2776
2995
|
panel.current?.hidePopover();
|
|
2777
2996
|
},
|
|
2778
2997
|
children: "Remove All"
|
|
@@ -2805,7 +3024,7 @@ function BayContents(t0) {
|
|
|
2805
3024
|
return t7;
|
|
2806
3025
|
}
|
|
2807
3026
|
/** One box per drone the character can launch. */
|
|
2808
|
-
function _temp$
|
|
3027
|
+
function _temp$5(t0) {
|
|
2809
3028
|
const { refs: refs_0 } = t0;
|
|
2810
3029
|
return refs_0;
|
|
2811
3030
|
}
|
|
@@ -3044,6 +3263,9 @@ function Quantity(t0) {
|
|
|
3044
3263
|
//#endregion
|
|
3045
3264
|
//#region src/components/FittingWindow/FittingWindow.module.css
|
|
3046
3265
|
var FittingWindow_module_default = {
|
|
3266
|
+
"alert": "L9t91q_alert",
|
|
3267
|
+
"alertLine": "L9t91q_alertLine",
|
|
3268
|
+
"alertTitle": "L9t91q_alertTitle",
|
|
3047
3269
|
"bay": "L9t91q_bay",
|
|
3048
3270
|
"bayAnchor": "L9t91q_bayAnchor",
|
|
3049
3271
|
"bays": "L9t91q_bays",
|
|
@@ -3058,6 +3280,7 @@ var FittingWindow_module_default = {
|
|
|
3058
3280
|
"panels": "L9t91q_panels",
|
|
3059
3281
|
"resource": "L9t91q_resource",
|
|
3060
3282
|
"resources": "L9t91q_resources",
|
|
3283
|
+
"services": "L9t91q_services",
|
|
3061
3284
|
"slash": "L9t91q_slash",
|
|
3062
3285
|
"slide": "L9t91q_slide",
|
|
3063
3286
|
"statistics": "L9t91q_statistics",
|
|
@@ -3122,15 +3345,89 @@ function countViolations(violations) {
|
|
|
3122
3345
|
counts.skill = skills.size;
|
|
3123
3346
|
return counts;
|
|
3124
3347
|
}
|
|
3348
|
+
const resourceTexts = {
|
|
3349
|
+
cpu: "CPU overloaded",
|
|
3350
|
+
powergrid: "Powergrid overloaded",
|
|
3351
|
+
calibration: "Calibration overloaded",
|
|
3352
|
+
cargo_bay: "Cargo hold overloaded",
|
|
3353
|
+
drone_bay: "Drone bay overloaded",
|
|
3354
|
+
drone_bandwidth: "Drone bandwidth overloaded",
|
|
3355
|
+
fighter_bay: "Fighter bay overloaded",
|
|
3356
|
+
launched_drones: "Too many drones launched",
|
|
3357
|
+
fighter_tubes: "Too many fighters launched",
|
|
3358
|
+
light_fighter_tubes: "Too many light fighters launched",
|
|
3359
|
+
support_fighter_tubes: "Too many support fighters launched",
|
|
3360
|
+
heavy_fighter_tubes: "Too many heavy fighters launched"
|
|
3361
|
+
};
|
|
3362
|
+
const rackItems = {
|
|
3363
|
+
high: "high slot modules",
|
|
3364
|
+
medium: "medium slot modules",
|
|
3365
|
+
low: "low slot modules",
|
|
3366
|
+
rig: "rigs",
|
|
3367
|
+
subsystem: "subsystems",
|
|
3368
|
+
service: "service modules",
|
|
3369
|
+
turret: "turrets",
|
|
3370
|
+
launcher: "launchers"
|
|
3371
|
+
};
|
|
3372
|
+
const slotNames = {
|
|
3373
|
+
high: "a high slot",
|
|
3374
|
+
medium: "a medium slot",
|
|
3375
|
+
low: "a low slot",
|
|
3376
|
+
rig: "a rig slot",
|
|
3377
|
+
subsystem: "a subsystem slot",
|
|
3378
|
+
service: "a service slot",
|
|
3379
|
+
turret: "a turret hardpoint",
|
|
3380
|
+
launcher: "a launcher hardpoint"
|
|
3381
|
+
};
|
|
3382
|
+
const romanLevels = [
|
|
3383
|
+
"I",
|
|
3384
|
+
"II",
|
|
3385
|
+
"III",
|
|
3386
|
+
"IV",
|
|
3387
|
+
"V"
|
|
3388
|
+
];
|
|
3389
|
+
/** What is wrong, or the skill that is missing. */
|
|
3390
|
+
function violationText({ target, rule }, fit, names) {
|
|
3391
|
+
const item = target.type === "ship" ? void 0 : fit.items[target.index];
|
|
3392
|
+
const module = item ? names.type(item.type_id) : "";
|
|
3393
|
+
const charge = item?.charge ? names.type(item.charge.type_id) : "";
|
|
3394
|
+
const subject = target.type === "charge" ? charge : module;
|
|
3395
|
+
switch (rule.type) {
|
|
3396
|
+
case "resource": return rule.resource === "charge_capacity" ? `${charge}: too big for ${module}` : resourceTexts[rule.resource];
|
|
3397
|
+
case "slots": return `Too many ${rackItems[rule.slot]}`;
|
|
3398
|
+
case "skill": return `${names.type(rule.type_id)} ${romanLevels[rule.required - 1]}`;
|
|
3399
|
+
case "wrong_slot": return `${subject}: goes in ${slotNames[rule.expected]}`;
|
|
3400
|
+
case "slot_taken": return `${subject}: slot already taken`;
|
|
3401
|
+
case "wrong_slot_index": return `${subject}: goes in ${item?.slot.type} slot ${rule.expected}`;
|
|
3402
|
+
case "subsystem_taken": return `${subject}: another subsystem covers the same part of the ship`;
|
|
3403
|
+
case "rig_size": return `${subject}: rig size does not match the ship`;
|
|
3404
|
+
case "ship_restricted": return `${subject}: cannot be fitted to this ship`;
|
|
3405
|
+
case "capital_item": return `${subject}: needs a capital ship`;
|
|
3406
|
+
case "structure_item": return `${subject}: only fits on a structure`;
|
|
3407
|
+
case "ship_item": return `${subject}: does not fit on a structure`;
|
|
3408
|
+
case "max_group": return `${subject}: only ${rule.allowed} ${names.group(rule.group_id)} can be ${rule.limit}`;
|
|
3409
|
+
case "max_type": return `${subject}: only ${rule.allowed} can be fitted`;
|
|
3410
|
+
case "charge_group": return `${charge}: cannot be loaded in ${module}`;
|
|
3411
|
+
case "charge_size": return `${charge}: wrong size for ${module}`;
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
/** Each missing skill once, at the highest level asked for. */
|
|
3415
|
+
function missingSkills(violations) {
|
|
3416
|
+
const skills = /* @__PURE__ */ new Map();
|
|
3417
|
+
for (const { rule } of violations) if (rule.type === "skill" && rule.required > (skills.get(rule.type_id)?.required ?? 0)) skills.set(rule.type_id, rule);
|
|
3418
|
+
return [...skills.values()];
|
|
3419
|
+
}
|
|
3125
3420
|
//#endregion
|
|
3126
3421
|
//#region src/components/FittingWindow/FittingWindow.tsx
|
|
3127
3422
|
const oneDecimal = new Intl.NumberFormat("en-US", {
|
|
3128
3423
|
minimumFractionDigits: 1,
|
|
3129
3424
|
maximumFractionDigits: 1
|
|
3130
3425
|
});
|
|
3426
|
+
/** EVE draws eight, those the structure does not have as a faint outline. */
|
|
3427
|
+
const SERVICE_SLOTS = 8;
|
|
3131
3428
|
/** EVE's fitting window around the `FittingWheel`. */
|
|
3132
3429
|
function FittingWindow(t0) {
|
|
3133
|
-
const $ = c(
|
|
3430
|
+
const $ = c(38);
|
|
3134
3431
|
const { label: t1, browser, statistics } = t0;
|
|
3135
3432
|
const label = t1 === void 0 ? "Fitting Window" : t1;
|
|
3136
3433
|
const [browserOpen, setBrowserOpen] = useState(true);
|
|
@@ -3139,6 +3436,7 @@ function FittingWindow(t0) {
|
|
|
3139
3436
|
const statisticsId = useId();
|
|
3140
3437
|
const browserShown = browser !== void 0 && browserOpen;
|
|
3141
3438
|
const statisticsShown = statistics !== void 0 && statisticsOpen;
|
|
3439
|
+
const { structure } = useSnapshot().stats;
|
|
3142
3440
|
const t2 = browserShown || void 0;
|
|
3143
3441
|
const t3 = statisticsShown || void 0;
|
|
3144
3442
|
let t4;
|
|
@@ -3220,10 +3518,16 @@ function FittingWindow(t0) {
|
|
|
3220
3518
|
$[14] = t9;
|
|
3221
3519
|
} else t9 = $[14];
|
|
3222
3520
|
let t10;
|
|
3223
|
-
|
|
3224
|
-
|
|
3521
|
+
let t11;
|
|
3522
|
+
if ($[15] !== structure) {
|
|
3523
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
3225
3524
|
className: FittingWindow_module_default.bays,
|
|
3226
|
-
children: [/* @__PURE__ */ jsx(Bay, {
|
|
3525
|
+
children: structure ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Bay, {
|
|
3526
|
+
bay: "cargo",
|
|
3527
|
+
icon: "ammo-hold",
|
|
3528
|
+
label: "Ammo Hold",
|
|
3529
|
+
unlimited: true
|
|
3530
|
+
}), /* @__PURE__ */ jsx(FighterBay, {})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Bay, {
|
|
3227
3531
|
bay: "cargo",
|
|
3228
3532
|
icon: "cargo",
|
|
3229
3533
|
label: "Cargo Hold"
|
|
@@ -3231,21 +3535,28 @@ function FittingWindow(t0) {
|
|
|
3231
3535
|
bay: "droneBay",
|
|
3232
3536
|
icon: "drone-bay",
|
|
3233
3537
|
label: "Drone Bay"
|
|
3234
|
-
})]
|
|
3538
|
+
})] })
|
|
3235
3539
|
});
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
$[16] = t11;
|
|
3245
|
-
} else t11 = $[16];
|
|
3540
|
+
t11 = structure && /* @__PURE__ */ jsx(ServiceRack, {});
|
|
3541
|
+
$[15] = structure;
|
|
3542
|
+
$[16] = t10;
|
|
3543
|
+
$[17] = t11;
|
|
3544
|
+
} else {
|
|
3545
|
+
t10 = $[16];
|
|
3546
|
+
t11 = $[17];
|
|
3547
|
+
}
|
|
3246
3548
|
let t12;
|
|
3247
|
-
if ($[
|
|
3248
|
-
t12 = /* @__PURE__ */
|
|
3549
|
+
if ($[18] !== structure) {
|
|
3550
|
+
t12 = /* @__PURE__ */ jsx("div", {
|
|
3551
|
+
className: FittingWindow_module_default.history,
|
|
3552
|
+
children: /* @__PURE__ */ jsx(SimulationHistory, { tooltipTitle: structure })
|
|
3553
|
+
});
|
|
3554
|
+
$[18] = structure;
|
|
3555
|
+
$[19] = t12;
|
|
3556
|
+
} else t12 = $[19];
|
|
3557
|
+
let t13;
|
|
3558
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3559
|
+
t13 = /* @__PURE__ */ jsxs("div", {
|
|
3249
3560
|
className: FittingWindow_module_default.resources,
|
|
3250
3561
|
children: [/* @__PURE__ */ jsx(Resource, {
|
|
3251
3562
|
title: "CPU",
|
|
@@ -3257,11 +3568,11 @@ function FittingWindow(t0) {
|
|
|
3257
3568
|
output: "powerOutput"
|
|
3258
3569
|
})]
|
|
3259
3570
|
});
|
|
3260
|
-
$[
|
|
3261
|
-
} else
|
|
3262
|
-
let
|
|
3263
|
-
if ($[
|
|
3264
|
-
|
|
3571
|
+
$[20] = t13;
|
|
3572
|
+
} else t13 = $[20];
|
|
3573
|
+
let t14;
|
|
3574
|
+
if ($[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t8 || $[25] !== t9) {
|
|
3575
|
+
t14 = /* @__PURE__ */ jsxs("div", {
|
|
3265
3576
|
className: FittingWindow_module_default.frame,
|
|
3266
3577
|
children: [
|
|
3267
3578
|
t5,
|
|
@@ -3271,16 +3582,20 @@ function FittingWindow(t0) {
|
|
|
3271
3582
|
t9,
|
|
3272
3583
|
t10,
|
|
3273
3584
|
t11,
|
|
3274
|
-
t12
|
|
3585
|
+
t12,
|
|
3586
|
+
t13
|
|
3275
3587
|
]
|
|
3276
3588
|
});
|
|
3277
|
-
$[
|
|
3278
|
-
$[
|
|
3279
|
-
$[
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3589
|
+
$[21] = t10;
|
|
3590
|
+
$[22] = t11;
|
|
3591
|
+
$[23] = t12;
|
|
3592
|
+
$[24] = t8;
|
|
3593
|
+
$[25] = t9;
|
|
3594
|
+
$[26] = t14;
|
|
3595
|
+
} else t14 = $[26];
|
|
3596
|
+
let t15;
|
|
3597
|
+
if ($[27] !== statistics || $[28] !== statisticsId || $[29] !== statisticsShown) {
|
|
3598
|
+
t15 = statistics !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
3284
3599
|
id: statisticsId,
|
|
3285
3600
|
className: FittingWindow_module_default.statistics,
|
|
3286
3601
|
inert: !statisticsShown,
|
|
@@ -3289,33 +3604,33 @@ function FittingWindow(t0) {
|
|
|
3289
3604
|
children: statistics
|
|
3290
3605
|
})
|
|
3291
3606
|
});
|
|
3292
|
-
$[
|
|
3293
|
-
$[
|
|
3294
|
-
$[
|
|
3295
|
-
$[
|
|
3296
|
-
} else
|
|
3297
|
-
let
|
|
3298
|
-
if ($[
|
|
3299
|
-
|
|
3607
|
+
$[27] = statistics;
|
|
3608
|
+
$[28] = statisticsId;
|
|
3609
|
+
$[29] = statisticsShown;
|
|
3610
|
+
$[30] = t15;
|
|
3611
|
+
} else t15 = $[30];
|
|
3612
|
+
let t16;
|
|
3613
|
+
if ($[31] !== label || $[32] !== t14 || $[33] !== t15 || $[34] !== t2 || $[35] !== t3 || $[36] !== t4) {
|
|
3614
|
+
t16 = /* @__PURE__ */ jsxs("section", {
|
|
3300
3615
|
className: FittingWindow_module_default.window,
|
|
3301
3616
|
"aria-label": label,
|
|
3302
3617
|
"data-browser": t2,
|
|
3303
3618
|
"data-statistics": t3,
|
|
3304
3619
|
children: [
|
|
3305
3620
|
t4,
|
|
3306
|
-
|
|
3307
|
-
|
|
3621
|
+
t14,
|
|
3622
|
+
t15
|
|
3308
3623
|
]
|
|
3309
3624
|
});
|
|
3310
|
-
$[
|
|
3311
|
-
$[
|
|
3312
|
-
$[
|
|
3313
|
-
$[
|
|
3314
|
-
$[
|
|
3315
|
-
$[
|
|
3316
|
-
$[
|
|
3317
|
-
} else
|
|
3318
|
-
return
|
|
3625
|
+
$[31] = label;
|
|
3626
|
+
$[32] = t14;
|
|
3627
|
+
$[33] = t15;
|
|
3628
|
+
$[34] = t2;
|
|
3629
|
+
$[35] = t3;
|
|
3630
|
+
$[36] = t4;
|
|
3631
|
+
$[37] = t16;
|
|
3632
|
+
} else t16 = $[37];
|
|
3633
|
+
return t16;
|
|
3319
3634
|
}
|
|
3320
3635
|
function FitName() {
|
|
3321
3636
|
const $ = c(4);
|
|
@@ -3362,64 +3677,133 @@ function FitName() {
|
|
|
3362
3677
|
const violationKinds = [
|
|
3363
3678
|
{
|
|
3364
3679
|
kind: "error",
|
|
3365
|
-
label: "Fitting Errors"
|
|
3680
|
+
label: "Fitting Errors",
|
|
3681
|
+
title: "Fitting Alert"
|
|
3366
3682
|
},
|
|
3367
3683
|
{
|
|
3368
3684
|
kind: "skill",
|
|
3369
|
-
label: "Missing Skills"
|
|
3685
|
+
label: "Missing Skills",
|
|
3686
|
+
title: "Missing Skills"
|
|
3370
3687
|
},
|
|
3371
3688
|
{
|
|
3372
3689
|
kind: "notice",
|
|
3373
|
-
label: "Fitting Warnings"
|
|
3690
|
+
label: "Fitting Warnings",
|
|
3691
|
+
title: "Fitting Warning"
|
|
3374
3692
|
}
|
|
3375
3693
|
];
|
|
3376
3694
|
function Violations() {
|
|
3377
|
-
const $ = c(
|
|
3695
|
+
const $ = c(17);
|
|
3378
3696
|
const images = useImages();
|
|
3379
|
-
const
|
|
3697
|
+
const sde = useSde();
|
|
3698
|
+
const { fit, stats } = useShownSnapshot();
|
|
3699
|
+
let t0;
|
|
3700
|
+
if ($[0] !== stats.violations) {
|
|
3701
|
+
t0 = countViolations(stats.violations);
|
|
3702
|
+
$[0] = stats.violations;
|
|
3703
|
+
$[1] = t0;
|
|
3704
|
+
} else t0 = $[1];
|
|
3705
|
+
const counts = t0;
|
|
3706
|
+
const descriptionId = useId();
|
|
3380
3707
|
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
3708
|
let t2;
|
|
3388
|
-
if ($[2] !==
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3709
|
+
if ($[2] !== sde) {
|
|
3710
|
+
t1 = (id) => sde.type(id)?.name ?? `#${id}`;
|
|
3711
|
+
t2 = (id_0) => sde.group(id_0)?.name ?? `#${id_0}`;
|
|
3712
|
+
$[2] = sde;
|
|
3713
|
+
$[3] = t1;
|
|
3714
|
+
$[4] = t2;
|
|
3715
|
+
} else {
|
|
3716
|
+
t1 = $[3];
|
|
3717
|
+
t2 = $[4];
|
|
3718
|
+
}
|
|
3719
|
+
let t3;
|
|
3720
|
+
let t4;
|
|
3721
|
+
if ($[5] !== counts || $[6] !== descriptionId || $[7] !== fit || $[8] !== images || $[9] !== stats.violations || $[10] !== t1 || $[11] !== t2) {
|
|
3722
|
+
const names = {
|
|
3723
|
+
type: t1,
|
|
3724
|
+
group: t2
|
|
3725
|
+
};
|
|
3726
|
+
const linesOf = (kind) => {
|
|
3727
|
+
const violations = kind === "skill" ? missingSkills(stats.violations).map(_temp$4) : stats.violations.filter((t5) => {
|
|
3728
|
+
const { rule: rule_0 } = t5;
|
|
3729
|
+
return violationKind(rule_0) === kind;
|
|
3730
|
+
});
|
|
3731
|
+
return [...new Set(violations.map((violation) => violationText(violation, fit, names)))];
|
|
3732
|
+
};
|
|
3733
|
+
t3 = FittingWindow_module_default.violations;
|
|
3734
|
+
t4 = violationKinds.map((t6) => {
|
|
3735
|
+
const { kind: kind_0, label, title } = t6;
|
|
3736
|
+
const shown = counts[kind_0];
|
|
3392
3737
|
if (shown === 0) return null;
|
|
3393
|
-
const
|
|
3738
|
+
const lines = linesOf(kind_0);
|
|
3739
|
+
const textureStyle = { "--texture": `url(${images.uiTexture(kind_0 === "skill" ? "classes/fitting/warningskills" : "classes/fitting/warninggroup")})` };
|
|
3394
3740
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
3395
|
-
label:
|
|
3396
|
-
|
|
3741
|
+
label: /* @__PURE__ */ jsx("span", {
|
|
3742
|
+
className: FittingWindow_module_default.alert,
|
|
3743
|
+
"data-kind": kind_0,
|
|
3744
|
+
style: textureStyle,
|
|
3745
|
+
children: /* @__PURE__ */ jsx(TooltipText, {
|
|
3746
|
+
title: /* @__PURE__ */ jsx("span", {
|
|
3747
|
+
className: FittingWindow_module_default.alertTitle,
|
|
3748
|
+
children: title
|
|
3749
|
+
}),
|
|
3750
|
+
description: lines.map(_temp2$2)
|
|
3751
|
+
})
|
|
3752
|
+
}),
|
|
3753
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
3397
3754
|
className: FittingWindow_module_default.violation,
|
|
3398
3755
|
role: "img",
|
|
3399
3756
|
"aria-label": `${label}: ${shown}`,
|
|
3400
|
-
"
|
|
3401
|
-
|
|
3402
|
-
|
|
3757
|
+
"aria-describedby": `${descriptionId}-${kind_0}`,
|
|
3758
|
+
"data-kind": kind_0,
|
|
3759
|
+
style: textureStyle,
|
|
3760
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
3403
3761
|
className: FittingWindow_module_default.count,
|
|
3404
3762
|
children: shown
|
|
3405
|
-
})
|
|
3763
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
3764
|
+
id: `${descriptionId}-${kind_0}`,
|
|
3765
|
+
hidden: true,
|
|
3766
|
+
children: lines.join(", ")
|
|
3767
|
+
})]
|
|
3406
3768
|
})
|
|
3407
|
-
},
|
|
3408
|
-
});
|
|
3409
|
-
$[
|
|
3410
|
-
$[
|
|
3411
|
-
$[
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3769
|
+
}, kind_0);
|
|
3770
|
+
});
|
|
3771
|
+
$[5] = counts;
|
|
3772
|
+
$[6] = descriptionId;
|
|
3773
|
+
$[7] = fit;
|
|
3774
|
+
$[8] = images;
|
|
3775
|
+
$[9] = stats.violations;
|
|
3776
|
+
$[10] = t1;
|
|
3777
|
+
$[11] = t2;
|
|
3778
|
+
$[12] = t3;
|
|
3779
|
+
$[13] = t4;
|
|
3780
|
+
} else {
|
|
3781
|
+
t3 = $[12];
|
|
3782
|
+
t4 = $[13];
|
|
3783
|
+
}
|
|
3784
|
+
let t5;
|
|
3785
|
+
if ($[14] !== t3 || $[15] !== t4) {
|
|
3786
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
3787
|
+
className: t3,
|
|
3788
|
+
children: t4
|
|
3418
3789
|
});
|
|
3419
|
-
$[
|
|
3420
|
-
$[
|
|
3421
|
-
|
|
3422
|
-
|
|
3790
|
+
$[14] = t3;
|
|
3791
|
+
$[15] = t4;
|
|
3792
|
+
$[16] = t5;
|
|
3793
|
+
} else t5 = $[16];
|
|
3794
|
+
return t5;
|
|
3795
|
+
}
|
|
3796
|
+
function _temp2$2(line) {
|
|
3797
|
+
return /* @__PURE__ */ jsx("span", {
|
|
3798
|
+
className: FittingWindow_module_default.alertLine,
|
|
3799
|
+
children: line
|
|
3800
|
+
}, line);
|
|
3801
|
+
}
|
|
3802
|
+
function _temp$4(rule) {
|
|
3803
|
+
return {
|
|
3804
|
+
target: { type: "ship" },
|
|
3805
|
+
rule
|
|
3806
|
+
};
|
|
3423
3807
|
}
|
|
3424
3808
|
function NotImplementedButton(t0) {
|
|
3425
3809
|
const $ = c(9);
|
|
@@ -3458,144 +3842,204 @@ function NotImplementedButton(t0) {
|
|
|
3458
3842
|
return t4;
|
|
3459
3843
|
}
|
|
3460
3844
|
function Bay(t0) {
|
|
3461
|
-
const $ = c(
|
|
3462
|
-
const { bay, icon, label } = t0;
|
|
3845
|
+
const $ = c(24);
|
|
3846
|
+
const { bay, icon, label, unlimited: t1 } = t0;
|
|
3847
|
+
const unlimited = t1 === void 0 ? false : t1;
|
|
3463
3848
|
const { used, total } = useBayUsage(bay);
|
|
3464
3849
|
const id = useId();
|
|
3465
3850
|
const drop = useBayDrop(bay);
|
|
3466
|
-
let
|
|
3851
|
+
let t2;
|
|
3467
3852
|
if ($[0] !== id) {
|
|
3468
|
-
let
|
|
3853
|
+
let t3;
|
|
3469
3854
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3470
|
-
|
|
3471
|
-
$[2] =
|
|
3472
|
-
} else
|
|
3473
|
-
|
|
3855
|
+
t3 = /[^\w-]/g;
|
|
3856
|
+
$[2] = t3;
|
|
3857
|
+
} else t3 = $[2];
|
|
3858
|
+
t2 = id.replace(t3, "");
|
|
3474
3859
|
$[0] = id;
|
|
3475
|
-
$[1] =
|
|
3476
|
-
} else
|
|
3477
|
-
const
|
|
3478
|
-
let
|
|
3479
|
-
if ($[3] !==
|
|
3480
|
-
|
|
3481
|
-
$[3] =
|
|
3482
|
-
$[4] =
|
|
3483
|
-
} else
|
|
3484
|
-
const
|
|
3485
|
-
const
|
|
3486
|
-
let
|
|
3860
|
+
$[1] = t2;
|
|
3861
|
+
} else t2 = $[1];
|
|
3862
|
+
const t3 = `--bay-${t2}`;
|
|
3863
|
+
let t4;
|
|
3864
|
+
if ($[3] !== t3) {
|
|
3865
|
+
t4 = { "--bay-anchor": t3 };
|
|
3866
|
+
$[3] = t3;
|
|
3867
|
+
$[4] = t4;
|
|
3868
|
+
} else t4 = $[4];
|
|
3869
|
+
const t5 = t4;
|
|
3870
|
+
const t6 = !unlimited && used > total || void 0;
|
|
3871
|
+
let t7;
|
|
3872
|
+
if ($[5] !== drop || $[6] !== icon || $[7] !== id || $[8] !== label || $[9] !== t6 || $[10] !== total || $[11] !== used) {
|
|
3873
|
+
t7 = /* @__PURE__ */ jsx(BayButton, {
|
|
3874
|
+
icon,
|
|
3875
|
+
used,
|
|
3876
|
+
total,
|
|
3877
|
+
"aria-label": label,
|
|
3878
|
+
popoverTarget: id,
|
|
3879
|
+
"data-over": t6,
|
|
3880
|
+
...drop
|
|
3881
|
+
});
|
|
3882
|
+
$[5] = drop;
|
|
3883
|
+
$[6] = icon;
|
|
3884
|
+
$[7] = id;
|
|
3885
|
+
$[8] = label;
|
|
3886
|
+
$[9] = t6;
|
|
3887
|
+
$[10] = total;
|
|
3888
|
+
$[11] = used;
|
|
3889
|
+
$[12] = t7;
|
|
3890
|
+
} else t7 = $[12];
|
|
3891
|
+
let t8;
|
|
3892
|
+
if ($[13] !== label || $[14] !== t7) {
|
|
3893
|
+
t8 = /* @__PURE__ */ jsx(Tooltip, {
|
|
3894
|
+
label,
|
|
3895
|
+
children: t7
|
|
3896
|
+
});
|
|
3897
|
+
$[13] = label;
|
|
3898
|
+
$[14] = t7;
|
|
3899
|
+
$[15] = t8;
|
|
3900
|
+
} else t8 = $[15];
|
|
3901
|
+
let t9;
|
|
3902
|
+
if ($[16] !== bay || $[17] !== id || $[18] !== label) {
|
|
3903
|
+
t9 = /* @__PURE__ */ jsx(BayContents, {
|
|
3904
|
+
id,
|
|
3905
|
+
bay,
|
|
3906
|
+
label
|
|
3907
|
+
});
|
|
3908
|
+
$[16] = bay;
|
|
3909
|
+
$[17] = id;
|
|
3910
|
+
$[18] = label;
|
|
3911
|
+
$[19] = t9;
|
|
3912
|
+
} else t9 = $[19];
|
|
3913
|
+
let t10;
|
|
3914
|
+
if ($[20] !== t5 || $[21] !== t8 || $[22] !== t9) {
|
|
3915
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
3916
|
+
className: FittingWindow_module_default.bayAnchor,
|
|
3917
|
+
style: t5,
|
|
3918
|
+
children: [t8, t9]
|
|
3919
|
+
});
|
|
3920
|
+
$[20] = t5;
|
|
3921
|
+
$[21] = t8;
|
|
3922
|
+
$[22] = t9;
|
|
3923
|
+
$[23] = t10;
|
|
3924
|
+
} else t10 = $[23];
|
|
3925
|
+
return t10;
|
|
3926
|
+
}
|
|
3927
|
+
function FighterBay() {
|
|
3928
|
+
const $ = c(4);
|
|
3929
|
+
const { used, total } = useBayUsage("fighterBay");
|
|
3930
|
+
const t0 = used > total || void 0;
|
|
3931
|
+
let t1;
|
|
3932
|
+
if ($[0] !== t0 || $[1] !== total || $[2] !== used) {
|
|
3933
|
+
t1 = /* @__PURE__ */ jsx(Tooltip, {
|
|
3934
|
+
label: "Fighter Bay (not implemented yet)",
|
|
3935
|
+
children: /* @__PURE__ */ jsx(BayButton, {
|
|
3936
|
+
icon: "drone-bay",
|
|
3937
|
+
used,
|
|
3938
|
+
total,
|
|
3939
|
+
"aria-label": "Fighter Bay",
|
|
3940
|
+
"aria-disabled": true,
|
|
3941
|
+
"data-over": t0
|
|
3942
|
+
})
|
|
3943
|
+
});
|
|
3944
|
+
$[0] = t0;
|
|
3945
|
+
$[1] = total;
|
|
3946
|
+
$[2] = used;
|
|
3947
|
+
$[3] = t1;
|
|
3948
|
+
} else t1 = $[3];
|
|
3949
|
+
return t1;
|
|
3950
|
+
}
|
|
3951
|
+
function BayButton(t0) {
|
|
3952
|
+
const $ = c(22);
|
|
3953
|
+
let icon;
|
|
3954
|
+
let props;
|
|
3955
|
+
let total;
|
|
3956
|
+
let used;
|
|
3957
|
+
if ($[0] !== t0) {
|
|
3958
|
+
({icon, used, total, ...props} = t0);
|
|
3959
|
+
$[0] = t0;
|
|
3960
|
+
$[1] = icon;
|
|
3961
|
+
$[2] = props;
|
|
3962
|
+
$[3] = total;
|
|
3963
|
+
$[4] = used;
|
|
3964
|
+
} else {
|
|
3965
|
+
icon = $[1];
|
|
3966
|
+
props = $[2];
|
|
3967
|
+
total = $[3];
|
|
3968
|
+
used = $[4];
|
|
3969
|
+
}
|
|
3970
|
+
let t1;
|
|
3487
3971
|
if ($[5] !== icon) {
|
|
3488
|
-
|
|
3972
|
+
t1 = /* @__PURE__ */ jsx(Icon, { name: icon });
|
|
3489
3973
|
$[5] = icon;
|
|
3490
|
-
$[6] =
|
|
3491
|
-
} else
|
|
3492
|
-
let
|
|
3974
|
+
$[6] = t1;
|
|
3975
|
+
} else t1 = $[6];
|
|
3976
|
+
let t2;
|
|
3493
3977
|
if ($[7] !== used) {
|
|
3494
|
-
|
|
3978
|
+
t2 = oneDecimal.format(used);
|
|
3495
3979
|
$[7] = used;
|
|
3496
|
-
$[8] =
|
|
3497
|
-
} else
|
|
3498
|
-
let
|
|
3499
|
-
if ($[9] !==
|
|
3500
|
-
|
|
3980
|
+
$[8] = t2;
|
|
3981
|
+
} else t2 = $[8];
|
|
3982
|
+
let t3;
|
|
3983
|
+
if ($[9] !== t2) {
|
|
3984
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
3501
3985
|
className: FittingWindow_module_default.used,
|
|
3502
|
-
children:
|
|
3986
|
+
children: t2
|
|
3503
3987
|
});
|
|
3504
|
-
$[9] =
|
|
3505
|
-
$[10] =
|
|
3506
|
-
} else
|
|
3507
|
-
let
|
|
3988
|
+
$[9] = t2;
|
|
3989
|
+
$[10] = t3;
|
|
3990
|
+
} else t3 = $[10];
|
|
3991
|
+
let t4;
|
|
3508
3992
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3509
|
-
|
|
3993
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
3510
3994
|
className: FittingWindow_module_default.slash,
|
|
3511
3995
|
children: "/"
|
|
3512
3996
|
});
|
|
3513
|
-
$[11] =
|
|
3514
|
-
} else
|
|
3515
|
-
let
|
|
3997
|
+
$[11] = t4;
|
|
3998
|
+
} else t4 = $[11];
|
|
3999
|
+
let t5;
|
|
3516
4000
|
if ($[12] !== total) {
|
|
3517
|
-
|
|
4001
|
+
t5 = oneDecimal.format(total);
|
|
3518
4002
|
$[12] = total;
|
|
3519
|
-
$[13] =
|
|
3520
|
-
} else
|
|
3521
|
-
let
|
|
3522
|
-
if ($[14] !==
|
|
3523
|
-
|
|
4003
|
+
$[13] = t5;
|
|
4004
|
+
} else t5 = $[13];
|
|
4005
|
+
let t6;
|
|
4006
|
+
if ($[14] !== t5) {
|
|
4007
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
3524
4008
|
className: FittingWindow_module_default.total,
|
|
3525
|
-
children:
|
|
4009
|
+
children: t5
|
|
3526
4010
|
});
|
|
3527
|
-
$[14] =
|
|
3528
|
-
$[15] =
|
|
3529
|
-
} else
|
|
3530
|
-
let
|
|
4011
|
+
$[14] = t5;
|
|
4012
|
+
$[15] = t6;
|
|
4013
|
+
} else t6 = $[15];
|
|
4014
|
+
let t7;
|
|
3531
4015
|
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3532
|
-
|
|
4016
|
+
t7 = /* @__PURE__ */ jsx("span", {
|
|
3533
4017
|
className: FittingWindow_module_default.unit,
|
|
3534
4018
|
children: "m3"
|
|
3535
4019
|
});
|
|
3536
|
-
$[16] =
|
|
3537
|
-
} else
|
|
3538
|
-
let
|
|
3539
|
-
if ($[17] !==
|
|
3540
|
-
|
|
4020
|
+
$[16] = t7;
|
|
4021
|
+
} else t7 = $[16];
|
|
4022
|
+
let t8;
|
|
4023
|
+
if ($[17] !== props || $[18] !== t1 || $[19] !== t3 || $[20] !== t6) {
|
|
4024
|
+
t8 = /* @__PURE__ */ jsxs("button", {
|
|
3541
4025
|
type: "button",
|
|
3542
4026
|
className: FittingWindow_module_default.bay,
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
t6,
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
t11,
|
|
3552
|
-
t12
|
|
3553
|
-
]
|
|
3554
|
-
});
|
|
3555
|
-
$[17] = drop;
|
|
3556
|
-
$[18] = id;
|
|
3557
|
-
$[19] = label;
|
|
3558
|
-
$[20] = t11;
|
|
3559
|
-
$[21] = t5;
|
|
3560
|
-
$[22] = t6;
|
|
3561
|
-
$[23] = t8;
|
|
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]
|
|
4027
|
+
...props,
|
|
4028
|
+
children: [
|
|
4029
|
+
t1,
|
|
4030
|
+
t3,
|
|
4031
|
+
t4,
|
|
4032
|
+
t6,
|
|
4033
|
+
t7
|
|
4034
|
+
]
|
|
3592
4035
|
});
|
|
3593
|
-
$[
|
|
3594
|
-
$[
|
|
3595
|
-
$[
|
|
3596
|
-
$[
|
|
3597
|
-
|
|
3598
|
-
|
|
4036
|
+
$[17] = props;
|
|
4037
|
+
$[18] = t1;
|
|
4038
|
+
$[19] = t3;
|
|
4039
|
+
$[20] = t6;
|
|
4040
|
+
$[21] = t8;
|
|
4041
|
+
} else t8 = $[21];
|
|
4042
|
+
return t8;
|
|
3599
4043
|
}
|
|
3600
4044
|
const baySlots = {
|
|
3601
4045
|
cargo: { type: "cargo" },
|
|
@@ -3771,23 +4215,67 @@ function Resource(t0) {
|
|
|
3771
4215
|
} else t10 = $[20];
|
|
3772
4216
|
return t10;
|
|
3773
4217
|
}
|
|
3774
|
-
function
|
|
4218
|
+
function ServiceRack() {
|
|
4219
|
+
const $ = c(3);
|
|
4220
|
+
const slots = useSlots("service");
|
|
4221
|
+
const { total } = useRackUsage("service");
|
|
4222
|
+
let t0;
|
|
4223
|
+
if ($[0] !== slots || $[1] !== total) {
|
|
4224
|
+
t0 = /* @__PURE__ */ jsx("div", {
|
|
4225
|
+
className: FittingWindow_module_default.services,
|
|
4226
|
+
role: "group",
|
|
4227
|
+
"aria-label": "Structure Services",
|
|
4228
|
+
children: Array.from({ length: SERVICE_SLOTS }, (_, index) => /* @__PURE__ */ jsx(FittingServiceSlot, {
|
|
4229
|
+
index,
|
|
4230
|
+
available: index < total,
|
|
4231
|
+
content: slots[index]
|
|
4232
|
+
}, index))
|
|
4233
|
+
});
|
|
4234
|
+
$[0] = slots;
|
|
4235
|
+
$[1] = total;
|
|
4236
|
+
$[2] = t0;
|
|
4237
|
+
} else t0 = $[2];
|
|
4238
|
+
return t0;
|
|
4239
|
+
}
|
|
4240
|
+
function FittingServiceSlot(t0) {
|
|
3775
4241
|
const $ = c(4);
|
|
4242
|
+
const { index, available, content } = t0;
|
|
4243
|
+
const t1 = useFittingSlot("service", index, content, available);
|
|
4244
|
+
let slot;
|
|
4245
|
+
if ($[0] !== t1) {
|
|
4246
|
+
const { chargeTypeId, chargeable, activatable, onRemoveCharge, ...t2 } = t1;
|
|
4247
|
+
slot = t2;
|
|
4248
|
+
$[0] = t1;
|
|
4249
|
+
$[1] = slot;
|
|
4250
|
+
} else slot = $[1];
|
|
4251
|
+
let t2;
|
|
4252
|
+
if ($[2] !== slot) {
|
|
4253
|
+
t2 = /* @__PURE__ */ jsx(ServiceSlot, { ...slot });
|
|
4254
|
+
$[2] = slot;
|
|
4255
|
+
$[3] = t2;
|
|
4256
|
+
} else t2 = $[3];
|
|
4257
|
+
return t2;
|
|
4258
|
+
}
|
|
4259
|
+
function SimulationHistory(t0) {
|
|
4260
|
+
const $ = c(5);
|
|
4261
|
+
const { tooltipTitle } = t0;
|
|
3776
4262
|
const history = useFitHistory();
|
|
3777
|
-
let
|
|
3778
|
-
if ($[0] !== history.goTo || $[1] !== history.length || $[2] !== history.position) {
|
|
3779
|
-
|
|
4263
|
+
let t1;
|
|
4264
|
+
if ($[0] !== history.goTo || $[1] !== history.length || $[2] !== history.position || $[3] !== tooltipTitle) {
|
|
4265
|
+
t1 = /* @__PURE__ */ jsx(HistoryBar, {
|
|
3780
4266
|
label: "Simulation History",
|
|
3781
4267
|
length: history.length,
|
|
3782
4268
|
position: history.position,
|
|
3783
|
-
onGoTo: history.goTo
|
|
4269
|
+
onGoTo: history.goTo,
|
|
4270
|
+
tooltipTitle
|
|
3784
4271
|
});
|
|
3785
4272
|
$[0] = history.goTo;
|
|
3786
4273
|
$[1] = history.length;
|
|
3787
4274
|
$[2] = history.position;
|
|
3788
|
-
$[3] =
|
|
3789
|
-
|
|
3790
|
-
|
|
4275
|
+
$[3] = tooltipTitle;
|
|
4276
|
+
$[4] = t1;
|
|
4277
|
+
} else t1 = $[4];
|
|
4278
|
+
return t1;
|
|
3791
4279
|
}
|
|
3792
4280
|
//#endregion
|
|
3793
4281
|
//#region src/components/ItemBrowser/ItemBrowser.module.css
|
|
@@ -5166,8 +5654,10 @@ var ShipStatistics_module_default = {
|
|
|
5166
5654
|
"bad": "lebA7G_bad",
|
|
5167
5655
|
"capacitor": "lebA7G_capacitor",
|
|
5168
5656
|
"defense": "lebA7G_defense",
|
|
5657
|
+
"fighters": "lebA7G_fighters",
|
|
5169
5658
|
"good": "lebA7G_good",
|
|
5170
5659
|
"lines": "lebA7G_lines",
|
|
5660
|
+
"manage": "lebA7G_manage",
|
|
5171
5661
|
"menu": "lebA7G_menu",
|
|
5172
5662
|
"picker": "lebA7G_picker",
|
|
5173
5663
|
"price": "lebA7G_price",
|
|
@@ -5199,6 +5689,18 @@ function AttributeText(t0) {
|
|
|
5199
5689
|
function unit(suffix, divisor = 1) {
|
|
5200
5690
|
return (value, format) => `${formatNumber(value / divisor, format)}${suffix}`;
|
|
5201
5691
|
}
|
|
5692
|
+
/** Like EVE's "0.11B hp": in billions above 100 million, in millions above 100 thousand. */
|
|
5693
|
+
function hitpoints(value, format) {
|
|
5694
|
+
const short = {
|
|
5695
|
+
...format,
|
|
5696
|
+
decimals: 2,
|
|
5697
|
+
fixed: true,
|
|
5698
|
+
rounding: "nearest"
|
|
5699
|
+
};
|
|
5700
|
+
if (value > 1e8) return unit("B hp", 1e9)(value, short);
|
|
5701
|
+
if (value > 1e5) return unit("M hp", 1e6)(value, short);
|
|
5702
|
+
return unit(" hp")(value, format);
|
|
5703
|
+
}
|
|
5202
5704
|
//#endregion
|
|
5203
5705
|
//#region src/components/ShipStatistics/CapacitorStats.tsx
|
|
5204
5706
|
function CapacitorStats() {
|
|
@@ -5602,12 +6104,8 @@ function Resistance(t0) {
|
|
|
5602
6104
|
}
|
|
5603
6105
|
//#endregion
|
|
5604
6106
|
//#region src/components/ShipStatistics/DefenseStats.tsx
|
|
5605
|
-
const hitpoints = {
|
|
5606
|
-
decimals: 0,
|
|
5607
|
-
format: unit(" hp")
|
|
5608
|
-
};
|
|
5609
6107
|
function DefenseStats() {
|
|
5610
|
-
const $ = c(
|
|
6108
|
+
const $ = c(42);
|
|
5611
6109
|
let t0;
|
|
5612
6110
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5613
6111
|
t0 = {
|
|
@@ -5617,143 +6115,190 @@ function DefenseStats() {
|
|
|
5617
6115
|
$[0] = t0;
|
|
5618
6116
|
} else t0 = $[0];
|
|
5619
6117
|
const ehp = useAttribute("ehp", t0);
|
|
5620
|
-
const shield = useAttribute("shieldCapacity", hitpoints);
|
|
5621
6118
|
let t1;
|
|
5622
6119
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5623
|
-
t1 = {
|
|
6120
|
+
t1 = {
|
|
6121
|
+
decimals: 0,
|
|
6122
|
+
format: hitpoints
|
|
6123
|
+
};
|
|
5624
6124
|
$[1] = t1;
|
|
5625
6125
|
} else t1 = $[1];
|
|
5626
|
-
const
|
|
5627
|
-
const armor = useAttribute("armorHP", hitpoints);
|
|
5628
|
-
const structure = useAttribute("hp", hitpoints);
|
|
6126
|
+
const shield = useAttribute("shieldCapacity", t1);
|
|
5629
6127
|
let t2;
|
|
5630
|
-
if ($[2]
|
|
5631
|
-
t2 =
|
|
5632
|
-
$[2] =
|
|
5633
|
-
|
|
5634
|
-
|
|
6128
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6129
|
+
t2 = { decimals: 0 };
|
|
6130
|
+
$[2] = t2;
|
|
6131
|
+
} else t2 = $[2];
|
|
6132
|
+
const shieldRecharge = useAttribute("shieldRechargeRate", t2);
|
|
5635
6133
|
let t3;
|
|
6134
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6135
|
+
t3 = {
|
|
6136
|
+
decimals: 0,
|
|
6137
|
+
format: hitpoints
|
|
6138
|
+
};
|
|
6139
|
+
$[3] = t3;
|
|
6140
|
+
} else t3 = $[3];
|
|
6141
|
+
const armor = useAttribute("armorHP", t3);
|
|
5636
6142
|
let t4;
|
|
5637
6143
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
6144
|
+
t4 = {
|
|
6145
|
+
decimals: 0,
|
|
6146
|
+
format: hitpoints
|
|
6147
|
+
};
|
|
6148
|
+
$[4] = t4;
|
|
6149
|
+
} else t4 = $[4];
|
|
6150
|
+
const structure = useAttribute("hp", t4);
|
|
6151
|
+
const recharges = !useSnapshot().stats.structure;
|
|
5646
6152
|
let t5;
|
|
5647
|
-
if ($[
|
|
5648
|
-
t5 = /* @__PURE__ */
|
|
6153
|
+
if ($[5] !== ehp) {
|
|
6154
|
+
t5 = /* @__PURE__ */ jsx(AttributeText, { value: ehp });
|
|
6155
|
+
$[5] = ehp;
|
|
5649
6156
|
$[6] = t5;
|
|
5650
6157
|
} else t5 = $[6];
|
|
5651
6158
|
let t6;
|
|
5652
|
-
if ($[7] !== shield) {
|
|
5653
|
-
t6 = /* @__PURE__ */ jsx(AttributeText, { value: shield });
|
|
5654
|
-
$[7] = shield;
|
|
5655
|
-
$[8] = t6;
|
|
5656
|
-
} else t6 = $[8];
|
|
5657
6159
|
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];
|
|
6160
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6161
|
+
t6 = /* @__PURE__ */ jsx(RepairRate, {});
|
|
6162
|
+
t7 = damageTypes.map(_temp);
|
|
6163
|
+
$[7] = t6;
|
|
6164
|
+
$[8] = t7;
|
|
6165
|
+
} else {
|
|
6166
|
+
t6 = $[7];
|
|
6167
|
+
t7 = $[8];
|
|
6168
|
+
}
|
|
6169
|
+
const t8 = recharges ? "Shield Hitpoints / Recharge Time" : "Shield Hitpoints";
|
|
5678
6170
|
let t9;
|
|
5679
|
-
if ($[
|
|
5680
|
-
t9 = /* @__PURE__ */ jsx(
|
|
5681
|
-
$[
|
|
5682
|
-
} else t9 = $[
|
|
6171
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6172
|
+
t9 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "shieldCapacity" });
|
|
6173
|
+
$[9] = t9;
|
|
6174
|
+
} else t9 = $[9];
|
|
5683
6175
|
let t10;
|
|
5684
|
-
if ($[
|
|
5685
|
-
t10 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "
|
|
5686
|
-
$[
|
|
5687
|
-
|
|
6176
|
+
if ($[10] !== recharges) {
|
|
6177
|
+
t10 = recharges && /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "shieldRechargeRate" });
|
|
6178
|
+
$[10] = recharges;
|
|
6179
|
+
$[11] = t10;
|
|
6180
|
+
} else t10 = $[11];
|
|
5688
6181
|
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];
|
|
6182
|
+
if ($[12] !== t10) {
|
|
6183
|
+
t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t9, t10] });
|
|
6184
|
+
$[12] = t10;
|
|
6185
|
+
$[13] = t11;
|
|
6186
|
+
} else t11 = $[13];
|
|
5699
6187
|
let t12;
|
|
5700
|
-
if ($[
|
|
5701
|
-
t12 = /* @__PURE__ */ jsx(
|
|
5702
|
-
$[
|
|
5703
|
-
|
|
6188
|
+
if ($[14] !== shield) {
|
|
6189
|
+
t12 = /* @__PURE__ */ jsx(AttributeText, { value: shield });
|
|
6190
|
+
$[14] = shield;
|
|
6191
|
+
$[15] = t12;
|
|
6192
|
+
} else t12 = $[15];
|
|
5704
6193
|
let t13;
|
|
5705
|
-
if ($[
|
|
5706
|
-
t13 = /* @__PURE__ */ jsx(
|
|
5707
|
-
$[
|
|
5708
|
-
|
|
6194
|
+
if ($[16] !== recharges || $[17] !== shieldRecharge) {
|
|
6195
|
+
t13 = recharges && /* @__PURE__ */ jsx(AttributeText, { value: shieldRecharge });
|
|
6196
|
+
$[16] = recharges;
|
|
6197
|
+
$[17] = shieldRecharge;
|
|
6198
|
+
$[18] = t13;
|
|
6199
|
+
} else t13 = $[18];
|
|
5709
6200
|
let t14;
|
|
5710
|
-
if ($[20] !==
|
|
5711
|
-
t14 = /* @__PURE__ */
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
tooltip: t13,
|
|
5715
|
-
children: /* @__PURE__ */ jsx(AttributeText, { value: structure })
|
|
6201
|
+
if ($[19] !== t12 || $[20] !== t13) {
|
|
6202
|
+
t14 = /* @__PURE__ */ jsxs("span", {
|
|
6203
|
+
className: ShipStatistics_module_default.lines,
|
|
6204
|
+
children: [t12, t13]
|
|
5716
6205
|
});
|
|
5717
|
-
$[
|
|
6206
|
+
$[19] = t12;
|
|
6207
|
+
$[20] = t13;
|
|
5718
6208
|
$[21] = t14;
|
|
5719
6209
|
} else t14 = $[21];
|
|
5720
6210
|
let t15;
|
|
5721
|
-
if ($[22]
|
|
5722
|
-
t15 = /* @__PURE__ */ jsx(
|
|
5723
|
-
|
|
5724
|
-
|
|
6211
|
+
if ($[22] !== t11 || $[23] !== t14 || $[24] !== t8) {
|
|
6212
|
+
t15 = /* @__PURE__ */ jsx(Stat, {
|
|
6213
|
+
icon: "stat-shield-hp",
|
|
6214
|
+
label: t8,
|
|
6215
|
+
tooltip: t11,
|
|
6216
|
+
children: t14
|
|
6217
|
+
});
|
|
6218
|
+
$[22] = t11;
|
|
6219
|
+
$[23] = t14;
|
|
6220
|
+
$[24] = t8;
|
|
6221
|
+
$[25] = t15;
|
|
6222
|
+
} else t15 = $[25];
|
|
5725
6223
|
let t16;
|
|
5726
|
-
if ($[
|
|
5727
|
-
t16 = /* @__PURE__ */
|
|
6224
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6225
|
+
t16 = /* @__PURE__ */ jsx(Resistances, { layer: "shield" });
|
|
6226
|
+
$[26] = t16;
|
|
6227
|
+
} else t16 = $[26];
|
|
6228
|
+
let t17;
|
|
6229
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6230
|
+
t17 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "armorHP" });
|
|
6231
|
+
$[27] = t17;
|
|
6232
|
+
} else t17 = $[27];
|
|
6233
|
+
let t18;
|
|
6234
|
+
if ($[28] !== armor) {
|
|
6235
|
+
t18 = /* @__PURE__ */ jsx(Stat, {
|
|
6236
|
+
icon: "stat-armor-hp",
|
|
6237
|
+
label: "Armor Hitpoints",
|
|
6238
|
+
tooltip: t17,
|
|
6239
|
+
children: /* @__PURE__ */ jsx(AttributeText, { value: armor })
|
|
6240
|
+
});
|
|
6241
|
+
$[28] = armor;
|
|
6242
|
+
$[29] = t18;
|
|
6243
|
+
} else t18 = $[29];
|
|
6244
|
+
let t19;
|
|
6245
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6246
|
+
t19 = /* @__PURE__ */ jsx(Resistances, { layer: "armor" });
|
|
6247
|
+
$[30] = t19;
|
|
6248
|
+
} else t19 = $[30];
|
|
6249
|
+
let t20;
|
|
6250
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6251
|
+
t20 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "hp" });
|
|
6252
|
+
$[31] = t20;
|
|
6253
|
+
} else t20 = $[31];
|
|
6254
|
+
let t21;
|
|
6255
|
+
if ($[32] !== structure) {
|
|
6256
|
+
t21 = /* @__PURE__ */ jsx(Stat, {
|
|
6257
|
+
icon: "stat-structure-hp",
|
|
6258
|
+
label: "Structure Hitpoints",
|
|
6259
|
+
tooltip: t20,
|
|
6260
|
+
children: /* @__PURE__ */ jsx(AttributeText, { value: structure })
|
|
6261
|
+
});
|
|
6262
|
+
$[32] = structure;
|
|
6263
|
+
$[33] = t21;
|
|
6264
|
+
} else t21 = $[33];
|
|
6265
|
+
let t22;
|
|
6266
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6267
|
+
t22 = /* @__PURE__ */ jsx(Resistances, { layer: "structure" });
|
|
6268
|
+
$[34] = t22;
|
|
6269
|
+
} else t22 = $[34];
|
|
6270
|
+
let t23;
|
|
6271
|
+
if ($[35] !== t15 || $[36] !== t18 || $[37] !== t21) {
|
|
6272
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
5728
6273
|
className: ShipStatistics_module_default.defense,
|
|
5729
6274
|
children: [
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
6275
|
+
t6,
|
|
6276
|
+
t7,
|
|
6277
|
+
t15,
|
|
6278
|
+
t16,
|
|
6279
|
+
t18,
|
|
6280
|
+
t19,
|
|
6281
|
+
t21,
|
|
6282
|
+
t22
|
|
5738
6283
|
]
|
|
5739
6284
|
});
|
|
5740
|
-
$[
|
|
5741
|
-
$[
|
|
5742
|
-
$[
|
|
5743
|
-
$[
|
|
5744
|
-
} else
|
|
5745
|
-
let
|
|
5746
|
-
if ($[
|
|
5747
|
-
|
|
6285
|
+
$[35] = t15;
|
|
6286
|
+
$[36] = t18;
|
|
6287
|
+
$[37] = t21;
|
|
6288
|
+
$[38] = t23;
|
|
6289
|
+
} else t23 = $[38];
|
|
6290
|
+
let t24;
|
|
6291
|
+
if ($[39] !== t23 || $[40] !== t5) {
|
|
6292
|
+
t24 = /* @__PURE__ */ jsx(StatsSection, {
|
|
5748
6293
|
title: "Defense",
|
|
5749
|
-
summary:
|
|
5750
|
-
children:
|
|
6294
|
+
summary: t5,
|
|
6295
|
+
children: t23
|
|
5751
6296
|
});
|
|
5752
|
-
$[
|
|
5753
|
-
$[
|
|
5754
|
-
$[
|
|
5755
|
-
} else
|
|
5756
|
-
return
|
|
6297
|
+
$[39] = t23;
|
|
6298
|
+
$[40] = t5;
|
|
6299
|
+
$[41] = t24;
|
|
6300
|
+
} else t24 = $[41];
|
|
6301
|
+
return t24;
|
|
5757
6302
|
}
|
|
5758
6303
|
function _temp(damage) {
|
|
5759
6304
|
return /* @__PURE__ */ jsx(Icon, { name: `stat-${damage}-resistance` }, damage);
|
|
@@ -5892,6 +6437,76 @@ function DroneStats() {
|
|
|
5892
6437
|
return t12;
|
|
5893
6438
|
}
|
|
5894
6439
|
//#endregion
|
|
6440
|
+
//#region ../fitting/src/rules/attributes.ts
|
|
6441
|
+
/** A type's value for an attribute as the SDE has it, before any effect applies. */
|
|
6442
|
+
function baseValue(sde, type, name) {
|
|
6443
|
+
const id = sde.attributeId(name);
|
|
6444
|
+
return id === void 0 ? void 0 : type.attributes.get(id);
|
|
6445
|
+
}
|
|
6446
|
+
//#endregion
|
|
6447
|
+
//#region src/components/ShipStatistics/FighterStats.tsx
|
|
6448
|
+
function FighterStats() {
|
|
6449
|
+
const $ = c(10);
|
|
6450
|
+
const sde = useSde();
|
|
6451
|
+
const { fit } = useShownSnapshot();
|
|
6452
|
+
let full = 0;
|
|
6453
|
+
let partial = 0;
|
|
6454
|
+
for (const item of fit.items) {
|
|
6455
|
+
const type = item.slot.type === "fighter_tube" ? sde.type(item.type_id) : void 0;
|
|
6456
|
+
if (type === void 0) continue;
|
|
6457
|
+
if ((item.quantity ?? 1) >= (baseValue(sde, type, "fighterSquadronMaxSize") ?? 1)) full = full + 1;
|
|
6458
|
+
else partial = partial + 1;
|
|
6459
|
+
}
|
|
6460
|
+
let t0;
|
|
6461
|
+
if ($[0] !== full) {
|
|
6462
|
+
t0 = /* @__PURE__ */ jsxs("span", { children: [full, " Full Squadrons"] });
|
|
6463
|
+
$[0] = full;
|
|
6464
|
+
$[1] = t0;
|
|
6465
|
+
} else t0 = $[1];
|
|
6466
|
+
let t1;
|
|
6467
|
+
if ($[2] !== partial) {
|
|
6468
|
+
t1 = /* @__PURE__ */ jsxs("span", { children: [partial, " Partial Squadrons"] });
|
|
6469
|
+
$[2] = partial;
|
|
6470
|
+
$[3] = t1;
|
|
6471
|
+
} else t1 = $[3];
|
|
6472
|
+
let t2;
|
|
6473
|
+
if ($[4] !== t0 || $[5] !== t1) {
|
|
6474
|
+
t2 = /* @__PURE__ */ jsxs("span", {
|
|
6475
|
+
className: ShipStatistics_module_default.lines,
|
|
6476
|
+
children: [t0, t1]
|
|
6477
|
+
});
|
|
6478
|
+
$[4] = t0;
|
|
6479
|
+
$[5] = t1;
|
|
6480
|
+
$[6] = t2;
|
|
6481
|
+
} else t2 = $[6];
|
|
6482
|
+
let t3;
|
|
6483
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6484
|
+
t3 = /* @__PURE__ */ jsx(Tooltip, {
|
|
6485
|
+
label: "Manage (not implemented yet)",
|
|
6486
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
6487
|
+
type: "button",
|
|
6488
|
+
className: ShipStatistics_module_default.manage,
|
|
6489
|
+
"aria-disabled": true,
|
|
6490
|
+
children: "Manage"
|
|
6491
|
+
})
|
|
6492
|
+
});
|
|
6493
|
+
$[7] = t3;
|
|
6494
|
+
} else t3 = $[7];
|
|
6495
|
+
let t4;
|
|
6496
|
+
if ($[8] !== t2) {
|
|
6497
|
+
t4 = /* @__PURE__ */ jsx(StatsSection, {
|
|
6498
|
+
title: "Fighters",
|
|
6499
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
6500
|
+
className: ShipStatistics_module_default.fighters,
|
|
6501
|
+
children: [t2, t3]
|
|
6502
|
+
})
|
|
6503
|
+
});
|
|
6504
|
+
$[8] = t2;
|
|
6505
|
+
$[9] = t4;
|
|
6506
|
+
} else t4 = $[9];
|
|
6507
|
+
return t4;
|
|
6508
|
+
}
|
|
6509
|
+
//#endregion
|
|
5895
6510
|
//#region src/components/ShipStatistics/FitPrice.tsx
|
|
5896
6511
|
function FitPrice(t0) {
|
|
5897
6512
|
const $ = c(5);
|
|
@@ -5929,6 +6544,48 @@ function FitPrice(t0) {
|
|
|
5929
6544
|
return t4;
|
|
5930
6545
|
}
|
|
5931
6546
|
//#endregion
|
|
6547
|
+
//#region src/components/ShipStatistics/FuelStats.tsx
|
|
6548
|
+
function FuelStats() {
|
|
6549
|
+
const $ = c(8);
|
|
6550
|
+
const perDay = useStats().fuel * 24;
|
|
6551
|
+
const before = useSnapshot().stats.fuel * 24;
|
|
6552
|
+
let t0;
|
|
6553
|
+
if ($[0] !== perDay) {
|
|
6554
|
+
t0 = formatNumber(perDay, { decimals: 0 });
|
|
6555
|
+
$[0] = perDay;
|
|
6556
|
+
$[1] = t0;
|
|
6557
|
+
} else t0 = $[1];
|
|
6558
|
+
const t1 = `${t0} units/day`;
|
|
6559
|
+
const t2 = perDay === before ? void 0 : perDay < before ? "better" : "worse";
|
|
6560
|
+
let t3;
|
|
6561
|
+
if ($[2] !== perDay || $[3] !== t1 || $[4] !== t2) {
|
|
6562
|
+
t3 = {
|
|
6563
|
+
value: perDay,
|
|
6564
|
+
text: t1,
|
|
6565
|
+
change: t2
|
|
6566
|
+
};
|
|
6567
|
+
$[2] = perDay;
|
|
6568
|
+
$[3] = t1;
|
|
6569
|
+
$[4] = t2;
|
|
6570
|
+
$[5] = t3;
|
|
6571
|
+
} else t3 = $[5];
|
|
6572
|
+
const fuel = t3;
|
|
6573
|
+
let t4;
|
|
6574
|
+
if ($[6] !== fuel) {
|
|
6575
|
+
t4 = /* @__PURE__ */ jsx(StatsSection, {
|
|
6576
|
+
title: "Fuel",
|
|
6577
|
+
children: /* @__PURE__ */ jsx(Stat, {
|
|
6578
|
+
icon: "stat-fuel",
|
|
6579
|
+
label: "Fuel Usage",
|
|
6580
|
+
children: /* @__PURE__ */ jsx(AttributeText, { value: fuel })
|
|
6581
|
+
})
|
|
6582
|
+
});
|
|
6583
|
+
$[6] = fuel;
|
|
6584
|
+
$[7] = t4;
|
|
6585
|
+
} else t4 = $[7];
|
|
6586
|
+
return t4;
|
|
6587
|
+
}
|
|
6588
|
+
//#endregion
|
|
5932
6589
|
//#region src/components/ShipStatistics/NavigationStats.tsx
|
|
5933
6590
|
function NavigationStats() {
|
|
5934
6591
|
const $ = c(24);
|
|
@@ -6324,41 +6981,61 @@ function TargetingStats() {
|
|
|
6324
6981
|
//#region src/components/ShipStatistics/ShipStatistics.tsx
|
|
6325
6982
|
/** EVE's statistics of the fit, as its fitting window shows them. */
|
|
6326
6983
|
function ShipStatistics(t0) {
|
|
6327
|
-
const $ = c(
|
|
6984
|
+
const $ = c(10);
|
|
6328
6985
|
const { label: t1 } = t0;
|
|
6329
6986
|
const label = t1 === void 0 ? "Statistics" : t1;
|
|
6987
|
+
const { structure } = useSnapshot().stats;
|
|
6330
6988
|
let t2;
|
|
6331
6989
|
let t3;
|
|
6990
|
+
let t4;
|
|
6991
|
+
let t5;
|
|
6332
6992
|
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 });
|
|
6993
|
+
t2 = /* @__PURE__ */ jsx(CapacitorStats, {});
|
|
6994
|
+
t3 = /* @__PURE__ */ jsx(OffenseStats, {});
|
|
6995
|
+
t4 = /* @__PURE__ */ jsx(DefenseStats, {});
|
|
6996
|
+
t5 = /* @__PURE__ */ jsx(TargetingStats, {});
|
|
6345
6997
|
$[0] = t2;
|
|
6346
6998
|
$[1] = t3;
|
|
6999
|
+
$[2] = t4;
|
|
7000
|
+
$[3] = t5;
|
|
6347
7001
|
} else {
|
|
6348
7002
|
t2 = $[0];
|
|
6349
7003
|
t3 = $[1];
|
|
7004
|
+
t4 = $[2];
|
|
7005
|
+
t5 = $[3];
|
|
6350
7006
|
}
|
|
6351
|
-
let
|
|
6352
|
-
if ($[
|
|
6353
|
-
|
|
7007
|
+
let t6;
|
|
7008
|
+
if ($[4] !== structure) {
|
|
7009
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
7010
|
+
className: ShipStatistics_module_default.sections,
|
|
7011
|
+
children: [
|
|
7012
|
+
t2,
|
|
7013
|
+
t3,
|
|
7014
|
+
t4,
|
|
7015
|
+
t5,
|
|
7016
|
+
structure ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FighterStats, {}), /* @__PURE__ */ jsx(FuelStats, {})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(NavigationStats, {}), /* @__PURE__ */ jsx(DroneStats, {})] })
|
|
7017
|
+
]
|
|
7018
|
+
});
|
|
7019
|
+
$[4] = structure;
|
|
7020
|
+
$[5] = t6;
|
|
7021
|
+
} else t6 = $[5];
|
|
7022
|
+
let t7;
|
|
7023
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7024
|
+
t7 = /* @__PURE__ */ jsx(FitPrice, { price: 0 });
|
|
7025
|
+
$[6] = t7;
|
|
7026
|
+
} else t7 = $[6];
|
|
7027
|
+
let t8;
|
|
7028
|
+
if ($[7] !== label || $[8] !== t6) {
|
|
7029
|
+
t8 = /* @__PURE__ */ jsxs("section", {
|
|
6354
7030
|
className: ShipStatistics_module_default.statistics,
|
|
6355
7031
|
"aria-label": label,
|
|
6356
|
-
children: [
|
|
7032
|
+
children: [t6, t7]
|
|
6357
7033
|
});
|
|
6358
|
-
$[
|
|
6359
|
-
$[
|
|
6360
|
-
|
|
6361
|
-
|
|
7034
|
+
$[7] = label;
|
|
7035
|
+
$[8] = t6;
|
|
7036
|
+
$[9] = t8;
|
|
7037
|
+
} else t8 = $[9];
|
|
7038
|
+
return t8;
|
|
6362
7039
|
}
|
|
6363
7040
|
//#endregion
|
|
6364
7041
|
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 };
|