ranui 0.2.1-alpha.1 → 0.2.1-alpha.3
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/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
- package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
- package/dist/arc-D25LhgTs.cjs +1 -0
- package/dist/arc-DRPGof21.js +82 -0
- package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
- package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
- package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
- package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
- package/dist/array-By5736M5.js +7 -0
- package/dist/array-C3cbN3GY.cjs +1 -0
- package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
- package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
- package/dist/builder.d.ts +2 -2
- package/dist/builder.js +39 -34
- package/dist/{builtin-D9djWkCE.js → builtin-BkM0LLof.js} +83 -76
- package/dist/button-D0zcnKnG.js +117 -0
- package/dist/button.js +1 -1
- package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
- package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
- package/dist/{card-CqJa4Q_v.js → card-CygMndQS.js} +2 -2
- package/dist/card.js +1 -1
- package/dist/channel-C9WSNwcS.cjs +1 -0
- package/dist/channel-k5-UxdcV.js +5 -0
- package/dist/{checkbox-CThC9-vy.js → checkbox-D5om9aJO.js} +10 -10
- package/dist/checkbox.js +1 -1
- package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
- package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
- package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
- package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
- package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
- package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
- package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
- package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
- package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
- package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
- package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
- package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
- package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
- package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
- package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
- package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
- package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
- package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
- package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
- package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
- package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
- package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
- package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
- package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
- package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
- package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
- package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
- package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
- package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
- package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
- package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
- package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
- package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
- package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
- package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
- package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
- package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
- package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
- package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
- package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
- package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
- package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
- package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
- package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
- package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
- package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
- package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
- package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
- package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
- package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
- package/dist/{colorpicker-XNxDRcQ-.js → colorpicker-qWnaTlYX.js} +8 -8
- package/dist/colorpicker.js +1 -1
- package/dist/components/glass/index.d.ts +52 -0
- package/dist/components/icon/core-icons.d.ts +13 -0
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/mermaid/index.d.ts +52 -0
- package/dist/components/modal/index.d.ts +9 -0
- package/dist/content-Rry-U6ir.js +39 -0
- package/dist/content.js +5 -0
- package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
- package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
- package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
- package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
- package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
- package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
- package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
- package/dist/dagre-D1-W1tt6.cjs +1 -0
- package/dist/dagre-D8GLTwuf.js +1578 -0
- package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
- package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
- package/dist/defaultLocale-0M_kMcEH.js +184 -0
- package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
- package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
- package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
- package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
- package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
- package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
- package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
- package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
- package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
- package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
- package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
- package/dist/dist-C0Fwsvsq.js +70 -0
- package/dist/dist-C20XxSsP.cjs +1 -0
- package/dist/{dropdown-CCvsambb.js → dropdown-DzdAR1nI.js} +4 -4
- package/dist/dropdown.js +1 -1
- package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
- package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
- package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
- package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
- package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
- package/dist/factory-BkvRcCOx.js +482 -0
- package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
- package/dist/{form-Ceq3uJzz.js → form-CUJpeQ7Q.js} +5 -5
- package/dist/form.js +1 -1
- package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
- package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
- package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
- package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
- package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
- package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
- package/dist/glass-Bj1Zf8Hy.js +115 -0
- package/dist/glass.js +5 -0
- package/dist/graphlib-CCKThIKP.js +1104 -0
- package/dist/graphlib-Du-578Js.cjs +1 -0
- package/dist/{icon-C_ENrJ3F.js → icon-CtlZJISZ.js} +77 -25
- package/dist/icon.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +2 -2
- package/dist/iife/content.iife.js +1 -0
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/glass.iife.js +1 -0
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +14 -14
- package/dist/iife/mermaid.iife.js +3535 -0
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +8 -8
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +1 -1
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/{image-B7MBI5n_.js → image-ILZNlaGc.js} +4 -4
- package/dist/image.js +1 -1
- package/dist/index.cjs +38 -37
- package/dist/index.d.ts +8 -0
- package/dist/index.iife.js +3623 -88
- package/dist/index.js +88 -84
- package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
- package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
- package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
- package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
- package/dist/init-1VpIn1S3.js +16 -0
- package/dist/init-CbDwVtpO.cjs +1 -0
- package/dist/{input-RNqdEHPf.js → input-CDH6zY9I.js} +6 -6
- package/dist/input.js +1 -1
- package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
- package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
- package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
- package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
- package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
- package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
- package/dist/katex-Cq3Y8cmK.cjs +257 -0
- package/dist/katex-Pg2EqTH0.js +23485 -0
- package/dist/line-BIPmUVxO.js +33 -0
- package/dist/line-CAB5QHC6.cjs +1 -0
- package/dist/linear-B2AM4ZBe.js +259 -0
- package/dist/linear-CSAfNEpl.cjs +1 -0
- package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
- package/dist/link.js +1 -1
- package/dist/{loading-B9MFI03l.js → loading-DJWGih1g.js} +4 -4
- package/dist/loading.js +1 -1
- package/dist/map-BC2bk_rV.cjs +1 -0
- package/dist/map-DMSWkcq6.js +208 -0
- package/dist/{math-CudIwEXZ.js → math-DRmkEDSQ.js} +4 -4
- package/dist/math.js +1 -1
- package/dist/mermaid-CMhm7npE.js +261 -0
- package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
- package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
- package/dist/mermaid.core-B2d5lQW2.js +1085 -0
- package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
- package/dist/mermaid.js +5 -0
- package/dist/{message-DW7qWpEm.js → message-BpYJBvYn.js} +6 -6
- package/dist/message.js +1 -1
- package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
- package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
- package/dist/{modal-CrvGKL2B.js → modal-BeQlDYDP.js} +40 -24
- package/dist/modal.js +1 -1
- package/dist/ordinal-BMN81JG2.js +64 -0
- package/dist/ordinal-BplLHIij.cjs +1 -0
- package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
- package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
- package/dist/path-Bja5PoYn.js +82 -0
- package/dist/path-DmfWsuKi.cjs +1 -0
- package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
- package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
- package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
- package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
- package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
- package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
- package/dist/{player-BKQaaT7o.js → player-CQ4e3Yeo.js} +196 -195
- package/dist/player.js +1 -1
- package/dist/{popover-CvYIVgUS.js → popover-eZMnL1F3.js} +22 -54
- package/dist/popover.js +1 -1
- package/dist/{progress-C6jctsFH.js → progress-DyHgW4Ep.js} +5 -5
- package/dist/progress.js +1 -1
- package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
- package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
- package/dist/{radar-BUb4EzmG.js → radar-D21Rccap.js} +5 -5
- package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
- package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
- package/dist/radar.js +1 -1
- package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
- package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
- package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
- package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
- package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
- package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
- package/dist/ranui.css +1 -1
- package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
- package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
- package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
- package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
- package/dist/rough.esm-BWe9E0Nz.js +1387 -0
- package/dist/rough.esm-BfSi6CZE.cjs +1 -0
- package/dist/{route-Djrf9UR_.js → route-pR5P4ann.js} +10 -10
- package/dist/route.js +1 -1
- package/dist/{router-BU2KhtxV.js → router-CewzSH7O.js} +5 -5
- package/dist/router.js +1 -1
- package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
- package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
- package/dist/{scratch-CO4I2dIa.js → scratch-BFVsgl-7.js} +2 -2
- package/dist/scratch.js +1 -1
- package/dist/{section-CsUkp8bv.js → section-DSPCsIxv.js} +2 -2
- package/dist/section.js +1 -1
- package/dist/{select-Dn26ajJZ.js → select-B58nMfB1.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
- package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
- package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
- package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
- package/dist/{skeleton-BuMLhvzQ.js → skeleton-DoHYMsTn.js} +5 -5
- package/dist/skeleton.js +1 -1
- package/dist/src-C9EhKhbk.cjs +1 -0
- package/dist/src-DtRLxcYO.js +2104 -0
- package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
- package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
- package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
- package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
- package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
- package/dist/{tab-40fDkuox.js → tab-BRPdZ9Ws.js} +5 -5
- package/dist/tab.js +1 -1
- package/dist/{tabpane-F4Pd7JtC.js → tabpane-Owf72hw_.js} +5 -5
- package/dist/tabpane.js +1 -1
- package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
- package/dist/theme-switch.js +1 -1
- package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
- package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
- package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
- package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
- package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
- package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
- package/dist/utils/builder/core.d.ts +133 -3
- package/dist/utils/builder/index.d.ts +1 -1
- package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
- package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
- package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
- package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
- package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
- package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
- package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
- package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
- package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
- package/docs/BUILDER.md +155 -2
- package/package.json +7 -1
- package/dist/button-BfYw0fes.js +0 -117
- package/dist/factory-DCrO37si.js +0 -334
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const b=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),c=require("./src-C9EhKhbk.cjs"),R=require("./chunk-WYO6CB5R-u4mJNOcO.cjs");require("./chunk-ICXQ74PX-BbT9JaEW.cjs");require("./chunk-HOUHSVGY-BGB3dOvI.cjs");require("./chunk-Q4XR5HBZ-aBnPq509.cjs");require("./chunk-7BUUIJ7U-DMv_UkjI.cjs");const M=require("./chunk-OGEWGWER-DX8sW1dT.cjs"),k=require("./graphlib-Du-578Js.cjs"),G=require("./dagre-D1-W1tt6.cjs"),w=require("./chunk-RYQCIY6F-DVRzSnsI.cjs");require("./chunk-C7G6YPKG-CKEeW9TM.cjs");const E=require("./chunk-ZGVPDNZ5-Cw5_HJba.cjs"),_=require("./chunk-52WLFC77-BChUrU24.cjs");var q=b.__name((r,t,f)=>Math.max(t,Math.min(f,r)),"clamp"),I=b.__name((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),D=b.__name(r=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram","shouldMergeSelfLoopSegments"),B=b.__name((r,t,f,y,a)=>{const o=[],s=new Set;if(f.forEach(({start:i,end:n})=>{i!==y&&s.add(i),n!==y&&s.add(n)}),s.forEach(i=>{const n=r.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&f.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return I(a);const g=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),u=g.x-t.x,l=g.y-t.y;return Math.abs(u)>Math.abs(l)?u>0?"right":"left":Math.abs(l)>0?l>0?"bottom":"top":I(a)},"getSelfLoopSide"),O=b.__name((r,t="top",f=0,y=0)=>{const a=r.x,o=r.y-f,s=r.width/2,g=r.height/2,u=Math.max(36,Math.min(100,r.width*.8)),l=q(Math.max(y,r.width*.35),36,u),i=q(Math.min(r.width,r.height)*.45,24,48);switch(t){case"bottom":{const n=o+g;return[{x:a-l/2,y:n},{x:a-l/2,y:n+i},{x:a+l/2,y:n+i},{x:a+l/2,y:n}]}case"right":{const n=a+s;return[{x:n,y:o-l/2},{x:n+i,y:o-l/2},{x:n+i,y:o+l/2},{x:n,y:o+l/2}]}case"left":{const n=a-s;return[{x:n,y:o-l/2},{x:n-i,y:o-l/2},{x:n-i,y:o+l/2},{x:n,y:o+l/2}]}default:{const n=o-g;return[{x:a-l/2,y:n},{x:a-l/2,y:n-i},{x:a+l/2,y:n-i},{x:a+l/2,y:n}]}}},"getSelfLoopPoints"),Y=b.__name((r,t,f="top",y=0,a={})=>{const s=r.x,g=r.y-y,u=a.width??0,l=a.height??0;switch(f){case"bottom":return{x:s,y:Math.max(...t.map(i=>i.y))+l/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+u/2+4,y:g};case"left":return{x:Math.min(...t.map(i=>i.x))-u/2-4,y:g};default:return{x:s,y:Math.min(...t.map(i=>i.y))-l/2-4}}},"getSelfLoopLabelPosition"),C=b.__name((r,t=0,{mergeSelfLoops:f=!0}={})=>{const y=new Map,a=[],o=r.graph()?.rankdir;return r.edges().forEach(s=>{const g=r.edge(s);if(f&&g.selfLoop){const u=g.selfLoop.id;y.has(u)||y.set(u,[]),y.get(u).push({edge:g,start:s.v,end:s.w})}else a.push({edge:g,start:s.v,end:s.w})}),y.forEach(s=>{if(s.length!==3){s.forEach(e=>a.push(e));return}s.sort((e,h)=>e.edge.selfLoop.order-h.edge.selfLoop.order);const[g,u,l]=s,i=g.edge.originalEdge??u.edge.originalEdge??l.edge.originalEdge??u.edge,n=r.node(i.start);if(!n){s.forEach(e=>a.push(e));return}const p={width:u.edge.width,height:u.edge.height},m=B(r,n,s,i.start,o),S=O(n,m,t,p.width??0),L=Y(n,S,m,t,p),d={...u.edge,...i,id:i.id,points:S,start:i.start,end:i.end,x:L.x,y:L.y,width:p.width,height:p.height,labelStyle:u.edge.labelStyle,fromCluster:g.edge.fromCluster??u.edge.fromCluster??l.edge.fromCluster,toCluster:g.edge.toCluster??u.edge.toCluster??l.edge.toCluster};delete d.selfLoop,delete d.originalEdge,a.push({edge:d,start:d.start,end:d.end})}),a},"getEdgesToRender"),P=b.__name(async(r,t,f,y,a,o)=>{c.log.warn("Graph in recursive render:XAX",w.write(t),a);const s=t.graph().rankdir;c.log.trace("Dir in recursive render - dir:",s);const g=r.insert("g").attr("class","root");t.nodes()?c.log.info("Recursive render XXX",t.nodes()):c.log.info("No nodes found for",t),t.edges().length>0&&c.log.info("Recursive edges",t.edge(t.edges()[0]));const u=g.insert("g").attr("class","clusters"),l=g.insert("g").attr("class","edgePaths"),i=g.insert("g").attr("class","edgeLabels"),n=g.insert("g").attr("class","nodes"),p=D(f);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));c.log.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,d,`
|
|
3
|
+
data=`,h.height,`
|
|
4
|
+
Parent cluster`,a.height),t.setNode(a.id,h),t.parent(d)||(c.log.trace("Setting parent",d,a.id),t.setParent(d,a.id,h))}if(c.log.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){c.log.info("Cluster identified XBX",d,e.width,t.node(d));const{ranksep:h,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:h+25,nodesep:x});const X=await P(n,e.graph,f,y,t.node(d),o),N=X.elem;E.updateNodeBounds(e,N),e.diff=X.diff||0,c.log.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),E.setNodeElem(N,e)}else t.children(d).length>0?(c.log.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),c.log.trace(w.findNonClusterChild(e.id,t)),w.clusterDb.set(e.id,{id:w.findNonClusterChild(e.id,t),node:e})):(c.log.trace("Node - the non recursive path XAX",d,n,t.node(d),s),await E.insertNode(n,t.node(d),{config:o,dir:s}))})),await b.__name(async()=>{const d=t.edges().map(async function(e){const h=t.edge(e.v,e.w,e.name);if(c.log.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),c.log.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),c.log.info("Fix",w.clusterDb,"ids:",e.v,e.w,"Translating: ",w.clusterDb.get(e.v),w.clusterDb.get(e.w)),p&&h.selfLoop){if(h.selfLoop.order!==1)return;const x=h.id;h.id=h.selfLoop.id,await _.insertEdgeLabel(i,h),h.id=x;return}await _.insertEdgeLabel(i,h)});await Promise.all(d)},"processEdges")(),c.log.info("Graph before layout:",JSON.stringify(w.write(t))),c.log.info("############################################# XXX"),c.log.info("### Layout ### XXX"),c.log.info("############################################# XXX"),G.layout(t),c.log.info("Graph after layout:",JSON.stringify(w.write(t)));let m=0,{subGraphTitleTotalMargin:S}=M.getSubGraphTitleMargins(o);await Promise.all(w.sortNodesByHierarchy(t).map(async function(d){const e=t.node(d);if(c.log.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=S,c.log.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),w.clusterDb.get(e.id).node=e,E.positionNode(e);else if(t.children(d).length>0){c.log.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=S,t.node(e.parentId);const h=e?.padding/2||0,x=e?.labelBBox?.height||0,X=x-h||0;c.log.debug("OffsetY",X,"labelHeight",x,"halfPadding",h),await E.insertCluster(u,e),w.clusterDb.get(e.id).node=e}else{const h=t.node(e.parentId);e.y+=S/2,c.log.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",h,h?.offsetY,e),E.positionNode(e)}}));const L=S/2;return C(t,L,{mergeSelfLoops:p}).forEach(function({edge:d,start:e,end:h}){c.log.info("Edge "+e+" -> "+h+": "+JSON.stringify(d),d),d.points.forEach(N=>N.y+=L);const x=t.node(e),X=t.node(h);_.positionEdgeLabel(d,_.insertEdge(l,d,w.clusterDb,f,x,X,y))}),t.nodes().forEach(function(d){const e=t.node(d);c.log.info(d,e.type,e.diff),e.isGroup&&(m=e.diff)}),c.log.warn("Returning from recursive render XAX",g,m),{elem:g,diff:m}},"recursiveRender"),J=b.__name(async(r,t)=>{const f=new k.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r.direction,nodesep:r.config?.nodeSpacing||r.config?.flowchart?.nodeSpacing||r.nodeSpacing,ranksep:r.config?.rankSpacing||r.config?.flowchart?.rankSpacing||r.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),y=t.select("g");_.markers_default(y,r.markers,r.type,r.diagramId),E.clear2(),_.clear(),E.clear(),w.clear(),r.nodes.forEach(o=>{f.setNode(o.id,{...o}),o.parentId&&f.setParent(o.id,o.parentId)}),c.log.debug("Edges:",r.edges),r.edges.forEach(o=>{if(o.start===o.end){const s=o.start,g=s+"---"+s+"---1",u=s+"---"+s+"---2",l=f.node(s);f.setNode(g,{domId:g,id:g,parentId:l.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),f.setParent(g,l.parentId),f.setNode(u,{domId:u,id:u,parentId:l.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),f.setParent(u,l.parentId);const i=structuredClone(o),n=structuredClone(o),p=structuredClone(o),m=structuredClone(o);n.originalEdge=i,n.selfLoop={id:i.id,order:0},p.originalEdge=i,p.selfLoop={id:i.id,order:1},m.originalEdge=i,m.selfLoop={id:i.id,order:2},n.label="",n.arrowTypeEnd="none",n.endLabelLeft="",n.endLabelRight="",n.startLabelLeft="",n.id=s+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=s+"-cyclic-special-mid",m.label="",m.startLabelRight="",m.startLabelLeft="",m.arrowTypeStart="none",l.isGroup&&(n.fromCluster=s,m.toCluster=s),m.id=s+"-cyclic-special-2",m.arrowTypeStart="none",f.setEdge(s,g,n,s+"-cyclic-special-0"),f.setEdge(g,u,p,s+"-cyclic-special-1"),f.setEdge(u,s,m,s+"-cyclic-special-2")}else f.setEdge(o.start,o.end,{...o},o.id)}),c.log.warn("Graph at first:",JSON.stringify(w.write(f))),w.adjustClustersAndEdges(f),c.log.warn("Graph after XAX:",JSON.stringify(w.write(f)));const a=R.getConfig2();await P(y,f,r.type,r.diagramId,void 0,a)},"render");exports.getEdgesToRender=C;exports.render=J;
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { n as w } from "./chunk-Y2CYZVJY-0JxdZxki.js";
|
|
2
|
+
import { m as c } from "./src-DtRLxcYO.js";
|
|
3
|
+
import { x as k } from "./chunk-WYO6CB5R-DDHkKowO.js";
|
|
4
|
+
import "./chunk-ICXQ74PX-DR8rL-xF.js";
|
|
5
|
+
import "./chunk-HOUHSVGY-DRQcQeMT.js";
|
|
6
|
+
import "./chunk-Q4XR5HBZ-3BHjjc9u.js";
|
|
7
|
+
import "./chunk-7BUUIJ7U-9hiBbc7O.js";
|
|
8
|
+
import { n as B } from "./chunk-OGEWGWER-BV51ll2w.js";
|
|
9
|
+
import { t as O } from "./graphlib-CCKThIKP.js";
|
|
10
|
+
import { t as J } from "./dagre-D8GLTwuf.js";
|
|
11
|
+
import { a as T, i as I, n as A, o as L, r as S, t as v } from "./chunk-RYQCIY6F-BER2T9t0.js";
|
|
12
|
+
import "./chunk-C7G6YPKG-CA-DNpvI.js";
|
|
13
|
+
import { a as D, c as M, i as H, l as Y, n as _, t as W, u as $ } from "./chunk-ZGVPDNZ5-6uMbTJXy.js";
|
|
14
|
+
import { a as j, i as P, o as F, r as q, t as z } from "./chunk-52WLFC77-wpL7en7e.js";
|
|
15
|
+
var R = /* @__PURE__ */ w((o, t, g) => Math.max(t, Math.min(g, o)), "clamp"), C = /* @__PURE__ */ w((o = "TB") => {
|
|
16
|
+
switch (o) {
|
|
17
|
+
case "BT":
|
|
18
|
+
return "bottom";
|
|
19
|
+
case "LR":
|
|
20
|
+
return "right";
|
|
21
|
+
case "RL":
|
|
22
|
+
return "left";
|
|
23
|
+
default:
|
|
24
|
+
return "top";
|
|
25
|
+
}
|
|
26
|
+
}, "getDefaultSelfLoopSide"), K = /* @__PURE__ */ w((o) => o === "flowchart" || o === "flowchart-v2" || o === "stateDiagram", "shouldMergeSelfLoopSegments"), Q = /* @__PURE__ */ w((o, t, g, m, l) => {
|
|
27
|
+
const i = [], r = /* @__PURE__ */ new Set();
|
|
28
|
+
if (g.forEach(({ start: s, end: n }) => {
|
|
29
|
+
s !== m && r.add(s), n !== m && r.add(n);
|
|
30
|
+
}), r.forEach((s) => {
|
|
31
|
+
const n = o.node(s);
|
|
32
|
+
typeof n?.x == "number" && typeof n?.y == "number" && i.push(n);
|
|
33
|
+
}), i.length === 0 && g.forEach(({ edge: s }) => {
|
|
34
|
+
(s.points ?? []).forEach((n) => {
|
|
35
|
+
typeof n?.x == "number" && typeof n?.y == "number" && i.push(n);
|
|
36
|
+
});
|
|
37
|
+
}), i.length === 0) return C(l);
|
|
38
|
+
const f = i.reduce((s, n) => ({
|
|
39
|
+
x: s.x + n.x / i.length,
|
|
40
|
+
y: s.y + n.y / i.length
|
|
41
|
+
}), {
|
|
42
|
+
x: 0,
|
|
43
|
+
y: 0
|
|
44
|
+
}), h = f.x - t.x, a = f.y - t.y;
|
|
45
|
+
return Math.abs(h) > Math.abs(a) ? h > 0 ? "right" : "left" : Math.abs(a) > 0 ? a > 0 ? "bottom" : "top" : C(l);
|
|
46
|
+
}, "getSelfLoopSide"), U = /* @__PURE__ */ w((o, t = "top", g = 0, m = 0) => {
|
|
47
|
+
const l = o.x, i = o.y - g, r = o.width / 2, f = o.height / 2, h = Math.max(36, Math.min(100, o.width * 0.8)), a = R(Math.max(m, o.width * 0.35), 36, h), s = R(Math.min(o.width, o.height) * 0.45, 24, 48);
|
|
48
|
+
switch (t) {
|
|
49
|
+
case "bottom": {
|
|
50
|
+
const n = i + f;
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
x: l - a / 2,
|
|
54
|
+
y: n
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
x: l - a / 2,
|
|
58
|
+
y: n + s
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
x: l + a / 2,
|
|
62
|
+
y: n + s
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
x: l + a / 2,
|
|
66
|
+
y: n
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
case "right": {
|
|
71
|
+
const n = l + r;
|
|
72
|
+
return [
|
|
73
|
+
{
|
|
74
|
+
x: n,
|
|
75
|
+
y: i - a / 2
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
x: n + s,
|
|
79
|
+
y: i - a / 2
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
x: n + s,
|
|
83
|
+
y: i + a / 2
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
x: n,
|
|
87
|
+
y: i + a / 2
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
case "left": {
|
|
92
|
+
const n = l - r;
|
|
93
|
+
return [
|
|
94
|
+
{
|
|
95
|
+
x: n,
|
|
96
|
+
y: i - a / 2
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
x: n - s,
|
|
100
|
+
y: i - a / 2
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
x: n - s,
|
|
104
|
+
y: i + a / 2
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
x: n,
|
|
108
|
+
y: i + a / 2
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
default: {
|
|
113
|
+
const n = i - f;
|
|
114
|
+
return [
|
|
115
|
+
{
|
|
116
|
+
x: l - a / 2,
|
|
117
|
+
y: n
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
x: l - a / 2,
|
|
121
|
+
y: n - s
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
x: l + a / 2,
|
|
125
|
+
y: n - s
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
x: l + a / 2,
|
|
129
|
+
y: n
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, "getSelfLoopPoints"), V = /* @__PURE__ */ w((o, t, g = "top", m = 0, l = {}) => {
|
|
135
|
+
const r = o.x, f = o.y - m, h = l.width ?? 0, a = l.height ?? 0;
|
|
136
|
+
switch (g) {
|
|
137
|
+
case "bottom":
|
|
138
|
+
return {
|
|
139
|
+
x: r,
|
|
140
|
+
y: Math.max(...t.map((s) => s.y)) + a / 2 + 4
|
|
141
|
+
};
|
|
142
|
+
case "right":
|
|
143
|
+
return {
|
|
144
|
+
x: Math.max(...t.map((s) => s.x)) + h / 2 + 4,
|
|
145
|
+
y: f
|
|
146
|
+
};
|
|
147
|
+
case "left":
|
|
148
|
+
return {
|
|
149
|
+
x: Math.min(...t.map((s) => s.x)) - h / 2 - 4,
|
|
150
|
+
y: f
|
|
151
|
+
};
|
|
152
|
+
default:
|
|
153
|
+
return {
|
|
154
|
+
x: r,
|
|
155
|
+
y: Math.min(...t.map((s) => s.y)) - a / 2 - 4
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}, "getSelfLoopLabelPosition"), Z = /* @__PURE__ */ w((o, t = 0, { mergeSelfLoops: g = !0 } = {}) => {
|
|
159
|
+
const m = /* @__PURE__ */ new Map(), l = [], i = o.graph()?.rankdir;
|
|
160
|
+
return o.edges().forEach((r) => {
|
|
161
|
+
const f = o.edge(r);
|
|
162
|
+
if (g && f.selfLoop) {
|
|
163
|
+
const h = f.selfLoop.id;
|
|
164
|
+
m.has(h) || m.set(h, []), m.get(h).push({
|
|
165
|
+
edge: f,
|
|
166
|
+
start: r.v,
|
|
167
|
+
end: r.w
|
|
168
|
+
});
|
|
169
|
+
} else l.push({
|
|
170
|
+
edge: f,
|
|
171
|
+
start: r.v,
|
|
172
|
+
end: r.w
|
|
173
|
+
});
|
|
174
|
+
}), m.forEach((r) => {
|
|
175
|
+
if (r.length !== 3) {
|
|
176
|
+
r.forEach((e) => l.push(e));
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
r.sort((e, u) => e.edge.selfLoop.order - u.edge.selfLoop.order);
|
|
180
|
+
const [f, h, a] = r, s = f.edge.originalEdge ?? h.edge.originalEdge ?? a.edge.originalEdge ?? h.edge, n = o.node(s.start);
|
|
181
|
+
if (!n) {
|
|
182
|
+
r.forEach((e) => l.push(e));
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const p = {
|
|
186
|
+
width: h.edge.width,
|
|
187
|
+
height: h.edge.height
|
|
188
|
+
}, y = Q(o, n, r, s.start, i), x = U(n, y, t, p.width ?? 0), X = V(n, x, y, t, p), d = {
|
|
189
|
+
...h.edge,
|
|
190
|
+
...s,
|
|
191
|
+
id: s.id,
|
|
192
|
+
points: x,
|
|
193
|
+
start: s.start,
|
|
194
|
+
end: s.end,
|
|
195
|
+
x: X.x,
|
|
196
|
+
y: X.y,
|
|
197
|
+
width: p.width,
|
|
198
|
+
height: p.height,
|
|
199
|
+
labelStyle: h.edge.labelStyle,
|
|
200
|
+
fromCluster: f.edge.fromCluster ?? h.edge.fromCluster ?? a.edge.fromCluster,
|
|
201
|
+
toCluster: f.edge.toCluster ?? h.edge.toCluster ?? a.edge.toCluster
|
|
202
|
+
};
|
|
203
|
+
delete d.selfLoop, delete d.originalEdge, l.push({
|
|
204
|
+
edge: d,
|
|
205
|
+
start: d.start,
|
|
206
|
+
end: d.end
|
|
207
|
+
});
|
|
208
|
+
}), l;
|
|
209
|
+
}, "getEdgesToRender"), G = /* @__PURE__ */ w(async (o, t, g, m, l, i) => {
|
|
210
|
+
c.warn("Graph in recursive render:XAX", L(t), l);
|
|
211
|
+
const r = t.graph().rankdir;
|
|
212
|
+
c.trace("Dir in recursive render - dir:", r);
|
|
213
|
+
const f = o.insert("g").attr("class", "root");
|
|
214
|
+
t.nodes() ? c.info("Recursive render XXX", t.nodes()) : c.info("No nodes found for", t), t.edges().length > 0 && c.info("Recursive edges", t.edge(t.edges()[0]));
|
|
215
|
+
const h = f.insert("g").attr("class", "clusters"), a = f.insert("g").attr("class", "edgePaths"), s = f.insert("g").attr("class", "edgeLabels"), n = f.insert("g").attr("class", "nodes"), p = K(g);
|
|
216
|
+
await Promise.all(t.nodes().map(async function(d) {
|
|
217
|
+
const e = t.node(d);
|
|
218
|
+
if (l !== void 0) {
|
|
219
|
+
const u = JSON.parse(JSON.stringify(l.clusterData));
|
|
220
|
+
c.trace(`Setting data for parent cluster XXX
|
|
221
|
+
Node.id = `, d, `
|
|
222
|
+
data=`, u.height, `
|
|
223
|
+
Parent cluster`, l.height), t.setNode(l.id, u), t.parent(d) || (c.trace("Setting parent", d, l.id), t.setParent(d, l.id, u));
|
|
224
|
+
}
|
|
225
|
+
if (c.info("(Insert) Node XXX" + d + ": " + JSON.stringify(t.node(d))), e?.clusterNode) {
|
|
226
|
+
c.info("Cluster identified XBX", d, e.width, t.node(d));
|
|
227
|
+
const { ranksep: u, nodesep: b } = t.graph();
|
|
228
|
+
e.graph.setGraph({
|
|
229
|
+
...e.graph.graph(),
|
|
230
|
+
ranksep: u + 25,
|
|
231
|
+
nodesep: b
|
|
232
|
+
});
|
|
233
|
+
const E = await G(n, e.graph, g, m, t.node(d), i), N = E.elem;
|
|
234
|
+
$(e, N), e.diff = E.diff || 0, c.info("New compound node after recursive render XAX", d, "width", e.width, "height", e.height), Y(N, e);
|
|
235
|
+
} else t.children(d).length > 0 ? (c.trace("Cluster - the non recursive path XBX", d, e.id, e, e.width, "Graph:", t), c.trace(I(e.id, t)), S.set(e.id, {
|
|
236
|
+
id: I(e.id, t),
|
|
237
|
+
node: e
|
|
238
|
+
})) : (c.trace("Node - the non recursive path XAX", d, n, t.node(d), r), await D(n, t.node(d), {
|
|
239
|
+
config: i,
|
|
240
|
+
dir: r
|
|
241
|
+
}));
|
|
242
|
+
})), await (/* @__PURE__ */ w(async () => {
|
|
243
|
+
const d = t.edges().map(async function(e) {
|
|
244
|
+
const u = t.edge(e.v, e.w, e.name);
|
|
245
|
+
if (c.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), c.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(t.edge(e))), c.info("Fix", S, "ids:", e.v, e.w, "Translating: ", S.get(e.v), S.get(e.w)), p && u.selfLoop) {
|
|
246
|
+
if (u.selfLoop.order !== 1) return;
|
|
247
|
+
const b = u.id;
|
|
248
|
+
u.id = u.selfLoop.id, await P(s, u), u.id = b;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
await P(s, u);
|
|
252
|
+
});
|
|
253
|
+
await Promise.all(d);
|
|
254
|
+
}, "processEdges"))(), c.info("Graph before layout:", JSON.stringify(L(t))), c.info("############################################# XXX"), c.info("### Layout ### XXX"), c.info("############################################# XXX"), J(t), c.info("Graph after layout:", JSON.stringify(L(t)));
|
|
255
|
+
let y = 0, { subGraphTitleTotalMargin: x } = B(i);
|
|
256
|
+
await Promise.all(T(t).map(async function(d) {
|
|
257
|
+
const e = t.node(d);
|
|
258
|
+
if (c.info("Position XBX => " + d + ": (" + e.x, "," + e.y, ") width: ", e.width, " height: ", e.height), e?.clusterNode)
|
|
259
|
+
e.y += x, c.info("A tainted cluster node XBX1", d, e.id, e.width, e.height, e.x, e.y, t.parent(d)), S.get(e.id).node = e, M(e);
|
|
260
|
+
else if (t.children(d).length > 0) {
|
|
261
|
+
c.info("A pure cluster node XBX1", d, e.id, e.x, e.y, e.width, e.height, t.parent(d)), e.height += x, t.node(e.parentId);
|
|
262
|
+
const u = e?.padding / 2 || 0, b = e?.labelBBox?.height || 0, E = b - u || 0;
|
|
263
|
+
c.debug("OffsetY", E, "labelHeight", b, "halfPadding", u), await H(h, e), S.get(e.id).node = e;
|
|
264
|
+
} else {
|
|
265
|
+
const u = t.node(e.parentId);
|
|
266
|
+
e.y += x / 2, c.info("A regular node XBX1 - using the padding", e.id, "parent", e.parentId, e.width, e.height, e.x, e.y, "offsetY", e.offsetY, "parent", u, u?.offsetY, e), M(e);
|
|
267
|
+
}
|
|
268
|
+
}));
|
|
269
|
+
const X = x / 2;
|
|
270
|
+
return Z(t, X, { mergeSelfLoops: p }).forEach(function({ edge: d, start: e, end: u }) {
|
|
271
|
+
c.info("Edge " + e + " -> " + u + ": " + JSON.stringify(d), d), d.points.forEach((N) => N.y += X);
|
|
272
|
+
const b = t.node(e), E = t.node(u);
|
|
273
|
+
F(d, q(a, d, S, g, b, E, m));
|
|
274
|
+
}), t.nodes().forEach(function(d) {
|
|
275
|
+
const e = t.node(d);
|
|
276
|
+
c.info(d, e.type, e.diff), e.isGroup && (y = e.diff);
|
|
277
|
+
}), c.warn("Returning from recursive render XAX", f, y), {
|
|
278
|
+
elem: f,
|
|
279
|
+
diff: y
|
|
280
|
+
};
|
|
281
|
+
}, "recursiveRender"), ue = /* @__PURE__ */ w(async (o, t) => {
|
|
282
|
+
const g = new O({
|
|
283
|
+
multigraph: !0,
|
|
284
|
+
compound: !0
|
|
285
|
+
}).setGraph({
|
|
286
|
+
rankdir: o.direction,
|
|
287
|
+
nodesep: o.config?.nodeSpacing || o.config?.flowchart?.nodeSpacing || o.nodeSpacing,
|
|
288
|
+
ranksep: o.config?.rankSpacing || o.config?.flowchart?.rankSpacing || o.rankSpacing,
|
|
289
|
+
marginx: 8,
|
|
290
|
+
marginy: 8
|
|
291
|
+
}).setDefaultEdgeLabel(function() {
|
|
292
|
+
return {};
|
|
293
|
+
}), m = t.select("g");
|
|
294
|
+
j(m, o.markers, o.type, o.diagramId), _(), z(), W(), A(), o.nodes.forEach((i) => {
|
|
295
|
+
g.setNode(i.id, { ...i }), i.parentId && g.setParent(i.id, i.parentId);
|
|
296
|
+
}), c.debug("Edges:", o.edges), o.edges.forEach((i) => {
|
|
297
|
+
if (i.start === i.end) {
|
|
298
|
+
const r = i.start, f = r + "---" + r + "---1", h = r + "---" + r + "---2", a = g.node(r);
|
|
299
|
+
g.setNode(f, {
|
|
300
|
+
domId: f,
|
|
301
|
+
id: f,
|
|
302
|
+
parentId: a.parentId,
|
|
303
|
+
labelStyle: "",
|
|
304
|
+
label: "",
|
|
305
|
+
padding: 0,
|
|
306
|
+
shape: "labelRect",
|
|
307
|
+
style: "",
|
|
308
|
+
width: 10,
|
|
309
|
+
height: 10
|
|
310
|
+
}), g.setParent(f, a.parentId), g.setNode(h, {
|
|
311
|
+
domId: h,
|
|
312
|
+
id: h,
|
|
313
|
+
parentId: a.parentId,
|
|
314
|
+
labelStyle: "",
|
|
315
|
+
padding: 0,
|
|
316
|
+
shape: "labelRect",
|
|
317
|
+
label: "",
|
|
318
|
+
style: "",
|
|
319
|
+
width: 10,
|
|
320
|
+
height: 10
|
|
321
|
+
}), g.setParent(h, a.parentId);
|
|
322
|
+
const s = structuredClone(i), n = structuredClone(i), p = structuredClone(i), y = structuredClone(i);
|
|
323
|
+
n.originalEdge = s, n.selfLoop = {
|
|
324
|
+
id: s.id,
|
|
325
|
+
order: 0
|
|
326
|
+
}, p.originalEdge = s, p.selfLoop = {
|
|
327
|
+
id: s.id,
|
|
328
|
+
order: 1
|
|
329
|
+
}, y.originalEdge = s, y.selfLoop = {
|
|
330
|
+
id: s.id,
|
|
331
|
+
order: 2
|
|
332
|
+
}, n.label = "", n.arrowTypeEnd = "none", n.endLabelLeft = "", n.endLabelRight = "", n.startLabelLeft = "", n.id = r + "-cyclic-special-1", p.startLabelRight = "", p.startLabelLeft = "", p.endLabelLeft = "", p.endLabelRight = "", p.arrowTypeStart = "none", p.arrowTypeEnd = "none", p.id = r + "-cyclic-special-mid", y.label = "", y.startLabelRight = "", y.startLabelLeft = "", y.arrowTypeStart = "none", a.isGroup && (n.fromCluster = r, y.toCluster = r), y.id = r + "-cyclic-special-2", y.arrowTypeStart = "none", g.setEdge(r, f, n, r + "-cyclic-special-0"), g.setEdge(f, h, p, r + "-cyclic-special-1"), g.setEdge(h, r, y, r + "-cyclic-special-2");
|
|
333
|
+
} else g.setEdge(i.start, i.end, { ...i }, i.id);
|
|
334
|
+
}), c.warn("Graph at first:", JSON.stringify(L(g))), v(g), c.warn("Graph after XAX:", JSON.stringify(L(g)));
|
|
335
|
+
const l = k();
|
|
336
|
+
await G(m, g, o.type, o.diagramId, void 0, l);
|
|
337
|
+
}, "render");
|
|
338
|
+
export {
|
|
339
|
+
Z as getEdgesToRender,
|
|
340
|
+
ue as render
|
|
341
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
function B(t) {
|
|
2
|
+
return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
|
|
3
|
+
}
|
|
4
|
+
function z(t, n) {
|
|
5
|
+
if (!isFinite(t) || t === 0) return null;
|
|
6
|
+
var o = (t = n ? t.toExponential(n - 1) : t.toExponential()).indexOf("e"), i = t.slice(0, o);
|
|
7
|
+
return [i.length > 1 ? i[0] + i.slice(2) : i, +t.slice(o + 1)];
|
|
8
|
+
}
|
|
9
|
+
function H(t) {
|
|
10
|
+
return t = z(Math.abs(t)), t ? t[1] : NaN;
|
|
11
|
+
}
|
|
12
|
+
function J(t, n) {
|
|
13
|
+
return function(o, i) {
|
|
14
|
+
for (var a = o.length, f = [], c = 0, s = t[0], M = 0; a > 0 && s > 0 && (M + s + 1 > i && (s = Math.max(1, i - M)), f.push(o.substring(a -= s, a + s)), !((M += s + 1) > i)); )
|
|
15
|
+
s = t[c = (c + 1) % t.length];
|
|
16
|
+
return f.reverse().join(n);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function K(t) {
|
|
20
|
+
return function(n) {
|
|
21
|
+
return n.replace(/[0-9]/g, function(o) {
|
|
22
|
+
return t[+o];
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
var Q = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
27
|
+
function E(t) {
|
|
28
|
+
if (!(n = Q.exec(t))) throw new Error("invalid format: " + t);
|
|
29
|
+
var n;
|
|
30
|
+
return new F({
|
|
31
|
+
fill: n[1],
|
|
32
|
+
align: n[2],
|
|
33
|
+
sign: n[3],
|
|
34
|
+
symbol: n[4],
|
|
35
|
+
zero: n[5],
|
|
36
|
+
width: n[6],
|
|
37
|
+
comma: n[7],
|
|
38
|
+
precision: n[8] && n[8].slice(1),
|
|
39
|
+
trim: n[9],
|
|
40
|
+
type: n[10]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
E.prototype = F.prototype;
|
|
44
|
+
function F(t) {
|
|
45
|
+
this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
|
|
46
|
+
}
|
|
47
|
+
F.prototype.toString = function() {
|
|
48
|
+
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
49
|
+
};
|
|
50
|
+
function V(t) {
|
|
51
|
+
t: for (var n = t.length, o = 1, i = -1, a; o < n; ++o) switch (t[o]) {
|
|
52
|
+
case ".":
|
|
53
|
+
i = a = o;
|
|
54
|
+
break;
|
|
55
|
+
case "0":
|
|
56
|
+
i === 0 && (i = o), a = o;
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
if (!+t[o]) break t;
|
|
60
|
+
i > 0 && (i = 0);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
return i > 0 ? t.slice(0, i) + t.slice(a + 1) : t;
|
|
64
|
+
}
|
|
65
|
+
var A;
|
|
66
|
+
function W(t, n) {
|
|
67
|
+
var o = z(t, n);
|
|
68
|
+
if (!o) return A = void 0, t.toPrecision(n);
|
|
69
|
+
var i = o[0], a = o[1], f = a - (A = Math.max(-8, Math.min(8, Math.floor(a / 3))) * 3) + 1, c = i.length;
|
|
70
|
+
return f === c ? i : f > c ? i + new Array(f - c + 1).join("0") : f > 0 ? i.slice(0, f) + "." + i.slice(f) : "0." + new Array(1 - f).join("0") + z(t, Math.max(0, n + f - 1))[0];
|
|
71
|
+
}
|
|
72
|
+
function G(t, n) {
|
|
73
|
+
var o = z(t, n);
|
|
74
|
+
if (!o) return t + "";
|
|
75
|
+
var i = o[0], a = o[1];
|
|
76
|
+
return a < 0 ? "0." + new Array(-a).join("0") + i : i.length > a + 1 ? i.slice(0, a + 1) + "." + i.slice(a + 1) : i + new Array(a - i.length + 2).join("0");
|
|
77
|
+
}
|
|
78
|
+
var I = {
|
|
79
|
+
"%": (t, n) => (t * 100).toFixed(n),
|
|
80
|
+
b: (t) => Math.round(t).toString(2),
|
|
81
|
+
c: (t) => t + "",
|
|
82
|
+
d: B,
|
|
83
|
+
e: (t, n) => t.toExponential(n),
|
|
84
|
+
f: (t, n) => t.toFixed(n),
|
|
85
|
+
g: (t, n) => t.toPrecision(n),
|
|
86
|
+
o: (t) => Math.round(t).toString(8),
|
|
87
|
+
p: (t, n) => G(t * 100, n),
|
|
88
|
+
r: G,
|
|
89
|
+
s: W,
|
|
90
|
+
X: (t) => Math.round(t).toString(16).toUpperCase(),
|
|
91
|
+
x: (t) => Math.round(t).toString(16)
|
|
92
|
+
};
|
|
93
|
+
function X(t) {
|
|
94
|
+
return t;
|
|
95
|
+
}
|
|
96
|
+
var O = Array.prototype.map, R = [
|
|
97
|
+
"y",
|
|
98
|
+
"z",
|
|
99
|
+
"a",
|
|
100
|
+
"f",
|
|
101
|
+
"p",
|
|
102
|
+
"n",
|
|
103
|
+
"µ",
|
|
104
|
+
"m",
|
|
105
|
+
"",
|
|
106
|
+
"k",
|
|
107
|
+
"M",
|
|
108
|
+
"G",
|
|
109
|
+
"T",
|
|
110
|
+
"P",
|
|
111
|
+
"E",
|
|
112
|
+
"Z",
|
|
113
|
+
"Y"
|
|
114
|
+
];
|
|
115
|
+
function tt(t) {
|
|
116
|
+
var n = t.grouping === void 0 || t.thousands === void 0 ? X : J(O.call(t.grouping, Number), t.thousands + ""), o = t.currency === void 0 ? "" : t.currency[0] + "", i = t.currency === void 0 ? "" : t.currency[1] + "", a = t.decimal === void 0 ? "." : t.decimal + "", f = t.numerals === void 0 ? X : K(O.call(t.numerals, String)), c = t.percent === void 0 ? "%" : t.percent + "", s = t.minus === void 0 ? "−" : t.minus + "", M = t.nan === void 0 ? "NaN" : t.nan + "";
|
|
117
|
+
function $(e, g) {
|
|
118
|
+
e = E(e);
|
|
119
|
+
var b = e.fill, p = e.align, d = e.sign, w = e.symbol, v = e.zero, j = e.width, N = e.comma, y = e.precision, T = e.trim, h = e.type;
|
|
120
|
+
h === "n" ? (N = !0, h = "g") : I[h] || (y === void 0 && (y = 12), T = !0, h = "g"), (v || b === "0" && p === "=") && (v = !0, b = "0", p = "=");
|
|
121
|
+
var Y = (g && g.prefix !== void 0 ? g.prefix : "") + (w === "$" ? o : w === "#" && /[boxX]/.test(h) ? "0" + h.toLowerCase() : ""), Z = (w === "$" ? i : /[%p]/.test(h) ? c : "") + (g && g.suffix !== void 0 ? g.suffix : ""), C = I[h], q = /[defgprs%]/.test(h);
|
|
122
|
+
y = y === void 0 ? 6 : /[gprs]/.test(h) ? Math.max(1, Math.min(21, y)) : Math.max(0, Math.min(20, y));
|
|
123
|
+
function L(r) {
|
|
124
|
+
var l = Y, m = Z, x, D, S;
|
|
125
|
+
if (h === "c")
|
|
126
|
+
m = C(r) + m, r = "";
|
|
127
|
+
else {
|
|
128
|
+
r = +r;
|
|
129
|
+
var k = r < 0 || 1 / r < 0;
|
|
130
|
+
if (r = isNaN(r) ? M : C(Math.abs(r), y), T && (r = V(r)), k && +r == 0 && d !== "+" && (k = !1), l = (k ? d === "(" ? d : s : d === "-" || d === "(" ? "" : d) + l, m = (h === "s" && !isNaN(r) && A !== void 0 ? R[8 + A / 3] : "") + m + (k && d === "(" ? ")" : ""), q) {
|
|
131
|
+
for (x = -1, D = r.length; ++x < D; ) if (S = r.charCodeAt(x), 48 > S || S > 57) {
|
|
132
|
+
m = (S === 46 ? a + r.slice(x + 1) : r.slice(x)) + m, r = r.slice(0, x);
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
N && !v && (r = n(r, 1 / 0));
|
|
138
|
+
var P = l.length + r.length + m.length, u = P < j ? new Array(j - P + 1).join(b) : "";
|
|
139
|
+
switch (N && v && (r = n(u + r, u.length ? j - m.length : 1 / 0), u = ""), p) {
|
|
140
|
+
case "<":
|
|
141
|
+
r = l + r + m + u;
|
|
142
|
+
break;
|
|
143
|
+
case "=":
|
|
144
|
+
r = l + u + r + m;
|
|
145
|
+
break;
|
|
146
|
+
case "^":
|
|
147
|
+
r = u.slice(0, P = u.length >> 1) + l + r + m + u.slice(P);
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
r = u + l + r + m;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
return f(r);
|
|
154
|
+
}
|
|
155
|
+
return L.toString = function() {
|
|
156
|
+
return e + "";
|
|
157
|
+
}, L;
|
|
158
|
+
}
|
|
159
|
+
function U(e, g) {
|
|
160
|
+
var b = Math.max(-8, Math.min(8, Math.floor(H(g) / 3))) * 3, p = Math.pow(10, -b), d = $((e = E(e), e.type = "f", e), { suffix: R[8 + b / 3] });
|
|
161
|
+
return function(w) {
|
|
162
|
+
return d(p * w);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
format: $,
|
|
167
|
+
formatPrefix: U
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
var _, nt, rt;
|
|
171
|
+
it({
|
|
172
|
+
thousands: ",",
|
|
173
|
+
grouping: [3],
|
|
174
|
+
currency: ["$", ""]
|
|
175
|
+
});
|
|
176
|
+
function it(t) {
|
|
177
|
+
return _ = tt(t), nt = _.format, rt = _.formatPrefix, _;
|
|
178
|
+
}
|
|
179
|
+
export {
|
|
180
|
+
H as i,
|
|
181
|
+
rt as n,
|
|
182
|
+
E as r,
|
|
183
|
+
nt as t
|
|
184
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function K(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function _(t,n){if(!isFinite(t)||t===0)return null;var o=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"),i=t.slice(0,o);return[i.length>1?i[0]+i.slice(2):i,+t.slice(o+1)]}function U(t){return t=_(Math.abs(t)),t?t[1]:NaN}function Q(t,n){return function(o,i){for(var e=o.length,f=[],c=0,h=t[0],x=0;e>0&&h>0&&(x+h+1>i&&(h=Math.max(1,i-x)),f.push(o.substring(e-=h,e+h)),!((x+=h+1)>i));)h=t[c=(c+1)%t.length];return f.reverse().join(n)}}function V(t){return function(n){return n.replace(/[0-9]/g,function(o){return t[+o]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function z(t){if(!(n=W.exec(t)))throw new Error("invalid format: "+t);var n;return new F({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}z.prototype=F.prototype;function F(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}F.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function tt(t){t:for(var n=t.length,o=1,i=-1,e;o<n;++o)switch(t[o]){case".":i=e=o;break;case"0":i===0&&(i=o),e=o;break;default:if(!+t[o])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(e+1):t}var A;function nt(t,n){var o=_(t,n);if(!o)return A=void 0,t.toPrecision(n);var i=o[0],e=o[1],f=e-(A=Math.max(-8,Math.min(8,Math.floor(e/3)))*3)+1,c=i.length;return f===c?i:f>c?i+new Array(f-c+1).join("0"):f>0?i.slice(0,f)+"."+i.slice(f):"0."+new Array(1-f).join("0")+_(t,Math.max(0,n+f-1))[0]}function D(t,n){var o=_(t,n);if(!o)return t+"";var i=o[0],e=o[1];return e<0?"0."+new Array(-e).join("0")+i:i.length>e+1?i.slice(0,e+1)+"."+i.slice(e+1):i+new Array(e-i.length+2).join("0")}var G={"%":(t,n)=>(t*100).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:K,e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>D(t*100,n),r:D,s:nt,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function I(t){return t}var X=Array.prototype.map,R=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rt(t){var n=t.grouping===void 0||t.thousands===void 0?I:Q(X.call(t.grouping,Number),t.thousands+""),o=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",e=t.decimal===void 0?".":t.decimal+"",f=t.numerals===void 0?I:V(X.call(t.numerals,String)),c=t.percent===void 0?"%":t.percent+"",h=t.minus===void 0?"−":t.minus+"",x=t.nan===void 0?"NaN":t.nan+"";function O(a,g){a=z(a);var b=a.fill,M=a.align,d=a.sign,w=a.symbol,v=a.zero,N=a.width,E=a.comma,l=a.precision,$=a.trim,m=a.type;m==="n"?(E=!0,m="g"):G[m]||(l===void 0&&(l=12),$=!0,m="g"),(v||b==="0"&&M==="=")&&(v=!0,b="0",M="=");var B=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?o:w==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),H=(w==="$"?i:/[%p]/.test(m)?c:"")+(g&&g.suffix!==void 0?g.suffix:""),T=G[m],J=/[defgprs%]/.test(m);l=l===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l));function C(r){var y=B,u=H,p,L,P;if(m==="c")u=T(r)+u,r="";else{r=+r;var S=r<0||1/r<0;if(r=isNaN(r)?x:T(Math.abs(r),l),$&&(r=tt(r)),S&&+r==0&&d!=="+"&&(S=!1),y=(S?d==="("?d:h:d==="-"||d==="("?"":d)+y,u=(m==="s"&&!isNaN(r)&&A!==void 0?R[8+A/3]:"")+u+(S&&d==="("?")":""),J){for(p=-1,L=r.length;++p<L;)if(P=r.charCodeAt(p),48>P||P>57){u=(P===46?e+r.slice(p+1):r.slice(p))+u,r=r.slice(0,p);break}}}E&&!v&&(r=n(r,1/0));var k=y.length+r.length+u.length,s=k<N?new Array(N-k+1).join(b):"";switch(E&&v&&(r=n(s+r,s.length?N-u.length:1/0),s=""),M){case"<":r=y+r+u+s;break;case"=":r=y+s+r+u;break;case"^":r=s.slice(0,k=s.length>>1)+y+r+u+s.slice(k);break;default:r=s+y+r+u;break}return f(r)}return C.toString=function(){return a+""},C}function q(a,g){var b=Math.max(-8,Math.min(8,Math.floor(U(g)/3)))*3,M=Math.pow(10,-b),d=O((a=z(a),a.type="f",a),{suffix:R[8+b/3]});return function(w){return d(M*w)}}return{format:O,formatPrefix:q}}var j,Y,Z;it({thousands:",",grouping:[3],currency:["$",""]});function it(t){return j=rt(t),Y=j.format,Z=j.formatPrefix,j}Object.defineProperty(exports,"exponent_default",{enumerable:!0,get:function(){return U}});Object.defineProperty(exports,"format",{enumerable:!0,get:function(){return Y}});Object.defineProperty(exports,"formatPrefix",{enumerable:!0,get:function(){return Z}});Object.defineProperty(exports,"formatSpecifier",{enumerable:!0,get:function(){return z}});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const ie=require("./chunk-KEIR6QF5-C4fcHpY0.cjs"),ae=require("./mermaid-parser.core-DYumW1vq.cjs"),o=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),f=require("./src-C9EhKhbk.cjs"),c=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),w=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),re=require("./chunk-JWPE2WC7-D8EnWK1B.cjs");var E="position frame",A="frame positioned",y="position relation",R="relation positioned",oe=o.__name(function(e){f.log.debug("options str",e)},"setOptions"),se=o.__name(function(){return{}},"getOptions"),le=o.__name(function(){T(),c.clear()},"clear");function T(){M={}}o.__name(T,"reset");var de=c.defaultConfig_default.eventmodeling,ce=o.__name(()=>w.cleanAndMerge({...de,...c.getConfig().eventmodeling}),"getConfig"),M={};function C(){let e=me;const{ast:n}=M,t=F();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=H(i,n.dataEntities,t);e=v(e,{$kind:E,index:a,frame:i,textProps:r});let d;Y(i)?(f.log.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(m=>m.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:y,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:B(e.swimlanes)},e}o.__name(C,"getState");function D(e){M.ast=e}o.__name(D,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function F(){return s}o.__name(F,"getDiagramProps");var me={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function $(e){const n=e.split(".");if(n.length===2)return n[0]}o.__name($,"extractNamespace");function W(e){const n=e.split(".");return n.length===2?n[1]:e}o.__name(W,"extractName");function O(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o.__name(O,"findSwimlaneByNamespace");function _(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o.__name(_,"findNextAvailableIndex");function I(e,n){const t=$(e.entityIdentifier),i=O(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:_(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:_(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:_(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o.__name(I,"calculateSwimlaneProps");function N(e){const{themeVariables:n}=c.getConfig();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o.__name(N,"calculateEntityVisualProps");function H(e,n,t){const i=c.getConfig(),a=c.sanitizeText(W(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let l=`<b>${w.wrapLabel(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=c.sanitizeText(r,i),r=w.wrapLabel(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const h=n.find(p=>p.name===e.dataReference?.$refText);h&&(r=h.dataBlockValue,r=r.substring(r.indexOf(`{
|
|
2
|
+
`)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=c.sanitizeText(r,i),r=w.wrapLabel(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="<br/>")}const m=r!==void 0;m&&(l+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=w.calculateTextDimensions(l,x),g=m?u.width/3:u.width,b={content:l,width:g,height:u.height};return f.log.debug(`[${e.name}] ${e.entityIdentifier} text`,b),b}o.__name(H,"calculateTextProps");function q(e,n){const t=n,i=N(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:A,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o.__name(q,"decidePositionFrame");function U(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o.__name(U,"calculateX");function L(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o.__name(L,"calculateMaxRight");function B(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o.__name(B,"sortedSwimlanesArray");function V(e,n){const t=n,i=I(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},m=U(a,d,r),x=m+l.width+s.boxPadding,u=L(Object.values(e.swimlanes),x);a.r=m+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const g={x:m,y:s.swimlanePadding+a.y,r:x,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},b={...e,boxes:[...e.boxes,g],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:u},h=B(b.swimlanes);h.length>0&&(h[0].y=0);for(let p=1;p<h.length;p++){const ne=h[p],S=h[p-1];ne.y=S.y+S.height+s.swimlaneGap}return b}o.__name(V,"evolveFramePositioned");function X(e,n){return e===0&&n.sourceFrames.length===0}o.__name(X,"isFirstFrame");function Y(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o.__name(Y,"hasSourceFrame");function P(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o.__name(P,"findBoxByFrame");function G(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o.__name(G,"findBoxByLineIndex");function j(e,n){const t=n;if(ie.isEmResetFrame(t.frame)||X(t.index,t.frame))return[];const i=P(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=P(e.boxes,t.sourceFrame):a=G(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:R,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o.__name(j,"decidePositionRelation");function z(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o.__name(z,"evolveRelationPositioned");var ue={[E]:q,[y]:j},xe={[A]:V,[R]:z};function K(e,n){const t=ue[n.$kind];if(t==null)return[];const i=t(e,n);return f.log.debug("decided events",i),i}o.__name(K,"decide");function J(e,n){const t=n.reduce((i,a)=>{const r=xe[a.$kind];return r==null?i:r(i,a)},e);return f.log.debug("evolve events",{state:e,newState:t,events:n}),t}o.__name(J,"evolve");function v(e,n){return J(e,K(e,n))}o.__name(v,"dispatch");var k={getConfig:ce,setOptions:oe,getOptions:se,clear:le,setAccTitle:c.setAccTitle,getAccTitle:c.getAccTitle,getAccDescription:c.getAccDescription,setAccDescription:c.setAccDescription,setDiagramTitle:c.setDiagramTitle,getDiagramTitle:c.getDiagramTitle,setAst:D,getDiagramProps:F,getState:C},ge={parse:o.__name(async e=>{const n=await ae.parse("eventmodeling",e);f.log.debug(n),k.setAst(n),re.populateCommonDb(n,k)},"parse")},fe=c.getConfig2()?.eventmodeling;function Q(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o.__name(Q,"renderD3Box");function Z(e,n){return e>n}o.__name(Z,"dirUpwards");function ee(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=Z(r,d),m=a.sourceBox.x+a.sourceBox.dimension.width*2/3,x=a.targetBox.x+a.targetBox.dimension.width/3;let u,g;f.log.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(u=r,g=d+a.targetBox.dimension.height):(u=r+a.sourceBox.dimension.height,g=d);const b=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",b).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${m} ${u} L${x} ${g}`)}}o.__name(ee,"renderD3Relation");function te(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o.__name(te,"renderD3Swimlane");var he={parser:ge,db:k,renderer:{draw:o.__name(function(e,n,t,i){if(f.log.debug("in eventmodeling renderer",e+`
|
|
3
|
+
`,"id:",n,t),!fe)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=c.getConfig2(),l=f.select_default(`[id="${n}"]`),m=a.getDiagramProps(),x=a.getState(),u=`em-arrowhead-${n}`,g=r.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(te(l,x.maxR,m,r)),x.boxes.forEach(Q(l,m)),x.relations.forEach(ee(l,m,u,r)),l.append("defs").append("marker").attr("id",u).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",g),c.setupGraphViewbox2(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw")},styles:o.__name(e=>"","getStyles")};exports.diagram=he;
|