prographs 0.12.0 → 0.13.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 (269) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +6 -4
  3. package/dist/AutoGraph-PDPEAIXL.cjs +145 -0
  4. package/dist/GraphType.js +19 -0
  5. package/dist/autograph/chartIndex.js +521 -0
  6. package/dist/autograph/chartModules.js +2 -1
  7. package/dist/autograph/index.cjs +98 -93
  8. package/dist/catalog-DI4XZ46L.cjs +142 -0
  9. package/dist/catalog.js +2 -1
  10. package/dist/charts/biologycharts/BiologySamples.js +59 -0
  11. package/dist/charts/biologycharts/PunnettSquare.js +342 -0
  12. package/dist/charts/biologycharts/biologyEnums.js +22 -1
  13. package/dist/charts/biologycharts/index.js +5 -3
  14. package/dist/charts/doecharts/DoeSamples.js +78 -0
  15. package/dist/charts/doecharts/SipocDiagram.js +453 -0
  16. package/dist/charts/doecharts/index.js +4 -2
  17. package/dist/charts/fieldcharts/SpeciesAccumulationCurve.js +350 -0
  18. package/dist/charts/fieldcharts/fieldEnums.js +8 -1
  19. package/dist/charts/fieldcharts/index.js +5 -3
  20. package/dist/charts/signals/AntennaPatternChart.js +492 -0
  21. package/dist/charts/signals/SignalSamples.js +17 -0
  22. package/dist/charts/signals/index.js +5 -3
  23. package/dist/charts/softwarediagrams/ComponentDiagram.js +504 -0
  24. package/dist/charts/softwarediagrams/DeploymentDiagram.js +419 -0
  25. package/dist/charts/softwarediagrams/SoftwareSamples.js +283 -1
  26. package/dist/charts/softwarediagrams/index.js +7 -3
  27. package/dist/charts/softwarediagrams/softwareEnums.js +45 -1
  28. package/dist/charts/sportscharts/PowerDurationCurve.js +301 -0
  29. package/dist/charts/sportscharts/SportsSamples.js +102 -0
  30. package/dist/charts/sportscharts/TrainingLoadChart.js +325 -0
  31. package/dist/charts/sportscharts/index.js +6 -2
  32. package/dist/charts/strategycharts/BassDiffusionChart.js +362 -0
  33. package/dist/charts/strategycharts/BassModel.js +96 -0
  34. package/dist/charts/strategycharts/BurnRunwayChart.js +284 -0
  35. package/dist/charts/strategycharts/CapTableChart.js +366 -0
  36. package/dist/charts/strategycharts/KanbanBoard.js +324 -0
  37. package/dist/charts/strategycharts/OkrTree.js +339 -0
  38. package/dist/charts/strategycharts/StrategyPane.js +27 -0
  39. package/dist/charts/strategycharts/StrategySamples.js +251 -0
  40. package/dist/charts/strategycharts/index.js +15 -3
  41. package/dist/charts/threefields/BsfcMap3DChart.js +231 -0
  42. package/dist/charts/threefields/CompressorMap3DChart.js +217 -0
  43. package/dist/charts/threefields/FieldGrid.js +50 -0
  44. package/dist/charts/threefields/LossLandscape3DChart.js +201 -0
  45. package/dist/charts/threefields/MapSheet.js +77 -0
  46. package/dist/charts/threefields/TerrainRoute3DChart.js +201 -0
  47. package/dist/charts/threefields/TerrainRouteMath.js +40 -0
  48. package/dist/charts/threefields/ThreeFieldBase.js +117 -0
  49. package/dist/charts/threefields/ThreeFieldsSamples.js +80 -0
  50. package/dist/charts/threefields/WaferMap3DChart.js +218 -0
  51. package/dist/charts/threefields/index.js +19 -0
  52. package/dist/charts/threesurfaces/index.js +2 -2
  53. package/dist/charts/tradingcharts/KeltnerChannelChart.js +171 -0
  54. package/dist/charts/tradingcharts/TradingMath.js +20 -0
  55. package/dist/charts/tradingcharts/index.js +4 -2
  56. package/dist/{chunk-ZL6XDXMK.cjs → chunk-26PSLEP4.cjs} +8 -8
  57. package/dist/{chunk-W3US6EFP.cjs → chunk-2BO5DZUP.cjs} +12 -12
  58. package/dist/{chunk-5DP7OUSE.cjs → chunk-2GG5YYSC.cjs} +6 -6
  59. package/dist/{chunk-7FG4JSVO.cjs → chunk-2GL2VNJU.cjs} +253 -33
  60. package/dist/{chunk-LCWMRCLF.cjs → chunk-2PYOI7OY.cjs} +21 -21
  61. package/dist/{chunk-JFWJAEBD.cjs → chunk-3U4MCSKI.cjs} +4 -4
  62. package/dist/{chunk-CUPLHZRR.cjs → chunk-3ZMM3FSK.cjs} +4 -4
  63. package/dist/{chunk-L2AV62DP.cjs → chunk-4767WQJ7.cjs} +6 -6
  64. package/dist/{chunk-DA2EYIIP.cjs → chunk-4E7FSSBF.cjs} +1210 -168
  65. package/dist/{chunk-VS5LQEZB.cjs → chunk-526STI2S.cjs} +5 -5
  66. package/dist/{chunk-RXIMEK6C.cjs → chunk-55767YPI.cjs} +20 -20
  67. package/dist/{chunk-JXLSKIUV.cjs → chunk-5FBQOMMT.cjs} +26 -26
  68. package/dist/{chunk-27PZV5BR.cjs → chunk-5N4Z7MTS.cjs} +4 -4
  69. package/dist/{chunk-KEWCUIQA.cjs → chunk-5WEV6YWA.cjs} +22 -22
  70. package/dist/chunk-5XOVVC5X.cjs +3281 -0
  71. package/dist/{chunk-HK5J7Q2W.cjs → chunk-6HLXVWXU.cjs} +9 -9
  72. package/dist/{chunk-7JG47RW4.cjs → chunk-6LQT4WJ5.cjs} +25 -25
  73. package/dist/{chunk-OCVTI6X4.cjs → chunk-6YTWOUFD.cjs} +329 -36
  74. package/dist/{chunk-W7IQCAVN.cjs → chunk-7F6W6HKL.cjs} +11 -11
  75. package/dist/{chunk-F2DCJXDM.cjs → chunk-7L6KYU5A.cjs} +21 -21
  76. package/dist/{chunk-GTGR6LPR.cjs → chunk-A4GIN4FE.cjs} +17 -17
  77. package/dist/{chunk-B2CETSR6.cjs → chunk-A4US7SA7.cjs} +5 -5
  78. package/dist/{chunk-3DIF2YYW.cjs → chunk-AOXPBLPW.cjs} +10 -10
  79. package/dist/{chunk-7TTR4UF5.cjs → chunk-ATI45Z4M.cjs} +2 -2
  80. package/dist/{chunk-5BFCIX2V.cjs → chunk-CPPMO4IQ.cjs} +434 -148
  81. package/dist/{chunk-AYZZQ6AC.cjs → chunk-CZ5KGF6Q.cjs} +9 -9
  82. package/dist/{chunk-7THJ3ZBK.cjs → chunk-D4I35MCE.cjs} +2 -2
  83. package/dist/{chunk-MCPPFRLN.cjs → chunk-DCGAAN3Z.cjs} +2 -2
  84. package/dist/{chunk-VABL6CVX.cjs → chunk-DEY36N37.cjs} +21 -21
  85. package/dist/{chunk-RNCKGJCC.cjs → chunk-DXHXD3DK.cjs} +3 -3
  86. package/dist/{chunk-A56ZGMVZ.cjs → chunk-E7B45DBZ.cjs} +11 -11
  87. package/dist/{chunk-DOR6L4MT.cjs → chunk-EJC6EAC5.cjs} +18 -18
  88. package/dist/{chunk-UPGNM7MA.cjs → chunk-EULJOOMA.cjs} +11 -11
  89. package/dist/{chunk-G4AZL4GO.cjs → chunk-EYM6LEIF.cjs} +474 -70
  90. package/dist/{chunk-NJ4X6XGV.cjs → chunk-EZTYX2GH.cjs} +5 -5
  91. package/dist/chunk-FDD4UP73.cjs +521 -0
  92. package/dist/{chunk-WJ3VH2Q4.cjs → chunk-GEAIGM3J.cjs} +110 -615
  93. package/dist/{chunk-P3SBHF43.cjs → chunk-GRUYVXTS.cjs} +2 -2
  94. package/dist/{chunk-NX4Z5LMS.cjs → chunk-H3SZXND5.cjs} +5 -5
  95. package/dist/{chunk-EE4S4TOE.cjs → chunk-HS45TOFJ.cjs} +21 -21
  96. package/dist/chunk-INGOG6OV.cjs +899 -0
  97. package/dist/{chunk-UDKA6DGT.cjs → chunk-J3CDXZHF.cjs} +4 -4
  98. package/dist/{chunk-YO6G7TKI.cjs → chunk-JAU5ADEU.cjs} +11 -11
  99. package/dist/{chunk-22LBK4GA.cjs → chunk-JQEBSHX3.cjs} +4 -4
  100. package/dist/{chunk-RXX3U7VQ.cjs → chunk-KLXGLMFU.cjs} +10 -10
  101. package/dist/chunk-KVOX36J3.cjs +327 -0
  102. package/dist/chunk-L6BGNHFL.cjs +139 -0
  103. package/dist/{chunk-GMER35L3.cjs → chunk-L7TB7PU5.cjs} +20 -20
  104. package/dist/{chunk-AFXYNBL2.cjs → chunk-LBTRYEM2.cjs} +4 -4
  105. package/dist/{chunk-WYYCKIOD.cjs → chunk-LLULNJSP.cjs} +11 -11
  106. package/dist/{chunk-J27XOSLP.cjs → chunk-LSO46AFV.cjs} +8 -8
  107. package/dist/{chunk-5XJO45ES.cjs → chunk-LZ2KJ7ZX.cjs} +11 -11
  108. package/dist/chunk-M4IQ5LIZ.cjs +422 -0
  109. package/dist/{chunk-Y2KIUKJF.cjs → chunk-MPDHDKYZ.cjs} +11 -11
  110. package/dist/{chunk-4EMPKRZU.cjs → chunk-MRQ42ZJE.cjs} +3 -3
  111. package/dist/{chunk-EU5D2MF4.cjs → chunk-MYV4KZWP.cjs} +9 -9
  112. package/dist/{chunk-XD7KN4UN.cjs → chunk-MZXVLC24.cjs} +6 -6
  113. package/dist/{chunk-PPSONARU.cjs → chunk-NLBVDFIR.cjs} +41 -2
  114. package/dist/{chunk-L3PEGMGM.cjs → chunk-NY3TBZY4.cjs} +33 -33
  115. package/dist/{chunk-6YNYXXB6.cjs → chunk-OGVVSFAR.cjs} +3 -3
  116. package/dist/{chunk-MLV7QLB6.cjs → chunk-OMTQIQMN.cjs} +6 -6
  117. package/dist/{chunk-BEEOSNK7.cjs → chunk-PEJJ6TXJ.cjs} +15 -144
  118. package/dist/{chunk-SOKOWUF5.cjs → chunk-PPGWHIU7.cjs} +2 -2
  119. package/dist/{chunk-IELWOM2J.cjs → chunk-PPO6SDAN.cjs} +6 -6
  120. package/dist/{chunk-6JTZZCSL.cjs → chunk-PUMKX5F2.cjs} +3 -3
  121. package/dist/{chunk-RFOXFY2U.cjs → chunk-PXBYWCNB.cjs} +190 -799
  122. package/dist/{chunk-3BYXOISI.cjs → chunk-Q3HB3IX6.cjs} +4 -4
  123. package/dist/{chunk-RXCOVONX.cjs → chunk-RBMUOIXE.cjs} +289 -34
  124. package/dist/{chunk-MSBNHCSE.cjs → chunk-RJHGCUUD.cjs} +6 -6
  125. package/dist/{chunk-I6VG7F6Z.cjs → chunk-RSONDMYW.cjs} +708 -141
  126. package/dist/{chunk-GZDNPHMT.cjs → chunk-SHMPFCUE.cjs} +19 -19
  127. package/dist/{chunk-ZIBVCOW6.cjs → chunk-SN4FCXFC.cjs} +19 -19
  128. package/dist/{chunk-7KM52NMN.cjs → chunk-SN5T7WYO.cjs} +2 -2
  129. package/dist/{chunk-7MSZR65Z.cjs → chunk-SQJZGVDR.cjs} +7 -7
  130. package/dist/chunk-SYABFMD7.cjs +633 -0
  131. package/dist/{chunk-2RRFEYFH.cjs → chunk-TICB3MAC.cjs} +16 -16
  132. package/dist/{chunk-AOOKHUV5.cjs → chunk-U7Z7XYR2.cjs} +5 -5
  133. package/dist/{chunk-JEWQAXVG.cjs → chunk-UA2THQFV.cjs} +6 -6
  134. package/dist/{chunk-LHZPAHU3.cjs → chunk-VIK4L2YF.cjs} +112 -521
  135. package/dist/{chunk-4YWMAQ4J.cjs → chunk-VM2Y6BDY.cjs} +4 -4
  136. package/dist/{chunk-IRRKE2ZE.cjs → chunk-VMS3KWYI.cjs} +21 -21
  137. package/dist/{chunk-4SLARW6F.cjs → chunk-VU5NUD46.cjs} +17 -17
  138. package/dist/{chunk-XHY6TVYG.cjs → chunk-VV5CVOF7.cjs} +13 -13
  139. package/dist/{chunk-CCIBPGPZ.cjs → chunk-VYSAWPSS.cjs} +57 -57
  140. package/dist/{chunk-TTNEMQ2A.cjs → chunk-W7YRWEWQ.cjs} +22 -22
  141. package/dist/{chunk-C7MUOGEW.cjs → chunk-X7R5SY62.cjs} +6 -6
  142. package/dist/{chunk-ILR5KBMB.cjs → chunk-XOK3KTSS.cjs} +6 -6
  143. package/dist/{chunk-2CZM2I3T.cjs → chunk-XUIX45VU.cjs} +19 -19
  144. package/dist/{chunk-TGRMPS3A.cjs → chunk-XWH46PVJ.cjs} +165 -43
  145. package/dist/{chunk-WQYXXECR.cjs → chunk-Y5XVMK3K.cjs} +6 -6
  146. package/dist/{chunk-AK4TX2WG.cjs → chunk-YCNKEDTG.cjs} +13 -13
  147. package/dist/{chunk-PJJB24DU.cjs → chunk-YEF7SE3X.cjs} +20 -20
  148. package/dist/{chunk-RVLV4XW6.cjs → chunk-YMTVPMU3.cjs} +22 -22
  149. package/dist/data/index.cjs +2 -2
  150. package/dist/entries/autograph-lazy.cjs +2 -2
  151. package/dist/entries/charts/acoustictransport.cjs +3 -3
  152. package/dist/entries/charts/analysischarts.cjs +3 -3
  153. package/dist/entries/charts/astrocharts.cjs +3 -3
  154. package/dist/entries/charts/bars.cjs +3 -3
  155. package/dist/entries/charts/bayesiancharts.cjs +3 -3
  156. package/dist/entries/charts/biocharts.cjs +3 -3
  157. package/dist/entries/charts/biologycharts.cjs +11 -3
  158. package/dist/entries/charts/biologycharts.d.ts +1 -1
  159. package/dist/entries/charts/biologycharts.js +3 -2
  160. package/dist/entries/charts/business.cjs +3 -3
  161. package/dist/entries/charts/carecharts.cjs +3 -3
  162. package/dist/entries/charts/chemistrycharts.cjs +3 -3
  163. package/dist/entries/charts/civicscharts.cjs +3 -3
  164. package/dist/entries/charts/clinicalcharts.cjs +3 -3
  165. package/dist/entries/charts/comparison.cjs +3 -3
  166. package/dist/entries/charts/demography.cjs +3 -3
  167. package/dist/entries/charts/density.cjs +3 -3
  168. package/dist/entries/charts/diagrams.cjs +3 -3
  169. package/dist/entries/charts/distribution.cjs +3 -3
  170. package/dist/entries/charts/doecharts.cjs +13 -3
  171. package/dist/entries/charts/doecharts.d.ts +1 -1
  172. package/dist/entries/charts/doecharts.js +2 -1
  173. package/dist/entries/charts/earthscience.cjs +3 -3
  174. package/dist/entries/charts/economicscharts.cjs +3 -3
  175. package/dist/entries/charts/energycharts.cjs +3 -3
  176. package/dist/entries/charts/engineering.cjs +3 -3
  177. package/dist/entries/charts/fieldcharts.cjs +7 -3
  178. package/dist/entries/charts/fieldcharts.d.ts +1 -1
  179. package/dist/entries/charts/fieldcharts.js +3 -2
  180. package/dist/entries/charts/financial.cjs +3 -3
  181. package/dist/entries/charts/flow.cjs +3 -3
  182. package/dist/entries/charts/frameworks.cjs +3 -3
  183. package/dist/entries/charts/genomics.cjs +3 -3
  184. package/dist/entries/charts/geoflows.cjs +3 -3
  185. package/dist/entries/charts/geomaps.cjs +3 -3
  186. package/dist/entries/charts/geosciencecharts.cjs +3 -3
  187. package/dist/entries/charts/hierarchy.cjs +3 -3
  188. package/dist/entries/charts/indicators.cjs +3 -3
  189. package/dist/entries/charts/inferencecharts.cjs +3 -3
  190. package/dist/entries/charts/layoutcharts.cjs +3 -3
  191. package/dist/entries/charts/lifescience.cjs +4 -4
  192. package/dist/entries/charts/linesareas.cjs +3 -3
  193. package/dist/entries/charts/logisticscharts.cjs +3 -3
  194. package/dist/entries/charts/machinecharts.cjs +7 -3
  195. package/dist/entries/charts/machinecharts.d.ts +1 -1
  196. package/dist/entries/charts/machinecharts.js +2 -1
  197. package/dist/entries/charts/massive.cjs +3 -3
  198. package/dist/entries/charts/mathematical.cjs +3 -3
  199. package/dist/entries/charts/matrix.cjs +3 -3
  200. package/dist/entries/charts/medicalcharts.cjs +4 -4
  201. package/dist/entries/charts/mlcharts.cjs +4 -4
  202. package/dist/entries/charts/modelcharts.cjs +6 -5
  203. package/dist/entries/charts/multivariate.cjs +3 -3
  204. package/dist/entries/charts/musiccharts.cjs +3 -3
  205. package/dist/entries/charts/network.cjs +3 -3
  206. package/dist/entries/charts/physicscharts.cjs +3 -3
  207. package/dist/entries/charts/pictorial.cjs +4 -4
  208. package/dist/entries/charts/portfoliocharts.cjs +3 -3
  209. package/dist/entries/charts/productcharts.cjs +3 -3
  210. package/dist/entries/charts/proportion.cjs +3 -3
  211. package/dist/entries/charts/qualitycharts.cjs +3 -3
  212. package/dist/entries/charts/radial.cjs +3 -3
  213. package/dist/entries/charts/reliabilitycharts.cjs +5 -3
  214. package/dist/entries/charts/scatter.cjs +3 -3
  215. package/dist/entries/charts/scientific.cjs +3 -3
  216. package/dist/entries/charts/seriescharts.cjs +3 -3
  217. package/dist/entries/charts/signals.cjs +7 -3
  218. package/dist/entries/charts/signals.d.ts +1 -1
  219. package/dist/entries/charts/signals.js +2 -1
  220. package/dist/entries/charts/softwarediagrams.cjs +21 -3
  221. package/dist/entries/charts/softwarediagrams.d.ts +1 -1
  222. package/dist/entries/charts/softwarediagrams.js +4 -2
  223. package/dist/entries/charts/sportscharts.cjs +13 -3
  224. package/dist/entries/charts/sportscharts.d.ts +1 -1
  225. package/dist/entries/charts/sportscharts.js +3 -1
  226. package/dist/entries/charts/statistics.cjs +6 -6
  227. package/dist/entries/charts/strategycharts.cjs +30 -3
  228. package/dist/entries/charts/strategycharts.d.ts +1 -1
  229. package/dist/entries/charts/strategycharts.js +6 -1
  230. package/dist/entries/charts/structure.cjs +3 -3
  231. package/dist/entries/charts/surveycharts.cjs +3 -3
  232. package/dist/entries/charts/systemscharts.cjs +3 -3
  233. package/dist/entries/charts/textcharts.cjs +5 -5
  234. package/dist/entries/charts/thematicmaps.cjs +4 -4
  235. package/dist/entries/charts/threebars.cjs +3 -3
  236. package/dist/entries/charts/threefields.cjs +53 -0
  237. package/dist/entries/charts/threefields.d.ts +1 -0
  238. package/dist/entries/charts/threefields.js +6 -0
  239. package/dist/entries/charts/threeglobe.cjs +3 -3
  240. package/dist/entries/charts/threenetwork.cjs +3 -3
  241. package/dist/entries/charts/threestrata.cjs +3 -3
  242. package/dist/entries/charts/threesurfaces.cjs +7 -3
  243. package/dist/entries/charts/threesurfaces.d.ts +1 -1
  244. package/dist/entries/charts/threesurfaces.js +2 -1
  245. package/dist/entries/charts/threevolume.cjs +4 -4
  246. package/dist/entries/charts/timeline.cjs +3 -3
  247. package/dist/entries/charts/tracecharts.cjs +3 -3
  248. package/dist/entries/charts/trackscharts.cjs +3 -3
  249. package/dist/entries/charts/tradingcharts.cjs +6 -4
  250. package/dist/entries/charts/tradingcharts.d.ts +1 -1
  251. package/dist/entries/charts/tradingcharts.js +2 -1
  252. package/dist/entries/three.cjs +60 -20
  253. package/dist/entries/three.d.ts +1 -1
  254. package/dist/entries/three.js +7 -1
  255. package/dist/index.cjs +258 -97
  256. package/dist/index.d.cts +1953 -10
  257. package/dist/index.d.ts +1953 -10
  258. package/dist/index.js +26 -5
  259. package/dist/page/index.cjs +2 -2
  260. package/dist/react/components.js +58 -1
  261. package/dist/react/index.cjs +135 -92
  262. package/dist/react/index.d.ts +1 -1
  263. package/dist/react/index.js +2 -2
  264. package/package.json +1 -1
  265. package/dist/AutoGraph-XLBJQDRB.cjs +0 -140
  266. package/dist/catalog-O7XGDD2H.cjs +0 -137
  267. package/dist/chunk-77K2HTRC.cjs +0 -3220
  268. package/dist/chunk-XEK47TVD.cjs +0 -323
  269. /package/dist/{chunk-UMEKIIHJ.cjs → chunk-LNWTC72Y.cjs} +0 -0
