@omg-dev/app 0.5.0 → 0.6.1
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-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
- package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
- package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { s as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { f as
|
|
5
|
-
var
|
|
6
|
-
var t = /* @__PURE__ */
|
|
7
|
-
for (d = d || {},
|
|
1
|
+
import { g as te } from "./chunk-XXDRQBXY-DRKeYnrF.js";
|
|
2
|
+
import { s as ee } from "./chunk-VR4S4FIN-BDq3jZ0m.js";
|
|
3
|
+
import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, a9 as he, k as j, q as ue, d as bt, a5 as de } from "./index-B0neMIbR.js";
|
|
4
|
+
import { f as fe } from "./chunk-32BRIVSS-DvywQiCk.js";
|
|
5
|
+
var vt = (function() {
|
|
6
|
+
var t = /* @__PURE__ */ f(function(V, a, d, r) {
|
|
7
|
+
for (d = d || {}, r = V.length; r--; d[V[r]] = a) ;
|
|
8
8
|
return d;
|
|
9
|
-
}, "o"), e = [1, 2],
|
|
10
|
-
trace: /* @__PURE__ */
|
|
9
|
+
}, "o"), e = [1, 2], o = [1, 3], s = [1, 4], c = [2, 4], h = [1, 9], p = [1, 11], y = [1, 16], n = [1, 17], T = [1, 18], m = [1, 19], O = [1, 33], x = [1, 20], k = [1, 21], u = [1, 22], L = [1, 23], I = [1, 24], v = [1, 26], F = [1, 27], C = [1, 28], P = [1, 29], w = [1, 30], H = [1, 31], it = [1, 32], rt = [1, 35], at = [1, 36], nt = [1, 37], ot = [1, 38], z = [1, 34], S = [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], lt = [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], yt = {
|
|
10
|
+
trace: /* @__PURE__ */ f(function() {
|
|
11
11
|
}, "trace"),
|
|
12
12
|
yy: {},
|
|
13
13
|
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 },
|
|
14
14
|
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" },
|
|
15
15
|
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]],
|
|
16
|
-
performAction: /* @__PURE__ */
|
|
17
|
-
var
|
|
18
|
-
switch (
|
|
16
|
+
performAction: /* @__PURE__ */ f(function(a, d, r, g, E, i, B) {
|
|
17
|
+
var l = i.length - 1;
|
|
18
|
+
switch (E) {
|
|
19
19
|
case 3:
|
|
20
|
-
return g.setRootDoc(
|
|
20
|
+
return g.setRootDoc(i[l]), i[l];
|
|
21
21
|
case 4:
|
|
22
22
|
this.$ = [];
|
|
23
23
|
break;
|
|
24
24
|
case 5:
|
|
25
|
-
|
|
25
|
+
i[l] != "nl" && (i[l - 1].push(i[l]), this.$ = i[l - 1]);
|
|
26
26
|
break;
|
|
27
27
|
case 6:
|
|
28
28
|
case 7:
|
|
29
|
-
this.$ =
|
|
29
|
+
this.$ = i[l];
|
|
30
30
|
break;
|
|
31
31
|
case 8:
|
|
32
32
|
this.$ = "nl";
|
|
33
33
|
break;
|
|
34
34
|
case 12:
|
|
35
|
-
this.$ =
|
|
35
|
+
this.$ = i[l];
|
|
36
36
|
break;
|
|
37
37
|
case 13:
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const Q = i[l - 1];
|
|
39
|
+
Q.description = g.trimColon(i[l]), this.$ = Q;
|
|
40
40
|
break;
|
|
41
41
|
case 14:
|
|
42
|
-
this.$ = { stmt: "relation", state1:
|
|
42
|
+
this.$ = { stmt: "relation", state1: i[l - 2], state2: i[l] };
|
|
43
43
|
break;
|
|
44
44
|
case 15:
|
|
45
|
-
const
|
|
46
|
-
this.$ = { stmt: "relation", state1:
|
|
45
|
+
const gt = g.trimColon(i[l]);
|
|
46
|
+
this.$ = { stmt: "relation", state1: i[l - 3], state2: i[l - 1], description: gt };
|
|
47
47
|
break;
|
|
48
48
|
case 19:
|
|
49
|
-
this.$ = { stmt: "state", id:
|
|
49
|
+
this.$ = { stmt: "state", id: i[l - 3], type: "default", description: "", doc: i[l - 1] };
|
|
50
50
|
break;
|
|
51
51
|
case 20:
|
|
52
|
-
var
|
|
53
|
-
if (
|
|
54
|
-
var
|
|
55
|
-
|
|
52
|
+
var Y = i[l], K = i[l - 2].trim();
|
|
53
|
+
if (i[l].match(":")) {
|
|
54
|
+
var ht = i[l].split(":");
|
|
55
|
+
Y = ht[0], K = [K, ht[1]];
|
|
56
56
|
}
|
|
57
|
-
this.$ = { stmt: "state", id:
|
|
57
|
+
this.$ = { stmt: "state", id: Y, type: "default", description: K };
|
|
58
58
|
break;
|
|
59
59
|
case 21:
|
|
60
|
-
this.$ = { stmt: "state", id:
|
|
60
|
+
this.$ = { stmt: "state", id: i[l - 3], type: "default", description: i[l - 5], doc: i[l - 1] };
|
|
61
61
|
break;
|
|
62
62
|
case 22:
|
|
63
|
-
this.$ = { stmt: "state", id:
|
|
63
|
+
this.$ = { stmt: "state", id: i[l], type: "fork" };
|
|
64
64
|
break;
|
|
65
65
|
case 23:
|
|
66
|
-
this.$ = { stmt: "state", id:
|
|
66
|
+
this.$ = { stmt: "state", id: i[l], type: "join" };
|
|
67
67
|
break;
|
|
68
68
|
case 24:
|
|
69
|
-
this.$ = { stmt: "state", id:
|
|
69
|
+
this.$ = { stmt: "state", id: i[l], type: "choice" };
|
|
70
70
|
break;
|
|
71
71
|
case 25:
|
|
72
72
|
this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
|
|
73
73
|
break;
|
|
74
74
|
case 26:
|
|
75
|
-
this.$ = { stmt: "state", id:
|
|
75
|
+
this.$ = { stmt: "state", id: i[l - 1].trim(), note: { position: i[l - 2].trim(), text: i[l].trim() } };
|
|
76
76
|
break;
|
|
77
77
|
case 29:
|
|
78
|
-
this.$ =
|
|
78
|
+
this.$ = i[l].trim(), g.setAccTitle(this.$);
|
|
79
79
|
break;
|
|
80
80
|
case 30:
|
|
81
81
|
case 31:
|
|
82
|
-
this.$ =
|
|
82
|
+
this.$ = i[l].trim(), g.setAccDescription(this.$);
|
|
83
83
|
break;
|
|
84
84
|
case 32:
|
|
85
85
|
this.$ = {
|
|
86
86
|
stmt: "click",
|
|
87
|
-
id:
|
|
88
|
-
url:
|
|
89
|
-
tooltip:
|
|
87
|
+
id: i[l - 3],
|
|
88
|
+
url: i[l - 2],
|
|
89
|
+
tooltip: i[l - 1]
|
|
90
90
|
};
|
|
91
91
|
break;
|
|
92
92
|
case 33:
|
|
93
93
|
this.$ = {
|
|
94
94
|
stmt: "click",
|
|
95
|
-
id:
|
|
96
|
-
url:
|
|
95
|
+
id: i[l - 3],
|
|
96
|
+
url: i[l - 1],
|
|
97
97
|
tooltip: ""
|
|
98
98
|
};
|
|
99
99
|
break;
|
|
100
100
|
case 34:
|
|
101
101
|
case 35:
|
|
102
|
-
this.$ = { stmt: "classDef", id:
|
|
102
|
+
this.$ = { stmt: "classDef", id: i[l - 1].trim(), classes: i[l].trim() };
|
|
103
103
|
break;
|
|
104
104
|
case 36:
|
|
105
|
-
this.$ = { stmt: "style", id:
|
|
105
|
+
this.$ = { stmt: "style", id: i[l - 1].trim(), styleClass: i[l].trim() };
|
|
106
106
|
break;
|
|
107
107
|
case 37:
|
|
108
|
-
this.$ = { stmt: "applyClass", id:
|
|
108
|
+
this.$ = { stmt: "applyClass", id: i[l - 1].trim(), styleClass: i[l].trim() };
|
|
109
109
|
break;
|
|
110
110
|
case 38:
|
|
111
111
|
g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
|
|
@@ -121,86 +121,86 @@ var Ct = (function() {
|
|
|
121
121
|
break;
|
|
122
122
|
case 44:
|
|
123
123
|
case 45:
|
|
124
|
-
this.$ = { stmt: "state", id:
|
|
124
|
+
this.$ = { stmt: "state", id: i[l].trim(), type: "default", description: "" };
|
|
125
125
|
break;
|
|
126
126
|
case 46:
|
|
127
|
-
this.$ = { stmt: "state", id:
|
|
127
|
+
this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
|
|
128
128
|
break;
|
|
129
129
|
case 47:
|
|
130
|
-
this.$ = { stmt: "state", id:
|
|
130
|
+
this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
133
|
}, "anonymous"),
|
|
134
|
-
table: [{ 3: 1, 4: e, 5:
|
|
134
|
+
table: [{ 3: 1, 4: e, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: s }, { 3: 6, 4: e, 5: o, 6: s }, 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], c, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 7]), t(S, [2, 8]), t(S, [2, 9]), t(S, [2, 10]), t(S, [2, 11]), t(S, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(S, [2, 16]), { 18: [1, 42] }, t(S, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(S, [2, 22]), t(S, [2, 23]), t(S, [2, 24]), t(S, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(S, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(S, [2, 31]), { 13: 51, 24: O, 57: z }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(lt, [2, 44], { 58: [1, 56] }), t(lt, [2, 45], { 58: [1, 57] }), t(S, [2, 38]), t(S, [2, 39]), t(S, [2, 40]), t(S, [2, 41]), t(S, [2, 6]), t(S, [2, 13]), { 13: 58, 24: O, 57: z }, t(S, [2, 17]), t(xt, c, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(S, [2, 29]), t(S, [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(S, [2, 14], { 14: [1, 71] }), { 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 21: [1, 72], 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(S, [2, 34]), t(S, [2, 35]), t(S, [2, 36]), t(S, [2, 37]), t(lt, [2, 46]), t(lt, [2, 47]), t(S, [2, 15]), t(S, [2, 19]), t(xt, c, { 7: 78 }), t(S, [2, 26]), t(S, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 21: [1, 81], 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 32]), t(S, [2, 33]), t(S, [2, 21])],
|
|
135
135
|
defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
|
|
136
|
-
parseError: /* @__PURE__ */
|
|
136
|
+
parseError: /* @__PURE__ */ f(function(a, d) {
|
|
137
137
|
if (d.recoverable)
|
|
138
|
-
this.trace(
|
|
138
|
+
this.trace(a);
|
|
139
139
|
else {
|
|
140
|
-
var
|
|
141
|
-
throw
|
|
140
|
+
var r = new Error(a);
|
|
141
|
+
throw r.hash = d, r;
|
|
142
142
|
}
|
|
143
143
|
}, "parseError"),
|
|
144
|
-
parse: /* @__PURE__ */
|
|
145
|
-
var d = this,
|
|
146
|
-
for (var
|
|
147
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
148
|
-
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
var
|
|
152
|
-
typeof
|
|
153
|
-
function
|
|
154
|
-
|
|
144
|
+
parse: /* @__PURE__ */ f(function(a) {
|
|
145
|
+
var d = this, r = [0], g = [], E = [null], i = [], B = this.table, l = "", Y = 0, K = 0, ht = 2, Q = 1, gt = i.slice.call(arguments, 1), b = Object.create(this.lexer), U = { yy: {} };
|
|
146
|
+
for (var Tt in this.yy)
|
|
147
|
+
Object.prototype.hasOwnProperty.call(this.yy, Tt) && (U.yy[Tt] = this.yy[Tt]);
|
|
148
|
+
b.setInput(a, U.yy), U.yy.lexer = b, U.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
149
|
+
var Et = b.yylloc;
|
|
150
|
+
i.push(Et);
|
|
151
|
+
var Qt = b.options && b.options.ranges;
|
|
152
|
+
typeof U.yy.parseError == "function" ? this.parseError = U.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
153
|
+
function Zt(N) {
|
|
154
|
+
r.length = r.length - 2 * N, E.length = E.length - N, i.length = i.length - N;
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
function
|
|
158
|
-
var
|
|
159
|
-
return
|
|
156
|
+
f(Zt, "popStack");
|
|
157
|
+
function Lt() {
|
|
158
|
+
var N;
|
|
159
|
+
return N = g.pop() || b.lex() || Q, typeof N != "number" && (N instanceof Array && (g = N, N = g.pop()), N = d.symbols_[N] || N), N;
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
for (var
|
|
163
|
-
if (
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
for (
|
|
167
|
-
this.terminals_[
|
|
168
|
-
|
|
169
|
-
` +
|
|
170
|
-
Expecting ` +
|
|
171
|
-
text:
|
|
172
|
-
token: this.terminals_[
|
|
173
|
-
line:
|
|
174
|
-
loc:
|
|
175
|
-
expected:
|
|
161
|
+
f(Lt, "lex");
|
|
162
|
+
for (var A, W, R, _t, X = {}, ut, G, It, dt; ; ) {
|
|
163
|
+
if (W = r[r.length - 1], this.defaultActions[W] ? R = this.defaultActions[W] : ((A === null || typeof A > "u") && (A = Lt()), R = B[W] && B[W][A]), typeof R > "u" || !R.length || !R[0]) {
|
|
164
|
+
var mt = "";
|
|
165
|
+
dt = [];
|
|
166
|
+
for (ut in B[W])
|
|
167
|
+
this.terminals_[ut] && ut > ht && dt.push("'" + this.terminals_[ut] + "'");
|
|
168
|
+
b.showPosition ? mt = "Parse error on line " + (Y + 1) + `:
|
|
169
|
+
` + b.showPosition() + `
|
|
170
|
+
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : mt = "Parse error on line " + (Y + 1) + ": Unexpected " + (A == Q ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(mt, {
|
|
171
|
+
text: b.match,
|
|
172
|
+
token: this.terminals_[A] || A,
|
|
173
|
+
line: b.yylineno,
|
|
174
|
+
loc: Et,
|
|
175
|
+
expected: dt
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
if (
|
|
179
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
180
|
-
switch (
|
|
178
|
+
if (R[0] instanceof Array && R.length > 1)
|
|
179
|
+
throw new Error("Parse Error: multiple actions possible at state: " + W + ", token: " + A);
|
|
180
|
+
switch (R[0]) {
|
|
181
181
|
case 1:
|
|
182
|
-
|
|
182
|
+
r.push(A), E.push(b.yytext), i.push(b.yylloc), r.push(R[1]), A = null, K = b.yyleng, l = b.yytext, Y = b.yylineno, Et = b.yylloc;
|
|
183
183
|
break;
|
|
184
184
|
case 2:
|
|
185
|
-
if (
|
|
186
|
-
first_line:
|
|
187
|
-
last_line:
|
|
188
|
-
first_column:
|
|
189
|
-
last_column:
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
]),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
].concat(
|
|
202
|
-
return
|
|
203
|
-
|
|
185
|
+
if (G = this.productions_[R[1]][1], X.$ = E[E.length - G], X._$ = {
|
|
186
|
+
first_line: i[i.length - (G || 1)].first_line,
|
|
187
|
+
last_line: i[i.length - 1].last_line,
|
|
188
|
+
first_column: i[i.length - (G || 1)].first_column,
|
|
189
|
+
last_column: i[i.length - 1].last_column
|
|
190
|
+
}, Qt && (X._$.range = [
|
|
191
|
+
i[i.length - (G || 1)].range[0],
|
|
192
|
+
i[i.length - 1].range[1]
|
|
193
|
+
]), _t = this.performAction.apply(X, [
|
|
194
|
+
l,
|
|
195
|
+
K,
|
|
196
|
+
Y,
|
|
197
|
+
U.yy,
|
|
198
|
+
R[1],
|
|
199
|
+
E,
|
|
200
|
+
i
|
|
201
|
+
].concat(gt)), typeof _t < "u")
|
|
202
|
+
return _t;
|
|
203
|
+
G && (r = r.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), i = i.slice(0, -1 * G)), r.push(this.productions_[R[1]][0]), E.push(X.$), i.push(X._$), It = B[r[r.length - 2]][r[r.length - 1]], r.push(It);
|
|
204
204
|
break;
|
|
205
205
|
case 3:
|
|
206
206
|
return !0;
|
|
@@ -208,18 +208,18 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
208
208
|
}
|
|
209
209
|
return !0;
|
|
210
210
|
}, "parse")
|
|
211
|
-
},
|
|
212
|
-
var
|
|
211
|
+
}, qt = /* @__PURE__ */ (function() {
|
|
212
|
+
var V = {
|
|
213
213
|
EOF: 1,
|
|
214
|
-
parseError: /* @__PURE__ */
|
|
214
|
+
parseError: /* @__PURE__ */ f(function(d, r) {
|
|
215
215
|
if (this.yy.parser)
|
|
216
|
-
this.yy.parser.parseError(d,
|
|
216
|
+
this.yy.parser.parseError(d, r);
|
|
217
217
|
else
|
|
218
218
|
throw new Error(d);
|
|
219
219
|
}, "parseError"),
|
|
220
220
|
// resets the lexer, sets new input
|
|
221
|
-
setInput: /* @__PURE__ */
|
|
222
|
-
return this.yy = d || this.yy || {}, this._input =
|
|
221
|
+
setInput: /* @__PURE__ */ f(function(a, d) {
|
|
222
|
+
return this.yy = d || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
223
223
|
first_line: 1,
|
|
224
224
|
first_column: 0,
|
|
225
225
|
last_line: 1,
|
|
@@ -227,32 +227,32 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
227
227
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
228
228
|
}, "setInput"),
|
|
229
229
|
// consumes and returns one char from the input
|
|
230
|
-
input: /* @__PURE__ */
|
|
231
|
-
var
|
|
232
|
-
this.yytext +=
|
|
233
|
-
var d =
|
|
234
|
-
return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1),
|
|
230
|
+
input: /* @__PURE__ */ f(function() {
|
|
231
|
+
var a = this._input[0];
|
|
232
|
+
this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
|
|
233
|
+
var d = a.match(/(?:\r\n?|\n).*/g);
|
|
234
|
+
return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a;
|
|
235
235
|
}, "input"),
|
|
236
236
|
// unshifts one char (or a string) into the input
|
|
237
|
-
unput: /* @__PURE__ */
|
|
238
|
-
var d =
|
|
239
|
-
this._input =
|
|
237
|
+
unput: /* @__PURE__ */ f(function(a) {
|
|
238
|
+
var d = a.length, r = a.split(/(?:\r\n?|\n)/g);
|
|
239
|
+
this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
|
|
240
240
|
var g = this.match.split(/(?:\r\n?|\n)/g);
|
|
241
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
|
|
242
|
-
var
|
|
241
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), r.length - 1 && (this.yylineno -= r.length - 1);
|
|
242
|
+
var E = this.yylloc.range;
|
|
243
243
|
return this.yylloc = {
|
|
244
244
|
first_line: this.yylloc.first_line,
|
|
245
245
|
last_line: this.yylineno + 1,
|
|
246
246
|
first_column: this.yylloc.first_column,
|
|
247
|
-
last_column:
|
|
248
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
247
|
+
last_column: r ? (r.length === g.length ? this.yylloc.first_column : 0) + g[g.length - r.length].length - r[0].length : this.yylloc.first_column - d
|
|
248
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
|
|
249
249
|
}, "unput"),
|
|
250
250
|
// When called from action, caches matched text and appends it on next action
|
|
251
|
-
more: /* @__PURE__ */
|
|
251
|
+
more: /* @__PURE__ */ f(function() {
|
|
252
252
|
return this._more = !0, this;
|
|
253
253
|
}, "more"),
|
|
254
254
|
// 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.
|
|
255
|
-
reject: /* @__PURE__ */
|
|
255
|
+
reject: /* @__PURE__ */ f(function() {
|
|
256
256
|
if (this.options.backtrack_lexer)
|
|
257
257
|
this._backtrack = !0;
|
|
258
258
|
else
|
|
@@ -265,29 +265,29 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
265
265
|
return this;
|
|
266
266
|
}, "reject"),
|
|
267
267
|
// retain first n characters of the match
|
|
268
|
-
less: /* @__PURE__ */
|
|
269
|
-
this.unput(this.match.slice(
|
|
268
|
+
less: /* @__PURE__ */ f(function(a) {
|
|
269
|
+
this.unput(this.match.slice(a));
|
|
270
270
|
}, "less"),
|
|
271
271
|
// displays already matched input, i.e. for error messages
|
|
272
|
-
pastInput: /* @__PURE__ */
|
|
273
|
-
var
|
|
274
|
-
return (
|
|
272
|
+
pastInput: /* @__PURE__ */ f(function() {
|
|
273
|
+
var a = this.matched.substr(0, this.matched.length - this.match.length);
|
|
274
|
+
return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
|
|
275
275
|
}, "pastInput"),
|
|
276
276
|
// displays upcoming input, i.e. for error messages
|
|
277
|
-
upcomingInput: /* @__PURE__ */
|
|
278
|
-
var
|
|
279
|
-
return
|
|
277
|
+
upcomingInput: /* @__PURE__ */ f(function() {
|
|
278
|
+
var a = this.match;
|
|
279
|
+
return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
280
280
|
}, "upcomingInput"),
|
|
281
281
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
282
|
-
showPosition: /* @__PURE__ */
|
|
283
|
-
var
|
|
284
|
-
return
|
|
282
|
+
showPosition: /* @__PURE__ */ f(function() {
|
|
283
|
+
var a = this.pastInput(), d = new Array(a.length + 1).join("-");
|
|
284
|
+
return a + this.upcomingInput() + `
|
|
285
285
|
` + d + "^";
|
|
286
286
|
}, "showPosition"),
|
|
287
287
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
288
|
-
test_match: /* @__PURE__ */
|
|
289
|
-
var
|
|
290
|
-
if (this.options.backtrack_lexer && (
|
|
288
|
+
test_match: /* @__PURE__ */ f(function(a, d) {
|
|
289
|
+
var r, g, E;
|
|
290
|
+
if (this.options.backtrack_lexer && (E = {
|
|
291
291
|
yylineno: this.yylineno,
|
|
292
292
|
yylloc: {
|
|
293
293
|
first_line: this.yylloc.first_line,
|
|
@@ -306,32 +306,32 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
306
306
|
yy: this.yy,
|
|
307
307
|
conditionStack: this.conditionStack.slice(0),
|
|
308
308
|
done: this.done
|
|
309
|
-
}, this.options.ranges && (
|
|
309
|
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = a[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
|
|
310
310
|
first_line: this.yylloc.last_line,
|
|
311
311
|
last_line: this.yylineno + 1,
|
|
312
312
|
first_column: this.yylloc.last_column,
|
|
313
|
-
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column +
|
|
314
|
-
}, this.yytext +=
|
|
315
|
-
return
|
|
313
|
+
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
|
|
314
|
+
}, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], r = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), r)
|
|
315
|
+
return r;
|
|
316
316
|
if (this._backtrack) {
|
|
317
|
-
for (var
|
|
318
|
-
this[
|
|
317
|
+
for (var i in E)
|
|
318
|
+
this[i] = E[i];
|
|
319
319
|
return !1;
|
|
320
320
|
}
|
|
321
321
|
return !1;
|
|
322
322
|
}, "test_match"),
|
|
323
323
|
// return next match in input
|
|
324
|
-
next: /* @__PURE__ */
|
|
324
|
+
next: /* @__PURE__ */ f(function() {
|
|
325
325
|
if (this.done)
|
|
326
326
|
return this.EOF;
|
|
327
327
|
this._input || (this.done = !0);
|
|
328
|
-
var
|
|
328
|
+
var a, d, r, g;
|
|
329
329
|
this._more || (this.yytext = "", this.match = "");
|
|
330
|
-
for (var
|
|
331
|
-
if (
|
|
332
|
-
if (d =
|
|
333
|
-
if (
|
|
334
|
-
return
|
|
330
|
+
for (var E = this._currentRules(), i = 0; i < E.length; i++)
|
|
331
|
+
if (r = this._input.match(this.rules[E[i]]), r && (!d || r[0].length > d[0].length)) {
|
|
332
|
+
if (d = r, g = i, this.options.backtrack_lexer) {
|
|
333
|
+
if (a = this.test_match(r, E[i]), a !== !1)
|
|
334
|
+
return a;
|
|
335
335
|
if (this._backtrack) {
|
|
336
336
|
d = !1;
|
|
337
337
|
continue;
|
|
@@ -340,7 +340,7 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
340
340
|
} else if (!this.options.flex)
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
|
-
return d ? (
|
|
343
|
+
return d ? (a = this.test_match(d, E[g]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
344
344
|
` + this.showPosition(), {
|
|
345
345
|
text: "",
|
|
346
346
|
token: null,
|
|
@@ -348,48 +348,48 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
348
348
|
});
|
|
349
349
|
}, "next"),
|
|
350
350
|
// return next match that has a token
|
|
351
|
-
lex: /* @__PURE__ */
|
|
351
|
+
lex: /* @__PURE__ */ f(function() {
|
|
352
352
|
var d = this.next();
|
|
353
353
|
return d || this.lex();
|
|
354
354
|
}, "lex"),
|
|
355
355
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
356
|
-
begin: /* @__PURE__ */
|
|
356
|
+
begin: /* @__PURE__ */ f(function(d) {
|
|
357
357
|
this.conditionStack.push(d);
|
|
358
358
|
}, "begin"),
|
|
359
359
|
// pop the previously active lexer condition state off the condition stack
|
|
360
|
-
popState: /* @__PURE__ */
|
|
360
|
+
popState: /* @__PURE__ */ f(function() {
|
|
361
361
|
var d = this.conditionStack.length - 1;
|
|
362
362
|
return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
363
363
|
}, "popState"),
|
|
364
364
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
365
|
-
_currentRules: /* @__PURE__ */
|
|
365
|
+
_currentRules: /* @__PURE__ */ f(function() {
|
|
366
366
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
367
367
|
}, "_currentRules"),
|
|
368
368
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
369
|
-
topState: /* @__PURE__ */
|
|
369
|
+
topState: /* @__PURE__ */ f(function(d) {
|
|
370
370
|
return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
|
|
371
371
|
}, "topState"),
|
|
372
372
|
// alias for begin(condition)
|
|
373
|
-
pushState: /* @__PURE__ */
|
|
373
|
+
pushState: /* @__PURE__ */ f(function(d) {
|
|
374
374
|
this.begin(d);
|
|
375
375
|
}, "pushState"),
|
|
376
376
|
// return the number of states currently on the stack
|
|
377
|
-
stateStackSize: /* @__PURE__ */
|
|
377
|
+
stateStackSize: /* @__PURE__ */ f(function() {
|
|
378
378
|
return this.conditionStack.length;
|
|
379
379
|
}, "stateStackSize"),
|
|
380
380
|
options: { "case-insensitive": !0 },
|
|
381
|
-
performAction: /* @__PURE__ */
|
|
382
|
-
function
|
|
383
|
-
const
|
|
384
|
-
if (
|
|
381
|
+
performAction: /* @__PURE__ */ f(function(d, r, g, E) {
|
|
382
|
+
function i() {
|
|
383
|
+
const B = r.yytext.indexOf("%%");
|
|
384
|
+
if (B === 0)
|
|
385
385
|
return !1;
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
388
|
-
|
|
386
|
+
if (B > 0) {
|
|
387
|
+
const l = r.yytext.slice(0, B), Y = r.yytext.slice(B);
|
|
388
|
+
Y && d.lexer.unput(Y), r.yytext = l;
|
|
389
389
|
}
|
|
390
390
|
return !0;
|
|
391
391
|
}
|
|
392
|
-
switch (
|
|
392
|
+
switch (f(i, "processId"), g) {
|
|
393
393
|
case 0:
|
|
394
394
|
return 38;
|
|
395
395
|
case 1:
|
|
@@ -470,17 +470,17 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
470
470
|
this.pushState("STATE");
|
|
471
471
|
break;
|
|
472
472
|
case 37:
|
|
473
|
-
return this.popState(),
|
|
473
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 25;
|
|
474
474
|
case 38:
|
|
475
|
-
return this.popState(),
|
|
475
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 26;
|
|
476
476
|
case 39:
|
|
477
|
-
return this.popState(),
|
|
477
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -10).trim(), 27;
|
|
478
478
|
case 40:
|
|
479
|
-
return this.popState(),
|
|
479
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 25;
|
|
480
480
|
case 41:
|
|
481
|
-
return this.popState(),
|
|
481
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 26;
|
|
482
482
|
case 42:
|
|
483
|
-
return this.popState(),
|
|
483
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -10).trim(), 27;
|
|
484
484
|
case 43:
|
|
485
485
|
return 51;
|
|
486
486
|
case 44:
|
|
@@ -495,14 +495,14 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
495
495
|
case 48:
|
|
496
496
|
return this.pushState("STATE_ID"), "AS";
|
|
497
497
|
case 49:
|
|
498
|
-
return
|
|
498
|
+
return i() ? (this.popState(), "ID") : void 0;
|
|
499
499
|
case 50:
|
|
500
500
|
this.popState();
|
|
501
501
|
break;
|
|
502
502
|
case 51:
|
|
503
503
|
return "STATE_DESCR";
|
|
504
504
|
case 52:
|
|
505
|
-
throw new Error('Error: State name must be a single word. Found: "' +
|
|
505
|
+
throw new Error('Error: State name must be a single word. Found: "' + r.yytext.trim() + '"');
|
|
506
506
|
case 53:
|
|
507
507
|
return 19;
|
|
508
508
|
case 54:
|
|
@@ -530,13 +530,13 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
530
530
|
case 64:
|
|
531
531
|
return "NOTE_TEXT";
|
|
532
532
|
case 65:
|
|
533
|
-
return
|
|
533
|
+
return i() ? (this.popState(), "ID") : void 0;
|
|
534
534
|
case 66:
|
|
535
|
-
return
|
|
535
|
+
return i() ? (this.popState(), this.pushState("NOTE_TEXT"), 24) : void 0;
|
|
536
536
|
case 67:
|
|
537
|
-
return this.popState(),
|
|
537
|
+
return this.popState(), r.yytext = r.yytext.substr(2).trim(), 31;
|
|
538
538
|
case 68:
|
|
539
|
-
return this.popState(),
|
|
539
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 31;
|
|
540
540
|
case 69:
|
|
541
541
|
return 6;
|
|
542
542
|
case 70:
|
|
@@ -546,9 +546,9 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
546
546
|
case 72:
|
|
547
547
|
return 57;
|
|
548
548
|
case 73:
|
|
549
|
-
return
|
|
549
|
+
return i() ? 24 : void 0;
|
|
550
550
|
case 74:
|
|
551
|
-
return
|
|
551
|
+
return r.yytext = r.yytext.trim(), 14;
|
|
552
552
|
case 75:
|
|
553
553
|
return 15;
|
|
554
554
|
case 76:
|
|
@@ -564,172 +564,168 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
|
|
|
564
564
|
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, /^(?:\w+\s+\w+.*?\{)/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],
|
|
565
565
|
conditions: { LINE: { rules: [10, 11, 12], inclusive: !1 }, struct: { rules: [10, 11, 12, 23, 27, 30, 36, 43, 44, 45, 46, 56, 57, 58, 72, 73, 74, 75, 76, 77], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [65], inclusive: !1 }, FLOATING_NOTE: { rules: [62, 63, 64], inclusive: !1 }, NOTE_TEXT: { rules: [67, 68], inclusive: !1 }, NOTE_ID: { rules: [66], inclusive: !1 }, NOTE: { rules: [59, 60, 61], 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, 55], 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, 55, 58, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79], inclusive: !0 } }
|
|
566
566
|
};
|
|
567
|
-
return
|
|
567
|
+
return V;
|
|
568
568
|
})();
|
|
569
|
-
|
|
570
|
-
function
|
|
569
|
+
yt.lexer = qt;
|
|
570
|
+
function ct() {
|
|
571
571
|
this.yy = {};
|
|
572
572
|
}
|
|
573
|
-
return
|
|
573
|
+
return f(ct, "Parser"), ct.prototype = yt, yt.Parser = ct, new ct();
|
|
574
574
|
})();
|
|
575
|
-
|
|
576
|
-
var
|
|
575
|
+
vt.parser = vt;
|
|
576
|
+
var Ue = vt, pe = "TB", Bt = "TB", wt = "dir", q = "state", J = "root", Ct = "relation", Se = "classDef", ye = "style", ge = "applyClass", et = "default", Yt = "divider", Gt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "markdown", Wt = "normal", kt = "rect", Dt = "rectWithTitle", Te = "stateStart", Ee = "stateEnd", Nt = "divider", Ot = "roundedWithTitle", _e = "note", me = "noteGroup", st = "statediagram", be = "state", ke = `${st}-${be}`, jt = "transition", De = "note", ve = "note-edge", Ce = `${jt} ${ve}`, Ae = `${st}-${De}`, xe = "cluster", Le = `${st}-${xe}`, Ie = "cluster-alt", we = `${st}-${Ie}`, Ht = "parent", zt = "note", Ne = "state", At = "----", Oe = `${At}${zt}`, Rt = `${At}${Ht}`, Kt = /* @__PURE__ */ f((t, e = Bt) => {
|
|
577
577
|
if (!t.doc)
|
|
578
578
|
return e;
|
|
579
|
-
let
|
|
580
|
-
for (const
|
|
581
|
-
|
|
582
|
-
return
|
|
583
|
-
}, "getDir"),
|
|
579
|
+
let o = e;
|
|
580
|
+
for (const s of t.doc)
|
|
581
|
+
s.stmt === "dir" && (o = s.value);
|
|
582
|
+
return o;
|
|
583
|
+
}, "getDir"), Re = /* @__PURE__ */ f(function(t, e) {
|
|
584
584
|
return e.db.getClasses();
|
|
585
|
-
}, "getClasses"),
|
|
586
|
-
|
|
587
|
-
const { securityLevel:
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
const
|
|
585
|
+
}, "getClasses"), $e = /* @__PURE__ */ f(async function(t, e, o, s) {
|
|
586
|
+
_.info("REF0:"), _.info("Drawing state diagram (v2)", e);
|
|
587
|
+
const { securityLevel: c, state: h, layout: p } = $();
|
|
588
|
+
s.db.extract(s.db.getRootDocV2());
|
|
589
|
+
const y = s.db.getData(), n = te(e, c);
|
|
590
|
+
y.type = s.type, y.layoutAlgorithm = p, y.nodeSpacing = h?.nodeSpacing || 50, y.rankSpacing = h?.rankSpacing || 50, $().look === "neo" ? y.markers = ["barbNeo"] : y.markers = ["barb"], y.diagramId = e, await se(y, n);
|
|
591
|
+
const m = 8;
|
|
592
592
|
try {
|
|
593
|
-
(typeof
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(C));
|
|
593
|
+
(typeof s.db.getLinks == "function" ? s.db.getLinks() : /* @__PURE__ */ new Map()).forEach((x, k) => {
|
|
594
|
+
const u = typeof k == "string" ? k : typeof k?.id == "string" ? k.id : "", L = y.nodes.find((w) => w.id === u);
|
|
595
|
+
if (!u) {
|
|
596
|
+
_.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
|
|
598
597
|
return;
|
|
599
598
|
}
|
|
600
|
-
const
|
|
601
|
-
let
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
b.warn("⚠️ Could not find node matching text:", x);
|
|
599
|
+
const I = n.node()?.querySelectorAll("g.node, g.rough-node");
|
|
600
|
+
let v;
|
|
601
|
+
if (I?.forEach((w) => {
|
|
602
|
+
const H = w.textContent?.trim();
|
|
603
|
+
(w.id === L?.domId || H === u) && (v = w);
|
|
604
|
+
}), !v) {
|
|
605
|
+
_.warn("⚠️ Could not find node matching text:", u);
|
|
608
606
|
return;
|
|
609
607
|
}
|
|
610
|
-
const
|
|
611
|
-
if (!
|
|
612
|
-
|
|
608
|
+
const F = v.parentNode;
|
|
609
|
+
if (!F) {
|
|
610
|
+
_.warn("⚠️ Node has no parent, cannot wrap:", u);
|
|
613
611
|
return;
|
|
614
612
|
}
|
|
615
|
-
const
|
|
616
|
-
if (
|
|
617
|
-
const
|
|
618
|
-
|
|
613
|
+
const C = document.createElementNS("http://www.w3.org/2000/svg", "a"), P = x.url.replace(/^"+|"+$/g, "");
|
|
614
|
+
if (C.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", P), C.setAttribute("target", "_blank"), x.tooltip) {
|
|
615
|
+
const w = x.tooltip.replace(/^"+|"+$/g, "");
|
|
616
|
+
C.setAttribute("title", w), v.setAttribute("title", w);
|
|
619
617
|
}
|
|
620
|
-
|
|
618
|
+
F.replaceChild(C, v), C.appendChild(v), _.info("🔗 Wrapped node in <a> tag for:", u, x.url);
|
|
621
619
|
});
|
|
622
|
-
} catch (
|
|
623
|
-
|
|
620
|
+
} catch (O) {
|
|
621
|
+
_.error("❌ Error injecting clickable links:", O);
|
|
624
622
|
}
|
|
625
|
-
|
|
626
|
-
|
|
623
|
+
ie.insertTitle(
|
|
624
|
+
n,
|
|
627
625
|
"statediagramTitleText",
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
),
|
|
631
|
-
}, "draw"),
|
|
632
|
-
getClasses:
|
|
633
|
-
draw:
|
|
634
|
-
getDir:
|
|
635
|
-
},
|
|
636
|
-
function
|
|
637
|
-
const
|
|
638
|
-
return `${
|
|
626
|
+
h?.titleTopMargin ?? 25,
|
|
627
|
+
s.db.getDiagramTitle()
|
|
628
|
+
), ee(n, m, st, h?.useMaxWidth ?? !0);
|
|
629
|
+
}, "draw"), We = {
|
|
630
|
+
getClasses: Re,
|
|
631
|
+
draw: $e,
|
|
632
|
+
getDir: Kt
|
|
633
|
+
}, pt = /* @__PURE__ */ new Map(), M = 0;
|
|
634
|
+
function St(t = "", e = 0, o = "", s = At) {
|
|
635
|
+
const c = o !== null && o.length > 0 ? `${s}${o}` : "";
|
|
636
|
+
return `${Ne}-${t}${c}-${e}`;
|
|
639
637
|
}
|
|
640
|
-
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
switch (
|
|
644
|
-
case
|
|
645
|
-
|
|
638
|
+
f(St, "stateDomId");
|
|
639
|
+
var Fe = /* @__PURE__ */ f((t, e, o, s, c, h, p, y) => {
|
|
640
|
+
_.trace("items", e), e.forEach((n) => {
|
|
641
|
+
switch (n.stmt) {
|
|
642
|
+
case q:
|
|
643
|
+
tt(t, n, o, s, c, h, p, y);
|
|
646
644
|
break;
|
|
647
|
-
case
|
|
648
|
-
|
|
645
|
+
case et:
|
|
646
|
+
tt(t, n, o, s, c, h, p, y);
|
|
649
647
|
break;
|
|
650
|
-
case
|
|
648
|
+
case Ct:
|
|
651
649
|
{
|
|
652
|
-
|
|
650
|
+
tt(
|
|
653
651
|
t,
|
|
654
|
-
|
|
655
|
-
s,
|
|
656
|
-
a,
|
|
657
|
-
i,
|
|
652
|
+
n.state1,
|
|
658
653
|
o,
|
|
654
|
+
s,
|
|
655
|
+
c,
|
|
659
656
|
h,
|
|
660
|
-
p
|
|
661
|
-
|
|
657
|
+
p,
|
|
658
|
+
y
|
|
659
|
+
), tt(
|
|
662
660
|
t,
|
|
663
|
-
|
|
664
|
-
s,
|
|
665
|
-
a,
|
|
666
|
-
i,
|
|
661
|
+
n.state2,
|
|
667
662
|
o,
|
|
663
|
+
s,
|
|
664
|
+
c,
|
|
668
665
|
h,
|
|
669
|
-
p
|
|
666
|
+
p,
|
|
667
|
+
y
|
|
670
668
|
);
|
|
671
|
-
const T =
|
|
672
|
-
id: "edge" +
|
|
673
|
-
start:
|
|
674
|
-
end:
|
|
669
|
+
const T = p === "neo", m = {
|
|
670
|
+
id: "edge" + M,
|
|
671
|
+
start: n.state1.id,
|
|
672
|
+
end: n.state2.id,
|
|
675
673
|
arrowhead: "normal",
|
|
676
674
|
arrowTypeEnd: T ? "arrow_barb_neo" : "arrow_barb",
|
|
677
|
-
style:
|
|
675
|
+
style: Gt,
|
|
678
676
|
labelStyle: "",
|
|
679
|
-
label:
|
|
680
|
-
arrowheadStyle:
|
|
681
|
-
labelpos:
|
|
682
|
-
labelType:
|
|
683
|
-
thickness:
|
|
684
|
-
classes:
|
|
685
|
-
look:
|
|
677
|
+
label: j.sanitizeText(n.description ?? "", $()),
|
|
678
|
+
arrowheadStyle: Vt,
|
|
679
|
+
labelpos: Mt,
|
|
680
|
+
labelType: Ut,
|
|
681
|
+
thickness: Wt,
|
|
682
|
+
classes: jt,
|
|
683
|
+
look: p
|
|
686
684
|
};
|
|
687
|
-
|
|
685
|
+
c.push(m), M++;
|
|
688
686
|
}
|
|
689
687
|
break;
|
|
690
688
|
}
|
|
691
689
|
});
|
|
692
|
-
}, "setupDoc"),
|
|
693
|
-
let
|
|
690
|
+
}, "setupDoc"), $t = /* @__PURE__ */ f((t, e = Bt) => {
|
|
691
|
+
let o = e;
|
|
694
692
|
if (t.doc)
|
|
695
|
-
for (const
|
|
696
|
-
|
|
697
|
-
return
|
|
693
|
+
for (const s of t.doc)
|
|
694
|
+
s.stmt === "dir" && (o = s.value);
|
|
695
|
+
return o;
|
|
698
696
|
}, "getDir");
|
|
699
|
-
function
|
|
697
|
+
function Z(t, e, o) {
|
|
700
698
|
if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
|
|
701
699
|
return;
|
|
702
|
-
e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((
|
|
703
|
-
const
|
|
704
|
-
|
|
700
|
+
e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((c) => {
|
|
701
|
+
const h = o.get(c);
|
|
702
|
+
h && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...h.styles]);
|
|
705
703
|
}));
|
|
706
|
-
const
|
|
707
|
-
|
|
704
|
+
const s = t.find((c) => c.id === e.id);
|
|
705
|
+
s ? Object.assign(s, e) : t.push(e);
|
|
708
706
|
}
|
|
709
|
-
|
|
710
|
-
function
|
|
711
|
-
|
|
712
|
-
return ((e = t == null ? void 0 : t.classes) == null ? void 0 : e.join(" ")) ?? "";
|
|
707
|
+
f(Z, "insertOrUpdateNode");
|
|
708
|
+
function Xt(t) {
|
|
709
|
+
return t?.classes?.join(" ") ?? "";
|
|
713
710
|
}
|
|
714
|
-
|
|
715
|
-
function
|
|
716
|
-
return
|
|
711
|
+
f(Xt, "getClassesFromDbInfo");
|
|
712
|
+
function Jt(t) {
|
|
713
|
+
return t?.styles ?? [];
|
|
717
714
|
}
|
|
718
|
-
|
|
719
|
-
var
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
cssStyles: m
|
|
715
|
+
f(Jt, "getStylesFromDbInfo");
|
|
716
|
+
var tt = /* @__PURE__ */ f((t, e, o, s, c, h, p, y) => {
|
|
717
|
+
const n = e.id, T = o.get(n), m = Xt(T), O = Jt(T), x = $();
|
|
718
|
+
if (_.info("dataFetcher parsedItem", e, T, O), n !== "root") {
|
|
719
|
+
let k = kt;
|
|
720
|
+
e.start === !0 ? k = Te : e.start === !1 && (k = Ee), e.type !== et && (k = e.type), pt.get(n) || pt.set(n, {
|
|
721
|
+
id: n,
|
|
722
|
+
shape: k,
|
|
723
|
+
description: j.sanitizeText(n, x),
|
|
724
|
+
cssClasses: `${m} ${ke}`,
|
|
725
|
+
cssStyles: O
|
|
730
726
|
});
|
|
731
|
-
const u =
|
|
732
|
-
e.description && (Array.isArray(u.description) ? (u.shape =
|
|
727
|
+
const u = pt.get(n);
|
|
728
|
+
e.description && (Array.isArray(u.description) ? (u.shape = Dt, u.description.push(e.description)) : u.description?.length && u.description.length > 0 ? (u.shape = Dt, u.description === n ? u.description = [e.description] : u.description = [u.description, e.description]) : (u.shape = kt, u.description = e.description), u.description = j.sanitizeTextOrArray(u.description, x)), u.description?.length === 1 && u.shape === Dt && (u.type === "group" ? u.shape = Ot : u.shape = kt), !u.type && e.doc && (_.info("Setting cluster for XCX", n, $t(e)), u.type = "group", u.isGroup = !0, u.dir = $t(e), u.explicitDir = e.doc.some((I) => I.stmt === "dir"), u.shape = e.type === Yt ? Nt : Ot, u.cssClasses = `${u.cssClasses} ${Le} ${h ? we : ""}`);
|
|
733
729
|
const L = {
|
|
734
730
|
labelStyle: "",
|
|
735
731
|
shape: u.shape,
|
|
@@ -737,73 +733,73 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
737
733
|
cssClasses: u.cssClasses,
|
|
738
734
|
cssCompiledStyles: [],
|
|
739
735
|
cssStyles: u.cssStyles,
|
|
740
|
-
id:
|
|
736
|
+
id: n,
|
|
741
737
|
dir: u.dir,
|
|
742
|
-
domId:
|
|
738
|
+
domId: St(n, M),
|
|
743
739
|
type: u.type,
|
|
744
740
|
isGroup: u.type === "group",
|
|
745
741
|
padding: 8,
|
|
746
742
|
rx: 10,
|
|
747
743
|
ry: 10,
|
|
748
|
-
look:
|
|
744
|
+
look: p,
|
|
749
745
|
labelType: "markdown"
|
|
750
746
|
};
|
|
751
|
-
if (L.shape ===
|
|
752
|
-
const
|
|
747
|
+
if (L.shape === Nt && (L.label = ""), t && t.id !== "root" && (_.trace("Setting node ", n, " to be child of its parent ", t.id), L.parentId = t.id), L.centerLabel = !0, e.note) {
|
|
748
|
+
const I = {
|
|
753
749
|
labelStyle: "",
|
|
754
|
-
shape:
|
|
750
|
+
shape: _e,
|
|
755
751
|
label: e.note.text,
|
|
756
752
|
labelType: "markdown",
|
|
757
|
-
cssClasses:
|
|
753
|
+
cssClasses: Ae,
|
|
758
754
|
// useHtmlLabels: false,
|
|
759
755
|
cssStyles: [],
|
|
760
756
|
cssCompiledStyles: [],
|
|
761
|
-
id:
|
|
762
|
-
domId:
|
|
757
|
+
id: n + Oe + "-" + M,
|
|
758
|
+
domId: St(n, M, zt),
|
|
763
759
|
type: u.type,
|
|
764
760
|
isGroup: u.type === "group",
|
|
765
|
-
padding:
|
|
766
|
-
look:
|
|
761
|
+
padding: x.flowchart?.padding,
|
|
762
|
+
look: p,
|
|
767
763
|
position: e.note.position
|
|
768
|
-
},
|
|
764
|
+
}, v = n + Rt, F = {
|
|
769
765
|
labelStyle: "",
|
|
770
|
-
shape:
|
|
766
|
+
shape: me,
|
|
771
767
|
label: e.note.text,
|
|
772
768
|
cssClasses: u.cssClasses,
|
|
773
769
|
cssStyles: [],
|
|
774
|
-
id:
|
|
775
|
-
domId:
|
|
770
|
+
id: n + Rt,
|
|
771
|
+
domId: St(n, M, Ht),
|
|
776
772
|
type: "group",
|
|
777
773
|
isGroup: !0,
|
|
778
774
|
padding: 16,
|
|
779
775
|
//getConfig().flowchart.padding
|
|
780
|
-
look:
|
|
776
|
+
look: p,
|
|
781
777
|
position: e.note.position
|
|
782
778
|
};
|
|
783
|
-
|
|
784
|
-
let
|
|
785
|
-
e.note.position === "left of" && (
|
|
786
|
-
id:
|
|
787
|
-
start:
|
|
788
|
-
end:
|
|
779
|
+
M++, F.id = v, I.parentId = v, Z(s, F, y), Z(s, I, y), Z(s, L, y);
|
|
780
|
+
let C = n, P = I.id;
|
|
781
|
+
e.note.position === "left of" && (C = I.id, P = n), c.push({
|
|
782
|
+
id: C + "-" + P,
|
|
783
|
+
start: C,
|
|
784
|
+
end: P,
|
|
789
785
|
arrowhead: "none",
|
|
790
786
|
arrowTypeEnd: "",
|
|
791
|
-
style:
|
|
787
|
+
style: Gt,
|
|
792
788
|
labelStyle: "",
|
|
793
|
-
classes:
|
|
794
|
-
arrowheadStyle:
|
|
795
|
-
labelpos:
|
|
796
|
-
labelType:
|
|
797
|
-
thickness:
|
|
798
|
-
look:
|
|
789
|
+
classes: Ce,
|
|
790
|
+
arrowheadStyle: Vt,
|
|
791
|
+
labelpos: Mt,
|
|
792
|
+
labelType: Ut,
|
|
793
|
+
thickness: Wt,
|
|
794
|
+
look: p
|
|
799
795
|
});
|
|
800
796
|
} else
|
|
801
|
-
|
|
797
|
+
Z(s, L, y);
|
|
802
798
|
}
|
|
803
|
-
e.doc && (
|
|
804
|
-
}, "dataFetcher"),
|
|
805
|
-
|
|
806
|
-
}, "reset"),
|
|
799
|
+
e.doc && (_.trace("Adding nodes children "), Fe(e, e.doc, o, s, c, !h, p, y));
|
|
800
|
+
}, "dataFetcher"), Pe = /* @__PURE__ */ f(() => {
|
|
801
|
+
pt.clear(), M = 0;
|
|
802
|
+
}, "reset"), D = {
|
|
807
803
|
START_NODE: "[*]",
|
|
808
804
|
START_TYPE: "start",
|
|
809
805
|
END_NODE: "[*]",
|
|
@@ -812,13 +808,24 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
812
808
|
FILL_KEYWORD: "fill",
|
|
813
809
|
BG_FILL: "bgFill",
|
|
814
810
|
STYLECLASS_SEP: ","
|
|
815
|
-
},
|
|
811
|
+
}, Ft = /* @__PURE__ */ f(() => /* @__PURE__ */ new Map(), "newClassesList"), Pt = /* @__PURE__ */ f(() => ({
|
|
816
812
|
relations: [],
|
|
817
813
|
states: /* @__PURE__ */ new Map(),
|
|
818
814
|
documents: {}
|
|
819
|
-
}), "newDoc"),
|
|
820
|
-
constructor(
|
|
821
|
-
this.version =
|
|
815
|
+
}), "newDoc"), ft = /* @__PURE__ */ f((t) => JSON.parse(JSON.stringify(t)), "clone"), je = class {
|
|
816
|
+
constructor(t) {
|
|
817
|
+
this.version = t, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Ft(), this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.funs = [], 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), this.bindFunctions = this.bindFunctions.bind(this);
|
|
818
|
+
}
|
|
819
|
+
static {
|
|
820
|
+
f(this, "StateDB");
|
|
821
|
+
}
|
|
822
|
+
static {
|
|
823
|
+
this.relationType = {
|
|
824
|
+
AGGREGATION: 0,
|
|
825
|
+
EXTENSION: 1,
|
|
826
|
+
COMPOSITION: 2,
|
|
827
|
+
DEPENDENCY: 3
|
|
828
|
+
};
|
|
822
829
|
}
|
|
823
830
|
/**
|
|
824
831
|
* Convert all of the statements (stmts) that were parsed into states and relationships.
|
|
@@ -829,98 +836,95 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
829
836
|
* See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
|
|
830
837
|
* This will push the statement into the list of statements for the current document.
|
|
831
838
|
*/
|
|
832
|
-
extract(
|
|
839
|
+
extract(t) {
|
|
833
840
|
this.clear(!0);
|
|
834
|
-
for (const
|
|
835
|
-
switch (
|
|
836
|
-
case
|
|
837
|
-
this.addState(
|
|
841
|
+
for (const s of Array.isArray(t) ? t : t.doc)
|
|
842
|
+
switch (s.stmt) {
|
|
843
|
+
case q:
|
|
844
|
+
this.addState(s.id.trim(), s.type, s.doc, s.description, s.note);
|
|
838
845
|
break;
|
|
839
|
-
case
|
|
840
|
-
this.addRelation(
|
|
846
|
+
case Ct:
|
|
847
|
+
this.addRelation(s.state1, s.state2, s.description);
|
|
848
|
+
break;
|
|
849
|
+
case Se:
|
|
850
|
+
this.addStyleClass(s.id.trim(), s.classes);
|
|
841
851
|
break;
|
|
842
852
|
case ye:
|
|
843
|
-
this.
|
|
853
|
+
this.handleStyleDef(s);
|
|
844
854
|
break;
|
|
845
855
|
case ge:
|
|
846
|
-
this.
|
|
847
|
-
break;
|
|
848
|
-
case Te:
|
|
849
|
-
this.setCssClass(i.id.trim(), i.styleClass);
|
|
856
|
+
this.setCssClass(s.id.trim(), s.styleClass);
|
|
850
857
|
break;
|
|
851
858
|
case "click":
|
|
852
|
-
this.addLink(
|
|
859
|
+
this.addLink(s.id, s.url, s.tooltip);
|
|
853
860
|
break;
|
|
854
861
|
}
|
|
855
|
-
const
|
|
856
|
-
|
|
862
|
+
const e = this.getStates(), o = $();
|
|
863
|
+
Pe(), tt(
|
|
857
864
|
void 0,
|
|
858
865
|
this.getRootDocV2(),
|
|
859
|
-
|
|
866
|
+
e,
|
|
860
867
|
this.nodes,
|
|
861
868
|
this.edges,
|
|
862
869
|
!0,
|
|
863
|
-
|
|
870
|
+
o.look,
|
|
864
871
|
this.classes
|
|
865
872
|
);
|
|
866
|
-
for (const
|
|
867
|
-
if (Array.isArray(
|
|
868
|
-
if (
|
|
873
|
+
for (const s of this.nodes)
|
|
874
|
+
if (Array.isArray(s.label)) {
|
|
875
|
+
if (s.description = s.label.slice(1), s.isGroup && s.description.length > 0)
|
|
869
876
|
throw new Error(
|
|
870
|
-
`Group nodes can only have label. Remove the additional description for node [${
|
|
877
|
+
`Group nodes can only have label. Remove the additional description for node [${s.id}]`
|
|
871
878
|
);
|
|
872
|
-
|
|
879
|
+
s.label = s.label[0];
|
|
873
880
|
}
|
|
874
881
|
}
|
|
875
|
-
handleStyleDef(
|
|
876
|
-
const
|
|
877
|
-
for (const
|
|
878
|
-
let
|
|
879
|
-
if (!
|
|
880
|
-
const h =
|
|
881
|
-
this.addState(h),
|
|
882
|
+
handleStyleDef(t) {
|
|
883
|
+
const e = t.id.trim().split(","), o = t.styleClass.split(",");
|
|
884
|
+
for (const s of e) {
|
|
885
|
+
let c = this.getState(s);
|
|
886
|
+
if (!c) {
|
|
887
|
+
const h = s.trim();
|
|
888
|
+
this.addState(h), c = this.getState(h);
|
|
882
889
|
}
|
|
883
|
-
|
|
884
|
-
var p;
|
|
885
|
-
return (p = h.replace(/;/g, "")) == null ? void 0 : p.trim();
|
|
886
|
-
}));
|
|
890
|
+
c && (c.styles = o.map((h) => h.replace(/;/g, "")?.trim()));
|
|
887
891
|
}
|
|
888
892
|
}
|
|
889
|
-
setRootDoc(
|
|
890
|
-
|
|
893
|
+
setRootDoc(t) {
|
|
894
|
+
_.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
|
|
891
895
|
}
|
|
892
|
-
docTranslator(
|
|
893
|
-
if (
|
|
894
|
-
this.docTranslator(
|
|
896
|
+
docTranslator(t, e, o) {
|
|
897
|
+
if (e.stmt === Ct) {
|
|
898
|
+
this.docTranslator(t, e.state1, !0), this.docTranslator(t, e.state2, !1);
|
|
895
899
|
return;
|
|
896
900
|
}
|
|
897
|
-
if (
|
|
901
|
+
if (e.stmt === q && (e.id === D.START_NODE ? (e.id = t.id + (o ? "_start" : "_end"), e.start = o) : e.id = e.id.trim()), e.stmt !== J && e.stmt !== q || !e.doc)
|
|
898
902
|
return;
|
|
899
|
-
const
|
|
900
|
-
let
|
|
901
|
-
for (const h of
|
|
902
|
-
if (h.type ===
|
|
903
|
-
const p =
|
|
904
|
-
p.doc =
|
|
903
|
+
const s = [];
|
|
904
|
+
let c = [];
|
|
905
|
+
for (const h of e.doc)
|
|
906
|
+
if (h.type === Yt) {
|
|
907
|
+
const p = ft(h);
|
|
908
|
+
p.doc = ft(c), s.push(p), c = [];
|
|
905
909
|
} else
|
|
906
|
-
|
|
907
|
-
if (
|
|
910
|
+
c.push(h);
|
|
911
|
+
if (s.length > 0 && c.length > 0) {
|
|
908
912
|
const h = {
|
|
909
|
-
stmt:
|
|
910
|
-
id:
|
|
913
|
+
stmt: q,
|
|
914
|
+
id: he(),
|
|
911
915
|
type: "divider",
|
|
912
|
-
doc:
|
|
916
|
+
doc: ft(c)
|
|
913
917
|
};
|
|
914
|
-
|
|
918
|
+
s.push(ft(h)), e.doc = s;
|
|
915
919
|
}
|
|
916
|
-
|
|
920
|
+
e.doc.forEach((h) => this.docTranslator(e, h, !0));
|
|
917
921
|
}
|
|
918
922
|
getRootDocV2() {
|
|
919
923
|
return this.docTranslator(
|
|
920
|
-
{ id:
|
|
921
|
-
{ id:
|
|
924
|
+
{ id: J, stmt: J },
|
|
925
|
+
{ id: J, stmt: J, doc: this.rootDoc },
|
|
922
926
|
!0
|
|
923
|
-
), { id:
|
|
927
|
+
), { id: J, doc: this.rootDoc };
|
|
924
928
|
}
|
|
925
929
|
/**
|
|
926
930
|
* Function called by parser when a node definition has been found.
|
|
@@ -930,45 +934,45 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
930
934
|
* @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.
|
|
931
935
|
* @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.
|
|
932
936
|
*/
|
|
933
|
-
addState(
|
|
934
|
-
const
|
|
935
|
-
if (!this.currentDocument.states.has(
|
|
936
|
-
|
|
937
|
-
stmt:
|
|
938
|
-
id:
|
|
937
|
+
addState(t, e = et, o = void 0, s = void 0, c = void 0, h = void 0, p = void 0, y = void 0) {
|
|
938
|
+
const n = t?.trim();
|
|
939
|
+
if (!this.currentDocument.states.has(n))
|
|
940
|
+
_.info("Adding state ", n, s), this.currentDocument.states.set(n, {
|
|
941
|
+
stmt: q,
|
|
942
|
+
id: n,
|
|
939
943
|
descriptions: [],
|
|
940
|
-
type:
|
|
941
|
-
doc:
|
|
942
|
-
note:
|
|
944
|
+
type: e,
|
|
945
|
+
doc: o,
|
|
946
|
+
note: c,
|
|
943
947
|
classes: [],
|
|
944
948
|
styles: [],
|
|
945
949
|
textStyles: []
|
|
946
950
|
});
|
|
947
951
|
else {
|
|
948
|
-
const
|
|
949
|
-
if (!
|
|
950
|
-
throw new Error(`State not found: ${
|
|
951
|
-
|
|
952
|
+
const T = this.currentDocument.states.get(n);
|
|
953
|
+
if (!T)
|
|
954
|
+
throw new Error(`State not found: ${n}`);
|
|
955
|
+
T.doc || (T.doc = o), T.type || (T.type = e);
|
|
952
956
|
}
|
|
953
|
-
if (
|
|
954
|
-
const
|
|
955
|
-
if (!
|
|
956
|
-
throw new Error(`State not found: ${
|
|
957
|
-
|
|
957
|
+
if (s && (_.info("Setting state description", n, s), (Array.isArray(s) ? s : [s]).forEach((m) => this.addDescription(n, m.trim()))), c) {
|
|
958
|
+
const T = this.currentDocument.states.get(n);
|
|
959
|
+
if (!T)
|
|
960
|
+
throw new Error(`State not found: ${n}`);
|
|
961
|
+
T.note = c, T.note.text = j.sanitizeText(T.note.text, $());
|
|
958
962
|
}
|
|
959
|
-
h && (
|
|
963
|
+
h && (_.info("Setting state classes", n, h), (Array.isArray(h) ? h : [h]).forEach((m) => this.setCssClass(n, m.trim()))), p && (_.info("Setting state styles", n, p), (Array.isArray(p) ? p : [p]).forEach((m) => this.setStyle(n, m.trim()))), y && (_.info("Setting state styles", n, p), (Array.isArray(y) ? y : [y]).forEach((m) => this.setTextStyle(n, m.trim())));
|
|
960
964
|
}
|
|
961
|
-
clear(
|
|
962
|
-
this.nodes = [], this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.documents = { root:
|
|
965
|
+
clear(t) {
|
|
966
|
+
this.nodes = [], this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Ft(), t || (this.links = /* @__PURE__ */ new Map(), ue());
|
|
963
967
|
}
|
|
964
|
-
getState(
|
|
965
|
-
return this.currentDocument.states.get(
|
|
968
|
+
getState(t) {
|
|
969
|
+
return this.currentDocument.states.get(t);
|
|
966
970
|
}
|
|
967
971
|
getStates() {
|
|
968
972
|
return this.currentDocument.states;
|
|
969
973
|
}
|
|
970
974
|
logDocuments() {
|
|
971
|
-
|
|
975
|
+
_.info("Documents = ", this.documents);
|
|
972
976
|
}
|
|
973
977
|
getRelations() {
|
|
974
978
|
return this.currentDocument.relations;
|
|
@@ -976,8 +980,8 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
976
980
|
/**
|
|
977
981
|
* Adds a clickable link to a state.
|
|
978
982
|
*/
|
|
979
|
-
addLink(
|
|
980
|
-
this.links.set(
|
|
983
|
+
addLink(t, e, o) {
|
|
984
|
+
this.links.set(t, { url: e, tooltip: o }), _.warn("Adding link", t, e, o);
|
|
981
985
|
}
|
|
982
986
|
/**
|
|
983
987
|
* Get all registered links.
|
|
@@ -990,80 +994,79 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
990
994
|
* the start node name and the current start node count.
|
|
991
995
|
* else return the given id
|
|
992
996
|
*/
|
|
993
|
-
startIdIfNeeded(
|
|
994
|
-
return
|
|
997
|
+
startIdIfNeeded(t = "") {
|
|
998
|
+
return t === D.START_NODE ? (this.startEndCount++, `${D.START_TYPE}${this.startEndCount}`) : t;
|
|
995
999
|
}
|
|
996
1000
|
/**
|
|
997
1001
|
* If the id is a start node ( [*] ), then return the start type ('start')
|
|
998
1002
|
* else return the given type
|
|
999
1003
|
*/
|
|
1000
|
-
startTypeIfNeeded(
|
|
1001
|
-
return
|
|
1004
|
+
startTypeIfNeeded(t = "", e = et) {
|
|
1005
|
+
return t === D.START_NODE ? D.START_TYPE : e;
|
|
1002
1006
|
}
|
|
1003
1007
|
/**
|
|
1004
1008
|
* If the id is an end node ( [*] ), then return a new id constructed from
|
|
1005
1009
|
* the end node name and the current start_end node count.
|
|
1006
1010
|
* else return the given id
|
|
1007
1011
|
*/
|
|
1008
|
-
endIdIfNeeded(
|
|
1009
|
-
return
|
|
1012
|
+
endIdIfNeeded(t = "") {
|
|
1013
|
+
return t === D.END_NODE ? (this.startEndCount++, `${D.END_TYPE}${this.startEndCount}`) : t;
|
|
1010
1014
|
}
|
|
1011
1015
|
/**
|
|
1012
1016
|
* If the id is an end node ( [*] ), then return the end type
|
|
1013
1017
|
* else return the given type
|
|
1014
1018
|
*
|
|
1015
1019
|
*/
|
|
1016
|
-
endTypeIfNeeded(
|
|
1017
|
-
return
|
|
1020
|
+
endTypeIfNeeded(t = "", e = et) {
|
|
1021
|
+
return t === D.END_NODE ? D.END_TYPE : e;
|
|
1018
1022
|
}
|
|
1019
|
-
addRelationObjs(
|
|
1020
|
-
const
|
|
1023
|
+
addRelationObjs(t, e, o = "") {
|
|
1024
|
+
const s = this.startIdIfNeeded(t.id.trim()), c = this.startTypeIfNeeded(t.id.trim(), t.type), h = this.startIdIfNeeded(e.id.trim()), p = this.startTypeIfNeeded(e.id.trim(), e.type);
|
|
1021
1025
|
this.addState(
|
|
1022
|
-
|
|
1023
|
-
|
|
1026
|
+
s,
|
|
1027
|
+
c,
|
|
1028
|
+
t.doc,
|
|
1029
|
+
t.description,
|
|
1030
|
+
t.note,
|
|
1031
|
+
t.classes,
|
|
1032
|
+
t.styles,
|
|
1033
|
+
t.textStyles
|
|
1034
|
+
), this.addState(
|
|
1035
|
+
h,
|
|
1036
|
+
p,
|
|
1024
1037
|
e.doc,
|
|
1025
1038
|
e.description,
|
|
1026
1039
|
e.note,
|
|
1027
1040
|
e.classes,
|
|
1028
1041
|
e.styles,
|
|
1029
1042
|
e.textStyles
|
|
1030
|
-
), this.addState(
|
|
1031
|
-
h,
|
|
1032
|
-
p,
|
|
1033
|
-
s.doc,
|
|
1034
|
-
s.description,
|
|
1035
|
-
s.note,
|
|
1036
|
-
s.classes,
|
|
1037
|
-
s.styles,
|
|
1038
|
-
s.textStyles
|
|
1039
1043
|
), this.currentDocument.relations.push({
|
|
1040
|
-
id1:
|
|
1044
|
+
id1: s,
|
|
1041
1045
|
id2: h,
|
|
1042
|
-
relationTitle:
|
|
1046
|
+
relationTitle: j.sanitizeText(o, $())
|
|
1043
1047
|
});
|
|
1044
1048
|
}
|
|
1045
1049
|
/**
|
|
1046
1050
|
* Add a relation between two items. The items may be full objects or just the string id of a state.
|
|
1047
1051
|
*/
|
|
1048
|
-
addRelation(
|
|
1049
|
-
if (typeof
|
|
1050
|
-
this.addRelationObjs(
|
|
1051
|
-
else if (typeof
|
|
1052
|
-
const
|
|
1053
|
-
this.addState(
|
|
1054
|
-
id1:
|
|
1052
|
+
addRelation(t, e, o) {
|
|
1053
|
+
if (typeof t == "object" && typeof e == "object")
|
|
1054
|
+
this.addRelationObjs(t, e, o);
|
|
1055
|
+
else if (typeof t == "string" && typeof e == "string") {
|
|
1056
|
+
const s = this.startIdIfNeeded(t.trim()), c = this.startTypeIfNeeded(t), h = this.endIdIfNeeded(e.trim()), p = this.endTypeIfNeeded(e);
|
|
1057
|
+
this.addState(s, c), this.addState(h, p), this.currentDocument.relations.push({
|
|
1058
|
+
id1: s,
|
|
1055
1059
|
id2: h,
|
|
1056
|
-
relationTitle:
|
|
1060
|
+
relationTitle: o ? j.sanitizeText(o, $()) : void 0
|
|
1057
1061
|
});
|
|
1058
1062
|
}
|
|
1059
1063
|
}
|
|
1060
|
-
addDescription(
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
(o = a == null ? void 0 : a.descriptions) == null || o.push(K.sanitizeText(i, F()));
|
|
1064
|
+
addDescription(t, e) {
|
|
1065
|
+
const o = this.currentDocument.states.get(t), s = e.startsWith(":") ? e.replace(":", "").trim() : e;
|
|
1066
|
+
o?.descriptions?.push(j.sanitizeText(s, $()));
|
|
1064
1067
|
}
|
|
1065
|
-
cleanupLabel(
|
|
1066
|
-
return
|
|
1068
|
+
cleanupLabel(t) {
|
|
1069
|
+
return t.startsWith(":") ? t.slice(2).trim() : t.trim();
|
|
1067
1070
|
}
|
|
1068
1071
|
getDividerId() {
|
|
1069
1072
|
return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
|
|
@@ -1075,32 +1078,31 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
1075
1078
|
* @param id - the id of this (style) class
|
|
1076
1079
|
* @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
|
|
1077
1080
|
*/
|
|
1078
|
-
addStyleClass(
|
|
1079
|
-
this.classes.has(
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1082
|
-
const
|
|
1083
|
-
if (RegExp(
|
|
1084
|
-
const p =
|
|
1085
|
-
|
|
1081
|
+
addStyleClass(t, e = "") {
|
|
1082
|
+
this.classes.has(t) || this.classes.set(t, { id: t, styles: [], textStyles: [] });
|
|
1083
|
+
const o = this.classes.get(t);
|
|
1084
|
+
e && o && e.split(D.STYLECLASS_SEP).forEach((s) => {
|
|
1085
|
+
const c = s.replace(/([^;]*);/, "$1").trim();
|
|
1086
|
+
if (RegExp(D.COLOR_KEYWORD).exec(s)) {
|
|
1087
|
+
const p = c.replace(D.FILL_KEYWORD, D.BG_FILL).replace(D.COLOR_KEYWORD, D.FILL_KEYWORD);
|
|
1088
|
+
o.textStyles.push(p);
|
|
1086
1089
|
}
|
|
1087
|
-
|
|
1090
|
+
o.styles.push(c);
|
|
1088
1091
|
});
|
|
1089
1092
|
}
|
|
1090
1093
|
getClasses() {
|
|
1091
1094
|
return this.classes;
|
|
1092
1095
|
}
|
|
1093
|
-
setupToolTips(
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
const h = Dt(o.currentTarget), p = h.attr("title");
|
|
1096
|
+
setupToolTips(t) {
|
|
1097
|
+
const e = fe();
|
|
1098
|
+
bt(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover", (c) => {
|
|
1099
|
+
const h = bt(c.currentTarget), p = h.attr("title");
|
|
1098
1100
|
if (p === null)
|
|
1099
1101
|
return;
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1102
|
-
}).on("mouseout", (
|
|
1103
|
-
|
|
1102
|
+
const y = c.currentTarget?.getBoundingClientRect();
|
|
1103
|
+
e.transition().duration(200).style("opacity", ".9"), e.style("left", window.scrollX + y.left + (y.right - y.left) / 2 + "px").style("top", window.scrollY + y.bottom + "px"), e.html(de.sanitize(p)), h.classed("hover", !0);
|
|
1104
|
+
}).on("mouseout", (c) => {
|
|
1105
|
+
e.transition().duration(500).style("opacity", 0), bt(c.currentTarget).classed("hover", !1);
|
|
1104
1106
|
});
|
|
1105
1107
|
}
|
|
1106
1108
|
/**
|
|
@@ -1111,15 +1113,14 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
1111
1113
|
* @param itemIds - The id or a list of ids of the item(s) to apply the css class to
|
|
1112
1114
|
* @param cssClassName - CSS class name
|
|
1113
1115
|
*/
|
|
1114
|
-
setCssClass(
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
this.addState(h), i = this.getState(h);
|
|
1116
|
+
setCssClass(t, e) {
|
|
1117
|
+
t.split(",").forEach((o) => {
|
|
1118
|
+
let s = this.getState(o);
|
|
1119
|
+
if (!s) {
|
|
1120
|
+
const c = o.trim();
|
|
1121
|
+
this.addState(c), s = this.getState(c);
|
|
1121
1122
|
}
|
|
1122
|
-
|
|
1123
|
+
s?.classes?.push(e);
|
|
1123
1124
|
});
|
|
1124
1125
|
}
|
|
1125
1126
|
/**
|
|
@@ -1132,9 +1133,8 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
1132
1133
|
* @param itemId - The id of item to apply the style to
|
|
1133
1134
|
* @param styleText - the text of the attributes for the style
|
|
1134
1135
|
*/
|
|
1135
|
-
setStyle(
|
|
1136
|
-
|
|
1137
|
-
(i = (a = this.getState(e)) == null ? void 0 : a.styles) == null || i.push(s);
|
|
1136
|
+
setStyle(t, e) {
|
|
1137
|
+
this.getState(t)?.styles?.push(e);
|
|
1138
1138
|
}
|
|
1139
1139
|
/**
|
|
1140
1140
|
* Add a text style to a state with the given id
|
|
@@ -1142,13 +1142,12 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
1142
1142
|
* @param itemId - The id of item to apply the css class to
|
|
1143
1143
|
* @param cssClassName - CSS class name
|
|
1144
1144
|
*/
|
|
1145
|
-
setTextStyle(
|
|
1146
|
-
|
|
1147
|
-
(i = (a = this.getState(e)) == null ? void 0 : a.textStyles) == null || i.push(s);
|
|
1145
|
+
setTextStyle(t, e) {
|
|
1146
|
+
this.getState(t)?.textStyles?.push(e);
|
|
1148
1147
|
}
|
|
1149
|
-
bindFunctions(
|
|
1150
|
-
this.funs.forEach((
|
|
1151
|
-
|
|
1148
|
+
bindFunctions(t) {
|
|
1149
|
+
this.funs.forEach((e) => {
|
|
1150
|
+
e(t);
|
|
1152
1151
|
});
|
|
1153
1152
|
}
|
|
1154
1153
|
/**
|
|
@@ -1156,38 +1155,32 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
|
|
|
1156
1155
|
* @returns the direction statement if present
|
|
1157
1156
|
*/
|
|
1158
1157
|
getDirectionStatement() {
|
|
1159
|
-
return this.rootDoc.find((
|
|
1158
|
+
return this.rootDoc.find((t) => t.stmt === wt);
|
|
1160
1159
|
}
|
|
1161
1160
|
getDirection() {
|
|
1162
|
-
|
|
1163
|
-
return ((e = this.getDirectionStatement()) == null ? void 0 : e.value) ?? Se;
|
|
1161
|
+
return this.getDirectionStatement()?.value ?? pe;
|
|
1164
1162
|
}
|
|
1165
|
-
setDirection(
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1163
|
+
setDirection(t) {
|
|
1164
|
+
const e = this.getDirectionStatement();
|
|
1165
|
+
e ? e.value = t : this.rootDoc.unshift({ stmt: wt, value: t });
|
|
1168
1166
|
}
|
|
1169
|
-
trimColon(
|
|
1170
|
-
return
|
|
1167
|
+
trimColon(t) {
|
|
1168
|
+
return t.startsWith(":") ? t.slice(1).trim() : t.trim();
|
|
1171
1169
|
}
|
|
1172
1170
|
getData() {
|
|
1173
|
-
const
|
|
1171
|
+
const t = $();
|
|
1174
1172
|
return {
|
|
1175
1173
|
nodes: this.nodes,
|
|
1176
1174
|
edges: this.edges,
|
|
1177
1175
|
other: {},
|
|
1178
|
-
config:
|
|
1179
|
-
direction:
|
|
1176
|
+
config: t,
|
|
1177
|
+
direction: Kt(this.getRootDocV2())
|
|
1180
1178
|
};
|
|
1181
1179
|
}
|
|
1182
1180
|
getConfig() {
|
|
1183
|
-
return
|
|
1181
|
+
return $().state;
|
|
1184
1182
|
}
|
|
1185
|
-
},
|
|
1186
|
-
AGGREGATION: 0,
|
|
1187
|
-
EXTENSION: 1,
|
|
1188
|
-
COMPOSITION: 2,
|
|
1189
|
-
DEPENDENCY: 3
|
|
1190
|
-
}, X), Ye = /* @__PURE__ */ S((t) => `
|
|
1183
|
+
}, Be = /* @__PURE__ */ f((t) => `
|
|
1191
1184
|
defs [id$="-barbEnd"] {
|
|
1192
1185
|
fill: ${t.transitionColor};
|
|
1193
1186
|
stroke: ${t.transitionColor};
|
|
@@ -1412,10 +1405,10 @@ g.stateGroup line {
|
|
|
1412
1405
|
ry: ${t.radius}px;
|
|
1413
1406
|
filter: ${t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${t.svgId}-drop-shadow)`) : "none"}
|
|
1414
1407
|
}
|
|
1415
|
-
`, "getStyles"),
|
|
1408
|
+
`, "getStyles"), He = Be;
|
|
1416
1409
|
export {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1410
|
+
je as S,
|
|
1411
|
+
Ue as a,
|
|
1412
|
+
We as b,
|
|
1413
|
+
He as s
|
|
1421
1414
|
};
|