@kong-ui-public/documentation 0.8.27-pr.2132.c7fba69a4.0 → 0.8.27

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 (154) hide show
  1. package/dist/_basePickBy-DF_KwdVi-HVXnmpaQ.js +151 -0
  2. package/dist/_baseUniq-DefQzZRT-CTix3bMY.js +614 -0
  3. package/dist/arc-B4xWw-B6-BGnuysbe.js +83 -0
  4. package/dist/architecture-I3QFYML2-7TNhn42L-52ENK4nk.js +5 -0
  5. package/dist/architectureDiagram-UYN6MBPD-Bg70hFZ--BirbHF75.js +4592 -0
  6. package/dist/astro-Uf8_VxKJ-CZxoSljj.js +16 -0
  7. package/dist/blockDiagram-ZHA2E4KO-Ylh05M-x-AVJfewxx.js +2247 -0
  8. package/dist/c-DASdrs7p-DASdrs7p.js +6 -0
  9. package/dist/c4Diagram-6F5ED5ID-BA0B_CmS-WdUKqC7Z.js +1581 -0
  10. package/dist/channel-B5uWur4x-BHu9WG2d.js +5 -0
  11. package/dist/chunk-5HRBRIJM-B7MbirM8-YDLjZbXN.js +24 -0
  12. package/dist/chunk-7U56Z5CX-CfNu7Hr2-BQzILIp1.js +1213 -0
  13. package/dist/chunk-ASOPGD6M-CwvgmaRl-BZAjlsEd.js +64 -0
  14. package/dist/chunk-KFBOBJHC-BB675Bua-GRhe6aGs.js +15 -0
  15. package/dist/chunk-T2TOU4HS-BgV1wucS-5Sa82KgW.js +1301 -0
  16. package/dist/chunk-TMUBEWPD-C22TGOO0-Bl2u--DY.js +9 -0
  17. package/dist/classDiagram-LNE6IOMH-D5SiSVyM-BbV9LB8E.js +14 -0
  18. package/dist/classDiagram-v2-MQ7JQ4JX-D5SiSVyM-BbV9LB8E.js +14 -0
  19. package/dist/clone-CmU1hwye-Lu5-ol5h.js +8 -0
  20. package/dist/csharp-CYWRhZ2R-CYWRhZ2R.js +6 -0
  21. package/dist/css-D1aVdRIU-D1aVdRIU.js +6 -0
  22. package/dist/csv-DvCncUGQ-Tno401i9.js +6 -0
  23. package/dist/cytoscape.esm-DAyNQ0qu-B7WxGuVh.js +16110 -0
  24. package/dist/dagre-4EVJKHTY-DMTVcQfE-C1Tr0EYY.js +447 -0
  25. package/dist/diagram-QW4FP2JN-jc61JuWr-DOMFELfS.js +126 -0
  26. package/dist/diff-XmNrvgM1-XmNrvgM1.js +6 -0
  27. package/dist/docker-DWH2onkn-DWH2onkn.js +6 -0
  28. package/dist/documentation.es.js +7 -0
  29. package/dist/documentation.umd.js +2404 -0
  30. package/dist/erDiagram-6RL3IURR-1byskxwI-B-wzYh8R.js +937 -0
  31. package/dist/flowDiagram-7ASYPVHJ-B3phEI8o-CVXSVDmh.js +1484 -0
  32. package/dist/ganttDiagram-NTVNEXSI-vYnO_T5c-Ccxkb7aQ.js +2491 -0
  33. package/dist/git-commit-BspYIY3P-VkbIfR3L.js +8 -0
  34. package/dist/git-rebase--zLBTjUa-DEW2tfKx.js +8 -0
  35. package/dist/gitGraph-YCYPL57B-DPx67Iu5-BPrLSH0g.js +5 -0
  36. package/dist/gitGraphDiagram-NRZ2UAAF-BHxB7Gjs-CeRxz6oW.js +712 -0
  37. package/dist/go-BErP6iv1-BErP6iv1.js +6 -0
  38. package/dist/graph-_eClejaU-DigE4Bf5.js +247 -0
  39. package/dist/graphql-DWpQF4JI-C-3VJmtp.js +14 -0
  40. package/dist/haml-CMN0hQaL-BV5BsZTy.js +10 -0
  41. package/dist/handlebars-Cc-7fXX5-B9YgDKzT.js +14 -0
  42. package/dist/haskell-CtlGos0K-CtlGos0K.js +6 -0
  43. package/dist/html-B0P_v3yU-BojM9zZg.js +10 -0
  44. package/dist/html-derivative-BJFFAxYV-iD6NAoKm.js +8 -0
  45. package/dist/http-Dcjm_K1m-1LFSbOE1.js +14 -0
  46. package/dist/index-B_RqyDIa.js +37033 -0
  47. package/dist/info-46DW6VJ7-DeIQKKyY-CVPexu5P.js +5 -0
  48. package/dist/infoDiagram-A4XQUW5V-Cx0WE_JZ-B_t8JIcX.js +22 -0
  49. package/dist/ini-BUcvsX-U-BUcvsX-U.js +6 -0
  50. package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
  51. package/dist/java-B7odJ7Ap-B7odJ7Ap.js +6 -0
  52. package/dist/javascript-fa8UlHZE-fa8UlHZE.js +6 -0
  53. package/dist/journeyDiagram-G5WM74LC-CUWL5R5G-DWlpHybW.js +810 -0
  54. package/dist/json-71t8ZF9g-71t8ZF9g.js +6 -0
  55. package/dist/json5-Z7F6rA6a-Z7F6rA6a.js +6 -0
  56. package/dist/jsonc-Dphhs4m2-Dphhs4m2.js +6 -0
  57. package/dist/jsonl-D9jj92Gg-D9jj92Gg.js +6 -0
  58. package/dist/jsx-Bkesy5tT-Bkesy5tT.js +6 -0
  59. package/dist/kanban-definition-QRCXZQQD-r5CdvT2h-BUkOeUnm.js +718 -0
  60. package/dist/katex-Qk2jHgyB-CF_fuFJb.js +11637 -0
  61. package/dist/kotlin-DCgZY7Ii-DCgZY7Ii.js +6 -0
  62. package/dist/latex-CZXk8SiZ-DbjDPp_f.js +11 -0
  63. package/dist/layout-DfjmtgNY-Bw6LFOXt.js +1321 -0
  64. package/dist/less-DQA4v-Nm-DQA4v-Nm.js +6 -0
  65. package/dist/linear-BGmbGdcc-C--Nxp9Q.js +423 -0
  66. package/dist/liquid-CvufO3kO-D90bBAdm.js +14 -0
  67. package/dist/lua-BVfhNLDr-DAa90qLN.js +8 -0
  68. package/dist/make-BjuHP00g-BjuHP00g.js +6 -0
  69. package/dist/markdown-B6guhLWd-B6guhLWd.js +6 -0
  70. package/dist/material-theme-lighter-BUBw43Yz-BUBw43Yz.js +4 -0
  71. package/dist/material-theme-palenight-C1RVm8K1-C1RVm8K1.js +4 -0
  72. package/dist/mdc-Bq810vct-Dr8CpN8f.js +12 -0
  73. package/dist/mdx-DIoECIFU-DIoECIFU.js +6 -0
  74. package/dist/mermaid-BZ7WHNIe-BZ7WHNIe.js +6 -0
  75. package/dist/mermaid-parser.core-DxgZuQQq-uP-grJig.js +12400 -0
  76. package/dist/mindmap-definition-GWI6TPTV-DX5GL05M-B8Eu6UCe.js +3219 -0
  77. package/dist/nginx-Can2eAjw-DKMoypYC.js +8 -0
  78. package/dist/objective-c-BGg9R27G-BGg9R27G.js +6 -0
  79. package/dist/ordinal-DfAQgscy-BEJTu10r.js +61 -0
  80. package/dist/packet-W2GHVCYJ-CI_-E3C--D1lo2o0i.js +5 -0
  81. package/dist/pascal-l2bqd7Dz-l2bqd7Dz.js +6 -0
  82. package/dist/perl-DaMQyPwp-Cxx4wmV7.js +16 -0
  83. package/dist/php-BL3EfPBi-BZu5YwDX.js +18 -0
  84. package/dist/pie-BEWT4RHE-B52QOymI-BoBX6ZnD.js +5 -0
  85. package/dist/pieDiagram-YF2LJOPJ-IHpbN7M9-BBPOh3m7.js +161 -0
  86. package/dist/plsql-oVq_K_wH-oVq_K_wH.js +6 -0
  87. package/dist/postcss-BZ3MNRIJ-BZ3MNRIJ.js +6 -0
  88. package/dist/powershell-Diwyv8Eh-Diwyv8Eh.js +6 -0
  89. package/dist/proto-o9HLmF90-o9HLmF90.js +6 -0
  90. package/dist/pug-HKe4Luo3-BYb0El_4.js +12 -0
  91. package/dist/python-xYxLFJY--xYxLFJY-.js +6 -0
  92. package/dist/quadrantDiagram-OS5C2QUG-DyfTAjs0-CvYOplDG.js +1024 -0
  93. package/dist/r-F-9I-ITZ-F-9I-ITZ.js +6 -0
  94. package/dist/reg-CMUdAgIP-CMUdAgIP.js +6 -0
  95. package/dist/requirementDiagram-MIRIMTAZ-DpFia6HM-BNS6fGqi.js +768 -0
  96. package/dist/rst-B8JEEtLI-Dyxh6LOj.js +22 -0
  97. package/dist/ruby-FDlfLkNa-nf7VLvCK.js +50 -0
  98. package/dist/rust-Pc7DCsZD-Pc7DCsZD.js +6 -0
  99. package/dist/sankeyDiagram-Y46BX6SQ-a6p3ZaX0-Cwasp0IA.js +805 -0
  100. package/dist/sass-iCyS6eP9-iCyS6eP9.js +6 -0
  101. package/dist/scss-DhHc4lxB-D1lMETuy.js +8 -0
  102. package/dist/sequenceDiagram-G6AWOVSC-DlZ7du4U-z70BwBnZ.js +2274 -0
  103. package/dist/shellscript-Dn0-btNd-Dn0-btNd.js +6 -0
  104. package/dist/shellsession-8OLo3sB6-DD6AdPYk.js +8 -0
  105. package/dist/splunk-CTqDjQdo-CTqDjQdo.js +6 -0
  106. package/dist/sql-DCkt643--DCkt643-.js +6 -0
  107. package/dist/ssh-config-DHHGll-v-DHHGll-v.js +6 -0
  108. package/dist/stateDiagram-MAYHULR4-tK3TdntS-PielUO6n.js +268 -0
  109. package/dist/stateDiagram-v2-4JROLMXI-Ib4sJL3A--uDyhxdT.js +14 -0
  110. package/dist/style.css +1 -0
  111. package/dist/stylus-n_9f0QQ5-n_9f0QQ5.js +6 -0
  112. package/dist/svelte-01qw6Rxm-Cjp5Srko.js +14 -0
  113. package/dist/swift-BAWqNR8A-BAWqNR8A.js +6 -0
  114. package/dist/timeline-definition-U7ZMHBDA-Db9d-9_E-kHwjVd5T.js +804 -0
  115. package/dist/toml-CQSfOn0e-CQSfOn0e.js +6 -0
  116. package/dist/tsx-DiGsgWT8-DiGsgWT8.js +6 -0
  117. package/dist/twig-DxrNSc26-BIWbKTFO.js +18 -0
  118. package/dist/types/components/DocumentationContent.vue.d.ts +177 -0
  119. package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -0
  120. package/dist/types/components/DocumentationDisplay.vue.d.ts +323 -0
  121. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -0
  122. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +30 -0
  123. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +1 -0
  124. package/dist/types/components/ProductDocumentModal.vue.d.ts +71 -0
  125. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -0
  126. package/dist/types/composables/index.d.ts +6 -0
  127. package/dist/types/composables/index.d.ts.map +1 -0
  128. package/dist/types/composables/useI18n.d.ts +9 -0
  129. package/dist/types/composables/useI18n.d.ts.map +1 -0
  130. package/dist/types/external-links.d.ts +5 -0
  131. package/dist/types/external-links.d.ts.map +1 -0
  132. package/dist/types/helpers.d.ts +8 -0
  133. package/dist/types/helpers.d.ts.map +1 -0
  134. package/dist/types/index.d.ts +7 -0
  135. package/dist/types/index.d.ts.map +1 -0
  136. package/dist/types/types/document-list.d.ts +28 -0
  137. package/dist/types/types/document-list.d.ts.map +1 -0
  138. package/dist/types/types/document-modal.d.ts +8 -0
  139. package/dist/types/types/document-modal.d.ts.map +1 -0
  140. package/dist/types/types/index.d.ts +3 -0
  141. package/dist/types/types/index.d.ts.map +1 -0
  142. package/dist/typescript-buWNZFwO-buWNZFwO.js +6 -0
  143. package/dist/v-wa8Orrdd-wa8Orrdd.js +6 -0
  144. package/dist/vb-E2_-jk4M-E2_-jk4M.js +6 -0
  145. package/dist/viml-B-zWOd7Z-B-zWOd7Z.js +6 -0
  146. package/dist/vue-DdqTpW8B-BrYVXV7A.js +31 -0
  147. package/dist/vue-html-B9t4RWro-D1UeMTSX.js +10 -0
  148. package/dist/wasm-Bv5f0gKv-Bv5f0gKv.js +6 -0
  149. package/dist/wgsl-DnPoPGDU-DnPoPGDU.js +6 -0
  150. package/dist/xml-ChBsf5uy-0Ovnixsj.js +8 -0
  151. package/dist/xsl-BefjlXrd-CZ7IlB9K.js +8 -0
  152. package/dist/xychartDiagram-6QU3TZC5-L2EgHpF7-Dbx9eZ7M.js +1304 -0
  153. package/dist/yaml-Bbg74JKr-Bbg74JKr.js +6 -0
  154. package/package.json +2 -2
