@inkeep/open-knowledge 0.47.0-beta.26 → 0.47.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abnfDiagram-VRR7QNED-C01LwnLj.mjs → abnfDiagram-VRR7QNED-DQjgDcgA.mjs} +2 -2
- package/dist/{acp-harness-probe-BTT3QZDW.mjs → acp-harness-probe-nIQK1iGt.mjs} +3 -3
- package/dist/alias-JE7RI5QX-BfILuEvo.mjs +1 -0
- package/dist/{arc-CYbidMQb.mjs → arc-CO8jsQkL.mjs} +2 -2
- package/dist/architecture-TIHT7OUA-CScIhnar.mjs +1 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-54tD72To.mjs → architectureDiagram-ZJ3FMSHR-CkUIG8wd.mjs} +2 -2
- package/dist/{array-BqQze_vE.mjs → array-Cerc_8W3.mjs} +1 -1
- package/dist/{awk2-BBAGSFUB-C0jQbtG6.mjs → awk2-BBAGSFUB-BH8WxyhW.mjs} +1 -1
- package/dist/{banner--DGfdMN8.mjs → banner-CIK2GwPx.mjs} +1 -1
- package/dist/{base64-4YMZCVJ5-E_RwmVUf.mjs → base64-4YMZCVJ5-CDuRvFBG.mjs} +1 -1
- package/dist/{basename-AA2KJYZQ-Dq2O0Dr6.mjs → basename-AA2KJYZQ-sv8gJZXS.mjs} +1 -1
- package/dist/bash-IJWYRKFO-DKUaUgF9.mjs +1 -0
- package/dist/{blockDiagram-677ZJIJ3-BFWl-x5e.mjs → blockDiagram-677ZJIJ3-sLhYyPCr.mjs} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-BkY5gq8X.mjs → c4Diagram-LMCZKHZV-Cg6dfUXU.mjs} +2 -2
- package/dist/{cat-RDUMLXKC-C3vpYzfr.mjs → cat-RDUMLXKC-BtNo16C3.mjs} +1 -1
- package/dist/channel-DRk0OEK0.mjs +2 -0
- package/dist/{chmod-SYMGL4JA-BzT6KWst.mjs → chmod-SYMGL4JA-B15Xlp42.mjs} +1 -1
- package/dist/{chokidar-BCS--vwu.mjs → chokidar-CVNrjmRM.mjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-BBA6_zq_.mjs → chunk-2Q5K7J3B-2Es1K_NO.mjs} +2 -2
- package/dist/{chunk-2TRDZQLB-C_2g1dOd.mjs → chunk-2TRDZQLB-G1LvPXqq.mjs} +1 -1
- package/dist/{chunk-32BRIVSS-Bsc-9o_O.mjs → chunk-32BRIVSS-ok2xg0Je.mjs} +2 -2
- package/dist/{chunk-3BS5SKQH-nmqNxSIe.mjs → chunk-3BS5SKQH-CFcrGLDG.mjs} +3 -3
- package/dist/{chunk-3H6UQG3A-DLwP7IGN.mjs → chunk-3H6UQG3A-Dx5ykWR0.mjs} +2 -2
- package/dist/{chunk-3ZUFRYJ4-DX32azSC.mjs → chunk-3ZUFRYJ4-DzbWfyzV.mjs} +1 -1
- package/dist/{chunk-4GTNDTRF-BT6SNd8s.mjs → chunk-4GTNDTRF-COTPYeV6.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-CL0rAYDo.mjs → chunk-4HHKTUW3-BkuKGebe.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-Cf1guB-L.mjs → chunk-4Q4SM6WR-i8tiQRv3.mjs} +2 -2
- package/dist/{chunk-52WLFC77-D0ICJuoG.mjs → chunk-52WLFC77-BaT5_S-q.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-B2P94_nY.mjs → chunk-55VFSPNA-Ct9maI6O.mjs} +2 -2
- package/dist/{chunk-5FCAYU7R-DamFELXo.mjs → chunk-5FCAYU7R-of7BBDNL.mjs} +2 -2
- package/dist/{chunk-5HE753X5-CK-MLDEN.mjs → chunk-5HE753X5-9kILZ5Nr.mjs} +2 -2
- package/dist/{chunk-5JV3BV7I-XXAgMX9r.mjs → chunk-5JV3BV7I-BKVVlFxh.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-0Om-Hby0.mjs → chunk-5QVNJEHU-CvZ-NmqQ.mjs} +2 -2
- package/dist/{chunk-5TONJI2A-Du5dq0Ys.mjs → chunk-5TONJI2A-CGHpmUrS.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-D9prksm6.mjs → chunk-5V6VZH6T-DdeqP2TW.mjs} +2 -2
- package/dist/{chunk-5VM5RSS4-B9nF5Lzd.mjs → chunk-5VM5RSS4-COK1ErrI.mjs} +2 -2
- package/dist/{chunk-62RKD26F-pjncC7By.mjs → chunk-62RKD26F-RtrcFE7S.mjs} +2 -2
- package/dist/{chunk-64BAICW3-2hCf5wU5.mjs → chunk-64BAICW3-0h-yIc1e.mjs} +2 -2
- package/dist/{chunk-6Z5SFZXK-eDS7YpbK.mjs → chunk-6Z5SFZXK-C5owNg1o.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-D5a5lNJR.mjs → chunk-74CEPOFO--xsxhUFC.mjs} +1 -1
- package/dist/{chunk-7BUUIJ7U-CKtuqKC6.mjs → chunk-7BUUIJ7U-_1oXd84C.mjs} +2 -2
- package/dist/{chunk-7L36YK2X-L3jD5RT-.mjs → chunk-7L36YK2X-VlH7dlrD.mjs} +1 -1
- package/dist/{chunk-7TSDKFEO-Csacasvr.mjs → chunk-7TSDKFEO-BjOrsK6M.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-B6M8dLIA.mjs → chunk-A4HU7SVR-oMNSpej4.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-CcbmCyG6.mjs → chunk-A4JSPFCI-DtnWqT5O.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-D_GAtJYb.mjs → chunk-A65PWWJC-LctFeUxK.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-D1HWRTG-.mjs → chunk-A7A2DBEE-DuuhuGG1.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-C8N1DqNa.mjs → chunk-A7ICOL4V-CzYDHdxM.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-AOz3zDg8.mjs → chunk-ALLTKNUZ-BnLIZXEI.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-e8HVVYt4.mjs → chunk-APT7OOP2-DESh647P.mjs} +2 -2
- package/dist/{chunk-BIQX33UG-CLYGAgEl.mjs → chunk-BIQX33UG-BVtPexox.mjs} +2 -2
- package/dist/{chunk-C7G6YPKG-6PzAyV0E.mjs → chunk-C7G6YPKG-DpNJWc2e.mjs} +2 -2
- package/dist/{chunk-CQNSW5MT-C4GcKMFe.mjs → chunk-CQNSW5MT-B6mAd0WS.mjs} +2 -2
- package/dist/{chunk-CYSBUYHQ-Bg8p94kN.mjs → chunk-CYSBUYHQ-CTWbbsmm.mjs} +2 -2
- package/dist/{chunk-D4J545R4-DstPCHY3.mjs → chunk-D4J545R4-Dy3lcp_X.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-B-mbMqx1.mjs → chunk-D6CWQ5DW-Dl4tJcwX.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-L5KTglFl.mjs → chunk-D7MEQ3VN-B-Qyxyo5.mjs} +2 -2
- package/dist/{chunk-DBKNVD4L-TDavYUFP.mjs → chunk-DBKNVD4L-Y2Mnp5lC.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-CVYtUSXu.mjs → chunk-DCAAORBQ-BxtVrSMT.mjs} +2 -2
- package/dist/{chunk-EEXR5ZDP-DKmcp163.mjs → chunk-EEXR5ZDP-BcjEP2wd.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-CF3xXFmY.mjs → chunk-EIZGF4BS-DYiqM1Ss.mjs} +2 -2
- package/dist/{chunk-EMLP6XTP-DOWW1yTB.mjs → chunk-EMLP6XTP-AFimKO17.mjs} +2 -2
- package/dist/{chunk-EX3LRPZG-Bk8s0J-D.mjs → chunk-EX3LRPZG-BYcqQlY8.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-B1-WhWYU.mjs → chunk-F23WWYKW-BuCITNd6.mjs} +2 -2
- package/dist/{chunk-FWX5IMBZ-BKxaTzwN.mjs → chunk-FWX5IMBZ-BFNo8SGu.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-C-I4uPLP.mjs → chunk-GCTKCWKD-jz3yOk3f.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-DMNNr1LX.mjs → chunk-GOV5EKKI-IRzA9ik3.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-CHoBbpeP.mjs → chunk-GXVXFKBA-CGc4vqMu.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-D4gBGBPX.mjs → chunk-HDQ56CKY-Svz-iz8m.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-DfJokS61.mjs → chunk-HJQJAYMS-SgZmT_QE.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-C34BatAz.mjs → chunk-HJWBQKYG-BqFDM0xp.mjs} +2 -2
- package/dist/{chunk-HKLCLINH-DkU4By68.mjs → chunk-HKLCLINH-DKx243zB.mjs} +3 -3
- package/dist/{chunk-HL6NGDO2-CX48H9NQ.mjs → chunk-HL6NGDO2-B9GCn41X.mjs} +2 -2
- package/dist/{chunk-HOUHSVGY-CM96kWHC.mjs → chunk-HOUHSVGY-Cg_2_CUd.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-DvFquSuN.mjs → chunk-HWKDQ44K-CVxg-h0V.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-C-GWJFeH.mjs → chunk-I57KEIP3-FVl4IVXz.mjs} +1 -1
- package/dist/{chunk-ICXQ74PX-a_OoZV-J.mjs → chunk-ICXQ74PX-CewdqzeE.mjs} +2 -2
- package/dist/{chunk-JG7HCLWE-BL-hOXz_.mjs → chunk-JG7HCLWE-BgiWVzAI.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-KIcPtJsL.mjs → chunk-JVPRLUMK-CH7w4zyh.mjs} +2 -2
- package/dist/{chunk-JWPE2WC7-B4cjhMJa.mjs → chunk-JWPE2WC7-cMhWwV9I.mjs} +2 -2
- package/dist/{chunk-K6LIBGJA-DifITl-A.mjs → chunk-K6LIBGJA-DI9ZkJey.mjs} +2 -2
- package/dist/{chunk-KEIR6QF5-D5fHRjH_.mjs → chunk-KEIR6QF5-BhaMJNB5.mjs} +1 -1
- package/dist/{chunk-KMEYNNUA-BulSmamX.mjs → chunk-KMEYNNUA-CabTsa7P.mjs} +2 -2
- package/dist/{chunk-KRBPSX3W-DrDWj6yq.mjs → chunk-KRBPSX3W-ciCGjpAL.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-rdnne998.mjs → chunk-LL3S3NLB-r8mDpVuz.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-CcW89saL.mjs → chunk-LTZRCH7N-Cj1hz7m7.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-56p2g4nb.mjs → chunk-LWEGUNWT-C3ON4AHi.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-CL40B1CC.mjs → chunk-MDDMCKUK-D3MZs3FF.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-CDjkVtAO.mjs → chunk-MDLLFABN-DgTeOfIY.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-D8V0hAkM.mjs → chunk-MHTUABJP-BbSobv_U.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-q38ahMm1.mjs → chunk-MIZPJHVH-CzqfuBdK.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-BwLP8wJ5.mjs → chunk-MLXIYONF-BcM04nM_.mjs} +1 -1
- package/dist/{chunk-MOJQB5TN-a3t5NDdo.mjs → chunk-MOJQB5TN-CidbQQ7m.mjs} +2 -2
- package/dist/{chunk-MOZMSUNE-CxsrZHOL.mjs → chunk-MOZMSUNE-DTiZcqZ1.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-Dh-4DgDD.mjs → chunk-MYE6AGBJ-B3ukegXT.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-BKjqzg55.mjs → chunk-NAERJDUW-CoAYVGR3.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-D7DW6h8D.mjs → chunk-NCNPKYJZ-C1KcgrGe.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-KW8uL1OU.mjs → chunk-NUYSJFDK-sPbPxu4W.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-DyesF30h.mjs → chunk-OCLXQMOG-BdLZfp3D.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-BuHq4vgI.mjs → chunk-OCS6LSEM-7beNWT9m.mjs} +2 -2
- package/dist/{chunk-OGEWGWER-BE748IwJ.mjs → chunk-OGEWGWER-B-Vr80Fa.mjs} +2 -2
- package/dist/{chunk-OSBZ3O6U-xu2H_t-I.mjs → chunk-OSBZ3O6U-DwDyo3Ly.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-Dt3seCXC.mjs → chunk-PBXLG62G-ww-bn-Tp.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-BoToLAyG.mjs → chunk-PP6PSHAB-xKRHmmOd.mjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CgH8fCPb.mjs → chunk-PUDLZKDR-CI0pacGF.mjs} +2 -2
- package/dist/{chunk-PXTK5WE2-6yLfmmSs.mjs → chunk-PXTK5WE2-Dfi2FrE5.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-DRdz7MOj.mjs → chunk-PYSFUGCK-BHwvxY2Q.mjs} +2 -2
- package/dist/{chunk-Q4XR5HBZ-Dj_gUljr.mjs → chunk-Q4XR5HBZ-4H-m7p0G.mjs} +2 -2
- package/dist/{chunk-QBLGF6JB-CZlF3VMT.mjs → chunk-QBLGF6JB-B_tvtCRO.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-BnCQYX4A.mjs → chunk-QCDB2VPH-DHsQu4h6.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-IyfDNhDN.mjs → chunk-QJ7O6ZN3-CTKdWbns.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-CK5T9nTq.mjs → chunk-R6QSAL5T-DA60heK6.mjs} +1 -1
- package/dist/{chunk-R7FJI6CG-CxRbRaPW.mjs → chunk-R7FJI6CG-BVR1ae7y.mjs} +2 -2
- package/dist/{chunk-RPNGRAAP-Dm3Foy2a.mjs → chunk-RPNGRAAP-df7FdhI4.mjs} +2 -2
- package/dist/{chunk-RYQCIY6F-DsJ8x3au.mjs → chunk-RYQCIY6F-C8F82Uai.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-eDjS077u.mjs → chunk-SDNKECQQ-BuTL-ot2.mjs} +2 -2
- package/dist/{chunk-SNN4IESC-dc9Emx2i.mjs → chunk-SNN4IESC-DVqEOGsL.mjs} +1 -1
- package/dist/{chunk-T56QNPHK-DcLcXLAt.mjs → chunk-T56QNPHK-COZC2A_r.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-B0bd8ZfM.mjs → chunk-TLSUDHID-DAREQN9J.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-CfKJYNUm.mjs → chunk-TOMNU26N-C3JZDC96.mjs} +2 -2
- package/dist/{chunk-TP4BZANS-EASixEFX.mjs → chunk-TP4BZANS-C2Z-CHHA.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-CK2DQwjP.mjs → chunk-TXBZCHCQ-DOaoE5TV.mjs} +2 -2
- package/dist/{chunk-U6XO7XAA-ahVBPW6i.mjs → chunk-U6XO7XAA-BpjdcG5R.mjs} +2 -2
- package/dist/{chunk-V5MWI2OL-Cd1wUWKd.mjs → chunk-V5MWI2OL-D8SKWVO_.mjs} +1 -1
- package/dist/{chunk-V7JOEXUC-Ca3kqXAx.mjs → chunk-V7JOEXUC-CdEIYYNc.mjs} +2 -2
- package/dist/{chunk-V7TAPXDL-B4X-oI_G.mjs → chunk-V7TAPXDL-CQbB1mLa.mjs} +2 -2
- package/dist/chunk-VAUOI2AC-Ds6ZNp2p.mjs +2 -0
- package/dist/{chunk-VJFXDYWH-CYSruK3V.mjs → chunk-VJFXDYWH-C7Lg-Yts.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-D7PSswl5.mjs → chunk-VOBGTVA6-CKl2LR-K.mjs} +2 -2
- package/dist/{chunk-VR4S4FIN-DFCLUzSW.mjs → chunk-VR4S4FIN-mH-q10Uq.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-Dv2fFnVt.mjs → chunk-VYOJP4TV-DFxaC5Uc.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-Dj6ID3dE.mjs → chunk-WKFATFPP-R7B51gCW.mjs} +2 -2
- package/dist/{chunk-WYO6CB5R-CkxB2qiV.mjs → chunk-WYO6CB5R-Cg1RXhAT.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-BAGBpB2e.mjs → chunk-X2AJGDEF-D97qevlv.mjs} +1 -1
- package/dist/{chunk-XKQRETAK-BFwrbyC7.mjs → chunk-XKQRETAK-BTmmMuta.mjs} +2 -2
- package/dist/{chunk-XKWWSDBF-BTq_A_8q.mjs → chunk-XKWWSDBF-BGzAOrO3.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-BeU4kyoN.mjs → chunk-XVDPCNWR-3ajbQWzU.mjs} +2 -2
- package/dist/chunk-XXDRQBXY-BvbdToKZ.mjs +2 -0
- package/dist/{chunk-Y2CYZVJY-D-AxePDr.mjs → chunk-Y2CYZVJY-C7FmC3Cl.mjs} +1 -1
- package/dist/{chunk-YMMW5UAP-Dk_tcn_t.mjs → chunk-YMMW5UAP-DbBgrudQ.mjs} +2 -2
- package/dist/{chunk-YOTPTUD7-BtJLrOsu.mjs → chunk-YOTPTUD7-BSOqhRr-.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-D70kTYmT.mjs → chunk-YTNYSM6T-CoxqCaLl.mjs} +2 -2
- package/dist/{chunk-YULBWSET-aTxOIZGk.mjs → chunk-YULBWSET-CuKhTv4j.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-BGPMNtJW.mjs → chunk-Z6LRHWXI-CujGXDs8.mjs} +1 -1
- package/dist/{chunk-Z7JVV2SM-Y0p3CYM_.mjs → chunk-Z7JVV2SM-CiJwkxuY.mjs} +2 -2
- package/dist/{chunk-ZGVPDNZ5-DExn7OfJ.mjs → chunk-ZGVPDNZ5-BE_qYP6z.mjs} +2 -2
- package/dist/{chunk-ZIRB5QZD-B2znOhor.mjs → chunk-ZIRB5QZD-mhYZnDzb.mjs} +2 -2
- package/dist/{chunk-ZZO3UDB3-R3zof8I8.mjs → chunk-ZZO3UDB3-DCkJjNN2.mjs} +2 -2
- package/dist/classDiagram-OUVF2IWQ-rKP7gcsT.mjs +2 -0
- package/dist/classDiagram-v2-EOCWNBFH-BoWf4tYI.mjs +2 -0
- package/dist/{clear-5CZ5X4YR-DiniSeCm.mjs → clear-5CZ5X4YR-BNXs_KRD.mjs} +1 -1
- package/dist/cli.mjs +24 -24
- package/dist/{column-WLPMMSTS-B1OOeDAs.mjs → column-WLPMMSTS-BrY1gQI1.mjs} +1 -1
- package/dist/{comm-5SLSESQG-C4Rjg6X-.mjs → comm-5SLSESQG-aGB098lH.mjs} +1 -1
- package/dist/constants-Bt-MUkST.mjs +2 -0
- package/dist/{cose-bilkent-JH36ORCC-DwAqPWSx.mjs → cose-bilkent-JH36ORCC-CMfIp4st.mjs} +2 -2
- package/dist/{du-WO2ENHXQ-D_erNUzD.mjs → cp-XOYR4ABJ-D0LUaMQT.mjs} +1 -1
- package/dist/{curl-47BFPSFW-DtUGPJbr.mjs → curl-47BFPSFW-d1TMPUJw.mjs} +2 -2
- package/dist/{cut-OPC3VAGB-Bh_filgx.mjs → cut-OPC3VAGB-FXZX1WQM.mjs} +1 -1
- package/dist/cynefin-VYW2F7L2-DtazLHUs.mjs +1 -0
- package/dist/{cynefinDiagram-TSTJHNR4-CT6-xML3.mjs → cynefinDiagram-TSTJHNR4-CFbt5v4d.mjs} +2 -2
- package/dist/{cytoscape.esm-B3Kjf-Bp.mjs → cytoscape.esm-Dq6ZD9GH.mjs} +1 -1
- package/dist/{dagre-CTeiWCGh.mjs → dagre-CbI1Ylqw.mjs} +2 -2
- package/dist/{dagre-VKFMJZFB-BGysx5vx.mjs → dagre-VKFMJZFB-BWP36rMX.mjs} +2 -2
- package/dist/{head-HT2B6D2J-BkVS3Xmr.mjs → date-DD7FVA2V-7hk1aW9g.mjs} +1 -1
- package/dist/{defaultLocale-DPK87u2Z.mjs → defaultLocale-9SlCuWEL.mjs} +1 -1
- package/dist/{diagram-FQU43EPY-ZqRG6Q5e.mjs → diagram-FQU43EPY-D2pf7IBH.mjs} +2 -2
- package/dist/{diagram-G47NLZAW-DI7dcuHy.mjs → diagram-G47NLZAW-BlOXaBe6.mjs} +2 -2
- package/dist/{diagram-NH7WQ7WH-D1oPk0UR.mjs → diagram-NH7WQ7WH-DOwRNWDI.mjs} +2 -2
- package/dist/{diagram-OA4YK3LP-Bm3vioHL.mjs → diagram-OA4YK3LP-uyGYHUoX.mjs} +2 -2
- package/dist/{diagram-WEI45ONY-Dn8oUVjW.mjs → diagram-WEI45ONY-CmW1X9Kx.mjs} +2 -2
- package/dist/diff-HJF2MPDN-bcOaHvDo.mjs +1 -0
- package/dist/{dirname-LEMTZZFS-DNEfkSJA.mjs → dirname-LEMTZZFS-RRQ5Ar_Z.mjs} +1 -1
- package/dist/{dist-DODzJ7LG.mjs → dist-BmYngy7b.mjs} +1 -1
- package/dist/{cp-XOYR4ABJ-sYSLIPgW.mjs → du-WO2ENHXQ-Cg71FvLi.mjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-Cv_KK2i9.mjs → ebnfDiagram-CCIWWBDH-BpBYlrRH.mjs} +2 -2
- package/dist/echo-O45JWWI2-BacOdfFs.mjs +1 -0
- package/dist/env-5EPCWSXR-T8XCKOX_.mjs +1 -0
- package/dist/{erDiagram-Q63AITRT-Bt6lGD8v.mjs → erDiagram-Q63AITRT-ChoKKmxG.mjs} +2 -2
- package/dist/eventmodeling-45OFAUF4-BIXp-P6z.mjs +1 -0
- package/dist/{execAsync-BUKncp0P.mjs → execAsync-BKp2jujj.mjs} +1 -1
- package/dist/{execAsync-DEmazqCE.mjs → execAsync-BuUKdKlz.mjs} +1 -1
- package/dist/{expand-DTNXU4LQ-CMN49iyc.mjs → expand-DTNXU4LQ-BD32VJaK.mjs} +1 -1
- package/dist/expr-YYCVMXE3-CgQib9F9.mjs +1 -0
- package/dist/{date-DD7FVA2V-ByX6dFhf.mjs → file-IGDTDPLG-BAlm5q29.mjs} +1 -1
- package/dist/find-DH2ALKQS-z-G7VPmU.mjs +1 -0
- package/dist/flag-coverage-6JEX67RU-Cj_NycUm.mjs +2 -0
- package/dist/flowDiagram-23GEKE2U-B4VrCGdr.mjs +1 -0
- package/dist/{fold-LDSORVYE-CkAvzOUr.mjs → fold-LDSORVYE-CDU-6eOS.mjs} +1 -1
- package/dist/{fs-traced-ArlA_yTp.mjs → fs-traced-Cq61rC8q.mjs} +3 -3
- package/dist/fs-traced-WMTb98_i.mjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-DbUuL83g.mjs → ganttDiagram-NO4QXBWP-Cv7sGb-R.mjs} +2 -2
- package/dist/{getMachineId-bsd-Ba_eiHKT.mjs → getMachineId-bsd-DtFrm1Uy.mjs} +2 -2
- package/dist/{getMachineId-bsd-MpjjBCnQ.mjs → getMachineId-bsd-GFl1-Bje.mjs} +2 -2
- package/dist/{getMachineId-darwin-CCowcQE1.mjs → getMachineId-darwin--IR8MP8d.mjs} +2 -2
- package/dist/{getMachineId-darwin-CCtDS2VI.mjs → getMachineId-darwin-28jQHa_N.mjs} +2 -2
- package/dist/{getMachineId-linux-DMjXicei.mjs → getMachineId-linux-BZgyplQ5.mjs} +1 -1
- package/dist/{getMachineId-linux-DdmiwElW.mjs → getMachineId-linux-Bzx3S652.mjs} +1 -1
- package/dist/{getMachineId-unsupported-x9lk4Rw9.mjs → getMachineId-unsupported-CyTjujlI.mjs} +1 -1
- package/dist/{getMachineId-unsupported-xN2oDqpO.mjs → getMachineId-unsupported-DuB0leRF.mjs} +1 -1
- package/dist/{getMachineId-win-DuQfpi_A.mjs → getMachineId-win-BmvAZEMa.mjs} +2 -2
- package/dist/{getMachineId-win-mbAJtBuz.mjs → getMachineId-win-CuOFQQ73.mjs} +2 -2
- package/dist/gitGraph-TEB2WS4Q-BaTdqV7-.mjs +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-C-Kq9SCM.mjs → gitGraphDiagram-IHSO6WYX-DxsFHicP.mjs} +2 -2
- package/dist/{graphlib-BRVRb9Ce.mjs → graphlib-DKEQBDTz.mjs} +1 -1
- package/dist/grep-2HUTXO5U-CsEE08ya.mjs +1 -0
- package/dist/gzip-AQXSGOVS-CmMf6H0r.mjs +1 -0
- package/dist/{file-IGDTDPLG-CsAmedJu.mjs → head-HT2B6D2J-DSBJixLD.mjs} +1 -1
- package/dist/help-VVWX7SA5-BncYWg0B.mjs +1 -0
- package/dist/history-J4QRNGRO-CULSDkzp.mjs +1 -0
- package/dist/{hostname-BK6HG2DE-TD2KmZjb.mjs → hostname-BK6HG2DE-CaZb-T_R.mjs} +1 -1
- package/dist/html-to-markdown-TFCECAGV-CF0t8_d3.mjs +1 -0
- package/dist/{index-7O1fNicl.d.mts → index-1MIt1xrM.d.mts} +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +1 -1
- package/dist/info-DKCQHKI2-BxlpeeVn.mjs +1 -0
- package/dist/{infoDiagram-FWYZ7A6U-BcXqPzyL.mjs → infoDiagram-FWYZ7A6U-CbPpTq2x.mjs} +2 -2
- package/dist/{init-DotcULIJ.mjs → init-Buw5jj4Q.mjs} +1 -1
- package/dist/{init-CUut5PRP.mjs → init-CU23LoCM.mjs} +56 -56
- package/dist/init-DS23lDrI.mjs +1 -0
- package/dist/{ishikawaDiagram-FXEZZL3T-tlTxPgv8.mjs → ishikawaDiagram-FXEZZL3T-Dd5BEpOv.mjs} +2 -2
- package/dist/{join-GG2LDHE5-O6S65p4r.mjs → join-GG2LDHE5-kABASDPB.mjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-NczxLuUX.mjs → journeyDiagram-5HDEW3XC-W6Nbr96_.mjs} +2 -2
- package/dist/jq-LYZFFBZB-CIwp4u6h.mjs +1 -0
- package/dist/{js-exec-VXN6TZ7U-BJsjY3Aj.mjs → js-exec-VXN6TZ7U-1yyCDQqM.mjs} +2 -2
- package/dist/{kanban-definition-HUTT4EX6-CJ2cty8a.mjs → kanban-definition-HUTT4EX6-xcwe5vNg.mjs} +2 -2
- package/dist/{launch-json-removal-Bwz73HwG.mjs → launch-json-removal-CY8nwmxx.mjs} +2 -2
- package/dist/{lib-BpZC9d5Z.mjs → lib-BCIeHFfP.mjs} +1 -1
- package/dist/{lib-BS_oZ9bm.mjs → lib-TLTWf9qr.mjs} +1 -1
- package/dist/{line-CyR2aPKZ.mjs → line-Cq-NoiNn.mjs} +2 -2
- package/dist/{linear-DHgeTTi3.mjs → linear-DPbvcrPk.mjs} +2 -2
- package/dist/{ln-4TRFBYAT-DErk_Yl0.mjs → ln-4TRFBYAT-Dhr3hBr6.mjs} +1 -1
- package/dist/{loader-DVsRTqac.mjs → loader-DVUrcKP7.mjs} +2 -2
- package/dist/loader-DmPDSLFl.mjs +1 -0
- package/dist/{logger-5LePyO3n.mjs → logger-BZPV1wv8.mjs} +2 -2
- package/dist/ls-KSXFZCWH-BEv3e7-2.mjs +1 -0
- package/dist/{lzma-yp9l_vMN.mjs → lzma-Dh_aFpqW.mjs} +1 -1
- package/dist/{map-DbF7r1vR.mjs → map-CFzSl60r.mjs} +2 -2
- package/dist/{mcp-migrate-event-CWx0WLdE.mjs → mcp-migrate-event-B1gJf6bG.mjs} +1 -1
- package/dist/md5sum-INMIK4DX-CJ1G9gTe.mjs +1 -0
- package/dist/{mermaid-parser.core-Dq0Vyvhg.mjs → mermaid-parser.core-DejmtVwC.mjs} +2 -2
- package/dist/{mermaid.core-CZm3qvuv.mjs → mermaid.core-CB8v9A8r.mjs} +3 -3
- package/dist/{mindmap-definition-LN4V7U3C-DYytxufy.mjs → mindmap-definition-LN4V7U3C-BiYp6fzL.mjs} +2 -2
- package/dist/mkdir-TDEMSB6C-BY7IIkok.mjs +1 -0
- package/dist/mv-Z6MORUFL-C4m2WG8E.mjs +1 -0
- package/dist/{nl-U5YJDM32-CgnuF_hC.mjs → nl-U5YJDM32-CrNZhLtI.mjs} +1 -1
- package/dist/{od-VJEF2UR5-BTJQNl6y.mjs → od-VJEF2UR5-5RFpmlxK.mjs} +1 -1
- package/dist/{open-browser-C5MzSCJR.mjs → open-browser-CwwQWCcr.mjs} +2 -2
- package/dist/{ordinal-CUIZW000.mjs → ordinal-D5S_JXYv.mjs} +2 -2
- package/dist/packet-7NZHBO7P-DJoR1MQJ.mjs +1 -0
- package/dist/paste-7N6AFSDS-DQNANxpk.mjs +1 -0
- package/dist/{path-BT3cGQxQ.mjs → path-D4ahAhVD.mjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-tT5pVAwT.mjs → pegDiagram-2B236MQR-DMP1ng8V.mjs} +2 -2
- package/dist/pie-RZYD4A2V-Ba8iL0H-.mjs +1 -0
- package/dist/{pieDiagram-ENE6RG2P-kD_93j1i.mjs → pieDiagram-ENE6RG2P-CSKXRjGQ.mjs} +2 -2
- package/dist/preview-BrzvwX4B.mjs +1 -0
- package/dist/{preview-MxO7wX5P.mjs → preview-Dqj-uWHU.mjs} +2 -2
- package/dist/printf-CX64KX2P-CKuJk-Cs.mjs +1 -0
- package/dist/public/assets/FeedbackForm-C_uo17S3.js +1 -0
- package/dist/public/assets/globals-rA-7Xs6l.css +1 -0
- package/dist/public/assets/{index-7byMgx9L.js → index-5F97h9QB.js} +2 -2
- package/dist/public/assets/{uninstall-DpiS8BLi.js → uninstall-38Y5JJ_e.js} +1 -1
- package/dist/public/index.html +3 -3
- package/dist/public/uninstall.html +3 -3
- package/dist/pwd-D4OZ7N27-CSTLotxZ.mjs +1 -0
- package/dist/{python3-DNGS4G3E-BPxhh_Jp.mjs → python3-DNGS4G3E-BZ5fPY5e.mjs} +2 -2
- package/dist/{quadrantDiagram-ABIIQ3AL-CyuIUsL6.mjs → quadrantDiagram-ABIIQ3AL-Do93EPf_.mjs} +2 -2
- package/dist/radar-I7S5WNFK-HP72Fmhl.mjs +1 -0
- package/dist/railroad-3IZDKUUU-DC3PWo_6.mjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-Vgpa9_KI.mjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-B4SmMMsT.mjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-DLlDiUuB.mjs +1 -0
- package/dist/{railroadDiagram-RFXS5EU6-CHD_Jape.mjs → railroadDiagram-RFXS5EU6-BBHONGQu.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-V9fwXBrg.mjs +1 -0
- package/dist/{repair-launch-json-56bz582u.mjs → repair-launch-json-DuJJhAjz.mjs} +2 -2
- package/dist/repair-mcp-configs-DN8th9x-.mjs +2 -0
- package/dist/repair-skills-CVT6M7om.mjs +4 -0
- package/dist/repair-skills-He_WQsPp.mjs +1 -0
- package/dist/{requirementDiagram-TGXJPOKE-CGQTVdQl.mjs → requirementDiagram-TGXJPOKE-CAGy_wFo.mjs} +2 -2
- package/dist/{rev-XOSYPP45-BGL4FR9H.mjs → rev-XOSYPP45-G2PvMYC2.mjs} +1 -1
- package/dist/rg-XNF3R3II-CuFYIwNn.mjs +1 -0
- package/dist/rm-RTZG23RL-BOvMrhon.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Dk19R-p8.mjs +1 -0
- package/dist/{rough.cjs-s8-IvpYn.mjs → rough.cjs-LxmwwhvT.mjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-B1AFQN8q.mjs → sankeyDiagram-HTMAVEWB-B59ayZ_U.mjs} +2 -2
- package/dist/{sed-JAPPVBEU-YSD3Wwpz.mjs → sed-JAPPVBEU-BUaK4riL.mjs} +1 -1
- package/dist/seq-RN5ZUASB-D5aLn_so.mjs +1 -0
- package/dist/{sequenceDiagram-DBY2YBRQ-JQ2Wynkh.mjs → sequenceDiagram-DBY2YBRQ-BqY5gm2k.mjs} +2 -2
- package/dist/{server-lock-Cg66XiR-.mjs → server-lock--0V-ESY4.mjs} +2 -2
- package/dist/server-lock-owrYVjgw.mjs +1 -0
- package/dist/sha1sum-VJPNLNU6-DnTKth9v.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-Z-xtGDHc.mjs +1 -0
- package/dist/{sizeCapture-X5ZJPWSS-Btionz6c.mjs → sizeCapture-X5ZJPWSS-D7Nqbe-W.mjs} +2 -2
- package/dist/skill-teardown-POqnRqru.mjs +2 -0
- package/dist/{sleep-VZFPZFWA-DNxq1g-4.mjs → sleep-VZFPZFWA-DcISab6N.mjs} +1 -1
- package/dist/sort-DCNRDA7U-C1gRzOOY.mjs +1 -0
- package/dist/{split-SITCSYCZ-Dl-r5t6o.mjs → split-SITCSYCZ-D4U2N_sH.mjs} +1 -1
- package/dist/{sqlite3-TE5AIOTF-DV5JBdcO.mjs → sqlite3-TE5AIOTF-DcjYN7WW.mjs} +1 -1
- package/dist/{src-nvx4LAFk.mjs → src-BuBt_xnY.mjs} +2 -2
- package/dist/{src-BVOdbrbz.mjs → src-C9LMhuL4.mjs} +12 -12
- package/dist/src-NzJXVevh.mjs +20 -0
- package/dist/{src-BLAyDRF9.mjs → src-n6rcQokc.mjs} +1 -1
- package/dist/start-YIarrDd3.mjs +1 -0
- package/dist/{start-BVMhwbcE.mjs → start-fVSyvtMn.mjs} +3 -3
- package/dist/stat-BT5A227F-B4qwqNn_.mjs +1 -0
- package/dist/{stateDiagram-2N3HPSRC-BzNiMGRR.mjs → stateDiagram-2N3HPSRC-BD1FBZi9.mjs} +2 -2
- package/dist/stateDiagram-v2-6OUMAXLB-CqmBRdZY.mjs +2 -0
- package/dist/strings-7PLOGTPD-BJ6vWsQi.mjs +1 -0
- package/dist/{swimlanes-5IMT3BWC-BrdJ_D0k.mjs → swimlanes-5IMT3BWC-D2eO0gTx.mjs} +2 -2
- package/dist/swimlanesDiagram-G3AALYLV-BiRCZWbo.mjs +9 -0
- package/dist/{tac-SJGXQ4T2-ByjKkvjF.mjs → tac-SJGXQ4T2-D-bfDFKg.mjs} +1 -1
- package/dist/tail-S5ULNTJU-CWnyTuXg.mjs +1 -0
- package/dist/{tar-MZQD7NO4-B2cyr2d4.mjs → tar-MZQD7NO4-Cx5bpVMY.mjs} +1 -1
- package/dist/tee-O7VXZDCO-B_duU1hV.mjs +1 -0
- package/dist/time-DEUO3QV2-CekCKA2I.mjs +1 -0
- package/dist/{timeline-definition-FHXFAJF6-ByhSkc7M.mjs → timeline-definition-FHXFAJF6-DZHpuaV_.mjs} +2 -2
- package/dist/{timeout-VRKMCG72-BJzTDNVp.mjs → timeout-VRKMCG72-DaJVXXR3.mjs} +1 -1
- package/dist/touch-DX2IJOQ4-CZteiICw.mjs +1 -0
- package/dist/tr-2HXZRDSW-D4XuTGWg.mjs +1 -0
- package/dist/tree-LYXBS7DC-CUIzQKTG.mjs +1 -0
- package/dist/treeView-QDETBFTQ-C9yOsbGY.mjs +1 -0
- package/dist/treemap-6X3UGDF4-iowse2nY.mjs +1 -0
- package/dist/true-WHJNXCHG-BzxCUQFd.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-x3XCmR3I.mjs +1 -0
- package/dist/uniq-SUNANL47-DpupkNiO.mjs +1 -0
- package/dist/{vennDiagram-L72KCM5P-CosAdslh.mjs → vennDiagram-L72KCM5P-CGoW4QcS.mjs} +2 -2
- package/dist/wardley-OPB4EBWU-BL1Dan_S.mjs +1 -0
- package/dist/{wardleyDiagram-EHGQE667-Bdo1uN9O.mjs → wardleyDiagram-EHGQE667-DHS8jBWZ.mjs} +2 -2
- package/dist/wc-TQB3VNOX-D8llmcL9.mjs +1 -0
- package/dist/which-XZHEH76L-imZgNd5x.mjs +1 -0
- package/dist/whoami-DGKU3D2X-CzLNG51j.mjs +1 -0
- package/dist/{write-project-skill-BT53Ejz2.mjs → write-project-skill-DvqoihuV.mjs} +7 -7
- package/dist/xan-UD7JYIL2-_38Iv1cI.mjs +1 -0
- package/dist/xan-view-OW2TB7Z3-RT-IKMgr.mjs +1 -0
- package/dist/xargs-I6EZUCYF-Bu8VhXV_.mjs +1 -0
- package/dist/{xychartDiagram-FW5EYKEG-CBeluzNN.mjs → xychartDiagram-FW5EYKEG-CG0DSvm_.mjs} +2 -2
- package/dist/yq-OAKYHSXH-BcCBaLJN.mjs +1 -0
- package/package.json +5 -5
- package/dist/alias-JE7RI5QX-BvhaFG9J.mjs +0 -1
- package/dist/architecture-TIHT7OUA-BVYsZR9r.mjs +0 -1
- package/dist/bash-IJWYRKFO-BWspyNyq.mjs +0 -1
- package/dist/channel-DppMxZyL.mjs +0 -2
- package/dist/chunk-VAUOI2AC-CLylHljB.mjs +0 -2
- package/dist/chunk-XXDRQBXY-ClPfCVft.mjs +0 -2
- package/dist/classDiagram-OUVF2IWQ-c5qgwZAE.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-D9ilZPqi.mjs +0 -2
- package/dist/constants-Bp8I4KQS.mjs +0 -2
- package/dist/cynefin-VYW2F7L2-CEVi_iCC.mjs +0 -1
- package/dist/diff-HJF2MPDN-DhZaF2MX.mjs +0 -1
- package/dist/echo-O45JWWI2-B8YWvx1Q.mjs +0 -1
- package/dist/env-5EPCWSXR-Cor7cJ6o.mjs +0 -1
- package/dist/eventmodeling-45OFAUF4-BENS2g0X.mjs +0 -1
- package/dist/expr-YYCVMXE3-VEQOsPiP.mjs +0 -1
- package/dist/find-DH2ALKQS-D4DqPp7j.mjs +0 -1
- package/dist/flag-coverage-6JEX67RU-C21BAvUp.mjs +0 -2
- package/dist/flowDiagram-23GEKE2U-BHZRRZtz.mjs +0 -1
- package/dist/fs-traced-C9U9YUGm.mjs +0 -1
- package/dist/gitGraph-TEB2WS4Q-C-obuzNL.mjs +0 -1
- package/dist/grep-2HUTXO5U-BHpyAWOj.mjs +0 -1
- package/dist/gzip-AQXSGOVS-kgzROhmg.mjs +0 -1
- package/dist/help-VVWX7SA5-Cnq4Pk95.mjs +0 -1
- package/dist/history-J4QRNGRO-ChaCzoJD.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-DRmuleyA.mjs +0 -1
- package/dist/info-DKCQHKI2-_AQUrTgC.mjs +0 -1
- package/dist/init-BC0u4teF.mjs +0 -1
- package/dist/jq-LYZFFBZB-DTUwGGgl.mjs +0 -1
- package/dist/loader-DwZ-kNkG.mjs +0 -1
- package/dist/ls-KSXFZCWH-DQIF-HgH.mjs +0 -1
- package/dist/md5sum-INMIK4DX-BElHH82h.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-BnpJKc8r.mjs +0 -1
- package/dist/mv-Z6MORUFL-CFyBiApv.mjs +0 -1
- package/dist/packet-7NZHBO7P-CHMfNci8.mjs +0 -1
- package/dist/paste-7N6AFSDS-CnLMuz8G.mjs +0 -1
- package/dist/pie-RZYD4A2V-02sGjUcO.mjs +0 -1
- package/dist/preview-B9XDskoX.mjs +0 -1
- package/dist/printf-CX64KX2P-DyVBy6Mg.mjs +0 -1
- package/dist/public/assets/FeedbackForm-yYdOpLff.js +0 -1
- package/dist/public/assets/globals-9XRqGE59.css +0 -1
- package/dist/pwd-D4OZ7N27-Pga3crue.mjs +0 -1
- package/dist/radar-I7S5WNFK-gNSWd2rG.mjs +0 -1
- package/dist/railroad-3IZDKUUU-tTi02nbm.mjs +0 -1
- package/dist/railroad-abnf-AHOZXSZD-DD6KwCgt.mjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-zJw8iMTp.mjs +0 -1
- package/dist/railroad-peg-LSFZ7HO6-8PbAUZs1.mjs +0 -1
- package/dist/readlink-MI4GCHJF-D9QYkCU0.mjs +0 -1
- package/dist/repair-mcp-configs-DPiYn_Ou.mjs +0 -2
- package/dist/repair-skills-qZNnVHuG.mjs +0 -1
- package/dist/repair-skills-wKMPJS9U.mjs +0 -4
- package/dist/rg-XNF3R3II-BMfKONjk.mjs +0 -1
- package/dist/rm-RTZG23RL-vsz0Vtsc.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-C9jARGFn.mjs +0 -1
- package/dist/seq-RN5ZUASB-hcgHczjD.mjs +0 -1
- package/dist/server-lock-DyY9o-h3.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-KpqF3VUr.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-BI7zTPJ3.mjs +0 -1
- package/dist/sort-DCNRDA7U-urKKiOkB.mjs +0 -1
- package/dist/src-DBN0I6LD.mjs +0 -20
- package/dist/start-ecRmiiD7.mjs +0 -1
- package/dist/stat-BT5A227F-BzZhqUU7.mjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-8Ywz0Hzd.mjs +0 -2
- package/dist/strings-7PLOGTPD-BYF-zQB5.mjs +0 -1
- package/dist/swimlanesDiagram-G3AALYLV-Df_BjTMR.mjs +0 -9
- package/dist/tail-S5ULNTJU-Bu45hbfn.mjs +0 -1
- package/dist/tee-O7VXZDCO-D5VPiyFZ.mjs +0 -1
- package/dist/time-DEUO3QV2-DTXF6o9u.mjs +0 -1
- package/dist/touch-DX2IJOQ4-CJL2LWzm.mjs +0 -1
- package/dist/tr-2HXZRDSW-BMEHkLkI.mjs +0 -1
- package/dist/tree-LYXBS7DC-B9nDoMUt.mjs +0 -1
- package/dist/treeView-QDETBFTQ-b0kDTk8s.mjs +0 -1
- package/dist/treemap-6X3UGDF4-CbmqvOp3.mjs +0 -1
- package/dist/true-WHJNXCHG-BrTi18ZN.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-Cz9o379Y.mjs +0 -1
- package/dist/uniq-SUNANL47-Jq_1JF4a.mjs +0 -1
- package/dist/wardley-OPB4EBWU-58Nq0iPk.mjs +0 -1
- package/dist/wc-TQB3VNOX-8TWuJ_OV.mjs +0 -1
- package/dist/which-XZHEH76L-C0nS7069.mjs +0 -1
- package/dist/whoami-DGKU3D2X-BRFeF7SV.mjs +0 -1
- package/dist/xan-UD7JYIL2-CsuyuKIz.mjs +0 -1
- package/dist/xan-view-OW2TB7Z3-BQPByClA.mjs +0 -1
- package/dist/xargs-I6EZUCYF-CfQ6WD0x.mjs +0 -1
- package/dist/yq-OAKYHSXH-q34fmnbQ.mjs +0 -1
- /package/dist/{expansion-VBDYWVZR-e2HuIG0U.mjs → expansion-VBDYWVZR-CeY6vkty.mjs} +0 -0
- /package/dist/public/assets/{globals-C8FRwDSr.js → globals-isQ8TLSF.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-CWQS3NFK-HnFncXpd.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-Z6LRHWXI-CujGXDs8.mjs";export{e as timeCommand};
|
package/dist/{timeline-definition-FHXFAJF6-ByhSkc7M.mjs → timeline-definition-FHXFAJF6-DZHpuaV_.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./chunk-Y2CYZVJY-
|
|
1
|
+
import{n as e,t}from"./chunk-Y2CYZVJY-C7FmC3Cl.mjs";import{m as n,p as r}from"./src-BuBt_xnY.mjs";import{J as i,a,b as o,et as s,o as c,rt as l,tt as u,x as d}from"./chunk-WYO6CB5R-Cg1RXhAT.mjs";import{t as f}from"./arc-CO8jsQkL.mjs";import{p}from"./chunk-ICXQ74PX-CewdqzeE.mjs";import{t as m}from"./chunk-VAUOI2AC-Ds6ZNp2p.mjs";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,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 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},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;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.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
2
|
`+h.showPosition()+`
|
|
3
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`)};u.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
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()+`
|
|
@@ -118,4 +118,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
|
|
|
118
118
|
filter: brightness(120%);
|
|
119
119
|
}
|
|
120
120
|
`},`getStyles`)};export{Se as diagram};
|
|
121
|
-
//# sourceMappingURL=timeline-definition-FHXFAJF6-
|
|
121
|
+
//# sourceMappingURL=timeline-definition-FHXFAJF6-DZHpuaV_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-A5O5YHGN-C27iG4wY.mjs";import{n as e}from"./chunk-YTNYSM6T-
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-A5O5YHGN-C27iG4wY.mjs";import{n as e}from"./chunk-YTNYSM6T-CoxqCaLl.mjs";export{e as timeoutCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-OCLXQMOG-BdLZfp3D.mjs";export{e as touchCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-62RKD26F-RtrcFE7S.mjs";export{e as trCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-XVDPCNWR-3ajbQWzU.mjs";export{e as treeCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-KEIR6QF5-BhaMJNB5.mjs";import{n as e}from"./chunk-CQNSW5MT-B6mAd0WS.mjs";export{e as createTreeViewServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-KEIR6QF5-BhaMJNB5.mjs";import{n as e}from"./chunk-R7FJI6CG-BVR1ae7y.mjs";export{e as createTreemapServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{i as e,t}from"./chunk-R6QSAL5T-DA60heK6.mjs";export{e as falseCommand,t as trueCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-PYSFUGCK-BHwvxY2Q.mjs";export{e as unexpand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-WKFATFPP-R7B51gCW.mjs";export{e as uniqCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-D-AxePDr.mjs";import{p as n}from"./src-nvx4LAFk.mjs";import{H as r,K as i,U as a,a as o,b as s,c,et as l,f as u,nt as d,rt as f,tt as p,v as m,w as h,y as g}from"./chunk-WYO6CB5R-CkxB2qiV.mjs";import{i as _}from"./chunk-ICXQ74PX-a_OoZV-J.mjs";import{t as v}from"./chunk-VAUOI2AC-CLylHljB.mjs";import{t as y}from"./rough.cjs-s8-IvpYn.mjs";const b=(e,t)=>d(e,`a`,-t),x=1e-10;function S(e,t){let n=w(e),r=n.filter(t=>C(t,e)),i=0,a=0,o=[];if(r.length>1){let t=k(r);for(let e=0;e<r.length;++e){let n=r[e];n.angle=Math.atan2(n.x-t.x,n.y-t.y)}r.sort((e,t)=>t.angle-e.angle);let n=r[r.length-1];for(let t=0;t<r.length;++t){let s=r[t];a+=(n.x+s.x)*(s.y-n.y);let c={x:(s.x+n.x)/2,y:(s.y+n.y)/2},l=null;for(let t=0;t<s.parentIndex.length;++t)if(n.parentIndex.includes(s.parentIndex[t])){let r=e[s.parentIndex[t]],i=Math.atan2(s.x-r.x,s.y-r.y),a=Math.atan2(n.x-r.x,n.y-r.y),o=a-i;o<0&&(o+=2*Math.PI);let u=a-o/2,d=E(c,{x:r.x+r.radius*Math.sin(u),y:r.y+r.radius*Math.cos(u)});d>r.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=T(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;n<e.length;++n)e[n].radius<t.radius&&(t=e[n]);let n=!1;for(let r=0;r<e.length;++r)if(E(e[r],t)>Math.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-x,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function C(e,t){return t.every(t=>E(e,t)<t.radius+x)}function w(e){let t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){let i=O(e[n],e[r]);for(let e of i)e.parentIndex=[n,r],t.push(e)}return t}function T(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function E(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function D(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 T(e,r)+T(t,i)}function O(e,t){let n=E(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),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function k(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 A(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 j(e){let t=Array(e);for(let n=0;n<e;++n)t[n]=0;return t}function M(e,t){return j(e).map(()=>j(t))}function N(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function P(e){return Math.sqrt(N(e,e))}function F(e,t,n){for(let r=0;r<t.length;++r)e[r]=t[r]*n}function I(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function L(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,_=t.slice(),v=t.slice(),y=t.slice(),b=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){_[e]=0;for(let t=0;t<p;++t)_[e]+=m[t][e];_[e]/=p}let t=m[p];if(I(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)I(b,1+l,_,-l,t),b.fx=e(b),b.fx<v.fx?h(b):h(v);else if(v.fx>=m[p-1].fx){let n=!1;if(v.fx>t.fx?(I(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(I(y,1-u*c,_,u*c,t),y.fx=e(y),y.fx<v.fx?h(y):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)I(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(v)}return m.sort(g),{fx:m[0].fx,x:m[0]}}function ee(e,t,n,r,i,a,o){let s=n.fx,c=N(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 m=0;m<16;++m)if(i=(u+f)/2,I(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=N(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 m=0;m<10;++m){if(I(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=N(r.fxprime,t),l>s+a*i*c||m&&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 te(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(),F(o,r.fxprime,-1);for(let t=0;t<l;++t){if(c=ee(e,o,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),!c)F(o,r.fxprime,-1);else{I(a,1,i.fxprime,-1,r.fxprime);let e=N(r.fxprime,r.fxprime),t=Math.max(0,N(a,i.fxprime)/e);I(o,t,o,-1,i.fxprime),s=r,r=i,i=s}if(P(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 ne(e,t={}){t.maxIterations=t.maxIterations||500;let n=t.initialLayout||se,r=t.lossFunction||z,i=ie(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=L(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}const re=1e-10;function R(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+re?Math.abs(e-t):A(r=>D(e,t,r)-n,0,e+t)}function ie(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 ae(e,t,n){let r=M(t.length,t.length),i=M(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=R(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 oe(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 se(e,t={}){let n=le(e,t),r=t.lossFunction||z;if(e.length>=8){let i=ce(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function ce(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}=ae(e,r,i),s=P(a.map(P))/a.length;a=a.map(e=>e.map(e=>e/s));let c=(e,t)=>oe(e,t,a,o),l=null;for(let e=0;e<n;++e){let e=te(c,j(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)F(e.x,s);return d}function le(e,t){let n=t&&t.lossFunction?t.lossFunction:z,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+re>=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 l(e,t){r[t].x=e.x,r[t].y=e.y,s[t]=!0}l({x:0,y:0},a[0].set);for(let t=1;t<a.length;++t){let s=a[t].set,d=i[s].filter(c),f=r[s];if(d.sort(o),d.length===0)throw`ERROR: missing pairwise overlap information`;let p=[];for(var u=0;u<d.length;++u){let e=r[d[u].set],t=R(f.radius,e.radius,d[u].size);p.push({x:e.x+t,y:e.y}),p.push({x:e.x-t,y:e.y}),p.push({y:e.y+t,x:e.x}),p.push({y:e.y-t,x:e.x});for(let n=u+1;n<d.length;++n){let i=r[d[n].set],a=R(f.radius,i.radius,d[n].size),o=O({x:e.x,y:e.y,radius:t},{x:i.x,y:i.y,radius:a});p.push(...o)}}let m=1e50,h=p[0];for(let t of p){r[s].x=t.x,r[s].y=t.y;let i=n(r,e);i<m&&(m=i,h=t)}l(h,s)}return r}function z(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=D(n.radius,i.radius,E(n,i))}else t=S(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ue(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=D(n.radius,i.radius,E(n,i))}else t=S(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function de(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&&E(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 fe(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;E(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 B(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 pe(e,t,n){t??=Math.PI/2;let r=ge(e).map(e=>Object.assign({},e)),i=fe(r);for(let e of i){de(e,t,n);let r=B(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=B(r);return he(r)}function me(e,t,n,r,i){let a=ge(e);t-=2*r,n-=2*r;let{xRange:o,yRange:s}=B(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 he(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 he(e){let t={};for(let n of e)t[n.setid]=n;return t}function ge(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function _e(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=ne,x=z;function S(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 S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=pe(e,o,f)),S=me(e,n,r,i,c),C=be(S,_,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([S]).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]]=Se(t))});function k(e){return t=>we(e.sets.map(e=>{let i=D[e],a=S[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 F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>we(e.sets.map(e=>S[e])),m);let I=F.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 I?I.on(`end`,V(S,T)):I.each(`end`,V(S,T)):I.each(V(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let ee=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),ee.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e===`default`?z:e===`logRatio`?ue:e,S):x},S}function V(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 H(e,t,n){let r=t[0].radius-E(t[0],e);for(let n=1;n<t.length;++n){let i=t[n].radius-E(t[n],e);i<=r&&(r=i)}for(let t=0;t<n.length;++t){let i=E(n[t],e)-n[t].radius;i<=r&&(r=i)}return r}function ve(e,t,n){let r=[];for(let t of e)r.push({x:t.x,y:t.y}),r.push({x:t.x+t.radius/2,y:t.y}),r.push({x:t.x-t.radius/2,y:t.y}),r.push({x:t.x,y:t.y+t.radius/2}),r.push({x:t.x,y:t.y-t.radius/2});let i=r[0],a=H(r[0],e,t);for(let n=1;n<r.length;++n){let o=H(r[n],e,t);o>=a&&(i=r[n],a=o)}let o=L(n=>-1*H({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(E(s,t)>t.radius){c=!1;break}for(let e of t)if(E(s,e)<e.radius){c=!1;break}if(c)return s;if(e.length==1)return{x:e[0].x,y:e[0].y};let l={};return S(e,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:t.length?ve(e,[]):k(l.arcs.map(e=>e.p1))}function ye(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],s=e[r],c=E(a,s);c+s.radius<=a.radius+1e-10?t[r].push(i):c+a.radius<=s.radius+1e-10&&t[i].push(r)}}return t}function be(e,t,n){let r={},i=ye(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=ve(l,u,n);r[o]=d,d.disjoint&&t[a].size>0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function xe(e,t,n){let r=[];return r.push(`
|
|
1
|
+
import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-C7FmC3Cl.mjs";import{p as n}from"./src-BuBt_xnY.mjs";import{H as r,K as i,U as a,a as o,b as s,c,et as l,f as u,nt as d,rt as f,tt as p,v as m,w as h,y as g}from"./chunk-WYO6CB5R-Cg1RXhAT.mjs";import{i as _}from"./chunk-ICXQ74PX-CewdqzeE.mjs";import{t as v}from"./chunk-VAUOI2AC-Ds6ZNp2p.mjs";import{t as y}from"./rough.cjs-LxmwwhvT.mjs";const b=(e,t)=>d(e,`a`,-t),x=1e-10;function S(e,t){let n=w(e),r=n.filter(t=>C(t,e)),i=0,a=0,o=[];if(r.length>1){let t=k(r);for(let e=0;e<r.length;++e){let n=r[e];n.angle=Math.atan2(n.x-t.x,n.y-t.y)}r.sort((e,t)=>t.angle-e.angle);let n=r[r.length-1];for(let t=0;t<r.length;++t){let s=r[t];a+=(n.x+s.x)*(s.y-n.y);let c={x:(s.x+n.x)/2,y:(s.y+n.y)/2},l=null;for(let t=0;t<s.parentIndex.length;++t)if(n.parentIndex.includes(s.parentIndex[t])){let r=e[s.parentIndex[t]],i=Math.atan2(s.x-r.x,s.y-r.y),a=Math.atan2(n.x-r.x,n.y-r.y),o=a-i;o<0&&(o+=2*Math.PI);let u=a-o/2,d=E(c,{x:r.x+r.radius*Math.sin(u),y:r.y+r.radius*Math.cos(u)});d>r.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=T(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;n<e.length;++n)e[n].radius<t.radius&&(t=e[n]);let n=!1;for(let r=0;r<e.length;++r)if(E(e[r],t)>Math.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-x,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function C(e,t){return t.every(t=>E(e,t)<t.radius+x)}function w(e){let t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){let i=O(e[n],e[r]);for(let e of i)e.parentIndex=[n,r],t.push(e)}return t}function T(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function E(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function D(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 T(e,r)+T(t,i)}function O(e,t){let n=E(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),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function k(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 A(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 j(e){let t=Array(e);for(let n=0;n<e;++n)t[n]=0;return t}function M(e,t){return j(e).map(()=>j(t))}function N(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function P(e){return Math.sqrt(N(e,e))}function F(e,t,n){for(let r=0;r<t.length;++r)e[r]=t[r]*n}function I(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function L(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,_=t.slice(),v=t.slice(),y=t.slice(),b=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){_[e]=0;for(let t=0;t<p;++t)_[e]+=m[t][e];_[e]/=p}let t=m[p];if(I(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)I(b,1+l,_,-l,t),b.fx=e(b),b.fx<v.fx?h(b):h(v);else if(v.fx>=m[p-1].fx){let n=!1;if(v.fx>t.fx?(I(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(I(y,1-u*c,_,u*c,t),y.fx=e(y),y.fx<v.fx?h(y):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)I(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(v)}return m.sort(g),{fx:m[0].fx,x:m[0]}}function ee(e,t,n,r,i,a,o){let s=n.fx,c=N(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 m=0;m<16;++m)if(i=(u+f)/2,I(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=N(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 m=0;m<10;++m){if(I(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=N(r.fxprime,t),l>s+a*i*c||m&&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 te(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(),F(o,r.fxprime,-1);for(let t=0;t<l;++t){if(c=ee(e,o,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),!c)F(o,r.fxprime,-1);else{I(a,1,i.fxprime,-1,r.fxprime);let e=N(r.fxprime,r.fxprime),t=Math.max(0,N(a,i.fxprime)/e);I(o,t,o,-1,i.fxprime),s=r,r=i,i=s}if(P(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 ne(e,t={}){t.maxIterations=t.maxIterations||500;let n=t.initialLayout||se,r=t.lossFunction||z,i=ie(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=L(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}const re=1e-10;function R(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+re?Math.abs(e-t):A(r=>D(e,t,r)-n,0,e+t)}function ie(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 ae(e,t,n){let r=M(t.length,t.length),i=M(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=R(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 oe(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 se(e,t={}){let n=le(e,t),r=t.lossFunction||z;if(e.length>=8){let i=ce(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function ce(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}=ae(e,r,i),s=P(a.map(P))/a.length;a=a.map(e=>e.map(e=>e/s));let c=(e,t)=>oe(e,t,a,o),l=null;for(let e=0;e<n;++e){let e=te(c,j(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)F(e.x,s);return d}function le(e,t){let n=t&&t.lossFunction?t.lossFunction:z,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+re>=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 l(e,t){r[t].x=e.x,r[t].y=e.y,s[t]=!0}l({x:0,y:0},a[0].set);for(let t=1;t<a.length;++t){let s=a[t].set,d=i[s].filter(c),f=r[s];if(d.sort(o),d.length===0)throw`ERROR: missing pairwise overlap information`;let p=[];for(var u=0;u<d.length;++u){let e=r[d[u].set],t=R(f.radius,e.radius,d[u].size);p.push({x:e.x+t,y:e.y}),p.push({x:e.x-t,y:e.y}),p.push({y:e.y+t,x:e.x}),p.push({y:e.y-t,x:e.x});for(let n=u+1;n<d.length;++n){let i=r[d[n].set],a=R(f.radius,i.radius,d[n].size),o=O({x:e.x,y:e.y,radius:t},{x:i.x,y:i.y,radius:a});p.push(...o)}}let m=1e50,h=p[0];for(let t of p){r[s].x=t.x,r[s].y=t.y;let i=n(r,e);i<m&&(m=i,h=t)}l(h,s)}return r}function z(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=D(n.radius,i.radius,E(n,i))}else t=S(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ue(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=D(n.radius,i.radius,E(n,i))}else t=S(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function de(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&&E(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 fe(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;E(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 B(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 pe(e,t,n){t??=Math.PI/2;let r=ge(e).map(e=>Object.assign({},e)),i=fe(r);for(let e of i){de(e,t,n);let r=B(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=B(r);return he(r)}function me(e,t,n,r,i){let a=ge(e);t-=2*r,n-=2*r;let{xRange:o,yRange:s}=B(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 he(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 he(e){let t={};for(let n of e)t[n.setid]=n;return t}function ge(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function _e(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=ne,x=z;function S(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 S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=pe(e,o,f)),S=me(e,n,r,i,c),C=be(S,_,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([S]).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]]=Se(t))});function k(e){return t=>we(e.sets.map(e=>{let i=D[e],a=S[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 F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>we(e.sets.map(e=>S[e])),m);let I=F.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 I?I.on(`end`,V(S,T)):I.each(`end`,V(S,T)):I.each(V(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let ee=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),ee.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e===`default`?z:e===`logRatio`?ue:e,S):x},S}function V(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 H(e,t,n){let r=t[0].radius-E(t[0],e);for(let n=1;n<t.length;++n){let i=t[n].radius-E(t[n],e);i<=r&&(r=i)}for(let t=0;t<n.length;++t){let i=E(n[t],e)-n[t].radius;i<=r&&(r=i)}return r}function ve(e,t,n){let r=[];for(let t of e)r.push({x:t.x,y:t.y}),r.push({x:t.x+t.radius/2,y:t.y}),r.push({x:t.x-t.radius/2,y:t.y}),r.push({x:t.x,y:t.y+t.radius/2}),r.push({x:t.x,y:t.y-t.radius/2});let i=r[0],a=H(r[0],e,t);for(let n=1;n<r.length;++n){let o=H(r[n],e,t);o>=a&&(i=r[n],a=o)}let o=L(n=>-1*H({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(E(s,t)>t.radius){c=!1;break}for(let e of t)if(E(s,e)<e.radius){c=!1;break}if(c)return s;if(e.length==1)return{x:e[0].x,y:e[0].y};let l={};return S(e,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:t.length?ve(e,[]):k(l.arcs.map(e=>e.p1))}function ye(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],s=e[r],c=E(a,s);c+s.radius<=a.radius+1e-10?t[r].push(i):c+a.radius<=s.radius+1e-10&&t[i].push(r)}}return t}function be(e,t,n){let r={},i=ye(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=ve(l,u,n);r[o]=d,d.disjoint&&t[a].size>0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function xe(e,t,n){let r=[];return r.push(`
|
|
2
2
|
M`,e,t),r.push(`
|
|
3
3
|
m`,-n,0),r.push(`
|
|
4
4
|
a`,n,n,0,1,0,n*2,0),r.push(`
|
|
@@ -32,4 +32,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
|
|
|
32
32
|
color: ${e.vennSetTextColor};
|
|
33
33
|
}
|
|
34
34
|
`,`getStyles`);function Ue(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}t(Ue,`buildStyleByKey`);var We=t((e,t,r,i)=>{let a=i.db,o=a.getConfig?.(),{themeVariables:u,look:d,handDrawnSeed:m}=s(),h=d===`handDrawn`,g=[u.venn1,u.venn2,u.venn3,u.venn4,u.venn5,u.venn6,u.venn7,u.venn8].filter(Boolean),_=a.getDiagramTitle?.(),y=a.getSubsetData(),x=a.getTextData(),S=Ue(a.getStyleData()),C=Ke(y),w=o?.width??800,T=o?.height??450,E=w/1600,D=_?48*E:0,O=u.primaryTextColor??u.textColor,k=v(t);k.attr(`viewBox`,`0 0 ${w} ${T}`),_&&k.append(`text`).text(_).attr(`class`,`venn-title`).attr(`font-size`,`${32*E}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*E).style(`fill`,u.vennTitleTextColor||u.titleColor);let A=n(document.createElement(`div`)),j=_e().width(w).height(T-D);A.datum(C).call(j);let M=h?Ee.default.svg(A.select(`svg`).node()):void 0,N=Te(C,{width:w,height:T-D,padding:o?.padding??15}),P=new Map;for(let e of N){let t=$([...e.data.sets].sort());P.set(t,e)}x.length>0&&Ge(o,P,A,x,E,S);let F=f(u.background||`#f4f4f4`);A.selectAll(`.venn-circle`).each(function(e,t){let r=n(this),i=$([...e.sets].sort()),a=S.get(i),o=a?.fill||g[t%g.length]||u.primaryColor;r.classed(`venn-set-${t%8}`,!0);let s=a?.[`fill-opacity`]??.1,c=a?.stroke||o,d=a?.[`stroke-width`]||`${5*E}`;if(h&&M){let e=P.get(i);if(e&&e.circles.length>0){let n=e.circles[0],i=M.circle(n.x,n.y,n.radius*2,{roughness:.7,seed:m,fill:b(o,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+t*60,stroke:c,strokeWidth:parseFloat(String(d))});r.select(`path`).remove(),r.node()?.insertBefore(i,r.select(`text`).node())}}else r.select(`path`).style(`fill`,o).style(`fill-opacity`,s).style(`stroke`,c).style(`stroke-width`,d).style(`stroke-opacity`,.95);let f=a?.color||(F?p(o,30):l(o,30));r.select(`text`).style(`font-size`,`${48*E}px`).style(`fill`,f)}),h&&M?A.selectAll(`.venn-intersection`).each(function(e){let t=n(this),r=$([...e.sets].sort()),i=S.get(r),a=i?.fill;if(a){let e=t.select(`path`),n=e.attr(`d`);if(n){let t=M.path(n,{roughness:.7,seed:m,fill:b(a,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r?.parentNode?.insertBefore(t,r),e.remove()}}else t.select(`path`).style(`fill-opacity`,0);t.select(`text`).style(`font-size`,`${48*E}px`).style(`fill`,i?.color??u.vennSetTextColor??O)}):(A.selectAll(`.venn-intersection text`).style(`font-size`,`${48*E}px`).style(`fill`,e=>{let t=$([...e.sets].sort());return S.get(t)?.color??u.vennSetTextColor??O}),A.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{let t=$([...e.sets].sort());return+!!S.get(t)?.fill}).style(`fill`,e=>{let t=$([...e.sets].sort());return S.get(t)?.fill??`transparent`}));let I=k.append(`g`).attr(`transform`,`translate(0, ${D})`),L=A.select(`svg`).node();if(L&&`childNodes`in L)for(let e of[...L.childNodes])I.node()?.appendChild(e);c(k,T,w,o?.useMaxWidth??!0)},`draw`);function $(e){return e.join(`|`)}t($,`stableSetsKey`);function Ge(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=$(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)}}}t(Ge,`renderTextNodes`);function Ke(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}t(Ke,`ensurePairwiseSubsets`);var qe={parser:De,db:Ve,renderer:{draw:We},styles:He};export{qe as diagram};
|
|
35
|
-
//# sourceMappingURL=vennDiagram-L72KCM5P-
|
|
35
|
+
//# sourceMappingURL=vennDiagram-L72KCM5P-CGoW4QcS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-KEIR6QF5-BhaMJNB5.mjs";import{n as e}from"./chunk-5FCAYU7R-of7BBDNL.mjs";export{e as createWardleyServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-C7FmC3Cl.mjs";import{m as t}from"./src-BuBt_xnY.mjs";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-WYO6CB5R-Cg1RXhAT.mjs";import{i as p}from"./chunk-ICXQ74PX-CewdqzeE.mjs";import{t as m}from"./chunk-VAUOI2AC-Ds6ZNp2p.mjs";import{t as h}from"./chunk-JWPE2WC7-cMhWwV9I.mjs";import{n as g}from"./mermaid-parser.core-DejmtVwC.mjs";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
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=`
|
|
3
3
|
M ${n} ${r-30/2}
|
|
4
4
|
L ${n+60-20} ${r-30/2}
|
|
@@ -76,4 +76,4 @@ import{n as e}from"./chunk-Y2CYZVJY-D-AxePDr.mjs";import{m as t}from"./src-nvx4L
|
|
|
76
76
|
fill: ${t.axisTextColor};
|
|
77
77
|
}
|
|
78
78
|
`},`styles`)};export{G as diagram};
|
|
79
|
-
//# sourceMappingURL=wardleyDiagram-EHGQE667-
|
|
79
|
+
//# sourceMappingURL=wardleyDiagram-EHGQE667-DHS8jBWZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-GXVXFKBA-CGc4vqMu.mjs";export{e as wcCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-A65PWWJC-LctFeUxK.mjs";export{e as whichCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-HJQJAYMS-SgZmT_QE.mjs";export{e as whoami};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Ao as r,Bo as i,Wo as a,zo as o}from"./src-Bnk118Ag.mjs";import{Er as s,
|
|
1
|
+
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Ao as r,Bo as i,Wo as a,zo as o}from"./src-Bnk118Ag.mjs";import{Er as s,or as c}from"./src-C9LMhuL4.mjs";import{basename as l,dirname as u,isAbsolute as d,join as f,posix as p,relative as m,resolve as h,sep as g,win32 as _}from"node:path";import{cpSync as ee,existsSync as v,lstatSync as te,mkdirSync as ne,readFileSync as re,realpathSync as y,rmSync as b,statSync as x}from"node:fs";import{homedir as S}from"node:os";var C=n((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),w=n((e=>{let{InvalidArgumentError:t}=C();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),T=n((e=>{let{humanReadableArgName:t}=w();var n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
|
|
2
2
|
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
3
3
|
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
4
|
-
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),
|
|
4
|
+
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),E=n((e=>{let{InvalidArgumentError:t}=C();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r===void 0?!1:r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
5
5
|
- a short flag is a single dash and a single character
|
|
6
6
|
- either use a single dash and a single character (for a short flag)
|
|
7
7
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(t)?Error(`${n}
|
|
8
8
|
- too many short flags`):i.test(t)?Error(`${n}
|
|
9
9
|
- too many long flags`):Error(`${n}
|
|
10
|
-
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),
|
|
10
|
+
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),ie=n((e=>{function t(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a=1;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function n(e,n){if(!n||n.length===0)return``;n=Array.from(new Set(n));let r=e.startsWith(`--`);r&&(e=e.slice(2),n=n.map(e=>e.slice(2)));let i=[],a=3;return n.forEach(n=>{if(n.length<=1)return;let r=t(e,n),o=Math.max(e.length,n.length);(o-r)/o>.4&&(r<a?(a=r,i=[n]):r===a&&i.push(n))}),i.sort((e,t)=>e.localeCompare(t)),r&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(`, `)}?)`:i.length===1?`\n(Did you mean ${i[0]}?)`:``}e.suggestSimilar=n})),ae=n((t=>{let n=e(`node:events`).EventEmitter,r=e(`node:child_process`),i=e(`node:path`),a=e(`node:fs`),o=e(`node:process`),{Argument:s,humanReadableArgName:c}=w(),{CommanderError:l}=C(),{Help:u,stripColor:d}=T(),{Option:f,DualOptions:p}=E(),{suggestSimilar:m}=ie();var h=class e extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>o.stdout.write(e),writeErr:e=>o.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>o.stdout.isTTY?o.stdout.columns:void 0,getErrHelpWidth:()=>o.stderr.isTTY?o.stderr.columns:void 0,getOutHasColors:()=>_()??(o.stdout.isTTY&&o.stdout.hasColors?.()),getErrHasColors:()=>_()??(o.stderr.isTTY&&o.stderr.hasColors?.()),stripColor:e=>d(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
|
|
11
11
|
- specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new s(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
|
|
12
12
|
Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new l(e,t,n)),o.exit(e)}action(e){let t=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new f(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
13
13
|
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,`default`)}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{r(t,`error: option '${e.flags}' argument '${t}' is invalid.`,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{r(t,`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof f)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){o.versions?.electron&&(t.from=`electron`);let e=o.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=o.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:o.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
@@ -16,7 +16,7 @@ Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
16
16
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
17
17
|
- ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function c(e,t){let n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;let r=s.find(e=>a.existsSync(`${n}${e}`));if(r)return`${n}${r}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u));let f;o.platform===`win32`?(this._checkForMissingExecutable(u,d,e._name),t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.execPath,t,{stdio:`inherit`})):n?(t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.argv[0],t,{stdio:`inherit`})):f=r.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{o.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e??=1,p?p(new l(e,`commander.executeSubCommandAsync`,`(close)`)):o.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(u,d,e._name);else if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)o.exit(1);else{let e=new l(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)===void 0?!1:this.getOptionValueSource(t)!==`default`});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}else if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
18
18
|
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in o.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new p(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=m(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>c(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(o.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
19
|
-
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function g(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function _(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}t.Command=h,t.useColor=_}));const{program:
|
|
19
|
+
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function g(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function _(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}t.Command=h,t.useColor=_}));const{program:oe,createCommand:se,createArgument:ce,createOption:le,CommanderError:ue,InvalidArgumentError:D,InvalidOptionArgumentError:de,Command:fe,Argument:pe,Option:me,Help:he}=t(n((e=>{let{Argument:t}=w(),{Command:n}=ae(),{CommanderError:r,InvalidArgumentError:i}=C(),{Help:a}=T(),{Option:o}=E();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default,O=o,k=i,ge=a,A=`node`,j={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`},M=`# ok-mcp-v2
|
|
20
20
|
USER_BUNDLE="$HOME/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
21
21
|
[ -f "$USER_BUNDLE" ] && [ -x "$USER_BUNDLE" ] && exec "$USER_BUNDLE" mcp
|
|
22
22
|
BUNDLE="/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
@@ -28,7 +28,7 @@ for d in "$HOME/.nvm/versions/node"/*/bin "$HOME/.fnm/node-versions"/*/installat
|
|
|
28
28
|
[ -f "$d/npx" ] && [ -x "$d/npx" ] && exec "$d/npx" -y @inkeep/open-knowledge@latest mcp
|
|
29
29
|
done
|
|
30
30
|
echo "OpenKnowledge: install OK Desktop or Node.js 24+, then restart your editor" >&2
|
|
31
|
-
exit 127`,
|
|
31
|
+
exit 127`,N=`# ok-mcp-win-v1
|
|
32
32
|
if ($env:PATHEXT -notmatch 'CMD') { $env:PATHEXT = '.COM;.EXE;.BAT;.CMD;' + $env:PATHEXT }
|
|
33
33
|
if ($env:APPDATA) {
|
|
34
34
|
$shim = Join-Path $env:APPDATA 'npm\\ok.cmd'
|
|
@@ -52,5 +52,5 @@ foreach ($d in $dirs) {
|
|
|
52
52
|
if (Test-Path -LiteralPath $probe -PathType Leaf) { & $probe -y '@inkeep/open-knowledge@latest' mcp; exit $LASTEXITCODE }
|
|
53
53
|
}
|
|
54
54
|
[Console]::Error.WriteLine('OpenKnowledge: install Node.js 24+ (npm i -g @inkeep/open-knowledge), then restart your editor')
|
|
55
|
-
exit 127`,I=`// ok-pi-bridge`,L=`${I}-v1`,ye=`ok-pi-managed-extension`;function be(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command===`/bin/sh`){if(!Array.isArray(t.args)||t.args[0]!==`-l`||t.args[1]!==`-c`)return!1;let e=t.args[2];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command===`powershell`){if(!Array.isArray(t.args)||t.args[0]!==`-NoProfile`||t.args[1]!==`-NonInteractive`||t.args[2]!==`-Command`)return!1;let e=t.args[3];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}if(t.type===`local`&&Array.isArray(t.command)){if(t.command[0]===`/bin/sh`){if(t.command[1]!==`-l`||t.command[2]!==`-c`)return!1;let e=t.command[3];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command[0]===`powershell`){if(t.command[1]!==`-NoProfile`||t.command[2]!==`-NonInteractive`||t.command[3]!==`-Command`)return!1;let e=t.command[4];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}return!1}if(t.command===`ok-pi-managed-extension`){if(!Array.isArray(t.args))return!1;let e=t.args[0];return typeof e==`string`&&e.startsWith(L)}return!1}function R(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=_(e);if(d(t)===`cli.mjs`&&d(f(t))===`dist`)return t;let n=t.split(v),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return m(i.length===0?v:i.join(v),`packages`,`cli`,`dist`,`cli.mjs`)}function z(e={}){return e.mode===`dev`?{command:M,args:[R(),`mcp`],env:{...N}}:(e.platformName??process.platform)===`win32`?{command:`powershell`,args:[`-NoProfile`,`-NonInteractive`,`-Command`,F]}:{command:`/bin/sh`,args:[`-l`,`-c`,P]}}function xe(e={}){return e.mode===`dev`?{type:`local`,enabled:!0,command:[M,R(),`mcp`],environment:{...N}}:(e.platformName??process.platform)===`win32`?{type:`local`,enabled:!0,command:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,F]}:{type:`local`,enabled:!0,command:[`/bin/sh`,`-l`,`-c`,P]}}function Se(e){if(typeof e!=`object`||!e)return!1;let t=e;return B(t,z({mode:`published`,platformName:`darwin`}))||B(t,z({mode:`published`,platformName:`win32`}))}function B(e,t){return Object.keys(e).length===Object.keys(t).length?Ce(e,t):!1}function Ce(e,t){if(e.command!==t.command)return!1;let n=t.args;return!Array.isArray(n)||!Array.isArray(e.args)||e.args.length!==n.length?!1:e.args.every((e,t)=>e===n[t])}function V(e,t){let n=e=>typeof e==`string`&&e.includes(`# ok-mcp`);return t===`/bin/sh`?e[0]===`-l`&&e[1]===`-c`&&n(e[2]):t===`powershell`?e[0]===`-NoProfile`&&e[1]===`-NonInteractive`&&e[2]===`-Command`&&n(e[3]):!1}function we(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.enabled===!1||typeof t.command!=`string`||!Array.isArray(t.args)?!1:V(t.args,t.command)}function Te(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`local`||t.enabled===!1||!Array.isArray(t.command))return!1;let[n,...r]=t.command;return typeof n==`string`&&V(r,n)}function H(e){return e===`win32`?y:h}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??w(),r=e.env??process.env,i=H(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??w();return H(t).join(n,`.claude.json`)}function U(e={}){let t=e.platformName??process.platform,n=e.home??w(),r=e.env??process.env;if(t===`darwin`)return h.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??y.join(n,`AppData`,`Roaming`);return y.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??w();return H(t).join(n,`.cursor`,`mcp.json`)}function Oe(e={}){let t=e.platformName??process.platform,n=e.home??w();return(e.env??process.env).CODEX_HOME??H(t).join(n,`.codex`)}function ke(e={}){return H(e.platformName??process.platform).join(Oe(e),`config.toml`)}function G(e={}){let t=e.platformName??process.platform,n=e.home??w(),r=(e.env??process.env).COPILOT_HOME??H(t).join(n,`.copilot`);return H(t).join(r,`mcp-config.json`)}function Ae(e={}){let t=e.platformName??process.platform,n=e.home??w(),r=e.env??process.env,i=H(t);if(t===`win32`){let e=r.APPDATA??i.join(n,`AppData`,`Roaming`);return i.join(e,`opencode`)}let a=r.XDG_CONFIG_HOME??i.join(n,`.config`);return i.join(a,`opencode`)}function K(e={}){return H(e.platformName??process.platform).join(Ae(e),`opencode.json`)}function je(e={}){let t=e.platformName??process.platform,n=e.home??w();return H(t).join(n,`.openclaw`,`openclaw.json`)}function Me(e={}){let t=e.platformName??process.platform,n=e.home??w();return H(t).join(n,`.hermes`,`config.yaml`)}function Ne(e={}){let t=e.platformName??process.platform,n=e.home??w();return(e.env??process.env).PI_CODING_AGENT_DIR??H(t).join(n,`.pi`,`agent`)}function Pe(e={}){let t=e.platformName??process.platform,n=e.home??w();return H(t).join(n,`.gemini`,`config`,`mcp_config.json`)}function Fe(e,t){let n=H(t),r=n.join(e,`.lmstudio`,`mcp.json`),i=n.join(e,`.cache`,`lm-studio`,`mcp.json`);return t===`darwin`?[i,r]:[r,i]}function q(e={}){let t=e.platformName??process.platform,n=Fe(e.home??w(),t);return n.find(e=>b(e))||n.find(e=>b(f(e)))||n[0]}function Ie(e){let t=e.serverName(``);return e.format===`toml`?`[${e.topLevelKey}.${t}]`:[e.topLevelKey,e.serverMapSubKey,t].filter(Boolean).join(`.`)}function Le(e,t){let n;try{n=e.configPath(``,t)}catch{return null}return n.startsWith(`${t}/`)?`~${n.slice(t.length)}`:n}const J={claude:{id:`claude`,label:A.claude,configPath:(e,t)=>De({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>m(t??w(),`.claude`),projectConfigPath:e=>m(e,`.mcp.json`),projectSkillPath:e=>m(e,`.claude`,`skills`,`open-knowledge`,`SKILL.md`)},"claude-desktop":{id:`claude-desktop`,label:A[`claude-desktop`],configPath:(e,t)=>U({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(U({home:t}))},cursor:{id:`cursor`,label:A.cursor,configPath:(e,t)=>W({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(W({home:t})),projectConfigPath:e=>m(e,`.cursor`,`mcp.json`),projectSkillPath:e=>m(e,`.cursor`,`skills`,`open-knowledge`,`SKILL.md`)},codex:{id:`codex`,label:A.codex,configPath:(e,t)=>ke({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(ke({home:t})),projectConfigPath:e=>m(e,`.codex`,`config.toml`),projectSkillPath:e=>m(e,`.codex`,`skills`,`open-knowledge`,`SKILL.md`)},copilot:{id:`copilot`,label:A.copilot,configPath:(e,t)=>G({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(G({home:t})),projectSkillPath:e=>m(e,`.github`,`skills`,`open-knowledge`,`SKILL.md`)},opencode:{id:`opencode`,label:A.opencode,configPath:(e,t)=>K({home:t}),format:`json`,topLevelKey:`mcp`,serverName:()=>r,buildEntry:(e,t)=>xe(t),scope:`global`,detectPath:(e,t)=>f(K({home:t})),projectConfigPath:e=>m(e,`opencode.json`),projectSkillPath:e=>m(e,`.opencode`,`skills`,`open-knowledge`,`SKILL.md`)},openclaw:{id:`openclaw`,label:A.openclaw,configPath:(e,t)=>je({home:t}),format:`json`,topLevelKey:`mcp`,serverMapSubKey:`servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>m(t??w(),`.openclaw`),offerOnlyWhenDetected:!0},pi:{id:`pi`,label:A.pi,configPath:()=>{throw Error("Pi has no user-global MCP config; OK's integration is the project-scoped bridge extension at .pi/extensions/open-knowledge.ts (run `ok init` in the project).")},format:`file`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:()=>{throw Error(`Pi has no MCP entry shape; the managed bridge file is built by buildPiExtensionSource (integrations/pi-extension.ts).`)},scope:`project`,detectPath:(e,t)=>Ne({home:t}),projectConfigPath:e=>m(e,`.pi`,`extensions`,`open-knowledge.ts`),projectSkillPath:e=>m(e,`.pi`,`skills`,`open-knowledge`,`SKILL.md`)},antigravity:{id:`antigravity`,label:A.antigravity,configPath:(e,t)=>Pe({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>m(t??w(),`.gemini`),offerOnlyWhenDetected:!0},"lm-studio":{id:`lm-studio`,label:A[`lm-studio`],configPath:(e,t)=>q({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(q({home:t})),offerOnlyWhenDetected:!0},hermes:{id:`hermes`,label:A.hermes,configPath:(e,t)=>Me({home:t}),format:`yaml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>m(t??w(),`.hermes`),offerOnlyWhenDetected:!0}};function Re(e){let t=e.filter(e=>!Object.hasOwn(J,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${k.join(`, `)}`);return e.map(e=>J[e])}const Y=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],X=[...c.map(e=>u[e]),`open-knowledge`];function Z(e){if(!p(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=_(e);if(t===v||f(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function Q(e,t){let n=g(e,t);if(n.startsWith(`..`)||p(n))return!1;let r=e;for(let e of n.split(v)){r=m(r,e);try{if(!x(r).isDirectory())return!1}catch{return!1}}return!0}function ze(e,t){try{return re(e).every(n=>t.has(m(e,n)))}catch{return!1}}function Be(e){let t=Z(e),n=[],r=[],i=new Set;for(let e of Y){let a=m(t,e.hostDir,`skills`);if(!Q(t,a))continue;let o=X.map(e=>m(a,e)).filter(e=>b(e));n.push(...o);for(let e of o)i.add(e);let s=m(t,e.pruneRoot),c=a;for(;ze(c,i)&&(r.push(c),i.add(c),c!==s);){let e=f(c);if(e===c||e===t||!e.startsWith(t+v))break;c=e}}return{skillDirs:n,emptyDirs:r}}function Ve(e){try{if(!x(e).isDirectory())return!1;let t=re(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function He(e){let t=new Set,n=new Set;for(let r of Y){let i=m(e,r.hostDir,`skills`);for(let e of X)t.add(m(i,e));let a=m(e,r.pruneRoot),o=i;for(;n.add(o),o!==a;){let t=f(o);if(t===o||t===e||!t.startsWith(e+v))break;o=t}}return{skillDirs:t,emptyDirs:n}}function Ue(e,t){let n=Z(e),r=He(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(Q(n,e)&&Ve(e))try{C(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(Q(n,e))try{ie(e),a.push(e)}catch{}return a}function We(e){let t=Z(e),n=[];for(let e of c){let r=u[e];n.push({path:m(t,`.agents`,`skills`,r),bundleId:e,scope:`central`});for(let i of j)n.push({path:m(t,i.hostDir,`skills`,r),bundleId:e,scope:`host`,hostDir:i.hostDir})}return n}function Ge(e,t){let n=[];for(let r of We(e))if(r.bundleId===t)try{C(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}function Ke(e,t){let n;try{n=x(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(n?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);Je(e,t)}function qe(e,t){Je(e,t)}function Je(e,t){let n;try{n=S(t)}catch{n=_(t)}let r=f(e);for(;r.length>1&&r!==v;){let t;try{t=S(r)}catch(e){if(e.code===`ENOENT`){r=f(r);continue}throw e}let i=g(n,t);if(i===``||!i.startsWith(`..`)&&!p(i))return;throw Error(`Refusing to write at ${e}: ancestor ${r} resolves to ${t}, which is outside the project directory ${n}. A symbolic link in the path likely escapes the project. Remove the symlink and re-run project setup.`)}}function $(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ye(e,t,n){try{if(ae(n).size>10485760)return!1}catch{return!1}let r;try{r=ne(n,`utf-8`)}catch{return!1}let i=[],a=s(r.charCodeAt(0)===65279?r.slice(1):r,i,{allowTrailingComma:!0,disallowComments:!1});if(i.length>0||!$(a))return!1;let o=a[e.topLevelKey];if(!$(o))return!1;let c=e.serverMapSubKey?o[e.serverMapSubKey]:o;return $(c)?$(c[e.serverName(t)]):!1}function Xe(e,t,n={}){if(e.id!==`copilot`)return!0;try{return Ye(e,t,e.configPath(t,n.home))}catch{return!1}}function Ze(e,t,n={}){let r=e.projectSkillPath?.(t);if(!r)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};if(!Xe(e,t,n))return{editorId:e.id,label:e.label,action:`skipped-prerequisite`,path:r};try{let n=l(`project`,{checkDesktop:!0}),i=f(r);Ke(i,t);let a=b(r)?`overwritten`:`written`;return C(i,{recursive:!0,force:!0}),te(f(i),{recursive:!0}),ee(n,i,{recursive:!0}),{editorId:e.id,label:e.label,action:a,path:r}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}function Qe(e,t){let n=e.projectSkillPath?.(t);if(!n)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};try{let r=f(n);return b(n)?(qe(r,t),C(r,{recursive:!0,force:!0}),{editorId:e.id,label:e.label,action:`removed`,path:n}):{editorId:e.id,label:e.label,action:`not-present`,path:n}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}export{Ee as C,_e as D,pe as E,Te as S,he as T,Le as _,Ue as a,be as b,We as c,J as d,j as f,z as g,ye as h,Ze as i,k as l,L as m,qe as n,Be as o,I as p,Qe as r,Ge as s,Ke as t,A as u,Ie as v,Re as w,Se as x,we as y};
|
|
56
|
-
//# sourceMappingURL=write-project-skill-
|
|
55
|
+
exit 127`,P=`// ok-pi-bridge`,F=`${P}-v1`,I=`ok-pi-managed-extension`;function L(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command===`/bin/sh`){if(!Array.isArray(t.args)||t.args[0]!==`-l`||t.args[1]!==`-c`)return!1;let e=t.args[2];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command===`powershell`){if(!Array.isArray(t.args)||t.args[0]!==`-NoProfile`||t.args[1]!==`-NonInteractive`||t.args[2]!==`-Command`)return!1;let e=t.args[3];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}if(t.type===`local`&&Array.isArray(t.command)){if(t.command[0]===`/bin/sh`){if(t.command[1]!==`-l`||t.command[2]!==`-c`)return!1;let e=t.command[3];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command[0]===`powershell`){if(t.command[1]!==`-NoProfile`||t.command[2]!==`-NonInteractive`||t.command[3]!==`-Command`)return!1;let e=t.command[4];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}return!1}if(t.command===`ok-pi-managed-extension`){if(!Array.isArray(t.args))return!1;let e=t.args[0];return typeof e==`string`&&e.startsWith(F)}return!1}function R(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=h(e);if(l(t)===`cli.mjs`&&l(u(t))===`dist`)return t;let n=t.split(g),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return f(i.length===0?g:i.join(g),`packages`,`cli`,`dist`,`cli.mjs`)}function z(e={}){return e.mode===`dev`?{command:A,args:[R(),`mcp`],env:{...j}}:(e.platformName??process.platform)===`win32`?{command:`powershell`,args:[`-NoProfile`,`-NonInteractive`,`-Command`,N]}:{command:`/bin/sh`,args:[`-l`,`-c`,M]}}function _e(e={}){return e.mode===`dev`?{type:`local`,enabled:!0,command:[A,R(),`mcp`],environment:{...j}}:(e.platformName??process.platform)===`win32`?{type:`local`,enabled:!0,command:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,N]}:{type:`local`,enabled:!0,command:[`/bin/sh`,`-l`,`-c`,M]}}function ve(e){if(typeof e!=`object`||!e)return!1;let t=e;return B(t,z({mode:`published`,platformName:`darwin`}))||B(t,z({mode:`published`,platformName:`win32`}))}function B(e,t){return Object.keys(e).length===Object.keys(t).length?ye(e,t):!1}function ye(e,t){if(e.command!==t.command)return!1;let n=t.args;return!Array.isArray(n)||!Array.isArray(e.args)||e.args.length!==n.length?!1:e.args.every((e,t)=>e===n[t])}function V(e,t){let n=e=>typeof e==`string`&&e.includes(`# ok-mcp`);return t===`/bin/sh`?e[0]===`-l`&&e[1]===`-c`&&n(e[2]):t===`powershell`?e[0]===`-NoProfile`&&e[1]===`-NonInteractive`&&e[2]===`-Command`&&n(e[3]):!1}function be(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.enabled===!1||typeof t.command!=`string`||!Array.isArray(t.args)?!1:V(t.args,t.command)}function xe(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`local`||t.enabled===!1||!Array.isArray(t.command))return!1;let[n,...r]=t.command;return typeof n==`string`&&V(r,n)}function H(e){return e===`win32`?_:p}function Se(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env,i=H(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function Ce(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.claude.json`)}function U(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env;if(t===`darwin`)return p.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??_.join(n,`AppData`,`Roaming`);return _.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.cursor`,`mcp.json`)}function we(e={}){let t=e.platformName??process.platform,n=e.home??S();return(e.env??process.env).CODEX_HOME??H(t).join(n,`.codex`)}function G(e={}){return H(e.platformName??process.platform).join(we(e),`config.toml`)}function K(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=(e.env??process.env).COPILOT_HOME??H(t).join(n,`.copilot`);return H(t).join(r,`mcp-config.json`)}function Te(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env,i=H(t);if(t===`win32`){let e=r.APPDATA??i.join(n,`AppData`,`Roaming`);return i.join(e,`opencode`)}let a=r.XDG_CONFIG_HOME??i.join(n,`.config`);return i.join(a,`opencode`)}function q(e={}){return H(e.platformName??process.platform).join(Te(e),`opencode.json`)}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.openclaw`,`openclaw.json`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.hermes`,`config.yaml`)}function Oe(e={}){let t=e.platformName??process.platform,n=e.home??S();return(e.env??process.env).PI_CODING_AGENT_DIR??H(t).join(n,`.pi`,`agent`)}function ke(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.gemini`,`config`,`mcp_config.json`)}function Ae(e,t){let n=H(t),r=n.join(e,`.lmstudio`,`mcp.json`),i=n.join(e,`.cache`,`lm-studio`,`mcp.json`);return t===`darwin`?[i,r]:[r,i]}function J(e={}){let t=e.platformName??process.platform,n=Ae(e.home??S(),t);return n.find(e=>v(e))||n.find(e=>v(u(e)))||n[0]}function je(e){let t=e.serverName(``);return e.format===`toml`?`[${e.topLevelKey}.${t}]`:[e.topLevelKey,e.serverMapSubKey,t].filter(Boolean).join(`.`)}function Me(e,t){let n;try{n=e.configPath(``,t)}catch{return null}return n.startsWith(`${t}/`)?`~${n.slice(t.length)}`:n}const Y={claude:{id:`claude`,label:k.claude,configPath:(e,t)=>Ce({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.claude`),projectConfigPath:e=>f(e,`.mcp.json`),projectSkillPath:e=>f(e,`.claude`,`skills`,`open-knowledge`,`SKILL.md`)},"claude-desktop":{id:`claude-desktop`,label:k[`claude-desktop`],configPath:(e,t)=>U({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(U({home:t}))},cursor:{id:`cursor`,label:k.cursor,configPath:(e,t)=>W({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(W({home:t})),projectConfigPath:e=>f(e,`.cursor`,`mcp.json`),projectSkillPath:e=>f(e,`.cursor`,`skills`,`open-knowledge`,`SKILL.md`)},codex:{id:`codex`,label:k.codex,configPath:(e,t)=>G({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(G({home:t})),projectConfigPath:e=>f(e,`.codex`,`config.toml`),projectSkillPath:e=>f(e,`.codex`,`skills`,`open-knowledge`,`SKILL.md`)},copilot:{id:`copilot`,label:k.copilot,configPath:(e,t)=>K({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(K({home:t})),projectSkillPath:e=>f(e,`.github`,`skills`,`open-knowledge`,`SKILL.md`)},opencode:{id:`opencode`,label:k.opencode,configPath:(e,t)=>q({home:t}),format:`json`,topLevelKey:`mcp`,serverName:()=>r,buildEntry:(e,t)=>_e(t),scope:`global`,detectPath:(e,t)=>u(q({home:t})),projectConfigPath:e=>f(e,`opencode.json`),projectSkillPath:e=>f(e,`.opencode`,`skills`,`open-knowledge`,`SKILL.md`)},openclaw:{id:`openclaw`,label:k.openclaw,configPath:(e,t)=>Ee({home:t}),format:`json`,topLevelKey:`mcp`,serverMapSubKey:`servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.openclaw`),offerOnlyWhenDetected:!0},pi:{id:`pi`,label:k.pi,configPath:()=>{throw Error("Pi has no user-global MCP config; OK's integration is the project-scoped bridge extension at .pi/extensions/open-knowledge.ts (run `ok init` in the project).")},format:`file`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:()=>{throw Error(`Pi has no MCP entry shape; the managed bridge file is built by buildPiExtensionSource (integrations/pi-extension.ts).`)},scope:`project`,detectPath:(e,t)=>Oe({home:t}),projectConfigPath:e=>f(e,`.pi`,`extensions`,`open-knowledge.ts`),projectSkillPath:e=>f(e,`.pi`,`skills`,`open-knowledge`,`SKILL.md`)},antigravity:{id:`antigravity`,label:k.antigravity,configPath:(e,t)=>ke({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.gemini`),offerOnlyWhenDetected:!0},"lm-studio":{id:`lm-studio`,label:k[`lm-studio`],configPath:(e,t)=>J({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(J({home:t})),offerOnlyWhenDetected:!0},hermes:{id:`hermes`,label:k.hermes,configPath:(e,t)=>De({home:t}),format:`yaml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.hermes`),offerOnlyWhenDetected:!0}};function Ne(e){let t=e.filter(e=>!Object.hasOwn(Y,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${O.join(`, `)}`);return e.map(e=>Y[e])}function X(e,t){let n;try{n=te(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(n?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);Q(e,t)}function Z(e,t){Q(e,t)}function Q(e,t){let n;try{n=y(t)}catch{n=h(t)}let r=u(e);for(;r.length>1&&r!==g;){let t;try{t=y(r)}catch(e){if(e.code===`ENOENT`){r=u(r);continue}throw e}let i=m(n,t);if(i===``||!i.startsWith(`..`)&&!d(i))return;throw Error(`Refusing to write at ${e}: ancestor ${r} resolves to ${t}, which is outside the project directory ${n}. A symbolic link in the path likely escapes the project. Remove the symlink and re-run project setup.`)}}function $(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pe(e,t,n){try{if(x(n).size>10485760)return!1}catch{return!1}let r;try{r=re(n,`utf-8`)}catch{return!1}let i=[],a=s(r.charCodeAt(0)===65279?r.slice(1):r,i,{allowTrailingComma:!0,disallowComments:!1});if(i.length>0||!$(a))return!1;let o=a[e.topLevelKey];if(!$(o))return!1;let c=e.serverMapSubKey?o[e.serverMapSubKey]:o;return $(c)?$(c[e.serverName(t)]):!1}function Fe(e,t,n={}){if(e.id!==`copilot`)return!0;try{return Pe(e,t,e.configPath(t,n.home))}catch{return!1}}function Ie(e,t,n={}){let r=e.projectSkillPath?.(t);if(!r)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};if(!Fe(e,t,n))return{editorId:e.id,label:e.label,action:`skipped-prerequisite`,path:r};try{let n=c(`project`,{checkDesktop:!0}),i=u(r);X(i,t);let a=v(r)?`overwritten`:`written`;return b(i,{recursive:!0,force:!0}),ne(u(i),{recursive:!0}),ee(n,i,{recursive:!0}),{editorId:e.id,label:e.label,action:a,path:r}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}function Le(e,t){let n=e.projectSkillPath?.(t);if(!n)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};try{let r=u(n);return v(n)?(Z(r,t),b(r,{recursive:!0,force:!0}),{editorId:e.id,label:e.label,action:`removed`,path:n}):{editorId:e.id,label:e.label,action:`not-present`,path:n}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}export{me as C,D as S,ve as _,O as a,Ne as b,ge as c,I as d,z as f,L as g,be as h,Ie as i,P as l,je as m,Z as n,k as o,Me as p,Le as r,Y as s,X as t,F as u,xe as v,fe as x,Se as y};
|
|
56
|
+
//# sourceMappingURL=write-project-skill-DvqoihuV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-B74TABJS-BSazPoW8.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-24IMIIXA-BQtWA2ag.mjs";import"./chunk-PXTK5WE2-Dfi2FrE5.mjs";import"./chunk-7TSDKFEO-BjOrsK6M.mjs";import"./chunk-KRBPSX3W-ciCGjpAL.mjs";import"./chunk-DBKNVD4L-Y2Mnp5lC.mjs";import{t as e}from"./chunk-3BS5SKQH-CFcrGLDG.mjs";export{e as xanCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-PXTK5WE2-Dfi2FrE5.mjs";import{c as e}from"./chunk-DBKNVD4L-Y2Mnp5lC.mjs";export{e as cmdView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-TOMNU26N-C3JZDC96.mjs";export{e as xargsCommand};
|