@elite-dangerous-almanac/core 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/PROVENANCE/i18n/SOURCES.md +2 -2
  2. package/PROVENANCE/ships/SOURCES.md +11 -9
  3. package/README.md +54 -40
  4. package/dist/astro/galaxy-grid.js +1 -1
  5. package/dist/astro/index.d.ts +1 -1
  6. package/dist/astro/index.js +1 -1
  7. package/dist/astro/naming-region-origins.d.ts +1 -1
  8. package/dist/astro/naming-region-origins.js +1 -1
  9. package/dist/astro/nebulae.d.ts +2 -2
  10. package/dist/astro/permit-locks.d.ts +2 -1
  11. package/dist/astro/permit-locks.js +1 -1
  12. package/dist/astro/procedural-system.d.ts +2 -1
  13. package/dist/astro/procedural-system.js +1 -1
  14. package/dist/astro/sector-name.d.ts +2 -1
  15. package/dist/astro/sector-name.js +1 -1
  16. package/dist/astro/system-address.d.ts +1 -1
  17. package/dist/astro/system-name.d.ts +14 -9
  18. package/dist/astro/system-name.js +1 -1
  19. package/dist/chunk-2W5MW376.js +1 -0
  20. package/dist/chunk-2W5MW376.js.map +1 -0
  21. package/dist/{chunk-VZZUNSDF.js → chunk-4KJ7CR74.js} +1 -1
  22. package/dist/{chunk-VZZUNSDF.js.map → chunk-4KJ7CR74.js.map} +1 -1
  23. package/dist/{chunk-6EUVIZAS.js → chunk-4QYTVSNR.js} +1 -1
  24. package/dist/{chunk-EKQCVCMK.js → chunk-5ZVYRX6Z.js} +1 -1
  25. package/dist/{chunk-EKQCVCMK.js.map → chunk-5ZVYRX6Z.js.map} +1 -1
  26. package/dist/chunk-6GJHUWMO.js +1 -0
  27. package/dist/chunk-6GJHUWMO.js.map +1 -0
  28. package/dist/chunk-6L56LWTT.js +1 -0
  29. package/dist/chunk-6L56LWTT.js.map +1 -0
  30. package/dist/{chunk-GQ5GX5TB.js → chunk-6O4NRRSB.js} +1 -1
  31. package/dist/chunk-6O4NRRSB.js.map +1 -0
  32. package/dist/{chunk-WNGQ3IAM.js → chunk-6UNAD74Z.js} +1 -1
  33. package/dist/{chunk-WNGQ3IAM.js.map → chunk-6UNAD74Z.js.map} +1 -1
  34. package/dist/{chunk-JPBMRJFC.js → chunk-77I24V6B.js} +1 -1
  35. package/dist/chunk-77I24V6B.js.map +1 -0
  36. package/dist/chunk-7ATBEOVC.js +1 -0
  37. package/dist/chunk-7ATBEOVC.js.map +1 -0
  38. package/dist/chunk-7TQ2X6Q3.js +1 -0
  39. package/dist/chunk-7TQ2X6Q3.js.map +1 -0
  40. package/dist/{chunk-6EPYVBAX.js → chunk-A6OINYNP.js} +1 -1
  41. package/dist/{chunk-Q3QCLNVG.js → chunk-AYAKU4YA.js} +1 -1
  42. package/dist/chunk-AYAKU4YA.js.map +1 -0
  43. package/dist/chunk-B7EYTZRK.js +1 -0
  44. package/dist/chunk-B7EYTZRK.js.map +1 -0
  45. package/dist/{chunk-EBAHNZ36.js → chunk-CIULJH3G.js} +1 -1
  46. package/dist/{chunk-EBAHNZ36.js.map → chunk-CIULJH3G.js.map} +1 -1
  47. package/dist/{chunk-SNADUQSJ.js → chunk-CJK2IBI2.js} +1 -1
  48. package/dist/{chunk-SNADUQSJ.js.map → chunk-CJK2IBI2.js.map} +1 -1
  49. package/dist/{chunk-DYPOL3CI.js → chunk-CJQ37JII.js} +1 -1
  50. package/dist/chunk-CJQ37JII.js.map +1 -0
  51. package/dist/chunk-D6YEHR5S.js +1 -0
  52. package/dist/chunk-D6YEHR5S.js.map +1 -0
  53. package/dist/{chunk-Z6XMXMVI.js → chunk-DBDCOHI4.js} +1 -1
  54. package/dist/chunk-DBDCOHI4.js.map +1 -0
  55. package/dist/{chunk-AFVYCQWL.js → chunk-DCB4COCL.js} +1 -1
  56. package/dist/{chunk-AFVYCQWL.js.map → chunk-DCB4COCL.js.map} +1 -1
  57. package/dist/{chunk-CJWFY6OX.js → chunk-DSMLYA2M.js} +1 -1
  58. package/dist/{chunk-CJWFY6OX.js.map → chunk-DSMLYA2M.js.map} +1 -1
  59. package/dist/{chunk-UXBCLFGU.js → chunk-DWRNXUAX.js} +1 -1
  60. package/dist/{chunk-UXBCLFGU.js.map → chunk-DWRNXUAX.js.map} +1 -1
  61. package/dist/chunk-EVW4Z4CB.js +1 -0
  62. package/dist/chunk-EVW4Z4CB.js.map +1 -0
  63. package/dist/{chunk-4S6WB7QR.js → chunk-FF2X4K5P.js} +1 -1
  64. package/dist/chunk-FF2X4K5P.js.map +1 -0
  65. package/dist/chunk-FYVPZBXN.js +1 -0
  66. package/dist/chunk-FYVPZBXN.js.map +1 -0
  67. package/dist/{chunk-QTZPA2FR.js → chunk-GLWPSVFV.js} +1 -1
  68. package/dist/chunk-GLWPSVFV.js.map +1 -0
  69. package/dist/chunk-GZYPQIO2.js +1 -0
  70. package/dist/chunk-GZYPQIO2.js.map +1 -0
  71. package/dist/chunk-H47K3UWG.js +1 -0
  72. package/dist/chunk-H47K3UWG.js.map +1 -0
  73. package/dist/chunk-JGOAQLYW.js +1 -0
  74. package/dist/chunk-JGOAQLYW.js.map +1 -0
  75. package/dist/{chunk-JWWYAMGD.js → chunk-MGRDB2BZ.js} +1 -1
  76. package/dist/{chunk-JWWYAMGD.js.map → chunk-MGRDB2BZ.js.map} +1 -1
  77. package/dist/{chunk-MKGJPVPS.js → chunk-MRTTQYT5.js} +1 -1
  78. package/dist/{chunk-MKGJPVPS.js.map → chunk-MRTTQYT5.js.map} +1 -1
  79. package/dist/chunk-MTJ4MS7W.js +1 -0
  80. package/dist/chunk-MTJ4MS7W.js.map +1 -0
  81. package/dist/chunk-NIURLW2F.js +1 -0
  82. package/dist/chunk-NIURLW2F.js.map +1 -0
  83. package/dist/chunk-OLKNYGGT.js +1 -0
  84. package/dist/chunk-OLKNYGGT.js.map +1 -0
  85. package/dist/chunk-OYFMHDYT.js +1 -0
  86. package/dist/chunk-OYFMHDYT.js.map +1 -0
  87. package/dist/chunk-OYR5HUQZ.js +1 -0
  88. package/dist/chunk-OYR5HUQZ.js.map +1 -0
  89. package/dist/chunk-PL75RTA2.js +1 -0
  90. package/dist/{chunk-2VPVZELZ.js.map → chunk-PL75RTA2.js.map} +1 -1
  91. package/dist/chunk-PY5L6WC5.js +1 -0
  92. package/dist/chunk-PY5L6WC5.js.map +1 -0
  93. package/dist/{chunk-W6EPHHTS.js → chunk-Q2L75GSI.js} +1 -1
  94. package/dist/chunk-Q2L75GSI.js.map +1 -0
  95. package/dist/chunk-QJ7GB6FF.js +1 -0
  96. package/dist/chunk-QJ7GB6FF.js.map +1 -0
  97. package/dist/chunk-QTAMQ6ME.js +1 -0
  98. package/dist/chunk-QTAMQ6ME.js.map +1 -0
  99. package/dist/{chunk-FMPRCYKY.js → chunk-RRYBSAPX.js} +1 -1
  100. package/dist/chunk-RRYBSAPX.js.map +1 -0
  101. package/dist/{chunk-J42ZXLBL.js → chunk-T62GO4AA.js} +1 -1
  102. package/dist/chunk-T62GO4AA.js.map +1 -0
  103. package/dist/{chunk-E3BRVGJJ.js → chunk-TBZJIQ5P.js} +1 -1
  104. package/dist/{chunk-E3BRVGJJ.js.map → chunk-TBZJIQ5P.js.map} +1 -1
  105. package/dist/chunk-V3AEUBHV.js +1 -0
  106. package/dist/chunk-V3AEUBHV.js.map +1 -0
  107. package/dist/chunk-VYDQHPY2.js +1 -0
  108. package/dist/chunk-VYDQHPY2.js.map +1 -0
  109. package/dist/chunk-XUHAPOM6.js +1 -0
  110. package/dist/chunk-XUHAPOM6.js.map +1 -0
  111. package/dist/chunk-Y6KJJMIM.js +1 -0
  112. package/dist/chunk-Y6KJJMIM.js.map +1 -0
  113. package/dist/chunk-YXPZ7QQB.js +1 -0
  114. package/dist/chunk-YXPZ7QQB.js.map +1 -0
  115. package/dist/{chunk-Y6UZWNP4.js → chunk-ZCEAPJDH.js} +1 -1
  116. package/dist/{chunk-Y6UZWNP4.js.map → chunk-ZCEAPJDH.js.map} +1 -1
  117. package/dist/commodities/commodities.d.ts +20 -10
  118. package/dist/commodities/commodities.js +1 -1
  119. package/dist/commodities/index.d.ts +15 -4
  120. package/dist/commodities/index.js +1 -1
  121. package/dist/equipment/index.js +1 -1
  122. package/dist/equipment/modification-costs.d.ts +2 -1
  123. package/dist/equipment/modification-costs.js.map +1 -1
  124. package/dist/equipment/modification-journal.js +1 -1
  125. package/dist/equipment/modifications.d.ts +2 -1
  126. package/dist/equipment/modifications.js +1 -1
  127. package/dist/equipment/suits.d.ts +6 -3
  128. package/dist/equipment/suits.js +1 -1
  129. package/dist/equipment/upgrade-costs.d.ts +8 -4
  130. package/dist/equipment/upgrade-costs.js +1 -1
  131. package/dist/equipment/upgrade-costs.js.map +1 -1
  132. package/dist/equipment/weapons.d.ts +13 -5
  133. package/dist/equipment/weapons.js +1 -1
  134. package/dist/i18n/blueprints.d.ts +6 -6
  135. package/dist/i18n/blueprints.js +1 -1
  136. package/dist/i18n/diagnostics.d.ts +1 -13
  137. package/dist/i18n/engineering-groups.d.ts +1 -0
  138. package/dist/i18n/engineering-groups.js +1 -1
  139. package/dist/i18n/experimental-effect-descriptions.d.ts +4 -3
  140. package/dist/i18n/experimental-effect-descriptions.js +1 -1
  141. package/dist/i18n/experimental-effects.d.ts +5 -4
  142. package/dist/i18n/experimental-effects.js +1 -1
  143. package/dist/i18n/index.d.ts +1 -13
  144. package/dist/i18n/index.js +1 -1
  145. package/dist/i18n/pre-engineered.d.ts +7 -6
  146. package/dist/i18n/pre-engineered.js +1 -1
  147. package/dist/materials/index.d.ts +16 -4
  148. package/dist/materials/index.js +1 -1
  149. package/dist/materials/materials.d.ts +36 -19
  150. package/dist/materials/materials.js +1 -1
  151. package/dist/materials/micro-resources.d.ts +18 -7
  152. package/dist/materials/micro-resources.js +1 -1
  153. package/dist/ships/armour.d.ts +20 -4
  154. package/dist/ships/armour.js +1 -1
  155. package/dist/ships/blueprint-costs.d.ts +20 -17
  156. package/dist/ships/blueprint-costs.js +1 -1
  157. package/dist/ships/blueprint-journal.d.ts +9 -8
  158. package/dist/ships/blueprint-journal.js +1 -1
  159. package/dist/ships/blueprints.d.ts +14 -12
  160. package/dist/ships/blueprints.js +1 -1
  161. package/dist/ships/build-metrics.d.ts +1061 -0
  162. package/dist/ships/build-metrics.js +1 -0
  163. package/dist/ships/build-metrics.js.map +1 -0
  164. package/dist/ships/distributor.d.ts +10 -3
  165. package/dist/ships/distributor.js +1 -1
  166. package/dist/ships/engineering-options.d.ts +8 -6
  167. package/dist/ships/engineering-options.js +1 -1
  168. package/dist/ships/engineering.d.ts +2 -16
  169. package/dist/ships/engineering.js +1 -1
  170. package/dist/ships/experimental-effect-costs.d.ts +5 -5
  171. package/dist/ships/experimental-effect-costs.js +1 -1
  172. package/dist/ships/experimental-effects.d.ts +9 -8
  173. package/dist/ships/experimental-effects.js +1 -1
  174. package/dist/ships/heat.d.ts +7 -2
  175. package/dist/ships/heat.js +1 -1
  176. package/dist/ships/index.d.ts +34 -22
  177. package/dist/ships/index.js +1 -1
  178. package/dist/ships/jump-range.d.ts +10 -3
  179. package/dist/ships/jump-range.js +1 -1
  180. package/dist/ships/loadout-calculations.d.ts +1 -1
  181. package/dist/ships/loadout-calculations.js +1 -1
  182. package/dist/ships/mobility-capacitor.d.ts +90 -0
  183. package/dist/ships/mobility-capacitor.js +1 -0
  184. package/dist/ships/mobility-capacitor.js.map +1 -0
  185. package/dist/ships/mobility.d.ts +29 -17
  186. package/dist/ships/mobility.js +1 -1
  187. package/dist/ships/power.d.ts +12 -5
  188. package/dist/ships/power.js +1 -1
  189. package/dist/ships/pre-engineered-stats.d.ts +10 -8
  190. package/dist/ships/pre-engineered-stats.js +1 -1
  191. package/dist/ships/pre-engineered.d.ts +6 -6
  192. package/dist/ships/pre-engineered.js +1 -1
  193. package/dist/ships/resistances.d.ts +2 -2
  194. package/dist/ships/resistances.js +1 -1
  195. package/dist/ships/shield-capacitor.d.ts +133 -0
  196. package/dist/ships/shield-capacitor.js +1 -0
  197. package/dist/ships/shield-capacitor.js.map +1 -0
  198. package/dist/ships/shield-recovery.d.ts +16 -2
  199. package/dist/ships/shield-recovery.js +1 -1
  200. package/dist/ships/shields.d.ts +86 -28
  201. package/dist/ships/shields.js +1 -1
  202. package/dist/ships/ship-loadout.d.ts +91 -797
  203. package/dist/ships/ship-loadout.js +1 -1
  204. package/dist/ships/ships.d.ts +7 -6
  205. package/dist/ships/ships.js +1 -1
  206. package/dist/ships/slef.d.ts +1 -1
  207. package/dist/ships/source-purchase.d.ts +2 -1
  208. package/dist/ships/source-purchase.js +1 -1
  209. package/dist/ships/weapons-capacitor.d.ts +10 -3
  210. package/dist/ships/weapons-capacitor.js +1 -1
  211. package/dist/ships/weapons.d.ts +22 -6
  212. package/dist/ships/weapons.js +1 -1
  213. package/dist/{system-address-DYsN1qOT.d.ts → system-address-cyJaeZIS.d.ts} +2 -1
  214. package/package.json +17 -2
  215. package/dist/chunk-2FHHMYDC.js +0 -1
  216. package/dist/chunk-2FHHMYDC.js.map +0 -1
  217. package/dist/chunk-2TW4ZBI3.js +0 -1
  218. package/dist/chunk-2TW4ZBI3.js.map +0 -1
  219. package/dist/chunk-2VPVZELZ.js +0 -1
  220. package/dist/chunk-3BM5BHI3.js +0 -1
  221. package/dist/chunk-3BM5BHI3.js.map +0 -1
  222. package/dist/chunk-4S6WB7QR.js.map +0 -1
  223. package/dist/chunk-6BO5JJNI.js +0 -1
  224. package/dist/chunk-6BO5JJNI.js.map +0 -1
  225. package/dist/chunk-CX7B67OI.js +0 -1
  226. package/dist/chunk-CX7B67OI.js.map +0 -1
  227. package/dist/chunk-DVL5RBKX.js +0 -1
  228. package/dist/chunk-DVL5RBKX.js.map +0 -1
  229. package/dist/chunk-DYPOL3CI.js.map +0 -1
  230. package/dist/chunk-FGXWVFN6.js +0 -1
  231. package/dist/chunk-FGXWVFN6.js.map +0 -1
  232. package/dist/chunk-FMPRCYKY.js.map +0 -1
  233. package/dist/chunk-G3265B27.js +0 -1
  234. package/dist/chunk-G3265B27.js.map +0 -1
  235. package/dist/chunk-GQ5GX5TB.js.map +0 -1
  236. package/dist/chunk-IOJXLDJN.js +0 -1
  237. package/dist/chunk-IOJXLDJN.js.map +0 -1
  238. package/dist/chunk-IYU4WLFM.js +0 -1
  239. package/dist/chunk-IYU4WLFM.js.map +0 -1
  240. package/dist/chunk-J42ZXLBL.js.map +0 -1
  241. package/dist/chunk-JPBMRJFC.js.map +0 -1
  242. package/dist/chunk-LJI7VXJD.js +0 -1
  243. package/dist/chunk-LJI7VXJD.js.map +0 -1
  244. package/dist/chunk-OCND33TO.js +0 -1
  245. package/dist/chunk-OCND33TO.js.map +0 -1
  246. package/dist/chunk-P2QOL63K.js +0 -1
  247. package/dist/chunk-P2QOL63K.js.map +0 -1
  248. package/dist/chunk-Q3QCLNVG.js.map +0 -1
  249. package/dist/chunk-QTZPA2FR.js.map +0 -1
  250. package/dist/chunk-RLUS76LZ.js +0 -1
  251. package/dist/chunk-RLUS76LZ.js.map +0 -1
  252. package/dist/chunk-TEOJCBSG.js +0 -1
  253. package/dist/chunk-TEOJCBSG.js.map +0 -1
  254. package/dist/chunk-TMMGS6TC.js +0 -1
  255. package/dist/chunk-TMMGS6TC.js.map +0 -1
  256. package/dist/chunk-W6EPHHTS.js.map +0 -1
  257. package/dist/chunk-Z6XMXMVI.js.map +0 -1
  258. package/dist/chunk-ZNCXENNB.js +0 -1
  259. package/dist/chunk-ZNCXENNB.js.map +0 -1
  260. /package/dist/{chunk-6EUVIZAS.js.map → chunk-4QYTVSNR.js.map} +0 -0
  261. /package/dist/{chunk-6EPYVBAX.js.map → chunk-A6OINYNP.js.map} +0 -0
