collabmd 0.1.51 → 0.1.52
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 -1
- package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-BEz2BKN1.js +1 -0
- package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/client/assets/Middleware-DUgFSleI.js +1 -0
- package/dist/client/assets/_basePickBy-QJXUw_pr.js +1 -0
- package/dist/client/assets/_baseUniq-DR4vVjyC.js +1 -0
- package/dist/client/assets/abnfDiagram-O67JEVCF-Dwt6a0Ds.js +1 -0
- package/dist/client/assets/abnfDiagram-VCTEODGH-DxNxad6-.js +1 -0
- package/dist/client/assets/architecture-7GRP2DOG-BBwRXFv3.js +1 -0
- package/dist/client/assets/architecture-7GRP2DOG-DJVtYNt-.js +1 -0
- package/dist/client/assets/architectureDiagram-5GKGNRK7-C1uvg5id.js +36 -0
- package/dist/client/assets/architectureDiagram-NJMV4G6O-D5CGiX3G.js +36 -0
- package/dist/client/assets/{babel-CY5KOv-I.js → babel-Bi_28hhi.js} +1 -1
- package/dist/client/assets/band-D-Cum8PO.js +1 -0
- package/dist/client/assets/blockDiagram-BEXU5L5S-BgTM0var.js +140 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-B2YonsoG.js +129 -0
- package/dist/client/assets/{browser-BKLM0ThC-IxjwuOIz-DyJcVMFR.js → browser-BKLM0ThC-IxjwuOIz-C0mP17s1.js} +1 -1
- package/dist/client/assets/{browser-utils-DbXSMI-6.js → browser-utils-vlHL9goC.js} +1 -1
- package/dist/client/assets/{c4Diagram-7LVT6UL2-VAk1HPmz.js → c4Diagram-7LVT6UL2-r4IwomZm.js} +2 -2
- package/dist/client/assets/c4Diagram-YGBWAQC7-_xZPrNkB.js +38 -0
- package/dist/client/assets/channel-CgcHBnmr.js +1 -0
- package/dist/client/assets/chunk-2E4U76K2-CIQUuV9n.js +1 -0
- package/dist/client/assets/chunk-2Q5K7J3B-BMFG3ur0.js +1 -0
- package/dist/client/assets/{chunk-2ZTRR5NV-C2qZJila.js → chunk-2ZTRR5NV-CnDP55cn.js} +1 -1
- package/dist/client/assets/chunk-2ZTRR5NV-DcPRfelM.js +2 -0
- package/dist/client/assets/chunk-3FUC2YCW-8tZlhTGX.js +1 -0
- package/dist/client/assets/{chunk-3Z5EZCMW-DMniOlPd.js → chunk-3Z5EZCMW-BAnA6eQ7.js} +1 -1
- package/dist/client/assets/chunk-3Z5EZCMW-Yx4Q5AcN.js +1 -0
- package/dist/client/assets/chunk-4HAMMTFA-q0ldNVvr.js +62 -0
- package/dist/client/assets/chunk-4SOEAONT-C3fufoVl.js +40 -0
- package/dist/client/assets/chunk-5DYCD2WN-BKWCKnK-.js +1 -0
- package/dist/client/assets/{chunk-5V3GS4D5-i-ZDOEnP.js → chunk-5V3GS4D5-B5uC2oxu.js} +1 -1
- package/dist/client/assets/chunk-5V3GS4D5-BR7kgIgJ.js +1 -0
- package/dist/client/assets/chunk-5VM5RSS4-hE9rU_bl.js +15 -0
- package/dist/client/assets/chunk-6AEJRKK7-DTVZj5bY.js +1 -0
- package/dist/client/assets/{chunk-6AZGARVD-BB6FqMl-.js → chunk-6AZGARVD--pTGpDnx.js} +1 -1
- package/dist/client/assets/chunk-6AZGARVD-CnZDr4Cj.js +1 -0
- package/dist/client/assets/{chunk-6EIED4P4-DdUJkP0f.js → chunk-6EIED4P4-Bp8dpTvX.js} +1 -1
- package/dist/client/assets/chunk-6EIED4P4-DBVWq7Tz.js +1 -0
- package/dist/client/assets/{chunk-6K3QC6MW-CqVsVn-y.js → chunk-6K3QC6MW-DGVRzL6v.js} +1 -1
- package/dist/client/assets/chunk-6K3QC6MW-JnuvEGV4.js +1 -0
- package/dist/client/assets/{chunk-6TQVIW2G-DKlLbNIP.js → chunk-6TQVIW2G-BSj0l_pu.js} +1 -1
- package/dist/client/assets/chunk-6TQVIW2G-DgBX-Pv0.js +1 -0
- package/dist/client/assets/chunk-742MDFTN-D1nh6vNv.js +1 -0
- package/dist/client/assets/{chunk-747NJXEK-BFkZPlab.js → chunk-747NJXEK-BjqqAsS9.js} +1 -1
- package/dist/client/assets/chunk-747NJXEK-Cur1aosP.js +2 -0
- package/dist/client/assets/chunk-75Z2AOVW-DitkSoSG.js +2 -0
- package/dist/client/assets/chunk-7INBJB4K-CDmiHbaX.js +62 -0
- package/dist/client/assets/chunk-7M6MHVWA-BDakkknV.js +213 -0
- package/dist/client/assets/chunk-7PRAP22T-9uTvtc_-.js +1 -0
- package/dist/client/assets/{chunk-CLGD4ZFX-Cmtx89ht.js → chunk-CLGD4ZFX-BfYJtJm1.js} +1 -1
- package/dist/client/assets/chunk-DU6HZSFF-CWlP1Dk_.js +125 -0
- package/dist/client/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/client/assets/chunk-DYU5D34O-DN0WQZBm.js +1 -0
- package/dist/client/assets/{chunk-F27PBJKO-Dg3H6KLL.js → chunk-F27PBJKO-DPcsPcEs.js} +1 -1
- package/dist/client/assets/{chunk-FOHPRMQF-DHwB1DNv.js → chunk-FOHPRMQF-Dmmo5Kak.js} +9 -9
- package/dist/client/assets/chunk-FOHPRMQF-DzxwRta7.js +161 -0
- package/dist/client/assets/chunk-GMAD6QVW-Bgk8qnty.js +8 -0
- package/dist/client/assets/chunk-GNY47TPC-CTrH5O5R.js +1 -0
- package/dist/client/assets/{chunk-SVP7TREG-XlsB_ZMZ.js → chunk-GTNCS2PH-ChgkzEIi.js} +1 -1
- package/dist/client/assets/chunk-GVQU2GXP-CQ8cl-Uu.js +1 -0
- package/dist/client/assets/chunk-GWA4HPMP-CGmv2yIq.js +1 -0
- package/dist/client/assets/{chunk-I5DQTOEV-Hm2LfiYI.js → chunk-I5DQTOEV-B98XA8VK.js} +1 -1
- package/dist/client/assets/chunk-I5DQTOEV-aBZooNp1.js +1 -0
- package/dist/client/assets/{chunk-ICYGCRZG-749o-pGJ.js → chunk-ICYGCRZG-D97UeqJs.js} +1 -1
- package/dist/client/assets/chunk-ICYGCRZG-odvlDZyA.js +1 -0
- package/dist/client/assets/{chunk-IH6LHLGP-CC6I9F3i.js → chunk-IH6LHLGP-BNevEHZK.js} +1 -1
- package/dist/client/assets/chunk-IH6LHLGP-CvXe34hB.js +1 -0
- package/dist/client/assets/{chunk-IMKFNOWR-3F6NhHUP.js → chunk-IMKFNOWR-CBqxfpcP.js} +2 -2
- package/dist/client/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/client/assets/chunk-JWPE2WC7-GDilnS5Y.js +1 -0
- package/dist/client/assets/{chunk-KI3K4JFJ-Rma-0k_M.js → chunk-KI3K4JFJ-D5XCPRZv.js} +1 -1
- package/dist/client/assets/chunk-KI3K4JFJ-FTtDwx3-.js +1 -0
- package/dist/client/assets/chunk-L3NEJ4N5-BflzkdTI.js +1 -0
- package/dist/client/assets/{chunk-LNGE3PJU-DWpGwHrW.js → chunk-LNGE3PJU-5-SxdO55.js} +1 -1
- package/dist/client/assets/chunk-LNGE3PJU-5nWSl6jJ.js +34 -0
- package/dist/client/assets/chunk-MBY4JIJT-DTJ4UcAm.js +8 -0
- package/dist/client/assets/chunk-NETBCI7D-CmUwDWUZ.js +1 -0
- package/dist/client/assets/chunk-O7XYJQB3-D0_ZY2za.js +126 -0
- package/dist/client/assets/chunk-OSK3NFVY-DqeKV_pg.js +10 -0
- package/dist/client/assets/{chunk-OUJLGHUK-D0j2JRSg.js → chunk-OUJLGHUK-75UXlPjl.js} +1 -1
- package/dist/client/assets/chunk-OUJLGHUK-DA95-S9B.js +2 -0
- package/dist/client/assets/{chunk-P2QGCYS3-Du8EtwOa.js → chunk-P2QGCYS3-BA--DhpW.js} +1 -1
- package/dist/client/assets/chunk-POPQ4Y6H-V_NEc45n.js +1 -0
- package/dist/client/assets/chunk-PWAF6VOD-D_kLse-N.js +1 -0
- package/dist/client/assets/{chunk-ZPMXAHWN-Dt0TxJa6.js → chunk-RUX4WMZV-BGnd3s_C.js} +4 -4
- package/dist/client/assets/{chunk-SHT3W25Y-BKaI8jZO.js → chunk-SHT3W25Y-YM3S-A_M.js} +5 -5
- package/dist/client/assets/chunk-SVP7TREG-DdNhDOmW.js +88 -0
- package/dist/client/assets/{chunk-TICWLB2K-Cpp2z8yK.js → chunk-TICWLB2K-BGGgCr4x.js} +3 -3
- package/dist/client/assets/chunk-TLUHSLCS-DCZhIDYA.js +1 -0
- package/dist/client/assets/chunk-UA2S7LBM-DicYDjDM.js +1 -0
- package/dist/client/assets/{chunk-UY3FDG6J-CnmaAkG5.js → chunk-UY3FDG6J-DqSM_0FB.js} +1 -1
- package/dist/client/assets/chunk-UY3FDG6J-QT-rkt0y.js +1 -0
- package/dist/client/assets/chunk-WEXAMYUT-DDlVNp8J.js +1 -0
- package/dist/client/assets/chunk-X3CZISLH-BixgQztF.js +1 -0
- package/dist/client/assets/chunk-X3CZISLH-DwWpRaN8.js +1 -0
- package/dist/client/assets/{chunk-XHIXRSVI-BFQ6B8BE.js → chunk-XHIXRSVI-BSN7JlfK.js} +1 -1
- package/dist/client/assets/chunk-XHIXRSVI-DN_fEwws.js +1 -0
- package/dist/client/assets/chunk-XXDRQBXY-C7hQHDmQ.js +1 -0
- package/dist/client/assets/{chunk-XXDRQBXY-BvKO0v-W.js → chunk-XXDRQBXY-CdRN9Akd.js} +1 -1
- package/dist/client/assets/chunk-Y2CYZVJY-BbRBGnmc.js +1 -0
- package/dist/client/assets/chunk-Z7XXMR3K-P4Vaq8hD.js +10 -0
- package/dist/client/assets/chunk-ZIGJFQKS-b8OUHKK5.js +2 -0
- package/dist/client/assets/classDiagram-ZZMXUADV-QLbh_Nkf.js +1 -0
- package/dist/client/assets/classDiagram-v2-NBCMYWYE-3TQORq33.js +217 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-QLbh_Nkf.js +1 -0
- package/dist/client/assets/clone-C1hp9FUh.js +1 -0
- package/dist/client/assets/comment-markdown-renderer-Bxi_JRSR.js +1 -0
- package/dist/client/assets/comment-thread-store-CHvy8GF8.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-Czr0rwGr.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-DLmEf9HS.js +1 -0
- package/dist/client/assets/cynefin-OW5HDTMX-CF3N9j1_.js +1 -0
- package/dist/client/assets/cynefin-OW5HDTMX-e-Quc9Yl.js +1 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-DTnLZaO7.js +62 -0
- package/dist/client/assets/cynefinDiagram-VND7K2PF-DwfMZ3vk.js +62 -0
- package/dist/client/assets/cytoscape-cose-bilkent-NdTYBUiT.js +1 -0
- package/dist/client/assets/cytoscape-fcose-DE9_QRG_.js +1 -0
- package/dist/client/assets/cytoscape.esm-EK2DW5Qr.js +321 -0
- package/dist/client/assets/dagre-6A5THRUB-DewyAGK6.js +4 -0
- package/dist/client/assets/dagre-D7FiCLLP.js +1 -0
- package/dist/client/assets/{dagre-GXQ25YYZ-BSfKCfy7.js → dagre-GXQ25YYZ-Vtyx08Qh.js} +2 -2
- package/dist/client/assets/deferred-collab-D4cxEdad.css +1 -0
- package/dist/client/assets/deferred-preview-BAXYgf4T.css +1 -0
- package/dist/client/assets/diagram-22UHCM2B-DbZirFfl.js +200 -0
- package/dist/client/assets/diagram-3UASUU5V-DmhdYv6_.js +24 -0
- package/dist/client/assets/diagram-ATOU4E4O-B5uX-jVO.js +3 -0
- package/dist/client/assets/diagram-CDSNMT55-D_qyS11R.js +30 -0
- package/dist/client/assets/diagram-MLGK6HIB-DIBG6Ivu.js +24 -0
- package/dist/client/assets/diagram-MPIPVDR6-D9XsALDV.js +41 -0
- package/dist/client/assets/{diagram-S7CK7UJ4-D7KaM9yj.js → diagram-S7CK7UJ4-CGTzfo2f.js} +3 -3
- package/dist/client/assets/diagram-UQ7AKVKN-CWZS8QtB.js +41 -0
- package/dist/client/assets/{diagram-VSXAHHWV-B3-U-Q2E.js → diagram-VSXAHHWV-DaO1nOZF.js} +3 -3
- package/dist/client/assets/diagram-VX7I27RA-B54P6Cyf.js +24 -0
- package/dist/client/assets/diagram-Z3DM3KII-Cl2EXiXp.js +24 -0
- package/dist/client/assets/direct-engine-DdrQKpgq-4QysbH_V.js +5 -0
- package/dist/client/assets/dist-B7fBbwrO.js +1 -0
- package/dist/client/assets/{dist-DVXzbeDx.js → dist-BVCNc-Es.js} +1 -1
- package/dist/client/assets/dist-BYBF4LtZ.js +1 -0
- package/dist/client/assets/{dist-B_B4XLmq.js → dist-B_1hMrc6.js} +1 -1
- package/dist/client/assets/{dist-EWJYvBK1.js → dist-BfpAc922.js} +1 -1
- package/dist/client/assets/dist-BnVaoRgZ.js +1 -0
- package/dist/client/assets/{dist-kiD2GIsD.js → dist-Bog8M5U3.js} +6 -6
- package/dist/client/assets/dist-CAG5sIOj.js +1 -0
- package/dist/client/assets/{dist-CrWzIWEE.js → dist-CKf7LlAo.js} +1 -1
- package/dist/client/assets/{dist-CqXVyYoH.js → dist-CUsXdnU4.js} +1 -1
- package/dist/client/assets/{dist-B7XMN9AT.js → dist-CXOUa90Q.js} +1 -1
- package/dist/client/assets/dist-CYMCikZo.js +1 -0
- package/dist/client/assets/dist-CYfPeupF.js +1 -0
- package/dist/client/assets/dist-Ch6Sr9KF.js +28 -0
- package/dist/client/assets/dist-Ck-B8onw.js +2 -0
- package/dist/client/assets/dist-CrkYYcOU.js +1 -0
- package/dist/client/assets/{dist-BR81yxMt.js → dist-CsQTfQFi.js} +1 -1
- package/dist/client/assets/dist-Cu5Ze2cs.js +6 -0
- package/dist/client/assets/{dist-Drv_wZYC.js → dist-CvVoyTRF.js} +1 -1
- package/dist/client/assets/{dist-CbDyXgCo.js → dist-D4kDR0g8.js} +1 -1
- package/dist/client/assets/dist-D8LnhZzy.js +1 -0
- package/dist/client/assets/{dist-CELhfKzh.js → dist-DGa-2MNX.js} +2 -2
- package/dist/client/assets/{dist-CO0-4CuV.js → dist-DI6c02Da.js} +8 -8
- package/dist/client/assets/{dist-DJAMplZI.js → dist-DNONgI1P.js} +2 -2
- package/dist/client/assets/dist-DVBYH83t.js +1 -0
- package/dist/client/assets/dist-DX6qtdxv.js +1 -0
- package/dist/client/assets/{dist-Bx3QkS-3.js → dist-Da-jLrCf.js} +1 -1
- package/dist/client/assets/dist-DofvCYzJ.js +1 -0
- package/dist/client/assets/{dist-BzFSJM0U.js → dist-Dx37MHWs.js} +1 -1
- package/dist/client/assets/{dist-Bdy9ZRzd.js → dist-GTGhtpyW.js} +1 -1
- package/dist/client/assets/{dist-nxQErAaK.js → dist-W0FoeIxk.js} +9 -9
- package/dist/client/assets/{dist-By7ieqAf.js → dist-Y6zYRI-A.js} +1 -1
- package/dist/client/assets/{dist-Bfxzlnrf.js → dist-jVKfryIL.js} +1 -1
- package/dist/client/assets/{dist-DCpIH3-_.js → dist-zHDLm1oE.js} +1 -1
- package/dist/client/assets/{document-formatter-Qdiq9uJs.js → document-formatter-gO8qM2qY.js} +1 -1
- package/dist/client/assets/{drawioEditor-CHf1vtdQ.js → drawioEditor-DCkWweiy.js} +2 -2
- package/dist/client/assets/duration-BiuFXtXd.js +1 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-PfC84FyI.js +1 -0
- package/dist/client/assets/ebnfDiagram-ZINNZB2B-DYvm_QtE.js +1 -0
- package/dist/client/assets/editor-session-DxRyr4EM.js +14 -0
- package/dist/client/assets/elk-276RUBZZ-B8LB3Pac.js +27 -0
- package/dist/client/assets/embedded-editor-base-elU0Avik.css +1 -0
- package/dist/client/assets/{embedpdf-DA4bA119-E8wZ11J2.js → embedpdf-DA4bA119-DsoNiPlQ.js} +4 -4
- package/dist/client/assets/{embedpdf-LUXDBD3-.js → embedpdf-DyOonRvx.js} +1 -1
- package/dist/client/assets/{en-2RFA324Y-BsuNJTcL.js → en-GNC3RJIS-CEy_oGTd.js} +1 -1
- package/dist/client/assets/erDiagram-OPXOYQCR-o8GRv8A_.js +99 -0
- package/dist/client/assets/{erDiagram-RLTQ6QDP-CWrH1UJ9.js → erDiagram-RLTQ6QDP-C9cJl5NB.js} +2 -2
- package/dist/client/assets/esm-BzZ1JFVo.js +65 -0
- package/dist/client/assets/{estree-CuT_pB8K.js → estree-DCT3Jm65.js} +4 -4
- package/dist/client/assets/eventmodeling-NTZA5JFV-CDy1bN6j.js +1 -0
- package/dist/client/assets/eventmodeling-NTZA5JFV-Dxtv5D-P.js +1 -0
- package/dist/client/assets/{excalidraw-element-link-iA6zo0_f.js → excalidraw-element-link-CGZ5934B.js} +1 -1
- package/dist/client/assets/{excalidrawEditor-DDE0n1Pk.css → excalidrawEditor-BCTFp_CV.css} +1 -1
- package/dist/client/assets/excalidrawEditor-BVfSxjSO.js +9 -0
- package/dist/client/assets/export-page-BCo_e15t.js +46 -0
- package/dist/client/assets/exportDocument-Ba-n1X4U.css +1 -0
- package/dist/client/assets/exportDocument-DP6oE_or.js +2 -0
- package/dist/client/assets/{fa-IR-FIYUE2GQ-C865Nx3X.js → fa-IR-I4JNTJHK-CFtHZqoT.js} +1 -1
- package/dist/client/assets/file-search-3hYF4cYa.js +1 -0
- package/dist/client/assets/flowDiagram-HODETNUW-Bq4470NR.js +1 -0
- package/dist/client/assets/flowDiagram-KWPJA3E3-DQG9qGiU.js +1 -0
- package/dist/client/assets/forth-D6RzAl64.js +1 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-x40PW0Ah.js +292 -0
- package/dist/client/assets/ganttDiagram-FUAMR5RP-BQpsI7gQ.js +292 -0
- package/dist/client/assets/gitGraph-4MIJSDKK-B-rpDYbz.js +1 -0
- package/dist/client/assets/gitGraph-4MIJSDKK-ZaBIE4Lb.js +1 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-ahsNaZsp.js +106 -0
- package/dist/client/assets/gitGraphDiagram-X574FWY7-wbs_2m9f.js +106 -0
- package/dist/client/assets/graphlib-C9Tl7QrK.js +1 -0
- package/dist/client/assets/{html-Cdnr2qzU.js → html-CBXMuS97.js} +2 -2
- package/dist/client/assets/html-DTuc_pxj.js +1 -0
- package/dist/client/assets/{id-ID-EOMR5R3I-CGQwUjoL.js → id-ID-2WY7E4VX-CCAeQpPr.js} +2 -2
- package/dist/client/assets/image-EJJKRVD3-BQfi5nWJ.js +1 -0
- package/dist/client/assets/{image-blob-reduce.esm-Dj7YBvMv.js → image-blob-reduce.esm-BFq-Mx5V.js} +2 -2
- package/dist/client/assets/index-BxAuGDoN.css +1 -0
- package/dist/client/assets/index-uw9O0z1c.js +1112 -0
- package/dist/client/assets/info-A6RAGUB7-BcGxhjED.js +1 -0
- package/dist/client/assets/info-A6RAGUB7-BlutK7BT.js +1 -0
- package/dist/client/assets/infoDiagram-27XIBGKW-MrZyptIy.js +2 -0
- package/dist/client/assets/infoDiagram-VRGFBTTK-KkUjDRAQ.js +2 -0
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-CRy9vIS5.js → ishikawaDiagram-5VMMS53U-Bnt9yM0O.js} +2 -2
- package/dist/client/assets/ishikawaDiagram-OU5B5YK6-Di9BcpOY.js +70 -0
- package/dist/client/assets/{it-IT-FC2VTM3L-KTijNcUe.js → it-IT-INVHSAJF-DytAgndh.js} +1 -1
- package/dist/client/assets/javascript-B9I2pbsP.js +1 -0
- package/dist/client/assets/javascript-DctB8BJo.js +1 -0
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-D4ZR_s9J.js → journeyDiagram-3NMN7TZE-Bl0abK1r.js} +1 -1
- package/dist/client/assets/journeyDiagram-ZHPQQLJL-J-sGrs9e.js +139 -0
- package/dist/client/assets/jsx-runtime-DKj5X9O4.js +1 -0
- package/dist/client/assets/kanban-definition-PNTS6WVX-5ZDV_yIa.js +89 -0
- package/dist/client/assets/{kanban-definition-UXKFOSKX-CIDTmu5g.js → kanban-definition-UXKFOSKX-DMgUfNt0.js} +10 -10
- package/dist/client/assets/{katex-CXMH3UgJ.js → katex-9NBMfU68.js} +2 -2
- package/dist/client/assets/katex-ZlcWpGUi.js +257 -0
- package/dist/client/assets/line-DEbP8Ok6.js +1 -0
- package/dist/client/assets/linear-DExL6ILt.js +1 -0
- package/dist/client/assets/{lobby-presence-Rdjnc0_0.js → lobby-presence-Cz5jGOPg.js} +1 -1
- package/dist/client/assets/{lua-CL1SqxuB.js → lua-zbJo2mq3.js} +1 -1
- package/dist/client/assets/{markdown-CByV-4CU.js → markdown-Bo71X2X2.js} +8 -8
- package/dist/client/assets/markdown-it-DpvIRaVq.js +13 -0
- package/dist/client/assets/markdown-math-CyyBVuDO.js +517 -0
- package/dist/client/assets/merge-CALoRt3l.js +1 -0
- package/dist/client/assets/{mermaid-parser.core-DrdLA3p0.js → mermaid-parser.core-Bpogunsh.js} +1 -1
- package/dist/client/assets/mermaid-parser.core-DBy--Jc0.js +3 -0
- package/dist/client/assets/mermaid.core-BeOUPE3Q.js +10 -0
- package/dist/client/assets/mindmap-definition-NLK3R4M7-ByVb-0vj.js +96 -0
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-DO8NB9VH.js → mindmap-definition-YA3MSWOX-DBZN5_GH.js} +29 -29
- package/dist/client/assets/{nginx-BMaDbqW3.js → nginx-8H7HVH4w.js} +1 -1
- package/dist/client/assets/packet-AYTQ26CC-CqpSjTWl.js +1 -0
- package/dist/client/assets/packet-AYTQ26CC-DvbY8dI6.js +1 -0
- package/dist/client/assets/pegDiagram-GJSIUBJH-aost1sSO.js +1 -0
- package/dist/client/assets/pegDiagram-XKGWAZYB-DRo8CZu3.js +1 -0
- package/dist/client/assets/percentages-LWOC67ZH-VhvllE7L.js +1 -0
- package/dist/client/assets/{pica-xkWDouSg.js → pica-BPrp-GK1.js} +1 -1
- package/dist/client/assets/pie-DzWLGKAD.js +1 -0
- package/dist/client/assets/pie-WAS4IAKB-Bg2eCNl5.js +1 -0
- package/dist/client/assets/pie-WAS4IAKB-DWSm9SSD.js +1 -0
- package/dist/client/assets/pieDiagram-5QR66LMP-BICdpEuz.js +39 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-CZThaHsc.js +39 -0
- package/dist/client/assets/{preload-helper-CtT0-S4g.js → preload-helper-BAlEavIC.js} +1 -1
- package/dist/client/assets/preview-render-compiler-ktU0SXxY.js +43 -0
- package/dist/client/assets/preview-render-profile-D652PAjA.js +1 -0
- package/dist/client/assets/preview-render-worker-BI2bFVqM.js +575 -0
- package/dist/client/assets/prod-DU-0VfI7.js +145 -0
- package/dist/client/assets/prod-cXUNdmYV.js +1 -0
- package/dist/client/assets/{pug-Wky5Dnfy.js → pug-CqqUmdG7.js} +1 -1
- package/dist/client/assets/purify.es-go7v6Te-.js +3 -0
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-fJE7iAxt.js → quadrantDiagram-AXDQQJYC-C5iowkl_.js} +3 -3
- package/dist/client/assets/quadrantDiagram-O4NWA36T-Bgx5bF97.js +7 -0
- package/dist/client/assets/quick-switcher-controller-DSlOwOsU.js +1 -0
- package/dist/client/assets/radar-RG4KPBEZ-BfNQUEQy.js +1 -0
- package/dist/client/assets/radar-RG4KPBEZ-DxExotg6.js +1 -0
- package/dist/client/assets/railroad-74A4TZTK-BaQ6U6eJ.js +1 -0
- package/dist/client/assets/railroad-74A4TZTK-FfHmeIQk.js +1 -0
- package/dist/client/assets/railroad-abnf-HS5TGJTU-BJ3KZw7J.js +1 -0
- package/dist/client/assets/railroad-abnf-HS5TGJTU-CLkdDRsJ.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-B162zvcG.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-DA0sEq7w.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-CGs5GeJ5.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-DCmlICzO.js +1 -0
- package/dist/client/assets/railroadDiagram-O6MQD6OU-BTt_rKjT.js +1 -0
- package/dist/client/assets/railroadDiagram-XR7U4H2S-DbVoNgSz.js +1 -0
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-Balm0WW8.js → requirementDiagram-BXWQKSXE-BkvazG7r.js} +1 -1
- package/dist/client/assets/requirementDiagram-PLB6GJNP-BT0j9C40.js +84 -0
- package/dist/client/assets/sankeyDiagram-IPEJSGJF-X1BCUIrf.js +40 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-C_IemB9h.js +40 -0
- package/dist/client/assets/sankeyLinkHorizontal-usjP1-Cg.js +1 -0
- package/dist/client/assets/sequenceDiagram-PO4LG4MO-B-2QfXhV.js +169 -0
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-BL1j3Sn-.js → sequenceDiagram-WJ2MYXX4-CxFBgLGd.js} +3 -3
- package/dist/client/assets/{sieve-BAxa3IjF.js → sieve-tLWDfEkZ.js} +1 -1
- package/dist/client/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -1
- package/dist/client/assets/sizeCapture-INFHLROL-DrzwYt5z.js +1 -0
- package/dist/client/assets/sl-SI-QY5KCFGA-RZhwMpQL.js +8 -0
- package/dist/client/assets/solr-B78wSQJQ.js +1 -0
- package/dist/client/assets/src-XiVvaevx.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-BaSQ6Owj.js +1 -0
- package/dist/client/assets/stateDiagram-v2-GCMORJYK-CsVcfwVp.js +291 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CLlwrdvU.js +1 -0
- package/dist/client/assets/sv-SE-O3OFCY3J-DnS86_7q.js +12 -0
- package/dist/client/assets/swimlanes-2SLR337P-CnYTVqRX.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-CALFEmiS.js +1 -0
- package/dist/client/assets/swimlanesDiagram-TC7HE7FX-Bh4tmz27.js +8 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-xhehUG9e.js +8 -0
- package/dist/client/assets/th-TH-WLSZUSBX-DHehoYR2.js +1 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-7pch5JAr.js → timeline-definition-24CTP7MA-zse-5Dbm.js} +5 -5
- package/dist/client/assets/timeline-definition-EJHVYXUP-BhqPlKkN.js +120 -0
- package/dist/client/assets/treeView-Q6P3EWNA-BvHOzbu9.js +1 -0
- package/dist/client/assets/treeView-Q6P3EWNA-Cccy0ngL.js +1 -0
- package/dist/client/assets/treemap-CxZTjHiH.js +1 -0
- package/dist/client/assets/treemap-WGGIJYW6-oety7paS.js +1 -0
- package/dist/client/assets/treemap-WGGIJYW6-sMRCjCtX.js +1 -0
- package/dist/client/assets/usecaseDiagram-POWQR4AR-DR2LHQYs.js +328 -0
- package/dist/client/assets/v4-DDdyfk2q.js +1 -0
- package/dist/client/assets/{vault-api-client-QjZ_T03l.js → vault-api-client-BQxLVPeF.js} +1 -1
- package/dist/client/assets/vault-paths-BT-6nztu.js +1 -0
- package/dist/client/assets/venn.esm-C5rDfA9t.js +7 -0
- package/dist/client/assets/vennDiagram-4TSXK5OY-DgHr6cJD.js +28 -0
- package/dist/client/assets/vennDiagram-UO4OBE2U-BRwLn2Q1.js +28 -0
- package/dist/client/assets/{verilog-7LoJAqYT.js → verilog-CjI9Y6RI.js} +1 -1
- package/dist/client/assets/wardley-WFR3VGLG-BdwDpX_I.js +1 -0
- package/dist/client/assets/wardley-WFR3VGLG-Y7xty_3m.js +1 -0
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-BbSlUwuM.js → wardleyDiagram-VM6X3IG4-9A60XZis.js} +3 -3
- package/dist/client/assets/wardleyDiagram-VNRHLVJA-B_tMcVFG.js +78 -0
- package/dist/client/assets/wiki-link-resolver-Dch88erO.js +1 -0
- package/dist/client/assets/{worker-engine-m0rlHn8R-eSDcDGEI.js → worker-engine-m0rlHn8R-5h66k403.js} +1 -1
- package/dist/client/assets/{workspace-sync-client-D4nblH_2.js → workspace-sync-client-C2pdaQUN.js} +1 -1
- package/dist/client/assets/xychartDiagram-PMCCYNJV-fRpZ1MA5.js +7 -0
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-D00iy-wB.js +7 -0
- package/dist/client/assets/{yaml-9ltHPDNO.js → yaml-BcZaqAz8.js} +1 -1
- package/dist/client/assets/{yjs-provider-reset-guard-R43MnLNc.js → yjs-provider-reset-guard-DpntzUDR.js} +1 -1
- package/dist/client/drawio-editor.html +6 -5
- package/dist/client/excalidraw-editor.html +39 -32
- package/dist/client/export-document.html +4 -3
- package/dist/client/index.html +21 -14
- package/package.json +12 -9
- package/src/client/app/drawio-editor.html +1 -0
- package/src/client/app/excalidraw-editor.html +1 -0
- package/src/client/app/export-document-entry.js +1 -0
- package/src/client/app/export-document.html +1 -0
- package/src/client/app/index.html +19 -12
- package/src/client/application/app-shell/ui-feature-shell.js +20 -1
- package/src/client/application/app-shell-elements.js +2 -0
- package/src/client/application/diagram-preview-hydrator.js +7 -0
- package/src/client/application/mermaid-preview-hydrator.js +89 -3
- package/src/client/application/preview-diagram-utils.js +1 -0
- package/src/client/application/preview-render-compiler.js +2 -0
- package/src/client/application/preview-render-executor.js +4 -1
- package/src/client/application/preview-render-profile.js +8 -12
- package/src/client/application/preview-renderer.js +3 -0
- package/src/client/bootstrap/collabmd-app-shell.js +16 -7
- package/src/client/browser-utils.js +1 -1
- package/src/client/domain/excalidraw-scene.js +0 -11
- package/src/client/domain/file-search.js +1 -0
- package/src/client/domain/highlight-runtime.js +30 -3
- package/src/client/domain/markdown-math.js +14 -0
- package/src/client/export/export-host.js +3 -7
- package/src/client/export/export-pipeline.js +208 -21
- package/src/client/infrastructure/browser-preferences-port.js +8 -0
- package/src/client/infrastructure/editor-session.js +20 -0
- package/src/client/infrastructure/editor-view-adapter.js +8 -7
- package/src/client/infrastructure/excalidraw-room-client.js +2 -45
- package/src/client/infrastructure/git-api-client.js +5 -0
- package/src/client/infrastructure/tab-activity-lock.js +8 -4
- package/src/client/infrastructure/webmcp-tool-registry.js +12 -5
- package/src/client/presentation/bases-preview-controller.js +2 -1
- package/src/client/presentation/comment-markdown-renderer.js +2 -0
- package/src/client/presentation/comment-ui-controller.js +21 -30
- package/src/client/presentation/create-menu-presenter.js +16 -18
- package/src/client/presentation/drawio-embed-controller.js +55 -7
- package/src/client/presentation/excalidraw-embed-controller.js +11 -3
- package/src/client/presentation/file-explorer-controller.js +1 -0
- package/src/client/presentation/file-explorer-view.js +32 -2
- package/src/client/presentation/file-history-view-controller.js +6 -0
- package/src/client/presentation/git-diff-view-controller.js +3 -2
- package/src/client/presentation/git-panel-controller.js +6 -5
- package/src/client/presentation/image-lightbox-controller.js +7 -6
- package/src/client/presentation/outline-controller.js +0 -86
- package/src/client/presentation/quick-switcher-controller.js +50 -13
- package/src/client/presentation/scroll-sync-controller.js +69 -21
- package/src/client/styles/components/navigation.css +2 -2
- package/src/client/styles/deferred-collab.css +1 -0
- package/src/client/styles/deferred-preview.css +1 -0
- package/src/client/styles/features/diagram-preview.css +1 -0
- package/src/client/styles/features/preview-markdown.css +4 -4
- package/src/client/styles/foundation/themes.css +56 -271
- package/src/client/styles/layout/editor-page.css +0 -1
- package/src/client/styles/layout/shell.css +6 -0
- package/src/client/styles/layout/sidebar.css +3 -0
- package/src/client/styles/surfaces/landing-page.css +260 -0
- package/src/domain/agent-tool-definitions.js +45 -13
- package/src/domain/collabmd-content-capabilities.js +59 -4
- package/src/domain/collaboration-protocol.js +2 -0
- package/src/domain/markdown-outline.js +35 -0
- package/src/server/application/agent-connection-service.js +6 -2
- package/src/server/application/agent-content-service.js +124 -56
- package/src/server/auth/create-auth-service.js +40 -12
- package/src/server/auth/session-cookie.js +49 -38
- package/src/server/config/env.js +1 -1
- package/src/server/domain/backlink-index.js +1 -11
- package/src/server/domain/bases/base-query-results.js +7 -3
- package/src/server/domain/bases/base-query-service.js +2 -7
- package/src/server/domain/collaboration/collaboration-room.js +54 -16
- package/src/server/domain/docx-exporter.js +256 -2
- package/src/server/domain/hosted-workspace-contract.js +7 -0
- package/src/server/domain/hosted-workspace.js +29 -62
- package/src/server/domain/ripgrep-search-service.js +44 -28
- package/src/server/infrastructure/git/diff-service.js +15 -11
- package/src/server/infrastructure/git/git-service.js +4 -0
- package/src/server/infrastructure/git/image-mime.js +4 -3
- package/src/server/infrastructure/git/status-service.js +10 -6
- package/src/server/infrastructure/http/create-git-api-query-handler.js +25 -0
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +13 -53
- package/src/server/infrastructure/http/http-response.js +2 -0
- package/src/server/infrastructure/persistence/hosted-metadata-store.js +42 -5
- package/src/server/infrastructure/persistence/path-utils.js +23 -3
- package/src/server/infrastructure/persistence/pull-backup-store.js +52 -42
- package/src/server/infrastructure/persistence/sidecar-store.js +7 -4
- package/src/server/infrastructure/persistence/vault-file-store.js +55 -168
- package/src/server/infrastructure/plantuml/plantuml-renderer.js +33 -0
- package/src/server/infrastructure/structurizr/structurizr-workspace-service.js +24 -10
- package/src/server/infrastructure/websocket/attach-collaboration-gateway.js +7 -3
- package/src/server/infrastructure/websocket/client-socket-session.js +32 -4
- package/src/server/infrastructure/workspace/file-system-sync-service.js +4 -2
- package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-Crf9Y3Q6.js +0 -1
- package/dist/client/assets/abnfDiagram-VCTEODGH-PuinKbSQ.js +0 -1
- package/dist/client/assets/architecture-7GRP2DOG-BMOPAkUC.js +0 -1
- package/dist/client/assets/architectureDiagram-5GKGNRK7-46hPkrZv.js +0 -36
- package/dist/client/assets/blockDiagram-I7D4REHJ-C1S5Bzf8.js +0 -129
- package/dist/client/assets/channel-jwdhnPiV.js +0 -1
- package/dist/client/assets/chunk-2E4U76K2-Ba8Wf22k.js +0 -1
- package/dist/client/assets/chunk-4HAMMTFA-Ht-73lsT.js +0 -62
- package/dist/client/assets/chunk-5XKZK2GL-D4UAZSOJ.js +0 -1
- package/dist/client/assets/chunk-75Z2AOVW-B2cZexqK.js +0 -2
- package/dist/client/assets/chunk-DU6HZSFF-C6d6PJfE.js +0 -127
- package/dist/client/assets/chunk-GMAD6QVW-DUfjx_d5.js +0 -72
- package/dist/client/assets/chunk-GVQU2GXP-D1l7oRGR.js +0 -1
- package/dist/client/assets/chunk-L3NEJ4N5-BmCVn4y-.js +0 -1
- package/dist/client/assets/chunk-OSK3NFVY-CWHXAmfx.js +0 -10
- package/dist/client/assets/chunk-POPQ4Y6H-B5yJIrZE.js +0 -1
- package/dist/client/assets/chunk-PWAF6VOD-B3gML4ps.js +0 -1
- package/dist/client/assets/chunk-TLUHSLCS-Yl7B0Vrz.js +0 -1
- package/dist/client/assets/chunk-ZNVOA63L-BmCQjhx-.js +0 -40
- package/dist/client/assets/classDiagram-ZZMXUADV-BRw9vo8U.js +0 -1
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BRw9vo8U.js +0 -1
- package/dist/client/assets/comment-markdown-renderer-B9_vPc3F.js +0 -1
- package/dist/client/assets/comment-thread-store-NNHqRVsX.js +0 -1
- package/dist/client/assets/cose-bilkent-JH36ORCC-Cm_QF_yb.js +0 -1
- package/dist/client/assets/cynefin-OW5HDTMX-7tP7QfM3.js +0 -1
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-BRoCEoZM.js +0 -62
- package/dist/client/assets/cytoscape.esm-B-NFISlW.js +0 -321
- package/dist/client/assets/dagre-PrKaheQc.js +0 -1
- package/dist/client/assets/deferred-collab-rBe4nuQ2.css +0 -1
- package/dist/client/assets/deferred-preview-pe7Iwwx3.css +0 -1
- package/dist/client/assets/diagram-UQ7AKVKN-JevUZuYi.js +0 -41
- package/dist/client/assets/diagram-VX7I27RA-pSD4HMh1.js +0 -24
- package/dist/client/assets/diagram-Z3DM3KII-D8r1_CIb.js +0 -24
- package/dist/client/assets/direct-engine-DdrQKpgq-B5zIoeQw.js +0 -5
- package/dist/client/assets/dist-B3HdUPsK.js +0 -1
- package/dist/client/assets/dist-BIRygGYH.js +0 -1
- package/dist/client/assets/dist-BPyOlNLY.js +0 -2
- package/dist/client/assets/dist-ByhQbe-x.js +0 -1
- package/dist/client/assets/dist-C5NkYKAa.js +0 -1
- package/dist/client/assets/dist-CEirJSxk.js +0 -1
- package/dist/client/assets/dist-CRnJ0D9h.js +0 -1
- package/dist/client/assets/dist-CyNrloSI.js +0 -1
- package/dist/client/assets/dist-D60_kdpQ.js +0 -1
- package/dist/client/assets/dist-Hdhj3L3t.js +0 -1
- package/dist/client/assets/dist-gRRhmB-2.js +0 -6
- package/dist/client/assets/dist-kWb2d1CH.js +0 -1
- package/dist/client/assets/dist-l-56SowH.js +0 -19
- package/dist/client/assets/dist-sLzRQQk7.js +0 -1
- package/dist/client/assets/ebnfDiagram-PWID7BFC-UJ0Fz5ci.js +0 -1
- package/dist/client/assets/editor-session-4Bn81iWm.js +0 -14
- package/dist/client/assets/embedded-editor-base-jK221GC8.css +0 -1
- package/dist/client/assets/eventmodeling-NTZA5JFV-BR2FzK4R.js +0 -1
- package/dist/client/assets/excalidrawEditor-WIuguTz7.js +0 -9
- package/dist/client/assets/export-page-AN-wI5p4.js +0 -56
- package/dist/client/assets/exportDocument-B7IagJhQ.css +0 -1
- package/dist/client/assets/exportDocument-B9xNKpQe.js +0 -2
- package/dist/client/assets/file-search-DDLyyLDU.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-kb1lUSBo.js +0 -1
- package/dist/client/assets/forth-Cezjo90N.js +0 -1
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-BBNzDfaV.js +0 -292
- package/dist/client/assets/gitGraph-4MIJSDKK-DYlXv_yJ.js +0 -1
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-Csf0Dm_1.js +0 -106
- package/dist/client/assets/graphlib-DS17s2tU.js +0 -1
- package/dist/client/assets/image-2QKV3NAF-BUbX0y5Y.js +0 -1
- package/dist/client/assets/index-BAmZnTFV.css +0 -1
- package/dist/client/assets/index-mWiw418b.js +0 -1111
- package/dist/client/assets/info-A6RAGUB7-BlU-8_xu.js +0 -1
- package/dist/client/assets/infoDiagram-27XIBGKW-Bzy6kCbb.js +0 -2
- package/dist/client/assets/javascript-BWjar7HY.js +0 -1
- package/dist/client/assets/javascript-D-FtdkNC.js +0 -1
- package/dist/client/assets/jsx-runtime-BpzPEenQ.js +0 -1
- package/dist/client/assets/line-DSWLHgpx.js +0 -1
- package/dist/client/assets/linear-n-3HSMUF.js +0 -1
- package/dist/client/assets/markdown-it-CocJWnjv.js +0 -13
- package/dist/client/assets/mermaid.core-C_FK-7n4.js +0 -1
- package/dist/client/assets/mermaid.core-D0cMM4Rl.js +0 -10
- package/dist/client/assets/packet-AYTQ26CC-BSJEH9Lb.js +0 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-DS6Ab21R.js +0 -1
- package/dist/client/assets/percentages-Q7USCRWZ-DWE6uvTs.js +0 -1
- package/dist/client/assets/pie-WAS4IAKB-qxv01Y8W.js +0 -1
- package/dist/client/assets/pieDiagram-E7YTZNPT-BbFe6Tgs.js +0 -39
- package/dist/client/assets/preview-render-compiler-C_7J7eia.js +0 -43
- package/dist/client/assets/preview-render-compiler-DzJ1KR_M.js +0 -1
- package/dist/client/assets/preview-render-worker-1DoIDllV.js +0 -59
- package/dist/client/assets/prod-D5TxmmoB.js +0 -1
- package/dist/client/assets/prod-pbFU4TaM.js +0 -145
- package/dist/client/assets/quick-switcher-controller-CUajuy78.js +0 -1
- package/dist/client/assets/radar-RG4KPBEZ-B6h6pWOs.js +0 -1
- package/dist/client/assets/railroad-74A4TZTK-CGtTWdGc.js +0 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Cq7y22IA.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-V0aQVv9m.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-BQiIsX_p.js +0 -1
- package/dist/client/assets/railroadDiagram-O6MQD6OU-CUQKqbCK.js +0 -1
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-CcbMqrlQ.js +0 -40
- package/dist/client/assets/sl-SI-JRML4FIH-D53L_0S2.js +0 -6
- package/dist/client/assets/solr-BBopId9w.js +0 -1
- package/dist/client/assets/src-oBChb5qS.js +0 -1
- package/dist/client/assets/stateDiagram-D77RDMKH-DNi924hh.js +0 -1
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-C62JEwak.js +0 -1
- package/dist/client/assets/sv-SE-4ZPKFFXF-DT-G7RCI.js +0 -12
- package/dist/client/assets/swimlanes-42K2YHIH-ColgjSH4.js +0 -1
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-B9UZhEj4.js +0 -8
- package/dist/client/assets/th-TH-P7CTMGDK-6sy0NO7K.js +0 -1
- package/dist/client/assets/treeView-Q6P3EWNA-BTTYcvrF.js +0 -1
- package/dist/client/assets/treemap-WGGIJYW6-Cg7tyfH8.js +0 -1
- package/dist/client/assets/vennDiagram-4TSXK5OY-C5taziCX.js +0 -34
- package/dist/client/assets/wardley-WFR3VGLG-C6N1rULY.js +0 -1
- package/dist/client/assets/wiki-link-resolver-C2P_WmTV.js +0 -1
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-D06X1arY.js +0 -7
- package/src/server/domain/collaboration/protocol.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[];for(let t=0;t<256;++t)e.push((t+256).toString(16).slice(1));function t(t,n=0){return(e[t[n+0]]+e[t[n+1]]+e[t[n+2]]+e[t[n+3]]+`-`+e[t[n+4]]+e[t[n+5]]+`-`+e[t[n+6]]+e[t[n+7]]+`-`+e[t[n+8]]+e[t[n+9]]+`-`+e[t[n+10]]+e[t[n+11]]+e[t[n+12]]+e[t[n+13]]+e[t[n+14]]+e[t[n+15]]).toLowerCase()}var n=new Uint8Array(16);function r(){return crypto.getRandomValues(n)}function i(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():a(e,t,n)}function a(e,n,i){e||={};let a=e.random??e.rng?.()??r();if(a.length<16)throw Error(`Random bytes length must be >= 16`);if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){if(i||=0,i<0||i+16>n.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)n[i+e]=a[e];return n}return t(a)}export{i as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./auth-gate-C3mlS_4N.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,u as t}from"./runtime-config-BFVdhnJu.js";import{c as n,i as r,n as i,s as a}from"./browser-utils-
|
|
2
|
+
import{n as e,u as t}from"./runtime-config-BFVdhnJu.js";import{c as n,i as r,n as i,s as a}from"./browser-utils-vlHL9goC.js";import{r as o}from"./runtime-paths-Cn0snt_9.js";import{t as s}from"./preload-helper-BAlEavIC.js";import{_ as c,a as l,f as u,h as d,m as f,s as p}from"./file-kind-BwMIcZbi.js";var m={enabled:!1,implemented:!0,loginEndpoint:`/api/auth/oidc/login`,passwordLabel:`Password`,provider:``,requiresLogin:!1,sessionEndpoint:`/api/auth/session`,statusEndpoint:`/api/auth/status`,strategy:`none`,submitLabel:`Continue`},h=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAIAAAABc2X6AAAGsklEQVR4Ae3cA3jsShgG4Gvbtu1js7aObdu2bdbudmvbtu1VtUg2ydw7x95mstnt5rZ5voflG80/fzL72L89bOsF94J7wWgb2dSgiAzpPHmwbfPK1qWzxDNsRdb6Ar2BgtF9hSbDRbYG4mk2beuXwm+Q89yV+TmAILgHptrb5DyPtg3LhBZjBCP+RovewNZlc2TOl8nGel0HA4LA4qPhkRSM6XcHoEYk86fIfT2AQqFzYIBjMncHofkoZBWNCM1GSq+cpdpadQIMKEoRzIeXIroEkW08TObpDAiiO8F4Tga85TBnoEc8xVKZm9UNYECS0stnBCP/Ud+AnJH/SC+eAiShPTDZ3CRZPIN9CUokC6ZSYqE2wHhmKhw/2TegR2RnSFSUaRaMJccLxg7QsAQhktkTAACaAmOxkbA80h2taKIZKWzR1BFWRAQLRvXhphYdDEtcWDxxU4sOhjdDkdVYbmrRwYAgJIums3RTNWrftbHz/AmZh5MiLBAGVqOdZ4+1790inmrFvpYZuPPEATWdknmT5f7eZEN9V2N7o9zPu3XNInQte2BlcYE6tVTbltXw4kf9h5QlhW3rliBr1QcDAODsjPFlhmelqfNvKQty4S9B0KoPVgTxmWk7Tx0COMZCF6GzA3ZC0LWMwJSsTWiOXj+O6iP382KzowAAvMOhaxmAqw/Ijr4tGPsHgnbsACwxlpNNPABIIv5LIvxpzOVlkdXPNMGK8CCudi2pFi+ovRFlwLOtc7/uUgvnxhxu05LpIyD17nTu+EAw8q9HaVtXzgcAcBUMcAER/sx9YBj5pdeExr897NLtT9TVcLgRTzVcgbyHBuc9L5n8PdLJzAEwmWP1KDCMMvTp9jWf3tbC1gdQKDgMBhRBRL0GYaojO35zxOo8fZjbz5ZAZz700Anm9pLI9g+yoY7bYKrJBWJoRpk8SJ0/fDoc13QuRuNdgMmydfTBZPkGdcDDd0q1EDkOVIKzTOiDKVGY7oPLmylVYCKlL30wIKW6D44tJlSCE76nC45+CwHXfWDfdKVKcMwHdMEJ33MC7JqEqwRHvEgXnDaYE+ArMayBB3ECDAennnVKn4tUDU74gS446k1OgB3i8Z41LHmkKHtW4eGfpRpctv5/VlomlxOsTR6kKQN1H1wnptiZHpYFv27pMbqus4kxOChbySzTz8loakfukhIkYKEBEBzw6SBXk79cLQ5lXv5XuxtJAaMDdA/v+JMydVs8irBnDvB+g9QbGeY1SUFg2gTn1JD0z+cdPIVaTbym0JemeQ6FzrtzJtdFm+DT4Rh9MD9DybxNmxL03mg3g/u0MP3cbWo6GrWjbZMBg/0Id6wqAcWwEX+F/10fVzPIe2jmRW3VTiP+VBjC4bU6KgMAID9qaQt9frl3P6hSndOaP7HrxdSYPQiH92QYhvAwTRH7KdSWBL9h5j4GeugkqDpWc1oZBqaelSGNwMWNJMLjUkHxBn//zwZeH3topr+7bWxDmia0AID17gok7aTTMrTnw1KsfZTPVMhAyj9uVl5lIexqcQLs4KFpYXjpSjQw3HwrIqCBQQ5mXsZInBWtoIOac1GOqrU4IsUJwOSllsmha5iZTf3npzXnqXka+1dFmzo4D9vZgQp2TsAZvrZUIC7729WSmRlmVfz+HGExKpUCVGJj1oSQlTd+SZ9Lm4bubqKvtTkmk+OAIRhu+zMu3jEwyqTQ1d7lofWdzV0VyWSxpPJkjpOB76z7fsPfjjOHHMhBb0QzAhMUMS18nRrgOzHkz96YdPR4toNTMT+gKjq4OtatNPBCvgfcp9PD1w/wsFP14y7WA4/zu9SudVWw8HKpUC4Zw5uOLmQ//c4fGrZL8iit+WEpvMmxAIZbtrCor7uNLpj/ubpk6N6Kh059M6tINl8Qh4UUHGa73wzjNGHQ4dj7wC6JOPtLACLqkvq4WeuE2cWi/+nLt0csOKnQ1CKP+IYMWELqgPnGiLVh6O7Go8GYZpfxpDbnwkaHjpj3JfLRV7Wgb01SARxIupc6wntyfGOG9pbikRQJmzvodRg7mRq2tkkm7IbFlhktBdaBS7SsPZx1haDIbltOSwGKXxl5px7UZGaEb8gXlerEgmmMxB2KfEciTKHRAsvbmPo0nVsST1BEdH3Kyrh9bJVlQ7wmbk05USSu0PUPPWjDOtxLg5bF7h7tM42B08x//o7U0/AmrCSV3PtYiwZpS3B13MHMS/DIz4rYaBO0VM93JpwbwaJtqNfEsbwZFgEL50VtgcJLBV6wK9aKtfd+cEkvuBfcC37k9h8VGR+csPdltgAAAABJRU5ErkJggg==`;function g(){return{...m,...e().auth??{}}}function _(){return t(window.location.hash).get(`auth_password`)||``}function v(){let e=t(window.location.hash);if(!e.has(`auth_password`))return;e.delete(`auth_password`);let n=e.toString(),r=`${window.location.pathname}${window.location.search}${n?`#${n}`:``}`;window.history.replaceState(null,``,r)}function y(e){let n=t(window.location.hash),r=n.get(e)||``;if(!r)return``;n.delete(e);let i=n.toString(),a=`${window.location.pathname}${window.location.search}${i?`#${i}`:``}`;return window.history.replaceState(null,``,a),r}function b(){return`${window.location.pathname}${window.location.search}${window.location.hash}`}async function x(e){let t=await fetch(e.statusEndpoint,{headers:{Accept:`application/json`}});return n(t,`Failed to read auth status`)}function S(e){let t=e?.auth??{};if(t.strategy!==`oidc`||t.provider!==`google`)return;let n=String(e?.user?.name??``).trim();if(n)try{window.localStorage.setItem(`collabmd-user-name`,n)}catch{}}async function C(e,t){let r=await fetch(e.sessionEndpoint,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({password:t})});return n(r,`Authentication failed`)}function w(){let e=document.createElement(`div`);e.className=`auth-gate-overlay`;let t=document.createElement(`section`);return t.className=`auth-gate-card`,e.append(t),{card:t,overlay:e}}function T(){let e=document.createElement(`span`);e.className=`auth-gate-button__icon`,e.setAttribute(`aria-hidden`,`true`);let t=document.createElement(`img`);return t.alt=``,t.decoding=`async`,t.height=20,t.loading=`eager`,t.src=h,t.width=20,e.append(t),e}function E(e,t,{errorMessage:n=``}){e.replaceChildren();let r=document.createElement(`h1`);r.textContent=`Authentication required`;let i=document.createElement(`p`);i.textContent=`Sign in with Google to join this session.`;let a=document.createElement(`div`);a.className=`auth-gate-actions`;let o=document.createElement(`button`);o.className=`ui-button ui-button--secondary auth-gate-button auth-gate-button--google`,o.type=`button`,o.append(T(),document.createTextNode(t.submitLabel||`Continue with Google`));let s=document.createElement(`div`);s.className=`auth-gate-error`,s.textContent=n,a.append(o),e.append(r,i,s,a),o.addEventListener(`click`,()=>{let e=new URL(t.loginEndpoint,window.location.origin);e.searchParams.set(`returnTo`,b()),window.location.assign(e.toString())})}function D(e,{title:t,body:n,secondaryActionLabel:r=``,onSecondaryAction:i=null}){e.replaceChildren();let a=document.createElement(`h1`);a.textContent=t;let o=document.createElement(`p`);if(o.textContent=n,e.append(a,o),r&&typeof i==`function`){let t=document.createElement(`button`);t.className=`ui-button ui-button--secondary auth-gate-secondary-button`,t.type=`button`,t.textContent=r,t.addEventListener(`click`,()=>{i()}),e.append(t)}}function O(e,t,{onSubmit:n}){e.replaceChildren();let r=document.createElement(`h1`);r.textContent=`Authentication required`;let i=document.createElement(`p`);i.textContent=`Enter the host password to join this shared session.`;let a=document.createElement(`form`);a.className=`auth-gate-form`;let o=document.createElement(`label`);o.className=`auth-gate-label`,o.textContent=t.passwordLabel;let s=document.createElement(`input`);s.className=`ui-input auth-gate-input`,s.type=`password`,s.name=`password`,s.autocomplete=`current-password`,s.required=!0;let c=document.createElement(`div`);c.className=`auth-gate-error`;let l=document.createElement(`div`);l.className=`auth-gate-actions`;let u=document.createElement(`button`);u.className=`ui-button ui-button--primary auth-gate-button`,u.type=`submit`,u.textContent=t.submitLabel,l.append(u),o.append(s),a.append(r,i,o,c,l),e.append(a),a.addEventListener(`submit`,e=>{e.preventDefault();let t=s.value;s.disabled=!0,u.disabled=!0,c.textContent=``,n(t).catch(e=>{c.textContent=e instanceof Error?e.message:`Authentication failed`,s.disabled=!1,u.disabled=!1,s.select(),s.focus()})}),queueMicrotask(()=>{s.focus()})}async function k(){let e=g();if(!e.enabled||e.strategy===`none`)return{authenticated:!0,auth:e};await s(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);let{card:t,overlay:n}=w();document.body.append(n);let r=y(`auth_error`);return new Promise(i=>{let a=(t=null)=>{v(),S(t),n.remove(),i({authenticated:!0,auth:t?.auth??e,user:t?.user??null})};(async()=>{D(t,{body:`Checking access to this session…`,title:`CollabMD`});try{let t=await x(e);if(t.authenticated){a(t);return}}catch(e){D(t,{body:e instanceof Error?`${e.message} Refresh the page and try again.`:`Failed to contact the auth service. Refresh the page and try again.`,title:`Cannot verify access`});return}if(e.strategy===`password`){let n=_();if(n)try{v(),await C(e,n),a();return}catch{}O(t,e,{onSubmit:async t=>{await C(e,t),a()}});return}if(e.strategy===`oidc`){E(t,e,{errorMessage:r}),r=``;return}D(t,{body:`This authentication strategy is not available.`,title:`Authentication unavailable`})})()})}function A(e){return!e||e.repeat||!e.metaKey&&!e.ctrlKey||e.shiftKey||e.altKey?!1:String(e.key??``).toLowerCase()===`k`||e.code===`KeyK`}function j(e){let t=String(e??``).trim().replace(/\\/g,`/`);if(!t||t.startsWith(`/`))return``;let n=t.split(`/`).map(e=>e.trim()).filter(Boolean);return n.some(e=>e===`.`||e===`..`)?``:n.join(`/`)}function M(e,t){let n=j(e),r=j(t);return n?r?`${n}/${r}`:n:r}function N(e=``){return String(e??``).replace(/\/+$/u,``).split(`/`).filter(Boolean).pop()||``}function P(e=``){let t=String(e??``).replace(/\/+$/u,``),n=t.lastIndexOf(`/`);return n>=0?t.slice(0,n):``}function F(e,t){return e.toLowerCase().endsWith(t.toLowerCase())?e:`${e}${t}`}function I(e){return`# ${c(String(e??``).split(`/`).pop()||``)||`Untitled`}\n\n`}function L(e){let t=j(e),n=l(t)?t:`${t}.base`;return{content:[`views:`,` - type: table`,` name: Table`,` order:`,` - file.name`,``].join(`
|
|
3
3
|
`),path:n}}function R(e){let t=j(e),n=u(t)?t:`${t}.mmd`;return{content:[`flowchart TD`,` A[Start] --> B{Decide}`,` B -->|Yes| C[Ship it]`,` B -->|No| D[Revise]`,``].join(`
|
|
4
4
|
`),path:n}}function z(e){let t=j(e),n=p(t)?t:`${t}.drawio`;return{content:[`<mxfile host="app.diagrams.net" modified="2026-01-01T00:00:00.000Z" agent="CollabMD" version="24.7.17">`,` <diagram id="page-1" name="Page-1">`,` <mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">`,` <root>`,` <mxCell id="0" />`,` <mxCell id="1" parent="0" />`,` </root>`,` </mxGraphModel>`,` </diagram>`,`</mxfile>`,``].join(`
|
|
5
5
|
`),path:n}}function B(e){let t=j(e),n=f(t)?t:`${t}.puml`;return{content:[`@startuml`,`Alice -> Bob: Hello`,`@enduml`,``].join(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e=``,t=``){let n=String(e??``).replace(/\\/g,`/`).split(`/`).filter(Boolean),r=String(t??``).split(`/`).map(e=>{try{return decodeURIComponent(e)}catch{return e}});if(r.length===0)return``;n.pop();let i=[...n];for(let e of r){let t=String(e??``).trim();if(t&&t!==`.`){if(t===`..`){if(i.length===0)return``;i.pop();continue}i.push(t)}}return i.join(`/`)}export{e as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{o as e}from"./purify.es-go7v6Te-.js";var t=(t,n)=>e(t,`a`,-n),n=1e-10;function r(e,t){let r=a(e),c=r.filter(t=>i(t,e)),l=0,d=0,f=[];if(c.length>1){let t=u(c);for(let e=0;e<c.length;++e){let n=c[e];n.angle=Math.atan2(n.x-t.x,n.y-t.y)}c.sort((e,t)=>t.angle-e.angle);let n=c[c.length-1];for(let t=0;t<c.length;++t){let r=c[t];d+=(n.x+r.x)*(r.y-n.y);let i={x:(r.x+n.x)/2,y:(r.y+n.y)/2},a=null;for(let t=0;t<r.parentIndex.length;++t)if(n.parentIndex.includes(r.parentIndex[t])){let o=e[r.parentIndex[t]],c=Math.atan2(r.x-o.x,r.y-o.y),l=Math.atan2(n.x-o.x,n.y-o.y),u=l-c;u<0&&(u+=2*Math.PI);let d=l-u/2,f=s(i,{x:o.x+o.radius*Math.sin(d),y:o.y+o.radius*Math.cos(d)});f>o.radius*2&&(f=o.radius*2),(a==null||a.width>f)&&(a={circle:o,width:f,p1:r,p2:n,large:f>o.radius,sweep:!0})}a!=null&&(f.push(a),l+=o(a.circle.radius,a.width),n=r)}}else{let t=e[0];for(let n=1;n<e.length;++n)e[n].radius<t.radius&&(t=e[n]);let r=!1;for(let n=0;n<e.length;++n)if(s(e[n],t)>Math.abs(t.radius-e[n].radius)){r=!0;break}r?l=d=0:(l=t.radius*t.radius*Math.PI,f.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-n,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return d/=2,t&&(t.area=l+d,t.arcArea=l,t.polygonArea=d,t.arcs=f,t.innerPoints=c,t.intersectionPoints=r),l+d}function i(e,t){return t.every(t=>s(e,t)<t.radius+n)}function a(e){let t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){let i=l(e[n],e[r]);for(let e of i)e.parentIndex=[n,r],t.push(e)}return t}function o(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function s(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function c(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return o(e,r)+o(t,i)}function l(e,t){let n=s(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),c=e.x+a*(t.x-e.x)/n,l=e.y+a*(t.y-e.y)/n,u=-(t.y-e.y)*(o/n),d=-(t.x-e.x)*(o/n);return[{x:c+u,y:l-d},{x:c-u,y:l+d}]}function u(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function d(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n<i;++n){c/=2;let n=t+c,r=e(n);if(r*o>=0&&(t=n),Math.abs(c)<a||r===0)return n}return t+c}function f(e){let t=Array(e);for(let n=0;n<e;++n)t[n]=0;return t}function p(e,t){return f(e).map(()=>f(t))}function m(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function h(e){return Math.sqrt(m(e,e))}function g(e,t,n){for(let r=0;r<t.length;++r)e[r]=t[r]*n}function _(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function v(e,t,n){n||={};let r=n.maxIterations||t.length*200,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=n.rho===void 0?1:n.rho,l=n.chi===void 0?2:n.chi,u=n.psi===void 0?-.5:n.psi,d=n.sigma===void 0?.5:n.sigma,f,p=t.length,m=Array(p+1);m[0]=t,m[0].fx=e(t),m[0].id=0;for(let n=0;n<p;++n){let r=t.slice();r[n]=r[n]?r[n]*i:a,m[n+1]=r,m[n+1].fx=e(r),m[n+1].id=n+1}function h(e){for(let t=0;t<e.length;t++)m[p][t]=e[t];m[p].fx=e.fx}let g=(e,t)=>e.fx-t.fx,v=t.slice(),y=t.slice(),b=t.slice(),x=t.slice();for(let t=0;t<r;++t){if(m.sort(g),n.history){let e=m.map(e=>{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e<p;++e)f=Math.max(f,Math.abs(m[0][e]-m[1][e]));if(Math.abs(m[0].fx-m[p].fx)<o&&f<s)break;for(let e=0;e<p;++e){v[e]=0;for(let t=0;t<p;++t)v[e]+=m[t][e];v[e]/=p}let t=m[p];if(_(y,1+c,v,-c,t),y.fx=e(y),y.fx<m[0].fx)_(x,1+l,v,-l,t),x.fx=e(x),x.fx<y.fx?h(x):h(y);else if(y.fx>=m[p-1].fx){let n=!1;if(y.fx>t.fx?(_(b,1+u,v,-u,t),b.fx=e(b),b.fx<t.fx?h(b):n=!0):(_(b,1-u*c,v,u*c,t),b.fx=e(b),b.fx<y.fx?h(b):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)_(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(y)}return m.sort(g),{fx:m[0].fx,x:m[0]}}function y(e,t,n,r,i,a,o){let s=n.fx,c=m(n.fxprime,t),l=s,u=s,d=c,f=0;i||=1,a||=1e-6,o||=.1;function p(u,f,p){for(let h=0;h<16;++h)if(i=(u+f)/2,_(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=m(r.fxprime,t),l>s+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let h=0;h<10;++h){if(_(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=m(r.fxprime,t),l>s+a*i*c||h&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function b(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),g(o,r.fxprime,-1);for(let t=0;t<l;++t){if(c=y(e,o,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),!c)g(o,r.fxprime,-1);else{_(a,1,i.fxprime,-1,r.fxprime);let e=m(r.fxprime,r.fxprime),t=Math.max(0,m(a,i.fxprime)/e);_(o,t,o,-1,i.fxprime),s=r,r=i,i=s}if(h(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),r}function x(e,t={}){t.maxIterations=t.maxIterations||500;let n=t.initialLayout||D,r=t.lossFunction||A,i=w(e,t),a=n(i,t),o=Object.keys(a),s=[];for(let e of o)s.push(a[e].x),s.push(a[e].y);let c=v(e=>{let t={};for(let n=0;n<o.length;++n){let r=o[n];t[r]={x:e[2*n],y:e[2*n+1],radius:a[r].radius}}return r(t,i)},s,t).x;for(let e=0;e<o.length;++e){let t=o[e];a[t].x=c[2*e],a[t].y=c[2*e+1]}return a}var S=1e-10;function C(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+S?Math.abs(e-t):d(r=>c(e,t,r)-n,0,e+t)}function w(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;n<t.sets.length;n++){let r=String(t.sets[n]);e.set(r,t.size+(e.get(r)||0));for(let i=n+1;i<t.sets.length;i++){let n=String(t.sets[i]),a=`${r};${n}`,o=`${n};${r}`;e.set(a,t.size+(e.get(a)||0)),e.set(o,t.size+(e.get(o)||0))}}for(let t of r)t.sets.length<3&&(t.size=e.get(i(t.sets)))}let a=[],o=new Set;for(let e of r)if(e.sets.length===1)a.push(e.sets[0]);else if(e.sets.length===2){let t=e.sets[0],n=e.sets[1];o.add(i(e.sets)),o.add(i([n,t]))}a.sort((e,t)=>e===t?0:e<t?-1:1);for(let e=0;e<a.length;++e){let t=a[e];for(let n=e+1;n<a.length;++n){let e=a[n];o.has(i([t,e]))||r.push({sets:[t,e],size:0})}}return r}function T(e,t,n){let r=p(t.length,t.length),i=p(t.length,t.length);return e.filter(e=>e.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=C(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function E(e,t,n,r){for(let e=0;e<t.length;++e)t[e]=0;let i=0;for(let a=0;a<n.length;++a){let o=e[2*a],s=e[2*a+1];for(let c=a+1;c<n.length;++c){let l=e[2*c],u=e[2*c+1],d=n[a][c],f=r[a][c],p=(l-o)*(l-o)+(u-s)*(u-s),m=Math.sqrt(p),h=p-d*d;f>0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function D(e,t={}){let n=k(e,t),r=t.lossFunction||A;if(e.length>=8){let i=O(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function O(e,t={}){let n=t.restarts||10,r=[],i={};for(let t of e)t.sets.length===1&&(i[t.sets[0]]=r.length,r.push(t));let{distances:a,constraints:o}=T(e,r,i),s=h(a.map(h))/a.length;a=a.map(e=>e.map(e=>e/s));let c=(e,t)=>E(e,t,a,o),l=null;for(let e=0;e<n;++e){let e=b(c,f(a.length*2).map(Math.random),t);(!l||e.fx<l.fx)&&(l=e)}let u=l.x,d={};for(let e=0;e<r.length;++e){let t=r[e];d[t.sets[0]]={x:u[2*e]*s,y:u[2*e+1]*s,radius:Math.sqrt(t.size/Math.PI)}}if(t.history)for(let e of t.history)g(e.x,s);return d}function k(e,t){let n=t&&t.lossFunction?t.lossFunction:A,r={},i={};for(let t of e)if(t.sets.length===1){let e=t.sets[0];r[e]={x:1e10,y:1e10,rowid:r.length,size:t.size,radius:Math.sqrt(t.size/Math.PI)},i[e]=[]}e=e.filter(e=>e.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+S>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;n<i[e].length;++n)t+=i[e][n].size*i[e][n].weight;a.push({set:e,size:t})});function o(e,t){return t.size-e.size}a.sort(o);let s={};function c(e){return e.set in s}function u(e,t){r[t].x=e.x,r[t].y=e.y,s[t]=!0}u({x:0,y:0},a[0].set);for(let t=1;t<a.length;++t){let s=a[t].set,f=i[s].filter(c),p=r[s];if(f.sort(o),f.length===0)throw`ERROR: missing pairwise overlap information`;let m=[];for(var d=0;d<f.length;++d){let e=r[f[d].set],t=C(p.radius,e.radius,f[d].size);m.push({x:e.x+t,y:e.y}),m.push({x:e.x-t,y:e.y}),m.push({y:e.y+t,x:e.x}),m.push({y:e.y-t,x:e.x});for(let n=d+1;n<f.length;++n){let i=r[f[n].set],a=C(p.radius,i.radius,f[n].size),o=l({x:e.x,y:e.y,radius:t},{x:i.x,y:i.y,radius:a});m.push(...o)}}let h=1e50,g=m[0];for(let t of m){r[s].x=t.x,r[s].y=t.y;let i=n(r,e);i<h&&(h=i,g=t)}u(g,s)}return r}function A(e,t){let n=0;for(let i of t){if(i.sets.length===1)continue;let t;if(i.sets.length===2){let n=e[i.sets[0]],r=e[i.sets[1]];t=c(n.radius,r.radius,s(n,r))}else t=r(i.sets.map(t=>e[t]));let a=i.weight==null?1:i.weight;n+=a*(t-i.size)*(t-i.size)}return n}function j(e,t){let n=0;for(let i of t){if(i.sets.length===1)continue;let t;if(i.sets.length===2){let n=e[i.sets[0]],r=e[i.sets[1]];t=c(n.radius,r.radius,s(n,r))}else t=r(i.sets.map(t=>e[t]));let a=i.weight==null?1:i.weight,o=Math.log((t+1)/(i.size+1));n+=a*o*o}return n}function M(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&s(e[0],e[1])<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y),e.length>1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function N(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t<e.length;++t)for(let r=t+1;r<e.length;++r){let i=e[t].radius+e[r].radius;s(e[t],e[r])+1e-10<i&&n(e[r],e[t])}let r=new Map;for(let n=0;n<e.length;++n){let i=t(e[n]).parent.setid;r.has(i)||r.set(i,[]),r.get(i).push(e[n])}return e.forEach(e=>{delete e.parent}),Array.from(r.values())}function P(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function F(e,t,n){t??=Math.PI/2;let r=R(e).map(e=>Object.assign({},e)),i=N(r);for(let e of i){M(e,t,n);let r=P(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c<i.length;)s(i[c],!0,!1),s(i[c+1],!1,!0),s(i[c+2],!0,!0),c+=3,a=P(r);return L(r)}function I(e,t,n,r,i){let a=R(e);t-=2*r,n-=2*r;let{xRange:o,yRange:s}=P(a);if(o.max===o.min||s.max===s.min)return console.log(`not scaling solution: zero size detected`),e;let c,l;if(i){let e=Math.sqrt(i/Math.PI)*2;c=t/e,l=n/e}else c=t/(o.max-o.min),l=n/(s.max-s.min);let u=Math.min(l,c),d=(t-(o.max-o.min)*u)/2,f=(n-(s.max-s.min)*u)/2;return L(a.map(e=>({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function L(e){let t={};for(let n of e)t[n.setid]=n;return t}function R(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function z(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=x,S=A;function C(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let x={},C={};if(_.length>0){let e=b(_,{lossFunction:S,distinct:p});s&&(e=F(e,o,f)),x=I(e,n,r,i,c),C=W(x,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([x]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=K(t))});function k(e){return t=>Y(e.sets.map(e=>{let i=D[e],a=x[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let L=g;O&&typeof L.transition==`function`?(L=P(g),L.selectAll(`path`).attrTween(`d`,k)):L.selectAll(`path`).attr(`d`,e=>Y(e.sets.map(e=>x[e])),m);let R=L.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in R?R.on(`end`,B(x,T)):R.each(`end`,B(x,T)):R.each(B(x,T)));let z=P(A.exit()).remove();typeof A.transition==`function`&&z.selectAll(`path`).attrTween(`d`,k);let V=z.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),R.style(`font-size`,d),V.style(`font-size`,`0px`)),{circles:x,textCentres:C,nodes:A,enter:j,update:L,exit:z}}return C.wrap=function(e){return arguments.length?(l=e,C):l},C.useViewBox=function(){return t=!0,C},C.width=function(e){return arguments.length?(n=e,C):n},C.height=function(e){return arguments.length?(r=e,C):r},C.padding=function(e){return arguments.length?(i=e,C):i},C.distinct=function(e){return arguments.length?(p=e,C):p},C.colours=function(e){return arguments.length?(y=e,C):y},C.colors=function(e){return arguments.length?(y=e,C):y},C.fontSize=function(e){return arguments.length?(d=e,C):d},C.round=function(e){return arguments.length?(m=e,C):m},C.duration=function(e){return arguments.length?(a=e,C):a},C.layoutFunction=function(e){return arguments.length?(b=e,C):b},C.normalize=function(e){return arguments.length?(s=e,C):s},C.scaleToFit=function(e){return arguments.length?(c=e,C):c},C.styled=function(e){return arguments.length?(u=e,C):u},C.orientation=function(e){return arguments.length?(o=e,C):o},C.orientationOrder=function(e){return arguments.length?(f=e,C):f},C.lossFunction=function(e){return arguments.length?(S=e==="default"?A:e===`logRatio`?j:e,C):S},C}function B(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function V(e,t,n){let r=t[0].radius-s(t[0],e);for(let n=1;n<t.length;++n){let i=t[n].radius-s(t[n],e);i<=r&&(r=i)}for(let t=0;t<n.length;++t){let i=s(n[t],e)-n[t].radius;i<=r&&(r=i)}return r}function H(e,t,n){let i=[];for(let t of e)i.push({x:t.x,y:t.y}),i.push({x:t.x+t.radius/2,y:t.y}),i.push({x:t.x-t.radius/2,y:t.y}),i.push({x:t.x,y:t.y+t.radius/2}),i.push({x:t.x,y:t.y-t.radius/2});let a=i[0],o=V(i[0],e,t);for(let n=1;n<i.length;++n){let r=V(i[n],e,t);r>=o&&(a=i[n],o=r)}let c=v(n=>-1*V({x:n[0],y:n[1]},e,t),[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:n?0:c[0],y:c[1]},d=!0;for(let t of e)if(s(l,t)>t.radius){d=!1;break}for(let e of t)if(s(l,e)<e.radius){d=!1;break}if(d)return l;if(e.length==1)return{x:e[0].x,y:e[0].y};let f={};return r(e,f),f.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:f.arcs.length==1?{x:f.arcs[0].circle.x,y:f.arcs[0].circle.y}:t.length?H(e,[]):u(f.arcs.map(e=>e.p1))}function U(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r<n.length;r++){let i=n[r],a=e[i];for(let o=r+1;o<n.length;++o){let r=n[o],c=e[r],l=s(a,c);l+c.radius<=a.radius+1e-10?t[r].push(i):l+a.radius<=c.radius+1e-10&&t[i].push(r)}}return t}function W(e,t,n){let r={},i=U(e);for(let a=0;a<t.length;++a){let o=t[a].sets,s={},c={};for(let e=0;e<o.length;++e){s[o[e]]=!0;let t=i[o[e]];for(let e=0;e<t.length;++e)c[t[e]]=!0}let l=[],u=[];for(let t in e)t in s?l.push(e[t]):t in c||u.push(e[t]);let d=H(l,u,n);r[o]=d,d.disjoint&&t[a].size>0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function G(e,t,n){let r=[];return r.push(`
|
|
2
|
+
M`,e,t),r.push(`
|
|
3
|
+
m`,-n,0),r.push(`
|
|
4
|
+
a`,n,n,0,1,0,n*2,0),r.push(`
|
|
5
|
+
a`,n,n,0,1,0,-n*2,0),r.join(` `)}function K(e){let t=e.split(` `);return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function q(e){if(e.length===0)return[];let t={};return r(e,t),t.arcs}function J(e,t){if(e.length===0)return`M 0 0`;let n=10**(t||0),r=t==null?e=>e:e=>Math.round(e*n)/n;if(e.length==1){let t=e[0].circle;return G(r(t.x),r(t.y),r(t.radius))}let i=[`
|
|
6
|
+
M`,r(e[0].p2.x),r(e[0].p2.y)];for(let t of e){let e=r(t.circle.radius);i.push(`
|
|
7
|
+
A`,e,e,0,+!!t.large,+!!t.sweep,r(t.p1.x),r(t.p1.y))}return i.join(` `)}function Y(e,t){return J(q(e),t)}function X(e,t={}){let{lossFunction:n,layoutFunction:r=x,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:o,width:s=600,height:c=350,padding:l=15,scaleToFit:u=!1,symmetricalTextCentre:d=!1,distinct:f,round:p=2}=t,m=r(e,{lossFunction:n==="default"||!n?A:n===`logRatio`?j:n,distinct:f});i&&(m=F(m,a,o));let h=I(m,s,c,l,u),g=W(h,e,d),_=new Map(Object.keys(h).map(e=>[e,{set:e,x:h[e].x,y:h[e].y,radius:h[e].radius}])),v=e.map(e=>{let t=e.sets.map(e=>_.get(e)),n=q(t);return{circles:t,arcs:n,path:J(n,p),area:e,has:new Set(e.sets)}});function y(e){let t=``;for(let n of v)n.has.size>e.length&&e.every(e=>n.has.has(e))&&(t+=` `+n.path);return t}return v.map(({circles:e,arcs:t,path:n,area:r})=>({data:r,text:g[r.sets],circles:e,arcs:t,path:n,distinctPath:n+y(r.sets)}))}export{X as n,t as r,z as t};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-XiVvaevx.js";import"./chunk-X3CZISLH-BixgQztF.js";import{a as n,i as r,s as i}from"./purify.es-go7v6Te-.js";import{n as a,r as o,t as s}from"./venn.esm-C5rDfA9t.js";import{H as c,K as l,U as u,a as d,b as f,c as p,f as m,v as h,w as g,y as _}from"./chunk-DU6HZSFF-CWlP1Dk_.js";import{t as v}from"./chunk-CLGD4ZFX-BfYJtJm1.js";import{i as y}from"./chunk-75Z2AOVW-DitkSoSG.js";import{t as b}from"./rough.esm-Dy-Kn_BL.js";var x=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],a=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],c=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],h=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:`error`,5:`VENN`,7:`EOF`,8:`NEWLINE`,11:`TITLE`,12:`SET`,14:`BRACKET_LABEL`,15:`COLON`,16:`NUMERIC`,17:`UNION`,19:`TEXT`,20:`IDENTIFIER`,21:`STRING`,22:`INDENT_TEXT`,24:`STYLE`,27:`COMMA`,31:`HEXCOLOR`,32:`RGBCOLOR`,33:`RGBACOLOR`},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[s];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSubsetData([a[s]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[s-1]],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[s].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s]),r.addSubsetData(a[s],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-1]),r.addSubsetData(a[s-1],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-2]),r.addSubsetData(a[s-2],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-3]),r.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:r.addTextData(a[s-2],a[s-1],a[s]);break;case 23:r.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s],void 0);break;case 27:case 28:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s-1],a[s]);break;case 29:case 41:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(` `);break;case 34:this.$=[a[s]];break;case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 43:case 44:this.$=a[s]}},`anonymous`),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(r,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(r,[2,5]),t(r,[2,6]),t(r,[2,7]),t(r,[2,8]),{13:16,20:i,21:a},{13:20,18:19,20:i,21:a},{13:20,18:21,20:i,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:a},t(r,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(r,[2,13],{14:[1,29],15:[1,30],27:s}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},t(r,[2,22]),t(r,[2,24],{14:[1,35]}),t(r,[2,25],{14:[1,36]}),t(r,[2,26]),{20:c,25:37,26:38,27:s},t(r,[2,10],{15:[1,40]}),{16:[1,41]},t(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:a},t(r,[2,17],{14:[1,45]}),t(r,[2,18],{14:[1,46]}),t(r,[2,19]),t(r,[2,27]),t(r,[2,28]),t(r,[2,23],{27:[1,47]}),t(l,[2,29]),{15:[1,48]},{16:[1,49]},t(r,[2,11]),{16:[1,50]},t(r,[2,15]),t(o,[2,42]),t(r,[2,20]),t(r,[2,21]),{20:c,26:51},{16:u,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},t(r,[2,12]),t(r,[2,16]),t(l,[2,30]),t(l,[2,31]),t(l,[2,32]),t(l,[2,33],{30:61,16:u,20:d,31:f,32:p,33:m}),t(h,[2,34]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),t(h,[2,39]),t(h,[2,40]),t(h,[2,35])],defaultActions:{6:[2,1]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin(`INITIAL`),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin(`INITIAL`),this.unput(t.yytext);break;case 6:return this.begin(`bol`),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(e.consumeIndentText)e.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}})();function _(){this.yy={}}return e(_,`Parser`),_.prototype=g,g.Parser=_,new _})();x.parser=x;var S=x,C=[],w=[],T=[],E=new Set,D,O=!1,k=e((e,t,n)=>{let r=I(e).sort(),i=n??10/e.length**2;D=r,r.length===1&&E.add(r[0]),C.push({sets:r,size:i,label:t?j(t):void 0})},`addSubsetData`),A=e(()=>C,`getSubsetData`),j=e(e=>{let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t},`normalizeText`),M=e(e=>e&&j(e),`normalizeStyleValue`),N=e((e,t,n)=>{let r=j(t);w.push({sets:I(e).sort(),id:r,label:n?j(n):void 0})},`addTextData`),P=e((e,t)=>{let n=I(e).sort(),r={};for(let[e,n]of t)r[e]=M(n)??n;T.push({targets:n,styles:r})},`addStyleData`),F=e(()=>T,`getStyleData`),I=e(e=>e.map(e=>j(e)),`normalizeIdentifierList`),L=e(e=>{let t=I(e).filter(e=>!E.has(e));if(t.length>0)throw Error(`unknown set identifier: ${t.join(`, `)}`)},`validateUnionIdentifiers`),R=e(()=>w,`getTextData`),z=e(()=>D,`getCurrentSets`),B=e(()=>O,`getIndentMode`),V=e(e=>{O=e},`setIndentMode`),H=m.venn;function U(){return y(H,f().venn)}e(U,`getConfig`);var W={getConfig:U,clear:e(()=>{d(),C.length=0,w.length=0,T.length=0,E.clear(),D=void 0,O=!1},`customClear`),setAccTitle:u,getAccTitle:_,setDiagramTitle:l,getDiagramTitle:g,getAccDescription:h,setAccDescription:c,addSubsetData:k,getSubsetData:A,addTextData:N,addStyleData:P,validateUnionIdentifiers:L,getTextData:R,getStyleData:F,getCurrentSets:z,getIndentMode:B,setIndentMode:V},G=e(e=>`
|
|
7
|
+
.venn-title {
|
|
8
|
+
font-size: 32px;
|
|
9
|
+
fill: ${e.vennTitleTextColor};
|
|
10
|
+
font-family: ${e.fontFamily};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.venn-circle text {
|
|
14
|
+
font-size: 48px;
|
|
15
|
+
font-family: ${e.fontFamily};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.venn-intersection text {
|
|
19
|
+
font-size: 48px;
|
|
20
|
+
fill: ${e.vennSetTextColor};
|
|
21
|
+
font-family: ${e.fontFamily};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.venn-text-node {
|
|
25
|
+
font-family: ${e.fontFamily};
|
|
26
|
+
color: ${e.vennSetTextColor};
|
|
27
|
+
}
|
|
28
|
+
`,`getStyles`);function K(e){let t=new Map;for(let n of e){let e=n.targets.join(`|`),r=t.get(e);r?Object.assign(r,n.styles):t.set(e,{...n.styles})}return t}e(K,`buildStyleByKey`);var q=e((e,c,l,u)=>{let d=u.db,m=d.getConfig?.(),{themeVariables:h,look:g,handDrawnSeed:_}=f(),y=g===`handDrawn`,x=[h.venn1,h.venn2,h.venn3,h.venn4,h.venn5,h.venn6,h.venn7,h.venn8].filter(Boolean),S=d.getDiagramTitle?.(),C=d.getSubsetData(),w=d.getTextData(),T=K(d.getStyleData()),E=X(C),D=m?.width??800,O=m?.height??450,k=D/1600,A=S?48*k:0,j=h.primaryTextColor??h.textColor,M=v(c);M.attr(`viewBox`,`0 0 ${D} ${O}`),S&&M.append(`text`).text(S).attr(`class`,`venn-title`).attr(`font-size`,`${32*k}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*k).style(`fill`,h.vennTitleTextColor||h.titleColor);let N=t(document.createElement(`div`)),P=s().width(D).height(O-A);N.datum(E).call(P);let F=y?b.svg(N.select(`svg`).node()):void 0,I=a(E,{width:D,height:O-A,padding:m?.padding??15}),L=new Map;for(let e of I){let t=J([...e.data.sets].sort());L.set(t,e)}w.length>0&&Y(m,L,N,w,k,T);let R=i(h.background||`#f4f4f4`);N.selectAll(`.venn-circle`).each(function(e,i){let a=t(this),s=J([...e.sets].sort()),c=T.get(s),l=c?.fill||x[i%x.length]||h.primaryColor;a.classed(`venn-set-${i%8}`,!0);let u=c?.[`fill-opacity`]??.1,d=c?.stroke||l,f=c?.[`stroke-width`]||`${5*k}`;if(y&&F){let e=L.get(s);if(e&&e.circles.length>0){let t=e.circles[0],n=F.circle(t.x,t.y,t.radius*2,{roughness:.7,seed:_,fill:o(l,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+i*60,stroke:d,strokeWidth:parseFloat(String(f))});a.select(`path`).remove(),a.node()?.insertBefore(n,a.select(`text`).node())}}else a.select(`path`).style(`fill`,l).style(`fill-opacity`,u).style(`stroke`,d).style(`stroke-width`,f).style(`stroke-opacity`,.95);let p=c?.color||(R?n(l,30):r(l,30));a.select(`text`).style(`font-size`,`${48*k}px`).style(`fill`,p)}),y&&F?N.selectAll(`.venn-intersection`).each(function(e){let n=t(this),r=J([...e.sets].sort()),i=T.get(r),a=i?.fill;if(a){let e=n.select(`path`),t=e.attr(`d`);if(t){let n=F.path(t,{roughness:.7,seed:_,fill:o(a,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r?.parentNode?.insertBefore(n,r),e.remove()}}else n.select(`path`).style(`fill-opacity`,0);n.select(`text`).style(`font-size`,`${48*k}px`).style(`fill`,i?.color??h.vennSetTextColor??j)}):(N.selectAll(`.venn-intersection text`).style(`font-size`,`${48*k}px`).style(`fill`,e=>{let t=J([...e.sets].sort());return T.get(t)?.color??h.vennSetTextColor??j}),N.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{let t=J([...e.sets].sort());return+!!T.get(t)?.fill}).style(`fill`,e=>{let t=J([...e.sets].sort());return T.get(t)?.fill??`transparent`}));let z=M.append(`g`).attr(`transform`,`translate(0, ${A})`),B=N.select(`svg`).node();if(B&&`childNodes`in B)for(let e of[...B.childNodes])z.node()?.appendChild(e);p(M,O,D,m?.useMaxWidth??!0)},`draw`);function J(e){return e.join(`|`)}e(J,`stableSetsKey`);function Y(e,t,n,r,i,a){let o=e?.useDebugLayout??!1,s=n.select(`svg`).append(`g`).attr(`class`,`venn-text-nodes`),c=new Map;for(let e of r){let t=J(e.sets),n=c.get(t);n?n.push(e):c.set(t,[e])}for(let[e,n]of c.entries()){let r=t.get(e);if(!r?.text)continue;let c=r.text.x,l=r.text.y,u=Math.min(...r.circles.map(e=>e.radius)),d=Math.min(...r.circles.map(e=>e.radius-Math.hypot(c-e.x,l-e.y))),f=Number.isFinite(d)?Math.max(0,d):0;f===0&&Number.isFinite(u)&&(f=u*.6);let p=s.append(`g`).attr(`class`,`venn-text-area`).attr(`font-size`,`${40*i}px`);o&&p.append(`circle`).attr(`class`,`venn-text-debug-circle`).attr(`cx`,c).attr(`cy`,l).attr(`r`,f).attr(`fill`,`none`).attr(`stroke`,`purple`).attr(`stroke-width`,1.5*i).attr(`stroke-dasharray`,`${6*i} ${4*i}`);let m=Math.max(80*i,f*2*.95),h=Math.max(60*i,f*2*.95),g=(r.data.label&&r.data.label.length>0?Math.min(32*i,f*.25):0)+(n.length<=2?30*i:0),_=c-m/2,v=l-h/2+g,y=Math.max(1,Math.ceil(Math.sqrt(n.length))),b=Math.max(1,Math.ceil(n.length/y)),x=m/y,S=h/b;for(let[e,t]of n.entries()){let n=e%y,r=Math.floor(e/y),s=_+x*(n+.5),c=v+S*(r+.5);o&&p.append(`rect`).attr(`class`,`venn-text-debug-cell`).attr(`x`,_+x*n).attr(`y`,v+S*r).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`stroke`,`teal`).attr(`stroke-width`,1*i).attr(`stroke-dasharray`,`${4*i} ${3*i}`);let l=x*.9,u=S*.9,d=p.append(`foreignObject`).attr(`class`,`venn-text-node-fo`).attr(`width`,l).attr(`height`,u).attr(`x`,s-l/2).attr(`y`,c-u/2).attr(`overflow`,`visible`),f=a.get(t.id)?.color,m=d.append(`xhtml:span`).attr(`class`,`venn-text-node`).style(`display`,`flex`).style(`width`,`100%`).style(`height`,`100%`).style(`white-space`,`normal`).style(`align-items`,`center`).style(`justify-content`,`center`).style(`text-align`,`center`).style(`overflow-wrap`,`normal`).style(`word-break`,`normal`).text(t.label??t.id);f&&m.style(`color`,f)}}}e(Y,`renderTextNodes`);function X(e){let t=new Set(e.map(e=>[...e.sets].sort().join(`|`))),n=new Map(e.filter(e=>e.sets.length===1&&e.size!==void 0).map(e=>[e.sets[0],e.size])),r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i<e.length-1;i++)for(let a=i+1;a<e.length;a++){let o=[e[i],e[a]],s=o.join(`|`);if(!t.has(s)){t.add(s);let e=n.get(o[0]),i=n.get(o[1]),a=e!==void 0&&i!==void 0?Math.min(e,i)/4:2.5;r.push({sets:o,size:a,label:``})}}}return r.length>0?[...e,...r]:e}e(X,`ensurePairwiseSubsets`);var Z={parser:S,db:W,renderer:{draw:q},styles:G};export{Z as diagram};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{p as e}from"./src-XiVvaevx.js";import{a as t,i as n,s as r}from"./purify.es-go7v6Te-.js";import{n as i,r as a,t as o}from"./venn.esm-C5rDfA9t.js";import{t as s}from"./rough.esm-Dy-Kn_BL.js";import{n as c}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import"./chunk-X3CZISLH-DwWpRaN8.js";import{H as l,U as u,a as d,b as f,c as p,f as m,q as h,v as g,w as _,y as v}from"./chunk-O7XYJQB3-D0_ZY2za.js";import{t as y}from"./chunk-6AEJRKK7-DTVZj5bY.js";import{i as b}from"./chunk-ZIGJFQKS-b8OUHKK5.js";var x=(function(){var e=c(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[5,8],n=[7,8,11,12,17,19,22,24],r=[1,17],i=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],s=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],h=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:c(function(){},`trace`),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:`error`,5:`VENN`,7:`EOF`,8:`NEWLINE`,11:`TITLE`,12:`SET`,14:`BRACKET_LABEL`,15:`COLON`,16:`NUMERIC`,17:`UNION`,19:`TEXT`,20:`IDENTIFIER`,21:`STRING`,22:`INDENT_TEXT`,24:`STYLE`,27:`COMMA`,31:`HEXCOLOR`,32:`RGBCOLOR`,33:`RGBACOLOR`},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:c(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[s];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSubsetData([a[s]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[s-1]],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[s].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s]),r.addSubsetData(a[s],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-1]),r.addSubsetData(a[s-1],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-2]),r.addSubsetData(a[s-2],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-3]),r.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:r.addTextData(a[s-2],a[s-1],a[s]);break;case 23:r.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s],void 0);break;case 27:case 28:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s-1],a[s]);break;case 29:case 41:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(` `);break;case 34:this.$=[a[s]];break;case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 43:case 44:this.$=a[s]}},`anonymous`),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(n,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),e(n,[2,8]),{13:16,20:r,21:i},{13:20,18:19,20:r,21:i},{13:20,18:21,20:r,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:r,21:i},e(n,[2,9],{14:[1,27],15:[1,28]}),e(a,[2,43]),e(a,[2,44]),e(n,[2,13],{14:[1,29],15:[1,30],27:o}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},e(n,[2,22]),e(n,[2,24],{14:[1,35]}),e(n,[2,25],{14:[1,36]}),e(n,[2,26]),{20:s,25:37,26:38,27:o},e(n,[2,10],{15:[1,40]}),{16:[1,41]},e(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:r,21:i},e(n,[2,17],{14:[1,45]}),e(n,[2,18],{14:[1,46]}),e(n,[2,19]),e(n,[2,27]),e(n,[2,28]),e(n,[2,23],{27:[1,47]}),e(l,[2,29]),{15:[1,48]},{16:[1,49]},e(n,[2,11]),{16:[1,50]},e(n,[2,15]),e(a,[2,42]),e(n,[2,20]),e(n,[2,21]),{20:s,26:51},{16:u,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},e(n,[2,12]),e(n,[2,16]),e(l,[2,30]),e(l,[2,31]),e(l,[2,32]),e(l,[2,33],{30:61,16:u,20:d,31:f,32:p,33:m}),e(h,[2,34]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),e(h,[2,39]),e(h,[2,40]),e(h,[2,35])],defaultActions:{6:[2,1]},parseError:c(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:c(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}c(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}c(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:c(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:c(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:c(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:c(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:c(function(){return this._more=!0,this},`more`),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:c(function(e){this.unput(this.match.slice(e))},`less`),pastInput:c(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:c(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:c(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:c(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:c(function(){return this.next()||this.lex()},`lex`),begin:c(function(e){this.conditionStack.push(e)},`begin`),popState:c(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:c(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:c(function(e){this.begin(e)},`pushState`),stateStackSize:c(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:c(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin(`INITIAL`),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin(`INITIAL`),this.unput(t.yytext);break;case 6:return this.begin(`bol`),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(e.consumeIndentText)e.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}})();function _(){this.yy={}}return c(_,`Parser`),_.prototype=g,g.Parser=_,new _})();x.parser=x;var S=x,C=[],w=[],T=[],E=new Set,D,O=!1,k=c((e,t,n)=>{let r=I(e).sort(),i=n??10/e.length**2;D=r,r.length===1&&E.add(r[0]),C.push({sets:r,size:i,label:t?j(t):void 0})},`addSubsetData`),A=c(()=>C,`getSubsetData`),j=c(e=>{let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t},`normalizeText`),M=c(e=>e&&j(e),`normalizeStyleValue`),N=c((e,t,n)=>{let r=j(t);w.push({sets:I(e).sort(),id:r,label:n?j(n):void 0})},`addTextData`),P=c((e,t)=>{let n=I(e).sort(),r={};for(let[e,n]of t)r[e]=M(n)??n;T.push({targets:n,styles:r})},`addStyleData`),F=c(()=>T,`getStyleData`),I=c(e=>e.map(e=>j(e)),`normalizeIdentifierList`),L=c(e=>{let t=I(e).filter(e=>!E.has(e));if(t.length>0)throw Error(`unknown set identifier: ${t.join(`, `)}`)},`validateUnionIdentifiers`),R=c(()=>w,`getTextData`),z=c(()=>D,`getCurrentSets`),B=c(()=>O,`getIndentMode`),V=c(e=>{O=e},`setIndentMode`),H=m.venn;function U(){return b(H,f().venn)}c(U,`getConfig`);var W={getConfig:U,clear:c(()=>{d(),C.length=0,w.length=0,T.length=0,E.clear(),D=void 0,O=!1},`customClear`),setAccTitle:u,getAccTitle:v,setDiagramTitle:h,getDiagramTitle:_,getAccDescription:g,setAccDescription:l,addSubsetData:k,getSubsetData:A,addTextData:N,addStyleData:P,validateUnionIdentifiers:L,getTextData:R,getStyleData:F,getCurrentSets:z,getIndentMode:B,setIndentMode:V},G=c(e=>`
|
|
7
|
+
.venn-title {
|
|
8
|
+
font-size: 32px;
|
|
9
|
+
fill: ${e.vennTitleTextColor};
|
|
10
|
+
font-family: ${e.fontFamily};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.venn-circle text {
|
|
14
|
+
font-size: 48px;
|
|
15
|
+
font-family: ${e.fontFamily};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.venn-intersection text {
|
|
19
|
+
font-size: 48px;
|
|
20
|
+
fill: ${e.vennSetTextColor};
|
|
21
|
+
font-family: ${e.fontFamily};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.venn-text-node {
|
|
25
|
+
font-family: ${e.fontFamily};
|
|
26
|
+
color: ${e.vennSetTextColor};
|
|
27
|
+
}
|
|
28
|
+
`,`getStyles`);function K(e){let t=new Map;for(let n of e){let e=n.targets.join(`|`),r=t.get(e);r?Object.assign(r,n.styles):t.set(e,{...n.styles})}return t}c(K,`buildStyleByKey`);var q=c((c,l,u,d)=>{let m=d.db,h=m.getConfig?.(),{themeVariables:g,look:_,handDrawnSeed:v}=f(),b=_===`handDrawn`,x=[g.venn1,g.venn2,g.venn3,g.venn4,g.venn5,g.venn6,g.venn7,g.venn8].filter(Boolean),S=m.getDiagramTitle?.(),C=m.getSubsetData(),w=m.getTextData(),T=K(m.getStyleData()),E=X(C),D=h?.width??800,O=h?.height??450,k=D/1600,A=S?48*k:0,j=g.primaryTextColor??g.textColor,M=y(l);M.attr(`viewBox`,`0 0 ${D} ${O}`),S&&M.append(`text`).text(S).attr(`class`,`venn-title`).attr(`font-size`,`${32*k}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*k).style(`fill`,g.vennTitleTextColor||g.titleColor);let N=e(document.createElement(`div`)),P=o().width(D).height(O-A);N.datum(E).call(P);let F=b?s.svg(N.select(`svg`).node()):void 0,I=i(E,{width:D,height:O-A,padding:h?.padding??15}),L=new Map;for(let e of I){let t=J([...e.data.sets].sort());L.set(t,e)}w.length>0&&Y(h,L,N,w,k,T);let R=r(g.background||`#f4f4f4`);N.selectAll(`.venn-circle`).each(function(r,i){let o=e(this),s=J([...r.sets].sort()),c=T.get(s),l=x.length>0?x[i%x.length]:void 0,u=c?.fill||l||g.primaryColor;o.classed(`venn-set-${i%8}`,!0);let d=c?.[`fill-opacity`]??.1,f=c?.stroke||u,p=c?.[`stroke-width`]||`${5*k}`;if(b&&F){let e=L.get(s);if(e&&e.circles.length>0){let t=e.circles[0],n=F.circle(t.x,t.y,t.radius*2,{roughness:.7,seed:v,fill:a(u,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+i*60,stroke:f,strokeWidth:parseFloat(String(p))});o.select(`path`).remove(),o.node()?.insertBefore(n,o.select(`text`).node())}}else o.select(`path`).style(`fill`,u).style(`fill-opacity`,d).style(`stroke`,f).style(`stroke-width`,p).style(`stroke-opacity`,.95);let m=c?.color||(R?t(u,30):n(u,30));o.select(`text`).style(`font-size`,`${48*k}px`).style(`fill`,m)}),b&&F?N.selectAll(`.venn-intersection`).each(function(t){let n=e(this),r=J([...t.sets].sort()),i=T.get(r),o=i?.fill;if(o){let e=n.select(`path`),t=e.attr(`d`);if(t){let n=F.path(t,{roughness:.7,seed:v,fill:a(o,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r?.parentNode?.insertBefore(n,r),e.remove()}}else n.select(`path`).style(`fill-opacity`,0);n.select(`text`).style(`font-size`,`${48*k}px`).style(`fill`,i?.color??g.vennSetTextColor??j)}):(N.selectAll(`.venn-intersection text`).style(`font-size`,`${48*k}px`).style(`fill`,e=>{let t=J([...e.sets].sort());return T.get(t)?.color??g.vennSetTextColor??j}),N.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{let t=J([...e.sets].sort());return+!!T.get(t)?.fill}).style(`fill`,e=>{let t=J([...e.sets].sort());return T.get(t)?.fill??`transparent`}));let z=M.append(`g`).attr(`transform`,`translate(0, ${A})`),B=N.select(`svg`).node();if(B&&`childNodes`in B)for(let e of[...B.childNodes])z.node()?.appendChild(e);p(M,O,D,h?.useMaxWidth??!0)},`draw`);function J(e){return e.join(`|`)}c(J,`stableSetsKey`);function Y(e,t,n,r,i,a){let o=e?.useDebugLayout??!1,s=n.select(`svg`).append(`g`).attr(`class`,`venn-text-nodes`),c=new Map;for(let e of r){let t=J(e.sets),n=c.get(t);n?n.push(e):c.set(t,[e])}for(let[e,n]of c.entries()){let r=t.get(e);if(!r?.text)continue;let c=r.text.x,l=r.text.y,u=Math.min(...r.circles.map(e=>e.radius)),d=Math.min(...r.circles.map(e=>e.radius-Math.hypot(c-e.x,l-e.y))),f=Number.isFinite(d)?Math.max(0,d):0;f===0&&Number.isFinite(u)&&(f=u*.6);let p=s.append(`g`).attr(`class`,`venn-text-area`).attr(`font-size`,`${40*i}px`);o&&p.append(`circle`).attr(`class`,`venn-text-debug-circle`).attr(`cx`,c).attr(`cy`,l).attr(`r`,f).attr(`fill`,`none`).attr(`stroke`,`purple`).attr(`stroke-width`,1.5*i).attr(`stroke-dasharray`,`${6*i} ${4*i}`);let m=Math.max(80*i,f*2*.95),h=Math.max(60*i,f*2*.95),g=(r.data.label&&r.data.label.length>0?Math.min(32*i,f*.25):0)+(n.length<=2?30*i:0),_=c-m/2,v=l-h/2+g,y=Math.max(1,Math.ceil(Math.sqrt(n.length))),b=Math.max(1,Math.ceil(n.length/y)),x=m/y,S=h/b;for(let[e,t]of n.entries()){let n=e%y,r=Math.floor(e/y),s=_+x*(n+.5),c=v+S*(r+.5);o&&p.append(`rect`).attr(`class`,`venn-text-debug-cell`).attr(`x`,_+x*n).attr(`y`,v+S*r).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`stroke`,`teal`).attr(`stroke-width`,1*i).attr(`stroke-dasharray`,`${4*i} ${3*i}`);let l=x*.9,u=S*.9,d=p.append(`foreignObject`).attr(`class`,`venn-text-node-fo`).attr(`width`,l).attr(`height`,u).attr(`x`,s-l/2).attr(`y`,c-u/2).attr(`overflow`,`visible`),f=a.get(t.id)?.color,m=d.append(`xhtml:span`).attr(`class`,`venn-text-node`).style(`display`,`flex`).style(`width`,`100%`).style(`height`,`100%`).style(`white-space`,`normal`).style(`align-items`,`center`).style(`justify-content`,`center`).style(`text-align`,`center`).style(`overflow-wrap`,`normal`).style(`word-break`,`normal`).text(t.label??t.id);f&&m.style(`color`,f)}}}c(Y,`renderTextNodes`);function X(e){let t=new Set(e.map(e=>[...e.sets].sort().join(`|`))),n=new Map(e.filter(e=>e.sets.length===1&&e.size!==void 0).map(e=>[e.sets[0],e.size])),r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i<e.length-1;i++)for(let a=i+1;a<e.length;a++){let o=[e[i],e[a]],s=o.join(`|`);if(!t.has(s)){t.add(s);let e=n.get(o[0]),i=n.get(o[1]),a=e!==void 0&&i!==void 0?Math.min(e,i)/4:2.5;r.push({sets:o,size:a,label:``})}}}return r.length>0?[...e,...r]:e}c(X,`ensurePairwiseSubsets`);var Z={parser:S,db:W,renderer:{draw:q},styles:G};export{Z as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){var t=e.statementIndentUnit,n=e.dontAlignCalls,r=e.noIndentKeywords||[],i=e.multiLineStrings,a=e.hooks||{};function o(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var s=o(`accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor`),c=/[\+\-\*\/!~&|^%=?:]/,l=/[\[\]{}()]/,u=/\d[0-9_]*/,d=/\d*\s*'s?d\s*\d[0-9_]*/i,f=/\d*\s*'s?b\s*[xz01][xz01_]*/i,p=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,m=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,h=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,g=/^((\w+)|[)}\]])/,_=/[)}\]]/,v,y,b=o(`case checker class clocking config function generate interface module package primitive program property specify sequence table task`),x={};for(var S in b)x[S]=`end`+S;for(var C in x.begin=`end`,x.casex=`endcase`,x.casez=`endcase`,x.do=`while`,x.fork=`join;join_any;join_none`,x.covergroup=`endgroup`,r){var S=r[C];x[S]&&(x[S]=void 0)}var w=o(`always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while`);function T(e,t){var n=e.peek(),r;if(a[n]&&(r=a[n](e,t))!=0||a.tokenBase&&(r=a.tokenBase(e,t))!=0)return r;if(/[,;:\.]/.test(n))return v=e.next(),null;if(l.test(n))return v=e.next(),`bracket`;if(n=="`")return e.next(),e.eatWhile(/[\w\$_]/)?`def`:null;if(n==`$`)return e.next(),e.eatWhile(/[\w\$_]/)?`meta`:null;if(n==`#`)return e.next(),e.eatWhile(/[\d_.]/),`def`;if(n==`"`)return e.next(),t.tokenize=E(n),t.tokenize(e,t);if(n==`/`){if(e.next(),e.eat(`*`))return t.tokenize=D,D(e,t);if(e.eat(`/`))return e.skipToEnd(),`comment`;e.backUp(1)}if(e.match(h)||e.match(d)||e.match(f)||e.match(p)||e.match(m)||e.match(u)||e.match(h))return`number`;if(e.eatWhile(c))return`meta`;if(e.eatWhile(/[\w\$_]/)){var i=e.current();return s[i]?(x[i]&&(v=`newblock`),w[i]&&(v=`newstatement`),y=i,`keyword`):`variable`}return e.next(),null}function E(e){return function(t,n){for(var r=!1,a,o=!1;(a=t.next())!=null;){if(a==e&&!r){o=!0;break}r=!r&&a==`\\`}return(o||!(r||i))&&(n.tokenize=T),`string`}}function D(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=T;break}n=r==`*`}return`comment`}function O(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function k(e,t,n){var r=e.indented;return e.context=new O(r,t,n,null,e.context)}function A(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}function j(e,t){if(e==t)return!0;var n=t.split(`;`);for(var r in n)if(e==n[r])return!0;return!1}function M(){var e=[];for(var t in x)if(x[t]){var n=x[t].split(`;`);for(var r in n)e.push(n[r])}return RegExp(`[{}()\\[\\]]|(`+e.join(`|`)+`)$`)}return{name:`verilog`,startState:function(e){var t={tokenize:null,context:new O(-e,0,`top`,!1),indented:0,startOfLine:!0};return a.startState&&a.startState(t),t},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),a.token){var r=a.token(e,t);if(r!==void 0)return r}if(e.eatSpace())return null;v=null,y=null;var r=(t.tokenize||T)(e,t);if(r==`comment`||r==`meta`||r==`variable`)return r;if(n.align??(n.align=!0),v==n.type)A(t);else if(v==`;`&&n.type==`statement`||n.type&&j(y,n.type))for(n=A(t);n&&n.type==`statement`;)n=A(t);else if(v==`{`)k(t,e.column(),`}`);else if(v==`[`)k(t,e.column(),`]`);else if(v==`(`)k(t,e.column(),`)`);else if(n&&n.type==`endcase`&&v==`:`)k(t,e.column(),`statement`);else if(v==`newstatement`)k(t,e.column(),`statement`);else if(v==`newblock
|
|
1
|
+
function e(e){var t=e.statementIndentUnit,n=e.dontAlignCalls,r=e.noIndentKeywords||[],i=e.multiLineStrings,a=e.hooks||{};function o(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var s=o(`accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor`),c=/[\+\-\*\/!~&|^%=?:]/,l=/[\[\]{}()]/,u=/\d[0-9_]*/,d=/\d*\s*'s?d\s*\d[0-9_]*/i,f=/\d*\s*'s?b\s*[xz01][xz01_]*/i,p=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,m=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,h=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,g=/^((\w+)|[)}\]])/,_=/[)}\]]/,v,y,b=o(`case checker class clocking config function generate interface module package primitive program property specify sequence table task`),x={};for(var S in b)x[S]=`end`+S;for(var C in x.begin=`end`,x.casex=`endcase`,x.casez=`endcase`,x.do=`while`,x.fork=`join;join_any;join_none`,x.covergroup=`endgroup`,r){var S=r[C];x[S]&&(x[S]=void 0)}var w=o(`always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while`);function T(e,t){var n=e.peek(),r;if(a[n]&&(r=a[n](e,t))!=0||a.tokenBase&&(r=a.tokenBase(e,t))!=0)return r;if(/[,;:\.]/.test(n))return v=e.next(),null;if(l.test(n))return v=e.next(),`bracket`;if(n=="`")return e.next(),e.eatWhile(/[\w\$_]/)?`def`:null;if(n==`$`)return e.next(),e.eatWhile(/[\w\$_]/)?`meta`:null;if(n==`#`)return e.next(),e.eatWhile(/[\d_.]/),`def`;if(n==`"`)return e.next(),t.tokenize=E(n),t.tokenize(e,t);if(n==`/`){if(e.next(),e.eat(`*`))return t.tokenize=D,D(e,t);if(e.eat(`/`))return e.skipToEnd(),`comment`;e.backUp(1)}if(e.match(h)||e.match(d)||e.match(f)||e.match(p)||e.match(m)||e.match(u)||e.match(h))return`number`;if(e.eatWhile(c))return`meta`;if(e.eatWhile(/[\w\$_]/)){var i=e.current();return s[i]?(x[i]&&(v=`newblock`),w[i]&&(v=`newstatement`),y=i,`keyword`):`variable`}return e.next(),null}function E(e){return function(t,n){for(var r=!1,a,o=!1;(a=t.next())!=null;){if(a==e&&!r){o=!0;break}r=!r&&a==`\\`}return(o||!(r||i))&&(n.tokenize=T),`string`}}function D(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=T;break}n=r==`*`}return`comment`}function O(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function k(e,t,n){var r=e.indented;return e.context=new O(r,t,n,null,e.context)}function A(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}function j(e,t){if(e==t)return!0;var n=t.split(`;`);for(var r in n)if(e==n[r])return!0;return!1}function M(){var e=[];for(var t in x)if(x[t]){var n=x[t].split(`;`);for(var r in n)e.push(n[r])}return RegExp(`[{}()\\[\\]]|(`+e.join(`|`)+`)$`)}return{name:`verilog`,startState:function(e){var t={tokenize:null,context:new O(-e,0,`top`,!1),indented:0,startOfLine:!0};return a.startState&&a.startState(t),t},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),a.token){var r=a.token(e,t);if(r!==void 0)return r}if(e.eatSpace())return null;v=null,y=null;var r=(t.tokenize||T)(e,t);if(r==`comment`||r==`meta`||r==`variable`)return r;if(n.align??(n.align=!0),v==n.type)A(t);else if(v==`;`&&n.type==`statement`||n.type&&j(y,n.type))for(n=A(t);n&&n.type==`statement`;)n=A(t);else if(v==`{`)k(t,e.column(),`}`);else if(v==`[`)k(t,e.column(),`]`);else if(v==`(`)k(t,e.column(),`)`);else if(n&&n.type==`endcase`&&v==`:`)k(t,e.column(),`statement`);else if(v==`newstatement`)k(t,e.column(),`statement`);else if(v==`newblock`&&(y!=`function`||!n||n.type!=`statement`&&n.type!=`endgroup`)&&!(y==`task`&&n&&n.type==`statement`)){var i=x[y];k(t,e.column(),i)}return t.startOfLine=!1,r},indent:function(e,r,i){if(e.tokenize!=T&&e.tokenize!=null)return null;if(a.indent){var o=a.indent(e);if(o>=0)return o}var s=e.context,c=r&&r.charAt(0);s.type==`statement`&&c==`}`&&(s=s.prev);var l=!1,u=r.match(g);return u&&(l=j(u[0],s.type)),s.type==`statement`?s.indented+(c==`{`?0:t||i.unit):_.test(s.type)&&s.align&&!n?s.column+ +!l:s.type==`)`&&!l?s.indented+(t||i.unit):s.indented+(l?0:i.unit)},languageData:{indentOnInput:M(),commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}}}}}var t=e({}),n={"|":`link`,">":`property`,$:`variable`,$$:`variable`,"?$":`qualifier`,"?*":`qualifier`,"-":`contentSeparator`,"/":`property`,"/-":`property`,"@":`variableName.special`,"@-":`variableName.special`,"@++":`variableName.special`,"@+=":`variableName.special`,"@+=-":`variableName.special`,"@--":`variableName.special`,"@-=":`variableName.special`,"%+":`tag`,"%-":`tag`,"%":`tag`,">>":`tag`,"<<":`tag`,"<>":`tag`,"#":`tag`,"^":`attribute`,"^^":`attribute`,"^!":`attribute`,"*":`variable`,"**":`variable`,"\\":`keyword`,'"':`comment`},r={"/":`beh-hier`,">":`beh-hier`,"-":`phys-hier`,"|":`pipe`,"?":`when`,"@":`stage`,"\\":`keyword`},i=3,a=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,o=/^[! ] */,s=/^\/[\/\*]/;e({hooks:{electricInput:!1,token:function(e,t){var c=void 0,l;if(e.sol()&&!t.tlvInBlockComment){e.peek()==`\\`&&(c=`def`,e.skipToEnd(),e.string.match(/\\SV/)?t.tlvCodeActive=!1:e.string.match(/\\TLV/)&&(t.tlvCodeActive=!0)),t.tlvCodeActive&&e.pos==0&&t.indented==0&&(l=e.match(o,!1))&&(t.indented=l[0].length);var u=t.indented,d=u/i;if(d<=t.tlvIndentationStyle.length){var f=e.string.length==u,p=d*i;if(p<e.string.length){var m=e.string.slice(p),h=m[0];r[h]&&(l=m.match(a))&&n[l[1]]&&(u+=i,h==`\\`&&p>0||(t.tlvIndentationStyle[d]=r[h],d++))}if(!f)for(;t.tlvIndentationStyle.length>d;)t.tlvIndentationStyle.pop()}t.tlvNextIndent=u}if(t.tlvCodeActive){var l;if(c===void 0){if(t.tlvInBlockComment)e.match(/^.*?\*\//)?t.tlvInBlockComment=!1:e.skipToEnd(),c=`comment`;else if((l=e.match(s))&&!t.tlvInBlockComment)l[0]==`//`?e.skipToEnd():t.tlvInBlockComment=!0,c=`comment`;else if(l=e.match(a)){var g=l[1],_=l[2];n.hasOwnProperty(g)&&(_.length>0||e.eol())?c=n[g]:e.backUp(e.current().length-1)}else e.match(/^\t+/)?c=`invalid`:e.match(/^[\[\]{}\(\);\:]+/)?c=`meta`:(l=e.match(/^[mM]4([\+_])?[\w\d_]*/))?c=l[1]==`+`?`keyword.special`:`keyword`:e.match(/^ +/)?e.eol()&&(c=`error`):e.match(/^[\w\d_]+/)?c=`number`:e.next()}}else e.match(/^[mM]4([\w\d_]*)/)&&(c=`keyword`);return c},indent:function(e){return e.tlvCodeActive==1?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[],e.tlvCodeActive=!0,e.tlvNextIndent=-1,e.tlvInBlockComment=!1}}});export{t as verilog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-Dmmo5Kak.js";import{n as e}from"./chunk-ICYGCRZG-odvlDZyA.js";export{e as createWardleyServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-DzxwRta7.js";import{n as e}from"./chunk-ICYGCRZG-D97UeqJs.js";export{e as createWardleyServices};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{
|
|
2
|
-
`+n);let o=W(),s=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,h=d.size?.height??o.height,g=m(r);g.selectAll(`*`).remove(),c(g,h,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=e(e=>o.padding+e/100*y,`projectX`),S=e(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,c=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),c=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=c-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,m=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(m,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./chunk-X3CZISLH-BixgQztF.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CWlP1Dk_.js";import{t as p}from"./chunk-CLGD4ZFX-BfYJtJm1.js";import{i as m}from"./chunk-75Z2AOVW-DitkSoSG.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser.core-Bpogunsh.js";var _=e((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=e((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=e(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=e(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=e((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:e(async e=>{let n=await g(`wardley`,e);t.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}e(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}e(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}e(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}e(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}e(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}e(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}e(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}e(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}e(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}e(N,`setSize`);function P(e){C.startPipeline(e)}e(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}e(F,`addPipelineComponent`);function I(e){C.setAxes(e)}e(I,`updateAxes`);function L(e){return C.getNode(e)}e(L,`getNode`);function R(e){return C.resolveNodeId(e)}e(R,`resolveNodeId`);function z(){return C.build()}e(z,`getWardleyData`);function B(){C.clear(),o()}e(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=e(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=e(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:e((n,r,i,a)=>{t.debug(`Rendering Wardley map
|
|
2
|
+
`+n);let o=W(),s=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),m=d.size?.width??o.width,h=d.size?.height??o.height,g=p(r);g.selectAll(`*`).remove(),c(g,h,m,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=m-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=e(e=>o.padding+e/100*y,`projectX`),S=e(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,m-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,m-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,c=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),c=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=c-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=m-o.padding-l,p=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
|
|
3
3
|
M ${n} ${r-15}
|
|
4
4
|
L ${n+60-20} ${r-15}
|
|
5
5
|
L ${n+60-20} ${r-15-8}
|
|
@@ -17,7 +17,7 @@ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-oBChb5
|
|
|
17
17
|
L ${n+20} ${r+15}
|
|
18
18
|
L ${n+60} ${r+15}
|
|
19
19
|
Z
|
|
20
|
-
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:e(({wardley:e}={})=>{let t=n(),r=s(),i=
|
|
20
|
+
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:e(({wardley:e}={})=>{let t=n(),r=s(),i=m(t,r.themeVariables),a=m(i.wardley,e);return`
|
|
21
21
|
.wardley-background {
|
|
22
22
|
fill: ${a.backgroundColor};
|
|
23
23
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t}from"./chunk-X3CZISLH-DwWpRaN8.js";import{D as n,H as r,U as i,a,b as o,c as s,q as c,v as l,w as u,x as d,y as f}from"./chunk-O7XYJQB3-D0_ZY2za.js";import{t as p}from"./chunk-6AEJRKK7-DTVZj5bY.js";import{t as m}from"./chunk-JWPE2WC7-GDilnS5Y.js";import{n as h}from"./mermaid-parser.core-DBy--Jc0.js";import{i as g}from"./chunk-ZIGJFQKS-b8OUHKK5.js";var _=e((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=e((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=e(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=e(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=e((e,t)=>{if(m(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:e(async e=>{let n=await h(`wardley`,e);t.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}e(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}e(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}e(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}e(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}e(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}e(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}e(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}e(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}e(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}e(N,`setSize`);function P(e){C.startPipeline(e)}e(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}e(F,`addPipelineComponent`);function I(e){C.setAxes(e)}e(I,`updateAxes`);function L(e){return C.getNode(e)}e(L,`getNode`);function R(e){return C.resolveNodeId(e)}e(R,`resolveNodeId`);function z(){return C.build()}e(z,`getWardleyData`);function B(){C.clear(),a()}e(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:i,getAccTitle:f,setDiagramTitle:c,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=e(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=e(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:e((n,r,i,a)=>{t.debug(`Rendering Wardley map
|
|
2
|
+
`+n);let o=W(),c=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),m=d.size?.width??o.width,h=d.size?.height??o.height,g=p(r);g.selectAll(`*`).remove(),s(g,h,m,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,c.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,c.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,c.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,c.backgroundColor);let y=m-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,o.padding/2).attr(`fill`,c.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=e(e=>o.padding+e/100*y,`projectX`),S=e(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,m-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,c.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,c.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,c.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,c.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,s=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,s).attr(`y`,h-o.padding/1.5).attr(`fill`,c.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,c.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,m-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,c.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,c.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,s=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),s=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=s-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,c.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,c.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,c.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,c.componentFill).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,c.componentFill).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,c.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?c.evolutionStroke:e.className===`anchor`?`#000`:c.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,c.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,s=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();s=Math.max(s,i.height)});let l=e+20+105,u=i.length*16+20+s/2,d=o.padding,f=m-o.padding-l,p=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
|
|
3
|
+
M ${n} ${r-15}
|
|
4
|
+
L ${n+60-20} ${r-15}
|
|
5
|
+
L ${n+60-20} ${r-15-8}
|
|
6
|
+
L ${n+60} ${r}
|
|
7
|
+
L ${n+60-20} ${r+15+8}
|
|
8
|
+
L ${n+60-20} ${r+15}
|
|
9
|
+
L ${n} ${r+15}
|
|
10
|
+
Z
|
|
11
|
+
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(d.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);d.deaccelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
|
|
12
|
+
M ${n+60} ${r-15}
|
|
13
|
+
L ${n+20} ${r-15}
|
|
14
|
+
L ${n+20} ${r-15-8}
|
|
15
|
+
L ${n} ${r}
|
|
16
|
+
L ${n+20} ${r+15+8}
|
|
17
|
+
L ${n+20} ${r+15}
|
|
18
|
+
L ${n+60} ${r+15}
|
|
19
|
+
Z
|
|
20
|
+
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:e(({wardley:e}={})=>{let t=n(),r=o(),i=g(t,r.themeVariables),a=g(i.wardley,e);return`
|
|
21
|
+
.wardley-background {
|
|
22
|
+
fill: ${a.backgroundColor};
|
|
23
|
+
}
|
|
24
|
+
.wardley-axes line, .wardley-axes path {
|
|
25
|
+
stroke: ${a.axisColor};
|
|
26
|
+
}
|
|
27
|
+
.wardley-axis-label {
|
|
28
|
+
fill: ${a.axisTextColor};
|
|
29
|
+
}
|
|
30
|
+
.wardley-stage-label {
|
|
31
|
+
fill: ${a.axisTextColor};
|
|
32
|
+
}
|
|
33
|
+
.wardley-grid line {
|
|
34
|
+
stroke: ${a.gridColor};
|
|
35
|
+
}
|
|
36
|
+
.wardley-node circle {
|
|
37
|
+
fill: ${a.componentFill};
|
|
38
|
+
stroke: ${a.componentStroke};
|
|
39
|
+
}
|
|
40
|
+
.wardley-node-label {
|
|
41
|
+
fill: ${a.componentLabelColor};
|
|
42
|
+
}
|
|
43
|
+
.wardley-link {
|
|
44
|
+
stroke: ${a.linkStroke};
|
|
45
|
+
}
|
|
46
|
+
.wardley-link--dashed {
|
|
47
|
+
stroke-dasharray: 4 4;
|
|
48
|
+
}
|
|
49
|
+
.wardley-link-label {
|
|
50
|
+
fill: ${a.axisTextColor};
|
|
51
|
+
}
|
|
52
|
+
.wardley-trend line {
|
|
53
|
+
stroke: ${a.evolutionStroke};
|
|
54
|
+
}
|
|
55
|
+
.wardley-annotation-line {
|
|
56
|
+
stroke: ${a.annotationStroke};
|
|
57
|
+
}
|
|
58
|
+
.wardley-annotation circle {
|
|
59
|
+
fill: ${a.annotationFill};
|
|
60
|
+
stroke: ${a.annotationStroke};
|
|
61
|
+
}
|
|
62
|
+
.wardley-annotation text {
|
|
63
|
+
fill: ${a.annotationTextColor};
|
|
64
|
+
}
|
|
65
|
+
.wardley-annotations-box rect {
|
|
66
|
+
fill: ${a.annotationFill};
|
|
67
|
+
stroke: ${a.annotationStroke};
|
|
68
|
+
}
|
|
69
|
+
.wardley-annotations-box text {
|
|
70
|
+
fill: ${a.annotationTextColor};
|
|
71
|
+
}
|
|
72
|
+
.wardley-pipeline-box {
|
|
73
|
+
stroke: ${a.componentStroke};
|
|
74
|
+
}
|
|
75
|
+
.wardley-notes text {
|
|
76
|
+
fill: ${a.axisTextColor};
|
|
77
|
+
}
|
|
78
|
+
`},`styles`)};export{G as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,n as t}from"./file-kind-BwMIcZbi.js";function n(e){return String(e??``).trim()||null}function r(e=[]){let t=new Set,n=new Map;for(let r of e){if(typeof r!=`string`||r.length===0)continue;t.add(r);let e=r.split(`/`);for(let t=0;t<e.length;t+=1){let i=e.slice(t).join(`/`);n.has(i)||n.set(i,r)}}return{exactPaths:t,suffixMatch:n}}function i(e,r){let i=n(e);if(!i||!r)return null;if(r.exactPaths?.has(i))return i;let a=r.suffixMatch?.get(i);if(a)return a;if(t(i))return null;let o=`${i}.md`;return r.exactPaths?.has(o)?o:r.suffixMatch?.get(o)??null}function a(r,i){let a=n(r);if(!a||!Array.isArray(i)||i.length===0)return null;let o=null;for(let e of i){if(e===a)return e;!o&&e.endsWith(`/${a}`)&&(o=e)}if(o||t(a))return o;let s=`${a}.md`,c=null;for(let t of i)if(e(t)){if(t===s)return t;!c&&t.endsWith(`/${s}`)&&(c=t)}return c}export{a as n,i as r,r as t};
|