mermaid
Version:
Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.
1,112 lines (1,092 loc) • 104 kB
JavaScript
import { g as me, A as we, z as _e, c as lt, s as te, b as ke, a as Le, m as Pe, B as Ie, l as K, d as It, e as ee, f as _, T as ne, a2 as Ne, h as ve, j as Pt, k as Ae, x as C } from "./mermaid-9357f3d0.js";
import { d as Se, a as Me, b as Re, c as De, e as zt, g as Nt } from "./svgDrawCommon-7d467860.js";
import { s as Ve } from "./selectAll-9c9e0fdb.js";
var Bt = function() {
var t = function(ot, b, k, P) {
for (k = k || {}, P = ot.length; P--; k[ot[P]] = b)
;
return k;
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], s = [2, 5], c = [1, 15], l = [1, 17], u = [1, 19], d = [1, 21], T = [1, 22], y = [1, 23], p = [1, 29], x = [1, 30], w = [1, 31], I = [1, 32], A = [1, 33], M = [1, 34], N = [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], Q = [1, 49], m = [1, 50], E = [1, 51], j = [1, 54], L = [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], v = [4, 5, 21, 55, 57], wt = [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], nt = [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 = {
trace: function() {
},
yy: {},
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 },
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" },
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]],
performAction: function(b, k, P, g, S, o, yt) {
var h = o.length - 1;
switch (S) {
case 4:
return g.apply(o[h]), o[h];
case 5:
case 10:
this.$ = [];
break;
case 6:
case 11:
o[h - 1].push(o[h]), this.$ = o[h - 1];
break;
case 7:
case 8:
case 12:
case 13:
this.$ = o[h];
break;
case 9:
case 14:
this.$ = [];
break;
case 18:
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];
break;
case 20:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(o[h - 2]), sequenceIndexStep: Number(o[h - 1]), sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
break;
case 21:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(o[h - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
break;
case 22:
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: g.LINETYPE.AUTONUMBER };
break;
case 23:
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
break;
case 24:
this.$ = { type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: o[h - 1] };
break;
case 25:
this.$ = { type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: o[h - 1] };
break;
case 31:
g.setDiagramTitle(o[h].substring(6)), this.$ = o[h].substring(6);
break;
case 32:
g.setDiagramTitle(o[h].substring(7)), this.$ = o[h].substring(7);
break;
case 33:
this.$ = o[h].trim(), g.setAccTitle(this.$);
break;
case 34:
case 35:
this.$ = o[h].trim(), g.setAccDescription(this.$);
break;
case 36:
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];
break;
case 37:
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];
break;
case 38:
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];
break;
case 39:
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];
break;
case 40:
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];
break;
case 41:
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];
break;
case 42:
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];
break;
case 43:
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];
break;
case 46:
this.$ = o[h - 3].concat([{ type: "option", optionText: g.parseMessage(o[h - 1]), signalType: g.LINETYPE.CRITICAL_OPTION }, o[h]]);
break;
case 48:
this.$ = o[h - 3].concat([{ type: "and", parText: g.parseMessage(o[h - 1]), signalType: g.LINETYPE.PAR_AND }, o[h]]);
break;
case 50:
this.$ = o[h - 3].concat([{ type: "else", altText: g.parseMessage(o[h - 1]), signalType: g.LINETYPE.ALT_ELSE }, o[h]]);
break;
case 51:
o[h - 3].type = "addParticipant", o[h - 3].description = g.parseMessage(o[h - 1]), this.$ = o[h - 3];
break;
case 52:
o[h - 1].type = "addParticipant", this.$ = o[h - 1];
break;
case 53:
o[h - 3].type = "addActor", o[h - 3].description = g.parseMessage(o[h - 1]), this.$ = o[h - 3];
break;
case 54:
o[h - 1].type = "addActor", this.$ = o[h - 1];
break;
case 55:
this.$ = [o[h - 1], { type: "addNote", placement: o[h - 2], actor: o[h - 1].actor, text: o[h] }];
break;
case 56:
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] }];
break;
case 57:
this.$ = [o[h - 1], { type: "addLinks", actor: o[h - 1].actor, text: o[h] }];
break;
case 58:
this.$ = [o[h - 1], { type: "addALink", actor: o[h - 1].actor, text: o[h] }];
break;
case 59:
this.$ = [o[h - 1], { type: "addProperties", actor: o[h - 1].actor, text: o[h] }];
break;
case 60:
this.$ = [o[h - 1], { type: "addDetails", actor: o[h - 1].actor, text: o[h] }];
break;
case 63:
this.$ = [o[h - 2], o[h]];
break;
case 64:
this.$ = o[h];
break;
case 65:
this.$ = g.PLACEMENT.LEFTOF;
break;
case 66:
this.$ = g.PLACEMENT.RIGHTOF;
break;
case 67:
this.$ = [
o[h - 4],
o[h - 1],
{ type: "addMessage", from: o[h - 4].actor, to: o[h - 1].actor, signalType: o[h - 3], msg: o[h] },
{ type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: o[h - 1] }
];
break;
case 68:
this.$ = [
o[h - 4],
o[h - 1],
{ type: "addMessage", from: o[h - 4].actor, to: o[h - 1].actor, signalType: o[h - 3], msg: o[h] },
{ type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: o[h - 4] }
];
break;
case 69:
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] }];
break;
case 70:
this.$ = { type: "addParticipant", actor: o[h] };
break;
case 71:
this.$ = g.LINETYPE.SOLID_OPEN;
break;
case 72:
this.$ = g.LINETYPE.DOTTED_OPEN;
break;
case 73:
this.$ = g.LINETYPE.SOLID;
break;
case 74:
this.$ = g.LINETYPE.DOTTED;
break;
case 75:
this.$ = g.LINETYPE.SOLID_CROSS;
break;
case 76:
this.$ = g.LINETYPE.DOTTED_CROSS;
break;
case 77:
this.$ = g.LINETYPE.SOLID_POINT;
break;
case 78:
this.$ = g.LINETYPE.DOTTED_POINT;
break;
case 79:
this.$ = g.parseMessage(o[h].trim().substring(1));
break;
case 80:
g.parseDirective("%%{", "open_directive");
break;
case 81:
g.parseDirective(o[h], "type_directive");
break;
case 82:
o[h] = o[h].trim().replace(/'/g, '"'), g.parseDirective(o[h], "arg_directive");
break;
case 83:
g.parseDirective("}%%", "close_directive", "sequence");
break;
}
},
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: n, 14: 6, 84: i }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: n, 14: 6, 84: i }, { 3: 9, 4: e, 5: r, 6: 4, 7: n, 14: 6, 84: i }, { 3: 10, 4: e, 5: r, 6: 4, 7: n, 14: 6, 84: i }, 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], s, { 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: u, 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Q, 66: m, 74: E, 84: i }, { 16: 52, 17: [1, 53], 87: j }, t([17, 87], [2, 81]), t(L, [2, 6]), { 6: 42, 10: 55, 13: 18, 14: 6, 19: u, 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Q, 66: m, 74: E, 84: i }, t(L, [2, 8]), t(L, [2, 9]), t(L, [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(L, [2, 31]), t(L, [2, 32]), { 37: [1, 68] }, { 39: [1, 69] }, t(L, [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(L, [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(L, [2, 7]), t(v, [2, 10], { 11: 100 }), t(L, [2, 19]), { 5: [1, 102], 24: [1, 101] }, { 5: [1, 103] }, t(L, [2, 23]), { 5: [1, 104] }, { 5: [1, 105] }, t(L, [2, 26]), t(L, [2, 27]), t(L, [2, 28]), t(L, [2, 29]), t(L, [2, 30]), t(L, [2, 33]), t(L, [2, 34]), t(wt, s, { 8: 106 }), t(wt, s, { 8: 107 }), t(wt, s, { 8: 108 }), t(Gt, s, { 45: 109, 8: 110 }), t(St, s, { 47: 111, 8: 112 }), t(St, s, { 8: 112, 47: 113 }), t(Xt, s, { 50: 114, 8: 115 }), t(wt, s, { 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: nt }, { 60: 129, 83: nt }, { 60: 130, 83: nt }, { 60: 131, 83: nt }, 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(L, [2, 21]), t(L, [2, 22]), t(L, [2, 24]), t(L, [2, 25]), { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 139], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Q, 66: m, 74: E, 84: i }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 140], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Q, 66: m, 74: E, 84: i }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 141], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Q, 66: m, 74: E, 84: i }, { 21: [1, 142] }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [2, 49], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 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: Q, 66: m, 74: E, 84: i }, { 21: [1, 144] }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [2, 47], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 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: Q, 66: m, 74: E, 84: i }, { 21: [1, 146] }, { 21: [1, 147] }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [2, 45], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 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: Q, 66: m, 74: E, 84: i }, { 4: c, 5: l, 6: 42, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 149], 22: 20, 23: d, 26: T, 27: 45, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: w, 38: I, 40: A, 41: M, 42: N, 43: Y, 44: V, 46: H, 48: G, 49: W, 51: O, 55: X, 57: F, 58: q, 63: U, 64: J, 65: Q, 66: m, 74: E, 84: i }, { 20: [1, 150] }, t(L, [2, 52]), { 20: [1, 151] }, t(L, [2, 54]), { 27: 152, 74: E }, { 27: 153, 74: E }, { 60: 154, 83: nt }, { 60: 155, 83: nt }, { 60: 156, 83: nt }, { 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(L, [2, 18]), t(v, [2, 11]), { 13: 159, 55: X, 57: F }, t(v, [2, 13]), t(v, [2, 14]), t(L, [2, 20]), t(L, [2, 36]), t(L, [2, 37]), t(L, [2, 38]), t(L, [2, 39]), { 20: [1, 160] }, t(L, [2, 40]), { 20: [1, 161] }, t(L, [2, 41]), t(L, [2, 42]), { 20: [1, 162] }, t(L, [2, 43]), { 5: [1, 163] }, { 5: [1, 164] }, { 60: 165, 83: nt }, { 60: 166, 83: nt }, { 5: [2, 69] }, { 5: [2, 55] }, { 5: [2, 56] }, { 27: 167, 74: E }, t(Jt, [2, 16]), t(v, [2, 12]), t(Gt, s, { 8: 110, 45: 168 }), t(St, s, { 8: 112, 47: 169 }), t(Xt, s, { 8: 115, 50: 170 }), t(L, [2, 51]), t(L, [2, 53]), { 5: [2, 67] }, { 5: [2, 68] }, { 83: [2, 63] }, { 21: [2, 50] }, { 21: [2, 48] }, { 21: [2, 46] }],
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] },
parseError: function(b, k) {
if (k.recoverable)
this.trace(b);
else {
var P = new Error(b);
throw P.hash = k, P;
}
},
parse: function(b) {
var k = this, P = [0], g = [], S = [null], o = [], yt = this.table, h = "", _t = 0, Qt = 0, Te = 2, Zt = 1, ye = o.slice.call(arguments, 1), B = Object.create(this.lexer), ht = { yy: {} };
for (var Dt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, Dt) && (ht.yy[Dt] = this.yy[Dt]);
B.setInput(b, ht.yy), ht.yy.lexer = B, ht.yy.parser = this, typeof B.yylloc > "u" && (B.yylloc = {});
var Vt = B.yylloc;
o.push(Vt);
var Ee = B.options && B.options.ranges;
typeof ht.yy.parseError == "function" ? this.parseError = ht.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function be() {
var st;
return st = g.pop() || B.lex() || Zt, typeof st != "number" && (st instanceof Array && (g = st, st = g.pop()), st = k.symbols_[st] || st), st;
}
for (var z, dt, Z, Ct, ft = {}, kt, it, jt, Lt; ; ) {
if (dt = P[P.length - 1], this.defaultActions[dt] ? Z = this.defaultActions[dt] : ((z === null || typeof z > "u") && (z = be()), Z = yt[dt] && yt[dt][z]), typeof Z > "u" || !Z.length || !Z[0]) {
var Ot = "";
Lt = [];
for (kt in yt[dt])
this.terminals_[kt] && kt > Te && Lt.push("'" + this.terminals_[kt] + "'");
B.showPosition ? Ot = "Parse error on line " + (_t + 1) + `:
` + B.showPosition() + `
Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : Ot = "Parse error on line " + (_t + 1) + ": Unexpected " + (z == Zt ? "end of input" : "'" + (this.terminals_[z] || z) + "'"), this.parseError(Ot, {
text: B.match,
token: this.terminals_[z] || z,
line: B.yylineno,
loc: Vt,
expected: Lt
});
}
if (Z[0] instanceof Array && Z.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + dt + ", token: " + z);
switch (Z[0]) {
case 1:
P.push(z), S.push(B.yytext), o.push(B.yylloc), P.push(Z[1]), z = null, Qt = B.yyleng, h = B.yytext, _t = B.yylineno, Vt = B.yylloc;
break;
case 2:
if (it = this.productions_[Z[1]][1], ft.$ = S[S.length - it], ft._$ = {
first_line: o[o.length - (it || 1)].first_line,
last_line: o[o.length - 1].last_line,
first_column: o[o.length - (it || 1)].first_column,
last_column: o[o.length - 1].last_column
}, Ee && (ft._$.range = [
o[o.length - (it || 1)].range[0],
o[o.length - 1].range[1]
]), Ct = this.performAction.apply(ft, [
h,
Qt,
_t,
ht.yy,
Z[1],
S,
o
].concat(ye)), typeof Ct < "u")
return Ct;
it && (P = P.slice(0, -1 * it * 2), S = S.slice(0, -1 * it), o = o.slice(0, -1 * it)), P.push(this.productions_[Z[1]][0]), S.push(ft.$), o.push(ft._$), jt = yt[P[P.length - 2]][P[P.length - 1]], P.push(jt);
break;
case 3:
return !0;
}
}
return !0;
}
}, xe = function() {
var ot = {
EOF: 1,
parseError: function(k, P) {
if (this.yy.parser)
this.yy.parser.parseError(k, P);
else
throw new Error(k);
},
// resets the lexer, sets new input
setInput: function(b, k) {
return this.yy = k || 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 = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
// consumes and returns one char from the input
input: function() {
var b = this._input[0];
this.yytext += b, this.yyleng++, this.offset++, this.match += b, this.matched += b;
var k = b.match(/(?:\r\n?|\n).*/g);
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), b;
},
// unshifts one char (or a string) into the input
unput: function(b) {
var k = b.length, P = b.split(/(?:\r\n?|\n)/g);
this._input = b + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - k), this.offset -= k;
var g = this.match.split(/(?:\r\n?|\n)/g);
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);
var S = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
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 - k
}, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - k]), this.yyleng = this.yytext.length, this;
},
// When called from action, caches matched text and appends it on next action
more: function() {
return this._more = !0, this;
},
// 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.
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
// retain first n characters of the match
less: function(b) {
this.unput(this.match.slice(b));
},
// displays already matched input, i.e. for error messages
pastInput: function() {
var b = this.matched.substr(0, this.matched.length - this.match.length);
return (b.length > 20 ? "..." : "") + b.substr(-20).replace(/\n/g, "");
},
// displays upcoming input, i.e. for error messages
upcomingInput: function() {
var b = this.match;
return b.length < 20 && (b += this._input.substr(0, 20 - b.length)), (b.substr(0, 20) + (b.length > 20 ? "..." : "")).replace(/\n/g, "");
},
// displays the character position where the lexing error occurred, i.e. for error messages
showPosition: function() {
var b = this.pastInput(), k = new Array(b.length + 1).join("-");
return b + this.upcomingInput() + `
` + k + "^";
},
// test the lexed token: return FALSE when not a match, otherwise return token
test_match: function(b, k) {
var P, g, S;
if (this.options.backtrack_lexer && (S = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, 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 = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + b[0].length
}, 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, k, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), P)
return P;
if (this._backtrack) {
for (var o in S)
this[o] = S[o];
return !1;
}
return !1;
},
// return next match in input
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var b, k, P, g;
this._more || (this.yytext = "", this.match = "");
for (var S = this._currentRules(), o = 0; o < S.length; o++)
if (P = this._input.match(this.rules[S[o]]), P && (!k || P[0].length > k[0].length)) {
if (k = P, g = o, this.options.backtrack_lexer) {
if (b = this.test_match(P, S[o]), b !== !1)
return b;
if (this._backtrack) {
k = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return k ? (b = this.test_match(k, S[g]), b !== !1 ? b : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
// return next match that has a token
lex: function() {
var k = this.next();
return k || this.lex();
},
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
begin: function(k) {
this.conditionStack.push(k);
},
// pop the previously active lexer condition state off the condition stack
popState: function() {
var k = this.conditionStack.length - 1;
return k > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
// produce the lexer rule set which is active for the currently active lexer condition state
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
topState: function(k) {
return k = this.conditionStack.length - 1 - Math.abs(k || 0), k >= 0 ? this.conditionStack[k] : "INITIAL";
},
// alias for begin(condition)
pushState: function(k) {
this.begin(k);
},
// return the number of states currently on the stack
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(k, P, g, S) {
switch (g) {
case 0:
return this.begin("open_directive"), 84;
case 1:
return this.begin("type_directive"), 85;
case 2:
return this.popState(), this.begin("arg_directive"), 17;
case 3:
return this.popState(), this.popState(), 87;
case 4:
return 86;
case 5:
return 5;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
return 24;
case 12:
return this.begin("LINE"), 19;
case 13:
return this.begin("ID"), 55;
case 14:
return this.begin("ID"), 57;
case 15:
return P.yytext = P.yytext.trim(), this.begin("ALIAS"), 74;
case 16:
return this.popState(), this.popState(), this.begin("LINE"), 56;
case 17:
return this.popState(), this.popState(), 5;
case 18:
return this.begin("LINE"), 41;
case 19:
return this.begin("LINE"), 42;
case 20:
return this.begin("LINE"), 43;
case 21:
return this.begin("LINE"), 44;
case 22:
return this.begin("LINE"), 54;
case 23:
return this.begin("LINE"), 46;
case 24:
return this.begin("LINE"), 48;
case 25:
return this.begin("LINE"), 53;
case 26:
return this.begin("LINE"), 49;
case 27:
return this.begin("LINE"), 52;
case 28:
return this.begin("LINE"), 51;
case 29:
return this.popState(), 20;
case 30:
return 21;
case 31:
return 69;
case 32:
return 70;
case 33:
return 63;
case 34:
return 64;
case 35:
return 65;
case 36:
return 66;
case 37:
return 61;
case 38:
return 58;
case 39:
return this.begin("ID"), 26;
case 40:
return this.begin("ID"), 28;
case 41:
return 34;
case 42:
return 35;
case 43:
return this.begin("acc_title"), 36;
case 44:
return this.popState(), "acc_title_value";
case 45:
return this.begin("acc_descr"), 38;
case 46:
return this.popState(), "acc_descr_value";
case 47:
this.begin("acc_descr_multiline");
break;
case 48:
this.popState();
break;
case 49:
return "acc_descr_multiline_value";
case 50:
return 7;
case 51:
return 23;
case 52:
return 25;
case 53:
return 68;
case 54:
return 5;
case 55:
return P.yytext = P.yytext.trim(), 74;
case 56:
return 77;
case 57:
return 78;
case 58:
return 75;
case 59:
return 76;
case 60:
return 79;
case 61:
return 80;
case 62:
return 81;
case 63:
return 82;
case 64:
return 83;
case 65:
return 72;
case 66:
return 73;
case 67:
return 5;
case 68:
return "INVALID";
}
},
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],
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 } }
};
return ot;
}();
Mt.lexer = xe;
function Rt() {
this.yy = {};
}
return Rt.prototype = Mt, Mt.Parser = Rt, new Rt();
}();
Bt.parser = Bt;
const Ce = Bt;
let Et, ct = {}, xt = [], $ = [], vt = !1, Yt, at;
const Oe = function(t, e, r) {
Pe.parseDirective(this, t, e, r);
}, Be = function(t) {
xt.push({
name: t.text,
wrap: t.wrap === void 0 && ut() || !!t.wrap,
fill: t.color,
actorKeys: []
}), at = xt.slice(-1)[0];
}, Ft = function(t, e, r, n) {
let i = at;
const s = ct[t];
if (s) {
if (at && s.box && at !== s.box)
throw new Error(
"A same participant should only be defined in one Box: " + s.name + " can't be in '" + s.box.name + "' and in '" + at.name + "' at the same time."
);
if (i = s.box ? s.box : at, s.box = i, s && e === s.name && r == null)
return;
}
(r == null || r.text == null) && (r = { text: e, wrap: null, type: n }), (n == null || r.text == null) && (r = { text: e, wrap: null, type: n }), ct[t] = {
box: i,
name: e,
description: r.text,
wrap: r.wrap === void 0 && ut() || !!r.wrap,
prevActor: Et,
links: {},
properties: {},
actorCnt: null,
rectData: null,
type: n || "participant"
}, Et && ct[Et] && (ct[Et].nextActor = t), at && at.actorKeys.push(t), Et = t;
}, Ye = (t) => {
let e, r = 0;
for (e = 0; e < $.length; e++)
$[e].type === bt.ACTIVE_START && $[e].from.actor === t && r++, $[e].type === bt.ACTIVE_END && $[e].from.actor === t && r--;
return r;
}, Fe = function(t, e, r, n) {
$.push({
from: t,
to: e,
message: r.text,
wrap: r.wrap === void 0 && ut() || !!r.wrap,
answer: n
});
}, R = function(t, e, r = { text: void 0, wrap: void 0 }, n) {
if (n === bt.ACTIVE_END && Ye(t.actor) < 1) {
let s = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
throw s.hash = {
text: "->>-",
token: "->>-",
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["'ACTIVE_PARTICIPANT'"]
}, s;
}
return $.push({
from: t,
to: e,
message: r.text,
wrap: r.wrap === void 0 && ut() || !!r.wrap,
type: n
}), !0;
}, We = function() {
return xt.length > 0;
}, qe = function() {
return xt.some((t) => t.name);
}, ze = function() {
return $;
}, He = function() {
return xt;
}, Ue = function() {
return ct;
}, mt = function(t) {
return ct[t];
}, Ke = function() {
return Object.keys(ct);
}, Ge = function() {
vt = !0;
}, Xe = function() {
vt = !1;
}, Je = () => vt, Qe = function(t) {
Yt = t;
}, ut = () => Yt !== void 0 ? Yt : lt().sequence.wrap, Ze = function() {
ct = {}, xt = [], $ = [], vt = !1, Ie();
}, je = function(t) {
const e = t.trim(), r = {
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
};
return K.debug("parseMessage:", r), r;
}, $e = function(t) {
const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
let r = e != null && e[1] ? e[1].trim() : "transparent", n = e != null && e[2] ? e[2].trim() : void 0;
if (window && window.CSS)
window.CSS.supports("color", r) || (r = "transparent", n = t.trim());
else {
const s = new Option().style;
s.color = r, s.color !== r && (r = "transparent", n = t.trim());
}
return {
color: r,
text: n !== void 0 ? It(n.replace(/^:?(?:no)?wrap:/, ""), lt()) : void 0,
wrap: n !== void 0 ? n.match(/^:?wrap:/) !== null ? !0 : n.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
};
}, bt = {
SOLID: 0,
DOTTED: 1,
NOTE: 2,
SOLID_CROSS: 3,
DOTTED_CROSS: 4,
SOLID_OPEN: 5,
DOTTED_OPEN: 6,
LOOP_START: 10,
LOOP_END: 11,
ALT_START: 12,
ALT_ELSE: 13,
ALT_END: 14,
OPT_START: 15,
OPT_END: 16,
ACTIVE_START: 17,
ACTIVE_END: 18,
PAR_START: 19,
PAR_AND: 20,
PAR_END: 21,
RECT_START: 22,
RECT_END: 23,
SOLID_POINT: 24,
DOTTED_POINT: 25,
AUTONUMBER: 26,
CRITICAL_START: 27,
CRITICAL_OPTION: 28,
CRITICAL_END: 29,
BREAK_START: 30,
BREAK_END: 31,
PAR_OVER_START: 32
}, t0 = {
FILLED: 0,
OPEN: 1
}, e0 = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
}, ie = function(t, e, r) {
r.text, r.wrap === void 0 && ut() || r.wrap;
const n = [].concat(t, t);
$.push({
from: n[0],
to: n[1],
message: r.text,
wrap: r.wrap === void 0 && ut() || !!r.wrap,
type: bt.NOTE,
placement: e
});
}, se = function(t, e) {
const r = mt(t);
try {
let n = It(e.text, lt());
n = n.replace(/&/g, "&"), n = n.replace(/=/g, "=");
const i = JSON.parse(n);
Ht(r, i);
} catch (n) {
K.error("error while parsing actor link text", n);
}
}, n0 = function(t, e) {
const r = mt(t);
try {
const c = {};
let l = It(e.text, lt());
var n = l.indexOf("@");
l = l.replace(/&/g, "&"), l = l.replace(/=/g, "=");
var i = l.slice(0, n - 1).trim(), s = l.slice(n + 1).trim();
c[i] = s, Ht(r, c);
} catch (c) {
K.error("error while parsing actor link text", c);
}
};
function Ht(t, e) {
if (t.links == null)
t.links = e;
else
for (let r in e)
t.links[r] = e[r];
}
const ae = function(t, e) {
const r = mt(t);
try {
let n = It(e.text, lt());
const i = JSON.parse(n);
re(r, i);
} catch (n) {
K.error("error while parsing actor properties text", n);
}
};
function re(t, e) {
if (t.properties == null)
t.properties = e;
else
for (let r in e)
t.properties[r] = e[r];
}
function i0() {
at = void 0;
}
const oe = function(t, e) {
const r = mt(t), n = document.getElementById(e.text);
try {
const i = n.innerHTML, s = JSON.parse(i);
s.properties && re(r, s.properties), s.links && Ht(r, s.links);
} catch (i) {
K.error("error while parsing actor details text", i);
}
}, s0 = function(t, e) {
if (t !== void 0 && t.properties !== void 0)
return t.properties[e];
}, ce = function(t) {
if (Array.isArray(t))
t.forEach(function(e) {
ce(e);
});
else
switch (t.type) {
case "sequenceIndex":
$.push({
from: void 0,
to: void 0,
message: {
start: t.sequenceIndex,
step: t.sequenceIndexStep,
visible: t.sequenceVisible
},
wrap: !1,
type: t.signalType
});
break;
case "addParticipant":
Ft(t.actor, t.actor, t.description, "participant");
break;
case "addActor":
Ft(t.actor, t.actor, t.description, "actor");
break;
case "activeStart":
R(t.actor, void 0, void 0, t.signalType);
break;
case "activeEnd":
R(t.actor, void 0, void 0, t.signalType);
break;
case "addNote":
ie(t.actor, t.placement, t.text);
break;
case "addLinks":
se(t.actor, t.text);
break;
case "addALink":
n0(t.actor, t.text);
break;
case "addProperties":
ae(t.actor, t.text);
break;
case "addDetails":
oe(t.actor, t.text);
break;
case "addMessage":
R(t.from, t.to, t.msg, t.signalType);
break;
case "boxStart":
Be(t.boxData);
break;
case "boxEnd":
i0();
break;
case "loopStart":
R(void 0, void 0, t.loopText, t.signalType);
break;
case "loopEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "rectStart":
R(void 0, void 0, t.color, t.signalType);
break;
case "rectEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "optStart":
R(void 0, void 0, t.optText, t.signalType);
break;
case "optEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "altStart":
R(void 0, void 0, t.altText, t.signalType);
break;
case "else":
R(void 0, void 0, t.altText, t.signalType);
break;
case "altEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "setAccTitle":
te(t.text);
break;
case "parStart":
R(void 0, void 0, t.parText, t.signalType);
break;
case "and":
R(void 0, void 0, t.parText, t.signalType);
break;
case "parEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "criticalStart":
R(void 0, void 0, t.criticalText, t.signalType);
break;
case "option":
R(void 0, void 0, t.optionText, t.signalType);
break;
case "criticalEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "breakStart":
R(void 0, void 0, t.breakText, t.signalType);
break;
case "breakEnd":
R(void 0, void 0, void 0, t.signalType);
break;
}
}, a0 = {
addActor: Ft,
addMessage: Fe,
addSignal: R,
addLinks: se,
addDetails: oe,
addProperties: ae,
autoWrap: ut,
setWrap: Qe,
enableSequenceNumbers: Ge,
disableSequenceNumbers: Xe,
showSequenceNumbers: Je,
getMessages: ze,
getActors: Ue,
getActor: mt,
getActorKeys: Ke,
getActorProperty: s0,
getAccTitle: me,
getBoxes: He,
getDiagramTitle: we,
setDiagramTitle: _e,
parseDirective: Oe,
getConfig: () => lt().sequence,
clear: Ze,
parseMessage: je,
parseBoxData: $e,
LINETYPE: bt,
ARROWTYPE: t0,
PLACEMENT: e0,
addNote: ie,
setAccTitle: te,
apply: ce,
setAccDescription: ke,
getAccDescription: Le,
hasAtLeastOneBox: We,
hasAtLeastOneBoxWithTitle: qe
}, r0 = (t) => `.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`, o0 = r0, Ut = function(t, e) {
return Se(t, e);
}, le = (t, e) => {
Ne(() => {
const r = document.querySelectorAll(t);
r.length !== 0 && (r[0].addEventListener("mouseover", function() {
d0("actor" + e + "_popup");
}), r[0].addEventListener("mouseout", function() {
u0("actor" + e + "_popup");
}));
});
}, c0 = function(t, e, r, n, i) {
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
return { height: 0, width: 0 };
const s = e.links, c = e.actorCnt, l = e.rectData;
var u = "none";
i && (u = "block !important");
const d = t.append("g");
d.attr("id", "actor" + c + "_popup"), d.attr("class", "actorPopupMenu"), d.attr("display", u), le("#actor" + c + "_popup", c);
var T = "";
l.class !== void 0 && (T = " " + l.class);
let y = l.width > r ? l.width : r;
const p = d.append("rect");
if (p.attr("class", "actorPopupMenuPanel" + T), p.attr("x", l.x), p.attr("y", l.height), p.attr("fill", l.fill), p.attr("stroke", l.stroke), p.attr("width", y), p.attr("height", l.height), p.a