@wandox/sdk 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 (114) hide show
  1. package/README.md +59 -0
  2. package/dist/arc-BJMRTG9S.cjs +1 -0
  3. package/dist/arc-Vdco0qfw.js +83 -0
  4. package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
  5. package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
  6. package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
  7. package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
  8. package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
  9. package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
  10. package/dist/channel-DlRtLuYv.js +5 -0
  11. package/dist/channel-Dm_yrRYJ.cjs +1 -0
  12. package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
  13. package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
  14. package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
  15. package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
  16. package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
  17. package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
  18. package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
  19. package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
  20. package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
  21. package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
  22. package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
  23. package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
  24. package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
  25. package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
  26. package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
  27. package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
  28. package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
  29. package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
  30. package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
  31. package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
  32. package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
  33. package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
  34. package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
  35. package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
  36. package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
  37. package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
  38. package/dist/defaultLocale-BDVPUiG2.js +171 -0
  39. package/dist/defaultLocale-k2G_58r6.cjs +1 -0
  40. package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
  41. package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
  42. package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
  43. package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
  44. package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
  45. package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
  46. package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
  47. package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
  48. package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
  49. package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
  50. package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
  51. package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
  52. package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
  53. package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
  54. package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
  55. package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
  56. package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
  57. package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
  58. package/dist/graph-CBizzZ7K.js +1545 -0
  59. package/dist/graph-V5BNIbHU.cjs +1 -0
  60. package/dist/index-jBRold1l.js +173159 -0
  61. package/dist/index-sFrjovbM.cjs +804 -0
  62. package/dist/index.d.ts +54 -0
  63. package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
  64. package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
  65. package/dist/init-CHZsXQcr.cjs +1 -0
  66. package/dist/init-DjUOC4st.js +16 -0
  67. package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
  68. package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
  69. package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
  70. package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
  71. package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
  72. package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
  73. package/dist/katex-Cf_UVKIT.cjs +257 -0
  74. package/dist/katex-RNjvZ8pg.js +11681 -0
  75. package/dist/layout-CbksXFOD.js +1728 -0
  76. package/dist/layout-Dh52gsIJ.cjs +1 -0
  77. package/dist/linear-C3xSMJV8.cjs +1 -0
  78. package/dist/linear-CmUCzX9U.js +259 -0
  79. package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
  80. package/dist/mermaid.core-CdBIz6FY.js +15475 -0
  81. package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
  82. package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
  83. package/dist/ordinal-CagbB1m8.cjs +1 -0
  84. package/dist/ordinal-DfAQgscy.js +61 -0
  85. package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
  86. package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
  87. package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
  88. package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
  89. package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
  90. package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
  91. package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
  92. package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
  93. package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
  94. package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
  95. package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
  96. package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
  97. package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
  98. package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
  99. package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
  100. package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
  101. package/dist/types.d.ts +295 -0
  102. package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
  103. package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
  104. package/dist/wandox.cjs +1 -0
  105. package/dist/wandox.css +1 -0
  106. package/dist/wandox.js +6 -0
  107. package/dist/wandox.umd.js +4172 -0
  108. package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
  109. package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
  110. package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
  111. package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
  112. package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
  113. package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
  114. package/package.json +42 -0