@@ -0,0 +1 @@
1
+ import{getLoadoutModifier}from"./chunk-OVUHQEH5.js";import{scaleDamageComponents}from"./chunk-GZYPQIO2.js";import{weaponMetrics,combinedRateOfFire}from"./chunk-7TQ2X6Q3.js";import{shieldMetrics}from"./chunk-QTAMQ6ME.js";import{getBulkheadsForShip}from"./chunk-PA5EITW5.js";import{CORE_MODULES}from"./chunk-EVJ32UF3.js";import{getExperimentalEffect}from"./chunk-77I24V6B.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{fieldForLabel,scaleForLabel,labelsForField,capabilityValueForLabel,damageTypeForLabel}from"./chunk-CJQ37JII.js";import{parseSlotName}from"./chunk-RAO35XDF.js";import{describeValue,truncate}from"./chunk-PKWVG2JY.js";var NO_ISSUES=Object.freeze([]);function completeResult(value){return Object.freeze({value:value,complete:true,issues:NO_ISSUES})}function incompleteResult(issues){return Object.freeze({value:null,complete:false,issues:Object.freeze(issues.map(issue=>Object.freeze({...issue,...issue.params?{params:Object.freeze({...issue.params})}:{}})))})}var PREFIX={powerPlant:["int_powerplant","int_guardianpowerplant"],thrusters:["int_engine","int_mkiiagileboost_engine"],frameShiftDrive:["int_hyperdrive"],powerDistributor:["int_powerdistributor","int_guardianpowerdistributor"],shieldGenerator:["int_shieldgenerator"],shieldCellBank:["int_shieldcellbank"],shieldBooster:["hpt_shieldbooster"],shieldReinforcement:["int_guardianshieldreinforcement"],hullReinforcement:["int_hullreinforcement","int_guardianhullreinforcement","int_metaalloyhullreinforcement"],moduleReinforcement:["int_modulereinforcement","int_guardianmodulereinforcement"]};var startsWithAny=(symbol,prefixes)=>prefixes.some(prefix=>symbol.toLowerCase().startsWith(prefix));function isPowerDistributor(module,stats){return stats?.slot?stats.slot==="powerDistributor":startsWithAny(module.Item,PREFIX.powerDistributor)}function isPowerPlant(module,stats){const parsed=parseSlotName(module.Slot);if(parsed?.kind==="core"&&parsed.core==="powerPlant")return true;return stats?.slot?stats.slot==="powerPlant":startsWithAny(module.Item,PREFIX.powerPlant)}function isThruster(module,stats){const parsed=parseSlotName(module.Slot);if(parsed?.kind==="core"&&parsed.core==="thrusters")return true;return stats?.slot?stats.slot==="thrusters":startsWithAny(module.Item,PREFIX.thrusters)}function isFrameShiftDrive(module,stats){const parsed=parseSlotName(module.Slot);if(parsed?.kind==="core"&&parsed.core==="frameShiftDrive")return true;return stats?.slot?stats.slot==="frameShiftDrive":startsWithAny(module.Item,PREFIX.frameShiftDrive)}function isEnabled(module){return module.On!==false}function priorityOf(module){return(module.Priority??0)+1}function effectiveStat(module,field,stats){const stated=statedModifier(module,field);if(stated!==void 0)return stated;const base=stats?.[field];return typeof base==="number"?base:void 0}function statedModifier(module,field){for(const label of labelsForField(field)){if(capabilityValueForLabel(label)!==null)continue;const modified=getLoadoutModifier(module,label);if(modified!==null)return modified/scaleForLabel(label)}return void 0}function effectiveCapability(module,field,stats){for(const label of labelsForField(field)){if(capabilityValueForLabel(label)===null)continue;if(module.Engineering?.Modifiers?.some(modifier=>modifier.Label.toLowerCase()===label.toLowerCase())){return true}}const base=stats[field];return typeof base==="boolean"?base:void 0}function effectiveDamageDistribution(module,stats){const fromEffect=module.Engineering?.ExperimentalEffect?getExperimentalEffect(module.Engineering.ExperimentalEffect)?.damageDistribution:void 0;const distribution={...fromEffect??stats.damageDistribution};let resolved=fromEffect!==void 0||stats.damageDistribution!==void 0;const seen=/* @__PURE__ */new Set;for(const modifier of module.Engineering?.Modifiers??[]){const type=damageTypeForLabel(modifier.Label);if(type===null||seen.has(type))continue;seen.add(type);if(modifier.Value===void 0)continue;distribution[type]=modifier.Value/scaleForLabel(modifier.Label);resolved=true}return resolved?distribution:void 0}function convertsDamage(module){if(module.Engineering?.ExperimentalEffect&&getExperimentalEffect(module.Engineering.ExperimentalEffect)?.damageDistribution){return true}return(module.Engineering?.Modifiers??[]).some(modifier=>damageTypeForLabel(modifier.Label)!==null)}function modifierRatio(module,stats,field){const base=stats?.[field];if(typeof base!=="number"||base===0)return 1;const effective=effectiveStat(module,field,stats);return effective===void 0?1:effective/base}function relatedStat(module,stats,field,ratio){const stated=statedModifier(module,field);if(stated!==void 0)return stated;const base=stats?.[field];return typeof base==="number"?base*ratio:void 0}function effectiveModule(module,stats){if(!stats||!module.Engineering)return stats;const merged={...stats};const fields=new Set(Object.keys(stats));for(const modifier of module.Engineering.Modifiers??[]){const field=fieldForLabel(modifier.Label,stats);if(field)fields.add(field)}for(const key of fields){const capability=effectiveCapability(module,key,stats);if(capability!==void 0){merged[key]=capability;continue}const value=effectiveStat(module,key,stats);if(value!==void 0)merged[key]=value}if(stats.engineeringGroup==="thrusters"){const massRatio=modifierRatio(module,stats,"optMass");const minMass=relatedStat(module,stats,"minMass",massRatio);const maxMass=relatedStat(module,stats,"maxMass",massRatio);if(minMass!==void 0)merged.minMass=minMass;if(maxMass!==void 0)merged.maxMass=maxMass}if(stats.engineeringGroup==="thrusters"||stats.engineeringGroup==="shieldGenerators"){const performanceRatio=modifierRatio(module,stats,"optMultiplier");const minMultiplier=relatedStat(module,stats,"minMultiplier",performanceRatio);const maxMultiplier=relatedStat(module,stats,"maxMultiplier",performanceRatio);if(minMultiplier!==void 0)merged.minMultiplier=minMultiplier;if(maxMultiplier!==void 0)merged.maxMultiplier=maxMultiplier;if(stats.engineeringGroup==="thrusters"){for(const field of["minSpeedMultiplier","optSpeedMultiplier","maxSpeedMultiplier","minRotationMultiplier","optRotationMultiplier","maxRotationMultiplier"]){const value=stats[field];if(value!==void 0)merged[field]=value*performanceRatio}}}const damageDistribution=effectiveDamageDistribution(module,stats);if(damageDistribution)merged.damageDistribution=damageDistribution;if(stats.category==="hardpoint")normalizeEffectiveWeapon(module,merged);if(convertsDamage(module)){delete merged.damageComponents}else if(stats.damageComponents){merged.damageComponents=scaleDamageComponents(stats.damageComponents,stats.damage,typeof merged.damage==="number"?merged.damage:void 0)}return merged}function powerConsumerFor(module,stats){const draw=effectiveStat(module,"powerDraw",stats);if(draw===void 0||draw===0)return null;const mounted=stats?.category==="hardpoint"||stats?.category==="utility";return{draw:draw,priority:priorityOf(module),enabled:isEnabled(module),deployedOnly:mounted&&stats?.alwaysPowered!==true,label:module.Slot,symbol:module.Item}}function powerAvailable(modules,statsFor){for(const module of modules){const stats=statsFor(module);if(!isPowerPlant(module,stats))continue;if(!isEnabled(module))return 0;return effectiveStat(module,"powerCapacity",stats)??0}return 0}var DEFAULT_SLOT={powerCapacity:"PowerPlant",heatEfficiency:"PowerPlant",thrusters:"MainEngines",powerDistributor:"PowerDistributor"};var UNRESOLVED_FACT={thrusters:"thruster stats",shieldGenerator:"shield-generator stats",powerCapacity:"power capacity",heatEfficiency:"heat efficiency",powerDistributor:"power-distributor stats"};var NOTHING_FITTED={powerCapacity:"PowerPlant: no power plant is fitted",heatEfficiency:"PowerPlant: no power plant is fitted",thrusters:"MainEngines: no thrusters are fitted",powerDistributor:"PowerDistributor: no power distributor is fitted"};function metricIssue(field,reason,module){const defaultSlot=DEFAULT_SLOT[field];const slot=module?.Slot??defaultSlot;const symbol=module?.Item;const params={field:field,reason:reason,...slot===void 0?{}:{slot:slot},...symbol===void 0?{}:{symbol:symbol}};let message;if(reason==="missing"){message=NOTHING_FITTED[field]??"no shield generator is fitted"}else if(reason==="unresolved"){const unavailable=UNRESOLVED_FACT[field]??field;message=`${truncate(slot??field)}: ${unavailable} unavailable for ${truncate(symbol??field)}`}else if(reason==="disabled"){message=`${truncate(slot??field)}: ${truncate(symbol??field)} is switched off`}else if(reason==="invalid"){message=`${truncate(slot??field)}: ${truncate(symbol??field)} has invalid ${field}`}else{message=`${truncate(slot??field)}: ${truncate(symbol??field)} is not powered with hardpoints retracted`}return{field:field,reason:reason,...slot===void 0?{}:{slot:slot},...symbol===void 0?{}:{symbol:symbol},message:message,params:params}}function powerPlantIssueFor(modules,statsFor){for(const module of modules){const stats=statsFor(module);if(!isPowerPlant(module,stats))continue;if(!isEnabled(module))return metricIssue("powerCapacity","disabled",module);const capacity=effectiveStat(module,"powerCapacity",stats);if(capacity===void 0)return metricIssue("powerCapacity","unresolved",module);return!Number.isFinite(capacity)||capacity<=0?metricIssue("powerCapacity","invalid",module):null}return metricIssue("powerCapacity","missing")}function powerDrawIssueFor(modules,statsFor){for(const module of modules){const consumer=powerConsumerFor(module,statsFor(module));if(consumer&&(!Number.isFinite(consumer.draw)||consumer.draw<0)){return metricIssue("powerDraw","invalid",module)}}return null}function poweredMetricBudgetFor(field,module,stats,modules,getBudget,statsFor){if(!isEnabled(module))return incompleteResult([metricIssue(field,"disabled",module)]);const plantIssue=powerPlantIssueFor(modules,statsFor);if(plantIssue)return incompleteResult([plantIssue]);const drawIssue=powerDrawIssueFor(modules,statsFor);if(drawIssue)return incompleteResult([drawIssue]);const budget=getBudget();return budget.available>0&&poweredStates(module,stats,budget).retracted?completeResult(budget):incompleteResult([metricIssue(field,"shed",module)])}function poweredShieldGeneratorResultFor(modules,getBudget,statsFor){for(const module of modules){if(!startsWithAny(module.Item,PREFIX.shieldGenerator))continue;const stats=statsFor(module);const powered=poweredMetricBudgetFor("shieldGenerator",module,stats,modules,getBudget,statsFor);if(!powered.complete)return powered;return stats===null?incompleteResult([metricIssue("shieldGenerator","unresolved",module)]):completeResult({module:module,budget:powered.value})}return incompleteResult([metricIssue("shieldGenerator","missing")])}function mapResistanceFields(read){return{kineticResistance:read("kineticResistance")??0,thermalResistance:read("thermalResistance")??0,explosiveResistance:read("explosiveResistance")??0,causticResistance:read("causticResistance")??0}}function resistancesOf(module,stats){return mapResistanceFields(field=>effectiveStat(module,field,stats))}function shieldInputFor(ship,modules,budget,statsFor){let generator=null;const boosters=[];let reinforcement=0;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(!(budget.available>0&&poweredStates(module,stats,budget).retracted))continue;if(!generator&&startsWithAny(module.Item,PREFIX.shieldGenerator)){const massRatio=modifierRatio(module,stats,"optMass");const strengthRatio=modifierRatio(module,stats,"optMultiplier");const optMass=effectiveStat(module,"optMass",stats);const minMass=relatedStat(module,stats,"minMass",massRatio);const maxMass=relatedStat(module,stats,"maxMass",Math.max(1,massRatio));const optMultiplier=effectiveStat(module,"optMultiplier",stats);const minMultiplier=relatedStat(module,stats,"minMultiplier",strengthRatio);const maxMultiplier=relatedStat(module,stats,"maxMultiplier",strengthRatio);generator={...optMass===void 0?{}:{optMass:optMass},...minMass===void 0?{}:{minMass:minMass},...maxMass===void 0?{}:{maxMass:maxMass},...optMultiplier===void 0?{}:{optMultiplier:optMultiplier},...minMultiplier===void 0?{}:{minMultiplier:minMultiplier},...maxMultiplier===void 0?{}:{maxMultiplier:maxMultiplier},...resistancesOf(module,stats)}}else if(startsWithAny(module.Item,PREFIX.shieldBooster)){boosters.push({shieldBoost:effectiveStat(module,"shieldBoost",stats)??0,...resistancesOf(module,stats)})}else if(startsWithAny(module.Item,PREFIX.shieldReinforcement)){reinforcement+=effectiveStat(module,"shieldAddition",stats)??0}}return{hullMass:ship.hullMass,baseShieldStrength:ship.baseShieldStrength,generator:generator,boosters:boosters,reinforcement:reinforcement}}function shieldInputResultFor(ship,modules,getBudget,statsFor){const fitted=poweredShieldGeneratorResultFor(modules,getBudget,statsFor);if(!fitted.complete)return fitted;return completeResult(shieldInputFor(ship,modules,fitted.value.budget,statsFor))}function shieldCapacitorInputResultFor(ship,modules,getBudget,systemsPips,statsFor){const fitted=poweredShieldGeneratorResultFor(modules,getBudget,statsFor);if(!fitted.complete)return fitted;const budget=fitted.value.budget;const capacitor=systemsCapacitorResultFor(modules,budget,statsFor);if(!capacitor.complete)return capacitor;const shields=shieldMetrics(shieldInputFor(ship,modules,budget,statsFor));return completeResult({strength:shields.strength,resistances:shields.resistances,systemsCapacity:capacitor.value.systemsCapacity,systemsRecharge:capacitor.value.systemsRecharge,systemsPips:systemsPips})}function systemsCapacitorResultFor(modules,budget,statsFor){let distributor=null;for(const module of modules){const stats2=statsFor(module);if(isPowerDistributor(module,stats2)&&isEnabled(module)&&budget.available>0&&poweredStates(module,stats2,budget).retracted)distributor=module}if(!distributor)return completeResult({systemsCapacity:0,systemsRecharge:0});const stats=statsFor(distributor);const systemsCapacity=effectiveStat(distributor,"systemsCapacity",stats);const systemsRecharge=effectiveStat(distributor,"systemsRecharge",stats);return systemsCapacity===void 0||systemsRecharge===void 0?incompleteResult([metricIssue("powerDistributor","unresolved",distributor)]):completeResult({systemsCapacity:systemsCapacity,systemsRecharge:systemsRecharge})}function thrusterCurveFor(module,stats){const effective=effectiveModule(module,stats);const minMass=effective?.minMass;const optMass=effective?.optMass;const maxMass=effective?.maxMass;const minMultiplier=effective?.minMultiplier;const optMultiplier=effective?.optMultiplier;const maxMultiplier=effective?.maxMultiplier;if(minMass===void 0||optMass===void 0||maxMass===void 0||minMultiplier===void 0||optMultiplier===void 0||maxMultiplier===void 0){return null}return{minMass:minMass,optMass:optMass,maxMass:maxMass,minMultiplier:minMultiplier,optMultiplier:optMultiplier,maxMultiplier:maxMultiplier,...effective?.optSpeedMultiplier===void 0?{}:{speedCurve:{minMass:minMass,optMass:optMass,maxMass:maxMass,minMultiplier:effective.minSpeedMultiplier??minMultiplier,optMultiplier:effective.optSpeedMultiplier,maxMultiplier:effective.maxSpeedMultiplier??maxMultiplier}},...effective?.optRotationMultiplier===void 0?{}:{rotationCurve:{minMass:minMass,optMass:optMass,maxMass:maxMass,minMultiplier:effective.minRotationMultiplier??minMultiplier,optMultiplier:effective.optRotationMultiplier,maxMultiplier:effective.maxRotationMultiplier??maxMultiplier}}}}function fittedThrusterParamsFor(modules,statsFor){for(const module of modules){const stats=statsFor(module);if(isThruster(module,stats))return thrusterCurveFor(module,stats)}return null}function mobilityInputResultFor(ship,modules,getBudget,mass,statsFor){let thrusters=null;for(const module of modules){const stats=statsFor(module);if(!isThruster(module,stats))continue;const powered=poweredMetricBudgetFor("thrusters",module,stats,modules,getBudget,statsFor);if(!powered.complete)return powered;thrusters=thrusterCurveFor(module,stats);if(!thrusters)return incompleteResult([metricIssue("thrusters","unresolved",module)]);break}if(!thrusters)return incompleteResult([metricIssue("thrusters","missing")]);return completeResult({minimumSpeed:ship.minimumSpeed,maximumSpeed:ship.maximumSpeed,boost:ship.boost,minPitch:ship.minPitch,pitch:ship.pitch,minRoll:ship.minRoll,roll:ship.roll,minYaw:ship.minYaw,yaw:ship.yaw,mass:typeof mass==="function"?mass():mass,thrusters:thrusters})}function shieldRecoveryInputResultFor(ship,modules,getBudget,systemsPips,statsFor){const generator=poweredShieldGeneratorResultFor(modules,getBudget,statsFor);if(!generator.complete)return generator;const{module:generatorModule,budget:budget}=generator.value;const generatorStats=statsFor(generatorModule);const distributorDraw=effectiveStat(generatorModule,"distributorDraw",generatorStats);const regenRate=effectiveStat(generatorModule,"shieldRegenRate",generatorStats);const brokenRegenRate=effectiveStat(generatorModule,"shieldBrokenRegenRate",generatorStats);if(distributorDraw===void 0||regenRate===void 0||brokenRegenRate===void 0){return incompleteResult([metricIssue("shieldGenerator","unresolved",generatorModule)])}const capacitor=systemsCapacitorResultFor(modules,budget,statsFor);if(!capacitor.complete)return capacitor;const strength=shieldMetrics(shieldInputFor(ship,modules,budget,statsFor)).strength;return completeResult({strength:strength,regenRate:regenRate,brokenRegenRate:brokenRegenRate,distributorDraw:distributorDraw,systemsCapacity:capacitor.value.systemsCapacity,systemsRecharge:capacitor.value.systemsRecharge,systemsPips:systemsPips})}function weaponsCapacitorInputFor(modules,weaponsPips,budget,statsFor){let weaponsCapacity=0;let weaponsRecharge=0;let sustainedEnergyPerSecond=0;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(!poweredStates(module,stats,budget).deployed)continue;if(isPowerDistributor(module,stats)){weaponsCapacity=effectiveStat(module,"weaponsCapacity",stats)??0;weaponsRecharge=effectiveStat(module,"weaponsRecharge",stats)??0}const weapon=weaponStatsFor(module,stats);if(weapon){sustainedEnergyPerSecond+=weaponMetrics(weapon).sustainedEnergyPerSecond}}return{weaponsCapacity:weaponsCapacity,weaponsRecharge:weaponsRecharge,sustainedEnergyPerSecond:sustainedEnergyPerSecond,weaponsPips:weaponsPips}}function distributorInputResultFor(modules,pips,budget,statsFor){let disabled=null;for(const module of modules){const stats=statsFor(module);if(!isPowerDistributor(module,stats))continue;if(!isEnabled(module)){disabled??=module;continue}if(!poweredStates(module,stats,budget).retracted){return incompleteResult([metricIssue("powerDistributor","shed",module)])}const systemsCapacity=effectiveStat(module,"systemsCapacity",stats);const systemsRecharge=effectiveStat(module,"systemsRecharge",stats);const enginesCapacity=effectiveStat(module,"enginesCapacity",stats);const enginesRecharge=effectiveStat(module,"enginesRecharge",stats);const weaponsCapacity=effectiveStat(module,"weaponsCapacity",stats);const weaponsRecharge=effectiveStat(module,"weaponsRecharge",stats);if(systemsCapacity===void 0||systemsRecharge===void 0||enginesCapacity===void 0||enginesRecharge===void 0||weaponsCapacity===void 0||weaponsRecharge===void 0){return incompleteResult([metricIssue("powerDistributor","unresolved",module)])}return completeResult({systemsCapacity:systemsCapacity,systemsRecharge:systemsRecharge,enginesCapacity:enginesCapacity,enginesRecharge:enginesRecharge,weaponsCapacity:weaponsCapacity,weaponsRecharge:weaponsRecharge,...pips})}return incompleteResult([disabled===null?metricIssue("powerDistributor","missing"):metricIssue("powerDistributor","disabled",disabled)])}function heatInputResultFor(ship,modules,budget,statsFor){let plant=null;let heatEfficiency;let thrusterHeatRate=0;let deployedThrusterHeatRate=0;let fsdHeatRate=0;let weaponsCapacity=0;const weapons=[];for(const module of modules){const stats=statsFor(module);if(isPowerPlant(module,stats)){if(!isEnabled(module)){return incompleteResult([metricIssue("powerCapacity","disabled",module)])}plant=module;heatEfficiency=effectiveStat(module,"heatEfficiency",stats);continue}if(!isEnabled(module))continue;const running=poweredStates(module,stats,budget);if(isThruster(module,stats)){const heat=effectiveStat(module,"engineHeatRate",stats)??0;if(running.retracted)thrusterHeatRate+=heat;if(running.deployed)deployedThrusterHeatRate+=heat}else if(isFrameShiftDrive(module,stats)){if(running.retracted)fsdHeatRate+=effectiveStat(module,"fsdHeatRate",stats)??0}else if(isPowerDistributor(module,stats)){if(running.deployed){weaponsCapacity=effectiveStat(module,"weaponsCapacity",stats)??0}}const weapon=weaponStatsFor(module,stats);if(!running.deployed)continue;if(!weapon)continue;weapons.push({heatPerSecond:weaponMetrics(weapon).sustainedHeatPerSecond,distributorDraw:weapon.distributorDraw??0})}if(heatEfficiency===void 0){return incompleteResult([plant===null?metricIssue("powerCapacity","missing"):metricIssue("heatEfficiency","unresolved",plant)])}return completeResult({heatCapacity:ship.heatCapacity,heatDissipation:ship.heatDissipation,heatEfficiency:heatEfficiency,retractedPowerDraw:poweredDraw(budget,"retracted"),deployedPowerDraw:poweredDraw(budget,"deployed"),thrusterHeatRate:thrusterHeatRate,deployedThrusterHeatRate:deployedThrusterHeatRate,fsdHeatRate:fsdHeatRate,weaponsCapacity:weaponsCapacity,weapons:weapons})}function poweredDraw(budget,state){const powered=state==="retracted"?"poweredRetracted":"poweredDeployed";return budget.bands.reduce((total,band)=>band[powered]?total+band[state]:total,0)}function poweredStates(module,stats,budget){const draw=effectiveStat(module,"powerDraw",stats);if(draw===void 0||draw===0)return{retracted:true,deployed:true};const band=budget.bands[Math.min(budget.bands.length,Math.max(1,priorityOf(module)))-1];if(!band)return{retracted:true,deployed:true};return{retracted:band.poweredRetracted,deployed:band.poweredDeployed}}function cellBankInputsFor(modules,budget,statsFor){const banks=[];for(const module of modules){if(!startsWithAny(module.Item,PREFIX.shieldCellBank))continue;const stats=statsFor(module);const effective=effectiveModule(module,stats);const ammunition=effective?ammunitionCapacity(effective):null;banks.push({slot:module.Slot,symbol:module.Item,reinforcementRate:effective?.shieldBankReinforcement??0,cells:ammunition?.total??0,spinUp:effective?.shieldBankSpinUp??0,duration:effective?.shieldBankDuration??0,heat:effective?.shieldBankHeat??0,powered:budget.available>0&&isEnabled(module)&&poweredStates(module,stats,budget).deployed})}return banks}function stockBulkhead(ship){const variants=getBulkheadsForShip(ship.name,CORE_MODULES);return variants.find(v=>v.symbol.toLowerCase().endsWith("_default"))??variants.find(v=>v.mass===0)??variants[0]??null}function armourInputFor(ship,modules,statsFor){const reinforcements=[];const moduleReinforcements=[];let bulkhead=null;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(module.Slot.toLowerCase()==="armour"){bulkhead={hullBoost:effectiveStat(module,"hullBoost",stats)??0,...resistancesOf(module,stats)}}else if(startsWithAny(module.Item,PREFIX.hullReinforcement)){const boost=getLoadoutModifier(module,"DefenceModifierHealthMultiplier");reinforcements.push({hullReinforcement:effectiveStat(module,"hullReinforcement",stats)??0,hullBoost:boost===null?0:boost/scaleForLabel("DefenceModifierHealthMultiplier"),...resistancesOf(module,stats)})}else if(startsWithAny(module.Item,PREFIX.moduleReinforcement)){moduleReinforcements.push({moduleProtection:effectiveStat(module,"moduleProtection",stats)??0,integrity:effectiveStat(module,"integrity",stats)??0})}}if(!bulkhead){const stock=stockBulkhead(ship);bulkhead=stock?{hullBoost:stock.hullBoost??0,...mapResistanceFields(field=>stock[field])}:null}return{baseArmour:ship.baseArmour,bulkhead:bulkhead,reinforcements:reinforcements,moduleReinforcements:moduleReinforcements}}var WEAPON_FIELDS=["damage","roundsPerShot","rateOfFire","burstInterval","burstRounds","burstRateOfFire","chargeTime","clipSize","ammoMaximum","reloadTime","distributorDraw","thermalLoad","powerDraw","maximumRange","falloffRange","armourPiercing"];function weaponStatsFor(module,stats){if(!stats||stats.category!=="hardpoint")return null;const weapon={};for(const field of WEAPON_FIELDS){const value=effectiveStat(module,field,stats);if(value!==void 0)weapon[field]=value}normalizeEffectiveWeapon(module,weapon);const damageDistribution=effectiveDamageDistribution(module,stats);if(damageDistribution)weapon.damageDistribution=damageDistribution;if(stats.damageComponents&&!convertsDamage(module)){weapon.damageComponents=scaleDamageComponents(stats.damageComponents,stats.damage,typeof weapon.damage==="number"?weapon.damage:void 0)}if(stats.projectileRange)weapon.projectileRange={...stats.projectileRange};return weapon}function burstAdjustedRateOfFire(module,weapon){if(getLoadoutModifier(module,"RateOfFire")!==null)return void 0;const touched=["BurstSize","BurstRateOfFire","BurstInterval"].some(label=>getLoadoutModifier(module,label)!==null);if(!touched)return void 0;return combinedRateOfFire(weapon)}function normalizeEffectiveWeapon(module,weapon){const rate=burstAdjustedRateOfFire(module,weapon);if(rate!==void 0)weapon.rateOfFire=rate;const statedDamagePerSecond=getLoadoutModifier(module,"DamagePerSecond");const firingFactor=Number(weapon.roundsPerShot??1)*Number(weapon.rateOfFire??1);if(statedDamagePerSecond!==null&&firingFactor>0){weapon.damage=statedDamagePerSecond/firingFactor}const{maximumRange:maximumRange,falloffRange:falloffRange}=weapon;if(maximumRange!==void 0&&falloffRange!==void 0&&falloffRange>maximumRange){weapon.falloffRange=maximumRange}}var INTERNALS=/* @__PURE__ */new WeakMap;function publishLoadoutInternals(build,internals){INTERNALS.set(build,internals)}function loadoutInternals(build,label){const internals=typeof build==="object"&&build!==null?INTERNALS.get(build):void 0;if(internals===void 0){throw new TypeError(`${label} must be a ShipLoadout, received ${describeValue(build)}`)}return internals}export{armourInputFor,cellBankInputsFor,completeResult,distributorInputResultFor,effectiveModule,fittedThrusterParamsFor,heatInputResultFor,incompleteResult,loadoutInternals,mobilityInputResultFor,powerAvailable,powerConsumerFor,publishLoadoutInternals,shieldCapacitorInputResultFor,shieldInputResultFor,shieldRecoveryInputResultFor,weaponStatsFor,weaponsCapacitorInputFor};//# sourceMappingURL=chunk-VYDQHPY2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/internal/calculation-result.ts","../src/ships/internal/loadout-metrics.ts","../src/ships/internal/loadout-internals.ts"],"names":["getLoadoutModifier","scaleDamageComponents","weaponMetrics","combinedRateOfFire","shieldMetrics","getBulkheadsForShip","CORE_MODULES","getExperimentalEffect","ammunitionCapacity","fieldForLabel","scaleForLabel","labelsForField","capabilityValueForLabel","damageTypeForLabel","parseSlotName","describeValue","truncate","NO_ISSUES","Object","freeze","completeResult","value","complete","issues","incompleteResult","map","issue","params","PREFIX","powerPlant","thrusters","frameShiftDrive","powerDistributor","shieldGenerator","shieldCellBank","shieldBooster","shieldReinforcement","hullReinforcement","moduleReinforcement","startsWithAny","symbol","prefixes","some","prefix","toLowerCase","startsWith","isPowerDistributor","module","stats","slot","Item","isPowerPlant","parsed","Slot","kind","core","isThruster","isFrameShiftDrive","isEnabled","On","priorityOf","Priority","effectiveStat","field","stated","statedModifier","base","label","modified","effectiveCapability","Engineering","Modifiers","modifier","Label","effectiveDamageDistribution","fromEffect","ExperimentalEffect","damageDistribution","distribution","resolved","seen","Set","type","has","add","Value","convertsDamage","modifierRatio","effective","relatedStat","ratio","effectiveModule","merged","fields","keys","key","capability","engineeringGroup","massRatio","minMass","maxMass","performanceRatio","minMultiplier","maxMultiplier","category","normalizeEffectiveWeapon","damageComponents","damage","powerConsumerFor","draw","mounted","priority","enabled","deployedOnly","alwaysPowered","powerAvailable","modules","statsFor","DEFAULT_SLOT","powerCapacity","heatEfficiency","UNRESOLVED_FACT","NOTHING_FITTED","metricIssue","reason","defaultSlot","message","unavailable","powerPlantIssueFor","capacity","Number","isFinite","powerDrawIssueFor","consumer","poweredMetricBudgetFor","getBudget","plantIssue","drawIssue","budget","available","poweredStates","retracted","poweredShieldGeneratorResultFor","powered","mapResistanceFields","read","kineticResistance","thermalResistance","explosiveResistance","causticResistance","resistancesOf","shieldInputFor","ship","generator","boosters","reinforcement","strengthRatio","optMass","Math","max","optMultiplier","push","shieldBoost","hullMass","baseShieldStrength","shieldInputResultFor","fitted","shieldCapacitorInputResultFor","systemsPips","capacitor","systemsCapacitorResultFor","shields","strength","resistances","systemsCapacity","systemsRecharge","distributor","thrusterCurveFor","optSpeedMultiplier","speedCurve","minSpeedMultiplier","maxSpeedMultiplier","optRotationMultiplier","rotationCurve","minRotationMultiplier","maxRotationMultiplier","fittedThrusterParamsFor","mobilityInputResultFor","mass","minimumSpeed","maximumSpeed","boost","minPitch","pitch","minRoll","roll","minYaw","yaw","shieldRecoveryInputResultFor","generatorModule","generatorStats","distributorDraw","regenRate","brokenRegenRate","weaponsCapacitorInputFor","weaponsPips","weaponsCapacity","weaponsRecharge","sustainedEnergyPerSecond","deployed","weapon","weaponStatsFor","distributorInputResultFor","pips","disabled","enginesCapacity","enginesRecharge","heatInputResultFor","plant","thrusterHeatRate","deployedThrusterHeatRate","fsdHeatRate","weapons","running","heat","heatPerSecond","sustainedHeatPerSecond","heatCapacity","heatDissipation","retractedPowerDraw","poweredDraw","deployedPowerDraw","state","bands","reduce","total","band","min","length","poweredRetracted","poweredDeployed","cellBankInputsFor","banks","ammunition","reinforcementRate","shieldBankReinforcement","cells","spinUp","shieldBankSpinUp","duration","shieldBankDuration","shieldBankHeat","stockBulkhead","variants","name","find","v","endsWith","armourInputFor","reinforcements","moduleReinforcements","bulkhead","hullBoost","moduleProtection","integrity","stock","baseArmour","WEAPON_FIELDS","projectileRange","burstAdjustedRateOfFire","touched","rate","rateOfFire","statedDamagePerSecond","firingFactor","roundsPerShot","maximumRange","falloffRange","INTERNALS","WeakMap","publishLoadoutInternals","build","internals","set","loadoutInternals","get","TypeError"],"mappings":"O,ioBAeA,IAAMiB,UAAyBC,OAAOC,OAAO,IAatC,SAASC,eAAkBC,OAC9B,OAAOH,OAAOC,OAAO,CAAEE,YAAOC,SAAU,KAAMC,OAAQN,WAC1D,CAGO,SAASO,iBACZD,QAEA,OAAOL,OAAOC,OAAO,CACjBE,MAAO,KACPC,SAAU,MACVC,OAAQL,OAAOC,OACXI,OAAOE,IAAKC,OACRR,OAAOC,OAAO,IACPO,SACCA,MAAMC,OAAS,CAAEA,OAAQT,OAAOC,OAAO,IAAKO,MAAMC,UAAc,CAAA,OAKxF,CCwBA,IAAMC,OAAS,CACXC,WAAY,CAAC,iBAAkB,0BAC/BC,UAAW,CAAC,aAAc,6BAC1BC,gBAAiB,CAAC,kBAClBC,iBAAkB,CAAC,uBAAwB,gCAC3CC,gBAAiB,CAAC,uBAClBC,eAAgB,CAAC,sBACjBC,cAAe,CAAC,qBAChBC,oBAAqB,CAAC,mCACtBC,kBAAmB,CACf,wBACA,gCACA,kCAEJC,oBAAqB,CAAC,0BAA2B,oCAGrD,IAAMC,cAAgB,CAACC,OAAgBC,WACnCA,SAASC,KAAMC,QAAWH,OAAOI,cAAcC,WAAWF,SAG9D,SAASG,mBAAmBC,OAAuBC,OAC/C,OAAOA,OAAOC,KACRD,MAAMC,OAAS,mBACfV,cAAcQ,OAAOG,KAAMtB,OAAOI,iBAC5C,CAGA,SAASmB,aAAaJ,OAAuBC,OACzC,MAAMI,OAAStC,cAAciC,OAAOM,MACpC,GAAID,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E,GAAIC,iBAAc,EAAW,CACzB,MAAM,IAAII,UAAU,GAAG3N,yCAAyCpD,cAAc0Q,SAClF,CACA,OAAOC,SACX,QAAAxB,eAAAjB,kBAAA7N,eAAAgM,0BAAAzH,gBAAA+F,wBAAA+B,mBAAAjM,iBAAAoQ,iBAAAjG,uBAAAxE,eAAAP,iBAAA4K,wBAAAjH,8BAAAF,qBAAAiC,6BAAAa,eAAAP"}
@@ -0,0 +1 @@
1
+ import{resolveMobilityCurves}from"./chunk-V3AEUBHV.js";import{requirePips}from"./chunk-QJ7GB6FF.js";function mobilityCapacitorMetrics(input){const scope="mobilityCapacitorMetrics";const enginesPips=input.enginesPips??4;requirePips(scope,"enginesPips",enginesPips);const curves=resolveMobilityCurves(scope,input);if(!curves)return null;const pipMultiplier=enginesPips/4;const atPips=(maximum,minimum)=>minimum+(maximum-minimum)*pipMultiplier;return Object.freeze({enginesPips:enginesPips,speed:atPips(input.maximumSpeed,input.minimumSpeed)*curves.massCurveMultiplier,pitch:atPips(input.pitch,input.minPitch)*curves.rotationMassCurveMultiplier,roll:atPips(input.roll,input.minRoll)*curves.rotationMassCurveMultiplier,yaw:atPips(input.yaw,input.minYaw)*curves.rotationMassCurveMultiplier})}export{mobilityCapacitorMetrics};//# sourceMappingURL=chunk-XUHAPOM6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/mobility-capacitor.ts"],"names":["resolveMobilityCurves","requirePips","mobilityCapacitorMetrics","input","scope","enginesPips","curves","pipMultiplier","atPips","maximum","minimum","Object","freeze","speed","maximumSpeed","minimumSpeed","massCurveMultiplier","pitch","minPitch","rotationMassCurveMultiplier","roll","minRoll","yaw","minYaw"],"mappings":"O,6FA8FO,SAASE,yBACZC,OAEA,MAAMC,MAAQ,2BACd,MAAMC,YAAcF,MAAME,aAAe,EAGzCJ,YAAYG,MAAO,cAAeC,aAClC,MAAMC,OAASN,sBAAsBI,MAAOD,OAC5C,IAAKG,OAAQ,OAAO,KACpB,MAAMC,cAAgBF,YAAc,EACpC,MAAMG,OAAS,CAACC,QAAiBC,UAC7BA,SAAWD,QAAUC,SAAWH,cACpC,OAAOI,OAAOC,OAAO,CACjBP,wBACAQ,MAAOL,OAAOL,MAAMW,aAAcX,MAAMY,cAAgBT,OAAOU,oBAC/DC,MAAOT,OAAOL,MAAMc,MAAOd,MAAMe,UAAYZ,OAAOa,4BACpDC,KAAMZ,OAAOL,MAAMiB,KAAMjB,MAAMkB,SAAWf,OAAOa,4BACjDG,IAAKd,OAAOL,MAAMmB,IAAKnB,MAAMoB,QAAUjB,OAAOa,6BAEtD,QAAAjB"}
@@ -0,0 +1 @@
1
+ import{curveMultiplier,resolveMobilityCurves}from"./chunk-V3AEUBHV.js";function thrusterMassCurveMultiplier(mass,thrusters){return curveMultiplier("thrusterMassCurveMultiplier",mass,thrusters)}function mobilityMetrics(input){const curves=resolveMobilityCurves("mobilityMetrics",input);if(!curves)return null;const{massCurveMultiplier:massCurveMultiplier,rotationMassCurveMultiplier:rotationMassCurveMultiplier}=curves;return Object.freeze({loadedMass:input.mass,speed:input.maximumSpeed*massCurveMultiplier,boost:input.boost*massCurveMultiplier,pitch:input.pitch*rotationMassCurveMultiplier,roll:input.roll*rotationMassCurveMultiplier,yaw:input.yaw*rotationMassCurveMultiplier,massCurveMultiplier:massCurveMultiplier,rotationMassCurveMultiplier:rotationMassCurveMultiplier})}export{mobilityMetrics,thrusterMassCurveMultiplier};//# sourceMappingURL=chunk-Y6KJJMIM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/mobility.ts"],"names":["curveMultiplier","resolveMobilityCurves","thrusterMassCurveMultiplier","mass","thrusters","mobilityMetrics","input","curves","massCurveMultiplier","rotationMassCurveMultiplier","Object","freeze","loadedMass","speed","maximumSpeed","boost","pitch","roll","yaw"],"mappings":"O,gEAiIO,SAASE,4BAA4BC,KAAcC,WACtD,OAAOJ,gBAAgB,8BAA+BG,KAAMC,UAChE,CAwCO,SAASC,gBAAgBC,OAC5B,MAAMC,OAASN,sBAAsB,kBAAmBK,OACxD,IAAKC,OAAQ,OAAO,KACpB,MAAMC,oBAAEA,oBAAAC,4BAAqBA,6BAAgCF,OAC7D,OAAOG,OAAOC,OAAO,CACjBC,WAAYN,MAAMH,KAClBU,MAAOP,MAAMQ,aAAeN,oBAC5BO,MAAOT,MAAMS,MAAQP,oBACrBQ,MAAOV,MAAMU,MAAQP,4BACrBQ,KAAMX,MAAMW,KAAOR,4BACnBS,IAAKZ,MAAMY,IAAMT,4BACjBD,wCACAC,yDAER,QAAAJ,gBAAAH"}
@@ -0,0 +1 @@
1
+ import{capacitorRechargeAtPips}from"./chunk-JOTAOI5T.js";var requirePips=(name,value)=>{if(!Number.isFinite(value)||value<0||value>4){throw new RangeError(`distributorMetrics: ${name} must be a finite number from 0 to 4`)}};var requireFiniteNonNegative=(name,value)=>{if(!Number.isFinite(value)||value<0){throw new RangeError(`distributorMetrics: ${name} must be a finite non-negative number`)}};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("systemsPips",pips.systems);requirePips("enginesPips",pips.engines);requirePips("weaponsPips",pips.weapons);for(const field of["systemsCapacity","systemsRecharge","enginesCapacity","enginesRecharge","weaponsCapacity","weaponsRecharge"]){requireFiniteNonNegative(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-YXPZ7QQB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/distributor.ts"],"names":["capacitorRechargeAtPips","requirePips","name","value","Number","isFinite","RangeError","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,kDAiFA,IAAMC,YAAc,CAACC,KAAcC,SAC/B,IAAKC,OAAOC,SAASF,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACnD,MAAM,IAAIG,WAAW,uBAAuBJ,2CAChD,GAGJ,IAAMK,yBAA2B,CAACL,KAAcC,SAC5C,IAAKC,OAAOC,SAASF,QAAUA,MAAQ,EAAG,CACtC,MAAM,IAAIG,WAAW,uBAAuBJ,4CAChD,GAGJ,IAAMM,iBAAmB,CACrBC,SACAC,cACAC,OAEAC,OAAOC,OAAO,CACVJ,kBACAC,4BACAI,aAAcd,wBAAwBU,cAAeC,QA+BtD,SAASI,mBAAmBC,OAC/B,MAAML,KAAOC,OAAOC,OAAO,CACvBI,QAASD,MAAME,aAAe,EAC9BC,QAASH,MAAMI,aAAe,EAC9BC,QAASL,MAAMM,aAAe,IAElCrB,YAAY,cAAeU,KAAKM,SAChChB,YAAY,cAAeU,KAAKQ,SAChClB,YAAY,cAAeU,KAAKU,SAChC,IAAA,MAAWE,QAAS,CAChB,kBACA,kBACA,kBACA,kBACA,kBACA,mBACQ,CACRhB,yBAAyBgB,MAAOP,MAAMO,OAC1C,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"}
@@ -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,commodities=ALL_COMMODITIES){return filterByKey(commodities,"category",category,"commoditiesInCategory: category")}export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol};//# sourceMappingURL=chunk-Y6UZWNP4.js.map
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 +1 @@
1
- {"version":3,"sources":["../src/commodities/commodities.ts"],"names":["ALL_COMMODITIES","findInKeyIndex","findByKey","filterByKey","createKeyIndex","COMMODITIES_BY_SYMBOL","COMMODITIES_BY_NAME","getCommodityBySymbol","symbol","commodities","getCommodityByName","name","commoditiesInCategory","category"],"mappings":"O,+HA4GA,IAAMK,qCAAwCD,eAAeJ,gBAAiB,UAC9E,IAAMM,mCAAsCF,eAAeJ,gBAAiB,QAsBrE,SAASO,qBACZC,OACAC,YAAoCT,iBAEpC,OAAOS,cAAgBT,gBACjBC,eAAeI,sBAAuBG,OAAQ,gCAC9CN,UAAUO,YAAa,SAAUD,OAAQ,+BACnD,CAkBO,SAASE,mBACZC,KACAF,YAAoCT,iBAEpC,OAAOS,cAAgBT,gBACjBC,eAAeK,oBAAqBK,KAAM,4BAC1CT,UAAUO,YAAa,OAAQE,KAAM,2BAC/C,CAsBO,SAASC,sBACZC,SACAJ,YAAoCT,iBAEpC,OAAOG,YAAYM,YAAa,WAAYI,SAAU,kCAC1D,QAAAD,sBAAAF,mBAAAH"}
1
+ {"version":3,"sources":["../src/commodities/commodities.ts"],"names":["ALL_COMMODITIES","findInKeyIndex","findByKey","filterByKey","createKeyIndex","COMMODITIES_BY_SYMBOL","COMMODITIES_BY_NAME","getCommodityBySymbol","symbol","commodities","getCommodityByName","name","commoditiesInCategory","category"],"mappings":"O,+HAqHA,IAAMK,qCAAwCD,eAAeJ,gBAAiB,UAC9E,IAAMM,mCAAsCF,eAAeJ,gBAAiB,QAyBrE,SAASO,qBACZC,OACAC,YAAoCT,iBAEpC,OAAOS,cAAgBT,gBACjBC,eAAeI,sBAAuBG,OAAQ,gCAC9CN,UAAUO,YAAa,SAAUD,OAAQ,+BACnD,CAkBO,SAASE,mBACZC,KACAF,YAAoCT,iBAEpC,OAAOS,cAAgBT,gBACjBC,eAAeK,oBAAqBK,KAAM,4BAC1CT,UAAUO,YAAa,OAAQE,KAAM,2BAC/C,CAoBO,SAASC,sBAAsBC,UAClC,OAAOV,YAAYH,gBAAiB,WAAYa,SAAU,kCAC9D,QAAAD,sBAAAF,mBAAAH"}
@@ -15,8 +15,8 @@
15
15
  * getCommodityByName('lavian brandy')?.rare; // -> true
