ranui 0.2.1-alpha.1 → 0.2.1-alpha.4

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 (312) hide show
  1. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  2. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  3. package/dist/arc-D25LhgTs.cjs +1 -0
  4. package/dist/arc-DRPGof21.js +82 -0
  5. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  6. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  7. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  8. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  9. package/dist/array-By5736M5.js +7 -0
  10. package/dist/array-C3cbN3GY.cjs +1 -0
  11. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  12. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  13. package/dist/builder.d.ts +2 -2
  14. package/dist/builder.js +39 -34
  15. package/dist/{builtin-D9djWkCE.js → builtin-1lUEp_ro.js} +83 -76
  16. package/dist/button-Cj-XSCsd.js +117 -0
  17. package/dist/button.js +1 -1
  18. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  19. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  20. package/dist/{card-CqJa4Q_v.js → card-BHN9Xp4S.js} +2 -2
  21. package/dist/card.js +1 -1
  22. package/dist/channel-C9WSNwcS.cjs +1 -0
  23. package/dist/channel-k5-UxdcV.js +5 -0
  24. package/dist/{checkbox-CThC9-vy.js → checkbox-O_J_n1_W.js} +10 -10
  25. package/dist/checkbox.js +1 -1
  26. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  27. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  28. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  29. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  30. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  31. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  32. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  33. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  34. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  35. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  36. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  37. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  38. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  39. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  40. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  41. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  42. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  43. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  44. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  45. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  46. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  47. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  48. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  49. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  50. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  51. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  52. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  53. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  54. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  55. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  56. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  57. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  58. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  59. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  60. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  61. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  62. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  63. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  64. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  65. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  66. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  67. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  68. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  69. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  70. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  71. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  72. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  73. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  74. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  75. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  76. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  77. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  78. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  79. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  80. package/dist/{colorpicker-XNxDRcQ-.js → colorpicker-mebH0XLm.js} +8 -8
  81. package/dist/colorpicker.js +1 -1
  82. package/dist/components/glass/index.d.ts +52 -0
  83. package/dist/components/icon/core-icons.d.ts +13 -0
  84. package/dist/components/icon/index.d.ts +1 -1
  85. package/dist/components/mermaid/index.d.ts +52 -0
  86. package/dist/components/modal/index.d.ts +9 -0
  87. package/dist/content-YOKzMoc7.js +39 -0
  88. package/dist/content.js +5 -0
  89. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  90. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  91. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  92. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  93. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  94. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  95. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  96. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  97. package/dist/dagre-D1-W1tt6.cjs +1 -0
  98. package/dist/dagre-D8GLTwuf.js +1578 -0
  99. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  100. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  101. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  102. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  103. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  104. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  105. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  106. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  107. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  108. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  109. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  110. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  111. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  112. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  113. package/dist/dist-C0Fwsvsq.js +70 -0
  114. package/dist/dist-C20XxSsP.cjs +1 -0
  115. package/dist/{dropdown-CCvsambb.js → dropdown-CzGAVWYC.js} +4 -4
  116. package/dist/dropdown.js +1 -1
  117. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  118. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  119. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  120. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  121. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  122. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  123. package/dist/factory-ZNhcQ4tf.js +482 -0
  124. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  125. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  126. package/dist/{form-Ceq3uJzz.js → form-B8afuJlF.js} +5 -5
  127. package/dist/form.js +1 -1
  128. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  129. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  130. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  131. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  132. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  133. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  134. package/dist/glass-BniIptBE.js +115 -0
  135. package/dist/glass.js +5 -0
  136. package/dist/graphlib-CCKThIKP.js +1104 -0
  137. package/dist/graphlib-Du-578Js.cjs +1 -0
  138. package/dist/{icon-C_ENrJ3F.js → icon-GZrfSeon.js} +77 -25
  139. package/dist/icon.js +1 -1
  140. package/dist/icons.js +1 -1
  141. package/dist/iife/button.iife.js +1 -1
  142. package/dist/iife/card.iife.js +1 -1
  143. package/dist/iife/checkbox.iife.js +1 -1
  144. package/dist/iife/colorpicker.iife.js +2 -2
  145. package/dist/iife/content.iife.js +1 -0
  146. package/dist/iife/dropdown.iife.js +1 -1
  147. package/dist/iife/form.iife.js +1 -1
  148. package/dist/iife/glass.iife.js +1 -0
  149. package/dist/iife/icon.iife.js +1 -1
  150. package/dist/iife/image.iife.js +1 -1
  151. package/dist/iife/input.iife.js +1 -1
  152. package/dist/iife/loading.iife.js +1 -1
  153. package/dist/iife/math.iife.js +14 -14
  154. package/dist/iife/mermaid.iife.js +3535 -0
  155. package/dist/iife/message.iife.js +1 -1
  156. package/dist/iife/modal.iife.js +1 -1
  157. package/dist/iife/player.iife.js +8 -8
  158. package/dist/iife/popover.iife.js +1 -1
  159. package/dist/iife/progress.iife.js +1 -1
  160. package/dist/iife/radar.iife.js +1 -1
  161. package/dist/iife/route.iife.js +1 -1
  162. package/dist/iife/router.iife.js +1 -1
  163. package/dist/iife/scratch.iife.js +1 -1
  164. package/dist/iife/section.iife.js +1 -1
  165. package/dist/iife/select.iife.js +2 -2
  166. package/dist/iife/skeleton.iife.js +1 -1
  167. package/dist/iife/tab.iife.js +1 -1
  168. package/dist/iife/tabpane.iife.js +1 -1
  169. package/dist/iife/theme-switch.iife.js +1 -1
  170. package/dist/{image-B7MBI5n_.js → image-CqoQfJoV.js} +4 -4
  171. package/dist/image.js +1 -1
  172. package/dist/index.cjs +38 -37
  173. package/dist/index.d.ts +8 -0
  174. package/dist/index.iife.js +3623 -88
  175. package/dist/index.js +88 -84
  176. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  177. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  178. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  179. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  180. package/dist/init-1VpIn1S3.js +16 -0
  181. package/dist/init-CbDwVtpO.cjs +1 -0
  182. package/dist/{input-RNqdEHPf.js → input-BlwAXu7I.js} +6 -6
  183. package/dist/input.js +1 -1
  184. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  185. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  186. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  187. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  188. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  189. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  190. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  191. package/dist/katex-Pg2EqTH0.js +23485 -0
  192. package/dist/line-BIPmUVxO.js +33 -0
  193. package/dist/line-CAB5QHC6.cjs +1 -0
  194. package/dist/linear-B2AM4ZBe.js +259 -0
  195. package/dist/linear-CSAfNEpl.cjs +1 -0
  196. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  197. package/dist/link.js +1 -1
  198. package/dist/{loading-B9MFI03l.js → loading-M6gWxLbm.js} +4 -4
  199. package/dist/loading.js +1 -1
  200. package/dist/map-BC2bk_rV.cjs +1 -0
  201. package/dist/map-DMSWkcq6.js +208 -0
  202. package/dist/{math-CudIwEXZ.js → math-8E-45Y8e.js} +4 -4
  203. package/dist/math.js +1 -1
  204. package/dist/mermaid-C1oQyPE3.js +261 -0
  205. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  206. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  207. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  208. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  209. package/dist/mermaid.js +5 -0
  210. package/dist/{message-DW7qWpEm.js → message-CNdmbeLf.js} +6 -6
  211. package/dist/message.js +1 -1
  212. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  213. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  214. package/dist/{modal-CrvGKL2B.js → modal-gRagDkTb.js} +40 -24
  215. package/dist/modal.js +1 -1
  216. package/dist/ordinal-BMN81JG2.js +64 -0
  217. package/dist/ordinal-BplLHIij.cjs +1 -0
  218. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  219. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  220. package/dist/path-Bja5PoYn.js +82 -0
  221. package/dist/path-DmfWsuKi.cjs +1 -0
  222. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  223. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  224. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  225. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  226. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  227. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  228. package/dist/{player-BKQaaT7o.js → player-CAQ5Og2P.js} +196 -195
  229. package/dist/player.js +1 -1
  230. package/dist/{popover-CvYIVgUS.js → popover-BZKSLe3D.js} +22 -54
  231. package/dist/popover.js +1 -1
  232. package/dist/{progress-C6jctsFH.js → progress-vk40tuhm.js} +5 -5
  233. package/dist/progress.js +1 -1
  234. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  235. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  236. package/dist/{radar-BUb4EzmG.js → radar-Bg0cexzU.js} +5 -5
  237. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  238. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  239. package/dist/radar.js +1 -1
  240. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  241. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  242. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  243. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  244. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  245. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  246. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  247. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  248. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  249. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  250. package/dist/ranui.css +1 -1
  251. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  252. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  253. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  254. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  255. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  256. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  257. package/dist/{route-Djrf9UR_.js → route-CGwS0cd_.js} +10 -10
  258. package/dist/route.js +1 -1
  259. package/dist/{router-BU2KhtxV.js → router-BK6DEkcN.js} +5 -5
  260. package/dist/router.js +1 -1
  261. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  262. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  263. package/dist/{scratch-CO4I2dIa.js → scratch-ClF1awGi.js} +2 -2
  264. package/dist/scratch.js +1 -1
  265. package/dist/{section-CsUkp8bv.js → section-BL0V7Kjf.js} +2 -2
  266. package/dist/section.js +1 -1
  267. package/dist/{select-Dn26ajJZ.js → select-BIFVbQIj.js} +13 -13
  268. package/dist/select.js +1 -1
  269. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  270. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  271. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  272. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  273. package/dist/{skeleton-BuMLhvzQ.js → skeleton-D7JIbROq.js} +5 -5
  274. package/dist/skeleton.js +1 -1
  275. package/dist/src-C9EhKhbk.cjs +1 -0
  276. package/dist/src-DtRLxcYO.js +2104 -0
  277. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  278. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  279. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  280. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  281. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  282. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  283. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  284. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  285. package/dist/{tab-40fDkuox.js → tab-DFVtDJb2.js} +5 -5
  286. package/dist/tab.js +1 -1
  287. package/dist/{tabpane-F4Pd7JtC.js → tabpane-C3qZGN-D.js} +5 -5
  288. package/dist/tabpane.js +1 -1
  289. package/dist/test/ssr/stream.test.d.ts +1 -0
  290. package/dist/{theme-switch-B09egc6h.js → theme-switch-BXNH5uPD.js} +45 -45
  291. package/dist/theme-switch.js +1 -1
  292. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  293. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  294. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  295. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  296. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  297. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  298. package/dist/utils/builder/core.d.ts +135 -3
  299. package/dist/utils/builder/index.d.ts +1 -1
  300. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  301. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  302. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  303. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  304. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  305. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  306. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  307. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  308. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  309. package/docs/BUILDER.md +170 -2
  310. package/package.json +7 -1
  311. package/dist/button-BfYw0fes.js +0 -117
  312. package/dist/factory-DCrO37si.js +0 -334
