@kong-ui-public/documentation 0.3.42 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/Tableau10-GLA_9iAD-BMurskAd.js +9 -0
  2. package/dist/arc-BSRpyMf3-C5dasNo_.js +86 -0
  3. package/dist/array-CqVTtuYm-fKLgkG2b.js +6 -0
  4. package/dist/astro-mwoSwJnq-CNh-xuM0.js +27 -0
  5. package/dist/blockDiagram-6b2b5046-D02VCbQO-CPmGy0xX.js +1224 -0
  6. package/dist/c-eDnjw9rh-eDnjw9rh.js +87 -0
  7. package/dist/c4Diagram-b947cdbb-gYcL5VzP-DIDY83e1.js +1578 -0
  8. package/dist/channel-DHTQ8Ynn-7OPGex2S.js +5 -0
  9. package/dist/classDiagram-35230388-JdSKLSZv-D2crBRy-.js +217 -0
  10. package/dist/classDiagram-v2-412acd34-DFFRHXE_-B6aCxlD1.js +200 -0
  11. package/dist/clone-p6h9XXNm-3JQ-HRC6.js +8 -0
  12. package/dist/coffee-CRlSxcc3-CY091_1T.js +108 -0
  13. package/dist/cpp-DizfY48B-CA38N4Mn.js +208 -0
  14. package/dist/createText-423428c9-LivTKT7b-BXNfjcdp.js +2964 -0
  15. package/dist/csharp-uGDiXTZn-uGDiXTZn.js +762 -0
  16. package/dist/css-CAzixsid-CEpuX1HY.js +511 -0
  17. package/dist/csv-D4BoHddH-D4BoHddH.js +7 -0
  18. package/dist/diff-Bo5iyMQ2-Bo5iyMQ2.js +7 -0
  19. package/dist/docker-B10O2enb-B10O2enb.js +7 -0
  20. package/dist/documentation.es.js +5 -3130
  21. package/dist/documentation.umd.js +10152 -50
  22. package/dist/edges-d417c7a0-C1ggiwWz-Aj0OUf7e.js +1082 -0
  23. package/dist/erDiagram-0ea73325-mz0Z_-DA-Dr01LsTB.js +924 -0
  24. package/dist/flowDb-d35e309a-CPyxEMIt-lofeyUuw.js +1126 -0
  25. package/dist/flowDiagram-d949d7c1-DqCa0HNN-BK5wNO9Z.js +782 -0
  26. package/dist/flowDiagram-v2-49332944-UMosz1sZ-BG39AuNP.js +17 -0
  27. package/dist/flowchart-elk-definition-27cc417a-D2UKpS6N-r2p34307.js +48387 -0
  28. package/dist/ganttDiagram-5c869e3b-CVBHw4pG-CaG9QXQM.js +2490 -0
  29. package/dist/git-commit-CWf81VOF-DtOZSoIU.js +9 -0
  30. package/dist/git-rebase-sR-yVH_J-D5M2oE9O.js +9 -0
  31. package/dist/gitGraphDiagram-b9d81de9-BGm3fU0n-CbCpf-4j.js +1262 -0
  32. package/dist/go-BCCWZWY1-BCCWZWY1.js +7 -0
  33. package/dist/graph-4FyIWFHN-774TpNLL.js +870 -0
  34. package/dist/graphql-CT32SSoq-1pBWfpcR.js +18 -0
  35. package/dist/haml-8RvrfhLO-Bbc4xoLP.js +19 -0
  36. package/dist/handlebars-Cr5ro0bH-CLcCNLtV.js +15 -0
  37. package/dist/haskell-BfFu8DD8-BmkPJdLL.js +565 -0
  38. package/dist/html-BZB5lEhh-B74zAnWx.js +84 -0
  39. package/dist/html-derivative-0y7sV5Qc-D8-muTWn.js +9 -0
  40. package/dist/index-8fae9850-_CN7MNjP-Cq-s0PmS.js +373 -0
  41. package/dist/index-B-5DuDrq.js +29996 -0
  42. package/dist/infoDiagram-db7b18fc-V446j9uR-GSa8bniv.js +319 -0
  43. package/dist/ini-BsUFIxsI-BsUFIxsI.js +7 -0
  44. package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
  45. package/dist/java-Bk2JzfKB-Bk2JzfKB.js +74 -0
  46. package/dist/javascript-DqVBMyXe-DqVBMyXe.js +705 -0
  47. package/dist/journeyDiagram-d5636530-CFiu7dnV-DJMu6A22.js +803 -0
  48. package/dist/json-B12k4-6m-B12k4-6m.js +31 -0
  49. package/dist/json5-CvqQZK9I-CvqQZK9I.js +23 -0
  50. package/dist/jsonc-v2qGKRJY-v2qGKRJY.js +31 -0
  51. package/dist/jsonl-izxnMeZX-izxnMeZX.js +31 -0
  52. package/dist/jsx-aDp7j9_Z-aDp7j9_Z.js +705 -0
  53. package/dist/kotlin-NOMOielb-NOMOielb.js +7 -0
  54. package/dist/latex-Bw_ghldO-BlUAi6pB.js +339 -0
  55. package/dist/layout-2-aEcfuw-BqqWy5wB.js +1524 -0
  56. package/dist/less-CW2GmQHL-CW2GmQHL.js +165 -0
  57. package/dist/line-nVq5kEiy-DtZd3PHZ.js +34 -0
  58. package/dist/linear-Bz4oRFvQ-C869GXbm.js +447 -0
  59. package/dist/liquid-DJ2rh7oT-FwZwa67Y.js +28 -0
  60. package/dist/lua-5TZ-G8Be-CogscVHC.js +9 -0
  61. package/dist/make-whncTQWE-whncTQWE.js +7 -0
  62. package/dist/markdown-DYKdIx5--DYKdIx5-.js +135 -0
  63. package/dist/material-theme-lighter-BRE1Bis3-BRE1Bis3.js +769 -0
  64. package/dist/material-theme-palenight-Dhz61Tee-Dhz61Tee.js +769 -0
  65. package/dist/mdc-D0DPLwil-BfE3hy8_.js +88 -0
  66. package/dist/mdx-CKDMxEaL-CKDMxEaL.js +7 -0
  67. package/dist/mermaid-BxNM-z-u-BxNM-z-u.js +7 -0
  68. package/dist/mindmap-definition-377f8f1f-C2vFYDMs-B71SGbvx.js +19078 -0
  69. package/dist/nginx-C082G13W-vryM9k1W.js +9 -0
  70. package/dist/objective-c-BVtzkNiv-BVtzkNiv.js +115 -0
  71. package/dist/onig-BonMD2gC-BonMD2gC.js +4 -0
  72. package/dist/ordinal-MUacOSdK-B1MUT0BL.js +65 -0
  73. package/dist/pascal-CrvtytWS-CrvtytWS.js +7 -0
  74. package/dist/path-Crsf9Nsj-SiSjwXsf.js +91 -0
  75. package/dist/perl-D29UPKP6-Dez6-HRy.js +17 -0
  76. package/dist/php-D7Tl-iS7-BtPFrDEt.js +789 -0
  77. package/dist/pieDiagram-b0208e96-DhA_SoTh-CfDd9YdA.js +501 -0
  78. package/dist/plsql-8SPzZKaa-8SPzZKaa.js +7 -0
  79. package/dist/postcss-Cz2vjx_4-Cz2vjx_4.js +7 -0
  80. package/dist/powershell-B0buHCuS-B0buHCuS.js +7 -0
  81. package/dist/proto-6YaU_lta-6YaU_lta.js +7 -0
  82. package/dist/pug-DbFO7359-duYD8LVa.js +21 -0
  83. package/dist/python-BQXev0_W-BQXev0_W.js +524 -0
  84. package/dist/quadrantDiagram-0332be45-C8q96Ohm-DMblaqnx.js +903 -0
  85. package/dist/r-DU7Q70f1-DU7Q70f1.js +7 -0
  86. package/dist/reg-DoGLEyFr-DoGLEyFr.js +7 -0
  87. package/dist/requirementDiagram-bf7890df-D30zCZjB-B_JBC9RM.js +767 -0
  88. package/dist/rst-Bm1i8IkK-C9EaDq6g.js +26 -0
  89. package/dist/ruby-CZZKXaz8-BxaDEkRP.js +102 -0
  90. package/dist/rust-CIl6NRUt-CIl6NRUt.js +7 -0
  91. package/dist/sankeyDiagram-0acdec17-B4vNjMaS-Bauvtonp.js +816 -0
  92. package/dist/sass-LqXmC1Fh-LqXmC1Fh.js +8 -0
  93. package/dist/scss-DjxgF7f7-DGTzny6p.js +98 -0
  94. package/dist/sequenceDiagram-c18d009d-BniqGSPK-DuYYUmiZ.js +2201 -0
  95. package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +7 -0
  96. package/dist/shellsession-BIPXtZci-D6avbCwN.js +9 -0
  97. package/dist/splunk-C0K00wNV-C0K00wNV.js +7 -0
  98. package/dist/sql-DkzN59UV-DkzN59UV.js +27 -0
  99. package/dist/ssh-config-BbWAW6SY-BbWAW6SY.js +7 -0
  100. package/dist/stateDiagram-43596fc0-F0V9suMd-L2Ywe-J_.js +266 -0
  101. package/dist/stateDiagram-v2-2ead4f9c-DUgJH8tF-BVo1q2i1.js +184 -0
  102. package/dist/style.css +1 -1
  103. package/dist/styles-6860f46c-Dflmq0ac-BRNSwis6.js +1089 -0
  104. package/dist/styles-7383a064-Dg7mXkpq-C4bItohl.js +430 -0
  105. package/dist/styles-b2c874b6-HpcOhE4Y-Bj0upXzO.js +960 -0
  106. package/dist/stylus-CAHdVuhm-CAHdVuhm.js +21 -0
  107. package/dist/svelte-DAxjO8Sh-D0e501jC.js +29 -0
  108. package/dist/svgDrawCommon-0ee1b4e9-CNkCfzsJ-Bz_doYLk.js +64 -0
  109. package/dist/swift-x2DVyVjN-Bz5PC9YM.js +550 -0
  110. package/dist/timeline-definition-d977decf-Cl38e_0g-D_Dlqa-R.js +794 -0
  111. package/dist/toml-Dbtbfmwk-Dbtbfmwk.js +75 -0
  112. package/dist/tsx-BmwsDeeh-BmwsDeeh.js +705 -0
  113. package/dist/twig-B_Gr-ODl-Cl9Q0GWo.js +58 -0
  114. package/dist/types/components/DocumentationContent.vue.d.ts +8 -1
  115. package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -1
  116. package/dist/types/components/DocumentationDisplay.vue.d.ts +5 -1
  117. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -1
  118. package/dist/types/components/ProductDocumentModal.vue.d.ts +1 -1
  119. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -1
  120. package/dist/types/composables/useI18n.d.ts +4 -0
  121. package/dist/types/composables/useI18n.d.ts.map +1 -1
  122. package/dist/typescript-AEg-ehu7-AEg-ehu7.js +672 -0
  123. package/dist/v-BuvBsUKm-BuvBsUKm.js +7 -0
  124. package/dist/vb-cqjo5dul-cqjo5dul.js +7 -0
  125. package/dist/viml-h3ATW6He-h3ATW6He.js +7 -0
  126. package/dist/vue-Dz-azHaT-B9qBHMZi.js +71 -0
  127. package/dist/vue-html-DIGKAAs4-BeHSIJcx.js +11 -0
  128. package/dist/wasm-xOGcJ9Ts-xOGcJ9Ts.js +7 -0
  129. package/dist/wgsl-hGLOfCya-hGLOfCya.js +7 -0
  130. package/dist/xml-CfRpfi_B-BH3JRQfc.js +9 -0
  131. package/dist/xsl-BAqhSCYL-BTKPZRNQ.js +9 -0
  132. package/dist/xychartDiagram-e50adddc-JdLmRUgg-HmDalTeo.js +1282 -0
  133. package/dist/yaml-PGla5xPP-HJurM_FJ.js +206 -0
  134. package/package.json +13 -13
  135. package/dist/prism-bash.min-DDo5CyRs-DihCfXgx.js +0 -7
  136. package/dist/prism-css.min-BrrzZC7b-BrrzZC7b.js +0 -7
  137. package/dist/prism-docker.min-DnIEokC3-D0v8IWN_.js +0 -22
  138. package/dist/prism-go.min-C7UmK6TW-C7UmK6TW.js +0 -1
  139. package/dist/prism-http.min-CsU3-jB8-CQ8PCDXl.js +0 -23
  140. package/dist/prism-javascript.min-CEqHqgbm-CEqHqgbm.js +0 -8
  141. package/dist/prism-jq.min-Q555vXZm-Q555vXZm.js +0 -8
  142. package/dist/prism-json.min-B1GJqK1k-B1GJqK1k.js +0 -1
  143. package/dist/prism-log.min-SDopTpKN-SDopTpKN.js +0 -1
  144. package/dist/prism-lua.min-DwRnUVfS-DwRnUVfS.js +0 -1
  145. package/dist/prism-makefile.min-DyutknhE-DyutknhE.js +0 -1
  146. package/dist/prism-markdown.min-B7US-xc7-DB9aF_ZA.js +0 -63
  147. package/dist/prism-python.min-BIfpAh5K-BIfpAh5K.js +0 -1
  148. package/dist/prism-regex.min-f8DNqi8X-f8DNqi8X.js +0 -4
  149. package/dist/prism-rest.min-B6veHRJF-B6veHRJF.js +0 -1
  150. package/dist/prism-rust.min-Cb-Mi-h0-Cb-Mi-h0.js +0 -9
  151. package/dist/prism-scss.min-B0csyGJo-B0csyGJo.js +0 -1
  152. package/dist/prism-sql.min-BHXzX-c_-BHXzX-c_.js +0 -1
  153. package/dist/prism-typescript.min-oSVeWCAd-oSVeWCAd.js +0 -5
  154. package/dist/prism-xml-doc.min-yj0YzRGe-KgTQx-dc.js +0 -7
  155. package/dist/prism-yaml.min-CTetcdKA-C1YzP_OY.js +0 -28