@@ -0,0 +1,1304 @@
1
+ import { _ as a, bd as ci, aD as bt, aC as Ft, aB as gi, be as ui, l as Ot, ay as Mt, ae as xi, am as Nt, a5 as pi, a6 as di, al as fi, a7 as mi, a8 as yi, ar as bi, aW as Ai, ag as Si } from "./index-B_RqyDIa.js";
2
+ import { t as wi } from "./init-DjUOC4st-C8Nwz6AJ.js";
3
+ import { h as Ci } from "./ordinal-DfAQgscy-BEJTu10r.js";
4
+ import { Z as Bt } from "./linear-BGmbGdcc-C--Nxp9Q.js";
5
+ function ki(t, i, e) {
6
+ t = +t, i = +i, e = (o = arguments.length) < 2 ? (i = t, t = 0, 1) : o < 3 ? 1 : +e;
7
+ for (var s = -1, o = Math.max(0, Math.ceil((i - t) / e)) | 0, g = new Array(o); ++s < o; )
8
+ g[s] = t + s * e;
9
+ return g;
10
+ }
11
+ function pt() {
12
+ var t = Ci().unknown(void 0), i = t.domain, e = t.range, s = 0, o = 1, g, u, p = !1, S = 0, T = 0, k = 0.5;
13
+ delete t.unknown;
14
+ function b() {
15
+ var f = i().length, R = o < s, w = R ? o : s, D = R ? s : o;
16
+ g = (D - w) / Math.max(1, f - S + T * 2), p && (g = Math.floor(g)), w += (D - w - g * (f - S)) * k, u = g * (1 - S), p && (w = Math.round(w), u = Math.round(u));
17
+ var d = ki(f).map(function(C) {
18
+ return w + g * C;
19
+ });
20
+ return e(R ? d.reverse() : d);
21
+ }
22
+ return t.domain = function(f) {
23
+ return arguments.length ? (i(f), b()) : i();
24
+ }, t.range = function(f) {
25
+ return arguments.length ? ([s, o] = f, s = +s, o = +o, b()) : [s, o];
26
+ }, t.rangeRound = function(f) {
27
+ return [s, o] = f, s = +s, o = +o, p = !0, b();
28
+ }, t.bandwidth = function() {
29
+ return u;
30
+ }, t.step = function() {
31
+ return g;
32
+ }, t.round = function(f) {
33
+ return arguments.length ? (p = !!f, b()) : p;
34
+ }, t.padding = function(f) {
35
+ return arguments.length ? (S = Math.min(1, T = +f), b()) : S;
36
+ }, t.paddingInner = function(f) {
37
+ return arguments.length ? (S = Math.min(1, f), b()) : S;
38
+ }, t.paddingOuter = function(f) {
39
+ return arguments.length ? (T = +f, b()) : T;
40
+ }, t.align = function(f) {
41
+ return arguments.length ? (k = Math.max(0, Math.min(1, f)), b()) : k;
42
+ }, t.copy = function() {
43
+ return pt(i(), [s, o]).round(p).paddingInner(S).paddingOuter(T).align(k);
44
+ }, wi.apply(b(), arguments);
45
+ }
46
+ var dt = function() {
47
+ var t = /* @__PURE__ */ a(function(M, h, l, c) {
48
+ for (l = l || {}, c = M.length; c--; l[M[c]] = h) ;
49
+ return l;
50
+ }, "o"), i = [1, 10, 12, 14, 16, 18, 19, 21, 23], e = [2, 6], s = [1, 3], o = [1, 5], g = [1, 6], u = [1, 7], p = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], S = [1, 25], T = [1, 26], k = [1, 28], b = [1, 29], f = [1, 30], R = [1, 31], w = [1, 32], D = [1, 33], d = [1, 34], C = [1, 35], r = [1, 36], P = [1, 37], N = [1, 43], Dt = [1, 42], Lt = [1, 47], U = [1, 50], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], q = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], I = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], vt = [1, 64], J = {
51
+ trace: /* @__PURE__ */ a(function() {
52
+ }, "trace"),
53
+ yy: {},
54
+ symbols_: { error: 2, start: 3, eol: 4, XYCHART: 5, chartConfig: 6, document: 7, CHART_ORIENTATION: 8, statement: 9, title: 10, text: 11, X_AXIS: 12, parseXAxis: 13, Y_AXIS: 14, parseYAxis: 15, LINE: 16, plotData: 17, BAR: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, SQUARE_BRACES_START: 24, commaSeparatedNumbers: 25, SQUARE_BRACES_END: 26, NUMBER_WITH_DECIMAL: 27, COMMA: 28, xAxisData: 29, bandData: 30, ARROW_DELIMITER: 31, commaSeparatedTexts: 32, yAxisData: 33, NEWLINE: 34, SEMI: 35, EOF: 36, alphaNum: 37, STR: 38, MD_STR: 39, alphaNumToken: 40, AMP: 41, NUM: 42, ALPHA: 43, PLUS: 44, EQUALS: 45, MULT: 46, DOT: 47, BRKT: 48, MINUS: 49, UNDERSCORE: 50, $accept: 0, $end: 1 },
55
+ terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" },
56
+ productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]],
57
+ performAction: /* @__PURE__ */ a(function(M, h, l, c, y, n, L) {
58
+ var x = n.length - 1;
59
+ switch (y) {
60
+ case 5:
61
+ c.setOrientation(n[x]);
62
+ break;
63
+ case 9:
64
+ c.setDiagramTitle(n[x].text.trim());
65
+ break;
66
+ case 12:
67
+ c.setLineData({ text: "", type: "text" }, n[x]);
68
+ break;
69
+ case 13:
70
+ c.setLineData(n[x - 1], n[x]);
71
+ break;
72
+ case 14:
73
+ c.setBarData({ text: "", type: "text" }, n[x]);
74
+ break;
75
+ case 15:
76
+ c.setBarData(n[x - 1], n[x]);
77
+ break;
78
+ case 16:
79
+ this.$ = n[x].trim(), c.setAccTitle(this.$);
80
+ break;
81
+ case 17:
82
+ case 18:
83
+ this.$ = n[x].trim(), c.setAccDescription(this.$);
84
+ break;
85
+ case 19:
86
+ this.$ = n[x - 1];
87
+ break;
88
+ case 20:
89
+ this.$ = [Number(n[x - 2]), ...n[x]];
90
+ break;
91
+ case 21:
92
+ this.$ = [Number(n[x])];
93
+ break;
94
+ case 22:
95
+ c.setXAxisTitle(n[x]);
96
+ break;
97
+ case 23:
98
+ c.setXAxisTitle(n[x - 1]);
99
+ break;
100
+ case 24:
101
+ c.setXAxisTitle({ type: "text", text: "" });
102
+ break;
103
+ case 25:
104
+ c.setXAxisBand(n[x]);
105
+ break;
106
+ case 26:
107
+ c.setXAxisRangeData(Number(n[x - 2]), Number(n[x]));
108
+ break;
109
+ case 27:
110
+ this.$ = n[x - 1];
111
+ break;
112
+ case 28:
113
+ this.$ = [n[x - 2], ...n[x]];
114
+ break;
115
+ case 29:
116
+ this.$ = [n[x]];
117
+ break;
118
+ case 30:
119
+ c.setYAxisTitle(n[x]);
120
+ break;
121
+ case 31:
122
+ c.setYAxisTitle(n[x - 1]);
123
+ break;
124
+ case 32:
125
+ c.setYAxisTitle({ type: "text", text: "" });
126
+ break;
127
+ case 33:
128
+ c.setYAxisRangeData(Number(n[x - 2]), Number(n[x]));
129
+ break;
130
+ case 37:
131
+ this.$ = { text: n[x], type: "text" };
132
+ break;
133
+ case 38:
134
+ this.$ = { text: n[x], type: "text" };
135
+ break;
136
+ case 39:
137
+ this.$ = { text: n[x], type: "markdown" };
138
+ break;
139
+ case 40:
140
+ this.$ = n[x];
141
+ break;
142
+ case 41:
143
+ this.$ = n[x - 1] + "" + n[x];
144
+ break;
145
+ }
146
+ }, "anonymous"),
147
+ table: [t(i, e, { 3: 1, 4: 2, 7: 4, 5: s, 34: o, 35: g, 36: u }), { 1: [3] }, t(i, e, { 4: 2, 7: 4, 3: 8, 5: s, 34: o, 35: g, 36: u }), t(i, e, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 34: o, 35: g, 36: u }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, t(p, [2, 34]), t(p, [2, 35]), t(p, [2, 36]), { 1: [2, 1] }, t(i, e, { 4: 2, 7: 4, 3: 21, 5: s, 34: o, 35: g, 36: u }), { 1: [2, 3] }, t(p, [2, 5]), t(i, [2, 7], { 4: 22, 34: o, 35: g, 36: u }), { 11: 23, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, { 11: 39, 13: 38, 24: N, 27: Dt, 29: 40, 30: 41, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, { 11: 45, 15: 44, 27: Lt, 33: 46, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, { 11: 49, 17: 48, 24: U, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, { 11: 52, 17: 51, 24: U, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, { 20: [1, 53] }, { 22: [1, 54] }, t(A, [2, 18]), { 1: [2, 2] }, t(A, [2, 8]), t(A, [2, 9]), t(q, [2, 37], { 40: 55, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }), t(q, [2, 38]), t(q, [2, 39]), t(I, [2, 40]), t(I, [2, 42]), t(I, [2, 43]), t(I, [2, 44]), t(I, [2, 45]), t(I, [2, 46]), t(I, [2, 47]), t(I, [2, 48]), t(I, [2, 49]), t(I, [2, 50]), t(I, [2, 51]), t(A, [2, 10]), t(A, [2, 22], { 30: 41, 29: 56, 24: N, 27: Dt }), t(A, [2, 24]), t(A, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, t(A, [2, 11]), t(A, [2, 30], { 33: 60, 27: Lt }), t(A, [2, 32]), { 31: [1, 61] }, t(A, [2, 12]), { 17: 62, 24: U }, { 25: 63, 27: vt }, t(A, [2, 14]), { 17: 65, 24: U }, t(A, [2, 16]), t(A, [2, 17]), t(I, [2, 41]), t(A, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, t(A, [2, 31]), { 27: [1, 69] }, t(A, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, t(A, [2, 15]), t(A, [2, 26]), t(A, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: S, 39: T, 40: 27, 41: k, 42: b, 43: f, 44: R, 45: w, 46: D, 47: d, 48: C, 49: r, 50: P }, t(A, [2, 33]), t(A, [2, 19]), { 25: 73, 27: vt }, { 26: [2, 28] }, { 26: [2, 20] }],
148
+ defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
149
+ parseError: /* @__PURE__ */ a(function(M, h) {
150
+ if (h.recoverable)
151
+ this.trace(M);
152
+ else {
153
+ var l = new Error(M);
154
+ throw l.hash = h, l;
155
+ }
156
+ }, "parseError"),
157
+ parse: /* @__PURE__ */ a(function(M) {
158
+ var h = this, l = [0], c = [], y = [null], n = [], L = this.table, x = "", G = 0, Et = 0, oi = 2, Pt = 1, hi = n.slice.call(arguments, 1), _ = Object.create(this.lexer), W = { yy: {} };
159
+ for (var tt in this.yy)
160
+ Object.prototype.hasOwnProperty.call(this.yy, tt) && (W.yy[tt] = this.yy[tt]);
161
+ _.setInput(M, W.yy), W.yy.lexer = _, W.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
162
+ var it = _.yylloc;
163
+ n.push(it);
164
+ var ri = _.options && _.options.ranges;
165
+ typeof W.yy.parseError == "function" ? this.parseError = W.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
166
+ function li(E) {
167
+ l.length = l.length - 2 * E, y.length = y.length - E, n.length = n.length - E;
168
+ }
169
+ a(li, "popStack");
170
+ function It() {
171
+ var E;
172
+ return E = c.pop() || _.lex() || Pt, typeof E != "number" && (E instanceof Array && (c = E, E = c.pop()), E = h.symbols_[E] || E), E;
173
+ }
174
+ a(It, "lex");
175
+ for (var v, z, $, et, F = {}, j, B, $t, Q; ; ) {
176
+ if (z = l[l.length - 1], this.defaultActions[z] ? $ = this.defaultActions[z] : ((v === null || typeof v > "u") && (v = It()), $ = L[z] && L[z][v]), typeof $ > "u" || !$.length || !$[0]) {
177
+ var st = "";
178
+ Q = [];
179
+ for (j in L[z])
180
+ this.terminals_[j] && j > oi && Q.push("'" + this.terminals_[j] + "'");
181
+ _.showPosition ? st = "Parse error on line " + (G + 1) + `:
182
+ ` + _.showPosition() + `
183
+ Expecting ` + Q.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : st = "Parse error on line " + (G + 1) + ": Unexpected " + (v == Pt ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(st, {
184
+ text: _.match,
185
+ token: this.terminals_[v] || v,
186
+ line: _.yylineno,
187
+ loc: it,
188
+ expected: Q
189
+ });
190
+ }
191
+ if ($[0] instanceof Array && $.length > 1)
192
+ throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + v);
193
+ switch ($[0]) {
194
+ case 1:
195
+ l.push(v), y.push(_.yytext), n.push(_.yylloc), l.push($[1]), v = null, Et = _.yyleng, x = _.yytext, G = _.yylineno, it = _.yylloc;
196
+ break;
197
+ case 2:
198
+ if (B = this.productions_[$[1]][1], F.$ = y[y.length - B], F._$ = {
199
+ first_line: n[n.length - (B || 1)].first_line,
200
+ last_line: n[n.length - 1].last_line,
201
+ first_column: n[n.length - (B || 1)].first_column,
202
+ last_column: n[n.length - 1].last_column
203
+ }, ri && (F._$.range = [
204
+ n[n.length - (B || 1)].range[0],
205
+ n[n.length - 1].range[1]
206
+ ]), et = this.performAction.apply(F, [
207
+ x,
208
+ Et,
209
+ G,
210
+ W.yy,
211
+ $[1],
212
+ y,
213
+ n
214
+ ].concat(hi)), typeof et < "u")
215
+ return et;
216
+ B && (l = l.slice(0, -1 * B * 2), y = y.slice(0, -1 * B), n = n.slice(0, -1 * B)), l.push(this.productions_[$[1]][0]), y.push(F.$), n.push(F._$), $t = L[l[l.length - 2]][l[l.length - 1]], l.push($t);
217
+ break;
218
+ case 3:
219
+ return !0;
220
+ }
221
+ }
222
+ return !0;
223
+ }, "parse")
224
+ }, ai = /* @__PURE__ */ function() {
225
+ var M = {
226
+ EOF: 1,
227
+ parseError: /* @__PURE__ */ a(function(h, l) {
228
+ if (this.yy.parser)
229
+ this.yy.parser.parseError(h, l);
230
+ else
231
+ throw new Error(h);
232
+ }, "parseError"),
233
+ // resets the lexer, sets new input
234
+ setInput: /* @__PURE__ */ a(function(h, l) {
235
+ return this.yy = l || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
236
+ first_line: 1,
237
+ first_column: 0,
238
+ last_line: 1,
239
+ last_column: 0
240
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
241
+ }, "setInput"),
242
+ // consumes and returns one char from the input
243
+ input: /* @__PURE__ */ a(function() {
244
+ var h = this._input[0];
245
+ this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
246
+ var l = h.match(/(?:\r\n?|\n).*/g);
247
+ return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
248
+ }, "input"),
249
+ // unshifts one char (or a string) into the input
250
+ unput: /* @__PURE__ */ a(function(h) {
251
+ var l = h.length, c = h.split(/(?:\r\n?|\n)/g);
252
+ this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
253
+ var y = this.match.split(/(?:\r\n?|\n)/g);
254
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
255
+ var n = this.yylloc.range;
256
+ return this.yylloc = {
257
+ first_line: this.yylloc.first_line,
258
+ last_line: this.yylineno + 1,
259
+ first_column: this.yylloc.first_column,
260
+ last_column: c ? (c.length === y.length ? this.yylloc.first_column : 0) + y[y.length - c.length].length - c[0].length : this.yylloc.first_column - l
261
+ }, this.options.ranges && (this.yylloc.range = [n[0], n[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
262
+ }, "unput"),
263
+ // When called from action, caches matched text and appends it on next action
264
+ more: /* @__PURE__ */ a(function() {
265
+ return this._more = !0, this;
266
+ }, "more"),
267
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
268
+ reject: /* @__PURE__ */ a(function() {
269
+ if (this.options.backtrack_lexer)
270
+ this._backtrack = !0;
271
+ else
272
+ 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).
273
+ ` + this.showPosition(), {
274
+ text: "",
275
+ token: null,
276
+ line: this.yylineno
277
+ });
278
+ return this;
279
+ }, "reject"),
280
+ // retain first n characters of the match
281
+ less: /* @__PURE__ */ a(function(h) {
282
+ this.unput(this.match.slice(h));
283
+ }, "less"),
284
+ // displays already matched input, i.e. for error messages
285
+ pastInput: /* @__PURE__ */ a(function() {
286
+ var h = this.matched.substr(0, this.matched.length - this.match.length);
287
+ return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
288
+ }, "pastInput"),
289
+ // displays upcoming input, i.e. for error messages
290
+ upcomingInput: /* @__PURE__ */ a(function() {
291
+ var h = this.match;
292
+ return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
293
+ }, "upcomingInput"),
294
+ // displays the character position where the lexing error occurred, i.e. for error messages
295
+ showPosition: /* @__PURE__ */ a(function() {
296
+ var h = this.pastInput(), l = new Array(h.length + 1).join("-");
297
+ return h + this.upcomingInput() + `
298
+ ` + l + "^";
299
+ }, "showPosition"),
300
+ // test the lexed token: return FALSE when not a match, otherwise return token
301
+ test_match: /* @__PURE__ */ a(function(h, l) {
302
+ var c, y, n;
303
+ if (this.options.backtrack_lexer && (n = {
304
+ yylineno: this.yylineno,
305
+ yylloc: {
306
+ first_line: this.yylloc.first_line,
307
+ last_line: this.last_line,
308
+ first_column: this.yylloc.first_column,
309
+ last_column: this.yylloc.last_column
310
+ },
311
+ yytext: this.yytext,
312
+ match: this.match,
313
+ matches: this.matches,
314
+ matched: this.matched,
315
+ yyleng: this.yyleng,
316
+ offset: this.offset,
317
+ _more: this._more,
318
+ _input: this._input,
319
+ yy: this.yy,
320
+ conditionStack: this.conditionStack.slice(0),
321
+ done: this.done
322
+ }, this.options.ranges && (n.yylloc.range = this.yylloc.range.slice(0))), y = h[0].match(/(?:\r\n?|\n).*/g), y && (this.yylineno += y.length), this.yylloc = {
323
+ first_line: this.yylloc.last_line,
324
+ last_line: this.yylineno + 1,
325
+ first_column: this.yylloc.last_column,
326
+ last_column: y ? y[y.length - 1].length - y[y.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
327
+ }, this.yytext += h[0], this.match += h[0], this.matches = h, 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(h[0].length), this.matched += h[0], c = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
328
+ return c;
329
+ if (this._backtrack) {
330
+ for (var L in n)
331
+ this[L] = n[L];
332
+ return !1;
333
+ }
334
+ return !1;
335
+ }, "test_match"),
336
+ // return next match in input
337
+ next: /* @__PURE__ */ a(function() {
338
+ if (this.done)
339
+ return this.EOF;
340
+ this._input || (this.done = !0);
341
+ var h, l, c, y;
342
+ this._more || (this.yytext = "", this.match = "");
343
+ for (var n = this._currentRules(), L = 0; L < n.length; L++)
344
+ if (c = this._input.match(this.rules[n[L]]), c && (!l || c[0].length > l[0].length)) {
345
+ if (l = c, y = L, this.options.backtrack_lexer) {
346
+ if (h = this.test_match(c, n[L]), h !== !1)
347
+ return h;
348
+ if (this._backtrack) {
349
+ l = !1;
350
+ continue;
351
+ } else
352
+ return !1;
353
+ } else if (!this.options.flex)
354
+ break;
355
+ }
356
+ return l ? (h = this.test_match(l, n[y]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
357
+ ` + this.showPosition(), {
358
+ text: "",
359
+ token: null,
360
+ line: this.yylineno
361
+ });
362
+ }, "next"),
363
+ // return next match that has a token
364
+ lex: /* @__PURE__ */ a(function() {
365
+ var h = this.next();
366
+ return h || this.lex();
367
+ }, "lex"),
368
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
369
+ begin: /* @__PURE__ */ a(function(h) {
370
+ this.conditionStack.push(h);
371
+ }, "begin"),
372
+ // pop the previously active lexer condition state off the condition stack
373
+ popState: /* @__PURE__ */ a(function() {
374
+ var h = this.conditionStack.length - 1;
375
+ return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
376
+ }, "popState"),
377
+ // produce the lexer rule set which is active for the currently active lexer condition state
378
+ _currentRules: /* @__PURE__ */ a(function() {
379
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
380
+ }, "_currentRules"),
381
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
382
+ topState: /* @__PURE__ */ a(function(h) {
383
+ return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
384
+ }, "topState"),
385
+ // alias for begin(condition)
386
+ pushState: /* @__PURE__ */ a(function(h) {
387
+ this.begin(h);
388
+ }, "pushState"),
389
+ // return the number of states currently on the stack
390
+ stateStackSize: /* @__PURE__ */ a(function() {
391
+ return this.conditionStack.length;
392
+ }, "stateStackSize"),
393
+ options: { "case-insensitive": !0 },
394
+ performAction: /* @__PURE__ */ a(function(h, l, c, y) {
395
+ switch (c) {
396
+ case 0:
397
+ break;
398
+ case 1:
399
+ break;
400
+ case 2:
401
+ return this.popState(), 34;
402
+ case 3:
403
+ return this.popState(), 34;
404
+ case 4:
405
+ return 34;
406
+ case 5:
407
+ break;
408
+ case 6:
409
+ return 10;
410
+ case 7:
411
+ return this.pushState("acc_title"), 19;
412
+ case 8:
413
+ return this.popState(), "acc_title_value";
414
+ case 9:
415
+ return this.pushState("acc_descr"), 21;
416
+ case 10:
417
+ return this.popState(), "acc_descr_value";
418
+ case 11:
419
+ this.pushState("acc_descr_multiline");
420
+ break;
421
+ case 12:
422
+ this.popState();
423
+ break;
424
+ case 13:
425
+ return "acc_descr_multiline_value";
426
+ case 14:
427
+ return 5;
428
+ case 15:
429
+ return 8;
430
+ case 16:
431
+ return this.pushState("axis_data"), "X_AXIS";
432
+ case 17:
433
+ return this.pushState("axis_data"), "Y_AXIS";
434
+ case 18:
435
+ return this.pushState("axis_band_data"), 24;
436
+ case 19:
437
+ return 31;
438
+ case 20:
439
+ return this.pushState("data"), 16;
440
+ case 21:
441
+ return this.pushState("data"), 18;
442
+ case 22:
443
+ return this.pushState("data_inner"), 24;
444
+ case 23:
445
+ return 27;
446
+ case 24:
447
+ return this.popState(), 26;
448
+ case 25:
449
+ this.popState();
450
+ break;
451
+ case 26:
452
+ this.pushState("string");
453
+ break;
454
+ case 27:
455
+ this.popState();
456
+ break;
457
+ case 28:
458
+ return "STR";
459
+ case 29:
460
+ return 24;
461
+ case 30:
462
+ return 26;
463
+ case 31:
464
+ return 43;
465
+ case 32:
466
+ return "COLON";
467
+ case 33:
468
+ return 44;
469
+ case 34:
470
+ return 28;
471
+ case 35:
472
+ return 45;
473
+ case 36:
474
+ return 46;
475
+ case 37:
476
+ return 48;
477
+ case 38:
478
+ return 50;
479
+ case 39:
480
+ return 47;
481
+ case 40:
482
+ return 41;
483
+ case 41:
484
+ return 49;
485
+ case 42:
486
+ return 42;
487
+ case 43:
488
+ break;
489
+ case 44:
490
+ return 35;
491
+ case 45:
492
+ return 36;
493
+ }
494
+ }, "anonymous"),
495
+ rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i],
496
+ conditions: { data_inner: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, data: { rules: [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 22, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, axis_band_data: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, axis_data: { rules: [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [], inclusive: !1 }, md_string: { rules: [], inclusive: !1 }, string: { rules: [27, 28], inclusive: !1 }, INITIAL: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 } }
497
+ };
498
+ return M;
499
+ }();
500
+ J.lexer = ai;
501
+ function H() {
502
+ this.yy = {};
503
+ }
504
+ return a(H, "Parser"), H.prototype = J, J.Parser = H, new H();
505
+ }();
506
+ dt.parser = dt;
507
+ var _i = dt;
508
+ function ft(t) {
509
+ return t.type === "bar";
510
+ }
511
+ a(ft, "isBarPlot");
512
+ function At(t) {
513
+ return t.type === "band";
514
+ }
515
+ a(At, "isBandAxisData");
516
+ function O(t) {
517
+ return t.type === "linear";
518
+ }
519
+ a(O, "isLinearAxisData");
520
+ var nt, Xt = (nt = class {
521
+ constructor(t) {
522
+ this.parentGroup = t;
523
+ }
524
+ getMaxDimension(t, i) {
525
+ if (!this.parentGroup)
526
+ return {
527
+ width: t.reduce((o, g) => Math.max(g.length, o), 0) * i,
528
+ height: i
529
+ };
530
+ const e = {
531
+ width: 0,
532
+ height: 0
533
+ }, s = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
534
+ for (const o of t) {
535
+ const g = ui(s, 1, o), u = g ? g.width : o.length * i, p = g ? g.height : i;
536
+ e.width = Math.max(e.width, u), e.height = Math.max(e.height, p);
537
+ }
538
+ return s.remove(), e;
539
+ }
540
+ }, a(nt, "TextDimensionCalculatorWithFont"), nt), Wt = 0.7, zt = 0.2, at, Yt = (at = class {
541
+ constructor(t, i, e, s) {
542
+ this.axisConfig = t, this.title = i, this.textDimensionCalculator = e, this.axisThemeConfig = s, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, 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.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left";
543
+ }
544
+ setRange(t) {
545
+ 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();
546
+ }
547
+ getRange() {
548
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
549
+ }
550
+ setAxisPosition(t) {
551
+ this.axisPosition = t, this.setRange(this.range);
552
+ }
553
+ getTickDistance() {
554
+ const t = this.getRange();
555
+ return Math.abs(t[0] - t[1]) / this.getTickValues().length;
556
+ }
557
+ getAxisOuterPadding() {
558
+ return this.outerPadding;
559
+ }
560
+ getLabelDimension() {
561
+ return this.textDimensionCalculator.getMaxDimension(
562
+ this.getTickValues().map((t) => t.toString()),
563
+ this.axisConfig.labelFontSize
564
+ );
565
+ }
566
+ recalculateOuterPaddingToDrawBar() {
567
+ Wt * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Wt * this.getTickDistance() / 2)), this.recalculateScale();
568
+ }
569
+ calculateSpaceIfDrawnHorizontally(t) {
570
+ let i = t.height;
571
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
572
+ const e = this.getLabelDimension(), s = zt * t.width;
573
+ this.outerPadding = Math.min(e.width / 2, s);
574
+ const o = e.height + this.axisConfig.labelPadding * 2;
575
+ this.labelTextHeight = e.height, o <= i && (i -= o, this.showLabel = !0);
576
+ }
577
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
578
+ const e = this.textDimensionCalculator.getMaxDimension(
579
+ [this.title],
580
+ this.axisConfig.titleFontSize
581
+ ), s = e.height + this.axisConfig.titlePadding * 2;
582
+ this.titleTextHeight = e.height, s <= i && (i -= s, this.showTitle = !0);
583
+ }
584
+ this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
585
+ }
586
+ calculateSpaceIfDrawnVertical(t) {
587
+ let i = t.width;
588
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
589
+ const e = this.getLabelDimension(), s = zt * t.height;
590
+ this.outerPadding = Math.min(e.height / 2, s);
591
+ const o = e.width + this.axisConfig.labelPadding * 2;
592
+ o <= i && (i -= o, this.showLabel = !0);
593
+ }
594
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
595
+ const e = this.textDimensionCalculator.getMaxDimension(
596
+ [this.title],
597
+ this.axisConfig.titleFontSize
598
+ ), s = e.height + this.axisConfig.titlePadding * 2;
599
+ this.titleTextHeight = e.height, s <= i && (i -= s, this.showTitle = !0);
600
+ }
601
+ this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
602
+ }
603
+ calculateSpace(t) {
604
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
605
+ width: this.boundingRect.width,
606
+ height: this.boundingRect.height
607
+ };
608
+ }
609
+ setBoundingBoxXY(t) {
610
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
611
+ }
612
+ getDrawableElementsForLeftAxis() {
613
+ const t = [];
614
+ if (this.showAxisLine) {
615
+ const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
616
+ t.push({
617
+ type: "path",
618
+ groupTexts: ["left-axis", "axisl-line"],
619
+ data: [
620
+ {
621
+ path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
622
+ strokeFill: this.axisThemeConfig.axisLineColor,
623
+ strokeWidth: this.axisConfig.axisLineWidth
624
+ }
625
+ ]
626
+ });
627
+ }
628
+ if (this.showLabel && t.push({
629
+ type: "text",
630
+ groupTexts: ["left-axis", "label"],
631
+ data: this.getTickValues().map((i) => ({
632
+ text: i.toString(),
633
+ 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),
634
+ y: this.getScaleValue(i),
635
+ fill: this.axisThemeConfig.labelColor,
636
+ fontSize: this.axisConfig.labelFontSize,
637
+ rotation: 0,
638
+ verticalPos: "middle",
639
+ horizontalPos: "right"
640
+ }))
641
+ }), this.showTick) {
642
+ const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
643
+ t.push({
644
+ type: "path",
645
+ groupTexts: ["left-axis", "ticks"],
646
+ data: this.getTickValues().map((e) => ({
647
+ path: `M ${i},${this.getScaleValue(e)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(e)}`,
648
+ strokeFill: this.axisThemeConfig.tickColor,
649
+ strokeWidth: this.axisConfig.tickWidth
650
+ }))
651
+ });
652
+ }
653
+ return this.showTitle && t.push({
654
+ type: "text",
655
+ groupTexts: ["left-axis", "title"],
656
+ data: [
657
+ {
658
+ text: this.title,
659
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
660
+ y: this.boundingRect.y + this.boundingRect.height / 2,
661
+ fill: this.axisThemeConfig.titleColor,
662
+ fontSize: this.axisConfig.titleFontSize,
663
+ rotation: 270,
664
+ verticalPos: "top",
665
+ horizontalPos: "center"
666
+ }
667
+ ]
668
+ }), t;
669
+ }
670
+ getDrawableElementsForBottomAxis() {
671
+ const t = [];
672
+ if (this.showAxisLine) {
673
+ const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
674
+ t.push({
675
+ type: "path",
676
+ groupTexts: ["bottom-axis", "axis-line"],
677
+ data: [
678
+ {
679
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
680
+ strokeFill: this.axisThemeConfig.axisLineColor,
681
+ strokeWidth: this.axisConfig.axisLineWidth
682
+ }
683
+ ]
684
+ });
685
+ }
686
+ if (this.showLabel && t.push({
687
+ type: "text",
688
+ groupTexts: ["bottom-axis", "label"],
689
+ data: this.getTickValues().map((i) => ({
690
+ text: i.toString(),
691
+ x: this.getScaleValue(i),
692
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
693
+ fill: this.axisThemeConfig.labelColor,
694
+ fontSize: this.axisConfig.labelFontSize,
695
+ rotation: 0,
696
+ verticalPos: "top",
697
+ horizontalPos: "center"
698
+ }))
699
+ }), this.showTick) {
700
+ const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
701
+ t.push({
702
+ type: "path",
703
+ groupTexts: ["bottom-axis", "ticks"],
704
+ data: this.getTickValues().map((e) => ({
705
+ path: `M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i + this.axisConfig.tickLength}`,
706
+ strokeFill: this.axisThemeConfig.tickColor,
707
+ strokeWidth: this.axisConfig.tickWidth
708
+ }))
709
+ });
710
+ }
711
+ return this.showTitle && t.push({
712
+ type: "text",
713
+ groupTexts: ["bottom-axis", "title"],
714
+ data: [
715
+ {
716
+ text: this.title,
717
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
718
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
719
+ fill: this.axisThemeConfig.titleColor,
720
+ fontSize: this.axisConfig.titleFontSize,
721
+ rotation: 0,
722
+ verticalPos: "top",
723
+ horizontalPos: "center"
724
+ }
725
+ ]
726
+ }), t;
727
+ }
728
+ getDrawableElementsForTopAxis() {
729
+ const t = [];
730
+ if (this.showAxisLine) {
731
+ const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
732
+ t.push({
733
+ type: "path",
734
+ groupTexts: ["top-axis", "axis-line"],
735
+ data: [
736
+ {
737
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
738
+ strokeFill: this.axisThemeConfig.axisLineColor,
739
+ strokeWidth: this.axisConfig.axisLineWidth
740
+ }
741
+ ]
742
+ });
743
+ }
744
+ if (this.showLabel && t.push({
745
+ type: "text",
746
+ groupTexts: ["top-axis", "label"],
747
+ data: this.getTickValues().map((i) => ({
748
+ text: i.toString(),
749
+ x: this.getScaleValue(i),
750
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
751
+ fill: this.axisThemeConfig.labelColor,
752
+ fontSize: this.axisConfig.labelFontSize,
753
+ rotation: 0,
754
+ verticalPos: "top",
755
+ horizontalPos: "center"
756
+ }))
757
+ }), this.showTick) {
758
+ const i = this.boundingRect.y;
759
+ t.push({
760
+ type: "path",
761
+ groupTexts: ["top-axis", "ticks"],
762
+ data: this.getTickValues().map((e) => ({
763
+ path: `M ${this.getScaleValue(e)},${i + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(e)},${i + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
764
+ strokeFill: this.axisThemeConfig.tickColor,
765
+ strokeWidth: this.axisConfig.tickWidth
766
+ }))
767
+ });
768
+ }
769
+ return this.showTitle && t.push({
770
+ type: "text",
771
+ groupTexts: ["top-axis", "title"],
772
+ data: [
773
+ {
774
+ text: this.title,
775
+ x: this.boundingRect.x + this.boundingRect.width / 2,
776
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
777
+ fill: this.axisThemeConfig.titleColor,
778
+ fontSize: this.axisConfig.titleFontSize,
779
+ rotation: 0,
780
+ verticalPos: "top",
781
+ horizontalPos: "center"
782
+ }
783
+ ]
784
+ }), t;
785
+ }
786
+ getDrawableElements() {
787
+ if (this.axisPosition === "left")
788
+ return this.getDrawableElementsForLeftAxis();
789
+ if (this.axisPosition === "right")
790
+ throw Error("Drawing of right axis is not implemented");
791
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
792
+ }
793
+ }, a(at, "BaseAxis"), at), ot, Ti = (ot = class extends Yt {
794
+ constructor(t, i, e, s, o) {
795
+ super(t, s, o, i), this.categories = e, this.scale = pt().domain(this.categories).range(this.getRange());
796
+ }
797
+ setRange(t) {
798
+ super.setRange(t);
799
+ }
800
+ recalculateScale() {
801
+ this.scale = pt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), Ot.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
802
+ }
803
+ getTickValues() {
804
+ return this.categories;
805
+ }
806
+ getScaleValue(t) {
807
+ return this.scale(t) ?? this.getRange()[0];
808
+ }
809
+ }, a(ot, "BandAxis"), ot), ht, Ri = (ht = class extends Yt {
810
+ constructor(t, i, e, s, o) {
811
+ super(t, s, o, i), this.domain = e, this.scale = Bt().domain(this.domain).range(this.getRange());
812
+ }
813
+ getTickValues() {
814
+ return this.scale.ticks();
815
+ }
816
+ recalculateScale() {
817
+ const t = [...this.domain];
818
+ this.axisPosition === "left" && t.reverse(), this.scale = Bt().domain(t).range(this.getRange());
819
+ }
820
+ getScaleValue(t) {
821
+ return this.scale(t);
822
+ }
823
+ }, a(ht, "LinearAxis"), ht);
824
+ function mt(t, i, e, s) {
825
+ const o = new Xt(s);
826
+ return At(t) ? new Ti(
827
+ i,
828
+ e,
829
+ t.categories,
830
+ t.title,
831
+ o
832
+ ) : new Ri(
833
+ i,
834
+ e,
835
+ [t.min, t.max],
836
+ t.title,
837
+ o
838
+ );
839
+ }
840
+ a(mt, "getAxis");
841
+ var rt, Di = (rt = class {
842
+ constructor(t, i, e, s) {
843
+ this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = e, this.chartThemeConfig = s, this.boundingRect = {
844
+ x: 0,
845
+ y: 0,
846
+ width: 0,
847
+ height: 0
848
+ }, this.showChartTitle = !1;
849
+ }
850
+ setBoundingBoxXY(t) {
851
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
852
+ }
853
+ calculateSpace(t) {
854
+ const i = this.textDimensionCalculator.getMaxDimension(
855
+ [this.chartData.title],
856
+ this.chartConfig.titleFontSize
857
+ ), e = Math.max(i.width, t.width), s = i.height + 2 * this.chartConfig.titlePadding;
858
+ return i.width <= e && i.height <= s && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = e, this.boundingRect.height = s, this.showChartTitle = !0), {
859
+ width: this.boundingRect.width,
860
+ height: this.boundingRect.height
861
+ };
862
+ }
863
+ getDrawableElements() {
864
+ const t = [];
865
+ return this.showChartTitle && t.push({
866
+ groupTexts: ["chart-title"],
867
+ type: "text",
868
+ data: [
869
+ {
870
+ fontSize: this.chartConfig.titleFontSize,
871
+ text: this.chartData.title,
872
+ verticalPos: "middle",
873
+ horizontalPos: "center",
874
+ x: this.boundingRect.x + this.boundingRect.width / 2,
875
+ y: this.boundingRect.y + this.boundingRect.height / 2,
876
+ fill: this.chartThemeConfig.titleColor,
877
+ rotation: 0
878
+ }
879
+ ]
880
+ }), t;
881
+ }
882
+ }, a(rt, "ChartTitle"), rt);
883
+ function Vt(t, i, e, s) {
884
+ const o = new Xt(s);
885
+ return new Di(o, t, i, e);
886
+ }
887
+ a(Vt, "getChartTitleComponent");
888
+ var lt, Li = (lt = class {
889
+ constructor(t, i, e, s, o) {
890
+ this.plotData = t, this.xAxis = i, this.yAxis = e, this.orientation = s, this.plotIndex = o;
891
+ }
892
+ getDrawableElement() {
893
+ const t = this.plotData.data.map((e) => [
894
+ this.xAxis.getScaleValue(e[0]),
895
+ this.yAxis.getScaleValue(e[1])
896
+ ]);
897
+ let i;
898
+ return this.orientation === "horizontal" ? i = Mt().y((e) => e[0]).x((e) => e[1])(t) : i = Mt().x((e) => e[0]).y((e) => e[1])(t), i ? [
899
+ {
900
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
901
+ type: "path",
902
+ data: [
903
+ {
904
+ path: i,
905
+ strokeFill: this.plotData.strokeFill,
906
+ strokeWidth: this.plotData.strokeWidth
907
+ }
908
+ ]
909
+ }
910
+ ] : [];
911
+ }
912
+ }, a(lt, "LinePlot"), lt), ct, vi = (ct = class {
913
+ constructor(t, i, e, s, o, g) {
914
+ this.barData = t, this.boundingRect = i, this.xAxis = e, this.yAxis = s, this.orientation = o, this.plotIndex = g;
915
+ }
916
+ getDrawableElement() {
917
+ const t = this.barData.data.map((s) => [
918
+ this.xAxis.getScaleValue(s[0]),
919
+ this.yAxis.getScaleValue(s[1])
920
+ ]), i = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), e = i / 2;
921
+ return this.orientation === "horizontal" ? [
922
+ {
923
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
924
+ type: "rect",
925
+ data: t.map((s) => ({
926
+ x: this.boundingRect.x,
927
+ y: s[0] - e,
928
+ height: i,
929
+ width: s[1] - this.boundingRect.x,
930
+ fill: this.barData.fill,
931
+ strokeWidth: 0,
932
+ strokeFill: this.barData.fill
933
+ }))
934
+ }
935
+ ] : [
936
+ {
937
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
938
+ type: "rect",
939
+ data: t.map((s) => ({
940
+ x: s[0] - e,
941
+ y: s[1],
942
+ width: i,
943
+ height: this.boundingRect.y + this.boundingRect.height - s[1],
944
+ fill: this.barData.fill,
945
+ strokeWidth: 0,
946
+ strokeFill: this.barData.fill
947
+ }))
948
+ }
949
+ ];
950
+ }
951
+ }, a(ct, "BarPlot"), ct), gt, Ei = (gt = class {
952
+ constructor(t, i, e) {
953
+ this.chartConfig = t, this.chartData = i, this.chartThemeConfig = e, this.boundingRect = {
954
+ x: 0,
955
+ y: 0,
956
+ width: 0,
957
+ height: 0
958
+ };
959
+ }
960
+ setAxes(t, i) {
961
+ this.xAxis = t, this.yAxis = i;
962
+ }
963
+ setBoundingBoxXY(t) {
964
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
965
+ }
966
+ calculateSpace(t) {
967
+ return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
968
+ width: this.boundingRect.width,
969
+ height: this.boundingRect.height
970
+ };
971
+ }
972
+ getDrawableElements() {
973
+ if (!(this.xAxis && this.yAxis))
974
+ throw Error("Axes must be passed to render Plots");
975
+ const t = [];
976
+ for (const [i, e] of this.chartData.plots.entries())
977
+ switch (e.type) {
978
+ case "line":
979
+ {
980
+ const s = new Li(
981
+ e,
982
+ this.xAxis,
983
+ this.yAxis,
984
+ this.chartConfig.chartOrientation,
985
+ i
986
+ );
987
+ t.push(...s.getDrawableElement());
988
+ }
989
+ break;
990
+ case "bar":
991
+ {
992
+ const s = new vi(
993
+ e,
994
+ this.boundingRect,
995
+ this.xAxis,
996
+ this.yAxis,
997
+ this.chartConfig.chartOrientation,
998
+ i
999
+ );
1000
+ t.push(...s.getDrawableElement());
1001
+ }
1002
+ break;
1003
+ }
1004
+ return t;
1005
+ }
1006
+ }, a(gt, "BasePlot"), gt);
1007
+ function Ut(t, i, e) {
1008
+ return new Ei(t, i, e);
1009
+ }
1010
+ a(Ut, "getPlotComponent");
1011
+ var ut, Pi = (ut = class {
1012
+ constructor(t, i, e, s) {
1013
+ this.chartConfig = t, this.chartData = i, this.componentStore = {
1014
+ title: Vt(t, i, e, s),
1015
+ plot: Ut(t, i, e),
1016
+ xAxis: mt(
1017
+ i.xAxis,
1018
+ t.xAxis,
1019
+ {
1020
+ titleColor: e.xAxisTitleColor,
1021
+ labelColor: e.xAxisLabelColor,
1022
+ tickColor: e.xAxisTickColor,
1023
+ axisLineColor: e.xAxisLineColor
1024
+ },
1025
+ s
1026
+ ),
1027
+ yAxis: mt(
1028
+ i.yAxis,
1029
+ t.yAxis,
1030
+ {
1031
+ titleColor: e.yAxisTitleColor,
1032
+ labelColor: e.yAxisLabelColor,
1033
+ tickColor: e.yAxisTickColor,
1034
+ axisLineColor: e.yAxisLineColor
1035
+ },
1036
+ s
1037
+ )
1038
+ };
1039
+ }
1040
+ calculateVerticalSpace() {
1041
+ let t = this.chartConfig.width, i = this.chartConfig.height, e = 0, s = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), g = Math.floor(
1042
+ i * this.chartConfig.plotReservedSpacePercent / 100
1043
+ ), u = this.componentStore.plot.calculateSpace({
1044
+ width: o,
1045
+ height: g
1046
+ });
1047
+ t -= u.width, i -= u.height, u = this.componentStore.title.calculateSpace({
1048
+ width: this.chartConfig.width,
1049
+ height: i
1050
+ }), s = u.height, i -= u.height, this.componentStore.xAxis.setAxisPosition("bottom"), u = this.componentStore.xAxis.calculateSpace({
1051
+ width: t,
1052
+ height: i
1053
+ }), i -= u.height, this.componentStore.yAxis.setAxisPosition("left"), u = this.componentStore.yAxis.calculateSpace({
1054
+ width: t,
1055
+ height: i
1056
+ }), e = u.width, t -= u.width, t > 0 && (o += t, t = 0), i > 0 && (g += i, i = 0), this.componentStore.plot.calculateSpace({
1057
+ width: o,
1058
+ height: g
1059
+ }), this.componentStore.plot.setBoundingBoxXY({ x: e, y: s }), this.componentStore.xAxis.setRange([e, e + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: e, y: s + g }), this.componentStore.yAxis.setRange([s, s + g]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: s }), this.chartData.plots.some((p) => ft(p)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1060
+ }
1061
+ calculateHorizontalSpace() {
1062
+ let t = this.chartConfig.width, i = this.chartConfig.height, e = 0, s = 0, o = 0, g = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), u = Math.floor(
1063
+ i * this.chartConfig.plotReservedSpacePercent / 100
1064
+ ), p = this.componentStore.plot.calculateSpace({
1065
+ width: g,
1066
+ height: u
1067
+ });
1068
+ t -= p.width, i -= p.height, p = this.componentStore.title.calculateSpace({
1069
+ width: this.chartConfig.width,
1070
+ height: i
1071
+ }), e = p.height, i -= p.height, this.componentStore.xAxis.setAxisPosition("left"), p = this.componentStore.xAxis.calculateSpace({
1072
+ width: t,
1073
+ height: i
1074
+ }), t -= p.width, s = p.width, this.componentStore.yAxis.setAxisPosition("top"), p = this.componentStore.yAxis.calculateSpace({
1075
+ width: t,
1076
+ height: i
1077
+ }), i -= p.height, o = e + p.height, t > 0 && (g += t, t = 0), i > 0 && (u += i, i = 0), this.componentStore.plot.calculateSpace({
1078
+ width: g,
1079
+ height: u
1080
+ }), this.componentStore.plot.setBoundingBoxXY({ x: s, y: o }), this.componentStore.yAxis.setRange([s, s + g]), this.componentStore.yAxis.setBoundingBoxXY({ x: s, y: e }), this.componentStore.xAxis.setRange([o, o + u]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((S) => ft(S)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1081
+ }
1082
+ calculateSpace() {
1083
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1084
+ }
1085
+ getDrawableElement() {
1086
+ this.calculateSpace();
1087
+ const t = [];
1088
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1089
+ for (const i of Object.values(this.componentStore))
1090
+ t.push(...i.getDrawableElements());
1091
+ return t;
1092
+ }
1093
+ }, a(ut, "Orchestrator"), ut), xt, Ii = (xt = class {
1094
+ static build(t, i, e, s) {
1095
+ return new Pi(t, i, e, s).getDrawableElement();
1096
+ }
1097
+ }, a(xt, "XYChartBuilder"), xt), X = 0, Ht, Y = Ct(), V = wt(), m = kt(), yt = V.plotColorPalette.split(",").map((t) => t.trim()), Z = !1, St = !1;
1098
+ function wt() {
1099
+ const t = ci(), i = bt();
1100
+ return Ft(t.xyChart, i.themeVariables.xyChart);
1101
+ }
1102
+ a(wt, "getChartDefaultThemeConfig");
1103
+ function Ct() {
1104
+ const t = bt();
1105
+ return Ft(
1106
+ gi.xyChart,
1107
+ t.xyChart
1108
+ );
1109
+ }
1110
+ a(Ct, "getChartDefaultConfig");
1111
+ function kt() {
1112
+ return {
1113
+ yAxis: {
1114
+ type: "linear",
1115
+ title: "",
1116
+ min: 1 / 0,
1117
+ max: -1 / 0
1118
+ },
1119
+ xAxis: {
1120
+ type: "band",
1121
+ title: "",
1122
+ categories: []
1123
+ },
1124
+ title: "",
1125
+ plots: []
1126
+ };
1127
+ }
1128
+ a(kt, "getChartDefaultData");
1129
+ function K(t) {
1130
+ const i = bt();
1131
+ return xi(t.trim(), i);
1132
+ }
1133
+ a(K, "textSanitizer");
1134
+ function Gt(t) {
1135
+ Ht = t;
1136
+ }
1137
+ a(Gt, "setTmpSVGG");
1138
+ function jt(t) {
1139
+ t === "horizontal" ? Y.chartOrientation = "horizontal" : Y.chartOrientation = "vertical";
1140
+ }
1141
+ a(jt, "setOrientation");
1142
+ function Qt(t) {
1143
+ m.xAxis.title = K(t.text);
1144
+ }
1145
+ a(Qt, "setXAxisTitle");
1146
+ function _t(t, i) {
1147
+ m.xAxis = { type: "linear", title: m.xAxis.title, min: t, max: i }, Z = !0;
1148
+ }
1149
+ a(_t, "setXAxisRangeData");
1150
+ function Zt(t) {
1151
+ m.xAxis = {
1152
+ type: "band",
1153
+ title: m.xAxis.title,
1154
+ categories: t.map((i) => K(i.text))
1155
+ }, Z = !0;
1156
+ }
1157
+ a(Zt, "setXAxisBand");
1158
+ function Kt(t) {
1159
+ m.yAxis.title = K(t.text);
1160
+ }
1161
+ a(Kt, "setYAxisTitle");
1162
+ function qt(t, i) {
1163
+ m.yAxis = { type: "linear", title: m.yAxis.title, min: t, max: i }, St = !0;
1164
+ }
1165
+ a(qt, "setYAxisRangeData");
1166
+ function Jt(t) {
1167
+ const i = Math.min(...t), e = Math.max(...t), s = O(m.yAxis) ? m.yAxis.min : 1 / 0, o = O(m.yAxis) ? m.yAxis.max : -1 / 0;
1168
+ m.yAxis = {
1169
+ type: "linear",
1170
+ title: m.yAxis.title,
1171
+ min: Math.min(s, i),
1172
+ max: Math.max(o, e)
1173
+ };
1174
+ }
1175
+ a(Jt, "setYAxisRangeFromPlotData");
1176
+ function Tt(t) {
1177
+ let i = [];
1178
+ if (t.length === 0)
1179
+ return i;
1180
+ if (!Z) {
1181
+ const e = O(m.xAxis) ? m.xAxis.min : 1 / 0, s = O(m.xAxis) ? m.xAxis.max : -1 / 0;
1182
+ _t(Math.min(e, 1), Math.max(s, t.length));
1183
+ }
1184
+ if (St || Jt(t), At(m.xAxis) && (i = m.xAxis.categories.map((e, s) => [e, t[s]])), O(m.xAxis)) {
1185
+ const e = m.xAxis.min, s = m.xAxis.max, o = (s - e) / (t.length - 1), g = [];
1186
+ for (let u = e; u <= s; u += o)
1187
+ g.push(`${u}`);
1188
+ i = g.map((u, p) => [u, t[p]]);
1189
+ }
1190
+ return i;
1191
+ }
1192
+ a(Tt, "transformDataWithoutCategory");
1193
+ function Rt(t) {
1194
+ return yt[t === 0 ? 0 : t % yt.length];
1195
+ }
1196
+ a(Rt, "getPlotColorFromPalette");
1197
+ function ti(t, i) {
1198
+ const e = Tt(i);
1199
+ m.plots.push({
1200
+ type: "line",
1201
+ strokeFill: Rt(X),
1202
+ strokeWidth: 2,
1203
+ data: e
1204
+ }), X++;
1205
+ }
1206
+ a(ti, "setLineData");
1207
+ function ii(t, i) {
1208
+ const e = Tt(i);
1209
+ m.plots.push({
1210
+ type: "bar",
1211
+ fill: Rt(X),
1212
+ data: e
1213
+ }), X++;
1214
+ }
1215
+ a(ii, "setBarData");
1216
+ function ei() {
1217
+ if (m.plots.length === 0)
1218
+ throw Error("No Plot to render, please provide a plot with some data");
1219
+ return m.title = Nt(), Ii.build(Y, m, V, Ht);
1220
+ }
1221
+ a(ei, "getDrawableElem");
1222
+ function si() {
1223
+ return V;
1224
+ }
1225
+ a(si, "getChartThemeConfig");
1226
+ function ni() {
1227
+ return Y;
1228
+ }
1229
+ a(ni, "getChartConfig");
1230
+ var $i = /* @__PURE__ */ a(function() {
1231
+ bi(), X = 0, Y = Ct(), m = kt(), V = wt(), yt = V.plotColorPalette.split(",").map((t) => t.trim()), Z = !1, St = !1;
1232
+ }, "clear"), Mi = {
1233
+ getDrawableElem: ei,
1234
+ clear: $i,
1235
+ setAccTitle: pi,
1236
+ getAccTitle: di,
1237
+ setDiagramTitle: fi,
1238
+ getDiagramTitle: Nt,
1239
+ getAccDescription: mi,
1240
+ setAccDescription: yi,
1241
+ setOrientation: jt,
1242
+ setXAxisTitle: Qt,
1243
+ setXAxisRangeData: _t,
1244
+ setXAxisBand: Zt,
1245
+ setYAxisTitle: Kt,
1246
+ setYAxisRangeData: qt,
1247
+ setLineData: ti,
1248
+ setBarData: ii,
1249
+ setTmpSVGG: Gt,
1250
+ getChartThemeConfig: si,
1251
+ getChartConfig: ni
1252
+ }, Bi = /* @__PURE__ */ a((t, i, e, s) => {
1253
+ const o = s.db, g = o.getChartThemeConfig(), u = o.getChartConfig();
1254
+ function p(d) {
1255
+ return d === "top" ? "text-before-edge" : "middle";
1256
+ }
1257
+ a(p, "getDominantBaseLine");
1258
+ function S(d) {
1259
+ return d === "left" ? "start" : d === "right" ? "end" : "middle";
1260
+ }
1261
+ a(S, "getTextAnchor");
1262
+ function T(d) {
1263
+ return `translate(${d.x}, ${d.y}) rotate(${d.rotation || 0})`;
1264
+ }
1265
+ a(T, "getTextTransformation"), Ot.debug(`Rendering xychart chart
1266
+ ` + t);
1267
+ const k = Ai(i), b = k.append("g").attr("class", "main"), f = b.append("rect").attr("width", u.width).attr("height", u.height).attr("class", "background");
1268
+ Si(k, u.height, u.width, !0), k.attr("viewBox", `0 0 ${u.width} ${u.height}`), f.attr("fill", g.backgroundColor), o.setTmpSVGG(k.append("g").attr("class", "mermaid-tmp-group"));
1269
+ const R = o.getDrawableElem(), w = {};
1270
+ function D(d) {
1271
+ let C = b, r = "";
1272
+ for (const [P] of d.entries()) {
1273
+ let N = b;
1274
+ P > 0 && w[r] && (N = w[r]), r += d[P], C = w[r], C || (C = w[r] = N.append("g").attr("class", d[P]));
1275
+ }
1276
+ return C;
1277
+ }
1278
+ a(D, "getGroup");
1279
+ for (const d of R) {
1280
+ if (d.data.length === 0)
1281
+ continue;
1282
+ const C = D(d.groupTexts);
1283
+ switch (d.type) {
1284
+ case "rect":
1285
+ C.selectAll("rect").data(d.data).enter().append("rect").attr("x", (r) => r.x).attr("y", (r) => r.y).attr("width", (r) => r.width).attr("height", (r) => r.height).attr("fill", (r) => r.fill).attr("stroke", (r) => r.strokeFill).attr("stroke-width", (r) => r.strokeWidth);
1286
+ break;
1287
+ case "text":
1288
+ C.selectAll("text").data(d.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (r) => r.fill).attr("font-size", (r) => r.fontSize).attr("dominant-baseline", (r) => p(r.verticalPos)).attr("text-anchor", (r) => S(r.horizontalPos)).attr("transform", (r) => T(r)).text((r) => r.text);
1289
+ break;
1290
+ case "path":
1291
+ C.selectAll("path").data(d.data).enter().append("path").attr("d", (r) => r.path).attr("fill", (r) => r.fill ? r.fill : "none").attr("stroke", (r) => r.strokeFill).attr("stroke-width", (r) => r.strokeWidth);
1292
+ break;
1293
+ }
1294
+ }
1295
+ }, "draw"), Wi = {
1296
+ draw: Bi
1297
+ }, Xi = {
1298
+ parser: _i,
1299
+ db: Mi,
1300
+ renderer: Wi
1301
+ };
1302
+ export {
1303
+ Xi as diagram
1304
+ };