@readme/markdown 7.10.2 → 7.10.3
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.
- package/dist/10.node.js +22721 -0
- package/dist/11.node.js +1443 -0
- package/dist/120.node.js +22 -0
- package/dist/134.node.js +22 -0
- package/dist/150.node.js +1891 -0
- package/dist/17.node.js +1376 -0
- package/dist/246.node.js +1932 -0
- package/dist/351.node.js +2403 -0
- package/dist/366.node.js +1184 -0
- package/dist/403.node.js +2195 -0
- package/dist/429.node.js +11133 -0
- package/dist/485.node.js +517 -0
- package/dist/486.node.js +31818 -0
- package/dist/488.node.js +58 -0
- package/dist/489.node.js +18475 -0
- package/dist/510.node.js +249 -0
- package/dist/52.node.js +811 -0
- package/dist/550.node.js +1456 -0
- package/dist/551.node.js +2725 -0
- package/dist/617.node.js +22 -0
- package/dist/687.node.js +3674 -0
- package/dist/745.node.js +7507 -0
- package/dist/775.node.js +1903 -0
- package/dist/786.node.js +31381 -0
- package/dist/788.node.js +1024 -0
- package/dist/81.node.js +385 -0
- package/dist/849.node.js +2589 -0
- package/dist/863.node.js +22 -0
- package/dist/867.node.js +1417 -0
- package/dist/881.node.js +1279 -0
- package/dist/885.node.js +51 -0
- package/dist/896.node.js +1616 -0
- package/dist/906.node.js +1818 -0
- package/dist/91.node.js +22 -0
- package/dist/940.node.js +3362 -0
- package/dist/952.node.js +246 -0
- package/dist/995.node.js +5737 -0
- package/dist/main.node.js +5115 -64
- package/package.json +1 -1
package/dist/246.node.js
ADDED
|
@@ -0,0 +1,1932 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 246;
|
|
3
|
+
exports.ids = [246];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 4265:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ A: () => (/* binding */ getDiagramElement),
|
|
11
|
+
/* harmony export */ P: () => (/* binding */ setupViewPortForSVG)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
|
|
14
|
+
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8066);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// src/rendering-util/insertElementsForSize.js
|
|
18
|
+
|
|
19
|
+
var getDiagramElement = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((id, securityLevel) => {
|
|
20
|
+
let sandboxElement;
|
|
21
|
+
if (securityLevel === "sandbox") {
|
|
22
|
+
sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id);
|
|
23
|
+
}
|
|
24
|
+
const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body");
|
|
25
|
+
const svg = root.select(`[id="${id}"]`);
|
|
26
|
+
return svg;
|
|
27
|
+
}, "getDiagramElement");
|
|
28
|
+
|
|
29
|
+
// src/rendering-util/setupViewPortForSVG.ts
|
|
30
|
+
var setupViewPortForSVG = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((svg, padding, cssDiagram, useMaxWidth) => {
|
|
31
|
+
svg.attr("class", cssDiagram);
|
|
32
|
+
const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);
|
|
33
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .configureSvgSize */ .a$)(svg, height, width, useMaxWidth);
|
|
34
|
+
const viewBox = createViewBox(x, y, width, height, padding);
|
|
35
|
+
svg.attr("viewBox", viewBox);
|
|
36
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
|
|
37
|
+
}, "setupViewPortForSVG");
|
|
38
|
+
var calculateDimensionsWithPadding = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((svg, padding) => {
|
|
39
|
+
const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
|
|
40
|
+
return {
|
|
41
|
+
width: bounds.width + padding * 2,
|
|
42
|
+
height: bounds.height + padding * 2,
|
|
43
|
+
x: bounds.x,
|
|
44
|
+
y: bounds.y
|
|
45
|
+
};
|
|
46
|
+
}, "calculateDimensionsWithPadding");
|
|
47
|
+
var createViewBox = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((x, y, width, height, padding) => {
|
|
48
|
+
return `${x - padding} ${y - padding} ${width} ${height}`;
|
|
49
|
+
}, "createViewBox");
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/***/ }),
|
|
55
|
+
|
|
56
|
+
/***/ 3246:
|
|
57
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
58
|
+
|
|
59
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60
|
+
/* harmony export */ Zk: () => (/* binding */ stateDiagram_default),
|
|
61
|
+
/* harmony export */ iP: () => (/* binding */ stateDb_default),
|
|
62
|
+
/* harmony export */ q7: () => (/* binding */ stateRenderer_v3_unified_default),
|
|
63
|
+
/* harmony export */ tM: () => (/* binding */ styles_default)
|
|
64
|
+
/* harmony export */ });
|
|
65
|
+
/* harmony import */ var _chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4265);
|
|
66
|
+
/* harmony import */ var _chunk_U2OMI7UW_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2385);
|
|
67
|
+
/* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2843);
|
|
68
|
+
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6322);
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
// src/diagrams/state/parser/stateDiagram.jison
|
|
75
|
+
var parser = function() {
|
|
76
|
+
var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(k, v, o2, l) {
|
|
77
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
78
|
+
return o2;
|
|
79
|
+
}, "o"), $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 16], $V7 = [1, 17], $V8 = [1, 18], $V9 = [1, 19], $Va = [1, 32], $Vb = [1, 20], $Vc = [1, 21], $Vd = [1, 22], $Ve = [1, 23], $Vf = [1, 24], $Vg = [1, 26], $Vh = [1, 27], $Vi = [1, 28], $Vj = [1, 29], $Vk = [1, 30], $Vl = [1, 31], $Vm = [1, 34], $Vn = [1, 35], $Vo = [1, 36], $Vp = [1, 37], $Vq = [1, 33], $Vr = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54], $Vs = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54], $Vt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54];
|
|
80
|
+
var parser2 = {
|
|
81
|
+
trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function trace() {
|
|
82
|
+
}, "trace"),
|
|
83
|
+
yy: {},
|
|
84
|
+
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, "classDef": 38, "CLASSDEF_ID": 39, "CLASSDEF_STYLEOPTS": 40, "DEFAULT": 41, "style": 42, "STYLE_IDS": 43, "STYLEDEF_STYLEOPTS": 44, "class": 45, "CLASSENTITY_IDS": 46, "STYLECLASS": 47, "direction_tb": 48, "direction_bt": 49, "direction_rl": 50, "direction_lr": 51, "eol": 52, ";": 53, "EDGE_STATE": 54, "STYLE_SEPARATOR": 55, "left_of": 56, "right_of": 57, "$accept": 0, "$end": 1 },
|
|
85
|
+
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: "classDef", 39: "CLASSDEF_ID", 40: "CLASSDEF_STYLEOPTS", 41: "DEFAULT", 42: "style", 43: "STYLE_IDS", 44: "STYLEDEF_STYLEOPTS", 45: "class", 46: "CLASSENTITY_IDS", 47: "STYLECLASS", 48: "direction_tb", 49: "direction_bt", 50: "direction_rl", 51: "direction_lr", 53: ";", 54: "EDGE_STATE", 55: "STYLE_SEPARATOR", 56: "left_of", 57: "right_of" },
|
|
86
|
+
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], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [52, 1], [52, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
|
|
87
|
+
performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
88
|
+
var $0 = $$.length - 1;
|
|
89
|
+
switch (yystate) {
|
|
90
|
+
case 3:
|
|
91
|
+
yy.setRootDoc($$[$0]);
|
|
92
|
+
return $$[$0];
|
|
93
|
+
break;
|
|
94
|
+
case 4:
|
|
95
|
+
this.$ = [];
|
|
96
|
+
break;
|
|
97
|
+
case 5:
|
|
98
|
+
if ($$[$0] != "nl") {
|
|
99
|
+
$$[$0 - 1].push($$[$0]);
|
|
100
|
+
this.$ = $$[$0 - 1];
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case 6:
|
|
104
|
+
case 7:
|
|
105
|
+
this.$ = $$[$0];
|
|
106
|
+
break;
|
|
107
|
+
case 8:
|
|
108
|
+
this.$ = "nl";
|
|
109
|
+
break;
|
|
110
|
+
case 12:
|
|
111
|
+
this.$ = $$[$0];
|
|
112
|
+
break;
|
|
113
|
+
case 13:
|
|
114
|
+
const stateStmt = $$[$0 - 1];
|
|
115
|
+
stateStmt.description = yy.trimColon($$[$0]);
|
|
116
|
+
this.$ = stateStmt;
|
|
117
|
+
break;
|
|
118
|
+
case 14:
|
|
119
|
+
this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] };
|
|
120
|
+
break;
|
|
121
|
+
case 15:
|
|
122
|
+
const relDescription = yy.trimColon($$[$0]);
|
|
123
|
+
this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription };
|
|
124
|
+
break;
|
|
125
|
+
case 19:
|
|
126
|
+
this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] };
|
|
127
|
+
break;
|
|
128
|
+
case 20:
|
|
129
|
+
var id = $$[$0];
|
|
130
|
+
var description = $$[$0 - 2].trim();
|
|
131
|
+
if ($$[$0].match(":")) {
|
|
132
|
+
var parts = $$[$0].split(":");
|
|
133
|
+
id = parts[0];
|
|
134
|
+
description = [description, parts[1]];
|
|
135
|
+
}
|
|
136
|
+
this.$ = { stmt: "state", id, type: "default", description };
|
|
137
|
+
break;
|
|
138
|
+
case 21:
|
|
139
|
+
this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] };
|
|
140
|
+
break;
|
|
141
|
+
case 22:
|
|
142
|
+
this.$ = { stmt: "state", id: $$[$0], type: "fork" };
|
|
143
|
+
break;
|
|
144
|
+
case 23:
|
|
145
|
+
this.$ = { stmt: "state", id: $$[$0], type: "join" };
|
|
146
|
+
break;
|
|
147
|
+
case 24:
|
|
148
|
+
this.$ = { stmt: "state", id: $$[$0], type: "choice" };
|
|
149
|
+
break;
|
|
150
|
+
case 25:
|
|
151
|
+
this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" };
|
|
152
|
+
break;
|
|
153
|
+
case 26:
|
|
154
|
+
this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } };
|
|
155
|
+
break;
|
|
156
|
+
case 29:
|
|
157
|
+
this.$ = $$[$0].trim();
|
|
158
|
+
yy.setAccTitle(this.$);
|
|
159
|
+
break;
|
|
160
|
+
case 30:
|
|
161
|
+
case 31:
|
|
162
|
+
this.$ = $$[$0].trim();
|
|
163
|
+
yy.setAccDescription(this.$);
|
|
164
|
+
break;
|
|
165
|
+
case 32:
|
|
166
|
+
case 33:
|
|
167
|
+
this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() };
|
|
168
|
+
break;
|
|
169
|
+
case 34:
|
|
170
|
+
this.$ = { stmt: "style", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
|
|
171
|
+
break;
|
|
172
|
+
case 35:
|
|
173
|
+
this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
|
|
174
|
+
break;
|
|
175
|
+
case 36:
|
|
176
|
+
yy.setDirection("TB");
|
|
177
|
+
this.$ = { stmt: "dir", value: "TB" };
|
|
178
|
+
break;
|
|
179
|
+
case 37:
|
|
180
|
+
yy.setDirection("BT");
|
|
181
|
+
this.$ = { stmt: "dir", value: "BT" };
|
|
182
|
+
break;
|
|
183
|
+
case 38:
|
|
184
|
+
yy.setDirection("RL");
|
|
185
|
+
this.$ = { stmt: "dir", value: "RL" };
|
|
186
|
+
break;
|
|
187
|
+
case 39:
|
|
188
|
+
yy.setDirection("LR");
|
|
189
|
+
this.$ = { stmt: "dir", value: "LR" };
|
|
190
|
+
break;
|
|
191
|
+
case 42:
|
|
192
|
+
case 43:
|
|
193
|
+
this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" };
|
|
194
|
+
break;
|
|
195
|
+
case 44:
|
|
196
|
+
this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
|
|
197
|
+
break;
|
|
198
|
+
case 45:
|
|
199
|
+
this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}, "anonymous"),
|
|
203
|
+
table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 5]), { 9: 38, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 7]), o($Vr, [2, 8]), o($Vr, [2, 9]), o($Vr, [2, 10]), o($Vr, [2, 11]), o($Vr, [2, 12], { 14: [1, 39], 15: [1, 40] }), o($Vr, [2, 16]), { 18: [1, 41] }, o($Vr, [2, 18], { 20: [1, 42] }), { 23: [1, 43] }, o($Vr, [2, 22]), o($Vr, [2, 23]), o($Vr, [2, 24]), o($Vr, [2, 25]), { 30: 44, 31: [1, 45], 56: [1, 46], 57: [1, 47] }, o($Vr, [2, 28]), { 34: [1, 48] }, { 36: [1, 49] }, o($Vr, [2, 31]), { 39: [1, 50], 41: [1, 51] }, { 43: [1, 52] }, { 46: [1, 53] }, o($Vs, [2, 42], { 55: [1, 54] }), o($Vs, [2, 43], { 55: [1, 55] }), o($Vr, [2, 36]), o($Vr, [2, 37]), o($Vr, [2, 38]), o($Vr, [2, 39]), o($Vr, [2, 6]), o($Vr, [2, 13]), { 13: 56, 24: $Va, 54: $Vq }, o($Vr, [2, 17]), o($Vt, $V3, { 7: 57 }), { 24: [1, 58] }, { 24: [1, 59] }, { 23: [1, 60] }, { 24: [2, 46] }, { 24: [2, 47] }, o($Vr, [2, 29]), o($Vr, [2, 30]), { 40: [1, 61] }, { 40: [1, 62] }, { 44: [1, 63] }, { 47: [1, 64] }, { 24: [1, 65] }, { 24: [1, 66] }, o($Vr, [2, 14], { 14: [1, 67] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 21: [1, 68], 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 20], { 20: [1, 69] }), { 31: [1, 70] }, { 24: [1, 71] }, o($Vr, [2, 32]), o($Vr, [2, 33]), o($Vr, [2, 34]), o($Vr, [2, 35]), o($Vs, [2, 44]), o($Vs, [2, 45]), o($Vr, [2, 15]), o($Vr, [2, 19]), o($Vt, $V3, { 7: 72 }), o($Vr, [2, 26]), o($Vr, [2, 27]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 21: [1, 73], 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 21])],
|
|
204
|
+
defaultActions: { 5: [2, 1], 6: [2, 2], 46: [2, 46], 47: [2, 47] },
|
|
205
|
+
parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
|
|
206
|
+
if (hash.recoverable) {
|
|
207
|
+
this.trace(str);
|
|
208
|
+
} else {
|
|
209
|
+
var error = new Error(str);
|
|
210
|
+
error.hash = hash;
|
|
211
|
+
throw error;
|
|
212
|
+
}
|
|
213
|
+
}, "parseError"),
|
|
214
|
+
parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parse(input) {
|
|
215
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
216
|
+
var args = lstack.slice.call(arguments, 1);
|
|
217
|
+
var lexer2 = Object.create(this.lexer);
|
|
218
|
+
var sharedState = { yy: {} };
|
|
219
|
+
for (var k in this.yy) {
|
|
220
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
221
|
+
sharedState.yy[k] = this.yy[k];
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
lexer2.setInput(input, sharedState.yy);
|
|
225
|
+
sharedState.yy.lexer = lexer2;
|
|
226
|
+
sharedState.yy.parser = this;
|
|
227
|
+
if (typeof lexer2.yylloc == "undefined") {
|
|
228
|
+
lexer2.yylloc = {};
|
|
229
|
+
}
|
|
230
|
+
var yyloc = lexer2.yylloc;
|
|
231
|
+
lstack.push(yyloc);
|
|
232
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
233
|
+
if (typeof sharedState.yy.parseError === "function") {
|
|
234
|
+
this.parseError = sharedState.yy.parseError;
|
|
235
|
+
} else {
|
|
236
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
237
|
+
}
|
|
238
|
+
function popStack(n) {
|
|
239
|
+
stack.length = stack.length - 2 * n;
|
|
240
|
+
vstack.length = vstack.length - n;
|
|
241
|
+
lstack.length = lstack.length - n;
|
|
242
|
+
}
|
|
243
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(popStack, "popStack");
|
|
244
|
+
function lex() {
|
|
245
|
+
var token;
|
|
246
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
|
247
|
+
if (typeof token !== "number") {
|
|
248
|
+
if (token instanceof Array) {
|
|
249
|
+
tstack = token;
|
|
250
|
+
token = tstack.pop();
|
|
251
|
+
}
|
|
252
|
+
token = self.symbols_[token] || token;
|
|
253
|
+
}
|
|
254
|
+
return token;
|
|
255
|
+
}
|
|
256
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(lex, "lex");
|
|
257
|
+
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
|
258
|
+
while (true) {
|
|
259
|
+
state = stack[stack.length - 1];
|
|
260
|
+
if (this.defaultActions[state]) {
|
|
261
|
+
action = this.defaultActions[state];
|
|
262
|
+
} else {
|
|
263
|
+
if (symbol === null || typeof symbol == "undefined") {
|
|
264
|
+
symbol = lex();
|
|
265
|
+
}
|
|
266
|
+
action = table[state] && table[state][symbol];
|
|
267
|
+
}
|
|
268
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
269
|
+
var errStr = "";
|
|
270
|
+
expected = [];
|
|
271
|
+
for (p in table[state]) {
|
|
272
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
273
|
+
expected.push("'" + this.terminals_[p] + "'");
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (lexer2.showPosition) {
|
|
277
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
278
|
+
} else {
|
|
279
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
280
|
+
}
|
|
281
|
+
this.parseError(errStr, {
|
|
282
|
+
text: lexer2.match,
|
|
283
|
+
token: this.terminals_[symbol] || symbol,
|
|
284
|
+
line: lexer2.yylineno,
|
|
285
|
+
loc: yyloc,
|
|
286
|
+
expected
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
290
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
291
|
+
}
|
|
292
|
+
switch (action[0]) {
|
|
293
|
+
case 1:
|
|
294
|
+
stack.push(symbol);
|
|
295
|
+
vstack.push(lexer2.yytext);
|
|
296
|
+
lstack.push(lexer2.yylloc);
|
|
297
|
+
stack.push(action[1]);
|
|
298
|
+
symbol = null;
|
|
299
|
+
if (!preErrorSymbol) {
|
|
300
|
+
yyleng = lexer2.yyleng;
|
|
301
|
+
yytext = lexer2.yytext;
|
|
302
|
+
yylineno = lexer2.yylineno;
|
|
303
|
+
yyloc = lexer2.yylloc;
|
|
304
|
+
if (recovering > 0) {
|
|
305
|
+
recovering--;
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
symbol = preErrorSymbol;
|
|
309
|
+
preErrorSymbol = null;
|
|
310
|
+
}
|
|
311
|
+
break;
|
|
312
|
+
case 2:
|
|
313
|
+
len = this.productions_[action[1]][1];
|
|
314
|
+
yyval.$ = vstack[vstack.length - len];
|
|
315
|
+
yyval._$ = {
|
|
316
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
317
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
318
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
319
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
320
|
+
};
|
|
321
|
+
if (ranges) {
|
|
322
|
+
yyval._$.range = [
|
|
323
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
324
|
+
lstack[lstack.length - 1].range[1]
|
|
325
|
+
];
|
|
326
|
+
}
|
|
327
|
+
r = this.performAction.apply(yyval, [
|
|
328
|
+
yytext,
|
|
329
|
+
yyleng,
|
|
330
|
+
yylineno,
|
|
331
|
+
sharedState.yy,
|
|
332
|
+
action[1],
|
|
333
|
+
vstack,
|
|
334
|
+
lstack
|
|
335
|
+
].concat(args));
|
|
336
|
+
if (typeof r !== "undefined") {
|
|
337
|
+
return r;
|
|
338
|
+
}
|
|
339
|
+
if (len) {
|
|
340
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
341
|
+
vstack = vstack.slice(0, -1 * len);
|
|
342
|
+
lstack = lstack.slice(0, -1 * len);
|
|
343
|
+
}
|
|
344
|
+
stack.push(this.productions_[action[1]][0]);
|
|
345
|
+
vstack.push(yyval.$);
|
|
346
|
+
lstack.push(yyval._$);
|
|
347
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
348
|
+
stack.push(newState);
|
|
349
|
+
break;
|
|
350
|
+
case 3:
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return true;
|
|
355
|
+
}, "parse")
|
|
356
|
+
};
|
|
357
|
+
var lexer = /* @__PURE__ */ function() {
|
|
358
|
+
var lexer2 = {
|
|
359
|
+
EOF: 1,
|
|
360
|
+
parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
|
|
361
|
+
if (this.yy.parser) {
|
|
362
|
+
this.yy.parser.parseError(str, hash);
|
|
363
|
+
} else {
|
|
364
|
+
throw new Error(str);
|
|
365
|
+
}
|
|
366
|
+
}, "parseError"),
|
|
367
|
+
// resets the lexer, sets new input
|
|
368
|
+
setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(input, yy) {
|
|
369
|
+
this.yy = yy || this.yy || {};
|
|
370
|
+
this._input = input;
|
|
371
|
+
this._more = this._backtrack = this.done = false;
|
|
372
|
+
this.yylineno = this.yyleng = 0;
|
|
373
|
+
this.yytext = this.matched = this.match = "";
|
|
374
|
+
this.conditionStack = ["INITIAL"];
|
|
375
|
+
this.yylloc = {
|
|
376
|
+
first_line: 1,
|
|
377
|
+
first_column: 0,
|
|
378
|
+
last_line: 1,
|
|
379
|
+
last_column: 0
|
|
380
|
+
};
|
|
381
|
+
if (this.options.ranges) {
|
|
382
|
+
this.yylloc.range = [0, 0];
|
|
383
|
+
}
|
|
384
|
+
this.offset = 0;
|
|
385
|
+
return this;
|
|
386
|
+
}, "setInput"),
|
|
387
|
+
// consumes and returns one char from the input
|
|
388
|
+
input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
389
|
+
var ch = this._input[0];
|
|
390
|
+
this.yytext += ch;
|
|
391
|
+
this.yyleng++;
|
|
392
|
+
this.offset++;
|
|
393
|
+
this.match += ch;
|
|
394
|
+
this.matched += ch;
|
|
395
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
396
|
+
if (lines) {
|
|
397
|
+
this.yylineno++;
|
|
398
|
+
this.yylloc.last_line++;
|
|
399
|
+
} else {
|
|
400
|
+
this.yylloc.last_column++;
|
|
401
|
+
}
|
|
402
|
+
if (this.options.ranges) {
|
|
403
|
+
this.yylloc.range[1]++;
|
|
404
|
+
}
|
|
405
|
+
this._input = this._input.slice(1);
|
|
406
|
+
return ch;
|
|
407
|
+
}, "input"),
|
|
408
|
+
// unshifts one char (or a string) into the input
|
|
409
|
+
unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(ch) {
|
|
410
|
+
var len = ch.length;
|
|
411
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
412
|
+
this._input = ch + this._input;
|
|
413
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
414
|
+
this.offset -= len;
|
|
415
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
416
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
417
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
418
|
+
if (lines.length - 1) {
|
|
419
|
+
this.yylineno -= lines.length - 1;
|
|
420
|
+
}
|
|
421
|
+
var r = this.yylloc.range;
|
|
422
|
+
this.yylloc = {
|
|
423
|
+
first_line: this.yylloc.first_line,
|
|
424
|
+
last_line: this.yylineno + 1,
|
|
425
|
+
first_column: this.yylloc.first_column,
|
|
426
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
427
|
+
};
|
|
428
|
+
if (this.options.ranges) {
|
|
429
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
430
|
+
}
|
|
431
|
+
this.yyleng = this.yytext.length;
|
|
432
|
+
return this;
|
|
433
|
+
}, "unput"),
|
|
434
|
+
// When called from action, caches matched text and appends it on next action
|
|
435
|
+
more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
436
|
+
this._more = true;
|
|
437
|
+
return this;
|
|
438
|
+
}, "more"),
|
|
439
|
+
// 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.
|
|
440
|
+
reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
441
|
+
if (this.options.backtrack_lexer) {
|
|
442
|
+
this._backtrack = true;
|
|
443
|
+
} else {
|
|
444
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
445
|
+
text: "",
|
|
446
|
+
token: null,
|
|
447
|
+
line: this.yylineno
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
return this;
|
|
451
|
+
}, "reject"),
|
|
452
|
+
// retain first n characters of the match
|
|
453
|
+
less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(n) {
|
|
454
|
+
this.unput(this.match.slice(n));
|
|
455
|
+
}, "less"),
|
|
456
|
+
// displays already matched input, i.e. for error messages
|
|
457
|
+
pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
458
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
459
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
460
|
+
}, "pastInput"),
|
|
461
|
+
// displays upcoming input, i.e. for error messages
|
|
462
|
+
upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
463
|
+
var next = this.match;
|
|
464
|
+
if (next.length < 20) {
|
|
465
|
+
next += this._input.substr(0, 20 - next.length);
|
|
466
|
+
}
|
|
467
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
468
|
+
}, "upcomingInput"),
|
|
469
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
470
|
+
showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
471
|
+
var pre = this.pastInput();
|
|
472
|
+
var c = new Array(pre.length + 1).join("-");
|
|
473
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
474
|
+
}, "showPosition"),
|
|
475
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
476
|
+
test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(match, indexed_rule) {
|
|
477
|
+
var token, lines, backup;
|
|
478
|
+
if (this.options.backtrack_lexer) {
|
|
479
|
+
backup = {
|
|
480
|
+
yylineno: this.yylineno,
|
|
481
|
+
yylloc: {
|
|
482
|
+
first_line: this.yylloc.first_line,
|
|
483
|
+
last_line: this.last_line,
|
|
484
|
+
first_column: this.yylloc.first_column,
|
|
485
|
+
last_column: this.yylloc.last_column
|
|
486
|
+
},
|
|
487
|
+
yytext: this.yytext,
|
|
488
|
+
match: this.match,
|
|
489
|
+
matches: this.matches,
|
|
490
|
+
matched: this.matched,
|
|
491
|
+
yyleng: this.yyleng,
|
|
492
|
+
offset: this.offset,
|
|
493
|
+
_more: this._more,
|
|
494
|
+
_input: this._input,
|
|
495
|
+
yy: this.yy,
|
|
496
|
+
conditionStack: this.conditionStack.slice(0),
|
|
497
|
+
done: this.done
|
|
498
|
+
};
|
|
499
|
+
if (this.options.ranges) {
|
|
500
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
504
|
+
if (lines) {
|
|
505
|
+
this.yylineno += lines.length;
|
|
506
|
+
}
|
|
507
|
+
this.yylloc = {
|
|
508
|
+
first_line: this.yylloc.last_line,
|
|
509
|
+
last_line: this.yylineno + 1,
|
|
510
|
+
first_column: this.yylloc.last_column,
|
|
511
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
512
|
+
};
|
|
513
|
+
this.yytext += match[0];
|
|
514
|
+
this.match += match[0];
|
|
515
|
+
this.matches = match;
|
|
516
|
+
this.yyleng = this.yytext.length;
|
|
517
|
+
if (this.options.ranges) {
|
|
518
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
519
|
+
}
|
|
520
|
+
this._more = false;
|
|
521
|
+
this._backtrack = false;
|
|
522
|
+
this._input = this._input.slice(match[0].length);
|
|
523
|
+
this.matched += match[0];
|
|
524
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
525
|
+
if (this.done && this._input) {
|
|
526
|
+
this.done = false;
|
|
527
|
+
}
|
|
528
|
+
if (token) {
|
|
529
|
+
return token;
|
|
530
|
+
} else if (this._backtrack) {
|
|
531
|
+
for (var k in backup) {
|
|
532
|
+
this[k] = backup[k];
|
|
533
|
+
}
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
return false;
|
|
537
|
+
}, "test_match"),
|
|
538
|
+
// return next match in input
|
|
539
|
+
next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
540
|
+
if (this.done) {
|
|
541
|
+
return this.EOF;
|
|
542
|
+
}
|
|
543
|
+
if (!this._input) {
|
|
544
|
+
this.done = true;
|
|
545
|
+
}
|
|
546
|
+
var token, match, tempMatch, index;
|
|
547
|
+
if (!this._more) {
|
|
548
|
+
this.yytext = "";
|
|
549
|
+
this.match = "";
|
|
550
|
+
}
|
|
551
|
+
var rules = this._currentRules();
|
|
552
|
+
for (var i = 0; i < rules.length; i++) {
|
|
553
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
554
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
555
|
+
match = tempMatch;
|
|
556
|
+
index = i;
|
|
557
|
+
if (this.options.backtrack_lexer) {
|
|
558
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
559
|
+
if (token !== false) {
|
|
560
|
+
return token;
|
|
561
|
+
} else if (this._backtrack) {
|
|
562
|
+
match = false;
|
|
563
|
+
continue;
|
|
564
|
+
} else {
|
|
565
|
+
return false;
|
|
566
|
+
}
|
|
567
|
+
} else if (!this.options.flex) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if (match) {
|
|
573
|
+
token = this.test_match(match, rules[index]);
|
|
574
|
+
if (token !== false) {
|
|
575
|
+
return token;
|
|
576
|
+
}
|
|
577
|
+
return false;
|
|
578
|
+
}
|
|
579
|
+
if (this._input === "") {
|
|
580
|
+
return this.EOF;
|
|
581
|
+
} else {
|
|
582
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
583
|
+
text: "",
|
|
584
|
+
token: null,
|
|
585
|
+
line: this.yylineno
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
}, "next"),
|
|
589
|
+
// return next match that has a token
|
|
590
|
+
lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function lex() {
|
|
591
|
+
var r = this.next();
|
|
592
|
+
if (r) {
|
|
593
|
+
return r;
|
|
594
|
+
} else {
|
|
595
|
+
return this.lex();
|
|
596
|
+
}
|
|
597
|
+
}, "lex"),
|
|
598
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
599
|
+
begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function begin(condition) {
|
|
600
|
+
this.conditionStack.push(condition);
|
|
601
|
+
}, "begin"),
|
|
602
|
+
// pop the previously active lexer condition state off the condition stack
|
|
603
|
+
popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function popState() {
|
|
604
|
+
var n = this.conditionStack.length - 1;
|
|
605
|
+
if (n > 0) {
|
|
606
|
+
return this.conditionStack.pop();
|
|
607
|
+
} else {
|
|
608
|
+
return this.conditionStack[0];
|
|
609
|
+
}
|
|
610
|
+
}, "popState"),
|
|
611
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
612
|
+
_currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function _currentRules() {
|
|
613
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
614
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
615
|
+
} else {
|
|
616
|
+
return this.conditions["INITIAL"].rules;
|
|
617
|
+
}
|
|
618
|
+
}, "_currentRules"),
|
|
619
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
620
|
+
topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function topState(n) {
|
|
621
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
622
|
+
if (n >= 0) {
|
|
623
|
+
return this.conditionStack[n];
|
|
624
|
+
} else {
|
|
625
|
+
return "INITIAL";
|
|
626
|
+
}
|
|
627
|
+
}, "topState"),
|
|
628
|
+
// alias for begin(condition)
|
|
629
|
+
pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function pushState(condition) {
|
|
630
|
+
this.begin(condition);
|
|
631
|
+
}, "pushState"),
|
|
632
|
+
// return the number of states currently on the stack
|
|
633
|
+
stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function stateStackSize() {
|
|
634
|
+
return this.conditionStack.length;
|
|
635
|
+
}, "stateStackSize"),
|
|
636
|
+
options: { "case-insensitive": true },
|
|
637
|
+
performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
638
|
+
var YYSTATE = YY_START;
|
|
639
|
+
switch ($avoiding_name_collisions) {
|
|
640
|
+
case 0:
|
|
641
|
+
return 41;
|
|
642
|
+
break;
|
|
643
|
+
case 1:
|
|
644
|
+
return 48;
|
|
645
|
+
break;
|
|
646
|
+
case 2:
|
|
647
|
+
return 49;
|
|
648
|
+
break;
|
|
649
|
+
case 3:
|
|
650
|
+
return 50;
|
|
651
|
+
break;
|
|
652
|
+
case 4:
|
|
653
|
+
return 51;
|
|
654
|
+
break;
|
|
655
|
+
case 5:
|
|
656
|
+
break;
|
|
657
|
+
case 6:
|
|
658
|
+
{
|
|
659
|
+
}
|
|
660
|
+
break;
|
|
661
|
+
case 7:
|
|
662
|
+
return 5;
|
|
663
|
+
break;
|
|
664
|
+
case 8:
|
|
665
|
+
break;
|
|
666
|
+
case 9:
|
|
667
|
+
break;
|
|
668
|
+
case 10:
|
|
669
|
+
break;
|
|
670
|
+
case 11:
|
|
671
|
+
break;
|
|
672
|
+
case 12:
|
|
673
|
+
this.pushState("SCALE");
|
|
674
|
+
return 17;
|
|
675
|
+
break;
|
|
676
|
+
case 13:
|
|
677
|
+
return 18;
|
|
678
|
+
break;
|
|
679
|
+
case 14:
|
|
680
|
+
this.popState();
|
|
681
|
+
break;
|
|
682
|
+
case 15:
|
|
683
|
+
this.begin("acc_title");
|
|
684
|
+
return 33;
|
|
685
|
+
break;
|
|
686
|
+
case 16:
|
|
687
|
+
this.popState();
|
|
688
|
+
return "acc_title_value";
|
|
689
|
+
break;
|
|
690
|
+
case 17:
|
|
691
|
+
this.begin("acc_descr");
|
|
692
|
+
return 35;
|
|
693
|
+
break;
|
|
694
|
+
case 18:
|
|
695
|
+
this.popState();
|
|
696
|
+
return "acc_descr_value";
|
|
697
|
+
break;
|
|
698
|
+
case 19:
|
|
699
|
+
this.begin("acc_descr_multiline");
|
|
700
|
+
break;
|
|
701
|
+
case 20:
|
|
702
|
+
this.popState();
|
|
703
|
+
break;
|
|
704
|
+
case 21:
|
|
705
|
+
return "acc_descr_multiline_value";
|
|
706
|
+
break;
|
|
707
|
+
case 22:
|
|
708
|
+
this.pushState("CLASSDEF");
|
|
709
|
+
return 38;
|
|
710
|
+
break;
|
|
711
|
+
case 23:
|
|
712
|
+
this.popState();
|
|
713
|
+
this.pushState("CLASSDEFID");
|
|
714
|
+
return "DEFAULT_CLASSDEF_ID";
|
|
715
|
+
break;
|
|
716
|
+
case 24:
|
|
717
|
+
this.popState();
|
|
718
|
+
this.pushState("CLASSDEFID");
|
|
719
|
+
return 39;
|
|
720
|
+
break;
|
|
721
|
+
case 25:
|
|
722
|
+
this.popState();
|
|
723
|
+
return 40;
|
|
724
|
+
break;
|
|
725
|
+
case 26:
|
|
726
|
+
this.pushState("CLASS");
|
|
727
|
+
return 45;
|
|
728
|
+
break;
|
|
729
|
+
case 27:
|
|
730
|
+
this.popState();
|
|
731
|
+
this.pushState("CLASS_STYLE");
|
|
732
|
+
return 46;
|
|
733
|
+
break;
|
|
734
|
+
case 28:
|
|
735
|
+
this.popState();
|
|
736
|
+
return 47;
|
|
737
|
+
break;
|
|
738
|
+
case 29:
|
|
739
|
+
this.pushState("STYLE");
|
|
740
|
+
return 42;
|
|
741
|
+
break;
|
|
742
|
+
case 30:
|
|
743
|
+
this.popState();
|
|
744
|
+
this.pushState("STYLEDEF_STYLES");
|
|
745
|
+
return 43;
|
|
746
|
+
break;
|
|
747
|
+
case 31:
|
|
748
|
+
this.popState();
|
|
749
|
+
return 44;
|
|
750
|
+
break;
|
|
751
|
+
case 32:
|
|
752
|
+
this.pushState("SCALE");
|
|
753
|
+
return 17;
|
|
754
|
+
break;
|
|
755
|
+
case 33:
|
|
756
|
+
return 18;
|
|
757
|
+
break;
|
|
758
|
+
case 34:
|
|
759
|
+
this.popState();
|
|
760
|
+
break;
|
|
761
|
+
case 35:
|
|
762
|
+
this.pushState("STATE");
|
|
763
|
+
break;
|
|
764
|
+
case 36:
|
|
765
|
+
this.popState();
|
|
766
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
767
|
+
return 25;
|
|
768
|
+
break;
|
|
769
|
+
case 37:
|
|
770
|
+
this.popState();
|
|
771
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
772
|
+
return 26;
|
|
773
|
+
break;
|
|
774
|
+
case 38:
|
|
775
|
+
this.popState();
|
|
776
|
+
yy_.yytext = yy_.yytext.slice(0, -10).trim();
|
|
777
|
+
return 27;
|
|
778
|
+
break;
|
|
779
|
+
case 39:
|
|
780
|
+
this.popState();
|
|
781
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
782
|
+
return 25;
|
|
783
|
+
break;
|
|
784
|
+
case 40:
|
|
785
|
+
this.popState();
|
|
786
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
787
|
+
return 26;
|
|
788
|
+
break;
|
|
789
|
+
case 41:
|
|
790
|
+
this.popState();
|
|
791
|
+
yy_.yytext = yy_.yytext.slice(0, -10).trim();
|
|
792
|
+
return 27;
|
|
793
|
+
break;
|
|
794
|
+
case 42:
|
|
795
|
+
return 48;
|
|
796
|
+
break;
|
|
797
|
+
case 43:
|
|
798
|
+
return 49;
|
|
799
|
+
break;
|
|
800
|
+
case 44:
|
|
801
|
+
return 50;
|
|
802
|
+
break;
|
|
803
|
+
case 45:
|
|
804
|
+
return 51;
|
|
805
|
+
break;
|
|
806
|
+
case 46:
|
|
807
|
+
this.pushState("STATE_STRING");
|
|
808
|
+
break;
|
|
809
|
+
case 47:
|
|
810
|
+
this.pushState("STATE_ID");
|
|
811
|
+
return "AS";
|
|
812
|
+
break;
|
|
813
|
+
case 48:
|
|
814
|
+
this.popState();
|
|
815
|
+
return "ID";
|
|
816
|
+
break;
|
|
817
|
+
case 49:
|
|
818
|
+
this.popState();
|
|
819
|
+
break;
|
|
820
|
+
case 50:
|
|
821
|
+
return "STATE_DESCR";
|
|
822
|
+
break;
|
|
823
|
+
case 51:
|
|
824
|
+
return 19;
|
|
825
|
+
break;
|
|
826
|
+
case 52:
|
|
827
|
+
this.popState();
|
|
828
|
+
break;
|
|
829
|
+
case 53:
|
|
830
|
+
this.popState();
|
|
831
|
+
this.pushState("struct");
|
|
832
|
+
return 20;
|
|
833
|
+
break;
|
|
834
|
+
case 54:
|
|
835
|
+
break;
|
|
836
|
+
case 55:
|
|
837
|
+
this.popState();
|
|
838
|
+
return 21;
|
|
839
|
+
break;
|
|
840
|
+
case 56:
|
|
841
|
+
break;
|
|
842
|
+
case 57:
|
|
843
|
+
this.begin("NOTE");
|
|
844
|
+
return 29;
|
|
845
|
+
break;
|
|
846
|
+
case 58:
|
|
847
|
+
this.popState();
|
|
848
|
+
this.pushState("NOTE_ID");
|
|
849
|
+
return 56;
|
|
850
|
+
break;
|
|
851
|
+
case 59:
|
|
852
|
+
this.popState();
|
|
853
|
+
this.pushState("NOTE_ID");
|
|
854
|
+
return 57;
|
|
855
|
+
break;
|
|
856
|
+
case 60:
|
|
857
|
+
this.popState();
|
|
858
|
+
this.pushState("FLOATING_NOTE");
|
|
859
|
+
break;
|
|
860
|
+
case 61:
|
|
861
|
+
this.popState();
|
|
862
|
+
this.pushState("FLOATING_NOTE_ID");
|
|
863
|
+
return "AS";
|
|
864
|
+
break;
|
|
865
|
+
case 62:
|
|
866
|
+
break;
|
|
867
|
+
case 63:
|
|
868
|
+
return "NOTE_TEXT";
|
|
869
|
+
break;
|
|
870
|
+
case 64:
|
|
871
|
+
this.popState();
|
|
872
|
+
return "ID";
|
|
873
|
+
break;
|
|
874
|
+
case 65:
|
|
875
|
+
this.popState();
|
|
876
|
+
this.pushState("NOTE_TEXT");
|
|
877
|
+
return 24;
|
|
878
|
+
break;
|
|
879
|
+
case 66:
|
|
880
|
+
this.popState();
|
|
881
|
+
yy_.yytext = yy_.yytext.substr(2).trim();
|
|
882
|
+
return 31;
|
|
883
|
+
break;
|
|
884
|
+
case 67:
|
|
885
|
+
this.popState();
|
|
886
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
887
|
+
return 31;
|
|
888
|
+
break;
|
|
889
|
+
case 68:
|
|
890
|
+
return 6;
|
|
891
|
+
break;
|
|
892
|
+
case 69:
|
|
893
|
+
return 6;
|
|
894
|
+
break;
|
|
895
|
+
case 70:
|
|
896
|
+
return 16;
|
|
897
|
+
break;
|
|
898
|
+
case 71:
|
|
899
|
+
return 54;
|
|
900
|
+
break;
|
|
901
|
+
case 72:
|
|
902
|
+
return 24;
|
|
903
|
+
break;
|
|
904
|
+
case 73:
|
|
905
|
+
yy_.yytext = yy_.yytext.trim();
|
|
906
|
+
return 14;
|
|
907
|
+
break;
|
|
908
|
+
case 74:
|
|
909
|
+
return 15;
|
|
910
|
+
break;
|
|
911
|
+
case 75:
|
|
912
|
+
return 28;
|
|
913
|
+
break;
|
|
914
|
+
case 76:
|
|
915
|
+
return 55;
|
|
916
|
+
break;
|
|
917
|
+
case 77:
|
|
918
|
+
return 5;
|
|
919
|
+
break;
|
|
920
|
+
case 78:
|
|
921
|
+
return "INVALID";
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
}, "anonymous"),
|
|
925
|
+
rules: [/^(?: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, /^(?:[^\}]%%[^\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, /^(?:%%(?!\{)[^\n]*)/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]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
|
|
926
|
+
conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 29, 35, 42, 43, 44, 45, 54, 55, 56, 57, 71, 72, 73, 74, 75], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [64], "inclusive": false }, "FLOATING_NOTE": { "rules": [61, 62, 63], "inclusive": false }, "NOTE_TEXT": { "rules": [66, 67], "inclusive": false }, "NOTE_ID": { "rules": [65], "inclusive": false }, "NOTE": { "rules": [58, 59, 60], "inclusive": false }, "STYLEDEF_STYLEOPTS": { "rules": [], "inclusive": false }, "STYLEDEF_STYLES": { "rules": [31], "inclusive": false }, "STYLE_IDS": { "rules": [], "inclusive": false }, "STYLE": { "rules": [30], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 33, 34], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [48], "inclusive": false }, "STATE_STRING": { "rules": [49, 50], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 36, 37, 38, 39, 40, 41, 46, 47, 51, 52, 53], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 35, 53, 57, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78], "inclusive": true } }
|
|
927
|
+
};
|
|
928
|
+
return lexer2;
|
|
929
|
+
}();
|
|
930
|
+
parser2.lexer = lexer;
|
|
931
|
+
function Parser() {
|
|
932
|
+
this.yy = {};
|
|
933
|
+
}
|
|
934
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(Parser, "Parser");
|
|
935
|
+
Parser.prototype = parser2;
|
|
936
|
+
parser2.Parser = Parser;
|
|
937
|
+
return new Parser();
|
|
938
|
+
}();
|
|
939
|
+
parser.parser = parser;
|
|
940
|
+
var stateDiagram_default = parser;
|
|
941
|
+
|
|
942
|
+
// src/diagrams/state/stateCommon.ts
|
|
943
|
+
var DEFAULT_DIAGRAM_DIRECTION = "LR";
|
|
944
|
+
var DEFAULT_NESTED_DOC_DIR = "TB";
|
|
945
|
+
var STMT_STATE = "state";
|
|
946
|
+
var STMT_RELATION = "relation";
|
|
947
|
+
var STMT_CLASSDEF = "classDef";
|
|
948
|
+
var STMT_STYLEDEF = "style";
|
|
949
|
+
var STMT_APPLYCLASS = "applyClass";
|
|
950
|
+
var DEFAULT_STATE_TYPE = "default";
|
|
951
|
+
var DIVIDER_TYPE = "divider";
|
|
952
|
+
var G_EDGE_STYLE = "fill:none";
|
|
953
|
+
var G_EDGE_ARROWHEADSTYLE = "fill: #333";
|
|
954
|
+
var G_EDGE_LABELPOS = "c";
|
|
955
|
+
var G_EDGE_LABELTYPE = "text";
|
|
956
|
+
var G_EDGE_THICKNESS = "normal";
|
|
957
|
+
var SHAPE_STATE = "rect";
|
|
958
|
+
var SHAPE_STATE_WITH_DESC = "rectWithTitle";
|
|
959
|
+
var SHAPE_START = "stateStart";
|
|
960
|
+
var SHAPE_END = "stateEnd";
|
|
961
|
+
var SHAPE_DIVIDER = "divider";
|
|
962
|
+
var SHAPE_GROUP = "roundedWithTitle";
|
|
963
|
+
var SHAPE_NOTE = "note";
|
|
964
|
+
var SHAPE_NOTEGROUP = "noteGroup";
|
|
965
|
+
var CSS_DIAGRAM = "statediagram";
|
|
966
|
+
var CSS_STATE = "state";
|
|
967
|
+
var CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;
|
|
968
|
+
var CSS_EDGE = "transition";
|
|
969
|
+
var CSS_NOTE = "note";
|
|
970
|
+
var CSS_NOTE_EDGE = "note-edge";
|
|
971
|
+
var CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;
|
|
972
|
+
var CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;
|
|
973
|
+
var CSS_CLUSTER = "cluster";
|
|
974
|
+
var CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;
|
|
975
|
+
var CSS_CLUSTER_ALT = "cluster-alt";
|
|
976
|
+
var CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;
|
|
977
|
+
var PARENT = "parent";
|
|
978
|
+
var NOTE = "note";
|
|
979
|
+
var DOMID_STATE = "state";
|
|
980
|
+
var DOMID_TYPE_SPACER = "----";
|
|
981
|
+
var NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;
|
|
982
|
+
var PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;
|
|
983
|
+
|
|
984
|
+
// src/diagrams/state/stateRenderer-v3-unified.ts
|
|
985
|
+
var getDir = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
|
|
986
|
+
if (!parsedItem.doc) {
|
|
987
|
+
return defaultDir;
|
|
988
|
+
}
|
|
989
|
+
let dir = defaultDir;
|
|
990
|
+
for (const parsedItemDoc of parsedItem.doc) {
|
|
991
|
+
if (parsedItemDoc.stmt === "dir") {
|
|
992
|
+
dir = parsedItemDoc.value;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
return dir;
|
|
996
|
+
}, "getDir");
|
|
997
|
+
var getClasses = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(text, diagramObj) {
|
|
998
|
+
diagramObj.db.extract(diagramObj.db.getRootDocV2());
|
|
999
|
+
return diagramObj.db.getClasses();
|
|
1000
|
+
}, "getClasses");
|
|
1001
|
+
var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(async function(text, id, _version, diag) {
|
|
1002
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("REF0:");
|
|
1003
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Drawing state diagram (v2)", id);
|
|
1004
|
+
const { securityLevel, state: conf, layout } = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
|
|
1005
|
+
diag.db.extract(diag.db.getRootDocV2());
|
|
1006
|
+
const data4Layout = diag.db.getData();
|
|
1007
|
+
const svg = (0,_chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getDiagramElement */ .A)(id, securityLevel);
|
|
1008
|
+
data4Layout.type = diag.type;
|
|
1009
|
+
data4Layout.layoutAlgorithm = layout;
|
|
1010
|
+
data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
|
|
1011
|
+
data4Layout.rankSpacing = conf?.rankSpacing || 50;
|
|
1012
|
+
data4Layout.markers = ["barb"];
|
|
1013
|
+
data4Layout.diagramId = id;
|
|
1014
|
+
await (0,_chunk_U2OMI7UW_mjs__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(data4Layout, svg);
|
|
1015
|
+
const padding = 8;
|
|
1016
|
+
_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_2__/* .utils_default */ ._K.insertTitle(
|
|
1017
|
+
svg,
|
|
1018
|
+
"statediagramTitleText",
|
|
1019
|
+
conf?.titleTopMargin ?? 25,
|
|
1020
|
+
diag.db.getDiagramTitle()
|
|
1021
|
+
);
|
|
1022
|
+
(0,_chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .setupViewPortForSVG */ .P)(svg, padding, CSS_DIAGRAM, conf?.useMaxWidth ?? true);
|
|
1023
|
+
}, "draw");
|
|
1024
|
+
var stateRenderer_v3_unified_default = {
|
|
1025
|
+
getClasses,
|
|
1026
|
+
draw,
|
|
1027
|
+
getDir
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
// src/diagrams/state/dataFetcher.js
|
|
1031
|
+
var nodeDb = /* @__PURE__ */ new Map();
|
|
1032
|
+
var graphItemCount = 0;
|
|
1033
|
+
function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) {
|
|
1034
|
+
const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : "";
|
|
1035
|
+
return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;
|
|
1036
|
+
}
|
|
1037
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(stateDomId, "stateDomId");
|
|
1038
|
+
var setupDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parentParsedItem, doc, diagramStates, nodes2, edges2, altFlag, look, classes2) => {
|
|
1039
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("items", doc);
|
|
1040
|
+
doc.forEach((item) => {
|
|
1041
|
+
switch (item.stmt) {
|
|
1042
|
+
case STMT_STATE:
|
|
1043
|
+
dataFetcher(parentParsedItem, item, diagramStates, nodes2, edges2, altFlag, look, classes2);
|
|
1044
|
+
break;
|
|
1045
|
+
case DEFAULT_STATE_TYPE:
|
|
1046
|
+
dataFetcher(parentParsedItem, item, diagramStates, nodes2, edges2, altFlag, look, classes2);
|
|
1047
|
+
break;
|
|
1048
|
+
case STMT_RELATION:
|
|
1049
|
+
{
|
|
1050
|
+
dataFetcher(
|
|
1051
|
+
parentParsedItem,
|
|
1052
|
+
item.state1,
|
|
1053
|
+
diagramStates,
|
|
1054
|
+
nodes2,
|
|
1055
|
+
edges2,
|
|
1056
|
+
altFlag,
|
|
1057
|
+
look,
|
|
1058
|
+
classes2
|
|
1059
|
+
);
|
|
1060
|
+
dataFetcher(
|
|
1061
|
+
parentParsedItem,
|
|
1062
|
+
item.state2,
|
|
1063
|
+
diagramStates,
|
|
1064
|
+
nodes2,
|
|
1065
|
+
edges2,
|
|
1066
|
+
altFlag,
|
|
1067
|
+
look,
|
|
1068
|
+
classes2
|
|
1069
|
+
);
|
|
1070
|
+
const edgeData = {
|
|
1071
|
+
id: "edge" + graphItemCount,
|
|
1072
|
+
start: item.state1.id,
|
|
1073
|
+
end: item.state2.id,
|
|
1074
|
+
arrowhead: "normal",
|
|
1075
|
+
arrowTypeEnd: "arrow_barb",
|
|
1076
|
+
style: G_EDGE_STYLE,
|
|
1077
|
+
labelStyle: "",
|
|
1078
|
+
label: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(item.description, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)()),
|
|
1079
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
|
1080
|
+
labelpos: G_EDGE_LABELPOS,
|
|
1081
|
+
labelType: G_EDGE_LABELTYPE,
|
|
1082
|
+
thickness: G_EDGE_THICKNESS,
|
|
1083
|
+
classes: CSS_EDGE,
|
|
1084
|
+
look
|
|
1085
|
+
};
|
|
1086
|
+
edges2.push(edgeData);
|
|
1087
|
+
graphItemCount++;
|
|
1088
|
+
}
|
|
1089
|
+
break;
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}, "setupDoc");
|
|
1093
|
+
var getDir2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
|
|
1094
|
+
let dir = defaultDir;
|
|
1095
|
+
if (parsedItem.doc) {
|
|
1096
|
+
for (const parsedItemDoc of parsedItem.doc) {
|
|
1097
|
+
if (parsedItemDoc.stmt === "dir") {
|
|
1098
|
+
dir = parsedItemDoc.value;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
return dir;
|
|
1103
|
+
}, "getDir");
|
|
1104
|
+
function insertOrUpdateNode(nodes2, nodeData, classes2) {
|
|
1105
|
+
if (!nodeData.id || nodeData.id === "</join></fork>" || nodeData.id === "</choice>") {
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
if (nodeData.cssClasses) {
|
|
1109
|
+
if (!Array.isArray(nodeData.cssCompiledStyles)) {
|
|
1110
|
+
nodeData.cssCompiledStyles = [];
|
|
1111
|
+
}
|
|
1112
|
+
nodeData.cssClasses.split(" ").forEach((cssClass) => {
|
|
1113
|
+
if (classes2.get(cssClass)) {
|
|
1114
|
+
const classDef = classes2.get(cssClass);
|
|
1115
|
+
nodeData.cssCompiledStyles = [...nodeData.cssCompiledStyles, ...classDef.styles];
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
const existingNodeData = nodes2.find((node) => node.id === nodeData.id);
|
|
1120
|
+
if (existingNodeData) {
|
|
1121
|
+
Object.assign(existingNodeData, nodeData);
|
|
1122
|
+
} else {
|
|
1123
|
+
nodes2.push(nodeData);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(insertOrUpdateNode, "insertOrUpdateNode");
|
|
1127
|
+
function getClassesFromDbInfo(dbInfoItem) {
|
|
1128
|
+
return dbInfoItem?.classes?.join(" ") ?? "";
|
|
1129
|
+
}
|
|
1130
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getClassesFromDbInfo, "getClassesFromDbInfo");
|
|
1131
|
+
function getStylesFromDbInfo(dbInfoItem) {
|
|
1132
|
+
return dbInfoItem?.styles ?? [];
|
|
1133
|
+
}
|
|
1134
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getStylesFromDbInfo, "getStylesFromDbInfo");
|
|
1135
|
+
var dataFetcher = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parent, parsedItem, diagramStates, nodes2, edges2, altFlag, look, classes2) => {
|
|
1136
|
+
const itemId = parsedItem.id;
|
|
1137
|
+
const dbState = diagramStates.get(itemId);
|
|
1138
|
+
const classStr = getClassesFromDbInfo(dbState);
|
|
1139
|
+
const style = getStylesFromDbInfo(dbState);
|
|
1140
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("dataFetcher parsedItem", parsedItem, dbState, style);
|
|
1141
|
+
if (itemId !== "root") {
|
|
1142
|
+
let shape = SHAPE_STATE;
|
|
1143
|
+
if (parsedItem.start === true) {
|
|
1144
|
+
shape = SHAPE_START;
|
|
1145
|
+
} else if (parsedItem.start === false) {
|
|
1146
|
+
shape = SHAPE_END;
|
|
1147
|
+
}
|
|
1148
|
+
if (parsedItem.type !== DEFAULT_STATE_TYPE) {
|
|
1149
|
+
shape = parsedItem.type;
|
|
1150
|
+
}
|
|
1151
|
+
if (!nodeDb.get(itemId)) {
|
|
1152
|
+
nodeDb.set(itemId, {
|
|
1153
|
+
id: itemId,
|
|
1154
|
+
shape,
|
|
1155
|
+
description: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(itemId, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)()),
|
|
1156
|
+
cssClasses: `${classStr} ${CSS_DIAGRAM_STATE}`,
|
|
1157
|
+
cssStyles: style
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
const newNode = nodeDb.get(itemId);
|
|
1161
|
+
if (parsedItem.description) {
|
|
1162
|
+
if (Array.isArray(newNode.description)) {
|
|
1163
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
|
1164
|
+
newNode.description.push(parsedItem.description);
|
|
1165
|
+
} else {
|
|
1166
|
+
if (newNode.description?.length > 0) {
|
|
1167
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
|
1168
|
+
if (newNode.description === itemId) {
|
|
1169
|
+
newNode.description = [parsedItem.description];
|
|
1170
|
+
} else {
|
|
1171
|
+
newNode.description = [newNode.description, parsedItem.description];
|
|
1172
|
+
}
|
|
1173
|
+
} else {
|
|
1174
|
+
newNode.shape = SHAPE_STATE;
|
|
1175
|
+
newNode.description = parsedItem.description;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
newNode.description = _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeTextOrArray(newNode.description, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)());
|
|
1179
|
+
}
|
|
1180
|
+
if (newNode.description?.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {
|
|
1181
|
+
if (newNode.type === "group") {
|
|
1182
|
+
newNode.shape = SHAPE_GROUP;
|
|
1183
|
+
} else {
|
|
1184
|
+
newNode.shape = SHAPE_STATE;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
if (!newNode.type && parsedItem.doc) {
|
|
1188
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting cluster for XCX", itemId, getDir2(parsedItem));
|
|
1189
|
+
newNode.type = "group";
|
|
1190
|
+
newNode.isGroup = true;
|
|
1191
|
+
newNode.dir = getDir2(parsedItem);
|
|
1192
|
+
newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;
|
|
1193
|
+
newNode.cssClasses = `${newNode.cssClasses} ${CSS_DIAGRAM_CLUSTER} ${altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""}`;
|
|
1194
|
+
}
|
|
1195
|
+
const nodeData = {
|
|
1196
|
+
labelStyle: "",
|
|
1197
|
+
shape: newNode.shape,
|
|
1198
|
+
label: newNode.description,
|
|
1199
|
+
cssClasses: newNode.cssClasses,
|
|
1200
|
+
cssCompiledStyles: [],
|
|
1201
|
+
cssStyles: newNode.cssStyles,
|
|
1202
|
+
id: itemId,
|
|
1203
|
+
dir: newNode.dir,
|
|
1204
|
+
domId: stateDomId(itemId, graphItemCount),
|
|
1205
|
+
type: newNode.type,
|
|
1206
|
+
isGroup: newNode.type === "group",
|
|
1207
|
+
padding: 8,
|
|
1208
|
+
rx: 10,
|
|
1209
|
+
ry: 10,
|
|
1210
|
+
look
|
|
1211
|
+
};
|
|
1212
|
+
if (nodeData.shape === SHAPE_DIVIDER) {
|
|
1213
|
+
nodeData.label = "";
|
|
1214
|
+
}
|
|
1215
|
+
if (parent && parent.id !== "root") {
|
|
1216
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("Setting node ", itemId, " to be child of its parent ", parent.id);
|
|
1217
|
+
nodeData.parentId = parent.id;
|
|
1218
|
+
}
|
|
1219
|
+
nodeData.centerLabel = true;
|
|
1220
|
+
if (parsedItem.note) {
|
|
1221
|
+
const noteData = {
|
|
1222
|
+
labelStyle: "",
|
|
1223
|
+
shape: SHAPE_NOTE,
|
|
1224
|
+
label: parsedItem.note.text,
|
|
1225
|
+
cssClasses: CSS_DIAGRAM_NOTE,
|
|
1226
|
+
// useHtmlLabels: false,
|
|
1227
|
+
cssStyles: [],
|
|
1228
|
+
cssCompilesStyles: [],
|
|
1229
|
+
id: itemId + NOTE_ID + "-" + graphItemCount,
|
|
1230
|
+
domId: stateDomId(itemId, graphItemCount, NOTE),
|
|
1231
|
+
type: newNode.type,
|
|
1232
|
+
isGroup: newNode.type === "group",
|
|
1233
|
+
padding: (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)().flowchart.padding,
|
|
1234
|
+
look,
|
|
1235
|
+
position: parsedItem.note.position
|
|
1236
|
+
};
|
|
1237
|
+
const parentNodeId = itemId + PARENT_ID;
|
|
1238
|
+
const groupData = {
|
|
1239
|
+
labelStyle: "",
|
|
1240
|
+
shape: SHAPE_NOTEGROUP,
|
|
1241
|
+
label: parsedItem.note.text,
|
|
1242
|
+
cssClasses: newNode.cssClasses,
|
|
1243
|
+
cssStyles: [],
|
|
1244
|
+
id: itemId + PARENT_ID,
|
|
1245
|
+
domId: stateDomId(itemId, graphItemCount, PARENT),
|
|
1246
|
+
type: "group",
|
|
1247
|
+
isGroup: true,
|
|
1248
|
+
padding: 16,
|
|
1249
|
+
//getConfig().flowchart.padding
|
|
1250
|
+
look,
|
|
1251
|
+
position: parsedItem.note.position
|
|
1252
|
+
};
|
|
1253
|
+
graphItemCount++;
|
|
1254
|
+
groupData.id = parentNodeId;
|
|
1255
|
+
noteData.parentId = parentNodeId;
|
|
1256
|
+
insertOrUpdateNode(nodes2, groupData, classes2);
|
|
1257
|
+
insertOrUpdateNode(nodes2, noteData, classes2);
|
|
1258
|
+
insertOrUpdateNode(nodes2, nodeData, classes2);
|
|
1259
|
+
let from = itemId;
|
|
1260
|
+
let to = noteData.id;
|
|
1261
|
+
if (parsedItem.note.position === "left of") {
|
|
1262
|
+
from = noteData.id;
|
|
1263
|
+
to = itemId;
|
|
1264
|
+
}
|
|
1265
|
+
edges2.push({
|
|
1266
|
+
id: from + "-" + to,
|
|
1267
|
+
start: from,
|
|
1268
|
+
end: to,
|
|
1269
|
+
arrowhead: "none",
|
|
1270
|
+
arrowTypeEnd: "",
|
|
1271
|
+
style: G_EDGE_STYLE,
|
|
1272
|
+
labelStyle: "",
|
|
1273
|
+
classes: CSS_EDGE_NOTE_EDGE,
|
|
1274
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
|
1275
|
+
labelpos: G_EDGE_LABELPOS,
|
|
1276
|
+
labelType: G_EDGE_LABELTYPE,
|
|
1277
|
+
thickness: G_EDGE_THICKNESS,
|
|
1278
|
+
look
|
|
1279
|
+
});
|
|
1280
|
+
} else {
|
|
1281
|
+
insertOrUpdateNode(nodes2, nodeData, classes2);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
if (parsedItem.doc) {
|
|
1285
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("Adding nodes children ");
|
|
1286
|
+
setupDoc(parsedItem, parsedItem.doc, diagramStates, nodes2, edges2, !altFlag, look, classes2);
|
|
1287
|
+
}
|
|
1288
|
+
}, "dataFetcher");
|
|
1289
|
+
var reset = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
1290
|
+
nodeDb.clear();
|
|
1291
|
+
graphItemCount = 0;
|
|
1292
|
+
}, "reset");
|
|
1293
|
+
|
|
1294
|
+
// src/diagrams/state/stateDb.js
|
|
1295
|
+
var START_NODE = "[*]";
|
|
1296
|
+
var START_TYPE = "start";
|
|
1297
|
+
var END_NODE = START_NODE;
|
|
1298
|
+
var END_TYPE = "end";
|
|
1299
|
+
var COLOR_KEYWORD = "color";
|
|
1300
|
+
var FILL_KEYWORD = "fill";
|
|
1301
|
+
var BG_FILL = "bgFill";
|
|
1302
|
+
var STYLECLASS_SEP = ",";
|
|
1303
|
+
function newClassesList() {
|
|
1304
|
+
return /* @__PURE__ */ new Map();
|
|
1305
|
+
}
|
|
1306
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(newClassesList, "newClassesList");
|
|
1307
|
+
var nodes = [];
|
|
1308
|
+
var edges = [];
|
|
1309
|
+
var direction = DEFAULT_DIAGRAM_DIRECTION;
|
|
1310
|
+
var rootDoc = [];
|
|
1311
|
+
var classes = newClassesList();
|
|
1312
|
+
var newDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
1313
|
+
return {
|
|
1314
|
+
/** @type {{ id1: string, id2: string, relationTitle: string }[]} */
|
|
1315
|
+
relations: [],
|
|
1316
|
+
states: /* @__PURE__ */ new Map(),
|
|
1317
|
+
documents: {}
|
|
1318
|
+
};
|
|
1319
|
+
}, "newDoc");
|
|
1320
|
+
var documents = {
|
|
1321
|
+
root: newDoc()
|
|
1322
|
+
};
|
|
1323
|
+
var currentDocument = documents.root;
|
|
1324
|
+
var startEndCount = 0;
|
|
1325
|
+
var dividerCnt = 0;
|
|
1326
|
+
var lineType = {
|
|
1327
|
+
LINE: 0,
|
|
1328
|
+
DOTTED_LINE: 1
|
|
1329
|
+
};
|
|
1330
|
+
var relationType = {
|
|
1331
|
+
AGGREGATION: 0,
|
|
1332
|
+
EXTENSION: 1,
|
|
1333
|
+
COMPOSITION: 2,
|
|
1334
|
+
DEPENDENCY: 3
|
|
1335
|
+
};
|
|
1336
|
+
var clone = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((o) => JSON.parse(JSON.stringify(o)), "clone");
|
|
1337
|
+
var setRootDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((o) => {
|
|
1338
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting root doc", o);
|
|
1339
|
+
rootDoc = o;
|
|
1340
|
+
}, "setRootDoc");
|
|
1341
|
+
var getRootDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => rootDoc, "getRootDoc");
|
|
1342
|
+
var docTranslator = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parent, node, first) => {
|
|
1343
|
+
if (node.stmt === STMT_RELATION) {
|
|
1344
|
+
docTranslator(parent, node.state1, true);
|
|
1345
|
+
docTranslator(parent, node.state2, false);
|
|
1346
|
+
} else {
|
|
1347
|
+
if (node.stmt === STMT_STATE) {
|
|
1348
|
+
if (node.id === "[*]") {
|
|
1349
|
+
node.id = first ? parent.id + "_start" : parent.id + "_end";
|
|
1350
|
+
node.start = first;
|
|
1351
|
+
} else {
|
|
1352
|
+
node.id = node.id.trim();
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
if (node.doc) {
|
|
1356
|
+
const doc = [];
|
|
1357
|
+
let currentDoc = [];
|
|
1358
|
+
let i;
|
|
1359
|
+
for (i = 0; i < node.doc.length; i++) {
|
|
1360
|
+
if (node.doc[i].type === DIVIDER_TYPE) {
|
|
1361
|
+
const newNode = clone(node.doc[i]);
|
|
1362
|
+
newNode.doc = clone(currentDoc);
|
|
1363
|
+
doc.push(newNode);
|
|
1364
|
+
currentDoc = [];
|
|
1365
|
+
} else {
|
|
1366
|
+
currentDoc.push(node.doc[i]);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
if (doc.length > 0 && currentDoc.length > 0) {
|
|
1370
|
+
const newNode = {
|
|
1371
|
+
stmt: STMT_STATE,
|
|
1372
|
+
id: (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_2__/* .generateId */ .$C)(),
|
|
1373
|
+
type: "divider",
|
|
1374
|
+
doc: clone(currentDoc)
|
|
1375
|
+
};
|
|
1376
|
+
doc.push(clone(newNode));
|
|
1377
|
+
node.doc = doc;
|
|
1378
|
+
}
|
|
1379
|
+
node.doc.forEach((docNode) => docTranslator(node, docNode, true));
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}, "docTranslator");
|
|
1383
|
+
var getRootDocV2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
1384
|
+
docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true);
|
|
1385
|
+
return { id: "root", doc: rootDoc };
|
|
1386
|
+
}, "getRootDocV2");
|
|
1387
|
+
var extract = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((_doc) => {
|
|
1388
|
+
let doc;
|
|
1389
|
+
if (_doc.doc) {
|
|
1390
|
+
doc = _doc.doc;
|
|
1391
|
+
} else {
|
|
1392
|
+
doc = _doc;
|
|
1393
|
+
}
|
|
1394
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info(doc);
|
|
1395
|
+
clear2(true);
|
|
1396
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Extract initial document:", doc);
|
|
1397
|
+
doc.forEach((item) => {
|
|
1398
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.warn("Statement", item.stmt);
|
|
1399
|
+
switch (item.stmt) {
|
|
1400
|
+
case STMT_STATE:
|
|
1401
|
+
addState(
|
|
1402
|
+
item.id.trim(),
|
|
1403
|
+
item.type,
|
|
1404
|
+
item.doc,
|
|
1405
|
+
item.description,
|
|
1406
|
+
item.note,
|
|
1407
|
+
item.classes,
|
|
1408
|
+
item.styles,
|
|
1409
|
+
item.textStyles
|
|
1410
|
+
);
|
|
1411
|
+
break;
|
|
1412
|
+
case STMT_RELATION:
|
|
1413
|
+
addRelation(item.state1, item.state2, item.description);
|
|
1414
|
+
break;
|
|
1415
|
+
case STMT_CLASSDEF:
|
|
1416
|
+
addStyleClass(item.id.trim(), item.classes);
|
|
1417
|
+
break;
|
|
1418
|
+
case STMT_STYLEDEF:
|
|
1419
|
+
{
|
|
1420
|
+
const ids = item.id.trim().split(",");
|
|
1421
|
+
const styles = item.styleClass.split(",");
|
|
1422
|
+
ids.forEach((id) => {
|
|
1423
|
+
let foundState = getState(id);
|
|
1424
|
+
if (foundState === void 0) {
|
|
1425
|
+
const trimmedId = id.trim();
|
|
1426
|
+
addState(trimmedId);
|
|
1427
|
+
foundState = getState(trimmedId);
|
|
1428
|
+
}
|
|
1429
|
+
foundState.styles = styles.map((s) => s.replace(/;/g, "")?.trim());
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
break;
|
|
1433
|
+
case STMT_APPLYCLASS:
|
|
1434
|
+
setCssClass(item.id.trim(), item.styleClass);
|
|
1435
|
+
break;
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
const diagramStates = getStates();
|
|
1439
|
+
const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
|
|
1440
|
+
const look = config.look;
|
|
1441
|
+
reset();
|
|
1442
|
+
dataFetcher(void 0, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);
|
|
1443
|
+
nodes.forEach((node) => {
|
|
1444
|
+
if (Array.isArray(node.label)) {
|
|
1445
|
+
node.description = node.label.slice(1);
|
|
1446
|
+
if (node.isGroup && node.description.length > 0) {
|
|
1447
|
+
throw new Error(
|
|
1448
|
+
"Group nodes can only have label. Remove the additional description for node [" + node.id + "]"
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
node.label = node.label[0];
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
}, "extract");
|
|
1455
|
+
var addState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles = null, textStyles = null) {
|
|
1456
|
+
const trimmedId = id?.trim();
|
|
1457
|
+
if (!currentDocument.states.has(trimmedId)) {
|
|
1458
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Adding state ", trimmedId, descr);
|
|
1459
|
+
currentDocument.states.set(trimmedId, {
|
|
1460
|
+
id: trimmedId,
|
|
1461
|
+
descriptions: [],
|
|
1462
|
+
type,
|
|
1463
|
+
doc,
|
|
1464
|
+
note,
|
|
1465
|
+
classes: [],
|
|
1466
|
+
styles: [],
|
|
1467
|
+
textStyles: []
|
|
1468
|
+
});
|
|
1469
|
+
} else {
|
|
1470
|
+
if (!currentDocument.states.get(trimmedId).doc) {
|
|
1471
|
+
currentDocument.states.get(trimmedId).doc = doc;
|
|
1472
|
+
}
|
|
1473
|
+
if (!currentDocument.states.get(trimmedId).type) {
|
|
1474
|
+
currentDocument.states.get(trimmedId).type = type;
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
if (descr) {
|
|
1478
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state description", trimmedId, descr);
|
|
1479
|
+
if (typeof descr === "string") {
|
|
1480
|
+
addDescription(trimmedId, descr.trim());
|
|
1481
|
+
}
|
|
1482
|
+
if (typeof descr === "object") {
|
|
1483
|
+
descr.forEach((des) => addDescription(trimmedId, des.trim()));
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
if (note) {
|
|
1487
|
+
const doc2 = currentDocument.states.get(trimmedId);
|
|
1488
|
+
doc2.note = note;
|
|
1489
|
+
doc2.note.text = _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(doc2.note.text, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)());
|
|
1490
|
+
}
|
|
1491
|
+
if (classes2) {
|
|
1492
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state classes", trimmedId, classes2);
|
|
1493
|
+
const classesList = typeof classes2 === "string" ? [classes2] : classes2;
|
|
1494
|
+
classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim()));
|
|
1495
|
+
}
|
|
1496
|
+
if (styles) {
|
|
1497
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state styles", trimmedId, styles);
|
|
1498
|
+
const stylesList = typeof styles === "string" ? [styles] : styles;
|
|
1499
|
+
stylesList.forEach((style) => setStyle(trimmedId, style.trim()));
|
|
1500
|
+
}
|
|
1501
|
+
if (textStyles) {
|
|
1502
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state styles", trimmedId, styles);
|
|
1503
|
+
const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles;
|
|
1504
|
+
textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim()));
|
|
1505
|
+
}
|
|
1506
|
+
}, "addState");
|
|
1507
|
+
var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(saveCommon) {
|
|
1508
|
+
nodes = [];
|
|
1509
|
+
edges = [];
|
|
1510
|
+
documents = {
|
|
1511
|
+
root: newDoc()
|
|
1512
|
+
};
|
|
1513
|
+
currentDocument = documents.root;
|
|
1514
|
+
startEndCount = 0;
|
|
1515
|
+
classes = newClassesList();
|
|
1516
|
+
if (!saveCommon) {
|
|
1517
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .clear */ .IU)();
|
|
1518
|
+
}
|
|
1519
|
+
}, "clear");
|
|
1520
|
+
var getState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id) {
|
|
1521
|
+
return currentDocument.states.get(id);
|
|
1522
|
+
}, "getState");
|
|
1523
|
+
var getStates = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
1524
|
+
return currentDocument.states;
|
|
1525
|
+
}, "getStates");
|
|
1526
|
+
var logDocuments = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
1527
|
+
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Documents = ", documents);
|
|
1528
|
+
}, "logDocuments");
|
|
1529
|
+
var getRelations = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
1530
|
+
return currentDocument.relations;
|
|
1531
|
+
}, "getRelations");
|
|
1532
|
+
function startIdIfNeeded(id = "") {
|
|
1533
|
+
let fixedId = id;
|
|
1534
|
+
if (id === START_NODE) {
|
|
1535
|
+
startEndCount++;
|
|
1536
|
+
fixedId = `${START_TYPE}${startEndCount}`;
|
|
1537
|
+
}
|
|
1538
|
+
return fixedId;
|
|
1539
|
+
}
|
|
1540
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(startIdIfNeeded, "startIdIfNeeded");
|
|
1541
|
+
function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
|
|
1542
|
+
return id === START_NODE ? START_TYPE : type;
|
|
1543
|
+
}
|
|
1544
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(startTypeIfNeeded, "startTypeIfNeeded");
|
|
1545
|
+
function endIdIfNeeded(id = "") {
|
|
1546
|
+
let fixedId = id;
|
|
1547
|
+
if (id === END_NODE) {
|
|
1548
|
+
startEndCount++;
|
|
1549
|
+
fixedId = `${END_TYPE}${startEndCount}`;
|
|
1550
|
+
}
|
|
1551
|
+
return fixedId;
|
|
1552
|
+
}
|
|
1553
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(endIdIfNeeded, "endIdIfNeeded");
|
|
1554
|
+
function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
|
|
1555
|
+
return id === END_NODE ? END_TYPE : type;
|
|
1556
|
+
}
|
|
1557
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(endTypeIfNeeded, "endTypeIfNeeded");
|
|
1558
|
+
function addRelationObjs(item1, item2, relationTitle) {
|
|
1559
|
+
let id1 = startIdIfNeeded(item1.id.trim());
|
|
1560
|
+
let type1 = startTypeIfNeeded(item1.id.trim(), item1.type);
|
|
1561
|
+
let id2 = startIdIfNeeded(item2.id.trim());
|
|
1562
|
+
let type2 = startTypeIfNeeded(item2.id.trim(), item2.type);
|
|
1563
|
+
addState(
|
|
1564
|
+
id1,
|
|
1565
|
+
type1,
|
|
1566
|
+
item1.doc,
|
|
1567
|
+
item1.description,
|
|
1568
|
+
item1.note,
|
|
1569
|
+
item1.classes,
|
|
1570
|
+
item1.styles,
|
|
1571
|
+
item1.textStyles
|
|
1572
|
+
);
|
|
1573
|
+
addState(
|
|
1574
|
+
id2,
|
|
1575
|
+
type2,
|
|
1576
|
+
item2.doc,
|
|
1577
|
+
item2.description,
|
|
1578
|
+
item2.note,
|
|
1579
|
+
item2.classes,
|
|
1580
|
+
item2.styles,
|
|
1581
|
+
item2.textStyles
|
|
1582
|
+
);
|
|
1583
|
+
currentDocument.relations.push({
|
|
1584
|
+
id1,
|
|
1585
|
+
id2,
|
|
1586
|
+
relationTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(relationTitle, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)())
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(addRelationObjs, "addRelationObjs");
|
|
1590
|
+
var addRelation = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(item1, item2, title) {
|
|
1591
|
+
if (typeof item1 === "object") {
|
|
1592
|
+
addRelationObjs(item1, item2, title);
|
|
1593
|
+
} else {
|
|
1594
|
+
const id1 = startIdIfNeeded(item1.trim());
|
|
1595
|
+
const type1 = startTypeIfNeeded(item1);
|
|
1596
|
+
const id2 = endIdIfNeeded(item2.trim());
|
|
1597
|
+
const type2 = endTypeIfNeeded(item2);
|
|
1598
|
+
addState(id1, type1);
|
|
1599
|
+
addState(id2, type2);
|
|
1600
|
+
currentDocument.relations.push({
|
|
1601
|
+
id1,
|
|
1602
|
+
id2,
|
|
1603
|
+
title: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(title, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)())
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
}, "addRelation");
|
|
1607
|
+
var addDescription = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id, descr) {
|
|
1608
|
+
const theState = currentDocument.states.get(id);
|
|
1609
|
+
const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr;
|
|
1610
|
+
theState.descriptions.push(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(_descr, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)()));
|
|
1611
|
+
}, "addDescription");
|
|
1612
|
+
var cleanupLabel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(label) {
|
|
1613
|
+
if (label.substring(0, 1) === ":") {
|
|
1614
|
+
return label.substr(2).trim();
|
|
1615
|
+
} else {
|
|
1616
|
+
return label.trim();
|
|
1617
|
+
}
|
|
1618
|
+
}, "cleanupLabel");
|
|
1619
|
+
var getDividerId = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
1620
|
+
dividerCnt++;
|
|
1621
|
+
return "divider-id-" + dividerCnt;
|
|
1622
|
+
}, "getDividerId");
|
|
1623
|
+
var addStyleClass = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id, styleAttributes = "") {
|
|
1624
|
+
if (!classes.has(id)) {
|
|
1625
|
+
classes.set(id, { id, styles: [], textStyles: [] });
|
|
1626
|
+
}
|
|
1627
|
+
const foundClass = classes.get(id);
|
|
1628
|
+
if (styleAttributes !== void 0 && styleAttributes !== null) {
|
|
1629
|
+
styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {
|
|
1630
|
+
const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim();
|
|
1631
|
+
if (RegExp(COLOR_KEYWORD).exec(attrib)) {
|
|
1632
|
+
const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);
|
|
1633
|
+
const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);
|
|
1634
|
+
foundClass.textStyles.push(newStyle2);
|
|
1635
|
+
}
|
|
1636
|
+
foundClass.styles.push(fixedAttrib);
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
}, "addStyleClass");
|
|
1640
|
+
var getClasses2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
1641
|
+
return classes;
|
|
1642
|
+
}, "getClasses");
|
|
1643
|
+
var setCssClass = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(itemIds, cssClassName) {
|
|
1644
|
+
itemIds.split(",").forEach(function(id) {
|
|
1645
|
+
let foundState = getState(id);
|
|
1646
|
+
if (foundState === void 0) {
|
|
1647
|
+
const trimmedId = id.trim();
|
|
1648
|
+
addState(trimmedId);
|
|
1649
|
+
foundState = getState(trimmedId);
|
|
1650
|
+
}
|
|
1651
|
+
foundState.classes.push(cssClassName);
|
|
1652
|
+
});
|
|
1653
|
+
}, "setCssClass");
|
|
1654
|
+
var setStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(itemId, styleText) {
|
|
1655
|
+
const item = getState(itemId);
|
|
1656
|
+
if (item !== void 0) {
|
|
1657
|
+
item.styles.push(styleText);
|
|
1658
|
+
}
|
|
1659
|
+
}, "setStyle");
|
|
1660
|
+
var setTextStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(itemId, cssClassName) {
|
|
1661
|
+
const item = getState(itemId);
|
|
1662
|
+
if (item !== void 0) {
|
|
1663
|
+
item.textStyles.push(cssClassName);
|
|
1664
|
+
}
|
|
1665
|
+
}, "setTextStyle");
|
|
1666
|
+
var getDirection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => direction, "getDirection");
|
|
1667
|
+
var setDirection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((dir) => {
|
|
1668
|
+
direction = dir;
|
|
1669
|
+
}, "setDirection");
|
|
1670
|
+
var trimColon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(), "trimColon");
|
|
1671
|
+
var getData = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
1672
|
+
const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
|
|
1673
|
+
return { nodes, edges, other: {}, config, direction: getDir(getRootDocV2()) };
|
|
1674
|
+
}, "getData");
|
|
1675
|
+
var stateDb_default = {
|
|
1676
|
+
getConfig: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)().state, "getConfig"),
|
|
1677
|
+
getData,
|
|
1678
|
+
addState,
|
|
1679
|
+
clear: clear2,
|
|
1680
|
+
getState,
|
|
1681
|
+
getStates,
|
|
1682
|
+
getRelations,
|
|
1683
|
+
getClasses: getClasses2,
|
|
1684
|
+
getDirection,
|
|
1685
|
+
addRelation,
|
|
1686
|
+
getDividerId,
|
|
1687
|
+
setDirection,
|
|
1688
|
+
cleanupLabel,
|
|
1689
|
+
lineType,
|
|
1690
|
+
relationType,
|
|
1691
|
+
logDocuments,
|
|
1692
|
+
getRootDoc,
|
|
1693
|
+
setRootDoc,
|
|
1694
|
+
getRootDocV2,
|
|
1695
|
+
extract,
|
|
1696
|
+
trimColon,
|
|
1697
|
+
getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccTitle */ .iN,
|
|
1698
|
+
setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccTitle */ .SV,
|
|
1699
|
+
getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccDescription */ .m7,
|
|
1700
|
+
setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccDescription */ .EI,
|
|
1701
|
+
addStyleClass,
|
|
1702
|
+
setCssClass,
|
|
1703
|
+
addDescription,
|
|
1704
|
+
setDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setDiagramTitle */ .ke,
|
|
1705
|
+
getDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab
|
|
1706
|
+
};
|
|
1707
|
+
|
|
1708
|
+
// src/diagrams/state/styles.js
|
|
1709
|
+
var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((options) => `
|
|
1710
|
+
defs #statediagram-barbEnd {
|
|
1711
|
+
fill: ${options.transitionColor};
|
|
1712
|
+
stroke: ${options.transitionColor};
|
|
1713
|
+
}
|
|
1714
|
+
g.stateGroup text {
|
|
1715
|
+
fill: ${options.nodeBorder};
|
|
1716
|
+
stroke: none;
|
|
1717
|
+
font-size: 10px;
|
|
1718
|
+
}
|
|
1719
|
+
g.stateGroup text {
|
|
1720
|
+
fill: ${options.textColor};
|
|
1721
|
+
stroke: none;
|
|
1722
|
+
font-size: 10px;
|
|
1723
|
+
|
|
1724
|
+
}
|
|
1725
|
+
g.stateGroup .state-title {
|
|
1726
|
+
font-weight: bolder;
|
|
1727
|
+
fill: ${options.stateLabelColor};
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
g.stateGroup rect {
|
|
1731
|
+
fill: ${options.mainBkg};
|
|
1732
|
+
stroke: ${options.nodeBorder};
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
g.stateGroup line {
|
|
1736
|
+
stroke: ${options.lineColor};
|
|
1737
|
+
stroke-width: 1;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
.transition {
|
|
1741
|
+
stroke: ${options.transitionColor};
|
|
1742
|
+
stroke-width: 1;
|
|
1743
|
+
fill: none;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
.stateGroup .composit {
|
|
1747
|
+
fill: ${options.background};
|
|
1748
|
+
border-bottom: 1px
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
.stateGroup .alt-composit {
|
|
1752
|
+
fill: #e0e0e0;
|
|
1753
|
+
border-bottom: 1px
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.state-note {
|
|
1757
|
+
stroke: ${options.noteBorderColor};
|
|
1758
|
+
fill: ${options.noteBkgColor};
|
|
1759
|
+
|
|
1760
|
+
text {
|
|
1761
|
+
fill: ${options.noteTextColor};
|
|
1762
|
+
stroke: none;
|
|
1763
|
+
font-size: 10px;
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.stateLabel .box {
|
|
1768
|
+
stroke: none;
|
|
1769
|
+
stroke-width: 0;
|
|
1770
|
+
fill: ${options.mainBkg};
|
|
1771
|
+
opacity: 0.5;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
.edgeLabel .label rect {
|
|
1775
|
+
fill: ${options.labelBackgroundColor};
|
|
1776
|
+
opacity: 0.5;
|
|
1777
|
+
}
|
|
1778
|
+
.edgeLabel {
|
|
1779
|
+
background-color: ${options.edgeLabelBackground};
|
|
1780
|
+
p {
|
|
1781
|
+
background-color: ${options.edgeLabelBackground};
|
|
1782
|
+
}
|
|
1783
|
+
rect {
|
|
1784
|
+
opacity: 0.5;
|
|
1785
|
+
background-color: ${options.edgeLabelBackground};
|
|
1786
|
+
fill: ${options.edgeLabelBackground};
|
|
1787
|
+
}
|
|
1788
|
+
text-align: center;
|
|
1789
|
+
}
|
|
1790
|
+
.edgeLabel .label text {
|
|
1791
|
+
fill: ${options.transitionLabelColor || options.tertiaryTextColor};
|
|
1792
|
+
}
|
|
1793
|
+
.label div .edgeLabel {
|
|
1794
|
+
color: ${options.transitionLabelColor || options.tertiaryTextColor};
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.stateLabel text {
|
|
1798
|
+
fill: ${options.stateLabelColor};
|
|
1799
|
+
font-size: 10px;
|
|
1800
|
+
font-weight: bold;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.node circle.state-start {
|
|
1804
|
+
fill: ${options.specialStateColor};
|
|
1805
|
+
stroke: ${options.specialStateColor};
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
.node .fork-join {
|
|
1809
|
+
fill: ${options.specialStateColor};
|
|
1810
|
+
stroke: ${options.specialStateColor};
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.node circle.state-end {
|
|
1814
|
+
fill: ${options.innerEndBackground};
|
|
1815
|
+
stroke: ${options.background};
|
|
1816
|
+
stroke-width: 1.5
|
|
1817
|
+
}
|
|
1818
|
+
.end-state-inner {
|
|
1819
|
+
fill: ${options.compositeBackground || options.background};
|
|
1820
|
+
// stroke: ${options.background};
|
|
1821
|
+
stroke-width: 1.5
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
.node rect {
|
|
1825
|
+
fill: ${options.stateBkg || options.mainBkg};
|
|
1826
|
+
stroke: ${options.stateBorder || options.nodeBorder};
|
|
1827
|
+
stroke-width: 1px;
|
|
1828
|
+
}
|
|
1829
|
+
.node polygon {
|
|
1830
|
+
fill: ${options.mainBkg};
|
|
1831
|
+
stroke: ${options.stateBorder || options.nodeBorder};;
|
|
1832
|
+
stroke-width: 1px;
|
|
1833
|
+
}
|
|
1834
|
+
#statediagram-barbEnd {
|
|
1835
|
+
fill: ${options.lineColor};
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
.statediagram-cluster rect {
|
|
1839
|
+
fill: ${options.compositeTitleBackground};
|
|
1840
|
+
stroke: ${options.stateBorder || options.nodeBorder};
|
|
1841
|
+
stroke-width: 1px;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
.cluster-label, .nodeLabel {
|
|
1845
|
+
color: ${options.stateLabelColor};
|
|
1846
|
+
// line-height: 1;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
.statediagram-cluster rect.outer {
|
|
1850
|
+
rx: 5px;
|
|
1851
|
+
ry: 5px;
|
|
1852
|
+
}
|
|
1853
|
+
.statediagram-state .divider {
|
|
1854
|
+
stroke: ${options.stateBorder || options.nodeBorder};
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
.statediagram-state .title-state {
|
|
1858
|
+
rx: 5px;
|
|
1859
|
+
ry: 5px;
|
|
1860
|
+
}
|
|
1861
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
1862
|
+
fill: ${options.compositeBackground || options.background};
|
|
1863
|
+
}
|
|
1864
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
1865
|
+
fill: ${options.altBackground ? options.altBackground : "#efefef"};
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.statediagram-cluster .inner {
|
|
1869
|
+
rx:0;
|
|
1870
|
+
ry:0;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
.statediagram-state rect.basic {
|
|
1874
|
+
rx: 5px;
|
|
1875
|
+
ry: 5px;
|
|
1876
|
+
}
|
|
1877
|
+
.statediagram-state rect.divider {
|
|
1878
|
+
stroke-dasharray: 10,10;
|
|
1879
|
+
fill: ${options.altBackground ? options.altBackground : "#efefef"};
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
.note-edge {
|
|
1883
|
+
stroke-dasharray: 5;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
.statediagram-note rect {
|
|
1887
|
+
fill: ${options.noteBkgColor};
|
|
1888
|
+
stroke: ${options.noteBorderColor};
|
|
1889
|
+
stroke-width: 1px;
|
|
1890
|
+
rx: 0;
|
|
1891
|
+
ry: 0;
|
|
1892
|
+
}
|
|
1893
|
+
.statediagram-note rect {
|
|
1894
|
+
fill: ${options.noteBkgColor};
|
|
1895
|
+
stroke: ${options.noteBorderColor};
|
|
1896
|
+
stroke-width: 1px;
|
|
1897
|
+
rx: 0;
|
|
1898
|
+
ry: 0;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
.statediagram-note text {
|
|
1902
|
+
fill: ${options.noteTextColor};
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
.statediagram-note .nodeLabel {
|
|
1906
|
+
color: ${options.noteTextColor};
|
|
1907
|
+
}
|
|
1908
|
+
.statediagram .edgeLabel {
|
|
1909
|
+
color: red; // ${options.noteTextColor};
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
#dependencyStart, #dependencyEnd {
|
|
1913
|
+
fill: ${options.lineColor};
|
|
1914
|
+
stroke: ${options.lineColor};
|
|
1915
|
+
stroke-width: 1;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
.statediagramTitleText {
|
|
1919
|
+
text-anchor: middle;
|
|
1920
|
+
font-size: 18px;
|
|
1921
|
+
fill: ${options.textColor};
|
|
1922
|
+
}
|
|
1923
|
+
`, "getStyles");
|
|
1924
|
+
var styles_default = getStyles;
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
|
|
1929
|
+
/***/ })
|
|
1930
|
+
|
|
1931
|
+
};
|
|
1932
|
+
;
|