@draftably/editor 0.0.0-stage → 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 (185) hide show
  1. package/README.md +26 -2
  2. package/dist/LICENSE +21 -0
  3. package/dist/assets/engine.worker-DmHew5f6.js +6813 -0
  4. package/dist/assets/import-d2.worker-CnXfFXoa.js +5395 -0
  5. package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +87 -0
  6. package/dist/chunks/arc-rJj0TtXf.js +83 -0
  7. package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +4781 -0
  8. package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +1440 -0
  9. package/dist/chunks/browser-iNhbPsGc.js +40 -0
  10. package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +1524 -0
  11. package/dist/chunks/channel-qMvPU6eH.js +5 -0
  12. package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +670 -0
  13. package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +18 -0
  14. package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +262 -0
  15. package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +68 -0
  16. package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +19 -0
  17. package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +8 -0
  18. package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +19 -0
  19. package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +8 -0
  20. package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +451 -0
  21. package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +1570 -0
  22. package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +2608 -0
  23. package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +22361 -0
  24. package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +299 -0
  25. package/dist/chunks/cytoscape.esm-CRsF_JA3.js +18791 -0
  26. package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +2157 -0
  27. package/dist/chunks/defaultLocale-BgPVtth8.js +171 -0
  28. package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +531 -0
  29. package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +153 -0
  30. package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +346 -0
  31. package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +480 -0
  32. package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +219 -0
  33. package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +2586 -0
  34. package/dist/chunks/dot-importer-B23jwEkx.js +1547 -0
  35. package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +109 -0
  36. package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +49229 -0
  37. package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +1064 -0
  38. package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +1771 -0
  39. package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +2729 -0
  40. package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +815 -0
  41. package/dist/chunks/graph-CKJmgLki.js +1541 -0
  42. package/dist/chunks/import-core-C-I1wGfw.js +145 -0
  43. package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +24 -0
  44. package/dist/chunks/init-DjUOC4st.js +16 -0
  45. package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +624 -0
  46. package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +834 -0
  47. package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +724 -0
  48. package/dist/chunks/katex-BsrBVQKd.js +11314 -0
  49. package/dist/chunks/linear-4t7D_ros.js +259 -0
  50. package/dist/chunks/mermaid-facade-BoLWBerE.js +289 -0
  51. package/dist/chunks/mermaid-importer-Cgx1IhmR.js +478 -0
  52. package/dist/chunks/mermaid.core-DXv6D2Sm.js +19244 -0
  53. package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +837 -0
  54. package/dist/chunks/mount-C1Xk_GQz.js +22131 -0
  55. package/dist/chunks/ordinal-DfAQgscy.js +61 -0
  56. package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +95 -0
  57. package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +208 -0
  58. package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +1029 -0
  59. package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +77 -0
  60. package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +889 -0
  61. package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +859 -0
  62. package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +2972 -0
  63. package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +46 -0
  64. package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +1520 -0
  65. package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +4991 -0
  66. package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +13 -0
  67. package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +1058 -0
  68. package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +7945 -0
  69. package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +1578 -0
  70. package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +678 -0
  71. package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +1536 -0
  72. package/dist/element.js +36 -0
  73. package/dist/index.js +4 -0
  74. package/dist/types/src/cli/links.d.ts +4 -0
  75. package/dist/types/src/cli/pdf.d.ts +29 -0
  76. package/dist/types/src/cli/png.d.ts +23 -0
  77. package/dist/types/src/cli/svg.d.ts +4 -0
  78. package/dist/types/src/components/Icon.d.ts +14 -0
  79. package/dist/types/src/components/LayoutPreviewBar.d.ts +2 -0
  80. package/dist/types/src/components/canvas/Canvas.d.ts +15 -0
  81. package/dist/types/src/components/canvas/Frame.d.ts +22 -0
  82. package/dist/types/src/components/canvas/InlineEditor.d.ts +2 -0
  83. package/dist/types/src/components/canvas/Notes.d.ts +5 -0
  84. package/dist/types/src/components/canvas/Overlay.d.ts +2 -0
  85. package/dist/types/src/components/canvas/StateBar.d.ts +5 -0
  86. package/dist/types/src/components/canvas/TextHits.d.ts +6 -0
  87. package/dist/types/src/components/canvas/ZoomControls.d.ts +1 -0
  88. package/dist/types/src/components/canvas/text-boxes.d.ts +24 -0
  89. package/dist/types/src/components/controls.d.ts +88 -0
  90. package/dist/types/src/components/scene/EdgeView.d.ts +22 -0
  91. package/dist/types/src/components/scene/GroupView.d.ts +22 -0
  92. package/dist/types/src/components/scene/Lifelines.d.ts +15 -0
  93. package/dist/types/src/components/scene/LinkMark.d.ts +11 -0
  94. package/dist/types/src/components/scene/NodeView.d.ts +18 -0
  95. package/dist/types/src/components/scene/parts.d.ts +50 -0
  96. package/dist/types/src/components/sculpt/BrushDock.d.ts +2 -0
  97. package/dist/types/src/components/sculpt/TimelineDeck.d.ts +2 -0
  98. package/dist/types/src/components/session-context.d.ts +486 -0
  99. package/dist/types/src/dsl/cells.d.ts +91 -0
  100. package/dist/types/src/dsl/channels.d.ts +53 -0
  101. package/dist/types/src/dsl/compile.d.ts +162 -0
  102. package/dist/types/src/dsl/frame.d.ts +38 -0
  103. package/dist/types/src/dsl/lanes.d.ts +23 -0
  104. package/dist/types/src/dsl/layout-edits.d.ts +58 -0
  105. package/dist/types/src/dsl/legend-notes.d.ts +3 -0
  106. package/dist/types/src/dsl/project.d.ts +39 -0
  107. package/dist/types/src/dsl/source-edits.d.ts +37 -0
  108. package/dist/types/src/dsl/syntax.d.ts +317 -0
  109. package/dist/types/src/dsl/translate.d.ts +69 -0
  110. package/dist/types/src/editor/Editor.d.ts +6 -0
  111. package/dist/types/src/editor/element.d.ts +15 -0
  112. package/dist/types/src/editor/mount.d.ts +23 -0
  113. package/dist/types/src/import/browser.d.ts +3 -0
  114. package/dist/types/src/import/detect.d.ts +31 -0
  115. package/dist/types/src/import/dot-importer.d.ts +3 -0
  116. package/dist/types/src/import/import-core.d.ts +105 -0
  117. package/dist/types/src/import/mermaid-facade.d.ts +120 -0
  118. package/dist/types/src/import/mermaid-importer.d.ts +4 -0
  119. package/dist/types/src/import/mermaid-sequence.d.ts +8 -0
  120. package/dist/types/src/import/scratch.d.ts +3 -0
  121. package/dist/types/src/lib/engine-tasks.d.ts +88 -0
  122. package/dist/types/src/lib/font-data.d.ts +9 -0
  123. package/dist/types/src/lib/saved-diagram.d.ts +4 -0
  124. package/dist/types/src/lib/scene-cache.d.ts +4 -0
  125. package/dist/types/src/lib/source-hash.d.ts +7 -0
  126. package/dist/types/src/lib/svg-export.d.ts +15 -0
  127. package/dist/types/src/model/appearance.d.ts +209 -0
  128. package/dist/types/src/model/bounds.d.ts +19 -0
  129. package/dist/types/src/model/camera.d.ts +21 -0
  130. package/dist/types/src/model/candidates.d.ts +53 -0
  131. package/dist/types/src/model/colors.d.ts +22 -0
  132. package/dist/types/src/model/document.d.ts +24 -0
  133. package/dist/types/src/model/edits.d.ts +133 -0
  134. package/dist/types/src/model/embed.d.ts +17 -0
  135. package/dist/types/src/model/examples.d.ts +15 -0
  136. package/dist/types/src/model/font-faces.d.ts +24 -0
  137. package/dist/types/src/model/fonts.d.ts +47 -0
  138. package/dist/types/src/model/footnote.d.ts +34 -0
  139. package/dist/types/src/model/frame.d.ts +71 -0
  140. package/dist/types/src/model/geometry.d.ts +29 -0
  141. package/dist/types/src/model/graph.d.ts +53 -0
  142. package/dist/types/src/model/heading.d.ts +38 -0
  143. package/dist/types/src/model/icons.d.ts +2 -0
  144. package/dist/types/src/model/label-hits.d.ts +27 -0
  145. package/dist/types/src/model/labels.d.ts +88 -0
  146. package/dist/types/src/model/legend.d.ts +25 -0
  147. package/dist/types/src/model/link.d.ts +63 -0
  148. package/dist/types/src/model/markers.d.ts +47 -0
  149. package/dist/types/src/model/note.d.ts +75 -0
  150. package/dist/types/src/model/panels.d.ts +11 -0
  151. package/dist/types/src/model/rich-text.d.ts +24 -0
  152. package/dist/types/src/model/routes.d.ts +170 -0
  153. package/dist/types/src/model/samples.d.ts +11 -0
  154. package/dist/types/src/model/stack.d.ts +8 -0
  155. package/dist/types/src/model/static-scene.d.ts +15 -0
  156. package/dist/types/src/model/status.d.ts +84 -0
  157. package/dist/types/src/model/styles.d.ts +13 -0
  158. package/dist/types/src/model/surface.d.ts +31 -0
  159. package/dist/types/src/model/types.d.ts +277 -0
  160. package/dist/types/src/runtime/svg-renderer.d.ts +38 -0
  161. package/dist/types/src/server/file-session.d.ts +19 -0
  162. package/dist/types/src/server/workspace.d.ts +21 -0
  163. package/dist/types/src/state/active-session.d.ts +479 -0
  164. package/dist/types/src/state/commands.d.ts +529 -0
  165. package/dist/types/src/state/comparison.d.ts +151 -0
  166. package/dist/types/src/state/files.d.ts +61 -0
  167. package/dist/types/src/state/keyboard.d.ts +6 -0
  168. package/dist/types/src/state/keys.d.ts +5 -0
  169. package/dist/types/src/state/launch.d.ts +61 -0
  170. package/dist/types/src/state/links.d.ts +11 -0
  171. package/dist/types/src/state/session/actions.d.ts +77 -0
  172. package/dist/types/src/state/session/canvas-text.d.ts +24 -0
  173. package/dist/types/src/state/session/document.d.ts +84 -0
  174. package/dist/types/src/state/session/editor.d.ts +81 -0
  175. package/dist/types/src/state/session/emphasis.d.ts +11 -0
  176. package/dist/types/src/state/session/file-session.d.ts +98 -0
  177. package/dist/types/src/state/session/index.d.ts +496 -0
  178. package/dist/types/src/state/session/layout.d.ts +79 -0
  179. package/dist/types/src/state/session/pointer.d.ts +19 -0
  180. package/dist/types/src/state/session/routing.d.ts +20 -0
  181. package/dist/types/src/state/session/scene.d.ts +144 -0
  182. package/dist/types/src/state/session/sculpt.d.ts +70 -0
  183. package/dist/types/src/state/toast.d.ts +14 -0
  184. package/dist/types/src/state/ui.d.ts +39 -0
  185. package/package.json +41 -3
