@bytechain.cn/colamd 1.5.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 (157) hide show
  1. package/.github/workflows/release.yml +66 -0
  2. package/.trae/documents/fix-mermaid-colors-and-sankey.md +50 -0
  3. package/CLAUDE.md +87 -0
  4. package/LICENSE +21 -0
  5. package/README.md +540 -0
  6. package/README_CN.md +543 -0
  7. package/demo.md +486 -0
  8. package/dist/main/index.js +735 -0
  9. package/dist/preload/index.js +71 -0
  10. package/dist/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/dist/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/dist/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/dist/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/dist/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/dist/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/dist/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/dist/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/dist/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/dist/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/dist/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/dist/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/dist/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/dist/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/dist/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/dist/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/dist/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/dist/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/dist/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/dist/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/dist/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/dist/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/dist/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/dist/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/dist/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/dist/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/dist/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/dist/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/dist/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/dist/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/dist/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/dist/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/dist/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/dist/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/dist/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/dist/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/dist/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/dist/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/dist/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/dist/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/dist/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/dist/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/dist/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/dist/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/dist/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/dist/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/dist/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/dist/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/dist/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/dist/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/dist/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/dist/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/dist/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/dist/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/dist/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/dist/renderer/assets/arc-tTbbM8LO.js +131 -0
  70. package/dist/renderer/assets/architectureDiagram-3BPJPVTR-CEgYow6c.js +8720 -0
  71. package/dist/renderer/assets/blockDiagram-GPEHLZMM-LHyVtPwW.js +3825 -0
  72. package/dist/renderer/assets/c4Diagram-AAUBKEIU-C1P1eJrf.js +2482 -0
  73. package/dist/renderer/assets/channel-upve91Tq.js +7 -0
  74. package/dist/renderer/assets/chunk-2J33WTMH-lag2vhq9.js +24 -0
  75. package/dist/renderer/assets/chunk-4BX2VUAB-BXJ8Ggh-.js +16 -0
  76. package/dist/renderer/assets/chunk-55IACEB6-CiBpxRa1.js +13 -0
  77. package/dist/renderer/assets/chunk-727SXJPM-ODeKQFXC.js +2016 -0
  78. package/dist/renderer/assets/chunk-AQP2D5EJ-BK7xJolB.js +1953 -0
  79. package/dist/renderer/assets/chunk-FMBD7UC4-BxpCZPtz.js +19 -0
  80. package/dist/renderer/assets/chunk-ND2GUHAM-CqqaU9Ue.js +116 -0
  81. package/dist/renderer/assets/chunk-QZHKN3VN-Biq_K124.js +19 -0
  82. package/dist/renderer/assets/classDiagram-4FO5ZUOK-Cq95X99o.js +23 -0
  83. package/dist/renderer/assets/classDiagram-v2-Q7XG4LA2-Cq95X99o.js +23 -0
  84. package/dist/renderer/assets/cose-bilkent-S5V4N54A-XasiD0bu.js +4942 -0
  85. package/dist/renderer/assets/cytoscape.esm-CpHeHM5e.js +30269 -0
  86. package/dist/renderer/assets/dagre-BM42HDAG-Nq84Gfx4.js +705 -0
  87. package/dist/renderer/assets/defaultLocale-B2RvLBDe.js +206 -0
  88. package/dist/renderer/assets/diagram-2AECGRRQ-DwuB1GWt.js +301 -0
  89. package/dist/renderer/assets/diagram-5GNKFQAL-C2tgeI1h.js +169 -0
  90. package/dist/renderer/assets/diagram-KO2AKTUF-D5KzjNBc.js +632 -0
  91. package/dist/renderer/assets/diagram-LMA3HP47-C12xHS1c.js +212 -0
  92. package/dist/renderer/assets/diagram-OG6HWLK6-CnxI9oEa.js +851 -0
  93. package/dist/renderer/assets/erDiagram-TEJ5UH35-D_uPaKwn.js +1227 -0
  94. package/dist/renderer/assets/flowDiagram-I6XJVG4X-B6q_1-tE.js +2332 -0
  95. package/dist/renderer/assets/ganttDiagram-6RSMTGT7-CFo7ifF9.js +3720 -0
  96. package/dist/renderer/assets/gitGraphDiagram-PVQCEYII-WSexHTnq.js +1373 -0
  97. package/dist/renderer/assets/graph-DyX_9f6d.js +1988 -0
  98. package/dist/renderer/assets/index-DW7LS8C1.js +72292 -0
  99. package/dist/renderer/assets/index-dyHEFYvY.css +2184 -0
  100. package/dist/renderer/assets/infoDiagram-5YYISTIA-DaeJdLRq.js +31 -0
  101. package/dist/renderer/assets/init-ZxktEp_H.js +16 -0
  102. package/dist/renderer/assets/ishikawaDiagram-YF4QCWOH-DDCZc35f.js +967 -0
  103. package/dist/renderer/assets/journeyDiagram-JHISSGLW-BEdmpAgl.js +1255 -0
  104. package/dist/renderer/assets/kanban-definition-UN3LZRKU-BEFtQcFb.js +1052 -0
  105. package/dist/renderer/assets/layout-CAJgQHdw.js +2610 -0
  106. package/dist/renderer/assets/linear-B2ggJ8Am.js +340 -0
  107. package/dist/renderer/assets/mindmap-definition-RKZ34NQL-DSxVgHB5.js +1180 -0
  108. package/dist/renderer/assets/ordinal-DSZU4PqD.js +76 -0
  109. package/dist/renderer/assets/pieDiagram-4H26LBE5-CwYoJBuL.js +246 -0
  110. package/dist/renderer/assets/quadrantDiagram-W4KKPZXB-CST9Fvg9.js +1344 -0
  111. package/dist/renderer/assets/requirementDiagram-4Y6WPE33-DtrH52jS.js +1204 -0
  112. package/dist/renderer/assets/sankeyDiagram-5OEKKPKP-ca1tPzJ_.js +1274 -0
  113. package/dist/renderer/assets/sequenceDiagram-3UESZ5HK-Dfp1EJZ7.js +4514 -0
  114. package/dist/renderer/assets/stateDiagram-AJRCARHV-Bha2QoNB.js +450 -0
  115. package/dist/renderer/assets/stateDiagram-v2-BHNVJYJU-DWgFUYu1.js +21 -0
  116. package/dist/renderer/assets/timeline-definition-PNZ67QCA-C3h_-OTj.js +1596 -0
  117. package/dist/renderer/assets/vennDiagram-CIIHVFJN-DFzjSrZi.js +2486 -0
  118. package/dist/renderer/assets/wardley-L42UT6IY-Cx-VbqoS.js +30699 -0
  119. package/dist/renderer/assets/wardleyDiagram-YWT4CUSO-S2D9XqX6.js +975 -0
  120. package/dist/renderer/assets/xychartDiagram-2RQKCTM6-Cfxigbts.js +1932 -0
  121. package/dist/renderer/index.html +19 -0
  122. package/docs/agent-diff-view.md +48 -0
  123. package/electron-builder.yml +57 -0
  124. package/electron.vite.config.ts +30 -0
  125. package/package.json +40 -0
  126. package/resources/entitlements.mac.plist +12 -0
  127. package/resources/icon.icns +0 -0
  128. package/resources/icon.png +0 -0
  129. package/resources/icon.svg +23 -0
  130. package/resources/templates/slides/icon.png +0 -0
  131. package/resources/templates/slides/slides-template.md +74 -0
  132. package/resources/templates/slides/template.html +535 -0
  133. package/scripts/afterPack.js +13 -0
  134. package/src/main/index.ts +881 -0
  135. package/src/preload/index.ts +110 -0
  136. package/src/renderer/editor/editor.ts +204 -0
  137. package/src/renderer/editor/html-view.ts +15 -0
  138. package/src/renderer/editor/plugins/index.ts +76 -0
  139. package/src/renderer/editor/plugins/math-plugin.ts +297 -0
  140. package/src/renderer/editor/plugins/mermaid-plugin-custom.css +431 -0
  141. package/src/renderer/editor/plugins/mermaid-plugin-dark.css +428 -0
  142. package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +443 -0
  143. package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +208 -0
  144. package/src/renderer/editor/plugins/mermaid-plugin.css +111 -0
  145. package/src/renderer/editor/plugins/mermaid-plugin.ts +679 -0
  146. package/src/renderer/env.d.ts +7 -0
  147. package/src/renderer/index.html +18 -0
  148. package/src/renderer/main.ts +303 -0
  149. package/src/renderer/themes/base.css +509 -0
  150. package/src/renderer/themes/theme-manager.ts +40 -0
  151. package/themes/README.md +280 -0
  152. package/themes/elegant.css +664 -0
  153. package/themes/guizang.css +732 -0
  154. package/tsconfig.json +14 -0
  155. package/tsconfig.main.json +11 -0
  156. package/tsconfig.preload.json +11 -0
  157. package/tsconfig.renderer.json +12 -0
