mio-previewer 0.2.74 → 0.2.76
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-CXmXW7jd.js +166 -0
- package/dist/_basePickBy-CtuVwROD.cjs +1 -0
- package/dist/_baseUniq-CGoiOkSa.js +682 -0
- package/dist/_baseUniq-CYtOXxfV.cjs +1 -0
- package/dist/_createAssigner-DqH64jc7.cjs +1 -0
- package/dist/_createAssigner-IEX8lwxm.js +573 -0
- package/dist/arc-C78br9Yj.cjs +1 -0
- package/dist/arc-vLgDTVZZ.js +80 -0
- package/dist/architecture-O4VJ6CD3-B9qzjtV8.cjs +1 -0
- package/dist/architecture-O4VJ6CD3-wqAP4onK.js +2 -0
- package/dist/architectureDiagram-VXUJARFQ-CYbuyVAs.js +4039 -0
- package/dist/architectureDiagram-VXUJARFQ-DEGYSl1f.cjs +36 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/array-DZSRzHA_.cjs +1 -0
- package/dist/assets/parser.worker-Bzb1GItl.js +14 -0
- package/dist/blockDiagram-VD42YOAC-DaH3L5Ng.js +3009 -0
- package/dist/blockDiagram-VD42YOAC-DeX0dq72.cjs +122 -0
- package/dist/c4Diagram-YG6GDRKO-CIThIYo6.js +2959 -0
- package/dist/c4Diagram-YG6GDRKO-Dz6dif_9.cjs +10 -0
- package/dist/channel-BWHkpgVD.cjs +1 -0
- package/dist/channel-JT7eWw2w.js +5 -0
- package/dist/chunk-4BX2VUAB-BZTgbbzC.js +8 -0
- package/dist/chunk-4BX2VUAB-HXFjpyQg.cjs +1 -0
- package/dist/chunk-55IACEB6-DWUqxxdp.js +8 -0
- package/dist/chunk-55IACEB6-Hy_THNUs.cjs +1 -0
- package/dist/chunk-ABZYJK2D-CbIYYZa_.cjs +80 -0
- package/dist/chunk-ABZYJK2D-DDrmE3Q7.js +2518 -0
- package/dist/chunk-ATLVNIR6-DHlCNWnJ.js +67 -0
- package/dist/chunk-ATLVNIR6-shAOudT0.cjs +1 -0
- package/dist/chunk-B4BG7PRW-C67vroOS.cjs +165 -0
- package/dist/chunk-B4BG7PRW-DSYuK8dI.js +3116 -0
- package/dist/chunk-BNMv73og.cjs +1 -0
- package/dist/chunk-CVBHYZKI-CLVcv_xh.cjs +1 -0
- package/dist/chunk-CVBHYZKI-CiCGetln.js +12 -0
- package/dist/chunk-DI55MBZ5-BCvBgHrp.cjs +220 -0
- package/dist/chunk-DI55MBZ5-Clru0TyG.js +2000 -0
- package/dist/chunk-Dbv0sNQl.js +20 -0
- package/dist/chunk-FMBD7UC4-D4kohRVY.js +5 -0
- package/dist/{chunk-FMBD7UC4-DxkUZTpt.cjs → chunk-FMBD7UC4-DWMVCXKq.cjs} +2 -2
- package/dist/chunk-HN2XXSSU-BwmRMa2r.cjs +1 -0
- package/dist/chunk-HN2XXSSU-CJL8wAZ2.js +76 -0
- package/dist/chunk-JA3XYJ7Z-BaAdjYEy.cjs +70 -0
- package/dist/chunk-JA3XYJ7Z-CpKHrbOX.js +1849 -0
- package/dist/chunk-JZLCHNYA-CYo7ykJf.js +4863 -0
- package/dist/chunk-JZLCHNYA-CvPIQFXP.cjs +54 -0
- package/dist/chunk-QN33PNHL-BFbXAWI4.js +25 -0
- package/dist/chunk-QN33PNHL-Cu0FHarG.cjs +1 -0
- package/dist/chunk-QXUST7PY-CnnfdJrM.cjs +7 -0
- package/dist/chunk-QXUST7PY-CxCAwQqP.js +488 -0
- package/dist/chunk-QZHKN3VN-2e6nJr8c.cjs +1 -0
- package/dist/chunk-QZHKN3VN-Dal4kx9B.js +15 -0
- package/dist/chunk-S3R3BYOJ-B2ozcJNg.cjs +2 -0
- package/dist/chunk-S3R3BYOJ-CG6GoSCd.js +1119 -0
- package/dist/chunk-TZMSLE5B-CooeLs4Q.js +57 -0
- package/dist/chunk-TZMSLE5B-D92K1Ja5.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-Bv1XCvDZ.js +28 -0
- package/dist/classDiagram-2ON5EDUG-BzMV1CJW.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-Bqxv5U7u.js +28 -0
- package/dist/classDiagram-v2-WZHVMYZB-BzMV1CJW.cjs +1 -0
- package/dist/clone-B0KDIkSS.js +8 -0
- package/dist/clone-wvtBTB6v.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-DMHTv1aW.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-bGPAcpg6.js +2250 -0
- package/dist/custom-Bl_fVJZ0.cjs +84 -0
- package/dist/custom-D-TzPpWT.js +5281 -0
- package/dist/cytoscape.esm-CElDUMAx.cjs +321 -0
- package/dist/cytoscape.esm-xf9dtmBj.js +18100 -0
- package/dist/dagre-6UL2VRFP-3bgUxzqG.js +294 -0
- package/dist/dagre-6UL2VRFP-B3NqmIxs.cjs +4 -0
- package/dist/dagre-BfAHSwtP.js +1472 -0
- package/dist/dagre-Buvkww-e.cjs +1 -0
- package/dist/defaultLocale-B5dSAwiC.js +201 -0
- package/dist/defaultLocale-G0HsdRIB.cjs +1 -0
- package/dist/diagram-PSM6KHXK-C4FjxUHt.cjs +24 -0
- package/dist/diagram-PSM6KHXK-CF8TkgzX.js +527 -0
- package/dist/diagram-QEK2KX5R-Dl3IHeA5.js +213 -0
- package/dist/diagram-QEK2KX5R-Z9DYjr44.cjs +43 -0
- package/dist/diagram-S2PKOQOG-Bib-zL2S.cjs +24 -0
- package/dist/diagram-S2PKOQOG-ZKvn7IEe.js +133 -0
- package/dist/dist-DC-lM4uX.cjs +1 -0
- package/dist/dist-zNcLEPGR.js +51 -0
- package/dist/erDiagram-Q2GNP2WA-DFMV9OUT.cjs +60 -0
- package/dist/erDiagram-Q2GNP2WA-DJYJEzEB.js +1600 -0
- package/dist/flowDiagram-NV44I4VS-7TxeawHS.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-CXa6ycqs.js +4128 -0
- package/dist/ganttDiagram-LVOFAZNH-DqT7pu4m.js +2869 -0
- package/dist/ganttDiagram-LVOFAZNH-iiExGpwF.cjs +267 -0
- package/dist/gitGraph-ZV4HHKMB-BjaEVcYh.cjs +1 -0
- package/dist/gitGraph-ZV4HHKMB-Cl2I6-l3.js +2 -0
- package/dist/gitGraphDiagram-NY62KEGX-Tphu_MeC.js +621 -0
- package/dist/gitGraphDiagram-NY62KEGX-k5xzXg7C.cjs +65 -0
- package/dist/graphlib-C3tPLMbC.js +225 -0
- package/dist/graphlib-Cdg0u3TT.cjs +1 -0
- package/dist/info-63CPKGFF-D2A5GDFo.js +2 -0
- package/dist/info-63CPKGFF-MRaucWlf.cjs +1 -0
- package/dist/infoDiagram-F6ZHWCRC-3Jwo4J0f.cjs +2 -0
- package/dist/infoDiagram-F6ZHWCRC-BUoruN76.js +19 -0
- package/dist/init-07zIhv_j.cjs +1 -0
- package/dist/init-Bwwdo3M6.js +15 -0
- package/dist/journeyDiagram-XKPGCS4Q-C_3oD9RV.cjs +139 -0
- package/dist/journeyDiagram-XKPGCS4Q-DB7INfrf.js +883 -0
- package/dist/kanban-definition-3W4ZIXB7-AVLIBuMF.js +968 -0
- package/dist/kanban-definition-3W4ZIXB7-txUXjKzB.cjs +89 -0
- package/dist/katex-6UpFeIdV.cjs +261 -0
- package/dist/katex-BHcJffnM.js +22112 -0
- package/dist/line-DYhVGH2B.js +34 -0
- package/dist/line-DdNAPGaw.cjs +1 -0
- package/dist/linear-n4_iirEu.js +289 -0
- package/dist/linear-rQLpRrSH.cjs +1 -0
- package/dist/loadCss-D6257oR0.js +8 -0
- package/dist/loadCss-DhrQh6-A.cjs +1 -0
- package/dist/markdown-it-Cz3KGZjR.cjs +2 -0
- package/dist/markdown-it-D-hH4G7k.js +173 -0
- package/dist/math-G8rF7UWn.cjs +1 -0
- package/dist/math-H49DsxYR.js +10 -0
- package/dist/mermaid-parser.core-B84fnaGG.js +11904 -0
- package/dist/mermaid-parser.core-C9EbhVVg.cjs +82 -0
- package/dist/mindmap-definition-VGOIOE7T-CXlyYsc6.cjs +68 -0
- package/dist/mindmap-definition-VGOIOE7T-VIt9sDN3.js +963 -0
- package/dist/mio-previewer.cjs.js +11 -21
- package/dist/mio-previewer.css +2 -9
- package/dist/mio-previewer.esm.js +4939 -0
- package/dist/ordinal-C55HfHHp.js +65 -0
- package/dist/ordinal-CUPR-p0T.cjs +1 -0
- package/dist/packet-HUATNLJX-CGNko_oS.cjs +1 -0
- package/dist/packet-HUATNLJX-CVx40lqO.js +2 -0
- package/dist/path-DNvJyUE8.js +85 -0
- package/dist/path-Kklx0M1v.cjs +1 -0
- package/dist/pie-WTHONI2E-BdPx0Cfg.cjs +1 -0
- package/dist/pie-WTHONI2E-DX5V8x0L.js +2 -0
- package/dist/pieDiagram-ADFJNKIX-BysReYfx.js +165 -0
- package/dist/pieDiagram-ADFJNKIX-CTT1YMsk.cjs +30 -0
- package/dist/plugins/custom.cjs.js +1 -1
- package/dist/plugins/custom.esm.js +2 -0
- package/dist/plugins/markdown-it.cjs.js +1 -3
- package/dist/plugins/markdown-it.esm.js +2 -0
- package/dist/quadrantDiagram-AYHSOK5B-8-V3cwsC.cjs +7 -0
- package/dist/quadrantDiagram-AYHSOK5B-DRutDK03.js +1974 -0
- package/dist/radar-NJJJXTRR-CTD6M8nl.js +2 -0
- package/dist/radar-NJJJXTRR-wJoTnQbj.cjs +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-DFRpWnfW.cjs +64 -0
- package/dist/requirementDiagram-UZGBJVZJ-DNYoJyhG.js +2191 -0
- package/dist/sankeyDiagram-TZEHDZUN-B9fxDP0Q.cjs +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-DD6bkI4Z.js +920 -0
- package/dist/sequenceDiagram-WL72ISMW-Bmptok1c.js +3562 -0
- package/dist/sequenceDiagram-WL72ISMW-D9sXtgAn.cjs +145 -0
- package/dist/src-BMjps4Ui.cjs +1 -0
- package/dist/src-BuisGndr.js +2149 -0
- package/dist/stateDiagram-FKZM4ZOC-Bmiw8fnW.js +217 -0
- package/dist/stateDiagram-FKZM4ZOC-DiD1WJPM.cjs +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-5ADhn1IF.js +27 -0
- package/dist/stateDiagram-v2-4FDKWEC3-BjhmCPL1.cjs +1 -0
- package/dist/timeline-definition-IT6M3QCI-C9VMls3W.js +830 -0
- package/dist/timeline-definition-IT6M3QCI-ZzbHXhNl.cjs +61 -0
- package/dist/treemap-75Q7IDZK-9TPMYr3R.cjs +1 -0
- package/dist/treemap-75Q7IDZK-u3p-cHDL.js +2 -0
- package/dist/types/plugins/custom/codeBlockPlugin.d.ts +8 -0
- package/dist/types/plugins/custom/mermaidPlugin.d.ts +4 -0
- package/dist/xychartDiagram-PRI3JC2R-BI6KuGZ2.cjs +7 -0
- package/dist/xychartDiagram-PRI3JC2R-BWabDL1u.js +2041 -0
- package/package.json +2 -2
- package/dist/_basePickBy-Be3yyf2d.js +0 -151
- package/dist/_basePickBy-Z0DtrAKQ.cjs +0 -1
- package/dist/_baseUniq-BXkA0Pgx.js +0 -614
- package/dist/_baseUniq-Dq2eV1vY.cjs +0 -1
- package/dist/arc-B-QGG8RZ.cjs +0 -1
- package/dist/arc-djW14lrn.js +0 -83
- package/dist/architecture-O4VJ6CD3-Cws_zM2K.cjs +0 -1
- package/dist/architecture-O4VJ6CD3-pdMXTCaT.js +0 -5
- package/dist/architectureDiagram-VXUJARFQ-BwchhvqL.js +0 -4661
- package/dist/architectureDiagram-VXUJARFQ-DxDLWGpO.cjs +0 -36
- package/dist/assets/parser.worker-67NQKZt5.js +0 -16
- package/dist/blockDiagram-VD42YOAC-B4Xc8gfX.cjs +0 -122
- package/dist/blockDiagram-VD42YOAC-DpPneP6J.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-695lQbrZ.cjs +0 -10
- package/dist/c4Diagram-YG6GDRKO-Cnlax2Xq.js +0 -1580
- package/dist/channel-D_ITz6Jy.cjs +0 -1
- package/dist/channel-sXy9EduO.js +0 -5
- package/dist/chunk-4BX2VUAB-Bdx3_f83.cjs +0 -1
- package/dist/chunk-4BX2VUAB-DRkGmgAZ.js +0 -8
- package/dist/chunk-55IACEB6-BB03hpRC.cjs +0 -1
- package/dist/chunk-55IACEB6-Ord5OQlh.js +0 -8
- package/dist/chunk-B4BG7PRW-Ca0fOgzA.cjs +0 -165
- package/dist/chunk-B4BG7PRW-D-cs8bDX.js +0 -1375
- package/dist/chunk-DI55MBZ5-BsRe2B2M.cjs +0 -220
- package/dist/chunk-DI55MBZ5-DSmlLD1s.js +0 -1370
- package/dist/chunk-FMBD7UC4-IYQmAMTo.js +0 -19
- package/dist/chunk-QN33PNHL-B7G6Qlf3.cjs +0 -1
- package/dist/chunk-QN33PNHL-EYMc4JVr.js +0 -19
- package/dist/chunk-QZHKN3VN-B8NJ6Ahx.cjs +0 -1
- package/dist/chunk-QZHKN3VN-C4WIG5z8.js +0 -15
- package/dist/chunk-TZMSLE5B-BoM53RHv.js +0 -64
- package/dist/chunk-TZMSLE5B-CgLDb48A.cjs +0 -1
- package/dist/classDiagram-2ON5EDUG-CxmdZvqc.js +0 -16
- package/dist/classDiagram-2ON5EDUG-DIRim8qa.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-CxmdZvqc.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-DIRim8qa.cjs +0 -1
- package/dist/clone-DOYxaT_d.js +0 -8
- package/dist/clone-DSlm33NG.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-BD3p1OC_.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-yLoaqH3G.js +0 -2608
- package/dist/cytoscape.esm-DHF7mANN.cjs +0 -331
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DG1oQ4B2.cjs +0 -4
- package/dist/dagre-6UL2VRFP-VjboDBbp.js +0 -444
- package/dist/defaultLocale-D7EN2tov.js +0 -171
- package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
- package/dist/diagram-PSM6KHXK-C1p0l5TY.js +0 -531
- package/dist/diagram-PSM6KHXK-a4rni6rJ.cjs +0 -24
- package/dist/diagram-QEK2KX5R-CErKOsX1.cjs +0 -43
- package/dist/diagram-QEK2KX5R-CKmmuumX.js +0 -217
- package/dist/diagram-S2PKOQOG-B1M7qCNl.cjs +0 -24
- package/dist/diagram-S2PKOQOG-BMLCJExF.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-BfuCa_Za.cjs +0 -60
- package/dist/erDiagram-Q2GNP2WA-fOTsQA-d.js +0 -841
- package/dist/flowDiagram-NV44I4VS-BEqeUuqz.cjs +0 -162
- package/dist/flowDiagram-NV44I4VS-DDwRAjVG.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-BbuRS8g3.js +0 -2505
- package/dist/ganttDiagram-LVOFAZNH-BlVeWKRf.cjs +0 -267
- package/dist/gitGraph-ZV4HHKMB-Bmu8r_Iq.cjs +0 -1
- package/dist/gitGraph-ZV4HHKMB-DcQ2E4dF.js +0 -5
- package/dist/gitGraphDiagram-NY62KEGX-DcMEeNh7.cjs +0 -65
- package/dist/gitGraphDiagram-NY62KEGX-_sWVSKbL.js +0 -699
- package/dist/graph-DEnt0OtZ.js +0 -247
- package/dist/graph-Dgcjs2XL.cjs +0 -1
- package/dist/info-63CPKGFF-DVDDcoHy.js +0 -5
- package/dist/info-63CPKGFF-Dc3cWL0G.cjs +0 -1
- package/dist/infoDiagram-F6ZHWCRC-DoUSS0kC.js +0 -24
- package/dist/infoDiagram-F6ZHWCRC-ZeTrjgaE.cjs +0 -2
- package/dist/init-CHZsXQcr.cjs +0 -1
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-DGe13iBu.js +0 -834
- package/dist/journeyDiagram-XKPGCS4Q-Ihl9g4mY.cjs +0 -139
- package/dist/kanban-definition-3W4ZIXB7-2qkrkVLK.cjs +0 -89
- package/dist/kanban-definition-3W4ZIXB7-BhWe5nMU.js +0 -719
- package/dist/katex-CmGeg_OO.js +0 -11692
- package/dist/katex-DEiiRhcn.cjs +0 -261
- package/dist/layout-BDNzBIaA.cjs +0 -1
- package/dist/layout-DTBfbHzy.js +0 -1324
- package/dist/linear-BRl2UYUr.cjs +0 -1
- package/dist/linear-CwbXkgvF.js +0 -259
- package/dist/loadCss-BbD6mdv-.cjs +0 -1
- package/dist/loadCss-DS0Fuaxe.js +0 -8
- package/dist/mermaid-parser.core-CJ1yJm0s.js +0 -12966
- package/dist/mermaid-parser.core-CxTcWSA2.cjs +0 -128
- package/dist/mindmap-definition-VGOIOE7T-BPUEmP7g.cjs +0 -68
- package/dist/mindmap-definition-VGOIOE7T-DSqZBgzR.js +0 -784
- package/dist/mio-previewer.es.js +0 -6171
- package/dist/ordinal-CagbB1m8.cjs +0 -1
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-HUATNLJX-B-qfkr5X.cjs +0 -1
- package/dist/packet-HUATNLJX-Dxob_meO.js +0 -5
- package/dist/pie-WTHONI2E-BRtdTGWt.js +0 -5
- package/dist/pie-WTHONI2E-DK7f6qJw.cjs +0 -1
- package/dist/pieDiagram-ADFJNKIX-Dhq_bEzm.js +0 -161
- package/dist/pieDiagram-ADFJNKIX-V04ms3gr.cjs +0 -30
- package/dist/plugins/custom.es.js +0 -85
- package/dist/plugins/markdown-it.es.js +0 -173
- package/dist/quadrantDiagram-AYHSOK5B-C97bOmUE.js +0 -1022
- package/dist/quadrantDiagram-AYHSOK5B-DlqFPVhi.cjs +0 -7
- package/dist/radar-NJJJXTRR-B9jT3LP3.cjs +0 -1
- package/dist/radar-NJJJXTRR-D8plmle3.js +0 -5
- package/dist/requirementDiagram-UZGBJVZJ-BxVMLKfQ.js +0 -850
- package/dist/requirementDiagram-UZGBJVZJ-DENJ74Ew.cjs +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-DwgW7Suq.js +0 -810
- package/dist/sankeyDiagram-TZEHDZUN-lTBLhaSq.cjs +0 -10
- package/dist/sequenceDiagram-WL72ISMW-BAOeX1dA.js +0 -2511
- package/dist/sequenceDiagram-WL72ISMW-BRVvH1X4.cjs +0 -145
- package/dist/stateDiagram-FKZM4ZOC-BrFQE7Gl.js +0 -263
- package/dist/stateDiagram-FKZM4ZOC-D8GjooGL.cjs +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-4VRIY-eH.cjs +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-DnrWD6a3.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-BJMIlueb.js +0 -795
- package/dist/timeline-definition-IT6M3QCI-BQFGUuGP.cjs +0 -61
- package/dist/treemap-75Q7IDZK-BX1vBFWf.cjs +0 -1
- package/dist/treemap-75Q7IDZK-CMTkunTV.js +0 -5
- package/dist/viewer-CZUSHxhf.js +0 -19131
- package/dist/viewer-Canph5Zx.cjs +0 -305
- package/dist/xychartDiagram-PRI3JC2R-Sl8WX8wc.cjs +0 -7
- package/dist/xychartDiagram-PRI3JC2R-WnFI7Ezu.js +0 -1340
|
@@ -0,0 +1,3562 @@
|
|
|
1
|
+
import { d as e, u as t } from "./custom-D-TzPpWT.js";
|
|
2
|
+
import { g as n, h as r, p as i } from "./src-BuisGndr.js";
|
|
3
|
+
import { B as a, C as o, E as s, H as c, I as l, N as u, O as d, U as f, _ as p, a as m, b as h, c as g, i as _, r as v, s as y, v as b, y as x, z as S } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
4
|
+
import { f as C, h as w } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
5
|
+
import { t as T } from "./dist-zNcLEPGR.js";
|
|
6
|
+
import { i as E, n as D, o as O, r as k, s as A, t as j } from "./chunk-TZMSLE5B-CooeLs4Q.js";
|
|
7
|
+
import { t as M } from "./chunk-QZHKN3VN-Dal4kx9B.js";
|
|
8
|
+
//#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.mjs
|
|
9
|
+
var N = T(), P = (function() {
|
|
10
|
+
var e = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
11
|
+
for (n ||= {}, r = e.length; r--; n[e[r]] = t);
|
|
12
|
+
return n;
|
|
13
|
+
}, "o"), t = [1, 2], n = [1, 3], i = [1, 4], a = [2, 4], o = [1, 9], s = [1, 11], c = [1, 13], l = [1, 14], u = [1, 16], d = [1, 17], f = [1, 18], p = [1, 24], m = [1, 25], h = [1, 26], g = [1, 27], _ = [1, 28], v = [1, 29], y = [1, 30], b = [1, 31], x = [1, 32], S = [1, 33], C = [1, 34], w = [1, 35], T = [1, 36], E = [1, 37], D = [1, 38], O = [1, 39], k = [1, 41], A = [1, 42], j = [1, 43], M = [1, 44], N = [1, 45], P = [1, 46], F = [
|
|
14
|
+
1,
|
|
15
|
+
4,
|
|
16
|
+
5,
|
|
17
|
+
13,
|
|
18
|
+
14,
|
|
19
|
+
16,
|
|
20
|
+
18,
|
|
21
|
+
21,
|
|
22
|
+
23,
|
|
23
|
+
29,
|
|
24
|
+
30,
|
|
25
|
+
31,
|
|
26
|
+
33,
|
|
27
|
+
35,
|
|
28
|
+
36,
|
|
29
|
+
37,
|
|
30
|
+
38,
|
|
31
|
+
39,
|
|
32
|
+
41,
|
|
33
|
+
43,
|
|
34
|
+
44,
|
|
35
|
+
46,
|
|
36
|
+
47,
|
|
37
|
+
48,
|
|
38
|
+
49,
|
|
39
|
+
50,
|
|
40
|
+
52,
|
|
41
|
+
53,
|
|
42
|
+
55,
|
|
43
|
+
60,
|
|
44
|
+
61,
|
|
45
|
+
62,
|
|
46
|
+
63,
|
|
47
|
+
71
|
|
48
|
+
], I = [2, 71], L = [
|
|
49
|
+
4,
|
|
50
|
+
5,
|
|
51
|
+
16,
|
|
52
|
+
50,
|
|
53
|
+
52,
|
|
54
|
+
53
|
|
55
|
+
], R = [
|
|
56
|
+
4,
|
|
57
|
+
5,
|
|
58
|
+
13,
|
|
59
|
+
14,
|
|
60
|
+
16,
|
|
61
|
+
18,
|
|
62
|
+
21,
|
|
63
|
+
23,
|
|
64
|
+
29,
|
|
65
|
+
30,
|
|
66
|
+
31,
|
|
67
|
+
33,
|
|
68
|
+
35,
|
|
69
|
+
36,
|
|
70
|
+
37,
|
|
71
|
+
38,
|
|
72
|
+
39,
|
|
73
|
+
41,
|
|
74
|
+
43,
|
|
75
|
+
44,
|
|
76
|
+
46,
|
|
77
|
+
50,
|
|
78
|
+
52,
|
|
79
|
+
53,
|
|
80
|
+
55,
|
|
81
|
+
60,
|
|
82
|
+
61,
|
|
83
|
+
62,
|
|
84
|
+
63,
|
|
85
|
+
71
|
|
86
|
+
], z = [
|
|
87
|
+
4,
|
|
88
|
+
5,
|
|
89
|
+
13,
|
|
90
|
+
14,
|
|
91
|
+
16,
|
|
92
|
+
18,
|
|
93
|
+
21,
|
|
94
|
+
23,
|
|
95
|
+
29,
|
|
96
|
+
30,
|
|
97
|
+
31,
|
|
98
|
+
33,
|
|
99
|
+
35,
|
|
100
|
+
36,
|
|
101
|
+
37,
|
|
102
|
+
38,
|
|
103
|
+
39,
|
|
104
|
+
41,
|
|
105
|
+
43,
|
|
106
|
+
44,
|
|
107
|
+
46,
|
|
108
|
+
49,
|
|
109
|
+
50,
|
|
110
|
+
52,
|
|
111
|
+
53,
|
|
112
|
+
55,
|
|
113
|
+
60,
|
|
114
|
+
61,
|
|
115
|
+
62,
|
|
116
|
+
63,
|
|
117
|
+
71
|
|
118
|
+
], ee = [
|
|
119
|
+
4,
|
|
120
|
+
5,
|
|
121
|
+
13,
|
|
122
|
+
14,
|
|
123
|
+
16,
|
|
124
|
+
18,
|
|
125
|
+
21,
|
|
126
|
+
23,
|
|
127
|
+
29,
|
|
128
|
+
30,
|
|
129
|
+
31,
|
|
130
|
+
33,
|
|
131
|
+
35,
|
|
132
|
+
36,
|
|
133
|
+
37,
|
|
134
|
+
38,
|
|
135
|
+
39,
|
|
136
|
+
41,
|
|
137
|
+
43,
|
|
138
|
+
44,
|
|
139
|
+
46,
|
|
140
|
+
48,
|
|
141
|
+
50,
|
|
142
|
+
52,
|
|
143
|
+
53,
|
|
144
|
+
55,
|
|
145
|
+
60,
|
|
146
|
+
61,
|
|
147
|
+
62,
|
|
148
|
+
63,
|
|
149
|
+
71
|
|
150
|
+
], te = [
|
|
151
|
+
4,
|
|
152
|
+
5,
|
|
153
|
+
13,
|
|
154
|
+
14,
|
|
155
|
+
16,
|
|
156
|
+
18,
|
|
157
|
+
21,
|
|
158
|
+
23,
|
|
159
|
+
29,
|
|
160
|
+
30,
|
|
161
|
+
31,
|
|
162
|
+
33,
|
|
163
|
+
35,
|
|
164
|
+
36,
|
|
165
|
+
37,
|
|
166
|
+
38,
|
|
167
|
+
39,
|
|
168
|
+
41,
|
|
169
|
+
43,
|
|
170
|
+
44,
|
|
171
|
+
46,
|
|
172
|
+
47,
|
|
173
|
+
50,
|
|
174
|
+
52,
|
|
175
|
+
53,
|
|
176
|
+
55,
|
|
177
|
+
60,
|
|
178
|
+
61,
|
|
179
|
+
62,
|
|
180
|
+
63,
|
|
181
|
+
71
|
|
182
|
+
], B = [
|
|
183
|
+
69,
|
|
184
|
+
70,
|
|
185
|
+
71
|
|
186
|
+
], V = [1, 127], H = {
|
|
187
|
+
trace: /* @__PURE__ */ r(function() {}, "trace"),
|
|
188
|
+
yy: {},
|
|
189
|
+
symbols_: {
|
|
190
|
+
error: 2,
|
|
191
|
+
start: 3,
|
|
192
|
+
SPACE: 4,
|
|
193
|
+
NEWLINE: 5,
|
|
194
|
+
SD: 6,
|
|
195
|
+
document: 7,
|
|
196
|
+
line: 8,
|
|
197
|
+
statement: 9,
|
|
198
|
+
box_section: 10,
|
|
199
|
+
box_line: 11,
|
|
200
|
+
participant_statement: 12,
|
|
201
|
+
create: 13,
|
|
202
|
+
box: 14,
|
|
203
|
+
restOfLine: 15,
|
|
204
|
+
end: 16,
|
|
205
|
+
signal: 17,
|
|
206
|
+
autonumber: 18,
|
|
207
|
+
NUM: 19,
|
|
208
|
+
off: 20,
|
|
209
|
+
activate: 21,
|
|
210
|
+
actor: 22,
|
|
211
|
+
deactivate: 23,
|
|
212
|
+
note_statement: 24,
|
|
213
|
+
links_statement: 25,
|
|
214
|
+
link_statement: 26,
|
|
215
|
+
properties_statement: 27,
|
|
216
|
+
details_statement: 28,
|
|
217
|
+
title: 29,
|
|
218
|
+
legacy_title: 30,
|
|
219
|
+
acc_title: 31,
|
|
220
|
+
acc_title_value: 32,
|
|
221
|
+
acc_descr: 33,
|
|
222
|
+
acc_descr_value: 34,
|
|
223
|
+
acc_descr_multiline_value: 35,
|
|
224
|
+
loop: 36,
|
|
225
|
+
rect: 37,
|
|
226
|
+
opt: 38,
|
|
227
|
+
alt: 39,
|
|
228
|
+
else_sections: 40,
|
|
229
|
+
par: 41,
|
|
230
|
+
par_sections: 42,
|
|
231
|
+
par_over: 43,
|
|
232
|
+
critical: 44,
|
|
233
|
+
option_sections: 45,
|
|
234
|
+
break: 46,
|
|
235
|
+
option: 47,
|
|
236
|
+
and: 48,
|
|
237
|
+
else: 49,
|
|
238
|
+
participant: 50,
|
|
239
|
+
AS: 51,
|
|
240
|
+
participant_actor: 52,
|
|
241
|
+
destroy: 53,
|
|
242
|
+
actor_with_config: 54,
|
|
243
|
+
note: 55,
|
|
244
|
+
placement: 56,
|
|
245
|
+
text2: 57,
|
|
246
|
+
over: 58,
|
|
247
|
+
actor_pair: 59,
|
|
248
|
+
links: 60,
|
|
249
|
+
link: 61,
|
|
250
|
+
properties: 62,
|
|
251
|
+
details: 63,
|
|
252
|
+
spaceList: 64,
|
|
253
|
+
",": 65,
|
|
254
|
+
left_of: 66,
|
|
255
|
+
right_of: 67,
|
|
256
|
+
signaltype: 68,
|
|
257
|
+
"+": 69,
|
|
258
|
+
"-": 70,
|
|
259
|
+
ACTOR: 71,
|
|
260
|
+
config_object: 72,
|
|
261
|
+
CONFIG_START: 73,
|
|
262
|
+
CONFIG_CONTENT: 74,
|
|
263
|
+
CONFIG_END: 75,
|
|
264
|
+
SOLID_OPEN_ARROW: 76,
|
|
265
|
+
DOTTED_OPEN_ARROW: 77,
|
|
266
|
+
SOLID_ARROW: 78,
|
|
267
|
+
BIDIRECTIONAL_SOLID_ARROW: 79,
|
|
268
|
+
DOTTED_ARROW: 80,
|
|
269
|
+
BIDIRECTIONAL_DOTTED_ARROW: 81,
|
|
270
|
+
SOLID_CROSS: 82,
|
|
271
|
+
DOTTED_CROSS: 83,
|
|
272
|
+
SOLID_POINT: 84,
|
|
273
|
+
DOTTED_POINT: 85,
|
|
274
|
+
TXT: 86,
|
|
275
|
+
$accept: 0,
|
|
276
|
+
$end: 1
|
|
277
|
+
},
|
|
278
|
+
terminals_: {
|
|
279
|
+
2: "error",
|
|
280
|
+
4: "SPACE",
|
|
281
|
+
5: "NEWLINE",
|
|
282
|
+
6: "SD",
|
|
283
|
+
13: "create",
|
|
284
|
+
14: "box",
|
|
285
|
+
15: "restOfLine",
|
|
286
|
+
16: "end",
|
|
287
|
+
18: "autonumber",
|
|
288
|
+
19: "NUM",
|
|
289
|
+
20: "off",
|
|
290
|
+
21: "activate",
|
|
291
|
+
23: "deactivate",
|
|
292
|
+
29: "title",
|
|
293
|
+
30: "legacy_title",
|
|
294
|
+
31: "acc_title",
|
|
295
|
+
32: "acc_title_value",
|
|
296
|
+
33: "acc_descr",
|
|
297
|
+
34: "acc_descr_value",
|
|
298
|
+
35: "acc_descr_multiline_value",
|
|
299
|
+
36: "loop",
|
|
300
|
+
37: "rect",
|
|
301
|
+
38: "opt",
|
|
302
|
+
39: "alt",
|
|
303
|
+
41: "par",
|
|
304
|
+
43: "par_over",
|
|
305
|
+
44: "critical",
|
|
306
|
+
46: "break",
|
|
307
|
+
47: "option",
|
|
308
|
+
48: "and",
|
|
309
|
+
49: "else",
|
|
310
|
+
50: "participant",
|
|
311
|
+
51: "AS",
|
|
312
|
+
52: "participant_actor",
|
|
313
|
+
53: "destroy",
|
|
314
|
+
55: "note",
|
|
315
|
+
58: "over",
|
|
316
|
+
60: "links",
|
|
317
|
+
61: "link",
|
|
318
|
+
62: "properties",
|
|
319
|
+
63: "details",
|
|
320
|
+
65: ",",
|
|
321
|
+
66: "left_of",
|
|
322
|
+
67: "right_of",
|
|
323
|
+
69: "+",
|
|
324
|
+
70: "-",
|
|
325
|
+
71: "ACTOR",
|
|
326
|
+
73: "CONFIG_START",
|
|
327
|
+
74: "CONFIG_CONTENT",
|
|
328
|
+
75: "CONFIG_END",
|
|
329
|
+
76: "SOLID_OPEN_ARROW",
|
|
330
|
+
77: "DOTTED_OPEN_ARROW",
|
|
331
|
+
78: "SOLID_ARROW",
|
|
332
|
+
79: "BIDIRECTIONAL_SOLID_ARROW",
|
|
333
|
+
80: "DOTTED_ARROW",
|
|
334
|
+
81: "BIDIRECTIONAL_DOTTED_ARROW",
|
|
335
|
+
82: "SOLID_CROSS",
|
|
336
|
+
83: "DOTTED_CROSS",
|
|
337
|
+
84: "SOLID_POINT",
|
|
338
|
+
85: "DOTTED_POINT",
|
|
339
|
+
86: "TXT"
|
|
340
|
+
},
|
|
341
|
+
productions_: [
|
|
342
|
+
0,
|
|
343
|
+
[3, 2],
|
|
344
|
+
[3, 2],
|
|
345
|
+
[3, 2],
|
|
346
|
+
[7, 0],
|
|
347
|
+
[7, 2],
|
|
348
|
+
[8, 2],
|
|
349
|
+
[8, 1],
|
|
350
|
+
[8, 1],
|
|
351
|
+
[10, 0],
|
|
352
|
+
[10, 2],
|
|
353
|
+
[11, 2],
|
|
354
|
+
[11, 1],
|
|
355
|
+
[11, 1],
|
|
356
|
+
[9, 1],
|
|
357
|
+
[9, 2],
|
|
358
|
+
[9, 4],
|
|
359
|
+
[9, 2],
|
|
360
|
+
[9, 4],
|
|
361
|
+
[9, 3],
|
|
362
|
+
[9, 3],
|
|
363
|
+
[9, 2],
|
|
364
|
+
[9, 3],
|
|
365
|
+
[9, 3],
|
|
366
|
+
[9, 2],
|
|
367
|
+
[9, 2],
|
|
368
|
+
[9, 2],
|
|
369
|
+
[9, 2],
|
|
370
|
+
[9, 2],
|
|
371
|
+
[9, 1],
|
|
372
|
+
[9, 1],
|
|
373
|
+
[9, 2],
|
|
374
|
+
[9, 2],
|
|
375
|
+
[9, 1],
|
|
376
|
+
[9, 4],
|
|
377
|
+
[9, 4],
|
|
378
|
+
[9, 4],
|
|
379
|
+
[9, 4],
|
|
380
|
+
[9, 4],
|
|
381
|
+
[9, 4],
|
|
382
|
+
[9, 4],
|
|
383
|
+
[9, 4],
|
|
384
|
+
[45, 1],
|
|
385
|
+
[45, 4],
|
|
386
|
+
[42, 1],
|
|
387
|
+
[42, 4],
|
|
388
|
+
[40, 1],
|
|
389
|
+
[40, 4],
|
|
390
|
+
[12, 5],
|
|
391
|
+
[12, 3],
|
|
392
|
+
[12, 5],
|
|
393
|
+
[12, 3],
|
|
394
|
+
[12, 3],
|
|
395
|
+
[12, 3],
|
|
396
|
+
[24, 4],
|
|
397
|
+
[24, 4],
|
|
398
|
+
[25, 3],
|
|
399
|
+
[26, 3],
|
|
400
|
+
[27, 3],
|
|
401
|
+
[28, 3],
|
|
402
|
+
[64, 2],
|
|
403
|
+
[64, 1],
|
|
404
|
+
[59, 3],
|
|
405
|
+
[59, 1],
|
|
406
|
+
[56, 1],
|
|
407
|
+
[56, 1],
|
|
408
|
+
[17, 5],
|
|
409
|
+
[17, 5],
|
|
410
|
+
[17, 4],
|
|
411
|
+
[54, 2],
|
|
412
|
+
[72, 3],
|
|
413
|
+
[22, 1],
|
|
414
|
+
[68, 1],
|
|
415
|
+
[68, 1],
|
|
416
|
+
[68, 1],
|
|
417
|
+
[68, 1],
|
|
418
|
+
[68, 1],
|
|
419
|
+
[68, 1],
|
|
420
|
+
[68, 1],
|
|
421
|
+
[68, 1],
|
|
422
|
+
[68, 1],
|
|
423
|
+
[68, 1],
|
|
424
|
+
[57, 1]
|
|
425
|
+
],
|
|
426
|
+
performAction: /* @__PURE__ */ r(function(e, t, n, r, i, a, o) {
|
|
427
|
+
var s = a.length - 1;
|
|
428
|
+
switch (i) {
|
|
429
|
+
case 3: return r.apply(a[s]), a[s];
|
|
430
|
+
case 4:
|
|
431
|
+
case 9:
|
|
432
|
+
this.$ = [];
|
|
433
|
+
break;
|
|
434
|
+
case 5:
|
|
435
|
+
case 10:
|
|
436
|
+
a[s - 1].push(a[s]), this.$ = a[s - 1];
|
|
437
|
+
break;
|
|
438
|
+
case 6:
|
|
439
|
+
case 7:
|
|
440
|
+
case 11:
|
|
441
|
+
case 12:
|
|
442
|
+
this.$ = a[s];
|
|
443
|
+
break;
|
|
444
|
+
case 8:
|
|
445
|
+
case 13:
|
|
446
|
+
this.$ = [];
|
|
447
|
+
break;
|
|
448
|
+
case 15:
|
|
449
|
+
a[s].type = "createParticipant", this.$ = a[s];
|
|
450
|
+
break;
|
|
451
|
+
case 16:
|
|
452
|
+
a[s - 1].unshift({
|
|
453
|
+
type: "boxStart",
|
|
454
|
+
boxData: r.parseBoxData(a[s - 2])
|
|
455
|
+
}), a[s - 1].push({
|
|
456
|
+
type: "boxEnd",
|
|
457
|
+
boxText: a[s - 2]
|
|
458
|
+
}), this.$ = a[s - 1];
|
|
459
|
+
break;
|
|
460
|
+
case 18:
|
|
461
|
+
this.$ = {
|
|
462
|
+
type: "sequenceIndex",
|
|
463
|
+
sequenceIndex: Number(a[s - 2]),
|
|
464
|
+
sequenceIndexStep: Number(a[s - 1]),
|
|
465
|
+
sequenceVisible: !0,
|
|
466
|
+
signalType: r.LINETYPE.AUTONUMBER
|
|
467
|
+
};
|
|
468
|
+
break;
|
|
469
|
+
case 19:
|
|
470
|
+
this.$ = {
|
|
471
|
+
type: "sequenceIndex",
|
|
472
|
+
sequenceIndex: Number(a[s - 1]),
|
|
473
|
+
sequenceIndexStep: 1,
|
|
474
|
+
sequenceVisible: !0,
|
|
475
|
+
signalType: r.LINETYPE.AUTONUMBER
|
|
476
|
+
};
|
|
477
|
+
break;
|
|
478
|
+
case 20:
|
|
479
|
+
this.$ = {
|
|
480
|
+
type: "sequenceIndex",
|
|
481
|
+
sequenceVisible: !1,
|
|
482
|
+
signalType: r.LINETYPE.AUTONUMBER
|
|
483
|
+
};
|
|
484
|
+
break;
|
|
485
|
+
case 21:
|
|
486
|
+
this.$ = {
|
|
487
|
+
type: "sequenceIndex",
|
|
488
|
+
sequenceVisible: !0,
|
|
489
|
+
signalType: r.LINETYPE.AUTONUMBER
|
|
490
|
+
};
|
|
491
|
+
break;
|
|
492
|
+
case 22:
|
|
493
|
+
this.$ = {
|
|
494
|
+
type: "activeStart",
|
|
495
|
+
signalType: r.LINETYPE.ACTIVE_START,
|
|
496
|
+
actor: a[s - 1].actor
|
|
497
|
+
};
|
|
498
|
+
break;
|
|
499
|
+
case 23:
|
|
500
|
+
this.$ = {
|
|
501
|
+
type: "activeEnd",
|
|
502
|
+
signalType: r.LINETYPE.ACTIVE_END,
|
|
503
|
+
actor: a[s - 1].actor
|
|
504
|
+
};
|
|
505
|
+
break;
|
|
506
|
+
case 29:
|
|
507
|
+
r.setDiagramTitle(a[s].substring(6)), this.$ = a[s].substring(6);
|
|
508
|
+
break;
|
|
509
|
+
case 30:
|
|
510
|
+
r.setDiagramTitle(a[s].substring(7)), this.$ = a[s].substring(7);
|
|
511
|
+
break;
|
|
512
|
+
case 31:
|
|
513
|
+
this.$ = a[s].trim(), r.setAccTitle(this.$);
|
|
514
|
+
break;
|
|
515
|
+
case 32:
|
|
516
|
+
case 33:
|
|
517
|
+
this.$ = a[s].trim(), r.setAccDescription(this.$);
|
|
518
|
+
break;
|
|
519
|
+
case 34:
|
|
520
|
+
a[s - 1].unshift({
|
|
521
|
+
type: "loopStart",
|
|
522
|
+
loopText: r.parseMessage(a[s - 2]),
|
|
523
|
+
signalType: r.LINETYPE.LOOP_START
|
|
524
|
+
}), a[s - 1].push({
|
|
525
|
+
type: "loopEnd",
|
|
526
|
+
loopText: a[s - 2],
|
|
527
|
+
signalType: r.LINETYPE.LOOP_END
|
|
528
|
+
}), this.$ = a[s - 1];
|
|
529
|
+
break;
|
|
530
|
+
case 35:
|
|
531
|
+
a[s - 1].unshift({
|
|
532
|
+
type: "rectStart",
|
|
533
|
+
color: r.parseMessage(a[s - 2]),
|
|
534
|
+
signalType: r.LINETYPE.RECT_START
|
|
535
|
+
}), a[s - 1].push({
|
|
536
|
+
type: "rectEnd",
|
|
537
|
+
color: r.parseMessage(a[s - 2]),
|
|
538
|
+
signalType: r.LINETYPE.RECT_END
|
|
539
|
+
}), this.$ = a[s - 1];
|
|
540
|
+
break;
|
|
541
|
+
case 36:
|
|
542
|
+
a[s - 1].unshift({
|
|
543
|
+
type: "optStart",
|
|
544
|
+
optText: r.parseMessage(a[s - 2]),
|
|
545
|
+
signalType: r.LINETYPE.OPT_START
|
|
546
|
+
}), a[s - 1].push({
|
|
547
|
+
type: "optEnd",
|
|
548
|
+
optText: r.parseMessage(a[s - 2]),
|
|
549
|
+
signalType: r.LINETYPE.OPT_END
|
|
550
|
+
}), this.$ = a[s - 1];
|
|
551
|
+
break;
|
|
552
|
+
case 37:
|
|
553
|
+
a[s - 1].unshift({
|
|
554
|
+
type: "altStart",
|
|
555
|
+
altText: r.parseMessage(a[s - 2]),
|
|
556
|
+
signalType: r.LINETYPE.ALT_START
|
|
557
|
+
}), a[s - 1].push({
|
|
558
|
+
type: "altEnd",
|
|
559
|
+
signalType: r.LINETYPE.ALT_END
|
|
560
|
+
}), this.$ = a[s - 1];
|
|
561
|
+
break;
|
|
562
|
+
case 38:
|
|
563
|
+
a[s - 1].unshift({
|
|
564
|
+
type: "parStart",
|
|
565
|
+
parText: r.parseMessage(a[s - 2]),
|
|
566
|
+
signalType: r.LINETYPE.PAR_START
|
|
567
|
+
}), a[s - 1].push({
|
|
568
|
+
type: "parEnd",
|
|
569
|
+
signalType: r.LINETYPE.PAR_END
|
|
570
|
+
}), this.$ = a[s - 1];
|
|
571
|
+
break;
|
|
572
|
+
case 39:
|
|
573
|
+
a[s - 1].unshift({
|
|
574
|
+
type: "parStart",
|
|
575
|
+
parText: r.parseMessage(a[s - 2]),
|
|
576
|
+
signalType: r.LINETYPE.PAR_OVER_START
|
|
577
|
+
}), a[s - 1].push({
|
|
578
|
+
type: "parEnd",
|
|
579
|
+
signalType: r.LINETYPE.PAR_END
|
|
580
|
+
}), this.$ = a[s - 1];
|
|
581
|
+
break;
|
|
582
|
+
case 40:
|
|
583
|
+
a[s - 1].unshift({
|
|
584
|
+
type: "criticalStart",
|
|
585
|
+
criticalText: r.parseMessage(a[s - 2]),
|
|
586
|
+
signalType: r.LINETYPE.CRITICAL_START
|
|
587
|
+
}), a[s - 1].push({
|
|
588
|
+
type: "criticalEnd",
|
|
589
|
+
signalType: r.LINETYPE.CRITICAL_END
|
|
590
|
+
}), this.$ = a[s - 1];
|
|
591
|
+
break;
|
|
592
|
+
case 41:
|
|
593
|
+
a[s - 1].unshift({
|
|
594
|
+
type: "breakStart",
|
|
595
|
+
breakText: r.parseMessage(a[s - 2]),
|
|
596
|
+
signalType: r.LINETYPE.BREAK_START
|
|
597
|
+
}), a[s - 1].push({
|
|
598
|
+
type: "breakEnd",
|
|
599
|
+
optText: r.parseMessage(a[s - 2]),
|
|
600
|
+
signalType: r.LINETYPE.BREAK_END
|
|
601
|
+
}), this.$ = a[s - 1];
|
|
602
|
+
break;
|
|
603
|
+
case 43:
|
|
604
|
+
this.$ = a[s - 3].concat([{
|
|
605
|
+
type: "option",
|
|
606
|
+
optionText: r.parseMessage(a[s - 1]),
|
|
607
|
+
signalType: r.LINETYPE.CRITICAL_OPTION
|
|
608
|
+
}, a[s]]);
|
|
609
|
+
break;
|
|
610
|
+
case 45:
|
|
611
|
+
this.$ = a[s - 3].concat([{
|
|
612
|
+
type: "and",
|
|
613
|
+
parText: r.parseMessage(a[s - 1]),
|
|
614
|
+
signalType: r.LINETYPE.PAR_AND
|
|
615
|
+
}, a[s]]);
|
|
616
|
+
break;
|
|
617
|
+
case 47:
|
|
618
|
+
this.$ = a[s - 3].concat([{
|
|
619
|
+
type: "else",
|
|
620
|
+
altText: r.parseMessage(a[s - 1]),
|
|
621
|
+
signalType: r.LINETYPE.ALT_ELSE
|
|
622
|
+
}, a[s]]);
|
|
623
|
+
break;
|
|
624
|
+
case 48:
|
|
625
|
+
a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
|
|
626
|
+
break;
|
|
627
|
+
case 49:
|
|
628
|
+
a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
|
|
629
|
+
break;
|
|
630
|
+
case 50:
|
|
631
|
+
a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
|
|
632
|
+
break;
|
|
633
|
+
case 51:
|
|
634
|
+
a[s - 1].draw = "actor", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
|
|
635
|
+
break;
|
|
636
|
+
case 52:
|
|
637
|
+
a[s - 1].type = "destroyParticipant", this.$ = a[s - 1];
|
|
638
|
+
break;
|
|
639
|
+
case 53:
|
|
640
|
+
a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
|
|
641
|
+
break;
|
|
642
|
+
case 54:
|
|
643
|
+
this.$ = [a[s - 1], {
|
|
644
|
+
type: "addNote",
|
|
645
|
+
placement: a[s - 2],
|
|
646
|
+
actor: a[s - 1].actor,
|
|
647
|
+
text: a[s]
|
|
648
|
+
}];
|
|
649
|
+
break;
|
|
650
|
+
case 55:
|
|
651
|
+
a[s - 2] = [].concat(a[s - 1], a[s - 1]).slice(0, 2), a[s - 2][0] = a[s - 2][0].actor, a[s - 2][1] = a[s - 2][1].actor, this.$ = [a[s - 1], {
|
|
652
|
+
type: "addNote",
|
|
653
|
+
placement: r.PLACEMENT.OVER,
|
|
654
|
+
actor: a[s - 2].slice(0, 2),
|
|
655
|
+
text: a[s]
|
|
656
|
+
}];
|
|
657
|
+
break;
|
|
658
|
+
case 56:
|
|
659
|
+
this.$ = [a[s - 1], {
|
|
660
|
+
type: "addLinks",
|
|
661
|
+
actor: a[s - 1].actor,
|
|
662
|
+
text: a[s]
|
|
663
|
+
}];
|
|
664
|
+
break;
|
|
665
|
+
case 57:
|
|
666
|
+
this.$ = [a[s - 1], {
|
|
667
|
+
type: "addALink",
|
|
668
|
+
actor: a[s - 1].actor,
|
|
669
|
+
text: a[s]
|
|
670
|
+
}];
|
|
671
|
+
break;
|
|
672
|
+
case 58:
|
|
673
|
+
this.$ = [a[s - 1], {
|
|
674
|
+
type: "addProperties",
|
|
675
|
+
actor: a[s - 1].actor,
|
|
676
|
+
text: a[s]
|
|
677
|
+
}];
|
|
678
|
+
break;
|
|
679
|
+
case 59:
|
|
680
|
+
this.$ = [a[s - 1], {
|
|
681
|
+
type: "addDetails",
|
|
682
|
+
actor: a[s - 1].actor,
|
|
683
|
+
text: a[s]
|
|
684
|
+
}];
|
|
685
|
+
break;
|
|
686
|
+
case 62:
|
|
687
|
+
this.$ = [a[s - 2], a[s]];
|
|
688
|
+
break;
|
|
689
|
+
case 63:
|
|
690
|
+
this.$ = a[s];
|
|
691
|
+
break;
|
|
692
|
+
case 64:
|
|
693
|
+
this.$ = r.PLACEMENT.LEFTOF;
|
|
694
|
+
break;
|
|
695
|
+
case 65:
|
|
696
|
+
this.$ = r.PLACEMENT.RIGHTOF;
|
|
697
|
+
break;
|
|
698
|
+
case 66:
|
|
699
|
+
this.$ = [
|
|
700
|
+
a[s - 4],
|
|
701
|
+
a[s - 1],
|
|
702
|
+
{
|
|
703
|
+
type: "addMessage",
|
|
704
|
+
from: a[s - 4].actor,
|
|
705
|
+
to: a[s - 1].actor,
|
|
706
|
+
signalType: a[s - 3],
|
|
707
|
+
msg: a[s],
|
|
708
|
+
activate: !0
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
type: "activeStart",
|
|
712
|
+
signalType: r.LINETYPE.ACTIVE_START,
|
|
713
|
+
actor: a[s - 1].actor
|
|
714
|
+
}
|
|
715
|
+
];
|
|
716
|
+
break;
|
|
717
|
+
case 67:
|
|
718
|
+
this.$ = [
|
|
719
|
+
a[s - 4],
|
|
720
|
+
a[s - 1],
|
|
721
|
+
{
|
|
722
|
+
type: "addMessage",
|
|
723
|
+
from: a[s - 4].actor,
|
|
724
|
+
to: a[s - 1].actor,
|
|
725
|
+
signalType: a[s - 3],
|
|
726
|
+
msg: a[s]
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
type: "activeEnd",
|
|
730
|
+
signalType: r.LINETYPE.ACTIVE_END,
|
|
731
|
+
actor: a[s - 4].actor
|
|
732
|
+
}
|
|
733
|
+
];
|
|
734
|
+
break;
|
|
735
|
+
case 68:
|
|
736
|
+
this.$ = [
|
|
737
|
+
a[s - 3],
|
|
738
|
+
a[s - 1],
|
|
739
|
+
{
|
|
740
|
+
type: "addMessage",
|
|
741
|
+
from: a[s - 3].actor,
|
|
742
|
+
to: a[s - 1].actor,
|
|
743
|
+
signalType: a[s - 2],
|
|
744
|
+
msg: a[s]
|
|
745
|
+
}
|
|
746
|
+
];
|
|
747
|
+
break;
|
|
748
|
+
case 69:
|
|
749
|
+
this.$ = {
|
|
750
|
+
type: "addParticipant",
|
|
751
|
+
actor: a[s - 1],
|
|
752
|
+
config: a[s]
|
|
753
|
+
};
|
|
754
|
+
break;
|
|
755
|
+
case 70:
|
|
756
|
+
this.$ = a[s - 1].trim();
|
|
757
|
+
break;
|
|
758
|
+
case 71:
|
|
759
|
+
this.$ = {
|
|
760
|
+
type: "addParticipant",
|
|
761
|
+
actor: a[s]
|
|
762
|
+
};
|
|
763
|
+
break;
|
|
764
|
+
case 72:
|
|
765
|
+
this.$ = r.LINETYPE.SOLID_OPEN;
|
|
766
|
+
break;
|
|
767
|
+
case 73:
|
|
768
|
+
this.$ = r.LINETYPE.DOTTED_OPEN;
|
|
769
|
+
break;
|
|
770
|
+
case 74:
|
|
771
|
+
this.$ = r.LINETYPE.SOLID;
|
|
772
|
+
break;
|
|
773
|
+
case 75:
|
|
774
|
+
this.$ = r.LINETYPE.BIDIRECTIONAL_SOLID;
|
|
775
|
+
break;
|
|
776
|
+
case 76:
|
|
777
|
+
this.$ = r.LINETYPE.DOTTED;
|
|
778
|
+
break;
|
|
779
|
+
case 77:
|
|
780
|
+
this.$ = r.LINETYPE.BIDIRECTIONAL_DOTTED;
|
|
781
|
+
break;
|
|
782
|
+
case 78:
|
|
783
|
+
this.$ = r.LINETYPE.SOLID_CROSS;
|
|
784
|
+
break;
|
|
785
|
+
case 79:
|
|
786
|
+
this.$ = r.LINETYPE.DOTTED_CROSS;
|
|
787
|
+
break;
|
|
788
|
+
case 80:
|
|
789
|
+
this.$ = r.LINETYPE.SOLID_POINT;
|
|
790
|
+
break;
|
|
791
|
+
case 81:
|
|
792
|
+
this.$ = r.LINETYPE.DOTTED_POINT;
|
|
793
|
+
break;
|
|
794
|
+
case 82:
|
|
795
|
+
this.$ = r.parseMessage(a[s].trim().substring(1));
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
}, "anonymous"),
|
|
799
|
+
table: [
|
|
800
|
+
{
|
|
801
|
+
3: 1,
|
|
802
|
+
4: t,
|
|
803
|
+
5: n,
|
|
804
|
+
6: i
|
|
805
|
+
},
|
|
806
|
+
{ 1: [3] },
|
|
807
|
+
{
|
|
808
|
+
3: 5,
|
|
809
|
+
4: t,
|
|
810
|
+
5: n,
|
|
811
|
+
6: i
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
3: 6,
|
|
815
|
+
4: t,
|
|
816
|
+
5: n,
|
|
817
|
+
6: i
|
|
818
|
+
},
|
|
819
|
+
e([
|
|
820
|
+
1,
|
|
821
|
+
4,
|
|
822
|
+
5,
|
|
823
|
+
13,
|
|
824
|
+
14,
|
|
825
|
+
18,
|
|
826
|
+
21,
|
|
827
|
+
23,
|
|
828
|
+
29,
|
|
829
|
+
30,
|
|
830
|
+
31,
|
|
831
|
+
33,
|
|
832
|
+
35,
|
|
833
|
+
36,
|
|
834
|
+
37,
|
|
835
|
+
38,
|
|
836
|
+
39,
|
|
837
|
+
41,
|
|
838
|
+
43,
|
|
839
|
+
44,
|
|
840
|
+
46,
|
|
841
|
+
50,
|
|
842
|
+
52,
|
|
843
|
+
53,
|
|
844
|
+
55,
|
|
845
|
+
60,
|
|
846
|
+
61,
|
|
847
|
+
62,
|
|
848
|
+
63,
|
|
849
|
+
71
|
|
850
|
+
], a, { 7: 7 }),
|
|
851
|
+
{ 1: [2, 1] },
|
|
852
|
+
{ 1: [2, 2] },
|
|
853
|
+
{
|
|
854
|
+
1: [2, 3],
|
|
855
|
+
4: o,
|
|
856
|
+
5: s,
|
|
857
|
+
8: 8,
|
|
858
|
+
9: 10,
|
|
859
|
+
12: 12,
|
|
860
|
+
13: c,
|
|
861
|
+
14: l,
|
|
862
|
+
17: 15,
|
|
863
|
+
18: u,
|
|
864
|
+
21: d,
|
|
865
|
+
22: 40,
|
|
866
|
+
23: f,
|
|
867
|
+
24: 19,
|
|
868
|
+
25: 20,
|
|
869
|
+
26: 21,
|
|
870
|
+
27: 22,
|
|
871
|
+
28: 23,
|
|
872
|
+
29: p,
|
|
873
|
+
30: m,
|
|
874
|
+
31: h,
|
|
875
|
+
33: g,
|
|
876
|
+
35: _,
|
|
877
|
+
36: v,
|
|
878
|
+
37: y,
|
|
879
|
+
38: b,
|
|
880
|
+
39: x,
|
|
881
|
+
41: S,
|
|
882
|
+
43: C,
|
|
883
|
+
44: w,
|
|
884
|
+
46: T,
|
|
885
|
+
50: E,
|
|
886
|
+
52: D,
|
|
887
|
+
53: O,
|
|
888
|
+
55: k,
|
|
889
|
+
60: A,
|
|
890
|
+
61: j,
|
|
891
|
+
62: M,
|
|
892
|
+
63: N,
|
|
893
|
+
71: P
|
|
894
|
+
},
|
|
895
|
+
e(F, [2, 5]),
|
|
896
|
+
{
|
|
897
|
+
9: 47,
|
|
898
|
+
12: 12,
|
|
899
|
+
13: c,
|
|
900
|
+
14: l,
|
|
901
|
+
17: 15,
|
|
902
|
+
18: u,
|
|
903
|
+
21: d,
|
|
904
|
+
22: 40,
|
|
905
|
+
23: f,
|
|
906
|
+
24: 19,
|
|
907
|
+
25: 20,
|
|
908
|
+
26: 21,
|
|
909
|
+
27: 22,
|
|
910
|
+
28: 23,
|
|
911
|
+
29: p,
|
|
912
|
+
30: m,
|
|
913
|
+
31: h,
|
|
914
|
+
33: g,
|
|
915
|
+
35: _,
|
|
916
|
+
36: v,
|
|
917
|
+
37: y,
|
|
918
|
+
38: b,
|
|
919
|
+
39: x,
|
|
920
|
+
41: S,
|
|
921
|
+
43: C,
|
|
922
|
+
44: w,
|
|
923
|
+
46: T,
|
|
924
|
+
50: E,
|
|
925
|
+
52: D,
|
|
926
|
+
53: O,
|
|
927
|
+
55: k,
|
|
928
|
+
60: A,
|
|
929
|
+
61: j,
|
|
930
|
+
62: M,
|
|
931
|
+
63: N,
|
|
932
|
+
71: P
|
|
933
|
+
},
|
|
934
|
+
e(F, [2, 7]),
|
|
935
|
+
e(F, [2, 8]),
|
|
936
|
+
e(F, [2, 14]),
|
|
937
|
+
{
|
|
938
|
+
12: 48,
|
|
939
|
+
50: E,
|
|
940
|
+
52: D,
|
|
941
|
+
53: O
|
|
942
|
+
},
|
|
943
|
+
{ 15: [1, 49] },
|
|
944
|
+
{ 5: [1, 50] },
|
|
945
|
+
{
|
|
946
|
+
5: [1, 53],
|
|
947
|
+
19: [1, 51],
|
|
948
|
+
20: [1, 52]
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
22: 54,
|
|
952
|
+
71: P
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
22: 55,
|
|
956
|
+
71: P
|
|
957
|
+
},
|
|
958
|
+
{ 5: [1, 56] },
|
|
959
|
+
{ 5: [1, 57] },
|
|
960
|
+
{ 5: [1, 58] },
|
|
961
|
+
{ 5: [1, 59] },
|
|
962
|
+
{ 5: [1, 60] },
|
|
963
|
+
e(F, [2, 29]),
|
|
964
|
+
e(F, [2, 30]),
|
|
965
|
+
{ 32: [1, 61] },
|
|
966
|
+
{ 34: [1, 62] },
|
|
967
|
+
e(F, [2, 33]),
|
|
968
|
+
{ 15: [1, 63] },
|
|
969
|
+
{ 15: [1, 64] },
|
|
970
|
+
{ 15: [1, 65] },
|
|
971
|
+
{ 15: [1, 66] },
|
|
972
|
+
{ 15: [1, 67] },
|
|
973
|
+
{ 15: [1, 68] },
|
|
974
|
+
{ 15: [1, 69] },
|
|
975
|
+
{ 15: [1, 70] },
|
|
976
|
+
{
|
|
977
|
+
22: 71,
|
|
978
|
+
54: 72,
|
|
979
|
+
71: [1, 73]
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
22: 74,
|
|
983
|
+
71: P
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
22: 75,
|
|
987
|
+
71: P
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
68: 76,
|
|
991
|
+
76: [1, 77],
|
|
992
|
+
77: [1, 78],
|
|
993
|
+
78: [1, 79],
|
|
994
|
+
79: [1, 80],
|
|
995
|
+
80: [1, 81],
|
|
996
|
+
81: [1, 82],
|
|
997
|
+
82: [1, 83],
|
|
998
|
+
83: [1, 84],
|
|
999
|
+
84: [1, 85],
|
|
1000
|
+
85: [1, 86]
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
56: 87,
|
|
1004
|
+
58: [1, 88],
|
|
1005
|
+
66: [1, 89],
|
|
1006
|
+
67: [1, 90]
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
22: 91,
|
|
1010
|
+
71: P
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
22: 92,
|
|
1014
|
+
71: P
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
22: 93,
|
|
1018
|
+
71: P
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
22: 94,
|
|
1022
|
+
71: P
|
|
1023
|
+
},
|
|
1024
|
+
e([
|
|
1025
|
+
5,
|
|
1026
|
+
51,
|
|
1027
|
+
65,
|
|
1028
|
+
76,
|
|
1029
|
+
77,
|
|
1030
|
+
78,
|
|
1031
|
+
79,
|
|
1032
|
+
80,
|
|
1033
|
+
81,
|
|
1034
|
+
82,
|
|
1035
|
+
83,
|
|
1036
|
+
84,
|
|
1037
|
+
85,
|
|
1038
|
+
86
|
|
1039
|
+
], I),
|
|
1040
|
+
e(F, [2, 6]),
|
|
1041
|
+
e(F, [2, 15]),
|
|
1042
|
+
e(L, [2, 9], { 10: 95 }),
|
|
1043
|
+
e(F, [2, 17]),
|
|
1044
|
+
{
|
|
1045
|
+
5: [1, 97],
|
|
1046
|
+
19: [1, 96]
|
|
1047
|
+
},
|
|
1048
|
+
{ 5: [1, 98] },
|
|
1049
|
+
e(F, [2, 21]),
|
|
1050
|
+
{ 5: [1, 99] },
|
|
1051
|
+
{ 5: [1, 100] },
|
|
1052
|
+
e(F, [2, 24]),
|
|
1053
|
+
e(F, [2, 25]),
|
|
1054
|
+
e(F, [2, 26]),
|
|
1055
|
+
e(F, [2, 27]),
|
|
1056
|
+
e(F, [2, 28]),
|
|
1057
|
+
e(F, [2, 31]),
|
|
1058
|
+
e(F, [2, 32]),
|
|
1059
|
+
e(R, a, { 7: 101 }),
|
|
1060
|
+
e(R, a, { 7: 102 }),
|
|
1061
|
+
e(R, a, { 7: 103 }),
|
|
1062
|
+
e(z, a, {
|
|
1063
|
+
40: 104,
|
|
1064
|
+
7: 105
|
|
1065
|
+
}),
|
|
1066
|
+
e(ee, a, {
|
|
1067
|
+
42: 106,
|
|
1068
|
+
7: 107
|
|
1069
|
+
}),
|
|
1070
|
+
e(ee, a, {
|
|
1071
|
+
7: 107,
|
|
1072
|
+
42: 108
|
|
1073
|
+
}),
|
|
1074
|
+
e(te, a, {
|
|
1075
|
+
45: 109,
|
|
1076
|
+
7: 110
|
|
1077
|
+
}),
|
|
1078
|
+
e(R, a, { 7: 111 }),
|
|
1079
|
+
{
|
|
1080
|
+
5: [1, 113],
|
|
1081
|
+
51: [1, 112]
|
|
1082
|
+
},
|
|
1083
|
+
{ 5: [1, 114] },
|
|
1084
|
+
e([5, 51], I, {
|
|
1085
|
+
72: 115,
|
|
1086
|
+
73: [1, 116]
|
|
1087
|
+
}),
|
|
1088
|
+
{
|
|
1089
|
+
5: [1, 118],
|
|
1090
|
+
51: [1, 117]
|
|
1091
|
+
},
|
|
1092
|
+
{ 5: [1, 119] },
|
|
1093
|
+
{
|
|
1094
|
+
22: 122,
|
|
1095
|
+
69: [1, 120],
|
|
1096
|
+
70: [1, 121],
|
|
1097
|
+
71: P
|
|
1098
|
+
},
|
|
1099
|
+
e(B, [2, 72]),
|
|
1100
|
+
e(B, [2, 73]),
|
|
1101
|
+
e(B, [2, 74]),
|
|
1102
|
+
e(B, [2, 75]),
|
|
1103
|
+
e(B, [2, 76]),
|
|
1104
|
+
e(B, [2, 77]),
|
|
1105
|
+
e(B, [2, 78]),
|
|
1106
|
+
e(B, [2, 79]),
|
|
1107
|
+
e(B, [2, 80]),
|
|
1108
|
+
e(B, [2, 81]),
|
|
1109
|
+
{
|
|
1110
|
+
22: 123,
|
|
1111
|
+
71: P
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
22: 125,
|
|
1115
|
+
59: 124,
|
|
1116
|
+
71: P
|
|
1117
|
+
},
|
|
1118
|
+
{ 71: [2, 64] },
|
|
1119
|
+
{ 71: [2, 65] },
|
|
1120
|
+
{
|
|
1121
|
+
57: 126,
|
|
1122
|
+
86: V
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
57: 128,
|
|
1126
|
+
86: V
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
57: 129,
|
|
1130
|
+
86: V
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
57: 130,
|
|
1134
|
+
86: V
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
4: [1, 133],
|
|
1138
|
+
5: [1, 135],
|
|
1139
|
+
11: 132,
|
|
1140
|
+
12: 134,
|
|
1141
|
+
16: [1, 131],
|
|
1142
|
+
50: E,
|
|
1143
|
+
52: D,
|
|
1144
|
+
53: O
|
|
1145
|
+
},
|
|
1146
|
+
{ 5: [1, 136] },
|
|
1147
|
+
e(F, [2, 19]),
|
|
1148
|
+
e(F, [2, 20]),
|
|
1149
|
+
e(F, [2, 22]),
|
|
1150
|
+
e(F, [2, 23]),
|
|
1151
|
+
{
|
|
1152
|
+
4: o,
|
|
1153
|
+
5: s,
|
|
1154
|
+
8: 8,
|
|
1155
|
+
9: 10,
|
|
1156
|
+
12: 12,
|
|
1157
|
+
13: c,
|
|
1158
|
+
14: l,
|
|
1159
|
+
16: [1, 137],
|
|
1160
|
+
17: 15,
|
|
1161
|
+
18: u,
|
|
1162
|
+
21: d,
|
|
1163
|
+
22: 40,
|
|
1164
|
+
23: f,
|
|
1165
|
+
24: 19,
|
|
1166
|
+
25: 20,
|
|
1167
|
+
26: 21,
|
|
1168
|
+
27: 22,
|
|
1169
|
+
28: 23,
|
|
1170
|
+
29: p,
|
|
1171
|
+
30: m,
|
|
1172
|
+
31: h,
|
|
1173
|
+
33: g,
|
|
1174
|
+
35: _,
|
|
1175
|
+
36: v,
|
|
1176
|
+
37: y,
|
|
1177
|
+
38: b,
|
|
1178
|
+
39: x,
|
|
1179
|
+
41: S,
|
|
1180
|
+
43: C,
|
|
1181
|
+
44: w,
|
|
1182
|
+
46: T,
|
|
1183
|
+
50: E,
|
|
1184
|
+
52: D,
|
|
1185
|
+
53: O,
|
|
1186
|
+
55: k,
|
|
1187
|
+
60: A,
|
|
1188
|
+
61: j,
|
|
1189
|
+
62: M,
|
|
1190
|
+
63: N,
|
|
1191
|
+
71: P
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
4: o,
|
|
1195
|
+
5: s,
|
|
1196
|
+
8: 8,
|
|
1197
|
+
9: 10,
|
|
1198
|
+
12: 12,
|
|
1199
|
+
13: c,
|
|
1200
|
+
14: l,
|
|
1201
|
+
16: [1, 138],
|
|
1202
|
+
17: 15,
|
|
1203
|
+
18: u,
|
|
1204
|
+
21: d,
|
|
1205
|
+
22: 40,
|
|
1206
|
+
23: f,
|
|
1207
|
+
24: 19,
|
|
1208
|
+
25: 20,
|
|
1209
|
+
26: 21,
|
|
1210
|
+
27: 22,
|
|
1211
|
+
28: 23,
|
|
1212
|
+
29: p,
|
|
1213
|
+
30: m,
|
|
1214
|
+
31: h,
|
|
1215
|
+
33: g,
|
|
1216
|
+
35: _,
|
|
1217
|
+
36: v,
|
|
1218
|
+
37: y,
|
|
1219
|
+
38: b,
|
|
1220
|
+
39: x,
|
|
1221
|
+
41: S,
|
|
1222
|
+
43: C,
|
|
1223
|
+
44: w,
|
|
1224
|
+
46: T,
|
|
1225
|
+
50: E,
|
|
1226
|
+
52: D,
|
|
1227
|
+
53: O,
|
|
1228
|
+
55: k,
|
|
1229
|
+
60: A,
|
|
1230
|
+
61: j,
|
|
1231
|
+
62: M,
|
|
1232
|
+
63: N,
|
|
1233
|
+
71: P
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
4: o,
|
|
1237
|
+
5: s,
|
|
1238
|
+
8: 8,
|
|
1239
|
+
9: 10,
|
|
1240
|
+
12: 12,
|
|
1241
|
+
13: c,
|
|
1242
|
+
14: l,
|
|
1243
|
+
16: [1, 139],
|
|
1244
|
+
17: 15,
|
|
1245
|
+
18: u,
|
|
1246
|
+
21: d,
|
|
1247
|
+
22: 40,
|
|
1248
|
+
23: f,
|
|
1249
|
+
24: 19,
|
|
1250
|
+
25: 20,
|
|
1251
|
+
26: 21,
|
|
1252
|
+
27: 22,
|
|
1253
|
+
28: 23,
|
|
1254
|
+
29: p,
|
|
1255
|
+
30: m,
|
|
1256
|
+
31: h,
|
|
1257
|
+
33: g,
|
|
1258
|
+
35: _,
|
|
1259
|
+
36: v,
|
|
1260
|
+
37: y,
|
|
1261
|
+
38: b,
|
|
1262
|
+
39: x,
|
|
1263
|
+
41: S,
|
|
1264
|
+
43: C,
|
|
1265
|
+
44: w,
|
|
1266
|
+
46: T,
|
|
1267
|
+
50: E,
|
|
1268
|
+
52: D,
|
|
1269
|
+
53: O,
|
|
1270
|
+
55: k,
|
|
1271
|
+
60: A,
|
|
1272
|
+
61: j,
|
|
1273
|
+
62: M,
|
|
1274
|
+
63: N,
|
|
1275
|
+
71: P
|
|
1276
|
+
},
|
|
1277
|
+
{ 16: [1, 140] },
|
|
1278
|
+
{
|
|
1279
|
+
4: o,
|
|
1280
|
+
5: s,
|
|
1281
|
+
8: 8,
|
|
1282
|
+
9: 10,
|
|
1283
|
+
12: 12,
|
|
1284
|
+
13: c,
|
|
1285
|
+
14: l,
|
|
1286
|
+
16: [2, 46],
|
|
1287
|
+
17: 15,
|
|
1288
|
+
18: u,
|
|
1289
|
+
21: d,
|
|
1290
|
+
22: 40,
|
|
1291
|
+
23: f,
|
|
1292
|
+
24: 19,
|
|
1293
|
+
25: 20,
|
|
1294
|
+
26: 21,
|
|
1295
|
+
27: 22,
|
|
1296
|
+
28: 23,
|
|
1297
|
+
29: p,
|
|
1298
|
+
30: m,
|
|
1299
|
+
31: h,
|
|
1300
|
+
33: g,
|
|
1301
|
+
35: _,
|
|
1302
|
+
36: v,
|
|
1303
|
+
37: y,
|
|
1304
|
+
38: b,
|
|
1305
|
+
39: x,
|
|
1306
|
+
41: S,
|
|
1307
|
+
43: C,
|
|
1308
|
+
44: w,
|
|
1309
|
+
46: T,
|
|
1310
|
+
49: [1, 141],
|
|
1311
|
+
50: E,
|
|
1312
|
+
52: D,
|
|
1313
|
+
53: O,
|
|
1314
|
+
55: k,
|
|
1315
|
+
60: A,
|
|
1316
|
+
61: j,
|
|
1317
|
+
62: M,
|
|
1318
|
+
63: N,
|
|
1319
|
+
71: P
|
|
1320
|
+
},
|
|
1321
|
+
{ 16: [1, 142] },
|
|
1322
|
+
{
|
|
1323
|
+
4: o,
|
|
1324
|
+
5: s,
|
|
1325
|
+
8: 8,
|
|
1326
|
+
9: 10,
|
|
1327
|
+
12: 12,
|
|
1328
|
+
13: c,
|
|
1329
|
+
14: l,
|
|
1330
|
+
16: [2, 44],
|
|
1331
|
+
17: 15,
|
|
1332
|
+
18: u,
|
|
1333
|
+
21: d,
|
|
1334
|
+
22: 40,
|
|
1335
|
+
23: f,
|
|
1336
|
+
24: 19,
|
|
1337
|
+
25: 20,
|
|
1338
|
+
26: 21,
|
|
1339
|
+
27: 22,
|
|
1340
|
+
28: 23,
|
|
1341
|
+
29: p,
|
|
1342
|
+
30: m,
|
|
1343
|
+
31: h,
|
|
1344
|
+
33: g,
|
|
1345
|
+
35: _,
|
|
1346
|
+
36: v,
|
|
1347
|
+
37: y,
|
|
1348
|
+
38: b,
|
|
1349
|
+
39: x,
|
|
1350
|
+
41: S,
|
|
1351
|
+
43: C,
|
|
1352
|
+
44: w,
|
|
1353
|
+
46: T,
|
|
1354
|
+
48: [1, 143],
|
|
1355
|
+
50: E,
|
|
1356
|
+
52: D,
|
|
1357
|
+
53: O,
|
|
1358
|
+
55: k,
|
|
1359
|
+
60: A,
|
|
1360
|
+
61: j,
|
|
1361
|
+
62: M,
|
|
1362
|
+
63: N,
|
|
1363
|
+
71: P
|
|
1364
|
+
},
|
|
1365
|
+
{ 16: [1, 144] },
|
|
1366
|
+
{ 16: [1, 145] },
|
|
1367
|
+
{
|
|
1368
|
+
4: o,
|
|
1369
|
+
5: s,
|
|
1370
|
+
8: 8,
|
|
1371
|
+
9: 10,
|
|
1372
|
+
12: 12,
|
|
1373
|
+
13: c,
|
|
1374
|
+
14: l,
|
|
1375
|
+
16: [2, 42],
|
|
1376
|
+
17: 15,
|
|
1377
|
+
18: u,
|
|
1378
|
+
21: d,
|
|
1379
|
+
22: 40,
|
|
1380
|
+
23: f,
|
|
1381
|
+
24: 19,
|
|
1382
|
+
25: 20,
|
|
1383
|
+
26: 21,
|
|
1384
|
+
27: 22,
|
|
1385
|
+
28: 23,
|
|
1386
|
+
29: p,
|
|
1387
|
+
30: m,
|
|
1388
|
+
31: h,
|
|
1389
|
+
33: g,
|
|
1390
|
+
35: _,
|
|
1391
|
+
36: v,
|
|
1392
|
+
37: y,
|
|
1393
|
+
38: b,
|
|
1394
|
+
39: x,
|
|
1395
|
+
41: S,
|
|
1396
|
+
43: C,
|
|
1397
|
+
44: w,
|
|
1398
|
+
46: T,
|
|
1399
|
+
47: [1, 146],
|
|
1400
|
+
50: E,
|
|
1401
|
+
52: D,
|
|
1402
|
+
53: O,
|
|
1403
|
+
55: k,
|
|
1404
|
+
60: A,
|
|
1405
|
+
61: j,
|
|
1406
|
+
62: M,
|
|
1407
|
+
63: N,
|
|
1408
|
+
71: P
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
4: o,
|
|
1412
|
+
5: s,
|
|
1413
|
+
8: 8,
|
|
1414
|
+
9: 10,
|
|
1415
|
+
12: 12,
|
|
1416
|
+
13: c,
|
|
1417
|
+
14: l,
|
|
1418
|
+
16: [1, 147],
|
|
1419
|
+
17: 15,
|
|
1420
|
+
18: u,
|
|
1421
|
+
21: d,
|
|
1422
|
+
22: 40,
|
|
1423
|
+
23: f,
|
|
1424
|
+
24: 19,
|
|
1425
|
+
25: 20,
|
|
1426
|
+
26: 21,
|
|
1427
|
+
27: 22,
|
|
1428
|
+
28: 23,
|
|
1429
|
+
29: p,
|
|
1430
|
+
30: m,
|
|
1431
|
+
31: h,
|
|
1432
|
+
33: g,
|
|
1433
|
+
35: _,
|
|
1434
|
+
36: v,
|
|
1435
|
+
37: y,
|
|
1436
|
+
38: b,
|
|
1437
|
+
39: x,
|
|
1438
|
+
41: S,
|
|
1439
|
+
43: C,
|
|
1440
|
+
44: w,
|
|
1441
|
+
46: T,
|
|
1442
|
+
50: E,
|
|
1443
|
+
52: D,
|
|
1444
|
+
53: O,
|
|
1445
|
+
55: k,
|
|
1446
|
+
60: A,
|
|
1447
|
+
61: j,
|
|
1448
|
+
62: M,
|
|
1449
|
+
63: N,
|
|
1450
|
+
71: P
|
|
1451
|
+
},
|
|
1452
|
+
{ 15: [1, 148] },
|
|
1453
|
+
e(F, [2, 49]),
|
|
1454
|
+
e(F, [2, 53]),
|
|
1455
|
+
{ 5: [2, 69] },
|
|
1456
|
+
{ 74: [1, 149] },
|
|
1457
|
+
{ 15: [1, 150] },
|
|
1458
|
+
e(F, [2, 51]),
|
|
1459
|
+
e(F, [2, 52]),
|
|
1460
|
+
{
|
|
1461
|
+
22: 151,
|
|
1462
|
+
71: P
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
22: 152,
|
|
1466
|
+
71: P
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
57: 153,
|
|
1470
|
+
86: V
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
57: 154,
|
|
1474
|
+
86: V
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
57: 155,
|
|
1478
|
+
86: V
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
65: [1, 156],
|
|
1482
|
+
86: [2, 63]
|
|
1483
|
+
},
|
|
1484
|
+
{ 5: [2, 56] },
|
|
1485
|
+
{ 5: [2, 82] },
|
|
1486
|
+
{ 5: [2, 57] },
|
|
1487
|
+
{ 5: [2, 58] },
|
|
1488
|
+
{ 5: [2, 59] },
|
|
1489
|
+
e(F, [2, 16]),
|
|
1490
|
+
e(L, [2, 10]),
|
|
1491
|
+
{
|
|
1492
|
+
12: 157,
|
|
1493
|
+
50: E,
|
|
1494
|
+
52: D,
|
|
1495
|
+
53: O
|
|
1496
|
+
},
|
|
1497
|
+
e(L, [2, 12]),
|
|
1498
|
+
e(L, [2, 13]),
|
|
1499
|
+
e(F, [2, 18]),
|
|
1500
|
+
e(F, [2, 34]),
|
|
1501
|
+
e(F, [2, 35]),
|
|
1502
|
+
e(F, [2, 36]),
|
|
1503
|
+
e(F, [2, 37]),
|
|
1504
|
+
{ 15: [1, 158] },
|
|
1505
|
+
e(F, [2, 38]),
|
|
1506
|
+
{ 15: [1, 159] },
|
|
1507
|
+
e(F, [2, 39]),
|
|
1508
|
+
e(F, [2, 40]),
|
|
1509
|
+
{ 15: [1, 160] },
|
|
1510
|
+
e(F, [2, 41]),
|
|
1511
|
+
{ 5: [1, 161] },
|
|
1512
|
+
{ 75: [1, 162] },
|
|
1513
|
+
{ 5: [1, 163] },
|
|
1514
|
+
{
|
|
1515
|
+
57: 164,
|
|
1516
|
+
86: V
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
57: 165,
|
|
1520
|
+
86: V
|
|
1521
|
+
},
|
|
1522
|
+
{ 5: [2, 68] },
|
|
1523
|
+
{ 5: [2, 54] },
|
|
1524
|
+
{ 5: [2, 55] },
|
|
1525
|
+
{
|
|
1526
|
+
22: 166,
|
|
1527
|
+
71: P
|
|
1528
|
+
},
|
|
1529
|
+
e(L, [2, 11]),
|
|
1530
|
+
e(z, a, {
|
|
1531
|
+
7: 105,
|
|
1532
|
+
40: 167
|
|
1533
|
+
}),
|
|
1534
|
+
e(ee, a, {
|
|
1535
|
+
7: 107,
|
|
1536
|
+
42: 168
|
|
1537
|
+
}),
|
|
1538
|
+
e(te, a, {
|
|
1539
|
+
7: 110,
|
|
1540
|
+
45: 169
|
|
1541
|
+
}),
|
|
1542
|
+
e(F, [2, 48]),
|
|
1543
|
+
{ 5: [2, 70] },
|
|
1544
|
+
e(F, [2, 50]),
|
|
1545
|
+
{ 5: [2, 66] },
|
|
1546
|
+
{ 5: [2, 67] },
|
|
1547
|
+
{ 86: [2, 62] },
|
|
1548
|
+
{ 16: [2, 47] },
|
|
1549
|
+
{ 16: [2, 45] },
|
|
1550
|
+
{ 16: [2, 43] }
|
|
1551
|
+
],
|
|
1552
|
+
defaultActions: {
|
|
1553
|
+
5: [2, 1],
|
|
1554
|
+
6: [2, 2],
|
|
1555
|
+
89: [2, 64],
|
|
1556
|
+
90: [2, 65],
|
|
1557
|
+
115: [2, 69],
|
|
1558
|
+
126: [2, 56],
|
|
1559
|
+
127: [2, 82],
|
|
1560
|
+
128: [2, 57],
|
|
1561
|
+
129: [2, 58],
|
|
1562
|
+
130: [2, 59],
|
|
1563
|
+
153: [2, 68],
|
|
1564
|
+
154: [2, 54],
|
|
1565
|
+
155: [2, 55],
|
|
1566
|
+
162: [2, 70],
|
|
1567
|
+
164: [2, 66],
|
|
1568
|
+
165: [2, 67],
|
|
1569
|
+
166: [2, 62],
|
|
1570
|
+
167: [2, 47],
|
|
1571
|
+
168: [2, 45],
|
|
1572
|
+
169: [2, 43]
|
|
1573
|
+
},
|
|
1574
|
+
parseError: /* @__PURE__ */ r(function(e, t) {
|
|
1575
|
+
if (t.recoverable) this.trace(e);
|
|
1576
|
+
else {
|
|
1577
|
+
var n = Error(e);
|
|
1578
|
+
throw n.hash = t, n;
|
|
1579
|
+
}
|
|
1580
|
+
}, "parseError"),
|
|
1581
|
+
parse: /* @__PURE__ */ r(function(e) {
|
|
1582
|
+
var t = this, n = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
|
|
1583
|
+
for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
|
|
1584
|
+
h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
|
|
1585
|
+
var v = h.yylloc;
|
|
1586
|
+
o.push(v);
|
|
1587
|
+
var y = h.options && h.options.ranges;
|
|
1588
|
+
typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
1589
|
+
function b(e) {
|
|
1590
|
+
n.length -= 2 * e, a.length -= e, o.length -= e;
|
|
1591
|
+
}
|
|
1592
|
+
r(b, "popStack");
|
|
1593
|
+
function x() {
|
|
1594
|
+
var e = i.pop() || h.lex() || p;
|
|
1595
|
+
return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
|
|
1596
|
+
}
|
|
1597
|
+
r(x, "lex");
|
|
1598
|
+
for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
|
|
1599
|
+
if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
|
|
1600
|
+
var M = "";
|
|
1601
|
+
for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
|
|
1602
|
+
M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
|
|
1603
|
+
text: h.match,
|
|
1604
|
+
token: this.terminals_[S] || S,
|
|
1605
|
+
line: h.yylineno,
|
|
1606
|
+
loc: v,
|
|
1607
|
+
expected: j
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
|
|
1611
|
+
switch (T[0]) {
|
|
1612
|
+
case 1:
|
|
1613
|
+
n.push(S), a.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
|
|
1614
|
+
break;
|
|
1615
|
+
case 2:
|
|
1616
|
+
if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
|
|
1617
|
+
first_line: o[o.length - (k || 1)].first_line,
|
|
1618
|
+
last_line: o[o.length - 1].last_line,
|
|
1619
|
+
first_column: o[o.length - (k || 1)].first_column,
|
|
1620
|
+
last_column: o[o.length - 1].last_column
|
|
1621
|
+
}, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
|
|
1622
|
+
c,
|
|
1623
|
+
u,
|
|
1624
|
+
l,
|
|
1625
|
+
g.yy,
|
|
1626
|
+
T[1],
|
|
1627
|
+
a,
|
|
1628
|
+
o
|
|
1629
|
+
].concat(m)), E !== void 0) return E;
|
|
1630
|
+
k && (n = n.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[n[n.length - 2]][n[n.length - 1]], n.push(A);
|
|
1631
|
+
break;
|
|
1632
|
+
case 3: return !0;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
return !0;
|
|
1636
|
+
}, "parse")
|
|
1637
|
+
};
|
|
1638
|
+
H.lexer = /* @__PURE__ */ (function() {
|
|
1639
|
+
return {
|
|
1640
|
+
EOF: 1,
|
|
1641
|
+
parseError: /* @__PURE__ */ r(function(e, t) {
|
|
1642
|
+
if (this.yy.parser) this.yy.parser.parseError(e, t);
|
|
1643
|
+
else throw Error(e);
|
|
1644
|
+
}, "parseError"),
|
|
1645
|
+
setInput: /* @__PURE__ */ r(function(e, t) {
|
|
1646
|
+
return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
1647
|
+
first_line: 1,
|
|
1648
|
+
first_column: 0,
|
|
1649
|
+
last_line: 1,
|
|
1650
|
+
last_column: 0
|
|
1651
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
1652
|
+
}, "setInput"),
|
|
1653
|
+
input: /* @__PURE__ */ r(function() {
|
|
1654
|
+
var e = this._input[0];
|
|
1655
|
+
return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
|
|
1656
|
+
}, "input"),
|
|
1657
|
+
unput: /* @__PURE__ */ r(function(e) {
|
|
1658
|
+
var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
|
|
1659
|
+
this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
|
|
1660
|
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
1661
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
1662
|
+
var i = this.yylloc.range;
|
|
1663
|
+
return this.yylloc = {
|
|
1664
|
+
first_line: this.yylloc.first_line,
|
|
1665
|
+
last_line: this.yylineno + 1,
|
|
1666
|
+
first_column: this.yylloc.first_column,
|
|
1667
|
+
last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
|
|
1668
|
+
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
|
|
1669
|
+
}, "unput"),
|
|
1670
|
+
more: /* @__PURE__ */ r(function() {
|
|
1671
|
+
return this._more = !0, this;
|
|
1672
|
+
}, "more"),
|
|
1673
|
+
reject: /* @__PURE__ */ r(function() {
|
|
1674
|
+
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
1675
|
+
else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
1676
|
+
text: "",
|
|
1677
|
+
token: null,
|
|
1678
|
+
line: this.yylineno
|
|
1679
|
+
});
|
|
1680
|
+
return this;
|
|
1681
|
+
}, "reject"),
|
|
1682
|
+
less: /* @__PURE__ */ r(function(e) {
|
|
1683
|
+
this.unput(this.match.slice(e));
|
|
1684
|
+
}, "less"),
|
|
1685
|
+
pastInput: /* @__PURE__ */ r(function() {
|
|
1686
|
+
var e = this.matched.substr(0, this.matched.length - this.match.length);
|
|
1687
|
+
return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
|
|
1688
|
+
}, "pastInput"),
|
|
1689
|
+
upcomingInput: /* @__PURE__ */ r(function() {
|
|
1690
|
+
var e = this.match;
|
|
1691
|
+
return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
1692
|
+
}, "upcomingInput"),
|
|
1693
|
+
showPosition: /* @__PURE__ */ r(function() {
|
|
1694
|
+
var e = this.pastInput(), t = Array(e.length + 1).join("-");
|
|
1695
|
+
return e + this.upcomingInput() + "\n" + t + "^";
|
|
1696
|
+
}, "showPosition"),
|
|
1697
|
+
test_match: /* @__PURE__ */ r(function(e, t) {
|
|
1698
|
+
var n, r, i;
|
|
1699
|
+
if (this.options.backtrack_lexer && (i = {
|
|
1700
|
+
yylineno: this.yylineno,
|
|
1701
|
+
yylloc: {
|
|
1702
|
+
first_line: this.yylloc.first_line,
|
|
1703
|
+
last_line: this.last_line,
|
|
1704
|
+
first_column: this.yylloc.first_column,
|
|
1705
|
+
last_column: this.yylloc.last_column
|
|
1706
|
+
},
|
|
1707
|
+
yytext: this.yytext,
|
|
1708
|
+
match: this.match,
|
|
1709
|
+
matches: this.matches,
|
|
1710
|
+
matched: this.matched,
|
|
1711
|
+
yyleng: this.yyleng,
|
|
1712
|
+
offset: this.offset,
|
|
1713
|
+
_more: this._more,
|
|
1714
|
+
_input: this._input,
|
|
1715
|
+
yy: this.yy,
|
|
1716
|
+
conditionStack: this.conditionStack.slice(0),
|
|
1717
|
+
done: this.done
|
|
1718
|
+
}, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
|
1719
|
+
first_line: this.yylloc.last_line,
|
|
1720
|
+
last_line: this.yylineno + 1,
|
|
1721
|
+
first_column: this.yylloc.last_column,
|
|
1722
|
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
|
|
1723
|
+
}, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
|
|
1724
|
+
if (this._backtrack) {
|
|
1725
|
+
for (var a in i) this[a] = i[a];
|
|
1726
|
+
return !1;
|
|
1727
|
+
}
|
|
1728
|
+
return !1;
|
|
1729
|
+
}, "test_match"),
|
|
1730
|
+
next: /* @__PURE__ */ r(function() {
|
|
1731
|
+
if (this.done) return this.EOF;
|
|
1732
|
+
this._input || (this.done = !0);
|
|
1733
|
+
var e, t, n, r;
|
|
1734
|
+
this._more || (this.yytext = "", this.match = "");
|
|
1735
|
+
for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
|
|
1736
|
+
if (t = n, r = a, this.options.backtrack_lexer) {
|
|
1737
|
+
if (e = this.test_match(n, i[a]), e !== !1) return e;
|
|
1738
|
+
if (this._backtrack) {
|
|
1739
|
+
t = !1;
|
|
1740
|
+
continue;
|
|
1741
|
+
} else return !1;
|
|
1742
|
+
} else if (!this.options.flex) break;
|
|
1743
|
+
}
|
|
1744
|
+
return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
1745
|
+
text: "",
|
|
1746
|
+
token: null,
|
|
1747
|
+
line: this.yylineno
|
|
1748
|
+
});
|
|
1749
|
+
}, "next"),
|
|
1750
|
+
lex: /* @__PURE__ */ r(function() {
|
|
1751
|
+
return this.next() || this.lex();
|
|
1752
|
+
}, "lex"),
|
|
1753
|
+
begin: /* @__PURE__ */ r(function(e) {
|
|
1754
|
+
this.conditionStack.push(e);
|
|
1755
|
+
}, "begin"),
|
|
1756
|
+
popState: /* @__PURE__ */ r(function() {
|
|
1757
|
+
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
1758
|
+
}, "popState"),
|
|
1759
|
+
_currentRules: /* @__PURE__ */ r(function() {
|
|
1760
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
1761
|
+
}, "_currentRules"),
|
|
1762
|
+
topState: /* @__PURE__ */ r(function(e) {
|
|
1763
|
+
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
1764
|
+
}, "topState"),
|
|
1765
|
+
pushState: /* @__PURE__ */ r(function(e) {
|
|
1766
|
+
this.begin(e);
|
|
1767
|
+
}, "pushState"),
|
|
1768
|
+
stateStackSize: /* @__PURE__ */ r(function() {
|
|
1769
|
+
return this.conditionStack.length;
|
|
1770
|
+
}, "stateStackSize"),
|
|
1771
|
+
options: { "case-insensitive": !0 },
|
|
1772
|
+
performAction: /* @__PURE__ */ r(function(e, t, n, r) {
|
|
1773
|
+
switch (n) {
|
|
1774
|
+
case 0: return 5;
|
|
1775
|
+
case 1: break;
|
|
1776
|
+
case 2: break;
|
|
1777
|
+
case 3: break;
|
|
1778
|
+
case 4: break;
|
|
1779
|
+
case 5: break;
|
|
1780
|
+
case 6: return 19;
|
|
1781
|
+
case 7: return this.begin("CONFIG"), 73;
|
|
1782
|
+
case 8: return 74;
|
|
1783
|
+
case 9: return this.popState(), this.popState(), 75;
|
|
1784
|
+
case 10: return t.yytext = t.yytext.trim(), 71;
|
|
1785
|
+
case 11: return t.yytext = t.yytext.trim(), this.begin("ALIAS"), 71;
|
|
1786
|
+
case 12: return this.begin("LINE"), 14;
|
|
1787
|
+
case 13: return this.begin("ID"), 50;
|
|
1788
|
+
case 14: return this.begin("ID"), 52;
|
|
1789
|
+
case 15: return 13;
|
|
1790
|
+
case 16: return this.begin("ID"), 53;
|
|
1791
|
+
case 17: return t.yytext = t.yytext.trim(), this.begin("ALIAS"), 71;
|
|
1792
|
+
case 18: return this.popState(), this.popState(), this.begin("LINE"), 51;
|
|
1793
|
+
case 19: return this.popState(), this.popState(), 5;
|
|
1794
|
+
case 20: return this.begin("LINE"), 36;
|
|
1795
|
+
case 21: return this.begin("LINE"), 37;
|
|
1796
|
+
case 22: return this.begin("LINE"), 38;
|
|
1797
|
+
case 23: return this.begin("LINE"), 39;
|
|
1798
|
+
case 24: return this.begin("LINE"), 49;
|
|
1799
|
+
case 25: return this.begin("LINE"), 41;
|
|
1800
|
+
case 26: return this.begin("LINE"), 43;
|
|
1801
|
+
case 27: return this.begin("LINE"), 48;
|
|
1802
|
+
case 28: return this.begin("LINE"), 44;
|
|
1803
|
+
case 29: return this.begin("LINE"), 47;
|
|
1804
|
+
case 30: return this.begin("LINE"), 46;
|
|
1805
|
+
case 31: return this.popState(), 15;
|
|
1806
|
+
case 32: return 16;
|
|
1807
|
+
case 33: return 66;
|
|
1808
|
+
case 34: return 67;
|
|
1809
|
+
case 35: return 60;
|
|
1810
|
+
case 36: return 61;
|
|
1811
|
+
case 37: return 62;
|
|
1812
|
+
case 38: return 63;
|
|
1813
|
+
case 39: return 58;
|
|
1814
|
+
case 40: return 55;
|
|
1815
|
+
case 41: return this.begin("ID"), 21;
|
|
1816
|
+
case 42: return this.begin("ID"), 23;
|
|
1817
|
+
case 43: return 29;
|
|
1818
|
+
case 44: return 30;
|
|
1819
|
+
case 45: return this.begin("acc_title"), 31;
|
|
1820
|
+
case 46: return this.popState(), "acc_title_value";
|
|
1821
|
+
case 47: return this.begin("acc_descr"), 33;
|
|
1822
|
+
case 48: return this.popState(), "acc_descr_value";
|
|
1823
|
+
case 49:
|
|
1824
|
+
this.begin("acc_descr_multiline");
|
|
1825
|
+
break;
|
|
1826
|
+
case 50:
|
|
1827
|
+
this.popState();
|
|
1828
|
+
break;
|
|
1829
|
+
case 51: return "acc_descr_multiline_value";
|
|
1830
|
+
case 52: return 6;
|
|
1831
|
+
case 53: return 18;
|
|
1832
|
+
case 54: return 20;
|
|
1833
|
+
case 55: return 65;
|
|
1834
|
+
case 56: return 5;
|
|
1835
|
+
case 57: return t.yytext = t.yytext.trim(), 71;
|
|
1836
|
+
case 58: return 78;
|
|
1837
|
+
case 59: return 79;
|
|
1838
|
+
case 60: return 80;
|
|
1839
|
+
case 61: return 81;
|
|
1840
|
+
case 62: return 76;
|
|
1841
|
+
case 63: return 77;
|
|
1842
|
+
case 64: return 82;
|
|
1843
|
+
case 65: return 83;
|
|
1844
|
+
case 66: return 84;
|
|
1845
|
+
case 67: return 85;
|
|
1846
|
+
case 68: return 86;
|
|
1847
|
+
case 69: return 86;
|
|
1848
|
+
case 70: return 69;
|
|
1849
|
+
case 71: return 70;
|
|
1850
|
+
case 72: return 5;
|
|
1851
|
+
case 73: return "INVALID";
|
|
1852
|
+
}
|
|
1853
|
+
}, "anonymous"),
|
|
1854
|
+
rules: [
|
|
1855
|
+
/^(?:[\n]+)/i,
|
|
1856
|
+
/^(?:\s+)/i,
|
|
1857
|
+
/^(?:((?!\n)\s)+)/i,
|
|
1858
|
+
/^(?:#[^\n]*)/i,
|
|
1859
|
+
/^(?:%(?!\{)[^\n]*)/i,
|
|
1860
|
+
/^(?:[^\}]%%[^\n]*)/i,
|
|
1861
|
+
/^(?:[0-9]+(?=[ \n]+))/i,
|
|
1862
|
+
/^(?:@\{)/i,
|
|
1863
|
+
/^(?:[^\}]+)/i,
|
|
1864
|
+
/^(?:\})/i,
|
|
1865
|
+
/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,
|
|
1866
|
+
/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,
|
|
1867
|
+
/^(?:box\b)/i,
|
|
1868
|
+
/^(?:participant\b)/i,
|
|
1869
|
+
/^(?:actor\b)/i,
|
|
1870
|
+
/^(?:create\b)/i,
|
|
1871
|
+
/^(?:destroy\b)/i,
|
|
1872
|
+
/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,
|
|
1873
|
+
/^(?:as\b)/i,
|
|
1874
|
+
/^(?:(?:))/i,
|
|
1875
|
+
/^(?:loop\b)/i,
|
|
1876
|
+
/^(?:rect\b)/i,
|
|
1877
|
+
/^(?:opt\b)/i,
|
|
1878
|
+
/^(?:alt\b)/i,
|
|
1879
|
+
/^(?:else\b)/i,
|
|
1880
|
+
/^(?:par\b)/i,
|
|
1881
|
+
/^(?:par_over\b)/i,
|
|
1882
|
+
/^(?:and\b)/i,
|
|
1883
|
+
/^(?:critical\b)/i,
|
|
1884
|
+
/^(?:option\b)/i,
|
|
1885
|
+
/^(?:break\b)/i,
|
|
1886
|
+
/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,
|
|
1887
|
+
/^(?:end\b)/i,
|
|
1888
|
+
/^(?:left of\b)/i,
|
|
1889
|
+
/^(?:right of\b)/i,
|
|
1890
|
+
/^(?:links\b)/i,
|
|
1891
|
+
/^(?:link\b)/i,
|
|
1892
|
+
/^(?:properties\b)/i,
|
|
1893
|
+
/^(?:details\b)/i,
|
|
1894
|
+
/^(?:over\b)/i,
|
|
1895
|
+
/^(?:note\b)/i,
|
|
1896
|
+
/^(?:activate\b)/i,
|
|
1897
|
+
/^(?:deactivate\b)/i,
|
|
1898
|
+
/^(?:title\s[^#\n;]+)/i,
|
|
1899
|
+
/^(?:title:\s[^#\n;]+)/i,
|
|
1900
|
+
/^(?:accTitle\s*:\s*)/i,
|
|
1901
|
+
/^(?:(?!\n||)*[^\n]*)/i,
|
|
1902
|
+
/^(?:accDescr\s*:\s*)/i,
|
|
1903
|
+
/^(?:(?!\n||)*[^\n]*)/i,
|
|
1904
|
+
/^(?:accDescr\s*\{\s*)/i,
|
|
1905
|
+
/^(?:[\}])/i,
|
|
1906
|
+
/^(?:[^\}]*)/i,
|
|
1907
|
+
/^(?:sequenceDiagram\b)/i,
|
|
1908
|
+
/^(?:autonumber\b)/i,
|
|
1909
|
+
/^(?:off\b)/i,
|
|
1910
|
+
/^(?:,)/i,
|
|
1911
|
+
/^(?:;)/i,
|
|
1912
|
+
/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,
|
|
1913
|
+
/^(?:->>)/i,
|
|
1914
|
+
/^(?:<<->>)/i,
|
|
1915
|
+
/^(?:-->>)/i,
|
|
1916
|
+
/^(?:<<-->>)/i,
|
|
1917
|
+
/^(?:->)/i,
|
|
1918
|
+
/^(?:-->)/i,
|
|
1919
|
+
/^(?:-[x])/i,
|
|
1920
|
+
/^(?:--[x])/i,
|
|
1921
|
+
/^(?:-[\)])/i,
|
|
1922
|
+
/^(?:--[\)])/i,
|
|
1923
|
+
/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,
|
|
1924
|
+
/^(?::)/i,
|
|
1925
|
+
/^(?:\+)/i,
|
|
1926
|
+
/^(?:-)/i,
|
|
1927
|
+
/^(?:$)/i,
|
|
1928
|
+
/^(?:.)/i
|
|
1929
|
+
],
|
|
1930
|
+
conditions: {
|
|
1931
|
+
acc_descr_multiline: {
|
|
1932
|
+
rules: [50, 51],
|
|
1933
|
+
inclusive: !1
|
|
1934
|
+
},
|
|
1935
|
+
acc_descr: {
|
|
1936
|
+
rules: [48],
|
|
1937
|
+
inclusive: !1
|
|
1938
|
+
},
|
|
1939
|
+
acc_title: {
|
|
1940
|
+
rules: [46],
|
|
1941
|
+
inclusive: !1
|
|
1942
|
+
},
|
|
1943
|
+
ID: {
|
|
1944
|
+
rules: [
|
|
1945
|
+
2,
|
|
1946
|
+
3,
|
|
1947
|
+
7,
|
|
1948
|
+
10,
|
|
1949
|
+
11,
|
|
1950
|
+
17
|
|
1951
|
+
],
|
|
1952
|
+
inclusive: !1
|
|
1953
|
+
},
|
|
1954
|
+
ALIAS: {
|
|
1955
|
+
rules: [
|
|
1956
|
+
2,
|
|
1957
|
+
3,
|
|
1958
|
+
18,
|
|
1959
|
+
19
|
|
1960
|
+
],
|
|
1961
|
+
inclusive: !1
|
|
1962
|
+
},
|
|
1963
|
+
LINE: {
|
|
1964
|
+
rules: [
|
|
1965
|
+
2,
|
|
1966
|
+
3,
|
|
1967
|
+
31
|
|
1968
|
+
],
|
|
1969
|
+
inclusive: !1
|
|
1970
|
+
},
|
|
1971
|
+
CONFIG: {
|
|
1972
|
+
rules: [8, 9],
|
|
1973
|
+
inclusive: !1
|
|
1974
|
+
},
|
|
1975
|
+
CONFIG_DATA: {
|
|
1976
|
+
rules: [],
|
|
1977
|
+
inclusive: !1
|
|
1978
|
+
},
|
|
1979
|
+
INITIAL: {
|
|
1980
|
+
rules: [
|
|
1981
|
+
0,
|
|
1982
|
+
1,
|
|
1983
|
+
3,
|
|
1984
|
+
4,
|
|
1985
|
+
5,
|
|
1986
|
+
6,
|
|
1987
|
+
12,
|
|
1988
|
+
13,
|
|
1989
|
+
14,
|
|
1990
|
+
15,
|
|
1991
|
+
16,
|
|
1992
|
+
20,
|
|
1993
|
+
21,
|
|
1994
|
+
22,
|
|
1995
|
+
23,
|
|
1996
|
+
24,
|
|
1997
|
+
25,
|
|
1998
|
+
26,
|
|
1999
|
+
27,
|
|
2000
|
+
28,
|
|
2001
|
+
29,
|
|
2002
|
+
30,
|
|
2003
|
+
32,
|
|
2004
|
+
33,
|
|
2005
|
+
34,
|
|
2006
|
+
35,
|
|
2007
|
+
36,
|
|
2008
|
+
37,
|
|
2009
|
+
38,
|
|
2010
|
+
39,
|
|
2011
|
+
40,
|
|
2012
|
+
41,
|
|
2013
|
+
42,
|
|
2014
|
+
43,
|
|
2015
|
+
44,
|
|
2016
|
+
45,
|
|
2017
|
+
47,
|
|
2018
|
+
49,
|
|
2019
|
+
52,
|
|
2020
|
+
53,
|
|
2021
|
+
54,
|
|
2022
|
+
55,
|
|
2023
|
+
56,
|
|
2024
|
+
57,
|
|
2025
|
+
58,
|
|
2026
|
+
59,
|
|
2027
|
+
60,
|
|
2028
|
+
61,
|
|
2029
|
+
62,
|
|
2030
|
+
63,
|
|
2031
|
+
64,
|
|
2032
|
+
65,
|
|
2033
|
+
66,
|
|
2034
|
+
67,
|
|
2035
|
+
68,
|
|
2036
|
+
69,
|
|
2037
|
+
70,
|
|
2038
|
+
71,
|
|
2039
|
+
72,
|
|
2040
|
+
73
|
|
2041
|
+
],
|
|
2042
|
+
inclusive: !0
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
};
|
|
2046
|
+
})();
|
|
2047
|
+
function U() {
|
|
2048
|
+
this.yy = {};
|
|
2049
|
+
}
|
|
2050
|
+
return r(U, "Parser"), U.prototype = H, H.Parser = U, new U();
|
|
2051
|
+
})();
|
|
2052
|
+
P.parser = P;
|
|
2053
|
+
var F = P, I = {
|
|
2054
|
+
SOLID: 0,
|
|
2055
|
+
DOTTED: 1,
|
|
2056
|
+
NOTE: 2,
|
|
2057
|
+
SOLID_CROSS: 3,
|
|
2058
|
+
DOTTED_CROSS: 4,
|
|
2059
|
+
SOLID_OPEN: 5,
|
|
2060
|
+
DOTTED_OPEN: 6,
|
|
2061
|
+
LOOP_START: 10,
|
|
2062
|
+
LOOP_END: 11,
|
|
2063
|
+
ALT_START: 12,
|
|
2064
|
+
ALT_ELSE: 13,
|
|
2065
|
+
ALT_END: 14,
|
|
2066
|
+
OPT_START: 15,
|
|
2067
|
+
OPT_END: 16,
|
|
2068
|
+
ACTIVE_START: 17,
|
|
2069
|
+
ACTIVE_END: 18,
|
|
2070
|
+
PAR_START: 19,
|
|
2071
|
+
PAR_AND: 20,
|
|
2072
|
+
PAR_END: 21,
|
|
2073
|
+
RECT_START: 22,
|
|
2074
|
+
RECT_END: 23,
|
|
2075
|
+
SOLID_POINT: 24,
|
|
2076
|
+
DOTTED_POINT: 25,
|
|
2077
|
+
AUTONUMBER: 26,
|
|
2078
|
+
CRITICAL_START: 27,
|
|
2079
|
+
CRITICAL_OPTION: 28,
|
|
2080
|
+
CRITICAL_END: 29,
|
|
2081
|
+
BREAK_START: 30,
|
|
2082
|
+
BREAK_END: 31,
|
|
2083
|
+
PAR_OVER_START: 32,
|
|
2084
|
+
BIDIRECTIONAL_SOLID: 33,
|
|
2085
|
+
BIDIRECTIONAL_DOTTED: 34
|
|
2086
|
+
}, L = {
|
|
2087
|
+
FILLED: 0,
|
|
2088
|
+
OPEN: 1
|
|
2089
|
+
}, R = {
|
|
2090
|
+
LEFTOF: 0,
|
|
2091
|
+
RIGHTOF: 1,
|
|
2092
|
+
OVER: 2
|
|
2093
|
+
}, z = {
|
|
2094
|
+
ACTOR: "actor",
|
|
2095
|
+
BOUNDARY: "boundary",
|
|
2096
|
+
COLLECTIONS: "collections",
|
|
2097
|
+
CONTROL: "control",
|
|
2098
|
+
DATABASE: "database",
|
|
2099
|
+
ENTITY: "entity",
|
|
2100
|
+
PARTICIPANT: "participant",
|
|
2101
|
+
QUEUE: "queue"
|
|
2102
|
+
}, ee = class {
|
|
2103
|
+
constructor() {
|
|
2104
|
+
this.state = new M(() => ({
|
|
2105
|
+
prevActor: void 0,
|
|
2106
|
+
actors: /* @__PURE__ */ new Map(),
|
|
2107
|
+
createdActors: /* @__PURE__ */ new Map(),
|
|
2108
|
+
destroyedActors: /* @__PURE__ */ new Map(),
|
|
2109
|
+
boxes: [],
|
|
2110
|
+
messages: [],
|
|
2111
|
+
notes: [],
|
|
2112
|
+
sequenceNumbersEnabled: !1,
|
|
2113
|
+
wrapEnabled: void 0,
|
|
2114
|
+
currentBox: void 0,
|
|
2115
|
+
lastCreated: void 0,
|
|
2116
|
+
lastDestroyed: void 0
|
|
2117
|
+
})), this.setAccTitle = a, this.setAccDescription = S, this.setDiagramTitle = f, this.getAccTitle = b, this.getAccDescription = p, this.getDiagramTitle = o, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(h().wrap), this.LINETYPE = I, this.ARROWTYPE = L, this.PLACEMENT = R;
|
|
2118
|
+
}
|
|
2119
|
+
static {
|
|
2120
|
+
r(this, "SequenceDB");
|
|
2121
|
+
}
|
|
2122
|
+
addBox(e) {
|
|
2123
|
+
this.state.records.boxes.push({
|
|
2124
|
+
name: e.text,
|
|
2125
|
+
wrap: e.wrap ?? this.autoWrap(),
|
|
2126
|
+
fill: e.color,
|
|
2127
|
+
actorKeys: []
|
|
2128
|
+
}), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
|
|
2129
|
+
}
|
|
2130
|
+
addActor(n, r, i, a, o) {
|
|
2131
|
+
let s = this.state.records.currentBox, c;
|
|
2132
|
+
if (o !== void 0) {
|
|
2133
|
+
let n;
|
|
2134
|
+
n = o.includes("\n") ? o + "\n" : "{\n" + o + "\n}", c = e(n, { schema: t });
|
|
2135
|
+
}
|
|
2136
|
+
a = c?.type ?? a;
|
|
2137
|
+
let l = this.state.records.actors.get(n);
|
|
2138
|
+
if (l) {
|
|
2139
|
+
if (this.state.records.currentBox && l.box && this.state.records.currentBox !== l.box) throw Error(`A same participant should only be defined in one Box: ${l.name} can't be in '${l.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);
|
|
2140
|
+
if (s = l.box ? l.box : this.state.records.currentBox, l.box = s, l && r === l.name && i == null) return;
|
|
2141
|
+
}
|
|
2142
|
+
if (i?.text ?? (i = {
|
|
2143
|
+
text: r,
|
|
2144
|
+
type: a
|
|
2145
|
+
}), (a == null || i.text == null) && (i = {
|
|
2146
|
+
text: r,
|
|
2147
|
+
type: a
|
|
2148
|
+
}), this.state.records.actors.set(n, {
|
|
2149
|
+
box: s,
|
|
2150
|
+
name: r,
|
|
2151
|
+
description: i.text,
|
|
2152
|
+
wrap: i.wrap ?? this.autoWrap(),
|
|
2153
|
+
prevActor: this.state.records.prevActor,
|
|
2154
|
+
links: {},
|
|
2155
|
+
properties: {},
|
|
2156
|
+
actorCnt: null,
|
|
2157
|
+
rectData: null,
|
|
2158
|
+
type: a ?? "participant"
|
|
2159
|
+
}), this.state.records.prevActor) {
|
|
2160
|
+
let e = this.state.records.actors.get(this.state.records.prevActor);
|
|
2161
|
+
e && (e.nextActor = n);
|
|
2162
|
+
}
|
|
2163
|
+
this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(n), this.state.records.prevActor = n;
|
|
2164
|
+
}
|
|
2165
|
+
activationCount(e) {
|
|
2166
|
+
let t, n = 0;
|
|
2167
|
+
if (!e) return 0;
|
|
2168
|
+
for (t = 0; t < this.state.records.messages.length; t++) this.state.records.messages[t].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[t].from === e && n++, this.state.records.messages[t].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[t].from === e && n--;
|
|
2169
|
+
return n;
|
|
2170
|
+
}
|
|
2171
|
+
addMessage(e, t, n, r) {
|
|
2172
|
+
this.state.records.messages.push({
|
|
2173
|
+
id: this.state.records.messages.length.toString(),
|
|
2174
|
+
from: e,
|
|
2175
|
+
to: t,
|
|
2176
|
+
message: n.text,
|
|
2177
|
+
wrap: n.wrap ?? this.autoWrap(),
|
|
2178
|
+
answer: r
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
addSignal(e, t, n, r, i = !1) {
|
|
2182
|
+
if (r === this.LINETYPE.ACTIVE_END && this.activationCount(e ?? "") < 1) {
|
|
2183
|
+
let t = /* @__PURE__ */ Error("Trying to inactivate an inactive participant (" + e + ")");
|
|
2184
|
+
throw t.hash = {
|
|
2185
|
+
text: "->>-",
|
|
2186
|
+
token: "->>-",
|
|
2187
|
+
line: "1",
|
|
2188
|
+
loc: {
|
|
2189
|
+
first_line: 1,
|
|
2190
|
+
last_line: 1,
|
|
2191
|
+
first_column: 1,
|
|
2192
|
+
last_column: 1
|
|
2193
|
+
},
|
|
2194
|
+
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
2195
|
+
}, t;
|
|
2196
|
+
}
|
|
2197
|
+
return this.state.records.messages.push({
|
|
2198
|
+
id: this.state.records.messages.length.toString(),
|
|
2199
|
+
from: e,
|
|
2200
|
+
to: t,
|
|
2201
|
+
message: n?.text ?? "",
|
|
2202
|
+
wrap: n?.wrap ?? this.autoWrap(),
|
|
2203
|
+
type: r,
|
|
2204
|
+
activate: i
|
|
2205
|
+
}), !0;
|
|
2206
|
+
}
|
|
2207
|
+
hasAtLeastOneBox() {
|
|
2208
|
+
return this.state.records.boxes.length > 0;
|
|
2209
|
+
}
|
|
2210
|
+
hasAtLeastOneBoxWithTitle() {
|
|
2211
|
+
return this.state.records.boxes.some((e) => e.name);
|
|
2212
|
+
}
|
|
2213
|
+
getMessages() {
|
|
2214
|
+
return this.state.records.messages;
|
|
2215
|
+
}
|
|
2216
|
+
getBoxes() {
|
|
2217
|
+
return this.state.records.boxes;
|
|
2218
|
+
}
|
|
2219
|
+
getActors() {
|
|
2220
|
+
return this.state.records.actors;
|
|
2221
|
+
}
|
|
2222
|
+
getCreatedActors() {
|
|
2223
|
+
return this.state.records.createdActors;
|
|
2224
|
+
}
|
|
2225
|
+
getDestroyedActors() {
|
|
2226
|
+
return this.state.records.destroyedActors;
|
|
2227
|
+
}
|
|
2228
|
+
getActor(e) {
|
|
2229
|
+
return this.state.records.actors.get(e);
|
|
2230
|
+
}
|
|
2231
|
+
getActorKeys() {
|
|
2232
|
+
return [...this.state.records.actors.keys()];
|
|
2233
|
+
}
|
|
2234
|
+
enableSequenceNumbers() {
|
|
2235
|
+
this.state.records.sequenceNumbersEnabled = !0;
|
|
2236
|
+
}
|
|
2237
|
+
disableSequenceNumbers() {
|
|
2238
|
+
this.state.records.sequenceNumbersEnabled = !1;
|
|
2239
|
+
}
|
|
2240
|
+
showSequenceNumbers() {
|
|
2241
|
+
return this.state.records.sequenceNumbersEnabled;
|
|
2242
|
+
}
|
|
2243
|
+
setWrap(e) {
|
|
2244
|
+
this.state.records.wrapEnabled = e;
|
|
2245
|
+
}
|
|
2246
|
+
extractWrap(e) {
|
|
2247
|
+
if (e === void 0) return {};
|
|
2248
|
+
e = e.trim();
|
|
2249
|
+
let t = /^:?wrap:/.exec(e) === null ? /^:?nowrap:/.exec(e) === null ? void 0 : !1 : !0;
|
|
2250
|
+
return {
|
|
2251
|
+
cleanedText: (t === void 0 ? e : e.replace(/^:?(?:no)?wrap:/, "")).trim(),
|
|
2252
|
+
wrap: t
|
|
2253
|
+
};
|
|
2254
|
+
}
|
|
2255
|
+
autoWrap() {
|
|
2256
|
+
return this.state.records.wrapEnabled === void 0 ? h().sequence?.wrap ?? !1 : this.state.records.wrapEnabled;
|
|
2257
|
+
}
|
|
2258
|
+
clear() {
|
|
2259
|
+
this.state.reset(), m();
|
|
2260
|
+
}
|
|
2261
|
+
parseMessage(e) {
|
|
2262
|
+
let t = e.trim(), { wrap: r, cleanedText: i } = this.extractWrap(t), a = {
|
|
2263
|
+
text: i,
|
|
2264
|
+
wrap: r
|
|
2265
|
+
};
|
|
2266
|
+
return n.debug(`parseMessage: ${JSON.stringify(a)}`), a;
|
|
2267
|
+
}
|
|
2268
|
+
parseBoxData(e) {
|
|
2269
|
+
let t = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e), n = t?.[1] ? t[1].trim() : "transparent", r = t?.[2] ? t[2].trim() : void 0;
|
|
2270
|
+
if (window?.CSS) window.CSS.supports("color", n) || (n = "transparent", r = e.trim());
|
|
2271
|
+
else {
|
|
2272
|
+
let t = new Option().style;
|
|
2273
|
+
t.color = n, t.color !== n && (n = "transparent", r = e.trim());
|
|
2274
|
+
}
|
|
2275
|
+
let { wrap: i, cleanedText: a } = this.extractWrap(r);
|
|
2276
|
+
return {
|
|
2277
|
+
text: a ? l(a, h()) : void 0,
|
|
2278
|
+
color: n,
|
|
2279
|
+
wrap: i
|
|
2280
|
+
};
|
|
2281
|
+
}
|
|
2282
|
+
addNote(e, t, n) {
|
|
2283
|
+
let r = {
|
|
2284
|
+
actor: e,
|
|
2285
|
+
placement: t,
|
|
2286
|
+
message: n.text,
|
|
2287
|
+
wrap: n.wrap ?? this.autoWrap()
|
|
2288
|
+
}, i = [].concat(e, e);
|
|
2289
|
+
this.state.records.notes.push(r), this.state.records.messages.push({
|
|
2290
|
+
id: this.state.records.messages.length.toString(),
|
|
2291
|
+
from: i[0],
|
|
2292
|
+
to: i[1],
|
|
2293
|
+
message: n.text,
|
|
2294
|
+
wrap: n.wrap ?? this.autoWrap(),
|
|
2295
|
+
type: this.LINETYPE.NOTE,
|
|
2296
|
+
placement: t
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
addLinks(e, t) {
|
|
2300
|
+
let r = this.getActor(e);
|
|
2301
|
+
try {
|
|
2302
|
+
let e = l(t.text, h());
|
|
2303
|
+
e = e.replace(/=/g, "="), e = e.replace(/&/g, "&");
|
|
2304
|
+
let n = JSON.parse(e);
|
|
2305
|
+
this.insertLinks(r, n);
|
|
2306
|
+
} catch (e) {
|
|
2307
|
+
n.error("error while parsing actor link text", e);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
addALink(e, t) {
|
|
2311
|
+
let r = this.getActor(e);
|
|
2312
|
+
try {
|
|
2313
|
+
let e = {}, n = l(t.text, h()), i = n.indexOf("@");
|
|
2314
|
+
n = n.replace(/=/g, "="), n = n.replace(/&/g, "&");
|
|
2315
|
+
let a = n.slice(0, i - 1).trim();
|
|
2316
|
+
e[a] = n.slice(i + 1).trim(), this.insertLinks(r, e);
|
|
2317
|
+
} catch (e) {
|
|
2318
|
+
n.error("error while parsing actor link text", e);
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
insertLinks(e, t) {
|
|
2322
|
+
if (e.links == null) e.links = t;
|
|
2323
|
+
else for (let n in t) e.links[n] = t[n];
|
|
2324
|
+
}
|
|
2325
|
+
addProperties(e, t) {
|
|
2326
|
+
let r = this.getActor(e);
|
|
2327
|
+
try {
|
|
2328
|
+
let e = l(t.text, h()), n = JSON.parse(e);
|
|
2329
|
+
this.insertProperties(r, n);
|
|
2330
|
+
} catch (e) {
|
|
2331
|
+
n.error("error while parsing actor properties text", e);
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
insertProperties(e, t) {
|
|
2335
|
+
if (e.properties == null) e.properties = t;
|
|
2336
|
+
else for (let n in t) e.properties[n] = t[n];
|
|
2337
|
+
}
|
|
2338
|
+
boxEnd() {
|
|
2339
|
+
this.state.records.currentBox = void 0;
|
|
2340
|
+
}
|
|
2341
|
+
addDetails(e, t) {
|
|
2342
|
+
let r = this.getActor(e), i = document.getElementById(t.text);
|
|
2343
|
+
try {
|
|
2344
|
+
let e = i.innerHTML, t = JSON.parse(e);
|
|
2345
|
+
t.properties && this.insertProperties(r, t.properties), t.links && this.insertLinks(r, t.links);
|
|
2346
|
+
} catch (e) {
|
|
2347
|
+
n.error("error while parsing actor details text", e);
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
getActorProperty(e, t) {
|
|
2351
|
+
if (e?.properties !== void 0) return e.properties[t];
|
|
2352
|
+
}
|
|
2353
|
+
apply(e) {
|
|
2354
|
+
if (Array.isArray(e)) e.forEach((e) => {
|
|
2355
|
+
this.apply(e);
|
|
2356
|
+
});
|
|
2357
|
+
else switch (e.type) {
|
|
2358
|
+
case "sequenceIndex":
|
|
2359
|
+
this.state.records.messages.push({
|
|
2360
|
+
id: this.state.records.messages.length.toString(),
|
|
2361
|
+
from: void 0,
|
|
2362
|
+
to: void 0,
|
|
2363
|
+
message: {
|
|
2364
|
+
start: e.sequenceIndex,
|
|
2365
|
+
step: e.sequenceIndexStep,
|
|
2366
|
+
visible: e.sequenceVisible
|
|
2367
|
+
},
|
|
2368
|
+
wrap: !1,
|
|
2369
|
+
type: e.signalType
|
|
2370
|
+
});
|
|
2371
|
+
break;
|
|
2372
|
+
case "addParticipant":
|
|
2373
|
+
this.addActor(e.actor, e.actor, e.description, e.draw, e.config);
|
|
2374
|
+
break;
|
|
2375
|
+
case "createParticipant":
|
|
2376
|
+
if (this.state.records.actors.has(e.actor)) throw Error("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");
|
|
2377
|
+
this.state.records.lastCreated = e.actor, this.addActor(e.actor, e.actor, e.description, e.draw, e.config), this.state.records.createdActors.set(e.actor, this.state.records.messages.length);
|
|
2378
|
+
break;
|
|
2379
|
+
case "destroyParticipant":
|
|
2380
|
+
this.state.records.lastDestroyed = e.actor, this.state.records.destroyedActors.set(e.actor, this.state.records.messages.length);
|
|
2381
|
+
break;
|
|
2382
|
+
case "activeStart":
|
|
2383
|
+
this.addSignal(e.actor, void 0, void 0, e.signalType);
|
|
2384
|
+
break;
|
|
2385
|
+
case "activeEnd":
|
|
2386
|
+
this.addSignal(e.actor, void 0, void 0, e.signalType);
|
|
2387
|
+
break;
|
|
2388
|
+
case "addNote":
|
|
2389
|
+
this.addNote(e.actor, e.placement, e.text);
|
|
2390
|
+
break;
|
|
2391
|
+
case "addLinks":
|
|
2392
|
+
this.addLinks(e.actor, e.text);
|
|
2393
|
+
break;
|
|
2394
|
+
case "addALink":
|
|
2395
|
+
this.addALink(e.actor, e.text);
|
|
2396
|
+
break;
|
|
2397
|
+
case "addProperties":
|
|
2398
|
+
this.addProperties(e.actor, e.text);
|
|
2399
|
+
break;
|
|
2400
|
+
case "addDetails":
|
|
2401
|
+
this.addDetails(e.actor, e.text);
|
|
2402
|
+
break;
|
|
2403
|
+
case "addMessage":
|
|
2404
|
+
if (this.state.records.lastCreated) {
|
|
2405
|
+
if (e.to !== this.state.records.lastCreated) throw Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
|
|
2406
|
+
this.state.records.lastCreated = void 0;
|
|
2407
|
+
} else if (this.state.records.lastDestroyed) {
|
|
2408
|
+
if (e.to !== this.state.records.lastDestroyed && e.from !== this.state.records.lastDestroyed) throw Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
|
|
2409
|
+
this.state.records.lastDestroyed = void 0;
|
|
2410
|
+
}
|
|
2411
|
+
this.addSignal(e.from, e.to, e.msg, e.signalType, e.activate);
|
|
2412
|
+
break;
|
|
2413
|
+
case "boxStart":
|
|
2414
|
+
this.addBox(e.boxData);
|
|
2415
|
+
break;
|
|
2416
|
+
case "boxEnd":
|
|
2417
|
+
this.boxEnd();
|
|
2418
|
+
break;
|
|
2419
|
+
case "loopStart":
|
|
2420
|
+
this.addSignal(void 0, void 0, e.loopText, e.signalType);
|
|
2421
|
+
break;
|
|
2422
|
+
case "loopEnd":
|
|
2423
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2424
|
+
break;
|
|
2425
|
+
case "rectStart":
|
|
2426
|
+
this.addSignal(void 0, void 0, e.color, e.signalType);
|
|
2427
|
+
break;
|
|
2428
|
+
case "rectEnd":
|
|
2429
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2430
|
+
break;
|
|
2431
|
+
case "optStart":
|
|
2432
|
+
this.addSignal(void 0, void 0, e.optText, e.signalType);
|
|
2433
|
+
break;
|
|
2434
|
+
case "optEnd":
|
|
2435
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2436
|
+
break;
|
|
2437
|
+
case "altStart":
|
|
2438
|
+
this.addSignal(void 0, void 0, e.altText, e.signalType);
|
|
2439
|
+
break;
|
|
2440
|
+
case "else":
|
|
2441
|
+
this.addSignal(void 0, void 0, e.altText, e.signalType);
|
|
2442
|
+
break;
|
|
2443
|
+
case "altEnd":
|
|
2444
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2445
|
+
break;
|
|
2446
|
+
case "setAccTitle":
|
|
2447
|
+
a(e.text);
|
|
2448
|
+
break;
|
|
2449
|
+
case "parStart":
|
|
2450
|
+
this.addSignal(void 0, void 0, e.parText, e.signalType);
|
|
2451
|
+
break;
|
|
2452
|
+
case "and":
|
|
2453
|
+
this.addSignal(void 0, void 0, e.parText, e.signalType);
|
|
2454
|
+
break;
|
|
2455
|
+
case "parEnd":
|
|
2456
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2457
|
+
break;
|
|
2458
|
+
case "criticalStart":
|
|
2459
|
+
this.addSignal(void 0, void 0, e.criticalText, e.signalType);
|
|
2460
|
+
break;
|
|
2461
|
+
case "option":
|
|
2462
|
+
this.addSignal(void 0, void 0, e.optionText, e.signalType);
|
|
2463
|
+
break;
|
|
2464
|
+
case "criticalEnd":
|
|
2465
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2466
|
+
break;
|
|
2467
|
+
case "breakStart":
|
|
2468
|
+
this.addSignal(void 0, void 0, e.breakText, e.signalType);
|
|
2469
|
+
break;
|
|
2470
|
+
case "breakEnd":
|
|
2471
|
+
this.addSignal(void 0, void 0, void 0, e.signalType);
|
|
2472
|
+
break;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
getConfig() {
|
|
2476
|
+
return h().sequence;
|
|
2477
|
+
}
|
|
2478
|
+
}, te = /* @__PURE__ */ r((e) => `.actor {
|
|
2479
|
+
stroke: ${e.actorBorder};
|
|
2480
|
+
fill: ${e.actorBkg};
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
text.actor > tspan {
|
|
2484
|
+
fill: ${e.actorTextColor};
|
|
2485
|
+
stroke: none;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
.actor-line {
|
|
2489
|
+
stroke: ${e.actorLineColor};
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
.innerArc {
|
|
2493
|
+
stroke-width: 1.5;
|
|
2494
|
+
stroke-dasharray: none;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
.messageLine0 {
|
|
2498
|
+
stroke-width: 1.5;
|
|
2499
|
+
stroke-dasharray: none;
|
|
2500
|
+
stroke: ${e.signalColor};
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.messageLine1 {
|
|
2504
|
+
stroke-width: 1.5;
|
|
2505
|
+
stroke-dasharray: 2, 2;
|
|
2506
|
+
stroke: ${e.signalColor};
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
#arrowhead path {
|
|
2510
|
+
fill: ${e.signalColor};
|
|
2511
|
+
stroke: ${e.signalColor};
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
.sequenceNumber {
|
|
2515
|
+
fill: ${e.sequenceNumberColor};
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
#sequencenumber {
|
|
2519
|
+
fill: ${e.signalColor};
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
#crosshead path {
|
|
2523
|
+
fill: ${e.signalColor};
|
|
2524
|
+
stroke: ${e.signalColor};
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
.messageText {
|
|
2528
|
+
fill: ${e.signalTextColor};
|
|
2529
|
+
stroke: none;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
.labelBox {
|
|
2533
|
+
stroke: ${e.labelBoxBorderColor};
|
|
2534
|
+
fill: ${e.labelBoxBkgColor};
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
.labelText, .labelText > tspan {
|
|
2538
|
+
fill: ${e.labelTextColor};
|
|
2539
|
+
stroke: none;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
.loopText, .loopText > tspan {
|
|
2543
|
+
fill: ${e.loopTextColor};
|
|
2544
|
+
stroke: none;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
.loopLine {
|
|
2548
|
+
stroke-width: 2px;
|
|
2549
|
+
stroke-dasharray: 2, 2;
|
|
2550
|
+
stroke: ${e.labelBoxBorderColor};
|
|
2551
|
+
fill: ${e.labelBoxBorderColor};
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
.note {
|
|
2555
|
+
//stroke: #decc93;
|
|
2556
|
+
stroke: ${e.noteBorderColor};
|
|
2557
|
+
fill: ${e.noteBkgColor};
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
.noteText, .noteText > tspan {
|
|
2561
|
+
fill: ${e.noteTextColor};
|
|
2562
|
+
stroke: none;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
.activation0 {
|
|
2566
|
+
fill: ${e.activationBkgColor};
|
|
2567
|
+
stroke: ${e.activationBorderColor};
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
.activation1 {
|
|
2571
|
+
fill: ${e.activationBkgColor};
|
|
2572
|
+
stroke: ${e.activationBorderColor};
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
.activation2 {
|
|
2576
|
+
fill: ${e.activationBkgColor};
|
|
2577
|
+
stroke: ${e.activationBorderColor};
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
.actorPopupMenu {
|
|
2581
|
+
position: absolute;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
.actorPopupMenuPanel {
|
|
2585
|
+
position: absolute;
|
|
2586
|
+
fill: ${e.actorBkg};
|
|
2587
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
2588
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
2589
|
+
}
|
|
2590
|
+
.actor-man line {
|
|
2591
|
+
stroke: ${e.actorBorder};
|
|
2592
|
+
fill: ${e.actorBkg};
|
|
2593
|
+
}
|
|
2594
|
+
.actor-man circle, line {
|
|
2595
|
+
stroke: ${e.actorBorder};
|
|
2596
|
+
fill: ${e.actorBkg};
|
|
2597
|
+
stroke-width: 2px;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
`, "getStyles"), B = 36, V = "actor-top", H = "actor-bottom", U = "actor-box", W = "actor-man", ne = /* @__PURE__ */ r(function(e, t) {
|
|
2601
|
+
return E(e, t);
|
|
2602
|
+
}, "drawRect"), re = /* @__PURE__ */ r(function(e, t, n, r, i) {
|
|
2603
|
+
if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0) return {
|
|
2604
|
+
height: 0,
|
|
2605
|
+
width: 0
|
|
2606
|
+
};
|
|
2607
|
+
let a = t.links, o = t.actorCnt, s = t.rectData;
|
|
2608
|
+
var c = "none";
|
|
2609
|
+
i && (c = "block !important");
|
|
2610
|
+
let l = e.append("g");
|
|
2611
|
+
l.attr("id", "actor" + o + "_popup"), l.attr("class", "actorPopupMenu"), l.attr("display", c);
|
|
2612
|
+
var u = "";
|
|
2613
|
+
s.class !== void 0 && (u = " " + s.class);
|
|
2614
|
+
let d = s.width > n ? s.width : n, f = l.append("rect");
|
|
2615
|
+
if (f.attr("class", "actorPopupMenuPanel" + u), f.attr("x", s.x), f.attr("y", s.height), f.attr("fill", s.fill), f.attr("stroke", s.stroke), f.attr("width", d), f.attr("height", s.height), f.attr("rx", s.rx), f.attr("ry", s.ry), a != null) {
|
|
2616
|
+
var p = 20;
|
|
2617
|
+
for (let e in a) {
|
|
2618
|
+
var m = l.append("a"), h = (0, N.sanitizeUrl)(a[e]);
|
|
2619
|
+
m.attr("xlink:href", h), m.attr("target", "_blank"), je(r)(e, m, s.x + 10, s.height + p, d, 20, { class: "actor" }, r), p += 30;
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
return f.attr("height", p), {
|
|
2623
|
+
height: s.height + p,
|
|
2624
|
+
width: d
|
|
2625
|
+
};
|
|
2626
|
+
}, "drawPopup"), ie = /* @__PURE__ */ r(function(e) {
|
|
2627
|
+
return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
2628
|
+
}, "popupMenuToggle"), ae = /* @__PURE__ */ r(async function(e, t, n = null) {
|
|
2629
|
+
let r = e.append("foreignObject"), i = await u(t.text, x()), a = r.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
|
|
2630
|
+
if (r.attr("height", Math.round(a.height)).attr("width", Math.round(a.width)), t.class === "noteText") {
|
|
2631
|
+
let n = e.node().firstChild;
|
|
2632
|
+
n.setAttribute("height", a.height + 2 * t.textMargin);
|
|
2633
|
+
let i = n.getBBox();
|
|
2634
|
+
r.attr("x", Math.round(i.x + i.width / 2 - a.width / 2)).attr("y", Math.round(i.y + i.height / 2 - a.height / 2));
|
|
2635
|
+
} else if (n) {
|
|
2636
|
+
let { startx: e, stopx: i, starty: o } = n;
|
|
2637
|
+
if (e > i) {
|
|
2638
|
+
let t = e;
|
|
2639
|
+
e = i, i = t;
|
|
2640
|
+
}
|
|
2641
|
+
r.attr("x", Math.round(e + Math.abs(e - i) / 2 - a.width / 2)), t.class === "loopText" ? r.attr("y", Math.round(o)) : r.attr("y", Math.round(o - a.height));
|
|
2642
|
+
}
|
|
2643
|
+
return [r];
|
|
2644
|
+
}, "drawKatex"), G = /* @__PURE__ */ r(function(e, t) {
|
|
2645
|
+
let n = 0, i = 0, a = t.text.split(y.lineBreakRegex), [o, s] = C(t.fontSize), c = [], l = 0, u = /* @__PURE__ */ r(() => t.y, "yfunc");
|
|
2646
|
+
if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0) switch (t.valign) {
|
|
2647
|
+
case "top":
|
|
2648
|
+
case "start":
|
|
2649
|
+
u = /* @__PURE__ */ r(() => Math.round(t.y + t.textMargin), "yfunc");
|
|
2650
|
+
break;
|
|
2651
|
+
case "middle":
|
|
2652
|
+
case "center":
|
|
2653
|
+
u = /* @__PURE__ */ r(() => Math.round(t.y + (n + i + t.textMargin) / 2), "yfunc");
|
|
2654
|
+
break;
|
|
2655
|
+
case "bottom":
|
|
2656
|
+
case "end":
|
|
2657
|
+
u = /* @__PURE__ */ r(() => Math.round(t.y + (n + i + 2 * t.textMargin) - t.textMargin), "yfunc");
|
|
2658
|
+
break;
|
|
2659
|
+
}
|
|
2660
|
+
if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0) switch (t.anchor) {
|
|
2661
|
+
case "left":
|
|
2662
|
+
case "start":
|
|
2663
|
+
t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
|
|
2664
|
+
break;
|
|
2665
|
+
case "middle":
|
|
2666
|
+
case "center":
|
|
2667
|
+
t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
|
|
2668
|
+
break;
|
|
2669
|
+
case "right":
|
|
2670
|
+
case "end":
|
|
2671
|
+
t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
|
|
2672
|
+
break;
|
|
2673
|
+
}
|
|
2674
|
+
for (let [r, d] of a.entries()) {
|
|
2675
|
+
t.textMargin !== void 0 && t.textMargin === 0 && o !== void 0 && (l = r * o);
|
|
2676
|
+
let a = e.append("text");
|
|
2677
|
+
a.attr("x", t.x), a.attr("y", u()), t.anchor !== void 0 && a.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && a.style("font-family", t.fontFamily), s !== void 0 && a.style("font-size", s), t.fontWeight !== void 0 && a.style("font-weight", t.fontWeight), t.fill !== void 0 && a.attr("fill", t.fill), t.class !== void 0 && a.attr("class", t.class), t.dy === void 0 ? l !== 0 && a.attr("dy", l) : a.attr("dy", t.dy);
|
|
2678
|
+
let f = d || "";
|
|
2679
|
+
if (t.tspan) {
|
|
2680
|
+
let e = a.append("tspan");
|
|
2681
|
+
e.attr("x", t.x), t.fill !== void 0 && e.attr("fill", t.fill), e.text(f);
|
|
2682
|
+
} else a.text(f);
|
|
2683
|
+
t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (i += (a._groups || a)[0][0].getBBox().height, n = i), c.push(a);
|
|
2684
|
+
}
|
|
2685
|
+
return c;
|
|
2686
|
+
}, "drawText"), oe = /* @__PURE__ */ r(function(e, t) {
|
|
2687
|
+
function n(e, t, n, r, i) {
|
|
2688
|
+
return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
|
|
2689
|
+
}
|
|
2690
|
+
r(n, "genPoints");
|
|
2691
|
+
let i = e.append("polygon");
|
|
2692
|
+
return i.attr("points", n(t.x, t.y, t.width, t.height, 7)), i.attr("class", "labelBox"), t.y += t.height / 2, G(e, t), i;
|
|
2693
|
+
}, "drawLabel"), K = -1, se = /* @__PURE__ */ r((e, t, n, r) => {
|
|
2694
|
+
e.select && n.forEach((n) => {
|
|
2695
|
+
let i = t.get(n), a = e.select("#actor" + i.actorCnt);
|
|
2696
|
+
!r.mirrorActors && i.stopy ? a.attr("y2", i.stopy + i.height / 2) : r.mirrorActors && a.attr("y2", i.stopy);
|
|
2697
|
+
});
|
|
2698
|
+
}, "fixLifeLineHeights"), ce = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2699
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + t.height, s = e.append("g").lower();
|
|
2700
|
+
var c = s;
|
|
2701
|
+
r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && c.attr("onclick", ie(`actor${K}_popup`)).attr("cursor", "pointer"), c.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), c = s.append("g"), t.actorCnt = K, t.links != null && c.attr("id", "root-" + K));
|
|
2702
|
+
let l = O();
|
|
2703
|
+
var u = "actor";
|
|
2704
|
+
t.properties?.class ? u = t.properties.class : l.fill = "#eaeaea", r ? u += ` ${H}` : u += ` ${V}`, l.x = t.x, l.y = i, l.width = t.width, l.height = t.height, l.class = u, l.rx = 3, l.ry = 3, l.name = t.name;
|
|
2705
|
+
let f = ne(c, l);
|
|
2706
|
+
if (t.rectData = l, t.properties?.icon) {
|
|
2707
|
+
let e = t.properties.icon.trim();
|
|
2708
|
+
e.charAt(0) === "@" ? D(c, l.x + l.width - 20, l.y + 10, e.substr(1)) : k(c, l.x + l.width - 20, l.y + 10, e);
|
|
2709
|
+
}
|
|
2710
|
+
q(n, d(t.description))(t.description, c, l.x, l.y, l.width, l.height, { class: `actor ${U}` }, n);
|
|
2711
|
+
let p = t.height;
|
|
2712
|
+
if (f.node) {
|
|
2713
|
+
let e = f.node().getBBox();
|
|
2714
|
+
t.height = e.height, p = e.height;
|
|
2715
|
+
}
|
|
2716
|
+
return p;
|
|
2717
|
+
}, "drawActorTypeParticipant"), le = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2718
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + t.height, s = e.append("g").lower();
|
|
2719
|
+
var c = s;
|
|
2720
|
+
r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && c.attr("onclick", ie(`actor${K}_popup`)).attr("cursor", "pointer"), c.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), c = s.append("g"), t.actorCnt = K, t.links != null && c.attr("id", "root-" + K));
|
|
2721
|
+
let l = O();
|
|
2722
|
+
var u = "actor";
|
|
2723
|
+
t.properties?.class ? u = t.properties.class : l.fill = "#eaeaea", r ? u += ` ${H}` : u += ` ${V}`, l.x = t.x, l.y = i, l.width = t.width, l.height = t.height, l.class = u, l.name = t.name;
|
|
2724
|
+
let f = {
|
|
2725
|
+
...l,
|
|
2726
|
+
x: l.x + -6,
|
|
2727
|
+
y: l.y + 6,
|
|
2728
|
+
class: "actor"
|
|
2729
|
+
}, p = ne(c, l);
|
|
2730
|
+
if (ne(c, f), t.rectData = l, t.properties?.icon) {
|
|
2731
|
+
let e = t.properties.icon.trim();
|
|
2732
|
+
e.charAt(0) === "@" ? D(c, l.x + l.width - 20, l.y + 10, e.substr(1)) : k(c, l.x + l.width - 20, l.y + 10, e);
|
|
2733
|
+
}
|
|
2734
|
+
q(n, d(t.description))(t.description, c, l.x - 6, l.y + 6, l.width, l.height, { class: `actor ${U}` }, n);
|
|
2735
|
+
let m = t.height;
|
|
2736
|
+
if (p.node) {
|
|
2737
|
+
let e = p.node().getBBox();
|
|
2738
|
+
t.height = e.height, m = e.height;
|
|
2739
|
+
}
|
|
2740
|
+
return m;
|
|
2741
|
+
}, "drawActorTypeCollections"), ue = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2742
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + t.height, s = e.append("g").lower(), c = s;
|
|
2743
|
+
r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && c.attr("onclick", ie(`actor${K}_popup`)).attr("cursor", "pointer"), c.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), c = s.append("g"), t.actorCnt = K, t.links != null && c.attr("id", "root-" + K));
|
|
2744
|
+
let l = O(), u = "actor";
|
|
2745
|
+
t.properties?.class ? u = t.properties.class : l.fill = "#eaeaea", r ? u += ` ${H}` : u += ` ${V}`, l.x = t.x, l.y = i, l.width = t.width, l.height = t.height, l.class = u, l.name = t.name;
|
|
2746
|
+
let f = l.height / 2, p = f / (2.5 + l.height / 50), m = c.append("g"), h = c.append("g");
|
|
2747
|
+
if (m.append("path").attr("d", `M ${l.x},${l.y + f}
|
|
2748
|
+
a ${p},${f} 0 0 0 0,${l.height}
|
|
2749
|
+
h ${l.width - 2 * p}
|
|
2750
|
+
a ${p},${f} 0 0 0 0,-${l.height}
|
|
2751
|
+
Z
|
|
2752
|
+
`).attr("class", u), h.append("path").attr("d", `M ${l.x},${l.y + f}
|
|
2753
|
+
a ${p},${f} 0 0 0 0,${l.height}`).attr("stroke", "#666").attr("stroke-width", "1px").attr("class", u), m.attr("transform", `translate(${p}, ${-(l.height / 2)})`), h.attr("transform", `translate(${l.width - p}, ${-l.height / 2})`), t.rectData = l, t.properties?.icon) {
|
|
2754
|
+
let e = t.properties.icon.trim(), n = l.x + l.width - 20, r = l.y + 10;
|
|
2755
|
+
e.charAt(0) === "@" ? D(c, n, r, e.substr(1)) : k(c, n, r, e);
|
|
2756
|
+
}
|
|
2757
|
+
q(n, d(t.description))(t.description, c, l.x, l.y, l.width, l.height, { class: `actor ${U}` }, n);
|
|
2758
|
+
let g = t.height, _ = m.select("path:last-child");
|
|
2759
|
+
if (_.node()) {
|
|
2760
|
+
let e = _.node().getBBox();
|
|
2761
|
+
t.height = e.height, g = e.height;
|
|
2762
|
+
}
|
|
2763
|
+
return g;
|
|
2764
|
+
}, "drawActorTypeQueue"), de = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2765
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + 75, s = e.append("g").lower();
|
|
2766
|
+
r || (K++, s.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), t.actorCnt = K);
|
|
2767
|
+
let c = e.append("g"), l = W;
|
|
2768
|
+
r ? l += ` ${H}` : l += ` ${V}`, c.attr("class", l), c.attr("name", t.name);
|
|
2769
|
+
let u = O();
|
|
2770
|
+
u.x = t.x, u.y = i, u.fill = "#eaeaea", u.width = t.width, u.height = t.height, u.class = "actor";
|
|
2771
|
+
let f = t.x + t.width / 2, p = i + 30;
|
|
2772
|
+
return c.append("defs").append("marker").attr("id", "filled-head-control").attr("refX", 11).attr("refY", 5.8).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "172.5").append("path").attr("d", "M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"), c.append("circle").attr("cx", f).attr("cy", p).attr("r", 18).attr("fill", "#eaeaf7").attr("stroke", "#666").attr("stroke-width", 1.2), c.append("line").attr("marker-end", "url(#filled-head-control)").attr("transform", `translate(${f}, ${p - 18})`), t.height = c.node().getBBox().height + 2 * (n?.sequence?.labelBoxHeight ?? 0), q(n, d(t.description))(t.description, c, u.x, u.y + 18 + (r ? 5 : 10), u.width, u.height, { class: `actor ${W}` }, n), t.height;
|
|
2773
|
+
}, "drawActorTypeControl"), fe = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2774
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + 75, s = e.append("g").lower(), c = e.append("g"), l = W;
|
|
2775
|
+
r ? l += ` ${H}` : l += ` ${V}`, c.attr("class", l), c.attr("name", t.name);
|
|
2776
|
+
let u = O();
|
|
2777
|
+
u.x = t.x, u.y = i, u.fill = "#eaeaea", u.width = t.width, u.height = t.height, u.class = "actor";
|
|
2778
|
+
let f = t.x + t.width / 2, p = i + (r ? 10 : 25);
|
|
2779
|
+
return c.append("circle").attr("cx", f).attr("cy", p).attr("r", 18).attr("width", t.width).attr("height", t.height), c.append("line").attr("x1", f - 18).attr("x2", f + 18).attr("y1", p + 18).attr("y2", p + 18).attr("stroke", "#333").attr("stroke-width", 2), t.height = c.node().getBBox().height + (n?.sequence?.labelBoxHeight ?? 0), r || (K++, s.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), t.actorCnt = K), q(n, d(t.description))(t.description, c, u.x, u.y + (r ? (p - i + 18 - 5) / 2 : (p + 18 - i) / 2), u.width, u.height, { class: `actor ${W}` }, n), c.attr("transform", `translate(0, ${18 / 2})`), t.height;
|
|
2780
|
+
}, "drawActorTypeEntity"), pe = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2781
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + t.height + 2 * n.boxTextMargin, s = e.append("g").lower(), c = s;
|
|
2782
|
+
r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && c.attr("onclick", ie(`actor${K}_popup`)).attr("cursor", "pointer"), c.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), c = s.append("g"), t.actorCnt = K, t.links != null && c.attr("id", "root-" + K));
|
|
2783
|
+
let l = O(), u = "actor";
|
|
2784
|
+
t.properties?.class ? u = t.properties.class : l.fill = "#eaeaea", r ? u += ` ${H}` : u += ` ${V}`, l.x = t.x, l.y = i, l.width = t.width, l.height = t.height, l.class = u, l.name = t.name, l.x = t.x, l.y = i;
|
|
2785
|
+
let f = l.width / 4, p = l.width / 4, m = f / 2, h = m / (2.5 + f / 50), g = c.append("g"), _ = `
|
|
2786
|
+
M ${l.x},${l.y + h}
|
|
2787
|
+
a ${m},${h} 0 0 0 ${f},0
|
|
2788
|
+
a ${m},${h} 0 0 0 -${f},0
|
|
2789
|
+
l 0,${p - 2 * h}
|
|
2790
|
+
a ${m},${h} 0 0 0 ${f},0
|
|
2791
|
+
l 0,-${p - 2 * h}
|
|
2792
|
+
`;
|
|
2793
|
+
g.append("path").attr("d", _).attr("fill", "#eaeaea").attr("stroke", "#000").attr("stroke-width", 1).attr("class", u), r ? g.attr("transform", `translate(${f * 1.5}, ${l.height / 4 - 2 * h})`) : g.attr("transform", `translate(${f * 1.5}, ${(l.height + h) / 4})`), t.rectData = l, q(n, d(t.description))(t.description, c, l.x, l.y + (r ? (l.height + p) / 4 : (l.height + h) / 2), l.width, l.height, { class: `actor ${U}` }, n);
|
|
2794
|
+
let v = g.select("path:last-child");
|
|
2795
|
+
return v.node() && (t.height = v.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0)), t.height;
|
|
2796
|
+
}, "drawActorTypeDatabase"), me = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2797
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + 80, s = e.append("g").lower();
|
|
2798
|
+
r || (K++, s.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), t.actorCnt = K);
|
|
2799
|
+
let c = e.append("g"), l = W;
|
|
2800
|
+
r ? l += ` ${H}` : l += ` ${V}`, c.attr("class", l), c.attr("name", t.name);
|
|
2801
|
+
let u = O();
|
|
2802
|
+
return u.x = t.x, u.y = i, u.fill = "#eaeaea", u.width = t.width, u.height = t.height, u.class = "actor", c.append("line").attr("id", "actor-man-torso" + K).attr("x1", t.x + t.width / 2 - 30 * 2.5).attr("y1", i + 10).attr("x2", t.x + t.width / 2 - 15).attr("y2", i + 10), c.append("line").attr("id", "actor-man-arms" + K).attr("x1", t.x + t.width / 2 - 30 * 2.5).attr("y1", i + 0).attr("x2", t.x + t.width / 2 - 30 * 2.5).attr("y2", i + 20), c.append("circle").attr("cx", t.x + t.width / 2).attr("cy", i + 10).attr("r", 30), t.height = c.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0), q(n, d(t.description))(t.description, c, u.x, u.y + (r ? 30 / 2 - 4 : 18), u.width, u.height, { class: `actor ${W}` }, n), c.attr("transform", "translate(0,22)"), t.height;
|
|
2803
|
+
}, "drawActorTypeBoundary"), he = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2804
|
+
let i = r ? t.stopy : t.starty, a = t.x + t.width / 2, o = i + 80, s = e.append("g").lower();
|
|
2805
|
+
r || (K++, s.append("line").attr("id", "actor" + K).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), t.actorCnt = K);
|
|
2806
|
+
let c = e.append("g"), l = W;
|
|
2807
|
+
r ? l += ` ${H}` : l += ` ${V}`, c.attr("class", l), c.attr("name", t.name);
|
|
2808
|
+
let u = O();
|
|
2809
|
+
u.x = t.x, u.y = i, u.fill = "#eaeaea", u.width = t.width, u.height = t.height, u.class = "actor", u.rx = 3, u.ry = 3, c.append("line").attr("id", "actor-man-torso" + K).attr("x1", a).attr("y1", i + 25).attr("x2", a).attr("y2", i + 45), c.append("line").attr("id", "actor-man-arms" + K).attr("x1", a - B / 2).attr("y1", i + 33).attr("x2", a + B / 2).attr("y2", i + 33), c.append("line").attr("x1", a - B / 2).attr("y1", i + 60).attr("x2", a).attr("y2", i + 45), c.append("line").attr("x1", a).attr("y1", i + 45).attr("x2", a + B / 2 - 2).attr("y2", i + 60);
|
|
2810
|
+
let f = c.append("circle");
|
|
2811
|
+
return f.attr("cx", t.x + t.width / 2), f.attr("cy", i + 10), f.attr("r", 15), f.attr("width", t.width), f.attr("height", t.height), t.height = c.node().getBBox().height, q(n, d(t.description))(t.description, c, u.x, u.y + 35, u.width, u.height, { class: `actor ${W}` }, n), t.height;
|
|
2812
|
+
}, "drawActorTypeActor"), ge = /* @__PURE__ */ r(async function(e, t, n, r) {
|
|
2813
|
+
switch (t.type) {
|
|
2814
|
+
case "actor": return await he(e, t, n, r);
|
|
2815
|
+
case "participant": return await ce(e, t, n, r);
|
|
2816
|
+
case "boundary": return await me(e, t, n, r);
|
|
2817
|
+
case "control": return await de(e, t, n, r);
|
|
2818
|
+
case "entity": return await fe(e, t, n, r);
|
|
2819
|
+
case "database": return await pe(e, t, n, r);
|
|
2820
|
+
case "collections": return await le(e, t, n, r);
|
|
2821
|
+
case "queue": return await ue(e, t, n, r);
|
|
2822
|
+
}
|
|
2823
|
+
}, "drawActor"), _e = /* @__PURE__ */ r(function(e, t, n) {
|
|
2824
|
+
let r = e.append("g");
|
|
2825
|
+
xe(r, t), t.name && q(n)(t.name, r, t.x, t.y + n.boxTextMargin + (t.textMaxHeight || 0) / 2, t.width, 0, { class: "text" }, n), r.lower();
|
|
2826
|
+
}, "drawBox"), ve = /* @__PURE__ */ r(function(e) {
|
|
2827
|
+
return e.append("g");
|
|
2828
|
+
}, "anchorElement"), ye = /* @__PURE__ */ r(function(e, t, n, r, i) {
|
|
2829
|
+
let a = O(), o = t.anchored;
|
|
2830
|
+
a.x = t.startx, a.y = t.starty, a.class = "activation" + i % 3, a.width = t.stopx - t.startx, a.height = n - t.starty, ne(o, a);
|
|
2831
|
+
}, "drawActivation"), be = /* @__PURE__ */ r(async function(e, t, n, i) {
|
|
2832
|
+
let { boxMargin: a, boxTextMargin: o, labelBoxHeight: s, labelBoxWidth: c, messageFontFamily: l, messageFontSize: u, messageFontWeight: f } = i, p = e.append("g"), m = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
2833
|
+
return p.append("line").attr("x1", e).attr("y1", t).attr("x2", n).attr("y2", r).attr("class", "loopLine");
|
|
2834
|
+
}, "drawLoopLine");
|
|
2835
|
+
m(t.startx, t.starty, t.stopx, t.starty), m(t.stopx, t.starty, t.stopx, t.stopy), m(t.startx, t.stopy, t.stopx, t.stopy), m(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(e) {
|
|
2836
|
+
m(t.startx, e.y, t.stopx, e.y).style("stroke-dasharray", "3, 3");
|
|
2837
|
+
});
|
|
2838
|
+
let h = A();
|
|
2839
|
+
h.text = n, h.x = t.startx, h.y = t.starty, h.fontFamily = l, h.fontSize = u, h.fontWeight = f, h.anchor = "middle", h.valign = "middle", h.tspan = !1, h.width = c || 50, h.height = s || 20, h.textMargin = o, h.class = "labelText", oe(p, h), h = ke(), h.text = t.title, h.x = t.startx + c / 2 + (t.stopx - t.startx) / 2, h.y = t.starty + a + o, h.anchor = "middle", h.valign = "middle", h.textMargin = o, h.class = "loopText", h.fontFamily = l, h.fontSize = u, h.fontWeight = f, h.wrap = !0;
|
|
2840
|
+
let g = d(h.text) ? await ae(p, h, t) : G(p, h);
|
|
2841
|
+
if (t.sectionTitles !== void 0) {
|
|
2842
|
+
for (let [e, n] of Object.entries(t.sectionTitles)) if (n.message) {
|
|
2843
|
+
h.text = n.message, h.x = t.startx + (t.stopx - t.startx) / 2, h.y = t.sections[e].y + a + o, h.class = "loopText", h.anchor = "middle", h.valign = "middle", h.tspan = !1, h.fontFamily = l, h.fontSize = u, h.fontWeight = f, h.wrap = t.wrap, d(h.text) ? (t.starty = t.sections[e].y, await ae(p, h, t)) : G(p, h);
|
|
2844
|
+
let r = Math.round(g.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
|
|
2845
|
+
t.sections[e].height += r - (a + o);
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
return t.height = Math.round(t.stopy - t.starty), p;
|
|
2849
|
+
}, "drawLoop"), xe = /* @__PURE__ */ r(function(e, t) {
|
|
2850
|
+
j(e, t);
|
|
2851
|
+
}, "drawBackgroundRect"), Se = /* @__PURE__ */ r(function(e) {
|
|
2852
|
+
e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "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");
|
|
2853
|
+
}, "insertDatabaseIcon"), Ce = /* @__PURE__ */ r(function(e) {
|
|
2854
|
+
e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
|
|
2855
|
+
}, "insertComputerIcon"), we = /* @__PURE__ */ r(function(e) {
|
|
2856
|
+
e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
|
|
2857
|
+
}, "insertClockIcon"), Te = /* @__PURE__ */ r(function(e) {
|
|
2858
|
+
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");
|
|
2859
|
+
}, "insertArrowHead"), Ee = /* @__PURE__ */ r(function(e) {
|
|
2860
|
+
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");
|
|
2861
|
+
}, "insertArrowFilledHead"), De = /* @__PURE__ */ r(function(e) {
|
|
2862
|
+
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);
|
|
2863
|
+
}, "insertSequenceNumber"), Oe = /* @__PURE__ */ r(function(e) {
|
|
2864
|
+
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");
|
|
2865
|
+
}, "insertArrowCrossHead"), ke = /* @__PURE__ */ r(function() {
|
|
2866
|
+
return {
|
|
2867
|
+
x: 0,
|
|
2868
|
+
y: 0,
|
|
2869
|
+
fill: void 0,
|
|
2870
|
+
anchor: void 0,
|
|
2871
|
+
style: "#666",
|
|
2872
|
+
width: void 0,
|
|
2873
|
+
height: void 0,
|
|
2874
|
+
textMargin: 0,
|
|
2875
|
+
rx: 0,
|
|
2876
|
+
ry: 0,
|
|
2877
|
+
tspan: !0,
|
|
2878
|
+
valign: void 0
|
|
2879
|
+
};
|
|
2880
|
+
}, "getTextObj"), Ae = /* @__PURE__ */ r(function() {
|
|
2881
|
+
return {
|
|
2882
|
+
x: 0,
|
|
2883
|
+
y: 0,
|
|
2884
|
+
fill: "#EDF2AE",
|
|
2885
|
+
stroke: "#666",
|
|
2886
|
+
width: 100,
|
|
2887
|
+
anchor: "start",
|
|
2888
|
+
height: 100,
|
|
2889
|
+
rx: 0,
|
|
2890
|
+
ry: 0
|
|
2891
|
+
};
|
|
2892
|
+
}, "getNoteRect"), q = /* @__PURE__ */ (function() {
|
|
2893
|
+
function e(e, t, n, r, i, o, s) {
|
|
2894
|
+
a(t.append("text").attr("x", n + i / 2).attr("y", r + o / 2 + 5).style("text-anchor", "middle").text(e), s);
|
|
2895
|
+
}
|
|
2896
|
+
r(e, "byText");
|
|
2897
|
+
function t(e, t, n, r, i, o, s, c) {
|
|
2898
|
+
let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, [f, p] = C(l), m = e.split(y.lineBreakRegex);
|
|
2899
|
+
for (let e = 0; e < m.length; e++) {
|
|
2900
|
+
let c = e * f - f * (m.length - 1) / 2, l = t.append("text").attr("x", n + i / 2).attr("y", r).style("text-anchor", "middle").style("font-size", p).style("font-weight", d).style("font-family", u);
|
|
2901
|
+
l.append("tspan").attr("x", n + i / 2).attr("dy", c).text(m[e]), l.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(l, s);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
r(t, "byTspan");
|
|
2905
|
+
function n(e, n, r, i, o, s, c, l) {
|
|
2906
|
+
let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", i).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
2907
|
+
d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, i, o, s, c, l), a(d, c);
|
|
2908
|
+
}
|
|
2909
|
+
r(n, "byFo");
|
|
2910
|
+
async function i(e, n, r, i, o, s, c, l) {
|
|
2911
|
+
let d = await _(e, x()), f = n.append("switch"), p = f.append("foreignObject").attr("x", r + o / 2 - d.width / 2).attr("y", i + s / 2 - d.height / 2).attr("width", d.width).attr("height", d.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
2912
|
+
p.append("div").style("text-align", "center").style("vertical-align", "middle").html(await u(e, x())), t(e, f, r, i, o, s, c, l), a(p, c);
|
|
2913
|
+
}
|
|
2914
|
+
r(i, "byKatex");
|
|
2915
|
+
function a(e, t) {
|
|
2916
|
+
for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
|
|
2917
|
+
}
|
|
2918
|
+
return r(a, "_setTextAttrs"), function(r, a = !1) {
|
|
2919
|
+
return a ? i : r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
|
|
2920
|
+
};
|
|
2921
|
+
})(), je = /* @__PURE__ */ (function() {
|
|
2922
|
+
function e(e, t, n, r, a, o, s) {
|
|
2923
|
+
i(t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").text(e), s);
|
|
2924
|
+
}
|
|
2925
|
+
r(e, "byText");
|
|
2926
|
+
function t(e, t, n, r, a, o, s, c) {
|
|
2927
|
+
let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, f = e.split(y.lineBreakRegex);
|
|
2928
|
+
for (let e = 0; e < f.length; e++) {
|
|
2929
|
+
let a = e * l - l * (f.length - 1) / 2, c = t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").style("font-size", l).style("font-weight", d).style("font-family", u);
|
|
2930
|
+
c.append("tspan").attr("x", n).attr("dy", a).text(f[e]), c.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(c, s);
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
r(t, "byTspan");
|
|
2934
|
+
function n(e, n, r, a, o, s, c, l) {
|
|
2935
|
+
let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", a).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
2936
|
+
d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, a, o, s, c, l), i(d, c);
|
|
2937
|
+
}
|
|
2938
|
+
r(n, "byFo");
|
|
2939
|
+
function i(e, t) {
|
|
2940
|
+
for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
|
|
2941
|
+
}
|
|
2942
|
+
return r(i, "_setTextAttrs"), function(r) {
|
|
2943
|
+
return r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
|
|
2944
|
+
};
|
|
2945
|
+
})(), J = {
|
|
2946
|
+
drawRect: ne,
|
|
2947
|
+
drawText: G,
|
|
2948
|
+
drawLabel: oe,
|
|
2949
|
+
drawActor: ge,
|
|
2950
|
+
drawBox: _e,
|
|
2951
|
+
drawPopup: re,
|
|
2952
|
+
anchorElement: ve,
|
|
2953
|
+
drawActivation: ye,
|
|
2954
|
+
drawLoop: be,
|
|
2955
|
+
drawBackgroundRect: xe,
|
|
2956
|
+
insertArrowHead: Te,
|
|
2957
|
+
insertArrowFilledHead: Ee,
|
|
2958
|
+
insertSequenceNumber: De,
|
|
2959
|
+
insertArrowCrossHead: Oe,
|
|
2960
|
+
insertDatabaseIcon: Se,
|
|
2961
|
+
insertComputerIcon: Ce,
|
|
2962
|
+
insertClockIcon: we,
|
|
2963
|
+
getTextObj: ke,
|
|
2964
|
+
getNoteRect: Ae,
|
|
2965
|
+
fixLifeLineHeights: se,
|
|
2966
|
+
sanitizeUrl: N.sanitizeUrl
|
|
2967
|
+
}, Y = {}, X = {
|
|
2968
|
+
data: {
|
|
2969
|
+
startx: void 0,
|
|
2970
|
+
stopx: void 0,
|
|
2971
|
+
starty: void 0,
|
|
2972
|
+
stopy: void 0
|
|
2973
|
+
},
|
|
2974
|
+
verticalPos: 0,
|
|
2975
|
+
sequenceItems: [],
|
|
2976
|
+
activations: [],
|
|
2977
|
+
models: {
|
|
2978
|
+
getHeight: /* @__PURE__ */ r(function() {
|
|
2979
|
+
return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map((e) => e.height || 0)) + (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));
|
|
2980
|
+
}, "getHeight"),
|
|
2981
|
+
clear: /* @__PURE__ */ r(function() {
|
|
2982
|
+
this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
|
|
2983
|
+
}, "clear"),
|
|
2984
|
+
addBox: /* @__PURE__ */ r(function(e) {
|
|
2985
|
+
this.boxes.push(e);
|
|
2986
|
+
}, "addBox"),
|
|
2987
|
+
addActor: /* @__PURE__ */ r(function(e) {
|
|
2988
|
+
this.actors.push(e);
|
|
2989
|
+
}, "addActor"),
|
|
2990
|
+
addLoop: /* @__PURE__ */ r(function(e) {
|
|
2991
|
+
this.loops.push(e);
|
|
2992
|
+
}, "addLoop"),
|
|
2993
|
+
addMessage: /* @__PURE__ */ r(function(e) {
|
|
2994
|
+
this.messages.push(e);
|
|
2995
|
+
}, "addMessage"),
|
|
2996
|
+
addNote: /* @__PURE__ */ r(function(e) {
|
|
2997
|
+
this.notes.push(e);
|
|
2998
|
+
}, "addNote"),
|
|
2999
|
+
lastActor: /* @__PURE__ */ r(function() {
|
|
3000
|
+
return this.actors[this.actors.length - 1];
|
|
3001
|
+
}, "lastActor"),
|
|
3002
|
+
lastLoop: /* @__PURE__ */ r(function() {
|
|
3003
|
+
return this.loops[this.loops.length - 1];
|
|
3004
|
+
}, "lastLoop"),
|
|
3005
|
+
lastMessage: /* @__PURE__ */ r(function() {
|
|
3006
|
+
return this.messages[this.messages.length - 1];
|
|
3007
|
+
}, "lastMessage"),
|
|
3008
|
+
lastNote: /* @__PURE__ */ r(function() {
|
|
3009
|
+
return this.notes[this.notes.length - 1];
|
|
3010
|
+
}, "lastNote"),
|
|
3011
|
+
actors: [],
|
|
3012
|
+
boxes: [],
|
|
3013
|
+
loops: [],
|
|
3014
|
+
messages: [],
|
|
3015
|
+
notes: []
|
|
3016
|
+
},
|
|
3017
|
+
init: /* @__PURE__ */ r(function() {
|
|
3018
|
+
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
|
|
3019
|
+
startx: void 0,
|
|
3020
|
+
stopx: void 0,
|
|
3021
|
+
starty: void 0,
|
|
3022
|
+
stopy: void 0
|
|
3023
|
+
}, this.verticalPos = 0, ze(h());
|
|
3024
|
+
}, "init"),
|
|
3025
|
+
updateVal: /* @__PURE__ */ r(function(e, t, n, r) {
|
|
3026
|
+
e[t] === void 0 ? e[t] = n : e[t] = r(n, e[t]);
|
|
3027
|
+
}, "updateVal"),
|
|
3028
|
+
updateBounds: /* @__PURE__ */ r(function(e, t, n, i) {
|
|
3029
|
+
let a = this, o = 0;
|
|
3030
|
+
function s(s) {
|
|
3031
|
+
return /* @__PURE__ */ r(function(r) {
|
|
3032
|
+
o++;
|
|
3033
|
+
let c = a.sequenceItems.length - o + 1;
|
|
3034
|
+
a.updateVal(r, "starty", t - c * Y.boxMargin, Math.min), a.updateVal(r, "stopy", i + c * Y.boxMargin, Math.max), a.updateVal(X.data, "startx", e - c * Y.boxMargin, Math.min), a.updateVal(X.data, "stopx", n + c * Y.boxMargin, Math.max), s !== "activation" && (a.updateVal(r, "startx", e - c * Y.boxMargin, Math.min), a.updateVal(r, "stopx", n + c * Y.boxMargin, Math.max), a.updateVal(X.data, "starty", t - c * Y.boxMargin, Math.min), a.updateVal(X.data, "stopy", i + c * Y.boxMargin, Math.max));
|
|
3035
|
+
}, "updateItemBounds");
|
|
3036
|
+
}
|
|
3037
|
+
r(s, "updateFn"), this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
|
|
3038
|
+
}, "updateBounds"),
|
|
3039
|
+
insert: /* @__PURE__ */ r(function(e, t, n, r) {
|
|
3040
|
+
let i = y.getMin(e, n), a = y.getMax(e, n), o = y.getMin(t, r), s = y.getMax(t, r);
|
|
3041
|
+
this.updateVal(X.data, "startx", i, Math.min), this.updateVal(X.data, "starty", o, Math.min), this.updateVal(X.data, "stopx", a, Math.max), this.updateVal(X.data, "stopy", s, Math.max), this.updateBounds(i, o, a, s);
|
|
3042
|
+
}, "insert"),
|
|
3043
|
+
newActivation: /* @__PURE__ */ r(function(e, t, n) {
|
|
3044
|
+
let r = n.get(e.from), i = Be(e.from).length || 0, a = r.x + r.width / 2 + (i - 1) * Y.activationWidth / 2;
|
|
3045
|
+
this.activations.push({
|
|
3046
|
+
startx: a,
|
|
3047
|
+
starty: this.verticalPos + 2,
|
|
3048
|
+
stopx: a + Y.activationWidth,
|
|
3049
|
+
stopy: void 0,
|
|
3050
|
+
actor: e.from,
|
|
3051
|
+
anchored: J.anchorElement(t)
|
|
3052
|
+
});
|
|
3053
|
+
}, "newActivation"),
|
|
3054
|
+
endActivation: /* @__PURE__ */ r(function(e) {
|
|
3055
|
+
let t = this.activations.map(function(e) {
|
|
3056
|
+
return e.actor;
|
|
3057
|
+
}).lastIndexOf(e.from);
|
|
3058
|
+
return this.activations.splice(t, 1)[0];
|
|
3059
|
+
}, "endActivation"),
|
|
3060
|
+
createLoop: /* @__PURE__ */ r(function(e = {
|
|
3061
|
+
message: void 0,
|
|
3062
|
+
wrap: !1,
|
|
3063
|
+
width: void 0
|
|
3064
|
+
}, t) {
|
|
3065
|
+
return {
|
|
3066
|
+
startx: void 0,
|
|
3067
|
+
starty: this.verticalPos,
|
|
3068
|
+
stopx: void 0,
|
|
3069
|
+
stopy: void 0,
|
|
3070
|
+
title: e.message,
|
|
3071
|
+
wrap: e.wrap,
|
|
3072
|
+
width: e.width,
|
|
3073
|
+
height: 0,
|
|
3074
|
+
fill: t
|
|
3075
|
+
};
|
|
3076
|
+
}, "createLoop"),
|
|
3077
|
+
newLoop: /* @__PURE__ */ r(function(e = {
|
|
3078
|
+
message: void 0,
|
|
3079
|
+
wrap: !1,
|
|
3080
|
+
width: void 0
|
|
3081
|
+
}, t) {
|
|
3082
|
+
this.sequenceItems.push(this.createLoop(e, t));
|
|
3083
|
+
}, "newLoop"),
|
|
3084
|
+
endLoop: /* @__PURE__ */ r(function() {
|
|
3085
|
+
return this.sequenceItems.pop();
|
|
3086
|
+
}, "endLoop"),
|
|
3087
|
+
isLoopOverlap: /* @__PURE__ */ r(function() {
|
|
3088
|
+
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
|
|
3089
|
+
}, "isLoopOverlap"),
|
|
3090
|
+
addSectionToLoop: /* @__PURE__ */ r(function(e) {
|
|
3091
|
+
let t = this.sequenceItems.pop();
|
|
3092
|
+
t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({
|
|
3093
|
+
y: X.getVerticalPos(),
|
|
3094
|
+
height: 0
|
|
3095
|
+
}), t.sectionTitles.push(e), this.sequenceItems.push(t);
|
|
3096
|
+
}, "addSectionToLoop"),
|
|
3097
|
+
saveVerticalPos: /* @__PURE__ */ r(function() {
|
|
3098
|
+
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
3099
|
+
}, "saveVerticalPos"),
|
|
3100
|
+
resetVerticalPos: /* @__PURE__ */ r(function() {
|
|
3101
|
+
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
3102
|
+
}, "resetVerticalPos"),
|
|
3103
|
+
bumpVerticalPos: /* @__PURE__ */ r(function(e) {
|
|
3104
|
+
this.verticalPos += e, this.data.stopy = y.getMax(this.data.stopy, this.verticalPos);
|
|
3105
|
+
}, "bumpVerticalPos"),
|
|
3106
|
+
getVerticalPos: /* @__PURE__ */ r(function() {
|
|
3107
|
+
return this.verticalPos;
|
|
3108
|
+
}, "getVerticalPos"),
|
|
3109
|
+
getBounds: /* @__PURE__ */ r(function() {
|
|
3110
|
+
return {
|
|
3111
|
+
bounds: this.data,
|
|
3112
|
+
models: this.models
|
|
3113
|
+
};
|
|
3114
|
+
}, "getBounds")
|
|
3115
|
+
}, Me = /* @__PURE__ */ r(async function(e, t) {
|
|
3116
|
+
X.bumpVerticalPos(Y.boxMargin), t.height = Y.boxMargin, t.starty = X.getVerticalPos();
|
|
3117
|
+
let n = O();
|
|
3118
|
+
n.x = t.startx, n.y = t.starty, n.width = t.width || Y.width, n.class = "note";
|
|
3119
|
+
let r = e.append("g"), i = J.drawRect(r, n), a = A();
|
|
3120
|
+
a.x = t.startx, a.y = t.starty, a.width = n.width, a.dy = "1em", a.text = t.message, a.class = "noteText", a.fontFamily = Y.noteFontFamily, a.fontSize = Y.noteFontSize, a.fontWeight = Y.noteFontWeight, a.anchor = Y.noteAlign, a.textMargin = Y.noteMargin, a.valign = "center";
|
|
3121
|
+
let o = d(a.text) ? await ae(r, a) : G(r, a), s = Math.round(o.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
|
|
3122
|
+
i.attr("height", s + 2 * Y.noteMargin), t.height += s + 2 * Y.noteMargin, X.bumpVerticalPos(s + 2 * Y.noteMargin), t.stopy = t.starty + s + 2 * Y.noteMargin, t.stopx = t.startx + n.width, X.insert(t.startx, t.starty, t.stopx, t.stopy), X.models.addNote(t);
|
|
3123
|
+
}, "drawNote"), Z = /* @__PURE__ */ r((e) => ({
|
|
3124
|
+
fontFamily: e.messageFontFamily,
|
|
3125
|
+
fontSize: e.messageFontSize,
|
|
3126
|
+
fontWeight: e.messageFontWeight
|
|
3127
|
+
}), "messageFont"), Q = /* @__PURE__ */ r((e) => ({
|
|
3128
|
+
fontFamily: e.noteFontFamily,
|
|
3129
|
+
fontSize: e.noteFontSize,
|
|
3130
|
+
fontWeight: e.noteFontWeight
|
|
3131
|
+
}), "noteFont"), Ne = /* @__PURE__ */ r((e) => ({
|
|
3132
|
+
fontFamily: e.actorFontFamily,
|
|
3133
|
+
fontSize: e.actorFontSize,
|
|
3134
|
+
fontWeight: e.actorFontWeight
|
|
3135
|
+
}), "actorFont");
|
|
3136
|
+
async function Pe(e, t) {
|
|
3137
|
+
X.bumpVerticalPos(10);
|
|
3138
|
+
let { startx: n, stopx: r, message: i } = t, a = y.splitBreaks(i).length, o = d(i), s = o ? await _(i, h()) : w.calculateTextDimensions(i, Z(Y));
|
|
3139
|
+
if (!o) {
|
|
3140
|
+
let e = s.height / a;
|
|
3141
|
+
t.height += e, X.bumpVerticalPos(e);
|
|
3142
|
+
}
|
|
3143
|
+
let c, l = s.height - 10, u = s.width;
|
|
3144
|
+
if (n === r) {
|
|
3145
|
+
c = X.getVerticalPos() + l, Y.rightAngles || (l += Y.boxMargin, c = X.getVerticalPos() + l), l += 30;
|
|
3146
|
+
let e = y.getMax(u / 2, Y.width / 2);
|
|
3147
|
+
X.insert(n - e, X.getVerticalPos() - 10 + l, r + e, X.getVerticalPos() + 30 + l);
|
|
3148
|
+
} else l += Y.boxMargin, c = X.getVerticalPos() + l, X.insert(n, c - 10, r, c);
|
|
3149
|
+
return X.bumpVerticalPos(l), t.height += l, t.stopy = t.starty + t.height, X.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), c;
|
|
3150
|
+
}
|
|
3151
|
+
r(Pe, "boundMessage");
|
|
3152
|
+
var Fe = /* @__PURE__ */ r(async function(e, t, n, r) {
|
|
3153
|
+
let { startx: i, stopx: a, starty: o, message: c, type: l, sequenceIndex: u, sequenceVisible: f } = t, p = w.calculateTextDimensions(c, Z(Y)), m = A();
|
|
3154
|
+
m.x = i, m.y = o + 10, m.width = a - i, m.class = "messageText", m.dy = "1em", m.text = c, m.fontFamily = Y.messageFontFamily, m.fontSize = Y.messageFontSize, m.fontWeight = Y.messageFontWeight, m.anchor = Y.messageAlign, m.valign = "center", m.textMargin = Y.wrapPadding, m.tspan = !1, d(m.text) ? await ae(e, m, {
|
|
3155
|
+
startx: i,
|
|
3156
|
+
stopx: a,
|
|
3157
|
+
starty: n
|
|
3158
|
+
}) : G(e, m);
|
|
3159
|
+
let h = p.width, g;
|
|
3160
|
+
i === a ? g = Y.rightAngles ? e.append("path").attr("d", `M ${i},${n} H ${i + y.getMax(Y.width / 2, h / 2)} V ${n + 25} H ${i}`) : e.append("path").attr("d", "M " + i + "," + n + " C " + (i + 60) + "," + (n - 10) + " " + (i + 60) + "," + (n + 30) + " " + i + "," + (n + 20)) : (g = e.append("line"), g.attr("x1", i), g.attr("y1", n), g.attr("x2", a), g.attr("y2", n)), l === r.db.LINETYPE.DOTTED || l === r.db.LINETYPE.DOTTED_CROSS || l === r.db.LINETYPE.DOTTED_POINT || l === r.db.LINETYPE.DOTTED_OPEN || l === r.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (g.style("stroke-dasharray", "3, 3"), g.attr("class", "messageLine1")) : g.attr("class", "messageLine0");
|
|
3161
|
+
let _ = "";
|
|
3162
|
+
Y.arrowMarkerAbsolute && (_ = s(!0)), g.attr("stroke-width", 2), g.attr("stroke", "none"), g.style("fill", "none"), (l === r.db.LINETYPE.SOLID || l === r.db.LINETYPE.DOTTED) && g.attr("marker-end", "url(" + _ + "#arrowhead)"), (l === r.db.LINETYPE.BIDIRECTIONAL_SOLID || l === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (g.attr("marker-start", "url(" + _ + "#arrowhead)"), g.attr("marker-end", "url(" + _ + "#arrowhead)")), (l === r.db.LINETYPE.SOLID_POINT || l === r.db.LINETYPE.DOTTED_POINT) && g.attr("marker-end", "url(" + _ + "#filled-head)"), (l === r.db.LINETYPE.SOLID_CROSS || l === r.db.LINETYPE.DOTTED_CROSS) && g.attr("marker-end", "url(" + _ + "#crosshead)"), (f || Y.showSequenceNumbers) && ((l === r.db.LINETYPE.BIDIRECTIONAL_SOLID || l === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (i < a ? g.attr("x1", i + 12) : g.attr("x1", i + 6)), e.append("line").attr("x1", i).attr("y1", n).attr("x2", i).attr("y2", n).attr("stroke-width", 0).attr("marker-start", "url(" + _ + "#sequencenumber)"), e.append("text").attr("x", i).attr("y", n + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(u));
|
|
3163
|
+
}, "drawMessage"), Ie = /* @__PURE__ */ r(function(e, t, n, r, i, a, o) {
|
|
3164
|
+
let s = 0, c = 0, l, u = 0;
|
|
3165
|
+
for (let e of r) {
|
|
3166
|
+
let r = t.get(e), a = r.box;
|
|
3167
|
+
l && l != a && (o || X.models.addBox(l), c += Y.boxMargin + l.margin), a && a != l && (o || (a.x = s + c, a.y = i), c += a.margin), r.width = r.width || Y.width, r.height = y.getMax(r.height || Y.height, Y.height), r.margin = r.margin || Y.actorMargin, u = y.getMax(u, r.height), n.get(r.name) && (c += r.width / 2), r.x = s + c, r.starty = X.getVerticalPos(), X.insert(r.x, i, r.x + r.width, r.height), s += r.width + c, r.box && (r.box.width = s + a.margin - r.box.x), c = r.margin, l = r.box, X.models.addActor(r);
|
|
3168
|
+
}
|
|
3169
|
+
l && !o && X.models.addBox(l), X.bumpVerticalPos(u);
|
|
3170
|
+
}, "addActorRenderingData"), Le = /* @__PURE__ */ r(async function(e, t, n, r) {
|
|
3171
|
+
if (r) {
|
|
3172
|
+
let r = 0;
|
|
3173
|
+
X.bumpVerticalPos(Y.boxMargin * 2);
|
|
3174
|
+
for (let i of n) {
|
|
3175
|
+
let n = t.get(i);
|
|
3176
|
+
n.stopy ||= X.getVerticalPos();
|
|
3177
|
+
let a = await J.drawActor(e, n, Y, !0);
|
|
3178
|
+
r = y.getMax(r, a);
|
|
3179
|
+
}
|
|
3180
|
+
X.bumpVerticalPos(r + Y.boxMargin);
|
|
3181
|
+
} else for (let r of n) {
|
|
3182
|
+
let n = t.get(r);
|
|
3183
|
+
await J.drawActor(e, n, Y, !1);
|
|
3184
|
+
}
|
|
3185
|
+
}, "drawActors"), Re = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
3186
|
+
let i = 0, a = 0;
|
|
3187
|
+
for (let o of n) {
|
|
3188
|
+
let n = t.get(o), s = Ge(n), c = J.drawPopup(e, n, s, Y, Y.forceMenus, r);
|
|
3189
|
+
c.height > i && (i = c.height), c.width + n.x > a && (a = c.width + n.x);
|
|
3190
|
+
}
|
|
3191
|
+
return {
|
|
3192
|
+
maxHeight: i,
|
|
3193
|
+
maxWidth: a
|
|
3194
|
+
};
|
|
3195
|
+
}, "drawActorsPopup"), ze = /* @__PURE__ */ r(function(e) {
|
|
3196
|
+
v(Y, e), e.fontFamily && (Y.actorFontFamily = Y.noteFontFamily = Y.messageFontFamily = e.fontFamily), e.fontSize && (Y.actorFontSize = Y.noteFontSize = Y.messageFontSize = e.fontSize), e.fontWeight && (Y.actorFontWeight = Y.noteFontWeight = Y.messageFontWeight = e.fontWeight);
|
|
3197
|
+
}, "setConf"), Be = /* @__PURE__ */ r(function(e) {
|
|
3198
|
+
return X.activations.filter(function(t) {
|
|
3199
|
+
return t.actor === e;
|
|
3200
|
+
});
|
|
3201
|
+
}, "actorActivations"), Ve = /* @__PURE__ */ r(function(e, t) {
|
|
3202
|
+
let n = t.get(e), r = Be(e);
|
|
3203
|
+
return [r.reduce(function(e, t) {
|
|
3204
|
+
return y.getMin(e, t.startx);
|
|
3205
|
+
}, n.x + n.width / 2 - 1), r.reduce(function(e, t) {
|
|
3206
|
+
return y.getMax(e, t.stopx);
|
|
3207
|
+
}, n.x + n.width / 2 + 1)];
|
|
3208
|
+
}, "activationBounds");
|
|
3209
|
+
function $(e, t, r, i, a) {
|
|
3210
|
+
X.bumpVerticalPos(r);
|
|
3211
|
+
let o = i;
|
|
3212
|
+
if (t.id && t.message && e[t.id]) {
|
|
3213
|
+
let r = e[t.id].width, a = Z(Y);
|
|
3214
|
+
t.message = w.wrapLabel(`[${t.message}]`, r - 2 * Y.wrapPadding, a), t.width = r, t.wrap = !0;
|
|
3215
|
+
let s = w.calculateTextDimensions(t.message, a), c = y.getMax(s.height, Y.labelBoxHeight);
|
|
3216
|
+
o = i + c, n.debug(`${c} - ${t.message}`);
|
|
3217
|
+
}
|
|
3218
|
+
a(t), X.bumpVerticalPos(o);
|
|
3219
|
+
}
|
|
3220
|
+
r($, "adjustLoopHeightForWrap");
|
|
3221
|
+
function He(e, t, n, i, a, o, s) {
|
|
3222
|
+
function c(n, r) {
|
|
3223
|
+
n.x < a.get(e.from).x ? (X.insert(t.stopx - r, t.starty, t.startx, t.stopy + n.height / 2 + Y.noteMargin), t.stopx += r) : (X.insert(t.startx, t.starty, t.stopx + r, t.stopy + n.height / 2 + Y.noteMargin), t.stopx -= r);
|
|
3224
|
+
}
|
|
3225
|
+
r(c, "receiverAdjustment");
|
|
3226
|
+
function l(n, r) {
|
|
3227
|
+
n.x < a.get(e.to).x ? (X.insert(t.startx - r, t.starty, t.stopx, t.stopy + n.height / 2 + Y.noteMargin), t.startx += r) : (X.insert(t.stopx, t.starty, t.startx + r, t.stopy + n.height / 2 + Y.noteMargin), t.startx -= r);
|
|
3228
|
+
}
|
|
3229
|
+
r(l, "senderAdjustment");
|
|
3230
|
+
let u = [
|
|
3231
|
+
z.ACTOR,
|
|
3232
|
+
z.CONTROL,
|
|
3233
|
+
z.ENTITY,
|
|
3234
|
+
z.DATABASE
|
|
3235
|
+
];
|
|
3236
|
+
if (o.get(e.to) == i) {
|
|
3237
|
+
let t = a.get(e.to);
|
|
3238
|
+
c(t, u.includes(t.type) ? B / 2 + 3 : t.width / 2 + 3), t.starty = n - t.height / 2, X.bumpVerticalPos(t.height / 2);
|
|
3239
|
+
} else if (s.get(e.from) == i) {
|
|
3240
|
+
let t = a.get(e.from);
|
|
3241
|
+
Y.mirrorActors && l(t, u.includes(t.type) ? B / 2 : t.width / 2), t.stopy = n - t.height / 2, X.bumpVerticalPos(t.height / 2);
|
|
3242
|
+
} else if (s.get(e.to) == i) {
|
|
3243
|
+
let t = a.get(e.to);
|
|
3244
|
+
Y.mirrorActors && c(t, u.includes(t.type) ? B / 2 + 3 : t.width / 2 + 3), t.stopy = n - t.height / 2, X.bumpVerticalPos(t.height / 2);
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
r(He, "adjustCreatedDestroyedData");
|
|
3248
|
+
var Ue = /* @__PURE__ */ r(async function(e, t, a, o) {
|
|
3249
|
+
let { securityLevel: s, sequence: c } = h();
|
|
3250
|
+
Y = c;
|
|
3251
|
+
let l;
|
|
3252
|
+
s === "sandbox" && (l = i("#i" + t));
|
|
3253
|
+
let u = i(s === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = s === "sandbox" ? l.nodes()[0].contentDocument : document;
|
|
3254
|
+
X.init(), n.debug(o.db);
|
|
3255
|
+
let f = s === "sandbox" ? u.select(`[id="${t}"]`) : i(`[id="${t}"]`), p = o.db.getActors(), m = o.db.getCreatedActors(), _ = o.db.getDestroyedActors(), v = o.db.getBoxes(), y = o.db.getActorKeys(), b = o.db.getMessages(), x = o.db.getDiagramTitle(), S = o.db.hasAtLeastOneBox(), C = o.db.hasAtLeastOneBoxWithTitle(), w = await We(p, b, o);
|
|
3256
|
+
if (Y.height = await Ke(p, w, v), J.insertComputerIcon(f), J.insertDatabaseIcon(f), J.insertClockIcon(f), S && (X.bumpVerticalPos(Y.boxMargin), C && X.bumpVerticalPos(v[0].textMaxHeight)), Y.hideUnusedParticipants === !0) {
|
|
3257
|
+
let e = /* @__PURE__ */ new Set();
|
|
3258
|
+
b.forEach((t) => {
|
|
3259
|
+
e.add(t.from), e.add(t.to);
|
|
3260
|
+
}), y = y.filter((t) => e.has(t));
|
|
3261
|
+
}
|
|
3262
|
+
Ie(f, p, m, y, 0, b, !1);
|
|
3263
|
+
let T = await Ye(b, p, w, o);
|
|
3264
|
+
J.insertArrowHead(f), J.insertArrowCrossHead(f), J.insertArrowFilledHead(f), J.insertSequenceNumber(f);
|
|
3265
|
+
function E(e, t) {
|
|
3266
|
+
let n = X.endActivation(e);
|
|
3267
|
+
n.starty + 18 > t && (n.starty = t - 6, t += 12), J.drawActivation(f, n, t, Y, Be(e.from).length), X.insert(n.startx, t - 10, n.stopx, t);
|
|
3268
|
+
}
|
|
3269
|
+
r(E, "activeEnd");
|
|
3270
|
+
let D = 1, O = 1, k = [], A = [], j = 0;
|
|
3271
|
+
for (let e of b) {
|
|
3272
|
+
let t, r, i;
|
|
3273
|
+
switch (e.type) {
|
|
3274
|
+
case o.db.LINETYPE.NOTE:
|
|
3275
|
+
X.resetVerticalPos(), r = e.noteModel, await Me(f, r);
|
|
3276
|
+
break;
|
|
3277
|
+
case o.db.LINETYPE.ACTIVE_START:
|
|
3278
|
+
X.newActivation(e, f, p);
|
|
3279
|
+
break;
|
|
3280
|
+
case o.db.LINETYPE.ACTIVE_END:
|
|
3281
|
+
E(e, X.getVerticalPos());
|
|
3282
|
+
break;
|
|
3283
|
+
case o.db.LINETYPE.LOOP_START:
|
|
3284
|
+
$(T, e, Y.boxMargin, Y.boxMargin + Y.boxTextMargin, (e) => X.newLoop(e));
|
|
3285
|
+
break;
|
|
3286
|
+
case o.db.LINETYPE.LOOP_END:
|
|
3287
|
+
t = X.endLoop(), await J.drawLoop(f, t, "loop", Y), X.bumpVerticalPos(t.stopy - X.getVerticalPos()), X.models.addLoop(t);
|
|
3288
|
+
break;
|
|
3289
|
+
case o.db.LINETYPE.RECT_START:
|
|
3290
|
+
$(T, e, Y.boxMargin, Y.boxMargin, (e) => X.newLoop(void 0, e.message));
|
|
3291
|
+
break;
|
|
3292
|
+
case o.db.LINETYPE.RECT_END:
|
|
3293
|
+
t = X.endLoop(), A.push(t), X.models.addLoop(t), X.bumpVerticalPos(t.stopy - X.getVerticalPos());
|
|
3294
|
+
break;
|
|
3295
|
+
case o.db.LINETYPE.OPT_START:
|
|
3296
|
+
$(T, e, Y.boxMargin, Y.boxMargin + Y.boxTextMargin, (e) => X.newLoop(e));
|
|
3297
|
+
break;
|
|
3298
|
+
case o.db.LINETYPE.OPT_END:
|
|
3299
|
+
t = X.endLoop(), await J.drawLoop(f, t, "opt", Y), X.bumpVerticalPos(t.stopy - X.getVerticalPos()), X.models.addLoop(t);
|
|
3300
|
+
break;
|
|
3301
|
+
case o.db.LINETYPE.ALT_START:
|
|
3302
|
+
$(T, e, Y.boxMargin, Y.boxMargin + Y.boxTextMargin, (e) => X.newLoop(e));
|
|
3303
|
+
break;
|
|
3304
|
+
case o.db.LINETYPE.ALT_ELSE:
|
|
3305
|
+
$(T, e, Y.boxMargin + Y.boxTextMargin, Y.boxMargin, (e) => X.addSectionToLoop(e));
|
|
3306
|
+
break;
|
|
3307
|
+
case o.db.LINETYPE.ALT_END:
|
|
3308
|
+
t = X.endLoop(), await J.drawLoop(f, t, "alt", Y), X.bumpVerticalPos(t.stopy - X.getVerticalPos()), X.models.addLoop(t);
|
|
3309
|
+
break;
|
|
3310
|
+
case o.db.LINETYPE.PAR_START:
|
|
3311
|
+
case o.db.LINETYPE.PAR_OVER_START:
|
|
3312
|
+
$(T, e, Y.boxMargin, Y.boxMargin + Y.boxTextMargin, (e) => X.newLoop(e)), X.saveVerticalPos();
|
|
3313
|
+
break;
|
|
3314
|
+
case o.db.LINETYPE.PAR_AND:
|
|
3315
|
+
$(T, e, Y.boxMargin + Y.boxTextMargin, Y.boxMargin, (e) => X.addSectionToLoop(e));
|
|
3316
|
+
break;
|
|
3317
|
+
case o.db.LINETYPE.PAR_END:
|
|
3318
|
+
t = X.endLoop(), await J.drawLoop(f, t, "par", Y), X.bumpVerticalPos(t.stopy - X.getVerticalPos()), X.models.addLoop(t);
|
|
3319
|
+
break;
|
|
3320
|
+
case o.db.LINETYPE.AUTONUMBER:
|
|
3321
|
+
D = e.message.start || D, O = e.message.step || O, e.message.visible ? o.db.enableSequenceNumbers() : o.db.disableSequenceNumbers();
|
|
3322
|
+
break;
|
|
3323
|
+
case o.db.LINETYPE.CRITICAL_START:
|
|
3324
|
+
$(T, e, Y.boxMargin, Y.boxMargin + Y.boxTextMargin, (e) => X.newLoop(e));
|
|
3325
|
+
break;
|
|
3326
|
+
case o.db.LINETYPE.CRITICAL_OPTION:
|
|
3327
|
+
$(T, e, Y.boxMargin + Y.boxTextMargin, Y.boxMargin, (e) => X.addSectionToLoop(e));
|
|
3328
|
+
break;
|
|
3329
|
+
case o.db.LINETYPE.CRITICAL_END:
|
|
3330
|
+
t = X.endLoop(), await J.drawLoop(f, t, "critical", Y), X.bumpVerticalPos(t.stopy - X.getVerticalPos()), X.models.addLoop(t);
|
|
3331
|
+
break;
|
|
3332
|
+
case o.db.LINETYPE.BREAK_START:
|
|
3333
|
+
$(T, e, Y.boxMargin, Y.boxMargin + Y.boxTextMargin, (e) => X.newLoop(e));
|
|
3334
|
+
break;
|
|
3335
|
+
case o.db.LINETYPE.BREAK_END:
|
|
3336
|
+
t = X.endLoop(), await J.drawLoop(f, t, "break", Y), X.bumpVerticalPos(t.stopy - X.getVerticalPos()), X.models.addLoop(t);
|
|
3337
|
+
break;
|
|
3338
|
+
default: try {
|
|
3339
|
+
i = e.msgModel, i.starty = X.getVerticalPos(), i.sequenceIndex = D, i.sequenceVisible = o.db.showSequenceNumbers();
|
|
3340
|
+
let t = await Pe(f, i);
|
|
3341
|
+
He(e, i, t, j, p, m, _), k.push({
|
|
3342
|
+
messageModel: i,
|
|
3343
|
+
lineStartY: t
|
|
3344
|
+
}), X.models.addMessage(i);
|
|
3345
|
+
} catch (e) {
|
|
3346
|
+
n.error("error while drawing message", e);
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
[
|
|
3350
|
+
o.db.LINETYPE.SOLID_OPEN,
|
|
3351
|
+
o.db.LINETYPE.DOTTED_OPEN,
|
|
3352
|
+
o.db.LINETYPE.SOLID,
|
|
3353
|
+
o.db.LINETYPE.DOTTED,
|
|
3354
|
+
o.db.LINETYPE.SOLID_CROSS,
|
|
3355
|
+
o.db.LINETYPE.DOTTED_CROSS,
|
|
3356
|
+
o.db.LINETYPE.SOLID_POINT,
|
|
3357
|
+
o.db.LINETYPE.DOTTED_POINT,
|
|
3358
|
+
o.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
3359
|
+
o.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
3360
|
+
].includes(e.type) && (D += O), j++;
|
|
3361
|
+
}
|
|
3362
|
+
n.debug("createdActors", m), n.debug("destroyedActors", _), await Le(f, p, y, !1);
|
|
3363
|
+
for (let e of k) await Fe(f, e.messageModel, e.lineStartY, o);
|
|
3364
|
+
Y.mirrorActors && await Le(f, p, y, !0), A.forEach((e) => J.drawBackgroundRect(f, e)), se(f, p, y, Y);
|
|
3365
|
+
for (let e of X.models.boxes) {
|
|
3366
|
+
e.height = X.getVerticalPos() - e.y, X.insert(e.x, e.y, e.x + e.width, e.height);
|
|
3367
|
+
let t = Y.boxMargin * 2;
|
|
3368
|
+
e.startx = e.x - t, e.starty = e.y - t * .25, e.stopx = e.startx + e.width + 2 * t, e.stopy = e.starty + e.height + t * .75, e.stroke = "rgb(0,0,0, 0.5)", J.drawBox(f, e, Y);
|
|
3369
|
+
}
|
|
3370
|
+
S && X.bumpVerticalPos(Y.boxMargin);
|
|
3371
|
+
let M = Re(f, p, y, d), { bounds: N } = X.getBounds();
|
|
3372
|
+
N.startx === void 0 && (N.startx = 0), N.starty === void 0 && (N.starty = 0), N.stopx === void 0 && (N.stopx = 0), N.stopy === void 0 && (N.stopy = 0);
|
|
3373
|
+
let P = N.stopy - N.starty;
|
|
3374
|
+
P < M.maxHeight && (P = M.maxHeight);
|
|
3375
|
+
let F = P + 2 * Y.diagramMarginY;
|
|
3376
|
+
Y.mirrorActors && (F = F - Y.boxMargin + Y.bottomMarginAdj);
|
|
3377
|
+
let I = N.stopx - N.startx;
|
|
3378
|
+
I < M.maxWidth && (I = M.maxWidth);
|
|
3379
|
+
let L = I + 2 * Y.diagramMarginX;
|
|
3380
|
+
x && f.append("text").text(x).attr("x", (N.stopx - N.startx) / 2 - 2 * Y.diagramMarginX).attr("y", -25), g(f, F, L, Y.useMaxWidth);
|
|
3381
|
+
let R = x ? 40 : 0;
|
|
3382
|
+
f.attr("viewBox", N.startx - Y.diagramMarginX + " -" + (Y.diagramMarginY + R) + " " + L + " " + (F + R)), n.debug("models:", X.models);
|
|
3383
|
+
}, "draw");
|
|
3384
|
+
async function We(e, t, r) {
|
|
3385
|
+
let i = {};
|
|
3386
|
+
for (let n of t) if (e.get(n.to) && e.get(n.from)) {
|
|
3387
|
+
let t = e.get(n.to);
|
|
3388
|
+
if (n.placement === r.db.PLACEMENT.LEFTOF && !t.prevActor || n.placement === r.db.PLACEMENT.RIGHTOF && !t.nextActor) continue;
|
|
3389
|
+
let a = n.placement !== void 0, o = !a, s = a ? Q(Y) : Z(Y), c = n.wrap ? w.wrapLabel(n.message, Y.width - 2 * Y.wrapPadding, s) : n.message, l = (d(c) ? await _(n.message, h()) : w.calculateTextDimensions(c, s)).width + 2 * Y.wrapPadding;
|
|
3390
|
+
o && n.from === t.nextActor ? i[n.to] = y.getMax(i[n.to] || 0, l) : o && n.from === t.prevActor ? i[n.from] = y.getMax(i[n.from] || 0, l) : o && n.from === n.to ? (i[n.from] = y.getMax(i[n.from] || 0, l / 2), i[n.to] = y.getMax(i[n.to] || 0, l / 2)) : n.placement === r.db.PLACEMENT.RIGHTOF ? i[n.from] = y.getMax(i[n.from] || 0, l) : n.placement === r.db.PLACEMENT.LEFTOF ? i[t.prevActor] = y.getMax(i[t.prevActor] || 0, l) : n.placement === r.db.PLACEMENT.OVER && (t.prevActor && (i[t.prevActor] = y.getMax(i[t.prevActor] || 0, l / 2)), t.nextActor && (i[n.from] = y.getMax(i[n.from] || 0, l / 2)));
|
|
3391
|
+
}
|
|
3392
|
+
return n.debug("maxMessageWidthPerActor:", i), i;
|
|
3393
|
+
}
|
|
3394
|
+
r(We, "getMaxMessageWidthPerActor");
|
|
3395
|
+
var Ge = /* @__PURE__ */ r(function(e) {
|
|
3396
|
+
let t = 0, n = Ne(Y);
|
|
3397
|
+
for (let r in e.links) {
|
|
3398
|
+
let e = w.calculateTextDimensions(r, n).width + 2 * Y.wrapPadding + 2 * Y.boxMargin;
|
|
3399
|
+
t < e && (t = e);
|
|
3400
|
+
}
|
|
3401
|
+
return t;
|
|
3402
|
+
}, "getRequiredPopupWidth");
|
|
3403
|
+
async function Ke(e, t, n) {
|
|
3404
|
+
let r = 0;
|
|
3405
|
+
for (let t of e.keys()) {
|
|
3406
|
+
let n = e.get(t);
|
|
3407
|
+
n.wrap && (n.description = w.wrapLabel(n.description, Y.width - 2 * Y.wrapPadding, Ne(Y)));
|
|
3408
|
+
let i = d(n.description) ? await _(n.description, h()) : w.calculateTextDimensions(n.description, Ne(Y));
|
|
3409
|
+
n.width = n.wrap ? Y.width : y.getMax(Y.width, i.width + 2 * Y.wrapPadding), n.height = n.wrap ? y.getMax(i.height, Y.height) : Y.height, r = y.getMax(r, n.height);
|
|
3410
|
+
}
|
|
3411
|
+
for (let n in t) {
|
|
3412
|
+
let r = e.get(n);
|
|
3413
|
+
if (!r) continue;
|
|
3414
|
+
let i = e.get(r.nextActor);
|
|
3415
|
+
if (!i) {
|
|
3416
|
+
let e = t[n] + Y.actorMargin - r.width / 2;
|
|
3417
|
+
r.margin = y.getMax(e, Y.actorMargin);
|
|
3418
|
+
continue;
|
|
3419
|
+
}
|
|
3420
|
+
let a = t[n] + Y.actorMargin - r.width / 2 - i.width / 2;
|
|
3421
|
+
r.margin = y.getMax(a, Y.actorMargin);
|
|
3422
|
+
}
|
|
3423
|
+
let i = 0;
|
|
3424
|
+
return n.forEach((t) => {
|
|
3425
|
+
let n = Z(Y), r = t.actorKeys.reduce((t, n) => t += e.get(n).width + (e.get(n).margin || 0), 0), a = Y.boxMargin * 8;
|
|
3426
|
+
r += a, r -= 2 * Y.boxTextMargin, t.wrap && (t.name = w.wrapLabel(t.name, r - 2 * Y.wrapPadding, n));
|
|
3427
|
+
let o = w.calculateTextDimensions(t.name, n);
|
|
3428
|
+
i = y.getMax(o.height, i);
|
|
3429
|
+
let s = y.getMax(r, o.width + 2 * Y.wrapPadding);
|
|
3430
|
+
if (t.margin = Y.boxTextMargin, r < s) {
|
|
3431
|
+
let e = (s - r) / 2;
|
|
3432
|
+
t.margin += e;
|
|
3433
|
+
}
|
|
3434
|
+
}), n.forEach((e) => e.textMaxHeight = i), y.getMax(r, Y.height);
|
|
3435
|
+
}
|
|
3436
|
+
r(Ke, "calculateActorMargins");
|
|
3437
|
+
var qe = /* @__PURE__ */ r(async function(e, t, r) {
|
|
3438
|
+
let i = t.get(e.from), a = t.get(e.to), o = i.x, s = a.x, c = e.wrap && e.message, l = d(e.message) ? await _(e.message, h()) : w.calculateTextDimensions(c ? w.wrapLabel(e.message, Y.width, Q(Y)) : e.message, Q(Y)), u = {
|
|
3439
|
+
width: c ? Y.width : y.getMax(Y.width, l.width + 2 * Y.noteMargin),
|
|
3440
|
+
height: 0,
|
|
3441
|
+
startx: i.x,
|
|
3442
|
+
stopx: 0,
|
|
3443
|
+
starty: 0,
|
|
3444
|
+
stopy: 0,
|
|
3445
|
+
message: e.message
|
|
3446
|
+
};
|
|
3447
|
+
return e.placement === r.db.PLACEMENT.RIGHTOF ? (u.width = c ? y.getMax(Y.width, l.width) : y.getMax(i.width / 2 + a.width / 2, l.width + 2 * Y.noteMargin), u.startx = o + (i.width + Y.actorMargin) / 2) : e.placement === r.db.PLACEMENT.LEFTOF ? (u.width = c ? y.getMax(Y.width, l.width + 2 * Y.noteMargin) : y.getMax(i.width / 2 + a.width / 2, l.width + 2 * Y.noteMargin), u.startx = o - u.width + (i.width - Y.actorMargin) / 2) : e.to === e.from ? (l = w.calculateTextDimensions(c ? w.wrapLabel(e.message, y.getMax(Y.width, i.width), Q(Y)) : e.message, Q(Y)), u.width = c ? y.getMax(Y.width, i.width) : y.getMax(i.width, Y.width, l.width + 2 * Y.noteMargin), u.startx = o + (i.width - u.width) / 2) : (u.width = Math.abs(o + i.width / 2 - (s + a.width / 2)) + Y.actorMargin, u.startx = o < s ? o + i.width / 2 - Y.actorMargin / 2 : s + a.width / 2 - Y.actorMargin / 2), c && (u.message = w.wrapLabel(e.message, u.width - 2 * Y.wrapPadding, Q(Y))), n.debug(`NM:[${u.startx},${u.stopx},${u.starty},${u.stopy}:${u.width},${u.height}=${e.message}]`), u;
|
|
3448
|
+
}, "buildNoteModel"), Je = /* @__PURE__ */ r(function(e, t, n) {
|
|
3449
|
+
if (![
|
|
3450
|
+
n.db.LINETYPE.SOLID_OPEN,
|
|
3451
|
+
n.db.LINETYPE.DOTTED_OPEN,
|
|
3452
|
+
n.db.LINETYPE.SOLID,
|
|
3453
|
+
n.db.LINETYPE.DOTTED,
|
|
3454
|
+
n.db.LINETYPE.SOLID_CROSS,
|
|
3455
|
+
n.db.LINETYPE.DOTTED_CROSS,
|
|
3456
|
+
n.db.LINETYPE.SOLID_POINT,
|
|
3457
|
+
n.db.LINETYPE.DOTTED_POINT,
|
|
3458
|
+
n.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
3459
|
+
n.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
3460
|
+
].includes(e.type)) return {};
|
|
3461
|
+
let [i, a] = Ve(e.from, t), [o, s] = Ve(e.to, t), c = i <= o, l = c ? a : i, u = c ? o : s, d = Math.abs(o - s) > 2, f = /* @__PURE__ */ r((e) => c ? -e : e, "adjustValue");
|
|
3462
|
+
e.from === e.to ? u = l : (e.activate && !d && (u += f(Y.activationWidth / 2 - 1)), [n.db.LINETYPE.SOLID_OPEN, n.db.LINETYPE.DOTTED_OPEN].includes(e.type) || (u += f(3)), [n.db.LINETYPE.BIDIRECTIONAL_SOLID, n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type) && (l -= f(3)));
|
|
3463
|
+
let p = [
|
|
3464
|
+
i,
|
|
3465
|
+
a,
|
|
3466
|
+
o,
|
|
3467
|
+
s
|
|
3468
|
+
], m = Math.abs(l - u);
|
|
3469
|
+
e.wrap && e.message && (e.message = w.wrapLabel(e.message, y.getMax(m + 2 * Y.wrapPadding, Y.width), Z(Y)));
|
|
3470
|
+
let h = w.calculateTextDimensions(e.message, Z(Y));
|
|
3471
|
+
return {
|
|
3472
|
+
width: y.getMax(e.wrap ? 0 : h.width + 2 * Y.wrapPadding, m + 2 * Y.wrapPadding, Y.width),
|
|
3473
|
+
height: 0,
|
|
3474
|
+
startx: l,
|
|
3475
|
+
stopx: u,
|
|
3476
|
+
starty: 0,
|
|
3477
|
+
stopy: 0,
|
|
3478
|
+
message: e.message,
|
|
3479
|
+
type: e.type,
|
|
3480
|
+
wrap: e.wrap,
|
|
3481
|
+
fromBounds: Math.min.apply(null, p),
|
|
3482
|
+
toBounds: Math.max.apply(null, p)
|
|
3483
|
+
};
|
|
3484
|
+
}, "buildMessageModel"), Ye = /* @__PURE__ */ r(async function(e, t, r, i) {
|
|
3485
|
+
let a = {}, o = [], s, c, l;
|
|
3486
|
+
for (let n of e) {
|
|
3487
|
+
switch (n.type) {
|
|
3488
|
+
case i.db.LINETYPE.LOOP_START:
|
|
3489
|
+
case i.db.LINETYPE.ALT_START:
|
|
3490
|
+
case i.db.LINETYPE.OPT_START:
|
|
3491
|
+
case i.db.LINETYPE.PAR_START:
|
|
3492
|
+
case i.db.LINETYPE.PAR_OVER_START:
|
|
3493
|
+
case i.db.LINETYPE.CRITICAL_START:
|
|
3494
|
+
case i.db.LINETYPE.BREAK_START:
|
|
3495
|
+
o.push({
|
|
3496
|
+
id: n.id,
|
|
3497
|
+
msg: n.message,
|
|
3498
|
+
from: 2 ** 53 - 1,
|
|
3499
|
+
to: -(2 ** 53 - 1),
|
|
3500
|
+
width: 0
|
|
3501
|
+
});
|
|
3502
|
+
break;
|
|
3503
|
+
case i.db.LINETYPE.ALT_ELSE:
|
|
3504
|
+
case i.db.LINETYPE.PAR_AND:
|
|
3505
|
+
case i.db.LINETYPE.CRITICAL_OPTION:
|
|
3506
|
+
n.message && (s = o.pop(), a[s.id] = s, a[n.id] = s, o.push(s));
|
|
3507
|
+
break;
|
|
3508
|
+
case i.db.LINETYPE.LOOP_END:
|
|
3509
|
+
case i.db.LINETYPE.ALT_END:
|
|
3510
|
+
case i.db.LINETYPE.OPT_END:
|
|
3511
|
+
case i.db.LINETYPE.PAR_END:
|
|
3512
|
+
case i.db.LINETYPE.CRITICAL_END:
|
|
3513
|
+
case i.db.LINETYPE.BREAK_END:
|
|
3514
|
+
s = o.pop(), a[s.id] = s;
|
|
3515
|
+
break;
|
|
3516
|
+
case i.db.LINETYPE.ACTIVE_START:
|
|
3517
|
+
{
|
|
3518
|
+
let e = t.get(n.from ? n.from : n.to.actor), r = Be(n.from ? n.from : n.to.actor).length, i = e.x + e.width / 2 + (r - 1) * Y.activationWidth / 2, a = {
|
|
3519
|
+
startx: i,
|
|
3520
|
+
stopx: i + Y.activationWidth,
|
|
3521
|
+
actor: n.from,
|
|
3522
|
+
enabled: !0
|
|
3523
|
+
};
|
|
3524
|
+
X.activations.push(a);
|
|
3525
|
+
}
|
|
3526
|
+
break;
|
|
3527
|
+
case i.db.LINETYPE.ACTIVE_END:
|
|
3528
|
+
{
|
|
3529
|
+
let e = X.activations.map((e) => e.actor).lastIndexOf(n.from);
|
|
3530
|
+
X.activations.splice(e, 1).splice(0, 1);
|
|
3531
|
+
}
|
|
3532
|
+
break;
|
|
3533
|
+
}
|
|
3534
|
+
n.placement === void 0 ? (l = Je(n, t, i), n.msgModel = l, l.startx && l.stopx && o.length > 0 && o.forEach((e) => {
|
|
3535
|
+
if (s = e, l.startx === l.stopx) {
|
|
3536
|
+
let e = t.get(n.from), r = t.get(n.to);
|
|
3537
|
+
s.from = y.getMin(e.x - l.width / 2, e.x - e.width / 2, s.from), s.to = y.getMax(r.x + l.width / 2, r.x + e.width / 2, s.to), s.width = y.getMax(s.width, Math.abs(s.to - s.from)) - Y.labelBoxWidth;
|
|
3538
|
+
} else s.from = y.getMin(l.startx, s.from), s.to = y.getMax(l.stopx, s.to), s.width = y.getMax(s.width, l.width) - Y.labelBoxWidth;
|
|
3539
|
+
})) : (c = await qe(n, t, i), n.noteModel = c, o.forEach((e) => {
|
|
3540
|
+
s = e, s.from = y.getMin(s.from, c.startx), s.to = y.getMax(s.to, c.startx + c.width), s.width = y.getMax(s.width, Math.abs(s.from - s.to)) - Y.labelBoxWidth;
|
|
3541
|
+
}));
|
|
3542
|
+
}
|
|
3543
|
+
return X.activations = [], n.debug("Loop type widths:", a), a;
|
|
3544
|
+
}, "calculateLoopBounds"), Xe = {
|
|
3545
|
+
parser: F,
|
|
3546
|
+
get db() {
|
|
3547
|
+
return new ee();
|
|
3548
|
+
},
|
|
3549
|
+
renderer: {
|
|
3550
|
+
bounds: X,
|
|
3551
|
+
drawActors: Le,
|
|
3552
|
+
drawActorsPopup: Re,
|
|
3553
|
+
setConf: ze,
|
|
3554
|
+
draw: Ue
|
|
3555
|
+
},
|
|
3556
|
+
styles: te,
|
|
3557
|
+
init: /* @__PURE__ */ r((e) => {
|
|
3558
|
+
e.sequence ||= {}, e.wrap && (e.sequence.wrap = e.wrap, c({ sequence: { wrap: e.wrap } }));
|
|
3559
|
+
}, "init")
|
|
3560
|
+
};
|
|
3561
|
+
//#endregion
|
|
3562
|
+
export { Xe as diagram };
|