@marimo-team/islands 0.12.1-dev2 → 0.12.1-dev20

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