@toimc/markdown 0.0.1 → 0.0.3

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 (284) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/dist/{bash-Cm4CVo6v.js → bash-CB7IBf-7.js} +0 -1
  4. package/dist/{CodeBlock.vue.d.ts → components/CodeBlock.vue.d.ts} +10 -1
  5. package/dist/components/CodeBlock.vue.d.ts.map +1 -0
  6. package/dist/components/LatexBlock.vue.d.ts.map +1 -0
  7. package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -0
  8. package/dist/components/MermaidBlock.vue.d.ts.map +1 -0
  9. package/dist/composables/useMarkdownIt.d.ts.map +1 -1
  10. package/dist/css-BNAk6GUm.js +1 -0
  11. package/dist/css-CSuiabBd.cjs +1 -0
  12. package/dist/css-XGfOcSWP.js +2 -0
  13. package/dist/css-hISgu-gn.cjs +1 -0
  14. package/dist/{github-dark-C85MA6EW.js → github-dark-HjHQSF6c.js} +1 -2
  15. package/dist/{github-light-Dzg0sEwI.js → github-light-BS4bTP_A.js} +1 -2
  16. package/dist/{go-BEdBk4fh.js → go-DM5FkVJr.js} +0 -1
  17. package/dist/{html-CptZ4PZn.cjs → html-B74xNLl7.cjs} +1 -1
  18. package/dist/html-BfvIZbOy.cjs +1 -0
  19. package/dist/{html-Ctxsat8s.js → html-CPRPPrI5.js} +4 -5
  20. package/dist/html-CicqKfTr.js +1 -0
  21. package/dist/index.cjs +63 -61
  22. package/dist/index.d.ts +4 -4
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.mjs +6136 -5530
  25. package/dist/{javascript-Bk0bJ4nQ.js → javascript-BA7R0ZzU.js} +0 -1
  26. package/dist/javascript-D3uiIYXW.js +1 -0
  27. package/dist/json-BxN5JlXF.js +1 -0
  28. package/dist/{json-DFt_0dbD.js → json-DzGpsm5O.js} +0 -1
  29. package/dist/{jsx-BHkwOr0x.js → jsx-OQctj7OM.js} +0 -1
  30. package/dist/katex.css +1 -1
  31. package/dist/{markdown-nUtTZkU8.js → markdown-CNVZ8ok-.js} +0 -1
  32. package/dist/markdown.css +1 -1
  33. package/dist/{python-D0AaDoWC.js → python-BHaXfePs.js} +0 -1
  34. package/dist/rust-CbGaYpW0.js +2 -0
  35. package/dist/rust-rQqn7k8G.cjs +1 -0
  36. package/dist/{scss-CoGT9c_3.js → scss-C-hhxfjO.js} +2 -3
  37. package/dist/{scss-BY5CCWQ_.cjs → scss-t_1qNxqd.cjs} +1 -1
  38. package/dist/sql-DbsWPbnd.js +2 -0
  39. package/dist/sql-Dz4D2KVE.cjs +1 -0
  40. package/dist/{tsx-Cb6KMAZH.js → tsx-6akVe_f1.js} +0 -1
  41. package/dist/typescript-BV-txBTG.js +1 -0
  42. package/dist/{typescript-C4BXhs_3.js → typescript-DB3hlC91.js} +0 -1
  43. package/dist/utils/formula-guard.d.ts +13 -0
  44. package/dist/utils/formula-guard.d.ts.map +1 -0
  45. package/dist/utils/split-lines.d.ts +10 -0
  46. package/dist/utils/split-lines.d.ts.map +1 -0
  47. package/dist/{vue-DG6ivzcc.cjs → vue-Dsb5eNKu.cjs} +1 -1
  48. package/dist/{vue-DcTnNxpt.js → vue-wUrCEfyQ.js} +9 -10
  49. package/dist/{yaml-DXmkPuRD.js → yaml-CcAIbj8h.js} +0 -1
  50. package/package.json +21 -17
  51. package/dist/CodeBlock.test.d.ts +0 -2
  52. package/dist/CodeBlock.test.d.ts.map +0 -1
  53. package/dist/CodeBlock.vue.d.ts.map +0 -1
  54. package/dist/LatexBlock.test.d.ts +0 -2
  55. package/dist/LatexBlock.test.d.ts.map +0 -1
  56. package/dist/LatexBlock.vue.d.ts.map +0 -1
  57. package/dist/MarkdownRenderer.test.d.ts +0 -2
  58. package/dist/MarkdownRenderer.test.d.ts.map +0 -1
  59. package/dist/MarkdownRenderer.vue.d.ts.map +0 -1
  60. package/dist/MermaidBlock.test.d.ts +0 -2
  61. package/dist/MermaidBlock.test.d.ts.map +0 -1
  62. package/dist/MermaidBlock.vue.d.ts.map +0 -1
  63. package/dist/abnfDiagram-N423BO3Z-CpvDGmAd.cjs +0 -1
  64. package/dist/abnfDiagram-N423BO3Z-DuAPsGBR.js +0 -89
  65. package/dist/arc-CFxpoaLu.js +0 -82
  66. package/dist/arc-Dh2Zrypi.cjs +0 -1
  67. package/dist/architecture-TIHT7OUA-CUym9zMN.cjs +0 -1
  68. package/dist/architecture-TIHT7OUA-DDwCCw0y.js +0 -3
  69. package/dist/architectureDiagram-T3A2C74G-CS6-PQjR.cjs +0 -36
  70. package/dist/architectureDiagram-T3A2C74G-d7xzbLJQ.js +0 -4155
  71. package/dist/array-CApNbSU9.js +0 -6
  72. package/dist/array-DZSRzHA_.cjs +0 -1
  73. package/dist/blockDiagram-VBNYF7ZC-CnvNE8Hq.js +0 -3157
  74. package/dist/blockDiagram-VBNYF7ZC-DVl7vKmv.cjs +0 -132
  75. package/dist/c4Diagram-5PPSVZJV-B1RTcquO.js +0 -2982
  76. package/dist/c4Diagram-5PPSVZJV-Djkk0hzr.cjs +0 -10
  77. package/dist/channel-CNZiSge7.cjs +0 -1
  78. package/dist/channel-CqlbSsMQ.js +0 -5
  79. package/dist/chunk-2GRJ4B5K-BgeLbn06.cjs +0 -1
  80. package/dist/chunk-2GRJ4B5K-C5VToU5T.js +0 -61
  81. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +0 -1
  82. package/dist/chunk-2Q5K7J3B-C3WfnuyI.js +0 -15
  83. package/dist/chunk-4I5QYGJK-Bs8S-Wfu.js +0 -275
  84. package/dist/chunk-4I5QYGJK-CBqJO_mi.cjs +0 -1
  85. package/dist/chunk-5RXB4S5H-BnJ1P9K2.js +0 -2042
  86. package/dist/chunk-5RXB4S5H-BtEDiC1U.cjs +0 -231
  87. package/dist/chunk-5VM5RSS4-BsUXY5k9.js +0 -5
  88. package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +0 -15
  89. package/dist/chunk-6Q2QTUOP-C0P-wtth.js +0 -490
  90. package/dist/chunk-6Q2QTUOP-UC-G8b3B.cjs +0 -88
  91. package/dist/chunk-7BUUIJ7U-CZdUK2qY.js +0 -82
  92. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +0 -1
  93. package/dist/chunk-7Z6QIM7H-CJdupq9f.js +0 -593
  94. package/dist/chunk-7Z6QIM7H-CUGcycR0.cjs +0 -10
  95. package/dist/chunk-GF5L2VYU-CDGpCl8Z.js +0 -3357
  96. package/dist/chunk-GF5L2VYU-DWhSvqYP.cjs +0 -206
  97. package/dist/chunk-I66GZJ75-D8wVRUgw.cjs +0 -127
  98. package/dist/chunk-I66GZJ75-xmbkwRyp.js +0 -3754
  99. package/dist/chunk-JQJVKLGR-B-jNEb9r.js +0 -4135
  100. package/dist/chunk-JQJVKLGR-CbhQdRxu.cjs +0 -156
  101. package/dist/chunk-JWPE2WC7-B8JIODrM.js +0 -8
  102. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +0 -1
  103. package/dist/chunk-KBJHAD2P-BMuT9eJO.cjs +0 -1
  104. package/dist/chunk-KBJHAD2P-CCpB6hWQ.js +0 -26
  105. package/dist/chunk-KEIR6QF5-RwFi50en.js +0 -21456
  106. package/dist/chunk-KEIR6QF5-rUKzMPy0.cjs +0 -161
  107. package/dist/chunk-NSK5VX7P-BO1SrWAL.js +0 -1335
  108. package/dist/chunk-NSK5VX7P-BiC_63US.cjs +0 -2
  109. package/dist/chunk-QR6OTTB3-BSxbyKp_.cjs +0 -62
  110. package/dist/chunk-QR6OTTB3-CGxJcV-X.js +0 -3738
  111. package/dist/chunk-RYQCIY6F-Lf2oVMMh.cjs +0 -1
  112. package/dist/chunk-RYQCIY6F-UBebC0ib.js +0 -241
  113. package/dist/chunk-UBXNYLIW-BURVNZm2.cjs +0 -1
  114. package/dist/chunk-UBXNYLIW-fOGkdEwd.js +0 -32
  115. package/dist/chunk-W5SLKNZC-BLFqePZ1.cjs +0 -1
  116. package/dist/chunk-W5SLKNZC-C2SYjJjL.js +0 -67
  117. package/dist/chunk-WRU74C26-Cr4HTCc1.cjs +0 -70
  118. package/dist/chunk-WRU74C26-UGtU6H2a.js +0 -1636
  119. package/dist/chunk-XXDRQBXY-GENMsCHk.js +0 -9
  120. package/dist/chunk-XXDRQBXY-yMT3rT5Y.cjs +0 -1
  121. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +0 -1
  122. package/dist/chunk-Y2CYZVJY-DO9UHHon.js +0 -12
  123. package/dist/classDiagram-JCYQIIEL-DUjWUDYG.cjs +0 -1
  124. package/dist/classDiagram-JCYQIIEL-Dm9anlJw.js +0 -30
  125. package/dist/classDiagram-v2-OCEON4UE-Bl-vyFyz.js +0 -30
  126. package/dist/classDiagram-v2-OCEON4UE-DUjWUDYG.cjs +0 -1
  127. package/dist/composables/useHighlighter.test.d.ts +0 -2
  128. package/dist/composables/useHighlighter.test.d.ts.map +0 -1
  129. package/dist/composables/useMarkdownIt.test.d.ts +0 -2
  130. package/dist/composables/useMarkdownIt.test.d.ts.map +0 -1
  131. package/dist/composables/useShikiTokenizer.test.d.ts +0 -2
  132. package/dist/composables/useShikiTokenizer.test.d.ts.map +0 -1
  133. package/dist/composables/useStreamingMarkdown.test.d.ts +0 -2
  134. package/dist/composables/useStreamingMarkdown.test.d.ts.map +0 -1
  135. package/dist/cose-bilkent-JH36ORCC-C1RCVzVZ.cjs +0 -1
  136. package/dist/cose-bilkent-JH36ORCC-C5FbROLY.js +0 -2254
  137. package/dist/css-BbwcBM_4.js +0 -2
  138. package/dist/css-CEHhC-OC.cjs +0 -1
  139. package/dist/css-Ca3W2DHx.cjs +0 -1
  140. package/dist/css-HuzvwXs-.js +0 -3
  141. package/dist/cynefin-VYW2F7L2-CMgnLl46.js +0 -3
  142. package/dist/cynefin-VYW2F7L2-DVi1CF5b.cjs +0 -1
  143. package/dist/cynefinDiagram-MW4NZA55-CkZY080C.cjs +0 -62
  144. package/dist/cynefinDiagram-MW4NZA55-DbAAx9CC.js +0 -355
  145. package/dist/cytoscape.esm-BKhIYxsH.cjs +0 -321
  146. package/dist/cytoscape.esm-DMXbtFI-.js +0 -18145
  147. package/dist/dagre-DarAkhy1.cjs +0 -1
  148. package/dist/dagre-VZM6K2ZE-CpL0s3GG.js +0 -328
  149. package/dist/dagre-VZM6K2ZE-D1_S1oSj.cjs +0 -4
  150. package/dist/dagre-x4cMb6gU.js +0 -1699
  151. package/dist/defaultLocale-ybN1Vtvg.cjs +0 -1
  152. package/dist/defaultLocale-yzzuPw6P.js +0 -198
  153. package/dist/diagram-7IWD3JNH-BXvOBw2z.js +0 -300
  154. package/dist/diagram-7IWD3JNH-W-Kjft6l.cjs +0 -30
  155. package/dist/diagram-B4RE2ZJO-C4lLgW4X.cjs +0 -3
  156. package/dist/diagram-B4RE2ZJO-DyAAD_bR.js +0 -432
  157. package/dist/diagram-LBJQPF4R-BTgCWP5o.cjs +0 -24
  158. package/dist/diagram-LBJQPF4R-BbMQOpt2.js +0 -134
  159. package/dist/diagram-Q27KOJAE-ink_R6qE.js +0 -527
  160. package/dist/diagram-Q27KOJAE-v-ZMzCxs.cjs +0 -24
  161. package/dist/diagram-UB23O5K3-BXTm2BG0.cjs +0 -41
  162. package/dist/diagram-UB23O5K3-C6rqCJBb.js +0 -214
  163. package/dist/dist-BP2me-br.js +0 -59
  164. package/dist/dist-Dwv2VYAL.cjs +0 -1
  165. package/dist/ebnfDiagram-BXEA7PRR-C80cjdjP.js +0 -100
  166. package/dist/ebnfDiagram-BXEA7PRR-lKO9XwUp.cjs +0 -1
  167. package/dist/erDiagram-JOGREHBK-Blwfr6w3.js +0 -1727
  168. package/dist/erDiagram-JOGREHBK-ChgcmULa.cjs +0 -85
  169. package/dist/eventmodeling-45OFAUF4-BDhzj03B.js +0 -3
  170. package/dist/eventmodeling-45OFAUF4-BtU19idK.cjs +0 -1
  171. package/dist/flowDiagram-UKHOOZJN-Co0JpKUU.js +0 -16
  172. package/dist/flowDiagram-UKHOOZJN-db1Ur2LI.cjs +0 -1
  173. package/dist/ganttDiagram-PKOTCBZU-Byi4E8Ye.js +0 -3073
  174. package/dist/ganttDiagram-PKOTCBZU-C_Vwv1o8.cjs +0 -292
  175. package/dist/gitGraph-TEB2WS4Q-CAeGPNFR.cjs +0 -1
  176. package/dist/gitGraph-TEB2WS4Q-DJA_hE4G.js +0 -3
  177. package/dist/gitGraphDiagram-DS77QQ5N-BG8AQVtP.js +0 -733
  178. package/dist/gitGraphDiagram-DS77QQ5N-DK9VJTjf.cjs +0 -106
  179. package/dist/graphlib-BaETKKSa.cjs +0 -1
  180. package/dist/graphlib-DoD0LnUK.js +0 -1267
  181. package/dist/html-BH9giSUA.js +0 -2
  182. package/dist/html-DtqQp8LO.cjs +0 -1
  183. package/dist/info-DKCQHKI2-BD_vOCz6.js +0 -3
  184. package/dist/info-DKCQHKI2-p0Lazone.cjs +0 -1
  185. package/dist/infoDiagram-6WML65LV-B6PBOy7T.js +0 -20
  186. package/dist/infoDiagram-6WML65LV-nBSrP53Z.cjs +0 -2
  187. package/dist/init-BJdqMO10.cjs +0 -1
  188. package/dist/init-sjaVZO3f.js +0 -13
  189. package/dist/ishikawaDiagram-WSZJBQD7-BxEkaF2A.js +0 -719
  190. package/dist/ishikawaDiagram-WSZJBQD7-CjyKQ_N6.cjs +0 -70
  191. package/dist/javascript--0qAxhnA.js +0 -2
  192. package/dist/journeyDiagram-NVQOT4AX-BPCuqjbW.js +0 -884
  193. package/dist/journeyDiagram-NVQOT4AX-DKgEeNcy.cjs +0 -139
  194. package/dist/json-DVwBUiza.js +0 -2
  195. package/dist/kanban-definition-27J2QSJJ-BeKnR9zB.cjs +0 -89
  196. package/dist/kanban-definition-27J2QSJJ-D1pVuCv2.js +0 -974
  197. package/dist/katex-BfeHGk4M.js +0 -21977
  198. package/dist/katex-CEF6MvLx.cjs +0 -257
  199. package/dist/line-8EHPtDZA.cjs +0 -1
  200. package/dist/line-BifI9Y7j.js +0 -34
  201. package/dist/linear-Nt9BuHfn.cjs +0 -1
  202. package/dist/linear-l8AD1ib_.js +0 -288
  203. package/dist/map-CCpPjiU9.cjs +0 -1
  204. package/dist/map-DUk1uXZC.js +0 -241
  205. package/dist/mermaid-parser.core-BupC9XGF.js +0 -638
  206. package/dist/mermaid-parser.core-aXxW1VLR.cjs +0 -6
  207. package/dist/mermaid.core-C05C5gh_.cjs +0 -41
  208. package/dist/mermaid.core-CxM-VhZd.js +0 -2297
  209. package/dist/mindmap-definition-FAOFIHXS-B_k8KOvw.js +0 -1006
  210. package/dist/mindmap-definition-FAOFIHXS-CKPAiVKf.cjs +0 -96
  211. package/dist/ordinal-Bm_chml2.cjs +0 -1
  212. package/dist/ordinal-CNQzPcrr.js +0 -65
  213. package/dist/packet-7NZHBO7P-CVdRavgo.cjs +0 -1
  214. package/dist/packet-7NZHBO7P-CgBlALV1.js +0 -3
  215. package/dist/path-DIS6ck99.cjs +0 -1
  216. package/dist/path-DVvH25eQ.js +0 -84
  217. package/dist/pegDiagram-VL7TDLO6-B5Jhedbv.cjs +0 -1
  218. package/dist/pegDiagram-VL7TDLO6-PP-A-3Lv.js +0 -94
  219. package/dist/pie-RZYD4A2V-CryPC-P_.js +0 -3
  220. package/dist/pie-RZYD4A2V-CwDJ0bEW.cjs +0 -1
  221. package/dist/pieDiagram-7S7Q4E2Y-CgDU9E10.cjs +0 -39
  222. package/dist/pieDiagram-7S7Q4E2Y-CxNt1xaN.js +0 -203
  223. package/dist/quadrantDiagram-CIZ2JOQS-CMUanfcR.js +0 -2001
  224. package/dist/quadrantDiagram-CIZ2JOQS-vybEBK1o.cjs +0 -7
  225. package/dist/radar-I7S5WNFK-DaVgEjvC.cjs +0 -1
  226. package/dist/radar-I7S5WNFK-DgzJDRy3.js +0 -3
  227. package/dist/railroad-3IZDKUUU-BPsrMjqz.cjs +0 -1
  228. package/dist/railroad-3IZDKUUU-DFp3mbpB.js +0 -3
  229. package/dist/railroad-abnf-AHOZXSZD-BRjidKH0.js +0 -3
  230. package/dist/railroad-abnf-AHOZXSZD-ZpHq_KEy.cjs +0 -1
  231. package/dist/railroad-ebnf-EBAXGLYW-B45niwuq.cjs +0 -1
  232. package/dist/railroad-ebnf-EBAXGLYW-PgrDWact.js +0 -3
  233. package/dist/railroad-peg-LSFZ7HO6-CMKir81Y.js +0 -3
  234. package/dist/railroad-peg-LSFZ7HO6-DUsuEX2Z.cjs +0 -1
  235. package/dist/railroadDiagram-AXF67PYL-D7y_2yAa.cjs +0 -1
  236. package/dist/railroadDiagram-AXF67PYL-iLkvx2oU.js +0 -76
  237. package/dist/renderers/tokensToHtml.test.d.ts +0 -2
  238. package/dist/renderers/tokensToHtml.test.d.ts.map +0 -1
  239. package/dist/requirementDiagram-LRYGKXZP-Bs2mCDzB.js +0 -2223
  240. package/dist/requirementDiagram-LRYGKXZP-lA2nVr6h.cjs +0 -84
  241. package/dist/rolldown-runtime-B0aSnxlc.js +0 -20
  242. package/dist/rolldown-runtime-DF3sbh8G.cjs +0 -1
  243. package/dist/rough.esm-B2w_aYoc.js +0 -1361
  244. package/dist/rough.esm-ChRLLRha.cjs +0 -1
  245. package/dist/rust-BrRMzTsN.js +0 -3
  246. package/dist/rust-DWYDZl_E.cjs +0 -1
  247. package/dist/sankeyDiagram-W5VNT64P-BxYQllhE.js +0 -972
  248. package/dist/sankeyDiagram-W5VNT64P-vPci5pOT.cjs +0 -40
  249. package/dist/sequenceDiagram-SI44F4Z6-BNu1-3EN.cjs +0 -162
  250. package/dist/sequenceDiagram-SI44F4Z6-E6AoYU_R.js +0 -4156
  251. package/dist/sizeCapture-X5ZJPWSS-8gbZlYqg.js +0 -46
  252. package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +0 -1
  253. package/dist/sql-CF-HzF4U.cjs +0 -1
  254. package/dist/sql-DvCCsF21.js +0 -3
  255. package/dist/src-C7bjHtAI.js +0 -2139
  256. package/dist/src-D9o9TOtH.cjs +0 -1
  257. package/dist/stateDiagram-OKZ733FA-B7ITlY91.cjs +0 -1
  258. package/dist/stateDiagram-OKZ733FA-BfcOAK65.js +0 -220
  259. package/dist/stateDiagram-v2-UEYNNEHI-BHO-uUPG.js +0 -30
  260. package/dist/stateDiagram-v2-UEYNNEHI-lgGjJyRM.cjs +0 -1
  261. package/dist/swimlanes-SLNWSIFB-BHIPInzG.js +0 -5069
  262. package/dist/swimlanes-SLNWSIFB-C-Z31wMl.cjs +0 -1
  263. package/dist/swimlanesDiagram-ULZ7WXOC-C8pvRoyc.cjs +0 -8
  264. package/dist/swimlanesDiagram-ULZ7WXOC-CK6AVyRM.js +0 -30
  265. package/dist/timeline-definition-Z64GVDOM-C31otJwb.cjs +0 -120
  266. package/dist/timeline-definition-Z64GVDOM-rUKJY7cp.js +0 -1069
  267. package/dist/treeView-QDETBFTQ-BkNUN560.cjs +0 -1
  268. package/dist/treeView-QDETBFTQ-DVp4aTZQ.js +0 -3
  269. package/dist/treemap-6X3UGDF4-BbBnHMHJ.js +0 -3
  270. package/dist/treemap-6X3UGDF4-BcO657a2.cjs +0 -1
  271. package/dist/typescript-DFf19o_s.js +0 -2
  272. package/dist/utils/extractCompleteMarkdown.test.d.ts +0 -2
  273. package/dist/utils/extractCompleteMarkdown.test.d.ts.map +0 -1
  274. package/dist/vennDiagram-T6HMQDX7-DjlTuTEH.cjs +0 -34
  275. package/dist/vennDiagram-T6HMQDX7-vxMe-3nF.js +0 -1880
  276. package/dist/wardley-OPB4EBWU-B-RXhnoN.js +0 -3
  277. package/dist/wardley-OPB4EBWU-CiILNYeL.cjs +0 -1
  278. package/dist/wardleyDiagram-T6FBY63Y-BMQLZV1W.cjs +0 -78
  279. package/dist/wardleyDiagram-T6FBY63Y-C_Q2NmJu.js +0 -645
  280. package/dist/xychartDiagram-ELKLHX3M-Bsa_zeyd.cjs +0 -7
  281. package/dist/xychartDiagram-ELKLHX3M-OcVmrPL6.js +0 -2101
  282. /package/dist/{LatexBlock.vue.d.ts → components/LatexBlock.vue.d.ts} +0 -0
  283. /package/dist/{MarkdownRenderer.vue.d.ts → components/MarkdownRenderer.vue.d.ts} +0 -0
  284. /package/dist/{MermaidBlock.vue.d.ts → components/MermaidBlock.vue.d.ts} +0 -0
