@qwen-code/web-shell 0.27.1 → 0.27.2

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 (158) hide show
  1. package/NOTICES.txt +10721 -958
  2. package/dist/{PierreFilePreview-BT_JRIvF.js → PierreFilePreview-CVi_Wsf-.js} +1 -1
  3. package/dist/SpreadsheetPreview-CTyYrLmD.js +379 -0
  4. package/dist/{WorkspaceFileBrowser-G1yA2eBf.js → WorkspaceFileBrowser-DkQgnDFv.js} +2 -2
  5. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  6. package/dist/abnfDiagram-VCTEODGH-CQWhk3bg.js +87 -0
  7. package/dist/abnfDiagram-VCTEODGH-DXK3iWaN.js +87 -0
  8. package/dist/{agents-route-bkxyBAkN.js → agents-route-ZD8W2lTb.js} +2 -2
  9. package/dist/arc-BcP3aO-G.js +83 -0
  10. package/dist/arc-DkZAOzaU.js +83 -0
  11. package/dist/architectureDiagram-5GKGNRK7-DhcVEkLQ.js +4775 -0
  12. package/dist/architectureDiagram-5GKGNRK7-DusU8ybk.js +4776 -0
  13. package/dist/blockDiagram-NRAW4CY4-BMOuo5wl.js +1414 -0
  14. package/dist/blockDiagram-NRAW4CY4-YciA8-8I.js +1414 -0
  15. package/dist/c4Diagram-UCG6FXSJ-BJxpHO4v.js +1508 -0
  16. package/dist/c4Diagram-UCG6FXSJ-DNpq-cdF.js +1508 -0
  17. package/dist/channel-CfhQTpjX.js +5 -0
  18. package/dist/channel-QZAYPfF8.js +5 -0
  19. package/dist/chunk-2Q5K7J3B-EGbMOnEe.js +15 -0
  20. package/dist/chunk-2Q5K7J3B-mtpkChaF.js +15 -0
  21. package/dist/chunk-5VM5RSS4-CP4Q2W8n.js +19 -0
  22. package/dist/chunk-5VM5RSS4-CucJ3wyB.js +19 -0
  23. package/dist/chunk-F27PBJKO-CS9kzvAx.js +68 -0
  24. package/dist/chunk-F27PBJKO-Cfw_29T-.js +68 -0
  25. package/dist/chunk-G27WJ6UU-BZzmQ8FW.js +1408 -0
  26. package/dist/chunk-G27WJ6UU-DdeEiwmL.js +1408 -0
  27. package/dist/chunk-JWPE2WC7-BL_hjRLf.js +8 -0
  28. package/dist/chunk-JWPE2WC7-C03UDQBx.js +8 -0
  29. package/dist/chunk-LCL6LL3I-CNn3XyuL.js +1533 -0
  30. package/dist/chunk-LCL6LL3I-CR-IGGIM.js +1533 -0
  31. package/dist/chunk-POPQ4Y6H-BVQbxVHz.js +19 -0
  32. package/dist/chunk-POPQ4Y6H-UJK1fYGP.js +19 -0
  33. package/dist/chunk-SVP7TREG-B-E-xFG8.js +664 -0
  34. package/dist/chunk-SVP7TREG-BUmyTmov.js +664 -0
  35. package/dist/chunk-XXDRQBXY-BDcf4DQz.js +8 -0
  36. package/dist/chunk-XXDRQBXY-BHAq0mtL.js +8 -0
  37. package/dist/classDiagram-DTDB5LWJ-CVA3J-EH.js +16 -0
  38. package/dist/classDiagram-DTDB5LWJ-Dh121Rlt.js +16 -0
  39. package/dist/classDiagram-v2-JRS7N3AN-CVA3J-EH.js +16 -0
  40. package/dist/classDiagram-v2-JRS7N3AN-Dh121Rlt.js +16 -0
  41. package/dist/cose-bilkent-JH36ORCC-CLe0kcHa.js +2605 -0
  42. package/dist/cose-bilkent-JH36ORCC-DpMM48hA.js +2606 -0
  43. package/dist/cynefin-OW5HDTMX-CyO3b088.js +23750 -0
  44. package/dist/cynefinDiagram-5FMLGOSQ-C5xaWeuA.js +299 -0
  45. package/dist/cynefinDiagram-5FMLGOSQ-mLaK-3R3.js +299 -0
  46. package/dist/cytoscape.esm-DCrf4dL8.js +18782 -0
  47. package/dist/daemon-react-sdk.js +1 -1
  48. package/dist/dagre-3AP2YEHR-CmNFrtW9.js +456 -0
  49. package/dist/dagre-3AP2YEHR-zDm3fBQq.js +456 -0
  50. package/dist/defaultLocale-BgPVtth8.js +171 -0
  51. package/dist/diagram-S7CK7UJ4-BQtgRcGU.js +346 -0
  52. package/dist/diagram-S7CK7UJ4-Clojnf04.js +346 -0
  53. package/dist/diagram-UQ7AKVKN-B3Ll3rB4.js +219 -0
  54. package/dist/diagram-UQ7AKVKN-CTn4O0fd.js +219 -0
  55. package/dist/diagram-VSXAHHWV-BeYXDVEh.js +463 -0
  56. package/dist/diagram-VSXAHHWV-mdxkNEZP.js +463 -0
  57. package/dist/diagram-VX7I27RA-C3bzQYLd.js +529 -0
  58. package/dist/diagram-VX7I27RA-DaPLIQOr.js +529 -0
  59. package/dist/diagram-Z3DM3KII-BImvaL3c.js +142 -0
  60. package/dist/diagram-Z3DM3KII-CkkdGhWO.js +142 -0
  61. package/dist/{docx-preview-BucJeYCm.js → docx-preview-BfV4m8Qp.js} +503 -506
  62. package/dist/ebnfDiagram-PWID7BFC-C8RUggbp.js +109 -0
  63. package/dist/ebnfDiagram-PWID7BFC-gJHJx-lt.js +109 -0
  64. package/dist/erDiagram-SSCWMZ5O-CKFzjLCd.js +1059 -0
  65. package/dist/erDiagram-SSCWMZ5O-DLJjXFG9.js +1059 -0
  66. package/dist/flowDiagram-A5DVABFB-BHAeEzG1.js +1689 -0
  67. package/dist/flowDiagram-A5DVABFB-BOdsfJ-4.js +1689 -0
  68. package/dist/ganttDiagram-EL5Y4UJY-CtL6LAbW.js +2703 -0
  69. package/dist/ganttDiagram-EL5Y4UJY-D0hNphpF.js +2704 -0
  70. package/dist/gitGraphDiagram-WWUBYQGX-8XcPnT4w.js +815 -0
  71. package/dist/gitGraphDiagram-WWUBYQGX-DxHtQ0ba.js +815 -0
  72. package/dist/{index-B6wNHUaX.js → index-BGsppGgG.js} +69284 -64504
  73. package/dist/index.js +3 -3
  74. package/dist/infoDiagram-RXCK75RN-B-Ds06LN.js +24 -0
  75. package/dist/infoDiagram-RXCK75RN-Dhirg4if.js +24 -0
  76. package/dist/init-DjUOC4st.js +16 -0
  77. package/dist/ishikawaDiagram-5VMMS53U-BJPKneVd.js +621 -0
  78. package/dist/ishikawaDiagram-5VMMS53U-CsttzTkq.js +621 -0
  79. package/dist/journeyDiagram-EYS64GPL-BBAEhOQ9.js +836 -0
  80. package/dist/journeyDiagram-EYS64GPL-DfXS6tI_.js +836 -0
  81. package/dist/kanban-definition-3QL26DDD-Bh1Jz01C.js +723 -0
  82. package/dist/kanban-definition-3QL26DDD-C8yOTG02.js +723 -0
  83. package/dist/layout-Dxab-q-T.js +1704 -0
  84. package/dist/layout-sTbo9v3C.js +1704 -0
  85. package/dist/linear-BhTDfwHZ.js +259 -0
  86. package/dist/linear-CjDL9r_e.js +259 -0
  87. package/dist/mermaid.core-CFV16zMl.js +19742 -0
  88. package/dist/mermaid.core-DBp8atac.js +19747 -0
  89. package/dist/mindmap-definition-FBJOCRG2-KPo1Z4it.js +826 -0
  90. package/dist/mindmap-definition-FBJOCRG2-vau9OLMK.js +826 -0
  91. package/dist/ordinal-DfAQgscy.js +61 -0
  92. package/dist/pegDiagram-XKGWAZYB-CFjH6RoO.js +95 -0
  93. package/dist/pegDiagram-XKGWAZYB-EeXt14MX.js +95 -0
  94. package/dist/pieDiagram-E7YTZNPT-CJa9GbCV.js +208 -0
  95. package/dist/pieDiagram-E7YTZNPT-JyO_8fWF.js +208 -0
  96. package/dist/quadrantDiagram-AXDQQJYC-B7tyPD89.js +1023 -0
  97. package/dist/quadrantDiagram-AXDQQJYC-G9wAekw0.js +1023 -0
  98. package/dist/railroadDiagram-O6MQD6OU-3-cuTnqH.js +77 -0
  99. package/dist/railroadDiagram-O6MQD6OU-SyM4QCMp.js +77 -0
  100. package/dist/requirementDiagram-EFPCY7ZU-BJal3W63.js +882 -0
  101. package/dist/requirementDiagram-EFPCY7ZU-bMW72Av_.js +882 -0
  102. package/dist/sankeyDiagram-P5KCCOFB-BKP8fccK.js +847 -0
  103. package/dist/sankeyDiagram-P5KCCOFB-C4KDi8Ty.js +847 -0
  104. package/dist/sequenceDiagram-WJ2MYXX4-DFvbPjPG.js +2888 -0
  105. package/dist/sequenceDiagram-WJ2MYXX4-DvgRoXFL.js +2888 -0
  106. package/dist/sizeCapture-X5ZJPWSS-DPkvpCxM.js +46 -0
  107. package/dist/sizeCapture-X5ZJPWSS-DU4nf5aV.js +46 -0
  108. package/dist/stateDiagram-HBIQ2CUA-CWp0mOcF.js +262 -0
  109. package/dist/stateDiagram-HBIQ2CUA-DkN3hNFV.js +262 -0
  110. package/dist/stateDiagram-v2-4QOOHH4V-Bh7H2ZBJ.js +16 -0
  111. package/dist/stateDiagram-v2-4QOOHH4V-DX-OvV9U.js +16 -0
  112. package/dist/sw.js +1 -1
  113. package/dist/swimlanes-XN3QIQJK-2s4fbN8J.js +5219 -0
  114. package/dist/swimlanes-XN3QIQJK-CI3ENZQA.js +5219 -0
  115. package/dist/swimlanesDiagram-VK2B7HYN-BEjeqDmx.js +13 -0
  116. package/dist/swimlanesDiagram-VK2B7HYN-DWJY6BGD.js +13 -0
  117. package/dist/timeline-definition-24CTP7MA-C_tZHri9.js +1057 -0
  118. package/dist/timeline-definition-24CTP7MA-DYXEracn.js +1057 -0
  119. package/dist/transcript.js +14564 -11549
  120. package/dist/types/App.d.ts +10 -1
  121. package/dist/types/components/ComposerUsageStats.d.ts +34 -0
  122. package/dist/types/components/WelcomeHeader.d.ts +8 -0
  123. package/dist/types/components/artifacts/tokenUsageTotals.d.ts +36 -0
  124. package/dist/types/components/channels/ChannelEditorDialog.d.ts +10 -1
  125. package/dist/types/components/channels/ChannelQrLogin.d.ts +13 -0
  126. package/dist/types/components/channels/WeixinLoginPanel.d.ts +17 -0
  127. package/dist/types/components/channels/channel-editor-state.d.ts +8 -1
  128. package/dist/types/components/channels/channel-platform.d.ts +2 -1
  129. package/dist/types/components/channels/weixin-auth-api.d.ts +32 -0
  130. package/dist/types/components/managed/ManagedRuntimeSkillsImporter.d.ts +10 -0
  131. package/dist/types/components/managed/ManagedSideQueryPanel.d.ts +5 -0
  132. package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +26 -1
  133. package/dist/types/components/managed/generated/managed-agent-api.d.ts +605 -0
  134. package/dist/types/components/managed/java-managed-agent-client.d.ts +122 -1
  135. package/dist/types/components/managed/managed-agent-provider.d.ts +14 -1
  136. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +14 -1
  137. package/dist/types/components/managed/managed-extension-install.d.ts +5 -2
  138. package/dist/types/components/managed/managed-extension-messages.d.ts +7 -0
  139. package/dist/types/components/managed/managed-extension-types.d.ts +4 -0
  140. package/dist/types/components/managed/managed-session-storage.d.ts +35 -0
  141. package/dist/types/components/managed/managed-side-query-command.d.ts +5 -0
  142. package/dist/types/components/managed/managed-side-query-types.d.ts +21 -0
  143. package/dist/types/components/managed/managed-side-query.test-fixtures.d.ts +3 -0
  144. package/dist/types/components/managed/use-managed-side-queries.d.ts +26 -0
  145. package/dist/types/customization.d.ts +31 -0
  146. package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +2 -1
  147. package/dist/types/daemon/workspace/types.d.ts +8 -1
  148. package/dist/types/index.d.ts +1 -0
  149. package/dist/{useDaemonMidTurnInjected-tBzI77Ar.js → useDaemonMidTurnInjected-B7dPEdqk.js} +2040 -1825
  150. package/dist/vennDiagram-4TSXK5OY-Bi3e_aHN.js +1578 -0
  151. package/dist/vennDiagram-4TSXK5OY-DZCe1Ffi.js +1578 -0
  152. package/dist/wardleyDiagram-VM6X3IG4-BNV5jzew.js +675 -0
  153. package/dist/wardleyDiagram-VM6X3IG4-DqFJHRmt.js +675 -0
  154. package/dist/xychartDiagram-S5SC5T6Z-BVIJ86ch.js +1492 -0
  155. package/dist/xychartDiagram-S5SC5T6Z-J8xP-hcH.js +1492 -0
  156. package/package.json +19 -9
  157. package/dist/SpreadsheetPreview-d5XL70Ho.js +0 -379
  158. package/dist/types/components/artifacts/excel-preview-parser.d.ts +0 -5
