@inkeep/open-knowledge 0.49.0 → 0.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abnfDiagram-VRR7QNED-DWDzSKGM.mjs +2 -0
- package/dist/acp-harness-probe-O9BEMpdb.mjs +3 -0
- package/dist/alias-JE7RI5QX-BLuOrjl2.mjs +7 -0
- package/dist/alias-JE7RI5QX-VxEqWoTW.mjs +1 -0
- package/dist/arc-DXUbbcxK.mjs +2 -0
- package/dist/architecture-TIHT7OUA-Bl3hpxt3.mjs +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-HYEpY7T3.mjs +37 -0
- package/dist/array-BbgQa93P.mjs +2 -0
- package/dist/awk2-BBAGSFUB-ClUuupKf.mjs +21 -0
- package/dist/awk2-BBAGSFUB-Dq-YdAGA.mjs +1 -0
- package/dist/banner-Be20aAVc.mjs +3 -0
- package/dist/base64-4YMZCVJ5-CtkujsXK.mjs +6 -0
- package/dist/base64-4YMZCVJ5-dXz6vbV-.mjs +1 -0
- package/dist/basename-AA2KJYZQ-BhoOTAHi.mjs +1 -0
- package/dist/basename-AA2KJYZQ-CEdH80GO.mjs +6 -0
- package/dist/bash-IJWYRKFO-BDtU-lTC.mjs +6 -0
- package/dist/bash-IJWYRKFO-jaJEvAZe.mjs +1 -0
- package/dist/blockDiagram-677ZJIJ3-yJugV29e.mjs +133 -0
- package/dist/c4Diagram-LMCZKHZV-BFQQLctA.mjs +11 -0
- package/dist/cat-RDUMLXKC-D1H4LA3Z.mjs +6 -0
- package/dist/cat-RDUMLXKC-DFuXWxVq.mjs +1 -0
- package/dist/channel-Cjp51EO_.mjs +2 -0
- package/dist/chmod-SYMGL4JA-ByMUk130.mjs +1 -0
- package/dist/chmod-SYMGL4JA-lEGJICyB.mjs +8 -0
- package/dist/chokidar-dh8zokRd.mjs +4 -0
- package/dist/chunk-24IMIIXA-RjlBWJtr.mjs +2 -0
- package/dist/chunk-2Q5K7J3B-Ck8oGqYt.mjs +2 -0
- package/dist/chunk-2TRDZQLB-AH-I_6yN.mjs +18 -0
- package/dist/chunk-2TRDZQLB-ZoW1EBbl.mjs +18 -0
- package/dist/chunk-32BRIVSS-Dwq69mnI.mjs +2 -0
- package/dist/chunk-3BS5SKQH-DpdUzS0R.mjs +140 -0
- package/dist/chunk-3H6UQG3A-BWCaN15a.mjs +9 -0
- package/dist/chunk-3THT3N7L-DYkTD3HD.mjs +2 -0
- package/dist/chunk-3ZUFRYJ4-H1A1hWy1.mjs +2 -0
- package/dist/chunk-3ZUFRYJ4-ekaYB_vG.mjs +2 -0
- package/dist/chunk-44UOCSGV-D1FZHMOP.mjs +2 -0
- package/dist/chunk-4GTNDTRF-Cx89i2Y1.mjs +8 -0
- package/dist/chunk-4HHKTUW3-Dk2l1S8J.mjs +3 -0
- package/dist/chunk-4Q4SM6WR-CGuvvBWe.mjs +5 -0
- package/dist/chunk-52WLFC77-Cn-qt8h-.mjs +11 -0
- package/dist/chunk-55VFSPNA-D2U7n2ka.mjs +3 -0
- package/dist/chunk-5FCAYU7R-DszODYLe.mjs +2 -0
- package/dist/chunk-5HE753X5-DDnyF29o.mjs +2 -0
- package/dist/chunk-5JV3BV7I-BkeVAZnj.mjs +2 -0
- package/dist/chunk-5QMZ5MUS-C5NTf5Rj.mjs +5 -0
- package/dist/chunk-5QVNJEHU-DS9zA_YV.mjs +9 -0
- package/dist/chunk-5TONJI2A-CzUNHQPX.mjs +3 -0
- package/dist/chunk-5V6VZH6T-DBFenjXz.mjs +2 -0
- package/dist/chunk-5VM5RSS4-C8vNNqW0.mjs +16 -0
- package/dist/chunk-62RKD26F-C4qK_fA-.mjs +21 -0
- package/dist/chunk-64BAICW3-BupSxcu5.mjs +2 -0
- package/dist/chunk-6Z5SFZXK-Cz0C4bhB.mjs +288 -0
- package/dist/chunk-74CEPOFO-BUVWiXkJ.mjs +23 -0
- package/dist/chunk-74CEPOFO-BYrCYxKO.mjs +23 -0
- package/dist/chunk-7BUUIJ7U-D7hE25H9.mjs +2 -0
- package/dist/chunk-7L36YK2X-CGwYuotX.mjs +3 -0
- package/dist/chunk-7L36YK2X-DAp-upAs.mjs +3 -0
- package/dist/chunk-7TSDKFEO-CE_P23TY.mjs +2 -0
- package/dist/chunk-7TSDKFEO-DBB10vPw.mjs +2 -0
- package/dist/chunk-A4HU7SVR-BZJ8xDMo.mjs +3 -0
- package/dist/chunk-A4JSPFCI-Dej71yGP.mjs +7 -0
- package/dist/chunk-A5O5YHGN-CczwCZ4d.mjs +2 -0
- package/dist/chunk-A65PWWJC-C-0S-s_f.mjs +3 -0
- package/dist/chunk-A7A2DBEE-DCXJ1xmx.mjs +7 -0
- package/dist/chunk-A7ICOL4V-BQZ9JZ1A.mjs +14 -0
- package/dist/chunk-ALLTKNUZ-D2ZOfcEz.mjs +6 -0
- package/dist/chunk-APT7OOP2-D-DaFB7K.mjs +2 -0
- package/dist/chunk-B74TABJS-BJwhrR8a.mjs +34 -0
- package/dist/chunk-BIQX33UG-Bmho6v3L.mjs +2 -0
- package/dist/chunk-C7G6YPKG-BAX_SClW.mjs +2 -0
- package/dist/chunk-CQNSW5MT-FekKjn0i.mjs +2 -0
- package/dist/chunk-CWQS3NFK-CcBWgb8o.mjs +2 -0
- package/dist/chunk-CYSBUYHQ-BftsYwRW.mjs +2 -0
- package/dist/chunk-D4J545R4-Br_5qOnE.mjs +12 -0
- package/dist/chunk-D6CWQ5DW-3AWPydfx.mjs +6 -0
- package/dist/chunk-D7MEQ3VN-Df6An2jd.mjs +5 -0
- package/dist/chunk-DBKNVD4L-B3hX287s.mjs +10 -0
- package/dist/chunk-DBKNVD4L-DNQP2COw.mjs +10 -0
- package/dist/chunk-DCAAORBQ-BDLVpBG2.mjs +2 -0
- package/dist/chunk-DHbaKqs-.mjs +1 -0
- package/dist/chunk-DXB73IDG-BBwE27jK.mjs +2 -0
- package/dist/chunk-EEXR5ZDP-CE452hsE.mjs +3 -0
- package/dist/chunk-EEXR5ZDP-Df-EPnbj.mjs +3 -0
- package/dist/chunk-EIZGF4BS-86nrMkyt.mjs +9 -0
- package/dist/chunk-EIZGF4BS-CSFp0aUh.mjs +9 -0
- package/dist/chunk-EMLP6XTP-C2yfLzVC.mjs +2 -0
- package/dist/chunk-EX3LRPZG-Chp9b-Lc.mjs +232 -0
- package/dist/chunk-F23WWYKW-qKke1WqP.mjs +17 -0
- package/dist/chunk-FWX5IMBZ-Cn1xNcn5.mjs +2 -0
- package/dist/chunk-GCTKCWKD-D0obXRun.mjs +4 -0
- package/dist/chunk-GFQRA5P5-XqPO4cim.mjs +3 -0
- package/dist/chunk-GOV5EKKI-CDovwI7Z.mjs +10 -0
- package/dist/chunk-GXVXFKBA-D-BGCybM.mjs +6 -0
- package/dist/chunk-HDQ56CKY-CI8IkhlS.mjs +16 -0
- package/dist/chunk-HDQ56CKY-Pa-7c4rC.mjs +16 -0
- package/dist/chunk-HJQJAYMS-BHzb4Ncl.mjs +3 -0
- package/dist/chunk-HJWBQKYG-B-KESSoV.mjs +6 -0
- package/dist/chunk-HKLCLINH-Bgw53oZd.mjs +63 -0
- package/dist/chunk-HL6NGDO2-CftrHAlX.mjs +24 -0
- package/dist/chunk-HOUHSVGY-C3h3PdhC.mjs +2 -0
- package/dist/chunk-HWKDQ44K-CGcvROg-.mjs +4 -0
- package/dist/chunk-HWKDQ44K-D3ZbaPl8.mjs +4 -0
- package/dist/chunk-I57KEIP3-_HYA-njf.mjs +11 -0
- package/dist/chunk-I57KEIP3-iiTO2OC-.mjs +11 -0
- package/dist/chunk-ICXQ74PX-DbJy3VdO.mjs +3 -0
- package/dist/chunk-IPJHKYVM-3ANqAo3C.mjs +2 -0
- package/dist/chunk-JG7HCLWE-lUInQ_44.mjs +3 -0
- package/dist/chunk-JVPRLUMK-FzUEFQw9.mjs +8 -0
- package/dist/chunk-JWPE2WC7-iDbhfJR-.mjs +2 -0
- package/dist/chunk-K6LIBGJA-BXxOXTjI.mjs +12 -0
- package/dist/chunk-KEIR6QF5-BLwvtFl6.mjs +176 -0
- package/dist/chunk-KMEYNNUA-1KiUKBQV.mjs +16 -0
- package/dist/chunk-KRBPSX3W-DeaaVEij.mjs +6 -0
- package/dist/chunk-KRBPSX3W-YDdgrCmf.mjs +6 -0
- package/dist/chunk-LL3S3NLB-D0lLKwVi.mjs +2 -0
- package/dist/chunk-LTZRCH7N-DpPs5vSq.mjs +32 -0
- package/dist/chunk-LWEGUNWT-DOK-XWMd.mjs +8 -0
- package/dist/chunk-MDDMCKUK-CTA6qEdN.mjs +7 -0
- package/dist/chunk-MDLLFABN-B2tA3LLA.mjs +73 -0
- package/dist/chunk-MHTUABJP-CrR3MfDw.mjs +9 -0
- package/dist/chunk-MIZPJHVH-d3bhRfh4.mjs +8 -0
- package/dist/chunk-MLXIYONF-C0S_CKb1.mjs +16 -0
- package/dist/chunk-MOJQB5TN-CUt4IiNv.mjs +89 -0
- package/dist/chunk-MOZMSUNE-DCxwDKn7.mjs +2 -0
- package/dist/chunk-MYE6AGBJ-CMoRJzYM.mjs +17 -0
- package/dist/chunk-NAERJDUW-Ck-SZ2Ps.mjs +9 -0
- package/dist/chunk-NCNPKYJZ-BxqfYu6d.mjs +3 -0
- package/dist/chunk-NUYSJFDK-DfaBzW-k.mjs +8 -0
- package/dist/chunk-OCLXQMOG-DC3689MV.mjs +7 -0
- package/dist/chunk-OCS6LSEM-BY3_3dNt.mjs +14 -0
- package/dist/chunk-OGEWGWER-DgPAesMA.mjs +2 -0
- package/dist/chunk-OJDRYQWQ-B9KRyRFZ.mjs +2 -0
- package/dist/chunk-OSBZ3O6U-BVpvamr7.mjs +2 -0
- package/dist/chunk-PBXLG62G-C12xrBbG.mjs +9 -0
- package/dist/chunk-PP6PSHAB-tlM6YKyg.mjs +5 -0
- package/dist/chunk-PUDLZKDR-CIWYIjrF.mjs +157 -0
- package/dist/chunk-PXTK5WE2-DNbfUrIy.mjs +22 -0
- package/dist/chunk-PXTK5WE2-e9kxtsgu.mjs +22 -0
- package/dist/chunk-PYSFUGCK-DqdcBhD4.mjs +11 -0
- package/dist/chunk-Q4XR5HBZ-jWirJQsj.mjs +71 -0
- package/dist/chunk-QBLGF6JB-hMrl9lGc.mjs +2 -0
- package/dist/chunk-QCDB2VPH-Cv7mIZWG.mjs +7 -0
- package/dist/chunk-QJ7O6ZN3-BRN048sn.mjs +6 -0
- package/dist/chunk-R6QSAL5T-CxzbKF59.mjs +2 -0
- package/dist/chunk-R6VWJ2ZL-DmUcUF0z.mjs +2 -0
- package/dist/chunk-R7FJI6CG-bmCS8vOS.mjs +2 -0
- package/dist/chunk-RPNGRAAP-BTpXCNpb.mjs +8 -0
- package/dist/chunk-RYQCIY6F-Dt7I2-Oy.mjs +2 -0
- package/dist/chunk-SDNKECQQ-BNRfy-15.mjs +6 -0
- package/dist/chunk-SNN4IESC-CZPQ88bY.mjs +2 -0
- package/dist/chunk-SNN4IESC-oXVGT9qo.mjs +2 -0
- package/dist/chunk-T56QNPHK-lY6QjpkL.mjs +15 -0
- package/dist/chunk-TLSUDHID-BP7dARSe.mjs +7 -0
- package/dist/chunk-TOMNU26N-BFsBBT9j.mjs +5 -0
- package/dist/chunk-TP4BZANS-C6KGxaUf.mjs +21 -0
- package/dist/chunk-TXBZCHCQ-DxPX5PCF.mjs +6 -0
- package/dist/chunk-U6XO7XAA-BHty90wb.mjs +3 -0
- package/dist/chunk-V5MWI2OL-DApVl_z4.mjs +5 -0
- package/dist/chunk-V7JOEXUC-DNM56rwe.mjs +207 -0
- package/dist/chunk-V7TAPXDL-CrGsULIH.mjs +28 -0
- package/dist/chunk-VAUOI2AC-BdotBBDE.mjs +2 -0
- package/dist/chunk-VJFXDYWH-DXnppZsu.mjs +11 -0
- package/dist/chunk-VOBGTVA6-_4QbVbSJ.mjs +7 -0
- package/dist/chunk-VR4S4FIN-RUJ5PgRH.mjs +2 -0
- package/dist/chunk-VYOJP4TV-DG_cm0JM.mjs +14 -0
- package/dist/chunk-WKFATFPP-DygaP6No.mjs +5 -0
- package/dist/chunk-WYO6CB5R-DN1R0VLx.mjs +130 -0
- package/dist/chunk-X2AJGDEF-BXjUENXL.mjs +2 -0
- package/dist/chunk-X2AJGDEF-ivzQBp_p.mjs +2 -0
- package/dist/chunk-XKQRETAK-CYJSOFLN.mjs +2 -0
- package/dist/chunk-XKWWSDBF-BTj39eCO.mjs +37 -0
- package/dist/chunk-XVDPCNWR-BSVT7Ttz.mjs +12 -0
- package/dist/chunk-XXDRQBXY-D1gFTzjI.mjs +2 -0
- package/dist/chunk-Y2CYZVJY-acXC9Sbb.mjs +2 -0
- package/dist/chunk-YMMW5UAP-CE-EQ2Is.mjs +33 -0
- package/dist/chunk-YOTPTUD7-63S9b4Z2.mjs +2 -0
- package/dist/chunk-YTNYSM6T-DFPh_641.mjs +12 -0
- package/dist/chunk-YULBWSET-B6FKJjk9.mjs +14 -0
- package/dist/chunk-Z6LRHWXI-BCgawaNX.mjs +14 -0
- package/dist/chunk-Z7JVV2SM-CTUpikzI.mjs +12 -0
- package/dist/chunk-ZGVPDNZ5-CyyHBEs2.mjs +63 -0
- package/dist/chunk-ZIRB5QZD-K23GvNu-.mjs +39 -0
- package/dist/chunk-ZZO3UDB3-MiEiJy8J.mjs +100 -0
- package/dist/classDiagram-OUVF2IWQ-0ApI9cDS.mjs +2 -0
- package/dist/classDiagram-v2-EOCWNBFH-DfQYJWNe.mjs +2 -0
- package/dist/clear-5CZ5X4YR-9EZyt4MH.mjs +2 -0
- package/dist/clear-5CZ5X4YR-BICGLF_r.mjs +1 -0
- package/dist/cli.mjs +22 -22
- package/dist/column-WLPMMSTS-D0I9TpQ2.mjs +1 -0
- package/dist/column-WLPMMSTS-Do8HgL6q.mjs +8 -0
- package/dist/comm-5SLSESQG-0igXzBnl.mjs +12 -0
- package/dist/comm-5SLSESQG-D2Rs9Jmo.mjs +1 -0
- package/dist/constants-C3InsrBS.mjs +2 -0
- package/dist/cose-bilkent-JH36ORCC-B1gjUwU3.mjs +2 -0
- package/dist/cp-XOYR4ABJ-CpnwcT2f.mjs +8 -0
- package/dist/cp-XOYR4ABJ-OfwEEWhR.mjs +1 -0
- package/dist/curl-47BFPSFW-Ko1BcK_R.mjs +26 -0
- package/dist/cut-OPC3VAGB-BAhJz0Qh.mjs +1 -0
- package/dist/cut-OPC3VAGB-nJAw1cEp.mjs +6 -0
- package/dist/cynefin-VYW2F7L2-C-aICrN-.mjs +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-CoESbhp4.mjs +63 -0
- package/dist/cytoscape.esm-D6l9Lhue.mjs +332 -0
- package/dist/dagre-BkPA5x_w.mjs +2 -0
- package/dist/dagre-VKFMJZFB-BhCtWAkc.mjs +5 -0
- package/dist/date-DD7FVA2V-BGJ9-l0O.mjs +1 -0
- package/dist/date-DD7FVA2V-W_sbdO4n.mjs +5 -0
- package/dist/defaultLocale-DN4qDyCE.mjs +2 -0
- package/dist/diagram-FQU43EPY-BdshpOzp.mjs +4 -0
- package/dist/diagram-G47NLZAW-Lw1fB9_w.mjs +25 -0
- package/dist/diagram-NH7WQ7WH-DnzwFaQq.mjs +25 -0
- package/dist/diagram-OA4YK3LP-BXU-URV1.mjs +31 -0
- package/dist/diagram-WEI45ONY-CD_Zpcvk.mjs +42 -0
- package/dist/diff-HJF2MPDN-CQAaA8lM.mjs +1 -0
- package/dist/diff-HJF2MPDN-EjmLU95d.mjs +7 -0
- package/dist/dirname-LEMTZZFS-BG01-R4_.mjs +1 -0
- package/dist/dirname-LEMTZZFS-Dg3ijqjM.mjs +5 -0
- package/dist/dist-CMZz8-Ge.mjs +2 -0
- package/dist/du-WO2ENHXQ-jqWYqk_n.mjs +8 -0
- package/dist/du-WO2ENHXQ-oQRVbsEF.mjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-D-647A1u.mjs +2 -0
- package/dist/echo-O45JWWI2-BPosfKdD.mjs +1 -0
- package/dist/echo-O45JWWI2-gk6mEMAU.mjs +4 -0
- package/dist/env-5EPCWSXR-BU5zTNDV.mjs +9 -0
- package/dist/env-5EPCWSXR-DygzVPiG.mjs +1 -0
- package/dist/erDiagram-Q63AITRT-DviwoNdm.mjs +86 -0
- package/dist/eventmodeling-45OFAUF4-CJqJ2hnR.mjs +1 -0
- package/dist/execAsync-BLKHjfg7.mjs +2 -0
- package/dist/execAsync-C5ympCkf.mjs +2 -0
- package/dist/expand-DTNXU4LQ-D2bEx87V.mjs +11 -0
- package/dist/expand-DTNXU4LQ-XU44HrWp.mjs +1 -0
- package/dist/expr-YYCVMXE3-DI2glLwn.mjs +1 -0
- package/dist/expr-YYCVMXE3-wI0boF3e.mjs +5 -0
- package/dist/file-IGDTDPLG-DkYMcmTl.mjs +24 -0
- package/dist/file-IGDTDPLG-sPfWVy9T.mjs +1 -0
- package/dist/find-DH2ALKQS-B6bMjuwo.mjs +12 -0
- package/dist/find-DH2ALKQS-CEKaRkgJ.mjs +1 -0
- package/dist/flag-coverage-6JEX67RU-QmoBigPs.mjs +2 -0
- package/dist/flowDiagram-23GEKE2U-Dhi3SNHm.mjs +1 -0
- package/dist/fold-LDSORVYE-Dhx0k6vg.mjs +12 -0
- package/dist/fold-LDSORVYE-DumfsCQO.mjs +1 -0
- package/dist/fs-traced-DVpoNaQJ.mjs +12 -0
- package/dist/fs-traced-_QGcVmcb.mjs +1 -0
- package/dist/ganttDiagram-NO4QXBWP-DnN5cTGV.mjs +293 -0
- package/dist/getMachineId-bsd-B_NuwbXS.mjs +2 -0
- package/dist/getMachineId-bsd-neTWr-l3.mjs +2 -0
- package/dist/getMachineId-darwin-BP4aVKkL.mjs +3 -0
- package/dist/getMachineId-darwin-DKDl-xYO.mjs +3 -0
- package/dist/getMachineId-linux-Bexb2iRT.mjs +2 -0
- package/dist/getMachineId-linux-YTb5epZX.mjs +2 -0
- package/dist/getMachineId-unsupported-Ddv20ynQ.mjs +2 -0
- package/dist/getMachineId-unsupported-DdwXS_Q3.mjs +2 -0
- package/dist/getMachineId-win-BNx0EbPq.mjs +2 -0
- package/dist/getMachineId-win-D8cNuBNk.mjs +2 -0
- package/dist/git-handle-DBSzQutT.mjs +1 -0
- package/dist/git-handle-r3d7s3VF.mjs +10 -0
- package/dist/gitGraph-TEB2WS4Q-_V7TMkJv.mjs +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-Bs2N855t.mjs +107 -0
- package/dist/graphlib-DXQPHTiH.mjs +2 -0
- package/dist/grep-2HUTXO5U-9G7xEEms.mjs +9 -0
- package/dist/grep-2HUTXO5U-DG5Ulinc.mjs +1 -0
- package/dist/gzip-AQXSGOVS-BcGYw5wM.mjs +32 -0
- package/dist/gzip-AQXSGOVS-D6UYmM0C.mjs +1 -0
- package/dist/head-HT2B6D2J-B5ybc-my.mjs +2 -0
- package/dist/head-HT2B6D2J-CHIR76LI.mjs +1 -0
- package/dist/help-VVWX7SA5-Bb8T3djf.mjs +16 -0
- package/dist/help-VVWX7SA5-BbK0QLPX.mjs +1 -0
- package/dist/history-J4QRNGRO-5XgHJL_Q.mjs +1 -0
- package/dist/history-J4QRNGRO-DesXbqi2.mjs +3 -0
- package/dist/hostname-BK6HG2DE-Clwz043m.mjs +1 -0
- package/dist/hostname-BK6HG2DE-DTiGP5th.mjs +3 -0
- package/dist/html-to-markdown-TFCECAGV-BsVwcc4T.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-DLUGt6pW.mjs +73 -0
- package/dist/index.d.mts +6867 -242
- package/dist/index.mjs +1521 -1
- package/dist/info-DKCQHKI2-DIsEz1l_.mjs +1 -0
- package/dist/infoDiagram-FWYZ7A6U-CD5T72Pd.mjs +3 -0
- package/dist/init-Cg1MczGq.mjs +638 -0
- package/dist/init-D8OKme52.mjs +2 -0
- package/dist/init-DnqdKHDS.mjs +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs +71 -0
- package/dist/join-GG2LDHE5-7k4Syl20.mjs +14 -0
- package/dist/join-GG2LDHE5-BIH_-8vD.mjs +1 -0
- package/dist/journeyDiagram-5HDEW3XC-BywkQV2b.mjs +140 -0
- package/dist/jq-LYZFFBZB-BZ4XP29I.mjs +14 -0
- package/dist/jq-LYZFFBZB-Dlyx6Y7w.mjs +1 -0
- package/dist/js-exec-VXN6TZ7U-BrugyKqi.mjs +97 -0
- package/dist/js-exec-VXN6TZ7U-Ds5SsewK.mjs +97 -0
- package/dist/kanban-definition-HUTT4EX6-DIgH0tMg.mjs +90 -0
- package/dist/launch-json-removal-DFF5AXyX.mjs +2 -0
- package/dist/lib-B2tLN_O_.mjs +2 -0
- package/dist/lib-DuDqLKFD.mjs +195 -0
- package/dist/lib-ozx_WsjS.mjs +2 -0
- package/dist/libesm-qUf-Au5c.mjs +14 -0
- package/dist/line-eTDW_zUy.mjs +2 -0
- package/dist/linear-Cn1royVQ.mjs +2 -0
- package/dist/ln-4TRFBYAT-B0hi-FAf.mjs +1 -0
- package/dist/ln-4TRFBYAT-DGrhTL40.mjs +9 -0
- package/dist/loader-4hXM3EID.mjs +1 -0
- package/dist/loader-CJynt8EV.mjs +2 -0
- package/dist/logger-DFxEUjvj.mjs +39 -0
- package/dist/ls-KSXFZCWH-C_kbnNdU.mjs +1 -0
- package/dist/ls-KSXFZCWH-GOWXktO9.mjs +28 -0
- package/dist/lzma-CD6C2vYw.mjs +2 -0
- package/dist/lzma-CG6o9sq-.mjs +2 -0
- package/dist/map-bDB3k8vA.mjs +2 -0
- package/dist/md-manager-BbSzMHHE.mjs +2 -0
- package/dist/md5sum-INMIK4DX-BlgGpdCD.mjs +2 -0
- package/dist/md5sum-INMIK4DX-DGvi_A-E.mjs +1 -0
- package/dist/mermaid-parser.core-uwQfwzUX.mjs +4 -0
- package/dist/mermaid.core-BgpKViY0.mjs +16 -0
- package/dist/mindmap-definition-LN4V7U3C-H3p7uT-G.mjs +97 -0
- package/dist/mkdir-TDEMSB6C-BVcgITXm.mjs +7 -0
- package/dist/mkdir-TDEMSB6C-CMOt1jIT.mjs +1 -0
- package/dist/mv-Z6MORUFL-CqyCV_Ze.mjs +1 -0
- package/dist/mv-Z6MORUFL-El0zMsEA.mjs +7 -0
- package/dist/nl-U5YJDM32-BO1kUpkn.mjs +1 -0
- package/dist/nl-U5YJDM32-Y_hGSMac.mjs +17 -0
- package/dist/od-VJEF2UR5-CueTpZ68.mjs +5 -0
- package/dist/od-VJEF2UR5-DxUGtlve.mjs +1 -0
- package/dist/open-browser-BgReR_t5.mjs +2 -0
- package/dist/ordinal-BFK2XMXf.mjs +2 -0
- package/dist/packet-7NZHBO7P-B64OS2eJ.mjs +1 -0
- package/dist/parse-worker.d.mts +6626 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/paste-7N6AFSDS-BJHZcYXH.mjs +1 -0
- package/dist/paste-7N6AFSDS-BnqApCW_.mjs +8 -0
- package/dist/path-CIoCsClp.mjs +2 -0
- package/dist/pegDiagram-2B236MQR-PBU61CXk.mjs +2 -0
- package/dist/pie-RZYD4A2V-B313HDTA.mjs +1 -0
- package/dist/pieDiagram-ENE6RG2P-ClZWrO6e.mjs +40 -0
- package/dist/preview-BnqROnAm.mjs +1 -0
- package/dist/preview-Dnob-x-p.mjs +3 -0
- package/dist/printf-CX64KX2P-841sNxew.mjs +1 -0
- package/dist/printf-CX64KX2P-B_vWcqAL.mjs +15 -0
- package/dist/public/assets/ActivityModeContent-H-D1VX7m.js +1 -0
- package/dist/public/assets/AgentDiffPane-B-gK5PsE.js +2 -0
- package/dist/public/assets/ChangedOutsideBadge-D741mWRP.js +1 -0
- package/dist/public/assets/DocumentContext-CIVf31K9.js +38 -0
- package/dist/public/assets/FeedbackForm-YmqhKCxZ.js +1 -0
- package/dist/public/assets/ImportSkillDialog-DQBS4ypC.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-CE_UbtEZ.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-CawqG1nH.js +2 -0
- package/dist/public/assets/SessionsHost-Bp7gQA1o.js +2 -0
- package/dist/public/assets/SettingsDialogBody-BLpulm10.js +12 -0
- package/dist/public/assets/SkillToolbarControls-oKXEehFt.js +1 -0
- package/dist/public/assets/SourceEditor-C6NdTjpn.js +1 -0
- package/dist/public/assets/TerminalWindowApp-DDnvJYMu.js +1 -0
- package/dist/public/assets/ThreadView-CGjBIs53.js +10 -0
- package/dist/public/assets/TimelineDiffPane-BWfU5B2x.js +2 -0
- package/dist/public/assets/agent-diff-store-CwO6mhOq.js +1 -0
- package/dist/public/assets/auth-state-cache-BBgW3LTD.js +11 -0
- package/dist/public/assets/comment-chips-h8GZFVHH.js +5 -0
- package/dist/public/assets/follow-file-CJHokzM7.js +1 -0
- package/dist/public/assets/index-B6VepqFk.js +2097 -0
- package/dist/public/assets/selection-context-iNNNmmJS.js +4 -0
- package/dist/public/assets/skill-actions-8q8e7e5S.js +2 -0
- package/dist/public/assets/typing-burst-detector-D_ygX_hf.js +8 -0
- package/dist/public/assets/use-activity-panel-pkBl8bMj.js +1 -0
- package/dist/public/assets/use-open-skill-Mk41LRxd.js +1 -0
- package/dist/public/assets/use-skill-directory-Dzvfx2id.js +1 -0
- package/dist/public/assets/use-timeline-entry-diff-Dk10Z55V.js +6 -0
- package/dist/public/index.html +13 -13
- package/dist/pwd-D4OZ7N27-C41v1g3B.mjs +1 -0
- package/dist/pwd-D4OZ7N27-NYST_A3S.mjs +3 -0
- package/dist/python3-DNGS4G3E-DaBJervu.mjs +12 -0
- package/dist/python3-DNGS4G3E-OzxoFG34.mjs +12 -0
- package/dist/quadrantDiagram-ABIIQ3AL-Z4PbVL1N.mjs +8 -0
- package/dist/radar-I7S5WNFK-BdiwGd2_.mjs +1 -0
- package/dist/railroad-3IZDKUUU-O4nBw7jb.mjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-CDaO5Dcu.mjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-CS4l_gpR.mjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-bbLhALeS.mjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-ZSRYpY_p.mjs +2 -0
- package/dist/readlink-MI4GCHJF-CQlQ03aa.mjs +1 -0
- package/dist/readlink-MI4GCHJF-Dl1Uxmrf.mjs +6 -0
- package/dist/repair-launch-json-DF-pHfel.mjs +2 -0
- package/dist/repair-mcp-configs-Cr9jCNwk.mjs +2 -0
- package/dist/repair-skills-DADI6iaT.mjs +4 -0
- package/dist/repair-skills-DKwDAoHc.mjs +1 -0
- package/dist/requirementDiagram-TGXJPOKE-H6OWjjJE.mjs +85 -0
- package/dist/rev-XOSYPP45-BYe7prl1.mjs +1 -0
- package/dist/rev-XOSYPP45-D6eJxPKd.mjs +7 -0
- package/dist/rg-XNF3R3II-CmxxmmUf.mjs +1 -0
- package/dist/rg-XNF3R3II-vKB7djPZ.mjs +33 -0
- package/dist/rm-RTZG23RL-Bl5s9ltJ.mjs +1 -0
- package/dist/rm-RTZG23RL-sCMTtbxP.mjs +8 -0
- package/dist/rmdir-XTQXT7RK-C1ccje2_.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-DZfv6Zfz.mjs +14 -0
- package/dist/rough.cjs-BGkc0Naf.mjs +2 -0
- package/dist/sankeyDiagram-HTMAVEWB-CtBVJJox.mjs +41 -0
- package/dist/sed-JAPPVBEU-C7wh6RxT.mjs +100 -0
- package/dist/sed-JAPPVBEU-D9bYEx2I.mjs +1 -0
- package/dist/seq-RN5ZUASB-CFySG-xk.mjs +1 -0
- package/dist/seq-RN5ZUASB-R5HjEVux.mjs +7 -0
- package/dist/sequenceDiagram-DBY2YBRQ-DDLm4Ak_.mjs +163 -0
- package/dist/server-lock-U8YDpJpq.mjs +1 -0
- package/dist/server-lock-aXnDVUI8.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DfzpfxJ-.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DgLJCjAg.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-DZ42pgY3.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-DrKtnAPK.mjs +2 -0
- package/dist/sizeCapture-X5ZJPWSS-Izaz24Pi.mjs +2 -0
- package/dist/skill-teardown-onVYT1VF.mjs +2 -0
- package/dist/sleep-VZFPZFWA-5fZFI3Vy.mjs +1 -0
- package/dist/sleep-VZFPZFWA-CBARUnrz.mjs +10 -0
- package/dist/sort-DCNRDA7U-RFl0HYBr.mjs +1 -0
- package/dist/sort-DCNRDA7U-vT57Mw8o.mjs +16 -0
- package/dist/split-SITCSYCZ-BdATfTxU.mjs +1 -0
- package/dist/split-SITCSYCZ-Ci_IfVPT.mjs +17 -0
- package/dist/sqlite3-TE5AIOTF-BIRMe0xz.mjs +1 -0
- package/dist/sqlite3-TE5AIOTF-BhXSdz7U.mjs +37 -0
- package/dist/src-BPVU4Y0o.mjs +2 -0
- package/dist/src-BmS3oGY4.mjs +1 -0
- package/dist/src-Dt5dAyFQ.mjs +2032 -0
- package/dist/src-TKCctdpc.mjs +348 -0
- package/dist/src-cRpQSbXB.mjs +1 -0
- package/dist/src-pUQbXiSN.mjs +20 -0
- package/dist/start-DQdc8wXO.mjs +4 -0
- package/dist/start-XIVqnuqY.mjs +1 -0
- package/dist/stat-BT5A227F-CEZPXJ9_.mjs +9 -0
- package/dist/stat-BT5A227F-Dd-OyLQQ.mjs +1 -0
- package/dist/stateDiagram-2N3HPSRC-pAn2bDnn.mjs +2 -0
- package/dist/stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs +2 -0
- package/dist/strings-7PLOGTPD-CiVw0Uh4.mjs +14 -0
- package/dist/strings-7PLOGTPD-v3qEuUEm.mjs +1 -0
- package/dist/swimlanes-5IMT3BWC-nSsjdSnj.mjs +2 -0
- package/dist/swimlanesDiagram-G3AALYLV-CdQlHesp.mjs +9 -0
- package/dist/tac-SJGXQ4T2-BL4Xd7y6.mjs +9 -0
- package/dist/tac-SJGXQ4T2-DphHfCAY.mjs +1 -0
- package/dist/tail-S5ULNTJU-Cfa1pDQZ.mjs +2 -0
- package/dist/tail-S5ULNTJU-D6qRQZwV.mjs +1 -0
- package/dist/tar-MZQD7NO4-HJsWmzu9.mjs +63 -0
- package/dist/tar-MZQD7NO4-oAQoyk28.mjs +1 -0
- package/dist/tee-O7VXZDCO-D95l5L5Z.mjs +3 -0
- package/dist/tee-O7VXZDCO-odVO6Wjw.mjs +1 -0
- package/dist/time-DEUO3QV2-CviQF55F.mjs +1 -0
- package/dist/time-DEUO3QV2-DwnT4FOS.mjs +14 -0
- package/dist/timeline-definition-FHXFAJF6-CnTXJoEq.mjs +121 -0
- package/dist/timeout-VRKMCG72-DFU5EkCe.mjs +12 -0
- package/dist/timeout-VRKMCG72-jeMAkAMc.mjs +1 -0
- package/dist/touch-DX2IJOQ4-CRX6GYeb.mjs +7 -0
- package/dist/touch-DX2IJOQ4-CyiMRd7b.mjs +1 -0
- package/dist/tr-2HXZRDSW-ByYmbFae.mjs +21 -0
- package/dist/tr-2HXZRDSW-CCce6lU_.mjs +1 -0
- package/dist/tree-LYXBS7DC-Dq6aWetx.mjs +12 -0
- package/dist/tree-LYXBS7DC-pAC77Hbt.mjs +1 -0
- package/dist/treeView-QDETBFTQ-BCAjffnq.mjs +1 -0
- package/dist/treemap-6X3UGDF4-Dv-54pyt.mjs +1 -0
- package/dist/true-WHJNXCHG-Dzdq7R5f.mjs +1 -0
- package/dist/true-WHJNXCHG-XC4ZnbBw.mjs +2 -0
- package/dist/unexpand-RGTMIGZM-B06mOUPB.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-BL5sZ5_Z.mjs +11 -0
- package/dist/uniq-SUNANL47-BIgIOFSf.mjs +1 -0
- package/dist/uniq-SUNANL47-DBRSkw7j.mjs +5 -0
- package/dist/vennDiagram-L72KCM5P-CqTzYRfa.mjs +35 -0
- package/dist/wardley-OPB4EBWU-DSvo57UC.mjs +1 -0
- package/dist/wardleyDiagram-EHGQE667-WhxG-nRT.mjs +79 -0
- package/dist/wc-TQB3VNOX-9RyJlZXB.mjs +1 -0
- package/dist/wc-TQB3VNOX-DqHFY4jy.mjs +6 -0
- package/dist/which-XZHEH76L-CbmRVw8E.mjs +3 -0
- package/dist/which-XZHEH76L-SMFjHhz2.mjs +1 -0
- package/dist/whoami-DGKU3D2X-BDJh39KM.mjs +3 -0
- package/dist/whoami-DGKU3D2X-BIUooLXE.mjs +1 -0
- package/dist/write-project-skill-DOogyZge.mjs +56 -0
- package/dist/xan-UD7JYIL2-DAuAMQ0H.mjs +1 -0
- package/dist/xan-UD7JYIL2-DQo9f-1a.mjs +140 -0
- package/dist/xan-view-OW2TB7Z3-BhVOL6hm.mjs +1 -0
- package/dist/xan-view-OW2TB7Z3-CwG0zS53.mjs +1 -0
- package/dist/xargs-I6EZUCYF-C_ZtmUCd.mjs +5 -0
- package/dist/xargs-I6EZUCYF-INAdKqnR.mjs +1 -0
- package/dist/xychartDiagram-FW5EYKEG-DDE7TRrw.mjs +8 -0
- package/dist/yazl-BlMyAOcT.mjs +2 -0
- package/dist/yq-OAKYHSXH-C1fFFHD4.mjs +1 -0
- package/dist/yq-OAKYHSXH-COzSqY4J.mjs +288 -0
- package/package.json +7 -6
- package/dist/abnfDiagram-VRR7QNED-DQjgDcgA.mjs +0 -2
- package/dist/acp-harness-probe-DOXp9Wx4.mjs +0 -3
- package/dist/alias-JE7RI5QX-BfILuEvo.mjs +0 -1
- package/dist/arc-CO8jsQkL.mjs +0 -2
- package/dist/architecture-TIHT7OUA-CScIhnar.mjs +0 -1
- package/dist/architectureDiagram-ZJ3FMSHR-CkUIG8wd.mjs +0 -37
- package/dist/array-Cerc_8W3.mjs +0 -2
- package/dist/awk2-BBAGSFUB-BH8WxyhW.mjs +0 -1
- package/dist/banner-CIK2GwPx.mjs +0 -3
- package/dist/base64-4YMZCVJ5-CDuRvFBG.mjs +0 -1
- package/dist/basename-AA2KJYZQ-sv8gJZXS.mjs +0 -1
- package/dist/bash-IJWYRKFO-DKUaUgF9.mjs +0 -1
- package/dist/blockDiagram-677ZJIJ3-sLhYyPCr.mjs +0 -133
- package/dist/c4Diagram-LMCZKHZV-Cg6dfUXU.mjs +0 -11
- package/dist/cat-RDUMLXKC-BtNo16C3.mjs +0 -1
- package/dist/channel-DRk0OEK0.mjs +0 -2
- package/dist/chmod-SYMGL4JA-B15Xlp42.mjs +0 -1
- package/dist/chokidar-CVNrjmRM.mjs +0 -4
- package/dist/chunk-2Q5K7J3B-2Es1K_NO.mjs +0 -2
- package/dist/chunk-2TRDZQLB-G1LvPXqq.mjs +0 -18
- package/dist/chunk-32BRIVSS-ok2xg0Je.mjs +0 -2
- package/dist/chunk-3BS5SKQH-CFcrGLDG.mjs +0 -140
- package/dist/chunk-3H6UQG3A-Dx5ykWR0.mjs +0 -9
- package/dist/chunk-3ZUFRYJ4-DzbWfyzV.mjs +0 -2
- package/dist/chunk-4GTNDTRF-COTPYeV6.mjs +0 -8
- package/dist/chunk-4HHKTUW3-BkuKGebe.mjs +0 -3
- package/dist/chunk-4Q4SM6WR-i8tiQRv3.mjs +0 -5
- package/dist/chunk-52WLFC77-BaT5_S-q.mjs +0 -11
- package/dist/chunk-55VFSPNA-Ct9maI6O.mjs +0 -3
- package/dist/chunk-5FCAYU7R-of7BBDNL.mjs +0 -2
- package/dist/chunk-5HE753X5-9kILZ5Nr.mjs +0 -2
- package/dist/chunk-5JV3BV7I-BKVVlFxh.mjs +0 -2
- package/dist/chunk-5QVNJEHU-CvZ-NmqQ.mjs +0 -9
- package/dist/chunk-5TONJI2A-CGHpmUrS.mjs +0 -3
- package/dist/chunk-5V6VZH6T-DdeqP2TW.mjs +0 -2
- package/dist/chunk-5VM5RSS4-COK1ErrI.mjs +0 -16
- package/dist/chunk-62RKD26F-RtrcFE7S.mjs +0 -21
- package/dist/chunk-64BAICW3-0h-yIc1e.mjs +0 -2
- package/dist/chunk-6Z5SFZXK-C5owNg1o.mjs +0 -288
- package/dist/chunk-74CEPOFO--xsxhUFC.mjs +0 -23
- package/dist/chunk-7BUUIJ7U-_1oXd84C.mjs +0 -2
- package/dist/chunk-7L36YK2X-VlH7dlrD.mjs +0 -3
- package/dist/chunk-7TSDKFEO-BjOrsK6M.mjs +0 -2
- package/dist/chunk-A4HU7SVR-oMNSpej4.mjs +0 -3
- package/dist/chunk-A4JSPFCI-DtnWqT5O.mjs +0 -7
- package/dist/chunk-A65PWWJC-LctFeUxK.mjs +0 -3
- package/dist/chunk-A7A2DBEE-DuuhuGG1.mjs +0 -7
- package/dist/chunk-A7ICOL4V-CzYDHdxM.mjs +0 -14
- package/dist/chunk-ALLTKNUZ-BnLIZXEI.mjs +0 -6
- package/dist/chunk-APT7OOP2-DESh647P.mjs +0 -2
- package/dist/chunk-BIQX33UG-BVtPexox.mjs +0 -2
- package/dist/chunk-C7G6YPKG-DpNJWc2e.mjs +0 -2
- package/dist/chunk-CQNSW5MT-B6mAd0WS.mjs +0 -2
- package/dist/chunk-CYSBUYHQ-CTWbbsmm.mjs +0 -2
- package/dist/chunk-D4J545R4-Dy3lcp_X.mjs +0 -12
- package/dist/chunk-D6CWQ5DW-Dl4tJcwX.mjs +0 -6
- package/dist/chunk-D7MEQ3VN-B-Qyxyo5.mjs +0 -5
- package/dist/chunk-DBKNVD4L-Y2Mnp5lC.mjs +0 -10
- package/dist/chunk-DCAAORBQ-BxtVrSMT.mjs +0 -2
- package/dist/chunk-EEXR5ZDP-BcjEP2wd.mjs +0 -3
- package/dist/chunk-EIZGF4BS-DYiqM1Ss.mjs +0 -9
- package/dist/chunk-EMLP6XTP-AFimKO17.mjs +0 -2
- package/dist/chunk-EX3LRPZG-BYcqQlY8.mjs +0 -232
- package/dist/chunk-F23WWYKW-BuCITNd6.mjs +0 -17
- package/dist/chunk-FWX5IMBZ-BFNo8SGu.mjs +0 -2
- package/dist/chunk-GCTKCWKD-jz3yOk3f.mjs +0 -4
- package/dist/chunk-GOV5EKKI-IRzA9ik3.mjs +0 -10
- package/dist/chunk-GXVXFKBA-CGc4vqMu.mjs +0 -6
- package/dist/chunk-HDQ56CKY-Svz-iz8m.mjs +0 -16
- package/dist/chunk-HJQJAYMS-SgZmT_QE.mjs +0 -3
- package/dist/chunk-HJWBQKYG-BqFDM0xp.mjs +0 -6
- package/dist/chunk-HKLCLINH-DKx243zB.mjs +0 -63
- package/dist/chunk-HL6NGDO2-B9GCn41X.mjs +0 -24
- package/dist/chunk-HOUHSVGY-Cg_2_CUd.mjs +0 -2
- package/dist/chunk-HWKDQ44K-CVxg-h0V.mjs +0 -4
- package/dist/chunk-I57KEIP3-FVl4IVXz.mjs +0 -11
- package/dist/chunk-ICXQ74PX-CewdqzeE.mjs +0 -3
- package/dist/chunk-JG7HCLWE-BgiWVzAI.mjs +0 -3
- package/dist/chunk-JVPRLUMK-CH7w4zyh.mjs +0 -8
- package/dist/chunk-JWPE2WC7-cMhWwV9I.mjs +0 -2
- package/dist/chunk-K6LIBGJA-DI9ZkJey.mjs +0 -12
- package/dist/chunk-KEIR6QF5-BhaMJNB5.mjs +0 -176
- package/dist/chunk-KMEYNNUA-CabTsa7P.mjs +0 -16
- package/dist/chunk-KRBPSX3W-ciCGjpAL.mjs +0 -6
- package/dist/chunk-LL3S3NLB-r8mDpVuz.mjs +0 -2
- package/dist/chunk-LTZRCH7N-Cj1hz7m7.mjs +0 -32
- package/dist/chunk-LWEGUNWT-C3ON4AHi.mjs +0 -8
- package/dist/chunk-MDDMCKUK-D3MZs3FF.mjs +0 -7
- package/dist/chunk-MDLLFABN-DgTeOfIY.mjs +0 -73
- package/dist/chunk-MHTUABJP-BbSobv_U.mjs +0 -9
- package/dist/chunk-MIZPJHVH-CzqfuBdK.mjs +0 -8
- package/dist/chunk-MLXIYONF-BcM04nM_.mjs +0 -16
- package/dist/chunk-MOJQB5TN-CidbQQ7m.mjs +0 -89
- package/dist/chunk-MOZMSUNE-DTiZcqZ1.mjs +0 -2
- package/dist/chunk-MYE6AGBJ-B3ukegXT.mjs +0 -17
- package/dist/chunk-NAERJDUW-CoAYVGR3.mjs +0 -9
- package/dist/chunk-NCNPKYJZ-C1KcgrGe.mjs +0 -3
- package/dist/chunk-NUYSJFDK-sPbPxu4W.mjs +0 -8
- package/dist/chunk-OCLXQMOG-BdLZfp3D.mjs +0 -7
- package/dist/chunk-OCS6LSEM-7beNWT9m.mjs +0 -14
- package/dist/chunk-OGEWGWER-B-Vr80Fa.mjs +0 -2
- package/dist/chunk-OSBZ3O6U-DwDyo3Ly.mjs +0 -2
- package/dist/chunk-PBXLG62G-ww-bn-Tp.mjs +0 -9
- package/dist/chunk-PP6PSHAB-xKRHmmOd.mjs +0 -5
- package/dist/chunk-PUDLZKDR-CI0pacGF.mjs +0 -157
- package/dist/chunk-PXTK5WE2-Dfi2FrE5.mjs +0 -22
- package/dist/chunk-PYSFUGCK-BHwvxY2Q.mjs +0 -11
- package/dist/chunk-Q4XR5HBZ-4H-m7p0G.mjs +0 -71
- package/dist/chunk-QBLGF6JB-B_tvtCRO.mjs +0 -2
- package/dist/chunk-QCDB2VPH-DHsQu4h6.mjs +0 -7
- package/dist/chunk-QJ7O6ZN3-CTKdWbns.mjs +0 -6
- package/dist/chunk-R6QSAL5T-DA60heK6.mjs +0 -2
- package/dist/chunk-R7FJI6CG-BVR1ae7y.mjs +0 -2
- package/dist/chunk-RPNGRAAP-df7FdhI4.mjs +0 -8
- package/dist/chunk-RYQCIY6F-C8F82Uai.mjs +0 -2
- package/dist/chunk-SDNKECQQ-BuTL-ot2.mjs +0 -6
- package/dist/chunk-SNN4IESC-DVqEOGsL.mjs +0 -2
- package/dist/chunk-T56QNPHK-COZC2A_r.mjs +0 -15
- package/dist/chunk-TLSUDHID-DAREQN9J.mjs +0 -7
- package/dist/chunk-TOMNU26N-C3JZDC96.mjs +0 -5
- package/dist/chunk-TP4BZANS-C2Z-CHHA.mjs +0 -21
- package/dist/chunk-TXBZCHCQ-DOaoE5TV.mjs +0 -6
- package/dist/chunk-U6XO7XAA-BpjdcG5R.mjs +0 -3
- package/dist/chunk-V5MWI2OL-D8SKWVO_.mjs +0 -5
- package/dist/chunk-V7JOEXUC-CdEIYYNc.mjs +0 -207
- package/dist/chunk-V7TAPXDL-CQbB1mLa.mjs +0 -28
- package/dist/chunk-VAUOI2AC-Ds6ZNp2p.mjs +0 -2
- package/dist/chunk-VJFXDYWH-C7Lg-Yts.mjs +0 -11
- package/dist/chunk-VOBGTVA6-CKl2LR-K.mjs +0 -7
- package/dist/chunk-VR4S4FIN-mH-q10Uq.mjs +0 -2
- package/dist/chunk-VYOJP4TV-DFxaC5Uc.mjs +0 -14
- package/dist/chunk-WKFATFPP-R7B51gCW.mjs +0 -5
- package/dist/chunk-WYO6CB5R-Cg1RXhAT.mjs +0 -130
- package/dist/chunk-X2AJGDEF-D97qevlv.mjs +0 -2
- package/dist/chunk-XKQRETAK-BTmmMuta.mjs +0 -2
- package/dist/chunk-XKWWSDBF-BGzAOrO3.mjs +0 -37
- package/dist/chunk-XVDPCNWR-3ajbQWzU.mjs +0 -12
- package/dist/chunk-XXDRQBXY-BvbdToKZ.mjs +0 -2
- package/dist/chunk-Y2CYZVJY-C7FmC3Cl.mjs +0 -2
- package/dist/chunk-YMMW5UAP-DbBgrudQ.mjs +0 -33
- package/dist/chunk-YOTPTUD7-BSOqhRr-.mjs +0 -2
- package/dist/chunk-YTNYSM6T-CoxqCaLl.mjs +0 -12
- package/dist/chunk-YULBWSET-CuKhTv4j.mjs +0 -14
- package/dist/chunk-Z6LRHWXI-CujGXDs8.mjs +0 -14
- package/dist/chunk-Z7JVV2SM-CiJwkxuY.mjs +0 -12
- package/dist/chunk-ZGVPDNZ5-BE_qYP6z.mjs +0 -63
- package/dist/chunk-ZIRB5QZD-mhYZnDzb.mjs +0 -39
- package/dist/chunk-ZZO3UDB3-DCkJjNN2.mjs +0 -100
- package/dist/classDiagram-OUVF2IWQ-rKP7gcsT.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-BoWf4tYI.mjs +0 -2
- package/dist/clear-5CZ5X4YR-BNXs_KRD.mjs +0 -1
- package/dist/column-WLPMMSTS-BrY1gQI1.mjs +0 -1
- package/dist/comm-5SLSESQG-aGB098lH.mjs +0 -1
- package/dist/constants-J4-mibQ1.mjs +0 -2
- package/dist/cose-bilkent-JH36ORCC-CMfIp4st.mjs +0 -2
- package/dist/cp-XOYR4ABJ-D0LUaMQT.mjs +0 -1
- package/dist/curl-47BFPSFW-d1TMPUJw.mjs +0 -26
- package/dist/cut-OPC3VAGB-FXZX1WQM.mjs +0 -1
- package/dist/cynefin-VYW2F7L2-DtazLHUs.mjs +0 -1
- package/dist/cynefinDiagram-TSTJHNR4-CFbt5v4d.mjs +0 -63
- package/dist/cytoscape.esm-Dq6ZD9GH.mjs +0 -332
- package/dist/dagre-CbI1Ylqw.mjs +0 -2
- package/dist/dagre-VKFMJZFB-BWP36rMX.mjs +0 -5
- package/dist/date-DD7FVA2V-7hk1aW9g.mjs +0 -1
- package/dist/defaultLocale-9SlCuWEL.mjs +0 -2
- package/dist/diagram-FQU43EPY-D2pf7IBH.mjs +0 -4
- package/dist/diagram-G47NLZAW-BlOXaBe6.mjs +0 -25
- package/dist/diagram-NH7WQ7WH-DOwRNWDI.mjs +0 -25
- package/dist/diagram-OA4YK3LP-uyGYHUoX.mjs +0 -31
- package/dist/diagram-WEI45ONY-CmW1X9Kx.mjs +0 -42
- package/dist/diff-HJF2MPDN-bcOaHvDo.mjs +0 -1
- package/dist/dirname-LEMTZZFS-RRQ5Ar_Z.mjs +0 -1
- package/dist/dist-BmYngy7b.mjs +0 -2
- package/dist/du-WO2ENHXQ-Cg71FvLi.mjs +0 -1
- package/dist/ebnfDiagram-CCIWWBDH-BpBYlrRH.mjs +0 -2
- package/dist/echo-O45JWWI2-BacOdfFs.mjs +0 -1
- package/dist/env-5EPCWSXR-T8XCKOX_.mjs +0 -1
- package/dist/erDiagram-Q63AITRT-ChoKKmxG.mjs +0 -86
- package/dist/eventmodeling-45OFAUF4-BIXp-P6z.mjs +0 -1
- package/dist/execAsync-BKp2jujj.mjs +0 -2
- package/dist/execAsync-BuUKdKlz.mjs +0 -2
- package/dist/expand-DTNXU4LQ-BD32VJaK.mjs +0 -1
- package/dist/expr-YYCVMXE3-CgQib9F9.mjs +0 -1
- package/dist/file-IGDTDPLG-BAlm5q29.mjs +0 -1
- package/dist/find-DH2ALKQS-z-G7VPmU.mjs +0 -1
- package/dist/flag-coverage-6JEX67RU-Cj_NycUm.mjs +0 -2
- package/dist/flowDiagram-23GEKE2U-B4VrCGdr.mjs +0 -1
- package/dist/fold-LDSORVYE-CDU-6eOS.mjs +0 -1
- package/dist/fs-traced-By5aY-RE.mjs +0 -12
- package/dist/fs-traced-CkLhqsEn.mjs +0 -1
- package/dist/ganttDiagram-NO4QXBWP-Cv7sGb-R.mjs +0 -293
- package/dist/getMachineId-bsd-DtFrm1Uy.mjs +0 -2
- package/dist/getMachineId-bsd-GFl1-Bje.mjs +0 -2
- package/dist/getMachineId-darwin--IR8MP8d.mjs +0 -3
- package/dist/getMachineId-darwin-28jQHa_N.mjs +0 -3
- package/dist/getMachineId-linux-BZgyplQ5.mjs +0 -2
- package/dist/getMachineId-linux-Bzx3S652.mjs +0 -2
- package/dist/getMachineId-unsupported-CyTjujlI.mjs +0 -2
- package/dist/getMachineId-unsupported-DuB0leRF.mjs +0 -2
- package/dist/getMachineId-win-BmvAZEMa.mjs +0 -2
- package/dist/getMachineId-win-CuOFQQ73.mjs +0 -2
- package/dist/git-handle-BDmbIWwd.mjs +0 -1
- package/dist/git-handle-BHe1p04S.mjs +0 -10
- package/dist/gitGraph-TEB2WS4Q-BaTdqV7-.mjs +0 -1
- package/dist/gitGraphDiagram-IHSO6WYX-DxsFHicP.mjs +0 -107
- package/dist/graphlib-DKEQBDTz.mjs +0 -2
- package/dist/grep-2HUTXO5U-CsEE08ya.mjs +0 -1
- package/dist/gzip-AQXSGOVS-CmMf6H0r.mjs +0 -1
- package/dist/head-HT2B6D2J-DSBJixLD.mjs +0 -1
- package/dist/help-VVWX7SA5-BncYWg0B.mjs +0 -1
- package/dist/history-J4QRNGRO-CULSDkzp.mjs +0 -1
- package/dist/hostname-BK6HG2DE-CaZb-T_R.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-CF0t8_d3.mjs +0 -1
- package/dist/index-1MIt1xrM.d.mts +0 -6628
- package/dist/info-DKCQHKI2-BxlpeeVn.mjs +0 -1
- package/dist/infoDiagram-FWYZ7A6U-CbPpTq2x.mjs +0 -3
- package/dist/init-Buw5jj4Q.mjs +0 -2
- package/dist/init-DDwncQha.mjs +0 -1
- package/dist/init-ZOWQ1Th4.mjs +0 -643
- package/dist/ishikawaDiagram-FXEZZL3T-Dd5BEpOv.mjs +0 -71
- package/dist/join-GG2LDHE5-kABASDPB.mjs +0 -1
- package/dist/journeyDiagram-5HDEW3XC-W6Nbr96_.mjs +0 -140
- package/dist/jq-LYZFFBZB-CIwp4u6h.mjs +0 -1
- package/dist/js-exec-VXN6TZ7U-1yyCDQqM.mjs +0 -97
- package/dist/kanban-definition-HUTT4EX6-xcwe5vNg.mjs +0 -90
- package/dist/launch-json-removal-CcFuFFS1.mjs +0 -2
- package/dist/lib-BCIeHFfP.mjs +0 -2
- package/dist/lib-TLTWf9qr.mjs +0 -195
- package/dist/line-Cq-NoiNn.mjs +0 -2
- package/dist/linear-DPbvcrPk.mjs +0 -2
- package/dist/ln-4TRFBYAT-Dhr3hBr6.mjs +0 -1
- package/dist/loader-BcwbnY_K.mjs +0 -1
- package/dist/loader-ji3pPcXi.mjs +0 -2
- package/dist/logger-BZPV1wv8.mjs +0 -39
- package/dist/ls-KSXFZCWH-BEv3e7-2.mjs +0 -1
- package/dist/lzma-Dh_aFpqW.mjs +0 -2
- package/dist/map-CFzSl60r.mjs +0 -2
- package/dist/md-manager-B4-M0hXs.mjs +0 -2
- package/dist/md5sum-INMIK4DX-CJ1G9gTe.mjs +0 -1
- package/dist/mermaid-parser.core-DejmtVwC.mjs +0 -4
- package/dist/mermaid.core-CB8v9A8r.mjs +0 -16
- package/dist/mindmap-definition-LN4V7U3C-BiYp6fzL.mjs +0 -97
- package/dist/mkdir-TDEMSB6C-BY7IIkok.mjs +0 -1
- package/dist/mv-Z6MORUFL-C4m2WG8E.mjs +0 -1
- package/dist/nl-U5YJDM32-CrNZhLtI.mjs +0 -1
- package/dist/od-VJEF2UR5-5RFpmlxK.mjs +0 -1
- package/dist/open-browser-CxnOIVsL.mjs +0 -2
- package/dist/ordinal-D5S_JXYv.mjs +0 -2
- package/dist/packet-7NZHBO7P-DJoR1MQJ.mjs +0 -1
- package/dist/paste-7N6AFSDS-DQNANxpk.mjs +0 -1
- package/dist/path-D4ahAhVD.mjs +0 -2
- package/dist/pegDiagram-2B236MQR-DMP1ng8V.mjs +0 -2
- package/dist/pie-RZYD4A2V-Ba8iL0H-.mjs +0 -1
- package/dist/pieDiagram-ENE6RG2P-CSKXRjGQ.mjs +0 -40
- package/dist/preview-2rQXoRuM.mjs +0 -3
- package/dist/preview-MV-qHfzy.mjs +0 -1
- package/dist/printf-CX64KX2P-CKuJk-Cs.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-C08FYohG.js +0 -1
- package/dist/public/assets/AgentDiffPane-T499-ugv.js +0 -2
- package/dist/public/assets/ChangedOutsideBadge-GeQfL_b-.js +0 -1
- package/dist/public/assets/DocumentContext-C-Lo65-_.js +0 -38
- package/dist/public/assets/FeedbackForm-CmdTz11F.js +0 -1
- package/dist/public/assets/ImportSkillDialog-ChsGV6eb.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B1ZA0ofn.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +0 -1
- package/dist/public/assets/SessionsHost-BobZkNwc.js +0 -2
- package/dist/public/assets/SettingsDialogBody-COTbFRqi.js +0 -12
- package/dist/public/assets/SkillToolbarControls-PvRY_LHn.js +0 -1
- package/dist/public/assets/SourceEditor-Duqpede9.js +0 -1
- package/dist/public/assets/TerminalWindowApp-CgWp2eC-.js +0 -1
- package/dist/public/assets/ThreadView-VqdgemBS.js +0 -10
- package/dist/public/assets/TimelineDiffPane-DnaRcvCk.js +0 -2
- package/dist/public/assets/agent-diff-store-B7oQn7l7.js +0 -1
- package/dist/public/assets/auth-state-cache-BUYyIMUZ.js +0 -11
- package/dist/public/assets/comment-chips-BhvfCPCk.js +0 -5
- package/dist/public/assets/follow-file-CWSsUd-S.js +0 -1
- package/dist/public/assets/index-Dmlpu4P1.js +0 -2097
- package/dist/public/assets/selection-context-CSP8zK1H.js +0 -4
- package/dist/public/assets/skill-actions-98H3SnCL.js +0 -2
- package/dist/public/assets/typing-burst-detector-BOmjXV-P.js +0 -8
- package/dist/public/assets/use-activity-panel-BwANCYjg.js +0 -1
- package/dist/public/assets/use-open-skill-DCSEJ3jJ.js +0 -1
- package/dist/public/assets/use-skill-directory-D9S5f8By.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-CB_cI1yy.js +0 -6
- package/dist/pwd-D4OZ7N27-CSTLotxZ.mjs +0 -1
- package/dist/python3-DNGS4G3E-BZ5fPY5e.mjs +0 -12
- package/dist/quadrantDiagram-ABIIQ3AL-Do93EPf_.mjs +0 -8
- package/dist/radar-I7S5WNFK-HP72Fmhl.mjs +0 -1
- package/dist/railroad-3IZDKUUU-DC3PWo_6.mjs +0 -1
- package/dist/railroad-abnf-AHOZXSZD-Vgpa9_KI.mjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-B4SmMMsT.mjs +0 -1
- package/dist/railroad-peg-LSFZ7HO6-DLlDiUuB.mjs +0 -1
- package/dist/railroadDiagram-RFXS5EU6-BBHONGQu.mjs +0 -2
- package/dist/readlink-MI4GCHJF-V9fwXBrg.mjs +0 -1
- package/dist/repair-launch-json-Cq9ghST3.mjs +0 -2
- package/dist/repair-mcp-configs-DY0FS2-y.mjs +0 -2
- package/dist/repair-skills-CkZZbtNk.mjs +0 -4
- package/dist/repair-skills-l9Id0gzv.mjs +0 -1
- package/dist/requirementDiagram-TGXJPOKE-CAGy_wFo.mjs +0 -85
- package/dist/rev-XOSYPP45-G2PvMYC2.mjs +0 -1
- package/dist/rg-XNF3R3II-CuFYIwNn.mjs +0 -1
- package/dist/rm-RTZG23RL-BOvMrhon.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-Dk19R-p8.mjs +0 -1
- package/dist/rough.cjs-LxmwwhvT.mjs +0 -2
- package/dist/sankeyDiagram-HTMAVEWB-B59ayZ_U.mjs +0 -41
- package/dist/sed-JAPPVBEU-BUaK4riL.mjs +0 -1
- package/dist/seq-RN5ZUASB-D5aLn_so.mjs +0 -1
- package/dist/sequenceDiagram-DBY2YBRQ-BqY5gm2k.mjs +0 -163
- package/dist/server-lock-BleUv9m0.mjs +0 -2
- package/dist/server-lock-uucDARDL.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-DnTKth9v.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-Z-xtGDHc.mjs +0 -1
- package/dist/sizeCapture-X5ZJPWSS-D7Nqbe-W.mjs +0 -2
- package/dist/skill-teardown-CZnemDLF.mjs +0 -2
- package/dist/sleep-VZFPZFWA-DcISab6N.mjs +0 -1
- package/dist/sort-DCNRDA7U-C1gRzOOY.mjs +0 -1
- package/dist/split-SITCSYCZ-D4U2N_sH.mjs +0 -1
- package/dist/sqlite3-TE5AIOTF-DcjYN7WW.mjs +0 -1
- package/dist/src-9BFQh559.mjs +0 -348
- package/dist/src-9I3GiOoK.mjs +0 -2032
- package/dist/src-BuBt_xnY.mjs +0 -2
- package/dist/src-Dl8P6sfz.mjs +0 -20
- package/dist/src-h5dDPK2z.mjs +0 -1
- package/dist/start-BYY0acPS.mjs +0 -1
- package/dist/start-C4KuZHu5.mjs +0 -4
- package/dist/stat-BT5A227F-B4qwqNn_.mjs +0 -1
- package/dist/stateDiagram-2N3HPSRC-BD1FBZi9.mjs +0 -2
- package/dist/stateDiagram-v2-6OUMAXLB-CqmBRdZY.mjs +0 -2
- package/dist/strings-7PLOGTPD-BJ6vWsQi.mjs +0 -1
- package/dist/swimlanes-5IMT3BWC-D2eO0gTx.mjs +0 -2
- package/dist/swimlanesDiagram-G3AALYLV-BiRCZWbo.mjs +0 -9
- package/dist/tac-SJGXQ4T2-D-bfDFKg.mjs +0 -1
- package/dist/tail-S5ULNTJU-CWnyTuXg.mjs +0 -1
- package/dist/tar-MZQD7NO4-Cx5bpVMY.mjs +0 -1
- package/dist/tee-O7VXZDCO-B_duU1hV.mjs +0 -1
- package/dist/time-DEUO3QV2-CekCKA2I.mjs +0 -1
- package/dist/timeline-definition-FHXFAJF6-DZHpuaV_.mjs +0 -121
- package/dist/timeout-VRKMCG72-DaJVXXR3.mjs +0 -1
- package/dist/touch-DX2IJOQ4-CZteiICw.mjs +0 -1
- package/dist/tr-2HXZRDSW-D4XuTGWg.mjs +0 -1
- package/dist/tree-LYXBS7DC-CUIzQKTG.mjs +0 -1
- package/dist/treeView-QDETBFTQ-C9yOsbGY.mjs +0 -1
- package/dist/treemap-6X3UGDF4-iowse2nY.mjs +0 -1
- package/dist/true-WHJNXCHG-BzxCUQFd.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-x3XCmR3I.mjs +0 -1
- package/dist/uniq-SUNANL47-DpupkNiO.mjs +0 -1
- package/dist/vennDiagram-L72KCM5P-CGoW4QcS.mjs +0 -35
- package/dist/wardley-OPB4EBWU-BL1Dan_S.mjs +0 -1
- package/dist/wardleyDiagram-EHGQE667-DHS8jBWZ.mjs +0 -79
- package/dist/wc-TQB3VNOX-D8llmcL9.mjs +0 -1
- package/dist/which-XZHEH76L-imZgNd5x.mjs +0 -1
- package/dist/whoami-DGKU3D2X-CzLNG51j.mjs +0 -1
- package/dist/write-project-skill-WXZSbQlg.mjs +0 -56
- package/dist/xan-UD7JYIL2-_38Iv1cI.mjs +0 -1
- package/dist/xan-view-OW2TB7Z3-RT-IKMgr.mjs +0 -1
- package/dist/xargs-I6EZUCYF-Bu8VhXV_.mjs +0 -1
- package/dist/xychartDiagram-FW5EYKEG-CG0DSvm_.mjs +0 -8
- package/dist/yq-OAKYHSXH-BcCBaLJN.mjs +0 -1
- /package/dist/{expansion-VBDYWVZR-CeY6vkty.mjs → expansion-VBDYWVZR-CpX0YZMb.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Lo as e,P as t,Po as n,Qo as r,R as i,Ro as a,d as o,es as s,ks as c,l,us as u}from"./src-TKCctdpc.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Ft as W,G,Gi as K,Gn as q,Gr as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,It as ie,J as ae,Ji as oe,Jn as se,Jr as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kr as pe,Kt as me,L as he,Li as ge,Ln as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nt as De,O as Oe,Oi as ke,On as Ae,Or as je,Ot as Me,P as Ne,Pi as Pe,Pn as Fe,Pt as Ie,Q as Le,Qi as Re,Qn as ze,Qr as Be,Qt as Ve,R as He,Ri as Ue,Rn as We,Rr as Ge,Rt as Ke,S as qe,Si as Je,Sn as Ye,Sr as Xe,St as Ze,T as Qe,Ti as $e,Tn as et,Tr as tt,Tt as nt,U as rt,Ui as it,Un as at,Ur as ot,Ut as st,V as ct,Vi as lt,Vn as ut,Vr as dt,Vt as ft,W as pt,Wi as mt,Wn as ht,Wr as gt,Wt as _t,X as vt,Xi as yt,Xn as bt,Xr as xt,Xt as St,Y as Ct,Yi as wt,Yn as Tt,Yr as Et,Yt as Dt,Z as Ot,Zi as kt,Zn as At,Zr as jt,Zt as Mt,_ as Nt,_a as Pt,_i as Ft,_n as It,_r as Lt,_t as Rt,a as zt,aa as Bt,ai as Vt,an as Ht,ar as Ut,at as Wt,b as Gt,ba as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,d as nn,da as rn,di as an,dn as on,dr as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fa as mn,fi as hn,fn as gn,fr as _n,g as vn,ga as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr as tr,mt as nr,n as rr,na as ir,ni as ar,nn as or,nr as sr,nt as cr,o as lr,oa as ur,oi as dr,on as fr,or as pr,ot as mr,p as hr,pa as gr,pi as _r,pn as vr,pr as yr,q as br,qi as xr,qn as Sr,qr as Cr,qt as wr,r as Tr,ra as Er,ri as Dr,rn as Or,rr as kr,rt as Ar,s as jr,sa as Mr,si as Nr,sn as Pr,sr as Fr,st as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tr as Vr,tt as Hr,u as Ur,ua as Wr,ui as Gr,un as Kr,ur as qr,v as Jr,va as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xi as ai,xn as oi,xr as si,xt as ci,y as li,ya as ui,yi as di,yn as fi,yr as pi,yt as mi,z as hi,zi as gi,zn as _i,zr as vi,zt as yi}from"./src-Dt5dAyFQ.mjs";import{C as bi,E as xi,T as Si,_ as Ci,b as wi,c as Ti,d as Ei,g as Di,i as Oi,l as ki,m as Ai,n as ji,p as Mi,s as Ni,t as Pi,u as Fi,v as Ii,w as Li,x as Ri,y as zi}from"./fs-traced-DVpoNaQJ.mjs";import{a as Bi,d as Vi,f as Hi,i as Ui,l as Wi,n as Gi,r as Ki,t as qi,u as Ji}from"./logger-DFxEUjvj.mjs";import{S as Yi,_ as Xi,a as Zi,c as Qi,f as $i,g as ea,h as ta,i as na,l as ra,m as ia,n as aa,o as oa,p as sa,r as ca,s as la,t as ua,u as da,v as fa,x as pa}from"./server-lock-aXnDVUI8.mjs";export{rn as AGENT_ID_MAX_LEN,mn as AGENT_ID_RE,M as AGENT_WRITE_ORIGIN,Yr as AcpPermissionStore,Tn as AcpRegistry,Je as AcpThreadManager,qt as AgentFocusBroadcaster,di as AgentPresenceBroadcaster,ke as AgentSessionCapacityError,Hn as AgentSessionManager,kn as AutoStartDisabledError,Zr as BUNDLE_IDS,pi as BUNDLE_SCOPE,Yt as BUNDLE_SKILL_NAME,Sr as BacklinkIndex,gi as CC1Broadcaster,s as CC1_CONTRACT_VERSION,Kr as CONFIG_FILENAME,ut as CONFLICT_MARKER_RE,w as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Nt as ConfigSchema,K as DEFAULT_CHECKPOINT_RETENTION,Mn as DEFAULT_EMBEDDINGS_DIMENSIONS,W as DEFAULT_PACK_ID,ct as DocumentDurabilityState,Vt as EMBEDDINGS_API_KEY_ENV,yn as FEATURED_AGENT_IDS,de as FILE_SYSTEM_WRITER,q as FILE_WATCHER_ORIGIN,Be as FileEmbeddingsBackend,Mt as GIT_PREFLIGHT_FAIL_SPAN_NAME,xr as GIT_UPSTREAM_WRITER,ui as GitDirAccessError,h as GitNotAvailableError,un as GitTooOldError,Cn as HOCUSPOCUS_AUTH_REJECTION_REASONS,Rt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,pe as INSTALLED_AGENTS_SCHEMES,r as LINEAGE_EPOCH_KEY,He as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ie as LOG_MD_TEMPLATE,nt as MANAGED_RENAME_ORIGIN,D as MAX_ACP_THREADS,_ as MAX_AGENT_SESSIONS,$e as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,Ln as MIN_EVICTABLE_IDLE_MS,Br as MIN_GIT_VERSION,X as MISSING_OK_CONFIG_MESSAGE,Kt as MalformedGitPointerError,fn as McpLogger,rt as MissingOkConfigError,Te as OBSERVER_SYNC_ORIGIN,on as OK_OKIGNORE_TEMPLATE,e as ORPHAN_MODES,c as PROTOCOL_VERSION,qi as PinoLogger,Qi as ProcessLockCollisionError,Kn as ProjectGitInitError,B as ROLLBACK_ORIGIN,gn as ROOT_GITIGNORE_TEMPLATE,ea as RUNTIME_VERSION,fi as RemoteConfigError,oe as SERVICE_WRITER,yr as SKILL_INSTALL_EVENTS_FILE_REL,t as SKILL_STATE_TARGETS,ve as STARTER_FOLDERS,Ke as STARTER_FOLDER_FRONTMATTER_FILENAME,yi as STARTER_PACKS,T as STARTER_PACK_IDS,ft as STARTER_TEMPLATES,Qe as STATE_MANIFEST_FILENAME,Xi as STATE_SCHEMA_VERSION,u as SYSTEM_DOC_NAME,wr as SeedPrerequisiteError,le as SeedRootDirError,ua as ServerLockCollisionError,Lr as SingleFileNotAFileError,rr as SingleFileNotFoundError,Tr as SingleFileNotMarkdownError,I as StateManifestError,fe as TagIndex,si as USER_GLOBAL_BUNDLE_IDS,Tt as UiLockCollisionError,F as __getShowAllWalkStatsForTesting,Me as __resetShowAllWalkStatsForTesting,ra as acquireProcessLock,aa as acquireServerLock,bt as acquireUiLock,be as applyAgentMarkdownWrite,_i as applyExternalChange,Ie as applySeed,j as assertCompatibleStateManifest,or as assertGitAvailable,N as assertNeverDiskEvent,ai as attachAcpThreadSocket,nr as attachIdleShutdown,Jr as bootServer,dn as buildAndOpenSkill,vr as buildConfigYmlContent,Ct as buildExecResult,ei as buildOkMcpStdioCommand,On as buildSkillZip,ee as buildStarterFolderFrontmatterYaml,wt as buildWipTree,Xe as bundleSkillMdPath,m as canonicalProjectKey,Ae as classifyEvents,Pi as classifyFsPath,ln as clearAllEmbeddingsKeys,Nr as clearContributors,st as coercePackId,l as colorFromSeed,yt as commitUpstreamImport,kt as commitWip,Re as commitWipFromTree,Or as compareSemver,tt as composeEffectiveLinterConfig,z as composeFrontmatterSchemasConfig,Q as containsConflictMarkers,Un as contentHash,$t as contributorCount,Ne as countShadowObjects,V as countStaleAgentWipRefs,te as countWipRefs,Gn as createApiExtension,ri as createAssetServeMiddleware,G as createCollaborationHost,Ge as createContentFilter,vi as createContentFilterAsync,zr as createEmbeddingsSecretStore,An as createEphemeralProjectDir,C as createExternalChangeHandler,pn as createFileLogger,hi as createLiveDerivedIndexExtension,br as createMcpHttpHandler,Cr as createOsProbe,we as createPersistenceExtension,E as createServer,In as createServerObserverExtension,ne as createStreamingErrorWriter,Gi as createTestLogger,ar as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Nn as detectGit,Oe as detectProjectShape,Vr as detectUserSkillHosts,Ar as discoverLockDirs,Wn as discoverMarkdownlintConfig,Ve as emitPreflightFailureSpan,vt as encodeDocName,Ot as encodeFolderRoute,Le as encodeSkillRoute,Ur as ensureProjectGit,er as ensureProjectSkillGitignore,ge as errorResponse,v as evictStaleTrackerEntries,b as extractHeadings,Fn as extractOkBinaryPath,se as extractWikiLinksFromMarkdown,Ht as fallbackPaths,nn as findEnclosingGitRoot,et as findEnclosingProjectRoot,y as findNativeMarkdownlintFile,hr as flushFileLogger,mi as formatAuthRejectionWire,Jn as formatContributors,Gr as formatContributorsFrom,Ce as formatPackRationale,f as gcCheckpointRefs,Hr as getCurrentMcpLogger,$n as getLocalDir,Zn as getLogFilePath,Ki as getLogger,wn as getLogsDir,fa as getMachineId,zi as getMeter,ur as getMetrics,wi as getTracer,Mr as handleCollabSocketError,dt as handleSpawnCursor,Jt as hasForwardingHeaders,he as hasGcLogLatch,o as iconFromClientName,Qt as incrementCollabSocketFilteredError,qn as incrementServerObserverFire,Dn as initContent,cn as initShadowRepo,Ri as initTelemetry,Gt as initToleranceTelemetryWriter,Ir as installPrettyZodErrors,Ui as installTestLoggers,sr as installUserSkill,Xr as isAllowedApiOrigin,O as isAllowedWorkspaceHostHeader,S as isConfigDoc,Xt as isHocuspocusAuthRejectionReason,_t as isKnownPackId,lt as isLinkIndexExcludedDoc,ti as isLoopbackAddress,Z as isManagedArtifactDoc,a as isOrphanMode,Pe as isPairedWriteOrigin,$ as isPathWithinDir,pa as isProcessAlive,R as isProjectRoot,oi as isRemoteAdmitted,it as isReservedForUserTree,Rn as isSelfWrite,mt as isSystemDoc,ii as isToleranceTelemetryEnabled,Yi as isValidLockPid,xe as lastKnownHash,Rr as listRescueCheckpoints,Y as listStarterPacks,Pt as loadCustomAgents,ye as loadPrincipal,da as lockFilePath,Bi as loggerFactory,Wi as logsCurrentPath,Ji as logsPreviousPath,Dr as makeLazyEmbeddingsKeyStore,ca as markServerLockDraining,pt as mountMcpAndApi,ji as normalizeFsPath,k as originGitHubHost,xn as packageVersionMajorMinor,ci as parseAuthRejectionWire,fr as parseGitVersion,Ze as parseHocuspocusAuthToken,ue as parseKeepaliveConnectionId,Ee as pathToDocName,De as planSeed,zt as prepareSingleFileOpen,Wt as processCommand,mr as processUsage,Pn as readAllTargets,Ut as readBundleDecision,zn as readOwnNativeRules,$i as readProcessLock,sa as readProcessLockDetailed,x as readProjectHeadState,jt as readProjectLocalSemanticConfig,na as readServerLock,pr as readServerPackageVersion,Fr as readSkillInstallStateSnapshot,Vn as readStateManifest,tn as readTargetRecordedAt,Xn as readTargetVersion,At as readUiLock,at as reconcile,an as recordContributor,tr as recordSkillInstallEvent,ae as registerAllTools,Fe as registerWrite,ia as releaseProcessLock,Zi as releaseServerLock,ze as releaseUiLock,U as removeLastKnownHash,kr as reportSkillInstall,Wr as resetMetrics,i as resolveBundleEnabled,Sn as resolveBundledSkillDir,En as resolveContentDir,ot as resolveCursorBinaryDefault,gt as resolveCursorSpawnInvocation,P as resolveEffectiveLinterConfig,dr as resolveEmbeddingsCredential,bn as resolveLockDir,je as resolveNativeConfigForDoc,Se as resolveNativeMarkdownlintConfig,me as resolvePack,jr as resolvePackageVersion,Ye as resolveRemoteAccess,_n as resolveSkillInstallReportSettings,d as resolveUiInfo,hn as restoreContributors,li as restoreLifecycleFromConflictsJson,Et as rewriteMarkdownLinksForDocumentRename,xt as rewriteWikiLinksForDocumentRename,Pr as runAuthReposSubprocess,en as runAuthStatusSubprocess,Dt as runCloneSubprocess,Yn as runDeviceFlowSubprocess,cr as runWithMcpLogger,Ft as safeContentPath,Bn as safeSubdir,ir as safetyCheckpoint,L as sanitizeClientName,Er as saveInMemoryCheckpoint,jn as saveVersion,A as seedBasenameIndex,lr as serializeError,bi as setActiveSpanAttributes,H as setupServerObservers,Bt as shadowGit,Li as shutdownTelemetry,Vi as spansCurrentPath,Hi as spansPreviousPath,J as spawnDetached,ht as splitMarkdownBlocks,re as startWatcher,Ue as streamingProblemEvent,_r as swapContributors,qe as teardownToleranceTelemetryWriter,gr as toBroadcasterKey,Oi as tracedAppendFileSync,Ni as tracedLinkSync,Ti as tracedMkdir,ki as tracedMkdirSync,Fi as tracedRename,Ei as tracedRenameSync,Mi as tracedRmSync,Ai as tracedRmdirSync,Di as tracedUnlinkSync,Ci as tracedWriteFile,Ii as tracedWriteFileSync,$r as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,_e as updateLastKnownHash,ta as updateProcessLockPort,oa as updateServerLockPort,p as updateUiLockPort,Qn as validateAgentId,St as validateCloneInputs,Lt as validateSkillZip,la as waitForServerLockDrain,ce as withHiddenWindowsConsole,Si as withSpan,xi as withSpanSync,qr as writeBundleDecision,ni as writeMarkdownlintRule,It as writeRootGitignoreForNewRepo,g as writeStateManifest,sn as writeTargetVersion,We as writeTracker};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DTipWd-i.mjs";import{Y as t}from"./sleep-DVOInM4H.mjs";import{Es as n,Ts as r,X as i,Z as a}from"./src-TKCctdpc.mjs";import{Jr as o,Tn as s,at as c,gi as l,it as u,ot as d,rt as f}from"./src-Dt5dAyFQ.mjs";import{O as p,P as m}from"./fs-traced-DVpoNaQJ.mjs";import{S as h,u as g,v as _,x as v}from"./server-lock-aXnDVUI8.mjs";import{t as y}from"./yazl-DZr4PyKA.mjs";import{m as b,p as x,v as S}from"./write-project-skill-DOogyZge.mjs";import{c as C}from"./colors-BsmVIwfM.mjs";import"./acp-harness-probe-O9BEMpdb.mjs";import{E as w,T,_ as ee,o as te,w as E,x as D,y as ne}from"./init-Cg1MczGq.mjs";import{n as re}from"./constants-C3InsrBS.mjs";import{t as O}from"./is-object-ByG7RnjH.mjs";import"./loader-CJynt8EV.mjs";import"./skill-teardown-onVYT1VF.mjs";import"./preview-Dnob-x-p.mjs";import{execSync as k,spawnSync as A}from"node:child_process";import{basename as j,dirname as M,join as N,relative as ie,resolve as P,sep as ae}from"node:path";import{cpSync as oe,createWriteStream as F,existsSync as I,lstatSync as se,mkdirSync as L,mkdtempSync as ce,readFileSync as R,readdirSync as z,readlinkSync as le,rmSync as B,statSync as ue,writeFileSync as V}from"node:fs";import{arch as de,freemem as fe,homedir as H,hostname as pe,platform as me,release as he,tmpdir as ge,totalmem as _e,type as ve,uptime as ye}from"node:os";import"node:fs/promises";import{createHash as be}from"node:crypto";var U=t();const xe=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Se(e,t,n=s){if(e!==void 0&&!xe.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Ce=null;function we(e){Ce=e}function Te(){return Ce??process.cwd()}function Ee(){return N(H(),`.ok`,`bug-reports`)}function De(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=Ee(),r=`${t}-bugreport`,i=N(n,`${r}.zip`);for(let e=2;I(i);e+=1)i=N(n,`${r}-${e}.zip`);return i}function Oe(e,t){let n=N(e,`.ok`,`config.yml`);if(I(n))try{let e=R(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return I(N(e,`.ok`))?be(`sha256`).update(P(e)).digest(`hex`).slice(0,12):null}function ke(){let e={timestamp:new Date().toISOString(),platform:me(),osType:ve(),osRelease:he(),hostname:`[redacted]`,uptime:ye(),freeMem:fe(),totalMem:_e(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=k(`sw_vers -productVersion 2>/dev/null`,o({encoding:`utf8`})).trim()}catch{}try{let t=N(__dirname,`..`,`..`,`package.json`);I(t)&&(e.okVersion=JSON.parse(R(t,`utf8`)).version)}catch{}return e}function Ae(e,t){return je(e,t).files}function je(e,t){if(!I(t))return{files:[]};let n=z(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>N(t,e));if(e&&n.length>0){let t=n.filter(t=>{try{return R(t,`utf8`).includes(`"project":"${e}"`)}catch{return!0}});t.length>0&&(n=t)}return{files:n}}function Me(e){let t=N(e,`.ok`,`local`);return I(t)?{files:[`server.lock`,`last-spawn-error.log`,i].map(e=>N(t,e)).filter(e=>I(e))}:{files:[]}}function Ne(e){let t=N(e,`.ok`,`local`,`logs`);return I(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>N(t,e)).filter(e=>I(e))}:{files:[]}}function Pe(e){if(e.redact){let{redacted:t,patterns:r,lineCount:i}=n(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),r.length>0&&e.redactions.push({file:e.name,lineCount:i,patterns:r})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function W(e){for(let t of e.files)try{Pe({zipfile:e.zipfile,name:`${e.prefix}/${j(t)}`,content:R(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function Fe(t){let{redact:n,outputPath:i,logger:a}=t,o=t.userLogsDir??N(H(),`.ok`,`logs`),s=t.projectDir?Oe(t.projectDir,a):null;L(M(i),{recursive:!0}),a?.info({projectSlug:s},`gathering diagnostic data`);let c=ke();c.desktop=t.desktop??null;let{files:l}=je(s,o),{files:u}=t.projectDir?Me(t.projectDir):{files:[]},{files:d}=t.projectDir?Ne(t.projectDir):{files:[]};a?.info({logFileCount:l.length,lockFileCount:u.length,localSinkFileCount:d.length},`files collected`);let f=[],p=[],{ZipFile:m}=await import(`./yazl-jVENrf5i.mjs`).then(t=>e(t.default,1)),h=new m;W({zipfile:h,files:l,prefix:`logs`,redact:n,bundleFiles:p,redactions:f,logger:a}),W({zipfile:h,files:u,prefix:`lockdir`,redact:n,bundleFiles:p,redactions:f,logger:a}),W({zipfile:h,files:d,prefix:`local-logs`,redact:n,bundleFiles:p,redactions:f,logger:a});for(let e of t.extraFiles??[])try{let t=R(e.sourcePath),n=`extra/${e.zipName??j(e.sourcePath)}`;h.addBuffer(t,n),p.push(n)}catch(t){a?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Pe({zipfile:h,name:`note.txt`,content:t.note,redact:n,bundleFiles:p,redactions:f});let g=JSON.stringify(c,null,2);h.addBuffer(Buffer.from(g,`utf8`),`sysinfo.json`),p.push(`sysinfo.json`);let _={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:s,files:p,redactions:f,sysinfo:c};h.addBuffer(Buffer.from(JSON.stringify(_,null,2),`utf8`),`MANIFEST.json`);let v=f.reduce((e,t)=>e+t.lineCount,0),y=[`# Bug Report Bundle`,``,`Generated: ${_.generatedAt}`,`Project: ${s??`(unscoped)`}`,`Discipline version: ${_.disciplineVersion}`,``,`## Contents`,``,...p.map(e=>`- ${e}`),``,`## Privacy`,``,...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${r.join(`, `)}`,v>0?`${v} line(s) were scrubbed across ${f.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(`
|
|
2
|
+
`);h.addBuffer(Buffer.from(y,`utf8`),`README.md`),h.end();let b=F(i);return h.outputStream.pipe(b),await new Promise((e,t)=>{b.on(`close`,e),b.on(`error`,t)}),a?.info({bundlePath:i,fileCount:p.length,redactionCount:v},`bundle written`),{zipPath:i,summary:{projectSlug:s,files:p,redactions:f,redactedLineCount:v,generatedAt:_.generatedAt}}}var Ie=e(y(),1),G=e(C(),1);function K(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function Le(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q(e,t){if(typeof e==`string`)return K(e,t.contentDir);if(Array.isArray(e))return e.map(e=>q(e,t));if(!Le(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=q(i,t);return n}function Re(e,t){let n=R(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
3
|
+
`),i=n.split(`
|
|
4
|
+
`),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=q(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}V(e,r?`${a.join(`
|
|
5
|
+
`)}\n`:a.join(`
|
|
6
|
+
`))}function ze(e,t){let n=R(e,`utf-8`);if(n.trim().length!==0)try{let r=q(JSON.parse(n),t),i=n.endsWith(`
|
|
7
|
+
`)?`
|
|
8
|
+
`:``;V(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=K(n,t.contentDir);r!==n&&V(e,r)}}function Be(e,t){let n=R(e,`utf-8`),r=K(n,t.contentDir);r!==n&&V(e,r)}function Ve(e){try{return z(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>N(e,t.name))}catch{return[]}}const He=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function Ue(e){return/\.log\.\d+$/.test(e)}function We(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||Ue(e)}function Ge(e){let t={contentDir:e.contentDir};for(let n of[`telemetry`,`logs`,`process`])for(let r of Ve(N(e.stagingDir,n)))We(r)?Re(r,t):r.endsWith(`.json`)?ze(r,t):Be(r,t);for(let n of Ve(N(e.stagingDir,`state`))){let e=j(n);n.endsWith(`.jsonl`)?Re(n,t):He.has(e)?ze(n,t):Be(n,t)}}const Ke=[`.ok`,`local`,`telemetry`],qe=[`.ok`,`local`,`logs`],Je=[`.ok`,`local`,`loss-capture`],Ye=`spans-current.jsonl`,Xe=`spans-prev.jsonl`,Ze=`server-current.jsonl`,Qe=`server-prev.jsonl`,$e=`loss-current.jsonl`,et=`loss-prev.jsonl`;function tt(e){return N(e,...Ke,Ye)}function nt(e){return N(e,...Ke,Xe)}function rt(e){return N(e,...qe,Ze)}function it(e){return N(e,...qe,Qe)}function at(e){return N(e,...Je,$e)}function ot(e){return N(e,...Je,et)}const st=1e3;async function ct(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(st)});return t.ok?await t.text():null}catch{return null}}async function lt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(st)});return t.ok?await t.text():null}catch{return null}}async function ut(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(st)});return t.ok?await t.text():null}catch{return null}}function dt(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
|
|
9
|
+
`)}\n`:null}catch{return null}}function ft(e){let t=N(e,`.git`,`ok`);if(!I(t))return null;let n=A(`git`,[`-C`,t,`log`,`--oneline`,`-50`],o({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function pt(e){let t=N(e,`.git`,`ok`);if(!I(t))return null;let n=A(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],o({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function mt(){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 ht(){return{nodeVersion:process.version,platform:me(),arch:de()}}function gt(){return process.env.OTEL_SDK_DISABLED===`false`}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function _t(e){if(!I(e))return{};let t;try{t=(0,U.parse)(R(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(!J(t))return{};let n=t.telemetry;if(!J(n))return{};let r=n.localSink;return J(r)?r:{}}function vt(e){return typeof e==`boolean`?e:void 0}function yt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y(e){if(J(e))return yt(e.maxBytes)}function bt(e){let t=_t(p(`project`,e)),n=_t(p(`project-local`,e));return{enabled:vt(n.enabled)??vt(t.enabled)??!0,spansMaxBytes:Y(n.spans)??Y(t.spans)??52428800,logsMaxBytes:Y(n.logs)??Y(t.logs)??26214400}}function xt(e){return be(`sha256`).update(e).digest(`hex`)}function St(e){let t=R(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function Ct(e){let t=R(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 X(e,t){if(!I(e))return!1;try{return L(M(t),{recursive:!0}),oe(e,t),!0}catch{return!1}}function wt(e){let t=[],n=e=>{let r=z(e,{withFileTypes:!0});for(let i of r){let r=N(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const Tt=new Set([`.jsonl`]);function Et(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Tt.has(e.slice(t))}const Dt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function Ot(e){if(Ue(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:Dt.has(e.slice(t))}function kt(e){let t=[];for(let r of wt(e)){let i=At(e,r);if(!Ot(i))continue;let{redacted:a,patterns:o,lineCount:s}=n(R(r,`utf-8`));o.length!==0&&(V(r,a),t.push({file:i,lineCount:s,patterns:o}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function At(e,t){return ie(e,t).split(ae).join(`/`)}async function jt(e){let t=P(e.contentDir),n=P(e.projectDir??e.contentDir),r=e.deps??{},o=r.fetchAgentPresence??ct,s=r.fetchAgentEffects??lt,c=r.fetchWatcherRecent??ut,l=r.readShadowHead??ft,u=r.readCheckpointRefs??pt,d=r.now??(()=>new Date),f=r.okVersion??(()=>re),p=r.readDesktopEnv??mt,m=r.readRuntime??ht,h=r.isOtlpPushEnabled??gt,g=ce(N(ge(),`ok-bundle-`));try{L(N(g,`telemetry`),{recursive:!0}),L(N(g,`logs`),{recursive:!0}),L(N(g,`state`),{recursive:!0}),X(tt(n),N(g,`telemetry`,Ye)),X(nt(n),N(g,`telemetry`,Xe)),X(rt(n),N(g,`logs`,Ze)),X(it(n),N(g,`logs`,Qe));for(let t of e.userLogFiles??[])X(t,N(g,`logs`,j(t)));let _=N(n,`.ok`,`local`),v=N(_,`server.lock`),y=`not-running`,b=`no server.lock`,x=null;if(I(v)){X(v,N(g,`state`,`server.lock`));try{let e=R(v,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?x=t.port:b=`lock present but no port`}catch{b=`lock present but unparseable`}}if(x!==null){let e=await o(x);e===null?b=`agent-presence endpoint at :${x} unreachable`:(V(N(g,`state`,`agent-presence.json`),e),y=`running`,b=``);let t=await s(x);t!==null&&V(N(g,`state`,`agent-effects.json`),t);let n=await c(x);if(n!==null){let e=dt(n);e!==null&&V(N(g,`state`,`watcher-recent.jsonl`),e)}}let S=l(t);S!==null&&V(N(g,`state`,`shadow-head.txt`),S);let C=u(t);C!==null&&V(N(g,`state`,`checkpoint-refs.txt`),C),X(at(n),N(g,`state`,$e)),X(ot(n),N(g,`state`,et)),X(N(_,`last-spawn-error.log`),N(g,`state`,`last-spawn-error.log`)),X(N(_,a),N(g,`state`,a)),X(N(_,i),N(g,`state`,i));let w=m(),T=p(),ee={ok:{version:f(),nodeVersion:w.nodeVersion,platform:w.platform,arch:w.arch},host:{desktop:T}};V(N(g,`state`,`runtime.json`),`${JSON.stringify(ee,null,2)}\n`);let te=y===`running`?`running
|
|
10
|
+
`:`not-running (${b})\n`;if(V(N(g,`state`,`server-status.txt`),te),e.processDir&&I(e.processDir)){let t=N(g,`process`);L(t,{recursive:!0}),oe(e.processDir,t,{recursive:!0})}let E=e.redact===!0;E&&Ge({stagingDir:g,contentDir:t}),e.note&&V(N(g,`note.txt`),e.note);let D=null;e.scrubSecrets===!0&&(D=kt(g));for(let t of e.extraFiles??[])X(t.sourcePath,N(g,`extra`,t.zipName??j(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let ne=bt(n),re=wt(g),O=[],k=0,A=0;for(let e of re){let t=At(g,e),n=ue(e).size,r=Et(t)?St(e):0;O.push({path:t,bytes:n,lines:r}),k+=n,t.startsWith(`telemetry/`)&&Et(t)&&(A+=Ct(e))}let M={applied:E};D!==null&&(M.secretScrub=D);let ie={schemaVersion:2,createdAt:d().toISOString(),ok:{version:f(),nodeVersion:w.nodeVersion,platform:w.platform,arch:w.arch},host:{desktop:T},contentDir:{pathSha256:xt(t),absolutePath:E?`<CONTENT_DIR>`:t},telemetry:{localSink:ne,otlpPushEnabled:h()},redaction:M,serverStatus:y,files:O};V(N(g,`manifest.json`),`${JSON.stringify(ie,null,2)}\n`);let P=re.some(e=>{try{return R(e,`utf-8`).includes(t)}catch{return!1}}),ae={totalBytes:k,fileCount:O.length,docNameCount:A,contentDirVisible:P,redacted:E},F=!1;return{stagingDir:g,manifest:ie,summary:ae,cleanup:()=>{F||(F=!0,B(g,{recursive:!0,force:!0}))}}}catch(e){throw B(g,{recursive:!0,force:!0}),e}}async function Mt(e){let{collected:t,outputPath:n}=e,r=M(n);if(!I(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new Ie.ZipFile,a=wt(t.stagingDir);for(let e of a){let n=At(t.stagingDir,e);i.addFile(e,n)}i.end();let o=F(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 Nt(e,t){let n=N(e,`.ok`,`config.yml`);if(I(n))try{let t=(0,U.parse)(R(n,`utf-8`)),r=O(t)?t.content:void 0,i=O(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return P(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return P(e)}async function Pt(e,t,n){let r=Oe(t,e.logger),i=await jt({contentDir:Nt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:Ae(r,e.userLogsDir??N(H(),`.ok`,`logs`)),deps:{readDesktopEnv:n,logger:e.logger}});try{L(M(e.outputPath),{recursive:!0}),await Mt({collected:i,outputPath:e.outputPath});let t=i.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:r,files:i.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:i.manifest.createdAt}}}finally{i.cleanup()}}async function Ft(e){let{projectDir:t}=e,n=e.readDesktopEnv??mt;if(e.level===`full`&&t!==void 0)return Pt(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 Z(e,t,n={}){let r=g(e,t);if(!I(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(R(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!h(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??v)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??_())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??pe();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}function It(e){return e.replace(/:\d+$/,``)}function Lt(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:It(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:It(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:It(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}const Rt=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function zt(e){return N(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Bt={existsSync:e=>I(e),readFileSync:(e,t)=>R(e,t),lstatSync:e=>se(e),readlinkSync:e=>le(e)};function Vt(e,t=Bt){let n=zt(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 Ht(e){let t=e.replace(Rt,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function Ut(e,t,n=Bt){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function Wt(e){return x(e)||b(e)||D(e)}const Gt=10*1024*1024;function Kt(e,t,n,r){let i=te(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(!Wt(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`?(B(a,{force:!0}),{kind:`removed`}):e.format===`toml`?Yt(a,o):e.format===`yaml`?Jt(a,e.topLevelKey,o):qt(a,e.topLevelKey,e.serverMapSubKey,o)}function qt(e,t,n,r){let i;try{i=R(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>Gt)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=w(i,ee(t,n,r));return o?(m(e,a,{mode:E(e)}),{kind:`removed`}):{kind:`not-present`}}function Jt(e,t,n){let r;try{r=R(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>Gt)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,U.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 c=o.toString(),l=T(a);a.trim()===``||a.endsWith(`
|
|
11
|
+
`)?c.endsWith(`
|
|
12
|
+
`)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
|
|
13
|
+
`).replace(/\n/g,`\r
|
|
14
|
+
`));let u=`${i?``:``}${c}`;return u!==r&&m(e,u,{mode:E(e)}),{kind:`removed`}}function Yt(e,t){let n=ne();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=R(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=T(a),s=a.trim()===``||a.endsWith(`
|
|
15
|
+
`),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
|
|
16
|
+
`)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
|
|
17
|
+
`).replace(/\n/g,`\r
|
|
18
|
+
`));let u=`${i?``:``}${l}`;return u!==r&&m(e,u,{mode:E(e)}),{kind:`removed`}}function Xt(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function Zt(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 Qt(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:u(r),command:r,isDesktop:Xt(r)}}function $t(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`&&$t(e)?`ui-orphan`:`stale`}const en=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function tn(e){switch(e){case`running`:return G.default.green(e);case`desktop`:return G.default.blue(e);case`foreign`:return G.default.cyan(e);case`ui-orphan`:return G.default.magenta(e);case`stale`:return G.default.yellow(e)}}function nn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function rn(e){return`${nn(e.server.usage)} | ${nn(e.ui?.usage??null)}`}function an(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function on(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,an(e),rn(e),t,String(n),Zt(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=tn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=G.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
|
|
19
|
+
`)}async function sn(e={}){let t=e.discover??f,n=e.inspect??Z,r=e.log??(e=>console.log(e)),i=e.resolveCommand??c,a=e.resolveUsage??d,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=Qt(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&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(on(e.all?s:s.filter(e=>en.has(Q(e)))))}function cn(){return new S(`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 sn({all:t.all===!0||e===`all`,json:t.json===!0})})}function ln(e,t,n={}){let r=n.isAlive??v,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function un(e){let t=e.inspect??(t=>Z(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=ln(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 dn(e,t=v){let n=await f(),r=null;for(let i of n){let n=Z(i,`server`),a=Z(i,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function fn(e){let t=un({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function pn(e){return new S(`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 n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=un({lockDir:l(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 sn({});return}if(n===`all`){let e=await f();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Z(n,`server`),r=Z(n,`ui`);!$(e,v)&&!$(r,v)||(fn(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await dn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}fn(t);return}fn(l(P(Te(),n)))})}export{Te as _,Rt as a,Vt as c,Z as d,Ft as f,Ee as g,De as h,Kt as i,Ht as l,Mt as m,pn as n,Ut as o,jt as p,cn as r,zt as s,un as t,Lt as u,we as v,Se as y};
|
|
20
|
+
//# sourceMappingURL=src-pUQbXiSN.mjs.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Q as e,Y as t}from"./src-TKCctdpc.mjs";import{En as n,Jr as r,a as i,ri as a}from"./src-Dt5dAyFQ.mjs";import{v as o,y as s}from"./write-project-skill-DOogyZge.mjs";import{a as c,n as l,t as u}from"./acp-harness-probe-O9BEMpdb.mjs";import{n as d}from"./constants-C3InsrBS.mjs";import{spawn as f}from"node:child_process";import{basename as p,join as m,posix as h,resolve as g,win32 as _}from"node:path";import{closeSync as v,existsSync as y,mkdirSync as b,openSync as x,statSync as S}from"node:fs";import{homedir as C}from"node:os";import{rm as w}from"node:fs/promises";import{setTimeout as T}from"node:timers/promises";function E(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function D(e,t,n={}){let i=(n.spawn??f)(e,[...t],r({detached:!0,stdio:`ignore`,env:E(n.env??process.env)}));return i.unref(),i}const O=`OpenKnowledge.app`,k=`/Applications/${O}`;function A(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return S(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function j(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(M(e,k))return k;let t=m(e.homeDir??C(),`Applications`,O);return M(e,t)?t:null}function M(e,t){return N(e,m(t,`Contents`,`MacOS`,`OpenKnowledge`))}function N(e,t){try{let n=e.statSync(t);return n&&typeof n.isFile==`function`?n.isFile():!1}catch{return!1}}const ee=[`@inkeepopen-knowledge-desktop`,`OpenKnowledge`];function P(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&/\\OpenKnowledge\.exe$/i.test(e.execPath))return e.execPath;let t=e.env.LOCALAPPDATA;if(t)for(let n of ee){let r=_.join(t,`Programs`,n,`OpenKnowledge.exe`);if(N(e,r))return r}return null}function F(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&e.execPath.endsWith(`/openknowledge`))return e.execPath;let t=`/opt/OpenKnowledge/openknowledge`;return N(e,t)?t:null}function I(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`&&e.platform!==`win32`&&e.platform!==`linux`)return{available:!1,reason:`unsupported-platform`};let t;try{t=e.platform===`darwin`?j(e):e.platform===`win32`?P(e):F(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.platform===`win32`&&e.isTTY===void 0&&!e.env.CI)||e.env.SSH_CONNECTION||e.env.SSH_TTY||e.platform===`linux`&&!e.env.DISPLAY&&!e.env.WAYLAND_DISPLAY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function L(e,t){let n=e.log??(e=>console.error(e)),r=e.platform??process.platform;if(n("Launching OpenKnowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)"),r===`darwin`){D(`open`,[`-b`,`com.inkeep.open-knowledge`],{spawn:e.spawn});return}let i=t?.bundlePath;if(!i){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}D(i,[],{spawn:e.spawn})}function R(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found (checked the standard install locations for this OS). Install it, or omit --mode for browser mode.`;case`darwin-only`:case`unsupported-platform`:return`Desktop app is not available on this platform. 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 the desktop install (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available but launch dispatch did not fire (caller bug).`}}function z(e){return h.join(h.dirname(e),`..`,`Frameworks`,`OpenKnowledge Server.app`,`Contents`,`MacOS`,`OpenKnowledge Helper`)}const te=/\/[^/]+\.app\/Contents\/MacOS\/[^/]+$/;function ne(e){if(e.platform!==`darwin`||!te.test(e.execPath))return null;let t=z(e.execPath);return e.exists(t)?t:null}function B(e={}){let t=e.execPath??process.execPath,n=e.platform??process.platform,r=e.argv??process.argv,i=e.exists??y,a=r[1];return a?{command:ne({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 V(e,t){return e.host??t.HOST??`127.0.0.1`}function H(e,t){return t&&(e===`::`||e===`::1`||e===`[::1]`||e===`localhost`||e===`0.0.0.0`)?{host:`127.0.0.1`,coerced:!0}:{host:e,coerced:!1}}function U(e){let t=p(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var W=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 G(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 K(t){y(t.lockDir)||b(t.lockDir,{recursive:!0});let n=x(m(t.lockDir,e),`w`),r=t.spawn??f,{PORT:i,...a}=process.env,o=B();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{v(n)}catch{}}}function q(e,t,n,r=!1){return e??(n!==void 0||r?void 0:t)}function J(e,t){return e!==void 0&&t!==null&&t.port>0&&t.draining!==!0}function Y(e,t,n){return e??+(t!=null&&!n)}async function X(e){let t=e.spawn??f,n=B(),{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=Y(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 Z(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 re=t;function ie(e,t,n=e=>w(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 ae(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,openHandles:e??{},handlesAvailable:e!==null},`idle-shutdown: teardown finished — exiting process`),n(+!!i)}}}async function Q(e){let t=e.sigtermGraceMs??re,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>T(e)),i=e.reason??`teardown`;try{let a=e.readUiLock(),o=e.spawnedUiPid();if(a&&e.isAlive(a.pid)&&a.pid!==o)e.log?.info({pid:a.pid,port:a.port,spawnedUiPid:o},`${i}: ui.lock holder is not our spawned sibling — leaving it alone`);else if(a&&e.isAlive(a.pid))try{e.killPid(a.pid,`SIGTERM`),e.log?.info({pid:a.pid,port:a.port},`${i}: SIGTERM UI sibling`);let o=Date.now()+t;for(;Date.now()<o&&e.isAlive(a.pid);)await r(n);if(e.isAlive(a.pid))try{e.killPid(a.pid,`SIGKILL`),e.log?.warn({pid:a.pid,graceMs:t},`${i}: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:a.pid,err:t},`${i}: SIGKILL failed`)}}catch(t){e.log?.warn({pid:a.pid,err:t},`${i}: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t},`${i}: UI lookup failed; proceeding`)}}function oe(e){let{destroy:t,...n}=e;return async()=>{await Q({...n,reason:`idle-shutdown`}),await t()}}async function se(e){let{config:t,cwd:r,host:o}=e,s=e.skipAutoInit??!1,d=e.skipUiAutoSpawn??!1,f=e.idleThresholdMs??18e5,{existsSync:p,mkdirSync:m}=await import(`node:fs`),{basename:h,dirname:g}=await import(`node:path`),{bootServer:_,getLogger:v,isProcessAlive:y,readUiLock:b,resolveContentDir:x,resolveLockDir:S,waitForServerLockDrain:C}=await import(`./src-cRpQSbXB.mjs`),w=e.log??v(`start`),E=e.singleFile!==void 0,D=e.projectDir??r,O=E?i(e.singleFile).canonicalFilePath:void 0,k=O?g(O):void 0,A=O?h(O):void 0;if(!E){if(!s&&!n(r))throw new W(r);let t=process.env.OK_RECLAIM_DISABLE??null,i=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-Cr9jCNwk.mjs`)).repairMcpConfigs)({projectDir:r,reclaimDisableEnv:t,logger:i})}catch(e){w.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-DF-pHfel.mjs`)).repairLaunchJson)({projectDir:r,reclaimDisableEnv:t,logger:i})}catch(e){w.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-DKwDAoHc.mjs`)).repairSkills)({projectDir:r,reclaimDisableEnv:t,logger:i})}catch(e){w.warn({err:e},`[start] skill repair sweep failed; continuing`)}}let j=k??x(t,r);!E&&!p(j)&&(m(j,{recursive:!0}),w.info({contentDir:j},`Created content directory`));let M=null,N=null,ee=async({lockDir:t})=>{if(M=G({uiLock:b(t),isAlive:y}),M.action===`spawn`&&!d)try{let n=e.uiPort===void 0?void 0:[`ui`,`--port`,String(e.uiPort)];N=K({lockDir:t,cwd:r,spawn:e.spawn,args:n}).pid??null,w.info({reason:M.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 M.action===`skip`&&w.info({port:M.port,pid:M.pid},`UI already running at port ${M.port}`)},P=e.reactShellDistDir===void 0,F=c(),I=a();{let e=S(E?D:r),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 L=await _({config:t,contentDir:j,projectDir:E?D:r,contentRoot:E?void 0:t.content.dir,port:e.port,host:o,...e.enableRemote===!0?{enableRemote:!0}:{},quiet:!1,detectGh:l,tokenStore:F,embeddingsKeyStore:I,...E?{ephemeral:!0,singleDocRelPath:A,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],probeHarnessManagedMcpEntry:(e,t)=>u(e,t),attachUiSibling:P,idleShutdownMs:f,skipAutoInit:!0,...P?{spawnUiSiblingFn:ee}:{},idleShutdownHandler:t=>{let n=oe({readUiLock:()=>b(L.lockDir),spawnedUiPid:()=>N,isAlive:y,killPid:(e,t)=>{process.kill(e,t)},destroy:t,log:w});return ae(E?ie(n,D):n,{log:w,exit:e.idleExit})},log:w,...e.serveContentAssets===void 0?{}:{serveContentAssets:e.serveContentAssets},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});M||={action:`skip`,reason:`alive`,pid:0,port:0};let R=M,z=null;if(R.action===`skip`)z=R.port>0?R.port:null;else if(!d){let t=e.uiBindTimeoutMs??3e3;z=await Z({readUiLock:()=>b(L.lockDir),now:Date.now,sleep:e=>T(e),timeoutMs:t,pollIntervalMs:50}),z===null&&w.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:L.httpServer,destroy:L.destroy,lockDir:L.lockDir,contentDir:j,port:L.port,ready:L.ready,degraded:L.degraded,uiSpawnDecision:M,spawnedUiPid:N,resolvedUiPort:z}}function ce(e){if(e===`browser`||e===`app`)return e;throw new s(`--mode must be 'browser' or 'app'`)}function le(e){let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<1||t>65535)throw new s(`--ui-port must be a port number between 1 and 65535`);return t}function ue(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function $(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 de(e,t){let n=ue(process.env);n!==null&&(process.env.OK_CONSOLE_LEVEL=n);let{renderBanner:r}=await import(`./banner-Be20aAVc.mjs`),{accent:i,dim:a,error:o,warning:s}=await import(`./colors-MGDi6UGf.mjs`),c=process.cwd(),l=t.remote!==void 0&&t.remote!==!1,u=typeof t.remote==`string`?t.remote:void 0,f=u===void 0?e:{...e,remote:{...e.remote,url:u}};process.title=U(c),l&&(typeof f.remote?.url!=`string`||f.remote.url===``)&&(console.error(o("--remote requires a public tunnel URL — pass it (`ok start --remote https://<your-tunnel-host>`) or set remote.url in .ok/config.yml.")),process.exit(78)),l&&console.warn(s([``,`⚠ REMOTE ACCESS ENABLED — no server-side authentication.`,` Anyone who can reach ${f.remote?.url} has FULL control of this`,` knowledge base, including sync, publishing, credentials, and local operations.`,` Restrict who can reach it at the tunnel: ngrok OAuth, Cloudflare Access,`,` Tailscale ACLs, or equivalent edge auth.`,``].join(`
|
|
2
|
+
`)));let p=V(t,process.env),m=H(p,l);m.coerced&&console.warn(`remote access is enabled and ${p} is not an IPv4 loopback bind — tunnels proxy to 127.0.0.1, so binding ${p} would leave the tunnel dialing a dead port. Using 127.0.0.1.`);let h=m.host,_=t.port===void 0?void 0:Number(t.port),v=process.env.PORT?Number(process.env.PORT):void 0,b=t.uiPort===void 0?void 0:Number(t.uiPort);l&&_===void 0&&v!==void 0&&console.warn(`remote access is enabled — ignoring env PORT=${process.env.PORT}; the tunnel's port mapping targets the stable remote port (${f.remote?.port}). Pass --port to override deliberately.`);let x=q(_,v,b,l)??(l?f.remote?.port:void 0);if(b!==void 0){let{readServerLock:e,resolveLockDir:t}=await import(`./src-cRpQSbXB.mjs`);if(J(b,e(t(c)))){await X({cwd:c,uiPort:b});return}}let S=t.reactShellDistDir;if(l&&S===void 0){let e=import.meta.dirname??new URL(`.`,import.meta.url).pathname;S=[g(e,`public`),g(e,`../../app/dist`),g(e,`../../../app/dist`)].find(e=>y(e)),S===void 0&&console.warn(`remote access: bundled web UI not found — serving /mcp and /api only over the tunnel.`)}let C;try{C=await se({config:f,cwd:c,host:h,port:x,...b===void 0?{}:{uiPort:b},...t.serveContentAssets===void 0?{}:{serveContentAssets:t.serveContentAssets},...S?{reactShellDistDir:S}:{},...t.singleFile?{singleFile:t.singleFile}:{},...t.projectDir?{projectDir:t.projectDir}:{},...l?{enableRemote:!0}:{}})}catch(e){e instanceof W&&(console.error(o(e.message)),process.exit(1));let t=await import(`./src-cRpQSbXB.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),e instanceof t.RemoteConfigError&&(console.error(o(e.message)),process.exit(78)),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(o(e.message)),process.exit(1)),b!==void 0&&fe(e,t)){await X({cwd:c,uiPort:b});return}let n=pe(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 w=!1,T=async e=>{if(w)return;w=!0;let[t,...n]=$(e);console.log(i(`\n${t}`));for(let e of n)console.log(a(` ${e}`));if(C.spawnedUiPid!==null)try{let{getLogger:e,isProcessAlive:t,readUiLock:n}=await import(`./src-cRpQSbXB.mjs`);await Q({readUiLock:()=>n(C.lockDir),spawnedUiPid:()=>C.spawnedUiPid,isAlive:t,killPid:(e,t)=>process.kill(e,t),log:e(`start`),reason:`shutdown`})}catch(e){console.error(`${o(`ui sibling teardown failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`)}try{await C.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`,()=>{T(`SIGINT`)}),process.once(`SIGTERM`,()=>{T(`SIGTERM`)});let E=`http://${h}:${C.port}`,D=h===`0.0.0.0`||h===`::`?`http://0.0.0.0:${C.port}`:void 0,O=C.resolvedUiPort,k=O!==null&&O>0?`http://${h}:${O}`:E;console.log(r({name:`open-knowledge`,version:d,localUrl:k,apiUrl:k===E?void 0:E,networkUrl:D,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let A={"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`};C.ready.then(async()=>{if(C.degraded.length>0){console.log();for(let e of C.degraded){let t=A[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-BgReR_t5.mjs`);e(k)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function fe(e,t){let n=t.ServerLockCollisionError;return n!==void 0&&e instanceof n}function pe(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=m(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 me(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`,le).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,ce).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)`).option(`--remote [url]`,`Serve through a tunnel: admit requests carrying the tunnel Host with NO server-side auth (anyone who can reach the URL has full control — restrict access at the tunnel with edge auth). Bare --remote uses remote.url from .ok/config.yml; --remote <url> supplies it for this run.`).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)
|
|
3
|
+
`),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=I(A());if(n.available){L({spawn:f},n);return}console.error(R(n.reason)),process.exit(1)}await de(n,t)})}export{B as C,D,L as E,ae as S,I as T,K as _,H as a,pe as b,G as c,fe as d,q as f,J as g,de as h,oe as i,U as l,ue as m,Z as n,Y as o,V as p,se as r,X as s,W as t,$ as u,me as v,A as w,ie as x,Q as y};
|
|
4
|
+
//# sourceMappingURL=start-DQdc8wXO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,r as t,v as n}from"./start-DQdc8wXO.mjs";export{t as bootStartServer,e as resolveHost,n as startCommand};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-BBwE27jK.mjs";import{r as e,t}from"./chunk-74CEPOFO-BYrCYxKO.mjs";import{t as n}from"./chunk-HWKDQ44K-D3ZbaPl8.mjs";import{t as r}from"./chunk-X2AJGDEF-ivzQBp_p.mjs";var i={name:`stat`,summary:`display file or file system status`,usage:`stat [OPTION]... FILE...`,options:[`-c FORMAT use the specified FORMAT instead of the default`,` --help display this help and exit`]},a={format:{short:`c`,type:`string`}},o={name:`stat`,async execute(o,s){if(t(o))return e(i);let c=n(`stat`,o,a);if(!c.ok)return c.error;let l=c.result.flags.format??null,u=c.result.positional;if(u.length===0)return{stdout:``,stderr:`stat: missing operand
|
|
2
|
+
`,exitCode:1};let d=``,f=``,p=!1;for(let e of u){let t=s.fs.resolvePath(s.cwd,e);try{let n=await s.fs.stat(t);if(l){let t=l,i=n.mode.toString(8),a=r(n.mode,n.isDirectory);t=t.replace(/%n/g,e),t=t.replace(/%N/g,`'${e}'`),t=t.replace(/%s/g,String(n.size)),t=t.replace(/%F/g,n.isDirectory?`directory`:`regular file`),t=t.replace(/%a/g,i),t=t.replace(/%A/g,a),t=t.replace(/%u/g,`1000`),t=t.replace(/%U/g,`user`),t=t.replace(/%g/g,`1000`),t=t.replace(/%G/g,`group`),d+=`${t}
|
|
3
|
+
`}else{let t=n.mode.toString(8).padStart(4,`0`),i=r(n.mode,n.isDirectory);d+=` File: ${e}
|
|
4
|
+
`,d+=` Size: ${n.size} Blocks: ${Math.ceil(n.size/512)}
|
|
5
|
+
`,d+=`Access: (${t}/${i})
|
|
6
|
+
`,d+=`Modify: ${n.mtime.toISOString()}
|
|
7
|
+
`}}catch{f+=`stat: cannot stat '${e}': No such file or directory
|
|
8
|
+
`,p=!0}}return{stdout:d,stderr:f,exitCode:+!!p}}};export{o as statCommand};
|
|
9
|
+
//# sourceMappingURL=stat-BT5A227F-CEZPXJ9_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-5QVNJEHU-DS9zA_YV.mjs";export{e as statCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import{m as t,p as n}from"./src-BPVU4Y0o.mjs";import{O as r,c as i,s as a,x as o}from"./chunk-WYO6CB5R-DN1R0VLx.mjs";import{et as s,g as c}from"./chunk-ICXQ74PX-DbJy3VdO.mjs";import{t as l}from"./line-eTDW_zUy.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import{t as u}from"./graphlib-DXQPHTiH.mjs";import{t as d}from"./dagre-BkPA5x_w.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-Chp9b-Lc.mjs";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);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-o().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+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().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`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=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(a.lineBreakRegex),u=1.25*o().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}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type===`default`&&t.descriptions.length===0&&_(i,t),t.type===`default`&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(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`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.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=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(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=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);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;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[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 a;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);a=N(t.doc,e,t.id,!i,o,s,c);{e=y(e,t,i);let n=e.node().getBBox();a.width=n.width,a.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else a=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(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .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)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).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,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
|
|
2
|
+
//# sourceMappingURL=stateDiagram-2N3HPSRC-pAn2bDnn.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import"./chunk-WYO6CB5R-DN1R0VLx.mjs";import"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-Chp9b-Lc.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-6OUMAXLB-DCmVVpGm.mjs.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-BBwE27jK.mjs";import{n as e,r as t,t as n}from"./chunk-74CEPOFO-BYrCYxKO.mjs";var r={name:`strings`,summary:`print the sequences of printable characters in files`,usage:`strings [OPTION]... [FILE]...`,description:`For each FILE, print the printable character sequences that are at least MIN characters long. If no FILE is specified, standard input is read.`,options:[`-n MIN Print sequences of at least MIN characters (default: 4)`,`-t FORMAT Print offset before each string (o=octal, x=hex, d=decimal)`,`-a Scan the entire file (default behavior)`,`-e ENCODING Select character encoding (s=7-bit, S=8-bit)`],examples:[`strings file.bin # Extract strings (min 4 chars)`,`strings -n 8 file.bin # Extract strings (min 8 chars)`,`strings -t x file.bin # Show hex offset`,`echo 'hello' | strings # Read from stdin`]};function i(e){return e>=32&&e<=126||e===9}function a(e,t){if(t===null)return``;switch(t){case`o`:return`${e.toString(8).padStart(7,` `)} `;case`x`:return`${e.toString(16).padStart(7,` `)} `;case`d`:return`${e.toString(10).padStart(7,` `)} `;default:return t}}function o(e,t){let n=[],r=``,o=0,s=typeof e==`string`?new TextEncoder().encode(e):e;for(let e=0;e<s.length;e++){let c=s[e];if(i(c))r.length===0&&(o=e),r+=String.fromCharCode(c);else{if(r.length>=t.minLength){let e=a(o,t.offsetFormat);n.push(`${e}${r}`)}r=``}}if(r.length>=t.minLength){let e=a(o,t.offsetFormat);n.push(`${e}${r}`)}return n}var s={name:`strings`,execute:async(i,a)=>{if(n(i))return t(r);let s={minLength:4,offsetFormat:null},c=[],l=0;for(;l<i.length;){let t=i[l];if(t===`-n`&&l+1<i.length){let e=Number.parseInt(i[l+1],10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:``,stderr:`strings: invalid minimum string length: '${i[l+1]}'
|
|
2
|
+
`};s.minLength=e,l+=2}else if(t.match(/^-n\d+$/)){let e=Number.parseInt(t.slice(2),10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:``,stderr:`strings: invalid minimum string length: '${t.slice(2)}'
|
|
3
|
+
`};s.minLength=e,l++}else if(t.match(/^-\d+$/)){let e=Number.parseInt(t.slice(1),10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:``,stderr:`strings: invalid minimum string length: '${t.slice(1)}'
|
|
4
|
+
`};s.minLength=e,l++}else if(t===`-t`&&l+1<i.length){let e=i[l+1];if(e!==`o`&&e!==`x`&&e!==`d`)return{exitCode:1,stdout:``,stderr:`strings: invalid radix: '${e}'
|
|
5
|
+
`};s.offsetFormat=e,l+=2}else if(t.startsWith(`-t`)&&t.length===3){let e=t[2];if(e!==`o`&&e!==`x`&&e!==`d`)return{exitCode:1,stdout:``,stderr:`strings: invalid radix: '${e}'
|
|
6
|
+
`};s.offsetFormat=e,l++}else if(t===`-a`||t===`--all`||t===`-`)t===`-`&&c.push(t),l++;else if(t===`-e`&&l+1<i.length){let e=i[l+1];if(e!==`s`&&e!==`S`)return{exitCode:1,stdout:``,stderr:`strings: invalid encoding: '${e}'
|
|
7
|
+
`};l+=2}else if(t.startsWith(`-e`)&&t.length===3){let e=t[2];if(e!==`s`&&e!==`S`)return{exitCode:1,stdout:``,stderr:`strings: invalid encoding: '${e}'
|
|
8
|
+
`};l++}else if(t===`--`){c.push(...i.slice(l+1));break}else{if(t.startsWith(`-`)&&t!==`-`)return e(`strings`,t);c.push(t),l++}}let u=``;if(c.length===0){let e=o(a.stdin??``,s);u=e.length>0?`${e.join(`
|
|
9
|
+
`)}
|
|
10
|
+
`:``}else for(let e of c){let t;if(e===`-`)t=a.stdin??``;else{let n=a.fs.resolvePath(a.cwd,e);if(t=await a.fs.readFile(n),t===null)return{exitCode:1,stdout:u,stderr:`strings: ${e}: No such file or directory
|
|
11
|
+
`}}let n=o(t,s);n.length>0&&(u+=`${n.join(`
|
|
12
|
+
`)}
|
|
13
|
+
`)}return{exitCode:0,stdout:u,stderr:``}}};export{s as strings};
|
|
14
|
+
//# sourceMappingURL=strings-7PLOGTPD-CiVw0Uh4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-VYOJP4TV-DG_cm0JM.mjs";export{e as strings};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import{m as t}from"./src-BPVU4Y0o.mjs";import{b as n,x as r}from"./chunk-WYO6CB5R-DN1R0VLx.mjs";import{g as i}from"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import{r as a}from"./chunk-7BUUIJ7U-D7hE25H9.mjs";import{n as o}from"./chunk-OGEWGWER-DgPAesMA.mjs";import{t as s}from"./graphlib-DXQPHTiH.mjs";import{n as c}from"./chunk-RYQCIY6F-Dt7I2-Oy.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import{a as l,c as u,i as d,n as f,t as p}from"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import{a as m,i as h,n as g,r as _,s as v,t as y}from"./chunk-52WLFC77-Cn-qt8h-.mjs";async function b(e,t){let n=new s({multigraph:!0,compound:!0}),i=[...t.edges],a=r(),o=e.insert(`g`).attr(`class`,`root`),c=o.insert(`g`).attr(`class`,`clusters`),u=o.insert(`g`).attr(`class`,`edges edgePath`),d=o.insert(`g`).attr(`class`,`edgeLabels`),f=o.insert(`g`).attr(`class`,`nodes`),p=new Map,m=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)n.setNode(e.id,{...e});else{if(m){let t=await l(f,e,{config:a,dir:e.dir}),n=t.node()?.getBBox()??{width:0,height:0};p.set(e.id,t),e.width=n.width,e.height=n.height}n.setNode(e.id,{...e})}}));for(let e of i)n.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await import(`./sizeCapture-X5ZJPWSS-Izaz24Pi.mjs`);n(e,t)}return{graph:n,groups:{clusters:c,edgePaths:u,edgeLabels:d,nodes:f,rootGroups:o},nodeElements:p}}e(b,`createGraphWithElements`);var x=5,S=1e-5,C=1e-6;function w(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}e(w,`buildSegmentList`);function T(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(c===0)return null;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c;return d<=C||d>=1-C||f<=C||f>=1-C?null:{point:{x:e.x+d*i,y:e.y+d*a},tA:d,tB:f}}e(T,`segmentIntersection`);function E(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}e(E,`isHorizontalSeg`);function D(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=w(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=w(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=T(a.a,a.b,s.a,s.b);if(!o)continue;let c=E(a);c!==E(s)&&c?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}e(D,`findEdgeIntersections`);function O(e){return`${Math.round(e*1e3)/1e3}`}e(O,`fmt`);function k(e){return`${O(e.x)},${O(e.y)}`}e(k,`pointToString`);function A(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}e(A,`getArcSweepFlag`);var j=.001;function ee(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&a[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&a[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}e(ee,`applyMarkerOffsets`);function te(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${k(s)}`];return i===`arc`?l.push(`A${O(e.r)},${O(e.r)} 0 0 ${r} ${k(c)}`):l.push(`M${k(c)}`),l}e(te,`emitJump`);function M(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,c=Math.hypot(i,a),l=Math.hypot(o,s);if(c<S||l<S)return null;let u=i/c,d=a/c,f=o/l,p=s/l,m=u*f+d*p,h=Math.acos(Math.max(-1,Math.min(1,m)));if(h<S||Math.abs(Math.PI-h)<S)return null;let g=Math.min(r/Math.sin(h/2),c/2,l/2);return{startX:t.x-u*g,startY:t.y-d*g,endX:t.x+f*g,endY:t.y+p*g,ctrlX:t.x,ctrlY:t.y,cutLen:g}}e(M,`computeRoundedCorner`);function ne(e,t,n){let r=e.points;if(r.length<2)return``;let i=ee(r,e),a=e.curve===`rounded`,o=w(i),s=new Map;for(let e of t){let t=o[e.segIndex];if(!t)continue;let r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=s.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*r,r:n.jumpRadius}),s.set(e.segIndex,i)}let c=[`M${k(i[0])}`];for(let e=0;e<o.length;e++){let t=o[e],r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),l=r===0?0:(t.b.x-t.a.x)/r,u=r===0?0:(t.b.y-t.a.y)/r,d=A(t),f=0;if(a&&e>0){let t=M(i[e-1],i[e],i[e+1]??i[e],x);t&&(f=t.cutLen)}let p=r,m=null;a&&e<o.length-1&&(m=M(i[e],i[e+1],i[e+2]??i[e+1],x),m&&(p=r-m.cutLen));let h=[...s.get(e)??[]].sort((e,t)=>e.t-t.t);for(let e of h)e.r=Math.min(e.r,e.d-f,p-e.d);for(let e=0;e<h.length-1;e++){let t=h[e+1].d-h[e].d;if(h[e].r+h[e+1].r>t){let n=t/2;h[e].r=Math.min(h[e].r,n),h[e+1].r=Math.min(h[e+1].r,n)}}for(let e of h)e.r<j||c.push(...te(e,l,u,d,n.jumpStyle));a&&m?(c.push(`L${O(m.startX)},${O(m.startY)}`),c.push(`Q${O(m.ctrlX)},${O(m.ctrlY)} ${O(m.endX)},${O(m.endY)}`)):c.push(`L${k(t.b)}`)}return c.join(` `)}e(ne,`rewriteEdgePath`);function N(e){return/^[\d\s+,.LMelm-]*$/.test(e)}e(N,`isStraightPath`);function re(e){return e?e===`linear`||e===`rounded`||e===`step`||e===`stepBefore`||e===`stepAfter`:!0}e(re,`curveSupportsLineHops`);function P(e){if(!e)return null;try{let t=typeof atob==`function`?atob(e):Buffer.from(e,`base64`).toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&typeof e.x==`number`&&typeof e.y==`number`&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}e(P,`decodeDataPoints`);function ie(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=P(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=D(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!re(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!N(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=ne(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}e(ie,`applyLineJumpsToSvg`);async function ae(e,t){for(let n of e.nodes)n.isGroup?await d(t.clusters,n):u(n);let n=new Map;for(let t of e.nodes)t?.id&&n.set(t.id,t);for(let r of e.edges){let i=r.start?n.get(r.start)??{}:{},a=r.end?n.get(r.end)??{}:{},o=_(t.edgePaths,{...r},{},e.type,i,a,e.diagramId);r.label&&await h(t.rootGroups,r),r.label&&oe(r,o)}let r=e.config?.swimlane?.lineHops;if(r!==!1){let n=r===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));ie(t.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}}e(ae,`adjustLayout`);function oe(e,r){let a=r?.updatedPath??r?.originalPath,{subGraphTitleTotalMargin:s}=o({flowchart:n().flowchart??{}});if(e.label){let n=g.get(e.id),o=e.x,c=e.y;if(a){let n=i.calcLabelPosition(a);t.debug(`Moving label `+e.label+` from (`,o,`,`,c,`) to (`,n.x,`,`,n.y,`) abc88`),r&&(o=n.x,c=n.y)}n.attr(`transform`,`translate(${o}, ${c+s/2})`)}if(e?.startLabelLeft){let t=v.get(e.id).startLeft,n=e?.x,r=e?.y;if(a){let t=i.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,a);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=v.get(e.id).startRight,n=e.x,r=e.y;if(a){let t=i.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,a);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=v.get(e.id).endLeft,n=e.x,r=e.y;if(a){let t=i.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,a);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=v.get(e.id).endRight,n=e.x,r=e.y;if(a){let t=i.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,a);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}e(oe,`positionEdgeLabel`);var se=`__swimlane_default__`,ce=21,le=20;function ue(e){return Math.max(e.padding??le,le)}e(ue,`topLaneHorizontalPadding`);function de(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(ce,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}e(de,`assignTopLaneTitleRect`);function fe(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===se);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:se,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=se}e(fe,`prepareLayoutForSwimlanes`);function pe(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}e(pe,`toGraphView`);function F(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*ue(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*ue(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e<l-1;e++)t.push(s[e+1]-s[e]);let n=Array(l);n[0]=0;for(let e=0;e<l-1;e++)n[e+1]=2*t[e]-n[e];let r=0,i=1/0;for(let e=0;e<l;e++){let t=c[e];e%2==0?r=Math.max(r,t-n[e]):i=Math.min(i,n[e]-t)}let a=r;a=r<=i?(r+i)/2:r;for(let t=0;t<l;t++){let r=n[t]+(t%2==0?a:-a),i=Math.max(c[t],r);e.set(o[t],i)}}for(let t of d){let n=e.get(t.id);n!=null&&(t.width=n),de(t)}}}}}e(F,`writeBackToLayoutData`);var I=`[EdgeLabelNodes]`;function me(e){let n=[],r=[],i=new Map;for(let t of e.nodes)i.set(t.id,t);for(let a of e.edges){if(!a.label||a.label.length===0||a.isLayoutOnly||a.labelNodeId)continue;let e=a.start?i.get(a.start):void 0,o=a.end?i.get(a.end):void 0;if(!e||!o){t.warn(I,`Edge ${a.id} has missing source or target node`);continue}let s=`edge-label-${a.start}-${a.end}-${a.id}`,c=e.parentId===o.parentId?e.parentId:o.parentId,l={id:s,label:a.label,edgeStart:a.start??``,edgeEnd:a.end??``,shape:`labelRect`,width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:c,isGroup:!1,labelStyle:Array.isArray(a.labelStyle)?a.labelStyle[0]:a.labelStyle??``,...e.dir?{dir:e.dir}:{}};n.push(l),a.labelNodeId=s,a.label=void 0,a.text=void 0;let u={id:`${a.id}-to-label`,start:a.start,end:s,type:`normal`,isLayoutOnly:!0},d={id:`${a.id}-from-label`,start:s,end:a.end,type:`normal`,isLayoutOnly:!0};r.push(u,d)}let a=[...e.nodes,...n],o=[...e.edges,...r];return{...e,nodes:a,edges:o}}e(me,`createEdgeLabelNodes`);var L=.001;function he(e){let t=e.x??0,n=e.y??0,r=e.width??0,i=e.height??0;return r>0&&i>0?{cx:t,cy:n,rect:Te(t,n,r,i)}:void 0}e(he,`measuredNodeRect`);function ge(e){if(e.isGroup)return;let t=he(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}e(ge,`nodeBoundsInfoFor`);function R(e,t,n=L){return Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<n}e(R,`samePoint`);function z(e,t,n=L){return Math.abs(e.x-t.x)<n}e(z,`sameX`);function B(e,t,n=L){return Math.abs(e.y-t.y)<n}e(B,`sameY`);function V(e,t,n=L){return B(e,t,n)&&Math.abs(e.x-t.x)>n}e(V,`isHorizontalSegment`);function H(e,t,n=L){return z(e,t,n)&&Math.abs(e.y-t.y)>n}e(H,`isVerticalSegment`);function U(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}e(U,`overlapLength`);function _e(e,t,n=L){return e.horizontal&&t.horizontal&&B(e.a,t.a,n)?U(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&z(e.a,t.a,n)?U(e.a.y,e.b.y,t.a.y,t.b.y):0}e(_e,`sameAxisSegmentOverlapLength`);function ve(e,t=L){let n=[];for(let r=0;r<e.length-1;r++){let i=e[r],a=e[r+1],o=V(i,a,t),s=H(i,a,t);(o||s)&&n.push({index:r,a:i,b:a,horizontal:o,vertical:s})}return n}e(ve,`orthogonalSegmentsForPoints`);function W(e,t=L){let n=ve(e,t),r=0;for(let e=1;e<n.length;e++)n[e-1].horizontal!==n[e].horizontal&&r++;return r}e(W,`countOrthogonalBends`);function G(e,t=L){let n=[];for(let r of e){let e=n.length>0?n[n.length-1]:void 0;(!e||!R(e,r,t))&&n.push({x:r.x,y:r.y})}return n}e(G,`dedupeConsecutivePoints`);function ye(e,t=L){if(!e||e.length!==4)return;let[n,r,i,a]=e;return V(n,r,t)&&H(r,i,t)&&V(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:H(n,r,t)&&V(r,i,t)&&H(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}e(ye,`classifyThreeSegmentRoute`);function be(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&i<n.right+r&&s>n.top-r&&o<n.bottom+r}e(be,`segmentBoundsOverlapRect`);function xe(e,t,n=0){return e.x>t.left+n&&e.x<t.right-n&&e.y>t.top+n&&e.y<t.bottom-n}e(xe,`pointInsideRect`);function Se(e,t){return e.left<=t.left&&e.right>=t.right&&e.top<=t.top&&e.bottom>=t.bottom}e(Se,`rectContainsRect`);function Ce(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}e(Ce,`rectsOverlap`);function we(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}e(we,`inflateRect`);function Te(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}e(Te,`rectFromCenterSize`);function K(e){return he(e)?.rect}e(K,`rectOfNodeBounds`);function Ee(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}e(Ee,`portForRectSide`);function De(e,t,n,r,i,a=L){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.x<n.x||t===`left`&&r===`right`&&e.x>n.x){if(B(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(B(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(z(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.y<n.y||t===`top`&&r===`bottom`&&e.y>n.y))return;if(z(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.x<e.x,a=r===`top`&&e.y<n.y||r===`bottom`&&e.y>n.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.y<e.y,l=r===`left`&&e.x<n.x||r===`right`&&e.x>n.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}e(De,`buildOrthogonalPortPath`);function Oe(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}e(Oe,`buildSameSideTrackPath`);function ke(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=ge(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}e(ke,`collectRealNodeBounds`);function Ae(e){let t=[],n=[];for(let r of e){let e=ge(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}e(Ae,`collectNodeRectEntries`);function je(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...Te(e,i,a,o)})}return n}e(je,`collectLayoutNodeRects`);function Me(e,t,n=L){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)<n,collinearY:Math.abs(a.cy-o.cy)<n}}e(Me,`getNodePairGeometry`);function q(e,t,n,r=[],i=0){for(let a of n)if(!r.includes(a.id)&&be(e,t,a.rect,-i))return!0;return!1}e(q,`segmentHitsAnyRect`);function Ne(e,t,n,r,i=L,a=1e-6){let o=B(e,t,i),s=z(e,t,i),c=B(n,r,i),l=z(n,r,i);if(o&&c||s&&l||!(o||s)||!(c||l))return!1;let u=o?{a:e,b:t}:{a:n,b:r},d=s?{a:e,b:t}:{a:n,b:r},f=u.a.y,p=Math.min(u.a.x,u.b.x),m=Math.max(u.a.x,u.b.x),h=d.a.x,g=Math.min(d.a.y,d.b.y),_=Math.max(d.a.y,d.b.y);if(h<p||h>m||f<g||f>_)return!1;let v=Math.abs(h-u.a.x)<a&&Math.abs(f-u.a.y)<a||Math.abs(h-u.b.x)<a&&Math.abs(f-u.b.y)<a,y=Math.abs(h-d.a.x)<a&&Math.abs(f-d.a.y)<a||Math.abs(h-d.b.x)<a&&Math.abs(f-d.b.y)<a;return!(v&&y)}e(Ne,`orthogonalSegmentsCross`);function Pe(e,t,n,r,i=L){let a=B(e,t,i),o=z(e,t,i),s=B(n,r,i),c=z(n,r,i);return o&&c&&z(e,n,i)?U(e.y,t.y,n.y,r.y)>i:a&&s&&B(e,n,i)?U(e.x,t.x,n.x,r.x)>i:!1}e(Pe,`sameAxisSegmentsOverlap`);function Fe(e,t,n,r,{epsilon:i=L,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;r<n.length-1;r++){let o=n[r],s=n[r+1];if(!(a&&R(o,s,i))&&(Ne(e,t,o,s,i)||Pe(e,t,o,s,i)))return!0}}return!1}e(Fe,`segmentConflictsWithAnyEdge`);function Ie(e,t,n,r,i=L){let a=B(e,t,i),o=z(e,t,i),s=B(n,r,i),c=z(n,r,i);if(!(a&&c||o&&s))return!1;let l=a?{a:e,b:t}:{a:n,b:r},u=a?{a:n,b:r}:{a:e,b:t},d=l.a.y,f=Math.min(l.a.x,l.b.x),p=Math.max(l.a.x,l.b.x),m=u.a.x,h=Math.min(u.a.y,u.b.y),g=Math.max(u.a.y,u.b.y);return m>f+i&&m<p-i&&d>h+i&&d<g-i}e(Ie,`orthogonalSegmentsStrictlyCross`);function Le(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return e>r+L&&e<i-L}e(Le,`strictlyBetween`);function Re(e,t,n){return z(e,t)&&z(t,n)?Le(t.y,e.y,n.y):B(e,t)&&B(t,n)?Le(t.x,e.x,n.x):!1}e(Re,`isCollinearIntermediate`);function ze(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=n[n.length-1],a=e[r],o=r+1<e.length?e[r+1]:void 0;if(i&&o){if(R(i,o)){r++,t=!0;continue}if(Re(i,a,o)){t=!0;continue}}n.push(a)}return{points:n,changed:t}}e(ze,`simplifyPolylineOnce`);function Be(e){let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n];if(!z(r,i)&&!B(r,i)){let e=t.length>=2?t[t.length-2]:void 0,n=e&&z(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!R(t,e))&&n.push(e)}return n}e(Be,`orthogonalizePolyline`);function Ve(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=ze(t);if(t=e.points,!e.changed)break}return t}e(Ve,`simplifyPolyline`);var J=.001,He=.5,Ue=4;function We(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length<n)return;let i=r.start?t.get(r.start):void 0,a=r.end?t.get(r.end):void 0;return{edge:r,points:r.points,srcRect:i?K(i):void 0,dstRect:a?K(a):void 0}}e(We,`endpointContextFor`);function Ge(e,t,n){if(B(e,t,J))return{x:e.x<n.left?n.left:n.right,y:e.y};if(z(e,t,J)){let t=e.y<n.top?n.top:n.bottom;return{x:e.x,y:t}}return{x:Math.min(n.right,Math.max(n.left,e.x)),y:Math.min(n.bottom,Math.max(n.top,e.y))}}e(Ge,`segmentEnterPoint`);function Ke(e,t,n){let r=n?1:-1,i=n?0:e.length-1;for(;i>=0&&i<e.length&&xe(e[i],t,He);)i+=r;if(i<0||i>=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ge(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}e(Ke,`clipEndpoint`);function qe(e,t){for(let n of e){let e=We(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=Ke(r,e.srcRect,!0)),e.dstRect&&(r=Ke(r,e.dstRect,!1)),r=Ve(Be(r)),r=it(r,e.srcRect,e.dstRect),e.edge.points=Ve(Be(r))}}e(qe,`clipEdgeEndpointsToNodeBoundaries`);function Je(e,t,n,r=!1){if(B(e,t,J)){if(t.y<n.top-J||t.y>n.bottom+J)return t;if(r){if(e.x<n.left-J)return{x:n.left,y:e.y};if(e.x>n.right+J)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(z(e,t,J)){if(t.x<n.left-J||t.x>n.right+J)return t;if(r){if(e.y<n.top-J)return{x:e.x,y:n.top};if(e.y>n.bottom+J)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}e(Je,`snapEndpointToBoundary`);function Ye(e,t,n){let r=e[t];for(let i=t+n;i>=0&&i<e.length;i+=n){let t=e[i];if(!R(t,r,J))return t}return e[t+n]}e(Ye,`firstDistinctAdjacent`);function Xe(e,t){let n=e+Ue,r=t-Ue;return n<=r?{lo:n,hi:r}:{lo:(e+t)/2,hi:(e+t)/2}}e(Xe,`cornerClearanceRange`);function Ze(e,t,n){let{lo:r,hi:i}=Xe(t,n);return Math.min(i,Math.max(r,e))}e(Ze,`clampToCornerClearance`);function Qe(e){let t=Math.max(...e.map(e=>e.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}e(Qe,`intersectRanges`);function $e(e,t){return t===`left`||t===`right`?Xe(e.top,e.bottom):Xe(e.left,e.right)}e($e,`clearanceRangeForSide`);function et(e,t,n){let r=e.y>=n.top-J&&e.y<=n.bottom+J,i=e.x>=n.left-J&&e.x<=n.right+J;if(B(e,t,J)&&r){if(Math.abs(e.x-n.left)<J)return`left`;if(Math.abs(e.x-n.right)<J)return`right`}if(z(e,t,J)&&i){if(Math.abs(e.y-n.top)<J)return`top`;if(Math.abs(e.y-n.bottom)<J)return`bottom`}}e(et,`terminalSideForSegment`);function tt(e){return e===`left`||e===`right`}e(tt,`isHorizontalSide`);function nt(e,t,n,r,i){let a=[],o=n?et(e,t,n):void 0,s=r?et(t,e,r):void 0;return n&&o&&tt(o)===i&&a.push($e(n,o)),r&&s&&tt(s)===i&&a.push($e(r,s)),a.length>0?Qe(a):void 0}e(nt,`straightClearanceRange`);function rt(e,t,n,r,i){let a=nt(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)<J))return i?[{x:e.x,y:s},{x:t.x,y:s}]:[{x:s,y:e.y},{x:s,y:t.y}]}e(rt,`clearStraightEndpointCornerAxis`);function it(e,t,n){if(e.length!==2)return e;let[r,i]=e;return B(r,i,J)?rt(r,i,t,n,!0)??e:z(r,i,J)?rt(r,i,t,n,!1)??e:e}e(it,`clearStraightEndpointCornerConnections`);function at(e,t,n){return tt(n)?{x:e.x,y:Ze(e.y,t.top,t.bottom)}:{x:Ze(e.x,t.left,t.right),y:e.y}}e(at,`cornerClearedEndpoint`);function ot(e,t,n,r,i,a){let o=e.map(e=>({...e}));for(let s=t;s>=0&&s<e.length;s+=n){let t=e[s];if(a&&!B(t,r,J)||!a&&!z(t,r,J))break;a?o[s].y=i.y:o[s].x=i.x}return o}e(ot,`moveCollinearEndpointRun`);function st(e,t,n){if(e.length<2)return e;let r=n?0:e.length-1,i=n?1:-1,a=e[r],o=Ye(e,r,i);if(!o)return e;let s=et(a,o,t);if(!s)return e;let c=tt(s),l=at(a,t,s);return R(a,l,J)?e:ot(e,r,i,a,l,c)}e(st,`clearEndpointCornerConnection`);function ct(e,t,n){let r=Math.min(e.x,t.x)>=n.left-J&&Math.max(e.x,t.x)<=n.right+J,i=Math.min(e.y,t.y)>=n.top-J&&Math.max(e.y,t.y)<=n.bottom+J;if(Math.abs(e.y-n.top)<J&&Math.abs(t.y-n.top)<J&&r)return`top`;if(Math.abs(e.y-n.bottom)<J&&Math.abs(t.y-n.bottom)<J&&r)return`bottom`;if(Math.abs(e.x-n.left)<J&&Math.abs(t.x-n.left)<J&&i)return`left`;if(Math.abs(e.x-n.right)<J&&Math.abs(t.x-n.right)<J&&i)return`right`}e(ct,`borderSideForSegment`);function lt(e,t,n,r){switch(e){case`top`:return z(t,n,J)&&n.y<r.top-J;case`bottom`:return z(t,n,J)&&n.y>r.bottom+J;case`left`:return B(t,n,J)&&n.x<r.left-J;case`right`:return B(t,n,J)&&n.x>r.right+J}}e(lt,`leavesOutward`);function ut(e,t,n){if(e.length<3)return e;if(n){let n=ct(e[0],e[1],t);return n&<(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=ct(e[r-1],e[r],t);return i&<(i,e[r-1],e[r-2],t)?e.slice(0,r):e}e(ut,`collapseOwnBorderStub`);function dt(e,t,n){let r=e;if(t){let e=Ye(r,0,1);if(e){let n=Je(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=ut(r,t,!0)}if(n){let e=r.length-1,t=Ye(r,e,-1);if(t){let i=Je(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=ut(r,n,!1)}let i=it(r,t,n);return i!==r||r.length===2?i:(t&&(r=st(r,t,!0)),n&&(r=st(r,n,!1)),r)}e(dt,`snapAndCollapseEndpoints`);function ft(e,t){for(let n of e){let e=We(n,t,2);if(!e)continue;let r=dt(G(e.points,J),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}e(ft,`prepareEdgeEndpointsForRenderer`);function pt(e){return new Map(e.map(e=>[e.id,e]))}e(pt,`buildNodeMap`);function mt(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}e(mt,`resolveTopLevelGroupId`);function ht(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}e(ht,`groupDepth`);function gt(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}e(gt,`boundsForChildren`);function _t(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}e(_t,`applyGroupBounds`);function vt(e){let t=pt(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>ht(n,t)-ht(e,t));for(let t of n){let n=gt(e.filter(e=>e.parentId===t.id));n&&_t(t,n)}}e(vt,`recomputeNestedGroupBounds`);function yt(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=e(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}e(yt,`mirrorAxis`);function bt(e){return(e.nodes??[]).some(e=>!e.isGroup)?yt(e,`y`):!0}e(bt,`applyBtDirectionTransform`);function xt(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t<a&&(a=t),n<o&&(o=n)}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let s=0,c=0;for(let e of i)s+=e.width??0,c+=e.height??0;let l=s/i.length,u=c/i.length,d=u>0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}vt(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&yt(e,`x`),!0;let p=pt(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=mt(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=gt(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;e<g.length;e++){let t=g[e],n,r;if(n=e===0?t.contentTop-C:(g[e-1].contentBottom+t.contentTop)/2,e===g.length-1)r=t.contentBottom+C;else{let n=g[e+1];r=(t.contentBottom+n.contentTop)/2}let i=Math.max(0,r-n),a=(n+r)/2;t.lane.x=S,t.lane.y=a,t.lane.width=b,t.lane.height=i,t.lane.swimlaneContentTop=t.contentTop,t.lane.groupTitleRect={left:x,right:x+36,top:n,bottom:r}}return t===`RL`&&yt(e,`x`),!0}e(xt,`applyLrDirectionTransform`);var St=1e-6,Ct=8,wt=[0,Ct,-Ct,2*Ct,-2*Ct];function Tt(e,t){let{nodeInfoById:n,realNodeRects:r}=ke(t);for(let t of e){if(t.isLayoutOnly)continue;let i=t.points;if(!i||i.length<4)continue;let a=ye(G(i,St),St);if(!a)continue;let{p3:o}=a,s=a.kind===`HVH`,c=Me(t,n,St);if(!c)continue;let{srcId:l,dstId:u,srcInfo:d,dstInfo:f,collinearX:p,collinearY:m}=c;if(p||m)continue;let h,g=d.rect;for(let n of wt){let i,a,c;if(s){let e=f.cy>d.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+St||t>=g.right-St)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+St||t>=g.bottom-St)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=R(i,a,St),m=R(a,c,St);if(p&&m||!p&&q(i,a,r,[l],1)||!m&&q(a,c,r,[u],1))continue;let _=!p&&Fe(i,a,e,t,{epsilon:St,skipDegenerateOther:!0}),v=!m&&Fe(a,c,e,t,{epsilon:St,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}e(Tt,`portSwapToLShape`);function Et(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=Ae(n.values());for(let o of t){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=G(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h<r)continue;let g=d.x-f.x,_=d.y-f.y;if(Math.hypot(g,_)<r)continue;let v=V(d,u,r),y=H(d,u,r),b=V(f,d,r),x=H(f,d,r);if(!(v&&x||y&&b))continue;let S=o.end,C=o.start,w=S?n.get(S):void 0;if(!w)continue;let T=w.x??0,E=w.y??0,D=K(w);if(!D)continue;let O,k;if(x){let e=_<0;O={x:T,y:f.y},k={x:T,y:e?D.bottom:D.top}}else{let e=g>0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(q(O,k,i,S?[S]:[],-2)||q(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&xe(O,t,2))continue}let A=e((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e<c.length-1;e++)j.add(A(c[e],c[e+1]));let ee=e((e,n)=>{for(let i of t){if(i===o||i.isLayoutOnly)continue;let t=i.points;if(!(!t||t.length<2))for(let i=0;i<t.length-1;i++){let a=t[i],o=t[i+1];if(!j.has(A(a,o))&&Ie(e,n,a,o,r))return!0}}return!1},`segmentCrossesOtherEdge`);if(ee(O,k))continue;if(l-3>=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(q(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e<te.length-1;e++){let s=te[e],c=te[e+1],l=Math.hypot(c.x-s.x,c.y-s.y),u=B(s,c,r),d=z(s,c,r);(u&&l>=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}e(Et,`collapseShortTerminalStub`);var Y=.001,X=8,Z=ve,Dt=e((e,t)=>z(e,t,Y)||B(e,t,Y),`orthogonallyAligned`);function Ot(t,n){let r=e((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=e((e,t)=>{let i=G(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(Dt(l,u)&&(d=l),z(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(B(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=e((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&z(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&B(e.boundary,t.boundary,1),`sameTerminalFace`),s=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=X&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=e((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n<X)return!1;let r=e.rect.bottom-e.rect.top;return n<r||n>2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=e((t,n)=>{let r=G(t.edge.points??[]);if(r.length<2)return;let i=t.orientation===`V`?{x:t.boundary.x+n,y:t.boundary.y}:{x:t.boundary.x,y:t.boundary.y+n},a=t.orientation===`V`?{x:t.railEnd.x+n,y:t.railEnd.y}:{x:t.railEnd.x,y:t.railEnd.y+n};if(!e(()=>Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1?B(i,t.boundary,Y)&&i.x>=t.rect.left+1&&i.x<=t.rect.right-1:Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1?z(i,t.boundary,Y)&&i.y>=t.rect.top+1&&i.y<=t.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(t.atStart){let e=r.length>1&&R(r[1],t.railEnd,Y),n=r.slice(e?2:1),o=n[0];return o&&!Dt(o,a)?void 0:[i,a,...n]}let o=r.length>1&&R(r[r.length-2],t.railEnd,Y),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!Dt(c,a)))return[...s,a,i]},`shiftedCandidate`),u=e(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return B(f,p,Y)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||z(f,p,Y)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let e=0;e<8;e++){let e=t.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let t=0;t<e.length&&!n;t++)for(let r=t+1;r<e.length&&!n;r++){let a=e[t],o=e[r];if(a.edge===o.edge||!(s(a,o)||c(a,o)))continue;let f=!s(a,o),p=[a,o].sort((e,t)=>{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let t of p){for(let r of d){let a=l(t,r);if(!a)continue;let o=i({...t.edge,points:a},t.atStart);if(!(!o||e.some(e=>e.edge!==t.edge&&(s(o,e)||f&&c(o,e))))){t.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}e(Ot,`separateSharedRenderedTerminalLanes`);function kt(t,n){let{realNodeRects:r,labelNodeRects:i}=Ae(n.values()),a=e((e,n)=>{let a=e.start,o=e.end,s=Z(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of s)for(let n of Z(G(t)))if(_e(e,n,.5)>=X||Ie(e.a,e.b,n.a,n.b,Y))return!1}}return!0},`candidateIsSafe`),o=e((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&z(n,a,Y)&&z(n,o,Y)&&z(r,i,Y)&&(r.x-n.x)*(a.x-i.x)<0,c=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&B(n,a,Y)&&B(n,o,Y)&&B(r,i,Y)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return G([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&H(o,l)&&z(n,o,Y)&&z(n,l,Y)&&z(i,a,Y)&&(i.x-r.x)*(o.x-a.x)<0,d=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&V(o,l)&&B(n,o,Y)&&B(n,l,Y)&&B(i,a,Y)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return G([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let e=0;e<8;e++){let e=!1;for(let n of t){if(n.isLayoutOnly)continue;let t=G(n.points??[]);for(let r=0;r<=t.length-5;r++){let i=o(t,r);if(!(!i||!a(n,i))){n.points=i,e=!0;break}}if(e)break}if(!e)return}}e(kt,`collapseRedundantRectangularDoglegs`);function At(t,n){let{realNodeRects:r,labelNodeRects:i}=Ae(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=e((e,t)=>{let n=0;for(let r=0;r<a.length;r++){let i=Z(o(a[r],e,t));for(let s=r+1;s<a.length;s++){let r=Z(o(a[s],e,t));for(let e of i)for(let t of r)Ie(e.a,e.b,t.a,t.b,Y)&&n++}}return n},`strictCrossingCount`),c=e(e=>{let t=Z(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?U(t.a.x,t.b.x,r.left,r.right)>=X&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:U(t.a.y,t.b.y,r.top,r.bottom)>=X&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=e((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=Ve(G(r));return Z(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=e((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Z(t);if(l.length!==t.length-1)return!1;for(let e of l)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Z(o(t)))if(_e(e,n,.5)>=X)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}e(At,`liftObstacleHuggingSameSideRails`);function jt(t,n){let r=e(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=e(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s<c))return{node:e,rect:i}},`topLaneTitleFor`),a=e((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let e of t){if(e.isLayoutOnly)continue;let t=G(e.points??[]);for(let e of Z(t))for(let t of o)a(e,t.rect)&&(s=Math.max(s,t.rect.bottom-e.a.y+4))}if(!(s<=Y))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}e(jt,`liftTopLaneTitleBandsAboveRails`);function Mt(t,n){let r=e(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=e(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o<a))return{node:e,rect:t}},`leftLaneTitleFor`),a=e((e,t)=>{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+Y||n>=t.right-Y?!1:U(e.a.y,e.b.y,t.top,t.bottom)>=X},`verticalSegmentIntersectsTitle`),o=e((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let e of t){if(e.isLayoutOnly)continue;let t=G(e.points??[]);for(let e of Z(t))for(let t of s)if(a(e,t.rect))c=Math.max(c,t.rect.right-e.a.x+4);else if(o(e,t.rect)){let n=Math.min(e.a.x,e.b.x);c=Math.max(c,t.rect.right-n+4)}}if(!(c<=Y))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}e(Mt,`shiftLeftLaneTitleBandsLeftOfRails`);function Nt(t,n){let{realNodeRects:r}=Ae(n.values()),i=t.filter(e=>!e.isLayoutOnly),a=e((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),o=e((e=new Map)=>{let t=0;for(let n=0;n<i.length;n++){let r=Z(a(i[n],e));for(let o=n+1;o<i.length;o++){let n=Z(a(i[o],e));for(let e of r)for(let r of n)Ie(e.a,e.b,r.a,r.b,Y)&&t++}}return t},`crossingCount`),s=e((e=new Map)=>i.reduce((t,n)=>t+W(a(n,e)),0),`totalBends`),c=e(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!V(n,r,Y)&&!H(n,r,Y)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=e((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(V(r,i,Y))o={x:i.x,y:t.tailStart.y};else if(H(r,i,Y))o={x:t.tailStart.x,y:i.y};else return;let s=Ve(G([r,i,o,t.tailStart,t.terminal]));return Z(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=e((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Z(t))for(let t of Z(a(r,n)))if(_e(e,t,.5)>=X)return!0}return!1},`pathHasSharedTrack`),f=e((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=e(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a<t.length;a++)for(let u=a+1;u<t.length;u++){let d=t[a],p=t[u],m=c(d),h=c(p);if(!m||!h)continue;let g=l(d,h),_=l(p,m);if(!g||!_)continue;let v=new Map([[d,g],[p,_]]);if(!f(d,g,v)||!f(p,_,v))continue;let y=o(v),b=s(v);y>=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}e(Nt,`swapDestinationTerminalTailsToReduceCrossings`);function Pt(t,n){let{realNodeRects:r,labelNodeRects:i}=Ae(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),s=e((e=new Map)=>{let t=0;for(let n=0;n<a.length;n++){let r=Z(o(a[n],e));for(let i=n+1;i<a.length;i++){let n=Z(o(a[i],e));for(let e of r)for(let r of n)Ie(e.a,e.b,r.a,r.b,Y)&&t++}}return t},`strictCrossingCount`),c=e((e=new Map)=>a.reduce((t,n)=>t+W(o(n,e)),0),`totalBends`),l=e(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=e((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=i<a-Y?`left`:i>o+Y?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=i<a-Y?`top`:i>o+Y?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=e(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Z(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=e((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&U(e.min,e.max,t.min,t.max)>=X,`railsInteract`),p=e(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=e(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord)<Y)||t.push(n.coord);for(;t.length<e.length;){let n=Math.min(...t),r=Math.max(...t),i=e[0].side;t.push(i===`left`||i===`top`?n-12*(e.length-t.length):r+12*(e.length-t.length))}return t},`uniqueCoordsFor`),h=e(t=>{let n=t.map(e=>e.coord),r=m(t),i=[];if(t.length<=6){let a=Array(r.length).fill(!1),o=[],s=e(()=>{if(o.length===t.length){o.some((e,t)=>Math.abs(e-n[t])>=Y)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++){let r=[...n];[r[e],r[t]]=[r[t],r[e]],i.push(r)}return i},`coordinateAssignmentsFor`),g=e((e,t)=>{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=Ve(G(t));if(Z(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=e(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Z(n))if(q(t.a,t.b,r,e,-2)||q(t.a,t.b,i,[],-2))return!1}for(let t=0;t<a.length;t++){let n=a[t],r=e.has(n),i=Z(o(n,e));for(let n=t+1;n<a.length;n++){let t=a[n];if(!r&&!e.has(t))continue;let s=Z(o(t,e));for(let e of i)for(let t of s)if(_e(e,t,.5)>=X)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}e(Pt,`reassignCrossingExternalRailChannels`);function Ft(t,n){let{realNodeRects:r,labelNodeRects:i}=Ae(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=e(e=>Z(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=e((e,t)=>{let n=0;for(let r=0;r<a.length;r++){let i=Z(o(a[r],e,t));for(let s=r+1;s<a.length;s++){let r=Z(o(a[s],e,t));for(let e of i)for(let t of r)Ie(e.a,e.b,t.a,t.b,Y)&&n++}}return n},`strictCrossingCount`),l=e((e,t)=>{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&U(e.a.x,e.b.x,t.left,t.right)>=X}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&U(e.a.y,e.b.y,t.top,t.bottom)>=X}return!1},`segmentRunsAlongRectBorder`),u=e(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=e((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=V(n,r,Y)&&H(r,i,Y)&&V(i,a,Y),s=H(n,r,Y)&&V(r,i,Y)&&H(i,a,Y);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=z(n,a,Y)||B(n,a,Y)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>Ve(G(e))).filter(e=>{if(Z(e).length!==e.length-1||!e.some(e=>R(e,a,Y)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=e((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Z(t))if(q(e.a,e.b,r,s,-2)||q(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Z(t))for(let t of Z(o(n)))if(_e(e,t,.5)>=X)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=W(a,Y),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=W(h,Y),o=s(h);if(!(a<p||a===p&&o<m-Y)||!f(u,h,e))continue;let d=c(u,h);d>r||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}e(Ft,`shortcutRedundantOrthogonalJogs`);function It(t,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=t.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=e(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=e((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),f=e((e,t)=>{let n=0;for(let r of e)for(let e of t)Ie(r.a,r.b,e.a,e.b,Y)&&n++;return n},`crossingCountBetweenSegments`),p=e((e,t)=>f(Z(e),Z(t)),`crossingCountBetweenPaths`),m=e((t=new Map)=>{let n=0,r=[],i=new Set,a=[],o=e(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let e=0;e<c.length;e++){let i=c[e],a=d(i,t);for(let s=e+1;s<c.length;s++){let e=c[s],l=p(a,d(e,t));l>0&&(n+=l,r.push({first:i,second:e,count:l}),o(i),o(e))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=e((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e<c.length;e++){let r=c[e],a=n.has(r),o=d(r,t);for(let r=e+1;r<c.length;r++){let e=c[r];!a&&!n.has(e)||(i+=p(o,d(e,t)))}}return e.count-r+i},`crossingCountWithReplacements`),g=e(e=>{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=e(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=e(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=e((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=e(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=e(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=e((e=new Map)=>c.reduce((t,n)=>t+W(d(n,e)),0),`totalBends`),C=e((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=e((e,t,n=new Map)=>{let r=Z(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Z(d(t,n)))if(_e(e,r,.5)>=X)return!0}return!1},`pathHasSegmentConflict`),T=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=e((e,t)=>{let n=Ve(G(t));Z(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=e(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=e((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=e((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,Oe(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=e((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=e((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=e(e=>{let t=new Set;return e.map(e=>G(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=e((e,t,n,r)=>{let i=[],a=De(e,t,n,r,20,Y);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=Ee(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),re=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=Ee(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),P=e(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=G(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return H(o,s,Y)?N(c,o,s,r):V(o,s,Y)&&re(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),ie=e(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=Ee(r,e);for(let n of o)s.push(...ne(t,e,Ee(a,n),n))}return s.push(...P(e)),s},`candidatePathsFor`),ae=e(()=>new Map(c.map(e=>[e,Z(d(e))])),`currentSegmentsByEdge`),oe=e((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Z(d(i));t.some(e=>a.some(t=>_e(e,t,.5)>=X))&&r.add(i)}return r},`sharedTrackConflictsFor`),se=e((e,t,n,r)=>{let i=new Set;return ie(e).map(e=>Ve(G(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Z(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Z(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:W(i,Y),totalBends:W(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:oe(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ce=e((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Z(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),le=e((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ue=e((e,t)=>e.segments.some(e=>t.segments.some(t=>_e(e,t,.5)>=X)),`candidatesShareTrack`),de=e((e,t,n,r)=>le(t,n.edge)&&le(r,e.edge)&&!ue(t,r),`pairCandidatesAreCompatible`),fe=e((e,t,n,r,i)=>{let a=ce(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),pe=e((e,t)=>e.crossings<t.crossings||e.crossings===t.crossings&&(e.bends<t.bends||e.bends===t.bends&&e.length<t.length),`pairScoreIsBetter`),F=e((e,t,n,r)=>{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!de(t,r,n,a))continue;let o=fe(e,t,r,n,a);o&&pe(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),I=e(e=>{let t=S(),n=C(),r=ae(),i=b(e),a=new Map(c.map(e=>[e,W(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=se(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e<r.length;e++){let t=r[e];for(let i=e+1;i<r.length;i++){let e=r[i];!n.has(t.edge)&&!n.has(e.edge)||(u=F(f,t,e,u))}}}return u.replacements.size>0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=W(d(o),Y);for(let c of ie(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=W(c,Y);l||u||(d<t||d===t&&f<s)&&(d>i||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=I(e);if(!o)return;for(let[e,t]of o)e.points=t}}e(It,`resolveRenderedOrthogonalCrossings`);var Lt=.001,Rt=8;function zt(t,n){let{nodeInfoById:r,realNodeRects:i}=ke(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=e((e,t,n,r)=>{let i=[],a=De(e,t,n,r,20,Lt);return a&&i.push(a),t===r&&i.push(Oe(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=e((e,t)=>{for(let n=0;n<e.length-1;n++){let r=e[n],a=e[n+1];if(q(r,a,i,t,1))return!0}return!1},`pathHitsNode`),l=e((e,n,r=!1)=>{let i=0,a=ve(e,Lt),o=n.start,s=n.end;for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,c=e.end;if(!r&&o&&s&&(t===o||t===s||c===o||c===s))continue;let l=e.points;if(!(!l||l.length<2))for(let e of a)for(let t of ve(l,Lt)){if(Ne(e.a,e.b,t.a,t.b,Lt,Lt)){i++;continue}_e(e,t,Lt)>=Rt&&i++}}return i},`pathConflictCount`),u=e((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r<s&&(o=`bottom`,s=r),i<s&&(o=`left`,s=i),a<s&&(o=`right`,s=a),o},`nearestSideOfRect`),d=new Map,f=e((e,t,n)=>{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points??[];if(t.length<1)continue;let n=e.id??``,i=e.start,a=e.end;if(i){let e=r.get(i);e&&f(i,u(t[0],e),n)}if(a){let e=r.get(a);e&&f(a,u(t[t.length-1],e),n)}}let p=e((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=W(t,Lt);if(n<4)continue;let i=e.start,o=e.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=e.id??``,_=l(t,e,!0),v=l(t,e),y,b=_,x=n;for(let t of a){if(p(i,t,g))continue;let n=Ee(m,t);for(let r of a){if(p(o,r,g))continue;let a=Ee(h,r);for(let u of s(n,t,a,r)){if(c(u,[i,o]))continue;let t=W(u,Lt);if(_>0){let n=l(u,e,!0);if(n>b||n===b&&t>=x)continue;b=n,x=t,y=u;continue}l(u,e)>v||t<x&&(x=t,y=u)}}}if(y){e.points=y;let t=d.get(i);t&&d.set(i,t.filter(e=>e.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}e(zt,`simplifyDetouredEdges`);var Q=.001,Bt=10,Vt=7;function Ht(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)<Q)){if(Math.abs(s)<=Q){let e=i.x+Math.sign(o)*Bt;return{left:Math.min(i.x,e),right:Math.max(i.x,e),top:i.y-Vt,bottom:i.y+Vt}}if(Math.abs(o)<=Q){let e=i.y+Math.sign(s)*Bt;return{left:i.x-Vt,right:i.x+Vt,top:Math.min(i.y,e),bottom:Math.max(i.y,e)}}return{left:Math.min(i.x,a.x),right:Math.max(i.x,a.x),top:Math.min(i.y,a.y),bottom:Math.max(i.y,a.y)}}}e(Ht,`markerClearanceRectFor`);function Ut(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),top:Math.min(e.top,e.bottom),bottom:Math.max(e.top,e.bottom)}}e(Ut,`normalizeRect`);function Wt(e,t){let n=G(t);return[Ht(n,!0),Ht(n,!1)].some(t=>t&&Ce(e,Ut(t)))}e(Wt,`labelOverlapsOwnMarker`);function Gt(t,n){let r=[];for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!(!t||t.length<2))for(let n=0;n<t.length-1;n++)r.push({edgeId:e.id,p1:t[n],p2:t[n+1]})}let i=[],a=[];for(let e of n.values()){let t=e.isGroup,n=e.parentId;if(t&&!n){let t=K(e);t&&a.push({id:e.id,rect:t});continue}if(t||e.isEdgeLabel)continue;let r=K(e);r&&i.push({nodeId:e.id,rect:r})}let o=e((e,t)=>{let n=we(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&Ce(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=e((e,t)=>{let n=we(t,3);for(let t of r)if(t.edgeId!==e&&be(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=e((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=e(e=>{for(let{id:t,rect:n}of a)if(Se(n,e))return t},`findContainingLane`),d=e((e,t)=>l.some(n=>n.labelId!==e&&Ce(t,n.rect)),`overlapsPlacedLabel`);for(let r of t){if(r.isLayoutOnly)continue;let t=r.labelNodeId;if(!t)continue;let i=n.get(t);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e<f.length-1;e++){let t=f[e],n=f[e+1],r=Math.abs(t.x-n.x),i=Math.abs(t.y-n.y);r<Q&&i<Q||r>=Q&&i>=Q||h.push({idx:e,length:r+i,orientation:r>=Q?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx<h.length-1):h,_=g.length>0?g:h,v=p>=m?`horizontal`:`vertical`,y=e(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=e((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=e((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=e((e,t)=>e.midX>=t.left-Q&&e.midX<=t.right+Q&&e.midY>=t.top-Q&&e.midY<=t.bottom+Q,`pointInsideRectInclusive`),E=e(e=>{let t=Te(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=Te(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=e((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=e((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+Q<n)return!1}if(e===x){let r=f[e.idx+1];if(D(e,t,r)+Q<n)return!1}return!0},`labelClearsTerminalEndpoints`),k=e(e=>{let n=y(e);for(let e of n)for(let n of S){let i=C(e,n);if(!O(e,i))continue;let a=E(i);if(a&&!Wt(a.rect,f)&&!d(t,a.rect)&&!c(t,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=e((e,n,i=!1)=>{let a=y(e);for(let e of a){let a={midX:e.midX,midY:e.midY};if(n&&!O(e,a))continue;let c=E(a);if(c&&!Wt(c.rect,f)&&!d(t,c.rect)&&!o(t,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.length<h.length?k(h):void 0)??A(h,!0)??A(h,!1)??A(h,!1,!0);if(j){i.x=j.anchor.midX,i.y=j.anchor.midY,i.parentId=j.laneId;let e=Te(j.anchor.midX,j.anchor.midY,p,m),n=l.findIndex(e=>e.labelId===t);n>=0?l[n]={labelId:t,rect:e}:l.push({labelId:t,rect:e})}}}e(Gt,`anchorLabelsToPolyline`);var Kt=1e-6,qt=8/2,Jt=3;function Yt(e,t){return e<t?`${e}::${t}`:`${t}::${e}`}e(Yt,`pairKey`);function Xt(t,n){let{nodeInfoById:r,realNodeRects:i}=ke(n),a=new Map;for(let e of n){let t=e.id;if(!e.isGroup&&e.isEdgeLabel){a.set(t,{w:e.width??0,h:e.height??0});continue}}let o=e((n,r,i,o)=>{let s=Yt(r,i),c=0,l=e(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,r=e.end;!t||!r||Yt(t,r)===s&&l(e.labelNodeId)}return c>0?c+Jt:0},`labelClearanceFor`);for(let e of t){if(e.isLayoutOnly)continue;let n=e.points;if(!ye(n,Kt))continue;let a=Me(e,r,Kt);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(q(p,m,i,[s,c],1))continue;let h=o(e,s,c,d?`x`:`y`),g=h>qt?h:qt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!q(r,a,i,[s,c],1)&&!Fe(r,a,t,e,{epsilon:Kt})){e.points=[r,a];break}}}}e(Xt,`straightenCollinearSiblingDetours`);function Zt(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=Ae(n.values()),o=e((e,t)=>ve(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=e(()=>{let e=[];for(let n of t){if(n.isLayoutOnly)continue;let t=n.points;!t||t.length<2||e.push(...o(n,G(t)))}return e},`allSegments`),c=e((e,t)=>e.horizontal&&t.horizontal?U(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?U(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=e((e,n)=>{let s=e.start,l=e.end,u=o(e,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=e.labelNodeId?[e.labelNodeId]:[];for(let e of u)if(q(e.a,e.b,i,d,-2)||q(e.a,e.b,a,f,-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of u)for(let i of o(n,G(t)))if(c(e,i)||Ie(e.a,e.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=e((e,t)=>{let n=G(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=e((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=e(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=e((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return G([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=e((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return G([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=e((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;n<e.length&&!t;n++)for(let r=n+1;r<e.length&&!t;r++){let i=e[n],a=e[r];if(i.edge===a.edge||!c(i,a))continue;let o=[i,a].filter(e=>e.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}e(Zt,`nudgeSharedInteriorSubpaths`);function Qt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}e(Qt,`segmentsIntersect`);function $t(e){let n=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!n.length)return i;let a=je(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n<t.length-1;n++)if(be(t[n],t[n+1],e,-1)){i.push({type:`edge-node-overlap`,edgeId:c,targetId:e.nodeId,detail:`segment ${n} passes through node "${e.nodeId}"`});break}}for(let e=0;e<t.length-1;e++)o.push({edgeId:c,start:n,end:r,p1:t[e],p2:t[e+1]})}let s=new Set;for(let e=0;e<o.length;e++)for(let t=e+1;t<o.length;t++){let n=o[e],r=o[t];if(n.edgeId!==r.edgeId&&!(n.start===r.start||n.start===r.end||n.end===r.start||n.end===r.end)&&Qt(n.p1,n.p2,r.p1,r.p2)){let e=n.edgeId<r.edgeId?`${n.edgeId}|${r.edgeId}`:`${r.edgeId}|${n.edgeId}`;s.has(e)||(s.add(e),i.push({type:`edge-edge-crossing`,edgeId:n.edgeId,targetId:r.edgeId,detail:`edges "${n.edgeId}" and "${r.edgeId}" cross`}))}}if(i.length>0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;t.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${n} edge crossing(s)`);for(let e of i)t.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}e($t,`validateSwimlanesLayout`);function en(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!xt(t,n)||n===`BT`&&a.length>0&&!bt(t))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=Ve(Be(t)))}zt(i,r),Xt(i,r),Tt(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Gt(i,o),qe(i,o),Et(i,o),Zt(i,o),Ot(i,o),kt(i,o),At(i,o),Nt(i,o);let s=e(()=>{It(i,o),Pt(i,o),Ft(i,o),Gt(i,o),ft(i,o),At(i,o),Gt(i,o),ft(i,o)},`finalizeRenderedEdges`);s(),Zt(i,o),s(),jt(i,o),Mt(i,o),jt(i,o),Mt(i,o)}e(en,`postProcessSwimlaneLayout`);function tn(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}e(tn,`normalizeGraph`);function nn(e,t){return e.edges.filter(e=>e.dst===t)}e(nn,`incoming`);function rn(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}e(rn,`buildSuccessorMap`);function an(e){let t=rn(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}e(an,`buildSortedSuccessorMap`);function on(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}e(on,`buildInDegreeMap`);function sn(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}e(sn,`sortedZeroInDegreeNodes`);function cn(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}e(cn,`buildPredecessorSuccessorMaps`);function ln(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}e(ln,`buildLayersFromRanks`);function un(e){let t=on(e),n=sn(t),r=[],i=an(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e<n.length&&n[e]<r;)e++;n.splice(e,0,r)}}return r.length===e.nodes.length?r:null}e(un,`topoSortIfAcyclic`);function dn(e){let t=new Map,n=0;for(let r of e)t.set(r,n),n++;return t}e(dn,`buildLayerIndex`);function fn(t){let n=Array(t.length),r=e((e,i)=>{if(i-e<=1)return 0;let a=e+i>>1,o=r(e,a)+r(a,i),s=e,c=a,l=e;for(;s<a||c<i;)c>=i||s<a&&t[s]<=t[c]?n[l++]=t[s++]:(n[l++]=t[c++],o+=a-s);for(let r=e;r<i;r++)t[r]=n[r];return o},`count`);return r(0,t.length)}e(fn,`countInversions`);function pn(t){let n=tn(t),r=new Map;for(let e of n.nodes)r.set(e,[]);for(let e of n.edges)r.get(e.src).push(e);for(let e of r.values())e.sort((e,t)=>e.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=e(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}e(pn,`removeCycles_DFS`);function mn(t){let n=new Map,r=e(e=>{if(n.has(e))return n.get(e);let i=t.nodeById.get(e);if(!i)return n.set(e,null),null;let a=i.parentId;if(!a)return n.set(e,null),null;let o=r(a)??a;return n.set(e,o),o},`resolve`);for(let e of t.nodes)r(e);return n}e(mn,`buildTopLaneMap`);function hn(e){let t=mn(e);return e=>t.get(e)??null}e(hn,`createTopLaneResolver`);function gn(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}e(gn,`buildTopLaneOrder`);function _n(e,t){let n=gn(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}e(_n,`resolveTopLaneOrder`);var vn={EPSILON:1e-6},yn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},bn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function xn(t,n){let r=tn(t),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=cn(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=un(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=Sn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=Cn(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=wn(m),g=Tn(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=e(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}e(xn,`buildDrivingTree`);function Sn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}e(Sn,`chooseParent`);function Cn(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}e(Cn,`buildAdjacency`);function wn(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}e(wn,`assignComponents`);function Tn(t){let n=new Map,r=new Map,i=[],a=[],o=0,s=e((e,c)=>{n.set(e,++o),r.set(e,o);for(let l of t.get(e)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(e)??0)&&(i.push([e,l]),r.set(e,Math.min(r.get(e)??o,n.get(l)??o))):(i.push([e,l]),s(l,e),r.set(e,Math.min(r.get(e)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(e)??0)&&a.push(En(e,l,i,a.length))))},`visit`);for(let e of t.keys())n.has(e)||s(e,null);return a}e(Tn,`computeBlocks`);function En(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}e(En,`popBlock`);function Dn(t,n,r){let i=[...t.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e<o;e++)f[0][e]=s[e];for(let e=1;e<d;e++)for(let t=0;t<o;t++){let n=f[e-1][t];f[e][t]=n===-1?-1:f[e-1][n]}let p=e((e,t)=>{if(e===-1||t===-1)return-1;c[e]<c[t]&&([e,t]=[t,e]);let n=c[e]-c[t];for(let t=0;t<d;t++)if(n>>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let e of t.edges){let t=e.src,r=e.dst,i=n[t],o=n[r];if(i==null||o==null||(i>o&&([t,r]=[r,t],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(t),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e<o;e++)u.set(e,(u.get(e)??0)+1)}let h=new Map,g=e((e,t)=>{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=e(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}e(Dn,`computeSubtreeCrossCounts`);function On(t,n,r){let i=new Map,a=e(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(kn(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let e of t)a(e);return i}e(On,`annotateMinimumLayers`);function kn(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}e(kn,`compareByRankThenId`);function An(t,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=e(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let e of t)c(e);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}e(An,`emitNodesInTreeOrder`);function jn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}e(jn,`deduplicateLayers`);function Mn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}e(Mn,`createChildOrderer`);function Nn(e,t,n){let r=xn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=Dn(e,t,r),s=[...a].sort(kn(t)),c=Mn(i,t,o,On(s,i,t)),l=An(s,e.nodes,t,c);return l=jn(l),l}e(Nn,`buildMultitreeLayerOrder`);function Pn(e,t,n){let r=new Set(e),i=new Set(t),a=dn(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return fn(o)}e(Pn,`countCrossingsBetweenAdjacent`);function Fn(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t<c;t++)r.push({id:`${e.id}@${t}`,src:a,dst:o,ref:e.ref})}let i=0;for(let t=0;t+1<e.length;t++)i+=Pn(e[t],e[t+1],r);return i}e(Fn,`totalCrossings`);function In(e,t){let n={...t},{preds:r}=cn(e),i=hn(e),a=Fn(Nn(e,n,i),e.edges,n),o=yn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let t=0;t<o;t++){let t=!1,o=[...e.nodes].sort((e,t)=>(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=Fn(Nn(e,n,i),e.edges,n);u<a?(a=u,t=!0):n[s]=l}if(!t)break}return n}e(In,`optimizeRanksByCrossings`);function Ln(e,t){let n=hn(e),r=[...e.nodes].sort((e,n)=>(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}e(Ln,`adjustCrossLaneSources`);function Rn(e,t){let n=tn(e),r=un(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=hn(n),o=Object.create(null);for(let e of r){let r=nn(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r?!0:n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=In(n,o)),t?.ignoreCrossLaneEdges&&Ln(n,o),{layers:Nn(n,o,a),rankOf:o,dummy:new Set}}e(Rn,`assignLayers_LongestPath`);function zn(t,n){let r=tn(t),i={...Rn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=hn(r),{preds:o,succs:s}=cn(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=un(r)??[...r.nodes],l=[...c].reverse(),u=e((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=yn.GRAVITY_ITERATIONS,f=e(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=u(n,Math.round((a+c)/2));l!==i[n]&&(i[n]=l,t=!0)}return t},`relaxOrder`);for(let e=0;e<d;e++){let e=f(c),t=f(l);if(!e&&!t)break}for(let e of c){let t=0;for(let n of o.get(e)??[])t=Math.max(t,(i[n]??0)+1);(i[e]??0)<t&&(i[e]=t)}for(let e of l){let t=s.get(e)??[];if(t.length>0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:ln(r,c,i),rankOf:i,dummy:new Set}}e(zn,`assignLayers_Gravity`);function Bn(e){let t=on(e),n=an(e),r=sn(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}e(Bn,`topoSortByGenerationIfAcyclic`);function Vn(t,n){let r=tn(t),i=n?.direction===`LR`?Bn(r)??[...r.nodes].sort():un(r)??[...r.nodes].sort(),a=hn(r),o=e(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=e((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=nn(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:ln(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}e(Vn,`assignLayers_LaneAwareCompact`);function Hn(t,n){let r=tn(n),{rankOf:i}=t,a=t.layers.map(e=>[...e]),o=new Set(t.dummy?[...t.dummy]:[]),s=0,c=new Map(r.nodeById),l=e(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i<n;i++,a++){let t=l(i);d.push({id:`${e.id}#${a}`,src:r,dst:t,weight:e.weight,ref:e.ref}),r=t}let a=n-t-2;d.push({id:`${e.id}#${Math.max(a+1,0)}`,src:r,dst:e.dst,weight:e.weight,ref:e.ref})}let f={nodes:[...r.nodes,...[...o].filter(e=>!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}e(Hn,`makeProperLayering`);function Un(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}e(Un,`median`);function Wn(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}e(Wn,`barycenter`);function Gn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}e(Gn,`neighborPositionsFor`);function Kn(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}e(Kn,`currentOrderTieBreak`);function qn(e,t,n){let r=new Set(e),i=new Set(t),a=dn(e),o=dn(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),fn(s.map(e=>e.v))}e(qn,`countCrossingsBetweenAdjacent`);function Jn(e,t,n){return[...e].sort((e,r)=>{let i=Un(t.get(e)??[]),a=Un(t.get(r)??[]);return i===a?Kn(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}e(Jn,`sortByHeuristic`);function Yn(e,t,n,r,i,a){let o=dn(e),s=dn(t),c=Gn(t,o,n,r);if(!i||!a||a.length===0)return Jn(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=Jn(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=Jn(d,c,s);for(let t of e){let e=Wn(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(e<Wn(c.get(r)??[])){n=t;break}}u.splice(n,0,t)}}return u}e(Yn,`reorderLayer`);function Xn(t,n,r,i,a){let o=[...n],s=new Set(t),c=new Set(n),l=i?new Set(i):null,u=r.filter(e=>s.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=e(e=>{let n=qn(t,e,u);return d&&i&&(n+=qn(e,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1<o.length;e++){if(p&&p.get(o[e])!==p.get(o[e+1]))continue;let t=h;[o[e],o[e+1]]=[o[e+1],o[e]];let n=f(o);n<t?(h=n,m=!0):[o[e],o[e+1]]=[o[e+1],o[e]]}}return o}e(Xn,`transposeImprove`);function Zn(e,t,n){let r=e.layers.map(e=>[...e]),i=t.edges,a=hn(t),o=_n(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e<r.length;e++)r[e]=Yn(r[e-1],r[e],i,`down`,a,o),r[e]=Xn(r[e-1],r[e],i,r[e+1],a);for(let e=r.length-2;e>=0;e--)r[e]=Yn(r[e+1],r[e],i,`up`,a,o),r[e]=Xn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}e(Zn,`orderLayers`);function Qn(t,n,r){let i=r?.layerGap??bn.DEFAULT_LAYER_GAP,a=r?.nodeGap??bn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=t.layers,u=Object.create(null),d=Object.create(null),f=e(e=>n.nodeById.get(e),`getNode`),p=e(e=>f(e)?.width??0,`getWidth`),m=e(e=>f(e)?.height??0,`getHeight`),h=hn(n),g=_n(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1<l.length;e++){let t=l[e].reduce((e,t)=>Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;n<S.length;n++){let r=S[n],i=e[n]??0,a=t+i/2;w.set(r,a),t+=i,n<S.length-1&&(t+=o)}}let T=0;for(let[e,t]of l.entries()){let n=_[e]??0,r=new Map;for(let e of t){let t=h(e),n=r.get(t)??[];n.push(e),r.set(t,n)}for(let e of S){let t=r.get(e)??[];if(t.length===0)continue;let i=w.get(e);if(t.length===1){let e=t[0];u[e]=i,d[e]=T+n/2}else{let e=t.map(e=>p(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}e(Qn,`assignCoordinates`);var $n=8;function er(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}e(er,`hashString`);function tr(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}e(tr,`mulberry32`);function nr(e,t){let n=[...e],r=tr(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}e(nr,`deterministicShuffle`);function rr(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}e(rr,`sourceDistance`);function ir(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}e(ir,`laneArrangementCost`);function ar(e){let t=gn(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=hn(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}e(ar,`buildWeightedLaneEdges`);function or(e,t,n){let r=[...e],i=ir(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&o<s;){a=!1,o++;for(let e=0;e+1<r.length;e++){[r[e],r[e+1]]=[r[e+1],r[e]];let n=ir(r,t);n<i?(i=n,a=!0):[r[e],r[e+1]]=[r[e+1],r[e]]}}return{order:r,cost:i,sourceDistance:rr(r,n)}}e(or,`greedySwitch`);function sr(e,t){return e.cost===t.cost?e.sourceDistance<t.sourceDistance:e.cost<t.cost}e(sr,`isBetterCandidate`);function cr(e,t,n){let r=[...t].sort((e,t)=>e.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return er(`${e.join(`|`)}#${r}#${n}`)}e(cr,`seedForRestart`);function lr(e,t={}){let n=gn(e);if(n.length<2)return n;let r=ar(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=or(n,r,i),o=Math.max(0,t.restarts??$n);for(let e=0;e<o;e++){let t=or(nr(n,cr(n,r,e)),r,i);sr(t,a)&&(a=t)}return a.order}e(lr,`optimizeTopLaneOrder`);function ur(e,t){let n=t?.ignoreCrossLaneEdges??!0,r=t?.optimizeRanksByCrossings??!0,i=tn(e),a=t?.automaticLaneOrdering?lr(i,{restarts:$n}):void 0,o=pn(i),s=o.acyclic,{layering:c,graphWithDummies:l}=Hn(n?Vn(s,{compactSingleInput:t?.compactSingleInput??yn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:t?.direction}):zn(s,{compactSingleInput:t?.compactSingleInput??yn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:r}),s),u=Zn(c,l,{laneOrder:a}),d=Qn(u,l,{layerGap:t?.layerGap,nodeGap:t?.nodeGap,direction:t?.direction,laneOrder:a});return{acyclic:s,reversed:o.reversed,layering:c,ordered:u,coordinates:d}}e(ur,`sugiyamaLayout`);var $=vn.EPSILON,dr=8,fr=15,pr=15,mr=25,hr=20,gr=10;function _r(e,t,n){let r=e.x??0,i=e.y??0,a=t.x-r,o=t.y-i,s=Math.abs(a),c=Math.abs(o);return s<$&&c<$?n:c>$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}e(_r,`chooseOrthogonalSide`);function vr(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}e(vr,`sharedLineEndpointCoord`);function yr(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}e(yr,`pointOnLine`);function br(t,n){let r=t.nodes??[],i=t.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let t of u){let n={id:t.id},i=e(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(t)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=dr;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=e((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=e((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=e((e,t,n)=>p(e,_r(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=e((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coord<i||t.pipe.coord>o||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coord<i||t.pipe.coord>o||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=e((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minY<e.y&&c.maxY>e.y&&c.maxX>i&&c.minX<a:c.minX<e.x&&c.maxX>e.x&&c.maxY>o&&c.minY<s)},`isSegmentBlocked`),S=new Map,C=new Map;for(let e of a)!e.start||!e.end||e.start===e.end||(C.set(e.start,(C.get(e.start)??0)+1),C.set(e.end,(C.get(e.end)??0)+1));let w=e((e,t)=>_r(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=e((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t<e.length;t++){let n=e[t],r=D(n),i=k.get(A(n.srcId,n.srcSide))??0,a=k.get(A(n.srcId,r))??0;a>=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=e(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=e(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=e((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=e((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),re=e((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let t of b){let n=a[t];if(g[t]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=re(t,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+hr:s.y-hr:v.x=s.x>(r.x??0)?s.x+hr:s.x-hr,T?b.y=u.y>(i.y??0)?u.y+hr:u.y-hr:b.x=u.x>(i.x??0)?u.x+hr:u.x-hr;let E=e((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.x<n.maxX&&e.y>n.minY&&e.y<n.maxY)return{inside:!0,obstacle:n};return{inside:!1}},`isPointInObstacle`),D=e((e,t,n,r,i)=>{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+fr:r.minX-fr,y:i?r.maxY+pr:r.minY-pr,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+fr:r.minX-fr,y:o?r.maxY+pr:r.minY-pr,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+hr):Math.max(e.maxY+2,s.y-hr);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+hr):Math.max(e.maxX+2,s.x-hr);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let e=fr,r=Math.abs(v.x-b.x)<e,i=Math.abs(v.y-b.y)<e,a=te.get(`${t}:src`)!==void 0||te.get(`${t}:dst`)!==void 0,o=(S.get(`${n.start??``}:${p}:src`)?.length??0)+(S.get(`${n.start??``}:${p}:dst`)?.length??0),c=(S.get(`${n.end??``}:${m}:src`)?.length??0)+(S.get(`${n.end??``}:${m}:dst`)?.length??0),l=o>1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(t);let e=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${e}-${r.toFixed(0)}-${t}`,orientation:e,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:t,segmentIndex:0,orientation:e,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,P=Math.min(v.y,b.y)-50,ie=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minX<n&&e.maxX>t&&e.minY<i&&e.maxY>r&&(M=Math.min(M,e.minX-mr),N=Math.max(N,e.maxX+mr),P=Math.min(P,e.minY-mr),ie=Math.max(ie,e.maxY+mr))}for(let e of d){if(e.maxX<M||e.minX>N||e.maxY<P||e.minY>ie)continue;let t=fr;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=pr;f(`vertical`,e.minX-n,P,ie),f(`vertical`,e.maxX+n,P,ie)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let ae=c.filter(e=>e.orientation===`horizontal`&&e.coord>=P&&e.coord<=ie),oe=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),se=e((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),ce=se(v.x,v.y),le=se(b.x,b.y),ue=new Map,de=new Map,fe=new Map,pe=new Set,F=[];ue.set(ce,0),fe.set(ce,`n`),F.push({key:ce,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),pe.add(ce);let I=[],me=e((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),L={x:b.x,y:v.y},he=me(v,L),ge=me(L,b),R=he||ge,z={x:v.x,y:b.y},B=me(v,z),V=me(z,b);if(R?B||V||(I=Math.abs(v.x-b.x)<$?[v,b]:[v,z,b]):I=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,L,b],I.length===0)for(;F.length>0;){F.sort((e,t)=>e.f-t.f);let e=F.shift();if(pe.delete(e.key),e.key===le){let e=le,t=b;for(I=[t];de.has(e);){let n=de.get(e);I.unshift(n),t=n,e=se(n.x,n.y)}break}let r=e.pt.x,i=e.pt.y,a=oe.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=ae.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o<a.length-1&&l.push({x:a[o+1].coord,y:i}),c>0&&l.push({x:r,y:s[c-1].coord}),c>=0&&c<s.length-1&&l.push({x:r,y:s[c+1].coord});for(let a of l){let o=Math.min(r,a.x),s=Math.max(r,a.x),c=Math.min(i,a.y),l=Math.max(i,a.y);if(d.some(e=>e.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minX<r&&e.maxX>r&&e.maxY>c&&e.minY<l:e.minY<i&&e.maxY>i&&e.maxX>o&&e.minX<s))continue;let u=se(a.x,a.y),f=Math.abs(a.x-r)+Math.abs(a.y-i),p=y(t,e.pt,a),m=0,h=b.x-v.x,g=b.y-v.y,_=a.x-r,x=a.y-i;(g>10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=fe.get(e.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(ue.get(e.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(ue.get(u)??1/0))if(de.set(u,e.pt),ue.set(u,E),fe.set(u,w),!pe.has(u))F.push({key:u,f:E+D,pt:a}),pe.add(u);else{let e=F.findIndex(e=>e.key===u);e!==-1&&(F[e].f=E+D)}}}if(I.length===0&&(I=[v,{x:v.x,y:b.y},b]),I.length>4){let t=I[0],n=I[I.length-1],r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y);for(let e of I)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(t.x,n.x),c=r<Math.min(t.x,n.x);if(l){let e=pr;if(s){let r=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y),s=d.filter(e=>e.minX<r&&e.maxX>r&&e.minY<o&&e.maxY>a);if(s.length>0){let r=Math.max(t.x,n.x);for(let t of s){let n=(t.minX+t.maxX)/2;if(t.visualXHalfExtent===void 0||isNaN(t.visualXHalfExtent))continue;let i=n+t.visualXHalfExtent+e;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minX<Math.min(t.x,n.x)+e&&r.minY<Math.max(t.y,n.y)&&r.maxY>Math.min(t.y,n.y));if(i.length>0){let a=Math.min(t.x,n.x);for(let t of i){let n=(t.minX+t.maxX)/2-t.visualXHalfExtent-e;a=Math.min(a,n)}r=a}}}let u=e(e=>{let r=n.y>t.y,i=d.filter(e=>{let r=Math.min(t.x,n.x)<e.maxX&&Math.max(t.x,n.x)>e.minX,i=Math.min(t.y,n.y)<e.maxY&&Math.max(t.y,n.y)>e.minY;return r&&i}),a=i;if(l&&i.length>0){let t=i.filter(t=>t.minX<e&&t.maxX>e);t.length>0&&(a=t)}if(a.length===0)return n.y;let o=fr;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(e<n.y-$)return e}else{let e=Math.min(...a.map(e=>e.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=e(e=>{let r=u(e),i={x:e,y:t.y},a={x:e,y:r},o={x:n.x,y:r},s=me(t,i),c=me(i,a),l=me(a,o),d=r===n.y?!1:me(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[t,i,a,n]:[t,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(I=p)}let H=[s,...O,...I,...j.reverse(),u];if(H.length>=3){let e=H[H.length-1],t=H[H.length-2],n=H[H.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&H.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&H.splice(-2,1)}}let U=[H[0]];for(let e=1;e<H.length-1;e++){if(e===1){U.push(H[e]);continue}let t=U[U.length-1],n=H[e],r=H[e+1];if(Math.abs(t.y-n.y)<$&&Math.abs(n.y-r.y)<$){if(n.x>t.x!=r.x>n.x){U.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){U.push(n);continue}continue}U.push(n)}U.push(H[H.length-1]);for(let e=0;e<U.length-1;e++){let n=U[e],r=U[e+1],i=Math.abs(n.x-r.x)<$?`vertical`:`horizontal`,a=i===`vertical`?n.x:n.y,o=i===`vertical`?Math.min(n.y,r.y):Math.min(n.x,r.x),s=i===`vertical`?Math.max(n.y,r.y):Math.max(n.x,r.x),c=f(i,a,o,s),l={edgeIndex:t,segmentIndex:e,orientation:i,pipe:c,trackIndex:0,from:o,to:s};h.push(l),g[t].push(h.length-1),c.tracks[0]||(c.tracks[0]={index:0,coord:c.coord,segments:[]}),c.tracks[0].segments.push({edgeIndex:t,segmentIndex:e,from:o,to:s})}}let P=e((e,t)=>e.from<t.to&&t.from<e.to,`segmentsOverlap`),ie=e((e,t,n,r)=>{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&P(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&P(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),ae=e(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),oe=e((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),se=e((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&oe(n,t)}},`moveSegmentChainToTrack`),ce=e(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n<t.length-1&&r.push(h[t[n+1]]),r},`getAdjacentSegmentsAlongEdge`),le=e((e,t)=>{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coord<n.to&&n.pipe.coord>r.from&&n.pipe.coord<r.to},`haveAnyCrossing`),ue=e((e,t)=>{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&P(e,t)))return n.index;return-1},`findAvailableTrack`),de=e((e,t)=>{if(e.trackIndex===t.trackIndex)return P(e,t);let n=ce(e),r=ce(t);return n.some(e=>r.some(t=>le(e,t)))},`segmentsConflict`),fe=e((e,t,n)=>{if(ie(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ue(e.pipe,t);n(t,r===-1?ae(e.pipe):r)},`resolveTrackConflict`),pe=e(e=>{let t=0;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++){let i=e[n],a=e[r];i.pipe===a.pipe&&de(i,a)&&(t++,fe(i,a,se))}return t},`resolveHandleConflicts`),F=new Map,I=e(e=>{if(F.has(e))return F.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return F.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;e<t.length;e++){let i=h[t[e]];if(i.orientation===`horizontal`){let e=i.from,t=i.to;r=Math.abs(e-n)>Math.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return F.set(e,a),a},`getDestInfo`),me=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=e(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let e of n.values()){e.sort((e,t)=>{let n=I(e),i=I(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=e.map(e=>h[g[e][0]]);t+=pe(n)}return t},`fixSourceHandleCrossings`),L=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((t,n)=>{let r=e(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(t),a=r(n);return Math.abs(i-a)>.1?i-a:t-n});let n=r.map(e=>h[g[e][g[e].length-1]]);t+=pe(n)}return t},`fixTargetHandleCrossings`),he=e(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],a=n[r];de(i,a)&&(e++,fe(i,a,oe))}}return e},`fixPipeCrossings`),ge=0;for(;ge<10;){let e=0;if(e+=me(),e+=L(),e+=he(),e===0)break;ge++}let R=new Map;for(let t of c){let n=[];t.tracks.forEach(e=>{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;i<n.length;i++){let a=n[i];a.from<t?(e.push(a),t=Math.max(t,a.to)):(r.push(e),e=[a],t=a.to)}r.push(e)}for(let n of r){let r=new Set;n.forEach(e=>r.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=I(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=e((e,r)=>{n.filter(t=>t.trackIndex===e).forEach(e=>{let n=_.has(e.edgeIndex)?t.coord:r;R.set(`${e.edgeIndex}-${e.segmentIndex}`,n)})},`assignCoord`),l=0;for(let e of a)l++,c(e,t.coord-l*gr);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let e of s){if(u===0)c(e,t.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(e,t.coord+n*r*gr*.5)}u++}let d=0;for(let e of o)d++,c(e,t.coord+d*gr)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=re(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=R.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e<s.length;e++){let t=s[e],n=r[r.length-1],i=t.orient===`vertical`?n.y:n.x,a=t.orient===`vertical`?n.x:n.y,o=s[e+1],c=e<s.length-1;if(Math.abs(a-t.coord)>$&&r.push(yr(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:vr(t,o);r.push(yr(t,e),yr(o,e))}else (e===0||e===s.length-2)&&r.push(yr(t,vr(t,o)));else if(c)r.push(yr(t,o.coord));else{let e=Math.abs(t.from-i)<Math.abs(t.to-i)?t.to:t.from;r.push(yr(t,e))}}let c=r[r.length-1];(Math.abs(c.x-a.x)>$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e<r.length;e++){let t=r[e],n=l[l.length-1];(Math.abs(t.x-n.x)>$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}t.edges=(t.edges??[]).filter(e=>!e.isLayoutOnly);let z=e((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.x<o||e.x>s||e.y<c||e.y>l)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let e of t.edges){let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(t[0]=z(t[0],i)),a&&(t[t.length-1]=z(t[t.length-1],a))}return t}e(br,`routeEdgesOrthogonal`);function xr(e){return e.direction??`TB`}e(xr,`getSwimlaneDirection`);function Sr(e){let t=pe(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=xr(e),{ordered:c,coordinates:l}=ur(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});F(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;br(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return en(e,s),$t(e),s}e(Sr,`runSwimlaneLayoutCore`);async function Cr(e,t){let n=t.select(`g`);m(n,e.markers,e.type,e.diagramId),f(),y(),p(),c(),fe(e);let r=me(e);e.nodes=r.nodes,e.edges=r.edges;let{groups:i}=await b(n,e);Sr(e),await ae(e,i)}e(Cr,`render`);export{Cr as render};
|
|
2
|
+
//# sourceMappingURL=swimlanes-5IMT3BWC-nSsjdSnj.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import"./chunk-WYO6CB5R-DN1R0VLx.mjs";import"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import"./chunk-ZIRB5QZD-K23GvNu-.mjs";import{r as t,t as n}from"./chunk-PUDLZKDR-CIWYIjrF.mjs";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
+
.swimlane.cluster rect {
|
|
3
|
+
stroke: ${e.clusterBorder} !important;
|
|
4
|
+
}
|
|
5
|
+
[data-look="neo"].cluster rect {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
`,`getStyles`)});export{r as diagram};
|
|
9
|
+
//# sourceMappingURL=swimlanesDiagram-G3AALYLV-CdQlHesp.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-BBwE27jK.mjs";async function e(e,t){if(e.length>0&&e[0]!==`-`){let n=t.fs.resolvePath(t.cwd,e[0]);try{let e=(await t.fs.readFile(n)).split(`
|
|
2
|
+
`);e[e.length-1]===``&&e.pop();let r=e.reverse();return{stdout:r.length>0?`${r.join(`
|
|
3
|
+
`)}
|
|
4
|
+
`:``,stderr:``,exitCode:0}}catch{return{stdout:``,stderr:`tac: ${e[0]}: No such file or directory
|
|
5
|
+
`,exitCode:1}}}let n=t.stdin.split(`
|
|
6
|
+
`);n[n.length-1]===``&&n.pop();let r=n.reverse();return{stdout:r.length>0?`${r.join(`
|
|
7
|
+
`)}
|
|
8
|
+
`:``,stderr:``,exitCode:0}}var t={name:`tac`,execute:e};export{t as tac};
|
|
9
|
+
//# sourceMappingURL=tac-SJGXQ4T2-BL4Xd7y6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-MHTUABJP-CrR3MfDw.mjs";export{e as tac};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-BBwE27jK.mjs";import{r as e,t}from"./chunk-74CEPOFO-BYrCYxKO.mjs";import{i as n,n as r,r as i}from"./chunk-HDQ56CKY-Pa-7c4rC.mjs";var a={name:`tail`,summary:`output the last part of files`,usage:`tail [OPTION]... [FILE]...`,options:[`-c, --bytes=NUM print the last NUM bytes`,`-n, --lines=NUM print the last NUM lines (default 10)`,`-n +NUM print starting from line NUM`,`-q, --quiet never print headers giving file names`,`-v, --verbose always print headers giving file names`,` --help display this help and exit`]},o={name:`tail`,async execute(o,s){if(t(o))return e(a);let c=r(o,`tail`);if(!c.ok)return c.error;let{lines:l,bytes:u,fromLine:d}=c.options;return i(s,c.options,`tail`,e=>n(e,l,u,d??!1))}};export{o as tailCommand};
|
|
2
|
+
//# sourceMappingURL=tail-S5ULNTJU-Cfa1pDQZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-DCAAORBQ-BDLVpBG2.mjs";export{e as tailCommand};
|