@elite-dangerous-almanac/core 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/PROVENANCE/ships/SOURCES.md +23 -0
  2. package/dist/chunk-37JIMWLK.js +1 -0
  3. package/dist/chunk-37JIMWLK.js.map +1 -0
  4. package/dist/chunk-4CBMQULR.js +1 -0
  5. package/dist/{chunk-4ZGUSHTP.js.map → chunk-4CBMQULR.js.map} +1 -1
  6. package/dist/{chunk-QTAMQ6ME.js → chunk-5VWACBTN.js} +1 -1
  7. package/dist/chunk-65FZECUX.js +1 -0
  8. package/dist/chunk-65FZECUX.js.map +1 -0
  9. package/dist/chunk-6BFQIYGZ.js +1 -0
  10. package/dist/chunk-6BFQIYGZ.js.map +1 -0
  11. package/dist/chunk-6HA2YIKW.js +1 -0
  12. package/dist/chunk-6HA2YIKW.js.map +1 -0
  13. package/dist/{chunk-7EE5VIHR.js → chunk-6HMIF2RJ.js} +1 -1
  14. package/dist/chunk-6S36AVA4.js +1 -0
  15. package/dist/chunk-6S36AVA4.js.map +1 -0
  16. package/dist/chunk-6WTUY6ZX.js +1 -0
  17. package/dist/{chunk-V3AEUBHV.js.map → chunk-6WTUY6ZX.js.map} +1 -1
  18. package/dist/chunk-77TT4K53.js +1 -0
  19. package/dist/{chunk-Y6KJJMIM.js → chunk-A4QKXXZD.js} +1 -1
  20. package/dist/chunk-AAE4KZ2V.js +1 -0
  21. package/dist/chunk-AAE4KZ2V.js.map +1 -0
  22. package/dist/{chunk-Q5XOGATC.js → chunk-AIEC3LBT.js} +1 -1
  23. package/dist/{chunk-QY3L5BKN.js → chunk-APEG4ZER.js} +1 -1
  24. package/dist/{chunk-JGOAQLYW.js → chunk-F44QX47A.js} +1 -1
  25. package/dist/{chunk-EVJ32UF3.js → chunk-FA5JVXVG.js} +1 -1
  26. package/dist/{chunk-EVJ32UF3.js.map → chunk-FA5JVXVG.js.map} +1 -1
  27. package/dist/chunk-GGQMIQPC.js +1 -0
  28. package/dist/chunk-GGQMIQPC.js.map +1 -0
  29. package/dist/{chunk-EYGVDJ2I.js → chunk-GMTAFUAG.js} +1 -1
  30. package/dist/{chunk-Z43DN4PY.js → chunk-GTEHRZPN.js} +1 -1
  31. package/dist/{chunk-Z43DN4PY.js.map → chunk-GTEHRZPN.js.map} +1 -1
  32. package/dist/{chunk-PA5EITW5.js → chunk-HUYYGTRM.js} +1 -1
  33. package/dist/{chunk-PA5EITW5.js.map → chunk-HUYYGTRM.js.map} +1 -1
  34. package/dist/{chunk-HKXXFIRI.js → chunk-ITKZKREP.js} +1 -1
  35. package/dist/{chunk-OYR5HUQZ.js → chunk-IWFQ4ZKF.js} +1 -1
  36. package/dist/{chunk-ZCEAPJDH.js → chunk-J7BM5NGK.js} +1 -1
  37. package/dist/chunk-JET673E5.js +1 -0
  38. package/dist/chunk-JET673E5.js.map +1 -0
  39. package/dist/chunk-JMAXSXXQ.js +1 -0
  40. package/dist/chunk-JMAXSXXQ.js.map +1 -0
  41. package/dist/chunk-JO52LYO3.js +1 -0
  42. package/dist/chunk-M2TCZKRT.js +1 -0
  43. package/dist/chunk-M2TCZKRT.js.map +1 -0
  44. package/dist/chunk-M4FZRDAH.js +1 -0
  45. package/dist/chunk-M4FZRDAH.js.map +1 -0
  46. package/dist/chunk-OJC6AUL7.js +1 -0
  47. package/dist/chunk-OJC6AUL7.js.map +1 -0
  48. package/dist/{chunk-FYVPZBXN.js → chunk-Q5ALV3DI.js} +1 -1
  49. package/dist/{chunk-SQS7672E.js → chunk-Q6YDPREF.js} +1 -1
  50. package/dist/chunk-SG6YLUQ4.js +1 -0
  51. package/dist/chunk-SG6YLUQ4.js.map +1 -0
  52. package/dist/{chunk-OVUHQEH5.js → chunk-T4MKUKYS.js} +1 -1
  53. package/dist/{chunk-OVUHQEH5.js.map → chunk-T4MKUKYS.js.map} +1 -1
  54. package/dist/{chunk-XUHAPOM6.js → chunk-VEEBJFJ7.js} +1 -1
  55. package/dist/{chunk-L747RVPO.js → chunk-VQJXRPYI.js} +1 -1
  56. package/dist/{chunk-L747RVPO.js.map → chunk-VQJXRPYI.js.map} +1 -1
  57. package/dist/chunk-VTMCSCXV.js +1 -0
  58. package/dist/chunk-VTMCSCXV.js.map +1 -0
  59. package/dist/chunk-XQJERZUS.js +1 -0
  60. package/dist/chunk-XQJERZUS.js.map +1 -0
  61. package/dist/commodities/commodities-all.js +1 -1
  62. package/dist/commodities/commodities-rare.js +1 -1
  63. package/dist/commodities/commodities-standard.js +1 -1
  64. package/dist/commodities/commodities.js +1 -1
  65. package/dist/commodities/index.js +1 -1
  66. package/dist/materials/index.js +1 -1
  67. package/dist/materials/materials-all.js +1 -1
  68. package/dist/materials/materials-encoded.js +1 -1
  69. package/dist/materials/materials-manufactured.js +1 -1
  70. package/dist/materials/materials-raw.js +1 -1
  71. package/dist/materials/materials.js +1 -1
  72. package/dist/ships/armour.js +1 -1
  73. package/dist/ships/build-metrics.js +1 -1
  74. package/dist/ships/distributor.js +1 -1
  75. package/dist/ships/heat.js +1 -1
  76. package/dist/ships/index.d.ts +1 -1
  77. package/dist/ships/index.js +1 -1
  78. package/dist/ships/jump-range.js +1 -1
  79. package/dist/ships/loadout-validation.d.ts +111 -5
  80. package/dist/ships/loadout-validation.js +1 -1
  81. package/dist/ships/mobility-capacitor.js +1 -1
  82. package/dist/ships/mobility.js +1 -1
  83. package/dist/ships/modules-all.js +1 -1
  84. package/dist/ships/modules-core.js +1 -1
  85. package/dist/ships/modules-internal.js +1 -1
  86. package/dist/ships/modules.d.ts +21 -1
  87. package/dist/ships/modules.js +1 -1
  88. package/dist/ships/power.js +1 -1
  89. package/dist/ships/pre-engineered-stats.d.ts +12 -7
  90. package/dist/ships/pre-engineered-stats.js +1 -1
  91. package/dist/ships/resistances.js +1 -1
  92. package/dist/ships/shield-capacitor.js +1 -1
  93. package/dist/ships/shield-recovery.js +1 -1
  94. package/dist/ships/shields.js +1 -1
  95. package/dist/ships/ship-loadout.d.ts +84 -17
  96. package/dist/ships/ship-loadout.js +1 -1
  97. package/dist/ships/slef.d.ts +4 -1
  98. package/dist/ships/slef.js +1 -1
  99. package/dist/ships/weapons-capacitor.js +1 -1
  100. package/dist/ships/weapons.js +1 -1
  101. package/package.json +1 -1
  102. package/dist/chunk-4KJ7CR74.js +0 -1
  103. package/dist/chunk-4KJ7CR74.js.map +0 -1
  104. package/dist/chunk-4ZGUSHTP.js +0 -1
  105. package/dist/chunk-6L56LWTT.js +0 -1
  106. package/dist/chunk-6L56LWTT.js.map +0 -1
  107. package/dist/chunk-6O4NRRSB.js +0 -1
  108. package/dist/chunk-6O4NRRSB.js.map +0 -1
  109. package/dist/chunk-7TQ2X6Q3.js +0 -1
  110. package/dist/chunk-7TQ2X6Q3.js.map +0 -1
  111. package/dist/chunk-B4ZSTOM4.js +0 -1
  112. package/dist/chunk-B4ZSTOM4.js.map +0 -1
  113. package/dist/chunk-D6YEHR5S.js +0 -1
  114. package/dist/chunk-D6YEHR5S.js.map +0 -1
  115. package/dist/chunk-EVW4Z4CB.js +0 -1
  116. package/dist/chunk-EVW4Z4CB.js.map +0 -1
  117. package/dist/chunk-GZYPQIO2.js +0 -1
  118. package/dist/chunk-GZYPQIO2.js.map +0 -1
  119. package/dist/chunk-JQG4C67D.js +0 -1
  120. package/dist/chunk-OYFMHDYT.js +0 -1
  121. package/dist/chunk-OYFMHDYT.js.map +0 -1
  122. package/dist/chunk-PY5L6WC5.js +0 -1
  123. package/dist/chunk-PY5L6WC5.js.map +0 -1
  124. package/dist/chunk-Q2L75GSI.js +0 -1
  125. package/dist/chunk-Q2L75GSI.js.map +0 -1
  126. package/dist/chunk-QJ7GB6FF.js +0 -1
  127. package/dist/chunk-QJ7GB6FF.js.map +0 -1
  128. package/dist/chunk-RRYBSAPX.js +0 -1
  129. package/dist/chunk-RRYBSAPX.js.map +0 -1
  130. package/dist/chunk-V3AEUBHV.js +0 -1
  131. package/dist/chunk-V4C6FIE2.js +0 -1
  132. package/dist/chunk-VYDQHPY2.js +0 -1
  133. package/dist/chunk-VYDQHPY2.js.map +0 -1
  134. package/dist/chunk-YXPZ7QQB.js +0 -1
  135. package/dist/chunk-YXPZ7QQB.js.map +0 -1
  136. /package/dist/{chunk-QTAMQ6ME.js.map → chunk-5VWACBTN.js.map} +0 -0
  137. /package/dist/{chunk-7EE5VIHR.js.map → chunk-6HMIF2RJ.js.map} +0 -0
  138. /package/dist/{chunk-JQG4C67D.js.map → chunk-77TT4K53.js.map} +0 -0
  139. /package/dist/{chunk-Y6KJJMIM.js.map → chunk-A4QKXXZD.js.map} +0 -0
  140. /package/dist/{chunk-Q5XOGATC.js.map → chunk-AIEC3LBT.js.map} +0 -0
  141. /package/dist/{chunk-QY3L5BKN.js.map → chunk-APEG4ZER.js.map} +0 -0
  142. /package/dist/{chunk-JGOAQLYW.js.map → chunk-F44QX47A.js.map} +0 -0
  143. /package/dist/{chunk-EYGVDJ2I.js.map → chunk-GMTAFUAG.js.map} +0 -0
  144. /package/dist/{chunk-HKXXFIRI.js.map → chunk-ITKZKREP.js.map} +0 -0
  145. /package/dist/{chunk-OYR5HUQZ.js.map → chunk-IWFQ4ZKF.js.map} +0 -0
  146. /package/dist/{chunk-ZCEAPJDH.js.map → chunk-J7BM5NGK.js.map} +0 -0
  147. /package/dist/{chunk-V4C6FIE2.js.map → chunk-JO52LYO3.js.map} +0 -0
  148. /package/dist/{chunk-FYVPZBXN.js.map → chunk-Q5ALV3DI.js.map} +0 -0
  149. /package/dist/{chunk-SQS7672E.js.map → chunk-Q6YDPREF.js.map} +0 -0
  150. /package/dist/{chunk-XUHAPOM6.js.map → chunk-VEEBJFJ7.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ships/modules-core.ts"],"names":["buildModuleCatalogue","modules_core_default","CORE_MODULES"],"mappings":"O,q7iIAqCO,IAAME,aAA4CF,qBACrDC,qBACA,eACJC"}
1
+ {"version":3,"sources":["../src/ships/modules-core.ts"],"names":["buildModuleCatalogue","modules_core_default","CORE_MODULES"],"mappings":"O,8hjIAqCO,IAAME,aAA4CF,qBACrDC,qBACA,eACJC"}
@@ -0,0 +1 @@
1
+ import{requireFiniteNonNegative}from"./chunk-65FZECUX.js";var PRIORITY_GROUPS=5;var EPSILON=1e-9;function bandIndex(priority){if(priority===void 0||!Number.isFinite(priority))return 0;return Math.min(PRIORITY_GROUPS,Math.max(1,Math.trunc(priority)))-1}function powerBudget(available,consumers){requireFiniteNonNegative("powerBudget","available power",available);const retractedByBand=Array(PRIORITY_GROUPS).fill(0);const deployedByBand=Array(PRIORITY_GROUPS).fill(0);for(const consumer of consumers){requireFiniteNonNegative("powerBudget","consumer draw",consumer.draw)}const consumerResults=consumers.map(consumer=>Object.freeze({...consumer.label===void 0?{}:{label:consumer.label},...consumer.symbol===void 0?{}:{symbol:consumer.symbol},draw:consumer.draw,enabled:consumer.enabled!==false,priority:bandIndex(consumer.priority)+1,deployedOnly:consumer.deployedOnly??false}));for(const consumer of consumers){if(consumer.enabled===false)continue;const draw=consumer.draw;if(draw===0)continue;const index=bandIndex(consumer.priority);if(consumer.deployedOnly)deployedByBand[index]+=draw;else retractedByBand[index]+=draw}const bands=[];let retractedTotal=0;let deployedTotal=0;for(let i=0;i<PRIORITY_GROUPS;i++){const retracted=retractedByBand[i];const deployed=deployedByBand[i];retractedTotal+=retracted;deployedTotal+=retracted+deployed;bands.push(Object.freeze({priority:i+1,retracted:retracted,deployed:retracted+deployed,retractedTotal:retractedTotal,deployedTotal:deployedTotal,poweredRetracted:retractedTotal<=available+EPSILON,poweredDeployed:deployedTotal<=available+EPSILON}))}return Object.freeze({available:available,retracted:retractedTotal,deployed:deployedTotal,headroom:available-deployedTotal,utilisation:available>0?deployedTotal/available:deployedTotal>0?Infinity:0,withinBudget:deployedTotal<=available+EPSILON,bands:Object.freeze(bands),consumers:Object.freeze(consumerResults)})}export{powerBudget};//# sourceMappingURL=chunk-GGQMIQPC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/power.ts"],"names":["requireFiniteNonNegative","PRIORITY_GROUPS","EPSILON","bandIndex","priority","Number","isFinite","Math","min","max","trunc","powerBudget","available","consumers","retractedByBand","Array","fill","deployedByBand","consumer","draw","consumerResults","map","Object","freeze","label","symbol","enabled","deployedOnly","index","bands","retractedTotal","deployedTotal","i","retracted","deployed","push","poweredRetracted","poweredDeployed","headroom","utilisation","Infinity","withinBudget"],"mappings":"O,mDAsCA,IAAMC,gBAAkB,EAOxB,IAAMC,QAAU,KAwGhB,SAASC,UAAUC,UACf,GAAIA,gBAAa,IAAcC,OAAOC,SAASF,UAAW,OAAO,EACjE,OAAOG,KAAKC,IAAIP,gBAAiBM,KAAKE,IAAI,EAAGF,KAAKG,MAAMN,YAAc,CAC1E,CA+BO,SAASO,YAAYC,UAAmBC,WAC3Cb,yBAAyB,cAAe,kBAAmBY,WAE3D,MAAME,gBAAkBC,MAAcd,iBAAiBe,KAAK,GAC5D,MAAMC,eAAiBF,MAAcd,iBAAiBe,KAAK,GAC3D,IAAA,MAAWE,YAAYL,UAAW,CAC9Bb,yBAAyB,cAAe,gBAAiBkB,SAASC,KACtE,CACA,MAAMC,gBAAyCP,UAAUQ,IAAKH,UAC1DI,OAAOC,OAAO,IACNL,SAASM,aAAU,EAAY,CAAA,EAAK,CAAEA,MAAON,SAASM,UACtDN,SAASO,cAAW,EAAY,CAAA,EAAK,CAAEA,OAAQP,SAASO,QAC5DN,KAAMD,SAASC,KACfO,QAASR,SAASQ,UAAY,MAC9BtB,SAAUD,UAAUe,SAASd,UAAY,EACzCuB,aAAcT,SAASS,cAAgB,SAI/C,IAAA,MAAWT,YAAYL,UAAW,CAC9B,GAAIK,SAASQ,UAAY,MAAO,SAChC,MAAMP,KAAOD,SAASC,KACtB,GAAIA,OAAS,EAAG,SAChB,MAAMS,MAAQzB,UAAUe,SAASd,UACjC,GAAIc,SAASS,aAAcV,eAAeW,QAAWT,UAChDL,gBAAgBc,QAAWT,IACpC,CAEA,MAAMU,MAAqB,GAC3B,IAAIC,eAAiB,EACrB,IAAIC,cAAgB,EACpB,IAAA,IAASC,EAAI,EAAGA,EAAI/B,gBAAiB+B,IAAK,CACtC,MAAMC,UAAYnB,gBAAgBkB,GAClC,MAAME,SAAWjB,eAAee,GAChCF,gBAAkBG,UAElBF,eAAiBE,UAAYC,SAC7BL,MAAMM,KACFb,OAAOC,OAAO,CACVnB,SAAU4B,EAAI,EACdC,oBAEAC,SAAUD,UAAYC,SACtBJ,8BACAC,4BACAK,iBAAkBN,gBAAkBlB,UAAYV,QAChDmC,gBAAiBN,eAAiBnB,UAAYV,UAG1D,CAEA,OAAOoB,OAAOC,OAAO,CACjBX,oBACAqB,UAAWH,eACXI,SAAUH,cACVO,SAAU1B,UAAYmB,cACtBQ,YAAa3B,UAAY,EAAImB,cAAgBnB,UAAYmB,cAAgB,EAAIS,SAAW,EACxFC,aAAcV,eAAiBnB,UAAYV,QAC3C2B,MAAOP,OAAOC,OAAOM,OACrBhB,UAAWS,OAAOC,OAAOH,kBAEjC,QAAAT"}
@@ -1 +1 @@
1
- import{buildCommodityCatalogue}from"./chunk-L747RVPO.js";var rare_commodities_default=[{symbol:"EraninPearlWhisky",name:"Eranin Pearl Whisky",category:"Legal Drugs"},{symbol:"LavianBrandy",name:"Lavian Brandy",category:"Legal Drugs"},{symbol:"HIP10175BushMeat",name:"HIP 10175 Bush Meat",category:"Foods"},{symbol:"AlbinoQuechuaMammoth",name:"Albino Quechua Mammoth Meat",category:"Foods"},{symbol:"UtgaroarMillenialEggs",name:"Utgaroar Millennial Eggs",category:"Foods"},{symbol:"WitchhaulKobeBeef",name:"Witchhaul Kobe Beef",category:"Foods"},{symbol:"KarsukiLocusts",name:"Karsuki Locusts",category:"Foods"},{symbol:"GiantIrukamaSnails",name:"Giant Irukama Snails",category:"Foods"},{symbol:"BaltahSineVacuumKrill",name:"Baltah'sine Vacuum Krill",category:"Foods"},{symbol:"CetiRabbits",name:"Ceti Rabbits",category:"Foods"},{symbol:"KachiriginLeaches",name:"Kachirigin Filter Leeches",category:"Medicines"},{symbol:"LyraeWeed",name:"Lyrae Weed",category:"Legal Drugs"},{symbol:"OnionHead",name:"Onionhead",category:"Legal Drugs"},{symbol:"TarachTorSpice",name:"Tarach Spice",category:"Legal Drugs"},{symbol:"Wolf1301Fesh",name:"Wolf Fesh",category:"Legal Drugs"},{symbol:"BorasetaniPathogenetics",name:"Borasetani Pathogenetics",category:"Weapons"},{symbol:"HIP118311Swarm",name:"HIP 118311 Swarm",category:"Weapons"},{symbol:"KonggaAle",name:"Kongga Ale",category:"Legal Drugs"},{symbol:"WuthieloKuFroth",name:"Wuthielo Ku Froth",category:"Legal Drugs"},{symbol:"AlacarakmoSkinArt",name:"Alacarakmo Skin Art",category:"Consumer Items"},{symbol:"EleuThermals",name:"Eleu Thermals",category:"Consumer Items"},{symbol:"EshuUmbrellas",name:"Eshu Umbrellas",category:"Consumer Items"},{symbol:"KaretiiCouture",name:"Karetii Couture",category:"Consumer Items"},{symbol:"NjangariSaddles",name:"Njangari Saddles",category:"Consumer Items"},{symbol:"AnyNaCoffee",name:"Any Na Coffee",category:"Foods"},{symbol:"CD75CatCoffee",name:"CD-75 Kitten Brand Coffee",category:"Foods"},{symbol:"GomanYauponCoffee",name:"Goman Yaupon Coffee",category:"Foods"},{symbol:"VolkhabBeeDrones",name:"Volkhab Bee Drones",category:"Machinery"},{symbol:"KinagoInstruments",name:"Kinago Violins",category:"Consumer Items"},{symbol:"NgunaModernAntiques",name:"Nguna Modern Antiques",category:"Consumer Items"},{symbol:"RajukruStoves",name:"Rajukru Multi-Stoves",category:"Consumer Items"},{symbol:"TiolceWaste2PasteUnits",name:"Tiolce Waste2Paste Units",category:"Consumer Items"},{symbol:"ChiEridaniMarinePaste",name:"Chi Eridani Marine Paste",category:"Foods"},{symbol:"EsusekuCaviar",name:"Esuseku Caviar",category:"Foods"},{symbol:"LiveHecateSeaWorms",name:"Live Hecate Sea Worms",category:"Foods"},{symbol:"HelvetitjPearls",name:"Helvetitj Pearls",category:"Metals"},{symbol:"HIP41181Squid",name:"HIP Proto-Squid",category:"Foods"},{symbol:"CoquimSpongiformVictuals",name:"Coquim Spongiform Victuals",category:"Foods"},{symbol:"AerialEdenApple",name:"Eden Apples of Aerial",category:"Foods"},{symbol:"NeritusBerries",name:"Neritus Berries",category:"Foods"},{symbol:"OchoengChillies",name:"Ochoeng Chillies",category:"Foods"},{symbol:"DeuringasTruffles",name:"Deuringas Truffles",category:"Foods"},{symbol:"HR7221Wheat",name:"HR 7221 Wheat",category:"Foods"},{symbol:"JarouaRice",name:"Jaroua Rice",category:"Foods"},{symbol:"BelalansRayLeather",name:"Belalans Ray Leather",category:"Textiles"},{symbol:"DamnaCarapaces",name:"Damna Carapaces",category:"Textiles"},{symbol:"RapaBaoSnakeSkins",name:"Rapa Bao Snake Skins",category:"Textiles"},{symbol:"VanayequiRhinoFur",name:"Vanayequi Ceratomorpha Fur",category:"Textiles"},{symbol:"BastSnakeGin",name:"Bast Snake Gin",category:"Legal Drugs"},{symbol:"ThrutisCream",name:"Thrutis Cream",category:"Legal Drugs"},{symbol:"WulpaHyperboreSystems",name:"Wulpa Hyperbore Systems",category:"Machinery"},{symbol:"AganippeRush",name:"Aganippe Rush",category:"Medicines"},{symbol:"TerraMaterBloodBores",name:"Terra Mater Blood Bores",category:"Medicines"},{symbol:"HolvaDuellingBlades",name:"Holva Duelling Blades",category:"Weapons"},{symbol:"KamorinHistoricWeapons",name:"Kamorin Historic Weapons",category:"Weapons"},{symbol:"GilyaSignatureWeapons",name:"Gilya Signature Weapons",category:"Weapons"},{symbol:"DeltaPhoenicisPalms",name:"Delta Phoenicis Palms",category:"Chemicals"},{symbol:"ToxandjiVirocide",name:"Toxandji Virocide",category:"Chemicals"},{symbol:"XiheCompanions",name:"Xihe Biomorphic Companions",category:"Technology"},{symbol:"SanumaMEAT",name:"Sanuma Decorative Meat",category:"Foods"},{symbol:"EthgrezeTeaBuds",name:"Ethgreze Tea Buds",category:"Foods"},{symbol:"CeremonialHeikeTea",name:"Ceremonial Heike Tea",category:"Foods"},{symbol:"TanmarkTranquilTea",name:"Tanmark Tranquil Tea",category:"Foods"},{symbol:"AZCancriFormula42",name:"AZ Cancri Formula 42",category:"Technology"},{symbol:"KamitraCigars",name:"Kamitra Cigars",category:"Legal Drugs"},{symbol:"RusaniOldSmokey",name:"Rusani Old Smokey",category:"Legal Drugs"},{symbol:"YasoKondiLeaf",name:"Yaso Kondi Leaf",category:"Legal Drugs"},{symbol:"ChateauDeAegaeon",name:"Chateau De Aegaeon",category:"Legal Drugs"},{symbol:"WatersOfShintara",name:"The Waters of Shintara",category:"Medicines"},{symbol:"OphiuchiExinoArtefacts",name:"Ophiuch Exino Artefacts",category:"Consumer Items"},{symbol:"BakedGreebles",name:"Baked Greebles",category:"Foods"},{symbol:"CetiAepyornisEgg",name:"Aepyornis Egg",category:"Foods"},{symbol:"SaxonWine",name:"Saxon Wine",category:"Legal Drugs"},{symbol:"CentauriMegaGin",name:"Centauri Mega Gin",category:"Legal Drugs"},{symbol:"AnduligaFireWorks",name:"Anduliga Fire Works",category:"Consumer Items"},{symbol:"BankiAmphibiousLeather",name:"Banki Amphibious Leather",category:"Textiles"},{symbol:"CherbonesBloodCrystals",name:"Cherbones Blood Crystals",category:"Metals"},{symbol:"MotronaExperienceJelly",name:"Motrona Experience Jelly",category:"Legal Drugs"},{symbol:"GeawenDanceDust",name:"Geawen Dance Dust",category:"Legal Drugs"},{symbol:"GerasianGueuzeBeer",name:"Gerasian Gueuze Beer",category:"Legal Drugs"},{symbol:"HaidneBlackBrew",name:"Haiden Black Brew",category:"Foods"},{symbol:"HavasupaiDreamCatcher",name:"Havasupai Dream Catcher",category:"Consumer Items"},{symbol:"BurnhamBileDistillate",name:"Burnham Bile Distillate",category:"Legal Drugs"},{symbol:"HIPOrganophosphates",name:"HIP Organophosphates",category:"Chemicals"},{symbol:"JaradharrePuzzlebox",name:"Jaradharre Puzzle Box",category:"Consumer Items"},{symbol:"KorroKungPellets",name:"Koro Kung Pellets",category:"Chemicals"},{symbol:"LFTVoidExtractCoffee",name:"Void Extract Coffee",category:"Foods"},{symbol:"HonestyPills",name:"Honesty Pills",category:"Medicines"},{symbol:"NonEuclidianExotanks",name:"Non Euclidian Exotanks",category:"Machinery"},{symbol:"LTTHyperSweet",name:"LTT Hyper Sweet",category:"Foods"},{symbol:"MechucosHighTea",name:"Mechucos High Tea",category:"Foods"},{symbol:"MedbStarlube",name:"Medb Starlube",category:"Chemicals"},{symbol:"MokojingBeastFeast",name:"Mokojing Beast Feast",category:"Foods"},{symbol:"MukusubiiChitinOs",name:"Mukusubii Chitin-os",category:"Foods"},{symbol:"MulachiGiantFungus",name:"Mulachi Giant Fungus",category:"Foods"},{symbol:"NgadandariFireOpals",name:"Ngadandari Fire Opals",category:"Metals"},{symbol:"TiegfriesSynthSilk",name:"Tiegfries Synth Silk",category:"Textiles"},{symbol:"UzumokuLowGWings",name:"Uzumoku Low-G Wings",category:"Consumer Items"},{symbol:"VHerculisBodyRub",name:"V Herculis Body Rub",category:"Medicines"},{symbol:"WheemeteWheatCakes",name:"Wheemete Wheat Cakes",category:"Foods"},{symbol:"VegaSlimWeed",name:"Vega Slimweed",category:"Medicines"},{symbol:"AltairianSkin",name:"Altairian Skin",category:"Consumer Items"},{symbol:"PavonisEarGrubs",name:"Pavonis Ear Grubs",category:"Legal Drugs"},{symbol:"JotunMookah",name:"Jotun Mookah",category:"Textiles"},{symbol:"GiantVerrix",name:"Giant Verrix",category:"Machinery"},{symbol:"IndiBourbon",name:"Indi Bourbon",category:"Legal Drugs"},{symbol:"AroucaConventualSweets",name:"Arouca Conventual Sweets",category:"Foods"},{symbol:"TauriChimes",name:"Tauri Chimes",category:"Consumer Items"},{symbol:"ZeesszeAntGlue",name:"Zeessze Ant Grub Glue",category:"Consumer Items"},{symbol:"PantaaPrayerSticks",name:"Pantaa Prayer Sticks",category:"Medicines"},{symbol:"FujinTea",name:"Fujin Tea",category:"Foods"},{symbol:"ChameleonCloth",name:"Chameleon Cloth",category:"Textiles"},{symbol:"OrrerianViciousBrew",name:"Orrerian Vicious Brew",category:"Foods"},{symbol:"UszaianTreeGrub",name:"Uszaian Tree Grub",category:"Foods"},{symbol:"MomusBogSpaniel",name:"Momus Bog Spaniel",category:"Consumer Items"},{symbol:"DisoMaCorn",name:"Diso Ma Corn",category:"Foods"},{symbol:"LeestianEvilJuice",name:"Leestian Evil Juice",category:"Legal Drugs"},{symbol:"BlueMilk",name:"Azure Milk",category:"Foods"},{symbol:"AlienEggs",name:"Leathery Eggs",category:"Consumer Items"},{symbol:"AlyaBodilySoap",name:"Alya Body Soap",category:"Medicines"},{symbol:"VidavantianLace",name:"Vidavantian Lace",category:"Consumer Items"},{symbol:"TransgenicOnionHead",name:"Lucan Onionhead",category:"Legal Drugs"},{symbol:"JaquesQuinentianStill",name:"Jaques Quinentian Still",category:"Consumer Items"},{symbol:"SoontillRelics",name:"Soontill Relics",category:"Consumer Items"},{symbol:"Advert1",name:"Ultra-Compact Processor Prototypes",category:"Consumer Items"},{symbol:"TheHuttonMug",name:"The Hutton Mug",category:"Consumer Items"},{symbol:"SothisCrystallineGold",name:"Sothis Crystalline Gold",category:"Metals"},{symbol:"MasterChefs",name:"Master Chefs",category:"Slavery"},{symbol:"PersonalGifts",name:"Festive Gifts",category:"Salvage"},{symbol:"CrystallineSpheres",name:"Crystalline Spheres",category:"Salvage"},{symbol:"OnionHeadA",name:"Onionhead Alpha Strain",category:"Legal Drugs"},{symbol:"OnionHeadB",name:"Onionhead Beta Strain",category:"Legal Drugs"},{symbol:"GalacticTravelGuide",name:"Galactic Travel Guide",category:"Salvage"},{symbol:"AnimalEffigies",name:"Crom Silver Fesh",category:"Legal Drugs"},{symbol:"ShansCharisOrchid",name:"Shan's Charis Orchid",category:"Consumer Items"},{symbol:"BuckyballBeerMats",name:"Buckyball Beer Mats",category:"Consumer Items"},{symbol:"HarmaSilverSeaRum",name:"Harma Silver Sea Rum",category:"Legal Drugs"},{symbol:"PlatinumAloy",name:"Platinum Alloy",category:"Metals"},{symbol:"Nanomedicines",name:"Nanomedicines",category:"Medicines"},{symbol:"Duradrives",name:"Duradrives",category:"Consumer Items"},{symbol:"ApaVietii",name:"Apa Vietii",category:"Legal Drugs"},{symbol:"ClassifiedExperimentalEquipment",name:"Classified Experimental Equipment",category:"Technology"}];var RARE_COMMODITIES=buildCommodityCatalogue(rare_commodities_default,true);export{RARE_COMMODITIES};//# sourceMappingURL=chunk-EYGVDJ2I.js.map
1
+ import{buildCommodityCatalogue}from"./chunk-VQJXRPYI.js";var rare_commodities_default=[{symbol:"EraninPearlWhisky",name:"Eranin Pearl Whisky",category:"Legal Drugs"},{symbol:"LavianBrandy",name:"Lavian Brandy",category:"Legal Drugs"},{symbol:"HIP10175BushMeat",name:"HIP 10175 Bush Meat",category:"Foods"},{symbol:"AlbinoQuechuaMammoth",name:"Albino Quechua Mammoth Meat",category:"Foods"},{symbol:"UtgaroarMillenialEggs",name:"Utgaroar Millennial Eggs",category:"Foods"},{symbol:"WitchhaulKobeBeef",name:"Witchhaul Kobe Beef",category:"Foods"},{symbol:"KarsukiLocusts",name:"Karsuki Locusts",category:"Foods"},{symbol:"GiantIrukamaSnails",name:"Giant Irukama Snails",category:"Foods"},{symbol:"BaltahSineVacuumKrill",name:"Baltah'sine Vacuum Krill",category:"Foods"},{symbol:"CetiRabbits",name:"Ceti Rabbits",category:"Foods"},{symbol:"KachiriginLeaches",name:"Kachirigin Filter Leeches",category:"Medicines"},{symbol:"LyraeWeed",name:"Lyrae Weed",category:"Legal Drugs"},{symbol:"OnionHead",name:"Onionhead",category:"Legal Drugs"},{symbol:"TarachTorSpice",name:"Tarach Spice",category:"Legal Drugs"},{symbol:"Wolf1301Fesh",name:"Wolf Fesh",category:"Legal Drugs"},{symbol:"BorasetaniPathogenetics",name:"Borasetani Pathogenetics",category:"Weapons"},{symbol:"HIP118311Swarm",name:"HIP 118311 Swarm",category:"Weapons"},{symbol:"KonggaAle",name:"Kongga Ale",category:"Legal Drugs"},{symbol:"WuthieloKuFroth",name:"Wuthielo Ku Froth",category:"Legal Drugs"},{symbol:"AlacarakmoSkinArt",name:"Alacarakmo Skin Art",category:"Consumer Items"},{symbol:"EleuThermals",name:"Eleu Thermals",category:"Consumer Items"},{symbol:"EshuUmbrellas",name:"Eshu Umbrellas",category:"Consumer Items"},{symbol:"KaretiiCouture",name:"Karetii Couture",category:"Consumer Items"},{symbol:"NjangariSaddles",name:"Njangari Saddles",category:"Consumer Items"},{symbol:"AnyNaCoffee",name:"Any Na Coffee",category:"Foods"},{symbol:"CD75CatCoffee",name:"CD-75 Kitten Brand Coffee",category:"Foods"},{symbol:"GomanYauponCoffee",name:"Goman Yaupon Coffee",category:"Foods"},{symbol:"VolkhabBeeDrones",name:"Volkhab Bee Drones",category:"Machinery"},{symbol:"KinagoInstruments",name:"Kinago Violins",category:"Consumer Items"},{symbol:"NgunaModernAntiques",name:"Nguna Modern Antiques",category:"Consumer Items"},{symbol:"RajukruStoves",name:"Rajukru Multi-Stoves",category:"Consumer Items"},{symbol:"TiolceWaste2PasteUnits",name:"Tiolce Waste2Paste Units",category:"Consumer Items"},{symbol:"ChiEridaniMarinePaste",name:"Chi Eridani Marine Paste",category:"Foods"},{symbol:"EsusekuCaviar",name:"Esuseku Caviar",category:"Foods"},{symbol:"LiveHecateSeaWorms",name:"Live Hecate Sea Worms",category:"Foods"},{symbol:"HelvetitjPearls",name:"Helvetitj Pearls",category:"Metals"},{symbol:"HIP41181Squid",name:"HIP Proto-Squid",category:"Foods"},{symbol:"CoquimSpongiformVictuals",name:"Coquim Spongiform Victuals",category:"Foods"},{symbol:"AerialEdenApple",name:"Eden Apples of Aerial",category:"Foods"},{symbol:"NeritusBerries",name:"Neritus Berries",category:"Foods"},{symbol:"OchoengChillies",name:"Ochoeng Chillies",category:"Foods"},{symbol:"DeuringasTruffles",name:"Deuringas Truffles",category:"Foods"},{symbol:"HR7221Wheat",name:"HR 7221 Wheat",category:"Foods"},{symbol:"JarouaRice",name:"Jaroua Rice",category:"Foods"},{symbol:"BelalansRayLeather",name:"Belalans Ray Leather",category:"Textiles"},{symbol:"DamnaCarapaces",name:"Damna Carapaces",category:"Textiles"},{symbol:"RapaBaoSnakeSkins",name:"Rapa Bao Snake Skins",category:"Textiles"},{symbol:"VanayequiRhinoFur",name:"Vanayequi Ceratomorpha Fur",category:"Textiles"},{symbol:"BastSnakeGin",name:"Bast Snake Gin",category:"Legal Drugs"},{symbol:"ThrutisCream",name:"Thrutis Cream",category:"Legal Drugs"},{symbol:"WulpaHyperboreSystems",name:"Wulpa Hyperbore Systems",category:"Machinery"},{symbol:"AganippeRush",name:"Aganippe Rush",category:"Medicines"},{symbol:"TerraMaterBloodBores",name:"Terra Mater Blood Bores",category:"Medicines"},{symbol:"HolvaDuellingBlades",name:"Holva Duelling Blades",category:"Weapons"},{symbol:"KamorinHistoricWeapons",name:"Kamorin Historic Weapons",category:"Weapons"},{symbol:"GilyaSignatureWeapons",name:"Gilya Signature Weapons",category:"Weapons"},{symbol:"DeltaPhoenicisPalms",name:"Delta Phoenicis Palms",category:"Chemicals"},{symbol:"ToxandjiVirocide",name:"Toxandji Virocide",category:"Chemicals"},{symbol:"XiheCompanions",name:"Xihe Biomorphic Companions",category:"Technology"},{symbol:"SanumaMEAT",name:"Sanuma Decorative Meat",category:"Foods"},{symbol:"EthgrezeTeaBuds",name:"Ethgreze Tea Buds",category:"Foods"},{symbol:"CeremonialHeikeTea",name:"Ceremonial Heike Tea",category:"Foods"},{symbol:"TanmarkTranquilTea",name:"Tanmark Tranquil Tea",category:"Foods"},{symbol:"AZCancriFormula42",name:"AZ Cancri Formula 42",category:"Technology"},{symbol:"KamitraCigars",name:"Kamitra Cigars",category:"Legal Drugs"},{symbol:"RusaniOldSmokey",name:"Rusani Old Smokey",category:"Legal Drugs"},{symbol:"YasoKondiLeaf",name:"Yaso Kondi Leaf",category:"Legal Drugs"},{symbol:"ChateauDeAegaeon",name:"Chateau De Aegaeon",category:"Legal Drugs"},{symbol:"WatersOfShintara",name:"The Waters of Shintara",category:"Medicines"},{symbol:"OphiuchiExinoArtefacts",name:"Ophiuch Exino Artefacts",category:"Consumer Items"},{symbol:"BakedGreebles",name:"Baked Greebles",category:"Foods"},{symbol:"CetiAepyornisEgg",name:"Aepyornis Egg",category:"Foods"},{symbol:"SaxonWine",name:"Saxon Wine",category:"Legal Drugs"},{symbol:"CentauriMegaGin",name:"Centauri Mega Gin",category:"Legal Drugs"},{symbol:"AnduligaFireWorks",name:"Anduliga Fire Works",category:"Consumer Items"},{symbol:"BankiAmphibiousLeather",name:"Banki Amphibious Leather",category:"Textiles"},{symbol:"CherbonesBloodCrystals",name:"Cherbones Blood Crystals",category:"Metals"},{symbol:"MotronaExperienceJelly",name:"Motrona Experience Jelly",category:"Legal Drugs"},{symbol:"GeawenDanceDust",name:"Geawen Dance Dust",category:"Legal Drugs"},{symbol:"GerasianGueuzeBeer",name:"Gerasian Gueuze Beer",category:"Legal Drugs"},{symbol:"HaidneBlackBrew",name:"Haiden Black Brew",category:"Foods"},{symbol:"HavasupaiDreamCatcher",name:"Havasupai Dream Catcher",category:"Consumer Items"},{symbol:"BurnhamBileDistillate",name:"Burnham Bile Distillate",category:"Legal Drugs"},{symbol:"HIPOrganophosphates",name:"HIP Organophosphates",category:"Chemicals"},{symbol:"JaradharrePuzzlebox",name:"Jaradharre Puzzle Box",category:"Consumer Items"},{symbol:"KorroKungPellets",name:"Koro Kung Pellets",category:"Chemicals"},{symbol:"LFTVoidExtractCoffee",name:"Void Extract Coffee",category:"Foods"},{symbol:"HonestyPills",name:"Honesty Pills",category:"Medicines"},{symbol:"NonEuclidianExotanks",name:"Non Euclidian Exotanks",category:"Machinery"},{symbol:"LTTHyperSweet",name:"LTT Hyper Sweet",category:"Foods"},{symbol:"MechucosHighTea",name:"Mechucos High Tea",category:"Foods"},{symbol:"MedbStarlube",name:"Medb Starlube",category:"Chemicals"},{symbol:"MokojingBeastFeast",name:"Mokojing Beast Feast",category:"Foods"},{symbol:"MukusubiiChitinOs",name:"Mukusubii Chitin-os",category:"Foods"},{symbol:"MulachiGiantFungus",name:"Mulachi Giant Fungus",category:"Foods"},{symbol:"NgadandariFireOpals",name:"Ngadandari Fire Opals",category:"Metals"},{symbol:"TiegfriesSynthSilk",name:"Tiegfries Synth Silk",category:"Textiles"},{symbol:"UzumokuLowGWings",name:"Uzumoku Low-G Wings",category:"Consumer Items"},{symbol:"VHerculisBodyRub",name:"V Herculis Body Rub",category:"Medicines"},{symbol:"WheemeteWheatCakes",name:"Wheemete Wheat Cakes",category:"Foods"},{symbol:"VegaSlimWeed",name:"Vega Slimweed",category:"Medicines"},{symbol:"AltairianSkin",name:"Altairian Skin",category:"Consumer Items"},{symbol:"PavonisEarGrubs",name:"Pavonis Ear Grubs",category:"Legal Drugs"},{symbol:"JotunMookah",name:"Jotun Mookah",category:"Textiles"},{symbol:"GiantVerrix",name:"Giant Verrix",category:"Machinery"},{symbol:"IndiBourbon",name:"Indi Bourbon",category:"Legal Drugs"},{symbol:"AroucaConventualSweets",name:"Arouca Conventual Sweets",category:"Foods"},{symbol:"TauriChimes",name:"Tauri Chimes",category:"Consumer Items"},{symbol:"ZeesszeAntGlue",name:"Zeessze Ant Grub Glue",category:"Consumer Items"},{symbol:"PantaaPrayerSticks",name:"Pantaa Prayer Sticks",category:"Medicines"},{symbol:"FujinTea",name:"Fujin Tea",category:"Foods"},{symbol:"ChameleonCloth",name:"Chameleon Cloth",category:"Textiles"},{symbol:"OrrerianViciousBrew",name:"Orrerian Vicious Brew",category:"Foods"},{symbol:"UszaianTreeGrub",name:"Uszaian Tree Grub",category:"Foods"},{symbol:"MomusBogSpaniel",name:"Momus Bog Spaniel",category:"Consumer Items"},{symbol:"DisoMaCorn",name:"Diso Ma Corn",category:"Foods"},{symbol:"LeestianEvilJuice",name:"Leestian Evil Juice",category:"Legal Drugs"},{symbol:"BlueMilk",name:"Azure Milk",category:"Foods"},{symbol:"AlienEggs",name:"Leathery Eggs",category:"Consumer Items"},{symbol:"AlyaBodilySoap",name:"Alya Body Soap",category:"Medicines"},{symbol:"VidavantianLace",name:"Vidavantian Lace",category:"Consumer Items"},{symbol:"TransgenicOnionHead",name:"Lucan Onionhead",category:"Legal Drugs"},{symbol:"JaquesQuinentianStill",name:"Jaques Quinentian Still",category:"Consumer Items"},{symbol:"SoontillRelics",name:"Soontill Relics",category:"Consumer Items"},{symbol:"Advert1",name:"Ultra-Compact Processor Prototypes",category:"Consumer Items"},{symbol:"TheHuttonMug",name:"The Hutton Mug",category:"Consumer Items"},{symbol:"SothisCrystallineGold",name:"Sothis Crystalline Gold",category:"Metals"},{symbol:"MasterChefs",name:"Master Chefs",category:"Slavery"},{symbol:"PersonalGifts",name:"Festive Gifts",category:"Salvage"},{symbol:"CrystallineSpheres",name:"Crystalline Spheres",category:"Salvage"},{symbol:"OnionHeadA",name:"Onionhead Alpha Strain",category:"Legal Drugs"},{symbol:"OnionHeadB",name:"Onionhead Beta Strain",category:"Legal Drugs"},{symbol:"GalacticTravelGuide",name:"Galactic Travel Guide",category:"Salvage"},{symbol:"AnimalEffigies",name:"Crom Silver Fesh",category:"Legal Drugs"},{symbol:"ShansCharisOrchid",name:"Shan's Charis Orchid",category:"Consumer Items"},{symbol:"BuckyballBeerMats",name:"Buckyball Beer Mats",category:"Consumer Items"},{symbol:"HarmaSilverSeaRum",name:"Harma Silver Sea Rum",category:"Legal Drugs"},{symbol:"PlatinumAloy",name:"Platinum Alloy",category:"Metals"},{symbol:"Nanomedicines",name:"Nanomedicines",category:"Medicines"},{symbol:"Duradrives",name:"Duradrives",category:"Consumer Items"},{symbol:"ApaVietii",name:"Apa Vietii",category:"Legal Drugs"},{symbol:"ClassifiedExperimentalEquipment",name:"Classified Experimental Equipment",category:"Technology"}];var RARE_COMMODITIES=buildCommodityCatalogue(rare_commodities_default,true);export{RARE_COMMODITIES};//# sourceMappingURL=chunk-GMTAFUAG.js.map
@@ -1 +1 @@
1
- function buildMaterialCatalogue(records,category){return Object.freeze(records.map(record=>Object.freeze({category:category,symbol:record.symbol,name:record.name,elementSymbol:record.elementSymbol,grade:record.grade,line:record.line})))}export{buildMaterialCatalogue};//# sourceMappingURL=chunk-Z43DN4PY.js.map
1
+ function buildMaterialCatalogue(records,category){return Object.freeze(records.map(record=>Object.freeze({category:category,symbol:record.symbol,name:record.name,elementSymbol:record.elementSymbol,grade:record.grade,line:record.line})))}export{buildMaterialCatalogue};//# sourceMappingURL=chunk-GTEHRZPN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/materials/internal/material-catalogue.ts"],"names":["buildMaterialCatalogue","records","category","Object","freeze","map","record","symbol","name","elementSymbol","grade","line"],"mappings":"AAcO,SAASA,uBACZC,QACAC,UAEA,OAAOC,OAAOC,OACVH,QAAQI,IAAKC,QACTH,OAAOC,OAAO,CACVF,kBACAK,OAAQD,OAAOC,OACfC,KAAMF,OAAOE,KACbC,cAAeH,OAAOG,cACtBC,MAAOJ,OAAOI,MACdC,KAAML,OAAOK,QAI7B,QAAAX"}
1
+ {"version":3,"sources":["../src/materials/internal/material-catalogue.ts"],"names":["buildMaterialCatalogue","records","category","Object","freeze","map","record","symbol","name","elementSymbol","grade","line"],"mappings":"AAQO,SAASA,uBACZC,QACAC,UAKA,OAAOC,OAAOC,OACVH,QAAQI,IAAKC,QACTH,OAAOC,OAAO,CACVF,kBACAK,OAAQD,OAAOC,OACfC,KAAMF,OAAOE,KACbC,cAAeH,OAAOG,cACtBC,MAAOJ,OAAOI,MACdC,KAAML,OAAOK,QAI7B,QAAAX"}
@@ -1 +1 @@
1
- import{ALL_MODULES}from"./chunk-QY3L5BKN.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";var MODULES_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_MODULES,"symbol");function builtInModuleBySymbol(symbol,label){return findInKeyIndex(MODULES_BY_SYMBOL,symbol,label)}function getModuleBySymbol(symbol,modules=ALL_MODULES){return modules===ALL_MODULES?builtInModuleBySymbol(symbol,"getModuleBySymbol: symbol"):findByKey(modules,"symbol",symbol,"getModuleBySymbol: symbol")}function getModulesByName(name,modules=ALL_MODULES){return filterByKey(modules,"name",name,"getModulesByName: name")}function getBulkheadsForShip(ship,modules=ALL_MODULES){return filterByKey(modules,"ship",ship,"getBulkheadsForShip: ship")}export{builtInModuleBySymbol,getBulkheadsForShip,getModuleBySymbol,getModulesByName};//# sourceMappingURL=chunk-PA5EITW5.js.map
1
+ import{ALL_MODULES}from"./chunk-APEG4ZER.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";var MODULES_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_MODULES,"symbol");function builtInModuleBySymbol(symbol,label){return findInKeyIndex(MODULES_BY_SYMBOL,symbol,label)}function getModuleBySymbol(symbol,modules=ALL_MODULES){return modules===ALL_MODULES?builtInModuleBySymbol(symbol,"getModuleBySymbol: symbol"):findByKey(modules,"symbol",symbol,"getModuleBySymbol: symbol")}function getModulesByName(name,modules=ALL_MODULES){return filterByKey(modules,"name",name,"getModulesByName: name")}function getBulkheadsForShip(ship,modules=ALL_MODULES){return filterByKey(modules,"ship",ship,"getBulkheadsForShip: ship")}export{builtInModuleBySymbol,getBulkheadsForShip,getModuleBySymbol,getModulesByName};//# sourceMappingURL=chunk-HUYYGTRM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ships/internal/module-symbol-index.ts","../src/ships/modules.ts"],"names":["ALL_MODULES","findInKeyIndex","findByKey","filterByKey","createKeyIndex","MODULES_BY_SYMBOL","builtInModuleBySymbol","symbol","label","getModuleBySymbol","modules","getModulesByName","name","getBulkheadsForShip","ship"],"mappings":"O,2HAMA,IAAMK,iCAAoCD,eAAeJ,YAAa,UAS/D,SAASM,sBAAsBC,OAAgBC,OAClD,OAAOP,eAAeI,kBAAmBE,OAAQC,MACrD,CCg1BO,SAASC,kBACZF,OACAG,QAAuCV,aAEvC,OAAOU,UAAYV,YACbM,sBAAsBC,OAAQ,6BAC9BL,UAAUQ,QAAS,SAAUH,OAAQ,4BAC/C,CAoBO,SAASI,iBACZC,KACAF,QAAuCV,aAEvC,OAAOG,YAAYO,QAAS,OAAQE,KAAM,yBAC9C,CA8BO,SAASC,oBACZC,KACAJ,QAAuCV,aAEvC,OAAOG,YAAYO,QAAS,OAAQI,KAAM,4BAC9C,QAAAR,sBAAAO,oBAAAJ,kBAAAE"}
1
+ {"version":3,"sources":["../src/ships/internal/module-symbol-index.ts","../src/ships/modules.ts"],"names":["ALL_MODULES","findInKeyIndex","findByKey","filterByKey","createKeyIndex","MODULES_BY_SYMBOL","builtInModuleBySymbol","symbol","label","getModuleBySymbol","modules","getModulesByName","name","getBulkheadsForShip","ship"],"mappings":"O,2HAMA,IAAMK,iCAAoCD,eAAeJ,YAAa,UAS/D,SAASM,sBAAsBC,OAAgBC,OAClD,OAAOP,eAAeI,kBAAmBE,OAAQC,MACrD,CCo2BO,SAASC,kBACZF,OACAG,QAAuCV,aAEvC,OAAOU,UAAYV,YACbM,sBAAsBC,OAAQ,6BAC9BL,UAAUQ,QAAS,SAAUH,OAAQ,4BAC/C,CAoBO,SAASI,iBACZC,KACAF,QAAuCV,aAEvC,OAAOG,YAAYO,QAAS,OAAQE,KAAM,yBAC9C,CA8BO,SAASC,oBACZC,KACAJ,QAAuCV,aAEvC,OAAOG,YAAYO,QAAS,OAAQI,KAAM,4BAC9C,QAAAR,sBAAAO,oBAAAJ,kBAAAE"}
@@ -1 +1 @@
1
- import{buildMaterialCatalogue}from"./chunk-Z43DN4PY.js";var materials_manufactured_default=[{symbol:"SalvagedAlloys",name:"Salvaged Alloys",elementSymbol:null,grade:1,line:"Alloys"},{symbol:"GalvanisingAlloys",name:"Galvanising Alloys",elementSymbol:null,grade:2,line:"Alloys"},{symbol:"PhaseAlloys",name:"Phase Alloys",elementSymbol:null,grade:3,line:"Alloys"},{symbol:"ProtoLightAlloys",name:"Proto Light Alloys",elementSymbol:null,grade:4,line:"Alloys"},{symbol:"ProtoRadiolicAlloys",name:"Proto Radiolic Alloys",elementSymbol:null,grade:5,line:"Alloys"},{symbol:"GridResistors",name:"Grid Resistors",elementSymbol:null,grade:1,line:"Capacitors"},{symbol:"HybridCapacitors",name:"Hybrid Capacitors",elementSymbol:null,grade:2,line:"Capacitors"},{symbol:"ElectrochemicalArrays",name:"Electrochemical Arrays",elementSymbol:null,grade:3,line:"Capacitors"},{symbol:"PolymerCapacitors",name:"Polymer Capacitors",elementSymbol:null,grade:4,line:"Capacitors"},{symbol:"MilitarySupercapacitors",name:"Military Supercapacitors",elementSymbol:null,grade:5,line:"Capacitors"},{symbol:"ChemicalStorageUnits",name:"Chemical Storage Units",elementSymbol:null,grade:1,line:"Chemical"},{symbol:"ChemicalProcessors",name:"Chemical Processors",elementSymbol:null,grade:2,line:"Chemical"},{symbol:"ChemicalDistillery",name:"Chemical Distillery",elementSymbol:null,grade:3,line:"Chemical"},{symbol:"ChemicalManipulators",name:"Chemical Manipulators",elementSymbol:null,grade:4,line:"Chemical"},{symbol:"PharmaceuticalIsolators",name:"Pharmaceutical Isolators",elementSymbol:null,grade:5,line:"Chemical"},{symbol:"CompactComposites",name:"Compact Composites",elementSymbol:null,grade:1,line:"Composite"},{symbol:"FilamentComposites",name:"Filament Composites",elementSymbol:null,grade:2,line:"Composite"},{symbol:"HighDensityComposites",name:"High Density Composites",elementSymbol:null,grade:3,line:"Composite"},{symbol:"FedProprietaryComposites",name:"Proprietary Composites",elementSymbol:null,grade:4,line:"Composite"},{symbol:"FedCoreComposites",name:"Core Dynamics Composites",elementSymbol:null,grade:5,line:"Composite"},{symbol:"BasicConductors",name:"Basic Conductors",elementSymbol:null,grade:1,line:"Conductive"},{symbol:"ConductiveComponents",name:"Conductive Components",elementSymbol:null,grade:2,line:"Conductive"},{symbol:"ConductiveCeramics",name:"Conductive Ceramics",elementSymbol:null,grade:3,line:"Conductive"},{symbol:"ConductivePolymers",name:"Conductive Polymers",elementSymbol:null,grade:4,line:"Conductive"},{symbol:"BiotechConductors",name:"Biotech Conductors",elementSymbol:null,grade:5,line:"Conductive"},{symbol:"CrystalShards",name:"Crystal Shards",elementSymbol:null,grade:1,line:"Crystals"},{symbol:"UncutFocusCrystals",name:"Flawed Focus Crystals",elementSymbol:null,grade:2,line:"Crystals"},{symbol:"FocusCrystals",name:"Focus Crystals",elementSymbol:null,grade:3,line:"Crystals"},{symbol:"RefinedFocusCrystals",name:"Refined Focus Crystals",elementSymbol:null,grade:4,line:"Crystals"},{symbol:"ExquisiteFocusCrystals",name:"Exquisite Focus Crystals",elementSymbol:null,grade:5,line:"Crystals"},{symbol:"Guardian_PowerCell",name:"Guardian Power Cell",elementSymbol:null,grade:1,line:"Guardian"},{symbol:"Guardian_Sentinel_WreckageComponents",name:"Guardian Sentinel Wreckage Components",elementSymbol:null,grade:1,line:"Guardian"},{symbol:"Guardian_PowerConduit",name:"Guardian Power Conduit",elementSymbol:null,grade:2,line:"Guardian"},{symbol:"Guardian_Sentinel_WeaponParts",name:"Guardian Sentinel Weapon Parts",elementSymbol:null,grade:3,line:"Guardian"},{symbol:"Guardian_TechComponent",name:"Guardian Technology Component",elementSymbol:null,grade:3,line:"Guardian"},{symbol:"HeatConductionWiring",name:"Heat Conduction Wiring",elementSymbol:null,grade:1,line:"Heat"},{symbol:"HeatDispersionPlate",name:"Heat Dispersion Plate",elementSymbol:null,grade:2,line:"Heat"},{symbol:"HeatExchangers",name:"Heat Exchangers",elementSymbol:null,grade:3,line:"Heat"},{symbol:"HeatVanes",name:"Heat Vanes",elementSymbol:null,grade:4,line:"Heat"},{symbol:"ProtoHeatRadiators",name:"Proto Heat Radiators",elementSymbol:null,grade:5,line:"Heat"},{symbol:"MechanicalScrap",name:"Mechanical Scrap",elementSymbol:null,grade:1,line:"Mechanical Components"},{symbol:"MechanicalEquipment",name:"Mechanical Equipment",elementSymbol:null,grade:2,line:"Mechanical Components"},{symbol:"MechanicalComponents",name:"Mechanical Components",elementSymbol:null,grade:3,line:"Mechanical Components"},{symbol:"ConfigurableComponents",name:"Configurable Components",elementSymbol:null,grade:4,line:"Mechanical Components"},{symbol:"ImprovisedComponents",name:"Improvised Components",elementSymbol:null,grade:5,line:"Mechanical Components"},{symbol:"WornShieldEmitters",name:"Worn Shield Emitters",elementSymbol:null,grade:1,line:"Shielding"},{symbol:"ShieldEmitters",name:"Shield Emitters",elementSymbol:null,grade:2,line:"Shielding"},{symbol:"ShieldingSensors",name:"Shielding Sensors",elementSymbol:null,grade:3,line:"Shielding"},{symbol:"CompoundShielding",name:"Compound Shielding",elementSymbol:null,grade:4,line:"Shielding"},{symbol:"ImperialShielding",name:"Imperial Shielding",elementSymbol:null,grade:5,line:"Shielding"},{symbol:"tg_abrasion03",name:"Hardened Surface Fragments",elementSymbol:null,grade:1,line:"Thargoid"},{symbol:"tg_causticshard",name:"Caustic Shard",elementSymbol:null,grade:2,line:"Thargoid"},{symbol:"unknowncorechip",name:"Tactical Core Chip",elementSymbol:null,grade:2,line:"Thargoid"},{symbol:"UnknownCarapace",name:"Thargoid Carapace",elementSymbol:null,grade:2,line:"Thargoid"},{symbol:"TG_BioMechanicalConduits",name:"Bio-Mechanical Conduits",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"tg_causticgeneratorparts",name:"Corrosive Mechanisms",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"tg_abrasion02",name:"Phasing Membrane Residue",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"UnknownEnergyCell",name:"Thargoid Energy Cell",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"TG_WreckageComponents",name:"Wreckage Components",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"tg_causticcrystal",name:"Caustic Crystal",elementSymbol:null,grade:4,line:"Thargoid"},{symbol:"UnknownTechnologyComponents",name:"Thargoid Technological Components",elementSymbol:null,grade:4,line:"Thargoid"},{symbol:"TG_WeaponParts",name:"Weapon Parts",elementSymbol:null,grade:4,line:"Thargoid"},{symbol:"tg_abrasion01",name:"Heat Exposure Specimen",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"TG_PropulsionElement",name:"Propulsion Elements",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"UnknownEnergySource",name:"Sensor Fragment",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"UnknownOrganicCircuitry",name:"Thargoid Organic Circuitry",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"TemperedAlloys",name:"Tempered Alloys",elementSymbol:null,grade:1,line:"Thermic"},{symbol:"HeatResistantCeramics",name:"Heat Resistant Ceramics",elementSymbol:null,grade:2,line:"Thermic"},{symbol:"PrecipitatedAlloys",name:"Precipitated Alloys",elementSymbol:null,grade:3,line:"Thermic"},{symbol:"ThermicAlloys",name:"Thermic Alloys",elementSymbol:null,grade:4,line:"Thermic"},{symbol:"MilitaryGradeAlloys",name:"Military Grade Alloys",elementSymbol:null,grade:5,line:"Thermic"}];var MANUFACTURED_MATERIALS=buildMaterialCatalogue(materials_manufactured_default,"manufactured");export{MANUFACTURED_MATERIALS};//# sourceMappingURL=chunk-HKXXFIRI.js.map
1
+ import{buildMaterialCatalogue}from"./chunk-GTEHRZPN.js";var materials_manufactured_default=[{symbol:"SalvagedAlloys",name:"Salvaged Alloys",elementSymbol:null,grade:1,line:"Alloys"},{symbol:"GalvanisingAlloys",name:"Galvanising Alloys",elementSymbol:null,grade:2,line:"Alloys"},{symbol:"PhaseAlloys",name:"Phase Alloys",elementSymbol:null,grade:3,line:"Alloys"},{symbol:"ProtoLightAlloys",name:"Proto Light Alloys",elementSymbol:null,grade:4,line:"Alloys"},{symbol:"ProtoRadiolicAlloys",name:"Proto Radiolic Alloys",elementSymbol:null,grade:5,line:"Alloys"},{symbol:"GridResistors",name:"Grid Resistors",elementSymbol:null,grade:1,line:"Capacitors"},{symbol:"HybridCapacitors",name:"Hybrid Capacitors",elementSymbol:null,grade:2,line:"Capacitors"},{symbol:"ElectrochemicalArrays",name:"Electrochemical Arrays",elementSymbol:null,grade:3,line:"Capacitors"},{symbol:"PolymerCapacitors",name:"Polymer Capacitors",elementSymbol:null,grade:4,line:"Capacitors"},{symbol:"MilitarySupercapacitors",name:"Military Supercapacitors",elementSymbol:null,grade:5,line:"Capacitors"},{symbol:"ChemicalStorageUnits",name:"Chemical Storage Units",elementSymbol:null,grade:1,line:"Chemical"},{symbol:"ChemicalProcessors",name:"Chemical Processors",elementSymbol:null,grade:2,line:"Chemical"},{symbol:"ChemicalDistillery",name:"Chemical Distillery",elementSymbol:null,grade:3,line:"Chemical"},{symbol:"ChemicalManipulators",name:"Chemical Manipulators",elementSymbol:null,grade:4,line:"Chemical"},{symbol:"PharmaceuticalIsolators",name:"Pharmaceutical Isolators",elementSymbol:null,grade:5,line:"Chemical"},{symbol:"CompactComposites",name:"Compact Composites",elementSymbol:null,grade:1,line:"Composite"},{symbol:"FilamentComposites",name:"Filament Composites",elementSymbol:null,grade:2,line:"Composite"},{symbol:"HighDensityComposites",name:"High Density Composites",elementSymbol:null,grade:3,line:"Composite"},{symbol:"FedProprietaryComposites",name:"Proprietary Composites",elementSymbol:null,grade:4,line:"Composite"},{symbol:"FedCoreComposites",name:"Core Dynamics Composites",elementSymbol:null,grade:5,line:"Composite"},{symbol:"BasicConductors",name:"Basic Conductors",elementSymbol:null,grade:1,line:"Conductive"},{symbol:"ConductiveComponents",name:"Conductive Components",elementSymbol:null,grade:2,line:"Conductive"},{symbol:"ConductiveCeramics",name:"Conductive Ceramics",elementSymbol:null,grade:3,line:"Conductive"},{symbol:"ConductivePolymers",name:"Conductive Polymers",elementSymbol:null,grade:4,line:"Conductive"},{symbol:"BiotechConductors",name:"Biotech Conductors",elementSymbol:null,grade:5,line:"Conductive"},{symbol:"CrystalShards",name:"Crystal Shards",elementSymbol:null,grade:1,line:"Crystals"},{symbol:"UncutFocusCrystals",name:"Flawed Focus Crystals",elementSymbol:null,grade:2,line:"Crystals"},{symbol:"FocusCrystals",name:"Focus Crystals",elementSymbol:null,grade:3,line:"Crystals"},{symbol:"RefinedFocusCrystals",name:"Refined Focus Crystals",elementSymbol:null,grade:4,line:"Crystals"},{symbol:"ExquisiteFocusCrystals",name:"Exquisite Focus Crystals",elementSymbol:null,grade:5,line:"Crystals"},{symbol:"Guardian_PowerCell",name:"Guardian Power Cell",elementSymbol:null,grade:1,line:"Guardian"},{symbol:"Guardian_Sentinel_WreckageComponents",name:"Guardian Sentinel Wreckage Components",elementSymbol:null,grade:1,line:"Guardian"},{symbol:"Guardian_PowerConduit",name:"Guardian Power Conduit",elementSymbol:null,grade:2,line:"Guardian"},{symbol:"Guardian_Sentinel_WeaponParts",name:"Guardian Sentinel Weapon Parts",elementSymbol:null,grade:3,line:"Guardian"},{symbol:"Guardian_TechComponent",name:"Guardian Technology Component",elementSymbol:null,grade:3,line:"Guardian"},{symbol:"HeatConductionWiring",name:"Heat Conduction Wiring",elementSymbol:null,grade:1,line:"Heat"},{symbol:"HeatDispersionPlate",name:"Heat Dispersion Plate",elementSymbol:null,grade:2,line:"Heat"},{symbol:"HeatExchangers",name:"Heat Exchangers",elementSymbol:null,grade:3,line:"Heat"},{symbol:"HeatVanes",name:"Heat Vanes",elementSymbol:null,grade:4,line:"Heat"},{symbol:"ProtoHeatRadiators",name:"Proto Heat Radiators",elementSymbol:null,grade:5,line:"Heat"},{symbol:"MechanicalScrap",name:"Mechanical Scrap",elementSymbol:null,grade:1,line:"Mechanical Components"},{symbol:"MechanicalEquipment",name:"Mechanical Equipment",elementSymbol:null,grade:2,line:"Mechanical Components"},{symbol:"MechanicalComponents",name:"Mechanical Components",elementSymbol:null,grade:3,line:"Mechanical Components"},{symbol:"ConfigurableComponents",name:"Configurable Components",elementSymbol:null,grade:4,line:"Mechanical Components"},{symbol:"ImprovisedComponents",name:"Improvised Components",elementSymbol:null,grade:5,line:"Mechanical Components"},{symbol:"WornShieldEmitters",name:"Worn Shield Emitters",elementSymbol:null,grade:1,line:"Shielding"},{symbol:"ShieldEmitters",name:"Shield Emitters",elementSymbol:null,grade:2,line:"Shielding"},{symbol:"ShieldingSensors",name:"Shielding Sensors",elementSymbol:null,grade:3,line:"Shielding"},{symbol:"CompoundShielding",name:"Compound Shielding",elementSymbol:null,grade:4,line:"Shielding"},{symbol:"ImperialShielding",name:"Imperial Shielding",elementSymbol:null,grade:5,line:"Shielding"},{symbol:"tg_abrasion03",name:"Hardened Surface Fragments",elementSymbol:null,grade:1,line:"Thargoid"},{symbol:"tg_causticshard",name:"Caustic Shard",elementSymbol:null,grade:2,line:"Thargoid"},{symbol:"unknowncorechip",name:"Tactical Core Chip",elementSymbol:null,grade:2,line:"Thargoid"},{symbol:"UnknownCarapace",name:"Thargoid Carapace",elementSymbol:null,grade:2,line:"Thargoid"},{symbol:"TG_BioMechanicalConduits",name:"Bio-Mechanical Conduits",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"tg_causticgeneratorparts",name:"Corrosive Mechanisms",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"tg_abrasion02",name:"Phasing Membrane Residue",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"UnknownEnergyCell",name:"Thargoid Energy Cell",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"TG_WreckageComponents",name:"Wreckage Components",elementSymbol:null,grade:3,line:"Thargoid"},{symbol:"tg_causticcrystal",name:"Caustic Crystal",elementSymbol:null,grade:4,line:"Thargoid"},{symbol:"UnknownTechnologyComponents",name:"Thargoid Technological Components",elementSymbol:null,grade:4,line:"Thargoid"},{symbol:"TG_WeaponParts",name:"Weapon Parts",elementSymbol:null,grade:4,line:"Thargoid"},{symbol:"tg_abrasion01",name:"Heat Exposure Specimen",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"TG_PropulsionElement",name:"Propulsion Elements",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"UnknownEnergySource",name:"Sensor Fragment",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"UnknownOrganicCircuitry",name:"Thargoid Organic Circuitry",elementSymbol:null,grade:5,line:"Thargoid"},{symbol:"TemperedAlloys",name:"Tempered Alloys",elementSymbol:null,grade:1,line:"Thermic"},{symbol:"HeatResistantCeramics",name:"Heat Resistant Ceramics",elementSymbol:null,grade:2,line:"Thermic"},{symbol:"PrecipitatedAlloys",name:"Precipitated Alloys",elementSymbol:null,grade:3,line:"Thermic"},{symbol:"ThermicAlloys",name:"Thermic Alloys",elementSymbol:null,grade:4,line:"Thermic"},{symbol:"MilitaryGradeAlloys",name:"Military Grade Alloys",elementSymbol:null,grade:5,line:"Thermic"}];var MANUFACTURED_MATERIALS=buildMaterialCatalogue(materials_manufactured_default,"manufactured");export{MANUFACTURED_MATERIALS};//# sourceMappingURL=chunk-ITKZKREP.js.map
@@ -1 +1 @@
1
- import{ALL_MATERIALS}from"./chunk-V4C6FIE2.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";import{describeValue}from"./chunk-PKWVG2JY.js";var MaterialGrade=/* @__PURE__ */(MaterialGrade2=>{MaterialGrade2[MaterialGrade2["VeryCommon"]=1]="VeryCommon";MaterialGrade2[MaterialGrade2["Common"]=2]="Common";MaterialGrade2[MaterialGrade2["Standard"]=3]="Standard";MaterialGrade2[MaterialGrade2["Rare"]=4]="Rare";MaterialGrade2[MaterialGrade2["VeryRare"]=5]="VeryRare";return MaterialGrade2})(MaterialGrade||{});var MaterialLine=/* @__PURE__ */(MaterialLine2=>{MaterialLine2["Carbon"]="Carbon";MaterialLine2["Phosphorus"]="Phosphorus";MaterialLine2["Sulphur"]="Sulphur";MaterialLine2["Iron"]="Iron";MaterialLine2["Nickel"]="Nickel";MaterialLine2["Rhenium"]="Rhenium";MaterialLine2["Lead"]="Lead";MaterialLine2["Chemical"]="Chemical";MaterialLine2["Thermic"]="Thermic";MaterialLine2["Heat"]="Heat";MaterialLine2["Conductive"]="Conductive";MaterialLine2["MechanicalComponents"]="Mechanical Components";MaterialLine2["Capacitors"]="Capacitors";MaterialLine2["Shielding"]="Shielding";MaterialLine2["Composite"]="Composite";MaterialLine2["Crystals"]="Crystals";MaterialLine2["Alloys"]="Alloys";MaterialLine2["EmissionData"]="Emission Data";MaterialLine2["WakeScans"]="Wake Scans";MaterialLine2["ShieldData"]="Shield Data";MaterialLine2["EncryptionFiles"]="Encryption Files";MaterialLine2["DataArchives"]="Data Archives";MaterialLine2["EncodedFirmware"]="Encoded Firmware";MaterialLine2["Guardian"]="Guardian";MaterialLine2["Thargoid"]="Thargoid";return MaterialLine2})(MaterialLine||{});var MATERIALS_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_MATERIALS,"symbol");var MATERIALS_BY_NAME=/* @__PURE__ */createKeyIndex(ALL_MATERIALS,"name");var MATERIALS_BY_ELEMENT=/* @__PURE__ */createKeyIndex(ALL_MATERIALS,"elementSymbol");function getMaterialBySymbol(symbol,materials=ALL_MATERIALS){return materials===ALL_MATERIALS?findInKeyIndex(MATERIALS_BY_SYMBOL,symbol,"getMaterialBySymbol: symbol"):findByKey(materials,"symbol",symbol,"getMaterialBySymbol: symbol")}function getMaterialByName(name,materials=ALL_MATERIALS){return materials===ALL_MATERIALS?findInKeyIndex(MATERIALS_BY_NAME,name,"getMaterialByName: name"):findByKey(materials,"name",name,"getMaterialByName: name")}function getMaterialByElementSymbol(elementSymbol,materials=ALL_MATERIALS){return materials===ALL_MATERIALS?findInKeyIndex(MATERIALS_BY_ELEMENT,elementSymbol,"getMaterialByElementSymbol: elementSymbol"):findByKey(materials,"elementSymbol",elementSymbol,"getMaterialByElementSymbol: elementSymbol")}function materialsByGrade(grade){if(grade==null)return[];if(typeof grade!=="number"){throw new TypeError(`materialsByGrade: grade must be a number, received ${describeValue(grade)}`)}return ALL_MATERIALS.filter(material=>material.grade===grade)}function materialsInLine(line){return filterByKey(ALL_MATERIALS,"line",line,"materialsInLine: line")}function materialsInCategory(category){return filterByKey(ALL_MATERIALS,"category",category,"materialsInCategory: category")}export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine};//# sourceMappingURL=chunk-OYR5HUQZ.js.map
1
+ import{ALL_MATERIALS}from"./chunk-JO52LYO3.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";import{describeValue}from"./chunk-PKWVG2JY.js";var MaterialGrade=/* @__PURE__ */(MaterialGrade2=>{MaterialGrade2[MaterialGrade2["VeryCommon"]=1]="VeryCommon";MaterialGrade2[MaterialGrade2["Common"]=2]="Common";MaterialGrade2[MaterialGrade2["Standard"]=3]="Standard";MaterialGrade2[MaterialGrade2["Rare"]=4]="Rare";MaterialGrade2[MaterialGrade2["VeryRare"]=5]="VeryRare";return MaterialGrade2})(MaterialGrade||{});var MaterialLine=/* @__PURE__ */(MaterialLine2=>{MaterialLine2["Carbon"]="Carbon";MaterialLine2["Phosphorus"]="Phosphorus";MaterialLine2["Sulphur"]="Sulphur";MaterialLine2["Iron"]="Iron";MaterialLine2["Nickel"]="Nickel";MaterialLine2["Rhenium"]="Rhenium";MaterialLine2["Lead"]="Lead";MaterialLine2["Chemical"]="Chemical";MaterialLine2["Thermic"]="Thermic";MaterialLine2["Heat"]="Heat";MaterialLine2["Conductive"]="Conductive";MaterialLine2["MechanicalComponents"]="Mechanical Components";MaterialLine2["Capacitors"]="Capacitors";MaterialLine2["Shielding"]="Shielding";MaterialLine2["Composite"]="Composite";MaterialLine2["Crystals"]="Crystals";MaterialLine2["Alloys"]="Alloys";MaterialLine2["EmissionData"]="Emission Data";MaterialLine2["WakeScans"]="Wake Scans";MaterialLine2["ShieldData"]="Shield Data";MaterialLine2["EncryptionFiles"]="Encryption Files";MaterialLine2["DataArchives"]="Data Archives";MaterialLine2["EncodedFirmware"]="Encoded Firmware";MaterialLine2["Guardian"]="Guardian";MaterialLine2["Thargoid"]="Thargoid";return MaterialLine2})(MaterialLine||{});var MATERIALS_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_MATERIALS,"symbol");var MATERIALS_BY_NAME=/* @__PURE__ */createKeyIndex(ALL_MATERIALS,"name");var MATERIALS_BY_ELEMENT=/* @__PURE__ */createKeyIndex(ALL_MATERIALS,"elementSymbol");function getMaterialBySymbol(symbol,materials=ALL_MATERIALS){return materials===ALL_MATERIALS?findInKeyIndex(MATERIALS_BY_SYMBOL,symbol,"getMaterialBySymbol: symbol"):findByKey(materials,"symbol",symbol,"getMaterialBySymbol: symbol")}function getMaterialByName(name,materials=ALL_MATERIALS){return materials===ALL_MATERIALS?findInKeyIndex(MATERIALS_BY_NAME,name,"getMaterialByName: name"):findByKey(materials,"name",name,"getMaterialByName: name")}function getMaterialByElementSymbol(elementSymbol,materials=ALL_MATERIALS){return materials===ALL_MATERIALS?findInKeyIndex(MATERIALS_BY_ELEMENT,elementSymbol,"getMaterialByElementSymbol: elementSymbol"):findByKey(materials,"elementSymbol",elementSymbol,"getMaterialByElementSymbol: elementSymbol")}function materialsByGrade(grade){if(grade==null)return[];if(typeof grade!=="number"){throw new TypeError(`materialsByGrade: grade must be a number, received ${describeValue(grade)}`)}return ALL_MATERIALS.filter(material=>material.grade===grade)}function materialsInLine(line){return filterByKey(ALL_MATERIALS,"line",line,"materialsInLine: line")}function materialsInCategory(category){return filterByKey(ALL_MATERIALS,"category",category,"materialsInCategory: category")}export{MaterialGrade,MaterialLine,getMaterialByElementSymbol,getMaterialByName,getMaterialBySymbol,materialsByGrade,materialsInCategory,materialsInLine};//# sourceMappingURL=chunk-IWFQ4ZKF.js.map
@@ -1 +1 @@
1
- import{ALL_COMMODITIES}from"./chunk-JQG4C67D.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";var COMMODITIES_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_COMMODITIES,"symbol");var COMMODITIES_BY_NAME=/* @__PURE__ */createKeyIndex(ALL_COMMODITIES,"name");function getCommodityBySymbol(symbol,commodities=ALL_COMMODITIES){return commodities===ALL_COMMODITIES?findInKeyIndex(COMMODITIES_BY_SYMBOL,symbol,"getCommodityBySymbol: symbol"):findByKey(commodities,"symbol",symbol,"getCommodityBySymbol: symbol")}function getCommodityByName(name,commodities=ALL_COMMODITIES){return commodities===ALL_COMMODITIES?findInKeyIndex(COMMODITIES_BY_NAME,name,"getCommodityByName: name"):findByKey(commodities,"name",name,"getCommodityByName: name")}function commoditiesInCategory(category){return filterByKey(ALL_COMMODITIES,"category",category,"commoditiesInCategory: category")}export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol};//# sourceMappingURL=chunk-ZCEAPJDH.js.map
1
+ import{ALL_COMMODITIES}from"./chunk-77TT4K53.js";import{findInKeyIndex,findByKey,filterByKey,createKeyIndex}from"./chunk-BKWLI44T.js";var COMMODITIES_BY_SYMBOL=/* @__PURE__ */createKeyIndex(ALL_COMMODITIES,"symbol");var COMMODITIES_BY_NAME=/* @__PURE__ */createKeyIndex(ALL_COMMODITIES,"name");function getCommodityBySymbol(symbol,commodities=ALL_COMMODITIES){return commodities===ALL_COMMODITIES?findInKeyIndex(COMMODITIES_BY_SYMBOL,symbol,"getCommodityBySymbol: symbol"):findByKey(commodities,"symbol",symbol,"getCommodityBySymbol: symbol")}function getCommodityByName(name,commodities=ALL_COMMODITIES){return commodities===ALL_COMMODITIES?findInKeyIndex(COMMODITIES_BY_NAME,name,"getCommodityByName: name"):findByKey(commodities,"name",name,"getCommodityByName: name")}function commoditiesInCategory(category){return filterByKey(ALL_COMMODITIES,"category",category,"commoditiesInCategory: category")}export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol};//# sourceMappingURL=chunk-J7BM5NGK.js.map
@@ -0,0 +1 @@
1
+ import{combinedRateOfFire}from"./chunk-37JIMWLK.js";import{getPreEngineeredVariants}from"./chunk-PL75RTA2.js";import{builtInModuleBySymbol,getModuleBySymbol}from"./chunk-HUYYGTRM.js";import{ALL_MODULES}from"./chunk-APEG4ZER.js";import{EXPERIMENTAL_EFFECTS,getExperimentalEffect}from"./chunk-77I24V6B.js";import{fieldForLabel,baseStats,computeModifiers,labelsForDamageType,scaleForLabel,preciseModifierValue,capabilityValueForLabel}from"./chunk-CJQ37JII.js";import{resolveBlueprintForModule}from"./chunk-OLKNYGGT.js";import{getBlueprintsForModule,getExperimentalsForModule,getEngineeringGroup}from"./chunk-GLWPSVFV.js";import{getBlueprintGrade,getBlueprint,BLUEPRINTS}from"./chunk-AYAKU4YA.js";import{normalizeKey}from"./chunk-BKWLI44T.js";import{requireStringIfPresent}from"./chunk-PKWVG2JY.js";import{deepFreeze}from"./chunk-DURKO7JU.js";function scaleDamageComponents(components,baseDamage,effectiveDamage){const scale=baseDamage!==void 0&&baseDamage!==0&&effectiveDamage!==void 0?effectiveDamage/baseDamage:1;return{...components.kinetic===void 0?{}:{kinetic:components.kinetic*scale},...components.thermal===void 0?{}:{thermal:components.thermal*scale},...components.explosive===void 0?{}:{explosive:components.explosive*scale},...components.absolute===void 0?{}:{absolute:components.absolute*scale},...components.antiXeno===void 0?{}:{antiXeno:components.antiXeno*scale},...components.unclassified===void 0?{}:{unclassified:components.unclassified.map(value=>value*scale)}}}function fixedModifierFeatures(modifiers){return modifiers.map(modifier=>({label:modifier.label,method:modifier.method,min:modifier.value,max:modifier.value}))}var FITTED_ITEM="ShipLoadout: fitted module Item";function isNonOutfittingSlot(slotKey){return/^(paintjob|shipname\d+|shipid\d+|bobble\d+|decal\d+|shipkit.+|weaponcolour|enginecolour|vesselvoice|shipcockpit|stringlights)$/i.test(slotKey)}function isCargoHatchSlot(slotKey){return slotKey.toLowerCase()==="cargohatch"}function isBuiltInHullModule(module){return isCargoHatchSlot(module.Slot)&&module.Item.toLowerCase().startsWith("modularcargobaydoor")}function cloneLoadoutModule(module){return{Slot:module.Slot,Item:module.Item,...module.On===void 0?{}:{On:module.On},...module.Priority===void 0?{}:{Priority:module.Priority},...module.Health===void 0?{}:{Health:module.Health},...module.Value===void 0?{}:{Value:module.Value},...module.Engineering===void 0?{}:{Engineering:{BlueprintName:module.Engineering.BlueprintName,Level:module.Engineering.Level,Quality:module.Engineering.Quality,...module.Engineering.ExperimentalEffect===void 0?{}:{ExperimentalEffect:module.Engineering.ExperimentalEffect},...module.Engineering.ExperimentalEffect_Localised===void 0?{}:{ExperimentalEffect_Localised:module.Engineering.ExperimentalEffect_Localised},...module.Engineering.Modifiers===void 0?{}:{Modifiers:module.Engineering.Modifiers.map(modifier=>({...modifier}))}}}}}function matchingKeyIn(keyed,slotKey){if(keyed.has(slotKey))return slotKey;const wanted=slotKey.toLowerCase();for(const key of keyed.keys()){if(key.toLowerCase()===wanted)return key}return null}function ownKeyIn(keyed,canonicalKey){return matchingKeyIn(keyed,canonicalKey)??(keyed.size>0&&[...keyed.keys()].every(key=>key===key.toLowerCase())?canonicalKey.toLowerCase():canonicalKey)}function orderBySlotLayout(values,layout,slotOf){const order=new Map(layout.map((slot,index)=>[slot.key.toLowerCase(),index]));return[...values].sort((left,right)=>(order.get(slotOf(left).toLowerCase())??Number.MAX_SAFE_INTEGER)-(order.get(slotOf(right).toLowerCase())??Number.MAX_SAFE_INTEGER))}function cloneModuleStats(module){try{return deepFreeze(structuredClone(module))}catch(error){if(!(error instanceof Error&&error.name==="DataCloneError"))throw error;return deepFreeze({...module,...module.restrictedToShips===void 0?{}:{restrictedToShips:[...module.restrictedToShips]},...module.limitIncrease===void 0?{}:{limitIncrease:{...module.limitIncrease}},...module.damageDistribution===void 0?{}:{damageDistribution:{...module.damageDistribution}},...module.damageComponents===void 0?{}:{damageComponents:{...module.damageComponents,...module.damageComponents.unclassified===void 0?{}:{unclassified:[...module.damageComponents.unclassified]}}},...module.projectileRange===void 0?{}:{projectileRange:{...module.projectileRange}}})}}var GUARDIAN_WEAPON_GROUPS=/* @__PURE__ */new Set(["guardianGauss","guardianPlasma","guardianShard"]);function missingBaseLabels(stats,base,features,experimental){const contributions=[...features,...experimental??[]];return[...new Set(contributions.map(contribution=>contribution.label).filter(label=>{if(base[label]!==void 0)return false;return fieldForLabel(label,stats)===null}))]}function recipeSignature(blueprintSymbol){const blueprint=getBlueprint(blueprintSymbol);if(!blueprint)return null;const grades=Object.entries(blueprint.grades).map(([grade,{features:features}])=>`${grade}:${features.map(feature=>`${feature.label}/${feature.method??""}`).sort().join(",")}`).sort().join(";");return`${blueprint.name.toLowerCase()}|${grades}`}var isGenericSpelling=blueprintSymbol=>blueprintSymbol.toLowerCase().startsWith("misc_");function isSoldWithBlueprint(item,wanted){return getPreEngineeredVariants(item).some(variant=>variant.acquisition==="mercenary"&&variant.blueprintSymbol.toLowerCase()===wanted)}function blueprintRoutesFor(item){const routes=/* @__PURE__ */new Map;for(const blueprintSymbol of getBlueprintsForModule(item))routes.set(blueprintSymbol,"ordinary");for(const variant of getPreEngineeredVariants(item)){if(variant.acquisition==="mercenary"&&!routes.has(variant.blueprintSymbol)){routes.set(variant.blueprintSymbol,"mercenary")}}return routes}function blueprintAvailableFor(item,blueprintSymbol){const offered=getBlueprintsForModule(item);const asWritten=normalizeKey(blueprintSymbol,"ShipLoadout.applyBlueprint: blueprintSymbol");const resolved=resolveBlueprintForModule(item,blueprintSymbol).trim();const wanted=resolved.toLowerCase();if(offered.some(id=>id.toLowerCase()===wanted))return true;if(isSoldWithBlueprint(item,wanted)||isSoldWithBlueprint(item,asWritten))return true;if(!isGenericSpelling(wanted))return false;const signature=recipeSignature(resolved);if(signature===null)return false;return offered.some(id=>recipeSignature(id)===signature&&!isGenericSpelling(id))}function experimentalAvailableFor(item,experimentalEffectSymbol){const wanted=normalizeKey(experimentalEffectSymbol,"ShipLoadout.applyBlueprint: options.experimentalEffectSymbol");return getExperimentalsForModule(item).some(id=>id.toLowerCase()===wanted)}function primitiveLabelFor(stats,label){if(label==="MaximumRange"&&stats.maximumRange!==void 0)return"Range";if(label==="DamageFalloffRange"&&stats.falloffRange!==void 0){return"FalloffRange"}if(label==="Range"&&stats.scannerRange!==void 0)return"ScannerRange";if(label==="DSS_PatchRadius")return"ProbeRadius";if(label==="FuelScoopRate")return"RefuelRate";if(label==="EnergyPerRegen"&&stats.shieldRegenRate!==void 0){return"DistributorDraw"}return label}function primitiveEngineeringInputsFor(stats,grade,experimental){const canonicalGrade={...grade,features:grade.features.map(feature=>{const label=primitiveLabelFor(stats,feature.label);return label===feature.label?feature:{...feature,label:label}})};if(!experimental)return{grade:canonicalGrade};return{grade:canonicalGrade,experimental:{...experimental,modifiers:experimental.modifiers.map(modifier=>{const label=primitiveLabelFor(stats,modifier.label);return label===modifier.label?modifier:{...modifier,label:label}})}}}function matchesCalculatedModifiers(captured,calculated){if(!captured||captured.length!==calculated.length)return false;const byLabel=new Map(captured.map(modifier=>[modifier.Label.trim().toLowerCase(),modifier]));if(byLabel.size!==captured.length)return false;return calculated.every(expected=>{const actual=byLabel.get(expected.Label.trim().toLowerCase());if(!actual)return false;if(expected.Value!==void 0){return actual.Value!==void 0&&Math.abs(actual.Value-expected.Value)<=1e-5*Math.max(1,Math.abs(expected.Value))}return actual.ValueStr===expected.ValueStr})}function unrollableFixedArticle(item,engineering){if(engineering.Modifiers!==void 0||typeof engineering.BlueprintName!=="string"){return null}const wanted=engineering.BlueprintName.trim().toLowerCase();const experimental=engineering.ExperimentalEffect?.trim().toLowerCase();const matches=getPreEngineeredVariants(item).filter(candidate=>candidate.blueprintSymbol.trim().toLowerCase()===wanted&&candidate.grade===engineering.Level&&(candidate.experimentalEffectSymbol===void 0?experimental===void 0&&engineering.ExperimentalEffect_Localised===void 0:candidate.experimentalEffectSymbol.trim().toLowerCase()===experimental)&&!blueprintAvailableFor(item,candidate.blueprintSymbol));return matches.length===1?matches[0]:null}function ordinaryEngineeringProof(item,engineering,experimental){const recipe=resolveBlueprintForModule(item,engineering.BlueprintName);const fixedCandidate=getPreEngineeredVariants(item).some(candidate=>candidate.acquisition!=="mercenary"&&candidate.blueprintSymbol.trim().toLowerCase()===recipe.trim().toLowerCase());if(!fixedCandidate)return"notFixedCandidate";const grade=getBlueprintGrade(recipe,engineering.Level);const quality=engineering.Quality;const stock=builtInModuleBySymbol(item,FITTED_ITEM);if(!stock||!grade||experimental===null||!Number.isFinite(quality)||quality<0||quality>1){return"unproven"}const current=primitiveEngineeringInputsFor(stock,grade,experimental);if(missingBaseLabels(stock,baseStats(stock),current.grade.features,current.experimental?.modifiers).length>0){return"unproven"}const calculated=journalModifiersFor(stock,computeModifiers(baseStats(stock),current.grade,quality,current.experimental));const damageDistribution=current.experimental?.damageDistribution??current.grade.damageDistribution;if(damageDistribution){for(const type of["kinetic","thermal","explosive","absolute"]){const value=damageDistribution[type];if(value===void 0)continue;const label=labelsForDamageType(type)[0];if(label===void 0)continue;calculated.push({Label:label,Value:value*scaleForLabel(label),OriginalValue:(stock.damageDistribution?.[type]??0)*scaleForLabel(label)})}}return matchesCalculatedModifiers(engineering.Modifiers,calculated)?"proven":"unproven"}var round6=value=>{const rounded=Math.round(value*1e6)/1e6;return Object.is(rounded,-0)?0:rounded};function float32FiringCycle(interval,burstRounds,burstRateOfFire){if(interval<=0)return void 0;const withinBurst=burstRounds>1?Math.fround(Math.fround(burstRounds-1)/Math.fround(burstRateOfFire)):0;const cycle=Math.fround(withinBurst+Math.fround(interval));return cycle>0?cycle:void 0}function float32RateOfFire(interval,burstRounds,burstRateOfFire){const cycle=float32FiringCycle(interval,burstRounds,burstRateOfFire);return cycle===void 0?void 0:Math.fround(Math.fround(burstRounds)/cycle)}function float32DamagePerSecond(damage,rounds,rate,burstRounds,cycle){if(cycle!==void 0&&(rounds!==1||burstRounds!==1)){const damagePerCycle=Math.fround(Math.fround(Math.fround(damage)*Math.fround(rounds))*Math.fround(burstRounds));return Math.fround(damagePerCycle/cycle)}return Math.fround(Math.fround(Math.fround(damage)*Math.fround(rounds))*Math.fround(rate))}var JOURNAL_MODIFIER_ORDER=["CargoCapacity","GuardianModuleResistance","Mass","Integrity","PowerDraw","BootTime","PowerCapacity","HeatEfficiency","FSDOptimalMass","MaxFuelPerJump","FSDHeatRate","EngineOptimalMass","EngineOptPerformance","EngineHeatRate","ShieldGenOptimalMass","ShieldGenStrength","DamagePerSecond","Damage","DistributorDraw","ThermalLoad","ArmourPenetration","MaximumRange","ShotSpeed","RateOfFire","DamageType","$Kinetic;","$Thermal;","$Explosive;","$Absolute;","AmmoClipSize","AmmoMaximum","ReloadTime","Jitter","DamageFalloffRange","DefenceModifierShieldMultiplier","DefenceModifierHealthMultiplier","DefenceModifierHealthAddition","DefenceModifierShieldAddition","RegenRate","BrokenRegenRate","EnergyPerRegen","KineticResistance","ThermicResistance","ExplosiveResistance","CausticResistance","DamageProtection","ModuleDefenceAbsorption","WeaponsCapacity","WeaponsRecharge","EnginesCapacity","EnginesRecharge","SystemsCapacity","SystemsRecharge","ShieldBankSpinUp","ShieldBankDuration","ShieldBankReinforcement","ShieldBankHeat","FSDInterdictorRange","FSDInterdictorFacingLimit","SensorTargetScanAngle","MaxAngle","ScannerTimeToScan","Range","DSS_PatchRadius","FuelScoopRate","FuelCapacity"];var JOURNAL_MODIFIER_RANK=new Map(JOURNAL_MODIFIER_ORDER.map((label,index)=>[label,index]));function sortJournalModifiers(modifiers){return modifiers.map((modifier,index)=>({modifier:modifier,index:index})).sort((a,b)=>(JOURNAL_MODIFIER_RANK.get(a.modifier.Label)??JOURNAL_MODIFIER_ORDER.length)-(JOURNAL_MODIFIER_RANK.get(b.modifier.Label)??JOURNAL_MODIFIER_ORDER.length)||a.index-b.index).map(({modifier:modifier})=>modifier)}function journalModifiersFor(stats,modifiers){const weapon=stats.damage!==void 0;const valueFor=(label,fallback)=>{const modifier=modifiers.find(candidate=>candidate.Label===label);return(modifier&&preciseModifierValue(modifier))??Math.fround(fallback)};const burstTouched=["BurstInterval","BurstSize","BurstRateOfFire"].some(label=>modifiers.some(modifier=>modifier.Label===label));const damageTouched=modifiers.some(modifier=>modifier.Label==="Damage");const rateTouched=burstTouched||modifiers.some(modifier=>modifier.Label==="RateOfFire");let damagePerSecond;let derivedRate;if(weapon&&(damageTouched||rateTouched)){const continuous=stats.burstInterval===void 0&&stats.rateOfFire===void 0;const baseDamage=Math.fround(stats.damage);const effectiveDamage=valueFor("Damage",stats.damage);if(continuous){damagePerSecond={Label:"DamagePerSecond",Value:round6(effectiveDamage),OriginalValue:round6(baseDamage)}}else{const burstRounds=valueFor("BurstSize",stats.burstRounds??1);const burstRate=valueFor("BurstRateOfFire",stats.burstRateOfFire??1);const baseBurstRounds=Math.fround(stats.burstRounds??1);const baseBurstRate=Math.fround(stats.burstRateOfFire??1);const baseInterval=stats.burstInterval===void 0?void 0:Math.fround(stats.burstInterval);const baseCycle=baseInterval===void 0?void 0:float32FiringCycle(baseInterval,baseBurstRounds,baseBurstRate);const baseRate=baseInterval!==void 0?float32RateOfFire(baseInterval,baseBurstRounds,baseBurstRate):stats.rateOfFire===void 0?void 0:Math.fround(stats.rateOfFire);const rateModifier=modifiers.find(modifier=>modifier.Label==="RateOfFire");const effectiveRate=rateModifier&&preciseModifierValue(rateModifier);const effectiveInterval=valueFor("BurstInterval",stats.burstInterval??0);const effectiveCycle=effectiveRate===void 0?float32FiringCycle(effectiveInterval,burstRounds,burstRate):void 0;const rate=effectiveRate??(effectiveCycle===void 0?void 0:Math.fround(Math.fround(burstRounds)/effectiveCycle));if(baseRate!==void 0&&rate!==void 0){const stockRounds=Math.fround(stats.roundsPerShot??1);const effectiveRounds=Math.fround(modifiers.find(modifier=>modifier.Label==="Rounds"||modifier.Label==="RoundsPerShot")?.Value??stockRounds);damagePerSecond={Label:"DamagePerSecond",Value:round6(float32DamagePerSecond(effectiveDamage,effectiveRounds,rate,burstRounds,effectiveCycle)),OriginalValue:round6(float32DamagePerSecond(baseDamage,stockRounds,baseRate,baseBurstRounds,baseCycle))};if(burstTouched){derivedRate={Label:"RateOfFire",Value:round6(rate),OriginalValue:round6(baseRate)}}}}}const result=[];for(const modifier of modifiers){const label=modifier.Label;if(weapon&&["BurstInterval","BurstSize","BurstRateOfFire"].includes(label))continue;if(weapon&&label==="Damage"&&stats.rateOfFire===void 0)continue;let journalLabel=label;if(label==="Range"&&stats.maximumRange!==void 0)journalLabel="MaximumRange";else if(label==="FalloffRange"&&stats.falloffRange!==void 0){journalLabel="DamageFalloffRange"}else if(label==="ScannerRange"&&stats.scannerRange!==void 0){journalLabel="Range"}else if(label==="ProbeRadius")journalLabel="DSS_PatchRadius";else if(label==="RefuelRate")journalLabel="FuelScoopRate";else if(label==="DistributorDraw"&&stats.shieldRegenRate!==void 0){journalLabel="EnergyPerRegen"}result.push(journalLabel===label?modifier:{...modifier,Label:journalLabel})}if(damagePerSecond)result.push(damagePerSecond);if(derivedRate){const direct=result.findIndex(modifier=>modifier.Label==="RateOfFire");if(direct>=0)result[direct]=derivedRate;else result.push(derivedRate)}return sortJournalModifiers(result)}function isFinalGuardianWeaponEngineering(item,blueprint){const group=getEngineeringGroup(item);if(group===null||!GUARDIAN_WEAPON_GROUPS.has(group))return false;const resolved=resolveBlueprintForModule(item,blueprint);return getBlueprint(resolved)!==null&&!blueprintAvailableFor(item,blueprint)}function engineerableBase(item,statsOverride){const stats=statsOverride??builtInModuleBySymbol(item,FITTED_ITEM);if(!stats||stats.engineeringLocked)return null;return{stats:stats,base:baseStats(stats)}}function availableBlueprintsFor(item,statsOverride){const engineerable=engineerableBase(item,statsOverride);if(!engineerable)return[];const{stats:stats,base:base}=engineerable;const available=[];for(const[blueprintSymbol,route]of blueprintRoutesFor(item)){const blueprint=BLUEPRINTS[blueprintSymbol];if(!blueprint)continue;const grades=Object.entries(blueprint.grades).filter(([,grade])=>missingBaseLabels(stats,base,grade.features).length===0).map(([grade])=>Number(grade)).filter(Number.isFinite).sort((a,b)=>a-b);if(grades.length>0)available.push({blueprintSymbol:blueprintSymbol,grades:grades,route:route})}return available}function availableExperimentalsFor(item,statsOverride){const engineerable=engineerableBase(item,statsOverride);if(!engineerable)return[];const{stats:stats,base:base}=engineerable;return getExperimentalsForModule(item).filter(experimentalEffectSymbol=>{const effect=EXPERIMENTAL_EFFECTS[experimentalEffectSymbol];return effect!==void 0&&missingBaseLabels(stats,base,effect.modifiers).length===0})}var MAX_ENGINEERING_GRADE=5;function modifiersWithExperimental(variant,experimental){const module=getModuleBySymbol(variant.symbol,ALL_MODULES);const effectName=experimental===void 0?variant.experimentalEffectSymbol:experimental;if(!module||!variant.modifiers?.length&&effectName==null)return null;const effect=effectName==null?void 0:getExperimentalEffect(effectName);if(effectName!==null&&effectName!==void 0&&!effect)return null;return computeModifiers(baseStats(module),fixedModifierFeatures(variant.modifiers??[]),1,effect??void 0)}function getPreEngineeredModifiers(variant){return modifiersWithExperimental(variant)??[]}function journalModifiersWithExperimental(variant,experimental){const module=getModuleBySymbol(variant.symbol,ALL_MODULES);if(!module)return[];const modifiers=journalModifiersFor(module,modifiersWithExperimental(variant,experimental)??[]);const effectName=experimental===void 0?variant.experimentalEffectSymbol:experimental;const damageDistribution=effectName?getExperimentalEffect(effectName)?.damageDistribution:void 0;if(!damageDistribution)return modifiers;for(const type of["kinetic","thermal","explosive","absolute"]){const value=damageDistribution[type];const label=labelsForDamageType(type)[0];if(value===void 0||label===void 0)continue;modifiers.push({Label:label,Value:value*scaleForLabel(label),OriginalValue:(module.damageDistribution?.[type]??0)*scaleForLabel(label)})}return modifiers}function getPreEngineeredJournalModifiers(variant){return journalModifiersWithExperimental(variant)}function sameJournalNumber(actual,expected){return Math.abs(actual-expected)<=Math.max(1e-5,Math.abs(expected)*1e-6)}function modifierKey(modifier,module){return fieldForLabel(modifier.Label,module)??`label:${normalizeKey(modifier.Label,"identifyPreEngineeredVariant: module.Engineering.Modifiers[].Label")}`}function sameModifier(actual,expected){if(expected.Value!==void 0){return actual.Value!==void 0&&sameJournalNumber(actual.Value,expected.Value)}return expected.ValueStr!==void 0&&actual.ValueStr!==void 0}function matchesModifierSignature(actualByKey,expected,module){let matched=0;for(const predicted of expected){const actual=actualByKey.get(modifierKey(predicted,module));if(!actual)continue;if(!sameModifier(actual,predicted))return false;matched++}return matched>=Math.max(1,expected.length-1)}function identifyPreEngineeredVariant(module){const engineering=module.Engineering;if(!engineering)return null;requireStringIfPresent(module.Item,"identifyPreEngineeredVariant: module.Item");const stock=getModuleBySymbol(module.Item,ALL_MODULES);if(!stock)return null;const capturedBlueprint=normalizeKey(engineering.BlueprintName,"identifyPreEngineeredVariant: module.Engineering.BlueprintName");const variants=getPreEngineeredVariants(module.Item);const blueprintMatches=variants.filter(candidate=>candidate.blueprintSymbol.toLowerCase()===capturedBlueprint);const blueprintMatch=blueprintMatches.length===1?blueprintMatches[0]:null;const capturedGrade=engineering.Level;if(blueprintMatch?.acquisition==="mercenary"&&Number.isInteger(capturedGrade)&&capturedGrade>=blueprintMatch.grade&&capturedGrade<=MAX_ENGINEERING_GRADE){return blueprintMatch}if(engineering.Modifiers===void 0){const capturedExperimental=normalizeKey(engineering.ExperimentalEffect,"identifyPreEngineeredVariant: module.Engineering.ExperimentalEffect");const identityMatches=blueprintMatches.filter(candidate=>candidate.engineeringLocked===true&&candidate.grade===capturedGrade&&(candidate.experimentalEffectSymbol===void 0?capturedExperimental===void 0&&engineering.ExperimentalEffect_Localised===void 0:candidate.experimentalEffectSymbol.toLowerCase()===capturedExperimental));return identityMatches.length===1?identityMatches[0]:null}if(!engineering.Modifiers?.length)return null;const actualByKey=/* @__PURE__ */new Map;for(const modifier of engineering.Modifiers){actualByKey.set(modifierKey(modifier,stock),modifier)}requireStringIfPresent(engineering.ExperimentalEffect,"identifyPreEngineeredVariant: module.Engineering.ExperimentalEffect");const matches=[];for(const candidate of variants){if(!candidate.modifiers?.length)continue;if(candidate.grade!==engineering.Level)continue;if(candidate.acquisition==="eventReward"&&(engineering.ExperimentalEffect!==void 0||engineering.ExperimentalEffect_Localised!==void 0||capturedBlueprint!==candidate.blueprintSymbol.toLowerCase())){continue}const primitive=modifiersWithExperimental(candidate,engineering.ExperimentalEffect??null);if(!primitive?.length)continue;const matched=matchesModifierSignature(actualByKey,primitive,stock)||matchesModifierSignature(actualByKey,journalModifiersWithExperimental(candidate,engineering.ExperimentalEffect??null),stock);if(matched)matches.push(candidate)}return matches.length===1?matches[0]:null}function unresolvedModifiers(variant){const resolved=new Set(getPreEngineeredModifiers(variant).map(modifier=>modifier.Label));return(variant.modifiers??[]).map(modifier=>modifier.label).filter(label=>!resolved.has(label))}function getPreEngineeredStats(variant){const module=getModuleBySymbol(variant.symbol,ALL_MODULES);if(!module)return null;if(!variant.modifiers?.length&&!variant.engineeringLocked&&variant.experimentalEffectSymbol===void 0)return{...module};const modifiers=variant.modifiers??[];const resolved={...module,...variant.engineeringLocked?{engineeringLocked:true}:{}};for(const{Label:Label,Value:Value,ValueStr:ValueStr}of getPreEngineeredModifiers(variant)){const field=fieldForLabel(Label,module);if(field&&field!=="damageDistribution"&&Value!==void 0){Object.assign(resolved,{[field]:Value/scaleForLabel(Label)})}else if(field&&ValueStr!==void 0&&capabilityValueForLabel(Label)!==null){Object.assign(resolved,{[field]:true})}}const experimentalDamageDistribution=variant.experimentalEffectSymbol?getExperimentalEffect(variant.experimentalEffectSymbol)?.damageDistribution:void 0;if(experimentalDamageDistribution){resolved.damageDistribution={...experimentalDamageDistribution};delete resolved.damageComponents}if(resolved.rateOfFire!==void 0&&!modifiers.some(m=>m.label==="RateOfFire")&&modifiers.some(m=>m.label==="BurstSize"||m.label==="BurstRateOfFire"||m.label==="BurstInterval")){const rate=combinedRateOfFire(resolved);if(rate!==void 0)resolved.rateOfFire=rate}if(module.damageComponents&&!experimentalDamageDistribution){resolved.damageComponents=scaleDamageComponents(module.damageComponents,module.damage,resolved.damage)}return resolved}export{FITTED_ITEM,availableBlueprintsFor,availableExperimentalsFor,blueprintAvailableFor,blueprintRoutesFor,cloneLoadoutModule,cloneModuleStats,experimentalAvailableFor,getPreEngineeredJournalModifiers,getPreEngineeredModifiers,getPreEngineeredStats,identifyPreEngineeredVariant,isBuiltInHullModule,isCargoHatchSlot,isFinalGuardianWeaponEngineering,isNonOutfittingSlot,journalModifiersFor,matchingKeyIn,missingBaseLabels,orderBySlotLayout,ordinaryEngineeringProof,ownKeyIn,primitiveEngineeringInputsFor,scaleDamageComponents,unresolvedModifiers,unrollableFixedArticle};//# sourceMappingURL=chunk-JET673E5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/internal/damage-components.ts","../src/ships/internal/fixed-modifier-features.ts","../src/ships/internal/loadout-state.ts","../src/ships/internal/loadout-engineering.ts","../src/ships/pre-engineered-stats.ts"],"names":["combinedRateOfFire","getPreEngineeredVariants","builtInModuleBySymbol","getModuleBySymbol","ALL_MODULES","EXPERIMENTAL_EFFECTS","getExperimentalEffect","fieldForLabel","baseStats","computeModifiers","labelsForDamageType","scaleForLabel","preciseModifierValue","capabilityValueForLabel","resolveBlueprintForModule","getBlueprintsForModule","getExperimentalsForModule","getEngineeringGroup","getBlueprintGrade","getBlueprint","BLUEPRINTS","normalizeKey","requireStringIfPresent","deepFreeze","scaleDamageComponents","components","baseDamage","effectiveDamage","scale","kinetic","thermal","explosive","absolute","antiXeno","unclassified","map","value","fixedModifierFeatures","modifiers","modifier","label","method","min","max","FITTED_ITEM","isNonOutfittingSlot","slotKey","test","isCargoHatchSlot","toLowerCase","isBuiltInHullModule","module","Slot","Item","startsWith","cloneLoadoutModule","On","Priority","Health","Value","Engineering","BlueprintName","Level","Quality","ExperimentalEffect","ExperimentalEffect_Localised","Modifiers","matchingKeyIn","keyed","has","wanted","key","keys","ownKeyIn","canonicalKey","size","every","orderBySlotLayout","values","layout","slotOf","order","Map","slot","index","sort","left","right","get","Number","MAX_SAFE_INTEGER","cloneModuleStats","structuredClone","error","Error","name","restrictedToShips","limitIncrease","damageDistribution","damageComponents","projectileRange","GUARDIAN_WEAPON_GROUPS","Set","missingBaseLabels","stats","base","features","experimental","contributions","contribution","filter","recipeSignature","blueprintSymbol","blueprint","grades","Object","entries","grade","feature","join","isGenericSpelling","isSoldWithBlueprint","item","some","variant","acquisition","blueprintRoutesFor","routes","set","blueprintAvailableFor","offered","asWritten","resolved","trim","id","signature","experimentalAvailableFor","experimentalEffectSymbol","primitiveLabelFor","maximumRange","falloffRange","scannerRange","shieldRegenRate","primitiveEngineeringInputsFor","canonicalGrade","matchesCalculatedModifiers","captured","calculated","length","byLabel","Label","expected","actual","Math","abs","ValueStr","unrollableFixedArticle","engineering","matches","candidate","ordinaryEngineeringProof","recipe","fixedCandidate","quality","stock","isFinite","current","journalModifiersFor","type","push","OriginalValue","round6","rounded","round","is","float32FiringCycle","interval","burstRounds","burstRateOfFire","withinBurst","fround","cycle","float32RateOfFire","float32DamagePerSecond","damage","rounds","rate","damagePerCycle","JOURNAL_MODIFIER_ORDER","JOURNAL_MODIFIER_RANK","sortJournalModifiers","a","b","weapon","valueFor","fallback","find","burstTouched","damageTouched","rateTouched","damagePerSecond","derivedRate","continuous","burstInterval","rateOfFire","burstRate","baseBurstRounds","baseBurstRate","baseInterval","baseCycle","baseRate","rateModifier","effectiveRate","effectiveInterval","effectiveCycle","stockRounds","roundsPerShot","effectiveRounds","result","includes","journalLabel","direct","findIndex","isFinalGuardianWeaponEngineering","group","engineerableBase","statsOverride","engineeringLocked","availableBlueprintsFor","engineerable","available","route","availableExperimentalsFor","effect","MAX_ENGINEERING_GRADE","modifiersWithExperimental","symbol","effectName","getPreEngineeredModifiers","journalModifiersWithExperimental","getPreEngineeredJournalModifiers","sameJournalNumber","modifierKey","sameModifier","matchesModifierSignature","actualByKey","matched","predicted","identifyPreEngineeredVariant","capturedBlueprint","variants","blueprintMatches","blueprintMatch","capturedGrade","isInteger","capturedExperimental","identityMatches","primitive","unresolvedModifiers","getPreEngineeredStats","field","assign","experimentalDamageDistribution","m"],"mappings":"O,g0BAWO,SAASwB,sBACZC,WACAC,WACAC,iBAEA,MAAMC,MACFF,kBAAe,GAAaA,aAAe,GAAKC,uBAAoB,EAC9DA,gBAAkBD,WAClB,EACV,MAAO,IACCD,WAAWI,eAAY,EAAY,CAAA,EAAK,CAAEA,QAASJ,WAAWI,QAAUD,UACxEH,WAAWK,eAAY,EAAY,CAAA,EAAK,CAAEA,QAASL,WAAWK,QAAUF,UACxEH,WAAWM,iBAAc,EAAY,CAAA,EAAK,CAAEA,UAAWN,WAAWM,UAAYH,UA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QAAU,iBAEtB,CACE,MAAMkJ,KAAO1L,mBAAmBoI,UAChC,GAAIsD,YAAS,EAAWtD,SAASwE,WAAalB,IAClD,CACA,GAAIvI,OAAOgD,mBAAqBmK,+BAAgC,CAC5DlI,SAASjC,iBAAmB3E,sBACxB2B,OAAOgD,iBACPhD,OAAOqI,OACPpD,SAASoD,OAEjB,CACA,OAAOpD,QACX,QAAAxF,YAAAwL,uBAAAI,0BAAAvG,sBAAAH,mBAAAvE,mBAAAoC,iBAAA6C,yBAAAwG,iCAAAF,0BAAAqB,sBAAAX,6BAAAtM,oBAAAF,iBAAA+K,iCAAAlL,oBAAA0H,oBAAApG,cAAAoC,kBAAA1B,kBAAAmF,yBAAAvF,SAAAsE,8BAAAvH,sBAAA0O,oBAAAtG"}
@@ -0,0 +1 @@
1
+ import{capacitorRechargeAtPips}from"./chunk-JOTAOI5T.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";var phaseTime=(megajoules,rate,draw,capacity,recharge)=>{if(megajoules<=0)return 0;if(rate<=0)return Infinity;if(draw<=0)return megajoules/rate;const drain=rate*draw-recharge;if(drain<=0)return megajoules/rate;const capacitorLifetime=capacity/drain;const beforeEmpty=capacitorLifetime*rate;if(megajoules<=beforeEmpty)return megajoules/rate;if(recharge<=0)return Infinity;return capacitorLifetime+(megajoules-beforeEmpty)/(recharge/draw)};function shieldRecovery(input){const pips=requirePips("shieldRecovery","systemsPips",input.systemsPips??4);for(const field of["strength","regenRate","brokenRegenRate","distributorDraw","systemsCapacity","systemsRecharge"]){requireFiniteNonNegative("shieldRecovery",field,input[field])}const recharge=capacitorRechargeAtPips(input.systemsRecharge,pips);const half=input.strength/2;return Object.freeze({regenRate:input.regenRate,brokenRegenRate:input.brokenRegenRate,recoveryTime:16+phaseTime(half,input.brokenRegenRate,input.distributorDraw,input.systemsCapacity,recharge),regenTime:phaseTime(half,input.regenRate,input.distributorDraw,input.systemsCapacity,recharge)})}function cellBankSummary(banks){for(const[index,bank]of banks.entries()){if(typeof bank.powered!=="boolean"){throw new TypeError(`cellBankSummary: banks[${index}].powered must be a boolean`)}}const metrics=banks.map(bank=>Object.freeze({slot:bank.slot,symbol:bank.symbol,reinforcement:bank.reinforcementRate*bank.duration,cells:bank.cells,spinUp:bank.spinUp,duration:bank.duration,heat:bank.heat,powered:bank.powered}));return Object.freeze({banks:Object.freeze(metrics),totalRestorable:metrics.reduce((sum,bank)=>sum+(bank.powered?bank.reinforcement*bank.cells:0),0),totalCells:metrics.reduce((sum,bank)=>sum+(bank.powered?bank.cells:0),0)})}export{cellBankSummary,shieldRecovery};//# sourceMappingURL=chunk-JMAXSXXQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/shield-recovery.ts"],"names":["capacitorRechargeAtPips","requirePips","requireFiniteNonNegative","phaseTime","megajoules","rate","draw","capacity","recharge","Infinity","drain","capacitorLifetime","beforeEmpty","shieldRecovery","input","pips","systemsPips","field","systemsRecharge","half","strength","Object","freeze","regenRate","brokenRegenRate","recoveryTime","distributorDraw","systemsCapacity","regenTime","cellBankSummary","banks","index","bank","entries","powered","TypeError","metrics","map","slot","symbol","reinforcement","reinforcementRate","duration","cells","spinUp","heat","totalRestorable","reduce","sum","totalCells"],"mappings":"O,wHA2GA,IAAMG,UAAY,CACdC,WACAC,KACAC,KACAC,SACAC,YAEA,GAAIJ,YAAc,EAAG,OAAO,EAC5B,GAAIC,MAAQ,EAAG,OAAOI,SACtB,GAAIH,MAAQ,EAAG,OAAOF,WAAaC,KACnC,MAAMK,MAAQL,KAAOC,KAAOE,SAC5B,GAAIE,OAAS,EAAG,OAAON,WAAaC,KACpC,MAAMM,kBAAoBJ,SAAWG,MACrC,MAAME,YAAcD,kBAAoBN,KACxC,GAAID,YAAcQ,YAAa,OAAOR,WAAaC,KACnD,GAAIG,UAAY,EAAG,OAAOC,SAC1B,OAAOE,mBAAqBP,WAAaQ,cAAgBJ,SAAWF,OAoBjE,SAASO,eAAeC,OAC3B,MAAMC,KA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k-ITKZKREP.js";import{RAW_MATERIALS}from"./chunk-Q6YDPREF.js";var ALL_MATERIALS=Object.freeze([...RAW_MATERIALS,...MANUFACTURED_MATERIALS,...ENCODED_MATERIALS]);export{ALL_MATERIALS};//# sourceMappingURL=chunk-JO52LYO3.js.map
@@ -0,0 +1 @@
1
+ import{capacitorRechargeAtPips}from"./chunk-JOTAOI5T.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";var capacitorMetrics=(capacity,ratedRecharge,pips)=>Object.freeze({capacity:capacity,ratedRecharge:ratedRecharge,rechargeRate:capacitorRechargeAtPips(ratedRecharge,pips)});function distributorMetrics(input){const pips=Object.freeze({systems:input.systemsPips??4,engines:input.enginesPips??4,weapons:input.weaponsPips??4});requirePips("distributorMetrics","systemsPips",pips.systems);requirePips("distributorMetrics","enginesPips",pips.engines);requirePips("distributorMetrics","weaponsPips",pips.weapons);for(const field of["systemsCapacity","systemsRecharge","enginesCapacity","enginesRecharge","weaponsCapacity","weaponsRecharge"]){requireFiniteNonNegative("distributorMetrics",field,input[field])}return Object.freeze({systems:capacitorMetrics(input.systemsCapacity,input.systemsRecharge,pips.systems),engines:capacitorMetrics(input.enginesCapacity,input.enginesRecharge,pips.engines),weapons:capacitorMetrics(input.weaponsCapacity,input.weaponsRecharge,pips.weapons),pips:pips})}export{distributorMetrics};//# sourceMappingURL=chunk-M2TCZKRT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/distributor.ts"],"names":["capacitorRechargeAtPips","requirePips","requireFiniteNonNegative","capacitorMetrics","capacity","ratedRecharge","pips","Object","freeze","rechargeRate","distributorMetrics","input","systems","systemsPips","engines","enginesPips","weapons","weaponsPips","field","systemsCapacity","systemsRecharge","enginesCapacity","enginesRecharge","weaponsCapacity","weaponsRecharge"],"mappings":"O,wHAkFA,IAAMG,iBAAmB,CACrBC,SACAC,cACAC,OAEAC,OAAOC,OAAO,CACVJ,kBACAC,4BACAI,aAAcT,wBAAwBK,cAAeC,QA+BtD,SAASI,mBAAmBC,OAC/B,MAAML,KAAOC,OAAOC,OAAO,CACvBI,QAASD,MAAME,aAAe,EAC9BC,QAASH,MAAMI,aAAe,EAC9BC,QAASL,MAAMM,aAAe,IAElChB,YAAY,qBAAsB,cAAeK,KAAKM,SACtDX,YAAY,qBAAsB,cAAeK,KAAKQ,SACtDb,YAAY,qBAAsB,cAAeK,KAAKU,SACtD,IAAA,MAAWE,QAAS,CAChB,kBACA,kBACA,kBACA,kBACA,kBACA,mBACQ,CACRhB,yBAAyB,qBAAsBgB,MAAOP,MAAMO,OAChE,CAEA,OAAOX,OAAOC,OAAO,CACjBI,QAAST,iBAAiBQ,MAAMQ,gBAAiBR,MAAMS,gBAAiBd,KAAKM,SAC7EE,QAASX,iBAAiBQ,MAAMU,gBAAiBV,MAAMW,gBAAiBhB,KAAKQ,SAC7EE,QAASb,iBAAiBQ,MAAMY,gBAAiBZ,MAAMa,gBAAiBlB,KAAKU,SAC7EV,WAER,QAAAI"}
@@ -0,0 +1 @@
1
+ import{capacitorRechargeAtPips}from"./chunk-JOTAOI5T.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";function weaponsCapacitorMetrics(input){const scope="weaponsCapacitorMetrics";const weaponsPips=requirePips(scope,"weaponsPips",input.weaponsPips??4);for(const field of["weaponsCapacity","weaponsRecharge","sustainedEnergyPerSecond"]){requireFiniteNonNegative(scope,field,input[field])}const rechargeRate=capacitorRechargeAtPips(input.weaponsRecharge,weaponsPips);const netDrainRate=Math.max(0,input.sustainedEnergyPerSecond-rechargeRate);return Object.freeze({weaponsPips:weaponsPips,capacity:input.weaponsCapacity,rechargeRate:rechargeRate,sustainedEnergyPerSecond:input.sustainedEnergyPerSecond,netDrainRate:netDrainRate,timeToDrain:netDrainRate===0?Infinity:input.weaponsCapacity/netDrainRate})}export{weaponsCapacitorMetrics};//# sourceMappingURL=chunk-M4FZRDAH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/weapons-capacitor.ts"],"names":["capacitorRechargeAtPips","requirePips","requireFiniteNonNegative","weaponsCapacitorMetrics","input","scope","weaponsPips","field","rechargeRate","weaponsRecharge","netDrainRate","Math","max","sustainedEnergyPerSecond","Object","freeze","capacity","weaponsCapacity","timeToDrain","Infinity"],"mappings":"O,wHAiFO,SAASG,wBAAwBC,OACpC,MAAMC,MAAQ,0BACd,MAAMC,YAAcL,YAAYI,MAAO,cAAeD,MAAME,aAAe,GAC3E,IAAA,MAAWC,QAAS,CAChB,kBACA,kBACA,4BACQ,CACRL,yBAAyBG,MAAOE,MAAOH,MAAMG,OACjD,CAEA,MAAMC,aAAeR,wBAAwBI,MAAMK,gBAAiBH,aACpE,MAAMI,aAAeC,KAAKC,IAAI,EAAGR,MAAMS,yBAA2BL,cAClE,OAAOM,OAAOC,OAAO,CACjBT,wBACAU,SAAUZ,MAAMa,gBAChBT,0BACAK,yBAA0BT,MAAMS,yBAChCH,0BACAQ,YAAaR,eAAiB,EAAIS,SAAWf,MAAMa,gBAAkBP,cAE7E,QAAAP"}
@@ -0,0 +1 @@
1
+ import{calculateModuleLimits}from"./chunk-KPETDYQX.js";import{describeValue,truncate}from"./chunk-PKWVG2JY.js";function isRequiredSlot(slot){return slot.kind==="core"||slot.kind==="armour"}function fixedSlotReason(slot){if(slot.kind==="cargoHatch")return"cargoHatch";return isRequiredSlot(slot)?"requiredSlot":null}function tenths(tonnes){return Math.round(tonnes*10)/10}var LOAD_PHRASE=Object.freeze({dry:"before fuel",unladen:"with a full tank",laden:"fully laden"});function thrusterLoads(mass){if(mass===void 0)return[];const loads=[{load:"dry",mass:mass.dry}];if(mass.fuel===void 0)return loads;loads.push({load:"unladen",mass:mass.dry+mass.fuel});if(mass.cargo===void 0)return loads;loads.push({load:"laden",mass:mass.dry+mass.fuel+mass.cargo});return loads}function requireTonnes(name,value){if(value===void 0)return;if(!Number.isFinite(value)||value<0){throw new RangeError(`validateLoadout: ${name} must be a finite non-negative number of tonnes, received ${describeValue(value)}`)}}function validateLoadout(input){if(!Array.isArray(input.slots)){throw new TypeError(`validateLoadout: input.slots must be an array, received ${describeValue(input.slots)}`)}requireTonnes("input.mass.dry",input.mass?.dry);requireTonnes("input.mass.fuel",input.mass?.fuel);requireTonnes("input.mass.cargo",input.mass?.cargo);for(const module of input.modules){requireTonnes(`${truncate(module.slot)} thrusterMaxMass`,module.thrusterMaxMass)}const issues=[];const seen=/* @__PURE__ */new Map;for(const module of input.modules){const normalized=module.slot.toLowerCase();const previous=seen.get(normalized);if(previous!==void 0){issues.push({code:"duplicateSlot",severity:"error",slot:module.slot,symbol:module.symbol,params:{slot:module.slot,previousSlot:previous,symbol:module.symbol},message:`Slot ${truncate(module.slot)} occurs more than once (also ${truncate(previous)})`})}else{seen.set(normalized,module.slot)}}const exclusive=/* @__PURE__ */new Map;for(const module of input.modules){if(!module.exclusionGroup)continue;const previous=exclusive.get(module.exclusionGroup);if(previous){issues.push({code:"duplicateExclusiveModule",severity:"error",slot:module.slot,symbol:module.symbol,params:{exclusionGroup:module.exclusionGroup,slot:module.slot,symbol:module.symbol,previousSlot:previous.slot,previousSymbol:previous.symbol},message:`${truncate(module.slot)}: ${truncate(module.symbol)} conflicts with ${truncate(previous.symbol)} in ${truncate(previous.slot)} (${module.exclusionGroup} is limited to one per ship)`})}else{exclusive.set(module.exclusionGroup,module)}}for(const usage of calculateModuleLimits(input.modules)){if(usage.excess===0)continue;issues.push({code:"moduleLimitExceeded",severity:"error",params:{group:usage.group,count:usage.count,limit:usage.limit},message:`${usage.group} has ${usage.count} fitted modules but the ship allows ${usage.limit}`})}const knownSlots=new Map(input.slots.map(slot=>[slot.key.toLowerCase(),slot]));for(const module of input.modules){if(module.requiresKnownSlot!==false&&!knownSlots.has(module.slot.toLowerCase())){issues.push({code:"unknownSlot",severity:"error",slot:module.slot,symbol:module.symbol,message:`${truncate(module.slot)} is not a slot on ${truncate(input.shipSymbol)}`,params:{shipSymbol:input.shipSymbol,slot:module.slot,symbol:module.symbol}})}}for(const slot of input.slots){if(isRequiredSlot(slot)&&!seen.has(slot.key.toLowerCase())){issues.push({code:"missingRequiredSlot",severity:"incomplete",slot:slot.key,message:`${truncate(slot.key)} is required for an operational build`,params:{slot:slot.key}})}}for(const module of input.modules){if(module.fitError!==null){issues.push({code:"incompatibleModule",severity:"error",slot:module.slot,symbol:module.symbol,message:`${truncate(module.slot)}: ${truncate(module.symbol)} ${truncate(module.fitError)}`,params:{...module.fitParams,slot:module.slot,symbol:module.symbol,constraint:module.fitConstraint??"unknownConstraint"}})}}for(const load of thrusterLoads(input.mass)){for(const module of input.modules){if(module.thrusterMaxMass===void 0||load.mass<=module.thrusterMaxMass){continue}issues.push({code:"thrusterMassExceeded",severity:load.load==="laden"?"warning":"error",slot:module.slot,symbol:module.symbol,message:`${truncate(module.slot)}: ${truncate(module.symbol)} is rated to ${tenths(module.thrusterMaxMass)} t but the ship weighs ${tenths(load.mass)} t ${LOAD_PHRASE[load.load]}`,params:{slot:module.slot,symbol:module.symbol,load:load.load,mass:load.mass,maxMass:module.thrusterMaxMass}})}if(issues.some(issue=>issue.code==="thrusterMassExceeded"))break}const frozen=Object.freeze(issues.map(issue=>Object.freeze({...issue,...issue.params?{params:Object.freeze(Object.fromEntries(Object.entries(issue.params).map(([key,value])=>[key,Array.isArray(value)?Object.freeze([...value]):value])))}:{}})));return Object.freeze({valid:!issues.some(issue=>issue.severity==="error"),complete:!issues.some(issue=>issue.severity!=="warning"),issues:frozen})}export{fixedSlotReason,validateLoadout};//# sourceMappingURL=chunk-OJC6AUL7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/internal/loadout-slot-rules.ts","../src/ships/loadout-validation.ts"],"names":["calculateModuleLimits","describeValue","truncate","isRequiredSlot","slot","kind","fixedSlotReason","tenths","tonnes","Math","round","LOAD_PHRASE","Object","freeze","dry","unladen","laden","thrusterLoads","mass","loads","load","fuel","push","cargo","requireTonnes","name","value","Number","isFinite","RangeError","validateLoadout","input","Array","isArray","slots","TypeError","module","modules","thrusterMaxMass","issues","seen","Map","normalized","toLowerCase","previous","get","code","severity","symbol","params","previousSlot","message","set","exclusive","exclusionGroup","previousSymbol","usage","excess","group","count","limit","knownSlots","map","key","requiresKnownSlot","has","shipSymbol","fitError","fitParams","constraint","fitConstraint","maxMass","some","issue","frozen","fromEntries","entries","valid","complete"],"mappings":"O,wGAOO,SAASG,eAAeC,MAC3B,OAAOA,KAAKC,OAAS,QAAUD,KAAKC,OAAS,QACjD,CAGO,SAASC,gBAAgBF,MAC5B,GAAIA,KAAKC,OAAS,aAAc,MAAO,aACvC,OAAOF,eAAeC,MAAQ,eAAiB,IACnD,CCwLA,SAASG,OAAOC,QACZ,OAAOC,KAAKC,MAAMF,OAAS,IAAM,EACrC,CAGA,IAAMG,YAAsDC,OAAOC,OAAO,CACtEC,IAAK,cACLC,QAAS,mBACTC,MAAO,gBAeX,SAASC,cACLC,MAEA,GAAIA,YAAS,EAAW,MAAO,GAC/B,MAAMC,MAAgD,CAAC,CAAEC,KAAM,MAAOF,KAAMA,KAAKJ,MACjF,GAAII,KAAKG,YAAS,EAAW,OAAOF,MACpCA,MAAMG,KAAK,CAAEF,KAAM,UAAWF,KAAMA,KAAKJ,IAAMI,KAAKG,OACpD,GAAIH,KAAKK,aAAU,EAAW,OAAOJ,MACrCA,MAAMG,KAAK,CAAEF,KAAM,QAASF,KAAMA,KAAKJ,IAAMI,KAAKG,KAAOH,KAAKK,QAC9D,OAAOJ,KACX,CAcA,SAASK,cAAcC,KAAcC,OACjC,GAAIA,aAAU,EAAW,OACzB,IAAKC,OAAOC,SAASF,QAAUA,MAAQ,EAAG,CACtC,MAAM,IAAIG,WACN,oBAAoBJ,iEAAiExB,cAAcyB,SAE3G,CACJ,CAkDO,SAASI,gBAAgBC,OAC5B,IAAKC,MAAMC,QAAQF,MAAMG,OAAQ,CAC7B,MAAM,IAAIC,UACN,2DAA2DlC,cAAc8B,MAAMG,SAEvF,CACAV,cAAc,iBAAkBO,MAAMb,MAAM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rDR,OAAQmC,QAEhB,QAAApE,gBAAAwB"}
@@ -1 +1 @@
1
- import{mapDamageTypes,stackArmourResistance,effectiveHitPoints}from"./chunk-JGOAQLYW.js";var reinforcementResistances=(sources,type)=>sources.map(source=>source[`${type}Resistance`]??0);function armourMetrics(input){const bulkhead=input.bulkhead??{};const reinforcements=input.reinforcements??[];const moduleReinforcements=input.moduleReinforcements??[];const bulkheads=input.baseArmour*(1+(bulkhead.hullBoost??0));const reinforcement=reinforcements.reduce((sum,pack)=>sum+(pack.hullReinforcement??0)+input.baseArmour*(pack.hullBoost??0),0);const hitPoints=bulkheads+reinforcement;const resistances=Object.freeze(mapDamageTypes(type=>stackArmourResistance(bulkhead[`${type}Resistance`]??0,reinforcementResistances(reinforcements,type))));return Object.freeze({hitPoints:hitPoints,bulkheads:bulkheads,reinforcement:reinforcement,resistances:resistances,effectiveHitPoints:Object.freeze(effectiveHitPoints(hitPoints,resistances)),moduleArmour:moduleReinforcements.reduce((sum,pack)=>sum+(pack.integrity??0),0),moduleProtection:1-moduleReinforcements.reduce((product,pack)=>product*(1-(pack.moduleProtection??0)),1)})}export{armourMetrics};//# sourceMappingURL=chunk-FYVPZBXN.js.map
1
+ import{mapDamageTypes,stackArmourResistance,effectiveHitPoints}from"./chunk-F44QX47A.js";var reinforcementResistances=(sources,type)=>sources.map(source=>source[`${type}Resistance`]??0);function armourMetrics(input){const bulkhead=input.bulkhead??{};const reinforcements=input.reinforcements??[];const moduleReinforcements=input.moduleReinforcements??[];const bulkheads=input.baseArmour*(1+(bulkhead.hullBoost??0));const reinforcement=reinforcements.reduce((sum,pack)=>sum+(pack.hullReinforcement??0)+input.baseArmour*(pack.hullBoost??0),0);const hitPoints=bulkheads+reinforcement;const resistances=Object.freeze(mapDamageTypes(type=>stackArmourResistance(bulkhead[`${type}Resistance`]??0,reinforcementResistances(reinforcements,type))));return Object.freeze({hitPoints:hitPoints,bulkheads:bulkheads,reinforcement:reinforcement,resistances:resistances,effectiveHitPoints:Object.freeze(effectiveHitPoints(hitPoints,resistances)),moduleArmour:moduleReinforcements.reduce((sum,pack)=>sum+(pack.integrity??0),0),moduleProtection:1-moduleReinforcements.reduce((product,pack)=>product*(1-(pack.moduleProtection??0)),1)})}export{armourMetrics};//# sourceMappingURL=chunk-Q5ALV3DI.js.map
@@ -1 +1 @@
1
- import{buildMaterialCatalogue}from"./chunk-Z43DN4PY.js";var materials_raw_default=[{symbol:"Carbon",name:"Carbon",elementSymbol:"C",grade:1,line:"Carbon"},{symbol:"Vanadium",name:"Vanadium",elementSymbol:"V",grade:2,line:"Carbon"},{symbol:"Niobium",name:"Niobium",elementSymbol:"Nb",grade:3,line:"Carbon"},{symbol:"Yttrium",name:"Yttrium",elementSymbol:"Y",grade:4,line:"Carbon"},{symbol:"Iron",name:"Iron",elementSymbol:"Fe",grade:1,line:"Iron"},{symbol:"Zinc",name:"Zinc",elementSymbol:"Zn",grade:2,line:"Iron"},{symbol:"Tin",name:"Tin",elementSymbol:"Sn",grade:3,line:"Iron"},{symbol:"Selenium",name:"Selenium",elementSymbol:"Se",grade:4,line:"Iron"},{symbol:"Lead",name:"Lead",elementSymbol:"Pb",grade:1,line:"Lead"},{symbol:"Zirconium",name:"Zirconium",elementSymbol:"Zr",grade:2,line:"Lead"},{symbol:"Boron",name:"Boron",elementSymbol:"B",grade:3,line:"Lead"},{symbol:"Antimony",name:"Antimony",elementSymbol:"Sb",grade:4,line:"Lead"},{symbol:"Nickel",name:"Nickel",elementSymbol:"Ni",grade:1,line:"Nickel"},{symbol:"Germanium",name:"Germanium",elementSymbol:"Ge",grade:2,line:"Nickel"},{symbol:"Tungsten",name:"Tungsten",elementSymbol:"W",grade:3,line:"Nickel"},{symbol:"Tellurium",name:"Tellurium",elementSymbol:"Te",grade:4,line:"Nickel"},{symbol:"Phosphorus",name:"Phosphorus",elementSymbol:"P",grade:1,line:"Phosphorus"},{symbol:"Chromium",name:"Chromium",elementSymbol:"Cr",grade:2,line:"Phosphorus"},{symbol:"Molybdenum",name:"Molybdenum",elementSymbol:"Mo",grade:3,line:"Phosphorus"},{symbol:"Technetium",name:"Technetium",elementSymbol:"Tc",grade:4,line:"Phosphorus"},{symbol:"Rhenium",name:"Rhenium",elementSymbol:"Re",grade:1,line:"Rhenium"},{symbol:"Arsenic",name:"Arsenic",elementSymbol:"As",grade:2,line:"Rhenium"},{symbol:"Mercury",name:"Mercury",elementSymbol:"Hg",grade:3,line:"Rhenium"},{symbol:"Polonium",name:"Polonium",elementSymbol:"Po",grade:4,line:"Rhenium"},{symbol:"Sulphur",name:"Sulphur",elementSymbol:"S",grade:1,line:"Sulphur"},{symbol:"Manganese",name:"Manganese",elementSymbol:"Mn",grade:2,line:"Sulphur"},{symbol:"Cadmium",name:"Cadmium",elementSymbol:"Cd",grade:3,line:"Sulphur"},{symbol:"Ruthenium",name:"Ruthenium",elementSymbol:"Ru",grade:4,line:"Sulphur"}];var RAW_MATERIALS=buildMaterialCatalogue(materials_raw_default,"raw");export{RAW_MATERIALS};//# sourceMappingURL=chunk-SQS7672E.js.map
1
+ import{buildMaterialCatalogue}from"./chunk-GTEHRZPN.js";var materials_raw_default=[{symbol:"Carbon",name:"Carbon",elementSymbol:"C",grade:1,line:"Carbon"},{symbol:"Vanadium",name:"Vanadium",elementSymbol:"V",grade:2,line:"Carbon"},{symbol:"Niobium",name:"Niobium",elementSymbol:"Nb",grade:3,line:"Carbon"},{symbol:"Yttrium",name:"Yttrium",elementSymbol:"Y",grade:4,line:"Carbon"},{symbol:"Iron",name:"Iron",elementSymbol:"Fe",grade:1,line:"Iron"},{symbol:"Zinc",name:"Zinc",elementSymbol:"Zn",grade:2,line:"Iron"},{symbol:"Tin",name:"Tin",elementSymbol:"Sn",grade:3,line:"Iron"},{symbol:"Selenium",name:"Selenium",elementSymbol:"Se",grade:4,line:"Iron"},{symbol:"Lead",name:"Lead",elementSymbol:"Pb",grade:1,line:"Lead"},{symbol:"Zirconium",name:"Zirconium",elementSymbol:"Zr",grade:2,line:"Lead"},{symbol:"Boron",name:"Boron",elementSymbol:"B",grade:3,line:"Lead"},{symbol:"Antimony",name:"Antimony",elementSymbol:"Sb",grade:4,line:"Lead"},{symbol:"Nickel",name:"Nickel",elementSymbol:"Ni",grade:1,line:"Nickel"},{symbol:"Germanium",name:"Germanium",elementSymbol:"Ge",grade:2,line:"Nickel"},{symbol:"Tungsten",name:"Tungsten",elementSymbol:"W",grade:3,line:"Nickel"},{symbol:"Tellurium",name:"Tellurium",elementSymbol:"Te",grade:4,line:"Nickel"},{symbol:"Phosphorus",name:"Phosphorus",elementSymbol:"P",grade:1,line:"Phosphorus"},{symbol:"Chromium",name:"Chromium",elementSymbol:"Cr",grade:2,line:"Phosphorus"},{symbol:"Molybdenum",name:"Molybdenum",elementSymbol:"Mo",grade:3,line:"Phosphorus"},{symbol:"Technetium",name:"Technetium",elementSymbol:"Tc",grade:4,line:"Phosphorus"},{symbol:"Rhenium",name:"Rhenium",elementSymbol:"Re",grade:1,line:"Rhenium"},{symbol:"Arsenic",name:"Arsenic",elementSymbol:"As",grade:2,line:"Rhenium"},{symbol:"Mercury",name:"Mercury",elementSymbol:"Hg",grade:3,line:"Rhenium"},{symbol:"Polonium",name:"Polonium",elementSymbol:"Po",grade:4,line:"Rhenium"},{symbol:"Sulphur",name:"Sulphur",elementSymbol:"S",grade:1,line:"Sulphur"},{symbol:"Manganese",name:"Manganese",elementSymbol:"Mn",grade:2,line:"Sulphur"},{symbol:"Cadmium",name:"Cadmium",elementSymbol:"Cd",grade:3,line:"Sulphur"},{symbol:"Ruthenium",name:"Ruthenium",elementSymbol:"Ru",grade:4,line:"Sulphur"}];var RAW_MATERIALS=buildMaterialCatalogue(materials_raw_default,"raw");export{RAW_MATERIALS};//# sourceMappingURL=chunk-Q6YDPREF.js.map
@@ -0,0 +1 @@
1
+ import{fixedSlotReason,validateLoadout}from"./chunk-OJC6AUL7.js";import{calculateModuleLimits}from"./chunk-KPETDYQX.js";import{publishLoadoutInternals,normalizeLoadoutEvent,preEngineeredVariantFor,moduleFitProblem,effectiveModule,moduleFitError}from"./chunk-AAE4KZ2V.js";import{parseSlef,toSlef,stringifySlef,getLoadoutModifier}from"./chunk-T4MKUKYS.js";import{getSourceModuleValue}from"./chunk-NIURLW2F.js";import{isNonOutfittingSlot,isBuiltInHullModule,cloneLoadoutModule,cloneModuleStats,availableBlueprintsFor,availableExperimentalsFor,ownKeyIn,FITTED_ITEM,blueprintAvailableFor,blueprintRoutesFor,experimentalAvailableFor,primitiveEngineeringInputsFor,missingBaseLabels,journalModifiersFor,getPreEngineeredStats,getPreEngineeredJournalModifiers,getPreEngineeredModifiers,ordinaryEngineeringProof,unresolvedModifiers,matchingKeyIn,isCargoHatchSlot,orderBySlotLayout}from"./chunk-JET673E5.js";import{getPreEngineeredVariants}from"./chunk-PL75RTA2.js";import{getShipBySymbol}from"./chunk-6UNAD74Z.js";import{builtInModuleBySymbol}from"./chunk-HUYYGTRM.js";import{ALL_MODULES}from"./chunk-APEG4ZER.js";import{singleJumpRange}from"./chunk-VTMCSCXV.js";import{calculateUnladenMass,calculateCargoCapacity,calculateFuelCapacity}from"./chunk-DCB4COCL.js";import{getDefaultLoadout}from"./chunk-GRIK3EDH.js";import{getExperimentalEffect}from"./chunk-77I24V6B.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{baseStats,computeModifiers,labelsForDamageType,scaleForLabel}from"./chunk-CJQ37JII.js";import{resolveBlueprintForModule}from"./chunk-OLKNYGGT.js";import{getExperimentalsForModule}from"./chunk-GLWPSVFV.js";import{getBlueprintGrade}from"./chunk-AYAKU4YA.js";import{loadoutSlotName}from"./chunk-KAA4VOOB.js";import{parseSlotName,enumerateSlots}from"./chunk-RAO35XDF.js";import{normalizeKey,CATALOGUE_KEY}from"./chunk-BKWLI44T.js";import{truncate,describeValue,requireString,requireStringIfPresent}from"./chunk-PKWVG2JY.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var REBUY_FRACTION=.05;function exportLoadoutEvent(input,options){const fromSource=options.credits==="source";const source=fromSource?input.sourcePurchase:null;const totals=source!==null&&!input.sourceTotalsVoided&&sourceTotalsHold(input.modules,source)?source:null;const hullValue=fromSource?source?.hullValue??null:input.retailHullValue;const modulesValue=fromSource?totals?.modulesValue??null:computedModulesValue(input.modules,input.statsFor);const rebuy=fromSource?totals?.rebuy??null:hullValue===null||modulesValue===null?null:Math.trunc((hullValue+modulesValue)*REBUY_FRACTION);return{Ship:input.shipSymbol.toLowerCase(),...input.shipName===void 0?{}:{ShipName:input.shipName},...input.shipIdent===void 0?{}:{ShipIdent:input.shipIdent},...hullValue===null?{}:{HullValue:hullValue},...modulesValue===null?{}:{ModulesValue:modulesValue},UnladenMass:input.unladenMass,CargoCapacity:input.cargoCapacity,...input.maxJumpRange===null?{}:{MaxJumpRange:input.maxJumpRange},FuelCapacity:{Main:input.fuelCapacity.main,Reserve:input.fuelCapacity.reserve},...rebuy===null?{}:{Rebuy:rebuy},Modules:exportModules(input,options,fromSource)}}function exportModules(input,options,fromSource){const ordered=options.moduleOrder==="slots"?slotOrderedModules(input.modules,input.layout):[...input.modules.values()];return ordered.map(module=>{const on=module.On??(options.explicitPower?true:void 0);const priority=module.Priority??(options.explicitPower?0:void 0);const value=fromSource?sourceModuleValue(module,input.sourcePurchase):moduleValue(module,input.statsFor);return{Slot:module.Slot,Item:module.Item.toLowerCase(),...on===void 0?{}:{On:on},...priority===void 0?{}:{Priority:priority},...module.Health===void 0?{}:{Health:module.Health},...typeof value==="number"?{Value:value}:{},...module.Engineering===void 0?{}:{Engineering:cloneLoadoutModule(module).Engineering}}})}function slotOrderedModules(modules,layout){return orderBySlotLayout([...modules.values()],layout,module=>module.Slot)}function computedModulesValue(modules,statsFor){let sum=0;for(const module of modules.values()){const value=moduleValue(module,statsFor);if(value==="unknown")return null;if(value!=="free")sum+=value}return sum}function moduleValue(module,statsFor){const stats=statsFor(module);if(stats!==null)return stats.cost??"unknown";return isNonOutfittingSlot(module.Slot)||isBuiltInHullModule(module)?"free":"unknown"}var SOURCE_ITEM="ShipLoadout: sourcePurchase moduleValues[].item";function sourceModuleValue(module,source){const entry=source===null?null:getSourceModuleValue(source,module.Slot);if(entry===null)return"unknown";return normalizeKey(entry.item,SOURCE_ITEM)===normalizeKey(module.Item,FITTED_ITEM)?entry.value:"unknown"}function sourceTotalsHold(modules,source){for(const entry of source.moduleValues){const key=matchingKeyIn(modules,entry.slot);const fitted=key===null?void 0:modules.get(key);if(!fitted)return false;if(isCargoHatchSlot(entry.slot)&&entry.value===0)continue;if(normalizeKey(fitted.Item,FITTED_ITEM)!==normalizeKey(entry.item,SOURCE_ITEM)){return false}}return true}var SLOT_KEY="ShipLoadout: slotKey";var FITTED_SLOT="ShipLoadout: fitted module Slot";var LoadoutEditError=class extends TypeError{code;constraint;params;constructor(message,code,params,constraint){super(message);this.code=code;this.params=deepFreeze(structuredClone(params));if(constraint!==void 0)this.constraint=constraint}};var experimentalEffectUnsupported=(code,params)=>deepFreeze({kind:"unsupported",code:code,params:params});var engineeringNormalizationUnsupported=(code,params)=>deepFreeze({kind:"unsupported",code:code,params:params});function weighable(tonnes){return tonnes!==void 0&&Number.isFinite(tonnes)&&tonnes>=0?tonnes:void 0}var AGGREGATE_STATS=["mass","cargoCapacity","fuelCapacity"];var ShipLoadout=class _ShipLoadout{#ship;#shipSymbol;#modules;#moduleStats;#primitiveModifiers;#top;#sourcePurchase;#importOutcomes;#slotCache=/* @__PURE__ */new Map;#layoutCache;constructor(ship,shipSymbol,modules,top,sourcePurchase=null,moduleStats=/* @__PURE__ */new Map,primitiveModifiers=/* @__PURE__ */new Map,importOutcomes=deepFreeze([])){this.#ship=ship;this.#shipSymbol=shipSymbol;this.#modules=modules;this.#top=top;this.#sourcePurchase=sourcePurchase;this.#moduleStats=moduleStats;this.#primitiveModifiers=primitiveModifiers;this.#importOutcomes=importOutcomes;publishLoadoutInternals(this,{ship:ship,modules:()=>[...this.#modules.values()],effectiveModules:()=>this.#modulesForEffectiveStats(),effectiveModule:module=>this.#moduleForEffectiveStats(module),statsFor:module=>this.#statsFor(module),layout:()=>this.#layout(),resolveDrive:()=>this.#resolveDrive(),frameShiftDriveModule:()=>this.#frameShiftDrive()?.module,calculationModules:()=>this.#calculationModules(),statedMainFuel:()=>this.#top.FuelCapacity?.Main})}static fromSlef(input,index=0){const entries=parseSlef(input);const entry=entries[index];if(!entry){throw new TypeError(`ShipLoadout.fromSlef: no entry at index ${truncate(index)} (have ${entries.length})`)}const imported=normalizeLoadoutEvent(entry.data);const ship=getShipBySymbol(imported.shipSymbol);if(!ship){throw new TypeError(`ShipLoadout.fromSlef: unknown hull "${truncate(imported.shipSymbol)}"`)}return _ShipLoadout.#fromImported(imported,ship)}static fromLoadout(event){if(event===null||typeof event!=="object"){throw new TypeError(`ShipLoadout.fromLoadout: event must be a Loadout event, received ${describeValue(event)}`)}const imported=normalizeLoadoutEvent(event);const ship=getShipBySymbol(imported.shipSymbol);if(!ship){throw new TypeError(`ShipLoadout.fromLoadout: unknown hull "${truncate(imported.shipSymbol)}"`)}return _ShipLoadout.#fromImported(imported,ship)}static#fromImported(imported,ship){const outcomes=[...imported.outcomes];const loadout=new _ShipLoadout(ship,imported.shipSymbol,imported.modules,imported.top,imported.sourcePurchase,imported.moduleStats,imported.primitiveModifiers,outcomes);const{UnladenMass:UnladenMass,CargoCapacity:CargoCapacity,FuelCapacity:FuelCapacity}=imported.top;for(const module of[...imported.modules.values()]){const unresolved=loadout.#rollStatedRecipe(module);if(unresolved!==null)outcomes.push(unresolved)}if(UnladenMass!==void 0)loadout.#top.UnladenMass=UnladenMass;if(CargoCapacity!==void 0)loadout.#top.CargoCapacity=CargoCapacity;if(FuelCapacity!==void 0)loadout.#top.FuelCapacity=FuelCapacity;deepFreeze(outcomes);return loadout}#rollStatedRecipe(module){const engineering=module.Engineering;if(!engineering||engineering.Modifiers!==void 0||typeof engineering.BlueprintName!=="string"){return null}if(this.#moduleStats.has(module.Slot)){const variant=preEngineeredVariantFor(module);if(variant?.acquisition!=="mercenary"||engineering.Level<=variant.grade){return null}}try{this.applyBlueprint(module.Slot,engineering.BlueprintName,{grade:engineering.Level,quality:engineering.Quality??1,...typeof engineering.ExperimentalEffect==="string"?{experimentalEffectSymbol:engineering.ExperimentalEffect}:{}});return null}catch(error){if(!(error instanceof TypeError)&&!(error instanceof RangeError))throw error;return{action:"unresolvedEngineering",slot:module.Slot,sourceSymbol:module.Item,blueprintSymbol:engineering.BlueprintName}}}static empty(shipSymbol){const requested=requireString(shipSymbol,"ShipLoadout.empty: shipSymbol");const ship=getShipBySymbol(requested);if(!ship){throw new TypeError(`ShipLoadout.empty: no slot layout for hull "${truncate(shipSymbol)}"`)}const fitted=(getDefaultLoadout(ship.symbol)?.modules??[]).filter(module=>{const parsed=parseSlotName(module.slot);return parsed!==null&&fixedSlotReason(parsed)!==null});return new _ShipLoadout(ship,ship.symbol,new Map(fitted.map(module=>[module.slot,{Slot:module.slot,Item:module.symbol}])),{})}static default(shipSymbol){const requested=requireString(shipSymbol,"ShipLoadout.default: shipSymbol");const ship=getShipBySymbol(requested);if(!ship){throw new TypeError(`ShipLoadout.default: no default loadout for hull "${truncate(shipSymbol)}"`)}const loadout=getDefaultLoadout(ship.symbol);return new _ShipLoadout(ship,loadout.symbol,new Map(loadout.modules.map(module=>[module.slot,{Slot:module.slot,Item:module.symbol}])),{})}get shipSymbol(){return this.#shipSymbol}get shipName(){return this.#top.ShipName??null}get shipIdent(){return this.#top.ShipIdent??null}get unladenMass(){return this.#top.UnladenMass??this.#computedUnladenMass()}#computedUnladenMass(){return calculateUnladenMass(this.#ship.hullMass,this.#calculationModules())}get fuelCapacity(){const cap=this.#top.FuelCapacity;if(cap?.Main!==void 0&&cap.Reserve!==void 0){return Object.freeze({main:cap.Main,reserve:cap.Reserve})}const computed=this.#computedFuelCapacity();return Object.freeze({main:cap?.Main??computed.main,reserve:cap?.Reserve??computed.reserve})}get cargoCapacity(){return this.#top.CargoCapacity??this.#computedCargoCapacity()}#computedCargoCapacity(){return calculateCargoCapacity(this.#calculationModules())}#computedFuelCapacity(){return calculateFuelCapacity(this.#ship.reserveFuelCapacity,this.#calculationModules())}get hullValue(){return this.#top.HullValue??null}get modulesValue(){return this.#top.ModulesValue??null}get rebuy(){return this.#top.Rebuy??null}get sourcePurchase(){return this.#sourcePurchase}get importOutcomes(){return this.#importOutcomes}validation(){const slots=this.#layout();const byKey=new Map(slots.map(slot=>[normalizeKey(slot.key,CATALOGUE_KEY),slot]));const modules=[...this.#modules.values()].map(module=>{const stats=this.#statsFor(module);const slot=byKey.get(normalizeKey(module.Slot,FITTED_SLOT));const builtIn=stats===null&&isNonOutfittingSlot(module.Slot)||isBuiltInHullModule(module);const fitProblem=stats&&slot&&!builtIn?moduleFitProblem(this.#shipSymbol,slot,stats):null;const thrusterMaxMass=weighable(stats?.slot==="thrusters"?effectiveModule(this.#moduleForEffectiveStats(module),stats)?.maxMass:void 0);return{slot:module.Slot,symbol:module.Item,requiresKnownSlot:!builtIn,fitError:fitProblem?.message??null,...fitProblem===null?{}:{fitConstraint:fitProblem.constraint},...fitProblem?.params===void 0?{}:{fitParams:fitProblem.params},...stats?.exclusionGroup===void 0?{}:{exclusionGroup:stats.exclusionGroup},...stats?.limitGroup===void 0?{}:{limitGroup:stats.limitGroup},...stats?.limitIncrease===void 0?{}:{limitIncrease:stats.limitIncrease},...thrusterMaxMass===void 0?{}:{thrusterMaxMass:thrusterMaxMass}}});const dry=weighable(this.unladenMass);const fuel=weighable(this.fuelCapacity.main);const cargo=weighable(this.cargoCapacity);const mass=dry===void 0?void 0:{dry:dry,...fuel===void 0?{}:{fuel:fuel},...fuel===void 0||cargo===void 0?{}:{cargo:cargo}};return validateLoadout({shipSymbol:this.#shipSymbol,slots:slots,modules:modules,...mass===void 0?{}:{mass:mass}})}slots(kind){const cached=this.#slotCache.get(kind);if(cached!==void 0)return cached;const slots=kind===void 0?this.#layout():this.#layout().filter(slot=>slot.kind===kind);const currentLimits=this.#moduleLimits();const value=deepFreeze(slots.map(slot=>{const stats=this.#moduleStatsAt(slot.key);const fixedReason=fixedSlotReason(slot);const immovableReason=fixedReason!==null?fixedReason:stats?.limitIncrease!==void 0&&this.#moduleLimitRegression(slot.key,null,currentLimits,stats)!==null?"moduleLimit":null;return{...slot,name:loadoutSlotName(slot),module:this.fittedModuleAt(slot.key),removable:immovableReason===null,...immovableReason===null?{}:{immovableReason:immovableReason}}}));this.#slotCache.set(kind,value);return value}fittedModuleAt(slotKey){const module=this.#fittedModuleFor(slotKey);if(!module)return null;const raw=cloneLoadoutModule(module);const stats=this.#statsFor(module);const effective=effectiveModule(this.#moduleForEffectiveStats(module),stats);return deepFreeze({slot:module.Slot,symbol:raw.Item,on:raw.On,priority:raw.Priority,health:raw.Health,value:raw.Value,engineering:raw.Engineering,raw:raw,stats:stats===null?null:cloneModuleStats(stats),effectiveStats:effective===null?null:cloneModuleStats(effective),ammunition:ammunitionCapacity(effective),preEngineeredVariant:preEngineeredVariantFor(raw)})}fittedModules(){return deepFreeze([...this.#modules.keys()].flatMap(key=>{const fitted=this.fittedModuleAt(key);return fitted===null?[]:[fitted]}))}availableBlueprints(slotKey){const module=this.#fittedModuleFor(slotKey);return deepFreeze(module?availableBlueprintsFor(module.Item,this.#statsFor(module)):[])}availableExperimentalEffects(slotKey){const module=this.#fittedModuleFor(slotKey);return deepFreeze(module?availableExperimentalsFor(module.Item,this.#statsFor(module)):[])}modulesForSlot(slotKey){const slot=this.#requireSlot(slotKey);const occupied=new Set([...this.#modules.values()].flatMap(fitted=>{if(normalizeKey(fitted.Slot,FITTED_SLOT)===normalizeKey(slot.key,CATALOGUE_KEY))return[];const group=this.#statsFor(fitted)?.exclusionGroup;return group===void 0?[]:[group]}));const currentLimits=this.#moduleLimits();const currentStats=this.#moduleStatsAt(slot.key);return ALL_MODULES.filter(module=>module.grantOnly===void 0&&moduleFitError(this.#shipSymbol,slot,module)===null&&(module.exclusionGroup===void 0||!occupied.has(module.exclusionGroup))&&this.#moduleLimitRegression(slot.key,module,currentLimits,currentStats)===null)}repairFixedMount(slotKey){const requested=requireString(slotKey,SLOT_KEY);const wanted=normalizeKey(requested,SLOT_KEY);const slot=this.#requireSlot(requested);const fittedKey=this.#fittedKey(requested);const resultSlot=fittedKey??requested;const canonicalKey=slot.key;if(fixedSlotReason(slot)===null){return deepFreeze({status:"refused",slot:resultSlot,reason:"notFixedMount"})}const current=this.#fittedModuleFor(requested);const currentStats=current?this.#statsFor(current):null;const valid=current!==void 0&&currentStats!==null&&(slot.kind==="cargoHatch"?isBuiltInHullModule(current):moduleFitProblem(this.#shipSymbol,slot,currentStats)===null);if(valid){return deepFreeze({status:"unchanged",slot:current.Slot,symbol:current.Item})}const defaultModule=getDefaultLoadout(this.#shipSymbol)?.modules.find(module=>normalizeKey(module.slot,CATALOGUE_KEY)===wanted);if(!defaultModule){return deepFreeze({status:"defaultUnavailable",slot:resultSlot})}const ownKey=ownKeyIn(this.#modules,canonicalKey);const replacement={Slot:ownKey,Item:defaultModule.symbol,...current?.On===void 0?{}:{On:current.On},...current?.Priority===void 0?{}:{Priority:current.Priority},...current?.Health===void 0?{}:{Health:current.Health}};const replacementStats=builtInModuleBySymbol(defaultModule.symbol,"ShipLoadout.repairFixedMount")??(isBuiltInHullModule(replacement)?builtInModuleBySymbol("ModularCargoBayDoor","ShipLoadout.repairFixedMount"):null);if(!replacementStats){return deepFreeze({status:"defaultUnavailable",slot:resultSlot,symbol:defaultModule.symbol})}this.#replaceModule(ownKey,replacement,replacementStats);return deepFreeze({status:"repaired",slot:ownKey,symbol:defaultModule.symbol})}setModule(slotKey,module){const slot=this.#requireSlot(slotKey);if(module===null||module===void 0){throw new TypeError(`ShipLoadout.setModule: no module supplied for "${truncate(slotKey)}" (did the module lookup return undefined?)`)}if(typeof module.symbol!=="string"){throw new TypeError(`ShipLoadout.setModule: module for "${truncate(slotKey)}" must be an outfitting module, received ${describeValue(module)}`)}module=cloneModuleStats(module);const catalogued=builtInModuleBySymbol(module.symbol,FITTED_ITEM);if(catalogued===null){throw new TypeError(`ShipLoadout.setModule: no module is catalogued as "${truncate(module.symbol)}"`)}for(const field of AGGREGATE_STATS){const stated=module[field];if(stated===void 0){if(catalogued[field]===void 0)continue;throw new TypeError(`ShipLoadout.setModule: the supplied record for "${truncate(module.symbol)}" has no ${field}`)}if(typeof stated!=="number"||!Number.isFinite(stated)){throw new TypeError(`ShipLoadout.setModule: the supplied record for "${truncate(module.symbol)}" states a ${field} of ${describeValue(stated)}`)}}const problem=moduleFitProblem(this.#shipSymbol,slot,module);if(problem){if(problem.constraint==="immutableSlot"){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${problem.message}`,"immutableSlot",{slot:slot.key})}throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${problem.message}`,"incompatibleModule",{...problem.params,slot:slot.key,symbol:module.symbol,constraint:problem.constraint},problem.constraint)}if(module.exclusionGroup!==void 0){const conflict=[...this.#modules.values()].find(fitted=>normalizeKey(fitted.Slot,FITTED_SLOT)!==normalizeKey(slot.key,CATALOGUE_KEY)&&this.#statsFor(fitted)?.exclusionGroup===module.exclusionGroup);if(conflict){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${module.exclusionGroup} is limited to one per ship (already fitted in ${truncate(conflict.Slot)})`,"duplicateExclusiveModule",{exclusionGroup:module.exclusionGroup,slot:slot.key,symbol:module.symbol,previousSlot:conflict.Slot,previousSymbol:conflict.Item})}}const limitProblem=this.#moduleLimitRegression(slot.key,module);if(limitProblem!==null){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${limitProblem.group} would have ${limitProblem.count} modules but the ship allows ${limitProblem.limit}`,"moduleLimitExceeded",{group:limitProblem.group,count:limitProblem.count,limit:limitProblem.limit,slot:slot.key,symbol:module.symbol})}const key=this.#fittedKey(slotKey)??slot.key;this.#replaceModule(key,{Slot:key,Item:module.symbol},module);return this}removeModule(slotKey){const wanted=normalizeKey(slotKey,SLOT_KEY);if(wanted==="cargohatch"){throw new LoadoutEditError("ShipLoadout.removeModule: the cargoHatch slot cannot be changed","immutableSlot",{slot:"CargoHatch"})}const parsed=parseSlotName(slotKey);const slot=this.#layout().find(candidate=>normalizeKey(candidate.key,CATALOGUE_KEY)===wanted);if(parsed!==null&&fixedSlotReason(parsed)==="requiredSlot"){const fittedKey=this.#fittedKey(slotKey);const key2=slot?.key??fittedKey??slotKey;throw new LoadoutEditError(`ShipLoadout.removeModule: the ${truncate(key2)} slot is required and cannot be emptied`,"requiredSlot",{slot:key2})}const key=this.#fittedKey(slotKey);if(key!==null){const limitProblem=this.#moduleLimitRegression(key,null);if(limitProblem!==null){const fitted=this.#modules.get(key);throw new LoadoutEditError(`ShipLoadout.removeModule: ${truncate(slotKey)}: ${limitProblem.group} would have ${limitProblem.count} modules but the ship allows ${limitProblem.limit}`,"moduleLimitExceeded",{group:limitProblem.group,count:limitProblem.count,limit:limitProblem.limit,slot:key,...fitted===void 0?{}:{symbol:fitted.Item}})}this.#replaceModule(key,null)}return this}applyBlueprint(slotKey,blueprintSymbol,options){requireString(blueprintSymbol,"ShipLoadout.applyBlueprint: blueprintSymbol");if(options===null||typeof options!=="object"){throw new TypeError(`ShipLoadout.applyBlueprint: options must be an object with a grade, received ${describeValue(options)}`)}const wantedGrade=options.grade;const wantedQuality=options.quality;const wantedExperimental=options.experimentalEffectSymbol??void 0;requireStringIfPresent(wantedExperimental,"ShipLoadout.applyBlueprint: options.experimentalEffectSymbol");const module=this.#fittedModuleFor(slotKey);if(!module){throw new RangeError(`ShipLoadout.applyBlueprint: slot "${truncate(slotKey)}" is empty`)}const fittedStats=this.#statsFor(module);if(!fittedStats){throw new TypeError(`ShipLoadout.applyBlueprint: no stats for module "${truncate(module.Item)}"`)}const recipe=resolveBlueprintForModule(module.Item,blueprintSymbol);const named=recipe===blueprintSymbol?`"${truncate(blueprintSymbol)}"`:`"${truncate(blueprintSymbol)}" (${truncate(recipe)} on this module)`;const written=blueprintSymbol.trim().toLowerCase();const resolved=recipe.trim().toLowerCase();if(getPreEngineeredVariants(module.Item).some(variant=>variant.acquisition==="eventReward"&&(variant.blueprintSymbol.toLowerCase()===written||variant.blueprintSymbol.toLowerCase()===resolved))){throw new TypeError(`ShipLoadout.applyBlueprint: ${named} is a fixed pre-engineered identity, not a craftable blueprint; use setPreEngineeredVariant to fit its fixed article`)}if(!Number.isInteger(wantedGrade)||wantedGrade<1||wantedGrade>5){throw new RangeError(`ShipLoadout.applyBlueprint: no blueprint ${named} grade ${truncate(wantedGrade)}`)}const grade=getBlueprintGrade(recipe,wantedGrade);if(!grade){throw new RangeError(`ShipLoadout.applyBlueprint: no blueprint ${named} grade ${truncate(wantedGrade)}`)}let experimental;if(wantedExperimental!==void 0){experimental=getExperimentalEffect(wantedExperimental);if(!experimental){throw new RangeError(`ShipLoadout.applyBlueprint: unknown experimental effect "${truncate(wantedExperimental)}"`)}}const quality=wantedQuality??1;if(!Number.isFinite(quality)||quality<0||quality>1){throw new RangeError(`ShipLoadout.applyBlueprint: quality must be a finite number in [0, 1]`)}if(fittedStats.engineeringLocked){throw new TypeError(`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is a final pre-engineered article and accepts no further engineering`)}if(!blueprintAvailableFor(module.Item,blueprintSymbol)){const offered=[...blueprintRoutesFor(module.Item)].map(([blueprint,route])=>`${blueprint} (${route})`);throw new TypeError(offered.length>0?`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is not offered blueprint ${named}; available candidates are ${offered.join(", ")}`:`ShipLoadout.applyBlueprint: no registry lists an engineering menu for module "${truncate(module.Item)}"`)}if(wantedExperimental!==void 0&&!experimentalAvailableFor(module.Item,wantedExperimental)){const offered=getExperimentalsForModule(module.Item);throw new TypeError(`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is not offered experimental effect "${truncate(wantedExperimental)}"; it takes ${offered.length>0?offered.join(", "):"no experimental effect"}`)}const stats=this.#engineeringBaseStats(module)??fittedStats;const base=baseStats(stats);const canonical=primitiveEngineeringInputsFor(stats,grade,experimental);const missing=missingBaseLabels(stats,base,canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){throw new TypeError(`ShipLoadout.applyBlueprint: cannot compute ${named} for module "${truncate(module.Item)}"; missing base stats for ${missing.join(", ")}`)}const damageDistribution=experimental?.damageDistribution??grade.damageDistribution;const primitiveModifiers=computeModifiers(base,canonical.grade,quality,canonical.experimental);const modifiers=journalModifiersFor(stats,primitiveModifiers);if(damageDistribution){for(const type of["kinetic","thermal","explosive","absolute"]){const value=damageDistribution[type];if(value===void 0)continue;const label=labelsForDamageType(type)[0];if(label===void 0)continue;const damageModifier={Label:label,Value:value*scaleForLabel(label),OriginalValue:(stats.damageDistribution?.[type]??0)*scaleForLabel(label)};modifiers.push(damageModifier);primitiveModifiers.push(damageModifier)}}const engineering={BlueprintName:blueprintSymbol,Level:wantedGrade,Quality:quality,...wantedExperimental!==void 0?{ExperimentalEffect:wantedExperimental}:{},Modifiers:modifiers};this.#replaceModule(module.Slot,{...module,Engineering:engineering},stats,primitiveModifiers);return this}setExperimentalEffect(slotKey,experimental){if(experimental!==null){requireString(experimental,"ShipLoadout.setExperimentalEffect: experimental")}const wanted=experimental;const module=this.#fittedModuleFor(slotKey);if(!module)return experimentalEffectUnsupported("emptySlot",{slot:slotKey});const stats=this.#statsFor(module);if(!stats){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const engineering=module.Engineering;if(!engineering){return experimentalEffectUnsupported("notEngineered",{slot:module.Slot,symbol:module.Item})}if(stats.engineeringLocked){return experimentalEffectUnsupported("finalArticle",{slot:module.Slot,symbol:module.Item})}const previous=engineering.ExperimentalEffect??null;if(previous===null&&wanted===null||previous!==null&&wanted!==null&&previous.trim().toLowerCase()===wanted.trim().toLowerCase()){return deepFreeze({kind:"unchanged",experimentalEffectSymbol:previous})}const variant=preEngineeredVariantFor(module);let effect;if(wanted!==null){effect=getExperimentalEffect(wanted);if(!effect){return experimentalEffectUnsupported("unknownExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:wanted})}const restoresBakedEffect=variant?.experimentalEffectSymbol!==void 0&&variant.experimentalEffectSymbol.trim().toLowerCase()===wanted.trim().toLowerCase();if(!experimentalAvailableFor(module.Item,wanted)&&!restoresBakedEffect){return experimentalEffectUnsupported("unsupportedExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:wanted})}}if(variant&&variant.acquisition!=="mercenary"){const stock=this.#engineeringBaseStats(module);if(!stock){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const missing=missingBaseLabels(stock,baseStats(stock),[],effect?.modifiers);if(missing.length>0){return experimentalEffectUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}const{experimentalEffectSymbol:originalEffect,...withoutEffect}=variant;const adjusted=wanted===null?withoutEffect:{...withoutEffect,experimentalEffectSymbol:wanted};const resolved=getPreEngineeredStats(withoutEffect);if(!resolved){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const replacement={BlueprintName:engineering.BlueprintName,Level:engineering.Level,Quality:engineering.Quality,...wanted===null?{}:{ExperimentalEffect:wanted},Modifiers:getPreEngineeredJournalModifiers(adjusted)};this.#replaceModule(module.Slot,{...module,Engineering:replacement},cloneModuleStats(resolved),getPreEngineeredModifiers(adjusted))}else{const blueprint=engineering.BlueprintName;const grade=engineering.Level;const quality=engineering.Quality;if(typeof blueprint!=="string"||!Number.isInteger(grade)||grade<1||grade>5){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const currentEffect=previous===null?void 0:getExperimentalEffect(previous)??null;if(ordinaryEngineeringProof(module.Item,engineering,currentEffect)==="unproven"){return experimentalEffectUnsupported("unidentifiedPreEngineeredVariant",{slot:module.Slot,symbol:module.Item,blueprint:blueprint})}const recipe=resolveBlueprintForModule(module.Item,blueprint);const blueprintGrade=getBlueprintGrade(recipe,grade);if(!blueprintGrade||!blueprintAvailableFor(module.Item,blueprint)||!Number.isFinite(quality)||quality<0||quality>1){return experimentalEffectUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item,blueprint:blueprint,grade:grade})}const base=this.#engineeringBaseStats(module)??stats;const canonical=primitiveEngineeringInputsFor(base,blueprintGrade,effect);const missing=missingBaseLabels(base,baseStats(base),canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){return experimentalEffectUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}this.applyBlueprint(module.Slot,blueprint,{grade:grade,quality:quality,...wanted===null?{}:{experimentalEffectSymbol:wanted}})}return deepFreeze({kind:"updated",previousExperimentalEffectSymbol:previous,experimentalEffectSymbol:wanted})}completeEngineeringGrade(slotKey){const module=this.#fittedModuleFor(slotKey);if(!module)return engineeringNormalizationUnsupported("emptySlot",{slot:slotKey});const stats=this.#statsFor(module);if(!stats){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const engineering=module.Engineering;if(!engineering){return engineeringNormalizationUnsupported("notEngineered",{slot:module.Slot,symbol:module.Item})}if(stats.engineeringLocked){return engineeringNormalizationUnsupported("finalArticle",{slot:module.Slot,symbol:module.Item})}if(engineering.Quality===1&&engineering.Modifiers!==void 0){return deepFreeze({kind:"unchanged"})}const previousQuality=engineering.Quality;if(!Number.isFinite(previousQuality)||previousQuality<0||previousQuality>1){return engineeringNormalizationUnsupported("invalidQuality",{slot:module.Slot,symbol:module.Item})}const experimental=engineering.ExperimentalEffect??null;const effect=experimental===null?void 0:getExperimentalEffect(experimental)??void 0;if(experimental!==null&&!effect){return engineeringNormalizationUnsupported("unknownExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:experimental})}const blueprint=engineering.BlueprintName;const grade=engineering.Level;if(typeof blueprint!=="string"||!Number.isInteger(grade)||grade<1||grade>5){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const variant=preEngineeredVariantFor(module);const restoresBakedEffect=variant?.experimentalEffectSymbol!==void 0&&variant.experimentalEffectSymbol.trim().toLowerCase()===experimental?.trim().toLowerCase();if(experimental!==null&&!experimentalAvailableFor(module.Item,experimental)&&!restoresBakedEffect){return engineeringNormalizationUnsupported("unsupportedExperimentalEffect",{slot:module.Slot,symbol:module.Item,experimental:experimental})}if(variant&&variant.acquisition!=="mercenary"){const stock=this.#engineeringBaseStats(module);if(!stock){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const missing=missingBaseLabels(stock,baseStats(stock),[],effect?.modifiers);if(missing.length>0){return engineeringNormalizationUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}const{experimentalEffectSymbol:originalEffect,...withoutEffect}=variant;const adjusted=experimental===null?withoutEffect:{...withoutEffect,experimentalEffectSymbol:experimental};const resolved=getPreEngineeredStats(withoutEffect);if(!resolved){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item})}const replacement={BlueprintName:engineering.BlueprintName,Level:engineering.Level,Quality:1,...experimental===null?{}:{ExperimentalEffect:experimental},Modifiers:getPreEngineeredJournalModifiers(adjusted)};this.#replaceModule(module.Slot,{...module,Engineering:replacement},cloneModuleStats(resolved),getPreEngineeredModifiers(adjusted))}else{const proof=ordinaryEngineeringProof(module.Item,engineering,effect);if(proof==="unproven"||proof==="proven"&&!blueprintAvailableFor(module.Item,blueprint)){return engineeringNormalizationUnsupported("unidentifiedPreEngineeredVariant",{slot:module.Slot,symbol:module.Item,blueprint:blueprint})}const recipe=resolveBlueprintForModule(module.Item,blueprint);const blueprintGrade=getBlueprintGrade(recipe,grade);if(!blueprintGrade||!blueprintAvailableFor(module.Item,blueprint)){return engineeringNormalizationUnsupported("unsupportedEngineering",{slot:module.Slot,symbol:module.Item,blueprint:blueprint,grade:grade})}const base=this.#engineeringBaseStats(module)??stats;const canonical=primitiveEngineeringInputsFor(base,blueprintGrade,effect);const missing=missingBaseLabels(base,baseStats(base),canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){return engineeringNormalizationUnsupported("unresolvedModifiers",{slot:module.Slot,symbol:module.Item,labels:missing})}this.applyBlueprint(module.Slot,blueprint,{grade:grade,quality:1,...experimental===null?{}:{experimentalEffectSymbol:experimental}})}return deepFreeze({kind:"normalized",previousQuality:previousQuality,quality:1})}setPreEngineeredVariant(slotKey,variant){if(variant===null||typeof variant!=="object"){throw new TypeError(`ShipLoadout.setPreEngineeredVariant: variant must be a pre-engineered variant, received ${describeValue(variant)}`)}requireString(variant.symbol,"ShipLoadout.setPreEngineeredVariant: variant.symbol");requireString(variant.blueprintSymbol,"ShipLoadout.setPreEngineeredVariant: variant.blueprintSymbol");requireString(variant.acquisition,"ShipLoadout.setPreEngineeredVariant: variant.acquisition");requireStringIfPresent(variant.experimentalEffectSymbol,"ShipLoadout.setPreEngineeredVariant: variant.experimentalEffectSymbol");const known=getPreEngineeredVariants(variant.symbol).find(candidate=>candidate.blueprintSymbol.toLowerCase()===variant.blueprintSymbol.toLowerCase()&&candidate.grade===variant.grade&&(candidate.experimentalEffectSymbol?.toLowerCase()??"")===(variant.experimentalEffectSymbol?.toLowerCase()??"")&&candidate.acquisition===variant.acquisition);if(!known){throw new RangeError(`ShipLoadout.setPreEngineeredVariant: no catalogued variant "${truncate(variant.blueprintSymbol)}" for module "${truncate(variant.symbol)}"`)}const stats=getPreEngineeredStats(known);const unresolved=unresolvedModifiers(known);if(unresolved.length>0){throw new TypeError(`ShipLoadout.setPreEngineeredVariant: cannot resolve "${truncate(variant.blueprintSymbol)}" for module "${truncate(variant.symbol)}"; missing base stats for ${unresolved.join(", ")}`)}this.setModule(slotKey,stats);const module=this.#fittedModuleFor(slotKey);const engineering={BlueprintName:known.blueprintSymbol,Level:known.grade,Quality:1,...known.experimentalEffectSymbol===void 0?{}:{ExperimentalEffect:known.experimentalEffectSymbol},...known.modifiers?.length?{Modifiers:getPreEngineeredJournalModifiers(known)}:{}};this.#replaceModule(module.Slot,{...module,Engineering:engineering},cloneModuleStats(stats),getPreEngineeredModifiers(known));return this}clearEngineering(slotKey){const module=this.#fittedModuleFor(slotKey);if(module&&this.#statsFor(module)?.engineeringLocked){throw new TypeError(`ShipLoadout.clearEngineering: module "${truncate(module.Item)}" is a final pre-engineered article and its engineering cannot be removed`)}if(module?.Engineering){const baseStats2=this.#engineeringBaseStats(module);const bare={Slot:module.Slot,Item:module.Item};if(module.On!==void 0)bare.On=module.On;if(module.Priority!==void 0){bare.Priority=module.Priority}if(module.Health!==void 0)bare.Health=module.Health;if(module.Value!==void 0)bare.Value=module.Value;this.#replaceModule(module.Slot,bare,baseStats2??void 0)}return this}setModuleEnabled(slotKey,on){this.#patchModule(slotKey,{On:on});return this}setModulePriority(slotKey,priority){if(!Number.isInteger(priority)||priority<0||priority>4){throw new RangeError(`ShipLoadout: power priority must be an integer 0-4, got ${truncate(priority)}`)}this.#patchModule(slotKey,{Priority:priority});return this}#patchModule(slotKey,patch){const module=this.#fittedModuleFor(slotKey);if(!module){throw new RangeError(`ShipLoadout: slot "${truncate(slotKey)}" is empty`)}this.#modules.set(module.Slot,cloneLoadoutModule({...module,...patch}));this.#slotCache.clear()}toLoadoutEvent(options={}){const unladenMass=this.#computedUnladenMass();const cargoCapacity=this.#computedCargoCapacity();const fuel=this.#computedFuelCapacity();const maxJumpRange=this.#exportableJumpRange(unladenMass);return exportLoadoutEvent({shipSymbol:this.#shipSymbol,...this.#top.ShipName===void 0?{}:{shipName:this.#top.ShipName},...this.#top.ShipIdent===void 0?{}:{shipIdent:this.#top.ShipIdent},modules:this.#modules,layout:this.#layout(),sourcePurchase:this.#sourcePurchase,retailHullValue:this.#ship.hullCost,unladenMass:unladenMass,cargoCapacity:cargoCapacity,fuelCapacity:fuel,maxJumpRange:maxJumpRange,sourceTotalsVoided:this.#importOutcomes.some(outcome=>outcome.sourceSymbol===null&&parseSlotName(outcome.slot)?.kind==="core"),statsFor:module=>this.#statsFor(module)},options)}toSlef(options){return toSlef(this.toLoadoutEvent(options),options.header)}toSlefString(options){return stringifySlef(this.toSlef(options),{indent:options.indent??0})}#exportableJumpRange(unladenMass){let drive;try{drive=this.#resolveDrive()}catch{return null}if(drive===null)return null;const tank=this.#computedFuelCapacity();return singleJumpRange(unladenMass,Math.min(tank.main,drive.maxFuel),drive)}#layout(){if(this.#layoutCache===void 0){this.#layoutCache=Object.freeze(enumerateSlots(this.#ship))}return this.#layoutCache}#requireSlot(slotKey){const wanted=normalizeKey(slotKey,SLOT_KEY);const slot=this.#layout().find(s=>normalizeKey(s.key,CATALOGUE_KEY)===wanted);if(!slot){throw new RangeError(`ShipLoadout: hull "${truncate(this.#shipSymbol)}" has no slot "${truncate(slotKey)}"`)}return slot}#fittedKey(slotKey){return matchingKeyIn(this.#modules,normalizeKey(slotKey,SLOT_KEY))}#fittedModuleFor(slotKey){const key=this.#fittedKey(slotKey);return key===null?void 0:this.#modules.get(key)}#calculationModules(){return[...this.#modules.values()].map(module=>({mass:this.#moduleMass(module),cargoCapacity:this.#moduleCapacity(module,"CargoCapacity","cargoCapacity"),fuelCapacity:this.#moduleCapacity(module,"FuelCapacity","fuelCapacity")}))}#moduleLimits(){const entries=[...this.#modules.values()].flatMap(module=>{const stats=this.#statsFor(module);return stats===null?[]:[stats]});return calculateModuleLimits(entries)}#moduleStatsAt(slotKey){const fitted=this.#fittedModuleFor(slotKey);return fitted===void 0?null:this.#statsFor(fitted)}#engineeringBaseStats(module){const fitted=this.#statsFor(module);if(!module.Engineering||preEngineeredVariantFor(module)===null)return fitted;const stock=builtInModuleBySymbol(module.Item,FITTED_ITEM);if(!stock)return fitted;return fitted?.engineeringLocked?cloneModuleStats({...stock,engineeringLocked:true}):stock}#moduleForEffectiveStats(module){const modifiers=this.#primitiveModifiers.get(module.Slot);if(modifiers===void 0||module.Engineering===void 0)return module;return{...module,Engineering:{...module.Engineering,Modifiers:modifiers}}}#modulesForEffectiveStats(){return[...this.#modules.values()].map(module=>this.#moduleForEffectiveStats(module))}#moduleLimitRegression(slotKey,replacement,current=this.#moduleLimits(),previous=this.#moduleStatsAt(slotKey)){if(previous?.limitGroup===void 0&&previous?.limitIncrease===void 0&&replacement?.limitGroup===void 0&&replacement?.limitIncrease===void 0){return null}for(const usage of current){const count=usage.count-Number(previous?.limitGroup===usage.group)+Number(replacement?.limitGroup===usage.group);const increase=usage.increase-(previous?.limitIncrease?.group===usage.group?previous.limitIncrease.amount:0)+(replacement?.limitIncrease?.group===usage.group?replacement.limitIncrease.amount:0);const limit=usage.baseLimit+increase;const excess=Math.max(0,count-limit);if(excess>usage.excess){return{...usage,increase:increase,limit:limit,count:count,excess:excess}}}return null}#replaceModule(slotKey,replacement,replacementStats,primitiveModifiers){const previous=this.#modules.get(slotKey)??null;this.#adjustImportedFigures(previous,replacement,replacementStats);if(replacement===null){this.#modules.delete(slotKey);this.#moduleStats.delete(slotKey);this.#primitiveModifiers.delete(slotKey)}else{this.#modules.set(slotKey,cloneLoadoutModule(replacement));if(replacementStats!==void 0)this.#moduleStats.set(slotKey,replacementStats);if(primitiveModifiers===void 0)this.#primitiveModifiers.delete(slotKey);else this.#primitiveModifiers.set(slotKey,primitiveModifiers)}this.#slotCache.clear()}#adjustImportedFigures(previous,next,nextStats){if(this.#top.UnladenMass!==void 0){this.#top.UnladenMass+=this.#moduleMass(next,nextStats)-this.#moduleMass(previous)}if(this.#top.CargoCapacity!==void 0){this.#top.CargoCapacity+=this.#moduleCapacity(next,"CargoCapacity","cargoCapacity",nextStats)-this.#moduleCapacity(previous,"CargoCapacity","cargoCapacity")}if(this.#top.FuelCapacity?.Main!==void 0){const reserve=this.#top.FuelCapacity.Reserve;this.#top.FuelCapacity={Main:this.#top.FuelCapacity.Main+this.#moduleCapacity(next,"FuelCapacity","fuelCapacity",nextStats)-this.#moduleCapacity(previous,"FuelCapacity","fuelCapacity"),...reserve===void 0?{}:{Reserve:reserve}}}if(normalizeKey(previous?.Item,FITTED_ITEM)===normalizeKey(next?.Item,FITTED_ITEM)){return}if(previous!==null&&isCargoHatchSlot(previous.Slot)||next!==null&&isCargoHatchSlot(next.Slot)){return}delete this.#top.ModulesValue;delete this.#top.Rebuy}#moduleMass(module,statsOverride){if(module===null)return 0;if(isCargoHatchSlot(module.Slot))return 0;const modified=getLoadoutModifier(module,"Mass");if(modified!==null)return modified;return(statsOverride??this.#statsFor(module))?.mass??0}#moduleCapacity(module,modifierLabel,field,statsOverride){if(module===null)return 0;if(isCargoHatchSlot(module.Slot))return 0;const modified=getLoadoutModifier(module,modifierLabel);if(modified!==null)return modified;return(statsOverride??this.#statsFor(module))?.[field]??0}#frameShiftDrive(){for(const m of this.#modules.values()){const stats=this.#statsFor(m);if(stats?.slot==="frameShiftDrive")return{module:m,stats:stats}}return void 0}#resolveDrive(){const fsd=this.#frameShiftDrive();if(!fsd)return null;const{module:fsdModule,stats:base}=fsd;if(base.fuelMul===void 0||base.fuelPower===void 0){throw new TypeError(`ShipLoadout: the fitted record for frame shift drive "${truncate(fsdModule.Item)}" has no jump constants`)}const optMass=getLoadoutModifier(fsdModule,"FSDOptimalMass")??base.optMass;const maxFuel=getLoadoutModifier(fsdModule,"MaxFuelPerJump")??base.maxFuel;if(optMass===void 0||maxFuel===void 0){const missing=[...optMass===void 0?["optMass"]:[],...maxFuel===void 0?["maxFuel"]:[]];throw new TypeError(`ShipLoadout: the fitted record for frame shift drive "${truncate(fsdModule.Item)}" has no ${missing.join(" or ")}`)}return{optMass:optMass,maxFuel:maxFuel,fuelMul:base.fuelMul,fuelPower:base.fuelPower,jumpBoost:this.#resolveJumpBoost()}}#resolveJumpBoost(){for(const m of this.#modules.values()){const stats=this.#statsFor(m);if(stats?.engineeringGroup!=="fsdBoosters"&&(stats?.jumpBoost===void 0||stats.jumpBoost===0)){continue}if(m.On===false)continue;if(stats?.jumpBoost===void 0){throw new TypeError(`ShipLoadout: the fitted record for FSD booster "${truncate(m.Item)}" has no jumpBoost`)}return stats.jumpBoost}return 0}#statsFor(module){if(module===null)return null;const stats=this.#moduleStats.get(module.Slot)??builtInModuleBySymbol(module.Item,FITTED_ITEM);if(stats)return stats;return isBuiltInHullModule(module)?builtInModuleBySymbol("ModularCargoBayDoor","ShipLoadout: built-in module"):null}};export{LoadoutEditError,ShipLoadout};//# sourceMappingURL=chunk-SG6YLUQ4.js.map