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
@@ -1,10 +1,10 @@
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;
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;
2
2
 
3
3
 
4
4
 
5
5
 
6
6
 
7
- var _chunkJXLSKIUVcjs = require('./chunk-JXLSKIUV.cjs');
7
+ var _chunk5FBQOMMTcjs = require('./chunk-5FBQOMMT.cjs');
8
8
 
9
9
 
10
10
  var _chunkXX2YTCORcjs = require('./chunk-XX2YTCOR.cjs');
@@ -13,7 +13,7 @@ var _chunkXX2YTCORcjs = require('./chunk-XX2YTCOR.cjs');
13
13
  var _chunkPY4R3IFFcjs = require('./chunk-PY4R3IFF.cjs');
14
14
 
15
15
 
16
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
16
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
17
17
 
18
18
  // src/charts/tradingcharts/ADXChart.ts
19
19
  var _d3 = require('d3');
@@ -135,15 +135,30 @@ var TradingMath = (_class = class {
135
135
  const up = bar.high - before.high, down = before.low - bar.low;
136
136
  return { plus: up > down && up > 0 ? up : 0, minus: down > up && down > 0 ? down : 0 };
137
137
  });
138
- const range = _chunkJXLSKIUVcjs.FinanceMath.wilder(_chunkJXLSKIUVcjs.FinanceMath.trueRange(bars).map((value, i) => i ? value : null), period);
139
- const index = (side) => _chunkJXLSKIUVcjs.FinanceMath.wilder(moves.map((move) => move && move[side]), period).map((value, i) => value === null ? null : range[i] ? 100 * value / range[i] : 0);
138
+ const range = _chunk5FBQOMMTcjs.FinanceMath.wilder(_chunk5FBQOMMTcjs.FinanceMath.trueRange(bars).map((value, i) => i ? value : null), period);
139
+ const index = (side) => _chunk5FBQOMMTcjs.FinanceMath.wilder(moves.map((move) => move && move[side]), period).map((value, i) => value === null ? null : range[i] ? 100 * value / range[i] : 0);
140
140
  const plus = index("plus"), minus = index("minus");
141
141
  const gap = plus.map((value, i) => {
142
142
  const other = minus[i];
143
143
  if (value === null || other == null) return null;
144
144
  return value + other ? 100 * Math.abs(value - other) / (value + other) : 0;
145
145
  });
146
- return { adx: _chunkJXLSKIUVcjs.FinanceMath.wilder(gap, period), plus, minus };
146
+ return { adx: _chunk5FBQOMMTcjs.FinanceMath.wilder(gap, period), plus, minus };
147
+ }
148
+ /** Keltner channel: an EMA of the close with a band `multiplier` average true ranges either side. */
149
+ static keltner(bars, period = 20, atrPeriod = 10, multiplier = 2) {
150
+ const mid = _chunk5FBQOMMTcjs.FinanceMath.ema(bars.map((bar) => bar.close), period), range = _chunk5FBQOMMTcjs.FinanceMath.atr(bars, atrPeriod);
151
+ const shift = (sign) => mid.map((value, i) => value === null || range[i] == null ? null : value + sign * multiplier * range[i]);
152
+ return { mid, upper: shift(1), lower: shift(-1), range };
153
+ }
154
+ /** Sessions whose width sits in the bottom `share` of its own range over the last `window` sessions. False until the window fills and while the width has not moved. */
155
+ static squeezed(widths, window = 40, share = 0.25) {
156
+ return widths.map((width, i) => {
157
+ const recent = widths.slice(Math.max(0, i + 1 - window), i + 1).filter((value) => value !== null);
158
+ if (width === null || recent.length < window) return false;
159
+ const low = Math.min(...recent), high = Math.max(...recent);
160
+ return high > low && width - low < share * (high - low);
161
+ });
147
162
  }
148
163
  /** Close averaged over `period` sessions with volume as the weight; a plain mean where no volume traded. */