@@ -0,0 +1,2154 @@
1
+ import { n as a } from "./chunk-Y2CYZVJY-0JxdZxki.js";
2
+ import { m as It } from "./src-DtRLxcYO.js";
3
+ import { D as ai, H as ni, K as oi, U as ri, a as hi, b as pt, c as li, f as ci, v as ui, w as Mt, y as gi, z as xi } from "./chunk-WYO6CB5R-DDHkKowO.js";
4
+ import { t as Lt } from "./linear-B2AM4ZBe.js";
5
+ import { t as di } from "./ordinal-BMN81JG2.js";
6
+ import { t as fi } from "./init-1VpIn1S3.js";
7
+ import { i as zt } from "./chunk-ICXQ74PX-DR8rL-xF.js";
8
+ import { t as vt } from "./line-BIPmUVxO.js";
9
+ import { t as pi } from "./chunk-VAUOI2AC-izt0o4id.js";
10
+ import "./chunk-HOUHSVGY-DRQcQeMT.js";
11
+ import { t as mi } from "./chunk-Q4XR5HBZ-3BHjjc9u.js";
12
+ function yi(t, i, s) {
13
+ t = +t, i = +i, s = (n = arguments.length) < 2 ? (i = t, t = 0, 1) : n < 3 ? 1 : +s;
14
+ for (var e = -1, n = Math.max(0, Math.ceil((i - t) / s)) | 0, c = new Array(n); ++e < n; ) c[e] = t + e * s;
15
+ return c;
16
+ }
17
+ function ut() {
18
+ var t = di().unknown(void 0), i = t.domain, s = t.range, e = 0, n = 1, c, l, f = !1, S = 0, T = 0, P = 0.5;
19
+ delete t.unknown;
20
+ function _() {
21
+ var y = i().length, M = n < e, v = M ? n : e, E = M ? e : n;
22
+ c = (E - v) / Math.max(1, y - S + T * 2), f && (c = Math.floor(c)), v += (E - v - c * (y - S)) * P, l = c * (1 - S), f && (v = Math.round(v), l = Math.round(l));
23
+ var z = yi(y).map(function(p) {
24
+ return v + c * p;
25
+ });
26
+ return s(M ? z.reverse() : z);
27
+ }
28
+ return t.domain = function(y) {
29
+ return arguments.length ? (i(y), _()) : i();
30
+ }, t.range = function(y) {
31
+ return arguments.length ? ([e, n] = y, e = +e, n = +n, _()) : [e, n];
32
+ }, t.rangeRound = function(y) {
33
+ return [e, n] = y, e = +e, n = +n, f = !0, _();
34
+ }, t.bandwidth = function() {
35
+ return l;
36
+ }, t.step = function() {
37
+ return c;
38
+ }, t.round = function(y) {
39
+ return arguments.length ? (f = !!y, _()) : f;
40
+ }, t.padding = function(y) {
41
+ return arguments.length ? (S = Math.min(1, T = +y), _()) : S;
42
+ }, t.paddingInner = function(y) {
43
+ return arguments.length ? (S = Math.min(1, y), _()) : S;
44
+ }, t.paddingOuter = function(y) {
45
+ return arguments.length ? (T = +y, _()) : T;
46
+ }, t.align = function(y) {
47
+ return arguments.length ? (P = Math.max(0, Math.min(1, y)), _()) : P;
48
+ }, t.copy = function() {
49
+ return ut(i(), [e, n]).round(f).paddingInner(S).paddingOuter(T).align(P);
50
+ }, fi.apply(_(), arguments);
51
+ }
52
+ var gt = (function() {
53
+ var t = /* @__PURE__ */ a(function(o, u, A, g) {
54
+ for (A = A || {}, g = o.length; g--; A[o[g]] = u) ;
55
+ return A;
56
+ }, "o"), i = [
57
+ 1,
58
+ 10,
59
+ 12,
60
+ 14,
61
+ 16,
62
+ 18,
63
+ 19,
64
+ 21,
65
+ 23
66
+ ], s = [2, 6], e = [1, 3], n = [1, 5], c = [1, 6], l = [1, 7], f = [
67
+ 1,
68
+ 5,
69
+ 10,
70
+ 12,
71
+ 14,
72
+ 16,
73
+ 18,
74
+ 19,
75
+ 21,
76
+ 23,
77
+ 36,
78
+ 37,
79
+ 38
80
+ ], S = [1, 25], T = [1, 26], P = [1, 28], _ = [1, 29], y = [1, 30], M = [1, 31], v = [1, 32], E = [1, 33], z = [1, 34], p = [1, 35], D = [1, 36], h = [1, 37], V = [1, 43], F = [1, 42], X = [1, 47], Y = [1, 50], C = [
81
+ 1,
82
+ 10,
83
+ 12,
84
+ 14,
85
+ 16,
86
+ 18,
87
+ 19,
88
+ 21,
89
+ 23,
90
+ 36,
91
+ 37,
92
+ 38
93
+ ], U = [
94
+ 1,
95
+ 10,
96
+ 12,
97
+ 14,
98
+ 16,
99
+ 18,
100
+ 19,
101
+ 21,
102
+ 23,
103
+ 24,
104
+ 26,
105
+ 28,
106
+ 29,
107
+ 36,
108
+ 37,
109
+ 38
110
+ ], b = [
111
+ 1,
112
+ 10,
113
+ 12,
114
+ 14,
115
+ 16,
116
+ 18,
117
+ 19,
118
+ 21,
119
+ 23,
120
+ 24,
121
+ 26,
122
+ 28,
123
+ 29,
124
+ 36,
125
+ 37,
126
+ 38,
127
+ 42,
128
+ 43,
129
+ 44,
130
+ 45,
131
+ 46,
132
+ 47,
133
+ 48,
134
+ 49,
135
+ 50,
136
+ 51
137
+ ], w = [1, 65], B = [26, 28], R = {
138
+ trace: /* @__PURE__ */ a(function() {
139
+ }, "trace"),
140
+ yy: {},
141
+ symbols_: {
142
+ error: 2,
143
+ start: 3,
144
+ eol: 4,
145
+ XYCHART: 5,
146
+ chartConfig: 6,
147
+ document: 7,
148
+ CHART_ORIENTATION: 8,
149
+ statement: 9,
150
+ title: 10,
151
+ text: 11,
152
+ X_AXIS: 12,
153
+ parseXAxis: 13,
154
+ Y_AXIS: 14,
155
+ parseYAxis: 15,
156
+ LINE: 16,
157
+ plotData: 17,
158
+ BAR: 18,
159
+ acc_title: 19,
160
+ acc_title_value: 20,
161
+ acc_descr: 21,
162
+ acc_descr_value: 22,
163
+ acc_descr_multiline_value: 23,
164
+ SQUARE_BRACES_START: 24,
165
+ dataPoints: 25,
166
+ SQUARE_BRACES_END: 26,
167
+ dataPoint: 27,
168
+ COMMA: 28,
169
+ NUMBER_WITH_DECIMAL: 29,
170
+ STR: 30,
171
+ xAxisData: 31,
172
+ bandData: 32,
173
+ ARROW_DELIMITER: 33,
174
+ commaSeparatedTexts: 34,
175
+ yAxisData: 35,
176
+ NEWLINE: 36,
177
+ SEMI: 37,
178
+ EOF: 38,
179
+ alphaNum: 39,
180
+ MD_STR: 40,
181
+ alphaNumToken: 41,
182
+ AMP: 42,
183
+ NUM: 43,
184
+ ALPHA: 44,
185
+ PLUS: 45,
186
+ EQUALS: 46,
187
+ MULT: 47,
188
+ DOT: 48,
189
+ BRKT: 49,
190
+ MINUS: 50,
191
+ UNDERSCORE: 51,
192
+ $accept: 0,
193
+ $end: 1
194
+ },
195
+ terminals_: {
196
+ 2: "error",
197
+ 5: "XYCHART",
198
+ 8: "CHART_ORIENTATION",
199
+ 10: "title",
200
+ 12: "X_AXIS",
201
+ 14: "Y_AXIS",
202
+ 16: "LINE",
203
+ 18: "BAR",
204
+ 19: "acc_title",
205
+ 20: "acc_title_value",
206
+ 21: "acc_descr",
207
+ 22: "acc_descr_value",
208
+ 23: "acc_descr_multiline_value",
209
+ 24: "SQUARE_BRACES_START",
210
+ 26: "SQUARE_BRACES_END",
211
+ 28: "COMMA",
212
+ 29: "NUMBER_WITH_DECIMAL",
213
+ 30: "STR",
214
+ 33: "ARROW_DELIMITER",
215
+ 36: "NEWLINE",
216
+ 37: "SEMI",
217
+ 38: "EOF",
218
+ 40: "MD_STR",
219
+ 42: "AMP",
220
+ 43: "NUM",
221
+ 44: "ALPHA",
222
+ 45: "PLUS",
223
+ 46: "EQUALS",
224
+ 47: "MULT",
225
+ 48: "DOT",
226
+ 49: "BRKT",
227
+ 50: "MINUS",
228
+ 51: "UNDERSCORE"
229
+ },
230
+ productions_: [
231
+ 0,
232
+ [3, 2],
233
+ [3, 3],
234
+ [3, 2],
235
+ [3, 1],
236
+ [6, 1],
237
+ [7, 0],
238
+ [7, 2],
239
+ [9, 2],
240
+ [9, 2],
241
+ [9, 2],
242
+ [9, 2],
243
+ [9, 2],
244
+ [9, 3],
245
+ [9, 2],
246
+ [9, 3],
247
+ [9, 2],
248
+ [9, 2],
249
+ [9, 1],
250
+ [17, 3],
251
+ [25, 3],
252
+ [25, 1],
253
+ [27, 2],
254
+ [27, 1],
255
+ [13, 1],
256
+ [13, 2],
257
+ [13, 1],
258
+ [31, 1],
259
+ [31, 3],
260
+ [32, 3],
261
+ [34, 3],
262
+ [34, 1],
263
+ [15, 1],
264
+ [15, 2],
265
+ [15, 1],
266
+ [35, 3],
267
+ [4, 1],
268
+ [4, 1],
269
+ [4, 1],
270
+ [11, 1],
271
+ [11, 1],
272
+ [11, 1],
273
+ [39, 1],
274
+ [39, 2],
275
+ [41, 1],
276
+ [41, 1],
277
+ [41, 1],
278
+ [41, 1],
279
+ [41, 1],
280
+ [41, 1],
281
+ [41, 1],
282
+ [41, 1],
283
+ [41, 1],
284
+ [41, 1]
285
+ ],
286
+ performAction: /* @__PURE__ */ a(function(u, A, g, x, k, r, Q) {
287
+ var d = r.length - 1;
288
+ switch (k) {
289
+ case 5:
290
+ x.setOrientation(r[d]);
291
+ break;
292
+ case 9:
293
+ x.setDiagramTitle(r[d].text.trim());
294
+ break;
295
+ case 12:
296
+ x.setLineData({
297
+ text: "",
298
+ type: "text"
299
+ }, r[d]);
300
+ break;
301
+ case 13:
302
+ x.setLineData(r[d - 1], r[d]);
303
+ break;
304
+ case 14:
305
+ x.setBarData({
306
+ text: "",
307
+ type: "text"
308
+ }, r[d]);
309
+ break;
310
+ case 15:
311
+ x.setBarData(r[d - 1], r[d]);
312
+ break;
313
+ case 16:
314
+ this.$ = r[d].trim(), x.setAccTitle(this.$);
315
+ break;
316
+ case 17:
317
+ case 18:
318
+ this.$ = r[d].trim(), x.setAccDescription(this.$);
319
+ break;
320
+ case 19:
321
+ this.$ = r[d - 1];
322
+ break;
323
+ case 20:
324
+ case 30:
325
+ this.$ = [r[d - 2], ...r[d]];
326
+ break;
327
+ case 21:
328
+ case 31:
329
+ this.$ = [r[d]];
330
+ break;
331
+ case 22:
332
+ this.$ = {
333
+ value: Number(r[d - 1]),
334
+ label: r[d]
335
+ };
336
+ break;
337
+ case 23:
338
+ this.$ = {
339
+ value: Number(r[d]),
340
+ label: ""
341
+ };
342
+ break;
343
+ case 24:
344
+ x.setXAxisTitle(r[d]);
345
+ break;
346
+ case 25:
347
+ x.setXAxisTitle(r[d - 1]);
348
+ break;
349
+ case 26:
350
+ x.setXAxisTitle({
351
+ type: "text",
352
+ text: ""
353
+ });
354
+ break;
355
+ case 27:
356
+ x.setXAxisBand(r[d]);
357
+ break;
358
+ case 28:
359
+ x.setXAxisRangeData(Number(r[d - 2]), Number(r[d]));
360
+ break;
361
+ case 29:
362
+ this.$ = r[d - 1];
363
+ break;
364
+ case 32:
365
+ x.setYAxisTitle(r[d]);
366
+ break;
367
+ case 33:
368
+ x.setYAxisTitle(r[d - 1]);
369
+ break;
370
+ case 34:
371
+ x.setYAxisTitle({
372
+ type: "text",
373
+ text: ""
374
+ });
375
+ break;
376
+ case 35:
377
+ x.setYAxisRangeData(Number(r[d - 2]), Number(r[d]));
378
+ break;
379
+ case 39:
380
+ this.$ = {
381
+ text: r[d],
382
+ type: "text"
383
+ };
384
+ break;
385
+ case 40:
386
+ this.$ = {
387
+ text: r[d],
388
+ type: "text"
389
+ };
390
+ break;
391
+ case 41:
392
+ this.$ = {
393
+ text: r[d],
394
+ type: "markdown"
395
+ };
396
+ break;
397
+ case 42:
398
+ this.$ = r[d];
399
+ break;
400
+ case 43:
401
+ this.$ = r[d - 1] + "" + r[d];
402
+ break;
403
+ }
404
+ }, "anonymous"),
405
+ table: [
406
+ t(i, s, {
407
+ 3: 1,
408
+ 4: 2,
409
+ 7: 4,
410
+ 5: e,
411
+ 36: n,
412
+ 37: c,
413
+ 38: l
414
+ }),
415
+ { 1: [3] },
416
+ t(i, s, {
417
+ 4: 2,
418
+ 7: 4,
419
+ 3: 8,
420
+ 5: e,
421
+ 36: n,
422
+ 37: c,
423
+ 38: l
424
+ }),
425
+ t(i, s, {
426
+ 4: 2,
427
+ 7: 4,
428
+ 6: 9,
429
+ 3: 10,
430
+ 5: e,
431
+ 8: [1, 11],
432
+ 36: n,
433
+ 37: c,
434
+ 38: l
435
+ }),
436
+ {
437
+ 1: [2, 4],
438
+ 9: 12,
439
+ 10: [1, 13],
440
+ 12: [1, 14],
441
+ 14: [1, 15],
442
+ 16: [1, 16],
443
+ 18: [1, 17],
444
+ 19: [1, 18],
445
+ 21: [1, 19],
446
+ 23: [1, 20]
447
+ },
448
+ t(f, [2, 36]),
449
+ t(f, [2, 37]),
450
+ t(f, [2, 38]),
451
+ { 1: [2, 1] },
452
+ t(i, s, {
453
+ 4: 2,
454
+ 7: 4,
455
+ 3: 21,
456
+ 5: e,
457
+ 36: n,
458
+ 37: c,
459
+ 38: l
460
+ }),
461
+ { 1: [2, 3] },
462
+ t(f, [2, 5]),
463
+ t(i, [2, 7], {
464
+ 4: 22,
465
+ 36: n,
466
+ 37: c,
467
+ 38: l
468
+ }),
469
+ {
470
+ 11: 23,
471
+ 30: S,
472
+ 39: 24,
473
+ 40: T,
474
+ 41: 27,
475
+ 42: P,
476
+ 43: _,
477
+ 44: y,
478
+ 45: M,
479
+ 46: v,
480
+ 47: E,
481
+ 48: z,
482
+ 49: p,
483
+ 50: D,
484
+ 51: h
485
+ },
486
+ {
487
+ 11: 39,
488
+ 13: 38,
489
+ 24: V,
490
+ 29: F,
491
+ 30: S,
492
+ 31: 40,
493
+ 32: 41,
494
+ 39: 24,
495
+ 40: T,
496
+ 41: 27,
497
+ 42: P,
498
+ 43: _,
499
+ 44: y,
500
+ 45: M,
501
+ 46: v,
502
+ 47: E,
503
+ 48: z,
504
+ 49: p,
505
+ 50: D,
506
+ 51: h
507
+ },
508
+ {
509
+ 11: 45,
510
+ 15: 44,
511
+ 29: X,
512
+ 30: S,
513
+ 35: 46,
514
+ 39: 24,
515
+ 40: T,
516
+ 41: 27,
517
+ 42: P,
518
+ 43: _,
519
+ 44: y,
520
+ 45: M,
521
+ 46: v,
522
+ 47: E,
523
+ 48: z,
524
+ 49: p,
525
+ 50: D,
526
+ 51: h
527
+ },
528
+ {
529
+ 11: 49,
530
+ 17: 48,
531
+ 24: Y,
532
+ 30: S,
533
+ 39: 24,
534
+ 40: T,
535
+ 41: 27,
536
+ 42: P,
537
+ 43: _,
538
+ 44: y,
539
+ 45: M,
540
+ 46: v,
541
+ 47: E,
542
+ 48: z,
543
+ 49: p,
544
+ 50: D,
545
+ 51: h
546
+ },
547
+ {
548
+ 11: 52,
549
+ 17: 51,
550
+ 24: Y,
551
+ 30: S,
552
+ 39: 24,
553
+ 40: T,
554
+ 41: 27,
555
+ 42: P,
556
+ 43: _,
557
+ 44: y,
558
+ 45: M,
559
+ 46: v,
560
+ 47: E,
561
+ 48: z,
562
+ 49: p,
563
+ 50: D,
564
+ 51: h
565
+ },
566
+ { 20: [1, 53] },
567
+ { 22: [1, 54] },
568
+ t(C, [2, 18]),
569
+ { 1: [2, 2] },
570
+ t(C, [2, 8]),
571
+ t(C, [2, 9]),
572
+ t(U, [2, 39], {
573
+ 41: 55,
574
+ 42: P,
575
+ 43: _,
576
+ 44: y,
577
+ 45: M,
578
+ 46: v,
579
+ 47: E,
580
+ 48: z,
581
+ 49: p,
582
+ 50: D,
583
+ 51: h
584
+ }),
585
+ t(U, [2, 40]),
586
+ t(U, [2, 41]),
587
+ t(b, [2, 42]),
588
+ t(b, [2, 44]),
589
+ t(b, [2, 45]),
590
+ t(b, [2, 46]),
591
+ t(b, [2, 47]),
592
+ t(b, [2, 48]),
593
+ t(b, [2, 49]),
594
+ t(b, [2, 50]),
595
+ t(b, [2, 51]),
596
+ t(b, [2, 52]),
597
+ t(b, [2, 53]),
598
+ t(C, [2, 10]),
599
+ t(C, [2, 24], {
600
+ 32: 41,
601
+ 31: 56,
602
+ 24: V,
603
+ 29: F
604
+ }),
605
+ t(C, [2, 26]),
606
+ t(C, [2, 27]),
607
+ { 33: [1, 57] },
608
+ {
609
+ 11: 59,
610
+ 30: S,
611
+ 34: 58,
612
+ 39: 24,
613
+ 40: T,
614
+ 41: 27,
615
+ 42: P,
616
+ 43: _,
617
+ 44: y,
618
+ 45: M,
619
+ 46: v,
620
+ 47: E,
621
+ 48: z,
622
+ 49: p,
623
+ 50: D,
624
+ 51: h
625
+ },
626
+ t(C, [2, 11]),
627
+ t(C, [2, 32], {
628
+ 35: 60,
629
+ 29: X
630
+ }),
631
+ t(C, [2, 34]),
632
+ { 33: [1, 61] },
633
+ t(C, [2, 12]),
634
+ {
635
+ 17: 62,
636
+ 24: Y
637
+ },
638
+ {
639
+ 25: 63,
640
+ 27: 64,
641
+ 29: w
642
+ },
643
+ t(C, [2, 14]),
644
+ {
645
+ 17: 66,
646
+ 24: Y
647
+ },
648
+ t(C, [2, 16]),
649
+ t(C, [2, 17]),
650
+ t(b, [2, 43]),
651
+ t(C, [2, 25]),
652
+ { 29: [1, 67] },
653
+ { 26: [1, 68] },
654
+ {
655
+ 26: [2, 31],
656
+ 28: [1, 69]
657
+ },
658
+ t(C, [2, 33]),
659
+ { 29: [1, 70] },
660
+ t(C, [2, 13]),
661
+ { 26: [1, 71] },
662
+ {
663
+ 26: [2, 21],
664
+ 28: [1, 72]
665
+ },
666
+ t(B, [2, 23], { 30: [1, 73] }),
667
+ t(C, [2, 15]),
668
+ t(C, [2, 28]),
669
+ t(C, [2, 29]),
670
+ {
671
+ 11: 59,
672
+ 30: S,
673
+ 34: 74,
674
+ 39: 24,
675
+ 40: T,
676
+ 41: 27,
677
+ 42: P,
678
+ 43: _,
679
+ 44: y,
680
+ 45: M,
681
+ 46: v,
682
+ 47: E,
683
+ 48: z,
684
+ 49: p,
685
+ 50: D,
686
+ 51: h
687
+ },
688
+ t(C, [2, 35]),
689
+ t(C, [2, 19]),
690
+ {
691
+ 25: 75,
692
+ 27: 64,
693
+ 29: w
694
+ },
695
+ t(B, [2, 22]),
696
+ { 26: [2, 30] },
697
+ { 26: [2, 20] }
698
+ ],
699
+ defaultActions: {
700
+ 8: [2, 1],
701
+ 10: [2, 3],
702
+ 21: [2, 2],
703
+ 74: [2, 30],
704
+ 75: [2, 20]
705
+ },
706
+ parseError: /* @__PURE__ */ a(function(u, A) {
707
+ if (A.recoverable) this.trace(u);
708
+ else {
709
+ var g = new Error(u);
710
+ throw g.hash = A, g;
711
+ }
712
+ }, "parseError"),
713
+ parse: /* @__PURE__ */ a(function(u) {
714
+ var A = this, g = [0], x = [], k = [null], r = [], Q = this.table, d = "", it = 0, Rt = 0, _t = 0, ti = 2, kt = 1, ii = r.slice.call(arguments, 1), L = Object.create(this.lexer), $ = { yy: {} };
715
+ for (var ot in this.yy) Object.prototype.hasOwnProperty.call(this.yy, ot) && ($.yy[ot] = this.yy[ot]);
716
+ L.setInput(u, $.yy), $.yy.lexer = L, $.yy.parser = this, typeof L.yylloc > "u" && (L.yylloc = {});
717
+ var rt = L.yylloc;
718
+ r.push(rt);
719
+ var ei = L.options && L.options.ranges;
720
+ typeof $.yy.parseError == "function" ? this.parseError = $.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
721
+ function si(W) {
722
+ g.length = g.length - 2 * W, k.length = k.length - W, r.length = r.length - W;
723
+ }
724
+ a(si, "popStack");
725
+ function Tt() {
726
+ var W = x.pop() || L.lex() || kt;
727
+ return typeof W != "number" && (W instanceof Array && (x = W, W = x.pop()), W = A.symbols_[W] || W), W;
728
+ }
729
+ a(Tt, "lex");
730
+ for (var I, ht, q, O, lt, G = {}, et, N, Dt, st; ; ) {
731
+ if (q = g[g.length - 1], this.defaultActions[q] ? O = this.defaultActions[q] : ((I === null || typeof I > "u") && (I = Tt()), O = Q[q] && Q[q][I]), typeof O > "u" || !O.length || !O[0]) {
732
+ var ct = "";
733
+ st = [];
734
+ for (et in Q[q]) this.terminals_[et] && et > ti && st.push("'" + this.terminals_[et] + "'");
735
+ L.showPosition ? ct = "Parse error on line " + (it + 1) + `:
736
+ ` + L.showPosition() + `
737
+ Expecting ` + st.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : ct = "Parse error on line " + (it + 1) + ": Unexpected " + (I == kt ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(ct, {
738
+ text: L.match,
739
+ token: this.terminals_[I] || I,
740
+ line: L.yylineno,
741
+ loc: rt,
742
+ expected: st
743
+ });
744
+ }
745
+ if (O[0] instanceof Array && O.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + q + ", token: " + I);
746
+ switch (O[0]) {
747
+ case 1:
748
+ g.push(I), k.push(L.yytext), r.push(L.yylloc), g.push(O[1]), I = null, ht ? (I = ht, ht = null) : (Rt = L.yyleng, d = L.yytext, it = L.yylineno, rt = L.yylloc, _t > 0 && _t--);
749
+ break;
750
+ case 2:
751
+ if (N = this.productions_[O[1]][1], G.$ = k[k.length - N], G._$ = {
752
+ first_line: r[r.length - (N || 1)].first_line,
753
+ last_line: r[r.length - 1].last_line,
754
+ first_column: r[r.length - (N || 1)].first_column,
755
+ last_column: r[r.length - 1].last_column
756
+ }, ei && (G._$.range = [r[r.length - (N || 1)].range[0], r[r.length - 1].range[1]]), lt = this.performAction.apply(G, [
757
+ d,
758
+ Rt,
759
+ it,
760
+ $.yy,
761
+ O[1],
762
+ k,
763
+ r
764
+ ].concat(ii)), typeof lt < "u") return lt;
765
+ N && (g = g.slice(0, -1 * N * 2), k = k.slice(0, -1 * N), r = r.slice(0, -1 * N)), g.push(this.productions_[O[1]][0]), k.push(G.$), r.push(G._$), Dt = Q[g[g.length - 2]][g[g.length - 1]], g.push(Dt);
766
+ break;
767
+ case 3:
768
+ return !0;
769
+ }
770
+ }
771
+ return !0;
772
+ }, "parse")
773
+ };
774
+ R.lexer = /* @__PURE__ */ (function() {
775
+ return {
776
+ EOF: 1,
777
+ parseError: /* @__PURE__ */ a(function(u, A) {
778
+ if (this.yy.parser) this.yy.parser.parseError(u, A);
779
+ else throw new Error(u);
780
+ }, "parseError"),
781
+ setInput: /* @__PURE__ */ a(function(o, u) {
782
+ return this.yy = u || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
783
+ first_line: 1,
784
+ first_column: 0,
785
+ last_line: 1,
786
+ last_column: 0
787
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
788
+ }, "setInput"),
789
+ input: /* @__PURE__ */ a(function() {
790
+ var o = this._input[0];
791
+ return this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o, o.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
792
+ }, "input"),
793
+ unput: /* @__PURE__ */ a(function(o) {
794
+ var u = o.length, A = o.split(/(?:\r\n?|\n)/g);
795
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
796
+ var g = this.match.split(/(?:\r\n?|\n)/g);
797
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), A.length - 1 && (this.yylineno -= A.length - 1);
798
+ var x = this.yylloc.range;
799
+ return this.yylloc = {
800
+ first_line: this.yylloc.first_line,
801
+ last_line: this.yylineno + 1,
802
+ first_column: this.yylloc.first_column,
803
+ last_column: A ? (A.length === g.length ? this.yylloc.first_column : 0) + g[g.length - A.length].length - A[0].length : this.yylloc.first_column - u
804
+ }, this.options.ranges && (this.yylloc.range = [x[0], x[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
805
+ }, "unput"),
806
+ more: /* @__PURE__ */ a(function() {
807
+ return this._more = !0, this;
808
+ }, "more"),
809
+ reject: /* @__PURE__ */ a(function() {
810
+ if (this.options.backtrack_lexer) this._backtrack = !0;
811
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
812
+ ` + this.showPosition(), {
813
+ text: "",
814
+ token: null,
815
+ line: this.yylineno
816
+ });
817
+ return this;
818
+ }, "reject"),
819
+ less: /* @__PURE__ */ a(function(o) {
820
+ this.unput(this.match.slice(o));
821
+ }, "less"),
822
+ pastInput: /* @__PURE__ */ a(function() {
823
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
824
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
825
+ }, "pastInput"),
826
+ upcomingInput: /* @__PURE__ */ a(function() {
827
+ var o = this.match;
828
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
829
+ }, "upcomingInput"),
830
+ showPosition: /* @__PURE__ */ a(function() {
831
+ var o = this.pastInput(), u = new Array(o.length + 1).join("-");
832
+ return o + this.upcomingInput() + `
833
+ ` + u + "^";
834
+ }, "showPosition"),
835
+ test_match: /* @__PURE__ */ a(function(o, u) {
836
+ var A, g, x;
837
+ if (this.options.backtrack_lexer && (x = {
838
+ yylineno: this.yylineno,
839
+ yylloc: {
840
+ first_line: this.yylloc.first_line,
841
+ last_line: this.last_line,
842
+ first_column: this.yylloc.first_column,
843
+ last_column: this.yylloc.last_column
844
+ },
845
+ yytext: this.yytext,
846
+ match: this.match,
847
+ matches: this.matches,
848
+ matched: this.matched,
849
+ yyleng: this.yyleng,
850
+ offset: this.offset,
851
+ _more: this._more,
852
+ _input: this._input,
853
+ yy: this.yy,
854
+ conditionStack: this.conditionStack.slice(0),
855
+ done: this.done
856
+ }, this.options.ranges && (x.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
857
+ first_line: this.yylloc.last_line,
858
+ last_line: this.yylineno + 1,
859
+ first_column: this.yylloc.last_column,
860
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
861
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], A = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), A) return A;
862
+ if (this._backtrack) {
863
+ for (var k in x) this[k] = x[k];
864
+ return !1;
865
+ }
866
+ return !1;
867
+ }, "test_match"),
868
+ next: /* @__PURE__ */ a(function() {
869
+ if (this.done) return this.EOF;
870
+ this._input || (this.done = !0);
871
+ var o, u, A, g;
872
+ this._more || (this.yytext = "", this.match = "");
873
+ for (var x = this._currentRules(), k = 0; k < x.length; k++)
874
+ if (A = this._input.match(this.rules[x[k]]), A && (!u || A[0].length > u[0].length)) {
875
+ if (u = A, g = k, this.options.backtrack_lexer) {
876
+ if (o = this.test_match(A, x[k]), o !== !1) return o;
877
+ if (this._backtrack) {
878
+ u = !1;
879
+ continue;
880
+ } else return !1;
881
+ } else if (!this.options.flex) break;
882
+ }
883
+ return u ? (o = this.test_match(u, x[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
884
+ ` + this.showPosition(), {
885
+ text: "",
886
+ token: null,
887
+ line: this.yylineno
888
+ });
889
+ }, "next"),
890
+ lex: /* @__PURE__ */ a(function() {
891
+ var u = this.next();
892
+ return u || this.lex();
893
+ }, "lex"),
894
+ begin: /* @__PURE__ */ a(function(u) {
895
+ this.conditionStack.push(u);
896
+ }, "begin"),
897
+ popState: /* @__PURE__ */ a(function() {
898
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
899
+ }, "popState"),
900
+ _currentRules: /* @__PURE__ */ a(function() {
901
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
902
+ }, "_currentRules"),
903
+ topState: /* @__PURE__ */ a(function(u) {
904
+ return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
905
+ }, "topState"),
906
+ pushState: /* @__PURE__ */ a(function(u) {
907
+ this.begin(u);
908
+ }, "pushState"),
909
+ stateStackSize: /* @__PURE__ */ a(function() {
910
+ return this.conditionStack.length;
911
+ }, "stateStackSize"),
912
+ options: { "case-insensitive": !0 },
913
+ performAction: /* @__PURE__ */ a(function(u, A, g, x) {
914
+ switch (g) {
915
+ case 0:
916
+ break;
917
+ case 1:
918
+ break;
919
+ case 2:
920
+ return this.popState(), 36;
921
+ case 3:
922
+ return this.popState(), 36;
923
+ case 4:
924
+ return 36;
925
+ case 5:
926
+ break;
927
+ case 6:
928
+ return 10;
929
+ case 7:
930
+ return this.pushState("acc_title"), 19;
931
+ case 8:
932
+ return this.popState(), "acc_title_value";
933
+ case 9:
934
+ return this.pushState("acc_descr"), 21;
935
+ case 10:
936
+ return this.popState(), "acc_descr_value";
937
+ case 11:
938
+ this.pushState("acc_descr_multiline");
939
+ break;
940
+ case 12:
941
+ this.popState();
942
+ break;
943
+ case 13:
944
+ return "acc_descr_multiline_value";
945
+ case 14:
946
+ return 5;
947
+ case 15:
948
+ return 5;
949
+ case 16:
950
+ return 8;
951
+ case 17:
952
+ return this.pushState("axis_data"), "X_AXIS";
953
+ case 18:
954
+ return this.pushState("axis_data"), "Y_AXIS";
955
+ case 19:
956
+ return this.pushState("axis_band_data"), 24;
957
+ case 20:
958
+ return 33;
959
+ case 21:
960
+ return this.pushState("data"), 16;
961
+ case 22:
962
+ return this.pushState("data"), 18;
963
+ case 23:
964
+ return this.pushState("data_inner"), 24;
965
+ case 24:
966
+ return 29;
967
+ case 25:
968
+ return this.popState(), 26;
969
+ case 26:
970
+ this.popState();
971
+ break;
972
+ case 27:
973
+ this.pushState("string");
974
+ break;
975
+ case 28:
976
+ this.popState();
977
+ break;
978
+ case 29:
979
+ return "STR";
980
+ case 30:
981
+ return 24;
982
+ case 31:
983
+ return 26;
984
+ case 32:
985
+ return 44;
986
+ case 33:
987
+ return "COLON";
988
+ case 34:
989
+ return 45;
990
+ case 35:
991
+ return 28;
992
+ case 36:
993
+ return 46;
994
+ case 37:
995
+ return 47;
996
+ case 38:
997
+ return 49;
998
+ case 39:
999
+ return 51;
1000
+ case 40:
1001
+ return 48;
1002
+ case 41:
1003
+ return 42;
1004
+ case 42:
1005
+ return 50;
1006
+ case 43:
1007
+ return 43;
1008
+ case 44:
1009
+ break;
1010
+ case 45:
1011
+ return 37;
1012
+ case 46:
1013
+ return 38;
1014
+ }
1015
+ }, "anonymous"),
1016
+ rules: [
1017
+ /^(?:%%(?!\{)[^\n]*)/i,
1018
+ /^(?:[^\}]%%[^\n]*)/i,
1019
+ /^(?:(\r?\n))/i,
1020
+ /^(?:(\r?\n))/i,
1021
+ /^(?:[\n\r]+)/i,
1022
+ /^(?:%%[^\n]*)/i,
1023
+ /^(?:title\b)/i,
1024
+ /^(?:accTitle\s*:\s*)/i,
1025
+ /^(?:(?!\n||)*[^\n]*)/i,
1026
+ /^(?:accDescr\s*:\s*)/i,
1027
+ /^(?:(?!\n||)*[^\n]*)/i,
1028
+ /^(?:accDescr\s*\{\s*)/i,
1029
+ /^(?:\})/i,
1030
+ /^(?:[^\}]*)/i,
1031
+ /^(?:xychart-beta\b)/i,
1032
+ /^(?:xychart\b)/i,
1033
+ /^(?:(?:vertical|horizontal))/i,
1034
+ /^(?:x-axis\b)/i,
1035
+ /^(?:y-axis\b)/i,
1036
+ /^(?:\[)/i,
1037
+ /^(?:-->)/i,
1038
+ /^(?:line\b)/i,
1039
+ /^(?:bar\b)/i,
1040
+ /^(?:\[)/i,
1041
+ /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,
1042
+ /^(?:\])/i,
1043
+ /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,
1044
+ /^(?:["])/i,
1045
+ /^(?:["])/i,
1046
+ /^(?:[^"]*)/i,
1047
+ /^(?:\[)/i,
1048
+ /^(?:\])/i,
1049
+ /^(?:[A-Za-z]+)/i,
1050
+ /^(?::)/i,
1051
+ /^(?:\+)/i,
1052
+ /^(?:,)/i,
1053
+ /^(?:=)/i,
1054
+ /^(?:\*)/i,
1055
+ /^(?:#)/i,
1056
+ /^(?:[\_])/i,
1057
+ /^(?:\.)/i,
1058
+ /^(?:&)/i,
1059
+ /^(?:-)/i,
1060
+ /^(?:[0-9]+)/i,
1061
+ /^(?:\s+)/i,
1062
+ /^(?:;)/i,
1063
+ /^(?:$)/i
1064
+ ],
1065
+ conditions: {
1066
+ data_inner: {
1067
+ rules: [
1068
+ 0,
1069
+ 1,
1070
+ 4,
1071
+ 5,
1072
+ 6,
1073
+ 7,
1074
+ 9,
1075
+ 11,
1076
+ 14,
1077
+ 15,
1078
+ 16,
1079
+ 17,
1080
+ 18,
1081
+ 21,
1082
+ 22,
1083
+ 24,
1084
+ 25,
1085
+ 26,
1086
+ 27,
1087
+ 30,
1088
+ 31,
1089
+ 32,
1090
+ 33,
1091
+ 34,
1092
+ 35,
1093
+ 36,
1094
+ 37,
1095
+ 38,
1096
+ 39,
1097
+ 40,
1098
+ 41,
1099
+ 42,
1100
+ 43,
1101
+ 44,
1102
+ 45,
1103
+ 46
1104
+ ],
1105
+ inclusive: !0
1106
+ },
1107
+ data: {
1108
+ rules: [
1109
+ 0,
1110
+ 1,
1111
+ 3,
1112
+ 4,
1113
+ 5,
1114
+ 6,
1115
+ 7,
1116
+ 9,
1117
+ 11,
1118
+ 14,
1119
+ 15,
1120
+ 16,
1121
+ 17,
1122
+ 18,
1123
+ 21,
1124
+ 22,
1125
+ 23,
1126
+ 26,
1127
+ 27,
1128
+ 30,
1129
+ 31,
1130
+ 32,
1131
+ 33,
1132
+ 34,
1133
+ 35,
1134
+ 36,
1135
+ 37,
1136
+ 38,
1137
+ 39,
1138
+ 40,
1139
+ 41,
1140
+ 42,
1141
+ 43,
1142
+ 44,
1143
+ 45,
1144
+ 46
1145
+ ],
1146
+ inclusive: !0
1147
+ },
1148
+ axis_band_data: {
1149
+ rules: [
1150
+ 0,
1151
+ 1,
1152
+ 4,
1153
+ 5,
1154
+ 6,
1155
+ 7,
1156
+ 9,
1157
+ 11,
1158
+ 14,
1159
+ 15,
1160
+ 16,
1161
+ 17,
1162
+ 18,
1163
+ 21,
1164
+ 22,
1165
+ 25,
1166
+ 26,
1167
+ 27,
1168
+ 30,
1169
+ 31,
1170
+ 32,
1171
+ 33,
1172
+ 34,
1173
+ 35,
1174
+ 36,
1175
+ 37,
1176
+ 38,
1177
+ 39,
1178
+ 40,
1179
+ 41,
1180
+ 42,
1181
+ 43,
1182
+ 44,
1183
+ 45,
1184
+ 46
1185
+ ],
1186
+ inclusive: !0
1187
+ },
1188
+ axis_data: {
1189
+ rules: [
1190
+ 0,
1191
+ 1,
1192
+ 2,
1193
+ 4,
1194
+ 5,
1195
+ 6,
1196
+ 7,
1197
+ 9,
1198
+ 11,
1199
+ 14,
1200
+ 15,
1201
+ 16,
1202
+ 17,
1203
+ 18,
1204
+ 19,
1205
+ 20,
1206
+ 21,
1207
+ 22,
1208
+ 24,
1209
+ 26,
1210
+ 27,
1211
+ 30,
1212
+ 31,
1213
+ 32,
1214
+ 33,
1215
+ 34,
1216
+ 35,
1217
+ 36,
1218
+ 37,
1219
+ 38,
1220
+ 39,
1221
+ 40,
1222
+ 41,
1223
+ 42,
1224
+ 43,
1225
+ 44,
1226
+ 45,
1227
+ 46
1228
+ ],
1229
+ inclusive: !0
1230
+ },
1231
+ acc_descr_multiline: {
1232
+ rules: [12, 13],
1233
+ inclusive: !1
1234
+ },
1235
+ acc_descr: {
1236
+ rules: [10],
1237
+ inclusive: !1
1238
+ },
1239
+ acc_title: {
1240
+ rules: [8],
1241
+ inclusive: !1
1242
+ },
1243
+ title: {
1244
+ rules: [],
1245
+ inclusive: !1
1246
+ },
1247
+ md_string: {
1248
+ rules: [],
1249
+ inclusive: !1
1250
+ },
1251
+ string: {
1252
+ rules: [28, 29],
1253
+ inclusive: !1
1254
+ },
1255
+ INITIAL: {
1256
+ rules: [
1257
+ 0,
1258
+ 1,
1259
+ 4,
1260
+ 5,
1261
+ 6,
1262
+ 7,
1263
+ 9,
1264
+ 11,
1265
+ 14,
1266
+ 15,
1267
+ 16,
1268
+ 17,
1269
+ 18,
1270
+ 21,
1271
+ 22,
1272
+ 26,
1273
+ 27,
1274
+ 30,
1275
+ 31,
1276
+ 32,
1277
+ 33,
1278
+ 34,
1279
+ 35,
1280
+ 36,
1281
+ 37,
1282
+ 38,
1283
+ 39,
1284
+ 40,
1285
+ 41,
1286
+ 42,
1287
+ 43,
1288
+ 44,
1289
+ 45,
1290
+ 46
1291
+ ],
1292
+ inclusive: !0
1293
+ }
1294
+ }
1295
+ };
1296
+ })();
1297
+ function H() {
1298
+ this.yy = {};
1299
+ }
1300
+ return a(H, "Parser"), H.prototype = R, R.Parser = H, new H();
1301
+ })();
1302
+ gt.parser = gt;
1303
+ var bi = gt;
1304
+ function xt(t) {
1305
+ return t.type === "bar";
1306
+ }
1307
+ a(xt, "isBarPlot");
1308
+ function at(t) {
1309
+ return t.type === "band";
1310
+ }
1311
+ a(at, "isBandAxisData");
1312
+ function j(t) {
1313
+ return t.type === "linear";
1314
+ }
1315
+ a(j, "isLinearAxisData");
1316
+ var Vt = class {
1317
+ constructor(t) {
1318
+ this.parentGroup = t;
1319
+ }
1320
+ static {
1321
+ a(this, "TextDimensionCalculatorWithFont");
1322
+ }
1323
+ getMaxDimension(t, i) {
1324
+ if (!this.parentGroup) return {
1325
+ width: t.reduce((n, c) => Math.max(c.length, n), 0) * i,
1326
+ height: i
1327
+ };
1328
+ const s = {
1329
+ width: 0,
1330
+ height: 0
1331
+ }, e = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
1332
+ for (const n of t) {
1333
+ const c = mi(e, 1, n), l = c ? c.width : n.length * i, f = c ? c.height : i;
1334
+ s.width = Math.max(s.width, l), s.height = Math.max(s.height, f);
1335
+ }
1336
+ return e.remove(), s;
1337
+ }
1338
+ }, Pt = 0.7, Et = 0.2, Bt = class {
1339
+ constructor(t, i, s, e) {
1340
+ this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = e, this.boundingRect = {
1341
+ x: 0,
1342
+ y: 0,
1343
+ width: 0,
1344
+ height: 0
1345
+ }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.normalizedLabelRotationInRad = 0, this.range = [0, 10], this.boundingRect = {
1346
+ x: 0,
1347
+ y: 0,
1348
+ width: 0,
1349
+ height: 0
1350
+ }, this.axisPosition = "left", this.normalizedLabelRotationInRad = this.axisConfig.labelRotation >= -90 && this.axisConfig.labelRotation <= 90 ? this.axisConfig.labelRotation * Math.PI / 180 : 0;
1351
+ }
1352
+ static {
1353
+ a(this, "BaseAxis");
1354
+ }
1355
+ setRange(t) {
1356
+ this.range = t, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = t[1] - t[0] : this.boundingRect.width = t[1] - t[0], this.recalculateScale();
1357
+ }
1358
+ getRange() {
1359
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
1360
+ }
1361
+ setAxisPosition(t) {
1362
+ this.axisPosition = t, this.setRange(this.range);
1363
+ }
1364
+ getTickDistance() {
1365
+ const t = this.getRange();
1366
+ return Math.abs(t[0] - t[1]) / this.getTickValues().length;
1367
+ }
1368
+ getAxisOuterPadding() {
1369
+ return this.outerPadding;
1370
+ }
1371
+ getLabelDimension() {
1372
+ return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t) => t.toString()), this.axisConfig.labelFontSize);
1373
+ }
1374
+ recalculateOuterPaddingToDrawBar() {
1375
+ Pt * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Pt * this.getTickDistance() / 2)), this.recalculateScale();
1376
+ }
1377
+ calculateSpaceIfDrawnHorizontally(t) {
1378
+ let i = t.height;
1379
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1380
+ const s = this.getLabelDimension(), e = Et * t.width;
1381
+ this.outerPadding = Math.min(s.width / 2, e);
1382
+ let n = s.height;
1383
+ this.axisPosition === "bottom" && this.normalizedLabelRotationInRad !== 0 && (n = Math.max(n, Math.abs(Math.sin(this.normalizedLabelRotationInRad) * s.width) + Math.abs(Math.cos(this.normalizedLabelRotationInRad) * s.height))), n += this.axisConfig.labelPadding * 2, this.labelTextHeight = s.height, n <= i && (i -= n, this.showLabel = !0);
1384
+ }
1385
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1386
+ const s = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), e = s.height + this.axisConfig.titlePadding * 2;
1387
+ this.titleTextHeight = s.height, e <= i && (i -= e, this.showTitle = !0);
1388
+ }
1389
+ this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
1390
+ }
1391
+ calculateSpaceIfDrawnVertical(t) {
1392
+ let i = t.width;
1393
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1394
+ const s = this.getLabelDimension(), e = Et * t.height;
1395
+ this.outerPadding = Math.min(s.height / 2, e);
1396
+ const n = s.width + this.axisConfig.labelPadding * 2;
1397
+ n <= i && (i -= n, this.showLabel = !0);
1398
+ }
1399
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1400
+ const s = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), e = s.height + this.axisConfig.titlePadding * 2;
1401
+ this.titleTextHeight = s.height, e <= i && (i -= e, this.showTitle = !0);
1402
+ }
1403
+ this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
1404
+ }
1405
+ calculateSpace(t) {
1406
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
1407
+ width: this.boundingRect.width,
1408
+ height: this.boundingRect.height
1409
+ };
1410
+ }
1411
+ setBoundingBoxXY(t) {
1412
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
1413
+ }
1414
+ calculateOffsetByRotation(t) {
1415
+ const i = this.normalizedLabelRotationInRad;
1416
+ return i === 0 ? 0 : Math.sin(i) * this.getLabelDimension()[t] / 2;
1417
+ }
1418
+ getDrawableElementsForLeftAxis() {
1419
+ const t = [];
1420
+ if (this.showAxisLine) {
1421
+ const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
1422
+ t.push({
1423
+ type: "path",
1424
+ groupTexts: ["left-axis", "axisl-line"],
1425
+ data: [{
1426
+ path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
1427
+ strokeFill: this.axisThemeConfig.axisLineColor,
1428
+ strokeWidth: this.axisConfig.axisLineWidth
1429
+ }]
1430
+ });
1431
+ }
1432
+ if (this.showLabel && t.push({
1433
+ type: "text",
1434
+ groupTexts: ["left-axis", "label"],
1435
+ data: this.getTickValues().map((i) => ({
1436
+ text: i.toString(),
1437
+ x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
1438
+ y: this.getScaleValue(i),
1439
+ fill: this.axisThemeConfig.labelColor,
1440
+ fontSize: this.axisConfig.labelFontSize,
1441
+ rotation: 0,
1442
+ verticalPos: "middle",
1443
+ horizontalPos: "right"
1444
+ }))
1445
+ }), this.showTick) {
1446
+ const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1447
+ t.push({
1448
+ type: "path",
1449
+ groupTexts: ["left-axis", "ticks"],
1450
+ data: this.getTickValues().map((s) => ({
1451
+ path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
1452
+ strokeFill: this.axisThemeConfig.tickColor,
1453
+ strokeWidth: this.axisConfig.tickWidth
1454
+ }))
1455
+ });
1456
+ }
1457
+ return this.showTitle && t.push({
1458
+ type: "text",
1459
+ groupTexts: ["left-axis", "title"],
1460
+ data: [{
1461
+ text: this.title,
1462
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
1463
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1464
+ fill: this.axisThemeConfig.titleColor,
1465
+ fontSize: this.axisConfig.titleFontSize,
1466
+ rotation: 270,
1467
+ verticalPos: "top",
1468
+ horizontalPos: "center"
1469
+ }]
1470
+ }), t;
1471
+ }
1472
+ getDrawableElementsForBottomAxis() {
1473
+ const t = [];
1474
+ if (this.showAxisLine) {
1475
+ const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
1476
+ t.push({
1477
+ type: "path",
1478
+ groupTexts: ["bottom-axis", "axis-line"],
1479
+ data: [{
1480
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
1481
+ strokeFill: this.axisThemeConfig.axisLineColor,
1482
+ strokeWidth: this.axisConfig.axisLineWidth
1483
+ }]
1484
+ });
1485
+ }
1486
+ if (this.showLabel && t.push({
1487
+ type: "text",
1488
+ groupTexts: ["bottom-axis", "label"],
1489
+ data: this.getTickValues().map((i) => ({
1490
+ text: i.toString(),
1491
+ x: this.getScaleValue(i) + this.calculateOffsetByRotation("height"),
1492
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0) + Math.abs(this.calculateOffsetByRotation("width")),
1493
+ fill: this.axisThemeConfig.labelColor,
1494
+ fontSize: this.axisConfig.labelFontSize,
1495
+ rotation: this.normalizedLabelRotationInRad * 180 / Math.PI,
1496
+ verticalPos: "top",
1497
+ horizontalPos: "center"
1498
+ }))
1499
+ }), this.showTick) {
1500
+ const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1501
+ t.push({
1502
+ type: "path",
1503
+ groupTexts: ["bottom-axis", "ticks"],
1504
+ data: this.getTickValues().map((s) => ({
1505
+ path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
1506
+ strokeFill: this.axisThemeConfig.tickColor,
1507
+ strokeWidth: this.axisConfig.tickWidth
1508
+ }))
1509
+ });
1510
+ }
1511
+ return this.showTitle && t.push({
1512
+ type: "text",
1513
+ groupTexts: ["bottom-axis", "title"],
1514
+ data: [{
1515
+ text: this.title,
1516
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1517
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1518
+ fill: this.axisThemeConfig.titleColor,
1519
+ fontSize: this.axisConfig.titleFontSize,
1520
+ rotation: 0,
1521
+ verticalPos: "top",
1522
+ horizontalPos: "center"
1523
+ }]
1524
+ }), t;
1525
+ }
1526
+ getDrawableElementsForTopAxis() {
1527
+ const t = [];
1528
+ if (this.showAxisLine) {
1529
+ const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1530
+ t.push({
1531
+ type: "path",
1532
+ groupTexts: ["top-axis", "axis-line"],
1533
+ data: [{
1534
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
1535
+ strokeFill: this.axisThemeConfig.axisLineColor,
1536
+ strokeWidth: this.axisConfig.axisLineWidth
1537
+ }]
1538
+ });
1539
+ }
1540
+ if (this.showLabel && t.push({
1541
+ type: "text",
1542
+ groupTexts: ["top-axis", "label"],
1543
+ data: this.getTickValues().map((i) => ({
1544
+ text: i.toString(),
1545
+ x: this.getScaleValue(i),
1546
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1547
+ fill: this.axisThemeConfig.labelColor,
1548
+ fontSize: this.axisConfig.labelFontSize,
1549
+ rotation: 0,
1550
+ verticalPos: "top",
1551
+ horizontalPos: "center"
1552
+ }))
1553
+ }), this.showTick) {
1554
+ const i = this.boundingRect.y;
1555
+ t.push({
1556
+ type: "path",
1557
+ groupTexts: ["top-axis", "ticks"],
1558
+ data: this.getTickValues().map((s) => ({
1559
+ path: `M ${this.getScaleValue(s)},${i + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(s)},${i + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
1560
+ strokeFill: this.axisThemeConfig.tickColor,
1561
+ strokeWidth: this.axisConfig.tickWidth
1562
+ }))
1563
+ });
1564
+ }
1565
+ return this.showTitle && t.push({
1566
+ type: "text",
1567
+ groupTexts: ["top-axis", "title"],
1568
+ data: [{
1569
+ text: this.title,
1570
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1571
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
1572
+ fill: this.axisThemeConfig.titleColor,
1573
+ fontSize: this.axisConfig.titleFontSize,
1574
+ rotation: 0,
1575
+ verticalPos: "top",
1576
+ horizontalPos: "center"
1577
+ }]
1578
+ }), t;
1579
+ }
1580
+ getDrawableElements() {
1581
+ if (this.axisPosition === "left") return this.getDrawableElementsForLeftAxis();
1582
+ if (this.axisPosition === "right") throw Error("Drawing of right axis is not implemented");
1583
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
1584
+ }
1585
+ }, Ai = class extends Bt {
1586
+ static {
1587
+ a(this, "BandAxis");
1588
+ }
1589
+ constructor(t, i, s, e, n) {
1590
+ super(t, e, n, i), this.categories = s, this.scale = ut().domain(this.categories).range(this.getRange());
1591
+ }
1592
+ setRange(t) {
1593
+ super.setRange(t);
1594
+ }
1595
+ recalculateScale() {
1596
+ this.scale = ut().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), It.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1597
+ }
1598
+ getTickValues() {
1599
+ return this.categories;
1600
+ }
1601
+ getScaleValue(t) {
1602
+ return this.scale(t) ?? this.getRange()[0];
1603
+ }
1604
+ }, wi = class extends Bt {
1605
+ static {
1606
+ a(this, "LinearAxis");
1607
+ }
1608
+ constructor(t, i, s, e, n) {
1609
+ super(t, e, n, i), this.domain = s, this.scale = Lt().domain(this.domain).range(this.getRange());
1610
+ }
1611
+ getTickValues() {
1612
+ return this.scale.ticks();
1613
+ }
1614
+ recalculateScale() {
1615
+ const t = [...this.domain];
1616
+ this.axisPosition === "left" && t.reverse(), this.scale = Lt().domain(t).range(this.getRange());
1617
+ }
1618
+ getScaleValue(t) {
1619
+ return this.scale(t);
1620
+ }
1621
+ };
1622
+ function dt(t, i, s, e) {
1623
+ const n = new Vt(e);
1624
+ return at(t) ? new Ai(i, s, t.categories, t.title, n) : new wi(i, s, [t.min, t.max], t.title, n);
1625
+ }
1626
+ a(dt, "getAxis");
1627
+ var Ci = class {
1628
+ constructor(t, i, s, e) {
1629
+ this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = e, this.boundingRect = {
1630
+ x: 0,
1631
+ y: 0,
1632
+ width: 0,
1633
+ height: 0
1634
+ }, this.showChartTitle = !1;
1635
+ }
1636
+ static {
1637
+ a(this, "ChartTitle");
1638
+ }
1639
+ setBoundingBoxXY(t) {
1640
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
1641
+ }
1642
+ calculateSpace(t) {
1643
+ const i = this.textDimensionCalculator.getMaxDimension([this.chartData.title], this.chartConfig.titleFontSize), s = Math.max(i.width, t.width), e = i.height + 2 * this.chartConfig.titlePadding;
1644
+ return i.width <= s && i.height <= e && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = e, this.showChartTitle = !0), {
1645
+ width: this.boundingRect.width,
1646
+ height: this.boundingRect.height
1647
+ };
1648
+ }
1649
+ getDrawableElements() {
1650
+ const t = [];
1651
+ return this.showChartTitle && t.push({
1652
+ groupTexts: ["chart-title"],
1653
+ type: "text",
1654
+ data: [{
1655
+ fontSize: this.chartConfig.titleFontSize,
1656
+ text: this.chartData.title,
1657
+ verticalPos: "middle",
1658
+ horizontalPos: "center",
1659
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1660
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1661
+ fill: this.chartThemeConfig.titleColor,
1662
+ rotation: 0
1663
+ }]
1664
+ }), t;
1665
+ }
1666
+ };
1667
+ function Ot(t, i, s, e) {
1668
+ return new Ci(new Vt(e), t, i, s);
1669
+ }
1670
+ a(Ot, "getChartTitleComponent");
1671
+ var Si = class {
1672
+ constructor(t, i, s, e, n) {
1673
+ this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = e, this.plotIndex = n;
1674
+ }
1675
+ static {
1676
+ a(this, "LinePlot");
1677
+ }
1678
+ getDrawableElement() {
1679
+ const t = this.plotData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]);
1680
+ let i;
1681
+ if (this.orientation === "horizontal" ? i = vt().y((e) => e[0]).x((e) => e[1])(t) : i = vt().x((e) => e[0]).y((e) => e[1])(t), !i) return [];
1682
+ const s = [{
1683
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1684
+ type: "path",
1685
+ data: [{
1686
+ path: i,
1687
+ strokeFill: this.plotData.strokeFill,
1688
+ strokeWidth: this.plotData.strokeWidth
1689
+ }]
1690
+ }];
1691
+ if (this.plotData.pointLabels && this.plotData.pointLabels.length > 0) {
1692
+ const c = [];
1693
+ for (const [l, [f, S]] of t.entries()) {
1694
+ const T = this.plotData.pointLabels[l];
1695
+ T && (this.orientation === "horizontal" ? c.push({
1696
+ x: S + 10,
1697
+ y: f,
1698
+ text: T,
1699
+ fill: this.plotData.strokeFill,
1700
+ verticalPos: "middle",
1701
+ horizontalPos: "left",
1702
+ fontSize: 12,
1703
+ rotation: 0
1704
+ }) : c.push({
1705
+ x: f,
1706
+ y: S - 10,
1707
+ text: T,
1708
+ fill: this.plotData.strokeFill,
1709
+ verticalPos: "middle",
1710
+ horizontalPos: "center",
1711
+ fontSize: 12,
1712
+ rotation: 0
1713
+ }));
1714
+ }
1715
+ c.length > 0 && s.push({
1716
+ groupTexts: [
1717
+ "plot",
1718
+ `line-plot-${this.plotIndex}`,
1719
+ "labels"
1720
+ ],
1721
+ type: "text",
1722
+ data: c
1723
+ });
1724
+ }
1725
+ return s;
1726
+ }
1727
+ }, Ri = class {
1728
+ constructor(t, i, s, e, n, c) {
1729
+ this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = e, this.orientation = n, this.plotIndex = c;
1730
+ }
1731
+ static {
1732
+ a(this, "BarPlot");
1733
+ }
1734
+ getDrawableElement() {
1735
+ const t = this.barData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), i = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * 0.95, s = i / 2;
1736
+ return this.orientation === "horizontal" ? [{
1737
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1738
+ type: "rect",
1739
+ data: t.map((e) => ({
1740
+ x: this.boundingRect.x,
1741
+ y: e[0] - s,
1742
+ height: i,
1743
+ width: e[1] - this.boundingRect.x,
1744
+ fill: this.barData.fill,
1745
+ strokeWidth: 0,
1746
+ strokeFill: this.barData.fill
1747
+ }))
1748
+ }] : [{
1749
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1750
+ type: "rect",
1751
+ data: t.map((e) => ({
1752
+ x: e[0] - s,
1753
+ y: e[1],
1754
+ width: i,
1755
+ height: this.boundingRect.y + this.boundingRect.height - e[1],
1756
+ fill: this.barData.fill,
1757
+ strokeWidth: 0,
1758
+ strokeFill: this.barData.fill
1759
+ }))
1760
+ }];
1761
+ }
1762
+ }, _i = class {
1763
+ constructor(t, i, s) {
1764
+ this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
1765
+ x: 0,
1766
+ y: 0,
1767
+ width: 0,
1768
+ height: 0
1769
+ };
1770
+ }
1771
+ static {
1772
+ a(this, "BasePlot");
1773
+ }
1774
+ setAxes(t, i) {
1775
+ this.xAxis = t, this.yAxis = i;
1776
+ }
1777
+ setBoundingBoxXY(t) {
1778
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
1779
+ }
1780
+ calculateSpace(t) {
1781
+ return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
1782
+ width: this.boundingRect.width,
1783
+ height: this.boundingRect.height
1784
+ };
1785
+ }
1786
+ getDrawableElements() {
1787
+ if (!(this.xAxis && this.yAxis)) throw Error("Axes must be passed to render Plots");
1788
+ const t = [];
1789
+ for (const [i, s] of this.chartData.plots.entries()) switch (s.type) {
1790
+ case "line":
1791
+ {
1792
+ const e = new Si(s, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, i);
1793
+ t.push(...e.getDrawableElement());
1794
+ }
1795
+ break;
1796
+ case "bar":
1797
+ {
1798
+ const e = new Ri(s, this.boundingRect, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, i);
1799
+ t.push(...e.getDrawableElement());
1800
+ }
1801
+ break;
1802
+ }
1803
+ return t;
1804
+ }
1805
+ };
1806
+ function Wt(t, i, s) {
1807
+ return new _i(t, i, s);
1808
+ }
1809
+ a(Wt, "getPlotComponent");
1810
+ var ki = class {
1811
+ constructor(t, i, s, e) {
1812
+ this.chartConfig = t, this.chartData = i, this.componentStore = {
1813
+ title: Ot(t, i, s, e),
1814
+ plot: Wt(t, i, s),
1815
+ xAxis: dt(i.xAxis, t.xAxis, {
1816
+ titleColor: s.xAxisTitleColor,
1817
+ labelColor: s.xAxisLabelColor,
1818
+ tickColor: s.xAxisTickColor,
1819
+ axisLineColor: s.xAxisLineColor
1820
+ }, e),
1821
+ yAxis: dt(i.yAxis, t.yAxis, {
1822
+ titleColor: s.yAxisTitleColor,
1823
+ labelColor: s.yAxisLabelColor,
1824
+ tickColor: s.yAxisTickColor,
1825
+ axisLineColor: s.yAxisLineColor
1826
+ }, e)
1827
+ };
1828
+ }
1829
+ static {
1830
+ a(this, "Orchestrator");
1831
+ }
1832
+ calculateVerticalSpace() {
1833
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, e = 0, n = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), c = Math.floor(i * this.chartConfig.plotReservedSpacePercent / 100), l = this.componentStore.plot.calculateSpace({
1834
+ width: n,
1835
+ height: c
1836
+ });
1837
+ t -= l.width, i -= l.height, l = this.componentStore.title.calculateSpace({
1838
+ width: this.chartConfig.width,
1839
+ height: i
1840
+ }), e = l.height, i -= l.height, this.componentStore.xAxis.setAxisPosition("bottom"), l = this.componentStore.xAxis.calculateSpace({
1841
+ width: t,
1842
+ height: i
1843
+ }), i -= l.height, this.componentStore.yAxis.setAxisPosition("left"), l = this.componentStore.yAxis.calculateSpace({
1844
+ width: t,
1845
+ height: i
1846
+ }), s = l.width, t -= l.width, t > 0 && (n += t, t = 0), i > 0 && (c += i, i = 0), this.componentStore.plot.calculateSpace({
1847
+ width: n,
1848
+ height: c
1849
+ }), this.componentStore.plot.setBoundingBoxXY({
1850
+ x: s,
1851
+ y: e
1852
+ }), this.componentStore.xAxis.setRange([s, s + n]), this.componentStore.xAxis.setBoundingBoxXY({
1853
+ x: s,
1854
+ y: e + c
1855
+ }), this.componentStore.yAxis.setRange([e, e + c]), this.componentStore.yAxis.setBoundingBoxXY({
1856
+ x: 0,
1857
+ y: e
1858
+ }), this.chartData.plots.some((f) => xt(f)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1859
+ }
1860
+ calculateHorizontalSpace() {
1861
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, e = 0, n = 0, c = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), l = Math.floor(i * this.chartConfig.plotReservedSpacePercent / 100), f = this.componentStore.plot.calculateSpace({
1862
+ width: c,
1863
+ height: l
1864
+ });
1865
+ t -= f.width, i -= f.height, f = this.componentStore.title.calculateSpace({
1866
+ width: this.chartConfig.width,
1867
+ height: i
1868
+ }), s = f.height, i -= f.height, this.componentStore.xAxis.setAxisPosition("left"), f = this.componentStore.xAxis.calculateSpace({
1869
+ width: t,
1870
+ height: i
1871
+ }), t -= f.width, e = f.width, this.componentStore.yAxis.setAxisPosition("top"), f = this.componentStore.yAxis.calculateSpace({
1872
+ width: t,
1873
+ height: i
1874
+ }), i -= f.height, n = s + f.height, t > 0 && (c += t, t = 0), i > 0 && (l += i, i = 0), this.componentStore.plot.calculateSpace({
1875
+ width: c,
1876
+ height: l
1877
+ }), this.componentStore.plot.setBoundingBoxXY({
1878
+ x: e,
1879
+ y: n
1880
+ }), this.componentStore.yAxis.setRange([e, e + c]), this.componentStore.yAxis.setBoundingBoxXY({
1881
+ x: e,
1882
+ y: s
1883
+ }), this.componentStore.xAxis.setRange([n, n + l]), this.componentStore.xAxis.setBoundingBoxXY({
1884
+ x: 0,
1885
+ y: n
1886
+ }), this.chartData.plots.some((S) => xt(S)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1887
+ }
1888
+ calculateSpace() {
1889
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1890
+ }
1891
+ getDrawableElement() {
1892
+ this.calculateSpace();
1893
+ const t = [];
1894
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1895
+ for (const i of Object.values(this.componentStore)) t.push(...i.getDrawableElements());
1896
+ return t;
1897
+ }
1898
+ }, Ti = class {
1899
+ static {
1900
+ a(this, "XYChartBuilder");
1901
+ }
1902
+ static build(t, i, s, e) {
1903
+ return new ki(t, i, s, e).getDrawableElement();
1904
+ }
1905
+ }, K = 0, Ft, Z = bt(), J = yt(), m = At(), ft = J.plotColorPalette.split(",").map((t) => t.trim()), nt = !1, mt = !1;
1906
+ function yt() {
1907
+ const t = ai(), i = pt();
1908
+ return zt(t.xyChart, i.themeVariables.xyChart);
1909
+ }
1910
+ a(yt, "getChartDefaultThemeConfig");
1911
+ function bt() {
1912
+ const t = pt();
1913
+ return zt(ci.xyChart, t.xyChart);
1914
+ }
1915
+ a(bt, "getChartDefaultConfig");
1916
+ function At() {
1917
+ return {
1918
+ yAxis: {
1919
+ type: "linear",
1920
+ title: "",
1921
+ min: 1 / 0,
1922
+ max: -1 / 0
1923
+ },
1924
+ xAxis: {
1925
+ type: "band",
1926
+ title: "",
1927
+ categories: []
1928
+ },
1929
+ title: "",
1930
+ plots: []
1931
+ };
1932
+ }
1933
+ a(At, "getChartDefaultData");
1934
+ function tt(t) {
1935
+ const i = pt();
1936
+ return xi(t.trim(), i);
1937
+ }
1938
+ a(tt, "textSanitizer");
1939
+ function Xt(t) {
1940
+ Ft = t;
1941
+ }
1942
+ a(Xt, "setTmpSVGG");
1943
+ function Yt(t) {
1944
+ t === "horizontal" ? Z.chartOrientation = "horizontal" : Z.chartOrientation = "vertical";
1945
+ }
1946
+ a(Yt, "setOrientation");
1947
+ function Nt(t) {
1948
+ m.xAxis.title = tt(t.text);
1949
+ }
1950
+ a(Nt, "setXAxisTitle");
1951
+ function wt(t, i) {
1952
+ m.xAxis = {
1953
+ type: "linear",
1954
+ title: m.xAxis.title,
1955
+ min: t,
1956
+ max: i
1957
+ }, nt = !0;
1958
+ }
1959
+ a(wt, "setXAxisRangeData");
1960
+ function Ht(t) {
1961
+ m.xAxis = {
1962
+ type: "band",
1963
+ title: m.xAxis.title,
1964
+ categories: t.map((i) => tt(i.text))
1965
+ }, nt = !0;
1966
+ }
1967
+ a(Ht, "setXAxisBand");
1968
+ function Ut(t) {
1969
+ m.yAxis.title = tt(t.text);
1970
+ }
1971
+ a(Ut, "setYAxisTitle");
1972
+ function $t(t, i) {
1973
+ m.yAxis = {
1974
+ type: "linear",
1975
+ title: m.yAxis.title,
1976
+ min: t,
1977
+ max: i
1978
+ }, mt = !0;
1979
+ }
1980
+ a($t, "setYAxisRangeData");
1981
+ function qt(t) {
1982
+ const i = Math.min(...t), s = Math.max(...t), e = j(m.yAxis) ? m.yAxis.min : 1 / 0, n = j(m.yAxis) ? m.yAxis.max : -1 / 0;
1983
+ m.yAxis = {
1984
+ type: "linear",
1985
+ title: m.yAxis.title,
1986
+ min: Math.min(e, i),
1987
+ max: Math.max(n, s)
1988
+ };
1989
+ }
1990
+ a(qt, "setYAxisRangeFromPlotData");
1991
+ function Ct(t) {
1992
+ let i = [];
1993
+ if (t.length === 0) return i;
1994
+ if (!nt) {
1995
+ const s = j(m.xAxis) ? m.xAxis.min : 1 / 0, e = j(m.xAxis) ? m.xAxis.max : -1 / 0;
1996
+ wt(Math.min(s, 1), Math.max(e, t.length));
1997
+ }
1998
+ if (at(m.xAxis) && t.length > m.xAxis.categories.length && (t = t.slice(0, m.xAxis.categories.length)), mt || qt(t), at(m.xAxis) && (i = m.xAxis.categories.map((s, e) => [s, t[e]])), j(m.xAxis)) {
1999
+ const s = m.xAxis.min, e = m.xAxis.max, n = (e - s) / (t.length - 1), c = [];
2000
+ for (let l = s; l <= e; l += n) c.push(`${l}`);
2001
+ i = c.map((l, f) => [l, t[f]]);
2002
+ }
2003
+ return i;
2004
+ }
2005
+ a(Ct, "transformDataWithoutCategory");
2006
+ function St(t) {
2007
+ return ft[t === 0 ? 0 : t % ft.length];
2008
+ }
2009
+ a(St, "getPlotColorFromPalette");
2010
+ function Gt(t, i) {
2011
+ const s = i.map((l) => l.value), e = i.map((l) => l.label ? tt(l.label) : ""), n = Ct(s), c = e.some((l) => l !== "");
2012
+ m.plots.push({
2013
+ type: "line",
2014
+ strokeFill: St(K),
2015
+ strokeWidth: 2,
2016
+ data: n,
2017
+ ...c ? { pointLabels: e } : {}
2018
+ }), K++;
2019
+ }
2020
+ a(Gt, "setLineData");
2021
+ function jt(t, i) {
2022
+ const s = Ct(i.map((e) => e.value));
2023
+ m.plots.push({
2024
+ type: "bar",
2025
+ fill: St(K),
2026
+ data: s
2027
+ }), K++;
2028
+ }
2029
+ a(jt, "setBarData");
2030
+ function Qt() {
2031
+ if (m.plots.length === 0) throw Error("No Plot to render, please provide a plot with some data");
2032
+ return m.title = Mt(), Ti.build(Z, m, J, Ft);
2033
+ }
2034
+ a(Qt, "getDrawableElem");
2035
+ function Kt() {
2036
+ return J;
2037
+ }
2038
+ a(Kt, "getChartThemeConfig");
2039
+ function Zt() {
2040
+ return Z;
2041
+ }
2042
+ a(Zt, "getChartConfig");
2043
+ function Jt() {
2044
+ return m;
2045
+ }
2046
+ a(Jt, "getXYChartData");
2047
+ var Wi = {
2048
+ parser: bi,
2049
+ db: {
2050
+ getDrawableElem: Qt,
2051
+ clear: /* @__PURE__ */ a(function() {
2052
+ hi(), K = 0, Z = bt(), m = At(), J = yt(), ft = J.plotColorPalette.split(",").map((t) => t.trim()), nt = !1, mt = !1;
2053
+ }, "clear"),
2054
+ setAccTitle: ri,
2055
+ getAccTitle: gi,
2056
+ setDiagramTitle: oi,
2057
+ getDiagramTitle: Mt,
2058
+ getAccDescription: ui,
2059
+ setAccDescription: ni,
2060
+ setOrientation: Yt,
2061
+ setXAxisTitle: Nt,
2062
+ setXAxisRangeData: wt,
2063
+ setXAxisBand: Ht,
2064
+ setYAxisTitle: Ut,
2065
+ setYAxisRangeData: $t,
2066
+ setLineData: Gt,
2067
+ setBarData: jt,
2068
+ setTmpSVGG: Xt,
2069
+ getChartThemeConfig: Kt,
2070
+ getChartConfig: Zt,
2071
+ getXYChartData: Jt
2072
+ },
2073
+ renderer: { draw: /* @__PURE__ */ a((t, i, s, e) => {
2074
+ const n = e.db, c = n.getChartThemeConfig(), l = n.getChartConfig(), f = n.getXYChartData().plots[0].data.map((p) => p[1]);
2075
+ function S(p) {
2076
+ return p === "top" ? "text-before-edge" : "middle";
2077
+ }
2078
+ a(S, "getDominantBaseLine");
2079
+ function T(p) {
2080
+ return p === "left" ? "start" : p === "right" ? "end" : "middle";
2081
+ }
2082
+ a(T, "getTextAnchor");
2083
+ function P(p) {
2084
+ return `translate(${p.x}, ${p.y}) rotate(${p.rotation || 0})`;
2085
+ }
2086
+ a(P, "getTextTransformation"), It.debug(`Rendering xychart chart
2087
+ ` + t);
2088
+ const _ = pi(i), y = _.append("g").attr("class", "main"), M = y.append("rect").attr("width", l.width).attr("height", l.height).attr("class", "background");
2089
+ li(_, l.height, l.width, !0), _.attr("viewBox", `0 0 ${l.width} ${l.height}`), M.attr("fill", c.backgroundColor), n.setTmpSVGG(_.append("g").attr("class", "mermaid-tmp-group"));
2090
+ const v = n.getDrawableElem(), E = {};
2091
+ function z(p) {
2092
+ let D = y, h = "";
2093
+ for (const [V] of p.entries()) {
2094
+ let F = y;
2095
+ V > 0 && E[h] && (F = E[h]), h += p[V], D = E[h], D || (D = E[h] = F.append("g").attr("class", p[V]));
2096
+ }
2097
+ return D;
2098
+ }
2099
+ a(z, "getGroup");
2100
+ for (const p of v) {
2101
+ if (p.data.length === 0) continue;
2102
+ const D = z(p.groupTexts);
2103
+ switch (p.type) {
2104
+ case "rect":
2105
+ if (D.selectAll("rect").data(p.data).enter().append("rect").attr("x", (h) => h.x).attr("y", (h) => h.y).attr("width", (h) => h.width).attr("height", (h) => h.height).attr("fill", (h) => h.fill).attr("stroke", (h) => h.strokeFill).attr("stroke-width", (h) => h.strokeWidth), l.showDataLabel) {
2106
+ const h = l.showDataLabelOutsideBar;
2107
+ if (l.chartOrientation === "horizontal") {
2108
+ let V = function(w, B) {
2109
+ const { data: R, label: H } = w;
2110
+ return B * H.length * F <= R.width - X;
2111
+ };
2112
+ a(V, "fitsHorizontally");
2113
+ const F = 0.7, X = 10, Y = p.data.map((w, B) => ({
2114
+ data: w,
2115
+ label: f[B].toString()
2116
+ })).filter((w) => w.data.width > 0 && w.data.height > 0), C = Y.map((w) => {
2117
+ const { data: B } = w;
2118
+ let R = B.height * 0.7;
2119
+ for (; !V(w, R) && R > 0; ) R -= 1;
2120
+ return R;
2121
+ }), U = Math.floor(Math.min(...C)), b = /* @__PURE__ */ a((w) => h ? w.data.x + w.data.width + X : w.data.x + w.data.width - X, "determineLabelXPosition");
2122
+ D.selectAll("text").data(Y).enter().append("text").attr("x", b).attr("y", (w) => w.data.y + w.data.height / 2).attr("text-anchor", h ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", c.dataLabelColor).attr("font-size", `${U}px`).text((w) => w.label);
2123
+ } else {
2124
+ let V = function(b, w, B) {
2125
+ const { data: R, label: H } = b, o = w * H.length * 0.7, u = R.x + R.width / 2, A = u - o / 2, g = u + o / 2, x = A >= R.x && g <= R.x + R.width, k = R.y + B + w <= R.y + R.height;
2126
+ return x && k;
2127
+ };
2128
+ a(V, "fitsInBar");
2129
+ const F = 10, X = p.data.map((b, w) => ({
2130
+ data: b,
2131
+ label: f[w].toString()
2132
+ })).filter((b) => b.data.width > 0 && b.data.height > 0), Y = X.map((b) => {
2133
+ const { data: w, label: B } = b;
2134
+ let R = w.width / (B.length * 0.7);
2135
+ for (; !V(b, R, F) && R > 0; ) R -= 1;
2136
+ return R;
2137
+ }), C = Math.floor(Math.min(...Y)), U = /* @__PURE__ */ a((b) => h ? b.data.y - F : b.data.y + F, "determineLabelYPosition");
2138
+ D.selectAll("text").data(X).enter().append("text").attr("x", (b) => b.data.x + b.data.width / 2).attr("y", U).attr("text-anchor", "middle").attr("dominant-baseline", h ? "auto" : "hanging").attr("fill", c.dataLabelColor).attr("font-size", `${C}px`).text((b) => b.label);
2139
+ }
2140
+ }
2141
+ break;
2142
+ case "text":
2143
+ D.selectAll("text").data(p.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (h) => h.fill).attr("font-size", (h) => h.fontSize).attr("dominant-baseline", (h) => S(h.verticalPos)).attr("text-anchor", (h) => T(h.horizontalPos)).attr("transform", (h) => P(h)).text((h) => h.text);
2144
+ break;
2145
+ case "path":
2146
+ D.selectAll("path").data(p.data).enter().append("path").attr("d", (h) => h.path).attr("fill", (h) => h.fill ? h.fill : "none").attr("stroke", (h) => h.strokeFill).attr("stroke-width", (h) => h.strokeWidth);
2147
+ break;
2148
+ }
2149
+ }
2150
+ }, "draw") }
2151
+ };
2152
+ export {
2153
+ Wi as diagram
2154
+ };