lowcoder-comps 0.0.21 → 0.0.23
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/060799f2.js +960 -0
- package/1012bc4d.js +804 -0
- package/{b38c288b.js → 13094807.js} +10 -12
- package/{54511d22.js → 17eec513.js} +73 -76
- package/3581323b.js +1055 -0
- package/{f576ac90.js → 39041099.js} +97 -109
- package/43aa9013.js +218 -0
- package/4835e2da.js +2501 -0
- package/4ac12b61.js +915 -0
- package/52f00270.js +932 -0
- package/53ac8761.js +1235 -0
- package/53c41f32.js +1116 -0
- package/6b0ac243.js +64 -0
- package/6b615aa6.js +365 -0
- package/{9f3281b9.js → 6ddb6f97.js} +48410 -35551
- package/6fa8963b.js +2396 -0
- package/{ba44e76c.js → 7958ae6b.js} +4257 -4221
- package/{7c62ef63.js → 7b5e16e2.js} +1 -1
- package/83aee898.js +825 -0
- package/{31b1cdd2.js → 877dfc2d.js} +29 -30
- package/92e85b65.js +65 -0
- package/9f3e59b9.js +796 -0
- package/{a6e7fb9e.js → 9fadb810.js} +64 -71
- package/a8fa2c8f.js +1284 -0
- package/{8219433d.js → af05a28a.js} +7038 -6859
- package/{450c6bd6.js → ba9c56f6.js} +44 -44
- package/{2768fdea.js → bd004c35.js} +89 -97
- package/{fb09e069.js → bfe4f54a.js} +598 -622
- package/d0baa7b9.js +86 -0
- package/dcf6bbc3.js +768 -0
- package/e21892cc.js +2966 -0
- package/e52f46f3.js +2192 -0
- package/{3bd738e9.js → eaef549d.js} +58 -64
- package/fc7a026c.js +502 -0
- package/fcffa471.js +1000 -0
- package/index.js +2 -2
- package/package.json +7 -8
- package/04ea1009.js +0 -985
- package/0a1968f4.js +0 -832
- package/3087113d.js +0 -1032
- package/39f71758.js +0 -849
- package/4d1cf087.js +0 -2679
- package/59cbb8ee.js +0 -2456
- package/62c916e0.js +0 -86
- package/74645131.js +0 -1246
- package/75095038.js +0 -159
- package/86a4a706.js +0 -1118
- package/88c87bf8.js +0 -943
- package/8d8e98a7.js +0 -365
- package/9200edf7.js +0 -70
- package/acdad8f2.js +0 -7
- package/cbee3d44.js +0 -607
- package/cc0f1351.js +0 -793
- package/e614be0d.js +0 -91
- package/f40ee59a.js +0 -940
- package/fc5c5300.js +0 -2103
- package/fe636892.js +0 -823
- package/fea654db.js +0 -2827
package/fc5c5300.js
DELETED
|
@@ -1,2103 +0,0 @@
|
|
|
1
|
-
import { g as me, A as ve, z as we, c as lt, s as te, b as _e, a as ke, m as Pe, B as Le, l as K, d as Lt, j as w, e as Ie, h as Pt, i as Ne, x as C, n as ee, S as ie, $ as Ae, a0 as Se } from "./9f3281b9.js";
|
|
2
|
-
import { d as Me, a as Re, g as It, b as De, c as Ve, e as zt } from "./9200edf7.js";
|
|
3
|
-
import { s as Ce } from "./acdad8f2.js";
|
|
4
|
-
var Bt = function() {
|
|
5
|
-
var t = function(ot, b, _, P) {
|
|
6
|
-
for (_ = _ || {}, P = ot.length; P--; _[ot[P]] = b)
|
|
7
|
-
;
|
|
8
|
-
return _;
|
|
9
|
-
}, e = [1, 2], r = [1, 3], i = [1, 5], s = [1, 7], n = [2, 5], c = [1, 15], l = [1, 17], p = [1, 19], d = [1, 21], T = [1, 22], y = [1, 23], u = [1, 29], x = [1, 30], m = [1, 31], L = [1, 32], A = [1, 33], M = [1, 34], I = [1, 35], Y = [1, 36], V = [1, 37], H = [1, 38], G = [1, 39], W = [1, 40], O = [1, 41], X = [1, 43], F = [1, 44], q = [1, 46], U = [1, 47], J = [1, 48], Z = [1, 49], v = [1, 50], E = [1, 51], j = [1, 54], k = [1, 4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 52, 53, 54, 55, 57, 58, 63, 64, 65, 66, 74, 84], N = [4, 5, 21, 55, 57], vt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 55, 57, 58, 63, 64, 65, 66, 74, 84], Gt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 54, 55, 57, 58, 63, 64, 65, 66, 74, 84], St = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 53, 55, 57, 58, 63, 64, 65, 66, 74, 84], Xt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 52, 55, 57, 58, 63, 64, 65, 66, 74, 84], rt = [72, 73, 74], it = [1, 128], Jt = [1, 4, 5, 7, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 52, 53, 54, 55, 57, 58, 63, 64, 65, 66, 74, 84], Mt = {
|
|
10
|
-
trace: function() {
|
|
11
|
-
},
|
|
12
|
-
yy: {},
|
|
13
|
-
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, box_section: 11, box_line: 12, participant_statement: 13, openDirective: 14, typeDirective: 15, closeDirective: 16, ":": 17, argDirective: 18, box: 19, restOfLine: 20, end: 21, signal: 22, autonumber: 23, NUM: 24, off: 25, activate: 26, actor: 27, deactivate: 28, note_statement: 29, links_statement: 30, link_statement: 31, properties_statement: 32, details_statement: 33, title: 34, legacy_title: 35, acc_title: 36, acc_title_value: 37, acc_descr: 38, acc_descr_value: 39, acc_descr_multiline_value: 40, loop: 41, rect: 42, opt: 43, alt: 44, else_sections: 45, par: 46, par_sections: 47, par_over: 48, critical: 49, option_sections: 50, break: 51, option: 52, and: 53, else: 54, participant: 55, AS: 56, participant_actor: 57, note: 58, placement: 59, text2: 60, over: 61, actor_pair: 62, links: 63, link: 64, properties: 65, details: 66, spaceList: 67, ",": 68, left_of: 69, right_of: 70, signaltype: 71, "+": 72, "-": 73, ACTOR: 74, SOLID_OPEN_ARROW: 75, DOTTED_OPEN_ARROW: 76, SOLID_ARROW: 77, DOTTED_ARROW: 78, SOLID_CROSS: 79, DOTTED_CROSS: 80, SOLID_POINT: 81, DOTTED_POINT: 82, TXT: 83, open_directive: 84, type_directive: 85, arg_directive: 86, close_directive: 87, $accept: 0, $end: 1 },
|
|
14
|
-
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 17: ":", 19: "box", 20: "restOfLine", 21: "end", 23: "autonumber", 24: "NUM", 25: "off", 26: "activate", 28: "deactivate", 34: "title", 35: "legacy_title", 36: "acc_title", 37: "acc_title_value", 38: "acc_descr", 39: "acc_descr_value", 40: "acc_descr_multiline_value", 41: "loop", 42: "rect", 43: "opt", 44: "alt", 46: "par", 48: "par_over", 49: "critical", 51: "break", 52: "option", 53: "and", 54: "else", 55: "participant", 56: "AS", 57: "participant_actor", 58: "note", 61: "over", 63: "links", 64: "link", 65: "properties", 66: "details", 68: ",", 69: "left_of", 70: "right_of", 72: "+", 73: "-", 74: "ACTOR", 75: "SOLID_OPEN_ARROW", 76: "DOTTED_OPEN_ARROW", 77: "SOLID_ARROW", 78: "DOTTED_ARROW", 79: "SOLID_CROSS", 80: "DOTTED_CROSS", 81: "SOLID_POINT", 82: "DOTTED_POINT", 83: "TXT", 84: "open_directive", 85: "type_directive", 86: "arg_directive", 87: "close_directive" },
|
|
15
|
-
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [11, 0], [11, 2], [12, 2], [12, 1], [12, 1], [6, 4], [6, 6], [10, 1], [10, 4], [10, 2], [10, 4], [10, 3], [10, 3], [10, 2], [10, 3], [10, 3], [10, 2], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [50, 1], [50, 4], [47, 1], [47, 4], [45, 1], [45, 4], [13, 5], [13, 3], [13, 5], [13, 3], [29, 4], [29, 4], [30, 3], [31, 3], [32, 3], [33, 3], [67, 2], [67, 1], [62, 3], [62, 1], [59, 1], [59, 1], [22, 5], [22, 5], [22, 4], [27, 1], [71, 1], [71, 1], [71, 1], [71, 1], [71, 1], [71, 1], [71, 1], [71, 1], [60, 1], [14, 1], [15, 1], [18, 1], [16, 1]],
|
|
16
|
-
performAction: function(b, _, P, g, S, o, yt) {
|
|
17
|
-
var h = o.length - 1;
|
|
18
|
-
switch (S) {
|
|
19
|
-
case 4:
|
|
20
|
-
return g.apply(o[h]), o[h];
|
|
21
|
-
case 5:
|
|
22
|
-
case 10:
|
|
23
|
-
this.$ = [];
|
|
24
|
-
break;
|
|
25
|
-
case 6:
|
|
26
|
-
case 11:
|
|
27
|
-
o[h - 1].push(o[h]), this.$ = o[h - 1];
|
|
28
|
-
break;
|
|
29
|
-
case 7:
|
|
30
|
-
case 8:
|
|
31
|
-
case 12:
|
|
32
|
-
case 13:
|
|
33
|
-
this.$ = o[h];
|
|
34
|
-
break;
|
|
35
|
-
case 9:
|
|
36
|
-
case 14:
|
|
37
|
-
this.$ = [];
|
|
38
|
-
break;
|
|
39
|
-
case 18:
|
|
40
|
-
o[h - 1].unshift({ type: "boxStart", boxData: g.parseBoxData(o[h - 2]) }), o[h - 1].push({ type: "boxEnd", boxText: o[h - 2] }), this.$ = o[h - 1];
|
|
41
|
-
break;
|
|
42
|
-
case 20:
|
|
43
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(o[h - 2]), sequenceIndexStep: Number(o[h - 1]), sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
|
|
44
|
-
break;
|
|
45
|
-
case 21:
|
|
46
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(o[h - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
|
|
47
|
-
break;
|
|
48
|
-
case 22:
|
|
49
|
-
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: g.LINETYPE.AUTONUMBER };
|
|
50
|
-
break;
|
|
51
|
-
case 23:
|
|
52
|
-
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
|
|
53
|
-
break;
|
|
54
|
-
case 24:
|
|
55
|
-
this.$ = { type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: o[h - 1] };
|
|
56
|
-
break;
|
|
57
|
-
case 25:
|
|
58
|
-
this.$ = { type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: o[h - 1] };
|
|
59
|
-
break;
|
|
60
|
-
case 31:
|
|
61
|
-
g.setDiagramTitle(o[h].substring(6)), this.$ = o[h].substring(6);
|
|
62
|
-
break;
|
|
63
|
-
case 32:
|
|
64
|
-
g.setDiagramTitle(o[h].substring(7)), this.$ = o[h].substring(7);
|
|
65
|
-
break;
|
|
66
|
-
case 33:
|
|
67
|
-
this.$ = o[h].trim(), g.setAccTitle(this.$);
|
|
68
|
-
break;
|
|
69
|
-
case 34:
|
|
70
|
-
case 35:
|
|
71
|
-
this.$ = o[h].trim(), g.setAccDescription(this.$);
|
|
72
|
-
break;
|
|
73
|
-
case 36:
|
|
74
|
-
o[h - 1].unshift({ type: "loopStart", loopText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.LOOP_START }), o[h - 1].push({ type: "loopEnd", loopText: o[h - 2], signalType: g.LINETYPE.LOOP_END }), this.$ = o[h - 1];
|
|
75
|
-
break;
|
|
76
|
-
case 37:
|
|
77
|
-
o[h - 1].unshift({ type: "rectStart", color: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.RECT_START }), o[h - 1].push({ type: "rectEnd", color: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.RECT_END }), this.$ = o[h - 1];
|
|
78
|
-
break;
|
|
79
|
-
case 38:
|
|
80
|
-
o[h - 1].unshift({ type: "optStart", optText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.OPT_START }), o[h - 1].push({ type: "optEnd", optText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.OPT_END }), this.$ = o[h - 1];
|
|
81
|
-
break;
|
|
82
|
-
case 39:
|
|
83
|
-
o[h - 1].unshift({ type: "altStart", altText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.ALT_START }), o[h - 1].push({ type: "altEnd", signalType: g.LINETYPE.ALT_END }), this.$ = o[h - 1];
|
|
84
|
-
break;
|
|
85
|
-
case 40:
|
|
86
|
-
o[h - 1].unshift({ type: "parStart", parText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.PAR_START }), o[h - 1].push({ type: "parEnd", signalType: g.LINETYPE.PAR_END }), this.$ = o[h - 1];
|
|
87
|
-
break;
|
|
88
|
-
case 41:
|
|
89
|
-
o[h - 1].unshift({ type: "parStart", parText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.PAR_OVER_START }), o[h - 1].push({ type: "parEnd", signalType: g.LINETYPE.PAR_END }), this.$ = o[h - 1];
|
|
90
|
-
break;
|
|
91
|
-
case 42:
|
|
92
|
-
o[h - 1].unshift({ type: "criticalStart", criticalText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.CRITICAL_START }), o[h - 1].push({ type: "criticalEnd", signalType: g.LINETYPE.CRITICAL_END }), this.$ = o[h - 1];
|
|
93
|
-
break;
|
|
94
|
-
case 43:
|
|
95
|
-
o[h - 1].unshift({ type: "breakStart", breakText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.BREAK_START }), o[h - 1].push({ type: "breakEnd", optText: g.parseMessage(o[h - 2]), signalType: g.LINETYPE.BREAK_END }), this.$ = o[h - 1];
|
|
96
|
-
break;
|
|
97
|
-
case 46:
|
|
98
|
-
this.$ = o[h - 3].concat([{ type: "option", optionText: g.parseMessage(o[h - 1]), signalType: g.LINETYPE.CRITICAL_OPTION }, o[h]]);
|
|
99
|
-
break;
|
|
100
|
-
case 48:
|
|
101
|
-
this.$ = o[h - 3].concat([{ type: "and", parText: g.parseMessage(o[h - 1]), signalType: g.LINETYPE.PAR_AND }, o[h]]);
|
|
102
|
-
break;
|
|
103
|
-
case 50:
|
|
104
|
-
this.$ = o[h - 3].concat([{ type: "else", altText: g.parseMessage(o[h - 1]), signalType: g.LINETYPE.ALT_ELSE }, o[h]]);
|
|
105
|
-
break;
|
|
106
|
-
case 51:
|
|
107
|
-
o[h - 3].type = "addParticipant", o[h - 3].description = g.parseMessage(o[h - 1]), this.$ = o[h - 3];
|
|
108
|
-
break;
|
|
109
|
-
case 52:
|
|
110
|
-
o[h - 1].type = "addParticipant", this.$ = o[h - 1];
|
|
111
|
-
break;
|
|
112
|
-
case 53:
|
|
113
|
-
o[h - 3].type = "addActor", o[h - 3].description = g.parseMessage(o[h - 1]), this.$ = o[h - 3];
|
|
114
|
-
break;
|
|
115
|
-
case 54:
|
|
116
|
-
o[h - 1].type = "addActor", this.$ = o[h - 1];
|
|
117
|
-
break;
|
|
118
|
-
case 55:
|
|
119
|
-
this.$ = [o[h - 1], { type: "addNote", placement: o[h - 2], actor: o[h - 1].actor, text: o[h] }];
|
|
120
|
-
break;
|
|
121
|
-
case 56:
|
|
122
|
-
o[h - 2] = [].concat(o[h - 1], o[h - 1]).slice(0, 2), o[h - 2][0] = o[h - 2][0].actor, o[h - 2][1] = o[h - 2][1].actor, this.$ = [o[h - 1], { type: "addNote", placement: g.PLACEMENT.OVER, actor: o[h - 2].slice(0, 2), text: o[h] }];
|
|
123
|
-
break;
|
|
124
|
-
case 57:
|
|
125
|
-
this.$ = [o[h - 1], { type: "addLinks", actor: o[h - 1].actor, text: o[h] }];
|
|
126
|
-
break;
|
|
127
|
-
case 58:
|
|
128
|
-
this.$ = [o[h - 1], { type: "addALink", actor: o[h - 1].actor, text: o[h] }];
|
|
129
|
-
break;
|
|
130
|
-
case 59:
|
|
131
|
-
this.$ = [o[h - 1], { type: "addProperties", actor: o[h - 1].actor, text: o[h] }];
|
|
132
|
-
break;
|
|
133
|
-
case 60:
|
|
134
|
-
this.$ = [o[h - 1], { type: "addDetails", actor: o[h - 1].actor, text: o[h] }];
|
|
135
|
-
break;
|
|
136
|
-
case 63:
|
|
137
|
-
this.$ = [o[h - 2], o[h]];
|
|
138
|
-
break;
|
|
139
|
-
case 64:
|
|
140
|
-
this.$ = o[h];
|
|
141
|
-
break;
|
|
142
|
-
case 65:
|
|
143
|
-
this.$ = g.PLACEMENT.LEFTOF;
|
|
144
|
-
break;
|
|
145
|
-
case 66:
|
|
146
|
-
this.$ = g.PLACEMENT.RIGHTOF;
|
|
147
|
-
break;
|
|
148
|
-
case 67:
|
|
149
|
-
this.$ = [
|
|
150
|
-
o[h - 4],
|
|
151
|
-
o[h - 1],
|
|
152
|
-
{ type: "addMessage", from: o[h - 4].actor, to: o[h - 1].actor, signalType: o[h - 3], msg: o[h] },
|
|
153
|
-
{ type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: o[h - 1] }
|
|
154
|
-
];
|
|
155
|
-
break;
|
|
156
|
-
case 68:
|
|
157
|
-
this.$ = [
|
|
158
|
-
o[h - 4],
|
|
159
|
-
o[h - 1],
|
|
160
|
-
{ type: "addMessage", from: o[h - 4].actor, to: o[h - 1].actor, signalType: o[h - 3], msg: o[h] },
|
|
161
|
-
{ type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: o[h - 4] }
|
|
162
|
-
];
|
|
163
|
-
break;
|
|
164
|
-
case 69:
|
|
165
|
-
this.$ = [o[h - 3], o[h - 1], { type: "addMessage", from: o[h - 3].actor, to: o[h - 1].actor, signalType: o[h - 2], msg: o[h] }];
|
|
166
|
-
break;
|
|
167
|
-
case 70:
|
|
168
|
-
this.$ = { type: "addParticipant", actor: o[h] };
|
|
169
|
-
break;
|
|
170
|
-
case 71:
|
|
171
|
-
this.$ = g.LINETYPE.SOLID_OPEN;
|
|
172
|
-
break;
|
|
173
|
-
case 72:
|
|
174
|
-
this.$ = g.LINETYPE.DOTTED_OPEN;
|
|
175
|
-
break;
|
|
176
|
-
case 73:
|
|
177
|
-
this.$ = g.LINETYPE.SOLID;
|
|
178
|
-
break;
|
|
179
|
-
case 74:
|
|
180
|
-
this.$ = g.LINETYPE.DOTTED;
|
|
181
|
-
break;
|
|
182
|
-
case 75:
|
|
183
|
-
this.$ = g.LINETYPE.SOLID_CROSS;
|
|
184
|
-
break;
|
|
185
|
-
case 76:
|
|
186
|
-
this.$ = g.LINETYPE.DOTTED_CROSS;
|
|
187
|
-
break;
|
|
188
|
-
case 77:
|
|
189
|
-
this.$ = g.LINETYPE.SOLID_POINT;
|
|
190
|
-
break;
|
|
191
|
-
case 78:
|
|
192
|
-
this.$ = g.LINETYPE.DOTTED_POINT;
|
|
193
|
-
break;
|
|
194
|
-
case 79:
|
|
195
|
-
this.$ = g.parseMessage(o[h].trim().substring(1));
|
|
196
|
-
break;
|
|
197
|
-
case 80:
|
|
198
|
-
g.parseDirective("%%{", "open_directive");
|
|
199
|
-
break;
|
|
200
|
-
case 81:
|
|
201
|
-
g.parseDirective(o[h], "type_directive");
|
|
202
|
-
break;
|
|
203
|
-
case 82:
|
|
204
|
-
o[h] = o[h].trim().replace(/'/g, '"'), g.parseDirective(o[h], "arg_directive");
|
|
205
|
-
break;
|
|
206
|
-
case 83:
|
|
207
|
-
g.parseDirective("}%%", "close_directive", "sequence");
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: i, 14: 6, 84: s }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: i, 14: 6, 84: s }, { 3: 9, 4: e, 5: r, 6: 4, 7: i, 14: 6, 84: s }, { 3: 10, 4: e, 5: r, 6: 4, 7: i, 14: 6, 84: s }, t([1, 4, 5, 19, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 49, 51, 55, 57, 58, 63, 64, 65, 66, 74, 84], n, { 8: 11 }), { 15: 12, 85: [1, 13] }, { 85: [2, 80] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 16: 52, 17: [1, 53], 87: j }, t([17, 87], [2, 81]), t(k, [2, 6]), { 6: 42, 10: 55, 13: 18, 14: 6, 19: p, 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, t(k, [2, 8]), t(k, [2, 9]), t(k, [2, 17]), { 20: [1, 56] }, { 5: [1, 57] }, { 5: [1, 60], 24: [1, 58], 25: [1, 59] }, { 27: 61, 74: E }, { 27: 62, 74: E }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, { 5: [1, 66] }, { 5: [1, 67] }, t(k, [2, 31]), t(k, [2, 32]), { 37: [1, 68] }, { 39: [1, 69] }, t(k, [2, 35]), { 20: [1, 70] }, { 20: [1, 71] }, { 20: [1, 72] }, { 20: [1, 73] }, { 20: [1, 74] }, { 20: [1, 75] }, { 20: [1, 76] }, { 20: [1, 77] }, t(k, [2, 44]), { 27: 78, 74: E }, { 27: 79, 74: E }, { 71: 80, 75: [1, 81], 76: [1, 82], 77: [1, 83], 78: [1, 84], 79: [1, 85], 80: [1, 86], 81: [1, 87], 82: [1, 88] }, { 59: 89, 61: [1, 90], 69: [1, 91], 70: [1, 92] }, { 27: 93, 74: E }, { 27: 94, 74: E }, { 27: 95, 74: E }, { 27: 96, 74: E }, t([5, 56, 68, 75, 76, 77, 78, 79, 80, 81, 82, 83], [2, 70]), { 5: [1, 97] }, { 18: 98, 86: [1, 99] }, { 5: [2, 83] }, t(k, [2, 7]), t(N, [2, 10], { 11: 100 }), t(k, [2, 19]), { 5: [1, 102], 24: [1, 101] }, { 5: [1, 103] }, t(k, [2, 23]), { 5: [1, 104] }, { 5: [1, 105] }, t(k, [2, 26]), t(k, [2, 27]), t(k, [2, 28]), t(k, [2, 29]), t(k, [2, 30]), t(k, [2, 33]), t(k, [2, 34]), t(vt, n, { 8: 106 }), t(vt, n, { 8: 107 }), t(vt, n, { 8: 108 }), t(Gt, n, { 45: 109, 8: 110 }), t(St, n, { 47: 111, 8: 112 }), t(St, n, { 8: 112, 47: 113 }), t(Xt, n, { 50: 114, 8: 115 }), t(vt, n, { 8: 116 }), { 5: [1, 118], 56: [1, 117] }, { 5: [1, 120], 56: [1, 119] }, { 27: 123, 72: [1, 121], 73: [1, 122], 74: E }, t(rt, [2, 71]), t(rt, [2, 72]), t(rt, [2, 73]), t(rt, [2, 74]), t(rt, [2, 75]), t(rt, [2, 76]), t(rt, [2, 77]), t(rt, [2, 78]), { 27: 124, 74: E }, { 27: 126, 62: 125, 74: E }, { 74: [2, 65] }, { 74: [2, 66] }, { 60: 127, 83: it }, { 60: 129, 83: it }, { 60: 130, 83: it }, { 60: 131, 83: it }, t(Jt, [2, 15]), { 16: 132, 87: j }, { 87: [2, 82] }, { 4: [1, 135], 5: [1, 137], 12: 134, 13: 136, 21: [1, 133], 55: X, 57: F }, { 5: [1, 138] }, t(k, [2, 21]), t(k, [2, 22]), t(k, [2, 24]), t(k, [2, 25]), { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 139], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 140], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 141], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 21: [1, 142] }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [2, 49], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 54: [1, 143], 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 21: [1, 144] }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [2, 47], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 53: [1, 145], 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 21: [1, 146] }, { 21: [1, 147] }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [2, 45], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 52: [1, 148], 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 149], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: m, 38: L, 40: A, 41: M, 42: I, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Z, 66: v, 74: E, 84: s }, { 20: [1, 150] }, t(k, [2, 52]), { 20: [1, 151] }, t(k, [2, 54]), { 27: 152, 74: E }, { 27: 153, 74: E }, { 60: 154, 83: it }, { 60: 155, 83: it }, { 60: 156, 83: it }, { 68: [1, 157], 83: [2, 64] }, { 5: [2, 57] }, { 5: [2, 79] }, { 5: [2, 58] }, { 5: [2, 59] }, { 5: [2, 60] }, { 5: [1, 158] }, t(k, [2, 18]), t(N, [2, 11]), { 13: 159, 55: X, 57: F }, t(N, [2, 13]), t(N, [2, 14]), t(k, [2, 20]), t(k, [2, 36]), t(k, [2, 37]), t(k, [2, 38]), t(k, [2, 39]), { 20: [1, 160] }, t(k, [2, 40]), { 20: [1, 161] }, t(k, [2, 41]), t(k, [2, 42]), { 20: [1, 162] }, t(k, [2, 43]), { 5: [1, 163] }, { 5: [1, 164] }, { 60: 165, 83: it }, { 60: 166, 83: it }, { 5: [2, 69] }, { 5: [2, 55] }, { 5: [2, 56] }, { 27: 167, 74: E }, t(Jt, [2, 16]), t(N, [2, 12]), t(Gt, n, { 8: 110, 45: 168 }), t(St, n, { 8: 112, 47: 169 }), t(Xt, n, { 8: 115, 50: 170 }), t(k, [2, 51]), t(k, [2, 53]), { 5: [2, 67] }, { 5: [2, 68] }, { 83: [2, 63] }, { 21: [2, 50] }, { 21: [2, 48] }, { 21: [2, 46] }],
|
|
212
|
-
defaultActions: { 7: [2, 80], 8: [2, 1], 9: [2, 2], 10: [2, 3], 54: [2, 83], 91: [2, 65], 92: [2, 66], 99: [2, 82], 127: [2, 57], 128: [2, 79], 129: [2, 58], 130: [2, 59], 131: [2, 60], 154: [2, 69], 155: [2, 55], 156: [2, 56], 165: [2, 67], 166: [2, 68], 167: [2, 63], 168: [2, 50], 169: [2, 48], 170: [2, 46] },
|
|
213
|
-
parseError: function(b, _) {
|
|
214
|
-
if (_.recoverable)
|
|
215
|
-
this.trace(b);
|
|
216
|
-
else {
|
|
217
|
-
var P = new Error(b);
|
|
218
|
-
throw P.hash = _, P;
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
parse: function(b) {
|
|
222
|
-
var _ = this, P = [0], g = [], S = [null], o = [], yt = this.table, h = "", wt = 0, Zt = 0, Te = 2, Qt = 1, ye = o.slice.call(arguments, 1), B = Object.create(this.lexer), ht = { yy: {} };
|
|
223
|
-
for (var Dt in this.yy)
|
|
224
|
-
Object.prototype.hasOwnProperty.call(this.yy, Dt) && (ht.yy[Dt] = this.yy[Dt]);
|
|
225
|
-
B.setInput(b, ht.yy), ht.yy.lexer = B, ht.yy.parser = this, typeof B.yylloc == "undefined" && (B.yylloc = {});
|
|
226
|
-
var Vt = B.yylloc;
|
|
227
|
-
o.push(Vt);
|
|
228
|
-
var Ee = B.options && B.options.ranges;
|
|
229
|
-
typeof ht.yy.parseError == "function" ? this.parseError = ht.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
230
|
-
function be() {
|
|
231
|
-
var nt;
|
|
232
|
-
return nt = g.pop() || B.lex() || Qt, typeof nt != "number" && (nt instanceof Array && (g = nt, nt = g.pop()), nt = _.symbols_[nt] || nt), nt;
|
|
233
|
-
}
|
|
234
|
-
for (var z, dt, Q, Ct, ft = {}, _t, st, jt, kt; ; ) {
|
|
235
|
-
if (dt = P[P.length - 1], this.defaultActions[dt] ? Q = this.defaultActions[dt] : ((z === null || typeof z == "undefined") && (z = be()), Q = yt[dt] && yt[dt][z]), typeof Q == "undefined" || !Q.length || !Q[0]) {
|
|
236
|
-
var Ot = "";
|
|
237
|
-
kt = [];
|
|
238
|
-
for (_t in yt[dt])
|
|
239
|
-
this.terminals_[_t] && _t > Te && kt.push("'" + this.terminals_[_t] + "'");
|
|
240
|
-
B.showPosition ? Ot = "Parse error on line " + (wt + 1) + `:
|
|
241
|
-
` + B.showPosition() + `
|
|
242
|
-
Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : Ot = "Parse error on line " + (wt + 1) + ": Unexpected " + (z == Qt ? "end of input" : "'" + (this.terminals_[z] || z) + "'"), this.parseError(Ot, {
|
|
243
|
-
text: B.match,
|
|
244
|
-
token: this.terminals_[z] || z,
|
|
245
|
-
line: B.yylineno,
|
|
246
|
-
loc: Vt,
|
|
247
|
-
expected: kt
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
if (Q[0] instanceof Array && Q.length > 1)
|
|
251
|
-
throw new Error("Parse Error: multiple actions possible at state: " + dt + ", token: " + z);
|
|
252
|
-
switch (Q[0]) {
|
|
253
|
-
case 1:
|
|
254
|
-
P.push(z), S.push(B.yytext), o.push(B.yylloc), P.push(Q[1]), z = null, Zt = B.yyleng, h = B.yytext, wt = B.yylineno, Vt = B.yylloc;
|
|
255
|
-
break;
|
|
256
|
-
case 2:
|
|
257
|
-
if (st = this.productions_[Q[1]][1], ft.$ = S[S.length - st], ft._$ = {
|
|
258
|
-
first_line: o[o.length - (st || 1)].first_line,
|
|
259
|
-
last_line: o[o.length - 1].last_line,
|
|
260
|
-
first_column: o[o.length - (st || 1)].first_column,
|
|
261
|
-
last_column: o[o.length - 1].last_column
|
|
262
|
-
}, Ee && (ft._$.range = [
|
|
263
|
-
o[o.length - (st || 1)].range[0],
|
|
264
|
-
o[o.length - 1].range[1]
|
|
265
|
-
]), Ct = this.performAction.apply(ft, [
|
|
266
|
-
h,
|
|
267
|
-
Zt,
|
|
268
|
-
wt,
|
|
269
|
-
ht.yy,
|
|
270
|
-
Q[1],
|
|
271
|
-
S,
|
|
272
|
-
o
|
|
273
|
-
].concat(ye)), typeof Ct != "undefined")
|
|
274
|
-
return Ct;
|
|
275
|
-
st && (P = P.slice(0, -1 * st * 2), S = S.slice(0, -1 * st), o = o.slice(0, -1 * st)), P.push(this.productions_[Q[1]][0]), S.push(ft.$), o.push(ft._$), jt = yt[P[P.length - 2]][P[P.length - 1]], P.push(jt);
|
|
276
|
-
break;
|
|
277
|
-
case 3:
|
|
278
|
-
return !0;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return !0;
|
|
282
|
-
}
|
|
283
|
-
}, xe = function() {
|
|
284
|
-
var ot = {
|
|
285
|
-
EOF: 1,
|
|
286
|
-
parseError: function(_, P) {
|
|
287
|
-
if (this.yy.parser)
|
|
288
|
-
this.yy.parser.parseError(_, P);
|
|
289
|
-
else
|
|
290
|
-
throw new Error(_);
|
|
291
|
-
},
|
|
292
|
-
// resets the lexer, sets new input
|
|
293
|
-
setInput: function(b, _) {
|
|
294
|
-
return this.yy = _ || this.yy || {}, this._input = b, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
295
|
-
first_line: 1,
|
|
296
|
-
first_column: 0,
|
|
297
|
-
last_line: 1,
|
|
298
|
-
last_column: 0
|
|
299
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
300
|
-
},
|
|
301
|
-
// consumes and returns one char from the input
|
|
302
|
-
input: function() {
|
|
303
|
-
var b = this._input[0];
|
|
304
|
-
this.yytext += b, this.yyleng++, this.offset++, this.match += b, this.matched += b;
|
|
305
|
-
var _ = b.match(/(?:\r\n?|\n).*/g);
|
|
306
|
-
return _ ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), b;
|
|
307
|
-
},
|
|
308
|
-
// unshifts one char (or a string) into the input
|
|
309
|
-
unput: function(b) {
|
|
310
|
-
var _ = b.length, P = b.split(/(?:\r\n?|\n)/g);
|
|
311
|
-
this._input = b + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - _), this.offset -= _;
|
|
312
|
-
var g = this.match.split(/(?:\r\n?|\n)/g);
|
|
313
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), P.length - 1 && (this.yylineno -= P.length - 1);
|
|
314
|
-
var S = this.yylloc.range;
|
|
315
|
-
return this.yylloc = {
|
|
316
|
-
first_line: this.yylloc.first_line,
|
|
317
|
-
last_line: this.yylineno + 1,
|
|
318
|
-
first_column: this.yylloc.first_column,
|
|
319
|
-
last_column: P ? (P.length === g.length ? this.yylloc.first_column : 0) + g[g.length - P.length].length - P[0].length : this.yylloc.first_column - _
|
|
320
|
-
}, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - _]), this.yyleng = this.yytext.length, this;
|
|
321
|
-
},
|
|
322
|
-
// When called from action, caches matched text and appends it on next action
|
|
323
|
-
more: function() {
|
|
324
|
-
return this._more = !0, this;
|
|
325
|
-
},
|
|
326
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
327
|
-
reject: function() {
|
|
328
|
-
if (this.options.backtrack_lexer)
|
|
329
|
-
this._backtrack = !0;
|
|
330
|
-
else
|
|
331
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
332
|
-
` + this.showPosition(), {
|
|
333
|
-
text: "",
|
|
334
|
-
token: null,
|
|
335
|
-
line: this.yylineno
|
|
336
|
-
});
|
|
337
|
-
return this;
|
|
338
|
-
},
|
|
339
|
-
// retain first n characters of the match
|
|
340
|
-
less: function(b) {
|
|
341
|
-
this.unput(this.match.slice(b));
|
|
342
|
-
},
|
|
343
|
-
// displays already matched input, i.e. for error messages
|
|
344
|
-
pastInput: function() {
|
|
345
|
-
var b = this.matched.substr(0, this.matched.length - this.match.length);
|
|
346
|
-
return (b.length > 20 ? "..." : "") + b.substr(-20).replace(/\n/g, "");
|
|
347
|
-
},
|
|
348
|
-
// displays upcoming input, i.e. for error messages
|
|
349
|
-
upcomingInput: function() {
|
|
350
|
-
var b = this.match;
|
|
351
|
-
return b.length < 20 && (b += this._input.substr(0, 20 - b.length)), (b.substr(0, 20) + (b.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
352
|
-
},
|
|
353
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
354
|
-
showPosition: function() {
|
|
355
|
-
var b = this.pastInput(), _ = new Array(b.length + 1).join("-");
|
|
356
|
-
return b + this.upcomingInput() + `
|
|
357
|
-
` + _ + "^";
|
|
358
|
-
},
|
|
359
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
360
|
-
test_match: function(b, _) {
|
|
361
|
-
var P, g, S;
|
|
362
|
-
if (this.options.backtrack_lexer && (S = {
|
|
363
|
-
yylineno: this.yylineno,
|
|
364
|
-
yylloc: {
|
|
365
|
-
first_line: this.yylloc.first_line,
|
|
366
|
-
last_line: this.last_line,
|
|
367
|
-
first_column: this.yylloc.first_column,
|
|
368
|
-
last_column: this.yylloc.last_column
|
|
369
|
-
},
|
|
370
|
-
yytext: this.yytext,
|
|
371
|
-
match: this.match,
|
|
372
|
-
matches: this.matches,
|
|
373
|
-
matched: this.matched,
|
|
374
|
-
yyleng: this.yyleng,
|
|
375
|
-
offset: this.offset,
|
|
376
|
-
_more: this._more,
|
|
377
|
-
_input: this._input,
|
|
378
|
-
yy: this.yy,
|
|
379
|
-
conditionStack: this.conditionStack.slice(0),
|
|
380
|
-
done: this.done
|
|
381
|
-
}, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), g = b[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
|
|
382
|
-
first_line: this.yylloc.last_line,
|
|
383
|
-
last_line: this.yylineno + 1,
|
|
384
|
-
first_column: this.yylloc.last_column,
|
|
385
|
-
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + b[0].length
|
|
386
|
-
}, this.yytext += b[0], this.match += b[0], this.matches = b, 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(b[0].length), this.matched += b[0], P = this.performAction.call(this, this.yy, this, _, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), P)
|
|
387
|
-
return P;
|
|
388
|
-
if (this._backtrack) {
|
|
389
|
-
for (var o in S)
|
|
390
|
-
this[o] = S[o];
|
|
391
|
-
return !1;
|
|
392
|
-
}
|
|
393
|
-
return !1;
|
|
394
|
-
},
|
|
395
|
-
// return next match in input
|
|
396
|
-
next: function() {
|
|
397
|
-
if (this.done)
|
|
398
|
-
return this.EOF;
|
|
399
|
-
this._input || (this.done = !0);
|
|
400
|
-
var b, _, P, g;
|
|
401
|
-
this._more || (this.yytext = "", this.match = "");
|
|
402
|
-
for (var S = this._currentRules(), o = 0; o < S.length; o++)
|
|
403
|
-
if (P = this._input.match(this.rules[S[o]]), P && (!_ || P[0].length > _[0].length)) {
|
|
404
|
-
if (_ = P, g = o, this.options.backtrack_lexer) {
|
|
405
|
-
if (b = this.test_match(P, S[o]), b !== !1)
|
|
406
|
-
return b;
|
|
407
|
-
if (this._backtrack) {
|
|
408
|
-
_ = !1;
|
|
409
|
-
continue;
|
|
410
|
-
} else
|
|
411
|
-
return !1;
|
|
412
|
-
} else if (!this.options.flex)
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
return _ ? (b = this.test_match(_, S[g]), b !== !1 ? b : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
416
|
-
` + this.showPosition(), {
|
|
417
|
-
text: "",
|
|
418
|
-
token: null,
|
|
419
|
-
line: this.yylineno
|
|
420
|
-
});
|
|
421
|
-
},
|
|
422
|
-
// return next match that has a token
|
|
423
|
-
lex: function() {
|
|
424
|
-
var _ = this.next();
|
|
425
|
-
return _ || this.lex();
|
|
426
|
-
},
|
|
427
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
428
|
-
begin: function(_) {
|
|
429
|
-
this.conditionStack.push(_);
|
|
430
|
-
},
|
|
431
|
-
// pop the previously active lexer condition state off the condition stack
|
|
432
|
-
popState: function() {
|
|
433
|
-
var _ = this.conditionStack.length - 1;
|
|
434
|
-
return _ > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
435
|
-
},
|
|
436
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
437
|
-
_currentRules: function() {
|
|
438
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
439
|
-
},
|
|
440
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
441
|
-
topState: function(_) {
|
|
442
|
-
return _ = this.conditionStack.length - 1 - Math.abs(_ || 0), _ >= 0 ? this.conditionStack[_] : "INITIAL";
|
|
443
|
-
},
|
|
444
|
-
// alias for begin(condition)
|
|
445
|
-
pushState: function(_) {
|
|
446
|
-
this.begin(_);
|
|
447
|
-
},
|
|
448
|
-
// return the number of states currently on the stack
|
|
449
|
-
stateStackSize: function() {
|
|
450
|
-
return this.conditionStack.length;
|
|
451
|
-
},
|
|
452
|
-
options: { "case-insensitive": !0 },
|
|
453
|
-
performAction: function(_, P, g, S) {
|
|
454
|
-
switch (g) {
|
|
455
|
-
case 0:
|
|
456
|
-
return this.begin("open_directive"), 84;
|
|
457
|
-
case 1:
|
|
458
|
-
return this.begin("type_directive"), 85;
|
|
459
|
-
case 2:
|
|
460
|
-
return this.popState(), this.begin("arg_directive"), 17;
|
|
461
|
-
case 3:
|
|
462
|
-
return this.popState(), this.popState(), 87;
|
|
463
|
-
case 4:
|
|
464
|
-
return 86;
|
|
465
|
-
case 5:
|
|
466
|
-
return 5;
|
|
467
|
-
case 6:
|
|
468
|
-
break;
|
|
469
|
-
case 7:
|
|
470
|
-
break;
|
|
471
|
-
case 8:
|
|
472
|
-
break;
|
|
473
|
-
case 9:
|
|
474
|
-
break;
|
|
475
|
-
case 10:
|
|
476
|
-
break;
|
|
477
|
-
case 11:
|
|
478
|
-
return 24;
|
|
479
|
-
case 12:
|
|
480
|
-
return this.begin("LINE"), 19;
|
|
481
|
-
case 13:
|
|
482
|
-
return this.begin("ID"), 55;
|
|
483
|
-
case 14:
|
|
484
|
-
return this.begin("ID"), 57;
|
|
485
|
-
case 15:
|
|
486
|
-
return P.yytext = P.yytext.trim(), this.begin("ALIAS"), 74;
|
|
487
|
-
case 16:
|
|
488
|
-
return this.popState(), this.popState(), this.begin("LINE"), 56;
|
|
489
|
-
case 17:
|
|
490
|
-
return this.popState(), this.popState(), 5;
|
|
491
|
-
case 18:
|
|
492
|
-
return this.begin("LINE"), 41;
|
|
493
|
-
case 19:
|
|
494
|
-
return this.begin("LINE"), 42;
|
|
495
|
-
case 20:
|
|
496
|
-
return this.begin("LINE"), 43;
|
|
497
|
-
case 21:
|
|
498
|
-
return this.begin("LINE"), 44;
|
|
499
|
-
case 22:
|
|
500
|
-
return this.begin("LINE"), 54;
|
|
501
|
-
case 23:
|
|
502
|
-
return this.begin("LINE"), 46;
|
|
503
|
-
case 24:
|
|
504
|
-
return this.begin("LINE"), 48;
|
|
505
|
-
case 25:
|
|
506
|
-
return this.begin("LINE"), 53;
|
|
507
|
-
case 26:
|
|
508
|
-
return this.begin("LINE"), 49;
|
|
509
|
-
case 27:
|
|
510
|
-
return this.begin("LINE"), 52;
|
|
511
|
-
case 28:
|
|
512
|
-
return this.begin("LINE"), 51;
|
|
513
|
-
case 29:
|
|
514
|
-
return this.popState(), 20;
|
|
515
|
-
case 30:
|
|
516
|
-
return 21;
|
|
517
|
-
case 31:
|
|
518
|
-
return 69;
|
|
519
|
-
case 32:
|
|
520
|
-
return 70;
|
|
521
|
-
case 33:
|
|
522
|
-
return 63;
|
|
523
|
-
case 34:
|
|
524
|
-
return 64;
|
|
525
|
-
case 35:
|
|
526
|
-
return 65;
|
|
527
|
-
case 36:
|
|
528
|
-
return 66;
|
|
529
|
-
case 37:
|
|
530
|
-
return 61;
|
|
531
|
-
case 38:
|
|
532
|
-
return 58;
|
|
533
|
-
case 39:
|
|
534
|
-
return this.begin("ID"), 26;
|
|
535
|
-
case 40:
|
|
536
|
-
return this.begin("ID"), 28;
|
|
537
|
-
case 41:
|
|
538
|
-
return 34;
|
|
539
|
-
case 42:
|
|
540
|
-
return 35;
|
|
541
|
-
case 43:
|
|
542
|
-
return this.begin("acc_title"), 36;
|
|
543
|
-
case 44:
|
|
544
|
-
return this.popState(), "acc_title_value";
|
|
545
|
-
case 45:
|
|
546
|
-
return this.begin("acc_descr"), 38;
|
|
547
|
-
case 46:
|
|
548
|
-
return this.popState(), "acc_descr_value";
|
|
549
|
-
case 47:
|
|
550
|
-
this.begin("acc_descr_multiline");
|
|
551
|
-
break;
|
|
552
|
-
case 48:
|
|
553
|
-
this.popState();
|
|
554
|
-
break;
|
|
555
|
-
case 49:
|
|
556
|
-
return "acc_descr_multiline_value";
|
|
557
|
-
case 50:
|
|
558
|
-
return 7;
|
|
559
|
-
case 51:
|
|
560
|
-
return 23;
|
|
561
|
-
case 52:
|
|
562
|
-
return 25;
|
|
563
|
-
case 53:
|
|
564
|
-
return 68;
|
|
565
|
-
case 54:
|
|
566
|
-
return 5;
|
|
567
|
-
case 55:
|
|
568
|
-
return P.yytext = P.yytext.trim(), 74;
|
|
569
|
-
case 56:
|
|
570
|
-
return 77;
|
|
571
|
-
case 57:
|
|
572
|
-
return 78;
|
|
573
|
-
case 58:
|
|
574
|
-
return 75;
|
|
575
|
-
case 59:
|
|
576
|
-
return 76;
|
|
577
|
-
case 60:
|
|
578
|
-
return 79;
|
|
579
|
-
case 61:
|
|
580
|
-
return 80;
|
|
581
|
-
case 62:
|
|
582
|
-
return 81;
|
|
583
|
-
case 63:
|
|
584
|
-
return 82;
|
|
585
|
-
case 64:
|
|
586
|
-
return 83;
|
|
587
|
-
case 65:
|
|
588
|
-
return 72;
|
|
589
|
-
case 66:
|
|
590
|
-
return 73;
|
|
591
|
-
case 67:
|
|
592
|
-
return 5;
|
|
593
|
-
case 68:
|
|
594
|
-
return "INVALID";
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:[\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, /^(?:[^\->:\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],
|
|
598
|
-
conditions: { acc_descr_multiline: { rules: [48, 49], inclusive: !1 }, acc_descr: { rules: [46], inclusive: !1 }, acc_title: { rules: [44], inclusive: !1 }, open_directive: { rules: [1, 8], inclusive: !1 }, type_directive: { rules: [2, 3, 8], inclusive: !1 }, arg_directive: { rules: [3, 4, 8], inclusive: !1 }, ID: { rules: [7, 8, 15], inclusive: !1 }, ALIAS: { rules: [7, 8, 16, 17], inclusive: !1 }, LINE: { rules: [7, 8, 29], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68], inclusive: !0 } }
|
|
599
|
-
};
|
|
600
|
-
return ot;
|
|
601
|
-
}();
|
|
602
|
-
Mt.lexer = xe;
|
|
603
|
-
function Rt() {
|
|
604
|
-
this.yy = {};
|
|
605
|
-
}
|
|
606
|
-
return Rt.prototype = Mt, Mt.Parser = Rt, new Rt();
|
|
607
|
-
}();
|
|
608
|
-
Bt.parser = Bt;
|
|
609
|
-
const Oe = Bt;
|
|
610
|
-
let Et, ct = {}, xt = [], $ = [], Nt = !1, Yt, at;
|
|
611
|
-
const Be = function(t, e, r) {
|
|
612
|
-
Pe.parseDirective(this, t, e, r);
|
|
613
|
-
}, Ye = function(t) {
|
|
614
|
-
xt.push({
|
|
615
|
-
name: t.text,
|
|
616
|
-
wrap: t.wrap === void 0 && pt() || !!t.wrap,
|
|
617
|
-
fill: t.color,
|
|
618
|
-
actorKeys: []
|
|
619
|
-
}), at = xt.slice(-1)[0];
|
|
620
|
-
}, Ft = function(t, e, r, i) {
|
|
621
|
-
let s = at;
|
|
622
|
-
const n = ct[t];
|
|
623
|
-
if (n) {
|
|
624
|
-
if (at && n.box && at !== n.box)
|
|
625
|
-
throw new Error(
|
|
626
|
-
"A same participant should only be defined in one Box: " + n.name + " can't be in '" + n.box.name + "' and in '" + at.name + "' at the same time."
|
|
627
|
-
);
|
|
628
|
-
if (s = n.box ? n.box : at, n.box = s, n && e === n.name && r == null)
|
|
629
|
-
return;
|
|
630
|
-
}
|
|
631
|
-
(r == null || r.text == null) && (r = { text: e, wrap: null, type: i }), (i == null || r.text == null) && (r = { text: e, wrap: null, type: i }), ct[t] = {
|
|
632
|
-
box: s,
|
|
633
|
-
name: e,
|
|
634
|
-
description: r.text,
|
|
635
|
-
wrap: r.wrap === void 0 && pt() || !!r.wrap,
|
|
636
|
-
prevActor: Et,
|
|
637
|
-
links: {},
|
|
638
|
-
properties: {},
|
|
639
|
-
actorCnt: null,
|
|
640
|
-
rectData: null,
|
|
641
|
-
type: i || "participant"
|
|
642
|
-
}, Et && ct[Et] && (ct[Et].nextActor = t), at && at.actorKeys.push(t), Et = t;
|
|
643
|
-
}, Fe = (t) => {
|
|
644
|
-
let e, r = 0;
|
|
645
|
-
for (e = 0; e < $.length; e++)
|
|
646
|
-
$[e].type === bt.ACTIVE_START && $[e].from.actor === t && r++, $[e].type === bt.ACTIVE_END && $[e].from.actor === t && r--;
|
|
647
|
-
return r;
|
|
648
|
-
}, We = function(t, e, r, i) {
|
|
649
|
-
$.push({
|
|
650
|
-
from: t,
|
|
651
|
-
to: e,
|
|
652
|
-
message: r.text,
|
|
653
|
-
wrap: r.wrap === void 0 && pt() || !!r.wrap,
|
|
654
|
-
answer: i
|
|
655
|
-
});
|
|
656
|
-
}, R = function(t, e, r = { text: void 0, wrap: void 0 }, i) {
|
|
657
|
-
if (i === bt.ACTIVE_END && Fe(t.actor) < 1) {
|
|
658
|
-
let n = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
|
|
659
|
-
throw n.hash = {
|
|
660
|
-
text: "->>-",
|
|
661
|
-
token: "->>-",
|
|
662
|
-
line: "1",
|
|
663
|
-
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
664
|
-
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
665
|
-
}, n;
|
|
666
|
-
}
|
|
667
|
-
return $.push({
|
|
668
|
-
from: t,
|
|
669
|
-
to: e,
|
|
670
|
-
message: r.text,
|
|
671
|
-
wrap: r.wrap === void 0 && pt() || !!r.wrap,
|
|
672
|
-
type: i
|
|
673
|
-
}), !0;
|
|
674
|
-
}, qe = function() {
|
|
675
|
-
return xt.length > 0;
|
|
676
|
-
}, ze = function() {
|
|
677
|
-
return xt.some((t) => t.name);
|
|
678
|
-
}, He = function() {
|
|
679
|
-
return $;
|
|
680
|
-
}, Ue = function() {
|
|
681
|
-
return xt;
|
|
682
|
-
}, Ke = function() {
|
|
683
|
-
return ct;
|
|
684
|
-
}, mt = function(t) {
|
|
685
|
-
return ct[t];
|
|
686
|
-
}, Ge = function() {
|
|
687
|
-
return Object.keys(ct);
|
|
688
|
-
}, Xe = function() {
|
|
689
|
-
Nt = !0;
|
|
690
|
-
}, Je = function() {
|
|
691
|
-
Nt = !1;
|
|
692
|
-
}, Ze = () => Nt, Qe = function(t) {
|
|
693
|
-
Yt = t;
|
|
694
|
-
}, pt = () => Yt !== void 0 ? Yt : lt().sequence.wrap, je = function() {
|
|
695
|
-
ct = {}, xt = [], $ = [], Nt = !1, Le();
|
|
696
|
-
}, $e = function(t) {
|
|
697
|
-
const e = t.trim(), r = {
|
|
698
|
-
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
|
|
699
|
-
wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
|
|
700
|
-
};
|
|
701
|
-
return K.debug("parseMessage:", r), r;
|
|
702
|
-
}, t0 = function(t) {
|
|
703
|
-
const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
|
|
704
|
-
let r = e != null && e[1] ? e[1].trim() : "transparent", i = e != null && e[2] ? e[2].trim() : void 0;
|
|
705
|
-
if (window && window.CSS)
|
|
706
|
-
window.CSS.supports("color", r) || (r = "transparent", i = t.trim());
|
|
707
|
-
else {
|
|
708
|
-
const n = new Option().style;
|
|
709
|
-
n.color = r, n.color !== r && (r = "transparent", i = t.trim());
|
|
710
|
-
}
|
|
711
|
-
return {
|
|
712
|
-
color: r,
|
|
713
|
-
text: i !== void 0 ? Lt(i.replace(/^:?(?:no)?wrap:/, ""), lt()) : void 0,
|
|
714
|
-
wrap: i !== void 0 ? i.match(/^:?wrap:/) !== null ? !0 : i.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
|
|
715
|
-
};
|
|
716
|
-
}, bt = {
|
|
717
|
-
SOLID: 0,
|
|
718
|
-
DOTTED: 1,
|
|
719
|
-
NOTE: 2,
|
|
720
|
-
SOLID_CROSS: 3,
|
|
721
|
-
DOTTED_CROSS: 4,
|
|
722
|
-
SOLID_OPEN: 5,
|
|
723
|
-
DOTTED_OPEN: 6,
|
|
724
|
-
LOOP_START: 10,
|
|
725
|
-
LOOP_END: 11,
|
|
726
|
-
ALT_START: 12,
|
|
727
|
-
ALT_ELSE: 13,
|
|
728
|
-
ALT_END: 14,
|
|
729
|
-
OPT_START: 15,
|
|
730
|
-
OPT_END: 16,
|
|
731
|
-
ACTIVE_START: 17,
|
|
732
|
-
ACTIVE_END: 18,
|
|
733
|
-
PAR_START: 19,
|
|
734
|
-
PAR_AND: 20,
|
|
735
|
-
PAR_END: 21,
|
|
736
|
-
RECT_START: 22,
|
|
737
|
-
RECT_END: 23,
|
|
738
|
-
SOLID_POINT: 24,
|
|
739
|
-
DOTTED_POINT: 25,
|
|
740
|
-
AUTONUMBER: 26,
|
|
741
|
-
CRITICAL_START: 27,
|
|
742
|
-
CRITICAL_OPTION: 28,
|
|
743
|
-
CRITICAL_END: 29,
|
|
744
|
-
BREAK_START: 30,
|
|
745
|
-
BREAK_END: 31,
|
|
746
|
-
PAR_OVER_START: 32
|
|
747
|
-
}, e0 = {
|
|
748
|
-
FILLED: 0,
|
|
749
|
-
OPEN: 1
|
|
750
|
-
}, i0 = {
|
|
751
|
-
LEFTOF: 0,
|
|
752
|
-
RIGHTOF: 1,
|
|
753
|
-
OVER: 2
|
|
754
|
-
}, se = function(t, e, r) {
|
|
755
|
-
r.text, r.wrap === void 0 && pt() || r.wrap;
|
|
756
|
-
const i = [].concat(t, t);
|
|
757
|
-
$.push({
|
|
758
|
-
from: i[0],
|
|
759
|
-
to: i[1],
|
|
760
|
-
message: r.text,
|
|
761
|
-
wrap: r.wrap === void 0 && pt() || !!r.wrap,
|
|
762
|
-
type: bt.NOTE,
|
|
763
|
-
placement: e
|
|
764
|
-
});
|
|
765
|
-
}, ne = function(t, e) {
|
|
766
|
-
const r = mt(t);
|
|
767
|
-
try {
|
|
768
|
-
let i = Lt(e.text, lt());
|
|
769
|
-
i = i.replace(/&/g, "&"), i = i.replace(/=/g, "=");
|
|
770
|
-
const s = JSON.parse(i);
|
|
771
|
-
Ht(r, s);
|
|
772
|
-
} catch (i) {
|
|
773
|
-
K.error("error while parsing actor link text", i);
|
|
774
|
-
}
|
|
775
|
-
}, s0 = function(t, e) {
|
|
776
|
-
const r = mt(t);
|
|
777
|
-
try {
|
|
778
|
-
const c = {};
|
|
779
|
-
let l = Lt(e.text, lt());
|
|
780
|
-
var i = l.indexOf("@");
|
|
781
|
-
l = l.replace(/&/g, "&"), l = l.replace(/=/g, "=");
|
|
782
|
-
var s = l.slice(0, i - 1).trim(), n = l.slice(i + 1).trim();
|
|
783
|
-
c[s] = n, Ht(r, c);
|
|
784
|
-
} catch (c) {
|
|
785
|
-
K.error("error while parsing actor link text", c);
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
function Ht(t, e) {
|
|
789
|
-
if (t.links == null)
|
|
790
|
-
t.links = e;
|
|
791
|
-
else
|
|
792
|
-
for (let r in e)
|
|
793
|
-
t.links[r] = e[r];
|
|
794
|
-
}
|
|
795
|
-
const ae = function(t, e) {
|
|
796
|
-
const r = mt(t);
|
|
797
|
-
try {
|
|
798
|
-
let i = Lt(e.text, lt());
|
|
799
|
-
const s = JSON.parse(i);
|
|
800
|
-
re(r, s);
|
|
801
|
-
} catch (i) {
|
|
802
|
-
K.error("error while parsing actor properties text", i);
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
function re(t, e) {
|
|
806
|
-
if (t.properties == null)
|
|
807
|
-
t.properties = e;
|
|
808
|
-
else
|
|
809
|
-
for (let r in e)
|
|
810
|
-
t.properties[r] = e[r];
|
|
811
|
-
}
|
|
812
|
-
function n0() {
|
|
813
|
-
at = void 0;
|
|
814
|
-
}
|
|
815
|
-
const oe = function(t, e) {
|
|
816
|
-
const r = mt(t), i = document.getElementById(e.text);
|
|
817
|
-
try {
|
|
818
|
-
const s = i.innerHTML, n = JSON.parse(s);
|
|
819
|
-
n.properties && re(r, n.properties), n.links && Ht(r, n.links);
|
|
820
|
-
} catch (s) {
|
|
821
|
-
K.error("error while parsing actor details text", s);
|
|
822
|
-
}
|
|
823
|
-
}, a0 = function(t, e) {
|
|
824
|
-
if (t !== void 0 && t.properties !== void 0)
|
|
825
|
-
return t.properties[e];
|
|
826
|
-
}, ce = function(t) {
|
|
827
|
-
if (Array.isArray(t))
|
|
828
|
-
t.forEach(function(e) {
|
|
829
|
-
ce(e);
|
|
830
|
-
});
|
|
831
|
-
else
|
|
832
|
-
switch (t.type) {
|
|
833
|
-
case "sequenceIndex":
|
|
834
|
-
$.push({
|
|
835
|
-
from: void 0,
|
|
836
|
-
to: void 0,
|
|
837
|
-
message: {
|
|
838
|
-
start: t.sequenceIndex,
|
|
839
|
-
step: t.sequenceIndexStep,
|
|
840
|
-
visible: t.sequenceVisible
|
|
841
|
-
},
|
|
842
|
-
wrap: !1,
|
|
843
|
-
type: t.signalType
|
|
844
|
-
});
|
|
845
|
-
break;
|
|
846
|
-
case "addParticipant":
|
|
847
|
-
Ft(t.actor, t.actor, t.description, "participant");
|
|
848
|
-
break;
|
|
849
|
-
case "addActor":
|
|
850
|
-
Ft(t.actor, t.actor, t.description, "actor");
|
|
851
|
-
break;
|
|
852
|
-
case "activeStart":
|
|
853
|
-
R(t.actor, void 0, void 0, t.signalType);
|
|
854
|
-
break;
|
|
855
|
-
case "activeEnd":
|
|
856
|
-
R(t.actor, void 0, void 0, t.signalType);
|
|
857
|
-
break;
|
|
858
|
-
case "addNote":
|
|
859
|
-
se(t.actor, t.placement, t.text);
|
|
860
|
-
break;
|
|
861
|
-
case "addLinks":
|
|
862
|
-
ne(t.actor, t.text);
|
|
863
|
-
break;
|
|
864
|
-
case "addALink":
|
|
865
|
-
s0(t.actor, t.text);
|
|
866
|
-
break;
|
|
867
|
-
case "addProperties":
|
|
868
|
-
ae(t.actor, t.text);
|
|
869
|
-
break;
|
|
870
|
-
case "addDetails":
|
|
871
|
-
oe(t.actor, t.text);
|
|
872
|
-
break;
|
|
873
|
-
case "addMessage":
|
|
874
|
-
R(t.from, t.to, t.msg, t.signalType);
|
|
875
|
-
break;
|
|
876
|
-
case "boxStart":
|
|
877
|
-
Ye(t.boxData);
|
|
878
|
-
break;
|
|
879
|
-
case "boxEnd":
|
|
880
|
-
n0();
|
|
881
|
-
break;
|
|
882
|
-
case "loopStart":
|
|
883
|
-
R(void 0, void 0, t.loopText, t.signalType);
|
|
884
|
-
break;
|
|
885
|
-
case "loopEnd":
|
|
886
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
887
|
-
break;
|
|
888
|
-
case "rectStart":
|
|
889
|
-
R(void 0, void 0, t.color, t.signalType);
|
|
890
|
-
break;
|
|
891
|
-
case "rectEnd":
|
|
892
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
893
|
-
break;
|
|
894
|
-
case "optStart":
|
|
895
|
-
R(void 0, void 0, t.optText, t.signalType);
|
|
896
|
-
break;
|
|
897
|
-
case "optEnd":
|
|
898
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
899
|
-
break;
|
|
900
|
-
case "altStart":
|
|
901
|
-
R(void 0, void 0, t.altText, t.signalType);
|
|
902
|
-
break;
|
|
903
|
-
case "else":
|
|
904
|
-
R(void 0, void 0, t.altText, t.signalType);
|
|
905
|
-
break;
|
|
906
|
-
case "altEnd":
|
|
907
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
908
|
-
break;
|
|
909
|
-
case "setAccTitle":
|
|
910
|
-
te(t.text);
|
|
911
|
-
break;
|
|
912
|
-
case "parStart":
|
|
913
|
-
R(void 0, void 0, t.parText, t.signalType);
|
|
914
|
-
break;
|
|
915
|
-
case "and":
|
|
916
|
-
R(void 0, void 0, t.parText, t.signalType);
|
|
917
|
-
break;
|
|
918
|
-
case "parEnd":
|
|
919
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
920
|
-
break;
|
|
921
|
-
case "criticalStart":
|
|
922
|
-
R(void 0, void 0, t.criticalText, t.signalType);
|
|
923
|
-
break;
|
|
924
|
-
case "option":
|
|
925
|
-
R(void 0, void 0, t.optionText, t.signalType);
|
|
926
|
-
break;
|
|
927
|
-
case "criticalEnd":
|
|
928
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
929
|
-
break;
|
|
930
|
-
case "breakStart":
|
|
931
|
-
R(void 0, void 0, t.breakText, t.signalType);
|
|
932
|
-
break;
|
|
933
|
-
case "breakEnd":
|
|
934
|
-
R(void 0, void 0, void 0, t.signalType);
|
|
935
|
-
break;
|
|
936
|
-
}
|
|
937
|
-
}, r0 = {
|
|
938
|
-
addActor: Ft,
|
|
939
|
-
addMessage: We,
|
|
940
|
-
addSignal: R,
|
|
941
|
-
addLinks: ne,
|
|
942
|
-
addDetails: oe,
|
|
943
|
-
addProperties: ae,
|
|
944
|
-
autoWrap: pt,
|
|
945
|
-
setWrap: Qe,
|
|
946
|
-
enableSequenceNumbers: Xe,
|
|
947
|
-
disableSequenceNumbers: Je,
|
|
948
|
-
showSequenceNumbers: Ze,
|
|
949
|
-
getMessages: He,
|
|
950
|
-
getActors: Ke,
|
|
951
|
-
getActor: mt,
|
|
952
|
-
getActorKeys: Ge,
|
|
953
|
-
getActorProperty: a0,
|
|
954
|
-
getAccTitle: me,
|
|
955
|
-
getBoxes: Ue,
|
|
956
|
-
getDiagramTitle: ve,
|
|
957
|
-
setDiagramTitle: we,
|
|
958
|
-
parseDirective: Be,
|
|
959
|
-
getConfig: () => lt().sequence,
|
|
960
|
-
clear: je,
|
|
961
|
-
parseMessage: $e,
|
|
962
|
-
parseBoxData: t0,
|
|
963
|
-
LINETYPE: bt,
|
|
964
|
-
ARROWTYPE: e0,
|
|
965
|
-
PLACEMENT: i0,
|
|
966
|
-
addNote: se,
|
|
967
|
-
setAccTitle: te,
|
|
968
|
-
apply: ce,
|
|
969
|
-
setAccDescription: _e,
|
|
970
|
-
getAccDescription: ke,
|
|
971
|
-
hasAtLeastOneBox: qe,
|
|
972
|
-
hasAtLeastOneBoxWithTitle: ze
|
|
973
|
-
}, o0 = (t) => `.actor {
|
|
974
|
-
stroke: ${t.actorBorder};
|
|
975
|
-
fill: ${t.actorBkg};
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
text.actor > tspan {
|
|
979
|
-
fill: ${t.actorTextColor};
|
|
980
|
-
stroke: none;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
.actor-line {
|
|
984
|
-
stroke: ${t.actorLineColor};
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
.messageLine0 {
|
|
988
|
-
stroke-width: 1.5;
|
|
989
|
-
stroke-dasharray: none;
|
|
990
|
-
stroke: ${t.signalColor};
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
.messageLine1 {
|
|
994
|
-
stroke-width: 1.5;
|
|
995
|
-
stroke-dasharray: 2, 2;
|
|
996
|
-
stroke: ${t.signalColor};
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
#arrowhead path {
|
|
1000
|
-
fill: ${t.signalColor};
|
|
1001
|
-
stroke: ${t.signalColor};
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
.sequenceNumber {
|
|
1005
|
-
fill: ${t.sequenceNumberColor};
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
#sequencenumber {
|
|
1009
|
-
fill: ${t.signalColor};
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
#crosshead path {
|
|
1013
|
-
fill: ${t.signalColor};
|
|
1014
|
-
stroke: ${t.signalColor};
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
.messageText {
|
|
1018
|
-
fill: ${t.signalTextColor};
|
|
1019
|
-
stroke: none;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.labelBox {
|
|
1023
|
-
stroke: ${t.labelBoxBorderColor};
|
|
1024
|
-
fill: ${t.labelBoxBkgColor};
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
.labelText, .labelText > tspan {
|
|
1028
|
-
fill: ${t.labelTextColor};
|
|
1029
|
-
stroke: none;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
.loopText, .loopText > tspan {
|
|
1033
|
-
fill: ${t.loopTextColor};
|
|
1034
|
-
stroke: none;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
.loopLine {
|
|
1038
|
-
stroke-width: 2px;
|
|
1039
|
-
stroke-dasharray: 2, 2;
|
|
1040
|
-
stroke: ${t.labelBoxBorderColor};
|
|
1041
|
-
fill: ${t.labelBoxBorderColor};
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
.note {
|
|
1045
|
-
//stroke: #decc93;
|
|
1046
|
-
stroke: ${t.noteBorderColor};
|
|
1047
|
-
fill: ${t.noteBkgColor};
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
.noteText, .noteText > tspan {
|
|
1051
|
-
fill: ${t.noteTextColor};
|
|
1052
|
-
stroke: none;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.activation0 {
|
|
1056
|
-
fill: ${t.activationBkgColor};
|
|
1057
|
-
stroke: ${t.activationBorderColor};
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
.activation1 {
|
|
1061
|
-
fill: ${t.activationBkgColor};
|
|
1062
|
-
stroke: ${t.activationBorderColor};
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
.activation2 {
|
|
1066
|
-
fill: ${t.activationBkgColor};
|
|
1067
|
-
stroke: ${t.activationBorderColor};
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
.actorPopupMenu {
|
|
1071
|
-
position: absolute;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
.actorPopupMenuPanel {
|
|
1075
|
-
position: absolute;
|
|
1076
|
-
fill: ${t.actorBkg};
|
|
1077
|
-
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
1078
|
-
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
1079
|
-
}
|
|
1080
|
-
.actor-man line {
|
|
1081
|
-
stroke: ${t.actorBorder};
|
|
1082
|
-
fill: ${t.actorBkg};
|
|
1083
|
-
}
|
|
1084
|
-
.actor-man circle, line {
|
|
1085
|
-
stroke: ${t.actorBorder};
|
|
1086
|
-
fill: ${t.actorBkg};
|
|
1087
|
-
stroke-width: 2px;
|
|
1088
|
-
}
|
|
1089
|
-
`, c0 = o0, Ut = function(t, e) {
|
|
1090
|
-
return Me(t, e);
|
|
1091
|
-
}, le = (t, e) => {
|
|
1092
|
-
Ae(() => {
|
|
1093
|
-
const r = document.querySelectorAll(t);
|
|
1094
|
-
r.length !== 0 && (r[0].addEventListener("mouseover", function() {
|
|
1095
|
-
p0("actor" + e + "_popup");
|
|
1096
|
-
}), r[0].addEventListener("mouseout", function() {
|
|
1097
|
-
u0("actor" + e + "_popup");
|
|
1098
|
-
}));
|
|
1099
|
-
});
|
|
1100
|
-
}, l0 = function(t, e, r, i, s) {
|
|
1101
|
-
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1102
|
-
return { height: 0, width: 0 };
|
|
1103
|
-
const n = e.links, c = e.actorCnt, l = e.rectData;
|
|
1104
|
-
var p = "none";
|
|
1105
|
-
s && (p = "block !important");
|
|
1106
|
-
const d = t.append("g");
|
|
1107
|
-
d.attr("id", "actor" + c + "_popup"), d.attr("class", "actorPopupMenu"), d.attr("display", p), le("#actor" + c + "_popup", c);
|
|
1108
|
-
var T = "";
|
|
1109
|
-
l.class !== void 0 && (T = " " + l.class);
|
|
1110
|
-
let y = l.width > r ? l.width : r;
|
|
1111
|
-
const u = d.append("rect");
|
|
1112
|
-
if (u.attr("class", "actorPopupMenuPanel" + T), u.attr("x", l.x), u.attr("y", l.height), u.attr("fill", l.fill), u.attr("stroke", l.stroke), u.attr("width", y), u.attr("height", l.height), u.attr("rx", l.rx), u.attr("ry", l.ry), n != null) {
|
|
1113
|
-
var x = 20;
|
|
1114
|
-
for (let A in n) {
|
|
1115
|
-
var m = d.append("a"), L = ee(n[A]);
|
|
1116
|
-
m.attr("xlink:href", L), m.attr("target", "_blank"), N0(i)(
|
|
1117
|
-
A,
|
|
1118
|
-
m,
|
|
1119
|
-
l.x + 10,
|
|
1120
|
-
l.height + x,
|
|
1121
|
-
y,
|
|
1122
|
-
20,
|
|
1123
|
-
{ class: "actor" },
|
|
1124
|
-
i
|
|
1125
|
-
), x += 30;
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
return u.attr("height", x), { height: l.height + x, width: y };
|
|
1129
|
-
}, h0 = function(t) {
|
|
1130
|
-
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'block'; }";
|
|
1131
|
-
}, d0 = function(t) {
|
|
1132
|
-
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'none'; }";
|
|
1133
|
-
}, p0 = function(t) {
|
|
1134
|
-
var e = document.getElementById(t);
|
|
1135
|
-
e != null && (e.style.display = "block");
|
|
1136
|
-
}, u0 = function(t) {
|
|
1137
|
-
var e = document.getElementById(t);
|
|
1138
|
-
e != null && (e.style.display = "none");
|
|
1139
|
-
}, Tt = function(t, e) {
|
|
1140
|
-
let r = 0, i = 0;
|
|
1141
|
-
const s = e.text.split(w.lineBreakRegex), [n, c] = ie(e.fontSize);
|
|
1142
|
-
let l = [], p = 0, d = () => e.y;
|
|
1143
|
-
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1144
|
-
switch (e.valign) {
|
|
1145
|
-
case "top":
|
|
1146
|
-
case "start":
|
|
1147
|
-
d = () => Math.round(e.y + e.textMargin);
|
|
1148
|
-
break;
|
|
1149
|
-
case "middle":
|
|
1150
|
-
case "center":
|
|
1151
|
-
d = () => Math.round(e.y + (r + i + e.textMargin) / 2);
|
|
1152
|
-
break;
|
|
1153
|
-
case "bottom":
|
|
1154
|
-
case "end":
|
|
1155
|
-
d = () => Math.round(
|
|
1156
|
-
e.y + (r + i + 2 * e.textMargin) - e.textMargin
|
|
1157
|
-
);
|
|
1158
|
-
break;
|
|
1159
|
-
}
|
|
1160
|
-
if (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0)
|
|
1161
|
-
switch (e.anchor) {
|
|
1162
|
-
case "left":
|
|
1163
|
-
case "start":
|
|
1164
|
-
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1165
|
-
break;
|
|
1166
|
-
case "middle":
|
|
1167
|
-
case "center":
|
|
1168
|
-
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1169
|
-
break;
|
|
1170
|
-
case "right":
|
|
1171
|
-
case "end":
|
|
1172
|
-
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1173
|
-
break;
|
|
1174
|
-
}
|
|
1175
|
-
for (let [T, y] of s.entries()) {
|
|
1176
|
-
e.textMargin !== void 0 && e.textMargin === 0 && n !== void 0 && (p = T * n);
|
|
1177
|
-
const u = t.append("text");
|
|
1178
|
-
u.attr("x", e.x), u.attr("y", d()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), c !== void 0 && u.style("font-size", c), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) : p !== 0 && u.attr("dy", p);
|
|
1179
|
-
const x = y || Se;
|
|
1180
|
-
if (e.tspan) {
|
|
1181
|
-
const m = u.append("tspan");
|
|
1182
|
-
m.attr("x", e.x), e.fill !== void 0 && m.attr("fill", e.fill), m.text(x);
|
|
1183
|
-
} else
|
|
1184
|
-
u.text(x);
|
|
1185
|
-
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (i += (u._groups || u)[0][0].getBBox().height, r = i), l.push(u);
|
|
1186
|
-
}
|
|
1187
|
-
return l;
|
|
1188
|
-
}, he = function(t, e) {
|
|
1189
|
-
function r(s, n, c, l, p) {
|
|
1190
|
-
return s + "," + n + " " + (s + c) + "," + n + " " + (s + c) + "," + (n + l - p) + " " + (s + c - p * 1.2) + "," + (n + l) + " " + s + "," + (n + l);
|
|
1191
|
-
}
|
|
1192
|
-
const i = t.append("polygon");
|
|
1193
|
-
return i.attr("points", r(e.x, e.y, e.width, e.height, 7)), i.attr("class", "labelBox"), e.y = e.y + e.height / 2, Tt(t, e), i;
|
|
1194
|
-
};
|
|
1195
|
-
let et = -1;
|
|
1196
|
-
const de = (t, e) => {
|
|
1197
|
-
t.selectAll && t.selectAll(".actor-line").attr("class", "200").attr("y2", e - 55);
|
|
1198
|
-
}, f0 = function(t, e, r, i) {
|
|
1199
|
-
const s = e.x + e.width / 2, n = e.y + 5, c = t.append("g");
|
|
1200
|
-
var l = c;
|
|
1201
|
-
i || (et++, l.append("line").attr("id", "actor" + et).attr("x1", s).attr("y1", n).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"), l = c.append("g"), e.actorCnt = et, e.links != null && (l.attr("id", "root-" + et), le("#root-" + et, et)));
|
|
1202
|
-
const p = It();
|
|
1203
|
-
var d = "actor";
|
|
1204
|
-
e.properties != null && e.properties.class ? d = e.properties.class : p.fill = "#eaeaea", p.x = e.x, p.y = e.y, p.width = e.width, p.height = e.height, p.class = d, p.rx = 3, p.ry = 3;
|
|
1205
|
-
const T = Ut(l, p);
|
|
1206
|
-
if (e.rectData = p, e.properties != null && e.properties.icon) {
|
|
1207
|
-
const u = e.properties.icon.trim();
|
|
1208
|
-
u.charAt(0) === "@" ? De(l, p.x + p.width - 20, p.y + 10, u.substr(1)) : Ve(l, p.x + p.width - 20, p.y + 10, u);
|
|
1209
|
-
}
|
|
1210
|
-
Kt(r)(
|
|
1211
|
-
e.description,
|
|
1212
|
-
l,
|
|
1213
|
-
p.x,
|
|
1214
|
-
p.y,
|
|
1215
|
-
p.width,
|
|
1216
|
-
p.height,
|
|
1217
|
-
{ class: "actor" },
|
|
1218
|
-
r
|
|
1219
|
-
);
|
|
1220
|
-
let y = e.height;
|
|
1221
|
-
if (T.node) {
|
|
1222
|
-
const u = T.node().getBBox();
|
|
1223
|
-
e.height = u.height, y = u.height;
|
|
1224
|
-
}
|
|
1225
|
-
return y;
|
|
1226
|
-
}, g0 = function(t, e, r, i) {
|
|
1227
|
-
const s = e.x + e.width / 2, n = e.y + 80;
|
|
1228
|
-
i || (et++, t.append("line").attr("id", "actor" + et).attr("x1", s).attr("y1", n).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"));
|
|
1229
|
-
const c = t.append("g");
|
|
1230
|
-
c.attr("class", "actor-man");
|
|
1231
|
-
const l = It();
|
|
1232
|
-
l.x = e.x, l.y = e.y, l.fill = "#eaeaea", l.width = e.width, l.height = e.height, l.class = "actor", l.rx = 3, l.ry = 3, c.append("line").attr("id", "actor-man-torso" + et).attr("x1", s).attr("y1", e.y + 25).attr("x2", s).attr("y2", e.y + 45), c.append("line").attr("id", "actor-man-arms" + et).attr("x1", s - 18).attr("y1", e.y + 33).attr("x2", s + 18).attr("y2", e.y + 33), c.append("line").attr("x1", s - 18).attr("y1", e.y + 60).attr("x2", s).attr("y2", e.y + 45), c.append("line").attr("x1", s).attr("y1", e.y + 45).attr("x2", s + 16).attr("y2", e.y + 60);
|
|
1233
|
-
const p = c.append("circle");
|
|
1234
|
-
p.attr("cx", e.x + e.width / 2), p.attr("cy", e.y + 10), p.attr("r", 15), p.attr("width", e.width), p.attr("height", e.height);
|
|
1235
|
-
const d = c.node().getBBox();
|
|
1236
|
-
return e.height = d.height, Kt(r)(
|
|
1237
|
-
e.description,
|
|
1238
|
-
c,
|
|
1239
|
-
l.x,
|
|
1240
|
-
l.y + 35,
|
|
1241
|
-
l.width,
|
|
1242
|
-
l.height,
|
|
1243
|
-
{ class: "actor" },
|
|
1244
|
-
r
|
|
1245
|
-
), e.height;
|
|
1246
|
-
}, x0 = function(t, e, r, i) {
|
|
1247
|
-
switch (e.type) {
|
|
1248
|
-
case "actor":
|
|
1249
|
-
return g0(t, e, r, i);
|
|
1250
|
-
case "participant":
|
|
1251
|
-
return f0(t, e, r, i);
|
|
1252
|
-
}
|
|
1253
|
-
}, T0 = function(t, e, r) {
|
|
1254
|
-
const s = t.append("g");
|
|
1255
|
-
pe(s, e), e.name && Kt(r)(
|
|
1256
|
-
e.name,
|
|
1257
|
-
s,
|
|
1258
|
-
e.x,
|
|
1259
|
-
e.y + (e.textMaxHeight || 0) / 2,
|
|
1260
|
-
e.width,
|
|
1261
|
-
0,
|
|
1262
|
-
{ class: "text" },
|
|
1263
|
-
r
|
|
1264
|
-
), s.lower();
|
|
1265
|
-
}, y0 = function(t) {
|
|
1266
|
-
return t.append("g");
|
|
1267
|
-
}, E0 = function(t, e, r, i, s) {
|
|
1268
|
-
const n = It(), c = e.anchored;
|
|
1269
|
-
n.x = e.startx, n.y = e.starty, n.class = "activation" + s % 3, n.width = e.stopx - e.startx, n.height = r - e.starty, Ut(c, n);
|
|
1270
|
-
}, b0 = function(t, e, r, i) {
|
|
1271
|
-
const {
|
|
1272
|
-
boxMargin: s,
|
|
1273
|
-
boxTextMargin: n,
|
|
1274
|
-
labelBoxHeight: c,
|
|
1275
|
-
labelBoxWidth: l,
|
|
1276
|
-
messageFontFamily: p,
|
|
1277
|
-
messageFontSize: d,
|
|
1278
|
-
messageFontWeight: T
|
|
1279
|
-
} = i, y = t.append("g"), u = function(L, A, M, I) {
|
|
1280
|
-
return y.append("line").attr("x1", L).attr("y1", A).attr("x2", M).attr("y2", I).attr("class", "loopLine");
|
|
1281
|
-
};
|
|
1282
|
-
u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(L) {
|
|
1283
|
-
u(e.startx, L.y, e.stopx, L.y).style(
|
|
1284
|
-
"stroke-dasharray",
|
|
1285
|
-
"3, 3"
|
|
1286
|
-
);
|
|
1287
|
-
});
|
|
1288
|
-
let x = zt();
|
|
1289
|
-
x.text = r, x.x = e.startx, x.y = e.starty, x.fontFamily = p, x.fontSize = d, x.fontWeight = T, x.anchor = "middle", x.valign = "middle", x.tspan = !1, x.width = l || 50, x.height = c || 20, x.textMargin = n, x.class = "labelText", he(y, x), x = ue(), x.text = e.title, x.x = e.startx + l / 2 + (e.stopx - e.startx) / 2, x.y = e.starty + s + n, x.anchor = "middle", x.valign = "middle", x.textMargin = n, x.class = "loopText", x.fontFamily = p, x.fontSize = d, x.fontWeight = T, x.wrap = !0;
|
|
1290
|
-
let m = Tt(y, x);
|
|
1291
|
-
return e.sectionTitles !== void 0 && e.sectionTitles.forEach(function(L, A) {
|
|
1292
|
-
if (L.message) {
|
|
1293
|
-
x.text = L.message, x.x = e.startx + (e.stopx - e.startx) / 2, x.y = e.sections[A].y + s + n, x.class = "loopText", x.anchor = "middle", x.valign = "middle", x.tspan = !1, x.fontFamily = p, x.fontSize = d, x.fontWeight = T, x.wrap = e.wrap, m = Tt(y, x);
|
|
1294
|
-
let M = Math.round(
|
|
1295
|
-
m.map((I) => (I._groups || I)[0][0].getBBox().height).reduce((I, Y) => I + Y)
|
|
1296
|
-
);
|
|
1297
|
-
e.sections[A].height += M - (s + n);
|
|
1298
|
-
}
|
|
1299
|
-
}), e.height = Math.round(e.stopy - e.starty), y;
|
|
1300
|
-
}, pe = function(t, e) {
|
|
1301
|
-
Re(t, e);
|
|
1302
|
-
}, m0 = function(t) {
|
|
1303
|
-
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1304
|
-
"d",
|
|
1305
|
-
"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"
|
|
1306
|
-
);
|
|
1307
|
-
}, v0 = function(t) {
|
|
1308
|
-
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1309
|
-
"d",
|
|
1310
|
-
"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"
|
|
1311
|
-
);
|
|
1312
|
-
}, w0 = function(t) {
|
|
1313
|
-
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1314
|
-
"d",
|
|
1315
|
-
"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"
|
|
1316
|
-
);
|
|
1317
|
-
}, _0 = function(t) {
|
|
1318
|
-
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 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");
|
|
1319
|
-
}, k0 = function(t) {
|
|
1320
|
-
t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).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");
|
|
1321
|
-
}, P0 = function(t) {
|
|
1322
|
-
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);
|
|
1323
|
-
}, L0 = function(t) {
|
|
1324
|
-
t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 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");
|
|
1325
|
-
}, ue = function() {
|
|
1326
|
-
return {
|
|
1327
|
-
x: 0,
|
|
1328
|
-
y: 0,
|
|
1329
|
-
fill: void 0,
|
|
1330
|
-
anchor: void 0,
|
|
1331
|
-
style: "#666",
|
|
1332
|
-
width: void 0,
|
|
1333
|
-
height: void 0,
|
|
1334
|
-
textMargin: 0,
|
|
1335
|
-
rx: 0,
|
|
1336
|
-
ry: 0,
|
|
1337
|
-
tspan: !0,
|
|
1338
|
-
valign: void 0
|
|
1339
|
-
};
|
|
1340
|
-
}, I0 = function() {
|
|
1341
|
-
return {
|
|
1342
|
-
x: 0,
|
|
1343
|
-
y: 0,
|
|
1344
|
-
fill: "#EDF2AE",
|
|
1345
|
-
stroke: "#666",
|
|
1346
|
-
width: 100,
|
|
1347
|
-
anchor: "start",
|
|
1348
|
-
height: 100,
|
|
1349
|
-
rx: 0,
|
|
1350
|
-
ry: 0
|
|
1351
|
-
};
|
|
1352
|
-
}, Kt = function() {
|
|
1353
|
-
function t(s, n, c, l, p, d, T) {
|
|
1354
|
-
const y = n.append("text").attr("x", c + p / 2).attr("y", l + d / 2 + 5).style("text-anchor", "middle").text(s);
|
|
1355
|
-
i(y, T);
|
|
1356
|
-
}
|
|
1357
|
-
function e(s, n, c, l, p, d, T, y) {
|
|
1358
|
-
const { actorFontSize: u, actorFontFamily: x, actorFontWeight: m } = y, [L, A] = ie(u), M = s.split(w.lineBreakRegex);
|
|
1359
|
-
for (let I = 0; I < M.length; I++) {
|
|
1360
|
-
const Y = I * L - L * (M.length - 1) / 2, V = n.append("text").attr("x", c + p / 2).attr("y", l).style("text-anchor", "middle").style("font-size", A).style("font-weight", m).style("font-family", x);
|
|
1361
|
-
V.append("tspan").attr("x", c + p / 2).attr("dy", Y).text(M[I]), V.attr("y", l + d / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(V, T);
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
function r(s, n, c, l, p, d, T, y) {
|
|
1365
|
-
const u = n.append("switch"), m = u.append("foreignObject").attr("x", c).attr("y", l).attr("width", p).attr("height", d).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1366
|
-
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, u, c, l, p, d, T, y), i(m, T);
|
|
1367
|
-
}
|
|
1368
|
-
function i(s, n) {
|
|
1369
|
-
for (const c in n)
|
|
1370
|
-
n.hasOwnProperty(c) && s.attr(c, n[c]);
|
|
1371
|
-
}
|
|
1372
|
-
return function(s) {
|
|
1373
|
-
return s.textPlacement === "fo" ? r : s.textPlacement === "old" ? t : e;
|
|
1374
|
-
};
|
|
1375
|
-
}(), N0 = function() {
|
|
1376
|
-
function t(s, n, c, l, p, d, T) {
|
|
1377
|
-
const y = n.append("text").attr("x", c).attr("y", l).style("text-anchor", "start").text(s);
|
|
1378
|
-
i(y, T);
|
|
1379
|
-
}
|
|
1380
|
-
function e(s, n, c, l, p, d, T, y) {
|
|
1381
|
-
const { actorFontSize: u, actorFontFamily: x, actorFontWeight: m } = y, L = s.split(w.lineBreakRegex);
|
|
1382
|
-
for (let A = 0; A < L.length; A++) {
|
|
1383
|
-
const M = A * u - u * (L.length - 1) / 2, I = n.append("text").attr("x", c).attr("y", l).style("text-anchor", "start").style("font-size", u).style("font-weight", m).style("font-family", x);
|
|
1384
|
-
I.append("tspan").attr("x", c).attr("dy", M).text(L[A]), I.attr("y", l + d / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(I, T);
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
function r(s, n, c, l, p, d, T, y) {
|
|
1388
|
-
const u = n.append("switch"), m = u.append("foreignObject").attr("x", c).attr("y", l).attr("width", p).attr("height", d).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1389
|
-
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, u, c, l, p, d, T, y), i(m, T);
|
|
1390
|
-
}
|
|
1391
|
-
function i(s, n) {
|
|
1392
|
-
for (const c in n)
|
|
1393
|
-
n.hasOwnProperty(c) && s.attr(c, n[c]);
|
|
1394
|
-
}
|
|
1395
|
-
return function(s) {
|
|
1396
|
-
return s.textPlacement === "fo" ? r : s.textPlacement === "old" ? t : e;
|
|
1397
|
-
};
|
|
1398
|
-
}(), D = {
|
|
1399
|
-
drawRect: Ut,
|
|
1400
|
-
drawText: Tt,
|
|
1401
|
-
drawLabel: he,
|
|
1402
|
-
drawActor: x0,
|
|
1403
|
-
drawBox: T0,
|
|
1404
|
-
drawPopup: l0,
|
|
1405
|
-
anchorElement: y0,
|
|
1406
|
-
drawActivation: E0,
|
|
1407
|
-
drawLoop: b0,
|
|
1408
|
-
drawBackgroundRect: pe,
|
|
1409
|
-
insertArrowHead: _0,
|
|
1410
|
-
insertArrowFilledHead: k0,
|
|
1411
|
-
insertSequenceNumber: P0,
|
|
1412
|
-
insertArrowCrossHead: L0,
|
|
1413
|
-
insertDatabaseIcon: m0,
|
|
1414
|
-
insertComputerIcon: v0,
|
|
1415
|
-
insertClockIcon: w0,
|
|
1416
|
-
getTextObj: ue,
|
|
1417
|
-
getNoteRect: I0,
|
|
1418
|
-
popupMenu: h0,
|
|
1419
|
-
popdownMenu: d0,
|
|
1420
|
-
fixLifeLineHeights: de,
|
|
1421
|
-
sanitizeUrl: ee
|
|
1422
|
-
};
|
|
1423
|
-
let a = {};
|
|
1424
|
-
const f = {
|
|
1425
|
-
data: {
|
|
1426
|
-
startx: void 0,
|
|
1427
|
-
stopx: void 0,
|
|
1428
|
-
starty: void 0,
|
|
1429
|
-
stopy: void 0
|
|
1430
|
-
},
|
|
1431
|
-
verticalPos: 0,
|
|
1432
|
-
sequenceItems: [],
|
|
1433
|
-
activations: [],
|
|
1434
|
-
models: {
|
|
1435
|
-
getHeight: function() {
|
|
1436
|
-
return Math.max.apply(
|
|
1437
|
-
null,
|
|
1438
|
-
this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
|
|
1439
|
-
) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e));
|
|
1440
|
-
},
|
|
1441
|
-
clear: function() {
|
|
1442
|
-
this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
|
|
1443
|
-
},
|
|
1444
|
-
addBox: function(t) {
|
|
1445
|
-
this.boxes.push(t);
|
|
1446
|
-
},
|
|
1447
|
-
addActor: function(t) {
|
|
1448
|
-
this.actors.push(t);
|
|
1449
|
-
},
|
|
1450
|
-
addLoop: function(t) {
|
|
1451
|
-
this.loops.push(t);
|
|
1452
|
-
},
|
|
1453
|
-
addMessage: function(t) {
|
|
1454
|
-
this.messages.push(t);
|
|
1455
|
-
},
|
|
1456
|
-
addNote: function(t) {
|
|
1457
|
-
this.notes.push(t);
|
|
1458
|
-
},
|
|
1459
|
-
lastActor: function() {
|
|
1460
|
-
return this.actors[this.actors.length - 1];
|
|
1461
|
-
},
|
|
1462
|
-
lastLoop: function() {
|
|
1463
|
-
return this.loops[this.loops.length - 1];
|
|
1464
|
-
},
|
|
1465
|
-
lastMessage: function() {
|
|
1466
|
-
return this.messages[this.messages.length - 1];
|
|
1467
|
-
},
|
|
1468
|
-
lastNote: function() {
|
|
1469
|
-
return this.notes[this.notes.length - 1];
|
|
1470
|
-
},
|
|
1471
|
-
actors: [],
|
|
1472
|
-
boxes: [],
|
|
1473
|
-
loops: [],
|
|
1474
|
-
messages: [],
|
|
1475
|
-
notes: []
|
|
1476
|
-
},
|
|
1477
|
-
init: function() {
|
|
1478
|
-
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
|
|
1479
|
-
startx: void 0,
|
|
1480
|
-
stopx: void 0,
|
|
1481
|
-
starty: void 0,
|
|
1482
|
-
stopy: void 0
|
|
1483
|
-
}, this.verticalPos = 0, ge(lt());
|
|
1484
|
-
},
|
|
1485
|
-
updateVal: function(t, e, r, i) {
|
|
1486
|
-
t[e] === void 0 ? t[e] = r : t[e] = i(r, t[e]);
|
|
1487
|
-
},
|
|
1488
|
-
updateBounds: function(t, e, r, i) {
|
|
1489
|
-
const s = this;
|
|
1490
|
-
let n = 0;
|
|
1491
|
-
function c(l) {
|
|
1492
|
-
return function(d) {
|
|
1493
|
-
n++;
|
|
1494
|
-
const T = s.sequenceItems.length - n + 1;
|
|
1495
|
-
s.updateVal(d, "starty", e - T * a.boxMargin, Math.min), s.updateVal(d, "stopy", i + T * a.boxMargin, Math.max), s.updateVal(f.data, "startx", t - T * a.boxMargin, Math.min), s.updateVal(f.data, "stopx", r + T * a.boxMargin, Math.max), l !== "activation" && (s.updateVal(d, "startx", t - T * a.boxMargin, Math.min), s.updateVal(d, "stopx", r + T * a.boxMargin, Math.max), s.updateVal(f.data, "starty", e - T * a.boxMargin, Math.min), s.updateVal(f.data, "stopy", i + T * a.boxMargin, Math.max));
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1498
|
-
this.sequenceItems.forEach(c()), this.activations.forEach(c("activation"));
|
|
1499
|
-
},
|
|
1500
|
-
insert: function(t, e, r, i) {
|
|
1501
|
-
const s = w.getMin(t, r), n = w.getMax(t, r), c = w.getMin(e, i), l = w.getMax(e, i);
|
|
1502
|
-
this.updateVal(f.data, "startx", s, Math.min), this.updateVal(f.data, "starty", c, Math.min), this.updateVal(f.data, "stopx", n, Math.max), this.updateVal(f.data, "stopy", l, Math.max), this.updateBounds(s, c, n, l);
|
|
1503
|
-
},
|
|
1504
|
-
newActivation: function(t, e, r) {
|
|
1505
|
-
const i = r[t.from.actor], s = At(t.from.actor).length || 0, n = i.x + i.width / 2 + (s - 1) * a.activationWidth / 2;
|
|
1506
|
-
this.activations.push({
|
|
1507
|
-
startx: n,
|
|
1508
|
-
starty: this.verticalPos + 2,
|
|
1509
|
-
stopx: n + a.activationWidth,
|
|
1510
|
-
stopy: void 0,
|
|
1511
|
-
actor: t.from.actor,
|
|
1512
|
-
anchored: D.anchorElement(e)
|
|
1513
|
-
});
|
|
1514
|
-
},
|
|
1515
|
-
endActivation: function(t) {
|
|
1516
|
-
const e = this.activations.map(function(r) {
|
|
1517
|
-
return r.actor;
|
|
1518
|
-
}).lastIndexOf(t.from.actor);
|
|
1519
|
-
return this.activations.splice(e, 1)[0];
|
|
1520
|
-
},
|
|
1521
|
-
createLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
|
|
1522
|
-
return {
|
|
1523
|
-
startx: void 0,
|
|
1524
|
-
starty: this.verticalPos,
|
|
1525
|
-
stopx: void 0,
|
|
1526
|
-
stopy: void 0,
|
|
1527
|
-
title: t.message,
|
|
1528
|
-
wrap: t.wrap,
|
|
1529
|
-
width: t.width,
|
|
1530
|
-
height: 0,
|
|
1531
|
-
fill: e
|
|
1532
|
-
};
|
|
1533
|
-
},
|
|
1534
|
-
newLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
|
|
1535
|
-
this.sequenceItems.push(this.createLoop(t, e));
|
|
1536
|
-
},
|
|
1537
|
-
endLoop: function() {
|
|
1538
|
-
return this.sequenceItems.pop();
|
|
1539
|
-
},
|
|
1540
|
-
isLoopOverlap: function() {
|
|
1541
|
-
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
|
|
1542
|
-
},
|
|
1543
|
-
addSectionToLoop: function(t) {
|
|
1544
|
-
const e = this.sequenceItems.pop();
|
|
1545
|
-
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: f.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
|
|
1546
|
-
},
|
|
1547
|
-
saveVerticalPos: function() {
|
|
1548
|
-
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
1549
|
-
},
|
|
1550
|
-
resetVerticalPos: function() {
|
|
1551
|
-
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1552
|
-
},
|
|
1553
|
-
bumpVerticalPos: function(t) {
|
|
1554
|
-
this.verticalPos = this.verticalPos + t, this.data.stopy = w.getMax(this.data.stopy, this.verticalPos);
|
|
1555
|
-
},
|
|
1556
|
-
getVerticalPos: function() {
|
|
1557
|
-
return this.verticalPos;
|
|
1558
|
-
},
|
|
1559
|
-
getBounds: function() {
|
|
1560
|
-
return { bounds: this.data, models: this.models };
|
|
1561
|
-
}
|
|
1562
|
-
}, A0 = function(t, e) {
|
|
1563
|
-
f.bumpVerticalPos(a.boxMargin), e.height = a.boxMargin, e.starty = f.getVerticalPos();
|
|
1564
|
-
const r = It();
|
|
1565
|
-
r.x = e.startx, r.y = e.starty, r.width = e.width || a.width, r.class = "note";
|
|
1566
|
-
const i = t.append("g"), s = D.drawRect(i, r), n = zt();
|
|
1567
|
-
n.x = e.startx, n.y = e.starty, n.width = r.width, n.dy = "1em", n.text = e.message, n.class = "noteText", n.fontFamily = a.noteFontFamily, n.fontSize = a.noteFontSize, n.fontWeight = a.noteFontWeight, n.anchor = a.noteAlign, n.textMargin = a.noteMargin, n.valign = "center";
|
|
1568
|
-
const c = Tt(i, n), l = Math.round(
|
|
1569
|
-
c.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, d) => p + d)
|
|
1570
|
-
);
|
|
1571
|
-
s.attr("height", l + 2 * a.noteMargin), e.height += l + 2 * a.noteMargin, f.bumpVerticalPos(l + 2 * a.noteMargin), e.stopy = e.starty + l + 2 * a.noteMargin, e.stopx = e.startx + r.width, f.insert(e.startx, e.starty, e.stopx, e.stopy), f.models.addNote(e);
|
|
1572
|
-
}, ut = (t) => ({
|
|
1573
|
-
fontFamily: t.messageFontFamily,
|
|
1574
|
-
fontSize: t.messageFontSize,
|
|
1575
|
-
fontWeight: t.messageFontWeight
|
|
1576
|
-
}), gt = (t) => ({
|
|
1577
|
-
fontFamily: t.noteFontFamily,
|
|
1578
|
-
fontSize: t.noteFontSize,
|
|
1579
|
-
fontWeight: t.noteFontWeight
|
|
1580
|
-
}), Wt = (t) => ({
|
|
1581
|
-
fontFamily: t.actorFontFamily,
|
|
1582
|
-
fontSize: t.actorFontSize,
|
|
1583
|
-
fontWeight: t.actorFontWeight
|
|
1584
|
-
});
|
|
1585
|
-
function S0(t, e) {
|
|
1586
|
-
f.bumpVerticalPos(10);
|
|
1587
|
-
const { startx: r, stopx: i, message: s } = e, n = w.splitBreaks(s).length, c = C.calculateTextDimensions(s, ut(a)), l = c.height / n;
|
|
1588
|
-
e.height += l, f.bumpVerticalPos(l);
|
|
1589
|
-
let p, d = c.height - 10;
|
|
1590
|
-
const T = c.width;
|
|
1591
|
-
if (r === i) {
|
|
1592
|
-
p = f.getVerticalPos() + d, a.rightAngles || (d += a.boxMargin, p = f.getVerticalPos() + d), d += 30;
|
|
1593
|
-
const y = w.getMax(T / 2, a.width / 2);
|
|
1594
|
-
f.insert(
|
|
1595
|
-
r - y,
|
|
1596
|
-
f.getVerticalPos() - 10 + d,
|
|
1597
|
-
i + y,
|
|
1598
|
-
f.getVerticalPos() + 30 + d
|
|
1599
|
-
);
|
|
1600
|
-
} else
|
|
1601
|
-
d += a.boxMargin, p = f.getVerticalPos() + d, f.insert(r, p - 10, i, p);
|
|
1602
|
-
return f.bumpVerticalPos(d), e.height += d, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
|
|
1603
|
-
}
|
|
1604
|
-
const M0 = function(t, e, r, i) {
|
|
1605
|
-
const { startx: s, stopx: n, starty: c, message: l, type: p, sequenceIndex: d, sequenceVisible: T } = e, y = C.calculateTextDimensions(l, ut(a)), u = zt();
|
|
1606
|
-
u.x = s, u.y = c + 10, u.width = n - s, u.class = "messageText", u.dy = "1em", u.text = l, u.fontFamily = a.messageFontFamily, u.fontSize = a.messageFontSize, u.fontWeight = a.messageFontWeight, u.anchor = a.messageAlign, u.valign = "center", u.textMargin = a.wrapPadding, u.tspan = !1, Tt(t, u);
|
|
1607
|
-
const x = y.width;
|
|
1608
|
-
let m;
|
|
1609
|
-
s === n ? a.rightAngles ? m = t.append("path").attr(
|
|
1610
|
-
"d",
|
|
1611
|
-
`M ${s},${r} H ${s + w.getMax(a.width / 2, x / 2)} V ${r + 25} H ${s}`
|
|
1612
|
-
) : m = t.append("path").attr(
|
|
1613
|
-
"d",
|
|
1614
|
-
"M " + s + "," + r + " C " + (s + 60) + "," + (r - 10) + " " + (s + 60) + "," + (r + 30) + " " + s + "," + (r + 20)
|
|
1615
|
-
) : (m = t.append("line"), m.attr("x1", s), m.attr("y1", r), m.attr("x2", n), m.attr("y2", r)), p === i.db.LINETYPE.DOTTED || p === i.db.LINETYPE.DOTTED_CROSS || p === i.db.LINETYPE.DOTTED_POINT || p === i.db.LINETYPE.DOTTED_OPEN ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
|
|
1616
|
-
let L = "";
|
|
1617
|
-
a.arrowMarkerAbsolute && (L = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, L = L.replace(/\(/g, "\\("), L = L.replace(/\)/g, "\\)")), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (p === i.db.LINETYPE.SOLID || p === i.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + L + "#arrowhead)"), (p === i.db.LINETYPE.SOLID_POINT || p === i.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + L + "#filled-head)"), (p === i.db.LINETYPE.SOLID_CROSS || p === i.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + L + "#crosshead)"), (T || a.showSequenceNumbers) && (m.attr("marker-start", "url(" + L + "#sequencenumber)"), t.append("text").attr("x", s).attr("y", r + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(d));
|
|
1618
|
-
}, qt = function(t, e, r, i, s, n, c) {
|
|
1619
|
-
if (s.hideUnusedParticipants === !0) {
|
|
1620
|
-
const y = /* @__PURE__ */ new Set();
|
|
1621
|
-
n.forEach((u) => {
|
|
1622
|
-
y.add(u.from), y.add(u.to);
|
|
1623
|
-
}), r = r.filter((u) => y.has(u));
|
|
1624
|
-
}
|
|
1625
|
-
let l = 0, p = 0, d = 0, T;
|
|
1626
|
-
for (const y of r) {
|
|
1627
|
-
const u = e[y], x = u.box;
|
|
1628
|
-
T && T != x && (c || f.models.addBox(T), p += a.boxMargin + T.margin), x && x != T && (c || (x.x = l + p, x.y = i), p += x.margin), u.width = u.width || a.width, u.height = w.getMax(u.height || a.height, a.height), u.margin = u.margin || a.actorMargin, u.x = l + p, u.y = f.getVerticalPos();
|
|
1629
|
-
const m = D.drawActor(t, u, a, c);
|
|
1630
|
-
d = w.getMax(d, m), f.insert(u.x, i, u.x + u.width, u.height), l += u.width + p, u.box && (u.box.width = l + x.margin - u.box.x), p = u.margin, T = u.box, f.models.addActor(u);
|
|
1631
|
-
}
|
|
1632
|
-
T && !c && f.models.addBox(T), f.bumpVerticalPos(d);
|
|
1633
|
-
}, fe = function(t, e, r, i) {
|
|
1634
|
-
let s = 0, n = 0;
|
|
1635
|
-
for (const c of r) {
|
|
1636
|
-
const l = e[c], p = V0(l), d = D.drawPopup(
|
|
1637
|
-
t,
|
|
1638
|
-
l,
|
|
1639
|
-
p,
|
|
1640
|
-
a,
|
|
1641
|
-
a.forceMenus,
|
|
1642
|
-
i
|
|
1643
|
-
);
|
|
1644
|
-
d.height > s && (s = d.height), d.width + l.x > n && (n = d.width + l.x);
|
|
1645
|
-
}
|
|
1646
|
-
return { maxHeight: s, maxWidth: n };
|
|
1647
|
-
}, ge = function(t) {
|
|
1648
|
-
Ie(a, t), t.fontFamily && (a.actorFontFamily = a.noteFontFamily = a.messageFontFamily = t.fontFamily), t.fontSize && (a.actorFontSize = a.noteFontSize = a.messageFontSize = t.fontSize), t.fontWeight && (a.actorFontWeight = a.noteFontWeight = a.messageFontWeight = t.fontWeight);
|
|
1649
|
-
}, At = function(t) {
|
|
1650
|
-
return f.activations.filter(function(e) {
|
|
1651
|
-
return e.actor === t;
|
|
1652
|
-
});
|
|
1653
|
-
}, $t = function(t, e) {
|
|
1654
|
-
const r = e[t], i = At(t), s = i.reduce(function(c, l) {
|
|
1655
|
-
return w.getMin(c, l.startx);
|
|
1656
|
-
}, r.x + r.width / 2), n = i.reduce(function(c, l) {
|
|
1657
|
-
return w.getMax(c, l.stopx);
|
|
1658
|
-
}, r.x + r.width / 2);
|
|
1659
|
-
return [s, n];
|
|
1660
|
-
};
|
|
1661
|
-
function tt(t, e, r, i, s) {
|
|
1662
|
-
f.bumpVerticalPos(r);
|
|
1663
|
-
let n = i;
|
|
1664
|
-
if (e.id && e.message && t[e.id]) {
|
|
1665
|
-
const c = t[e.id].width, l = ut(a);
|
|
1666
|
-
e.message = C.wrapLabel(`[${e.message}]`, c - 2 * a.wrapPadding, l), e.width = c, e.wrap = !0;
|
|
1667
|
-
const p = C.calculateTextDimensions(e.message, l), d = w.getMax(p.height, a.labelBoxHeight);
|
|
1668
|
-
n = i + d, K.debug(`${d} - ${e.message}`);
|
|
1669
|
-
}
|
|
1670
|
-
s(e), f.bumpVerticalPos(n);
|
|
1671
|
-
}
|
|
1672
|
-
const R0 = function(t, e, r, i) {
|
|
1673
|
-
const { securityLevel: s, sequence: n } = lt();
|
|
1674
|
-
a = n, i.db.clear(), i.parser.parse(t);
|
|
1675
|
-
let c;
|
|
1676
|
-
s === "sandbox" && (c = Pt("#i" + e));
|
|
1677
|
-
const l = s === "sandbox" ? Pt(c.nodes()[0].contentDocument.body) : Pt("body"), p = s === "sandbox" ? c.nodes()[0].contentDocument : document;
|
|
1678
|
-
f.init(), K.debug(i.db);
|
|
1679
|
-
const d = s === "sandbox" ? l.select(`[id="${e}"]`) : Pt(`[id="${e}"]`), T = i.db.getActors(), y = i.db.getBoxes(), u = i.db.getActorKeys(), x = i.db.getMessages(), m = i.db.getDiagramTitle(), L = i.db.hasAtLeastOneBox(), A = i.db.hasAtLeastOneBoxWithTitle(), M = D0(T, x, i);
|
|
1680
|
-
a.height = C0(T, M, y), D.insertComputerIcon(d), D.insertDatabaseIcon(d), D.insertClockIcon(d), L && (f.bumpVerticalPos(a.boxMargin), A && f.bumpVerticalPos(y[0].textMaxHeight)), qt(d, T, u, 0, a, x, !1);
|
|
1681
|
-
const I = Y0(x, T, M, i);
|
|
1682
|
-
D.insertArrowHead(d), D.insertArrowCrossHead(d), D.insertArrowFilledHead(d), D.insertSequenceNumber(d);
|
|
1683
|
-
function Y(v, E) {
|
|
1684
|
-
const j = f.endActivation(v);
|
|
1685
|
-
j.starty + 18 > E && (j.starty = E - 6, E += 12), D.drawActivation(
|
|
1686
|
-
d,
|
|
1687
|
-
j,
|
|
1688
|
-
E,
|
|
1689
|
-
a,
|
|
1690
|
-
At(v.from.actor).length
|
|
1691
|
-
), f.insert(j.startx, E - 10, j.stopx, E);
|
|
1692
|
-
}
|
|
1693
|
-
let V = 1, H = 1;
|
|
1694
|
-
const G = [];
|
|
1695
|
-
x.forEach(function(v) {
|
|
1696
|
-
let E, j, k;
|
|
1697
|
-
switch (v.type) {
|
|
1698
|
-
case i.db.LINETYPE.NOTE:
|
|
1699
|
-
f.resetVerticalPos(), j = v.noteModel, A0(d, j);
|
|
1700
|
-
break;
|
|
1701
|
-
case i.db.LINETYPE.ACTIVE_START:
|
|
1702
|
-
f.newActivation(v, d, T);
|
|
1703
|
-
break;
|
|
1704
|
-
case i.db.LINETYPE.ACTIVE_END:
|
|
1705
|
-
Y(v, f.getVerticalPos());
|
|
1706
|
-
break;
|
|
1707
|
-
case i.db.LINETYPE.LOOP_START:
|
|
1708
|
-
tt(
|
|
1709
|
-
I,
|
|
1710
|
-
v,
|
|
1711
|
-
a.boxMargin,
|
|
1712
|
-
a.boxMargin + a.boxTextMargin,
|
|
1713
|
-
(N) => f.newLoop(N)
|
|
1714
|
-
);
|
|
1715
|
-
break;
|
|
1716
|
-
case i.db.LINETYPE.LOOP_END:
|
|
1717
|
-
E = f.endLoop(), D.drawLoop(d, E, "loop", a), f.bumpVerticalPos(E.stopy - f.getVerticalPos()), f.models.addLoop(E);
|
|
1718
|
-
break;
|
|
1719
|
-
case i.db.LINETYPE.RECT_START:
|
|
1720
|
-
tt(
|
|
1721
|
-
I,
|
|
1722
|
-
v,
|
|
1723
|
-
a.boxMargin,
|
|
1724
|
-
a.boxMargin,
|
|
1725
|
-
(N) => f.newLoop(void 0, N.message)
|
|
1726
|
-
);
|
|
1727
|
-
break;
|
|
1728
|
-
case i.db.LINETYPE.RECT_END:
|
|
1729
|
-
E = f.endLoop(), D.drawBackgroundRect(d, E), f.models.addLoop(E), f.bumpVerticalPos(E.stopy - f.getVerticalPos());
|
|
1730
|
-
break;
|
|
1731
|
-
case i.db.LINETYPE.OPT_START:
|
|
1732
|
-
tt(
|
|
1733
|
-
I,
|
|
1734
|
-
v,
|
|
1735
|
-
a.boxMargin,
|
|
1736
|
-
a.boxMargin + a.boxTextMargin,
|
|
1737
|
-
(N) => f.newLoop(N)
|
|
1738
|
-
);
|
|
1739
|
-
break;
|
|
1740
|
-
case i.db.LINETYPE.OPT_END:
|
|
1741
|
-
E = f.endLoop(), D.drawLoop(d, E, "opt", a), f.bumpVerticalPos(E.stopy - f.getVerticalPos()), f.models.addLoop(E);
|
|
1742
|
-
break;
|
|
1743
|
-
case i.db.LINETYPE.ALT_START:
|
|
1744
|
-
tt(
|
|
1745
|
-
I,
|
|
1746
|
-
v,
|
|
1747
|
-
a.boxMargin,
|
|
1748
|
-
a.boxMargin + a.boxTextMargin,
|
|
1749
|
-
(N) => f.newLoop(N)
|
|
1750
|
-
);
|
|
1751
|
-
break;
|
|
1752
|
-
case i.db.LINETYPE.ALT_ELSE:
|
|
1753
|
-
tt(
|
|
1754
|
-
I,
|
|
1755
|
-
v,
|
|
1756
|
-
a.boxMargin + a.boxTextMargin,
|
|
1757
|
-
a.boxMargin,
|
|
1758
|
-
(N) => f.addSectionToLoop(N)
|
|
1759
|
-
);
|
|
1760
|
-
break;
|
|
1761
|
-
case i.db.LINETYPE.ALT_END:
|
|
1762
|
-
E = f.endLoop(), D.drawLoop(d, E, "alt", a), f.bumpVerticalPos(E.stopy - f.getVerticalPos()), f.models.addLoop(E);
|
|
1763
|
-
break;
|
|
1764
|
-
case i.db.LINETYPE.PAR_START:
|
|
1765
|
-
case i.db.LINETYPE.PAR_OVER_START:
|
|
1766
|
-
tt(
|
|
1767
|
-
I,
|
|
1768
|
-
v,
|
|
1769
|
-
a.boxMargin,
|
|
1770
|
-
a.boxMargin + a.boxTextMargin,
|
|
1771
|
-
(N) => f.newLoop(N)
|
|
1772
|
-
), f.saveVerticalPos();
|
|
1773
|
-
break;
|
|
1774
|
-
case i.db.LINETYPE.PAR_AND:
|
|
1775
|
-
tt(
|
|
1776
|
-
I,
|
|
1777
|
-
v,
|
|
1778
|
-
a.boxMargin + a.boxTextMargin,
|
|
1779
|
-
a.boxMargin,
|
|
1780
|
-
(N) => f.addSectionToLoop(N)
|
|
1781
|
-
);
|
|
1782
|
-
break;
|
|
1783
|
-
case i.db.LINETYPE.PAR_END:
|
|
1784
|
-
E = f.endLoop(), D.drawLoop(d, E, "par", a), f.bumpVerticalPos(E.stopy - f.getVerticalPos()), f.models.addLoop(E);
|
|
1785
|
-
break;
|
|
1786
|
-
case i.db.LINETYPE.AUTONUMBER:
|
|
1787
|
-
V = v.message.start || V, H = v.message.step || H, v.message.visible ? i.db.enableSequenceNumbers() : i.db.disableSequenceNumbers();
|
|
1788
|
-
break;
|
|
1789
|
-
case i.db.LINETYPE.CRITICAL_START:
|
|
1790
|
-
tt(
|
|
1791
|
-
I,
|
|
1792
|
-
v,
|
|
1793
|
-
a.boxMargin,
|
|
1794
|
-
a.boxMargin + a.boxTextMargin,
|
|
1795
|
-
(N) => f.newLoop(N)
|
|
1796
|
-
);
|
|
1797
|
-
break;
|
|
1798
|
-
case i.db.LINETYPE.CRITICAL_OPTION:
|
|
1799
|
-
tt(
|
|
1800
|
-
I,
|
|
1801
|
-
v,
|
|
1802
|
-
a.boxMargin + a.boxTextMargin,
|
|
1803
|
-
a.boxMargin,
|
|
1804
|
-
(N) => f.addSectionToLoop(N)
|
|
1805
|
-
);
|
|
1806
|
-
break;
|
|
1807
|
-
case i.db.LINETYPE.CRITICAL_END:
|
|
1808
|
-
E = f.endLoop(), D.drawLoop(d, E, "critical", a), f.bumpVerticalPos(E.stopy - f.getVerticalPos()), f.models.addLoop(E);
|
|
1809
|
-
break;
|
|
1810
|
-
case i.db.LINETYPE.BREAK_START:
|
|
1811
|
-
tt(
|
|
1812
|
-
I,
|
|
1813
|
-
v,
|
|
1814
|
-
a.boxMargin,
|
|
1815
|
-
a.boxMargin + a.boxTextMargin,
|
|
1816
|
-
(N) => f.newLoop(N)
|
|
1817
|
-
);
|
|
1818
|
-
break;
|
|
1819
|
-
case i.db.LINETYPE.BREAK_END:
|
|
1820
|
-
E = f.endLoop(), D.drawLoop(d, E, "break", a), f.bumpVerticalPos(E.stopy - f.getVerticalPos()), f.models.addLoop(E);
|
|
1821
|
-
break;
|
|
1822
|
-
default:
|
|
1823
|
-
try {
|
|
1824
|
-
f.resetVerticalPos(), k = v.msgModel, k.starty = f.getVerticalPos(), k.sequenceIndex = V, k.sequenceVisible = i.db.showSequenceNumbers();
|
|
1825
|
-
const N = S0(d, k);
|
|
1826
|
-
G.push({ messageModel: k, lineStartY: N }), f.models.addMessage(k);
|
|
1827
|
-
} catch (N) {
|
|
1828
|
-
K.error("error while drawing message", N);
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
[
|
|
1832
|
-
i.db.LINETYPE.SOLID_OPEN,
|
|
1833
|
-
i.db.LINETYPE.DOTTED_OPEN,
|
|
1834
|
-
i.db.LINETYPE.SOLID,
|
|
1835
|
-
i.db.LINETYPE.DOTTED,
|
|
1836
|
-
i.db.LINETYPE.SOLID_CROSS,
|
|
1837
|
-
i.db.LINETYPE.DOTTED_CROSS,
|
|
1838
|
-
i.db.LINETYPE.SOLID_POINT,
|
|
1839
|
-
i.db.LINETYPE.DOTTED_POINT
|
|
1840
|
-
].includes(v.type) && (V = V + H);
|
|
1841
|
-
}), G.forEach((v) => M0(d, v.messageModel, v.lineStartY, i)), a.mirrorActors && (f.bumpVerticalPos(a.boxMargin * 2), qt(d, T, u, f.getVerticalPos(), a, x, !0), f.bumpVerticalPos(a.boxMargin), de(d, f.getVerticalPos())), f.models.boxes.forEach(function(v) {
|
|
1842
|
-
v.height = f.getVerticalPos() - v.y, f.insert(v.x, v.y, v.x + v.width, v.height), v.startx = v.x, v.starty = v.y, v.stopx = v.startx + v.width, v.stopy = v.starty + v.height, v.stroke = "rgb(0,0,0, 0.5)", D.drawBox(d, v, a);
|
|
1843
|
-
}), L && f.bumpVerticalPos(a.boxMargin);
|
|
1844
|
-
const W = fe(d, T, u, p), { bounds: O } = f.getBounds();
|
|
1845
|
-
K.debug("For line height fix Querying: #" + e + " .actor-line"), Ce("#" + e + " .actor-line").attr("y2", O.stopy);
|
|
1846
|
-
let F = O.stopy - O.starty;
|
|
1847
|
-
F < W.maxHeight && (F = W.maxHeight);
|
|
1848
|
-
let q = F + 2 * a.diagramMarginY;
|
|
1849
|
-
a.mirrorActors && (q = q - a.boxMargin + a.bottomMarginAdj);
|
|
1850
|
-
let U = O.stopx - O.startx;
|
|
1851
|
-
U < W.maxWidth && (U = W.maxWidth);
|
|
1852
|
-
const J = U + 2 * a.diagramMarginX;
|
|
1853
|
-
m && d.append("text").text(m).attr("x", (O.stopx - O.startx) / 2 - 2 * a.diagramMarginX).attr("y", -25), Ne(d, q, J, a.useMaxWidth);
|
|
1854
|
-
const Z = m ? 40 : 0;
|
|
1855
|
-
d.attr(
|
|
1856
|
-
"viewBox",
|
|
1857
|
-
O.startx - a.diagramMarginX + " -" + (a.diagramMarginY + Z) + " " + J + " " + (q + Z)
|
|
1858
|
-
), K.debug("models:", f.models);
|
|
1859
|
-
};
|
|
1860
|
-
function D0(t, e, r) {
|
|
1861
|
-
const i = {};
|
|
1862
|
-
return e.forEach(function(s) {
|
|
1863
|
-
if (t[s.to] && t[s.from]) {
|
|
1864
|
-
const n = t[s.to];
|
|
1865
|
-
if (s.placement === r.db.PLACEMENT.LEFTOF && !n.prevActor || s.placement === r.db.PLACEMENT.RIGHTOF && !n.nextActor)
|
|
1866
|
-
return;
|
|
1867
|
-
const c = s.placement !== void 0, l = !c, p = c ? gt(a) : ut(a), d = s.wrap ? C.wrapLabel(s.message, a.width - 2 * a.wrapPadding, p) : s.message, y = C.calculateTextDimensions(d, p).width + 2 * a.wrapPadding;
|
|
1868
|
-
l && s.from === n.nextActor ? i[s.to] = w.getMax(
|
|
1869
|
-
i[s.to] || 0,
|
|
1870
|
-
y
|
|
1871
|
-
) : l && s.from === n.prevActor ? i[s.from] = w.getMax(
|
|
1872
|
-
i[s.from] || 0,
|
|
1873
|
-
y
|
|
1874
|
-
) : l && s.from === s.to ? (i[s.from] = w.getMax(
|
|
1875
|
-
i[s.from] || 0,
|
|
1876
|
-
y / 2
|
|
1877
|
-
), i[s.to] = w.getMax(
|
|
1878
|
-
i[s.to] || 0,
|
|
1879
|
-
y / 2
|
|
1880
|
-
)) : s.placement === r.db.PLACEMENT.RIGHTOF ? i[s.from] = w.getMax(
|
|
1881
|
-
i[s.from] || 0,
|
|
1882
|
-
y
|
|
1883
|
-
) : s.placement === r.db.PLACEMENT.LEFTOF ? i[n.prevActor] = w.getMax(
|
|
1884
|
-
i[n.prevActor] || 0,
|
|
1885
|
-
y
|
|
1886
|
-
) : s.placement === r.db.PLACEMENT.OVER && (n.prevActor && (i[n.prevActor] = w.getMax(
|
|
1887
|
-
i[n.prevActor] || 0,
|
|
1888
|
-
y / 2
|
|
1889
|
-
)), n.nextActor && (i[s.from] = w.getMax(
|
|
1890
|
-
i[s.from] || 0,
|
|
1891
|
-
y / 2
|
|
1892
|
-
)));
|
|
1893
|
-
}
|
|
1894
|
-
}), K.debug("maxMessageWidthPerActor:", i), i;
|
|
1895
|
-
}
|
|
1896
|
-
const V0 = function(t) {
|
|
1897
|
-
let e = 0;
|
|
1898
|
-
const r = Wt(a);
|
|
1899
|
-
for (const i in t.links) {
|
|
1900
|
-
const n = C.calculateTextDimensions(i, r).width + 2 * a.wrapPadding + 2 * a.boxMargin;
|
|
1901
|
-
e < n && (e = n);
|
|
1902
|
-
}
|
|
1903
|
-
return e;
|
|
1904
|
-
};
|
|
1905
|
-
function C0(t, e, r) {
|
|
1906
|
-
let i = 0;
|
|
1907
|
-
Object.keys(t).forEach((n) => {
|
|
1908
|
-
const c = t[n];
|
|
1909
|
-
c.wrap && (c.description = C.wrapLabel(
|
|
1910
|
-
c.description,
|
|
1911
|
-
a.width - 2 * a.wrapPadding,
|
|
1912
|
-
Wt(a)
|
|
1913
|
-
));
|
|
1914
|
-
const l = C.calculateTextDimensions(c.description, Wt(a));
|
|
1915
|
-
c.width = c.wrap ? a.width : w.getMax(a.width, l.width + 2 * a.wrapPadding), c.height = c.wrap ? w.getMax(l.height, a.height) : a.height, i = w.getMax(i, c.height);
|
|
1916
|
-
});
|
|
1917
|
-
for (const n in e) {
|
|
1918
|
-
const c = t[n];
|
|
1919
|
-
if (!c)
|
|
1920
|
-
continue;
|
|
1921
|
-
const l = t[c.nextActor];
|
|
1922
|
-
if (!l) {
|
|
1923
|
-
const y = e[n] + a.actorMargin - c.width / 2;
|
|
1924
|
-
c.margin = w.getMax(y, a.actorMargin);
|
|
1925
|
-
continue;
|
|
1926
|
-
}
|
|
1927
|
-
const d = e[n] + a.actorMargin - c.width / 2 - l.width / 2;
|
|
1928
|
-
c.margin = w.getMax(d, a.actorMargin);
|
|
1929
|
-
}
|
|
1930
|
-
let s = 0;
|
|
1931
|
-
return r.forEach((n) => {
|
|
1932
|
-
const c = ut(a);
|
|
1933
|
-
let l = n.actorKeys.reduce((T, y) => T += t[y].width + (t[y].margin || 0), 0);
|
|
1934
|
-
l -= 2 * a.boxTextMargin, n.wrap && (n.name = C.wrapLabel(n.name, l - 2 * a.wrapPadding, c));
|
|
1935
|
-
const p = C.calculateTextDimensions(n.name, c);
|
|
1936
|
-
s = w.getMax(p.height, s);
|
|
1937
|
-
const d = w.getMax(l, p.width + 2 * a.wrapPadding);
|
|
1938
|
-
if (n.margin = a.boxTextMargin, l < d) {
|
|
1939
|
-
const T = (d - l) / 2;
|
|
1940
|
-
n.margin += T;
|
|
1941
|
-
}
|
|
1942
|
-
}), r.forEach((n) => n.textMaxHeight = s), w.getMax(i, a.height);
|
|
1943
|
-
}
|
|
1944
|
-
const O0 = function(t, e, r) {
|
|
1945
|
-
const i = e[t.from].x, s = e[t.to].x, n = t.wrap && t.message;
|
|
1946
|
-
let c = C.calculateTextDimensions(
|
|
1947
|
-
n ? C.wrapLabel(t.message, a.width, gt(a)) : t.message,
|
|
1948
|
-
gt(a)
|
|
1949
|
-
);
|
|
1950
|
-
const l = {
|
|
1951
|
-
width: n ? a.width : w.getMax(a.width, c.width + 2 * a.noteMargin),
|
|
1952
|
-
height: 0,
|
|
1953
|
-
startx: e[t.from].x,
|
|
1954
|
-
stopx: 0,
|
|
1955
|
-
starty: 0,
|
|
1956
|
-
stopy: 0,
|
|
1957
|
-
message: t.message
|
|
1958
|
-
};
|
|
1959
|
-
return t.placement === r.db.PLACEMENT.RIGHTOF ? (l.width = n ? w.getMax(a.width, c.width) : w.getMax(
|
|
1960
|
-
e[t.from].width / 2 + e[t.to].width / 2,
|
|
1961
|
-
c.width + 2 * a.noteMargin
|
|
1962
|
-
), l.startx = i + (e[t.from].width + a.actorMargin) / 2) : t.placement === r.db.PLACEMENT.LEFTOF ? (l.width = n ? w.getMax(a.width, c.width + 2 * a.noteMargin) : w.getMax(
|
|
1963
|
-
e[t.from].width / 2 + e[t.to].width / 2,
|
|
1964
|
-
c.width + 2 * a.noteMargin
|
|
1965
|
-
), l.startx = i - l.width + (e[t.from].width - a.actorMargin) / 2) : t.to === t.from ? (c = C.calculateTextDimensions(
|
|
1966
|
-
n ? C.wrapLabel(
|
|
1967
|
-
t.message,
|
|
1968
|
-
w.getMax(a.width, e[t.from].width),
|
|
1969
|
-
gt(a)
|
|
1970
|
-
) : t.message,
|
|
1971
|
-
gt(a)
|
|
1972
|
-
), l.width = n ? w.getMax(a.width, e[t.from].width) : w.getMax(
|
|
1973
|
-
e[t.from].width,
|
|
1974
|
-
a.width,
|
|
1975
|
-
c.width + 2 * a.noteMargin
|
|
1976
|
-
), l.startx = i + (e[t.from].width - l.width) / 2) : (l.width = Math.abs(i + e[t.from].width / 2 - (s + e[t.to].width / 2)) + a.actorMargin, l.startx = i < s ? i + e[t.from].width / 2 - a.actorMargin / 2 : s + e[t.to].width / 2 - a.actorMargin / 2), n && (l.message = C.wrapLabel(
|
|
1977
|
-
t.message,
|
|
1978
|
-
l.width - 2 * a.wrapPadding,
|
|
1979
|
-
gt(a)
|
|
1980
|
-
)), K.debug(
|
|
1981
|
-
`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`
|
|
1982
|
-
), l;
|
|
1983
|
-
}, B0 = function(t, e, r) {
|
|
1984
|
-
let i = !1;
|
|
1985
|
-
if ([
|
|
1986
|
-
r.db.LINETYPE.SOLID_OPEN,
|
|
1987
|
-
r.db.LINETYPE.DOTTED_OPEN,
|
|
1988
|
-
r.db.LINETYPE.SOLID,
|
|
1989
|
-
r.db.LINETYPE.DOTTED,
|
|
1990
|
-
r.db.LINETYPE.SOLID_CROSS,
|
|
1991
|
-
r.db.LINETYPE.DOTTED_CROSS,
|
|
1992
|
-
r.db.LINETYPE.SOLID_POINT,
|
|
1993
|
-
r.db.LINETYPE.DOTTED_POINT
|
|
1994
|
-
].includes(t.type) && (i = !0), !i)
|
|
1995
|
-
return {};
|
|
1996
|
-
const s = $t(t.from, e), n = $t(t.to, e), c = s[0] <= n[0] ? 1 : 0, l = s[0] < n[0] ? 0 : 1, p = [...s, ...n], d = Math.abs(n[l] - s[c]);
|
|
1997
|
-
t.wrap && t.message && (t.message = C.wrapLabel(
|
|
1998
|
-
t.message,
|
|
1999
|
-
w.getMax(d + 2 * a.wrapPadding, a.width),
|
|
2000
|
-
ut(a)
|
|
2001
|
-
));
|
|
2002
|
-
const T = C.calculateTextDimensions(t.message, ut(a));
|
|
2003
|
-
return {
|
|
2004
|
-
width: w.getMax(
|
|
2005
|
-
t.wrap ? 0 : T.width + 2 * a.wrapPadding,
|
|
2006
|
-
d + 2 * a.wrapPadding,
|
|
2007
|
-
a.width
|
|
2008
|
-
),
|
|
2009
|
-
height: 0,
|
|
2010
|
-
startx: s[c],
|
|
2011
|
-
stopx: n[l],
|
|
2012
|
-
starty: 0,
|
|
2013
|
-
stopy: 0,
|
|
2014
|
-
message: t.message,
|
|
2015
|
-
type: t.type,
|
|
2016
|
-
wrap: t.wrap,
|
|
2017
|
-
fromBounds: Math.min.apply(null, p),
|
|
2018
|
-
toBounds: Math.max.apply(null, p)
|
|
2019
|
-
};
|
|
2020
|
-
}, Y0 = function(t, e, r, i) {
|
|
2021
|
-
const s = {}, n = [];
|
|
2022
|
-
let c, l, p;
|
|
2023
|
-
return t.forEach(function(d) {
|
|
2024
|
-
switch (d.id = C.random({ length: 10 }), d.type) {
|
|
2025
|
-
case i.db.LINETYPE.LOOP_START:
|
|
2026
|
-
case i.db.LINETYPE.ALT_START:
|
|
2027
|
-
case i.db.LINETYPE.OPT_START:
|
|
2028
|
-
case i.db.LINETYPE.PAR_START:
|
|
2029
|
-
case i.db.LINETYPE.PAR_OVER_START:
|
|
2030
|
-
case i.db.LINETYPE.CRITICAL_START:
|
|
2031
|
-
case i.db.LINETYPE.BREAK_START:
|
|
2032
|
-
n.push({
|
|
2033
|
-
id: d.id,
|
|
2034
|
-
msg: d.message,
|
|
2035
|
-
from: Number.MAX_SAFE_INTEGER,
|
|
2036
|
-
to: Number.MIN_SAFE_INTEGER,
|
|
2037
|
-
width: 0
|
|
2038
|
-
});
|
|
2039
|
-
break;
|
|
2040
|
-
case i.db.LINETYPE.ALT_ELSE:
|
|
2041
|
-
case i.db.LINETYPE.PAR_AND:
|
|
2042
|
-
case i.db.LINETYPE.CRITICAL_OPTION:
|
|
2043
|
-
d.message && (c = n.pop(), s[c.id] = c, s[d.id] = c, n.push(c));
|
|
2044
|
-
break;
|
|
2045
|
-
case i.db.LINETYPE.LOOP_END:
|
|
2046
|
-
case i.db.LINETYPE.ALT_END:
|
|
2047
|
-
case i.db.LINETYPE.OPT_END:
|
|
2048
|
-
case i.db.LINETYPE.PAR_END:
|
|
2049
|
-
case i.db.LINETYPE.CRITICAL_END:
|
|
2050
|
-
case i.db.LINETYPE.BREAK_END:
|
|
2051
|
-
c = n.pop(), s[c.id] = c;
|
|
2052
|
-
break;
|
|
2053
|
-
case i.db.LINETYPE.ACTIVE_START:
|
|
2054
|
-
{
|
|
2055
|
-
const y = e[d.from ? d.from.actor : d.to.actor], u = At(d.from ? d.from.actor : d.to.actor).length, x = y.x + y.width / 2 + (u - 1) * a.activationWidth / 2, m = {
|
|
2056
|
-
startx: x,
|
|
2057
|
-
stopx: x + a.activationWidth,
|
|
2058
|
-
actor: d.from.actor,
|
|
2059
|
-
enabled: !0
|
|
2060
|
-
};
|
|
2061
|
-
f.activations.push(m);
|
|
2062
|
-
}
|
|
2063
|
-
break;
|
|
2064
|
-
case i.db.LINETYPE.ACTIVE_END:
|
|
2065
|
-
{
|
|
2066
|
-
const y = f.activations.map((u) => u.actor).lastIndexOf(d.from.actor);
|
|
2067
|
-
delete f.activations.splice(y, 1)[0];
|
|
2068
|
-
}
|
|
2069
|
-
break;
|
|
2070
|
-
}
|
|
2071
|
-
d.placement !== void 0 ? (l = O0(d, e, i), d.noteModel = l, n.forEach((y) => {
|
|
2072
|
-
c = y, c.from = w.getMin(c.from, l.startx), c.to = w.getMax(c.to, l.startx + l.width), c.width = w.getMax(c.width, Math.abs(c.from - c.to)) - a.labelBoxWidth;
|
|
2073
|
-
})) : (p = B0(d, e, i), d.msgModel = p, p.startx && p.stopx && n.length > 0 && n.forEach((y) => {
|
|
2074
|
-
if (c = y, p.startx === p.stopx) {
|
|
2075
|
-
const u = e[d.from], x = e[d.to];
|
|
2076
|
-
c.from = w.getMin(
|
|
2077
|
-
u.x - p.width / 2,
|
|
2078
|
-
u.x - u.width / 2,
|
|
2079
|
-
c.from
|
|
2080
|
-
), c.to = w.getMax(
|
|
2081
|
-
x.x + p.width / 2,
|
|
2082
|
-
x.x + u.width / 2,
|
|
2083
|
-
c.to
|
|
2084
|
-
), c.width = w.getMax(c.width, Math.abs(c.to - c.from)) - a.labelBoxWidth;
|
|
2085
|
-
} else
|
|
2086
|
-
c.from = w.getMin(p.startx, c.from), c.to = w.getMax(p.stopx, c.to), c.width = w.getMax(c.width, p.width) - a.labelBoxWidth;
|
|
2087
|
-
}));
|
|
2088
|
-
}), f.activations = [], K.debug("Loop type widths:", s), s;
|
|
2089
|
-
}, F0 = {
|
|
2090
|
-
bounds: f,
|
|
2091
|
-
drawActors: qt,
|
|
2092
|
-
drawActorsPopup: fe,
|
|
2093
|
-
setConf: ge,
|
|
2094
|
-
draw: R0
|
|
2095
|
-
}, H0 = {
|
|
2096
|
-
parser: Oe,
|
|
2097
|
-
db: r0,
|
|
2098
|
-
renderer: F0,
|
|
2099
|
-
styles: c0
|
|
2100
|
-
};
|
|
2101
|
-
export {
|
|
2102
|
-
H0 as diagram
|
|
2103
|
-
};
|