@zettelgeist/cli 0.1.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 (189) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +64 -0
  3. package/dist/bin.js +2211 -0
  4. package/dist/bin.js.map +7 -0
  5. package/dist/templates/export.html +27 -0
  6. package/dist/templates/skill/SKILL.md +220 -0
  7. package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js +14 -0
  8. package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js.map +7 -0
  9. package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js +8884 -0
  10. package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js.map +7 -0
  11. package/dist/viewer-bundle/base.css +248 -0
  12. package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js +3777 -0
  13. package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js.map +7 -0
  14. package/dist/viewer-bundle/board.css +370 -0
  15. package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js +2596 -0
  16. package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js.map +7 -0
  17. package/dist/viewer-bundle/chunk-2QXGXAO5.js +68 -0
  18. package/dist/viewer-bundle/chunk-2QXGXAO5.js.map +7 -0
  19. package/dist/viewer-bundle/chunk-5PZT7VUU.js +67 -0
  20. package/dist/viewer-bundle/chunk-5PZT7VUU.js.map +7 -0
  21. package/dist/viewer-bundle/chunk-5YJCJF2C.js +112 -0
  22. package/dist/viewer-bundle/chunk-5YJCJF2C.js.map +7 -0
  23. package/dist/viewer-bundle/chunk-6LYV7PBV.js +1011 -0
  24. package/dist/viewer-bundle/chunk-6LYV7PBV.js.map +7 -0
  25. package/dist/viewer-bundle/chunk-6VW7D5WX.js +48 -0
  26. package/dist/viewer-bundle/chunk-6VW7D5WX.js.map +7 -0
  27. package/dist/viewer-bundle/chunk-76C5OSD4.js +2048 -0
  28. package/dist/viewer-bundle/chunk-76C5OSD4.js.map +7 -0
  29. package/dist/viewer-bundle/chunk-7NZMPQDX.js +6957 -0
  30. package/dist/viewer-bundle/chunk-7NZMPQDX.js.map +7 -0
  31. package/dist/viewer-bundle/chunk-A634GTZN.js +122 -0
  32. package/dist/viewer-bundle/chunk-A634GTZN.js.map +7 -0
  33. package/dist/viewer-bundle/chunk-AJQJUKMU.js +133 -0
  34. package/dist/viewer-bundle/chunk-AJQJUKMU.js.map +7 -0
  35. package/dist/viewer-bundle/chunk-BM2KPNFW.js +5556 -0
  36. package/dist/viewer-bundle/chunk-BM2KPNFW.js.map +7 -0
  37. package/dist/viewer-bundle/chunk-CIDUOCCG.js +25 -0
  38. package/dist/viewer-bundle/chunk-CIDUOCCG.js.map +7 -0
  39. package/dist/viewer-bundle/chunk-CZHJHAOR.js +6397 -0
  40. package/dist/viewer-bundle/chunk-CZHJHAOR.js.map +7 -0
  41. package/dist/viewer-bundle/chunk-D5RLIWY4.js +125 -0
  42. package/dist/viewer-bundle/chunk-D5RLIWY4.js.map +7 -0
  43. package/dist/viewer-bundle/chunk-DI52DQAC.js +44 -0
  44. package/dist/viewer-bundle/chunk-DI52DQAC.js.map +7 -0
  45. package/dist/viewer-bundle/chunk-EXJQLTIV.js +51 -0
  46. package/dist/viewer-bundle/chunk-EXJQLTIV.js.map +7 -0
  47. package/dist/viewer-bundle/chunk-G3PPZWPW.js +96 -0
  48. package/dist/viewer-bundle/chunk-G3PPZWPW.js.map +7 -0
  49. package/dist/viewer-bundle/chunk-GTW4IDD4.js +30297 -0
  50. package/dist/viewer-bundle/chunk-GTW4IDD4.js.map +7 -0
  51. package/dist/viewer-bundle/chunk-GVE7OA3Z.js +59 -0
  52. package/dist/viewer-bundle/chunk-GVE7OA3Z.js.map +7 -0
  53. package/dist/viewer-bundle/chunk-JBUVKVPY.js +2042 -0
  54. package/dist/viewer-bundle/chunk-JBUVKVPY.js.map +7 -0
  55. package/dist/viewer-bundle/chunk-JQLVOAQB.js +20 -0
  56. package/dist/viewer-bundle/chunk-JQLVOAQB.js.map +7 -0
  57. package/dist/viewer-bundle/chunk-LQMQSYLO.js +101 -0
  58. package/dist/viewer-bundle/chunk-LQMQSYLO.js.map +7 -0
  59. package/dist/viewer-bundle/chunk-MBFAQ3IK.js +34 -0
  60. package/dist/viewer-bundle/chunk-MBFAQ3IK.js.map +7 -0
  61. package/dist/viewer-bundle/chunk-N7G7IIKG.js +25 -0
  62. package/dist/viewer-bundle/chunk-N7G7IIKG.js.map +7 -0
  63. package/dist/viewer-bundle/chunk-NW4YG3NS.js +171 -0
  64. package/dist/viewer-bundle/chunk-NW4YG3NS.js.map +7 -0
  65. package/dist/viewer-bundle/chunk-ODEP5TKB.js +61 -0
  66. package/dist/viewer-bundle/chunk-ODEP5TKB.js.map +7 -0
  67. package/dist/viewer-bundle/chunk-OGKINV23.js +1050 -0
  68. package/dist/viewer-bundle/chunk-OGKINV23.js.map +7 -0
  69. package/dist/viewer-bundle/chunk-OGMSNDVH.js +1994 -0
  70. package/dist/viewer-bundle/chunk-OGMSNDVH.js.map +7 -0
  71. package/dist/viewer-bundle/chunk-QJVSDNAW.js +25 -0
  72. package/dist/viewer-bundle/chunk-QJVSDNAW.js.map +7 -0
  73. package/dist/viewer-bundle/chunk-RBTT26R4.js +2721 -0
  74. package/dist/viewer-bundle/chunk-RBTT26R4.js.map +7 -0
  75. package/dist/viewer-bundle/chunk-RQIPIIE2.js +48 -0
  76. package/dist/viewer-bundle/chunk-RQIPIIE2.js.map +7 -0
  77. package/dist/viewer-bundle/chunk-SRTYTXTX.js +22 -0
  78. package/dist/viewer-bundle/chunk-SRTYTXTX.js.map +7 -0
  79. package/dist/viewer-bundle/chunk-TRL7YIZG.js +1663 -0
  80. package/dist/viewer-bundle/chunk-TRL7YIZG.js.map +7 -0
  81. package/dist/viewer-bundle/chunk-U5T7X4BV.js +172 -0
  82. package/dist/viewer-bundle/chunk-U5T7X4BV.js.map +7 -0
  83. package/dist/viewer-bundle/chunk-UCAW6C6C.js +48 -0
  84. package/dist/viewer-bundle/chunk-UCAW6C6C.js.map +7 -0
  85. package/dist/viewer-bundle/chunk-UEAG4BJQ.js +93 -0
  86. package/dist/viewer-bundle/chunk-UEAG4BJQ.js.map +7 -0
  87. package/dist/viewer-bundle/chunk-UVRE3R6A.js +1039 -0
  88. package/dist/viewer-bundle/chunk-UVRE3R6A.js.map +7 -0
  89. package/dist/viewer-bundle/chunk-VODO7SV4.js +25029 -0
  90. package/dist/viewer-bundle/chunk-VODO7SV4.js.map +7 -0
  91. package/dist/viewer-bundle/chunk-YEU62MVS.js +682 -0
  92. package/dist/viewer-bundle/chunk-YEU62MVS.js.map +7 -0
  93. package/dist/viewer-bundle/chunk-YFQT7PPW.js +987 -0
  94. package/dist/viewer-bundle/chunk-YFQT7PPW.js.map +7 -0
  95. package/dist/viewer-bundle/chunk-Z4G7FG27.js +48 -0
  96. package/dist/viewer-bundle/chunk-Z4G7FG27.js.map +7 -0
  97. package/dist/viewer-bundle/chunk-ZW4Y7DIF.js +2044 -0
  98. package/dist/viewer-bundle/chunk-ZW4Y7DIF.js.map +7 -0
  99. package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js +46 -0
  100. package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js.map +7 -0
  101. package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js +46 -0
  102. package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js.map +7 -0
  103. package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js +5009 -0
  104. package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js.map +7 -0
  105. package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js +739 -0
  106. package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js.map +7 -0
  107. package/dist/viewer-bundle/dark.css +13 -0
  108. package/dist/viewer-bundle/detail.css +539 -0
  109. package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js +214 -0
  110. package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js.map +7 -0
  111. package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js +578 -0
  112. package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js.map +7 -0
  113. package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js +345 -0
  114. package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js.map +7 -0
  115. package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js +255 -0
  116. package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js.map +7 -0
  117. package/dist/viewer-bundle/docs.css +88 -0
  118. package/dist/viewer-bundle/edit-modal-BEGC2AO6.js +176 -0
  119. package/dist/viewer-bundle/edit-modal-BEGC2AO6.js.map +7 -0
  120. package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js +1349 -0
  121. package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js.map +7 -0
  122. package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js +2501 -0
  123. package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js.map +7 -0
  124. package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js +2654 -0
  125. package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js.map +7 -0
  126. package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js +14 -0
  127. package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js.map +7 -0
  128. package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js +1946 -0
  129. package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js.map +7 -0
  130. package/dist/viewer-bundle/index.html +28 -0
  131. package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js +14 -0
  132. package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js.map +7 -0
  133. package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js +59 -0
  134. package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js.map +7 -0
  135. package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js +1012 -0
  136. package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js.map +7 -0
  137. package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js +1303 -0
  138. package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js.map +7 -0
  139. package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js +1131 -0
  140. package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js.map +7 -0
  141. package/dist/viewer-bundle/katex-QN5266ZE.js +14318 -0
  142. package/dist/viewer-bundle/katex-QN5266ZE.js.map +7 -0
  143. package/dist/viewer-bundle/light.css +15 -0
  144. package/dist/viewer-bundle/main.js +4816 -0
  145. package/dist/viewer-bundle/main.js.map +7 -0
  146. package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js +1708 -0
  147. package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js.map +7 -0
  148. package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js +1277 -0
  149. package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js.map +7 -0
  150. package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js +14 -0
  151. package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js.map +7 -0
  152. package/dist/viewer-bundle/pico.classless.min.css +4 -0
  153. package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js +14 -0
  154. package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js.map +7 -0
  155. package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js +238 -0
  156. package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js.map +7 -0
  157. package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js +12 -0
  158. package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js.map +7 -0
  159. package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js +1409 -0
  160. package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js.map +7 -0
  161. package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js +14 -0
  162. package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js.map +7 -0
  163. package/dist/viewer-bundle/reason-modal-MK34MQ73.js +68 -0
  164. package/dist/viewer-bundle/reason-modal-MK34MQ73.js.map +7 -0
  165. package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js +1311 -0
  166. package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js.map +7 -0
  167. package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js +1263 -0
  168. package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js.map +7 -0
  169. package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js +4655 -0
  170. package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js.map +7 -0
  171. package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js +495 -0
  172. package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js.map +7 -0
  173. package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js +44 -0
  174. package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js.map +7 -0
  175. package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js +1646 -0
  176. package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js.map +7 -0
  177. package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js +14 -0
  178. package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js.map +7 -0
  179. package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js +14 -0
  180. package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js.map +7 -0
  181. package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js +2544 -0
  182. package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js.map +7 -0
  183. package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js +14 -0
  184. package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js.map +7 -0
  185. package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js +938 -0
  186. package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js.map +7 -0
  187. package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js +1952 -0
  188. package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js.map +7 -0
  189. package/package.json +51 -0