149
164
  static vwma(bars, period) {
@@ -222,7 +237,7 @@ var ADXShade = /* @__PURE__ */ ((ADXShade2) => {
222
237
  ADXShade2["Direction"] = "direction-shade";
223
238
  return ADXShade2;
224
239
  })(ADXShade || {});
225
- var ADXChart = (_class2 = class extends _chunkJXLSKIUVcjs.OscillatorChart {
240
+ var ADXChart = (_class2 = class extends _chunk5FBQOMMTcjs.OscillatorChart {
226
241
  static __initStatic3() {this.meta = {
227
242
  id: "adx",
228
243
  name: "Average Directional Index",
@@ -231,7 +246,7 @@ var ADXChart = (_class2 = class extends _chunkJXLSKIUVcjs.OscillatorChart {
231
246
  shape: "table" /* Table */,
232
247
  description: "Shows price over a panel with ADX, +DI and -DI, and a threshold separating trending from ranging conditions.",
233
248
  tags: ["dmi", "directional movement", "trend strength", "wilder", "oscillator"],
234
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.ohlc(seed, 110),
249
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.ohlc(seed, 110),
235
250
  variants: {
236
251
  pricePane: [true, false],
237
252
  period: [14, 7, 21],
@@ -286,7 +301,7 @@ var ADXChart = (_class2 = class extends _chunkJXLSKIUVcjs.OscillatorChart {
286
301
  tooltip(bar) {
287
302
  const { adx, plus, minus } = this.series(this.bars());
288
303
  const show = (value) => value == null ? "n/a" : value.toFixed(1);
289
- return { title: bar.label, rows: [["ADX", show(adx[bar.index])], ["+DI", show(plus[bar.index])], ["-DI", show(minus[bar.index])], ["Close", _chunkJXLSKIUVcjs.Quotes.money(bar.close)]] };
304
+ return { title: bar.label, rows: [["ADX", show(adx[bar.index])], ["+DI", show(plus[bar.index])], ["-DI", show(minus[bar.index])], ["Close", _chunk5FBQOMMTcjs.Quotes.money(bar.close)]] };
290
305
  }
291
306
  }, _class2.__initStatic3(), _class2);
292
307
 
@@ -300,7 +315,7 @@ var clamp = (value, low, high) => Math.max(low, Math.min(high, value));
300
315
  var TradingSamples = class {
301
316
  /** `{ date, advancing, declining, unchanged, index }`: daily breadth of a 500-issue index beside its level, weekdays only. */
302
317
  static breadth(seed, sessions = 90) {
303
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
318
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
304
319
  let level = 4200 + u() * 600, day2 = 0;
305
320
  return Array.from({ length: sessions }, () => {
306
321
  do
@@ -315,7 +330,7 @@ var TradingSamples = class {
315
330
  }
316
331
  /** `{ period, price, bid, ask, open, close }`: one row per price level of each five-minute bar, with volume hit on the bid and lifted on the ask. */
317
332
  static footprint(seed, periods = 5) {
318
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
333
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
319
334
  const start = 180 + Math.round(u() * 16) * TICK;
320
335
  let last = start;
321
336
  return Array.from({ length: periods }, (_, i) => {
@@ -355,7 +370,7 @@ var AdvanceDeclineCompare = /* @__PURE__ */ ((AdvanceDeclineCompare2) => {
355
370
  })(AdvanceDeclineCompare || {});
356
371
  var GAP = 18;
357
372
  var TITLE_ROW = 14;
358
- var AdvanceDeclineChart = (_class3 = class extends _chunkJXLSKIUVcjs.SessionChart {constructor(...args) { super(...args); _class3.prototype.__init.call(this); }
373
+ var AdvanceDeclineChart = (_class3 = class extends _chunk5FBQOMMTcjs.SessionChart {constructor(...args) { super(...args); _class3.prototype.__init.call(this); }
359
374
  static __initStatic4() {this.meta = {
360
375
  id: "advance-decline-line",
361
376
  name: "Advance-decline line",
@@ -390,7 +405,7 @@ var AdvanceDeclineChart = (_class3 = class extends _chunkJXLSKIUVcjs.SessionChar
390
405
  days() {
391
406
  const { data, date, advancing, declining, index } = this.options;
392
407
  return (_nullishCoalesce(data, () => ( []))).flatMap((row) => {
393
- const up = _chunkJXLSKIUVcjs.Quotes.number(row[advancing]), down = _chunkJXLSKIUVcjs.Quotes.number(row[declining]), level = _chunkJXLSKIUVcjs.Quotes.number(row[index]);
408
+ const up = _chunk5FBQOMMTcjs.Quotes.number(row[advancing]), down = _chunk5FBQOMMTcjs.Quotes.number(row[declining]), level = _chunk5FBQOMMTcjs.Quotes.number(row[index]);
394
409
  if (!Number.isFinite(up) || !Number.isFinite(down)) return [];
395
410
  const rose = Math.max(0, up), fell = Math.max(0, down);
396
411
  return [{ date: row[date], advancing: rose, declining: fell, net: rose - fell, index: Number.isFinite(level) ? level : null }];
@@ -404,10 +419,10 @@ var AdvanceDeclineChart = (_class3 = class extends _chunkJXLSKIUVcjs.SessionChar
404
419
  /** The line as bars whose close is the running total, so the session axis, crosshair and hit columns come from the base. */
405
420
  bars() {
406
421
  let total = 0;
407
- return _chunkJXLSKIUVcjs.Quotes.read(this.days().map((day2) => ({ date: day2.date, close: total += this.step(day2) })), { date: "date", close: "close" });
422
+ return _chunk5FBQOMMTcjs.Quotes.read(this.days().map((day2) => ({ date: day2.date, close: total += this.step(day2) })), { date: "date", close: "close" });
408
423
  }
409
424
  trail(bars) {
410
- return this.options.average ? _chunkJXLSKIUVcjs.FinanceMath.sma(bars.map((bar) => bar.close), this.options.period) : [];
425
+ return this.options.average ? _chunk5FBQOMMTcjs.FinanceMath.sma(bars.map((bar) => bar.close), this.options.period) : [];
411
426
  }
412
427
  valueDomain(bars) {
413
428
  const [low = 0, high = 1] = _d3.extent.call(void 0, [...bars.map((bar) => bar.close), ...this.trail(bars).filter((value) => value !== null)]);
@@ -470,12 +485,12 @@ var AdvanceDeclineChart = (_class3 = class extends _chunkJXLSKIUVcjs.SessionChar
470
485
  const fall = ctx.marks("breadth-down", "path", shown.filter((bar) => split || value(days[bar.index]) < 0), (bar) => bar.index).attr("fill", tones.down);
471
486
  ctx.set(fall, { d: (bar) => column(bar, split ? -days[bar.index].declining : value(days[bar.index]), true) }, { d: (bar) => column(bar, 0, false) });
472
487
  TradingInk.rules(ctx, "breadth-zero", pane && bars.length ? [zero] : [], 0, ctx.plot.width, ctx.theme.axis, null);
473
- TradingInk.paneAxis(ctx, "breadth", pane && bars.length ? [reach, -reach] : [], height, (tick) => _chunkJXLSKIUVcjs.Quotes.compact(Math.round(tick)), ctx.plot.width);
488
+ TradingInk.paneAxis(ctx, "breadth", pane && bars.length ? [reach, -reach] : [], height, (tick) => _chunk5FBQOMMTcjs.Quotes.compact(Math.round(tick)), ctx.plot.width);
474
489
  this.paneTitle(ctx, "breadth-title", split ? "Advancing over declining" : ratio ? "Net advances per 1,000" : "Net advances", pane);
475
490
  }
476
491
  dayTip(bar, day2) {
477
- const rows = [["A/D line", _chunkJXLSKIUVcjs.Quotes.compact(Math.round(bar.close))], ["Advancing", day2.advancing], ["Declining", day2.declining], ["Net", _chunkJXLSKIUVcjs.Quotes.signed(day2.net, 0)]];
478
- if (day2.index !== null) rows.push(["Index", _chunkJXLSKIUVcjs.Quotes.money(day2.index)]);
492
+ const rows = [["A/D line", _chunk5FBQOMMTcjs.Quotes.compact(Math.round(bar.close))], ["Advancing", day2.advancing], ["Declining", day2.declining], ["Net", _chunk5FBQOMMTcjs.Quotes.signed(day2.net, 0)]];
493
+ if (day2.index !== null) rows.push(["Index", _chunk5FBQOMMTcjs.Quotes.money(day2.index)]);
479
494
  return { title: bar.label, color: this.palette.diverging(day2.net >= 0 ? -1 : 1), rows };
480
495
  }
481
496
  }, _class3.__initStatic4(), _class3);
@@ -503,7 +518,7 @@ var EquivolumeChart = (_class4 = class extends _chunkXX2YTCORcjs.CartesianChart
503
518
  shape: "table" /* Table */,
504
519
  description: "Draws each session as a box as tall as its range and as wide as its volume, so the x axis counts shares traded rather than days.",
505
520
  tags: ["volume", "arms", "candlevolume", "price", "stock"],
506
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.ohlc(seed, 44),
521
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.ohlc(seed, 44),
507
522
  variants: {
508
523
  form: ["box" /* Box */, "candle-volume" /* Candle */],
509
524
  axis: ["volume-axis" /* Volume */, "date-axis" /* Date */],
@@ -524,7 +539,7 @@ var EquivolumeChart = (_class4 = class extends _chunkXX2YTCORcjs.CartesianChart
524
539
  return { ...margin, bottom: margin.bottom + (this.named ? 12 : 0) };
525
540
  }
526
541
  bars() {
527
- return _chunkJXLSKIUVcjs.Quotes.read(this.options.data, this.options);
542
+ return _chunk5FBQOMMTcjs.Quotes.read(this.options.data, this.options);
528
543
  }
529
544
  trail(bars) {
530
545
  return this.options.average ? TradingMath.vwma(bars, this.options.period) : [];
@@ -590,7 +605,7 @@ var EquivolumeChart = (_class4 = class extends _chunkXX2YTCORcjs.CartesianChart
590
605
  return {
591
606
  title: bar.label,
592
607
  color: this.palette.diverging(rising ? -1 : 1),
593
- rows: [["Open", _chunkJXLSKIUVcjs.Quotes.money(bar.open)], ["High", _chunkJXLSKIUVcjs.Quotes.money(bar.high)], ["Low", _chunkJXLSKIUVcjs.Quotes.money(bar.low)], ["Close", _chunkJXLSKIUVcjs.Quotes.money(bar.close)], ["Volume", _chunkJXLSKIUVcjs.Quotes.compact(bar.volume)]]
608
+ rows: [["Open", _chunk5FBQOMMTcjs.Quotes.money(bar.open)], ["High", _chunk5FBQOMMTcjs.Quotes.money(bar.high)], ["Low", _chunk5FBQOMMTcjs.Quotes.money(bar.low)], ["Close", _chunk5FBQOMMTcjs.Quotes.money(bar.close)], ["Volume", _chunk5FBQOMMTcjs.Quotes.compact(bar.volume)]]
594
609
  };
595
610
  }
596
611
  }, _class4.__initStatic5(), _class4);
@@ -612,7 +627,7 @@ var RetracementReach = /* @__PURE__ */ ((RetracementReach2) => {
612
627
  return RetracementReach2;
613
628
  })(RetracementReach || {});
614
629
  var LABEL_ORDER = [0, 1, 0.618, 0.382, 0.5, 1.618, 1.272, 0.236, 0.786];
615
- var FibonacciRetracementChart = (_class5 = class extends _chunkJXLSKIUVcjs.PriceChart {
630
+ var FibonacciRetracementChart = (_class5 = class extends _chunk5FBQOMMTcjs.PriceChart {
616
631
  static __initStatic6() {this.meta = {
617
632
  id: "fibonacci-retracement",
618
633
  name: "Fibonacci retracement",
@@ -621,7 +636,7 @@ var FibonacciRetracementChart = (_class5 = class extends _chunkJXLSKIUVcjs.Price
621
636
  shape: "table" /* Table */,
622
637
  description: "Rules price at 23.6%, 38.2%, 50%, 61.8% and 78.6% of the way back from a swing high to a swing low, each labelled with its price.",
623
638
  tags: ["fib", "levels", "swing", "extension", "pullback", "golden ratio"],
624
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.ohlc(seed, 72),
639
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.ohlc(seed, 72),
625
640
  variants: {
626
641
  mark: ["candles" /* Candles */, "line" /* Line */, "bars" /* Bars */],
627
642
  levels: ["retracement" /* Retracement */, "extension" /* Extension */],
@@ -635,7 +650,7 @@ var FibonacciRetracementChart = (_class5 = class extends _chunkJXLSKIUVcjs.Price
635
650
  }
636
651
  /** Room on the right for the widest level label, such as `61.8% 104.32`. */
637
652
  plotMargin() {
638
- const widest = Math.max(0, ...this.bars().map((bar) => _chunkJXLSKIUVcjs.Quotes.money(bar.high).length));
653
+ const widest = Math.max(0, ...this.bars().map((bar) => _chunk5FBQOMMTcjs.Quotes.money(bar.high).length));
639
654
  return { ...super.plotMargin(), right: 16 + (7 + widest) * 5.6 };
640
655
  }
641
656
  twoTone() {
@@ -644,7 +659,7 @@ var FibonacciRetracementChart = (_class5 = class extends _chunkJXLSKIUVcjs.Price
644
659
  /** The swing the levels hang on: found from the bars, then moved to any price given. */
645
660
  leg(bars) {
646
661
  const { swing, reversal, swingHigh, swingLow, scale } = this.options;
647
- const found = swing === "latest-swing" /* Latest */ ? TradingMath.latestSwing(bars, reversal * _chunkJXLSKIUVcjs.FinanceMath.lastAtr(bars)) : TradingMath.rangeSwing(bars);
662
+ const found = swing === "latest-swing" /* Latest */ ? TradingMath.latestSwing(bars, reversal * _chunk5FBQOMMTcjs.FinanceMath.lastAtr(bars)) : TradingMath.rangeSwing(bars);
648
663
  if (!found || swingHigh == null && swingLow == null) return found;
649
664
  const base = bars[0].source.close;
650
665
  const shown = (price) => scale === "percent" /* Percent */ && base ? (price - base) / Math.abs(base) * 100 : price;
@@ -685,7 +700,7 @@ var FibonacciRetracementChart = (_class5 = class extends _chunkJXLSKIUVcjs.Price
685
700
  for (const level of [...levels].sort((a, b) => LABEL_ORDER.indexOf(a.ratio) - LABEL_ORDER.indexOf(b.ratio))) {
686
701
  if (labelled.every((kept) => Math.abs(y(kept.price) - y(level.price)) >= 11)) labelled.push(level);
687
702
  }
688
- const label = ctx.text(ctx.marks("level-labels", "text", labelled, (level) => level.ratio), 10).attr("dy", "0.32em").text((level) => `${+(level.ratio * 100).toFixed(1)}% ${percent ? `${_chunkJXLSKIUVcjs.Quotes.signed(level.price, 1)}%` : _chunkJXLSKIUVcjs.Quotes.money(level.price)}`);
703
+ const label = ctx.text(ctx.marks("level-labels", "text", labelled, (level) => level.ratio), 10).attr("dy", "0.32em").text((level) => `${+(level.ratio * 100).toFixed(1)}% ${percent ? `${_chunk5FBQOMMTcjs.Quotes.signed(level.price, 1)}%` : _chunk5FBQOMMTcjs.Quotes.money(level.price)}`);
689
704
  ctx.set(label, { x: width + 5, y: (level) => y(level.price) }, { x: width + 5, y: (level) => y(level.price) });
690
705
  }
691
706
  }, _class5.__initStatic6(), _class5);
@@ -712,17 +727,17 @@ var FootprintMath = class {
712
727
  return (period) => period instanceof Date ? format(period) : String(period);
713
728
  }
714
729
  static read(rows, fields, tickSize, ratio = 3) {
715
- const kept = (_nullishCoalesce(rows, () => ( []))).filter((row) => row && Number.isFinite(_chunkJXLSKIUVcjs.Quotes.number(row[fields.price])) && row[fields.period] != null && row[fields.period] !== "");
716
- const tick = tickSize && tickSize > 0 ? tickSize : this.tick(kept.map((row) => _chunkJXLSKIUVcjs.Quotes.number(row[fields.price])));
730
+ const kept = (_nullishCoalesce(rows, () => ( []))).filter((row) => row && Number.isFinite(_chunk5FBQOMMTcjs.Quotes.number(row[fields.price])) && row[fields.period] != null && row[fields.period] !== "");
731
+ const tick = tickSize && tickSize > 0 ? tickSize : this.tick(kept.map((row) => _chunk5FBQOMMTcjs.Quotes.number(row[fields.price])));
717
732
  const name = this.namer(kept.map((row) => row[fields.period]));
718
733
  const ladders = /* @__PURE__ */ new Map();
719
- const volume = (value) => Math.max(0, _chunkJXLSKIUVcjs.Quotes.number(value) || 0);
720
- const known = (value) => Number.isFinite(_chunkJXLSKIUVcjs.Quotes.number(value)) ? _chunkJXLSKIUVcjs.Quotes.number(value) : null;
734
+ const volume = (value) => Math.max(0, _chunk5FBQOMMTcjs.Quotes.number(value) || 0);
735
+ const known = (value) => Number.isFinite(_chunk5FBQOMMTcjs.Quotes.number(value)) ? _chunk5FBQOMMTcjs.Quotes.number(value) : null;
721
736
  for (const row of kept) {
722
737
  const label = name(row[fields.period]);
723
738
  const ladder = _nullishCoalesce(ladders.get(label), () => ( { levels: /* @__PURE__ */ new Map(), open: null, close: null }));
724
739
  ladders.set(label, ladder);
725
- const step = Math.round(_chunkJXLSKIUVcjs.Quotes.number(row[fields.price]) / tick);
740
+ const step = Math.round(_chunk5FBQOMMTcjs.Quotes.number(row[fields.price]) / tick);
726
741
  const cell = _nullishCoalesce(ladder.levels.get(step), () => ( { price: +(step * tick).toFixed(8), bid: 0, ask: 0, buying: false, selling: false }));
727
742
  ladder.levels.set(step, cell);
728
743
  cell.bid += volume(row[fields.bid]);
@@ -845,8 +860,8 @@ var FootprintChart = (_class6 = class extends _chunkXX2YTCORcjs.CartesianChart {
845
860
  if (sided && cells) {
846
861
  const half = Math.max(1, (room - 2) / 2);
847
862
  return [
848
- tile("bid", left, half, ctx.palette.diverging(tint(cell.bid / peak.side)), _chunkJXLSKIUVcjs.Quotes.compact(cell.bid), cell.selling ? -1 : 0),
849
- tile("ask", left + half + 2, half, ctx.palette.diverging(-tint(cell.ask / peak.side)), _chunkJXLSKIUVcjs.Quotes.compact(cell.ask), cell.buying ? 1 : 0)
863
+ tile("bid", left, half, ctx.palette.diverging(tint(cell.bid / peak.side)), _chunk5FBQOMMTcjs.Quotes.compact(cell.bid), cell.selling ? -1 : 0),
864
+ tile("ask", left + half + 2, half, ctx.palette.diverging(-tint(cell.ask / peak.side)), _chunk5FBQOMMTcjs.Quotes.compact(cell.ask), cell.buying ? 1 : 0)
850
865
  ];
851
866
  }
852
867
  if (sided) {
@@ -855,9 +870,9 @@ var FootprintChart = (_class6 = class extends _chunkXX2YTCORcjs.CartesianChart {
855
870
  }
856
871
  if (measure === "delta" /* Delta */) {
857
872
  const wide = room / 2 * Math.abs(delta) / peak.delta;
858
- return cells ? [tile("delta", left, room, ctx.palette.diverging(-Math.sign(delta) * tint(Math.abs(delta) / peak.delta)), _chunkJXLSKIUVcjs.Quotes.signed(delta, 0))] : [tile("delta", delta >= 0 ? mid : mid - wide, wide, delta >= 0 ? tones.up : tones.down, "")];
873
+ return cells ? [tile("delta", left, room, ctx.palette.diverging(-Math.sign(delta) * tint(Math.abs(delta) / peak.delta)), _chunk5FBQOMMTcjs.Quotes.signed(delta, 0))] : [tile("delta", delta >= 0 ? mid : mid - wide, wide, delta >= 0 ? tones.up : tones.down, "")];
859
874
  }
860
- return cells ? [tile("total", left, room, ctx.palette.sequential(tint(total / peak.total)), _chunkJXLSKIUVcjs.Quotes.compact(total))] : [tile("total", left, room * total / peak.total, ctx.palette.sequential(0.6), "")];
875
+ return cells ? [tile("total", left, room, ctx.palette.sequential(tint(total / peak.total)), _chunk5FBQOMMTcjs.Quotes.compact(total))] : [tile("total", left, room * total / peak.total, ctx.palette.sequential(0.6), "")];
861
876
  }));
862
877
  const spines = !cells && measure !== "total-volume" /* Total */ ? bars.filter((bar) => bar.cells.length) : [];
863
878
  const spine = ctx.marks("axis-spines", "line", spines, (bar) => bar.label).attr("stroke", ctx.theme.axis).attr("stroke-width", 1);
@@ -901,11 +916,117 @@ var FootprintChart = (_class6 = class extends _chunkXX2YTCORcjs.CartesianChart {
901
916
  return {
902
917
  title: `${bar.label} at ${cell.price.toFixed(this.digits)}${bar.poc === cell ? ", point of control" : ""}`,
903
918
  color: this.palette.diverging(delta >= 0 ? -1 : 1),
904
- rows: [["Ask", _chunkJXLSKIUVcjs.Quotes.compact(cell.ask)], ["Bid", _chunkJXLSKIUVcjs.Quotes.compact(cell.bid)], ["Delta", _chunkJXLSKIUVcjs.Quotes.signed(delta, 0)], ["Total", _chunkJXLSKIUVcjs.Quotes.compact(cell.ask + cell.bid)]]
919
+ rows: [["Ask", _chunk5FBQOMMTcjs.Quotes.compact(cell.ask)], ["Bid", _chunk5FBQOMMTcjs.Quotes.compact(cell.bid)], ["Delta", _chunk5FBQOMMTcjs.Quotes.signed(delta, 0)], ["Total", _chunk5FBQOMMTcjs.Quotes.compact(cell.ask + cell.bid)]]
905
920
  };
906
921
  }
907
922
  }, _class6.__initStatic7(), _class6);
908
923
 
924
+ // src/charts/tradingcharts/KeltnerChannelChart.ts
925
+
926
+ var whole = (value, fallback) => Math.max(1, Math.round(Number(value)) || fallback);
927
+ var KeltnerChannelChart = (_class7 = class extends _chunk5FBQOMMTcjs.PriceChart {
928
+ static __initStatic8() {this.meta = {
929
+ id: "keltner-channels",
930
+ name: "Keltner channels",
931
+ family: "financial" /* Financial */,
932
+ dimension: 2 /* Two */,
933
+ shape: "table" /* Table */,
934
+ description: "Wraps price in bands set at a multiple of the average true range around an EMA, with an optional wider pair and shaded squeezes.",
935
+ tags: ["keltner", "atr", "ema", "volatility", "envelope", "channel", "squeeze"],
936
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.ohlc(seed, 110),
937
+ variants: {
938
+ mark: ["candles" /* Candles */, "bars" /* Bars */, "line" /* Line */],
939
+ period: [20, 10, 50],
940
+ multiplier: [2, 1.5],
941
+ outerBands: [false, true],
942
+ squeeze: [false, true]
943
+ }
944
+ }}
945
+ defaults() {
946
+ return { ...super.defaults(), mark: "candles" /* Candles */, period: 20, atrPeriod: 10, multiplier: 2, outerBands: false, outerMultiplier: 3, squeeze: false, squeezeShare: 0.25, squeezeWindow: 40 };
947
+ }
948
+ twoTone() {
949
+ return this.options.mark !== "line" /* Line */;
950
+ }
951
+ /** The inner channel, then the outer one when it is on. A log axis cannot show a band at or below 0, so those points are dropped. */
952
+ channels(bars) {
953
+ const { period, atrPeriod, multiplier, outerBands, outerMultiplier, scale } = this.options;
954
+ const shown = (series) => scale === "log" /* Log */ ? series.map((value) => value !== null && value > 0 ? value : null) : series;
955
+ return [multiplier, ...outerBands ? [outerMultiplier] : []].map((width) => {
956
+ const channel = TradingMath.keltner(bars, whole(period, 20), whole(atrPeriod, 10), width);
957
+ return { ...channel, upper: shown(channel.upper), lower: shown(channel.lower) };
958
+ });
959
+ }
960
+ squeezes(bars, inner) {
961
+ const { squeeze, squeezeWindow, squeezeShare } = this.options;
962
+ if (!squeeze) return [];
963
+ return TradingMath.squeezed(inner.range, whole(squeezeWindow, 40), squeezeShare).map((tight, i) => tight && inner.upper[i] != null && inner.lower[i] != null);
964
+ }
965
+ get channelName() {
966
+ const { period, multiplier, outerBands, outerMultiplier } = this.options;
967
+ return `Keltner ${whole(period, 20)}, ${multiplier}${outerBands ? ` and ${outerMultiplier}` : ""} ATR`;
968
+ }
969
+ /** The bands join the price domain; `drawStudies` draws them. */
970
+ studies(bars) {
971
+ return this.channels(bars).map(({ mid, upper, lower }) => ({ name: this.channelName, mid, upper, lower }));
972
+ }
973
+ barTip(bar) {
974
+ const tip = super.barTip(bar), bars = this.bars(), [inner, outer] = this.channels(bars), i = bar.index;
975
+ const percent = this.options.scale === "percent" /* Percent */;
976
+ const show = (value) => value == null ? "n/a" : percent ? `${_chunk5FBQOMMTcjs.Quotes.signed(value, 1)}%` : _chunk5FBQOMMTcjs.Quotes.money(value);
977
+ const range = inner.range[i];
978
+ return {
979
+ ...tip,
980
+ rows: [
981
+ ..._nullishCoalesce(tip.rows, () => ( [])),
982
+ [`EMA ${whole(this.options.period, 20)}`, show(inner.mid[i])],
983
+ [`Band, ${this.options.multiplier} ATR`, `${show(inner.lower[i])} to ${show(inner.upper[i])}`],
984
+ ...outer ? [[`Band, ${this.options.outerMultiplier} ATR`, `${show(outer.lower[i])} to ${show(outer.upper[i])}`]] : [],
985
+ [`ATR ${whole(this.options.atrPeriod, 10)}`, range == null ? "n/a" : percent ? `${range.toFixed(1)}%` : _chunk5FBQOMMTcjs.Quotes.money(range)],
986
+ ...this.squeezes(bars, inner)[i] ? [["Squeeze", "Yes"]] : []
987
+ ]
988
+ };
989
+ }
990
+ priceMarks(ctx, view, tones) {
991
+ this.drawPrice(ctx, view, tones, this.options.mark);
992
+ const { x, bars, step, main } = view;
993
+ const runs = [];
994
+ this.squeezes(bars, this.channels(bars)[0]).forEach((tight, i) => {
995
+ if (!tight) return;
996
+ const last = runs.at(-1);
997
+ if (last && last.to === i - 1) last.to = i;
998
+ else runs.push({ from: i, to: i });
999
+ });
1000
+ const left = (run) => Math.max(0, x(run.from) - step / 2), right = (run) => Math.min(ctx.plot.width, x(run.to) + step / 2);
1001
+ const strip = ctx.marks("squeeze", "rect", runs, (run) => run.from).attr("fill", ctx.theme.grid).attr("fill-opacity", 0.7);
1002
+ ctx.set(strip, { x: left, width: (run) => Math.max(1, right(run) - left(run)), y: main.top, height: main.bottom - main.top });
1003
+ ctx.group("squeeze").lower();
1004
+ ctx.group("grid").lower();
1005
+ const named = [];
1006
+ for (const run of runs) {
1007
+ const at = Math.max(24, Math.min(ctx.plot.width - 24, (left(run) + right(run)) / 2));
1008
+ if (named.every((kept) => Math.abs(kept.at - at) >= 52)) named.push({ ...run, at });
1009
+ }
1010
+ TradingInk.note(ctx, "squeeze-labels", named, (run) => ({ x: run.at, y: main.top + 11, text: "Squeeze", anchor: "middle" }), 10, "muted");
1011
+ }
1012
+ drawStudies(ctx, view) {
1013
+ const { x, y, bars } = view;
1014
+ const [inner, outer] = this.channels(bars);
1015
+ const color = ctx.palette.color(this.channelName);
1016
+ const between = ({ upper, lower }) => {
1017
+ const band = _d3.area.call(void 0, ).curve(_chunkPY4R3IFFcjs.Scales.curve()).defined((value, i) => value !== null && lower[i] != null).x((_, i) => x(i)).y0((_, i) => y(lower[i])).y1((value) => y(value));
1018
+ return upper.some((value, i) => value !== null && lower[i] != null) ? band(upper) : null;
1019
+ };
1020
+ TradingInk.fill(ctx, "outer-channel", outer ? between(outer) : null, color, 0.07);
1021
+ TradingInk.fill(ctx, "channel", between(inner), color, 0.1);
1022
+ TradingInk.series(ctx, "outer-upper", _nullishCoalesce(_optionalChain([outer, 'optionalAccess', _14 => _14.upper]), () => ( [])), x, y, color, 1.5, "5 4");
1023
+ TradingInk.series(ctx, "outer-lower", _nullishCoalesce(_optionalChain([outer, 'optionalAccess', _15 => _15.lower]), () => ( [])), x, y, color, 1.5, "5 4");
1024
+ TradingInk.series(ctx, "upper-band", inner.upper, x, y, color, 1.5);
1025
+ TradingInk.series(ctx, "lower-band", inner.lower, x, y, color, 1.5);
1026
+ TradingInk.series(ctx, "centre-line", inner.mid, x, y, color, 2);
1027
+ }
1028
+ }, _class7.__initStatic8(), _class7);
1029
+
909
1030
  // src/charts/tradingcharts/ParabolicSARChart.ts
910
1031
 
911
1032
  var ParabolicSARTrail = /* @__PURE__ */ ((ParabolicSARTrail2) => {
@@ -913,8 +1034,8 @@ var ParabolicSARTrail = /* @__PURE__ */ ((ParabolicSARTrail2) => {
913
1034
  ParabolicSARTrail2["Steps"] = "steps";
914
1035
  return ParabolicSARTrail2;
915
1036
  })(ParabolicSARTrail || {});
916
- var ParabolicSARChart = (_class7 = class extends _chunkJXLSKIUVcjs.PriceChart {
917
- static __initStatic8() {this.meta = {
1037
+ var ParabolicSARChart = (_class8 = class extends _chunk5FBQOMMTcjs.PriceChart {
1038
+ static __initStatic9() {this.meta = {
918
1039
  id: "parabolic-sar",
919
1040
  name: "Parabolic SAR",
920
1041
  family: "financial" /* Financial */,
@@ -922,7 +1043,7 @@ var ParabolicSARChart = (_class7 = class extends _chunkJXLSKIUVcjs.PriceChart {
922
1043
  shape: "table" /* Table */,
923
1044
  description: "Plots the stop-and-reverse level under rising price and over falling price, flipping sides at each reversal.",
924
1045
  tags: ["stop and reverse", "trend", "wilder", "trailing stop", "psar"],
925
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.ohlc(seed, 72),
1046
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.ohlc(seed, 72),
926
1047
  variants: {
927
1048
  mark: ["candles" /* Candles */, "bars" /* Bars */, "line" /* Line */],
928
1049
  acceleration: [0.02, 0.01, 0.04],
@@ -943,7 +1064,7 @@ var ParabolicSARChart = (_class7 = class extends _chunkJXLSKIUVcjs.PriceChart {
943
1064
  }
944
1065
  barTip(bar) {
945
1066
  const tip = super.barTip(bar), stop = this.stops(this.bars())[bar.index];
946
- return stop ? { ...tip, rows: [..._nullishCoalesce(tip.rows, () => ( [])), ["SAR", _chunkJXLSKIUVcjs.Quotes.money(stop.value)], ["Stop side", stop.rising ? "Below price" : "Above price"]] } : tip;
1067
+ return stop ? { ...tip, rows: [..._nullishCoalesce(tip.rows, () => ( [])), ["SAR", _chunk5FBQOMMTcjs.Quotes.money(stop.value)], ["Stop side", stop.rising ? "Below price" : "Above price"]] } : tip;
947
1068
  }
948
1069
  priceMarks(ctx, view, tones) {
949
1070
  const { mark } = this.options;
@@ -974,10 +1095,11 @@ var ParabolicSARChart = (_class7 = class extends _chunkJXLSKIUVcjs.PriceChart {
974
1095
  const turn = ctx.marks("reversals", "path", turns, (bar) => bar.index).attr("d", triangle).attr("fill", (bar) => tone(at(bar).rising)).attr("stroke", ctx.theme.surface).attr("stroke-width", 2).attr("paint-order", "stroke");
975
1096
  ctx.set(turn, { transform: place }, { transform: place });
976
1097
  }
977
- }, _class7.__initStatic8(), _class7);
1098
+ }, _class8.__initStatic9(), _class8);
978
1099
 
979
1100
  // src/charts/tradingcharts/index.ts
980
- var tradingchartsCatalog = [EquivolumeChart, ParabolicSARChart, FibonacciRetracementChart, ADXChart, AdvanceDeclineChart, FootprintChart];
1101
+ var tradingchartsCatalog = [EquivolumeChart, ParabolicSARChart, FibonacciRetracementChart, ADXChart, AdvanceDeclineChart, FootprintChart, KeltnerChannelChart];
1102
+
981
1103
 
982
1104
 
983
1105
 
@@ -1000,4 +1122,4 @@ var tradingchartsCatalog = [EquivolumeChart, ParabolicSARChart, FibonacciRetrace
1000
1122
 
1001
1123
 
1002
1124
 
1003
- exports.ADXLineSet = ADXLineSet; exports.ADXShade = ADXShade; exports.ADXChart = ADXChart; exports.AdvanceDeclineMeasure = AdvanceDeclineMeasure; exports.AdvanceDeclineBreadth = AdvanceDeclineBreadth; exports.AdvanceDeclineCompare = AdvanceDeclineCompare; exports.AdvanceDeclineChart = AdvanceDeclineChart; exports.EquivolumeForm = EquivolumeForm; exports.EquivolumeAxis = EquivolumeAxis; exports.EquivolumeChart = EquivolumeChart; exports.RetracementLevels = RetracementLevels; exports.RetracementSwing = RetracementSwing; exports.RetracementReach = RetracementReach; exports.FibonacciRetracementChart = FibonacciRetracementChart; exports.FootprintMeasure = FootprintMeasure; exports.FootprintLayout = FootprintLayout; exports.FootprintChart = FootprintChart; exports.ParabolicSARTrail = ParabolicSARTrail; exports.ParabolicSARChart = ParabolicSARChart; exports.tradingchartsCatalog = tradingchartsCatalog;
1125
+ exports.ADXLineSet = ADXLineSet; exports.ADXShade = ADXShade; exports.ADXChart = ADXChart; exports.AdvanceDeclineMeasure = AdvanceDeclineMeasure; exports.AdvanceDeclineBreadth = AdvanceDeclineBreadth; exports.AdvanceDeclineCompare = AdvanceDeclineCompare; exports.AdvanceDeclineChart = AdvanceDeclineChart; exports.EquivolumeForm = EquivolumeForm; exports.EquivolumeAxis = EquivolumeAxis; exports.EquivolumeChart = EquivolumeChart; exports.RetracementLevels = RetracementLevels; exports.RetracementSwing = RetracementSwing; exports.RetracementReach = RetracementReach; exports.FibonacciRetracementChart = FibonacciRetracementChart; exports.FootprintMeasure = FootprintMeasure; exports.FootprintLayout = FootprintLayout; exports.FootprintChart = FootprintChart; exports.KeltnerChannelChart = KeltnerChannelChart; exports.ParabolicSARTrail = ParabolicSARTrail; exports.ParabolicSARChart = ParabolicSARChart; exports.tradingchartsCatalog = tradingchartsCatalog;
@@ -18,7 +18,7 @@ var _chunkXX2YTCORcjs = require('./chunk-XX2YTCOR.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/portfoliocharts/portfolioEnums.ts
24
24
  var FrontierConstraint = /* @__PURE__ */ ((FrontierConstraint2) => {
@@ -367,7 +367,7 @@ var round = (value, places) => +value.toFixed(places);
367
367
  var PortfolioSamples = class {
368
368
  /** `{ date, asset, return }`, monthly decimal returns over `months`, shifted so each asset's sample mean is its target. */
369
369
  static monthlyReturns(seed, months = 180) {
370
- const { n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
370
+ const { n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
371
371
  const shocks = Array.from({ length: months }, () => [n(), n(), n()]);
372
372
  return ASSETS.flatMap(([asset, mean, residual, loadings]) => {
373
373
  const raw = shocks.map((shock) => loadings.reduce((sum, loading, i) => sum + loading * shock[i], 0) / Math.sqrt(12) + residual * n() / Math.sqrt(12));
@@ -377,7 +377,7 @@ var PortfolioSamples = class {
377
377
  }
378
378
  /** `{ days, strike, forward, iv, bid, ask }`: an index option chain whose smile has an equity skew that steepens at short maturities. */
379
379
  static optionChain(seed) {
380
- const { n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
380
+ const { n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
381
381
  const spot = 4800, rate = 0.04, carry = 0.015;
382
382
  return [14, 30, 60, 120, 240].flatMap((days) => {
383
383
  const years = days / 365, forward = spot * Math.exp((rate - carry) * years);
@@ -392,14 +392,14 @@ var PortfolioSamples = class {
392
392
  }
393
393
  /** `{ leg, type, strike, days, iv, quantity, spot }`: a collared call spread, sized in contracts. */
394
394
  static optionBook(seed) {
395
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
395
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
396
396
  const spot = Math.round(96 + u() * 8);
397
397
  const legs = [["Long 100 call", "call", 1, 60, 0.24, 20], ["Short 110 call", "call", 1.1, 60, 0.22, -20], ["Short 90 put", "put", 0.9, 30, 0.29, -10], ["Long 80 put", "put", 0.8, 30, 0.34, 10]];
398
398
  return legs.map(([leg, type, moneyness, days, iv, quantity]) => ({ leg, type, strike: Math.round(spot * moneyness), days, iv, quantity, spot }));
399
399
  }
400
400
  /** `{ date, asset, return, benchmark }`: daily decimal returns of three funds whose true beta drifts, on business days. */
401
401
  static dailyReturns(seed, days = 504) {
402
- const { n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
402
+ const { n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
403
403
  const dates = [];
404
404
  for (let day2 = 0; dates.length < days; day2++) {
405
405
  const date = new Date(Date.UTC(2024, 0, 1 + day2));
@@ -417,7 +417,7 @@ var PortfolioSamples = class {
417
417
  * with the whole portfolio, worked out from the factor model so that the contributions add up to portfolio volatility.
418
418
  */
419
419
  static riskBook(seed) {
420
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
420
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
421
421
  const tilted = BOOK.map(([, , weight]) => weight * (0.9 + u() * 0.2)), total = tilted.reduce((sum, weight) => sum + weight, 0);
422
422
  const weights = tilted.map((weight) => weight / total);
423
423
  const covariance = (a, b) => {
@@ -7,7 +7,7 @@ var _chunkUXFWDEP6cjs = require('./chunk-UXFWDEP6.cjs');
7
7
  var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
8
8
 
9
9
 
10
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
10
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
11
11
 
12
12
  // src/charts/carecharts/AmbulatoryGlucoseProfile.ts
13
13
  var _d3 = require('d3');
@@ -79,7 +79,7 @@ var TABLES = ["Oak table", "Elm table", "Ash table"];
79
79
  var CareSamples = class {
80
80
  /** `{ tooth, surface, condition }`: FDI tooth numbers for adult and primary teeth, a surface letter or blank for the whole tooth. */
81
81
  static dental(seed) {
82
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), rows = [];
82
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), rows = [];
83
83
  const chart = (quadrants, count, wear) => {
84
84
  for (const quadrant of quadrants) for (let position = 1; position <= count; position++) {
85
85
  const tooth = quadrant * 10 + position, back = position >= count - (count === 8 ? 4 : 1), roll = u();
@@ -99,7 +99,7 @@ var CareSamples = class {
99
99
  }
100
100
  /** `{ time, channel, value, event }`: four seconds of 19-channel scalp EEG in microvolts at 100 Hz, with event rows at the end. */
101
101
  static eeg(seed) {
102
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed), rate = 100, seconds = 4;
102
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed), rate = 100, seconds = 4;
103
103
  const blink = 0.45 + u() * 0.3, closed = 1.5 + u() * 0.5, alpha = 9.5 + u() * 1.5;
104
104
  const rows = EEG_SITES.flatMap(([channel, back]) => {
105
105
  const phase = u() * 6.28, gain = 0.85 + u() * 0.3, front = channel.startsWith("Fp") ? 1 : channel.startsWith("F") ? 0.25 : 0;
@@ -117,7 +117,7 @@ var CareSamples = class {
117
117
  }
118
118
  /** `{ channel, value }`: alpha-band power in square microvolts at each 10-20 site, strongest over the back of the head. */
119
119
  static scalp(seed) {
120
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), lean = u() < 0.5 ? 1 : -1;
120
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), lean = u() < 0.5 ? 1 : -1;
121
121
  return EEG_SITES.map(([channel, back]) => {
122
122
  const side = /[13579]$/.test(channel) ? -1 : /z$/.test(channel) ? 0 : 1;
123
123
  return { channel, value: round(3 + 42 * back ** 1.7 * (1 + 0.18 * side * lean) + u() * 4) };
@@ -125,7 +125,7 @@ var CareSamples = class {
125
125
  }
126
126
  /** `{ x, y, sensitivity, deviation, probability }`: a 30-2 threshold test of a right eye in degrees and decibels, with an arcuate defect. */
127
127
  static visualField(seed) {
128
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed), upper = seed % 2 ? 1 : -1, depth = 16 + u() * 8;
128
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed), upper = seed % 2 ? 1 : -1, depth = 16 + u() * 8;
129
129
  const rows = [];
130
130
  for (let y = 27; y >= -27; y -= 6) for (let x = -27; x <= 27; x += 6) {
131
131
  const limit = [27, 27, 21, 15, 9][(Math.abs(y) - 3) / 6];
@@ -143,7 +143,7 @@ var CareSamples = class {
143
143
  }
144
144
  /** `{ ear, pressure, compliance }`: one sweep per ear from +200 to -400 daPa, in mL, each seed pairing two different tympanogram shapes. */
145
145
  static tympanometry(seed) {
146
- const { n } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
146
+ const { n } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
147
147
  return ["Right", "Left"].flatMap((ear, e) => {
148
148
  const shape = TYMPANOGRAMS[(Math.abs(Math.round(seed)) - 1 + e) % TYMPANOGRAMS.length];
149
149
  return Array.from({ length: 61 }, (_, i) => {
@@ -154,7 +154,7 @@ var CareSamples = class {
154
154
  }
155
155
  /** `{ time, co2 }`: twelve seconds of exhaled CO2 in mmHg at 25 Hz. */
156
156
  static capnography(seed) {
157
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed), rows = [];
157
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed), rows = [];
158
158
  const period = 3.4 + u() * 1.4, level = 33 + u() * 9;
159
159
  let start = -u() * period * 0.4;
160
160
  while (start < 12) {
@@ -170,7 +170,7 @@ var CareSamples = class {
170
170
  }
171
171
  /** `{ region, side, value }`: a pain score from 0 to 10 for each region of the front and back of the body. */
172
172
  static bodyRegions(seed) {
173
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), pattern = PAIN[(Math.abs(Math.round(seed)) + 1) % PAIN.length];
173
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), pattern = PAIN[(Math.abs(Math.round(seed)) + 1) % PAIN.length];
174
174
  return BODY_REGIONS.map(([region, side]) => {
175
175
  const hit = pattern.find((entry) => entry[0] === region && entry[1] === side);
176
176
  return { region, side, value: hit ? clamp(hit[2] + Math.round(u() * 2 - 1), 1, 10) : 0 };
@@ -178,7 +178,7 @@ var CareSamples = class {
178
178
  }
179
179
  /** `{ time, glucose }`: fourteen days of sensor glucose in mg/dL, one reading every 15 minutes, in local time. */
180
180
  static glucose(seed) {
181
- const { u, n } = _chunkUMEKIIHJcjs.SampleData.rng(seed), rows = [];
181
+ const { u, n } = _chunkLNWTC72Ycjs.SampleData.rng(seed), rows = [];
182
182
  let wander = 0;
183
183
  for (let day = 0; day < 14; day++) {
184
184
  const meals = [7.5 + n() * 0.4, 12.6 + n() * 0.5, 19 + n() * 0.6].map((hour) => ({ hour, size: 45 + u() * 70 }));
@@ -196,13 +196,13 @@ var CareSamples = class {
196
196
  }
197
197
  /** `{ arm, events, total }`: how many people in each arm of an invented trial had the outcome. */
198
198
  static trialArms(seed) {
199
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), total = 1200 + Math.round(u() * 8) * 100;
199
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), total = 1200 + Math.round(u() * 8) * 100;
200
200
  const risk = 0.16 + u() * 0.14, ratio = 0.55 + u() * 0.25;
201
201
  return [{ arm: "Control", events: Math.round(total * risk), total }, { arm: "Treatment", events: Math.round(total * risk * ratio), total }];
202
202
  }
203
203
  /** People with `{ id, name, sex, age, deceased, index, household }` and links whose `kind` is a union, a child line or a relationship quality. */
204
204
  static family(seed) {
205
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), age = (base) => base + Math.round(u() * 4);
205
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), age = (base) => base + Math.round(u() * 4);
206
206
  const person = (id, sex, base, extra = {}) => ({ id, name: id, sex, age: age(base), deceased: false, index: false, household: null, ...extra });
207
207
  const nodes = [
208
208
  person("Walter", "male", 81),
@@ -247,7 +247,7 @@ var CareSamples = class {
247
247
  }
248
248
  /** `{ system, group, tie, flow, value }`: the services and people around one household, how strong each tie is and which way support flows. */
249
249
  static supports(seed) {
250
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
250
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
251
251
  return SYSTEMS.map(([system, group, tie, flow], i) => ({
252
252
  system,
253
253
  group,
@@ -258,7 +258,7 @@ var CareSamples = class {
258
258
  }
259
259
  /** Pupils with `{ id, group }` and one link per choice of a classmate to sit with, with a few well-chosen pupils and some chosen by nobody. */
260
260
  static choices(seed) {
261
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
261
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
262
262
  const nodes = PUPILS.map((id, i) => ({ id, group: TABLES[i % TABLES.length] }));
263
263
  const pull = PUPILS.map((_, i) => i === 2 || i === 9 ? 7 : i === 13 ? 4.5 : i === 5 || i === 16 ? 0 : 0.6 + u() * 1.6);
264
264
  const links = nodes.flatMap((node, i) => {