@inkeep/open-knowledge 0.12.0-beta.8 → 0.12.0

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.
Files changed (461) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +35 -0
  2. package/dist/_baseFor-m0TxKeb9.mjs +2 -0
  3. package/dist/alias-JE7RI5QX-DmHh8yog.mjs +1 -0
  4. package/dist/arc-Doj9VrmJ.mjs +2 -0
  5. package/dist/architecture-YZFGNWBL-YPACCZ88.mjs +1 -0
  6. package/dist/architectureDiagram-Q4EWVU46-C9cSuC8m.mjs +37 -0
  7. package/dist/array-1jkOhClC.mjs +2 -0
  8. package/dist/assets/skills/discovery/SKILL.md +1 -1
  9. package/dist/assets/skills/project/SKILL.md +6 -4
  10. package/dist/awk2-POPGKRAI-C7696e-z.mjs +1 -0
  11. package/dist/{banner-BeneQTB4.mjs → banner-BxCFCyu8.mjs} +2 -2
  12. package/dist/base64-4YMZCVJ5-BIHNwDj2.mjs +1 -0
  13. package/dist/basename-AA2KJYZQ-Dcz4Ls85.mjs +1 -0
  14. package/dist/bash-IJWYRKFO-DgruzS3i.mjs +1 -0
  15. package/dist/blockDiagram-DXYQGD6D-Dr7L7QsL.mjs +133 -0
  16. package/dist/build-CCDQyip-.mjs +1 -0
  17. package/dist/{build-CJEQ0nGy.mjs → build-DCHzh6iE.mjs} +1 -1
  18. package/dist/c4Diagram-AHTNJAMY-CPm6kKNR.mjs +11 -0
  19. package/dist/cat-RDUMLXKC-BJJIS9lB.mjs +1 -0
  20. package/dist/channel-DE79NHCf.mjs +2 -0
  21. package/dist/chmod-SYMGL4JA-C1Ie7s0s.mjs +1 -0
  22. package/dist/{chokidar-BDjANGpQ.mjs → chokidar-Bu9Rdqzq.mjs} +1 -1
  23. package/dist/{chunk-24IMIIXA-C-Zyd2K_.mjs → chunk-24IMIIXA-DaS5XS55.mjs} +2 -2
  24. package/dist/chunk-2KRD3SAO-BXl7sX-7.mjs +2 -0
  25. package/dist/chunk-336JU56O-KTMEs5Wk.mjs +2 -0
  26. package/dist/{chunk-3THT3N7L-Ce6LrnIA.mjs → chunk-3THT3N7L-B1WzJUh4.mjs} +1 -1
  27. package/dist/{chunk-3ZUFRYJ4-C93H8j0V.mjs → chunk-3ZUFRYJ4-Bv1jGN68.mjs} +1 -1
  28. package/dist/chunk-426QAEUC-DUpKwtVu.mjs +2 -0
  29. package/dist/{chunk-44UOCSGV-uErOrz7G.mjs → chunk-44UOCSGV-BZ6LfyW2.mjs} +1 -1
  30. package/dist/chunk-4BX2VUAB-DM-mXRDw.mjs +2 -0
  31. package/dist/{chunk-4GTNDTRF-_OVmXcJ-.mjs → chunk-4GTNDTRF-DLnFbNSw.mjs} +2 -2
  32. package/dist/{chunk-4HHKTUW3-Dm69hDaZ.mjs → chunk-4HHKTUW3-Ct4ue15f.mjs} +1 -1
  33. package/dist/{chunk-4Q4SM6WR-DDQRsilN.mjs → chunk-4Q4SM6WR-CAvCnPq5.mjs} +2 -2
  34. package/dist/chunk-4TB4RGXK-Ct6WjPoY.mjs +207 -0
  35. package/dist/chunk-55IACEB6-Cmyc0XwJ.mjs +2 -0
  36. package/dist/{chunk-55VFSPNA-DVZfQAzN.mjs → chunk-55VFSPNA-RFvY6zq0.mjs} +2 -2
  37. package/dist/chunk-5FUZZQ4R-Bf6nbyQG.mjs +63 -0
  38. package/dist/chunk-5PVQY5BW-DUXm3tDu.mjs +3 -0
  39. package/dist/{chunk-5QMZ5MUS-BfIuRNkK.mjs → chunk-5QMZ5MUS-BwpNU33k.mjs} +2 -2
  40. package/dist/{chunk-5QVNJEHU-BvsipSFW.mjs → chunk-5QVNJEHU-BV0xuiYW.mjs} +2 -2
  41. package/dist/{chunk-5V6VZH6T-BCr5_GDF.mjs → chunk-5V6VZH6T-ByuVaPWr.mjs} +2 -2
  42. package/dist/{chunk-62RKD26F-CvuML91F.mjs → chunk-62RKD26F-DebCAz0V.mjs} +2 -2
  43. package/dist/{chunk-64BAICW3-CTJNEx4Q.mjs → chunk-64BAICW3-BlirlXmE.mjs} +2 -2
  44. package/dist/chunk-67CJDMHE-C58W8DAL.mjs +2 -0
  45. package/dist/{chunk-74CEPOFO-D1bzz49u.mjs → chunk-74CEPOFO-V0JXh91S.mjs} +1 -1
  46. package/dist/{chunk-7L36YK2X-RiPZFKaV.mjs → chunk-7L36YK2X-B3QRwLbB.mjs} +1 -1
  47. package/dist/chunk-7N4EOEYR-DzEIb3Sc.mjs +2 -0
  48. package/dist/{chunk-7TSDKFEO-a-GUGBTu.mjs → chunk-7TSDKFEO-CMVuiOdP.mjs} +1 -1
  49. package/dist/{chunk-A4HU7SVR-hefV_YmW.mjs → chunk-A4HU7SVR-Bjuqsbev.mjs} +1 -1
  50. package/dist/{chunk-A4JSPFCI-k-tJSZgB.mjs → chunk-A4JSPFCI-CQJoYugB.mjs} +2 -2
  51. package/dist/{chunk-A5O5YHGN-C6ngIqYR.mjs → chunk-A5O5YHGN-DApqA6Ow.mjs} +2 -2
  52. package/dist/{chunk-A65PWWJC-D7J5l9eq.mjs → chunk-A65PWWJC-GGt9898w.mjs} +2 -2
  53. package/dist/{chunk-A7A2DBEE-PLfkXLI4.mjs → chunk-A7A2DBEE-BqvlRSRw.mjs} +1 -1
  54. package/dist/{chunk-A7ICOL4V-Drb3XsEL.mjs → chunk-A7ICOL4V-D5TsVU6v.mjs} +2 -2
  55. package/dist/chunk-AA7GKIK3-DKgpQZxa.mjs +2 -0
  56. package/dist/{chunk-ALLTKNUZ-BMiTDN50.mjs → chunk-ALLTKNUZ-4H3OLfNN.mjs} +2 -2
  57. package/dist/{chunk-APT7OOP2-CXHnSuct.mjs → chunk-APT7OOP2-DnIeUlVe.mjs} +2 -2
  58. package/dist/{chunk-BBXLRYSX-Oks1GMhO.mjs → chunk-BBXLRYSX-XWD4jM9A.mjs} +2 -2
  59. package/dist/{chunk-BRGMQKJV-CHO764qS.mjs → chunk-BRGMQKJV-CHbk2NqS.mjs} +3 -3
  60. package/dist/chunk-BSJP7CBP-BG3yJGkJ.mjs +2 -0
  61. package/dist/{chunk-FK9Q3tQk.mjs → chunk-C94x7I9S.mjs} +1 -1
  62. package/dist/chunk-CIAEETIT-CH33zQ9L.mjs +2 -0
  63. package/dist/{chunk-CR5AFCPT-CH8ZGz3B.mjs → chunk-CR5AFCPT-DN7EAdus.mjs} +2 -2
  64. package/dist/{chunk-CWQS3NFK-BP3kiNgH.mjs → chunk-CWQS3NFK-BkE4vqrf.mjs} +1 -1
  65. package/dist/{chunk-D4J545R4-C8nMOauR.mjs → chunk-D4J545R4-KlK3EOFl.mjs} +2 -2
  66. package/dist/{chunk-D6CWQ5DW-BgQGt8eQ.mjs → chunk-D6CWQ5DW-CF9bBHyK.mjs} +2 -2
  67. package/dist/{chunk-D7MEQ3VN-Csvth_Ss.mjs → chunk-D7MEQ3VN-BM_kIbvf.mjs} +2 -2
  68. package/dist/{chunk-DCAAORBQ-BdrR5ttw.mjs → chunk-DCAAORBQ-BUMlCZ4-.mjs} +2 -2
  69. package/dist/{chunk-DXB73IDG-C2RuFAAY.mjs → chunk-DXB73IDG-F_tmy-Lz.mjs} +2 -2
  70. package/dist/chunk-EDXVE4YY-CI4s3JHP.mjs +2 -0
  71. package/dist/{chunk-EEXR5ZDP-C5AJH114.mjs → chunk-EEXR5ZDP-CvpAxUxM.mjs} +1 -1
  72. package/dist/{chunk-EIZGF4BS-8bsVXqW0.mjs → chunk-EIZGF4BS-C8wRSfCC.mjs} +2 -2
  73. package/dist/chunk-ENJZ2VHE-CQwjtY5A.mjs +11 -0
  74. package/dist/{chunk-F23WWYKW-DST0dB7V.mjs → chunk-F23WWYKW-DLeNVzzD.mjs} +2 -2
  75. package/dist/{chunk-F55TLFGB-Bkfd8ak_.mjs → chunk-F55TLFGB-BZSRX-Vi.mjs} +2 -2
  76. package/dist/{chunk-FEIOJCZD-DmvuPNqm.mjs → chunk-FEIOJCZD-NzTooVTc.mjs} +2 -2
  77. package/dist/chunk-FMBD7UC4-CAloFUY3.mjs +16 -0
  78. package/dist/chunk-FOC6F5B3-Cv5O0Fxp.mjs +2 -0
  79. package/dist/{chunk-GCTKCWKD-Deqi1D_N.mjs → chunk-GCTKCWKD-D3J1Ev9z.mjs} +1 -1
  80. package/dist/{chunk-GFQRA5P5-ePq2jelx.mjs → chunk-GFQRA5P5-DbAN9IDm.mjs} +1 -1
  81. package/dist/{chunk-GOV5EKKI-CyL1eJ32.mjs → chunk-GOV5EKKI-CDGzZWfT.mjs} +2 -2
  82. package/dist/{chunk-GXVXFKBA-993FoPmq.mjs → chunk-GXVXFKBA-D0BDCtkE.mjs} +2 -2
  83. package/dist/{chunk-HDQ56CKY-pGV4pOJA.mjs → chunk-HDQ56CKY-DZc2LbWr.mjs} +2 -2
  84. package/dist/{chunk-HJQJAYMS-Ci3vsKQW.mjs → chunk-HJQJAYMS-BS_JF11O.mjs} +1 -1
  85. package/dist/{chunk-HJWBQKYG-UZig4wUt.mjs → chunk-HJWBQKYG-DknkBuxy.mjs} +2 -2
  86. package/dist/{chunk-HWBSOZZR-BeVrNfQw.mjs → chunk-HWBSOZZR-5PJ_z6D6.mjs} +2 -2
  87. package/dist/{chunk-HWKDQ44K-CPSjqtR_.mjs → chunk-HWKDQ44K-BJxdK4fT.mjs} +2 -2
  88. package/dist/{chunk-I57KEIP3-5RFY25TO.mjs → chunk-I57KEIP3-DSoF8c_0.mjs} +2 -2
  89. package/dist/chunk-ICPOFSXX-C--tVIY5.mjs +123 -0
  90. package/dist/{chunk-IPJHKYVM-D6H6ZTtk.mjs → chunk-IPJHKYVM-CUKythEA.mjs} +1 -1
  91. package/dist/{chunk-J642UCRS-D87gHOLP.mjs → chunk-J642UCRS-HjD8qpZD.mjs} +2 -2
  92. package/dist/{chunk-JVPRLUMK-DnQCNjpq.mjs → chunk-JVPRLUMK-D6CRdXSO.mjs} +2 -2
  93. package/dist/chunk-K5T4RW27-BPgPjo39.mjs +98 -0
  94. package/dist/chunk-KGLVRYIC-CmkADDeV.mjs +2 -0
  95. package/dist/{chunk-KMEYNNUA-DfdK88O_.mjs → chunk-KMEYNNUA-Qk0eg7gN.mjs} +2 -2
  96. package/dist/chunk-LIHQZDEY-Fy8O-IVI.mjs +2 -0
  97. package/dist/{chunk-LL3S3NLB-DxXgE3kY.mjs → chunk-LL3S3NLB-CH16p_-s.mjs} +2 -2
  98. package/dist/{chunk-LPQPILI2-DyyhWSR7.mjs → chunk-LPQPILI2-OoVL_l9j.mjs} +2 -2
  99. package/dist/{chunk-LTZRCH7N-GAjTFNwG.mjs → chunk-LTZRCH7N-BfgCUlp9.mjs} +2 -2
  100. package/dist/{chunk-LWEGUNWT-BALY4RLC.mjs → chunk-LWEGUNWT-DhbhFY11.mjs} +2 -2
  101. package/dist/{chunk-MDDMCKUK-poQ25EjI.mjs → chunk-MDDMCKUK-ChL1CU4m.mjs} +2 -2
  102. package/dist/{chunk-MDLLFABN-oBQf6bGE.mjs → chunk-MDLLFABN-UsHGHHoh.mjs} +2 -2
  103. package/dist/{chunk-MHTUABJP-dKmK6Hw7.mjs → chunk-MHTUABJP-Dk5ocjFo.mjs} +1 -1
  104. package/dist/{chunk-MIZPJHVH-BdoPqh_Y.mjs → chunk-MIZPJHVH-BD7tHmLL.mjs} +2 -2
  105. package/dist/{chunk-MLXIYONF-DwewZM3r.mjs → chunk-MLXIYONF-CV7WHBm-.mjs} +2 -2
  106. package/dist/{chunk-MYE6AGBJ-B4pRo9ma.mjs → chunk-MYE6AGBJ-DwzjGrc0.mjs} +2 -2
  107. package/dist/{chunk-NAERJDUW-BFcmkHme.mjs → chunk-NAERJDUW-Cyg2DAzO.mjs} +2 -2
  108. package/dist/{chunk-NCNPKYJZ-BFGan4lR.mjs → chunk-NCNPKYJZ-Ct0_l0YT.mjs} +2 -2
  109. package/dist/{chunk-NUYSJFDK-DAvAseHr.mjs → chunk-NUYSJFDK-BH2DjyxF.mjs} +2 -2
  110. package/dist/{chunk-NYQYO467-_2947cgi.mjs → chunk-NYQYO467-CY88QCuT.mjs} +2 -2
  111. package/dist/{chunk-OARHFVLG-vxL5zuWx.mjs → chunk-OARHFVLG-dXiYYC4o.mjs} +2 -2
  112. package/dist/{chunk-OCLXQMOG-C7k2qEN6.mjs → chunk-OCLXQMOG-DOkdFgyf.mjs} +2 -2
  113. package/dist/{chunk-OCS6LSEM-Lh1p0H-V.mjs → chunk-OCS6LSEM-Bcx6uxmm.mjs} +2 -2
  114. package/dist/{chunk-OJDRYQWQ-DWhg7YHU.mjs → chunk-OJDRYQWQ-CmrD0Dg2.mjs} +1 -1
  115. package/dist/{chunk-OL3S66CO-B3hSNlNP.mjs → chunk-OL3S66CO-CWEDi2F_.mjs} +2 -2
  116. package/dist/chunk-ORNJ4GCN-R_gUIosC.mjs +2 -0
  117. package/dist/chunk-OYMX7WX6-Dvg98Zb-.mjs +232 -0
  118. package/dist/{chunk-PBXLG62G-MmAqjdXR.mjs → chunk-PBXLG62G-CpvczNyQ.mjs} +2 -2
  119. package/dist/{chunk-PP6PSHAB-DMC_XCfO.mjs → chunk-PP6PSHAB-DQ3LPONR.mjs} +1 -1
  120. package/dist/{chunk-PYSFUGCK-CY7pclEB.mjs → chunk-PYSFUGCK-B_Gv8rUn.mjs} +2 -2
  121. package/dist/{chunk-QCDB2VPH-D1RuXtOm.mjs → chunk-QCDB2VPH-Bays5mAr.mjs} +2 -2
  122. package/dist/{chunk-QJ7O6ZN3-BH67tCjg.mjs → chunk-QJ7O6ZN3-BCF2wp2J.mjs} +2 -2
  123. package/dist/chunk-QZHKN3VN-D0OJ2eQ1.mjs +2 -0
  124. package/dist/{chunk-R6QSAL5T-CtbJTvt9.mjs → chunk-R6QSAL5T-RaNW7MSS.mjs} +1 -1
  125. package/dist/{chunk-R6VWJ2ZL-D1Ufj9fh.mjs → chunk-R6VWJ2ZL-BVeTwIsz.mjs} +1 -1
  126. package/dist/{chunk-RPNGRAAP-BughPjdR.mjs → chunk-RPNGRAAP-yHFoBjjv.mjs} +2 -2
  127. package/dist/{chunk-SDNKECQQ-C3GEf3VZ.mjs → chunk-SDNKECQQ-BsAYzqU5.mjs} +2 -2
  128. package/dist/{chunk-SYMJJMQ4-DLPoQaug.mjs → chunk-SYMJJMQ4-jdmKoBFb.mjs} +2 -2
  129. package/dist/{chunk-T56QNPHK-TppyesRp.mjs → chunk-T56QNPHK-DmDxJbbD.mjs} +2 -2
  130. package/dist/{chunk-TLSUDHID-B2VV2ufQ.mjs → chunk-TLSUDHID-CSDR438C.mjs} +2 -2
  131. package/dist/{chunk-TOMNU26N-DfLjxpHW.mjs → chunk-TOMNU26N-CrDa7MpH.mjs} +2 -2
  132. package/dist/{chunk-TXBZCHCQ-l48TczF5.mjs → chunk-TXBZCHCQ-BxbbtyNr.mjs} +2 -2
  133. package/dist/chunk-U2HBQHQK-C1Q2DiEX.mjs +71 -0
  134. package/dist/{chunk-UNYNJIFU--HT-3lrq.mjs → chunk-UNYNJIFU-CZ2Mla0s.mjs} +3 -3
  135. package/dist/{chunk-V7TAPXDL-CnKUp2df.mjs → chunk-V7TAPXDL-CKif4_mH.mjs} +2 -2
  136. package/dist/{chunk-VJFXDYWH-IiUXkKX0.mjs → chunk-VJFXDYWH-CWlZv59U.mjs} +2 -2
  137. package/dist/{chunk-VLGZJRPG-DbWYxLfI.mjs → chunk-VLGZJRPG-DpYP_EVp.mjs} +2 -2
  138. package/dist/{chunk-VOBGTVA6-BT7gUxqf.mjs → chunk-VOBGTVA6-D6fSjWnx.mjs} +2 -2
  139. package/dist/{chunk-VYOJP4TV-BvibOnKG.mjs → chunk-VYOJP4TV-DN1CSkP5.mjs} +2 -2
  140. package/dist/{chunk-WKFATFPP-DCZdrA8x.mjs → chunk-WKFATFPP-CoPg2OGf.mjs} +2 -2
  141. package/dist/{chunk-X2AJGDEF-BaH6i1Rq.mjs → chunk-X2AJGDEF-ClcErtij.mjs} +1 -1
  142. package/dist/chunk-X2U36JSP-BiF0R9ys.mjs +2 -0
  143. package/dist/{chunk-XHM67O4N-BWGDFyz_.mjs → chunk-XHM67O4N-C_wCK9HT.mjs} +1 -1
  144. package/dist/{chunk-XKQRETAK-cVWA9gEB.mjs → chunk-XKQRETAK-BC2HZ_y9.mjs} +2 -2
  145. package/dist/{chunk-XORM457F-D-QrjagQ.mjs → chunk-XORM457F-BuPOSqOe.mjs} +2 -2
  146. package/dist/chunk-XPW4576I-BkucPPwf.mjs +39 -0
  147. package/dist/{chunk-XVDPCNWR-CtK-Xs2O.mjs → chunk-XVDPCNWR-CkzIJQaO.mjs} +2 -2
  148. package/dist/{chunk-YCFVLTST-CFJxSbsH.mjs → chunk-YCFVLTST-DsF45PbT.mjs} +2 -2
  149. package/dist/{chunk-YFG2CMIF-DkT4NiqV.mjs → chunk-YFG2CMIF-DjdwxBNc.mjs} +2 -2
  150. package/dist/{chunk-YNYSPYQ5-iQGTFdx0.mjs → chunk-YNYSPYQ5-gU4-j5DO.mjs} +1 -1
  151. package/dist/{chunk-YS3AZT3J-w6Dw8reo.mjs → chunk-YS3AZT3J-CB0wWPLc.mjs} +2 -2
  152. package/dist/{chunk-YTNYSM6T-Cz_dxkBy.mjs → chunk-YTNYSM6T-DpkSVTln.mjs} +2 -2
  153. package/dist/chunk-YZCP3GAM-DRdMIQsB.mjs +2 -0
  154. package/dist/{chunk-Z6LRHWXI-BcgkPhhu.mjs → chunk-Z6LRHWXI-EsbeaQ3V.mjs} +2 -2
  155. package/dist/{chunk-Z7JVV2SM-BzR-yvwK.mjs → chunk-Z7JVV2SM-BtFBVQEW.mjs} +2 -2
  156. package/dist/chunk-ZZ45TVLE-DwKS4e_N.mjs +2 -0
  157. package/dist/classDiagram-6PBFFD2Q-BrpY9pLd.mjs +2 -0
  158. package/dist/classDiagram-v2-HSJHXN6E-DDV6mz7Y.mjs +2 -0
  159. package/dist/clear-5CZ5X4YR-CHSnzs8i.mjs +1 -0
  160. package/dist/cli.mjs +53 -52
  161. package/dist/clone-BD_JFVST.mjs +2 -0
  162. package/dist/{colors-BtKMHmBX.mjs → colors-8SzMRIVy.mjs} +2 -2
  163. package/dist/colors-CkPULM8m.mjs +1 -0
  164. package/dist/column-WLPMMSTS-DTBoovzp.mjs +1 -0
  165. package/dist/comm-5SLSESQG-DT3SY7zS.mjs +1 -0
  166. package/dist/constants-iOPbvTyC.mjs +2 -0
  167. package/dist/cose-bilkent-S5V4N54A-E5vxHQ63.mjs +2 -0
  168. package/dist/cp-XOYR4ABJ-Bs6Rpbb2.mjs +1 -0
  169. package/dist/{curl-47BFPSFW-CdMFK7aW.mjs → curl-47BFPSFW-xgS5bDTx.mjs} +2 -2
  170. package/dist/cut-OPC3VAGB-Bm1HBn07.mjs +1 -0
  171. package/dist/cytoscape.esm-BNCKY88j.mjs +332 -0
  172. package/dist/dagre-KV5264BT-Ci7CcQr4.mjs +5 -0
  173. package/dist/dagre-L3rg9n9q.mjs +2 -0
  174. package/dist/date-DD7FVA2V-Dv3os04S.mjs +1 -0
  175. package/dist/defaultLocale-BljHASC9.mjs +2 -0
  176. package/dist/diagram-5BDNPKRD-BM3C88Zx.mjs +11 -0
  177. package/dist/diagram-G4DWMVQ6-Dt1Kt-mj.mjs +25 -0
  178. package/dist/diagram-MMDJMWI5-DomPsk0L.mjs +44 -0
  179. package/dist/diagram-TYMM5635-eOfCqwhs.mjs +25 -0
  180. package/dist/diff-HJF2MPDN-Di-oK2tx.mjs +1 -0
  181. package/dist/dirname-LEMTZZFS-D-u8wJ0b.mjs +1 -0
  182. package/dist/{dist-BtrtJyLX.mjs → dist-D7myPw4s.mjs} +51 -51
  183. package/dist/dist-DZb_HoiN.mjs +2 -0
  184. package/dist/dist-GL5zcXSU.mjs +1 -0
  185. package/dist/dist-bundle-BnlRWriT.mjs +1 -0
  186. package/dist/{dist-bundle-B3l-HkEL.mjs → dist-bundle-D75dREX-.mjs} +2 -2
  187. package/dist/du-WO2ENHXQ-CO_jR0w6.mjs +1 -0
  188. package/dist/echo-O45JWWI2-RBT2dq5Y.mjs +1 -0
  189. package/dist/env-5EPCWSXR-DSwwgRF5.mjs +1 -0
  190. package/dist/erDiagram-SMLLAGMA-CPcwhEue.mjs +86 -0
  191. package/dist/{esm-CEs3LWY3.mjs → esm-BLMtE3s6.mjs} +2 -2
  192. package/dist/{esm-k1YlZnpm.mjs → esm-BS2W3Uzl.mjs} +2 -2
  193. package/dist/{execAsync-0jii24p9.mjs → execAsync-B4xEJACY.mjs} +2 -2
  194. package/dist/{execAsync-Czqc-yAz.mjs → execAsync-Chx_LJuI.mjs} +2 -2
  195. package/dist/{execAsync-DgmLXmTx.mjs → execAsync-DunQtInX.mjs} +2 -2
  196. package/dist/expand-DTNXU4LQ-CtzV8vlq.mjs +1 -0
  197. package/dist/expansion-ENLSRCXJ-CNi8PTVy.mjs +1 -0
  198. package/dist/expr-5T3UU5KE-BOXtVHu2.mjs +1 -0
  199. package/dist/file-ZIGAJ4YS-Bt-1Wusv.mjs +1 -0
  200. package/dist/find-TPUOAIUQ-CJd25AiD.mjs +1 -0
  201. package/dist/flag-coverage-QT4N2Z44-DJYVWsW6.mjs +2 -0
  202. package/dist/flatten-CX5MwHL4.mjs +2 -0
  203. package/dist/flowDiagram-DWJPFMVM-WnIxEgSt.mjs +163 -0
  204. package/dist/fold-LDSORVYE-DZ2L21IZ.mjs +1 -0
  205. package/dist/ganttDiagram-T4ZO3ILL-BJEuIZ2X.mjs +293 -0
  206. package/dist/getMachineId-bsd-B7ue3N1o.mjs +2 -0
  207. package/dist/getMachineId-bsd-DYQqYqxN.mjs +2 -0
  208. package/dist/getMachineId-bsd-ucL-2FoT.mjs +2 -0
  209. package/dist/{getMachineId-darwin-C4PiguA-.mjs → getMachineId-darwin-BNCkZc-0.mjs} +2 -2
  210. package/dist/{getMachineId-darwin-COcA_c6l.mjs → getMachineId-darwin-CSTYV_Bd.mjs} +2 -2
  211. package/dist/{getMachineId-darwin-CywdnyvB.mjs → getMachineId-darwin-DWmBOUuk.mjs} +2 -2
  212. package/dist/getMachineId-linux-BaNp1ZEm.mjs +2 -0
  213. package/dist/getMachineId-linux-Bv6oOXxT.mjs +2 -0
  214. package/dist/getMachineId-linux-tTgUzx-Z.mjs +2 -0
  215. package/dist/getMachineId-unsupported-Kf9p6LJQ.mjs +2 -0
  216. package/dist/getMachineId-unsupported-fh_7WYkB.mjs +2 -0
  217. package/dist/getMachineId-unsupported-iDvWGFBk.mjs +2 -0
  218. package/dist/{getMachineId-win-B20yaCSB.mjs → getMachineId-win-Bo1_B38N.mjs} +2 -2
  219. package/dist/{getMachineId-win-BXWDfxLS.mjs → getMachineId-win-DHmdubaR.mjs} +2 -2
  220. package/dist/{getMachineId-win-BfSvDvM7.mjs → getMachineId-win-DQ2s9Z1n.mjs} +2 -2
  221. package/dist/{gh-detect-Dew_sAQh.mjs → gh-detect-CNO7EkgF.mjs} +2 -2
  222. package/dist/{git-handle--dq7Gq14-C8bnaqHA.mjs → git-handle--dq7Gq14-BpH0pmv5.mjs} +2 -2
  223. package/dist/git-handle-BaZ9y3AC-CCCU9J5d.mjs +1 -0
  224. package/dist/gitGraph-7Q5UKJZL-ClGjTWw6.mjs +1 -0
  225. package/dist/gitGraphDiagram-UUTBAWPF-BqA8KMTw.mjs +107 -0
  226. package/dist/graphlib-BI4uS4Lx.mjs +2 -0
  227. package/dist/grep-3AIAIJVR-CzG01gPs.mjs +1 -0
  228. package/dist/gzip-AQXSGOVS-B_BV2fa3.mjs +1 -0
  229. package/dist/head-HT2B6D2J-CjBr6WQ1.mjs +1 -0
  230. package/dist/help-VVWX7SA5-C4HsVKec.mjs +1 -0
  231. package/dist/history-J4QRNGRO-1CYG7cs0.mjs +1 -0
  232. package/dist/hostname-BK6HG2DE-BLS00ZWn.mjs +1 -0
  233. package/dist/html-to-markdown-TFCECAGV-5Fopg2Q5.mjs +1 -0
  234. package/dist/index.mjs +1 -1
  235. package/dist/info-OMHHGYJF-11Qh6VJr.mjs +1 -0
  236. package/dist/infoDiagram-42DDH7IO-0lM1lRCH.mjs +3 -0
  237. package/dist/init-BCTt64EX.mjs +1 -0
  238. package/dist/{init-BJASd1l6.mjs → init-DjkROmXh.mjs} +9 -9
  239. package/dist/init-L1KCVOHH.mjs +2 -0
  240. package/dist/{is-object-C-4FJ0rP.mjs → is-object-Cie0xXKD.mjs} +1 -1
  241. package/dist/isEmpty-CaTO-fHo.mjs +2 -0
  242. package/dist/ishikawaDiagram-UXIWVN3A-j-jlqjJX.mjs +71 -0
  243. package/dist/join-GG2LDHE5-C_A2RnwJ.mjs +1 -0
  244. package/dist/journeyDiagram-VCZTEJTY-BDX_OcrR.mjs +140 -0
  245. package/dist/jq-ODXZBPLY-hdWY1RUY.mjs +1 -0
  246. package/dist/{js-exec-M6UR76J5-Bo7dCQVP.mjs → js-exec-M6UR76J5-Cu6NIWHE.mjs} +2 -2
  247. package/dist/kanban-definition-6JOO6SKY-C5XJUD3U.mjs +90 -0
  248. package/dist/katex-DEJL_MaU.mjs +258 -0
  249. package/dist/{lib-Dl2j2VNl.mjs → lib-BbNAtG4h.mjs} +2 -2
  250. package/dist/lib-CItGM3rN.mjs +195 -0
  251. package/dist/{libesm-D3nlnq5U.mjs → libesm-Ob3yvbRV.mjs} +1 -1
  252. package/dist/line-C6RZPh4T.mjs +2 -0
  253. package/dist/linear-gA98NGf7.mjs +2 -0
  254. package/dist/ln-4TRFBYAT-CMm4PFgi.mjs +1 -0
  255. package/dist/loader-DlfckqdT.mjs +1 -0
  256. package/dist/{loader-THH_o851.mjs → loader-ZHA8qsxF.mjs} +2 -2
  257. package/dist/ls-KSXFZCWH-Beyjypib.mjs +1 -0
  258. package/dist/{lzma-DMoteSiK.mjs → lzma-D4yjI8KW.mjs} +1 -1
  259. package/dist/{mcp-migrate-event-BF8ILHwp.mjs → mcp-migrate-event-D0NrGjvc.mjs} +1 -1
  260. package/dist/md5sum-INMIK4DX-C2RH1Ljb.mjs +1 -0
  261. package/dist/mermaid-parser.core-Cx4njenA.mjs +4 -0
  262. package/dist/mermaid.core-CcmmzbTt.mjs +16 -0
  263. package/dist/mindmap-definition-QFDTVHPH-WLdthwDy.mjs +97 -0
  264. package/dist/mkdir-TDEMSB6C-BeLs_C7x.mjs +1 -0
  265. package/dist/mv-Z6MORUFL-BDAoI0Wd.mjs +1 -0
  266. package/dist/nl-U5YJDM32-SP99R3HJ.mjs +1 -0
  267. package/dist/od-VJEF2UR5-BR0Ho1t5.mjs +1 -0
  268. package/dist/{open-browser-C6LU_1mt.mjs → open-browser-DHTbHSqx.mjs} +1 -1
  269. package/dist/ordinal-BCuCMCHk.mjs +2 -0
  270. package/dist/packet-4T2RLAQJ-jzF54bgp.mjs +1 -0
  271. package/dist/paste-7N6AFSDS-Bz3kd4hU.mjs +1 -0
  272. package/dist/path-C9DYqGo_.mjs +2 -0
  273. package/dist/pie-ZZUOXDRM-x8WFG16Q.mjs +1 -0
  274. package/dist/pieDiagram-DEJITSTG-7oeIAT-R.mjs +31 -0
  275. package/dist/preview-1rr7IXHj.mjs +1 -0
  276. package/dist/{preview-D2aUkK2G.mjs → preview-BI2sVxtF.mjs} +2 -2
  277. package/dist/printf-CX64KX2P-GrZNCK4M.mjs +1 -0
  278. package/dist/public/assets/{ActivityModeContent-icee786E.js → ActivityModeContent-BWmb9zCZ.js} +1 -1
  279. package/dist/public/assets/{DocumentContext-CPNCcJL_.js → DocumentContext-9Sn6Kq-o.js} +22 -22
  280. package/dist/public/assets/{GraphPanel-Ru_nQ2bj.js → GraphPanel-PYMXWVsg.js} +1 -1
  281. package/dist/public/assets/{SettingsDialogBody-Cd4Y_C3_.js → SettingsDialogBody-YOvgrn38.js} +1 -1
  282. package/dist/public/assets/{SourceEditor-DorrRiI-.js → SourceEditor-D1zhJS8f.js} +1 -1
  283. package/dist/public/assets/{config-validation-events-VDOuCcdw.js → config-validation-events-BUyp1R_U.js} +1 -1
  284. package/dist/public/assets/index-BXgWyDFu.css +1 -0
  285. package/dist/public/assets/index-CEtMQRxi.js +1915 -0
  286. package/dist/public/assets/{keyboard-shortcuts-Bk8qxCCx.js → keyboard-shortcuts-CNJfczoS.js} +1 -1
  287. package/dist/public/assets/prop-types-COA7UVY9.js +516 -0
  288. package/dist/public/assets/{target-navigation-intent-VPniz9mY.js → target-navigation-intent-Cp-mOxXo.js} +1 -1
  289. package/dist/public/assets/{typing-burst-detector-BIeQ5WQY.js → typing-burst-detector-DWg86xJw.js} +1 -1
  290. package/dist/public/index.html +8 -8
  291. package/dist/pwd-D4OZ7N27-DDRhZsId.mjs +1 -0
  292. package/dist/{python3-AUFTPCU6-1PPUn2I7.mjs → python3-AUFTPCU6-DmPp1QHj.mjs} +2 -2
  293. package/dist/quadrantDiagram-34T5L4WZ-DWVBhb1E.mjs +8 -0
  294. package/dist/radar-PYXPWWZC-C-wbHKao.mjs +1 -0
  295. package/dist/readlink-MI4GCHJF-mNeJ3km7.mjs +1 -0
  296. package/dist/reduce-V0ODtSr4.mjs +2 -0
  297. package/dist/{repair-launch-json-Cc9XVvLw.mjs → repair-launch-json-DCXsAQuF.mjs} +2 -2
  298. package/dist/{repair-mcp-configs-CMdzPlf3.mjs → repair-mcp-configs-BV1WJulV.mjs} +2 -2
  299. package/dist/repair-skills-BSA3PyS7.mjs +1 -0
  300. package/dist/{repair-skills-DeOPRNTk.mjs → repair-skills-uHQb0hCn.mjs} +2 -2
  301. package/dist/requirementDiagram-MS252O5E-Bneel37I.mjs +85 -0
  302. package/dist/rev-XOSYPP45-KAKdorsx.mjs +1 -0
  303. package/dist/rg-FOQSCCX3-BWOdKDEd.mjs +1 -0
  304. package/dist/rm-RTZG23RL-D4Xj3X_m.mjs +1 -0
  305. package/dist/rmdir-XTQXT7RK-Bx-u3U5l.mjs +1 -0
  306. package/dist/rough.cjs-C-63phNL.mjs +2 -0
  307. package/dist/sankeyDiagram-XADWPNL6-4f2f9-uf.mjs +11 -0
  308. package/dist/sed-VFTTATXJ-DmL_7Y-J.mjs +1 -0
  309. package/dist/seq-RN5ZUASB-DeaNEJEM.mjs +1 -0
  310. package/dist/sequenceDiagram-FGHM5R23-B1K4VtLp.mjs +158 -0
  311. package/dist/{server-lock-BpjJj3OD-dbH8FP82.mjs → server-lock-BpjJj3OD-CUhVvie4.mjs} +58 -58
  312. package/dist/server-lock-CyhBidkz-D41BTXw5.mjs +1 -0
  313. package/dist/sha1sum-VJPNLNU6-DYUNX0rt.mjs +1 -0
  314. package/dist/sha256sum-PI32XWXY-BwDMGEnF.mjs +1 -0
  315. package/dist/sleep-VZFPZFWA-D3IG7CwN.mjs +1 -0
  316. package/dist/sort-DCNRDA7U-BfL8J8kf.mjs +1 -0
  317. package/dist/split-SITCSYCZ-Q5NIWguo.mjs +1 -0
  318. package/dist/sqlite3-56UMWEY3-B4_LAdBq.mjs +1 -0
  319. package/dist/src-BkCVz_TJ.mjs +2 -0
  320. package/dist/{src-C_Q7AFoS.mjs → src-DnynaviS.mjs} +3 -3
  321. package/dist/start-DYkSDg3x.mjs +1 -0
  322. package/dist/{start-Dl_YsC2w.mjs → start-NIyRsRSX.mjs} +2 -2
  323. package/dist/stat-BT5A227F-CYFqsI8W.mjs +1 -0
  324. package/dist/stateDiagram-FHFEXIEX-BREbMXiC.mjs +2 -0
  325. package/dist/stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs +2 -0
  326. package/dist/strings-7PLOGTPD-BLW4mXRs.mjs +1 -0
  327. package/dist/tac-SJGXQ4T2-BGR2Dq7O.mjs +1 -0
  328. package/dist/tail-S5ULNTJU-BOBd42y5.mjs +1 -0
  329. package/dist/tar-ANUBEFJY-GYQ0YvKO.mjs +1 -0
  330. package/dist/tee-O7VXZDCO-Bg8MXC_K.mjs +1 -0
  331. package/dist/time-DEUO3QV2-CxVP9vXG.mjs +1 -0
  332. package/dist/timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs +121 -0
  333. package/dist/timeout-VRKMCG72-CVG2Q30a.mjs +1 -0
  334. package/dist/touch-DX2IJOQ4-DmEja_Fu.mjs +1 -0
  335. package/dist/tr-2HXZRDSW-DWcyuCoi.mjs +1 -0
  336. package/dist/tree-LYXBS7DC-CFaeUWGI.mjs +1 -0
  337. package/dist/treeView-SZITEDCU-DXyZ3zQc.mjs +1 -0
  338. package/dist/treemap-W4RFUUIX-CZRYHpYU.mjs +1 -0
  339. package/dist/true-WHJNXCHG-CJH22fVg.mjs +1 -0
  340. package/dist/unexpand-RGTMIGZM-Uj1QzdPV.mjs +1 -0
  341. package/dist/uniq-SUNANL47-MRCnRrGo.mjs +1 -0
  342. package/dist/vennDiagram-DHZGUBPP-Bk-INjRY.mjs +35 -0
  343. package/dist/wardley-RL74JXVD-UKzwcBOa.mjs +1 -0
  344. package/dist/wardleyDiagram-NUSXRM2D-DOD6wQla.mjs +21 -0
  345. package/dist/wc-TQB3VNOX-JPk1lni-.mjs +1 -0
  346. package/dist/which-XZHEH76L-Cl63MOrV.mjs +1 -0
  347. package/dist/whoami-DGKU3D2X-CB3itqHE.mjs +1 -0
  348. package/dist/wrapper-BZO_sIci.mjs +7 -0
  349. package/dist/{write-project-skill-D_1mDT-1.mjs → write-project-skill-DnuutHfZ.mjs} +2 -2
  350. package/dist/xan-BXDXYEIB-ZPqGVO90.mjs +1 -0
  351. package/dist/xan-view-ECQUO7AJ-C-WHEJiv.mjs +1 -0
  352. package/dist/xargs-I6EZUCYF-BvcSF5Y7.mjs +1 -0
  353. package/dist/xychartDiagram-5P7HB3ND-B4AGYFQs.mjs +8 -0
  354. package/dist/yazl-CQSNnbvt.mjs +1 -0
  355. package/dist/{yazl-CB0sfSbo.mjs → yazl-Docqgl6q.mjs} +2 -2
  356. package/dist/yq-MJMAR36V-_D_zdU3z.mjs +1 -0
  357. package/package.json +1 -1
  358. package/scripts/aggregate-tolerance-class-fires.ts +19 -10
  359. package/dist/alias-JE7RI5QX-oTDRHt3W.mjs +0 -1
  360. package/dist/awk2-POPGKRAI-BZ_7e8H1.mjs +0 -1
  361. package/dist/base64-4YMZCVJ5-BhIrz6He.mjs +0 -1
  362. package/dist/basename-AA2KJYZQ-C5R0pcfV.mjs +0 -1
  363. package/dist/bash-IJWYRKFO-DywpGlyx.mjs +0 -1
  364. package/dist/build-CZpdADQB.mjs +0 -1
  365. package/dist/cat-RDUMLXKC-BNwer8pK.mjs +0 -1
  366. package/dist/chmod-SYMGL4JA-BN-B1xmG.mjs +0 -1
  367. package/dist/clear-5CZ5X4YR-B6kVcfOw.mjs +0 -1
  368. package/dist/colors-gw_5YWUu.mjs +0 -1
  369. package/dist/column-WLPMMSTS-CEev_e2R.mjs +0 -1
  370. package/dist/comm-5SLSESQG-BXsiD7To.mjs +0 -1
  371. package/dist/constants-DAbcLLp_.mjs +0 -2
  372. package/dist/cp-XOYR4ABJ-Dy5aHk72.mjs +0 -1
  373. package/dist/cut-OPC3VAGB-GohHdbJ4.mjs +0 -1
  374. package/dist/date-DD7FVA2V-RM_vdvCh.mjs +0 -1
  375. package/dist/diff-HJF2MPDN-DTuHZGVW.mjs +0 -1
  376. package/dist/dirname-LEMTZZFS-C6aDcxLl.mjs +0 -1
  377. package/dist/dist-DiX0-B7g.mjs +0 -1
  378. package/dist/dist-bundle-XlngXUNr.mjs +0 -1
  379. package/dist/du-WO2ENHXQ-Da1HuQkH.mjs +0 -1
  380. package/dist/echo-O45JWWI2-Cr9jHdYm.mjs +0 -1
  381. package/dist/env-5EPCWSXR-6RSqo9Bn.mjs +0 -1
  382. package/dist/expand-DTNXU4LQ-D4dbwBrD.mjs +0 -1
  383. package/dist/expansion-ENLSRCXJ-Bv6RV19y.mjs +0 -1
  384. package/dist/expr-5T3UU5KE-D7ekHiOy.mjs +0 -1
  385. package/dist/file-ZIGAJ4YS-DzKHvjCj.mjs +0 -1
  386. package/dist/find-TPUOAIUQ-DuBwOGWI.mjs +0 -1
  387. package/dist/flag-coverage-QT4N2Z44-DmAL_7h5.mjs +0 -2
  388. package/dist/fold-LDSORVYE-BQyKAmCr.mjs +0 -1
  389. package/dist/getMachineId-bsd-CzP05Ffc.mjs +0 -2
  390. package/dist/getMachineId-bsd-D0erQsHH.mjs +0 -2
  391. package/dist/getMachineId-bsd-Dp2q7huT.mjs +0 -2
  392. package/dist/getMachineId-linux-BRPjBsHg.mjs +0 -2
  393. package/dist/getMachineId-linux-CQZJR55S.mjs +0 -2
  394. package/dist/getMachineId-linux-DcN5tfI_.mjs +0 -2
  395. package/dist/getMachineId-unsupported-BokXsjFr.mjs +0 -2
  396. package/dist/getMachineId-unsupported-DZAxq-oW.mjs +0 -2
  397. package/dist/getMachineId-unsupported-GPbM_evk.mjs +0 -2
  398. package/dist/git-handle-BaZ9y3AC-B05Md-6F.mjs +0 -1
  399. package/dist/grep-3AIAIJVR-DhLMPK9o.mjs +0 -1
  400. package/dist/gzip-AQXSGOVS-kzAFjO_Y.mjs +0 -1
  401. package/dist/head-HT2B6D2J-BR-dv_ar.mjs +0 -1
  402. package/dist/help-VVWX7SA5-jdvqGfQj.mjs +0 -1
  403. package/dist/history-J4QRNGRO-jb5B-tWQ.mjs +0 -1
  404. package/dist/hostname-BK6HG2DE-CVVAGatl.mjs +0 -1
  405. package/dist/html-to-markdown-TFCECAGV-B5yiu2Qr.mjs +0 -1
  406. package/dist/init-D1UzS4tm.mjs +0 -1
  407. package/dist/join-GG2LDHE5-BLgXAHZ_.mjs +0 -1
  408. package/dist/jq-ODXZBPLY-JpgGenzN.mjs +0 -1
  409. package/dist/ln-4TRFBYAT-C7xn5Rqr.mjs +0 -1
  410. package/dist/loader-D3p97Pi7.mjs +0 -1
  411. package/dist/ls-KSXFZCWH-BFVVAoBi.mjs +0 -1
  412. package/dist/md5sum-INMIK4DX-0GZIz1Ci.mjs +0 -1
  413. package/dist/mkdir-TDEMSB6C-DTyG__G-.mjs +0 -1
  414. package/dist/mv-Z6MORUFL-CmjBk72Q.mjs +0 -1
  415. package/dist/nl-U5YJDM32-5XaxKjVN.mjs +0 -1
  416. package/dist/od-VJEF2UR5-BYZOEzSd.mjs +0 -1
  417. package/dist/paste-7N6AFSDS-BnDgUhuq.mjs +0 -1
  418. package/dist/preview-BpHHevx8.mjs +0 -1
  419. package/dist/printf-CX64KX2P-0abCeF-D.mjs +0 -1
  420. package/dist/public/assets/index-C-eV_aX_.css +0 -1
  421. package/dist/public/assets/index-CKQZFT_Z.js +0 -1915
  422. package/dist/public/assets/prop-types-CiBqwiqK.js +0 -516
  423. package/dist/pwd-D4OZ7N27-AYS4A9o1.mjs +0 -1
  424. package/dist/readlink-MI4GCHJF-BvzND_DT.mjs +0 -1
  425. package/dist/repair-skills-DoHj-jkH.mjs +0 -1
  426. package/dist/rev-XOSYPP45-Bqdhxuez.mjs +0 -1
  427. package/dist/rg-FOQSCCX3-CrVzsut-.mjs +0 -1
  428. package/dist/rm-RTZG23RL-DVQCHLUL.mjs +0 -1
  429. package/dist/rmdir-XTQXT7RK-DrUUkxCF.mjs +0 -1
  430. package/dist/sed-VFTTATXJ-QHemmbCP.mjs +0 -1
  431. package/dist/seq-RN5ZUASB-BBSGpJq5.mjs +0 -1
  432. package/dist/server-lock-CyhBidkz-BRXgOcGh.mjs +0 -1
  433. package/dist/sha1sum-VJPNLNU6-D6-7B21n.mjs +0 -1
  434. package/dist/sha256sum-PI32XWXY-BYVtIJOS.mjs +0 -1
  435. package/dist/sleep-VZFPZFWA-C-x_VGtG.mjs +0 -1
  436. package/dist/sort-DCNRDA7U-BTlvuG7X.mjs +0 -1
  437. package/dist/split-SITCSYCZ-BmGbaiMe.mjs +0 -1
  438. package/dist/sqlite3-56UMWEY3-Cjvsy5Oo.mjs +0 -1
  439. package/dist/start-C8peDw-k.mjs +0 -1
  440. package/dist/stat-BT5A227F-BjNsVAze.mjs +0 -1
  441. package/dist/strings-7PLOGTPD-B6_kjNM-.mjs +0 -1
  442. package/dist/tac-SJGXQ4T2-BEQ9sZmi.mjs +0 -1
  443. package/dist/tail-S5ULNTJU-DSe2aEO8.mjs +0 -1
  444. package/dist/tar-ANUBEFJY-HbwMpE1g.mjs +0 -1
  445. package/dist/tee-O7VXZDCO-BD6QXg_b.mjs +0 -1
  446. package/dist/time-DEUO3QV2-CRnH51wk.mjs +0 -1
  447. package/dist/timeout-VRKMCG72-D_oS0IDg.mjs +0 -1
  448. package/dist/touch-DX2IJOQ4-4yR1M9Nd.mjs +0 -1
  449. package/dist/tr-2HXZRDSW-Ca-NmLk7.mjs +0 -1
  450. package/dist/tree-LYXBS7DC-CR3kfmh6.mjs +0 -1
  451. package/dist/true-WHJNXCHG-x85l8vsW.mjs +0 -1
  452. package/dist/unexpand-RGTMIGZM-D-1EwjbB.mjs +0 -1
  453. package/dist/uniq-SUNANL47-DtBj3lmA.mjs +0 -1
  454. package/dist/wc-TQB3VNOX-Qw6WjSl1.mjs +0 -1
  455. package/dist/which-XZHEH76L-B-Xo178d.mjs +0 -1
  456. package/dist/whoami-DGKU3D2X-_Mgzu6ty.mjs +0 -1
  457. package/dist/xan-BXDXYEIB-qijhj_cA.mjs +0 -1
  458. package/dist/xan-view-ECQUO7AJ-BfZejrY6.mjs +0 -1
  459. package/dist/xargs-I6EZUCYF-aS184J1w.mjs +0 -1
  460. package/dist/yazl-Dqnhfxk7.mjs +0 -1
  461. package/dist/yq-MJMAR36V-Cgql6fKu.mjs +0 -1