16
16
  * ```
17
17
  *
18
- * Each lookup takes an optional second argument to **narrow** the search to a
19
- * subset — one registry's catalogue, or any array you have filtered yourself:
18
+ * The two **by-key** lookups take an optional second argument to **narrow** the search
19
+ * to a subset — one registry's catalogue, or any array you have filtered yourself:
20
20
  *
21
21
  * | Module | Export | Entries |
22
22
  * | --- | --- | --- |
@@ -25,9 +25,18 @@
25
25
  * | `./commodities-all` | `ALL_COMMODITIES` | 399 (the default) |
26
26
  *
27
27
  * It narrows *results*, not bundle size: importing a lookup pulls both catalogues,
28
- * since that is what it falls back to — 29.5 KiB minified for all 399. Every record
28
+ * since that is what it falls back to — 29.6 KiB minified for all 399. Every record
29
29
  * carries a {@link Commodity.rare} flag, so a subset is one `.filter()` away.
30
30
  *
31
+ * **Only `ALL_COMMODITIES` itself is indexed.** A by-key lookup answers from an O(1)
32
+ * index when the catalogue you pass *is* `ALL_COMMODITIES` — the same object, not a
33
+ * copy — and scans linearly otherwise, including for `[...ALL_COMMODITIES]`, which
34
+ * holds the same 399 records. Omitting the argument always takes the indexed path, so
35
+ * pass one only when you mean to exclude the other registry.
36
+ *
37
+ * {@link commoditiesInCategory} takes no catalogue: it returns an array, so narrowing
38
+ * it is `.filter()` on the result — `rare` tells the two registries apart.
39
+ *
31
40
  * @example
32
41
  * ```ts