@@ -0,0 +1,1399 @@
1
+ import { g as te } from "./chunk-55IACEB6-BdJhzL0d.js";
2
+ import { s as ee } from "./chunk-2J33WTMH-CWvmGb4H.js";
3
+ import { b as d, aB as b, a2 as F, aT as se, bj as ie, a0 as re, b0 as ae, $ as ne, a$ as oe, b2 as le, a3 as ce, Y as he, z, t as ue } from "./mermaid.core-CdBIz6FY.js";
4
+ var vt = function() {
5
+ var t = /* @__PURE__ */ d(function(U, o, h, n) {
6
+ for (h = h || {}, n = U.length; n--; h[U[n]] = o) ;
7
+ return h;
8
+ }, "o"), e = [1, 2], s = [1, 3], a = [1, 4], r = [2, 4], l = [1, 9], u = [1, 11], p = [1, 16], S = [1, 17], T = [1, 18], E = [1, 19], m = [1, 33], L = [1, 20], v = [1, 21], O = [1, 22], w = [1, 23], C = [1, 24], f = [1, 26], k = [1, 27], $ = [1, 28], B = [1, 29], R = [1, 30], V = [1, 31], P = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], X = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
9
+ trace: /* @__PURE__ */ d(function() {
10
+ }, "trace"),
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
14
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
15
+ performAction: /* @__PURE__ */ d(function(o, h, n, g, _, i, Y) {
16
+ var c = i.length - 1;
17
+ switch (_) {
18
+ case 3:
19
+ return g.setRootDoc(i[c]), i[c];
20
+ case 4:
21
+ this.$ = [];
22
+ break;
23
+ case 5:
24
+ i[c] != "nl" && (i[c - 1].push(i[c]), this.$ = i[c - 1]);
25
+ break;
26
+ case 6:
27
+ case 7:
28
+ this.$ = i[c];
29
+ break;
30
+ case 8:
31
+ this.$ = "nl";
32
+ break;
33
+ case 12:
34
+ this.$ = i[c];
35
+ break;
36
+ case 13:
37
+ const tt = i[c - 1];
38
+ tt.description = g.trimColon(i[c]), this.$ = tt;
39
+ break;
40
+ case 14:
41
+ this.$ = { stmt: "relation", state1: i[c - 2], state2: i[c] };
42
+ break;
43
+ case 15:
44
+ const Tt = g.trimColon(i[c]);
45
+ this.$ = { stmt: "relation", state1: i[c - 3], state2: i[c - 1], description: Tt };
46
+ break;
47
+ case 19:
48
+ this.$ = { stmt: "state", id: i[c - 3], type: "default", description: "", doc: i[c - 1] };
49
+ break;
50
+ case 20:
51
+ var G = i[c], J = i[c - 2].trim();
52
+ if (i[c].match(":")) {
53
+ var ut = i[c].split(":");
54
+ G = ut[0], J = [J, ut[1]];
55
+ }
56
+ this.$ = { stmt: "state", id: G, type: "default", description: J };
57
+ break;
58
+ case 21:
59
+ this.$ = { stmt: "state", id: i[c - 3], type: "default", description: i[c - 5], doc: i[c - 1] };
60
+ break;
61
+ case 22:
62
+ this.$ = { stmt: "state", id: i[c], type: "fork" };
63
+ break;
64
+ case 23:
65
+ this.$ = { stmt: "state", id: i[c], type: "join" };
66
+ break;
67
+ case 24:
68
+ this.$ = { stmt: "state", id: i[c], type: "choice" };
69
+ break;
70
+ case 25:
71
+ this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
72
+ break;
73
+ case 26:
74
+ this.$ = { stmt: "state", id: i[c - 1].trim(), note: { position: i[c - 2].trim(), text: i[c].trim() } };
75
+ break;
76
+ case 29:
77
+ this.$ = i[c].trim(), g.setAccTitle(this.$);
78
+ break;
79
+ case 30:
80
+ case 31:
81
+ this.$ = i[c].trim(), g.setAccDescription(this.$);
82
+ break;
83
+ case 32:
84
+ this.$ = {
85
+ stmt: "click",
86
+ id: i[c - 3],
87
+ url: i[c - 2],
88
+ tooltip: i[c - 1]
89
+ };
90
+ break;
91
+ case 33:
92
+ this.$ = {
93
+ stmt: "click",
94
+ id: i[c - 3],
95
+ url: i[c - 1],
96
+ tooltip: ""
97
+ };
98
+ break;
99
+ case 34:
100
+ case 35:
101
+ this.$ = { stmt: "classDef", id: i[c - 1].trim(), classes: i[c].trim() };
102
+ break;
103
+ case 36:
104
+ this.$ = { stmt: "style", id: i[c - 1].trim(), styleClass: i[c].trim() };
105
+ break;
106
+ case 37:
107
+ this.$ = { stmt: "applyClass", id: i[c - 1].trim(), styleClass: i[c].trim() };
108
+ break;
109
+ case 38:
110
+ g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
111
+ break;
112
+ case 39:
113
+ g.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
114
+ break;
115
+ case 40:
116
+ g.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
117
+ break;
118
+ case 41:
119
+ g.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
120
+ break;
121
+ case 44:
122
+ case 45:
123
+ this.$ = { stmt: "state", id: i[c].trim(), type: "default", description: "" };
124
+ break;
125
+ case 46:
126
+ this.$ = { stmt: "state", id: i[c - 2].trim(), classes: [i[c].trim()], type: "default", description: "" };
127
+ break;
128
+ case 47:
129
+ this.$ = { stmt: "state", id: i[c - 2].trim(), classes: [i[c].trim()], type: "default", description: "" };
130
+ break;
131
+ }
132
+ }, "anonymous"),
133
+ table: [{ 3: 1, 4: e, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: s, 6: a }, { 3: 6, 4: e, 5: s, 6: a }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], r, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: l, 5: u, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: S, 19: T, 22: E, 24: m, 25: L, 26: v, 27: O, 28: w, 29: C, 32: 25, 33: f, 35: k, 37: $, 38: B, 41: R, 45: V, 48: P, 51: at, 52: nt, 53: ot, 54: lt, 57: X }, t(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: S, 19: T, 22: E, 24: m, 25: L, 26: v, 27: O, 28: w, 29: C, 32: 25, 33: f, 35: k, 37: $, 38: B, 41: R, 45: V, 48: P, 51: at, 52: nt, 53: ot, 54: lt, 57: X }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 9]), t(y, [2, 10]), t(y, [2, 11]), t(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(y, [2, 16]), { 18: [1, 42] }, t(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(y, [2, 22]), t(y, [2, 23]), t(y, [2, 24]), t(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(y, [2, 31]), { 13: 51, 24: m, 57: X }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(ct, [2, 44], { 58: [1, 56] }), t(ct, [2, 45], { 58: [1, 57] }), t(y, [2, 38]), t(y, [2, 39]), t(y, [2, 40]), t(y, [2, 41]), t(y, [2, 6]), t(y, [2, 13]), { 13: 58, 24: m, 57: X }, t(y, [2, 17]), t(xt, r, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(y, [2, 29]), t(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(y, [2, 14], { 14: [1, 71] }), { 4: l, 5: u, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: S, 19: T, 21: [1, 72], 22: E, 24: m, 25: L, 26: v, 27: O, 28: w, 29: C, 32: 25, 33: f, 35: k, 37: $, 38: B, 41: R, 45: V, 48: P, 51: at, 52: nt, 53: ot, 54: lt, 57: X }, t(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), t(ct, [2, 46]), t(ct, [2, 47]), t(y, [2, 15]), t(y, [2, 19]), t(xt, r, { 7: 78 }), t(y, [2, 26]), t(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: l, 5: u, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: S, 19: T, 21: [1, 81], 22: E, 24: m, 25: L, 26: v, 27: O, 28: w, 29: C, 32: 25, 33: f, 35: k, 37: $, 38: B, 41: R, 45: V, 48: P, 51: at, 52: nt, 53: ot, 54: lt, 57: X }, t(y, [2, 32]), t(y, [2, 33]), t(y, [2, 21])],
134
+ defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
135
+ parseError: /* @__PURE__ */ d(function(o, h) {
136
+ if (h.recoverable)
137
+ this.trace(o);
138
+ else {
139
+ var n = new Error(o);
140
+ throw n.hash = h, n;
141
+ }
142
+ }, "parseError"),
143
+ parse: /* @__PURE__ */ d(function(o) {
144
+ var h = this, n = [0], g = [], _ = [null], i = [], Y = this.table, c = "", G = 0, J = 0, ut = 2, tt = 1, Tt = i.slice.call(arguments, 1), D = Object.create(this.lexer), j = { yy: {} };
145
+ for (var Et in this.yy)
146
+ Object.prototype.hasOwnProperty.call(this.yy, Et) && (j.yy[Et] = this.yy[Et]);
147
+ D.setInput(o, j.yy), j.yy.lexer = D, j.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
148
+ var _t = D.yylloc;
149
+ i.push(_t);
150
+ var Qt = D.options && D.options.ranges;
151
+ typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
152
+ function Zt(I) {
153
+ n.length = n.length - 2 * I, _.length = _.length - I, i.length = i.length - I;
154
+ }
155
+ d(Zt, "popStack");
156
+ function Lt() {
157
+ var I;
158
+ return I = g.pop() || D.lex() || tt, typeof I != "number" && (I instanceof Array && (g = I, I = g.pop()), I = h.symbols_[I] || I), I;
159
+ }
160
+ d(Lt, "lex");
161
+ for (var x, H, N, mt, q = {}, dt, M, Ot, ft; ; ) {
162
+ if (H = n[n.length - 1], this.defaultActions[H] ? N = this.defaultActions[H] : ((x === null || typeof x > "u") && (x = Lt()), N = Y[H] && Y[H][x]), typeof N > "u" || !N.length || !N[0]) {
163
+ var bt = "";
164
+ ft = [];
165
+ for (dt in Y[H])
166
+ this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
167
+ D.showPosition ? bt = "Parse error on line " + (G + 1) + `:
168
+ ` + D.showPosition() + `
169
+ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : bt = "Parse error on line " + (G + 1) + ": Unexpected " + (x == tt ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(bt, {
170
+ text: D.match,
171
+ token: this.terminals_[x] || x,
172
+ line: D.yylineno,
173
+ loc: _t,
174
+ expected: ft
175
+ });
176
+ }
177
+ if (N[0] instanceof Array && N.length > 1)
178
+ throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + x);
179
+ switch (N[0]) {
180
+ case 1:
181
+ n.push(x), _.push(D.yytext), i.push(D.yylloc), n.push(N[1]), x = null, J = D.yyleng, c = D.yytext, G = D.yylineno, _t = D.yylloc;
182
+ break;
183
+ case 2:
184
+ if (M = this.productions_[N[1]][1], q.$ = _[_.length - M], q._$ = {
185
+ first_line: i[i.length - (M || 1)].first_line,
186
+ last_line: i[i.length - 1].last_line,
187
+ first_column: i[i.length - (M || 1)].first_column,
188
+ last_column: i[i.length - 1].last_column
189
+ }, Qt && (q._$.range = [
190
+ i[i.length - (M || 1)].range[0],
191
+ i[i.length - 1].range[1]
192
+ ]), mt = this.performAction.apply(q, [
193
+ c,
194
+ J,
195
+ G,
196
+ j.yy,
197
+ N[1],
198
+ _,
199
+ i
200
+ ].concat(Tt)), typeof mt < "u")
201
+ return mt;
202
+ M && (n = n.slice(0, -1 * M * 2), _ = _.slice(0, -1 * M), i = i.slice(0, -1 * M)), n.push(this.productions_[N[1]][0]), _.push(q.$), i.push(q._$), Ot = Y[n[n.length - 2]][n[n.length - 1]], n.push(Ot);
203
+ break;
204
+ case 3:
205
+ return !0;
206
+ }
207
+ }
208
+ return !0;
209
+ }, "parse")
210
+ }, qt = /* @__PURE__ */ function() {
211
+ var U = {
212
+ EOF: 1,
213
+ parseError: /* @__PURE__ */ d(function(h, n) {
214
+ if (this.yy.parser)
215
+ this.yy.parser.parseError(h, n);
216
+ else
217
+ throw new Error(h);
218
+ }, "parseError"),
219
+ // resets the lexer, sets new input
220
+ setInput: /* @__PURE__ */ d(function(o, h) {
221
+ return this.yy = h || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
222
+ first_line: 1,
223
+ first_column: 0,
224
+ last_line: 1,
225
+ last_column: 0
226
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
227
+ }, "setInput"),
228
+ // consumes and returns one char from the input
229
+ input: /* @__PURE__ */ d(function() {
230
+ var o = this._input[0];
231
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
232
+ var h = o.match(/(?:\r\n?|\n).*/g);
233
+ return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
234
+ }, "input"),
235
+ // unshifts one char (or a string) into the input
236
+ unput: /* @__PURE__ */ d(function(o) {
237
+ var h = o.length, n = o.split(/(?:\r\n?|\n)/g);
238
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
239
+ var g = this.match.split(/(?:\r\n?|\n)/g);
240
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
241
+ var _ = this.yylloc.range;
242
+ return this.yylloc = {
243
+ first_line: this.yylloc.first_line,
244
+ last_line: this.yylineno + 1,
245
+ first_column: this.yylloc.first_column,
246
+ last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - h
247
+ }, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
248
+ }, "unput"),
249
+ // When called from action, caches matched text and appends it on next action
250
+ more: /* @__PURE__ */ d(function() {
251
+ return this._more = !0, this;
252
+ }, "more"),
253
+ // 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.
254
+ reject: /* @__PURE__ */ d(function() {
255
+ if (this.options.backtrack_lexer)
256
+ this._backtrack = !0;
257
+ else
258
+ 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).
259
+ ` + this.showPosition(), {
260
+ text: "",
261
+ token: null,
262
+ line: this.yylineno
263
+ });
264
+ return this;
265
+ }, "reject"),
266
+ // retain first n characters of the match
267
+ less: /* @__PURE__ */ d(function(o) {
268
+ this.unput(this.match.slice(o));
269
+ }, "less"),
270
+ // displays already matched input, i.e. for error messages
271
+ pastInput: /* @__PURE__ */ d(function() {
272
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
273
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
274
+ }, "pastInput"),
275
+ // displays upcoming input, i.e. for error messages
276
+ upcomingInput: /* @__PURE__ */ d(function() {
277
+ var o = this.match;
278
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
279
+ }, "upcomingInput"),
280
+ // displays the character position where the lexing error occurred, i.e. for error messages
281
+ showPosition: /* @__PURE__ */ d(function() {
282
+ var o = this.pastInput(), h = new Array(o.length + 1).join("-");
283
+ return o + this.upcomingInput() + `
284
+ ` + h + "^";
285
+ }, "showPosition"),
286
+ // test the lexed token: return FALSE when not a match, otherwise return token
287
+ test_match: /* @__PURE__ */ d(function(o, h) {
288
+ var n, g, _;
289
+ if (this.options.backtrack_lexer && (_ = {
290
+ yylineno: this.yylineno,
291
+ yylloc: {
292
+ first_line: this.yylloc.first_line,
293
+ last_line: this.last_line,
294
+ first_column: this.yylloc.first_column,
295
+ last_column: this.yylloc.last_column
296
+ },
297
+ yytext: this.yytext,
298
+ match: this.match,
299
+ matches: this.matches,
300
+ matched: this.matched,
301
+ yyleng: this.yyleng,
302
+ offset: this.offset,
303
+ _more: this._more,
304
+ _input: this._input,
305
+ yy: this.yy,
306
+ conditionStack: this.conditionStack.slice(0),
307
+ done: this.done
308
+ }, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
309
+ first_line: this.yylloc.last_line,
310
+ last_line: this.yylineno + 1,
311
+ first_column: this.yylloc.last_column,
312
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
313
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
314
+ return n;
315
+ if (this._backtrack) {
316
+ for (var i in _)
317
+ this[i] = _[i];
318
+ return !1;
319
+ }
320
+ return !1;
321
+ }, "test_match"),
322
+ // return next match in input
323
+ next: /* @__PURE__ */ d(function() {
324
+ if (this.done)
325
+ return this.EOF;
326
+ this._input || (this.done = !0);
327
+ var o, h, n, g;
328
+ this._more || (this.yytext = "", this.match = "");
329
+ for (var _ = this._currentRules(), i = 0; i < _.length; i++)
330
+ if (n = this._input.match(this.rules[_[i]]), n && (!h || n[0].length > h[0].length)) {
331
+ if (h = n, g = i, this.options.backtrack_lexer) {
332
+ if (o = this.test_match(n, _[i]), o !== !1)
333
+ return o;
334
+ if (this._backtrack) {
335
+ h = !1;
336
+ continue;
337
+ } else
338
+ return !1;
339
+ } else if (!this.options.flex)
340
+ break;
341
+ }
342
+ return h ? (o = this.test_match(h, _[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
343
+ ` + this.showPosition(), {
344
+ text: "",
345
+ token: null,
346
+ line: this.yylineno
347
+ });
348
+ }, "next"),
349
+ // return next match that has a token
350
+ lex: /* @__PURE__ */ d(function() {
351
+ var h = this.next();
352
+ return h || this.lex();
353
+ }, "lex"),
354
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
355
+ begin: /* @__PURE__ */ d(function(h) {
356
+ this.conditionStack.push(h);
357
+ }, "begin"),
358
+ // pop the previously active lexer condition state off the condition stack
359
+ popState: /* @__PURE__ */ d(function() {
360
+ var h = this.conditionStack.length - 1;
361
+ return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
+ }, "popState"),
363
+ // produce the lexer rule set which is active for the currently active lexer condition state
364
+ _currentRules: /* @__PURE__ */ d(function() {
365
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
366
+ }, "_currentRules"),
367
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
368
+ topState: /* @__PURE__ */ d(function(h) {
369
+ return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
370
+ }, "topState"),
371
+ // alias for begin(condition)
372
+ pushState: /* @__PURE__ */ d(function(h) {
373
+ this.begin(h);
374
+ }, "pushState"),
375
+ // return the number of states currently on the stack
376
+ stateStackSize: /* @__PURE__ */ d(function() {
377
+ return this.conditionStack.length;
378
+ }, "stateStackSize"),
379
+ options: { "case-insensitive": !0 },
380
+ performAction: /* @__PURE__ */ d(function(h, n, g, _) {
381
+ function i() {
382
+ const Y = n.yytext.indexOf("%%");
383
+ if (Y === 0)
384
+ return !1;
385
+ if (Y > 0) {
386
+ const c = n.yytext.slice(0, Y), G = n.yytext.slice(Y);
387
+ G && h.lexer.unput(G), n.yytext = c;
388
+ }
389
+ return !0;
390
+ }
391
+ switch (d(i, "processId"), g) {
392
+ case 0:
393
+ return 38;
394
+ case 1:
395
+ return 40;
396
+ case 2:
397
+ return 39;
398
+ case 3:
399
+ return 44;
400
+ case 4:
401
+ return 51;
402
+ case 5:
403
+ return 52;
404
+ case 6:
405
+ return 53;
406
+ case 7:
407
+ return 54;
408
+ case 8:
409
+ return 5;
410
+ case 9:
411
+ break;
412
+ case 10:
413
+ break;
414
+ case 11:
415
+ break;
416
+ case 12:
417
+ break;
418
+ case 13:
419
+ return this.pushState("SCALE"), 17;
420
+ case 14:
421
+ return 18;
422
+ case 15:
423
+ this.popState();
424
+ break;
425
+ case 16:
426
+ return this.begin("acc_title"), 33;
427
+ case 17:
428
+ return this.popState(), "acc_title_value";
429
+ case 18:
430
+ return this.begin("acc_descr"), 35;
431
+ case 19:
432
+ return this.popState(), "acc_descr_value";
433
+ case 20:
434
+ this.begin("acc_descr_multiline");
435
+ break;
436
+ case 21:
437
+ this.popState();
438
+ break;
439
+ case 22:
440
+ return "acc_descr_multiline_value";
441
+ case 23:
442
+ return this.pushState("CLASSDEF"), 41;
443
+ case 24:
444
+ return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
445
+ case 25:
446
+ return this.popState(), this.pushState("CLASSDEFID"), 42;
447
+ case 26:
448
+ return this.popState(), 43;
449
+ case 27:
450
+ return this.pushState("CLASS"), 48;
451
+ case 28:
452
+ return this.popState(), this.pushState("CLASS_STYLE"), 49;
453
+ case 29:
454
+ return this.popState(), 50;
455
+ case 30:
456
+ return this.pushState("STYLE"), 45;
457
+ case 31:
458
+ return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
459
+ case 32:
460
+ return this.popState(), 47;
461
+ case 33:
462
+ return this.pushState("SCALE"), 17;
463
+ case 34:
464
+ return 18;
465
+ case 35:
466
+ this.popState();
467
+ break;
468
+ case 36:
469
+ this.pushState("STATE");
470
+ break;
471
+ case 37:
472
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
473
+ case 38:
474
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
475
+ case 39:
476
+ return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
477
+ case 40:
478
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
479
+ case 41:
480
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
481
+ case 42:
482
+ return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
483
+ case 43:
484
+ return 51;
485
+ case 44:
486
+ return 52;
487
+ case 45:
488
+ return 53;
489
+ case 46:
490
+ return 54;
491
+ case 47:
492
+ this.pushState("STATE_STRING");
493
+ break;
494
+ case 48:
495
+ return this.pushState("STATE_ID"), "AS";
496
+ case 49:
497
+ return i() ? (this.popState(), "ID") : void 0;
498
+ case 50:
499
+ this.popState();
500
+ break;
501
+ case 51:
502
+ return "STATE_DESCR";
503
+ case 52:
504
+ return 19;
505
+ case 53:
506
+ this.popState();
507
+ break;
508
+ case 54:
509
+ return this.popState(), this.pushState("struct"), 20;
510
+ case 55:
511
+ return this.popState(), 21;
512
+ case 56:
513
+ break;
514
+ case 57:
515
+ return this.begin("NOTE"), 29;
516
+ case 58:
517
+ return this.popState(), this.pushState("NOTE_ID"), 59;
518
+ case 59:
519
+ return this.popState(), this.pushState("NOTE_ID"), 60;
520
+ case 60:
521
+ this.popState(), this.pushState("FLOATING_NOTE");
522
+ break;
523
+ case 61:
524
+ return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
525
+ case 62:
526
+ break;
527
+ case 63:
528
+ return "NOTE_TEXT";
529
+ case 64:
530
+ return i() ? (this.popState(), "ID") : void 0;
531
+ case 65:
532
+ return i() ? (this.popState(), this.pushState("NOTE_TEXT"), 24) : void 0;
533
+ case 66:
534
+ return this.popState(), n.yytext = n.yytext.substr(2).trim(), 31;
535
+ case 67:
536
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 31;
537
+ case 68:
538
+ return 6;
539
+ case 69:
540
+ return 6;
541
+ case 70:
542
+ return 16;
543
+ case 71:
544
+ return 57;
545
+ case 72:
546
+ return i() ? 24 : void 0;
547
+ case 73:
548
+ return n.yytext = n.yytext.trim(), 14;
549
+ case 74:
550
+ return 15;
551
+ case 75:
552
+ return 28;
553
+ case 76:
554
+ return 58;
555
+ case 77:
556
+ return 5;
557
+ case 78:
558
+ return "INVALID";
559
+ }
560
+ }, "anonymous"),
561
+ rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?\n\s*end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
562
+ conditions: { LINE: { rules: [10, 11, 12], inclusive: !1 }, struct: { rules: [10, 11, 12, 23, 27, 30, 36, 43, 44, 45, 46, 55, 56, 57, 71, 72, 73, 74, 75, 76], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [64], inclusive: !1 }, FLOATING_NOTE: { rules: [61, 62, 63], inclusive: !1 }, NOTE_TEXT: { rules: [66, 67], inclusive: !1 }, NOTE_ID: { rules: [65], inclusive: !1 }, NOTE: { rules: [58, 59, 60], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [32], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [31], inclusive: !1 }, CLASS_STYLE: { rules: [29], inclusive: !1 }, CLASS: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [26], inclusive: !1 }, CLASSDEF: { rules: [24, 25], inclusive: !1 }, acc_descr_multiline: { rules: [21, 22], inclusive: !1 }, acc_descr: { rules: [19], inclusive: !1 }, acc_title: { rules: [17], inclusive: !1 }, SCALE: { rules: [14, 15, 34, 35], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [49], inclusive: !1 }, STATE_STRING: { rules: [50, 51], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [10, 11, 12, 37, 38, 39, 40, 41, 42, 47, 48, 52, 53, 54], inclusive: !1 }, ID: { rules: [10, 11, 12], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 18, 20, 23, 27, 30, 33, 36, 54, 57, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78], inclusive: !0 } }
563
+ };
564
+ return U;
565
+ }();
566
+ gt.lexer = qt;
567
+ function ht() {
568
+ this.yy = {};
569
+ }
570
+ return d(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
571
+ }();
572
+ vt.parser = vt;
573
+ var Ge = vt, de = "TB", Bt = "TB", It = "dir", Z = "state", Q = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", it = "default", Yt = "divider", Gt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "markdown", Wt = "normal", Dt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", Rt = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", rt = "statediagram", _e = "state", me = `${rt}-${_e}`, jt = "transition", be = "note", De = "note-edge", ke = `${jt} ${De}`, ve = `${rt}-${be}`, Ce = "cluster", Ae = `${rt}-${Ce}`, xe = "cluster-alt", Le = `${rt}-${xe}`, Ht = "parent", zt = "note", Oe = "state", At = "----", Ie = `${At}${zt}`, wt = `${At}${Ht}`, Kt = /* @__PURE__ */ d((t, e = Bt) => {
574
+ if (!t.doc)
575
+ return e;
576
+ let s = e;
577
+ for (const a of t.doc)
578
+ a.stmt === "dir" && (s = a.value);
579
+ return s;
580
+ }, "getDir"), Re = /* @__PURE__ */ d(function(t, e) {
581
+ return e.db.getClasses();
582
+ }, "getClasses"), Ne = /* @__PURE__ */ d(async function(t, e, s, a) {
583
+ b.info("REF0:"), b.info("Drawing state diagram (v2)", e);
584
+ const { securityLevel: r, state: l, layout: u } = F();
585
+ a.db.extract(a.db.getRootDocV2());
586
+ const p = a.db.getData(), S = te(e, r);
587
+ p.type = a.type, p.layoutAlgorithm = u, p.nodeSpacing = (l == null ? void 0 : l.nodeSpacing) || 50, p.rankSpacing = (l == null ? void 0 : l.rankSpacing) || 50, F().look === "neo" ? p.markers = ["barbNeo"] : p.markers = ["barb"], p.diagramId = e, await se(p, S);
588
+ const E = 8;
589
+ try {
590
+ (typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((L, v) => {
591
+ var B;
592
+ const O = typeof v == "string" ? v : typeof (v == null ? void 0 : v.id) == "string" ? v.id : "";
593
+ if (!O) {
594
+ b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(v));
595
+ return;
596
+ }
597
+ const w = (B = S.node()) == null ? void 0 : B.querySelectorAll("g");
598
+ let C;
599
+ if (w == null || w.forEach((R) => {
600
+ var P;
601
+ ((P = R.textContent) == null ? void 0 : P.trim()) === O && (C = R);
602
+ }), !C) {
603
+ b.warn("⚠️ Could not find node matching text:", O);
604
+ return;
605
+ }
606
+ const f = C.parentNode;
607
+ if (!f) {
608
+ b.warn("⚠️ Node has no parent, cannot wrap:", O);
609
+ return;
610
+ }
611
+ const k = document.createElementNS("http://www.w3.org/2000/svg", "a"), $ = L.url.replace(/^"+|"+$/g, "");
612
+ if (k.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", $), k.setAttribute("target", "_blank"), L.tooltip) {
613
+ const R = L.tooltip.replace(/^"+|"+$/g, "");
614
+ k.setAttribute("title", R);
615
+ }
616
+ f.replaceChild(k, C), k.appendChild(C), b.info("🔗 Wrapped node in <a> tag for:", O, L.url);
617
+ });
618
+ } catch (m) {
619
+ b.error("❌ Error injecting clickable links:", m);
620
+ }
621
+ ie.insertTitle(
622
+ S,
623
+ "statediagramTitleText",
624
+ (l == null ? void 0 : l.titleTopMargin) ?? 25,
625
+ a.db.getDiagramTitle()
626
+ ), ee(S, E, rt, (l == null ? void 0 : l.useMaxWidth) ?? !0);
627
+ }, "draw"), Ve = {
628
+ getClasses: Re,
629
+ draw: Ne,
630
+ getDir: Kt
631
+ }, St = /* @__PURE__ */ new Map(), W = 0;
632
+ function yt(t = "", e = 0, s = "", a = At) {
633
+ const r = s !== null && s.length > 0 ? `${a}${s}` : "";
634
+ return `${Oe}-${t}${r}-${e}`;
635
+ }
636
+ d(yt, "stateDomId");
637
+ var we = /* @__PURE__ */ d((t, e, s, a, r, l, u, p) => {
638
+ b.trace("items", e), e.forEach((S) => {
639
+ switch (S.stmt) {
640
+ case Z:
641
+ st(t, S, s, a, r, l, u, p);
642
+ break;
643
+ case it:
644
+ st(t, S, s, a, r, l, u, p);
645
+ break;
646
+ case Ct:
647
+ {
648
+ st(
649
+ t,
650
+ S.state1,
651
+ s,
652
+ a,
653
+ r,
654
+ l,
655
+ u,
656
+ p
657
+ ), st(
658
+ t,
659
+ S.state2,
660
+ s,
661
+ a,
662
+ r,
663
+ l,
664
+ u,
665
+ p
666
+ );
667
+ const T = u === "neo", E = {
668
+ id: "edge" + W,
669
+ start: S.state1.id,
670
+ end: S.state2.id,
671
+ arrowhead: "normal",
672
+ arrowTypeEnd: T ? "arrow_barb_neo" : "arrow_barb",
673
+ style: Gt,
674
+ labelStyle: "",
675
+ label: z.sanitizeText(S.description ?? "", F()),
676
+ arrowheadStyle: Vt,
677
+ labelpos: Mt,
678
+ labelType: Ut,
679
+ thickness: Wt,
680
+ classes: jt,
681
+ look: u
682
+ };
683
+ r.push(E), W++;
684
+ }
685
+ break;
686
+ }
687
+ });
688
+ }, "setupDoc"), $t = /* @__PURE__ */ d((t, e = Bt) => {
689
+ let s = e;
690
+ if (t.doc)
691
+ for (const a of t.doc)
692
+ a.stmt === "dir" && (s = a.value);
693
+ return s;
694
+ }, "getDir");
695
+ function et(t, e, s) {
696
+ if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
697
+ return;
698
+ e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((r) => {
699
+ const l = s.get(r);
700
+ l && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...l.styles]);
701
+ }));
702
+ const a = t.find((r) => r.id === e.id);
703
+ a ? Object.assign(a, e) : t.push(e);
704
+ }
705
+ d(et, "insertOrUpdateNode");
706
+ function Xt(t) {
707
+ var e;
708
+ return ((e = t == null ? void 0 : t.classes) == null ? void 0 : e.join(" ")) ?? "";
709
+ }
710
+ d(Xt, "getClassesFromDbInfo");
711
+ function Jt(t) {
712
+ return (t == null ? void 0 : t.styles) ?? [];
713
+ }
714
+ d(Jt, "getStylesFromDbInfo");
715
+ var st = /* @__PURE__ */ d((t, e, s, a, r, l, u, p) => {
716
+ var v, O, w;
717
+ const S = e.id, T = s.get(S), E = Xt(T), m = Jt(T), L = F();
718
+ if (b.info("dataFetcher parsedItem", e, T, m), S !== "root") {
719
+ let C = Dt;
720
+ e.start === !0 ? C = ye : e.start === !1 && (C = ge), e.type !== it && (C = e.type), St.get(S) || St.set(S, {
721
+ id: S,
722
+ shape: C,
723
+ description: z.sanitizeText(S, L),
724
+ cssClasses: `${E} ${me}`,
725
+ cssStyles: m
726
+ });
727
+ const f = St.get(S);
728
+ e.description && (Array.isArray(f.description) ? (f.shape = kt, f.description.push(e.description)) : (v = f.description) != null && v.length && f.description.length > 0 ? (f.shape = kt, f.description === S ? f.description = [e.description] : f.description = [f.description, e.description]) : (f.shape = Dt, f.description = e.description), f.description = z.sanitizeTextOrArray(f.description, L)), ((O = f.description) == null ? void 0 : O.length) === 1 && f.shape === kt && (f.type === "group" ? f.shape = Nt : f.shape = Dt), !f.type && e.doc && (b.info("Setting cluster for XCX", S, $t(e)), f.type = "group", f.isGroup = !0, f.dir = $t(e), f.shape = e.type === Yt ? Rt : Nt, f.cssClasses = `${f.cssClasses} ${Ae} ${l ? Le : ""}`);
729
+ const k = {
730
+ labelStyle: "",
731
+ shape: f.shape,
732
+ label: f.description,
733
+ cssClasses: f.cssClasses,
734
+ cssCompiledStyles: [],
735
+ cssStyles: f.cssStyles,
736
+ id: S,
737
+ dir: f.dir,
738
+ domId: yt(S, W),
739
+ type: f.type,
740
+ isGroup: f.type === "group",
741
+ padding: 8,
742
+ rx: 10,
743
+ ry: 10,
744
+ look: u,
745
+ labelType: "markdown"
746
+ };
747
+ if (k.shape === Rt && (k.label = ""), t && t.id !== "root" && (b.trace("Setting node ", S, " to be child of its parent ", t.id), k.parentId = t.id), k.centerLabel = !0, e.note) {
748
+ const $ = {
749
+ labelStyle: "",
750
+ shape: Te,
751
+ label: e.note.text,
752
+ labelType: "markdown",
753
+ cssClasses: ve,
754
+ // useHtmlLabels: false,
755
+ cssStyles: [],
756
+ cssCompiledStyles: [],
757
+ id: S + Ie + "-" + W,
758
+ domId: yt(S, W, zt),
759
+ type: f.type,
760
+ isGroup: f.type === "group",
761
+ padding: (w = L.flowchart) == null ? void 0 : w.padding,
762
+ look: u,
763
+ position: e.note.position
764
+ }, B = S + wt, R = {
765
+ labelStyle: "",
766
+ shape: Ee,
767
+ label: e.note.text,
768
+ cssClasses: f.cssClasses,
769
+ cssStyles: [],
770
+ id: S + wt,
771
+ domId: yt(S, W, Ht),
772
+ type: "group",
773
+ isGroup: !0,
774
+ padding: 16,
775
+ //getConfig().flowchart.padding
776
+ look: u,
777
+ position: e.note.position
778
+ };
779
+ W++, R.id = B, $.parentId = B, et(a, R, p), et(a, $, p), et(a, k, p);
780
+ let V = S, P = $.id;
781
+ e.note.position === "left of" && (V = $.id, P = S), r.push({
782
+ id: V + "-" + P,
783
+ start: V,
784
+ end: P,
785
+ arrowhead: "none",
786
+ arrowTypeEnd: "",
787
+ style: Gt,
788
+ labelStyle: "",
789
+ classes: ke,
790
+ arrowheadStyle: Vt,
791
+ labelpos: Mt,
792
+ labelType: Ut,
793
+ thickness: Wt,
794
+ look: u
795
+ });
796
+ } else
797
+ et(a, k, p);
798
+ }
799
+ e.doc && (b.trace("Adding nodes children "), we(e, e.doc, s, a, r, !l, u, p));
800
+ }, "dataFetcher"), $e = /* @__PURE__ */ d(() => {
801
+ St.clear(), W = 0;
802
+ }, "reset"), A = {
803
+ START_NODE: "[*]",
804
+ START_TYPE: "start",
805
+ END_NODE: "[*]",
806
+ END_TYPE: "end",
807
+ COLOR_KEYWORD: "color",
808
+ FILL_KEYWORD: "fill",
809
+ BG_FILL: "bgFill",
810
+ STYLECLASS_SEP: ","
811
+ }, Pt = /* @__PURE__ */ d(() => /* @__PURE__ */ new Map(), "newClassesList"), Ft = /* @__PURE__ */ d(() => ({
812
+ relations: [],
813
+ states: /* @__PURE__ */ new Map(),
814
+ documents: {}
815
+ }), "newDoc"), pt = /* @__PURE__ */ d((t) => JSON.parse(JSON.stringify(t)), "clone"), K, Me = (K = class {
816
+ constructor(e) {
817
+ this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this);
818
+ }
819
+ /**
820
+ * Convert all of the statements (stmts) that were parsed into states and relationships.
821
+ * This is done because a state diagram may have nested sections,
822
+ * where each section is a 'document' and has its own set of statements.
823
+ * Ex: the section within a fork has its own statements, and incoming and outgoing statements
824
+ * refer to the fork as a whole (document).
825
+ * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
826
+ * This will push the statement into the list of statements for the current document.
827
+ */
828
+ extract(e) {
829
+ this.clear(!0);
830
+ for (const r of Array.isArray(e) ? e : e.doc)
831
+ switch (r.stmt) {
832
+ case Z:
833
+ this.addState(r.id.trim(), r.type, r.doc, r.description, r.note);
834
+ break;
835
+ case Ct:
836
+ this.addRelation(r.state1, r.state2, r.description);
837
+ break;
838
+ case fe:
839
+ this.addStyleClass(r.id.trim(), r.classes);
840
+ break;
841
+ case pe:
842
+ this.handleStyleDef(r);
843
+ break;
844
+ case Se:
845
+ this.setCssClass(r.id.trim(), r.styleClass);
846
+ break;
847
+ case "click":
848
+ this.addLink(r.id, r.url, r.tooltip);
849
+ break;
850
+ }
851
+ const s = this.getStates(), a = F();
852
+ $e(), st(
853
+ void 0,
854
+ this.getRootDocV2(),
855
+ s,
856
+ this.nodes,
857
+ this.edges,
858
+ !0,
859
+ a.look,
860
+ this.classes
861
+ );
862
+ for (const r of this.nodes)
863
+ if (Array.isArray(r.label)) {
864
+ if (r.description = r.label.slice(1), r.isGroup && r.description.length > 0)
865
+ throw new Error(
866
+ `Group nodes can only have label. Remove the additional description for node [${r.id}]`
867
+ );
868
+ r.label = r.label[0];
869
+ }
870
+ }
871
+ handleStyleDef(e) {
872
+ const s = e.id.trim().split(","), a = e.styleClass.split(",");
873
+ for (const r of s) {
874
+ let l = this.getState(r);
875
+ if (!l) {
876
+ const u = r.trim();
877
+ this.addState(u), l = this.getState(u);
878
+ }
879
+ l && (l.styles = a.map((u) => {
880
+ var p;
881
+ return (p = u.replace(/;/g, "")) == null ? void 0 : p.trim();
882
+ }));
883
+ }
884
+ }
885
+ setRootDoc(e) {
886
+ b.info("Setting root doc", e), this.rootDoc = e, this.version === 1 ? this.extract(e) : this.extract(this.getRootDocV2());
887
+ }
888
+ docTranslator(e, s, a) {
889
+ if (s.stmt === Ct) {
890
+ this.docTranslator(e, s.state1, !0), this.docTranslator(e, s.state2, !1);
891
+ return;
892
+ }
893
+ if (s.stmt === Z && (s.id === A.START_NODE ? (s.id = e.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== Q && s.stmt !== Z || !s.doc)
894
+ return;
895
+ const r = [];
896
+ let l = [];
897
+ for (const u of s.doc)
898
+ if (u.type === Yt) {
899
+ const p = pt(u);
900
+ p.doc = pt(l), r.push(p), l = [];
901
+ } else
902
+ l.push(u);
903
+ if (r.length > 0 && l.length > 0) {
904
+ const u = {
905
+ stmt: Z,
906
+ id: he(),
907
+ type: "divider",
908
+ doc: pt(l)
909
+ };
910
+ r.push(pt(u)), s.doc = r;
911
+ }
912
+ s.doc.forEach((u) => this.docTranslator(s, u, !0));
913
+ }
914
+ getRootDocV2() {
915
+ return this.docTranslator(
916
+ { id: Q, stmt: Q },
917
+ { id: Q, stmt: Q, doc: this.rootDoc },
918
+ !0
919
+ ), { id: Q, doc: this.rootDoc };
920
+ }
921
+ /**
922
+ * Function called by parser when a node definition has been found.
923
+ *
924
+ * @param descr - description for the state. Can be a string or a list or strings
925
+ * @param classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.
926
+ * @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
927
+ * @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
928
+ */
929
+ addState(e, s = it, a = void 0, r = void 0, l = void 0, u = void 0, p = void 0, S = void 0) {
930
+ const T = e == null ? void 0 : e.trim();
931
+ if (!this.currentDocument.states.has(T))
932
+ b.info("Adding state ", T, r), this.currentDocument.states.set(T, {
933
+ stmt: Z,
934
+ id: T,
935
+ descriptions: [],
936
+ type: s,
937
+ doc: a,
938
+ note: l,
939
+ classes: [],
940
+ styles: [],
941
+ textStyles: []
942
+ });
943
+ else {
944
+ const E = this.currentDocument.states.get(T);
945
+ if (!E)
946
+ throw new Error(`State not found: ${T}`);
947
+ E.doc || (E.doc = a), E.type || (E.type = s);
948
+ }
949
+ if (r && (b.info("Setting state description", T, r), (Array.isArray(r) ? r : [r]).forEach((m) => this.addDescription(T, m.trim()))), l) {
950
+ const E = this.currentDocument.states.get(T);
951
+ if (!E)
952
+ throw new Error(`State not found: ${T}`);
953
+ E.note = l, E.note.text = z.sanitizeText(E.note.text, F());
954
+ }
955
+ u && (b.info("Setting state classes", T, u), (Array.isArray(u) ? u : [u]).forEach((m) => this.setCssClass(T, m.trim()))), p && (b.info("Setting state styles", T, p), (Array.isArray(p) ? p : [p]).forEach((m) => this.setStyle(T, m.trim()))), S && (b.info("Setting state styles", T, p), (Array.isArray(S) ? S : [S]).forEach((m) => this.setTextStyle(T, m.trim())));
956
+ }
957
+ clear(e) {
958
+ this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), e || (this.links = /* @__PURE__ */ new Map(), ue());
959
+ }
960
+ getState(e) {
961
+ return this.currentDocument.states.get(e);
962
+ }
963
+ getStates() {
964
+ return this.currentDocument.states;
965
+ }
966
+ logDocuments() {
967
+ b.info("Documents = ", this.documents);
968
+ }
969
+ getRelations() {
970
+ return this.currentDocument.relations;
971
+ }
972
+ /**
973
+ * Adds a clickable link to a state.
974
+ */
975
+ addLink(e, s, a) {
976
+ this.links.set(e, { url: s, tooltip: a }), b.warn("Adding link", e, s, a);
977
+ }
978
+ /**
979
+ * Get all registered links.
980
+ */
981
+ getLinks() {
982
+ return this.links;
983
+ }
984
+ /**
985
+ * If the id is a start node ( [*] ), then return a new id constructed from
986
+ * the start node name and the current start node count.
987
+ * else return the given id
988
+ */
989
+ startIdIfNeeded(e = "") {
990
+ return e === A.START_NODE ? (this.startEndCount++, `${A.START_TYPE}${this.startEndCount}`) : e;
991
+ }
992
+ /**
993
+ * If the id is a start node ( [*] ), then return the start type ('start')
994
+ * else return the given type
995
+ */
996
+ startTypeIfNeeded(e = "", s = it) {
997
+ return e === A.START_NODE ? A.START_TYPE : s;
998
+ }
999
+ /**
1000
+ * If the id is an end node ( [*] ), then return a new id constructed from
1001
+ * the end node name and the current start_end node count.
1002
+ * else return the given id
1003
+ */
1004
+ endIdIfNeeded(e = "") {
1005
+ return e === A.END_NODE ? (this.startEndCount++, `${A.END_TYPE}${this.startEndCount}`) : e;
1006
+ }
1007
+ /**
1008
+ * If the id is an end node ( [*] ), then return the end type
1009
+ * else return the given type
1010
+ *
1011
+ */
1012
+ endTypeIfNeeded(e = "", s = it) {
1013
+ return e === A.END_NODE ? A.END_TYPE : s;
1014
+ }
1015
+ addRelationObjs(e, s, a = "") {
1016
+ const r = this.startIdIfNeeded(e.id.trim()), l = this.startTypeIfNeeded(e.id.trim(), e.type), u = this.startIdIfNeeded(s.id.trim()), p = this.startTypeIfNeeded(s.id.trim(), s.type);
1017
+ this.addState(
1018
+ r,
1019
+ l,
1020
+ e.doc,
1021
+ e.description,
1022
+ e.note,
1023
+ e.classes,
1024
+ e.styles,
1025
+ e.textStyles
1026
+ ), this.addState(
1027
+ u,
1028
+ p,
1029
+ s.doc,
1030
+ s.description,
1031
+ s.note,
1032
+ s.classes,
1033
+ s.styles,
1034
+ s.textStyles
1035
+ ), this.currentDocument.relations.push({
1036
+ id1: r,
1037
+ id2: u,
1038
+ relationTitle: z.sanitizeText(a, F())
1039
+ });
1040
+ }
1041
+ /**
1042
+ * Add a relation between two items. The items may be full objects or just the string id of a state.
1043
+ */
1044
+ addRelation(e, s, a) {
1045
+ if (typeof e == "object" && typeof s == "object")
1046
+ this.addRelationObjs(e, s, a);
1047
+ else if (typeof e == "string" && typeof s == "string") {
1048
+ const r = this.startIdIfNeeded(e.trim()), l = this.startTypeIfNeeded(e), u = this.endIdIfNeeded(s.trim()), p = this.endTypeIfNeeded(s);
1049
+ this.addState(r, l), this.addState(u, p), this.currentDocument.relations.push({
1050
+ id1: r,
1051
+ id2: u,
1052
+ relationTitle: a ? z.sanitizeText(a, F()) : void 0
1053
+ });
1054
+ }
1055
+ }
1056
+ addDescription(e, s) {
1057
+ var l;
1058
+ const a = this.currentDocument.states.get(e), r = s.startsWith(":") ? s.replace(":", "").trim() : s;
1059
+ (l = a == null ? void 0 : a.descriptions) == null || l.push(z.sanitizeText(r, F()));
1060
+ }
1061
+ cleanupLabel(e) {
1062
+ return e.startsWith(":") ? e.slice(2).trim() : e.trim();
1063
+ }
1064
+ getDividerId() {
1065
+ return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
1066
+ }
1067
+ /**
1068
+ * Called when the parser comes across a (style) class definition
1069
+ * @example classDef my-style fill:#f96;
1070
+ *
1071
+ * @param id - the id of this (style) class
1072
+ * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
1073
+ */
1074
+ addStyleClass(e, s = "") {
1075
+ this.classes.has(e) || this.classes.set(e, { id: e, styles: [], textStyles: [] });
1076
+ const a = this.classes.get(e);
1077
+ s && a && s.split(A.STYLECLASS_SEP).forEach((r) => {
1078
+ const l = r.replace(/([^;]*);/, "$1").trim();
1079
+ if (RegExp(A.COLOR_KEYWORD).exec(r)) {
1080
+ const p = l.replace(A.FILL_KEYWORD, A.BG_FILL).replace(A.COLOR_KEYWORD, A.FILL_KEYWORD);
1081
+ a.textStyles.push(p);
1082
+ }
1083
+ a.styles.push(l);
1084
+ });
1085
+ }
1086
+ getClasses() {
1087
+ return this.classes;
1088
+ }
1089
+ /**
1090
+ * Add a (style) class or css class to a state with the given id.
1091
+ * If the state isn't already in the list of known states, add it.
1092
+ * Might be called by parser when a style class or CSS class should be applied to a state
1093
+ *
1094
+ * @param itemIds - The id or a list of ids of the item(s) to apply the css class to
1095
+ * @param cssClassName - CSS class name
1096
+ */
1097
+ setCssClass(e, s) {
1098
+ e.split(",").forEach((a) => {
1099
+ var l;
1100
+ let r = this.getState(a);
1101
+ if (!r) {
1102
+ const u = a.trim();
1103
+ this.addState(u), r = this.getState(u);
1104
+ }
1105
+ (l = r == null ? void 0 : r.classes) == null || l.push(s);
1106
+ });
1107
+ }
1108
+ /**
1109
+ * Add a style to a state with the given id.
1110
+ * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px
1111
+ * where 'style' is the keyword
1112
+ * stateId is the id of a state
1113
+ * the rest of the string is the styleText (all of the attributes to be applied to the state)
1114
+ *
1115
+ * @param itemId - The id of item to apply the style to
1116
+ * @param styleText - the text of the attributes for the style
1117
+ */
1118
+ setStyle(e, s) {
1119
+ var a, r;
1120
+ (r = (a = this.getState(e)) == null ? void 0 : a.styles) == null || r.push(s);
1121
+ }
1122
+ /**
1123
+ * Add a text style to a state with the given id
1124
+ *
1125
+ * @param itemId - The id of item to apply the css class to
1126
+ * @param cssClassName - CSS class name
1127
+ */
1128
+ setTextStyle(e, s) {
1129
+ var a, r;
1130
+ (r = (a = this.getState(e)) == null ? void 0 : a.textStyles) == null || r.push(s);
1131
+ }
1132
+ /**
1133
+ * Finds the direction statement in the root document.
1134
+ * @returns the direction statement if present
1135
+ */
1136
+ getDirectionStatement() {
1137
+ return this.rootDoc.find((e) => e.stmt === It);
1138
+ }
1139
+ getDirection() {
1140
+ var e;
1141
+ return ((e = this.getDirectionStatement()) == null ? void 0 : e.value) ?? de;
1142
+ }
1143
+ setDirection(e) {
1144
+ const s = this.getDirectionStatement();
1145
+ s ? s.value = e : this.rootDoc.unshift({ stmt: It, value: e });
1146
+ }
1147
+ trimColon(e) {
1148
+ return e.startsWith(":") ? e.slice(1).trim() : e.trim();
1149
+ }
1150
+ getData() {
1151
+ const e = F();
1152
+ return {
1153
+ nodes: this.nodes,
1154
+ edges: this.edges,
1155
+ other: {},
1156
+ config: e,
1157
+ direction: Kt(this.getRootDocV2())
1158
+ };
1159
+ }
1160
+ getConfig() {
1161
+ return F().state;
1162
+ }
1163
+ }, d(K, "StateDB"), K.relationType = {
1164
+ AGGREGATION: 0,
1165
+ EXTENSION: 1,
1166
+ COMPOSITION: 2,
1167
+ DEPENDENCY: 3
1168
+ }, K), Pe = /* @__PURE__ */ d((t) => `
1169
+ defs [id$="-barbEnd"] {
1170
+ fill: ${t.transitionColor};
1171
+ stroke: ${t.transitionColor};
1172
+ }
1173
+ g.stateGroup text {
1174
+ fill: ${t.nodeBorder};
1175
+ stroke: none;
1176
+ font-size: 10px;
1177
+ }
1178
+ g.stateGroup text {
1179
+ fill: ${t.textColor};
1180
+ stroke: none;
1181
+ font-size: 10px;
1182
+
1183
+ }
1184
+ g.stateGroup .state-title {
1185
+ font-weight: bolder;
1186
+ fill: ${t.stateLabelColor};
1187
+ }
1188
+
1189
+ g.stateGroup rect {
1190
+ fill: ${t.mainBkg};
1191
+ stroke: ${t.nodeBorder};
1192
+ }
1193
+
1194
+ g.stateGroup line {
1195
+ stroke: ${t.lineColor};
1196
+ stroke-width: ${t.strokeWidth || 1};
1197
+ }
1198
+
1199
+ .transition {
1200
+ stroke: ${t.transitionColor};
1201
+ stroke-width: ${t.strokeWidth || 1};
1202
+ fill: none;
1203
+ }
1204
+
1205
+ .stateGroup .composit {
1206
+ fill: ${t.background};
1207
+ border-bottom: 1px
1208
+ }
1209
+
1210
+ .stateGroup .alt-composit {
1211
+ fill: #e0e0e0;
1212
+ border-bottom: 1px
1213
+ }
1214
+
1215
+ .state-note {
1216
+ stroke: ${t.noteBorderColor};
1217
+ fill: ${t.noteBkgColor};
1218
+
1219
+ text {
1220
+ fill: ${t.noteTextColor};
1221
+ stroke: none;
1222
+ font-size: 10px;
1223
+ }
1224
+ }
1225
+
1226
+ .stateLabel .box {
1227
+ stroke: none;
1228
+ stroke-width: 0;
1229
+ fill: ${t.mainBkg};
1230
+ opacity: 0.5;
1231
+ }
1232
+
1233
+ .edgeLabel .label rect {
1234
+ fill: ${t.labelBackgroundColor};
1235
+ opacity: 0.5;
1236
+ }
1237
+ .edgeLabel {
1238
+ background-color: ${t.edgeLabelBackground};
1239
+ p {
1240
+ background-color: ${t.edgeLabelBackground};
1241
+ }
1242
+ rect {
1243
+ opacity: 0.5;
1244
+ background-color: ${t.edgeLabelBackground};
1245
+ fill: ${t.edgeLabelBackground};
1246
+ }
1247
+ text-align: center;
1248
+ }
1249
+ .edgeLabel .label text {
1250
+ fill: ${t.transitionLabelColor || t.tertiaryTextColor};
1251
+ }
1252
+ .label div .edgeLabel {
1253
+ color: ${t.transitionLabelColor || t.tertiaryTextColor};
1254
+ }
1255
+
1256
+ .stateLabel text {
1257
+ fill: ${t.stateLabelColor};
1258
+ font-size: 10px;
1259
+ font-weight: bold;
1260
+ }
1261
+
1262
+ .node circle.state-start {
1263
+ fill: ${t.specialStateColor};
1264
+ stroke: ${t.specialStateColor};
1265
+ }
1266
+
1267
+ .node .fork-join {
1268
+ fill: ${t.specialStateColor};
1269
+ stroke: ${t.specialStateColor};
1270
+ }
1271
+
1272
+ .node circle.state-end {
1273
+ fill: ${t.innerEndBackground};
1274
+ stroke: ${t.background};
1275
+ stroke-width: 1.5
1276
+ }
1277
+ .end-state-inner {
1278
+ fill: ${t.compositeBackground || t.background};
1279
+ // stroke: ${t.background};
1280
+ stroke-width: 1.5
1281
+ }
1282
+
1283
+ .node rect {
1284
+ fill: ${t.stateBkg || t.mainBkg};
1285
+ stroke: ${t.stateBorder || t.nodeBorder};
1286
+ stroke-width: ${t.strokeWidth || 1}px;
1287
+ }
1288
+ .node polygon {
1289
+ fill: ${t.mainBkg};
1290
+ stroke: ${t.stateBorder || t.nodeBorder};;
1291
+ stroke-width: ${t.strokeWidth || 1}px;
1292
+ }
1293
+ [id$="-barbEnd"] {
1294
+ fill: ${t.lineColor};
1295
+ }
1296
+
1297
+ .statediagram-cluster rect {
1298
+ fill: ${t.compositeTitleBackground};
1299
+ stroke: ${t.stateBorder || t.nodeBorder};
1300
+ stroke-width: ${t.strokeWidth || 1}px;
1301
+ }
1302
+
1303
+ .cluster-label, .nodeLabel {
1304
+ color: ${t.stateLabelColor};
1305
+ // line-height: 1;
1306
+ }
1307
+
1308
+ .statediagram-cluster rect.outer {
1309
+ rx: 5px;
1310
+ ry: 5px;
1311
+ }
1312
+ .statediagram-state .divider {
1313
+ stroke: ${t.stateBorder || t.nodeBorder};
1314
+ }
1315
+
1316
+ .statediagram-state .title-state {
1317
+ rx: 5px;
1318
+ ry: 5px;
1319
+ }
1320
+ .statediagram-cluster.statediagram-cluster .inner {
1321
+ fill: ${t.compositeBackground || t.background};
1322
+ }
1323
+ .statediagram-cluster.statediagram-cluster-alt .inner {
1324
+ fill: ${t.altBackground ? t.altBackground : "#efefef"};
1325
+ }
1326
+
1327
+ .statediagram-cluster .inner {
1328
+ rx:0;
1329
+ ry:0;
1330
+ }
1331
+
1332
+ .statediagram-state rect.basic {
1333
+ rx: 5px;
1334
+ ry: 5px;
1335
+ }
1336
+ .statediagram-state rect.divider {
1337
+ stroke-dasharray: 10,10;
1338
+ fill: ${t.altBackground ? t.altBackground : "#efefef"};
1339
+ }
1340
+
1341
+ .note-edge {
1342
+ stroke-dasharray: 5;
1343
+ }
1344
+
1345
+ .statediagram-note rect {
1346
+ fill: ${t.noteBkgColor};
1347
+ stroke: ${t.noteBorderColor};
1348
+ stroke-width: 1px;
1349
+ rx: 0;
1350
+ ry: 0;
1351
+ }
1352
+ .statediagram-note rect {
1353
+ fill: ${t.noteBkgColor};
1354
+ stroke: ${t.noteBorderColor};
1355
+ stroke-width: 1px;
1356
+ rx: 0;
1357
+ ry: 0;
1358
+ }
1359
+
1360
+ .statediagram-note text {
1361
+ fill: ${t.noteTextColor};
1362
+ }
1363
+
1364
+ .statediagram-note .nodeLabel {
1365
+ color: ${t.noteTextColor};
1366
+ }
1367
+ .statediagram .edgeLabel {
1368
+ color: red; // ${t.noteTextColor};
1369
+ }
1370
+
1371
+ [id$="-dependencyStart"], [id$="-dependencyEnd"] {
1372
+ fill: ${t.lineColor};
1373
+ stroke: ${t.lineColor};
1374
+ stroke-width: ${t.strokeWidth || 1};
1375
+ }
1376
+
1377
+ .statediagramTitleText {
1378
+ text-anchor: middle;
1379
+ font-size: 18px;
1380
+ fill: ${t.textColor};
1381
+ }
1382
+
1383
+ [data-look="neo"].statediagram-cluster rect {
1384
+ fill: ${t.mainBkg};
1385
+ stroke: ${t.useGradient ? "url(" + t.svgId + "-gradient)" : t.stateBorder || t.nodeBorder};
1386
+ stroke-width: ${t.strokeWidth ?? 1};
1387
+ }
1388
+ [data-look="neo"].statediagram-cluster rect.outer {
1389
+ rx: ${t.radius}px;
1390
+ ry: ${t.radius}px;
1391
+ filter: ${t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${t.svgId}-drop-shadow)`) : "none"}
1392
+ }
1393
+ `, "getStyles"), Ue = Pe;
1394
+ export {
1395
+ Me as S,
1396
+ Ve as a,
1397
+ Ue as b,
1398
+ Ge as s
1399
+ };