@@ -0,0 +1 @@
1
+ import{g as e}from"./server-lock-BpjJj3OD-CUhVvie4.mjs";export{e as updateServerLockPort};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{t as e}from"./chunk-XKQRETAK-BC2HZ_y9.mjs";export{e as sha1sumCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{t as e}from"./chunk-5V6VZH6T-ByuVaPWr.mjs";export{e as sha256sumCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import"./chunk-5QMZ5MUS-BwpNU33k.mjs";import"./chunk-A5O5YHGN-DApqA6Ow.mjs";import{n as e}from"./chunk-GOV5EKKI-CDGzZWfT.mjs";export{e as sleepCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-KMEYNNUA-Qk0eg7gN.mjs";export{e as sortCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-MYE6AGBJ-DwzjGrc0.mjs";export{e as split};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import"./chunk-5QMZ5MUS-BwpNU33k.mjs";import"./chunk-A5O5YHGN-DApqA6Ow.mjs";import"./chunk-24IMIIXA-DaS5XS55.mjs";import{t as e}from"./chunk-HWBSOZZR-5PJ_z6D6.mjs";export{e as sqlite3Command};
@@ -0,0 +1,2 @@
1
+ import{s as e,t}from"./chunk-C94x7I9S.mjs";var n=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var ee=`$isDayjsObject`,x=function(e){return e instanceof T||!(!e||!e[ee])},S=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},C=function(e,t){if(x(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new T(n)},w=v;w.l=S,w.i=x,w.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[ee]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return w},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return C(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<C(e)},_.$g=function(e,t,n){return w.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!w.u(t)||t,u=w.p(e),p=function(e,t){var i=w.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return w.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=w.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[w.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=w.p(u),h=function(e){var t=C(p);return w.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return w.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=w.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return w.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return w.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return w.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return w.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return w.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return w.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return w.s(t.$s,2,`0`);case`SSS`:return w.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=w.p(f),_=C(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return w.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:w.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return w.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),te=T.prototype;return C.prototype=te,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){te[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||=(e(t,T,C),!0),C},C.locale=S,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=b[y],C.Ls=b,C.p={},C}))})),r=e(n(),1),i=Object.defineProperty,a=(e,t)=>i(e,`name`,{value:t,configurable:!0}),o=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},c={trace:a((...e)=>{},`trace`),debug:a((...e)=>{},`debug`),info:a((...e)=>{},`info`),warn:a((...e)=>{},`warn`),error:a((...e)=>{},`error`),fatal:a((...e)=>{},`fatal`)},l=a(function(e=`fatal`){let t=s.fatal;typeof e==`string`?e.toLowerCase()in s&&(t=s[e]):typeof e==`number`&&(t=e),c.trace=()=>{},c.debug=()=>{},c.info=()=>{},c.warn=()=>{},c.error=()=>{},c.fatal=()=>{},t<=s.fatal&&(c.fatal=console.error?console.error.bind(console,u(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,u(`FATAL`))),t<=s.error&&(c.error=console.error?console.error.bind(console,u(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,u(`ERROR`))),t<=s.warn&&(c.warn=console.warn?console.warn.bind(console,u(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,u(`WARN`))),t<=s.info&&(c.info=console.info?console.info.bind(console,u(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,u(`INFO`))),t<=s.debug&&(c.debug=console.debug?console.debug.bind(console,u(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,u(`DEBUG`))),t<=s.trace&&(c.trace=console.debug?console.debug.bind(console,u(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,u(`TRACE`)))},`setLogLevel`),u=a(e=>`%c${(0,r.default)().format(`ss.SSS`)} : ${e} : `,`format`);function d(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function f(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function p(e){let t,n,r;e.length===2?(t=e===d||e===f?e:m,n=e,r=e):(t=d,n=(t,n)=>d(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function m(){return 0}function h(e){return e===null?NaN:+e}const g=p(d),_=g.right;g.left,p(h).center;var v=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.internmap={}))})(e,(function(e){class t extends Map{constructor(e,t=o){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(r(this,e))}has(e){return super.has(r(this,e))}set(e,t){return super.set(i(this,e),t)}delete(e){return super.delete(a(this,e))}}class n extends Set{constructor(e,t=o){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let t of e)this.add(t)}has(e){return super.has(r(this,e))}add(e){return super.add(i(this,e))}delete(e){return super.delete(a(this,e))}}function r({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function i({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function o(e){return typeof e==`object`&&e?e.valueOf():e}e.InternMap=t,e.InternSet=n,Object.defineProperty(e,`__esModule`,{value:!0})}))}));const y=Math.sqrt(50),b=Math.sqrt(10),ee=Math.sqrt(2);function x(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=y?10:a>=b?5:a>=ee?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?x(e,t,n*2):[s,c,l]}function S(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?x(t,e,n):x(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function C(e,t,n){return t=+t,e=+e,n=+n,x(e,t,n)[2]}function w(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?C(t,e,n):C(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function T(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var re=v(),ie={value:()=>{}};function ae(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new E(n)}function E(e){this._=e}function oe(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}E.prototype=ae.prototype={constructor:E,on:function(e,t){var n=this._,r=oe(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=se(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ce(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ce(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new E(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function se(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ce(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ie,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var le={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function ue(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),le.hasOwnProperty(t)?{space:le[t],local:e}:e}function de(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function fe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pe(e){var t=ue(e);return(t.local?fe:de)(t)}function me(){}function he(e){return e==null?me:function(){return this.querySelector(e)}}function ge(e){typeof e!=`function`&&(e=he(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new k(r,this._parents)}function _e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ve(){return[]}function ye(e){return e==null?ve:function(){return this.querySelectorAll(e)}}function be(e){return function(){return _e(e.apply(this,arguments))}}function xe(e){e=typeof e==`function`?be(e):ye(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new k(r,i)}function Se(e){return function(){return this.matches(e)}}function Ce(e){return function(t){return t.matches(e)}}var we=Array.prototype.find;function Te(e){return function(){return we.call(this.children,e)}}function Ee(){return this.firstElementChild}function De(e){return this.select(e==null?Ee:Te(typeof e==`function`?e:Ce(e)))}var Oe=Array.prototype.filter;function ke(){return Array.from(this.children)}function Ae(e){return function(){return Oe.call(this.children,e)}}function je(e){return this.selectAll(e==null?ke:Ae(typeof e==`function`?e:Ce(e)))}function Me(e){typeof e!=`function`&&(e=Se(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new k(r,this._parents)}function Ne(e){return Array(e.length)}function Pe(){return new k(this._enter||this._groups.map(Ne),this._parents)}function D(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}D.prototype={constructor:D,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Fe(e){return function(){return e}}function Ie(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new D(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Le(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new D(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Re(e){return e.__data__}function ze(e,t){if(!arguments.length)return Array.from(this,Re);var n=t?Le:Ie,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Fe(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Be(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new k(o,r),o._enter=s,o._exit=c,o}function Be(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ve(){return new k(this._exit||this._groups.map(Ne),this._parents)}function He(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ue(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new k(s,this._parents)}function We(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ge(e){e||=Ke;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new k(i,this._parents).order()}function Ke(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Je(){return Array.from(this)}function Ye(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Xe(){let e=0;for(let t of this)++e;return e}function Ze(){return!this.node()}function Qe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function $e(e){return function(){this.removeAttribute(e)}}function et(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tt(e,t){return function(){this.setAttribute(e,t)}}function nt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function it(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function at(e,t){var n=ue(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?et:$e:typeof t==`function`?n.local?it:rt:n.local?nt:tt)(n,t))}function ot(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function st(e){return function(){this.style.removeProperty(e)}}function ct(e,t,n){return function(){this.style.setProperty(e,t,n)}}function lt(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ut(e,t,n){return arguments.length>1?this.each((t==null?st:typeof t==`function`?lt:ct)(e,t,n??``)):O(this.node(),e)}function O(e,t){return e.style.getPropertyValue(t)||ot(e).getComputedStyle(e,null).getPropertyValue(t)}function dt(e){return function(){delete this[e]}}function ft(e,t){return function(){this[e]=t}}function pt(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function mt(e,t){return arguments.length>1?this.each((t==null?dt:typeof t==`function`?pt:ft)(e,t)):this.node()[e]}function ht(e){return e.trim().split(/^|\s+/)}function gt(e){return e.classList||new _t(e)}function _t(e){this._node=e,this._names=ht(e.getAttribute(`class`)||``)}_t.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function vt(e,t){for(var n=gt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yt(e,t){for(var n=gt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function bt(e){return function(){vt(this,e)}}function xt(e){return function(){yt(this,e)}}function St(e,t){return function(){(t.apply(this,arguments)?vt:yt)(this,e)}}function Ct(e,t){var n=ht(e+``);if(arguments.length<2){for(var r=gt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?St:t?bt:xt)(n,t))}function wt(){this.textContent=``}function Tt(e){return function(){this.textContent=e}}function Et(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Dt(e){return arguments.length?this.each(e==null?wt:(typeof e==`function`?Et:Tt)(e)):this.node().textContent}function Ot(){this.innerHTML=``}function kt(e){return function(){this.innerHTML=e}}function At(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function jt(e){return arguments.length?this.each(e==null?Ot:(typeof e==`function`?At:kt)(e)):this.node().innerHTML}function Mt(){this.nextSibling&&this.parentNode.appendChild(this)}function Nt(){return this.each(Mt)}function Pt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ft(){return this.each(Pt)}function It(e){var t=typeof e==`function`?e:pe(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lt(){return null}function Rt(e,t){var n=typeof e==`function`?e:pe(e),r=t==null?Lt:typeof t==`function`?t:he(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function zt(){var e=this.parentNode;e&&e.removeChild(this)}function Bt(){return this.each(zt)}function Vt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ht(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ut(e){return this.select(e?Ht:Vt)}function Wt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Gt(e){return function(t){e.call(this,t,this.__data__)}}function Kt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function qt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Jt(e,t,n){return function(){var r=this.__on,i,a=Gt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Yt(e,t,n){var r=Kt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Jt:qt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Xt(e,t,n){var r=ot(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Zt(e,t){return function(){return Xt(this,e,t)}}function Qt(e,t){return function(){return Xt(this,e,t.apply(this,arguments))}}function $t(e,t){return this.each((typeof t==`function`?Qt:Zt)(e,t))}function*en(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var tn=[null];function k(e,t){this._groups=e,this._parents=t}function A(){return new k([[document.documentElement]],tn)}function nn(){return this}k.prototype=A.prototype={constructor:k,select:ge,selectAll:xe,selectChild:De,selectChildren:je,filter:Me,data:ze,enter:Pe,exit:Ve,join:He,merge:Ue,selection:nn,order:We,sort:Ge,call:qe,nodes:Je,node:Ye,size:Xe,empty:Ze,each:Qe,attr:at,style:ut,property:mt,classed:Ct,text:Dt,html:jt,raise:Nt,lower:Ft,append:It,insert:Rt,remove:Bt,clone:Ut,datum:Wt,on:Yt,dispatch:$t,[Symbol.iterator]:en};function rn(e){return typeof e==`string`?new k([[document.querySelector(e)]],[document.documentElement]):new k([[e]],tn)}function j(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function an(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function M(){}var N=.7,P=1/N,F=`\\s*([+-]?\\d+)\\s*`,I=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,L=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,on=/^#([0-9a-f]{3,8})$/,sn=RegExp(`^rgb\\(${F},${F},${F}\\)$`),cn=RegExp(`^rgb\\(${L},${L},${L}\\)$`),ln=RegExp(`^rgba\\(${F},${F},${F},${I}\\)$`),un=RegExp(`^rgba\\(${L},${L},${L},${I}\\)$`),dn=RegExp(`^hsl\\(${I},${L},${L}\\)$`),fn=RegExp(`^hsla\\(${I},${L},${L},${I}\\)$`),pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};j(M,R,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHex8:hn,formatHsl:gn,formatRgb:_n,toString:_n});function mn(){return this.rgb().formatHex()}function hn(){return this.rgb().formatHex8()}function gn(){return Dn(this).formatHsl()}function _n(){return this.rgb().formatRgb()}function R(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=on.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vn(t):n===3?new z(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sn.exec(e))?new z(t[1],t[2],t[3],1):(t=cn.exec(e))?new z(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ln.exec(e))?yn(t[1],t[2],t[3],t[4]):(t=un.exec(e))?yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dn.exec(e))?En(t[1],t[2]/100,t[3]/100,1):(t=fn.exec(e))?En(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?vn(pn[e]):e===`transparent`?new z(NaN,NaN,NaN,0):null}function vn(e){return new z(e>>16&255,e>>8&255,e&255,1)}function yn(e,t,n,r){return r<=0&&(e=t=n=NaN),new z(e,t,n,r)}function bn(e){return e instanceof M||(e=R(e)),e?(e=e.rgb(),new z(e.r,e.g,e.b,e.opacity)):new z}function xn(e,t,n,r){return arguments.length===1?bn(e):new z(e,t,n,r??1)}function z(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j(z,xn,an(M,{brighter(e){return e=e==null?P:P**+e,new z(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?N:N**+e,new z(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new z(B(this.r),B(this.g),B(this.b),Tn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sn,formatHex:Sn,formatHex8:Cn,formatRgb:wn,toString:wn}));function Sn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}`}function Cn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity)?1:this.opacity)*255)}`}function wn(){let e=Tn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${B(this.r)}, ${B(this.g)}, ${B(this.b)}${e===1?`)`:`, ${e})`}`}function Tn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function B(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function V(e){return e=B(e),(e<16?`0`:``)+e.toString(16)}function En(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new H(e,t,n,r)}function Dn(e){if(e instanceof H)return new H(e.h,e.s,e.l,e.opacity);if(e instanceof M||(e=R(e)),!e)return new H;if(e instanceof H)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new H(o,s,c,e.opacity)}function On(e,t,n,r){return arguments.length===1?Dn(e):new H(e,t,n,r??1)}function H(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j(H,On,an(M,{brighter(e){return e=e==null?P:P**+e,new H(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?N:N**+e,new H(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new z(An(e>=240?e-240:e+120,i,r),An(e,i,r),An(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new H(kn(this.h),U(this.s),U(this.l),Tn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Tn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${kn(this.h)}, ${U(this.s)*100}%, ${U(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function kn(e){return e=(e||0)%360,e<0?e+360:e}function U(e){return Math.max(0,Math.min(1,e||0))}function An(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var jn=e=>()=>e;function Mn(e,t){return function(n){return e+n*t}}function Nn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Pn(e,t){var n=t-e;return n?Mn(e,n>180||n<-180?n-360*Math.round(n/360):n):jn(isNaN(e)?t:e)}function Fn(e){return(e=+e)==1?In:function(t,n){return n-t?Nn(t,n,e):jn(isNaN(t)?n:t)}}function In(e,t){var n=t-e;return n?Mn(e,n):jn(isNaN(e)?t:e)}var Ln=(function e(t){var n=Fn(t);function r(e,t){var r=n((e=xn(e)).r,(t=xn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=In(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function W(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zn=new RegExp(Rn.source,`g`);function Bn(e){return function(){return e}}function Vn(e){return function(t){return e(t)+``}}function Hn(e,t){var n=Rn.lastIndex=zn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Rn.exec(e))&&(i=zn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:W(r,i)})),n=zn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Vn(c[0].x):Bn(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var Un=180/Math.PI,Wn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Un,skewX:Math.atan(c)*Un,scaleX:o,scaleY:s}}var Kn;function qn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Wn:Gn(t.a,t.b,t.c,t.d,t.e,t.f)}function Jn(e){return e==null||(Kn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Kn.setAttribute(`transform`,e),!(e=Kn.transform.baseVal.consolidate()))?Wn:(e=e.matrix,Gn(e.a,e.b,e.c,e.d,e.e,e.f))}function Yn(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:W(e,i)},{i:c-2,x:W(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:W(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:W(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:W(e,n)},{i:s-2,x:W(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Xn=Yn(qn,`px, `,`px)`,`deg)`),Zn=Yn(Jn,`, `,`)`,`)`),G=0,Qn=0,$n=0,er=1e3,tr,K,nr=0,q=0,rr=0,J=typeof performance==`object`&&performance.now?performance:Date,ir=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ar(){return q||=(ir(or),J.now()+rr)}function or(){q=0}function sr(){this._call=this._time=this._next=null}sr.prototype=cr.prototype={constructor:sr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?ar():+n)+(t==null?0:+t),!this._next&&K!==this&&(K?K._next=this:tr=this,K=this),this._call=e,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};function cr(e,t,n){var r=new sr;return r.restart(e,t,n),r}function lr(){ar(),++G;for(var e=tr,t;e;)(t=q-e._time)>=0&&e._call.call(void 0,t),e=e._next;--G}function ur(){q=(nr=J.now())+rr,G=Qn=0;try{lr()}finally{G=0,fr(),q=0}}function dr(){var e=J.now(),t=e-nr;t>er&&(rr-=t,nr=e)}function fr(){for(var e,t=tr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tr=n);K=e,pr(r)}function pr(e){G||(Qn&&=clearTimeout(Qn),e-q>24?(e<1/0&&(Qn=setTimeout(ur,e-J.now()-rr)),$n&&=clearInterval($n)):($n||=(nr=J.now(),setInterval(dr,er)),G=1,ir(ur)))}function mr(e,t,n){var r=new sr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var hr=ae(`start`,`end`,`cancel`,`interrupt`),gr=[];function _r(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;yr(e,n,{name:t,index:r,group:i,on:hr,tween:gr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function vr(e,t){var n=X(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Y(e,t){var n=X(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function X(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function yr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=cr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return mr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(mr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function br(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function xr(e){return this.each(function(){br(this,e)})}function Sr(e,t){var n,r;return function(){var i=Y(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Cr(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Y(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function wr(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=X(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Sr:Cr)(n,e,t))}function Tr(e,t,n){var r=e._id;return e.each(function(){var e=Y(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return X(e,r).value[t]}}function Er(e,t){var n;return(typeof t==`number`?W:t instanceof R?Ln:(n=R(t))?(t=n,Ln):Hn)(e,t)}function Dr(e){return function(){this.removeAttribute(e)}}function Or(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ar(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function jr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Mr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Nr(e,t){var n=ue(e),r=n===`transform`?Zn:Er;return this.attrTween(e,typeof t==`function`?(n.local?Mr:jr)(n,r,Tr(this,`attr.`+e,t)):t==null?(n.local?Or:Dr)(n):(n.local?Ar:kr)(n,r,t))}function Pr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Fr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ir(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Fr(e,i)),n}return i._value=t,i}function Lr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Pr(e,i)),n}return i._value=t,i}function Rr(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=ue(e);return this.tween(n,(r.local?Ir:Lr)(r,t))}function zr(e,t){return function(){vr(this,e).delay=+t.apply(this,arguments)}}function Br(e,t){return t=+t,function(){vr(this,e).delay=t}}function Vr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?zr:Br)(t,e)):X(this.node(),t).delay}function Hr(e,t){return function(){Y(this,e).duration=+t.apply(this,arguments)}}function Ur(e,t){return t=+t,function(){Y(this,e).duration=t}}function Wr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Hr:Ur)(t,e)):X(this.node(),t).duration}function Gr(e,t){if(typeof t!=`function`)throw Error();return function(){Y(this,e).ease=t}}function Kr(e){var t=this._id;return arguments.length?this.each(Gr(t,e)):X(this.node(),t).ease}function qr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Y(this,e).ease=n}}function Jr(e){if(typeof e!=`function`)throw Error();return this.each(qr(this._id,e))}function Yr(e){typeof e!=`function`&&(e=Se(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Z(r,this._parents,this._name,this._id)}function Xr(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Z(o,this._parents,this._name,this._id)}function Zr(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Qr(e,t,n){var r,i,a=Zr(t)?vr:Y;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function $r(e,t){var n=this._id;return arguments.length<2?X(this.node(),n).on.on(e):this.each(Qr(n,e,t))}function ei(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ti(){return this.on(`end.remove`,ei(this._id))}function ni(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=he(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,_r(l[f],t,n,f,l,X(u,n)));return new Z(a,this._parents,t,n)}function ri(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ye(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=X(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&_r(p,t,n,h,f,m);a.push(f),o.push(u)}return new Z(a,o,t,n)}var ii=A.prototype.constructor;function ai(){return new ii(this._groups,this._parents)}function oi(e,t){var n,r,i;return function(){var a=O(this,e),o=(this.style.removeProperty(e),O(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function si(e){return function(){this.style.removeProperty(e)}}function ci(e,t,n){var r,i=n+``,a;return function(){var o=O(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function li(e,t,n){var r,i,a;return function(){var o=O(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),O(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function ui(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Y(this,e),l=c.on,u=c.value[a]==null?s||=si(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function di(e,t,n){var r=(e+=``)==`transform`?Xn:Er;return t==null?this.styleTween(e,oi(e,r)).on(`end.style.`+e,si(e)):typeof t==`function`?this.styleTween(e,li(e,r,Tr(this,`style.`+e,t))).each(ui(this._id,e)):this.styleTween(e,ci(e,r,t),n).on(`end.style.`+e,null)}function fi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function pi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&fi(e,a,n)),r}return a._value=t,a}function mi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,pi(e,t,n??``))}function hi(e){return function(){this.textContent=e}}function gi(e){return function(){this.textContent=e(this)??``}}function _i(e){return this.tween(`text`,typeof e==`function`?gi(Tr(this,`text`,e)):hi(e==null?``:e+``))}function vi(e){return function(t){this.textContent=e.call(this,t)}}function yi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&vi(r)),t}return r._value=e,r}function bi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,yi(e))}function xi(){for(var e=this._name,t=this._id,n=Ti(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=X(c,t);_r(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Z(r,this._parents,e,n)}function Si(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Y(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ci=0;function Z(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wi(e){return A().transition(e)}function Ti(){return++Ci}var Q=A.prototype;Z.prototype=wi.prototype={constructor:Z,select:ni,selectAll:ri,selectChild:Q.selectChild,selectChildren:Q.selectChildren,filter:Yr,merge:Xr,selection:ai,transition:xi,call:Q.call,nodes:Q.nodes,node:Q.node,size:Q.size,empty:Q.empty,each:Q.each,on:$r,attr:Nr,attrTween:Rr,style:di,styleTween:mi,text:_i,textTween:bi,remove:ti,tween:wr,delay:Vr,duration:Wr,ease:Kr,easeVarying:Jr,end:Si,[Symbol.iterator]:Q[Symbol.iterator]};function Ei(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Di={time:null,delay:0,duration:250,ease:Ei};function Oi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function ki(e){var t,n;e instanceof Z?(t=e._id,e=e._name):(t=Ti(),(n=Di).time=ar(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&_r(c,e,t,l,o,n||Oi(c,t));return new Z(r,this._parents,e,t)}A.prototype.interrupt=xr,A.prototype.transition=ki;const{abs:Ai,max:ji,min:Mi}=Math;[`w`,`e`].map(Ni),[`n`,`s`].map(Ni),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Ni);function Ni(e){return{type:e}}function $(e,t,n){this.k=e,this.x=t,this.y=n}$.prototype={constructor:$,scale:function(e){return e===1?this:new $(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Pi=new $(1,0,0);Fi.prototype=$.prototype;function Fi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Pi;return e.__zoom}export{o as C,n as D,l as E,p as S,c as T,T as _,In as a,S as b,z as c,j as d,an as f,te as g,ne as h,Pn as i,R as l,re as m,W as n,jn as o,rn as p,Ln as r,M as s,Hn as t,bn as u,C as v,a as w,_ as x,w as y};
2
+ //# sourceMappingURL=src-BkCVz_TJ.mjs.map
@@ -1,7 +1,7 @@
1
- import{o as e}from"./chunk-FK9Q3tQk.mjs";import{t}from"./esm-CEs3LWY3.mjs";import{c as n,l as r,s as i}from"./server-lock-BpjJj3OD-dbH8FP82.mjs";import"./gh-detect-Dew_sAQh.mjs";import{Rr as a,hn as o}from"./dist-BtrtJyLX.mjs";import{g as s,h as c,k as l}from"./init-BJASd1l6.mjs";import"./loader-THH_o851.mjs";import{c as u}from"./colors-BtKMHmBX.mjs";import"./preview-D2aUkK2G.mjs";import{n as d}from"./write-project-skill-D_1mDT-1.mjs";import{spawnSync as f}from"node:child_process";import{existsSync as p,lstatSync as m,readFileSync as h,readdirSync as g,statSync as ee}from"node:fs";import{basename as te,dirname as _,isAbsolute as v,join as y,relative as b,resolve as x}from"node:path";import{hostname as ne}from"node:os";import{readFile as S,realpath as C}from"node:fs/promises";function w(e,t,a={}){let o=r(e,t);if(!p(o))return{status:`missing`,lockPath:o};let s;try{s=JSON.parse(h(o,`utf-8`))}catch{return{status:`corrupt`,lockPath:o}}if(!s||typeof s!=`object`||!n(s.pid))return{status:`corrupt`,lockPath:o};let c=s;if(!(a.isAlive??i)(c.pid))return{status:`dead-pid`,lockPath:o,lock:c};let l=a.host??ne();return c.hostname===l?{status:`alive`,lockPath:o,lock:c}:{status:`foreign-host`,lockPath:o,lock:c}}function T(e){return e.replace(/:\d+$/,``)}function E(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:T(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:T(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:T(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function D(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}function O(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`);if(n.length<5||n[0]!==``||n[3]!==`tree`)return null;let r=n.slice(5);r.length===1&&r[0]===``&&r.pop();let i,a,o,s;try{i=decodeURIComponent(n[1]),a=decodeURIComponent(n[2]),o=decodeURIComponent(n[4]),s=r.map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.some(e=>e.length===0)?null:{owner:i,repo:a,branch:o,path:s.join(`/`)}}function k(e){let t=D(e);if(t)return{kind:`doc`,...t};let n=O(e);return n?{kind:`folder`,...n}:null}const A=2e3,j=2e3,re=[/cli\.mjs/,/(^|[\s/])(open-knowledge|ok)\s+(start|mcp|ui)(\s|$)/,/Open Knowledge(?:\.app| Helper)/,/(^|[\s/])bun([\s/]).*?(run dev|packages\/app|vite|hocuspocus)/,/(^|[\s/])node([\s/]).*?(packages\/(cli|app)|vite|hocuspocus)/,/(^|\s)--ok-lock-dir-b64=/,/(^|\s)--ok-project-path=/];function M(e){return re.some(t=>t.test(e))}function ie(e){let t=e.trim().split(/\s+/).find(e=>e.startsWith(`--ok-lock-dir-b64=`));if(t==null)return null;let n=t.slice(18);if(!n)return null;try{let e=Buffer.from(n,`base64url`).toString(`utf8`);return v(e)?e:null}catch{return null}}function ae(e){let t=e.indexOf(`--ok-project-path=`);if(t===-1)return null;let n=t+18,r=e.slice(n),i=r.search(/\s--/),a=(i===-1?r:r.slice(0,i)).trim();return a&&v(a)?a:null}function oe(e){let t=[];for(let n of e.split(`
1
+ import{s as e}from"./chunk-C94x7I9S.mjs";import{t}from"./esm-BLMtE3s6.mjs";import{c as n,l as r,s as i}from"./server-lock-BpjJj3OD-CUhVvie4.mjs";import"./gh-detect-CNO7EkgF.mjs";import{gn as a,zr as o}from"./dist-D7myPw4s.mjs";import{g as s,h as c,k as l}from"./init-DjkROmXh.mjs";import"./loader-ZHA8qsxF.mjs";import{c as u}from"./colors-8SzMRIVy.mjs";import"./preview-BI2sVxtF.mjs";import{n as d}from"./write-project-skill-DnuutHfZ.mjs";import{spawnSync as f}from"node:child_process";import{existsSync as p,lstatSync as m,readFileSync as h,readdirSync as g,statSync as ee}from"node:fs";import{basename as te,dirname as _,isAbsolute as v,join as y,relative as b,resolve as x}from"node:path";import{hostname as ne}from"node:os";import{readFile as S,realpath as C}from"node:fs/promises";function w(e,t,a={}){let o=r(e,t);if(!p(o))return{status:`missing`,lockPath:o};let s;try{s=JSON.parse(h(o,`utf-8`))}catch{return{status:`corrupt`,lockPath:o}}if(!s||typeof s!=`object`||!n(s.pid))return{status:`corrupt`,lockPath:o};let c=s;if(!(a.isAlive??i)(c.pid))return{status:`dead-pid`,lockPath:o,lock:c};let l=a.host??ne();return c.hostname===l?{status:`alive`,lockPath:o,lock:c}:{status:`foreign-host`,lockPath:o,lock:c}}function T(e){return e.replace(/:\d+$/,``)}function E(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:T(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:T(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:T(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function D(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}function O(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`);if(n.length<5||n[0]!==``||n[3]!==`tree`)return null;let r=n.slice(5);r.length===1&&r[0]===``&&r.pop();let i,a,o,s;try{i=decodeURIComponent(n[1]),a=decodeURIComponent(n[2]),o=decodeURIComponent(n[4]),s=r.map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.some(e=>e.length===0)?null:{owner:i,repo:a,branch:o,path:s.join(`/`)}}function k(e){let t=D(e);if(t)return{kind:`doc`,...t};let n=O(e);return n?{kind:`folder`,...n}:null}const A=2e3,j=2e3,re=[/cli\.mjs/,/(^|[\s/])(open-knowledge|ok)\s+(start|mcp|ui)(\s|$)/,/Open Knowledge(?:\.app| Helper)/,/(^|[\s/])bun([\s/]).*?(run dev|packages\/app|vite|hocuspocus)/,/(^|[\s/])node([\s/]).*?(packages\/(cli|app)|vite|hocuspocus)/,/(^|\s)--ok-lock-dir-b64=/,/(^|\s)--ok-project-path=/];function M(e){return re.some(t=>t.test(e))}function ie(e){let t=e.trim().split(/\s+/).find(e=>e.startsWith(`--ok-lock-dir-b64=`));if(t==null)return null;let n=t.slice(18);if(!n)return null;try{let e=Buffer.from(n,`base64url`).toString(`utf8`);return v(e)?e:null}catch{return null}}function ae(e){let t=e.indexOf(`--ok-project-path=`);if(t===-1)return null;let n=t+18,r=e.slice(n),i=r.search(/\s--/),a=(i===-1?r:r.slice(0,i)).trim();return a&&v(a)?a:null}function oe(e){let t=[];for(let n of e.split(`
2
2
  `)){let e=n.trim();if(!e)continue;let r=e.indexOf(` `);if(r===-1)continue;let i=e.slice(0,r),a=e.slice(r+1),o=Number.parseInt(i,10);!Number.isNaN(o)&&M(a)&&t.push({pid:o,command:a})}return t}function se(e){let t=[],n=e.split(`
3
3
  `);for(let e=1;e<n.length;e++){let r=n[e]?.trim();if(!r)continue;let i=r.indexOf(` `);if(i===-1)continue;let a=r.slice(0,i),o=r.slice(i+1).trim(),s=Number.parseInt(a,10);!Number.isNaN(s)&&M(o)&&t.push({pid:s,command:o})}return t}async function ce(){let e=f(`pgrep`,[`-a`,`-f`,`cli\\.mjs|open-knowledge|Open Knowledge(\\.app| Helper)|--ok-lock-dir-b64=|--ok-project-path=|(^|[ /])ok[ ]+(start|mcp|ui)([ ]|$)|packages/(cli|app)|hocuspocus|vite`],{encoding:`utf-8`,timeout:A});if(!(e.error!=null&&e.error.code===`ENOENT`)){let t=e.stdout??``,n=oe(t);if(n.length>0||t.trim()===``)return n}let t=f(`ps`,[`-axo`,`pid,command`],{encoding:`utf-8`,timeout:A});return t.error!=null||!t.stdout?[]:se(t.stdout)}function le(e){let t=e.trim().split(/\s+/).filter(Boolean);for(let e of t){if(e.startsWith(`@`))continue;let t=te(e);if(t===`open-knowledge`||t===`ok`||e.endsWith(`/packages/cli/src/cli.ts`)||e.endsWith(`/packages/cli/dist/cli.mjs`)||t===`cli.mjs`||t===`cli.ts`)return e}return null}function N(e){let t=f(`ps`,[`-p`,String(e),`-o`,`command=`],{encoding:`utf-8`,timeout:A});return t.error!=null||!t.stdout?null:t.stdout.trim()||null}function P(e){let t=f(`ps`,[`-p`,String(e),`-o`,`%cpu=,%mem=`],{encoding:`utf-8`,timeout:A});if(t.error!=null||!t.stdout)return null;let[n,r]=t.stdout.trim().split(/\s+/),i=Number.parseFloat(n??``),a=Number.parseFloat(r??``);return Number.isNaN(i)||Number.isNaN(a)?null:{cpuPercent:i,memPercent:a}}async function F(e){let t=f(`lsof`,[`-p`,String(e),`-a`,`-d`,`cwd`,`-Fn`],{encoding:`utf-8`,timeout:A});if(t.error!=null)return null;let n=t.stdout??``;for(let e of n.split(`
4
4
  `))if(e.startsWith(`n`)&&e.length>1)return e.slice(1);return null}function I(e){let t=[],n=e.split(`
5
5
  `);for(let e=1;e<n.length;e++){let r=n[e]?.trim();if(!r)continue;let i=r.split(/\s+/);if(i.length<2)continue;let a=Number.parseInt(i[1]??``,10);Number.isNaN(a)||t.push(a)}return[...new Set(t)]}function L(e){return p(y(e,`server.lock`))||p(y(e,`ui.lock`))}function R(e,t){for(let n of[y(t,`.ok`,`local`),y(t,`.ok`)])p(n)&&L(n)&&e.add(n)}function z(e,t){let n=0,r=(t,i)=>{if(n>=j||(n++,R(e,t),i>=3))return;let a;try{a=g(t)}catch{return}for(let e of a){if(n>=j)return;if(e===`node_modules`||e===`.git`||e===`Library`||e.startsWith(`.`)&&e!==`.ok`)continue;let a=y(t,e),o=!1;try{o=m(a).isDirectory()}catch{continue}o&&r(a,i+1)}};r(t,0)}async function B(){let e=new Set,t=await ce(),n=t.map(e=>F(e.pid)),r=await Promise.all(n);for(let n of t){let t=ie(n.command);t!=null&&p(t)&&e.add(t);let r=ae(n.command);r!=null&&R(e,r)}for(let t of r)t!=null&&R(e,t);let i=f(`lsof`,[`-iTCP`,`-sTCP:LISTEN`,`-nP`],{encoding:`utf-8`,timeout:A});if(i.error==null&&i.stdout){let n=I(i.stdout),r=new Set(t.map(e=>e.pid)),a=n.filter(e=>!r.has(e)).map(e=>F(e)),o=await Promise.all(a);for(let t of o)t!=null&&R(e,t)}(e.size===0||r.some(e=>e===`/`))&&z(e,process.cwd());let a=new Map;for(let t of e)try{let e=await C(t);a.set(e,e)}catch{a.set(t,t)}return[...a.values()]}var V=e(u(),1);function H(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function U(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 W(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:le(r),command:r,isDesktop:H(r)}}function ue(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function G(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&ue(e)?`ui-orphan`:`stale`}const de=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function fe(e){switch(e){case`running`:return V.default.green(e);case`desktop`:return V.default.blue(e);case`foreign`:return V.default.cyan(e);case`ui-orphan`:return V.default.magenta(e);case`stale`:return V.default.yellow(e)}}function K(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function pe(e){return`${K(e.server.usage)} | ${K(e.ui?.usage??null)}`}function me(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function he(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=G(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,me(e),pe(e),t,String(n),U(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=fe(G(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=V.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
6
- `)}async function q(e={}){let t=e.discover??B,n=e.inspect??w,r=e.log??(e=>console.log(e)),i=e.resolveCommand??N,a=e.resolveUsage??P,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=W(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:G(e)}));r(JSON.stringify(e,null,2));return}r(he(e.all?s:s.filter(e=>de.has(G(e)))))}function ge(){return new t(`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 q({all:t.all===!0||e===`all`,json:t.json===!0})})}const _e=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`]);function ve(e,t,n=o){if(e!==void 0&&!_e.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let J=null;function ye(e){J=e}function be(){return J??process.cwd()}function xe(e,t,n={}){let r=n.isAlive??i,a=[];for(let[n,i]of[[`server`,e],[`ui`,t]])(i.status===`alive`||i.status===`foreign-host`&&r(i.lock.pid))&&a.push({name:n,pid:i.lock.pid,port:i.lock.port});return{targets:a}}function Y(e){let t=e.inspect??(t=>w(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=xe(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 X(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function Se(e,t=i){let n=await B(),r=null;for(let i of n){let n=w(i,`server`),a=w(i,`ui`);if(X(n,t)&&n.lock.port===e||X(a,t)&&a.lock.port===e)return i;r===null&&(X(n,t)&&n.lock.pid===e||X(a,t)&&a.lock.pid===e)&&(r=i)}return r}function Z(e){let t=Y({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function Ce(e){return new t(`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=Y({lockDir:a(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 q({});return}if(n===`all`){let e=await B();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=w(n,`server`),r=w(n,`ui`);!X(e,i)&&!X(r,i)||(Z(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 Se(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}Z(t);return}Z(a(x(be(),n)))})}async function we(e,t){let n,r;try{n=await C(x(e)),r=await C(x(_(e)))}catch{return{kind:`not-git`}}if(!$(n,r))return{kind:`symlink-escape`};let i=y(n,`.git`),a;try{a=ee(i)}catch{return{kind:`not-git`}}let o;if(a.isDirectory()){let e;try{e=await C(i)}catch{return{kind:`not-git`}}if(!$(e,n))return{kind:`symlink-escape`};o=e}else if(a.isFile()){let e;try{e=await S(i,`utf-8`)}catch{return{kind:`not-git`}}let t=/^gitdir:\s*(.+)$/m.exec(e.trim());if(!t)return{kind:`not-git`};let r=t[1].trim(),a=v(r)?r:x(n,r);try{o=await C(a)}catch{return{kind:`not-git`}}}else return{kind:`not-git`};let s=y(await Q(o),`config`),c;try{c=await S(s,`utf-8`)}catch{return{kind:`not-git`}}let l=Ee(c);if(l===null)return{kind:`no-origin`};let u=E(l);if(u===null||u.hostname!==`github.com`)return{kind:`non-github`};let d=u.owner.toLowerCase()===t.owner.toLowerCase(),f=u.name.toLowerCase()===t.repo.toLowerCase();return!d||!f?{kind:`wrong-repo`,actualOwner:u.owner,actualRepo:u.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${u.owner}/${u.name}.git`}}async function Q(e){let t;try{t=(await S(y(e,`commondir`),`utf-8`)).trim()}catch{return e}if(t.length===0)return e;let n=v(t)?t:x(e,t);try{return await C(n)}catch{return n}}function $(e,t){if(e===t)return!0;let n=b(t,e);return n.length>0&&!n.startsWith(`..`)&&!v(n)}function Te(e){let t=e.indexOf(`#`),n=e.indexOf(`;`),r=-1;return t>=0&&n>=0?r=Math.min(t,n):t>=0?r=t:n>=0&&(r=n),(r===-1?e:e.slice(0,r)).trim()}function Ee(e){let t=!1;for(let n of e.split(/\r?\n/)){let e=Te(n);if(e.length===0)continue;if(e.startsWith(`[`)){t=/^\[\s*remote\s+["']origin["']\s*\]$/.test(e);continue}if(!t)continue;let r=/^url\s*=\s*(.+)$/.exec(e);if(r)return De(r[1])}return null}function De(e){let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}const Oe=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=s(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let n=d(e,t);return{integration:`project-skill`,editorId:e.id,action:n.action,...n.path?{path:n.path}:{},...n.error?{error:n.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function ke(e,t,n={},r=Oe){let i=[];for(let a of t){let t=l[a];for(let a of r)i.push(a.write(t,e,n))}return i}function Ae(e,t,n={}){return{integrations:ke(e,t,n),claudeLaunchJson:t.includes(`claude`)?c(e,n):void 0}}export{ye as a,B as c,D as d,k as f,w as h,Ce as i,N as l,E as m,we as n,ve as o,O as p,Y as r,ge as s,Ae as t,P as u};
7
- //# sourceMappingURL=src-C_Q7AFoS.mjs.map
6
+ `)}async function q(e={}){let t=e.discover??B,n=e.inspect??w,r=e.log??(e=>console.log(e)),i=e.resolveCommand??N,a=e.resolveUsage??P,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=W(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:G(e)}));r(JSON.stringify(e,null,2));return}r(he(e.all?s:s.filter(e=>de.has(G(e)))))}function ge(){return new t(`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 q({all:t.all===!0||e===`all`,json:t.json===!0})})}const _e=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`]);function ve(e,t,n=a){if(e!==void 0&&!_e.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let J=null;function ye(e){J=e}function be(){return J??process.cwd()}function xe(e,t,n={}){let r=n.isAlive??i,a=[];for(let[n,i]of[[`server`,e],[`ui`,t]])(i.status===`alive`||i.status===`foreign-host`&&r(i.lock.pid))&&a.push({name:n,pid:i.lock.pid,port:i.lock.port});return{targets:a}}function Y(e){let t=e.inspect??(t=>w(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=xe(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 X(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function Se(e,t=i){let n=await B(),r=null;for(let i of n){let n=w(i,`server`),a=w(i,`ui`);if(X(n,t)&&n.lock.port===e||X(a,t)&&a.lock.port===e)return i;r===null&&(X(n,t)&&n.lock.pid===e||X(a,t)&&a.lock.pid===e)&&(r=i)}return r}function Z(e){let t=Y({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function Ce(e){return new t(`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=Y({lockDir:o(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 q({});return}if(n===`all`){let e=await B();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=w(n,`server`),r=w(n,`ui`);!X(e,i)&&!X(r,i)||(Z(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 Se(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}Z(t);return}Z(o(x(be(),n)))})}async function we(e,t){let n,r;try{n=await C(x(e)),r=await C(x(_(e)))}catch{return{kind:`not-git`}}if(!$(n,r))return{kind:`symlink-escape`};let i=y(n,`.git`),a;try{a=ee(i)}catch{return{kind:`not-git`}}let o;if(a.isDirectory()){let e;try{e=await C(i)}catch{return{kind:`not-git`}}if(!$(e,n))return{kind:`symlink-escape`};o=e}else if(a.isFile()){let e;try{e=await S(i,`utf-8`)}catch{return{kind:`not-git`}}let t=/^gitdir:\s*(.+)$/m.exec(e.trim());if(!t)return{kind:`not-git`};let r=t[1].trim(),a=v(r)?r:x(n,r);try{o=await C(a)}catch{return{kind:`not-git`}}}else return{kind:`not-git`};let s=y(await Q(o),`config`),c;try{c=await S(s,`utf-8`)}catch{return{kind:`not-git`}}let l=Ee(c);if(l===null)return{kind:`no-origin`};let u=E(l);if(u===null||u.hostname!==`github.com`)return{kind:`non-github`};let d=u.owner.toLowerCase()===t.owner.toLowerCase(),f=u.name.toLowerCase()===t.repo.toLowerCase();return!d||!f?{kind:`wrong-repo`,actualOwner:u.owner,actualRepo:u.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${u.owner}/${u.name}.git`}}async function Q(e){let t;try{t=(await S(y(e,`commondir`),`utf-8`)).trim()}catch{return e}if(t.length===0)return e;let n=v(t)?t:x(e,t);try{return await C(n)}catch{return n}}function $(e,t){if(e===t)return!0;let n=b(t,e);return n.length>0&&!n.startsWith(`..`)&&!v(n)}function Te(e){let t=e.indexOf(`#`),n=e.indexOf(`;`),r=-1;return t>=0&&n>=0?r=Math.min(t,n):t>=0?r=t:n>=0&&(r=n),(r===-1?e:e.slice(0,r)).trim()}function Ee(e){let t=!1;for(let n of e.split(/\r?\n/)){let e=Te(n);if(e.length===0)continue;if(e.startsWith(`[`)){t=/^\[\s*remote\s+["']origin["']\s*\]$/.test(e);continue}if(!t)continue;let r=/^url\s*=\s*(.+)$/.exec(e);if(r)return De(r[1])}return null}function De(e){let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}const Oe=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=s(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let n=d(e,t);return{integration:`project-skill`,editorId:e.id,action:n.action,...n.path?{path:n.path}:{},...n.error?{error:n.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function ke(e,t,n={},r=Oe){let i=[];for(let a of t){let t=l[a];for(let a of r)i.push(a.write(t,e,n))}return i}function Ae(e,t,n={}){return{integrations:ke(e,t,n),claudeLaunchJson:t.includes(`claude`)?c(e,n):void 0}}export{ye as a,B as c,D as d,k as f,w as h,Ce as i,N as l,E as m,we as n,ve as o,O as p,Y as r,ge as s,Ae as t,P as u};
7
+ //# sourceMappingURL=src-DnynaviS.mjs.map
@@ -0,0 +1 @@
1
+ import{_ as e,f as t,r as n}from"./start-NIyRsRSX.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
@@ -1,3 +1,3 @@
1
- import{n as e,t}from"./esm-CEs3LWY3.mjs";import{dt as n,yn as r}from"./server-lock-BpjJj3OD-dbH8FP82.mjs";import{i,t as a}from"./gh-detect-Dew_sAQh.mjs";import{Jn as o,ar as s,hr as c}from"./dist-BtrtJyLX.mjs";import{n as l}from"./constants-DAbcLLp_.mjs";import{spawn as u}from"node:child_process";import{closeSync as d,existsSync as f,mkdirSync as p,openSync as m,statSync as h}from"node:fs";import{basename as g,dirname as _,join as v}from"node:path";import{homedir as y}from"node:os";import{setTimeout as b}from"node:timers/promises";const x=`Open Knowledge.app`,S=`/Applications/${x}`;function C(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return h(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function w(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(T(e,S))return S;let t=v(e.homeDir??y(),`Applications`,x);return T(e,t)?t:null}function T(e,t){try{let n=v(t,`Contents`,`MacOS`,`Open Knowledge`),r=e.statSync(n);return r&&typeof r.isFile==`function`?r.isFile():!1}catch{return!1}}function E(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`)return{available:!1,reason:`darwin-only`};let t;try{t=w(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:e.isTTY!==!0||e.env.SSH_CONNECTION||e.env.SSH_TTY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function D(e){(e.log??(e=>console.error(e)))("Launching Open Knowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)");let t={...process.env};delete t.ELECTRON_RUN_AS_NODE,e.spawn(`open`,[`-b`,`com.inkeep.open-knowledge`],{detached:!0,stdio:`ignore`,env:t}).unref()}function O(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found at ${S}. Install via DMG, or omit --mode for browser mode.`;case`darwin-only`:return`Desktop app is macOS-only on this release. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect desktop bundle at ${S} (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available at ${S} but launch dispatch did not fire (caller bug).`}}function k(e){return v(_(e),`..`,`Frameworks`,`Open Knowledge Server.app`,`Contents`,`MacOS`,`Open Knowledge Helper`)}const A=/\/[^/]+\.app\/Contents\/MacOS\/[^/]+$/;function j(e){if(e.platform!==`darwin`||!A.test(e.execPath))return null;let t=k(e.execPath);return e.exists(t)?t:null}function M(e={}){let t=e.execPath??process.execPath,n=e.platform??process.platform,r=e.argv??process.argv,i=e.exists??f,a=r[1];return a?{command:j({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 N(e,t){return e.host??t.HOST??`localhost`}function P(e){let t=g(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var F=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 I(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 L(e){f(e.lockDir)||p(e.lockDir,{recursive:!0});let t=m(v(e.lockDir,r),`w`),n=e.spawn??u,{PORT:i,...a}=process.env,o=M();try{let r=n(o.command,[...o.prefixArgs,...e.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,t],cwd:e.cwd,env:{...a,ELECTRON_RUN_AS_NODE:`1`}});return r.unref(),r}finally{try{d(t)}catch{}}}function R(e,t,n){return e??(n===void 0?t:void 0)}function z(e,t){return e!==void 0&&t!==null&&t.port>0}function B(e,t,n){return e??(t!=null&&!n?1:0)}async function V(e){let t=e.spawn??u,n=M(),{PORT:r,...i}=process.env,a=t(n.command,[...n.prefixArgs,`ui`,`--port`,String(e.uiPort)],{cwd:e.cwd,stdio:`inherit`,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=B(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 H(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 U=n;function W(e){let t=e.sigtermGraceMs??U,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>b(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function G(e){let{config:t,cwd:n,host:r}=e,l=e.skipAutoInit??!1,u=e.skipUiAutoSpawn??!1,d=e.idleThresholdMs??18e5,{existsSync:f,mkdirSync:p}=await import(`node:fs`),{basename:m,dirname:h}=await import(`node:path`),{bootServer:g,getLogger:_,isProcessAlive:v,readUiLock:y,resolveContentDir:x}=await import(`./dist-DiX0-B7g.mjs`),S=e.log??_(`start`),C=e.singleFile!==void 0,w=e.projectDir??n,T=C?c(e.singleFile).canonicalFilePath:void 0,E=T?h(T):void 0,D=T?m(T):void 0;if(!C){if(!l&&!o(n))throw new F(n);let t=process.env.OK_RECLAIM_DISABLE??null,r=e=>{let t=typeof e.event==`string`?e.event:``;(t.endsWith(`-failed`)||t.endsWith(`-error`)||t.endsWith(`-missing`))&&S.warn({event:e},`[start] reclaim sweep reported a problem`)};try{(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-CMdzPlf3.mjs`)).repairMcpConfigs)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-Cc9XVvLw.mjs`)).repairLaunchJson)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-DoHj-jkH.mjs`)).repairSkills)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] skill repair sweep failed; continuing`)}}let O=E??x(t,n);!C&&!f(O)&&(p(O,{recursive:!0}),S.info({contentDir:O},`Created content directory`));let k=null,A=async({lockDir:t})=>{if(k=I({uiLock:y(t),isAlive:v}),k.action===`spawn`&&!u)try{let r=e.uiPort===void 0?void 0:[`ui`,`--port`,String(e.uiPort)];L({lockDir:t,cwd:n,spawn:e.spawn,args:r}),S.info({reason:k.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 k.action===`skip`&&S.info({port:k.port,pid:k.pid},`UI already running at port ${k.port}`)},j=e.reactShellDistDir===void 0,M=i(),N=s(),P=await g({config:t,contentDir:O,projectDir:C?w:n,contentRoot:C?void 0:t.content.dir,port:e.port,host:r,quiet:!1,detectGh:a,tokenStore:M,embeddingsKeyStore:N,...C?{ephemeral:!0,singleDocRelPath:D,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:j,idleShutdownMs:d,skipAutoInit:!0,...j?{spawnUiSiblingFn:A}:{},idleShutdownHandler:e=>W({readUiLock:()=>y(P.lockDir),isAlive:v,killPid:(e,t)=>{process.kill(e,t)},destroy:e,log:S}),log:S,...e.serveContentAssets?{serveContentAssets:!0}:{},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});k||={action:`skip`,reason:`alive`,pid:0,port:0};let R=k,z=null;if(R.action===`skip`)z=R.port>0?R.port:null;else if(!u){let t=e.uiBindTimeoutMs??3e3;z=await H({readUiLock:()=>y(P.lockDir),now:Date.now,sleep:e=>b(e),timeoutMs:t,pollIntervalMs:50}),z===null&&S.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:P.httpServer,destroy:P.destroy,lockDir:P.lockDir,contentDir:O,port:P.port,ready:P.ready,degraded:P.degraded,uiSpawnDecision:k,resolvedUiPort:z}}function K(t){if(t===`browser`||t===`app`)return t;throw new e(`--mode must be 'browser' or 'app'`)}function q(t){let n=Number.parseInt(t,10);if(Number.isNaN(n)||n<1||n>65535)throw new e(`--ui-port must be a port number between 1 and 65535`);return n}function J(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function Y(e){let t=[`Stopping Open Knowledge…`,`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 X(e,t){let n=J(process.env);n!==null&&(process.env.OK_CONSOLE_LEVEL=n);let{renderBanner:r}=await import(`./banner-BeneQTB4.mjs`),{accent:i,dim:a,error:o,warning:s}=await import(`./colors-gw_5YWUu.mjs`),c=process.cwd(),u=e;process.title=P(c);let d=N(t,process.env),f=t.port===void 0?void 0:Number(t.port),p=process.env.PORT?Number(process.env.PORT):void 0,m=t.uiPort===void 0?void 0:Number(t.uiPort),h=R(f,p,m);if(m!==void 0){let{readServerLock:e,resolveLockDir:t}=await import(`./dist-DiX0-B7g.mjs`);if(z(m,e(t(c)))){await V({cwd:c,uiPort:m});return}}let g;try{g=await G({config:u,cwd:c,host:d,port:h,...m===void 0?{}:{uiPort:m},...t.serveContentAssets?{serveContentAssets:!0}:{},...t.reactShellDistDir?{reactShellDistDir:t.reactShellDistDir}:{},...t.singleFile?{singleFile:t.singleFile}:{},...t.projectDir?{projectDir:t.projectDir}:{}})}catch(e){e instanceof F&&(console.error(o(e.message)),process.exit(1));let t=await import(`./dist-DiX0-B7g.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(o(e.message)),process.exit(1)),m!==void 0&&Z(e,t)){await V({cwd:c,uiPort:m});return}let n=Q(e,c,t);n!==null&&(console.error(o(n)),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let _=!1,v=async e=>{if(_)return;_=!0;let[t,...n]=Y(e);console.log(i(`\n${t}`));for(let e of n)console.log(a(` ${e}`));try{await g.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)};process.once(`SIGINT`,()=>{v(`SIGINT`)}),process.once(`SIGTERM`,()=>{v(`SIGTERM`)});let y=`http://${d}:${g.port}`,b=d===`0.0.0.0`||d===`::`?`http://0.0.0.0:${g.port}`:void 0,x=g.resolvedUiPort,S=x!==null&&x>0?`http://${d}:${x}`:y;console.log(r({name:`open-knowledge`,version:l,localUrl:S,apiUrl:S===y?void 0:y,networkUrl:b,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let C={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};g.ready.then(async()=>{if(g.degraded.length>0){console.log();for(let e of g.degraded){let t=C[e]??`${e} (check server logs for details)`;console.warn(` ${s(`⚠`)} ${s(e)}: ${a(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-C6LU_1mt.mjs`);e(S)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function Z(e,t){let n=t.ServerLockCollisionError;return n!==void 0&&e instanceof n}function Q(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=v(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`Open Knowledge 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`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function $(e){return new t(`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`,q).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,K).option(`--serve-content-assets`,`Serve content assets from this server`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path> (suppresses ok ui sibling)`).option(`--single-file <path>`,`No-project ephemeral single-file mode: scope the server to one markdown file (git + MCP off)`).option(`--project-dir <dir>`,`Throwaway project root for --single-file (where ephemeral .ok/ state lives)`).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
1
+ import{n as e,t}from"./esm-BLMtE3s6.mjs";import{bn as n,ft as r}from"./server-lock-BpjJj3OD-CUhVvie4.mjs";import{i,t as a}from"./gh-detect-CNO7EkgF.mjs";import{Yn as o,gr as s,or as c}from"./dist-D7myPw4s.mjs";import{n as l}from"./constants-iOPbvTyC.mjs";import{spawn as u}from"node:child_process";import{closeSync as d,existsSync as f,mkdirSync as p,openSync as m,statSync as h}from"node:fs";import{basename as g,dirname as _,join as v}from"node:path";import{homedir as y}from"node:os";import{setTimeout as b}from"node:timers/promises";const x=`Open Knowledge.app`,S=`/Applications/${x}`;function C(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return h(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function w(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(T(e,S))return S;let t=v(e.homeDir??y(),`Applications`,x);return T(e,t)?t:null}function T(e,t){try{let n=v(t,`Contents`,`MacOS`,`Open Knowledge`),r=e.statSync(n);return r&&typeof r.isFile==`function`?r.isFile():!1}catch{return!1}}function E(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`)return{available:!1,reason:`darwin-only`};let t;try{t=w(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:e.isTTY!==!0||e.env.SSH_CONNECTION||e.env.SSH_TTY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function D(e){(e.log??(e=>console.error(e)))("Launching Open Knowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)");let t={...process.env};delete t.ELECTRON_RUN_AS_NODE,e.spawn(`open`,[`-b`,`com.inkeep.open-knowledge`],{detached:!0,stdio:`ignore`,env:t}).unref()}function O(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found at ${S}. Install via DMG, or omit --mode for browser mode.`;case`darwin-only`:return`Desktop app is macOS-only on this release. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect desktop bundle at ${S} (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available at ${S} but launch dispatch did not fire (caller bug).`}}function k(e){return v(_(e),`..`,`Frameworks`,`Open Knowledge Server.app`,`Contents`,`MacOS`,`Open Knowledge Helper`)}const A=/\/[^/]+\.app\/Contents\/MacOS\/[^/]+$/;function j(e){if(e.platform!==`darwin`||!A.test(e.execPath))return null;let t=k(e.execPath);return e.exists(t)?t:null}function M(e={}){let t=e.execPath??process.execPath,n=e.platform??process.platform,r=e.argv??process.argv,i=e.exists??f,a=r[1];return a?{command:j({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 N(e,t){return e.host??t.HOST??`localhost`}function P(e){let t=g(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var F=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 I(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 L(e){f(e.lockDir)||p(e.lockDir,{recursive:!0});let t=m(v(e.lockDir,n),`w`),r=e.spawn??u,{PORT:i,...a}=process.env,o=M();try{let n=r(o.command,[...o.prefixArgs,...e.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,t],cwd:e.cwd,env:{...a,ELECTRON_RUN_AS_NODE:`1`}});return n.unref(),n}finally{try{d(t)}catch{}}}function R(e,t,n){return e??(n===void 0?t:void 0)}function z(e,t){return e!==void 0&&t!==null&&t.port>0}function B(e,t,n){return e??(t!=null&&!n?1:0)}async function V(e){let t=e.spawn??u,n=M(),{PORT:r,...i}=process.env,a=t(n.command,[...n.prefixArgs,`ui`,`--port`,String(e.uiPort)],{cwd:e.cwd,stdio:`inherit`,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=B(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 H(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 U=r;function W(e){let t=e.sigtermGraceMs??U,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>b(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function G(e){let{config:t,cwd:n,host:r}=e,l=e.skipAutoInit??!1,u=e.skipUiAutoSpawn??!1,d=e.idleThresholdMs??18e5,{existsSync:f,mkdirSync:p}=await import(`node:fs`),{basename:m,dirname:h}=await import(`node:path`),{bootServer:g,getLogger:_,isProcessAlive:v,readUiLock:y,resolveContentDir:x}=await import(`./dist-GL5zcXSU.mjs`),S=e.log??_(`start`),C=e.singleFile!==void 0,w=e.projectDir??n,T=C?s(e.singleFile).canonicalFilePath:void 0,E=T?h(T):void 0,D=T?m(T):void 0;if(!C){if(!l&&!o(n))throw new F(n);let t=process.env.OK_RECLAIM_DISABLE??null,r=e=>{let t=typeof e.event==`string`?e.event:``;(t.endsWith(`-failed`)||t.endsWith(`-error`)||t.endsWith(`-missing`))&&S.warn({event:e},`[start] reclaim sweep reported a problem`)};try{(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-BV1WJulV.mjs`)).repairMcpConfigs)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-DCXsAQuF.mjs`)).repairLaunchJson)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-BSA3PyS7.mjs`)).repairSkills)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] skill repair sweep failed; continuing`)}}let O=E??x(t,n);!C&&!f(O)&&(p(O,{recursive:!0}),S.info({contentDir:O},`Created content directory`));let k=null,A=async({lockDir:t})=>{if(k=I({uiLock:y(t),isAlive:v}),k.action===`spawn`&&!u)try{let r=e.uiPort===void 0?void 0:[`ui`,`--port`,String(e.uiPort)];L({lockDir:t,cwd:n,spawn:e.spawn,args:r}),S.info({reason:k.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 k.action===`skip`&&S.info({port:k.port,pid:k.pid},`UI already running at port ${k.port}`)},j=e.reactShellDistDir===void 0,M=i(),N=c(),P=await g({config:t,contentDir:O,projectDir:C?w:n,contentRoot:C?void 0:t.content.dir,port:e.port,host:r,quiet:!1,detectGh:a,tokenStore:M,embeddingsKeyStore:N,...C?{ephemeral:!0,singleDocRelPath:D,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:j,idleShutdownMs:d,skipAutoInit:!0,...j?{spawnUiSiblingFn:A}:{},idleShutdownHandler:e=>W({readUiLock:()=>y(P.lockDir),isAlive:v,killPid:(e,t)=>{process.kill(e,t)},destroy:e,log:S}),log:S,...e.serveContentAssets?{serveContentAssets:!0}:{},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});k||={action:`skip`,reason:`alive`,pid:0,port:0};let R=k,z=null;if(R.action===`skip`)z=R.port>0?R.port:null;else if(!u){let t=e.uiBindTimeoutMs??3e3;z=await H({readUiLock:()=>y(P.lockDir),now:Date.now,sleep:e=>b(e),timeoutMs:t,pollIntervalMs:50}),z===null&&S.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:P.httpServer,destroy:P.destroy,lockDir:P.lockDir,contentDir:O,port:P.port,ready:P.ready,degraded:P.degraded,uiSpawnDecision:k,resolvedUiPort:z}}function K(t){if(t===`browser`||t===`app`)return t;throw new e(`--mode must be 'browser' or 'app'`)}function q(t){let n=Number.parseInt(t,10);if(Number.isNaN(n)||n<1||n>65535)throw new e(`--ui-port must be a port number between 1 and 65535`);return n}function J(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function Y(e){let t=[`Stopping Open Knowledge…`,`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 X(e,t){let n=J(process.env);n!==null&&(process.env.OK_CONSOLE_LEVEL=n);let{renderBanner:r}=await import(`./banner-BxCFCyu8.mjs`),{accent:i,dim:a,error:o,warning:s}=await import(`./colors-CkPULM8m.mjs`),c=process.cwd(),u=e;process.title=P(c);let d=N(t,process.env),f=t.port===void 0?void 0:Number(t.port),p=process.env.PORT?Number(process.env.PORT):void 0,m=t.uiPort===void 0?void 0:Number(t.uiPort),h=R(f,p,m);if(m!==void 0){let{readServerLock:e,resolveLockDir:t}=await import(`./dist-GL5zcXSU.mjs`);if(z(m,e(t(c)))){await V({cwd:c,uiPort:m});return}}let g;try{g=await G({config:u,cwd:c,host:d,port:h,...m===void 0?{}:{uiPort:m},...t.serveContentAssets?{serveContentAssets:!0}:{},...t.reactShellDistDir?{reactShellDistDir:t.reactShellDistDir}:{},...t.singleFile?{singleFile:t.singleFile}:{},...t.projectDir?{projectDir:t.projectDir}:{}})}catch(e){e instanceof F&&(console.error(o(e.message)),process.exit(1));let t=await import(`./dist-GL5zcXSU.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(o(e.message)),process.exit(1)),m!==void 0&&Z(e,t)){await V({cwd:c,uiPort:m});return}let n=Q(e,c,t);n!==null&&(console.error(o(n)),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let _=!1,v=async e=>{if(_)return;_=!0;let[t,...n]=Y(e);console.log(i(`\n${t}`));for(let e of n)console.log(a(` ${e}`));try{await g.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)};process.once(`SIGINT`,()=>{v(`SIGINT`)}),process.once(`SIGTERM`,()=>{v(`SIGTERM`)});let y=`http://${d}:${g.port}`,b=d===`0.0.0.0`||d===`::`?`http://0.0.0.0:${g.port}`:void 0,x=g.resolvedUiPort,S=x!==null&&x>0?`http://${d}:${x}`:y;console.log(r({name:`open-knowledge`,version:l,localUrl:S,apiUrl:S===y?void 0:y,networkUrl:b,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let C={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};g.ready.then(async()=>{if(g.degraded.length>0){console.log();for(let e of g.degraded){let t=C[e]??`${e} (check server logs for details)`;console.warn(` ${s(`⚠`)} ${s(e)}: ${a(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-DHTbHSqx.mjs`);e(S)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function Z(e,t){let n=t.ServerLockCollisionError;return n!==void 0&&e instanceof n}function Q(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=v(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`Open Knowledge 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`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function $(e){return new t(`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`,q).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,K).option(`--serve-content-assets`,`Serve content assets from this server`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path> (suppresses ok ui sibling)`).option(`--single-file <path>`,`No-project ephemeral single-file mode: scope the server to one markdown file (git + MCP off)`).option(`--project-dir <dir>`,`Throwaway project root for --single-file (where ephemeral .ok/ state lives)`).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
2
2
  `),process.exit(2));let e=[];if(t.port!==void 0&&e.push(`--port`),t.uiPort!==void 0&&e.push(`--ui-port`),t.host!==void 0&&e.push(`--host`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=E(C());if(n.available){D({spawn:u});return}console.error(O(n.reason)),process.exit(1)}await X(n,t)})}export{D as S,$ as _,B as a,C as b,P as c,R as d,N as f,L as g,z as h,W as i,Y as l,X as m,H as n,V as o,J as p,G as r,I as s,F as t,Z as u,Q as v,E as x,M as y};
3
- //# sourceMappingURL=start-Dl_YsC2w.mjs.map
3
+ //# sourceMappingURL=start-NIyRsRSX.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{t as e}from"./chunk-5QVNJEHU-BV0xuiYW.mjs";export{e as statCommand};
@@ -0,0 +1,2 @@
1
+ import{T as e,p as t,w as n}from"./src-BkCVz_TJ.mjs";import{D as r,b as i,c as a,s as o}from"./chunk-ICPOFSXX-C--tVIY5.mjs";import{H as s,h as c}from"./chunk-5PVQY5BW-DUXm3tDu.mjs";import{t as l}from"./line-C6RZPh4T.mjs";import"./chunk-U2HBQHQK-C1Q2DiEX.mjs";import"./chunk-BSJP7CBP-BG3yJGkJ.mjs";import"./chunk-ZZ45TVLE-DwKS4e_N.mjs";import{t as u}from"./graphlib-BI4uS4Lx.mjs";import{t as d}from"./dagre-L3rg9n9q.mjs";import"./chunk-55IACEB6-Cmyc0XwJ.mjs";import"./chunk-EDXVE4YY-CI4s3JHP.mjs";import"./chunk-X2U36JSP-BiF0R9ys.mjs";import"./chunk-5FUZZQ4R-Bf6nbyQG.mjs";import"./chunk-ENJZ2VHE-CQwjtY5A.mjs";import"./chunk-336JU56O-KTMEs5Wk.mjs";import{i as f,n as p,t as m}from"./chunk-OYMX7WX6-Dvg98Zb-.mjs";var h=n(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit).attr(`cy`,i().state.padding+i().state.sizeUnit),`drawStartState`),g=n(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,i().state.textHeight).attr(`class`,`divider`).attr(`x2`,i().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=n((e,t)=>{let n=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+2*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,r.width+2*i().state.padding).attr(`height`,r.height+2*i().state.padding).attr(`rx`,i().state.radius),n},`drawSimpleState`),v=n((e,t)=>{let r=n(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*i().state.padding).text(t);n||r.attr(`dy`,i().state.textHeight)},`addTspan`),a=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+1.3*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),o=a.height,s=e.append(`text`).attr(`x`,i().state.padding).attr(`y`,o+i().state.padding*.4+i().state.dividerMargin+i().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;t.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,i().state.padding).attr(`y1`,i().state.padding+o+i().state.dividerMargin/2).attr(`y2`,i().state.padding+o+i().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,a.width);return u.attr(`x2`,f+3*i().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,f+2*i().state.padding).attr(`height`,d.height+o+2*i().state.padding).attr(`rx`,i().state.radius),e},`drawDescrState`),y=n((e,t,n)=>{let r=i().state.padding,a=2*i().state.padding,o=e.node().getBBox(),s=o.width,c=o.x,l=e.append(`text`).attr(`x`,0).attr(`y`,i().state.titleShift).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+a,d=Math.max(u,s);d===s&&(d+=a);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-i().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+i().state.textHeight+i().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-a)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,i().state.textHeight*3).attr(`rx`,i().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*i().state.textHeight).attr(`rx`,i().state.radius),e},`addTitleAndBox`),b=n(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,i().state.sizeUnit+i().state.miniPadding).attr(`cx`,i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr(`cy`,i().state.padding+i().state.sizeUnit+i().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit+2).attr(`cy`,i().state.padding+i().state.sizeUnit+2)),`drawEndState`),x=n((e,t)=>{let n=i().state.forkWidth,r=i().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,i().state.padding).attr(`y`,i().state.padding)},`drawForkJoinState`),S=n((e,t,n,r)=>{let a=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(o.lineBreakRegex),u=1.25*i().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}a+=u,e.attr(`x`,t+i().state.noteMargin),e.attr(`y`,n+a+1.25*i().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:a}},`_drawLongText`),C=n((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,i().state.padding),{textWidth:r,textHeight:a}=S(e,0,0,t.append(`g`));return n.attr(`height`,a+2*i().state.noteMargin),n.attr(`width`,r+i().state.noteMargin*2),n},`drawNote`),w=n(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},a=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(a),t.type===`end`&&b(a),(t.type===`fork`||t.type===`join`)&&x(a,t),t.type===`note`&&C(t.note.text,a),t.type===`divider`&&g(a),t.type===`default`&&t.descriptions.length===0&&_(a,t),t.type===`default`&&t.descriptions.length>0&&v(a,t);let o=a.node().getBBox();return r.width=o.width+2*i().state.padding,r.height=o.height+2*i().state.padding,r},`drawState`),T=0,E=n(function(t,a,u){let d=n(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);a.points=a.points.filter(e=>!Number.isNaN(e.y));let f=a.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=t.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(i().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let n=t.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(a.points),l=o.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=l.length;t++){let i=n.append(`text`).attr(`text-anchor`,`middle`).text(l[t]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),e.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,e.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=n.node().getBBox();n.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-i().state.padding/2).attr(`y`,s-h/2-i().state.padding/2-3.5).attr(`width`,p+i().state.padding).attr(`height`,h+i().state.padding),e.info(g)}T++},`drawEdge`),D,O={},k=n(function(){},`setConf`),A=n(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=n(function(n,r,o,s){D=i().state;let c=i().securityLevel,l;c===`sandbox`&&(l=t(`#i`+r));let u=t(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;e.debug(`Rendering diagram `+n);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;a(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=n(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=n((t,n,r,i,a,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<t.length;f++)if(t[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let o;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);o=N(t.doc,e,t.id,!i,a,s,c);{e=y(e,t,i);let n=e.node().getBBox();o.width=n.width,o.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else o=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(o.id+`-note`,e),l.setNode(o.id,o)):(l.setNode(o.id,o),l.setNode(o.id+`-note`,e)),l.setParent(o.id,o.id+`-group`),l.setParent(o.id+`-note`,o.id+`-group`)}else l.setNode(o.id,o)}e.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(t){_++,e.debug(`Setting edge`,t),l.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:D.labelHeight*o.getRows(t.title).length,labelpos:`c`},`id`+_)}),d(l),e.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(t){t!==void 0&&l.node(t)!==void 0?(e.warn(`Node `+t+`: `+JSON.stringify(l.node(t))),a.select(`#`+v.id+` #`+t).attr(`transform`,`translate(`+(l.node(t).x-l.node(t).width/2)+`,`+(l.node(t).y+(O[t]?O[t].y:0)-l.node(t).height/2)+` )`),a.select(`#`+v.id+` #`+t).attr(`data-x-shift`,l.node(t).x-l.node(t).width/2),s.querySelectorAll(`#`+v.id+` #`+t+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):e.debug(`No Node `+t+`: `+JSON.stringify(l.node(t)))});let b=v.getBBox();l.edges().forEach(function(t){t!==void 0&&l.edge(t)!==void 0&&(e.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(l.edge(t))),E(n,l.edge(t),l.edge(t).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,e.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:n(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
2
+ //# sourceMappingURL=stateDiagram-FHFEXIEX-BREbMXiC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{w as e}from"./src-BkCVz_TJ.mjs";import"./chunk-ICPOFSXX-C--tVIY5.mjs";import"./chunk-5PVQY5BW-DUXm3tDu.mjs";import"./chunk-U2HBQHQK-C1Q2DiEX.mjs";import"./chunk-BSJP7CBP-BG3yJGkJ.mjs";import"./chunk-ZZ45TVLE-DwKS4e_N.mjs";import"./chunk-55IACEB6-Cmyc0XwJ.mjs";import"./chunk-EDXVE4YY-CI4s3JHP.mjs";import"./chunk-X2U36JSP-BiF0R9ys.mjs";import"./chunk-5FUZZQ4R-Bf6nbyQG.mjs";import"./chunk-ENJZ2VHE-CQwjtY5A.mjs";import"./chunk-336JU56O-KTMEs5Wk.mjs";import{i as t,n,r,t as i}from"./chunk-OYMX7WX6-Dvg98Zb-.mjs";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
2
+ //# sourceMappingURL=stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-VYOJP4TV-DN1CSkP5.mjs";export{e as strings};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-MHTUABJP-Dk5ocjFo.mjs";export{e as tac};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-DCAAORBQ-BUMlCZ4-.mjs";export{e as tailCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-YNYSPYQ5-gU4-j5DO.mjs";import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import"./chunk-5QMZ5MUS-BwpNU33k.mjs";import{n as e}from"./chunk-BRGMQKJV-CHbk2NqS.mjs";export{e as tarCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-55VFSPNA-RFvY6zq0.mjs";export{e as teeCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-CWQS3NFK-BkE4vqrf.mjs";import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-Z6LRHWXI-EsbeaQ3V.mjs";export{e as timeCommand};
@@ -0,0 +1,121 @@
1
+ import{C as e,T as t,p as n,w as r}from"./src-BkCVz_TJ.mjs";import{$ as i,K as a,Q as o,a as s,b as c,o as l,tt as u,y as d}from"./chunk-ICPOFSXX-C--tVIY5.mjs";import{t as f}from"./arc-Doj9VrmJ.mjs";import{f as p}from"./chunk-5PVQY5BW-DUXm3tDu.mjs";import{t as m}from"./chunk-426QAEUC-DUpKwtVu.mjs";var h=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:r(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:r(function(){return this.next()||this.lex()},`lex`),begin:r(function(e){this.conditionStack.push(e)},`begin`),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:r(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:r(function(e){this.begin(e)},`pushState`),stateStackSize:r(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:r(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin(`acc_title`),15;case 10:return this.popState(),`acc_title_value`;case 11:return this.begin(`acc_descr`),17;case 12:return this.popState(),`acc_descr_value`;case 13:this.begin(`acc_descr_multiline`);break;case 14:this.popState();break;case 15:return`acc_descr_multiline_value`;case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}})();function d(){this.yy={}}return r(d,`Parser`),d.prototype=u,u.Parser=d,new d})();h.parser=h;var g=h,_={};e(_,{addEvent:()=>M,addSection:()=>O,addTask:()=>j,addTaskOrg:()=>N,clear:()=>T,default:()=>ee,getCommonDb:()=>w,getDirection:()=>D,getSections:()=>k,getTasks:()=>A,setDirection:()=>E});var v=``,y=0,b=`LR`,x=[],S=[],C=[],w=r(()=>l,`getCommonDb`),T=r(function(){x.length=0,S.length=0,v=``,C.length=0,b=`LR`,s()},`clear`),E=r(function(e){b=e},`setDirection`),D=r(function(){return b},`getDirection`),O=r(function(e){v=e,x.push(e)},`addSection`),k=r(function(){return x},`getSections`),A=r(function(){let e=P(),t=0;for(;!e&&t<100;)e=P(),t++;return S.push(...C),S},`getTasks`),j=r(function(e,t,n){let r={id:y++,section:v,type:v,task:e,score:t||0,events:n?[n]:[]};C.push(r)},`addTask`),M=r(function(e){C.find(e=>e.id===y-1).events.push(e)},`addEvent`),N=r(function(e){let t={section:v,type:v,description:e,task:e,classes:[]};S.push(t)},`addTaskOrg`),P=r(function(){let e=r(function(e){return C[e].processed},`compileTask`),t=!0;for(let[n,r]of C.entries())e(n),t&&=r.processed;return t},`compileTasks`),ee={clear:T,getCommonDb:w,getDirection:D,setDirection:E,addSection:O,getSections:k,getTasks:A,addTask:j,addTaskOrg:N,addEvent:M},F=0,I=r(function(e,t){let n=e.append(`rect`);return n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),te=r(function(e,t){let n=e.append(`circle`).attr(`cx`,t.cx).attr(`cy`,t.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=e.append(`g`);i.append(`circle`).attr(`cx`,t.cx-15/3).attr(`cy`,t.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,t.cx+15/3).attr(`cy`,t.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let n=f().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+2)+`)`)}r(a,`smile`);function o(e){let n=f().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+7)+`)`)}r(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,t.cx-5).attr(`y1`,t.cy+7).attr(`x2`,t.cx+5).attr(`y2`,t.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return r(s,`ambivalent`),t.score>3?a(i):t.score<3?o(i):s(i),n},`drawFace`),ne=r(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),L=r(function(e,t){let n=t.text.replace(/<br\s*\/?>/gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),re=r(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}r(n,`genPoints`);let i=e.append(`polygon`);i.attr(`points`,n(t.x,t.y,50,20,7)),i.attr(`class`,`labelBox`),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,L(e,t)},`drawLabel`),R=r(function(e,t,n){let r=e.append(`g`),i=B();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,I(r,i),V(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,ie=r(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),te(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=B();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,I(a,o),V(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),ae=r(function(e,t){I(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),oe=r(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),B=r(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),V=(function(){function e(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}r(e,`byText`);function t(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}r(t,`byTspan`);function n(e,n,r,a,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,r,a,o,s,c,l),i(d,c)}r(n,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return r(i,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),se=r(function(e,t){F=0,z=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`);function H(e,t){e.each(function(){var e=n(this),r=e.text().split(/(\s+|<br>)/).reverse(),i,a=[],o=1.1,s=e.attr(`y`),c=parseFloat(e.attr(`dy`)),l=e.text(null).append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,c+`em`);for(let n=0;n<r.length;n++)i=r[r.length-1-n],a.push(i),l.text(a.join(` `).trim()),(l.node().getComputedTextLength()>t||i===`<br>`)&&(a.pop(),l.text(a.join(` `).trim()),a=i===`<br>`?[``]:[i],l=e.append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,o+`em`).text(i))})}r(H,`wrap`);var ce=r(function(e,t,r,i,a,o=!1){let{theme:s,look:c}=i,l=s?.includes(`redux`),u=r%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=e.append(`g`);t.section=u,d.attr(`class`,(t.class?t.class+` `:``)+`timeline-node `+(`section-`+u));let f=d.append(`g`),p=d.append(`g`),m=p.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),h=i.fontSize?.replace?i.fontSize.replace(`px`,``):i.fontSize;if(t.height=m.height+h*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,p.attr(`transform`,`translate(`+t.width/2+`, `+t.padding/2+`)`),l&&p.attr(`transform`,`translate(${t.width/2}, ${o?t.padding/2+3:t.padding})`),ue(f,t,u,a,i),c===`neo`&&(d.attr(`data-look`,`neo`),l)){let t=s.includes(`dark`),r=n(e.node()?.ownerSVGElement??e.node()),i=r.attr(`id`)??``,a=i?`${i}-drop-shadow`:`drop-shadow`;if(r.select(`#${a}`).empty()){let e=r.select(`defs`);(e.empty()?r.append(`defs`):e).append(`filter`).attr(`id`,a).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,t?`0.2`:`0.06`).attr(`flood-color`,t?`#FFFFFF`:`#000000`)}}return t},`drawNode`),le=r(function(e,t,n){let r=e.append(`g`),i=r.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace(`px`,``):n.fontSize;return r.remove(),i.height+a*1.1*.5+t.padding},`getVirtualNodeHeight`),ue=r(function(e,t,n,r,i){let{theme:a}=i,o=a?.includes(`redux`)?0:5,s=o>0?`M0 ${t.height-5} v${-t.height+10} q0,-${o},${o},-${o} h${t.width-10} q${o},0,${o},${o} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append(`path`).attr(`id`,r+`-node-`+ F++).attr(`class`,`node-bkg node-`+t.type).attr(`d`,s),a?.includes(`redux`)||e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),U={drawRect:I,drawCircle:ne,drawSection:R,drawText:L,drawLabel:re,drawTask:ie,drawBackgroundRect:ae,getTextObj:oe,getNoteRect:B,initGraphics:se,drawNode:ce,getVirtualNodeHeight:le},de=r(function(e,r,i,o){let s=c(),{look:l,theme:u,themeVariables:d}=s,{useGradient:f,gradientStart:p,gradientStop:m}=d,h=s.timeline?.leftMargin??50;t.debug(`timeline`,o.db);let g=s.securityLevel,_;g===`sandbox`&&(_=n(`#i`+r));let v=n(g===`sandbox`?_.nodes()[0].contentDocument.body:`body`).select(`#`+r);v.append(`g`);let y=o.db.getTasks(),b=o.db.getCommonDb().getDiagramTitle();t.debug(`task`,y),U.initGraphics(v,r);let x=o.db.getSections();t.debug(`sections`,x);let S=0,C=0,w=0,T=0,E=50+h,D=50;T=50;let O=0,k=!0;x.forEach(function(e){let n={number:O,descr:e,section:O,width:150,padding:20,maxHeight:S},r=U.getVirtualNodeHeight(v,n,s);t.debug(`sectionHeight before draw`,r),S=Math.max(S,r+20)});let A=0,j=0;t.debug(`tasks.length`,y.length);for(let[e,n]of y.entries()){let r={number:e,descr:n,section:n.section,width:150,padding:20,maxHeight:C},i=U.getVirtualNodeHeight(v,r,s);t.debug(`taskHeight before draw`,i),C=Math.max(C,i+20),A=Math.max(A,n.events.length);let a=0;for(let e of n.events){let t={descr:e,section:n.section,number:n.section,width:150,padding:20,maxHeight:50};a+=U.getVirtualNodeHeight(v,t,s)}n.events.length>0&&(a+=(n.events.length-1)*10),j=Math.max(j,a)}t.debug(`maxSectionHeight before draw`,S),t.debug(`maxTaskHeight before draw`,C),x&&x.length>0?x.forEach(e=>{let n=y.filter(t=>t.section===e),i={number:O,descr:e,section:O,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:S};t.debug(`sectionNode`,i);let a=v.append(`g`),o=U.drawNode(a,i,O,s,r);t.debug(`sectionNode output`,o),a.attr(`transform`,`translate(${E}, ${T})`),D+=S+50,n.length>0&&W(v,n,O,E,D,C,s,A,j,S,!1,r),E+=200*Math.max(n.length,1),D=T,O++}):(k=!1,W(v,y,O,E,D,C,s,A,j,S,!0,r));let M=v.node().getBBox();if(t.debug(`bounds`,M),b&&v.append(`text`).text(b).attr(`x`,l===`neo`?M.x*2+h:M.width/2-h).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),w=k?S+C+150:C+100,v.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,h).attr(`y1`,w).attr(`x2`,M.width+3*h).attr(`y2`,w).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#${r}-arrowhead)`),l===`neo`&&f&&u!==`neutral`){let e=v.select(`defs`),t=(e.empty()?v.append(`defs`):e).append(`linearGradient`).attr(`id`,v.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,p).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,m).attr(`stop-opacity`,1)}a(void 0,v,s.timeline?.padding??50,s.timeline?.useMaxWidth??!1)},`draw`),W=r(function(e,n,r,i,a,o,s,c,l,u,d,f){for(let c of n){let n={descr:c.task,section:r,number:r,width:150,padding:20,maxHeight:o};t.debug(`taskNode`,n);let u=e.append(`g`).attr(`class`,`taskWrapper`),p=U.drawNode(u,n,r,s,f).height;if(t.debug(`taskHeight after draw`,p),u.attr(`transform`,`translate(${i}, ${a})`),o=Math.max(o,p),c.events){let t=e.append(`g`).attr(`class`,`lineWrapper`),n=o;a+=100,n+=fe(e,c.events,r,i,a,s,f),a-=100,t.append(`line`).attr(`x1`,i+190/2).attr(`y1`,a+o).attr(`x2`,i+190/2).attr(`y2`,a+o+100+l+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#${f}-arrowhead)`).attr(`stroke-dasharray`,`5,5`)}i+=200,d&&!s.timeline?.disableMulticolor&&r++}a-=10},`drawTasks`),fe=r(function(e,n,r,i,a,o,s){let c=0,l=a;a+=100;for(let l of n){let n={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};t.debug(`eventNode`,n);let u=e.append(`g`).attr(`class`,`eventWrapper`),d=U.drawNode(u,n,r,o,s,!0).height;c+=d,u.attr(`transform`,`translate(${i}, ${a})`),a=a+10+d}return a=l,c},`drawEvents`),pe={setConf:r(()=>{},`setConf`),draw:de},G=200,K=5,me=G+K*2,q=G+100,he=q+K*2,J=10,ge=0,Y=20,X=20,Z=30,Q=50,_e=r(function(e,n,r,i){let o=c(),s=o.timeline?.leftMargin??50;t.debug(`timeline`,i.db);let l=m(n);l.append(`g`);let u=i.db.getTasks(),d=i.db.getCommonDb().getDiagramTitle();t.debug(`task`,u),U.initGraphics(l);let f=i.db.getSections();t.debug(`sections`,f);let h=0,g=0,_=50+s,v=50,y=v,b=_,x=me+X,S=he+Q,C=b+x,w=0,T=f&&f.length>0,E=T?C:_+x,D=Math.max(50,x+S-K*2);f.forEach(function(e){let n={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h},r=U.getVirtualNodeHeight(l,n,o);t.debug(`sectionHeight before draw`,r),h=Math.max(h,r)});let O=0;t.debug(`tasks.length`,u.length);for(let[e,n]of u.entries()){let r={number:e,descr:n,section:n.section,width:G,padding:K,maxHeight:g},i=U.getVirtualNodeHeight(l,r,o);t.debug(`taskHeight before draw`,i),g=Math.max(g,i);let a=0;for(let e of n.events){let t={descr:e,section:n.section,number:n.section,width:q,padding:K,maxHeight:50};a+=U.getVirtualNodeHeight(l,t,o)}n.events.length>0&&(a+=(n.events.length-1)*J),O=Math.max(O,a)+ge}t.debug(`maxSectionHeight before draw`,h),t.debug(`maxTaskHeight before draw`,g);let k=Math.max(g,O)+Z;T?f.forEach(e=>{let n=u.filter(t=>t.section===e),r={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h};t.debug(`sectionNode`,r);let i=l.append(`g`),a=U.drawNode(i,r,w,o);t.debug(`sectionNode output`,a);let s=E-x;i.attr(`transform`,`translate(${s}, ${v})`);let c=v+a.height+Y;n.length>0&&$(l,n,w,E,c,g,o,k,!1);let d=n.length,f=a.height+Y+k*Math.max(d,1)-(d>0?Z*2:0);v+=f,w++}):$(l,u,w,E,v,g,o,k,!0);let A=l.node()?.getBBox();if(!A)throw Error(`bbox not found`);if(t.debug(`bounds`,A),d){if(l.append(`text`).text(d).attr(`x`,A.width/2-s).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),A=l.node()?.getBBox(),!A)throw Error(`bbox not found`);t.debug(`bounds after title`,A)}let[j]=p(o.fontSize),M=(j??16)*2,N=(j??16)*.5+20,P=l.append(`g`).attr(`class`,`lineWrapper`);P.append(`line`).attr(`x1`,E).attr(`y1`,y-M).attr(`x2`,E).attr(`y2`,A.y+A.height+N).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),P.lower(),a(void 0,l,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},`draw`),$=r(function(e,n,r,i,a,o,s,c,l){for(let u of n){let n={descr:u.task,section:r,number:r,width:G,padding:K,maxHeight:o};t.debug(`taskNode`,n);let d=e.append(`g`).attr(`class`,`taskWrapper`),f=U.drawNode(d,n,r,s),p=f.height;t.debug(`taskHeight after draw`,p);let m=i-X-f.width;if(d.attr(`transform`,`translate(${m}, ${a})`),o=Math.max(o,p),u.events&&u.events.length>0){let t=a,n=i+Q;ve(e,u.events,r,i,n,t,s)}a+=c,l&&!s.timeline?.disableMulticolor&&r++}},`drawTasks`),ve=r(function(e,n,r,i,a,o,s){let c=o;for(let o of n){let n={descr:o,section:r,number:r,width:q,padding:K,maxHeight:0};t.debug(`eventNode`,n);let l=e.append(`g`).attr(`class`,`eventWrapper`),u=U.drawNode(l,n,r,s).height;l.attr(`transform`,`translate(${a}, ${c})`);let d=e.append(`g`).attr(`class`,`lineWrapper`),f=c+u/2;d.append(`line`).attr(`x1`,i).attr(`y1`,f).attr(`x2`,a).attr(`y2`,f).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`),c=c+u+J}return c-o},`drawEvents`),ye={setConf:r(()=>{},`setConf`),draw:_e},be=r(e=>{let{theme:t}=d(),n=t?.includes(`dark`),r=t?.includes(`color`),i=e.svgId?.replace(/^#/,``)??``,a=i?`url(#${i}-drop-shadow)`:e.dropShadow??`none`,o=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let i=`${17-3*t}`,s=r?e.borderColorArray[t]:e.mainBkg,c=r?e.borderColorArray[t]:e.nodeBorder;o+=`
7
+ .section-${t-1} rect,
8
+ .section-${t-1} path,
9
+ .section-${t-1} circle {
10
+ fill: ${n&&r?e.mainBkg:s};
11
+ stroke: ${c};
12
+ stroke-width: ${e.strokeWidth};
13
+ filter: ${a};
14
+ }
15
+
16
+ .section-${t-1} text {
17
+ fill: ${e.nodeBorder};
18
+ font-weight: ${e.fontWeight}
19
+ }
20
+
21
+ .node-icon-${t-1} {
22
+ font-size: 40px;
23
+ color: ${e[`cScaleLabel`+t]};
24
+ }
25
+
26
+ .section-edge-${t-1} {
27
+ stroke: ${e[`cScale`+t]};
28
+ }
29
+
30
+ .edge-depth-${t-1} {
31
+ stroke-width: ${i};
32
+ }
33
+
34
+ .section-${t-1} line {
35
+ stroke: ${e[`cScaleInv`+t]};
36
+ stroke-width: 3;
37
+ }
38
+
39
+ .lineWrapper line {
40
+ stroke: ${e.nodeBorder};
41
+ stroke-width:${e.strokeWidth}
42
+ }
43
+
44
+ .disabled,
45
+ .disabled circle,
46
+ .disabled text {
47
+ fill: ${e.tertiaryColor??`lightgray`};
48
+ }
49
+
50
+ .disabled text {
51
+ fill: ${e.clusterBorder??`#efefef`};
52
+ }
53
+ `}return o},`genReduxSections`),xe=r(e=>{let t=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],u(e[`lineColor`+t])?e[`lineColor`+t]=i(e[`lineColor`+t],20):e[`lineColor`+t]=o(e[`lineColor`+t],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let r=``+(17-3*n);t+=`
54
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {
55
+ fill: ${e[`cScale`+n]};
56
+ }
57
+ .section-${n-1} text {
58
+ fill: ${e[`cScaleLabel`+n]};
59
+ }
60
+ .node-icon-${n-1} {
61
+ font-size: 40px;
62
+ color: ${e[`cScaleLabel`+n]};
63
+ }
64
+ .section-edge-${n-1}{
65
+ stroke: ${e[`cScale`+n]};
66
+ }
67
+ .edge-depth-${n-1}{
68
+ stroke-width: ${r};
69
+ }
70
+ .section-${n-1} line {
71
+ stroke: ${e[`cScaleInv`+n]} ;
72
+ stroke-width: 3;
73
+ }
74
+
75
+ .lineWrapper line{
76
+ stroke: ${e[`cScaleLabel`+n]} ;
77
+ }
78
+
79
+ .disabled, .disabled circle, .disabled text {
80
+ fill: ${e.tertiaryColor??`lightgray`};
81
+ }
82
+ .disabled text {
83
+ fill: ${e.clusterBorder??`#efefef`};
84
+ }
85
+ `}return t},`genSections`),Se={db:_,renderer:{setConf:r(()=>{},`setConf`),draw:r((e,t,n,r)=>(r?.db?.getDirection?.()??`LR`)===`TD`?ye.draw(e,t,n,r):pe.draw(e,t,n,r),`draw`)},parser:g,styles:r(e=>{let{theme:t}=d(),n=t?.includes(`redux`),r=t===`neutral`,i=e.svgId?.replace(/^#/,``)??``,a=``;if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!r)for(let t=0;t<e.THEME_COLOR_LIMIT;t++)a+=`
86
+ .section-${t-1}[data-look="neo"] rect,
87
+ .section-${t-1}[data-look="neo"] path,
88
+ .section-${t-1}[data-look="neo"] circle {
89
+ fill: ${e.mainBkg};
90
+ stroke: url(#${i}-gradient);
91
+ stroke-width: 2;
92
+ }
93
+ .section-${t-1}[data-look="neo"] line {
94
+ stroke: url(#${i}-gradient);
95
+ stroke-width: 2;
96
+ }`;return`
97
+ .edge {
98
+ stroke-width: 3;
99
+ }
100
+ ${n?be(e):xe(e)}
101
+ ${a}
102
+ .section-root rect, .section-root path, .section-root circle {
103
+ fill: ${e.git0};
104
+ }
105
+ .section-root text {
106
+ fill: ${e.gitBranchLabel0};
107
+ }
108
+ .icon-container {
109
+ height:100%;
110
+ display: flex;
111
+ justify-content: center;
112
+ align-items: center;
113
+ }
114
+ .edge {
115
+ fill: none;
116
+ }
117
+ .eventWrapper {
118
+ filter: brightness(120%);
119
+ }
120
+ `},`getStyles`)};export{Se as diagram};
121
+ //# sourceMappingURL=timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import"./chunk-5QMZ5MUS-BwpNU33k.mjs";import"./chunk-A5O5YHGN-DApqA6Ow.mjs";import{n as e}from"./chunk-YTNYSM6T-DpkSVTln.mjs";export{e as timeoutCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{t as e}from"./chunk-OCLXQMOG-DOkdFgyf.mjs";export{e as touchCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-62RKD26F-DebCAz0V.mjs";export{e as trCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-XVDPCNWR-CkzIJQaO.mjs";export{e as treeCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-K5T4RW27-BPgPjo39.mjs";import{n as e}from"./chunk-ORNJ4GCN-R_gUIosC.mjs";export{e as createTreeViewServices};
@@ -0,0 +1 @@
1
+ import"./chunk-K5T4RW27-BPgPjo39.mjs";import{n as e}from"./chunk-LIHQZDEY-Fy8O-IVI.mjs";export{e as createTreemapServices};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{i as e,t}from"./chunk-R6QSAL5T-RaNW7MSS.mjs";export{e as falseCommand,t as trueCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{n as e}from"./chunk-PYSFUGCK-B_Gv8rUn.mjs";export{e as unexpand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{t as e}from"./chunk-WKFATFPP-CoPg2OGf.mjs";export{e as uniqCommand};