@kong-ui-public/documentation 0.7.2 → 0.7.4
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/arc-BOwQG9_0-DleiJ5MN.js +86 -0
- package/dist/{blockDiagram-9f4a6865-IUliCiDO-CB0IBm1m.js → blockDiagram-6b2b5046-Nxmf6ECX-CjmiHCoc.js} +106 -106
- package/dist/{c4Diagram-ae766693-CraPSkgX-CsP6MA7_.js → c4Diagram-b947cdbb-Cqv3kxuJ-BXRu2bPz.js} +132 -133
- package/dist/{channel-BN6QTnj4-CfiMWXq0.js → channel-b8lMD3zZ-Ds1AntZz.js} +1 -1
- package/dist/{classDiagram-fb54d2a0-DXWl4-1y-CoIPJ9Tf.js → classDiagram-35230388-cNSawuF--DF1WKJvq.js} +7 -8
- package/dist/{classDiagram-v2-a2b738ad-CuRy1r-r-SMHLTRcJ.js → classDiagram-v2-412acd34-DL9yPzEL-1zjaSugS.js} +8 -8
- package/dist/{clone-DPlFlx1_-B6OhGku3.js → clone-DA9j_md9-DOEHuNxk.js} +1 -1
- package/dist/{createText-ca0c5216-BJXIFjUv-B9Xp5z9K.js → createText-423428c9-Bi8tqKOA-BAeSkls4.js} +1 -2
- package/dist/documentation.es.js +2 -2
- package/dist/documentation.umd.js +724 -995
- package/dist/{edges-066a5561-DyIiUH3I-B88mxBJO.js → edges-d417c7a0-CyiospL7-DxH-v6Cl.js} +27 -28
- package/dist/{erDiagram-09d1c15f-DaNxb97t-DI2sOo4s.js → erDiagram-0ea73325-BWWWgAmd-aPslvlbz.js} +38 -38
- package/dist/{flowDb-c1833063-4TreIkwu-DLOEDd2f.js → flowDb-d35e309a-BQRCRAKf-Cf6biv5M.js} +4 -4
- package/dist/{flowDiagram-b222e15a-Bz6kEL6X-B4McfssH.js → flowDiagram-d949d7c1-D_OK65PK-DS0CyGIC.js} +329 -337
- package/dist/{flowDiagram-v2-13329dc7-BSJVxEBD-CR0v6C6O.js → flowDiagram-v2-49332944-CYs4MQAb-C9m-G3JY.js} +5 -5
- package/dist/{flowchart-elk-definition-ae0efee6-D_SQlTEw-DHjq3NxL.js → flowchart-elk-definition-27cc417a-OqMBrUum-CbH3NCkB.js} +12750 -12752
- package/dist/{ganttDiagram-b62c793e-w82uNNex-OPrei_7k.js → ganttDiagram-5c869e3b-Cu9aCqHh-De0u-Oas.js} +477 -488
- package/dist/gitGraphDiagram-b9d81de9-DVB2N99Y-C2np-enA.js +1262 -0
- package/dist/go-BEtjQGEI-BEtjQGEI.js +7 -0
- package/dist/{graph-Bb1vku7A-CjMAyaMV.js → graph-Ctghcdhb-CqAdUKOZ.js} +3 -3
- package/dist/{index-01f381cb-DFAckdb4-DP_D7ZMM.js → index-8fae9850-CdUaE101-uMPVRleJ.js} +11 -11
- package/dist/{index-74HaIrFw.js → index-BRYBB2aM.js} +6920 -6981
- package/dist/{infoDiagram-94cd232f-iYUDXeae-DbxyZ1YG.js → infoDiagram-db7b18fc-MHPWI9K2-Cy6tzigE.js} +16 -16
- package/dist/{journeyDiagram-6625b456-D9SzlG49-D9WC6928.js → journeyDiagram-d5636530-O6dkdrZq-BghpQv6u.js} +42 -42
- package/dist/{latex-CoJDAuLL-lJGSmtOO.js → latex-BOFs-Cxs-XUibdaju.js} +1 -1
- package/dist/{layout-BXWpVE1y-Dpdx9MjN.js → layout-Bf4siL6f-B27qrAUf.js} +110 -110
- package/dist/{line-cygqshb4-ChLkD5zh.js → line-Bs4J8z8n-kq8RtDQA.js} +1 -1
- package/dist/{linear-c7VKFbmv-Bcl7PKrY.js → linear-DG5qhwMV-BSSd8kt2.js} +21 -21
- package/dist/{mindmap-definition-307c710a-Dtax51Qo-DiTPR9DS.js → mindmap-definition-377f8f1f-BJZNhhv8-Cinm-UDt.js} +6496 -6729
- package/dist/{pieDiagram-bb1d19e5-MIBQswLW-DwEeDM9B.js → pieDiagram-b0208e96-12B2qtCQ-Bl-9vJIA.js} +68 -68
- package/dist/{quadrantDiagram-c759a472-CUBvKLS1-BFYNBXmR.js → quadrantDiagram-0332be45-B77W50pM-bQiH7XpR.js} +2 -2
- package/dist/{requirementDiagram-87253d64-BZrSGm9j-BTMRMufk.js → requirementDiagram-bf7890df-BfPNYjQ5-CGF46ifn.js} +30 -30
- package/dist/{sankeyDiagram-707fac0f-BMrqHGsv-B27LQLYG.js → sankeyDiagram-0acdec17-D5aZuYoJ-DIWEEtuf.js} +22 -22
- package/dist/{sequenceDiagram-6894f283-CKZurmNK-kn3T54cJ.js → sequenceDiagram-c18d009d-DE6VyN7w-6UaAYk4p.js} +808 -841
- package/dist/{stateDiagram-5dee940d-uylU1OS0-DApYcfZ7.js → stateDiagram-43596fc0-CfGH1LmM-km5kjci0.js} +54 -54
- package/dist/{stateDiagram-v2-1992cada-JYJWGRv5-C-8aN2Zs.js → stateDiagram-v2-2ead4f9c-CvDoRhMn-CkUl-Lcu.js} +12 -12
- package/dist/style.css +1 -1
- package/dist/{styles-b83b31c9-BkcEKpp1-AMZ_2CDs.js → styles-6860f46c-CJplL-uW-BFTTeCMF.js} +19 -19
- package/dist/{styles-483fbfea-_Tntk7zw-BMvdfSW3.js → styles-7383a064-N1ljH9gq-D7Iipjtf.js} +137 -140
- package/dist/{styles-0784dbeb-CN_Kv1lZ-BqcZ7Gdy.js → styles-b2c874b6-CKJLyUE4-2C22cylE.js} +24 -24
- package/dist/{svgDrawCommon-5e1cfd1d--PZSQhO7-VrjnCid8.js → svgDrawCommon-0ee1b4e9-Dc25Bs_w-QhIkJ1Xp.js} +4 -4
- package/dist/{timeline-definition-bf702344-DVMY6q6d-BYAHqkvN.js → timeline-definition-d977decf-8C3XuDC--DAD2knZY.js} +2 -2
- package/dist/{vue-Djs4WzmL-BDWKKO52.js → vue-DoU_Nr9K-Cj2gXb1y.js} +2 -2
- package/dist/{vue-html-CdlOxrsR-C0P0LsFn.js → vue-html-iC7i5f9n-Cfh5ktA3.js} +1 -1
- package/dist/{xychartDiagram-f11f50a6-CfFXg3YO-BJuC_16u.js → xychartDiagram-e50adddc-BRQAut2i-DBHY1QQ6.js} +22 -22
- package/package.json +5 -5
- package/dist/arc-Db-G4La6-9oHI8HT5.js +0 -86
- package/dist/gitGraphDiagram-942e62fe-DN0JwANo-r5Axb-YL.js +0 -1264
- package/dist/go-DYNyFS5n-DYNyFS5n.js +0 -7
- package/dist/katex-BQC_klMa-CaeA20wX.js +0 -11636
|
@@ -1,271 +1,271 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
var t = function(
|
|
5
|
-
for (k = k || {},
|
|
1
|
+
import { m as Kt, g as me, x as be, v as ye, c as lt, s as Ut, b as fe, a as Ee, j as P, aM as Gt, z as Te, l as j, d as kt, b0 as we, e as Pe, h as vt, i as ve, y as $ } from "./index-BRYBB2aM.js";
|
|
2
|
+
import { c as ke, x as _e, y as Le, h as Ie, p as Yt, g as _t } from "./svgDrawCommon-0ee1b4e9-Dc25Bs_w-QhIkJ1Xp.js";
|
|
3
|
+
var Dt = function() {
|
|
4
|
+
var t = function(at, f, k, b) {
|
|
5
|
+
for (k = k || {}, b = at.length; b--; k[at[b]] = f)
|
|
6
6
|
;
|
|
7
7
|
return k;
|
|
8
|
-
}, e = [1, 2], c = [1, 3], a = [1, 4], s = [2, 4], i = [1, 9], l = [1, 11],
|
|
8
|
+
}, e = [1, 2], c = [1, 3], a = [1, 4], s = [2, 4], i = [1, 9], l = [1, 11], d = [1, 13], p = [1, 14], r = [1, 16], x = [1, 17], E = [1, 18], g = [1, 24], m = [1, 25], w = [1, 26], _ = [1, 27], I = [1, 28], O = [1, 29], M = [1, 30], V = [1, 31], S = [1, 32], tt = [1, 33], F = [1, 34], X = [1, 35], G = [1, 36], W = [1, 37], B = [1, 38], C = [1, 39], K = [1, 41], q = [1, 42], U = [1, 43], J = [1, 44], Z = [1, 45], y = [1, 46], v = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], L = [4, 5, 16, 50, 52, 53], dt = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], et = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], N = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], Wt = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], ct = [68, 69, 70], it = [1, 120], It = {
|
|
9
9
|
trace: function() {
|
|
10
10
|
},
|
|
11
11
|
yy: {},
|
|
12
12
|
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, box_section: 10, box_line: 11, participant_statement: 12, create: 13, box: 14, restOfLine: 15, end: 16, signal: 17, autonumber: 18, NUM: 19, off: 20, activate: 21, actor: 22, deactivate: 23, note_statement: 24, links_statement: 25, link_statement: 26, properties_statement: 27, details_statement: 28, title: 29, legacy_title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, loop: 36, rect: 37, opt: 38, alt: 39, else_sections: 40, par: 41, par_sections: 42, par_over: 43, critical: 44, option_sections: 45, break: 46, option: 47, and: 48, else: 49, participant: 50, AS: 51, participant_actor: 52, destroy: 53, note: 54, placement: 55, text2: 56, over: 57, actor_pair: 58, links: 59, link: 60, properties: 61, details: 62, spaceList: 63, ",": 64, left_of: 65, right_of: 66, signaltype: 67, "+": 68, "-": 69, ACTOR: 70, SOLID_OPEN_ARROW: 71, DOTTED_OPEN_ARROW: 72, SOLID_ARROW: 73, DOTTED_ARROW: 74, SOLID_CROSS: 75, DOTTED_CROSS: 76, SOLID_POINT: 77, DOTTED_POINT: 78, TXT: 79, $accept: 0, $end: 1 },
|
|
13
13
|
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" },
|
|
14
14
|
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
|
|
15
|
-
performAction: function(
|
|
16
|
-
var
|
|
15
|
+
performAction: function(at, f, k, b, A, n, z) {
|
|
16
|
+
var h = n.length - 1;
|
|
17
17
|
switch (A) {
|
|
18
18
|
case 3:
|
|
19
|
-
return
|
|
19
|
+
return b.apply(n[h]), n[h];
|
|
20
20
|
case 4:
|
|
21
21
|
case 9:
|
|
22
22
|
this.$ = [];
|
|
23
23
|
break;
|
|
24
24
|
case 5:
|
|
25
25
|
case 10:
|
|
26
|
-
|
|
26
|
+
n[h - 1].push(n[h]), this.$ = n[h - 1];
|
|
27
27
|
break;
|
|
28
28
|
case 6:
|
|
29
29
|
case 7:
|
|
30
30
|
case 11:
|
|
31
31
|
case 12:
|
|
32
|
-
this.$ =
|
|
32
|
+
this.$ = n[h];
|
|
33
33
|
break;
|
|
34
34
|
case 8:
|
|
35
35
|
case 13:
|
|
36
36
|
this.$ = [];
|
|
37
37
|
break;
|
|
38
38
|
case 15:
|
|
39
|
-
|
|
39
|
+
n[h].type = "createParticipant", this.$ = n[h];
|
|
40
40
|
break;
|
|
41
41
|
case 16:
|
|
42
|
-
|
|
42
|
+
n[h - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(n[h - 2]) }), n[h - 1].push({ type: "boxEnd", boxText: n[h - 2] }), this.$ = n[h - 1];
|
|
43
43
|
break;
|
|
44
44
|
case 18:
|
|
45
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(
|
|
45
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(n[h - 2]), sequenceIndexStep: Number(n[h - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
46
46
|
break;
|
|
47
47
|
case 19:
|
|
48
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(
|
|
48
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(n[h - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
49
49
|
break;
|
|
50
50
|
case 20:
|
|
51
|
-
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType:
|
|
51
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
|
|
52
52
|
break;
|
|
53
53
|
case 21:
|
|
54
|
-
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType:
|
|
54
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
55
55
|
break;
|
|
56
56
|
case 22:
|
|
57
|
-
this.$ = { type: "activeStart", signalType:
|
|
57
|
+
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: n[h - 1] };
|
|
58
58
|
break;
|
|
59
59
|
case 23:
|
|
60
|
-
this.$ = { type: "activeEnd", signalType:
|
|
60
|
+
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: n[h - 1] };
|
|
61
61
|
break;
|
|
62
62
|
case 29:
|
|
63
|
-
|
|
63
|
+
b.setDiagramTitle(n[h].substring(6)), this.$ = n[h].substring(6);
|
|
64
64
|
break;
|
|
65
65
|
case 30:
|
|
66
|
-
|
|
66
|
+
b.setDiagramTitle(n[h].substring(7)), this.$ = n[h].substring(7);
|
|
67
67
|
break;
|
|
68
68
|
case 31:
|
|
69
|
-
this.$ =
|
|
69
|
+
this.$ = n[h].trim(), b.setAccTitle(this.$);
|
|
70
70
|
break;
|
|
71
71
|
case 32:
|
|
72
72
|
case 33:
|
|
73
|
-
this.$ =
|
|
73
|
+
this.$ = n[h].trim(), b.setAccDescription(this.$);
|
|
74
74
|
break;
|
|
75
75
|
case 34:
|
|
76
|
-
|
|
76
|
+
n[h - 1].unshift({ type: "loopStart", loopText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.LOOP_START }), n[h - 1].push({ type: "loopEnd", loopText: n[h - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = n[h - 1];
|
|
77
77
|
break;
|
|
78
78
|
case 35:
|
|
79
|
-
|
|
79
|
+
n[h - 1].unshift({ type: "rectStart", color: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.RECT_START }), n[h - 1].push({ type: "rectEnd", color: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = n[h - 1];
|
|
80
80
|
break;
|
|
81
81
|
case 36:
|
|
82
|
-
|
|
82
|
+
n[h - 1].unshift({ type: "optStart", optText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.OPT_START }), n[h - 1].push({ type: "optEnd", optText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = n[h - 1];
|
|
83
83
|
break;
|
|
84
84
|
case 37:
|
|
85
|
-
|
|
85
|
+
n[h - 1].unshift({ type: "altStart", altText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.ALT_START }), n[h - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = n[h - 1];
|
|
86
86
|
break;
|
|
87
87
|
case 38:
|
|
88
|
-
|
|
88
|
+
n[h - 1].unshift({ type: "parStart", parText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.PAR_START }), n[h - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = n[h - 1];
|
|
89
89
|
break;
|
|
90
90
|
case 39:
|
|
91
|
-
|
|
91
|
+
n[h - 1].unshift({ type: "parStart", parText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.PAR_OVER_START }), n[h - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = n[h - 1];
|
|
92
92
|
break;
|
|
93
93
|
case 40:
|
|
94
|
-
|
|
94
|
+
n[h - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.CRITICAL_START }), n[h - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = n[h - 1];
|
|
95
95
|
break;
|
|
96
96
|
case 41:
|
|
97
|
-
|
|
97
|
+
n[h - 1].unshift({ type: "breakStart", breakText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.BREAK_START }), n[h - 1].push({ type: "breakEnd", optText: b.parseMessage(n[h - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = n[h - 1];
|
|
98
98
|
break;
|
|
99
99
|
case 43:
|
|
100
|
-
this.$ =
|
|
100
|
+
this.$ = n[h - 3].concat([{ type: "option", optionText: b.parseMessage(n[h - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, n[h]]);
|
|
101
101
|
break;
|
|
102
102
|
case 45:
|
|
103
|
-
this.$ =
|
|
103
|
+
this.$ = n[h - 3].concat([{ type: "and", parText: b.parseMessage(n[h - 1]), signalType: b.LINETYPE.PAR_AND }, n[h]]);
|
|
104
104
|
break;
|
|
105
105
|
case 47:
|
|
106
|
-
this.$ =
|
|
106
|
+
this.$ = n[h - 3].concat([{ type: "else", altText: b.parseMessage(n[h - 1]), signalType: b.LINETYPE.ALT_ELSE }, n[h]]);
|
|
107
107
|
break;
|
|
108
108
|
case 48:
|
|
109
|
-
|
|
109
|
+
n[h - 3].draw = "participant", n[h - 3].type = "addParticipant", n[h - 3].description = b.parseMessage(n[h - 1]), this.$ = n[h - 3];
|
|
110
110
|
break;
|
|
111
111
|
case 49:
|
|
112
|
-
|
|
112
|
+
n[h - 1].draw = "participant", n[h - 1].type = "addParticipant", this.$ = n[h - 1];
|
|
113
113
|
break;
|
|
114
114
|
case 50:
|
|
115
|
-
|
|
115
|
+
n[h - 3].draw = "actor", n[h - 3].type = "addParticipant", n[h - 3].description = b.parseMessage(n[h - 1]), this.$ = n[h - 3];
|
|
116
116
|
break;
|
|
117
117
|
case 51:
|
|
118
|
-
|
|
118
|
+
n[h - 1].draw = "actor", n[h - 1].type = "addParticipant", this.$ = n[h - 1];
|
|
119
119
|
break;
|
|
120
120
|
case 52:
|
|
121
|
-
|
|
121
|
+
n[h - 1].type = "destroyParticipant", this.$ = n[h - 1];
|
|
122
122
|
break;
|
|
123
123
|
case 53:
|
|
124
|
-
this.$ = [
|
|
124
|
+
this.$ = [n[h - 1], { type: "addNote", placement: n[h - 2], actor: n[h - 1].actor, text: n[h] }];
|
|
125
125
|
break;
|
|
126
126
|
case 54:
|
|
127
|
-
|
|
127
|
+
n[h - 2] = [].concat(n[h - 1], n[h - 1]).slice(0, 2), n[h - 2][0] = n[h - 2][0].actor, n[h - 2][1] = n[h - 2][1].actor, this.$ = [n[h - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: n[h - 2].slice(0, 2), text: n[h] }];
|
|
128
128
|
break;
|
|
129
129
|
case 55:
|
|
130
|
-
this.$ = [
|
|
130
|
+
this.$ = [n[h - 1], { type: "addLinks", actor: n[h - 1].actor, text: n[h] }];
|
|
131
131
|
break;
|
|
132
132
|
case 56:
|
|
133
|
-
this.$ = [
|
|
133
|
+
this.$ = [n[h - 1], { type: "addALink", actor: n[h - 1].actor, text: n[h] }];
|
|
134
134
|
break;
|
|
135
135
|
case 57:
|
|
136
|
-
this.$ = [
|
|
136
|
+
this.$ = [n[h - 1], { type: "addProperties", actor: n[h - 1].actor, text: n[h] }];
|
|
137
137
|
break;
|
|
138
138
|
case 58:
|
|
139
|
-
this.$ = [
|
|
139
|
+
this.$ = [n[h - 1], { type: "addDetails", actor: n[h - 1].actor, text: n[h] }];
|
|
140
140
|
break;
|
|
141
141
|
case 61:
|
|
142
|
-
this.$ = [
|
|
142
|
+
this.$ = [n[h - 2], n[h]];
|
|
143
143
|
break;
|
|
144
144
|
case 62:
|
|
145
|
-
this.$ =
|
|
145
|
+
this.$ = n[h];
|
|
146
146
|
break;
|
|
147
147
|
case 63:
|
|
148
|
-
this.$ =
|
|
148
|
+
this.$ = b.PLACEMENT.LEFTOF;
|
|
149
149
|
break;
|
|
150
150
|
case 64:
|
|
151
|
-
this.$ =
|
|
151
|
+
this.$ = b.PLACEMENT.RIGHTOF;
|
|
152
152
|
break;
|
|
153
153
|
case 65:
|
|
154
154
|
this.$ = [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{ type: "addMessage", from:
|
|
158
|
-
{ type: "activeStart", signalType:
|
|
155
|
+
n[h - 4],
|
|
156
|
+
n[h - 1],
|
|
157
|
+
{ type: "addMessage", from: n[h - 4].actor, to: n[h - 1].actor, signalType: n[h - 3], msg: n[h], activate: !0 },
|
|
158
|
+
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: n[h - 1] }
|
|
159
159
|
];
|
|
160
160
|
break;
|
|
161
161
|
case 66:
|
|
162
162
|
this.$ = [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
{ type: "addMessage", from:
|
|
166
|
-
{ type: "activeEnd", signalType:
|
|
163
|
+
n[h - 4],
|
|
164
|
+
n[h - 1],
|
|
165
|
+
{ type: "addMessage", from: n[h - 4].actor, to: n[h - 1].actor, signalType: n[h - 3], msg: n[h] },
|
|
166
|
+
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: n[h - 4] }
|
|
167
167
|
];
|
|
168
168
|
break;
|
|
169
169
|
case 67:
|
|
170
|
-
this.$ = [
|
|
170
|
+
this.$ = [n[h - 3], n[h - 1], { type: "addMessage", from: n[h - 3].actor, to: n[h - 1].actor, signalType: n[h - 2], msg: n[h] }];
|
|
171
171
|
break;
|
|
172
172
|
case 68:
|
|
173
|
-
this.$ = { type: "addParticipant", actor:
|
|
173
|
+
this.$ = { type: "addParticipant", actor: n[h] };
|
|
174
174
|
break;
|
|
175
175
|
case 69:
|
|
176
|
-
this.$ =
|
|
176
|
+
this.$ = b.LINETYPE.SOLID_OPEN;
|
|
177
177
|
break;
|
|
178
178
|
case 70:
|
|
179
|
-
this.$ =
|
|
179
|
+
this.$ = b.LINETYPE.DOTTED_OPEN;
|
|
180
180
|
break;
|
|
181
181
|
case 71:
|
|
182
|
-
this.$ =
|
|
182
|
+
this.$ = b.LINETYPE.SOLID;
|
|
183
183
|
break;
|
|
184
184
|
case 72:
|
|
185
|
-
this.$ =
|
|
185
|
+
this.$ = b.LINETYPE.DOTTED;
|
|
186
186
|
break;
|
|
187
187
|
case 73:
|
|
188
|
-
this.$ =
|
|
188
|
+
this.$ = b.LINETYPE.SOLID_CROSS;
|
|
189
189
|
break;
|
|
190
190
|
case 74:
|
|
191
|
-
this.$ =
|
|
191
|
+
this.$ = b.LINETYPE.DOTTED_CROSS;
|
|
192
192
|
break;
|
|
193
193
|
case 75:
|
|
194
|
-
this.$ =
|
|
194
|
+
this.$ = b.LINETYPE.SOLID_POINT;
|
|
195
195
|
break;
|
|
196
196
|
case 76:
|
|
197
|
-
this.$ =
|
|
197
|
+
this.$ = b.LINETYPE.DOTTED_POINT;
|
|
198
198
|
break;
|
|
199
199
|
case 77:
|
|
200
|
-
this.$ =
|
|
200
|
+
this.$ = b.parseMessage(n[h].trim().substring(1));
|
|
201
201
|
break;
|
|
202
202
|
}
|
|
203
203
|
},
|
|
204
|
-
table: [{ 3: 1, 4: e, 5: c, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: c, 6: a }, { 3: 6, 4: e, 5: c, 6: a }, t([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], s, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13:
|
|
204
|
+
table: [{ 3: 1, 4: e, 5: c, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: c, 6: a }, { 3: 6, 4: e, 5: c, 6: a }, t([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], s, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, t(v, [2, 5]), { 9: 47, 12: 12, 13: d, 14: p, 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, t(v, [2, 7]), t(v, [2, 8]), t(v, [2, 14]), { 12: 48, 50: W, 52: B, 53: C }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: y }, { 22: 55, 70: y }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(v, [2, 29]), t(v, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(v, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: y }, { 22: 72, 70: y }, { 22: 73, 70: y }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: y }, { 22: 88, 70: y }, { 22: 89, 70: y }, { 22: 90, 70: y }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), t(v, [2, 6]), t(v, [2, 15]), t(L, [2, 9], { 10: 91 }), t(v, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, t(v, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, t(v, [2, 24]), t(v, [2, 25]), t(v, [2, 26]), t(v, [2, 27]), t(v, [2, 28]), t(v, [2, 31]), t(v, [2, 32]), t(dt, s, { 7: 97 }), t(dt, s, { 7: 98 }), t(dt, s, { 7: 99 }), t(et, s, { 40: 100, 7: 101 }), t(N, s, { 42: 102, 7: 103 }), t(N, s, { 7: 103, 42: 104 }), t(Wt, s, { 45: 105, 7: 106 }), t(dt, s, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: y }, t(ct, [2, 69]), t(ct, [2, 70]), t(ct, [2, 71]), t(ct, [2, 72]), t(ct, [2, 73]), t(ct, [2, 74]), t(ct, [2, 75]), t(ct, [2, 76]), { 22: 116, 70: y }, { 22: 118, 58: 117, 70: y }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: it }, { 56: 121, 79: it }, { 56: 122, 79: it }, { 56: 123, 79: it }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: W, 52: B, 53: C }, { 5: [1, 129] }, t(v, [2, 19]), t(v, [2, 20]), t(v, [2, 22]), t(v, [2, 23]), { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [1, 130], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [1, 131], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [1, 132], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 16: [1, 133] }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [2, 46], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 49: [1, 134], 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 16: [1, 135] }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [2, 44], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 48: [1, 136], 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [2, 42], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 47: [1, 139], 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: d, 14: p, 16: [1, 140], 17: 15, 18: r, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: m, 31: w, 33: _, 35: I, 36: O, 37: M, 38: V, 39: S, 41: tt, 43: F, 44: X, 46: G, 50: W, 52: B, 53: C, 54: K, 59: q, 60: U, 61: J, 62: Z, 70: y }, { 15: [1, 141] }, t(v, [2, 49]), { 15: [1, 142] }, t(v, [2, 51]), t(v, [2, 52]), { 22: 143, 70: y }, { 22: 144, 70: y }, { 56: 145, 79: it }, { 56: 146, 79: it }, { 56: 147, 79: it }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(v, [2, 16]), t(L, [2, 10]), { 12: 149, 50: W, 52: B, 53: C }, t(L, [2, 12]), t(L, [2, 13]), t(v, [2, 18]), t(v, [2, 34]), t(v, [2, 35]), t(v, [2, 36]), t(v, [2, 37]), { 15: [1, 150] }, t(v, [2, 38]), { 15: [1, 151] }, t(v, [2, 39]), t(v, [2, 40]), { 15: [1, 152] }, t(v, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: it }, { 56: 156, 79: it }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: y }, t(L, [2, 11]), t(et, s, { 7: 101, 40: 158 }), t(N, s, { 7: 103, 42: 159 }), t(Wt, s, { 7: 106, 45: 160 }), t(v, [2, 48]), t(v, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
|
|
205
205
|
defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] },
|
|
206
|
-
parseError: function(
|
|
207
|
-
if (
|
|
208
|
-
this.trace(
|
|
206
|
+
parseError: function(at, f) {
|
|
207
|
+
if (f.recoverable)
|
|
208
|
+
this.trace(at);
|
|
209
209
|
else {
|
|
210
|
-
var k = new Error(
|
|
211
|
-
throw k.hash =
|
|
210
|
+
var k = new Error(at);
|
|
211
|
+
throw k.hash = f, k;
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
parse: function(
|
|
215
|
-
var
|
|
216
|
-
for (var
|
|
217
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
218
|
-
Y.setInput(
|
|
219
|
-
var
|
|
220
|
-
|
|
221
|
-
var
|
|
214
|
+
parse: function(at) {
|
|
215
|
+
var f = this, k = [0], b = [], A = [null], n = [], z = this.table, h = "", Tt = 0, qt = 0, pe = 2, zt = 1, ge = n.slice.call(arguments, 1), Y = Object.create(this.lexer), ht = { yy: {} };
|
|
216
|
+
for (var Mt in this.yy)
|
|
217
|
+
Object.prototype.hasOwnProperty.call(this.yy, Mt) && (ht.yy[Mt] = this.yy[Mt]);
|
|
218
|
+
Y.setInput(at, ht.yy), ht.yy.lexer = Y, ht.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
|
|
219
|
+
var At = Y.yylloc;
|
|
220
|
+
n.push(At);
|
|
221
|
+
var ue = Y.options && Y.options.ranges;
|
|
222
222
|
typeof ht.yy.parseError == "function" ? this.parseError = ht.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
223
|
-
function
|
|
224
|
-
var
|
|
225
|
-
return
|
|
223
|
+
function xe() {
|
|
224
|
+
var nt;
|
|
225
|
+
return nt = b.pop() || Y.lex() || zt, typeof nt != "number" && (nt instanceof Array && (b = nt, nt = b.pop()), nt = f.symbols_[nt] || nt), nt;
|
|
226
226
|
}
|
|
227
|
-
for (var
|
|
228
|
-
if (
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
for (
|
|
232
|
-
this.terminals_[
|
|
233
|
-
Y.showPosition ?
|
|
227
|
+
for (var H, pt, Q, St, mt = {}, wt, ot, Ht, Pt; ; ) {
|
|
228
|
+
if (pt = k[k.length - 1], this.defaultActions[pt] ? Q = this.defaultActions[pt] : ((H === null || typeof H > "u") && (H = xe()), Q = z[pt] && z[pt][H]), typeof Q > "u" || !Q.length || !Q[0]) {
|
|
229
|
+
var Ot = "";
|
|
230
|
+
Pt = [];
|
|
231
|
+
for (wt in z[pt])
|
|
232
|
+
this.terminals_[wt] && wt > pe && Pt.push("'" + this.terminals_[wt] + "'");
|
|
233
|
+
Y.showPosition ? Ot = "Parse error on line " + (Tt + 1) + `:
|
|
234
234
|
` + Y.showPosition() + `
|
|
235
|
-
Expecting ` +
|
|
235
|
+
Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot = "Parse error on line " + (Tt + 1) + ": Unexpected " + (H == zt ? "end of input" : "'" + (this.terminals_[H] || H) + "'"), this.parseError(Ot, {
|
|
236
236
|
text: Y.match,
|
|
237
|
-
token: this.terminals_[
|
|
237
|
+
token: this.terminals_[H] || H,
|
|
238
238
|
line: Y.yylineno,
|
|
239
|
-
loc:
|
|
240
|
-
expected:
|
|
239
|
+
loc: At,
|
|
240
|
+
expected: Pt
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
if (
|
|
244
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
245
|
-
switch (
|
|
243
|
+
if (Q[0] instanceof Array && Q.length > 1)
|
|
244
|
+
throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + H);
|
|
245
|
+
switch (Q[0]) {
|
|
246
246
|
case 1:
|
|
247
|
-
k.push(
|
|
247
|
+
k.push(H), A.push(Y.yytext), n.push(Y.yylloc), k.push(Q[1]), H = null, qt = Y.yyleng, h = Y.yytext, Tt = Y.yylineno, At = Y.yylloc;
|
|
248
248
|
break;
|
|
249
249
|
case 2:
|
|
250
|
-
if (
|
|
251
|
-
first_line:
|
|
252
|
-
last_line:
|
|
253
|
-
first_column:
|
|
254
|
-
last_column:
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
]),
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
250
|
+
if (ot = this.productions_[Q[1]][1], mt.$ = A[A.length - ot], mt._$ = {
|
|
251
|
+
first_line: n[n.length - (ot || 1)].first_line,
|
|
252
|
+
last_line: n[n.length - 1].last_line,
|
|
253
|
+
first_column: n[n.length - (ot || 1)].first_column,
|
|
254
|
+
last_column: n[n.length - 1].last_column
|
|
255
|
+
}, ue && (mt._$.range = [
|
|
256
|
+
n[n.length - (ot || 1)].range[0],
|
|
257
|
+
n[n.length - 1].range[1]
|
|
258
|
+
]), St = this.performAction.apply(mt, [
|
|
259
|
+
h,
|
|
260
|
+
qt,
|
|
261
|
+
Tt,
|
|
262
262
|
ht.yy,
|
|
263
|
-
|
|
263
|
+
Q[1],
|
|
264
264
|
A,
|
|
265
|
-
|
|
266
|
-
].concat(
|
|
267
|
-
return
|
|
268
|
-
|
|
265
|
+
n
|
|
266
|
+
].concat(ge)), typeof St < "u")
|
|
267
|
+
return St;
|
|
268
|
+
ot && (k = k.slice(0, -1 * ot * 2), A = A.slice(0, -1 * ot), n = n.slice(0, -1 * ot)), k.push(this.productions_[Q[1]][0]), A.push(mt.$), n.push(mt._$), Ht = z[k[k.length - 2]][k[k.length - 1]], k.push(Ht);
|
|
269
269
|
break;
|
|
270
270
|
case 3:
|
|
271
271
|
return !0;
|
|
@@ -273,18 +273,18 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
273
273
|
}
|
|
274
274
|
return !0;
|
|
275
275
|
}
|
|
276
|
-
},
|
|
277
|
-
var
|
|
276
|
+
}, he = /* @__PURE__ */ function() {
|
|
277
|
+
var at = {
|
|
278
278
|
EOF: 1,
|
|
279
|
-
parseError: function(
|
|
279
|
+
parseError: function(f, k) {
|
|
280
280
|
if (this.yy.parser)
|
|
281
|
-
this.yy.parser.parseError(
|
|
281
|
+
this.yy.parser.parseError(f, k);
|
|
282
282
|
else
|
|
283
|
-
throw new Error(
|
|
283
|
+
throw new Error(f);
|
|
284
284
|
},
|
|
285
285
|
// resets the lexer, sets new input
|
|
286
|
-
setInput: function(
|
|
287
|
-
return this.yy = k || this.yy || {}, this._input =
|
|
286
|
+
setInput: function(f, k) {
|
|
287
|
+
return this.yy = k || this.yy || {}, this._input = f, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
288
288
|
first_line: 1,
|
|
289
289
|
first_column: 0,
|
|
290
290
|
last_line: 1,
|
|
@@ -293,24 +293,24 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
293
293
|
},
|
|
294
294
|
// consumes and returns one char from the input
|
|
295
295
|
input: function() {
|
|
296
|
-
var
|
|
297
|
-
this.yytext +=
|
|
298
|
-
var k =
|
|
299
|
-
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1),
|
|
296
|
+
var f = this._input[0];
|
|
297
|
+
this.yytext += f, this.yyleng++, this.offset++, this.match += f, this.matched += f;
|
|
298
|
+
var k = f.match(/(?:\r\n?|\n).*/g);
|
|
299
|
+
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), f;
|
|
300
300
|
},
|
|
301
301
|
// unshifts one char (or a string) into the input
|
|
302
|
-
unput: function(
|
|
303
|
-
var k =
|
|
304
|
-
this._input =
|
|
302
|
+
unput: function(f) {
|
|
303
|
+
var k = f.length, b = f.split(/(?:\r\n?|\n)/g);
|
|
304
|
+
this._input = f + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - k), this.offset -= k;
|
|
305
305
|
var A = this.match.split(/(?:\r\n?|\n)/g);
|
|
306
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
|
|
307
|
-
var
|
|
306
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
|
|
307
|
+
var n = this.yylloc.range;
|
|
308
308
|
return this.yylloc = {
|
|
309
309
|
first_line: this.yylloc.first_line,
|
|
310
310
|
last_line: this.yylineno + 1,
|
|
311
311
|
first_column: this.yylloc.first_column,
|
|
312
|
-
last_column:
|
|
313
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
312
|
+
last_column: b ? (b.length === A.length ? this.yylloc.first_column : 0) + A[A.length - b.length].length - b[0].length : this.yylloc.first_column - k
|
|
313
|
+
}, this.options.ranges && (this.yylloc.range = [n[0], n[0] + this.yyleng - k]), this.yyleng = this.yytext.length, this;
|
|
314
314
|
},
|
|
315
315
|
// When called from action, caches matched text and appends it on next action
|
|
316
316
|
more: function() {
|
|
@@ -330,29 +330,29 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
330
330
|
return this;
|
|
331
331
|
},
|
|
332
332
|
// retain first n characters of the match
|
|
333
|
-
less: function(
|
|
334
|
-
this.unput(this.match.slice(
|
|
333
|
+
less: function(f) {
|
|
334
|
+
this.unput(this.match.slice(f));
|
|
335
335
|
},
|
|
336
336
|
// displays already matched input, i.e. for error messages
|
|
337
337
|
pastInput: function() {
|
|
338
|
-
var
|
|
339
|
-
return (
|
|
338
|
+
var f = this.matched.substr(0, this.matched.length - this.match.length);
|
|
339
|
+
return (f.length > 20 ? "..." : "") + f.substr(-20).replace(/\n/g, "");
|
|
340
340
|
},
|
|
341
341
|
// displays upcoming input, i.e. for error messages
|
|
342
342
|
upcomingInput: function() {
|
|
343
|
-
var
|
|
344
|
-
return
|
|
343
|
+
var f = this.match;
|
|
344
|
+
return f.length < 20 && (f += this._input.substr(0, 20 - f.length)), (f.substr(0, 20) + (f.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
345
345
|
},
|
|
346
346
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
347
347
|
showPosition: function() {
|
|
348
|
-
var
|
|
349
|
-
return
|
|
348
|
+
var f = this.pastInput(), k = new Array(f.length + 1).join("-");
|
|
349
|
+
return f + this.upcomingInput() + `
|
|
350
350
|
` + k + "^";
|
|
351
351
|
},
|
|
352
352
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
353
|
-
test_match: function(
|
|
354
|
-
var
|
|
355
|
-
if (this.options.backtrack_lexer && (
|
|
353
|
+
test_match: function(f, k) {
|
|
354
|
+
var b, A, n;
|
|
355
|
+
if (this.options.backtrack_lexer && (n = {
|
|
356
356
|
yylineno: this.yylineno,
|
|
357
357
|
yylloc: {
|
|
358
358
|
first_line: this.yylloc.first_line,
|
|
@@ -371,16 +371,16 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
371
371
|
yy: this.yy,
|
|
372
372
|
conditionStack: this.conditionStack.slice(0),
|
|
373
373
|
done: this.done
|
|
374
|
-
}, this.options.ranges && (
|
|
374
|
+
}, this.options.ranges && (n.yylloc.range = this.yylloc.range.slice(0))), A = f[0].match(/(?:\r\n?|\n).*/g), A && (this.yylineno += A.length), this.yylloc = {
|
|
375
375
|
first_line: this.yylloc.last_line,
|
|
376
376
|
last_line: this.yylineno + 1,
|
|
377
377
|
first_column: this.yylloc.last_column,
|
|
378
|
-
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column +
|
|
379
|
-
}, this.yytext +=
|
|
380
|
-
return
|
|
378
|
+
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + f[0].length
|
|
379
|
+
}, this.yytext += f[0], this.match += f[0], this.matches = f, 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(f[0].length), this.matched += f[0], b = this.performAction.call(this, this.yy, this, k, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b)
|
|
380
|
+
return b;
|
|
381
381
|
if (this._backtrack) {
|
|
382
|
-
for (var
|
|
383
|
-
this[
|
|
382
|
+
for (var z in n)
|
|
383
|
+
this[z] = n[z];
|
|
384
384
|
return !1;
|
|
385
385
|
}
|
|
386
386
|
return !1;
|
|
@@ -390,13 +390,13 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
390
390
|
if (this.done)
|
|
391
391
|
return this.EOF;
|
|
392
392
|
this._input || (this.done = !0);
|
|
393
|
-
var
|
|
393
|
+
var f, k, b, A;
|
|
394
394
|
this._more || (this.yytext = "", this.match = "");
|
|
395
|
-
for (var
|
|
396
|
-
if (
|
|
397
|
-
if (k =
|
|
398
|
-
if (
|
|
399
|
-
return
|
|
395
|
+
for (var n = this._currentRules(), z = 0; z < n.length; z++)
|
|
396
|
+
if (b = this._input.match(this.rules[n[z]]), b && (!k || b[0].length > k[0].length)) {
|
|
397
|
+
if (k = b, A = z, this.options.backtrack_lexer) {
|
|
398
|
+
if (f = this.test_match(b, n[z]), f !== !1)
|
|
399
|
+
return f;
|
|
400
400
|
if (this._backtrack) {
|
|
401
401
|
k = !1;
|
|
402
402
|
continue;
|
|
@@ -405,7 +405,7 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
405
405
|
} else if (!this.options.flex)
|
|
406
406
|
break;
|
|
407
407
|
}
|
|
408
|
-
return k ? (
|
|
408
|
+
return k ? (f = this.test_match(k, n[A]), f !== !1 ? f : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
409
409
|
` + this.showPosition(), {
|
|
410
410
|
text: "",
|
|
411
411
|
token: null,
|
|
@@ -414,37 +414,37 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
414
414
|
},
|
|
415
415
|
// return next match that has a token
|
|
416
416
|
lex: function() {
|
|
417
|
-
var
|
|
418
|
-
return
|
|
417
|
+
var f = this.next();
|
|
418
|
+
return f || this.lex();
|
|
419
419
|
},
|
|
420
420
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
421
|
-
begin: function(
|
|
422
|
-
this.conditionStack.push(
|
|
421
|
+
begin: function(f) {
|
|
422
|
+
this.conditionStack.push(f);
|
|
423
423
|
},
|
|
424
424
|
// pop the previously active lexer condition state off the condition stack
|
|
425
425
|
popState: function() {
|
|
426
|
-
var
|
|
427
|
-
return
|
|
426
|
+
var f = this.conditionStack.length - 1;
|
|
427
|
+
return f > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
428
428
|
},
|
|
429
429
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
430
430
|
_currentRules: function() {
|
|
431
431
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
432
432
|
},
|
|
433
433
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
434
|
-
topState: function(
|
|
435
|
-
return
|
|
434
|
+
topState: function(f) {
|
|
435
|
+
return f = this.conditionStack.length - 1 - Math.abs(f || 0), f >= 0 ? this.conditionStack[f] : "INITIAL";
|
|
436
436
|
},
|
|
437
437
|
// alias for begin(condition)
|
|
438
|
-
pushState: function(
|
|
439
|
-
this.begin(
|
|
438
|
+
pushState: function(f) {
|
|
439
|
+
this.begin(f);
|
|
440
440
|
},
|
|
441
441
|
// return the number of states currently on the stack
|
|
442
442
|
stateStackSize: function() {
|
|
443
443
|
return this.conditionStack.length;
|
|
444
444
|
},
|
|
445
445
|
options: { "case-insensitive": !0 },
|
|
446
|
-
performAction: function(
|
|
447
|
-
switch (
|
|
446
|
+
performAction: function(f, k, b, A) {
|
|
447
|
+
switch (b) {
|
|
448
448
|
case 0:
|
|
449
449
|
return 5;
|
|
450
450
|
case 1:
|
|
@@ -584,17 +584,17 @@ Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : Ct =
|
|
|
584
584
|
rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
|
|
585
585
|
conditions: { acc_descr_multiline: { rules: [45, 46], inclusive: !1 }, acc_descr: { rules: [43], inclusive: !1 }, acc_title: { rules: [41], inclusive: !1 }, ID: { rules: [2, 3, 12], inclusive: !1 }, ALIAS: { rules: [2, 3, 13, 14], inclusive: !1 }, LINE: { rules: [2, 3, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], inclusive: !0 } }
|
|
586
586
|
};
|
|
587
|
-
return
|
|
587
|
+
return at;
|
|
588
588
|
}();
|
|
589
|
-
|
|
590
|
-
function
|
|
589
|
+
It.lexer = he;
|
|
590
|
+
function Nt() {
|
|
591
591
|
this.yy = {};
|
|
592
592
|
}
|
|
593
|
-
return
|
|
593
|
+
return Nt.prototype = It, It.Parser = Nt, new Nt();
|
|
594
594
|
}();
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
class
|
|
595
|
+
Dt.parser = Dt;
|
|
596
|
+
const Ne = Dt;
|
|
597
|
+
class Me {
|
|
598
598
|
/**
|
|
599
599
|
* @param init - Function that creates the default state.
|
|
600
600
|
*/
|
|
@@ -605,7 +605,7 @@ class Re {
|
|
|
605
605
|
this.records = this.init();
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
const
|
|
608
|
+
const T = new Me(() => ({
|
|
609
609
|
prevActor: void 0,
|
|
610
610
|
actors: {},
|
|
611
611
|
createdActors: {},
|
|
@@ -618,51 +618,51 @@ const E = new Re(() => ({
|
|
|
618
618
|
currentBox: void 0,
|
|
619
619
|
lastCreated: void 0,
|
|
620
620
|
lastDestroyed: void 0
|
|
621
|
-
})),
|
|
622
|
-
|
|
621
|
+
})), Ae = function(t) {
|
|
622
|
+
T.records.boxes.push({
|
|
623
623
|
name: t.text,
|
|
624
|
-
wrap: t.wrap === void 0 &&
|
|
624
|
+
wrap: t.wrap === void 0 && ut() || !!t.wrap,
|
|
625
625
|
fill: t.color,
|
|
626
626
|
actorKeys: []
|
|
627
|
-
}),
|
|
628
|
-
},
|
|
629
|
-
let s =
|
|
630
|
-
const i =
|
|
627
|
+
}), T.records.currentBox = T.records.boxes.slice(-1)[0];
|
|
628
|
+
}, Rt = function(t, e, c, a) {
|
|
629
|
+
let s = T.records.currentBox;
|
|
630
|
+
const i = T.records.actors[t];
|
|
631
631
|
if (i) {
|
|
632
|
-
if (
|
|
632
|
+
if (T.records.currentBox && i.box && T.records.currentBox !== i.box)
|
|
633
633
|
throw new Error(
|
|
634
|
-
"A same participant should only be defined in one Box: " + i.name + " can't be in '" + i.box.name + "' and in '" +
|
|
634
|
+
"A same participant should only be defined in one Box: " + i.name + " can't be in '" + i.box.name + "' and in '" + T.records.currentBox.name + "' at the same time."
|
|
635
635
|
);
|
|
636
|
-
if (s = i.box ? i.box :
|
|
636
|
+
if (s = i.box ? i.box : T.records.currentBox, i.box = s, i && e === i.name && c == null)
|
|
637
637
|
return;
|
|
638
638
|
}
|
|
639
|
-
(c == null || c.text == null) && (c = { text: e, wrap: null, type: a }), (a == null || c.text == null) && (c = { text: e, wrap: null, type: a }),
|
|
639
|
+
(c == null || c.text == null) && (c = { text: e, wrap: null, type: a }), (a == null || c.text == null) && (c = { text: e, wrap: null, type: a }), T.records.actors[t] = {
|
|
640
640
|
box: s,
|
|
641
641
|
name: e,
|
|
642
642
|
description: c.text,
|
|
643
|
-
wrap: c.wrap === void 0 &&
|
|
644
|
-
prevActor:
|
|
643
|
+
wrap: c.wrap === void 0 && ut() || !!c.wrap,
|
|
644
|
+
prevActor: T.records.prevActor,
|
|
645
645
|
links: {},
|
|
646
646
|
properties: {},
|
|
647
647
|
actorCnt: null,
|
|
648
648
|
rectData: null,
|
|
649
649
|
type: a || "participant"
|
|
650
|
-
},
|
|
651
|
-
},
|
|
650
|
+
}, T.records.prevActor && T.records.actors[T.records.prevActor] && (T.records.actors[T.records.prevActor].nextActor = t), T.records.currentBox && T.records.currentBox.actorKeys.push(t), T.records.prevActor = t;
|
|
651
|
+
}, Se = (t) => {
|
|
652
652
|
let e, c = 0;
|
|
653
|
-
for (e = 0; e <
|
|
654
|
-
|
|
653
|
+
for (e = 0; e < T.records.messages.length; e++)
|
|
654
|
+
T.records.messages[e].type === ft.ACTIVE_START && T.records.messages[e].from.actor === t && c++, T.records.messages[e].type === ft.ACTIVE_END && T.records.messages[e].from.actor === t && c--;
|
|
655
655
|
return c;
|
|
656
|
-
},
|
|
657
|
-
|
|
656
|
+
}, Oe = function(t, e, c, a) {
|
|
657
|
+
T.records.messages.push({
|
|
658
658
|
from: t,
|
|
659
659
|
to: e,
|
|
660
660
|
message: c.text,
|
|
661
|
-
wrap: c.wrap === void 0 &&
|
|
661
|
+
wrap: c.wrap === void 0 && ut() || !!c.wrap,
|
|
662
662
|
answer: a
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
if (a ===
|
|
664
|
+
}, D = function(t, e, c = { text: void 0, wrap: void 0 }, a, s = !1) {
|
|
665
|
+
if (a === ft.ACTIVE_END && Se(t.actor) < 1) {
|
|
666
666
|
let i = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
|
|
667
667
|
throw i.hash = {
|
|
668
668
|
text: "->>-",
|
|
@@ -672,47 +672,47 @@ const E = new Re(() => ({
|
|
|
672
672
|
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
673
673
|
}, i;
|
|
674
674
|
}
|
|
675
|
-
return
|
|
675
|
+
return T.records.messages.push({
|
|
676
676
|
from: t,
|
|
677
677
|
to: e,
|
|
678
678
|
message: c.text,
|
|
679
|
-
wrap: c.wrap === void 0 &&
|
|
679
|
+
wrap: c.wrap === void 0 && ut() || !!c.wrap,
|
|
680
680
|
type: a,
|
|
681
681
|
activate: s
|
|
682
682
|
}), !0;
|
|
683
|
+
}, De = function() {
|
|
684
|
+
return T.records.boxes.length > 0;
|
|
685
|
+
}, Re = function() {
|
|
686
|
+
return T.records.boxes.some((t) => t.name);
|
|
687
|
+
}, Ce = function() {
|
|
688
|
+
return T.records.messages;
|
|
689
|
+
}, $e = function() {
|
|
690
|
+
return T.records.boxes;
|
|
691
|
+
}, Ye = function() {
|
|
692
|
+
return T.records.actors;
|
|
683
693
|
}, Be = function() {
|
|
684
|
-
return
|
|
694
|
+
return T.records.createdActors;
|
|
685
695
|
}, Ve = function() {
|
|
686
|
-
return
|
|
696
|
+
return T.records.destroyedActors;
|
|
697
|
+
}, Et = function(t) {
|
|
698
|
+
return T.records.actors[t];
|
|
687
699
|
}, Fe = function() {
|
|
688
|
-
return
|
|
700
|
+
return Object.keys(T.records.actors);
|
|
689
701
|
}, We = function() {
|
|
690
|
-
|
|
702
|
+
T.records.sequenceNumbersEnabled = !0;
|
|
691
703
|
}, qe = function() {
|
|
692
|
-
|
|
693
|
-
}, ze = function() {
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
|
|
697
|
-
},
|
|
698
|
-
return E.records.actors[t];
|
|
699
|
-
}, Ue = function() {
|
|
700
|
-
return Object.keys(E.records.actors);
|
|
701
|
-
}, je = function() {
|
|
702
|
-
E.records.sequenceNumbersEnabled = !0;
|
|
703
|
-
}, Ke = function() {
|
|
704
|
-
E.records.sequenceNumbersEnabled = !1;
|
|
705
|
-
}, Xe = () => E.records.sequenceNumbersEnabled, Je = function(t) {
|
|
706
|
-
E.records.wrapEnabled = t;
|
|
707
|
-
}, xt = () => E.records.wrapEnabled !== void 0 ? E.records.wrapEnabled : at().sequence.wrap, Qe = function() {
|
|
708
|
-
E.reset(), Pe();
|
|
709
|
-
}, Ze = function(t) {
|
|
704
|
+
T.records.sequenceNumbersEnabled = !1;
|
|
705
|
+
}, ze = () => T.records.sequenceNumbersEnabled, He = function(t) {
|
|
706
|
+
T.records.wrapEnabled = t;
|
|
707
|
+
}, ut = () => T.records.wrapEnabled !== void 0 ? T.records.wrapEnabled : lt().sequence.wrap, je = function() {
|
|
708
|
+
T.reset(), Te();
|
|
709
|
+
}, Xe = function(t) {
|
|
710
710
|
const e = t.trim(), c = {
|
|
711
711
|
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
|
|
712
712
|
wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
|
|
713
713
|
};
|
|
714
|
-
return
|
|
715
|
-
},
|
|
714
|
+
return j.debug("parseMessage:", c), c;
|
|
715
|
+
}, Ke = function(t) {
|
|
716
716
|
const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
|
|
717
717
|
let c = e != null && e[1] ? e[1].trim() : "transparent", a = e != null && e[2] ? e[2].trim() : void 0;
|
|
718
718
|
if (window && window.CSS)
|
|
@@ -723,10 +723,10 @@ const E = new Re(() => ({
|
|
|
723
723
|
}
|
|
724
724
|
return {
|
|
725
725
|
color: c,
|
|
726
|
-
text: a !== void 0 ?
|
|
726
|
+
text: a !== void 0 ? kt(a.replace(/^:?(?:no)?wrap:/, ""), lt()) : void 0,
|
|
727
727
|
wrap: a !== void 0 ? a.match(/^:?wrap:/) !== null ? !0 : a.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
|
|
728
728
|
};
|
|
729
|
-
},
|
|
729
|
+
}, ft = {
|
|
730
730
|
SOLID: 0,
|
|
731
731
|
DOTTED: 1,
|
|
732
732
|
NOTE: 2,
|
|
@@ -757,98 +757,98 @@ const E = new Re(() => ({
|
|
|
757
757
|
BREAK_START: 30,
|
|
758
758
|
BREAK_END: 31,
|
|
759
759
|
PAR_OVER_START: 32
|
|
760
|
-
},
|
|
760
|
+
}, Ue = {
|
|
761
761
|
FILLED: 0,
|
|
762
762
|
OPEN: 1
|
|
763
|
-
},
|
|
763
|
+
}, Ge = {
|
|
764
764
|
LEFTOF: 0,
|
|
765
765
|
RIGHTOF: 1,
|
|
766
766
|
OVER: 2
|
|
767
|
-
},
|
|
767
|
+
}, Jt = function(t, e, c) {
|
|
768
768
|
const a = {
|
|
769
769
|
actor: t,
|
|
770
770
|
placement: e,
|
|
771
771
|
message: c.text,
|
|
772
|
-
wrap: c.wrap === void 0 &&
|
|
772
|
+
wrap: c.wrap === void 0 && ut() || !!c.wrap
|
|
773
773
|
}, s = [].concat(t, t);
|
|
774
|
-
|
|
774
|
+
T.records.notes.push(a), T.records.messages.push({
|
|
775
775
|
from: s[0],
|
|
776
776
|
to: s[1],
|
|
777
777
|
message: c.text,
|
|
778
|
-
wrap: c.wrap === void 0 &&
|
|
779
|
-
type:
|
|
778
|
+
wrap: c.wrap === void 0 && ut() || !!c.wrap,
|
|
779
|
+
type: ft.NOTE,
|
|
780
780
|
placement: e
|
|
781
781
|
});
|
|
782
|
-
},
|
|
783
|
-
const c =
|
|
782
|
+
}, Zt = function(t, e) {
|
|
783
|
+
const c = Et(t);
|
|
784
784
|
try {
|
|
785
|
-
let a =
|
|
785
|
+
let a = kt(e.text, lt());
|
|
786
786
|
a = a.replace(/&/g, "&"), a = a.replace(/=/g, "=");
|
|
787
787
|
const s = JSON.parse(a);
|
|
788
|
-
|
|
788
|
+
Bt(c, s);
|
|
789
789
|
} catch (a) {
|
|
790
|
-
|
|
790
|
+
j.error("error while parsing actor link text", a);
|
|
791
791
|
}
|
|
792
|
-
},
|
|
793
|
-
const c =
|
|
792
|
+
}, Je = function(t, e) {
|
|
793
|
+
const c = Et(t);
|
|
794
794
|
try {
|
|
795
795
|
const l = {};
|
|
796
|
-
let
|
|
797
|
-
var a =
|
|
798
|
-
|
|
799
|
-
var s =
|
|
800
|
-
l[s] = i,
|
|
796
|
+
let d = kt(e.text, lt());
|
|
797
|
+
var a = d.indexOf("@");
|
|
798
|
+
d = d.replace(/&/g, "&"), d = d.replace(/=/g, "=");
|
|
799
|
+
var s = d.slice(0, a - 1).trim(), i = d.slice(a + 1).trim();
|
|
800
|
+
l[s] = i, Bt(c, l);
|
|
801
801
|
} catch (l) {
|
|
802
|
-
|
|
802
|
+
j.error("error while parsing actor link text", l);
|
|
803
803
|
}
|
|
804
804
|
};
|
|
805
|
-
function
|
|
805
|
+
function Bt(t, e) {
|
|
806
806
|
if (t.links == null)
|
|
807
807
|
t.links = e;
|
|
808
808
|
else
|
|
809
809
|
for (let c in e)
|
|
810
810
|
t.links[c] = e[c];
|
|
811
811
|
}
|
|
812
|
-
const
|
|
813
|
-
const c =
|
|
812
|
+
const Qt = function(t, e) {
|
|
813
|
+
const c = Et(t);
|
|
814
814
|
try {
|
|
815
|
-
let a =
|
|
815
|
+
let a = kt(e.text, lt());
|
|
816
816
|
const s = JSON.parse(a);
|
|
817
|
-
|
|
817
|
+
te(c, s);
|
|
818
818
|
} catch (a) {
|
|
819
|
-
|
|
819
|
+
j.error("error while parsing actor properties text", a);
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
|
-
function
|
|
822
|
+
function te(t, e) {
|
|
823
823
|
if (t.properties == null)
|
|
824
824
|
t.properties = e;
|
|
825
825
|
else
|
|
826
826
|
for (let c in e)
|
|
827
827
|
t.properties[c] = e[c];
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
829
|
+
function Ze() {
|
|
830
|
+
T.records.currentBox = void 0;
|
|
831
831
|
}
|
|
832
|
-
const
|
|
833
|
-
const c =
|
|
832
|
+
const ee = function(t, e) {
|
|
833
|
+
const c = Et(t), a = document.getElementById(e.text);
|
|
834
834
|
try {
|
|
835
835
|
const s = a.innerHTML, i = JSON.parse(s);
|
|
836
|
-
i.properties &&
|
|
836
|
+
i.properties && te(c, i.properties), i.links && Bt(c, i.links);
|
|
837
837
|
} catch (s) {
|
|
838
|
-
|
|
838
|
+
j.error("error while parsing actor details text", s);
|
|
839
839
|
}
|
|
840
|
-
},
|
|
840
|
+
}, Qe = function(t, e) {
|
|
841
841
|
if (t !== void 0 && t.properties !== void 0)
|
|
842
842
|
return t.properties[e];
|
|
843
|
-
},
|
|
843
|
+
}, ae = function(t) {
|
|
844
844
|
if (Array.isArray(t))
|
|
845
845
|
t.forEach(function(e) {
|
|
846
|
-
|
|
846
|
+
ae(e);
|
|
847
847
|
});
|
|
848
848
|
else
|
|
849
849
|
switch (t.type) {
|
|
850
850
|
case "sequenceIndex":
|
|
851
|
-
|
|
851
|
+
T.records.messages.push({
|
|
852
852
|
from: void 0,
|
|
853
853
|
to: void 0,
|
|
854
854
|
message: {
|
|
@@ -861,154 +861,154 @@ const oe = function(t, e) {
|
|
|
861
861
|
});
|
|
862
862
|
break;
|
|
863
863
|
case "addParticipant":
|
|
864
|
-
|
|
864
|
+
Rt(t.actor, t.actor, t.description, t.draw);
|
|
865
865
|
break;
|
|
866
866
|
case "createParticipant":
|
|
867
|
-
if (
|
|
867
|
+
if (T.records.actors[t.actor])
|
|
868
868
|
throw new Error(
|
|
869
869
|
"It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior"
|
|
870
870
|
);
|
|
871
|
-
|
|
871
|
+
T.records.lastCreated = t.actor, Rt(t.actor, t.actor, t.description, t.draw), T.records.createdActors[t.actor] = T.records.messages.length;
|
|
872
872
|
break;
|
|
873
873
|
case "destroyParticipant":
|
|
874
|
-
|
|
874
|
+
T.records.lastDestroyed = t.actor, T.records.destroyedActors[t.actor] = T.records.messages.length;
|
|
875
875
|
break;
|
|
876
876
|
case "activeStart":
|
|
877
|
-
|
|
877
|
+
D(t.actor, void 0, void 0, t.signalType);
|
|
878
878
|
break;
|
|
879
879
|
case "activeEnd":
|
|
880
|
-
|
|
880
|
+
D(t.actor, void 0, void 0, t.signalType);
|
|
881
881
|
break;
|
|
882
882
|
case "addNote":
|
|
883
|
-
|
|
883
|
+
Jt(t.actor, t.placement, t.text);
|
|
884
884
|
break;
|
|
885
885
|
case "addLinks":
|
|
886
|
-
|
|
886
|
+
Zt(t.actor, t.text);
|
|
887
887
|
break;
|
|
888
888
|
case "addALink":
|
|
889
|
-
|
|
889
|
+
Je(t.actor, t.text);
|
|
890
890
|
break;
|
|
891
891
|
case "addProperties":
|
|
892
|
-
|
|
892
|
+
Qt(t.actor, t.text);
|
|
893
893
|
break;
|
|
894
894
|
case "addDetails":
|
|
895
|
-
|
|
895
|
+
ee(t.actor, t.text);
|
|
896
896
|
break;
|
|
897
897
|
case "addMessage":
|
|
898
|
-
if (
|
|
899
|
-
if (t.to !==
|
|
898
|
+
if (T.records.lastCreated) {
|
|
899
|
+
if (t.to !== T.records.lastCreated)
|
|
900
900
|
throw new Error(
|
|
901
|
-
"The created participant " +
|
|
901
|
+
"The created participant " + T.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram."
|
|
902
902
|
);
|
|
903
|
-
|
|
904
|
-
} else if (
|
|
905
|
-
if (t.to !==
|
|
903
|
+
T.records.lastCreated = void 0;
|
|
904
|
+
} else if (T.records.lastDestroyed) {
|
|
905
|
+
if (t.to !== T.records.lastDestroyed && t.from !== T.records.lastDestroyed)
|
|
906
906
|
throw new Error(
|
|
907
|
-
"The destroyed participant " +
|
|
907
|
+
"The destroyed participant " + T.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
|
|
908
908
|
);
|
|
909
|
-
|
|
909
|
+
T.records.lastDestroyed = void 0;
|
|
910
910
|
}
|
|
911
|
-
|
|
911
|
+
D(t.from, t.to, t.msg, t.signalType, t.activate);
|
|
912
912
|
break;
|
|
913
913
|
case "boxStart":
|
|
914
|
-
|
|
914
|
+
Ae(t.boxData);
|
|
915
915
|
break;
|
|
916
916
|
case "boxEnd":
|
|
917
|
-
|
|
917
|
+
Ze();
|
|
918
918
|
break;
|
|
919
919
|
case "loopStart":
|
|
920
|
-
|
|
920
|
+
D(void 0, void 0, t.loopText, t.signalType);
|
|
921
921
|
break;
|
|
922
922
|
case "loopEnd":
|
|
923
|
-
|
|
923
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
924
924
|
break;
|
|
925
925
|
case "rectStart":
|
|
926
|
-
|
|
926
|
+
D(void 0, void 0, t.color, t.signalType);
|
|
927
927
|
break;
|
|
928
928
|
case "rectEnd":
|
|
929
|
-
|
|
929
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
930
930
|
break;
|
|
931
931
|
case "optStart":
|
|
932
|
-
|
|
932
|
+
D(void 0, void 0, t.optText, t.signalType);
|
|
933
933
|
break;
|
|
934
934
|
case "optEnd":
|
|
935
|
-
|
|
935
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
936
936
|
break;
|
|
937
937
|
case "altStart":
|
|
938
|
-
|
|
938
|
+
D(void 0, void 0, t.altText, t.signalType);
|
|
939
939
|
break;
|
|
940
940
|
case "else":
|
|
941
|
-
|
|
941
|
+
D(void 0, void 0, t.altText, t.signalType);
|
|
942
942
|
break;
|
|
943
943
|
case "altEnd":
|
|
944
|
-
|
|
944
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
945
945
|
break;
|
|
946
946
|
case "setAccTitle":
|
|
947
|
-
|
|
947
|
+
Ut(t.text);
|
|
948
948
|
break;
|
|
949
949
|
case "parStart":
|
|
950
|
-
|
|
950
|
+
D(void 0, void 0, t.parText, t.signalType);
|
|
951
951
|
break;
|
|
952
952
|
case "and":
|
|
953
|
-
|
|
953
|
+
D(void 0, void 0, t.parText, t.signalType);
|
|
954
954
|
break;
|
|
955
955
|
case "parEnd":
|
|
956
|
-
|
|
956
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
957
957
|
break;
|
|
958
958
|
case "criticalStart":
|
|
959
|
-
|
|
959
|
+
D(void 0, void 0, t.criticalText, t.signalType);
|
|
960
960
|
break;
|
|
961
961
|
case "option":
|
|
962
|
-
|
|
962
|
+
D(void 0, void 0, t.optionText, t.signalType);
|
|
963
963
|
break;
|
|
964
964
|
case "criticalEnd":
|
|
965
|
-
|
|
965
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
966
966
|
break;
|
|
967
967
|
case "breakStart":
|
|
968
|
-
|
|
968
|
+
D(void 0, void 0, t.breakText, t.signalType);
|
|
969
969
|
break;
|
|
970
970
|
case "breakEnd":
|
|
971
|
-
|
|
971
|
+
D(void 0, void 0, void 0, t.signalType);
|
|
972
972
|
break;
|
|
973
973
|
}
|
|
974
|
-
},
|
|
975
|
-
addActor:
|
|
976
|
-
addMessage:
|
|
977
|
-
addSignal:
|
|
978
|
-
addLinks:
|
|
979
|
-
addDetails:
|
|
980
|
-
addProperties:
|
|
981
|
-
autoWrap:
|
|
982
|
-
setWrap:
|
|
983
|
-
enableSequenceNumbers:
|
|
984
|
-
disableSequenceNumbers:
|
|
985
|
-
showSequenceNumbers:
|
|
986
|
-
getMessages:
|
|
987
|
-
getActors:
|
|
988
|
-
getCreatedActors:
|
|
989
|
-
getDestroyedActors:
|
|
990
|
-
getActor:
|
|
991
|
-
getActorKeys:
|
|
992
|
-
getActorProperty:
|
|
993
|
-
getAccTitle:
|
|
994
|
-
getBoxes:
|
|
995
|
-
getDiagramTitle:
|
|
996
|
-
setDiagramTitle:
|
|
997
|
-
getConfig: () =>
|
|
998
|
-
clear:
|
|
999
|
-
parseMessage:
|
|
1000
|
-
parseBoxData:
|
|
1001
|
-
LINETYPE:
|
|
1002
|
-
ARROWTYPE:
|
|
1003
|
-
PLACEMENT:
|
|
1004
|
-
addNote:
|
|
1005
|
-
setAccTitle:
|
|
1006
|
-
apply:
|
|
1007
|
-
setAccDescription:
|
|
1008
|
-
getAccDescription:
|
|
1009
|
-
hasAtLeastOneBox:
|
|
1010
|
-
hasAtLeastOneBoxWithTitle:
|
|
1011
|
-
},
|
|
974
|
+
}, jt = {
|
|
975
|
+
addActor: Rt,
|
|
976
|
+
addMessage: Oe,
|
|
977
|
+
addSignal: D,
|
|
978
|
+
addLinks: Zt,
|
|
979
|
+
addDetails: ee,
|
|
980
|
+
addProperties: Qt,
|
|
981
|
+
autoWrap: ut,
|
|
982
|
+
setWrap: He,
|
|
983
|
+
enableSequenceNumbers: We,
|
|
984
|
+
disableSequenceNumbers: qe,
|
|
985
|
+
showSequenceNumbers: ze,
|
|
986
|
+
getMessages: Ce,
|
|
987
|
+
getActors: Ye,
|
|
988
|
+
getCreatedActors: Be,
|
|
989
|
+
getDestroyedActors: Ve,
|
|
990
|
+
getActor: Et,
|
|
991
|
+
getActorKeys: Fe,
|
|
992
|
+
getActorProperty: Qe,
|
|
993
|
+
getAccTitle: me,
|
|
994
|
+
getBoxes: $e,
|
|
995
|
+
getDiagramTitle: be,
|
|
996
|
+
setDiagramTitle: ye,
|
|
997
|
+
getConfig: () => lt().sequence,
|
|
998
|
+
clear: je,
|
|
999
|
+
parseMessage: Xe,
|
|
1000
|
+
parseBoxData: Ke,
|
|
1001
|
+
LINETYPE: ft,
|
|
1002
|
+
ARROWTYPE: Ue,
|
|
1003
|
+
PLACEMENT: Ge,
|
|
1004
|
+
addNote: Jt,
|
|
1005
|
+
setAccTitle: Ut,
|
|
1006
|
+
apply: ae,
|
|
1007
|
+
setAccDescription: fe,
|
|
1008
|
+
getAccDescription: Ee,
|
|
1009
|
+
hasAtLeastOneBox: De,
|
|
1010
|
+
hasAtLeastOneBoxWithTitle: Re
|
|
1011
|
+
}, t0 = (t) => `.actor {
|
|
1012
1012
|
stroke: ${t.actorBorder};
|
|
1013
1013
|
fill: ${t.actorBkg};
|
|
1014
1014
|
}
|
|
@@ -1124,60 +1124,43 @@ const oe = function(t, e) {
|
|
|
1124
1124
|
fill: ${t.actorBkg};
|
|
1125
1125
|
stroke-width: 2px;
|
|
1126
1126
|
}
|
|
1127
|
-
`,
|
|
1128
|
-
return
|
|
1129
|
-
},
|
|
1127
|
+
`, e0 = t0, gt = 18 * 2, re = "actor-top", se = "actor-bottom", Vt = function(t, e) {
|
|
1128
|
+
return ke(t, e);
|
|
1129
|
+
}, a0 = function(t, e, c, a, s) {
|
|
1130
1130
|
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1131
1131
|
return { height: 0, width: 0 };
|
|
1132
|
-
const i = e.links, l = e.actorCnt,
|
|
1133
|
-
var
|
|
1134
|
-
s && (
|
|
1132
|
+
const i = e.links, l = e.actorCnt, d = e.rectData;
|
|
1133
|
+
var p = "none";
|
|
1134
|
+
s && (p = "block !important");
|
|
1135
1135
|
const r = t.append("g");
|
|
1136
|
-
r.attr("id", "actor" + l + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display",
|
|
1137
|
-
var
|
|
1138
|
-
|
|
1139
|
-
let
|
|
1136
|
+
r.attr("id", "actor" + l + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display", p);
|
|
1137
|
+
var x = "";
|
|
1138
|
+
d.class !== void 0 && (x = " " + d.class);
|
|
1139
|
+
let E = d.width > c ? d.width : c;
|
|
1140
1140
|
const g = r.append("rect");
|
|
1141
|
-
if (g.attr("class", "actorPopupMenuPanel" +
|
|
1142
|
-
var
|
|
1143
|
-
for (let
|
|
1144
|
-
var w = r.append("a"), _ =
|
|
1145
|
-
w.attr("xlink:href", _), w.attr("target", "_blank"),
|
|
1146
|
-
|
|
1141
|
+
if (g.attr("class", "actorPopupMenuPanel" + x), g.attr("x", d.x), g.attr("y", d.height), g.attr("fill", d.fill), g.attr("stroke", d.stroke), g.attr("width", E), g.attr("height", d.height), g.attr("rx", d.rx), g.attr("ry", d.ry), i != null) {
|
|
1142
|
+
var m = 20;
|
|
1143
|
+
for (let I in i) {
|
|
1144
|
+
var w = r.append("a"), _ = Kt.sanitizeUrl(i[I]);
|
|
1145
|
+
w.attr("xlink:href", _), w.attr("target", "_blank"), f0(a)(
|
|
1146
|
+
I,
|
|
1147
1147
|
w,
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1148
|
+
d.x + 10,
|
|
1149
|
+
d.height + m,
|
|
1150
|
+
E,
|
|
1151
1151
|
20,
|
|
1152
1152
|
{ class: "actor" },
|
|
1153
1153
|
a
|
|
1154
|
-
),
|
|
1154
|
+
), m += 30;
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
|
-
return g.attr("height",
|
|
1158
|
-
},
|
|
1157
|
+
return g.attr("height", m), { height: d.height + m, width: E };
|
|
1158
|
+
}, r0 = function(t) {
|
|
1159
1159
|
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1160
|
-
},
|
|
1161
|
-
let a = t.append("foreignObject");
|
|
1162
|
-
const s = await ee(e.text, $t()), i = a.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();
|
|
1163
|
-
if (a.attr("height", Math.round(i.height)).attr("width", Math.round(i.width)), e.class === "noteText") {
|
|
1164
|
-
const l = t.node().firstChild;
|
|
1165
|
-
l.setAttribute("height", i.height + 2 * e.textMargin);
|
|
1166
|
-
const n = l.getBBox();
|
|
1167
|
-
a.attr("x", Math.round(n.x + n.width / 2 - i.width / 2)).attr("y", Math.round(n.y + n.height / 2 - i.height / 2));
|
|
1168
|
-
} else if (c) {
|
|
1169
|
-
let { startx: l, stopx: n, starty: h } = c;
|
|
1170
|
-
if (l > n) {
|
|
1171
|
-
const r = l;
|
|
1172
|
-
l = n, n = r;
|
|
1173
|
-
}
|
|
1174
|
-
a.attr("x", Math.round(l + Math.abs(l - n) / 2 - i.width / 2)), e.class === "loopText" ? a.attr("y", Math.round(h)) : a.attr("y", Math.round(h - i.height));
|
|
1175
|
-
}
|
|
1176
|
-
return [a];
|
|
1177
|
-
}, bt = function(t, e) {
|
|
1160
|
+
}, yt = function(t, e) {
|
|
1178
1161
|
let c = 0, a = 0;
|
|
1179
|
-
const s = e.text.split(
|
|
1180
|
-
let
|
|
1162
|
+
const s = e.text.split(P.lineBreakRegex), [i, l] = Gt(e.fontSize);
|
|
1163
|
+
let d = [], p = 0, r = () => e.y;
|
|
1181
1164
|
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1182
1165
|
switch (e.valign) {
|
|
1183
1166
|
case "top":
|
|
@@ -1210,47 +1193,47 @@ const oe = function(t, e) {
|
|
|
1210
1193
|
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1211
1194
|
break;
|
|
1212
1195
|
}
|
|
1213
|
-
for (let [
|
|
1214
|
-
e.textMargin !== void 0 && e.textMargin === 0 && i !== void 0 && (
|
|
1196
|
+
for (let [x, E] of s.entries()) {
|
|
1197
|
+
e.textMargin !== void 0 && e.textMargin === 0 && i !== void 0 && (p = x * i);
|
|
1215
1198
|
const g = t.append("text");
|
|
1216
|
-
g.attr("x", e.x), g.attr("y", r()), e.anchor !== void 0 && g.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && g.style("font-family", e.fontFamily), l !== void 0 && g.style("font-size", l), e.fontWeight !== void 0 && g.style("font-weight", e.fontWeight), e.fill !== void 0 && g.attr("fill", e.fill), e.class !== void 0 && g.attr("class", e.class), e.dy !== void 0 ? g.attr("dy", e.dy) :
|
|
1217
|
-
const
|
|
1199
|
+
g.attr("x", e.x), g.attr("y", r()), e.anchor !== void 0 && g.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && g.style("font-family", e.fontFamily), l !== void 0 && g.style("font-size", l), e.fontWeight !== void 0 && g.style("font-weight", e.fontWeight), e.fill !== void 0 && g.attr("fill", e.fill), e.class !== void 0 && g.attr("class", e.class), e.dy !== void 0 ? g.attr("dy", e.dy) : p !== 0 && g.attr("dy", p);
|
|
1200
|
+
const m = E || we;
|
|
1218
1201
|
if (e.tspan) {
|
|
1219
1202
|
const w = g.append("tspan");
|
|
1220
|
-
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(
|
|
1203
|
+
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(m);
|
|
1221
1204
|
} else
|
|
1222
|
-
g.text(
|
|
1223
|
-
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (a += (g._groups || g)[0][0].getBBox().height, c = a),
|
|
1205
|
+
g.text(m);
|
|
1206
|
+
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (a += (g._groups || g)[0][0].getBBox().height, c = a), d.push(g);
|
|
1224
1207
|
}
|
|
1225
|
-
return
|
|
1226
|
-
},
|
|
1227
|
-
function c(s, i, l,
|
|
1228
|
-
return s + "," + i + " " + (s + l) + "," + i + " " + (s + l) + "," + (i +
|
|
1208
|
+
return d;
|
|
1209
|
+
}, ie = function(t, e) {
|
|
1210
|
+
function c(s, i, l, d, p) {
|
|
1211
|
+
return s + "," + i + " " + (s + l) + "," + i + " " + (s + l) + "," + (i + d - p) + " " + (s + l - p * 1.2) + "," + (i + d) + " " + s + "," + (i + d);
|
|
1229
1212
|
}
|
|
1230
1213
|
const a = t.append("polygon");
|
|
1231
|
-
return a.attr("points", c(e.x, e.y, e.width, e.height, 7)), a.attr("class", "labelBox"), e.y = e.y + e.height / 2,
|
|
1214
|
+
return a.attr("points", c(e.x, e.y, e.width, e.height, 7)), a.attr("class", "labelBox"), e.y = e.y + e.height / 2, yt(t, e), a;
|
|
1232
1215
|
};
|
|
1233
|
-
let
|
|
1234
|
-
const
|
|
1216
|
+
let st = -1;
|
|
1217
|
+
const oe = (t, e, c, a) => {
|
|
1235
1218
|
t.select && c.forEach((s) => {
|
|
1236
1219
|
const i = e[s], l = t.select("#actor" + i.actorCnt);
|
|
1237
1220
|
!a.mirrorActors && i.stopy ? l.attr("y2", i.stopy + i.height / 2) : a.mirrorActors && l.attr("y2", i.stopy);
|
|
1238
1221
|
});
|
|
1239
|
-
},
|
|
1240
|
-
const s = a ? e.stopy : e.starty, i = e.x + e.width / 2, l = s + 5,
|
|
1241
|
-
var
|
|
1242
|
-
a || (
|
|
1243
|
-
const r =
|
|
1244
|
-
var
|
|
1245
|
-
e.properties != null && e.properties.class ?
|
|
1246
|
-
const
|
|
1222
|
+
}, s0 = function(t, e, c, a) {
|
|
1223
|
+
const s = a ? e.stopy : e.starty, i = e.x + e.width / 2, l = s + 5, d = t.append("g").lower();
|
|
1224
|
+
var p = d;
|
|
1225
|
+
a || (st++, Object.keys(e.links || {}).length && !c.forceMenus && p.attr("onclick", r0(`actor${st}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + st).attr("x1", i).attr("y1", l).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), p = d.append("g"), e.actorCnt = st, e.links != null && p.attr("id", "root-" + st));
|
|
1226
|
+
const r = _t();
|
|
1227
|
+
var x = "actor";
|
|
1228
|
+
e.properties != null && e.properties.class ? x = e.properties.class : r.fill = "#eaeaea", a ? x += ` ${se}` : x += ` ${re}`, r.x = e.x, r.y = s, r.width = e.width, r.height = e.height, r.class = x, r.rx = 3, r.ry = 3;
|
|
1229
|
+
const E = Vt(p, r);
|
|
1247
1230
|
if (e.rectData = r, e.properties != null && e.properties.icon) {
|
|
1248
|
-
const
|
|
1249
|
-
|
|
1231
|
+
const m = e.properties.icon.trim();
|
|
1232
|
+
m.charAt(0) === "@" ? Le(p, r.x + r.width - 20, r.y + 10, m.substr(1)) : Ie(p, r.x + r.width - 20, r.y + 10, m);
|
|
1250
1233
|
}
|
|
1251
|
-
|
|
1234
|
+
Ft(c)(
|
|
1252
1235
|
e.description,
|
|
1253
|
-
|
|
1236
|
+
p,
|
|
1254
1237
|
r.x,
|
|
1255
1238
|
r.y,
|
|
1256
1239
|
r.width,
|
|
@@ -1259,25 +1242,25 @@ const pe = (t, e, c, a) => {
|
|
|
1259
1242
|
c
|
|
1260
1243
|
);
|
|
1261
1244
|
let g = e.height;
|
|
1262
|
-
if (
|
|
1263
|
-
const
|
|
1264
|
-
e.height =
|
|
1245
|
+
if (E.node) {
|
|
1246
|
+
const m = E.node().getBBox();
|
|
1247
|
+
e.height = m.height, g = m.height;
|
|
1265
1248
|
}
|
|
1266
1249
|
return g;
|
|
1267
|
-
},
|
|
1250
|
+
}, i0 = function(t, e, c, a) {
|
|
1268
1251
|
const s = a ? e.stopy : e.starty, i = e.x + e.width / 2, l = s + 80;
|
|
1269
|
-
t.lower(), a || (
|
|
1270
|
-
const
|
|
1271
|
-
let
|
|
1272
|
-
a ?
|
|
1273
|
-
const r =
|
|
1274
|
-
r.x = e.x, r.y = s, r.fill = "#eaeaea", r.width = e.width, r.height = e.height, r.class = "actor", r.rx = 3, r.ry = 3,
|
|
1275
|
-
const
|
|
1276
|
-
|
|
1277
|
-
const
|
|
1278
|
-
return e.height =
|
|
1252
|
+
t.lower(), a || (st++, t.append("line").attr("id", "actor" + st).attr("x1", i).attr("y1", l).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), e.actorCnt = st);
|
|
1253
|
+
const d = t.append("g");
|
|
1254
|
+
let p = "actor-man";
|
|
1255
|
+
a ? p += ` ${se}` : p += ` ${re}`, d.attr("class", p);
|
|
1256
|
+
const r = _t();
|
|
1257
|
+
r.x = e.x, r.y = s, r.fill = "#eaeaea", r.width = e.width, r.height = e.height, r.class = "actor", r.rx = 3, r.ry = 3, d.append("line").attr("id", "actor-man-torso" + st).attr("x1", i).attr("y1", s + 25).attr("x2", i).attr("y2", s + 45), d.append("line").attr("id", "actor-man-arms" + st).attr("x1", i - gt / 2).attr("y1", s + 33).attr("x2", i + gt / 2).attr("y2", s + 33), d.append("line").attr("x1", i - gt / 2).attr("y1", s + 60).attr("x2", i).attr("y2", s + 45), d.append("line").attr("x1", i).attr("y1", s + 45).attr("x2", i + gt / 2 - 2).attr("y2", s + 60);
|
|
1258
|
+
const x = d.append("circle");
|
|
1259
|
+
x.attr("cx", e.x + e.width / 2), x.attr("cy", s + 10), x.attr("r", 15), x.attr("width", e.width), x.attr("height", e.height);
|
|
1260
|
+
const E = d.node().getBBox();
|
|
1261
|
+
return e.height = E.height, Ft(c)(
|
|
1279
1262
|
e.description,
|
|
1280
|
-
|
|
1263
|
+
d,
|
|
1281
1264
|
r.x,
|
|
1282
1265
|
r.y + 35,
|
|
1283
1266
|
r.width,
|
|
@@ -1285,16 +1268,16 @@ const pe = (t, e, c, a) => {
|
|
|
1285
1268
|
{ class: "actor" },
|
|
1286
1269
|
c
|
|
1287
1270
|
), e.height;
|
|
1288
|
-
},
|
|
1271
|
+
}, o0 = function(t, e, c, a) {
|
|
1289
1272
|
switch (e.type) {
|
|
1290
1273
|
case "actor":
|
|
1291
|
-
return
|
|
1274
|
+
return i0(t, e, c, a);
|
|
1292
1275
|
case "participant":
|
|
1293
|
-
return
|
|
1276
|
+
return s0(t, e, c, a);
|
|
1294
1277
|
}
|
|
1295
|
-
},
|
|
1278
|
+
}, n0 = function(t, e, c) {
|
|
1296
1279
|
const a = t.append("g");
|
|
1297
|
-
|
|
1280
|
+
ne(a, e), e.name && Ft(c)(
|
|
1298
1281
|
e.name,
|
|
1299
1282
|
a,
|
|
1300
1283
|
e.x,
|
|
@@ -1304,22 +1287,22 @@ const pe = (t, e, c, a) => {
|
|
|
1304
1287
|
{ class: "text" },
|
|
1305
1288
|
c
|
|
1306
1289
|
), a.lower();
|
|
1307
|
-
},
|
|
1290
|
+
}, c0 = function(t) {
|
|
1308
1291
|
return t.append("g");
|
|
1309
|
-
},
|
|
1310
|
-
const i =
|
|
1311
|
-
i.x = e.startx, i.y = e.starty, i.class = "activation" + s % 3, i.width = e.stopx - e.startx, i.height = c - e.starty,
|
|
1312
|
-
},
|
|
1292
|
+
}, l0 = function(t, e, c, a, s) {
|
|
1293
|
+
const i = _t(), l = e.anchored;
|
|
1294
|
+
i.x = e.startx, i.y = e.starty, i.class = "activation" + s % 3, i.width = e.stopx - e.startx, i.height = c - e.starty, Vt(l, i);
|
|
1295
|
+
}, d0 = function(t, e, c, a) {
|
|
1313
1296
|
const {
|
|
1314
1297
|
boxMargin: s,
|
|
1315
1298
|
boxTextMargin: i,
|
|
1316
1299
|
labelBoxHeight: l,
|
|
1317
|
-
labelBoxWidth:
|
|
1318
|
-
messageFontFamily:
|
|
1300
|
+
labelBoxWidth: d,
|
|
1301
|
+
messageFontFamily: p,
|
|
1319
1302
|
messageFontSize: r,
|
|
1320
|
-
messageFontWeight:
|
|
1321
|
-
} = a,
|
|
1322
|
-
return
|
|
1303
|
+
messageFontWeight: x
|
|
1304
|
+
} = a, E = t.append("g"), g = function(_, I, O, M) {
|
|
1305
|
+
return E.append("line").attr("x1", _).attr("y1", I).attr("x2", O).attr("y2", M).attr("class", "loopLine");
|
|
1323
1306
|
};
|
|
1324
1307
|
g(e.startx, e.starty, e.stopx, e.starty), g(e.stopx, e.starty, e.stopx, e.stopy), g(e.startx, e.stopy, e.stopx, e.stopy), g(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(_) {
|
|
1325
1308
|
g(e.startx, _.y, e.stopx, _.y).style(
|
|
@@ -1327,46 +1310,44 @@ const pe = (t, e, c, a) => {
|
|
|
1327
1310
|
"3, 3"
|
|
1328
1311
|
);
|
|
1329
1312
|
});
|
|
1330
|
-
let
|
|
1331
|
-
|
|
1332
|
-
let w =
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
},
|
|
1345
|
-
Ae(t, e);
|
|
1346
|
-
}, y0 = function(t) {
|
|
1313
|
+
let m = Yt();
|
|
1314
|
+
m.text = c, m.x = e.startx, m.y = e.starty, m.fontFamily = p, m.fontSize = r, m.fontWeight = x, m.anchor = "middle", m.valign = "middle", m.tspan = !1, m.width = d || 50, m.height = l || 20, m.textMargin = i, m.class = "labelText", ie(E, m), m = ce(), m.text = e.title, m.x = e.startx + d / 2 + (e.stopx - e.startx) / 2, m.y = e.starty + s + i, m.anchor = "middle", m.valign = "middle", m.textMargin = i, m.class = "loopText", m.fontFamily = p, m.fontSize = r, m.fontWeight = x, m.wrap = !0;
|
|
1315
|
+
let w = yt(E, m);
|
|
1316
|
+
return e.sectionTitles !== void 0 && e.sectionTitles.forEach(function(_, I) {
|
|
1317
|
+
if (_.message) {
|
|
1318
|
+
m.text = _.message, m.x = e.startx + (e.stopx - e.startx) / 2, m.y = e.sections[I].y + s + i, m.class = "loopText", m.anchor = "middle", m.valign = "middle", m.tspan = !1, m.fontFamily = p, m.fontSize = r, m.fontWeight = x, m.wrap = e.wrap, w = yt(E, m);
|
|
1319
|
+
let O = Math.round(
|
|
1320
|
+
w.map((M) => (M._groups || M)[0][0].getBBox().height).reduce((M, V) => M + V)
|
|
1321
|
+
);
|
|
1322
|
+
e.sections[I].height += O - (s + i);
|
|
1323
|
+
}
|
|
1324
|
+
}), e.height = Math.round(e.stopy - e.starty), E;
|
|
1325
|
+
}, ne = function(t, e) {
|
|
1326
|
+
_e(t, e);
|
|
1327
|
+
}, h0 = function(t) {
|
|
1347
1328
|
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1348
1329
|
"d",
|
|
1349
1330
|
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
|
|
1350
1331
|
);
|
|
1351
|
-
},
|
|
1332
|
+
}, p0 = function(t) {
|
|
1352
1333
|
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1353
1334
|
"d",
|
|
1354
1335
|
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
|
|
1355
1336
|
);
|
|
1356
|
-
},
|
|
1337
|
+
}, g0 = function(t) {
|
|
1357
1338
|
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1358
1339
|
"d",
|
|
1359
1340
|
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
|
|
1360
1341
|
);
|
|
1361
|
-
},
|
|
1342
|
+
}, u0 = function(t) {
|
|
1362
1343
|
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
|
|
1363
|
-
},
|
|
1344
|
+
}, x0 = function(t) {
|
|
1364
1345
|
t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1365
|
-
},
|
|
1346
|
+
}, m0 = function(t) {
|
|
1366
1347
|
t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
|
|
1367
|
-
},
|
|
1348
|
+
}, b0 = function(t) {
|
|
1368
1349
|
t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
|
|
1369
|
-
},
|
|
1350
|
+
}, ce = function() {
|
|
1370
1351
|
return {
|
|
1371
1352
|
x: 0,
|
|
1372
1353
|
y: 0,
|
|
@@ -1381,7 +1362,7 @@ const pe = (t, e, c, a) => {
|
|
|
1381
1362
|
tspan: !0,
|
|
1382
1363
|
valign: void 0
|
|
1383
1364
|
};
|
|
1384
|
-
},
|
|
1365
|
+
}, y0 = function() {
|
|
1385
1366
|
return {
|
|
1386
1367
|
x: 0,
|
|
1387
1368
|
y: 0,
|
|
@@ -1393,48 +1374,44 @@ const pe = (t, e, c, a) => {
|
|
|
1393
1374
|
rx: 0,
|
|
1394
1375
|
ry: 0
|
|
1395
1376
|
};
|
|
1396
|
-
},
|
|
1397
|
-
function t(i, l,
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
}
|
|
1401
|
-
function e(i, l,
|
|
1402
|
-
const { actorFontSize:
|
|
1403
|
-
for (let
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1377
|
+
}, Ft = /* @__PURE__ */ function() {
|
|
1378
|
+
function t(s, i, l, d, p, r, x) {
|
|
1379
|
+
const E = i.append("text").attr("x", l + p / 2).attr("y", d + r / 2 + 5).style("text-anchor", "middle").text(s);
|
|
1380
|
+
a(E, x);
|
|
1381
|
+
}
|
|
1382
|
+
function e(s, i, l, d, p, r, x, E) {
|
|
1383
|
+
const { actorFontSize: g, actorFontFamily: m, actorFontWeight: w } = E, [_, I] = Gt(g), O = s.split(P.lineBreakRegex);
|
|
1384
|
+
for (let M = 0; M < O.length; M++) {
|
|
1385
|
+
const V = M * _ - _ * (O.length - 1) / 2, S = i.append("text").attr("x", l + p / 2).attr("y", d).style("text-anchor", "middle").style("font-size", I).style("font-weight", w).style("font-family", m);
|
|
1386
|
+
S.append("tspan").attr("x", l + p / 2).attr("dy", V).text(O[M]), S.attr("y", d + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(S, x);
|
|
1406
1387
|
}
|
|
1407
1388
|
}
|
|
1408
|
-
function c(i, l,
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1389
|
+
function c(s, i, l, d, p, r, x, E) {
|
|
1390
|
+
const g = i.append("switch"), m = g.append("foreignObject").attr("x", l).attr("y", d).attr("width", p).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1391
|
+
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, g, l, d, p, r, x, E), a(m, x);
|
|
1411
1392
|
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
}
|
|
1416
|
-
function s(i, l) {
|
|
1417
|
-
for (const n in l)
|
|
1418
|
-
l.hasOwnProperty(n) && i.attr(n, l[n]);
|
|
1393
|
+
function a(s, i) {
|
|
1394
|
+
for (const l in i)
|
|
1395
|
+
i.hasOwnProperty(l) && s.attr(l, i[l]);
|
|
1419
1396
|
}
|
|
1420
|
-
return function(
|
|
1421
|
-
return
|
|
1397
|
+
return function(s) {
|
|
1398
|
+
return s.textPlacement === "fo" ? c : s.textPlacement === "old" ? t : e;
|
|
1422
1399
|
};
|
|
1423
|
-
}(),
|
|
1424
|
-
function t(s, i, l,
|
|
1425
|
-
const
|
|
1426
|
-
a(
|
|
1427
|
-
}
|
|
1428
|
-
function e(s, i, l,
|
|
1429
|
-
const { actorFontSize: g, actorFontFamily:
|
|
1430
|
-
for (let
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1400
|
+
}(), f0 = /* @__PURE__ */ function() {
|
|
1401
|
+
function t(s, i, l, d, p, r, x) {
|
|
1402
|
+
const E = i.append("text").attr("x", l).attr("y", d).style("text-anchor", "start").text(s);
|
|
1403
|
+
a(E, x);
|
|
1404
|
+
}
|
|
1405
|
+
function e(s, i, l, d, p, r, x, E) {
|
|
1406
|
+
const { actorFontSize: g, actorFontFamily: m, actorFontWeight: w } = E, _ = s.split(P.lineBreakRegex);
|
|
1407
|
+
for (let I = 0; I < _.length; I++) {
|
|
1408
|
+
const O = I * g - g * (_.length - 1) / 2, M = i.append("text").attr("x", l).attr("y", d).style("text-anchor", "start").style("font-size", g).style("font-weight", w).style("font-family", m);
|
|
1409
|
+
M.append("tspan").attr("x", l).attr("dy", O).text(_[I]), M.attr("y", d + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(M, x);
|
|
1433
1410
|
}
|
|
1434
1411
|
}
|
|
1435
|
-
function c(s, i, l,
|
|
1436
|
-
const g = i.append("switch"),
|
|
1437
|
-
|
|
1412
|
+
function c(s, i, l, d, p, r, x, E) {
|
|
1413
|
+
const g = i.append("switch"), m = g.append("foreignObject").attr("x", l).attr("y", d).attr("width", p).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1414
|
+
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, g, l, d, p, r, x, E), a(m, x);
|
|
1438
1415
|
}
|
|
1439
1416
|
function a(s, i) {
|
|
1440
1417
|
for (const l in i)
|
|
@@ -1443,31 +1420,31 @@ const pe = (t, e, c, a) => {
|
|
|
1443
1420
|
return function(s) {
|
|
1444
1421
|
return s.textPlacement === "fo" ? c : s.textPlacement === "old" ? t : e;
|
|
1445
1422
|
};
|
|
1446
|
-
}(),
|
|
1447
|
-
drawRect:
|
|
1448
|
-
drawText:
|
|
1449
|
-
drawLabel:
|
|
1450
|
-
drawActor:
|
|
1451
|
-
drawBox:
|
|
1452
|
-
drawPopup:
|
|
1453
|
-
anchorElement:
|
|
1454
|
-
drawActivation:
|
|
1455
|
-
drawLoop:
|
|
1456
|
-
drawBackgroundRect:
|
|
1457
|
-
insertArrowHead:
|
|
1458
|
-
insertArrowFilledHead:
|
|
1459
|
-
insertSequenceNumber:
|
|
1460
|
-
insertArrowCrossHead:
|
|
1461
|
-
insertDatabaseIcon:
|
|
1462
|
-
insertComputerIcon:
|
|
1463
|
-
insertClockIcon:
|
|
1464
|
-
getTextObj:
|
|
1465
|
-
getNoteRect:
|
|
1466
|
-
fixLifeLineHeights:
|
|
1467
|
-
sanitizeUrl:
|
|
1423
|
+
}(), R = {
|
|
1424
|
+
drawRect: Vt,
|
|
1425
|
+
drawText: yt,
|
|
1426
|
+
drawLabel: ie,
|
|
1427
|
+
drawActor: o0,
|
|
1428
|
+
drawBox: n0,
|
|
1429
|
+
drawPopup: a0,
|
|
1430
|
+
anchorElement: c0,
|
|
1431
|
+
drawActivation: l0,
|
|
1432
|
+
drawLoop: d0,
|
|
1433
|
+
drawBackgroundRect: ne,
|
|
1434
|
+
insertArrowHead: u0,
|
|
1435
|
+
insertArrowFilledHead: x0,
|
|
1436
|
+
insertSequenceNumber: m0,
|
|
1437
|
+
insertArrowCrossHead: b0,
|
|
1438
|
+
insertDatabaseIcon: h0,
|
|
1439
|
+
insertComputerIcon: p0,
|
|
1440
|
+
insertClockIcon: g0,
|
|
1441
|
+
getTextObj: ce,
|
|
1442
|
+
getNoteRect: y0,
|
|
1443
|
+
fixLifeLineHeights: oe,
|
|
1444
|
+
sanitizeUrl: Kt.sanitizeUrl
|
|
1468
1445
|
};
|
|
1469
1446
|
let o = {};
|
|
1470
|
-
const
|
|
1447
|
+
const u = {
|
|
1471
1448
|
data: {
|
|
1472
1449
|
startx: void 0,
|
|
1473
1450
|
stopx: void 0,
|
|
@@ -1526,7 +1503,7 @@ const x = {
|
|
|
1526
1503
|
stopx: void 0,
|
|
1527
1504
|
starty: void 0,
|
|
1528
1505
|
stopy: void 0
|
|
1529
|
-
}, this.verticalPos = 0,
|
|
1506
|
+
}, this.verticalPos = 0, de(lt());
|
|
1530
1507
|
},
|
|
1531
1508
|
updateVal: function(t, e, c, a) {
|
|
1532
1509
|
t[e] === void 0 ? t[e] = c : t[e] = a(c, t[e]);
|
|
@@ -1534,28 +1511,28 @@ const x = {
|
|
|
1534
1511
|
updateBounds: function(t, e, c, a) {
|
|
1535
1512
|
const s = this;
|
|
1536
1513
|
let i = 0;
|
|
1537
|
-
function l(
|
|
1538
|
-
return function(
|
|
1514
|
+
function l(d) {
|
|
1515
|
+
return function(p) {
|
|
1539
1516
|
i++;
|
|
1540
1517
|
const r = s.sequenceItems.length - i + 1;
|
|
1541
|
-
s.updateVal(
|
|
1518
|
+
s.updateVal(p, "starty", e - r * o.boxMargin, Math.min), s.updateVal(p, "stopy", a + r * o.boxMargin, Math.max), s.updateVal(u.data, "startx", t - r * o.boxMargin, Math.min), s.updateVal(u.data, "stopx", c + r * o.boxMargin, Math.max), d !== "activation" && (s.updateVal(p, "startx", t - r * o.boxMargin, Math.min), s.updateVal(p, "stopx", c + r * o.boxMargin, Math.max), s.updateVal(u.data, "starty", e - r * o.boxMargin, Math.min), s.updateVal(u.data, "stopy", a + r * o.boxMargin, Math.max));
|
|
1542
1519
|
};
|
|
1543
1520
|
}
|
|
1544
1521
|
this.sequenceItems.forEach(l()), this.activations.forEach(l("activation"));
|
|
1545
1522
|
},
|
|
1546
1523
|
insert: function(t, e, c, a) {
|
|
1547
|
-
const s =
|
|
1548
|
-
this.updateVal(
|
|
1524
|
+
const s = P.getMin(t, c), i = P.getMax(t, c), l = P.getMin(e, a), d = P.getMax(e, a);
|
|
1525
|
+
this.updateVal(u.data, "startx", s, Math.min), this.updateVal(u.data, "starty", l, Math.min), this.updateVal(u.data, "stopx", i, Math.max), this.updateVal(u.data, "stopy", d, Math.max), this.updateBounds(s, l, i, d);
|
|
1549
1526
|
},
|
|
1550
1527
|
newActivation: function(t, e, c) {
|
|
1551
|
-
const a = c[t.from.actor], s =
|
|
1528
|
+
const a = c[t.from.actor], s = Lt(t.from.actor).length || 0, i = a.x + a.width / 2 + (s - 1) * o.activationWidth / 2;
|
|
1552
1529
|
this.activations.push({
|
|
1553
1530
|
startx: i,
|
|
1554
1531
|
starty: this.verticalPos + 2,
|
|
1555
1532
|
stopx: i + o.activationWidth,
|
|
1556
1533
|
stopy: void 0,
|
|
1557
1534
|
actor: t.from.actor,
|
|
1558
|
-
anchored:
|
|
1535
|
+
anchored: R.anchorElement(e)
|
|
1559
1536
|
});
|
|
1560
1537
|
},
|
|
1561
1538
|
endActivation: function(t) {
|
|
@@ -1588,7 +1565,7 @@ const x = {
|
|
|
1588
1565
|
},
|
|
1589
1566
|
addSectionToLoop: function(t) {
|
|
1590
1567
|
const e = this.sequenceItems.pop();
|
|
1591
|
-
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y:
|
|
1568
|
+
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: u.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
|
|
1592
1569
|
},
|
|
1593
1570
|
saveVerticalPos: function() {
|
|
1594
1571
|
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
@@ -1597,7 +1574,7 @@ const x = {
|
|
|
1597
1574
|
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1598
1575
|
},
|
|
1599
1576
|
bumpVerticalPos: function(t) {
|
|
1600
|
-
this.verticalPos = this.verticalPos + t, this.data.stopy =
|
|
1577
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = P.getMax(this.data.stopy, this.verticalPos);
|
|
1601
1578
|
},
|
|
1602
1579
|
getVerticalPos: function() {
|
|
1603
1580
|
return this.verticalPos;
|
|
@@ -1605,347 +1582,343 @@ const x = {
|
|
|
1605
1582
|
getBounds: function() {
|
|
1606
1583
|
return { bounds: this.data, models: this.models };
|
|
1607
1584
|
}
|
|
1608
|
-
},
|
|
1609
|
-
|
|
1610
|
-
const c =
|
|
1585
|
+
}, E0 = function(t, e) {
|
|
1586
|
+
u.bumpVerticalPos(o.boxMargin), e.height = o.boxMargin, e.starty = u.getVerticalPos();
|
|
1587
|
+
const c = _t();
|
|
1611
1588
|
c.x = e.startx, c.y = e.starty, c.width = e.width || o.width, c.class = "note";
|
|
1612
|
-
const a = t.append("g"), s =
|
|
1589
|
+
const a = t.append("g"), s = R.drawRect(a, c), i = Yt();
|
|
1613
1590
|
i.x = e.startx, i.y = e.starty, i.width = c.width, i.dy = "1em", i.text = e.message, i.class = "noteText", i.fontFamily = o.noteFontFamily, i.fontSize = o.noteFontSize, i.fontWeight = o.noteFontWeight, i.anchor = o.noteAlign, i.textMargin = o.noteMargin, i.valign = "center";
|
|
1614
|
-
const l =
|
|
1615
|
-
l.map((
|
|
1591
|
+
const l = yt(a, i), d = Math.round(
|
|
1592
|
+
l.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, r) => p + r)
|
|
1616
1593
|
);
|
|
1617
|
-
s.attr("height",
|
|
1618
|
-
},
|
|
1594
|
+
s.attr("height", d + 2 * o.noteMargin), e.height += d + 2 * o.noteMargin, u.bumpVerticalPos(d + 2 * o.noteMargin), e.stopy = e.starty + d + 2 * o.noteMargin, e.stopx = e.startx + c.width, u.insert(e.startx, e.starty, e.stopx, e.stopy), u.models.addNote(e);
|
|
1595
|
+
}, xt = (t) => ({
|
|
1619
1596
|
fontFamily: t.messageFontFamily,
|
|
1620
1597
|
fontSize: t.messageFontSize,
|
|
1621
1598
|
fontWeight: t.messageFontWeight
|
|
1622
|
-
}),
|
|
1599
|
+
}), bt = (t) => ({
|
|
1623
1600
|
fontFamily: t.noteFontFamily,
|
|
1624
1601
|
fontSize: t.noteFontSize,
|
|
1625
1602
|
fontWeight: t.noteFontWeight
|
|
1626
|
-
}),
|
|
1603
|
+
}), Ct = (t) => ({
|
|
1627
1604
|
fontFamily: t.actorFontFamily,
|
|
1628
1605
|
fontSize: t.actorFontSize,
|
|
1629
1606
|
fontWeight: t.actorFontWeight
|
|
1630
1607
|
});
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
const { startx: c, stopx: a, message: s } = e, i =
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
}
|
|
1638
|
-
let h, r = n.height - 10;
|
|
1639
|
-
const u = n.width;
|
|
1608
|
+
function T0(t, e) {
|
|
1609
|
+
u.bumpVerticalPos(10);
|
|
1610
|
+
const { startx: c, stopx: a, message: s } = e, i = P.splitBreaks(s).length, l = $.calculateTextDimensions(s, xt(o)), d = l.height / i;
|
|
1611
|
+
e.height += d, u.bumpVerticalPos(d);
|
|
1612
|
+
let p, r = l.height - 10;
|
|
1613
|
+
const x = l.width;
|
|
1640
1614
|
if (c === a) {
|
|
1641
|
-
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
c -
|
|
1645
|
-
|
|
1646
|
-
a +
|
|
1647
|
-
|
|
1615
|
+
p = u.getVerticalPos() + r, o.rightAngles || (r += o.boxMargin, p = u.getVerticalPos() + r), r += 30;
|
|
1616
|
+
const E = P.getMax(x / 2, o.width / 2);
|
|
1617
|
+
u.insert(
|
|
1618
|
+
c - E,
|
|
1619
|
+
u.getVerticalPos() - 10 + r,
|
|
1620
|
+
a + E,
|
|
1621
|
+
u.getVerticalPos() + 30 + r
|
|
1648
1622
|
);
|
|
1649
1623
|
} else
|
|
1650
|
-
r += o.boxMargin,
|
|
1651
|
-
return
|
|
1624
|
+
r += o.boxMargin, p = u.getVerticalPos() + r, u.insert(c, p - 10, a, p);
|
|
1625
|
+
return u.bumpVerticalPos(r), e.height += r, e.stopy = e.starty + e.height, u.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
|
|
1652
1626
|
}
|
|
1653
|
-
const
|
|
1654
|
-
const { startx: s, stopx: i, starty: l, message:
|
|
1655
|
-
g.x = s, g.y = l + 10, g.width = i - s, g.class = "messageText", g.dy = "1em", g.text =
|
|
1656
|
-
const
|
|
1627
|
+
const w0 = function(t, e, c, a) {
|
|
1628
|
+
const { startx: s, stopx: i, starty: l, message: d, type: p, sequenceIndex: r, sequenceVisible: x } = e, E = $.calculateTextDimensions(d, xt(o)), g = Yt();
|
|
1629
|
+
g.x = s, g.y = l + 10, g.width = i - s, g.class = "messageText", g.dy = "1em", g.text = d, g.fontFamily = o.messageFontFamily, g.fontSize = o.messageFontSize, g.fontWeight = o.messageFontWeight, g.anchor = o.messageAlign, g.valign = "center", g.textMargin = o.wrapPadding, g.tspan = !1, yt(t, g);
|
|
1630
|
+
const m = E.width;
|
|
1657
1631
|
let w;
|
|
1658
1632
|
s === i ? o.rightAngles ? w = t.append("path").attr(
|
|
1659
1633
|
"d",
|
|
1660
|
-
`M ${s},${c} H ${s +
|
|
1634
|
+
`M ${s},${c} H ${s + P.getMax(o.width / 2, m / 2)} V ${c + 25} H ${s}`
|
|
1661
1635
|
) : w = t.append("path").attr(
|
|
1662
1636
|
"d",
|
|
1663
1637
|
"M " + s + "," + c + " C " + (s + 60) + "," + (c - 10) + " " + (s + 60) + "," + (c + 30) + " " + s + "," + (c + 20)
|
|
1664
|
-
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", c), w.attr("x2", i), w.attr("y2", c)),
|
|
1638
|
+
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", c), w.attr("x2", i), w.attr("y2", c)), p === a.db.LINETYPE.DOTTED || p === a.db.LINETYPE.DOTTED_CROSS || p === a.db.LINETYPE.DOTTED_POINT || p === a.db.LINETYPE.DOTTED_OPEN ? (w.style("stroke-dasharray", "3, 3"), w.attr("class", "messageLine1")) : w.attr("class", "messageLine0");
|
|
1665
1639
|
let _ = "";
|
|
1666
|
-
o.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), w.attr("stroke-width", 2), w.attr("stroke", "none"), w.style("fill", "none"), (
|
|
1667
|
-
},
|
|
1668
|
-
let
|
|
1669
|
-
for (const
|
|
1670
|
-
const g = e[
|
|
1671
|
-
r && r !=
|
|
1672
|
-
}
|
|
1673
|
-
r && !l &&
|
|
1674
|
-
},
|
|
1640
|
+
o.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), w.attr("stroke-width", 2), w.attr("stroke", "none"), w.style("fill", "none"), (p === a.db.LINETYPE.SOLID || p === a.db.LINETYPE.DOTTED) && w.attr("marker-end", "url(" + _ + "#arrowhead)"), (p === a.db.LINETYPE.SOLID_POINT || p === a.db.LINETYPE.DOTTED_POINT) && w.attr("marker-end", "url(" + _ + "#filled-head)"), (p === a.db.LINETYPE.SOLID_CROSS || p === a.db.LINETYPE.DOTTED_CROSS) && w.attr("marker-end", "url(" + _ + "#crosshead)"), (x || o.showSequenceNumbers) && (w.attr("marker-start", "url(" + _ + "#sequencenumber)"), t.append("text").attr("x", s).attr("y", c + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(r));
|
|
1641
|
+
}, P0 = function(t, e, c, a, s, i, l) {
|
|
1642
|
+
let d = 0, p = 0, r, x = 0;
|
|
1643
|
+
for (const E of a) {
|
|
1644
|
+
const g = e[E], m = g.box;
|
|
1645
|
+
r && r != m && (u.models.addBox(r), p += o.boxMargin + r.margin), m && m != r && (m.x = d + p, m.y = s, p += m.margin), g.width = g.width || o.width, g.height = P.getMax(g.height || o.height, o.height), g.margin = g.margin || o.actorMargin, x = P.getMax(x, g.height), c[g.name] && (p += g.width / 2), g.x = d + p, g.starty = u.getVerticalPos(), u.insert(g.x, s, g.x + g.width, g.height), d += g.width + p, g.box && (g.box.width = d + m.margin - g.box.x), p = g.margin, r = g.box, u.models.addActor(g);
|
|
1646
|
+
}
|
|
1647
|
+
r && !l && u.models.addBox(r), u.bumpVerticalPos(x);
|
|
1648
|
+
}, $t = function(t, e, c, a) {
|
|
1675
1649
|
if (a) {
|
|
1676
1650
|
let s = 0;
|
|
1677
|
-
|
|
1651
|
+
u.bumpVerticalPos(o.boxMargin * 2);
|
|
1678
1652
|
for (const i of c) {
|
|
1679
1653
|
const l = e[i];
|
|
1680
|
-
l.stopy || (l.stopy =
|
|
1681
|
-
const
|
|
1682
|
-
s =
|
|
1654
|
+
l.stopy || (l.stopy = u.getVerticalPos());
|
|
1655
|
+
const d = R.drawActor(t, l, o, !0);
|
|
1656
|
+
s = P.getMax(s, d);
|
|
1683
1657
|
}
|
|
1684
|
-
|
|
1658
|
+
u.bumpVerticalPos(s + o.boxMargin);
|
|
1685
1659
|
} else
|
|
1686
1660
|
for (const s of c) {
|
|
1687
1661
|
const i = e[s];
|
|
1688
|
-
|
|
1662
|
+
R.drawActor(t, i, o, !1);
|
|
1689
1663
|
}
|
|
1690
|
-
},
|
|
1664
|
+
}, le = function(t, e, c, a) {
|
|
1691
1665
|
let s = 0, i = 0;
|
|
1692
1666
|
for (const l of c) {
|
|
1693
|
-
const
|
|
1667
|
+
const d = e[l], p = L0(d), r = R.drawPopup(
|
|
1694
1668
|
t,
|
|
1695
|
-
|
|
1696
|
-
|
|
1669
|
+
d,
|
|
1670
|
+
p,
|
|
1697
1671
|
o,
|
|
1698
1672
|
o.forceMenus,
|
|
1699
1673
|
a
|
|
1700
1674
|
);
|
|
1701
|
-
r.height > s && (s = r.height), r.width +
|
|
1675
|
+
r.height > s && (s = r.height), r.width + d.x > i && (i = r.width + d.x);
|
|
1702
1676
|
}
|
|
1703
1677
|
return { maxHeight: s, maxWidth: i };
|
|
1704
|
-
},
|
|
1705
|
-
|
|
1706
|
-
},
|
|
1707
|
-
return
|
|
1678
|
+
}, de = function(t) {
|
|
1679
|
+
Pe(o, t), t.fontFamily && (o.actorFontFamily = o.noteFontFamily = o.messageFontFamily = t.fontFamily), t.fontSize && (o.actorFontSize = o.noteFontSize = o.messageFontSize = t.fontSize), t.fontWeight && (o.actorFontWeight = o.noteFontWeight = o.messageFontWeight = t.fontWeight);
|
|
1680
|
+
}, Lt = function(t) {
|
|
1681
|
+
return u.activations.filter(function(e) {
|
|
1708
1682
|
return e.actor === t;
|
|
1709
1683
|
});
|
|
1710
|
-
},
|
|
1711
|
-
const c = e[t], a =
|
|
1712
|
-
return
|
|
1713
|
-
}, c.x + c.width / 2 - 1), i = a.reduce(function(l,
|
|
1714
|
-
return
|
|
1684
|
+
}, Xt = function(t, e) {
|
|
1685
|
+
const c = e[t], a = Lt(t), s = a.reduce(function(l, d) {
|
|
1686
|
+
return P.getMin(l, d.startx);
|
|
1687
|
+
}, c.x + c.width / 2 - 1), i = a.reduce(function(l, d) {
|
|
1688
|
+
return P.getMax(l, d.stopx);
|
|
1715
1689
|
}, c.x + c.width / 2 + 1);
|
|
1716
1690
|
return [s, i];
|
|
1717
1691
|
};
|
|
1718
|
-
function
|
|
1719
|
-
|
|
1692
|
+
function rt(t, e, c, a, s) {
|
|
1693
|
+
u.bumpVerticalPos(c);
|
|
1720
1694
|
let i = a;
|
|
1721
1695
|
if (e.id && e.message && t[e.id]) {
|
|
1722
|
-
const l = t[e.id].width,
|
|
1723
|
-
e.message = $.wrapLabel(`[${e.message}]`, l - 2 * o.wrapPadding,
|
|
1724
|
-
const
|
|
1725
|
-
i = a + r,
|
|
1696
|
+
const l = t[e.id].width, d = xt(o);
|
|
1697
|
+
e.message = $.wrapLabel(`[${e.message}]`, l - 2 * o.wrapPadding, d), e.width = l, e.wrap = !0;
|
|
1698
|
+
const p = $.calculateTextDimensions(e.message, d), r = P.getMax(p.height, o.labelBoxHeight);
|
|
1699
|
+
i = a + r, j.debug(`${r} - ${e.message}`);
|
|
1726
1700
|
}
|
|
1727
|
-
s(e),
|
|
1701
|
+
s(e), u.bumpVerticalPos(i);
|
|
1728
1702
|
}
|
|
1729
|
-
function
|
|
1730
|
-
function
|
|
1731
|
-
r.x < s[t.from].x ? (
|
|
1732
|
-
e.stopx -
|
|
1703
|
+
function v0(t, e, c, a, s, i, l) {
|
|
1704
|
+
function d(r, x) {
|
|
1705
|
+
r.x < s[t.from].x ? (u.insert(
|
|
1706
|
+
e.stopx - x,
|
|
1733
1707
|
e.starty,
|
|
1734
1708
|
e.startx,
|
|
1735
1709
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1736
|
-
), e.stopx = e.stopx +
|
|
1710
|
+
), e.stopx = e.stopx + x) : (u.insert(
|
|
1737
1711
|
e.startx,
|
|
1738
1712
|
e.starty,
|
|
1739
|
-
e.stopx +
|
|
1713
|
+
e.stopx + x,
|
|
1740
1714
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1741
|
-
), e.stopx = e.stopx -
|
|
1715
|
+
), e.stopx = e.stopx - x);
|
|
1742
1716
|
}
|
|
1743
|
-
function
|
|
1744
|
-
r.x < s[t.to].x ? (
|
|
1745
|
-
e.startx -
|
|
1717
|
+
function p(r, x) {
|
|
1718
|
+
r.x < s[t.to].x ? (u.insert(
|
|
1719
|
+
e.startx - x,
|
|
1746
1720
|
e.starty,
|
|
1747
1721
|
e.stopx,
|
|
1748
1722
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1749
|
-
), e.startx = e.startx +
|
|
1723
|
+
), e.startx = e.startx + x) : (u.insert(
|
|
1750
1724
|
e.stopx,
|
|
1751
1725
|
e.starty,
|
|
1752
|
-
e.startx +
|
|
1726
|
+
e.startx + x,
|
|
1753
1727
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1754
|
-
), e.startx = e.startx -
|
|
1728
|
+
), e.startx = e.startx - x);
|
|
1755
1729
|
}
|
|
1756
1730
|
if (i[t.to] == a) {
|
|
1757
|
-
const r = s[t.to],
|
|
1758
|
-
|
|
1731
|
+
const r = s[t.to], x = r.type == "actor" ? gt / 2 + 3 : r.width / 2 + 3;
|
|
1732
|
+
d(r, x), r.starty = c - r.height / 2, u.bumpVerticalPos(r.height / 2);
|
|
1759
1733
|
} else if (l[t.from] == a) {
|
|
1760
1734
|
const r = s[t.from];
|
|
1761
1735
|
if (o.mirrorActors) {
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1736
|
+
const x = r.type == "actor" ? gt / 2 : r.width / 2;
|
|
1737
|
+
p(r, x);
|
|
1764
1738
|
}
|
|
1765
|
-
r.stopy = c - r.height / 2,
|
|
1739
|
+
r.stopy = c - r.height / 2, u.bumpVerticalPos(r.height / 2);
|
|
1766
1740
|
} else if (l[t.to] == a) {
|
|
1767
1741
|
const r = s[t.to];
|
|
1768
1742
|
if (o.mirrorActors) {
|
|
1769
|
-
const
|
|
1770
|
-
|
|
1743
|
+
const x = r.type == "actor" ? gt / 2 + 3 : r.width / 2 + 3;
|
|
1744
|
+
d(r, x);
|
|
1771
1745
|
}
|
|
1772
|
-
r.stopy = c - r.height / 2,
|
|
1746
|
+
r.stopy = c - r.height / 2, u.bumpVerticalPos(r.height / 2);
|
|
1773
1747
|
}
|
|
1774
1748
|
}
|
|
1775
|
-
const
|
|
1776
|
-
const { securityLevel: s, sequence: i } =
|
|
1749
|
+
const k0 = function(t, e, c, a) {
|
|
1750
|
+
const { securityLevel: s, sequence: i } = lt();
|
|
1777
1751
|
o = i;
|
|
1778
1752
|
let l;
|
|
1779
|
-
s === "sandbox" && (l =
|
|
1780
|
-
const
|
|
1781
|
-
|
|
1782
|
-
const r = s === "sandbox" ?
|
|
1753
|
+
s === "sandbox" && (l = vt("#i" + e));
|
|
1754
|
+
const d = s === "sandbox" ? vt(l.nodes()[0].contentDocument.body) : vt("body"), p = s === "sandbox" ? l.nodes()[0].contentDocument : document;
|
|
1755
|
+
u.init(), j.debug(a.db);
|
|
1756
|
+
const r = s === "sandbox" ? d.select(`[id="${e}"]`) : vt(`[id="${e}"]`), x = a.db.getActors(), E = a.db.getCreatedActors(), g = a.db.getDestroyedActors(), m = a.db.getBoxes();
|
|
1783
1757
|
let w = a.db.getActorKeys();
|
|
1784
|
-
const _ = a.db.getMessages(),
|
|
1785
|
-
if (o.height =
|
|
1786
|
-
const
|
|
1787
|
-
_.forEach((
|
|
1788
|
-
|
|
1789
|
-
}), w = w.filter((
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
const S =
|
|
1793
|
-
|
|
1794
|
-
function
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1758
|
+
const _ = a.db.getMessages(), I = a.db.getDiagramTitle(), O = a.db.hasAtLeastOneBox(), M = a.db.hasAtLeastOneBoxWithTitle(), V = _0(x, _, a);
|
|
1759
|
+
if (o.height = I0(x, V, m), R.insertComputerIcon(r), R.insertDatabaseIcon(r), R.insertClockIcon(r), O && (u.bumpVerticalPos(o.boxMargin), M && u.bumpVerticalPos(m[0].textMaxHeight)), o.hideUnusedParticipants === !0) {
|
|
1760
|
+
const y = /* @__PURE__ */ new Set();
|
|
1761
|
+
_.forEach((v) => {
|
|
1762
|
+
y.add(v.from), y.add(v.to);
|
|
1763
|
+
}), w = w.filter((v) => y.has(v));
|
|
1764
|
+
}
|
|
1765
|
+
P0(r, x, E, w, 0, _, !1);
|
|
1766
|
+
const S = A0(_, x, V, a);
|
|
1767
|
+
R.insertArrowHead(r), R.insertArrowCrossHead(r), R.insertArrowFilledHead(r), R.insertSequenceNumber(r);
|
|
1768
|
+
function tt(y, v) {
|
|
1769
|
+
const L = u.endActivation(y);
|
|
1770
|
+
L.starty + 18 > v && (L.starty = v - 6, v += 12), R.drawActivation(
|
|
1797
1771
|
r,
|
|
1798
|
-
|
|
1799
|
-
|
|
1772
|
+
L,
|
|
1773
|
+
v,
|
|
1800
1774
|
o,
|
|
1801
|
-
|
|
1802
|
-
),
|
|
1803
|
-
}
|
|
1804
|
-
let
|
|
1805
|
-
const G = [],
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
switch (m.type) {
|
|
1775
|
+
Lt(y.from.actor).length
|
|
1776
|
+
), u.insert(L.startx, v - 10, L.stopx, v);
|
|
1777
|
+
}
|
|
1778
|
+
let F = 1, X = 1;
|
|
1779
|
+
const G = [], W = [];
|
|
1780
|
+
_.forEach(function(y, v) {
|
|
1781
|
+
let L, dt, et;
|
|
1782
|
+
switch (y.type) {
|
|
1810
1783
|
case a.db.LINETYPE.NOTE:
|
|
1811
|
-
|
|
1784
|
+
u.resetVerticalPos(), dt = y.noteModel, E0(r, dt);
|
|
1812
1785
|
break;
|
|
1813
1786
|
case a.db.LINETYPE.ACTIVE_START:
|
|
1814
|
-
|
|
1787
|
+
u.newActivation(y, r, x);
|
|
1815
1788
|
break;
|
|
1816
1789
|
case a.db.LINETYPE.ACTIVE_END:
|
|
1817
|
-
|
|
1790
|
+
tt(y, u.getVerticalPos());
|
|
1818
1791
|
break;
|
|
1819
1792
|
case a.db.LINETYPE.LOOP_START:
|
|
1820
|
-
|
|
1793
|
+
rt(
|
|
1821
1794
|
S,
|
|
1822
|
-
|
|
1795
|
+
y,
|
|
1823
1796
|
o.boxMargin,
|
|
1824
1797
|
o.boxMargin + o.boxTextMargin,
|
|
1825
|
-
(
|
|
1798
|
+
(N) => u.newLoop(N)
|
|
1826
1799
|
);
|
|
1827
1800
|
break;
|
|
1828
1801
|
case a.db.LINETYPE.LOOP_END:
|
|
1829
|
-
|
|
1802
|
+
L = u.endLoop(), R.drawLoop(r, L, "loop", o), u.bumpVerticalPos(L.stopy - u.getVerticalPos()), u.models.addLoop(L);
|
|
1830
1803
|
break;
|
|
1831
1804
|
case a.db.LINETYPE.RECT_START:
|
|
1832
|
-
|
|
1805
|
+
rt(
|
|
1833
1806
|
S,
|
|
1834
|
-
|
|
1807
|
+
y,
|
|
1835
1808
|
o.boxMargin,
|
|
1836
1809
|
o.boxMargin,
|
|
1837
|
-
(
|
|
1810
|
+
(N) => u.newLoop(void 0, N.message)
|
|
1838
1811
|
);
|
|
1839
1812
|
break;
|
|
1840
1813
|
case a.db.LINETYPE.RECT_END:
|
|
1841
|
-
|
|
1814
|
+
L = u.endLoop(), W.push(L), u.models.addLoop(L), u.bumpVerticalPos(L.stopy - u.getVerticalPos());
|
|
1842
1815
|
break;
|
|
1843
1816
|
case a.db.LINETYPE.OPT_START:
|
|
1844
|
-
|
|
1817
|
+
rt(
|
|
1845
1818
|
S,
|
|
1846
|
-
|
|
1819
|
+
y,
|
|
1847
1820
|
o.boxMargin,
|
|
1848
1821
|
o.boxMargin + o.boxTextMargin,
|
|
1849
|
-
(
|
|
1822
|
+
(N) => u.newLoop(N)
|
|
1850
1823
|
);
|
|
1851
1824
|
break;
|
|
1852
1825
|
case a.db.LINETYPE.OPT_END:
|
|
1853
|
-
|
|
1826
|
+
L = u.endLoop(), R.drawLoop(r, L, "opt", o), u.bumpVerticalPos(L.stopy - u.getVerticalPos()), u.models.addLoop(L);
|
|
1854
1827
|
break;
|
|
1855
1828
|
case a.db.LINETYPE.ALT_START:
|
|
1856
|
-
|
|
1829
|
+
rt(
|
|
1857
1830
|
S,
|
|
1858
|
-
|
|
1831
|
+
y,
|
|
1859
1832
|
o.boxMargin,
|
|
1860
1833
|
o.boxMargin + o.boxTextMargin,
|
|
1861
|
-
(
|
|
1834
|
+
(N) => u.newLoop(N)
|
|
1862
1835
|
);
|
|
1863
1836
|
break;
|
|
1864
1837
|
case a.db.LINETYPE.ALT_ELSE:
|
|
1865
|
-
|
|
1838
|
+
rt(
|
|
1866
1839
|
S,
|
|
1867
|
-
|
|
1840
|
+
y,
|
|
1868
1841
|
o.boxMargin + o.boxTextMargin,
|
|
1869
1842
|
o.boxMargin,
|
|
1870
|
-
(
|
|
1843
|
+
(N) => u.addSectionToLoop(N)
|
|
1871
1844
|
);
|
|
1872
1845
|
break;
|
|
1873
1846
|
case a.db.LINETYPE.ALT_END:
|
|
1874
|
-
|
|
1847
|
+
L = u.endLoop(), R.drawLoop(r, L, "alt", o), u.bumpVerticalPos(L.stopy - u.getVerticalPos()), u.models.addLoop(L);
|
|
1875
1848
|
break;
|
|
1876
1849
|
case a.db.LINETYPE.PAR_START:
|
|
1877
1850
|
case a.db.LINETYPE.PAR_OVER_START:
|
|
1878
|
-
|
|
1851
|
+
rt(
|
|
1879
1852
|
S,
|
|
1880
|
-
|
|
1853
|
+
y,
|
|
1881
1854
|
o.boxMargin,
|
|
1882
1855
|
o.boxMargin + o.boxTextMargin,
|
|
1883
|
-
(
|
|
1884
|
-
),
|
|
1856
|
+
(N) => u.newLoop(N)
|
|
1857
|
+
), u.saveVerticalPos();
|
|
1885
1858
|
break;
|
|
1886
1859
|
case a.db.LINETYPE.PAR_AND:
|
|
1887
|
-
|
|
1860
|
+
rt(
|
|
1888
1861
|
S,
|
|
1889
|
-
|
|
1862
|
+
y,
|
|
1890
1863
|
o.boxMargin + o.boxTextMargin,
|
|
1891
1864
|
o.boxMargin,
|
|
1892
|
-
(
|
|
1865
|
+
(N) => u.addSectionToLoop(N)
|
|
1893
1866
|
);
|
|
1894
1867
|
break;
|
|
1895
1868
|
case a.db.LINETYPE.PAR_END:
|
|
1896
|
-
|
|
1869
|
+
L = u.endLoop(), R.drawLoop(r, L, "par", o), u.bumpVerticalPos(L.stopy - u.getVerticalPos()), u.models.addLoop(L);
|
|
1897
1870
|
break;
|
|
1898
1871
|
case a.db.LINETYPE.AUTONUMBER:
|
|
1899
|
-
|
|
1872
|
+
F = y.message.start || F, X = y.message.step || X, y.message.visible ? a.db.enableSequenceNumbers() : a.db.disableSequenceNumbers();
|
|
1900
1873
|
break;
|
|
1901
1874
|
case a.db.LINETYPE.CRITICAL_START:
|
|
1902
|
-
|
|
1875
|
+
rt(
|
|
1903
1876
|
S,
|
|
1904
|
-
|
|
1877
|
+
y,
|
|
1905
1878
|
o.boxMargin,
|
|
1906
1879
|
o.boxMargin + o.boxTextMargin,
|
|
1907
|
-
(
|
|
1880
|
+
(N) => u.newLoop(N)
|
|
1908
1881
|
);
|
|
1909
1882
|
break;
|
|
1910
1883
|
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
1911
|
-
|
|
1884
|
+
rt(
|
|
1912
1885
|
S,
|
|
1913
|
-
|
|
1886
|
+
y,
|
|
1914
1887
|
o.boxMargin + o.boxTextMargin,
|
|
1915
1888
|
o.boxMargin,
|
|
1916
|
-
(
|
|
1889
|
+
(N) => u.addSectionToLoop(N)
|
|
1917
1890
|
);
|
|
1918
1891
|
break;
|
|
1919
1892
|
case a.db.LINETYPE.CRITICAL_END:
|
|
1920
|
-
|
|
1893
|
+
L = u.endLoop(), R.drawLoop(r, L, "critical", o), u.bumpVerticalPos(L.stopy - u.getVerticalPos()), u.models.addLoop(L);
|
|
1921
1894
|
break;
|
|
1922
1895
|
case a.db.LINETYPE.BREAK_START:
|
|
1923
|
-
|
|
1896
|
+
rt(
|
|
1924
1897
|
S,
|
|
1925
|
-
|
|
1898
|
+
y,
|
|
1926
1899
|
o.boxMargin,
|
|
1927
1900
|
o.boxMargin + o.boxTextMargin,
|
|
1928
|
-
(
|
|
1901
|
+
(N) => u.newLoop(N)
|
|
1929
1902
|
);
|
|
1930
1903
|
break;
|
|
1931
1904
|
case a.db.LINETYPE.BREAK_END:
|
|
1932
|
-
|
|
1905
|
+
L = u.endLoop(), R.drawLoop(r, L, "break", o), u.bumpVerticalPos(L.stopy - u.getVerticalPos()), u.models.addLoop(L);
|
|
1933
1906
|
break;
|
|
1934
1907
|
default:
|
|
1935
1908
|
try {
|
|
1936
|
-
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1909
|
+
et = y.msgModel, et.starty = u.getVerticalPos(), et.sequenceIndex = F, et.sequenceVisible = a.db.showSequenceNumbers();
|
|
1910
|
+
const N = T0(r, et);
|
|
1911
|
+
v0(
|
|
1912
|
+
y,
|
|
1913
|
+
et,
|
|
1914
|
+
N,
|
|
1915
|
+
v,
|
|
1916
|
+
x,
|
|
1917
|
+
E,
|
|
1945
1918
|
g
|
|
1946
|
-
), G.push({ messageModel:
|
|
1947
|
-
} catch (
|
|
1948
|
-
|
|
1919
|
+
), G.push({ messageModel: et, lineStartY: N }), u.models.addMessage(et);
|
|
1920
|
+
} catch (N) {
|
|
1921
|
+
j.error("error while drawing message", N);
|
|
1949
1922
|
}
|
|
1950
1923
|
}
|
|
1951
1924
|
[
|
|
@@ -1957,122 +1930,117 @@ const N0 = async function(t, e, c, a) {
|
|
|
1957
1930
|
a.db.LINETYPE.DOTTED_CROSS,
|
|
1958
1931
|
a.db.LINETYPE.SOLID_POINT,
|
|
1959
1932
|
a.db.LINETYPE.DOTTED_POINT
|
|
1960
|
-
].includes(
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
J
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
let Q = V.stopx - V.startx;
|
|
1975
|
-
Q < B.maxWidth && (Q = B.maxWidth);
|
|
1976
|
-
const tt = Q + 2 * o.diagramMarginX;
|
|
1977
|
-
L && r.append("text").text(L).attr("x", (V.stopx - V.startx) / 2 - 2 * o.diagramMarginX).attr("y", -25), Me(r, H, tt, o.useMaxWidth);
|
|
1978
|
-
const M = L ? 40 : 0;
|
|
1933
|
+
].includes(y.type) && (F = F + X);
|
|
1934
|
+
}), j.debug("createdActors", E), j.debug("destroyedActors", g), $t(r, x, w, !1), G.forEach((y) => w0(r, y.messageModel, y.lineStartY, a)), o.mirrorActors && $t(r, x, w, !0), W.forEach((y) => R.drawBackgroundRect(r, y)), oe(r, x, w, o), u.models.boxes.forEach(function(y) {
|
|
1935
|
+
y.height = u.getVerticalPos() - y.y, u.insert(y.x, y.y, y.x + y.width, y.height), y.startx = y.x, y.starty = y.y, y.stopx = y.startx + y.width, y.stopy = y.starty + y.height, y.stroke = "rgb(0,0,0, 0.5)", R.drawBox(r, y, o);
|
|
1936
|
+
}), O && u.bumpVerticalPos(o.boxMargin);
|
|
1937
|
+
const B = le(r, x, w, p), { bounds: C } = u.getBounds();
|
|
1938
|
+
let K = C.stopy - C.starty;
|
|
1939
|
+
K < B.maxHeight && (K = B.maxHeight);
|
|
1940
|
+
let q = K + 2 * o.diagramMarginY;
|
|
1941
|
+
o.mirrorActors && (q = q - o.boxMargin + o.bottomMarginAdj);
|
|
1942
|
+
let U = C.stopx - C.startx;
|
|
1943
|
+
U < B.maxWidth && (U = B.maxWidth);
|
|
1944
|
+
const J = U + 2 * o.diagramMarginX;
|
|
1945
|
+
I && r.append("text").text(I).attr("x", (C.stopx - C.startx) / 2 - 2 * o.diagramMarginX).attr("y", -25), ve(r, q, J, o.useMaxWidth);
|
|
1946
|
+
const Z = I ? 40 : 0;
|
|
1979
1947
|
r.attr(
|
|
1980
1948
|
"viewBox",
|
|
1981
|
-
|
|
1982
|
-
),
|
|
1949
|
+
C.startx - o.diagramMarginX + " -" + (o.diagramMarginY + Z) + " " + J + " " + (q + Z)
|
|
1950
|
+
), j.debug("models:", u.models);
|
|
1983
1951
|
};
|
|
1984
|
-
|
|
1952
|
+
function _0(t, e, c) {
|
|
1985
1953
|
const a = {};
|
|
1986
|
-
|
|
1954
|
+
return e.forEach(function(s) {
|
|
1987
1955
|
if (t[s.to] && t[s.from]) {
|
|
1988
1956
|
const i = t[s.to];
|
|
1989
1957
|
if (s.placement === c.db.PLACEMENT.LEFTOF && !i.prevActor || s.placement === c.db.PLACEMENT.RIGHTOF && !i.nextActor)
|
|
1990
|
-
|
|
1991
|
-
const l = s.placement !== void 0,
|
|
1992
|
-
|
|
1958
|
+
return;
|
|
1959
|
+
const l = s.placement !== void 0, d = !l, p = l ? bt(o) : xt(o), r = s.wrap ? $.wrapLabel(s.message, o.width - 2 * o.wrapPadding, p) : s.message, x = $.calculateTextDimensions(r, p).width + 2 * o.wrapPadding;
|
|
1960
|
+
d && s.from === i.nextActor ? a[s.to] = P.getMax(
|
|
1993
1961
|
a[s.to] || 0,
|
|
1994
|
-
|
|
1995
|
-
) :
|
|
1962
|
+
x
|
|
1963
|
+
) : d && s.from === i.prevActor ? a[s.from] = P.getMax(
|
|
1996
1964
|
a[s.from] || 0,
|
|
1997
|
-
|
|
1998
|
-
) :
|
|
1965
|
+
x
|
|
1966
|
+
) : d && s.from === s.to ? (a[s.from] = P.getMax(
|
|
1999
1967
|
a[s.from] || 0,
|
|
2000
|
-
|
|
2001
|
-
), a[s.to] =
|
|
1968
|
+
x / 2
|
|
1969
|
+
), a[s.to] = P.getMax(
|
|
2002
1970
|
a[s.to] || 0,
|
|
2003
|
-
|
|
2004
|
-
)) : s.placement === c.db.PLACEMENT.RIGHTOF ? a[s.from] =
|
|
1971
|
+
x / 2
|
|
1972
|
+
)) : s.placement === c.db.PLACEMENT.RIGHTOF ? a[s.from] = P.getMax(
|
|
2005
1973
|
a[s.from] || 0,
|
|
2006
|
-
|
|
2007
|
-
) : s.placement === c.db.PLACEMENT.LEFTOF ? a[i.prevActor] =
|
|
1974
|
+
x
|
|
1975
|
+
) : s.placement === c.db.PLACEMENT.LEFTOF ? a[i.prevActor] = P.getMax(
|
|
2008
1976
|
a[i.prevActor] || 0,
|
|
2009
|
-
|
|
2010
|
-
) : s.placement === c.db.PLACEMENT.OVER && (i.prevActor && (a[i.prevActor] =
|
|
1977
|
+
x
|
|
1978
|
+
) : s.placement === c.db.PLACEMENT.OVER && (i.prevActor && (a[i.prevActor] = P.getMax(
|
|
2011
1979
|
a[i.prevActor] || 0,
|
|
2012
|
-
|
|
2013
|
-
)), i.nextActor && (a[s.from] =
|
|
1980
|
+
x / 2
|
|
1981
|
+
)), i.nextActor && (a[s.from] = P.getMax(
|
|
2014
1982
|
a[s.from] || 0,
|
|
2015
|
-
|
|
1983
|
+
x / 2
|
|
2016
1984
|
)));
|
|
2017
1985
|
}
|
|
2018
|
-
|
|
1986
|
+
}), j.debug("maxMessageWidthPerActor:", a), a;
|
|
2019
1987
|
}
|
|
2020
|
-
const
|
|
1988
|
+
const L0 = function(t) {
|
|
2021
1989
|
let e = 0;
|
|
2022
|
-
const c =
|
|
1990
|
+
const c = Ct(o);
|
|
2023
1991
|
for (const a in t.links) {
|
|
2024
1992
|
const s = $.calculateTextDimensions(a, c).width + 2 * o.wrapPadding + 2 * o.boxMargin;
|
|
2025
1993
|
e < s && (e = s);
|
|
2026
1994
|
}
|
|
2027
1995
|
return e;
|
|
2028
1996
|
};
|
|
2029
|
-
|
|
1997
|
+
function I0(t, e, c) {
|
|
2030
1998
|
let a = 0;
|
|
2031
|
-
|
|
1999
|
+
Object.keys(t).forEach((i) => {
|
|
2032
2000
|
const l = t[i];
|
|
2033
2001
|
l.wrap && (l.description = $.wrapLabel(
|
|
2034
2002
|
l.description,
|
|
2035
2003
|
o.width - 2 * o.wrapPadding,
|
|
2036
|
-
|
|
2004
|
+
Ct(o)
|
|
2037
2005
|
));
|
|
2038
|
-
const
|
|
2039
|
-
l.width = l.wrap ? o.width :
|
|
2040
|
-
}
|
|
2006
|
+
const d = $.calculateTextDimensions(l.description, Ct(o));
|
|
2007
|
+
l.width = l.wrap ? o.width : P.getMax(o.width, d.width + 2 * o.wrapPadding), l.height = l.wrap ? P.getMax(d.height, o.height) : o.height, a = P.getMax(a, l.height);
|
|
2008
|
+
});
|
|
2041
2009
|
for (const i in e) {
|
|
2042
2010
|
const l = t[i];
|
|
2043
2011
|
if (!l)
|
|
2044
2012
|
continue;
|
|
2045
|
-
const
|
|
2046
|
-
if (!
|
|
2013
|
+
const d = t[l.nextActor];
|
|
2014
|
+
if (!d) {
|
|
2047
2015
|
const r = e[i] + o.actorMargin - l.width / 2;
|
|
2048
|
-
l.margin =
|
|
2016
|
+
l.margin = P.getMax(r, o.actorMargin);
|
|
2049
2017
|
continue;
|
|
2050
2018
|
}
|
|
2051
|
-
const
|
|
2052
|
-
l.margin =
|
|
2019
|
+
const p = e[i] + o.actorMargin - l.width / 2 - d.width / 2;
|
|
2020
|
+
l.margin = P.getMax(p, o.actorMargin);
|
|
2053
2021
|
}
|
|
2054
2022
|
let s = 0;
|
|
2055
2023
|
return c.forEach((i) => {
|
|
2056
|
-
const l =
|
|
2057
|
-
let
|
|
2058
|
-
|
|
2059
|
-
const
|
|
2060
|
-
s =
|
|
2061
|
-
const r =
|
|
2062
|
-
if (i.margin = o.boxTextMargin,
|
|
2063
|
-
const
|
|
2064
|
-
i.margin +=
|
|
2024
|
+
const l = xt(o);
|
|
2025
|
+
let d = i.actorKeys.reduce((x, E) => x += t[E].width + (t[E].margin || 0), 0);
|
|
2026
|
+
d -= 2 * o.boxTextMargin, i.wrap && (i.name = $.wrapLabel(i.name, d - 2 * o.wrapPadding, l));
|
|
2027
|
+
const p = $.calculateTextDimensions(i.name, l);
|
|
2028
|
+
s = P.getMax(p.height, s);
|
|
2029
|
+
const r = P.getMax(d, p.width + 2 * o.wrapPadding);
|
|
2030
|
+
if (i.margin = o.boxTextMargin, d < r) {
|
|
2031
|
+
const x = (r - d) / 2;
|
|
2032
|
+
i.margin += x;
|
|
2065
2033
|
}
|
|
2066
|
-
}), c.forEach((i) => i.textMaxHeight = s),
|
|
2034
|
+
}), c.forEach((i) => i.textMaxHeight = s), P.getMax(a, o.height);
|
|
2067
2035
|
}
|
|
2068
|
-
const
|
|
2036
|
+
const N0 = function(t, e, c) {
|
|
2069
2037
|
const a = e[t.from].x, s = e[t.to].x, i = t.wrap && t.message;
|
|
2070
|
-
let l =
|
|
2071
|
-
i ? $.wrapLabel(t.message, o.width,
|
|
2072
|
-
|
|
2038
|
+
let l = $.calculateTextDimensions(
|
|
2039
|
+
i ? $.wrapLabel(t.message, o.width, bt(o)) : t.message,
|
|
2040
|
+
bt(o)
|
|
2073
2041
|
);
|
|
2074
|
-
const
|
|
2075
|
-
width: i ? o.width :
|
|
2042
|
+
const d = {
|
|
2043
|
+
width: i ? o.width : P.getMax(o.width, l.width + 2 * o.noteMargin),
|
|
2076
2044
|
height: 0,
|
|
2077
2045
|
startx: e[t.from].x,
|
|
2078
2046
|
stopx: 0,
|
|
@@ -2080,31 +2048,31 @@ const D0 = async function(t, e, c) {
|
|
|
2080
2048
|
stopy: 0,
|
|
2081
2049
|
message: t.message
|
|
2082
2050
|
};
|
|
2083
|
-
return t.placement === c.db.PLACEMENT.RIGHTOF ? (
|
|
2051
|
+
return t.placement === c.db.PLACEMENT.RIGHTOF ? (d.width = i ? P.getMax(o.width, l.width) : P.getMax(
|
|
2084
2052
|
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2085
2053
|
l.width + 2 * o.noteMargin
|
|
2086
|
-
),
|
|
2054
|
+
), d.startx = a + (e[t.from].width + o.actorMargin) / 2) : t.placement === c.db.PLACEMENT.LEFTOF ? (d.width = i ? P.getMax(o.width, l.width + 2 * o.noteMargin) : P.getMax(
|
|
2087
2055
|
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2088
2056
|
l.width + 2 * o.noteMargin
|
|
2089
|
-
),
|
|
2057
|
+
), d.startx = a - d.width + (e[t.from].width - o.actorMargin) / 2) : t.to === t.from ? (l = $.calculateTextDimensions(
|
|
2090
2058
|
i ? $.wrapLabel(
|
|
2091
2059
|
t.message,
|
|
2092
|
-
|
|
2093
|
-
|
|
2060
|
+
P.getMax(o.width, e[t.from].width),
|
|
2061
|
+
bt(o)
|
|
2094
2062
|
) : t.message,
|
|
2095
|
-
|
|
2096
|
-
),
|
|
2063
|
+
bt(o)
|
|
2064
|
+
), d.width = i ? P.getMax(o.width, e[t.from].width) : P.getMax(
|
|
2097
2065
|
e[t.from].width,
|
|
2098
2066
|
o.width,
|
|
2099
2067
|
l.width + 2 * o.noteMargin
|
|
2100
|
-
),
|
|
2068
|
+
), d.startx = a + (e[t.from].width - d.width) / 2) : (d.width = Math.abs(a + e[t.from].width / 2 - (s + e[t.to].width / 2)) + o.actorMargin, d.startx = a < s ? a + e[t.from].width / 2 - o.actorMargin / 2 : s + e[t.to].width / 2 - o.actorMargin / 2), i && (d.message = $.wrapLabel(
|
|
2101
2069
|
t.message,
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
)),
|
|
2105
|
-
`NM:[${
|
|
2106
|
-
),
|
|
2107
|
-
},
|
|
2070
|
+
d.width - 2 * o.wrapPadding,
|
|
2071
|
+
bt(o)
|
|
2072
|
+
)), j.debug(
|
|
2073
|
+
`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`
|
|
2074
|
+
), d;
|
|
2075
|
+
}, M0 = function(t, e, c) {
|
|
2108
2076
|
if (![
|
|
2109
2077
|
c.db.LINETYPE.SOLID_OPEN,
|
|
2110
2078
|
c.db.LINETYPE.DOTTED_OPEN,
|
|
@@ -2116,25 +2084,25 @@ const D0 = async function(t, e, c) {
|
|
|
2116
2084
|
c.db.LINETYPE.DOTTED_POINT
|
|
2117
2085
|
].includes(t.type))
|
|
2118
2086
|
return {};
|
|
2119
|
-
const [a, s] =
|
|
2120
|
-
let r =
|
|
2121
|
-
const
|
|
2122
|
-
t.from === t.to ? r =
|
|
2123
|
-
const g = [a, s, i, l],
|
|
2087
|
+
const [a, s] = Xt(t.from, e), [i, l] = Xt(t.to, e), d = a <= i, p = d ? s : a;
|
|
2088
|
+
let r = d ? i : l;
|
|
2089
|
+
const x = Math.abs(i - l) > 2, E = (_) => d ? -_ : _;
|
|
2090
|
+
t.from === t.to ? r = p : (t.activate && !x && (r += E(o.activationWidth / 2 - 1)), [c.db.LINETYPE.SOLID_OPEN, c.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (r += E(3)));
|
|
2091
|
+
const g = [a, s, i, l], m = Math.abs(p - r);
|
|
2124
2092
|
t.wrap && t.message && (t.message = $.wrapLabel(
|
|
2125
2093
|
t.message,
|
|
2126
|
-
|
|
2127
|
-
|
|
2094
|
+
P.getMax(m + 2 * o.wrapPadding, o.width),
|
|
2095
|
+
xt(o)
|
|
2128
2096
|
));
|
|
2129
|
-
const w = $.calculateTextDimensions(t.message,
|
|
2097
|
+
const w = $.calculateTextDimensions(t.message, xt(o));
|
|
2130
2098
|
return {
|
|
2131
|
-
width:
|
|
2099
|
+
width: P.getMax(
|
|
2132
2100
|
t.wrap ? 0 : w.width + 2 * o.wrapPadding,
|
|
2133
|
-
|
|
2101
|
+
m + 2 * o.wrapPadding,
|
|
2134
2102
|
o.width
|
|
2135
2103
|
),
|
|
2136
2104
|
height: 0,
|
|
2137
|
-
startx:
|
|
2105
|
+
startx: p,
|
|
2138
2106
|
stopx: r,
|
|
2139
2107
|
starty: 0,
|
|
2140
2108
|
stopy: 0,
|
|
@@ -2144,10 +2112,10 @@ const D0 = async function(t, e, c) {
|
|
|
2144
2112
|
fromBounds: Math.min.apply(null, g),
|
|
2145
2113
|
toBounds: Math.max.apply(null, g)
|
|
2146
2114
|
};
|
|
2147
|
-
},
|
|
2115
|
+
}, A0 = function(t, e, c, a) {
|
|
2148
2116
|
const s = {}, i = [];
|
|
2149
|
-
let l,
|
|
2150
|
-
|
|
2117
|
+
let l, d, p;
|
|
2118
|
+
return t.forEach(function(r) {
|
|
2151
2119
|
switch (r.id = $.random({ length: 10 }), r.type) {
|
|
2152
2120
|
case a.db.LINETYPE.LOOP_START:
|
|
2153
2121
|
case a.db.LINETYPE.ALT_START:
|
|
@@ -2179,56 +2147,55 @@ const D0 = async function(t, e, c) {
|
|
|
2179
2147
|
break;
|
|
2180
2148
|
case a.db.LINETYPE.ACTIVE_START:
|
|
2181
2149
|
{
|
|
2182
|
-
const
|
|
2150
|
+
const x = e[r.from ? r.from.actor : r.to.actor], E = Lt(r.from ? r.from.actor : r.to.actor).length, g = x.x + x.width / 2 + (E - 1) * o.activationWidth / 2, m = {
|
|
2183
2151
|
startx: g,
|
|
2184
2152
|
stopx: g + o.activationWidth,
|
|
2185
2153
|
actor: r.from.actor,
|
|
2186
2154
|
enabled: !0
|
|
2187
2155
|
};
|
|
2188
|
-
|
|
2156
|
+
u.activations.push(m);
|
|
2189
2157
|
}
|
|
2190
2158
|
break;
|
|
2191
2159
|
case a.db.LINETYPE.ACTIVE_END:
|
|
2192
2160
|
{
|
|
2193
|
-
const
|
|
2194
|
-
delete
|
|
2161
|
+
const x = u.activations.map((E) => E.actor).lastIndexOf(r.from.actor);
|
|
2162
|
+
delete u.activations.splice(x, 1)[0];
|
|
2195
2163
|
}
|
|
2196
2164
|
break;
|
|
2197
2165
|
}
|
|
2198
|
-
r.placement !== void 0 ? (
|
|
2199
|
-
l =
|
|
2200
|
-
})) : (
|
|
2201
|
-
if (l =
|
|
2202
|
-
const
|
|
2203
|
-
l.from =
|
|
2204
|
-
|
|
2205
|
-
|
|
2166
|
+
r.placement !== void 0 ? (d = N0(r, e, a), r.noteModel = d, i.forEach((x) => {
|
|
2167
|
+
l = x, l.from = P.getMin(l.from, d.startx), l.to = P.getMax(l.to, d.startx + d.width), l.width = P.getMax(l.width, Math.abs(l.from - l.to)) - o.labelBoxWidth;
|
|
2168
|
+
})) : (p = M0(r, e, a), r.msgModel = p, p.startx && p.stopx && i.length > 0 && i.forEach((x) => {
|
|
2169
|
+
if (l = x, p.startx === p.stopx) {
|
|
2170
|
+
const E = e[r.from], g = e[r.to];
|
|
2171
|
+
l.from = P.getMin(
|
|
2172
|
+
E.x - p.width / 2,
|
|
2173
|
+
E.x - E.width / 2,
|
|
2206
2174
|
l.from
|
|
2207
|
-
), l.to =
|
|
2208
|
-
g.x +
|
|
2209
|
-
g.x +
|
|
2175
|
+
), l.to = P.getMax(
|
|
2176
|
+
g.x + p.width / 2,
|
|
2177
|
+
g.x + E.width / 2,
|
|
2210
2178
|
l.to
|
|
2211
|
-
), l.width =
|
|
2179
|
+
), l.width = P.getMax(l.width, Math.abs(l.to - l.from)) - o.labelBoxWidth;
|
|
2212
2180
|
} else
|
|
2213
|
-
l.from =
|
|
2181
|
+
l.from = P.getMin(p.startx, l.from), l.to = P.getMax(p.stopx, l.to), l.width = P.getMax(l.width, p.width) - o.labelBoxWidth;
|
|
2214
2182
|
}));
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
styles: o0,
|
|
2183
|
+
}), u.activations = [], j.debug("Loop type widths:", s), s;
|
|
2184
|
+
}, S0 = {
|
|
2185
|
+
bounds: u,
|
|
2186
|
+
drawActors: $t,
|
|
2187
|
+
drawActorsPopup: le,
|
|
2188
|
+
setConf: de,
|
|
2189
|
+
draw: k0
|
|
2190
|
+
}, R0 = {
|
|
2191
|
+
parser: Ne,
|
|
2192
|
+
db: jt,
|
|
2193
|
+
renderer: S0,
|
|
2194
|
+
styles: e0,
|
|
2228
2195
|
init: ({ wrap: t }) => {
|
|
2229
|
-
|
|
2196
|
+
jt.setWrap(t);
|
|
2230
2197
|
}
|
|
2231
2198
|
};
|
|
2232
2199
|
export {
|
|
2233
|
-
|
|
2200
|
+
R0 as diagram
|
|
2234
2201
|
};
|