@@ -0,0 +1,1224 @@
1
+ import { c as fe, b0 as ie, h as q, i as me, l as L, z as _e, aj as ke, o as Ee } from "./index-B-5DuDrq.js";
2
+ import { a as De } from "./clone-p6h9XXNm-3JQ-HRC6.js";
3
+ import { h as we, u as ve, d as Ne, g as $e, o as ge, f as Te } from "./edges-d417c7a0-C1ggiwWz-Aj0OUf7e.js";
4
+ import { Z as Oe } from "./graph-4FyIWFHN-774TpNLL.js";
5
+ import { h as Ie } from "./ordinal-MUacOSdK-B1MUT0BL.js";
6
+ import { t as Ae } from "./channel-DHTQ8Ynn-7OPGex2S.js";
7
+ import { r as Ce } from "./Tableau10-GLA_9iAD-BMurskAd.js";
8
+ var le, ae, ee = function() {
9
+ var e = function(m, i, r, o) {
10
+ for (r = r || {}, o = m.length; o--; r[m[o]] = i)
11
+ ;
12
+ return r;
13
+ }, l = [1, 7], h = [1, 13], c = [1, 14], n = [1, 15], g = [1, 19], a = [1, 16], y = [1, 17], b = [1, 18], d = [8, 30], x = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], _ = [1, 23], T = [1, 24], k = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], v = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], S = [1, 49], D = {
14
+ trace: function() {
15
+ },
16
+ yy: {},
17
+ symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, seperator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, block: 31, NODE_ID: 32, nodeShapeNLabel: 33, dirList: 34, DIR: 35, NODE_DSTART: 36, NODE_DEND: 37, BLOCK_ARROW_START: 38, BLOCK_ARROW_END: 39, classDef: 40, CLASSDEF_ID: 41, CLASSDEF_STYLEOPTS: 42, DEFAULT: 43, class: 44, CLASSENTITY_IDS: 45, STYLECLASS: 46, style: 47, STYLE_ENTITY_IDS: 48, STYLE_DEFINITION_DATA: 49, $accept: 0, $end: 1 },
18
+ terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" },
19
+ productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
20
+ performAction: function(m, i, r, o, p, t, u) {
21
+ var s = t.length - 1;
22
+ switch (p) {
23
+ case 4:
24
+ o.getLogger().debug("Rule: seperator (NL) ");
25
+ break;
26
+ case 5:
27
+ o.getLogger().debug("Rule: seperator (Space) ");
28
+ break;
29
+ case 6:
30
+ o.getLogger().debug("Rule: seperator (EOF) ");
31
+ break;
32
+ case 7:
33
+ o.getLogger().debug("Rule: hierarchy: ", t[s - 1]), o.setHierarchy(t[s - 1]);
34
+ break;
35
+ case 8:
36
+ o.getLogger().debug("Stop NL ");
37
+ break;
38
+ case 9:
39
+ o.getLogger().debug("Stop EOF ");
40
+ break;
41
+ case 10:
42
+ o.getLogger().debug("Stop NL2 ");
43
+ break;
44
+ case 11:
45
+ o.getLogger().debug("Stop EOF2 ");
46
+ break;
47
+ case 12:
48
+ o.getLogger().debug("Rule: statement: ", t[s]), typeof t[s].length == "number" ? this.$ = t[s] : this.$ = [t[s]];
49
+ break;
50
+ case 13:
51
+ o.getLogger().debug("Rule: statement #2: ", t[s - 1]), this.$ = [t[s - 1]].concat(t[s]);
52
+ break;
53
+ case 14:
54
+ o.getLogger().debug("Rule: link: ", t[s], m), this.$ = { edgeTypeStr: t[s], label: "" };
55
+ break;
56
+ case 15:
57
+ o.getLogger().debug("Rule: LABEL link: ", t[s - 3], t[s - 1], t[s]), this.$ = { edgeTypeStr: t[s], label: t[s - 1] };
58
+ break;
59
+ case 18:
60
+ const O = parseInt(t[s]), B = o.generateId();
61
+ this.$ = { id: B, type: "space", label: "", width: O, children: [] };
62
+ break;
63
+ case 23:
64
+ o.getLogger().debug("Rule: (nodeStatement link node) ", t[s - 2], t[s - 1], t[s], " typestr: ", t[s - 1].edgeTypeStr);
65
+ const X = o.edgeStrToEdgeData(t[s - 1].edgeTypeStr);
66
+ this.$ = [
67
+ { id: t[s - 2].id, label: t[s - 2].label, type: t[s - 2].type, directions: t[s - 2].directions },
68
+ { id: t[s - 2].id + "-" + t[s].id, start: t[s - 2].id, end: t[s].id, label: t[s - 1].label, type: "edge", directions: t[s].directions, arrowTypeEnd: X, arrowTypeStart: "arrow_open" },
69
+ { id: t[s].id, label: t[s].label, type: o.typeStr2Type(t[s].typeStr), directions: t[s].directions }
70
+ ];
71
+ break;
72
+ case 24:
73
+ o.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[s - 1], t[s]), this.$ = { id: t[s - 1].id, label: t[s - 1].label, type: o.typeStr2Type(t[s - 1].typeStr), directions: t[s - 1].directions, widthInColumns: parseInt(t[s], 10) };
74
+ break;
75
+ case 25:
76
+ o.getLogger().debug("Rule: nodeStatement (node) ", t[s]), this.$ = { id: t[s].id, label: t[s].label, type: o.typeStr2Type(t[s].typeStr), directions: t[s].directions, widthInColumns: 1 };
77
+ break;
78
+ case 26:
79
+ o.getLogger().debug("APA123", this ? this : "na"), o.getLogger().debug("COLUMNS: ", t[s]), this.$ = { type: "column-setting", columns: t[s] === "auto" ? -1 : parseInt(t[s]) };
80
+ break;
81
+ case 27:
82
+ o.getLogger().debug("Rule: id-block statement : ", t[s - 2], t[s - 1]), o.generateId(), this.$ = { ...t[s - 2], type: "composite", children: t[s - 1] };
83
+ break;
84
+ case 28:
85
+ o.getLogger().debug("Rule: blockStatement : ", t[s - 2], t[s - 1], t[s]);
86
+ const C = o.generateId();
87
+ this.$ = { id: C, type: "composite", label: "", children: t[s - 1] };
88
+ break;
89
+ case 29:
90
+ o.getLogger().debug("Rule: node (NODE_ID seperator): ", t[s]), this.$ = { id: t[s] };
91
+ break;
92
+ case 30:
93
+ o.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel seperator): ", t[s - 1], t[s]), this.$ = { id: t[s - 1], label: t[s].label, typeStr: t[s].typeStr, directions: t[s].directions };
94
+ break;
95
+ case 31:
96
+ o.getLogger().debug("Rule: dirList: ", t[s]), this.$ = [t[s]];
97
+ break;
98
+ case 32:
99
+ o.getLogger().debug("Rule: dirList: ", t[s - 1], t[s]), this.$ = [t[s - 1]].concat(t[s]);
100
+ break;
101
+ case 33:
102
+ o.getLogger().debug("Rule: nodeShapeNLabel: ", t[s - 2], t[s - 1], t[s]), this.$ = { typeStr: t[s - 2] + t[s], label: t[s - 1] };
103
+ break;
104
+ case 34:
105
+ o.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[s - 3], t[s - 2], " #3:", t[s - 1], t[s]), this.$ = { typeStr: t[s - 3] + t[s], label: t[s - 2], directions: t[s - 1] };
106
+ break;
107
+ case 35:
108
+ case 36:
109
+ this.$ = { type: "classDef", id: t[s - 1].trim(), css: t[s].trim() };
110
+ break;
111
+ case 37:
112
+ this.$ = { type: "applyClass", id: t[s - 1].trim(), styleClass: t[s].trim() };
113
+ break;
114
+ case 38:
115
+ this.$ = { type: "applyStyles", id: t[s - 1].trim(), stylesStr: t[s].trim() };
116
+ break;
117
+ }
118
+ },
119
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: l, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: h, 29: c, 31: n, 32: g, 40: a, 44: y, 47: b }, { 8: [1, 20] }, e(d, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: l, 28: h, 29: c, 31: n, 32: g, 40: a, 44: y, 47: b }), e(x, [2, 16], { 14: 22, 15: _, 16: T }), e(x, [2, 17]), e(x, [2, 18]), e(x, [2, 19]), e(x, [2, 20]), e(x, [2, 21]), e(x, [2, 22]), e(k, [2, 25], { 27: [1, 25] }), e(x, [2, 26]), { 19: 26, 26: 12, 32: g }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: l, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: h, 29: c, 31: n, 32: g, 40: a, 44: y, 47: b }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(v, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(d, [2, 13]), { 26: 35, 32: g }, { 32: [2, 14] }, { 17: [1, 36] }, e(k, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: _, 16: T, 19: 5, 20: 6, 21: l, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: h, 29: c, 31: n, 32: g, 40: a, 44: y, 47: b }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(v, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(k, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(x, [2, 28]), e(x, [2, 35]), e(x, [2, 36]), e(x, [2, 37]), e(x, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: S }, { 15: [1, 50] }, e(x, [2, 27]), e(v, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: S, 39: [2, 31] }, { 32: [2, 15] }, e(v, [2, 34]), { 39: [2, 32] }],
120
+ defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
121
+ parseError: function(m, i) {
122
+ if (i.recoverable)
123
+ this.trace(m);
124
+ else {
125
+ var r = new Error(m);
126
+ throw r.hash = i, r;
127
+ }
128
+ },
129
+ parse: function(m) {
130
+ var i = this, r = [0], o = [], p = [null], t = [], u = this.table, s = "", O = 0, B = 0, X = 2, C = 1, F = t.slice.call(arguments, 1), E = Object.create(this.lexer), P = { yy: {} };
131
+ for (var J in this.yy)
132
+ Object.prototype.hasOwnProperty.call(this.yy, J) && (P.yy[J] = this.yy[J]);
133
+ E.setInput(m, P.yy), P.yy.lexer = E, P.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
134
+ var Z = E.yylloc;
135
+ t.push(Z);
136
+ var Le = E.options && E.options.ranges;
137
+ typeof P.yy.parseError == "function" ? this.parseError = P.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
138
+ function Se() {
139
+ var R;
140
+ return R = o.pop() || E.lex() || C, typeof R != "number" && (R instanceof Array && (o = R, R = o.pop()), R = i.symbols_[R] || R), R;
141
+ }
142
+ for (var N, Y, I, V, K = {}, j, z, oe, H; ; ) {
143
+ if (Y = r[r.length - 1], this.defaultActions[Y] ? I = this.defaultActions[Y] : ((N === null || typeof N > "u") && (N = Se()), I = u[Y] && u[Y][N]), typeof I > "u" || !I.length || !I[0]) {
144
+ var Q = "";
145
+ H = [];
146
+ for (j in u[Y])
147
+ this.terminals_[j] && j > X && H.push("'" + this.terminals_[j] + "'");
148
+ E.showPosition ? Q = "Parse error on line " + (O + 1) + `:
149
+ ` + E.showPosition() + `
150
+ Expecting ` + H.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : Q = "Parse error on line " + (O + 1) + ": Unexpected " + (N == C ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(Q, {
151
+ text: E.match,
152
+ token: this.terminals_[N] || N,
153
+ line: E.yylineno,
154
+ loc: Z,
155
+ expected: H
156
+ });
157
+ }
158
+ if (I[0] instanceof Array && I.length > 1)
159
+ throw new Error("Parse Error: multiple actions possible at state: " + Y + ", token: " + N);
160
+ switch (I[0]) {
161
+ case 1:
162
+ r.push(N), p.push(E.yytext), t.push(E.yylloc), r.push(I[1]), N = null, B = E.yyleng, s = E.yytext, O = E.yylineno, Z = E.yylloc;
163
+ break;
164
+ case 2:
165
+ if (z = this.productions_[I[1]][1], K.$ = p[p.length - z], K._$ = {
166
+ first_line: t[t.length - (z || 1)].first_line,
167
+ last_line: t[t.length - 1].last_line,
168
+ first_column: t[t.length - (z || 1)].first_column,
169
+ last_column: t[t.length - 1].last_column
170
+ }, Le && (K._$.range = [
171
+ t[t.length - (z || 1)].range[0],
172
+ t[t.length - 1].range[1]
173
+ ]), V = this.performAction.apply(K, [
174
+ s,
175
+ B,
176
+ O,
177
+ P.yy,
178
+ I[1],
179
+ p,
180
+ t
181
+ ].concat(F)), typeof V < "u")
182
+ return V;
183
+ z && (r = r.slice(0, -1 * z * 2), p = p.slice(0, -1 * z), t = t.slice(0, -1 * z)), r.push(this.productions_[I[1]][0]), p.push(K.$), t.push(K._$), oe = u[r[r.length - 2]][r[r.length - 1]], r.push(oe);
184
+ break;
185
+ case 3:
186
+ return !0;
187
+ }
188
+ }
189
+ return !0;
190
+ }
191
+ }, A = /* @__PURE__ */ function() {
192
+ var m = {
193
+ EOF: 1,
194
+ parseError: function(i, r) {
195
+ if (this.yy.parser)
196
+ this.yy.parser.parseError(i, r);
197
+ else
198
+ throw new Error(i);
199
+ },
200
+ // resets the lexer, sets new input
201
+ setInput: function(i, r) {
202
+ return this.yy = r || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
203
+ first_line: 1,
204
+ first_column: 0,
205
+ last_line: 1,
206
+ last_column: 0
207
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
208
+ },
209
+ // consumes and returns one char from the input
210
+ input: function() {
211
+ var i = this._input[0];
212
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
213
+ var r = i.match(/(?:\r\n?|\n).*/g);
214
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
215
+ },
216
+ // unshifts one char (or a string) into the input
217
+ unput: function(i) {
218
+ var r = i.length, o = i.split(/(?:\r\n?|\n)/g);
219
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
220
+ var p = this.match.split(/(?:\r\n?|\n)/g);
221
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
222
+ var t = this.yylloc.range;
223
+ return this.yylloc = {
224
+ first_line: this.yylloc.first_line,
225
+ last_line: this.yylineno + 1,
226
+ first_column: this.yylloc.first_column,
227
+ last_column: o ? (o.length === p.length ? this.yylloc.first_column : 0) + p[p.length - o.length].length - o[0].length : this.yylloc.first_column - r
228
+ }, this.options.ranges && (this.yylloc.range = [t[0], t[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
229
+ },
230
+ // When called from action, caches matched text and appends it on next action
231
+ more: function() {
232
+ return this._more = !0, this;
233
+ },
234
+ // 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.
235
+ reject: function() {
236
+ if (this.options.backtrack_lexer)
237
+ this._backtrack = !0;
238
+ else
239
+ 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).
240
+ ` + this.showPosition(), {
241
+ text: "",
242
+ token: null,
243
+ line: this.yylineno
244
+ });
245
+ return this;
246
+ },
247
+ // retain first n characters of the match
248
+ less: function(i) {
249
+ this.unput(this.match.slice(i));
250
+ },
251
+ // displays already matched input, i.e. for error messages
252
+ pastInput: function() {
253
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
254
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
255
+ },
256
+ // displays upcoming input, i.e. for error messages
257
+ upcomingInput: function() {
258
+ var i = this.match;
259
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
260
+ },
261
+ // displays the character position where the lexing error occurred, i.e. for error messages
262
+ showPosition: function() {
263
+ var i = this.pastInput(), r = new Array(i.length + 1).join("-");
264
+ return i + this.upcomingInput() + `
265
+ ` + r + "^";
266
+ },
267
+ // test the lexed token: return FALSE when not a match, otherwise return token
268
+ test_match: function(i, r) {
269
+ var o, p, t;
270
+ if (this.options.backtrack_lexer && (t = {
271
+ yylineno: this.yylineno,
272
+ yylloc: {
273
+ first_line: this.yylloc.first_line,
274
+ last_line: this.last_line,
275
+ first_column: this.yylloc.first_column,
276
+ last_column: this.yylloc.last_column
277
+ },
278
+ yytext: this.yytext,
279
+ match: this.match,
280
+ matches: this.matches,
281
+ matched: this.matched,
282
+ yyleng: this.yyleng,
283
+ offset: this.offset,
284
+ _more: this._more,
285
+ _input: this._input,
286
+ yy: this.yy,
287
+ conditionStack: this.conditionStack.slice(0),
288
+ done: this.done
289
+ }, this.options.ranges && (t.yylloc.range = this.yylloc.range.slice(0))), p = i[0].match(/(?:\r\n?|\n).*/g), p && (this.yylineno += p.length), this.yylloc = {
290
+ first_line: this.yylloc.last_line,
291
+ last_line: this.yylineno + 1,
292
+ first_column: this.yylloc.last_column,
293
+ last_column: p ? p[p.length - 1].length - p[p.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
294
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], o = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
295
+ return o;
296
+ if (this._backtrack) {
297
+ for (var u in t)
298
+ this[u] = t[u];
299
+ return !1;
300
+ }
301
+ return !1;
302
+ },
303
+ // return next match in input
304
+ next: function() {
305
+ if (this.done)
306
+ return this.EOF;
307
+ this._input || (this.done = !0);
308
+ var i, r, o, p;
309
+ this._more || (this.yytext = "", this.match = "");
310
+ for (var t = this._currentRules(), u = 0; u < t.length; u++)
311
+ if (o = this._input.match(this.rules[t[u]]), o && (!r || o[0].length > r[0].length)) {
312
+ if (r = o, p = u, this.options.backtrack_lexer) {
313
+ if (i = this.test_match(o, t[u]), i !== !1)
314
+ return i;
315
+ if (this._backtrack) {
316
+ r = !1;
317
+ continue;
318
+ } else
319
+ return !1;
320
+ } else if (!this.options.flex)
321
+ break;
322
+ }
323
+ return r ? (i = this.test_match(r, t[p]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
324
+ ` + this.showPosition(), {
325
+ text: "",
326
+ token: null,
327
+ line: this.yylineno
328
+ });
329
+ },
330
+ // return next match that has a token
331
+ lex: function() {
332
+ var i = this.next();
333
+ return i || this.lex();
334
+ },
335
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
336
+ begin: function(i) {
337
+ this.conditionStack.push(i);
338
+ },
339
+ // pop the previously active lexer condition state off the condition stack
340
+ popState: function() {
341
+ var i = this.conditionStack.length - 1;
342
+ return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
343
+ },
344
+ // produce the lexer rule set which is active for the currently active lexer condition state
345
+ _currentRules: function() {
346
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
347
+ },
348
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
349
+ topState: function(i) {
350
+ return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
351
+ },
352
+ // alias for begin(condition)
353
+ pushState: function(i) {
354
+ this.begin(i);
355
+ },
356
+ // return the number of states currently on the stack
357
+ stateStackSize: function() {
358
+ return this.conditionStack.length;
359
+ },
360
+ options: {},
361
+ performAction: function(i, r, o, p) {
362
+ switch (o) {
363
+ case 0:
364
+ return 10;
365
+ case 1:
366
+ return i.getLogger().debug("Found space-block"), 31;
367
+ case 2:
368
+ return i.getLogger().debug("Found nl-block"), 31;
369
+ case 3:
370
+ return i.getLogger().debug("Found space-block"), 29;
371
+ case 4:
372
+ i.getLogger().debug(".", r.yytext);
373
+ break;
374
+ case 5:
375
+ i.getLogger().debug("_", r.yytext);
376
+ break;
377
+ case 6:
378
+ return 5;
379
+ case 7:
380
+ return r.yytext = -1, 28;
381
+ case 8:
382
+ return r.yytext = r.yytext.replace(/columns\s+/, ""), i.getLogger().debug("COLUMNS (LEX)", r.yytext), 28;
383
+ case 9:
384
+ this.pushState("md_string");
385
+ break;
386
+ case 10:
387
+ return "MD_STR";
388
+ case 11:
389
+ this.popState();
390
+ break;
391
+ case 12:
392
+ this.pushState("string");
393
+ break;
394
+ case 13:
395
+ i.getLogger().debug("LEX: POPPING STR:", r.yytext), this.popState();
396
+ break;
397
+ case 14:
398
+ return i.getLogger().debug("LEX: STR end:", r.yytext), "STR";
399
+ case 15:
400
+ return r.yytext = r.yytext.replace(/space\:/, ""), i.getLogger().debug("SPACE NUM (LEX)", r.yytext), 21;
401
+ case 16:
402
+ return r.yytext = "1", i.getLogger().debug("COLUMNS (LEX)", r.yytext), 21;
403
+ case 17:
404
+ return 43;
405
+ case 18:
406
+ return "LINKSTYLE";
407
+ case 19:
408
+ return "INTERPOLATE";
409
+ case 20:
410
+ return this.pushState("CLASSDEF"), 40;
411
+ case 21:
412
+ return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
413
+ case 22:
414
+ return this.popState(), this.pushState("CLASSDEFID"), 41;
415
+ case 23:
416
+ return this.popState(), 42;
417
+ case 24:
418
+ return this.pushState("CLASS"), 44;
419
+ case 25:
420
+ return this.popState(), this.pushState("CLASS_STYLE"), 45;
421
+ case 26:
422
+ return this.popState(), 46;
423
+ case 27:
424
+ return this.pushState("STYLE_STMNT"), 47;
425
+ case 28:
426
+ return this.popState(), this.pushState("STYLE_DEFINITION"), 48;
427
+ case 29:
428
+ return this.popState(), 49;
429
+ case 30:
430
+ return this.pushState("acc_title"), "acc_title";
431
+ case 31:
432
+ return this.popState(), "acc_title_value";
433
+ case 32:
434
+ return this.pushState("acc_descr"), "acc_descr";
435
+ case 33:
436
+ return this.popState(), "acc_descr_value";
437
+ case 34:
438
+ this.pushState("acc_descr_multiline");
439
+ break;
440
+ case 35:
441
+ this.popState();
442
+ break;
443
+ case 36:
444
+ return "acc_descr_multiline_value";
445
+ case 37:
446
+ return 30;
447
+ case 38:
448
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
449
+ case 39:
450
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
451
+ case 40:
452
+ return this.popState(), i.getLogger().debug("Lex: ))"), "NODE_DEND";
453
+ case 41:
454
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
455
+ case 42:
456
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
457
+ case 43:
458
+ return this.popState(), i.getLogger().debug("Lex: (-"), "NODE_DEND";
459
+ case 44:
460
+ return this.popState(), i.getLogger().debug("Lex: -)"), "NODE_DEND";
461
+ case 45:
462
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
463
+ case 46:
464
+ return this.popState(), i.getLogger().debug("Lex: ]]"), "NODE_DEND";
465
+ case 47:
466
+ return this.popState(), i.getLogger().debug("Lex: ("), "NODE_DEND";
467
+ case 48:
468
+ return this.popState(), i.getLogger().debug("Lex: ])"), "NODE_DEND";
469
+ case 49:
470
+ return this.popState(), i.getLogger().debug("Lex: /]"), "NODE_DEND";
471
+ case 50:
472
+ return this.popState(), i.getLogger().debug("Lex: /]"), "NODE_DEND";
473
+ case 51:
474
+ return this.popState(), i.getLogger().debug("Lex: )]"), "NODE_DEND";
475
+ case 52:
476
+ return this.popState(), i.getLogger().debug("Lex: )"), "NODE_DEND";
477
+ case 53:
478
+ return this.popState(), i.getLogger().debug("Lex: ]>"), "NODE_DEND";
479
+ case 54:
480
+ return this.popState(), i.getLogger().debug("Lex: ]"), "NODE_DEND";
481
+ case 55:
482
+ return i.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 36;
483
+ case 56:
484
+ return i.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 36;
485
+ case 57:
486
+ return i.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 36;
487
+ case 58:
488
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
489
+ case 59:
490
+ return i.getLogger().debug("Lex: ((("), this.pushState("NODE"), 36;
491
+ case 60:
492
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
493
+ case 61:
494
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
495
+ case 62:
496
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
497
+ case 63:
498
+ return i.getLogger().debug("Lexc: >"), this.pushState("NODE"), 36;
499
+ case 64:
500
+ return i.getLogger().debug("Lexa: (["), this.pushState("NODE"), 36;
501
+ case 65:
502
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
503
+ case 66:
504
+ return this.pushState("NODE"), 36;
505
+ case 67:
506
+ return this.pushState("NODE"), 36;
507
+ case 68:
508
+ return this.pushState("NODE"), 36;
509
+ case 69:
510
+ return this.pushState("NODE"), 36;
511
+ case 70:
512
+ return this.pushState("NODE"), 36;
513
+ case 71:
514
+ return this.pushState("NODE"), 36;
515
+ case 72:
516
+ return this.pushState("NODE"), 36;
517
+ case 73:
518
+ return i.getLogger().debug("Lexa: ["), this.pushState("NODE"), 36;
519
+ case 74:
520
+ return this.pushState("BLOCK_ARROW"), i.getLogger().debug("LEX ARR START"), 38;
521
+ case 75:
522
+ return i.getLogger().debug("Lex: NODE_ID", r.yytext), 32;
523
+ case 76:
524
+ return i.getLogger().debug("Lex: EOF", r.yytext), 8;
525
+ case 77:
526
+ this.pushState("md_string");
527
+ break;
528
+ case 78:
529
+ this.pushState("md_string");
530
+ break;
531
+ case 79:
532
+ return "NODE_DESCR";
533
+ case 80:
534
+ this.popState();
535
+ break;
536
+ case 81:
537
+ i.getLogger().debug("Lex: Starting string"), this.pushState("string");
538
+ break;
539
+ case 82:
540
+ i.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
541
+ break;
542
+ case 83:
543
+ return i.getLogger().debug("LEX: NODE_DESCR:", r.yytext), "NODE_DESCR";
544
+ case 84:
545
+ i.getLogger().debug("LEX POPPING"), this.popState();
546
+ break;
547
+ case 85:
548
+ i.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
549
+ break;
550
+ case 86:
551
+ return r.yytext = r.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (right): dir:", r.yytext), "DIR";
552
+ case 87:
553
+ return r.yytext = r.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (left):", r.yytext), "DIR";
554
+ case 88:
555
+ return r.yytext = r.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (x):", r.yytext), "DIR";
556
+ case 89:
557
+ return r.yytext = r.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (y):", r.yytext), "DIR";
558
+ case 90:
559
+ return r.yytext = r.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (up):", r.yytext), "DIR";
560
+ case 91:
561
+ return r.yytext = r.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (down):", r.yytext), "DIR";
562
+ case 92:
563
+ return r.yytext = "]>", i.getLogger().debug("Lex (ARROW_DIR end):", r.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
564
+ case 93:
565
+ return i.getLogger().debug("Lex: LINK", "#" + r.yytext + "#"), 15;
566
+ case 94:
567
+ return i.getLogger().debug("Lex: LINK", r.yytext), 15;
568
+ case 95:
569
+ return i.getLogger().debug("Lex: LINK", r.yytext), 15;
570
+ case 96:
571
+ return i.getLogger().debug("Lex: LINK", r.yytext), 15;
572
+ case 97:
573
+ return i.getLogger().debug("Lex: START_LINK", r.yytext), this.pushState("LLABEL"), 16;
574
+ case 98:
575
+ return i.getLogger().debug("Lex: START_LINK", r.yytext), this.pushState("LLABEL"), 16;
576
+ case 99:
577
+ return i.getLogger().debug("Lex: START_LINK", r.yytext), this.pushState("LLABEL"), 16;
578
+ case 100:
579
+ this.pushState("md_string");
580
+ break;
581
+ case 101:
582
+ return i.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
583
+ case 102:
584
+ return this.popState(), i.getLogger().debug("Lex: LINK", "#" + r.yytext + "#"), 15;
585
+ case 103:
586
+ return this.popState(), i.getLogger().debug("Lex: LINK", r.yytext), 15;
587
+ case 104:
588
+ return this.popState(), i.getLogger().debug("Lex: LINK", r.yytext), 15;
589
+ case 105:
590
+ return i.getLogger().debug("Lex: COLON", r.yytext), r.yytext = r.yytext.slice(1), 27;
591
+ }
592
+ },
593
+ rules: [/^(?:block-beta\b)/, /^(?:block\s+)/, /^(?:block\n+)/, /^(?:block:)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
594
+ conditions: { STYLE_DEFINITION: { rules: [29], inclusive: !1 }, STYLE_STMNT: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [23], inclusive: !1 }, CLASSDEF: { rules: [21, 22], inclusive: !1 }, CLASS_STYLE: { rules: [26], inclusive: !1 }, CLASS: { rules: [25], inclusive: !1 }, LLABEL: { rules: [100, 101, 102, 103, 104], inclusive: !1 }, ARROW_DIR: { rules: [86, 87, 88, 89, 90, 91, 92], inclusive: !1 }, BLOCK_ARROW: { rules: [77, 82, 85], inclusive: !1 }, NODE: { rules: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], inclusive: !1 }, md_string: { rules: [10, 11, 79, 80], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [13, 14, 83, 84], inclusive: !1 }, acc_descr_multiline: { rules: [35, 36], inclusive: !1 }, acc_descr: { rules: [33], inclusive: !1 }, acc_title: { rules: [31], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 24, 27, 30, 32, 34, 37, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 93, 94, 95, 96, 97, 98, 99, 105], inclusive: !0 } }
595
+ };
596
+ return m;
597
+ }();
598
+ D.lexer = A;
599
+ function w() {
600
+ this.yy = {};
601
+ }
602
+ return w.prototype = D, D.Parser = w, new w();
603
+ }();
604
+ ee.parser = ee;
605
+ const ze = ee;
606
+ let $ = {}, se = [], M = {};
607
+ const ce = "color", he = "fill", Re = "bgFill", de = ",";
608
+ let W = {};
609
+ const Be = function(e, l = "") {
610
+ W[e] === void 0 && (W[e] = { id: e, styles: [], textStyles: [] });
611
+ const h = W[e];
612
+ l != null && l.split(de).forEach((c) => {
613
+ const n = c.replace(/([^;]*);/, "$1").trim();
614
+ if (c.match(ce)) {
615
+ const g = n.replace(he, Re).replace(ce, he);
616
+ h.textStyles.push(g);
617
+ }
618
+ h.styles.push(n);
619
+ });
620
+ }, Fe = function(e, l = "") {
621
+ const h = $[e];
622
+ l != null && (h.styles = l.split(de));
623
+ }, Pe = function(e, l) {
624
+ e.split(",").forEach(function(h) {
625
+ let c = $[h];
626
+ if (c === void 0) {
627
+ const n = h.trim();
628
+ $[n] = { id: n, type: "na", children: [] }, c = $[n];
629
+ }
630
+ c.classes || (c.classes = []), c.classes.push(l);
631
+ });
632
+ }, ye = (e, l) => {
633
+ const h = e.flat(), c = [];
634
+ for (const n of h) {
635
+ if (n.type === "classDef") {
636
+ Be(n.id, n.css);
637
+ continue;
638
+ }
639
+ if (n.type === "applyClass") {
640
+ Pe(n.id, (n == null ? void 0 : n.styleClass) || "");
641
+ continue;
642
+ }
643
+ if (n.type === "applyStyles") {
644
+ n != null && n.stylesStr && Fe(n.id, n == null ? void 0 : n.stylesStr);
645
+ continue;
646
+ }
647
+ if (n.type === "column-setting")
648
+ l.columns = n.columns || -1;
649
+ else if (n.type === "edge")
650
+ M[n.id] ? M[n.id]++ : M[n.id] = 1, n.id = M[n.id] + "-" + n.id, se.push(n);
651
+ else {
652
+ n.label || (n.type === "composite" ? n.label = "" : n.label = n.id);
653
+ const g = !$[n.id];
654
+ if (g ? $[n.id] = n : (n.type !== "na" && ($[n.id].type = n.type), n.label !== n.id && ($[n.id].label = n.label)), n.children && ye(n.children, n), n.type === "space") {
655
+ const a = n.width || 1;
656
+ for (let y = 0; y < a; y++) {
657
+ const b = De(n);
658
+ b.id = b.id + "-" + y, $[b.id] = b, c.push(b);
659
+ }
660
+ } else
661
+ g && c.push(n);
662
+ }
663
+ }
664
+ l.children = c;
665
+ };
666
+ let re = [], U = { id: "root", type: "composite", children: [], columns: -1 };
667
+ const Ye = () => {
668
+ L.debug("Clear called"), _e(), U = { id: "root", type: "composite", children: [], columns: -1 }, $ = { root: U }, re = [], W = {}, se = [], M = {};
669
+ };
670
+ function Ke(e) {
671
+ switch (L.debug("typeStr2Type", e), e) {
672
+ case "[]":
673
+ return "square";
674
+ case "()":
675
+ return L.debug("we have a round"), "round";
676
+ case "(())":
677
+ return "circle";
678
+ case ">]":
679
+ return "rect_left_inv_arrow";
680
+ case "{}":
681
+ return "diamond";
682
+ case "{{}}":
683
+ return "hexagon";
684
+ case "([])":
685
+ return "stadium";
686
+ case "[[]]":
687
+ return "subroutine";
688
+ case "[()]":
689
+ return "cylinder";
690
+ case "((()))":
691
+ return "doublecircle";
692
+ case "[//]":
693
+ return "lean_right";
694
+ case "[\\\\]":
695
+ return "lean_left";
696
+ case "[/\\]":
697
+ return "trapezoid";
698
+ case "[\\/]":
699
+ return "inv_trapezoid";
700
+ case "<[]>":
701
+ return "block_arrow";
702
+ default:
703
+ return "na";
704
+ }
705
+ }
706
+ function Xe(e) {
707
+ switch (L.debug("typeStr2Type", e), e) {
708
+ case "==":
709
+ return "thick";
710
+ default:
711
+ return "normal";
712
+ }
713
+ }
714
+ function Me(e) {
715
+ switch (e.trim()) {
716
+ case "--x":
717
+ return "arrow_cross";
718
+ case "--o":
719
+ return "arrow_circle";
720
+ default:
721
+ return "arrow_point";
722
+ }
723
+ }
724
+ let ue = 0;
725
+ const We = () => (ue++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + ue), Ue = (e) => {
726
+ U.children = e, ye(e, U), re = U.children;
727
+ }, je = (e) => {
728
+ const l = $[e];
729
+ return l ? l.columns ? l.columns : l.children ? l.children.length : -1 : -1;
730
+ }, He = () => [...Object.values($)], qe = () => re || [], Ge = () => se, Je = (e) => $[e], Ze = (e) => {
731
+ $[e.id] = e;
732
+ }, Ve = () => console, Qe = function() {
733
+ return W;
734
+ }, et = {
735
+ getConfig: () => ie().block,
736
+ typeStr2Type: Ke,
737
+ edgeTypeStr2Type: Xe,
738
+ edgeStrToEdgeData: Me,
739
+ getLogger: Ve,
740
+ getBlocksFlat: He,
741
+ getBlocks: qe,
742
+ getEdges: Ge,
743
+ setHierarchy: Ue,
744
+ getBlock: Je,
745
+ setBlock: Ze,
746
+ getColumns: je,
747
+ getClasses: Qe,
748
+ clear: Ye,
749
+ generateId: We
750
+ }, tt = et, G = (e, l) => {
751
+ const h = Ae, c = h(e, "r"), n = h(e, "g"), g = h(e, "b");
752
+ return ke(c, n, g, l);
753
+ }, it = (e) => `.label {
754
+ font-family: ${e.fontFamily};
755
+ color: ${e.nodeTextColor || e.textColor};
756
+ }
757
+ .cluster-label text {
758
+ fill: ${e.titleColor};
759
+ }
760
+ .cluster-label span,p {
761
+ color: ${e.titleColor};
762
+ }
763
+
764
+
765
+
766
+ .label text,span,p {
767
+ fill: ${e.nodeTextColor || e.textColor};
768
+ color: ${e.nodeTextColor || e.textColor};
769
+ }
770
+
771
+ .node rect,
772
+ .node circle,
773
+ .node ellipse,
774
+ .node polygon,
775
+ .node path {
776
+ fill: ${e.mainBkg};
777
+ stroke: ${e.nodeBorder};
778
+ stroke-width: 1px;
779
+ }
780
+ .flowchart-label text {
781
+ text-anchor: middle;
782
+ }
783
+ // .flowchart-label .text-outer-tspan {
784
+ // text-anchor: middle;
785
+ // }
786
+ // .flowchart-label .text-inner-tspan {
787
+ // text-anchor: start;
788
+ // }
789
+
790
+ .node .label {
791
+ text-align: center;
792
+ }
793
+ .node.clickable {
794
+ cursor: pointer;
795
+ }
796
+
797
+ .arrowheadPath {
798
+ fill: ${e.arrowheadColor};
799
+ }
800
+
801
+ .edgePath .path {
802
+ stroke: ${e.lineColor};
803
+ stroke-width: 2.0px;
804
+ }
805
+
806
+ .flowchart-link {
807
+ stroke: ${e.lineColor};
808
+ fill: none;
809
+ }
810
+
811
+ .edgeLabel {
812
+ background-color: ${e.edgeLabelBackground};
813
+ rect {
814
+ opacity: 0.5;
815
+ background-color: ${e.edgeLabelBackground};
816
+ fill: ${e.edgeLabelBackground};
817
+ }
818
+ text-align: center;
819
+ }
820
+
821
+ /* For html labels only */
822
+ .labelBkg {
823
+ background-color: ${G(e.edgeLabelBackground, 0.5)};
824
+ // background-color:
825
+ }
826
+
827
+ .node .cluster {
828
+ // fill: ${G(e.mainBkg, 0.5)};
829
+ fill: ${G(e.clusterBkg, 0.5)};
830
+ stroke: ${G(e.clusterBorder, 0.2)};
831
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
832
+ stroke-width: 1px;
833
+ }
834
+
835
+ .cluster text {
836
+ fill: ${e.titleColor};
837
+ }
838
+
839
+ .cluster span,p {
840
+ color: ${e.titleColor};
841
+ }
842
+ /* .cluster div {
843
+ color: ${e.titleColor};
844
+ } */
845
+
846
+ div.mermaidTooltip {
847
+ position: absolute;
848
+ text-align: center;
849
+ max-width: 200px;
850
+ padding: 2px;
851
+ font-family: ${e.fontFamily};
852
+ font-size: 12px;
853
+ background: ${e.tertiaryColor};
854
+ border: 1px solid ${e.border2};
855
+ border-radius: 2px;
856
+ pointer-events: none;
857
+ z-index: 100;
858
+ }
859
+
860
+ .flowchartTitleText {
861
+ text-anchor: middle;
862
+ font-size: 18px;
863
+ fill: ${e.textColor};
864
+ }
865
+ `, st = it;
866
+ function pe(e, l, h = !1) {
867
+ var c, n, g;
868
+ const a = e;
869
+ let y = "default";
870
+ (((c = a == null ? void 0 : a.classes) == null ? void 0 : c.length) || 0) > 0 && (y = ((a == null ? void 0 : a.classes) || []).join(" ")), y = y + " flowchart-label";
871
+ let b = 0, d = "", x;
872
+ switch (a.type) {
873
+ case "round":
874
+ b = 5, d = "rect";
875
+ break;
876
+ case "composite":
877
+ b = 0, d = "composite", x = 0;
878
+ break;
879
+ case "square":
880
+ d = "rect";
881
+ break;
882
+ case "diamond":
883
+ d = "question";
884
+ break;
885
+ case "hexagon":
886
+ d = "hexagon";
887
+ break;
888
+ case "block_arrow":
889
+ d = "block_arrow";
890
+ break;
891
+ case "odd":
892
+ d = "rect_left_inv_arrow";
893
+ break;
894
+ case "lean_right":
895
+ d = "lean_right";
896
+ break;
897
+ case "lean_left":
898
+ d = "lean_left";
899
+ break;
900
+ case "trapezoid":
901
+ d = "trapezoid";
902
+ break;
903
+ case "inv_trapezoid":
904
+ d = "inv_trapezoid";
905
+ break;
906
+ case "rect_left_inv_arrow":
907
+ d = "rect_left_inv_arrow";
908
+ break;
909
+ case "circle":
910
+ d = "circle";
911
+ break;
912
+ case "ellipse":
913
+ d = "ellipse";
914
+ break;
915
+ case "stadium":
916
+ d = "stadium";
917
+ break;
918
+ case "subroutine":
919
+ d = "subroutine";
920
+ break;
921
+ case "cylinder":
922
+ d = "cylinder";
923
+ break;
924
+ case "group":
925
+ d = "rect";
926
+ break;
927
+ case "doublecircle":
928
+ d = "doublecircle";
929
+ break;
930
+ default:
931
+ d = "rect";
932
+ }
933
+ const _ = Ee((a == null ? void 0 : a.styles) || []), T = a.label, k = a.size || { width: 0, height: 0, x: 0, y: 0 };
934
+ return {
935
+ labelStyle: _.labelStyle,
936
+ shape: d,
937
+ labelText: T,
938
+ rx: b,
939
+ ry: b,
940
+ class: y,
941
+ style: _.style,
942
+ id: a.id,
943
+ directions: a.directions,
944
+ width: k.width,
945
+ height: k.height,
946
+ x: k.x,
947
+ y: k.y,
948
+ positioned: h,
949
+ intersect: void 0,
950
+ type: a.type,
951
+ padding: x ?? (((g = (n = ie()) == null ? void 0 : n.block) == null ? void 0 : g.padding) || 0)
952
+ };
953
+ }
954
+ async function rt(e, l, h) {
955
+ const c = pe(l, h, !1);
956
+ if (c.type === "group")
957
+ return;
958
+ const n = await ge(e, c), g = n.node().getBBox(), a = h.getBlock(c.id);
959
+ a.size = { width: g.width, height: g.height, x: 0, y: 0, node: n }, h.setBlock(a), n.remove();
960
+ }
961
+ async function nt(e, l, h) {
962
+ const c = pe(l, h, !0);
963
+ h.getBlock(c.id).type !== "space" && (await ge(e, c), l.intersect = c == null ? void 0 : c.intersect, Te(c));
964
+ }
965
+ async function ne(e, l, h, c) {
966
+ for (const n of l)
967
+ await c(e, n, h), n.children && await ne(e, n.children, h, c);
968
+ }
969
+ async function ot(e, l, h) {
970
+ await ne(e, l, h, rt);
971
+ }
972
+ async function lt(e, l, h) {
973
+ await ne(e, l, h, nt);
974
+ }
975
+ async function at(e, l, h, c, n) {
976
+ const g = new Oe({
977
+ multigraph: !0,
978
+ compound: !0
979
+ });
980
+ g.setGraph({
981
+ rankdir: "TB",
982
+ nodesep: 10,
983
+ ranksep: 10,
984
+ marginx: 8,
985
+ marginy: 8
986
+ });
987
+ for (const a of h)
988
+ a.size && g.setNode(a.id, {
989
+ width: a.size.width,
990
+ height: a.size.height,
991
+ intersect: a.intersect
992
+ });
993
+ for (const a of l)
994
+ if (a.start && a.end) {
995
+ const y = c.getBlock(a.start), b = c.getBlock(a.end);
996
+ if (y != null && y.size && b != null && b.size) {
997
+ const d = y.size, x = b.size, _ = [
998
+ { x: d.x, y: d.y },
999
+ { x: d.x + (x.x - d.x) / 2, y: d.y + (x.y - d.y) / 2 },
1000
+ { x: x.x, y: x.y }
1001
+ ];
1002
+ await ve(
1003
+ e,
1004
+ { v: a.start, w: a.end, name: a.id },
1005
+ {
1006
+ ...a,
1007
+ arrowTypeEnd: a.arrowTypeEnd,
1008
+ arrowTypeStart: a.arrowTypeStart,
1009
+ points: _,
1010
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1011
+ },
1012
+ void 0,
1013
+ "block",
1014
+ g,
1015
+ n
1016
+ ), a.label && (await Ne(e, {
1017
+ ...a,
1018
+ label: a.label,
1019
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1020
+ arrowTypeEnd: a.arrowTypeEnd,
1021
+ arrowTypeStart: a.arrowTypeStart,
1022
+ points: _,
1023
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1024
+ }), await $e(
1025
+ { ...a, x: _[1].x, y: _[1].y },
1026
+ {
1027
+ originalPath: _
1028
+ }
1029
+ ));
1030
+ }
1031
+ }
1032
+ }
1033
+ const f = ((ae = (le = fe()) == null ? void 0 : le.block) == null ? void 0 : ae.padding) || 8;
1034
+ function ct(e, l) {
1035
+ if (e === 0 || !Number.isInteger(e))
1036
+ throw new Error("Columns must be an integer !== 0.");
1037
+ if (l < 0 || !Number.isInteger(l))
1038
+ throw new Error("Position must be a non-negative integer." + l);
1039
+ if (e < 0)
1040
+ return { px: l, py: 0 };
1041
+ if (e === 1)
1042
+ return { px: 0, py: l };
1043
+ const h = l % e, c = Math.floor(l / e);
1044
+ return { px: h, py: c };
1045
+ }
1046
+ const ht = (e) => {
1047
+ let l = 0, h = 0;
1048
+ for (const c of e.children) {
1049
+ const { width: n, height: g, x: a, y } = c.size || { width: 0, height: 0, x: 0, y: 0 };
1050
+ L.debug(
1051
+ "getMaxChildSize abc95 child:",
1052
+ c.id,
1053
+ "width:",
1054
+ n,
1055
+ "height:",
1056
+ g,
1057
+ "x:",
1058
+ a,
1059
+ "y:",
1060
+ y,
1061
+ c.type
1062
+ ), c.type !== "space" && (n > l && (l = n / (e.widthInColumns || 1)), g > h && (h = g));
1063
+ }
1064
+ return { width: l, height: h };
1065
+ };
1066
+ function te(e, l, h = 0, c = 0) {
1067
+ var n, g, a, y, b, d, x, _, T, k, v;
1068
+ L.debug(
1069
+ "setBlockSizes abc95 (start)",
1070
+ e.id,
1071
+ (n = e == null ? void 0 : e.size) == null ? void 0 : n.x,
1072
+ "block width =",
1073
+ e == null ? void 0 : e.size,
1074
+ "sieblingWidth",
1075
+ h
1076
+ ), (g = e == null ? void 0 : e.size) != null && g.width || (e.size = {
1077
+ width: h,
1078
+ height: c,
1079
+ x: 0,
1080
+ y: 0
1081
+ });
1082
+ let S = 0, D = 0;
1083
+ if (((a = e.children) == null ? void 0 : a.length) > 0) {
1084
+ for (const t of e.children)
1085
+ te(t, l);
1086
+ const A = ht(e);
1087
+ S = A.width, D = A.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", S, D);
1088
+ for (const t of e.children)
1089
+ t.size && (L.debug(
1090
+ `abc95 Setting size of children of ${e.id} id=${t.id} ${S} ${D} ${t.size}`
1091
+ ), t.size.width = S * (t.widthInColumns || 1) + f * ((t.widthInColumns || 1) - 1), t.size.height = D, t.size.x = 0, t.size.y = 0, L.debug(
1092
+ `abc95 updating size of ${e.id} children child:${t.id} maxWidth:${S} maxHeight:${D}`
1093
+ ));
1094
+ for (const t of e.children)
1095
+ te(t, l, S, D);
1096
+ const w = e.columns || -1;
1097
+ let m = 0;
1098
+ for (const t of e.children)
1099
+ m += t.widthInColumns || 1;
1100
+ let i = e.children.length;
1101
+ w > 0 && w < m && (i = w), e.widthInColumns;
1102
+ const r = Math.ceil(m / i);
1103
+ let o = i * (S + f) + f, p = r * (D + f) + f;
1104
+ if (o < h) {
1105
+ L.debug(
1106
+ `Detected to small siebling: abc95 ${e.id} sieblingWidth ${h} sieblingHeight ${c} width ${o}`
1107
+ ), o = h, p = c;
1108
+ const t = (h - i * f - f) / i, u = (c - r * f - f) / r;
1109
+ L.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", S), L.debug("Size indata abc88", e.id, "childHeight", u, "maxHeight", D), L.debug("Size indata abc88 xSize", i, "paddiong", f);
1110
+ for (const s of e.children)
1111
+ s.size && (s.size.width = t, s.size.height = u, s.size.x = 0, s.size.y = 0);
1112
+ }
1113
+ if (L.debug(
1114
+ `abc95 (finale calc) ${e.id} xSize ${i} ySize ${r} columns ${w}${e.children.length} width=${Math.max(o, ((y = e.size) == null ? void 0 : y.width) || 0)}`
1115
+ ), o < (((b = e == null ? void 0 : e.size) == null ? void 0 : b.width) || 0)) {
1116
+ o = ((d = e == null ? void 0 : e.size) == null ? void 0 : d.width) || 0;
1117
+ const t = w > 0 ? Math.min(e.children.length, w) : e.children.length;
1118
+ if (t > 0) {
1119
+ const u = (o - t * f - f) / t;
1120
+ L.debug("abc95 (growing to fit) width", e.id, o, (x = e.size) == null ? void 0 : x.width, u);
1121
+ for (const s of e.children)
1122
+ s.size && (s.size.width = u);
1123
+ }
1124
+ }
1125
+ e.size = {
1126
+ width: o,
1127
+ height: p,
1128
+ x: 0,
1129
+ y: 0
1130
+ };
1131
+ }
1132
+ L.debug(
1133
+ "setBlockSizes abc94 (done)",
1134
+ e.id,
1135
+ (_ = e == null ? void 0 : e.size) == null ? void 0 : _.x,
1136
+ (T = e == null ? void 0 : e.size) == null ? void 0 : T.width,
1137
+ (k = e == null ? void 0 : e.size) == null ? void 0 : k.y,
1138
+ (v = e == null ? void 0 : e.size) == null ? void 0 : v.height
1139
+ );
1140
+ }
1141
+ function be(e, l) {
1142
+ var h, c, n, g, a, y, b, d, x, _, T, k, v, S, D, A, w;
1143
+ L.debug(
1144
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(h = e == null ? void 0 : e.size) == null ? void 0 : h.x} y: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.y} width: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.width}`
1145
+ );
1146
+ const m = e.columns || -1;
1147
+ if (L.debug("layoutBlocks columns abc95", e.id, "=>", m, e), e.children && // find max width of children
1148
+ e.children.length > 0) {
1149
+ const i = ((a = (g = e == null ? void 0 : e.children[0]) == null ? void 0 : g.size) == null ? void 0 : a.width) || 0, r = e.children.length * i + (e.children.length - 1) * f;
1150
+ L.debug("widthOfChildren 88", r, "posX");
1151
+ let o = 0;
1152
+ L.debug("abc91 block?.size?.x", e.id, (y = e == null ? void 0 : e.size) == null ? void 0 : y.x);
1153
+ let p = (b = e == null ? void 0 : e.size) != null && b.x ? ((d = e == null ? void 0 : e.size) == null ? void 0 : d.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -f, t = 0;
1154
+ for (const u of e.children) {
1155
+ const s = e;
1156
+ if (!u.size)
1157
+ continue;
1158
+ const { width: O, height: B } = u.size, { px: X, py: C } = ct(m, o);
1159
+ if (C != t && (t = C, p = (_ = e == null ? void 0 : e.size) != null && _.x ? ((T = e == null ? void 0 : e.size) == null ? void 0 : T.x) + (-((k = e == null ? void 0 : e.size) == null ? void 0 : k.width) / 2 || 0) : -f, L.debug("New row in layout for block", e.id, " and child ", u.id, t)), L.debug(
1160
+ `abc89 layout blocks (child) id: ${u.id} Pos: ${o} (px, py) ${X},${C} (${(v = s == null ? void 0 : s.size) == null ? void 0 : v.x},${(S = s == null ? void 0 : s.size) == null ? void 0 : S.y}) parent: ${s.id} width: ${O}${f}`
1161
+ ), s.size) {
1162
+ const F = O / 2;
1163
+ u.size.x = p + f + F, L.debug(
1164
+ `abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${p} new startingPosX${u.size.x} ${F} padding=${f} width=${O} halfWidth=${F} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${O * ((u == null ? void 0 : u.widthInColumns) || 1) / 2}`
1165
+ ), p = u.size.x + F, u.size.y = s.size.y - s.size.height / 2 + C * (B + f) + B / 2 + f, L.debug(
1166
+ `abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${p}${f}${F}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${O * ((u == null ? void 0 : u.widthInColumns) || 1) / 2}`
1167
+ );
1168
+ }
1169
+ u.children && be(u), o += (u == null ? void 0 : u.widthInColumns) || 1, L.debug("abc88 columnsPos", u, o);
1170
+ }
1171
+ }
1172
+ L.debug(
1173
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${(D = e == null ? void 0 : e.size) == null ? void 0 : D.x} y: ${(A = e == null ? void 0 : e.size) == null ? void 0 : A.y} width: ${(w = e == null ? void 0 : e.size) == null ? void 0 : w.width}`
1174
+ );
1175
+ }
1176
+ function xe(e, { minX: l, minY: h, maxX: c, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1177
+ if (e.size && e.id !== "root") {
1178
+ const { x: g, y: a, width: y, height: b } = e.size;
1179
+ g - y / 2 < l && (l = g - y / 2), a - b / 2 < h && (h = a - b / 2), g + y / 2 > c && (c = g + y / 2), a + b / 2 > n && (n = a + b / 2);
1180
+ }
1181
+ if (e.children)
1182
+ for (const g of e.children)
1183
+ ({ minX: l, minY: h, maxX: c, maxY: n } = xe(g, { minX: l, minY: h, maxX: c, maxY: n }));
1184
+ return { minX: l, minY: h, maxX: c, maxY: n };
1185
+ }
1186
+ function ut(e) {
1187
+ const l = e.getBlock("root");
1188
+ if (!l)
1189
+ return;
1190
+ te(l, e, 0, 0), be(l), L.debug("getBlocks", JSON.stringify(l, null, 2));
1191
+ const { minX: h, minY: c, maxX: n, maxY: g } = xe(l), a = g - c, y = n - h;
1192
+ return { x: h, y: c, width: y, height: a };
1193
+ }
1194
+ const gt = function(e, l) {
1195
+ return l.db.getClasses();
1196
+ }, dt = async function(e, l, h, c) {
1197
+ const { securityLevel: n, block: g } = ie(), a = c.db;
1198
+ let y;
1199
+ n === "sandbox" && (y = q("#i" + l));
1200
+ const b = n === "sandbox" ? q(y.nodes()[0].contentDocument.body) : q("body"), d = n === "sandbox" ? b.select(`[id="${l}"]`) : q(`[id="${l}"]`);
1201
+ we(d, ["point", "circle", "cross"], c.type, l);
1202
+ const x = a.getBlocks(), _ = a.getBlocksFlat(), T = a.getEdges(), k = d.insert("g").attr("class", "block");
1203
+ await ot(k, x, a);
1204
+ const v = ut(a);
1205
+ if (await lt(k, x, a), await at(k, T, _, a, l), v) {
1206
+ const S = v, D = Math.max(1, Math.round(0.125 * (S.width / S.height))), A = S.height + D + 10, w = S.width + 10, { useMaxWidth: m } = g;
1207
+ me(d, A, w, !!m), L.debug("Here Bounds", v, S), d.attr(
1208
+ "viewBox",
1209
+ `${S.x - 5} ${S.y - 5} ${S.width + 10} ${S.height + 10}`
1210
+ );
1211
+ }
1212
+ Ie(Ce);
1213
+ }, yt = {
1214
+ draw: dt,
1215
+ getClasses: gt
1216
+ }, _t = {
1217
+ parser: ze,
1218
+ db: tt,
1219
+ renderer: yt,
1220
+ styles: st
1221
+ };
1222
+ export {
1223
+ _t as diagram
1224
+ };