@inkeep/open-knowledge 0.33.0-beta.6 → 0.33.0-beta.7
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/{_baseFor-DgUmPvii.mjs → _baseFor-CMmZqlg4.mjs} +1 -1
- package/dist/alias-JE7RI5QX-DUBvIpa7.mjs +1 -0
- package/dist/{arc-DeCRbT14.mjs → arc-CQLjZPEs.mjs} +2 -2
- package/dist/architecture-YZFGNWBL-BGsYftSC.mjs +1 -0
- package/dist/{architectureDiagram-Q4EWVU46-Ddeiwqm4.mjs → architectureDiagram-Q4EWVU46-DGG0IyfP.mjs} +2 -2
- package/dist/{array-CB05KhfS.mjs → array-BNmwzyCf.mjs} +1 -1
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/awk2-BBAGSFUB-BSXvsYKE.mjs +1 -0
- package/dist/{banner-BeBA-IMp.mjs → banner-DsGpC-o3.mjs} +2 -2
- package/dist/base64-4YMZCVJ5-r5zsLj5P.mjs +1 -0
- package/dist/basename-AA2KJYZQ-DlSFPnLd.mjs +1 -0
- package/dist/bash-IJWYRKFO-CMwhRejZ.mjs +1 -0
- package/dist/{blockDiagram-DXYQGD6D-Cym5AJGx.mjs → blockDiagram-DXYQGD6D-DO_ZPiei.mjs} +2 -2
- package/dist/{build-CN003PPg.mjs → build-BGRQ9c88.mjs} +1 -1
- package/dist/build-C__Nqi6T.mjs +1 -0
- package/dist/{c4Diagram-AHTNJAMY-B7HMnVPk.mjs → c4Diagram-AHTNJAMY-CYnXxcYe.mjs} +2 -2
- package/dist/cat-RDUMLXKC-CBoLzbAA.mjs +1 -0
- package/dist/channel-Dz_kn09_.mjs +2 -0
- package/dist/chmod-SYMGL4JA-L3CtA8Q4.mjs +1 -0
- package/dist/{chokidar-C-Jds_Bg.mjs → chokidar-CrFRJt-7.mjs} +1 -1
- package/dist/{chunk-24IMIIXA-DaS5XS55.mjs → chunk-24IMIIXA-ByE3n7F5.mjs} +2 -2
- package/dist/{chunk-2KRD3SAO-Ci0JL9ng.mjs → chunk-2KRD3SAO-CC8_tMR3.mjs} +2 -2
- package/dist/{chunk-2TRDZQLB-Kqh0farN.mjs → chunk-2TRDZQLB-DJYfX1DB.mjs} +2 -2
- package/dist/{chunk-336JU56O-MOsDPDtl.mjs → chunk-336JU56O-D5mJPHrS.mjs} +2 -2
- package/dist/{chunk-3BS5SKQH-Chc9fv52.mjs → chunk-3BS5SKQH-C7siUFvi.mjs} +3 -3
- package/dist/{chunk-3H6UQG3A-B7zoJt1R.mjs → chunk-3H6UQG3A-jehz9Mov.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-B1WzJUh4.mjs → chunk-3THT3N7L-DNeAafDi.mjs} +1 -1
- package/dist/{chunk-3ZUFRYJ4-DQB4hWDy.mjs → chunk-3ZUFRYJ4-5tUBEJiQ.mjs} +1 -1
- package/dist/chunk-426QAEUC-C79-xu4k.mjs +2 -0
- package/dist/{chunk-44UOCSGV-BZ6LfyW2.mjs → chunk-44UOCSGV-C07LY83n.mjs} +1 -1
- package/dist/{chunk-4BX2VUAB-BXGPfnwm.mjs → chunk-4BX2VUAB-CeLVr99T.mjs} +2 -2
- package/dist/{chunk-4GTNDTRF-CexF8C0H.mjs → chunk-4GTNDTRF-C79jHZPW.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-CewYv3NE.mjs → chunk-4HHKTUW3-C9w0lckj.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-D6TVzfh2.mjs → chunk-4Q4SM6WR-BBf5_ewP.mjs} +2 -2
- package/dist/{chunk-4TB4RGXK-B0uHEnHn.mjs → chunk-4TB4RGXK-n_iVg8hq.mjs} +2 -2
- package/dist/{chunk-55IACEB6-CWM_Woee.mjs → chunk-55IACEB6-DnxgLkXS.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-BoFmUszu.mjs → chunk-55VFSPNA-BI1ZlfMG.mjs} +2 -2
- package/dist/{chunk-5FUZZQ4R-BSIWed9s.mjs → chunk-5FUZZQ4R-D0CI_lA3.mjs} +2 -2
- package/dist/{chunk-5PVQY5BW-_JlgOiAb.mjs → chunk-5PVQY5BW-CM3DDgan.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-BwpNU33k.mjs → chunk-5QMZ5MUS-DvwGjmAW.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-DJjin--s.mjs → chunk-5QVNJEHU-BwcO0gX-.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-BEpcJpsv.mjs → chunk-5V6VZH6T-CsG6wUhk.mjs} +2 -2
- package/dist/{chunk-62RKD26F-uqVDf3rA.mjs → chunk-62RKD26F-CgKazjAi.mjs} +2 -2
- package/dist/{chunk-64BAICW3-BlKhhT3-.mjs → chunk-64BAICW3-DZxI2NVA.mjs} +2 -2
- package/dist/{chunk-67CJDMHE-CADkctrU.mjs → chunk-67CJDMHE-CrUJnyQp.mjs} +2 -2
- package/dist/{chunk-6Z5SFZXK-DuXsHt84.mjs → chunk-6Z5SFZXK-CqxoPFbR.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-CciWp7CZ.mjs → chunk-74CEPOFO-smMq6g2B.mjs} +1 -1
- package/dist/{chunk-7L36YK2X-Cok_Mfzv.mjs → chunk-7L36YK2X-BEYeMppm.mjs} +1 -1
- package/dist/{chunk-7N4EOEYR-D0VnhW8C.mjs → chunk-7N4EOEYR-qv4-7fqt.mjs} +2 -2
- package/dist/{chunk-7TSDKFEO-9ACIOuIO.mjs → chunk-7TSDKFEO-B7rhvhjt.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-DPxgapmK.mjs → chunk-A4HU7SVR-BReRiEUm.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-B_-pySix.mjs → chunk-A4JSPFCI-CzC3HvcT.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-DApqA6Ow.mjs → chunk-A5O5YHGN-0FmmnDn4.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-DRkFYIUZ.mjs → chunk-A65PWWJC-DDcfQP9l.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-DGJklf-9.mjs → chunk-A7A2DBEE-DxoLZwYW.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-BSbI3udS.mjs → chunk-A7ICOL4V-DLpBcLKS.mjs} +2 -2
- package/dist/{chunk-AA7GKIK3-DiBKA6eA.mjs → chunk-AA7GKIK3-hv3Reau6.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-B1s5GUUO.mjs → chunk-ALLTKNUZ-8gj-zLqF.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-CgGkczFr.mjs → chunk-APT7OOP2-Ba0TjHQy.mjs} +2 -2
- package/dist/{chunk-B74TABJS-CM6MrFZT.mjs → chunk-B74TABJS-D6QwMpPz.mjs} +1 -1
- package/dist/{chunk-BGSUD5R5-B-rczZvK.mjs → chunk-BGSUD5R5-BfmoQDUK.mjs} +2 -2
- package/dist/{chunk-BSJP7CBP-BWUAQGWN.mjs → chunk-BSJP7CBP-C-rdyWiE.mjs} +2 -2
- package/dist/{chunk-CIAEETIT-4Fu0r4oG.mjs → chunk-CIAEETIT-B4zNm8L4.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-BkE4vqrf.mjs → chunk-CWQS3NFK-BvSpDizp.mjs} +1 -1
- package/dist/{chunk-D4J545R4-DfBhjppa.mjs → chunk-D4J545R4-B2EJq2_m.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-BEkstiuo.mjs → chunk-D6CWQ5DW-DTkNWXQB.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-CAw29uK1.mjs → chunk-D7MEQ3VN-Cgm5u94B.mjs} +2 -2
- package/dist/{chunk-DBKNVD4L-DMfzef_7.mjs → chunk-DBKNVD4L-UVpSZ5HO.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-3VCdH2yi.mjs → chunk-DCAAORBQ-Dy6elY3j.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-F_tmy-Lz.mjs → chunk-DXB73IDG-ByieFnhr.mjs} +1 -1
- package/dist/{chunk-EDXVE4YY-COyPi8-X.mjs → chunk-EDXVE4YY-B7-wXBzK.mjs} +2 -2
- package/dist/{chunk-EEXR5ZDP-VxEPFle_.mjs → chunk-EEXR5ZDP-Bot_s1lf.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-Dz3f1URh.mjs → chunk-EIZGF4BS-Cce76mbX.mjs} +2 -2
- package/dist/{chunk-ENJZ2VHE-DgpEksO3.mjs → chunk-ENJZ2VHE-DswEO8kN.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-tJnOwArx.mjs → chunk-F23WWYKW-YV2Ziyrt.mjs} +2 -2
- package/dist/{chunk-FMBD7UC4-CFP8EClM.mjs → chunk-FMBD7UC4-DyW29ls9.mjs} +2 -2
- package/dist/{chunk-FOC6F5B3-BfuMxJA0.mjs → chunk-FOC6F5B3-Bc3GvhQ3.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-C5P_ff9C.mjs → chunk-GCTKCWKD-DBnk7jcA.mjs} +1 -1
- package/dist/{chunk-GFQRA5P5-DbAN9IDm.mjs → chunk-GFQRA5P5-DuNfOQls.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-CnqfYKLU.mjs → chunk-GOV5EKKI-BFLTyBpR.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-BZ5qwuS5.mjs → chunk-GXVXFKBA-C3l1H1PT.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-C2858kAN.mjs → chunk-HDQ56CKY-Cy6yVra7.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-BhX1qT1n.mjs → chunk-HJQJAYMS-yqfBcYOx.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-D9DjORFc.mjs → chunk-HJWBQKYG-C1cifXhx.mjs} +2 -2
- package/dist/{chunk-HKLCLINH-DiTtKPWB.mjs → chunk-HKLCLINH-Ch0mauLy.mjs} +3 -3
- package/dist/{chunk-HL6NGDO2-FvmjxcsK.mjs → chunk-HL6NGDO2-D41r2_6L.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-Cd9c0ujm.mjs → chunk-HWKDQ44K-CRAflooW.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-BsA-zv3k.mjs → chunk-I57KEIP3-BW7G5kxf.mjs} +2 -2
- package/dist/{chunk-ICPOFSXX-C2hDlKD_.mjs → chunk-ICPOFSXX-BF2fcu67.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-CUKythEA.mjs → chunk-IPJHKYVM-DDc9WF57.mjs} +1 -1
- package/dist/{chunk-JVPRLUMK-D72YT6bi.mjs → chunk-JVPRLUMK-C9zEHB9M.mjs} +2 -2
- package/dist/{chunk-K5T4RW27-ChGdeubA.mjs → chunk-K5T4RW27-DLjwaibC.mjs} +2 -2
- package/dist/{chunk-K6LIBGJA-CtwqXONG.mjs → chunk-K6LIBGJA-CSZVB574.mjs} +2 -2
- package/dist/{chunk-KGLVRYIC-BYA7AJ2g.mjs → chunk-KGLVRYIC-BNQzuSOt.mjs} +2 -2
- package/dist/{chunk-KMEYNNUA-C311YB2Q.mjs → chunk-KMEYNNUA-maIN40sk.mjs} +2 -2
- package/dist/{chunk-KRBPSX3W-DsaeH-hY.mjs → chunk-KRBPSX3W-CzvY8ZXk.mjs} +2 -2
- package/dist/{chunk-KX3P26DQ-D2yWAYlk.mjs → chunk-KX3P26DQ-76goBn6H.mjs} +1 -1
- package/dist/{chunk-LIHQZDEY-Du6TmMJL.mjs → chunk-LIHQZDEY-C1QAwaiM.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-xjImIR4A.mjs → chunk-LL3S3NLB-DbugMv6o.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-DQ58So-F.mjs → chunk-LTZRCH7N-BKI5S2SB.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-B1OcC6RH.mjs → chunk-LWEGUNWT-GnqRCIV_.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-CP6l42wf.mjs → chunk-MDDMCKUK-b-Mvbq7g.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-DDKgmYs5.mjs → chunk-MDLLFABN-CySM5qrq.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-D8l1TTsc.mjs → chunk-MHTUABJP-t1OLW57X.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-BLEhGmNy.mjs → chunk-MIZPJHVH-D-ZDkLZF.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-MXi1NN3K.mjs → chunk-MLXIYONF-2Q4Ybi7x.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-BkwmDIR4.mjs → chunk-MYE6AGBJ-BejewWl1.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-Bv2VeaZc.mjs → chunk-NAERJDUW-BeJI_Ack.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-14dRI8Qm.mjs → chunk-NCNPKYJZ-BjePegaZ.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-BiYXRcxZ.mjs → chunk-NUYSJFDK-DDVtplw1.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-B_jLzNZV.mjs → chunk-OCLXQMOG-DZx1830_.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-D4VLThbM.mjs → chunk-OCS6LSEM-DGnWZEcL.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-CmrD0Dg2.mjs → chunk-OJDRYQWQ-69O4zmKR.mjs} +1 -1
- package/dist/{chunk-ORNJ4GCN-CO4Fc0LT.mjs → chunk-ORNJ4GCN-R61lu8Cm.mjs} +2 -2
- package/dist/{chunk-OYMX7WX6-CjnWmW_n.mjs → chunk-OYMX7WX6-BShEu1pf.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-aMLWXguv.mjs → chunk-PBXLG62G-DdXtiydY.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-B3XXGg2T.mjs → chunk-PP6PSHAB-B7OGLVba.mjs} +1 -1
- package/dist/{chunk-PXTK5WE2-CguJFePc.mjs → chunk-PXTK5WE2-BeCOtT1d.mjs} +2 -2
- package/dist/{chunk-PYSFUGCK-BszfAqRG.mjs → chunk-PYSFUGCK-CoGoOEDp.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-D3ULCm4b.mjs → chunk-QCDB2VPH-z4xw9VKe.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-Dzcm83Kv.mjs → chunk-QJ7O6ZN3-Dsx1L-CX.mjs} +2 -2
- package/dist/{chunk-QZHKN3VN-CczpYV_w.mjs → chunk-QZHKN3VN-4LgLml-S.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-nrEeDNrG.mjs → chunk-R6QSAL5T-CXXlslcl.mjs} +1 -1
- package/dist/{chunk-R6VWJ2ZL-BVeTwIsz.mjs → chunk-R6VWJ2ZL-FXX1AKea.mjs} +1 -1
- package/dist/{chunk-RPNGRAAP-CajOz2i0.mjs → chunk-RPNGRAAP-D-txoG-N.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-CA2LWAo7.mjs → chunk-SDNKECQQ-sntIQEvc.mjs} +2 -2
- package/dist/{chunk-SNN4IESC-D8LPcAwE.mjs → chunk-SNN4IESC-2iQ8MDN3.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-CKzBdBMk.mjs → chunk-T56QNPHK-0UWUTTk9.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-rdis5pZn.mjs → chunk-TLSUDHID-CbxrNaLS.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-BxDnjGjc.mjs → chunk-TOMNU26N-aWRPfXR1.mjs} +2 -2
- package/dist/{chunk-TP4BZANS-ClzIzpWm.mjs → chunk-TP4BZANS-DFORxqE5.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-DnSXwySk.mjs → chunk-TXBZCHCQ-COSdckz7.mjs} +2 -2
- package/dist/{chunk-U2HBQHQK-DMRf50i8.mjs → chunk-U2HBQHQK-B6QvDsYx.mjs} +2 -2
- package/dist/{chunk-V5MWI2OL-Cjq6zFOH.mjs → chunk-V5MWI2OL-CDs_rm9r.mjs} +2 -2
- package/dist/{chunk-V7TAPXDL-BaVJN6c-.mjs → chunk-V7TAPXDL-DbTOoM_I.mjs} +2 -2
- package/dist/{chunk-VJFXDYWH-BJjeOIUB.mjs → chunk-VJFXDYWH-oT0f9NSa.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-CLvo1DrK.mjs → chunk-VOBGTVA6-D6oyYm45.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-ySo4pvxO.mjs → chunk-VYOJP4TV-Dh2zBxKQ.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-jr5eyHAR.mjs → chunk-WKFATFPP-CoNouDAR.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-Bpyh-CYM.mjs → chunk-X2AJGDEF-13z4tBy7.mjs} +1 -1
- package/dist/{chunk-X2U36JSP-B09HbTgU.mjs → chunk-X2U36JSP-BlsQfR26.mjs} +2 -2
- package/dist/{chunk-XKQRETAK-CG272cRl.mjs → chunk-XKQRETAK-EkIIjUUl.mjs} +2 -2
- package/dist/{chunk-XKWWSDBF-EI7W96Bb.mjs → chunk-XKWWSDBF-B1eAKd2w.mjs} +2 -2
- package/dist/{chunk-XPW4576I-B-qTm_Z3.mjs → chunk-XPW4576I-bLLZgym8.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-DDtsDoBd.mjs → chunk-XVDPCNWR-BAt7NxwA.mjs} +2 -2
- package/dist/{chunk-YMMW5UAP-jiH3wEeU.mjs → chunk-YMMW5UAP-Bm5rv4x6.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-D6z7D3pz.mjs → chunk-YTNYSM6T-igBSh3M-.mjs} +2 -2
- package/dist/{chunk-YULBWSET-sJ_UPhUx.mjs → chunk-YULBWSET-x9ev2Mf1.mjs} +2 -2
- package/dist/{chunk-YZCP3GAM-C2dMi590.mjs → chunk-YZCP3GAM-dFAdRCa8.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-CFEq3s_2.mjs → chunk-Z6LRHWXI-CQxrFjqd.mjs} +2 -2
- package/dist/{chunk-Z7JVV2SM-XK1154v3.mjs → chunk-Z7JVV2SM-C7YBwi4Z.mjs} +2 -2
- package/dist/{chunk-ZZ45TVLE-DmKznbd-.mjs → chunk-ZZ45TVLE-2q1aFSGq.mjs} +2 -2
- package/dist/{chunk-ZZO3UDB3-Jw0Ocy-R.mjs → chunk-ZZO3UDB3-rEua5jnw.mjs} +2 -2
- package/dist/classDiagram-6PBFFD2Q-CcylKUUy.mjs +2 -0
- package/dist/classDiagram-v2-HSJHXN6E-BuitxA8E.mjs +2 -0
- package/dist/clear-5CZ5X4YR-B1WFGbrj.mjs +1 -0
- package/dist/cli.mjs +58 -58
- package/dist/clone-FnWO_tLO.mjs +2 -0
- package/dist/colors-Ct4sdRvQ.mjs +1 -0
- package/dist/{colors-DugpbXz6.mjs → colors-DWZN3WbY.mjs} +1 -1
- package/dist/column-WLPMMSTS-DkwMR9G7.mjs +1 -0
- package/dist/comm-5SLSESQG-CXlq0ETw.mjs +1 -0
- package/dist/constants-B18JyjBC.mjs +2 -0
- package/dist/{cose-bilkent-S5V4N54A-BNALZCF0.mjs → cose-bilkent-S5V4N54A-x0sjol1e.mjs} +2 -2
- package/dist/cp-XOYR4ABJ-DSmenFoy.mjs +1 -0
- package/dist/{curl-47BFPSFW-DU0Jc2rS.mjs → curl-47BFPSFW-CLzIjKiW.mjs} +2 -2
- package/dist/cut-OPC3VAGB-Bem4Z9r_.mjs +1 -0
- package/dist/{cytoscape.esm-5XrS6n0F.mjs → cytoscape.esm-D1nqsWCf.mjs} +1 -1
- package/dist/{dagre-C04vaGU3.mjs → dagre-BTsqj5N3.mjs} +2 -2
- package/dist/{dagre-KV5264BT-Cbu_HfO4.mjs → dagre-KV5264BT-qU8auIl8.mjs} +2 -2
- package/dist/date-DD7FVA2V-BIqG8vnM.mjs +1 -0
- package/dist/{defaultLocale-0qNBj5q-.mjs → defaultLocale-DMqLGTir.mjs} +1 -1
- package/dist/{diagram-5BDNPKRD--yFFNenY.mjs → diagram-5BDNPKRD-BfaCThqw.mjs} +2 -2
- package/dist/{diagram-G4DWMVQ6-DEe2UaOJ.mjs → diagram-G4DWMVQ6-GD__kOTo.mjs} +2 -2
- package/dist/{diagram-MMDJMWI5-BEgEPDUN.mjs → diagram-MMDJMWI5-eK_WgeFb.mjs} +2 -2
- package/dist/{diagram-TYMM5635-WdKiO0-q.mjs → diagram-TYMM5635-Cw9FE8Ou.mjs} +2 -2
- package/dist/diff-HJF2MPDN-QbElik15.mjs +1 -0
- package/dist/dirname-LEMTZZFS-DjJGD8wW.mjs +1 -0
- package/dist/{dist-Co98vmuK.mjs → dist-B9rR197c.mjs} +1 -1
- package/dist/dist-DNDjbkqL.mjs +1 -0
- package/dist/{dist-bundle-tsI-uq-K.mjs → dist-bundle-CfcllBeA.mjs} +1 -1
- package/dist/dist-bundle-Dnt-gLG8.mjs +1 -0
- package/dist/{server-lock-iLcBw_q0-DK2Tcu84.mjs → dist-gqZDYmIG.mjs} +135 -135
- package/dist/{dist-DFesG7DS.mjs → dist-petOQDm6.mjs} +14 -14
- package/dist/du-WO2ENHXQ-gLn1L6An.mjs +1 -0
- package/dist/echo-O45JWWI2-CHeEVRD-.mjs +1 -0
- package/dist/env-5EPCWSXR-nB7iGA4U.mjs +1 -0
- package/dist/{erDiagram-SMLLAGMA-BD_bZ9y8.mjs → erDiagram-SMLLAGMA-BQ28NjyR.mjs} +2 -2
- package/dist/{esm-BNIW0EH8.mjs → esm-PWRRAk-U.mjs} +1 -1
- package/dist/{execAsync-BAuTynbH.mjs → execAsync-Clg2-3AB.mjs} +1 -1
- package/dist/{execAsync-CBkkI2Ek.mjs → execAsync-DCzaEYgw.mjs} +1 -1
- package/dist/{execAsync-DVDfm08O.mjs → execAsync-Dyv9tAFE.mjs} +1 -1
- package/dist/expand-DTNXU4LQ--1KdtI8I.mjs +1 -0
- package/dist/expansion-VBDYWVZR-Br5lbiFS.mjs +1 -0
- package/dist/expr-YYCVMXE3-D_Mgl3lg.mjs +1 -0
- package/dist/file-IGDTDPLG-DJz2lDmW.mjs +1 -0
- package/dist/find-DH2ALKQS-BCfNRHeq.mjs +1 -0
- package/dist/flag-coverage-6JEX67RU-dAJxSkKl.mjs +2 -0
- package/dist/{flatten-DsfHsK9p.mjs → flatten-CMuDMFOE.mjs} +2 -2
- package/dist/{flowDiagram-DWJPFMVM-DZgEsdRZ.mjs → flowDiagram-DWJPFMVM-BRXMLmIm.mjs} +2 -2
- package/dist/fold-LDSORVYE-X07YByBI.mjs +1 -0
- package/dist/{ganttDiagram-T4ZO3ILL-Csm0cHYU.mjs → ganttDiagram-T4ZO3ILL-BkishNK-.mjs} +2 -2
- package/dist/{getMachineId-bsd-Bd_aCdAJ.mjs → getMachineId-bsd-BfKl40ww.mjs} +2 -2
- package/dist/{getMachineId-bsd-CmfyCGp_.mjs → getMachineId-bsd-CfcvKJtS.mjs} +2 -2
- package/dist/{getMachineId-bsd-D_lpr65O.mjs → getMachineId-bsd-DHr_3v7C.mjs} +2 -2
- package/dist/{getMachineId-darwin-CFeqXDM9.mjs → getMachineId-darwin-BGSat_hq.mjs} +2 -2
- package/dist/{getMachineId-darwin-Ch6Y3434.mjs → getMachineId-darwin-ClWJDgsl.mjs} +2 -2
- package/dist/{getMachineId-darwin-DRbP6ZXo.mjs → getMachineId-darwin-kUGmbM-E.mjs} +2 -2
- package/dist/{getMachineId-linux-CsnocidZ.mjs → getMachineId-linux-Cb6TG9LG.mjs} +1 -1
- package/dist/{getMachineId-linux-n9GZPwcR.mjs → getMachineId-linux-D_xXWtEw.mjs} +1 -1
- package/dist/{getMachineId-linux-CbD1lCp_.mjs → getMachineId-linux-vXwObLy3.mjs} +1 -1
- package/dist/{getMachineId-unsupported-Bsi0aVMm.mjs → getMachineId-unsupported-B4ElBmKF.mjs} +1 -1
- package/dist/{getMachineId-unsupported-D6zswC3_.mjs → getMachineId-unsupported-BALaAmcO.mjs} +1 -1
- package/dist/{getMachineId-unsupported-BQuHcTqF.mjs → getMachineId-unsupported-CechcDdc.mjs} +1 -1
- package/dist/{getMachineId-win-BsR1lQcH.mjs → getMachineId-win-CwyWxlQ-.mjs} +2 -2
- package/dist/{getMachineId-win-Bvo8aUso.mjs → getMachineId-win-D-OyleV_.mjs} +2 -2
- package/dist/{getMachineId-win-BpALY-6t.mjs → getMachineId-win-Div5qJyL.mjs} +2 -2
- package/dist/gh-detect-DT6DqKGM.mjs +3 -0
- package/dist/git-handle-CetHWc5A-BcCPg15N.mjs +1 -0
- package/dist/git-handle-dKyep_oZ-B7s7m6CJ.mjs +10 -0
- package/dist/gitGraph-7Q5UKJZL-Cb6AI0gQ.mjs +1 -0
- package/dist/{gitGraphDiagram-UUTBAWPF-dC1IPshv.mjs → gitGraphDiagram-UUTBAWPF-LYEX-Up5.mjs} +2 -2
- package/dist/{graphlib-ZUByR7Z1.mjs → graphlib-C8GlDNIO.mjs} +2 -2
- package/dist/grep-2HUTXO5U-DF5bN210.mjs +1 -0
- package/dist/gzip-AQXSGOVS-Ld4whXAz.mjs +1 -0
- package/dist/head-HT2B6D2J-Y8QWoury.mjs +1 -0
- package/dist/help-VVWX7SA5-DNTZaSb5.mjs +1 -0
- package/dist/history-J4QRNGRO-D8QHmWq3.mjs +1 -0
- package/dist/hostname-BK6HG2DE-C229q8IA.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-EEqkh5Fp.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/info-OMHHGYJF-DY6XVLHA.mjs +1 -0
- package/dist/{infoDiagram-42DDH7IO-HjNjWo06.mjs → infoDiagram-42DDH7IO-BVXbYOHQ.mjs} +2 -2
- package/dist/{init-BQKkPl4l.mjs → init-D9nHWIP2.mjs} +1 -1
- package/dist/{init-B4vJEG6p.mjs → init-KCSJffNW.mjs} +5 -5
- package/dist/init-zkouBkiU.mjs +1 -0
- package/dist/{is-object-DAC-mmwo.mjs → is-object-DhiFit5j.mjs} +1 -1
- package/dist/{isEmpty-jdQphHPa.mjs → isEmpty-B_hy4b7A.mjs} +2 -2
- package/dist/{ishikawaDiagram-UXIWVN3A-BlrokJRv.mjs → ishikawaDiagram-UXIWVN3A-Diodefny.mjs} +2 -2
- package/dist/join-GG2LDHE5-DJ1L_Ka6.mjs +1 -0
- package/dist/{journeyDiagram-VCZTEJTY-Bt5CmS_f.mjs → journeyDiagram-VCZTEJTY-CMQp-Rx9.mjs} +2 -2
- package/dist/jq-LYZFFBZB-BItVI6BJ.mjs +1 -0
- package/dist/{js-exec-VXN6TZ7U-B_mKz_np.mjs → js-exec-VXN6TZ7U-Bnv5xh7r.mjs} +2 -2
- package/dist/{kanban-definition-6JOO6SKY-BH015AU8.mjs → kanban-definition-6JOO6SKY-DhbBoKko.mjs} +2 -2
- package/dist/{launch-json-removal-oDM6gkL1.mjs → launch-json-removal-ZIYJbZtQ.mjs} +2 -2
- package/dist/{lib-BWyT_i83.mjs → lib-BFgxfC0m.mjs} +2 -2
- package/dist/{lib-BKCY8vrL.mjs → lib-DOas6HiH.mjs} +1 -1
- package/dist/{libesm-Ob3yvbRV.mjs → libesm-bRpdkHYn.mjs} +1 -1
- package/dist/{line-DiVg83mo.mjs → line-CNrllbcq.mjs} +2 -2
- package/dist/{linear-C06cViLu.mjs → linear-CUrVtEYu.mjs} +2 -2
- package/dist/ln-4TRFBYAT-1vbMtGss.mjs +1 -0
- package/dist/loader-BqECoP19.mjs +4 -0
- package/dist/loader-D9ILq_Qj.mjs +1 -0
- package/dist/ls-KSXFZCWH-D7XChuCb.mjs +1 -0
- package/dist/{lzma-NI_6IIcm.mjs → lzma-kz900pzb.mjs} +1 -1
- package/dist/{mcp-migrate-event-BNoOQpLB.mjs → mcp-migrate-event-H4uBxZps.mjs} +1 -1
- package/dist/md5sum-INMIK4DX-DebFzK7Y.mjs +1 -0
- package/dist/{mermaid-parser.core-DqKkkvo5.mjs → mermaid-parser.core-C4HPipkF.mjs} +2 -2
- package/dist/{mermaid.core-BzIdCd91.mjs → mermaid.core-BjaX3aDk.mjs} +3 -3
- package/dist/{mindmap-definition-QFDTVHPH-BOkRtwWA.mjs → mindmap-definition-QFDTVHPH-aTvmjjWw.mjs} +2 -2
- package/dist/mkdir-TDEMSB6C-yKujfJwH.mjs +1 -0
- package/dist/mv-Z6MORUFL-DefDwgs3.mjs +1 -0
- package/dist/nl-U5YJDM32-C4WnOB_Q.mjs +1 -0
- package/dist/od-VJEF2UR5-w1NlCkUs.mjs +1 -0
- package/dist/{open-browser-3gSG96ZS.mjs → open-browser-BMVg3r9e.mjs} +2 -2
- package/dist/{ordinal-BuFKVuSx.mjs → ordinal-CwNJ0kWp.mjs} +2 -2
- package/dist/packet-4T2RLAQJ-Bf6ng-Cf.mjs +1 -0
- package/dist/paste-7N6AFSDS-C1xZzPgC.mjs +1 -0
- package/dist/{path-Dmj-XcQ6.mjs → path-v4_sOSY9.mjs} +1 -1
- package/dist/pie-ZZUOXDRM-B2TN5yZH.mjs +1 -0
- package/dist/{pieDiagram-DEJITSTG-Bho_Qp6H.mjs → pieDiagram-DEJITSTG-Bwxzwykf.mjs} +2 -2
- package/dist/{preview-C-zPM3qo.mjs → preview-Bmngkbmx.mjs} +2 -2
- package/dist/preview-CXetnprU.mjs +1 -0
- package/dist/printf-CX64KX2P-mlOOn_9v.mjs +1 -0
- package/dist/public/assets/ShareBranchSwitchDialog-DGcSbhKt.js +1 -0
- package/dist/public/assets/{index-CzUR_TnM.js → index-CxZGz7om.js} +3 -3
- package/dist/public/index.html +1 -1
- package/dist/pwd-D4OZ7N27-CT87C-5L.mjs +1 -0
- package/dist/{python3-DNGS4G3E-mSuL-4Sg.mjs → python3-DNGS4G3E-CvPRspn0.mjs} +2 -2
- package/dist/{quadrantDiagram-34T5L4WZ-Bd7jb1rn.mjs → quadrantDiagram-34T5L4WZ-DNT3MD_9.mjs} +2 -2
- package/dist/radar-PYXPWWZC-COiIo4-V.mjs +1 -0
- package/dist/readlink-MI4GCHJF-yD7ZCo6I.mjs +1 -0
- package/dist/{reduce-CKdE5ppn.mjs → reduce-KkqmWdsg.mjs} +2 -2
- package/dist/{repair-launch-json-CrBdZKKa.mjs → repair-launch-json-D73FezU-.mjs} +2 -2
- package/dist/{repair-mcp-configs-DCX1eS6S.mjs → repair-mcp-configs-C2iq9bOP.mjs} +2 -2
- package/dist/repair-skills-BSRgI3Qd.mjs +3 -0
- package/dist/repair-skills-DMIeifIr.mjs +1 -0
- package/dist/{requirementDiagram-MS252O5E-B74qjBRN.mjs → requirementDiagram-MS252O5E-25Z7WGN_.mjs} +2 -2
- package/dist/rev-XOSYPP45-DXeN2c_L.mjs +1 -0
- package/dist/rg-XNF3R3II-CSW8tOjh.mjs +1 -0
- package/dist/rm-RTZG23RL-CdPHUz_A.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-B-Hcy2_M.mjs +1 -0
- package/dist/{rough.cjs-D5rEDIRO.mjs → rough.cjs-CjMW0p0V.mjs} +1 -1
- package/dist/{sankeyDiagram-XADWPNL6-CsDd_Lum.mjs → sankeyDiagram-XADWPNL6-CaXOTYx7.mjs} +2 -2
- package/dist/sed-JAPPVBEU-CcOukRYN.mjs +1 -0
- package/dist/seq-RN5ZUASB-s6ShRZlK.mjs +1 -0
- package/dist/{sequenceDiagram-FGHM5R23-C88m3ajK.mjs → sequenceDiagram-FGHM5R23-BgVYdPUE.mjs} +2 -2
- package/dist/server-lock-GuuouVft-mEG_NG6z.mjs +1 -0
- package/dist/server-lock-iLcBw_q0-CSsXlPB8.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DypLzN_7.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-DGVRMju7.mjs +1 -0
- package/dist/sleep-VZFPZFWA-B9Y3_tNd.mjs +1 -0
- package/dist/sort-DCNRDA7U-hsloabcm.mjs +1 -0
- package/dist/split-SITCSYCZ-BDulNHyK.mjs +1 -0
- package/dist/sqlite3-TE5AIOTF-DjHl_aWc.mjs +1 -0
- package/dist/{src-BYGc6Nen.mjs → src-7LGO0Yau.mjs} +6 -6
- package/dist/{src-DC_BCes_.mjs → src-BGL-MlNN.mjs} +1 -1
- package/dist/start-B3G01qdc.mjs +1 -0
- package/dist/start-CGL0pAPp.mjs +3 -0
- package/dist/stat-BT5A227F-Bo3rQCLg.mjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-va6AVA_z.mjs → stateDiagram-FHFEXIEX-DQ2iT5iQ.mjs} +2 -2
- package/dist/stateDiagram-v2-QKLJ7IA2-BN2cDF-I.mjs +2 -0
- package/dist/strings-7PLOGTPD-DzlKcmS-.mjs +1 -0
- package/dist/tac-SJGXQ4T2-ByklUqCu.mjs +1 -0
- package/dist/tail-S5ULNTJU-4htchzH3.mjs +1 -0
- package/dist/tar-MZQD7NO4-BbDCO35a.mjs +1 -0
- package/dist/tee-O7VXZDCO-C4h94T7n.mjs +1 -0
- package/dist/time-DEUO3QV2-DgbA26hb.mjs +1 -0
- package/dist/{timeline-definition-GMOUNBTQ-TPAmdwnH.mjs → timeline-definition-GMOUNBTQ-CN-kJjLP.mjs} +2 -2
- package/dist/timeout-VRKMCG72-QNsmkGY4.mjs +1 -0
- package/dist/touch-DX2IJOQ4-DCSWORMR.mjs +1 -0
- package/dist/tr-2HXZRDSW-ClAtG6KK.mjs +1 -0
- package/dist/tree-LYXBS7DC-DY3rkdQ5.mjs +1 -0
- package/dist/treeView-SZITEDCU-IxD8BwiZ.mjs +1 -0
- package/dist/treemap-W4RFUUIX-Bi83ji26.mjs +1 -0
- package/dist/true-WHJNXCHG-D1oYWVZ5.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-MOepJcp7.mjs +1 -0
- package/dist/uniq-SUNANL47-BTfKD4-0.mjs +1 -0
- package/dist/{vennDiagram-DHZGUBPP-CVntpCfR.mjs → vennDiagram-DHZGUBPP-BJ8_Sz54.mjs} +2 -2
- package/dist/wardley-RL74JXVD-DxHrvQhH.mjs +1 -0
- package/dist/{wardleyDiagram-NUSXRM2D-DlYkmDFQ.mjs → wardleyDiagram-NUSXRM2D-j56ncYAi.mjs} +2 -2
- package/dist/wc-TQB3VNOX-CMqYcRvH.mjs +1 -0
- package/dist/which-XZHEH76L-CAv7Efsx.mjs +1 -0
- package/dist/whoami-DGKU3D2X-CpvaE3LM.mjs +1 -0
- package/dist/{wrapper-BZO_sIci.mjs → wrapper-C8gJQl5z.mjs} +1 -1
- package/dist/{write-project-skill-NLecUmFg.mjs → write-project-skill-CQSo7jpP.mjs} +3 -3
- package/dist/xan-UD7JYIL2-DLOcZDYa.mjs +1 -0
- package/dist/xan-view-OW2TB7Z3-dHhPo_bJ.mjs +1 -0
- package/dist/xargs-I6EZUCYF-HR9_4d9i.mjs +1 -0
- package/dist/{xychartDiagram-5P7HB3ND-CFd6z4Gb.mjs → xychartDiagram-5P7HB3ND-CcUb_B_R.mjs} +2 -2
- package/dist/yazl-B1RwDQQs.mjs +1 -0
- package/dist/{yazl-Docqgl6q.mjs → yazl-DFMxUgKn.mjs} +1 -1
- package/dist/yq-OAKYHSXH-CJLBfTXv.mjs +1 -0
- package/package.json +1 -1
- package/dist/alias-JE7RI5QX-BODj4Gfj.mjs +0 -1
- package/dist/architecture-YZFGNWBL-BJvTzYI9.mjs +0 -1
- package/dist/awk2-BBAGSFUB-lHnSCbc-.mjs +0 -1
- package/dist/base64-4YMZCVJ5-BTMj5dqF.mjs +0 -1
- package/dist/basename-AA2KJYZQ-B1wvwZXV.mjs +0 -1
- package/dist/bash-IJWYRKFO-CCnjwjWe.mjs +0 -1
- package/dist/build-Ca40rJCO.mjs +0 -1
- package/dist/cat-RDUMLXKC-JY2w4DEE.mjs +0 -1
- package/dist/channel-BQl_ktPZ.mjs +0 -2
- package/dist/chmod-SYMGL4JA-3Hk_1ELN.mjs +0 -1
- package/dist/chunk-426QAEUC-B_MzMc_U.mjs +0 -2
- package/dist/classDiagram-6PBFFD2Q-L301VcDG.mjs +0 -2
- package/dist/classDiagram-v2-HSJHXN6E-CeSqnnqg.mjs +0 -2
- package/dist/clear-5CZ5X4YR-BDbutb2U.mjs +0 -1
- package/dist/clone-DETmm2Pe.mjs +0 -2
- package/dist/colors-C2Tw16G0.mjs +0 -1
- package/dist/column-WLPMMSTS-CV6fCKBB.mjs +0 -1
- package/dist/comm-5SLSESQG-c_QNAuoh.mjs +0 -1
- package/dist/constants-DxrhiJEv.mjs +0 -2
- package/dist/cp-XOYR4ABJ-Dy7On9-M.mjs +0 -1
- package/dist/cut-OPC3VAGB-BuR9R75Y.mjs +0 -1
- package/dist/date-DD7FVA2V-ClXjwml9.mjs +0 -1
- package/dist/diff-HJF2MPDN-C0H4yjXW.mjs +0 -1
- package/dist/dirname-LEMTZZFS-4AT-pFX0.mjs +0 -1
- package/dist/dist-LzL927dF.mjs +0 -1
- package/dist/dist-bundle-BA0EtAC7.mjs +0 -1
- package/dist/du-WO2ENHXQ-Do-4VQ3V.mjs +0 -1
- package/dist/echo-O45JWWI2-DdI80aCx.mjs +0 -1
- package/dist/env-5EPCWSXR-CDfcyvrs.mjs +0 -1
- package/dist/expand-DTNXU4LQ-D-zXh5CC.mjs +0 -1
- package/dist/expansion-VBDYWVZR-DTjZRtii.mjs +0 -1
- package/dist/expr-YYCVMXE3-C9dGgUU3.mjs +0 -1
- package/dist/file-IGDTDPLG-BEwb4MXq.mjs +0 -1
- package/dist/find-DH2ALKQS-Dni7700t.mjs +0 -1
- package/dist/flag-coverage-6JEX67RU-CMw4W0rs.mjs +0 -2
- package/dist/fold-LDSORVYE-g18Hkyqy.mjs +0 -1
- package/dist/gh-detect-DDO0PYTq.mjs +0 -3
- package/dist/git-handle-BMLM1Bxa-Bic5A31t.mjs +0 -1
- package/dist/git-handle-XXj9bu6B-DY30-mw9.mjs +0 -10
- package/dist/gitGraph-7Q5UKJZL-D8oR6R4c.mjs +0 -1
- package/dist/grep-2HUTXO5U-Dq78Al2p.mjs +0 -1
- package/dist/gzip-AQXSGOVS-C9_JolVc.mjs +0 -1
- package/dist/head-HT2B6D2J-CdrKE_Tc.mjs +0 -1
- package/dist/help-VVWX7SA5-DdmujeOs.mjs +0 -1
- package/dist/history-J4QRNGRO-Bm3N_FkO.mjs +0 -1
- package/dist/hostname-BK6HG2DE-DdT-PlzJ.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-D2mzPMGY.mjs +0 -1
- package/dist/info-OMHHGYJF-pWbeXW42.mjs +0 -1
- package/dist/init-BnjjO_nA.mjs +0 -1
- package/dist/join-GG2LDHE5-DV7ilddy.mjs +0 -1
- package/dist/jq-LYZFFBZB-DhEnecL2.mjs +0 -1
- package/dist/ln-4TRFBYAT-Cg_-SGIL.mjs +0 -1
- package/dist/loader-D8gAl6hU.mjs +0 -1
- package/dist/loader-DKb55SxB.mjs +0 -4
- package/dist/ls-KSXFZCWH-RlHCZlxm.mjs +0 -1
- package/dist/md5sum-INMIK4DX-BXlXL3Ru.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-Cu2DJyfB.mjs +0 -1
- package/dist/mv-Z6MORUFL-BsEWL09Z.mjs +0 -1
- package/dist/nl-U5YJDM32-BybO7Epu.mjs +0 -1
- package/dist/od-VJEF2UR5-OIZrgjg0.mjs +0 -1
- package/dist/packet-4T2RLAQJ-BizdrxBC.mjs +0 -1
- package/dist/paste-7N6AFSDS-Ch72F0D2.mjs +0 -1
- package/dist/pie-ZZUOXDRM-BSULk3pW.mjs +0 -1
- package/dist/preview-B2bOO2_6.mjs +0 -1
- package/dist/printf-CX64KX2P-DS9NCBYX.mjs +0 -1
- package/dist/public/assets/ShareBranchSwitchDialog-uskl1Wv4.js +0 -1
- package/dist/pwd-D4OZ7N27-PztYFitl.mjs +0 -1
- package/dist/radar-PYXPWWZC-BPIU1oIT.mjs +0 -1
- package/dist/readlink-MI4GCHJF-B72qVA05.mjs +0 -1
- package/dist/repair-skills-DADzcSUt.mjs +0 -1
- package/dist/repair-skills-wxyzsDDA.mjs +0 -3
- package/dist/rev-XOSYPP45-ByX-mrLe.mjs +0 -1
- package/dist/rg-XNF3R3II-CnMv6YV-.mjs +0 -1
- package/dist/rm-RTZG23RL-CEw97Zb0.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-BFdmBJEt.mjs +0 -1
- package/dist/sed-JAPPVBEU-2bqT53N-.mjs +0 -1
- package/dist/seq-RN5ZUASB-DxG4OIr9.mjs +0 -1
- package/dist/server-lock-GuuouVft-JSvkXrbf.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-4-wvJ2xb.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-BaaxN7Tl.mjs +0 -1
- package/dist/sleep-VZFPZFWA-BllHeqyP.mjs +0 -1
- package/dist/sort-DCNRDA7U-CuZyvLiY.mjs +0 -1
- package/dist/split-SITCSYCZ-_ZnwVuas.mjs +0 -1
- package/dist/sqlite3-TE5AIOTF-CNPF-saV.mjs +0 -1
- package/dist/start-BjKuLBjR.mjs +0 -3
- package/dist/start-CvWSkAFO.mjs +0 -1
- package/dist/stat-BT5A227F-D9HiKzDi.mjs +0 -1
- package/dist/stateDiagram-v2-QKLJ7IA2-Cu9wyPTl.mjs +0 -2
- package/dist/strings-7PLOGTPD-kZJh53lS.mjs +0 -1
- package/dist/tac-SJGXQ4T2-Eo9pASuo.mjs +0 -1
- package/dist/tail-S5ULNTJU-PpwHAjse.mjs +0 -1
- package/dist/tar-MZQD7NO4-9e7UblLx.mjs +0 -1
- package/dist/tee-O7VXZDCO-CBU43Hsm.mjs +0 -1
- package/dist/time-DEUO3QV2-BpiPEFvF.mjs +0 -1
- package/dist/timeout-VRKMCG72-COJoI5YN.mjs +0 -1
- package/dist/touch-DX2IJOQ4-C4-z30TF.mjs +0 -1
- package/dist/tr-2HXZRDSW-C9BbHiUE.mjs +0 -1
- package/dist/tree-LYXBS7DC-BSj-bS3l.mjs +0 -1
- package/dist/treeView-SZITEDCU-CxDAshOW.mjs +0 -1
- package/dist/treemap-W4RFUUIX-Akln3RQv.mjs +0 -1
- package/dist/true-WHJNXCHG-BkJIzmUI.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-C-to2fwU.mjs +0 -1
- package/dist/uniq-SUNANL47-o1tLcwbX.mjs +0 -1
- package/dist/wardley-RL74JXVD-Djy_JGGm.mjs +0 -1
- package/dist/wc-TQB3VNOX-B-lPuWMt.mjs +0 -1
- package/dist/which-XZHEH76L-a4M_VoGw.mjs +0 -1
- package/dist/whoami-DGKU3D2X-DJ9OZDEX.mjs +0 -1
- package/dist/xan-UD7JYIL2-DqVUhpbk.mjs +0 -1
- package/dist/xan-view-OW2TB7Z3-BmNMcZHM.mjs +0 -1
- package/dist/xargs-I6EZUCYF-DphRNePs.mjs +0 -1
- package/dist/yazl-CQSNnbvt.mjs +0 -1
- package/dist/yq-OAKYHSXH-BBrPVcxh.mjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{s as e}from"./chunk-C94x7I9S.mjs";import{
|
|
1
|
+
import{s as e}from"./chunk-C94x7I9S.mjs";import{Jo as t}from"./dist-gqZDYmIG.mjs";import{c as n,l as r,s as i,u as a}from"./server-lock-iLcBw_q0-CSsXlPB8.mjs";import{Aa as o,Fr as s,Oa as c,Pr as l,Tn as u,dn as d,sa as f,si as p,xn as m}from"./dist-petOQDm6.mjs";import{t as h}from"./yazl-DFMxUgKn.mjs";import{t as g}from"./esm-PWRRAk-U.mjs";import"./gh-detect-DT6DqKGM.mjs";import{E as _,S as v,T as y,_ as ee,b as te,o as b,v as x,w as S}from"./init-KCSJffNW.mjs";import{n as C}from"./constants-B18JyjBC.mjs";import{t as w}from"./is-object-DhiFit5j.mjs";import{_ as ne,d as re,i as ie,v as T}from"./write-project-skill-CQSo7jpP.mjs";import"./loader-BqECoP19.mjs";import{c as ae}from"./colors-DWZN3WbY.mjs";import"./preview-Bmngkbmx.mjs";import{execSync as oe,spawnSync as E}from"node:child_process";import{basename as D,dirname as O,isAbsolute as k,join as A,relative as se,resolve as j,sep as ce}from"node:path";import{cpSync as le,createWriteStream as ue,existsSync as M,lstatSync as de,mkdirSync as N,mkdtempSync as fe,readFileSync as P,readdirSync as F,readlinkSync as pe,rmSync as I,statSync as me,writeFileSync as L}from"node:fs";import{arch as he,freemem as ge,homedir as _e,hostname as ve,platform as ye,release as be,tmpdir as xe,totalmem as Se,type as Ce,uptime as we}from"node:os";import{createHash as R}from"node:crypto";import{readFile as z,realpath as B}from"node:fs/promises";const Te=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)\S+/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@]+:[^/\s:@]+@/g,replacement:`://[REDACTED]@`}],Ee=Te.map(e=>e.name);function V(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
2
2
|
`).map(e=>{let r=e;for(let{name:e,regex:i,replacement:a}of Te)i.lastIndex=0,i.test(r)&&(t.add(e),n++,i.lastIndex=0,r=r.replace(i,a));return r}).join(`
|
|
3
|
-
`),patterns:[...t],lineCount:n}}function De(){return A(_e(),`.ok`,`bug-reports`)}function Oe(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`);return A(De(),`${t}-bugreport.zip`)}function ke(e,t){let n=A(e,`.ok`,`config.yml`);if(M(n))try{let e=P(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return M(A(e,`.ok`))?R(`sha256`).update(j(e)).digest(`hex`).slice(0,12):null}function Ae(){let e={timestamp:new Date().toISOString(),platform:ye(),osType:Ce(),osRelease:be(),hostname:`[redacted]`,uptime:we(),freeMem:ge(),totalMem:Se(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=oe(`sw_vers -productVersion 2>/dev/null`,f({encoding:`utf8`})).trim()}catch{}try{let t=A(__dirname,`..`,`..`,`package.json`);M(t)&&(e.okVersion=JSON.parse(P(t,`utf8`)).version)}catch{}return e}function je(e,t){if(!M(t))return{files:[]};let n=F(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>A(t,e));if(e&&n.length>0){let t=n.filter(t=>{try{return P(t,`utf8`).includes(`"project":"${e}"`)}catch{return!0}});t.length>0&&(n=t)}return{files:n}}function Me(e){let t=A(e,`.ok`,`local`);return M(t)?{files:[`server.lock`,`last-spawn-error.log`].map(e=>A(t,e)).filter(e=>M(e))}:{files:[]}}function Ne(e){let t=A(e,`.ok`,`local`,`logs`);return M(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>A(t,e)).filter(e=>M(e))}:{files:[]}}function Pe(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=V(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function H(e){for(let t of e.files)try{Pe({zipfile:e.zipfile,name:`${e.prefix}/${D(t)}`,content:P(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n instanceof Error?n.message:String(n)},`bug-report: skipped unreadable file`)}}async function Fe(t){let{redact:n,outputPath:r,logger:i}=t,a=t.userLogsDir??A(_e(),`.ok`,`logs`),o=t.projectDir?ke(t.projectDir,i):null;N(O(r),{recursive:!0}),i?.info({projectSlug:o},`gathering diagnostic data`);let s=Ae();s.desktop=t.desktop??null;let{files:c}=je(o,a),{files:l}=t.projectDir?Me(t.projectDir):{files:[]},{files:u}=t.projectDir?Ne(t.projectDir):{files:[]};i?.info({logFileCount:c.length,lockFileCount:l.length,localSinkFileCount:u.length},`files collected`);let d=[],f=[],{ZipFile:p}=await import(`./yazl-
|
|
3
|
+
`),patterns:[...t],lineCount:n}}function De(){return A(_e(),`.ok`,`bug-reports`)}function Oe(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`);return A(De(),`${t}-bugreport.zip`)}function ke(e,t){let n=A(e,`.ok`,`config.yml`);if(M(n))try{let e=P(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return M(A(e,`.ok`))?R(`sha256`).update(j(e)).digest(`hex`).slice(0,12):null}function Ae(){let e={timestamp:new Date().toISOString(),platform:ye(),osType:Ce(),osRelease:be(),hostname:`[redacted]`,uptime:we(),freeMem:ge(),totalMem:Se(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=oe(`sw_vers -productVersion 2>/dev/null`,f({encoding:`utf8`})).trim()}catch{}try{let t=A(__dirname,`..`,`..`,`package.json`);M(t)&&(e.okVersion=JSON.parse(P(t,`utf8`)).version)}catch{}return e}function je(e,t){if(!M(t))return{files:[]};let n=F(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>A(t,e));if(e&&n.length>0){let t=n.filter(t=>{try{return P(t,`utf8`).includes(`"project":"${e}"`)}catch{return!0}});t.length>0&&(n=t)}return{files:n}}function Me(e){let t=A(e,`.ok`,`local`);return M(t)?{files:[`server.lock`,`last-spawn-error.log`].map(e=>A(t,e)).filter(e=>M(e))}:{files:[]}}function Ne(e){let t=A(e,`.ok`,`local`,`logs`);return M(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>A(t,e)).filter(e=>M(e))}:{files:[]}}function Pe(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=V(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function H(e){for(let t of e.files)try{Pe({zipfile:e.zipfile,name:`${e.prefix}/${D(t)}`,content:P(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n instanceof Error?n.message:String(n)},`bug-report: skipped unreadable file`)}}async function Fe(t){let{redact:n,outputPath:r,logger:i}=t,a=t.userLogsDir??A(_e(),`.ok`,`logs`),o=t.projectDir?ke(t.projectDir,i):null;N(O(r),{recursive:!0}),i?.info({projectSlug:o},`gathering diagnostic data`);let s=Ae();s.desktop=t.desktop??null;let{files:c}=je(o,a),{files:l}=t.projectDir?Me(t.projectDir):{files:[]},{files:u}=t.projectDir?Ne(t.projectDir):{files:[]};i?.info({logFileCount:c.length,lockFileCount:l.length,localSinkFileCount:u.length},`files collected`);let d=[],f=[],{ZipFile:p}=await import(`./yazl-B1RwDQQs.mjs`).then(t=>e(t.default,1)),m=new p;H({zipfile:m,files:c,prefix:`logs`,redact:n,bundleFiles:f,redactions:d,logger:i}),H({zipfile:m,files:l,prefix:`lockdir`,redact:n,bundleFiles:f,redactions:d,logger:i}),H({zipfile:m,files:u,prefix:`local-logs`,redact:n,bundleFiles:f,redactions:d,logger:i});for(let e of t.extraFiles??[])try{let t=P(e.sourcePath),n=`extra/${e.zipName??D(e.sourcePath)}`;m.addBuffer(t,n),f.push(n)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Pe({zipfile:m,name:`note.txt`,content:t.note,redact:n,bundleFiles:f,redactions:d});let h=JSON.stringify(s,null,2);m.addBuffer(Buffer.from(h,`utf8`),`sysinfo.json`),f.push(`sysinfo.json`);let g={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:o,files:f,redactions:d,sysinfo:s};m.addBuffer(Buffer.from(JSON.stringify(g,null,2),`utf8`),`MANIFEST.json`);let _=d.reduce((e,t)=>e+t.lineCount,0),v=[`# Bug Report Bundle`,``,`Generated: ${g.generatedAt}`,`Project: ${o??`(unscoped)`}`,`Discipline version: ${g.disciplineVersion}`,``,`## Contents`,``,...f.map(e=>`- ${e}`),``,`## Privacy`,``,...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${Ee.join(`, `)}`,_>0?`${_} line(s) were scrubbed across ${d.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
|
|
4
4
|
`);m.addBuffer(Buffer.from(v,`utf8`),`README.md`),m.end();let y=ue(r);return m.outputStream.pipe(y),await new Promise((e,t)=>{y.on(`close`,e),y.on(`error`,t)}),i?.info({bundlePath:r,fileCount:f.length,redactionCount:_},`bundle written`),{zipPath:r,summary:{projectSlug:o,files:f,redactions:d,redactedLineCount:_,generatedAt:g.generatedAt}}}const Ie=new Set([`doc.name`]);function Le(e){return`doc:${R(`blake2b512`,{outputLength:32}).update(e).digest(`hex`).slice(0,8)}`}function Re(e,t,n){let r=e.docNameMap[n];if(r===void 0){e.docNameMap[n]=t;return}if(r===t)return;let i=e.docNameCollisions[n];i?i.includes(t)||i.push(t):e.docNameCollisions[n]=[t]}function ze(e,t){let n=t.originalToHashed.get(e);if(n!==void 0)return n;let r=Le(e);return t.originalToHashed.set(e,r),Re(t,e,r),r}function U(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function W(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function G(e,t){if(typeof e==`string`)return U(e,t.contentDir);if(Array.isArray(e))return e.map(e=>G(e,t));if(!W(e))return e;let n=typeof e.key==`string`&&Ie.has(e.key)&&W(e.value)&&typeof e.value.stringValue==`string`?e.value.stringValue:null,r={};for(let[i,a]of Object.entries(e))if(n!==null&&i===`value`&&W(a)){let e=ze(n,t);r[i]={...a,stringValue:e}}else Ie.has(i)&&typeof a==`string`?r[i]=ze(a,t):r[i]=G(a,t);return r}function Be(e,t){if(t.originalToHashed.size===0)return e;let n=Array.from(t.originalToHashed.entries()).sort(([e],[t])=>t.length-e.length),r=e;for(let[e,t]of n)e.length!==0&&r.includes(e)&&(r=r.split(e).join(t));return r}function Ve(e,t){let n=P(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
5
5
|
`),i=n.split(`
|
|
6
6
|
`),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=G(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}L(e,r?`${a.join(`
|
|
7
7
|
`)}\n`:a.join(`
|
|
8
8
|
`))}function He(e,t){let n=P(e,`utf-8`);if(n.trim().length!==0)try{let r=G(JSON.parse(n),t),i=n.endsWith(`
|
|
9
9
|
`)?`
|
|
10
|
-
`:``;L(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Be(U(n,t.contentDir),t);r!==n&&L(e,r)}}function Ue(e,t){let n=P(e,`utf-8`),r=U(n,t.contentDir);r!==n&&L(e,r)}function We(e){try{return F(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>A(e,t.name))}catch{return[]}}const Ge=new Set([`agent-presence.json`,`runtime.json`]);function Ke(e){let t={contentDir:e.contentDir,docNameMap:{},originalToHashed:new Map,docNameCollisions:{}};for(let n of[`telemetry`,`logs`,`process`])for(let r of We(A(e.stagingDir,n)))r.endsWith(`.jsonl`)?Ve(r,t):r.endsWith(`.json`)?He(r,t):Ue(r,t);for(let n of We(A(e.stagingDir,`state`))){let e=D(n);Ge.has(e)?He(n,t):Ue(n,t)}return{docNameMap:t.docNameMap,docNameCollisions:t.docNameCollisions}}var K=
|
|
11
|
-
`:`not-running (${h})\n`;if(L(A(d,`state`,`server-status.txt`),te),e.processDir&&M(e.processDir)){let t=A(d,`process`);N(t,{recursive:!0}),le(e.processDir,t,{recursive:!0})}let b=null;e.redact===!0&&(b=Ke({stagingDir:d,contentDir:t})),e.note&&L(A(d,`note.txt`),e.note);let x=null;e.scrubSecrets===!0&&(x=xt(d));for(let t of e.extraFiles??[])Y(t.sourcePath,A(d,`extra`,t.zipName??D(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let S=ft(n),C=gt(d),w=[],ne=0,re=0;for(let e of C){let t=St(d,e),n=me(e).size,r=vt(t)?mt(e):0;w.push({path:t,bytes:n,lines:r}),ne+=n,t.startsWith(`telemetry/`)&&vt(t)&&(re+=ht(e))}let ie=b===null?{applied:!1,docNameMapSidecar:null}:Object.keys(b.docNameCollisions).length>0?{applied:!0,docNameMapSidecar:null,docNameCollisions:b.docNameCollisions}:{applied:!0,docNameMapSidecar:null};x!==null&&(ie.secretScrub=x);let T={schemaVersion:1,createdAt:o().toISOString(),ok:{version:s(),nodeVersion:v.nodeVersion,platform:v.platform,arch:v.arch},host:{desktop:y},contentDir:{pathSha256:pt(t),absolutePath:b===null?t:`<CONTENT_DIR>`},telemetry:{localSink:S,otlpPushEnabled:u()},redaction:ie,serverStatus:m,files:w};L(A(d,`manifest.json`),`${JSON.stringify(T,null,2)}\n`);let ae=C.some(e=>{try{return P(e,`utf-8`).includes(t)}catch{return!1}}),oe={totalBytes:ne,fileCount:w.length,docNameCount:re,contentDirVisible:ae,redacted:b!==null},E=!1;return{stagingDir:d,manifest:T,summary:oe,redactionMapPayload:b===null?null:{docNameMap:b.docNameMap,docNameCollisions:b.docNameCollisions},cleanup:()=>{E||(E=!0,I(d,{recursive:!0,force:!0}))}}}catch(e){throw I(d,{recursive:!0,force:!0}),e}}async function wt(e){let{collected:t,outputPath:n}=e,r=O(n);if(!M(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);if(t.redactionMapPayload!==null){let e=`${D(n,`.zip`)}.docnames.json`,r={...t.manifest,redaction:{...t.manifest.redaction,applied:!0,docNameMapSidecar:e}};L(A(t.stagingDir,`manifest.json`),`${JSON.stringify(r,null,2)}\n`)}let i=new qe.ZipFile,a=gt(t.stagingDir);for(let e of a){let n=St(t.stagingDir,e);i.addFile(e,n)}i.end(),t.redactionMapPayload!==null&&L(A(r,`${D(n,`.zip`)}.docnames.json`),`${JSON.stringify({docNameMap:t.redactionMapPayload.docNameMap,docNameCollisions:t.redactionMapPayload.docNameCollisions},null,2)}\n`,{mode:384});let o=ue(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function Tt(e,t){let n=A(e,`.ok`,`config.yml`);if(M(n))try{let t=(0,K.parse)(P(n,`utf-8`)),r=w(t)?t.content:void 0,i=w(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return j(e,i)}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return j(e)}async function Et(e,t,n){let r=await Ct({contentDir:Tt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,deps:{readDesktopEnv:n,logger:e.logger}});try{N(O(e.outputPath),{recursive:!0}),await wt({collected:r,outputPath:e.outputPath});let n=r.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:ke(t,e.logger),files:r.manifest.files.map(e=>e.path),redactions:n?.redactions??[],redactedLineCount:n?.redactedLineCount??0,generatedAt:r.manifest.createdAt}}}finally{r.cleanup()}}async function Dt(e){let{projectDir:t}=e,n=e.readDesktopEnv??ot;if(e.level===`full`&&t!==void 0)return Et(e,t,n);let{zipPath:r,summary:i}=await Fe({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n()});return{zipPath:r,summary:{level:e.level,systemWide:t===void 0,projectSlug:i.projectSlug,files:i.files,redactions:i.redactions,redactedLineCount:i.redactedLineCount,generatedAt:i.generatedAt}}}function X(e,
|
|
10
|
+
`:``;L(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Be(U(n,t.contentDir),t);r!==n&&L(e,r)}}function Ue(e,t){let n=P(e,`utf-8`),r=U(n,t.contentDir);r!==n&&L(e,r)}function We(e){try{return F(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>A(e,t.name))}catch{return[]}}const Ge=new Set([`agent-presence.json`,`runtime.json`]);function Ke(e){let t={contentDir:e.contentDir,docNameMap:{},originalToHashed:new Map,docNameCollisions:{}};for(let n of[`telemetry`,`logs`,`process`])for(let r of We(A(e.stagingDir,n)))r.endsWith(`.jsonl`)?Ve(r,t):r.endsWith(`.json`)?He(r,t):Ue(r,t);for(let n of We(A(e.stagingDir,`state`))){let e=D(n);Ge.has(e)?He(n,t):Ue(n,t)}return{docNameMap:t.docNameMap,docNameCollisions:t.docNameCollisions}}var K=t(),qe=e(h(),1);const Je=[`.ok`,`local`,`telemetry`],Ye=[`.ok`,`local`,`logs`],Xe=`spans-current.jsonl`,Ze=`spans-prev.jsonl`,Qe=`server-current.jsonl`,$e=`server-prev.jsonl`;function et(e){return A(e,...Je,Xe)}function tt(e){return A(e,...Je,Ze)}function nt(e){return A(e,...Ye,Qe)}function rt(e){return A(e,...Ye,$e)}async function it(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(1e3)});return t.ok?await t.text():null}catch{return null}}function at(e){let t=A(e,`.git`,`ok`);if(!M(t))return null;let n=E(`git`,[`-C`,t,`log`,`--oneline`,`-50`],f({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function ot(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function st(){return{nodeVersion:process.version,platform:ye(),arch:he()}}function ct(){return process.env.OTEL_SDK_DISABLED===`false`}function q(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function lt(e){if(!M(e))return{};let t;try{t=(0,K.parse)(P(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!q(t))return{};let n=t.telemetry;if(!q(n))return{};let r=n.localSink;return q(r)?r:{}}function ut(e){return typeof e==`boolean`?e:void 0}function dt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function J(e){if(q(e))return dt(e.maxBytes)}function ft(e){let t=lt(o(`project`,e)),n=lt(o(`project-local`,e));return{enabled:ut(n.enabled)??ut(t.enabled)??!0,spansMaxBytes:J(n.spans)??J(t.spans)??52428800,logsMaxBytes:J(n.logs)??J(t.logs)??26214400}}function pt(e){return R(`sha256`).update(e).digest(`hex`)}function mt(e){let t=P(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function ht(e){let t=P(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function Y(e,t){return M(e)?(N(O(t),{recursive:!0}),le(e,t),!0):!1}function gt(e){let t=[],n=e=>{let r=F(e,{withFileTypes:!0});for(let i of r){let r=A(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const _t=new Set([`.jsonl`]);function vt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:_t.has(e.slice(t))}const yt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function bt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:yt.has(e.slice(t))}function xt(e){let t=[];for(let n of gt(e)){let r=St(e,n);if(!bt(r))continue;let{redacted:i,patterns:a,lineCount:o}=V(P(n,`utf-8`));a.length!==0&&(L(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function St(e,t){return se(e,t).split(ce).join(`/`)}async function Ct(e){let t=j(e.contentDir),n=j(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??it,a=r.readShadowHead??at,o=r.now??(()=>new Date),s=r.okVersion??(()=>C),c=r.readDesktopEnv??ot,l=r.readRuntime??st,u=r.isOtlpPushEnabled??ct,d=fe(A(xe(),`ok-bundle-`));try{N(A(d,`telemetry`),{recursive:!0}),N(A(d,`logs`),{recursive:!0}),N(A(d,`state`),{recursive:!0}),Y(et(n),A(d,`telemetry`,Xe)),Y(tt(n),A(d,`telemetry`,Ze)),Y(nt(n),A(d,`logs`,Qe)),Y(rt(n),A(d,`logs`,$e));let f=A(n,`.ok`,`local`),p=A(f,`server.lock`),m=`not-running`,h=`no server.lock`,g=null;if(M(p)){Y(p,A(d,`state`,`server.lock`));try{let e=P(p,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?g=t.port:h=`lock present but no port`}catch{h=`lock present but unparseable`}}if(g!==null){let e=await i(g);e===null?h=`agent-presence endpoint at :${g} unreachable`:(L(A(d,`state`,`agent-presence.json`),e),m=`running`,h=``)}let _=a(t);_!==null&&L(A(d,`state`,`shadow-head.txt`),_),Y(A(f,`last-spawn-error.log`),A(d,`state`,`last-spawn-error.log`));let v=l(),y=c(),ee={ok:{version:s(),nodeVersion:v.nodeVersion,platform:v.platform,arch:v.arch},host:{desktop:y}};L(A(d,`state`,`runtime.json`),`${JSON.stringify(ee,null,2)}\n`);let te=m===`running`?`running
|
|
11
|
+
`:`not-running (${h})\n`;if(L(A(d,`state`,`server-status.txt`),te),e.processDir&&M(e.processDir)){let t=A(d,`process`);N(t,{recursive:!0}),le(e.processDir,t,{recursive:!0})}let b=null;e.redact===!0&&(b=Ke({stagingDir:d,contentDir:t})),e.note&&L(A(d,`note.txt`),e.note);let x=null;e.scrubSecrets===!0&&(x=xt(d));for(let t of e.extraFiles??[])Y(t.sourcePath,A(d,`extra`,t.zipName??D(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let S=ft(n),C=gt(d),w=[],ne=0,re=0;for(let e of C){let t=St(d,e),n=me(e).size,r=vt(t)?mt(e):0;w.push({path:t,bytes:n,lines:r}),ne+=n,t.startsWith(`telemetry/`)&&vt(t)&&(re+=ht(e))}let ie=b===null?{applied:!1,docNameMapSidecar:null}:Object.keys(b.docNameCollisions).length>0?{applied:!0,docNameMapSidecar:null,docNameCollisions:b.docNameCollisions}:{applied:!0,docNameMapSidecar:null};x!==null&&(ie.secretScrub=x);let T={schemaVersion:1,createdAt:o().toISOString(),ok:{version:s(),nodeVersion:v.nodeVersion,platform:v.platform,arch:v.arch},host:{desktop:y},contentDir:{pathSha256:pt(t),absolutePath:b===null?t:`<CONTENT_DIR>`},telemetry:{localSink:S,otlpPushEnabled:u()},redaction:ie,serverStatus:m,files:w};L(A(d,`manifest.json`),`${JSON.stringify(T,null,2)}\n`);let ae=C.some(e=>{try{return P(e,`utf-8`).includes(t)}catch{return!1}}),oe={totalBytes:ne,fileCount:w.length,docNameCount:re,contentDirVisible:ae,redacted:b!==null},E=!1;return{stagingDir:d,manifest:T,summary:oe,redactionMapPayload:b===null?null:{docNameMap:b.docNameMap,docNameCollisions:b.docNameCollisions},cleanup:()=>{E||(E=!0,I(d,{recursive:!0,force:!0}))}}}catch(e){throw I(d,{recursive:!0,force:!0}),e}}async function wt(e){let{collected:t,outputPath:n}=e,r=O(n);if(!M(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);if(t.redactionMapPayload!==null){let e=`${D(n,`.zip`)}.docnames.json`,r={...t.manifest,redaction:{...t.manifest.redaction,applied:!0,docNameMapSidecar:e}};L(A(t.stagingDir,`manifest.json`),`${JSON.stringify(r,null,2)}\n`)}let i=new qe.ZipFile,a=gt(t.stagingDir);for(let e of a){let n=St(t.stagingDir,e);i.addFile(e,n)}i.end(),t.redactionMapPayload!==null&&L(A(r,`${D(n,`.zip`)}.docnames.json`),`${JSON.stringify({docNameMap:t.redactionMapPayload.docNameMap,docNameCollisions:t.redactionMapPayload.docNameCollisions},null,2)}\n`,{mode:384});let o=ue(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function Tt(e,t){let n=A(e,`.ok`,`config.yml`);if(M(n))try{let t=(0,K.parse)(P(n,`utf-8`)),r=w(t)?t.content:void 0,i=w(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return j(e,i)}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return j(e)}async function Et(e,t,n){let r=await Ct({contentDir:Tt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,deps:{readDesktopEnv:n,logger:e.logger}});try{N(O(e.outputPath),{recursive:!0}),await wt({collected:r,outputPath:e.outputPath});let n=r.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:ke(t,e.logger),files:r.manifest.files.map(e=>e.path),redactions:n?.redactions??[],redactedLineCount:n?.redactedLineCount??0,generatedAt:r.manifest.createdAt}}}finally{r.cleanup()}}async function Dt(e){let{projectDir:t}=e,n=e.readDesktopEnv??ot;if(e.level===`full`&&t!==void 0)return Et(e,t,n);let{zipPath:r,summary:i}=await Fe({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n()});return{zipPath:r,summary:{level:e.level,systemWide:t===void 0,projectSlug:i.projectSlug,files:i.files,redactions:i.redactions,redactedLineCount:i.redactedLineCount,generatedAt:i.generatedAt}}}function X(e,t,o={}){let s=a(e,t);if(!M(s))return{status:`missing`,lockPath:s};let c;try{c=JSON.parse(P(s,`utf-8`))}catch{return{status:`corrupt`,lockPath:s}}if(!c||typeof c!=`object`||!r(c.pid))return{status:`corrupt`,lockPath:s};let l=c;if(!(o.isAlive??n)(l.pid))return{status:`dead-pid`,lockPath:s,lock:l};if(typeof l.machineId==`string`)return l.machineId===(o.machineId??i())?{status:`alive`,lockPath:s,lock:l}:{status:`foreign-host`,lockPath:s,lock:l};let u=o.host??ve();return l.hostname===u?{status:`alive`,lockPath:s,lock:l}:{status:`foreign-host`,lockPath:s,lock:l}}function Ot(e){return e.replace(/:\d+$/,``)}function kt(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:Ot(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:Ot(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:Ot(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function At(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}function jt(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`);if(n.length<5||n[0]!==``||n[3]!==`tree`)return null;let r=n.slice(5);r.length===1&&r[0]===``&&r.pop();let i,a,o,s;try{i=decodeURIComponent(n[1]),a=decodeURIComponent(n[2]),o=decodeURIComponent(n[4]),s=r.map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.some(e=>e.length===0)?null:{owner:i,repo:a,branch:o,path:s.join(`/`)}}function Mt(e){let t=At(e);if(t)return{kind:`doc`,...t};let n=jt(e);return n?{kind:`folder`,...n}:null}const Nt=`# >>> open-knowledge cli >>>`,Pt=`# <<< open-knowledge cli <<<`,Ft=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function It(e){return A(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Lt={existsSync:e=>M(e),readFileSync:(e,t)=>P(e,t),lstatSync:e=>de(e),readlinkSync:e=>pe(e)};function Rt(e,t=Lt){let n=It(e);if(!t.existsSync(n))return null;try{let e=JSON.parse(t.readFileSync(n,`utf8`));return e?.version===1?e:null}catch{return null}}function zt(e){let t=e.replace(Ft,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function Bt(e,t,n=Lt){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function Vt(e){return ne(e)||T(e)||v(e)}const Ht=10*1024*1024;function Ut(e,t,n,r){let i=b(e,t,n,r);if(i.kind===`absent`||i.kind===`no-entry`)return{kind:`not-present`};if(i.kind===`decline`)return{kind:`declined`,reason:i.reason};if(!Vt(i.entry))return{kind:`left-foreign`};let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=e.serverName(t);return e.format===`file`?(I(a,{force:!0}),{kind:`removed`}):e.format===`toml`?Kt(a,o):e.format===`yaml`?Gt(a,e.topLevelKey,o):Wt(a,e.topLevelKey,e.serverMapSubKey,o)}function Wt(e,t,n,r){let i;try{i=P(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>Ht)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=_(i,ee(t,n,r));return o?(c(e,a,{mode:S(e)}),{kind:`removed`}):{kind:`not-present`}}function Gt(e,t,n){let r;try{r=P(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>Ht)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,K.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let l=o.toString(),u=y(a);a.trim()===``||a.endsWith(`
|
|
12
12
|
`)?l.endsWith(`
|
|
13
13
|
`)||(l=`${l}\n`):l=l.replace(/\n+$/,``),u&&(l=l.replace(/\r\n/g,`
|
|
14
14
|
`).replace(/\n/g,`\r
|
|
@@ -17,5 +17,5 @@ import{s as e}from"./chunk-C94x7I9S.mjs";import{c as t,l as n,ps as r,s as i,u a
|
|
|
17
17
|
`)||(u=`${u}\n`):u=u.replace(/\n+$/,``),o&&(u=u.replace(/\r\n/g,`
|
|
18
18
|
`).replace(/\n/g,`\r
|
|
19
19
|
`));let d=`${i?``:``}${u}`;return d!==r&&c(e,d,{mode:S(e)}),{kind:`removed`}}const qt=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Jt(e,t,n=u){if(e!==void 0&&!qt.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Yt=null;function Xt(e){Yt=e}function Zt(){return Yt??process.cwd()}var Z=e(ae(),1);function Qt(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function $t(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function en(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:m(r),command:r,isDesktop:Qt(r)}}function tn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&tn(e)?`ui-orphan`:`stale`}const nn=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function rn(e){switch(e){case`running`:return Z.default.green(e);case`desktop`:return Z.default.blue(e);case`foreign`:return Z.default.cyan(e);case`ui-orphan`:return Z.default.magenta(e);case`stale`:return Z.default.yellow(e)}}function an(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function on(e){return`${an(e.server.usage)} | ${an(e.ui?.usage??null)}`}function sn(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function cn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,sn(e),on(e),t,String(n),$t(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=rn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=Z.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
|
|
20
|
-
`)}async function ln(e={}){let t=e.discover??d,n=e.inspect??X,r=e.log??(e=>console.log(e)),i=e.resolveCommand??l,a=e.resolveUsage??s,o=await t(),c=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=en(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&c.push(o)}if(e.json){let e=c.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(cn(e.all?c:c.filter(e=>nn.has(Q(e)))))}function un(){return new g(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await ln({all:t.all===!0||e===`all`,json:t.json===!0})})}function dn(e,
|
|
21
|
-
//# sourceMappingURL=src-
|
|
20
|
+
`)}async function ln(e={}){let t=e.discover??d,n=e.inspect??X,r=e.log??(e=>console.log(e)),i=e.resolveCommand??l,a=e.resolveUsage??s,o=await t(),c=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=en(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&c.push(o)}if(e.json){let e=c.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(cn(e.all?c:c.filter(e=>nn.has(Q(e)))))}function un(){return new g(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await ln({all:t.all===!0||e===`all`,json:t.json===!0})})}function dn(e,t,r={}){let i=r.isAlive??n,a=[];for(let[n,r]of[[`server`,e],[`ui`,t]])(r.status===`alive`||r.status===`foreign-host`&&i(r.lock.pid))&&a.push({name:n,pid:r.lock.pid,port:r.lock.port});return{targets:a}}function fn(e){let t=e.inspect??(t=>X(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=dn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function pn(e,t=n){let r=await d(),i=null;for(let n of r){let r=X(n,`server`),a=X(n,`ui`);if($(r,t)&&r.lock.port===e||$(a,t)&&a.lock.port===e)return n;i===null&&($(r,t)&&r.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(i=n)}return i}function mn(e){let t=fn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function hn(e){return new g(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let r=t.length===0?void 0:t.join(` `);if(r===void 0){e();let t=fn({lockDir:p(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await ln({});return}if(r===`all`){let e=await d();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let r of e){let e=X(r,`server`),i=X(r,`ui`);!$(e,n)&&!$(i,n)||(mn(r),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(r)){let e=Number.parseInt(r,10),t=await pn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}mn(t);return}mn(p(j(Zt(),r)))})}function gn(e){return{event:`mcp-config-decline`,scope:e.scope,surface:e.surface,editorId:e.editorId,reason:e.reason}}async function _n(e,t){let n,r;try{n=await B(j(e)),r=await B(j(O(e)))}catch{return{kind:`not-git`}}if(!yn(n,r))return{kind:`symlink-escape`};let i=A(n,`.git`),a;try{a=me(i)}catch{return{kind:`not-git`}}let o;if(a.isDirectory()){let e;try{e=await B(i)}catch{return{kind:`not-git`}}if(!yn(e,n))return{kind:`symlink-escape`};o=e}else if(a.isFile()){let e;try{e=await z(i,`utf-8`)}catch{return{kind:`not-git`}}let t=/^gitdir:\s*(.+)$/m.exec(e.trim());if(!t)return{kind:`not-git`};let r=t[1].trim(),a=k(r)?r:j(n,r);try{o=await B(a)}catch{return{kind:`not-git`}}}else return{kind:`not-git`};let s=A(await vn(o),`config`),c;try{c=await z(s,`utf-8`)}catch{return{kind:`not-git`}}let l=xn(c);if(l===null)return{kind:`no-origin`};let u=kt(l);if(u===null||u.hostname!==`github.com`)return{kind:`non-github`};let d=u.owner.toLowerCase()===t.owner.toLowerCase(),f=u.name.toLowerCase()===t.repo.toLowerCase();return!d||!f?{kind:`wrong-repo`,actualOwner:u.owner,actualRepo:u.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${u.owner}/${u.name}.git`}}async function vn(e){let t;try{t=(await z(A(e,`commondir`),`utf-8`)).trim()}catch{return e}if(t.length===0)return e;let n=k(t)?t:j(e,t);try{return await B(n)}catch{return n}}function yn(e,t){if(e===t)return!0;let n=se(t,e);return n.length>0&&!n.startsWith(`..`)&&!k(n)}function bn(e){let t=e.indexOf(`#`),n=e.indexOf(`;`),r=-1;return t>=0&&n>=0?r=Math.min(t,n):t>=0?r=t:n>=0&&(r=n),(r===-1?e:e.slice(0,r)).trim()}function xn(e){let t=!1;for(let n of e.split(/\r?\n/)){let e=bn(n);if(e.length===0)continue;if(e.startsWith(`[`)){t=/^\[\s*remote\s+["']origin["']\s*\]$/.test(e);continue}if(!t)continue;let r=/^url\s*=\s*(.+)$/.exec(e);if(r)return Sn(r[1])}return null}function Sn(e){let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}const Cn=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=x(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:i.action===`declined`?{integration:`mcp-config`,editorId:e.id,action:`declined`,path:i.configPath,...i.declineReason===void 0?{}:{reason:i.declineReason}}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let r=ie(e,t,{home:n.home});return{integration:`project-skill`,editorId:e.id,action:r.action,...r.path?{path:r.path}:{},...r.error?{error:r.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function wn(e,t,n={},r=Cn){let i=[];for(let a of t){let t=re[a];for(let a of r)i.push(a.write(t,e,n))}return i}function Tn(e,t,n={}){return{integrations:wn(e,t,n)}}export{Dt as C,V as D,Oe as E,X as S,wt as T,zt as _,hn as a,jt as b,Xt as c,Nt as d,Ft as f,Rt as g,It as h,fn as i,Jt as l,Bt as m,_n as n,un as o,Pt as p,gn as r,Zt as s,Tn as t,Ut as u,At as v,Ct as w,kt as x,Mt as y};
|
|
21
|
+
//# sourceMappingURL=src-7LGO0Yau.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{s as e,t}from"./chunk-C94x7I9S.mjs";var n=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var ee=`$isDayjsObject`,x=function(e){return e instanceof T||!(!e||!e[ee])},S=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},C=function(e,t){if(x(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new T(n)},w=v;w.l=S,w.i=x,w.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[ee]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return w},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return C(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<C(e)},_.$g=function(e,t,n){return w.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!w.u(t)||t,u=w.p(e),p=function(e,t){var i=w.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return w.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=w.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[w.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=w.p(u),h=function(e){var t=C(p);return w.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return w.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=w.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return w.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return w.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return w.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return w.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return w.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return w.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return w.s(t.$s,2,`0`);case`SSS`:return w.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=w.p(f),_=C(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return w.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:w.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return w.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),te=T.prototype;return C.prototype=te,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){te[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||=(e(t,T,C),!0),C},C.locale=S,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=b[y],C.Ls=b,C.p={},C}))})),r=e(n(),1),i=Object.defineProperty,a=(e,t)=>i(e,`name`,{value:t,configurable:!0}),o=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},c={trace:a((...e)=>{},`trace`),debug:a((...e)=>{},`debug`),info:a((...e)=>{},`info`),warn:a((...e)=>{},`warn`),error:a((...e)=>{},`error`),fatal:a((...e)=>{},`fatal`)},l=a(function(e=`fatal`){let t=s.fatal;typeof e==`string`?e.toLowerCase()in s&&(t=s[e]):typeof e==`number`&&(t=e),c.trace=()=>{},c.debug=()=>{},c.info=()=>{},c.warn=()=>{},c.error=()=>{},c.fatal=()=>{},t<=s.fatal&&(c.fatal=console.error?console.error.bind(console,u(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,u(`FATAL`))),t<=s.error&&(c.error=console.error?console.error.bind(console,u(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,u(`ERROR`))),t<=s.warn&&(c.warn=console.warn?console.warn.bind(console,u(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,u(`WARN`))),t<=s.info&&(c.info=console.info?console.info.bind(console,u(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,u(`INFO`))),t<=s.debug&&(c.debug=console.debug?console.debug.bind(console,u(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,u(`DEBUG`))),t<=s.trace&&(c.trace=console.debug?console.debug.bind(console,u(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,u(`TRACE`)))},`setLogLevel`),u=a(e=>`%c${(0,r.default)().format(`ss.SSS`)} : ${e} : `,`format`);function d(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function f(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function p(e){let t,n,r;e.length===2?(t=e===d||e===f?e:m,n=e,r=e):(t=d,n=(t,n)=>d(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function m(){return 0}function h(e){return e===null?NaN:+e}const g=p(d),_=g.right;g.left,p(h).center;var v=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.internmap={}))})(e,(function(e){class t extends Map{constructor(e,t=o){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(r(this,e))}has(e){return super.has(r(this,e))}set(e,t){return super.set(i(this,e),t)}delete(e){return super.delete(a(this,e))}}class n extends Set{constructor(e,t=o){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let t of e)this.add(t)}has(e){return super.has(r(this,e))}add(e){return super.add(i(this,e))}delete(e){return super.delete(a(this,e))}}function r({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function i({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function o(e){return typeof e==`object`&&e?e.valueOf():e}e.InternMap=t,e.InternSet=n,Object.defineProperty(e,`__esModule`,{value:!0})}))}));const y=Math.sqrt(50),b=Math.sqrt(10),ee=Math.sqrt(2);function x(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=y?10:a>=b?5:a>=ee?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?x(e,t,n*2):[s,c,l]}function S(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?x(t,e,n):x(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function C(e,t,n){return t=+t,e=+e,n=+n,x(e,t,n)[2]}function w(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?C(t,e,n):C(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function T(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var re=v(),ie={value:()=>{}};function ae(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new E(n)}function E(e){this._=e}function oe(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}E.prototype=ae.prototype={constructor:E,on:function(e,t){var n=this._,r=oe(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=se(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ce(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ce(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new E(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function se(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ce(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ie,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var le={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function ue(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),le.hasOwnProperty(t)?{space:le[t],local:e}:e}function de(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function fe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pe(e){var t=ue(e);return(t.local?fe:de)(t)}function me(){}function he(e){return e==null?me:function(){return this.querySelector(e)}}function ge(e){typeof e!=`function`&&(e=he(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new k(r,this._parents)}function _e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ve(){return[]}function ye(e){return e==null?ve:function(){return this.querySelectorAll(e)}}function be(e){return function(){return _e(e.apply(this,arguments))}}function xe(e){e=typeof e==`function`?be(e):ye(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new k(r,i)}function Se(e){return function(){return this.matches(e)}}function Ce(e){return function(t){return t.matches(e)}}var we=Array.prototype.find;function Te(e){return function(){return we.call(this.children,e)}}function Ee(){return this.firstElementChild}function De(e){return this.select(e==null?Ee:Te(typeof e==`function`?e:Ce(e)))}var Oe=Array.prototype.filter;function ke(){return Array.from(this.children)}function Ae(e){return function(){return Oe.call(this.children,e)}}function je(e){return this.selectAll(e==null?ke:Ae(typeof e==`function`?e:Ce(e)))}function Me(e){typeof e!=`function`&&(e=Se(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new k(r,this._parents)}function Ne(e){return Array(e.length)}function Pe(){return new k(this._enter||this._groups.map(Ne),this._parents)}function D(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}D.prototype={constructor:D,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Fe(e){return function(){return e}}function Ie(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new D(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Le(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new D(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Re(e){return e.__data__}function ze(e,t){if(!arguments.length)return Array.from(this,Re);var n=t?Le:Ie,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Fe(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Be(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new k(o,r),o._enter=s,o._exit=c,o}function Be(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ve(){return new k(this._exit||this._groups.map(Ne),this._parents)}function He(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ue(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new k(s,this._parents)}function We(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ge(e){e||=Ke;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new k(i,this._parents).order()}function Ke(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Je(){return Array.from(this)}function Ye(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Xe(){let e=0;for(let t of this)++e;return e}function Ze(){return!this.node()}function Qe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function $e(e){return function(){this.removeAttribute(e)}}function et(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tt(e,t){return function(){this.setAttribute(e,t)}}function nt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function it(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function at(e,t){var n=ue(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?et:$e:typeof t==`function`?n.local?it:rt:n.local?nt:tt)(n,t))}function ot(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function st(e){return function(){this.style.removeProperty(e)}}function ct(e,t,n){return function(){this.style.setProperty(e,t,n)}}function lt(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ut(e,t,n){return arguments.length>1?this.each((t==null?st:typeof t==`function`?lt:ct)(e,t,n??``)):O(this.node(),e)}function O(e,t){return e.style.getPropertyValue(t)||ot(e).getComputedStyle(e,null).getPropertyValue(t)}function dt(e){return function(){delete this[e]}}function ft(e,t){return function(){this[e]=t}}function pt(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function mt(e,t){return arguments.length>1?this.each((t==null?dt:typeof t==`function`?pt:ft)(e,t)):this.node()[e]}function ht(e){return e.trim().split(/^|\s+/)}function gt(e){return e.classList||new _t(e)}function _t(e){this._node=e,this._names=ht(e.getAttribute(`class`)||``)}_t.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function vt(e,t){for(var n=gt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yt(e,t){for(var n=gt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function bt(e){return function(){vt(this,e)}}function xt(e){return function(){yt(this,e)}}function St(e,t){return function(){(t.apply(this,arguments)?vt:yt)(this,e)}}function Ct(e,t){var n=ht(e+``);if(arguments.length<2){for(var r=gt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?St:t?bt:xt)(n,t))}function wt(){this.textContent=``}function Tt(e){return function(){this.textContent=e}}function Et(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Dt(e){return arguments.length?this.each(e==null?wt:(typeof e==`function`?Et:Tt)(e)):this.node().textContent}function Ot(){this.innerHTML=``}function kt(e){return function(){this.innerHTML=e}}function At(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function jt(e){return arguments.length?this.each(e==null?Ot:(typeof e==`function`?At:kt)(e)):this.node().innerHTML}function Mt(){this.nextSibling&&this.parentNode.appendChild(this)}function Nt(){return this.each(Mt)}function Pt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ft(){return this.each(Pt)}function It(e){var t=typeof e==`function`?e:pe(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lt(){return null}function Rt(e,t){var n=typeof e==`function`?e:pe(e),r=t==null?Lt:typeof t==`function`?t:he(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function zt(){var e=this.parentNode;e&&e.removeChild(this)}function Bt(){return this.each(zt)}function Vt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ht(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ut(e){return this.select(e?Ht:Vt)}function Wt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Gt(e){return function(t){e.call(this,t,this.__data__)}}function Kt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function qt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Jt(e,t,n){return function(){var r=this.__on,i,a=Gt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Yt(e,t,n){var r=Kt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Jt:qt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Xt(e,t,n){var r=ot(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Zt(e,t){return function(){return Xt(this,e,t)}}function Qt(e,t){return function(){return Xt(this,e,t.apply(this,arguments))}}function $t(e,t){return this.each((typeof t==`function`?Qt:Zt)(e,t))}function*en(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var tn=[null];function k(e,t){this._groups=e,this._parents=t}function A(){return new k([[document.documentElement]],tn)}function nn(){return this}k.prototype=A.prototype={constructor:k,select:ge,selectAll:xe,selectChild:De,selectChildren:je,filter:Me,data:ze,enter:Pe,exit:Ve,join:He,merge:Ue,selection:nn,order:We,sort:Ge,call:qe,nodes:Je,node:Ye,size:Xe,empty:Ze,each:Qe,attr:at,style:ut,property:mt,classed:Ct,text:Dt,html:jt,raise:Nt,lower:Ft,append:It,insert:Rt,remove:Bt,clone:Ut,datum:Wt,on:Yt,dispatch:$t,[Symbol.iterator]:en};function rn(e){return typeof e==`string`?new k([[document.querySelector(e)]],[document.documentElement]):new k([[e]],tn)}function j(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function an(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function M(){}var N=.7,P=1/N,F=`\\s*([+-]?\\d+)\\s*`,I=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,L=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,on=/^#([0-9a-f]{3,8})$/,sn=RegExp(`^rgb\\(${F},${F},${F}\\)$`),cn=RegExp(`^rgb\\(${L},${L},${L}\\)$`),ln=RegExp(`^rgba\\(${F},${F},${F},${I}\\)$`),un=RegExp(`^rgba\\(${L},${L},${L},${I}\\)$`),dn=RegExp(`^hsl\\(${I},${L},${L}\\)$`),fn=RegExp(`^hsla\\(${I},${L},${L},${I}\\)$`),pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};j(M,R,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHex8:hn,formatHsl:gn,formatRgb:_n,toString:_n});function mn(){return this.rgb().formatHex()}function hn(){return this.rgb().formatHex8()}function gn(){return Dn(this).formatHsl()}function _n(){return this.rgb().formatRgb()}function R(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=on.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vn(t):n===3?new z(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sn.exec(e))?new z(t[1],t[2],t[3],1):(t=cn.exec(e))?new z(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ln.exec(e))?yn(t[1],t[2],t[3],t[4]):(t=un.exec(e))?yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dn.exec(e))?En(t[1],t[2]/100,t[3]/100,1):(t=fn.exec(e))?En(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?vn(pn[e]):e===`transparent`?new z(NaN,NaN,NaN,0):null}function vn(e){return new z(e>>16&255,e>>8&255,e&255,1)}function yn(e,t,n,r){return r<=0&&(e=t=n=NaN),new z(e,t,n,r)}function bn(e){return e instanceof M||(e=R(e)),e?(e=e.rgb(),new z(e.r,e.g,e.b,e.opacity)):new z}function xn(e,t,n,r){return arguments.length===1?bn(e):new z(e,t,n,r??1)}function z(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j(z,xn,an(M,{brighter(e){return e=e==null?P:P**+e,new z(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?N:N**+e,new z(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new z(B(this.r),B(this.g),B(this.b),Tn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sn,formatHex:Sn,formatHex8:Cn,formatRgb:wn,toString:wn}));function Sn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}`}function Cn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity)?1:this.opacity)*255)}`}function wn(){let e=Tn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${B(this.r)}, ${B(this.g)}, ${B(this.b)}${e===1?`)`:`, ${e})`}`}function Tn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function B(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function V(e){return e=B(e),(e<16?`0`:``)+e.toString(16)}function En(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new H(e,t,n,r)}function Dn(e){if(e instanceof H)return new H(e.h,e.s,e.l,e.opacity);if(e instanceof M||(e=R(e)),!e)return new H;if(e instanceof H)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new H(o,s,c,e.opacity)}function On(e,t,n,r){return arguments.length===1?Dn(e):new H(e,t,n,r??1)}function H(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j(H,On,an(M,{brighter(e){return e=e==null?P:P**+e,new H(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?N:N**+e,new H(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new z(An(e>=240?e-240:e+120,i,r),An(e,i,r),An(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new H(kn(this.h),U(this.s),U(this.l),Tn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Tn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${kn(this.h)}, ${U(this.s)*100}%, ${U(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function kn(e){return e=(e||0)%360,e<0?e+360:e}function U(e){return Math.max(0,Math.min(1,e||0))}function An(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var jn=e=>()=>e;function Mn(e,t){return function(n){return e+n*t}}function Nn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Pn(e,t){var n=t-e;return n?Mn(e,n>180||n<-180?n-360*Math.round(n/360):n):jn(isNaN(e)?t:e)}function Fn(e){return(e=+e)==1?In:function(t,n){return n-t?Nn(t,n,e):jn(isNaN(t)?n:t)}}function In(e,t){var n=t-e;return n?Mn(e,n):jn(isNaN(e)?t:e)}var Ln=(function e(t){var n=Fn(t);function r(e,t){var r=n((e=xn(e)).r,(t=xn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=In(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function W(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zn=new RegExp(Rn.source,`g`);function Bn(e){return function(){return e}}function Vn(e){return function(t){return e(t)+``}}function Hn(e,t){var n=Rn.lastIndex=zn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Rn.exec(e))&&(i=zn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:W(r,i)})),n=zn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Vn(c[0].x):Bn(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var Un=180/Math.PI,Wn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Un,skewX:Math.atan(c)*Un,scaleX:o,scaleY:s}}var Kn;function qn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Wn:Gn(t.a,t.b,t.c,t.d,t.e,t.f)}function Jn(e){return e==null||(Kn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Kn.setAttribute(`transform`,e),!(e=Kn.transform.baseVal.consolidate()))?Wn:(e=e.matrix,Gn(e.a,e.b,e.c,e.d,e.e,e.f))}function Yn(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:W(e,i)},{i:c-2,x:W(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:W(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:W(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:W(e,n)},{i:s-2,x:W(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Xn=Yn(qn,`px, `,`px)`,`deg)`),Zn=Yn(Jn,`, `,`)`,`)`),G=0,Qn=0,$n=0,er=1e3,tr,K,nr=0,q=0,rr=0,J=typeof performance==`object`&&performance.now?performance:Date,ir=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ar(){return q||=(ir(or),J.now()+rr)}function or(){q=0}function sr(){this._call=this._time=this._next=null}sr.prototype=cr.prototype={constructor:sr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?ar():+n)+(t==null?0:+t),!this._next&&K!==this&&(K?K._next=this:tr=this,K=this),this._call=e,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};function cr(e,t,n){var r=new sr;return r.restart(e,t,n),r}function lr(){ar(),++G;for(var e=tr,t;e;)(t=q-e._time)>=0&&e._call.call(void 0,t),e=e._next;--G}function ur(){q=(nr=J.now())+rr,G=Qn=0;try{lr()}finally{G=0,fr(),q=0}}function dr(){var e=J.now(),t=e-nr;t>er&&(rr-=t,nr=e)}function fr(){for(var e,t=tr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tr=n);K=e,pr(r)}function pr(e){G||(Qn&&=clearTimeout(Qn),e-q>24?(e<1/0&&(Qn=setTimeout(ur,e-J.now()-rr)),$n&&=clearInterval($n)):($n||=(nr=J.now(),setInterval(dr,er)),G=1,ir(ur)))}function mr(e,t,n){var r=new sr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var hr=ae(`start`,`end`,`cancel`,`interrupt`),gr=[];function _r(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;yr(e,n,{name:t,index:r,group:i,on:hr,tween:gr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function vr(e,t){var n=X(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Y(e,t){var n=X(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function X(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function yr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=cr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return mr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(mr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function br(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function xr(e){return this.each(function(){br(this,e)})}function Sr(e,t){var n,r;return function(){var i=Y(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Cr(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Y(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function wr(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=X(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Sr:Cr)(n,e,t))}function Tr(e,t,n){var r=e._id;return e.each(function(){var e=Y(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return X(e,r).value[t]}}function Er(e,t){var n;return(typeof t==`number`?W:t instanceof R?Ln:(n=R(t))?(t=n,Ln):Hn)(e,t)}function Dr(e){return function(){this.removeAttribute(e)}}function Or(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ar(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function jr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Mr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Nr(e,t){var n=ue(e),r=n===`transform`?Zn:Er;return this.attrTween(e,typeof t==`function`?(n.local?Mr:jr)(n,r,Tr(this,`attr.`+e,t)):t==null?(n.local?Or:Dr)(n):(n.local?Ar:kr)(n,r,t))}function Pr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Fr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ir(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Fr(e,i)),n}return i._value=t,i}function Lr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Pr(e,i)),n}return i._value=t,i}function Rr(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=ue(e);return this.tween(n,(r.local?Ir:Lr)(r,t))}function zr(e,t){return function(){vr(this,e).delay=+t.apply(this,arguments)}}function Br(e,t){return t=+t,function(){vr(this,e).delay=t}}function Vr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?zr:Br)(t,e)):X(this.node(),t).delay}function Hr(e,t){return function(){Y(this,e).duration=+t.apply(this,arguments)}}function Ur(e,t){return t=+t,function(){Y(this,e).duration=t}}function Wr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Hr:Ur)(t,e)):X(this.node(),t).duration}function Gr(e,t){if(typeof t!=`function`)throw Error();return function(){Y(this,e).ease=t}}function Kr(e){var t=this._id;return arguments.length?this.each(Gr(t,e)):X(this.node(),t).ease}function qr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Y(this,e).ease=n}}function Jr(e){if(typeof e!=`function`)throw Error();return this.each(qr(this._id,e))}function Yr(e){typeof e!=`function`&&(e=Se(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Z(r,this._parents,this._name,this._id)}function Xr(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Z(o,this._parents,this._name,this._id)}function Zr(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Qr(e,t,n){var r,i,a=Zr(t)?vr:Y;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function $r(e,t){var n=this._id;return arguments.length<2?X(this.node(),n).on.on(e):this.each(Qr(n,e,t))}function ei(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ti(){return this.on(`end.remove`,ei(this._id))}function ni(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=he(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,_r(l[f],t,n,f,l,X(u,n)));return new Z(a,this._parents,t,n)}function ri(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ye(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=X(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&_r(p,t,n,h,f,m);a.push(f),o.push(u)}return new Z(a,o,t,n)}var ii=A.prototype.constructor;function ai(){return new ii(this._groups,this._parents)}function oi(e,t){var n,r,i;return function(){var a=O(this,e),o=(this.style.removeProperty(e),O(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function si(e){return function(){this.style.removeProperty(e)}}function ci(e,t,n){var r,i=n+``,a;return function(){var o=O(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function li(e,t,n){var r,i,a;return function(){var o=O(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),O(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function ui(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Y(this,e),l=c.on,u=c.value[a]==null?s||=si(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function di(e,t,n){var r=(e+=``)==`transform`?Xn:Er;return t==null?this.styleTween(e,oi(e,r)).on(`end.style.`+e,si(e)):typeof t==`function`?this.styleTween(e,li(e,r,Tr(this,`style.`+e,t))).each(ui(this._id,e)):this.styleTween(e,ci(e,r,t),n).on(`end.style.`+e,null)}function fi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function pi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&fi(e,a,n)),r}return a._value=t,a}function mi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,pi(e,t,n??``))}function hi(e){return function(){this.textContent=e}}function gi(e){return function(){this.textContent=e(this)??``}}function _i(e){return this.tween(`text`,typeof e==`function`?gi(Tr(this,`text`,e)):hi(e==null?``:e+``))}function vi(e){return function(t){this.textContent=e.call(this,t)}}function yi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&vi(r)),t}return r._value=e,r}function bi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,yi(e))}function xi(){for(var e=this._name,t=this._id,n=Ti(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=X(c,t);_r(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Z(r,this._parents,e,n)}function Si(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Y(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ci=0;function Z(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wi(e){return A().transition(e)}function Ti(){return++Ci}var Q=A.prototype;Z.prototype=wi.prototype={constructor:Z,select:ni,selectAll:ri,selectChild:Q.selectChild,selectChildren:Q.selectChildren,filter:Yr,merge:Xr,selection:ai,transition:xi,call:Q.call,nodes:Q.nodes,node:Q.node,size:Q.size,empty:Q.empty,each:Q.each,on:$r,attr:Nr,attrTween:Rr,style:di,styleTween:mi,text:_i,textTween:bi,remove:ti,tween:wr,delay:Vr,duration:Wr,ease:Kr,easeVarying:Jr,end:Si,[Symbol.iterator]:Q[Symbol.iterator]};function Ei(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Di={time:null,delay:0,duration:250,ease:Ei};function Oi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function ki(e){var t,n;e instanceof Z?(t=e._id,e=e._name):(t=Ti(),(n=Di).time=ar(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&_r(c,e,t,l,o,n||Oi(c,t));return new Z(r,this._parents,e,t)}A.prototype.interrupt=xr,A.prototype.transition=ki;const{abs:Ai,max:ji,min:Mi}=Math;[`w`,`e`].map(Ni),[`n`,`s`].map(Ni),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Ni);function Ni(e){return{type:e}}function $(e,t,n){this.k=e,this.x=t,this.y=n}$.prototype={constructor:$,scale:function(e){return e===1?this:new $(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Pi=new $(1,0,0);Fi.prototype=$.prototype;function Fi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Pi;return e.__zoom}export{o as C,n as D,l as E,p as S,c as T,T as _,In as a,S as b,z as c,j as d,an as f,te as g,ne as h,Pn as i,R as l,re as m,W as n,jn as o,rn as p,Ln as r,M as s,Hn as t,bn as u,C as v,a as w,_ as x,w as y};
|
|
2
|
-
//# sourceMappingURL=src-
|
|
2
|
+
//# sourceMappingURL=src-BGL-MlNN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,f as t,r as n}from"./start-CGL0pAPp.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{En as e,Z as t}from"./dist-gqZDYmIG.mjs";import{Nr as n,Sr as r,lr as i}from"./dist-petOQDm6.mjs";import{n as a,t as o}from"./esm-PWRRAk-U.mjs";import{i as s,t as c}from"./gh-detect-DT6DqKGM.mjs";import{n as l}from"./constants-B18JyjBC.mjs";import{spawn as u}from"node:child_process";import{basename as d,dirname as f,join as p}from"node:path";import{closeSync as m,existsSync as h,mkdirSync as g,openSync as _,statSync as v}from"node:fs";import{homedir as y}from"node:os";import{rm as b}from"node:fs/promises";import{setTimeout as x}from"node:timers/promises";const S=`OpenKnowledge.app`,C=`/Applications/${S}`;function w(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return v(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function T(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(E(e,C))return C;let t=p(e.homeDir??y(),`Applications`,S);return E(e,t)?t:null}function E(e,t){try{let n=p(t,`Contents`,`MacOS`,`OpenKnowledge`),r=e.statSync(n);return r&&typeof r.isFile==`function`?r.isFile():!1}catch{return!1}}function D(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`)return{available:!1,reason:`darwin-only`};let t;try{t=T(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:e.isTTY!==!0||e.env.SSH_CONNECTION||e.env.SSH_TTY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function O(e){(e.log??(e=>console.error(e)))("Launching OpenKnowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)");let t={...process.env};delete t.ELECTRON_RUN_AS_NODE,e.spawn(`open`,[`-b`,`com.inkeep.open-knowledge`],{detached:!0,stdio:`ignore`,env:t}).unref()}function k(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found at ${C}. Install via DMG, or omit --mode for browser mode.`;case`darwin-only`:return`Desktop app is macOS-only on this release. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect desktop bundle at ${C} (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available at ${C} but launch dispatch did not fire (caller bug).`}}function A(e){return p(f(e),`..`,`Frameworks`,`OpenKnowledge Server.app`,`Contents`,`MacOS`,`OpenKnowledge Helper`)}const j=/\/[^/]+\.app\/Contents\/MacOS\/[^/]+$/;function M(e){if(e.platform!==`darwin`||!j.test(e.execPath))return null;let t=A(e.execPath);return e.exists(t)?t:null}function N(e={}){let t=e.execPath??process.execPath,n=e.platform??process.platform,r=e.argv??process.argv,i=e.exists??h,a=r[1];return a?{command:M({execPath:t,platform:n,exists:i})??t,prefixArgs:[a]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx -y @inkeep/open-knowledge@latest\`. This re-introduces the registry-fetch surface that re-exec was fixing. Observed argv: ${JSON.stringify(r)}`),{command:`npx`,prefixArgs:[`-y`,`@inkeep/open-knowledge@latest`]})}function P(e,t){return e.host??t.HOST??`127.0.0.1`}function F(e){let t=d(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var I=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}};function L(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function R(t){h(t.lockDir)||g(t.lockDir,{recursive:!0});let n=_(p(t.lockDir,e),`w`),r=t.spawn??u,{PORT:i,...a}=process.env,o=N();try{let e=r(o.command,[...o.prefixArgs,...t.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,n],windowsHide:!0,cwd:t.cwd,env:{...a,ELECTRON_RUN_AS_NODE:`1`}});return e.unref(),e}finally{try{m(n)}catch{}}}function z(e,t,n){return e??(n===void 0?t:void 0)}function B(e,t){return e!==void 0&&t!==null&&t.port>0&&t.draining!==!0}function V(e,t,n){return e??(t!=null&&!n?1:0)}async function H(e){let t=e.spawn??u,n=N(),{PORT:r,...i}=process.env,a=t(n.command,[...n.prefixArgs,`ui`,`--port`,String(e.uiPort)],{cwd:e.cwd,stdio:`inherit`,windowsHide:!0,env:{...i,ELECTRON_RUN_AS_NODE:`1`}}),o=!1,s=e=>{o=!0;try{a.kill(e)}catch{}},c=()=>s(`SIGINT`),l=()=>s(`SIGTERM`);process.once(`SIGINT`,c),process.once(`SIGTERM`,l),await new Promise(e=>{a.on(`exit`,(t,n)=>{process.exitCode=V(t,n,o),e()}),a.on(`error`,t=>{console.error(`[start] connect fallback: failed to spawn ok ui — ${t instanceof Error?t.message:String(t)}`),process.exitCode=1,e()})}),process.removeListener(`SIGINT`,c),process.removeListener(`SIGTERM`,l)}async function U(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}const W=t;function G(e,t,n=e=>b(e,{recursive:!0,force:!0})){return async()=>{try{await e()}finally{try{await n(t)}catch(e){process.stderr.write(`[start] ephemeral temp dir reap failed for ${t}: ${e instanceof Error?e.message:String(e)}\n`)}}}}function K(e,t={}){let n=t.exit??(e=>process.exit(e)),r=t.getActiveHandles??(()=>{let e=process._getActiveHandles;return e?e.call(process):null});return async()=>{let i=!1;try{await e()}catch(e){i=!0,t.log?.error({err:e},`idle-shutdown: destroy failed — exiting anyway`)}finally{let e=null;try{let t=r();if(t!==null){e={};for(let n of t){let t=n?.constructor?.name??`unknown`;e[t]=(e[t]??0)+1}}}catch{e=null}t.log?.info({event:`idle-shutdown-exit`,exitCode:i?1:0,openHandles:e??{},handlesAvailable:e!==null},`idle-shutdown: teardown finished — exiting process`),n(i?1:0)}}}function q(e){let t=e.sigtermGraceMs??W,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>x(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function J(e){let{config:t,cwd:a,host:o}=e,l=e.skipAutoInit??!1,u=e.skipUiAutoSpawn??!1,d=e.idleThresholdMs??18e5,{existsSync:f,mkdirSync:p}=await import(`node:fs`),{basename:m,dirname:h}=await import(`node:path`),{bootServer:g,getLogger:_,isProcessAlive:v,readUiLock:y,resolveContentDir:b,resolveLockDir:S,waitForServerLockDrain:C}=await import(`./dist-DNDjbkqL.mjs`),w=e.log??_(`start`),T=e.singleFile!==void 0,E=e.projectDir??a,D=T?n(e.singleFile).canonicalFilePath:void 0,O=D?h(D):void 0,k=D?m(D):void 0;if(!T){if(!l&&!i(a))throw new I(a);let t=process.env.OK_RECLAIM_DISABLE??null,n=e=>{let t=typeof e.event==`string`?e.event:``;(t.endsWith(`-failed`)||t.endsWith(`-error`)||t.endsWith(`-missing`))&&w.warn({event:e},`[start] reclaim sweep reported a problem`)};try{(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-C2iq9bOP.mjs`)).repairMcpConfigs)({projectDir:a,reclaimDisableEnv:t,logger:n})}catch(e){w.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-D73FezU-.mjs`)).repairLaunchJson)({projectDir:a,reclaimDisableEnv:t,logger:n})}catch(e){w.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-DMIeifIr.mjs`)).repairSkills)({projectDir:a,reclaimDisableEnv:t,logger:n})}catch(e){w.warn({err:e},`[start] skill repair sweep failed; continuing`)}}let A=O??b(t,a);!T&&!f(A)&&(p(A,{recursive:!0}),w.info({contentDir:A},`Created content directory`));let j=null,M=async({lockDir:t})=>{if(j=L({uiLock:y(t),isAlive:v}),j.action===`spawn`&&!u)try{let n=e.uiPort===void 0?void 0:[`ui`,`--port`,String(e.uiPort)];R({lockDir:t,cwd:a,spawn:e.spawn,args:n}),w.info({reason:j.reason,uiPort:e.uiPort},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else j.action===`skip`&&w.info({port:j.port,pid:j.pid},`UI already running at port ${j.port}`)},N=e.reactShellDistDir===void 0,P=s(),F=r();{let e=S(T?E:a),t=Date.now(),n=await C(e);n!==`no-drain`&&w.info({event:`start-waited-for-draining-predecessor`,outcome:n,waitedMs:Date.now()-t,drainLockDir:e},n===`released`?`[start] predecessor server finished draining — proceeding`:`[start] predecessor server still draining after wait — proceeding to collide`)}let z=await g({config:t,contentDir:A,projectDir:T?E:a,contentRoot:T?void 0:t.content.dir,port:e.port,host:o,quiet:!1,detectGh:c,tokenStore:P,embeddingsKeyStore:F,...T?{ephemeral:!0,singleDocRelPath:k,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:N,idleShutdownMs:d,skipAutoInit:!0,...N?{spawnUiSiblingFn:M}:{},idleShutdownHandler:t=>{let n=q({readUiLock:()=>y(z.lockDir),isAlive:v,killPid:(e,t)=>{process.kill(e,t)},destroy:t,log:w});return K(T?G(n,E):n,{log:w,exit:e.idleExit})},log:w,...e.serveContentAssets===void 0?{}:{serveContentAssets:e.serveContentAssets},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});j||={action:`skip`,reason:`alive`,pid:0,port:0};let B=j,V=null;if(B.action===`skip`)V=B.port>0?B.port:null;else if(!u){let t=e.uiBindTimeoutMs??3e3;V=await U({readUiLock:()=>y(z.lockDir),now:Date.now,sleep:e=>x(e),timeoutMs:t,pollIntervalMs:50}),V===null&&w.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:z.httpServer,destroy:z.destroy,lockDir:z.lockDir,contentDir:A,port:z.port,ready:z.ready,degraded:z.degraded,uiSpawnDecision:j,resolvedUiPort:V}}function ee(e){if(e===`browser`||e===`app`)return e;throw new a(`--mode must be 'browser' or 'app'`)}function te(e){let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<1||t>65535)throw new a(`--ui-port must be a port number between 1 and 65535`);return t}function Y(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function X(e){let t=[`Stopping OpenKnowledge…`,`Saving pending changes and releasing the server lock — this can take a few seconds.`];return e===`SIGINT`&&t.push(`Press Ctrl+C again to force quit.`),t}async function Z(e,t){let n=Y(process.env);n!==null&&(process.env.OK_CONSOLE_LEVEL=n);let{renderBanner:r}=await import(`./banner-DsGpC-o3.mjs`),{accent:i,dim:a,error:o,warning:s}=await import(`./colors-Ct4sdRvQ.mjs`),c=process.cwd(),u=e;process.title=F(c);let d=P(t,process.env),f=t.port===void 0?void 0:Number(t.port),p=process.env.PORT?Number(process.env.PORT):void 0,m=t.uiPort===void 0?void 0:Number(t.uiPort),h=z(f,p,m);if(m!==void 0){let{readServerLock:e,resolveLockDir:t}=await import(`./dist-DNDjbkqL.mjs`);if(B(m,e(t(c)))){await H({cwd:c,uiPort:m});return}}let g;try{g=await J({config:u,cwd:c,host:d,port:h,...m===void 0?{}:{uiPort:m},...t.serveContentAssets===void 0?{}:{serveContentAssets:t.serveContentAssets},...t.reactShellDistDir?{reactShellDistDir:t.reactShellDistDir}:{},...t.singleFile?{singleFile:t.singleFile}:{},...t.projectDir?{projectDir:t.projectDir}:{}})}catch(e){e instanceof I&&(console.error(o(e.message)),process.exit(1));let t=await import(`./dist-DNDjbkqL.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(o(e.message)),process.exit(1)),m!==void 0&&Q(e,t)){await H({cwd:c,uiPort:m});return}let n=$(e,c,t);n!==null&&(console.error(o(n)),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let _=!1,v=async e=>{if(_)return;_=!0;let[t,...n]=X(e);console.log(i(`\n${t}`));for(let e of n)console.log(a(` ${e}`));try{await g.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)};process.once(`SIGINT`,()=>{v(`SIGINT`)}),process.once(`SIGTERM`,()=>{v(`SIGTERM`)});let y=`http://${d}:${g.port}`,b=d===`0.0.0.0`||d===`::`?`http://0.0.0.0:${g.port}`:void 0,x=g.resolvedUiPort,S=x!==null&&x>0?`http://${d}:${x}`:y;console.log(r({name:`open-knowledge`,version:l,localUrl:S,apiUrl:S===y?void 0:y,networkUrl:b,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let C={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};g.ready.then(async()=>{if(g.degraded.length>0){console.log();for(let e of g.degraded){let t=C[e]??`${e} (check server logs for details)`;console.warn(` ${s(`⚠`)} ${s(e)}: ${a(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-BMVg3r9e.mjs`);e(S)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function Q(e,t){let n=t.ServerLockCollisionError;return n!==void 0&&e instanceof n}function $(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=p(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`OpenKnowledge desktop is currently running on this project. Quit it or use --cwd to point elsewhere.`:r.kind===`mcp-spawned`?"An MCP-spawned server holds this lock; it should release on idle-shutdown (~30 min). Or run `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function ne(e){return new o(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`--ui-port <port>`,`Pin the ok ui sibling to <port> and connect (not exit) if a server already runs here — the worktree-preview recipe path`,te).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,ee).option(`--serve-content-assets`,`Serve content assets from this server (now the default; kept for compatibility)`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path> (suppresses ok ui sibling)`).option(`--single-file <path>`,`No-project ephemeral single-file mode: scope the server to one markdown file (git + MCP off)`).option(`--project-dir <dir>`,`Throwaway project root for --single-file (where ephemeral .ok/ state lives)`).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
|
|
2
|
+
`),process.exit(2));let e=[];if(t.port!==void 0&&e.push(`--port`),t.uiPort!==void 0&&e.push(`--ui-port`),t.host!==void 0&&e.push(`--host`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=D(w());if(n.available){O({spawn:u});return}console.error(k(n.reason)),process.exit(1)}await Z(n,t)})}export{D as C,w as S,ne as _,V as a,K as b,F as c,z as d,P as f,R as g,B as h,q as i,X as l,Z as m,U as n,H as o,Y as p,J as r,L as s,I as t,Q as u,$ as v,O as w,N as x,G as y};
|
|
3
|
+
//# sourceMappingURL=start-CGL0pAPp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{t as e}from"./chunk-5QVNJEHU-BwcO0gX-.mjs";export{e as statCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as e,p as t,w as n}from"./src-DC_BCes_.mjs";import{D as r,b as i,c as a,s as o}from"./chunk-ICPOFSXX-C2hDlKD_.mjs";import{H as s,h as c}from"./chunk-5PVQY5BW-_JlgOiAb.mjs";import{t as l}from"./line-DiVg83mo.mjs";import"./chunk-U2HBQHQK-DMRf50i8.mjs";import"./chunk-BSJP7CBP-BWUAQGWN.mjs";import"./chunk-ZZ45TVLE-DmKznbd-.mjs";import{t as u}from"./graphlib-ZUByR7Z1.mjs";import{t as d}from"./dagre-C04vaGU3.mjs";import"./chunk-55IACEB6-CWM_Woee.mjs";import"./chunk-EDXVE4YY-COyPi8-X.mjs";import"./chunk-X2U36JSP-B09HbTgU.mjs";import"./chunk-5FUZZQ4R-BSIWed9s.mjs";import"./chunk-ENJZ2VHE-DgpEksO3.mjs";import"./chunk-336JU56O-MOsDPDtl.mjs";import{i as f,n as p,t as m}from"./chunk-OYMX7WX6-CjnWmW_n.mjs";var h=n(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit).attr(`cy`,i().state.padding+i().state.sizeUnit),`drawStartState`),g=n(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,i().state.textHeight).attr(`class`,`divider`).attr(`x2`,i().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=n((e,t)=>{let n=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+2*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,r.width+2*i().state.padding).attr(`height`,r.height+2*i().state.padding).attr(`rx`,i().state.radius),n},`drawSimpleState`),v=n((e,t)=>{let r=n(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*i().state.padding).text(t);n||r.attr(`dy`,i().state.textHeight)},`addTspan`),a=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+1.3*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),o=a.height,s=e.append(`text`).attr(`x`,i().state.padding).attr(`y`,o+i().state.padding*.4+i().state.dividerMargin+i().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;t.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,i().state.padding).attr(`y1`,i().state.padding+o+i().state.dividerMargin/2).attr(`y2`,i().state.padding+o+i().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,a.width);return u.attr(`x2`,f+3*i().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,f+2*i().state.padding).attr(`height`,d.height+o+2*i().state.padding).attr(`rx`,i().state.radius),e},`drawDescrState`),y=n((e,t,n)=>{let r=i().state.padding,a=2*i().state.padding,o=e.node().getBBox(),s=o.width,c=o.x,l=e.append(`text`).attr(`x`,0).attr(`y`,i().state.titleShift).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+a,d=Math.max(u,s);d===s&&(d+=a);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-i().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+i().state.textHeight+i().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-a)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,i().state.textHeight*3).attr(`rx`,i().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*i().state.textHeight).attr(`rx`,i().state.radius),e},`addTitleAndBox`),b=n(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,i().state.sizeUnit+i().state.miniPadding).attr(`cx`,i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr(`cy`,i().state.padding+i().state.sizeUnit+i().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit+2).attr(`cy`,i().state.padding+i().state.sizeUnit+2)),`drawEndState`),x=n((e,t)=>{let n=i().state.forkWidth,r=i().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,i().state.padding).attr(`y`,i().state.padding)},`drawForkJoinState`),S=n((e,t,n,r)=>{let a=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(o.lineBreakRegex),u=1.25*i().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}a+=u,e.attr(`x`,t+i().state.noteMargin),e.attr(`y`,n+a+1.25*i().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:a}},`_drawLongText`),C=n((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,i().state.padding),{textWidth:r,textHeight:a}=S(e,0,0,t.append(`g`));return n.attr(`height`,a+2*i().state.noteMargin),n.attr(`width`,r+i().state.noteMargin*2),n},`drawNote`),w=n(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},a=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(a),t.type===`end`&&b(a),(t.type===`fork`||t.type===`join`)&&x(a,t),t.type===`note`&&C(t.note.text,a),t.type===`divider`&&g(a),t.type===`default`&&t.descriptions.length===0&&_(a,t),t.type===`default`&&t.descriptions.length>0&&v(a,t);let o=a.node().getBBox();return r.width=o.width+2*i().state.padding,r.height=o.height+2*i().state.padding,r},`drawState`),T=0,E=n(function(t,a,u){let d=n(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);a.points=a.points.filter(e=>!Number.isNaN(e.y));let f=a.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=t.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(i().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let n=t.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(a.points),l=o.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=l.length;t++){let i=n.append(`text`).attr(`text-anchor`,`middle`).text(l[t]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),e.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,e.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=n.node().getBBox();n.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-i().state.padding/2).attr(`y`,s-h/2-i().state.padding/2-3.5).attr(`width`,p+i().state.padding).attr(`height`,h+i().state.padding),e.info(g)}T++},`drawEdge`),D,O={},k=n(function(){},`setConf`),A=n(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=n(function(n,r,o,s){D=i().state;let c=i().securityLevel,l;c===`sandbox`&&(l=t(`#i`+r));let u=t(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;e.debug(`Rendering diagram `+n);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;a(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=n(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=n((t,n,r,i,a,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<t.length;f++)if(t[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let o;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);o=N(t.doc,e,t.id,!i,a,s,c);{e=y(e,t,i);let n=e.node().getBBox();o.width=n.width,o.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else o=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(o.id+`-note`,e),l.setNode(o.id,o)):(l.setNode(o.id,o),l.setNode(o.id+`-note`,e)),l.setParent(o.id,o.id+`-group`),l.setParent(o.id+`-note`,o.id+`-group`)}else l.setNode(o.id,o)}e.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(t){_++,e.debug(`Setting edge`,t),l.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:D.labelHeight*o.getRows(t.title).length,labelpos:`c`},`id`+_)}),d(l),e.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(t){t!==void 0&&l.node(t)!==void 0?(e.warn(`Node `+t+`: `+JSON.stringify(l.node(t))),a.select(`#`+v.id+` #`+t).attr(`transform`,`translate(`+(l.node(t).x-l.node(t).width/2)+`,`+(l.node(t).y+(O[t]?O[t].y:0)-l.node(t).height/2)+` )`),a.select(`#`+v.id+` #`+t).attr(`data-x-shift`,l.node(t).x-l.node(t).width/2),s.querySelectorAll(`#`+v.id+` #`+t+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):e.debug(`No Node `+t+`: `+JSON.stringify(l.node(t)))});let b=v.getBBox();l.edges().forEach(function(t){t!==void 0&&l.edge(t)!==void 0&&(e.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(l.edge(t))),E(n,l.edge(t),l.edge(t).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,e.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:n(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
|
|
2
|
-
//# sourceMappingURL=stateDiagram-FHFEXIEX-
|
|
1
|
+
import{T as e,p as t,w as n}from"./src-BGL-MlNN.mjs";import{D as r,b as i,c as a,s as o}from"./chunk-ICPOFSXX-BF2fcu67.mjs";import{H as s,h as c}from"./chunk-5PVQY5BW-CM3DDgan.mjs";import{t as l}from"./line-CNrllbcq.mjs";import"./chunk-U2HBQHQK-B6QvDsYx.mjs";import"./chunk-BSJP7CBP-C-rdyWiE.mjs";import"./chunk-ZZ45TVLE-2q1aFSGq.mjs";import{t as u}from"./graphlib-C8GlDNIO.mjs";import{t as d}from"./dagre-BTsqj5N3.mjs";import"./chunk-55IACEB6-DnxgLkXS.mjs";import"./chunk-EDXVE4YY-B7-wXBzK.mjs";import"./chunk-X2U36JSP-BlsQfR26.mjs";import"./chunk-5FUZZQ4R-D0CI_lA3.mjs";import"./chunk-ENJZ2VHE-DswEO8kN.mjs";import"./chunk-336JU56O-D5mJPHrS.mjs";import{i as f,n as p,t as m}from"./chunk-OYMX7WX6-BShEu1pf.mjs";var h=n(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit).attr(`cy`,i().state.padding+i().state.sizeUnit),`drawStartState`),g=n(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,i().state.textHeight).attr(`class`,`divider`).attr(`x2`,i().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=n((e,t)=>{let n=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+2*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,r.width+2*i().state.padding).attr(`height`,r.height+2*i().state.padding).attr(`rx`,i().state.radius),n},`drawSimpleState`),v=n((e,t)=>{let r=n(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*i().state.padding).text(t);n||r.attr(`dy`,i().state.textHeight)},`addTspan`),a=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+1.3*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),o=a.height,s=e.append(`text`).attr(`x`,i().state.padding).attr(`y`,o+i().state.padding*.4+i().state.dividerMargin+i().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;t.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,i().state.padding).attr(`y1`,i().state.padding+o+i().state.dividerMargin/2).attr(`y2`,i().state.padding+o+i().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,a.width);return u.attr(`x2`,f+3*i().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,f+2*i().state.padding).attr(`height`,d.height+o+2*i().state.padding).attr(`rx`,i().state.radius),e},`drawDescrState`),y=n((e,t,n)=>{let r=i().state.padding,a=2*i().state.padding,o=e.node().getBBox(),s=o.width,c=o.x,l=e.append(`text`).attr(`x`,0).attr(`y`,i().state.titleShift).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+a,d=Math.max(u,s);d===s&&(d+=a);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-i().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+i().state.textHeight+i().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-a)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,i().state.textHeight*3).attr(`rx`,i().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*i().state.textHeight).attr(`rx`,i().state.radius),e},`addTitleAndBox`),b=n(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,i().state.sizeUnit+i().state.miniPadding).attr(`cx`,i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr(`cy`,i().state.padding+i().state.sizeUnit+i().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit+2).attr(`cy`,i().state.padding+i().state.sizeUnit+2)),`drawEndState`),x=n((e,t)=>{let n=i().state.forkWidth,r=i().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,i().state.padding).attr(`y`,i().state.padding)},`drawForkJoinState`),S=n((e,t,n,r)=>{let a=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(o.lineBreakRegex),u=1.25*i().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}a+=u,e.attr(`x`,t+i().state.noteMargin),e.attr(`y`,n+a+1.25*i().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:a}},`_drawLongText`),C=n((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,i().state.padding),{textWidth:r,textHeight:a}=S(e,0,0,t.append(`g`));return n.attr(`height`,a+2*i().state.noteMargin),n.attr(`width`,r+i().state.noteMargin*2),n},`drawNote`),w=n(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},a=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(a),t.type===`end`&&b(a),(t.type===`fork`||t.type===`join`)&&x(a,t),t.type===`note`&&C(t.note.text,a),t.type===`divider`&&g(a),t.type===`default`&&t.descriptions.length===0&&_(a,t),t.type===`default`&&t.descriptions.length>0&&v(a,t);let o=a.node().getBBox();return r.width=o.width+2*i().state.padding,r.height=o.height+2*i().state.padding,r},`drawState`),T=0,E=n(function(t,a,u){let d=n(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);a.points=a.points.filter(e=>!Number.isNaN(e.y));let f=a.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=t.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(i().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let n=t.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(a.points),l=o.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=l.length;t++){let i=n.append(`text`).attr(`text-anchor`,`middle`).text(l[t]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),e.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,e.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=n.node().getBBox();n.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-i().state.padding/2).attr(`y`,s-h/2-i().state.padding/2-3.5).attr(`width`,p+i().state.padding).attr(`height`,h+i().state.padding),e.info(g)}T++},`drawEdge`),D,O={},k=n(function(){},`setConf`),A=n(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=n(function(n,r,o,s){D=i().state;let c=i().securityLevel,l;c===`sandbox`&&(l=t(`#i`+r));let u=t(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;e.debug(`Rendering diagram `+n);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;a(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=n(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=n((t,n,r,i,a,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<t.length;f++)if(t[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let o;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);o=N(t.doc,e,t.id,!i,a,s,c);{e=y(e,t,i);let n=e.node().getBBox();o.width=n.width,o.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else o=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(o.id+`-note`,e),l.setNode(o.id,o)):(l.setNode(o.id,o),l.setNode(o.id+`-note`,e)),l.setParent(o.id,o.id+`-group`),l.setParent(o.id+`-note`,o.id+`-group`)}else l.setNode(o.id,o)}e.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(t){_++,e.debug(`Setting edge`,t),l.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:D.labelHeight*o.getRows(t.title).length,labelpos:`c`},`id`+_)}),d(l),e.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(t){t!==void 0&&l.node(t)!==void 0?(e.warn(`Node `+t+`: `+JSON.stringify(l.node(t))),a.select(`#`+v.id+` #`+t).attr(`transform`,`translate(`+(l.node(t).x-l.node(t).width/2)+`,`+(l.node(t).y+(O[t]?O[t].y:0)-l.node(t).height/2)+` )`),a.select(`#`+v.id+` #`+t).attr(`data-x-shift`,l.node(t).x-l.node(t).width/2),s.querySelectorAll(`#`+v.id+` #`+t+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):e.debug(`No Node `+t+`: `+JSON.stringify(l.node(t)))});let b=v.getBBox();l.edges().forEach(function(t){t!==void 0&&l.edge(t)!==void 0&&(e.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(l.edge(t))),E(n,l.edge(t),l.edge(t).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,e.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:n(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
|
|
2
|
+
//# sourceMappingURL=stateDiagram-FHFEXIEX-DQ2iT5iQ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as e}from"./src-BGL-MlNN.mjs";import"./chunk-ICPOFSXX-BF2fcu67.mjs";import"./chunk-5PVQY5BW-CM3DDgan.mjs";import"./chunk-U2HBQHQK-B6QvDsYx.mjs";import"./chunk-BSJP7CBP-C-rdyWiE.mjs";import"./chunk-ZZ45TVLE-2q1aFSGq.mjs";import"./chunk-55IACEB6-DnxgLkXS.mjs";import"./chunk-EDXVE4YY-B7-wXBzK.mjs";import"./chunk-X2U36JSP-BlsQfR26.mjs";import"./chunk-5FUZZQ4R-D0CI_lA3.mjs";import"./chunk-ENJZ2VHE-DswEO8kN.mjs";import"./chunk-336JU56O-D5mJPHrS.mjs";import{i as t,n,r,t as i}from"./chunk-OYMX7WX6-BShEu1pf.mjs";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
+
//# sourceMappingURL=stateDiagram-v2-QKLJ7IA2-BN2cDF-I.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-VYOJP4TV-Dh2zBxKQ.mjs";export{e as strings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-MHTUABJP-t1OLW57X.mjs";export{e as tac};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-DCAAORBQ-Dy6elY3j.mjs";export{e as tailCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-B74TABJS-D6QwMpPz.mjs";import"./chunk-DXB73IDG-ByieFnhr.mjs";import"./chunk-5QMZ5MUS-DvwGjmAW.mjs";import{n as e}from"./chunk-HKLCLINH-Ch0mauLy.mjs";export{e as tarCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-55VFSPNA-BI1ZlfMG.mjs";export{e as teeCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-CWQS3NFK-BvSpDizp.mjs";import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-Z6LRHWXI-CQxrFjqd.mjs";export{e as timeCommand};
|
package/dist/{timeline-definition-GMOUNBTQ-TPAmdwnH.mjs → timeline-definition-GMOUNBTQ-CN-kJjLP.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,T as t,p as n,w as r}from"./src-
|
|
1
|
+
import{C as e,T as t,p as n,w as r}from"./src-BGL-MlNN.mjs";import{$ as i,K as a,Q as o,a as s,b as c,o as l,tt as u,y as d}from"./chunk-ICPOFSXX-BF2fcu67.mjs";import{t as f}from"./arc-CQLjZPEs.mjs";import{f as p}from"./chunk-5PVQY5BW-CM3DDgan.mjs";import{t as m}from"./chunk-426QAEUC-C79-xu4k.mjs";var h=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:r(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:r(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]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;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){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=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:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);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&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(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:r(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:r(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:r(function(){return this._more=!0,this},`more`),reject:r(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:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(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:r(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:r(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-GMOUNBTQ-
|
|
121
|
+
//# sourceMappingURL=timeline-definition-GMOUNBTQ-CN-kJjLP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import"./chunk-5QMZ5MUS-DvwGjmAW.mjs";import"./chunk-A5O5YHGN-0FmmnDn4.mjs";import{n as e}from"./chunk-YTNYSM6T-igBSh3M-.mjs";export{e as timeoutCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{t as e}from"./chunk-OCLXQMOG-DZx1830_.mjs";export{e as touchCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-62RKD26F-CgKazjAi.mjs";export{e as trCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-XVDPCNWR-BAt7NxwA.mjs";export{e as treeCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K5T4RW27-DLjwaibC.mjs";import{n as e}from"./chunk-ORNJ4GCN-R61lu8Cm.mjs";export{e as createTreeViewServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K5T4RW27-DLjwaibC.mjs";import{n as e}from"./chunk-LIHQZDEY-C1QAwaiM.mjs";export{e as createTreemapServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{i as e,t}from"./chunk-R6QSAL5T-CXXlslcl.mjs";export{e as falseCommand,t as trueCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-PYSFUGCK-CoGoOEDp.mjs";export{e as unexpand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-ByieFnhr.mjs";import{t as e}from"./chunk-WKFATFPP-CoNouDAR.mjs";export{e as uniqCommand};
|