@ashwin_droid/notion-stream 1.0.0 → 1.0.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/{_baseUniq-DSwfPiGC.js → _baseUniq-CWfjzMhC.js} +1 -1
- package/dist/{_baseUniq-CT-tc-CG.mjs → _baseUniq-Db9ouzA-.mjs} +51 -51
- package/dist/{arc-DmoYXidQ.mjs → arc-CHlsWOEE.mjs} +1 -1
- package/dist/{arc-BBnIBs2j.js → arc-DxDH4CNq.js} +1 -1
- package/dist/{architecture-U656AL7Q-CMPtJMZ-.mjs → architecture-U656AL7Q-DpmenltQ.mjs} +1 -1
- package/dist/{architecture-U656AL7Q-C0ZB2O9M.js → architecture-U656AL7Q-DqUhwOXk.js} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-BYzpbF40.mjs → architectureDiagram-VXUJARFQ-C2hauZCK.mjs} +1846 -1850
- package/dist/architectureDiagram-VXUJARFQ-LwDhoqXa.js +36 -0
- package/dist/blockDiagram-VD42YOAC-Cws7af6P.js +122 -0
- package/dist/{blockDiagram-VD42YOAC-DPVTCHn5.mjs → blockDiagram-VD42YOAC-yWS4_TxE.mjs} +913 -922
- package/dist/c4Diagram-YG6GDRKO-DLoBqiir.js +10 -0
- package/dist/{c4Diagram-YG6GDRKO-C2Y4q08p.mjs → c4Diagram-YG6GDRKO-K4ShvkML.mjs} +169 -170
- package/dist/channel-BqjR_aPb.js +1 -0
- package/dist/{channel-DVpqhnow.mjs → channel-_5jzmP-I.mjs} +1 -1
- package/dist/chunk-4BX2VUAB-6hr5PCkV.js +1 -0
- package/dist/chunk-4BX2VUAB-DBTu5W6L.mjs +8 -0
- package/dist/{chunk-55IACEB6-P_FVKIbW.js → chunk-55IACEB6-BLs0Xswy.js} +1 -1
- package/dist/{chunk-55IACEB6-Du1Simcj.mjs → chunk-55IACEB6-_brNODlK.mjs} +1 -1
- package/dist/chunk-B4BG7PRW-6HdbiUFA.js +165 -0
- package/dist/{chunk-B4BG7PRW-BUKsa2yH.mjs → chunk-B4BG7PRW-CWohxZt0.mjs} +251 -252
- package/dist/chunk-DI55MBZ5-DehdsbpI.js +220 -0
- package/dist/{chunk-DI55MBZ5-C9h0qLVI.mjs → chunk-DI55MBZ5-db62NlMD.mjs} +444 -456
- package/dist/{chunk-FMBD7UC4-48-zdz-1.js → chunk-FMBD7UC4-B2j81cAo.js} +1 -1
- package/dist/{chunk-FMBD7UC4-C08-zA06.mjs → chunk-FMBD7UC4-BegOwXuP.mjs} +1 -1
- package/dist/chunk-QN33PNHL-CJ1oa0p-.js +1 -0
- package/dist/chunk-QN33PNHL-CpBQYWWf.mjs +19 -0
- package/dist/{chunk-QZHKN3VN-DbO6TJSK.mjs → chunk-QZHKN3VN-BG9vC9tQ.mjs} +1 -1
- package/dist/{chunk-QZHKN3VN-Dy2264ui.js → chunk-QZHKN3VN-DV3-w0rK.js} +1 -1
- package/dist/{chunk-TZMSLE5B-BPmI9i6R.mjs → chunk-TZMSLE5B-D3cmOS_D.mjs} +20 -20
- package/dist/{chunk-TZMSLE5B-COENnLAZ.js → chunk-TZMSLE5B-DtKjE4RE.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-mzvV1Ifg.mjs → classDiagram-2ON5EDUG-DAL3V7Dx.mjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CFFwYK87.js → classDiagram-2ON5EDUG-uOMmrtgR.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-mzvV1Ifg.mjs → classDiagram-v2-WZHVMYZB-DAL3V7Dx.mjs} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-CFFwYK87.js → classDiagram-v2-WZHVMYZB-uOMmrtgR.js} +1 -1
- package/dist/{clone-KtLCwiKH.mjs → clone-BiSDKkgs.mjs} +1 -1
- package/dist/clone-Bl9s3LR9.js +1 -0
- package/dist/{code-block-37QAKDTI-sxlq94xm.js → code-block-37QAKDTI-BILtfzQC.js} +1 -1
- package/dist/{code-block-37QAKDTI-CmykMxjQ.mjs → code-block-37QAKDTI-MauA-22z.mjs} +1 -1
- package/dist/cose-bilkent-S5V4N54A-CPJoKUiO.js +1 -0
- package/dist/{cose-bilkent-S5V4N54A-BXcldnso.mjs → cose-bilkent-S5V4N54A-rUEUYQdF.mjs} +592 -589
- package/dist/cytoscape.esm-CNUX3VTg.js +321 -0
- package/dist/{cytoscape.esm-ZmItrg9y.mjs → cytoscape.esm-Cvf3sx9F.mjs} +56 -83
- package/dist/dagre-6UL2VRFP-b0VfOp5y.mjs +443 -0
- package/dist/dagre-6UL2VRFP-r_ADTb0O.js +4 -0
- package/dist/diagram-PSM6KHXK-CuHqLGUt.js +24 -0
- package/dist/{diagram-PSM6KHXK-DIV3jw9d.mjs → diagram-PSM6KHXK-ax3IfFcX.mjs} +45 -48
- package/dist/diagram-QEK2KX5R-B5Lo9E-s.js +43 -0
- package/dist/{diagram-QEK2KX5R-Q0M2_YtR.mjs → diagram-QEK2KX5R-Dn47K2He.mjs} +10 -14
- package/dist/diagram-S2PKOQOG-B0W-tWPV.js +24 -0
- package/dist/{diagram-S2PKOQOG-_WGA6s2-.mjs → diagram-S2PKOQOG-C5jPENyu.mjs} +22 -23
- package/dist/{erDiagram-Q2GNP2WA-CW0D_QGb.mjs → erDiagram-Q2GNP2WA-XP6-Fsuy.mjs} +77 -78
- package/dist/erDiagram-Q2GNP2WA-k7niLq9H.js +60 -0
- package/dist/flowDiagram-NV44I4VS-BAdaW0zG.js +162 -0
- package/dist/{flowDiagram-NV44I4VS-DVQ8Ntc4.mjs → flowDiagram-NV44I4VS-DzHvKZ3e.mjs} +442 -449
- package/dist/{ganttDiagram-JELNMOA3-Bk-dX6qT.mjs → ganttDiagram-JELNMOA3-BRenKPXr.mjs} +1049 -1041
- package/dist/ganttDiagram-JELNMOA3-CddDOxeO.js +267 -0
- package/dist/{gitGraph-F6HP7TQM-DvIgo2TM.js → gitGraph-F6HP7TQM-BLshE7A8.js} +1 -1
- package/dist/{gitGraph-F6HP7TQM-CsdwxYUE.mjs → gitGraph-F6HP7TQM-Dq8gDI5R.mjs} +1 -1
- package/dist/gitGraphDiagram-NY62KEGX-B-rSecLz.mjs +699 -0
- package/dist/gitGraphDiagram-NY62KEGX-C980oVrU.js +65 -0
- package/dist/{graph-BNpx6ebg.js → graph-BlL96kLy.js} +1 -1
- package/dist/{graph-C_T4ZBuC.mjs → graph-DxtCPktv.mjs} +8 -8
- package/dist/index-DIQbvlIr.js +670 -0
- package/dist/{index-oe4HpmeG.mjs → index-yf1-93v5.mjs} +22534 -22642
- package/dist/index.js +1 -1
- package/dist/index.mjs +3 -3
- package/dist/info-NVLQJR56-BQNoY6_p.mjs +5 -0
- package/dist/{info-NVLQJR56-BwFQRguW.js → info-NVLQJR56-Bls_Dqxs.js} +1 -1
- package/dist/{infoDiagram-WHAUD3N6-CCb5k_S7.js → infoDiagram-WHAUD3N6-DwsUlSxN.js} +1 -1
- package/dist/{infoDiagram-WHAUD3N6-C-gzsm95.mjs → infoDiagram-WHAUD3N6-FnUO4LNo.mjs} +2 -2
- package/dist/journeyDiagram-XKPGCS4Q-7k1g8rPF.js +139 -0
- package/dist/{journeyDiagram-XKPGCS4Q-DzkUL_YG.mjs → journeyDiagram-XKPGCS4Q-Bvn5lhxn.mjs} +24 -26
- package/dist/kanban-definition-3W4ZIXB7-Cqf7XpzW.js +89 -0
- package/dist/kanban-definition-3W4ZIXB7-D29d9Rl2.mjs +719 -0
- package/dist/{layout-CuWQnP5Y.js → layout-B_kkbzwQ.js} +1 -1
- package/dist/{layout-Cd98WJ7r.mjs → layout-BlUfzTib.mjs} +22 -22
- package/dist/{linear-SU4e8MRt.mjs → linear-CC_oUBkf.mjs} +20 -20
- package/dist/{linear-DFDw13y6.js → linear-DF2d9TVq.js} +1 -1
- package/dist/{mermaid-4DMBBIKO-BihEtyib.js → mermaid-4DMBBIKO-2ufyMRt4.js} +1 -1
- package/dist/mermaid-4DMBBIKO-BizANXE3.mjs +4 -0
- package/dist/{mermaid-parser.core-C8Sxzqul.mjs → mermaid-parser.core-CkXMNpV7.mjs} +3404 -3369
- package/dist/mermaid-parser.core-DQkQZAvG.js +128 -0
- package/dist/{min-CppMRDFn.js → min-I7eFb2cg.js} +1 -1
- package/dist/{min-C2k771MZ.mjs → min-VPOHWCTf.mjs} +2 -2
- package/dist/{mindmap-definition-VGOIOE7T-BUd354uH.mjs → mindmap-definition-VGOIOE7T-CawQ5XYo.mjs} +170 -172
- package/dist/mindmap-definition-VGOIOE7T-d8uGKtHO.js +68 -0
- package/dist/{ordinal-C0oynhte.mjs → ordinal-B-KqvkJf.mjs} +1 -1
- package/dist/{packet-BFZMPI3H-Cz_A86d3.mjs → packet-BFZMPI3H-BbdhMsyD.mjs} +1 -1
- package/dist/{packet-BFZMPI3H-CFx3kSkL.js → packet-BFZMPI3H-CiqPNXx_.js} +1 -1
- package/dist/{pie-7BOR55EZ-_1MqisBd.js → pie-7BOR55EZ-BfYvvrxF.js} +1 -1
- package/dist/pie-7BOR55EZ-CkKpjIfF.mjs +5 -0
- package/dist/{pieDiagram-ADFJNKIX-Bg0_gu43.js → pieDiagram-ADFJNKIX-BlNrJLdh.js} +2 -2
- package/dist/{pieDiagram-ADFJNKIX-lRs_rpwI.mjs → pieDiagram-ADFJNKIX-TQppVIgS.mjs} +21 -21
- package/dist/{quadrantDiagram-AYHSOK5B-D9kypJt6.mjs → quadrantDiagram-AYHSOK5B-CysN5Kyu.mjs} +230 -232
- package/dist/quadrantDiagram-AYHSOK5B-fy7-bMNk.js +7 -0
- package/dist/{radar-NHE76QYJ-CdtC4C8F.js → radar-NHE76QYJ-BjbmLxde.js} +1 -1
- package/dist/{radar-NHE76QYJ-B-PvZD0K.mjs → radar-NHE76QYJ-BlbyKqWL.mjs} +1 -1
- package/dist/requirementDiagram-UZGBJVZJ-CGgt75Rl.js +64 -0
- package/dist/{requirementDiagram-UZGBJVZJ-B5ulaHjE.mjs → requirementDiagram-UZGBJVZJ-CfMcIbMc.mjs} +190 -192
- package/dist/{sankeyDiagram-TZEHDZUN-DprIPFbe.mjs → sankeyDiagram-TZEHDZUN-aFz48-W2.mjs} +189 -189
- package/dist/sankeyDiagram-TZEHDZUN-q-r70ybp.js +10 -0
- package/dist/{sequenceDiagram-WL72ISMW-B4m4oag0.mjs → sequenceDiagram-WL72ISMW-B9w1iL31.mjs} +222 -229
- package/dist/sequenceDiagram-WL72ISMW-nlFlEmNQ.js +145 -0
- package/dist/{stateDiagram-FKZM4ZOC-BD4tnS-V.js → stateDiagram-FKZM4ZOC-C9DXFs3P.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-DjkdDbQ2.mjs → stateDiagram-FKZM4ZOC-e4SGJ8oh.mjs} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-sybMoxOk.js → stateDiagram-v2-4FDKWEC3-FoEBCoPy.js} +1 -1
- package/dist/{stateDiagram-v2-4FDKWEC3-AK86F3i6.mjs → stateDiagram-v2-4FDKWEC3-QUPk_c9P.mjs} +2 -2
- package/dist/timeline-definition-IT6M3QCI-BqUt3ka4.js +61 -0
- package/dist/{timeline-definition-IT6M3QCI-BFuQEeZP.mjs → timeline-definition-IT6M3QCI-Br9KrJcU.mjs} +217 -223
- package/dist/{treemap-KMMF4GRG-DTnRa789.js → treemap-KMMF4GRG-DTii969M.js} +1 -1
- package/dist/{treemap-KMMF4GRG-gtrnY16v.mjs → treemap-KMMF4GRG-DVxjgEhu.mjs} +1 -1
- package/dist/xychartDiagram-PRI3JC2R-Bi02nVw4.js +7 -0
- package/dist/{xychartDiagram-PRI3JC2R-CjXiy6m0.mjs → xychartDiagram-PRI3JC2R-BygtBGgX.mjs} +7 -7
- package/package.json +4 -4
- package/dist/architectureDiagram-VXUJARFQ-BPQoZmaM.js +0 -36
- package/dist/blockDiagram-VD42YOAC-Z3Fc3Bew.js +0 -122
- package/dist/c4Diagram-YG6GDRKO-LzDuCZ2V.js +0 -10
- package/dist/channel-6dUO0MQi.js +0 -1
- package/dist/chunk-4BX2VUAB-BwubFldI.js +0 -1
- package/dist/chunk-4BX2VUAB-DldMXCTt.mjs +0 -9
- package/dist/chunk-B4BG7PRW-CKX0VJ-S.js +0 -165
- package/dist/chunk-DI55MBZ5-CMq-O8k2.js +0 -220
- package/dist/chunk-QN33PNHL-B0sO38bZ.js +0 -1
- package/dist/chunk-QN33PNHL-B_PGnTkk.mjs +0 -20
- package/dist/clone-B0UaPT2Z.js +0 -1
- package/dist/cose-bilkent-S5V4N54A-BCaAPmuF.js +0 -1
- package/dist/cytoscape.esm-DkGgpG6d.js +0 -331
- package/dist/dagre-6UL2VRFP-By42zbLA.mjs +0 -446
- package/dist/dagre-6UL2VRFP-DCwfkcWi.js +0 -4
- package/dist/diagram-PSM6KHXK-hjXN9n1N.js +0 -24
- package/dist/diagram-QEK2KX5R-B04ODMim.js +0 -43
- package/dist/diagram-S2PKOQOG-BmCs4MZE.js +0 -24
- package/dist/erDiagram-Q2GNP2WA-4KtQUUuI.js +0 -60
- package/dist/flowDiagram-NV44I4VS-BwpfJE0U.js +0 -162
- package/dist/ganttDiagram-JELNMOA3-D7rI7u8B.js +0 -267
- package/dist/gitGraphDiagram-NY62KEGX-BDTsbSkO.mjs +0 -712
- package/dist/gitGraphDiagram-NY62KEGX-IQ8KriUw.js +0 -65
- package/dist/index-CkYZRBYn.js +0 -676
- package/dist/info-NVLQJR56-B5gDnSIT.mjs +0 -5
- package/dist/journeyDiagram-XKPGCS4Q-POnSekz9.js +0 -139
- package/dist/kanban-definition-3W4ZIXB7-BPr0_7wG.mjs +0 -720
- package/dist/kanban-definition-3W4ZIXB7-Bm064qrf.js +0 -89
- package/dist/mermaid-4DMBBIKO-DDxvQcE9.mjs +0 -4
- package/dist/mermaid-parser.core-BHAgLMGa.js +0 -128
- package/dist/mindmap-definition-VGOIOE7T-CV7bD4HY.js +0 -68
- package/dist/pie-7BOR55EZ-B0-atE_o.mjs +0 -5
- package/dist/quadrantDiagram-AYHSOK5B-B4gVakRV.js +0 -7
- package/dist/requirementDiagram-UZGBJVZJ-0zMPj-SD.js +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-Cl8-L83T.js +0 -10
- package/dist/sequenceDiagram-WL72ISMW-DRQn7Fe4.js +0 -145
- package/dist/timeline-definition-IT6M3QCI-2X4dfyLj.js +0 -61
- package/dist/xychartDiagram-PRI3JC2R-BaFd1In8.js +0 -7
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { g as te } from "./chunk-55IACEB6-
|
|
2
|
-
import { s as ee } from "./chunk-QN33PNHL-
|
|
3
|
-
import { _ as
|
|
4
|
-
var vt = function() {
|
|
5
|
-
var
|
|
6
|
-
for (
|
|
7
|
-
return
|
|
8
|
-
}, "o"),
|
|
9
|
-
trace: /* @__PURE__ */
|
|
1
|
+
import { g as te } from "./chunk-55IACEB6-_brNODlK.mjs";
|
|
2
|
+
import { s as ee } from "./chunk-QN33PNHL-CpBQYWWf.mjs";
|
|
3
|
+
import { _ as u, l as b, f as w, v as se, x as ie, d as re, e as ae, g as ne, s as oe, y as le, z as ce, ag as he, o as U, D as ue } from "./index-yf1-93v5.mjs";
|
|
4
|
+
var vt = (function() {
|
|
5
|
+
var t = /* @__PURE__ */ u(function(Y, o, c, n) {
|
|
6
|
+
for (c = c || {}, n = Y.length; n--; c[Y[n]] = o) ;
|
|
7
|
+
return c;
|
|
8
|
+
}, "o"), e = [1, 2], s = [1, 3], a = [1, 4], r = [2, 4], h = [1, 9], d = [1, 11], S = [1, 16], f = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], A = [1, 20], v = [1, 21], p = [1, 22], k = [1, 23], R = [1, 24], L = [1, 26], $ = [1, 27], I = [1, 28], P = [1, 29], st = [1, 30], it = [1, 31], rt = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], H = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
|
|
9
|
+
trace: /* @__PURE__ */ u(function() {
|
|
10
10
|
}, "trace"),
|
|
11
11
|
yy: {},
|
|
12
12
|
symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
|
|
13
13
|
terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
|
|
14
14
|
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
|
|
15
|
-
performAction: /* @__PURE__ */
|
|
16
|
-
var
|
|
15
|
+
performAction: /* @__PURE__ */ u(function(o, c, n, g, E, i, J) {
|
|
16
|
+
var l = i.length - 1;
|
|
17
17
|
switch (E) {
|
|
18
18
|
case 3:
|
|
19
|
-
return g.setRootDoc(
|
|
19
|
+
return g.setRootDoc(i[l]), i[l];
|
|
20
20
|
case 4:
|
|
21
21
|
this.$ = [];
|
|
22
22
|
break;
|
|
23
23
|
case 5:
|
|
24
|
-
|
|
24
|
+
i[l] != "nl" && (i[l - 1].push(i[l]), this.$ = i[l - 1]);
|
|
25
25
|
break;
|
|
26
26
|
case 6:
|
|
27
27
|
case 7:
|
|
28
|
-
this.$ =
|
|
28
|
+
this.$ = i[l];
|
|
29
29
|
break;
|
|
30
30
|
case 8:
|
|
31
31
|
this.$ = "nl";
|
|
32
32
|
break;
|
|
33
33
|
case 12:
|
|
34
|
-
this.$ =
|
|
34
|
+
this.$ = i[l];
|
|
35
35
|
break;
|
|
36
36
|
case 13:
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const q = i[l - 1];
|
|
38
|
+
q.description = g.trimColon(i[l]), this.$ = q;
|
|
39
39
|
break;
|
|
40
40
|
case 14:
|
|
41
|
-
this.$ = { stmt: "relation", state1:
|
|
41
|
+
this.$ = { stmt: "relation", state1: i[l - 2], state2: i[l] };
|
|
42
42
|
break;
|
|
43
43
|
case 15:
|
|
44
|
-
const Tt = g.trimColon(
|
|
45
|
-
this.$ = { stmt: "relation", state1:
|
|
44
|
+
const Tt = g.trimColon(i[l]);
|
|
45
|
+
this.$ = { stmt: "relation", state1: i[l - 3], state2: i[l - 1], description: Tt };
|
|
46
46
|
break;
|
|
47
47
|
case 19:
|
|
48
|
-
this.$ = { stmt: "state", id:
|
|
48
|
+
this.$ = { stmt: "state", id: i[l - 3], type: "default", description: "", doc: i[l - 1] };
|
|
49
49
|
break;
|
|
50
50
|
case 20:
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
53
|
-
var ut =
|
|
54
|
-
|
|
51
|
+
var B = i[l], z = i[l - 2].trim();
|
|
52
|
+
if (i[l].match(":")) {
|
|
53
|
+
var ut = i[l].split(":");
|
|
54
|
+
B = ut[0], z = [z, ut[1]];
|
|
55
55
|
}
|
|
56
|
-
this.$ = { stmt: "state", id:
|
|
56
|
+
this.$ = { stmt: "state", id: B, type: "default", description: z };
|
|
57
57
|
break;
|
|
58
58
|
case 21:
|
|
59
|
-
this.$ = { stmt: "state", id:
|
|
59
|
+
this.$ = { stmt: "state", id: i[l - 3], type: "default", description: i[l - 5], doc: i[l - 1] };
|
|
60
60
|
break;
|
|
61
61
|
case 22:
|
|
62
|
-
this.$ = { stmt: "state", id:
|
|
62
|
+
this.$ = { stmt: "state", id: i[l], type: "fork" };
|
|
63
63
|
break;
|
|
64
64
|
case 23:
|
|
65
|
-
this.$ = { stmt: "state", id:
|
|
65
|
+
this.$ = { stmt: "state", id: i[l], type: "join" };
|
|
66
66
|
break;
|
|
67
67
|
case 24:
|
|
68
|
-
this.$ = { stmt: "state", id:
|
|
68
|
+
this.$ = { stmt: "state", id: i[l], type: "choice" };
|
|
69
69
|
break;
|
|
70
70
|
case 25:
|
|
71
71
|
this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
|
|
72
72
|
break;
|
|
73
73
|
case 26:
|
|
74
|
-
this.$ = { stmt: "state", id:
|
|
74
|
+
this.$ = { stmt: "state", id: i[l - 1].trim(), note: { position: i[l - 2].trim(), text: i[l].trim() } };
|
|
75
75
|
break;
|
|
76
76
|
case 29:
|
|
77
|
-
this.$ =
|
|
77
|
+
this.$ = i[l].trim(), g.setAccTitle(this.$);
|
|
78
78
|
break;
|
|
79
79
|
case 30:
|
|
80
80
|
case 31:
|
|
81
|
-
this.$ =
|
|
81
|
+
this.$ = i[l].trim(), g.setAccDescription(this.$);
|
|
82
82
|
break;
|
|
83
83
|
case 32:
|
|
84
84
|
this.$ = {
|
|
85
85
|
stmt: "click",
|
|
86
|
-
id:
|
|
87
|
-
url:
|
|
88
|
-
tooltip:
|
|
86
|
+
id: i[l - 3],
|
|
87
|
+
url: i[l - 2],
|
|
88
|
+
tooltip: i[l - 1]
|
|
89
89
|
};
|
|
90
90
|
break;
|
|
91
91
|
case 33:
|
|
92
92
|
this.$ = {
|
|
93
93
|
stmt: "click",
|
|
94
|
-
id:
|
|
95
|
-
url:
|
|
94
|
+
id: i[l - 3],
|
|
95
|
+
url: i[l - 1],
|
|
96
96
|
tooltip: ""
|
|
97
97
|
};
|
|
98
98
|
break;
|
|
99
99
|
case 34:
|
|
100
100
|
case 35:
|
|
101
|
-
this.$ = { stmt: "classDef", id:
|
|
101
|
+
this.$ = { stmt: "classDef", id: i[l - 1].trim(), classes: i[l].trim() };
|
|
102
102
|
break;
|
|
103
103
|
case 36:
|
|
104
|
-
this.$ = { stmt: "style", id:
|
|
104
|
+
this.$ = { stmt: "style", id: i[l - 1].trim(), styleClass: i[l].trim() };
|
|
105
105
|
break;
|
|
106
106
|
case 37:
|
|
107
|
-
this.$ = { stmt: "applyClass", id:
|
|
107
|
+
this.$ = { stmt: "applyClass", id: i[l - 1].trim(), styleClass: i[l].trim() };
|
|
108
108
|
break;
|
|
109
109
|
case 38:
|
|
110
110
|
g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
|
|
@@ -120,86 +120,86 @@ var vt = function() {
|
|
|
120
120
|
break;
|
|
121
121
|
case 44:
|
|
122
122
|
case 45:
|
|
123
|
-
this.$ = { stmt: "state", id:
|
|
123
|
+
this.$ = { stmt: "state", id: i[l].trim(), type: "default", description: "" };
|
|
124
124
|
break;
|
|
125
125
|
case 46:
|
|
126
|
-
this.$ = { stmt: "state", id:
|
|
126
|
+
this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
|
|
127
127
|
break;
|
|
128
128
|
case 47:
|
|
129
|
-
this.$ = { stmt: "state", id:
|
|
129
|
+
this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
|
|
130
130
|
break;
|
|
131
131
|
}
|
|
132
132
|
}, "anonymous"),
|
|
133
|
-
table: [{ 3: 1, 4:
|
|
133
|
+
table: [{ 3: 1, 4: e, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: s, 6: a }, { 3: 6, 4: e, 5: s, 6: a }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], r, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 9]), t(y, [2, 10]), t(y, [2, 11]), t(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(y, [2, 16]), { 18: [1, 42] }, t(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(y, [2, 22]), t(y, [2, 23]), t(y, [2, 24]), t(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(y, [2, 31]), { 13: 51, 24: m, 57: H }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(ct, [2, 44], { 58: [1, 56] }), t(ct, [2, 45], { 58: [1, 57] }), t(y, [2, 38]), t(y, [2, 39]), t(y, [2, 40]), t(y, [2, 41]), t(y, [2, 6]), t(y, [2, 13]), { 13: 58, 24: m, 57: H }, t(y, [2, 17]), t(xt, r, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(y, [2, 29]), t(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(y, [2, 14], { 14: [1, 71] }), { 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 21: [1, 72], 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), t(ct, [2, 46]), t(ct, [2, 47]), t(y, [2, 15]), t(y, [2, 19]), t(xt, r, { 7: 78 }), t(y, [2, 26]), t(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 21: [1, 81], 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 32]), t(y, [2, 33]), t(y, [2, 21])],
|
|
134
134
|
defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
|
|
135
|
-
parseError: /* @__PURE__ */
|
|
136
|
-
if (
|
|
135
|
+
parseError: /* @__PURE__ */ u(function(o, c) {
|
|
136
|
+
if (c.recoverable)
|
|
137
137
|
this.trace(o);
|
|
138
138
|
else {
|
|
139
139
|
var n = new Error(o);
|
|
140
|
-
throw n.hash =
|
|
140
|
+
throw n.hash = c, n;
|
|
141
141
|
}
|
|
142
142
|
}, "parseError"),
|
|
143
|
-
parse: /* @__PURE__ */
|
|
144
|
-
var
|
|
143
|
+
parse: /* @__PURE__ */ u(function(o) {
|
|
144
|
+
var c = this, n = [0], g = [], E = [null], i = [], J = this.table, l = "", B = 0, z = 0, ut = 2, q = 1, Tt = i.slice.call(arguments, 1), D = Object.create(this.lexer), V = { yy: {} };
|
|
145
145
|
for (var Et in this.yy)
|
|
146
|
-
Object.prototype.hasOwnProperty.call(this.yy, Et) && (
|
|
147
|
-
|
|
148
|
-
var _t =
|
|
149
|
-
|
|
150
|
-
var Qt =
|
|
151
|
-
typeof
|
|
146
|
+
Object.prototype.hasOwnProperty.call(this.yy, Et) && (V.yy[Et] = this.yy[Et]);
|
|
147
|
+
D.setInput(o, V.yy), V.yy.lexer = D, V.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
|
|
148
|
+
var _t = D.yylloc;
|
|
149
|
+
i.push(_t);
|
|
150
|
+
var Qt = D.options && D.options.ranges;
|
|
151
|
+
typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
152
152
|
function Zt(O) {
|
|
153
|
-
n.length = n.length - 2 * O, E.length = E.length - O,
|
|
153
|
+
n.length = n.length - 2 * O, E.length = E.length - O, i.length = i.length - O;
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
u(Zt, "popStack");
|
|
156
156
|
function Lt() {
|
|
157
157
|
var O;
|
|
158
|
-
return O = g.pop() ||
|
|
158
|
+
return O = g.pop() || D.lex() || q, typeof O != "number" && (O instanceof Array && (g = O, O = g.pop()), O = c.symbols_[O] || O), O;
|
|
159
159
|
}
|
|
160
|
-
|
|
161
|
-
for (var
|
|
162
|
-
if (
|
|
163
|
-
var
|
|
160
|
+
u(Lt, "lex");
|
|
161
|
+
for (var x, M, N, mt, W = {}, dt, F, It, ft; ; ) {
|
|
162
|
+
if (M = n[n.length - 1], this.defaultActions[M] ? N = this.defaultActions[M] : ((x === null || typeof x > "u") && (x = Lt()), N = J[M] && J[M][x]), typeof N > "u" || !N.length || !N[0]) {
|
|
163
|
+
var bt = "";
|
|
164
164
|
ft = [];
|
|
165
|
-
for (dt in
|
|
165
|
+
for (dt in J[M])
|
|
166
166
|
this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
|
|
167
|
-
|
|
168
|
-
` +
|
|
169
|
-
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[
|
|
170
|
-
text:
|
|
171
|
-
token: this.terminals_[
|
|
172
|
-
line:
|
|
167
|
+
D.showPosition ? bt = "Parse error on line " + (B + 1) + `:
|
|
168
|
+
` + D.showPosition() + `
|
|
169
|
+
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : bt = "Parse error on line " + (B + 1) + ": Unexpected " + (x == q ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(bt, {
|
|
170
|
+
text: D.match,
|
|
171
|
+
token: this.terminals_[x] || x,
|
|
172
|
+
line: D.yylineno,
|
|
173
173
|
loc: _t,
|
|
174
174
|
expected: ft
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
if (
|
|
178
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
179
|
-
switch (
|
|
177
|
+
if (N[0] instanceof Array && N.length > 1)
|
|
178
|
+
throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + x);
|
|
179
|
+
switch (N[0]) {
|
|
180
180
|
case 1:
|
|
181
|
-
n.push(
|
|
181
|
+
n.push(x), E.push(D.yytext), i.push(D.yylloc), n.push(N[1]), x = null, z = D.yyleng, l = D.yytext, B = D.yylineno, _t = D.yylloc;
|
|
182
182
|
break;
|
|
183
183
|
case 2:
|
|
184
|
-
if (
|
|
185
|
-
first_line:
|
|
186
|
-
last_line:
|
|
187
|
-
first_column:
|
|
188
|
-
last_column:
|
|
189
|
-
}, Qt && (
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
]), mt = this.performAction.apply(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
184
|
+
if (F = this.productions_[N[1]][1], W.$ = E[E.length - F], W._$ = {
|
|
185
|
+
first_line: i[i.length - (F || 1)].first_line,
|
|
186
|
+
last_line: i[i.length - 1].last_line,
|
|
187
|
+
first_column: i[i.length - (F || 1)].first_column,
|
|
188
|
+
last_column: i[i.length - 1].last_column
|
|
189
|
+
}, Qt && (W._$.range = [
|
|
190
|
+
i[i.length - (F || 1)].range[0],
|
|
191
|
+
i[i.length - 1].range[1]
|
|
192
|
+
]), mt = this.performAction.apply(W, [
|
|
193
|
+
l,
|
|
194
|
+
z,
|
|
195
|
+
B,
|
|
196
|
+
V.yy,
|
|
197
|
+
N[1],
|
|
198
198
|
E,
|
|
199
|
-
|
|
199
|
+
i
|
|
200
200
|
].concat(Tt)), typeof mt < "u")
|
|
201
201
|
return mt;
|
|
202
|
-
|
|
202
|
+
F && (n = n.slice(0, -1 * F * 2), E = E.slice(0, -1 * F), i = i.slice(0, -1 * F)), n.push(this.productions_[N[1]][0]), E.push(W.$), i.push(W._$), It = J[n[n.length - 2]][n[n.length - 1]], n.push(It);
|
|
203
203
|
break;
|
|
204
204
|
case 3:
|
|
205
205
|
return !0;
|
|
@@ -207,18 +207,18 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
207
207
|
}
|
|
208
208
|
return !0;
|
|
209
209
|
}, "parse")
|
|
210
|
-
}, qt = /* @__PURE__ */ function() {
|
|
211
|
-
var
|
|
210
|
+
}, qt = /* @__PURE__ */ (function() {
|
|
211
|
+
var Y = {
|
|
212
212
|
EOF: 1,
|
|
213
|
-
parseError: /* @__PURE__ */
|
|
213
|
+
parseError: /* @__PURE__ */ u(function(c, n) {
|
|
214
214
|
if (this.yy.parser)
|
|
215
|
-
this.yy.parser.parseError(
|
|
215
|
+
this.yy.parser.parseError(c, n);
|
|
216
216
|
else
|
|
217
|
-
throw new Error(
|
|
217
|
+
throw new Error(c);
|
|
218
218
|
}, "parseError"),
|
|
219
219
|
// resets the lexer, sets new input
|
|
220
|
-
setInput: /* @__PURE__ */
|
|
221
|
-
return this.yy =
|
|
220
|
+
setInput: /* @__PURE__ */ u(function(o, c) {
|
|
221
|
+
return this.yy = c || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
222
222
|
first_line: 1,
|
|
223
223
|
first_column: 0,
|
|
224
224
|
last_line: 1,
|
|
@@ -226,16 +226,16 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
226
226
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
227
227
|
}, "setInput"),
|
|
228
228
|
// consumes and returns one char from the input
|
|
229
|
-
input: /* @__PURE__ */
|
|
229
|
+
input: /* @__PURE__ */ u(function() {
|
|
230
230
|
var o = this._input[0];
|
|
231
231
|
this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
|
|
232
|
-
var
|
|
233
|
-
return
|
|
232
|
+
var c = o.match(/(?:\r\n?|\n).*/g);
|
|
233
|
+
return c ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
|
|
234
234
|
}, "input"),
|
|
235
235
|
// unshifts one char (or a string) into the input
|
|
236
|
-
unput: /* @__PURE__ */
|
|
237
|
-
var
|
|
238
|
-
this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length -
|
|
236
|
+
unput: /* @__PURE__ */ u(function(o) {
|
|
237
|
+
var c = o.length, n = o.split(/(?:\r\n?|\n)/g);
|
|
238
|
+
this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - c), this.offset -= c;
|
|
239
239
|
var g = this.match.split(/(?:\r\n?|\n)/g);
|
|
240
240
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
241
241
|
var E = this.yylloc.range;
|
|
@@ -243,15 +243,15 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
243
243
|
first_line: this.yylloc.first_line,
|
|
244
244
|
last_line: this.yylineno + 1,
|
|
245
245
|
first_column: this.yylloc.first_column,
|
|
246
|
-
last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column -
|
|
247
|
-
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng -
|
|
246
|
+
last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - c
|
|
247
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - c]), this.yyleng = this.yytext.length, this;
|
|
248
248
|
}, "unput"),
|
|
249
249
|
// When called from action, caches matched text and appends it on next action
|
|
250
|
-
more: /* @__PURE__ */
|
|
250
|
+
more: /* @__PURE__ */ u(function() {
|
|
251
251
|
return this._more = !0, this;
|
|
252
252
|
}, "more"),
|
|
253
253
|
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
254
|
-
reject: /* @__PURE__ */
|
|
254
|
+
reject: /* @__PURE__ */ u(function() {
|
|
255
255
|
if (this.options.backtrack_lexer)
|
|
256
256
|
this._backtrack = !0;
|
|
257
257
|
else
|
|
@@ -264,27 +264,27 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
264
264
|
return this;
|
|
265
265
|
}, "reject"),
|
|
266
266
|
// retain first n characters of the match
|
|
267
|
-
less: /* @__PURE__ */
|
|
267
|
+
less: /* @__PURE__ */ u(function(o) {
|
|
268
268
|
this.unput(this.match.slice(o));
|
|
269
269
|
}, "less"),
|
|
270
270
|
// displays already matched input, i.e. for error messages
|
|
271
|
-
pastInput: /* @__PURE__ */
|
|
271
|
+
pastInput: /* @__PURE__ */ u(function() {
|
|
272
272
|
var o = this.matched.substr(0, this.matched.length - this.match.length);
|
|
273
273
|
return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
|
|
274
274
|
}, "pastInput"),
|
|
275
275
|
// displays upcoming input, i.e. for error messages
|
|
276
|
-
upcomingInput: /* @__PURE__ */
|
|
276
|
+
upcomingInput: /* @__PURE__ */ u(function() {
|
|
277
277
|
var o = this.match;
|
|
278
278
|
return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
279
279
|
}, "upcomingInput"),
|
|
280
280
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
281
|
-
showPosition: /* @__PURE__ */
|
|
282
|
-
var o = this.pastInput(),
|
|
281
|
+
showPosition: /* @__PURE__ */ u(function() {
|
|
282
|
+
var o = this.pastInput(), c = new Array(o.length + 1).join("-");
|
|
283
283
|
return o + this.upcomingInput() + `
|
|
284
|
-
` +
|
|
284
|
+
` + c + "^";
|
|
285
285
|
}, "showPosition"),
|
|
286
286
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
287
|
-
test_match: /* @__PURE__ */
|
|
287
|
+
test_match: /* @__PURE__ */ u(function(o, c) {
|
|
288
288
|
var n, g, E;
|
|
289
289
|
if (this.options.backtrack_lexer && (E = {
|
|
290
290
|
yylineno: this.yylineno,
|
|
@@ -310,36 +310,36 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
310
310
|
last_line: this.yylineno + 1,
|
|
311
311
|
first_column: this.yylloc.last_column,
|
|
312
312
|
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
|
|
313
|
-
}, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this,
|
|
313
|
+
}, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this, c, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
314
314
|
return n;
|
|
315
315
|
if (this._backtrack) {
|
|
316
|
-
for (var
|
|
317
|
-
this[
|
|
316
|
+
for (var i in E)
|
|
317
|
+
this[i] = E[i];
|
|
318
318
|
return !1;
|
|
319
319
|
}
|
|
320
320
|
return !1;
|
|
321
321
|
}, "test_match"),
|
|
322
322
|
// return next match in input
|
|
323
|
-
next: /* @__PURE__ */
|
|
323
|
+
next: /* @__PURE__ */ u(function() {
|
|
324
324
|
if (this.done)
|
|
325
325
|
return this.EOF;
|
|
326
326
|
this._input || (this.done = !0);
|
|
327
|
-
var o,
|
|
327
|
+
var o, c, n, g;
|
|
328
328
|
this._more || (this.yytext = "", this.match = "");
|
|
329
|
-
for (var E = this._currentRules(),
|
|
330
|
-
if (n = this._input.match(this.rules[E[
|
|
331
|
-
if (
|
|
332
|
-
if (o = this.test_match(n, E[
|
|
329
|
+
for (var E = this._currentRules(), i = 0; i < E.length; i++)
|
|
330
|
+
if (n = this._input.match(this.rules[E[i]]), n && (!c || n[0].length > c[0].length)) {
|
|
331
|
+
if (c = n, g = i, this.options.backtrack_lexer) {
|
|
332
|
+
if (o = this.test_match(n, E[i]), o !== !1)
|
|
333
333
|
return o;
|
|
334
334
|
if (this._backtrack) {
|
|
335
|
-
|
|
335
|
+
c = !1;
|
|
336
336
|
continue;
|
|
337
337
|
} else
|
|
338
338
|
return !1;
|
|
339
339
|
} else if (!this.options.flex)
|
|
340
340
|
break;
|
|
341
341
|
}
|
|
342
|
-
return
|
|
342
|
+
return c ? (o = this.test_match(c, E[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
343
343
|
` + this.showPosition(), {
|
|
344
344
|
text: "",
|
|
345
345
|
token: null,
|
|
@@ -347,37 +347,37 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
347
347
|
});
|
|
348
348
|
}, "next"),
|
|
349
349
|
// return next match that has a token
|
|
350
|
-
lex: /* @__PURE__ */
|
|
351
|
-
var
|
|
352
|
-
return
|
|
350
|
+
lex: /* @__PURE__ */ u(function() {
|
|
351
|
+
var c = this.next();
|
|
352
|
+
return c || this.lex();
|
|
353
353
|
}, "lex"),
|
|
354
354
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
355
|
-
begin: /* @__PURE__ */
|
|
356
|
-
this.conditionStack.push(
|
|
355
|
+
begin: /* @__PURE__ */ u(function(c) {
|
|
356
|
+
this.conditionStack.push(c);
|
|
357
357
|
}, "begin"),
|
|
358
358
|
// pop the previously active lexer condition state off the condition stack
|
|
359
|
-
popState: /* @__PURE__ */
|
|
360
|
-
var
|
|
361
|
-
return
|
|
359
|
+
popState: /* @__PURE__ */ u(function() {
|
|
360
|
+
var c = this.conditionStack.length - 1;
|
|
361
|
+
return c > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
362
362
|
}, "popState"),
|
|
363
363
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
364
|
-
_currentRules: /* @__PURE__ */
|
|
364
|
+
_currentRules: /* @__PURE__ */ u(function() {
|
|
365
365
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
366
366
|
}, "_currentRules"),
|
|
367
367
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
368
|
-
topState: /* @__PURE__ */
|
|
369
|
-
return
|
|
368
|
+
topState: /* @__PURE__ */ u(function(c) {
|
|
369
|
+
return c = this.conditionStack.length - 1 - Math.abs(c || 0), c >= 0 ? this.conditionStack[c] : "INITIAL";
|
|
370
370
|
}, "topState"),
|
|
371
371
|
// alias for begin(condition)
|
|
372
|
-
pushState: /* @__PURE__ */
|
|
373
|
-
this.begin(
|
|
372
|
+
pushState: /* @__PURE__ */ u(function(c) {
|
|
373
|
+
this.begin(c);
|
|
374
374
|
}, "pushState"),
|
|
375
375
|
// return the number of states currently on the stack
|
|
376
|
-
stateStackSize: /* @__PURE__ */
|
|
376
|
+
stateStackSize: /* @__PURE__ */ u(function() {
|
|
377
377
|
return this.conditionStack.length;
|
|
378
378
|
}, "stateStackSize"),
|
|
379
379
|
options: { "case-insensitive": !0 },
|
|
380
|
-
performAction: /* @__PURE__ */
|
|
380
|
+
performAction: /* @__PURE__ */ u(function(c, n, g, E) {
|
|
381
381
|
switch (g) {
|
|
382
382
|
case 0:
|
|
383
383
|
return 38;
|
|
@@ -557,118 +557,116 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
557
557
|
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, /^(?:[^\}]%%[^\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],
|
|
558
558
|
conditions: { LINE: { rules: [12, 13], inclusive: !1 }, struct: { rules: [12, 13, 25, 29, 32, 38, 45, 46, 47, 48, 57, 58, 59, 60, 74, 75, 76, 77, 78], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [67], inclusive: !1 }, FLOATING_NOTE: { rules: [64, 65, 66], inclusive: !1 }, NOTE_TEXT: { rules: [69, 70], inclusive: !1 }, NOTE_ID: { rules: [68], inclusive: !1 }, NOTE: { rules: [61, 62, 63], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [34], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [33], inclusive: !1 }, CLASS_STYLE: { rules: [31], inclusive: !1 }, CLASS: { rules: [30], inclusive: !1 }, CLASSDEFID: { rules: [28], inclusive: !1 }, CLASSDEF: { rules: [26, 27], inclusive: !1 }, acc_descr_multiline: { rules: [23, 24], inclusive: !1 }, acc_descr: { rules: [21], inclusive: !1 }, acc_title: { rules: [19], inclusive: !1 }, SCALE: { rules: [16, 17, 36, 37], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [51], inclusive: !1 }, STATE_STRING: { rules: [52, 53], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [12, 13, 39, 40, 41, 42, 43, 44, 49, 50, 54, 55, 56], inclusive: !1 }, ID: { rules: [12, 13], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 18, 20, 22, 25, 29, 32, 35, 38, 56, 60, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81], inclusive: !0 } }
|
|
559
559
|
};
|
|
560
|
-
return
|
|
561
|
-
}();
|
|
560
|
+
return Y;
|
|
561
|
+
})();
|
|
562
562
|
gt.lexer = qt;
|
|
563
563
|
function ht() {
|
|
564
564
|
this.yy = {};
|
|
565
565
|
}
|
|
566
|
-
return
|
|
567
|
-
}();
|
|
566
|
+
return u(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
|
|
567
|
+
})();
|
|
568
568
|
vt.parser = vt;
|
|
569
|
-
var Be = vt, de = "TB", Yt = "TB",
|
|
570
|
-
if (!
|
|
571
|
-
return
|
|
572
|
-
let s =
|
|
573
|
-
for (const a of
|
|
569
|
+
var Be = vt, de = "TB", Yt = "TB", Ot = "dir", X = "state", K = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", tt = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal", Dt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", Rt = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", et = "statediagram", _e = "state", me = `${et}-${_e}`, Ht = "transition", be = "note", De = "note-edge", ke = `${Ht} ${De}`, ve = `${et}-${be}`, Ce = "cluster", Ae = `${et}-${Ce}`, xe = "cluster-alt", Le = `${et}-${xe}`, zt = "parent", Wt = "note", Ie = "state", At = "----", Oe = `${At}${Wt}`, wt = `${At}${zt}`, Kt = /* @__PURE__ */ u((t, e = Yt) => {
|
|
570
|
+
if (!t.doc)
|
|
571
|
+
return e;
|
|
572
|
+
let s = e;
|
|
573
|
+
for (const a of t.doc)
|
|
574
574
|
a.stmt === "dir" && (s = a.value);
|
|
575
575
|
return s;
|
|
576
|
-
}, "getDir"),
|
|
577
|
-
return
|
|
578
|
-
}, "getClasses"), Ne = /* @__PURE__ */
|
|
579
|
-
|
|
580
|
-
const { securityLevel:
|
|
576
|
+
}, "getDir"), Re = /* @__PURE__ */ u(function(t, e) {
|
|
577
|
+
return e.db.getClasses();
|
|
578
|
+
}, "getClasses"), Ne = /* @__PURE__ */ u(async function(t, e, s, a) {
|
|
579
|
+
b.info("REF0:"), b.info("Drawing state diagram (v2)", e);
|
|
580
|
+
const { securityLevel: r, state: h, layout: d } = w();
|
|
581
581
|
a.db.extract(a.db.getRootDocV2());
|
|
582
|
-
const S = a.db.getData(),
|
|
583
|
-
S.type = a.type, S.layoutAlgorithm = d, S.nodeSpacing =
|
|
582
|
+
const S = a.db.getData(), f = te(e, r);
|
|
583
|
+
S.type = a.type, S.layoutAlgorithm = d, S.nodeSpacing = h?.nodeSpacing || 50, S.rankSpacing = h?.rankSpacing || 50, S.markers = ["barb"], S.diagramId = e, await se(S, f);
|
|
584
584
|
const T = 8;
|
|
585
585
|
try {
|
|
586
|
-
(typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((m,
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
D.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
|
|
586
|
+
(typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((m, A) => {
|
|
587
|
+
const v = typeof A == "string" ? A : typeof A?.id == "string" ? A.id : "";
|
|
588
|
+
if (!v) {
|
|
589
|
+
b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(A));
|
|
591
590
|
return;
|
|
592
591
|
}
|
|
593
|
-
const
|
|
594
|
-
let
|
|
595
|
-
if (
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
D.warn("⚠️ Could not find node matching text:", A);
|
|
592
|
+
const p = f.node()?.querySelectorAll("g");
|
|
593
|
+
let k;
|
|
594
|
+
if (p?.forEach((I) => {
|
|
595
|
+
I.textContent?.trim() === v && (k = I);
|
|
596
|
+
}), !k) {
|
|
597
|
+
b.warn("⚠️ Could not find node matching text:", v);
|
|
600
598
|
return;
|
|
601
599
|
}
|
|
602
|
-
const R =
|
|
600
|
+
const R = k.parentNode;
|
|
603
601
|
if (!R) {
|
|
604
|
-
|
|
602
|
+
b.warn("⚠️ Node has no parent, cannot wrap:", v);
|
|
605
603
|
return;
|
|
606
604
|
}
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
609
|
-
const
|
|
610
|
-
|
|
605
|
+
const L = document.createElementNS("http://www.w3.org/2000/svg", "a"), $ = m.url.replace(/^"+|"+$/g, "");
|
|
606
|
+
if (L.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", $), L.setAttribute("target", "_blank"), m.tooltip) {
|
|
607
|
+
const I = m.tooltip.replace(/^"+|"+$/g, "");
|
|
608
|
+
L.setAttribute("title", I);
|
|
611
609
|
}
|
|
612
|
-
R.replaceChild(
|
|
610
|
+
R.replaceChild(L, k), L.appendChild(k), b.info("🔗 Wrapped node in <a> tag for:", v, m.url);
|
|
613
611
|
});
|
|
614
612
|
} catch (_) {
|
|
615
|
-
|
|
613
|
+
b.error("❌ Error injecting clickable links:", _);
|
|
616
614
|
}
|
|
617
615
|
ie.insertTitle(
|
|
618
|
-
|
|
616
|
+
f,
|
|
619
617
|
"statediagramTitleText",
|
|
620
|
-
|
|
618
|
+
h?.titleTopMargin ?? 25,
|
|
621
619
|
a.db.getDiagramTitle()
|
|
622
|
-
), ee(
|
|
620
|
+
), ee(f, T, et, h?.useMaxWidth ?? !0);
|
|
623
621
|
}, "draw"), Ve = {
|
|
624
|
-
getClasses:
|
|
622
|
+
getClasses: Re,
|
|
625
623
|
draw: Ne,
|
|
626
624
|
getDir: Kt
|
|
627
|
-
}, St = /* @__PURE__ */ new Map(),
|
|
628
|
-
function yt(
|
|
629
|
-
const
|
|
630
|
-
return `${
|
|
625
|
+
}, St = /* @__PURE__ */ new Map(), G = 0;
|
|
626
|
+
function yt(t = "", e = 0, s = "", a = At) {
|
|
627
|
+
const r = s !== null && s.length > 0 ? `${a}${s}` : "";
|
|
628
|
+
return `${Ie}-${t}${r}-${e}`;
|
|
631
629
|
}
|
|
632
|
-
|
|
633
|
-
var we = /* @__PURE__ */
|
|
634
|
-
|
|
635
|
-
switch (
|
|
636
|
-
case
|
|
637
|
-
|
|
630
|
+
u(yt, "stateDomId");
|
|
631
|
+
var we = /* @__PURE__ */ u((t, e, s, a, r, h, d, S) => {
|
|
632
|
+
b.trace("items", e), e.forEach((f) => {
|
|
633
|
+
switch (f.stmt) {
|
|
634
|
+
case X:
|
|
635
|
+
Z(t, f, s, a, r, h, d, S);
|
|
638
636
|
break;
|
|
639
|
-
case
|
|
640
|
-
|
|
637
|
+
case tt:
|
|
638
|
+
Z(t, f, s, a, r, h, d, S);
|
|
641
639
|
break;
|
|
642
640
|
case Ct:
|
|
643
641
|
{
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
642
|
+
Z(
|
|
643
|
+
t,
|
|
644
|
+
f.state1,
|
|
647
645
|
s,
|
|
648
646
|
a,
|
|
649
|
-
|
|
650
|
-
|
|
647
|
+
r,
|
|
648
|
+
h,
|
|
651
649
|
d,
|
|
652
650
|
S
|
|
653
|
-
),
|
|
654
|
-
|
|
655
|
-
|
|
651
|
+
), Z(
|
|
652
|
+
t,
|
|
653
|
+
f.state2,
|
|
656
654
|
s,
|
|
657
655
|
a,
|
|
658
|
-
|
|
659
|
-
|
|
656
|
+
r,
|
|
657
|
+
h,
|
|
660
658
|
d,
|
|
661
659
|
S
|
|
662
660
|
);
|
|
663
661
|
const T = {
|
|
664
|
-
id: "edge" +
|
|
665
|
-
start:
|
|
666
|
-
end:
|
|
662
|
+
id: "edge" + G,
|
|
663
|
+
start: f.state1.id,
|
|
664
|
+
end: f.state2.id,
|
|
667
665
|
arrowhead: "normal",
|
|
668
666
|
arrowTypeEnd: "arrow_barb",
|
|
669
667
|
style: Bt,
|
|
670
668
|
labelStyle: "",
|
|
671
|
-
label:
|
|
669
|
+
label: U.sanitizeText(f.description ?? "", w()),
|
|
672
670
|
arrowheadStyle: Vt,
|
|
673
671
|
labelpos: Mt,
|
|
674
672
|
labelType: Ut,
|
|
@@ -676,106 +674,104 @@ var we = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
676
674
|
classes: Ht,
|
|
677
675
|
look: d
|
|
678
676
|
};
|
|
679
|
-
|
|
677
|
+
r.push(T), G++;
|
|
680
678
|
}
|
|
681
679
|
break;
|
|
682
680
|
}
|
|
683
681
|
});
|
|
684
|
-
}, "setupDoc"), $t = /* @__PURE__ */
|
|
685
|
-
let s =
|
|
686
|
-
if (
|
|
687
|
-
for (const a of
|
|
682
|
+
}, "setupDoc"), $t = /* @__PURE__ */ u((t, e = Yt) => {
|
|
683
|
+
let s = e;
|
|
684
|
+
if (t.doc)
|
|
685
|
+
for (const a of t.doc)
|
|
688
686
|
a.stmt === "dir" && (s = a.value);
|
|
689
687
|
return s;
|
|
690
688
|
}, "getDir");
|
|
691
|
-
function
|
|
692
|
-
if (!
|
|
689
|
+
function Q(t, e, s) {
|
|
690
|
+
if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
|
|
693
691
|
return;
|
|
694
|
-
|
|
695
|
-
const
|
|
696
|
-
|
|
692
|
+
e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((r) => {
|
|
693
|
+
const h = s.get(r);
|
|
694
|
+
h && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...h.styles]);
|
|
697
695
|
}));
|
|
698
|
-
const a =
|
|
699
|
-
a ? Object.assign(a,
|
|
696
|
+
const a = t.find((r) => r.id === e.id);
|
|
697
|
+
a ? Object.assign(a, e) : t.push(e);
|
|
700
698
|
}
|
|
701
|
-
|
|
702
|
-
function Xt(
|
|
703
|
-
|
|
704
|
-
return ((t = e == null ? void 0 : e.classes) == null ? void 0 : t.join(" ")) ?? "";
|
|
699
|
+
u(Q, "insertOrUpdateNode");
|
|
700
|
+
function Xt(t) {
|
|
701
|
+
return t?.classes?.join(" ") ?? "";
|
|
705
702
|
}
|
|
706
|
-
|
|
707
|
-
function Jt(
|
|
708
|
-
return
|
|
703
|
+
u(Xt, "getClassesFromDbInfo");
|
|
704
|
+
function Jt(t) {
|
|
705
|
+
return t?.styles ?? [];
|
|
709
706
|
}
|
|
710
|
-
|
|
711
|
-
var
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
description: z.sanitizeText(p, k),
|
|
707
|
+
u(Jt, "getStylesFromDbInfo");
|
|
708
|
+
var Z = /* @__PURE__ */ u((t, e, s, a, r, h, d, S) => {
|
|
709
|
+
const f = e.id, T = s.get(f), _ = Xt(T), m = Jt(T), A = w();
|
|
710
|
+
if (b.info("dataFetcher parsedItem", e, T, m), f !== "root") {
|
|
711
|
+
let v = Dt;
|
|
712
|
+
e.start === !0 ? v = ye : e.start === !1 && (v = ge), e.type !== tt && (v = e.type), St.get(f) || St.set(f, {
|
|
713
|
+
id: f,
|
|
714
|
+
shape: v,
|
|
715
|
+
description: U.sanitizeText(f, A),
|
|
720
716
|
cssClasses: `${_} ${me}`,
|
|
721
717
|
cssStyles: m
|
|
722
718
|
});
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
const
|
|
719
|
+
const p = St.get(f);
|
|
720
|
+
e.description && (Array.isArray(p.description) ? (p.shape = kt, p.description.push(e.description)) : p.description?.length && p.description.length > 0 ? (p.shape = kt, p.description === f ? p.description = [e.description] : p.description = [p.description, e.description]) : (p.shape = Dt, p.description = e.description), p.description = U.sanitizeTextOrArray(p.description, A)), p.description?.length === 1 && p.shape === kt && (p.type === "group" ? p.shape = Nt : p.shape = Dt), !p.type && e.doc && (b.info("Setting cluster for XCX", f, $t(e)), p.type = "group", p.isGroup = !0, p.dir = $t(e), p.shape = e.type === Gt ? Rt : Nt, p.cssClasses = `${p.cssClasses} ${Ae} ${h ? Le : ""}`);
|
|
721
|
+
const k = {
|
|
726
722
|
labelStyle: "",
|
|
727
|
-
shape:
|
|
728
|
-
label:
|
|
729
|
-
cssClasses:
|
|
723
|
+
shape: p.shape,
|
|
724
|
+
label: p.description,
|
|
725
|
+
cssClasses: p.cssClasses,
|
|
730
726
|
cssCompiledStyles: [],
|
|
731
|
-
cssStyles:
|
|
732
|
-
id:
|
|
733
|
-
dir:
|
|
734
|
-
domId: yt(
|
|
735
|
-
type:
|
|
736
|
-
isGroup:
|
|
727
|
+
cssStyles: p.cssStyles,
|
|
728
|
+
id: f,
|
|
729
|
+
dir: p.dir,
|
|
730
|
+
domId: yt(f, G),
|
|
731
|
+
type: p.type,
|
|
732
|
+
isGroup: p.type === "group",
|
|
737
733
|
padding: 8,
|
|
738
734
|
rx: 10,
|
|
739
735
|
ry: 10,
|
|
740
736
|
look: d
|
|
741
737
|
};
|
|
742
|
-
if (
|
|
743
|
-
const
|
|
738
|
+
if (k.shape === Rt && (k.label = ""), t && t.id !== "root" && (b.trace("Setting node ", f, " to be child of its parent ", t.id), k.parentId = t.id), k.centerLabel = !0, e.note) {
|
|
739
|
+
const R = {
|
|
744
740
|
labelStyle: "",
|
|
745
741
|
shape: Te,
|
|
746
|
-
label:
|
|
742
|
+
label: e.note.text,
|
|
747
743
|
cssClasses: ve,
|
|
748
744
|
// useHtmlLabels: false,
|
|
749
745
|
cssStyles: [],
|
|
750
746
|
cssCompiledStyles: [],
|
|
751
|
-
id:
|
|
752
|
-
domId: yt(
|
|
753
|
-
type:
|
|
754
|
-
isGroup:
|
|
755
|
-
padding:
|
|
747
|
+
id: f + Oe + "-" + G,
|
|
748
|
+
domId: yt(f, G, Wt),
|
|
749
|
+
type: p.type,
|
|
750
|
+
isGroup: p.type === "group",
|
|
751
|
+
padding: A.flowchart?.padding,
|
|
756
752
|
look: d,
|
|
757
|
-
position:
|
|
758
|
-
},
|
|
753
|
+
position: e.note.position
|
|
754
|
+
}, L = f + wt, $ = {
|
|
759
755
|
labelStyle: "",
|
|
760
756
|
shape: Ee,
|
|
761
|
-
label:
|
|
762
|
-
cssClasses:
|
|
757
|
+
label: e.note.text,
|
|
758
|
+
cssClasses: p.cssClasses,
|
|
763
759
|
cssStyles: [],
|
|
764
|
-
id:
|
|
765
|
-
domId: yt(
|
|
760
|
+
id: f + wt,
|
|
761
|
+
domId: yt(f, G, zt),
|
|
766
762
|
type: "group",
|
|
767
763
|
isGroup: !0,
|
|
768
764
|
padding: 16,
|
|
769
765
|
//getConfig().flowchart.padding
|
|
770
766
|
look: d,
|
|
771
|
-
position:
|
|
767
|
+
position: e.note.position
|
|
772
768
|
};
|
|
773
|
-
|
|
774
|
-
let
|
|
775
|
-
|
|
776
|
-
id:
|
|
777
|
-
start:
|
|
778
|
-
end:
|
|
769
|
+
G++, $.id = L, R.parentId = L, Q(a, $, S), Q(a, R, S), Q(a, k, S);
|
|
770
|
+
let I = f, P = R.id;
|
|
771
|
+
e.note.position === "left of" && (I = R.id, P = f), r.push({
|
|
772
|
+
id: I + "-" + P,
|
|
773
|
+
start: I,
|
|
774
|
+
end: P,
|
|
779
775
|
arrowhead: "none",
|
|
780
776
|
arrowTypeEnd: "",
|
|
781
777
|
style: Bt,
|
|
@@ -788,12 +784,12 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
788
784
|
look: d
|
|
789
785
|
});
|
|
790
786
|
} else
|
|
791
|
-
|
|
787
|
+
Q(a, k, S);
|
|
792
788
|
}
|
|
793
|
-
|
|
794
|
-
}, "dataFetcher"), $e = /* @__PURE__ */
|
|
795
|
-
St.clear(),
|
|
796
|
-
}, "reset"),
|
|
789
|
+
e.doc && (b.trace("Adding nodes children "), we(e, e.doc, s, a, r, !h, d, S));
|
|
790
|
+
}, "dataFetcher"), $e = /* @__PURE__ */ u(() => {
|
|
791
|
+
St.clear(), G = 0;
|
|
792
|
+
}, "reset"), C = {
|
|
797
793
|
START_NODE: "[*]",
|
|
798
794
|
START_TYPE: "start",
|
|
799
795
|
END_NODE: "[*]",
|
|
@@ -802,13 +798,13 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
802
798
|
FILL_KEYWORD: "fill",
|
|
803
799
|
BG_FILL: "bgFill",
|
|
804
800
|
STYLECLASS_SEP: ","
|
|
805
|
-
}, Pt = /* @__PURE__ */
|
|
801
|
+
}, Pt = /* @__PURE__ */ u(() => /* @__PURE__ */ new Map(), "newClassesList"), Ft = /* @__PURE__ */ u(() => ({
|
|
806
802
|
relations: [],
|
|
807
803
|
states: /* @__PURE__ */ new Map(),
|
|
808
804
|
documents: {}
|
|
809
|
-
}), "newDoc"), pt = /* @__PURE__ */
|
|
810
|
-
constructor(
|
|
811
|
-
this.version =
|
|
805
|
+
}), "newDoc"), pt = /* @__PURE__ */ u((t) => JSON.parse(JSON.stringify(t)), "clone"), j, Me = (j = class {
|
|
806
|
+
constructor(e) {
|
|
807
|
+
this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this);
|
|
812
808
|
}
|
|
813
809
|
/**
|
|
814
810
|
* Convert all of the statements (stmts) that were parsed into states and relationships.
|
|
@@ -819,31 +815,31 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
819
815
|
* See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
|
|
820
816
|
* This will push the statement into the list of statements for the current document.
|
|
821
817
|
*/
|
|
822
|
-
extract(
|
|
818
|
+
extract(e) {
|
|
823
819
|
this.clear(!0);
|
|
824
|
-
for (const
|
|
825
|
-
switch (
|
|
826
|
-
case
|
|
827
|
-
this.addState(
|
|
820
|
+
for (const r of Array.isArray(e) ? e : e.doc)
|
|
821
|
+
switch (r.stmt) {
|
|
822
|
+
case X:
|
|
823
|
+
this.addState(r.id.trim(), r.type, r.doc, r.description, r.note);
|
|
828
824
|
break;
|
|
829
825
|
case Ct:
|
|
830
|
-
this.addRelation(
|
|
826
|
+
this.addRelation(r.state1, r.state2, r.description);
|
|
831
827
|
break;
|
|
832
828
|
case fe:
|
|
833
|
-
this.addStyleClass(
|
|
829
|
+
this.addStyleClass(r.id.trim(), r.classes);
|
|
834
830
|
break;
|
|
835
831
|
case pe:
|
|
836
|
-
this.handleStyleDef(
|
|
832
|
+
this.handleStyleDef(r);
|
|
837
833
|
break;
|
|
838
834
|
case Se:
|
|
839
|
-
this.setCssClass(
|
|
835
|
+
this.setCssClass(r.id.trim(), r.styleClass);
|
|
840
836
|
break;
|
|
841
837
|
case "click":
|
|
842
|
-
this.addLink(
|
|
838
|
+
this.addLink(r.id, r.url, r.tooltip);
|
|
843
839
|
break;
|
|
844
840
|
}
|
|
845
|
-
const s = this.getStates(), a =
|
|
846
|
-
$e(),
|
|
841
|
+
const s = this.getStates(), a = w();
|
|
842
|
+
$e(), Z(
|
|
847
843
|
void 0,
|
|
848
844
|
this.getRootDocV2(),
|
|
849
845
|
s,
|
|
@@ -853,64 +849,61 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
853
849
|
a.look,
|
|
854
850
|
this.classes
|
|
855
851
|
);
|
|
856
|
-
for (const
|
|
857
|
-
if (Array.isArray(
|
|
858
|
-
if (
|
|
852
|
+
for (const r of this.nodes)
|
|
853
|
+
if (Array.isArray(r.label)) {
|
|
854
|
+
if (r.description = r.label.slice(1), r.isGroup && r.description.length > 0)
|
|
859
855
|
throw new Error(
|
|
860
|
-
`Group nodes can only have label. Remove the additional description for node [${
|
|
856
|
+
`Group nodes can only have label. Remove the additional description for node [${r.id}]`
|
|
861
857
|
);
|
|
862
|
-
|
|
858
|
+
r.label = r.label[0];
|
|
863
859
|
}
|
|
864
860
|
}
|
|
865
|
-
handleStyleDef(
|
|
866
|
-
const s =
|
|
867
|
-
for (const
|
|
868
|
-
let
|
|
869
|
-
if (!
|
|
870
|
-
const d =
|
|
871
|
-
this.addState(d),
|
|
861
|
+
handleStyleDef(e) {
|
|
862
|
+
const s = e.id.trim().split(","), a = e.styleClass.split(",");
|
|
863
|
+
for (const r of s) {
|
|
864
|
+
let h = this.getState(r);
|
|
865
|
+
if (!h) {
|
|
866
|
+
const d = r.trim();
|
|
867
|
+
this.addState(d), h = this.getState(d);
|
|
872
868
|
}
|
|
873
|
-
|
|
874
|
-
var S;
|
|
875
|
-
return (S = d.replace(/;/g, "")) == null ? void 0 : S.trim();
|
|
876
|
-
}));
|
|
869
|
+
h && (h.styles = a.map((d) => d.replace(/;/g, "")?.trim()));
|
|
877
870
|
}
|
|
878
871
|
}
|
|
879
|
-
setRootDoc(
|
|
880
|
-
|
|
872
|
+
setRootDoc(e) {
|
|
873
|
+
b.info("Setting root doc", e), this.rootDoc = e, this.version === 1 ? this.extract(e) : this.extract(this.getRootDocV2());
|
|
881
874
|
}
|
|
882
|
-
docTranslator(
|
|
875
|
+
docTranslator(e, s, a) {
|
|
883
876
|
if (s.stmt === Ct) {
|
|
884
|
-
this.docTranslator(
|
|
877
|
+
this.docTranslator(e, s.state1, !0), this.docTranslator(e, s.state2, !1);
|
|
885
878
|
return;
|
|
886
879
|
}
|
|
887
|
-
if (s.stmt ===
|
|
880
|
+
if (s.stmt === X && (s.id === C.START_NODE ? (s.id = e.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== K && s.stmt !== X || !s.doc)
|
|
888
881
|
return;
|
|
889
|
-
const
|
|
890
|
-
let
|
|
882
|
+
const r = [];
|
|
883
|
+
let h = [];
|
|
891
884
|
for (const d of s.doc)
|
|
892
885
|
if (d.type === Gt) {
|
|
893
886
|
const S = pt(d);
|
|
894
|
-
S.doc = pt(
|
|
887
|
+
S.doc = pt(h), r.push(S), h = [];
|
|
895
888
|
} else
|
|
896
|
-
|
|
897
|
-
if (
|
|
889
|
+
h.push(d);
|
|
890
|
+
if (r.length > 0 && h.length > 0) {
|
|
898
891
|
const d = {
|
|
899
|
-
stmt:
|
|
892
|
+
stmt: X,
|
|
900
893
|
id: he(),
|
|
901
894
|
type: "divider",
|
|
902
|
-
doc: pt(
|
|
895
|
+
doc: pt(h)
|
|
903
896
|
};
|
|
904
|
-
|
|
897
|
+
r.push(pt(d)), s.doc = r;
|
|
905
898
|
}
|
|
906
899
|
s.doc.forEach((d) => this.docTranslator(s, d, !0));
|
|
907
900
|
}
|
|
908
901
|
getRootDocV2() {
|
|
909
902
|
return this.docTranslator(
|
|
910
|
-
{ id:
|
|
911
|
-
{ id:
|
|
903
|
+
{ id: K, stmt: K },
|
|
904
|
+
{ id: K, stmt: K, doc: this.rootDoc },
|
|
912
905
|
!0
|
|
913
|
-
), { id:
|
|
906
|
+
), { id: K, doc: this.rootDoc };
|
|
914
907
|
}
|
|
915
908
|
/**
|
|
916
909
|
* Function called by parser when a node definition has been found.
|
|
@@ -920,16 +913,16 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
920
913
|
* @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.
|
|
921
914
|
* @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.
|
|
922
915
|
*/
|
|
923
|
-
addState(
|
|
924
|
-
const T =
|
|
916
|
+
addState(e, s = tt, a = void 0, r = void 0, h = void 0, d = void 0, S = void 0, f = void 0) {
|
|
917
|
+
const T = e?.trim();
|
|
925
918
|
if (!this.currentDocument.states.has(T))
|
|
926
|
-
|
|
927
|
-
stmt:
|
|
919
|
+
b.info("Adding state ", T, r), this.currentDocument.states.set(T, {
|
|
920
|
+
stmt: X,
|
|
928
921
|
id: T,
|
|
929
922
|
descriptions: [],
|
|
930
923
|
type: s,
|
|
931
924
|
doc: a,
|
|
932
|
-
note:
|
|
925
|
+
note: h,
|
|
933
926
|
classes: [],
|
|
934
927
|
styles: [],
|
|
935
928
|
textStyles: []
|
|
@@ -940,25 +933,25 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
940
933
|
throw new Error(`State not found: ${T}`);
|
|
941
934
|
_.doc || (_.doc = a), _.type || (_.type = s);
|
|
942
935
|
}
|
|
943
|
-
if (
|
|
936
|
+
if (r && (b.info("Setting state description", T, r), (Array.isArray(r) ? r : [r]).forEach((m) => this.addDescription(T, m.trim()))), h) {
|
|
944
937
|
const _ = this.currentDocument.states.get(T);
|
|
945
938
|
if (!_)
|
|
946
939
|
throw new Error(`State not found: ${T}`);
|
|
947
|
-
_.note =
|
|
940
|
+
_.note = h, _.note.text = U.sanitizeText(_.note.text, w());
|
|
948
941
|
}
|
|
949
|
-
d && (
|
|
942
|
+
d && (b.info("Setting state classes", T, d), (Array.isArray(d) ? d : [d]).forEach((m) => this.setCssClass(T, m.trim()))), S && (b.info("Setting state styles", T, S), (Array.isArray(S) ? S : [S]).forEach((m) => this.setStyle(T, m.trim()))), f && (b.info("Setting state styles", T, S), (Array.isArray(f) ? f : [f]).forEach((m) => this.setTextStyle(T, m.trim())));
|
|
950
943
|
}
|
|
951
|
-
clear(
|
|
952
|
-
this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(),
|
|
944
|
+
clear(e) {
|
|
945
|
+
this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), e || (this.links = /* @__PURE__ */ new Map(), ue());
|
|
953
946
|
}
|
|
954
|
-
getState(
|
|
955
|
-
return this.currentDocument.states.get(
|
|
947
|
+
getState(e) {
|
|
948
|
+
return this.currentDocument.states.get(e);
|
|
956
949
|
}
|
|
957
950
|
getStates() {
|
|
958
951
|
return this.currentDocument.states;
|
|
959
952
|
}
|
|
960
953
|
logDocuments() {
|
|
961
|
-
|
|
954
|
+
b.info("Documents = ", this.documents);
|
|
962
955
|
}
|
|
963
956
|
getRelations() {
|
|
964
957
|
return this.currentDocument.relations;
|
|
@@ -966,8 +959,8 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
966
959
|
/**
|
|
967
960
|
* Adds a clickable link to a state.
|
|
968
961
|
*/
|
|
969
|
-
addLink(
|
|
970
|
-
this.links.set(
|
|
962
|
+
addLink(e, s, a) {
|
|
963
|
+
this.links.set(e, { url: s, tooltip: a }), b.warn("Adding link", e, s, a);
|
|
971
964
|
}
|
|
972
965
|
/**
|
|
973
966
|
* Get all registered links.
|
|
@@ -980,43 +973,43 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
980
973
|
* the start node name and the current start node count.
|
|
981
974
|
* else return the given id
|
|
982
975
|
*/
|
|
983
|
-
startIdIfNeeded(
|
|
984
|
-
return
|
|
976
|
+
startIdIfNeeded(e = "") {
|
|
977
|
+
return e === C.START_NODE ? (this.startEndCount++, `${C.START_TYPE}${this.startEndCount}`) : e;
|
|
985
978
|
}
|
|
986
979
|
/**
|
|
987
980
|
* If the id is a start node ( [*] ), then return the start type ('start')
|
|
988
981
|
* else return the given type
|
|
989
982
|
*/
|
|
990
|
-
startTypeIfNeeded(
|
|
991
|
-
return
|
|
983
|
+
startTypeIfNeeded(e = "", s = tt) {
|
|
984
|
+
return e === C.START_NODE ? C.START_TYPE : s;
|
|
992
985
|
}
|
|
993
986
|
/**
|
|
994
987
|
* If the id is an end node ( [*] ), then return a new id constructed from
|
|
995
988
|
* the end node name and the current start_end node count.
|
|
996
989
|
* else return the given id
|
|
997
990
|
*/
|
|
998
|
-
endIdIfNeeded(
|
|
999
|
-
return
|
|
991
|
+
endIdIfNeeded(e = "") {
|
|
992
|
+
return e === C.END_NODE ? (this.startEndCount++, `${C.END_TYPE}${this.startEndCount}`) : e;
|
|
1000
993
|
}
|
|
1001
994
|
/**
|
|
1002
995
|
* If the id is an end node ( [*] ), then return the end type
|
|
1003
996
|
* else return the given type
|
|
1004
997
|
*
|
|
1005
998
|
*/
|
|
1006
|
-
endTypeIfNeeded(
|
|
1007
|
-
return
|
|
999
|
+
endTypeIfNeeded(e = "", s = tt) {
|
|
1000
|
+
return e === C.END_NODE ? C.END_TYPE : s;
|
|
1008
1001
|
}
|
|
1009
|
-
addRelationObjs(
|
|
1010
|
-
const
|
|
1002
|
+
addRelationObjs(e, s, a = "") {
|
|
1003
|
+
const r = this.startIdIfNeeded(e.id.trim()), h = this.startTypeIfNeeded(e.id.trim(), e.type), d = this.startIdIfNeeded(s.id.trim()), S = this.startTypeIfNeeded(s.id.trim(), s.type);
|
|
1011
1004
|
this.addState(
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1005
|
+
r,
|
|
1006
|
+
h,
|
|
1007
|
+
e.doc,
|
|
1008
|
+
e.description,
|
|
1009
|
+
e.note,
|
|
1010
|
+
e.classes,
|
|
1011
|
+
e.styles,
|
|
1012
|
+
e.textStyles
|
|
1020
1013
|
), this.addState(
|
|
1021
1014
|
d,
|
|
1022
1015
|
S,
|
|
@@ -1027,33 +1020,32 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1027
1020
|
s.styles,
|
|
1028
1021
|
s.textStyles
|
|
1029
1022
|
), this.currentDocument.relations.push({
|
|
1030
|
-
id1:
|
|
1023
|
+
id1: r,
|
|
1031
1024
|
id2: d,
|
|
1032
|
-
relationTitle:
|
|
1025
|
+
relationTitle: U.sanitizeText(a, w())
|
|
1033
1026
|
});
|
|
1034
1027
|
}
|
|
1035
1028
|
/**
|
|
1036
1029
|
* Add a relation between two items. The items may be full objects or just the string id of a state.
|
|
1037
1030
|
*/
|
|
1038
|
-
addRelation(
|
|
1039
|
-
if (typeof
|
|
1040
|
-
this.addRelationObjs(
|
|
1041
|
-
else if (typeof
|
|
1042
|
-
const
|
|
1043
|
-
this.addState(
|
|
1044
|
-
id1:
|
|
1031
|
+
addRelation(e, s, a) {
|
|
1032
|
+
if (typeof e == "object" && typeof s == "object")
|
|
1033
|
+
this.addRelationObjs(e, s, a);
|
|
1034
|
+
else if (typeof e == "string" && typeof s == "string") {
|
|
1035
|
+
const r = this.startIdIfNeeded(e.trim()), h = this.startTypeIfNeeded(e), d = this.endIdIfNeeded(s.trim()), S = this.endTypeIfNeeded(s);
|
|
1036
|
+
this.addState(r, h), this.addState(d, S), this.currentDocument.relations.push({
|
|
1037
|
+
id1: r,
|
|
1045
1038
|
id2: d,
|
|
1046
|
-
relationTitle: a ?
|
|
1039
|
+
relationTitle: a ? U.sanitizeText(a, w()) : void 0
|
|
1047
1040
|
});
|
|
1048
1041
|
}
|
|
1049
1042
|
}
|
|
1050
|
-
addDescription(
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
(l = a == null ? void 0 : a.descriptions) == null || l.push(z.sanitizeText(i, F()));
|
|
1043
|
+
addDescription(e, s) {
|
|
1044
|
+
const a = this.currentDocument.states.get(e), r = s.startsWith(":") ? s.replace(":", "").trim() : s;
|
|
1045
|
+
a?.descriptions?.push(U.sanitizeText(r, w()));
|
|
1054
1046
|
}
|
|
1055
|
-
cleanupLabel(
|
|
1056
|
-
return
|
|
1047
|
+
cleanupLabel(e) {
|
|
1048
|
+
return e.startsWith(":") ? e.slice(2).trim() : e.trim();
|
|
1057
1049
|
}
|
|
1058
1050
|
getDividerId() {
|
|
1059
1051
|
return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
|
|
@@ -1065,16 +1057,16 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1065
1057
|
* @param id - the id of this (style) class
|
|
1066
1058
|
* @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
|
|
1067
1059
|
*/
|
|
1068
|
-
addStyleClass(
|
|
1069
|
-
this.classes.has(
|
|
1070
|
-
const a = this.classes.get(
|
|
1071
|
-
s && a && s.split(
|
|
1072
|
-
const
|
|
1073
|
-
if (RegExp(
|
|
1074
|
-
const S =
|
|
1060
|
+
addStyleClass(e, s = "") {
|
|
1061
|
+
this.classes.has(e) || this.classes.set(e, { id: e, styles: [], textStyles: [] });
|
|
1062
|
+
const a = this.classes.get(e);
|
|
1063
|
+
s && a && s.split(C.STYLECLASS_SEP).forEach((r) => {
|
|
1064
|
+
const h = r.replace(/([^;]*);/, "$1").trim();
|
|
1065
|
+
if (RegExp(C.COLOR_KEYWORD).exec(r)) {
|
|
1066
|
+
const S = h.replace(C.FILL_KEYWORD, C.BG_FILL).replace(C.COLOR_KEYWORD, C.FILL_KEYWORD);
|
|
1075
1067
|
a.textStyles.push(S);
|
|
1076
1068
|
}
|
|
1077
|
-
a.styles.push(
|
|
1069
|
+
a.styles.push(h);
|
|
1078
1070
|
});
|
|
1079
1071
|
}
|
|
1080
1072
|
getClasses() {
|
|
@@ -1088,15 +1080,14 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1088
1080
|
* @param itemIds - The id or a list of ids of the item(s) to apply the css class to
|
|
1089
1081
|
* @param cssClassName - CSS class name
|
|
1090
1082
|
*/
|
|
1091
|
-
setCssClass(
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
this.addState(d), i = this.getState(d);
|
|
1083
|
+
setCssClass(e, s) {
|
|
1084
|
+
e.split(",").forEach((a) => {
|
|
1085
|
+
let r = this.getState(a);
|
|
1086
|
+
if (!r) {
|
|
1087
|
+
const h = a.trim();
|
|
1088
|
+
this.addState(h), r = this.getState(h);
|
|
1098
1089
|
}
|
|
1099
|
-
|
|
1090
|
+
r?.classes?.push(s);
|
|
1100
1091
|
});
|
|
1101
1092
|
}
|
|
1102
1093
|
/**
|
|
@@ -1109,9 +1100,8 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1109
1100
|
* @param itemId - The id of item to apply the style to
|
|
1110
1101
|
* @param styleText - the text of the attributes for the style
|
|
1111
1102
|
*/
|
|
1112
|
-
setStyle(
|
|
1113
|
-
|
|
1114
|
-
(i = (a = this.getState(t)) == null ? void 0 : a.styles) == null || i.push(s);
|
|
1103
|
+
setStyle(e, s) {
|
|
1104
|
+
this.getState(e)?.styles?.push(s);
|
|
1115
1105
|
}
|
|
1116
1106
|
/**
|
|
1117
1107
|
* Add a text style to a state with the given id
|
|
@@ -1119,85 +1109,83 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1119
1109
|
* @param itemId - The id of item to apply the css class to
|
|
1120
1110
|
* @param cssClassName - CSS class name
|
|
1121
1111
|
*/
|
|
1122
|
-
setTextStyle(
|
|
1123
|
-
|
|
1124
|
-
(i = (a = this.getState(t)) == null ? void 0 : a.textStyles) == null || i.push(s);
|
|
1112
|
+
setTextStyle(e, s) {
|
|
1113
|
+
this.getState(e)?.textStyles?.push(s);
|
|
1125
1114
|
}
|
|
1126
1115
|
/**
|
|
1127
1116
|
* Finds the direction statement in the root document.
|
|
1128
1117
|
* @returns the direction statement if present
|
|
1129
1118
|
*/
|
|
1130
1119
|
getDirectionStatement() {
|
|
1131
|
-
return this.rootDoc.find((
|
|
1120
|
+
return this.rootDoc.find((e) => e.stmt === Ot);
|
|
1132
1121
|
}
|
|
1133
1122
|
getDirection() {
|
|
1134
|
-
|
|
1135
|
-
return ((t = this.getDirectionStatement()) == null ? void 0 : t.value) ?? de;
|
|
1123
|
+
return this.getDirectionStatement()?.value ?? de;
|
|
1136
1124
|
}
|
|
1137
|
-
setDirection(
|
|
1125
|
+
setDirection(e) {
|
|
1138
1126
|
const s = this.getDirectionStatement();
|
|
1139
|
-
s ? s.value =
|
|
1127
|
+
s ? s.value = e : this.rootDoc.unshift({ stmt: Ot, value: e });
|
|
1140
1128
|
}
|
|
1141
|
-
trimColon(
|
|
1142
|
-
return
|
|
1129
|
+
trimColon(e) {
|
|
1130
|
+
return e.startsWith(":") ? e.slice(1).trim() : e.trim();
|
|
1143
1131
|
}
|
|
1144
1132
|
getData() {
|
|
1145
|
-
const
|
|
1133
|
+
const e = w();
|
|
1146
1134
|
return {
|
|
1147
1135
|
nodes: this.nodes,
|
|
1148
1136
|
edges: this.edges,
|
|
1149
1137
|
other: {},
|
|
1150
|
-
config:
|
|
1138
|
+
config: e,
|
|
1151
1139
|
direction: Kt(this.getRootDocV2())
|
|
1152
1140
|
};
|
|
1153
1141
|
}
|
|
1154
1142
|
getConfig() {
|
|
1155
|
-
return
|
|
1143
|
+
return w().state;
|
|
1156
1144
|
}
|
|
1157
|
-
},
|
|
1145
|
+
}, u(j, "StateDB"), j.relationType = {
|
|
1158
1146
|
AGGREGATION: 0,
|
|
1159
1147
|
EXTENSION: 1,
|
|
1160
1148
|
COMPOSITION: 2,
|
|
1161
1149
|
DEPENDENCY: 3
|
|
1162
|
-
},
|
|
1150
|
+
}, j), Pe = /* @__PURE__ */ u((t) => `
|
|
1163
1151
|
defs #statediagram-barbEnd {
|
|
1164
|
-
fill: ${
|
|
1165
|
-
stroke: ${
|
|
1152
|
+
fill: ${t.transitionColor};
|
|
1153
|
+
stroke: ${t.transitionColor};
|
|
1166
1154
|
}
|
|
1167
1155
|
g.stateGroup text {
|
|
1168
|
-
fill: ${
|
|
1156
|
+
fill: ${t.nodeBorder};
|
|
1169
1157
|
stroke: none;
|
|
1170
1158
|
font-size: 10px;
|
|
1171
1159
|
}
|
|
1172
1160
|
g.stateGroup text {
|
|
1173
|
-
fill: ${
|
|
1161
|
+
fill: ${t.textColor};
|
|
1174
1162
|
stroke: none;
|
|
1175
1163
|
font-size: 10px;
|
|
1176
1164
|
|
|
1177
1165
|
}
|
|
1178
1166
|
g.stateGroup .state-title {
|
|
1179
1167
|
font-weight: bolder;
|
|
1180
|
-
fill: ${
|
|
1168
|
+
fill: ${t.stateLabelColor};
|
|
1181
1169
|
}
|
|
1182
1170
|
|
|
1183
1171
|
g.stateGroup rect {
|
|
1184
|
-
fill: ${
|
|
1185
|
-
stroke: ${
|
|
1172
|
+
fill: ${t.mainBkg};
|
|
1173
|
+
stroke: ${t.nodeBorder};
|
|
1186
1174
|
}
|
|
1187
1175
|
|
|
1188
1176
|
g.stateGroup line {
|
|
1189
|
-
stroke: ${
|
|
1177
|
+
stroke: ${t.lineColor};
|
|
1190
1178
|
stroke-width: 1;
|
|
1191
1179
|
}
|
|
1192
1180
|
|
|
1193
1181
|
.transition {
|
|
1194
|
-
stroke: ${
|
|
1182
|
+
stroke: ${t.transitionColor};
|
|
1195
1183
|
stroke-width: 1;
|
|
1196
1184
|
fill: none;
|
|
1197
1185
|
}
|
|
1198
1186
|
|
|
1199
1187
|
.stateGroup .composit {
|
|
1200
|
-
fill: ${
|
|
1188
|
+
fill: ${t.background};
|
|
1201
1189
|
border-bottom: 1px
|
|
1202
1190
|
}
|
|
1203
1191
|
|
|
@@ -1207,11 +1195,11 @@ g.stateGroup line {
|
|
|
1207
1195
|
}
|
|
1208
1196
|
|
|
1209
1197
|
.state-note {
|
|
1210
|
-
stroke: ${
|
|
1211
|
-
fill: ${
|
|
1198
|
+
stroke: ${t.noteBorderColor};
|
|
1199
|
+
fill: ${t.noteBkgColor};
|
|
1212
1200
|
|
|
1213
1201
|
text {
|
|
1214
|
-
fill: ${
|
|
1202
|
+
fill: ${t.noteTextColor};
|
|
1215
1203
|
stroke: none;
|
|
1216
1204
|
font-size: 10px;
|
|
1217
1205
|
}
|
|
@@ -1220,82 +1208,82 @@ g.stateGroup line {
|
|
|
1220
1208
|
.stateLabel .box {
|
|
1221
1209
|
stroke: none;
|
|
1222
1210
|
stroke-width: 0;
|
|
1223
|
-
fill: ${
|
|
1211
|
+
fill: ${t.mainBkg};
|
|
1224
1212
|
opacity: 0.5;
|
|
1225
1213
|
}
|
|
1226
1214
|
|
|
1227
1215
|
.edgeLabel .label rect {
|
|
1228
|
-
fill: ${
|
|
1216
|
+
fill: ${t.labelBackgroundColor};
|
|
1229
1217
|
opacity: 0.5;
|
|
1230
1218
|
}
|
|
1231
1219
|
.edgeLabel {
|
|
1232
|
-
background-color: ${
|
|
1220
|
+
background-color: ${t.edgeLabelBackground};
|
|
1233
1221
|
p {
|
|
1234
|
-
background-color: ${
|
|
1222
|
+
background-color: ${t.edgeLabelBackground};
|
|
1235
1223
|
}
|
|
1236
1224
|
rect {
|
|
1237
1225
|
opacity: 0.5;
|
|
1238
|
-
background-color: ${
|
|
1239
|
-
fill: ${
|
|
1226
|
+
background-color: ${t.edgeLabelBackground};
|
|
1227
|
+
fill: ${t.edgeLabelBackground};
|
|
1240
1228
|
}
|
|
1241
1229
|
text-align: center;
|
|
1242
1230
|
}
|
|
1243
1231
|
.edgeLabel .label text {
|
|
1244
|
-
fill: ${
|
|
1232
|
+
fill: ${t.transitionLabelColor || t.tertiaryTextColor};
|
|
1245
1233
|
}
|
|
1246
1234
|
.label div .edgeLabel {
|
|
1247
|
-
color: ${
|
|
1235
|
+
color: ${t.transitionLabelColor || t.tertiaryTextColor};
|
|
1248
1236
|
}
|
|
1249
1237
|
|
|
1250
1238
|
.stateLabel text {
|
|
1251
|
-
fill: ${
|
|
1239
|
+
fill: ${t.stateLabelColor};
|
|
1252
1240
|
font-size: 10px;
|
|
1253
1241
|
font-weight: bold;
|
|
1254
1242
|
}
|
|
1255
1243
|
|
|
1256
1244
|
.node circle.state-start {
|
|
1257
|
-
fill: ${
|
|
1258
|
-
stroke: ${
|
|
1245
|
+
fill: ${t.specialStateColor};
|
|
1246
|
+
stroke: ${t.specialStateColor};
|
|
1259
1247
|
}
|
|
1260
1248
|
|
|
1261
1249
|
.node .fork-join {
|
|
1262
|
-
fill: ${
|
|
1263
|
-
stroke: ${
|
|
1250
|
+
fill: ${t.specialStateColor};
|
|
1251
|
+
stroke: ${t.specialStateColor};
|
|
1264
1252
|
}
|
|
1265
1253
|
|
|
1266
1254
|
.node circle.state-end {
|
|
1267
|
-
fill: ${
|
|
1268
|
-
stroke: ${
|
|
1255
|
+
fill: ${t.innerEndBackground};
|
|
1256
|
+
stroke: ${t.background};
|
|
1269
1257
|
stroke-width: 1.5
|
|
1270
1258
|
}
|
|
1271
1259
|
.end-state-inner {
|
|
1272
|
-
fill: ${
|
|
1273
|
-
// stroke: ${
|
|
1260
|
+
fill: ${t.compositeBackground || t.background};
|
|
1261
|
+
// stroke: ${t.background};
|
|
1274
1262
|
stroke-width: 1.5
|
|
1275
1263
|
}
|
|
1276
1264
|
|
|
1277
1265
|
.node rect {
|
|
1278
|
-
fill: ${
|
|
1279
|
-
stroke: ${
|
|
1266
|
+
fill: ${t.stateBkg || t.mainBkg};
|
|
1267
|
+
stroke: ${t.stateBorder || t.nodeBorder};
|
|
1280
1268
|
stroke-width: 1px;
|
|
1281
1269
|
}
|
|
1282
1270
|
.node polygon {
|
|
1283
|
-
fill: ${
|
|
1284
|
-
stroke: ${
|
|
1271
|
+
fill: ${t.mainBkg};
|
|
1272
|
+
stroke: ${t.stateBorder || t.nodeBorder};;
|
|
1285
1273
|
stroke-width: 1px;
|
|
1286
1274
|
}
|
|
1287
1275
|
#statediagram-barbEnd {
|
|
1288
|
-
fill: ${
|
|
1276
|
+
fill: ${t.lineColor};
|
|
1289
1277
|
}
|
|
1290
1278
|
|
|
1291
1279
|
.statediagram-cluster rect {
|
|
1292
|
-
fill: ${
|
|
1293
|
-
stroke: ${
|
|
1280
|
+
fill: ${t.compositeTitleBackground};
|
|
1281
|
+
stroke: ${t.stateBorder || t.nodeBorder};
|
|
1294
1282
|
stroke-width: 1px;
|
|
1295
1283
|
}
|
|
1296
1284
|
|
|
1297
1285
|
.cluster-label, .nodeLabel {
|
|
1298
|
-
color: ${
|
|
1286
|
+
color: ${t.stateLabelColor};
|
|
1299
1287
|
// line-height: 1;
|
|
1300
1288
|
}
|
|
1301
1289
|
|
|
@@ -1304,7 +1292,7 @@ g.stateGroup line {
|
|
|
1304
1292
|
ry: 5px;
|
|
1305
1293
|
}
|
|
1306
1294
|
.statediagram-state .divider {
|
|
1307
|
-
stroke: ${
|
|
1295
|
+
stroke: ${t.stateBorder || t.nodeBorder};
|
|
1308
1296
|
}
|
|
1309
1297
|
|
|
1310
1298
|
.statediagram-state .title-state {
|
|
@@ -1312,10 +1300,10 @@ g.stateGroup line {
|
|
|
1312
1300
|
ry: 5px;
|
|
1313
1301
|
}
|
|
1314
1302
|
.statediagram-cluster.statediagram-cluster .inner {
|
|
1315
|
-
fill: ${
|
|
1303
|
+
fill: ${t.compositeBackground || t.background};
|
|
1316
1304
|
}
|
|
1317
1305
|
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
1318
|
-
fill: ${
|
|
1306
|
+
fill: ${t.altBackground ? t.altBackground : "#efefef"};
|
|
1319
1307
|
}
|
|
1320
1308
|
|
|
1321
1309
|
.statediagram-cluster .inner {
|
|
@@ -1329,7 +1317,7 @@ g.stateGroup line {
|
|
|
1329
1317
|
}
|
|
1330
1318
|
.statediagram-state rect.divider {
|
|
1331
1319
|
stroke-dasharray: 10,10;
|
|
1332
|
-
fill: ${
|
|
1320
|
+
fill: ${t.altBackground ? t.altBackground : "#efefef"};
|
|
1333
1321
|
}
|
|
1334
1322
|
|
|
1335
1323
|
.note-edge {
|
|
@@ -1337,41 +1325,41 @@ g.stateGroup line {
|
|
|
1337
1325
|
}
|
|
1338
1326
|
|
|
1339
1327
|
.statediagram-note rect {
|
|
1340
|
-
fill: ${
|
|
1341
|
-
stroke: ${
|
|
1328
|
+
fill: ${t.noteBkgColor};
|
|
1329
|
+
stroke: ${t.noteBorderColor};
|
|
1342
1330
|
stroke-width: 1px;
|
|
1343
1331
|
rx: 0;
|
|
1344
1332
|
ry: 0;
|
|
1345
1333
|
}
|
|
1346
1334
|
.statediagram-note rect {
|
|
1347
|
-
fill: ${
|
|
1348
|
-
stroke: ${
|
|
1335
|
+
fill: ${t.noteBkgColor};
|
|
1336
|
+
stroke: ${t.noteBorderColor};
|
|
1349
1337
|
stroke-width: 1px;
|
|
1350
1338
|
rx: 0;
|
|
1351
1339
|
ry: 0;
|
|
1352
1340
|
}
|
|
1353
1341
|
|
|
1354
1342
|
.statediagram-note text {
|
|
1355
|
-
fill: ${
|
|
1343
|
+
fill: ${t.noteTextColor};
|
|
1356
1344
|
}
|
|
1357
1345
|
|
|
1358
1346
|
.statediagram-note .nodeLabel {
|
|
1359
|
-
color: ${
|
|
1347
|
+
color: ${t.noteTextColor};
|
|
1360
1348
|
}
|
|
1361
1349
|
.statediagram .edgeLabel {
|
|
1362
|
-
color: red; // ${
|
|
1350
|
+
color: red; // ${t.noteTextColor};
|
|
1363
1351
|
}
|
|
1364
1352
|
|
|
1365
1353
|
#dependencyStart, #dependencyEnd {
|
|
1366
|
-
fill: ${
|
|
1367
|
-
stroke: ${
|
|
1354
|
+
fill: ${t.lineColor};
|
|
1355
|
+
stroke: ${t.lineColor};
|
|
1368
1356
|
stroke-width: 1;
|
|
1369
1357
|
}
|
|
1370
1358
|
|
|
1371
1359
|
.statediagramTitleText {
|
|
1372
1360
|
text-anchor: middle;
|
|
1373
1361
|
font-size: 18px;
|
|
1374
|
-
fill: ${
|
|
1362
|
+
fill: ${t.textColor};
|
|
1375
1363
|
}
|
|
1376
1364
|
`, "getStyles"), Ue = Pe;
|
|
1377
1365
|
export {
|