@@ -0,0 +1,2332 @@
1
+ import { g as getIconStyles } from "./chunk-FMBD7UC4-BxpCZPtz.js";
2
+ import { _ as __name, n as setConfig2, l as log, c as getConfig2, o as getRegisteredLayoutAlgorithm, r as render, u as utils_default, b as setAccTitle, s as setAccDescription, p as setDiagramTitle, a as getAccTitle, g as getAccDescription, q as getDiagramTitle, k as common_default, t as load, J as JSON_SCHEMA, v as isValidShape, x as getEdgeId, d as select, y as purify, z as clear, A as defaultConfig2, B as rgba } from "./index-DW7LS8C1.js";
3
+ import { c as createTooltip } from "./chunk-ND2GUHAM-CqqaU9Ue.js";
4
+ import { g as getDiagramElement } from "./chunk-55IACEB6-CiBpxRa1.js";
5
+ import { s as setupViewPortForSVG } from "./chunk-2J33WTMH-lag2vhq9.js";
6
+ import { c as channel } from "./channel-upve91Tq.js";
7
+ var MERMAID_DOM_ID_PREFIX = "flowchart-";
8
+ var FlowDB = class {
9
+ // cspell:ignore funs
10
+ constructor() {
11
+ this.vertexCounter = 0;
12
+ this.config = getConfig2();
13
+ this.diagramId = "";
14
+ this.vertices = /* @__PURE__ */ new Map();
15
+ this.edges = [];
16
+ this.classes = /* @__PURE__ */ new Map();
17
+ this.subGraphs = [];
18
+ this.subGraphLookup = /* @__PURE__ */ new Map();
19
+ this.tooltips = /* @__PURE__ */ new Map();
20
+ this.subCount = 0;
21
+ this.firstGraphFlag = true;
22
+ this.secCount = -1;
23
+ this.posCrossRef = [];
24
+ this.funs = [];
25
+ this.setAccTitle = setAccTitle;
26
+ this.setAccDescription = setAccDescription;
27
+ this.setDiagramTitle = setDiagramTitle;
28
+ this.getAccTitle = getAccTitle;
29
+ this.getAccDescription = getAccDescription;
30
+ this.getDiagramTitle = getDiagramTitle;
31
+ this.funs.push(this.setupToolTips.bind(this));
32
+ this.addVertex = this.addVertex.bind(this);
33
+ this.firstGraph = this.firstGraph.bind(this);
34
+ this.setDirection = this.setDirection.bind(this);
35
+ this.addSubGraph = this.addSubGraph.bind(this);
36
+ this.addLink = this.addLink.bind(this);
37
+ this.setLink = this.setLink.bind(this);
38
+ this.updateLink = this.updateLink.bind(this);
39
+ this.addClass = this.addClass.bind(this);
40
+ this.setClass = this.setClass.bind(this);
41
+ this.destructLink = this.destructLink.bind(this);
42
+ this.setClickEvent = this.setClickEvent.bind(this);
43
+ this.setTooltip = this.setTooltip.bind(this);
44
+ this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this);
45
+ this.setClickFun = this.setClickFun.bind(this);
46
+ this.bindFunctions = this.bindFunctions.bind(this);
47
+ this.lex = {
48
+ firstGraph: this.firstGraph.bind(this)
49
+ };
50
+ this.clear();
51
+ this.setGen("gen-2");
52
+ }
53
+ static {
54
+ __name(this, "FlowDB");
55
+ }
56
+ sanitizeText(txt) {
57
+ return common_default.sanitizeText(txt, this.config);
58
+ }
59
+ sanitizeNodeLabelType(labelType) {
60
+ switch (labelType) {
61
+ case "markdown":
62
+ case "string":
63
+ case "text":
64
+ return labelType;
65
+ default:
66
+ return "markdown";
67
+ }
68
+ }
69
+ /**
70
+ * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness
71
+ * across multiple diagrams on the same page.
72
+ */
73
+ setDiagramId(svgElementId) {
74
+ this.diagramId = svgElementId;
75
+ }
76
+ /**
77
+ * Function to lookup domId from id in the graph definition.
78
+ * When diagramId is set, returns the prefixed version for DOM uniqueness.
79
+ *
80
+ * @param id - id of the node
81
+ */
82
+ lookUpDomId(id) {
83
+ for (const vertex of this.vertices.values()) {
84
+ if (vertex.id === id) {
85
+ return this.diagramId ? `${this.diagramId}-${vertex.domId}` : vertex.domId;
86
+ }
87
+ }
88
+ return this.diagramId ? `${this.diagramId}-${id}` : id;
89
+ }
90
+ /**
91
+ * Function called by parser when a node definition has been found
92
+ */
93
+ addVertex(id, textObj, type, style, classes, dir, props = {}, metadata) {
94
+ if (!id || id.trim().length === 0) {
95
+ return;
96
+ }
97
+ let doc;
98
+ if (metadata !== void 0) {
99
+ let yamlData;
100
+ if (!metadata.includes("\n")) {
101
+ yamlData = "{\n" + metadata + "\n}";
102
+ } else {
103
+ yamlData = metadata + "\n";
104
+ }
105
+ doc = load(yamlData, { schema: JSON_SCHEMA });
106
+ }
107
+ const edge = this.edges.find((e) => e.id === id);
108
+ if (edge) {
109
+ const edgeDoc = doc;
110
+ if (edgeDoc?.animate !== void 0) {
111
+ edge.animate = edgeDoc.animate;
112
+ }
113
+ if (edgeDoc?.animation !== void 0) {
114
+ edge.animation = edgeDoc.animation;
115
+ }
116
+ if (edgeDoc?.curve !== void 0) {
117
+ edge.interpolate = edgeDoc.curve;
118
+ }
119
+ return;
120
+ }
121
+ let txt;
122
+ let vertex = this.vertices.get(id);
123
+ if (vertex === void 0) {
124
+ if (textObj === void 0 && type === void 0 && style !== void 0 && style !== null) {
125
+ log.warn(
126
+ `Style applied to unknown node "${id}". This may indicate a typo. The node will be created automatically.`
127
+ );
128
+ }
129
+ vertex = {
130
+ id,
131
+ labelType: "text",
132
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + this.vertexCounter,
133
+ styles: [],
134
+ classes: []
135
+ };
136
+ this.vertices.set(id, vertex);
137
+ }
138
+ this.vertexCounter++;
139
+ if (textObj !== void 0) {
140
+ this.config = getConfig2();
141
+ txt = this.sanitizeText(textObj.text.trim());
142
+ vertex.labelType = textObj.type;
143
+ if (txt.startsWith('"') && txt.endsWith('"')) {
144
+ txt = txt.substring(1, txt.length - 1);
145
+ }
146
+ vertex.text = txt;
147
+ } else {
148
+ if (vertex.text === void 0) {
149
+ vertex.text = id;
150
+ }
151
+ }
152
+ if (type !== void 0) {
153
+ vertex.type = type;
154
+ }
155
+ if (style !== void 0 && style !== null) {
156
+ style.forEach((s) => {
157
+ vertex.styles.push(s);
158
+ });
159
+ }
160
+ if (classes !== void 0 && classes !== null) {
161
+ classes.forEach((s) => {
162
+ vertex.classes.push(s);
163
+ });
164
+ }
165
+ if (dir !== void 0) {
166
+ vertex.dir = dir;
167
+ }
168
+ if (vertex.props === void 0) {
169
+ vertex.props = props;
170
+ } else if (props !== void 0) {
171
+ Object.assign(vertex.props, props);
172
+ }
173
+ if (doc !== void 0) {
174
+ if (doc.shape) {
175
+ if (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes("_")) {
176
+ throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
177
+ } else if (!isValidShape(doc.shape)) {
178
+ throw new Error(`No such shape: ${doc.shape}.`);
179
+ }
180
+ vertex.type = doc?.shape;
181
+ }
182
+ if (doc?.label) {
183
+ vertex.text = doc?.label;
184
+ vertex.labelType = this.sanitizeNodeLabelType(doc?.labelType);
185
+ }
186
+ if (doc?.icon) {
187
+ vertex.icon = doc?.icon;
188
+ if (!doc.label?.trim() && vertex.text === id) {
189
+ vertex.text = "";
190
+ }
191
+ }
192
+ if (doc?.form) {
193
+ vertex.form = doc?.form;
194
+ }
195
+ if (doc?.pos) {
196
+ vertex.pos = doc?.pos;
197
+ }
198
+ if (doc?.img) {
199
+ vertex.img = doc?.img;
200
+ if (!doc.label?.trim() && vertex.text === id) {
201
+ vertex.text = "";
202
+ }
203
+ }
204
+ if (doc?.constraint) {
205
+ vertex.constraint = doc.constraint;
206
+ }
207
+ if (doc.w) {
208
+ vertex.assetWidth = Number(doc.w);
209
+ }
210
+ if (doc.h) {
211
+ vertex.assetHeight = Number(doc.h);
212
+ }
213
+ }
214
+ }
215
+ /**
216
+ * Function called by parser when a link/edge definition has been found
217
+ *
218
+ */
219
+ addSingleLink(_start, _end, type, id) {
220
+ const start = _start;
221
+ const end = _end;
222
+ const edge = {
223
+ start,
224
+ end,
225
+ type: void 0,
226
+ text: "",
227
+ labelType: "text",
228
+ classes: [],
229
+ isUserDefinedId: false,
230
+ interpolate: this.edges.defaultInterpolate
231
+ };
232
+ log.info("abc78 Got edge...", edge);
233
+ const linkTextObj = type.text;
234
+ if (linkTextObj !== void 0) {
235
+ edge.text = this.sanitizeText(linkTextObj.text.trim());
236
+ if (edge.text.startsWith('"') && edge.text.endsWith('"')) {
237
+ edge.text = edge.text.substring(1, edge.text.length - 1);
238
+ }
239
+ edge.labelType = this.sanitizeNodeLabelType(linkTextObj.type);
240
+ }
241
+ if (type !== void 0) {
242
+ edge.type = type.type;
243
+ edge.stroke = type.stroke;
244
+ edge.length = type.length > 10 ? 10 : type.length;
245
+ }
246
+ if (id && !this.edges.some((e) => e.id === id)) {
247
+ edge.id = id;
248
+ edge.isUserDefinedId = true;
249
+ } else {
250
+ const existingLinks = this.edges.filter((e) => e.start === edge.start && e.end === edge.end);
251
+ if (existingLinks.length === 0) {
252
+ edge.id = getEdgeId(edge.start, edge.end, { counter: 0, prefix: "L" });
253
+ } else {
254
+ edge.id = getEdgeId(edge.start, edge.end, {
255
+ counter: existingLinks.length + 1,
256
+ prefix: "L"
257
+ });
258
+ }
259
+ }
260
+ if (this.edges.length < (this.config.maxEdges ?? 500)) {
261
+ log.info("Pushing edge...");
262
+ this.edges.push(edge);
263
+ } else {
264
+ throw new Error(
265
+ `Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
266
+
267
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
268
+ You cannot set this config via configuration inside the diagram as it is a secure config.
269
+ You have to call mermaid.initialize.`
270
+ );
271
+ }
272
+ }
273
+ isLinkData(value) {
274
+ return value !== null && typeof value === "object" && "id" in value && typeof value.id === "string";
275
+ }
276
+ addLink(_start, _end, linkData) {
277
+ const id = this.isLinkData(linkData) ? linkData.id.replace("@", "") : void 0;
278
+ log.info("addLink", _start, _end, id);
279
+ for (const start of _start) {
280
+ for (const end of _end) {
281
+ const isLastStart = start === _start[_start.length - 1];
282
+ const isFirstEnd = end === _end[0];
283
+ if (isLastStart && isFirstEnd) {
284
+ this.addSingleLink(start, end, linkData, id);
285
+ } else {
286
+ this.addSingleLink(start, end, linkData, void 0);
287
+ }
288
+ }
289
+ }
290
+ }
291
+ /**
292
+ * Updates a link's line interpolation algorithm
293
+ */
294
+ updateLinkInterpolate(positions, interpolate) {
295
+ positions.forEach((pos) => {
296
+ if (pos === "default") {
297
+ this.edges.defaultInterpolate = interpolate;
298
+ } else {
299
+ this.edges[pos].interpolate = interpolate;
300
+ }
301
+ });
302
+ }
303
+ /**
304
+ * Updates a link with a style
305
+ *
306
+ */
307
+ updateLink(positions, style) {
308
+ positions.forEach((pos) => {
309
+ if (typeof pos === "number" && pos >= this.edges.length) {
310
+ throw new Error(
311
+ `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
312
+ );
313
+ }
314
+ if (pos === "default") {
315
+ this.edges.defaultStyle = style;
316
+ } else {
317
+ this.edges[pos].style = style;
318
+ if ((this.edges[pos]?.style?.length ?? 0) > 0 && !this.edges[pos]?.style?.some((s) => s?.startsWith("fill"))) {
319
+ this.edges[pos]?.style?.push("fill:none");
320
+ }
321
+ }
322
+ });
323
+ }
324
+ addClass(ids, _style) {
325
+ const style = _style.join().replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
326
+ ids.split(",").forEach((id) => {
327
+ let classNode = this.classes.get(id);
328
+ if (classNode === void 0) {
329
+ classNode = { id, styles: [], textStyles: [] };
330
+ this.classes.set(id, classNode);
331
+ }
332
+ if (style !== void 0 && style !== null) {
333
+ style.forEach((s) => {
334
+ if (/color/.exec(s)) {
335
+ const newStyle = s.replace("fill", "bgFill");
336
+ classNode.textStyles.push(newStyle);
337
+ }
338
+ classNode.styles.push(s);
339
+ });
340
+ }
341
+ });
342
+ }
343
+ /**
344
+ * Called by parser when a graph definition is found, stores the direction of the chart.
345
+ *
346
+ */
347
+ setDirection(dir) {
348
+ this.direction = dir.trim();
349
+ if (/.*</.exec(this.direction)) {
350
+ this.direction = "RL";
351
+ }
352
+ if (/.*\^/.exec(this.direction)) {
353
+ this.direction = "BT";
354
+ }
355
+ if (/.*>/.exec(this.direction)) {
356
+ this.direction = "LR";
357
+ }
358
+ if (/.*v/.exec(this.direction)) {
359
+ this.direction = "TB";
360
+ }
361
+ if (this.direction === "TD") {
362
+ this.direction = "TB";
363
+ }
364
+ }
365
+ /**
366
+ * Called by parser when a special node is found, e.g. a clickable element.
367
+ *
368
+ * @param ids - Comma separated list of ids
369
+ * @param className - Class to add
370
+ */
371
+ setClass(ids, className) {
372
+ for (const id of ids.split(",")) {
373
+ const vertex = this.vertices.get(id);
374
+ if (vertex) {
375
+ vertex.classes.push(className);
376
+ }
377
+ const edge = this.edges.find((e) => e.id === id);
378
+ if (edge) {
379
+ edge.classes.push(className);
380
+ }
381
+ const subGraph = this.subGraphLookup.get(id);
382
+ if (subGraph) {
383
+ subGraph.classes.push(className);
384
+ }
385
+ }
386
+ }
387
+ setTooltip(ids, tooltip) {
388
+ if (tooltip === void 0) {
389
+ return;
390
+ }
391
+ tooltip = this.sanitizeText(tooltip);
392
+ for (const id of ids.split(",")) {
393
+ this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(id) : id, tooltip);
394
+ }
395
+ }
396
+ setClickFun(id, functionName, functionArgs) {
397
+ if (getConfig2().securityLevel !== "loose") {
398
+ return;
399
+ }
400
+ if (functionName === void 0) {
401
+ return;
402
+ }
403
+ let argList = [];
404
+ if (typeof functionArgs === "string") {
405
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
406
+ for (let i = 0; i < argList.length; i++) {
407
+ let item = argList[i].trim();
408
+ if (item.startsWith('"') && item.endsWith('"')) {
409
+ item = item.substr(1, item.length - 2);
410
+ }
411
+ argList[i] = item;
412
+ }
413
+ }
414
+ if (argList.length === 0) {
415
+ argList.push(id);
416
+ }
417
+ const vertex = this.vertices.get(id);
418
+ if (vertex) {
419
+ vertex.haveCallback = true;
420
+ this.funs.push(() => {
421
+ const domId = this.lookUpDomId(id);
422
+ const elem = document.querySelector(`[id="${domId}"]`);
423
+ if (elem !== null) {
424
+ elem.addEventListener(
425
+ "click",
426
+ () => {
427
+ utils_default.runFunc(functionName, ...argList);
428
+ },
429
+ false
430
+ );
431
+ }
432
+ });
433
+ }
434
+ }
435
+ /**
436
+ * Called by parser when a link is found. Adds the URL to the vertex data.
437
+ *
438
+ * @param ids - Comma separated list of ids
439
+ * @param linkStr - URL to create a link for
440
+ * @param target - Target attribute for the link
441
+ */
442
+ setLink(ids, linkStr, target) {
443
+ ids.split(",").forEach((id) => {
444
+ const vertex = this.vertices.get(id);
445
+ if (vertex !== void 0) {
446
+ vertex.link = utils_default.formatUrl(linkStr, this.config);
447
+ vertex.linkTarget = target;
448
+ }
449
+ });
450
+ this.setClass(ids, "clickable");
451
+ }
452
+ getTooltip(id) {
453
+ return this.tooltips.get(id);
454
+ }
455
+ /**
456
+ * Called by parser when a click definition is found. Registers an event handler.
457
+ *
458
+ * @param ids - Comma separated list of ids
459
+ * @param functionName - Function to be called on click
460
+ * @param functionArgs - Arguments to be passed to the function
461
+ */
462
+ setClickEvent(ids, functionName, functionArgs) {
463
+ ids.split(",").forEach((id) => {
464
+ this.setClickFun(id, functionName, functionArgs);
465
+ });
466
+ this.setClass(ids, "clickable");
467
+ }
468
+ bindFunctions(element) {
469
+ this.funs.forEach((fun) => {
470
+ fun(element);
471
+ });
472
+ }
473
+ getDirection() {
474
+ return this.direction?.trim();
475
+ }
476
+ /**
477
+ * Retrieval function for fetching the found nodes after parsing has completed.
478
+ *
479
+ */
480
+ getVertices() {
481
+ return this.vertices;
482
+ }
483
+ /**
484
+ * Retrieval function for fetching the found links after parsing has completed.
485
+ *
486
+ */
487
+ getEdges() {
488
+ return this.edges;
489
+ }
490
+ /**
491
+ * Retrieval function for fetching the found class definitions after parsing has completed.
492
+ *
493
+ */
494
+ getClasses() {
495
+ return this.classes;
496
+ }
497
+ setupToolTips(element) {
498
+ const tooltipElem = createTooltip();
499
+ const svg = select(element).select("svg");
500
+ const nodes = svg.selectAll("g.node");
501
+ nodes.on("mouseover", (e) => {
502
+ const el = select(e.currentTarget);
503
+ const title = el.attr("title");
504
+ if (title === null) {
505
+ return;
506
+ }
507
+ const rect = e.currentTarget?.getBoundingClientRect();
508
+ tooltipElem.transition().duration(200).style("opacity", ".9");
509
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
510
+ tooltipElem.html(purify.sanitize(title));
511
+ el.classed("hover", true);
512
+ }).on("mouseout", (e) => {
513
+ tooltipElem.transition().duration(500).style("opacity", 0);
514
+ const el = select(e.currentTarget);
515
+ el.classed("hover", false);
516
+ });
517
+ }
518
+ /**
519
+ * Clears the internal graph db so that a new graph can be parsed.
520
+ *
521
+ */
522
+ clear(ver = "gen-2") {
523
+ this.vertices = /* @__PURE__ */ new Map();
524
+ this.classes = /* @__PURE__ */ new Map();
525
+ this.edges = [];
526
+ this.funs = [this.setupToolTips.bind(this)];
527
+ this.diagramId = "";
528
+ this.subGraphs = [];
529
+ this.subGraphLookup = /* @__PURE__ */ new Map();
530
+ this.subCount = 0;
531
+ this.tooltips = /* @__PURE__ */ new Map();
532
+ this.firstGraphFlag = true;
533
+ this.version = ver;
534
+ this.config = getConfig2();
535
+ clear();
536
+ }
537
+ setGen(ver) {
538
+ this.version = ver || "gen-2";
539
+ }
540
+ defaultStyle() {
541
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
542
+ }
543
+ addSubGraph(_id, list, _title) {
544
+ let id = _id.text.trim();
545
+ let title = _title.text;
546
+ if (_id === _title && /\s/.exec(_title.text)) {
547
+ id = void 0;
548
+ }
549
+ const uniq = /* @__PURE__ */ __name((a) => {
550
+ const prims = { boolean: {}, number: {}, string: {} };
551
+ const objs = [];
552
+ let dir2;
553
+ const nodeList2 = a.filter(function(item) {
554
+ const type = typeof item;
555
+ if (item.stmt && item.stmt === "dir") {
556
+ dir2 = item.value;
557
+ return false;
558
+ }
559
+ if (item.trim() === "") {
560
+ return false;
561
+ }
562
+ if (type in prims) {
563
+ return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
564
+ } else {
565
+ return objs.includes(item) ? false : objs.push(item);
566
+ }
567
+ });
568
+ return { nodeList: nodeList2, dir: dir2 };
569
+ }, "uniq");
570
+ const result = uniq(list.flat());
571
+ const nodeList = result.nodeList;
572
+ let dir = result.dir;
573
+ const flowchartConfig = getConfig2().flowchart ?? {};
574
+ dir = dir ?? (flowchartConfig.inheritDir ? this.getDirection() ?? getConfig2().direction ?? void 0 : void 0);
575
+ if (this.version === "gen-1") {
576
+ for (let i = 0; i < nodeList.length; i++) {
577
+ nodeList[i] = this.lookUpDomId(nodeList[i]);
578
+ }
579
+ }
580
+ id = id ?? "subGraph" + this.subCount;
581
+ title = title || "";
582
+ title = this.sanitizeText(title);
583
+ this.subCount = this.subCount + 1;
584
+ const subGraph = {
585
+ id,
586
+ nodes: nodeList,
587
+ title: title.trim(),
588
+ classes: [],
589
+ dir,
590
+ labelType: this.sanitizeNodeLabelType(_title?.type)
591
+ };
592
+ log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir);
593
+ subGraph.nodes = this.makeUniq(subGraph, this.subGraphs).nodes;
594
+ this.subGraphs.push(subGraph);
595
+ this.subGraphLookup.set(id, subGraph);
596
+ return id;
597
+ }
598
+ getPosForId(id) {
599
+ for (const [i, subGraph] of this.subGraphs.entries()) {
600
+ if (subGraph.id === id) {
601
+ return i;
602
+ }
603
+ }
604
+ return -1;
605
+ }
606
+ indexNodes2(id, pos) {
607
+ const nodes = this.subGraphs[pos].nodes;
608
+ this.secCount = this.secCount + 1;
609
+ if (this.secCount > 2e3) {
610
+ return {
611
+ result: false,
612
+ count: 0
613
+ };
614
+ }
615
+ this.posCrossRef[this.secCount] = pos;
616
+ if (this.subGraphs[pos].id === id) {
617
+ return {
618
+ result: true,
619
+ count: 0
620
+ };
621
+ }
622
+ let count = 0;
623
+ let posCount = 1;
624
+ while (count < nodes.length) {
625
+ const childPos = this.getPosForId(nodes[count]);
626
+ if (childPos >= 0) {
627
+ const res = this.indexNodes2(id, childPos);
628
+ if (res.result) {
629
+ return {
630
+ result: true,
631
+ count: posCount + res.count
632
+ };
633
+ } else {
634
+ posCount = posCount + res.count;
635
+ }
636
+ }
637
+ count = count + 1;
638
+ }
639
+ return {
640
+ result: false,
641
+ count: posCount
642
+ };
643
+ }
644
+ getDepthFirstPos(pos) {
645
+ return this.posCrossRef[pos];
646
+ }
647
+ indexNodes() {
648
+ this.secCount = -1;
649
+ if (this.subGraphs.length > 0) {
650
+ this.indexNodes2("none", this.subGraphs.length - 1);
651
+ }
652
+ }
653
+ getSubGraphs() {
654
+ return this.subGraphs;
655
+ }
656
+ firstGraph() {
657
+ if (this.firstGraphFlag) {
658
+ this.firstGraphFlag = false;
659
+ return true;
660
+ }
661
+ return false;
662
+ }
663
+ destructStartLink(_str) {
664
+ let str = _str.trim();
665
+ let type = "arrow_open";
666
+ switch (str[0]) {
667
+ case "<":
668
+ type = "arrow_point";
669
+ str = str.slice(1);
670
+ break;
671
+ case "x":
672
+ type = "arrow_cross";
673
+ str = str.slice(1);
674
+ break;
675
+ case "o":
676
+ type = "arrow_circle";
677
+ str = str.slice(1);
678
+ break;
679
+ }
680
+ let stroke = "normal";
681
+ if (str.includes("=")) {
682
+ stroke = "thick";
683
+ }
684
+ if (str.includes(".")) {
685
+ stroke = "dotted";
686
+ }
687
+ return { type, stroke };
688
+ }
689
+ countChar(char, str) {
690
+ const length = str.length;
691
+ let count = 0;
692
+ for (let i = 0; i < length; ++i) {
693
+ if (str[i] === char) {
694
+ ++count;
695
+ }
696
+ }
697
+ return count;
698
+ }
699
+ destructEndLink(_str) {
700
+ const str = _str.trim();
701
+ let line = str.slice(0, -1);
702
+ let type = "arrow_open";
703
+ switch (str.slice(-1)) {
704
+ case "x":
705
+ type = "arrow_cross";
706
+ if (str.startsWith("x")) {
707
+ type = "double_" + type;
708
+ line = line.slice(1);
709
+ }
710
+ break;
711
+ case ">":
712
+ type = "arrow_point";
713
+ if (str.startsWith("<")) {
714
+ type = "double_" + type;
715
+ line = line.slice(1);
716
+ }
717
+ break;
718
+ case "o":
719
+ type = "arrow_circle";
720
+ if (str.startsWith("o")) {
721
+ type = "double_" + type;
722
+ line = line.slice(1);
723
+ }
724
+ break;
725
+ }
726
+ let stroke = "normal";
727
+ let length = line.length - 1;
728
+ if (line.startsWith("=")) {
729
+ stroke = "thick";
730
+ }
731
+ if (line.startsWith("~")) {
732
+ stroke = "invisible";
733
+ }
734
+ const dots = this.countChar(".", line);
735
+ if (dots) {
736
+ stroke = "dotted";
737
+ length = dots;
738
+ }
739
+ return { type, stroke, length };
740
+ }
741
+ destructLink(_str, _startStr) {
742
+ const info = this.destructEndLink(_str);
743
+ let startInfo;
744
+ if (_startStr) {
745
+ startInfo = this.destructStartLink(_startStr);
746
+ if (startInfo.stroke !== info.stroke) {
747
+ return { type: "INVALID", stroke: "INVALID" };
748
+ }
749
+ if (startInfo.type === "arrow_open") {
750
+ startInfo.type = info.type;
751
+ } else {
752
+ if (startInfo.type !== info.type) {
753
+ return { type: "INVALID", stroke: "INVALID" };
754
+ }
755
+ startInfo.type = "double_" + startInfo.type;
756
+ }
757
+ if (startInfo.type === "double_arrow") {
758
+ startInfo.type = "double_arrow_point";
759
+ }
760
+ startInfo.length = info.length;
761
+ return startInfo;
762
+ }
763
+ return info;
764
+ }
765
+ // Todo optimizer this by caching existing nodes
766
+ exists(allSgs, _id) {
767
+ for (const sg of allSgs) {
768
+ if (sg.nodes.includes(_id)) {
769
+ return true;
770
+ }
771
+ }
772
+ return false;
773
+ }
774
+ /**
775
+ * Deletes an id from all subgraphs
776
+ *
777
+ */
778
+ makeUniq(sg, allSubgraphs) {
779
+ const res = [];
780
+ sg.nodes.forEach((_id, pos) => {
781
+ if (!this.exists(allSubgraphs, _id)) {
782
+ res.push(sg.nodes[pos]);
783
+ }
784
+ });
785
+ return { nodes: res };
786
+ }
787
+ getTypeFromVertex(vertex) {
788
+ if (vertex.img) {
789
+ return "imageSquare";
790
+ }
791
+ if (vertex.icon) {
792
+ if (vertex.form === "circle") {
793
+ return "iconCircle";
794
+ }
795
+ if (vertex.form === "square") {
796
+ return "iconSquare";
797
+ }
798
+ if (vertex.form === "rounded") {
799
+ return "iconRounded";
800
+ }
801
+ return "icon";
802
+ }
803
+ switch (vertex.type) {
804
+ case "square":
805
+ case void 0:
806
+ return "squareRect";
807
+ case "round":
808
+ return "roundedRect";
809
+ case "ellipse":
810
+ return "ellipse";
811
+ default:
812
+ return vertex.type;
813
+ }
814
+ }
815
+ findNode(nodes, id) {
816
+ return nodes.find((node) => node.id === id);
817
+ }
818
+ destructEdgeType(type) {
819
+ let arrowTypeStart = "none";
820
+ let arrowTypeEnd = "arrow_point";
821
+ switch (type) {
822
+ case "arrow_point":
823
+ case "arrow_circle":
824
+ case "arrow_cross":
825
+ arrowTypeEnd = type;
826
+ break;
827
+ case "double_arrow_point":
828
+ case "double_arrow_circle":
829
+ case "double_arrow_cross":
830
+ arrowTypeStart = type.replace("double_", "");
831
+ arrowTypeEnd = arrowTypeStart;
832
+ break;
833
+ }
834
+ return { arrowTypeStart, arrowTypeEnd };
835
+ }
836
+ addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, look) {
837
+ const parentId = parentDB.get(vertex.id);
838
+ const isGroup = subGraphDB.get(vertex.id) ?? false;
839
+ const node = this.findNode(nodes, vertex.id);
840
+ if (node) {
841
+ node.cssStyles = vertex.styles;
842
+ node.cssCompiledStyles = this.getCompiledStyles(vertex.classes);
843
+ node.cssClasses = vertex.classes.join(" ");
844
+ } else {
845
+ const baseNode = {
846
+ id: vertex.id,
847
+ label: vertex.text,
848
+ labelType: vertex.labelType,
849
+ labelStyle: "",
850
+ parentId,
851
+ padding: config.flowchart?.padding || 8,
852
+ cssStyles: vertex.styles,
853
+ cssCompiledStyles: this.getCompiledStyles(["default", "node", ...vertex.classes]),
854
+ cssClasses: "default " + vertex.classes.join(" "),
855
+ dir: vertex.dir,
856
+ domId: vertex.domId,
857
+ look,
858
+ link: vertex.link,
859
+ linkTarget: vertex.linkTarget,
860
+ tooltip: this.getTooltip(vertex.id),
861
+ icon: vertex.icon,
862
+ pos: vertex.pos,
863
+ img: vertex.img,
864
+ assetWidth: vertex.assetWidth,
865
+ assetHeight: vertex.assetHeight,
866
+ constraint: vertex.constraint
867
+ };
868
+ if (isGroup) {
869
+ nodes.push({
870
+ ...baseNode,
871
+ isGroup: true,
872
+ shape: "rect"
873
+ });
874
+ } else {
875
+ nodes.push({
876
+ ...baseNode,
877
+ isGroup: false,
878
+ shape: this.getTypeFromVertex(vertex)
879
+ });
880
+ }
881
+ }
882
+ }
883
+ getCompiledStyles(classDefs) {
884
+ let compiledStyles = [];
885
+ for (const customClass of classDefs) {
886
+ const cssClass = this.classes.get(customClass);
887
+ if (cssClass?.styles) {
888
+ compiledStyles = [...compiledStyles, ...cssClass.styles ?? []].map((s) => s.trim());
889
+ }
890
+ if (cssClass?.textStyles) {
891
+ compiledStyles = [...compiledStyles, ...cssClass.textStyles ?? []].map((s) => s.trim());
892
+ }
893
+ }
894
+ return compiledStyles;
895
+ }
896
+ getData() {
897
+ const config = getConfig2();
898
+ const nodes = [];
899
+ const edges = [];
900
+ const subGraphs = this.getSubGraphs();
901
+ const parentDB = /* @__PURE__ */ new Map();
902
+ const subGraphDB = /* @__PURE__ */ new Map();
903
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
904
+ const subGraph = subGraphs[i];
905
+ if (subGraph.nodes.length > 0) {
906
+ subGraphDB.set(subGraph.id, true);
907
+ }
908
+ for (const id of subGraph.nodes) {
909
+ parentDB.set(id, subGraph.id);
910
+ }
911
+ }
912
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
913
+ const subGraph = subGraphs[i];
914
+ nodes.push({
915
+ id: subGraph.id,
916
+ label: subGraph.title,
917
+ labelStyle: "",
918
+ labelType: subGraph.labelType,
919
+ parentId: parentDB.get(subGraph.id),
920
+ padding: 8,
921
+ cssCompiledStyles: this.getCompiledStyles(subGraph.classes),
922
+ cssClasses: subGraph.classes.join(" "),
923
+ shape: "rect",
924
+ dir: subGraph.dir,
925
+ isGroup: true,
926
+ look: config.look
927
+ });
928
+ }
929
+ const n = this.getVertices();
930
+ n.forEach((vertex) => {
931
+ this.addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || "classic");
932
+ });
933
+ const e = this.getEdges();
934
+ e.forEach((rawEdge, index) => {
935
+ const { arrowTypeStart, arrowTypeEnd } = this.destructEdgeType(rawEdge.type);
936
+ const styles = [...e.defaultStyle ?? []];
937
+ if (rawEdge.style) {
938
+ styles.push(...rawEdge.style);
939
+ }
940
+ const edge = {
941
+ id: getEdgeId(rawEdge.start, rawEdge.end, { counter: index, prefix: "L" }, rawEdge.id),
942
+ isUserDefinedId: rawEdge.isUserDefinedId,
943
+ start: rawEdge.start,
944
+ end: rawEdge.end,
945
+ type: rawEdge.type ?? "normal",
946
+ label: rawEdge.text,
947
+ labelType: rawEdge.labelType,
948
+ labelpos: "c",
949
+ thickness: rawEdge.stroke,
950
+ minlen: rawEdge.length,
951
+ classes: rawEdge?.stroke === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
952
+ arrowTypeStart: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeStart,
953
+ arrowTypeEnd: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeEnd,
954
+ arrowheadStyle: "fill: #333",
955
+ cssCompiledStyles: this.getCompiledStyles(rawEdge.classes),
956
+ labelStyle: styles,
957
+ style: styles,
958
+ pattern: rawEdge.stroke,
959
+ look: config.look,
960
+ animate: rawEdge.animate,
961
+ animation: rawEdge.animation,
962
+ curve: rawEdge.interpolate || this.edges.defaultInterpolate || config.flowchart?.curve
963
+ };
964
+ edges.push(edge);
965
+ });
966
+ return { nodes, edges, other: {}, config };
967
+ }
968
+ defaultConfig() {
969
+ return defaultConfig2.flowchart;
970
+ }
971
+ };
972
+ var getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {
973
+ return diagramObj.db.getClasses();
974
+ }, "getClasses");
975
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
976
+ log.info("REF0:");
977
+ log.info("Drawing state diagram (v2)", id);
978
+ const { securityLevel, flowchart: conf, layout } = getConfig2();
979
+ diag.db.setDiagramId(id);
980
+ log.debug("Before getData: ");
981
+ const data4Layout = diag.db.getData();
982
+ log.debug("Data: ", data4Layout);
983
+ const svg = getDiagramElement(id, securityLevel);
984
+ const direction = diag.db.getDirection();
985
+ data4Layout.type = diag.type;
986
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
987
+ if (data4Layout.layoutAlgorithm === "dagre" && layout === "elk") {
988
+ log.warn(
989
+ "flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."
990
+ );
991
+ }
992
+ data4Layout.direction = direction;
993
+ data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
994
+ data4Layout.rankSpacing = conf?.rankSpacing || 50;
995
+ data4Layout.markers = ["point", "circle", "cross"];
996
+ data4Layout.diagramId = id;
997
+ log.debug("REF1:", data4Layout);
998
+ await render(data4Layout, svg);
999
+ const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;
1000
+ utils_default.insertTitle(
1001
+ svg,
1002
+ "flowchartTitleText",
1003
+ conf?.titleTopMargin || 0,
1004
+ diag.db.getDiagramTitle()
1005
+ );
1006
+ setupViewPortForSVG(svg, padding, "flowchart", conf?.useMaxWidth || false);
1007
+ }, "draw");
1008
+ var flowRenderer_v3_unified_default = {
1009
+ getClasses,
1010
+ draw
1011
+ };
1012
+ var parser = (function() {
1013
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
1014
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
1015
+ return o2;
1016
+ }, "o"), $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124, 125], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 50], $Ve = [1, 49], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 45], $Vl = [1, 47], $Vm = [1, 43], $Vn = [1, 48], $Vo = [1, 44], $Vp = [1, 51], $Vq = [1, 46], $Vr = [1, 52], $Vs = [1, 53], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 38], $Vy = [1, 58], $Vz = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124, 125], $VA = [1, 62], $VB = [1, 61], $VC = [1, 63], $VD = [8, 9, 11, 75, 77, 78], $VE = [1, 79], $VF = [1, 92], $VG = [1, 97], $VH = [1, 96], $VI = [1, 93], $VJ = [1, 89], $VK = [1, 95], $VL = [1, 91], $VM = [1, 98], $VN = [1, 94], $VO = [1, 99], $VP = [1, 90], $VQ = [8, 9, 10, 11, 40, 75, 77, 78], $VR = [8, 9, 10, 11, 40, 46, 75, 77, 78], $VS = [8, 9, 10, 11, 29, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 63, 65, 67, 68, 70, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VT = [8, 9, 11, 44, 60, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VU = [44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VV = [1, 122], $VW = [1, 123], $VX = [1, 125], $VY = [1, 124], $VZ = [44, 60, 62, 74, 89, 102, 105, 106, 109, 111, 114, 115, 116], $V_ = [1, 134], $V$ = [1, 148], $V01 = [1, 149], $V11 = [1, 150], $V21 = [1, 151], $V31 = [1, 136], $V41 = [1, 138], $V51 = [1, 142], $V61 = [1, 143], $V71 = [1, 144], $V81 = [1, 145], $V91 = [1, 146], $Va1 = [1, 147], $Vb1 = [1, 152], $Vc1 = [1, 153], $Vd1 = [1, 132], $Ve1 = [1, 133], $Vf1 = [1, 140], $Vg1 = [1, 135], $Vh1 = [1, 139], $Vi1 = [1, 137], $Vj1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124, 125], $Vk1 = [1, 155], $Vl1 = [1, 157], $Vm1 = [8, 9, 11], $Vn1 = [8, 9, 10, 11, 14, 44, 60, 89, 105, 106, 109, 111, 114, 115, 116], $Vo1 = [1, 177], $Vp1 = [1, 173], $Vq1 = [1, 174], $Vr1 = [1, 178], $Vs1 = [1, 175], $Vt1 = [1, 176], $Vu1 = [77, 116, 119], $Vv1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 44, 60, 75, 84, 85, 86, 87, 88, 89, 90, 105, 109, 111, 114, 115, 116], $Vw1 = [10, 106], $Vx1 = [31, 49, 51, 53, 55, 57, 62, 64, 66, 67, 69, 71, 116, 117, 118], $Vy1 = [1, 248], $Vz1 = [1, 246], $VA1 = [1, 250], $VB1 = [1, 244], $VC1 = [1, 245], $VD1 = [1, 247], $VE1 = [1, 249], $VF1 = [1, 251], $VG1 = [1, 269], $VH1 = [8, 9, 11, 106], $VI1 = [8, 9, 10, 11, 60, 84, 105, 106, 109, 110, 111, 112];
1017
+ var parser2 = {
1018
+ trace: /* @__PURE__ */ __name(function trace() {
1019
+ }, "trace"),
1020
+ yy: {},
1021
+ symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "shapeData": 39, "SHAPE_DATA": 40, "link": 41, "node": 42, "styledVertex": 43, "AMP": 44, "vertex": 45, "STYLE_SEPARATOR": 46, "idString": 47, "DOUBLECIRCLESTART": 48, "DOUBLECIRCLEEND": 49, "PS": 50, "PE": 51, "(-": 52, "-)": 53, "STADIUMSTART": 54, "STADIUMEND": 55, "SUBROUTINESTART": 56, "SUBROUTINEEND": 57, "VERTEX_WITH_PROPS_START": 58, "NODE_STRING[field]": 59, "COLON": 60, "NODE_STRING[value]": 61, "PIPE": 62, "CYLINDERSTART": 63, "CYLINDEREND": 64, "DIAMOND_START": 65, "DIAMOND_STOP": 66, "TAGEND": 67, "TRAPSTART": 68, "TRAPEND": 69, "INVTRAPSTART": 70, "INVTRAPEND": 71, "linkStatement": 72, "arrowText": 73, "TESTSTR": 74, "START_LINK": 75, "edgeText": 76, "LINK": 77, "LINK_ID": 78, "edgeTextToken": 79, "STR": 80, "MD_STR": 81, "textToken": 82, "keywords": 83, "STYLE": 84, "LINKSTYLE": 85, "CLASSDEF": 86, "CLASS": 87, "CLICK": 88, "DOWN": 89, "UP": 90, "textNoTagsToken": 91, "stylesOpt": 92, "idString[vertex]": 93, "idString[class]": 94, "CALLBACKNAME": 95, "CALLBACKARGS": 96, "HREF": 97, "LINK_TARGET": 98, "STR[link]": 99, "STR[tooltip]": 100, "alphaNum": 101, "DEFAULT": 102, "numList": 103, "INTERPOLATE": 104, "NUM": 105, "COMMA": 106, "style": 107, "styleComponent": 108, "NODE_STRING": 109, "UNIT": 110, "BRKT": 111, "PCT": 112, "idStringToken": 113, "MINUS": 114, "MULT": 115, "UNICODE_TEXT": 116, "TEXT": 117, "TAGSTART": 118, "EDGE_TEXT": 119, "alphaNumToken": 120, "direction_tb": 121, "direction_bt": 122, "direction_rl": 123, "direction_lr": 124, "direction_td": 125, "$accept": 0, "$end": 1 },
1022
+ terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 40: "SHAPE_DATA", 44: "AMP", 46: "STYLE_SEPARATOR", 48: "DOUBLECIRCLESTART", 49: "DOUBLECIRCLEEND", 50: "PS", 51: "PE", 52: "(-", 53: "-)", 54: "STADIUMSTART", 55: "STADIUMEND", 56: "SUBROUTINESTART", 57: "SUBROUTINEEND", 58: "VERTEX_WITH_PROPS_START", 59: "NODE_STRING[field]", 60: "COLON", 61: "NODE_STRING[value]", 62: "PIPE", 63: "CYLINDERSTART", 64: "CYLINDEREND", 65: "DIAMOND_START", 66: "DIAMOND_STOP", 67: "TAGEND", 68: "TRAPSTART", 69: "TRAPEND", 70: "INVTRAPSTART", 71: "INVTRAPEND", 74: "TESTSTR", 75: "START_LINK", 77: "LINK", 78: "LINK_ID", 80: "STR", 81: "MD_STR", 84: "STYLE", 85: "LINKSTYLE", 86: "CLASSDEF", 87: "CLASS", 88: "CLICK", 89: "DOWN", 90: "UP", 93: "idString[vertex]", 94: "idString[class]", 95: "CALLBACKNAME", 96: "CALLBACKARGS", 97: "HREF", 98: "LINK_TARGET", 99: "STR[link]", 100: "STR[tooltip]", 102: "DEFAULT", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "NODE_STRING", 110: "UNIT", 111: "BRKT", 112: "PCT", 114: "MINUS", 115: "MULT", 116: "UNICODE_TEXT", 117: "TEXT", 118: "TAGSTART", 119: "EDGE_TEXT", 121: "direction_tb", 122: "direction_bt", 123: "direction_rl", 124: "direction_lr", 125: "direction_td" },
1023
+ productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [39, 2], [39, 1], [20, 4], [20, 3], [20, 4], [20, 2], [20, 2], [20, 1], [42, 1], [42, 6], [42, 5], [43, 1], [43, 3], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 8], [45, 4], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 1], [41, 2], [41, 3], [41, 3], [41, 1], [41, 3], [41, 4], [76, 1], [76, 2], [76, 1], [76, 1], [72, 1], [72, 2], [73, 3], [30, 1], [30, 2], [30, 1], [30, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [103, 1], [103, 3], [92, 1], [92, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [82, 1], [82, 1], [82, 1], [82, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [79, 1], [79, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [47, 1], [47, 2], [101, 1], [101, 2], [33, 1], [33, 1], [33, 1], [33, 1], [33, 1]],
1024
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1025
+ var $0 = $$.length - 1;
1026
+ switch (yystate) {
1027
+ case 2:
1028
+ this.$ = [];
1029
+ break;
1030
+ case 3:
1031
+ if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
1032
+ $$[$0 - 1].push($$[$0]);
1033
+ }
1034
+ this.$ = $$[$0 - 1];
1035
+ break;
1036
+ case 4:
1037
+ case 183:
1038
+ this.$ = $$[$0];
1039
+ break;
1040
+ case 11:
1041
+ yy.setDirection("TB");
1042
+ this.$ = "TB";
1043
+ break;
1044
+ case 12:
1045
+ yy.setDirection($$[$0 - 1]);
1046
+ this.$ = $$[$0 - 1];
1047
+ break;
1048
+ case 27:
1049
+ this.$ = $$[$0 - 1].nodes;
1050
+ break;
1051
+ case 28:
1052
+ case 29:
1053
+ case 30:
1054
+ case 31:
1055
+ case 32:
1056
+ this.$ = [];
1057
+ break;
1058
+ case 33:
1059
+ this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
1060
+ break;
1061
+ case 34:
1062
+ this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
1063
+ break;
1064
+ case 35:
1065
+ this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
1066
+ break;
1067
+ case 37:
1068
+ this.$ = $$[$0].trim();
1069
+ yy.setAccTitle(this.$);
1070
+ break;
1071
+ case 38:
1072
+ case 39:
1073
+ this.$ = $$[$0].trim();
1074
+ yy.setAccDescription(this.$);
1075
+ break;
1076
+ case 43:
1077
+ this.$ = $$[$0 - 1] + $$[$0];
1078
+ break;
1079
+ case 44:
1080
+ this.$ = $$[$0];
1081
+ break;
1082
+ case 45:
1083
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1084
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1085
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1086
+ break;
1087
+ case 46:
1088
+ yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
1089
+ this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
1090
+ break;
1091
+ case 47:
1092
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1093
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1094
+ break;
1095
+ case 48:
1096
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
1097
+ break;
1098
+ case 49:
1099
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1100
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1], shapeData: $$[$0] };
1101
+ break;
1102
+ case 50:
1103
+ this.$ = { stmt: $$[$0], nodes: $$[$0] };
1104
+ break;
1105
+ case 51:
1106
+ this.$ = [$$[$0]];
1107
+ break;
1108
+ case 52:
1109
+ yy.addVertex($$[$0 - 5][$$[$0 - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0 - 4]);
1110
+ this.$ = $$[$0 - 5].concat($$[$0]);
1111
+ break;
1112
+ case 53:
1113
+ this.$ = $$[$0 - 4].concat($$[$0]);
1114
+ break;
1115
+ case 54:
1116
+ this.$ = $$[$0];
1117
+ break;
1118
+ case 55:
1119
+ this.$ = $$[$0 - 2];
1120
+ yy.setClass($$[$0 - 2], $$[$0]);
1121
+ break;
1122
+ case 56:
1123
+ this.$ = $$[$0 - 3];
1124
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
1125
+ break;
1126
+ case 57:
1127
+ this.$ = $$[$0 - 3];
1128
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
1129
+ break;
1130
+ case 58:
1131
+ this.$ = $$[$0 - 5];
1132
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
1133
+ break;
1134
+ case 59:
1135
+ this.$ = $$[$0 - 3];
1136
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
1137
+ break;
1138
+ case 60:
1139
+ this.$ = $$[$0 - 3];
1140
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
1141
+ break;
1142
+ case 61:
1143
+ this.$ = $$[$0 - 3];
1144
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
1145
+ break;
1146
+ case 62:
1147
+ this.$ = $$[$0 - 7];
1148
+ yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
1149
+ break;
1150
+ case 63:
1151
+ this.$ = $$[$0 - 3];
1152
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
1153
+ break;
1154
+ case 64:
1155
+ this.$ = $$[$0 - 3];
1156
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
1157
+ break;
1158
+ case 65:
1159
+ this.$ = $$[$0 - 3];
1160
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
1161
+ break;
1162
+ case 66:
1163
+ this.$ = $$[$0 - 5];
1164
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
1165
+ break;
1166
+ case 67:
1167
+ this.$ = $$[$0 - 3];
1168
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
1169
+ break;
1170
+ case 68:
1171
+ this.$ = $$[$0 - 3];
1172
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
1173
+ break;
1174
+ case 69:
1175
+ this.$ = $$[$0 - 3];
1176
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
1177
+ break;
1178
+ case 70:
1179
+ this.$ = $$[$0 - 3];
1180
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
1181
+ break;
1182
+ case 71:
1183
+ this.$ = $$[$0 - 3];
1184
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
1185
+ break;
1186
+ case 72:
1187
+ this.$ = $$[$0];
1188
+ yy.addVertex($$[$0]);
1189
+ break;
1190
+ case 73:
1191
+ $$[$0 - 1].text = $$[$0];
1192
+ this.$ = $$[$0 - 1];
1193
+ break;
1194
+ case 74:
1195
+ case 75:
1196
+ $$[$0 - 2].text = $$[$0 - 1];
1197
+ this.$ = $$[$0 - 2];
1198
+ break;
1199
+ case 76:
1200
+ this.$ = $$[$0];
1201
+ break;
1202
+ case 77:
1203
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1204
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
1205
+ break;
1206
+ case 78:
1207
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1208
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1], "id": $$[$0 - 3] };
1209
+ break;
1210
+ case 79:
1211
+ this.$ = { text: $$[$0], type: "text" };
1212
+ break;
1213
+ case 80:
1214
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1215
+ break;
1216
+ case 81:
1217
+ this.$ = { text: $$[$0], type: "string" };
1218
+ break;
1219
+ case 82:
1220
+ this.$ = { text: $$[$0], type: "markdown" };
1221
+ break;
1222
+ case 83:
1223
+ var inf = yy.destructLink($$[$0]);
1224
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
1225
+ break;
1226
+ case 84:
1227
+ var inf = yy.destructLink($$[$0]);
1228
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "id": $$[$0 - 1] };
1229
+ break;
1230
+ case 85:
1231
+ this.$ = $$[$0 - 1];
1232
+ break;
1233
+ case 86:
1234
+ this.$ = { text: $$[$0], type: "text" };
1235
+ break;
1236
+ case 87:
1237
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1238
+ break;
1239
+ case 88:
1240
+ this.$ = { text: $$[$0], type: "string" };
1241
+ break;
1242
+ case 89:
1243
+ case 104:
1244
+ this.$ = { text: $$[$0], type: "markdown" };
1245
+ break;
1246
+ case 101:
1247
+ this.$ = { text: $$[$0], type: "text" };
1248
+ break;
1249
+ case 102:
1250
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1251
+ break;
1252
+ case 103:
1253
+ this.$ = { text: $$[$0], type: "text" };
1254
+ break;
1255
+ case 105:
1256
+ this.$ = $$[$0 - 4];
1257
+ yy.addClass($$[$0 - 2], $$[$0]);
1258
+ break;
1259
+ case 106:
1260
+ this.$ = $$[$0 - 4];
1261
+ yy.setClass($$[$0 - 2], $$[$0]);
1262
+ break;
1263
+ case 107:
1264
+ case 115:
1265
+ this.$ = $$[$0 - 1];
1266
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
1267
+ break;
1268
+ case 108:
1269
+ case 116:
1270
+ this.$ = $$[$0 - 3];
1271
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
1272
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1273
+ break;
1274
+ case 109:
1275
+ this.$ = $$[$0 - 2];
1276
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
1277
+ break;
1278
+ case 110:
1279
+ this.$ = $$[$0 - 4];
1280
+ yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
1281
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1282
+ break;
1283
+ case 111:
1284
+ this.$ = $$[$0 - 2];
1285
+ yy.setLink($$[$0 - 2], $$[$0]);
1286
+ break;
1287
+ case 112:
1288
+ this.$ = $$[$0 - 4];
1289
+ yy.setLink($$[$0 - 4], $$[$0 - 2]);
1290
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1291
+ break;
1292
+ case 113:
1293
+ this.$ = $$[$0 - 4];
1294
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
1295
+ break;
1296
+ case 114:
1297
+ this.$ = $$[$0 - 6];
1298
+ yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
1299
+ yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
1300
+ break;
1301
+ case 117:
1302
+ this.$ = $$[$0 - 1];
1303
+ yy.setLink($$[$0 - 1], $$[$0]);
1304
+ break;
1305
+ case 118:
1306
+ this.$ = $$[$0 - 3];
1307
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
1308
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1309
+ break;
1310
+ case 119:
1311
+ this.$ = $$[$0 - 3];
1312
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
1313
+ break;
1314
+ case 120:
1315
+ this.$ = $$[$0 - 5];
1316
+ yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
1317
+ yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
1318
+ break;
1319
+ case 121:
1320
+ this.$ = $$[$0 - 4];
1321
+ yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
1322
+ break;
1323
+ case 122:
1324
+ this.$ = $$[$0 - 4];
1325
+ yy.updateLink([$$[$0 - 2]], $$[$0]);
1326
+ break;
1327
+ case 123:
1328
+ this.$ = $$[$0 - 4];
1329
+ yy.updateLink($$[$0 - 2], $$[$0]);
1330
+ break;
1331
+ case 124:
1332
+ this.$ = $$[$0 - 8];
1333
+ yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
1334
+ yy.updateLink([$$[$0 - 6]], $$[$0]);
1335
+ break;
1336
+ case 125:
1337
+ this.$ = $$[$0 - 8];
1338
+ yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
1339
+ yy.updateLink($$[$0 - 6], $$[$0]);
1340
+ break;
1341
+ case 126:
1342
+ this.$ = $$[$0 - 6];
1343
+ yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
1344
+ break;
1345
+ case 127:
1346
+ this.$ = $$[$0 - 6];
1347
+ yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
1348
+ break;
1349
+ case 128:
1350
+ case 130:
1351
+ this.$ = [$$[$0]];
1352
+ break;
1353
+ case 129:
1354
+ case 131:
1355
+ $$[$0 - 2].push($$[$0]);
1356
+ this.$ = $$[$0 - 2];
1357
+ break;
1358
+ case 133:
1359
+ this.$ = $$[$0 - 1] + $$[$0];
1360
+ break;
1361
+ case 181:
1362
+ this.$ = $$[$0];
1363
+ break;
1364
+ case 182:
1365
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1366
+ break;
1367
+ case 184:
1368
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1369
+ break;
1370
+ case 185:
1371
+ this.$ = { stmt: "dir", value: "TB" };
1372
+ break;
1373
+ case 186:
1374
+ this.$ = { stmt: "dir", value: "BT" };
1375
+ break;
1376
+ case 187:
1377
+ this.$ = { stmt: "dir", value: "RL" };
1378
+ break;
1379
+ case 188:
1380
+ this.$ = { stmt: "dir", value: "LR" };
1381
+ break;
1382
+ case 189:
1383
+ this.$ = { stmt: "dir", value: "TD" };
1384
+ break;
1385
+ }
1386
+ }, "anonymous"),
1387
+ table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 55], 9: [1, 56], 10: $Vy, 15: 54, 18: 57 }, o($Vz, [2, 3]), o($Vz, [2, 4]), o($Vz, [2, 5]), o($Vz, [2, 6]), o($Vz, [2, 7]), o($Vz, [2, 8]), { 8: $VA, 9: $VB, 11: $VC, 21: 59, 41: 60, 72: 64, 75: [1, 65], 77: [1, 67], 78: [1, 66] }, { 8: $VA, 9: $VB, 11: $VC, 21: 68 }, { 8: $VA, 9: $VB, 11: $VC, 21: 69 }, { 8: $VA, 9: $VB, 11: $VC, 21: 70 }, { 8: $VA, 9: $VB, 11: $VC, 21: 71 }, { 8: $VA, 9: $VB, 11: $VC, 21: 72 }, { 8: $VA, 9: $VB, 10: [1, 73], 11: $VC, 21: 74 }, o($Vz, [2, 36]), { 35: [1, 75] }, { 37: [1, 76] }, o($Vz, [2, 39]), o($VD, [2, 50], { 18: 77, 39: 78, 10: $Vy, 40: $VE }), { 10: [1, 80] }, { 10: [1, 81] }, { 10: [1, 82] }, { 10: [1, 83] }, { 14: $VF, 44: $VG, 60: $VH, 80: [1, 87], 89: $VI, 95: [1, 84], 97: [1, 85], 101: 86, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP, 120: 88 }, o($Vz, [2, 185]), o($Vz, [2, 186]), o($Vz, [2, 187]), o($Vz, [2, 188]), o($Vz, [2, 189]), o($VQ, [2, 51]), o($VQ, [2, 54], { 46: [1, 100] }), o($VR, [2, 72], { 113: 113, 29: [1, 101], 44: $Vd, 48: [1, 102], 50: [1, 103], 52: [1, 104], 54: [1, 105], 56: [1, 106], 58: [1, 107], 60: $Ve, 63: [1, 108], 65: [1, 109], 67: [1, 110], 68: [1, 111], 70: [1, 112], 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), o($VS, [2, 181]), o($VS, [2, 142]), o($VS, [2, 143]), o($VS, [2, 144]), o($VS, [2, 145]), o($VS, [2, 146]), o($VS, [2, 147]), o($VS, [2, 148]), o($VS, [2, 149]), o($VS, [2, 150]), o($VS, [2, 151]), o($VS, [2, 152]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 114] }, o($VT, [2, 26], { 18: 115, 10: $Vy }), o($Vz, [2, 27]), { 42: 116, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vz, [2, 40]), o($Vz, [2, 41]), o($Vz, [2, 42]), o($VU, [2, 76], { 73: 117, 62: [1, 119], 74: [1, 118] }), { 76: 120, 79: 121, 80: $VV, 81: $VW, 116: $VX, 119: $VY }, { 75: [1, 126], 77: [1, 127] }, o($VZ, [2, 83]), o($Vz, [2, 28]), o($Vz, [2, 29]), o($Vz, [2, 30]), o($Vz, [2, 31]), o($Vz, [2, 32]), { 10: $V_, 12: $V$, 14: $V01, 27: $V11, 28: 128, 32: $V21, 44: $V31, 60: $V41, 75: $V51, 80: [1, 130], 81: [1, 131], 83: 141, 84: $V61, 85: $V71, 86: $V81, 87: $V91, 88: $Va1, 89: $Vb1, 90: $Vc1, 91: 129, 105: $Vd1, 109: $Ve1, 111: $Vf1, 114: $Vg1, 115: $Vh1, 116: $Vi1 }, o($Vj1, $V4, { 5: 154 }), o($Vz, [2, 37]), o($Vz, [2, 38]), o($VD, [2, 48], { 44: $Vk1 }), o($VD, [2, 49], { 18: 156, 10: $Vy, 40: $Vl1 }), o($VQ, [2, 44]), { 44: $Vd, 47: 158, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 102: [1, 159], 103: 160, 105: [1, 161] }, { 44: $Vd, 47: 162, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 44: $Vd, 47: 163, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vm1, [2, 107], { 10: [1, 164], 96: [1, 165] }), { 80: [1, 166] }, o($Vm1, [2, 115], { 120: 168, 10: [1, 167], 14: $VF, 44: $VG, 60: $VH, 89: $VI, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP }), o($Vm1, [2, 117], { 10: [1, 169] }), o($Vn1, [2, 183]), o($Vn1, [2, 170]), o($Vn1, [2, 171]), o($Vn1, [2, 172]), o($Vn1, [2, 173]), o($Vn1, [2, 174]), o($Vn1, [2, 175]), o($Vn1, [2, 176]), o($Vn1, [2, 177]), o($Vn1, [2, 178]), o($Vn1, [2, 179]), o($Vn1, [2, 180]), { 44: $Vd, 47: 170, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 30: 171, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 179, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 181, 50: [1, 180], 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 182, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 183, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 184, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 109: [1, 185] }, { 30: 186, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 187, 65: [1, 188], 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 189, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 190, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 191, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VS, [2, 182]), o($V3, [2, 20]), o($VT, [2, 25]), o($VD, [2, 46], { 39: 192, 18: 193, 10: $Vy, 40: $VE }), o($VU, [2, 73], { 10: [1, 194] }), { 10: [1, 195] }, { 30: 196, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 77: [1, 197], 79: 198, 116: $VX, 119: $VY }, o($Vu1, [2, 79]), o($Vu1, [2, 81]), o($Vu1, [2, 82]), o($Vu1, [2, 168]), o($Vu1, [2, 169]), { 76: 199, 79: 121, 80: $VV, 81: $VW, 116: $VX, 119: $VY }, o($VZ, [2, 84]), { 8: $VA, 9: $VB, 10: $V_, 11: $VC, 12: $V$, 14: $V01, 21: 201, 27: $V11, 29: [1, 200], 32: $V21, 44: $V31, 60: $V41, 75: $V51, 83: 141, 84: $V61, 85: $V71, 86: $V81, 87: $V91, 88: $Va1, 89: $Vb1, 90: $Vc1, 91: 202, 105: $Vd1, 109: $Ve1, 111: $Vf1, 114: $Vg1, 115: $Vh1, 116: $Vi1 }, o($Vv1, [2, 101]), o($Vv1, [2, 103]), o($Vv1, [2, 104]), o($Vv1, [2, 157]), o($Vv1, [2, 158]), o($Vv1, [2, 159]), o($Vv1, [2, 160]), o($Vv1, [2, 161]), o($Vv1, [2, 162]), o($Vv1, [2, 163]), o($Vv1, [2, 164]), o($Vv1, [2, 165]), o($Vv1, [2, 166]), o($Vv1, [2, 167]), o($Vv1, [2, 90]), o($Vv1, [2, 91]), o($Vv1, [2, 92]), o($Vv1, [2, 93]), o($Vv1, [2, 94]), o($Vv1, [2, 95]), o($Vv1, [2, 96]), o($Vv1, [2, 97]), o($Vv1, [2, 98]), o($Vv1, [2, 99]), o($Vv1, [2, 100]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 203], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, { 10: $Vy, 18: 204 }, { 44: [1, 205] }, o($VQ, [2, 43]), { 10: [1, 206], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 113, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: [1, 207] }, { 10: [1, 208], 106: [1, 209] }, o($Vw1, [2, 128]), { 10: [1, 210], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 113, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: [1, 211], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 113, 114: $Vq, 115: $Vr, 116: $Vs }, { 80: [1, 212] }, o($Vm1, [2, 109], { 10: [1, 213] }), o($Vm1, [2, 111], { 10: [1, 214] }), { 80: [1, 215] }, o($Vn1, [2, 184]), { 80: [1, 216], 98: [1, 217] }, o($VQ, [2, 55], { 113: 113, 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), { 31: [1, 218], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($Vx1, [2, 86]), o($Vx1, [2, 88]), o($Vx1, [2, 89]), o($Vx1, [2, 153]), o($Vx1, [2, 154]), o($Vx1, [2, 155]), o($Vx1, [2, 156]), { 49: [1, 220], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 221, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 51: [1, 222], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 53: [1, 223], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 55: [1, 224], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 57: [1, 225], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 60: [1, 226] }, { 64: [1, 227], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 66: [1, 228], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 229, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 31: [1, 230], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 67: $Vo1, 69: [1, 231], 71: [1, 232], 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 67: $Vo1, 69: [1, 234], 71: [1, 233], 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VD, [2, 45], { 18: 156, 10: $Vy, 40: $Vl1 }), o($VD, [2, 47], { 44: $Vk1 }), o($VU, [2, 75]), o($VU, [2, 74]), { 62: [1, 235], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VU, [2, 77]), o($Vu1, [2, 80]), { 77: [1, 236], 79: 198, 116: $VX, 119: $VY }, { 30: 237, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($Vj1, $V4, { 5: 238 }), o($Vv1, [2, 102]), o($Vz, [2, 35]), { 43: 239, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: $Vy, 18: 240 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 241, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 252, 104: [1, 253], 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 254, 104: [1, 255], 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 105: [1, 256] }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 257, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 44: $Vd, 47: 258, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vm1, [2, 108]), { 80: [1, 259] }, { 80: [1, 260], 98: [1, 261] }, o($Vm1, [2, 116]), o($Vm1, [2, 118], { 10: [1, 262] }), o($Vm1, [2, 119]), o($VR, [2, 56]), o($Vx1, [2, 87]), o($VR, [2, 57]), { 51: [1, 263], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VR, [2, 64]), o($VR, [2, 59]), o($VR, [2, 60]), o($VR, [2, 61]), { 109: [1, 264] }, o($VR, [2, 63]), o($VR, [2, 65]), { 66: [1, 265], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VR, [2, 67]), o($VR, [2, 68]), o($VR, [2, 70]), o($VR, [2, 69]), o($VR, [2, 71]), o([10, 44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], [2, 85]), o($VU, [2, 78]), { 31: [1, 266], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 267], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, o($VQ, [2, 53]), { 43: 268, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vm1, [2, 121], { 106: $VG1 }), o($VH1, [2, 130], { 108: 270, 10: $Vy1, 60: $Vz1, 84: $VA1, 105: $VB1, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }), o($VI1, [2, 132]), o($VI1, [2, 134]), o($VI1, [2, 135]), o($VI1, [2, 136]), o($VI1, [2, 137]), o($VI1, [2, 138]), o($VI1, [2, 139]), o($VI1, [2, 140]), o($VI1, [2, 141]), o($Vm1, [2, 122], { 106: $VG1 }), { 10: [1, 271] }, o($Vm1, [2, 123], { 106: $VG1 }), { 10: [1, 272] }, o($Vw1, [2, 129]), o($Vm1, [2, 105], { 106: $VG1 }), o($Vm1, [2, 106], { 113: 113, 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), o($Vm1, [2, 110]), o($Vm1, [2, 112], { 10: [1, 273] }), o($Vm1, [2, 113]), { 98: [1, 274] }, { 51: [1, 275] }, { 62: [1, 276] }, { 66: [1, 277] }, { 8: $VA, 9: $VB, 11: $VC, 21: 278 }, o($Vz, [2, 34]), o($VQ, [2, 52]), { 10: $Vy1, 60: $Vz1, 84: $VA1, 105: $VB1, 107: 279, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, o($VI1, [2, 133]), { 14: $VF, 44: $VG, 60: $VH, 89: $VI, 101: 280, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP, 120: 88 }, { 14: $VF, 44: $VG, 60: $VH, 89: $VI, 101: 281, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP, 120: 88 }, { 98: [1, 282] }, o($Vm1, [2, 120]), o($VR, [2, 58]), { 30: 283, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VR, [2, 66]), o($Vj1, $V4, { 5: 284 }), o($VH1, [2, 131], { 108: 270, 10: $Vy1, 60: $Vz1, 84: $VA1, 105: $VB1, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }), o($Vm1, [2, 126], { 120: 168, 10: [1, 285], 14: $VF, 44: $VG, 60: $VH, 89: $VI, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP }), o($Vm1, [2, 127], { 120: 168, 10: [1, 286], 14: $VF, 44: $VG, 60: $VH, 89: $VI, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP }), o($Vm1, [2, 114]), { 31: [1, 287], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 288], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 289, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 290, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, o($VR, [2, 62]), o($Vz, [2, 33]), o($Vm1, [2, 124], { 106: $VG1 }), o($Vm1, [2, 125], { 106: $VG1 })],
1388
+ defaultActions: {},
1389
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1390
+ if (hash.recoverable) {
1391
+ this.trace(str);
1392
+ } else {
1393
+ var error = new Error(str);
1394
+ error.hash = hash;
1395
+ throw error;
1396
+ }
1397
+ }, "parseError"),
1398
+ parse: /* @__PURE__ */ __name(function parse(input) {
1399
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
1400
+ var args = lstack.slice.call(arguments, 1);
1401
+ var lexer2 = Object.create(this.lexer);
1402
+ var sharedState = { yy: {} };
1403
+ for (var k in this.yy) {
1404
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
1405
+ sharedState.yy[k] = this.yy[k];
1406
+ }
1407
+ }
1408
+ lexer2.setInput(input, sharedState.yy);
1409
+ sharedState.yy.lexer = lexer2;
1410
+ sharedState.yy.parser = this;
1411
+ if (typeof lexer2.yylloc == "undefined") {
1412
+ lexer2.yylloc = {};
1413
+ }
1414
+ var yyloc = lexer2.yylloc;
1415
+ lstack.push(yyloc);
1416
+ var ranges = lexer2.options && lexer2.options.ranges;
1417
+ if (typeof sharedState.yy.parseError === "function") {
1418
+ this.parseError = sharedState.yy.parseError;
1419
+ } else {
1420
+ this.parseError = Object.getPrototypeOf(this).parseError;
1421
+ }
1422
+ function popStack(n) {
1423
+ stack.length = stack.length - 2 * n;
1424
+ vstack.length = vstack.length - n;
1425
+ lstack.length = lstack.length - n;
1426
+ }
1427
+ __name(popStack, "popStack");
1428
+ function lex() {
1429
+ var token;
1430
+ token = tstack.pop() || lexer2.lex() || EOF;
1431
+ if (typeof token !== "number") {
1432
+ if (token instanceof Array) {
1433
+ tstack = token;
1434
+ token = tstack.pop();
1435
+ }
1436
+ token = self.symbols_[token] || token;
1437
+ }
1438
+ return token;
1439
+ }
1440
+ __name(lex, "lex");
1441
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
1442
+ while (true) {
1443
+ state = stack[stack.length - 1];
1444
+ if (this.defaultActions[state]) {
1445
+ action = this.defaultActions[state];
1446
+ } else {
1447
+ if (symbol === null || typeof symbol == "undefined") {
1448
+ symbol = lex();
1449
+ }
1450
+ action = table[state] && table[state][symbol];
1451
+ }
1452
+ if (typeof action === "undefined" || !action.length || !action[0]) {
1453
+ var errStr = "";
1454
+ expected = [];
1455
+ for (p in table[state]) {
1456
+ if (this.terminals_[p] && p > TERROR) {
1457
+ expected.push("'" + this.terminals_[p] + "'");
1458
+ }
1459
+ }
1460
+ if (lexer2.showPosition) {
1461
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1462
+ } else {
1463
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1464
+ }
1465
+ this.parseError(errStr, {
1466
+ text: lexer2.match,
1467
+ token: this.terminals_[symbol] || symbol,
1468
+ line: lexer2.yylineno,
1469
+ loc: yyloc,
1470
+ expected
1471
+ });
1472
+ }
1473
+ if (action[0] instanceof Array && action.length > 1) {
1474
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1475
+ }
1476
+ switch (action[0]) {
1477
+ case 1:
1478
+ stack.push(symbol);
1479
+ vstack.push(lexer2.yytext);
1480
+ lstack.push(lexer2.yylloc);
1481
+ stack.push(action[1]);
1482
+ symbol = null;
1483
+ {
1484
+ yyleng = lexer2.yyleng;
1485
+ yytext = lexer2.yytext;
1486
+ yylineno = lexer2.yylineno;
1487
+ yyloc = lexer2.yylloc;
1488
+ }
1489
+ break;
1490
+ case 2:
1491
+ len = this.productions_[action[1]][1];
1492
+ yyval.$ = vstack[vstack.length - len];
1493
+ yyval._$ = {
1494
+ first_line: lstack[lstack.length - (len || 1)].first_line,
1495
+ last_line: lstack[lstack.length - 1].last_line,
1496
+ first_column: lstack[lstack.length - (len || 1)].first_column,
1497
+ last_column: lstack[lstack.length - 1].last_column
1498
+ };
1499
+ if (ranges) {
1500
+ yyval._$.range = [
1501
+ lstack[lstack.length - (len || 1)].range[0],
1502
+ lstack[lstack.length - 1].range[1]
1503
+ ];
1504
+ }
1505
+ r = this.performAction.apply(yyval, [
1506
+ yytext,
1507
+ yyleng,
1508
+ yylineno,
1509
+ sharedState.yy,
1510
+ action[1],
1511
+ vstack,
1512
+ lstack
1513
+ ].concat(args));
1514
+ if (typeof r !== "undefined") {
1515
+ return r;
1516
+ }
1517
+ if (len) {
1518
+ stack = stack.slice(0, -1 * len * 2);
1519
+ vstack = vstack.slice(0, -1 * len);
1520
+ lstack = lstack.slice(0, -1 * len);
1521
+ }
1522
+ stack.push(this.productions_[action[1]][0]);
1523
+ vstack.push(yyval.$);
1524
+ lstack.push(yyval._$);
1525
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1526
+ stack.push(newState);
1527
+ break;
1528
+ case 3:
1529
+ return true;
1530
+ }
1531
+ }
1532
+ return true;
1533
+ }, "parse")
1534
+ };
1535
+ var lexer = /* @__PURE__ */ (function() {
1536
+ var lexer2 = {
1537
+ EOF: 1,
1538
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1539
+ if (this.yy.parser) {
1540
+ this.yy.parser.parseError(str, hash);
1541
+ } else {
1542
+ throw new Error(str);
1543
+ }
1544
+ }, "parseError"),
1545
+ // resets the lexer, sets new input
1546
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
1547
+ this.yy = yy || this.yy || {};
1548
+ this._input = input;
1549
+ this._more = this._backtrack = this.done = false;
1550
+ this.yylineno = this.yyleng = 0;
1551
+ this.yytext = this.matched = this.match = "";
1552
+ this.conditionStack = ["INITIAL"];
1553
+ this.yylloc = {
1554
+ first_line: 1,
1555
+ first_column: 0,
1556
+ last_line: 1,
1557
+ last_column: 0
1558
+ };
1559
+ if (this.options.ranges) {
1560
+ this.yylloc.range = [0, 0];
1561
+ }
1562
+ this.offset = 0;
1563
+ return this;
1564
+ }, "setInput"),
1565
+ // consumes and returns one char from the input
1566
+ input: /* @__PURE__ */ __name(function() {
1567
+ var ch = this._input[0];
1568
+ this.yytext += ch;
1569
+ this.yyleng++;
1570
+ this.offset++;
1571
+ this.match += ch;
1572
+ this.matched += ch;
1573
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
1574
+ if (lines) {
1575
+ this.yylineno++;
1576
+ this.yylloc.last_line++;
1577
+ } else {
1578
+ this.yylloc.last_column++;
1579
+ }
1580
+ if (this.options.ranges) {
1581
+ this.yylloc.range[1]++;
1582
+ }
1583
+ this._input = this._input.slice(1);
1584
+ return ch;
1585
+ }, "input"),
1586
+ // unshifts one char (or a string) into the input
1587
+ unput: /* @__PURE__ */ __name(function(ch) {
1588
+ var len = ch.length;
1589
+ var lines = ch.split(/(?:\r\n?|\n)/g);
1590
+ this._input = ch + this._input;
1591
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
1592
+ this.offset -= len;
1593
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1594
+ this.match = this.match.substr(0, this.match.length - 1);
1595
+ this.matched = this.matched.substr(0, this.matched.length - 1);
1596
+ if (lines.length - 1) {
1597
+ this.yylineno -= lines.length - 1;
1598
+ }
1599
+ var r = this.yylloc.range;
1600
+ this.yylloc = {
1601
+ first_line: this.yylloc.first_line,
1602
+ last_line: this.yylineno + 1,
1603
+ first_column: this.yylloc.first_column,
1604
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
1605
+ };
1606
+ if (this.options.ranges) {
1607
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1608
+ }
1609
+ this.yyleng = this.yytext.length;
1610
+ return this;
1611
+ }, "unput"),
1612
+ // When called from action, caches matched text and appends it on next action
1613
+ more: /* @__PURE__ */ __name(function() {
1614
+ this._more = true;
1615
+ return this;
1616
+ }, "more"),
1617
+ // 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.
1618
+ reject: /* @__PURE__ */ __name(function() {
1619
+ if (this.options.backtrack_lexer) {
1620
+ this._backtrack = true;
1621
+ } else {
1622
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
1623
+ text: "",
1624
+ token: null,
1625
+ line: this.yylineno
1626
+ });
1627
+ }
1628
+ return this;
1629
+ }, "reject"),
1630
+ // retain first n characters of the match
1631
+ less: /* @__PURE__ */ __name(function(n) {
1632
+ this.unput(this.match.slice(n));
1633
+ }, "less"),
1634
+ // displays already matched input, i.e. for error messages
1635
+ pastInput: /* @__PURE__ */ __name(function() {
1636
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
1637
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
1638
+ }, "pastInput"),
1639
+ // displays upcoming input, i.e. for error messages
1640
+ upcomingInput: /* @__PURE__ */ __name(function() {
1641
+ var next = this.match;
1642
+ if (next.length < 20) {
1643
+ next += this._input.substr(0, 20 - next.length);
1644
+ }
1645
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
1646
+ }, "upcomingInput"),
1647
+ // displays the character position where the lexing error occurred, i.e. for error messages
1648
+ showPosition: /* @__PURE__ */ __name(function() {
1649
+ var pre = this.pastInput();
1650
+ var c = new Array(pre.length + 1).join("-");
1651
+ return pre + this.upcomingInput() + "\n" + c + "^";
1652
+ }, "showPosition"),
1653
+ // test the lexed token: return FALSE when not a match, otherwise return token
1654
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
1655
+ var token, lines, backup;
1656
+ if (this.options.backtrack_lexer) {
1657
+ backup = {
1658
+ yylineno: this.yylineno,
1659
+ yylloc: {
1660
+ first_line: this.yylloc.first_line,
1661
+ last_line: this.last_line,
1662
+ first_column: this.yylloc.first_column,
1663
+ last_column: this.yylloc.last_column
1664
+ },
1665
+ yytext: this.yytext,
1666
+ match: this.match,
1667
+ matches: this.matches,
1668
+ matched: this.matched,
1669
+ yyleng: this.yyleng,
1670
+ offset: this.offset,
1671
+ _more: this._more,
1672
+ _input: this._input,
1673
+ yy: this.yy,
1674
+ conditionStack: this.conditionStack.slice(0),
1675
+ done: this.done
1676
+ };
1677
+ if (this.options.ranges) {
1678
+ backup.yylloc.range = this.yylloc.range.slice(0);
1679
+ }
1680
+ }
1681
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
1682
+ if (lines) {
1683
+ this.yylineno += lines.length;
1684
+ }
1685
+ this.yylloc = {
1686
+ first_line: this.yylloc.last_line,
1687
+ last_line: this.yylineno + 1,
1688
+ first_column: this.yylloc.last_column,
1689
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1690
+ };
1691
+ this.yytext += match[0];
1692
+ this.match += match[0];
1693
+ this.matches = match;
1694
+ this.yyleng = this.yytext.length;
1695
+ if (this.options.ranges) {
1696
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
1697
+ }
1698
+ this._more = false;
1699
+ this._backtrack = false;
1700
+ this._input = this._input.slice(match[0].length);
1701
+ this.matched += match[0];
1702
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1703
+ if (this.done && this._input) {
1704
+ this.done = false;
1705
+ }
1706
+ if (token) {
1707
+ return token;
1708
+ } else if (this._backtrack) {
1709
+ for (var k in backup) {
1710
+ this[k] = backup[k];
1711
+ }
1712
+ return false;
1713
+ }
1714
+ return false;
1715
+ }, "test_match"),
1716
+ // return next match in input
1717
+ next: /* @__PURE__ */ __name(function() {
1718
+ if (this.done) {
1719
+ return this.EOF;
1720
+ }
1721
+ if (!this._input) {
1722
+ this.done = true;
1723
+ }
1724
+ var token, match, tempMatch, index;
1725
+ if (!this._more) {
1726
+ this.yytext = "";
1727
+ this.match = "";
1728
+ }
1729
+ var rules = this._currentRules();
1730
+ for (var i = 0; i < rules.length; i++) {
1731
+ tempMatch = this._input.match(this.rules[rules[i]]);
1732
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1733
+ match = tempMatch;
1734
+ index = i;
1735
+ if (this.options.backtrack_lexer) {
1736
+ token = this.test_match(tempMatch, rules[i]);
1737
+ if (token !== false) {
1738
+ return token;
1739
+ } else if (this._backtrack) {
1740
+ match = false;
1741
+ continue;
1742
+ } else {
1743
+ return false;
1744
+ }
1745
+ } else if (!this.options.flex) {
1746
+ break;
1747
+ }
1748
+ }
1749
+ }
1750
+ if (match) {
1751
+ token = this.test_match(match, rules[index]);
1752
+ if (token !== false) {
1753
+ return token;
1754
+ }
1755
+ return false;
1756
+ }
1757
+ if (this._input === "") {
1758
+ return this.EOF;
1759
+ } else {
1760
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1761
+ text: "",
1762
+ token: null,
1763
+ line: this.yylineno
1764
+ });
1765
+ }
1766
+ }, "next"),
1767
+ // return next match that has a token
1768
+ lex: /* @__PURE__ */ __name(function lex() {
1769
+ var r = this.next();
1770
+ if (r) {
1771
+ return r;
1772
+ } else {
1773
+ return this.lex();
1774
+ }
1775
+ }, "lex"),
1776
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1777
+ begin: /* @__PURE__ */ __name(function begin(condition) {
1778
+ this.conditionStack.push(condition);
1779
+ }, "begin"),
1780
+ // pop the previously active lexer condition state off the condition stack
1781
+ popState: /* @__PURE__ */ __name(function popState() {
1782
+ var n = this.conditionStack.length - 1;
1783
+ if (n > 0) {
1784
+ return this.conditionStack.pop();
1785
+ } else {
1786
+ return this.conditionStack[0];
1787
+ }
1788
+ }, "popState"),
1789
+ // produce the lexer rule set which is active for the currently active lexer condition state
1790
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
1791
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
1792
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1793
+ } else {
1794
+ return this.conditions["INITIAL"].rules;
1795
+ }
1796
+ }, "_currentRules"),
1797
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1798
+ topState: /* @__PURE__ */ __name(function topState(n) {
1799
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
1800
+ if (n >= 0) {
1801
+ return this.conditionStack[n];
1802
+ } else {
1803
+ return "INITIAL";
1804
+ }
1805
+ }, "topState"),
1806
+ // alias for begin(condition)
1807
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
1808
+ this.begin(condition);
1809
+ }, "pushState"),
1810
+ // return the number of states currently on the stack
1811
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
1812
+ return this.conditionStack.length;
1813
+ }, "stateStackSize"),
1814
+ options: {},
1815
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1816
+ switch ($avoiding_name_collisions) {
1817
+ case 0:
1818
+ this.begin("acc_title");
1819
+ return 34;
1820
+ case 1:
1821
+ this.popState();
1822
+ return "acc_title_value";
1823
+ case 2:
1824
+ this.begin("acc_descr");
1825
+ return 36;
1826
+ case 3:
1827
+ this.popState();
1828
+ return "acc_descr_value";
1829
+ case 4:
1830
+ this.begin("acc_descr_multiline");
1831
+ break;
1832
+ case 5:
1833
+ this.popState();
1834
+ break;
1835
+ case 6:
1836
+ return "acc_descr_multiline_value";
1837
+ case 7:
1838
+ this.pushState("shapeData");
1839
+ yy_.yytext = "";
1840
+ return 40;
1841
+ case 8:
1842
+ this.pushState("shapeDataStr");
1843
+ return 40;
1844
+ case 9:
1845
+ this.popState();
1846
+ return 40;
1847
+ case 10:
1848
+ const re = /\n\s*/g;
1849
+ yy_.yytext = yy_.yytext.replace(re, "<br/>");
1850
+ return 40;
1851
+ case 11:
1852
+ return 40;
1853
+ case 12:
1854
+ this.popState();
1855
+ break;
1856
+ case 13:
1857
+ this.begin("callbackname");
1858
+ break;
1859
+ case 14:
1860
+ this.popState();
1861
+ break;
1862
+ case 15:
1863
+ this.popState();
1864
+ this.begin("callbackargs");
1865
+ break;
1866
+ case 16:
1867
+ return 95;
1868
+ case 17:
1869
+ this.popState();
1870
+ break;
1871
+ case 18:
1872
+ return 96;
1873
+ case 19:
1874
+ return "MD_STR";
1875
+ case 20:
1876
+ this.popState();
1877
+ break;
1878
+ case 21:
1879
+ this.begin("md_string");
1880
+ break;
1881
+ case 22:
1882
+ return "STR";
1883
+ case 23:
1884
+ this.popState();
1885
+ break;
1886
+ case 24:
1887
+ this.pushState("string");
1888
+ break;
1889
+ case 25:
1890
+ return 84;
1891
+ case 26:
1892
+ return 102;
1893
+ case 27:
1894
+ return 85;
1895
+ case 28:
1896
+ return 104;
1897
+ case 29:
1898
+ return 86;
1899
+ case 30:
1900
+ return 87;
1901
+ case 31:
1902
+ return 97;
1903
+ case 32:
1904
+ this.begin("click");
1905
+ break;
1906
+ case 33:
1907
+ this.popState();
1908
+ break;
1909
+ case 34:
1910
+ return 88;
1911
+ case 35:
1912
+ if (yy.lex.firstGraph()) {
1913
+ this.begin("dir");
1914
+ }
1915
+ return 12;
1916
+ case 36:
1917
+ if (yy.lex.firstGraph()) {
1918
+ this.begin("dir");
1919
+ }
1920
+ return 12;
1921
+ case 37:
1922
+ if (yy.lex.firstGraph()) {
1923
+ this.begin("dir");
1924
+ }
1925
+ return 12;
1926
+ case 38:
1927
+ return 27;
1928
+ case 39:
1929
+ return 32;
1930
+ case 40:
1931
+ return 98;
1932
+ case 41:
1933
+ return 98;
1934
+ case 42:
1935
+ return 98;
1936
+ case 43:
1937
+ return 98;
1938
+ case 44:
1939
+ this.popState();
1940
+ return 13;
1941
+ case 45:
1942
+ this.popState();
1943
+ return 14;
1944
+ case 46:
1945
+ this.popState();
1946
+ return 14;
1947
+ case 47:
1948
+ this.popState();
1949
+ return 14;
1950
+ case 48:
1951
+ this.popState();
1952
+ return 14;
1953
+ case 49:
1954
+ this.popState();
1955
+ return 14;
1956
+ case 50:
1957
+ this.popState();
1958
+ return 14;
1959
+ case 51:
1960
+ this.popState();
1961
+ return 14;
1962
+ case 52:
1963
+ this.popState();
1964
+ return 14;
1965
+ case 53:
1966
+ this.popState();
1967
+ return 14;
1968
+ case 54:
1969
+ this.popState();
1970
+ return 14;
1971
+ case 55:
1972
+ return 121;
1973
+ case 56:
1974
+ return 122;
1975
+ case 57:
1976
+ return 123;
1977
+ case 58:
1978
+ return 124;
1979
+ case 59:
1980
+ return 125;
1981
+ case 60:
1982
+ return 78;
1983
+ case 61:
1984
+ return 105;
1985
+ case 62:
1986
+ return 111;
1987
+ case 63:
1988
+ return 46;
1989
+ case 64:
1990
+ return 60;
1991
+ case 65:
1992
+ return 44;
1993
+ case 66:
1994
+ return 8;
1995
+ case 67:
1996
+ return 106;
1997
+ case 68:
1998
+ return 115;
1999
+ case 69:
2000
+ this.popState();
2001
+ return 77;
2002
+ case 70:
2003
+ this.pushState("edgeText");
2004
+ return 75;
2005
+ case 71:
2006
+ return 119;
2007
+ case 72:
2008
+ this.popState();
2009
+ return 77;
2010
+ case 73:
2011
+ this.pushState("thickEdgeText");
2012
+ return 75;
2013
+ case 74:
2014
+ return 119;
2015
+ case 75:
2016
+ this.popState();
2017
+ return 77;
2018
+ case 76:
2019
+ this.pushState("dottedEdgeText");
2020
+ return 75;
2021
+ case 77:
2022
+ return 119;
2023
+ case 78:
2024
+ return 77;
2025
+ case 79:
2026
+ this.popState();
2027
+ return 53;
2028
+ case 80:
2029
+ return "TEXT";
2030
+ case 81:
2031
+ this.pushState("ellipseText");
2032
+ return 52;
2033
+ case 82:
2034
+ this.popState();
2035
+ return 55;
2036
+ case 83:
2037
+ this.pushState("text");
2038
+ return 54;
2039
+ case 84:
2040
+ this.popState();
2041
+ return 57;
2042
+ case 85:
2043
+ this.pushState("text");
2044
+ return 56;
2045
+ case 86:
2046
+ return 58;
2047
+ case 87:
2048
+ this.pushState("text");
2049
+ return 67;
2050
+ case 88:
2051
+ this.popState();
2052
+ return 64;
2053
+ case 89:
2054
+ this.pushState("text");
2055
+ return 63;
2056
+ case 90:
2057
+ this.popState();
2058
+ return 49;
2059
+ case 91:
2060
+ this.pushState("text");
2061
+ return 48;
2062
+ case 92:
2063
+ this.popState();
2064
+ return 69;
2065
+ case 93:
2066
+ this.popState();
2067
+ return 71;
2068
+ case 94:
2069
+ return 117;
2070
+ case 95:
2071
+ this.pushState("trapText");
2072
+ return 68;
2073
+ case 96:
2074
+ this.pushState("trapText");
2075
+ return 70;
2076
+ case 97:
2077
+ return 118;
2078
+ case 98:
2079
+ return 67;
2080
+ case 99:
2081
+ return 90;
2082
+ case 100:
2083
+ return "SEP";
2084
+ case 101:
2085
+ return 89;
2086
+ case 102:
2087
+ return 115;
2088
+ case 103:
2089
+ return 111;
2090
+ case 104:
2091
+ return 44;
2092
+ case 105:
2093
+ return 109;
2094
+ case 106:
2095
+ return 114;
2096
+ case 107:
2097
+ return 116;
2098
+ case 108:
2099
+ this.popState();
2100
+ return 62;
2101
+ case 109:
2102
+ this.pushState("text");
2103
+ return 62;
2104
+ case 110:
2105
+ this.popState();
2106
+ return 51;
2107
+ case 111:
2108
+ this.pushState("text");
2109
+ return 50;
2110
+ case 112:
2111
+ this.popState();
2112
+ return 31;
2113
+ case 113:
2114
+ this.pushState("text");
2115
+ return 29;
2116
+ case 114:
2117
+ this.popState();
2118
+ return 66;
2119
+ case 115:
2120
+ this.pushState("text");
2121
+ return 65;
2122
+ case 116:
2123
+ return "TEXT";
2124
+ case 117:
2125
+ return "QUOTE";
2126
+ case 118:
2127
+ return 9;
2128
+ case 119:
2129
+ return 10;
2130
+ case 120:
2131
+ return 11;
2132
+ }
2133
+ }, "anonymous"),
2134
+ rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:@\{)/, /^(?:["])/, /^(?:["])/, /^(?:[^\"]+)/, /^(?:[^}^"]+)/, /^(?:\})/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:.*direction\s+TD[^\n]*)/, /^(?:[^\s\"]+@(?=[^\{\"]))/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
2135
+ conditions: { "shapeDataEndBracket": { "rules": [21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "shapeDataStr": { "rules": [9, 10, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "shapeData": { "rules": [8, 11, 12, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "callbackargs": { "rules": [17, 18, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "callbackname": { "rules": [14, 15, 16, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "href": { "rules": [21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "click": { "rules": [21, 24, 33, 34, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "dottedEdgeText": { "rules": [21, 24, 75, 77, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "thickEdgeText": { "rules": [21, 24, 72, 74, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "edgeText": { "rules": [21, 24, 69, 71, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "trapText": { "rules": [21, 24, 78, 81, 83, 85, 89, 91, 92, 93, 94, 95, 96, 109, 111, 113, 115], "inclusive": false }, "ellipseText": { "rules": [21, 24, 78, 79, 80, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "text": { "rules": [21, 24, 78, 81, 82, 83, 84, 85, 88, 89, 90, 91, 95, 96, 108, 109, 110, 111, 112, 113, 114, 115, 116], "inclusive": false }, "vertex": { "rules": [21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "dir": { "rules": [21, 24, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "acc_descr": { "rules": [3, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "acc_title": { "rules": [1, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "md_string": { "rules": [19, 20, 21, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "string": { "rules": [21, 22, 23, 24, 78, 81, 83, 85, 89, 91, 95, 96, 109, 111, 113, 115], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 13, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 75, 76, 78, 81, 83, 85, 86, 87, 89, 91, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 109, 111, 113, 115, 117, 118, 119, 120], "inclusive": true } }
2136
+ };
2137
+ return lexer2;
2138
+ })();
2139
+ parser2.lexer = lexer;
2140
+ function Parser() {
2141
+ this.yy = {};
2142
+ }
2143
+ __name(Parser, "Parser");
2144
+ Parser.prototype = parser2;
2145
+ parser2.Parser = Parser;
2146
+ return new Parser();
2147
+ })();
2148
+ parser.parser = parser;
2149
+ var flow_default = parser;
2150
+ var newParser = Object.assign({}, flow_default);
2151
+ newParser.parse = (src) => {
2152
+ const newSrc = src.replace(/}\s*\n/g, "}\n");
2153
+ return flow_default.parse(newSrc);
2154
+ };
2155
+ var flowParser_default = newParser;
2156
+ var fade = /* @__PURE__ */ __name((color, opacity) => {
2157
+ const channel2 = channel;
2158
+ const r = channel2(color, "r");
2159
+ const g = channel2(color, "g");
2160
+ const b = channel2(color, "b");
2161
+ return rgba(r, g, b, opacity);
2162
+ }, "fade");
2163
+ var getStyles = /* @__PURE__ */ __name((options) => `.label {
2164
+ font-family: ${options.fontFamily};
2165
+ color: ${options.nodeTextColor || options.textColor};
2166
+ }
2167
+ .cluster-label text {
2168
+ fill: ${options.titleColor};
2169
+ }
2170
+ .cluster-label span {
2171
+ color: ${options.titleColor};
2172
+ }
2173
+ .cluster-label span p {
2174
+ background-color: transparent;
2175
+ }
2176
+
2177
+ .label text,span {
2178
+ fill: ${options.nodeTextColor || options.textColor};
2179
+ color: ${options.nodeTextColor || options.textColor};
2180
+ }
2181
+
2182
+ .node rect,
2183
+ .node circle,
2184
+ .node ellipse,
2185
+ .node polygon,
2186
+ .node path {
2187
+ fill: ${options.mainBkg};
2188
+ stroke: ${options.nodeBorder};
2189
+ stroke-width: ${options.strokeWidth ?? 1}px;
2190
+ }
2191
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
2192
+ text-anchor: middle;
2193
+ }
2194
+ // .flowchart-label .text-outer-tspan {
2195
+ // text-anchor: middle;
2196
+ // }
2197
+ // .flowchart-label .text-inner-tspan {
2198
+ // text-anchor: start;
2199
+ // }
2200
+
2201
+ .node .katex path {
2202
+ fill: #000;
2203
+ stroke: #000;
2204
+ stroke-width: 1px;
2205
+ }
2206
+
2207
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
2208
+ text-align: center;
2209
+ }
2210
+ .node.clickable {
2211
+ cursor: pointer;
2212
+ }
2213
+
2214
+
2215
+ .root .anchor path {
2216
+ fill: ${options.lineColor} !important;
2217
+ stroke-width: 0;
2218
+ stroke: ${options.lineColor};
2219
+ }
2220
+
2221
+ .arrowheadPath {
2222
+ fill: ${options.arrowheadColor};
2223
+ }
2224
+
2225
+ .edgePath .path {
2226
+ stroke: ${options.lineColor};
2227
+ stroke-width: ${options.strokeWidth ?? 2}px;
2228
+ }
2229
+
2230
+ .flowchart-link {
2231
+ stroke: ${options.lineColor};
2232
+ fill: none;
2233
+ }
2234
+
2235
+ .edgeLabel {
2236
+ background-color: ${options.edgeLabelBackground};
2237
+ p {
2238
+ background-color: ${options.edgeLabelBackground};
2239
+ }
2240
+ rect {
2241
+ opacity: 0.5;
2242
+ background-color: ${options.edgeLabelBackground};
2243
+ fill: ${options.edgeLabelBackground};
2244
+ }
2245
+ text-align: center;
2246
+ }
2247
+
2248
+ /* For html labels only */
2249
+ .labelBkg {
2250
+ background-color: ${fade(options.edgeLabelBackground, 0.5)};
2251
+ // background-color:
2252
+ }
2253
+
2254
+ .cluster rect {
2255
+ fill: ${options.clusterBkg};
2256
+ stroke: ${options.clusterBorder};
2257
+ stroke-width: 1px;
2258
+ }
2259
+
2260
+ .cluster text {
2261
+ fill: ${options.titleColor};
2262
+ }
2263
+
2264
+ .cluster span {
2265
+ color: ${options.titleColor};
2266
+ }
2267
+ /* .cluster div {
2268
+ color: ${options.titleColor};
2269
+ } */
2270
+
2271
+ div.mermaidTooltip {
2272
+ position: absolute;
2273
+ text-align: center;
2274
+ max-width: 200px;
2275
+ padding: 2px;
2276
+ font-family: ${options.fontFamily};
2277
+ font-size: 12px;
2278
+ background: ${options.tertiaryColor};
2279
+ border: 1px solid ${options.border2};
2280
+ border-radius: 2px;
2281
+ pointer-events: none;
2282
+ z-index: 100;
2283
+ }
2284
+
2285
+ .flowchartTitleText {
2286
+ text-anchor: middle;
2287
+ font-size: 18px;
2288
+ fill: ${options.textColor};
2289
+ }
2290
+
2291
+ rect.text {
2292
+ fill: none;
2293
+ stroke-width: 0;
2294
+ }
2295
+
2296
+ .icon-shape, .image-shape {
2297
+ background-color: ${options.edgeLabelBackground};
2298
+ p {
2299
+ background-color: ${options.edgeLabelBackground};
2300
+ padding: 2px;
2301
+ }
2302
+ .label rect {
2303
+ opacity: 0.5;
2304
+ background-color: ${options.edgeLabelBackground};
2305
+ fill: ${options.edgeLabelBackground};
2306
+ }
2307
+ text-align: center;
2308
+ }
2309
+ ${getIconStyles()}
2310
+ `, "getStyles");
2311
+ var styles_default = getStyles;
2312
+ var diagram = {
2313
+ parser: flowParser_default,
2314
+ get db() {
2315
+ return new FlowDB();
2316
+ },
2317
+ renderer: flowRenderer_v3_unified_default,
2318
+ styles: styles_default,
2319
+ init: /* @__PURE__ */ __name((cnf) => {
2320
+ if (!cnf.flowchart) {
2321
+ cnf.flowchart = {};
2322
+ }
2323
+ if (cnf.layout) {
2324
+ setConfig2({ layout: cnf.layout });
2325
+ }
2326
+ cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
2327
+ setConfig2({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
2328
+ }, "init")
2329
+ };
2330
+ export {
2331
+ diagram
2332
+ };