mio-previewer 0.2.73 → 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/README.md +1 -0
- package/README.zh-CN.md +2 -1
- 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,294 @@
|
|
|
1
|
+
import { g as e, h as t } from "./src-BuisGndr.js";
|
|
2
|
+
import { b as n } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
|
|
3
|
+
import "./chunk-S3R3BYOJ-CG6GoSCd.js";
|
|
4
|
+
import "./chunk-HN2XXSSU-CJL8wAZ2.js";
|
|
5
|
+
import { t as r } from "./chunk-CVBHYZKI-CiCGetln.js";
|
|
6
|
+
import "./chunk-ATLVNIR6-DHlCNWnJ.js";
|
|
7
|
+
import "./chunk-JA3XYJ7Z-CpKHrbOX.js";
|
|
8
|
+
import { a as i, c as a, i as o, l as s, n as c, t as l, u } from "./chunk-JZLCHNYA-CYo7ykJf.js";
|
|
9
|
+
import { a as d, i as f, n as p, r as m, t as h } from "./chunk-QXUST7PY-CxCAwQqP.js";
|
|
10
|
+
import { r as g } from "./_baseUniq-CGoiOkSa.js";
|
|
11
|
+
import { s as _ } from "./_basePickBy-CXmXW7jd.js";
|
|
12
|
+
import { t as v } from "./dagre-BfAHSwtP.js";
|
|
13
|
+
import { t as y } from "./clone-B0KDIkSS.js";
|
|
14
|
+
import { t as b } from "./graphlib-C3tPLMbC.js";
|
|
15
|
+
//#region node_modules/.pnpm/dagre-d3-es@7.0.11/node_modules/dagre-d3-es/src/graphlib/json.js
|
|
16
|
+
function x(e) {
|
|
17
|
+
var t = {
|
|
18
|
+
options: {
|
|
19
|
+
directed: e.isDirected(),
|
|
20
|
+
multigraph: e.isMultigraph(),
|
|
21
|
+
compound: e.isCompound()
|
|
22
|
+
},
|
|
23
|
+
nodes: S(e),
|
|
24
|
+
edges: C(e)
|
|
25
|
+
};
|
|
26
|
+
return g(e.graph()) || (t.value = y(e.graph())), t;
|
|
27
|
+
}
|
|
28
|
+
function S(e) {
|
|
29
|
+
return _(e.nodes(), function(t) {
|
|
30
|
+
var n = e.node(t), r = e.parent(t), i = { v: t };
|
|
31
|
+
return g(n) || (i.value = n), g(r) || (i.parent = r), i;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function C(e) {
|
|
35
|
+
return _(e.edges(), function(t) {
|
|
36
|
+
var n = e.edge(t), r = {
|
|
37
|
+
v: t.v,
|
|
38
|
+
w: t.w
|
|
39
|
+
};
|
|
40
|
+
return g(t.name) || (r.name = t.name), g(n) || (r.value = n), r;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.mjs
|
|
45
|
+
var w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ t(() => {
|
|
46
|
+
T.clear(), E.clear(), w.clear();
|
|
47
|
+
}, "clear"), O = /* @__PURE__ */ t((t, n) => {
|
|
48
|
+
let r = T.get(n) || [];
|
|
49
|
+
return e.trace("In isDescendant", n, " ", t, " = ", r.includes(t)), r.includes(t);
|
|
50
|
+
}, "isDescendant"), k = /* @__PURE__ */ t((t, n) => {
|
|
51
|
+
let r = T.get(n) || [];
|
|
52
|
+
return e.info("Descendants of ", n, " is ", r), e.info("Edge is ", t), t.v === n || t.w === n ? !1 : r ? r.includes(t.v) || O(t.v, n) || O(t.w, n) || r.includes(t.w) : (e.debug("Tilt, ", n, ",not in descendants"), !1);
|
|
53
|
+
}, "edgeInCluster"), A = /* @__PURE__ */ t((t, n, r, i) => {
|
|
54
|
+
e.warn("Copying children of ", t, "root", i, "data", n.node(t), i);
|
|
55
|
+
let a = n.children(t) || [];
|
|
56
|
+
t !== i && a.push(t), e.warn("Copying (nodes) clusterId", t, "nodes", a), a.forEach((a) => {
|
|
57
|
+
if (n.children(a).length > 0) A(a, n, r, i);
|
|
58
|
+
else {
|
|
59
|
+
let o = n.node(a);
|
|
60
|
+
e.info("cp ", a, " to ", i, " with parent ", t), r.setNode(a, o), i !== n.parent(a) && (e.warn("Setting parent", a, n.parent(a)), r.setParent(a, n.parent(a))), t !== i && a !== t ? (e.debug("Setting parent", a, t), r.setParent(a, t)) : (e.info("In copy ", t, "root", i, "data", n.node(t), i), e.debug("Not Setting parent for node=", a, "cluster!==rootId", t !== i, "node!==clusterId", a !== t));
|
|
61
|
+
let s = n.edges(a);
|
|
62
|
+
e.debug("Copying Edges", s), s.forEach((a) => {
|
|
63
|
+
e.info("Edge", a);
|
|
64
|
+
let o = n.edge(a.v, a.w, a.name);
|
|
65
|
+
e.info("Edge data", o, i);
|
|
66
|
+
try {
|
|
67
|
+
k(a, i) ? (e.info("Copying as ", a.v, a.w, o, a.name), r.setEdge(a.v, a.w, o, a.name), e.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : e.info("Skipping copy of edge ", a.v, "-->", a.w, " rootId: ", i, " clusterId:", t);
|
|
68
|
+
} catch (t) {
|
|
69
|
+
e.error(t);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
e.debug("Removing node", a), n.removeNode(a);
|
|
74
|
+
});
|
|
75
|
+
}, "copy"), j = /* @__PURE__ */ t((e, t) => {
|
|
76
|
+
let n = t.children(e), r = [...n];
|
|
77
|
+
for (let i of n) E.set(i, e), r = [...r, ...j(i, t)];
|
|
78
|
+
return r;
|
|
79
|
+
}, "extractDescendants"), M = /* @__PURE__ */ t((e, t, n) => {
|
|
80
|
+
let r = e.edges().filter((e) => e.v === t || e.w === t), i = e.edges().filter((e) => e.v === n || e.w === n), a = r.map((e) => ({
|
|
81
|
+
v: e.v === t ? n : e.v,
|
|
82
|
+
w: e.w === t ? t : e.w
|
|
83
|
+
})), o = i.map((e) => ({
|
|
84
|
+
v: e.v,
|
|
85
|
+
w: e.w
|
|
86
|
+
}));
|
|
87
|
+
return a.filter((e) => o.some((t) => e.v === t.v && e.w === t.w));
|
|
88
|
+
}, "findCommonEdges"), N = /* @__PURE__ */ t((t, n, r) => {
|
|
89
|
+
let i = n.children(t);
|
|
90
|
+
if (e.trace("Searching children of id ", t, i), i.length < 1) return t;
|
|
91
|
+
let a;
|
|
92
|
+
for (let e of i) {
|
|
93
|
+
let t = N(e, n, r), i = M(n, r, t);
|
|
94
|
+
if (t) if (i.length > 0) a = t;
|
|
95
|
+
else return t;
|
|
96
|
+
}
|
|
97
|
+
return a;
|
|
98
|
+
}, "findNonClusterChild"), P = /* @__PURE__ */ t((e) => !w.has(e) || !w.get(e).externalConnections ? e : w.has(e) ? w.get(e).id : e, "getAnchorId"), F = /* @__PURE__ */ t((t, n) => {
|
|
99
|
+
if (!t || n > 10) {
|
|
100
|
+
e.debug("Opting out, no graph ");
|
|
101
|
+
return;
|
|
102
|
+
} else e.debug("Opting in, graph ");
|
|
103
|
+
t.nodes().forEach(function(n) {
|
|
104
|
+
t.children(n).length > 0 && (e.warn("Cluster identified", n, " Replacement id in edges: ", N(n, t, n)), T.set(n, j(n, t)), w.set(n, {
|
|
105
|
+
id: N(n, t, n),
|
|
106
|
+
clusterData: t.node(n)
|
|
107
|
+
}));
|
|
108
|
+
}), t.nodes().forEach(function(n) {
|
|
109
|
+
let r = t.children(n), i = t.edges();
|
|
110
|
+
r.length > 0 ? (e.debug("Cluster identified", n, T), i.forEach((t) => {
|
|
111
|
+
O(t.v, n) ^ O(t.w, n) && (e.warn("Edge: ", t, " leaves cluster ", n), e.warn("Descendants of XXX ", n, ": ", T.get(n)), w.get(n).externalConnections = !0);
|
|
112
|
+
})) : e.debug("Not a cluster ", n, T);
|
|
113
|
+
});
|
|
114
|
+
for (let e of w.keys()) {
|
|
115
|
+
let n = w.get(e).id, r = t.parent(n);
|
|
116
|
+
r !== e && w.has(r) && !w.get(r).externalConnections && (w.get(e).id = r);
|
|
117
|
+
}
|
|
118
|
+
t.edges().forEach(function(n) {
|
|
119
|
+
let r = t.edge(n);
|
|
120
|
+
e.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), e.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(t.edge(n)));
|
|
121
|
+
let i = n.v, a = n.w;
|
|
122
|
+
if (e.warn("Fix XXX", w, "ids:", n.v, n.w, "Translating: ", w.get(n.v), " --- ", w.get(n.w)), w.get(n.v) || w.get(n.w)) {
|
|
123
|
+
if (e.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), i = P(n.v), a = P(n.w), t.removeEdge(n.v, n.w, n.name), i !== n.v) {
|
|
124
|
+
let e = t.parent(i);
|
|
125
|
+
w.get(e).externalConnections = !0, r.fromCluster = n.v;
|
|
126
|
+
}
|
|
127
|
+
if (a !== n.w) {
|
|
128
|
+
let e = t.parent(a);
|
|
129
|
+
w.get(e).externalConnections = !0, r.toCluster = n.w;
|
|
130
|
+
}
|
|
131
|
+
e.warn("Fix Replacing with XXX", i, a, n.name), t.setEdge(i, a, r, n.name);
|
|
132
|
+
}
|
|
133
|
+
}), e.warn("Adjusted Graph", x(t)), I(t, 0), e.trace(w);
|
|
134
|
+
}, "adjustClustersAndEdges"), I = /* @__PURE__ */ t((t, n) => {
|
|
135
|
+
if (e.warn("extractor - ", n, x(t), t.children("D")), n > 10) {
|
|
136
|
+
e.error("Bailing out");
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
let r = t.nodes(), i = !1;
|
|
140
|
+
for (let e of r) {
|
|
141
|
+
let n = t.children(e);
|
|
142
|
+
i ||= n.length > 0;
|
|
143
|
+
}
|
|
144
|
+
if (!i) {
|
|
145
|
+
e.debug("Done, no node has children", t.nodes());
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
e.debug("Nodes = ", r, n);
|
|
149
|
+
for (let i of r) if (e.debug("Extracting node", i, w, w.has(i) && !w.get(i).externalConnections, !t.parent(i), t.node(i), t.children("D"), " Depth ", n), !w.has(i)) e.debug("Not a cluster", i, n);
|
|
150
|
+
else if (!w.get(i).externalConnections && t.children(i) && t.children(i).length > 0) {
|
|
151
|
+
e.warn("Cluster without external connections, without a parent and with children", i, n);
|
|
152
|
+
let r = t.graph().rankdir === "TB" ? "LR" : "TB";
|
|
153
|
+
w.get(i)?.clusterData?.dir && (r = w.get(i).clusterData.dir, e.warn("Fixing dir", w.get(i).clusterData.dir, r));
|
|
154
|
+
let a = new b({
|
|
155
|
+
multigraph: !0,
|
|
156
|
+
compound: !0
|
|
157
|
+
}).setGraph({
|
|
158
|
+
rankdir: r,
|
|
159
|
+
nodesep: 50,
|
|
160
|
+
ranksep: 50,
|
|
161
|
+
marginx: 8,
|
|
162
|
+
marginy: 8
|
|
163
|
+
}).setDefaultEdgeLabel(function() {
|
|
164
|
+
return {};
|
|
165
|
+
});
|
|
166
|
+
e.warn("Old graph before copy", x(t)), A(i, t, a, i), t.setNode(i, {
|
|
167
|
+
clusterNode: !0,
|
|
168
|
+
id: i,
|
|
169
|
+
clusterData: w.get(i).clusterData,
|
|
170
|
+
label: w.get(i).label,
|
|
171
|
+
graph: a
|
|
172
|
+
}), e.warn("New graph after copy node: (", i, ")", x(a)), e.debug("Old graph after copy", x(t));
|
|
173
|
+
} else e.warn("Cluster ** ", i, " **not meeting the criteria !externalConnections:", !w.get(i).externalConnections, " no parent: ", !t.parent(i), " children ", t.children(i) && t.children(i).length > 0, t.children("D"), n), e.debug(w);
|
|
174
|
+
r = t.nodes(), e.warn("New list of nodes", r);
|
|
175
|
+
for (let i of r) {
|
|
176
|
+
let r = t.node(i);
|
|
177
|
+
e.warn(" Now next level", i, r), r?.clusterNode && I(r.graph, n + 1);
|
|
178
|
+
}
|
|
179
|
+
}, "extractor"), L = /* @__PURE__ */ t((e, t) => {
|
|
180
|
+
if (t.length === 0) return [];
|
|
181
|
+
let n = Object.assign([], t);
|
|
182
|
+
return t.forEach((t) => {
|
|
183
|
+
let r = L(e, e.children(t));
|
|
184
|
+
n = [...n, ...r];
|
|
185
|
+
}), n;
|
|
186
|
+
}, "sorter"), R = /* @__PURE__ */ t((e) => L(e, e.children()), "sortNodesByHierarchy"), z = /* @__PURE__ */ t(async (n, c, l, f, h, g) => {
|
|
187
|
+
e.warn("Graph in recursive render:XAX", x(c), h);
|
|
188
|
+
let _ = c.graph().rankdir;
|
|
189
|
+
e.trace("Dir in recursive render - dir:", _);
|
|
190
|
+
let y = n.insert("g").attr("class", "root");
|
|
191
|
+
c.nodes() ? e.info("Recursive render XXX", c.nodes()) : e.info("No nodes found for", c), c.edges().length > 0 && e.info("Recursive edges", c.edge(c.edges()[0]));
|
|
192
|
+
let b = y.insert("g").attr("class", "clusters"), S = y.insert("g").attr("class", "edgePaths"), C = y.insert("g").attr("class", "edgeLabels"), T = y.insert("g").attr("class", "nodes");
|
|
193
|
+
await Promise.all(c.nodes().map(async function(t) {
|
|
194
|
+
let n = c.node(t);
|
|
195
|
+
if (h !== void 0) {
|
|
196
|
+
let n = JSON.parse(JSON.stringify(h.clusterData));
|
|
197
|
+
e.trace("Setting data for parent cluster XXX\n Node.id = ", t, "\n data=", n.height, "\nParent cluster", h.height), c.setNode(h.id, n), c.parent(t) || (e.trace("Setting parent", t, h.id), c.setParent(t, h.id, n));
|
|
198
|
+
}
|
|
199
|
+
if (e.info("(Insert) Node XXX" + t + ": " + JSON.stringify(c.node(t))), n?.clusterNode) {
|
|
200
|
+
e.info("Cluster identified XBX", t, n.width, c.node(t));
|
|
201
|
+
let { ranksep: r, nodesep: i } = c.graph();
|
|
202
|
+
n.graph.setGraph({
|
|
203
|
+
...n.graph.graph(),
|
|
204
|
+
ranksep: r + 25,
|
|
205
|
+
nodesep: i
|
|
206
|
+
});
|
|
207
|
+
let a = await z(T, n.graph, l, f, c.node(t), g), o = a.elem;
|
|
208
|
+
u(n, o), n.diff = a.diff || 0, e.info("New compound node after recursive render XAX", t, "width", n.width, "height", n.height), s(o, n);
|
|
209
|
+
} else c.children(t).length > 0 ? (e.trace("Cluster - the non recursive path XBX", t, n.id, n, n.width, "Graph:", c), e.trace(N(n.id, c)), w.set(n.id, {
|
|
210
|
+
id: N(n.id, c),
|
|
211
|
+
node: n
|
|
212
|
+
})) : (e.trace("Node - the non recursive path XAX", t, T, c.node(t), _), await i(T, c.node(t), {
|
|
213
|
+
config: g,
|
|
214
|
+
dir: _
|
|
215
|
+
}));
|
|
216
|
+
})), await (/* @__PURE__ */ t(async () => {
|
|
217
|
+
let t = c.edges().map(async function(t) {
|
|
218
|
+
let n = c.edge(t.v, t.w, t.name);
|
|
219
|
+
e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(t)), e.info("Edge " + t.v + " -> " + t.w + ": ", t, " ", JSON.stringify(c.edge(t))), e.info("Fix", w, "ids:", t.v, t.w, "Translating: ", w.get(t.v), w.get(t.w)), await m(C, n);
|
|
220
|
+
});
|
|
221
|
+
await Promise.all(t);
|
|
222
|
+
}, "processEdges"))(), e.info("Graph before layout:", JSON.stringify(x(c))), e.info("############################################# XXX"), e.info("### Layout ### XXX"), e.info("############################################# XXX"), v(c), e.info("Graph after layout:", JSON.stringify(x(c)));
|
|
223
|
+
let E = 0, { subGraphTitleTotalMargin: D } = r(g);
|
|
224
|
+
return await Promise.all(R(c).map(async function(t) {
|
|
225
|
+
let n = c.node(t);
|
|
226
|
+
if (e.info("Position XBX => " + t + ": (" + n.x, "," + n.y, ") width: ", n.width, " height: ", n.height), n?.clusterNode) n.y += D, e.info("A tainted cluster node XBX1", t, n.id, n.width, n.height, n.x, n.y, c.parent(t)), w.get(n.id).node = n, a(n);
|
|
227
|
+
else if (c.children(t).length > 0) {
|
|
228
|
+
e.info("A pure cluster node XBX1", t, n.id, n.x, n.y, n.width, n.height, c.parent(t)), n.height += D, c.node(n.parentId);
|
|
229
|
+
let r = n?.padding / 2 || 0, i = n?.labelBBox?.height || 0, a = i - r || 0;
|
|
230
|
+
e.debug("OffsetY", a, "labelHeight", i, "halfPadding", r), await o(b, n), w.get(n.id).node = n;
|
|
231
|
+
} else {
|
|
232
|
+
let t = c.node(n.parentId);
|
|
233
|
+
n.y += D / 2, e.info("A regular node XBX1 - using the padding", n.id, "parent", n.parentId, n.width, n.height, n.x, n.y, "offsetY", n.offsetY, "parent", t, t?.offsetY, n), a(n);
|
|
234
|
+
}
|
|
235
|
+
})), c.edges().forEach(function(t) {
|
|
236
|
+
let n = c.edge(t);
|
|
237
|
+
e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(n), n), n.points.forEach((e) => e.y += D / 2), d(n, p(S, n, w, l, c.node(t.v), c.node(t.w), f));
|
|
238
|
+
}), c.nodes().forEach(function(t) {
|
|
239
|
+
let n = c.node(t);
|
|
240
|
+
e.info(t, n.type, n.diff), n.isGroup && (E = n.diff);
|
|
241
|
+
}), e.warn("Returning from recursive render XAX", y, E), {
|
|
242
|
+
elem: y,
|
|
243
|
+
diff: E
|
|
244
|
+
};
|
|
245
|
+
}, "recursiveRender"), B = /* @__PURE__ */ t(async (t, r) => {
|
|
246
|
+
let i = new b({
|
|
247
|
+
multigraph: !0,
|
|
248
|
+
compound: !0
|
|
249
|
+
}).setGraph({
|
|
250
|
+
rankdir: t.direction,
|
|
251
|
+
nodesep: t.config?.nodeSpacing || t.config?.flowchart?.nodeSpacing || t.nodeSpacing,
|
|
252
|
+
ranksep: t.config?.rankSpacing || t.config?.flowchart?.rankSpacing || t.rankSpacing,
|
|
253
|
+
marginx: 8,
|
|
254
|
+
marginy: 8
|
|
255
|
+
}).setDefaultEdgeLabel(function() {
|
|
256
|
+
return {};
|
|
257
|
+
}), a = r.select("g");
|
|
258
|
+
f(a, t.markers, t.type, t.diagramId), c(), h(), l(), D(), t.nodes.forEach((e) => {
|
|
259
|
+
i.setNode(e.id, { ...e }), e.parentId && i.setParent(e.id, e.parentId);
|
|
260
|
+
}), e.debug("Edges:", t.edges), t.edges.forEach((e) => {
|
|
261
|
+
if (e.start === e.end) {
|
|
262
|
+
let t = e.start, n = t + "---" + t + "---1", r = t + "---" + t + "---2", a = i.node(t);
|
|
263
|
+
i.setNode(n, {
|
|
264
|
+
domId: n,
|
|
265
|
+
id: n,
|
|
266
|
+
parentId: a.parentId,
|
|
267
|
+
labelStyle: "",
|
|
268
|
+
label: "",
|
|
269
|
+
padding: 0,
|
|
270
|
+
shape: "labelRect",
|
|
271
|
+
style: "",
|
|
272
|
+
width: 10,
|
|
273
|
+
height: 10
|
|
274
|
+
}), i.setParent(n, a.parentId), i.setNode(r, {
|
|
275
|
+
domId: r,
|
|
276
|
+
id: r,
|
|
277
|
+
parentId: a.parentId,
|
|
278
|
+
labelStyle: "",
|
|
279
|
+
padding: 0,
|
|
280
|
+
shape: "labelRect",
|
|
281
|
+
label: "",
|
|
282
|
+
style: "",
|
|
283
|
+
width: 10,
|
|
284
|
+
height: 10
|
|
285
|
+
}), i.setParent(r, a.parentId);
|
|
286
|
+
let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e);
|
|
287
|
+
o.label = "", o.arrowTypeEnd = "none", o.id = t + "-cyclic-special-1", s.arrowTypeStart = "none", s.arrowTypeEnd = "none", s.id = t + "-cyclic-special-mid", c.label = "", a.isGroup && (o.fromCluster = t, c.toCluster = t), c.id = t + "-cyclic-special-2", c.arrowTypeStart = "none", i.setEdge(t, n, o, t + "-cyclic-special-0"), i.setEdge(n, r, s, t + "-cyclic-special-1"), i.setEdge(r, t, c, t + "-cyc<lic-special-2");
|
|
288
|
+
} else i.setEdge(e.start, e.end, { ...e }, e.id);
|
|
289
|
+
}), e.warn("Graph at first:", JSON.stringify(x(i))), F(i), e.warn("Graph after XAX:", JSON.stringify(x(i)));
|
|
290
|
+
let o = n();
|
|
291
|
+
await z(a, i, t.type, t.diagramId, void 0, o);
|
|
292
|
+
}, "render");
|
|
293
|
+
//#endregion
|
|
294
|
+
export { B as render };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs");require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),require("./chunk-HN2XXSSU-BwmRMa2r.cjs");const n=require("./chunk-CVBHYZKI-CLVcv_xh.cjs");require("./chunk-ATLVNIR6-shAOudT0.cjs"),require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs");const r=require("./chunk-JZLCHNYA-CvPIQFXP.cjs"),i=require("./chunk-QXUST7PY-CnnfdJrM.cjs"),a=require("./_baseUniq-CYtOXxfV.cjs"),o=require("./_basePickBy-CtuVwROD.cjs"),s=require("./dagre-Buvkww-e.cjs"),c=require("./clone-wvtBTB6v.cjs"),l=require("./graphlib-Cdg0u3TT.cjs");function u(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:d(e),edges:f(e)};return a.r(e.graph())||(t.value=c.t(e.graph())),t}function d(e){return o.s(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return a.r(n)||(i.value=n),a.r(r)||(i.parent=r),i})}function f(e){return o.s(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return a.r(t.name)||(r.name=t.name),a.r(n)||(r.value=n),r})}var p=new Map,m=new Map,h=new Map,g=e.h(()=>{m.clear(),h.clear(),p.clear()},`clear`),_=e.h((t,n)=>{let r=m.get(n)||[];return e.g.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),v=e.h((t,n)=>{let r=m.get(n)||[];return e.g.info(`Descendants of `,n,` is `,r),e.g.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||_(t.v,n)||_(t.w,n)||r.includes(t.w):(e.g.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),y=e.h((t,n,r,i)=>{e.g.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.g.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)y(a,n,r,i);else{let o=n.node(a);e.g.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.g.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.g.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.g.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.g.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.g.debug(`Copying Edges`,s),s.forEach(a=>{e.g.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.g.info(`Edge data`,o,i);try{v(a,i)?(e.g.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.g.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.g.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.g.error(t)}})}e.g.debug(`Removing node`,a),n.removeNode(a)})},`copy`),b=e.h((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)h.set(i,e),r=[...r,...b(i,t)];return r},`extractDescendants`),x=e.h((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),S=e.h((t,n,r)=>{let i=n.children(t);if(e.g.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=S(e,n,r),i=x(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),C=e.h(e=>!p.has(e)||!p.get(e).externalConnections?e:p.has(e)?p.get(e).id:e,`getAnchorId`),w=e.h((t,n)=>{if(!t||n>10){e.g.debug(`Opting out, no graph `);return}else e.g.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.g.warn(`Cluster identified`,n,` Replacement id in edges: `,S(n,t,n)),m.set(n,b(n,t)),p.set(n,{id:S(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.g.debug(`Cluster identified`,n,m),i.forEach(t=>{_(t.v,n)^_(t.w,n)&&(e.g.warn(`Edge: `,t,` leaves cluster `,n),e.g.warn(`Descendants of XXX `,n,`: `,m.get(n)),p.get(n).externalConnections=!0)})):e.g.debug(`Not a cluster `,n,m)});for(let e of p.keys()){let n=p.get(e).id,r=t.parent(n);r!==e&&p.has(r)&&!p.get(r).externalConnections&&(p.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.g.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.g.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.g.warn(`Fix XXX`,p,`ids:`,n.v,n.w,`Translating: `,p.get(n.v),` --- `,p.get(n.w)),p.get(n.v)||p.get(n.w)){if(e.g.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=C(n.v),a=C(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);p.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);p.get(e).externalConnections=!0,r.toCluster=n.w}e.g.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.g.warn(`Adjusted Graph`,u(t)),T(t,0),e.g.trace(p)},`adjustClustersAndEdges`),T=e.h((t,n)=>{if(e.g.warn(`extractor - `,n,u(t),t.children(`D`)),n>10){e.g.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.g.debug(`Done, no node has children`,t.nodes());return}e.g.debug(`Nodes = `,r,n);for(let i of r)if(e.g.debug(`Extracting node`,i,p,p.has(i)&&!p.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!p.has(i))e.g.debug(`Not a cluster`,i,n);else if(!p.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.g.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;p.get(i)?.clusterData?.dir&&(r=p.get(i).clusterData.dir,e.g.warn(`Fixing dir`,p.get(i).clusterData.dir,r));let a=new l.t({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.g.warn(`Old graph before copy`,u(t)),y(i,t,a,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:p.get(i).clusterData,label:p.get(i).label,graph:a}),e.g.warn(`New graph after copy node: (`,i,`)`,u(a)),e.g.debug(`Old graph after copy`,u(t))}else e.g.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!p.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.g.debug(p);r=t.nodes(),e.g.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.g.warn(` Now next level`,i,r),r?.clusterNode&&T(r.graph,n+1)}},`extractor`),E=e.h((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=E(e,e.children(t));n=[...n,...r]}),n},`sorter`),D=e.h(e=>E(e,e.children()),`sortNodesByHierarchy`),O=e.h(async(t,a,o,c,l,d)=>{e.g.warn(`Graph in recursive render:XAX`,u(a),l);let f=a.graph().rankdir;e.g.trace(`Dir in recursive render - dir:`,f);let m=t.insert(`g`).attr(`class`,`root`);a.nodes()?e.g.info(`Recursive render XXX`,a.nodes()):e.g.info(`No nodes found for`,a),a.edges().length>0&&e.g.info(`Recursive edges`,a.edge(a.edges()[0]));let h=m.insert(`g`).attr(`class`,`clusters`),g=m.insert(`g`).attr(`class`,`edgePaths`),_=m.insert(`g`).attr(`class`,`edgeLabels`),v=m.insert(`g`).attr(`class`,`nodes`);await Promise.all(a.nodes().map(async function(t){let n=a.node(t);if(l!==void 0){let n=JSON.parse(JSON.stringify(l.clusterData));e.g.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,t,`
|
|
3
|
+
data=`,n.height,`
|
|
4
|
+
Parent cluster`,l.height),a.setNode(l.id,n),a.parent(t)||(e.g.trace(`Setting parent`,t,l.id),a.setParent(t,l.id,n))}if(e.g.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(a.node(t))),n?.clusterNode){e.g.info(`Cluster identified XBX`,t,n.width,a.node(t));let{ranksep:i,nodesep:s}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:i+25,nodesep:s});let l=await O(v,n.graph,o,c,a.node(t),d),u=l.elem;r.u(n,u),n.diff=l.diff||0,e.g.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),r.l(u,n)}else a.children(t).length>0?(e.g.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,a),e.g.trace(S(n.id,a)),p.set(n.id,{id:S(n.id,a),node:n})):(e.g.trace(`Node - the non recursive path XAX`,t,v,a.node(t),f),await r.a(v,a.node(t),{config:d,dir:f}))})),await e.h(async()=>{let t=a.edges().map(async function(t){let n=a.edge(t.v,t.w,t.name);e.g.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.g.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(a.edge(t))),e.g.info(`Fix`,p,`ids:`,t.v,t.w,`Translating: `,p.get(t.v),p.get(t.w)),await i.r(_,n)});await Promise.all(t)},`processEdges`)(),e.g.info(`Graph before layout:`,JSON.stringify(u(a))),e.g.info(`############################################# XXX`),e.g.info(`### Layout ### XXX`),e.g.info(`############################################# XXX`),s.t(a),e.g.info(`Graph after layout:`,JSON.stringify(u(a)));let y=0,{subGraphTitleTotalMargin:b}=n.t(d);return await Promise.all(D(a).map(async function(t){let n=a.node(t);if(e.g.info(`Position XBX => `+t+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=b,e.g.info(`A tainted cluster node XBX1`,t,n.id,n.width,n.height,n.x,n.y,a.parent(t)),p.get(n.id).node=n,r.c(n);else if(a.children(t).length>0){e.g.info(`A pure cluster node XBX1`,t,n.id,n.x,n.y,n.width,n.height,a.parent(t)),n.height+=b,a.node(n.parentId);let i=n?.padding/2||0,o=n?.labelBBox?.height||0,s=o-i||0;e.g.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,i),await r.i(h,n),p.get(n.id).node=n}else{let t=a.node(n.parentId);n.y+=b/2,e.g.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,t,t?.offsetY,n),r.c(n)}})),a.edges().forEach(function(t){let n=a.edge(t);e.g.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(n),n),n.points.forEach(e=>e.y+=b/2),i.a(n,i.n(g,n,p,o,a.node(t.v),a.node(t.w),c))}),a.nodes().forEach(function(t){let n=a.node(t);e.g.info(t,n.type,n.diff),n.isGroup&&(y=n.diff)}),e.g.warn(`Returning from recursive render XAX`,m,y),{elem:m,diff:y}},`recursiveRender`),k=e.h(async(n,a)=>{let o=new l.t({multigraph:!0,compound:!0}).setGraph({rankdir:n.direction,nodesep:n.config?.nodeSpacing||n.config?.flowchart?.nodeSpacing||n.nodeSpacing,ranksep:n.config?.rankSpacing||n.config?.flowchart?.rankSpacing||n.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),s=a.select(`g`);i.i(s,n.markers,n.type,n.diagramId),r.n(),i.t(),r.t(),g(),n.nodes.forEach(e=>{o.setNode(e.id,{...e}),e.parentId&&o.setParent(e.id,e.parentId)}),e.g.debug(`Edges:`,n.edges),n.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=o.node(t);o.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),o.setParent(n,i.parentId),o.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),o.setParent(r,i.parentId);let a=structuredClone(e),s=structuredClone(e),c=structuredClone(e);a.label=``,a.arrowTypeEnd=`none`,a.id=t+`-cyclic-special-1`,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,i.isGroup&&(a.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,o.setEdge(t,n,a,t+`-cyclic-special-0`),o.setEdge(n,r,s,t+`-cyclic-special-1`),o.setEdge(r,t,c,t+`-cyc<lic-special-2`)}else o.setEdge(e.start,e.end,{...e},e.id)}),e.g.warn(`Graph at first:`,JSON.stringify(u(o))),w(o),e.g.warn(`Graph after XAX:`,JSON.stringify(u(o)));let c=t.b();await O(s,o,n.type,n.diagramId,void 0,c)},`render`);exports.render=k;
|