@@ -22,7 +22,7 @@ var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
22
22
  var _chunkPY4R3IFFcjs = require('./chunk-PY4R3IFF.cjs');
23
23
 
24
24
 
25
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
25
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
26
26
 
27
27
  // src/charts/lifescience/DoseResponseFit.ts
28
28
  var _d3 = require('d3');
@@ -215,7 +215,7 @@ var STRAY = { compound: "Compound B", dose: 10, replicate: 1, shift: 45 };
215
215
  var DoseResponseSamples = class {
216
216
  /** `{ compound, dose, response }`, three replicates per dose. */
217
217
  static assay(seed) {
218
- const { n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
218
+ const { n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
219
219
  return COMPOUNDS.flatMap(({ compound, bottom, top, ec50, hill }) => DOSES.flatMap((dose) => Array.from({ length: REPLICATES }, (_, replicate) => {
220
220
  const model = bottom + (top - bottom) * (dose ** hill / (dose ** hill + ec50 ** hill));
221
221
  const stray = compound === STRAY.compound && dose === STRAY.dose && replicate === STRAY.replicate ? STRAY.shift : 0;
@@ -508,7 +508,7 @@ var MaPlotSamples = class _MaPlotSamples {
508
508
  }
509
509
  /** `{ gene, red, green, baseMean, a, m, pvalue }`, with no p-value for the faintest genes, as after independent filtering. */
510
510
  static expression(seed, count = 1200) {
511
- const z = _chunkUMEKIIHJcjs.SampleData.distribution(seed, count * DRAWS, 1).map((row) => (row.value - 40) / 8);
511
+ const z = _chunkLNWTC72Ycjs.SampleData.distribution(seed, count * DRAWS, 1).map((row) => (row.value - 40) / 8);
512
512
  return Array.from({ length: count }, (_, i) => {
513
513
  const [level, noise, pick, size] = z.slice(i * DRAWS, (i + 1) * DRAWS);
514
514
  const a = Math.max(3, Math.min(15, 8.5 + 2.2 * level));
@@ -904,7 +904,7 @@ var QUIET = 0.1;
904
904
  var OncoPrintSamples = class {
905
905
  /** `{ sample, gene, alteration, source }`, long form. A row with no gene marks a profiled sample with nothing to show. */
906
906
  static cohort(seed, samples = 64) {
907
- const draws = _chunkUMEKIIHJcjs.SampleData.distribution(seed, samples * 20, 1).map((row) => _chunkAL4XQZH6cjs.StatMath.normalCdf((row.value - 40) / 8));
907
+ const draws = _chunkLNWTC72Ycjs.SampleData.distribution(seed, samples * 20, 1).map((row) => _chunkAL4XQZH6cjs.StatMath.normalCdf((row.value - 40) / 8));
908
908
  let next = 0;
909
909
  const u = () => draws[next++ % draws.length];
910
910
  const genes = [TP53, MYC, ...PATHWAYS.flat()];
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11;
2
2
 
3
3
 
4
4
  var _chunkTOX7G74Vcjs = require('./chunk-TOX7G74V.cjs');
@@ -23,7 +23,7 @@ var _chunkXX2YTCORcjs = require('./chunk-XX2YTCOR.cjs');
23
23
  var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
24
24
 
25
25
 
26
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
26
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
27
27
 
28
28
  // src/charts/biologycharts/biologyEnums.ts
29
29
  var HelicalWheelHelix = /* @__PURE__ */ ((HelicalWheelHelix2) => {
@@ -105,6 +105,24 @@ var SurvivorshipAge = /* @__PURE__ */ ((SurvivorshipAge2) => {
105
105
  SurvivorshipAge2["Relative"] = "relative-age";
106
106
  return SurvivorshipAge2;
107
107
  })(SurvivorshipAge || {});
108
+ var PunnettCross = /* @__PURE__ */ ((PunnettCross2) => {
109
+ PunnettCross2["Monohybrid"] = "monohybrid";
110
+ PunnettCross2["Dihybrid"] = "dihybrid";
111
+ PunnettCross2["Trihybrid"] = "trihybrid";
112
+ return PunnettCross2;
113
+ })(PunnettCross || {});
114
+ var PunnettDominance = /* @__PURE__ */ ((PunnettDominance2) => {
115
+ PunnettDominance2["Complete"] = "complete";
116
+ PunnettDominance2["Incomplete"] = "incomplete";
117
+ PunnettDominance2["Codominant"] = "codominant";
118
+ return PunnettDominance2;
119
+ })(PunnettDominance || {});
120
+ var PunnettRatios = /* @__PURE__ */ ((PunnettRatios2) => {
121
+ PunnettRatios2["List"] = "ratio-list";
122
+ PunnettRatios2["Bars"] = "ratio-bars";
123
+ PunnettRatios2["None"] = "no-ratios";
124
+ return PunnettRatios2;
125
+ })(PunnettRatios || {});
108
126
 
109
127
  // src/charts/biologycharts/EpidemicCurve.ts
110
128
  var _d3 = require('d3');
@@ -164,22 +182,24 @@ var WEB = [
164
182
  ];
165
183
  var COHORTS = [["Mountain ungulate", 13, 4.2, 9.2], ["Songbird", 8, 1, 1.9], ["Perennial herb", 10, 0.35, 0.12]];
166
184
  var REASONS = ["Wrong population", "Wrong outcome", "Not a comparative study"];
185
+ var PEA_GENES = [["Seed shape", "R", "Round", "Wrinkled"], ["Seed colour", "Y", "Yellow", "Green"], ["Flower colour", "P", "Purple", "White"]];
186
+ var PEA_CROSSES = [[[1, 1], [1, 1], [1, 1]], [[1, 0], [1, 0], [1, 1]], [[1, 1], [2, 0], [1, 0]]];
167
187
  var BiologySamples = class {
168
188
  /** `{ position, residue }`: an 18-residue amphipathic helix, hydrophobic along one face. */
169
189
  static peptide(seed) {
170
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), face = u() * 360;
190
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), face = u() * 360;
171
191
  return residues(Array.from({ length: 18 }, (_, i) => pick(u, Math.cos((i * 100 + face) * Math.PI / 180) > 0.15 ? "LLLAAIVFWM" : "KKEERSQDNT")).join(""));
172
192
  }
173
193
  /** `{ position, residue }`: a protein of four membrane-spanning stretches between polar loops. */
174
194
  static membraneProtein(seed) {
175
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
195
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
176
196
  let sequence = `M${letters(u, 16 + Math.floor(u() * 10), LOOP)}`;
177
197
  for (let i = 0; i < 4; i++) sequence += letters(u, 20 + Math.floor(u() * 4), SPAN) + letters(u, 14 + Math.floor(u() * 16), LOOP);
178
198
  return residues(sequence);
179
199
  }
180
200
  /** `{ gene, metric, inSet }`: 300 genes with a ranking metric, and a gene set enriched near the top of the list. */
181
201
  static rankedGenes(seed) {
182
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed), count = 300;
202
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed), count = 300;
183
203
  const metrics = Array.from({ length: count }, (_, i) => {
184
204
  const t = 1 - 2 * i / (count - 1);
185
205
  return Math.sign(t) * Math.abs(t) ** 1.7 * 2.8 + n() * 0.05;
@@ -188,12 +208,12 @@ var BiologySamples = class {
188
208
  }
189
209
  /** `{ site, species, count }`: three forest plots, from many even species to a few dominant ones. */
190
210
  static communities(seed) {
191
- const { n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
211
+ const { n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
192
212
  return COMMUNITIES.flatMap(([site, richness, spread]) => Array.from({ length: richness }, (_, i) => ({ site, species: `Species ${i + 1}`, count: Math.max(1, Math.round(Math.exp(2.3 + n() * spread))) })));
193
213
  }
194
214
  /** A lake food web: links run from prey to consumer, `value` is biomass on nodes and the share of the diet on links. */
195
215
  static foodWeb(seed) {
196
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
216
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
197
217
  const nodes = WEB.map(([id, group, biomass]) => ({ id, group, value: +(biomass * (0.75 + u() * 0.5)).toFixed(1) }));
198
218
  const links = WEB.flatMap(([target, , , prey]) => {
199
219
  const shares = prey.map(() => 0.3 + u());
@@ -204,7 +224,7 @@ var BiologySamples = class {
204
224
  }
205
225
  /** `{ name, sequence }`: eight aligned protein fragments with a conserved core, gaps written as `-`. */
206
226
  static alignment(seed) {
207
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), length = 30;
227
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), length = 30;
208
228
  const ancestor = letters(u, length, AMINO), gapAt = 4 + Math.floor(u() * 4);
209
229
  return TAXA.map((name, taxon) => {
210
230
  const rate = 0.04 + taxon * 0.045;
@@ -218,7 +238,7 @@ var BiologySamples = class {
218
238
  }
219
239
  /** A line list, `{ onset, classification }` per case, plus `{ onset, intervention }` rows for what was done and when. */
220
240
  static outbreak(seed) {
221
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed), start = Date.UTC(2024, 2, 4 + seed % 5);
241
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed), start = Date.UTC(2024, 2, 4 + seed % 5);
222
242
  const date = (day) => new Date(start + day * DAY).toISOString().slice(0, 10);
223
243
  const cases = Array.from({ length: 84 }, (_, i) => {
224
244
  const day = Math.min(33, Math.floor(Math.exp(Math.log(8) + n() * 0.4)) + (i % 4 === 0 ? 9 + Math.floor(u() * 6) : 0));
@@ -229,7 +249,7 @@ var BiologySamples = class {
229
249
  }
230
250
  /** `{ stage, item, n }`: the counts of a systematic review, a blank `item` being a box's own total. */
231
251
  static prisma(seed) {
232
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), part = (total, low, high) => Math.round(total * (low + u() * (high - low)));
252
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), part = (total, low, high) => Math.round(total * (low + u() * (high - low)));
233
253
  const databases = 1400 + part(1200, 0, 1), registers = 90 + part(160, 0, 1), identified = databases + registers;
234
254
  const duplicates = part(identified, 0.18, 0.26), automated = part(identified, 0.02, 0.05), other = part(identified, 4e-3, 0.012);
235
255
  const screened = identified - duplicates - automated - other, excluded = part(screened, 0.74, 0.84), sought = screened - excluded;
@@ -254,7 +274,7 @@ var BiologySamples = class {
254
274
  }
255
275
  /** `{ population, age, survivors }`: three cohorts of 1,000 followed by age class, one of each survivorship type. */
256
276
  static lifeTables(seed) {
257
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
277
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
258
278
  return COHORTS.flatMap(([population, oldest, shape, scale]) => {
259
279
  let alive = 1e3;
260
280
  return Array.from({ length: oldest + 1 }, (_, age) => {
@@ -263,6 +283,26 @@ var BiologySamples = class {
263
283
  });
264
284
  });
265
285
  }
286
+ /**
287
+ * `{ gene, parent1, parent2, dominance, dominantTrait, recessiveTrait, mixedTrait }`: three pea genes and the genotype of each parent at them.
288
+ * Odd seeds cross two plants heterozygous at every gene; other seeds change the parents, and make flower colour incompletely dominant.
289
+ */
290
+ static cross(seed) {
291
+ const parents = PEA_CROSSES[seed % 2 ? 0 : 1 + Math.floor(seed / 2) % 2], blended = seed % 2 === 0;
292
+ const genotype = (letter, dominant) => letter.repeat(dominant) + letter.toLowerCase().repeat(2 - dominant);
293
+ return PEA_GENES.map(([gene, letter, dominantTrait, recessiveTrait], i) => {
294
+ const incomplete = blended && i === 2;
295
+ return {
296
+ gene,
297
+ parent1: genotype(letter, parents[i][0]),
298
+ parent2: genotype(letter, parents[i][1]),
299
+ dominance: incomplete ? "incomplete" : "complete",
300
+ dominantTrait,
301
+ recessiveTrait,
302
+ mixedTrait: incomplete ? "Pink" : null
303
+ };
304
+ });
305
+ }
266
306
  };
267
307
 
268
308
  // src/charts/biologycharts/EpidemicCurve.ts
@@ -1037,9 +1077,219 @@ var PrismaFlowDiagram = (_class7 = class _PrismaFlowDiagram extends _chunkEEF5WR
1037
1077
  }
1038
1078
  }, _class7.__initStatic7(), _class7);
1039
1079
 
1040
- // src/charts/biologycharts/RankAbundancePlot.ts
1041
- var RankAbundancePlot = (_class8 = class _RankAbundancePlot extends _chunkUXFWDEP6cjs.StatisticalChart {
1080
+ // src/charts/biologycharts/PunnettSquare.ts
1081
+ var GENES = { ["monohybrid" /* Monohybrid */]: 1, ["dihybrid" /* Dihybrid */]: 2, ["trihybrid" /* Trihybrid */]: 3 };
1082
+ var CHAR2 = 6.2;
1083
+ var CAPTION = 15;
1084
+ var HEAD3 = 20;
1085
+ var GAP = 16;
1086
+ var LINE = 14;
1087
+ var BAR = 20;
1088
+ var gcd = (a, b) => b ? gcd(b, a % b) : a;
1089
+ var PunnettSquare = (_class8 = class _PunnettSquare extends _chunkEEF5WRRZcjs.Chart2D {
1042
1090
  static __initStatic8() {this.meta = {
1091
+ id: "punnett-square",
1092
+ name: "Punnett square",
1093
+ family: "matrix" /* Matrix */,
1094
+ dimension: 2 /* Two */,
1095
+ shape: "table" /* Table */,
1096
+ description: "Crosses two parents from their genotypes: gametes along the top and side, offspring genotypes in the cells coloured by phenotype, and the genotype and phenotype ratios, for one gene or several with dominance set per gene.",
1097
+ tags: ["genetics", "mendel", "monohybrid", "dihybrid", "genotype", "phenotype", "inheritance", "biology"],
1098
+ sample: (seed) => BiologySamples.cross(seed),
1099
+ variants: {
1100
+ cross: ["dihybrid" /* Dihybrid */, "monohybrid" /* Monohybrid */],
1101
+ ratios: Object.values(PunnettRatios)
1102
+ }
1103
+ }}
1104
+ /** True when the ratio list is drawn, which names every phenotype beside its colour. */
1105
+ #keyed = false;
1106
+ defaults() {
1107
+ return {
1108
+ gene: "gene",
1109
+ parent1: "parent1",
1110
+ parent2: "parent2",
1111
+ dominance: "dominance",
1112
+ dominantTrait: "dominantTrait",
1113
+ recessiveTrait: "recessiveTrait",
1114
+ mixedTrait: "mixedTrait",
1115
+ parents: ["Parent 1", "Parent 2"],
1116
+ cross: "dihybrid" /* Dihybrid */,
1117
+ ratios: "ratio-list" /* List */
1118
+ };
1119
+ }
1120
+ plotMargin() {
1121
+ return { top: 8, right: 12, bottom: 8, left: 12 };
1122
+ }
1123
+ get legendPosition() {
1124
+ return this.#keyed ? "none" /* None */ : super.legendPosition;
1125
+ }
1126
+ /** The two alleles of a genotype: `Rr` gives R and r, and `IA/i` or `IA i` gives alleles of more than one letter. Anything else gives none. */
1127
+ static alleles(genotype) {
1128
+ const parts = /[\s/|,]/.test(genotype) ? genotype.split(/[\s/|,]+/).filter(Boolean) : [...genotype];
1129
+ return parts.length === 2 ? parts : [];
1130
+ }
1131
+ /** Counts as the lowest whole-number ratio: 12, 4 gives `3 : 1`. */
1132
+ static ratio(counts) {
1133
+ const shared = counts.reduce(gcd, 0) || 1;
1134
+ return counts.map((count) => count / shared).join(" : ");
1135
+ }
1136
+ #genes() {
1137
+ const { data, gene, parent1, parent2, dominance, dominantTrait, recessiveTrait, mixedTrait, cross } = this.options, seen = /* @__PURE__ */ new Set();
1138
+ const upper = (allele) => allele === allele.toUpperCase() && allele !== allele.toLowerCase();
1139
+ return (Array.isArray(data) ? data : []).flatMap((row, i) => {
1140
+ if (row === null || typeof row !== "object") return [];
1141
+ const name = BiologyRows.text(row[gene], `Gene ${i + 1}`);
1142
+ const parents = [_PunnettSquare.alleles(BiologyRows.text(row[parent1])), _PunnettSquare.alleles(BiologyRows.text(row[parent2]))];
1143
+ if (seen.has(name) || !parents[0].length || !parents[1].length) return [];
1144
+ seen.add(name);
1145
+ const written = [...new Set(parents.flat())], lead = _nullishCoalesce(written.find(upper), () => ( written[0])), rest = written.filter((allele) => allele !== lead);
1146
+ const said = BiologyRows.text(row[dominance]).toLowerCase();
1147
+ const kind = said.startsWith("inc") ? "incomplete" /* Incomplete */ : said.startsWith("cod") ? "codominant" /* Codominant */ : "complete" /* Complete */;
1148
+ const weak = _nullishCoalesce(rest[0], () => ( lead)), complete = kind === "complete" /* Complete */;
1149
+ return [{
1150
+ dominance: kind,
1151
+ alleles: [lead, ...rest],
1152
+ parents,
1153
+ traits: [BiologyRows.text(row[dominantTrait], complete ? `${lead}_` : `${lead}${lead}`), BiologyRows.text(row[recessiveTrait], `${weak}${weak}`), BiologyRows.text(row[mixedTrait], `${lead}${weak}`)]
1154
+ }];
1155
+ }).slice(0, _nullishCoalesce(GENES[cross], () => ( 2)));
1156
+ }
1157
+ /** What an offspring carrying `pair` shows at a gene. Only complete dominance hides the second allele of a heterozygote. */
1158
+ static #trait({ alleles, dominance, traits }, pair) {
1159
+ const carried = pair.filter((allele) => allele === alleles[0]).length;
1160
+ if (carried === 2 || carried === 1 && dominance === "complete" /* Complete */) return traits[0];
1161
+ return carried ? traits[2] : traits[1];
1162
+ }
1163
+ /** The cross worked out: every gamete of each parent, the offspring of each pairing, and the tallies behind the ratios. */
1164
+ get square() {
1165
+ const genes = this.#genes(), single = genes.every((gene) => gene.alleles.every((allele) => allele.length === 1));
1166
+ const gametes = (parent) => genes.length ? genes.reduce((all, gene) => all.flatMap((gamete) => gene.parents[parent].map((allele) => [...gamete, allele])), [[]]) : [];
1167
+ const pair = (gene, a, b) => [a, b].sort((p, q) => gene.alleles.indexOf(p) - gene.alleles.indexOf(q));
1168
+ const written = (pairs) => pairs.map((alleles) => alleles.join(single ? "" : "/")).join(single ? "" : " ");
1169
+ const down2 = gametes(0), across = gametes(1);
1170
+ const cells = down2.flatMap((a, row) => across.map((b, column) => {
1171
+ const pairs = genes.map((gene, g) => pair(gene, a[g], b[g]));
1172
+ return { row, column, genotype: written(pairs), phenotype: genes.map((gene, g) => _PunnettSquare.#trait(gene, pairs[g])).join(", ") };
1173
+ }));
1174
+ const tally = (name) => {
1175
+ const classes = /* @__PURE__ */ new Map();
1176
+ for (const cell of cells) (_nullishCoalesce(classes.get(name(cell)), () => ( classes.set(name(cell), { name: name(cell), count: 0, phenotype: cell.phenotype }).get(name(cell))))).count++;
1177
+ return [...classes.values()];
1178
+ };
1179
+ const phenotypes = tally((cell) => cell.phenotype), rank = new Map(phenotypes.map((entry, i) => [entry.name, i]));
1180
+ const text = (gamete) => gamete.join(single ? "" : " ");
1181
+ return {
1182
+ side: down2.map(text),
1183
+ top: across.map(text),
1184
+ cells,
1185
+ phenotypes,
1186
+ parents: [written(genes.map((gene) => pair(gene, gene.parents[0][0], gene.parents[0][1]))), written(genes.map((gene) => pair(gene, gene.parents[1][0], gene.parents[1][1])))],
1187
+ genotypes: tally((cell) => cell.genotype).sort((a, b) => rank.get(a.phenotype) - rank.get(b.phenotype))
1188
+ };
1189
+ }
1190
+ draw(ctx) {
1191
+ const { ratios, parents: names } = this.options, { width, height } = ctx.plot, { palette, theme } = ctx;
1192
+ const { side, top, parents, cells, genotypes, phenotypes } = this.square, n = side.length, total = cells.length;
1193
+ for (const entry of phenotypes) palette.color(entry.name);
1194
+ const count = new Map(genotypes.map((entry) => [entry.name, entry.count]));
1195
+ const letters2 = Math.max(1, ...side.map((gamete) => gamete.length), ...top.map((gamete) => gamete.length));
1196
+ const head = Math.max(18, Math.min(13, 60 / letters2) * 0.62 * letters2 + 10), sideBand = CAPTION + head, topBand = CAPTION + HEAD3;
1197
+ const panel = ratios !== "no-ratios" /* None */ && n ? Math.max(118, Math.min(230, width * 0.38)) : 0;
1198
+ const beside = panel > 0 && width - sideBand - panel - GAP >= 80 ? panel + GAP : 0;
1199
+ const size = Math.max(10, Math.min(height - topBand, width - sideBand - beside)), cell = size / (n || 1), pad = cell >= 12 ? 2 : 1;
1200
+ const gx = sideBand + (width - sideBand - size - beside) / 2, gy = topBand + (height - topBand - size) / 2;
1201
+ this.#keyed = beside > 0 && ratios === "ratio-list" /* List */;
1202
+ const key = (d) => `${d.row}/${d.column}`, cx = (d) => gx + (d.column + 0.5) * cell, cy = (d) => gy + (d.row + 0.5) * cell;
1203
+ const rects = ctx.marks("cells", "rect", cells, key).attr("fill", (d) => palette.color(d.phenotype)).attr("rx", Math.min(4, cell / 8));
1204
+ ctx.set(rects, { x: (d) => cx(d) - (cell - pad) / 2, y: (d) => cy(d) - (cell - pad) / 2, width: Math.max(0.5, cell - pad), height: Math.max(0.5, cell - pad), opacity: 1 }, { opacity: 0 }, 240 / (total || 1));
1205
+ ctx.hover(rects, (d) => ({
1206
+ title: d.genotype,
1207
+ color: palette.color(d.phenotype),
1208
+ rows: [["Phenotype", d.phenotype], ["Gametes", `${side[d.row]} and ${top[d.column]}`], ["Share of offspring", `${count.get(d.genotype)} in ${total}`]]
1209
+ }));
1210
+ const longest = Math.max(1, ...cells.map((d) => d.genotype.length)), font = Math.min(14, (cell - 6) / (longest * 0.62));
1211
+ const lettered = font >= 6.5 ? cells : [], captioned = cell >= 46 && phenotypes.every((entry) => _chunkEEF5WRRZcjs.TextFit.width(entry.name, 5.6) <= cell - 8);
1212
+ const onCell = (name, data, size2, shift, words) => {
1213
+ const marks = ctx.text(ctx.marks(name, "text", data, key), size2, "ink").attr("text-anchor", "middle").attr("dy", "0.35em").attr("fill", (d) => palette.inkOn(palette.color(d.phenotype))).style("pointer-events", "none").text(words);
1214
+ ctx.set(marks, { x: cx, y: (d) => cy(d) + shift });
1215
+ return marks;
1216
+ };
1217
+ onCell("cell-genotypes", lettered, font, captioned ? -7 : 0, (d) => d.genotype).attr("font-weight", 600);
1218
+ onCell("cell-phenotypes", captioned ? lettered : [], 10, 9, (d) => d.phenotype);
1219
+ const gameteFont = Math.max(7, Math.min(13, (Math.min(cell, head) - 3) / (letters2 * 0.62)));
1220
+ const headers = [
1221
+ ...top.map((text, i) => ({ key: `top-${i}`, text, x: gx + (i + 0.5) * cell, y: gy - 9, anchor: "middle" })),
1222
+ ...side.map((text, i) => ({ key: `side-${i}`, text, x: gx - 7, y: gy + (i + 0.5) * cell, anchor: "end" }))
1223
+ ];
1224
+ const gametes = ctx.text(ctx.marks("axis-gametes", "text", cell >= gameteFont * 0.9 ? headers : [], (d) => d.key), gameteFont, "ink").attr("font-weight", 600).attr("dy", "0.35em").attr("text-anchor", (d) => d.anchor).text((d) => d.text);
1225
+ ctx.set(gametes, { x: (d) => d.x, y: (d) => d.y });
1226
+ const captions = n ? [
1227
+ { key: "top", text: `${names[1]}: ${parents[1]}`, room: Math.min(width, size + 2 * Math.min(gx, width - gx - size)), transform: `translate(${(gx + size / 2).toFixed(1)},${(gy - HEAD3 - 5).toFixed(1)})` },
1228
+ { key: "side", text: `${names[0]}: ${parents[0]}`, room: height, transform: `translate(${(gx - head - 5).toFixed(1)},${(gy + size / 2).toFixed(1)}) rotate(-90)` }
1229
+ ] : [];
1230
+ const titled = ctx.text(ctx.marks("axis-parents", "text", captions, (d) => d.key)).attr("text-anchor", "middle").text((d) => _chunkEEF5WRRZcjs.TextFit.fit(d.text, d.room, CHAR2));
1231
+ ctx.set(titled, { transform: (d) => d.transform });
1232
+ const notes = n ? [] : [{ key: "empty", text: "No genotypes to cross", x: 4, y: 12, muted: true }];
1233
+ const chips = [];
1234
+ const px = gx + size + GAP;
1235
+ let y = gy - topBand + 10;
1236
+ const heading = (title, tallies) => {
1237
+ const summary = _PunnettSquare.ratio(tallies.map((entry) => entry.count)), lead = _chunkEEF5WRRZcjs.TextFit.width(title, 6.9) + 8, inline = lead + _chunkEEF5WRRZcjs.TextFit.width(summary, CHAR2) <= panel;
1238
+ notes.push({ key: title, text: title, x: px, y, bold: true });
1239
+ const lines = inline ? [summary] : summary.split(" : ").reduce((rows, part) => {
1240
+ const last = rows.length - 1, joined = `${rows[last]} : ${part}`;
1241
+ if (rows.length && (_chunkEEF5WRRZcjs.TextFit.width(joined, CHAR2) + 8 <= panel || rows.length === 3)) rows[last] = joined;
1242
+ else rows.push(part);
1243
+ return rows;
1244
+ }, []);
1245
+ lines.forEach((text, i) => {
1246
+ if (!inline) y += LINE;
1247
+ notes.push({ key: `${title}-ratio-${i}`, text: _chunkEEF5WRRZcjs.TextFit.fit(i < lines.length - 1 ? `${text} :` : text, inline ? panel - lead : panel, CHAR2), x: inline ? px + lead : px, y });
1248
+ });
1249
+ };
1250
+ const sections = beside ? [["Phenotypes", phenotypes], ["Genotypes", genotypes]] : [];
1251
+ sections.forEach(([title, tallies], s) => {
1252
+ heading(title, tallies);
1253
+ if (ratios === "ratio-bars" /* Bars */) {
1254
+ const inner = (entry) => Math.max(0.5, panel * entry.count / (total || 1) - 2), fits = (entry, text) => _chunkEEF5WRRZcjs.TextFit.width(text, 5.8) + 4 <= inner(entry);
1255
+ const named = s > 0 && tallies.every((entry) => fits(entry, entry.name));
1256
+ let x = px;
1257
+ for (const entry of tallies) {
1258
+ const label = named ? entry.name : fits(entry, `${entry.count}`) ? `${entry.count}` : void 0;
1259
+ chips.push({ key: `${title}/${entry.name}`, x, y: y + 7, width: inner(entry), height: BAR, fill: palette.color(entry.phenotype), tally: entry, label });
1260
+ x += inner(entry) + 2;
1261
+ }
1262
+ y += 7 + BAR + 24;
1263
+ return;
1264
+ }
1265
+ y += LINE + 2;
1266
+ const labels = tallies.map((entry) => `${entry.count} ${entry.name}`), widest = Math.max(...labels.map((label) => _chunkEEF5WRRZcjs.TextFit.width(label, CHAR2)));
1267
+ const columns = Math.max(1, Math.min(tallies.length, Math.floor((panel + 8) / (widest + 22)))), step = panel / columns;
1268
+ const kept = s ? 0 : Math.min(2, Math.ceil(genotypes.length / 2)) + 3;
1269
+ const slots = Math.max(1, Math.floor((height - y) / LINE + 1) - kept) * columns;
1270
+ const shown = tallies.length <= slots ? tallies.length : slots - 1;
1271
+ tallies.slice(0, shown).forEach((entry, i) => {
1272
+ const at = px + i % columns * step, row = y + Math.floor(i / columns) * LINE;
1273
+ chips.push({ key: `${title}/${entry.name}`, x: at, y: row - 9, width: 10, height: 10, fill: palette.color(entry.phenotype), tally: entry });
1274
+ notes.push({ key: `${title}/${entry.name}`, text: _chunkEEF5WRRZcjs.TextFit.fit(labels[i], step - 16, CHAR2), x: at + 14, y: row });
1275
+ });
1276
+ if (shown < tallies.length) notes.push({ key: `${title}-more`, text: `+${tallies.length - shown} more`, x: px + shown % columns * step, y: y + Math.floor(shown / columns) * LINE, muted: true });
1277
+ y += Math.ceil((shown + (shown < tallies.length ? 1 : 0)) / columns) * LINE + 8;
1278
+ });
1279
+ const swatches = ctx.marks("ratio-marks", "rect", chips, (d) => d.key).attr("fill", (d) => d.fill).attr("rx", 3);
1280
+ ctx.set(swatches, { x: (d) => d.x, y: (d) => d.y, width: (d) => d.width, height: (d) => d.height });
1281
+ ctx.hover(swatches, (d) => ({ title: d.tally.name, color: d.fill, rows: [["Offspring", `${d.tally.count} in ${total}`], ...d.tally.name === d.tally.phenotype ? [] : [["Phenotype", d.tally.phenotype]]] }));
1282
+ const inside = ctx.text(ctx.marks("ratio-labels", "text", chips.filter((chip) => chip.label), (d) => d.key), 10, "ink").attr("text-anchor", "middle").attr("dy", "0.35em").attr("fill", (d) => palette.inkOn(d.fill)).style("pointer-events", "none").text((d) => d.label);
1283
+ ctx.set(inside, { x: (d) => d.x + d.width / 2, y: (d) => d.y + d.height / 2 });
1284
+ const written = ctx.marks("axis-ratios", "text", notes, (d) => d.key).attr("font-weight", (d) => d.bold ? 600 : 400).text((d) => d.text);
1285
+ ctx.text(written).attr("fill", (d) => d.bold ? theme.ink : d.muted ? theme.inkMuted : theme.inkSecondary);
1286
+ ctx.set(written, { x: (d) => d.x, y: (d) => d.y });
1287
+ }
1288
+ }, _class8.__initStatic8(), _class8);
1289
+
1290
+ // src/charts/biologycharts/RankAbundancePlot.ts
1291
+ var RankAbundancePlot = (_class9 = class _RankAbundancePlot extends _chunkUXFWDEP6cjs.StatisticalChart {
1292
+ static __initStatic9() {this.meta = {
1043
1293
  id: "rank-abundance-plot",
1044
1294
  name: "Rank-abundance plot",
1045
1295
  family: "distribution" /* Distribution */,
@@ -1154,19 +1404,19 @@ var RankAbundancePlot = (_class8 = class _RankAbundancePlot extends _chunkUXFWDE
1154
1404
  { r: 3.5, key: (d) => `${d.community.site}/${d.item.species}` }
1155
1405
  );
1156
1406
  }
1157
- }, _class8.__initStatic8(), _class8);
1407
+ }, _class9.__initStatic9(), _class9);
1158
1408
 
1159
1409
  // src/charts/biologycharts/SequenceAlignmentView.ts
1160
- var GAP = "-";
1161
- var CHAR2 = 6.2;
1410
+ var GAP2 = "-";
1411
+ var CHAR3 = 6.2;
1162
1412
  var TICKS = 13;
1163
1413
  var TRACK = 22;
1164
1414
  var SPACE = 4;
1165
1415
  var KEY = 18;
1166
1416
  var KEY_STEPS = 5;
1167
1417
  var KEY_TEXT = "low to high conservation";
1168
- var SequenceAlignmentView = (_class9 = class _SequenceAlignmentView extends _chunkEEF5WRRZcjs.Chart2D {
1169
- static __initStatic9() {this.meta = {
1418
+ var SequenceAlignmentView = (_class10 = class _SequenceAlignmentView extends _chunkEEF5WRRZcjs.Chart2D {
1419
+ static __initStatic10() {this.meta = {
1170
1420
  id: "sequence-alignment",
1171
1421
  name: "Sequence alignment view",
1172
1422
  family: "matrix" /* Matrix */,
@@ -1200,19 +1450,19 @@ var SequenceAlignmentView = (_class9 = class _SequenceAlignmentView extends _chu
1200
1450
  return Array.from({ length }, (_, column) => {
1201
1451
  const counts = /* @__PURE__ */ new Map();
1202
1452
  for (const letters2 of sequences) {
1203
- const letter = _nullishCoalesce(letters2[column], () => ( GAP));
1204
- if (letter !== GAP) counts.set(letter, (_nullishCoalesce(counts.get(letter), () => ( 0))) + 1);
1453
+ const letter = _nullishCoalesce(letters2[column], () => ( GAP2));
1454
+ if (letter !== GAP2) counts.set(letter, (_nullishCoalesce(counts.get(letter), () => ( 0))) + 1);
1205
1455
  }
1206
1456
  const ranked = [...counts].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])), filled = ranked.reduce((sum2, [, count]) => sum2 + count, 0);
1207
1457
  const entropy = -ranked.reduce((sum2, [, count]) => sum2 + count / filled * Math.log2(count / filled), 0);
1208
- return { consensus: _nullishCoalesce(_optionalChain([ranked, 'access', _17 => _17[0], 'optionalAccess', _18 => _18[0]]), () => ( GAP)), gaps: sequences.length - filled, conservation: filled ? Math.max(0, 1 - entropy / most) * (filled / sequences.length) : 0 };
1458
+ return { consensus: _nullishCoalesce(_optionalChain([ranked, 'access', _17 => _17[0], 'optionalAccess', _18 => _18[0]]), () => ( GAP2)), gaps: sequences.length - filled, conservation: filled ? Math.max(0, 1 - entropy / most) * (filled / sequences.length) : 0 };
1209
1459
  });
1210
1460
  }
1211
1461
  #read() {
1212
1462
  const { data, name, sequence } = this.options;
1213
1463
  return (Array.isArray(data) ? data : []).flatMap((row, i) => {
1214
1464
  if (row === null || typeof row !== "object") return [];
1215
- const letters2 = BiologyRows.text(row[sequence]).toUpperCase().replace(/\./g, GAP).replace(/[^A-Z-]/g, "");
1465
+ const letters2 = BiologyRows.text(row[sequence]).toUpperCase().replace(/\./g, GAP2).replace(/[^A-Z-]/g, "");
1216
1466
  return letters2 ? [{ name: BiologyRows.text(row[name], `Sequence ${i + 1}`), letters: letters2 }] : [];
1217
1467
  });
1218
1468
  }
@@ -1221,7 +1471,7 @@ var SequenceAlignmentView = (_class9 = class _SequenceAlignmentView extends _chu
1221
1471
  const rows = this.#read(), columns = _SequenceAlignmentView.columns(rows.map((row) => row.letters)), nucleic = _SequenceAlignmentView.nucleic(rows.map((row) => row.letters));
1222
1472
  const byConservation = colorBy === "by-conservation" /* Conservation */, differences = colorBy === "differences" /* Differences */;
1223
1473
  const labels = [...rows.map((row) => row.name), ...consensus ? ["Consensus"] : [], ...track ? ["Conservation"] : []];
1224
- const gutter = rows.length ? Math.min(96, width * 0.27, Math.max(...labels.map((label) => _chunkEEF5WRRZcjs.TextFit.width(label, CHAR2))) + 10) : 0;
1474
+ const gutter = rows.length ? Math.min(96, width * 0.27, Math.max(...labels.map((label) => _chunkEEF5WRRZcjs.TextFit.width(label, CHAR3))) + 10) : 0;
1225
1475
  const cellW = Math.min(22, (width - gutter) / (columns.length || 1));
1226
1476
  const fixed = TICKS + (track ? TRACK + SPACE : 0) + (consensus ? SPACE : 0) + (byConservation ? KEY : 0);
1227
1477
  const cellH = Math.max(3, Math.min(20, (height - fixed) / (rows.length + (consensus ? 1 : 0) || 1)));
@@ -1230,14 +1480,14 @@ var SequenceAlignmentView = (_class9 = class _SequenceAlignmentView extends _chu
1230
1480
  const columnX = (column) => gutter + column * cellW;
1231
1481
  const kind = (letter) => nucleic ? letter : ResidueChemistry.classOf(letter);
1232
1482
  if (!byConservation) {
1233
- const present = new Set(rows.flatMap((row) => [...row.letters].filter((letter) => letter !== GAP).map(kind)));
1483
+ const present = new Set(rows.flatMap((row) => [...row.letters].filter((letter) => letter !== GAP2).map(kind)));
1234
1484
  for (const name of nucleic ? [...present].sort() : ResidueChemistry.classes) if (present.has(name)) palette.color(name);
1235
1485
  }
1236
1486
  const fill = (letter, column) => byConservation ? palette.sequential(columns[column].conservation) : palette.color(kind(letter));
1237
1487
  const mark = (owner, letter, column, y) => ({ key: `${owner}/${column}`, owner, column, letter, x: columnX(column), y, fill: fill(letter, column) });
1238
- const body = rows.flatMap((row, r) => [...row.letters].flatMap((letter, column) => letter === GAP ? [] : [mark(`${r}:${row.name}`, letter, column, top + r * cellH)]));
1488
+ const body = rows.flatMap((row, r) => [...row.letters].flatMap((letter, column) => letter === GAP2 ? [] : [mark(`${r}:${row.name}`, letter, column, top + r * cellH)]));
1239
1489
  const matches = differences ? body.filter((cell) => cell.letter === columns[cell.column].consensus) : [];
1240
- const summary = consensus ? columns.flatMap((column, i) => column.consensus === GAP ? [] : [mark("Consensus", column.consensus, i, consensusY)]) : [];
1490
+ const summary = consensus ? columns.flatMap((column, i) => column.consensus === GAP2 ? [] : [mark("Consensus", column.consensus, i, consensusY)]) : [];
1241
1491
  const cells = [...differences ? body.filter((cell) => cell.letter !== columns[cell.column].consensus) : body, ...summary];
1242
1492
  const tell = (cell) => {
1243
1493
  const column = columns[cell.column];
@@ -1264,17 +1514,17 @@ var SequenceAlignmentView = (_class9 = class _SequenceAlignmentView extends _chu
1264
1514
  ...cellH >= 9 ? rows.map((row, r) => ({ key: `row-${r}`, text: row.name, y: top + (r + 0.5) * cellH, bold: false })) : [],
1265
1515
  ...consensus ? [{ key: "consensus", text: "Consensus", y: consensusY + cellH / 2, bold: true }] : []
1266
1516
  ];
1267
- const names = ctx.text(ctx.marks("axis-names", "text", named, (d) => d.key)).attr("text-anchor", "end").attr("dy", "0.32em").attr("font-weight", (d) => d.bold ? 600 : 400).text((d) => _chunkEEF5WRRZcjs.TextFit.fit(d.text, gutter - 6, CHAR2));
1517
+ const names = ctx.text(ctx.marks("axis-names", "text", named, (d) => d.key)).attr("text-anchor", "end").attr("dy", "0.32em").attr("font-weight", (d) => d.bold ? 600 : 400).text((d) => _chunkEEF5WRRZcjs.TextFit.fit(d.text, gutter - 6, CHAR3));
1268
1518
  ctx.set(names, { x: gutter - 6, y: (d) => d.y });
1269
1519
  const keyY = consensusY + (consensus ? cellH : -SPACE) + 7;
1270
1520
  const steps = byConservation && rows.length ? Array.from({ length: KEY_STEPS }, (_, i) => i) : [];
1271
1521
  const swatches = ctx.marks("conservation-key", "rect", steps, (d) => d).attr("fill", (d) => palette.sequential(d / (KEY_STEPS - 1))).attr("rx", 2);
1272
1522
  ctx.set(swatches, { x: (d) => gutter + d * 14, y: keyY, width: 12, height: 8 });
1273
- const fits = gutter + KEY_STEPS * 14 + 4 + _chunkEEF5WRRZcjs.TextFit.width(KEY_TEXT, CHAR2) <= width;
1523
+ const fits = gutter + KEY_STEPS * 14 + 4 + _chunkEEF5WRRZcjs.TextFit.width(KEY_TEXT, CHAR3) <= width;
1274
1524
  const caption = ctx.text(ctx.marks("conservation-key-text", "text", steps.length && fits ? [KEY_TEXT] : []), 10, "muted").text((d) => d);
1275
1525
  ctx.set(caption, { x: gutter + KEY_STEPS * 14 + 4, y: keyY + 8 });
1276
1526
  }
1277
- }, _class9.__initStatic9(), _class9);
1527
+ }, _class10.__initStatic10(), _class10);
1278
1528
 
1279
1529
  // src/charts/biologycharts/SurvivorshipCurve.ts
1280
1530
  var RADIX = 1e3;
@@ -1284,8 +1534,8 @@ var LABELS = {
1284
1534
  ["linear-scale" /* Linear */]: [[0.62, 8, -4, "start"], [0.2, 8, -8, "start"], [0.02, 8, 3, "start"]]
1285
1535
  };
1286
1536
  var SAMPLES = 60;
1287
- var SurvivorshipCurve = (_class10 = class _SurvivorshipCurve extends _chunkUXFWDEP6cjs.StatisticalChart {
1288
- static __initStatic10() {this.meta = {
1537
+ var SurvivorshipCurve = (_class11 = class _SurvivorshipCurve extends _chunkUXFWDEP6cjs.StatisticalChart {
1538
+ static __initStatic11() {this.meta = {
1289
1539
  id: "survivorship-curve",
1290
1540
  name: "Survivorship curve",
1291
1541
  family: "scientific" /* Scientific */,
@@ -1378,7 +1628,7 @@ var SurvivorshipCurve = (_class10 = class _SurvivorshipCurve extends _chunkUXFWD
1378
1628
  return { key: name, text: name, x: fx(at(life)) + dx, y: fy(_SurvivorshipCurve.reference(shape, life)) + dy, anchor, tone: "muted" };
1379
1629
  }));
1380
1630
  }
1381
- }, _class10.__initStatic10(), _class10);
1631
+ }, _class11.__initStatic11(), _class11);
1382
1632
 
1383
1633
  // src/charts/biologycharts/index.ts
1384
1634
  var biologychartsCatalog = [
@@ -1390,7 +1640,8 @@ var biologychartsCatalog = [
1390
1640
  SurvivorshipCurve,
1391
1641
  FoodWebChart,
1392
1642
  EpidemicCurve,
1393
- PrismaFlowDiagram
1643
+ PrismaFlowDiagram,
1644
+ PunnettSquare
1394
1645
  ];
1395
1646
 
1396
1647
 
@@ -1421,4 +1672,8 @@ var biologychartsCatalog = [
1421
1672
 
1422
1673
 
1423
1674
 
1424
- exports.HelicalWheelHelix = HelicalWheelHelix; exports.HelicalWheelLayout = HelicalWheelLayout; exports.HydropathyScale = HydropathyScale; exports.HydropathyForm = HydropathyForm; exports.GseaWeighting = GseaWeighting; exports.RankAbundanceMeasure = RankAbundanceMeasure; exports.RankAbundanceModel = RankAbundanceModel; exports.RankAbundanceRank = RankAbundanceRank; exports.FoodWebLevel = FoodWebLevel; exports.SequenceAlignmentColor = SequenceAlignmentColor; exports.EpidemicCurveBin = EpidemicCurveBin; exports.EpidemicCurveForm = EpidemicCurveForm; exports.PrismaDetail = PrismaDetail; exports.SurvivorshipScale = SurvivorshipScale; exports.SurvivorshipAge = SurvivorshipAge; exports.EpidemicCurve = EpidemicCurve; exports.FoodWebChart = FoodWebChart; exports.GseaEnrichmentPlot = GseaEnrichmentPlot; exports.ResidueClass = ResidueClass; exports.HelicalWheelPlot = HelicalWheelPlot; exports.HydropathyPlot = HydropathyPlot; exports.PrismaStage = PrismaStage; exports.PrismaFlowDiagram = PrismaFlowDiagram; exports.RankAbundancePlot = RankAbundancePlot; exports.SequenceAlignmentView = SequenceAlignmentView; exports.SurvivorshipCurve = SurvivorshipCurve; exports.biologychartsCatalog = biologychartsCatalog;
1675
+
1676
+
1677
+
1678
+
1679
+ exports.HelicalWheelHelix = HelicalWheelHelix; exports.HelicalWheelLayout = HelicalWheelLayout; exports.HydropathyScale = HydropathyScale; exports.HydropathyForm = HydropathyForm; exports.GseaWeighting = GseaWeighting; exports.RankAbundanceMeasure = RankAbundanceMeasure; exports.RankAbundanceModel = RankAbundanceModel; exports.RankAbundanceRank = RankAbundanceRank; exports.FoodWebLevel = FoodWebLevel; exports.SequenceAlignmentColor = SequenceAlignmentColor; exports.EpidemicCurveBin = EpidemicCurveBin; exports.EpidemicCurveForm = EpidemicCurveForm; exports.PrismaDetail = PrismaDetail; exports.SurvivorshipScale = SurvivorshipScale; exports.SurvivorshipAge = SurvivorshipAge; exports.PunnettCross = PunnettCross; exports.PunnettDominance = PunnettDominance; exports.PunnettRatios = PunnettRatios; exports.EpidemicCurve = EpidemicCurve; exports.FoodWebChart = FoodWebChart; exports.GseaEnrichmentPlot = GseaEnrichmentPlot; exports.ResidueClass = ResidueClass; exports.HelicalWheelPlot = HelicalWheelPlot; exports.HydropathyPlot = HydropathyPlot; exports.PrismaStage = PrismaStage; exports.PrismaFlowDiagram = PrismaFlowDiagram; exports.PunnettSquare = PunnettSquare; exports.RankAbundancePlot = RankAbundancePlot; exports.SequenceAlignmentView = SequenceAlignmentView; exports.SurvivorshipCurve = SurvivorshipCurve; exports.biologychartsCatalog = biologychartsCatalog;
@@ -18,7 +18,7 @@ var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
18
18
  var _chunkPY4R3IFFcjs = require('./chunk-PY4R3IFF.cjs');
19
19
 
20
20
 
21
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
21
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
22
22
 
23
23
  // src/charts/trackscharts/tracksEnums.ts
24
24
  var GeneTrackLayout = /* @__PURE__ */ ((GeneTrackLayout2) => {
@@ -259,7 +259,7 @@ var PLASMID_LENGTH = 5370;
259
259
  var TracksSamples = class {
260
260
  /** Invented feature rows: `{ gene, transcript, feature, start, end, strand }`, for two neighbouring genes on opposite strands. */
261
261
  static geneModels(seed) {
262
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
262
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
263
263
  const exons = (count, from) => {
264
264
  let at = from;
265
265
  return Array.from({ length: count }, () => {
@@ -287,7 +287,7 @@ var TracksSamples = class {
287
287
  }
288
288
  /** Invented rows for one protein: mutations with `{ position, change, type, count, cohort }`, domains with `{ domain, start, end }`, and `length` on all. */
289
289
  static mutations(seed) {
290
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
290
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
291
291
  const pick = (text5) => text5[Math.floor(u() * text5.length)];
292
292
  const kind = () => {
293
293
  let roll = u();
@@ -326,7 +326,7 @@ var TracksSamples = class {
326
326
  }
327
327
  /** Two invented DNA sequences as `{ name, sequence }`. The second differs from the first by substitutions, an insertion, a deletion, an inversion and a tandem duplication. */
328
328
  static sequences(seed) {
329
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
329
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
330
330
  const base = () => BASES[Math.floor(u() * 4)];
331
331
  const random = (count) => Array.from({ length: count }, base).join("");
332
332
  const worn = (text5) => [...text5].map((letter) => u() < 0.04 ? base() : letter).join("");
@@ -345,7 +345,7 @@ var TracksSamples = class {
345
345
  }
346
346
  /** Invented map of a cloning vector: `{ plasmid, name, type, start, end, strand, length }`. Rows with no `end` are restriction sites. */
347
347
  static plasmid(seed) {
348
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
348
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
349
349
  const nudge = (value) => value + Math.round(u() * 24);
350
350
  const feature = (name, type, start, end, strand) => ({ plasmid: "pDEMO-12", name, type, start: nudge(start), end: nudge(end), strand, length: PLASMID_LENGTH });
351
351
  const site = (name, at) => ({ plasmid: "pDEMO-12", name, type: "Restriction site", start: nudge(at), end: null, strand: null, length: PLASMID_LENGTH });
@@ -371,7 +371,7 @@ var TracksSamples = class {
371
371
  }
372
372
  /** Invented RNA-seq depth: `{ position, depth, sample, strand }` every 20 bp over 12 kb, with most reads on exons of a plus-strand gene. */
373
373
  static coverage(seed) {
374
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
374
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
375
375
  const gain = (position) => {
376
376
  const exon = COVERAGE_EXONS.find(([start, end]) => position >= start && position < end);
377
377
  if (!exon) return 0.02;