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