@@ -0,0 +1,1414 @@
1
+ import { g as qe } from "./chunk-5VM5RSS4-CucJ3wyB.js";
2
+ import { aD as Je, aE as Le, aF as Ze, aG as ye, aH as me, aI as we, aJ as Ee, aK as ie, aL as _e, aM as ke, aN as De, aO as Te, aP as Ne, aQ as Ie, aR as Qe, aS as je, aT as $e, aU as et, aV as tt, aW as st, aX as rt, aY as it, aZ as at, a_ as nt, a$ as ot, _ as u, y as Y, j as X, b0 as ct, d as lt, l as m, p as ut, r as gt, c as Oe, Q as ht, az as dt, ay as pt, aA as ft, k as St, b1 as bt, ag as ve, ah as xt } from "./mermaid.core-DBp8atac.js";
3
+ import { c as Lt } from "./channel-QZAYPfF8.js";
4
+ function yt(e) {
5
+ return Array.isArray(e);
6
+ }
7
+ function mt(e) {
8
+ if (Je(e))
9
+ return e;
10
+ const a = Le(e);
11
+ if (!wt(e))
12
+ return {};
13
+ if (yt(e)) {
14
+ const r = Array.from(e);
15
+ return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (r.index = e.index, r.input = e.input), r;
16
+ }
17
+ if (Ze(e)) {
18
+ const r = e, l = r.constructor;
19
+ return new l(r.buffer, r.byteOffset, r.length);
20
+ }
21
+ if (a === ye)
22
+ return new ArrayBuffer(e.byteLength);
23
+ if (a === me) {
24
+ const r = e, l = r.buffer, d = r.byteOffset, s = r.byteLength, h = new ArrayBuffer(s), x = new Uint8Array(l, d, s);
25
+ return new Uint8Array(h).set(x), new DataView(h);
26
+ }
27
+ if (a === we || a === Ee || a === ie) {
28
+ const r = e.constructor, l = new r(e.valueOf());
29
+ return a === ie ? _t(l, e) : se(l, e), l;
30
+ }
31
+ if (a === _e)
32
+ return new Date(Number(e));
33
+ if (a === ke) {
34
+ const r = e, l = new RegExp(r.source, r.flags);
35
+ return l.lastIndex = r.lastIndex, l;
36
+ }
37
+ if (a === De)
38
+ return Object(Symbol.prototype.valueOf.call(e));
39
+ if (a === Te) {
40
+ const r = e, l = /* @__PURE__ */ new Map();
41
+ return r.forEach((d, s) => {
42
+ l.set(s, d);
43
+ }), l;
44
+ }
45
+ if (a === Ne) {
46
+ const r = e, l = /* @__PURE__ */ new Set();
47
+ return r.forEach((d) => {
48
+ l.add(d);
49
+ }), l;
50
+ }
51
+ if (a === Ie) {
52
+ const r = e, l = {};
53
+ return se(l, r), l.length = r.length, l[Symbol.iterator] = r[Symbol.iterator], l;
54
+ }
55
+ const o = {};
56
+ return kt(o, e), se(o, e), Et(o, e), o;
57
+ }
58
+ function wt(e) {
59
+ switch (Le(e)) {
60
+ case Ie:
61
+ case ot:
62
+ case ye:
63
+ case me:
64
+ case we:
65
+ case _e:
66
+ case nt:
67
+ case at:
68
+ case it:
69
+ case rt:
70
+ case st:
71
+ case Te:
72
+ case Ee:
73
+ case tt:
74
+ case ke:
75
+ case Ne:
76
+ case ie:
77
+ case De:
78
+ case et:
79
+ case $e:
80
+ case je:
81
+ case Qe:
82
+ return !0;
83
+ default:
84
+ return !1;
85
+ }
86
+ }
87
+ function se(e, a) {
88
+ for (const o in a)
89
+ Object.hasOwn(a, o) && (e[o] = a[o]);
90
+ }
91
+ function Et(e, a) {
92
+ const o = Object.getOwnPropertySymbols(a);
93
+ for (let r = 0; r < o.length; r++) {
94
+ const l = o[r];
95
+ Object.prototype.propertyIsEnumerable.call(a, l) && (e[l] = a[l]);
96
+ }
97
+ }
98
+ function _t(e, a) {
99
+ const o = a.valueOf().length;
100
+ for (const r in a)
101
+ Object.hasOwn(a, r) && (Number.isNaN(Number(r)) || Number(r) >= o) && (e[r] = a[r]);
102
+ }
103
+ function kt(e, a) {
104
+ const o = Object.getPrototypeOf(a);
105
+ o !== null && typeof a.constructor == "function" && Object.setPrototypeOf(e, o);
106
+ }
107
+ var ae = function() {
108
+ var e = /* @__PURE__ */ u(function(v, g, i, c) {
109
+ for (i = i || {}, c = v.length; c--; i[v[c]] = g) ;
110
+ return i;
111
+ }, "o"), a = [1, 15], o = [1, 7], r = [1, 13], l = [1, 14], d = [1, 19], s = [1, 16], h = [1, 17], x = [1, 18], y = [8, 30], b = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], f = [1, 23], L = [1, 24], w = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], k = [1, 49], _ = {
112
+ trace: /* @__PURE__ */ u(function() {
113
+ }, "trace"),
114
+ yy: {},
115
+ symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 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, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
116
+ 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: "NODE_ID", 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" },
117
+ 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], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
118
+ performAction: /* @__PURE__ */ u(function(g, i, c, p, E, t, M) {
119
+ var n = t.length - 1;
120
+ switch (E) {
121
+ case 4:
122
+ p.getLogger().debug("Rule: separator (NL) ");
123
+ break;
124
+ case 5:
125
+ p.getLogger().debug("Rule: separator (Space) ");
126
+ break;
127
+ case 6:
128
+ p.getLogger().debug("Rule: separator (EOF) ");
129
+ break;
130
+ case 7:
131
+ p.getLogger().debug("Rule: hierarchy: ", t[n - 1]), p.setHierarchy(t[n - 1]);
132
+ break;
133
+ case 8:
134
+ p.getLogger().debug("Stop NL ");
135
+ break;
136
+ case 9:
137
+ p.getLogger().debug("Stop EOF ");
138
+ break;
139
+ case 10:
140
+ p.getLogger().debug("Stop NL2 ");
141
+ break;
142
+ case 11:
143
+ p.getLogger().debug("Stop EOF2 ");
144
+ break;
145
+ case 12:
146
+ p.getLogger().debug("Rule: statement: ", t[n]), typeof t[n].length == "number" ? this.$ = t[n] : this.$ = [t[n]];
147
+ break;
148
+ case 13:
149
+ p.getLogger().debug("Rule: statement #2: ", t[n - 1]), this.$ = [t[n - 1]].concat(t[n]);
150
+ break;
151
+ case 14:
152
+ p.getLogger().debug("Rule: link: ", t[n], g), this.$ = { edgeTypeStr: t[n], label: "" };
153
+ break;
154
+ case 15:
155
+ p.getLogger().debug("Rule: LABEL link: ", t[n - 3], t[n - 1], t[n]), this.$ = { edgeTypeStr: t[n], label: t[n - 1] };
156
+ break;
157
+ case 18:
158
+ const P = parseInt(t[n]), W = p.generateId();
159
+ this.$ = { id: W, type: "space", label: "", width: P, children: [] };
160
+ break;
161
+ case 23:
162
+ p.getLogger().debug("Rule: (nodeStatement link node) ", t[n - 2], t[n - 1], t[n], " typestr: ", t[n - 1].edgeTypeStr);
163
+ const Z = p.edgeStrToEdgeData(t[n - 1].edgeTypeStr), V = p.edgeStrToEdgeStartData(t[n - 1].edgeTypeStr), Q = p.edgeStrToThickness(t[n - 1].edgeTypeStr), D = p.edgeStrToPattern(t[n - 1].edgeTypeStr);
164
+ this.$ = [
165
+ { id: t[n - 2].id, label: t[n - 2].label, type: t[n - 2].type, directions: t[n - 2].directions },
166
+ { id: t[n - 2].id + "-" + t[n].id, start: t[n - 2].id, end: t[n].id, label: t[n - 1].label, type: "edge", thickness: Q, pattern: D, directions: t[n].directions, arrowTypeEnd: Z, arrowTypeStart: V },
167
+ { id: t[n].id, label: t[n].label, type: p.typeStr2Type(t[n].typeStr), directions: t[n].directions }
168
+ ];
169
+ break;
170
+ case 24:
171
+ p.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[n - 1], t[n]), this.$ = { id: t[n - 1].id, label: t[n - 1].label, type: p.typeStr2Type(t[n - 1].typeStr), directions: t[n - 1].directions, widthInColumns: parseInt(t[n], 10) };
172
+ break;
173
+ case 25:
174
+ p.getLogger().debug("Rule: nodeStatement (node) ", t[n]), this.$ = { id: t[n].id, label: t[n].label, type: p.typeStr2Type(t[n].typeStr), directions: t[n].directions, widthInColumns: 1 };
175
+ break;
176
+ case 26:
177
+ p.getLogger().debug("APA123", this ? this : "na"), p.getLogger().debug("COLUMNS: ", t[n]), this.$ = { type: "column-setting", columns: t[n] === "auto" ? -1 : parseInt(t[n]) };
178
+ break;
179
+ case 27:
180
+ p.getLogger().debug("Rule: id-block statement : ", t[n - 2], t[n - 1]), p.generateId(), this.$ = { ...t[n - 2], type: "composite", children: t[n - 1] };
181
+ break;
182
+ case 28:
183
+ p.getLogger().debug("Rule: blockStatement : ", t[n - 2], t[n - 1], t[n]);
184
+ const A = p.generateId();
185
+ this.$ = { id: A, type: "composite", label: "", children: t[n - 1] };
186
+ break;
187
+ case 29:
188
+ p.getLogger().debug("Rule: node (NODE_ID separator): ", t[n]), this.$ = { id: t[n] };
189
+ break;
190
+ case 30:
191
+ p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[n - 1], t[n]), this.$ = { id: t[n - 1], label: t[n].label, typeStr: t[n].typeStr, directions: t[n].directions };
192
+ break;
193
+ case 31:
194
+ p.getLogger().debug("Rule: dirList: ", t[n]), this.$ = [t[n]];
195
+ break;
196
+ case 32:
197
+ p.getLogger().debug("Rule: dirList: ", t[n - 1], t[n]), this.$ = [t[n - 1]].concat(t[n]);
198
+ break;
199
+ case 33:
200
+ p.getLogger().debug("Rule: nodeShapeNLabel: ", t[n - 2], t[n - 1], t[n]), this.$ = { typeStr: t[n - 2] + t[n], label: t[n - 1] };
201
+ break;
202
+ case 34:
203
+ p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[n - 3], t[n - 2], " #3:", t[n - 1], t[n]), this.$ = { typeStr: t[n - 3] + t[n], label: t[n - 2], directions: t[n - 1] };
204
+ break;
205
+ case 35:
206
+ case 36:
207
+ this.$ = { type: "classDef", id: t[n - 1].trim(), css: t[n].trim() };
208
+ break;
209
+ case 37:
210
+ this.$ = { type: "applyClass", id: t[n - 1].trim(), styleClass: t[n].trim() };
211
+ break;
212
+ case 38:
213
+ this.$ = { type: "applyStyles", id: t[n - 1].trim(), stylesStr: t[n].trim() };
214
+ break;
215
+ }
216
+ }, "anonymous"),
217
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: a, 11: 3, 13: 4, 19: 5, 20: 6, 21: o, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: r, 29: l, 31: d, 39: s, 43: h, 46: x }, { 8: [1, 20] }, e(y, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: a, 21: o, 28: r, 29: l, 31: d, 39: s, 43: h, 46: x }), e(b, [2, 16], { 14: 22, 15: f, 16: L }), e(b, [2, 17]), e(b, [2, 18]), e(b, [2, 19]), e(b, [2, 20]), e(b, [2, 21]), e(b, [2, 22]), e(w, [2, 25], { 27: [1, 25] }), e(b, [2, 26]), { 19: 26, 26: 12, 31: d }, { 10: a, 11: 27, 13: 4, 19: 5, 20: 6, 21: o, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: r, 29: l, 31: d, 39: s, 43: h, 46: x }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(y, [2, 13]), { 26: 35, 31: d }, { 31: [2, 14] }, { 17: [1, 36] }, e(w, [2, 24]), { 10: a, 11: 37, 13: 4, 14: 22, 15: f, 16: L, 19: 5, 20: 6, 21: o, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: r, 29: l, 31: d, 39: s, 43: h, 46: x }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(w, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(b, [2, 28]), e(b, [2, 35]), e(b, [2, 36]), e(b, [2, 37]), e(b, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: k }, { 15: [1, 50] }, e(b, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: k, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
218
+ defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
219
+ parseError: /* @__PURE__ */ u(function(g, i) {
220
+ if (i.recoverable)
221
+ this.trace(g);
222
+ else {
223
+ var c = new Error(g);
224
+ throw c.hash = i, c;
225
+ }
226
+ }, "parseError"),
227
+ parse: /* @__PURE__ */ u(function(g) {
228
+ var i = this, c = [0], p = [], E = [null], t = [], M = this.table, n = "", P = 0, W = 0, Z = 2, V = 1, Q = t.slice.call(arguments, 1), D = Object.create(this.lexer), A = { yy: {} };
229
+ for (var j in this.yy)
230
+ Object.prototype.hasOwnProperty.call(this.yy, j) && (A.yy[j] = this.yy[j]);
231
+ D.setInput(g, A.yy), A.yy.lexer = D, A.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
232
+ var $ = D.yylloc;
233
+ t.push($);
234
+ var Xe = D.options && D.options.ranges;
235
+ typeof A.yy.parseError == "function" ? this.parseError = A.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
236
+ function Ge(I) {
237
+ c.length = c.length - 2 * I, E.length = E.length - I, t.length = t.length - I;
238
+ }
239
+ u(Ge, "popStack");
240
+ function pe() {
241
+ var I;
242
+ return I = p.pop() || D.lex() || V, typeof I != "number" && (I instanceof Array && (p = I, I = p.pop()), I = i.symbols_[I] || I), I;
243
+ }
244
+ u(pe, "lex");
245
+ for (var N, R, C, ee, F = {}, U, B, fe, H; ; ) {
246
+ if (R = c[c.length - 1], this.defaultActions[R] ? C = this.defaultActions[R] : ((N === null || typeof N > "u") && (N = pe()), C = M[R] && M[R][N]), typeof C > "u" || !C.length || !C[0]) {
247
+ var te = "";
248
+ H = [];
249
+ for (U in M[R])
250
+ this.terminals_[U] && U > Z && H.push("'" + this.terminals_[U] + "'");
251
+ D.showPosition ? te = "Parse error on line " + (P + 1) + `:
252
+ ` + D.showPosition() + `
253
+ Expecting ` + H.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : te = "Parse error on line " + (P + 1) + ": Unexpected " + (N == V ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(te, {
254
+ text: D.match,
255
+ token: this.terminals_[N] || N,
256
+ line: D.yylineno,
257
+ loc: $,
258
+ expected: H
259
+ });
260
+ }
261
+ if (C[0] instanceof Array && C.length > 1)
262
+ throw new Error("Parse Error: multiple actions possible at state: " + R + ", token: " + N);
263
+ switch (C[0]) {
264
+ case 1:
265
+ c.push(N), E.push(D.yytext), t.push(D.yylloc), c.push(C[1]), N = null, W = D.yyleng, n = D.yytext, P = D.yylineno, $ = D.yylloc;
266
+ break;
267
+ case 2:
268
+ if (B = this.productions_[C[1]][1], F.$ = E[E.length - B], F._$ = {
269
+ first_line: t[t.length - (B || 1)].first_line,
270
+ last_line: t[t.length - 1].last_line,
271
+ first_column: t[t.length - (B || 1)].first_column,
272
+ last_column: t[t.length - 1].last_column
273
+ }, Xe && (F._$.range = [
274
+ t[t.length - (B || 1)].range[0],
275
+ t[t.length - 1].range[1]
276
+ ]), ee = this.performAction.apply(F, [
277
+ n,
278
+ W,
279
+ P,
280
+ A.yy,
281
+ C[1],
282
+ E,
283
+ t
284
+ ].concat(Q)), typeof ee < "u")
285
+ return ee;
286
+ B && (c = c.slice(0, -1 * B * 2), E = E.slice(0, -1 * B), t = t.slice(0, -1 * B)), c.push(this.productions_[C[1]][0]), E.push(F.$), t.push(F._$), fe = M[c[c.length - 2]][c[c.length - 1]], c.push(fe);
287
+ break;
288
+ case 3:
289
+ return !0;
290
+ }
291
+ }
292
+ return !0;
293
+ }, "parse")
294
+ }, T = /* @__PURE__ */ function() {
295
+ var v = {
296
+ EOF: 1,
297
+ parseError: /* @__PURE__ */ u(function(i, c) {
298
+ if (this.yy.parser)
299
+ this.yy.parser.parseError(i, c);
300
+ else
301
+ throw new Error(i);
302
+ }, "parseError"),
303
+ // resets the lexer, sets new input
304
+ setInput: /* @__PURE__ */ u(function(g, i) {
305
+ return this.yy = i || this.yy || {}, this._input = g, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
306
+ first_line: 1,
307
+ first_column: 0,
308
+ last_line: 1,
309
+ last_column: 0
310
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
311
+ }, "setInput"),
312
+ // consumes and returns one char from the input
313
+ input: /* @__PURE__ */ u(function() {
314
+ var g = this._input[0];
315
+ this.yytext += g, this.yyleng++, this.offset++, this.match += g, this.matched += g;
316
+ var i = g.match(/(?:\r\n?|\n).*/g);
317
+ return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), g;
318
+ }, "input"),
319
+ // unshifts one char (or a string) into the input
320
+ unput: /* @__PURE__ */ u(function(g) {
321
+ var i = g.length, c = g.split(/(?:\r\n?|\n)/g);
322
+ this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
323
+ var p = this.match.split(/(?:\r\n?|\n)/g);
324
+ 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);
325
+ var E = this.yylloc.range;
326
+ return this.yylloc = {
327
+ first_line: this.yylloc.first_line,
328
+ last_line: this.yylineno + 1,
329
+ first_column: this.yylloc.first_column,
330
+ last_column: c ? (c.length === p.length ? this.yylloc.first_column : 0) + p[p.length - c.length].length - c[0].length : this.yylloc.first_column - i
331
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
332
+ }, "unput"),
333
+ // When called from action, caches matched text and appends it on next action
334
+ more: /* @__PURE__ */ u(function() {
335
+ return this._more = !0, this;
336
+ }, "more"),
337
+ // 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.
338
+ reject: /* @__PURE__ */ u(function() {
339
+ if (this.options.backtrack_lexer)
340
+ this._backtrack = !0;
341
+ else
342
+ 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).
343
+ ` + this.showPosition(), {
344
+ text: "",
345
+ token: null,
346
+ line: this.yylineno
347
+ });
348
+ return this;
349
+ }, "reject"),
350
+ // retain first n characters of the match
351
+ less: /* @__PURE__ */ u(function(g) {
352
+ this.unput(this.match.slice(g));
353
+ }, "less"),
354
+ // displays already matched input, i.e. for error messages
355
+ pastInput: /* @__PURE__ */ u(function() {
356
+ var g = this.matched.substr(0, this.matched.length - this.match.length);
357
+ return (g.length > 20 ? "..." : "") + g.substr(-20).replace(/\n/g, "");
358
+ }, "pastInput"),
359
+ // displays upcoming input, i.e. for error messages
360
+ upcomingInput: /* @__PURE__ */ u(function() {
361
+ var g = this.match;
362
+ return g.length < 20 && (g += this._input.substr(0, 20 - g.length)), (g.substr(0, 20) + (g.length > 20 ? "..." : "")).replace(/\n/g, "");
363
+ }, "upcomingInput"),
364
+ // displays the character position where the lexing error occurred, i.e. for error messages
365
+ showPosition: /* @__PURE__ */ u(function() {
366
+ var g = this.pastInput(), i = new Array(g.length + 1).join("-");
367
+ return g + this.upcomingInput() + `
368
+ ` + i + "^";
369
+ }, "showPosition"),
370
+ // test the lexed token: return FALSE when not a match, otherwise return token
371
+ test_match: /* @__PURE__ */ u(function(g, i) {
372
+ var c, p, E;
373
+ if (this.options.backtrack_lexer && (E = {
374
+ yylineno: this.yylineno,
375
+ yylloc: {
376
+ first_line: this.yylloc.first_line,
377
+ last_line: this.last_line,
378
+ first_column: this.yylloc.first_column,
379
+ last_column: this.yylloc.last_column
380
+ },
381
+ yytext: this.yytext,
382
+ match: this.match,
383
+ matches: this.matches,
384
+ matched: this.matched,
385
+ yyleng: this.yyleng,
386
+ offset: this.offset,
387
+ _more: this._more,
388
+ _input: this._input,
389
+ yy: this.yy,
390
+ conditionStack: this.conditionStack.slice(0),
391
+ done: this.done
392
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), p = g[0].match(/(?:\r\n?|\n).*/g), p && (this.yylineno += p.length), this.yylloc = {
393
+ first_line: this.yylloc.last_line,
394
+ last_line: this.yylineno + 1,
395
+ first_column: this.yylloc.last_column,
396
+ last_column: p ? p[p.length - 1].length - p[p.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + g[0].length
397
+ }, this.yytext += g[0], this.match += g[0], this.matches = g, 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(g[0].length), this.matched += g[0], c = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
398
+ return c;
399
+ if (this._backtrack) {
400
+ for (var t in E)
401
+ this[t] = E[t];
402
+ return !1;
403
+ }
404
+ return !1;
405
+ }, "test_match"),
406
+ // return next match in input
407
+ next: /* @__PURE__ */ u(function() {
408
+ if (this.done)
409
+ return this.EOF;
410
+ this._input || (this.done = !0);
411
+ var g, i, c, p;
412
+ this._more || (this.yytext = "", this.match = "");
413
+ for (var E = this._currentRules(), t = 0; t < E.length; t++)
414
+ if (c = this._input.match(this.rules[E[t]]), c && (!i || c[0].length > i[0].length)) {
415
+ if (i = c, p = t, this.options.backtrack_lexer) {
416
+ if (g = this.test_match(c, E[t]), g !== !1)
417
+ return g;
418
+ if (this._backtrack) {
419
+ i = !1;
420
+ continue;
421
+ } else
422
+ return !1;
423
+ } else if (!this.options.flex)
424
+ break;
425
+ }
426
+ return i ? (g = this.test_match(i, E[p]), g !== !1 ? g : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
427
+ ` + this.showPosition(), {
428
+ text: "",
429
+ token: null,
430
+ line: this.yylineno
431
+ });
432
+ }, "next"),
433
+ // return next match that has a token
434
+ lex: /* @__PURE__ */ u(function() {
435
+ var i = this.next();
436
+ return i || this.lex();
437
+ }, "lex"),
438
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
439
+ begin: /* @__PURE__ */ u(function(i) {
440
+ this.conditionStack.push(i);
441
+ }, "begin"),
442
+ // pop the previously active lexer condition state off the condition stack
443
+ popState: /* @__PURE__ */ u(function() {
444
+ var i = this.conditionStack.length - 1;
445
+ return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
446
+ }, "popState"),
447
+ // produce the lexer rule set which is active for the currently active lexer condition state
448
+ _currentRules: /* @__PURE__ */ u(function() {
449
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
450
+ }, "_currentRules"),
451
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
452
+ topState: /* @__PURE__ */ u(function(i) {
453
+ return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
454
+ }, "topState"),
455
+ // alias for begin(condition)
456
+ pushState: /* @__PURE__ */ u(function(i) {
457
+ this.begin(i);
458
+ }, "pushState"),
459
+ // return the number of states currently on the stack
460
+ stateStackSize: /* @__PURE__ */ u(function() {
461
+ return this.conditionStack.length;
462
+ }, "stateStackSize"),
463
+ options: {},
464
+ performAction: /* @__PURE__ */ u(function(i, c, p, E) {
465
+ switch (p) {
466
+ case 0:
467
+ return i.getLogger().debug("Found block-beta"), 10;
468
+ case 1:
469
+ return i.getLogger().debug("Found id-block"), 29;
470
+ case 2:
471
+ return i.getLogger().debug("Found block"), 10;
472
+ case 3:
473
+ i.getLogger().debug(".", c.yytext);
474
+ break;
475
+ case 4:
476
+ i.getLogger().debug("_", c.yytext);
477
+ break;
478
+ case 5:
479
+ return 5;
480
+ case 6:
481
+ return c.yytext = -1, 28;
482
+ case 7:
483
+ return c.yytext = c.yytext.replace(/columns\s+/, ""), i.getLogger().debug("COLUMNS (LEX)", c.yytext), 28;
484
+ case 8:
485
+ this.pushState("md_string");
486
+ break;
487
+ case 9:
488
+ return "MD_STR";
489
+ case 10:
490
+ this.popState();
491
+ break;
492
+ case 11:
493
+ this.pushState("string");
494
+ break;
495
+ case 12:
496
+ i.getLogger().debug("LEX: POPPING STR:", c.yytext), this.popState();
497
+ break;
498
+ case 13:
499
+ return i.getLogger().debug("LEX: STR end:", c.yytext), "STR";
500
+ case 14:
501
+ return c.yytext = c.yytext.replace(/space\:/, ""), i.getLogger().debug("SPACE NUM (LEX)", c.yytext), 21;
502
+ case 15:
503
+ return c.yytext = "1", i.getLogger().debug("COLUMNS (LEX)", c.yytext), 21;
504
+ case 16:
505
+ return 42;
506
+ case 17:
507
+ return "LINKSTYLE";
508
+ case 18:
509
+ return "INTERPOLATE";
510
+ case 19:
511
+ return this.pushState("CLASSDEF"), 39;
512
+ case 20:
513
+ return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
514
+ case 21:
515
+ return this.popState(), this.pushState("CLASSDEFID"), 40;
516
+ case 22:
517
+ return this.popState(), 41;
518
+ case 23:
519
+ return this.pushState("CLASS"), 43;
520
+ case 24:
521
+ return this.popState(), this.pushState("CLASS_STYLE"), 44;
522
+ case 25:
523
+ return this.popState(), 45;
524
+ case 26:
525
+ return this.pushState("STYLE_STMNT"), 46;
526
+ case 27:
527
+ return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
528
+ case 28:
529
+ return this.popState(), 48;
530
+ case 29:
531
+ return this.pushState("acc_title"), "acc_title";
532
+ case 30:
533
+ return this.popState(), "acc_title_value";
534
+ case 31:
535
+ return this.pushState("acc_descr"), "acc_descr";
536
+ case 32:
537
+ return this.popState(), "acc_descr_value";
538
+ case 33:
539
+ this.pushState("acc_descr_multiline");
540
+ break;
541
+ case 34:
542
+ this.popState();
543
+ break;
544
+ case 35:
545
+ return "acc_descr_multiline_value";
546
+ case 36:
547
+ return 30;
548
+ case 37:
549
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
550
+ case 38:
551
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
552
+ case 39:
553
+ return this.popState(), i.getLogger().debug("Lex: ))"), "NODE_DEND";
554
+ case 40:
555
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
556
+ case 41:
557
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
558
+ case 42:
559
+ return this.popState(), i.getLogger().debug("Lex: (-"), "NODE_DEND";
560
+ case 43:
561
+ return this.popState(), i.getLogger().debug("Lex: -)"), "NODE_DEND";
562
+ case 44:
563
+ return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
564
+ case 45:
565
+ return this.popState(), i.getLogger().debug("Lex: ]]"), "NODE_DEND";
566
+ case 46:
567
+ return this.popState(), i.getLogger().debug("Lex: ("), "NODE_DEND";
568
+ case 47:
569
+ return this.popState(), i.getLogger().debug("Lex: ])"), "NODE_DEND";
570
+ case 48:
571
+ return this.popState(), i.getLogger().debug("Lex: /]"), "NODE_DEND";
572
+ case 49:
573
+ return this.popState(), i.getLogger().debug("Lex: /]"), "NODE_DEND";
574
+ case 50:
575
+ return this.popState(), i.getLogger().debug("Lex: )]"), "NODE_DEND";
576
+ case 51:
577
+ return this.popState(), i.getLogger().debug("Lex: )"), "NODE_DEND";
578
+ case 52:
579
+ return this.popState(), i.getLogger().debug("Lex: ]>"), "NODE_DEND";
580
+ case 53:
581
+ return this.popState(), i.getLogger().debug("Lex: ]"), "NODE_DEND";
582
+ case 54:
583
+ return i.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
584
+ case 55:
585
+ return i.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
586
+ case 56:
587
+ return i.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
588
+ case 57:
589
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
590
+ case 58:
591
+ return i.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
592
+ case 59:
593
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
594
+ case 60:
595
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
596
+ case 61:
597
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
598
+ case 62:
599
+ return i.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
600
+ case 63:
601
+ return i.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
602
+ case 64:
603
+ return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
604
+ case 65:
605
+ return this.pushState("NODE"), 35;
606
+ case 66:
607
+ return this.pushState("NODE"), 35;
608
+ case 67:
609
+ return this.pushState("NODE"), 35;
610
+ case 68:
611
+ return this.pushState("NODE"), 35;
612
+ case 69:
613
+ return this.pushState("NODE"), 35;
614
+ case 70:
615
+ return this.pushState("NODE"), 35;
616
+ case 71:
617
+ return this.pushState("NODE"), 35;
618
+ case 72:
619
+ return i.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
620
+ case 73:
621
+ return this.pushState("BLOCK_ARROW"), i.getLogger().debug("LEX ARR START"), 37;
622
+ case 74:
623
+ return i.getLogger().debug("Lex: NODE_ID", c.yytext), 31;
624
+ case 75:
625
+ return i.getLogger().debug("Lex: EOF", c.yytext), 8;
626
+ case 76:
627
+ this.pushState("md_string");
628
+ break;
629
+ case 77:
630
+ this.pushState("md_string");
631
+ break;
632
+ case 78:
633
+ return "NODE_DESCR";
634
+ case 79:
635
+ this.popState();
636
+ break;
637
+ case 80:
638
+ i.getLogger().debug("Lex: Starting string"), this.pushState("string");
639
+ break;
640
+ case 81:
641
+ i.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
642
+ break;
643
+ case 82:
644
+ return i.getLogger().debug("LEX: NODE_DESCR:", c.yytext), "NODE_DESCR";
645
+ case 83:
646
+ i.getLogger().debug("LEX POPPING"), this.popState();
647
+ break;
648
+ case 84:
649
+ i.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
650
+ break;
651
+ case 85:
652
+ return c.yytext = c.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (right): dir:", c.yytext), "DIR";
653
+ case 86:
654
+ return c.yytext = c.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (left):", c.yytext), "DIR";
655
+ case 87:
656
+ return c.yytext = c.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (x):", c.yytext), "DIR";
657
+ case 88:
658
+ return c.yytext = c.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (y):", c.yytext), "DIR";
659
+ case 89:
660
+ return c.yytext = c.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (up):", c.yytext), "DIR";
661
+ case 90:
662
+ return c.yytext = c.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (down):", c.yytext), "DIR";
663
+ case 91:
664
+ return c.yytext = "]>", i.getLogger().debug("Lex (ARROW_DIR end):", c.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
665
+ case 92:
666
+ return i.getLogger().debug("Lex: LINK", "#" + c.yytext + "#"), 15;
667
+ case 93:
668
+ return i.getLogger().debug("Lex: LINK", c.yytext), 15;
669
+ case 94:
670
+ return i.getLogger().debug("Lex: LINK", c.yytext), 15;
671
+ case 95:
672
+ return i.getLogger().debug("Lex: LINK", c.yytext), 15;
673
+ case 96:
674
+ return i.getLogger().debug("Lex: START_LINK", c.yytext), this.pushState("LLABEL"), 16;
675
+ case 97:
676
+ return i.getLogger().debug("Lex: START_LINK", c.yytext), this.pushState("LLABEL"), 16;
677
+ case 98:
678
+ return i.getLogger().debug("Lex: START_LINK", c.yytext), this.pushState("LLABEL"), 16;
679
+ case 99:
680
+ this.pushState("md_string");
681
+ break;
682
+ case 100:
683
+ return i.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
684
+ case 101:
685
+ return this.popState(), i.getLogger().debug("Lex: LINK", "#" + c.yytext + "#"), 15;
686
+ case 102:
687
+ return this.popState(), i.getLogger().debug("Lex: LINK", c.yytext), 15;
688
+ case 103:
689
+ return this.popState(), i.getLogger().debug("Lex: LINK", c.yytext), 15;
690
+ case 104:
691
+ return i.getLogger().debug("Lex: COLON", c.yytext), c.yytext = c.yytext.slice(1), 27;
692
+ }
693
+ }, "anonymous"),
694
+ rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\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+)/],
695
+ conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
696
+ };
697
+ return v;
698
+ }();
699
+ _.lexer = T;
700
+ function O() {
701
+ this.yy = {};
702
+ }
703
+ return u(O, "Parser"), O.prototype = _, _.Parser = O, new O();
704
+ }();
705
+ ae.parser = ae;
706
+ var Dt = ae, z = /* @__PURE__ */ new Map(), ce = [], ne = /* @__PURE__ */ new Map(), Se = "color", be = "fill", Tt = "bgFill", Ce = ",", G = /* @__PURE__ */ new Map(), le = "", Nt = /* @__PURE__ */ u((e) => St.sanitizeText(e, Oe()), "sanitizeText"), It = /* @__PURE__ */ u(function(e, a = "") {
707
+ let o = G.get(e);
708
+ o || (o = { id: e, styles: [], textStyles: [] }, G.set(e, o)), a?.split(Ce).forEach((r) => {
709
+ const l = r.replace(/([^;]*);/, "$1").trim();
710
+ if (RegExp(Se).exec(r)) {
711
+ const s = l.replace(be, Tt).replace(Se, be);
712
+ o.textStyles.push(s);
713
+ }
714
+ o.styles.push(l);
715
+ });
716
+ }, "addStyleClass"), Ot = /* @__PURE__ */ u(function(e, a = "") {
717
+ const o = z.get(e);
718
+ a != null && (o.styles = a.split(Ce));
719
+ }, "addStyle2Node"), vt = /* @__PURE__ */ u(function(e, a) {
720
+ e.split(",").forEach(function(o) {
721
+ let r = z.get(o);
722
+ if (r === void 0) {
723
+ const l = o.trim();
724
+ r = { id: l, type: "na", children: [] }, z.set(l, r);
725
+ }
726
+ r.classes || (r.classes = []), r.classes.push(a);
727
+ });
728
+ }, "setCssClass"), ze = /* @__PURE__ */ u((e, a) => {
729
+ const o = e.flat(), r = [], d = o.find((s) => s?.type === "column-setting")?.columns ?? -1;
730
+ for (const s of o) {
731
+ if (typeof d == "number" && d > 0 && s.type !== "column-setting" && typeof s.widthInColumns == "number" && s.widthInColumns > d && m.warn(
732
+ `Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${d}`
733
+ ), s.label && (s.label = Nt(s.label)), s.type === "classDef") {
734
+ It(s.id, s.css);
735
+ continue;
736
+ }
737
+ if (s.type === "applyClass") {
738
+ vt(s.id, s?.styleClass ?? "");
739
+ continue;
740
+ }
741
+ if (s.type === "applyStyles") {
742
+ s?.stylesStr && Ot(s.id, s?.stylesStr);
743
+ continue;
744
+ }
745
+ if (s.type === "column-setting")
746
+ a.columns = s.columns ?? -1;
747
+ else if (s.type === "edge") {
748
+ const h = (ne.get(s.id) ?? 0) + 1;
749
+ ne.set(s.id, h), s.id = h + "-" + s.id, ce.push(s);
750
+ } else {
751
+ s.label || (s.type === "composite" ? s.label = "" : s.label = s.id);
752
+ const h = z.get(s.id);
753
+ if (h === void 0 ? z.set(s.id, s) : (s.type !== "na" && (h.type = s.type), s.label !== s.id && (h.label = s.label)), s.children && ze(s.children, s), s.type === "space") {
754
+ const x = s.width ?? 1;
755
+ for (let y = 0; y < x; y++) {
756
+ const b = mt(s);
757
+ b.id = b.id + "-" + y, z.set(b.id, b), r.push(b);
758
+ }
759
+ } else h === void 0 && r.push(s);
760
+ }
761
+ }
762
+ a.children = r;
763
+ }, "populateBlockDatabase"), ue = [], K = { id: "root", type: "composite", children: [], columns: -1 }, Ct = /* @__PURE__ */ u(() => {
764
+ m.debug("Clear called"), ut(), K = { id: "root", type: "composite", children: [], columns: -1 }, z = /* @__PURE__ */ new Map([["root", K]]), ue = [], G = /* @__PURE__ */ new Map(), ce = [], ne = /* @__PURE__ */ new Map(), le = "";
765
+ }, "clear");
766
+ function Ae(e) {
767
+ switch (m.debug("typeStr2Type", e), e) {
768
+ case "[]":
769
+ return "square";
770
+ case "()":
771
+ return m.debug("we have a round"), "round";
772
+ case "(())":
773
+ return "circle";
774
+ case ">]":
775
+ return "rect_left_inv_arrow";
776
+ case "{}":
777
+ return "diamond";
778
+ case "{{}}":
779
+ return "hexagon";
780
+ case "([])":
781
+ return "stadium";
782
+ case "[[]]":
783
+ return "subroutine";
784
+ case "[()]":
785
+ return "cylinder";
786
+ case "((()))":
787
+ return "doublecircle";
788
+ case "[//]":
789
+ return "lean_right";
790
+ case "[\\\\]":
791
+ return "lean_left";
792
+ case "[/\\]":
793
+ return "trapezoid";
794
+ case "[\\/]":
795
+ return "inv_trapezoid";
796
+ case "<[]>":
797
+ return "block_arrow";
798
+ default:
799
+ return "na";
800
+ }
801
+ }
802
+ u(Ae, "typeStr2Type");
803
+ function Be(e) {
804
+ switch (m.debug("typeStr2Type", e), e) {
805
+ case "==":
806
+ return "thick";
807
+ default:
808
+ return "normal";
809
+ }
810
+ }
811
+ u(Be, "edgeTypeStr2Type");
812
+ function Re(e) {
813
+ switch (e.trim().slice(-1)) {
814
+ case "x":
815
+ return "arrow_cross";
816
+ case "o":
817
+ return "arrow_circle";
818
+ case ">":
819
+ return "arrow_point";
820
+ default:
821
+ return "";
822
+ }
823
+ }
824
+ u(Re, "edgeStrToEdgeData");
825
+ function Pe(e) {
826
+ switch (e.trim().charAt(0)) {
827
+ case "x":
828
+ return "arrow_cross";
829
+ case "o":
830
+ return "arrow_circle";
831
+ case "<":
832
+ return "arrow_point";
833
+ default:
834
+ return "arrow_open";
835
+ }
836
+ }
837
+ u(Pe, "edgeStrToEdgeStartData");
838
+ function Fe(e) {
839
+ return e.includes("==") ? "thick" : "normal";
840
+ }
841
+ u(Fe, "edgeStrToThickness");
842
+ function Me(e) {
843
+ return e.includes(".-") ? "dotted" : "solid";
844
+ }
845
+ u(Me, "edgeStrToPattern");
846
+ var xe = 0, zt = /* @__PURE__ */ u(() => (xe++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + xe), "generateId"), At = /* @__PURE__ */ u((e) => {
847
+ K.children = e, ze(e, K), ue = K.children;
848
+ }, "setHierarchy"), Bt = /* @__PURE__ */ u((e) => {
849
+ const a = z.get(e);
850
+ return a ? a.columns ? a.columns : a.children ? a.children.length : -1 : -1;
851
+ }, "getColumns"), Rt = /* @__PURE__ */ u(() => [...z.values()], "getBlocksFlat"), Pt = /* @__PURE__ */ u(() => ue || [], "getBlocks"), Ft = /* @__PURE__ */ u(() => ce, "getEdges"), Mt = /* @__PURE__ */ u((e) => z.get(e), "getBlock"), Kt = /* @__PURE__ */ u((e) => {
852
+ z.set(e.id, e);
853
+ }, "setBlock"), Yt = /* @__PURE__ */ u((e) => {
854
+ le = e;
855
+ }, "setDiagramId"), Wt = /* @__PURE__ */ u(() => le, "getDiagramId"), Vt = /* @__PURE__ */ u(() => m, "getLogger"), Ut = /* @__PURE__ */ u(function() {
856
+ return G;
857
+ }, "getClasses"), Ht = {
858
+ getConfig: /* @__PURE__ */ u(() => Y().block, "getConfig"),
859
+ typeStr2Type: Ae,
860
+ edgeTypeStr2Type: Be,
861
+ edgeStrToEdgeData: Re,
862
+ edgeStrToEdgeStartData: Pe,
863
+ edgeStrToThickness: Fe,
864
+ edgeStrToPattern: Me,
865
+ getLogger: Vt,
866
+ getBlocksFlat: Rt,
867
+ getBlocks: Pt,
868
+ getEdges: Ft,
869
+ setHierarchy: At,
870
+ getBlock: Mt,
871
+ setBlock: Kt,
872
+ getColumns: Bt,
873
+ getClasses: Ut,
874
+ clear: Ct,
875
+ generateId: zt,
876
+ setDiagramId: Yt,
877
+ getDiagramId: Wt
878
+ }, Xt = Ht, re = /* @__PURE__ */ u((e, a) => {
879
+ const o = Lt, r = o(e, "r"), l = o(e, "g"), d = o(e, "b");
880
+ return gt(r, l, d, a);
881
+ }, "fade"), Gt = /* @__PURE__ */ u((e) => `.label {
882
+ font-family: ${e.fontFamily};
883
+ color: ${e.nodeTextColor || e.textColor};
884
+ }
885
+ .cluster-label text {
886
+ fill: ${e.titleColor};
887
+ }
888
+ .cluster-label span {
889
+ color: ${e.titleColor};
890
+ }
891
+
892
+
893
+
894
+ .label text,span {
895
+ fill: ${e.nodeTextColor || e.textColor};
896
+ color: ${e.nodeTextColor || e.textColor};
897
+ }
898
+
899
+ .node rect,
900
+ .node circle,
901
+ .node ellipse,
902
+ .node polygon,
903
+ .node path {
904
+ fill: ${e.mainBkg};
905
+ stroke: ${e.nodeBorder};
906
+ stroke-width: 1px;
907
+ }
908
+ .flowchart-label text {
909
+ text-anchor: middle;
910
+ }
911
+ // .flowchart-label .text-outer-tspan {
912
+ // text-anchor: middle;
913
+ // }
914
+ // .flowchart-label .text-inner-tspan {
915
+ // text-anchor: start;
916
+ // }
917
+
918
+ .node .label {
919
+ text-align: center;
920
+ }
921
+ .node.clickable {
922
+ cursor: pointer;
923
+ }
924
+
925
+ .arrowheadPath {
926
+ fill: ${e.arrowheadColor};
927
+ }
928
+
929
+ .edgePath .path {
930
+ stroke: ${e.lineColor};
931
+ stroke-width: 2.0px;
932
+ }
933
+
934
+ .flowchart-link {
935
+ stroke: ${e.lineColor};
936
+ fill: none;
937
+ }
938
+
939
+ .edgeLabel {
940
+ background-color: ${e.edgeLabelBackground};
941
+ /*
942
+ * This is for backward compatibility with existing code that didn't
943
+ * add a \`<p>\` around edge labels.
944
+ *
945
+ * TODO: We should probably remove this in a future release.
946
+ */
947
+ p {
948
+ margin: 0;
949
+ padding: 0;
950
+ display: inline;
951
+ }
952
+ rect {
953
+ opacity: 0.5;
954
+ background-color: ${e.edgeLabelBackground};
955
+ fill: ${e.edgeLabelBackground};
956
+ }
957
+ text-align: center;
958
+ }
959
+
960
+ /* For html labels only */
961
+ .labelBkg {
962
+ background-color: ${e.edgeLabelBackground};
963
+ }
964
+
965
+ .node .cluster {
966
+ // fill: ${re(e.mainBkg, 0.5)};
967
+ fill: ${re(e.clusterBkg, 0.5)};
968
+ stroke: ${re(e.clusterBorder, 0.2)};
969
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
970
+ stroke-width: 1px;
971
+ }
972
+
973
+ .cluster text {
974
+ fill: ${e.titleColor};
975
+ }
976
+
977
+ .cluster span {
978
+ color: ${e.titleColor};
979
+ }
980
+ /* .cluster div {
981
+ color: ${e.titleColor};
982
+ } */
983
+
984
+ div.mermaidTooltip {
985
+ position: absolute;
986
+ text-align: center;
987
+ max-width: 200px;
988
+ padding: 2px;
989
+ font-family: ${e.fontFamily};
990
+ font-size: 12px;
991
+ background: ${e.tertiaryColor};
992
+ border: 1px solid ${e.border2};
993
+ border-radius: 2px;
994
+ pointer-events: none;
995
+ z-index: 100;
996
+ }
997
+
998
+ .flowchartTitleText {
999
+ text-anchor: middle;
1000
+ font-size: 18px;
1001
+ fill: ${e.textColor};
1002
+ }
1003
+ ${qe()}
1004
+ `, "getStyles"), qt = Gt;
1005
+ function oe(e, a) {
1006
+ if (e === 0 || !Number.isInteger(e))
1007
+ throw new Error("Columns must be an integer !== 0.");
1008
+ if (a < 0 || !Number.isInteger(a))
1009
+ throw new Error("Position must be a non-negative integer." + a);
1010
+ if (e < 0)
1011
+ return { px: a, py: 0 };
1012
+ if (e === 1)
1013
+ return { px: 0, py: a };
1014
+ const o = a % e, r = Math.floor(a / e);
1015
+ return { px: o, py: r };
1016
+ }
1017
+ u(oe, "calculateBlockPosition");
1018
+ var Jt = /* @__PURE__ */ u((e) => {
1019
+ let a = 0, o = 0;
1020
+ for (const r of e.children) {
1021
+ const { width: l, height: d, x: s, y: h } = r.size ?? { width: 0, height: 0, x: 0, y: 0 };
1022
+ if (m.debug(
1023
+ "getMaxChildSize abc95 child:",
1024
+ r.id,
1025
+ "width:",
1026
+ l,
1027
+ "height:",
1028
+ d,
1029
+ "x:",
1030
+ s,
1031
+ "y:",
1032
+ h,
1033
+ r.type
1034
+ ), r.type === "space")
1035
+ continue;
1036
+ const x = l / (r.widthInColumns ?? 1);
1037
+ x > a && (a = x), d > o && (o = d);
1038
+ }
1039
+ return { width: a, height: o };
1040
+ }, "getMaxChildSize");
1041
+ function q(e, a, o = 0, r = 0, l = 8) {
1042
+ m.debug(
1043
+ "setBlockSizes abc95 (start)",
1044
+ e.id,
1045
+ e?.size?.x,
1046
+ "block width =",
1047
+ e?.size,
1048
+ "siblingWidth",
1049
+ o
1050
+ ), e?.size?.width || (e.size = {
1051
+ width: o,
1052
+ height: r,
1053
+ x: 0,
1054
+ y: 0
1055
+ });
1056
+ let d = 0, s = 0;
1057
+ if (e.children?.length > 0) {
1058
+ for (const S of e.children)
1059
+ q(S, a, 0, 0, l);
1060
+ const h = Jt(e);
1061
+ d = h.width, s = h.height, m.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", d, s);
1062
+ for (const S of e.children)
1063
+ S.size && (m.debug(
1064
+ `abc95 Setting size of children of ${e.id} id=${S.id} ${d} ${s} ${JSON.stringify(S.size)}`
1065
+ ), S.size.width = d * (S.widthInColumns ?? 1) + l * ((S.widthInColumns ?? 1) - 1), S.size.height = s, S.size.x = 0, S.size.y = 0, m.debug(
1066
+ `abc95 updating size of ${e.id} children child:${S.id} maxWidth:${d} maxHeight:${s}`
1067
+ ));
1068
+ for (const S of e.children)
1069
+ q(S, a, d, s, l);
1070
+ const x = e.columns ?? -1;
1071
+ let y = 0;
1072
+ for (const S of e.children)
1073
+ y += S.widthInColumns ?? 1;
1074
+ let b = e.children.length;
1075
+ x > 0 && x < y && (b = x);
1076
+ const f = Math.ceil(y / b);
1077
+ let L = b * (d + l) + l, w = f * (s + l) + l;
1078
+ if (L < o) {
1079
+ m.debug(
1080
+ `Detected to small sibling: abc95 ${e.id} siblingWidth ${o} siblingHeight ${r} width ${L}`
1081
+ ), L = o, w = r;
1082
+ const S = (o - b * l - l) / b, k = (r - f * l - l) / f;
1083
+ m.debug("Size indata abc88", e.id, "childWidth", S, "maxWidth", d), m.debug("Size indata abc88", e.id, "childHeight", k, "maxHeight", s), m.debug("Size indata abc88 xSize", b, "padding", l);
1084
+ for (const _ of e.children)
1085
+ _.size && (_.size.width = S, _.size.height = k, _.size.x = 0, _.size.y = 0);
1086
+ }
1087
+ if (m.debug(
1088
+ `abc95 (finale calc) ${e.id} xSize ${b} ySize ${f} columns ${x}${e.children.length} width=${Math.max(L, e.size?.width || 0)}`
1089
+ ), L < (e?.size?.width || 0)) {
1090
+ L = e?.size?.width || 0;
1091
+ const S = x > 0 ? Math.min(e.children.length, x) : e.children.length;
1092
+ if (S > 0) {
1093
+ const k = (L - S * l - l) / S;
1094
+ m.debug("abc95 (growing to fit) width", e.id, L, e.size?.width, k);
1095
+ for (const _ of e.children)
1096
+ _.size && (_.size.width = k);
1097
+ }
1098
+ }
1099
+ e.size = {
1100
+ width: L,
1101
+ height: w,
1102
+ x: 0,
1103
+ y: 0
1104
+ };
1105
+ }
1106
+ m.debug(
1107
+ "setBlockSizes abc94 (done)",
1108
+ e.id,
1109
+ e?.size?.x,
1110
+ e?.size?.width,
1111
+ e?.size?.y,
1112
+ e?.size?.height
1113
+ );
1114
+ }
1115
+ u(q, "setBlockSizes");
1116
+ function ge(e, a, o = 8) {
1117
+ m.debug(
1118
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
1119
+ );
1120
+ const r = e.columns ?? -1;
1121
+ if (m.debug("layoutBlocks columns abc95", e.id, "=>", r, e), e.children && // find max width of children
1122
+ e.children.length > 0) {
1123
+ const l = e?.children[0]?.size?.width ?? 0, d = e.children.length * l + (e.children.length - 1) * o;
1124
+ m.debug("widthOfChildren 88", d, "posX");
1125
+ const s = /* @__PURE__ */ new Map();
1126
+ {
1127
+ let f = 0;
1128
+ for (const L of e.children) {
1129
+ if (!L.size)
1130
+ continue;
1131
+ const { py: w } = oe(r, f), S = s.get(w) ?? 0;
1132
+ L.size.height > S && s.set(w, L.size.height);
1133
+ let k = L?.widthInColumns ?? 1;
1134
+ r > 0 && (k = Math.min(k, r - f % r)), f += k;
1135
+ }
1136
+ }
1137
+ const h = /* @__PURE__ */ new Map();
1138
+ {
1139
+ let f = 0;
1140
+ const L = [...s.keys()].sort((w, S) => w - S);
1141
+ for (const w of L)
1142
+ h.set(w, f), f += (s.get(w) ?? 0) + o;
1143
+ }
1144
+ let x = 0;
1145
+ m.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1146
+ let y = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -o, b = 0;
1147
+ for (const f of e.children) {
1148
+ const L = e;
1149
+ if (!f.size)
1150
+ continue;
1151
+ const { width: w, height: S } = f.size, { px: k, py: _ } = oe(r, x);
1152
+ if (_ != b && (b = _, y = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -o, m.debug("New row in layout for block", e.id, " and child ", f.id, b)), m.debug(
1153
+ `abc89 layout blocks (child) id: ${f.id} Pos: ${x} (px, py) ${k},${_} (${L?.size?.x},${L?.size?.y}) parent: ${L.id} width: ${w}${o}`
1154
+ ), L.size) {
1155
+ const O = w / 2;
1156
+ f.size.x = y + o + O, m.debug(
1157
+ `abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${y} new startingPosX${f.size.x} ${O} padding=${o} width=${w} halfWidth=${O} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${w * (f?.widthInColumns ?? 1) / 2}`
1158
+ ), y = f.size.x + O;
1159
+ const v = h.get(_) ?? 0, g = s.get(_) ?? S;
1160
+ f.size.y = L.size.y - L.size.height / 2 + v + g / 2 + o, m.debug(
1161
+ `abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${y}${o}${O}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${w * (f?.widthInColumns ?? 1) / 2}`
1162
+ );
1163
+ }
1164
+ f.children && ge(f, a, o);
1165
+ let T = f?.widthInColumns ?? 1;
1166
+ r > 0 && (T = Math.min(T, r - x % r)), x += T, m.debug("abc88 columnsPos", f, x);
1167
+ }
1168
+ }
1169
+ m.debug(
1170
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
1171
+ );
1172
+ }
1173
+ u(ge, "layoutBlocks");
1174
+ function he(e, { minX: a, minY: o, maxX: r, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1175
+ if (e.size && e.id !== "root") {
1176
+ const { x: d, y: s, width: h, height: x } = e.size;
1177
+ d - h / 2 < a && (a = d - h / 2), s - x / 2 < o && (o = s - x / 2), d + h / 2 > r && (r = d + h / 2), s + x / 2 > l && (l = s + x / 2);
1178
+ }
1179
+ if (e.children)
1180
+ for (const d of e.children)
1181
+ ({ minX: a, minY: o, maxX: r, maxY: l } = he(d, { minX: a, minY: o, maxX: r, maxY: l }));
1182
+ return { minX: a, minY: o, maxX: r, maxY: l };
1183
+ }
1184
+ u(he, "findBounds");
1185
+ function Ke(e) {
1186
+ const a = e.getBlock("root");
1187
+ if (!a)
1188
+ return;
1189
+ const o = Oe()?.block?.padding ?? 8;
1190
+ q(a, e, 0, 0, o), ge(a, e, o), m.debug("getBlocks", JSON.stringify(a, null, 2));
1191
+ const { minX: r, minY: l, maxX: d, maxY: s } = he(a), h = s - l, x = d - r;
1192
+ return { x: r, y: l, width: x, height: h };
1193
+ }
1194
+ u(Ke, "layout");
1195
+ function de(e, a, o = !1) {
1196
+ const r = e;
1197
+ let l = "default";
1198
+ (r?.classes?.length || 0) > 0 && (l = (r?.classes ?? []).join(" ")), l = l + " flowchart-label";
1199
+ const d = (r?.classes ?? []).flatMap(
1200
+ (S) => a.getClasses().get(S)?.styles ?? []
1201
+ );
1202
+ let s = 0, h = "rect", x;
1203
+ switch (r.type) {
1204
+ case "round":
1205
+ s = 5, h = "rect";
1206
+ break;
1207
+ case "composite":
1208
+ s = 0, h = "composite", x = 0;
1209
+ break;
1210
+ case "square":
1211
+ h = "rect";
1212
+ break;
1213
+ case "diamond":
1214
+ h = "question";
1215
+ break;
1216
+ case "hexagon":
1217
+ h = "hexagon";
1218
+ break;
1219
+ case "block_arrow":
1220
+ h = "block_arrow";
1221
+ break;
1222
+ case "odd":
1223
+ h = "rect_left_inv_arrow";
1224
+ break;
1225
+ case "lean_right":
1226
+ h = "lean_right";
1227
+ break;
1228
+ case "lean_left":
1229
+ h = "lean_left";
1230
+ break;
1231
+ case "trapezoid":
1232
+ h = "trapezoid";
1233
+ break;
1234
+ case "inv_trapezoid":
1235
+ h = "inv_trapezoid";
1236
+ break;
1237
+ case "rect_left_inv_arrow":
1238
+ h = "rect_left_inv_arrow";
1239
+ break;
1240
+ case "circle":
1241
+ h = "circle";
1242
+ break;
1243
+ case "ellipse":
1244
+ h = "ellipse";
1245
+ break;
1246
+ case "stadium":
1247
+ h = "stadium";
1248
+ break;
1249
+ case "subroutine":
1250
+ h = "subroutine";
1251
+ break;
1252
+ case "cylinder":
1253
+ h = "cylinder";
1254
+ break;
1255
+ case "group":
1256
+ h = "rect";
1257
+ break;
1258
+ case "doublecircle":
1259
+ h = "doublecircle";
1260
+ break;
1261
+ default:
1262
+ h = "rect";
1263
+ }
1264
+ const y = bt(r?.styles ?? []), b = r.label, f = r.size ?? { width: 0, height: 0, x: 0, y: 0 }, L = a.getDiagramId();
1265
+ return {
1266
+ labelStyle: y.labelStyle,
1267
+ shape: h,
1268
+ label: b,
1269
+ labelText: b,
1270
+ rx: s,
1271
+ ry: s,
1272
+ class: l,
1273
+ cssClasses: l,
1274
+ cssStyles: r?.styles ?? [],
1275
+ cssCompiledStyles: d,
1276
+ style: y.style,
1277
+ id: r.id,
1278
+ domId: L ? `${L}-${r.id}` : r.id,
1279
+ isGroup: !1,
1280
+ directions: r.directions,
1281
+ width: f.width || void 0,
1282
+ height: f.height || void 0,
1283
+ wrappingWidth: f.width || Number.POSITIVE_INFINITY,
1284
+ x: f.x,
1285
+ y: f.y,
1286
+ positioned: o,
1287
+ intersect: void 0,
1288
+ padding: x ?? Y()?.block?.padding ?? 0,
1289
+ widthInColumns: r.widthInColumns ?? 1
1290
+ };
1291
+ }
1292
+ u(de, "getNodeFromBlock");
1293
+ async function Ye(e, a, o) {
1294
+ const r = de(a, o, !1);
1295
+ if (a.type === "group")
1296
+ return;
1297
+ const l = Y(), d = await ve(e, r, { config: l }), s = d.node()?.getBBox() ?? { width: 0, height: 0 }, h = o.getBlock(r.id);
1298
+ h.size = { width: s.width, height: s.height, x: 0, y: 0, node: d }, o.setBlock(h), d.remove();
1299
+ }
1300
+ u(Ye, "calculateBlockSize");
1301
+ async function We(e, a, o) {
1302
+ const r = de(a, o, !0);
1303
+ if (o.getBlock(r.id).type !== "space") {
1304
+ const d = Y();
1305
+ await ve(e, r, { config: d }), a.intersect = r?.intersect, xt(r);
1306
+ }
1307
+ }
1308
+ u(We, "insertBlockPositioned");
1309
+ async function J(e, a, o, r) {
1310
+ for (const l of a)
1311
+ await r(e, l, o), l.children && await J(e, l.children, o, r);
1312
+ }
1313
+ u(J, "performOperations");
1314
+ async function Ve(e, a, o) {
1315
+ await J(e, a, o, Ye);
1316
+ }
1317
+ u(Ve, "calculateBlockSizes");
1318
+ async function Ue(e, a, o) {
1319
+ await J(e, a, o, We);
1320
+ }
1321
+ u(Ue, "insertBlocks");
1322
+ async function He(e, a, o, r, l) {
1323
+ const d = new ht({
1324
+ multigraph: !0,
1325
+ compound: !0
1326
+ });
1327
+ d.setGraph({
1328
+ rankdir: "TB",
1329
+ nodesep: 10,
1330
+ ranksep: 10,
1331
+ marginx: 8,
1332
+ marginy: 8
1333
+ });
1334
+ for (const s of o)
1335
+ s.size && d.setNode(s.id, {
1336
+ width: s.size.width,
1337
+ height: s.size.height,
1338
+ intersect: s.intersect
1339
+ });
1340
+ for (const s of a)
1341
+ if (s.start && s.end) {
1342
+ const h = r.getBlock(s.start), x = r.getBlock(s.end);
1343
+ if (h?.size && x?.size) {
1344
+ const y = h.size, b = x.size, f = [
1345
+ { x: y.x, y: y.y },
1346
+ { x: y.x + (b.x - y.x) / 2, y: y.y + (b.y - y.y) / 2 },
1347
+ { x: b.x, y: b.y }
1348
+ ], L = l ? `${l}-${s.id}` : s.id, w = s.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal", S = s.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid", k = `${w} ${S} flowchart-link LS-a1 LE-b1`;
1349
+ dt(
1350
+ e,
1351
+ {
1352
+ ...s,
1353
+ id: L,
1354
+ arrowTypeEnd: s.arrowTypeEnd,
1355
+ arrowTypeStart: s.arrowTypeStart,
1356
+ points: f,
1357
+ classes: k
1358
+ },
1359
+ {},
1360
+ "block",
1361
+ d.node(s.start),
1362
+ d.node(s.end),
1363
+ l
1364
+ ), s.label && (await pt(e, {
1365
+ ...s,
1366
+ label: s.label,
1367
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1368
+ arrowTypeEnd: s.arrowTypeEnd,
1369
+ arrowTypeStart: s.arrowTypeStart,
1370
+ points: f,
1371
+ classes: k
1372
+ }), ft(
1373
+ { ...s, x: f[1].x, y: f[1].y },
1374
+ {
1375
+ originalPath: f
1376
+ }
1377
+ ));
1378
+ }
1379
+ }
1380
+ }
1381
+ u(He, "insertEdges");
1382
+ var Zt = /* @__PURE__ */ u(function(e, a) {
1383
+ return a.db.getClasses();
1384
+ }, "getClasses"), Qt = /* @__PURE__ */ u(async function(e, a, o, r) {
1385
+ const { securityLevel: l, block: d } = Y(), s = r.db;
1386
+ s.setDiagramId(a);
1387
+ let h;
1388
+ l === "sandbox" && (h = X("#i" + a));
1389
+ const x = l === "sandbox" ? X(h.nodes()[0].contentDocument.body) : X("body"), y = l === "sandbox" ? x.select(`[id="${a}"]`) : X(`[id="${a}"]`);
1390
+ ct(y, ["point", "circle", "cross"], r.type, a);
1391
+ const f = s.getBlocks(), L = s.getBlocksFlat(), w = s.getEdges(), S = y.insert("g").attr("class", "block");
1392
+ await Ve(S, f, s);
1393
+ const k = Ke(s);
1394
+ await Ue(S, f, s), await He(S, w, L, s, a);
1395
+ const _ = S.node()?.getBBox(), T = _ && Number.isFinite(_.width) && Number.isFinite(_.height) ? _ : k;
1396
+ if (T) {
1397
+ const O = Math.max(1, Math.round(0.125 * (T.width / T.height))), v = T.height + O + 10, g = T.width + 10, { useMaxWidth: i } = d;
1398
+ lt(y, v, g, !!i), m.debug("Here Bounds", k, T), y.attr(
1399
+ "viewBox",
1400
+ `${T.x - 5} ${T.y - 5} ${T.width + 10} ${T.height + 10}`
1401
+ );
1402
+ }
1403
+ }, "draw"), jt = {
1404
+ draw: Qt,
1405
+ getClasses: Zt
1406
+ }, ss = {
1407
+ parser: Dt,
1408
+ db: Xt,
1409
+ renderer: jt,
1410
+ styles: qt
1411
+ };
1412
+ export {
1413
+ ss as diagram
1414
+ };