@@ -0,0 +1,1771 @@
1
+ import { g as Ht } from "./chunk-5VM5RSS4-CaKe4sjM.js";
2
+ import { g as qt } from "./chunk-XXDRQBXY-B-AMQgD2.js";
3
+ import { s as Xt } from "./chunk-VQ5W62QI-CXRv7FiX.js";
4
+ import { _ as A, o as Qt, l as te, c as Ae, p as Jt, r as Zt, u as it, b as $t, s as e1, q as t1, a as s1, g as i1, t as r1, m as a1, v as n1, J as u1, x as o1, y as tt, k as st, z as l1, A as c1, B as h1, C as d1, D as p1, E as f1, F as g1, G as b1 } from "./mermaid.core-DXv6D2Sm.js";
5
+ import { c as k1 } from "./chunk-55XCU76K-DkZUAaqC.js";
6
+ import { c as A1 } from "./channel-qMvPU6eH.js";
7
+ var m1 = "flowchart-", C1 = class {
8
+ // cspell:ignore funs
9
+ constructor() {
10
+ this.vertexCounter = 0, this.config = Ae(), this.diagramId = "", this.vertices = /* @__PURE__ */ new Map(), this.edges = [], this.classes = /* @__PURE__ */ new Map(), this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.tooltips = /* @__PURE__ */ new Map(), this.subCount = 0, this.firstGraphFlag = !0, this.secCount = -1, this.posCrossRef = [], this.funs = [], this.setAccTitle = $t, this.setAccDescription = e1, this.setDiagramTitle = t1, this.getAccTitle = s1, this.getAccDescription = i1, this.getDiagramTitle = r1, this.funs.push(this.setupToolTips.bind(this)), this.addVertex = this.addVertex.bind(this), this.firstGraph = this.firstGraph.bind(this), this.setDirection = this.setDirection.bind(this), this.addSubGraph = this.addSubGraph.bind(this), this.addLink = this.addLink.bind(this), this.setLink = this.setLink.bind(this), this.updateLink = this.updateLink.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.destructLink = this.destructLink.bind(this), this.setClickEvent = this.setClickEvent.bind(this), this.setTooltip = this.setTooltip.bind(this), this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this), this.setClickFun = this.setClickFun.bind(this), this.bindFunctions = this.bindFunctions.bind(this), this.lex = {
11
+ firstGraph: this.firstGraph.bind(this)
12
+ }, this.clear(), this.setGen("gen-2");
13
+ }
14
+ static {
15
+ A(this, "FlowDB");
16
+ }
17
+ sanitizeText(e) {
18
+ return a1.sanitizeText(e, this.config);
19
+ }
20
+ sanitizeNodeLabelType(e) {
21
+ switch (e) {
22
+ case "markdown":
23
+ case "string":
24
+ case "text":
25
+ return e;
26
+ default:
27
+ return "markdown";
28
+ }
29
+ }
30
+ /**
31
+ * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness
32
+ * across multiple diagrams on the same page.
33
+ */
34
+ setDiagramId(e) {
35
+ this.diagramId = e;
36
+ }
37
+ /**
38
+ * Function to lookup domId from id in the graph definition.
39
+ * When diagramId is set, returns the prefixed version for DOM uniqueness.
40
+ *
41
+ * @param id - id of the node
42
+ */
43
+ lookUpDomId(e) {
44
+ for (const i of this.vertices.values())
45
+ if (i.id === e)
46
+ return this.diagramId ? `${this.diagramId}-${i.domId}` : i.domId;
47
+ return this.diagramId ? `${this.diagramId}-${e}` : e;
48
+ }
49
+ /**
50
+ * Function called by parser when a node definition has been found
51
+ */
52
+ addVertex(e, i, r, a, u, p, l = {}, g) {
53
+ if (!e || e.trim().length === 0)
54
+ return;
55
+ let c;
56
+ if (g !== void 0) {
57
+ let m;
58
+ g.includes(`
59
+ `) ? m = g + `
60
+ ` : m = `{
61
+ ` + g + `
62
+ }`, c = n1(m, { schema: u1 });
63
+ }
64
+ const _ = this.subGraphLookup.get(e);
65
+ if (_ && c) {
66
+ _.metadata = { ..._.metadata, ...c };
67
+ return;
68
+ }
69
+ const C = this.edges.find((m) => m.id === e);
70
+ if (C) {
71
+ const m = c;
72
+ m?.animate !== void 0 && (C.animate = m.animate), m?.animation !== void 0 && (C.animation = m.animation), m?.curve !== void 0 && (C.interpolate = m.curve);
73
+ return;
74
+ }
75
+ let v, b = this.vertices.get(e);
76
+ if (b === void 0 && (i === void 0 && r === void 0 && a !== void 0 && a !== null && te.warn(
77
+ `Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`
78
+ ), b = {
79
+ id: e,
80
+ labelType: "text",
81
+ domId: m1 + e + "-" + this.vertexCounter,
82
+ styles: [],
83
+ classes: []
84
+ }, this.vertices.set(e, b)), this.vertexCounter++, i !== void 0 ? (this.config = Ae(), v = this.sanitizeText(i.text.trim()), b.labelType = i.type, v.startsWith('"') && v.endsWith('"') && (v = v.substring(1, v.length - 1)), b.text = v) : b.text === void 0 && (b.text = e), r !== void 0 && (b.type = r), a?.forEach((m) => {
85
+ b.styles.push(m);
86
+ }), u?.forEach((m) => {
87
+ b.classes.push(m);
88
+ }), p !== void 0 && (b.dir = p), b.props === void 0 ? b.props = l : l !== void 0 && Object.assign(b.props, l), c !== void 0) {
89
+ if (c.shape) {
90
+ if (c.shape !== c.shape.toLowerCase() || c.shape.includes("_"))
91
+ throw new Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);
92
+ if (!o1(c.shape))
93
+ throw new Error(`No such shape: ${c.shape}.`);
94
+ b.type = c?.shape;
95
+ }
96
+ c?.label && (b.text = c?.label, b.labelType = this.sanitizeNodeLabelType(c?.labelType)), c?.icon && (b.icon = c?.icon, !c.label?.trim() && b.text === e && (b.text = "")), c?.form && (b.form = c?.form), c?.pos && (b.pos = c?.pos), c?.img && (b.img = c?.img, !c.label?.trim() && b.text === e && (b.text = "")), c?.constraint && (b.constraint = c.constraint), c.w && (b.assetWidth = Number(c.w)), c.h && (b.assetHeight = Number(c.h));
97
+ }
98
+ }
99
+ /**
100
+ * Function called by parser when a link/edge definition has been found
101
+ *
102
+ */
103
+ addSingleLink(e, i, r, a) {
104
+ const l = {
105
+ start: e,
106
+ end: i,
107
+ type: void 0,
108
+ text: "",
109
+ labelType: "text",
110
+ classes: [],
111
+ isUserDefinedId: !1,
112
+ interpolate: this.edges.defaultInterpolate
113
+ };
114
+ te.info("abc78 Got edge...", l);
115
+ const g = r.text;
116
+ if (g !== void 0 && (l.text = this.sanitizeText(g.text.trim()), l.text.startsWith('"') && l.text.endsWith('"') && (l.text = l.text.substring(1, l.text.length - 1)), l.labelType = this.sanitizeNodeLabelType(g.type)), r !== void 0 && (l.type = r.type, l.stroke = r.stroke, l.length = r.length > 10 ? 10 : r.length), a && !this.edges.some((c) => c.id === a))
117
+ l.id = a, l.isUserDefinedId = !0;
118
+ else {
119
+ const c = this.edges.filter((_) => _.start === l.start && _.end === l.end);
120
+ c.length === 0 ? l.id = tt(l.start, l.end, { counter: 0, prefix: "L" }) : l.id = tt(l.start, l.end, {
121
+ counter: c.length + 1,
122
+ prefix: "L"
123
+ });
124
+ }
125
+ if (this.edges.length < (this.config.maxEdges ?? 500))
126
+ te.info("Pushing edge..."), this.edges.push(l);
127
+ else
128
+ throw new Error(
129
+ `Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
130
+
131
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
132
+ You cannot set this config via configuration inside the diagram as it is a secure config.
133
+ You have to call mermaid.initialize.`
134
+ );
135
+ }
136
+ isLinkData(e) {
137
+ return e !== null && typeof e == "object" && "id" in e && typeof e.id == "string";
138
+ }
139
+ addLink(e, i, r) {
140
+ const a = this.isLinkData(r) ? r.id.replace("@", "") : void 0;
141
+ te.info("addLink", e, i, a);
142
+ for (const u of e)
143
+ for (const p of i) {
144
+ const l = u === e[e.length - 1], g = p === i[0];
145
+ l && g ? this.addSingleLink(u, p, r, a) : this.addSingleLink(u, p, r, void 0);
146
+ }
147
+ }
148
+ /**
149
+ * Updates a link's line interpolation algorithm
150
+ */
151
+ updateLinkInterpolate(e, i) {
152
+ e.forEach((r) => {
153
+ r === "default" ? this.edges.defaultInterpolate = i : this.edges[r].interpolate = i;
154
+ });
155
+ }
156
+ /**
157
+ * Updates a link with a style
158
+ *
159
+ */
160
+ updateLink(e, i) {
161
+ e.forEach((r) => {
162
+ if (typeof r == "number" && r >= this.edges.length)
163
+ throw new Error(
164
+ `The index ${r} 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.)`
165
+ );
166
+ r === "default" ? this.edges.defaultStyle = i : (this.edges[r].style = i, (this.edges[r]?.style?.length ?? 0) > 0 && !this.edges[r]?.style?.some((a) => a?.startsWith("fill")) && this.edges[r]?.style?.push("fill:none"));
167
+ });
168
+ }
169
+ addClass(e, i) {
170
+ const r = i.join().replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
171
+ e.split(",").forEach((a) => {
172
+ let u = this.classes.get(a);
173
+ u === void 0 && (u = { id: a, styles: [], textStyles: [] }, this.classes.set(a, u)), r?.forEach((p) => {
174
+ if (/color/.exec(p)) {
175
+ const l = p.replace("fill", "bgFill");
176
+ u.textStyles.push(l);
177
+ }
178
+ u.styles.push(p);
179
+ });
180
+ });
181
+ }
182
+ /**
183
+ * Called by parser when a graph definition is found, stores the direction of the chart.
184
+ *
185
+ */
186
+ setDirection(e) {
187
+ this.direction = e.trim(), /.*</.exec(this.direction) && (this.direction = "RL"), /.*\^/.exec(this.direction) && (this.direction = "BT"), /.*>/.exec(this.direction) && (this.direction = "LR"), /.*v/.exec(this.direction) && (this.direction = "TB"), this.direction === "TD" && (this.direction = "TB");
188
+ }
189
+ /**
190
+ * Called by parser when a special node is found, e.g. a clickable element.
191
+ *
192
+ * @param ids - Comma separated list of ids
193
+ * @param className - Class to add
194
+ */
195
+ setClass(e, i) {
196
+ for (const r of e.split(",")) {
197
+ const a = this.vertices.get(r);
198
+ a && a.classes.push(i);
199
+ const u = this.edges.find((l) => l.id === r);
200
+ u && u.classes.push(i);
201
+ const p = this.subGraphLookup.get(r);
202
+ p && p.classes.push(i);
203
+ }
204
+ }
205
+ setTooltip(e, i) {
206
+ if (i !== void 0) {
207
+ i = this.sanitizeText(i);
208
+ for (const r of e.split(","))
209
+ this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(r) : r, i);
210
+ }
211
+ }
212
+ setClickFun(e, i, r) {
213
+ if (Ae().securityLevel !== "loose" || i === void 0)
214
+ return;
215
+ let a = [];
216
+ if (typeof r == "string") {
217
+ a = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
218
+ for (let p = 0; p < a.length; p++) {
219
+ let l = a[p].trim();
220
+ l.startsWith('"') && l.endsWith('"') && (l = l.substr(1, l.length - 2)), a[p] = l;
221
+ }
222
+ }
223
+ a.length === 0 && a.push(e);
224
+ const u = this.vertices.get(e);
225
+ u && (u.haveCallback = !0, this.funs.push(() => {
226
+ const p = this.lookUpDomId(e), l = document.querySelector(`[id="${p}"]`);
227
+ l !== null && l.addEventListener(
228
+ "click",
229
+ () => {
230
+ it.runFunc(i, ...a);
231
+ },
232
+ !1
233
+ );
234
+ }));
235
+ }
236
+ /**
237
+ * Called by parser when a link is found. Adds the URL to the vertex data.
238
+ *
239
+ * @param ids - Comma separated list of ids
240
+ * @param linkStr - URL to create a link for
241
+ * @param target - Target attribute for the link
242
+ */
243
+ setLink(e, i, r) {
244
+ e.split(",").forEach((a) => {
245
+ const u = this.vertices.get(a);
246
+ u !== void 0 && (u.link = it.formatUrl(i, this.config), u.linkTarget = r);
247
+ }), this.setClass(e, "clickable");
248
+ }
249
+ getTooltip(e) {
250
+ return this.tooltips.get(e);
251
+ }
252
+ /**
253
+ * Called by parser when a click definition is found. Registers an event handler.
254
+ *
255
+ * @param ids - Comma separated list of ids
256
+ * @param functionName - Function to be called on click
257
+ * @param functionArgs - Arguments to be passed to the function
258
+ */
259
+ setClickEvent(e, i, r) {
260
+ e.split(",").forEach((a) => {
261
+ this.setClickFun(a, i, r);
262
+ }), this.setClass(e, "clickable");
263
+ }
264
+ bindFunctions(e) {
265
+ this.funs.forEach((i) => {
266
+ i(e);
267
+ });
268
+ }
269
+ getDirection() {
270
+ return this.direction?.trim();
271
+ }
272
+ /**
273
+ * Retrieval function for fetching the found nodes after parsing has completed.
274
+ *
275
+ */
276
+ getVertices() {
277
+ return this.vertices;
278
+ }
279
+ /**
280
+ * Retrieval function for fetching the found links after parsing has completed.
281
+ *
282
+ */
283
+ getEdges() {
284
+ return this.edges;
285
+ }
286
+ /**
287
+ * Retrieval function for fetching the found class definitions after parsing has completed.
288
+ *
289
+ */
290
+ getClasses() {
291
+ return this.classes;
292
+ }
293
+ setupToolTips(e) {
294
+ const i = k1();
295
+ st(e).select("svg").selectAll("g.node").on("mouseover", (u) => {
296
+ const p = st(u.currentTarget), l = p.attr("title");
297
+ if (l === null)
298
+ return;
299
+ const g = u.currentTarget?.getBoundingClientRect();
300
+ i.transition().duration(200).style("opacity", ".9"), i.text(p.attr("title")).style("left", window.scrollX + g.left + (g.right - g.left) / 2 + "px").style("top", window.scrollY + g.bottom + "px"), i.html(l1.sanitize(l)), p.classed("hover", !0);
301
+ }).on("mouseout", (u) => {
302
+ i.transition().duration(500).style("opacity", 0), st(u.currentTarget).classed("hover", !1);
303
+ });
304
+ }
305
+ /**
306
+ * Clears the internal graph db so that a new graph can be parsed.
307
+ *
308
+ */
309
+ clear(e = "gen-2") {
310
+ this.vertices = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.diagramId = "", this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.subCount = 0, this.tooltips = /* @__PURE__ */ new Map(), this.firstGraphFlag = !0, this.version = e, this.config = Ae(), c1();
311
+ }
312
+ setGen(e) {
313
+ this.version = e || "gen-2";
314
+ }
315
+ defaultStyle() {
316
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
317
+ }
318
+ addSubGraph(e, i, r) {
319
+ let a = e.text.trim(), u = r.text;
320
+ e === r && /\s/.exec(r.text) && (a = void 0);
321
+ const l = (/* @__PURE__ */ A((b) => {
322
+ const m = { boolean: {}, number: {}, string: {} }, y = [];
323
+ let V;
324
+ return { nodeList: b.filter(function(o) {
325
+ const d = typeof o;
326
+ return o.stmt && o.stmt === "dir" ? (V = o.value, !1) : o.trim() === "" ? !1 : d in m ? m[d].hasOwnProperty(o) ? !1 : m[d][o] = !0 : y.includes(o) ? !1 : y.push(o);
327
+ }), dir: V };
328
+ }, "uniq"))(i.flat()), g = l.nodeList;
329
+ let c = l.dir;
330
+ const _ = Ae().flowchart ?? {};
331
+ if (c = c ?? (_.inheritDir ? this.getDirection() ?? Ae().direction ?? void 0 : void 0), this.version === "gen-1")
332
+ for (let b = 0; b < g.length; b++)
333
+ g[b] = this.lookUpDomId(g[b]);
334
+ a = a ?? "subGraph" + this.subCount, u = u || "", u = this.sanitizeText(u), this.subCount = this.subCount + 1;
335
+ const C = {
336
+ id: a,
337
+ nodes: g,
338
+ title: u.trim(),
339
+ classes: [],
340
+ dir: c,
341
+ labelType: this.sanitizeNodeLabelType(r?.type)
342
+ };
343
+ te.info("Adding", C.id, C.nodes, C.dir), C.nodes = this.makeUniq(C, this.subGraphs).nodes.filter(
344
+ (b) => b !== a
345
+ );
346
+ const v = this.subGraphs.find((b) => b.id === a);
347
+ return v ? v.nodes.push(...C.nodes) : this.subGraphs.push(C), this.subGraphLookup.set(a, v ?? C), a;
348
+ }
349
+ getPosForId(e) {
350
+ for (const [i, r] of this.subGraphs.entries())
351
+ if (r.id === e)
352
+ return i;
353
+ return -1;
354
+ }
355
+ indexNodes2(e, i) {
356
+ const r = this.subGraphs[i].nodes;
357
+ if (this.secCount = this.secCount + 1, this.secCount > 2e3)
358
+ return {
359
+ result: !1,
360
+ count: 0
361
+ };
362
+ if (this.posCrossRef[this.secCount] = i, this.subGraphs[i].id === e)
363
+ return {
364
+ result: !0,
365
+ count: 0
366
+ };
367
+ let a = 0, u = 1;
368
+ for (; a < r.length; ) {
369
+ const p = this.getPosForId(r[a]);
370
+ if (p >= 0) {
371
+ const l = this.indexNodes2(e, p);
372
+ if (l.result)
373
+ return {
374
+ result: !0,
375
+ count: u + l.count
376
+ };
377
+ u = u + l.count;
378
+ }
379
+ a = a + 1;
380
+ }
381
+ return {
382
+ result: !1,
383
+ count: u
384
+ };
385
+ }
386
+ getDepthFirstPos(e) {
387
+ return this.posCrossRef[e];
388
+ }
389
+ indexNodes() {
390
+ this.secCount = -1, this.subGraphs.length > 0 && this.indexNodes2("none", this.subGraphs.length - 1);
391
+ }
392
+ getSubGraphs() {
393
+ return this.subGraphs;
394
+ }
395
+ firstGraph() {
396
+ return this.firstGraphFlag ? (this.firstGraphFlag = !1, !0) : !1;
397
+ }
398
+ destructStartLink(e) {
399
+ let i = e.trim(), r = "arrow_open";
400
+ switch (i[0]) {
401
+ case "<":
402
+ r = "arrow_point", i = i.slice(1);
403
+ break;
404
+ case "x":
405
+ r = "arrow_cross", i = i.slice(1);
406
+ break;
407
+ case "o":
408
+ r = "arrow_circle", i = i.slice(1);
409
+ break;
410
+ }
411
+ let a = "normal";
412
+ return i.includes("=") && (a = "thick"), i.includes(".") && (a = "dotted"), { type: r, stroke: a };
413
+ }
414
+ countChar(e, i) {
415
+ const r = i.length;
416
+ let a = 0;
417
+ for (let u = 0; u < r; ++u)
418
+ i[u] === e && ++a;
419
+ return a;
420
+ }
421
+ destructEndLink(e) {
422
+ const i = e.trim();
423
+ let r = i.slice(0, -1), a = "arrow_open";
424
+ switch (i.slice(-1)) {
425
+ case "x":
426
+ a = "arrow_cross", i.startsWith("x") && (a = "double_" + a, r = r.slice(1));
427
+ break;
428
+ case ">":
429
+ a = "arrow_point", i.startsWith("<") && (a = "double_" + a, r = r.slice(1));
430
+ break;
431
+ case "o":
432
+ a = "arrow_circle", i.startsWith("o") && (a = "double_" + a, r = r.slice(1));
433
+ break;
434
+ }
435
+ let u = "normal", p = r.length - 1;
436
+ r.startsWith("=") && (u = "thick"), r.startsWith("~") && (u = "invisible");
437
+ const l = this.countChar(".", r);
438
+ return l && (u = "dotted", p = l), { type: a, stroke: u, length: p };
439
+ }
440
+ destructLink(e, i) {
441
+ const r = this.destructEndLink(e);
442
+ let a;
443
+ if (i) {
444
+ if (a = this.destructStartLink(i), a.stroke !== r.stroke)
445
+ return { type: "INVALID", stroke: "INVALID" };
446
+ if (a.type === "arrow_open")
447
+ a.type = r.type;
448
+ else {
449
+ if (a.type !== r.type)
450
+ return { type: "INVALID", stroke: "INVALID" };
451
+ a.type = "double_" + a.type;
452
+ }
453
+ return a.type === "double_arrow" && (a.type = "double_arrow_point"), a.length = r.length, a;
454
+ }
455
+ return r;
456
+ }
457
+ // Todo optimizer this by caching existing nodes
458
+ exists(e, i) {
459
+ for (const r of e)
460
+ if (r.nodes.includes(i))
461
+ return !0;
462
+ return !1;
463
+ }
464
+ /**
465
+ * Deletes an id from all subgraphs
466
+ *
467
+ */
468
+ makeUniq(e, i) {
469
+ const r = [];
470
+ return e.nodes.forEach((a, u) => {
471
+ this.exists(i, a) || r.push(e.nodes[u]);
472
+ }), { nodes: r };
473
+ }
474
+ getTypeFromVertex(e) {
475
+ if (e.img)
476
+ return "imageSquare";
477
+ if (e.icon)
478
+ return e.form === "circle" ? "iconCircle" : e.form === "square" ? "iconSquare" : e.form === "rounded" ? "iconRounded" : "icon";
479
+ switch (e.type) {
480
+ case "square":
481
+ case void 0:
482
+ return "squareRect";
483
+ case "round":
484
+ return "roundedRect";
485
+ case "ellipse":
486
+ return "ellipse";
487
+ default:
488
+ return e.type;
489
+ }
490
+ }
491
+ findNode(e, i) {
492
+ return e.find((r) => r.id === i);
493
+ }
494
+ destructEdgeType(e) {
495
+ let i = "none", r = "arrow_point";
496
+ switch (e) {
497
+ case "arrow_point":
498
+ case "arrow_circle":
499
+ case "arrow_cross":
500
+ r = e;
501
+ break;
502
+ case "double_arrow_point":
503
+ case "double_arrow_circle":
504
+ case "double_arrow_cross":
505
+ i = e.replace("double_", ""), r = i;
506
+ break;
507
+ }
508
+ return { arrowTypeStart: i, arrowTypeEnd: r };
509
+ }
510
+ addNodeFromVertex(e, i, r, a, u, p) {
511
+ const l = r.get(e.id), g = a.get(e.id) ?? !1, c = this.findNode(i, e.id);
512
+ if (c)
513
+ c.cssStyles = e.styles, c.cssCompiledStyles = this.getCompiledStyles(e.classes), c.cssClasses = e.classes.join(" ");
514
+ else {
515
+ const _ = {
516
+ id: e.id,
517
+ label: e.text,
518
+ labelType: e.labelType,
519
+ labelStyle: "",
520
+ parentId: l,
521
+ padding: u.flowchart?.padding || 8,
522
+ cssStyles: e.styles,
523
+ cssCompiledStyles: this.getCompiledStyles(["default", "node", ...e.classes]),
524
+ cssClasses: "default " + e.classes.join(" "),
525
+ dir: e.dir,
526
+ domId: e.domId,
527
+ look: p,
528
+ link: e.link,
529
+ linkTarget: e.linkTarget,
530
+ tooltip: this.getTooltip(e.id),
531
+ icon: e.icon,
532
+ pos: e.pos,
533
+ img: e.img,
534
+ assetWidth: e.assetWidth,
535
+ assetHeight: e.assetHeight,
536
+ constraint: e.constraint
537
+ };
538
+ g ? i.push({
539
+ ..._,
540
+ isGroup: !0,
541
+ shape: "rect"
542
+ }) : i.push({
543
+ ..._,
544
+ isGroup: !1,
545
+ shape: this.getTypeFromVertex(e),
546
+ minWidth: u.flowchart?.minNodeWidth
547
+ });
548
+ }
549
+ }
550
+ getCompiledStyles(e) {
551
+ let i = [];
552
+ for (const r of e) {
553
+ const a = this.classes.get(r);
554
+ a?.styles && (i = [...i, ...a.styles ?? []].map((u) => u.trim())), a?.textStyles && (i = [...i, ...a.textStyles ?? []].map((u) => u.trim()));
555
+ }
556
+ return i;
557
+ }
558
+ getData() {
559
+ const e = Ae(), i = [], r = [], a = this.getSubGraphs(), u = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
560
+ for (const o of a)
561
+ for (const d of o.nodes)
562
+ this.subGraphLookup.has(d) && l.set(d, o.id);
563
+ const g = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
564
+ for (const o of a) {
565
+ const d = l.get(o.id);
566
+ d !== void 0 && c.set(d, [...c.get(d) ?? [], o.id]);
567
+ }
568
+ let _ = 0;
569
+ const C = /* @__PURE__ */ A((o) => {
570
+ g.set(o, _++);
571
+ for (const d of c.get(o) ?? [])
572
+ C(d);
573
+ }, "walk");
574
+ for (const o of a)
575
+ l.has(o.id) || C(o.id);
576
+ const v = /* @__PURE__ */ A((o) => this.subGraphLookup.get(o)?.metadata?.view === "collapsed", "isCollapsed"), b = /* @__PURE__ */ A((o) => {
577
+ let d;
578
+ const H = /* @__PURE__ */ new Set();
579
+ let q = o;
580
+ for (; q !== void 0 && !H.has(q); )
581
+ H.add(q), v(q) && (d = q), q = l.get(q);
582
+ return d;
583
+ }, "outermostCollapsed"), m = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Map();
584
+ for (const o of a) {
585
+ const d = b(o.id);
586
+ if (d !== void 0) {
587
+ o.id !== d && (m.add(o.id), y.set(o.id, d));
588
+ for (const H of o.nodes)
589
+ H !== d && (m.add(H), y.set(H, d));
590
+ }
591
+ }
592
+ for (let o = a.length - 1; o >= 0; o--) {
593
+ const d = a[o];
594
+ if (!m.has(d.id)) {
595
+ d.nodes.length > 0 && p.set(d.id, !0);
596
+ for (const H of d.nodes)
597
+ u.set(H, d.id);
598
+ }
599
+ }
600
+ for (let o = a.length - 1; o >= 0; o--) {
601
+ const d = a[o];
602
+ m.has(d.id) || (d.metadata?.view === "collapsed" ? i.push({
603
+ id: d.id,
604
+ label: d.title,
605
+ labelStyle: "",
606
+ labelType: d.labelType,
607
+ parentId: u.get(d.id),
608
+ padding: 8,
609
+ cssCompiledStyles: this.getCompiledStyles(d.classes),
610
+ cssClasses: d.classes.join(" "),
611
+ shape: "collapsedGroup",
612
+ dir: d.dir,
613
+ isGroup: !1,
614
+ look: e.look,
615
+ // A collapsed subgraph still consumes its slot, so the cycle does not shift
616
+ // when one is collapsed.
617
+ colorIndex: g.get(d.id)
618
+ }) : i.push({
619
+ id: d.id,
620
+ label: d.title,
621
+ labelStyle: "",
622
+ labelType: d.labelType,
623
+ parentId: u.get(d.id),
624
+ padding: 8,
625
+ cssCompiledStyles: this.getCompiledStyles(d.classes),
626
+ cssClasses: d.classes.join(" "),
627
+ shape: "rect",
628
+ dir: d.dir,
629
+ isGroup: !0,
630
+ look: e.look,
631
+ colorIndex: g.get(d.id),
632
+ // Forwarded so layout engines can read per-container settings such as
633
+ // `@{ algorithm: elk.box }`. `view` is consumed above; everything else
634
+ // is opaque here and simply passed through. The cast is the
635
+ // interface-vs-index-signature gap: `NodeMetaData` is an interface, so
636
+ // it is not structurally assignable to `Record<string, unknown>`.
637
+ metadata: d.metadata
638
+ }));
639
+ }
640
+ this.getVertices().forEach((o) => {
641
+ m.has(o.id) || this.addNodeFromVertex(o, i, u, p, e, e.look || "classic");
642
+ });
643
+ const fe = this.getEdges();
644
+ return fe.forEach((o, d) => {
645
+ const { arrowTypeStart: H, arrowTypeEnd: q } = this.destructEdgeType(o.type), w = [...fe.defaultStyle ?? []], I = y.get(o.start) ?? o.start, R = y.get(o.end) ?? o.end;
646
+ if (I === R && (y.has(o.start) || y.has(o.end)))
647
+ return;
648
+ o.style && w.push(...o.style);
649
+ const N = {
650
+ id: tt(I, R, { counter: d, prefix: "L" }, o.id),
651
+ isUserDefinedId: o.isUserDefinedId,
652
+ start: I,
653
+ end: R,
654
+ type: o.type ?? "normal",
655
+ label: o.text,
656
+ labelType: o.labelType,
657
+ labelpos: "c",
658
+ thickness: o.stroke,
659
+ minlen: o.length,
660
+ classes: o?.stroke === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
661
+ arrowTypeStart: o?.stroke === "invisible" || o?.type === "arrow_open" ? "none" : H,
662
+ arrowTypeEnd: o?.stroke === "invisible" || o?.type === "arrow_open" ? "none" : q,
663
+ arrowheadStyle: "fill: #333",
664
+ cssCompiledStyles: this.getCompiledStyles(o.classes),
665
+ labelStyle: w,
666
+ style: w,
667
+ pattern: o.stroke,
668
+ look: e.look,
669
+ animate: o.animate,
670
+ animation: o.animation,
671
+ curve: o.interpolate || this.edges.defaultInterpolate || e.flowchart?.curve
672
+ };
673
+ r.push(N);
674
+ }), { nodes: i, edges: r, other: {}, config: e };
675
+ }
676
+ defaultConfig() {
677
+ return h1.flowchart;
678
+ }
679
+ }, D1 = /* @__PURE__ */ A(function(e, i) {
680
+ return i.db.getClasses();
681
+ }, "getClasses"), T1 = /* @__PURE__ */ A(async function(e, i, r, a) {
682
+ te.info("REF0:"), te.info("Drawing state diagram (v2)", i);
683
+ const { securityLevel: u, flowchart: p, layout: l } = Ae();
684
+ a.db.setDiagramId(i), te.debug("Before getData: ");
685
+ const g = a.db.getData();
686
+ te.debug("Data: ", g);
687
+ const c = qt(i, u), _ = a.db.getDirection();
688
+ g.type = a.type, g.layoutAlgorithm = Jt(l), g.direction = _, g.nodeSpacing = p?.nodeSpacing || 50, g.rankSpacing = p?.rankSpacing || 50, g.markers = ["point", "circle", "cross"], g.diagramId = i, te.debug("REF1:", g), await Zt(g, c);
689
+ const C = g.config.flowchart?.diagramPadding ?? 8;
690
+ it.insertTitle(
691
+ c,
692
+ "flowchartTitleText",
693
+ p?.titleTopMargin || 0,
694
+ a.db.getDiagramTitle()
695
+ ), Xt(c, C, "flowchart", p?.useMaxWidth || !1);
696
+ }, "draw"), S1 = {
697
+ getClasses: D1,
698
+ draw: T1
699
+ }, rt = (function() {
700
+ var e = /* @__PURE__ */ A(function(ke, h, f, k) {
701
+ for (f = f || {}, k = ke.length; k--; f[ke[k]] = h) ;
702
+ return f;
703
+ }, "o"), i = [1, 4], r = [1, 3], a = [1, 5], u = [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], p = [2, 2], l = [1, 13], g = [1, 14], c = [1, 15], _ = [1, 16], C = [1, 23], v = [1, 25], b = [1, 26], m = [1, 27], y = [1, 50], V = [1, 49], fe = [1, 29], o = [1, 30], d = [1, 31], H = [1, 32], q = [1, 33], w = [1, 45], I = [1, 47], R = [1, 43], N = [1, 48], P = [1, 44], O = [1, 51], M = [1, 46], U = [1, 52], W = [1, 53], Oe = [1, 34], Me = [1, 35], Ue = [1, 36], We = [1, 37], ze = [1, 38], ge = [1, 58], x = [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], se = [1, 62], ie = [1, 61], re = [1, 63], Te = [8, 9, 11, 75, 77, 78], at = [1, 79], Se = [1, 92], Ee = [1, 97], ye = [1, 96], xe = [1, 93], Fe = [1, 89], _e = [1, 95], Be = [1, 91], ve = [1, 98], Le = [1, 94], Ve = [1, 99], we = [1, 90], me = [8, 9, 10, 11, 40, 75, 77, 78], j = [8, 9, 10, 11, 40, 46, 75, 77, 78], Q = [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], nt = [8, 9, 11, 44, 60, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], Ie = [44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], ut = [1, 122], ot = [1, 123], je = [1, 125], Ke = [1, 124], lt = [44, 60, 62, 74, 89, 102, 105, 106, 109, 111, 114, 115, 116], ct = [1, 134], ht = [1, 148], dt = [1, 149], pt = [1, 150], ft = [1, 151], gt = [1, 136], bt = [1, 138], kt = [1, 142], At = [1, 143], mt = [1, 144], Ct = [1, 145], Dt = [1, 146], Tt = [1, 147], St = [1, 152], Et = [1, 153], yt = [1, 132], xt = [1, 133], Ft = [1, 140], _t = [1, 135], Bt = [1, 139], vt = [1, 137], Xe = [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], Lt = [1, 155], Vt = [1, 157], L = [8, 9, 11], J = [8, 9, 10, 11, 14, 44, 60, 89, 105, 106, 109, 111, 114, 115, 116], D = [1, 177], K = [1, 173], Y = [1, 174], T = [1, 178], S = [1, 175], E = [1, 176], Re = [77, 116, 119], F = [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], wt = [10, 106], be = [31, 49, 51, 53, 55, 57, 62, 64, 66, 67, 69, 71, 116, 117, 118], ae = [1, 248], ne = [1, 246], ue = [1, 250], oe = [1, 244], le = [1, 245], ce = [1, 247], he = [1, 249], de = [1, 251], Ne = [1, 269], It = [8, 9, 11, 106], ee = [8, 9, 10, 11, 60, 84, 105, 106, 109, 110, 111, 112], Qe = {
704
+ trace: /* @__PURE__ */ A(function() {
705
+ }, "trace"),
706
+ yy: {},
707
+ 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 },
708
+ 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" },
709
+ 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]],
710
+ performAction: /* @__PURE__ */ A(function(h, f, k, n, B, t, Pe) {
711
+ var s = t.length - 1;
712
+ switch (B) {
713
+ case 2:
714
+ this.$ = [];
715
+ break;
716
+ case 3:
717
+ (!Array.isArray(t[s]) || t[s].length > 0) && t[s - 1].push(t[s]), this.$ = t[s - 1];
718
+ break;
719
+ case 4:
720
+ case 183:
721
+ this.$ = t[s];
722
+ break;
723
+ case 11:
724
+ n.setDirection("TB"), this.$ = "TB";
725
+ break;
726
+ case 12:
727
+ n.setDirection(t[s - 1]), this.$ = t[s - 1];
728
+ break;
729
+ case 27:
730
+ this.$ = t[s - 1].nodes;
731
+ break;
732
+ case 28:
733
+ case 29:
734
+ case 30:
735
+ case 31:
736
+ case 32:
737
+ this.$ = [];
738
+ break;
739
+ case 33:
740
+ this.$ = n.addSubGraph(t[s - 6], t[s - 1], t[s - 4]);
741
+ break;
742
+ case 34:
743
+ this.$ = n.addSubGraph(t[s - 3], t[s - 1], t[s - 3]);
744
+ break;
745
+ case 35:
746
+ this.$ = n.addSubGraph(void 0, t[s - 1], void 0);
747
+ break;
748
+ case 37:
749
+ this.$ = t[s].trim(), n.setAccTitle(this.$);
750
+ break;
751
+ case 38:
752
+ case 39:
753
+ this.$ = t[s].trim(), n.setAccDescription(this.$);
754
+ break;
755
+ case 43:
756
+ this.$ = t[s - 1] + t[s];
757
+ break;
758
+ case 44:
759
+ this.$ = t[s];
760
+ break;
761
+ case 45:
762
+ n.addVertex(t[s - 1][t[s - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[s]), n.addLink(t[s - 3].stmt, t[s - 1], t[s - 2]), this.$ = { stmt: t[s - 1], nodes: t[s - 1].concat(t[s - 3].nodes) };
763
+ break;
764
+ case 46:
765
+ n.addLink(t[s - 2].stmt, t[s], t[s - 1]), this.$ = { stmt: t[s], nodes: t[s].concat(t[s - 2].nodes) };
766
+ break;
767
+ case 47:
768
+ n.addLink(t[s - 3].stmt, t[s - 1], t[s - 2]), this.$ = { stmt: t[s - 1], nodes: t[s - 1].concat(t[s - 3].nodes) };
769
+ break;
770
+ case 48:
771
+ this.$ = { stmt: t[s - 1], nodes: t[s - 1] };
772
+ break;
773
+ case 49:
774
+ n.addVertex(t[s - 1][t[s - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[s]), this.$ = { stmt: t[s - 1], nodes: t[s - 1], shapeData: t[s] };
775
+ break;
776
+ case 50:
777
+ this.$ = { stmt: t[s], nodes: t[s] };
778
+ break;
779
+ case 51:
780
+ this.$ = [t[s]];
781
+ break;
782
+ case 52:
783
+ n.addVertex(t[s - 5][t[s - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[s - 4]), this.$ = t[s - 5].concat(t[s]);
784
+ break;
785
+ case 53:
786
+ this.$ = t[s - 4].concat(t[s]);
787
+ break;
788
+ case 54:
789
+ this.$ = t[s];
790
+ break;
791
+ case 55:
792
+ this.$ = t[s - 2], n.setClass(t[s - 2], t[s]);
793
+ break;
794
+ case 56:
795
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "square");
796
+ break;
797
+ case 57:
798
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "doublecircle");
799
+ break;
800
+ case 58:
801
+ this.$ = t[s - 5], n.addVertex(t[s - 5], t[s - 2], "circle");
802
+ break;
803
+ case 59:
804
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "ellipse");
805
+ break;
806
+ case 60:
807
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "stadium");
808
+ break;
809
+ case 61:
810
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "subroutine");
811
+ break;
812
+ case 62:
813
+ this.$ = t[s - 7], n.addVertex(t[s - 7], t[s - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[t[s - 5], t[s - 3]]]));
814
+ break;
815
+ case 63:
816
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "cylinder");
817
+ break;
818
+ case 64:
819
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "round");
820
+ break;
821
+ case 65:
822
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "diamond");
823
+ break;
824
+ case 66:
825
+ this.$ = t[s - 5], n.addVertex(t[s - 5], t[s - 2], "hexagon");
826
+ break;
827
+ case 67:
828
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "odd");
829
+ break;
830
+ case 68:
831
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "trapezoid");
832
+ break;
833
+ case 69:
834
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "inv_trapezoid");
835
+ break;
836
+ case 70:
837
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "lean_right");
838
+ break;
839
+ case 71:
840
+ this.$ = t[s - 3], n.addVertex(t[s - 3], t[s - 1], "lean_left");
841
+ break;
842
+ case 72:
843
+ this.$ = t[s], n.addVertex(t[s]);
844
+ break;
845
+ case 73:
846
+ t[s - 1].text = t[s], this.$ = t[s - 1];
847
+ break;
848
+ case 74:
849
+ case 75:
850
+ t[s - 2].text = t[s - 1], this.$ = t[s - 2];
851
+ break;
852
+ case 76:
853
+ this.$ = t[s];
854
+ break;
855
+ case 77:
856
+ var G = n.destructLink(t[s], t[s - 2]);
857
+ this.$ = { type: G.type, stroke: G.stroke, length: G.length, text: t[s - 1] };
858
+ break;
859
+ case 78:
860
+ var G = n.destructLink(t[s], t[s - 2]);
861
+ this.$ = { type: G.type, stroke: G.stroke, length: G.length, text: t[s - 1], id: t[s - 3] };
862
+ break;
863
+ case 79:
864
+ this.$ = { text: t[s], type: "text" };
865
+ break;
866
+ case 80:
867
+ this.$ = { text: t[s - 1].text + "" + t[s], type: t[s - 1].type };
868
+ break;
869
+ case 81:
870
+ this.$ = { text: t[s], type: "string" };
871
+ break;
872
+ case 82:
873
+ this.$ = { text: t[s], type: "markdown" };
874
+ break;
875
+ case 83:
876
+ var G = n.destructLink(t[s]);
877
+ this.$ = { type: G.type, stroke: G.stroke, length: G.length };
878
+ break;
879
+ case 84:
880
+ var G = n.destructLink(t[s]);
881
+ this.$ = { type: G.type, stroke: G.stroke, length: G.length, id: t[s - 1] };
882
+ break;
883
+ case 85:
884
+ this.$ = t[s - 1];
885
+ break;
886
+ case 86:
887
+ this.$ = { text: t[s], type: "text" };
888
+ break;
889
+ case 87:
890
+ this.$ = { text: t[s - 1].text + "" + t[s], type: t[s - 1].type };
891
+ break;
892
+ case 88:
893
+ this.$ = { text: t[s], type: "string" };
894
+ break;
895
+ case 89:
896
+ case 104:
897
+ this.$ = { text: t[s], type: "markdown" };
898
+ break;
899
+ case 101:
900
+ this.$ = { text: t[s], type: "text" };
901
+ break;
902
+ case 102:
903
+ this.$ = { text: t[s - 1].text + "" + t[s], type: t[s - 1].type };
904
+ break;
905
+ case 103:
906
+ this.$ = { text: t[s], type: "text" };
907
+ break;
908
+ case 105:
909
+ this.$ = t[s - 4], n.addClass(t[s - 2], t[s]);
910
+ break;
911
+ case 106:
912
+ this.$ = t[s - 4], n.setClass(t[s - 2], t[s]);
913
+ break;
914
+ case 107:
915
+ case 115:
916
+ this.$ = t[s - 1], n.setClickEvent(t[s - 1], t[s]);
917
+ break;
918
+ case 108:
919
+ case 116:
920
+ this.$ = t[s - 3], n.setClickEvent(t[s - 3], t[s - 2]), n.setTooltip(t[s - 3], t[s]);
921
+ break;
922
+ case 109:
923
+ this.$ = t[s - 2], n.setClickEvent(t[s - 2], t[s - 1], t[s]);
924
+ break;
925
+ case 110:
926
+ this.$ = t[s - 4], n.setClickEvent(t[s - 4], t[s - 3], t[s - 2]), n.setTooltip(t[s - 4], t[s]);
927
+ break;
928
+ case 111:
929
+ this.$ = t[s - 2], n.setLink(t[s - 2], t[s]);
930
+ break;
931
+ case 112:
932
+ this.$ = t[s - 4], n.setLink(t[s - 4], t[s - 2]), n.setTooltip(t[s - 4], t[s]);
933
+ break;
934
+ case 113:
935
+ this.$ = t[s - 4], n.setLink(t[s - 4], t[s - 2], t[s]);
936
+ break;
937
+ case 114:
938
+ this.$ = t[s - 6], n.setLink(t[s - 6], t[s - 4], t[s]), n.setTooltip(t[s - 6], t[s - 2]);
939
+ break;
940
+ case 117:
941
+ this.$ = t[s - 1], n.setLink(t[s - 1], t[s]);
942
+ break;
943
+ case 118:
944
+ this.$ = t[s - 3], n.setLink(t[s - 3], t[s - 2]), n.setTooltip(t[s - 3], t[s]);
945
+ break;
946
+ case 119:
947
+ this.$ = t[s - 3], n.setLink(t[s - 3], t[s - 2], t[s]);
948
+ break;
949
+ case 120:
950
+ this.$ = t[s - 5], n.setLink(t[s - 5], t[s - 4], t[s]), n.setTooltip(t[s - 5], t[s - 2]);
951
+ break;
952
+ case 121:
953
+ this.$ = t[s - 4], n.addVertex(t[s - 2], void 0, void 0, t[s]);
954
+ break;
955
+ case 122:
956
+ this.$ = t[s - 4], n.updateLink([t[s - 2]], t[s]);
957
+ break;
958
+ case 123:
959
+ this.$ = t[s - 4], n.updateLink(t[s - 2], t[s]);
960
+ break;
961
+ case 124:
962
+ this.$ = t[s - 8], n.updateLinkInterpolate([t[s - 6]], t[s - 2]), n.updateLink([t[s - 6]], t[s]);
963
+ break;
964
+ case 125:
965
+ this.$ = t[s - 8], n.updateLinkInterpolate(t[s - 6], t[s - 2]), n.updateLink(t[s - 6], t[s]);
966
+ break;
967
+ case 126:
968
+ this.$ = t[s - 6], n.updateLinkInterpolate([t[s - 4]], t[s]);
969
+ break;
970
+ case 127:
971
+ this.$ = t[s - 6], n.updateLinkInterpolate(t[s - 4], t[s]);
972
+ break;
973
+ case 128:
974
+ case 130:
975
+ this.$ = [t[s]];
976
+ break;
977
+ case 129:
978
+ case 131:
979
+ t[s - 2].push(t[s]), this.$ = t[s - 2];
980
+ break;
981
+ case 133:
982
+ this.$ = t[s - 1] + t[s];
983
+ break;
984
+ case 181:
985
+ this.$ = t[s];
986
+ break;
987
+ case 182:
988
+ this.$ = t[s - 1] + "" + t[s];
989
+ break;
990
+ case 184:
991
+ this.$ = t[s - 1] + "" + t[s];
992
+ break;
993
+ case 185:
994
+ this.$ = { stmt: "dir", value: "TB" };
995
+ break;
996
+ case 186:
997
+ this.$ = { stmt: "dir", value: "BT" };
998
+ break;
999
+ case 187:
1000
+ this.$ = { stmt: "dir", value: "RL" };
1001
+ break;
1002
+ case 188:
1003
+ this.$ = { stmt: "dir", value: "LR" };
1004
+ break;
1005
+ case 189:
1006
+ this.$ = { stmt: "dir", value: "TD" };
1007
+ break;
1008
+ }
1009
+ }, "anonymous"),
1010
+ table: [{ 3: 1, 4: 2, 9: i, 10: r, 12: a }, { 1: [3] }, e(u, p, { 5: 6 }), { 4: 7, 9: i, 10: r, 12: a }, { 4: 8, 9: i, 10: r, 12: a }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: l, 9: g, 10: c, 11: _, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: C, 33: 24, 34: v, 36: b, 38: m, 42: 28, 43: 39, 44: y, 45: 40, 47: 41, 60: V, 84: fe, 85: o, 86: d, 87: H, 88: q, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W, 121: Oe, 122: Me, 123: Ue, 124: We, 125: ze }, e(u, [2, 9]), e(u, [2, 10]), e(u, [2, 11]), { 8: [1, 55], 9: [1, 56], 10: ge, 15: 54, 18: 57 }, e(x, [2, 3]), e(x, [2, 4]), e(x, [2, 5]), e(x, [2, 6]), e(x, [2, 7]), e(x, [2, 8]), { 8: se, 9: ie, 11: re, 21: 59, 41: 60, 72: 64, 75: [1, 65], 77: [1, 67], 78: [1, 66] }, { 8: se, 9: ie, 11: re, 21: 68 }, { 8: se, 9: ie, 11: re, 21: 69 }, { 8: se, 9: ie, 11: re, 21: 70 }, { 8: se, 9: ie, 11: re, 21: 71 }, { 8: se, 9: ie, 11: re, 21: 72 }, { 8: se, 9: ie, 10: [1, 73], 11: re, 21: 74 }, e(x, [2, 36]), { 35: [1, 75] }, { 37: [1, 76] }, e(x, [2, 39]), e(Te, [2, 50], { 18: 77, 39: 78, 10: ge, 40: at }), { 10: [1, 80] }, { 10: [1, 81] }, { 10: [1, 82] }, { 10: [1, 83] }, { 14: Se, 44: Ee, 60: ye, 80: [1, 87], 89: xe, 95: [1, 84], 97: [1, 85], 101: 86, 105: Fe, 106: _e, 109: Be, 111: ve, 114: Le, 115: Ve, 116: we, 120: 88 }, e(x, [2, 185]), e(x, [2, 186]), e(x, [2, 187]), e(x, [2, 188]), e(x, [2, 189]), e(me, [2, 51]), e(me, [2, 54], { 46: [1, 100] }), e(j, [2, 72], { 113: 113, 29: [1, 101], 44: y, 48: [1, 102], 50: [1, 103], 52: [1, 104], 54: [1, 105], 56: [1, 106], 58: [1, 107], 60: V, 63: [1, 108], 65: [1, 109], 67: [1, 110], 68: [1, 111], 70: [1, 112], 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 114: M, 115: U, 116: W }), e(Q, [2, 181]), e(Q, [2, 142]), e(Q, [2, 143]), e(Q, [2, 144]), e(Q, [2, 145]), e(Q, [2, 146]), e(Q, [2, 147]), e(Q, [2, 148]), e(Q, [2, 149]), e(Q, [2, 150]), e(Q, [2, 151]), e(Q, [2, 152]), e(u, [2, 12]), e(u, [2, 18]), e(u, [2, 19]), { 9: [1, 114] }, e(nt, [2, 26], { 18: 115, 10: ge }), e(x, [2, 27]), { 42: 116, 43: 39, 44: y, 45: 40, 47: 41, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, e(x, [2, 40]), e(x, [2, 41]), e(x, [2, 42]), e(Ie, [2, 76], { 73: 117, 62: [1, 119], 74: [1, 118] }), { 76: 120, 79: 121, 80: ut, 81: ot, 116: je, 119: Ke }, { 75: [1, 126], 77: [1, 127] }, e(lt, [2, 83]), e(x, [2, 28]), e(x, [2, 29]), e(x, [2, 30]), e(x, [2, 31]), e(x, [2, 32]), { 10: ct, 12: ht, 14: dt, 27: pt, 28: 128, 32: ft, 44: gt, 60: bt, 75: kt, 80: [1, 130], 81: [1, 131], 83: 141, 84: At, 85: mt, 86: Ct, 87: Dt, 88: Tt, 89: St, 90: Et, 91: 129, 105: yt, 109: xt, 111: Ft, 114: _t, 115: Bt, 116: vt }, e(Xe, p, { 5: 154 }), e(x, [2, 37]), e(x, [2, 38]), e(Te, [2, 48], { 44: Lt }), e(Te, [2, 49], { 18: 156, 10: ge, 40: Vt }), e(me, [2, 44]), { 44: y, 47: 158, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, { 102: [1, 159], 103: 160, 105: [1, 161] }, { 44: y, 47: 162, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, { 44: y, 47: 163, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, e(L, [2, 107], { 10: [1, 164], 96: [1, 165] }), { 80: [1, 166] }, e(L, [2, 115], { 120: 168, 10: [1, 167], 14: Se, 44: Ee, 60: ye, 89: xe, 105: Fe, 106: _e, 109: Be, 111: ve, 114: Le, 115: Ve, 116: we }), e(L, [2, 117], { 10: [1, 169] }), e(J, [2, 183]), e(J, [2, 170]), e(J, [2, 171]), e(J, [2, 172]), e(J, [2, 173]), e(J, [2, 174]), e(J, [2, 175]), e(J, [2, 176]), e(J, [2, 177]), e(J, [2, 178]), e(J, [2, 179]), e(J, [2, 180]), { 44: y, 47: 170, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, { 30: 171, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 179, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 181, 50: [1, 180], 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 182, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 183, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 184, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 109: [1, 185] }, { 30: 186, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 187, 65: [1, 188], 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 189, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 190, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 30: 191, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, e(Q, [2, 182]), e(u, [2, 20]), e(nt, [2, 25]), e(Te, [2, 46], { 39: 192, 18: 193, 10: ge, 40: at }), e(Ie, [2, 73], { 10: [1, 194] }), { 10: [1, 195] }, { 30: 196, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 77: [1, 197], 79: 198, 116: je, 119: Ke }, e(Re, [2, 79]), e(Re, [2, 81]), e(Re, [2, 82]), e(Re, [2, 168]), e(Re, [2, 169]), { 76: 199, 79: 121, 80: ut, 81: ot, 116: je, 119: Ke }, e(lt, [2, 84]), { 8: se, 9: ie, 10: ct, 11: re, 12: ht, 14: dt, 21: 201, 27: pt, 29: [1, 200], 32: ft, 44: gt, 60: bt, 75: kt, 83: 141, 84: At, 85: mt, 86: Ct, 87: Dt, 88: Tt, 89: St, 90: Et, 91: 202, 105: yt, 109: xt, 111: Ft, 114: _t, 115: Bt, 116: vt }, e(F, [2, 101]), e(F, [2, 103]), e(F, [2, 104]), e(F, [2, 157]), e(F, [2, 158]), e(F, [2, 159]), e(F, [2, 160]), e(F, [2, 161]), e(F, [2, 162]), e(F, [2, 163]), e(F, [2, 164]), e(F, [2, 165]), e(F, [2, 166]), e(F, [2, 167]), e(F, [2, 90]), e(F, [2, 91]), e(F, [2, 92]), e(F, [2, 93]), e(F, [2, 94]), e(F, [2, 95]), e(F, [2, 96]), e(F, [2, 97]), e(F, [2, 98]), e(F, [2, 99]), e(F, [2, 100]), { 6: 11, 7: 12, 8: l, 9: g, 10: c, 11: _, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: C, 32: [1, 203], 33: 24, 34: v, 36: b, 38: m, 42: 28, 43: 39, 44: y, 45: 40, 47: 41, 60: V, 84: fe, 85: o, 86: d, 87: H, 88: q, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W, 121: Oe, 122: Me, 123: Ue, 124: We, 125: ze }, { 10: ge, 18: 204 }, { 44: [1, 205] }, e(me, [2, 43]), { 10: [1, 206], 44: y, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 113, 114: M, 115: U, 116: W }, { 10: [1, 207] }, { 10: [1, 208], 106: [1, 209] }, e(wt, [2, 128]), { 10: [1, 210], 44: y, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 113, 114: M, 115: U, 116: W }, { 10: [1, 211], 44: y, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 113, 114: M, 115: U, 116: W }, { 80: [1, 212] }, e(L, [2, 109], { 10: [1, 213] }), e(L, [2, 111], { 10: [1, 214] }), { 80: [1, 215] }, e(J, [2, 184]), { 80: [1, 216], 98: [1, 217] }, e(me, [2, 55], { 113: 113, 44: y, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 114: M, 115: U, 116: W }), { 31: [1, 218], 67: D, 82: 219, 116: T, 117: S, 118: E }, e(be, [2, 86]), e(be, [2, 88]), e(be, [2, 89]), e(be, [2, 153]), e(be, [2, 154]), e(be, [2, 155]), e(be, [2, 156]), { 49: [1, 220], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 30: 221, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 51: [1, 222], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 53: [1, 223], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 55: [1, 224], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 57: [1, 225], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 60: [1, 226] }, { 64: [1, 227], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 66: [1, 228], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 30: 229, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, { 31: [1, 230], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 67: D, 69: [1, 231], 71: [1, 232], 82: 219, 116: T, 117: S, 118: E }, { 67: D, 69: [1, 234], 71: [1, 233], 82: 219, 116: T, 117: S, 118: E }, e(Te, [2, 45], { 18: 156, 10: ge, 40: Vt }), e(Te, [2, 47], { 44: Lt }), e(Ie, [2, 75]), e(Ie, [2, 74]), { 62: [1, 235], 67: D, 82: 219, 116: T, 117: S, 118: E }, e(Ie, [2, 77]), e(Re, [2, 80]), { 77: [1, 236], 79: 198, 116: je, 119: Ke }, { 30: 237, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, e(Xe, p, { 5: 238 }), e(F, [2, 102]), e(x, [2, 35]), { 43: 239, 44: y, 45: 40, 47: 41, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, { 10: ge, 18: 240 }, { 10: ae, 60: ne, 84: ue, 92: 241, 105: oe, 107: 242, 108: 243, 109: le, 110: ce, 111: he, 112: de }, { 10: ae, 60: ne, 84: ue, 92: 252, 104: [1, 253], 105: oe, 107: 242, 108: 243, 109: le, 110: ce, 111: he, 112: de }, { 10: ae, 60: ne, 84: ue, 92: 254, 104: [1, 255], 105: oe, 107: 242, 108: 243, 109: le, 110: ce, 111: he, 112: de }, { 105: [1, 256] }, { 10: ae, 60: ne, 84: ue, 92: 257, 105: oe, 107: 242, 108: 243, 109: le, 110: ce, 111: he, 112: de }, { 44: y, 47: 258, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, e(L, [2, 108]), { 80: [1, 259] }, { 80: [1, 260], 98: [1, 261] }, e(L, [2, 116]), e(L, [2, 118], { 10: [1, 262] }), e(L, [2, 119]), e(j, [2, 56]), e(be, [2, 87]), e(j, [2, 57]), { 51: [1, 263], 67: D, 82: 219, 116: T, 117: S, 118: E }, e(j, [2, 64]), e(j, [2, 59]), e(j, [2, 60]), e(j, [2, 61]), { 109: [1, 264] }, e(j, [2, 63]), e(j, [2, 65]), { 66: [1, 265], 67: D, 82: 219, 116: T, 117: S, 118: E }, e(j, [2, 67]), e(j, [2, 68]), e(j, [2, 70]), e(j, [2, 69]), e(j, [2, 71]), e([10, 44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], [2, 85]), e(Ie, [2, 78]), { 31: [1, 266], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 6: 11, 7: 12, 8: l, 9: g, 10: c, 11: _, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: C, 32: [1, 267], 33: 24, 34: v, 36: b, 38: m, 42: 28, 43: 39, 44: y, 45: 40, 47: 41, 60: V, 84: fe, 85: o, 86: d, 87: H, 88: q, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W, 121: Oe, 122: Me, 123: Ue, 124: We, 125: ze }, e(me, [2, 53]), { 43: 268, 44: y, 45: 40, 47: 41, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W }, e(L, [2, 121], { 106: Ne }), e(It, [2, 130], { 108: 270, 10: ae, 60: ne, 84: ue, 105: oe, 109: le, 110: ce, 111: he, 112: de }), e(ee, [2, 132]), e(ee, [2, 134]), e(ee, [2, 135]), e(ee, [2, 136]), e(ee, [2, 137]), e(ee, [2, 138]), e(ee, [2, 139]), e(ee, [2, 140]), e(ee, [2, 141]), e(L, [2, 122], { 106: Ne }), { 10: [1, 271] }, e(L, [2, 123], { 106: Ne }), { 10: [1, 272] }, e(wt, [2, 129]), e(L, [2, 105], { 106: Ne }), e(L, [2, 106], { 113: 113, 44: y, 60: V, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 114: M, 115: U, 116: W }), e(L, [2, 110]), e(L, [2, 112], { 10: [1, 273] }), e(L, [2, 113]), { 98: [1, 274] }, { 51: [1, 275] }, { 62: [1, 276] }, { 66: [1, 277] }, { 8: se, 9: ie, 11: re, 21: 278 }, e(x, [2, 34]), e(me, [2, 52]), { 10: ae, 60: ne, 84: ue, 105: oe, 107: 279, 108: 243, 109: le, 110: ce, 111: he, 112: de }, e(ee, [2, 133]), { 14: Se, 44: Ee, 60: ye, 89: xe, 101: 280, 105: Fe, 106: _e, 109: Be, 111: ve, 114: Le, 115: Ve, 116: we, 120: 88 }, { 14: Se, 44: Ee, 60: ye, 89: xe, 101: 281, 105: Fe, 106: _e, 109: Be, 111: ve, 114: Le, 115: Ve, 116: we, 120: 88 }, { 98: [1, 282] }, e(L, [2, 120]), e(j, [2, 58]), { 30: 283, 67: D, 80: K, 81: Y, 82: 172, 116: T, 117: S, 118: E }, e(j, [2, 66]), e(Xe, p, { 5: 284 }), e(It, [2, 131], { 108: 270, 10: ae, 60: ne, 84: ue, 105: oe, 109: le, 110: ce, 111: he, 112: de }), e(L, [2, 126], { 120: 168, 10: [1, 285], 14: Se, 44: Ee, 60: ye, 89: xe, 105: Fe, 106: _e, 109: Be, 111: ve, 114: Le, 115: Ve, 116: we }), e(L, [2, 127], { 120: 168, 10: [1, 286], 14: Se, 44: Ee, 60: ye, 89: xe, 105: Fe, 106: _e, 109: Be, 111: ve, 114: Le, 115: Ve, 116: we }), e(L, [2, 114]), { 31: [1, 287], 67: D, 82: 219, 116: T, 117: S, 118: E }, { 6: 11, 7: 12, 8: l, 9: g, 10: c, 11: _, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: C, 32: [1, 288], 33: 24, 34: v, 36: b, 38: m, 42: 28, 43: 39, 44: y, 45: 40, 47: 41, 60: V, 84: fe, 85: o, 86: d, 87: H, 88: q, 89: w, 102: I, 105: R, 106: N, 109: P, 111: O, 113: 42, 114: M, 115: U, 116: W, 121: Oe, 122: Me, 123: Ue, 124: We, 125: ze }, { 10: ae, 60: ne, 84: ue, 92: 289, 105: oe, 107: 242, 108: 243, 109: le, 110: ce, 111: he, 112: de }, { 10: ae, 60: ne, 84: ue, 92: 290, 105: oe, 107: 242, 108: 243, 109: le, 110: ce, 111: he, 112: de }, e(j, [2, 62]), e(x, [2, 33]), e(L, [2, 124], { 106: Ne }), e(L, [2, 125], { 106: Ne })],
1011
+ defaultActions: {},
1012
+ parseError: /* @__PURE__ */ A(function(h, f) {
1013
+ if (f.recoverable)
1014
+ this.trace(h);
1015
+ else {
1016
+ var k = new Error(h);
1017
+ throw k.hash = f, k;
1018
+ }
1019
+ }, "parseError"),
1020
+ parse: /* @__PURE__ */ A(function(h) {
1021
+ var f = this, k = [0], n = [], B = [null], t = [], Pe = this.table, s = "", G = 0, Rt = 0, zt = 2, Nt = 1, jt = t.slice.call(arguments, 1), z = Object.create(this.lexer), Ce = { yy: {} };
1022
+ for (var Je in this.yy)
1023
+ Object.prototype.hasOwnProperty.call(this.yy, Je) && (Ce.yy[Je] = this.yy[Je]);
1024
+ z.setInput(h, Ce.yy), Ce.yy.lexer = z, Ce.yy.parser = this, typeof z.yylloc > "u" && (z.yylloc = {});
1025
+ var Ze = z.yylloc;
1026
+ t.push(Ze);
1027
+ var Kt = z.options && z.options.ranges;
1028
+ typeof Ce.yy.parseError == "function" ? this.parseError = Ce.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1029
+ function Yt(Z) {
1030
+ k.length = k.length - 2 * Z, B.length = B.length - Z, t.length = t.length - Z;
1031
+ }
1032
+ A(Yt, "popStack");
1033
+ function Gt() {
1034
+ var Z;
1035
+ return Z = n.pop() || z.lex() || Nt, typeof Z != "number" && (Z instanceof Array && (n = Z, Z = n.pop()), Z = f.symbols_[Z] || Z), Z;
1036
+ }
1037
+ A(Gt, "lex");
1038
+ for (var X, De, $, $e, Ge = {}, He, pe, Pt, qe; ; ) {
1039
+ if (De = k[k.length - 1], this.defaultActions[De] ? $ = this.defaultActions[De] : ((X === null || typeof X > "u") && (X = Gt()), $ = Pe[De] && Pe[De][X]), typeof $ > "u" || !$.length || !$[0]) {
1040
+ var et = "";
1041
+ qe = [];
1042
+ for (He in Pe[De])
1043
+ this.terminals_[He] && He > zt && qe.push("'" + this.terminals_[He] + "'");
1044
+ z.showPosition ? et = "Parse error on line " + (G + 1) + `:
1045
+ ` + z.showPosition() + `
1046
+ Expecting ` + qe.join(", ") + ", got '" + (this.terminals_[X] || X) + "'" : et = "Parse error on line " + (G + 1) + ": Unexpected " + (X == Nt ? "end of input" : "'" + (this.terminals_[X] || X) + "'"), this.parseError(et, {
1047
+ text: z.match,
1048
+ token: this.terminals_[X] || X,
1049
+ line: z.yylineno,
1050
+ loc: Ze,
1051
+ expected: qe
1052
+ });
1053
+ }
1054
+ if ($[0] instanceof Array && $.length > 1)
1055
+ throw new Error("Parse Error: multiple actions possible at state: " + De + ", token: " + X);
1056
+ switch ($[0]) {
1057
+ case 1:
1058
+ k.push(X), B.push(z.yytext), t.push(z.yylloc), k.push($[1]), X = null, Rt = z.yyleng, s = z.yytext, G = z.yylineno, Ze = z.yylloc;
1059
+ break;
1060
+ case 2:
1061
+ if (pe = this.productions_[$[1]][1], Ge.$ = B[B.length - pe], Ge._$ = {
1062
+ first_line: t[t.length - (pe || 1)].first_line,
1063
+ last_line: t[t.length - 1].last_line,
1064
+ first_column: t[t.length - (pe || 1)].first_column,
1065
+ last_column: t[t.length - 1].last_column
1066
+ }, Kt && (Ge._$.range = [
1067
+ t[t.length - (pe || 1)].range[0],
1068
+ t[t.length - 1].range[1]
1069
+ ]), $e = this.performAction.apply(Ge, [
1070
+ s,
1071
+ Rt,
1072
+ G,
1073
+ Ce.yy,
1074
+ $[1],
1075
+ B,
1076
+ t
1077
+ ].concat(jt)), typeof $e < "u")
1078
+ return $e;
1079
+ pe && (k = k.slice(0, -1 * pe * 2), B = B.slice(0, -1 * pe), t = t.slice(0, -1 * pe)), k.push(this.productions_[$[1]][0]), B.push(Ge.$), t.push(Ge._$), Pt = Pe[k[k.length - 2]][k[k.length - 1]], k.push(Pt);
1080
+ break;
1081
+ case 3:
1082
+ return !0;
1083
+ }
1084
+ }
1085
+ return !0;
1086
+ }, "parse")
1087
+ }, Wt = /* @__PURE__ */ (function() {
1088
+ var ke = {
1089
+ EOF: 1,
1090
+ parseError: /* @__PURE__ */ A(function(f, k) {
1091
+ if (this.yy.parser)
1092
+ this.yy.parser.parseError(f, k);
1093
+ else
1094
+ throw new Error(f);
1095
+ }, "parseError"),
1096
+ // resets the lexer, sets new input
1097
+ setInput: /* @__PURE__ */ A(function(h, f) {
1098
+ return this.yy = f || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1099
+ first_line: 1,
1100
+ first_column: 0,
1101
+ last_line: 1,
1102
+ last_column: 0
1103
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1104
+ }, "setInput"),
1105
+ // consumes and returns one char from the input
1106
+ input: /* @__PURE__ */ A(function() {
1107
+ var h = this._input[0];
1108
+ this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
1109
+ var f = h.match(/(?:\r\n?|\n).*/g);
1110
+ return f ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
1111
+ }, "input"),
1112
+ // unshifts one char (or a string) into the input
1113
+ unput: /* @__PURE__ */ A(function(h) {
1114
+ var f = h.length, k = h.split(/(?:\r\n?|\n)/g);
1115
+ this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - f), this.offset -= f;
1116
+ var n = this.match.split(/(?:\r\n?|\n)/g);
1117
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), k.length - 1 && (this.yylineno -= k.length - 1);
1118
+ var B = this.yylloc.range;
1119
+ return this.yylloc = {
1120
+ first_line: this.yylloc.first_line,
1121
+ last_line: this.yylineno + 1,
1122
+ first_column: this.yylloc.first_column,
1123
+ last_column: k ? (k.length === n.length ? this.yylloc.first_column : 0) + n[n.length - k.length].length - k[0].length : this.yylloc.first_column - f
1124
+ }, this.options.ranges && (this.yylloc.range = [B[0], B[0] + this.yyleng - f]), this.yyleng = this.yytext.length, this;
1125
+ }, "unput"),
1126
+ // When called from action, caches matched text and appends it on next action
1127
+ more: /* @__PURE__ */ A(function() {
1128
+ return this._more = !0, this;
1129
+ }, "more"),
1130
+ // 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.
1131
+ reject: /* @__PURE__ */ A(function() {
1132
+ if (this.options.backtrack_lexer)
1133
+ this._backtrack = !0;
1134
+ else
1135
+ 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).
1136
+ ` + this.showPosition(), {
1137
+ text: "",
1138
+ token: null,
1139
+ line: this.yylineno
1140
+ });
1141
+ return this;
1142
+ }, "reject"),
1143
+ // retain first n characters of the match
1144
+ less: /* @__PURE__ */ A(function(h) {
1145
+ this.unput(this.match.slice(h));
1146
+ }, "less"),
1147
+ // displays already matched input, i.e. for error messages
1148
+ pastInput: /* @__PURE__ */ A(function() {
1149
+ var h = this.matched.substr(0, this.matched.length - this.match.length);
1150
+ return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
1151
+ }, "pastInput"),
1152
+ // displays upcoming input, i.e. for error messages
1153
+ upcomingInput: /* @__PURE__ */ A(function() {
1154
+ var h = this.match;
1155
+ return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
1156
+ }, "upcomingInput"),
1157
+ // displays the character position where the lexing error occurred, i.e. for error messages
1158
+ showPosition: /* @__PURE__ */ A(function() {
1159
+ var h = this.pastInput(), f = new Array(h.length + 1).join("-");
1160
+ return h + this.upcomingInput() + `
1161
+ ` + f + "^";
1162
+ }, "showPosition"),
1163
+ // test the lexed token: return FALSE when not a match, otherwise return token
1164
+ test_match: /* @__PURE__ */ A(function(h, f) {
1165
+ var k, n, B;
1166
+ if (this.options.backtrack_lexer && (B = {
1167
+ yylineno: this.yylineno,
1168
+ yylloc: {
1169
+ first_line: this.yylloc.first_line,
1170
+ last_line: this.last_line,
1171
+ first_column: this.yylloc.first_column,
1172
+ last_column: this.yylloc.last_column
1173
+ },
1174
+ yytext: this.yytext,
1175
+ match: this.match,
1176
+ matches: this.matches,
1177
+ matched: this.matched,
1178
+ yyleng: this.yyleng,
1179
+ offset: this.offset,
1180
+ _more: this._more,
1181
+ _input: this._input,
1182
+ yy: this.yy,
1183
+ conditionStack: this.conditionStack.slice(0),
1184
+ done: this.done
1185
+ }, this.options.ranges && (B.yylloc.range = this.yylloc.range.slice(0))), n = h[0].match(/(?:\r\n?|\n).*/g), n && (this.yylineno += n.length), this.yylloc = {
1186
+ first_line: this.yylloc.last_line,
1187
+ last_line: this.yylineno + 1,
1188
+ first_column: this.yylloc.last_column,
1189
+ last_column: n ? n[n.length - 1].length - n[n.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
1190
+ }, this.yytext += h[0], this.match += h[0], this.matches = h, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(h[0].length), this.matched += h[0], k = this.performAction.call(this, this.yy, this, f, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), k)
1191
+ return k;
1192
+ if (this._backtrack) {
1193
+ for (var t in B)
1194
+ this[t] = B[t];
1195
+ return !1;
1196
+ }
1197
+ return !1;
1198
+ }, "test_match"),
1199
+ // return next match in input
1200
+ next: /* @__PURE__ */ A(function() {
1201
+ if (this.done)
1202
+ return this.EOF;
1203
+ this._input || (this.done = !0);
1204
+ var h, f, k, n;
1205
+ this._more || (this.yytext = "", this.match = "");
1206
+ for (var B = this._currentRules(), t = 0; t < B.length; t++)
1207
+ if (k = this._input.match(this.rules[B[t]]), k && (!f || k[0].length > f[0].length)) {
1208
+ if (f = k, n = t, this.options.backtrack_lexer) {
1209
+ if (h = this.test_match(k, B[t]), h !== !1)
1210
+ return h;
1211
+ if (this._backtrack) {
1212
+ f = !1;
1213
+ continue;
1214
+ } else
1215
+ return !1;
1216
+ } else if (!this.options.flex)
1217
+ break;
1218
+ }
1219
+ return f ? (h = this.test_match(f, B[n]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
1220
+ ` + this.showPosition(), {
1221
+ text: "",
1222
+ token: null,
1223
+ line: this.yylineno
1224
+ });
1225
+ }, "next"),
1226
+ // return next match that has a token
1227
+ lex: /* @__PURE__ */ A(function() {
1228
+ var f = this.next();
1229
+ return f || this.lex();
1230
+ }, "lex"),
1231
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1232
+ begin: /* @__PURE__ */ A(function(f) {
1233
+ this.conditionStack.push(f);
1234
+ }, "begin"),
1235
+ // pop the previously active lexer condition state off the condition stack
1236
+ popState: /* @__PURE__ */ A(function() {
1237
+ var f = this.conditionStack.length - 1;
1238
+ return f > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1239
+ }, "popState"),
1240
+ // produce the lexer rule set which is active for the currently active lexer condition state
1241
+ _currentRules: /* @__PURE__ */ A(function() {
1242
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1243
+ }, "_currentRules"),
1244
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1245
+ topState: /* @__PURE__ */ A(function(f) {
1246
+ return f = this.conditionStack.length - 1 - Math.abs(f || 0), f >= 0 ? this.conditionStack[f] : "INITIAL";
1247
+ }, "topState"),
1248
+ // alias for begin(condition)
1249
+ pushState: /* @__PURE__ */ A(function(f) {
1250
+ this.begin(f);
1251
+ }, "pushState"),
1252
+ // return the number of states currently on the stack
1253
+ stateStackSize: /* @__PURE__ */ A(function() {
1254
+ return this.conditionStack.length;
1255
+ }, "stateStackSize"),
1256
+ options: {},
1257
+ performAction: /* @__PURE__ */ A(function(f, k, n, B) {
1258
+ switch (n) {
1259
+ case 0:
1260
+ return this.begin("acc_title"), 34;
1261
+ case 1:
1262
+ return this.popState(), "acc_title_value";
1263
+ case 2:
1264
+ return this.begin("acc_descr"), 36;
1265
+ case 3:
1266
+ return this.popState(), "acc_descr_value";
1267
+ case 4:
1268
+ this.begin("acc_descr_multiline");
1269
+ break;
1270
+ case 5:
1271
+ this.popState();
1272
+ break;
1273
+ case 6:
1274
+ return "acc_descr_multiline_value";
1275
+ case 7:
1276
+ return this.pushState("shapeData"), k.yytext = "", 40;
1277
+ case 8:
1278
+ return this.pushState("shapeDataStr"), 40;
1279
+ case 9:
1280
+ return this.popState(), 40;
1281
+ case 10:
1282
+ const t = /\n\s*/g;
1283
+ return k.yytext = k.yytext.replace(t, "<br/>"), 40;
1284
+ case 11:
1285
+ return 40;
1286
+ case 12:
1287
+ this.popState();
1288
+ break;
1289
+ case 13:
1290
+ this.begin("callbackname");
1291
+ break;
1292
+ case 14:
1293
+ this.popState();
1294
+ break;
1295
+ case 15:
1296
+ this.popState(), this.begin("callbackargs");
1297
+ break;
1298
+ case 16:
1299
+ return 95;
1300
+ case 17:
1301
+ this.popState();
1302
+ break;
1303
+ case 18:
1304
+ return 96;
1305
+ case 19:
1306
+ return "MD_STR";
1307
+ case 20:
1308
+ this.popState();
1309
+ break;
1310
+ case 21:
1311
+ this.begin("md_string");
1312
+ break;
1313
+ case 22:
1314
+ return "STR";
1315
+ case 23:
1316
+ this.popState();
1317
+ break;
1318
+ case 24:
1319
+ this.pushState("string");
1320
+ break;
1321
+ case 25:
1322
+ return 84;
1323
+ case 26:
1324
+ return 102;
1325
+ case 27:
1326
+ return 85;
1327
+ case 28:
1328
+ return 104;
1329
+ case 29:
1330
+ return 86;
1331
+ case 30:
1332
+ return 87;
1333
+ case 31:
1334
+ return 97;
1335
+ case 32:
1336
+ this.begin("click");
1337
+ break;
1338
+ case 33:
1339
+ this.popState();
1340
+ break;
1341
+ case 34:
1342
+ return 88;
1343
+ case 35:
1344
+ return f.lex.firstGraph() && this.begin("dir"), 12;
1345
+ case 36:
1346
+ return f.lex.firstGraph() && this.begin("dir"), 12;
1347
+ case 37:
1348
+ return f.lex.firstGraph() && this.begin("dir"), 12;
1349
+ case 38:
1350
+ return f.lex.firstGraph() && this.begin("dir"), 12;
1351
+ case 39:
1352
+ return 27;
1353
+ case 40:
1354
+ return 32;
1355
+ case 41:
1356
+ return 98;
1357
+ case 42:
1358
+ return 98;
1359
+ case 43:
1360
+ return 98;
1361
+ case 44:
1362
+ return 98;
1363
+ case 45:
1364
+ return this.popState(), 13;
1365
+ case 46:
1366
+ return this.popState(), 14;
1367
+ case 47:
1368
+ return this.popState(), 14;
1369
+ case 48:
1370
+ return this.popState(), 14;
1371
+ case 49:
1372
+ return this.popState(), 14;
1373
+ case 50:
1374
+ return this.popState(), 14;
1375
+ case 51:
1376
+ return this.popState(), 14;
1377
+ case 52:
1378
+ return this.popState(), 14;
1379
+ case 53:
1380
+ return this.popState(), 14;
1381
+ case 54:
1382
+ return this.popState(), 14;
1383
+ case 55:
1384
+ return this.popState(), 14;
1385
+ case 56:
1386
+ return 121;
1387
+ case 57:
1388
+ return 122;
1389
+ case 58:
1390
+ return 123;
1391
+ case 59:
1392
+ return 124;
1393
+ case 60:
1394
+ return 125;
1395
+ case 61:
1396
+ return 78;
1397
+ case 62:
1398
+ return 105;
1399
+ case 63:
1400
+ return 111;
1401
+ case 64:
1402
+ return 46;
1403
+ case 65:
1404
+ return 60;
1405
+ case 66:
1406
+ return 44;
1407
+ case 67:
1408
+ return 8;
1409
+ case 68:
1410
+ return 106;
1411
+ case 69:
1412
+ return 115;
1413
+ case 70:
1414
+ return this.popState(), 77;
1415
+ case 71:
1416
+ return this.pushState("edgeText"), 75;
1417
+ case 72:
1418
+ return 119;
1419
+ case 73:
1420
+ return this.popState(), 77;
1421
+ case 74:
1422
+ return this.pushState("thickEdgeText"), 75;
1423
+ case 75:
1424
+ return 119;
1425
+ case 76:
1426
+ return this.popState(), 77;
1427
+ case 77:
1428
+ return this.pushState("dottedEdgeText"), 75;
1429
+ case 78:
1430
+ return 119;
1431
+ case 79:
1432
+ return 77;
1433
+ case 80:
1434
+ return this.popState(), 53;
1435
+ case 81:
1436
+ return "TEXT";
1437
+ case 82:
1438
+ return this.pushState("ellipseText"), 52;
1439
+ case 83:
1440
+ return this.popState(), 55;
1441
+ case 84:
1442
+ return this.pushState("text"), 54;
1443
+ case 85:
1444
+ return this.popState(), 57;
1445
+ case 86:
1446
+ return this.pushState("text"), 56;
1447
+ case 87:
1448
+ return 58;
1449
+ case 88:
1450
+ return this.pushState("text"), 67;
1451
+ case 89:
1452
+ return this.popState(), 64;
1453
+ case 90:
1454
+ return this.pushState("text"), 63;
1455
+ case 91:
1456
+ return this.popState(), 49;
1457
+ case 92:
1458
+ return this.pushState("text"), 48;
1459
+ case 93:
1460
+ return this.popState(), 69;
1461
+ case 94:
1462
+ return this.popState(), 71;
1463
+ case 95:
1464
+ return 117;
1465
+ case 96:
1466
+ return this.pushState("trapText"), 68;
1467
+ case 97:
1468
+ return this.pushState("trapText"), 70;
1469
+ case 98:
1470
+ return 118;
1471
+ case 99:
1472
+ return 67;
1473
+ case 100:
1474
+ return 90;
1475
+ case 101:
1476
+ return "SEP";
1477
+ case 102:
1478
+ return 89;
1479
+ case 103:
1480
+ return 115;
1481
+ case 104:
1482
+ return 111;
1483
+ case 105:
1484
+ return 44;
1485
+ case 106:
1486
+ return 109;
1487
+ case 107:
1488
+ return 114;
1489
+ case 108:
1490
+ return 116;
1491
+ case 109:
1492
+ return this.popState(), 62;
1493
+ case 110:
1494
+ return this.pushState("text"), 62;
1495
+ case 111:
1496
+ return this.popState(), 51;
1497
+ case 112:
1498
+ return this.pushState("text"), 50;
1499
+ case 113:
1500
+ return this.popState(), 31;
1501
+ case 114:
1502
+ return this.pushState("text"), 29;
1503
+ case 115:
1504
+ return this.popState(), 66;
1505
+ case 116:
1506
+ return this.pushState("text"), 65;
1507
+ case 117:
1508
+ return "TEXT";
1509
+ case 118:
1510
+ return "QUOTE";
1511
+ case 119:
1512
+ return 9;
1513
+ case 120:
1514
+ return 10;
1515
+ case 121:
1516
+ return 11;
1517
+ }
1518
+ }, "anonymous"),
1519
+ 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)/, /^(?:swimlane-beta\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\n\r]+)/, /^(?:$)/],
1520
+ conditions: { shapeDataEndBracket: { rules: [21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, shapeDataStr: { rules: [9, 10, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, shapeData: { rules: [8, 11, 12, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, callbackargs: { rules: [17, 18, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, callbackname: { rules: [14, 15, 16, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, href: { rules: [21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, click: { rules: [21, 24, 33, 34, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, dottedEdgeText: { rules: [21, 24, 76, 78, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, thickEdgeText: { rules: [21, 24, 73, 75, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, edgeText: { rules: [21, 24, 70, 72, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, trapText: { rules: [21, 24, 79, 82, 84, 86, 90, 92, 93, 94, 95, 96, 97, 110, 112, 114, 116], inclusive: !1 }, ellipseText: { rules: [21, 24, 79, 80, 81, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, text: { rules: [21, 24, 79, 82, 83, 84, 85, 86, 89, 90, 91, 92, 96, 97, 109, 110, 111, 112, 113, 114, 115, 116, 117], inclusive: !1 }, vertex: { rules: [21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, dir: { rules: [21, 24, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, acc_descr: { rules: [3, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, acc_title: { rules: [1, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, md_string: { rules: [19, 20, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, string: { rules: [21, 22, 23, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], inclusive: !1 }, 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, 44, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 76, 77, 79, 82, 84, 86, 87, 88, 90, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 114, 116, 118, 119, 120, 121], inclusive: !0 } }
1521
+ };
1522
+ return ke;
1523
+ })();
1524
+ Qe.lexer = Wt;
1525
+ function Ye() {
1526
+ this.yy = {};
1527
+ }
1528
+ return A(Ye, "Parser"), Ye.prototype = Qe, Qe.Parser = Ye, new Ye();
1529
+ })();
1530
+ rt.parser = rt;
1531
+ var Ot = rt, Mt = Object.assign({}, Ot);
1532
+ Mt.parse = (e) => {
1533
+ const i = e.replace(/}\s*\n/g, `}
1534
+ `);
1535
+ return Ot.parse(i);
1536
+ };
1537
+ var E1 = Mt, y1 = /* @__PURE__ */ A((e) => {
1538
+ const { theme: i, bkgColorArray: r, borderColorArray: a } = e;
1539
+ if (!d1(i, a))
1540
+ return "";
1541
+ const u = p1(e.look), p = f1(r);
1542
+ let l = "";
1543
+ for (let g = 0; g < g1(e.THEME_COLOR_LIMIT, a); g++) {
1544
+ const c = a[g % a.length], _ = p ? `fill: ${r[g % r.length]};` : "", C = `[data-look="${u}"][data-color-id="color-${g}"]`, v = /* @__PURE__ */ A((m) => `${C}.node ${m}, ${C}.rough-node ${m}`, "collapsedRule"), b = /* @__PURE__ */ A((m) => `${C}.swimlane.cluster .swimlane-title${m}, ${C}.swimlane.cluster .swimlane-body${m}`, "laneRule");
1545
+ l += `
1546
+
1547
+ ${C}.cluster:not(.swimlane) rect {
1548
+ stroke: ${c};
1549
+ ${_}
1550
+ }
1551
+
1552
+ ${C}.cluster:not(.swimlane) path {
1553
+ stroke: ${c};
1554
+ ${_}
1555
+ }
1556
+
1557
+ /* Lane, classic and neo. */
1558
+ ${C}.swimlane.cluster rect.swimlane-title,
1559
+ ${C}.swimlane.cluster rect.swimlane-body {
1560
+ stroke: ${c};
1561
+ ${_}
1562
+ }
1563
+
1564
+ /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
1565
+ ${b(" path:nth-of-type(2)")} {
1566
+ stroke: ${c};
1567
+ }
1568
+ ${p ? `
1569
+ /* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */
1570
+ ${b(" path:first-of-type")} {
1571
+ stroke: ${r[g % r.length]};
1572
+ }
1573
+ ` : ""}
1574
+ ${v(".collapsed-group")},
1575
+ ${v(".collapsed-group path")} {
1576
+ stroke: ${c};
1577
+ ${_}
1578
+ }
1579
+
1580
+ /* The ellipsis dots and the separator take clusterBorder further down, so without
1581
+ these the container is palette-coloured while its own markers are not. */
1582
+ ${v(".collapsed-indicator")} {
1583
+ fill: ${c};
1584
+ }
1585
+
1586
+ ${v(".collapsed-separator")} {
1587
+ stroke: ${c};
1588
+ }
1589
+ `;
1590
+ }
1591
+ return l;
1592
+ }, "genColor"), x1 = /* @__PURE__ */ A((e, i) => {
1593
+ const r = A1, a = r(e, "r"), u = r(e, "g"), p = r(e, "b");
1594
+ return b1(a, u, p, i);
1595
+ }, "fade"), F1 = /* @__PURE__ */ A((e) => `${y1(e)}
1596
+ .label {
1597
+ font-family: ${e.fontFamily};
1598
+ color: ${e.nodeTextColor || e.textColor};
1599
+ }
1600
+ .cluster-label text {
1601
+ fill: ${e.titleColor};
1602
+ }
1603
+ .cluster-label span {
1604
+ color: ${e.titleColor};
1605
+ }
1606
+ .cluster-label span p {
1607
+ background-color: transparent;
1608
+ }
1609
+
1610
+ .label text,span {
1611
+ fill: ${e.nodeTextColor || e.textColor};
1612
+ color: ${e.nodeTextColor || e.textColor};
1613
+ }
1614
+
1615
+ .node rect,
1616
+ .node circle,
1617
+ .node ellipse,
1618
+ .node polygon,
1619
+ .node path {
1620
+ fill: ${e.mainBkg};
1621
+ stroke: ${e.nodeBorder};
1622
+ stroke-width: ${e.strokeWidth ?? 1}px;
1623
+ }
1624
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
1625
+ text-anchor: middle;
1626
+ }
1627
+
1628
+ .node .katex path {
1629
+ fill: #000;
1630
+ stroke: #000;
1631
+ stroke-width: 1px;
1632
+ }
1633
+
1634
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
1635
+ text-align: center;
1636
+ }
1637
+ .node.clickable {
1638
+ cursor: pointer;
1639
+ }
1640
+
1641
+
1642
+ .root .anchor path {
1643
+ fill: ${e.lineColor} !important;
1644
+ stroke-width: 0;
1645
+ stroke: ${e.lineColor};
1646
+ }
1647
+
1648
+ .arrowheadPath {
1649
+ fill: ${e.arrowheadColor};
1650
+ }
1651
+
1652
+ .edgePaths .path {
1653
+ stroke: ${e.lineColor};
1654
+ stroke-width: ${e.strokeWidth ?? 2}px;
1655
+ }
1656
+
1657
+ .flowchart-link {
1658
+ stroke: ${e.lineColor};
1659
+ fill: none;
1660
+ }
1661
+
1662
+ .edgeLabel {
1663
+ background-color: ${e.edgeLabelBackground};
1664
+ p {
1665
+ background-color: ${e.edgeLabelBackground};
1666
+ }
1667
+ rect {
1668
+ opacity: 0.5;
1669
+ background-color: ${e.edgeLabelBackground};
1670
+ fill: ${e.edgeLabelBackground};
1671
+ }
1672
+ text-align: center;
1673
+ }
1674
+
1675
+ /* For html labels only */
1676
+ .labelBkg {
1677
+ background-color: ${x1(e.edgeLabelBackground, 0.5)};
1678
+ // background-color:
1679
+ }
1680
+
1681
+ .cluster rect {
1682
+ fill: ${e.clusterBkg};
1683
+ stroke: ${e.clusterBorder};
1684
+ stroke-width: 1px;
1685
+ }
1686
+
1687
+ .cluster text {
1688
+ fill: ${e.titleColor};
1689
+ }
1690
+
1691
+ .cluster span {
1692
+ color: ${e.titleColor};
1693
+ }
1694
+ /* .cluster div {
1695
+ color: ${e.titleColor};
1696
+ } */
1697
+
1698
+ /* Collapsed subgraph node (@{ view: collapsed }) */
1699
+ .node .collapsed-indicator {
1700
+ fill: ${e.clusterBorder};
1701
+ stroke: none;
1702
+ opacity: 0.6;
1703
+ }
1704
+
1705
+ .node .collapsed-separator {
1706
+ stroke: ${e.clusterBorder};
1707
+ stroke-width: 0.75px;
1708
+ }
1709
+
1710
+ div.mermaidTooltip {
1711
+ position: absolute;
1712
+ text-align: center;
1713
+ max-width: 200px;
1714
+ padding: 2px;
1715
+ font-family: ${e.fontFamily};
1716
+ font-size: 12px;
1717
+ background: ${e.tertiaryColor};
1718
+ border: 1px solid ${e.border2};
1719
+ border-radius: 2px;
1720
+ pointer-events: none;
1721
+ z-index: 100;
1722
+ }
1723
+
1724
+ .flowchartTitleText {
1725
+ text-anchor: middle;
1726
+ font-size: 18px;
1727
+ fill: ${e.textColor};
1728
+ }
1729
+
1730
+ rect.text {
1731
+ fill: none;
1732
+ stroke-width: 0;
1733
+ }
1734
+
1735
+ .icon-shape, .image-shape {
1736
+ background-color: ${e.edgeLabelBackground};
1737
+ p {
1738
+ background-color: ${e.edgeLabelBackground};
1739
+ padding: 2px;
1740
+ }
1741
+ .label rect {
1742
+ opacity: 0.5;
1743
+ background-color: ${e.edgeLabelBackground};
1744
+ fill: ${e.edgeLabelBackground};
1745
+ }
1746
+ text-align: center;
1747
+ }
1748
+ ${Ht()}
1749
+ `, "getStyles"), _1 = F1, Ut = /* @__PURE__ */ A(({
1750
+ styles: e = _1
1751
+ } = {}) => ({
1752
+ parser: E1,
1753
+ get db() {
1754
+ return new C1();
1755
+ },
1756
+ renderer: S1,
1757
+ styles: e,
1758
+ init: /* @__PURE__ */ A((i) => {
1759
+ i.flowchart || (i.flowchart = {}), i.flowchart.arrowMarkerAbsolute = i.arrowMarkerAbsolute, Qt({ flowchart: { arrowMarkerAbsolute: i.arrowMarkerAbsolute } });
1760
+ }, "init")
1761
+ }), "createFlowDiagram"), B1 = Ut();
1762
+ const N1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1763
+ __proto__: null,
1764
+ createFlowDiagram: Ut,
1765
+ diagram: B1
1766
+ }, Symbol.toStringTag, { value: "Module" }));
1767
+ export {
1768
+ Ut as c,
1769
+ N1 as f,
1770
+ _1 as s
1771
+ };