@@ -0,0 +1,2501 @@
1
+ import {
2
+ JSON_SCHEMA,
3
+ load
4
+ } from "./chunk-RBTT26R4.js";
5
+ import {
6
+ getIconStyles
7
+ } from "./chunk-CIDUOCCG.js";
8
+ import {
9
+ getDiagramElement
10
+ } from "./chunk-JQLVOAQB.js";
11
+ import {
12
+ setupViewPortForSVG
13
+ } from "./chunk-MBFAQ3IK.js";
14
+ import {
15
+ getRegisteredLayoutAlgorithm,
16
+ render
17
+ } from "./chunk-LQMQSYLO.js";
18
+ import "./chunk-OGKINV23.js";
19
+ import {
20
+ isValidShape
21
+ } from "./chunk-BM2KPNFW.js";
22
+ import "./chunk-6LYV7PBV.js";
23
+ import "./chunk-5YJCJF2C.js";
24
+ import "./chunk-NW4YG3NS.js";
25
+ import "./chunk-5PZT7VUU.js";
26
+ import "./chunk-OGMSNDVH.js";
27
+ import {
28
+ createTooltip
29
+ } from "./chunk-AJQJUKMU.js";
30
+ import {
31
+ getEdgeId,
32
+ utils_default
33
+ } from "./chunk-UVRE3R6A.js";
34
+ import "./chunk-G3PPZWPW.js";
35
+ import {
36
+ channel_default,
37
+ clear,
38
+ common_default,
39
+ defaultConfig2,
40
+ getAccDescription,
41
+ getAccTitle,
42
+ getConfig2,
43
+ getDiagramTitle,
44
+ purify,
45
+ rgba_default,
46
+ setAccDescription,
47
+ setAccTitle,
48
+ setConfig2,
49
+ setDiagramTitle
50
+ } from "./chunk-7NZMPQDX.js";
51
+ import "./chunk-YEU62MVS.js";
52
+ import {
53
+ __name,
54
+ log,
55
+ select_default
56
+ } from "./chunk-CZHJHAOR.js";
57
+ import "./chunk-DI52DQAC.js";
58
+
59
+ // ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-DWJPFMVM.mjs
60
+ var MERMAID_DOM_ID_PREFIX = "flowchart-";
61
+ var FlowDB = class {
62
+ // cspell:ignore funs
63
+ constructor() {
64
+ this.vertexCounter = 0;
65
+ this.config = getConfig2();
66
+ this.diagramId = "";
67
+ this.vertices = /* @__PURE__ */ new Map();
68
+ this.edges = [];
69
+ this.classes = /* @__PURE__ */ new Map();
70
+ this.subGraphs = [];
71
+ this.subGraphLookup = /* @__PURE__ */ new Map();
72
+ this.tooltips = /* @__PURE__ */ new Map();
73
+ this.subCount = 0;
74
+ this.firstGraphFlag = true;
75
+ this.secCount = -1;
76
+ this.posCrossRef = [];
77
+ this.funs = [];
78
+ this.setAccTitle = setAccTitle;
79
+ this.setAccDescription = setAccDescription;
80
+ this.setDiagramTitle = setDiagramTitle;
81
+ this.getAccTitle = getAccTitle;
82
+ this.getAccDescription = getAccDescription;
83
+ this.getDiagramTitle = getDiagramTitle;
84
+ this.funs.push(this.setupToolTips.bind(this));
85
+ this.addVertex = this.addVertex.bind(this);
86
+ this.firstGraph = this.firstGraph.bind(this);
87
+ this.setDirection = this.setDirection.bind(this);
88
+ this.addSubGraph = this.addSubGraph.bind(this);
89
+ this.addLink = this.addLink.bind(this);
90
+ this.setLink = this.setLink.bind(this);
91
+ this.updateLink = this.updateLink.bind(this);
92
+ this.addClass = this.addClass.bind(this);
93
+ this.setClass = this.setClass.bind(this);
94
+ this.destructLink = this.destructLink.bind(this);
95
+ this.setClickEvent = this.setClickEvent.bind(this);
96
+ this.setTooltip = this.setTooltip.bind(this);
97
+ this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this);
98
+ this.setClickFun = this.setClickFun.bind(this);
99
+ this.bindFunctions = this.bindFunctions.bind(this);
100
+ this.lex = {
101
+ firstGraph: this.firstGraph.bind(this)
102
+ };
103
+ this.clear();
104
+ this.setGen("gen-2");
105
+ }
106
+ static {
107
+ __name(this, "FlowDB");
108
+ }
109
+ sanitizeText(txt) {
110
+ return common_default.sanitizeText(txt, this.config);
111
+ }
112
+ sanitizeNodeLabelType(labelType) {
113
+ switch (labelType) {
114
+ case "markdown":
115
+ case "string":
116
+ case "text":
117
+ return labelType;
118
+ default:
119
+ return "markdown";
120
+ }
121
+ }
122
+ /**
123
+ * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness
124
+ * across multiple diagrams on the same page.
125
+ */
126
+ setDiagramId(svgElementId) {
127
+ this.diagramId = svgElementId;
128
+ }
129
+ /**
130
+ * Function to lookup domId from id in the graph definition.
131
+ * When diagramId is set, returns the prefixed version for DOM uniqueness.
132
+ *
133
+ * @param id - id of the node
134
+ */
135
+ lookUpDomId(id) {
136
+ for (const vertex of this.vertices.values()) {
137
+ if (vertex.id === id) {
138
+ return this.diagramId ? `${this.diagramId}-${vertex.domId}` : vertex.domId;
139
+ }
140
+ }
141
+ return this.diagramId ? `${this.diagramId}-${id}` : id;
142
+ }
143
+ /**
144
+ * Function called by parser when a node definition has been found
145
+ */
146
+ addVertex(id, textObj, type, style, classes, dir, props = {}, metadata) {
147
+ if (!id || id.trim().length === 0) {
148
+ return;
149
+ }
150
+ let doc;
151
+ if (metadata !== void 0) {
152
+ let yamlData;
153
+ if (!metadata.includes("\n")) {
154
+ yamlData = "{\n" + metadata + "\n}";
155
+ } else {
156
+ yamlData = metadata + "\n";
157
+ }
158
+ doc = load(yamlData, { schema: JSON_SCHEMA });
159
+ }
160
+ const edge = this.edges.find((e) => e.id === id);
161
+ if (edge) {
162
+ const edgeDoc = doc;
163
+ if (edgeDoc?.animate !== void 0) {
164
+ edge.animate = edgeDoc.animate;
165
+ }
166
+ if (edgeDoc?.animation !== void 0) {
167
+ edge.animation = edgeDoc.animation;
168
+ }
169
+ if (edgeDoc?.curve !== void 0) {
170
+ edge.interpolate = edgeDoc.curve;
171
+ }
172
+ return;
173
+ }
174
+ let txt;
175
+ let vertex = this.vertices.get(id);
176
+ if (vertex === void 0) {
177
+ if (textObj === void 0 && type === void 0 && style !== void 0 && style !== null) {
178
+ log.warn(
179
+ `Style applied to unknown node "${id}". This may indicate a typo. The node will be created automatically.`
180
+ );
181
+ }
182
+ vertex = {
183
+ id,
184
+ labelType: "text",
185
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + this.vertexCounter,
186
+ styles: [],
187
+ classes: []
188
+ };
189
+ this.vertices.set(id, vertex);
190
+ }
191
+ this.vertexCounter++;
192
+ if (textObj !== void 0) {
193
+ this.config = getConfig2();
194
+ txt = this.sanitizeText(textObj.text.trim());
195
+ vertex.labelType = textObj.type;
196
+ if (txt.startsWith('"') && txt.endsWith('"')) {
197
+ txt = txt.substring(1, txt.length - 1);
198
+ }
199
+ vertex.text = txt;
200
+ } else {
201
+ if (vertex.text === void 0) {
202
+ vertex.text = id;
203
+ }
204
+ }
205
+ if (type !== void 0) {
206
+ vertex.type = type;
207
+ }
208
+ if (style !== void 0 && style !== null) {
209
+ style.forEach((s) => {
210
+ vertex.styles.push(s);
211
+ });
212
+ }
213
+ if (classes !== void 0 && classes !== null) {
214
+ classes.forEach((s) => {
215
+ vertex.classes.push(s);
216
+ });
217
+ }
218
+ if (dir !== void 0) {
219
+ vertex.dir = dir;
220
+ }
221
+ if (vertex.props === void 0) {
222
+ vertex.props = props;
223
+ } else if (props !== void 0) {
224
+ Object.assign(vertex.props, props);
225
+ }
226
+ if (doc !== void 0) {
227
+ if (doc.shape) {
228
+ if (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes("_")) {
229
+ throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
230
+ } else if (!isValidShape(doc.shape)) {
231
+ throw new Error(`No such shape: ${doc.shape}.`);
232
+ }
233
+ vertex.type = doc?.shape;
234
+ }
235
+ if (doc?.label) {
236
+ vertex.text = doc?.label;
237
+ vertex.labelType = this.sanitizeNodeLabelType(doc?.labelType);
238
+ }
239
+ if (doc?.icon) {
240
+ vertex.icon = doc?.icon;
241
+ if (!doc.label?.trim() && vertex.text === id) {
242
+ vertex.text = "";
243
+ }
244
+ }
245
+ if (doc?.form) {
246
+ vertex.form = doc?.form;
247
+ }
248
+ if (doc?.pos) {
249
+ vertex.pos = doc?.pos;
250
+ }
251
+ if (doc?.img) {
252
+ vertex.img = doc?.img;
253
+ if (!doc.label?.trim() && vertex.text === id) {
254
+ vertex.text = "";
255
+ }
256
+ }
257
+ if (doc?.constraint) {
258
+ vertex.constraint = doc.constraint;
259
+ }
260
+ if (doc.w) {
261
+ vertex.assetWidth = Number(doc.w);
262
+ }
263
+ if (doc.h) {
264
+ vertex.assetHeight = Number(doc.h);
265
+ }
266
+ }
267
+ }
268
+ /**
269
+ * Function called by parser when a link/edge definition has been found
270
+ *
271
+ */
272
+ addSingleLink(_start, _end, type, id) {
273
+ const start = _start;
274
+ const end = _end;
275
+ const edge = {
276
+ start,
277
+ end,
278
+ type: void 0,
279
+ text: "",
280
+ labelType: "text",
281
+ classes: [],
282
+ isUserDefinedId: false,
283
+ interpolate: this.edges.defaultInterpolate
284
+ };
285
+ log.info("abc78 Got edge...", edge);
286
+ const linkTextObj = type.text;
287
+ if (linkTextObj !== void 0) {
288
+ edge.text = this.sanitizeText(linkTextObj.text.trim());
289
+ if (edge.text.startsWith('"') && edge.text.endsWith('"')) {
290
+ edge.text = edge.text.substring(1, edge.text.length - 1);
291
+ }
292
+ edge.labelType = this.sanitizeNodeLabelType(linkTextObj.type);
293
+ }
294
+ if (type !== void 0) {
295
+ edge.type = type.type;
296
+ edge.stroke = type.stroke;
297
+ edge.length = type.length > 10 ? 10 : type.length;
298
+ }
299
+ if (id && !this.edges.some((e) => e.id === id)) {
300
+ edge.id = id;
301
+ edge.isUserDefinedId = true;
302
+ } else {
303
+ const existingLinks = this.edges.filter((e) => e.start === edge.start && e.end === edge.end);
304
+ if (existingLinks.length === 0) {
305
+ edge.id = getEdgeId(edge.start, edge.end, { counter: 0, prefix: "L" });
306
+ } else {
307
+ edge.id = getEdgeId(edge.start, edge.end, {
308
+ counter: existingLinks.length + 1,
309
+ prefix: "L"
310
+ });
311
+ }
312
+ }
313
+ if (this.edges.length < (this.config.maxEdges ?? 500)) {
314
+ log.info("Pushing edge...");
315
+ this.edges.push(edge);
316
+ } else {
317
+ throw new Error(
318
+ `Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
319
+
320
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
321
+ You cannot set this config via configuration inside the diagram as it is a secure config.
322
+ You have to call mermaid.initialize.`
323
+ );
324
+ }
325
+ }
326
+ isLinkData(value) {
327
+ return value !== null && typeof value === "object" && "id" in value && typeof value.id === "string";
328
+ }
329
+ addLink(_start, _end, linkData) {
330
+ const id = this.isLinkData(linkData) ? linkData.id.replace("@", "") : void 0;
331
+ log.info("addLink", _start, _end, id);
332
+ for (const start of _start) {
333
+ for (const end of _end) {
334
+ const isLastStart = start === _start[_start.length - 1];
335
+ const isFirstEnd = end === _end[0];
336
+ if (isLastStart && isFirstEnd) {
337
+ this.addSingleLink(start, end, linkData, id);
338
+ } else {
339
+ this.addSingleLink(start, end, linkData, void 0);
340
+ }
341
+ }
342
+ }
343
+ }
344
+ /**
345
+ * Updates a link's line interpolation algorithm
346
+ */
347
+ updateLinkInterpolate(positions, interpolate) {
348
+ positions.forEach((pos) => {
349
+ if (pos === "default") {
350
+ this.edges.defaultInterpolate = interpolate;
351
+ } else {
352
+ this.edges[pos].interpolate = interpolate;
353
+ }
354
+ });
355
+ }
356
+ /**
357
+ * Updates a link with a style
358
+ *
359
+ */
360
+ updateLink(positions, style) {
361
+ positions.forEach((pos) => {
362
+ if (typeof pos === "number" && pos >= this.edges.length) {
363
+ throw new Error(
364
+ `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.)`
365
+ );
366
+ }
367
+ if (pos === "default") {
368
+ this.edges.defaultStyle = style;
369
+ } else {
370
+ this.edges[pos].style = style;
371
+ if ((this.edges[pos]?.style?.length ?? 0) > 0 && !this.edges[pos]?.style?.some((s) => s?.startsWith("fill"))) {
372
+ this.edges[pos]?.style?.push("fill:none");
373
+ }
374
+ }
375
+ });
376
+ }
377
+ addClass(ids, _style) {
378
+ const style = _style.join().replace(/\\,/g, "\xA7\xA7\xA7").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
379
+ ids.split(",").forEach((id) => {
380
+ let classNode = this.classes.get(id);
381
+ if (classNode === void 0) {
382
+ classNode = { id, styles: [], textStyles: [] };
383
+ this.classes.set(id, classNode);
384
+ }
385
+ if (style !== void 0 && style !== null) {
386
+ style.forEach((s) => {
387
+ if (/color/.exec(s)) {
388
+ const newStyle = s.replace("fill", "bgFill");
389
+ classNode.textStyles.push(newStyle);
390
+ }
391
+ classNode.styles.push(s);
392
+ });
393
+ }
394
+ });
395
+ }
396
+ /**
397
+ * Called by parser when a graph definition is found, stores the direction of the chart.
398
+ *
399
+ */
400
+ setDirection(dir) {
401
+ this.direction = dir.trim();
402
+ if (/.*</.exec(this.direction)) {
403
+ this.direction = "RL";
404
+ }
405
+ if (/.*\^/.exec(this.direction)) {
406
+ this.direction = "BT";
407
+ }
408
+ if (/.*>/.exec(this.direction)) {
409
+ this.direction = "LR";
410
+ }
411
+ if (/.*v/.exec(this.direction)) {
412
+ this.direction = "TB";
413
+ }
414
+ if (this.direction === "TD") {
415
+ this.direction = "TB";
416
+ }
417
+ }
418
+ /**
419
+ * Called by parser when a special node is found, e.g. a clickable element.
420
+ *
421
+ * @param ids - Comma separated list of ids
422
+ * @param className - Class to add
423
+ */
424
+ setClass(ids, className) {
425
+ for (const id of ids.split(",")) {
426
+ const vertex = this.vertices.get(id);
427
+ if (vertex) {
428
+ vertex.classes.push(className);
429
+ }
430
+ const edge = this.edges.find((e) => e.id === id);
431
+ if (edge) {
432
+ edge.classes.push(className);
433
+ }
434
+ const subGraph = this.subGraphLookup.get(id);
435
+ if (subGraph) {
436
+ subGraph.classes.push(className);
437
+ }
438
+ }
439
+ }
440
+ setTooltip(ids, tooltip) {
441
+ if (tooltip === void 0) {
442
+ return;
443
+ }
444
+ tooltip = this.sanitizeText(tooltip);
445
+ for (const id of ids.split(",")) {
446
+ this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(id) : id, tooltip);
447
+ }
448
+ }
449
+ setClickFun(id, functionName, functionArgs) {
450
+ if (getConfig2().securityLevel !== "loose") {
451
+ return;
452
+ }
453
+ if (functionName === void 0) {
454
+ return;
455
+ }
456
+ let argList = [];
457
+ if (typeof functionArgs === "string") {
458
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
459
+ for (let i = 0; i < argList.length; i++) {
460
+ let item = argList[i].trim();
461
+ if (item.startsWith('"') && item.endsWith('"')) {
462
+ item = item.substr(1, item.length - 2);
463
+ }
464
+ argList[i] = item;
465
+ }
466
+ }
467
+ if (argList.length === 0) {
468
+ argList.push(id);
469
+ }
470
+ const vertex = this.vertices.get(id);
471
+ if (vertex) {
472
+ vertex.haveCallback = true;
473
+ this.funs.push(() => {
474
+ const domId = this.lookUpDomId(id);
475
+ const elem = document.querySelector(`[id="${domId}"]`);
476
+ if (elem !== null) {
477
+ elem.addEventListener(
478
+ "click",
479
+ () => {
480
+ utils_default.runFunc(functionName, ...argList);
481
+ },
482
+ false
483
+ );
484
+ }
485
+ });
486
+ }
487
+ }
488
+ /**
489
+ * Called by parser when a link is found. Adds the URL to the vertex data.
490
+ *
491
+ * @param ids - Comma separated list of ids
492
+ * @param linkStr - URL to create a link for
493
+ * @param target - Target attribute for the link
494
+ */
495
+ setLink(ids, linkStr, target) {
496
+ ids.split(",").forEach((id) => {
497
+ const vertex = this.vertices.get(id);
498
+ if (vertex !== void 0) {
499
+ vertex.link = utils_default.formatUrl(linkStr, this.config);
500
+ vertex.linkTarget = target;
501
+ }
502
+ });
503
+ this.setClass(ids, "clickable");
504
+ }
505
+ getTooltip(id) {
506
+ return this.tooltips.get(id);
507
+ }
508
+ /**
509
+ * Called by parser when a click definition is found. Registers an event handler.
510
+ *
511
+ * @param ids - Comma separated list of ids
512
+ * @param functionName - Function to be called on click
513
+ * @param functionArgs - Arguments to be passed to the function
514
+ */
515
+ setClickEvent(ids, functionName, functionArgs) {
516
+ ids.split(",").forEach((id) => {
517
+ this.setClickFun(id, functionName, functionArgs);
518
+ });
519
+ this.setClass(ids, "clickable");
520
+ }
521
+ bindFunctions(element) {
522
+ this.funs.forEach((fun) => {
523
+ fun(element);
524
+ });
525
+ }
526
+ getDirection() {
527
+ return this.direction?.trim();
528
+ }
529
+ /**
530
+ * Retrieval function for fetching the found nodes after parsing has completed.
531
+ *
532
+ */
533
+ getVertices() {
534
+ return this.vertices;
535
+ }
536
+ /**
537
+ * Retrieval function for fetching the found links after parsing has completed.
538
+ *
539
+ */
540
+ getEdges() {
541
+ return this.edges;
542
+ }
543
+ /**
544
+ * Retrieval function for fetching the found class definitions after parsing has completed.
545
+ *
546
+ */
547
+ getClasses() {
548
+ return this.classes;
549
+ }
550
+ setupToolTips(element) {
551
+ const tooltipElem = createTooltip();
552
+ const svg = select_default(element).select("svg");
553
+ const nodes = svg.selectAll("g.node");
554
+ nodes.on("mouseover", (e) => {
555
+ const el = select_default(e.currentTarget);
556
+ const title = el.attr("title");
557
+ if (title === null) {
558
+ return;
559
+ }
560
+ const rect = e.currentTarget?.getBoundingClientRect();
561
+ tooltipElem.transition().duration(200).style("opacity", ".9");
562
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
563
+ tooltipElem.html(purify.sanitize(title));
564
+ el.classed("hover", true);
565
+ }).on("mouseout", (e) => {
566
+ tooltipElem.transition().duration(500).style("opacity", 0);
567
+ const el = select_default(e.currentTarget);
568
+ el.classed("hover", false);
569
+ });
570
+ }
571
+ /**
572
+ * Clears the internal graph db so that a new graph can be parsed.
573
+ *
574
+ */
575
+ clear(ver = "gen-2") {
576
+ this.vertices = /* @__PURE__ */ new Map();
577
+ this.classes = /* @__PURE__ */ new Map();
578
+ this.edges = [];
579
+ this.funs = [this.setupToolTips.bind(this)];
580
+ this.diagramId = "";
581
+ this.subGraphs = [];
582
+ this.subGraphLookup = /* @__PURE__ */ new Map();
583
+ this.subCount = 0;
584
+ this.tooltips = /* @__PURE__ */ new Map();
585
+ this.firstGraphFlag = true;
586
+ this.version = ver;
587
+ this.config = getConfig2();
588
+ clear();
589
+ }
590
+ setGen(ver) {
591
+ this.version = ver || "gen-2";
592
+ }
593
+ defaultStyle() {
594
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
595
+ }
596
+ addSubGraph(_id, list, _title) {
597
+ let id = _id.text.trim();
598
+ let title = _title.text;
599
+ if (_id === _title && /\s/.exec(_title.text)) {
600
+ id = void 0;
601
+ }
602
+ const uniq = /* @__PURE__ */ __name((a) => {
603
+ const prims = { boolean: {}, number: {}, string: {} };
604
+ const objs = [];
605
+ let dir2;
606
+ const nodeList2 = a.filter(function(item) {
607
+ const type = typeof item;
608
+ if (item.stmt && item.stmt === "dir") {
609
+ dir2 = item.value;
610
+ return false;
611
+ }
612
+ if (item.trim() === "") {
613
+ return false;
614
+ }
615
+ if (type in prims) {
616
+ return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
617
+ } else {
618
+ return objs.includes(item) ? false : objs.push(item);
619
+ }
620
+ });
621
+ return { nodeList: nodeList2, dir: dir2 };
622
+ }, "uniq");
623
+ const result = uniq(list.flat());
624
+ const nodeList = result.nodeList;
625
+ let dir = result.dir;
626
+ const flowchartConfig = getConfig2().flowchart ?? {};
627
+ dir = dir ?? (flowchartConfig.inheritDir ? this.getDirection() ?? getConfig2().direction ?? void 0 : void 0);
628
+ if (this.version === "gen-1") {
629
+ for (let i = 0; i < nodeList.length; i++) {
630
+ nodeList[i] = this.lookUpDomId(nodeList[i]);
631
+ }
632
+ }
633
+ id = id ?? "subGraph" + this.subCount;
634
+ title = title || "";
635
+ title = this.sanitizeText(title);
636
+ this.subCount = this.subCount + 1;
637
+ const subGraph = {
638
+ id,
639
+ nodes: nodeList,
640
+ title: title.trim(),
641
+ classes: [],
642
+ dir,
643
+ labelType: this.sanitizeNodeLabelType(_title?.type)
644
+ };
645
+ log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir);
646
+ subGraph.nodes = this.makeUniq(subGraph, this.subGraphs).nodes;
647
+ this.subGraphs.push(subGraph);
648
+ this.subGraphLookup.set(id, subGraph);
649
+ return id;
650
+ }
651
+ getPosForId(id) {
652
+ for (const [i, subGraph] of this.subGraphs.entries()) {
653
+ if (subGraph.id === id) {
654
+ return i;
655
+ }
656
+ }
657
+ return -1;
658
+ }
659
+ indexNodes2(id, pos) {
660
+ const nodes = this.subGraphs[pos].nodes;
661
+ this.secCount = this.secCount + 1;
662
+ if (this.secCount > 2e3) {
663
+ return {
664
+ result: false,
665
+ count: 0
666
+ };
667
+ }
668
+ this.posCrossRef[this.secCount] = pos;
669
+ if (this.subGraphs[pos].id === id) {
670
+ return {
671
+ result: true,
672
+ count: 0
673
+ };
674
+ }
675
+ let count = 0;
676
+ let posCount = 1;
677
+ while (count < nodes.length) {
678
+ const childPos = this.getPosForId(nodes[count]);
679
+ if (childPos >= 0) {
680
+ const res = this.indexNodes2(id, childPos);
681
+ if (res.result) {
682
+ return {
683
+ result: true,
684
+ count: posCount + res.count
685
+ };
686
+ } else {
687
+ posCount = posCount + res.count;
688
+ }
689
+ }
690
+ count = count + 1;
691
+ }
692
+ return {
693
+ result: false,
694
+ count: posCount
695
+ };
696
+ }
697
+ getDepthFirstPos(pos) {
698
+ return this.posCrossRef[pos];
699
+ }
700
+ indexNodes() {
701
+ this.secCount = -1;
702
+ if (this.subGraphs.length > 0) {
703
+ this.indexNodes2("none", this.subGraphs.length - 1);
704
+ }
705
+ }
706
+ getSubGraphs() {
707
+ return this.subGraphs;
708
+ }
709
+ firstGraph() {
710
+ if (this.firstGraphFlag) {
711
+ this.firstGraphFlag = false;
712
+ return true;
713
+ }
714
+ return false;
715
+ }
716
+ destructStartLink(_str) {
717
+ let str = _str.trim();
718
+ let type = "arrow_open";
719
+ switch (str[0]) {
720
+ case "<":
721
+ type = "arrow_point";
722
+ str = str.slice(1);
723
+ break;
724
+ case "x":
725
+ type = "arrow_cross";
726
+ str = str.slice(1);
727
+ break;
728
+ case "o":
729
+ type = "arrow_circle";
730
+ str = str.slice(1);
731
+ break;
732
+ }
733
+ let stroke = "normal";
734
+ if (str.includes("=")) {
735
+ stroke = "thick";
736
+ }
737
+ if (str.includes(".")) {
738
+ stroke = "dotted";
739
+ }
740
+ return { type, stroke };
741
+ }
742
+ countChar(char, str) {
743
+ const length = str.length;
744
+ let count = 0;
745
+ for (let i = 0; i < length; ++i) {
746
+ if (str[i] === char) {
747
+ ++count;
748
+ }
749
+ }
750
+ return count;
751
+ }
752
+ destructEndLink(_str) {
753
+ const str = _str.trim();
754
+ let line = str.slice(0, -1);
755
+ let type = "arrow_open";
756
+ switch (str.slice(-1)) {
757
+ case "x":
758
+ type = "arrow_cross";
759
+ if (str.startsWith("x")) {
760
+ type = "double_" + type;
761
+ line = line.slice(1);
762
+ }
763
+ break;
764
+ case ">":
765
+ type = "arrow_point";
766
+ if (str.startsWith("<")) {
767
+ type = "double_" + type;
768
+ line = line.slice(1);
769
+ }
770
+ break;
771
+ case "o":
772
+ type = "arrow_circle";
773
+ if (str.startsWith("o")) {
774
+ type = "double_" + type;
775
+ line = line.slice(1);
776
+ }
777
+ break;
778
+ }
779
+ let stroke = "normal";
780
+ let length = line.length - 1;
781
+ if (line.startsWith("=")) {
782
+ stroke = "thick";
783
+ }
784
+ if (line.startsWith("~")) {
785
+ stroke = "invisible";
786
+ }
787
+ const dots = this.countChar(".", line);
788
+ if (dots) {
789
+ stroke = "dotted";
790
+ length = dots;
791
+ }
792
+ return { type, stroke, length };
793
+ }
794
+ destructLink(_str, _startStr) {
795
+ const info = this.destructEndLink(_str);
796
+ let startInfo;
797
+ if (_startStr) {
798
+ startInfo = this.destructStartLink(_startStr);
799
+ if (startInfo.stroke !== info.stroke) {
800
+ return { type: "INVALID", stroke: "INVALID" };
801
+ }
802
+ if (startInfo.type === "arrow_open") {
803
+ startInfo.type = info.type;
804
+ } else {
805
+ if (startInfo.type !== info.type) {
806
+ return { type: "INVALID", stroke: "INVALID" };
807
+ }
808
+ startInfo.type = "double_" + startInfo.type;
809
+ }
810
+ if (startInfo.type === "double_arrow") {
811
+ startInfo.type = "double_arrow_point";
812
+ }
813
+ startInfo.length = info.length;
814
+ return startInfo;
815
+ }
816
+ return info;
817
+ }
818
+ // Todo optimizer this by caching existing nodes
819
+ exists(allSgs, _id) {
820
+ for (const sg of allSgs) {
821
+ if (sg.nodes.includes(_id)) {
822
+ return true;
823
+ }
824
+ }
825
+ return false;
826
+ }
827
+ /**
828
+ * Deletes an id from all subgraphs
829
+ *
830
+ */
831
+ makeUniq(sg, allSubgraphs) {
832
+ const res = [];
833
+ sg.nodes.forEach((_id, pos) => {
834
+ if (!this.exists(allSubgraphs, _id)) {
835
+ res.push(sg.nodes[pos]);
836
+ }
837
+ });
838
+ return { nodes: res };
839
+ }
840
+ getTypeFromVertex(vertex) {
841
+ if (vertex.img) {
842
+ return "imageSquare";
843
+ }
844
+ if (vertex.icon) {
845
+ if (vertex.form === "circle") {
846
+ return "iconCircle";
847
+ }
848
+ if (vertex.form === "square") {
849
+ return "iconSquare";
850
+ }
851
+ if (vertex.form === "rounded") {
852
+ return "iconRounded";
853
+ }
854
+ return "icon";
855
+ }
856
+ switch (vertex.type) {
857
+ case "square":
858
+ case void 0:
859
+ return "squareRect";
860
+ case "round":
861
+ return "roundedRect";
862
+ case "ellipse":
863
+ return "ellipse";
864
+ default:
865
+ return vertex.type;
866
+ }
867
+ }
868
+ findNode(nodes, id) {
869
+ return nodes.find((node) => node.id === id);
870
+ }
871
+ destructEdgeType(type) {
872
+ let arrowTypeStart = "none";
873
+ let arrowTypeEnd = "arrow_point";
874
+ switch (type) {
875
+ case "arrow_point":
876
+ case "arrow_circle":
877
+ case "arrow_cross":
878
+ arrowTypeEnd = type;
879
+ break;
880
+ case "double_arrow_point":
881
+ case "double_arrow_circle":
882
+ case "double_arrow_cross":
883
+ arrowTypeStart = type.replace("double_", "");
884
+ arrowTypeEnd = arrowTypeStart;
885
+ break;
886
+ }
887
+ return { arrowTypeStart, arrowTypeEnd };
888
+ }
889
+ addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, look) {
890
+ const parentId = parentDB.get(vertex.id);
891
+ const isGroup = subGraphDB.get(vertex.id) ?? false;
892
+ const node = this.findNode(nodes, vertex.id);
893
+ if (node) {
894
+ node.cssStyles = vertex.styles;
895
+ node.cssCompiledStyles = this.getCompiledStyles(vertex.classes);
896
+ node.cssClasses = vertex.classes.join(" ");
897
+ } else {
898
+ const baseNode = {
899
+ id: vertex.id,
900
+ label: vertex.text,
901
+ labelType: vertex.labelType,
902
+ labelStyle: "",
903
+ parentId,
904
+ padding: config.flowchart?.padding || 8,
905
+ cssStyles: vertex.styles,
906
+ cssCompiledStyles: this.getCompiledStyles(["default", "node", ...vertex.classes]),
907
+ cssClasses: "default " + vertex.classes.join(" "),
908
+ dir: vertex.dir,
909
+ domId: vertex.domId,
910
+ look,
911
+ link: vertex.link,
912
+ linkTarget: vertex.linkTarget,
913
+ tooltip: this.getTooltip(vertex.id),
914
+ icon: vertex.icon,
915
+ pos: vertex.pos,
916
+ img: vertex.img,
917
+ assetWidth: vertex.assetWidth,
918
+ assetHeight: vertex.assetHeight,
919
+ constraint: vertex.constraint
920
+ };
921
+ if (isGroup) {
922
+ nodes.push({
923
+ ...baseNode,
924
+ isGroup: true,
925
+ shape: "rect"
926
+ });
927
+ } else {
928
+ nodes.push({
929
+ ...baseNode,
930
+ isGroup: false,
931
+ shape: this.getTypeFromVertex(vertex)
932
+ });
933
+ }
934
+ }
935
+ }
936
+ getCompiledStyles(classDefs) {
937
+ let compiledStyles = [];
938
+ for (const customClass of classDefs) {
939
+ const cssClass = this.classes.get(customClass);
940
+ if (cssClass?.styles) {
941
+ compiledStyles = [...compiledStyles, ...cssClass.styles ?? []].map((s) => s.trim());
942
+ }
943
+ if (cssClass?.textStyles) {
944
+ compiledStyles = [...compiledStyles, ...cssClass.textStyles ?? []].map((s) => s.trim());
945
+ }
946
+ }
947
+ return compiledStyles;
948
+ }
949
+ getData() {
950
+ const config = getConfig2();
951
+ const nodes = [];
952
+ const edges = [];
953
+ const subGraphs = this.getSubGraphs();
954
+ const parentDB = /* @__PURE__ */ new Map();
955
+ const subGraphDB = /* @__PURE__ */ new Map();
956
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
957
+ const subGraph = subGraphs[i];
958
+ if (subGraph.nodes.length > 0) {
959
+ subGraphDB.set(subGraph.id, true);
960
+ }
961
+ for (const id of subGraph.nodes) {
962
+ parentDB.set(id, subGraph.id);
963
+ }
964
+ }
965
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
966
+ const subGraph = subGraphs[i];
967
+ nodes.push({
968
+ id: subGraph.id,
969
+ label: subGraph.title,
970
+ labelStyle: "",
971
+ labelType: subGraph.labelType,
972
+ parentId: parentDB.get(subGraph.id),
973
+ padding: 8,
974
+ cssCompiledStyles: this.getCompiledStyles(subGraph.classes),
975
+ cssClasses: subGraph.classes.join(" "),
976
+ shape: "rect",
977
+ dir: subGraph.dir,
978
+ isGroup: true,
979
+ look: config.look
980
+ });
981
+ }
982
+ const n = this.getVertices();
983
+ n.forEach((vertex) => {
984
+ this.addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || "classic");
985
+ });
986
+ const e = this.getEdges();
987
+ e.forEach((rawEdge, index) => {
988
+ const { arrowTypeStart, arrowTypeEnd } = this.destructEdgeType(rawEdge.type);
989
+ const styles = [...e.defaultStyle ?? []];
990
+ if (rawEdge.style) {
991
+ styles.push(...rawEdge.style);
992
+ }
993
+ const edge = {
994
+ id: getEdgeId(rawEdge.start, rawEdge.end, { counter: index, prefix: "L" }, rawEdge.id),
995
+ isUserDefinedId: rawEdge.isUserDefinedId,
996
+ start: rawEdge.start,
997
+ end: rawEdge.end,
998
+ type: rawEdge.type ?? "normal",
999
+ label: rawEdge.text,
1000
+ labelType: rawEdge.labelType,
1001
+ labelpos: "c",
1002
+ thickness: rawEdge.stroke,
1003
+ minlen: rawEdge.length,
1004
+ classes: rawEdge?.stroke === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
1005
+ arrowTypeStart: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeStart,
1006
+ arrowTypeEnd: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeEnd,
1007
+ arrowheadStyle: "fill: #333",
1008
+ cssCompiledStyles: this.getCompiledStyles(rawEdge.classes),
1009
+ labelStyle: styles,
1010
+ style: styles,
1011
+ pattern: rawEdge.stroke,
1012
+ look: config.look,
1013
+ animate: rawEdge.animate,
1014
+ animation: rawEdge.animation,
1015
+ curve: rawEdge.interpolate || this.edges.defaultInterpolate || config.flowchart?.curve
1016
+ };
1017
+ edges.push(edge);
1018
+ });
1019
+ return { nodes, edges, other: {}, config };
1020
+ }
1021
+ defaultConfig() {
1022
+ return defaultConfig2.flowchart;
1023
+ }
1024
+ };
1025
+ var getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {
1026
+ return diagramObj.db.getClasses();
1027
+ }, "getClasses");
1028
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
1029
+ log.info("REF0:");
1030
+ log.info("Drawing state diagram (v2)", id);
1031
+ const { securityLevel, flowchart: conf, layout } = getConfig2();
1032
+ diag.db.setDiagramId(id);
1033
+ log.debug("Before getData: ");
1034
+ const data4Layout = diag.db.getData();
1035
+ log.debug("Data: ", data4Layout);
1036
+ const svg = getDiagramElement(id, securityLevel);
1037
+ const direction = diag.db.getDirection();
1038
+ data4Layout.type = diag.type;
1039
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
1040
+ if (data4Layout.layoutAlgorithm === "dagre" && layout === "elk") {
1041
+ log.warn(
1042
+ "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."
1043
+ );
1044
+ }
1045
+ data4Layout.direction = direction;
1046
+ data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
1047
+ data4Layout.rankSpacing = conf?.rankSpacing || 50;
1048
+ data4Layout.markers = ["point", "circle", "cross"];
1049
+ data4Layout.diagramId = id;
1050
+ log.debug("REF1:", data4Layout);
1051
+ await render(data4Layout, svg);
1052
+ const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;
1053
+ utils_default.insertTitle(
1054
+ svg,
1055
+ "flowchartTitleText",
1056
+ conf?.titleTopMargin || 0,
1057
+ diag.db.getDiagramTitle()
1058
+ );
1059
+ setupViewPortForSVG(svg, padding, "flowchart", conf?.useMaxWidth || false);
1060
+ }, "draw");
1061
+ var flowRenderer_v3_unified_default = {
1062
+ getClasses,
1063
+ draw
1064
+ };
1065
+ var parser = function() {
1066
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
1067
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
1068
+ return o2;
1069
+ }, "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];
1070
+ var parser2 = {
1071
+ trace: /* @__PURE__ */ __name(function trace() {
1072
+ }, "trace"),
1073
+ yy: {},
1074
+ 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 },
1075
+ 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" },
1076
+ 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]],
1077
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1078
+ var $0 = $$.length - 1;
1079
+ switch (yystate) {
1080
+ case 2:
1081
+ this.$ = [];
1082
+ break;
1083
+ case 3:
1084
+ if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
1085
+ $$[$0 - 1].push($$[$0]);
1086
+ }
1087
+ this.$ = $$[$0 - 1];
1088
+ break;
1089
+ case 4:
1090
+ case 183:
1091
+ this.$ = $$[$0];
1092
+ break;
1093
+ case 11:
1094
+ yy.setDirection("TB");
1095
+ this.$ = "TB";
1096
+ break;
1097
+ case 12:
1098
+ yy.setDirection($$[$0 - 1]);
1099
+ this.$ = $$[$0 - 1];
1100
+ break;
1101
+ case 27:
1102
+ this.$ = $$[$0 - 1].nodes;
1103
+ break;
1104
+ case 28:
1105
+ case 29:
1106
+ case 30:
1107
+ case 31:
1108
+ case 32:
1109
+ this.$ = [];
1110
+ break;
1111
+ case 33:
1112
+ this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
1113
+ break;
1114
+ case 34:
1115
+ this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
1116
+ break;
1117
+ case 35:
1118
+ this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
1119
+ break;
1120
+ case 37:
1121
+ this.$ = $$[$0].trim();
1122
+ yy.setAccTitle(this.$);
1123
+ break;
1124
+ case 38:
1125
+ case 39:
1126
+ this.$ = $$[$0].trim();
1127
+ yy.setAccDescription(this.$);
1128
+ break;
1129
+ case 43:
1130
+ this.$ = $$[$0 - 1] + $$[$0];
1131
+ break;
1132
+ case 44:
1133
+ this.$ = $$[$0];
1134
+ break;
1135
+ case 45:
1136
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1137
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1138
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1139
+ break;
1140
+ case 46:
1141
+ yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
1142
+ this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
1143
+ break;
1144
+ case 47:
1145
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1146
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1147
+ break;
1148
+ case 48:
1149
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
1150
+ break;
1151
+ case 49:
1152
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1153
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1], shapeData: $$[$0] };
1154
+ break;
1155
+ case 50:
1156
+ this.$ = { stmt: $$[$0], nodes: $$[$0] };
1157
+ break;
1158
+ case 51:
1159
+ this.$ = [$$[$0]];
1160
+ break;
1161
+ case 52:
1162
+ yy.addVertex($$[$0 - 5][$$[$0 - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0 - 4]);
1163
+ this.$ = $$[$0 - 5].concat($$[$0]);
1164
+ break;
1165
+ case 53:
1166
+ this.$ = $$[$0 - 4].concat($$[$0]);
1167
+ break;
1168
+ case 54:
1169
+ this.$ = $$[$0];
1170
+ break;
1171
+ case 55:
1172
+ this.$ = $$[$0 - 2];
1173
+ yy.setClass($$[$0 - 2], $$[$0]);
1174
+ break;
1175
+ case 56:
1176
+ this.$ = $$[$0 - 3];
1177
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
1178
+ break;
1179
+ case 57:
1180
+ this.$ = $$[$0 - 3];
1181
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
1182
+ break;
1183
+ case 58:
1184
+ this.$ = $$[$0 - 5];
1185
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
1186
+ break;
1187
+ case 59:
1188
+ this.$ = $$[$0 - 3];
1189
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
1190
+ break;
1191
+ case 60:
1192
+ this.$ = $$[$0 - 3];
1193
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
1194
+ break;
1195
+ case 61:
1196
+ this.$ = $$[$0 - 3];
1197
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
1198
+ break;
1199
+ case 62:
1200
+ this.$ = $$[$0 - 7];
1201
+ yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
1202
+ break;
1203
+ case 63:
1204
+ this.$ = $$[$0 - 3];
1205
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
1206
+ break;
1207
+ case 64:
1208
+ this.$ = $$[$0 - 3];
1209
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
1210
+ break;
1211
+ case 65:
1212
+ this.$ = $$[$0 - 3];
1213
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
1214
+ break;
1215
+ case 66:
1216
+ this.$ = $$[$0 - 5];
1217
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
1218
+ break;
1219
+ case 67:
1220
+ this.$ = $$[$0 - 3];
1221
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
1222
+ break;
1223
+ case 68:
1224
+ this.$ = $$[$0 - 3];
1225
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
1226
+ break;
1227
+ case 69:
1228
+ this.$ = $$[$0 - 3];
1229
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
1230
+ break;
1231
+ case 70:
1232
+ this.$ = $$[$0 - 3];
1233
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
1234
+ break;
1235
+ case 71:
1236
+ this.$ = $$[$0 - 3];
1237
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
1238
+ break;
1239
+ case 72:
1240
+ this.$ = $$[$0];
1241
+ yy.addVertex($$[$0]);
1242
+ break;
1243
+ case 73:
1244
+ $$[$0 - 1].text = $$[$0];
1245
+ this.$ = $$[$0 - 1];
1246
+ break;
1247
+ case 74:
1248
+ case 75:
1249
+ $$[$0 - 2].text = $$[$0 - 1];
1250
+ this.$ = $$[$0 - 2];
1251
+ break;
1252
+ case 76:
1253
+ this.$ = $$[$0];
1254
+ break;
1255
+ case 77:
1256
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1257
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
1258
+ break;
1259
+ case 78:
1260
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1261
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1], "id": $$[$0 - 3] };
1262
+ break;
1263
+ case 79:
1264
+ this.$ = { text: $$[$0], type: "text" };
1265
+ break;
1266
+ case 80:
1267
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1268
+ break;
1269
+ case 81:
1270
+ this.$ = { text: $$[$0], type: "string" };
1271
+ break;
1272
+ case 82:
1273
+ this.$ = { text: $$[$0], type: "markdown" };
1274
+ break;
1275
+ case 83:
1276
+ var inf = yy.destructLink($$[$0]);
1277
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
1278
+ break;
1279
+ case 84:
1280
+ var inf = yy.destructLink($$[$0]);
1281
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "id": $$[$0 - 1] };
1282
+ break;
1283
+ case 85:
1284
+ this.$ = $$[$0 - 1];
1285
+ break;
1286
+ case 86:
1287
+ this.$ = { text: $$[$0], type: "text" };
1288
+ break;
1289
+ case 87:
1290
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1291
+ break;
1292
+ case 88:
1293
+ this.$ = { text: $$[$0], type: "string" };
1294
+ break;
1295
+ case 89:
1296
+ case 104:
1297
+ this.$ = { text: $$[$0], type: "markdown" };
1298
+ break;
1299
+ case 101:
1300
+ this.$ = { text: $$[$0], type: "text" };
1301
+ break;
1302
+ case 102:
1303
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1304
+ break;
1305
+ case 103:
1306
+ this.$ = { text: $$[$0], type: "text" };
1307
+ break;
1308
+ case 105:
1309
+ this.$ = $$[$0 - 4];
1310
+ yy.addClass($$[$0 - 2], $$[$0]);
1311
+ break;
1312
+ case 106:
1313
+ this.$ = $$[$0 - 4];
1314
+ yy.setClass($$[$0 - 2], $$[$0]);
1315
+ break;
1316
+ case 107:
1317
+ case 115:
1318
+ this.$ = $$[$0 - 1];
1319
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
1320
+ break;
1321
+ case 108:
1322
+ case 116:
1323
+ this.$ = $$[$0 - 3];
1324
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
1325
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1326
+ break;
1327
+ case 109:
1328
+ this.$ = $$[$0 - 2];
1329
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
1330
+ break;
1331
+ case 110:
1332
+ this.$ = $$[$0 - 4];
1333
+ yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
1334
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1335
+ break;
1336
+ case 111:
1337
+ this.$ = $$[$0 - 2];
1338
+ yy.setLink($$[$0 - 2], $$[$0]);
1339
+ break;
1340
+ case 112:
1341
+ this.$ = $$[$0 - 4];
1342
+ yy.setLink($$[$0 - 4], $$[$0 - 2]);
1343
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1344
+ break;
1345
+ case 113:
1346
+ this.$ = $$[$0 - 4];
1347
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
1348
+ break;
1349
+ case 114:
1350
+ this.$ = $$[$0 - 6];
1351
+ yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
1352
+ yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
1353
+ break;
1354
+ case 117:
1355
+ this.$ = $$[$0 - 1];
1356
+ yy.setLink($$[$0 - 1], $$[$0]);
1357
+ break;
1358
+ case 118:
1359
+ this.$ = $$[$0 - 3];
1360
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
1361
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1362
+ break;
1363
+ case 119:
1364
+ this.$ = $$[$0 - 3];
1365
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
1366
+ break;
1367
+ case 120:
1368
+ this.$ = $$[$0 - 5];
1369
+ yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
1370
+ yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
1371
+ break;
1372
+ case 121:
1373
+ this.$ = $$[$0 - 4];
1374
+ yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
1375
+ break;
1376
+ case 122:
1377
+ this.$ = $$[$0 - 4];
1378
+ yy.updateLink([$$[$0 - 2]], $$[$0]);
1379
+ break;
1380
+ case 123:
1381
+ this.$ = $$[$0 - 4];
1382
+ yy.updateLink($$[$0 - 2], $$[$0]);
1383
+ break;
1384
+ case 124:
1385
+ this.$ = $$[$0 - 8];
1386
+ yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
1387
+ yy.updateLink([$$[$0 - 6]], $$[$0]);
1388
+ break;
1389
+ case 125:
1390
+ this.$ = $$[$0 - 8];
1391
+ yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
1392
+ yy.updateLink($$[$0 - 6], $$[$0]);
1393
+ break;
1394
+ case 126:
1395
+ this.$ = $$[$0 - 6];
1396
+ yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
1397
+ break;
1398
+ case 127:
1399
+ this.$ = $$[$0 - 6];
1400
+ yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
1401
+ break;
1402
+ case 128:
1403
+ case 130:
1404
+ this.$ = [$$[$0]];
1405
+ break;
1406
+ case 129:
1407
+ case 131:
1408
+ $$[$0 - 2].push($$[$0]);
1409
+ this.$ = $$[$0 - 2];
1410
+ break;
1411
+ case 133:
1412
+ this.$ = $$[$0 - 1] + $$[$0];
1413
+ break;
1414
+ case 181:
1415
+ this.$ = $$[$0];
1416
+ break;
1417
+ case 182:
1418
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1419
+ break;
1420
+ case 184:
1421
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1422
+ break;
1423
+ case 185:
1424
+ this.$ = { stmt: "dir", value: "TB" };
1425
+ break;
1426
+ case 186:
1427
+ this.$ = { stmt: "dir", value: "BT" };
1428
+ break;
1429
+ case 187:
1430
+ this.$ = { stmt: "dir", value: "RL" };
1431
+ break;
1432
+ case 188:
1433
+ this.$ = { stmt: "dir", value: "LR" };
1434
+ break;
1435
+ case 189:
1436
+ this.$ = { stmt: "dir", value: "TD" };
1437
+ break;
1438
+ }
1439
+ }, "anonymous"),
1440
+ 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 })],
1441
+ defaultActions: {},
1442
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1443
+ if (hash.recoverable) {
1444
+ this.trace(str);
1445
+ } else {
1446
+ var error = new Error(str);
1447
+ error.hash = hash;
1448
+ throw error;
1449
+ }
1450
+ }, "parseError"),
1451
+ parse: /* @__PURE__ */ __name(function parse(input) {
1452
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
1453
+ var args = lstack.slice.call(arguments, 1);
1454
+ var lexer2 = Object.create(this.lexer);
1455
+ var sharedState = { yy: {} };
1456
+ for (var k in this.yy) {
1457
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
1458
+ sharedState.yy[k] = this.yy[k];
1459
+ }
1460
+ }
1461
+ lexer2.setInput(input, sharedState.yy);
1462
+ sharedState.yy.lexer = lexer2;
1463
+ sharedState.yy.parser = this;
1464
+ if (typeof lexer2.yylloc == "undefined") {
1465
+ lexer2.yylloc = {};
1466
+ }
1467
+ var yyloc = lexer2.yylloc;
1468
+ lstack.push(yyloc);
1469
+ var ranges = lexer2.options && lexer2.options.ranges;
1470
+ if (typeof sharedState.yy.parseError === "function") {
1471
+ this.parseError = sharedState.yy.parseError;
1472
+ } else {
1473
+ this.parseError = Object.getPrototypeOf(this).parseError;
1474
+ }
1475
+ function popStack(n) {
1476
+ stack.length = stack.length - 2 * n;
1477
+ vstack.length = vstack.length - n;
1478
+ lstack.length = lstack.length - n;
1479
+ }
1480
+ __name(popStack, "popStack");
1481
+ function lex() {
1482
+ var token;
1483
+ token = tstack.pop() || lexer2.lex() || EOF;
1484
+ if (typeof token !== "number") {
1485
+ if (token instanceof Array) {
1486
+ tstack = token;
1487
+ token = tstack.pop();
1488
+ }
1489
+ token = self.symbols_[token] || token;
1490
+ }
1491
+ return token;
1492
+ }
1493
+ __name(lex, "lex");
1494
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
1495
+ while (true) {
1496
+ state = stack[stack.length - 1];
1497
+ if (this.defaultActions[state]) {
1498
+ action = this.defaultActions[state];
1499
+ } else {
1500
+ if (symbol === null || typeof symbol == "undefined") {
1501
+ symbol = lex();
1502
+ }
1503
+ action = table[state] && table[state][symbol];
1504
+ }
1505
+ if (typeof action === "undefined" || !action.length || !action[0]) {
1506
+ var errStr = "";
1507
+ expected = [];
1508
+ for (p in table[state]) {
1509
+ if (this.terminals_[p] && p > TERROR) {
1510
+ expected.push("'" + this.terminals_[p] + "'");
1511
+ }
1512
+ }
1513
+ if (lexer2.showPosition) {
1514
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1515
+ } else {
1516
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1517
+ }
1518
+ this.parseError(errStr, {
1519
+ text: lexer2.match,
1520
+ token: this.terminals_[symbol] || symbol,
1521
+ line: lexer2.yylineno,
1522
+ loc: yyloc,
1523
+ expected
1524
+ });
1525
+ }
1526
+ if (action[0] instanceof Array && action.length > 1) {
1527
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1528
+ }
1529
+ switch (action[0]) {
1530
+ case 1:
1531
+ stack.push(symbol);
1532
+ vstack.push(lexer2.yytext);
1533
+ lstack.push(lexer2.yylloc);
1534
+ stack.push(action[1]);
1535
+ symbol = null;
1536
+ if (!preErrorSymbol) {
1537
+ yyleng = lexer2.yyleng;
1538
+ yytext = lexer2.yytext;
1539
+ yylineno = lexer2.yylineno;
1540
+ yyloc = lexer2.yylloc;
1541
+ if (recovering > 0) {
1542
+ recovering--;
1543
+ }
1544
+ } else {
1545
+ symbol = preErrorSymbol;
1546
+ preErrorSymbol = null;
1547
+ }
1548
+ break;
1549
+ case 2:
1550
+ len = this.productions_[action[1]][1];
1551
+ yyval.$ = vstack[vstack.length - len];
1552
+ yyval._$ = {
1553
+ first_line: lstack[lstack.length - (len || 1)].first_line,
1554
+ last_line: lstack[lstack.length - 1].last_line,
1555
+ first_column: lstack[lstack.length - (len || 1)].first_column,
1556
+ last_column: lstack[lstack.length - 1].last_column
1557
+ };
1558
+ if (ranges) {
1559
+ yyval._$.range = [
1560
+ lstack[lstack.length - (len || 1)].range[0],
1561
+ lstack[lstack.length - 1].range[1]
1562
+ ];
1563
+ }
1564
+ r = this.performAction.apply(yyval, [
1565
+ yytext,
1566
+ yyleng,
1567
+ yylineno,
1568
+ sharedState.yy,
1569
+ action[1],
1570
+ vstack,
1571
+ lstack
1572
+ ].concat(args));
1573
+ if (typeof r !== "undefined") {
1574
+ return r;
1575
+ }
1576
+ if (len) {
1577
+ stack = stack.slice(0, -1 * len * 2);
1578
+ vstack = vstack.slice(0, -1 * len);
1579
+ lstack = lstack.slice(0, -1 * len);
1580
+ }
1581
+ stack.push(this.productions_[action[1]][0]);
1582
+ vstack.push(yyval.$);
1583
+ lstack.push(yyval._$);
1584
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1585
+ stack.push(newState);
1586
+ break;
1587
+ case 3:
1588
+ return true;
1589
+ }
1590
+ }
1591
+ return true;
1592
+ }, "parse")
1593
+ };
1594
+ var lexer = /* @__PURE__ */ function() {
1595
+ var lexer2 = {
1596
+ EOF: 1,
1597
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1598
+ if (this.yy.parser) {
1599
+ this.yy.parser.parseError(str, hash);
1600
+ } else {
1601
+ throw new Error(str);
1602
+ }
1603
+ }, "parseError"),
1604
+ // resets the lexer, sets new input
1605
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
1606
+ this.yy = yy || this.yy || {};
1607
+ this._input = input;
1608
+ this._more = this._backtrack = this.done = false;
1609
+ this.yylineno = this.yyleng = 0;
1610
+ this.yytext = this.matched = this.match = "";
1611
+ this.conditionStack = ["INITIAL"];
1612
+ this.yylloc = {
1613
+ first_line: 1,
1614
+ first_column: 0,
1615
+ last_line: 1,
1616
+ last_column: 0
1617
+ };
1618
+ if (this.options.ranges) {
1619
+ this.yylloc.range = [0, 0];
1620
+ }
1621
+ this.offset = 0;
1622
+ return this;
1623
+ }, "setInput"),
1624
+ // consumes and returns one char from the input
1625
+ input: /* @__PURE__ */ __name(function() {
1626
+ var ch = this._input[0];
1627
+ this.yytext += ch;
1628
+ this.yyleng++;
1629
+ this.offset++;
1630
+ this.match += ch;
1631
+ this.matched += ch;
1632
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
1633
+ if (lines) {
1634
+ this.yylineno++;
1635
+ this.yylloc.last_line++;
1636
+ } else {
1637
+ this.yylloc.last_column++;
1638
+ }
1639
+ if (this.options.ranges) {
1640
+ this.yylloc.range[1]++;
1641
+ }
1642
+ this._input = this._input.slice(1);
1643
+ return ch;
1644
+ }, "input"),
1645
+ // unshifts one char (or a string) into the input
1646
+ unput: /* @__PURE__ */ __name(function(ch) {
1647
+ var len = ch.length;
1648
+ var lines = ch.split(/(?:\r\n?|\n)/g);
1649
+ this._input = ch + this._input;
1650
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
1651
+ this.offset -= len;
1652
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1653
+ this.match = this.match.substr(0, this.match.length - 1);
1654
+ this.matched = this.matched.substr(0, this.matched.length - 1);
1655
+ if (lines.length - 1) {
1656
+ this.yylineno -= lines.length - 1;
1657
+ }
1658
+ var r = this.yylloc.range;
1659
+ this.yylloc = {
1660
+ first_line: this.yylloc.first_line,
1661
+ last_line: this.yylineno + 1,
1662
+ first_column: this.yylloc.first_column,
1663
+ 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
1664
+ };
1665
+ if (this.options.ranges) {
1666
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1667
+ }
1668
+ this.yyleng = this.yytext.length;
1669
+ return this;
1670
+ }, "unput"),
1671
+ // When called from action, caches matched text and appends it on next action
1672
+ more: /* @__PURE__ */ __name(function() {
1673
+ this._more = true;
1674
+ return this;
1675
+ }, "more"),
1676
+ // 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.
1677
+ reject: /* @__PURE__ */ __name(function() {
1678
+ if (this.options.backtrack_lexer) {
1679
+ this._backtrack = true;
1680
+ } else {
1681
+ 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(), {
1682
+ text: "",
1683
+ token: null,
1684
+ line: this.yylineno
1685
+ });
1686
+ }
1687
+ return this;
1688
+ }, "reject"),
1689
+ // retain first n characters of the match
1690
+ less: /* @__PURE__ */ __name(function(n) {
1691
+ this.unput(this.match.slice(n));
1692
+ }, "less"),
1693
+ // displays already matched input, i.e. for error messages
1694
+ pastInput: /* @__PURE__ */ __name(function() {
1695
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
1696
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
1697
+ }, "pastInput"),
1698
+ // displays upcoming input, i.e. for error messages
1699
+ upcomingInput: /* @__PURE__ */ __name(function() {
1700
+ var next = this.match;
1701
+ if (next.length < 20) {
1702
+ next += this._input.substr(0, 20 - next.length);
1703
+ }
1704
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
1705
+ }, "upcomingInput"),
1706
+ // displays the character position where the lexing error occurred, i.e. for error messages
1707
+ showPosition: /* @__PURE__ */ __name(function() {
1708
+ var pre = this.pastInput();
1709
+ var c = new Array(pre.length + 1).join("-");
1710
+ return pre + this.upcomingInput() + "\n" + c + "^";
1711
+ }, "showPosition"),
1712
+ // test the lexed token: return FALSE when not a match, otherwise return token
1713
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
1714
+ var token, lines, backup;
1715
+ if (this.options.backtrack_lexer) {
1716
+ backup = {
1717
+ yylineno: this.yylineno,
1718
+ yylloc: {
1719
+ first_line: this.yylloc.first_line,
1720
+ last_line: this.last_line,
1721
+ first_column: this.yylloc.first_column,
1722
+ last_column: this.yylloc.last_column
1723
+ },
1724
+ yytext: this.yytext,
1725
+ match: this.match,
1726
+ matches: this.matches,
1727
+ matched: this.matched,
1728
+ yyleng: this.yyleng,
1729
+ offset: this.offset,
1730
+ _more: this._more,
1731
+ _input: this._input,
1732
+ yy: this.yy,
1733
+ conditionStack: this.conditionStack.slice(0),
1734
+ done: this.done
1735
+ };
1736
+ if (this.options.ranges) {
1737
+ backup.yylloc.range = this.yylloc.range.slice(0);
1738
+ }
1739
+ }
1740
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
1741
+ if (lines) {
1742
+ this.yylineno += lines.length;
1743
+ }
1744
+ this.yylloc = {
1745
+ first_line: this.yylloc.last_line,
1746
+ last_line: this.yylineno + 1,
1747
+ first_column: this.yylloc.last_column,
1748
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1749
+ };
1750
+ this.yytext += match[0];
1751
+ this.match += match[0];
1752
+ this.matches = match;
1753
+ this.yyleng = this.yytext.length;
1754
+ if (this.options.ranges) {
1755
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
1756
+ }
1757
+ this._more = false;
1758
+ this._backtrack = false;
1759
+ this._input = this._input.slice(match[0].length);
1760
+ this.matched += match[0];
1761
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1762
+ if (this.done && this._input) {
1763
+ this.done = false;
1764
+ }
1765
+ if (token) {
1766
+ return token;
1767
+ } else if (this._backtrack) {
1768
+ for (var k in backup) {
1769
+ this[k] = backup[k];
1770
+ }
1771
+ return false;
1772
+ }
1773
+ return false;
1774
+ }, "test_match"),
1775
+ // return next match in input
1776
+ next: /* @__PURE__ */ __name(function() {
1777
+ if (this.done) {
1778
+ return this.EOF;
1779
+ }
1780
+ if (!this._input) {
1781
+ this.done = true;
1782
+ }
1783
+ var token, match, tempMatch, index;
1784
+ if (!this._more) {
1785
+ this.yytext = "";
1786
+ this.match = "";
1787
+ }
1788
+ var rules = this._currentRules();
1789
+ for (var i = 0; i < rules.length; i++) {
1790
+ tempMatch = this._input.match(this.rules[rules[i]]);
1791
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1792
+ match = tempMatch;
1793
+ index = i;
1794
+ if (this.options.backtrack_lexer) {
1795
+ token = this.test_match(tempMatch, rules[i]);
1796
+ if (token !== false) {
1797
+ return token;
1798
+ } else if (this._backtrack) {
1799
+ match = false;
1800
+ continue;
1801
+ } else {
1802
+ return false;
1803
+ }
1804
+ } else if (!this.options.flex) {
1805
+ break;
1806
+ }
1807
+ }
1808
+ }
1809
+ if (match) {
1810
+ token = this.test_match(match, rules[index]);
1811
+ if (token !== false) {
1812
+ return token;
1813
+ }
1814
+ return false;
1815
+ }
1816
+ if (this._input === "") {
1817
+ return this.EOF;
1818
+ } else {
1819
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1820
+ text: "",
1821
+ token: null,
1822
+ line: this.yylineno
1823
+ });
1824
+ }
1825
+ }, "next"),
1826
+ // return next match that has a token
1827
+ lex: /* @__PURE__ */ __name(function lex() {
1828
+ var r = this.next();
1829
+ if (r) {
1830
+ return r;
1831
+ } else {
1832
+ return this.lex();
1833
+ }
1834
+ }, "lex"),
1835
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1836
+ begin: /* @__PURE__ */ __name(function begin(condition) {
1837
+ this.conditionStack.push(condition);
1838
+ }, "begin"),
1839
+ // pop the previously active lexer condition state off the condition stack
1840
+ popState: /* @__PURE__ */ __name(function popState() {
1841
+ var n = this.conditionStack.length - 1;
1842
+ if (n > 0) {
1843
+ return this.conditionStack.pop();
1844
+ } else {
1845
+ return this.conditionStack[0];
1846
+ }
1847
+ }, "popState"),
1848
+ // produce the lexer rule set which is active for the currently active lexer condition state
1849
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
1850
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
1851
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1852
+ } else {
1853
+ return this.conditions["INITIAL"].rules;
1854
+ }
1855
+ }, "_currentRules"),
1856
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1857
+ topState: /* @__PURE__ */ __name(function topState(n) {
1858
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
1859
+ if (n >= 0) {
1860
+ return this.conditionStack[n];
1861
+ } else {
1862
+ return "INITIAL";
1863
+ }
1864
+ }, "topState"),
1865
+ // alias for begin(condition)
1866
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
1867
+ this.begin(condition);
1868
+ }, "pushState"),
1869
+ // return the number of states currently on the stack
1870
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
1871
+ return this.conditionStack.length;
1872
+ }, "stateStackSize"),
1873
+ options: {},
1874
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1875
+ var YYSTATE = YY_START;
1876
+ switch ($avoiding_name_collisions) {
1877
+ case 0:
1878
+ this.begin("acc_title");
1879
+ return 34;
1880
+ break;
1881
+ case 1:
1882
+ this.popState();
1883
+ return "acc_title_value";
1884
+ break;
1885
+ case 2:
1886
+ this.begin("acc_descr");
1887
+ return 36;
1888
+ break;
1889
+ case 3:
1890
+ this.popState();
1891
+ return "acc_descr_value";
1892
+ break;
1893
+ case 4:
1894
+ this.begin("acc_descr_multiline");
1895
+ break;
1896
+ case 5:
1897
+ this.popState();
1898
+ break;
1899
+ case 6:
1900
+ return "acc_descr_multiline_value";
1901
+ break;
1902
+ case 7:
1903
+ this.pushState("shapeData");
1904
+ yy_.yytext = "";
1905
+ return 40;
1906
+ break;
1907
+ case 8:
1908
+ this.pushState("shapeDataStr");
1909
+ return 40;
1910
+ break;
1911
+ case 9:
1912
+ this.popState();
1913
+ return 40;
1914
+ break;
1915
+ case 10:
1916
+ const re = /\n\s*/g;
1917
+ yy_.yytext = yy_.yytext.replace(re, "<br/>");
1918
+ return 40;
1919
+ break;
1920
+ case 11:
1921
+ return 40;
1922
+ break;
1923
+ case 12:
1924
+ this.popState();
1925
+ break;
1926
+ case 13:
1927
+ this.begin("callbackname");
1928
+ break;
1929
+ case 14:
1930
+ this.popState();
1931
+ break;
1932
+ case 15:
1933
+ this.popState();
1934
+ this.begin("callbackargs");
1935
+ break;
1936
+ case 16:
1937
+ return 95;
1938
+ break;
1939
+ case 17:
1940
+ this.popState();
1941
+ break;
1942
+ case 18:
1943
+ return 96;
1944
+ break;
1945
+ case 19:
1946
+ return "MD_STR";
1947
+ break;
1948
+ case 20:
1949
+ this.popState();
1950
+ break;
1951
+ case 21:
1952
+ this.begin("md_string");
1953
+ break;
1954
+ case 22:
1955
+ return "STR";
1956
+ break;
1957
+ case 23:
1958
+ this.popState();
1959
+ break;
1960
+ case 24:
1961
+ this.pushState("string");
1962
+ break;
1963
+ case 25:
1964
+ return 84;
1965
+ break;
1966
+ case 26:
1967
+ return 102;
1968
+ break;
1969
+ case 27:
1970
+ return 85;
1971
+ break;
1972
+ case 28:
1973
+ return 104;
1974
+ break;
1975
+ case 29:
1976
+ return 86;
1977
+ break;
1978
+ case 30:
1979
+ return 87;
1980
+ break;
1981
+ case 31:
1982
+ return 97;
1983
+ break;
1984
+ case 32:
1985
+ this.begin("click");
1986
+ break;
1987
+ case 33:
1988
+ this.popState();
1989
+ break;
1990
+ case 34:
1991
+ return 88;
1992
+ break;
1993
+ case 35:
1994
+ if (yy.lex.firstGraph()) {
1995
+ this.begin("dir");
1996
+ }
1997
+ return 12;
1998
+ break;
1999
+ case 36:
2000
+ if (yy.lex.firstGraph()) {
2001
+ this.begin("dir");
2002
+ }
2003
+ return 12;
2004
+ break;
2005
+ case 37:
2006
+ if (yy.lex.firstGraph()) {
2007
+ this.begin("dir");
2008
+ }
2009
+ return 12;
2010
+ break;
2011
+ case 38:
2012
+ return 27;
2013
+ break;
2014
+ case 39:
2015
+ return 32;
2016
+ break;
2017
+ case 40:
2018
+ return 98;
2019
+ break;
2020
+ case 41:
2021
+ return 98;
2022
+ break;
2023
+ case 42:
2024
+ return 98;
2025
+ break;
2026
+ case 43:
2027
+ return 98;
2028
+ break;
2029
+ case 44:
2030
+ this.popState();
2031
+ return 13;
2032
+ break;
2033
+ case 45:
2034
+ this.popState();
2035
+ return 14;
2036
+ break;
2037
+ case 46:
2038
+ this.popState();
2039
+ return 14;
2040
+ break;
2041
+ case 47:
2042
+ this.popState();
2043
+ return 14;
2044
+ break;
2045
+ case 48:
2046
+ this.popState();
2047
+ return 14;
2048
+ break;
2049
+ case 49:
2050
+ this.popState();
2051
+ return 14;
2052
+ break;
2053
+ case 50:
2054
+ this.popState();
2055
+ return 14;
2056
+ break;
2057
+ case 51:
2058
+ this.popState();
2059
+ return 14;
2060
+ break;
2061
+ case 52:
2062
+ this.popState();
2063
+ return 14;
2064
+ break;
2065
+ case 53:
2066
+ this.popState();
2067
+ return 14;
2068
+ break;
2069
+ case 54:
2070
+ this.popState();
2071
+ return 14;
2072
+ break;
2073
+ case 55:
2074
+ return 121;
2075
+ break;
2076
+ case 56:
2077
+ return 122;
2078
+ break;
2079
+ case 57:
2080
+ return 123;
2081
+ break;
2082
+ case 58:
2083
+ return 124;
2084
+ break;
2085
+ case 59:
2086
+ return 125;
2087
+ break;
2088
+ case 60:
2089
+ return 78;
2090
+ break;
2091
+ case 61:
2092
+ return 105;
2093
+ break;
2094
+ case 62:
2095
+ return 111;
2096
+ break;
2097
+ case 63:
2098
+ return 46;
2099
+ break;
2100
+ case 64:
2101
+ return 60;
2102
+ break;
2103
+ case 65:
2104
+ return 44;
2105
+ break;
2106
+ case 66:
2107
+ return 8;
2108
+ break;
2109
+ case 67:
2110
+ return 106;
2111
+ break;
2112
+ case 68:
2113
+ return 115;
2114
+ break;
2115
+ case 69:
2116
+ this.popState();
2117
+ return 77;
2118
+ break;
2119
+ case 70:
2120
+ this.pushState("edgeText");
2121
+ return 75;
2122
+ break;
2123
+ case 71:
2124
+ return 119;
2125
+ break;
2126
+ case 72:
2127
+ this.popState();
2128
+ return 77;
2129
+ break;
2130
+ case 73:
2131
+ this.pushState("thickEdgeText");
2132
+ return 75;
2133
+ break;
2134
+ case 74:
2135
+ return 119;
2136
+ break;
2137
+ case 75:
2138
+ this.popState();
2139
+ return 77;
2140
+ break;
2141
+ case 76:
2142
+ this.pushState("dottedEdgeText");
2143
+ return 75;
2144
+ break;
2145
+ case 77:
2146
+ return 119;
2147
+ break;
2148
+ case 78:
2149
+ return 77;
2150
+ break;
2151
+ case 79:
2152
+ this.popState();
2153
+ return 53;
2154
+ break;
2155
+ case 80:
2156
+ return "TEXT";
2157
+ break;
2158
+ case 81:
2159
+ this.pushState("ellipseText");
2160
+ return 52;
2161
+ break;
2162
+ case 82:
2163
+ this.popState();
2164
+ return 55;
2165
+ break;
2166
+ case 83:
2167
+ this.pushState("text");
2168
+ return 54;
2169
+ break;
2170
+ case 84:
2171
+ this.popState();
2172
+ return 57;
2173
+ break;
2174
+ case 85:
2175
+ this.pushState("text");
2176
+ return 56;
2177
+ break;
2178
+ case 86:
2179
+ return 58;
2180
+ break;
2181
+ case 87:
2182
+ this.pushState("text");
2183
+ return 67;
2184
+ break;
2185
+ case 88:
2186
+ this.popState();
2187
+ return 64;
2188
+ break;
2189
+ case 89:
2190
+ this.pushState("text");
2191
+ return 63;
2192
+ break;
2193
+ case 90:
2194
+ this.popState();
2195
+ return 49;
2196
+ break;
2197
+ case 91:
2198
+ this.pushState("text");
2199
+ return 48;
2200
+ break;
2201
+ case 92:
2202
+ this.popState();
2203
+ return 69;
2204
+ break;
2205
+ case 93:
2206
+ this.popState();
2207
+ return 71;
2208
+ break;
2209
+ case 94:
2210
+ return 117;
2211
+ break;
2212
+ case 95:
2213
+ this.pushState("trapText");
2214
+ return 68;
2215
+ break;
2216
+ case 96:
2217
+ this.pushState("trapText");
2218
+ return 70;
2219
+ break;
2220
+ case 97:
2221
+ return 118;
2222
+ break;
2223
+ case 98:
2224
+ return 67;
2225
+ break;
2226
+ case 99:
2227
+ return 90;
2228
+ break;
2229
+ case 100:
2230
+ return "SEP";
2231
+ break;
2232
+ case 101:
2233
+ return 89;
2234
+ break;
2235
+ case 102:
2236
+ return 115;
2237
+ break;
2238
+ case 103:
2239
+ return 111;
2240
+ break;
2241
+ case 104:
2242
+ return 44;
2243
+ break;
2244
+ case 105:
2245
+ return 109;
2246
+ break;
2247
+ case 106:
2248
+ return 114;
2249
+ break;
2250
+ case 107:
2251
+ return 116;
2252
+ break;
2253
+ case 108:
2254
+ this.popState();
2255
+ return 62;
2256
+ break;
2257
+ case 109:
2258
+ this.pushState("text");
2259
+ return 62;
2260
+ break;
2261
+ case 110:
2262
+ this.popState();
2263
+ return 51;
2264
+ break;
2265
+ case 111:
2266
+ this.pushState("text");
2267
+ return 50;
2268
+ break;
2269
+ case 112:
2270
+ this.popState();
2271
+ return 31;
2272
+ break;
2273
+ case 113:
2274
+ this.pushState("text");
2275
+ return 29;
2276
+ break;
2277
+ case 114:
2278
+ this.popState();
2279
+ return 66;
2280
+ break;
2281
+ case 115:
2282
+ this.pushState("text");
2283
+ return 65;
2284
+ break;
2285
+ case 116:
2286
+ return "TEXT";
2287
+ break;
2288
+ case 117:
2289
+ return "QUOTE";
2290
+ break;
2291
+ case 118:
2292
+ return 9;
2293
+ break;
2294
+ case 119:
2295
+ return 10;
2296
+ break;
2297
+ case 120:
2298
+ return 11;
2299
+ break;
2300
+ }
2301
+ }, "anonymous"),
2302
+ 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)/, /^(?:$)/],
2303
+ 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 } }
2304
+ };
2305
+ return lexer2;
2306
+ }();
2307
+ parser2.lexer = lexer;
2308
+ function Parser() {
2309
+ this.yy = {};
2310
+ }
2311
+ __name(Parser, "Parser");
2312
+ Parser.prototype = parser2;
2313
+ parser2.Parser = Parser;
2314
+ return new Parser();
2315
+ }();
2316
+ parser.parser = parser;
2317
+ var flow_default = parser;
2318
+ var newParser = Object.assign({}, flow_default);
2319
+ newParser.parse = (src) => {
2320
+ const newSrc = src.replace(/}\s*\n/g, "}\n");
2321
+ return flow_default.parse(newSrc);
2322
+ };
2323
+ var flowParser_default = newParser;
2324
+ var fade = /* @__PURE__ */ __name((color, opacity) => {
2325
+ const channel2 = channel_default;
2326
+ const r = channel2(color, "r");
2327
+ const g = channel2(color, "g");
2328
+ const b = channel2(color, "b");
2329
+ return rgba_default(r, g, b, opacity);
2330
+ }, "fade");
2331
+ var getStyles = /* @__PURE__ */ __name((options) => `.label {
2332
+ font-family: ${options.fontFamily};
2333
+ color: ${options.nodeTextColor || options.textColor};
2334
+ }
2335
+ .cluster-label text {
2336
+ fill: ${options.titleColor};
2337
+ }
2338
+ .cluster-label span {
2339
+ color: ${options.titleColor};
2340
+ }
2341
+ .cluster-label span p {
2342
+ background-color: transparent;
2343
+ }
2344
+
2345
+ .label text,span {
2346
+ fill: ${options.nodeTextColor || options.textColor};
2347
+ color: ${options.nodeTextColor || options.textColor};
2348
+ }
2349
+
2350
+ .node rect,
2351
+ .node circle,
2352
+ .node ellipse,
2353
+ .node polygon,
2354
+ .node path {
2355
+ fill: ${options.mainBkg};
2356
+ stroke: ${options.nodeBorder};
2357
+ stroke-width: ${options.strokeWidth ?? 1}px;
2358
+ }
2359
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
2360
+ text-anchor: middle;
2361
+ }
2362
+ // .flowchart-label .text-outer-tspan {
2363
+ // text-anchor: middle;
2364
+ // }
2365
+ // .flowchart-label .text-inner-tspan {
2366
+ // text-anchor: start;
2367
+ // }
2368
+
2369
+ .node .katex path {
2370
+ fill: #000;
2371
+ stroke: #000;
2372
+ stroke-width: 1px;
2373
+ }
2374
+
2375
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
2376
+ text-align: center;
2377
+ }
2378
+ .node.clickable {
2379
+ cursor: pointer;
2380
+ }
2381
+
2382
+
2383
+ .root .anchor path {
2384
+ fill: ${options.lineColor} !important;
2385
+ stroke-width: 0;
2386
+ stroke: ${options.lineColor};
2387
+ }
2388
+
2389
+ .arrowheadPath {
2390
+ fill: ${options.arrowheadColor};
2391
+ }
2392
+
2393
+ .edgePath .path {
2394
+ stroke: ${options.lineColor};
2395
+ stroke-width: ${options.strokeWidth ?? 2}px;
2396
+ }
2397
+
2398
+ .flowchart-link {
2399
+ stroke: ${options.lineColor};
2400
+ fill: none;
2401
+ }
2402
+
2403
+ .edgeLabel {
2404
+ background-color: ${options.edgeLabelBackground};
2405
+ p {
2406
+ background-color: ${options.edgeLabelBackground};
2407
+ }
2408
+ rect {
2409
+ opacity: 0.5;
2410
+ background-color: ${options.edgeLabelBackground};
2411
+ fill: ${options.edgeLabelBackground};
2412
+ }
2413
+ text-align: center;
2414
+ }
2415
+
2416
+ /* For html labels only */
2417
+ .labelBkg {
2418
+ background-color: ${fade(options.edgeLabelBackground, 0.5)};
2419
+ // background-color:
2420
+ }
2421
+
2422
+ .cluster rect {
2423
+ fill: ${options.clusterBkg};
2424
+ stroke: ${options.clusterBorder};
2425
+ stroke-width: 1px;
2426
+ }
2427
+
2428
+ .cluster text {
2429
+ fill: ${options.titleColor};
2430
+ }
2431
+
2432
+ .cluster span {
2433
+ color: ${options.titleColor};
2434
+ }
2435
+ /* .cluster div {
2436
+ color: ${options.titleColor};
2437
+ } */
2438
+
2439
+ div.mermaidTooltip {
2440
+ position: absolute;
2441
+ text-align: center;
2442
+ max-width: 200px;
2443
+ padding: 2px;
2444
+ font-family: ${options.fontFamily};
2445
+ font-size: 12px;
2446
+ background: ${options.tertiaryColor};
2447
+ border: 1px solid ${options.border2};
2448
+ border-radius: 2px;
2449
+ pointer-events: none;
2450
+ z-index: 100;
2451
+ }
2452
+
2453
+ .flowchartTitleText {
2454
+ text-anchor: middle;
2455
+ font-size: 18px;
2456
+ fill: ${options.textColor};
2457
+ }
2458
+
2459
+ rect.text {
2460
+ fill: none;
2461
+ stroke-width: 0;
2462
+ }
2463
+
2464
+ .icon-shape, .image-shape {
2465
+ background-color: ${options.edgeLabelBackground};
2466
+ p {
2467
+ background-color: ${options.edgeLabelBackground};
2468
+ padding: 2px;
2469
+ }
2470
+ .label rect {
2471
+ opacity: 0.5;
2472
+ background-color: ${options.edgeLabelBackground};
2473
+ fill: ${options.edgeLabelBackground};
2474
+ }
2475
+ text-align: center;
2476
+ }
2477
+ ${getIconStyles()}
2478
+ `, "getStyles");
2479
+ var styles_default = getStyles;
2480
+ var diagram = {
2481
+ parser: flowParser_default,
2482
+ get db() {
2483
+ return new FlowDB();
2484
+ },
2485
+ renderer: flowRenderer_v3_unified_default,
2486
+ styles: styles_default,
2487
+ init: /* @__PURE__ */ __name((cnf) => {
2488
+ if (!cnf.flowchart) {
2489
+ cnf.flowchart = {};
2490
+ }
2491
+ if (cnf.layout) {
2492
+ setConfig2({ layout: cnf.layout });
2493
+ }
2494
+ cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
2495
+ setConfig2({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
2496
+ }, "init")
2497
+ };
2498
+ export {
2499
+ diagram
2500
+ };
2501
+ //# sourceMappingURL=flowDiagram-DWJPFMVM-BZHLK6QB.js.map