@@ -1,2101 +0,0 @@
1
- import { n as e } from "./chunk-Y2CYZVJY-DO9UHHon.js";
2
- import { m as t } from "./src-C7bjHtAI.js";
3
- import { D as n, H as r, K as i, U as a, a as o, b as s, c, f as l, v as u, w as d, y as f, z as p } from "./chunk-I66GZJ75-xmbkwRyp.js";
4
- import { t as m } from "./linear-l8AD1ib_.js";
5
- import { t as h } from "./ordinal-CNQzPcrr.js";
6
- import { t as g } from "./init-sjaVZO3f.js";
7
- import { i as _ } from "./chunk-NSK5VX7P-BO1SrWAL.js";
8
- import { t as v } from "./line-BifI9Y7j.js";
9
- import "./chunk-4I5QYGJK-Bs8S-Wfu.js";
10
- import { t as y } from "./chunk-WRU74C26-UGtU6H2a.js";
11
- import { a as b } from "./mermaid.core-CxM-VhZd.js";
12
- //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/range.js
13
- function x(e, t, n) {
14
- e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
15
- for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
16
- return a;
17
- }
18
- //#endregion
19
- //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
20
- function S() {
21
- var e = h().unknown(void 0), t = e.domain, n = e.range, r = 0, i = 1, a, o, s = !1, c = 0, l = 0, u = .5;
22
- delete e.unknown;
23
- function d() {
24
- var e = t().length, d = i < r, f = d ? i : r, p = d ? r : i;
25
- a = (p - f) / Math.max(1, e - c + l * 2), s && (a = Math.floor(a)), f += (p - f - a * (e - c)) * u, o = a * (1 - c), s && (f = Math.round(f), o = Math.round(o));
26
- var m = x(e).map(function(e) {
27
- return f + a * e;
28
- });
29
- return n(d ? m.reverse() : m);
30
- }
31
- return e.domain = function(e) {
32
- return arguments.length ? (t(e), d()) : t();
33
- }, e.range = function(e) {
34
- return arguments.length ? ([r, i] = e, r = +r, i = +i, d()) : [r, i];
35
- }, e.rangeRound = function(e) {
36
- return [r, i] = e, r = +r, i = +i, s = !0, d();
37
- }, e.bandwidth = function() {
38
- return o;
39
- }, e.step = function() {
40
- return a;
41
- }, e.round = function(e) {
42
- return arguments.length ? (s = !!e, d()) : s;
43
- }, e.padding = function(e) {
44
- return arguments.length ? (c = Math.min(1, l = +e), d()) : c;
45
- }, e.paddingInner = function(e) {
46
- return arguments.length ? (c = Math.min(1, e), d()) : c;
47
- }, e.paddingOuter = function(e) {
48
- return arguments.length ? (l = +e, d()) : l;
49
- }, e.align = function(e) {
50
- return arguments.length ? (u = Math.max(0, Math.min(1, e)), d()) : u;
51
- }, e.copy = function() {
52
- return S(t(), [r, i]).round(s).paddingInner(c).paddingOuter(l).align(u);
53
- }, g.apply(d(), arguments);
54
- }
55
- //#endregion
56
- //#region ../../node_modules/.pnpm/mermaid@11.16.1/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-ELKLHX3M.mjs
57
- var C = (function() {
58
- var t = /* @__PURE__ */ e(function(e, t, n, r) {
59
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
60
- return n;
61
- }, "o"), n = [
62
- 1,
63
- 10,
64
- 12,
65
- 14,
66
- 16,
67
- 18,
68
- 19,
69
- 21,
70
- 23
71
- ], r = [2, 6], i = [1, 3], a = [1, 5], o = [1, 6], s = [1, 7], c = [
72
- 1,
73
- 5,
74
- 10,
75
- 12,
76
- 14,
77
- 16,
78
- 18,
79
- 19,
80
- 21,
81
- 23,
82
- 36,
83
- 37,
84
- 38
85
- ], l = [1, 25], u = [1, 26], d = [1, 28], f = [1, 29], p = [1, 30], m = [1, 31], h = [1, 32], g = [1, 33], _ = [1, 34], v = [1, 35], y = [1, 36], b = [1, 37], x = [1, 43], S = [1, 42], C = [1, 47], w = [1, 50], T = [
86
- 1,
87
- 10,
88
- 12,
89
- 14,
90
- 16,
91
- 18,
92
- 19,
93
- 21,
94
- 23,
95
- 36,
96
- 37,
97
- 38
98
- ], E = [
99
- 1,
100
- 10,
101
- 12,
102
- 14,
103
- 16,
104
- 18,
105
- 19,
106
- 21,
107
- 23,
108
- 24,
109
- 26,
110
- 28,
111
- 29,
112
- 36,
113
- 37,
114
- 38
115
- ], D = [
116
- 1,
117
- 10,
118
- 12,
119
- 14,
120
- 16,
121
- 18,
122
- 19,
123
- 21,
124
- 23,
125
- 24,
126
- 26,
127
- 28,
128
- 29,
129
- 36,
130
- 37,
131
- 38,
132
- 42,
133
- 43,
134
- 44,
135
- 45,
136
- 46,
137
- 47,
138
- 48,
139
- 49,
140
- 50,
141
- 51
142
- ], O = [1, 65], k = [26, 28], A = {
143
- trace: /* @__PURE__ */ e(function() {}, "trace"),
144
- yy: {},
145
- symbols_: {
146
- error: 2,
147
- start: 3,
148
- eol: 4,
149
- XYCHART: 5,
150
- chartConfig: 6,
151
- document: 7,
152
- CHART_ORIENTATION: 8,
153
- statement: 9,
154
- title: 10,
155
- text: 11,
156
- X_AXIS: 12,
157
- parseXAxis: 13,
158
- Y_AXIS: 14,
159
- parseYAxis: 15,
160
- LINE: 16,
161
- plotData: 17,
162
- BAR: 18,
163
- acc_title: 19,
164
- acc_title_value: 20,
165
- acc_descr: 21,
166
- acc_descr_value: 22,
167
- acc_descr_multiline_value: 23,
168
- SQUARE_BRACES_START: 24,
169
- dataPoints: 25,
170
- SQUARE_BRACES_END: 26,
171
- dataPoint: 27,
172
- COMMA: 28,
173
- NUMBER_WITH_DECIMAL: 29,
174
- STR: 30,
175
- xAxisData: 31,
176
- bandData: 32,
177
- ARROW_DELIMITER: 33,
178
- commaSeparatedTexts: 34,
179
- yAxisData: 35,
180
- NEWLINE: 36,
181
- SEMI: 37,
182
- EOF: 38,
183
- alphaNum: 39,
184
- MD_STR: 40,
185
- alphaNumToken: 41,
186
- AMP: 42,
187
- NUM: 43,
188
- ALPHA: 44,
189
- PLUS: 45,
190
- EQUALS: 46,
191
- MULT: 47,
192
- DOT: 48,
193
- BRKT: 49,
194
- MINUS: 50,
195
- UNDERSCORE: 51,
196
- $accept: 0,
197
- $end: 1
198
- },
199
- terminals_: {
200
- 2: "error",
201
- 5: "XYCHART",
202
- 8: "CHART_ORIENTATION",
203
- 10: "title",
204
- 12: "X_AXIS",
205
- 14: "Y_AXIS",
206
- 16: "LINE",
207
- 18: "BAR",
208
- 19: "acc_title",
209
- 20: "acc_title_value",
210
- 21: "acc_descr",
211
- 22: "acc_descr_value",
212
- 23: "acc_descr_multiline_value",
213
- 24: "SQUARE_BRACES_START",
214
- 26: "SQUARE_BRACES_END",
215
- 28: "COMMA",
216
- 29: "NUMBER_WITH_DECIMAL",
217
- 30: "STR",
218
- 33: "ARROW_DELIMITER",
219
- 36: "NEWLINE",
220
- 37: "SEMI",
221
- 38: "EOF",
222
- 40: "MD_STR",
223
- 42: "AMP",
224
- 43: "NUM",
225
- 44: "ALPHA",
226
- 45: "PLUS",
227
- 46: "EQUALS",
228
- 47: "MULT",
229
- 48: "DOT",
230
- 49: "BRKT",
231
- 50: "MINUS",
232
- 51: "UNDERSCORE"
233
- },
234
- productions_: [
235
- 0,
236
- [3, 2],
237
- [3, 3],
238
- [3, 2],
239
- [3, 1],
240
- [6, 1],
241
- [7, 0],
242
- [7, 2],
243
- [9, 2],
244
- [9, 2],
245
- [9, 2],
246
- [9, 2],
247
- [9, 2],
248
- [9, 3],
249
- [9, 2],
250
- [9, 3],
251
- [9, 2],
252
- [9, 2],
253
- [9, 1],
254
- [17, 3],
255
- [25, 3],
256
- [25, 1],
257
- [27, 2],
258
- [27, 1],
259
- [13, 1],
260
- [13, 2],
261
- [13, 1],
262
- [31, 1],
263
- [31, 3],
264
- [32, 3],
265
- [34, 3],
266
- [34, 1],
267
- [15, 1],
268
- [15, 2],
269
- [15, 1],
270
- [35, 3],
271
- [4, 1],
272
- [4, 1],
273
- [4, 1],
274
- [11, 1],
275
- [11, 1],
276
- [11, 1],
277
- [39, 1],
278
- [39, 2],
279
- [41, 1],
280
- [41, 1],
281
- [41, 1],
282
- [41, 1],
283
- [41, 1],
284
- [41, 1],
285
- [41, 1],
286
- [41, 1],
287
- [41, 1],
288
- [41, 1]
289
- ],
290
- performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
291
- var s = a.length - 1;
292
- switch (i) {
293
- case 5:
294
- r.setOrientation(a[s]);
295
- break;
296
- case 9:
297
- r.setDiagramTitle(a[s].text.trim());
298
- break;
299
- case 12:
300
- r.setLineData({
301
- text: "",
302
- type: "text"
303
- }, a[s]);
304
- break;
305
- case 13:
306
- r.setLineData(a[s - 1], a[s]);
307
- break;
308
- case 14:
309
- r.setBarData({
310
- text: "",
311
- type: "text"
312
- }, a[s]);
313
- break;
314
- case 15:
315
- r.setBarData(a[s - 1], a[s]);
316
- break;
317
- case 16:
318
- this.$ = a[s].trim(), r.setAccTitle(this.$);
319
- break;
320
- case 17:
321
- case 18:
322
- this.$ = a[s].trim(), r.setAccDescription(this.$);
323
- break;
324
- case 19:
325
- this.$ = a[s - 1];
326
- break;
327
- case 20:
328
- case 30:
329
- this.$ = [a[s - 2], ...a[s]];
330
- break;
331
- case 21:
332
- case 31:
333
- this.$ = [a[s]];
334
- break;
335
- case 22:
336
- this.$ = {
337
- value: Number(a[s - 1]),
338
- label: a[s]
339
- };
340
- break;
341
- case 23:
342
- this.$ = {
343
- value: Number(a[s]),
344
- label: ""
345
- };
346
- break;
347
- case 24:
348
- r.setXAxisTitle(a[s]);
349
- break;
350
- case 25:
351
- r.setXAxisTitle(a[s - 1]);
352
- break;
353
- case 26:
354
- r.setXAxisTitle({
355
- type: "text",
356
- text: ""
357
- });
358
- break;
359
- case 27:
360
- r.setXAxisBand(a[s]);
361
- break;
362
- case 28:
363
- r.setXAxisRangeData(Number(a[s - 2]), Number(a[s]));
364
- break;
365
- case 29:
366
- this.$ = a[s - 1];
367
- break;
368
- case 32:
369
- r.setYAxisTitle(a[s]);
370
- break;
371
- case 33:
372
- r.setYAxisTitle(a[s - 1]);
373
- break;
374
- case 34:
375
- r.setYAxisTitle({
376
- type: "text",
377
- text: ""
378
- });
379
- break;
380
- case 35:
381
- r.setYAxisRangeData(Number(a[s - 2]), Number(a[s]));
382
- break;
383
- case 39:
384
- this.$ = {
385
- text: a[s],
386
- type: "text"
387
- };
388
- break;
389
- case 40:
390
- this.$ = {
391
- text: a[s],
392
- type: "text"
393
- };
394
- break;
395
- case 41:
396
- this.$ = {
397
- text: a[s],
398
- type: "markdown"
399
- };
400
- break;
401
- case 42:
402
- this.$ = a[s];
403
- break;
404
- case 43: this.$ = a[s - 1] + "" + a[s];
405
- }
406
- }, "anonymous"),
407
- table: [
408
- t(n, r, {
409
- 3: 1,
410
- 4: 2,
411
- 7: 4,
412
- 5: i,
413
- 36: a,
414
- 37: o,
415
- 38: s
416
- }),
417
- { 1: [3] },
418
- t(n, r, {
419
- 4: 2,
420
- 7: 4,
421
- 3: 8,
422
- 5: i,
423
- 36: a,
424
- 37: o,
425
- 38: s
426
- }),
427
- t(n, r, {
428
- 4: 2,
429
- 7: 4,
430
- 6: 9,
431
- 3: 10,
432
- 5: i,
433
- 8: [1, 11],
434
- 36: a,
435
- 37: o,
436
- 38: s
437
- }),
438
- {
439
- 1: [2, 4],
440
- 9: 12,
441
- 10: [1, 13],
442
- 12: [1, 14],
443
- 14: [1, 15],
444
- 16: [1, 16],
445
- 18: [1, 17],
446
- 19: [1, 18],
447
- 21: [1, 19],
448
- 23: [1, 20]
449
- },
450
- t(c, [2, 36]),
451
- t(c, [2, 37]),
452
- t(c, [2, 38]),
453
- { 1: [2, 1] },
454
- t(n, r, {
455
- 4: 2,
456
- 7: 4,
457
- 3: 21,
458
- 5: i,
459
- 36: a,
460
- 37: o,
461
- 38: s
462
- }),
463
- { 1: [2, 3] },
464
- t(c, [2, 5]),
465
- t(n, [2, 7], {
466
- 4: 22,
467
- 36: a,
468
- 37: o,
469
- 38: s
470
- }),
471
- {
472
- 11: 23,
473
- 30: l,
474
- 39: 24,
475
- 40: u,
476
- 41: 27,
477
- 42: d,
478
- 43: f,
479
- 44: p,
480
- 45: m,
481
- 46: h,
482
- 47: g,
483
- 48: _,
484
- 49: v,
485
- 50: y,
486
- 51: b
487
- },
488
- {
489
- 11: 39,
490
- 13: 38,
491
- 24: x,
492
- 29: S,
493
- 30: l,
494
- 31: 40,
495
- 32: 41,
496
- 39: 24,
497
- 40: u,
498
- 41: 27,
499
- 42: d,
500
- 43: f,
501
- 44: p,
502
- 45: m,
503
- 46: h,
504
- 47: g,
505
- 48: _,
506
- 49: v,
507
- 50: y,
508
- 51: b
509
- },
510
- {
511
- 11: 45,
512
- 15: 44,
513
- 29: C,
514
- 30: l,
515
- 35: 46,
516
- 39: 24,
517
- 40: u,
518
- 41: 27,
519
- 42: d,
520
- 43: f,
521
- 44: p,
522
- 45: m,
523
- 46: h,
524
- 47: g,
525
- 48: _,
526
- 49: v,
527
- 50: y,
528
- 51: b
529
- },
530
- {
531
- 11: 49,
532
- 17: 48,
533
- 24: w,
534
- 30: l,
535
- 39: 24,
536
- 40: u,
537
- 41: 27,
538
- 42: d,
539
- 43: f,
540
- 44: p,
541
- 45: m,
542
- 46: h,
543
- 47: g,
544
- 48: _,
545
- 49: v,
546
- 50: y,
547
- 51: b
548
- },
549
- {
550
- 11: 52,
551
- 17: 51,
552
- 24: w,
553
- 30: l,
554
- 39: 24,
555
- 40: u,
556
- 41: 27,
557
- 42: d,
558
- 43: f,
559
- 44: p,
560
- 45: m,
561
- 46: h,
562
- 47: g,
563
- 48: _,
564
- 49: v,
565
- 50: y,
566
- 51: b
567
- },
568
- { 20: [1, 53] },
569
- { 22: [1, 54] },
570
- t(T, [2, 18]),
571
- { 1: [2, 2] },
572
- t(T, [2, 8]),
573
- t(T, [2, 9]),
574
- t(E, [2, 39], {
575
- 41: 55,
576
- 42: d,
577
- 43: f,
578
- 44: p,
579
- 45: m,
580
- 46: h,
581
- 47: g,
582
- 48: _,
583
- 49: v,
584
- 50: y,
585
- 51: b
586
- }),
587
- t(E, [2, 40]),
588
- t(E, [2, 41]),
589
- t(D, [2, 42]),
590
- t(D, [2, 44]),
591
- t(D, [2, 45]),
592
- t(D, [2, 46]),
593
- t(D, [2, 47]),
594
- t(D, [2, 48]),
595
- t(D, [2, 49]),
596
- t(D, [2, 50]),
597
- t(D, [2, 51]),
598
- t(D, [2, 52]),
599
- t(D, [2, 53]),
600
- t(T, [2, 10]),
601
- t(T, [2, 24], {
602
- 32: 41,
603
- 31: 56,
604
- 24: x,
605
- 29: S
606
- }),
607
- t(T, [2, 26]),
608
- t(T, [2, 27]),
609
- { 33: [1, 57] },
610
- {
611
- 11: 59,
612
- 30: l,
613
- 34: 58,
614
- 39: 24,
615
- 40: u,
616
- 41: 27,
617
- 42: d,
618
- 43: f,
619
- 44: p,
620
- 45: m,
621
- 46: h,
622
- 47: g,
623
- 48: _,
624
- 49: v,
625
- 50: y,
626
- 51: b
627
- },
628
- t(T, [2, 11]),
629
- t(T, [2, 32], {
630
- 35: 60,
631
- 29: C
632
- }),
633
- t(T, [2, 34]),
634
- { 33: [1, 61] },
635
- t(T, [2, 12]),
636
- {
637
- 17: 62,
638
- 24: w
639
- },
640
- {
641
- 25: 63,
642
- 27: 64,
643
- 29: O
644
- },
645
- t(T, [2, 14]),
646
- {
647
- 17: 66,
648
- 24: w
649
- },
650
- t(T, [2, 16]),
651
- t(T, [2, 17]),
652
- t(D, [2, 43]),
653
- t(T, [2, 25]),
654
- { 29: [1, 67] },
655
- { 26: [1, 68] },
656
- {
657
- 26: [2, 31],
658
- 28: [1, 69]
659
- },
660
- t(T, [2, 33]),
661
- { 29: [1, 70] },
662
- t(T, [2, 13]),
663
- { 26: [1, 71] },
664
- {
665
- 26: [2, 21],
666
- 28: [1, 72]
667
- },
668
- t(k, [2, 23], { 30: [1, 73] }),
669
- t(T, [2, 15]),
670
- t(T, [2, 28]),
671
- t(T, [2, 29]),
672
- {
673
- 11: 59,
674
- 30: l,
675
- 34: 74,
676
- 39: 24,
677
- 40: u,
678
- 41: 27,
679
- 42: d,
680
- 43: f,
681
- 44: p,
682
- 45: m,
683
- 46: h,
684
- 47: g,
685
- 48: _,
686
- 49: v,
687
- 50: y,
688
- 51: b
689
- },
690
- t(T, [2, 35]),
691
- t(T, [2, 19]),
692
- {
693
- 25: 75,
694
- 27: 64,
695
- 29: O
696
- },
697
- t(k, [2, 22]),
698
- { 26: [2, 30] },
699
- { 26: [2, 20] }
700
- ],
701
- defaultActions: {
702
- 8: [2, 1],
703
- 10: [2, 3],
704
- 21: [2, 2],
705
- 74: [2, 30],
706
- 75: [2, 20]
707
- },
708
- parseError: /* @__PURE__ */ e(function(e, t) {
709
- if (t.recoverable) this.trace(e);
710
- else {
711
- var n = Error(e);
712
- throw n.hash = t, n;
713
- }
714
- }, "parseError"),
715
- parse: /* @__PURE__ */ e(function(t) {
716
- var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
717
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
718
- h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
719
- var v = h.yylloc;
720
- o.push(v);
721
- var y = h.options && h.options.ranges;
722
- this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
723
- function b(e) {
724
- r.length -= 2 * e, a.length -= e, o.length -= e;
725
- }
726
- e(b, "popStack");
727
- function x() {
728
- var e = i.pop() || h.lex() || p;
729
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
730
- }
731
- e(x, "lex");
732
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
733
- if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
734
- var M = "";
735
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
736
- M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
737
- text: h.match,
738
- token: this.terminals_[S] || S,
739
- line: h.yylineno,
740
- loc: v,
741
- expected: j
742
- });
743
- }
744
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
745
- switch (T[0]) {
746
- case 1:
747
- r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
748
- break;
749
- case 2:
750
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
751
- first_line: o[o.length - (k || 1)].first_line,
752
- last_line: o[o.length - 1].last_line,
753
- first_column: o[o.length - (k || 1)].first_column,
754
- last_column: o[o.length - 1].last_column
755
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
756
- c,
757
- u,
758
- l,
759
- g.yy,
760
- T[1],
761
- a,
762
- o
763
- ].concat(m)), E !== void 0) return E;
764
- k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
765
- break;
766
- case 3: return !0;
767
- }
768
- }
769
- return !0;
770
- }, "parse")
771
- };
772
- A.lexer = /* @__PURE__ */ (function() {
773
- return {
774
- EOF: 1,
775
- parseError: /* @__PURE__ */ e(function(e, t) {
776
- if (this.yy.parser) this.yy.parser.parseError(e, t);
777
- else throw Error(e);
778
- }, "parseError"),
779
- setInput: /* @__PURE__ */ e(function(e, t) {
780
- return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
781
- first_line: 1,
782
- first_column: 0,
783
- last_line: 1,
784
- last_column: 0
785
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
786
- }, "setInput"),
787
- input: /* @__PURE__ */ e(function() {
788
- var e = this._input[0];
789
- return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.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), e;
790
- }, "input"),
791
- unput: /* @__PURE__ */ e(function(e) {
792
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
793
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
794
- var r = this.match.split(/(?:\r\n?|\n)/g);
795
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
796
- var i = this.yylloc.range;
797
- return this.yylloc = {
798
- first_line: this.yylloc.first_line,
799
- last_line: this.yylineno + 1,
800
- first_column: this.yylloc.first_column,
801
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
802
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
803
- }, "unput"),
804
- more: /* @__PURE__ */ e(function() {
805
- return this._more = !0, this;
806
- }, "more"),
807
- reject: /* @__PURE__ */ e(function() {
808
- if (this.options.backtrack_lexer) this._backtrack = !0;
809
- 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).\n" + this.showPosition(), {
810
- text: "",
811
- token: null,
812
- line: this.yylineno
813
- });
814
- return this;
815
- }, "reject"),
816
- less: /* @__PURE__ */ e(function(e) {
817
- this.unput(this.match.slice(e));
818
- }, "less"),
819
- pastInput: /* @__PURE__ */ e(function() {
820
- var e = this.matched.substr(0, this.matched.length - this.match.length);
821
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
822
- }, "pastInput"),
823
- upcomingInput: /* @__PURE__ */ e(function() {
824
- var e = this.match;
825
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
826
- }, "upcomingInput"),
827
- showPosition: /* @__PURE__ */ e(function() {
828
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
829
- return e + this.upcomingInput() + "\n" + t + "^";
830
- }, "showPosition"),
831
- test_match: /* @__PURE__ */ e(function(e, t) {
832
- var n, r, i;
833
- if (this.options.backtrack_lexer && (i = {
834
- yylineno: this.yylineno,
835
- yylloc: {
836
- first_line: this.yylloc.first_line,
837
- last_line: this.last_line,
838
- first_column: this.yylloc.first_column,
839
- last_column: this.yylloc.last_column
840
- },
841
- yytext: this.yytext,
842
- match: this.match,
843
- matches: this.matches,
844
- matched: this.matched,
845
- yyleng: this.yyleng,
846
- offset: this.offset,
847
- _more: this._more,
848
- _input: this._input,
849
- yy: this.yy,
850
- conditionStack: this.conditionStack.slice(0),
851
- done: this.done
852
- }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
853
- first_line: this.yylloc.last_line,
854
- last_line: this.yylineno + 1,
855
- first_column: this.yylloc.last_column,
856
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
857
- }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
858
- if (this._backtrack) {
859
- for (var a in i) this[a] = i[a];
860
- return !1;
861
- }
862
- return !1;
863
- }, "test_match"),
864
- next: /* @__PURE__ */ e(function() {
865
- if (this.done) return this.EOF;
866
- this._input || (this.done = !0);
867
- var e, t, n, r;
868
- this._more || (this.yytext = "", this.match = "");
869
- for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
870
- if (t = n, r = a, this.options.backtrack_lexer) {
871
- if (e = this.test_match(n, i[a]), e !== !1) return e;
872
- if (this._backtrack) {
873
- t = !1;
874
- continue;
875
- }
876
- return !1;
877
- }
878
- if (!this.options.flex) break;
879
- }
880
- return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
881
- text: "",
882
- token: null,
883
- line: this.yylineno
884
- });
885
- }, "next"),
886
- lex: /* @__PURE__ */ e(function() {
887
- return this.next() || this.lex();
888
- }, "lex"),
889
- begin: /* @__PURE__ */ e(function(e) {
890
- this.conditionStack.push(e);
891
- }, "begin"),
892
- popState: /* @__PURE__ */ e(function() {
893
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
894
- }, "popState"),
895
- _currentRules: /* @__PURE__ */ e(function() {
896
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
897
- }, "_currentRules"),
898
- topState: /* @__PURE__ */ e(function(e) {
899
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
900
- }, "topState"),
901
- pushState: /* @__PURE__ */ e(function(e) {
902
- this.begin(e);
903
- }, "pushState"),
904
- stateStackSize: /* @__PURE__ */ e(function() {
905
- return this.conditionStack.length;
906
- }, "stateStackSize"),
907
- options: { "case-insensitive": !0 },
908
- performAction: /* @__PURE__ */ e(function(e, t, n, r) {
909
- switch (n) {
910
- case 0: break;
911
- case 1: break;
912
- case 2: return this.popState(), 36;
913
- case 3: return this.popState(), 36;
914
- case 4: return 36;
915
- case 5: break;
916
- case 6: return 10;
917
- case 7: return this.pushState("acc_title"), 19;
918
- case 8: return this.popState(), "acc_title_value";
919
- case 9: return this.pushState("acc_descr"), 21;
920
- case 10: return this.popState(), "acc_descr_value";
921
- case 11:
922
- this.pushState("acc_descr_multiline");
923
- break;
924
- case 12:
925
- this.popState();
926
- break;
927
- case 13: return "acc_descr_multiline_value";
928
- case 14: return 5;
929
- case 15: return 5;
930
- case 16: return 8;
931
- case 17: return this.pushState("axis_data"), "X_AXIS";
932
- case 18: return this.pushState("axis_data"), "Y_AXIS";
933
- case 19: return this.pushState("axis_band_data"), 24;
934
- case 20: return 33;
935
- case 21: return this.pushState("data"), 16;
936
- case 22: return this.pushState("data"), 18;
937
- case 23: return this.pushState("data_inner"), 24;
938
- case 24: return 29;
939
- case 25: return this.popState(), 26;
940
- case 26:
941
- this.popState();
942
- break;
943
- case 27:
944
- this.pushState("string");
945
- break;
946
- case 28:
947
- this.popState();
948
- break;
949
- case 29: return "STR";
950
- case 30: return 24;
951
- case 31: return 26;
952
- case 32: return 44;
953
- case 33: return "COLON";
954
- case 34: return 45;
955
- case 35: return 28;
956
- case 36: return 46;
957
- case 37: return 47;
958
- case 38: return 49;
959
- case 39: return 51;
960
- case 40: return 48;
961
- case 41: return 42;
962
- case 42: return 50;
963
- case 43: return 43;
964
- case 44: break;
965
- case 45: return 37;
966
- case 46: return 38;
967
- }
968
- }, "anonymous"),
969
- rules: [
970
- /^(?:%%(?!\{)[^\n]*)/i,
971
- /^(?:[^\}]%%[^\n]*)/i,
972
- /^(?:(\r?\n))/i,
973
- /^(?:(\r?\n))/i,
974
- /^(?:[\n\r]+)/i,
975
- /^(?:%%[^\n]*)/i,
976
- /^(?:title\b)/i,
977
- /^(?:accTitle\s*:\s*)/i,
978
- /^(?:(?!\n||)*[^\n]*)/i,
979
- /^(?:accDescr\s*:\s*)/i,
980
- /^(?:(?!\n||)*[^\n]*)/i,
981
- /^(?:accDescr\s*\{\s*)/i,
982
- /^(?:\})/i,
983
- /^(?:[^\}]*)/i,
984
- /^(?:xychart-beta\b)/i,
985
- /^(?:xychart\b)/i,
986
- /^(?:(?:vertical|horizontal))/i,
987
- /^(?:x-axis\b)/i,
988
- /^(?:y-axis\b)/i,
989
- /^(?:\[)/i,
990
- /^(?:-->)/i,
991
- /^(?:line\b)/i,
992
- /^(?:bar\b)/i,
993
- /^(?:\[)/i,
994
- /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,
995
- /^(?:\])/i,
996
- /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,
997
- /^(?:["])/i,
998
- /^(?:["])/i,
999
- /^(?:[^"]*)/i,
1000
- /^(?:\[)/i,
1001
- /^(?:\])/i,
1002
- /^(?:[A-Za-z]+)/i,
1003
- /^(?::)/i,
1004
- /^(?:\+)/i,
1005
- /^(?:,)/i,
1006
- /^(?:=)/i,
1007
- /^(?:\*)/i,
1008
- /^(?:#)/i,
1009
- /^(?:[\_])/i,
1010
- /^(?:\.)/i,
1011
- /^(?:&)/i,
1012
- /^(?:-)/i,
1013
- /^(?:[0-9]+)/i,
1014
- /^(?:\s+)/i,
1015
- /^(?:;)/i,
1016
- /^(?:$)/i
1017
- ],
1018
- conditions: {
1019
- data_inner: {
1020
- rules: [
1021
- 0,
1022
- 1,
1023
- 4,
1024
- 5,
1025
- 6,
1026
- 7,
1027
- 9,
1028
- 11,
1029
- 14,
1030
- 15,
1031
- 16,
1032
- 17,
1033
- 18,
1034
- 21,
1035
- 22,
1036
- 24,
1037
- 25,
1038
- 26,
1039
- 27,
1040
- 30,
1041
- 31,
1042
- 32,
1043
- 33,
1044
- 34,
1045
- 35,
1046
- 36,
1047
- 37,
1048
- 38,
1049
- 39,
1050
- 40,
1051
- 41,
1052
- 42,
1053
- 43,
1054
- 44,
1055
- 45,
1056
- 46
1057
- ],
1058
- inclusive: !0
1059
- },
1060
- data: {
1061
- rules: [
1062
- 0,
1063
- 1,
1064
- 3,
1065
- 4,
1066
- 5,
1067
- 6,
1068
- 7,
1069
- 9,
1070
- 11,
1071
- 14,
1072
- 15,
1073
- 16,
1074
- 17,
1075
- 18,
1076
- 21,
1077
- 22,
1078
- 23,
1079
- 26,
1080
- 27,
1081
- 30,
1082
- 31,
1083
- 32,
1084
- 33,
1085
- 34,
1086
- 35,
1087
- 36,
1088
- 37,
1089
- 38,
1090
- 39,
1091
- 40,
1092
- 41,
1093
- 42,
1094
- 43,
1095
- 44,
1096
- 45,
1097
- 46
1098
- ],
1099
- inclusive: !0
1100
- },
1101
- axis_band_data: {
1102
- rules: [
1103
- 0,
1104
- 1,
1105
- 4,
1106
- 5,
1107
- 6,
1108
- 7,
1109
- 9,
1110
- 11,
1111
- 14,
1112
- 15,
1113
- 16,
1114
- 17,
1115
- 18,
1116
- 21,
1117
- 22,
1118
- 25,
1119
- 26,
1120
- 27,
1121
- 30,
1122
- 31,
1123
- 32,
1124
- 33,
1125
- 34,
1126
- 35,
1127
- 36,
1128
- 37,
1129
- 38,
1130
- 39,
1131
- 40,
1132
- 41,
1133
- 42,
1134
- 43,
1135
- 44,
1136
- 45,
1137
- 46
1138
- ],
1139
- inclusive: !0
1140
- },
1141
- axis_data: {
1142
- rules: [
1143
- 0,
1144
- 1,
1145
- 2,
1146
- 4,
1147
- 5,
1148
- 6,
1149
- 7,
1150
- 9,
1151
- 11,
1152
- 14,
1153
- 15,
1154
- 16,
1155
- 17,
1156
- 18,
1157
- 19,
1158
- 20,
1159
- 21,
1160
- 22,
1161
- 24,
1162
- 26,
1163
- 27,
1164
- 30,
1165
- 31,
1166
- 32,
1167
- 33,
1168
- 34,
1169
- 35,
1170
- 36,
1171
- 37,
1172
- 38,
1173
- 39,
1174
- 40,
1175
- 41,
1176
- 42,
1177
- 43,
1178
- 44,
1179
- 45,
1180
- 46
1181
- ],
1182
- inclusive: !0
1183
- },
1184
- acc_descr_multiline: {
1185
- rules: [12, 13],
1186
- inclusive: !1
1187
- },
1188
- acc_descr: {
1189
- rules: [10],
1190
- inclusive: !1
1191
- },
1192
- acc_title: {
1193
- rules: [8],
1194
- inclusive: !1
1195
- },
1196
- title: {
1197
- rules: [],
1198
- inclusive: !1
1199
- },
1200
- md_string: {
1201
- rules: [],
1202
- inclusive: !1
1203
- },
1204
- string: {
1205
- rules: [28, 29],
1206
- inclusive: !1
1207
- },
1208
- INITIAL: {
1209
- rules: [
1210
- 0,
1211
- 1,
1212
- 4,
1213
- 5,
1214
- 6,
1215
- 7,
1216
- 9,
1217
- 11,
1218
- 14,
1219
- 15,
1220
- 16,
1221
- 17,
1222
- 18,
1223
- 21,
1224
- 22,
1225
- 26,
1226
- 27,
1227
- 30,
1228
- 31,
1229
- 32,
1230
- 33,
1231
- 34,
1232
- 35,
1233
- 36,
1234
- 37,
1235
- 38,
1236
- 39,
1237
- 40,
1238
- 41,
1239
- 42,
1240
- 43,
1241
- 44,
1242
- 45,
1243
- 46
1244
- ],
1245
- inclusive: !0
1246
- }
1247
- }
1248
- };
1249
- })();
1250
- function j() {
1251
- this.yy = {};
1252
- }
1253
- return e(j, "Parser"), j.prototype = A, A.Parser = j, new j();
1254
- })();
1255
- C.parser = C;
1256
- var w = C;
1257
- function T(e) {
1258
- return e.type === "bar";
1259
- }
1260
- e(T, "isBarPlot");
1261
- function E(e) {
1262
- return e.type === "band";
1263
- }
1264
- e(E, "isBandAxisData");
1265
- function D(e) {
1266
- return e.type === "linear";
1267
- }
1268
- e(D, "isLinearAxisData");
1269
- var O = class {
1270
- constructor(e) {
1271
- this.parentGroup = e;
1272
- }
1273
- static {
1274
- e(this, "TextDimensionCalculatorWithFont");
1275
- }
1276
- getMaxDimension(e, t) {
1277
- if (!this.parentGroup) return {
1278
- width: e.reduce((e, t) => Math.max(t.length, e), 0) * t,
1279
- height: t
1280
- };
1281
- let n = {
1282
- width: 0,
1283
- height: 0
1284
- }, r = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", t);
1285
- for (let i of e) {
1286
- let e = y(r, 1, i), a = e ? e.width : i.length * t, o = e ? e.height : t;
1287
- n.width = Math.max(n.width, a), n.height = Math.max(n.height, o);
1288
- }
1289
- return r.remove(), n;
1290
- }
1291
- }, k = .7, A = .2, j = class {
1292
- constructor(e, t, n, r) {
1293
- this.axisConfig = e, this.title = t, this.textDimensionCalculator = n, this.axisThemeConfig = r, this.boundingRect = {
1294
- x: 0,
1295
- y: 0,
1296
- width: 0,
1297
- height: 0
1298
- }, 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 = {
1299
- x: 0,
1300
- y: 0,
1301
- width: 0,
1302
- height: 0
1303
- }, this.axisPosition = "left", this.normalizedLabelRotationInRad = this.axisConfig.labelRotation >= -90 && this.axisConfig.labelRotation <= 90 ? this.axisConfig.labelRotation * Math.PI / 180 : 0;
1304
- }
1305
- static {
1306
- e(this, "BaseAxis");
1307
- }
1308
- setRange(e) {
1309
- this.range = e, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = e[1] - e[0] : this.boundingRect.width = e[1] - e[0], this.recalculateScale();
1310
- }
1311
- getRange() {
1312
- return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
1313
- }
1314
- setAxisPosition(e) {
1315
- this.axisPosition = e, this.setRange(this.range);
1316
- }
1317
- getTickDistance() {
1318
- let e = this.getRange();
1319
- return Math.abs(e[0] - e[1]) / this.getTickValues().length;
1320
- }
1321
- getAxisOuterPadding() {
1322
- return this.outerPadding;
1323
- }
1324
- getLabelDimension() {
1325
- return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e) => e.toString()), this.axisConfig.labelFontSize);
1326
- }
1327
- recalculateOuterPaddingToDrawBar() {
1328
- k * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(k * this.getTickDistance() / 2)), this.recalculateScale();
1329
- }
1330
- calculateSpaceIfDrawnHorizontally(e) {
1331
- let t = e.height;
1332
- if (this.axisConfig.showAxisLine && t > this.axisConfig.axisLineWidth && (t -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1333
- let n = this.getLabelDimension(), r = A * e.width;
1334
- this.outerPadding = Math.min(n.width / 2, r);
1335
- let i = n.height;
1336
- this.axisPosition === "bottom" && this.normalizedLabelRotationInRad !== 0 && (i = Math.max(i, Math.abs(Math.sin(this.normalizedLabelRotationInRad) * n.width) + Math.abs(Math.cos(this.normalizedLabelRotationInRad) * n.height))), i += this.axisConfig.labelPadding * 2, this.labelTextHeight = n.height, i <= t && (t -= i, this.showLabel = !0);
1337
- }
1338
- if (this.axisConfig.showTick && t >= this.axisConfig.tickLength && (this.showTick = !0, t -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1339
- let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), n = e.height + this.axisConfig.titlePadding * 2;
1340
- this.titleTextHeight = e.height, n <= t && (t -= n, this.showTitle = !0);
1341
- }
1342
- this.boundingRect.width = e.width, this.boundingRect.height = e.height - t;
1343
- }
1344
- calculateSpaceIfDrawnVertical(e) {
1345
- let t = e.width;
1346
- if (this.axisConfig.showAxisLine && t > this.axisConfig.axisLineWidth && (t -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1347
- let n = this.getLabelDimension(), r = A * e.height;
1348
- this.outerPadding = Math.min(n.height / 2, r);
1349
- let i = n.width + this.axisConfig.labelPadding * 2;
1350
- i <= t && (t -= i, this.showLabel = !0);
1351
- }
1352
- if (this.axisConfig.showTick && t >= this.axisConfig.tickLength && (this.showTick = !0, t -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1353
- let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), n = e.height + this.axisConfig.titlePadding * 2;
1354
- this.titleTextHeight = e.height, n <= t && (t -= n, this.showTitle = !0);
1355
- }
1356
- this.boundingRect.width = e.width - t, this.boundingRect.height = e.height;
1357
- }
1358
- calculateSpace(e) {
1359
- return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(e) : this.calculateSpaceIfDrawnHorizontally(e), this.recalculateScale(), {
1360
- width: this.boundingRect.width,
1361
- height: this.boundingRect.height
1362
- };
1363
- }
1364
- setBoundingBoxXY(e) {
1365
- this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1366
- }
1367
- calculateOffsetByRotation(e) {
1368
- let t = this.normalizedLabelRotationInRad;
1369
- return t === 0 ? 0 : Math.sin(t) * this.getLabelDimension()[e] / 2;
1370
- }
1371
- getDrawableElementsForLeftAxis() {
1372
- let e = [];
1373
- if (this.showAxisLine) {
1374
- let t = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
1375
- e.push({
1376
- type: "path",
1377
- groupTexts: ["left-axis", "axisl-line"],
1378
- data: [{
1379
- path: `M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y + this.boundingRect.height} `,
1380
- strokeFill: this.axisThemeConfig.axisLineColor,
1381
- strokeWidth: this.axisConfig.axisLineWidth
1382
- }]
1383
- });
1384
- }
1385
- if (this.showLabel && e.push({
1386
- type: "text",
1387
- groupTexts: ["left-axis", "label"],
1388
- data: this.getTickValues().map((e) => ({
1389
- text: e.toString(),
1390
- 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),
1391
- y: this.getScaleValue(e),
1392
- fill: this.axisThemeConfig.labelColor,
1393
- fontSize: this.axisConfig.labelFontSize,
1394
- rotation: 0,
1395
- verticalPos: "middle",
1396
- horizontalPos: "right"
1397
- }))
1398
- }), this.showTick) {
1399
- let t = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1400
- e.push({
1401
- type: "path",
1402
- groupTexts: ["left-axis", "ticks"],
1403
- data: this.getTickValues().map((e) => ({
1404
- path: `M ${t},${this.getScaleValue(e)} L ${t - this.axisConfig.tickLength},${this.getScaleValue(e)}`,
1405
- strokeFill: this.axisThemeConfig.tickColor,
1406
- strokeWidth: this.axisConfig.tickWidth
1407
- }))
1408
- });
1409
- }
1410
- return this.showTitle && e.push({
1411
- type: "text",
1412
- groupTexts: ["left-axis", "title"],
1413
- data: [{
1414
- text: this.title,
1415
- x: this.boundingRect.x + this.axisConfig.titlePadding,
1416
- y: this.boundingRect.y + this.boundingRect.height / 2,
1417
- fill: this.axisThemeConfig.titleColor,
1418
- fontSize: this.axisConfig.titleFontSize,
1419
- rotation: 270,
1420
- verticalPos: "top",
1421
- horizontalPos: "center"
1422
- }]
1423
- }), e;
1424
- }
1425
- getDrawableElementsForBottomAxis() {
1426
- let e = [];
1427
- if (this.showAxisLine) {
1428
- let t = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
1429
- e.push({
1430
- type: "path",
1431
- groupTexts: ["bottom-axis", "axis-line"],
1432
- data: [{
1433
- path: `M ${this.boundingRect.x},${t} L ${this.boundingRect.x + this.boundingRect.width},${t}`,
1434
- strokeFill: this.axisThemeConfig.axisLineColor,
1435
- strokeWidth: this.axisConfig.axisLineWidth
1436
- }]
1437
- });
1438
- }
1439
- if (this.showLabel && e.push({
1440
- type: "text",
1441
- groupTexts: ["bottom-axis", "label"],
1442
- data: this.getTickValues().map((e) => ({
1443
- text: e.toString(),
1444
- x: this.getScaleValue(e) + this.calculateOffsetByRotation("height"),
1445
- y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0) + Math.abs(this.calculateOffsetByRotation("width")),
1446
- fill: this.axisThemeConfig.labelColor,
1447
- fontSize: this.axisConfig.labelFontSize,
1448
- rotation: this.normalizedLabelRotationInRad * 180 / Math.PI,
1449
- verticalPos: "top",
1450
- horizontalPos: "center"
1451
- }))
1452
- }), this.showTick) {
1453
- let t = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1454
- e.push({
1455
- type: "path",
1456
- groupTexts: ["bottom-axis", "ticks"],
1457
- data: this.getTickValues().map((e) => ({
1458
- path: `M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t + this.axisConfig.tickLength}`,
1459
- strokeFill: this.axisThemeConfig.tickColor,
1460
- strokeWidth: this.axisConfig.tickWidth
1461
- }))
1462
- });
1463
- }
1464
- return this.showTitle && e.push({
1465
- type: "text",
1466
- groupTexts: ["bottom-axis", "title"],
1467
- data: [{
1468
- text: this.title,
1469
- x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1470
- y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1471
- fill: this.axisThemeConfig.titleColor,
1472
- fontSize: this.axisConfig.titleFontSize,
1473
- rotation: 0,
1474
- verticalPos: "top",
1475
- horizontalPos: "center"
1476
- }]
1477
- }), e;
1478
- }
1479
- getDrawableElementsForTopAxis() {
1480
- let e = [];
1481
- if (this.showAxisLine) {
1482
- let t = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1483
- e.push({
1484
- type: "path",
1485
- groupTexts: ["top-axis", "axis-line"],
1486
- data: [{
1487
- path: `M ${this.boundingRect.x},${t} L ${this.boundingRect.x + this.boundingRect.width},${t}`,
1488
- strokeFill: this.axisThemeConfig.axisLineColor,
1489
- strokeWidth: this.axisConfig.axisLineWidth
1490
- }]
1491
- });
1492
- }
1493
- if (this.showLabel && e.push({
1494
- type: "text",
1495
- groupTexts: ["top-axis", "label"],
1496
- data: this.getTickValues().map((e) => ({
1497
- text: e.toString(),
1498
- x: this.getScaleValue(e),
1499
- y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1500
- fill: this.axisThemeConfig.labelColor,
1501
- fontSize: this.axisConfig.labelFontSize,
1502
- rotation: 0,
1503
- verticalPos: "top",
1504
- horizontalPos: "center"
1505
- }))
1506
- }), this.showTick) {
1507
- let t = this.boundingRect.y;
1508
- e.push({
1509
- type: "path",
1510
- groupTexts: ["top-axis", "ticks"],
1511
- data: this.getTickValues().map((e) => ({
1512
- path: `M ${this.getScaleValue(e)},${t + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(e)},${t + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
1513
- strokeFill: this.axisThemeConfig.tickColor,
1514
- strokeWidth: this.axisConfig.tickWidth
1515
- }))
1516
- });
1517
- }
1518
- return this.showTitle && e.push({
1519
- type: "text",
1520
- groupTexts: ["top-axis", "title"],
1521
- data: [{
1522
- text: this.title,
1523
- x: this.boundingRect.x + this.boundingRect.width / 2,
1524
- y: this.boundingRect.y + this.axisConfig.titlePadding,
1525
- fill: this.axisThemeConfig.titleColor,
1526
- fontSize: this.axisConfig.titleFontSize,
1527
- rotation: 0,
1528
- verticalPos: "top",
1529
- horizontalPos: "center"
1530
- }]
1531
- }), e;
1532
- }
1533
- getDrawableElements() {
1534
- if (this.axisPosition === "left") return this.getDrawableElementsForLeftAxis();
1535
- if (this.axisPosition === "right") throw Error("Drawing of right axis is not implemented");
1536
- return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
1537
- }
1538
- }, M = class extends j {
1539
- static {
1540
- e(this, "BandAxis");
1541
- }
1542
- constructor(e, t, n, r, i) {
1543
- super(e, r, i, t), this.categories = n, this.scale = S().domain(this.categories).range(this.getRange());
1544
- }
1545
- setRange(e) {
1546
- super.setRange(e);
1547
- }
1548
- recalculateScale() {
1549
- this.scale = S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5), t.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1550
- }
1551
- getTickValues() {
1552
- return this.categories;
1553
- }
1554
- getScaleValue(e) {
1555
- return this.scale(e) ?? this.getRange()[0];
1556
- }
1557
- }, ee = class extends j {
1558
- static {
1559
- e(this, "LinearAxis");
1560
- }
1561
- constructor(e, t, n, r, i) {
1562
- super(e, r, i, t), this.domain = n, this.scale = m().domain(this.domain).range(this.getRange());
1563
- }
1564
- getTickValues() {
1565
- return this.scale.ticks();
1566
- }
1567
- recalculateScale() {
1568
- let e = [...this.domain];
1569
- this.axisPosition === "left" && e.reverse(), this.scale = m().domain(e).range(this.getRange());
1570
- }
1571
- getScaleValue(e) {
1572
- return this.scale(e);
1573
- }
1574
- };
1575
- function N(e, t, n, r) {
1576
- let i = new O(r);
1577
- return E(e) ? new M(t, n, e.categories, e.title, i) : new ee(t, n, [e.min, e.max], e.title, i);
1578
- }
1579
- e(N, "getAxis");
1580
- var te = class {
1581
- constructor(e, t, n, r) {
1582
- this.textDimensionCalculator = e, this.chartConfig = t, this.chartData = n, this.chartThemeConfig = r, this.boundingRect = {
1583
- x: 0,
1584
- y: 0,
1585
- width: 0,
1586
- height: 0
1587
- }, this.showChartTitle = !1;
1588
- }
1589
- static {
1590
- e(this, "ChartTitle");
1591
- }
1592
- setBoundingBoxXY(e) {
1593
- this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1594
- }
1595
- calculateSpace(e) {
1596
- let t = this.textDimensionCalculator.getMaxDimension([this.chartData.title], this.chartConfig.titleFontSize), n = Math.max(t.width, e.width), r = t.height + 2 * this.chartConfig.titlePadding;
1597
- return t.width <= n && t.height <= r && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = n, this.boundingRect.height = r, this.showChartTitle = !0), {
1598
- width: this.boundingRect.width,
1599
- height: this.boundingRect.height
1600
- };
1601
- }
1602
- getDrawableElements() {
1603
- let e = [];
1604
- return this.showChartTitle && e.push({
1605
- groupTexts: ["chart-title"],
1606
- type: "text",
1607
- data: [{
1608
- fontSize: this.chartConfig.titleFontSize,
1609
- text: this.chartData.title,
1610
- verticalPos: "middle",
1611
- horizontalPos: "center",
1612
- x: this.boundingRect.x + this.boundingRect.width / 2,
1613
- y: this.boundingRect.y + this.boundingRect.height / 2,
1614
- fill: this.chartThemeConfig.titleColor,
1615
- rotation: 0
1616
- }]
1617
- }), e;
1618
- }
1619
- };
1620
- function ne(e, t, n, r) {
1621
- return new te(new O(r), e, t, n);
1622
- }
1623
- e(ne, "getChartTitleComponent");
1624
- var re = class {
1625
- constructor(e, t, n, r, i) {
1626
- this.plotData = e, this.xAxis = t, this.yAxis = n, this.orientation = r, this.plotIndex = i;
1627
- }
1628
- static {
1629
- e(this, "LinePlot");
1630
- }
1631
- getDrawableElement() {
1632
- let e = this.plotData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), t;
1633
- if (t = this.orientation === "horizontal" ? v().y((e) => e[0]).x((e) => e[1])(e) : v().x((e) => e[0]).y((e) => e[1])(e), !t) return [];
1634
- let n = [{
1635
- groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1636
- type: "path",
1637
- data: [{
1638
- path: t,
1639
- strokeFill: this.plotData.strokeFill,
1640
- strokeWidth: this.plotData.strokeWidth
1641
- }]
1642
- }];
1643
- if (this.plotData.pointLabels && this.plotData.pointLabels.length > 0) {
1644
- let t = [];
1645
- for (let [n, [r, i]] of e.entries()) {
1646
- let e = this.plotData.pointLabels[n];
1647
- e && (this.orientation === "horizontal" ? t.push({
1648
- x: i + 10,
1649
- y: r,
1650
- text: e,
1651
- fill: this.plotData.strokeFill,
1652
- verticalPos: "middle",
1653
- horizontalPos: "left",
1654
- fontSize: 12,
1655
- rotation: 0
1656
- }) : t.push({
1657
- x: r,
1658
- y: i - 10,
1659
- text: e,
1660
- fill: this.plotData.strokeFill,
1661
- verticalPos: "middle",
1662
- horizontalPos: "center",
1663
- fontSize: 12,
1664
- rotation: 0
1665
- }));
1666
- }
1667
- t.length > 0 && n.push({
1668
- groupTexts: [
1669
- "plot",
1670
- `line-plot-${this.plotIndex}`,
1671
- "labels"
1672
- ],
1673
- type: "text",
1674
- data: t
1675
- });
1676
- }
1677
- return n;
1678
- }
1679
- }, ie = class {
1680
- constructor(e, t, n, r, i, a) {
1681
- this.barData = e, this.boundingRect = t, this.xAxis = n, this.yAxis = r, this.orientation = i, this.plotIndex = a;
1682
- }
1683
- static {
1684
- e(this, "BarPlot");
1685
- }
1686
- getDrawableElement() {
1687
- let e = this.barData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), t = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * .95, n = t / 2;
1688
- return this.orientation === "horizontal" ? [{
1689
- groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1690
- type: "rect",
1691
- data: e.map((e) => ({
1692
- x: this.boundingRect.x,
1693
- y: e[0] - n,
1694
- height: t,
1695
- width: e[1] - this.boundingRect.x,
1696
- fill: this.barData.fill,
1697
- strokeWidth: 0,
1698
- strokeFill: this.barData.fill
1699
- }))
1700
- }] : [{
1701
- groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1702
- type: "rect",
1703
- data: e.map((e) => ({
1704
- x: e[0] - n,
1705
- y: e[1],
1706
- width: t,
1707
- height: this.boundingRect.y + this.boundingRect.height - e[1],
1708
- fill: this.barData.fill,
1709
- strokeWidth: 0,
1710
- strokeFill: this.barData.fill
1711
- }))
1712
- }];
1713
- }
1714
- }, ae = class {
1715
- constructor(e, t, n) {
1716
- this.chartConfig = e, this.chartData = t, this.chartThemeConfig = n, this.boundingRect = {
1717
- x: 0,
1718
- y: 0,
1719
- width: 0,
1720
- height: 0
1721
- };
1722
- }
1723
- static {
1724
- e(this, "BasePlot");
1725
- }
1726
- setAxes(e, t) {
1727
- this.xAxis = e, this.yAxis = t;
1728
- }
1729
- setBoundingBoxXY(e) {
1730
- this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1731
- }
1732
- calculateSpace(e) {
1733
- return this.boundingRect.width = e.width, this.boundingRect.height = e.height, {
1734
- width: this.boundingRect.width,
1735
- height: this.boundingRect.height
1736
- };
1737
- }
1738
- getDrawableElements() {
1739
- if (!(this.xAxis && this.yAxis)) throw Error("Axes must be passed to render Plots");
1740
- let e = [];
1741
- for (let [t, n] of this.chartData.plots.entries()) switch (n.type) {
1742
- case "line":
1743
- {
1744
- let r = new re(n, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, t);
1745
- e.push(...r.getDrawableElement());
1746
- }
1747
- break;
1748
- case "bar": {
1749
- let r = new ie(n, this.boundingRect, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, t);
1750
- e.push(...r.getDrawableElement());
1751
- }
1752
- }
1753
- return e;
1754
- }
1755
- };
1756
- function P(e, t, n) {
1757
- return new ae(e, t, n);
1758
- }
1759
- e(P, "getPlotComponent");
1760
- var oe = class {
1761
- constructor(e, t, n, r) {
1762
- this.chartConfig = e, this.chartData = t, this.componentStore = {
1763
- title: ne(e, t, n, r),
1764
- plot: P(e, t, n),
1765
- xAxis: N(t.xAxis, e.xAxis, {
1766
- titleColor: n.xAxisTitleColor,
1767
- labelColor: n.xAxisLabelColor,
1768
- tickColor: n.xAxisTickColor,
1769
- axisLineColor: n.xAxisLineColor
1770
- }, r),
1771
- yAxis: N(t.yAxis, e.yAxis, {
1772
- titleColor: n.yAxisTitleColor,
1773
- labelColor: n.yAxisLabelColor,
1774
- tickColor: n.yAxisTickColor,
1775
- axisLineColor: n.yAxisLineColor
1776
- }, r)
1777
- };
1778
- }
1779
- static {
1780
- e(this, "Orchestrator");
1781
- }
1782
- calculateVerticalSpace() {
1783
- let e = this.chartConfig.width, t = this.chartConfig.height, n = 0, r = 0, i = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), a = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), o = this.componentStore.plot.calculateSpace({
1784
- width: i,
1785
- height: a
1786
- });
1787
- e -= o.width, t -= o.height, o = this.componentStore.title.calculateSpace({
1788
- width: this.chartConfig.width,
1789
- height: t
1790
- }), r = o.height, t -= o.height, this.componentStore.xAxis.setAxisPosition("bottom"), o = this.componentStore.xAxis.calculateSpace({
1791
- width: e,
1792
- height: t
1793
- }), t -= o.height, this.componentStore.yAxis.setAxisPosition("left"), o = this.componentStore.yAxis.calculateSpace({
1794
- width: e,
1795
- height: t
1796
- }), n = o.width, e -= o.width, e > 0 && (i += e, e = 0), t > 0 && (a += t, t = 0), this.componentStore.plot.calculateSpace({
1797
- width: i,
1798
- height: a
1799
- }), this.componentStore.plot.setBoundingBoxXY({
1800
- x: n,
1801
- y: r
1802
- }), this.componentStore.xAxis.setRange([n, n + i]), this.componentStore.xAxis.setBoundingBoxXY({
1803
- x: n,
1804
- y: r + a
1805
- }), this.componentStore.yAxis.setRange([r, r + a]), this.componentStore.yAxis.setBoundingBoxXY({
1806
- x: 0,
1807
- y: r
1808
- }), this.chartData.plots.some((e) => T(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1809
- }
1810
- calculateHorizontalSpace() {
1811
- let e = this.chartConfig.width, t = this.chartConfig.height, n = 0, r = 0, i = 0, a = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), s = this.componentStore.plot.calculateSpace({
1812
- width: a,
1813
- height: o
1814
- });
1815
- e -= s.width, t -= s.height, s = this.componentStore.title.calculateSpace({
1816
- width: this.chartConfig.width,
1817
- height: t
1818
- }), n = s.height, t -= s.height, this.componentStore.xAxis.setAxisPosition("left"), s = this.componentStore.xAxis.calculateSpace({
1819
- width: e,
1820
- height: t
1821
- }), e -= s.width, r = s.width, this.componentStore.yAxis.setAxisPosition("top"), s = this.componentStore.yAxis.calculateSpace({
1822
- width: e,
1823
- height: t
1824
- }), t -= s.height, i = n + s.height, e > 0 && (a += e, e = 0), t > 0 && (o += t, t = 0), this.componentStore.plot.calculateSpace({
1825
- width: a,
1826
- height: o
1827
- }), this.componentStore.plot.setBoundingBoxXY({
1828
- x: r,
1829
- y: i
1830
- }), this.componentStore.yAxis.setRange([r, r + a]), this.componentStore.yAxis.setBoundingBoxXY({
1831
- x: r,
1832
- y: n
1833
- }), this.componentStore.xAxis.setRange([i, i + o]), this.componentStore.xAxis.setBoundingBoxXY({
1834
- x: 0,
1835
- y: i
1836
- }), this.chartData.plots.some((e) => T(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1837
- }
1838
- calculateSpace() {
1839
- this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1840
- }
1841
- getDrawableElement() {
1842
- this.calculateSpace();
1843
- let e = [];
1844
- this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1845
- for (let t of Object.values(this.componentStore)) e.push(...t.getDrawableElements());
1846
- return e;
1847
- }
1848
- }, se = class {
1849
- static {
1850
- e(this, "XYChartBuilder");
1851
- }
1852
- static build(e, t, n, r) {
1853
- return new oe(e, t, n, r).getDrawableElement();
1854
- }
1855
- }, F = 0, I, L = W(), R = U(), z = G(), B = R.plotColorPalette.split(",").map((e) => e.trim()), V = !1, H = !1;
1856
- function U() {
1857
- let e = n(), t = s();
1858
- return _(e.xyChart, t.themeVariables.xyChart);
1859
- }
1860
- e(U, "getChartDefaultThemeConfig");
1861
- function W() {
1862
- let e = s();
1863
- return _(l.xyChart, e.xyChart);
1864
- }
1865
- e(W, "getChartDefaultConfig");
1866
- function G() {
1867
- return {
1868
- yAxis: {
1869
- type: "linear",
1870
- title: "",
1871
- min: Infinity,
1872
- max: -Infinity
1873
- },
1874
- xAxis: {
1875
- type: "band",
1876
- title: "",
1877
- categories: []
1878
- },
1879
- title: "",
1880
- plots: []
1881
- };
1882
- }
1883
- e(G, "getChartDefaultData");
1884
- function K(e) {
1885
- let t = s();
1886
- return p(e.trim(), t);
1887
- }
1888
- e(K, "textSanitizer");
1889
- function q(e) {
1890
- I = e;
1891
- }
1892
- e(q, "setTmpSVGG");
1893
- function J(e) {
1894
- e === "horizontal" ? L.chartOrientation = "horizontal" : L.chartOrientation = "vertical";
1895
- }
1896
- e(J, "setOrientation");
1897
- function Y(e) {
1898
- z.xAxis.title = K(e.text);
1899
- }
1900
- e(Y, "setXAxisTitle");
1901
- function X(e, t) {
1902
- z.xAxis = {
1903
- type: "linear",
1904
- title: z.xAxis.title,
1905
- min: e,
1906
- max: t
1907
- }, V = !0;
1908
- }
1909
- e(X, "setXAxisRangeData");
1910
- function ce(e) {
1911
- z.xAxis = {
1912
- type: "band",
1913
- title: z.xAxis.title,
1914
- categories: e.map((e) => K(e.text))
1915
- }, V = !0;
1916
- }
1917
- e(ce, "setXAxisBand");
1918
- function le(e) {
1919
- z.yAxis.title = K(e.text);
1920
- }
1921
- e(le, "setYAxisTitle");
1922
- function ue(e, t) {
1923
- z.yAxis = {
1924
- type: "linear",
1925
- title: z.yAxis.title,
1926
- min: e,
1927
- max: t
1928
- }, H = !0;
1929
- }
1930
- e(ue, "setYAxisRangeData");
1931
- function de(e) {
1932
- let t = Math.min(...e), n = Math.max(...e), r = D(z.yAxis) ? z.yAxis.min : Infinity, i = D(z.yAxis) ? z.yAxis.max : -Infinity;
1933
- z.yAxis = {
1934
- type: "linear",
1935
- title: z.yAxis.title,
1936
- min: Math.min(r, t),
1937
- max: Math.max(i, n)
1938
- };
1939
- }
1940
- e(de, "setYAxisRangeFromPlotData");
1941
- function Z(e) {
1942
- let t = [];
1943
- if (e.length === 0) return t;
1944
- if (!V) {
1945
- let t = D(z.xAxis) ? z.xAxis.min : Infinity, n = D(z.xAxis) ? z.xAxis.max : -Infinity;
1946
- X(Math.min(t, 1), Math.max(n, e.length));
1947
- }
1948
- if (E(z.xAxis) && e.length > z.xAxis.categories.length && (e = e.slice(0, z.xAxis.categories.length)), H || de(e), E(z.xAxis) && (t = z.xAxis.categories.map((t, n) => [t, e[n]])), D(z.xAxis)) {
1949
- let n = z.xAxis.min, r = z.xAxis.max;
1950
- if (e.length === 1) t = [[`${n}`, e[0]]];
1951
- else {
1952
- let i = (r - n) / (e.length - 1);
1953
- t = e.map((e, t) => [`${n + t * i}`, e]);
1954
- }
1955
- }
1956
- return t;
1957
- }
1958
- e(Z, "transformDataWithoutCategory");
1959
- function Q(e) {
1960
- return B[e === 0 ? 0 : e % B.length];
1961
- }
1962
- e(Q, "getPlotColorFromPalette");
1963
- function fe(e, t) {
1964
- let n = t.map((e) => e.value), r = t.map((e) => e.label ? K(e.label) : ""), i = Z(n), a = r.some((e) => e !== "");
1965
- z.plots.push({
1966
- type: "line",
1967
- strokeFill: Q(F),
1968
- strokeWidth: 2,
1969
- data: i,
1970
- ...a ? { pointLabels: r } : {}
1971
- }), F++;
1972
- }
1973
- e(fe, "setLineData");
1974
- function pe(e, t) {
1975
- let n = Z(t.map((e) => e.value));
1976
- z.plots.push({
1977
- type: "bar",
1978
- fill: Q(F),
1979
- data: n
1980
- }), F++;
1981
- }
1982
- e(pe, "setBarData");
1983
- function me() {
1984
- if (z.plots.length === 0) throw Error("No Plot to render, please provide a plot with some data");
1985
- return z.title = d(), se.build(L, z, R, I);
1986
- }
1987
- e(me, "getDrawableElem");
1988
- function he() {
1989
- return R;
1990
- }
1991
- e(he, "getChartThemeConfig");
1992
- function ge() {
1993
- return L;
1994
- }
1995
- e(ge, "getChartConfig");
1996
- function $() {
1997
- return z;
1998
- }
1999
- e($, "getXYChartData");
2000
- var _e = {
2001
- parser: w,
2002
- db: {
2003
- getDrawableElem: me,
2004
- clear: /* @__PURE__ */ e(function() {
2005
- o(), F = 0, L = W(), z = G(), R = U(), B = R.plotColorPalette.split(",").map((e) => e.trim()), V = !1, H = !1;
2006
- }, "clear"),
2007
- setAccTitle: a,
2008
- getAccTitle: f,
2009
- setDiagramTitle: i,
2010
- getDiagramTitle: d,
2011
- getAccDescription: u,
2012
- setAccDescription: r,
2013
- setOrientation: J,
2014
- setXAxisTitle: Y,
2015
- setXAxisRangeData: X,
2016
- setXAxisBand: ce,
2017
- setYAxisTitle: le,
2018
- setYAxisRangeData: ue,
2019
- setLineData: fe,
2020
- setBarData: pe,
2021
- setTmpSVGG: q,
2022
- getChartThemeConfig: he,
2023
- getChartConfig: ge,
2024
- getXYChartData: $
2025
- },
2026
- renderer: { draw: /* @__PURE__ */ e((n, r, i, a) => {
2027
- let o = a.db, s = o.getChartThemeConfig(), l = o.getChartConfig(), u = o.getXYChartData().plots[0].data.map((e) => e[1]);
2028
- function d(e) {
2029
- return e === "top" ? "text-before-edge" : "middle";
2030
- }
2031
- e(d, "getDominantBaseLine");
2032
- function f(e) {
2033
- return e === "left" ? "start" : e === "right" ? "end" : "middle";
2034
- }
2035
- e(f, "getTextAnchor");
2036
- function p(e) {
2037
- return `translate(${e.x}, ${e.y}) rotate(${e.rotation || 0})`;
2038
- }
2039
- e(p, "getTextTransformation"), t.debug("Rendering xychart chart\n" + n);
2040
- let m = b(r), h = m.append("g").attr("class", "main"), g = h.append("rect").attr("width", l.width).attr("height", l.height).attr("class", "background");
2041
- c(m, l.height, l.width, !0), m.attr("viewBox", `0 0 ${l.width} ${l.height}`), g.attr("fill", s.backgroundColor), o.setTmpSVGG(m.append("g").attr("class", "mermaid-tmp-group"));
2042
- let _ = o.getDrawableElem(), v = {};
2043
- function y(e) {
2044
- let t = h, n = "";
2045
- for (let [r] of e.entries()) {
2046
- let i = h;
2047
- r > 0 && v[n] && (i = v[n]), n += e[r], t = v[n], t ||= v[n] = i.append("g").attr("class", e[r]);
2048
- }
2049
- return t;
2050
- }
2051
- e(y, "getGroup");
2052
- for (let t of _) {
2053
- if (t.data.length === 0) continue;
2054
- let n = y(t.groupTexts);
2055
- switch (t.type) {
2056
- case "rect":
2057
- if (n.selectAll("rect").data(t.data).enter().append("rect").attr("x", (e) => e.x).attr("y", (e) => e.y).attr("width", (e) => e.width).attr("height", (e) => e.height).attr("fill", (e) => e.fill).attr("stroke", (e) => e.strokeFill).attr("stroke-width", (e) => e.strokeWidth), l.showDataLabel) {
2058
- let r = l.showDataLabelOutsideBar;
2059
- if (l.chartOrientation === "horizontal") {
2060
- let i = function(e, t) {
2061
- let { data: n, label: r } = e;
2062
- return t * r.length * a <= n.width - o;
2063
- };
2064
- e(i, "fitsHorizontally");
2065
- let a = .7, o = 10, c = t.data.map((e, t) => ({
2066
- data: e,
2067
- label: u[t].toString()
2068
- })).filter((e) => e.data.width > 0 && e.data.height > 0), l = c.map((e) => {
2069
- let { data: t } = e, n = t.height * .7;
2070
- for (; !i(e, n) && n > 0;) --n;
2071
- return n;
2072
- }), d = Math.floor(Math.min(...l)), f = /* @__PURE__ */ e((e) => r ? e.data.x + e.data.width + 10 : e.data.x + e.data.width - 10, "determineLabelXPosition");
2073
- n.selectAll("text").data(c).enter().append("text").attr("x", f).attr("y", (e) => e.data.y + e.data.height / 2).attr("text-anchor", r ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", s.dataLabelColor).attr("font-size", `${d}px`).text((e) => e.label);
2074
- } else {
2075
- let i = function(e, t, n) {
2076
- let { data: r, label: i } = e, a = t * i.length * .7, o = r.x + r.width / 2, s = o - a / 2, c = o + a / 2, l = s >= r.x && c <= r.x + r.width, u = r.y + n + t <= r.y + r.height;
2077
- return l && u;
2078
- };
2079
- e(i, "fitsInBar");
2080
- let a = t.data.map((e, t) => ({
2081
- data: e,
2082
- label: u[t].toString()
2083
- })).filter((e) => e.data.width > 0 && e.data.height > 0), o = a.map((e) => {
2084
- let { data: t, label: n } = e, r = t.width / (n.length * .7);
2085
- for (; !i(e, r, 10) && r > 0;) --r;
2086
- return r;
2087
- }), c = Math.floor(Math.min(...o)), l = /* @__PURE__ */ e((e) => r ? e.data.y - 10 : e.data.y + 10, "determineLabelYPosition");
2088
- n.selectAll("text").data(a).enter().append("text").attr("x", (e) => e.data.x + e.data.width / 2).attr("y", l).attr("text-anchor", "middle").attr("dominant-baseline", r ? "auto" : "hanging").attr("fill", s.dataLabelColor).attr("font-size", `${c}px`).text((e) => e.label);
2089
- }
2090
- }
2091
- break;
2092
- case "text":
2093
- n.selectAll("text").data(t.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (e) => e.fill).attr("font-size", (e) => e.fontSize).attr("dominant-baseline", (e) => d(e.verticalPos)).attr("text-anchor", (e) => f(e.horizontalPos)).attr("transform", (e) => p(e)).text((e) => e.text);
2094
- break;
2095
- case "path": n.selectAll("path").data(t.data).enter().append("path").attr("d", (e) => e.path).attr("fill", (e) => e.fill ? e.fill : "none").attr("stroke", (e) => e.strokeFill).attr("stroke-width", (e) => e.strokeWidth);
2096
- }
2097
- }
2098
- }, "draw") }
2099
- };
2100
- //#endregion
2101
- export { _e as diagram };