@kong-ui-public/documentation 1.5.10 → 1.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_baseUniq-BM5nBlUE-Bqq-876b.js +477 -0
- package/dist/{arc-B-ukyQgl-BIkl0oly.js → arc-Da5qnJCa-D1fJq9Ga.js} +14 -14
- package/dist/architecture-YZFGNWBL-CvR_VbsD-i8qH434J.js +6 -0
- package/dist/architectureDiagram-Q4EWVU46-DqiP7Rm1-CBe5jt7q.js +4694 -0
- package/dist/blockDiagram-DXYQGD6D-Dqw9F2Am-BLtGZalg.js +2304 -0
- package/dist/{c4Diagram-AAMF2YG6-CKwlop6T-biDHxtgF.js → c4Diagram-AHTNJAMY-D1CqyEQ6-B0R-a6pf.js} +740 -743
- package/dist/{channel-Da4OyhNU-CjtA-gzv.js → channel-C0HsK-iS-D8tJdRzv.js} +1 -1
- package/dist/{chunk-ANTBXLJU-CgMY7K4E-BDFVHt4k.js → chunk-4BX2VUAB-CkAjNgA_-Bs9A5Kfv.js} +1 -1
- package/dist/{chunk-JBRWN2VN-DGZEDqQT-C_bgxQXb.js → chunk-4TB4RGXK-BahB65Eg-ChDwOMia.js} +483 -393
- package/dist/{chunk-WVR4S24B-CqqZpXpd-DYcapnmX.js → chunk-55IACEB6-FAGpaDxG-BTfPS-CU.js} +1 -1
- package/dist/{chunk-NRVI72HA-Bk2QoSU4-C8BLG4Nn.js → chunk-EDXVE4YY-JJVh1SXw-B-sKHFur.js} +1 -1
- package/dist/{chunk-GLLZNHP4-BfObQGbx-D2i6EGF4.js → chunk-FMBD7UC4-CAMVhC3j-oHcHavNU.js} +1 -1
- package/dist/{chunk-LXBSTHXV-DDrUAnPm-BhQORC-M.js → chunk-OYMX7WX6-CUYLPicN-BOih3xeZ.js} +219 -206
- package/dist/{chunk-FHKO5MBM--0hzbho5-CD7UphLJ.js → chunk-QZHKN3VN-DludCzyb-DYJGn0Nm.js} +1 -1
- package/dist/chunk-YZCP3GAM-D78rBxvk-E0y6EYmh.js +68 -0
- package/dist/{classDiagram-3BZAVTQC-BieGHK_n-DKk2Tasm.js → classDiagram-6PBFFD2Q-DImmr9bN-Ipdf4BlS.js} +2 -2
- package/dist/{classDiagram-v2-QTMF73CY-BieGHK_n-DKk2Tasm.js → classDiagram-v2-HSJHXN6E-DImmr9bN-Ipdf4BlS.js} +2 -2
- package/dist/{clone-BQ4BCIVX-BtVSQfya.js → clone-CxV-_MWN-BTBOrYIK.js} +1 -1
- package/dist/cose-bilkent-S5V4N54A-B5XQcR33-C16znhn9.js +2608 -0
- package/dist/{cytoscape.esm-CjI2IsL8-DYIumutE.js → cytoscape.esm-BjnMFxuP-CWlRmT1g.js} +16 -13
- package/dist/{dagre-2BBEFEWP-sc2upYy7-rNXSQFNY.js → dagre-KV5264BT-PBiSm4y3-BP7huLbw.js} +19 -20
- package/dist/diagram-5BDNPKRD-Um_ME5I2-DLUwrd96.js +123 -0
- package/dist/diagram-G4DWMVQ6-BsTsajjz-Uehh1WWi.js +530 -0
- package/dist/{diagram-RP2FKANI-DabtWDGU-FmJgjY_V.js → diagram-MMDJMWI5-C5oqUzF8-gcpf6PNh.js} +67 -67
- package/dist/{diagram-GUPCWM2R-RSzJRmP4-5_ml5U5U.js → diagram-TYMM5635-CQxFzu44-Dx5KCUXW.js} +23 -23
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +1748 -1228
- package/dist/erDiagram-SMLLAGMA-23hRKyIy-B-dChHLQ.js +898 -0
- package/dist/flowDiagram-DWJPFMVM-BeSa8cQn-B2__M71K.js +1635 -0
- package/dist/ganttDiagram-T4ZO3ILL-ZC4a8MdR-tE42RGcp.js +2700 -0
- package/dist/gitGraph-7Q5UKJZL-DlY-5kQ6-CLY7BmsA.js +6 -0
- package/dist/gitGraphDiagram-UUTBAWPF-DXVZeOtJ-CWWgOrKv.js +828 -0
- package/dist/graph-WBvyJJXo-BBnBDARn.js +738 -0
- package/dist/{index-DeBlJN4f.js → index-Bh-wTBlD.js} +16761 -15853
- package/dist/info-OMHHGYJF-RTXqsfQC-DrfqfklB.js +6 -0
- package/dist/infoDiagram-42DDH7IO-BZdpI3Rt-l8iFfMFP.js +24 -0
- package/dist/ishikawaDiagram-UXIWVN3A-DvYKV3c4-BPgCxTOl.js +622 -0
- package/dist/journeyDiagram-VCZTEJTY-C2ry_hWi-DI5GD7uG.js +834 -0
- package/dist/{kanban-definition-KOZQBZVT-BcgyR947-u-ThSWpr.js → kanban-definition-6JOO6SKY-CY_QsIlW-OqXNCY1p.js} +163 -158
- package/dist/{katex-C0Lgw_Sx-CbX2I1cQ.js → katex-CX_HYDAq-_-dpIk5k.js} +3261 -3333
- package/dist/layout-DzPx9mR5-CHbk03j2.js +1438 -0
- package/dist/{linear-Bkwca0xU-DC0DlB3Q.js → linear-h6L3lVRp-DOzK9CUG.js} +1 -1
- package/dist/mermaid-parser.core-DtLRLmJt-Bs8fzU82.js +18375 -0
- package/dist/min-hEQogXjh-DyJPZJjb.js +38 -0
- package/dist/mindmap-definition-QFDTVHPH-DtiyxxYL-DUl1WEb7.js +836 -0
- package/dist/packet-4T2RLAQJ-Di7zpGDk-UtQRvAVW.js +6 -0
- package/dist/pie-ZZUOXDRM-CXos-t2G-BFyC-RaB.js +6 -0
- package/dist/pieDiagram-DEJITSTG-D7gBkRMg-BBSz-kJB.js +164 -0
- package/dist/{quadrantDiagram-YPSRARAO-BQtyf3HP-D7rZGp1l.js → quadrantDiagram-34T5L4WZ-Cfwapd1Q-CS_lKY3k.js} +16 -16
- package/dist/radar-PYXPWWZC-D0dHj_5J-DO49D32P.js +6 -0
- package/dist/{requirementDiagram-EGVEC5DT-CnnVFZwh-D9sZFwwg.js → requirementDiagram-MS252O5E-Bimzbn3B-B-e5vK9F.js} +199 -167
- package/dist/{sankeyDiagram-HRAUVNP4-DnGkLEvt-DIAbJDNn.js → sankeyDiagram-XADWPNL6-B8rOSxDr-uYyl_iJz.js} +13 -13
- package/dist/sequenceDiagram-FGHM5R23-z1blPVFc-DxkfwOOg.js +2893 -0
- package/dist/stateDiagram-FHFEXIEX-Dvj2dUvd-CEjEPSzp.js +263 -0
- package/dist/{stateDiagram-v2-EYPG3UTE-CkraIkNs-DLA1w3a5.js → stateDiagram-v2-QKLJ7IA2-CEq8bJSN-BmK4dbQp.js} +2 -2
- package/dist/timeline-definition-GMOUNBTQ-CFbR3HDt-Dajv0gse.js +1066 -0
- package/dist/treeView-SZITEDCU-ZiyDRNdY-FcohlUhB.js +6 -0
- package/dist/treemap-W4RFUUIX-D-tfszYV-CkdYg79W.js +6 -0
- package/dist/vennDiagram-DHZGUBPP-DDPnvwIl-DLef8GZ-.js +1564 -0
- package/dist/wardley-RL74JXVD-CzW2PcVh-Bl64UM-9.js +6 -0
- package/dist/wardleyDiagram-NUSXRM2D-G2F05w5q-Dgb8afBt.js +603 -0
- package/dist/{xychartDiagram-FDP5SA34-C0od7xbm-JkA2XwsO.js → xychartDiagram-5P7HB3ND-DcvqnhIW-CQekuj1q.js} +286 -284
- package/package.json +2 -2
- package/dist/_basePickBy-By9oZA6R-C9Q3wZgc.js +0 -151
- package/dist/_baseUniq-aulxCrZg-DpgqVftQ.js +0 -614
- package/dist/architecture-U656AL7Q-D7FlR8mQ-CcoM0xmP.js +0 -6
- package/dist/architectureDiagram-KFL7JDKH-D2wQyXF3-DUIfKyBT.js +0 -4665
- package/dist/blockDiagram-ZYB65J3Q-BVrJ6Sru-CTSsbOHf.js +0 -2265
- package/dist/chunk-OMD6QJNC-Dw01cgI4-BX05x0MM.js +0 -64
- package/dist/diagram-4IRLE6MV-DhfS8dHC-BHYGYZis.js +0 -533
- package/dist/erDiagram-HZWUO2LU-DRB4Mbtv-CgU99FCL.js +0 -840
- package/dist/flowDiagram-THRYKUMA-Cca2217c-CyDxFUag.js +0 -1627
- package/dist/ganttDiagram-WV7ZQ7D5-T3W_JgZV-PlELdFB9.js +0 -2504
- package/dist/gitGraph-F6HP7TQM-CF97nS_M-Cds3-fO4.js +0 -6
- package/dist/gitGraphDiagram-OJR772UL-DxvQcvVZ-DsH5Tcqa.js +0 -712
- package/dist/graph-DM4yJZhA-Bbo6I0vd.js +0 -247
- package/dist/info-NVLQJR56-BIkzHNxa-PHtGLaWD.js +0 -6
- package/dist/infoDiagram-6WOFNB3A-rRqd7shu-DmCUCKD0.js +0 -24
- package/dist/journeyDiagram-FFXJYRFH-C9rjRycy-44BCKp7p.js +0 -834
- package/dist/layout-CDChcvw3-C4cdx174.js +0 -1321
- package/dist/mermaid-parser.core-DRkTy7co-D3k_lOFL.js +0 -12890
- package/dist/mindmap-definition-LNHGMQRG-Dzyqm5dG-BSHIrtY4.js +0 -3231
- package/dist/packet-BFZMPI3H-D2ECyuNX-BrLUxNwr.js +0 -6
- package/dist/pie-7BOR55EZ-DZrUX33b-DTRam8Zi.js +0 -6
- package/dist/pieDiagram-DBDJKBY4-Pbq0hYNc-BY63OUmy.js +0 -161
- package/dist/radar-NHE76QYJ-DRHdhW6w-DS2_BWvC.js +0 -6
- package/dist/sequenceDiagram-WFGC7UMF-ChsW9bN4-D52efQBS.js +0 -2283
- package/dist/stateDiagram-UUKSUZ4H-Cbf4sKeS-CW-kRLpc.js +0 -263
- package/dist/timeline-definition-3HZDQTIS-zCLLmQCc-B-r1pMne.js +0 -799
- package/dist/treemap-KMMF4GRG-BWdglwua-CKei-6bJ.js +0 -6
|
@@ -0,0 +1,2893 @@
|
|
|
1
|
+
import { _ as u, ak as ta, g as Q, a5 as Ct, l as st, af as Ce, ab as ea, ac as aa, ah as D, aa as De, a7 as ra, ao as sa, a9 as ia, a8 as na, ap as oa, aq as ca, ar as da, av as la, ae as vt, an as G, bd as J, be as wt, aV as ve, bf as ha, aB as Yt, bg as pa, bh as Be } from "./index-Bh-wTBlD.js";
|
|
2
|
+
import { p as Ta, f as ee, h as pt, x as Ea, g as ae, m as re } from "./chunk-YZCP3GAM-D78rBxvk-E0y6EYmh.js";
|
|
3
|
+
import { e as ga } from "./chunk-QZHKN3VN-DludCzyb-DYJGn0Nm.js";
|
|
4
|
+
var Qt = function() {
|
|
5
|
+
var e = /* @__PURE__ */ u(function(ht, N, A, b) {
|
|
6
|
+
for (A = A || {}, b = ht.length; b--; A[ht[b]] = N) ;
|
|
7
|
+
return A;
|
|
8
|
+
}, "o"), t = [1, 2], r = [1, 3], a = [1, 4], i = [2, 4], d = [1, 9], s = [1, 11], n = [1, 12], g = [1, 14], h = [1, 15], o = [1, 17], x = [1, 18], O = [1, 19], I = [1, 25], _ = [1, 26], f = [1, 27], E = [1, 28], T = [1, 29], y = [1, 30], R = [1, 31], S = [1, 32], w = [1, 33], P = [1, 34], C = [1, 35], v = [1, 36], Y = [1, 37], H = [1, 38], z = [1, 39], U = [1, 40], X = [1, 42], q = [1, 43], it = [1, 44], Z = [1, 45], nt = [1, 46], $ = [1, 47], M = [1, 4, 5, 10, 14, 15, 17, 19, 22, 24, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 48, 49, 50, 51, 53, 54, 56, 61, 62, 63, 64, 73], Nt = [1, 74], L = [1, 80], k = [1, 81], tt = [1, 82], et = [1, 83], W = [1, 84], se = [1, 85], ie = [1, 86], ne = [1, 87], oe = [1, 88], ce = [1, 89], de = [1, 90], le = [1, 91], he = [1, 92], pe = [1, 93], Te = [1, 94], Ee = [1, 95], ge = [1, 96], ue = [1, 97], Oe = [1, 98], _e = [1, 99], xe = [1, 100], be = [1, 101], me = [1, 102], ye = [1, 103], Ie = [1, 104], fe = [1, 105], Re = [2, 78], Lt = [4, 5, 17, 51, 53, 54], Pt = [4, 5, 10, 14, 15, 17, 19, 22, 24, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 51, 53, 54, 56, 61, 62, 63, 64, 73], Le = [4, 5, 10, 14, 15, 17, 19, 22, 24, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 50, 51, 53, 54, 56, 61, 62, 63, 64, 73], Kt = [4, 5, 10, 14, 15, 17, 19, 22, 24, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 49, 51, 53, 54, 56, 61, 62, 63, 64, 73], Se = [4, 5, 10, 14, 15, 17, 19, 22, 24, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 48, 51, 53, 54, 56, 61, 62, 63, 64, 73], qt = [5, 52], F = [70, 71, 72, 73], ct = [1, 151], Ht = {
|
|
9
|
+
trace: /* @__PURE__ */ u(function() {
|
|
10
|
+
}, "trace"),
|
|
11
|
+
yy: {},
|
|
12
|
+
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, INVALID: 10, box_section: 11, box_line: 12, participant_statement: 13, create: 14, box: 15, restOfLine: 16, end: 17, signal: 18, autonumber: 19, NUM: 20, off: 21, activate: 22, actor: 23, deactivate: 24, note_statement: 25, links_statement: 26, link_statement: 27, properties_statement: 28, details_statement: 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: 40, else_sections: 41, par: 42, par_sections: 43, par_over: 44, critical: 45, option_sections: 46, break: 47, option: 48, and: 49, else: 50, participant: 51, AS: 52, participant_actor: 53, destroy: 54, actor_with_config: 55, note: 56, placement: 57, text2: 58, over: 59, actor_pair: 60, links: 61, link: 62, properties: 63, details: 64, spaceList: 65, ",": 66, left_of: 67, right_of: 68, signaltype: 69, "+": 70, "-": 71, "()": 72, ACTOR: 73, config_object: 74, CONFIG_START: 75, CONFIG_CONTENT: 76, CONFIG_END: 77, SOLID_OPEN_ARROW: 78, DOTTED_OPEN_ARROW: 79, SOLID_ARROW: 80, SOLID_ARROW_TOP: 81, SOLID_ARROW_BOTTOM: 82, STICK_ARROW_TOP: 83, STICK_ARROW_BOTTOM: 84, SOLID_ARROW_TOP_DOTTED: 85, SOLID_ARROW_BOTTOM_DOTTED: 86, STICK_ARROW_TOP_DOTTED: 87, STICK_ARROW_BOTTOM_DOTTED: 88, SOLID_ARROW_TOP_REVERSE: 89, SOLID_ARROW_BOTTOM_REVERSE: 90, STICK_ARROW_TOP_REVERSE: 91, STICK_ARROW_BOTTOM_REVERSE: 92, SOLID_ARROW_TOP_REVERSE_DOTTED: 93, SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 94, STICK_ARROW_TOP_REVERSE_DOTTED: 95, STICK_ARROW_BOTTOM_REVERSE_DOTTED: 96, BIDIRECTIONAL_SOLID_ARROW: 97, DOTTED_ARROW: 98, BIDIRECTIONAL_DOTTED_ARROW: 99, SOLID_CROSS: 100, DOTTED_CROSS: 101, SOLID_POINT: 102, DOTTED_POINT: 103, TXT: 104, $accept: 0, $end: 1 },
|
|
13
|
+
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 10: "INVALID", 14: "create", 15: "box", 16: "restOfLine", 17: "end", 19: "autonumber", 20: "NUM", 21: "off", 22: "activate", 24: "deactivate", 30: "title", 31: "legacy_title", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "loop", 38: "rect", 39: "opt", 40: "alt", 42: "par", 44: "par_over", 45: "critical", 47: "break", 48: "option", 49: "and", 50: "else", 51: "participant", 52: "AS", 53: "participant_actor", 54: "destroy", 56: "note", 59: "over", 61: "links", 62: "link", 63: "properties", 64: "details", 66: ",", 67: "left_of", 68: "right_of", 70: "+", 71: "-", 72: "()", 73: "ACTOR", 75: "CONFIG_START", 76: "CONFIG_CONTENT", 77: "CONFIG_END", 78: "SOLID_OPEN_ARROW", 79: "DOTTED_OPEN_ARROW", 80: "SOLID_ARROW", 81: "SOLID_ARROW_TOP", 82: "SOLID_ARROW_BOTTOM", 83: "STICK_ARROW_TOP", 84: "STICK_ARROW_BOTTOM", 85: "SOLID_ARROW_TOP_DOTTED", 86: "SOLID_ARROW_BOTTOM_DOTTED", 87: "STICK_ARROW_TOP_DOTTED", 88: "STICK_ARROW_BOTTOM_DOTTED", 89: "SOLID_ARROW_TOP_REVERSE", 90: "SOLID_ARROW_BOTTOM_REVERSE", 91: "STICK_ARROW_TOP_REVERSE", 92: "STICK_ARROW_BOTTOM_REVERSE", 93: "SOLID_ARROW_TOP_REVERSE_DOTTED", 94: "SOLID_ARROW_BOTTOM_REVERSE_DOTTED", 95: "STICK_ARROW_TOP_REVERSE_DOTTED", 96: "STICK_ARROW_BOTTOM_REVERSE_DOTTED", 97: "BIDIRECTIONAL_SOLID_ARROW", 98: "DOTTED_ARROW", 99: "BIDIRECTIONAL_DOTTED_ARROW", 100: "SOLID_CROSS", 101: "DOTTED_CROSS", 102: "SOLID_POINT", 103: "DOTTED_POINT", 104: "TXT" },
|
|
14
|
+
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [8, 1], [11, 0], [11, 2], [12, 2], [12, 1], [12, 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], [46, 1], [46, 4], [43, 1], [43, 4], [41, 1], [41, 4], [13, 5], [13, 3], [13, 5], [13, 3], [13, 3], [13, 5], [13, 3], [13, 5], [13, 3], [25, 4], [25, 4], [26, 3], [27, 3], [28, 3], [29, 3], [65, 2], [65, 1], [60, 3], [60, 1], [57, 1], [57, 1], [18, 5], [18, 5], [18, 5], [18, 5], [18, 6], [18, 4], [55, 2], [74, 3], [23, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [69, 1], [58, 1]],
|
|
15
|
+
performAction: /* @__PURE__ */ u(function(ht, N, A, b, V, c, at) {
|
|
16
|
+
var p = c.length - 1;
|
|
17
|
+
switch (V) {
|
|
18
|
+
case 3:
|
|
19
|
+
return b.apply(c[p]), c[p];
|
|
20
|
+
case 4:
|
|
21
|
+
case 10:
|
|
22
|
+
this.$ = [];
|
|
23
|
+
break;
|
|
24
|
+
case 5:
|
|
25
|
+
case 11:
|
|
26
|
+
c[p - 1].push(c[p]), this.$ = c[p - 1];
|
|
27
|
+
break;
|
|
28
|
+
case 6:
|
|
29
|
+
case 7:
|
|
30
|
+
case 12:
|
|
31
|
+
case 13:
|
|
32
|
+
this.$ = c[p];
|
|
33
|
+
break;
|
|
34
|
+
case 8:
|
|
35
|
+
case 9:
|
|
36
|
+
case 14:
|
|
37
|
+
this.$ = [];
|
|
38
|
+
break;
|
|
39
|
+
case 16:
|
|
40
|
+
c[p].type = "createParticipant", this.$ = c[p];
|
|
41
|
+
break;
|
|
42
|
+
case 17:
|
|
43
|
+
c[p - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(c[p - 2]) }), c[p - 1].push({ type: "boxEnd", boxText: c[p - 2] }), this.$ = c[p - 1];
|
|
44
|
+
break;
|
|
45
|
+
case 19:
|
|
46
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(c[p - 2]), sequenceIndexStep: Number(c[p - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
47
|
+
break;
|
|
48
|
+
case 20:
|
|
49
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(c[p - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
50
|
+
break;
|
|
51
|
+
case 21:
|
|
52
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
|
|
53
|
+
break;
|
|
54
|
+
case 22:
|
|
55
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
56
|
+
break;
|
|
57
|
+
case 23:
|
|
58
|
+
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: c[p - 1].actor };
|
|
59
|
+
break;
|
|
60
|
+
case 24:
|
|
61
|
+
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: c[p - 1].actor };
|
|
62
|
+
break;
|
|
63
|
+
case 30:
|
|
64
|
+
b.setDiagramTitle(c[p].substring(6)), this.$ = c[p].substring(6);
|
|
65
|
+
break;
|
|
66
|
+
case 31:
|
|
67
|
+
b.setDiagramTitle(c[p].substring(7)), this.$ = c[p].substring(7);
|
|
68
|
+
break;
|
|
69
|
+
case 32:
|
|
70
|
+
this.$ = c[p].trim(), b.setAccTitle(this.$);
|
|
71
|
+
break;
|
|
72
|
+
case 33:
|
|
73
|
+
case 34:
|
|
74
|
+
this.$ = c[p].trim(), b.setAccDescription(this.$);
|
|
75
|
+
break;
|
|
76
|
+
case 35:
|
|
77
|
+
c[p - 1].unshift({ type: "loopStart", loopText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.LOOP_START }), c[p - 1].push({ type: "loopEnd", loopText: c[p - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = c[p - 1];
|
|
78
|
+
break;
|
|
79
|
+
case 36:
|
|
80
|
+
c[p - 1].unshift({ type: "rectStart", color: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.RECT_START }), c[p - 1].push({ type: "rectEnd", color: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = c[p - 1];
|
|
81
|
+
break;
|
|
82
|
+
case 37:
|
|
83
|
+
c[p - 1].unshift({ type: "optStart", optText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.OPT_START }), c[p - 1].push({ type: "optEnd", optText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = c[p - 1];
|
|
84
|
+
break;
|
|
85
|
+
case 38:
|
|
86
|
+
c[p - 1].unshift({ type: "altStart", altText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.ALT_START }), c[p - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = c[p - 1];
|
|
87
|
+
break;
|
|
88
|
+
case 39:
|
|
89
|
+
c[p - 1].unshift({ type: "parStart", parText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.PAR_START }), c[p - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = c[p - 1];
|
|
90
|
+
break;
|
|
91
|
+
case 40:
|
|
92
|
+
c[p - 1].unshift({ type: "parStart", parText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.PAR_OVER_START }), c[p - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = c[p - 1];
|
|
93
|
+
break;
|
|
94
|
+
case 41:
|
|
95
|
+
c[p - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.CRITICAL_START }), c[p - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = c[p - 1];
|
|
96
|
+
break;
|
|
97
|
+
case 42:
|
|
98
|
+
c[p - 1].unshift({ type: "breakStart", breakText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.BREAK_START }), c[p - 1].push({ type: "breakEnd", optText: b.parseMessage(c[p - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = c[p - 1];
|
|
99
|
+
break;
|
|
100
|
+
case 44:
|
|
101
|
+
this.$ = c[p - 3].concat([{ type: "option", optionText: b.parseMessage(c[p - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, c[p]]);
|
|
102
|
+
break;
|
|
103
|
+
case 46:
|
|
104
|
+
this.$ = c[p - 3].concat([{ type: "and", parText: b.parseMessage(c[p - 1]), signalType: b.LINETYPE.PAR_AND }, c[p]]);
|
|
105
|
+
break;
|
|
106
|
+
case 48:
|
|
107
|
+
this.$ = c[p - 3].concat([{ type: "else", altText: b.parseMessage(c[p - 1]), signalType: b.LINETYPE.ALT_ELSE }, c[p]]);
|
|
108
|
+
break;
|
|
109
|
+
case 49:
|
|
110
|
+
c[p - 3].draw = "participant", c[p - 3].type = "addParticipant", c[p - 3].description = b.parseMessage(c[p - 1]), this.$ = c[p - 3];
|
|
111
|
+
break;
|
|
112
|
+
case 50:
|
|
113
|
+
c[p - 1].draw = "participant", c[p - 1].type = "addParticipant", this.$ = c[p - 1];
|
|
114
|
+
break;
|
|
115
|
+
case 51:
|
|
116
|
+
c[p - 3].draw = "actor", c[p - 3].type = "addParticipant", c[p - 3].description = b.parseMessage(c[p - 1]), this.$ = c[p - 3];
|
|
117
|
+
break;
|
|
118
|
+
case 52:
|
|
119
|
+
case 57:
|
|
120
|
+
c[p - 1].draw = "actor", c[p - 1].type = "addParticipant", this.$ = c[p - 1];
|
|
121
|
+
break;
|
|
122
|
+
case 53:
|
|
123
|
+
c[p - 1].type = "destroyParticipant", this.$ = c[p - 1];
|
|
124
|
+
break;
|
|
125
|
+
case 54:
|
|
126
|
+
c[p - 3].draw = "participant", c[p - 3].type = "addParticipant", c[p - 3].description = b.parseMessage(c[p - 1]), this.$ = c[p - 3];
|
|
127
|
+
break;
|
|
128
|
+
case 55:
|
|
129
|
+
c[p - 1].draw = "participant", c[p - 1].type = "addParticipant", this.$ = c[p - 1];
|
|
130
|
+
break;
|
|
131
|
+
case 56:
|
|
132
|
+
c[p - 3].draw = "actor", c[p - 3].type = "addParticipant", c[p - 3].description = b.parseMessage(c[p - 1]), this.$ = c[p - 3];
|
|
133
|
+
break;
|
|
134
|
+
case 58:
|
|
135
|
+
this.$ = [c[p - 1], { type: "addNote", placement: c[p - 2], actor: c[p - 1].actor, text: c[p] }];
|
|
136
|
+
break;
|
|
137
|
+
case 59:
|
|
138
|
+
c[p - 2] = [].concat(c[p - 1], c[p - 1]).slice(0, 2), c[p - 2][0] = c[p - 2][0].actor, c[p - 2][1] = c[p - 2][1].actor, this.$ = [c[p - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: c[p - 2].slice(0, 2), text: c[p] }];
|
|
139
|
+
break;
|
|
140
|
+
case 60:
|
|
141
|
+
this.$ = [c[p - 1], { type: "addLinks", actor: c[p - 1].actor, text: c[p] }];
|
|
142
|
+
break;
|
|
143
|
+
case 61:
|
|
144
|
+
this.$ = [c[p - 1], { type: "addALink", actor: c[p - 1].actor, text: c[p] }];
|
|
145
|
+
break;
|
|
146
|
+
case 62:
|
|
147
|
+
this.$ = [c[p - 1], { type: "addProperties", actor: c[p - 1].actor, text: c[p] }];
|
|
148
|
+
break;
|
|
149
|
+
case 63:
|
|
150
|
+
this.$ = [c[p - 1], { type: "addDetails", actor: c[p - 1].actor, text: c[p] }];
|
|
151
|
+
break;
|
|
152
|
+
case 66:
|
|
153
|
+
this.$ = [c[p - 2], c[p]];
|
|
154
|
+
break;
|
|
155
|
+
case 67:
|
|
156
|
+
this.$ = c[p];
|
|
157
|
+
break;
|
|
158
|
+
case 68:
|
|
159
|
+
this.$ = b.PLACEMENT.LEFTOF;
|
|
160
|
+
break;
|
|
161
|
+
case 69:
|
|
162
|
+
this.$ = b.PLACEMENT.RIGHTOF;
|
|
163
|
+
break;
|
|
164
|
+
case 70:
|
|
165
|
+
this.$ = [
|
|
166
|
+
c[p - 4],
|
|
167
|
+
c[p - 1],
|
|
168
|
+
{ type: "addMessage", from: c[p - 4].actor, to: c[p - 1].actor, signalType: c[p - 3], msg: c[p], activate: !0 },
|
|
169
|
+
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: c[p - 1].actor }
|
|
170
|
+
];
|
|
171
|
+
break;
|
|
172
|
+
case 71:
|
|
173
|
+
this.$ = [
|
|
174
|
+
c[p - 4],
|
|
175
|
+
c[p - 1],
|
|
176
|
+
{ type: "addMessage", from: c[p - 4].actor, to: c[p - 1].actor, signalType: c[p - 3], msg: c[p] },
|
|
177
|
+
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: c[p - 4].actor }
|
|
178
|
+
];
|
|
179
|
+
break;
|
|
180
|
+
case 72:
|
|
181
|
+
this.$ = [
|
|
182
|
+
c[p - 4],
|
|
183
|
+
c[p - 1],
|
|
184
|
+
{ type: "addMessage", from: c[p - 4].actor, to: c[p - 1].actor, signalType: c[p - 3], msg: c[p], activate: !0, centralConnection: b.LINETYPE.CENTRAL_CONNECTION },
|
|
185
|
+
{ type: "centralConnection", signalType: b.LINETYPE.CENTRAL_CONNECTION, actor: c[p - 1].actor }
|
|
186
|
+
];
|
|
187
|
+
break;
|
|
188
|
+
case 73:
|
|
189
|
+
this.$ = [
|
|
190
|
+
c[p - 4],
|
|
191
|
+
c[p - 1],
|
|
192
|
+
{ type: "addMessage", from: c[p - 4].actor, to: c[p - 1].actor, signalType: c[p - 2], msg: c[p], activate: !1, centralConnection: b.LINETYPE.CENTRAL_CONNECTION_REVERSE },
|
|
193
|
+
{ type: "centralConnectionReverse", signalType: b.LINETYPE.CENTRAL_CONNECTION_REVERSE, actor: c[p - 4].actor }
|
|
194
|
+
];
|
|
195
|
+
break;
|
|
196
|
+
case 74:
|
|
197
|
+
this.$ = [
|
|
198
|
+
c[p - 5],
|
|
199
|
+
c[p - 1],
|
|
200
|
+
{ type: "addMessage", from: c[p - 5].actor, to: c[p - 1].actor, signalType: c[p - 3], msg: c[p], activate: !0, centralConnection: b.LINETYPE.CENTRAL_CONNECTION_DUAL },
|
|
201
|
+
{ type: "centralConnection", signalType: b.LINETYPE.CENTRAL_CONNECTION, actor: c[p - 1].actor },
|
|
202
|
+
{ type: "centralConnectionReverse", signalType: b.LINETYPE.CENTRAL_CONNECTION_REVERSE, actor: c[p - 5].actor }
|
|
203
|
+
];
|
|
204
|
+
break;
|
|
205
|
+
case 75:
|
|
206
|
+
this.$ = [c[p - 3], c[p - 1], { type: "addMessage", from: c[p - 3].actor, to: c[p - 1].actor, signalType: c[p - 2], msg: c[p] }];
|
|
207
|
+
break;
|
|
208
|
+
case 76:
|
|
209
|
+
this.$ = {
|
|
210
|
+
type: "addParticipant",
|
|
211
|
+
actor: c[p - 1],
|
|
212
|
+
config: c[p]
|
|
213
|
+
};
|
|
214
|
+
break;
|
|
215
|
+
case 77:
|
|
216
|
+
this.$ = c[p - 1].trim();
|
|
217
|
+
break;
|
|
218
|
+
case 78:
|
|
219
|
+
this.$ = { type: "addParticipant", actor: c[p] };
|
|
220
|
+
break;
|
|
221
|
+
case 79:
|
|
222
|
+
this.$ = b.LINETYPE.SOLID_OPEN;
|
|
223
|
+
break;
|
|
224
|
+
case 80:
|
|
225
|
+
this.$ = b.LINETYPE.DOTTED_OPEN;
|
|
226
|
+
break;
|
|
227
|
+
case 81:
|
|
228
|
+
this.$ = b.LINETYPE.SOLID;
|
|
229
|
+
break;
|
|
230
|
+
case 82:
|
|
231
|
+
this.$ = b.LINETYPE.SOLID_TOP;
|
|
232
|
+
break;
|
|
233
|
+
case 83:
|
|
234
|
+
this.$ = b.LINETYPE.SOLID_BOTTOM;
|
|
235
|
+
break;
|
|
236
|
+
case 84:
|
|
237
|
+
this.$ = b.LINETYPE.STICK_TOP;
|
|
238
|
+
break;
|
|
239
|
+
case 85:
|
|
240
|
+
this.$ = b.LINETYPE.STICK_BOTTOM;
|
|
241
|
+
break;
|
|
242
|
+
case 86:
|
|
243
|
+
this.$ = b.LINETYPE.SOLID_TOP_DOTTED;
|
|
244
|
+
break;
|
|
245
|
+
case 87:
|
|
246
|
+
this.$ = b.LINETYPE.SOLID_BOTTOM_DOTTED;
|
|
247
|
+
break;
|
|
248
|
+
case 88:
|
|
249
|
+
this.$ = b.LINETYPE.STICK_TOP_DOTTED;
|
|
250
|
+
break;
|
|
251
|
+
case 89:
|
|
252
|
+
this.$ = b.LINETYPE.STICK_BOTTOM_DOTTED;
|
|
253
|
+
break;
|
|
254
|
+
case 90:
|
|
255
|
+
this.$ = b.LINETYPE.SOLID_ARROW_TOP_REVERSE;
|
|
256
|
+
break;
|
|
257
|
+
case 91:
|
|
258
|
+
this.$ = b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;
|
|
259
|
+
break;
|
|
260
|
+
case 92:
|
|
261
|
+
this.$ = b.LINETYPE.STICK_ARROW_TOP_REVERSE;
|
|
262
|
+
break;
|
|
263
|
+
case 93:
|
|
264
|
+
this.$ = b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;
|
|
265
|
+
break;
|
|
266
|
+
case 94:
|
|
267
|
+
this.$ = b.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;
|
|
268
|
+
break;
|
|
269
|
+
case 95:
|
|
270
|
+
this.$ = b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;
|
|
271
|
+
break;
|
|
272
|
+
case 96:
|
|
273
|
+
this.$ = b.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;
|
|
274
|
+
break;
|
|
275
|
+
case 97:
|
|
276
|
+
this.$ = b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;
|
|
277
|
+
break;
|
|
278
|
+
case 98:
|
|
279
|
+
this.$ = b.LINETYPE.BIDIRECTIONAL_SOLID;
|
|
280
|
+
break;
|
|
281
|
+
case 99:
|
|
282
|
+
this.$ = b.LINETYPE.DOTTED;
|
|
283
|
+
break;
|
|
284
|
+
case 100:
|
|
285
|
+
this.$ = b.LINETYPE.BIDIRECTIONAL_DOTTED;
|
|
286
|
+
break;
|
|
287
|
+
case 101:
|
|
288
|
+
this.$ = b.LINETYPE.SOLID_CROSS;
|
|
289
|
+
break;
|
|
290
|
+
case 102:
|
|
291
|
+
this.$ = b.LINETYPE.DOTTED_CROSS;
|
|
292
|
+
break;
|
|
293
|
+
case 103:
|
|
294
|
+
this.$ = b.LINETYPE.SOLID_POINT;
|
|
295
|
+
break;
|
|
296
|
+
case 104:
|
|
297
|
+
this.$ = b.LINETYPE.DOTTED_POINT;
|
|
298
|
+
break;
|
|
299
|
+
case 105:
|
|
300
|
+
this.$ = b.parseMessage(c[p].trim().substring(1));
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
}, "anonymous"),
|
|
304
|
+
table: [{ 3: 1, 4: t, 5: r, 6: a }, { 1: [3] }, { 3: 5, 4: t, 5: r, 6: a }, { 3: 6, 4: t, 5: r, 6: a }, e([1, 4, 5, 10, 14, 15, 19, 22, 24, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 51, 53, 54, 56, 61, 62, 63, 64, 73], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, e(M, [2, 5]), { 9: 48, 13: 13, 14: g, 15: h, 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, e(M, [2, 7]), e(M, [2, 8]), e(M, [2, 9]), e(M, [2, 15]), { 13: 49, 51: H, 53: z, 54: U }, { 16: [1, 50] }, { 5: [1, 51] }, { 5: [1, 54], 20: [1, 52], 21: [1, 53] }, { 23: 55, 73: $ }, { 23: 56, 73: $ }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, { 5: [1, 61] }, e(M, [2, 30]), e(M, [2, 31]), { 33: [1, 62] }, { 35: [1, 63] }, e(M, [2, 34]), { 16: [1, 64] }, { 16: [1, 65] }, { 16: [1, 66] }, { 16: [1, 67] }, { 16: [1, 68] }, { 16: [1, 69] }, { 16: [1, 70] }, { 16: [1, 71] }, { 23: 72, 55: 73, 73: Nt }, { 23: 75, 55: 76, 73: Nt }, { 23: 77, 73: $ }, { 69: 78, 72: [1, 79], 78: L, 79: k, 80: tt, 81: et, 82: W, 83: se, 84: ie, 85: ne, 86: oe, 87: ce, 88: de, 89: le, 90: he, 91: pe, 92: Te, 93: Ee, 94: ge, 95: ue, 96: Oe, 97: _e, 98: xe, 99: be, 100: me, 101: ye, 102: Ie, 103: fe }, { 57: 106, 59: [1, 107], 67: [1, 108], 68: [1, 109] }, { 23: 110, 73: $ }, { 23: 111, 73: $ }, { 23: 112, 73: $ }, { 23: 113, 73: $ }, e([5, 66, 72, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104], Re), e(M, [2, 6]), e(M, [2, 16]), e(Lt, [2, 10], { 11: 114 }), e(M, [2, 18]), { 5: [1, 116], 20: [1, 115] }, { 5: [1, 117] }, e(M, [2, 22]), { 5: [1, 118] }, { 5: [1, 119] }, e(M, [2, 25]), e(M, [2, 26]), e(M, [2, 27]), e(M, [2, 28]), e(M, [2, 29]), e(M, [2, 32]), e(M, [2, 33]), e(Pt, i, { 7: 120 }), e(Pt, i, { 7: 121 }), e(Pt, i, { 7: 122 }), e(Le, i, { 41: 123, 7: 124 }), e(Kt, i, { 43: 125, 7: 126 }), e(Kt, i, { 7: 126, 43: 127 }), e(Se, i, { 46: 128, 7: 129 }), e(Pt, i, { 7: 130 }), { 5: [1, 132], 52: [1, 131] }, { 5: [1, 134], 52: [1, 133] }, e(qt, Re, { 74: 135, 75: [1, 136] }), { 5: [1, 138], 52: [1, 137] }, { 5: [1, 140], 52: [1, 139] }, { 5: [1, 141] }, { 23: 145, 70: [1, 142], 71: [1, 143], 72: [1, 144], 73: $ }, { 69: 146, 78: L, 79: k, 80: tt, 81: et, 82: W, 83: se, 84: ie, 85: ne, 86: oe, 87: ce, 88: de, 89: le, 90: he, 91: pe, 92: Te, 93: Ee, 94: ge, 95: ue, 96: Oe, 97: _e, 98: xe, 99: be, 100: me, 101: ye, 102: Ie, 103: fe }, e(F, [2, 79]), e(F, [2, 80]), e(F, [2, 81]), e(F, [2, 82]), e(F, [2, 83]), e(F, [2, 84]), e(F, [2, 85]), e(F, [2, 86]), e(F, [2, 87]), e(F, [2, 88]), e(F, [2, 89]), e(F, [2, 90]), e(F, [2, 91]), e(F, [2, 92]), e(F, [2, 93]), e(F, [2, 94]), e(F, [2, 95]), e(F, [2, 96]), e(F, [2, 97]), e(F, [2, 98]), e(F, [2, 99]), e(F, [2, 100]), e(F, [2, 101]), e(F, [2, 102]), e(F, [2, 103]), e(F, [2, 104]), { 23: 147, 73: $ }, { 23: 149, 60: 148, 73: $ }, { 73: [2, 68] }, { 73: [2, 69] }, { 58: 150, 104: ct }, { 58: 152, 104: ct }, { 58: 153, 104: ct }, { 58: 154, 104: ct }, { 4: [1, 157], 5: [1, 159], 12: 156, 13: 158, 17: [1, 155], 51: H, 53: z, 54: U }, { 5: [1, 160] }, e(M, [2, 20]), e(M, [2, 21]), e(M, [2, 23]), e(M, [2, 24]), { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [1, 161], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [1, 162], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [1, 163], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 17: [1, 164] }, { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [2, 47], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 50: [1, 165], 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 17: [1, 166] }, { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [2, 45], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 49: [1, 167], 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 17: [1, 168] }, { 17: [1, 169] }, { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [2, 43], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 48: [1, 170], 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 4: d, 5: s, 8: 8, 9: 10, 10: n, 13: 13, 14: g, 15: h, 17: [1, 171], 18: 16, 19: o, 22: x, 23: 41, 24: O, 25: 20, 26: 21, 27: 22, 28: 23, 29: 24, 30: I, 31: _, 32: f, 34: E, 36: T, 37: y, 38: R, 39: S, 40: w, 42: P, 44: C, 45: v, 47: Y, 51: H, 53: z, 54: U, 56: X, 61: q, 62: it, 63: Z, 64: nt, 73: $ }, { 16: [1, 172] }, e(M, [2, 50]), { 16: [1, 173] }, e(M, [2, 55]), e(qt, [2, 76]), { 76: [1, 174] }, { 16: [1, 175] }, e(M, [2, 52]), { 16: [1, 176] }, e(M, [2, 57]), e(M, [2, 53]), { 23: 177, 73: $ }, { 23: 178, 73: $ }, { 23: 179, 73: $ }, { 58: 180, 104: ct }, { 23: 181, 72: [1, 182], 73: $ }, { 58: 183, 104: ct }, { 58: 184, 104: ct }, { 66: [1, 185], 104: [2, 67] }, { 5: [2, 60] }, { 5: [2, 105] }, { 5: [2, 61] }, { 5: [2, 62] }, { 5: [2, 63] }, e(M, [2, 17]), e(Lt, [2, 11]), { 13: 186, 51: H, 53: z, 54: U }, e(Lt, [2, 13]), e(Lt, [2, 14]), e(M, [2, 19]), e(M, [2, 35]), e(M, [2, 36]), e(M, [2, 37]), e(M, [2, 38]), { 16: [1, 187] }, e(M, [2, 39]), { 16: [1, 188] }, e(M, [2, 40]), e(M, [2, 41]), { 16: [1, 189] }, e(M, [2, 42]), { 5: [1, 190] }, { 5: [1, 191] }, { 77: [1, 192] }, { 5: [1, 193] }, { 5: [1, 194] }, { 58: 195, 104: ct }, { 58: 196, 104: ct }, { 58: 197, 104: ct }, { 5: [2, 75] }, { 58: 198, 104: ct }, { 23: 199, 73: $ }, { 5: [2, 58] }, { 5: [2, 59] }, { 23: 200, 73: $ }, e(Lt, [2, 12]), e(Le, i, { 7: 124, 41: 201 }), e(Kt, i, { 7: 126, 43: 202 }), e(Se, i, { 7: 129, 46: 203 }), e(M, [2, 49]), e(M, [2, 54]), e(qt, [2, 77]), e(M, [2, 51]), e(M, [2, 56]), { 5: [2, 70] }, { 5: [2, 71] }, { 5: [2, 72] }, { 5: [2, 73] }, { 58: 204, 104: ct }, { 104: [2, 66] }, { 17: [2, 48] }, { 17: [2, 46] }, { 17: [2, 44] }, { 5: [2, 74] }],
|
|
305
|
+
defaultActions: { 5: [2, 1], 6: [2, 2], 108: [2, 68], 109: [2, 69], 150: [2, 60], 151: [2, 105], 152: [2, 61], 153: [2, 62], 154: [2, 63], 180: [2, 75], 183: [2, 58], 184: [2, 59], 195: [2, 70], 196: [2, 71], 197: [2, 72], 198: [2, 73], 200: [2, 66], 201: [2, 48], 202: [2, 46], 203: [2, 44], 204: [2, 74] },
|
|
306
|
+
parseError: /* @__PURE__ */ u(function(ht, N) {
|
|
307
|
+
if (N.recoverable)
|
|
308
|
+
this.trace(ht);
|
|
309
|
+
else {
|
|
310
|
+
var A = new Error(ht);
|
|
311
|
+
throw A.hash = N, A;
|
|
312
|
+
}
|
|
313
|
+
}, "parseError"),
|
|
314
|
+
parse: /* @__PURE__ */ u(function(ht) {
|
|
315
|
+
var N = this, A = [0], b = [], V = [null], c = [], at = this.table, p = "", Dt = 0, we = 0, Xe = 2, Ne = 1, Je = c.slice.call(arguments, 1), j = Object.create(this.lexer), _t = { yy: {} };
|
|
316
|
+
for (var zt in this.yy)
|
|
317
|
+
Object.prototype.hasOwnProperty.call(this.yy, zt) && (_t.yy[zt] = this.yy[zt]);
|
|
318
|
+
j.setInput(ht, _t.yy), _t.yy.lexer = j, _t.yy.parser = this, typeof j.yylloc > "u" && (j.yylloc = {});
|
|
319
|
+
var Ut = j.yylloc;
|
|
320
|
+
c.push(Ut);
|
|
321
|
+
var Qe = j.options && j.options.ranges;
|
|
322
|
+
typeof _t.yy.parseError == "function" ? this.parseError = _t.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
323
|
+
function Ze(ot) {
|
|
324
|
+
A.length = A.length - 2 * ot, V.length = V.length - ot, c.length = c.length - ot;
|
|
325
|
+
}
|
|
326
|
+
u(Ze, "popStack");
|
|
327
|
+
function Pe() {
|
|
328
|
+
var ot;
|
|
329
|
+
return ot = b.pop() || j.lex() || Ne, typeof ot != "number" && (ot instanceof Array && (b = ot, ot = b.pop()), ot = N.symbols_[ot] || ot), ot;
|
|
330
|
+
}
|
|
331
|
+
u(Pe, "lex");
|
|
332
|
+
for (var rt, xt, dt, jt, It = {}, kt, Tt, Ae, Mt; ; ) {
|
|
333
|
+
if (xt = A[A.length - 1], this.defaultActions[xt] ? dt = this.defaultActions[xt] : ((rt === null || typeof rt > "u") && (rt = Pe()), dt = at[xt] && at[xt][rt]), typeof dt > "u" || !dt.length || !dt[0]) {
|
|
334
|
+
var Gt = "";
|
|
335
|
+
Mt = [];
|
|
336
|
+
for (kt in at[xt])
|
|
337
|
+
this.terminals_[kt] && kt > Xe && Mt.push("'" + this.terminals_[kt] + "'");
|
|
338
|
+
j.showPosition ? Gt = "Parse error on line " + (Dt + 1) + `:
|
|
339
|
+
` + j.showPosition() + `
|
|
340
|
+
Expecting ` + Mt.join(", ") + ", got '" + (this.terminals_[rt] || rt) + "'" : Gt = "Parse error on line " + (Dt + 1) + ": Unexpected " + (rt == Ne ? "end of input" : "'" + (this.terminals_[rt] || rt) + "'"), this.parseError(Gt, {
|
|
341
|
+
text: j.match,
|
|
342
|
+
token: this.terminals_[rt] || rt,
|
|
343
|
+
line: j.yylineno,
|
|
344
|
+
loc: Ut,
|
|
345
|
+
expected: Mt
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
if (dt[0] instanceof Array && dt.length > 1)
|
|
349
|
+
throw new Error("Parse Error: multiple actions possible at state: " + xt + ", token: " + rt);
|
|
350
|
+
switch (dt[0]) {
|
|
351
|
+
case 1:
|
|
352
|
+
A.push(rt), V.push(j.yytext), c.push(j.yylloc), A.push(dt[1]), rt = null, we = j.yyleng, p = j.yytext, Dt = j.yylineno, Ut = j.yylloc;
|
|
353
|
+
break;
|
|
354
|
+
case 2:
|
|
355
|
+
if (Tt = this.productions_[dt[1]][1], It.$ = V[V.length - Tt], It._$ = {
|
|
356
|
+
first_line: c[c.length - (Tt || 1)].first_line,
|
|
357
|
+
last_line: c[c.length - 1].last_line,
|
|
358
|
+
first_column: c[c.length - (Tt || 1)].first_column,
|
|
359
|
+
last_column: c[c.length - 1].last_column
|
|
360
|
+
}, Qe && (It._$.range = [
|
|
361
|
+
c[c.length - (Tt || 1)].range[0],
|
|
362
|
+
c[c.length - 1].range[1]
|
|
363
|
+
]), jt = this.performAction.apply(It, [
|
|
364
|
+
p,
|
|
365
|
+
we,
|
|
366
|
+
Dt,
|
|
367
|
+
_t.yy,
|
|
368
|
+
dt[1],
|
|
369
|
+
V,
|
|
370
|
+
c
|
|
371
|
+
].concat(Je)), typeof jt < "u")
|
|
372
|
+
return jt;
|
|
373
|
+
Tt && (A = A.slice(0, -1 * Tt * 2), V = V.slice(0, -1 * Tt), c = c.slice(0, -1 * Tt)), A.push(this.productions_[dt[1]][0]), V.push(It.$), c.push(It._$), Ae = at[A[A.length - 2]][A[A.length - 1]], A.push(Ae);
|
|
374
|
+
break;
|
|
375
|
+
case 3:
|
|
376
|
+
return !0;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return !0;
|
|
380
|
+
}, "parse")
|
|
381
|
+
}, Ge = /* @__PURE__ */ function() {
|
|
382
|
+
var ht = {
|
|
383
|
+
EOF: 1,
|
|
384
|
+
parseError: /* @__PURE__ */ u(function(N, A) {
|
|
385
|
+
if (this.yy.parser)
|
|
386
|
+
this.yy.parser.parseError(N, A);
|
|
387
|
+
else
|
|
388
|
+
throw new Error(N);
|
|
389
|
+
}, "parseError"),
|
|
390
|
+
// resets the lexer, sets new input
|
|
391
|
+
setInput: /* @__PURE__ */ u(function(N, A) {
|
|
392
|
+
return this.yy = A || this.yy || {}, this._input = N, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
393
|
+
first_line: 1,
|
|
394
|
+
first_column: 0,
|
|
395
|
+
last_line: 1,
|
|
396
|
+
last_column: 0
|
|
397
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
398
|
+
}, "setInput"),
|
|
399
|
+
// consumes and returns one char from the input
|
|
400
|
+
input: /* @__PURE__ */ u(function() {
|
|
401
|
+
var N = this._input[0];
|
|
402
|
+
this.yytext += N, this.yyleng++, this.offset++, this.match += N, this.matched += N;
|
|
403
|
+
var A = N.match(/(?:\r\n?|\n).*/g);
|
|
404
|
+
return A ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), N;
|
|
405
|
+
}, "input"),
|
|
406
|
+
// unshifts one char (or a string) into the input
|
|
407
|
+
unput: /* @__PURE__ */ u(function(N) {
|
|
408
|
+
var A = N.length, b = N.split(/(?:\r\n?|\n)/g);
|
|
409
|
+
this._input = N + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - A), this.offset -= A;
|
|
410
|
+
var V = this.match.split(/(?:\r\n?|\n)/g);
|
|
411
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
|
|
412
|
+
var c = this.yylloc.range;
|
|
413
|
+
return this.yylloc = {
|
|
414
|
+
first_line: this.yylloc.first_line,
|
|
415
|
+
last_line: this.yylineno + 1,
|
|
416
|
+
first_column: this.yylloc.first_column,
|
|
417
|
+
last_column: b ? (b.length === V.length ? this.yylloc.first_column : 0) + V[V.length - b.length].length - b[0].length : this.yylloc.first_column - A
|
|
418
|
+
}, this.options.ranges && (this.yylloc.range = [c[0], c[0] + this.yyleng - A]), this.yyleng = this.yytext.length, this;
|
|
419
|
+
}, "unput"),
|
|
420
|
+
// When called from action, caches matched text and appends it on next action
|
|
421
|
+
more: /* @__PURE__ */ u(function() {
|
|
422
|
+
return this._more = !0, this;
|
|
423
|
+
}, "more"),
|
|
424
|
+
// 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.
|
|
425
|
+
reject: /* @__PURE__ */ u(function() {
|
|
426
|
+
if (this.options.backtrack_lexer)
|
|
427
|
+
this._backtrack = !0;
|
|
428
|
+
else
|
|
429
|
+
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).
|
|
430
|
+
` + this.showPosition(), {
|
|
431
|
+
text: "",
|
|
432
|
+
token: null,
|
|
433
|
+
line: this.yylineno
|
|
434
|
+
});
|
|
435
|
+
return this;
|
|
436
|
+
}, "reject"),
|
|
437
|
+
// retain first n characters of the match
|
|
438
|
+
less: /* @__PURE__ */ u(function(N) {
|
|
439
|
+
this.unput(this.match.slice(N));
|
|
440
|
+
}, "less"),
|
|
441
|
+
// displays already matched input, i.e. for error messages
|
|
442
|
+
pastInput: /* @__PURE__ */ u(function() {
|
|
443
|
+
var N = this.matched.substr(0, this.matched.length - this.match.length);
|
|
444
|
+
return (N.length > 20 ? "..." : "") + N.substr(-20).replace(/\n/g, "");
|
|
445
|
+
}, "pastInput"),
|
|
446
|
+
// displays upcoming input, i.e. for error messages
|
|
447
|
+
upcomingInput: /* @__PURE__ */ u(function() {
|
|
448
|
+
var N = this.match;
|
|
449
|
+
return N.length < 20 && (N += this._input.substr(0, 20 - N.length)), (N.substr(0, 20) + (N.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
450
|
+
}, "upcomingInput"),
|
|
451
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
452
|
+
showPosition: /* @__PURE__ */ u(function() {
|
|
453
|
+
var N = this.pastInput(), A = new Array(N.length + 1).join("-");
|
|
454
|
+
return N + this.upcomingInput() + `
|
|
455
|
+
` + A + "^";
|
|
456
|
+
}, "showPosition"),
|
|
457
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
458
|
+
test_match: /* @__PURE__ */ u(function(N, A) {
|
|
459
|
+
var b, V, c;
|
|
460
|
+
if (this.options.backtrack_lexer && (c = {
|
|
461
|
+
yylineno: this.yylineno,
|
|
462
|
+
yylloc: {
|
|
463
|
+
first_line: this.yylloc.first_line,
|
|
464
|
+
last_line: this.last_line,
|
|
465
|
+
first_column: this.yylloc.first_column,
|
|
466
|
+
last_column: this.yylloc.last_column
|
|
467
|
+
},
|
|
468
|
+
yytext: this.yytext,
|
|
469
|
+
match: this.match,
|
|
470
|
+
matches: this.matches,
|
|
471
|
+
matched: this.matched,
|
|
472
|
+
yyleng: this.yyleng,
|
|
473
|
+
offset: this.offset,
|
|
474
|
+
_more: this._more,
|
|
475
|
+
_input: this._input,
|
|
476
|
+
yy: this.yy,
|
|
477
|
+
conditionStack: this.conditionStack.slice(0),
|
|
478
|
+
done: this.done
|
|
479
|
+
}, this.options.ranges && (c.yylloc.range = this.yylloc.range.slice(0))), V = N[0].match(/(?:\r\n?|\n).*/g), V && (this.yylineno += V.length), this.yylloc = {
|
|
480
|
+
first_line: this.yylloc.last_line,
|
|
481
|
+
last_line: this.yylineno + 1,
|
|
482
|
+
first_column: this.yylloc.last_column,
|
|
483
|
+
last_column: V ? V[V.length - 1].length - V[V.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + N[0].length
|
|
484
|
+
}, this.yytext += N[0], this.match += N[0], this.matches = N, 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(N[0].length), this.matched += N[0], b = this.performAction.call(this, this.yy, this, A, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b)
|
|
485
|
+
return b;
|
|
486
|
+
if (this._backtrack) {
|
|
487
|
+
for (var at in c)
|
|
488
|
+
this[at] = c[at];
|
|
489
|
+
return !1;
|
|
490
|
+
}
|
|
491
|
+
return !1;
|
|
492
|
+
}, "test_match"),
|
|
493
|
+
// return next match in input
|
|
494
|
+
next: /* @__PURE__ */ u(function() {
|
|
495
|
+
if (this.done)
|
|
496
|
+
return this.EOF;
|
|
497
|
+
this._input || (this.done = !0);
|
|
498
|
+
var N, A, b, V;
|
|
499
|
+
this._more || (this.yytext = "", this.match = "");
|
|
500
|
+
for (var c = this._currentRules(), at = 0; at < c.length; at++)
|
|
501
|
+
if (b = this._input.match(this.rules[c[at]]), b && (!A || b[0].length > A[0].length)) {
|
|
502
|
+
if (A = b, V = at, this.options.backtrack_lexer) {
|
|
503
|
+
if (N = this.test_match(b, c[at]), N !== !1)
|
|
504
|
+
return N;
|
|
505
|
+
if (this._backtrack) {
|
|
506
|
+
A = !1;
|
|
507
|
+
continue;
|
|
508
|
+
} else
|
|
509
|
+
return !1;
|
|
510
|
+
} else if (!this.options.flex)
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
return A ? (N = this.test_match(A, c[V]), N !== !1 ? N : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
514
|
+
` + this.showPosition(), {
|
|
515
|
+
text: "",
|
|
516
|
+
token: null,
|
|
517
|
+
line: this.yylineno
|
|
518
|
+
});
|
|
519
|
+
}, "next"),
|
|
520
|
+
// return next match that has a token
|
|
521
|
+
lex: /* @__PURE__ */ u(function() {
|
|
522
|
+
var N = this.next();
|
|
523
|
+
return N || this.lex();
|
|
524
|
+
}, "lex"),
|
|
525
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
526
|
+
begin: /* @__PURE__ */ u(function(N) {
|
|
527
|
+
this.conditionStack.push(N);
|
|
528
|
+
}, "begin"),
|
|
529
|
+
// pop the previously active lexer condition state off the condition stack
|
|
530
|
+
popState: /* @__PURE__ */ u(function() {
|
|
531
|
+
var N = this.conditionStack.length - 1;
|
|
532
|
+
return N > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
533
|
+
}, "popState"),
|
|
534
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
535
|
+
_currentRules: /* @__PURE__ */ u(function() {
|
|
536
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
537
|
+
}, "_currentRules"),
|
|
538
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
539
|
+
topState: /* @__PURE__ */ u(function(N) {
|
|
540
|
+
return N = this.conditionStack.length - 1 - Math.abs(N || 0), N >= 0 ? this.conditionStack[N] : "INITIAL";
|
|
541
|
+
}, "topState"),
|
|
542
|
+
// alias for begin(condition)
|
|
543
|
+
pushState: /* @__PURE__ */ u(function(N) {
|
|
544
|
+
this.begin(N);
|
|
545
|
+
}, "pushState"),
|
|
546
|
+
// return the number of states currently on the stack
|
|
547
|
+
stateStackSize: /* @__PURE__ */ u(function() {
|
|
548
|
+
return this.conditionStack.length;
|
|
549
|
+
}, "stateStackSize"),
|
|
550
|
+
options: { "case-insensitive": !0 },
|
|
551
|
+
performAction: /* @__PURE__ */ u(function(N, A, b, V) {
|
|
552
|
+
switch (b) {
|
|
553
|
+
case 0:
|
|
554
|
+
return 5;
|
|
555
|
+
case 1:
|
|
556
|
+
break;
|
|
557
|
+
case 2:
|
|
558
|
+
break;
|
|
559
|
+
case 3:
|
|
560
|
+
break;
|
|
561
|
+
case 4:
|
|
562
|
+
break;
|
|
563
|
+
case 5:
|
|
564
|
+
break;
|
|
565
|
+
case 6:
|
|
566
|
+
return 20;
|
|
567
|
+
case 7:
|
|
568
|
+
return this.begin("CONFIG"), 75;
|
|
569
|
+
case 8:
|
|
570
|
+
return 76;
|
|
571
|
+
case 9:
|
|
572
|
+
return this.popState(), this.begin("ALIAS"), 77;
|
|
573
|
+
case 10:
|
|
574
|
+
return this.popState(), this.popState(), 77;
|
|
575
|
+
case 11:
|
|
576
|
+
return A.yytext = A.yytext.trim(), 73;
|
|
577
|
+
case 12:
|
|
578
|
+
return A.yytext = A.yytext.trim(), this.begin("ALIAS"), 73;
|
|
579
|
+
case 13:
|
|
580
|
+
return A.yytext = A.yytext.trim(), this.popState(), 73;
|
|
581
|
+
case 14:
|
|
582
|
+
return this.popState(), 10;
|
|
583
|
+
case 15:
|
|
584
|
+
return A.yytext = A.yytext.trim(), this.popState(), 10;
|
|
585
|
+
case 16:
|
|
586
|
+
return this.begin("LINE"), 15;
|
|
587
|
+
case 17:
|
|
588
|
+
return this.begin("ID"), 51;
|
|
589
|
+
case 18:
|
|
590
|
+
return this.begin("ID"), 53;
|
|
591
|
+
case 19:
|
|
592
|
+
return 14;
|
|
593
|
+
case 20:
|
|
594
|
+
return this.begin("ID"), 54;
|
|
595
|
+
case 21:
|
|
596
|
+
return this.popState(), this.popState(), this.begin("LINE"), 52;
|
|
597
|
+
case 22:
|
|
598
|
+
return this.popState(), this.popState(), 5;
|
|
599
|
+
case 23:
|
|
600
|
+
return this.begin("LINE"), 37;
|
|
601
|
+
case 24:
|
|
602
|
+
return this.begin("LINE"), 38;
|
|
603
|
+
case 25:
|
|
604
|
+
return this.begin("LINE"), 39;
|
|
605
|
+
case 26:
|
|
606
|
+
return this.begin("LINE"), 40;
|
|
607
|
+
case 27:
|
|
608
|
+
return this.begin("LINE"), 50;
|
|
609
|
+
case 28:
|
|
610
|
+
return this.begin("LINE"), 42;
|
|
611
|
+
case 29:
|
|
612
|
+
return this.begin("LINE"), 44;
|
|
613
|
+
case 30:
|
|
614
|
+
return this.begin("LINE"), 49;
|
|
615
|
+
case 31:
|
|
616
|
+
return this.begin("LINE"), 45;
|
|
617
|
+
case 32:
|
|
618
|
+
return this.begin("LINE"), 48;
|
|
619
|
+
case 33:
|
|
620
|
+
return this.begin("LINE"), 47;
|
|
621
|
+
case 34:
|
|
622
|
+
return this.popState(), 16;
|
|
623
|
+
case 35:
|
|
624
|
+
return 17;
|
|
625
|
+
case 36:
|
|
626
|
+
return 67;
|
|
627
|
+
case 37:
|
|
628
|
+
return 68;
|
|
629
|
+
case 38:
|
|
630
|
+
return 61;
|
|
631
|
+
case 39:
|
|
632
|
+
return 62;
|
|
633
|
+
case 40:
|
|
634
|
+
return 63;
|
|
635
|
+
case 41:
|
|
636
|
+
return 64;
|
|
637
|
+
case 42:
|
|
638
|
+
return 59;
|
|
639
|
+
case 43:
|
|
640
|
+
return 56;
|
|
641
|
+
case 44:
|
|
642
|
+
return this.begin("ID"), 22;
|
|
643
|
+
case 45:
|
|
644
|
+
return this.begin("ID"), 24;
|
|
645
|
+
case 46:
|
|
646
|
+
return 30;
|
|
647
|
+
case 47:
|
|
648
|
+
return 31;
|
|
649
|
+
case 48:
|
|
650
|
+
return this.begin("acc_title"), 32;
|
|
651
|
+
case 49:
|
|
652
|
+
return this.popState(), "acc_title_value";
|
|
653
|
+
case 50:
|
|
654
|
+
return this.begin("acc_descr"), 34;
|
|
655
|
+
case 51:
|
|
656
|
+
return this.popState(), "acc_descr_value";
|
|
657
|
+
case 52:
|
|
658
|
+
this.begin("acc_descr_multiline");
|
|
659
|
+
break;
|
|
660
|
+
case 53:
|
|
661
|
+
this.popState();
|
|
662
|
+
break;
|
|
663
|
+
case 54:
|
|
664
|
+
return "acc_descr_multiline_value";
|
|
665
|
+
case 55:
|
|
666
|
+
return 6;
|
|
667
|
+
case 56:
|
|
668
|
+
return 19;
|
|
669
|
+
case 57:
|
|
670
|
+
return 21;
|
|
671
|
+
case 58:
|
|
672
|
+
return 66;
|
|
673
|
+
case 59:
|
|
674
|
+
return 5;
|
|
675
|
+
case 60:
|
|
676
|
+
return A.yytext = A.yytext.trim(), 73;
|
|
677
|
+
case 61:
|
|
678
|
+
return 80;
|
|
679
|
+
case 62:
|
|
680
|
+
return 97;
|
|
681
|
+
case 63:
|
|
682
|
+
return 98;
|
|
683
|
+
case 64:
|
|
684
|
+
return 99;
|
|
685
|
+
case 65:
|
|
686
|
+
return 78;
|
|
687
|
+
case 66:
|
|
688
|
+
return 79;
|
|
689
|
+
case 67:
|
|
690
|
+
return 100;
|
|
691
|
+
case 68:
|
|
692
|
+
return 101;
|
|
693
|
+
case 69:
|
|
694
|
+
return 102;
|
|
695
|
+
case 70:
|
|
696
|
+
return 103;
|
|
697
|
+
case 71:
|
|
698
|
+
return 85;
|
|
699
|
+
case 72:
|
|
700
|
+
return 86;
|
|
701
|
+
case 73:
|
|
702
|
+
return 87;
|
|
703
|
+
case 74:
|
|
704
|
+
return 88;
|
|
705
|
+
case 75:
|
|
706
|
+
return 93;
|
|
707
|
+
case 76:
|
|
708
|
+
return 94;
|
|
709
|
+
case 77:
|
|
710
|
+
return 95;
|
|
711
|
+
case 78:
|
|
712
|
+
return 96;
|
|
713
|
+
case 79:
|
|
714
|
+
return 81;
|
|
715
|
+
case 80:
|
|
716
|
+
return 82;
|
|
717
|
+
case 81:
|
|
718
|
+
return 83;
|
|
719
|
+
case 82:
|
|
720
|
+
return 84;
|
|
721
|
+
case 83:
|
|
722
|
+
return 89;
|
|
723
|
+
case 84:
|
|
724
|
+
return 90;
|
|
725
|
+
case 85:
|
|
726
|
+
return 91;
|
|
727
|
+
case 86:
|
|
728
|
+
return 92;
|
|
729
|
+
case 87:
|
|
730
|
+
return 104;
|
|
731
|
+
case 88:
|
|
732
|
+
return 104;
|
|
733
|
+
case 89:
|
|
734
|
+
return 70;
|
|
735
|
+
case 90:
|
|
736
|
+
return 71;
|
|
737
|
+
case 91:
|
|
738
|
+
return 72;
|
|
739
|
+
case 92:
|
|
740
|
+
return 5;
|
|
741
|
+
case 93:
|
|
742
|
+
return 10;
|
|
743
|
+
}
|
|
744
|
+
}, "anonymous"),
|
|
745
|
+
rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:@\{)/i, /^(?:[^\}]+)/i, /^(?:\}(?=\s+as\s))/i, /^(?:\})/i, /^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i, /^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i, /^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i, /^(?:[^<>:\n,;@]*<[^\n]*)/i, /^(?:[^\n]+)/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/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, /^(?:--\|\\)/i, /^(?:--\|\/)/i, /^(?:--\\\\)/i, /^(?:--\/\/)/i, /^(?:\/\|--)/i, /^(?:\\\|--)/i, /^(?:\/\/--)/i, /^(?:\\\\--)/i, /^(?:-\|\\)/i, /^(?:-\|\/)/i, /^(?:-\\\\)/i, /^(?:-\/\/)/i, /^(?:\/\|-)/i, /^(?:\\\|-)/i, /^(?:\/\/-)/i, /^(?:\\\\-)/i, /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i, /^(?::)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:\(\))/i, /^(?:$)/i, /^(?:.)/i],
|
|
746
|
+
conditions: { acc_descr_multiline: { rules: [53, 54], inclusive: !1 }, acc_descr: { rules: [51], inclusive: !1 }, acc_title: { rules: [49], inclusive: !1 }, ID: { rules: [2, 3, 7, 11, 12, 13, 14, 15], inclusive: !1 }, ALIAS: { rules: [2, 3, 21, 22], inclusive: !1 }, LINE: { rules: [2, 3, 34], inclusive: !1 }, CONFIG: { rules: [8, 9, 10], inclusive: !1 }, CONFIG_DATA: { rules: [], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 4, 5, 6, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 52, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93], inclusive: !0 } }
|
|
747
|
+
};
|
|
748
|
+
return ht;
|
|
749
|
+
}();
|
|
750
|
+
Ht.lexer = Ge;
|
|
751
|
+
function At() {
|
|
752
|
+
this.yy = {};
|
|
753
|
+
}
|
|
754
|
+
return u(At, "Parser"), At.prototype = Ht, Ht.Parser = At, new At();
|
|
755
|
+
}();
|
|
756
|
+
Qt.parser = Qt;
|
|
757
|
+
var ua = Qt, Oa = {
|
|
758
|
+
SOLID: 0,
|
|
759
|
+
DOTTED: 1,
|
|
760
|
+
NOTE: 2,
|
|
761
|
+
SOLID_CROSS: 3,
|
|
762
|
+
DOTTED_CROSS: 4,
|
|
763
|
+
SOLID_OPEN: 5,
|
|
764
|
+
DOTTED_OPEN: 6,
|
|
765
|
+
LOOP_START: 10,
|
|
766
|
+
LOOP_END: 11,
|
|
767
|
+
ALT_START: 12,
|
|
768
|
+
ALT_ELSE: 13,
|
|
769
|
+
ALT_END: 14,
|
|
770
|
+
OPT_START: 15,
|
|
771
|
+
OPT_END: 16,
|
|
772
|
+
ACTIVE_START: 17,
|
|
773
|
+
ACTIVE_END: 18,
|
|
774
|
+
PAR_START: 19,
|
|
775
|
+
PAR_AND: 20,
|
|
776
|
+
PAR_END: 21,
|
|
777
|
+
RECT_START: 22,
|
|
778
|
+
RECT_END: 23,
|
|
779
|
+
SOLID_POINT: 24,
|
|
780
|
+
DOTTED_POINT: 25,
|
|
781
|
+
AUTONUMBER: 26,
|
|
782
|
+
CRITICAL_START: 27,
|
|
783
|
+
CRITICAL_OPTION: 28,
|
|
784
|
+
CRITICAL_END: 29,
|
|
785
|
+
BREAK_START: 30,
|
|
786
|
+
BREAK_END: 31,
|
|
787
|
+
PAR_OVER_START: 32,
|
|
788
|
+
BIDIRECTIONAL_SOLID: 33,
|
|
789
|
+
BIDIRECTIONAL_DOTTED: 34,
|
|
790
|
+
SOLID_TOP: 41,
|
|
791
|
+
SOLID_BOTTOM: 42,
|
|
792
|
+
STICK_TOP: 43,
|
|
793
|
+
STICK_BOTTOM: 44,
|
|
794
|
+
SOLID_ARROW_TOP_REVERSE: 45,
|
|
795
|
+
SOLID_ARROW_BOTTOM_REVERSE: 46,
|
|
796
|
+
STICK_ARROW_TOP_REVERSE: 47,
|
|
797
|
+
STICK_ARROW_BOTTOM_REVERSE: 48,
|
|
798
|
+
SOLID_TOP_DOTTED: 51,
|
|
799
|
+
SOLID_BOTTOM_DOTTED: 52,
|
|
800
|
+
STICK_TOP_DOTTED: 53,
|
|
801
|
+
STICK_BOTTOM_DOTTED: 54,
|
|
802
|
+
SOLID_ARROW_TOP_REVERSE_DOTTED: 55,
|
|
803
|
+
SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 56,
|
|
804
|
+
STICK_ARROW_TOP_REVERSE_DOTTED: 57,
|
|
805
|
+
STICK_ARROW_BOTTOM_REVERSE_DOTTED: 58,
|
|
806
|
+
CENTRAL_CONNECTION: 59,
|
|
807
|
+
CENTRAL_CONNECTION_REVERSE: 60,
|
|
808
|
+
CENTRAL_CONNECTION_DUAL: 61
|
|
809
|
+
}, _a = {
|
|
810
|
+
FILLED: 0,
|
|
811
|
+
OPEN: 1
|
|
812
|
+
}, xa = {
|
|
813
|
+
LEFTOF: 0,
|
|
814
|
+
RIGHTOF: 1,
|
|
815
|
+
OVER: 2
|
|
816
|
+
}, Bt = {
|
|
817
|
+
ACTOR: "actor",
|
|
818
|
+
CONTROL: "control",
|
|
819
|
+
DATABASE: "database",
|
|
820
|
+
ENTITY: "entity"
|
|
821
|
+
}, Xt, ba = (Xt = class {
|
|
822
|
+
constructor() {
|
|
823
|
+
this.state = new ga(() => ({
|
|
824
|
+
prevActor: void 0,
|
|
825
|
+
actors: /* @__PURE__ */ new Map(),
|
|
826
|
+
createdActors: /* @__PURE__ */ new Map(),
|
|
827
|
+
destroyedActors: /* @__PURE__ */ new Map(),
|
|
828
|
+
boxes: [],
|
|
829
|
+
messages: [],
|
|
830
|
+
notes: [],
|
|
831
|
+
sequenceNumbersEnabled: !1,
|
|
832
|
+
wrapEnabled: void 0,
|
|
833
|
+
currentBox: void 0,
|
|
834
|
+
lastCreated: void 0,
|
|
835
|
+
lastDestroyed: void 0
|
|
836
|
+
})), this.setAccTitle = De, this.setAccDescription = ra, this.setDiagramTitle = sa, this.getAccTitle = ia, this.getAccDescription = na, this.getDiagramTitle = oa, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(Q().wrap), this.LINETYPE = Oa, this.ARROWTYPE = _a, this.PLACEMENT = xa;
|
|
837
|
+
}
|
|
838
|
+
addBox(e) {
|
|
839
|
+
this.state.records.boxes.push({
|
|
840
|
+
name: e.text,
|
|
841
|
+
wrap: e.wrap ?? this.autoWrap(),
|
|
842
|
+
fill: e.color,
|
|
843
|
+
actorKeys: []
|
|
844
|
+
}), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
|
|
845
|
+
}
|
|
846
|
+
addActor(e, t, r, a, i) {
|
|
847
|
+
let d = this.state.records.currentBox, s;
|
|
848
|
+
if (i !== void 0) {
|
|
849
|
+
let g;
|
|
850
|
+
i.includes(`
|
|
851
|
+
`) ? g = i + `
|
|
852
|
+
` : g = `{
|
|
853
|
+
` + i + `
|
|
854
|
+
}`, s = ca(g, { schema: da });
|
|
855
|
+
}
|
|
856
|
+
a = (s == null ? void 0 : s.type) ?? a, s != null && s.alias && (!r || r.text === t) && (r = { text: s.alias, wrap: r == null ? void 0 : r.wrap, type: a });
|
|
857
|
+
const n = this.state.records.actors.get(e);
|
|
858
|
+
if (n) {
|
|
859
|
+
if (this.state.records.currentBox && n.box && this.state.records.currentBox !== n.box)
|
|
860
|
+
throw new Error(
|
|
861
|
+
`A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`
|
|
862
|
+
);
|
|
863
|
+
if (d = n.box ? n.box : this.state.records.currentBox, n.box = d, n && t === n.name && r == null)
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
if ((r == null ? void 0 : r.text) == null && (r = { text: t, type: a }), (a == null || r.text == null) && (r = { text: t, type: a }), this.state.records.actors.set(e, {
|
|
867
|
+
box: d,
|
|
868
|
+
name: t,
|
|
869
|
+
description: r.text,
|
|
870
|
+
wrap: r.wrap ?? this.autoWrap(),
|
|
871
|
+
prevActor: this.state.records.prevActor,
|
|
872
|
+
links: {},
|
|
873
|
+
properties: {},
|
|
874
|
+
actorCnt: null,
|
|
875
|
+
rectData: null,
|
|
876
|
+
type: a ?? "participant"
|
|
877
|
+
}), this.state.records.prevActor) {
|
|
878
|
+
const g = this.state.records.actors.get(this.state.records.prevActor);
|
|
879
|
+
g && (g.nextActor = e);
|
|
880
|
+
}
|
|
881
|
+
this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(e), this.state.records.prevActor = e;
|
|
882
|
+
}
|
|
883
|
+
activationCount(e) {
|
|
884
|
+
let t, r = 0;
|
|
885
|
+
if (!e)
|
|
886
|
+
return 0;
|
|
887
|
+
for (t = 0; t < this.state.records.messages.length; t++)
|
|
888
|
+
this.state.records.messages[t].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[t].from === e && r++, this.state.records.messages[t].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[t].from === e && r--;
|
|
889
|
+
return r;
|
|
890
|
+
}
|
|
891
|
+
addMessage(e, t, r, a) {
|
|
892
|
+
this.state.records.messages.push({
|
|
893
|
+
id: this.state.records.messages.length.toString(),
|
|
894
|
+
from: e,
|
|
895
|
+
to: t,
|
|
896
|
+
message: r.text,
|
|
897
|
+
wrap: r.wrap ?? this.autoWrap(),
|
|
898
|
+
answer: a
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
addSignal(e, t, r, a, i = !1, d) {
|
|
902
|
+
if (a === this.LINETYPE.ACTIVE_END && this.activationCount(e ?? "") < 1) {
|
|
903
|
+
const s = new Error("Trying to inactivate an inactive participant (" + e + ")");
|
|
904
|
+
throw s.hash = {
|
|
905
|
+
text: "->>-",
|
|
906
|
+
token: "->>-",
|
|
907
|
+
line: "1",
|
|
908
|
+
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
909
|
+
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
910
|
+
}, s;
|
|
911
|
+
}
|
|
912
|
+
return this.state.records.messages.push({
|
|
913
|
+
id: this.state.records.messages.length.toString(),
|
|
914
|
+
from: e,
|
|
915
|
+
to: t,
|
|
916
|
+
message: (r == null ? void 0 : r.text) ?? "",
|
|
917
|
+
wrap: (r == null ? void 0 : r.wrap) ?? this.autoWrap(),
|
|
918
|
+
type: a,
|
|
919
|
+
activate: i,
|
|
920
|
+
centralConnection: d ?? 0
|
|
921
|
+
}), !0;
|
|
922
|
+
}
|
|
923
|
+
hasAtLeastOneBox() {
|
|
924
|
+
return this.state.records.boxes.length > 0;
|
|
925
|
+
}
|
|
926
|
+
hasAtLeastOneBoxWithTitle() {
|
|
927
|
+
return this.state.records.boxes.some((e) => e.name);
|
|
928
|
+
}
|
|
929
|
+
getMessages() {
|
|
930
|
+
return this.state.records.messages;
|
|
931
|
+
}
|
|
932
|
+
getBoxes() {
|
|
933
|
+
return this.state.records.boxes;
|
|
934
|
+
}
|
|
935
|
+
getActors() {
|
|
936
|
+
return this.state.records.actors;
|
|
937
|
+
}
|
|
938
|
+
getCreatedActors() {
|
|
939
|
+
return this.state.records.createdActors;
|
|
940
|
+
}
|
|
941
|
+
getDestroyedActors() {
|
|
942
|
+
return this.state.records.destroyedActors;
|
|
943
|
+
}
|
|
944
|
+
getActor(e) {
|
|
945
|
+
return this.state.records.actors.get(e);
|
|
946
|
+
}
|
|
947
|
+
getActorKeys() {
|
|
948
|
+
return [...this.state.records.actors.keys()];
|
|
949
|
+
}
|
|
950
|
+
enableSequenceNumbers() {
|
|
951
|
+
this.state.records.sequenceNumbersEnabled = !0;
|
|
952
|
+
}
|
|
953
|
+
disableSequenceNumbers() {
|
|
954
|
+
this.state.records.sequenceNumbersEnabled = !1;
|
|
955
|
+
}
|
|
956
|
+
showSequenceNumbers() {
|
|
957
|
+
return this.state.records.sequenceNumbersEnabled;
|
|
958
|
+
}
|
|
959
|
+
setWrap(e) {
|
|
960
|
+
this.state.records.wrapEnabled = e;
|
|
961
|
+
}
|
|
962
|
+
extractWrap(e) {
|
|
963
|
+
if (e === void 0)
|
|
964
|
+
return {};
|
|
965
|
+
e = e.trim();
|
|
966
|
+
const t = /^:?wrap:/.exec(e) !== null ? !0 : /^:?nowrap:/.exec(e) !== null ? !1 : void 0;
|
|
967
|
+
return { cleanedText: (t === void 0 ? e : e.replace(/^:?(?:no)?wrap:/, "")).trim(), wrap: t };
|
|
968
|
+
}
|
|
969
|
+
autoWrap() {
|
|
970
|
+
var e;
|
|
971
|
+
return this.state.records.wrapEnabled !== void 0 ? this.state.records.wrapEnabled : ((e = Q().sequence) == null ? void 0 : e.wrap) ?? !1;
|
|
972
|
+
}
|
|
973
|
+
clear() {
|
|
974
|
+
this.state.reset(), la();
|
|
975
|
+
}
|
|
976
|
+
parseMessage(e) {
|
|
977
|
+
const t = e.trim(), { wrap: r, cleanedText: a } = this.extractWrap(t), i = {
|
|
978
|
+
text: a,
|
|
979
|
+
wrap: r
|
|
980
|
+
};
|
|
981
|
+
return st.debug(`parseMessage: ${JSON.stringify(i)}`), i;
|
|
982
|
+
}
|
|
983
|
+
// We expect the box statement to be color first then description
|
|
984
|
+
// The color can be rgb,rgba,hsl,hsla, or css code names #hex codes are not supported for now because of the way the char # is handled
|
|
985
|
+
// We extract first segment as color, the rest of the line is considered as text
|
|
986
|
+
parseBoxData(e) {
|
|
987
|
+
const t = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e);
|
|
988
|
+
let r = t != null && t[1] ? t[1].trim() : "transparent", a = t != null && t[2] ? t[2].trim() : void 0;
|
|
989
|
+
if (window != null && window.CSS)
|
|
990
|
+
window.CSS.supports("color", r) || (r = "transparent", a = e.trim());
|
|
991
|
+
else {
|
|
992
|
+
const s = new Option().style;
|
|
993
|
+
s.color = r, s.color !== r && (r = "transparent", a = e.trim());
|
|
994
|
+
}
|
|
995
|
+
const { wrap: i, cleanedText: d } = this.extractWrap(a);
|
|
996
|
+
return {
|
|
997
|
+
text: d ? vt(d, Q()) : void 0,
|
|
998
|
+
color: r,
|
|
999
|
+
wrap: i
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
addNote(e, t, r) {
|
|
1003
|
+
const a = {
|
|
1004
|
+
actor: e,
|
|
1005
|
+
placement: t,
|
|
1006
|
+
message: r.text,
|
|
1007
|
+
wrap: r.wrap ?? this.autoWrap()
|
|
1008
|
+
}, i = [].concat(e, e);
|
|
1009
|
+
this.state.records.notes.push(a), this.state.records.messages.push({
|
|
1010
|
+
id: this.state.records.messages.length.toString(),
|
|
1011
|
+
from: i[0],
|
|
1012
|
+
to: i[1],
|
|
1013
|
+
message: r.text,
|
|
1014
|
+
wrap: r.wrap ?? this.autoWrap(),
|
|
1015
|
+
type: this.LINETYPE.NOTE,
|
|
1016
|
+
placement: t
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
addLinks(e, t) {
|
|
1020
|
+
const r = this.getActor(e);
|
|
1021
|
+
try {
|
|
1022
|
+
let a = vt(t.text, Q());
|
|
1023
|
+
a = a.replace(/=/g, "="), a = a.replace(/&/g, "&");
|
|
1024
|
+
const i = JSON.parse(a);
|
|
1025
|
+
this.insertLinks(r, i);
|
|
1026
|
+
} catch (a) {
|
|
1027
|
+
st.error("error while parsing actor link text", a);
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
addALink(e, t) {
|
|
1031
|
+
const r = this.getActor(e);
|
|
1032
|
+
try {
|
|
1033
|
+
const a = {};
|
|
1034
|
+
let i = vt(t.text, Q());
|
|
1035
|
+
const d = i.indexOf("@");
|
|
1036
|
+
i = i.replace(/=/g, "="), i = i.replace(/&/g, "&");
|
|
1037
|
+
const s = i.slice(0, d - 1).trim(), n = i.slice(d + 1).trim();
|
|
1038
|
+
a[s] = n, this.insertLinks(r, a);
|
|
1039
|
+
} catch (a) {
|
|
1040
|
+
st.error("error while parsing actor link text", a);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
insertLinks(e, t) {
|
|
1044
|
+
if (e.links == null)
|
|
1045
|
+
e.links = t;
|
|
1046
|
+
else
|
|
1047
|
+
for (const r in t)
|
|
1048
|
+
e.links[r] = t[r];
|
|
1049
|
+
}
|
|
1050
|
+
addProperties(e, t) {
|
|
1051
|
+
const r = this.getActor(e);
|
|
1052
|
+
try {
|
|
1053
|
+
const a = vt(t.text, Q()), i = JSON.parse(a);
|
|
1054
|
+
this.insertProperties(r, i);
|
|
1055
|
+
} catch (a) {
|
|
1056
|
+
st.error("error while parsing actor properties text", a);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
insertProperties(e, t) {
|
|
1060
|
+
if (e.properties == null)
|
|
1061
|
+
e.properties = t;
|
|
1062
|
+
else
|
|
1063
|
+
for (const r in t)
|
|
1064
|
+
e.properties[r] = t[r];
|
|
1065
|
+
}
|
|
1066
|
+
boxEnd() {
|
|
1067
|
+
this.state.records.currentBox = void 0;
|
|
1068
|
+
}
|
|
1069
|
+
addDetails(e, t) {
|
|
1070
|
+
const r = this.getActor(e), a = document.getElementById(t.text);
|
|
1071
|
+
try {
|
|
1072
|
+
const i = a.innerHTML, d = JSON.parse(i);
|
|
1073
|
+
d.properties && this.insertProperties(r, d.properties), d.links && this.insertLinks(r, d.links);
|
|
1074
|
+
} catch (i) {
|
|
1075
|
+
st.error("error while parsing actor details text", i);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
getActorProperty(e, t) {
|
|
1079
|
+
if ((e == null ? void 0 : e.properties) !== void 0)
|
|
1080
|
+
return e.properties[t];
|
|
1081
|
+
}
|
|
1082
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents
|
|
1083
|
+
apply(e) {
|
|
1084
|
+
if (Array.isArray(e))
|
|
1085
|
+
e.forEach((t) => {
|
|
1086
|
+
this.apply(t);
|
|
1087
|
+
});
|
|
1088
|
+
else
|
|
1089
|
+
switch (e.type) {
|
|
1090
|
+
case "sequenceIndex":
|
|
1091
|
+
this.state.records.messages.push({
|
|
1092
|
+
id: this.state.records.messages.length.toString(),
|
|
1093
|
+
from: void 0,
|
|
1094
|
+
to: void 0,
|
|
1095
|
+
message: {
|
|
1096
|
+
start: e.sequenceIndex,
|
|
1097
|
+
step: e.sequenceIndexStep,
|
|
1098
|
+
visible: e.sequenceVisible
|
|
1099
|
+
},
|
|
1100
|
+
wrap: !1,
|
|
1101
|
+
type: e.signalType
|
|
1102
|
+
});
|
|
1103
|
+
break;
|
|
1104
|
+
case "addParticipant":
|
|
1105
|
+
this.addActor(e.actor, e.actor, e.description, e.draw, e.config);
|
|
1106
|
+
break;
|
|
1107
|
+
case "createParticipant":
|
|
1108
|
+
if (this.state.records.actors.has(e.actor))
|
|
1109
|
+
throw new Error(
|
|
1110
|
+
"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"
|
|
1111
|
+
);
|
|
1112
|
+
this.state.records.lastCreated = e.actor, this.addActor(e.actor, e.actor, e.description, e.draw, e.config), this.state.records.createdActors.set(e.actor, this.state.records.messages.length);
|
|
1113
|
+
break;
|
|
1114
|
+
case "destroyParticipant":
|
|
1115
|
+
this.state.records.lastDestroyed = e.actor, this.state.records.destroyedActors.set(e.actor, this.state.records.messages.length);
|
|
1116
|
+
break;
|
|
1117
|
+
case "activeStart":
|
|
1118
|
+
this.addSignal(e.actor, void 0, void 0, e.signalType);
|
|
1119
|
+
break;
|
|
1120
|
+
case "centralConnection":
|
|
1121
|
+
this.addSignal(e.actor, void 0, void 0, e.signalType);
|
|
1122
|
+
break;
|
|
1123
|
+
case "centralConnectionReverse":
|
|
1124
|
+
this.addSignal(e.actor, void 0, void 0, e.signalType);
|
|
1125
|
+
break;
|
|
1126
|
+
case "activeEnd":
|
|
1127
|
+
this.addSignal(e.actor, void 0, void 0, e.signalType);
|
|
1128
|
+
break;
|
|
1129
|
+
case "addNote":
|
|
1130
|
+
this.addNote(e.actor, e.placement, e.text);
|
|
1131
|
+
break;
|
|
1132
|
+
case "addLinks":
|
|
1133
|
+
this.addLinks(e.actor, e.text);
|
|
1134
|
+
break;
|
|
1135
|
+
case "addALink":
|
|
1136
|
+
this.addALink(e.actor, e.text);
|
|
1137
|
+
break;
|
|
1138
|
+
case "addProperties":
|
|
1139
|
+
this.addProperties(e.actor, e.text);
|
|
1140
|
+
break;
|
|
1141
|
+
case "addDetails":
|
|
1142
|
+
this.addDetails(e.actor, e.text);
|
|
1143
|
+
break;
|
|
1144
|
+
case "addMessage":
|
|
1145
|
+
if (this.state.records.lastCreated) {
|
|
1146
|
+
if (e.to !== this.state.records.lastCreated)
|
|
1147
|
+
throw new Error(
|
|
1148
|
+
"The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram."
|
|
1149
|
+
);
|
|
1150
|
+
this.state.records.lastCreated = void 0;
|
|
1151
|
+
} else if (this.state.records.lastDestroyed) {
|
|
1152
|
+
if (e.to !== this.state.records.lastDestroyed && e.from !== this.state.records.lastDestroyed)
|
|
1153
|
+
throw new Error(
|
|
1154
|
+
"The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
|
|
1155
|
+
);
|
|
1156
|
+
this.state.records.lastDestroyed = void 0;
|
|
1157
|
+
}
|
|
1158
|
+
this.addSignal(
|
|
1159
|
+
e.from,
|
|
1160
|
+
e.to,
|
|
1161
|
+
e.msg,
|
|
1162
|
+
e.signalType,
|
|
1163
|
+
e.activate,
|
|
1164
|
+
e.centralConnection
|
|
1165
|
+
);
|
|
1166
|
+
break;
|
|
1167
|
+
case "boxStart":
|
|
1168
|
+
this.addBox(e.boxData);
|
|
1169
|
+
break;
|
|
1170
|
+
case "boxEnd":
|
|
1171
|
+
this.boxEnd();
|
|
1172
|
+
break;
|
|
1173
|
+
case "loopStart":
|
|
1174
|
+
this.addSignal(void 0, void 0, e.loopText, e.signalType);
|
|
1175
|
+
break;
|
|
1176
|
+
case "loopEnd":
|
|
1177
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1178
|
+
break;
|
|
1179
|
+
case "rectStart":
|
|
1180
|
+
this.addSignal(void 0, void 0, e.color, e.signalType);
|
|
1181
|
+
break;
|
|
1182
|
+
case "rectEnd":
|
|
1183
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1184
|
+
break;
|
|
1185
|
+
case "optStart":
|
|
1186
|
+
this.addSignal(void 0, void 0, e.optText, e.signalType);
|
|
1187
|
+
break;
|
|
1188
|
+
case "optEnd":
|
|
1189
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1190
|
+
break;
|
|
1191
|
+
case "altStart":
|
|
1192
|
+
this.addSignal(void 0, void 0, e.altText, e.signalType);
|
|
1193
|
+
break;
|
|
1194
|
+
case "else":
|
|
1195
|
+
this.addSignal(void 0, void 0, e.altText, e.signalType);
|
|
1196
|
+
break;
|
|
1197
|
+
case "altEnd":
|
|
1198
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1199
|
+
break;
|
|
1200
|
+
case "setAccTitle":
|
|
1201
|
+
De(e.text);
|
|
1202
|
+
break;
|
|
1203
|
+
case "parStart":
|
|
1204
|
+
this.addSignal(void 0, void 0, e.parText, e.signalType);
|
|
1205
|
+
break;
|
|
1206
|
+
case "and":
|
|
1207
|
+
this.addSignal(void 0, void 0, e.parText, e.signalType);
|
|
1208
|
+
break;
|
|
1209
|
+
case "parEnd":
|
|
1210
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1211
|
+
break;
|
|
1212
|
+
case "criticalStart":
|
|
1213
|
+
this.addSignal(void 0, void 0, e.criticalText, e.signalType);
|
|
1214
|
+
break;
|
|
1215
|
+
case "option":
|
|
1216
|
+
this.addSignal(void 0, void 0, e.optionText, e.signalType);
|
|
1217
|
+
break;
|
|
1218
|
+
case "criticalEnd":
|
|
1219
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1220
|
+
break;
|
|
1221
|
+
case "breakStart":
|
|
1222
|
+
this.addSignal(void 0, void 0, e.breakText, e.signalType);
|
|
1223
|
+
break;
|
|
1224
|
+
case "breakEnd":
|
|
1225
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
1226
|
+
break;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
getConfig() {
|
|
1230
|
+
return Q().sequence;
|
|
1231
|
+
}
|
|
1232
|
+
}, u(Xt, "SequenceDB"), Xt), ma = /* @__PURE__ */ u((e) => {
|
|
1233
|
+
const t = e.dropShadow ?? "none", { look: r } = Q();
|
|
1234
|
+
return `.actor {
|
|
1235
|
+
stroke: ${e.actorBorder};
|
|
1236
|
+
fill: ${e.actorBkg};
|
|
1237
|
+
stroke-width: ${e.strokeWidth ?? 1};
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
rect.actor.outer-path[data-look="neo"] {
|
|
1241
|
+
filter: ${t};
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
rect.note[data-look="neo"] {
|
|
1245
|
+
stroke:${e.noteBorderColor};
|
|
1246
|
+
fill:${e.noteBkgColor};
|
|
1247
|
+
filter: ${t};
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
text.actor > tspan {
|
|
1251
|
+
fill: ${e.actorTextColor};
|
|
1252
|
+
stroke: none;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.actor-line {
|
|
1256
|
+
stroke: ${e.actorLineColor};
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
.innerArc {
|
|
1260
|
+
stroke-width: 1.5;
|
|
1261
|
+
stroke-dasharray: none;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.messageLine0 {
|
|
1265
|
+
stroke-width: 1.5;
|
|
1266
|
+
stroke-dasharray: none;
|
|
1267
|
+
stroke: ${e.signalColor};
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.messageLine1 {
|
|
1271
|
+
stroke-width: 1.5;
|
|
1272
|
+
stroke-dasharray: 2, 2;
|
|
1273
|
+
stroke: ${e.signalColor};
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
[id$="-arrowhead"] path {
|
|
1277
|
+
fill: ${e.signalColor};
|
|
1278
|
+
stroke: ${e.signalColor};
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.sequenceNumber {
|
|
1282
|
+
fill: ${e.sequenceNumberColor};
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
[id$="-sequencenumber"] {
|
|
1286
|
+
fill: ${e.signalColor};
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
[id$="-crosshead"] path {
|
|
1290
|
+
fill: ${e.signalColor};
|
|
1291
|
+
stroke: ${e.signalColor};
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
.messageText {
|
|
1295
|
+
fill: ${e.signalTextColor};
|
|
1296
|
+
stroke: none;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
.labelBox {
|
|
1300
|
+
stroke: ${e.labelBoxBorderColor};
|
|
1301
|
+
fill: ${e.labelBoxBkgColor};
|
|
1302
|
+
filter: ${r === "neo" ? t : "none"};
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.labelText, .labelText > tspan {
|
|
1306
|
+
fill: ${e.labelTextColor};
|
|
1307
|
+
stroke: none;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.loopText, .loopText > tspan {
|
|
1311
|
+
fill: ${e.loopTextColor};
|
|
1312
|
+
stroke: none;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.loopLine {
|
|
1316
|
+
stroke-width: 2px;
|
|
1317
|
+
stroke-dasharray: 2, 2;
|
|
1318
|
+
stroke: ${e.labelBoxBorderColor};
|
|
1319
|
+
fill: ${e.labelBoxBorderColor};
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
.note {
|
|
1323
|
+
//stroke: #decc93;
|
|
1324
|
+
stroke: ${e.noteBorderColor};
|
|
1325
|
+
fill: ${e.noteBkgColor};
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.noteText, .noteText > tspan {
|
|
1329
|
+
fill: ${e.noteTextColor};
|
|
1330
|
+
stroke: none;
|
|
1331
|
+
${e.noteFontWeight ? `font-weight: ${e.noteFontWeight};` : ""}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
.activation0 {
|
|
1335
|
+
fill: ${e.activationBkgColor};
|
|
1336
|
+
stroke: ${e.activationBorderColor};
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
.activation1 {
|
|
1340
|
+
fill: ${e.activationBkgColor};
|
|
1341
|
+
stroke: ${e.activationBorderColor};
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
.activation2 {
|
|
1345
|
+
fill: ${e.activationBkgColor};
|
|
1346
|
+
stroke: ${e.activationBorderColor};
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
.actorPopupMenu {
|
|
1350
|
+
position: absolute;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
.actorPopupMenuPanel {
|
|
1354
|
+
position: absolute;
|
|
1355
|
+
fill: ${e.actorBkg};
|
|
1356
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
1357
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
1358
|
+
}
|
|
1359
|
+
.actor-man circle, line {
|
|
1360
|
+
fill: ${e.actorBkg};
|
|
1361
|
+
stroke-width: 2px;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
g rect.rect {
|
|
1365
|
+
filter: ${t};
|
|
1366
|
+
stroke: ${e.nodeBorder};
|
|
1367
|
+
}
|
|
1368
|
+
`;
|
|
1369
|
+
}, "getStyles"), ya = ma, bt = 36, ut = "actor-top", Ot = "actor-bottom", Vt = "actor-box", mt = "actor-man", Et = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), St = /* @__PURE__ */ u(function(e, t) {
|
|
1370
|
+
const r = Ea(e, t);
|
|
1371
|
+
return Yt().look === "neo" && r.attr("data-look", "neo"), r;
|
|
1372
|
+
}, "drawRect"), Ia = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1373
|
+
if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0)
|
|
1374
|
+
return { height: 0, width: 0 };
|
|
1375
|
+
const d = t.links, s = t.actorCnt, n = t.rectData;
|
|
1376
|
+
var g = "none";
|
|
1377
|
+
i && (g = "block !important");
|
|
1378
|
+
const h = e.append("g");
|
|
1379
|
+
h.attr("id", "actor" + s + "_popup"), h.attr("class", "actorPopupMenu"), h.attr("display", g);
|
|
1380
|
+
var o = "";
|
|
1381
|
+
n.class !== void 0 && (o = " " + n.class);
|
|
1382
|
+
let x = n.width > r ? n.width : r;
|
|
1383
|
+
const O = h.append("rect");
|
|
1384
|
+
if (O.attr("class", "actorPopupMenuPanel" + o), O.attr("x", n.x), O.attr("y", n.height), O.attr("fill", n.fill), O.attr("stroke", n.stroke), O.attr("width", x), O.attr("height", n.height), O.attr("rx", n.rx), O.attr("ry", n.ry), d != null) {
|
|
1385
|
+
var I = 20;
|
|
1386
|
+
for (let E in d) {
|
|
1387
|
+
var _ = h.append("a"), f = Ce.sanitizeUrl(d[E]);
|
|
1388
|
+
_.attr("xlink:href", f), _.attr("target", "_blank"), za(a)(
|
|
1389
|
+
E,
|
|
1390
|
+
_,
|
|
1391
|
+
n.x + 10,
|
|
1392
|
+
n.height + I,
|
|
1393
|
+
x,
|
|
1394
|
+
20,
|
|
1395
|
+
{ class: "actor" },
|
|
1396
|
+
a
|
|
1397
|
+
), I += 30;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
return O.attr("height", I), { height: n.height + I, width: x };
|
|
1401
|
+
}, "drawPopup"), Wt = /* @__PURE__ */ u(function(e) {
|
|
1402
|
+
return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1403
|
+
}, "popupMenuToggle"), $t = /* @__PURE__ */ u(async function(e, t, r = null) {
|
|
1404
|
+
let a = e.append("foreignObject");
|
|
1405
|
+
const i = await Be(t.text, Yt()), d = a.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
|
|
1406
|
+
if (a.attr("height", Math.round(d.height)).attr("width", Math.round(d.width)), t.class === "noteText") {
|
|
1407
|
+
const s = e.node().firstChild;
|
|
1408
|
+
s.setAttribute("height", d.height + 2 * t.textMargin);
|
|
1409
|
+
const n = s.getBBox();
|
|
1410
|
+
a.attr("x", Math.round(n.x + n.width / 2 - d.width / 2)).attr("y", Math.round(n.y + n.height / 2 - d.height / 2));
|
|
1411
|
+
} else if (r) {
|
|
1412
|
+
let { startx: s, stopx: n, starty: g } = r;
|
|
1413
|
+
if (s > n) {
|
|
1414
|
+
const h = s;
|
|
1415
|
+
s = n, n = h;
|
|
1416
|
+
}
|
|
1417
|
+
a.attr("x", Math.round(s + Math.abs(s - n) / 2 - d.width / 2)), t.class === "loopText" ? a.attr("y", Math.round(g)) : a.attr("y", Math.round(g - d.height));
|
|
1418
|
+
}
|
|
1419
|
+
return [a];
|
|
1420
|
+
}, "drawKatex"), Rt = /* @__PURE__ */ u(function(e, t) {
|
|
1421
|
+
let r = 0, a = 0;
|
|
1422
|
+
const i = t.text.split(D.lineBreakRegex), [d, s] = ve(t.fontSize);
|
|
1423
|
+
let n = [], g = 0, h = /* @__PURE__ */ u(() => t.y, "yfunc");
|
|
1424
|
+
if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0)
|
|
1425
|
+
switch (t.valign) {
|
|
1426
|
+
case "top":
|
|
1427
|
+
case "start":
|
|
1428
|
+
h = /* @__PURE__ */ u(() => Math.round(t.y + t.textMargin), "yfunc");
|
|
1429
|
+
break;
|
|
1430
|
+
case "middle":
|
|
1431
|
+
case "center":
|
|
1432
|
+
h = /* @__PURE__ */ u(() => Math.round(t.y + (r + a + t.textMargin) / 2), "yfunc");
|
|
1433
|
+
break;
|
|
1434
|
+
case "bottom":
|
|
1435
|
+
case "end":
|
|
1436
|
+
h = /* @__PURE__ */ u(() => Math.round(
|
|
1437
|
+
t.y + (r + a + 2 * t.textMargin) - t.textMargin
|
|
1438
|
+
), "yfunc");
|
|
1439
|
+
break;
|
|
1440
|
+
}
|
|
1441
|
+
if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0)
|
|
1442
|
+
switch (t.anchor) {
|
|
1443
|
+
case "left":
|
|
1444
|
+
case "start":
|
|
1445
|
+
t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
|
|
1446
|
+
break;
|
|
1447
|
+
case "middle":
|
|
1448
|
+
case "center":
|
|
1449
|
+
t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
|
|
1450
|
+
break;
|
|
1451
|
+
case "right":
|
|
1452
|
+
case "end":
|
|
1453
|
+
t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
|
|
1454
|
+
break;
|
|
1455
|
+
}
|
|
1456
|
+
for (let [o, x] of i.entries()) {
|
|
1457
|
+
t.textMargin !== void 0 && t.textMargin === 0 && d !== void 0 && (g = o * d);
|
|
1458
|
+
const O = e.append("text");
|
|
1459
|
+
O.attr("x", t.x), O.attr("y", h()), t.anchor !== void 0 && O.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && O.style("font-family", t.fontFamily), s !== void 0 && O.style("font-size", s), t.fontWeight !== void 0 && O.style("font-weight", t.fontWeight), t.fill !== void 0 && O.attr("fill", t.fill), t.class !== void 0 && O.attr("class", t.class), t.dy !== void 0 ? O.attr("dy", t.dy) : g !== 0 && O.attr("dy", g);
|
|
1460
|
+
const I = x || ha;
|
|
1461
|
+
if (t.tspan) {
|
|
1462
|
+
const _ = O.append("tspan");
|
|
1463
|
+
_.attr("x", t.x), t.fill !== void 0 && _.attr("fill", t.fill), _.text(I);
|
|
1464
|
+
} else
|
|
1465
|
+
O.text(I);
|
|
1466
|
+
t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (a += (O._groups || O)[0][0].getBBox().height, r = a), n.push(O);
|
|
1467
|
+
}
|
|
1468
|
+
return n;
|
|
1469
|
+
}, "drawText"), Ye = /* @__PURE__ */ u(function(e, t) {
|
|
1470
|
+
function r(i, d, s, n, g) {
|
|
1471
|
+
return i + "," + d + " " + (i + s) + "," + d + " " + (i + s) + "," + (d + n - g) + " " + (i + s - g * 1.2) + "," + (d + n) + " " + i + "," + (d + n);
|
|
1472
|
+
}
|
|
1473
|
+
u(r, "genPoints");
|
|
1474
|
+
const a = e.append("polygon");
|
|
1475
|
+
return a.attr("points", r(t.x, t.y, t.width, t.height, 7)), a.attr("class", "labelBox"), t.y = t.y + t.height / 2, Rt(e, t), a;
|
|
1476
|
+
}, "drawLabel"), B = -1, $e = /* @__PURE__ */ u((e, t, r, a) => {
|
|
1477
|
+
e.select && r.forEach((i) => {
|
|
1478
|
+
const d = t.get(i), s = e.select("#actor" + d.actorCnt);
|
|
1479
|
+
!a.mirrorActors && d.stopy ? s.attr("y2", d.stopy + d.height / 2) : a.mirrorActors && s.attr("y2", d.stopy);
|
|
1480
|
+
});
|
|
1481
|
+
}, "fixLifeLineHeights"), fa = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1482
|
+
var d, s;
|
|
1483
|
+
const n = a ? t.stopy : t.starty, g = t.x + t.width / 2, h = n + t.height, { look: o, theme: x, themeVariables: O } = r, { bkgColorArray: I, borderColorArray: _ } = O, f = e.append("g").lower();
|
|
1484
|
+
var E = f;
|
|
1485
|
+
a || (B++, Object.keys(t.links || {}).length && !r.forceMenus && E.attr("onclick", Wt(`actor${B}_popup`)).attr("cursor", "pointer"), E.append("line").attr("id", "actor" + B).attr("x1", g).attr("y1", h).attr("x2", g).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), E = f.append("g"), t.actorCnt = B, t.links != null && E.attr("id", "root-" + B), o === "neo" && E.attr("data-look", "neo"));
|
|
1486
|
+
const T = pt();
|
|
1487
|
+
var y = "actor";
|
|
1488
|
+
(d = t.properties) != null && d.class ? y = t.properties.class : T.fill = "#eaeaea", a ? y += ` ${Ot}` : y += ` ${ut}`, T.x = t.x, T.y = n, T.width = t.width, T.height = t.height, T.class = y, T.rx = 3, T.ry = 3, T.name = t.name, o === "neo" && (T.rx = 6, T.ry = 6);
|
|
1489
|
+
const R = St(E, T), S = i.get(t.name) ?? 0;
|
|
1490
|
+
if (Et.has(x) && (R.style("stroke", _[S % _.length]), R.style("fill", I[S % _.length])), o === "neo" && R.attr("filter", "url(#drop-shadow)"), t.rectData = T, (s = t.properties) != null && s.icon) {
|
|
1491
|
+
const P = t.properties.icon.trim();
|
|
1492
|
+
P.charAt(0) === "@" ? ae(E, T.x + T.width - 20, T.y + 10, P.substr(1)) : re(E, T.x + T.width - 20, T.y + 10, P);
|
|
1493
|
+
}
|
|
1494
|
+
a || (E.attr("data-et", "participant"), E.attr("data-type", "participant"), E.attr("data-id", t.name)), gt(r, J(t.description))(
|
|
1495
|
+
t.description,
|
|
1496
|
+
E,
|
|
1497
|
+
T.x,
|
|
1498
|
+
T.y,
|
|
1499
|
+
T.width,
|
|
1500
|
+
T.height,
|
|
1501
|
+
{ class: `actor ${Vt}` },
|
|
1502
|
+
r
|
|
1503
|
+
);
|
|
1504
|
+
let w = t.height;
|
|
1505
|
+
if (R.node) {
|
|
1506
|
+
const P = R.node().getBBox();
|
|
1507
|
+
t.height = P.height, w = P.height;
|
|
1508
|
+
}
|
|
1509
|
+
return w;
|
|
1510
|
+
}, "drawActorTypeParticipant"), Ra = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1511
|
+
var d, s;
|
|
1512
|
+
const n = a ? t.stopy : t.starty, g = t.x + t.width / 2, h = n + t.height, { look: o, theme: x, themeVariables: O } = r, { bkgColorArray: I, borderColorArray: _ } = O, f = e.append("g").lower();
|
|
1513
|
+
var E = f;
|
|
1514
|
+
a || (B++, Object.keys(t.links || {}).length && !r.forceMenus && E.attr("onclick", Wt(`actor${B}_popup`)).attr("cursor", "pointer"), E.append("line").attr("id", "actor" + B).attr("x1", g).attr("y1", h).attr("x2", g).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), E = f.append("g"), t.actorCnt = B, t.links != null && E.attr("id", "root-" + B), o === "neo" && E.attr("data-look", "neo"));
|
|
1515
|
+
const T = pt();
|
|
1516
|
+
var y = "actor";
|
|
1517
|
+
(d = t.properties) != null && d.class ? y = t.properties.class : T.fill = "#eaeaea", a ? y += ` ${Ot}` : y += ` ${ut}`, T.x = t.x, T.y = n, T.width = t.width, T.height = t.height, T.class = y, T.name = t.name;
|
|
1518
|
+
const R = 6, S = {
|
|
1519
|
+
...T,
|
|
1520
|
+
x: T.x + -R,
|
|
1521
|
+
y: T.y + +R,
|
|
1522
|
+
class: "actor"
|
|
1523
|
+
}, w = St(E, T), P = St(E, S);
|
|
1524
|
+
t.rectData = T, o === "neo" && E.attr("filter", "url(#drop-shadow)");
|
|
1525
|
+
const C = i.get(t.name) ?? 0;
|
|
1526
|
+
if (Et.has(x) && (w.style("stroke", _[C % _.length]), w.style("fill", I[C % _.length]), P.style("stroke", _[C % _.length]), P.style("fill", I[C % _.length])), (s = t.properties) != null && s.icon) {
|
|
1527
|
+
const Y = t.properties.icon.trim();
|
|
1528
|
+
Y.charAt(0) === "@" ? ae(E, T.x + T.width - 20, T.y + 10, Y.substr(1)) : re(E, T.x + T.width - 20, T.y + 10, Y);
|
|
1529
|
+
}
|
|
1530
|
+
gt(r, J(t.description))(
|
|
1531
|
+
t.description,
|
|
1532
|
+
E,
|
|
1533
|
+
T.x - R,
|
|
1534
|
+
T.y + R,
|
|
1535
|
+
T.width,
|
|
1536
|
+
T.height,
|
|
1537
|
+
{ class: `actor ${Vt}` },
|
|
1538
|
+
r
|
|
1539
|
+
);
|
|
1540
|
+
let v = t.height;
|
|
1541
|
+
if (w.node) {
|
|
1542
|
+
const Y = w.node().getBBox();
|
|
1543
|
+
t.height = Y.height, v = Y.height;
|
|
1544
|
+
}
|
|
1545
|
+
return a || (E.attr("data-et", "participant"), E.attr("data-type", "collections"), E.attr("data-id", t.name)), v;
|
|
1546
|
+
}, "drawActorTypeCollections"), La = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1547
|
+
var d, s;
|
|
1548
|
+
const n = a ? t.stopy : t.starty, g = t.x + t.width / 2, h = n + t.height, { look: o, theme: x, themeVariables: O } = r, { bkgColorArray: I, borderColorArray: _ } = O, f = e.append("g").lower();
|
|
1549
|
+
let E = f;
|
|
1550
|
+
a || (B++, Object.keys(t.links || {}).length && !r.forceMenus && E.attr("onclick", Wt(`actor${B}_popup`)).attr("cursor", "pointer"), E.append("line").attr("id", "actor" + B).attr("x1", g).attr("y1", h).attr("x2", g).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), E = f.append("g"), t.actorCnt = B, t.links != null && E.attr("id", "root-" + B), o === "neo" && E.attr("data-look", "neo"));
|
|
1551
|
+
const T = pt();
|
|
1552
|
+
let y = "actor";
|
|
1553
|
+
(d = t.properties) != null && d.class ? y = t.properties.class : T.fill = "#eaeaea", a ? y += ` ${Ot}` : y += ` ${ut}`, E.attr("class", y), T.x = t.x, T.y = n, T.width = t.width, T.height = t.height, T.name = t.name;
|
|
1554
|
+
const R = T.height / 2, S = R / (2.5 + T.height / 50), w = E.append("g"), P = E.append("g"), C = `M ${T.x},${T.y + R}
|
|
1555
|
+
a ${S},${R} 0 0 0 0,${T.height}
|
|
1556
|
+
h ${T.width - 2 * S}
|
|
1557
|
+
a ${S},${R} 0 0 0 0,-${T.height}
|
|
1558
|
+
Z
|
|
1559
|
+
`;
|
|
1560
|
+
w.append("path").attr("d", C), P.append("path").attr(
|
|
1561
|
+
"d",
|
|
1562
|
+
`M ${T.x},${T.y + R}
|
|
1563
|
+
a ${S},${R} 0 0 0 0,${T.height}`
|
|
1564
|
+
), w.attr("transform", `translate(${S}, ${-(T.height / 2)})`), P.attr("transform", `translate(${T.width - S}, ${-T.height / 2})`), t.rectData = T, o === "neo" && w.attr("filter", "url(#drop-shadow)");
|
|
1565
|
+
const v = i.get(t.name) ?? 0;
|
|
1566
|
+
if (Et.has(x) && (w.style("stroke", _[v % _.length]), w.style("fill", I[v % _.length]), P.style("stroke", _[v % _.length]), P.style("fill", I[v % _.length])), (s = t.properties) != null && s.icon) {
|
|
1567
|
+
const z = t.properties.icon.trim(), U = T.x + T.width - 20, X = T.y + 10;
|
|
1568
|
+
z.charAt(0) === "@" ? ae(E, U, X, z.substr(1)) : re(E, U, X, z);
|
|
1569
|
+
}
|
|
1570
|
+
gt(r, J(t.description))(
|
|
1571
|
+
t.description,
|
|
1572
|
+
E,
|
|
1573
|
+
T.x,
|
|
1574
|
+
T.y,
|
|
1575
|
+
T.width,
|
|
1576
|
+
T.height,
|
|
1577
|
+
{ class: `actor ${Vt}` },
|
|
1578
|
+
r
|
|
1579
|
+
);
|
|
1580
|
+
let Y = t.height;
|
|
1581
|
+
const H = w.select("path:last-child");
|
|
1582
|
+
if (H.node()) {
|
|
1583
|
+
const z = H.node().getBBox();
|
|
1584
|
+
t.height = z.height, Y = z.height;
|
|
1585
|
+
}
|
|
1586
|
+
return a || (E.attr("data-et", "participant"), E.attr("data-type", "queue"), E.attr("data-id", t.name)), Y;
|
|
1587
|
+
}, "drawActorTypeQueue"), Sa = /* @__PURE__ */ u(function(e, t, r, a, i, d) {
|
|
1588
|
+
var s;
|
|
1589
|
+
const n = a ? t.stopy : t.starty, g = t.x + t.width / 2, h = n + 75, { look: o, theme: x, themeVariables: O } = r, { bkgColorArray: I, borderColorArray: _, actorBorder: f, actorBkg: E } = O, T = e.append("g").lower();
|
|
1590
|
+
a || (B++, T.append("line").attr("id", "actor" + B).attr("x1", g).attr("y1", h).attr("x2", g).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = B);
|
|
1591
|
+
const y = e.append("g");
|
|
1592
|
+
let R = mt;
|
|
1593
|
+
a ? R += ` ${Ot}` : R += ` ${ut}`, y.attr("class", R), y.attr("name", t.name);
|
|
1594
|
+
const S = pt();
|
|
1595
|
+
S.x = t.x, S.y = n, S.fill = "#eaeaea", S.width = t.width, S.height = t.height, S.class = "actor";
|
|
1596
|
+
const w = t.x + t.width / 2, P = n + 32, C = 22;
|
|
1597
|
+
y.append("defs").append("marker").attr("id", i + "-filled-head-control").attr("refX", 11).attr("refY", 5.8).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "172.5").attr("stroke-width", 1.2).append("path").attr("d", "M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"), y.append("circle").attr("cx", w).attr("cy", P).attr("r", C).attr("filter", `${o === "neo" ? "url(#drop-shadow)" : ""}`), y.append("line").attr("marker-end", "url(#" + i + "-filled-head-control)").attr("transform", `translate(${w}, ${P - C})`);
|
|
1598
|
+
const v = d.get(t.name) ?? 0;
|
|
1599
|
+
Et.has(x) ? (y.style("stroke", _[v % _.length]), y.style("fill", I[v % _.length])) : (y.style("stroke", f), y.style("fill", E));
|
|
1600
|
+
const Y = y.node().getBBox();
|
|
1601
|
+
return t.height = Y.height + 2 * (((s = r == null ? void 0 : r.sequence) == null ? void 0 : s.labelBoxHeight) ?? 0), gt(r, J(t.description))(
|
|
1602
|
+
t.description,
|
|
1603
|
+
y,
|
|
1604
|
+
S.x,
|
|
1605
|
+
S.y + C + (a ? 5 : 12),
|
|
1606
|
+
S.width,
|
|
1607
|
+
S.height,
|
|
1608
|
+
{ class: `actor ${mt}` },
|
|
1609
|
+
r
|
|
1610
|
+
), a || (y.attr("data-et", "participant"), y.attr("data-type", "control"), y.attr("data-id", t.name)), t.height;
|
|
1611
|
+
}, "drawActorTypeControl"), wa = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1612
|
+
var d;
|
|
1613
|
+
const s = a ? t.stopy : t.starty, n = t.x + t.width / 2, g = s + 75, { look: h, theme: o, themeVariables: x } = r, { bkgColorArray: O, borderColorArray: I } = x, _ = e.append("g").lower(), f = e.append("g");
|
|
1614
|
+
let E = "actor";
|
|
1615
|
+
a ? E += ` ${Ot}` : E += ` ${ut}`, f.attr("class", E), f.attr("name", t.name);
|
|
1616
|
+
const T = pt();
|
|
1617
|
+
T.x = t.x, T.y = s, T.fill = "#eaeaea", T.width = t.width, T.height = t.height, T.class = "actor";
|
|
1618
|
+
const y = t.x + t.width / 2, R = s + (a ? 10 : 25), S = 22;
|
|
1619
|
+
f.append("circle").attr("cx", y).attr("cy", R).attr("r", S).attr("width", t.width).attr("height", t.height), f.append("line").attr("x1", y - S).attr("x2", y + S).attr("y1", R + S).attr("y2", R + S).attr("stroke-width", 2), h === "neo" && f.attr("filter", "url(#drop-shadow)");
|
|
1620
|
+
const w = i.get(t.name) ?? 0;
|
|
1621
|
+
Et.has(o) && (f.style("stroke", I[w % I.length]), f.style("fill", O[w % I.length]));
|
|
1622
|
+
const P = f.node().getBBox();
|
|
1623
|
+
return t.height = P.height + (((d = r == null ? void 0 : r.sequence) == null ? void 0 : d.labelBoxHeight) ?? 0), a || (B++, _.append("line").attr("id", "actor" + B).attr("x1", n).attr("y1", g).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = B), gt(r, J(t.description))(
|
|
1624
|
+
t.description,
|
|
1625
|
+
f,
|
|
1626
|
+
T.x,
|
|
1627
|
+
T.y + (a ? 15 : 30),
|
|
1628
|
+
T.width,
|
|
1629
|
+
T.height,
|
|
1630
|
+
{ class: `actor ${mt}` },
|
|
1631
|
+
r
|
|
1632
|
+
), a ? f.attr("transform", `translate(0, ${S})`) : (f.attr("transform", `translate(0, ${S / 2 - 5})`), f.attr("data-et", "participant"), f.attr("data-type", "entity"), f.attr("data-id", t.name)), t.height;
|
|
1633
|
+
}, "drawActorTypeEntity"), Na = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1634
|
+
var d;
|
|
1635
|
+
const s = a ? t.stopy : t.starty, n = t.x + t.width / 2, g = s + t.height + 2 * r.boxTextMargin, { theme: h, themeVariables: o, look: x } = r, { bkgColorArray: O, borderColorArray: I, actorBorder: _ } = o, f = e.append("g").lower();
|
|
1636
|
+
let E = f;
|
|
1637
|
+
a || (B++, Object.keys(t.links || {}).length && !r.forceMenus && E.attr("onclick", Wt(`actor${B}_popup`)).attr("cursor", "pointer"), E.append("line").attr("id", "actor" + B).attr("x1", n).attr("y1", g).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), E = f.append("g"), t.actorCnt = B, t.links != null && E.attr("id", "root-" + B), x === "neo" && E.attr("data-look", "neo"));
|
|
1638
|
+
const T = pt();
|
|
1639
|
+
let y = "actor";
|
|
1640
|
+
(d = t.properties) != null && d.class ? y = t.properties.class : T.fill = "#eaeaea", a ? y += ` ${Ot}` : y += ` ${ut}`, T.x = t.x, T.y = s, T.width = t.width, T.height = t.height, T.class = y, T.name = t.name, T.x = t.x, T.y = s;
|
|
1641
|
+
const R = T.width / 3, S = T.width / 3, w = R / 2, P = w / (2.5 + R / 50), C = E.append("g");
|
|
1642
|
+
C.attr("class", y);
|
|
1643
|
+
const v = `
|
|
1644
|
+
M ${T.x},${T.y + P}
|
|
1645
|
+
a ${w},${P} 0 0 0 ${R},0
|
|
1646
|
+
a ${w},${P} 0 0 0 -${R},0
|
|
1647
|
+
l 0,${S - 2 * P}
|
|
1648
|
+
a ${w},${P} 0 0 0 ${R},0
|
|
1649
|
+
l 0,-${S - 2 * P}
|
|
1650
|
+
`;
|
|
1651
|
+
C.append("path").attr("d", v), x === "neo" && C.attr("filter", "url(#drop-shadow)");
|
|
1652
|
+
const Y = i.get(t.name) ?? 0;
|
|
1653
|
+
Et.has(h) ? (C.style("stroke", I[Y % I.length]), C.style("fill", O[Y % I.length])) : C.style("stroke", _), C.attr("transform", `translate(${R}, ${P})`), t.rectData = T, gt(r, J(t.description))(
|
|
1654
|
+
t.description,
|
|
1655
|
+
E,
|
|
1656
|
+
T.x,
|
|
1657
|
+
T.y + 35,
|
|
1658
|
+
T.width,
|
|
1659
|
+
T.height,
|
|
1660
|
+
{ class: `actor ${Vt}` },
|
|
1661
|
+
r
|
|
1662
|
+
);
|
|
1663
|
+
const H = C.select("path:last-child");
|
|
1664
|
+
if (H.node()) {
|
|
1665
|
+
const z = H.node().getBBox();
|
|
1666
|
+
t.height = z.height + (r.sequence.labelBoxHeight ?? 0);
|
|
1667
|
+
}
|
|
1668
|
+
return a || (E.attr("data-et", "participant"), E.attr("data-type", "database"), E.attr("data-id", t.name)), t.height;
|
|
1669
|
+
}, "drawActorTypeDatabase"), Pa = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1670
|
+
const d = a ? t.stopy : t.starty, s = t.x + t.width / 2, n = d + 80, g = 22, h = e.append("g").lower(), { look: o, theme: x, themeVariables: O } = r, { bkgColorArray: I, borderColorArray: _, actorBorder: f } = O;
|
|
1671
|
+
a || (B++, h.append("line").attr("id", "actor" + B).attr("x1", s).attr("y1", n).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = B);
|
|
1672
|
+
const E = e.append("g");
|
|
1673
|
+
let T = mt;
|
|
1674
|
+
a ? T += ` ${Ot}` : T += ` ${ut}`, E.attr("class", T), E.attr("name", t.name);
|
|
1675
|
+
const y = pt();
|
|
1676
|
+
y.x = t.x, y.y = d, y.fill = "#eaeaea", y.width = t.width, y.height = t.height, y.class = "actor", E.append("line").attr("id", "actor-man-torso" + B).attr("x1", t.x + t.width / 2 - g * 2.5).attr("y1", d + 12).attr("x2", t.x + t.width / 2 - 15).attr("y2", d + 12), E.append("line").attr("id", "actor-man-arms" + B).attr("x1", t.x + t.width / 2 - g * 2.5).attr("y1", d + 2).attr("x2", t.x + t.width / 2 - g * 2.5).attr("y2", d + 22), E.append("circle").attr("cx", t.x + t.width / 2).attr("cy", d + 12).attr("r", g), o === "neo" && E.attr("filter", "url(#drop-shadow)");
|
|
1677
|
+
const R = i.get(t.name) ?? 0;
|
|
1678
|
+
Et.has(x) ? (E.style("stroke", _[R % _.length]), E.style("fill", I[R % _.length])) : E.style("stroke", f);
|
|
1679
|
+
const S = E.node().getBBox();
|
|
1680
|
+
return t.height = S.height + (r.sequence.labelBoxHeight ?? 0), gt(r, J(t.description))(
|
|
1681
|
+
t.description,
|
|
1682
|
+
E,
|
|
1683
|
+
y.x,
|
|
1684
|
+
y.y + 15,
|
|
1685
|
+
y.width,
|
|
1686
|
+
y.height,
|
|
1687
|
+
{ class: `actor ${mt}` },
|
|
1688
|
+
r
|
|
1689
|
+
), E.attr("transform", `translate(0,${g / 2 + 10})`), a || (E.attr("data-et", "participant"), E.attr("data-type", "boundary"), E.attr("data-id", t.name)), t.height;
|
|
1690
|
+
}, "drawActorTypeBoundary"), Aa = /* @__PURE__ */ u(function(e, t, r, a, i) {
|
|
1691
|
+
const d = a ? t.stopy : t.starty, s = t.x + t.width / 2, n = d + 80, { look: g, theme: h, themeVariables: o } = r, { bkgColorArray: x, borderColorArray: O, actorBorder: I } = o, _ = e.append("g").lower();
|
|
1692
|
+
a || (B++, _.append("line").attr("id", "actor" + B).attr("x1", s).attr("y1", n).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = B);
|
|
1693
|
+
const f = e.append("g");
|
|
1694
|
+
let E = mt;
|
|
1695
|
+
a ? E += ` ${Ot}` : E += ` ${ut}`, f.attr("class", E), f.attr("name", t.name), a || f.attr("data-et", "participant").attr("data-type", "actor").attr("data-id", t.name);
|
|
1696
|
+
const T = g === "neo" ? 0.5 : 1, y = g === "neo" ? d + (1 - T) * 30 : d;
|
|
1697
|
+
f.append("line").attr("id", "actor-man-torso" + B).attr("x1", s).attr("y1", y + 25 * T).attr("x2", s).attr("y2", y + 45 * T), f.append("line").attr("id", "actor-man-arms" + B).attr("x1", s - bt / 2 * T).attr("y1", y + 33 * T).attr("x2", s + bt / 2 * T).attr("y2", y + 33 * T), f.append("line").attr("x1", s - bt / 2 * T).attr("y1", y + 60 * T).attr("x2", s).attr("y2", y + 45 * T), f.append("line").attr("x1", s).attr("y1", y + 45 * T).attr("x2", s + (bt / 2 - 2) * T).attr("y2", y + 60 * T);
|
|
1698
|
+
const R = f.append("circle");
|
|
1699
|
+
R.attr("cx", t.x + t.width / 2), R.attr("cy", y + 10 * T), R.attr("r", 15 * T), R.attr("width", t.width * T), R.attr("height", t.height * T);
|
|
1700
|
+
const S = f.node().getBBox();
|
|
1701
|
+
t.height = S.height;
|
|
1702
|
+
const w = pt();
|
|
1703
|
+
w.x = t.x, w.y = y, w.fill = "#eaeaea", w.width = t.width, w.height = t.height / T, w.class = "actor", w.rx = 3, w.ry = 3;
|
|
1704
|
+
const P = i.get(t.name) ?? 0;
|
|
1705
|
+
return Et.has(h) ? (f.style("stroke", O[P % O.length]), f.style("fill", x[P % O.length])) : f.style("stroke", I), gt(r, J(t.description))(
|
|
1706
|
+
t.description,
|
|
1707
|
+
f,
|
|
1708
|
+
w.x,
|
|
1709
|
+
y + 35 * T - (g === "neo" ? 10 : 0),
|
|
1710
|
+
w.width,
|
|
1711
|
+
w.height,
|
|
1712
|
+
{ class: `actor ${mt}` },
|
|
1713
|
+
r
|
|
1714
|
+
), t.height;
|
|
1715
|
+
}, "drawActorTypeActor"), Da = /* @__PURE__ */ u(async function(e, t, r, a, i, d, s) {
|
|
1716
|
+
const n = s ?? new Map(
|
|
1717
|
+
[...d.db.getActors().values()].map((g, h) => [g.name, h])
|
|
1718
|
+
);
|
|
1719
|
+
switch (t.type) {
|
|
1720
|
+
case "actor":
|
|
1721
|
+
return await Aa(e, t, r, a, n);
|
|
1722
|
+
case "participant":
|
|
1723
|
+
return await fa(e, t, r, a, n);
|
|
1724
|
+
case "boundary":
|
|
1725
|
+
return await Pa(e, t, r, a, n);
|
|
1726
|
+
case "control":
|
|
1727
|
+
return await Sa(
|
|
1728
|
+
e,
|
|
1729
|
+
t,
|
|
1730
|
+
r,
|
|
1731
|
+
a,
|
|
1732
|
+
i,
|
|
1733
|
+
n
|
|
1734
|
+
);
|
|
1735
|
+
case "entity":
|
|
1736
|
+
return await wa(e, t, r, a, n);
|
|
1737
|
+
case "database":
|
|
1738
|
+
return await Na(e, t, r, a, n);
|
|
1739
|
+
case "collections":
|
|
1740
|
+
return await Ra(e, t, r, a, n);
|
|
1741
|
+
case "queue":
|
|
1742
|
+
return await La(e, t, r, a, n);
|
|
1743
|
+
}
|
|
1744
|
+
}, "drawActor"), ka = /* @__PURE__ */ u(function(e, t, r) {
|
|
1745
|
+
const a = e.append("g");
|
|
1746
|
+
Ve(a, t), t.name && gt(r)(
|
|
1747
|
+
t.name,
|
|
1748
|
+
a,
|
|
1749
|
+
t.x,
|
|
1750
|
+
t.y + r.boxTextMargin + (t.textMaxHeight || 0) / 2,
|
|
1751
|
+
t.width,
|
|
1752
|
+
0,
|
|
1753
|
+
{ class: "text" },
|
|
1754
|
+
r
|
|
1755
|
+
), a.lower();
|
|
1756
|
+
}, "drawBox"), Ma = /* @__PURE__ */ u(function(e) {
|
|
1757
|
+
return e.append("g");
|
|
1758
|
+
}, "anchorElement"), Ca = /* @__PURE__ */ u(function(e, t, r, a, i, d, s) {
|
|
1759
|
+
const { theme: n, themeVariables: g } = a, { bkgColorArray: h, borderColorArray: o, mainBkg: x } = g, O = pt(), I = t.anchored, _ = t.actor;
|
|
1760
|
+
O.x = t.startx, O.y = t.starty, O.class = "activation" + i % 3, O.width = t.stopx - t.startx, O.height = r - t.starty;
|
|
1761
|
+
const f = St(I, O), E = (s ?? new Map(
|
|
1762
|
+
[...d.db.getActors().values()].map((T, y) => [T.name, y])
|
|
1763
|
+
)).get(_) ?? 0;
|
|
1764
|
+
Et.has(n) && (f.style("stroke", o[E % o.length]), f.style("fill", h[E % o.length] ?? x));
|
|
1765
|
+
}, "drawActivation"), va = /* @__PURE__ */ u(async function(e, t, r, a, i) {
|
|
1766
|
+
const {
|
|
1767
|
+
boxMargin: d,
|
|
1768
|
+
boxTextMargin: s,
|
|
1769
|
+
labelBoxHeight: n,
|
|
1770
|
+
labelBoxWidth: g,
|
|
1771
|
+
messageFontFamily: h,
|
|
1772
|
+
messageFontSize: o,
|
|
1773
|
+
messageFontWeight: x
|
|
1774
|
+
} = a, O = e.append("g").attr("data-et", "control-structure").attr("data-id", "i" + i.id), I = /* @__PURE__ */ u(function(E, T, y, R) {
|
|
1775
|
+
return O.append("line").attr("x1", E).attr("y1", T).attr("x2", y).attr("y2", R).attr("class", "loopLine");
|
|
1776
|
+
}, "drawLoopLine");
|
|
1777
|
+
I(t.startx, t.starty, t.stopx, t.starty), I(t.stopx, t.starty, t.stopx, t.stopy), I(t.startx, t.stopy, t.stopx, t.stopy), I(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(E) {
|
|
1778
|
+
I(t.startx, E.y, t.stopx, E.y).style(
|
|
1779
|
+
"stroke-dasharray",
|
|
1780
|
+
"3, 3"
|
|
1781
|
+
);
|
|
1782
|
+
});
|
|
1783
|
+
let _ = ee();
|
|
1784
|
+
_.text = r, _.x = t.startx, _.y = t.starty, _.fontFamily = h, _.fontSize = o, _.fontWeight = x, _.anchor = "middle", _.valign = "middle", _.tspan = !1, _.width = Math.max(g ?? 0, 50), _.height = n + (a.look === "neo" ? 15 : 0) || 20, _.textMargin = s, _.class = "labelText", Ye(O, _), _ = We(), _.text = t.title, _.x = t.startx + g / 2 + (t.stopx - t.startx) / 2, _.y = t.starty + d + s, _.anchor = "middle", _.valign = "middle", _.textMargin = s, _.class = "loopText", _.fontFamily = h, _.fontSize = o, _.fontWeight = x, _.wrap = !0;
|
|
1785
|
+
let f = J(_.text) ? await $t(O, _, t) : Rt(O, _);
|
|
1786
|
+
if (t.sectionTitles !== void 0) {
|
|
1787
|
+
for (const [E, T] of Object.entries(t.sectionTitles))
|
|
1788
|
+
if (T.message) {
|
|
1789
|
+
_.text = T.message, _.x = t.startx + (t.stopx - t.startx) / 2, _.y = t.sections[E].y + d + s, _.class = "loopText", _.anchor = "middle", _.valign = "middle", _.tspan = !1, _.fontFamily = h, _.fontSize = o, _.fontWeight = x, _.wrap = t.wrap, J(_.text) ? (t.starty = t.sections[E].y, await $t(O, _, t)) : Rt(O, _);
|
|
1790
|
+
let y = Math.round(
|
|
1791
|
+
f.map((R) => (R._groups || R)[0][0].getBBox().height).reduce((R, S) => R + S)
|
|
1792
|
+
);
|
|
1793
|
+
t.sections[E].height += y - (d + s);
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
return t.height = Math.round(t.stopy - t.starty), O;
|
|
1797
|
+
}, "drawLoop"), Ve = /* @__PURE__ */ u(function(e, t) {
|
|
1798
|
+
Ta(e, t);
|
|
1799
|
+
}, "drawBackgroundRect"), Ba = /* @__PURE__ */ u(function(e, t) {
|
|
1800
|
+
e.append("defs").append("symbol").attr("id", t + "-database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1801
|
+
"d",
|
|
1802
|
+
"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"
|
|
1803
|
+
);
|
|
1804
|
+
}, "insertDatabaseIcon"), Ya = /* @__PURE__ */ u(function(e, t) {
|
|
1805
|
+
e.append("defs").append("symbol").attr("id", t + "-computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1806
|
+
"d",
|
|
1807
|
+
"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"
|
|
1808
|
+
);
|
|
1809
|
+
}, "insertComputerIcon"), $a = /* @__PURE__ */ u(function(e, t) {
|
|
1810
|
+
e.append("defs").append("symbol").attr("id", t + "-clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1811
|
+
"d",
|
|
1812
|
+
"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"
|
|
1813
|
+
);
|
|
1814
|
+
}, "insertClockIcon"), Va = /* @__PURE__ */ u(function(e, t) {
|
|
1815
|
+
e.append("defs").append("marker").attr("id", t + "-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");
|
|
1816
|
+
}, "insertArrowHead"), Wa = /* @__PURE__ */ u(function(e, t) {
|
|
1817
|
+
e.append("defs").append("marker").attr("id", t + "-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");
|
|
1818
|
+
}, "insertArrowFilledHead"), Fa = /* @__PURE__ */ u(function(e, t) {
|
|
1819
|
+
e.append("defs").append("marker").attr("id", t + "-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);
|
|
1820
|
+
}, "insertSequenceNumber"), Ka = /* @__PURE__ */ u(function(e, t) {
|
|
1821
|
+
e.append("defs").append("marker").attr("id", t + "-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");
|
|
1822
|
+
}, "insertArrowCrossHead"), qa = /* @__PURE__ */ u(function(e, t) {
|
|
1823
|
+
const { theme: r } = t;
|
|
1824
|
+
e.append("defs").append("filter").attr("id", "drop-shadow").attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", `${r === "redux" || r === "redux-color" ? "#000000" : "#FFFFFF"}`);
|
|
1825
|
+
}, "insertDropShadow"), We = /* @__PURE__ */ u(function() {
|
|
1826
|
+
return {
|
|
1827
|
+
x: 0,
|
|
1828
|
+
y: 0,
|
|
1829
|
+
fill: void 0,
|
|
1830
|
+
anchor: void 0,
|
|
1831
|
+
style: "#666",
|
|
1832
|
+
width: void 0,
|
|
1833
|
+
height: void 0,
|
|
1834
|
+
textMargin: 0,
|
|
1835
|
+
rx: 0,
|
|
1836
|
+
ry: 0,
|
|
1837
|
+
tspan: !0,
|
|
1838
|
+
valign: void 0
|
|
1839
|
+
};
|
|
1840
|
+
}, "getTextObj"), Ha = /* @__PURE__ */ u(function() {
|
|
1841
|
+
return {
|
|
1842
|
+
x: 0,
|
|
1843
|
+
y: 0,
|
|
1844
|
+
fill: "#EDF2AE",
|
|
1845
|
+
stroke: "#666",
|
|
1846
|
+
width: 100,
|
|
1847
|
+
anchor: "start",
|
|
1848
|
+
height: 100,
|
|
1849
|
+
rx: 0,
|
|
1850
|
+
ry: 0
|
|
1851
|
+
};
|
|
1852
|
+
}, "getNoteRect"), gt = /* @__PURE__ */ function() {
|
|
1853
|
+
function e(d, s, n, g, h, o, x) {
|
|
1854
|
+
const O = s.append("text").attr("x", n + h / 2).attr("y", g + o / 2 + 5).style("text-anchor", "middle").text(d);
|
|
1855
|
+
i(O, x);
|
|
1856
|
+
}
|
|
1857
|
+
u(e, "byText");
|
|
1858
|
+
function t(d, s, n, g, h, o, x, O) {
|
|
1859
|
+
const { actorFontSize: I, actorFontFamily: _, actorFontWeight: f } = O, [E, T] = ve(I), y = d.split(D.lineBreakRegex);
|
|
1860
|
+
for (let R = 0; R < y.length; R++) {
|
|
1861
|
+
const S = R * E - E * (y.length - 1) / 2, w = s.append("text").attr("x", n + h / 2).attr("y", g).style("text-anchor", "middle").style("font-size", T).style("font-weight", f).style("font-family", _);
|
|
1862
|
+
w.append("tspan").attr("x", n + h / 2).attr("dy", S).text(y[R]), w.attr("y", g + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(w, x);
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
u(t, "byTspan");
|
|
1866
|
+
function r(d, s, n, g, h, o, x, O) {
|
|
1867
|
+
const I = s.append("switch"), _ = I.append("foreignObject").attr("x", n).attr("y", g).attr("width", h).attr("height", o).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1868
|
+
_.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(d), t(d, I, n, g, h, o, x, O), i(_, x);
|
|
1869
|
+
}
|
|
1870
|
+
u(r, "byFo");
|
|
1871
|
+
async function a(d, s, n, g, h, o, x, O) {
|
|
1872
|
+
const I = await wt(d, Yt()), _ = s.append("switch"), f = _.append("foreignObject").attr("x", n + h / 2 - I.width / 2).attr("y", g + o / 2 - I.height / 2).attr("width", I.width).attr("height", I.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
1873
|
+
f.append("div").style("text-align", "center").style("vertical-align", "middle").html(await Be(d, Yt())), t(d, _, n, g, h, o, x, O), i(f, x);
|
|
1874
|
+
}
|
|
1875
|
+
u(a, "byKatex");
|
|
1876
|
+
function i(d, s) {
|
|
1877
|
+
for (const n in s)
|
|
1878
|
+
s.hasOwnProperty(n) && d.attr(n, s[n]);
|
|
1879
|
+
}
|
|
1880
|
+
return u(i, "_setTextAttrs"), function(d, s = !1) {
|
|
1881
|
+
return s ? a : d.textPlacement === "fo" ? r : d.textPlacement === "old" ? e : t;
|
|
1882
|
+
};
|
|
1883
|
+
}(), za = /* @__PURE__ */ function() {
|
|
1884
|
+
function e(i, d, s, n, g, h, o) {
|
|
1885
|
+
const x = d.append("text").attr("x", s).attr("y", n).style("text-anchor", "start").text(i);
|
|
1886
|
+
a(x, o);
|
|
1887
|
+
}
|
|
1888
|
+
u(e, "byText");
|
|
1889
|
+
function t(i, d, s, n, g, h, o, x) {
|
|
1890
|
+
const { actorFontSize: O, actorFontFamily: I, actorFontWeight: _ } = x, f = i.split(D.lineBreakRegex);
|
|
1891
|
+
for (let E = 0; E < f.length; E++) {
|
|
1892
|
+
const T = E * O - O * (f.length - 1) / 2, y = d.append("text").attr("x", s).attr("y", n).style("text-anchor", "start").style("font-size", O).style("font-weight", _).style("font-family", I);
|
|
1893
|
+
y.append("tspan").attr("x", s).attr("dy", T).text(f[E]), y.attr("y", n + h / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(y, o);
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
u(t, "byTspan");
|
|
1897
|
+
function r(i, d, s, n, g, h, o, x) {
|
|
1898
|
+
const O = d.append("switch"), I = O.append("foreignObject").attr("x", s).attr("y", n).attr("width", g).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1899
|
+
I.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, O, s, n, g, h, o, x), a(I, o);
|
|
1900
|
+
}
|
|
1901
|
+
u(r, "byFo");
|
|
1902
|
+
function a(i, d) {
|
|
1903
|
+
for (const s in d)
|
|
1904
|
+
d.hasOwnProperty(s) && i.attr(s, d[s]);
|
|
1905
|
+
}
|
|
1906
|
+
return u(a, "_setTextAttrs"), function(i) {
|
|
1907
|
+
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? e : t;
|
|
1908
|
+
};
|
|
1909
|
+
}(), Ua = /* @__PURE__ */ u(function(e, t) {
|
|
1910
|
+
e.append("defs").append("marker").attr("id", t + "-solidTopArrowHead").attr("refX", 7.9).attr("refY", 7.25).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 8 L 0 8 z");
|
|
1911
|
+
}, "insertSolidTopArrowHead"), ja = /* @__PURE__ */ u(function(e, t) {
|
|
1912
|
+
e.append("defs").append("marker").attr("id", t + "-solidBottomArrowHead").attr("refX", 7.9).attr("refY", 0.75).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 0 L 0 8 z");
|
|
1913
|
+
}, "insertSolidBottomArrowHead"), Ga = /* @__PURE__ */ u(function(e, t) {
|
|
1914
|
+
e.append("defs").append("marker").attr("id", t + "-stickTopArrowHead").attr("refX", 7.5).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 7 7").attr("stroke", "black").attr("stroke-width", 1.5).attr("fill", "none");
|
|
1915
|
+
}, "insertStickTopArrowHead"), Xa = /* @__PURE__ */ u(function(e, t) {
|
|
1916
|
+
e.append("defs").append("marker").attr("id", t + "-stickBottomArrowHead").attr("refX", 7.5).attr("refY", 0).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 7 L 7 0").attr("stroke", "black").attr("stroke-width", 1.5).attr("fill", "none");
|
|
1917
|
+
}, "insertStickBottomArrowHead"), K = {
|
|
1918
|
+
drawRect: St,
|
|
1919
|
+
drawText: Rt,
|
|
1920
|
+
drawLabel: Ye,
|
|
1921
|
+
drawActor: Da,
|
|
1922
|
+
drawBox: ka,
|
|
1923
|
+
drawPopup: Ia,
|
|
1924
|
+
anchorElement: Ma,
|
|
1925
|
+
drawActivation: Ca,
|
|
1926
|
+
drawLoop: va,
|
|
1927
|
+
drawBackgroundRect: Ve,
|
|
1928
|
+
insertArrowHead: Va,
|
|
1929
|
+
insertArrowFilledHead: Wa,
|
|
1930
|
+
insertSequenceNumber: Fa,
|
|
1931
|
+
insertArrowCrossHead: Ka,
|
|
1932
|
+
insertDatabaseIcon: Ba,
|
|
1933
|
+
insertComputerIcon: Ya,
|
|
1934
|
+
insertClockIcon: $a,
|
|
1935
|
+
getTextObj: We,
|
|
1936
|
+
getNoteRect: Ha,
|
|
1937
|
+
fixLifeLineHeights: $e,
|
|
1938
|
+
sanitizeUrl: Ce.sanitizeUrl,
|
|
1939
|
+
insertDropShadow: qa,
|
|
1940
|
+
insertSolidTopArrowHead: Ua,
|
|
1941
|
+
insertSolidBottomArrowHead: ja,
|
|
1942
|
+
insertStickTopArrowHead: Ga,
|
|
1943
|
+
insertStickBottomArrowHead: Xa
|
|
1944
|
+
}, l = {}, m = {
|
|
1945
|
+
data: {
|
|
1946
|
+
startx: void 0,
|
|
1947
|
+
stopx: void 0,
|
|
1948
|
+
starty: void 0,
|
|
1949
|
+
stopy: void 0
|
|
1950
|
+
},
|
|
1951
|
+
verticalPos: 0,
|
|
1952
|
+
sequenceItems: [],
|
|
1953
|
+
activations: [],
|
|
1954
|
+
models: {
|
|
1955
|
+
getHeight: /* @__PURE__ */ u(function() {
|
|
1956
|
+
return Math.max.apply(
|
|
1957
|
+
null,
|
|
1958
|
+
this.actors.length === 0 ? [0] : this.actors.map((e) => e.height || 0)
|
|
1959
|
+
) + (this.loops.length === 0 ? 0 : this.loops.map((e) => e.height || 0).reduce((e, t) => e + t)) + (this.messages.length === 0 ? 0 : this.messages.map((e) => e.height || 0).reduce((e, t) => e + t)) + (this.notes.length === 0 ? 0 : this.notes.map((e) => e.height || 0).reduce((e, t) => e + t));
|
|
1960
|
+
}, "getHeight"),
|
|
1961
|
+
clear: /* @__PURE__ */ u(function() {
|
|
1962
|
+
this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
|
|
1963
|
+
}, "clear"),
|
|
1964
|
+
addBox: /* @__PURE__ */ u(function(e) {
|
|
1965
|
+
this.boxes.push(e);
|
|
1966
|
+
}, "addBox"),
|
|
1967
|
+
addActor: /* @__PURE__ */ u(function(e) {
|
|
1968
|
+
this.actors.push(e);
|
|
1969
|
+
}, "addActor"),
|
|
1970
|
+
addLoop: /* @__PURE__ */ u(function(e) {
|
|
1971
|
+
this.loops.push(e);
|
|
1972
|
+
}, "addLoop"),
|
|
1973
|
+
addMessage: /* @__PURE__ */ u(function(e) {
|
|
1974
|
+
this.messages.push(e);
|
|
1975
|
+
}, "addMessage"),
|
|
1976
|
+
addNote: /* @__PURE__ */ u(function(e) {
|
|
1977
|
+
this.notes.push(e);
|
|
1978
|
+
}, "addNote"),
|
|
1979
|
+
lastActor: /* @__PURE__ */ u(function() {
|
|
1980
|
+
return this.actors[this.actors.length - 1];
|
|
1981
|
+
}, "lastActor"),
|
|
1982
|
+
lastLoop: /* @__PURE__ */ u(function() {
|
|
1983
|
+
return this.loops[this.loops.length - 1];
|
|
1984
|
+
}, "lastLoop"),
|
|
1985
|
+
lastMessage: /* @__PURE__ */ u(function() {
|
|
1986
|
+
return this.messages[this.messages.length - 1];
|
|
1987
|
+
}, "lastMessage"),
|
|
1988
|
+
lastNote: /* @__PURE__ */ u(function() {
|
|
1989
|
+
return this.notes[this.notes.length - 1];
|
|
1990
|
+
}, "lastNote"),
|
|
1991
|
+
actors: [],
|
|
1992
|
+
boxes: [],
|
|
1993
|
+
loops: [],
|
|
1994
|
+
messages: [],
|
|
1995
|
+
notes: []
|
|
1996
|
+
},
|
|
1997
|
+
init: /* @__PURE__ */ u(function() {
|
|
1998
|
+
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
|
|
1999
|
+
startx: void 0,
|
|
2000
|
+
stopx: void 0,
|
|
2001
|
+
starty: void 0,
|
|
2002
|
+
stopy: void 0
|
|
2003
|
+
}, this.verticalPos = 0, qe(Q());
|
|
2004
|
+
}, "init"),
|
|
2005
|
+
updateVal: /* @__PURE__ */ u(function(e, t, r, a) {
|
|
2006
|
+
e[t] === void 0 ? e[t] = r : e[t] = a(r, e[t]);
|
|
2007
|
+
}, "updateVal"),
|
|
2008
|
+
updateBounds: /* @__PURE__ */ u(function(e, t, r, a) {
|
|
2009
|
+
const i = this;
|
|
2010
|
+
let d = 0;
|
|
2011
|
+
function s(n) {
|
|
2012
|
+
return /* @__PURE__ */ u(function(g) {
|
|
2013
|
+
d++;
|
|
2014
|
+
const h = i.sequenceItems.length - d + 1;
|
|
2015
|
+
i.updateVal(g, "starty", t - h * l.boxMargin, Math.min), i.updateVal(g, "stopy", a + h * l.boxMargin, Math.max), i.updateVal(m.data, "startx", e - h * l.boxMargin, Math.min), i.updateVal(m.data, "stopx", r + h * l.boxMargin, Math.max), n !== "activation" && (i.updateVal(g, "startx", e - h * l.boxMargin, Math.min), i.updateVal(g, "stopx", r + h * l.boxMargin, Math.max), i.updateVal(m.data, "starty", t - h * l.boxMargin, Math.min), i.updateVal(m.data, "stopy", a + h * l.boxMargin, Math.max));
|
|
2016
|
+
}, "updateItemBounds");
|
|
2017
|
+
}
|
|
2018
|
+
u(s, "updateFn"), this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
|
|
2019
|
+
}, "updateBounds"),
|
|
2020
|
+
insert: /* @__PURE__ */ u(function(e, t, r, a) {
|
|
2021
|
+
const i = D.getMin(e, r), d = D.getMax(e, r), s = D.getMin(t, a), n = D.getMax(t, a);
|
|
2022
|
+
this.updateVal(m.data, "startx", i, Math.min), this.updateVal(m.data, "starty", s, Math.min), this.updateVal(m.data, "stopx", d, Math.max), this.updateVal(m.data, "stopy", n, Math.max), this.updateBounds(i, s, d, n);
|
|
2023
|
+
}, "insert"),
|
|
2024
|
+
newActivation: /* @__PURE__ */ u(function(e, t, r) {
|
|
2025
|
+
const a = r.get(e.from), i = Ft(e.from).length || 0, d = a.x + a.width / 2 + (i - 1) * l.activationWidth / 2;
|
|
2026
|
+
this.activations.push({
|
|
2027
|
+
startx: d,
|
|
2028
|
+
starty: this.verticalPos + 2,
|
|
2029
|
+
stopx: d + l.activationWidth,
|
|
2030
|
+
stopy: void 0,
|
|
2031
|
+
actor: e.from,
|
|
2032
|
+
anchored: K.anchorElement(t)
|
|
2033
|
+
});
|
|
2034
|
+
}, "newActivation"),
|
|
2035
|
+
endActivation: /* @__PURE__ */ u(function(e) {
|
|
2036
|
+
const t = this.activations.map(function(r) {
|
|
2037
|
+
return r.actor;
|
|
2038
|
+
}).lastIndexOf(e.from);
|
|
2039
|
+
return this.activations.splice(t, 1)[0];
|
|
2040
|
+
}, "endActivation"),
|
|
2041
|
+
createLoop: /* @__PURE__ */ u(function(e = { message: void 0, wrap: !1, width: void 0 }, t) {
|
|
2042
|
+
return {
|
|
2043
|
+
startx: void 0,
|
|
2044
|
+
starty: this.verticalPos,
|
|
2045
|
+
stopx: void 0,
|
|
2046
|
+
stopy: void 0,
|
|
2047
|
+
title: e.message,
|
|
2048
|
+
wrap: e.wrap,
|
|
2049
|
+
width: e.width,
|
|
2050
|
+
height: 0,
|
|
2051
|
+
fill: t
|
|
2052
|
+
};
|
|
2053
|
+
}, "createLoop"),
|
|
2054
|
+
newLoop: /* @__PURE__ */ u(function(e = { message: void 0, wrap: !1, width: void 0 }, t) {
|
|
2055
|
+
this.sequenceItems.push(this.createLoop(e, t));
|
|
2056
|
+
}, "newLoop"),
|
|
2057
|
+
endLoop: /* @__PURE__ */ u(function() {
|
|
2058
|
+
return this.sequenceItems.pop();
|
|
2059
|
+
}, "endLoop"),
|
|
2060
|
+
isLoopOverlap: /* @__PURE__ */ u(function() {
|
|
2061
|
+
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
|
|
2062
|
+
}, "isLoopOverlap"),
|
|
2063
|
+
addSectionToLoop: /* @__PURE__ */ u(function(e) {
|
|
2064
|
+
const t = this.sequenceItems.pop();
|
|
2065
|
+
t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({ y: m.getVerticalPos(), height: 0 }), t.sectionTitles.push(e), this.sequenceItems.push(t);
|
|
2066
|
+
}, "addSectionToLoop"),
|
|
2067
|
+
saveVerticalPos: /* @__PURE__ */ u(function() {
|
|
2068
|
+
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
2069
|
+
}, "saveVerticalPos"),
|
|
2070
|
+
resetVerticalPos: /* @__PURE__ */ u(function() {
|
|
2071
|
+
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
2072
|
+
}, "resetVerticalPos"),
|
|
2073
|
+
bumpVerticalPos: /* @__PURE__ */ u(function(e) {
|
|
2074
|
+
this.verticalPos = this.verticalPos + e, this.data.stopy = D.getMax(this.data.stopy, this.verticalPos);
|
|
2075
|
+
}, "bumpVerticalPos"),
|
|
2076
|
+
getVerticalPos: /* @__PURE__ */ u(function() {
|
|
2077
|
+
return this.verticalPos;
|
|
2078
|
+
}, "getVerticalPos"),
|
|
2079
|
+
getBounds: /* @__PURE__ */ u(function() {
|
|
2080
|
+
return { bounds: this.data, models: this.models };
|
|
2081
|
+
}, "getBounds")
|
|
2082
|
+
}, Ja = /* @__PURE__ */ u(async function(e, t, r) {
|
|
2083
|
+
m.bumpVerticalPos(l.boxMargin), t.height = l.boxMargin, t.starty = m.getVerticalPos();
|
|
2084
|
+
const a = pt();
|
|
2085
|
+
a.x = t.startx, a.y = t.starty, a.width = t.width || l.width, a.class = "note";
|
|
2086
|
+
const i = e.append("g");
|
|
2087
|
+
i.attr("data-et", "note"), i.attr("data-id", "i" + r);
|
|
2088
|
+
const d = K.drawRect(i, a), s = ee();
|
|
2089
|
+
s.x = t.startx, s.y = t.starty, s.width = a.width, s.dy = "1em", s.text = t.message, s.class = "noteText", s.fontFamily = l.noteFontFamily, s.fontSize = l.noteFontSize, s.fontWeight = l.noteFontWeight, s.anchor = l.noteAlign, s.textMargin = l.noteMargin, s.valign = "center";
|
|
2090
|
+
const n = J(s.text) ? await $t(i, s) : Rt(i, s), g = Math.round(
|
|
2091
|
+
n.map((h) => (h._groups || h)[0][0].getBBox().height).reduce((h, o) => h + o)
|
|
2092
|
+
);
|
|
2093
|
+
d.attr("height", g + 2 * l.noteMargin), t.height += g + 2 * l.noteMargin, m.bumpVerticalPos(g + 2 * l.noteMargin), t.stopy = t.starty + g + 2 * l.noteMargin, t.stopx = t.startx + a.width, m.insert(t.startx, t.starty, t.stopx, t.stopy), m.models.addNote(t);
|
|
2094
|
+
}, "drawNote"), ke = /* @__PURE__ */ u(function(e, t, r, a, i, d, s) {
|
|
2095
|
+
const n = a.db.getActors(), g = n.get(t.from), h = n.get(t.to), o = r.sequenceVisible;
|
|
2096
|
+
let x = g.x + g.width / 2, O = h.x + h.width / 2;
|
|
2097
|
+
const I = x <= O, _ = je(t, a), f = e.append("g"), E = 16.5, T = /* @__PURE__ */ u((P, C) => {
|
|
2098
|
+
const v = P ? E : -E;
|
|
2099
|
+
return C ? -v : v;
|
|
2100
|
+
}, "getCircleOffset"), y = /* @__PURE__ */ u((P) => {
|
|
2101
|
+
f.append("circle").attr("cx", P).attr("cy", s).attr("r", 5).attr("width", 10).attr("height", 10);
|
|
2102
|
+
}, "drawCircle"), { CENTRAL_CONNECTION: R, CENTRAL_CONNECTION_REVERSE: S, CENTRAL_CONNECTION_DUAL: w } = a.db.LINETYPE;
|
|
2103
|
+
if (o)
|
|
2104
|
+
switch (t.centralConnection) {
|
|
2105
|
+
case R:
|
|
2106
|
+
_ && (O += T(I, !0));
|
|
2107
|
+
break;
|
|
2108
|
+
case S:
|
|
2109
|
+
_ || (x += T(I, !1));
|
|
2110
|
+
break;
|
|
2111
|
+
case w:
|
|
2112
|
+
_ ? O += T(I, !0) : x += T(I, !1);
|
|
2113
|
+
break;
|
|
2114
|
+
}
|
|
2115
|
+
switch (t.centralConnection) {
|
|
2116
|
+
case R:
|
|
2117
|
+
y(O);
|
|
2118
|
+
break;
|
|
2119
|
+
case S:
|
|
2120
|
+
y(x);
|
|
2121
|
+
break;
|
|
2122
|
+
case w:
|
|
2123
|
+
y(x), y(O);
|
|
2124
|
+
break;
|
|
2125
|
+
}
|
|
2126
|
+
}, "drawCentralConnection"), yt = /* @__PURE__ */ u((e) => ({
|
|
2127
|
+
fontFamily: e.messageFontFamily,
|
|
2128
|
+
fontSize: e.messageFontSize,
|
|
2129
|
+
fontWeight: e.messageFontWeight
|
|
2130
|
+
}), "messageFont"), ft = /* @__PURE__ */ u((e) => ({
|
|
2131
|
+
fontFamily: e.noteFontFamily,
|
|
2132
|
+
fontSize: e.noteFontSize,
|
|
2133
|
+
fontWeight: e.noteFontWeight
|
|
2134
|
+
}), "noteFont"), Zt = /* @__PURE__ */ u((e) => ({
|
|
2135
|
+
fontFamily: e.actorFontFamily,
|
|
2136
|
+
fontSize: e.actorFontSize,
|
|
2137
|
+
fontWeight: e.actorFontWeight
|
|
2138
|
+
}), "actorFont");
|
|
2139
|
+
async function Fe(e, t) {
|
|
2140
|
+
m.bumpVerticalPos(10);
|
|
2141
|
+
const { startx: r, stopx: a, message: i } = t, d = D.splitBreaks(i).length, s = J(i), n = s ? await wt(i, Q()) : G.calculateTextDimensions(i, yt(l));
|
|
2142
|
+
if (!s) {
|
|
2143
|
+
const x = n.height / d;
|
|
2144
|
+
t.height += x, m.bumpVerticalPos(x);
|
|
2145
|
+
}
|
|
2146
|
+
let g, h = n.height - 10;
|
|
2147
|
+
const o = n.width;
|
|
2148
|
+
if (r === a) {
|
|
2149
|
+
g = m.getVerticalPos() + h, l.rightAngles || (h += l.boxMargin, g = m.getVerticalPos() + h), h += 30;
|
|
2150
|
+
const x = D.getMax(o / 2, l.width / 2);
|
|
2151
|
+
m.insert(
|
|
2152
|
+
r - x,
|
|
2153
|
+
m.getVerticalPos() - 10 + h,
|
|
2154
|
+
a + x,
|
|
2155
|
+
m.getVerticalPos() + 30 + h
|
|
2156
|
+
);
|
|
2157
|
+
} else
|
|
2158
|
+
h += l.boxMargin, g = m.getVerticalPos() + h, m.insert(r, g - 10, a, g);
|
|
2159
|
+
return m.bumpVerticalPos(h), t.height += h, t.stopy = t.starty + t.height, m.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), g;
|
|
2160
|
+
}
|
|
2161
|
+
u(Fe, "boundMessage");
|
|
2162
|
+
var Qa = /* @__PURE__ */ u(async function(e, t, r, a, i, d) {
|
|
2163
|
+
const { startx: s, stopx: n, starty: g, message: h, type: o, sequenceIndex: x, sequenceVisible: O } = t, I = G.calculateTextDimensions(h, yt(l)), _ = ee();
|
|
2164
|
+
_.x = s, _.y = g + 10, _.width = n - s, _.class = "messageText", _.dy = "1em", _.text = h, _.fontFamily = l.messageFontFamily, _.fontSize = l.messageFontSize, _.fontWeight = l.messageFontWeight, _.anchor = l.messageAlign, _.valign = "center", _.textMargin = l.wrapPadding, _.tspan = !1, J(_.text) ? await $t(e, _, { startx: s, stopx: n, starty: r }) : Rt(e, _);
|
|
2165
|
+
const f = I.width;
|
|
2166
|
+
let E;
|
|
2167
|
+
if (s === n) {
|
|
2168
|
+
const y = O || l.showSequenceNumbers, R = je(i, a), S = ir(i, a), w = s + (y && (R || S) ? 10 : 0);
|
|
2169
|
+
l.rightAngles ? E = e.append("path").attr(
|
|
2170
|
+
"d",
|
|
2171
|
+
`M ${w},${r} H ${s + D.getMax(l.width / 2, f / 2)} V ${r + 25} H ${s}`
|
|
2172
|
+
) : E = e.append("path").attr(
|
|
2173
|
+
"d",
|
|
2174
|
+
"M " + w + "," + r + " C " + (w + 60) + "," + (r - 10) + " " + (s + 60) + "," + (r + 30) + " " + s + "," + (r + 20)
|
|
2175
|
+
), Jt(i, a) && ke(e, i, t, a, s, n, r);
|
|
2176
|
+
} else
|
|
2177
|
+
E = e.append("line"), E.attr("x1", s), E.attr("y1", r), E.attr("x2", n), E.attr("y2", r), Jt(i, a) && ke(e, i, t, a, s, n, r);
|
|
2178
|
+
o === a.db.LINETYPE.DOTTED || o === a.db.LINETYPE.DOTTED_CROSS || o === a.db.LINETYPE.DOTTED_POINT || o === a.db.LINETYPE.DOTTED_OPEN || o === a.db.LINETYPE.BIDIRECTIONAL_DOTTED || o === a.db.LINETYPE.SOLID_TOP_DOTTED || o === a.db.LINETYPE.SOLID_BOTTOM_DOTTED || o === a.db.LINETYPE.STICK_TOP_DOTTED || o === a.db.LINETYPE.STICK_BOTTOM_DOTTED || o === a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || o === a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || o === a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || o === a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED ? (E.style("stroke-dasharray", "3, 3"), E.attr("class", "messageLine1")) : E.attr("class", "messageLine0"), E.attr("data-et", "message"), E.attr("data-id", "i" + t.id), E.attr("data-from", t.from), E.attr("data-to", t.to);
|
|
2179
|
+
let T = "";
|
|
2180
|
+
if (l.arrowMarkerAbsolute && (T = pa(!0)), E.attr("stroke-width", 2), E.attr("stroke", "none"), E.style("fill", "none"), (o === a.db.LINETYPE.SOLID_TOP || o === a.db.LINETYPE.SOLID_TOP_DOTTED) && E.attr("marker-end", "url(" + T + "#" + d + "-solidTopArrowHead)"), (o === a.db.LINETYPE.SOLID_BOTTOM || o === a.db.LINETYPE.SOLID_BOTTOM_DOTTED) && E.attr("marker-end", "url(" + T + "#" + d + "-solidBottomArrowHead)"), (o === a.db.LINETYPE.STICK_TOP || o === a.db.LINETYPE.STICK_TOP_DOTTED) && E.attr("marker-end", "url(" + T + "#" + d + "-stickTopArrowHead)"), (o === a.db.LINETYPE.STICK_BOTTOM || o === a.db.LINETYPE.STICK_BOTTOM_DOTTED) && E.attr("marker-end", "url(" + T + "#" + d + "-stickBottomArrowHead)"), (o === a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || o === a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED) && E.attr("marker-start", "url(" + T + "#" + d + "-solidBottomArrowHead)"), (o === a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || o === a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED) && E.attr("marker-start", "url(" + T + "#" + d + "-solidTopArrowHead)"), (o === a.db.LINETYPE.STICK_ARROW_TOP_REVERSE || o === a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED) && E.attr("marker-start", "url(" + T + "#" + d + "-stickBottomArrowHead)"), (o === a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || o === a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED) && E.attr("marker-start", "url(" + T + "#" + d + "-stickTopArrowHead)"), (o === a.db.LINETYPE.SOLID || o === a.db.LINETYPE.DOTTED) && E.attr("marker-end", "url(" + T + "#" + d + "-arrowhead)"), (o === a.db.LINETYPE.BIDIRECTIONAL_SOLID || o === a.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (E.attr("marker-start", "url(" + T + "#" + d + "-arrowhead)"), E.attr("marker-end", "url(" + T + "#" + d + "-arrowhead)")), (o === a.db.LINETYPE.SOLID_POINT || o === a.db.LINETYPE.DOTTED_POINT) && E.attr("marker-end", "url(" + T + "#" + d + "-filled-head)"), (o === a.db.LINETYPE.SOLID_CROSS || o === a.db.LINETYPE.DOTTED_CROSS) && E.attr("marker-end", "url(" + T + "#" + d + "-crosshead)"), O || l.showSequenceNumbers) {
|
|
2181
|
+
const y = o === a.db.LINETYPE.BIDIRECTIONAL_SOLID || o === a.db.LINETYPE.BIDIRECTIONAL_DOTTED, R = o === a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || o === a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || o === a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || o === a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || o === a.db.LINETYPE.STICK_ARROW_TOP_REVERSE || o === a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || o === a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || o === a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED, S = 6, w = Jt(i, a);
|
|
2182
|
+
let P = s, C = n;
|
|
2183
|
+
y ? (s < n ? P = s + S * 2 : (P = s - S + (w ? -5 : 0), P += (i == null ? void 0 : i.centralConnection) === a.db.LINETYPE.CENTRAL_CONNECTION_DUAL || (i == null ? void 0 : i.centralConnection) === a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), E.attr("x1", P)) : R ? (n > s ? C = n - 2 * S : (C = n - S, P += (i == null ? void 0 : i.centralConnection) === a.db.LINETYPE.CENTRAL_CONNECTION_DUAL || (i == null ? void 0 : i.centralConnection) === a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), C += w ? 15 : 0, E.attr("x2", C), E.attr("x1", P)) : E.attr("x1", s + S);
|
|
2184
|
+
let v = 0;
|
|
2185
|
+
const Y = s === n, H = s <= n;
|
|
2186
|
+
Y ? v = t.fromBounds + 1 : R ? v = H ? t.toBounds - 1 : t.fromBounds + 1 : v = H ? t.fromBounds + 1 : t.toBounds - 1, e.append("line").attr("x1", v).attr("y1", r).attr("x2", v).attr("y2", r).attr("stroke-width", 0).attr("marker-start", "url(" + T + "#" + d + "-sequencenumber)"), e.append("text").attr("x", v).attr("y", r + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(x);
|
|
2187
|
+
}
|
|
2188
|
+
}, "drawMessage"), Za = /* @__PURE__ */ u(function(e, t, r, a, i, d, s) {
|
|
2189
|
+
let n = 0, g = 0, h, o = 0;
|
|
2190
|
+
for (const x of a) {
|
|
2191
|
+
const O = t.get(x), I = O.box;
|
|
2192
|
+
h && h != I && (s || m.models.addBox(h), g += l.boxMargin + h.margin), I && I != h && (s || (I.x = n + g, I.y = i), g += I.margin), O.width = D.getMax(O.width || l.width, l.width), O.height = D.getMax(O.height || l.height, l.height), O.margin = O.margin || l.actorMargin, o = D.getMax(o, O.height), r.get(O.name) && (g += O.width / 2), O.x = n + g, O.starty = m.getVerticalPos(), m.insert(O.x, i, O.x + O.width, O.height), n += O.width + g, O.box && (O.box.width = n + I.margin - O.box.x), g = O.margin, h = O.box, m.models.addActor(O);
|
|
2193
|
+
}
|
|
2194
|
+
h && !s && m.models.addBox(h), m.bumpVerticalPos(o);
|
|
2195
|
+
}, "addActorRenderingData"), te = /* @__PURE__ */ u(async function(e, t, r, a, i, d, s) {
|
|
2196
|
+
if (a) {
|
|
2197
|
+
let n = 0;
|
|
2198
|
+
m.bumpVerticalPos(l.boxMargin * 2);
|
|
2199
|
+
for (const g of r) {
|
|
2200
|
+
const h = t.get(g);
|
|
2201
|
+
h.stopy || (h.stopy = m.getVerticalPos());
|
|
2202
|
+
const o = await K.drawActor(
|
|
2203
|
+
e,
|
|
2204
|
+
h,
|
|
2205
|
+
l,
|
|
2206
|
+
!0,
|
|
2207
|
+
i,
|
|
2208
|
+
d,
|
|
2209
|
+
s
|
|
2210
|
+
);
|
|
2211
|
+
n = D.getMax(n, o);
|
|
2212
|
+
}
|
|
2213
|
+
m.bumpVerticalPos(n + l.boxMargin);
|
|
2214
|
+
} else
|
|
2215
|
+
for (const n of r) {
|
|
2216
|
+
const g = t.get(n);
|
|
2217
|
+
await K.drawActor(e, g, l, !1, i, d, s);
|
|
2218
|
+
}
|
|
2219
|
+
}, "drawActors"), Ke = /* @__PURE__ */ u(function(e, t, r, a) {
|
|
2220
|
+
let i = 0, d = 0;
|
|
2221
|
+
for (const s of r) {
|
|
2222
|
+
const n = t.get(s), g = er(n), h = K.drawPopup(
|
|
2223
|
+
e,
|
|
2224
|
+
n,
|
|
2225
|
+
g,
|
|
2226
|
+
l,
|
|
2227
|
+
l.forceMenus,
|
|
2228
|
+
a
|
|
2229
|
+
);
|
|
2230
|
+
h.height > i && (i = h.height), h.width + n.x > d && (d = h.width + n.x);
|
|
2231
|
+
}
|
|
2232
|
+
return { maxHeight: i, maxWidth: d };
|
|
2233
|
+
}, "drawActorsPopup"), qe = /* @__PURE__ */ u(function(e) {
|
|
2234
|
+
aa(l, e), e.fontFamily && (l.actorFontFamily = l.noteFontFamily = l.messageFontFamily = e.fontFamily), e.fontSize && (l.actorFontSize = l.noteFontSize = l.messageFontSize = e.fontSize), e.fontWeight && (l.actorFontWeight = l.noteFontWeight = l.messageFontWeight = e.fontWeight);
|
|
2235
|
+
}, "setConf"), Ft = /* @__PURE__ */ u(function(e) {
|
|
2236
|
+
return m.activations.filter(function(t) {
|
|
2237
|
+
return t.actor === e;
|
|
2238
|
+
});
|
|
2239
|
+
}, "actorActivations"), Me = /* @__PURE__ */ u(function(e, t) {
|
|
2240
|
+
const r = t.get(e), a = Ft(e), i = a.reduce(
|
|
2241
|
+
function(s, n) {
|
|
2242
|
+
return D.getMin(s, n.startx);
|
|
2243
|
+
},
|
|
2244
|
+
r.x + r.width / 2 - 1
|
|
2245
|
+
), d = a.reduce(
|
|
2246
|
+
function(s, n) {
|
|
2247
|
+
return D.getMax(s, n.stopx);
|
|
2248
|
+
},
|
|
2249
|
+
r.x + r.width / 2 + 1
|
|
2250
|
+
);
|
|
2251
|
+
return [i, d];
|
|
2252
|
+
}, "activationBounds");
|
|
2253
|
+
function lt(e, t, r, a, i) {
|
|
2254
|
+
m.bumpVerticalPos(r);
|
|
2255
|
+
let d = a;
|
|
2256
|
+
if (t.id && t.message && e[t.id]) {
|
|
2257
|
+
const s = e[t.id].width, n = yt(l);
|
|
2258
|
+
t.message = G.wrapLabel(`[${t.message}]`, s - 2 * l.wrapPadding, n), t.width = s, t.wrap = !0;
|
|
2259
|
+
const g = G.calculateTextDimensions(t.message, n), h = D.getMax(g.height, l.labelBoxHeight);
|
|
2260
|
+
d = a + h, st.debug(`${h} - ${t.message}`);
|
|
2261
|
+
}
|
|
2262
|
+
i(t), m.bumpVerticalPos(d);
|
|
2263
|
+
}
|
|
2264
|
+
u(lt, "adjustLoopHeightForWrap");
|
|
2265
|
+
function He(e, t, r, a, i, d, s) {
|
|
2266
|
+
function n(o, x) {
|
|
2267
|
+
o.x < i.get(e.from).x ? (m.insert(
|
|
2268
|
+
t.stopx - x,
|
|
2269
|
+
t.starty,
|
|
2270
|
+
t.startx,
|
|
2271
|
+
t.stopy + o.height / 2 + l.noteMargin
|
|
2272
|
+
), t.stopx = t.stopx + x) : (m.insert(
|
|
2273
|
+
t.startx,
|
|
2274
|
+
t.starty,
|
|
2275
|
+
t.stopx + x,
|
|
2276
|
+
t.stopy + o.height / 2 + l.noteMargin
|
|
2277
|
+
), t.stopx = t.stopx - x);
|
|
2278
|
+
}
|
|
2279
|
+
u(n, "receiverAdjustment");
|
|
2280
|
+
function g(o, x) {
|
|
2281
|
+
o.x < i.get(e.to).x ? (m.insert(
|
|
2282
|
+
t.startx - x,
|
|
2283
|
+
t.starty,
|
|
2284
|
+
t.stopx,
|
|
2285
|
+
t.stopy + o.height / 2 + l.noteMargin
|
|
2286
|
+
), t.startx = t.startx + x) : (m.insert(
|
|
2287
|
+
t.stopx,
|
|
2288
|
+
t.starty,
|
|
2289
|
+
t.startx + x,
|
|
2290
|
+
t.stopy + o.height / 2 + l.noteMargin
|
|
2291
|
+
), t.startx = t.startx - x);
|
|
2292
|
+
}
|
|
2293
|
+
u(g, "senderAdjustment");
|
|
2294
|
+
const h = [
|
|
2295
|
+
Bt.ACTOR,
|
|
2296
|
+
Bt.CONTROL,
|
|
2297
|
+
Bt.ENTITY,
|
|
2298
|
+
Bt.DATABASE
|
|
2299
|
+
];
|
|
2300
|
+
if (d.get(e.to) == a) {
|
|
2301
|
+
const o = i.get(e.to), x = h.includes(o.type) ? bt / 2 + 3 : o.width / 2 + 3;
|
|
2302
|
+
n(o, x), o.starty = r - o.height / 2, m.bumpVerticalPos(o.height / 2);
|
|
2303
|
+
} else if (s.get(e.from) == a) {
|
|
2304
|
+
const o = i.get(e.from);
|
|
2305
|
+
if (l.mirrorActors) {
|
|
2306
|
+
const x = h.includes(o.type) ? bt / 2 : o.width / 2;
|
|
2307
|
+
g(o, x);
|
|
2308
|
+
}
|
|
2309
|
+
o.stopy = r - o.height / 2, m.bumpVerticalPos(o.height / 2);
|
|
2310
|
+
} else if (s.get(e.to) == a) {
|
|
2311
|
+
const o = i.get(e.to);
|
|
2312
|
+
if (l.mirrorActors) {
|
|
2313
|
+
const x = h.includes(o.type) ? bt / 2 + 3 : o.width / 2 + 3;
|
|
2314
|
+
n(o, x);
|
|
2315
|
+
}
|
|
2316
|
+
o.stopy = r - o.height / 2, m.bumpVerticalPos(o.height / 2);
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
u(He, "adjustCreatedDestroyedData");
|
|
2320
|
+
var tr = /* @__PURE__ */ u(async function(e, t, r, a) {
|
|
2321
|
+
const { securityLevel: i, sequence: d, look: s } = Q();
|
|
2322
|
+
l = d;
|
|
2323
|
+
let n;
|
|
2324
|
+
i === "sandbox" && (n = Ct("#i" + t));
|
|
2325
|
+
const g = i === "sandbox" ? Ct(n.nodes()[0].contentDocument.body) : Ct("body"), h = i === "sandbox" ? n.nodes()[0].contentDocument : document;
|
|
2326
|
+
m.init(), st.debug(a.db);
|
|
2327
|
+
const o = i === "sandbox" ? g.select(`[id="${t}"]`) : Ct(`[id="${t}"]`), x = a.db.getActors(), O = a.db.getCreatedActors(), I = a.db.getDestroyedActors(), _ = a.db.getBoxes();
|
|
2328
|
+
let f = a.db.getActorKeys();
|
|
2329
|
+
const E = a.db.getMessages(), T = a.db.getDiagramTitle(), y = a.db.hasAtLeastOneBox(), R = a.db.hasAtLeastOneBoxWithTitle(), S = await ze(x, E, a);
|
|
2330
|
+
if (l.height = await Ue(x, S, _), K.insertComputerIcon(o, t), K.insertDatabaseIcon(o, t), K.insertClockIcon(o, t), y && (m.bumpVerticalPos(l.boxMargin), R && m.bumpVerticalPos(_[0].textMaxHeight)), l.hideUnusedParticipants === !0) {
|
|
2331
|
+
const L = /* @__PURE__ */ new Set();
|
|
2332
|
+
E.forEach((k) => {
|
|
2333
|
+
L.add(k.from), L.add(k.to);
|
|
2334
|
+
}), f = f.filter((k) => L.has(k));
|
|
2335
|
+
}
|
|
2336
|
+
const w = new Map(
|
|
2337
|
+
f.map((L, k) => {
|
|
2338
|
+
var tt;
|
|
2339
|
+
return [((tt = x.get(L)) == null ? void 0 : tt.name) ?? L, k];
|
|
2340
|
+
})
|
|
2341
|
+
);
|
|
2342
|
+
Za(o, x, O, f, 0, E, !1);
|
|
2343
|
+
const P = await or(E, x, S, a);
|
|
2344
|
+
K.insertArrowHead(o, t), K.insertArrowCrossHead(o, t), K.insertArrowFilledHead(o, t), K.insertSequenceNumber(o, t), K.insertSolidTopArrowHead(o, t), K.insertSolidBottomArrowHead(o, t), K.insertStickTopArrowHead(o, t), K.insertStickBottomArrowHead(o, t), s === "neo" && K.insertDropShadow(o, l);
|
|
2345
|
+
function C(L, k) {
|
|
2346
|
+
const tt = m.endActivation(L);
|
|
2347
|
+
tt.starty + 18 > k && (tt.starty = k - 6, k += 12), K.drawActivation(
|
|
2348
|
+
o,
|
|
2349
|
+
tt,
|
|
2350
|
+
k,
|
|
2351
|
+
l,
|
|
2352
|
+
Ft(L.from).length,
|
|
2353
|
+
a,
|
|
2354
|
+
w
|
|
2355
|
+
), m.insert(tt.startx, k - 10, tt.stopx, k);
|
|
2356
|
+
}
|
|
2357
|
+
u(C, "activeEnd");
|
|
2358
|
+
let v = 1, Y = 1;
|
|
2359
|
+
const H = [], z = [];
|
|
2360
|
+
let U = 0;
|
|
2361
|
+
for (const L of E) {
|
|
2362
|
+
let k, tt, et;
|
|
2363
|
+
switch (L.type) {
|
|
2364
|
+
case a.db.LINETYPE.NOTE:
|
|
2365
|
+
m.resetVerticalPos(), tt = L.noteModel, await Ja(o, tt, L.id);
|
|
2366
|
+
break;
|
|
2367
|
+
case a.db.LINETYPE.ACTIVE_START:
|
|
2368
|
+
m.newActivation(L, o, x);
|
|
2369
|
+
break;
|
|
2370
|
+
case a.db.LINETYPE.CENTRAL_CONNECTION:
|
|
2371
|
+
m.newActivation(L, o, x);
|
|
2372
|
+
break;
|
|
2373
|
+
case a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:
|
|
2374
|
+
m.newActivation(L, o, x);
|
|
2375
|
+
break;
|
|
2376
|
+
case a.db.LINETYPE.ACTIVE_END:
|
|
2377
|
+
C(L, m.getVerticalPos());
|
|
2378
|
+
break;
|
|
2379
|
+
case a.db.LINETYPE.LOOP_START:
|
|
2380
|
+
lt(
|
|
2381
|
+
P,
|
|
2382
|
+
L,
|
|
2383
|
+
l.boxMargin,
|
|
2384
|
+
l.boxMargin + l.boxTextMargin,
|
|
2385
|
+
(W) => m.newLoop(W)
|
|
2386
|
+
);
|
|
2387
|
+
break;
|
|
2388
|
+
case a.db.LINETYPE.LOOP_END:
|
|
2389
|
+
k = m.endLoop(), await K.drawLoop(o, k, "loop", l, L), m.bumpVerticalPos(k.stopy - m.getVerticalPos()), m.models.addLoop(k);
|
|
2390
|
+
break;
|
|
2391
|
+
case a.db.LINETYPE.RECT_START:
|
|
2392
|
+
lt(
|
|
2393
|
+
P,
|
|
2394
|
+
L,
|
|
2395
|
+
l.boxMargin,
|
|
2396
|
+
l.boxMargin,
|
|
2397
|
+
(W) => m.newLoop(void 0, W.message)
|
|
2398
|
+
);
|
|
2399
|
+
break;
|
|
2400
|
+
case a.db.LINETYPE.RECT_END:
|
|
2401
|
+
k = m.endLoop(), z.push(k), m.models.addLoop(k), m.bumpVerticalPos(k.stopy - m.getVerticalPos());
|
|
2402
|
+
break;
|
|
2403
|
+
case a.db.LINETYPE.OPT_START:
|
|
2404
|
+
lt(
|
|
2405
|
+
P,
|
|
2406
|
+
L,
|
|
2407
|
+
l.boxMargin,
|
|
2408
|
+
l.boxMargin + l.boxTextMargin,
|
|
2409
|
+
(W) => m.newLoop(W)
|
|
2410
|
+
);
|
|
2411
|
+
break;
|
|
2412
|
+
case a.db.LINETYPE.OPT_END:
|
|
2413
|
+
k = m.endLoop(), await K.drawLoop(o, k, "opt", l, L), m.bumpVerticalPos(k.stopy - m.getVerticalPos()), m.models.addLoop(k);
|
|
2414
|
+
break;
|
|
2415
|
+
case a.db.LINETYPE.ALT_START:
|
|
2416
|
+
lt(
|
|
2417
|
+
P,
|
|
2418
|
+
L,
|
|
2419
|
+
l.boxMargin,
|
|
2420
|
+
l.boxMargin + l.boxTextMargin,
|
|
2421
|
+
(W) => m.newLoop(W)
|
|
2422
|
+
);
|
|
2423
|
+
break;
|
|
2424
|
+
case a.db.LINETYPE.ALT_ELSE:
|
|
2425
|
+
lt(
|
|
2426
|
+
P,
|
|
2427
|
+
L,
|
|
2428
|
+
l.boxMargin + l.boxTextMargin,
|
|
2429
|
+
l.boxMargin,
|
|
2430
|
+
(W) => m.addSectionToLoop(W)
|
|
2431
|
+
);
|
|
2432
|
+
break;
|
|
2433
|
+
case a.db.LINETYPE.ALT_END:
|
|
2434
|
+
k = m.endLoop(), await K.drawLoop(o, k, "alt", l, L), m.bumpVerticalPos(k.stopy - m.getVerticalPos()), m.models.addLoop(k);
|
|
2435
|
+
break;
|
|
2436
|
+
case a.db.LINETYPE.PAR_START:
|
|
2437
|
+
case a.db.LINETYPE.PAR_OVER_START:
|
|
2438
|
+
lt(
|
|
2439
|
+
P,
|
|
2440
|
+
L,
|
|
2441
|
+
l.boxMargin,
|
|
2442
|
+
l.boxMargin + l.boxTextMargin,
|
|
2443
|
+
(W) => m.newLoop(W)
|
|
2444
|
+
), m.saveVerticalPos();
|
|
2445
|
+
break;
|
|
2446
|
+
case a.db.LINETYPE.PAR_AND:
|
|
2447
|
+
lt(
|
|
2448
|
+
P,
|
|
2449
|
+
L,
|
|
2450
|
+
l.boxMargin + l.boxTextMargin,
|
|
2451
|
+
l.boxMargin,
|
|
2452
|
+
(W) => m.addSectionToLoop(W)
|
|
2453
|
+
);
|
|
2454
|
+
break;
|
|
2455
|
+
case a.db.LINETYPE.PAR_END:
|
|
2456
|
+
k = m.endLoop(), await K.drawLoop(o, k, "par", l, L), m.bumpVerticalPos(k.stopy - m.getVerticalPos()), m.models.addLoop(k);
|
|
2457
|
+
break;
|
|
2458
|
+
case a.db.LINETYPE.AUTONUMBER:
|
|
2459
|
+
v = L.message.start || v, Y = L.message.step || Y, L.message.visible ? a.db.enableSequenceNumbers() : a.db.disableSequenceNumbers();
|
|
2460
|
+
break;
|
|
2461
|
+
case a.db.LINETYPE.CRITICAL_START:
|
|
2462
|
+
lt(
|
|
2463
|
+
P,
|
|
2464
|
+
L,
|
|
2465
|
+
l.boxMargin,
|
|
2466
|
+
l.boxMargin + l.boxTextMargin,
|
|
2467
|
+
(W) => m.newLoop(W)
|
|
2468
|
+
);
|
|
2469
|
+
break;
|
|
2470
|
+
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
2471
|
+
lt(
|
|
2472
|
+
P,
|
|
2473
|
+
L,
|
|
2474
|
+
l.boxMargin + l.boxTextMargin,
|
|
2475
|
+
l.boxMargin,
|
|
2476
|
+
(W) => m.addSectionToLoop(W)
|
|
2477
|
+
);
|
|
2478
|
+
break;
|
|
2479
|
+
case a.db.LINETYPE.CRITICAL_END:
|
|
2480
|
+
k = m.endLoop(), await K.drawLoop(o, k, "critical", l, L), m.bumpVerticalPos(k.stopy - m.getVerticalPos()), m.models.addLoop(k);
|
|
2481
|
+
break;
|
|
2482
|
+
case a.db.LINETYPE.BREAK_START:
|
|
2483
|
+
lt(
|
|
2484
|
+
P,
|
|
2485
|
+
L,
|
|
2486
|
+
l.boxMargin,
|
|
2487
|
+
l.boxMargin + l.boxTextMargin,
|
|
2488
|
+
(W) => m.newLoop(W)
|
|
2489
|
+
);
|
|
2490
|
+
break;
|
|
2491
|
+
case a.db.LINETYPE.BREAK_END:
|
|
2492
|
+
k = m.endLoop(), await K.drawLoop(o, k, "break", l, L), m.bumpVerticalPos(k.stopy - m.getVerticalPos()), m.models.addLoop(k);
|
|
2493
|
+
break;
|
|
2494
|
+
default:
|
|
2495
|
+
try {
|
|
2496
|
+
et = L.msgModel, et.starty = m.getVerticalPos(), et.sequenceIndex = v, et.sequenceVisible = a.db.showSequenceNumbers(), et.id = L.id, et.from = L.from, et.to = L.to;
|
|
2497
|
+
const W = await Fe(o, et);
|
|
2498
|
+
He(
|
|
2499
|
+
L,
|
|
2500
|
+
et,
|
|
2501
|
+
W,
|
|
2502
|
+
U,
|
|
2503
|
+
x,
|
|
2504
|
+
O,
|
|
2505
|
+
I
|
|
2506
|
+
), H.push({ messageModel: et, lineStartY: W, msg: L }), m.models.addMessage(et);
|
|
2507
|
+
} catch (W) {
|
|
2508
|
+
st.error("error while drawing message", W);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
[
|
|
2512
|
+
a.db.LINETYPE.SOLID_OPEN,
|
|
2513
|
+
a.db.LINETYPE.DOTTED_OPEN,
|
|
2514
|
+
a.db.LINETYPE.SOLID,
|
|
2515
|
+
a.db.LINETYPE.SOLID_TOP,
|
|
2516
|
+
a.db.LINETYPE.SOLID_BOTTOM,
|
|
2517
|
+
a.db.LINETYPE.STICK_TOP,
|
|
2518
|
+
a.db.LINETYPE.STICK_BOTTOM,
|
|
2519
|
+
a.db.LINETYPE.SOLID_TOP_DOTTED,
|
|
2520
|
+
a.db.LINETYPE.SOLID_BOTTOM_DOTTED,
|
|
2521
|
+
a.db.LINETYPE.STICK_TOP_DOTTED,
|
|
2522
|
+
a.db.LINETYPE.STICK_BOTTOM_DOTTED,
|
|
2523
|
+
a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
|
|
2524
|
+
a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
|
|
2525
|
+
a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
|
|
2526
|
+
a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
|
|
2527
|
+
a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
|
|
2528
|
+
a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2529
|
+
a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
|
|
2530
|
+
a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2531
|
+
a.db.LINETYPE.DOTTED,
|
|
2532
|
+
a.db.LINETYPE.SOLID_CROSS,
|
|
2533
|
+
a.db.LINETYPE.DOTTED_CROSS,
|
|
2534
|
+
a.db.LINETYPE.SOLID_POINT,
|
|
2535
|
+
a.db.LINETYPE.DOTTED_POINT,
|
|
2536
|
+
a.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2537
|
+
a.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2538
|
+
].includes(L.type) && (v = v + Y), U++;
|
|
2539
|
+
}
|
|
2540
|
+
st.debug("createdActors", O), st.debug("destroyedActors", I), await te(o, x, f, !1, t, a, w);
|
|
2541
|
+
for (const L of H)
|
|
2542
|
+
await Qa(o, L.messageModel, L.lineStartY, a, L.msg, t);
|
|
2543
|
+
l.mirrorActors && await te(o, x, f, !0, t, a, w), z.forEach((L) => K.drawBackgroundRect(o, L)), $e(o, x, f, l);
|
|
2544
|
+
for (const L of m.models.boxes) {
|
|
2545
|
+
L.height = m.getVerticalPos() - L.y, m.insert(L.x, L.y, L.x + L.width, L.height);
|
|
2546
|
+
const k = l.boxMargin * 2;
|
|
2547
|
+
L.startx = L.x - k, L.starty = L.y - k * 0.25, L.stopx = L.startx + L.width + 2 * k, L.stopy = L.starty + L.height + k * 0.75, L.stroke = "rgb(0,0,0, 0.5)", K.drawBox(o, L, l);
|
|
2548
|
+
}
|
|
2549
|
+
y && m.bumpVerticalPos(l.boxMargin);
|
|
2550
|
+
const X = Ke(o, x, f, h), { bounds: q } = m.getBounds();
|
|
2551
|
+
q.startx === void 0 && (q.startx = 0), q.starty === void 0 && (q.starty = 0), q.stopx === void 0 && (q.stopx = 0), q.stopy === void 0 && (q.stopy = 0);
|
|
2552
|
+
let it = q.stopy - q.starty;
|
|
2553
|
+
it < X.maxHeight && (it = X.maxHeight);
|
|
2554
|
+
let Z = it + 2 * l.diagramMarginY;
|
|
2555
|
+
l.mirrorActors && (Z = Z - l.boxMargin + l.bottomMarginAdj);
|
|
2556
|
+
let nt = q.stopx - q.startx;
|
|
2557
|
+
nt < X.maxWidth && (nt = X.maxWidth);
|
|
2558
|
+
const $ = nt + 2 * l.diagramMarginX;
|
|
2559
|
+
T && o.append("text").text(T).attr("x", (q.stopx - q.startx) / 2 - 2 * l.diagramMarginX).attr("y", -25), ea(o, Z, $, l.useMaxWidth);
|
|
2560
|
+
const M = T ? 40 : 0, Nt = x.size && s === "neo" ? 30 : 0;
|
|
2561
|
+
o.attr(
|
|
2562
|
+
"viewBox",
|
|
2563
|
+
q.startx - l.diagramMarginX + " -" + (l.diagramMarginY + M) + " " + $ + " " + (Z + M + Nt)
|
|
2564
|
+
), st.debug("models:", m.models);
|
|
2565
|
+
}, "draw");
|
|
2566
|
+
async function ze(e, t, r) {
|
|
2567
|
+
const a = {};
|
|
2568
|
+
for (const i of t)
|
|
2569
|
+
if (e.get(i.to) && e.get(i.from)) {
|
|
2570
|
+
const d = e.get(i.to);
|
|
2571
|
+
if (i.placement === r.db.PLACEMENT.LEFTOF && !d.prevActor || i.placement === r.db.PLACEMENT.RIGHTOF && !d.nextActor)
|
|
2572
|
+
continue;
|
|
2573
|
+
const s = i.placement !== void 0, n = !s, g = s ? ft(l) : yt(l), h = i.wrap ? G.wrapLabel(i.message, l.width - 2 * l.wrapPadding, g) : i.message, o = (J(h) ? await wt(i.message, Q()) : G.calculateTextDimensions(h, g)).width + 2 * l.wrapPadding;
|
|
2574
|
+
n && i.from === d.nextActor ? a[i.to] = D.getMax(
|
|
2575
|
+
a[i.to] || 0,
|
|
2576
|
+
o
|
|
2577
|
+
) : n && i.from === d.prevActor ? a[i.from] = D.getMax(
|
|
2578
|
+
a[i.from] || 0,
|
|
2579
|
+
o
|
|
2580
|
+
) : n && i.from === i.to ? (a[i.from] = D.getMax(
|
|
2581
|
+
a[i.from] || 0,
|
|
2582
|
+
o / 2
|
|
2583
|
+
), a[i.to] = D.getMax(
|
|
2584
|
+
a[i.to] || 0,
|
|
2585
|
+
o / 2
|
|
2586
|
+
)) : i.placement === r.db.PLACEMENT.RIGHTOF ? a[i.from] = D.getMax(
|
|
2587
|
+
a[i.from] || 0,
|
|
2588
|
+
o
|
|
2589
|
+
) : i.placement === r.db.PLACEMENT.LEFTOF ? a[d.prevActor] = D.getMax(
|
|
2590
|
+
a[d.prevActor] || 0,
|
|
2591
|
+
o
|
|
2592
|
+
) : i.placement === r.db.PLACEMENT.OVER && (d.prevActor && (a[d.prevActor] = D.getMax(
|
|
2593
|
+
a[d.prevActor] || 0,
|
|
2594
|
+
o / 2
|
|
2595
|
+
)), d.nextActor && (a[i.from] = D.getMax(
|
|
2596
|
+
a[i.from] || 0,
|
|
2597
|
+
o / 2
|
|
2598
|
+
)));
|
|
2599
|
+
}
|
|
2600
|
+
return st.debug("maxMessageWidthPerActor:", a), a;
|
|
2601
|
+
}
|
|
2602
|
+
u(ze, "getMaxMessageWidthPerActor");
|
|
2603
|
+
var er = /* @__PURE__ */ u(function(e) {
|
|
2604
|
+
let t = 0;
|
|
2605
|
+
const r = Zt(l);
|
|
2606
|
+
for (const a in e.links) {
|
|
2607
|
+
const i = G.calculateTextDimensions(a, r).width + 2 * l.wrapPadding + 2 * l.boxMargin;
|
|
2608
|
+
t < i && (t = i);
|
|
2609
|
+
}
|
|
2610
|
+
return t;
|
|
2611
|
+
}, "getRequiredPopupWidth");
|
|
2612
|
+
async function Ue(e, t, r) {
|
|
2613
|
+
let a = 0;
|
|
2614
|
+
for (const d of e.keys()) {
|
|
2615
|
+
const s = e.get(d);
|
|
2616
|
+
s.wrap && (s.description = G.wrapLabel(
|
|
2617
|
+
s.description,
|
|
2618
|
+
l.width - 2 * l.wrapPadding,
|
|
2619
|
+
Zt(l)
|
|
2620
|
+
));
|
|
2621
|
+
const n = J(s.description) ? await wt(s.description, Q()) : G.calculateTextDimensions(s.description, Zt(l));
|
|
2622
|
+
s.width = s.wrap ? l.width : D.getMax(l.width, n.width + 2 * l.wrapPadding), s.height = s.wrap ? D.getMax(n.height, l.height) : l.height, a = D.getMax(a, s.height);
|
|
2623
|
+
}
|
|
2624
|
+
for (const d in t) {
|
|
2625
|
+
const s = e.get(d);
|
|
2626
|
+
if (!s)
|
|
2627
|
+
continue;
|
|
2628
|
+
const n = e.get(s.nextActor);
|
|
2629
|
+
if (!n) {
|
|
2630
|
+
const h = t[d] + l.actorMargin - s.width / 2;
|
|
2631
|
+
s.margin = D.getMax(h, l.actorMargin);
|
|
2632
|
+
continue;
|
|
2633
|
+
}
|
|
2634
|
+
const g = t[d] + l.actorMargin - s.width / 2 - n.width / 2;
|
|
2635
|
+
s.margin = D.getMax(g, l.actorMargin);
|
|
2636
|
+
}
|
|
2637
|
+
let i = 0;
|
|
2638
|
+
return r.forEach((d) => {
|
|
2639
|
+
const s = yt(l);
|
|
2640
|
+
let n = d.actorKeys.reduce((x, O) => x += e.get(O).width + (e.get(O).margin || 0), 0);
|
|
2641
|
+
const g = l.boxMargin * 8;
|
|
2642
|
+
n += g, n -= 2 * l.boxTextMargin, d.wrap && (d.name = G.wrapLabel(d.name, n - 2 * l.wrapPadding, s));
|
|
2643
|
+
const h = G.calculateTextDimensions(d.name, s);
|
|
2644
|
+
i = D.getMax(h.height, i);
|
|
2645
|
+
const o = D.getMax(n, h.width + 2 * l.wrapPadding);
|
|
2646
|
+
if (d.margin = l.boxTextMargin, n < o) {
|
|
2647
|
+
const x = (o - n) / 2;
|
|
2648
|
+
d.margin += x;
|
|
2649
|
+
}
|
|
2650
|
+
}), r.forEach((d) => d.textMaxHeight = i), D.getMax(a, l.height);
|
|
2651
|
+
}
|
|
2652
|
+
u(Ue, "calculateActorMargins");
|
|
2653
|
+
var ar = /* @__PURE__ */ u(async function(e, t, r) {
|
|
2654
|
+
const a = t.get(e.from), i = t.get(e.to), d = a.x, s = i.x, n = e.wrap && e.message;
|
|
2655
|
+
let g = J(e.message) ? await wt(e.message, Q()) : G.calculateTextDimensions(
|
|
2656
|
+
n ? G.wrapLabel(e.message, l.width, ft(l)) : e.message,
|
|
2657
|
+
ft(l)
|
|
2658
|
+
);
|
|
2659
|
+
const h = {
|
|
2660
|
+
width: n ? l.width : D.getMax(l.width, g.width + 2 * l.noteMargin),
|
|
2661
|
+
height: 0,
|
|
2662
|
+
startx: a.x,
|
|
2663
|
+
stopx: 0,
|
|
2664
|
+
starty: 0,
|
|
2665
|
+
stopy: 0,
|
|
2666
|
+
message: e.message
|
|
2667
|
+
};
|
|
2668
|
+
return e.placement === r.db.PLACEMENT.RIGHTOF ? (h.width = n ? D.getMax(l.width, g.width) : D.getMax(
|
|
2669
|
+
a.width / 2 + i.width / 2,
|
|
2670
|
+
g.width + 2 * l.noteMargin
|
|
2671
|
+
), h.startx = d + (a.width + l.actorMargin) / 2) : e.placement === r.db.PLACEMENT.LEFTOF ? (h.width = n ? D.getMax(l.width, g.width + 2 * l.noteMargin) : D.getMax(
|
|
2672
|
+
a.width / 2 + i.width / 2,
|
|
2673
|
+
g.width + 2 * l.noteMargin
|
|
2674
|
+
), h.startx = d - h.width + (a.width - l.actorMargin) / 2) : e.to === e.from ? (g = G.calculateTextDimensions(
|
|
2675
|
+
n ? G.wrapLabel(e.message, D.getMax(l.width, a.width), ft(l)) : e.message,
|
|
2676
|
+
ft(l)
|
|
2677
|
+
), h.width = n ? D.getMax(l.width, a.width) : D.getMax(a.width, l.width, g.width + 2 * l.noteMargin), h.startx = d + (a.width - h.width) / 2) : (h.width = Math.abs(d + a.width / 2 - (s + i.width / 2)) + l.actorMargin, h.startx = d < s ? d + a.width / 2 - l.actorMargin / 2 : s + i.width / 2 - l.actorMargin / 2), n && (h.message = G.wrapLabel(
|
|
2678
|
+
e.message,
|
|
2679
|
+
h.width - 2 * l.wrapPadding,
|
|
2680
|
+
ft(l)
|
|
2681
|
+
)), st.debug(
|
|
2682
|
+
`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${e.message}]`
|
|
2683
|
+
), h;
|
|
2684
|
+
}, "buildNoteModel"), rr = 4, Jt = /* @__PURE__ */ u(function(e, t) {
|
|
2685
|
+
const { CENTRAL_CONNECTION: r, CENTRAL_CONNECTION_REVERSE: a, CENTRAL_CONNECTION_DUAL: i } = t.db.LINETYPE;
|
|
2686
|
+
return [r, a, i].includes(
|
|
2687
|
+
e.centralConnection
|
|
2688
|
+
);
|
|
2689
|
+
}, "hasCentralConnection"), sr = /* @__PURE__ */ u(function(e, t, r) {
|
|
2690
|
+
const {
|
|
2691
|
+
CENTRAL_CONNECTION_REVERSE: a,
|
|
2692
|
+
CENTRAL_CONNECTION_DUAL: i,
|
|
2693
|
+
BIDIRECTIONAL_SOLID: d,
|
|
2694
|
+
BIDIRECTIONAL_DOTTED: s
|
|
2695
|
+
} = t.db.LINETYPE;
|
|
2696
|
+
let n = 0;
|
|
2697
|
+
return (e.centralConnection === a || e.centralConnection === i) && (n += rr), (e.centralConnection === a || e.centralConnection === i) && (e.type === d || e.type === s) && (n += r ? 0 : -6), n;
|
|
2698
|
+
}, "calculateCentralConnectionOffset"), je = /* @__PURE__ */ u(function(e, t) {
|
|
2699
|
+
const {
|
|
2700
|
+
SOLID_ARROW_TOP_REVERSE: r,
|
|
2701
|
+
SOLID_ARROW_TOP_REVERSE_DOTTED: a,
|
|
2702
|
+
SOLID_ARROW_BOTTOM_REVERSE: i,
|
|
2703
|
+
SOLID_ARROW_BOTTOM_REVERSE_DOTTED: d,
|
|
2704
|
+
STICK_ARROW_TOP_REVERSE: s,
|
|
2705
|
+
STICK_ARROW_TOP_REVERSE_DOTTED: n,
|
|
2706
|
+
STICK_ARROW_BOTTOM_REVERSE: g,
|
|
2707
|
+
STICK_ARROW_BOTTOM_REVERSE_DOTTED: h
|
|
2708
|
+
} = t.db.LINETYPE;
|
|
2709
|
+
return [
|
|
2710
|
+
r,
|
|
2711
|
+
a,
|
|
2712
|
+
i,
|
|
2713
|
+
d,
|
|
2714
|
+
s,
|
|
2715
|
+
n,
|
|
2716
|
+
g,
|
|
2717
|
+
h
|
|
2718
|
+
].includes(e.type);
|
|
2719
|
+
}, "isReverseArrowType"), ir = /* @__PURE__ */ u(function(e, t) {
|
|
2720
|
+
const { BIDIRECTIONAL_SOLID: r, BIDIRECTIONAL_DOTTED: a } = t.db.LINETYPE;
|
|
2721
|
+
return [r, a].includes(e.type);
|
|
2722
|
+
}, "isBidirectionalArrowType"), nr = /* @__PURE__ */ u(function(e, t, r) {
|
|
2723
|
+
const { look: a } = Q();
|
|
2724
|
+
if (![
|
|
2725
|
+
r.db.LINETYPE.SOLID_OPEN,
|
|
2726
|
+
r.db.LINETYPE.DOTTED_OPEN,
|
|
2727
|
+
r.db.LINETYPE.SOLID,
|
|
2728
|
+
r.db.LINETYPE.SOLID_TOP,
|
|
2729
|
+
r.db.LINETYPE.SOLID_BOTTOM,
|
|
2730
|
+
r.db.LINETYPE.STICK_TOP,
|
|
2731
|
+
r.db.LINETYPE.STICK_BOTTOM,
|
|
2732
|
+
r.db.LINETYPE.SOLID_TOP_DOTTED,
|
|
2733
|
+
r.db.LINETYPE.SOLID_BOTTOM_DOTTED,
|
|
2734
|
+
r.db.LINETYPE.STICK_TOP_DOTTED,
|
|
2735
|
+
r.db.LINETYPE.STICK_BOTTOM_DOTTED,
|
|
2736
|
+
r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
|
|
2737
|
+
r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
|
|
2738
|
+
r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
|
|
2739
|
+
r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
|
|
2740
|
+
r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
|
|
2741
|
+
r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2742
|
+
r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
|
|
2743
|
+
r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2744
|
+
r.db.LINETYPE.DOTTED,
|
|
2745
|
+
r.db.LINETYPE.SOLID_CROSS,
|
|
2746
|
+
r.db.LINETYPE.DOTTED_CROSS,
|
|
2747
|
+
r.db.LINETYPE.SOLID_POINT,
|
|
2748
|
+
r.db.LINETYPE.DOTTED_POINT,
|
|
2749
|
+
r.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2750
|
+
r.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2751
|
+
].includes(e.type))
|
|
2752
|
+
return {};
|
|
2753
|
+
const [i, d] = Me(e.from, t), [s, n] = Me(e.to, t), g = i <= s;
|
|
2754
|
+
let h = g ? d : i, o = g ? s : n;
|
|
2755
|
+
a === "neo" && (e.type !== r.db.LINETYPE.SOLID_OPEN && (o += g ? -3 : 3), (e.type === r.db.LINETYPE.BIDIRECTIONAL_SOLID || e.type === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (h += g ? 3 : -3)), h += sr(e, r, g);
|
|
2756
|
+
const x = Math.abs(s - n) > 2, O = /* @__PURE__ */ u((E) => g ? -E : E, "adjustValue");
|
|
2757
|
+
e.from === e.to ? o = h : (e.activate && !x && (o += O(l.activationWidth / 2 - 1)), [
|
|
2758
|
+
r.db.LINETYPE.SOLID_OPEN,
|
|
2759
|
+
r.db.LINETYPE.DOTTED_OPEN,
|
|
2760
|
+
r.db.LINETYPE.STICK_TOP,
|
|
2761
|
+
r.db.LINETYPE.STICK_BOTTOM,
|
|
2762
|
+
r.db.LINETYPE.STICK_TOP_DOTTED,
|
|
2763
|
+
r.db.LINETYPE.STICK_BOTTOM_DOTTED,
|
|
2764
|
+
r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
|
|
2765
|
+
r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2766
|
+
r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
|
|
2767
|
+
r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
|
|
2768
|
+
r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
|
|
2769
|
+
r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2770
|
+
r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
|
|
2771
|
+
r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
|
|
2772
|
+
].includes(e.type) || (o += O(3)), [
|
|
2773
|
+
r.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2774
|
+
r.db.LINETYPE.BIDIRECTIONAL_DOTTED,
|
|
2775
|
+
r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
|
|
2776
|
+
r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
|
|
2777
|
+
r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
|
|
2778
|
+
r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
|
|
2779
|
+
].includes(e.type) && (h -= O(3)));
|
|
2780
|
+
const I = [i, d, s, n], _ = Math.abs(h - o);
|
|
2781
|
+
e.wrap && e.message && (e.message = G.wrapLabel(
|
|
2782
|
+
e.message,
|
|
2783
|
+
D.getMax(_ + 2 * l.wrapPadding, l.width),
|
|
2784
|
+
yt(l)
|
|
2785
|
+
));
|
|
2786
|
+
const f = G.calculateTextDimensions(e.message, yt(l));
|
|
2787
|
+
return {
|
|
2788
|
+
width: D.getMax(
|
|
2789
|
+
e.wrap ? 0 : f.width + 2 * l.wrapPadding,
|
|
2790
|
+
_ + 2 * l.wrapPadding,
|
|
2791
|
+
l.width
|
|
2792
|
+
),
|
|
2793
|
+
height: 0,
|
|
2794
|
+
startx: h,
|
|
2795
|
+
stopx: o,
|
|
2796
|
+
starty: 0,
|
|
2797
|
+
stopy: 0,
|
|
2798
|
+
message: e.message,
|
|
2799
|
+
type: e.type,
|
|
2800
|
+
wrap: e.wrap,
|
|
2801
|
+
fromBounds: Math.min.apply(null, I),
|
|
2802
|
+
toBounds: Math.max.apply(null, I)
|
|
2803
|
+
};
|
|
2804
|
+
}, "buildMessageModel"), or = /* @__PURE__ */ u(async function(e, t, r, a) {
|
|
2805
|
+
const i = {}, d = [];
|
|
2806
|
+
let s, n, g;
|
|
2807
|
+
for (const h of e) {
|
|
2808
|
+
switch (h.type) {
|
|
2809
|
+
case a.db.LINETYPE.LOOP_START:
|
|
2810
|
+
case a.db.LINETYPE.ALT_START:
|
|
2811
|
+
case a.db.LINETYPE.OPT_START:
|
|
2812
|
+
case a.db.LINETYPE.PAR_START:
|
|
2813
|
+
case a.db.LINETYPE.PAR_OVER_START:
|
|
2814
|
+
case a.db.LINETYPE.CRITICAL_START:
|
|
2815
|
+
case a.db.LINETYPE.BREAK_START:
|
|
2816
|
+
d.push({
|
|
2817
|
+
id: h.id,
|
|
2818
|
+
msg: h.message,
|
|
2819
|
+
from: Number.MAX_SAFE_INTEGER,
|
|
2820
|
+
to: Number.MIN_SAFE_INTEGER,
|
|
2821
|
+
width: 0
|
|
2822
|
+
});
|
|
2823
|
+
break;
|
|
2824
|
+
case a.db.LINETYPE.ALT_ELSE:
|
|
2825
|
+
case a.db.LINETYPE.PAR_AND:
|
|
2826
|
+
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
2827
|
+
h.message && (s = d.pop(), i[s.id] = s, i[h.id] = s, d.push(s));
|
|
2828
|
+
break;
|
|
2829
|
+
case a.db.LINETYPE.LOOP_END:
|
|
2830
|
+
case a.db.LINETYPE.ALT_END:
|
|
2831
|
+
case a.db.LINETYPE.OPT_END:
|
|
2832
|
+
case a.db.LINETYPE.PAR_END:
|
|
2833
|
+
case a.db.LINETYPE.CRITICAL_END:
|
|
2834
|
+
case a.db.LINETYPE.BREAK_END:
|
|
2835
|
+
s = d.pop(), i[s.id] = s;
|
|
2836
|
+
break;
|
|
2837
|
+
case a.db.LINETYPE.ACTIVE_START:
|
|
2838
|
+
{
|
|
2839
|
+
const o = t.get(h.from ? h.from : h.to.actor), x = Ft(h.from ? h.from : h.to.actor).length, O = o.x + o.width / 2 + (x - 1) * l.activationWidth / 2, I = {
|
|
2840
|
+
startx: O,
|
|
2841
|
+
stopx: O + l.activationWidth,
|
|
2842
|
+
actor: h.from,
|
|
2843
|
+
enabled: !0
|
|
2844
|
+
};
|
|
2845
|
+
m.activations.push(I);
|
|
2846
|
+
}
|
|
2847
|
+
break;
|
|
2848
|
+
case a.db.LINETYPE.ACTIVE_END:
|
|
2849
|
+
{
|
|
2850
|
+
const o = m.activations.map((x) => x.actor).lastIndexOf(h.from);
|
|
2851
|
+
m.activations.splice(o, 1).splice(0, 1);
|
|
2852
|
+
}
|
|
2853
|
+
break;
|
|
2854
|
+
}
|
|
2855
|
+
h.placement !== void 0 ? (n = await ar(h, t, a), h.noteModel = n, d.forEach((o) => {
|
|
2856
|
+
s = o, s.from = D.getMin(s.from, n.startx), s.to = D.getMax(s.to, n.startx + n.width), s.width = D.getMax(s.width, Math.abs(s.from - s.to)) - l.labelBoxWidth;
|
|
2857
|
+
})) : (g = nr(h, t, a), h.msgModel = g, g.startx && g.stopx && d.length > 0 && d.forEach((o) => {
|
|
2858
|
+
if (s = o, g.startx === g.stopx) {
|
|
2859
|
+
const x = t.get(h.from), O = t.get(h.to);
|
|
2860
|
+
s.from = D.getMin(
|
|
2861
|
+
x.x - g.width / 2,
|
|
2862
|
+
x.x - x.width / 2,
|
|
2863
|
+
s.from
|
|
2864
|
+
), s.to = D.getMax(
|
|
2865
|
+
O.x + g.width / 2,
|
|
2866
|
+
O.x + x.width / 2,
|
|
2867
|
+
s.to
|
|
2868
|
+
), s.width = D.getMax(s.width, Math.abs(s.to - s.from)) - l.labelBoxWidth;
|
|
2869
|
+
} else
|
|
2870
|
+
s.from = D.getMin(g.startx, s.from), s.to = D.getMax(g.stopx, s.to), s.width = D.getMax(s.width, g.width) - l.labelBoxWidth;
|
|
2871
|
+
}));
|
|
2872
|
+
}
|
|
2873
|
+
return m.activations = [], st.debug("Loop type widths:", i), i;
|
|
2874
|
+
}, "calculateLoopBounds"), cr = {
|
|
2875
|
+
bounds: m,
|
|
2876
|
+
drawActors: te,
|
|
2877
|
+
drawActorsPopup: Ke,
|
|
2878
|
+
setConf: qe,
|
|
2879
|
+
draw: tr
|
|
2880
|
+
}, pr = {
|
|
2881
|
+
parser: ua,
|
|
2882
|
+
get db() {
|
|
2883
|
+
return new ba();
|
|
2884
|
+
},
|
|
2885
|
+
renderer: cr,
|
|
2886
|
+
styles: ya,
|
|
2887
|
+
init: /* @__PURE__ */ u((e) => {
|
|
2888
|
+
e.sequence || (e.sequence = {}), e.wrap && (e.sequence.wrap = e.wrap, ta({ sequence: { wrap: e.wrap } }));
|
|
2889
|
+
}, "init")
|
|
2890
|
+
};
|
|
2891
|
+
export {
|
|
2892
|
+
pr as diagram
|
|
2893
|
+
};
|