33
42
  * import { getCommodityBySymbol } from '@elite-dangerous-almanac/core/commodities';
@@ -88,7 +97,10 @@ interface Commodity {
88
97
  * market/journal reports (`"platinum"`). Leading/trailing whitespace is ignored.
89
98
  * @param commodities - Optional subset to search instead of all 399 commodities —
90
99
  * `COMMODITIES` (standard only), `RARE_COMMODITIES`, or any array you have filtered
91
- * yourself. Omit it unless you specifically want to exclude the other registry.
100
+ * yourself. Omit it unless you specifically want to exclude the other registry: the
101
+ * indexed O(1) path is taken only when the argument is omitted or is `ALL_COMMODITIES`
102
+ * **by reference**, and every other array — a copy of that same catalogue included —
103
+ * is scanned.
92
104
  * @returns The matching {@link Commodity}, or `null` if no commodity has that symbol.
93
105
  * @throws {TypeError} If `symbol` is present and not a string. A nullish
94
106
  * `symbol` is a miss, answered the way an unrecognised one is.
@@ -124,19 +136,17 @@ declare function getCommodityByName(name: string, commodities?: readonly Commodi
124
136
  * whitespace and case are ignored, like every other lookup here, so a group name
125
137
  * that arrived from a market payload or a user's dropdown resolves without
126
138
  * re-casing it first.
127
- * @param commodities - Optional subset to search (see {@link getCommodityBySymbol}).
128
- * @returns A new array of matches (possibly empty). The input is not modified.
139
+ * @returns A new array of matches (possibly empty).
129
140
  * @throws {TypeError} If `category` is present and not a string. A nullish
130
141
  * `category` is a miss, answered the way an unrecognised one is.
131
142
  * @example
132
143
  * ```ts
133
144
  * import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities/commodities';
134
- * import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
135
145
  *
136
- * commoditiesInCategory('Metals').length; // -> every metal, standard and rare
137
- * commoditiesInCategory('metals', COMMODITIES).length; // -> the standard ones only
146
+ * commoditiesInCategory('Metals').length; // -> every metal, standard and rare
147
+ * commoditiesInCategory('metals').filter((c) => !c.rare).length; // -> the standard ones only
138
148
  * ```
139
149
  */
140
- declare function commoditiesInCategory(category: string, commodities?: readonly Commodity[]): Commodity[];
150
+ declare function commoditiesInCategory(category: string): Commodity[];
141
151
 
142
152
  export { type Commodity, type CommodityCategory, commoditiesInCategory, getCommodityByName, getCommodityBySymbol };
@@ -1 +1 @@
1
- export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-Y6UZWNP4.js"; //# sourceMappingURL=commodities.js.map
1
+ export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-ZCEAPJDH.js"; //# sourceMappingURL=commodities.js.map
@@ -12,14 +12,25 @@
12
12
  * commoditiesInCategory('Metals').length; // -> every metal, standard and rare
13
13
  * ```
14
14
  *
15
- * Every lookup also takes an optional trailing argument to **narrow** the search to
16
- * one registry, or to an array you have filtered yourself:
15
+ * The by-key lookups also take an optional trailing argument to **narrow** the search
16
+ * to one registry, or to an array you have filtered yourself. It must be one of the
17
+ * exported catalogues *by reference*; `ALL_COMMODITIES` (or omitting it) is the one
18
+ * that answers from an index rather than a scan:
17
19
  *
18
20
  * ```ts
19
- * import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';
21
+ * import { getCommodityByName } from '@elite-dangerous-almanac/core/commodities';
20
22
  * import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
21
23
  *
22
- * commoditiesInCategory('Metals', COMMODITIES).length; // -> the standard ones only
24
+ * getCommodityByName('lavian brandy', COMMODITIES); // -> null; it is a rare
25
+ * ```
26
+ *
27
+ * A lookup that returns an array takes no catalogue — narrow its result with
28
+ * `.filter()`:
29
+ *
30
+ * ```ts
31
+ * import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';
32
+ *
33
+ * commoditiesInCategory('Metals').filter((c) => !c.rare).length; // -> the standard ones only
23
34
  * ```
24
35
  *
25
36
  * @packageDocumentation
@@ -1 +1 @@
1
- export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-Y6UZWNP4.js";export{ALL_COMMODITIES}from"../chunk-JQG4C67D.js";export{RARE_COMMODITIES}from"../chunk-EYGVDJ2I.js";export{COMMODITIES}from"../chunk-7EE5VIHR.js"; //# sourceMappingURL=index.js.map
1
+ export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-ZCEAPJDH.js";export{ALL_COMMODITIES}from"../chunk-JQG4C67D.js";export{RARE_COMMODITIES}from"../chunk-EYGVDJ2I.js";export{COMMODITIES}from"../chunk-7EE5VIHR.js"; //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- export{resolvePersonalModificationForWeapon}from"../chunk-6EPYVBAX.js";export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-JWWYAMGD.js";export{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-OCND33TO.js";export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-TMMGS6TC.js"; //# sourceMappingURL=index.js.map
1
+ export{resolvePersonalModificationForWeapon}from"../chunk-A6OINYNP.js";export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-MGRDB2BZ.js";export{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-6GJHUWMO.js";export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-B7EYTZRK.js"; //# sourceMappingURL=index.js.map
@@ -29,7 +29,8 @@ declare const PERSONAL_MODIFICATION_COSTS: Readonly<Record<string, readonly Pers
29
29
  * Look up a personal modification's one-application material cost.
30
30
  *
31
31
  * @param symbol - Recipe symbol, such as `"suit_nightvision"` or
32
- * `"weapon_range_kinetic"`, matched case-insensitively.
32
+ * `"weapon_range_kinetic"`, matched case-insensitively after trimming surrounding
33
+ * whitespace.
33
34
  * @returns The frozen ingredient list, or `null` when unknown.
34
35
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
35
36
  * miss, answered like an unrecognised one.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/equipment/modification-costs.ts"],"names":["findByRawKey","deepFreeze","modification_costs_default","symbol","PERSONAL_MODIFICATION_COSTS","getPersonalModificationCost"],"mappings":"O,o2LA6BO,IAAMI,4BAETH,WAAWC,4BAgBR,SAASG,4BACZF,QAEA,OAAOH,aAAaI,4BAA6BD,OAAQ,sCAC7D,QAAAC,4BAAAC"}
1
+ {"version":3,"sources":["../../src/equipment/modification-costs.ts"],"names":["findByRawKey","deepFreeze","modification_costs_default","symbol","PERSONAL_MODIFICATION_COSTS","getPersonalModificationCost"],"mappings":"O,o2LA6BO,IAAMI,4BAETH,WAAWC,4BAiBR,SAASG,4BACZF,QAEA,OAAOH,aAAaI,4BAA6BD,OAAQ,sCAC7D,QAAAC,4BAAAC"}
@@ -1 +1 @@
1
- export{resolvePersonalModificationForWeapon}from"../chunk-6EPYVBAX.js"; //# sourceMappingURL=modification-journal.js.map
1
+ export{resolvePersonalModificationForWeapon}from"../chunk-A6OINYNP.js"; //# sourceMappingURL=modification-journal.js.map
@@ -44,7 +44,8 @@ declare const PERSONAL_MODIFICATIONS: Readonly<Record<string, PersonalModificati
44
44
  * Look up a personal-equipment modification by recipe symbol, case-insensitively.
45
45
  *
46
46
  * @param symbol - Recipe symbol such as `"suit_nightvision"` or
47
- * `"weapon_range_kinetic"`.
47
+ * `"weapon_range_kinetic"`, matched case-insensitively after trimming surrounding
48
+ * whitespace.
48
49
  * @returns The frozen modification record, or `null` when unknown.
49
50
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
50
51
  * miss, answered like an unrecognised one.
@@ -1 +1 @@
1
- export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-JWWYAMGD.js"; //# sourceMappingURL=modifications.js.map
1
+ export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-MGRDB2BZ.js"; //# sourceMappingURL=modifications.js.map
@@ -50,7 +50,8 @@ declare const SUITS: readonly Suit[];
50
50
  /**
51
51
  * Look up a suit model by its grade-independent family, case-insensitively.
52
52
  *
53
- * @param family - Family such as `"utilitysuit"`.
53
+ * @param family - Family such as `"utilitysuit"`, matched case-insensitively after
54
+ * trimming surrounding whitespace.
54
55
  * @returns The frozen suit record, or `null` when unknown.
55
56
  * @throws {TypeError} If `family` is present and not a string. A nullish family is a
56
57
  * miss, answered like an unrecognised one.
@@ -64,7 +65,8 @@ declare function getSuitByFamily(family: string): Suit | null;
64
65
  /**
65
66
  * Look up a suit by its display name, case-insensitively.
66
67
  *
67
- * @param name - Display name such as `"Maverick Suit"`.
68
+ * @param name - Display name such as `"Maverick Suit"`, matched case-insensitively
69
+ * after trimming surrounding whitespace.
68
70
  * @returns The frozen suit record, or `null` when unknown.
69
71
  * @throws {TypeError} If `name` is present and not a string. A nullish name is a miss,
70
72
  * answered like an unrecognised one.
@@ -78,7 +80,8 @@ declare function getSuitByName(name: string): Suit | null;
78
80
  /**
79
81
  * Resolve the grade-specific Frontier item symbol reported by journal suit events.
80
82
  *
81
- * @param symbol - Item symbol such as `"utilitysuit_class3"`.
83
+ * @param symbol - Item symbol such as `"utilitysuit_class3"`, matched
84
+ * case-insensitively after trimming surrounding whitespace.
82
85
  * @returns The owning suit and its numeric grade, or `null` when unknown.
83
86
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
84
87
  * miss, answered like an unrecognised one.
@@ -1 +1 @@
1
- export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-TMMGS6TC.js"; //# sourceMappingURL=suits.js.map
1
+ export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-B7EYTZRK.js"; //# sourceMappingURL=suits.js.map
@@ -67,7 +67,8 @@ declare const PERSONAL_UPGRADE_COSTS: PersonalUpgradeCosts;
67
67
  /**
68
68
  * Get the one-step cost of upgrading a suit to a target grade.
69
69
  *
70
- * @param family - Grade-independent suit family, e.g. `"utilitysuit"`.
70
+ * @param family - Grade-independent suit family, e.g. `"utilitysuit"`, matched
71
+ * case-insensitively after trimming surrounding whitespace.
71
72
  * @param targetGrade - Grade being reached, integer `2`–`5`.
72
73
  * @returns The frozen ingredient list, or `null` for an unknown/non-upgradeable suit.
73
74
  * @throws {TypeError} If `family` is present and not a string. A nullish family is a
@@ -83,7 +84,8 @@ declare function getSuitUpgradeStepCost(family: string, targetGrade: number): re
83
84
  /**
84
85
  * Total the suit upgrade steps above `currentGrade` through `targetGrade`.
85
86
  *
86
- * @param family - Grade-independent suit family.
87
+ * @param family - Grade-independent suit family, matched case-insensitively after
88
+ * trimming surrounding whitespace.
87
89
  * @param targetGrade - Desired grade, integer `1`–`5`.
88
90
  * @param currentGrade - Current grade, integer `1`–`5`; defaults to `1`.
89
91
  * @returns A summed shopping list, `[]` when no climb remains, or `null` for an
@@ -101,7 +103,8 @@ declare function getSuitUpgradeCost(family: string, targetGrade: number, current
101
103
  /**
102
104
  * Get the one-step cost of upgrading a handheld weapon to a target grade.
103
105
  *
104
- * @param symbol - Frontier handheld-weapon journal symbol.
106
+ * @param symbol - Frontier handheld-weapon journal symbol, matched
107
+ * case-insensitively after trimming surrounding whitespace.
105
108
  * @param targetGrade - Grade being reached, integer `2`–`5`.
106
109
  * @returns The frozen ingredient list, or `null` for an unknown weapon.
107
110
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
@@ -117,7 +120,8 @@ declare function getPersonalWeaponUpgradeStepCost(symbol: string, targetGrade: n
117
120
  /**
118
121
  * Total the weapon upgrade steps above `currentGrade` through `targetGrade`.
119
122
  *
120
- * @param symbol - Frontier handheld-weapon journal symbol.
123
+ * @param symbol - Frontier handheld-weapon journal symbol, matched
124
+ * case-insensitively after trimming surrounding whitespace.
121
125
  * @param targetGrade - Desired grade, integer `1`–`5`.
122
126
  * @param currentGrade - Current grade, integer `1`–`5`; defaults to `1`.
123
127
  * @returns A summed shopping list, `[]` when no climb remains, or `null` for an unknown
@@ -1 +1 @@
1
- import{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";import{getPersonalWeaponBySymbol}from"../chunk-OCND33TO.js";import{getSuitByFamily}from"../chunk-TMMGS6TC.js"; import{deepFreeze}from"../chunk-DURKO7JU.js";var upgrade_costs_default={suits:{utilitysuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"carbonfibreplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"carbonfibreplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"carbonfibreplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"carbonfibreplating",count:12},{symbol:"graphene",count:12}]},tacticalsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"titaniumplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"titaniumplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"titaniumplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"titaniumplating",count:12},{symbol:"graphene",count:12}]},explorationsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"aerogel",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"aerogel",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"aerogel",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"aerogel",count:12},{symbol:"graphene",count:12}]}},weaponGroups:{takada:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"opticalfibre",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"opticalfibre",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"opticalfibre",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"opticalfibre",count:12}]},manticore:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"chemicalsuperbase",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"chemicalsuperbase",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"chemicalsuperbase",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"chemicalsuperbase",count:12}]},karma:{2:[{symbol:"weaponschematic",count:1},{symbol:"compressionliquefiedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"weaponcomponent",count:2},{symbol:"tungstencarbide",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"compressionliquefiedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"weaponcomponent",count:5},{symbol:"tungstencarbide",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"compressionliquefiedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"weaponcomponent",count:9},{symbol:"tungstencarbide",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"compressionliquefiedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"weaponcomponent",count:12},{symbol:"tungstencarbide",count:12}]}}};var PERSONAL_UPGRADE_COSTS=deepFreeze(upgrade_costs_default);function getSuitUpgradeStepCost(family,targetGrade){assertTargetGrade(targetGrade,"getSuitUpgradeStepCost");const costs=getSuitUpgradeCosts(family);return costs?.[String(targetGrade)]??null}function getSuitUpgradeCost(family,targetGrade,currentGrade=1){assertGrade(targetGrade,"getSuitUpgradeCost: targetGrade");assertGrade(currentGrade,"getSuitUpgradeCost: currentGrade");const costs=getSuitUpgradeCosts(family);if(!costs)return null;return totalCosts(costs,targetGrade,currentGrade)}function getPersonalWeaponUpgradeStepCost(symbol,targetGrade){assertTargetGrade(targetGrade,"getPersonalWeaponUpgradeStepCost");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup][String(targetGrade)]??null}function getPersonalWeaponUpgradeCost(symbol,targetGrade,currentGrade=1){assertGrade(targetGrade,"getPersonalWeaponUpgradeCost: targetGrade");assertGrade(currentGrade,"getPersonalWeaponUpgradeCost: currentGrade");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return totalCosts(PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup],targetGrade,currentGrade)}function totalCosts(costs,targetGrade,currentGrade){const steps=[];for(let grade=currentGrade+1;grade<=targetGrade;grade++){steps.push(costs[String(grade)])}return sumPersonalEngineeringIngredients(...steps)}function getSuitUpgradeCosts(family){const suit=getSuitByFamily(family);if(!suit||!Object.hasOwn(PERSONAL_UPGRADE_COSTS.suits,suit.family))return null;return PERSONAL_UPGRADE_COSTS.suits[suit.family]}function assertTargetGrade(grade,functionName){if(!Number.isInteger(grade)||grade<2||grade>5){throw new RangeError(`${functionName}: targetGrade must be an integer in [2, 5]`)}}function assertGrade(grade,label){if(!Number.isInteger(grade)||grade<1||grade>5){throw new RangeError(`${label} must be an integer in [1, 5]`)}}export{PERSONAL_UPGRADE_COSTS,getPersonalWeaponUpgradeCost,getPersonalWeaponUpgradeStepCost,getSuitUpgradeCost,getSuitUpgradeStepCost};//# sourceMappingURL=upgrade-costs.js.map
1
+ import{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";import{getPersonalWeaponBySymbol}from"../chunk-6GJHUWMO.js";import{getSuitByFamily}from"../chunk-B7EYTZRK.js"; import{deepFreeze}from"../chunk-DURKO7JU.js";var upgrade_costs_default={suits:{utilitysuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"carbonfibreplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"carbonfibreplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"carbonfibreplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"carbonfibreplating",count:12},{symbol:"graphene",count:12}]},tacticalsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"titaniumplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"titaniumplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"titaniumplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"titaniumplating",count:12},{symbol:"graphene",count:12}]},explorationsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"aerogel",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"aerogel",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"aerogel",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"aerogel",count:12},{symbol:"graphene",count:12}]}},weaponGroups:{takada:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"opticalfibre",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"opticalfibre",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"opticalfibre",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"opticalfibre",count:12}]},manticore:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"chemicalsuperbase",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"chemicalsuperbase",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"chemicalsuperbase",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"chemicalsuperbase",count:12}]},karma:{2:[{symbol:"weaponschematic",count:1},{symbol:"compressionliquefiedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"weaponcomponent",count:2},{symbol:"tungstencarbide",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"compressionliquefiedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"weaponcomponent",count:5},{symbol:"tungstencarbide",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"compressionliquefiedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"weaponcomponent",count:9},{symbol:"tungstencarbide",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"compressionliquefiedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"weaponcomponent",count:12},{symbol:"tungstencarbide",count:12}]}}};var PERSONAL_UPGRADE_COSTS=deepFreeze(upgrade_costs_default);function getSuitUpgradeStepCost(family,targetGrade){assertTargetGrade(targetGrade,"getSuitUpgradeStepCost");const costs=getSuitUpgradeCosts(family);return costs?.[String(targetGrade)]??null}function getSuitUpgradeCost(family,targetGrade,currentGrade=1){assertGrade(targetGrade,"getSuitUpgradeCost: targetGrade");assertGrade(currentGrade,"getSuitUpgradeCost: currentGrade");const costs=getSuitUpgradeCosts(family);if(!costs)return null;return totalCosts(costs,targetGrade,currentGrade)}function getPersonalWeaponUpgradeStepCost(symbol,targetGrade){assertTargetGrade(targetGrade,"getPersonalWeaponUpgradeStepCost");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup][String(targetGrade)]??null}function getPersonalWeaponUpgradeCost(symbol,targetGrade,currentGrade=1){assertGrade(targetGrade,"getPersonalWeaponUpgradeCost: targetGrade");assertGrade(currentGrade,"getPersonalWeaponUpgradeCost: currentGrade");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return totalCosts(PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup],targetGrade,currentGrade)}function totalCosts(costs,targetGrade,currentGrade){const steps=[];for(let grade=currentGrade+1;grade<=targetGrade;grade++){steps.push(costs[String(grade)])}return sumPersonalEngineeringIngredients(...steps)}function getSuitUpgradeCosts(family){const suit=getSuitByFamily(family);if(!suit||!Object.hasOwn(PERSONAL_UPGRADE_COSTS.suits,suit.family))return null;return PERSONAL_UPGRADE_COSTS.suits[suit.family]}function assertTargetGrade(grade,functionName){if(!Number.isInteger(grade)||grade<2||grade>5){throw new RangeError(`${functionName}: targetGrade must be an integer in [2, 5]`)}}function assertGrade(grade,label){if(!Number.isInteger(grade)||grade<1||grade>5){throw new RangeError(`${label} must be an integer in [1, 5]`)}}export{PERSONAL_UPGRADE_COSTS,getPersonalWeaponUpgradeCost,getPersonalWeaponUpgradeStepCost,getSuitUpgradeCost,getSuitUpgradeStepCost};//# sourceMappingURL=upgrade-costs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/equipment/upgrade-costs.ts"],"names":["sumPersonalEngineeringIngredients","getPersonalWeaponBySymbol","getSuitByFamily","deepFreeze","upgrade_costs_default","suits","symbol","weaponGroups","PERSONAL_UPGRADE_COSTS","getSuitUpgradeStepCost","family","targetGrade","assertTargetGrade","costs","getSuitUpgradeCosts","String","getSuitUpgradeCost","currentGrade","assertGrade","totalCosts","getPersonalWeaponUpgradeStepCost","weapon","upgradeGroup","getPersonalWeaponUpgradeCost","steps","grade","push","suit","Object","hasOwn","functionName","Number","isInteger","RangeError","label"],"mappings":"O,yqJA4EO,IAAMQ,uBAA+CL,WACxDC,uBAkBG,SAASK,uBACZC,OACAC,aAEAC,kBAAkBD,YAAa,0BAC/B,MAAME,MAAQC,oBAAoBJ,QAClC,OAAOG,QAAQE,OAAOJ,eAAoD,IAC9E,CAmBO,SAASK,mBACZN,OACAC,YACAM,aAAe,GAEfC,YAAYP,YAAa,mCACzBO,YAAYD,aAAc,oCA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WeaponBySymbol","getSuitByFamily","deepFreeze","upgrade_costs_default","suits","symbol","weaponGroups","PERSONAL_UPGRADE_COSTS","getSuitUpgradeStepCost","family","targetGrade","assertTargetGrade","costs","getSuitUpgradeCosts","String","getSuitUpgradeCost","currentGrade","assertGrade","totalCosts","getPersonalWeaponUpgradeStepCost","weapon","upgradeGroup","getPersonalWeaponUpgradeCost","steps","grade","push","suit","Object","hasOwn","functionName","Number","isInteger","RangeError","label"],"mappings":"O,ssJA4EO,IAAMQ,uBAA+CL,WACxDC,uBAmBG,SAASK,uBACZC,OACAC,aAEAC,kBAAkBD,YAAa,0BAC/B,MAAME,MAAQC,oBAAoBJ,QAClC,OAAOG,QAAQE,OAAOJ,eAAoD,IAC9E,CAoBO,SAASK,mBACZN,OACAC,YACAM,aAAe,GAEfC,YAAYP,YAAa,mCACzBO,YAAYD,aAAc,oCAC1B,MAAMJ,MAAQC,oBAAoBJ,QAClC,IAAKG,MAAO,OAAO,KACnB,OAAOM,WAAWN,MAAOF,YAAaM,aAC1C,CAkBO,SAASG,iCACZd,OACAK,aAEAC,kBAAkBD,YAAa,oCAC/B,MAAMU,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OACIb,uBAAuBD,aAAac,OAAOC,cAAcP,OAAOJ,eAAwB,IAEhG,CAqBO,SAASY,6BACZjB,OACAK,YACAM,aAAe,GAEfC,YAAYP,YAAa,6CACzBO,YAAYD,aAAc,8CAC1B,MAAMI,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OAAOF,WACHX,uBAAuBD,aAAac,OAAOC,cAC3CX,YACAM,aAER,CAEA,SAASE,WACLN,MACAF,YACAM,cAEA,MAAMO,MAAsD,GAC5D,IAAA,IAASC,MAAQR,aAAe,EAAGQ,OAASd,YAAac,QAAS,CAC9DD,MAAME,KAAKb,MAAME,OAAOU,QAC5B,CACA,OAAOzB,qCAAqCwB,MAChD,CAEA,SAASV,oBAAoBJ,QACzB,MAAMiB,KAAOzB,gBAAgBQ,QAC7B,IAAKiB,OAASC,OAAOC,OAAOrB,uBAAuBH,MAAOsB,KAAKjB,QAAS,OAAO,KAC/E,OAAOF,uBAAuBH,MAAMsB,KAAKjB,OAC7C,CAEA,SAASE,kBAAkBa,MAAeK,cACtC,IAAKC,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGH,yDAC5B,CACJ,CAEA,SAASZ,YAAYO,MAAeS,OAChC,IAAKH,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGC,qCAC5B,CACJ,QAAA1B,uBAAAe,6BAAAH,iCAAAJ,mBAAAP"}
@@ -53,7 +53,11 @@ interface PersonalWeapon {
53
53
  readonly headshotMultiplier: number;
54
54
  /** Nominal effective range in metres. */
55
55
  readonly effectiveRange: number;
56
- /** Grade records keyed by `"1"` through `"5"`. */
56
+ /**
57
+ * Grade records keyed by `"1"` through `"5"` — every weapon carries all five,
58
+ * unlike {@link Suit.grades}, and `equipment.test.ts` pins that. Read one through
59
+ * {@link getPersonalWeaponGrade} to get the same nullable answer suits give.
60
+ */
57
61
  readonly grades: Readonly<Record<`${EquipmentGrade}`, PersonalWeaponGrade>>;
58
62
  }
59
63
  /**
@@ -69,7 +73,8 @@ declare const PERSONAL_WEAPONS: readonly PersonalWeapon[];
69
73
  /**
70
74
  * Look up a handheld weapon by its Frontier journal symbol, case-insensitively.
71
75
  *
72
- * @param symbol - Journal item id such as `"wpn_m_assaultrifle_kinetic_fauto"`.
76
+ * @param symbol - Journal item id such as `"wpn_m_assaultrifle_kinetic_fauto"`,
77
+ * matched case-insensitively after trimming surrounding whitespace.
73
78
  * @returns The frozen weapon record, or `null` when unknown.
74
79
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
75
80
  * miss, answered like an unrecognised one.
@@ -100,14 +105,17 @@ declare function getPersonalWeaponByName(name: string): PersonalWeapon | null;
100
105
  *
101
106
  * @param weapon - A catalogue weapon record.
102
107
  * @param grade - Integer grade `1`–`5`.
103
- * @returns The frozen grade record.
108
+ * @returns The frozen grade record, or `null` when the record carries no such grade.
109
+ * Every catalogued weapon carries all five, so the `null` is the same promise
110
+ * {@link getSuitGrade} makes rather than an outcome the shipped catalogue produces —
111
+ * write the two the same way and neither can surprise you.
104
112
  * @throws {RangeError} If `grade` is not an integer from 1 through 5.
105
113
  * @example
106
114
  * ```ts
107
115
  * import { PERSONAL_WEAPONS, getPersonalWeaponGrade } from '@elite-dangerous-almanac/core/equipment/weapons';
108
- * getPersonalWeaponGrade(PERSONAL_WEAPONS[0]!, 5).modificationSlots; // -> 4
116
+ * getPersonalWeaponGrade(PERSONAL_WEAPONS[0]!, 5)?.modificationSlots; // -> 4
109
117
  * ```
110
118
  */
111
- declare function getPersonalWeaponGrade(weapon: PersonalWeapon, grade: number): PersonalWeaponGrade;
119
+ declare function getPersonalWeaponGrade(weapon: PersonalWeapon, grade: number): PersonalWeaponGrade | null;
112
120
 
113
121
  export { PERSONAL_WEAPONS, type PersonalDamageType, type PersonalFireMode, type PersonalWeapon, type PersonalWeaponClass, type PersonalWeaponEngineeringType, type PersonalWeaponGrade, type PersonalWeaponSlot, type WeaponUpgradeGroup, getPersonalWeaponByName, getPersonalWeaponBySymbol, getPersonalWeaponGrade };
@@ -1 +1 @@
1
- export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-OCND33TO.js"; //# sourceMappingURL=weapons.js.map
1
+ export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-6GJHUWMO.js"; //# sourceMappingURL=weapons.js.map
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Look up an engineering blueprint's source-backed display name for a locale.
4
4
  *
5
- * @param fdname - Frontier's blueprint id, such as `"FSD_LongRange"`. Matching ignores
5
+ * @param blueprintSymbol - Frontier's blueprint id, such as `"FSD_LongRange"`. Matching ignores
6
6
  * case and surrounding whitespace.
7
7
  * @param locale - A BCP 47 language or regional tag, such as `"de"`, `"de-DE"` or
8
8
  * `"en-GB"`. Matching is case-insensitive; underscores are accepted in place of
@@ -11,12 +11,12 @@
11
11
  * tag; or `null` when the id is unknown, the locale is
12
12
  * unsupported, or the pinned source carries no value for that blueprint and locale.
13
13
  * @remarks
14
- * Names stay keyed per `fdname`: the same English phrase can require different grammar
15
- * when translated for different module families. This function bundles names only, not
14
+ * Names stay keyed per blueprint symbol: the same English phrase can require different
15
+ * grammar when translated for different module families. This function bundles names only, not
16
16
  * blueprint modifiers or material costs. Missing translations never silently fall back
17
17
  * to English.
18
- * @throws {TypeError} If `fdname` is present and not a string, or `locale` is not a
19
- * string. A nullish `fdname` is a lookup miss and returns `null`.
18
+ * @throws {TypeError} If `blueprintSymbol` is present and not a string, or `locale` is not a
19
+ * string. A nullish `blueprintSymbol` is a lookup miss and returns `null`.
20
20
  * @example
21
21
  * ```ts
22
22
  * import { getBlueprintName } from '@elite-dangerous-almanac/core/i18n/blueprints';
@@ -26,6 +26,6 @@
26
26
  * getBlueprintName('MC_Overcharged', 'fr'); // -> 'Arme surchargée'
27
27
  * ```
28
28
  */
29
- declare function getBlueprintName(fdname: string, locale: string): string | null;
29
+ declare function getBlueprintName(blueprintSymbol: string, locale: string): string | null;
30
30
 
31
31
  export { getBlueprintName };
@@ -1 +1 @@
1
- export{getBlueprintName}from"../chunk-Z6XMXMVI.js"; //# sourceMappingURL=blueprints.js.map
1
+ export{getBlueprintName}from"../chunk-DBDCOHI4.js"; //# sourceMappingURL=blueprints.js.map
@@ -6,20 +6,8 @@ import '../ships/slots.js';
6
6
  import '../ships/modules.js';
7
7
  import '../ships/engineering-options.js';
8
8
  import '../ships/module-families.js';
9
- import '../ships/jump-range.js';
10
- import '../ships/engineering.js';
11
- import '../ships/power.js';
12
- import '../ships/heat.js';
13
- import '../ships/shields.js';
14
- import '../ships/resistances.js';
15
- import '../ships/armour.js';
16
- import '../ships/weapons.js';
17
- import '../ships/ammunition.js';
18
- import '../ships/weapons-capacitor.js';
19
- import '../ships/distributor.js';
20
- import '../ships/mobility.js';
21
- import '../ships/shield-recovery.js';
22
9
  import '../ships/pre-engineered.js';
10
+ import '../ships/ammunition.js';
23
11
  import '../ships/source-purchase.js';
24
12
 
25
13
  /** Locale-aware access to the English fallback carried by structured diagnostics. */
@@ -3,6 +3,7 @@
3
3
  * Look up an engineering option group's display name.
4
4
  *
5
5
  * @param groupId - The stable group id used by `EngineeringOptionGroup.groupId`.
6
+ * Matching ignores case and surrounding whitespace.
6
7
  * @param locale - A BCP 47 locale. English covers every group; the current source also
7
8
  * supplies partial Russian coverage.
8
9
  * @returns The localized group name, or `null` for an unknown group or unavailable locale.
@@ -1 +1 @@
1
- export{getEngineeringGroupName}from"../chunk-EKQCVCMK.js"; //# sourceMappingURL=engineering-groups.js.map
1
+ export{getEngineeringGroupName}from"../chunk-5ZVYRX6Z.js"; //# sourceMappingURL=engineering-groups.js.map